Browse Source

2023-8-18

master
guoxing 2 years ago
parent
commit
965bbc371f
  1. 6
      supervise-uniapp/App.vue
  2. 4
      supervise-uniapp/common/config.js
  3. 22
      supervise-uniapp/common/request.api.js
  4. 10
      supervise-uniapp/common/wxSilentLogin.js
  5. 2
      supervise-uniapp/components/SendCodeItem/SendCodeItem.vue
  6. 74
      supervise-uniapp/pages.json
  7. 289
      supervise-uniapp/pages/home/MessageFragment.vue
  8. 70
      supervise-uniapp/pages/home/UserFragment.vue
  9. 61
      supervise-uniapp/pages/home/WorkFragment.vue
  10. 167
      supervise-uniapp/pages/index/ChangePassword.vue
  11. 35
      supervise-uniapp/pages/index/NotPermission.vue
  12. 353
      supervise-uniapp/pages/index/NotReadWork.vue
  13. 356
      supervise-uniapp/pages/index/ReadWork.vue
  14. 63
      supervise-uniapp/pages/index/RegulatoryReporting.vue
  15. 56
      supervise-uniapp/pages/index/SetUp.vue
  16. 114
      supervise-uniapp/pages/index/SetUp2.vue
  17. 15
      supervise-uniapp/pages/index/WarehouseDetaile.vue
  18. 6
      supervise-uniapp/pages/login/login.vue
  19. BIN
      supervise-uniapp/static/baseIcon/NotPermission.png
  20. 13
      supervise-uniapp/utils/requester.js

6
supervise-uniapp/App.vue

