baseline: 小军 WMS 二开代码原始快照(含 SynOABusiness.cs Debugger.Break)

This commit is contained in:
Gaussian committed 2026-11-06 18:38:38 +08:00
commit c2b0e7be0d
6522 files changed
+3530643

No files matched your search

+718
View File
@@ -0,0 +1,718 @@
<template>
<view class="home">
<view class="topBar">
<view class="topBar-text">首页</view>
<view class="msg" @click="msgClick">
<image class="msg-img" src="../../../static/home/msg.png"/>
<text class="msg-text">{{count}}</text>
</view>
</view>
<!-- <view class="home-swiper" style="margin-top: 199.27rpx;">
<swiper :style="{'height':bannerHeight+'px'}" class="swiper" :autoplay="true" :indicator-dots="true" :interval="2000" :duration="500" circular="true"
previous-margin="24px" next-margin="24px" indicator-active-color="#FFFFFF" indicator-color="#BFBFBF"
@change="bannerChange">
<swiper-item v-if="listBanner.length>0" :class="[currentBanner==index?'swiper-item':'swiper-item-banner']"
v-for="(item,index) in listBanner" :key='index'>
<image :src="'data:image/jpeg;base64,'+item.FIMAGEBASE64"
:style="{'height':(currentBanner==index?bannerHeight+'px':bannerHeight*0.8+'px')}"
:class="[currentBanner==index?'swiper-item-image':'swiper-item-banner-image']" />
</swiper-item>
<swiper-item v-if="listBanner.length==0" :class="[currentBanner==index?'swiper-item':'swiper-item-banner']"
v-for="(item,index) in listBannerBlank" :key='index'>
<image :src="item.url" :style="{'height':(currentBanner==index?bannerHeight+'px':bannerHeight*0.8+'px')}"
:class="[currentBanner==index?'swiper-item-image':'swiper-item-banner-image']" />
</swiper-item>
</swiper>
</view> -->
<view class="home-news-title" style="margin-top: 199.27rpx;">
<text class="news-info">新闻资讯</text>
<text class="news-more">更多</text>
</view>
<view class="home-news">
<view class="home-news-detail">
<scroll-view scroll-x="true" show-scrollbar="false">
<view class="home-news-detail-outline">
<view class="home-news-detail-item" v-if="listNews.length>0"
v-for="(item,index) in listNews" :key='index'>
<image class="home-news-detail-item-img" :src="'data:image/jpeg;base64,'+item.FImage"
:style="{'height':newsHeight+'px','width':newsWidth+'px'}"/>
<view class="home-news-detail-item-text" :style="{'width':newsWidth-2+'px'}">
<text class="home-news-detail-item-text-title">{{item.FName}}</text>
<text class="home-news-detail-item-text-time">{{item.C_YMD}}</text>
</view>
</view>
<view class="home-news-detail-item" v-if="listNews.length==0"
v-for="(item,index) in listNewsBlank" :key='index'>
<image class="home-news-detail-item-img" src="../../../static/home/news1.png"
:style="{'height':newsHeight+'px','width':newsWidth+'px'}"/>
<view class="home-news-detail-item-text" :style="{'width':newsWidth-2+'px'}">
<text class="home-news-detail-item-text-title">{{item.FName}}</text>
<text class="home-news-detail-item-text-time">{{item.C_YMD}}</text>
</view>
</view>
</view>
</scroll-view>
</view>
</view>
<view class="home-apply">
<view class="home-news-title">
<text class="news-info">常用应用</text>
</view>
<view class="home-apply-item">
<uni-grid :column="4" :show-border="false" :square="false">
<uni-grid-item v-for="(subitem ,subindex) in comList" :key="subindex">
<view class="grid-item-box" @click="NavigateApplyKanban(subitem)" v-if="subitem.PrgType== 4">
<image class="image" src="../../../static/icon/unchecked.png" />
<text class="text">{{subitem.NAME}}</text>
</view>
<view class="grid-item-box" @click="NavigateApply(subitem.KEY)" v-else>
<image class="image" :src="require('../../../static/icon/'+subitem.KEY+'.png')" />
<text class="text">{{subitem.NAME}}</text>
</view>
</uni-grid-item>
<uni-grid-item>
<view class="grid-item-box" @click="PageNavigate">
<image class="image" src="../../../static/com/more.png" />
<text class="text">应用设置</text>
</view>
</uni-grid-item>
</uni-grid>
</view>
</view>
<view class="tabBar">
<view class="tabBar-item" @click="mainSelectF">
<view v-show="mainSelect" class="tabBar-item-view">
<image class="tabBar-item-img" src="../../../static/tabbar/home.png"></image>
<text class="tabBar-item-text" style="color:#007AFF">首页</text>
</view>
<view v-show="!mainSelect" class="tabBar-item-view">
<image class="tabBar-item-img" src="../../../static/tabbar/home.png"></image>
<text class="tabBar-item-text" style="color: #666666;">首页</text>
</view>
</view>
<view class="tabBar-item" @click="applySelectF">
<view v-show="applySelect" class="tabBar-item-view">
<image class="tabBar-item-img" src="../../../static/tabbar/apply.png"></image>
<text class="tabBar-item-text" style="color:#007AFF">应用</text>
</view>
<view v-show="!applySelect" class="tabBar-item-view">
<image class="tabBar-item-img" src="../../../static/tabbar/apply.png"></image>
<text class="tabBar-item-text" style="color: #666666;">应用</text>
</view>
</view>
<!-- <view class="tabBar-item" @click="cleandarSelectF">
<view v-show="cleandarSelect" class="tabBar-item-view">
<image class="tabBar-item-img" src="../../../static/tabbar/cleandar.png"></image>
<text class="tabBar-item-text" style="color:#007AFF">日程</text>
</view>
<view v-show="!cleandarSelect" class="tabBar-item-view">
<image class="tabBar-item-img" src="../../../static/tabbar/cleandar.png"></image>
<text class="tabBar-item-text" style="color: #666666;">日程</text>
</view>
</view> -->
<view class="tabBar-item" @click="mySelectF">
<view v-show="mySelect" class="tabBar-item-view">
<image class="tabBar-item-img" src="../../../static/tabbar/my.png"></image>
<text class="tabBar-item-text" style="color:#007AFF">我的</text>
</view>
<view v-show="!mySelect" class="tabBar-item-view">
<image class="tabBar-item-img" src="../../../static/tabbar/my.png"></image>
<text class="tabBar-item-text" style="color: #666666;">我的</text>
</view>
</view>
</view>
<!-- 系统升级 -->
<yomol-upgrade ref="yomolUpgrade"></yomol-upgrade>
</view>
</template>
<script>
import uniBadge from "@/components/uni-badge/uni-badge.vue"
import faIcon from "@/components/fa-icon/fa-icon.vue";
import navigationTitle from '@/components/navigation-title/navigation-title.vue';
import uniGrid from '@/components/uni-grid/uni-grid.vue';
import uniGridItem from '@/components/uni-grid-item/uni-grid-item.vue';
import yomolUpgrade from '@/components/yomol-upgrade/yomol-upgrade.vue';
import Vue from 'vue';
import { mapState } from 'vuex';
export default {
components: {
faIcon,
navigationTitle,
yomolUpgrade,
uniBadge
},
data() {
return {
infoList:[],
count:0,
orgid:"",
windowWidth:"",
windowHeight:"",
bannerHeight:"",
bannerWidth:"",
newsHeight:"",
newsWidth:"",
currentBanner:'',
mainSelect:true,
applySelect:false,
cleandarSelect:false,
mySelect:false,
listBanner: [],
listBannerBlank:[
{"url":'../../../static/home/banner1.png'},
{"url":'../../../static/home/banner2.png'},
{"url":'../../../static/home/banner3.png'},
],
listNews: [],
listNewsBlank:[
{"FImage":'../../../static/home/news1.png',"FName":"电子公司引入WMS解决仓储","C_YMD":"2021-1-11 18:00:00"},
{"FImage":'../../../static/home/news2.png',"FName":"电子公司引入WMS解决仓储","C_YMD":"2021-1-11 18:00:00"},
{"FImage":'../../../static/home/news3.png',"FName":"电子公司引入WMS解决仓储","C_YMD":"2021-1-11 18:00:00"},
],
list:[],
pageIndex: 0,
loadingText: '下拉加载',
comList: [],
}
},
beforeMount() {
if(this.userInfo.UserID) {
this.checkVersion();
}
},
computed: {
...mapState(['hasLogin', 'userInfo'])
},
onShow() {
this.getFavoritesMenu();
this.getInfoNumber();
this.getBannerInfo();
console.log("++++++++++++++++++++++++++++"+this.listNewsBlank[0].FImage)
},
onLoad() {
// debugger
const res = uni.getSystemInfoSync();
this.windowHeight = res.windowHeight;
this.windowWidth = res.windowWidth;
let sWindow = this.windowHeight*this.windowWidth;
let sBaseBanner = 366*200;
let sBaseWindow = 414*896;
let basePrecent = sBaseBanner/sBaseWindow;
let baseWHprecent = 366/200;233
let sWindowBanner = sWindow*basePrecent;
this.bannerHeight = Math.sqrt((sWindowBanner/baseWHprecent));
this.bannerWidth = this.bannerHeight*baseWHprecent;
let sBaseNews = 140*90;
let basePrecentNews = sBaseNews/sBaseWindow;
let baseWHprecentNews = 140/90;
let sWindowNews = sWindow*basePrecentNews;
this.newsHeight = Math.sqrt((sWindowNews/baseWHprecentNews));
this.newsWidth = this.newsHeight*baseWHprecentNews;
this.getAllMenu();
this.getFavoritesMenu();
this.GetOrgInfo();
},
methods: {
getNews(){
let _self = this;
this.orgid = uni.getStorageSync('orgid');
let requestParams = {
"id": this.userInfo.token,
"basicType":1,
"uid":1,
"pageSize":'',
"pageIndex":''
};
this.$request.post(
{
data: {
action: 'Notice',
params: requestParams
}
}
).then(res => {
let datalist = JSON.parse(res);
_self.listNews = datalist;
});
},
getInfoNumber(){
let _self = this;
let loginId = uni.getStorageSync('loginId');
let requestParams;
this.$request.get('ReportInfoLoad/GetReportMessage',{
params:{
loginId:loginId,
page:1,
size:20
}
}).then(res => {
this.count = res.toltalCount;
});
},
getBannerInfo(){
let _self = this;
this.$request.get('/SysConfigData/CarouselMap').then(res => {
let datalist = res;
_self.listBanner = datalist;
});
},
msgClick(){
uni.navigateTo({
url:'./msg'
})
},
bannerChange(event) {
let current = event.detail.current
this.currentBanner = current
},
NavigateApplyKanban(subitem) {
let page=subitem.KEY;
if (page) {
let tempurl='../../views/KanBan/KanBan'+'?pageNumber='+page;
uni.navigateTo({
url: tempurl
})
}
},
NavigateApply(page) {
if(page=='SingleResRpt'){
uni.navigateTo({
url: '../SingleResRpt/SingleResRpt'
})
}else{
uni.navigateTo({
url: '../../views/' + page + '/' + page
})
}
console.log('../../views/' + page + '/' + page)
},
PageNavigate: function() {
uni.navigateTo({
url: '../apply/applymanage'
})
},
mainSelectF(){
this.mainSelect = true;
this.applySelect = false;
this.cleandarSelect = false;
this.mySelect = false;
},
applySelectF(){
this.mainSelect = false;
this.applySelect = true;
this.cleandarSelect = false;
this.mySelect = false;
uni.redirectTo({
url:'../apply/apply'
})
},
// cleandarSelectF(){
// this.mainSelect = false;
// this.applySelect = false;
// this.cleandarSelect = true;
// this.mySelect = false;
// uni.redirectTo({
// url:'../calendar/calender'
// })
// },
mySelectF(){
this.mainSelect = false;
this.applySelect = false;
this.cleandarSelect = false;
this.mySelect = true;
uni.redirectTo({
url:'../myinfo/myinfo'
})
},
loadMore: function() {
if (this.loadingText == "没有更多了") {
return
}
//currentTab表示当前所在页数 根据当前所在页数发起请求并带上page页数
this.loadingText=='加载中...'
uni.showLoading({
content: '加载中',
mask: true
})
this.GetPublicInfo()
setTimeout(function() {
uni.hideLoading();
}, 500)
},
//新闻详情
goDetail(item, index) {
console.log(item)
let data=item
uni.navigateTo({
url: `/pages/home/detail/detail?data=${JSON.stringify(data)}`
})
},
GetPublicInfo() {
this.pageIndex++;
let requestParams = {
"id": this.userInfo.token,
};
this.$request.post(
{
data: {
action: 'GetPublicMessage',
params: requestParams,
data: {
page: this.pageIndex
}
}
}
).then(res => {
let _self = this;
let data = JSON.parse(res)
if (data.length == 0) {
this.loadingText = "没有更多了"
return
}
for (let item of data) {
var obj = {};
obj.interId=item.FInterID
obj.datetime = item.FDateTime;
obj.title = item.FTitle
obj.article_type = 0;
// obj.source = _self.userInfo.OrgStructures.FName.substr(0, 4)
obj.comment_count = 0
obj.content=item.FInfo
_self.list.push(obj)
}
});
},
//系统升级
checkVersion() {
let verCode = 62300;
// #ifdef APP-PLUS
plus.runtime.getProperty(plus.runtime.appid,(wgtinfo)=>{
verCode = wgtinfo.versionCode;
});
// #endif
let appType = uni.getStorageSync("appType");
let requestParams = {
"id": this.$store.state.userInfo.token,
"appType":appType
};
this.$request.post(
{
data: {
action: 'GetLastestAppInfo',
params: requestParams
}
}
).then(res => {
console.log("GetLastestAppInfo------------");
let data = JSON.parse(res);
let urlVerCode = parseInt(data.FVersionCode);
console.log('当前APP版本'+verCode);
console.log('服务器APP版本'+urlVerCode);
console.log('APP更新地址'+data.FVersionDownloadUrl);
if(urlVerCode > verCode ){
this.$refs.yomolUpgrade.show(data);
}
});
},
getAllMenu(){
// debugger
this.$request.post('/Service/GetAllMenu')
.then(res => {
let data = res.MainMenu;
if(data&&data.length>0){
data = data.filter(e => {
return e.NAME == "生产汇报" || e.NAME == "生产检验" || e.NAME=='安灯预警' ||e.NAME=='预警平台'
});
}
uni.setStorageSync('AllMenu',data);
})
.catch(err => {
console.log(err);
});
},
getFavoritesMenu(){
this.$request.post('/Service/GetFavoritesMenu')
.then(res => {
let datas = res;
datas.forEach((item, index) => {
let subdata = item.SubMenus
subdata.forEach((item, index) => {
if (item.NAME.length > 6) {
item.NAME = item.NAME.substr(0, 6)
}
})
})
this.comList = datas;
uni.setStorageSync('ComMenu',this.comList);
})
.catch(err => {
console.log(err);
});
},
GetOrgInfo:function(){
uni.showLoading({
mask: true
});
this.$request.get('/Service/GetSysOrgForUser').then(res => {
uni.hideLoading()
let orgInfo = res
uni.setStorageSync('orgInfo',orgInfo)
}).catch(err => {
uni.hideLoading()
errorUtil.handle(err)
});
},
}
}
</script>
<style>
.home {
height: 100%;
width: 100%;
overflow-x: hidden;
}
.topBar{
/* position: absolute; */
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
height: 181.15rpx;
line-height: 181.15rpx;
width: 100%;
background: #2560C9;
font-size: 32.6rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #FFFFFF;
text-align: center;
position: fixed;
z-index: 999;
}
.topBar-text{
width: 100%;
height: 181.15rpx;
line-height: 181.15rpx;
font-size: 32.6rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #FFFFFF;
margin-left: 43.47rpx;
text-align: center;
}
.msg{
position: relative;
display: flex;
margin-right: 43.47rpx;
}
.msg-img{
height: 36.23rpx;
width: 36.23rpx;
}
.msg-text{
height: 13px;
line-height: 12px;
width: 13px;
background: #FF5353;
text-align: center;
color: #FFFFFF;
border-radius: 100px;
font-size: 12px;
position: absolute;
left: 21.73rpx;
top: -7.24rpx;
}
.home-swiper view {
height: 100%;
}
.swiper-item{
display: flex;
align-items: center;
}
.swiper-item-image {
border-radius: 10upx;
height: 100%;
width: 100%;
}
.swiper-item-banner{
display: flex;
align-items: center;
}
.swiper-item-banner-image{
border-radius: 10upx;
height: 80%;
width: 100%;
}
.home-news{width: 100%;margin-top: 36.23rpx;/* border: #000000 solid 1.81rpx; */}
.home-news-title{
width: 100%;
height: 45.28rpx;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
margin-top: 36.23rpx;
}
.news-info{
height: 45.28rpx;
line-height: 45.28rpx;
width: 100%;
font-size: 32.6rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #000000;
margin-left: 43.47rpx;
}
.news-more{
height: 45.28rpx;
line-height: 45.28rpx;
width: 72.46rpx;
font-size: 25.36rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #4688FD;
margin-right: 43.47rpx;
}
.home-news-detail{
margin-left: 43.47rpx;margin-top: 28.98rpx;margin-right: 43.47rpx;
}
.home-news-detail-outline{
display: flex;flex-direction: row;
}
.home-news-detail-item{
display: flex;flex-direction: column;margin-right: 43.47rpx;
}
.home-news-detail-item-img{
border-radius: 9.05rpx 9.05rpx 0 0;
}
.home-news-detail-item-text{
display: flex;flex-direction: column;border-radius: 0 0 9.05rpx 9.05rpx;
/* border: #333333 solid 1.81rpx; */
background: #FFFFFF;
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
border-left: 1px solid rgba(0, 0, 0, 0.1);
border-right: 1px solid rgba(0, 0, 0, 0.1);
}
.home-news-detail-item-text-title{
font-size: 21.73rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
overflow: hidden;
text-overflow: ellipsis;
/* white-space: nowrap; */
word-break: break-all;
width: 90%;
margin-left: 5%;
margin-right: 5%;
margin-top: 21.73rpx;
}
.home-news-detail-item-text-time{
font-size: 18.11rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #787878;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-break: break-all;
width: 90%;
margin-left: 5%;
margin-right: 5%;
}
.home-apply{width: 100%;margin-top: 36.23rpx;/* border: #000000 solid 1.81rpx; */margin-bottom: 126.81rpx;}
.home-apply-item{
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
padding: 0;
font-size: 14px;
background-color: #ffffff;
}
.grid-item-box {
flex: 1;
/* position: relative;
*/
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
align-items: center;
justify-content: center;
padding: 15px 0;
}
.image{
height: 79.71rpx;
width: 79.71rpx;
}
.text {
padding: 10upx 0;
}
.tabBar{
display: flex;
position: fixed;
flex-direction: row;
left: 0;
right: 0;
bottom: 0;
height: 119.56rpx;
background: rgba(255, 255, 255, 1);
box-shadow:2px 2px 10px rgba(0, 0, 0, 1);
}
.tabBar-item{
display: flex;
flex-direction: column;
flex-shrink: 1;
flex-grow: 1;
align-items: center ;
width: 100%;
}
.tabBar-item-view{
display: flex;
flex-direction: column;
flex-shrink: 1;
flex-grow: 1;
align-items: center ;
}
.tabBar-item-img{
height: 54.34rpx;
width: 54.34rpx;
margin-top: 16.3rpx;
}
.tabBar-item-text{
text-align: center;
height: 28.98rpx;
font-size: 28.98rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #515151;
line-height: 28.98rpx;
margin-left:0
}
</style>
+251
View File
@@ -0,0 +1,251 @@
<template>
<view class="page">
<view class="msg" v-for="(item,index) in list" :key='index' @click="Detail(item)" v-if="!list.length == 0">
<view class="my-body">
<view style="height: 180rpx;width: 180rpx;">
<image class="dot" :src="'data:image/jpeg;base64,'+item.FImage"/>
</view>
<view style="display: flex;flex-direction: column;align-items: flex-start;justify-content: center;height: 200rpx;">
<text class='dot-text-notread'>{{item.FName}}</text>
<text class="dot-text-notread">日期:{{item.C_YMD.split(" ")[0]}}</text>
</view>
</view>
</view>
<view class="msg" v-for="(item,index) in listNewsBlank" :key='index' @click="Detail(item)" v-if="list.length == 0">
<view class="my-body">
<view style="height: 180rpx;width: 180rpx;">
<image style="height: 180rpx;width: 180rpx;" :src="item.FImageBase64"/>
</view>
<view style="display: flex;flex-direction: column;align-items: flex-start;justify-content: center;height: 200rpx;">
<text class='dot-text-notread'>{{item.FName}}</text>
<text class="dot-text-notread">日期:{{item.C_YMD.split(" ")[0]}}</text>
</view>
</view>
</view>
</view>
</template>
<script>
import {
mapState
} from 'vuex';
import errorUtil from '@/common/errorutil.js';
export default {
data() {
return {
orgid:'',
list:[],
pageIndex:1,
pageSize:6,
showTips:false,
listNewsBlank:[
{"FImageBase64":'../../../static/home/news1.png',"FName":"电子公司引入WMS解决仓储","C_YMD":"2021-1-11 18:00:00"},
{"FImageBase64":'../../../static/home/news2.png',"FName":"电子公司引入WMS解决仓储","C_YMD":"2021-1-11 18:00:00"},
{"FImageBase64":'../../../static/home/news3.png',"FName":"电子公司引入WMS解决仓储","C_YMD":"2021-1-11 18:00:00"},
],
}
},
computed: {
...mapState(['hasLogin', 'userInfo'])
},
onLoad() {
this.pageIndex = 1;
let count = 1;
this.getNews(1, this.pageSize,count);
},
onShow() {
this.list = uni.getStorageSync('infoList')
},
onPullDownRefresh:function(){
this.showTips = false;
this.getInfo(1, this.pageSize);
setTimeout(()=>{
//停止下拉样式
uni.stopPullDownRefresh();
//隐藏标题读取
uni.hideNavigationBarLoading();
},
500);
},
onReachBottom:function(){
if(!this.showTips) {
this.getInfo(this.pageIndex, this.pageSize);
}
else {
uni.showToast({
icon: 'none',
title: '已经到底了'
});
}
},
methods: {
getNews(count){
let _self = this;
this.orgid = uni.getStorageSync('orgid');
if(count) {
count = count + 1;
if(count>4){
return;
}
}
else {
count = 1;
}
let requestParams;
let tokenpara = uni.getStorageSync('tokenpara');
if(count > 1) {
requestParams = {
"id": this.userInfo.token,
"basicType":2,
"uid":0,
"pageSize":1,
"pageIndex":6,
"tokenpara": tokenpara
};
}
else {
requestParams = {
"id": this.userInfo.token,
"basicType":2,
"uid":0,
"pageSize":1,
"pageIndex":6,
};
}
this.$request.post({
data: {
action: 'Notice',
params: requestParams
}
}).then(res => {
let datalist = JSON.parse(res);
_self.list = datalist;
}).catch(err => {
if(err.state ==400){
this.getNews(count);
if(count > 4) {
errorUtil.handle(err);
return;
}
}else{
errorUtil.handle(err);
}
});
},
Detail:function(item){
uni.setStorageSync('newsDetail',item);
uni.navigateTo({
url:'./newsDetail'
})
}
}
}
</script>
<style>
page{
background-color: #F2F2F2;
}
.msg{
display: flex;
flex-direction: column;
margin-left: 43.47rpx;
margin-right: 43.47rpx;
margin-top: 43.47rpx;
background: #FFFFFF;
border-radius: 9.05rpx;
height: 200rpx;
}
.my-body{
display: flex;
flex-direction: row;
margin-top: 10rpx;
background: #FFFFFF;
border-radius: 9.05rpx;
font-size: 16px;
justify-items: center;
align-items: center;
justify-content: center;
}
.dot{
height: 180rpx;
width: 180rpx;
background: #E24848;
/* border-radius: 50%; */
margin-right: 5rpx;
}
.dot-text-read{
margin-right: 10rpx;
color: #232323;
flex-grow: 0;
flex-shrink: 0;
}
.dot-text-notread{
margin-right: 10rpx;
color: #4688FD;
flex-grow: 0;
flex-shrink: 0;
}
.end{
height: 32.6rpx;
width: 32.6rpx;
margin-right: 21.73rpx;
}
.my-body view{
margin-left: 21.73rpx;
width: 100%;
display: flex;
align-items: center;
font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #4688FD;
}
.detail{
margin-left: 21.73rpx;
/* width: 100%; */
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #585858;
margin-top: 14.49rpx;
}
.sender{
margin-left: 21.73rpx;
width: 100%;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #585858;
}
.time{
margin-left: 21.73rpx;
width: 100%;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #838383;
margin-top: 14.49rpx;
margin-bottom: 21.73rpx;
}
.list-title{
font-weight: bold;
font-size: 16px;
margin-right: 5%;
/* 文字不换行 */
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap; //文本不换行,这样超出一行的部分被截取,显示...
}
</style>
+254
View File
@@ -0,0 +1,254 @@
<template>
<view class="page" style="display: flex;flex-direction: column;">
<view class="msg" v-for="(item,index) in list" :key='index' @click="Detail(index)">
<view class="my-body">
<view>
<!-- <image v-if="item.FISREAD!='True'" class="dot" src="../../../static/home/dot.png"/> -->
<text :class="[(item.FISREAD=='True')?'dot-text-read':'dot-text-notread']">{{item.FTitle}}</text>
</view>
<!-- <text v-if="item.FISREAD=='True'" class="dot-text-read">已读</text> -->
<!-- <text v-else class="dot-text-notread">未读</text> -->
</view>
<view class="detail">{{item.FContent}}</view>
<!-- <view class="sender">{{item.FFROMUSER}}</view> -->
<!-- <view class="time">{{item.FDATETIME}}</view> -->
</view>
</view>
</template>
<script>
import {
mapState
} from 'vuex';
import errorUtil from '@/common/errorutil.js';
export default {
data() {
return {
orgid:'',
list:[],
pageIndex:1,
pageSize:20,
showTips:false,
}
},
computed: {
...mapState(['hasLogin', 'userInfo'])
},
onLoad() {
this.getInfo(1, this.pageSize);
this.pageIndex = 1;
},
onShow() {
this.list = uni.getStorageSync('infoList')
},
onPullDownRefresh:function(){
this.showTips = false;
this.getInfo(1, this.pageSize);
setTimeout(()=>{
//停止下拉样式
uni.stopPullDownRefresh();
//隐藏标题读取
uni.hideNavigationBarLoading();
},
500);
},
onReachBottom:function(){
if(!this.showTips) {
this.getInfo(this.pageIndex, this.pageSize);
}
else {
uni.showToast({
icon: 'none',
title: '已经到底了'
});
}
},
methods: {
getInfo(index,size){
let _self = this;
let loginId = uni.getStorageSync('loginId')
this.pageIndex = index;
let requestParams;
this.$request.get('ReportInfoLoad/GetReportMessage',{
params:{
loginId:loginId,
page:this.pageIndex,
size:size
}
}).then(res => {
let datalist = res.reportMessage;
if(this.pageIndex == 1) {
this.list = datalist;
this.pageIndex = this.pageIndex+1;
}else {
if(datalist.length != 0) {
let newArray = this.list.concat(datalist);
this.list = newArray;
this.pageIndex = this.pageIndex+1;
if(datalist.length < 6) {
_self.showTips = true;
}
} else {
_self.showTips = true;
}
}
}).catch(err => {
errorUtil.handle(err);
});
},
Detail:function(data){
let _self = this;
let Data = new Date();
let curDate = Data.getFullYear()+"-"+(Data.getMonth()+1)+"-"+Data.getDate()
+" "+Data.getHours()+":"+Data.getMinutes()+":"+Data.getSeconds();
let curIndex = data;
if(this.list[curIndex].FISREAD){
return;
}else{
let readList = "";
this.list.forEach(
function(el,index){
if(curIndex == index){
el.FISREAD = true;
readList = el.FINTERID;
}
}
);
let requestParams;
this.$request.get('/SysMessage/UpdateMessageStatus',{
params:{
fInterid:readList
}
}).then(res => {
let datalist = res;
}).catch(err => {
errorUtil.handle(err);
});
}
}
}
}
</script>
<style>
page{
background-color: #F2F2F2;
}
view{
display: flex;
}
.msg{
display: flex;
flex-direction: column;
margin-left: 43.47rpx;
margin-right: 43.47rpx;
margin-top: 43.47rpx;
background: #FFFFFF;
border-radius: 9.05rpx;
}
.my-body{
display: flex;
flex-direction: row;
align-items: center;
justify-content: start;
height: 39.85rpx;
line-height: 39.85rpx;
margin-top: 21.73rpx;
/* margin-bottom: 14.49rpx; */
background: #FFFFFF;
border-radius: 9.05rpx;
font-size: 16px;
}
.dot{
height: 10.86rpx;
width: 10.86rpx;
background: #E24848;
border-radius: 50%;
margin-right: 5rpx;
}
.dot-text-read{
margin-right: 21.73rpx;
color: #232323;
flex-grow: 0;
flex-shrink: 0;
max-width: 70%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-break: break-all;
}
.dot-text-notread{
margin-right: 21.73rpx;
color: #4688FD;
flex-grow: 0;
flex-shrink: 0;
max-width: 70%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-break: break-all;
}
.end{
height: 32.6rpx;
width: 32.6rpx;
margin-right: 21.73rpx;
}
.my-body view{
margin-left: 21.73rpx;
width: 100%;
display: flex;
align-items: center;
font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #4688FD;
}
.detail{
padding: 0 21.73rpx;
margin-top: 14.49rpx;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #585858;
}
.sender{
margin-left: 21.73rpx;
margin-top: 14.49rpx;
width: 100%;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #585858;
}
.time{
margin-left: 21.73rpx;
width: 100%;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #838383;
margin-top: 14.49rpx;
margin-bottom: 21.73rpx;
}
.list-title{
font-weight: bold;
font-size: 16px;
margin-right: 5%;
/* 文字不换行 */
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap; //文本不换行,这样超出一行的部分被截取,显示...
}
</style>
+87
View File
@@ -0,0 +1,87 @@
<template>
<view class="page">
<view class="title">{{FName}}</view>
<view class="sub-title">
<!-- <text class="editer">撰稿人:OPSOFT</text> -->
<text class="date">发稿日期:{{C_YMD.split(" ")[0]}}</text>
</view>
<view class="img">
<image class="img" :src="'data:image/jpeg;base64,'+FImageBase64"></image>
</view>
<view class="content">{{FContent}}</view>
</view>
</template>
<script>
import {
mapState
} from 'vuex';
import errorUtil from '@/common/errorutil.js';
export default {
data() {
return {
detailInfo:[],
FName:'',
C_YMD:'',
FContent:'',
FImageBase64:''
}
},
computed: {
...mapState(['hasLogin', 'userInfo'])
},
onLoad() {
this.detailInfo = uni.getStorageSync('newsDetail');
this.FName = this.detailInfo.FName;
this.C_YMD = this.detailInfo.C_YMD;
this.FContent = this.detailInfo.FContent;
this.FImageBase64 = this.detailInfo.FImageBase64;
},
methods: {
}
}
</script>
<style>
.page{
overflow-x: hidden;
}
.title{
height: 100rpx;
line-height: 100rpx;
width: 100%;
font-size: 32rpx;
font-weight: bold;
color: #000000;
text-align: center;
}
.sub-title{
height: 60rpx;
line-height: 60rpx;
width: 100%;
font-size: 28rpx;
color: #323232;
text-align: center;
}
.img{
height: 200rpx;
width: 200rpx;
/* border: 1px solid #007AFF; */
border-radius: 10rpx;
margin: auto;
}
.content{
width: 90%;
/* height: 300rpx; */
margin: auto;
font-size: 28rpx;
color: #323232;
/* border: #000000 1px solid; */
padding: 20rpx 20rpx;
white-space:pre-wrap;
word-wrap:break-word;
}
</style>