diff --git a/miniprogram/app.json b/miniprogram/app.json index fbc694c..61e6172 100644 --- a/miniprogram/app.json +++ b/miniprogram/app.json @@ -31,7 +31,8 @@ "pages/measures/index", "pages/measures-Chakan/index", "pages/updatePassword/updatePassword", - "pages/safety_manage/index" + "pages/safety_manage/index", + "pages/quality_manage/index" ], "subpackages": [ { diff --git a/miniprogram/pageage/project_checkDetection/list/index.js b/miniprogram/pageage/project_checkDetection/list/index.js index 5496027..93daddd 100644 --- a/miniprogram/pageage/project_checkDetection/list/index.js +++ b/miniprogram/pageage/project_checkDetection/list/index.js @@ -150,9 +150,15 @@ Page({ returnToPage: function () { /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/ - wx.redirectTo({ - url: '../../../pages/gengduogongneng/gengduogongneng', - }) + if(wx.getStorageSync('nav-menu')=="gd"){ + wx.redirectTo({ + url: '../../../pages/gengduogongneng/gengduogongneng', + }) + }else{ + wx.redirectTo({ + url: '../../../pages/quality_manage/index', + }) + } }, //项目切换 返回值 diff --git a/miniprogram/pageage/project_checking/list/index.js b/miniprogram/pageage/project_checking/list/index.js index 011b3dc..c013572 100644 --- a/miniprogram/pageage/project_checking/list/index.js +++ b/miniprogram/pageage/project_checking/list/index.js @@ -9,6 +9,7 @@ Page({ deptId:"", loginName:"", userName:"", + minRoleId:"", projectId:"", projectData:{}, projectNameArgs:"", @@ -50,11 +51,12 @@ Page({ deptId:res.data.deptId, loginName:res.data.loginName, userName:res.data.userName, + minRoleId:res.data.minRoleId, projectId:app.globalData.projectId, projectNameArgs:app.globalData.projectName, initData:{text:app.globalData.projectName,id:app.globalData.projectId} }) - this.getProjectCheckingData(app.globalData.projectId,res.data.loginName,res.data.deptId); + this.getProjectCheckingData(app.globalData.projectId,res.data.loginName,res.data.deptId,res.data.minRoleId); } }) }, @@ -62,8 +64,12 @@ Page({ /** * 查询项目举牌验收数据 */ - getProjectCheckingData(projectId,loginName,deptId) { + getProjectCheckingData(projectId,loginName,deptId,minRoleId) { var that = this; + //判断角色, + if(minRoleId==2||minRoleId==3||minRoleId==4){ + deptId=0; + } wx.request({ url: app.globalData.reqUrl + '/wechat/projectchecking/list', data: { @@ -82,9 +88,15 @@ Page({ returnToPage: function () { /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/ - wx.redirectTo({ - url: '../../../pages/gengduogongneng/gengduogongneng', - }) + if(wx.getStorageSync('nav-menu')=="gd"){ + wx.redirectTo({ + url: '../../../pages/gengduogongneng/gengduogongneng', + }) + }else{ + wx.redirectTo({ + url: '../../../pages/quality_manage/index', + }) + } }, //项目切换 返回值 diff --git a/miniprogram/pageage/project_materialSeal/list/index.js b/miniprogram/pageage/project_materialSeal/list/index.js index 2d668e6..a29bc2c 100644 --- a/miniprogram/pageage/project_materialSeal/list/index.js +++ b/miniprogram/pageage/project_materialSeal/list/index.js @@ -74,9 +74,15 @@ Page({ returnToPage: function () { /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/ - wx.redirectTo({ - url: '../../../pages/gengduogongneng/gengduogongneng', - }) + if(wx.getStorageSync('nav-menu')=="gd"){ + wx.redirectTo({ + url: '../../../pages/gengduogongneng/gengduogongneng', + }) + }else{ + wx.redirectTo({ + url: '../../../pages/quality_manage/index', + }) + } }, //项目切换 返回值 diff --git a/miniprogram/pageage/project_measure/list/index.js b/miniprogram/pageage/project_measure/list/index.js index d6049a2..874028e 100644 --- a/miniprogram/pageage/project_measure/list/index.js +++ b/miniprogram/pageage/project_measure/list/index.js @@ -92,9 +92,15 @@ Page({ returnToPage: function () { /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/ - wx.redirectTo({ - url: '../../../pages/gengduogongneng/gengduogongneng', - }) + if(wx.getStorageSync('nav-menu')=="gd"){ + wx.redirectTo({ + url: '../../../pages/gengduogongneng/gengduogongneng', + }) + }else{ + wx.redirectTo({ + url: '../../../pages/quality_manage/index', + }) + } }, //项目切换 返回值 diff --git a/miniprogram/pages/gengduogongneng/gengduogongneng.js b/miniprogram/pages/gengduogongneng/gengduogongneng.js index 38c5abf..3e30012 100644 --- a/miniprogram/pages/gengduogongneng/gengduogongneng.js +++ b/miniprogram/pages/gengduogongneng/gengduogongneng.js @@ -11,7 +11,6 @@ Page({ projectId:'', projectName:'' , loginName:'', - userName:'', nickName:'', deptName:'', remark:'', @@ -58,7 +57,6 @@ Page({ roleName:res.data.roleName, remark:res.data.remark, loginName:res.data.loginName, - userName:res.data.userName, nickName:res.data.nickName, deptName:res.data.deptName, projectId:app.globalData.projectId, @@ -99,7 +97,7 @@ Page({ success:function(res){ wx.navigateToMiniProgram({ appId: 'wxc44b5d588f599758', - path: `pages/tabbar/order-new/index?type=0&szhUserId=${res.data.userId}&szhUserName=${res.data.userName}` + path: `pages/tabbar/order-new/index?type=0&szhUserId=${res.data.userId}&szhUserName=${res.data.loginName}` }) } }) @@ -144,43 +142,18 @@ Page({ }) }, - //跳转到设备管理 - SBGL:function(){ - app.toast("敬请期待!"); - // wx.redirectTo({ - // url: '../shebieguanli-jxsb/shajiangguan', - // }) + //跳转到安全管理 + AQGL:function(){ + wx.redirectTo({ + url:'../safety_manage/index' + }) }, - //跳转到人员管理 - RYGL:function(){ - app.toast("敬请期待!"); - // wx.redirectTo({ - // url: '../renyuanguanli/renyuanguanli' - // }) - }, - - //跳转到安全管控 - JDGL:function(){ - app.toast("敬请期待!"); - // wx.redirectTo({ - // url:'../newAddPage/safetyManagement/index' - // }) - }, - - //跳转到安全管理 - XMSP:function(){ - wx.redirectTo({ - url:'../safety_manage/index' - }) - }, - //跳转到质量管理 - ZLGL2:function(){ - app.toast("敬请期待!"); - // wx.redirectTo({ - // url:'../Quality-Assurance/index' - // }) + ZLGL:function(){ + wx.redirectTo({ + url:'../quality_manage/index.js' + }) }, //跳转到进度管理 JDGL2:function(){ @@ -190,6 +163,7 @@ Page({ // url:'../../pageage/Progress-management/index' // }) }, + //退出登录 TCDL:function(){ wx.clearStorageSync(); @@ -198,6 +172,7 @@ Page({ url: '../login/login', }) }, + //修改密码 XGMM:function(){ wx.setStorageSync('nav-menu', "gd"); @@ -205,6 +180,7 @@ Page({ url: '../updatePassword/updatePassword' }) }, + //返回到工程列表页面 goGCLB:function(){ wx.redirectTo({ diff --git a/miniprogram/pages/gengduogongneng/gengduogongneng.wxml b/miniprogram/pages/gengduogongneng/gengduogongneng.wxml index b57806a..d38bdd7 100644 --- a/miniprogram/pages/gengduogongneng/gengduogongneng.wxml +++ b/miniprogram/pages/gengduogongneng/gengduogongneng.wxml @@ -112,8 +112,7 @@ - - + - + - + { + this.setData({ + loginName:res.data.loginName, + nickName:res.data.nickName, + projectId:app.globalData.projectId, + projectNameArgs:app.globalData.projectName, + initData:{text:app.globalData.projectName,id:app.globalData.projectId} + }) + this.selectMenuList(res.data.loginName); + this.initPage(app.globalData.projectId) + } + }) + }, + + selectMenuList:function(loginName){ + var that = this; + wx.request({ + url: app.globalData.reqUrl+'/wechat/selectRoleMenuList', + data:{ + username:loginName, + type:"zl" + }, + method:"get", + success:function(res){ + res=res.data; + if(res.code =='200'){ + that.setData({ + menuList:res.data + }) + } + } + }) + }, + + //初始化页面 + initPage(projectId){ + this.getMeasureData(projectId); + this.getQualityCheck(projectId); + this.getCheckDetectionData(projectId); + this.getMaterialSealData(projectId); + this.getCheckingData(projectId); + }, + + /** + * 实测实量数据 + */ + getMeasureData(projectId) { + wx.request({ + url: app.globalData.reqUrl + '/wechat/projectMeasure/selectGroupCountByProjectId', + data:{projectId:projectId}, + method:"get", + success: res => { + res = res.data; + if(res.code == 200 && res.data){ + let sum=0; + res.data.forEach((it,idx)=>{ + sum+=it.total; + }); + let measureStatistics=[]; + res.data.forEach((it,idx)=>{ + measureStatistics.push({ name: it.measureTypeName, value: it.total, prop: (it.total / sum * 100).toFixed(2)}); + }); + //数据绑定 + this.setData({ + measureStatistics + }) + } + } + }) + }, + + /** + * 获取质量检查数据 + */ + getQualityCheck(projectId) { + wx.request({ + url: app.globalData.reqUrl + '/wechat/projectProblemmodify/selectGroupCountByProjectId', + data:{projectId:projectId,infoType:"1"}, + method:"get", + success: res => { + res = res.data; + if(res.code == 200){ + //数据绑定 + res.data.forEach((it,idx)=>{ + if(it.problemType=="1"){ + this.setData({ + "securityCheck.routineRectificationRate": (it.comTotal / it.total * 100).toFixed(2), + "securityCheck.routineProblemTotal": it.comTotal, + "securityCheck.routineCheckNumber": it.total + }) + }else{ + this.setData({ + "securityCheck.specialRectificationRate": (it.comTotal / it.total * 100).toFixed(2), + "securityCheck.specialProblemTotal": it.comTotal, + "securityCheck.specialCheckNumber": it.total, + }) + } + }); + } + } + }) + }, + + //取样复试数据 + getCheckDetectionData(projectId){ + wx.request({ + url: app.globalData.reqUrl + '/wechat/projectDetection/selectGroupCountByProjectId', + data:{projectId:projectId}, + method:"get", + success: res => { + res = res.data; + if(res.code == 200 && res.data){ + //数据绑定 + res.data.forEach((it,idx)=>{ + if(it.checkType=="1"){ + this.setData({ + "checkDetectionData.type1Value": it.total, + "checkDetectionData.type1PassRate": (it.passTotal / it.checkTotal * 100).toFixed(2) + }); + }else if(it.checkType=="2"){ + this.setData({ + "checkDetectionData.type2Value": it.total, + "checkDetectionData.type2PassRate": (it.passTotal / it.checkTotal * 100).toFixed(2) + }); + }else if(it.checkType=="3"){ + this.setData({ + "checkDetectionData.type3Value": it.total, + "checkDetectionData.type3PassRate": (it.passTotal / it.checkTotal * 100).toFixed(2) + }); + }else{ + this.setData({ + "checkDetectionData.type4Value": it.total, + "checkDetectionData.type4PassRate": (it.passTotal / it.checkTotal * 100).toFixed(2) + }); + } + }); + } + } + }) + }, + + /** + * 材料封样数据 + */ + getMaterialSealData(projectId) { + wx.request({ + url: app.globalData.reqUrl + '/wechat/projectMaterialSeal/selectGroupCountByProjectId', + data:{projectId:projectId}, + method:"get", + success: res => { + res = res.data; + if(res.code == 200 && res.data){ + let sum=0; + res.data.forEach((it,idx)=>{ + sum+=it.total; + }); + let materialSealStatistics=[]; + res.data.forEach((it,idx)=>{ + let typeName = it.type; + if(typeName.length>6){ + //字符串截取 + typeName = typeName.substring(typeName.length-7,typeName.length); + } + materialSealStatistics.push({ name: typeName, value: it.total, prop: (it.total / sum * 100).toFixed(2)}); + }); + //数据绑定 + this.setData({ + materialSealStatistics + }) + } + } + }) + }, + + /** + * 举牌验收数据 + */ + getCheckingData(projectId) { + wx.request({ + url: app.globalData.reqUrl + '/wechat/projectchecking/findStatisticsByProjectId', + data:{projectId:projectId}, + method:"get", + success: res => { + res = res.data; + if(res.code == 200 && res.data){ + res.data.forEach((it,idx)=>{ + //数据绑定 + this.setData({ + checkValue:it.total, + checkPassRate:(it.pass / it.total * 100).toFixed(2), + }) + }); + } + } + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + }, + + //项目切换 返回值 + onProjectSelect(e) { + let projectId = e.detail.id; + let projectName = e.detail.text; + app.globalData.projectId = projectId; + app.globalData.projectName = projectName; + this.setData({ + projectId: projectId, + projectName: projectName, + }) + this.onLoad() + }, + + goMenu:function(event){ + wx.setStorageSync('nav-menu', "zl"); + wx.navigateTo({ + url: event.currentTarget.dataset.url + }) + }, + + /** + * 实测实量页面 + */ + goSCSL: function () { + wx.setStorageSync('nav-menu', "zl"); + wx.redirectTo({ + url: '../../pageage/project_measure/list/index' + }) + }, + + /** + * 质量隐患排查 + */ + goYHPC: function () { + wx.setStorageSync('nav-menu', "zl"); + wx.redirectTo({ + url: '../../pageage/project_problemmodify/quality/list/index' + }) + }, + + /** + * 取样复试 + */ + goQYFS: function () { + wx.setStorageSync('nav-menu', "zl"); + wx.redirectTo({ + url: '../../pageage/project_checkDetection/list/index' + }) + }, + + /** + * 材料封样 + */ + goCLFY: function () { + wx.setStorageSync('nav-menu', "zl"); + wx.redirectTo({ + url: '../../pageage/project_materialSeal/list/index' + }) + }, + + /** + * 举牌验收 + */ + goJPYS: function () { + wx.setStorageSync('nav-menu', "zl"); + wx.redirectTo({ + url: '../../pageage/project_checking/list/index' + }) + }, + + // 底部导航 + onChange(event) { + // event.detail 的值为当前选中项的索引 + this.setData({ active: event.detail }); + }, + + /** + * 项目概况页面 + */ + XMGK: function () { + wx.redirectTo({ + url: '../xiangmugaikuang/xiangmugaikuang' + }) + }, + //跳转到安全管理 + AQGL:function(){ + wx.redirectTo({ + url:'../safety_manage/index' + }) + }, + //跳转到进度管理 + JDGL:function(){ + wx.redirectTo({ + url:'../../pageage/Progress-management/index' + }) + }, + /** + * 更多功能 + */ + GDGN: function () { + wx.redirectTo({ + url: '../gengduogongneng/gengduogongneng' + }) + }, + //退出登录 + TCDL:function(){ + wx.clearStorageSync(); + wx.setStorageSync('isReload', "1") + wx.redirectTo({ + url: '../login/login', + }) + }, + //修改密码 + XGMM:function(){ + wx.setStorageSync('nav-menu', "zl"); + wx.redirectTo({ + url: '../updatePassword/updatePassword' + }) + }, + + showPopup() { + this.setData({ show: true }); + }, + onClosePopup() { + this.setData({ show: false }); + }, + +}) \ No newline at end of file diff --git a/miniprogram/pages/quality_manage/index.json b/miniprogram/pages/quality_manage/index.json new file mode 100644 index 0000000..08a55f8 --- /dev/null +++ b/miniprogram/pages/quality_manage/index.json @@ -0,0 +1,5 @@ +{ + "usingComponents": { "van-tabbar": "@vant/weapp/tabbar", + "van-tabbar-item": "@vant/weapp/tabbar-item"}, + "navigationStyle":"custom" +} \ No newline at end of file diff --git a/miniprogram/pages/quality_manage/index.wxml b/miniprogram/pages/quality_manage/index.wxml new file mode 100644 index 0000000..3cebbc9 --- /dev/null +++ b/miniprogram/pages/quality_manage/index.wxml @@ -0,0 +1,478 @@ + + + + + + + + + + + 返回 + + + + 质量管理 + + + + + + + + + + {{deptName}} + + + + + + + {{nickName}} + {{loginName}} + + + + + + + 修改密码 + + + + + + + 退出登录 + + + + + + + + + + + + + + {{item.menu_name}} + + + + + + + + + 实测实量 + 查看详情 + + + + + + + + + 质量隐患排查 + 查看详情 + + + + + 常规检查问题数 + + + 整改率 + {{securityCheck.routineRectificationRate}} % + + + + 已整改问题数 + {{securityCheck.routineProblemTotal}} + + + + + 专项检查问题数 + + + 整改率 + {{securityCheck.specialRectificationRate}} % + + + + 已整改问题数 + {{securityCheck.specialProblemTotal}} + + + + + + + + + + + + 取样复试 + 查看详情 + + + + + + + + 钢筋原材料 + + + + + + + + + + + + + + + + 复试次数 + + + + {{checkDetectionData.type1Value}} + 次 + + + + + + + + + + + + 合格率 + + + + {{checkDetectionData.type1PassRate}} + % + + + + + + + + + + + + + + + 钢筋试拉件 + + + + + + + + + + + + + + + + 复试次数 + + + + {{checkDetectionData.type2Value}} + 次 + + + + + + + + + + + + 合格率 + + + + {{checkDetectionData.type2PassRate}} + % + + + + + + + + + + + + + + + 混凝土试件 + + + + + + + + + + + + + + + + 复试次数 + + + + {{checkDetectionData.type3Value}} + 次 + + + + + + + + + + + + 合格率 + + + + {{checkDetectionData.type3PassRate}} + % + + + + + + + + + + + + + + + 其它复试 + + + + + + + + + + + + + + + + 复试次数 + + + + {{checkDetectionData.type4Value}} + 次 + + + + + + + + + + + + 合格率 + + + + {{checkDetectionData.type4PassRate}} + % + + + + + + + + + + + + + + + 材料封样 + 查看详情 + + + + + + + + + 举牌验收 + 查看详情 + + + + + + + + + + + + + 验收次数 + + + + {{checkValue}} + 次 + + + + + + + + + 合格率 + + + + {{checkPassRate}} + % + + + + + + + + + + + + + + + + + 项目概况 + + + + + + 安全管理 + + + + + + 质量管理 + + + + + + 进度管理 + + + + + + 更多功能 + + diff --git a/miniprogram/pages/quality_manage/index.wxss b/miniprogram/pages/quality_manage/index.wxss new file mode 100644 index 0000000..afbe2d9 --- /dev/null +++ b/miniprogram/pages/quality_manage/index.wxss @@ -0,0 +1,156 @@ +/* pages/Quality-Assurance/index.wxss */ +/* 质量管理 */ +.quality{ + padding: 60rpx 40rpx 30rpx; +} +/* 头部部分 */ +.quality-header{ + margin: 10rpx 0 50rpx; +} +/* 内容部分 */ +.quality-content{ + width: 100%; + border: 1px solid #1e2336; + background-color: #1e2336; + padding-top: 20rpx; + margin-bottom: 40rpx; + font-size: 26rpx; + border-radius: 15rpx; +} +.eharts_title{ + height: 40rpx; + line-height: 40rpx; + padding-left: 50rpx; + margin-left: 20rpx; + font-size: 34rpx; + background: url("http://fileimg.makalu.cc/CORE_52887EE6A33042408E11C2174974ABA1.png") no-repeat left/35rpx; + } + /* 内容部分 */ + .gangjin{ + padding:0 30rpx 40rpx 60rpx; + } + .gangjin-header{ + width: 100%; +} +.project-title{ + height: 40rpx; + line-height: 40rpx; + padding-left: 40rpx; + margin-top: 40rpx; + font-size: 26rpx; + background: url("http://fileimg.makalu.cc/WEB_F6B0554C215E496195EA7D6FCE2C0B8E.png") no-repeat left/35rpx; +} +.wanjieNum-over-bottom{ + display: flex; + flex-direction: column; + justify-content:space-evenly ; + padding: 100rpx 0 0 0; + color: #b0c3e5; +} +.wanjieNum-over-bottom-top{ + display: flex; + justify-content: space-between; + height: 100rpx; + line-height: 100rpx; +} +.wanjieNum-over-bottom-top-box{ + display: flex; + width: 50%; + height: 100rpx; +} +.wanjieNum-over-bottom-top-box-Img{ + display: flex; + justify-content: center; + align-items: center; + width: 40%; + height: 100rpx; + background: url("http://fileimg.makalu.cc/WEB_20BAE0F4F7E14D048A818A10223B0BE1.gif") no-repeat center/100%; + padding: 14rpx 0; +} +.wanjieNum-over-bottom-top-box-ImgBY{ + display: flex; + justify-content: center; + align-items: center; + width: 40%; + height: 100rpx; + background: url("http://fileimg.makalu.cc/WEB_EBD7748CB73A4D2D8BD74617F84528DE.png") no-repeat center/100%; + padding: 14rpx 0; +} +.wanjieNum-over-bottom-top-box-Imgs{ + display: flex; + justify-content: center; + align-items: center; + width: 40%; + height: 100rpx; + background: url("http://fileimg.makalu.cc/WEB_FBB7B92F89A748CCA88C2D059D67CDCD.gif") no-repeat center/100%; + padding: 14rpx 0; +} +.wanjieNum-over-bottom-top-box-ImgPC{ + display: flex; + justify-content: center; + align-items: center; + width: 40%; + height: 100rpx; + background: url("http://fileimg.makalu.cc/WEB_E219D45248B942248FE6561F24B536A9.png") no-repeat center/100%; + padding: 14rpx 0; +} +.wanjieNum-over-bottom-top-box-ImgPS{ + display: flex; + justify-content: center; + align-items: center; + width: 40%; + height: 100rpx; + background: url("http://fileimg.makalu.cc/WEB_C8E00800A80E4D41B579855E50A57F3E.png") no-repeat center/100%; + padding: 14rpx 0; +} +.wanjieNum-over-bottom-top-box-Img-small{ + width: 50rpx; + height: 50rpx; + line-height: 50rpx; +} +.wanjieNum-over-bottom-top-box-Img-smallBY{ + width: 50rpx; + height: 50rpx; + line-height: 50rpx; + margin-bottom: 20rpx; +} +.wanjieNum-over-bottom-top-box-title{ + display: flex; + flex-direction: column; + justify-content: space-between; + /* padding-left:20rpx ; */ + width: 60%; + height:100rpx ; + font-size: 28rpx; +} +.wanjieNum-over-bottom-top-box-title-text{ + height: 50rpx; + line-height: 50rpx; +} +/* 钢筋拉试件 */ +.gangjinlajin{ + padding:0 30rpx 40rpx 60rpx; +} +.gangjinlajin-header{ + width: 100%; +} +/* 标养室监测 */ +.jupai-top{ + height: 80rpx; + border: 1px solid green; +} +.gd_max{ + padding:10rpx 50rpx 0; + } + .gd_min{ + padding: 30rpx 0; + text-align: center; + } + .gd_min image{ + width: 150rpx; + height: 150rpx; + } + .gd_min view{ + padding: 10rpx; + color: #89a4eb; + } \ No newline at end of file diff --git a/miniprogram/pages/safety_manage/index.js b/miniprogram/pages/safety_manage/index.js index e2bd867..8715ad3 100644 --- a/miniprogram/pages/safety_manage/index.js +++ b/miniprogram/pages/safety_manage/index.js @@ -7,8 +7,9 @@ Page({ * 页面的初始数据 */ data: { + active:1, loginName:"", - userName:"", + nickName:"", deptId:"", deptName:"", projectName: '', @@ -36,18 +37,6 @@ Page({ }, menuList:[], }, - showPopup() { - this.setData({ show: true }); - }, - onClose() { - this.setData({ show: false }); - }, - onClickShow() { - this.setData({ loadShow: true }); - }, - onClickHide() { - this.setData({ loadShow: false }); - }, //项目切换 返回值 onProjectSelect(e) { @@ -74,7 +63,7 @@ Page({ console.log(res.data); that.setData({ loginName: res.data.loginName, - userName: res.data.userName, + nickName: res.data.nickName, deptId: res.data.deptId, deptName:res.data.deptName, projectName: app.globalData.projectName, @@ -158,7 +147,7 @@ Page({ method:"get", success: res => { res = res.data; - if(res.code == 200){ + if(res.code == 200 && res.data){ let sum=0; res.data.forEach((it,idx)=>{ sum+=it.total; @@ -264,7 +253,7 @@ Page({ method:"get", success: res => { res = res.data; - if(res.code == 200){ + if(res.code == 200 && res.data){ let sum=0; res.data.forEach((it,idx)=>{ sum+=it.total; @@ -376,6 +365,22 @@ Page({ }, /****************************底部导航********************************/ + showPopup() { + this.setData({ show: true }); + }, + onClickShow() { + this.setData({ loadShow: true }); + }, + onClickHide() { + this.setData({ loadShow: false }); + }, + + // 底部导航 + onChange(event) { + // event.detail 的值为当前选中项的索引 + this.setData({ active: event.detail }); + }, + goMenu:function(event){ wx.setStorageSync('nav-menu', "aq"); wx.navigateTo({ @@ -394,7 +399,7 @@ Page({ //跳转到质量管理 ZLGL:function(){ wx.redirectTo({ - url:'../Quality-Assurance/index' + url:'../quality_manage/index' }) }, //跳转到进度管理 diff --git a/miniprogram/pages/safety_manage/index.wxml b/miniprogram/pages/safety_manage/index.wxml index c05b977..821a345 100644 --- a/miniprogram/pages/safety_manage/index.wxml +++ b/miniprogram/pages/safety_manage/index.wxml @@ -93,7 +93,7 @@ - 安全检查 + 安全隐患排查 查看详情 diff --git a/miniprogram/pages/xiangmugaikuang/xiangmugaikuang.js b/miniprogram/pages/xiangmugaikuang/xiangmugaikuang.js index a4c7ef5..5e44ac0 100644 --- a/miniprogram/pages/xiangmugaikuang/xiangmugaikuang.js +++ b/miniprogram/pages/xiangmugaikuang/xiangmugaikuang.js @@ -394,7 +394,6 @@ Page({ success:function(res){ that.setData({ loginName:res.data.loginName, - userName:res.data.userName, nickName:res.data.nickName, deptName:res.data.deptName, roleName:res.data.roleName.split(',')[0], @@ -620,11 +619,10 @@ Page({ }, //跳转到质量管理 - ZLGL2:function(){ - app.toast("敬请期待!"); - // wx.redirectTo({ - // url:'../Quality-Assurance/index' - // }) + ZLGL:function(){ + wx.redirectTo({ + url:'../quality_manage/index' + }) }, //跳转到进度管理 JDGL2:function(){ diff --git a/miniprogram/pages/xiangmugaikuang/xiangmugaikuang.wxml b/miniprogram/pages/xiangmugaikuang/xiangmugaikuang.wxml index 2c47664..9c99453 100644 --- a/miniprogram/pages/xiangmugaikuang/xiangmugaikuang.wxml +++ b/miniprogram/pages/xiangmugaikuang/xiangmugaikuang.wxml @@ -221,7 +221,7 @@ 安全管理 - +