@ -3,12 +3,16 @@
export default {
globalData: {
// wxSilentLoginURL: "https://supervise.yxtsoft.com/portal/v1/wxuser/wxSilentLogin",
wxSilentLoginURL: "https://supervise.yxtsoft.com/api/portal/v1/wxuser/wxSilentLogin",
wxSilentLoginURL: "http://192.168.1.110:8112/portal/v1/wxuser/wxSilentLogin",
wxAuthLoginURL: "https://supervise.yxtsoft.com/api/portal//v1/wxuser/wxAuthLogin",
SilentLoginURL: "https://supervise.yxtsoft.com/api/portal/v1/wxuser/SilentLogin",//
token: "",
isLogin: false,
sid: "",
headImage: "",
username: "",
orgNamePath: "",
organizationSid: "",
}, //
onLaunch: function() {

4
supervise-uniapp/common/config.js

@ -7,9 +7,9 @@
*/
module.exports = {
// baseUrl: 'https://jianguan.yyundong.com/api',
baseUrl: 'https://supervise.yxtsoft.com',
// baseUrl: 'https://supervise.yxtsoft.com',
// baseUrl: 'http://192.168.1.193:8112',
// baseUrl: 'http://192.168.1.116:8112',
baseUrl: 'http://192.168.1.110:8112',
tokenName: "Authorization", // 请求头中token的名字,与服务器端对应
loginTimeoutCode: "5001", // 登录超时或失效的情况下,服务器端返回的错误码
loginTimeoutPage: "/pages/login/index", // 登录超时或失效的情况下,跳转到的登录页面

22
supervise-uniapp/common/request.api.js

@ -59,9 +59,9 @@ export default {
// "/report/reportstock/getDayProduct/" + params, params),
// 监管数据总览
getProjectDaily: (params = {}) => request.get(
"/reportwxmpapi/projectdaily/getProjectDaily/" + params.projectSid + "/" + params.orderDate, params),
// "/report/projectdaily/getProjectDaily/" + params.projectSid + "/" + params.orderDate, params),
getProjectDaily: (params = {}) => request.post(
"/reportwxmpapi/projectdaily/getProjectDaily", params),
// "/report/projectdaily/getProjectDaily", params),
// 项目监管报表
getProjectDailyFiles: (params = {}) => request.get(
@ -72,7 +72,7 @@ export default {
// 获取首页面数据
getWorkData: (params = {}) => request.get("/api/portal/v1/flow/task/" + params, params),
getWorkData: (params = {}) => request.get("/report/messagepushlog/numberOfJobs/" + params, params),
// 获取云仓列表
storeHouseListPage: (params = {}) => request.post("/api/portal/v1/flow/storeHouseListPage", params),
@ -96,4 +96,18 @@ export default {
// 获取数据总览列表
projectListPage: (params = {}) => request.post("/reportwxmpapi/projectdaily/selectListPage", params),
// 获取消息总览
messageListPage: (params = {}) => request.post("/reportwxmpapi/messagepushlog/listPage", params),
// 修改密码
updatePassword: (params = {}) => request.post("/portal/v1/sysuser/updatePassword", params),
// 修改头像
uploadHandImage: (params = {}) => request.post("/portal/v1/sysuser/uploadImage", params),
}

10
supervise-uniapp/common/wxSilentLogin.js

@ -75,12 +75,18 @@ const wxSilentLogin = () => {
getApp().globalData.username = res.data.data
.userName
.name
getApp().globalData.token = res.data.data.token
getApp().globalData.sid = res.data.data.sid
getApp().globalData.mobile = res.data.data
.mobile
getApp().globalData.isLogin = true
getApp().globalData.isAdmin = res.data.data.isAdmin
getApp().globalData.orgNamePath = res.data.data.orgNamePath
getApp().globalData.organizationSid = res.data.data.organizationSid
getApp().globalData.headImage = res.data.data.headImage
getApp().globalData.isLogin = true
uni.setStorageSync("Global-Auth-Token", res.data
.data.token)

2
supervise-uniapp/components/SendCodeItem/SendCodeItem.vue

@ -129,7 +129,7 @@
}
}
},
props: ['phoneNum', 'url', 'data', 'sendByCookie'],
props: ['phoneNum',"type", 'url', 'data', 'sendByCookie'],
}
</script>

74
supervise-uniapp/pages.json

@ -12,6 +12,7 @@
//pageshttps://uniapp.dcloud.io/collocation/pages
// #ifdef APP-PLUS
{
@ -32,7 +33,20 @@
}
},
{
"path": "pages/index/RegulatoryReporting",
"style": {
"navigationBarTitleText": "监管数据总览"
}
},
{
"path": "pages/index/NotPermission",
"style": {
"navigationBarTitleText": "温馨提示",
"enablePullDownRefresh": false
}
},
{
"path": "pages/index/BindPhone",
"style": {
@ -44,7 +58,7 @@
}
},
{
"path": "pages/index/BindPhone2",
"style": {
@ -97,13 +111,6 @@
{
"path": "pages/index/RegulatoryReporting",
"style": {
"navigationBarTitleText": "监管数据总览"
}
},
{
"path": "pages/index/AlreadyProcessed",
"style": {
@ -221,7 +228,8 @@
{
"path": "pages/home/MessageFragment",
"style": {
"navigationBarTitleText": "消息"
"navigationBarTitleText": "消息",
"enablePullDownRefresh": true
}
}, {
"path": "pages/index/WarehouseList",
@ -247,7 +255,53 @@
}
}
],
,{
"path" : "pages/index/NotReadWork",
"style" :
{
"navigationBarTitleText": "待阅工作",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/index/ReadWork",
"style" :
{
"navigationBarTitleText": "已阅工作",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/index/SetUp",
"style" :
{
"navigationBarTitleText": "设置",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/index/SetUp2",
"style" :
{
"navigationBarTitleText": "个人信息",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/index/ChangePassword",
"style" :
{
"navigationBarTitleText": "修改密码",
"enablePullDownRefresh": false
}
}
],
"lazyCodeLoading": "requiredComponents",
"globalStyle": {
"pageOrientation": "portrait",

289
supervise-uniapp/pages/home/MessageFragment.vue

@ -1,6 +1,35 @@
<template>
<view class="content">
<view class="pages">
<view>
<view v-for="(item,index) in dataList" class="newslist" @click="itemClick(item)">
<view class="item-top">
<view class="drop" v-show="item.ostate=='0'"></view>
<view class="item-top-text">{{item.messageName}}</view>
<image class="item-top-img" src="../../static/baseIcon/zy.png" mode="aspectFill"></image>
</view>
<view class="item-con">
<view>
<text class="item-con-text">提交人</text>
<text class="item-con-text">{{item.name}}</text>
</view>
<view style="margin-top: 8px;">
<text class="item-con-text">提交时间</text>
<text class="item-con-text">{{item.date}}</text>
</view>
</view>
</view>
<!-- <uni-load-more :status="loadingType"></uni-load-more> -->
</view>
<!-- 加载....没有更多 -->
<view style="line-height: 60rpx;margin-bottom: 50rpx;">
<u-loadmore :status="status" :icon-type="iconType" :load-text="loadText" />
</view>
</view>
</template>
@ -9,17 +38,48 @@
export default {
data() {
return {
triggered: true,
status: 'loadmore',
iconType: 'flower',
loadText: {
loadmore: '轻轻上拉',
loading: '努力加载中',
nomore: '拉也没用,没有了'
},
listQuery: {
current: 1,
size: 10,
params: {
userSid: "",
messageName: "",
state: "2", //0 1 2
}
},
loadingType: 'more', //
dataList: [
],
};
},
onShow() {
console.log('onShow', getApp().globalData.isLogin)
onPullDownRefresh() {
this.listQuery.current = 1
this.loadData('refresh');
setTimeout(function() {
uni.stopPullDownRefresh();
}, 2000);
},
//
onReachBottom() {
this.listQuery.current = this.listQuery.current + 1
this.loadData();
},
onLoad() {
let token = uni.getStorageSync("Global-Auth-Token")
if (token != null && token.length != 0) {
getApp().globalData.token = token
}
let isLogin =uni.getStorageSync("isLogin")
let isLogin = uni.getStorageSync("isLogin")
if (isLogin != null && isLogin == 1) {
getApp().globalData.isLogin = isLogin
}
@ -27,26 +87,29 @@
if (sid != null && sid.length != 0) {
getApp().globalData.sid = sid
}
console.log('用户Sid', getApp().globalData.sid)
console.log('token', getApp().globalData.token)
console.log('是否登陆', getApp().globalData.isLogin)
// setTimeout(() => {
if (getApp().globalData.isLogin) {
var userSid = getApp().globalData.sid
console.log(">>>>>", userSid)
// this.getData(userSid, true)
this.listQuery.params.userSid = userSid
this.loadData();
// uni.setTabBarBadge({ //
// index: 0, //tabbar
// text: '100' //
// })
} else {
/* #ifdef MP-WEIXIN */
this.WxSilentLogin()
/* #endif */
/* #ifdef APP-PLUS */
uni.redirectTo({
url: '../login/login'
@ -54,10 +117,214 @@
/* #endif */
}
},
methods: {}
onShow() {
console.log('onShow', getApp().globalData.isLogin)
if (this.dataList.length > 0) {
var num = 0
for (var i = 0; i < this.dataList.length; i++) {
var item = this.dataList[i]
if (item.ostate == '0') {
num++;
}
}
console.log('num', num)
if (num != 0) {
uni.setTabBarBadge({ //
index: 1, //tabbar
text: num > 100 ? "99+" : num + "" //
})
}
}
},
methods: {
itemClick(item) {
console.log('item', item.pagepath)
uni.navigateTo({
url: "/" + item.pagepath
})
item.ostate = "2"
},
//
async loadData(type = 'add', loading) {
//
if (type === 'add') {
if (this.loadingType === 'nomore') {
return;
}
this.loadingType = 'loading';
} else {
this.loadingType = 'more';
}
var list = []
this.$api.messageListPage(this.listQuery).then((resp) => {
// if (resp.success) {
console.log('1111', resp)
// list = resp.records
for (var i = 0; i < resp.records.length; i++) {
var item = resp.records[i]
var title = item.map.thing2
console.log("title", title)
list.push({
messageName: title,
name: item.map.thing3,
date: item.map.time1,
pagepath: item.pagepath,
ostate: item.ostate
})
}
console.log("消息列表", list)
if (type === 'refresh') {
this.dataList = [];
}
this.dataList = this.dataList.concat(list);
console.log("消息列表>>>>>", this.dataList.length)
if (this.dataList.length > 0) {
var num = 0
for (var i = 0; i < this.dataList.length; i++) {
var item = this.dataList[i]
if (item.ostate == '0') {
num++;
}
}
if (num != 0) {
uni.setTabBarBadge({ //
index: 1, //tabbar
text: num > 100 ? "99+" : num + "" //
})
}
}
//more nomore(20)
this.loadingType = this.dataList.length > list.total ? 'nomore' : 'more';
if (type === 'refresh') {
if (loading == 1) {
uni.hideLoading();
} else {
uni.stopPullDownRefresh();
}
}
}).catch(e => {
console.log('eeeee', e)
})
},
}
}
</script>
<style lang="scss">
.pages {
width: 100%;
height: 100%;
.newslist {
display: flex;
flex-direction: column;
background: #fff;
border-radius: 12px;
margin-left: 12px;
margin-right: 12px;
margin-top: 12px;
padding: 15px 20px;
.item-top {
display: flex;
flex-direction: row;
align-items: center;
padding-bottom: 12px;
padding-left: 5px;
padding-right: 5px;
border-bottom: 1px solid #F1F3F5;
.drop {
width: 6px;
height: 6px;
background: #f00;
border-radius: 50%;
margin-right: 5px;
}
.item-top-img {
width: 18px;
height: 18px;
}
.item-top-text {
flex: 1;
margin-right: 10px;
font-size: 16px;
color: #101010;
font-weight: 600;
font-family: sans-serif;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.item-top-text2 {
font-size: 14px;
color: #0A59F7;
}
}
.item-con {
margin-top: 12px;
display: flex;
flex-direction: column;
.item-con-text {
font-size: 15px;
color: #666666;
}
}
.item-bom {
width: 100%;
margin-top: 12px;
padding-top: 10px;
border-top: 1px solid #F1F3F5;
display: flex;
flex-direction: row;
align-items: center;
justify-content: end;
.item-bom-img {
width: 14px;
height: 14px;
}
.item-bom-text {
margin-left: 5px;
font-size: 14px;
color: #999;
}
}
}
}
</style>

70
supervise-uniapp/pages/home/UserFragment.vue

@ -3,27 +3,29 @@
<view class="top">
<image class="img" src="https://supervise.yxtsoft.com/img/uni.png" mode="aspectFit"></image>
<image class="img" :src="baseUrl" mode="aspectFit" @click="chooseImage" ></image>
<view class="top_right">
<text class="top_right_text1">{{info.name}}</text>
<text class="top_right_text2">用户号{{info.mobile}}</text>
<text class="top_right_text1">{{name}}</text>
<text class="top_right_text2">{{orgName}}</text>
</view>
</view>
<view class="user-item-bg">
<UserItem src='https://supervise.yxtsoft.com/img/user/wdxm.png' text="我的项目" @click="click" clickId="0"></UserItem>
<UserItem src='https://supervise.yxtsoft.com/img/user/wdxm.png' text="我的项目" @click="click" clickId="0">
</UserItem>
</view>
<!-- <view class="user-item-bg">
<!-- <view class="user-item-bg">
<UserItem src='https://supervise.yxtsoft.com/img/user/smxx.png' text="实名信息" notes="完善信息" @click="click" clickId="1"></UserItem>
</view> -->
<view class="user-item-bg">
<UserItem src='https://supervise.yxtsoft.com/img/user/sz.png' text="设置" @click="click" clickId="2"></UserItem>
<UserItem src='https://supervise.yxtsoft.com/img/user/sz.png' text="设置" @click="click" clickId="2">
</UserItem>
</view>
<!-- #ifdef APP-PLUS -->
<view class="user-item-bg">
@ -31,7 +33,8 @@
<UserItem src='https://supervise.yxtsoft.com/img/user/xmgl.png' text="项目管理" @click="click" clickId="4"></UserItem>
<UserItem src='https://supervise.yxtsoft.com/img/user/ycgl.png' text="云仓管理" @click="click" clickId="5"></UserItem>
<UserItem src='https://supervise.yxtsoft.com/img/user/xtgl.png' text="系统管理" @click="click" clickId="6"></UserItem> -->
<UserItem src='https://supervise.yxtsoft.com/img/user/xtgl.png' text="检查更新" :notes="version" @click="click" clickId="7">
<UserItem src='https://supervise.yxtsoft.com/img/user/xtgl.png' text="检查更新" :notes="version" @click="click"
clickId="7">
</UserItem>
</view>
<!-- #endif -->
@ -46,12 +49,9 @@
export default {
data() {
return {
baseUrl:"https://supervise.yxtsoft.com/img",
info: {
name: "石家庄市宇信通电子有限公司",
mobile: "651651351651",
},
baseUrl: "",
name: "",
orgName:"",
version: ""
};
},
@ -67,14 +67,14 @@
/* #endif */
},
onShow() {
console.log('onShow', getApp().globalData.isLogin)
let token = uni.getStorageSync("Global-Auth-Token")
if (token != null && token.length != 0) {
getApp().globalData.token = token
}
let isLogin =uni.getStorageSync("isLogin")
let isLogin = uni.getStorageSync("isLogin")
if (isLogin != null && isLogin == 1) {
getApp().globalData.isLogin = isLogin
}
@ -82,36 +82,54 @@
if (sid != null && sid.length != 0) {
getApp().globalData.sid = sid
}
console.log('用户Sid', getApp().globalData.sid)
console.log('token', getApp().globalData.token)
console.log('是否登陆', getApp().globalData.isLogin)
// setTimeout(() => {
if (getApp().globalData.isLogin) {
var userSid = getApp().globalData.sid
var headImage = getApp().globalData.headImage
var username = getApp().globalData.username
var orgNamePath = getApp().globalData.orgNamePath
console.log(">>>>>", userSid)
console.log(">>>>>", headImage)
console.log(">>>>>", username)
console.log(">>>>>", orgNamePath)
this.name = username
this.orgName = orgNamePath==""?"暂无数据":orgNamePath
this.baseUrl = headImage==""?"https://supervise.yxtsoft.com/img/user/userImage.png":headImage
// this.getData(userSid, true)
// uni.setTabBarBadge({ //
// index: 0, //tabbar
// text: '100' //
// })
} else {
/* #ifdef MP-WEIXIN */
this.WxSilentLogin()
/* #endif */
/* #ifdef APP-PLUS */
uni.redirectTo({
url: '../login/login'
})
/* #endif */
}
},
methods: {
chooseImage(){
uni.navigateTo({
url: '../index/SetUp2'
});
},
click(id) {
switch (id) {
case "0":
uni.navigateTo({
@ -121,6 +139,9 @@
case "1":
break;
case "2":
uni.navigateTo({
url: '../index/SetUp'
});
break;
case "3":
break;
@ -149,13 +170,14 @@
display: flex;
flex-direction: row;
align-items: center;
padding: 25px;
padding:15px 25px;
.img {
margin-top: 10px;
margin-left: 10px;
width: 50px;
height: 50px;
width: 60px;
height: 60px;
border-radius: 5px;
}
.top_right {

61
supervise-uniapp/pages/home/WorkFragment.vue

@ -19,7 +19,7 @@
<view style="display: flex;flex-direction: row;">
<view class="top_item" @click="topClick('1')">
<!-- <view class="top_item" @click="topClick('1')">
<view class="top_item_icon">
<text class="top_item_icon_num" v-show="dbNum!=0">{{dbNum}}</text>
<image class="top_item_icon_img" src="https://supervise.yxtsoft.com/img/newApp/dbgz.png">
@ -35,7 +35,7 @@
</image>
</view>
<text class="top_item_text">已办工作</text>
</view>
</view> -->
<view class="top_item" @click="topClick('3')">
<view class="top_item_icon">
<text class="top_item_icon_num" v-show="dyNum!=0">{{dyNum}}</text>
@ -297,10 +297,19 @@
console.log('1111', resp)
this.isShow = msg;
this.dbNum = resp.todoNumber
this.dyNum = resp.pendingWork
this.dyNum = resp.pendingMessages
this.textArr = resp.notice
this.swipers = resp.imageUrl
this.swipers = resp.urls
if(this.dyNum!=0){
uni.setTabBarBadge({ //
index: 1, //tabbar
text: this.dyNum > 100 ? "99+" : this.dyNum + "" //
})
}
}).catch(e => {
console.log('eeeee', e)
})
@ -310,40 +319,46 @@
switch (index) {
case "1":
//
uni.showToast({
icon: "none",
title: '待办',
duration: 2000,
});
// uni.showToast({
// icon: "none",
// title: '',
// duration: 2000,
// });
uni.navigateTo({
url: '../index/WaitingProcessed'
});
break;
case "2":
//
uni.showToast({
icon: "none",
title: '已办',
duration: 2000,
});
// uni.showToast({
// icon: "none",
// title: '',
// duration: 2000,
// });
uni.navigateTo({
url: '../index/AlreadyProcessed'
});
break;
case "3":
//
uni.showToast({
icon: "none",
title: '待阅',
duration: 2000,
// uni.showToast({
// icon: "none",
// title: '',
// duration: 2000,
// });
uni.navigateTo({
url: '../index/NotReadWork'
});
break;
case "4":
//
uni.showToast({
icon: "none",
title: '已阅',
duration: 2000,
// uni.showToast({
// icon: "none",
// title: '',
// duration: 2000,
// });
uni.navigateTo({
url: '../index/ReadWork'
});
break;
default:

167
supervise-uniapp/pages/index/ChangePassword.vue

@ -0,0 +1,167 @@
<template>
<view class="pages">
<view style="background: #fff;">
<view style="margin-top: 30rpx;">
<view class="inputRow">
<image src="../../static/baseIcon/code.png" mode="aspectFill" class="drawableLeft"></image>
<input type="number" maxlength="6" @input="paswordInput1" :password="showPassword1" placeholder="原密码"
class="input" />
<image class="showImage" :src="img1" mode="aspectFill" @click="showPas('1')"></image>
</view>
</view>
<view class="inputRow">
<image src="../../static/baseIcon/code.png" mode="aspectFill" class="drawableLeft"></image>
<input type="number" maxlength="6" @input="paswordInput2" :password="showPassword2" placeholder="新密码"
class="input" />
<image :src="img2" class="showImage" mode="aspectFill" @click="showPas('2')"></image>
</view>
<view class="inputRow" style="border-bottom: none;">
<image src="../../static/baseIcon/code.png" mode="aspectFill" class="drawableLeft"></image>
<input type="number" maxlength="6" @input="paswordInput3" :password="showPassword3" placeholder="确认新密码"
class="input" />
<image :src="img3" class="showImage"mode="aspectFill" @click="showPas('3')"></image>
</view>
</view>
<view class="btn" @click="next">
<text class="btnText">确定</text>
</view>
<view v-show="errorsMsg!=''" style="width: 100%;margin-top: 50px;color: #f00; font-size: 18px;text-align: center;">{{errorsMsg}}</view>
</view>
</template>
<script>
export default {
data() {
return {
formData:{
original:"",
password:"",
confirmPassword:"",
userSid:""
},
showPassword1: true,
showPassword2: true,
showPassword3: true,
img1: "/static/loginIcon/notShow.png",
img2: "/static/loginIcon/notShow.png",
img3: "/static/loginIcon/notShow.png",
errorsMsg:"",
}
},
methods: {
showPas(index) {
switch (index) {
case "1":
this.showPassword1 = !this.showPassword1
this.img1 = this.showPassword1 ? "/static/loginIcon/notShow.png" : "/static/loginIcon/isShow.png"
break;
case "2":
this.showPassword2 = !this.showPassword2
this.img2 = this.showPassword2 ? "/static/loginIcon/notShow.png" : "/static/loginIcon/isShow.png"
break;
case "3":
this.showPassword3 = !this.showPassword3
this.img3 = this.showPassword3 ? "/static/loginIcon/notShow.png" : "/static/loginIcon/isShow.png"
break;
default:
break;
}
},
paswordInput1(event) {
this.formData.original = event.target.value
},
paswordInput2(event) {
this.formData.password = event.target.value;
},
paswordInput3(event) {
this.formData.confirmPassword = event.target.value;
},
next(){
this.formData.userSid = getApp().globalData.sid
console.log('formData>>>', this.formData)
this.$api.updatePassword(this.formData).then((resp) => {
// if (resp.success) {
console.log('1111', resp)
this.errorsMsg = ""
}).catch(e => {
console.log('eeeee', e)
this.errorsMsg = e.msg
})
},
}
}
</script>
<style lang="scss">
.pages {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
.inputRow {
flex-direction: row;
display: flex;
margin-left: 30rpx;
margin-right: 30rpx;
margin-bottom: 10rpx;
margin-top: 10rpx;
padding-bottom: 10rpx;
border-bottom: 0.1px #F1F1F1 solid;
align-items: center;
.input {
margin-left: 20rpx;
height: 70rpx;
flex: 1;
font-size: 32rpx;
}
.drawableLeft {
width: 40rpx;
height: 40rpx;
margin: 20rpx;
}
.showImage {
width: 20px;
height: 20px;
margin-left: 10px;
}
}
.btn {
display: flex;
width: 90%;
height: 80rpx;
flex-direction: column;
background-color: #007AFF;
margin-top: 80rpx;
margin-left: auto;
margin-right: auto;
align-items: center;
justify-content: center;
border-radius: 10rpx;
.btnText {
color: #ffffff;
font-size: 33rpx;
}
}
}
</style>

35
supervise-uniapp/pages/index/NotPermission.vue

@ -0,0 +1,35 @@
<template>
<view class="pages">
<image style="margin-top: 30px;" src="../../static/baseIcon/NotPermission.png" mode="aspectFill"></image>
<text style="margin-top: 30px; color: #9F9F9F;">抱歉您暂无权限访问该页面</text>
</view>
</template>
<script>
export default {
data() {
return {
}
},
onShow() {
wx.hideHomeButton()
},
methods: {
}
}
</script>
<style>
.pages{
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
</style>

353
supervise-uniapp/pages/index/NotReadWork.vue

@ -0,0 +1,353 @@
<template>
<view class="pages">
<view>
<view v-for="(item,index) in dataList" class="newslist" @click="itemClick(item)">
<view class="item-top">
<view class="item-top-text">{{item.messageName}}</view>
<image class="item-top-img" src="../../static/baseIcon/zy.png" mode="aspectFill"></image>
</view>
<view class="item-con">
<view>
<text class="item-con-text">提交人</text>
<text class="item-con-text">{{item.name}}</text>
</view>
<view style="margin-top: 8px;">
<text class="item-con-text">提交时间</text>
<text class="item-con-text">{{item.date}}</text>
</view>
</view>
</view>
<!-- <uni-load-more :status="loadingType"></uni-load-more> -->
</view>
<!-- 加载....没有更多 -->
<view style="line-height: 60rpx;margin-bottom: 50rpx;">
<u-loadmore :status="status" :icon-type="iconType" :load-text="loadText" />
</view>
</view>
</template>
<script>
export default {
data() {
return {
triggered: true,
status: 'loadmore',
iconType: 'flower',
loadText: {
loadmore: '轻轻上拉',
loading: '努力加载中',
nomore: '拉也没用,没有了'
},
listQuery: {
current: 1,
size: 10,
params: {
userSid: "",
messageName: "",
state:"0", //0 1 2
}
},
loadingType: 'more', //
dataList: [
// {
// messageName: "36524",
// name: "",
// date: "2023-08-13 17:14"
// },
// {
// messageName: "36524",
// name: "",
// date: "2023-08-13 17:14"
// },
// {
// messageName: "36524",
// name: "",
// date: "2023-08-13 17:14"
// },
// {
// messageName: "36524",
// name: "",
// date: "2023-08-13 17:14"
// },
// {
// messageName: "36524",
// name: "",
// date: "2023-08-13 17:14"
// },
// {
// messageName: "36524",
// name: "",
// date: "2023-08-13 17:14"
// },
// {
// messageName: "36524",
// name: "",
// date: "2023-08-13 17:14"
// },
// {
// messageName: "36524",
// name: "",
// date: "2023-08-13 17:14"
// },
// {
// messageName: "36524",
// name: "",
// date: "2023-08-13 17:14"
// },
// {
// messageName: "36524",
// name: "",
// date: "2023-08-13 17:14"
// },
// {
// messageName: "36524",
// name: "",
// date: "2023-08-13 17:14"
// },
// {
// messageName: "36524",
// name: "",
// date: "2023-08-13 17:14"
// },
// {
// messageName: "36524",
// name: "",
// date: "2023-08-13 17:14"
// },
],
};
},
onPullDownRefresh() {
this.listQuery.current = 1
this.loadData('refresh');
setTimeout(function() {
uni.stopPullDownRefresh();
}, 2000);
},
//
onReachBottom() {
this.listQuery.current = this.listQuery.current + 1
this.loadData();
},
onShow() {
console.log('onShow', getApp().globalData.isLogin)
let token = uni.getStorageSync("Global-Auth-Token")
if (token != null && token.length != 0) {
getApp().globalData.token = token
}
let isLogin = uni.getStorageSync("isLogin")
if (isLogin != null && isLogin == 1) {
getApp().globalData.isLogin = isLogin
}
let sid = uni.getStorageSync("sid")
if (sid != null && sid.length != 0) {
getApp().globalData.sid = sid
}
console.log('用户Sid', getApp().globalData.sid)
console.log('token', getApp().globalData.token)
console.log('是否登陆', getApp().globalData.isLogin)
// setTimeout(() => {
if (getApp().globalData.isLogin) {
var userSid = getApp().globalData.sid
console.log(">>>>>", userSid)
this.listQuery.params.userSid = userSid
this.loadData();
// uni.setTabBarBadge({ //
// index: 0, //tabbar
// text: '100' //
// })
} else {
/* #ifdef MP-WEIXIN */
this.WxSilentLogin()
/* #endif */
/* #ifdef APP-PLUS */
uni.redirectTo({
url: '../login/login'
})
/* #endif */
}
},
methods: {
itemClick(item) {
console.log('item', item.pagepath)
uni.navigateTo({
url: "/" + item.pagepath
})
},
//
async loadData(type = 'add', loading) {
//
if (type === 'add') {
if (this.loadingType === 'nomore') {
return;
}
this.loadingType = 'loading';
} else {
this.loadingType = 'more';
}
var list = []
this.$api.messageListPage(this.listQuery).then((resp) => {
// if (resp.success) {
console.log('1111', resp)
// list = resp.records
for (var i = 0; i < resp.records.length; i++) {
var item = resp.records[i]
var title = item.map.thing2
console.log("title", title)
list.push({
messageName: title,
name: item.map.thing3,
date: item.map.time1,
pagepath: item.pagepath
})
}
console.log("消息列表", list)
if (type === 'refresh') {
this.dataList = [];
}
this.dataList = this.dataList.concat(list);
console.log("消息列表>>>>>", this.dataList.length)
//more nomore(20)
this.loadingType = this.dataList.length > list.total ? 'nomore' : 'more';
if (type === 'refresh') {
if (loading == 1) {
uni.hideLoading();
} else {
uni.stopPullDownRefresh();
}
}
}).catch(e => {
console.log('eeeee', e)
})
},
}
}
</script>
<style lang="scss">
.pages {
width: 100%;
height: 100%;
.newslist {
display: flex;
flex-direction: column;
background: #fff;
border-radius: 12px;
margin-left: 12px;
margin-right: 12px;
margin-top: 12px;
padding: 15px 20px;
.item-top {
display: flex;
flex-direction: row;
align-items: center;
padding-bottom: 12px;
padding-left: 5px;
padding-right: 5px;
border-bottom: 1px solid #F1F3F5;
.item-top-img {
width: 18px;
height: 18px;
}
.item-top-text {
flex: 1;
margin-right: 10px;
font-size: 16px;
color: #101010;
font-weight: 600;
font-family: sans-serif;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.item-top-text2 {
font-size: 14px;
color: #0A59F7;
}
}
.item-con {
margin-top: 12px;
display: flex;
flex-direction: column;
.item-con-text {
font-size: 15px;
color: #666666;
}
}
.item-bom {
width: 100%;
margin-top: 12px;
padding-top: 10px;
border-top: 1px solid #F1F3F5;
display: flex;
flex-direction: row;
align-items: center;
justify-content: end;
.item-bom-img {
width: 14px;
height: 14px;
}
.item-bom-text {
margin-left: 5px;
font-size: 14px;
color: #999;
}
}
}
}
</style>

356
supervise-uniapp/pages/index/ReadWork.vue

@ -0,0 +1,356 @@
<template>
<view class="pages">
<view>
<view v-for="(item,index) in dataList" class="newslist" @click="itemClick(item)">
<view class="item-top">
<view class="item-top-text">{{item.messageName}}</view>
<image class="item-top-img" src="../../static/baseIcon/zy.png" mode="aspectFill"></image>
</view>
<view class="item-con">
<view>
<text class="item-con-text">提交人</text>
<text class="item-con-text">{{item.name}}</text>
</view>
<view style="margin-top: 8px;">
<text class="item-con-text">提交时间</text>
<text class="item-con-text">{{item.date}}</text>
</view>
</view>
</view>
<!-- <uni-load-more :status="loadingType"></uni-load-more> -->
</view>
<!-- 加载....没有更多 -->
<view style="line-height: 60rpx;margin-bottom: 50rpx;">
<u-loadmore :status="status" :icon-type="iconType"
:loading-text="loadText.loading"
:loadmore-text="loadText.loadmore"
:nomore-text="loadText.nomore" />
</view>
</view>
</template>
<script>
export default {
data() {
return {
triggered: true,
status: 'loadmore',
iconType: 'flower',
loadText: {
loadmore: '轻轻上拉',
loading: '努力加载中',
nomore: '拉也没用,没有了'
},
listQuery: {
current: 1,
size: 10,
params: {
userSid: "",
messageName: "",
state:"1", //0 1 2
}
},
loadingType: 'more', //
dataList: [
// {
// messageName: "36524",
// name: "",
// date: "2023-08-13 17:14"
// },
// {
// messageName: "36524",
// name: "",
// date: "2023-08-13 17:14"
// },
// {
// messageName: "36524",
// name: "",
// date: "2023-08-13 17:14"
// },
// {
// messageName: "36524",
// name: "",
// date: "2023-08-13 17:14"
// },
// {
// messageName: "36524",
// name: "",
// date: "2023-08-13 17:14"
// },
// {
// messageName: "36524",
// name: "",
// date: "2023-08-13 17:14"
// },
// {
// messageName: "36524",
// name: "",
// date: "2023-08-13 17:14"
// },
// {
// messageName: "36524",
// name: "",
// date: "2023-08-13 17:14"
// },
// {
// messageName: "36524",
// name: "",
// date: "2023-08-13 17:14"
// },
// {
// messageName: "36524",
// name: "",
// date: "2023-08-13 17:14"
// },
// {
// messageName: "36524",
// name: "",
// date: "2023-08-13 17:14"
// },
// {
// messageName: "36524",
// name: "",
// date: "2023-08-13 17:14"
// },
// {
// messageName: "36524",
// name: "",
// date: "2023-08-13 17:14"
// },
],
};
},
onPullDownRefresh() {
this.listQuery.current = 1
this.loadData('refresh');
setTimeout(function() {
uni.stopPullDownRefresh();
}, 2000);
},
//
onReachBottom() {
this.listQuery.current = this.listQuery.current + 1
this.loadData();
},
onShow() {
console.log('onShow', getApp().globalData.isLogin)
let token = uni.getStorageSync("Global-Auth-Token")
if (token != null && token.length != 0) {
getApp().globalData.token = token
}
let isLogin = uni.getStorageSync("isLogin")
if (isLogin != null && isLogin == 1) {
getApp().globalData.isLogin = isLogin
}
let sid = uni.getStorageSync("sid")
if (sid != null && sid.length != 0) {
getApp().globalData.sid = sid
}
console.log('用户Sid', getApp().globalData.sid)
console.log('token', getApp().globalData.token)
console.log('是否登陆', getApp().globalData.isLogin)
// setTimeout(() => {
if (getApp().globalData.isLogin) {
var userSid = getApp().globalData.sid
console.log(">>>>>", userSid)
this.listQuery.params.userSid = userSid
this.loadData();
// uni.setTabBarBadge({ //
// index: 0, //tabbar
// text: '100' //
// })
} else {
/* #ifdef MP-WEIXIN */
this.WxSilentLogin()
/* #endif */
/* #ifdef APP-PLUS */
uni.redirectTo({
url: '../login/login'
})
/* #endif */
}
},
methods: {
itemClick(item) {
console.log('item', item.pagepath)
uni.navigateTo({
url: "/" + item.pagepath
})
},
//
async loadData(type = 'add', loading) {
//
if (type === 'add') {
if (this.status === 'nomore') {
return;
}
this.status = 'loading';
} else {
this.status = 'more';
}
var list = []
this.$api.messageListPage(this.listQuery).then((resp) => {
// if (resp.success) {
console.log('1111', resp)
// list = resp.records
for (var i = 0; i < resp.records.length; i++) {
var item = resp.records[i]
var title = item.map.thing2
console.log("title", title)
list.push({
messageName: title,
name: item.map.thing3,
date: item.map.time1,
pagepath: item.pagepath
})
}
console.log("消息列表", list)
if (type === 'refresh') {
this.dataList = [];
}
this.dataList = this.dataList.concat(list);
console.log("消息列表>>>>>", this.dataList.length)
//more nomore(20)
this.status = this.dataList.length > list.total ? 'nomore' : 'more';
if (type === 'refresh') {
if (loading == 1) {
uni.hideLoading();
} else {
uni.stopPullDownRefresh();
}
}
}).catch(e => {
console.log('eeeee', e)
})
},
}
}
</script>
<style lang="scss">
.pages {
width: 100%;
height: 100%;
.newslist {
display: flex;
flex-direction: column;
background: #fff;
border-radius: 12px;
margin-left: 12px;
margin-right: 12px;
margin-top: 12px;
padding: 15px 20px;
.item-top {
display: flex;
flex-direction: row;
align-items: center;
padding-bottom: 12px;
padding-left: 5px;
padding-right: 5px;
border-bottom: 1px solid #F1F3F5;
.item-top-img {
width: 18px;
height: 18px;
}
.item-top-text {
flex: 1;
margin-right: 10px;
font-size: 16px;
color: #101010;
font-weight: 600;
font-family: sans-serif;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.item-top-text2 {
font-size: 14px;
color: #0A59F7;
}
}
.item-con {
margin-top: 12px;
display: flex;
flex-direction: column;
.item-con-text {
font-size: 15px;
color: #666666;
}
}
.item-bom {
width: 100%;
margin-top: 12px;
padding-top: 10px;
border-top: 1px solid #F1F3F5;
display: flex;
flex-direction: row;
align-items: center;
justify-content: end;
.item-bom-img {
width: 14px;
height: 14px;
}
.item-bom-text {
margin-left: 5px;
font-size: 14px;
color: #999;
}
}
}
}
</style>

63
supervise-uniapp/pages/index/RegulatoryReporting.vue

@ -121,6 +121,8 @@
params: {
projectSid: "",
orderDate: "",
wxCode:"",
userSid:""
},
info: {
projectName: "",
@ -186,38 +188,42 @@
this.params = {
projectSid: option.projectSid,
orderDate: option.orderDate
orderDate: option.orderDate,
}
},
onShow() {
wx.hideHomeButton()
this.init()
// setTimeout(() => {
// }, 1000)
this.getServerData();
console.log('userSid>>>>>>', getApp().globalData.sid)
this.params.userSid = getApp().globalData.sid
},
methods: {
init() {
// var chart = this.$echarts.init(this.$refs["myChart"]);
// this.$refs["myChart"].getZr().on('click', params => {
// let pointInPixel = [params.offsetX, params.offsetY]
// if (chart.containPixel('grid', pointInPixel)) {
// let xIndex = chart.convertFromPixel({
// seriesIndex: 0
// }, [params.offsetX, params.offsetY])[0]
// console.log(xIndex)
// this.select_index = xIndex
// }
// })
let that = this
wx.login({
success: function(res) {
if (res.code) {
console.log('Http网络请求信息', {
"wxCode": res.code
})
that.params.wxCode = res.code
that.getServerData();
}
},
fail: function(res) {
uni.showToast({
title: "网络错误,请退出后重新进入。",
icon: 'none'
})
}
});
},
getServerData() {
@ -327,6 +333,23 @@
}).catch(e => {
console.log('eeeee', e)
// code 410 420
if(e.code==410){
uni.redirectTo({
url:"/pages/index/NotPermission"
})
}
if(e.code==420){
uni.redirectTo({
url:"/pages/index/BindPhone"
})
}
})

56
supervise-uniapp/pages/index/SetUp.vue

@ -0,0 +1,56 @@
<template>
<view class="pages">
<view class="item" @click="itemClick('1')">
<text class="text">密码设置</text>
<image src="../../static/baseIcon/zy.png" style="width: 15px;height: 15px;"></image>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
itemClick(index) {
switch (index) {
case "1":
uni.navigateTo({
url: '../index/ChangePassword'
});
break;
default:
break;
}
}
}
}
</script>
<style lang="scss">
.pages {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
.item {
background: #fff;
padding: 20px 15px;
display: flex;
flex-direction: row;
justify-content: space-between;
.text {
color: #101010;
font-size: 16px;
}
}
}
</style>

114
supervise-uniapp/pages/index/SetUp2.vue

@ -0,0 +1,114 @@
<template>
<view class="pages">
<view class="item" >
<text class="text">头像</text>
<image :src="headImage" class="img" @click="chooseImage"></image>
</view>
</view>
</template>
<script>
import config from '@/common/config.js'
export default {
data() {
return {
uploadAction: config.baseUrl + "/portal/v1/sysuser/uploadfile",
headImage: getApp().globalData.headImage
// headImage: "https://supervise.yxtsoft.com/img/user/userImage.png"
}
},
methods: {
chooseImage() {
wx.chooseImage({
count: 1, //
sizeType: ['compressed'], //
sourceType: ['album', 'camera'], //
success: (res)=> {
//
console.log(res.tempFilePaths);
this.uploadImage(res.tempFilePaths[0]);
}
})
},
uploadImage(imagePath) {
let _this = this
wx.uploadFile({
url: _this.uploadAction, //
fileType: "image",
filePath: imagePath, //
name: 'file', // key , key
success: (res) => {
// image
console.log("1111111",res.data)
let info = JSON.parse(res.data)
console.log("info", info)
console.log("data", info.data)
console.log("fullUrl",info.data.fullUrl)
_this.headImage=info.data.fullUrl
console.log("2222",_this.headImage);
getApp().globalData.headImage = _this.headImage
_this.saveImaage( _this.headImage)
},
fail: function (res) {
console.log(res);
}
})
},
saveImaage(url){
var info ={
userSid:getApp().globalData.sid,
headImage:url,
}
console.log("info",info);
this.$api.uploadHandImage(info).then((resp) => {
// if (resp.success) {
console.log('1111', resp)
}).catch(e => {
console.log('eeeee', e)
})
}
}
}
</script>
<style lang="scss">
.pages {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
.item {
background: #fff;
padding: 20px 20px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
.text {
color: #101010;
font-size: 16px;
}
.img {
width: 45px;
height:45px;
border-radius: 5px;
}
}
}
</style>

15
supervise-uniapp/pages/index/WarehouseDetaile.vue

@ -140,8 +140,19 @@
console.log('1111', resp)
this.info = resp
this.info.swipers =[]
this.info.swipers.push(
resp.picUrl)
if(resp.pics.length==0){
this.info.swipers.push(
resp.picUrl)
}else{
for (var i = 0; i <resp.pics.length; i++) {
var url = resp.pics[i].fileUrl
this.info.swipers.push(url)
}
}
}).catch(e => {
console.log('eeeee', e)

6
supervise-uniapp/pages/login/login.vue

@ -215,10 +215,10 @@
getApp().globalData.token = uinfo.token
getApp().globalData.sid = uinfo.sid
getApp().globalData.mobile = uinfo.mobile
getApp().globalData.name = uinfo.name
getApp().globalData.isAdmin = uinfo.isAdmin
getApp().globalData.roleName = uinfo.roleName
getApp().globalData.staffSid = uinfo.staffSid
getApp().globalData.orgNamePath = uinfo.orgNamePath
getApp().globalData.organizationSid = uinfo.organizationSid
getApp().globalData.headImage = uinfo.headImage
getApp().globalData.isLogin= true
uni.setStorageSync("Global-Auth-Token", uinfo.token)

BIN
supervise-uniapp/static/baseIcon/NotPermission.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

13
supervise-uniapp/utils/requester.js

@ -93,11 +93,12 @@ const request = (options) => {
});
} else {
if (_opts.showFailMessage) {
uni.showToast({
title: data.msg,
icon: 'none',
duration: 2000,
})
console.log('1111')
// uni.showToast({
// title: data.msg,
// icon: 'none',
// duration: 2000,
// })
}
}
reject(data)
@ -126,6 +127,7 @@ const request = (options) => {
}
}
if (_opts.showFailMessage) {
console.log('22222')
uni.showToast({
title: em.msg,
icon: 'none',
@ -148,6 +150,7 @@ const request = (options) => {
// em.msg = error.errMsg
}
if (_opts.showFailMessage) {
console.log('3333333')
uni.showToast({
title: em.msg,
icon: 'none',

Loading…
Cancel
Save