diff --git a/miniprogram/app.json b/miniprogram/app.json index 71e8fab..7591f8c 100644 --- a/miniprogram/app.json +++ b/miniprogram/app.json @@ -5,20 +5,15 @@ "pages/gengduogongneng/gengduogongneng", "pages/xiangmugaikuang/xiangmugaikuang", "pages/renyuanguanli/renyuanguanli", - "pages/shebieguanli-tzsb/taji", - "pages/shebieguanli-jxsb/shajiangguan", - "pages/ranyuanguanli-map/map", "pages/map/map", - "pages/shebeiguanli-map/jixiedingwei", "pages/winter-training/index", - "pages/saft-education-user-bind/index", "pages/Highlight-photos/index", - "pages/Security-control-echarts/index", "pages/construction/index", "pages/Construction-Log/index", "pages/updatePassword/updatePassword", "pages/safety_manage/index", "pages/quality_manage/index", + "pages/progress_manage/index", "pages/project_flowable/initTask/index", "pages/project_flowable/myFlowDefinition/index", "pages/project_flowable/await/index", @@ -60,7 +55,6 @@ "safetyManagement/problemRectification/index", "safetyManagement/securityCheckRectified/index", "safetyManagement/addSafetyInspect/index", - "Security-control-echarts/index", "samplingRetesting/index", "samplingRetestingDeliver/index", "samplingRetestingUpload/index", diff --git a/miniprogram/app.wxss b/miniprogram/app.wxss index 89aa72f..eecc1ed 100644 --- a/miniprogram/app.wxss +++ b/miniprogram/app.wxss @@ -834,6 +834,12 @@ page{ padding-left: 40rpx; background: url("http://fileimg.makalu.cc/CORE_B1C818B4CF2C44FE9D96624589329EBC.png") no-repeat left/35rpx; } +.module_title_3{ + height: 50rpx; + line-height: 50rpx; + padding-left: 40rpx; + background: url("http://fileimg.makalu.cc/CORE_52887EE6A33042408E11C2174974ABA1.png") no-repeat left/35rpx; +} .safety_inspect{ padding:30rpx 20rpx; } @@ -1539,14 +1545,12 @@ swiper-item video{ background-color: #E6A23C; } .code_label{ - font-size: 0.6rem; - width: 120rpx; + font-size: 1.0rem; + width: 180rpx; margin: auto; text-align: center; - padding: 0.1rem; - border-radius: 0.5rem 0 0.5rem 0; - margin-bottom: 15rpx; - margin-left: -3rpx; + margin-left: 48rpx; + border-radius: 0.8rem 0 0.8rem 0; } .code_label_2{ font-size: 0.8rem; diff --git a/miniprogram/pageage/project_problemmodify/quality/list/index.wxml b/miniprogram/pageage/project_problemmodify/quality/list/index.wxml index b9421bb..9755e08 100644 --- a/miniprogram/pageage/project_problemmodify/quality/list/index.wxml +++ b/miniprogram/pageage/project_problemmodify/quality/list/index.wxml @@ -2,7 +2,9 @@ - + + + 质量隐患排查 @@ -10,70 +12,66 @@ - - - - 整改({{dzgCount}}) - 复检({{dfjCount}}) - 完成({{yclCount}}) - 超时({{zgcsCount}}) + + + + 整改({{dzgCount}}) + 复检({{dfjCount}}) + 完成({{yclCount}}) + 超时({{zgcsCount}}) - - - - - {{index < 9 ?'0'+(index+1):(index+1)}} - {{item.workParts}} - 常规检查 - 专项检查 - - - - - - 待整改 - 待复检 - 复检驳回 - 整改完成 - - - - 隐患类型:{{item.dangerTypeName}} - 检查单位:{{item.deptName}} - 检查时间:{{item.createTime}} - - - - 整改要求:{{item.changeInfo}} - - - - - - - - 暂无数据 + + + + + + {{index < 9 ?'0'+(index+1):(index+1)}} + + 待整改 + 待复检 + 复检驳回 + 整改完成 + + 常规检查 + 专项检查 - - + + + + + + + + 隐患类型:{{item.dangerTypeName}} + 隐患描述:{{item.workParts}} + 检查单位:{{item.deptName}} + 检查时间:{{item.createTime}} + + + + 整改要求:{{item.changeInfo}} + + + + + + + + 暂无数据 + + + 草稿 - - + + 新增 - - - - - - - - - - + + + \ No newline at end of file diff --git a/miniprogram/pageage/project_problemmodify/security/list/index.wxml b/miniprogram/pageage/project_problemmodify/security/list/index.wxml index b776f1f..8d5874a 100644 --- a/miniprogram/pageage/project_problemmodify/security/list/index.wxml +++ b/miniprogram/pageage/project_problemmodify/security/list/index.wxml @@ -19,12 +19,18 @@ 超时({{zgcsCount}}) - + + {{index < 9 ?'0'+(index+1):(index+1)}} - {{item.workParts}} + + 待整改 + 待复检 + 复检驳回 + 整改完成 + 常规检查 专项检查 @@ -32,14 +38,12 @@ - 待整改 - 待复检 - 复检驳回 - 整改完成 + - 隐患类型:{{item.dangerTypeName}} + 隐患类型:{{item.dangerTypeName}} + 隐患描述:{{item.workParts}} 检查单位:{{item.deptName}} 检查时间:{{item.createTime}} diff --git a/miniprogram/pageage/project_schedule/list/index.js b/miniprogram/pageage/project_schedule/list/index.js index d0c9f81..04b1922 100644 --- a/miniprogram/pageage/project_schedule/list/index.js +++ b/miniprogram/pageage/project_schedule/list/index.js @@ -15,7 +15,8 @@ Page({ initData: {}, show:false, listData:[], - request:app.globalData.reqUrl + request:app.globalData.reqUrl, + addFlag:false, }, onClose(){ @@ -46,19 +47,40 @@ Page({ wx.getStorage({ key: 'userinfo', success:res=>{ + this.getMenus(res.data.loginName); this.setData({ deptId:res.data.deptId, loginName:res.data.loginName, userName:res.data.userName, projectId:app.globalData.projectId, projectNameArgs:app.globalData.projectName, - initData:{text:app.globalData.projectName,id:app.globalData.projectId} + initData:{text:app.globalData.projectName,id:app.globalData.projectId}, }) this.getListData(app.globalData.projectId); } }) }, + getMenus:function(loginName){ + var that = this; + wx.request({ + url: app.globalData.reqUrl+'/wechat/selectRoleMenuList', + data:{ + username:loginName, + type:"jd" + }, + method:"get", + success:function(res){ + res=res.data; + if(res.code =='200' && res.data.length>0){ + that.setData({ + addFlag:true + }) + } + } + }) + }, + /** * 查询项目举牌验收数据 */ diff --git a/miniprogram/pageage/project_schedule/list/index.wxml b/miniprogram/pageage/project_schedule/list/index.wxml index a2e9001..bd5887a 100644 --- a/miniprogram/pageage/project_schedule/list/index.wxml +++ b/miniprogram/pageage/project_schedule/list/index.wxml @@ -45,7 +45,7 @@ - + 新增 diff --git a/miniprogram/pages/Security-control-echarts/index.js b/miniprogram/pages/Security-control-echarts/index.js deleted file mode 100644 index 1ba8ea8..0000000 --- a/miniprogram/pages/Security-control-echarts/index.js +++ /dev/null @@ -1,66 +0,0 @@ -// pages/Security-control-echarts/index.js -Page({ - - /** - * 页面的初始数据 - */ - data: { - - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow() { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - - } -}) \ No newline at end of file diff --git a/miniprogram/pages/Security-control-echarts/index.wxml b/miniprogram/pages/Security-control-echarts/index.wxml deleted file mode 100644 index 2d26574..0000000 --- a/miniprogram/pages/Security-control-echarts/index.wxml +++ /dev/null @@ -1,2 +0,0 @@ - -pages/Security-control-echarts/index.wxml diff --git a/miniprogram/pages/components/project-select/index.js b/miniprogram/pages/components/project-select/index.js index 243170d..b5edfe6 100644 --- a/miniprogram/pages/components/project-select/index.js +++ b/miniprogram/pages/components/project-select/index.js @@ -5,22 +5,22 @@ Component({ * 组件的属性列表 */ properties: { - init:{ - type:Object + init: { + type: Object }, - width:{ - type:String + width: { + type: String }, - left:{ - type:String + left: { + type: String } }, /**数据监听 */ observers: { init: function (val) { - if(val){ + if (val) { this.setData({ - item:val, + item: val, }) } }, @@ -30,16 +30,19 @@ Component({ */ data: { show: false, - index:0, - item:'', - columns:[], - projectList:[], + index: 0, + item: '', + columns: [], + defaultColumns: [], + projectList: [], + findProjectValue:"", }, - created(){ + created() { //this.getProjectNameList(); this.setData({ - projectList:app.globalData.projectInfoList + projectList: app.globalData.projectInfoList, + findProjectValue:"", }) }, /** @@ -47,56 +50,84 @@ Component({ */ methods: { showPopup() { - if(this.data.projectList.length>1){ + if (this.data.projectList.length > 1) { let data = this.data.projectList; let initData = this.data.init; let selectColumns = []; - data.forEach((item,i) =>{ - selectColumns.push({id:item.projectId,text:item.projectName}); - if(initData.id==item.projectId){ + data.forEach((item, i) => { + selectColumns.push({ + id: item.projectId, + text: item.projectName + }); + if (initData.id == item.projectId) { this.setData({ - index:i + index: i }) } }); - console.log("default-index="+this.data.index); this.setData({ - columns:selectColumns, - show: true + findProjectValue:"", + columns: selectColumns, + defaultColumns:selectColumns, + show: true }); } }, + //获取搜索的项目名称 + findProject: function (even) { + if(even.detail.value){ + let list = []; + this.data.columns.forEach(item=>{ + console.log(item.text,even.detail.value,item.text.indexOf(even.detail.value)>-1) + if(item.text.indexOf(even.detail.value)>-1){ + list.push(item); + } + }); + this.setData({ + columns: list + }) + }else{ + this.setData({ + columns: this.data.defaultColumns + }) + } + }, + onClose() { - this.setData({ show: false }); - }, - onSelectChange(e){ this.setData({ - item:e.detail.value + show: false + }); + }, + onSelectChange(e) { + this.setData({ + item: e.detail.value }) }, - onConfirm(){ + onConfirm() { this.setData({ - value:this.data.item.text + value: this.data.item.text }) - this.triggerEvent('change',this.data.item) - this.setData({ show: false }); + this.triggerEvent('change', this.data.item) + this.setData({ + show: false + }); }, - getProjectNameList:function(){ + getProjectNameList: function () { wx.request({ - url: app.globalData.reqUrl+'/weixin/security/getProjectNameList', - method:"GET", - data:{ - deptId:app.globalData.deptId, - projectId:app.globalData.userProjectId + url: app.globalData.reqUrl + '/weixin/security/getProjectNameList', + method: "GET", + data: { + deptId: app.globalData.deptId, + projectId: app.globalData.userProjectId }, - success: (res) =>{ + success: (res) => { var that = this; that.setData({ - projectList:res.data + projectList: res.data }) } }); }, } -}) +}) \ No newline at end of file diff --git a/miniprogram/pages/components/project-select/index.wxml b/miniprogram/pages/components/project-select/index.wxml index 47dd644..a99e606 100644 --- a/miniprogram/pages/components/project-select/index.wxml +++ b/miniprogram/pages/components/project-select/index.wxml @@ -10,7 +10,7 @@ 取消 - {{placeholder}} + 确认 安全管理 + {{aq}} diff --git a/miniprogram/pages/map/map.js b/miniprogram/pages/map/map.js index ea3c9da..ccd807a 100644 --- a/miniprogram/pages/map/map.js +++ b/miniprogram/pages/map/map.js @@ -8,8 +8,8 @@ Page({ deptId:'', height:"auto", scale:'10', - initialLon:'108.922306', - initialLat:'34.191848', + initialLon:'108.90975705669825', + initialLat:'34.53095652639473', markers: [], value1:'省', value2:'市/区', @@ -349,7 +349,7 @@ Page({ value2:res.data.shiName+'/'+res.data.quName, value3:res.data.companyName, markers:markers, - scale:15, + scale:12, initialLon:res.data.longitude, initialLat:res.data.latitude, projectCount:1, @@ -471,7 +471,7 @@ Page({ markers:res.data, projectCount:res.data.length, projectData:res.data, - scale:5, + scale:12, initialLon:res.data[0].longitude, initialLat:res.data[0].latitude, }) @@ -481,7 +481,7 @@ Page({ markers:res.data, projectCount:res.data.length, projectData:res.data, - scale:5, + scale:12, }) } } diff --git a/miniprogram/pages/map/map.wxml b/miniprogram/pages/map/map.wxml index ed2c4d1..099a2f9 100644 --- a/miniprogram/pages/map/map.wxml +++ b/miniprogram/pages/map/map.wxml @@ -1,5 +1,6 @@ - + + + + + + + + + + + + + + 工期概况 + + + + + + + 合同工期 + + + + + + 天 + + + {{startEnd}} + + + + + + + + + + + + + + + + + + + + + + + + + 施工日志 + + + + + + + + + + + {{item.name}} + + + + + + + + + + + + 设计楼层高{{item.design_floor_height}}m,设计施工高度{{item.design_elevation}}m + + + 设计楼板厚度{{item.design_floor_thickness}}m + + + + + + + + + + {{itemType.name}} + + + {{itemType.time}} + + + + + + + + + + + + + + + + + + + + 视频进度 + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/miniprogram/pages/progress_manage/index.wxss b/miniprogram/pages/progress_manage/index.wxss new file mode 100644 index 0000000..ad9ac16 --- /dev/null +++ b/miniprogram/pages/progress_manage/index.wxss @@ -0,0 +1,181 @@ +/* pages/Progress-management/index.wxss */ +/* 所有样式 */ +.All-content{ + display: flex; + flex-direction: column; + justify-content: space-between; + align-items: center; + padding: 36rpx ; + padding-top: 0rpx; +} +/* 头部样式 290+40*/ +.header-content{ + width: 100%; + height: 100rpx; + border-radius: 40rpx; + margin-bottom: 40rpx; +} +/* 工期概括 +210*/ +.gongqigaikuo{ + width: 100%; + height: 520rpx; + 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; + background: url("http://fileimg.makalu.cc/CORE_52887EE6A33042408E11C2174974ABA1.png") no-repeat left/35rpx; + } +.gongqigaikuo-content{ + width: 100%; + height: 484rpx; + box-sizing: border-box; + padding: 12rpx 20rpx 40rpx 40rpx; +} +.gongqigaikuo-content-hetong{ + display: flex; + justify-content: space-between; + align-items: center; + width: 100%; + height: 76rpx; +} +.gongqigaikuo-content-hetong-left{ + display: flex; + justify-content: space-between; + align-items: center; + width: 50%; + height: 76rpx; +} +.gongqigaikuo-content-jindu{ + display: flex; + justify-content: center; + align-items: center; + padding: 20rpx 40rpx 10rpx; + height: 348rpx; +} +.gongqigaikuo-content-jindu-left{ + width: 320rpx; + height: 320rpx; +} +.gongqigaikuo-content-jindu-box{ + display: flex; + flex-direction: column; + justify-content: space-between; + align-items: center; +} + /*施工日志 */ +.shigongrizhi{ + width: 100%; + border: 1px solid #1e2336; + background-color: #1e2336; + padding-top: 20rpx; + margin-bottom: 40rpx; + font-size: 26rpx; + border-radius: 15rpx; +} +.shigongrizhi-header{ + display: flex; + justify-content: space-between; + align-items: center; +} +.shigongrizhi-content{ + width: 100%; + padding: 30rpx 20rpx; + box-sizing: border-box; + font-size: 24rpx; +} +.shigongrizhi-content-top{ + display: flex; + justify-content: space-between; + align-items: center; + width: 100%; + height: 50rpx; + font-size: 28rpx; +} +.shigongrizhi-content-bottom{ + width: 100%; + + margin: 30rpx 0; +} +/* 模板铺设 */ +.shigongrizhi-content-bottom-left{ + display: flex; + justify-content: flex-start; + width: 100%; + height: 78rpx; +} +.shigongrizhi-content-top-bottom{ + display: flex; + justify-content: flex-start; + align-items: center; + height: 130rpx; +} +.shigongrizhi-content-top-bottom-Img{ + width: 160rpx; + height: 100rpx; + margin: 10rpx; +} +/* 视频进度 */ +.shipinjindu{ + width: 100%; + height: 520rpx; + border: 1px solid #1e2336; + background-color: #1e2336; + padding-top: 20rpx; + margin-bottom: 40rpx; + font-size: 26rpx; + border-radius: 15rpx; +} +.shipinjindu-top{ + display: flex; + align-items: center; + width: 100%; + height: 60rpx; +} +.shipinjindu-bottom{ + display: flex; + justify-content: center; + align-items: center; + width: 100%; + height: 460rpx; +} +.shipinjindu-bottom-insder{ + width: 90%; + height: 400rpx; +} +/* BIM */ +.BIM{ + width: 100%; + height: 900rpx; + border: 1px solid #1e2336; + background-color: #1e2336; + padding-top: 20rpx; + margin-bottom: 40rpx; + font-size: 26rpx; +} +.BIM-content{ + display: flex; + flex-direction: column; + justify-content: space-between; + align-items: center; + height: 768rpx; + padding: 30rpx 40rpx; + +} +.BIM-content-table{ + width: 100%; + height: 422rpx; +} +.BIM-content-tables{ + display: flex; + height: 52rpx; + border: 1px solid skyblue; +} \ No newline at end of file diff --git a/miniprogram/pages/quality_manage/index.js b/miniprogram/pages/quality_manage/index.js index a94be3a..1ee55f1 100644 --- a/miniprogram/pages/quality_manage/index.js +++ b/miniprogram/pages/quality_manage/index.js @@ -40,6 +40,8 @@ Page({ materialSealStatistics:[{ name: "其它", value: 0, prop: 0}], todoDb:0, approveDb:0, + aq:0, + zl:0, qyfsDb:0, scslDb:0, jpysDb:0, @@ -169,25 +171,28 @@ Page({ if(res.code == 200 && res.data){ //数据绑定 res.data.forEach((it,idx)=>{ + if(!it.passTotal){ + it.passTotal = 0; + } if(it.checkType=="1"){ this.setData({ "checkDetectionData.type1Value": it.total, - "checkDetectionData.type1PassRate": (it.passTotal / it.checkTotal * 100).toFixed(2) + "checkDetectionData.type1PassRate": (it.passTotal / it.total * 100).toFixed(2) }); }else if(it.checkType=="2"){ this.setData({ "checkDetectionData.type2Value": it.total, - "checkDetectionData.type2PassRate": (it.passTotal / it.checkTotal * 100).toFixed(2) + "checkDetectionData.type2PassRate": (it.passTotal / it.total * 100).toFixed(2) }); }else if(it.checkType=="3"){ this.setData({ "checkDetectionData.type3Value": it.total, - "checkDetectionData.type3PassRate": (it.passTotal / it.checkTotal * 100).toFixed(2) + "checkDetectionData.type3PassRate": (it.passTotal / it.total * 100).toFixed(2) }); }else{ this.setData({ "checkDetectionData.type4Value": it.total, - "checkDetectionData.type4PassRate": (it.passTotal / it.checkTotal * 100).toFixed(2) + "checkDetectionData.type4PassRate": (it.passTotal / it.total * 100).toFixed(2) }); } }); @@ -405,10 +410,10 @@ Page({ }, //跳转到进度管理 JDGL:function(){ - app.toast("敬请期待!"); - //wx.redirectTo({ - // url:'../../pageage/Progress-management/index' - //}) + //app.toast("敬请期待!"); + wx.redirectTo({ + url:'../../pageage/project_schedule/list/index' + }) }, /** * 更多功能 @@ -444,7 +449,7 @@ Page({ //查询当前登录人的代办任务 awaitTask(minRoleId,deptId,loginName,userId) { let param = { - //"businessKey":this.data.projectId, + "businessKey":app.globalData.projectId, "nowRole":minRoleId, "nowDept":deptId, "nowUserName":loginName, @@ -461,7 +466,9 @@ Page({ if(res.code=="200"){ that.setData({ todoDb:res.data.todo, - approveDb:res.data.approve, + approveDb:res.data.approve+res.data.zlCount, + aq:res.data.aqCount, + zl:res.data.zlCount, qyfsDb:res.data.approveQYFS, scslDb:res.data.approveSCSL, jpysDb:res.data.approveJPYS, diff --git a/miniprogram/pages/quality_manage/index.wxml b/miniprogram/pages/quality_manage/index.wxml index 78eae93..b022630 100644 --- a/miniprogram/pages/quality_manage/index.wxml +++ b/miniprogram/pages/quality_manage/index.wxml @@ -61,6 +61,7 @@ {{clfyDb}} {{jpysDb}} {{qyfsDb}} + {{zl}} {{item.menu_name}} @@ -430,6 +431,7 @@ style="width:40rpx; height: 40rpx;" /> 安全管理 + {{aq}} diff --git a/miniprogram/pages/ranyuanguanli-map/map.js b/miniprogram/pages/ranyuanguanli-map/map.js deleted file mode 100644 index 3c1b4a8..0000000 --- a/miniprogram/pages/ranyuanguanli-map/map.js +++ /dev/null @@ -1,66 +0,0 @@ -// pages/ranyuanguanli-map/map.js -Page({ - - /** - * 页面的初始数据 - */ - data: { - - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow() { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - - } -}) \ No newline at end of file diff --git a/miniprogram/pages/ranyuanguanli-map/map.wxml b/miniprogram/pages/ranyuanguanli-map/map.wxml deleted file mode 100644 index a5d10d8..0000000 --- a/miniprogram/pages/ranyuanguanli-map/map.wxml +++ /dev/null @@ -1,2 +0,0 @@ - -pages/ranyuanguanli-map/map.wxml diff --git a/miniprogram/pages/safety_manage/index.js b/miniprogram/pages/safety_manage/index.js index a60ef98..7effe5c 100644 --- a/miniprogram/pages/safety_manage/index.js +++ b/miniprogram/pages/safety_manage/index.js @@ -39,6 +39,7 @@ Page({ request:app.globalData.reqUrl, todoDb:0, approveDb:0, + aq:0, }, //项目切换 返回值 @@ -419,10 +420,10 @@ Page({ }, //跳转到进度管理 JDGL:function(){ - app.toast("敬请期待!"); - //wx.redirectTo({ - // url:'../../pageage/Progress-management/index' - //}) + //app.toast("敬请期待!"); + wx.redirectTo({ + url:'../../pageage/project_schedule/list/index' + }) }, /** * 更多功能 @@ -451,7 +452,7 @@ Page({ //查询当前登录人的代办任务 awaitTask(minRoleId,deptId,loginName,userId) { let param = { - //"businessKey":this.data.projectId, + "businessKey":app.globalData.projectId, "nowRole":minRoleId, "nowDept":deptId, "nowUserName":loginName, @@ -468,7 +469,8 @@ Page({ if(res.code=="200"){ that.setData({ todoDb:res.data.todo, - approveDb:res.data.approve + approveDb:res.data.approve+res.data.zlCount, + aq:res.data.aqCount }) } } diff --git a/miniprogram/pages/safety_manage/index.wxml b/miniprogram/pages/safety_manage/index.wxml index d8f9ff4..c8b6161 100644 --- a/miniprogram/pages/safety_manage/index.wxml +++ b/miniprogram/pages/safety_manage/index.wxml @@ -57,6 +57,7 @@ + {{aq}} {{item.menu_name}} @@ -212,6 +213,7 @@ style="width:40rpx; height: 40rpx;" /> 安全管理 + {{aq}} diff --git a/miniprogram/pages/saft-education-user-bind/index.js b/miniprogram/pages/saft-education-user-bind/index.js deleted file mode 100644 index 2a2fdbf..0000000 --- a/miniprogram/pages/saft-education-user-bind/index.js +++ /dev/null @@ -1,66 +0,0 @@ -// pages/saft-education-user-bind/index.js -Page({ - - /** - * 页面的初始数据 - */ - data: { - - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow() { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - - } -}) \ No newline at end of file diff --git a/miniprogram/pages/saft-education-user-bind/index.wxml b/miniprogram/pages/saft-education-user-bind/index.wxml deleted file mode 100644 index 01fbe6f..0000000 --- a/miniprogram/pages/saft-education-user-bind/index.wxml +++ /dev/null @@ -1,2 +0,0 @@ - -pages/saft-education-user-bind/index.wxml diff --git a/miniprogram/pages/shebeiguanli-map/jixiedingwei.js b/miniprogram/pages/shebeiguanli-map/jixiedingwei.js deleted file mode 100644 index 9a0152b..0000000 --- a/miniprogram/pages/shebeiguanli-map/jixiedingwei.js +++ /dev/null @@ -1,66 +0,0 @@ -// pages/shebeiguanli-map/jixiedingwei.js -Page({ - - /** - * 页面的初始数据 - */ - data: { - - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow() { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - - } -}) \ No newline at end of file diff --git a/miniprogram/pages/shebeiguanli-map/jixiedingwei.wxml b/miniprogram/pages/shebeiguanli-map/jixiedingwei.wxml deleted file mode 100644 index c2c0ac4..0000000 --- a/miniprogram/pages/shebeiguanli-map/jixiedingwei.wxml +++ /dev/null @@ -1,2 +0,0 @@ - -pages/shebeiguanli-map/jixiedingwei.wxml diff --git a/miniprogram/pages/shebieguanli-jxsb/shajiangguan.js b/miniprogram/pages/shebieguanli-jxsb/shajiangguan.js deleted file mode 100644 index 0a4a377..0000000 --- a/miniprogram/pages/shebieguanli-jxsb/shajiangguan.js +++ /dev/null @@ -1,66 +0,0 @@ -// pages/shebieguanli-jxsb/shajiangguan.js -Page({ - - /** - * 页面的初始数据 - */ - data: { - - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow() { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - - } -}) \ No newline at end of file diff --git a/miniprogram/pages/shebieguanli-jxsb/shajiangguan.wxml b/miniprogram/pages/shebieguanli-jxsb/shajiangguan.wxml deleted file mode 100644 index 2ca020e..0000000 --- a/miniprogram/pages/shebieguanli-jxsb/shajiangguan.wxml +++ /dev/null @@ -1,2 +0,0 @@ - -pages/shebieguanli-jxsb/shajiangguan.wxml diff --git a/miniprogram/pages/shebieguanli-tzsb/taji.js b/miniprogram/pages/shebieguanli-tzsb/taji.js deleted file mode 100644 index c53c3a2..0000000 --- a/miniprogram/pages/shebieguanli-tzsb/taji.js +++ /dev/null @@ -1,66 +0,0 @@ -// pages/shebieguanli-tzsb/taji.js -Page({ - - /** - * 页面的初始数据 - */ - data: { - - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow() { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - - } -}) \ No newline at end of file diff --git a/miniprogram/pages/shebieguanli-tzsb/taji.wxml b/miniprogram/pages/shebieguanli-tzsb/taji.wxml deleted file mode 100644 index 1311190..0000000 --- a/miniprogram/pages/shebieguanli-tzsb/taji.wxml +++ /dev/null @@ -1,2 +0,0 @@ - -pages/shebieguanli-tzsb/taji.wxml diff --git a/miniprogram/pages/xiangmugaikuang/xiangmugaikuang.js b/miniprogram/pages/xiangmugaikuang/xiangmugaikuang.js index 68715e4..309eb50 100644 --- a/miniprogram/pages/xiangmugaikuang/xiangmugaikuang.js +++ b/miniprogram/pages/xiangmugaikuang/xiangmugaikuang.js @@ -4,103 +4,107 @@ const app = getApp(); //加载视频监控饼图 - let datas_1 = []; - let formatNumber_1 = function(num) { - let reg = /(?=(\B)(\d{3})+$)/g; - return num.toString().replace(reg, ','); +let datas_1 = []; +let formatNumber_1 = function (num) { + let reg = /(?=(\B)(\d{3})+$)/g; + return num.toString().replace(reg, ','); +} + +function arrayobj_1(array, key) { + var resObj = {} + for (var i = 0; i < array.length; i++) { + resObj[array[i][key]] = array[i] } - function arrayobj_1 (array, key) { - var resObj = {} - for (var i = 0; i < array.length; i++) { - resObj[array[i][key]] = array[i] - } - return resObj - } - function initChart_1(chart_1,datas_1) { - //定义参数 - let objData_1 = arrayobj_1(datas_1, 'name'); - let total_1 = datas_1.reduce((a, b) => { - return a + b.value * 1 + return resObj +} + +function initChart_1(chart_1, datas_1) { + //定义参数 + let objData_1 = arrayobj_1(datas_1, 'name'); + let total_1 = datas_1.reduce((a, b) => { + return a + b.value * 1 }, 0); - let title_1 = '接入数'; - var option_1 = { - color: ["#ffac50", "#ed6942", "#9e40ec", "#1f8efa", "#06c985"], - title: [{ - text: '{val|' + formatNumber_1(total_1) + '} \n {name|' + title_1 + '} ', - top: '31%', - left: '20%', - textStyle: { - rich: { - name: { - fontSize: 14, - fontWeight: 'normal', - color: '#fff', - padding: [10, 0] - }, - val: { - fontSize:25, - fontWeight: 'bold', - color: '#0ad7ec', - padding: [0, 10] - } - } - } - }], - tooltip: { - trigger: 'item', - }, - legend: { - orient: 'vertical', - top: "center", - right: "5%", - icon: 'circle', - data: ['一工区'], - textStyle: { - color: "#fff", - fontSize: 10 + let title_1 = '接入数'; + var option_1 = { + color: ["#ffac50", "#ed6942", "#9e40ec", "#1f8efa", "#06c985"], + title: [{ + text: '{val|' + formatNumber_1(total_1) + '} \n {name|' + title_1 + '} ', + top: '31%', + left: '20%', + textStyle: { + rich: { + name: { + fontSize: 14, + fontWeight: 'normal', + color: '#fff', + padding: [10, 0] }, - formatter(name) { - return `${name} ${objData_1[name].value}` + val: { + fontSize: 25, + fontWeight: 'bold', + color: '#0ad7ec', + padding: [0, 10] } + } + } + }], + tooltip: { + trigger: 'item', + }, + legend: { + orient: 'vertical', + top: "center", + right: "5%", + icon: 'circle', + data: ['一工区'], + textStyle: { + color: "#fff", + fontSize: 10 }, - series: [{ - type: 'pie', - radius: ['65%', '90%'], - center: ['30%', '50%'], - avoidLabelOverlap: false, - label: { - show: false, - position: 'center' - }, - emphasis: { - label: { - show: true, - fontSize: '14' - } - }, - labelLine: { - show: false - }, - hoverAnimation: false, - data: datas_1 - }] - }; - chart_1.setOption(option_1); - } - + formatter(name) { + return `${name} ${objData_1[name].value}` + } + }, + series: [{ + type: 'pie', + radius: ['65%', '90%'], + center: ['30%', '50%'], + avoidLabelOverlap: false, + label: { + show: false, + position: 'center' + }, + emphasis: { + label: { + show: true, + fontSize: '14' + } + }, + labelLine: { + show: false + }, + hoverAnimation: false, + data: datas_1 + }] + }; + chart_1.setOption(option_1); +} + //机械设备饼图 - let formatNumber_2 = function(num) { - let reg = /(?=(\B)(\d{3})+$)/g; - return num.toString().replace(reg, ','); +let formatNumber_2 = function (num) { + let reg = /(?=(\B)(\d{3})+$)/g; + return num.toString().replace(reg, ','); +} + +function arrayobj_2(Array, key) { + var resObj = {} + for (var i = 0; i < Array.length; i++) { + resObj[Array[i][key]] = Array[i] } - function arrayobj_2 (Array, key) { - var resObj = {} - for (var i = 0; i < Array.length; i++) { - resObj[Array[i][key]] = Array[i] - } - return resObj - } -function initChart_2(chart_2,datas_2,datas_name) { + return resObj +} + +function initChart_2(chart_2, datas_2, datas_name) { //定义参数 let objData_2 = arrayobj_2(datas_2, 'name'); let total_2 = datas_2.reduce((a, b) => { @@ -115,60 +119,60 @@ function initChart_2(chart_2,datas_2,datas_name) { top: '31%', left: '20%', textStyle: { - rich: { - name: { - fontSize: 14, - fontWeight: 'normal', - color: '#fff', - padding: [10, 0] - }, - val: { - fontSize:25, - fontWeight: 'bold', - color: '#0ad7ec', - padding: [0, 10] - } + rich: { + name: { + fontSize: 14, + fontWeight: 'normal', + color: '#fff', + padding: [10, 0] + }, + val: { + fontSize: 25, + fontWeight: 'bold', + color: '#0ad7ec', + padding: [0, 10] } + } } - }], + }], tooltip: { trigger: 'item', }, legend: { - orient: 'vertical', - top: "center", - right: "5%", - icon: 'circle', - data: datas_name, - textStyle: { - color: "#fff", - fontSize: 10 - }, - formatter(name) { - return `${name} ${objData_2[name].value}` - } + orient: 'vertical', + top: "center", + right: "5%", + icon: 'circle', + data: datas_name, + textStyle: { + color: "#fff", + fontSize: 10 + }, + formatter(name) { + return `${name} ${objData_2[name].value}` + } }, series: [{ - type: 'pie', - radius: ['65%', '90%'], - center: ['30%', '50%'], - avoidLabelOverlap: false, - label: { - show: false, - position: 'center' - }, - emphasis: { - label: { - show: true, - fontSize: '14' - } - }, - labelLine: { - show: false - }, - hoverAnimation: false, - data: datas_2 - }] + type: 'pie', + radius: ['65%', '90%'], + center: ['30%', '50%'], + avoidLabelOverlap: false, + label: { + show: false, + position: 'center' + }, + emphasis: { + label: { + show: true, + fontSize: '14' + } + }, + labelLine: { + show: false + }, + hoverAnimation: false, + data: datas_2 + }] }; chart_2.setOption(option_2); } @@ -178,75 +182,73 @@ function initChart_3(chart_3, xData_3, yData_3) { var option_3 = { color: ['#5a8df6'], tooltip: { - trigger: 'axis' + trigger: 'axis' }, grid: { - top: '22%', - left: '3%', - right: '1%', - bottom: '0%', - containLabel: true + top: '22%', + left: '3%', + right: '1%', + bottom: '0%', + containLabel: true }, xAxis: [{ - type : 'category', - boundaryGap : false, - data : xData_3, - axisTick: { - show: false - }, - axisLine: { - lineStyle: { - color: 'rgba(39,51,75,0.8)' - } - }, - axisLabel: { - color: '#8aa3ec', - rotate: 45, - textStyle: { - fontSize: 10 - }, + type: 'category', + boundaryGap: false, + data: xData_3, + axisTick: { + show: false + }, + axisLine: { + lineStyle: { + color: 'rgba(39,51,75,0.8)' + } + }, + axisLabel: { + color: '#8aa3ec', + rotate: 45, + textStyle: { + fontSize: 10 }, + }, }], yAxis: { - type : 'value', - name:"单位:个", - nameTextStyle: { - color: "#008fe9", - fontSize: 11 - }, - axisLabel: { - show: true, - textStyle: { - color: "#008fe9", - fontSize: 10 - } - }, - splitLine: { - show: true, - lineStyle: { - color: 'rgba(39,51,75,0.5)' - } - }, - axisLine: { - show: true, - lineStyle: { - color: 'rgba(39,51,75,0.8)' - } - }, - }, - series: [ - { - type: 'line', - data: yData_3, - symbol: 'circle', - smooth: true, - lineStyle: { - color: '#5a8df6', - width: 2 - }, + type: 'value', + name: "单位:个", + nameTextStyle: { + color: "#008fe9", + fontSize: 11 + }, + axisLabel: { + show: true, + textStyle: { + color: "#008fe9", + fontSize: 10 } - ] + }, + splitLine: { + show: true, + lineStyle: { + color: 'rgba(39,51,75,0.5)' + } + }, + axisLine: { + show: true, + lineStyle: { + color: 'rgba(39,51,75,0.8)' + } + }, + }, + series: [{ + type: 'line', + data: yData_3, + symbol: 'circle', + smooth: true, + lineStyle: { + color: '#5a8df6', + width: 2 + }, + }] } chart_3.setOption(option_3); return chart_3; @@ -258,9 +260,9 @@ Page({ * 页面的初始数据 */ data: { - active:0, + active: 0, show: false, - activeNames: ["1"], + activeNames: ["1"], ec_1: { lazyLoad: true //动态加载 }, @@ -272,54 +274,59 @@ Page({ }, //参数—————————————————————————————————————— //组织架构id - deptId:'', + deptId: '', //项目的id - projectId:'', + projectId: '', //项目名称参数 - projectNameArgs:'', + projectNameArgs: '', //项目信息 - projectInfo:{}, - projectUnitsList:[], + projectInfo: {}, + projectUnitsList: [], //视频接入数 - videoNum:'', + videoNum: '', //正常视频数 - videoOnline:'', + videoOnline: '', //机械接入数 - machineryNum:'', + machineryNum: '', //正常机械运行数 - machineryOnline:'', - monthEarlyNum:'0', - yangchenCount:'0', - weather:'', - weatherPic:'', - temperature:'', + machineryOnline: '', + monthEarlyNum: '0', + yangchenCount: '0', + weather: '', + weatherPic: '', + temperature: '', //加载模板参数 - loadShow:false, - initData:{}, - todoDb:0, - approveDb:0, + loadShow: false, + initData: {}, + todoDb: 0, + approveDb: 0, + aq:0, }, //项目切换 返回值 - onProjectSelect(e){ + onProjectSelect(e) { this.onClickShow(); let projectId = e.detail.id; let projectName = e.detail.text; app.globalData.projectId = projectId; - app.globalData.projectName = projectName; + app.globalData.projectName = projectName; this.setData({ - projectId:projectId, - projectName:projectName + projectId: projectId, + projectName: projectName }) this.onLoad(); }, showPopup() { - this.setData({ show: true }); + this.setData({ + show: true + }); }, onClosePopup() { - this.setData({ show: false }); + this.setData({ + show: false + }); }, // 手风琴 @@ -328,12 +335,12 @@ Page({ activeName: event.detail, }); }, - onOpen(event){}, - onClose(event){}, + onOpen(event) {}, + onClose(event) {}, //初始化视频监控饼图数据 init_one: function (datas_1) { - this.oneComponent.init((canvas, width, height,dpr) => { + this.oneComponent.init((canvas, width, height, dpr) => { const chart = echarts.init(canvas, null, { width: width, height: height, @@ -346,39 +353,43 @@ Page({ }, //初始化机械设备饼图数据 - init_two: function (datas_2,datas_name) { - this.twoComponent.init((canvas, width, height,dpr) => { + init_two: function (datas_2, datas_name) { + this.twoComponent.init((canvas, width, height, dpr) => { const chart = echarts.init(canvas, null, { width: width, height: height, devicePixelRatio: dpr //解决小程序视图模糊的问题,必写 }); - initChart_2(chart, datas_2,datas_name); + initChart_2(chart, datas_2, datas_name); this.chart = chart; return chart; }); }, - + //初始化劳务管理 - init_three: function (xData_1,yData_1) { - this.threeComponent.init((canvas, width, height,dpr) => { + init_three: function (xData_1, yData_1) { + this.threeComponent.init((canvas, width, height, dpr) => { const chart = echarts.init(canvas, null, { width: width, height: height, devicePixelRatio: dpr //解决小程序视图模糊的问题,必写 }); - initChart_3(chart, xData_1,yData_1); + initChart_3(chart, xData_1, yData_1); this.chart = chart; return chart; }); }, onClickShow() { - this.setData({ loadShow: false }); + this.setData({ + loadShow: false + }); }, onClickHide() { - this.setData({ loadShow: false }); + this.setData({ + loadShow: false + }); }, /** @@ -390,315 +401,330 @@ Page({ activeName: ["1"], }); var that = this; - //获取缓存数据 - wx.getStorage({ - key: 'userinfo', - success:function(res){ - that.setData({ - loginName:res.data.loginName, - nickName:res.data.nickName, - deptName:res.data.deptName, - roleName:res.data.roleName.split(',')[0], - projectId:app.globalData.projectId, - projectNameArgs:app.globalData.projectName, - initData:{text:app.globalData.projectName,id:app.globalData.projectId} - }) - that.awaitTask(res.data.minRoleId,res.data.deptId,res.data.loginName,res.data.userId); - } - }) - //根据id获取组件 - this.oneComponent = this.selectComponent('#mychart-one'); - this.twoComponent = this.selectComponent('#mychart-two'); - this.threeComponent = this.selectComponent('#mychart-three'); - this.fourComponent = this.selectComponent('#mychart-four'); - //项目基本信息 - this.getProjectBaseInfo(app.globalData.projectId); - //项目管理信息 - this.getProjectUnitList(app.globalData.projectId); - //视频数量 - //this.getProjectVideoAll(app.globalData.projectId); - //机械的数据 - //this.getMachineryNum(app.globalData.projectId); - //机械列表 - //this.getMachineryList(app.globalData.projectId); - //视频的数据 - //this.getVideoList(app.globalData.projectId); + //获取缓存数据 + wx.getStorage({ + key: 'userinfo', + success: function (res) { + that.setData({ + loginName: res.data.loginName, + nickName: res.data.nickName, + deptName: res.data.deptName, + roleName: res.data.roleName.split(',')[0], + projectId: app.globalData.projectId, + projectNameArgs: app.globalData.projectName, + initData: { + text: app.globalData.projectName, + id: app.globalData.projectId + } + }) + that.awaitTask(res.data.minRoleId, res.data.deptId, res.data.loginName, res.data.userId); + } + }) + //根据id获取组件 + this.oneComponent = this.selectComponent('#mychart-one'); + this.twoComponent = this.selectComponent('#mychart-two'); + this.threeComponent = this.selectComponent('#mychart-three'); + this.fourComponent = this.selectComponent('#mychart-four'); + //项目基本信息 + this.getProjectBaseInfo(app.globalData.projectId); + //项目管理信息 + this.getProjectUnitList(app.globalData.projectId); + //视频数量 + //this.getProjectVideoAll(app.globalData.projectId); + //机械的数据 + //this.getMachineryNum(app.globalData.projectId); + //机械列表 + //this.getMachineryList(app.globalData.projectId); + //视频的数据 + //this.getVideoList(app.globalData.projectId); }, - // 底部导航 - onChange(event) { + // 底部导航 + onChange(event) { // event.detail 的值为当前选中项的索引 - this.setData({ active: event.detail }); + this.setData({ + active: event.detail + }); }, //获取项目的基本数据 - getProjectBaseInfo:function(even) { + getProjectBaseInfo: function (even) { wx.request({ - url: app.globalData.reqUrl+'/wechat/project/getProjectFoundation', - method:'GET', - data:{ - id:even + url: app.globalData.reqUrl + '/wechat/project/getProjectFoundation', + method: 'GET', + data: { + id: even }, - success:resData=> { - this.onClickHide() - this.setData({ - projectInfo:resData.data - }) - //环境监测 - //this.selectEnvirData(even); - //加载天气信息 - //this.getWeatherData(resData.data.longitude,resData.data.latitude) + success: resData => { + this.onClickHide() + if (resData.data.planStartTime) { + resData.data.planStartTime = resData.data.planStartTime.split("T")[0]; + } + if (resData.data.actualStartTime) { + resData.data.actualStartTime = resData.data.actualStartTime.split("T")[0]; + } + if (resData.data.planCompletedTime) { + resData.data.planCompletedTime = resData.data.planCompletedTime.split("T")[0]; + } + this.setData({ + projectInfo: resData.data + }) + //环境监测 + //this.selectEnvirData(even); + //加载天气信息 + //this.getWeatherData(resData.data.longitude,resData.data.latitude) } }) }, //加载天气数据 - getWeatherData:function(even1,even2){ - var that = this; - wx.request({ - url: app.globalData.reqUrl+'/weixin/applets/selectWeather', - method:"GET", - data:{ - lng:even1, - lat:even2, - }, - success:function(weatherRes){ - that.setData({ - weather:weatherRes.data.weather, - weatherPic:weatherRes.data.weatherPic, - temperature:weatherRes.data.temperature - }) - } + getWeatherData: function (even1, even2) { + var that = this; + wx.request({ + url: app.globalData.reqUrl + '/weixin/applets/selectWeather', + method: "GET", + data: { + lng: even1, + lat: even2, + }, + success: function (weatherRes) { + that.setData({ + weather: weatherRes.data.weather, + weatherPic: weatherRes.data.weatherPic, + temperature: weatherRes.data.temperature }) - } , + } + }) + }, //获取项目的管理信息 - getProjectUnitList:function(projectId) { - var that = this; - wx.request({ - url: app.globalData.reqUrl+'/wechat/project/getProjectUnitList', - method:'GET', - data:{ - projectId:projectId - }, - success:resData=> { - that.onClickHide() - that.setData ({ - projectUnitsList:resData.data - }) - } - }) + getProjectUnitList: function (projectId) { + var that = this; + wx.request({ + url: app.globalData.reqUrl + '/wechat/project/getProjectUnitList', + method: 'GET', + data: { + projectId: projectId + }, + success: resData => { + that.onClickHide() + that.setData({ + projectUnitsList: resData.data + }) + } + }) }, // 获取项目下的视频数 - getProjectVideoAll:function(even) { + getProjectVideoAll: function (even) { wx.request({ - url: app.globalData.reqUrl+'/weixin/video/getProjectVideoNum', + url: app.globalData.reqUrl + '/weixin/video/getProjectVideoNum', method: 'get', data: { - projectName:even + projectName: even }, success: resData => { - this.setData({ - videoNum:resData.data.videoAll, - videoOnline:resData.data.videoOnline - }) + this.setData({ + videoNum: resData.data.videoAll, + videoOnline: resData.data.videoOnline + }) } }) }, // 获取机械的数据 - getMachineryNum:function(event) { - wx.request({ - url: app.globalData.reqUrl+'/mkl/machinery/getMachineryDataWest', - data:{ - "projectId":event - }, - method:'get', - success:resData=> { - this.setData({ - machineryNum:resData.data.allNum, - machineryOnline:resData.data.onlineNum - }) - } - }) + getMachineryNum: function (event) { + wx.request({ + url: app.globalData.reqUrl + '/mkl/machinery/getMachineryDataWest', + data: { + "projectId": event + }, + method: 'get', + success: resData => { + this.setData({ + machineryNum: resData.data.allNum, + machineryOnline: resData.data.onlineNum + }) + } + }) }, //机械的列表,名称 - getMachineryList:function(event) { + getMachineryList: function (event) { var that = this; - wx.request({ - url: app.globalData.reqUrl+'/mkl/machinery/getMachineryListWest', - data:{ - "projectId":event - }, - method:'GET', - success:resData=> { - if(resData.data==''){ - that.init_two( [{"value":"0","name":""}]); - }else{ - that.init_two(resData.data); - } + wx.request({ + url: app.globalData.reqUrl + '/mkl/machinery/getMachineryListWest', + data: { + "projectId": event + }, + method: 'GET', + success: resData => { + if (resData.data == '') { + that.init_two([{ + "value": "0", + "name": "" + }]); + } else { + that.init_two(resData.data); } - }) + } + }) }, //获取视频的列表,名称 - getVideoList:function(even) { + getVideoList: function (even) { var that = this; wx.request({ - url: app.globalData.reqUrl+'/weixin/video/getProjectVideoListEc', - method:'GET', - data:{ - projectName:even + url: app.globalData.reqUrl + '/weixin/video/getProjectVideoListEc', + method: 'GET', + data: { + projectName: even }, - success:resData=> { + success: resData => { that.onClickHide(); - if(resData.data.length>0){ + if (resData.data.length > 0) { that.init_one(resData.data); - } + } } }) }, //查询劳务人员出勤数据 - selectEnvirData:function(even){ - var that = this; - wx.request({ - url: app.globalData.reqUrl+'/weixin/userinfo/selectAttendanceNum', - method:"GET", - data:{ - projectId:even, - }, - success:function(hjyj){ - that.setData({ - monthEarlyNum:hjyj.data.userCount, - yangchenCount:hjyj.data.userCount - }) - } - }) + selectEnvirData: function (even) { + var that = this; + wx.request({ + url: app.globalData.reqUrl + '/weixin/userinfo/selectAttendanceNum', + method: "GET", + data: { + projectId: even, + }, + success: function (hjyj) { + that.setData({ + monthEarlyNum: hjyj.data.userCount, + yangchenCount: hjyj.data.userCount + }) + } + }) - //查询出最近一周劳务人员考勤人数 - wx.request({ - url: app.globalData.reqUrl+'/weixin/userinfo/selectLabourDayByProjectId', - method:"GET", - data:{ - projectId:even - }, - success:function(sspm){ - var createTime = []; - var userCount = []; - for(var i=0;i 安全管理 + {{aq}}