diff --git a/miniprogram/app.json b/miniprogram/app.json index f2a2428..4302484 100644 --- a/miniprogram/app.json +++ b/miniprogram/app.json @@ -14,14 +14,10 @@ "pages/Information-review/index", "pages/newAddPage/safetyManagement/index", "pages/learn-page/index", - "pages/Personnel-information-binding/index", "pages/winter-training/index", - "pages/saft-qr-view/index", "pages/saft-education-user-bind/index", "pages/temporaryToExamine/index", "pages/tempRegistration/index", - "pages/newAddPage/safetyBriefingLearning/index", - "pages/newAddPage2/safetyBriefingLearning/index", "pages/Highlight-photos/index", "pages/newAddPage/letterCommitment/index", "pages/newAddPage2/letterCommitment/index", @@ -59,7 +55,6 @@ "suishoupai/suishoupai", "suishoupai-psh/suishoupai-psh", "lw-index/lw-index", - "lw-baobiaochaxun/lw-baobiaochaxun", "lw-gerenxinxi/lw-gerenxinxi", "lw-jibenxinxi/lw-jibenxinxi", "safetyManagement/securityCheckGR/index", @@ -69,7 +64,6 @@ "safetyManagement/securityCheckRectified/index", "safetyManagement/addSafetyInspect/index", "Security-control-echarts/index", - "dangerousProject/index", "samplingRetesting/index", "samplingRetestingDeliver/index", "samplingRetestingUpload/index", diff --git a/miniprogram/pageage/dangerousProject/index.js b/miniprogram/pageage/dangerousProject/index.js index a22cd19..e8fab3c 100644 --- a/miniprogram/pageage/dangerousProject/index.js +++ b/miniprogram/pageage/dangerousProject/index.js @@ -1,267 +1,66 @@ -// pages/dangerousProject/index.js -const app = getApp() +// pageage/dangerousProject/index.js Page({ - /** - * 页面的初始数据 - */ - data: { - stateNav:1, - timeline:[], - dangerNameList:[], - show: false, - loadShow:false, - loginName:'', - userName:'', - deptId:'', - projectName:'', - projectId:'', - allPoint:0, - outPoint:0, - comPoint:0, - fileList: [], - id:'', + /** + * 页面的初始数据 + */ + data: { - initData:{} - }, + }, - //项目切换 返回值 - onProjectSelect(e){ - this.onClickShow(); - let projectId = e.detail.id; - let projectName = e.detail.text; - app.globalData.projectId = projectId; - app.globalData.projectName = projectName; - this.setData({ - projectId:projectId, - projectName:projectName, - dangerNameList:[], - dangerName:'', - timeline:[], - allPoint:0, - outPoint:0, - comPoint:0 - }) - this.onLoad(); - }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { - onImagesArr(e){ - // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式 - wx.uploadFile({ - //图片上传地址 - url: app.globalData.reqUrl+'/weixin/security/fileUpload', - filePath: e.detail[0], - name: 'file', - header: { - "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8" - }, - formData: { user: 'test' }, - success:res => { - // 上传完成需要更新 fileList - let data = JSON.parse(res.data); - let fileList = this.data.fileList - fileList.push({url: data.url}); - this.setData({ fileList:fileList}); - this.updateDanger(res.data,e.currentTarget.dataset.id) - }, - }); - }, - - showPopup() { - this.setData({ show: true }); - - }, + }, - onClose() { - this.setData({ show: false }); - }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { - onClickShow() { - this.setData({ loadShow: true }); - }, + }, - onClickHide() { - this.setData({ loadShow: false }); - }, + /** + * 生命周期函数--监听页面显示 + */ + onShow() { - onSelectDangerName(e){ - this.getProjectDanger(e.detail.id); - }, + }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - var that = this; - //加载蒙版 - that.onClickShow(); - //获取缓存数据 - wx.getStorage({ - key: 'userinfo', - success:function(res){ - that.setData({ - loginName:res.data.loginName, - userName:res.data.userName, - deptId:res.data.deptId, - projectName: app.globalData.projectName, - projectId:app.globalData.projectId, - initData:{text:app.globalData.projectName,id:app.globalData.projectId} - }) - that.getProjectDangerPlan(); - } - }) - }, + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { - /** - * 危大工程计划 - */ - getProjectDangerPlan(){ - var that = this; - wx.request({ - url: app.globalData.reqUrl+'/weixin/security/getProjectDangerPlan', - method: 'get', - data: { - deptId:this.data.deptId, - projectId:this.data.projectId - }, - success: resData => { - this.onClickHide(); - if(resData.data.code == 200){ - let array = []; - for(let i = 0;i { - this.onClickHide(); - if(resData.data.code == 200){ - let timeline = resData.data.data.dangerList; - var flag = false; - timeline.map(x => { - if(x.fileUrl.length > 0){ - x.type = 0; - }else{ - if(!flag){ - x.type = 1 - flag = true; - }else{ - x.type = 2; - } - } - let fileUrl = x.fileUrl; - for(let i = 0;i - - - - - - - - - - - - - - - - {{allPoint}} - - - 总节点 - - - - {{comPoint}} - - - 已提交 - - - - {{outPoint}} - - - 已逾期 - - - - - - - - - - - - - {{item.title}} - - - 预计提交时间: - {{item.planTime}} - - - 实际提交时间: - {{item.actualTima}} - - - 逾期状态: - - 正常完成 - 逾期{{item.expectDays}}天 - - - - 提交文件: - - - - - - - - - - - - - - 数据加载中!请稍后... - - - + +pageage/dangerousProject/index.wxml diff --git a/miniprogram/pageage/dangerousProject/index.wxss b/miniprogram/pageage/dangerousProject/index.wxss deleted file mode 100644 index 7e1e045..0000000 --- a/miniprogram/pageage/dangerousProject/index.wxss +++ /dev/null @@ -1,5 +0,0 @@ -/* pages/dangerousProject/index.wxss */ -.van-uploader__preview-image{ - width: 140rpx !important; - height: 140rpx !important; - } \ No newline at end of file diff --git a/miniprogram/pageage/lw-baobiaochaxun/lw-baobiaochaxun.js b/miniprogram/pageage/lw-baobiaochaxun/lw-baobiaochaxun.js deleted file mode 100644 index e47fa28..0000000 --- a/miniprogram/pageage/lw-baobiaochaxun/lw-baobiaochaxun.js +++ /dev/null @@ -1,149 +0,0 @@ -// pages/lw-baobiaochaxun/lw-baobiaochaxun.js -const app = getApp() -Page({ - - /** - * 页面的初始数据 - */ - data: { - projectName:'', - date: '', - today:'', - show: false, - minDate: new Date(2020, 0, 1).getTime(), - maxDate: new Date().getTime(), - tableList:[], - tableListNew:[], - loadShow:false, - pageNum:1, - //静态变量 - type:false, - }, - - onClickShow() { - this.setData({ loadShow: true }); - }, - - onClickHide() { - this.setData({ loadShow: false }); - }, - - onDisplay() { - this.setData({ show: true }); - }, - onClose() { - this.setData({ show: false }); - }, - formatDate(date) { - date = new Date(date); - var dateYaer = date.getFullYear(); - var dateMonth = date.getMonth() + 1; - var dateDay = date.getDate(); - if(dateMonth < 10 ){ - dateMonth = '0' + dateMonth; - } - if(dateDay < 10 ){ - dateDay = '0' + dateDay; - } - return dateYaer+'-'+dateMonth+ '-'+dateDay; - }, - - onConfirm(event) { - this.onClickShow(); - this.setData({ - show: false, - date: this.formatDate(event.detail), - tableListNew:[], - pageNum:1 - }); - this.selectClockPunch(app.globalData.projectId,this.formatDate(event.detail),1,20); - }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - this.onClickShow(); - var date = new Date(); - var dateYaer = date.getFullYear(); - var dateMonth = date.getMonth() + 1; - var dateDay = date.getDate(); - if(dateMonth < 10 ){ - dateMonth = '0' + dateMonth; - } - if(dateDay < 10 ){ - dateDay = '0' + dateDay; - } - this.setData({ - date: dateYaer+'-'+dateMonth+ '-'+dateDay, - }); - this.setData({ - today:dateYaer+'-'+dateMonth+ '-'+dateDay, - projectName:app.globalData.projectName, - tableListNew:[] - }) - this.selectClockPunch(app.globalData.projectId,dateYaer+'-'+dateMonth+ '-'+dateDay,1,20); - }, - - -  /** -   * 页面上拉触底事件的处理函数 -   */ -  onReachBottom: function () { - //判断数组是否存在值 - if(this.data.type){ - this.setData({pageNum:this.data.pageNum+1}); - this.selectClockPunch(app.globalData.projectId,this.data.date,this.data.pageNum,20); - } - -  }, - - /** - * 获取项目打卡数据 - * @param {*} projectId 项目id - * @param {*} date 日期 - * @param {*} pageNum 页数(1开始) - * @param {*} size 每页条数 - */ - selectClockPunch:function(projectId,date,pageNum,size){ - var that = this; - wx.request({ - url: app.globalData.reqUrl+'/weixin/labour/selectClockPunch', - data:{ - "projectId":projectId, - "date":date, - "pageNum":pageNum, - "size":size - }, - method:"GET", - success:function(res) { - that.onClickHide(); - if(res.data.code == '200'){ - //赋值 - var tableListNew =that.data.tableListNew; - for(var i = 0;i - - - - - - - - - 报表查询 - - - - - - - - - {{ date }} - - - - - - - - - - 项目名称:{{projectName}} - - - - 考勤列表 - - - - - 姓名 - - - 参建单位 - - - 首次打卡 - - - 末次打卡 - - - - - - - - - {{item.name}} - - - {{item.enterprise_name}} - - - {{item.scdk}} - - - {{item.mcdk}} - - - - - - - - - - - - - - - - - 数据加载中!请稍后... - - \ No newline at end of file diff --git a/miniprogram/pageage/lw-baobiaochaxun/lw-baobiaochaxun.wxss b/miniprogram/pageage/lw-baobiaochaxun/lw-baobiaochaxun.wxss deleted file mode 100644 index 1528d1b..0000000 --- a/miniprogram/pageage/lw-baobiaochaxun/lw-baobiaochaxun.wxss +++ /dev/null @@ -1,77 +0,0 @@ -/* pages/lw-baobiaochaxun/lw-baobiaochaxun.wxss */ -.lw_max{ - padding: 20rpx 30rpx; -} -.lw_min{ - padding: 20rpx 30rpx; - background: #2b345b; - border-radius: 15rpx; - font-size: 30rpx; -} -.lw_img_right{ - float: right; - width: 40rpx; - height: 40rpx; -} -.lw_gdgq{ - padding: 30rpx; - font-size: 28rpx; -} -.lw_gdgq text{ - padding: 0 20rpx; - color: #89a4eb; -} -.eharts_title{ - height: 40rpx; - line-height: 40rpx; - padding: 40rpx; - font-size: 28rpx; - background: url("http://fileimg.makalu.cc/CORE_52887EE6A33042408E11C2174974ABA1.png") no-repeat left/35rpx; -} -.lw_table_th{ - background: #222a41; - text-align: center; - padding: 20rpx 0; - font-size:24rpx; -} -.lw_table_tr{ - padding: 10rpx 0; -} -.lw_table_td{ - text-align: center; - padding: 20rpx 0; - font-size: 24rpx; - color: #8ba2ee; -} -.lw_table_td view{ - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - padding: 0 5rpx; -} -.van-calendar{ - background-color: #232a44 !important; -} -.van-calendar__month-mark{ - color:rgba(255,255,255,0.2) !important; -} -.van-popup{ - background: none !important; -} - -.van-calendar__day--disabled{ - color:rgba(255,255,255,0.4) !important; -} -.van-calendar__header-subtitle{ - display: none; -} -.van-button--block.van-button--round{ - width: 100%; -} - - - - - - - diff --git a/miniprogram/pageage/project_checking/add/index.js b/miniprogram/pageage/project_checking/add/index.js index c7bc98f..183a28c 100644 --- a/miniprogram/pageage/project_checking/add/index.js +++ b/miniprogram/pageage/project_checking/add/index.js @@ -1,5 +1,4 @@ // pageage/safetyManagement/addSafetyInspect/index.js -import api from '../../../utils/api' const app = getApp() Page({ @@ -26,7 +25,8 @@ Page({ superviseUser:"", superviseUserName:"", checkWorkingPosition:"", - intro:"" + intro:"", + list:[{id:1,text:"合格"},{id:2,text:"不合格"}] }, /** @@ -76,12 +76,11 @@ Page({ }, //切换验收结果 - onStateSelect(e){ - let state = e.currentTarget.dataset.set; + onSelectType(e){ this.setData({ - checkingResult:state, - }); - }, + checkingResult:e.detail.id + }) + }, //工序部位 onInputCheckWorkingPositionValue(e){ diff --git a/miniprogram/pageage/project_checking/add/index.wxml b/miniprogram/pageage/project_checking/add/index.wxml index 7c11e8b..2d32b2a 100644 --- a/miniprogram/pageage/project_checking/add/index.wxml +++ b/miniprogram/pageage/project_checking/add/index.wxml @@ -44,9 +44,8 @@ 验收结果 - - 验收合格 - 验收不合格 + + diff --git a/miniprogram/pageage/project_checking/add/index.wxss b/miniprogram/pageage/project_checking/add/index.wxss index 38bd48d..ed3bf8c 100644 --- a/miniprogram/pageage/project_checking/add/index.wxss +++ b/miniprogram/pageage/project_checking/add/index.wxss @@ -5,3 +5,9 @@ .van-image__img{ border-radius: 10rpx !important; } +.radio_custom_class{ + padding: 10rpx 100rpx 10rpx 0; +} +.radio_label_class{ + color: #ffffff !important; +} diff --git a/miniprogram/pageage/project_checking/info/index.js b/miniprogram/pageage/project_checking/info/index.js index 341e5c6..93ae250 100644 --- a/miniprogram/pageage/project_checking/info/index.js +++ b/miniprogram/pageage/project_checking/info/index.js @@ -8,12 +8,12 @@ Page({ data: { id:"", infoData:{}, - imgs:[], + imageList:[], + minImageList:[], loadShow:false, - imgShow:false, - preImgUrl:"", loginName:"", showDel:false, + request:app.globalData.reqUrl }, /** @@ -51,13 +51,16 @@ Page({ success(res){ res = res.data if(res.code == 200){ - let urls = []; + let urls = []; + let minUrls = []; res.data.imageUrls.split(',').forEach(element => { - urls.push(element+'.min.jpg'); + urls.push(that.data.request+element); + minUrls.push(that.data.request+element+'.min.jpg'); }); that.setData({ infoData:res.data, - imgs:urls, + imageList:urls, + minImageList:minUrls, loadShow:false }) //判断当前能否删除 @@ -71,20 +74,6 @@ Page({ }) }, - //打开放大的图片 - enlargeImage(e){ - this.setData({ - preImgUrl:e.currentTarget.dataset.url, - imgShow:true - }) - }, - //关闭放大的图片 - closeImages(){ - this.setData({ - imgShow:false - }) - }, - onDelete(){ //弹出确认 let that = this @@ -104,7 +93,7 @@ Page({ deleteData(){ let {id} = this.data wx.request({ - url: app.globalData.reqUrl+'/wechat/projectProblemmodify/removeSafety', + url: app.globalData.reqUrl+'/wechat/projectProblemmodify/remove', data:{ id:id }, @@ -117,7 +106,16 @@ Page({ } }) }, - + + //展示图片 + showImg:function(e){ + var that=this; + wx.previewImage({ + urls: that.data.imageList, + current: that.data.imageList[e.currentTarget.dataset.index] + }) + }, + /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/miniprogram/pageage/project_checking/info/index.wxml b/miniprogram/pageage/project_checking/info/index.wxml index a1fa824..e38e7ee 100644 --- a/miniprogram/pageage/project_checking/info/index.wxml +++ b/miniprogram/pageage/project_checking/info/index.wxml @@ -15,8 +15,10 @@ 验收图片 - - + + + + diff --git a/miniprogram/pageage/project_checking/info/index.wxss b/miniprogram/pageage/project_checking/info/index.wxss index 91fd181..e8ea92e 100644 --- a/miniprogram/pageage/project_checking/info/index.wxss +++ b/miniprogram/pageage/project_checking/info/index.wxss @@ -1 +1,23 @@ -/* pageage/project_checking/info/index.wxss */ \ No newline at end of file +/* pageage/project_checking/info/index.wxss */ +.in-img-max:after{ + display:block; + clear:both; + content:""; + visibility:hidden; + height:0 + } + .in-img-max{ + width: auto; + zoom:1 + } + .in-img-div{ + position: relative; + margin: 0 8px 8px 0; + float: left; + } + .in-img-div image{ + width: 180rpx; + height: 180rpx; + border-radius: 15rpx; + position: relative; + } \ No newline at end of file diff --git a/miniprogram/pageage/project_checking/list/index.js b/miniprogram/pageage/project_checking/list/index.js index b5ad5f8..9c46319 100644 --- a/miniprogram/pageage/project_checking/list/index.js +++ b/miniprogram/pageage/project_checking/list/index.js @@ -15,6 +15,7 @@ Page({ initData: {}, show:false, listData:[], + request:app.globalData.reqUrl }, onClose(){ diff --git a/miniprogram/pageage/project_checking/list/index.wxml b/miniprogram/pageage/project_checking/list/index.wxml index bcf4436..60d5c2c 100644 --- a/miniprogram/pageage/project_checking/list/index.wxml +++ b/miniprogram/pageage/project_checking/list/index.wxml @@ -18,7 +18,7 @@ 合格 不合格 - + 质量专员:{{item.qualityUserName}} diff --git a/miniprogram/pageage/project_problemmodify/quality/check/index.js b/miniprogram/pageage/project_problemmodify/quality/check/index.js index 8fb8d5d..928f282 100644 --- a/miniprogram/pageage/project_problemmodify/quality/check/index.js +++ b/miniprogram/pageage/project_problemmodify/quality/check/index.js @@ -7,15 +7,18 @@ Page({ */ data: { id:"", - infoData:{}, - imgs:[], + infoData:{}, loadShow:false, auditInfo:{}, - auditImgs:[], reject:false, rejectOpinion:"", loadShow:false, - loginName:"" + loginName:"", + imageList:[], + minImageList:[], + auditImageList:[], + auditMinImageList:[], + request:app.globalData.reqUrl }, /** @@ -54,15 +57,18 @@ Page({ success(res){ res = res.data if(res.code == 200){ - let urls = []; - res.data.smarkUrl.split(',').forEach(element => { - urls.push(element+'.min.jpg'); - }); - that.setData({ - infoData:res.data, - imgs:urls, - loadShow:false - }) + let urls = []; + let minUrls = []; + res.data.smarkUrl.split(',').forEach(element => { + urls.push(that.data.request+element); + minUrls.push(that.data.request+element+'.min.jpg'); + }); + that.setData({ + infoData:res.data, + imageList:urls, + minImageList:minUrls, + loadShow:false + }) } } }) @@ -80,13 +86,16 @@ Page({ success(res){ res = res.data if(res.code == 200 && res.data){ - let urls = []; + let urls = []; + let minUrls = []; res.data.fileUrls.split(',').forEach(element => { - urls.push(element+'.min.jpg'); + urls.push(that.data.request+element); + minUrls.push(that.data.request+element+'.min.jpg'); }); that.setData({ - auditInfo:res.data, - auditImgs:urls + auditInfo:res.data, + auditImageList:urls, + auditMinImageList:minUrls }) } } @@ -126,7 +135,7 @@ Page({ processState:status, opinion:rejectOpinion, createUser:loginName - } + } wx.request({ url: app.globalData.reqUrl + '/wechat/projectProblemmodify/modifyProblem', method:"POST", @@ -204,6 +213,24 @@ Page({ }) }, + //展示图片 + showImg:function(e){ + var that=this; + wx.previewImage({ + urls: that.data.imageList, + current: that.data.imageList[e.currentTarget.dataset.index] + }) + }, + + //展示图片 + showAuditinfoImg:function(e){ + var that=this; + wx.previewImage({ + urls: that.data.auditImageList, + current: that.data.auditImageList[e.currentTarget.dataset.index] + }) + }, + /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/miniprogram/pageage/project_problemmodify/quality/check/index.wxml b/miniprogram/pageage/project_problemmodify/quality/check/index.wxml index 4fe1b88..5df8172 100644 --- a/miniprogram/pageage/project_problemmodify/quality/check/index.wxml +++ b/miniprogram/pageage/project_problemmodify/quality/check/index.wxml @@ -9,9 +9,11 @@ 隐患图片 - - - + + + + + @@ -92,9 +94,11 @@ 整改后图片 - - - + + + + + diff --git a/miniprogram/pageage/project_problemmodify/quality/check/index.wxss b/miniprogram/pageage/project_problemmodify/quality/check/index.wxss index 91fd181..e8ea92e 100644 --- a/miniprogram/pageage/project_problemmodify/quality/check/index.wxss +++ b/miniprogram/pageage/project_problemmodify/quality/check/index.wxss @@ -1 +1,23 @@ -/* pageage/project_checking/info/index.wxss */ \ No newline at end of file +/* pageage/project_checking/info/index.wxss */ +.in-img-max:after{ + display:block; + clear:both; + content:""; + visibility:hidden; + height:0 + } + .in-img-max{ + width: auto; + zoom:1 + } + .in-img-div{ + position: relative; + margin: 0 8px 8px 0; + float: left; + } + .in-img-div image{ + width: 180rpx; + height: 180rpx; + border-radius: 15rpx; + position: relative; + } \ No newline at end of file diff --git a/miniprogram/pageage/project_problemmodify/quality/info/index.js b/miniprogram/pageage/project_problemmodify/quality/info/index.js index 2723fc0..eec8e14 100644 --- a/miniprogram/pageage/project_problemmodify/quality/info/index.js +++ b/miniprogram/pageage/project_problemmodify/quality/info/index.js @@ -7,13 +7,16 @@ Page({ */ data: { id:"", - infoData:{}, - imgs:[], + infoData:{}, loadShow:false, auditInfo:{}, - auditImgs:[], loginName:"", showDel:false, + imageList:[], + minImageList:[], + auditImageList:[], + auditMinImageList:[], + request:app.globalData.reqUrl }, /** @@ -52,15 +55,18 @@ Page({ success(res){ res = res.data if(res.code == 200){ - let urls = []; - res.data.smarkUrl.split(',').forEach(element => { - urls.push(element+'.min.jpg'); - }); - that.setData({ - infoData:res.data, - imgs:urls, - loadShow:false - }) + let urls = []; + let minUrls = []; + res.data.smarkUrl.split(',').forEach(element => { + urls.push(that.data.request+element); + minUrls.push(that.data.request+element+'.min.jpg'); + }); + that.setData({ + infoData:res.data, + imageList:urls, + minImageList:minUrls, + loadShow:false + }) //判断当前能否删除 if(res.data.checkState!=4 && res.data.createUser==that.data.loginName){ that.setData({ @@ -84,14 +90,17 @@ Page({ success(res){ res = res.data if(res.code == 200 && res.data){ - let urls = []; - res.data.fileUrls.split(',').forEach(element => { - urls.push(element+'.min.jpg'); - }); - that.setData({ + let urls = []; + let minUrls = []; + res.data.fileUrls.split(',').forEach(element => { + urls.push(that.data.request+element); + minUrls.push(that.data.request+element+'.min.jpg'); + }); + that.setData({ auditInfo:res.data, - auditImgs:urls - }) + auditImageList:urls, + auditMinImageList:minUrls + }) } } }) @@ -116,7 +125,7 @@ Page({ deleteData(){ let {id} = this.data wx.request({ - url: app.globalData.reqUrl+'/wechat/projectProblemmodify/removeSafety', + url: app.globalData.reqUrl+'/wechat/projectProblemmodify/removeQuality', data:{ id:id }, @@ -130,20 +139,24 @@ Page({ }) }, - //打开放大的图片 - enlargeImage(e){ - this.setData({ - imgUrl:e.currentTarget.dataset.url, - imgShow:true - }) - }, - //关闭放大的图片 - closeImages(){ - this.setData({ - imgShow:false - }) + //展示图片 + showImg:function(e){ + var that=this; + wx.previewImage({ + urls: that.data.imageList, + current: that.data.imageList[e.currentTarget.dataset.index] + }) }, + //展示图片 + showAuditinfoImg:function(e){ + var that=this; + wx.previewImage({ + urls: that.data.auditImageList, + current: that.data.auditImageList[e.currentTarget.dataset.index] + }) + }, + /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/miniprogram/pageage/project_problemmodify/quality/info/index.wxml b/miniprogram/pageage/project_problemmodify/quality/info/index.wxml index a078948..49ab990 100644 --- a/miniprogram/pageage/project_problemmodify/quality/info/index.wxml +++ b/miniprogram/pageage/project_problemmodify/quality/info/index.wxml @@ -10,8 +10,10 @@ 隐患图片 - - + + + + @@ -92,8 +94,10 @@ 整改后图片 - - + + + + diff --git a/miniprogram/pageage/project_problemmodify/quality/info/index.wxss b/miniprogram/pageage/project_problemmodify/quality/info/index.wxss index 91fd181..e8ea92e 100644 --- a/miniprogram/pageage/project_problemmodify/quality/info/index.wxss +++ b/miniprogram/pageage/project_problemmodify/quality/info/index.wxss @@ -1 +1,23 @@ -/* pageage/project_checking/info/index.wxss */ \ No newline at end of file +/* pageage/project_checking/info/index.wxss */ +.in-img-max:after{ + display:block; + clear:both; + content:""; + visibility:hidden; + height:0 + } + .in-img-max{ + width: auto; + zoom:1 + } + .in-img-div{ + position: relative; + margin: 0 8px 8px 0; + float: left; + } + .in-img-div image{ + width: 180rpx; + height: 180rpx; + border-radius: 15rpx; + position: relative; + } \ No newline at end of file diff --git a/miniprogram/pageage/project_problemmodify/quality/list/index.js b/miniprogram/pageage/project_problemmodify/quality/list/index.js index 5e4c25f..8520c8d 100644 --- a/miniprogram/pageage/project_problemmodify/quality/list/index.js +++ b/miniprogram/pageage/project_problemmodify/quality/list/index.js @@ -18,7 +18,8 @@ Page({ activeState:"dzg", dzgCount:0, yclCount:0, - zgcsCOunt:0 + zgcsCOunt:0, + request:app.globalData.reqUrl }, onClose(){ diff --git a/miniprogram/pageage/project_problemmodify/quality/list/index.wxml b/miniprogram/pageage/project_problemmodify/quality/list/index.wxml index 1cd77e1..ec260f6 100644 --- a/miniprogram/pageage/project_problemmodify/quality/list/index.wxml +++ b/miniprogram/pageage/project_problemmodify/quality/list/index.wxml @@ -25,7 +25,7 @@ 待复检 复检驳回 整改完成 - + 隐患类型:{{item.dangerTypeName}} diff --git a/miniprogram/pageage/project_problemmodify/quality/modify/index.js b/miniprogram/pageage/project_problemmodify/quality/modify/index.js index 05ba515..6360620 100644 --- a/miniprogram/pageage/project_problemmodify/quality/modify/index.js +++ b/miniprogram/pageage/project_problemmodify/quality/modify/index.js @@ -7,16 +7,17 @@ Page({ */ data: { id:"", - infoData:{}, - imgs:[], + infoData:{}, loadShow:false, auditInfo:{}, - auditImgs:[], opinion:"", imageInfoData:[], loadShow:false, loginName:"", - status:"0" + status:"0", + imageList:[], + minImageList:[], + request:app.globalData.reqUrl }, /** @@ -56,14 +57,17 @@ Page({ res = res.data if(res.code == 200){ let urls = []; - res.data.smarkUrl.split(',').forEach(element => { - urls.push(element+'.min.jpg'); - }); - that.setData({ - infoData:res.data, - imgs:urls, - loadShow:false - }) + let minUrls = []; + res.data.smarkUrl.split(',').forEach(element => { + urls.push(that.data.request+element); + minUrls.push(that.data.request+element+'.min.jpg'); + }); + that.setData({ + infoData:res.data, + imageList:urls, + minImageList:minUrls, + loadShow:false + }) } } }) @@ -206,6 +210,15 @@ Page({ }) }, + //展示图片 + showImg:function(e){ + var that=this; + wx.previewImage({ + urls: that.data.imageList, + current: that.data.imageList[e.currentTarget.dataset.index] + }) + }, + /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/miniprogram/pageage/project_problemmodify/quality/modify/index.wxml b/miniprogram/pageage/project_problemmodify/quality/modify/index.wxml index c14ce74..a0ec0a0 100644 --- a/miniprogram/pageage/project_problemmodify/quality/modify/index.wxml +++ b/miniprogram/pageage/project_problemmodify/quality/modify/index.wxml @@ -10,8 +10,10 @@ 隐患图片 - - + + + + diff --git a/miniprogram/pageage/project_problemmodify/quality/modify/index.wxss b/miniprogram/pageage/project_problemmodify/quality/modify/index.wxss index 91fd181..e8ea92e 100644 --- a/miniprogram/pageage/project_problemmodify/quality/modify/index.wxss +++ b/miniprogram/pageage/project_problemmodify/quality/modify/index.wxss @@ -1 +1,23 @@ -/* pageage/project_checking/info/index.wxss */ \ No newline at end of file +/* pageage/project_checking/info/index.wxss */ +.in-img-max:after{ + display:block; + clear:both; + content:""; + visibility:hidden; + height:0 + } + .in-img-max{ + width: auto; + zoom:1 + } + .in-img-div{ + position: relative; + margin: 0 8px 8px 0; + float: left; + } + .in-img-div image{ + width: 180rpx; + height: 180rpx; + border-radius: 15rpx; + position: relative; + } \ No newline at end of file diff --git a/miniprogram/pageage/project_problemmodify/security/check/index.js b/miniprogram/pageage/project_problemmodify/security/check/index.js index 74075d5..5030999 100644 --- a/miniprogram/pageage/project_problemmodify/security/check/index.js +++ b/miniprogram/pageage/project_problemmodify/security/check/index.js @@ -8,14 +8,17 @@ Page({ data: { id:"", infoData:{}, - imgs:[], loadShow:false, auditInfo:{}, - auditImgs:[], reject:false, rejectOpinion:"", loadShow:false, - loginName:"" + loginName:"", + imageList:[], + minImageList:[], + auditImageList:[], + auditMinImageList:[], + request:app.globalData.reqUrl }, /** @@ -54,15 +57,18 @@ Page({ success(res){ res = res.data if(res.code == 200){ - let urls = []; - res.data.smarkUrl.split(',').forEach(element => { - urls.push(element+'.min.jpg'); - }); - that.setData({ - infoData:res.data, - imgs:urls, - loadShow:false - }) + let urls = []; + let minUrls = []; + res.data.smarkUrl.split(',').forEach(element => { + urls.push(that.data.request+element); + minUrls.push(that.data.request+element+'.min.jpg'); + }); + that.setData({ + infoData:res.data, + imageList:urls, + minImageList:minUrls, + loadShow:false + }) } } }) @@ -80,14 +86,17 @@ Page({ success(res){ res = res.data if(res.code == 200 && res.data){ - let urls = []; - res.data.fileUrls.split(',').forEach(element => { - urls.push(element+'.min.jpg'); - }); - that.setData({ + let urls = []; + let minUrls = []; + res.data.fileUrls.split(',').forEach(element => { + urls.push(that.data.request+element); + minUrls.push(that.data.request+element+'.min.jpg'); + }); + that.setData({ auditInfo:res.data, - auditImgs:urls - }) + auditImageList:urls, + auditMinImageList:minUrls + }) } } }) @@ -204,6 +213,24 @@ Page({ }) }, + //展示图片 + showImg:function(e){ + var that=this; + wx.previewImage({ + urls: that.data.imageList, + current: that.data.imageList[e.currentTarget.dataset.index] + }) + }, + + //展示图片 + showAuditinfoImg:function(e){ + var that=this; + wx.previewImage({ + urls: that.data.auditImageList, + current: that.data.auditImageList[e.currentTarget.dataset.index] + }) + }, + /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/miniprogram/pageage/project_problemmodify/security/check/index.wxml b/miniprogram/pageage/project_problemmodify/security/check/index.wxml index fff8303..018a4f3 100644 --- a/miniprogram/pageage/project_problemmodify/security/check/index.wxml +++ b/miniprogram/pageage/project_problemmodify/security/check/index.wxml @@ -9,9 +9,11 @@ 隐患图片 - - - + + + + + @@ -92,9 +94,11 @@ 整改后图片 - - - + + + + + diff --git a/miniprogram/pageage/project_problemmodify/security/check/index.wxss b/miniprogram/pageage/project_problemmodify/security/check/index.wxss index 91fd181..e8ea92e 100644 --- a/miniprogram/pageage/project_problemmodify/security/check/index.wxss +++ b/miniprogram/pageage/project_problemmodify/security/check/index.wxss @@ -1 +1,23 @@ -/* pageage/project_checking/info/index.wxss */ \ No newline at end of file +/* pageage/project_checking/info/index.wxss */ +.in-img-max:after{ + display:block; + clear:both; + content:""; + visibility:hidden; + height:0 + } + .in-img-max{ + width: auto; + zoom:1 + } + .in-img-div{ + position: relative; + margin: 0 8px 8px 0; + float: left; + } + .in-img-div image{ + width: 180rpx; + height: 180rpx; + border-radius: 15rpx; + position: relative; + } \ No newline at end of file diff --git a/miniprogram/pageage/project_problemmodify/security/info/index.js b/miniprogram/pageage/project_problemmodify/security/info/index.js index 9b115e7..a19fbb9 100644 --- a/miniprogram/pageage/project_problemmodify/security/info/index.js +++ b/miniprogram/pageage/project_problemmodify/security/info/index.js @@ -7,12 +7,15 @@ Page({ */ data: { id:"", - infoData:{}, - imgs:[], + infoData:{}, auditInfo:{}, - auditImgs:[], showDel:false, - loginName:"" + loginName:"", + imageList:[], + minImageList:[], + auditImageList:[], + auditMinImageList:[], + request:app.globalData.reqUrl }, /** @@ -51,14 +54,17 @@ Page({ success(res){ res = res.data if(res.code == 200){ - let urls = []; - res.data.smarkUrl.split(',').forEach(element => { - urls.push(element+'.min.jpg'); - }); - that.setData({ - infoData:res.data, - imgs:urls, - }) + let urls = []; + let minUrls = []; + res.data.smarkUrl.split(',').forEach(element => { + urls.push(that.data.request+element); + minUrls.push(that.data.request+element+'.min.jpg'); + }); + that.setData({ + infoData:res.data, + imageList:urls, + minImageList:minUrls + }) //判断当前能否删除 if(res.data.checkState!=4 && res.data.createUser==that.data.loginName){ that.setData({ @@ -83,12 +89,15 @@ Page({ res = res.data if(res.code == 200 && res.data){ let urls = []; + let minUrls = []; res.data.fileUrls.split(',').forEach(element => { - urls.push(element+'.min.jpg'); + urls.push(that.data.request+element); + minUrls.push(that.data.request+element+'.min.jpg'); }); that.setData({ - auditInfo:res.data, - auditImgs:urls + auditInfo:res.data, + auditImageList:urls, + auditMinImageList:minUrls }) } } @@ -127,17 +136,21 @@ Page({ } }) }, - //打开放大的图片 - enlargeImage(e){ - this.setData({ - imgUrl:e.currentTarget.dataset.url, - imgShow:true - }) + //展示图片 + showImg:function(e){ + var that=this; + wx.previewImage({ + urls: that.data.imageList, + current: that.data.imageList[e.currentTarget.dataset.index] + }) }, - //关闭放大的图片 - closeImages(){ - this.setData({ - imgShow:false + + //展示图片 + showAuditinfoImg:function(e){ + var that=this; + wx.previewImage({ + urls: that.data.auditImageList, + current: that.data.auditImageList[e.currentTarget.dataset.index] }) }, diff --git a/miniprogram/pageage/project_problemmodify/security/info/index.wxml b/miniprogram/pageage/project_problemmodify/security/info/index.wxml index a078948..49ab990 100644 --- a/miniprogram/pageage/project_problemmodify/security/info/index.wxml +++ b/miniprogram/pageage/project_problemmodify/security/info/index.wxml @@ -10,8 +10,10 @@ 隐患图片 - - + + + + @@ -92,8 +94,10 @@ 整改后图片 - - + + + + diff --git a/miniprogram/pageage/project_problemmodify/security/info/index.wxss b/miniprogram/pageage/project_problemmodify/security/info/index.wxss index 91fd181..e8ea92e 100644 --- a/miniprogram/pageage/project_problemmodify/security/info/index.wxss +++ b/miniprogram/pageage/project_problemmodify/security/info/index.wxss @@ -1 +1,23 @@ -/* pageage/project_checking/info/index.wxss */ \ No newline at end of file +/* pageage/project_checking/info/index.wxss */ +.in-img-max:after{ + display:block; + clear:both; + content:""; + visibility:hidden; + height:0 + } + .in-img-max{ + width: auto; + zoom:1 + } + .in-img-div{ + position: relative; + margin: 0 8px 8px 0; + float: left; + } + .in-img-div image{ + width: 180rpx; + height: 180rpx; + border-radius: 15rpx; + position: relative; + } \ No newline at end of file diff --git a/miniprogram/pageage/project_problemmodify/security/list/index.js b/miniprogram/pageage/project_problemmodify/security/list/index.js index 8fa9242..ea1f0fe 100644 --- a/miniprogram/pageage/project_problemmodify/security/list/index.js +++ b/miniprogram/pageage/project_problemmodify/security/list/index.js @@ -18,7 +18,8 @@ Page({ activeState:"dzg", dzgCount:0, yclCount:0, - zgcsCOunt:0 + zgcsCOunt:0, + request:app.globalData.reqUrl }, onClose(){ diff --git a/miniprogram/pageage/project_problemmodify/security/list/index.wxml b/miniprogram/pageage/project_problemmodify/security/list/index.wxml index 144e2cb..337c402 100644 --- a/miniprogram/pageage/project_problemmodify/security/list/index.wxml +++ b/miniprogram/pageage/project_problemmodify/security/list/index.wxml @@ -26,7 +26,7 @@ 待复检 复检驳回 整改完成 - + 隐患类型:{{item.dangerTypeName}} diff --git a/miniprogram/pageage/project_problemmodify/security/modify/index.js b/miniprogram/pageage/project_problemmodify/security/modify/index.js index 05ba515..a76e7a7 100644 --- a/miniprogram/pageage/project_problemmodify/security/modify/index.js +++ b/miniprogram/pageage/project_problemmodify/security/modify/index.js @@ -7,16 +7,17 @@ Page({ */ data: { id:"", - infoData:{}, - imgs:[], + infoData:{}, loadShow:false, auditInfo:{}, - auditImgs:[], opinion:"", imageInfoData:[], loadShow:false, loginName:"", - status:"0" + status:"0", + imageList:[], + minImageList:[], + request:app.globalData.reqUrl }, /** @@ -56,12 +57,15 @@ Page({ res = res.data if(res.code == 200){ let urls = []; + let minUrls = []; res.data.smarkUrl.split(',').forEach(element => { - urls.push(element+'.min.jpg'); + urls.push(that.data.request+element); + minUrls.push(that.data.request+element+'.min.jpg'); }); that.setData({ infoData:res.data, - imgs:urls, + imageList:urls, + minImageList:minUrls, loadShow:false }) } @@ -206,6 +210,15 @@ Page({ }) }, + //展示图片 + showImg:function(e){ + var that=this; + wx.previewImage({ + urls: that.data.imageList, + current: that.data.imageList[e.currentTarget.dataset.index] + }) + }, + /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/miniprogram/pageage/project_problemmodify/security/modify/index.wxml b/miniprogram/pageage/project_problemmodify/security/modify/index.wxml index 93850d7..be1a80e 100644 --- a/miniprogram/pageage/project_problemmodify/security/modify/index.wxml +++ b/miniprogram/pageage/project_problemmodify/security/modify/index.wxml @@ -9,8 +9,10 @@ 隐患图片 - - + + + + diff --git a/miniprogram/pageage/project_problemmodify/security/modify/index.wxss b/miniprogram/pageage/project_problemmodify/security/modify/index.wxss index 91fd181..e8ea92e 100644 --- a/miniprogram/pageage/project_problemmodify/security/modify/index.wxss +++ b/miniprogram/pageage/project_problemmodify/security/modify/index.wxss @@ -1 +1,23 @@ -/* pageage/project_checking/info/index.wxss */ \ No newline at end of file +/* pageage/project_checking/info/index.wxss */ +.in-img-max:after{ + display:block; + clear:both; + content:""; + visibility:hidden; + height:0 + } + .in-img-max{ + width: auto; + zoom:1 + } + .in-img-div{ + position: relative; + margin: 0 8px 8px 0; + float: left; + } + .in-img-div image{ + width: 180rpx; + height: 180rpx; + border-radius: 15rpx; + position: relative; + } \ No newline at end of file diff --git a/miniprogram/pages/Personnel-information-binding/index.js b/miniprogram/pages/Personnel-information-binding/index.js deleted file mode 100644 index 64ce706..0000000 --- a/miniprogram/pages/Personnel-information-binding/index.js +++ /dev/null @@ -1,87 +0,0 @@ -// pages/Personnel-information-binding/index.js -Page({ - - /** - * 页面的初始数据 - */ - data: { - - }, - //扫码学习 - affirmLearn(){ - wx.scanCode({ - onlyFromCamera:false, - scanType:['qrCode'], - async success(res){ - let {result} = res - //截取参数 - let subStrUrl = result.substr(result.indexOf("?"),result.length-1) - wx.navigateTo({ - url: '../saft-qr-view/index'+subStrUrl, - }) - } - }) - }, - //退出 - back(){ - wx.redirectTo({ - url: '../gengduogongneng/gengduogongneng' - }) - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow() { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - - } -}) \ No newline at end of file diff --git a/miniprogram/pages/Personnel-information-binding/index.json b/miniprogram/pages/Personnel-information-binding/index.json deleted file mode 100644 index 9cb0b8a..0000000 --- a/miniprogram/pages/Personnel-information-binding/index.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "usingComponents": {}, - "navigationBarTitleText": "劳务人员信息绑定" -} \ No newline at end of file diff --git a/miniprogram/pages/Personnel-information-binding/index.wxml b/miniprogram/pages/Personnel-information-binding/index.wxml deleted file mode 100644 index 3833686..0000000 --- a/miniprogram/pages/Personnel-information-binding/index.wxml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - 绑定成功! - - - - - - 扫码确认安全学习 - - - 退出 - - - \ No newline at end of file diff --git a/miniprogram/pages/Personnel-information-binding/index.wxss b/miniprogram/pages/Personnel-information-binding/index.wxss deleted file mode 100644 index f441e6f..0000000 --- a/miniprogram/pages/Personnel-information-binding/index.wxss +++ /dev/null @@ -1,21 +0,0 @@ -/* 人员信息绑定 */ -/* 头部部分 */ -.information-header{ - display: flex; - flex-direction: column; - justify-content: space-around; - align-items: center; - width: 220rpx; - height: 220rpx; - margin-top:192rpx; - margin-bottom: 172rpx; -} -/* 底部部分 */ -.information-footer{ - display: flex; - flex-direction: column; - justify-content: space-between; - align-items: center; - width: 480rpx; - height: 180rpx; -} \ No newline at end of file diff --git a/miniprogram/pages/Standard-maintenance-room-monitoring/index.js b/miniprogram/pages/Standard-maintenance-room-monitoring/index.js index 89a8055..e7903b7 100644 --- a/miniprogram/pages/Standard-maintenance-room-monitoring/index.js +++ b/miniprogram/pages/Standard-maintenance-room-monitoring/index.js @@ -1,223 +1,20 @@ // pages/Standard-maintenance-room-monitoring/index.js -const app = getApp(); Page({ /** * 页面的初始数据 */ data: { - projectId:'', - startTime:"", - endTime:"", - startTime2:"", - endTime2:"", - deviceNo:"010840009F", - jianceList: [{ text: '010840009F', id: 0 }], - indexNum: 0, - value:'本月', - value1:'本月', - actions: [{ name: '本月',id:0 }, { name: '累计', id:1},], - actions1: [{ name: '本月',id:0 }, { name: '累计', id:1},], - biaoyangList: [ - { name: '温度趋势', biaoyangX: [], biaoyangY: [] }, - { name: '最小标准温度', biaoyangX: [], biaoyangY: [] }, - { name: '最大标准温度', biaoyangX: [], biaoyangY: [] } - ], - indexNum2: 0, - biaoyangList2: [ - { name: '湿度趋势', biaoyangX: [], biaoyangY: [] }, - { name: '标准湿度', biaoyangX: [], biaoyangY: [] }, - ], - }, - onClick(){ - this.setData({ - show1:true - }) - }, - onClick1(){ - this.setData({ - show2:true - }) - }, - onClose(){ - this.setData({ - show:false, - show1:false, - show2:false - }) - }, - showPopup() { - this.setData({ show: true }); - }, - goGCLB:function(){ - wx.redirectTo({ - url: '../../pages/Quality-Assurance/index' - }) - }, - // 点击进行超耗tab切换 - onSelect(e) { - // console.log(e); - // console.log(e.detail.id); - if(e.detail.id ==0){ - this.setData({ - startTime:this.getDate(-6,1), - endTime:this.getDate(0,2), - }) - }else{ - this.setData({ - startTime:this.getDate(-29,1), - endTime:this.getDate(0,2), - }) - } - this.setData({ - indexNum: e.detail.id, - }) - this.runList(); - }, - onSelect1(e) { - if(e.detail.id ==0){ - this.setData({ - startTime2:this.getDate(-6,1), - endTime2:this.getDate(0,2), - }) - }else{ - this.setData({ - startTime2:this.getDate(-29,1), - endTime2:this.getDate(0,2), - }) - } - this.setData({ - indexNum2: e.detail.id, - }) - this.runList2(); }, + /** * 生命周期函数--监听页面加载 */ onLoad(options) { - //获取缓存数据 - wx.getStorage({ - key: 'userinfo', - success:res=>{ - this.setData({ - 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} - }) - this.getProjectCorrespondence(app.globalData.projectId) - } - }) - this.setData({ - startTime:this.getDate(-6,1), - endTime:this.getDate(0,2), - startTime2:this.getDate(-6,1), - endTime2:this.getDate(0,2), - }) - this.getProjectCorrespondence(); - }, - getDate(num,type){ - var date = new Date(new Date().getTime()+num*24*60*60*1000); - var year = date.getFullYear(); - var month = (date.getMonth()+1) > 9 ? (date.getMonth()+1):'0'+(date.getMonth()+1) - var day = date.getDate() > 9 ? date.getDate():'0'+date.getDate() - return year+"-"+month+"-"+day+(type==1?" 00:00:00":" 23:59:59"); - }, - /** - * 项目对应关系 - */ - getProjectCorrespondence() { - var that = this; - wx.request({ - url: app.globalData.reqUrl + '/weixin/training/getProjectCorrespondence', - data: { - "projectId": 3//app.globalData.projectId, - }, - method: "get", - success: function (res) { - that.setData({ - projectId :res.data.szh - }) - that.runList(); - that.runList2(); - } - }) - }, - runList() { - var that = this; - console.log(that.data) - wx.request({ - url: app.globalData.szhUrl + '/api/iot/markingroom/runList', - data: { - "projectId": that.data.projectId, - "startTime": that.data.startTime, - "endTime": that.data.endTime, - "deviceNo": that.data.deviceNo - }, - method: "get", - success: function (res) { - console.log(res.data); - var data = {} - data.lineData = [] - data.color = ['#008ffd', '#f6d023', '#5af9fd'] - data.legend = ['温度趋势', '最小标准温度', '最大标准温度'] - data.unit = '℃' - data.date = [] - var data1 = [] - var data2 = [] - var data3 = [] - var biaoyangList = that.data.biaoyangList; - for (let row of res.data.rows) { - data.date.push(row.createTime.substr(0, 14) + "00"); - data1.push(18) - data2.push(row.temperature) - data3.push(22) - } - data.lineData.push(data1) - data.lineData.push(data2) - data.lineData.push(data3) - that.setData({ - biaoyangList: data, - }) - } - }) - }, - runList2() { - var that = this; - wx.request({ - url: app.globalData.szhUrl + '/api/iot/markingroom/runList', - data: { - "projectId": that.data.projectId, - "startTime": that.data.startTime2, - "endTime": that.data.endTime2, - "deviceNo": that.data.deviceNo - }, - method: "get", - success: function (res) { - var data = {} - data.lineData = [] - data.color = ['#008ffd', '#f6d023'] - data.legend = ['湿度趋势', '标准湿度'] - data.unit = '%RH' - data.date = [] - var data1 = [] - var data2 = [] - var biaoyangList2 = that.data.biaoyangList2; - for (let row of res.data.rows) { - data.date.push(row.createTime.substr(0, 14) + "00"); - data1.push(row.humidity) - data2.push(95) - } - data.lineData.push(data1) - data.lineData.push(data2) - that.setData({ - biaoyangList2: data - }) - } - }) + }, + /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/miniprogram/pages/Standard-maintenance-room-monitoring/index.json b/miniprogram/pages/Standard-maintenance-room-monitoring/index.json deleted file mode 100644 index ceebc53..0000000 --- a/miniprogram/pages/Standard-maintenance-room-monitoring/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "usingComponents": { - "van-action-sheet": "@vant/weapp/action-sheet" - }, - "navigationBarTitleText": "标养室监测" -} \ No newline at end of file diff --git a/miniprogram/pages/Standard-maintenance-room-monitoring/index.wxml b/miniprogram/pages/Standard-maintenance-room-monitoring/index.wxml index 5f4d47b..b0f2de5 100644 --- a/miniprogram/pages/Standard-maintenance-room-monitoring/index.wxml +++ b/miniprogram/pages/Standard-maintenance-room-monitoring/index.wxml @@ -1,91 +1,2 @@ - - - - - - - - - - - - - - - 温度趋势 - - - - {{value}} - - - - - - - - - - - - - - 湿度趋势 - - - - {{value1}} - - - - - - - - \ No newline at end of file +pages/Standard-maintenance-room-monitoring/index.wxml diff --git a/miniprogram/pages/Standard-maintenance-room-monitoring/index.wxss b/miniprogram/pages/Standard-maintenance-room-monitoring/index.wxss deleted file mode 100644 index 5edda79..0000000 --- a/miniprogram/pages/Standard-maintenance-room-monitoring/index.wxss +++ /dev/null @@ -1,89 +0,0 @@ -/* pages/Standard-maintenance-room-monitoring/index.wxss */ -/* 标养室监测 */ -.jiance{ - padding: 60rpx 40rpx 30rpx; -} -.hj_float{ - float: right; - padding: 5rpx 50rpx 5rpx 20rpx; - background: #2e355f url("http://fileimg.makalu.cc/CORE_5F23F4664AAE44A0BD72BE4BB4C66083.png") no-repeat right/35rpx; - border-radius: 40rpx; - } - .hj_float:active{ - background: #2e355f url("http://fileimg.makalu.cc/CORE_5F23F4664AAE44A0BD72BE4BB4C66083.png") no-repeat right/35rpx; - } - .van-popup--bottom.van-popup--round{ - border-radius: 0 !important - } - .van-popup{ - background-color: var(--popup-background-color,#232a44) !important - } - .van-action-sheet__cancel,.van-action-sheet__item{ - background-color: var(--popup-background-color,#232a44) !important; - color: #0ad7ec; - - } -/* 监测-nav */ -.nav-jiance{ - width: 100%; - height: 90rpx; -} -.jiance-content{ - width: 100%; - border: 1px solid #1e2336; - background-color: #1e2336; - padding-top: 20rpx; - margin-bottom: 40rpx; - font-size: 26rpx; -} -.header-cailiao{ - display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 40rpx; -} -.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; - } - .header-cailiao-right{ - display: flex; - justify-content: center; - align-items: center; - width: 300rpx; - height: 80rpx; - font-size: 24rpx; - color: rgb(155, 154, 154); -} -.header-cailiao-right-left{ - width: 120rpx; - height: 46rpx; - line-height: 46rpx; - text-align: center; - border-top-left-radius: 36rpx; - border-bottom-left-radius: 36rpx; - border: 1px solid #2e355f; -} -.header-cailiao-right-right{ - width: 120rpx; - height: 46rpx; - line-height: 46rpx; - text-align: center; - border-top-right-radius: 36rpx; - border-bottom-right-radius: 36rpx; - border: 1px solid #2e355f; -} -.active{ - color: #fff; - background-color: #2e355f; -} -/* 展示数据echarts图 */ -.jiance-echarts{ - width: 100%; - /* height: 600rpx; */ - box-sizing: border-box; - padding: 30rpx; -} \ No newline at end of file diff --git a/miniprogram/pages/newAddPage2/letterCommitment/index.js b/miniprogram/pages/newAddPage2/letterCommitment/index.js index bf42247..0e1f32b 100644 --- a/miniprogram/pages/newAddPage2/letterCommitment/index.js +++ b/miniprogram/pages/newAddPage2/letterCommitment/index.js @@ -1,50 +1,19 @@ -// pages/newAddPage/letterCommitment/index.js -const app = getApp() +// pages/newAddPage2/letterCommitment/index.js Page({ /** * 页面的初始数据 */ data: { - safetyQualityRich:'


安全质量承诺书

为了个人的安全健康,为了家庭的幸福美满,为了企业的稳定发展,本人在工作中,自愿签订并遵守以下承诺:


忠诚企业、恪尽职守、珍爱生命、铸造精品!


我坚决做到:遵守规章制度、遵守操作规程、遵守劳动纪律,不出事故、不出次品、不留隐患!我将以实际行动,确保企业生产安全、产品优质!”


对于以上承诺,本人自觉遵守,如有违反,本人愿承担责任。


本承诺书自签字日起生效。


                       承诺人(签字):


                       岗 位(工种):


                       日  期:    年    月    日


', - healthRich:'


健康承诺书

本人:        ,性别:    ,年龄:    岁、身份证号码:               ,从事岗位:               ,无 □ / 有 □ 高血压、心脏病等基础身体健康问题;无 □ / 有 □ 严重呼吸系统疾病、严重心脑血管疾病、肝肾疾病、恶性肿瘤以及药物无法有效控制的高血压和糖尿病等基础性病症状征兆,能够胜任本岗位相应工作,我向公司承诺以上所述信息无隐瞒、无虚报,如有隐瞒造成所有后果由本人承担,于项目无关。

                       承诺人(按手印):


                       承诺日期:    年   月   日


                       日  期:    年    月    日


', - workerRich:'


作业工人安全生产责任书


(一)作业工人对自己施工中的安全负责。


(二)作业工人应严格执行劳动纪律和现场安全生产管理制度,严格执行安全操作规程和安全技术交底,做到“四不伤害”即:我不伤害自己,我不伤害别人,我不被别人伤害。


(三)拒绝强令冒险作业。发现隐患及防护设施缺陷应及时向安全管理人员报告。


(四)正确使用和穿戴安全防护用品,自觉维护现场安全防护设施,未经批准不得随意移动拆除防护设施。


(五)发生事故应及时报告现场管理人员,并在项目负责人的指挥下积极配合施救。


(六)严格遵守本单位的安全生产规章制度和操作规程,服从管理,正确佩戴和使用劳动防护用品。


(七)接受安全生产教育和培训,掌握本职工作所需的安全生产知识,提高安全生产技能,增强事故预防和应急处理能力。从业人员发现事故隐患或者其他不安全因素,应当立即向现场安全生产管理人员或者本单位负责人报告;接到报告的人员应当及时予以处理。


                       承诺人(按手印):

             

                       承诺日期:    年   月   日


', - protectiveEquipmentRich:'


安全防护用品使用图解

进入施工现场必须根据要求按照下图要求佩戴好相应安全防护用品。




本人已经掌握安全防护用品佩戴方法,并严格遵守!


                       签字:


                       日期:       年     月      日      

       

', - workerPostRich:'


作业人员岗位告知书

 你将从事的普工作业,存在着车辆伤害、机械伤害、坠落、物体打击、触电等岗位危险,予以告知。你在作业时务必遵守相关的规章制度、专项工程安全施工方案、安全技术措施,并熟记作业要点及其特性,掌握好相应的安全防范技能;进入作业场所后,要进行重新检查,发现异常情况和不安全因素必须及时采取有效措施排除;要正确使用和佩戴劳动保护用品,在做好自我防范的同时,还要认真贯彻联保互保。同时对以下针对性措施必须经常对照执行:


1、在道路上工作时,密切注意来往车辆,做到“一看二停三通过”,不抢一分一秒,保证自己不被车辆伤害。


2、从事开挖作业时,先观察好周边情况和环境,在最坏的情况能够不伤及自身和他人的情况下再作业。


3、从事搬运石块等工作时,要严格注意身边的人,在呼喊并应答、引起对方注意并退让到安全地带后才可以工作。同时,要积极注意自身安全,不搬运过重的石块,经常检查铁锹、榔头、扁担等工具,一有损坏,立即更换或修复。


4、在电力线底下、光缆附近施工时,必须严格按照安全技术交底,时刻提高警惕,保护好电力电线、国防光缆。


5、严禁在河流、池塘等地游泳、洗澡,由此引发的后果由你承担。


6、做好防火、防盗工作,保护好自己的财物。


7、工作时必须佩戴好劳动防护用品,带好安全帽并系好下额带。


8、密切注意工程施工机械,在挖掘机、压路机、推土机等机械附近施工时,必须面向机械并及时避让,确保安全。严禁在压路机等机械下休息,严禁在施工现场打闹、追逐。


9、工作时听从班组长统一指挥,严格遵守劳动纪律、三级安全教育及安全交底内容。


                       被告知者签字(指印):


                        日期:      年      月      日

       

', - show:true, - radio1:'', - radio2:'', - token: '', - main_id:'' + }, - onChange1(event) { - this.setData({ - radio1: event.detail, - }); - }, - - onChange2(event) { - this.setData({ - radio2: event.detail, - }); - }, /** * 生命周期函数--监听页面加载 */ onLoad(options) { - this.getQiniupToken(); - }, - /** - * 重置 - */ - reset(){ - this.setData({ - radio1:'', - radio2:'' - }) - }, + }, /** * 生命周期函数--监听页面初次渲染完成 @@ -93,118 +62,5 @@ Page({ */ onShareAppMessage() { - }, - - /** - * 获取七牛云token - */ - getQiniupToken() { - var that = this - wx.request({ - url: app.globalData.szhUrl+'/mkl/api/getToken', - method:"GET", - success:function(res){ - that.setData({ - token: res.data, - }); - } - }) - }, - - /** - * 提交签名信息并生成承诺书 - */ - submit(){ - var that = this - if(this.data.radio1 == ''){ - app.toast("请选择是否有高血压、心脏病等基础身体健康问题"); - return; - } - if(this.data.radio2 == ''){ - app.toast("请选择是否有严重呼吸系统疾病、严重心脑血管疾病、肝肾疾病、恶性肿瘤以及药物无法有效控制的高血压和糖尿病等基础性病症状征兆"); - return; - } - - wx.showLoading({ - title: '正在提交。。。', - mask: true, - }) - var that = this - wx.request({ - header: { - 'content-type': 'application/x-www-form-urlencoded' - }, - url:app.globalData.szhUrl+'/mkl/api/generateSafetyLetterOfCommitment2', - data:{ - "openId": wx.getStorageSync('openId'), - "idCardNo": wx.getStorageSync('cardId'), - "radio1":this.data.radio1, - "radio2":this.data.radio2, - "mainId":wx.getStorageSync("options").id, - "signImgUrl":wx.getStorageSync('signUrl'), - "type":1 - }, - method:"POST", - success:function(res){ - if(res.data.code == '200'){ - that.setData({ - show:false - }) - wx.hideLoading({}); - app.toast("提交成功!"); - wx.request({ - url:app.globalData.smzUrl+'/mkl/api/updatePersonInfo', - data:{ - "openId": wx.getStorageSync('openId'), - "idCardNo": wx.getStorageSync('cardId'), - "signImgUrl":wx.getStorageSync('signUrl'), - "projectId":wx.getStorageSync('smzprojectId'), - "pdfUrl":res.data.data - }, - method:"POST", - success:function(res){ - - setTimeout(()=>{ - wx.navigateTo({ - url: '../../winter-training/index?mainId='+wx.getStorageSync('options').id+'&szhprojectId='+wx.getStorageSync('options').projectId+'&cultivateType='+wx.getStorageSync('options').cultivateTypeId+'&cardId='+wx.getStorageSync('cardId')+"&userName="+wx.getStorageSync('answerName')+"&companyName="+wx.getStorageSync('companyName')+"&typeWordName="+wx.getStorageSync('typeWordName')+"&signUrl="+wx.getStorageSync('signUrl') - }) - },2000) - return; - } - }) - - }else{ - app.toast(res.data.msg); - return; - } - } - }) - }, - - /** - * 上传图片 - */ - uploadToQiniu(url) { //图片直接上传到七牛云,获取七牛云链接 - var that = this; - wx.uploadFile({ - url: 'https://upload.qiniup.com', - name: 'file', - filePath: url, - header: { - "Content-Type": "multipart/form-data" - }, - formData: { - token: that.data.token, - }, - success: function (res) { - let data = JSON.parse(res.data); - that.setData({ - signImgUrl: 'https://fileimg.makalu.cc/' + data.key - }) - }, - fail: function (res) { - console.log(res) - } - }); - }, + } }) \ No newline at end of file diff --git a/miniprogram/pages/newAddPage2/letterCommitment/index.json b/miniprogram/pages/newAddPage2/letterCommitment/index.json deleted file mode 100644 index 38d4010..0000000 --- a/miniprogram/pages/newAddPage2/letterCommitment/index.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "usingComponents": {}, - "navigationBarTitleText": "承诺书签名" -} \ No newline at end of file diff --git a/miniprogram/pages/newAddPage2/letterCommitment/index.wxml b/miniprogram/pages/newAddPage2/letterCommitment/index.wxml index b3cb291..d905cb3 100644 --- a/miniprogram/pages/newAddPage2/letterCommitment/index.wxml +++ b/miniprogram/pages/newAddPage2/letterCommitment/index.wxml @@ -1,251 +1,2 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 三级安全教育登记表 - 工程名称: - - - - 身份证复印件粘贴处 - - - - 姓名 - - - - - - - - - - - 文化程度 - - - - - - - 班组 - - - - - - - 入场日期 - - - - - - - 工作卡号 - - - - - - - 三级安全教育内容 - - - - - - - 公司教育 - - - 进行安全基本知识、法规、法制教育,主要内容是: - 1、党和国家的安全生产方针、政策 - 2、安全生产法规、标准和安全知识 - 3、企业安全生产规章制度、安全纪律 - 4、安全生产形势及重大事故安全教训 - 5、安全生产事故后如何抢救伤员、排险、保护现场和及时进行报告 - - - - - 教育人签字: - - - 受教育人签名: - - - - 累计培训()小时 - - - - - - - 公司教育 - - - 进行安全基本知识、法规、法制教育,主要内容是: - 1、党和国家的安全生产方针、政策 - 2、安全生产法规、标准和安全知识 - 3、企业安全生产规章制度、安全纪律 - 4、安全生产形势及重大事故安全教训 - 5、安全生产事故后如何抢救伤员、排险、保护现场和及时进行报告 - - - - - 教育人签字: - - - 受教育人签名: - - - - 累计培训()小时 - - - - - - - 公司教育 - - - 进行现场规章制度和遵章守纪教育,主要内容是: - 1、党和国家的安全生产方针、政策 - 2、安全生产法规、标准和安全知识 - 3、企业安全生产规章制度、安全纪律 - 4、安全生产形势及重大事故安全教训 - 5、安全生产事故后如何抢救伤员、排险、保护现场和及时进行报告 - - - - - 教育人签字: - - - 受教育人签名: - - - - 累计培训()小时 - - - - - - - - - - - 1、高血压、心脏病等基础身体健康问题。 - - - - - - - - - 2、严重呼吸系统疾病、严重心脑血管疾病、肝肾疾病、恶性肿瘤以及药物无法有效控制的高血压和糖尿病等基础性病症状征兆。 - - - - - - - - - - - - - - - - + +pages/newAddPage2/letterCommitment/index.wxml diff --git a/miniprogram/pages/newAddPage2/letterCommitment/index.wxss b/miniprogram/pages/newAddPage2/letterCommitment/index.wxss deleted file mode 100644 index b2bf6ff..0000000 --- a/miniprogram/pages/newAddPage2/letterCommitment/index.wxss +++ /dev/null @@ -1,71 +0,0 @@ -/* pages/newAddPage/letterCommitment/index.wxss */ -.radio_custom_class{ - padding: 10rpx 100rpx 10rpx 0; -} -.radio_label_class{ - color: #ffffff !important; -} -.tableStyle{ - display: flex; - justify-content: space-between; - align-items: center; - width: 50%; -} -.leftBox{ - padding: 12rpx 30rpx; - border: 1px solid #fff; - width: 184rpx; - text-align: center; -} -.rightBox{ - width: 110rpx; - padding: 10rpx; - /* box-sizing: border-box; */ - border: 1px solid #fff; -} -.oneBox-style{ - display: flex; -} -.identity{ - position: absolute; - top: 0px; - right: 0px; - width: 50%; - height: 408rpx; - line-height: 408rpx; - text-align: center; - border: 1px solid #fff; -} -.gongsi-action{ - display: flex; - align-items: center; - border: 1px solid #fff; - font-size: 10px; -} -.gongsi-jiaoyu{ - writing-mode: vertical-lr; - -webkit-writing-mode: vertical-lr; - -ms-writing-mode: vertical-lr; - font-size: 12px; -} -.gongsi-content{ - width: 60%; - border-left: 1px solid #fff; - border-right: 1px solid #fff; -} -.top-jiaoyu{ - width: 100%; - display: flex; - justify-content: space-between; -} -.top-jiaoyutext{ - font-size: 6px; -} -.jiaoyuBox{ - width: 208rpx; - display: flex; - flex-direction: column; - justify-content: space-between; - align-items: center; - height: 228rpx; -} \ No newline at end of file diff --git a/miniprogram/pages/newAddPage2/safetyBriefingLearning/index.js b/miniprogram/pages/newAddPage2/safetyBriefingLearning/index.js deleted file mode 100644 index 7a65359..0000000 --- a/miniprogram/pages/newAddPage2/safetyBriefingLearning/index.js +++ /dev/null @@ -1,670 +0,0 @@ -// pages/newAddPage/safetyBriefingLearning/index.js -const app = getApp() -Page({ - /** - * 页面的初始数据 - */ - data: { - //所有三级安全教育视频 - allVideo:{}, - // 声明一个数组,里面放着要展示的视频链接 - videoList:[], - formatanswer:'', - second:0, - // second_state:true, - timer:'', - - index:0, - answer:false, - - up:false, - down:false, - to:false, - - questionsData:[], - //单独视频url - videoUrl:'', - videoObj:{}, - //学习时长 - learnTime:1, - watchTimer:'', - openId:'', - activeState:1, - //答案提示 - answerTip:'', - //考试分数 - fullScore:'', - examPaperId:'', - signUrl:'', - //控制视频时长 - companyTimer:'', - companyTime:0, - projectTimer:'', - projectTime:0, - groupTimer:'', - groupTime:0, - //试题显示标识 - paperFlag:false - }, - trainingTypeJump(e){ - var that = this - // this.onClickShow(); - let index = e.currentTarget.dataset.index; - var videoList = [] - let titleName = ''; - switch(index) { - case '1': - titleName = '公司级'; - videoList = that.data.allVideo.companyList - break; - case '2': - if(that.data.companyTime < 30) { - app.toast("温馨提示:当前视频学习完成后,方可进行下一个视频学习。"); - return; - } else { - if( that.data.projectTime <30) { - var projectTimer = setInterval(() => { - var projectTime = that.data.projectTime; - if(projectTime >= 0 && projectTime <= 29){ - this.setData({ - projectTime:parseInt(projectTime) + 1, - projectTimer:projectTimer - }) - }else{ - clearInterval(this.data.projectTimer); - } - }, 1000); - } - - } - titleName = '项目级'; - videoList = that.data.allVideo.projectList - - break; - case '3': - if(that.data.companyTime < 30 || that.data.projectTime < 30) { - app.toast("温馨提示:当前视频学习完成后,方可进行下一个视频学习。"); - return; - } else { - if(that.data.groupTime < 30) { - var groupTimer = setInterval(() => { - var groupTime = that.data.groupTime; - if(groupTime >= 0 && groupTime <= 29){ - this.setData({ - groupTime:parseInt(groupTime) + 1, - groupTimer:groupTimer - }) - console.log(that.data.groupTime); - }else{ - clearInterval(this.data.groupTimer); - that.setData({ - paperFlag:true - }) - } - }, 1000); - } - - } - titleName = '班组级'; - videoList = that.data.allVideo.groupList - break; - default: - videoList = [] - break - } - - - this.setData({ - titleName:titleName, - activeState:index, - videoList:videoList, - pageNo:1, - type:1, - trainingType:index, - startDate:'', - endDate:'', - collaborateRanksId:'' - }); - // this.getTrainingList(); - // this.getTrainingNumberOfPeopleCount(); - }, - //打开视频 - bindplay_click(){ - var timer = setInterval(() => { - var second = this.data.second - if(second == parseInt(this.data.videoObj.effectiveDuration)) { - // this.addUserRecord() - } - if(second > 0){ - this.setData({ - second:second - 1, - timer:timer - }) - } - else{ - clearInterval(this.data.timer); - this.setData({ - second_state:false, - }) - } - }, 1000); - - - - var watchTimer = setInterval(() => { - var learnTime = this.data.learnTime; - if(learnTime >= 0){ - this.setData({ - learnTime:parseInt(learnTime) + 1, - watchTimer:watchTimer - }) - }else{ - clearInterval(this.data.watchTimer); - } - }, 1000); - - - }, - - //暂停视频 - bindpause_click(){ - if(this.data.second > 0){ - clearInterval(this.data.timer); - } - if(this.data.learnTime > 0) { - clearInterval(this.data.watchTimer); - } - }, - // 点击查看详情 -chakanBtn(e){ - var data = this.data.questionsData - var i = this.data.index - data[i].type=true - var tempList = data[i].answer_list - var str = '' - for(var j =0;j 0 ){ - this.setData({ - up:true, - }) - if(this.data.questionsData.length - 1 == this.data.index && this.data.questionsData[this.data.index].topic_state == true){ - this.setData({ - to:true, - }) - } - } - } - }, - - //点击上一题 - onClickUp(){ - var that = this - this.setData({ - index:this.data.index - 1 - }) - - - if(that.data.index == 0){ - that.setData({ - up:false, - down:true - }) - }else{ - if(that.data.questionsData[that.data.index].topic_state == false){ - that.setData({ - up:true, - down:false, - to:false - - }) - }else{ - that.setData({ - up:true, - down:true, - to:false - }) - } - } - - var data = this.data.questionsData - var i = this.data.index - var tempList = data[i].answer_list - var str = '' - for(var j =0;j { - var companyTime = this.data.companyTime; - if(companyTime >= 0 && companyTime <= 29){ - this.setData({ - companyTime:parseInt(companyTime) + 1, - companyTimer:companyTimer - }) - console.log(this.data.companyTime) - }else{ - console.log("公司计时结束") - clearInterval(this.data.companyTimer); - } - }, 1000); - - - // 拿取video盒子的宽高 - /** - * 生命周期函数--监听页面加载 - */ - // var that = this; - // var query = wx.createSelectorQuery(); //创建节点选择器 - // //#box需要与wxml里面的id保持一致 - // query.select('#myVideo').boundingClientRect(function (rect) { - // console.log('00000',rect); - // that.setData({ - // myVideo: rect - // }); - // }).exec(); - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady(){ - - }, - /** - * 生命周期函数--监听页面显示 - */ - onShow() { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - - }, - - /** - * 获取在线答题题目信息 - * @param {*} questionType 题目类型(1:安全,2施工技艺) - */ - getOnlineExamList(questionType,projectId,firstWorkType,secondWorkType){ - var that = this - wx.request({ - url: app.globalData.szhUrl+'/mkl/api/getOnlineExamList', - data:{ - "questionType":questionType, - "projectId":projectId, - "firstWorkType":firstWorkType, - "secondWorkType":secondWorkType - }, - method:"GET", - success:function(res){ - if(res.data.length == 0) { - that.setData({ - to:true - }) - } - that.setData({ - questionsData:res.data, - examPaperId:res.data[0].examPaperId == undefined ?null:res.data[0].examPaperId, - fullScore:res.data[0].totalScore== undefined ?null:res.data[0].totalScore - }) - } - }) - }, - - /** - * 提交答题记录 - */ - onClickTo(){ - var that = this - wx.request({ - url: app.globalData.szhUrl+'/mkl/api/addOnlineExamLog', - data:{ - "openId": wx.getStorageSync('openId'), - "idCardNo": wx.getStorageSync('cardId'), - "score":that.data.fullScore, - "fullScore":that.data.fullScore, - "examPaperId":that.data.examPaperId - }, - method:"GET", - success:function(res){ - if(res.data.code == '200'){ - that.setData({ up:false }); - that.setData({ down:false }); - that.setData({ to:false }); - //提交学习记录 - that.addRecord() - wx.redirectTo({ - url: '../letterCommitment/index' - }) - }else{ - app.toast(res.data.msg); - } - } - }) - }, - - /** - * 确认学习 - */ - addRecord() { - var that = this; - wx.request({ - url: app.globalData.szhUrl + "/api/wei/gainWeiSanInfo", - method: "POST", - data: { - dept_id: 131, - project_id: wx.getStorageSync('szhprojectId'), - smz_project_id: wx.getStorageSync('smzprojectId'), - main_id: wx.getStorageSync('options').id, - cultivate_type: wx.getStorageSync('options').cultivateTypeId, - user_name: wx.getStorageSync('answerName'), - resident_id: wx.getStorageSync('cardId'), - result_str: "已通过", - score:that.data.fullScore, - total_score:that.data.fullScore, - exam_paper_id:that.data.examPaperId, - type:'1', - sign_url:that.data.signUrl, - randomScore:Math.floor(Math.random()*10) - }, - header: { - 'content-type': 'application/x-www-form-urlencoded' //修改此处即可 - }, - success(res) { - if (res.data.code == 200) { - console.log("添加学习记录成功") - } - } - }) - }, - - /** - * 获取视频链接 - */ - getVideoURL(projectId,firstWorkType,secondWorkType) { - var that = this - wx.request({ - url: app.globalData.szhUrl+'/mkl/api/getOnlineVideoList', - data:{ - fileType: 1,//视频 - projectId:projectId, - firstWorkType:firstWorkType, - secondWorkType:secondWorkType - }, - method:"GET", - success:function(res){ - if(res.data.code == 0) { - that.setData({ - allVideo:res.data.data - }) - } - var videoList = [] - switch(that.data.activeState ) { - case 1: - videoList = that.data.allVideo.companyList - break; - case 2: - videoList = that.data.allVideo.projectList - break; - case 3: - videoList = that.data.allVideo.groupList - break; - default: - videoList = [] - break - } - that.setData({ - videoList:videoList - }) - that.checkUserFinishedFlag() - } - }) -}, - - /** - * 添加用户学习记录 - */ - addUserRecord() { - var that = this - var completeFlag = parseInt(that.data.learnTime) >= parseInt(that.data.videoObj.effectiveDuration == ""?0: that.data.videoObj.effectiveDuration)?1:0 - wx.request({ - url:app.globalData.szhUrl+'/mkl/api/addEducationRecord', - data:{ - initialId:that.data.videoObj.id, - userId:wx.getStorageSync('idCardNo'), - openId:wx.getStorageSync('userOpenId'), - learningDuration:that.data.learnTime, - completeFlag:completeFlag - }, - method:"POST", - success:function(res){ - if(res.data.code == 0){ - console.log("添加学习记录成功!") - }else{ - console.log("添加学习记录失败!") - } - } - }) - }, - - /** - * 获取用户学习时长 - */ - getUserLearnTime() { - // this.addUserRecord() - this.onClickTo() - }, - - /** - * 查询用户是否学习 - */ - checkUserFinishedFlag() { - var that = this - wx.request({ - url:app.globalData.szhUrl+'/mkl/api/getUserFinishList', - data:{ - initialId:parseInt(that.data.videoObj.id), - userId:wx.getStorageSync('idCardNo') - }, - method:"POST", - success:function(res){ - if(res.data.code == 0){ - if(res.data.data.length >0) { - var obj = res.data.data[0]; - if(obj.completeFlag == "1") { - that.setData({ - second_state:false - }) - } - } - } - } - }) - }, - - //查询用户信息 - getUserInfo() { - var that = this; - let openId = wx.getStorageSync('openId') != null || wx.getStorageSync('openId') ? wx.getStorageSync('openId') : "123" - wx.request({ - url: app.globalData.szhUrl + "/business/saftEducationOpenIdMap/list", - method: "post", - data: { - openId - }, - header: { - 'content-type': 'application/x-www-form-urlencoded' //修改此处即可 - }, - success(res) { - let data = res.data - if(data.code == '0' && data.rows.length > 0){ - let result = data.rows - that.setData({ - signUrl:data.rows[0].signUrl == undefined ? '':data.rows[0].signUrl - }) - wx.setStorageSync('signUrl', data.rows[0].signUrl) - } - } - }) - } - - -}) \ No newline at end of file diff --git a/miniprogram/pages/newAddPage2/safetyBriefingLearning/index.json b/miniprogram/pages/newAddPage2/safetyBriefingLearning/index.json deleted file mode 100644 index 2099bd2..0000000 --- a/miniprogram/pages/newAddPage2/safetyBriefingLearning/index.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "usingComponents": { - "van-tab": "@vant/weapp/tab/index", - "van-tabs": "@vant/weapp/tabs/index" - }, - "navigationBarTitleText": "施工安全交底学习" -} \ No newline at end of file diff --git a/miniprogram/pages/newAddPage2/safetyBriefingLearning/index.wxml b/miniprogram/pages/newAddPage2/safetyBriefingLearning/index.wxml deleted file mode 100644 index 3c8dfb7..0000000 --- a/miniprogram/pages/newAddPage2/safetyBriefingLearning/index.wxml +++ /dev/null @@ -1,102 +0,0 @@ - - - - 安全视频 - - - - - 公司级 - 项目级 - 班组级 - - - - - - - - - - - - - - - - - 温馨提示:请观看视频后进行答题 - - - - 安全考试 - - - - - - {{questionsData[index].topic}} - - - - - - {{item.answer}} - - - - - 查看详情 - - - - - 答案:{{answerTip}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/miniprogram/pages/newAddPage2/safetyBriefingLearning/index.wxss b/miniprogram/pages/newAddPage2/safetyBriefingLearning/index.wxss deleted file mode 100644 index 220183a..0000000 --- a/miniprogram/pages/newAddPage2/safetyBriefingLearning/index.wxss +++ /dev/null @@ -1,68 +0,0 @@ -/* pages/newAddPage/safetyBriefingLearning/index.wxss */ -.chakan{ - position: absolute; - right: 48rpx; - bottom: 20rpx; - color: orange; -} -/* vant-weapp样式 */ -.van-tabs__nav { - background-color: #191d28; -} -.van-ellipsis{ - color: #fff; -} -.van-tabs__line{ - background-color: #fff !important; -} -/* .showBox{ - position: relative; - width: 750rpx; - height: 462rpx; - border: 1px solid red; - box-sizing: border-box; - z-index: 999; -} -.showBox:hover .leftBtn{ - display: block; -} -.showBox:hover .rightBtn{ - display: block; -} -.leftBtn{ - position: absolute; - left: 0; - top:50%; - transform: translate(0,-50%); - width: 48rpx; - height: 80rpx; - color: #000; - border: 1px solid #fff; - z-index: 999; - display: none; -} -.rightBtn{ - position: absolute; - right: 0; - top:50%; - transform: translate(0,-50%); - width: 48rpx; - height: 80rpx; - color: #000; - border: 1px solid #fff; - z-index: 999; - display: none; -} */ -.whoBox{ - position: relative; -} -.outsideBox{ - position: absolute; - top: 0; - left: 0; - width: 100%; - display: none; -} -.showBoxs{ -display: block; -} \ No newline at end of file diff --git a/miniprogram/pages/saft-education-user-bind/index.js b/miniprogram/pages/saft-education-user-bind/index.js index 7fadac7..2a2fdbf 100644 --- a/miniprogram/pages/saft-education-user-bind/index.js +++ b/miniprogram/pages/saft-education-user-bind/index.js @@ -1,395 +1,18 @@ -const app = getApp() // pages/saft-education-user-bind/index.js Page({ /** * 页面的初始数据 */ - data: { - loadShow:false, - phoneNumber:"", - cardId:"", - companyName:"", - typeWordName:"", - userName:"", - companyId:"", - typeWord:"", - manageSign:"", - educationLevelList:[], - educationLevel:'', - emergencyName:'', - emergencyPhone:'', - szhprojectId:"", - smzProjectId:"", - cultureLevel:'', - specialFlag:'', - sex:'', - idCardFront:'', - //验证方式(1手机号,2身份证) - authentication:"1", - authenticationList:[ - { - "id":"1", - "text":'手机号' - }, - { - "id":"2", - "text":'身份证' - } - ] - }, - /** - * - * @param {*} e - */ - onSelectAuthentication(e) { - if(e.detail.id == "1") { - this.setData({ - authentication: e.detail.id, - cardId:"", - phoneNumber:'', - companyName:'', - userName:'', - emergencyName:'', - emergencyPhone:'', - manageSign:"", - educationLevel:1, - cultureLevel:'小学' - }) - } else { - this.setData({ - authentication: e.detail.id, - cardId:'', - phoneNumber:'', - companyName:'', - userName:'', - emergencyName:'', - emergencyPhone:'', - manageSign:"", - educationLevel:1, - cultureLevel:'小学' - }) - } - console.log(this.data.educationLevel) - }, - /** - * 电话号码失去焦点 - */ - inputPhoneNumber(e){ - let {value} = e.detail - if(value >= 11){ - this.getUserInfo(value,'') - } - - }, - - /** - * 身份证号失去焦点 - */ - inputCardId(e){ - let {value} = e.detail - if(value.length >= 18){ - this.getUserInfo('',value) - } - - }, - /** - * 文化程度变化 - */ - onSelectEducationLevel(e) { - console.log(e) - this.setData({ - educationLevel: e.detail.id, - }) - }, - /** - * 紧急联系人 - */ - onEmergencyName(e) { - this.setData({ - emergencyName: e.detail.value - }) - }, - /** - * 紧急联系人联系方式 - */ - onEmergencyPhone(e) { - this.setData({ - emergencyPhone: e.detail.value - }) - }, - /** - * 获取用户信息 - */ - getUserInfo(phoneNumber ='',cardId = ''){ - let {smzProjectId} = this.data - //获取当前扫码用户的openId - let openId = wx.getStorageSync('openId') - let that = this - this.setData({ - loadShow:true - }) - //获取用户在实名制用户信息 - wx.request({ - url: app.globalData.smzUrl+"/mkl/api/searchUserInfoList", - method:"POST", - data:{ - projectId:smzProjectId, - isWork:1, - idcardnum:cardId, - userphone:phoneNumber - }, - header: { - 'content-type': 'application/x-www-form-urlencoded' //修改此处即可 - }, - success(res){ - that.setData({ - loadShow:false - }) - if(res.data.state != 'fails'){ - let userInfo = res.data.data - if(!userInfo){ - app.toast("实名制系统查无此人,请确认系统录入或人员进场") - return; - } - userInfo = userInfo[0] - wx.request({ - url: app.globalData.szhUrl + "/business/saftEducationOpenIdMap/wxList", - method:"post", - data:{ - openId:openId - }, - header: { - 'content-type': 'application/x-www-form-urlencoded' //修改此处即可 - }, - success(signTemp){ - let qrUrl = signTemp.data.rows.length <= 0 ? "":signTemp.data.rows[0].qrUrl - let {name,userphone,idcardnum,teamid,uninName,worktypeid,workType,cultureLevel,specialFlag,sex,idcardimg} = userInfo - that.setData({ - phoneNumber:userphone, - cardId:idcardnum, - companyName:uninName, - typeWordName:workType, - userName:name, - companyId:teamid, - typeWord:worktypeid, - manageSign:qrUrl, - cultureLevel:cultureLevel, - specialFlag:specialFlag, - sex:sex, - idCardFront:idcardimg - }) - - } - }) - }else{ - app.toast('实名制系统查无此人,请确认系统录入或人员进场') - // setTimeout(()=>{ - // wx.redirectTo({ - // url: '../gengduogongneng/gengduogongneng' - // }) - // },2000) - return; - } - } - }) - }, - - bindInfo(){ - let that = this - if(that.data.authentication == "1") { - if(that.data.phoneNumber.length <= 0 || (that.data.manageSign.length <= 0 && that.data.manageSign !='')){ - app.toast("数据填写不完整"); - return; - } - } else { - - if((that.data.manageSign.length <= 0 && that.data.manageSign !='') || that.data.cardId.length <=0){ - app.toast("数据填写不完整"); - return; - } - } - - - this.setData({ - loadShow:true - }) - //获取当前扫码用户的openId - let openId = wx.getStorageSync('openId') - wx.uploadFile({ - //图片上传地址 - url: app.globalData.reqUrl+'/weixin/security/fileUpload', - filePath: this.data.manageSign, - name: 'file', - header: { - "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8" - }, - formData: { user: 'test' }, - success:resTemp => { - wx.request({ - url: app.globalData.szhUrl + "/business/saftEducationOpenIdMap/list", - method:"post", - data:{ - openId - }, - header: { - 'content-type': 'application/x-www-form-urlencoded' //修改此处即可 - }, - success(res){ - let dataFile = JSON.parse(resTemp.data); - let data = res.data - let {szhprojectId,phoneNumber,cardId,companyName,typeWordName,userName,companyId,typeWord,id,educationLevel,emergencyName,emergencyPhone,specialFlag,idCardFront,sex} = that.data - phoneNumber = !phoneNumber ?'':phoneNumber - //判断用户是否变绑定劳务公司 - if(data.code == '0' && data.rows.length > 0){ - wx.request({ - url: app.globalData.szhUrl + '/business/saftEducationOpenIdMap/edit', - method:"post", - data:{ - id, - projectId:szhprojectId, - openId, - phoneNumber, - cardId, - companyName, - typeWordName, - userName, - companyId, - typeWord, - signUrl:dataFile.url, - educationLevel, - emergencyName, - emergencyPhone, - specialFlag, - idCardFront, - sex - }, - success(res){ - that.setData({ - loadShow:false - }) - var firstWorkType = '' - if(res.data.code == '0'){ - wx.navigateTo({ - url: '../Personnel-information-binding/index' - }) - } - - } - }) - }else{ - wx.request({ - url: app.globalData.szhUrl + '/business/saftEducationOpenIdMap/add', - method:"post", - data:{ - projectId:szhprojectId, - openId, - phoneNumber , - cardId, - companyName, - typeWordName, - userName, - companyId, - typeWord, - signUrl:dataFile.url, - educationLevel, - emergencyName, - emergencyPhone, - specialFlag, - idCardFront, - sex - }, - header: { - 'content-type': 'application/x-www-form-urlencoded' //修改此处即可 - }, - success(res){ - that.setData({ - loadShow:false - }) - if(res.data.code == '0'){ - wx.navigateTo({ - url: '../Personnel-information-binding/index' - }) - } - } - }) - } - } - }) - } - }) - - }, - resest(){ - this.setData({ - phoneNumber:"", - cardId:"", - companyName:"", - typeWordName:"", - userName:"", - companyId:"", - typeWord:"", - manageSign:"", - educationLevel:'1', - emergencyName:'', - emergencyPhone:'' - }) - this.getEducatuinLevelList() + data: { }, - /** - * 获取人员文化程度 - */ - getEducatuinLevelList() { - var that = this - wx.request({ - url: app.globalData.szhUrl + '/system/dict/data/listData', - method:"post", - data:{ - dictType:"education_level" - }, - header: { - 'content-type': 'application/x-www-form-urlencoded' //修改此处即可 - }, - success(res){ - var list = [] - if(res.data.code == 0) { - if(res.data.rows.length > 0) { - var data = res.data.rows; - data.forEach(item => { - var obj = {} - obj.id = item.dictValue - obj.text = item.dictLabel - list.push(obj) - }); - that.setData({ - educationLevelList:list - }) - } else { - that.setData({ - educationLevelList:[] - }) - } - } else { - that.setData({ - educationLevelList:[] - }) - } - console.log(that.data.educationLevelList) - } - }) - }, /** * 生命周期函数--监听页面加载 */ onLoad(options) { - let {szhprojectId,smzProjectId} = options - this.setData({ - szhprojectId, - smzProjectId - }) - this.getEducatuinLevelList() + }, /** @@ -433,36 +56,11 @@ Page({ onReachBottom() { }, - /** * 用户点击右上角分享 */ onShareAppMessage() { - }, - goGCLB(){ - wx.redirectTo({ - url: '../gengduogongneng/gengduogongneng' - }) - }, - /** - * 签名 - * @param {} e - */ - sign(e){ - let tempFilePath = e.detail - this.data.manageSign = tempFilePath -   }, - changePage(e){ - if(e.detail){ - this.setData({ - overflow:'aotu' - }) - }else{ - this.setData({ - overflow:'hidden' - }) - } - }, + } }) \ No newline at end of file diff --git a/miniprogram/pages/saft-education-user-bind/index.json b/miniprogram/pages/saft-education-user-bind/index.json deleted file mode 100644 index 90ddadf..0000000 --- a/miniprogram/pages/saft-education-user-bind/index.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "usingComponents": { - "van-overlay": "@vant/weapp/overlay/index" , - "mkl-sign":"../components/sign/sign", - "voucher-select ":"../components/voucher-select" - }, - "navigationStyle":"custom" -} \ 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 index 5153b89..01fbe6f 100644 --- a/miniprogram/pages/saft-education-user-bind/index.wxml +++ b/miniprogram/pages/saft-education-user-bind/index.wxml @@ -1,88 +1,2 @@ - - - - - - - - - 劳务人员信息绑定 - - - - - - - - - - -

*

验证方式 -
- -
- - - -

*

手机号 -
- -
- - - -

*

身份证
- -
- - - - 归属劳务队伍 - - - - - 姓名 - - - - - 文化程度 - - - - - - 紧急联系人 - - - - - 紧急联系人电话 - - - - - - -

*

电子签名 -
- -
- - - - - - 重置 - 绑定 - -
- - - - - - 数据加载中!请稍后... - - \ No newline at end of file + +pages/saft-education-user-bind/index.wxml diff --git a/miniprogram/pages/saft-education-user-bind/index.wxss b/miniprogram/pages/saft-education-user-bind/index.wxss deleted file mode 100644 index fbabc2d..0000000 --- a/miniprogram/pages/saft-education-user-bind/index.wxss +++ /dev/null @@ -1,31 +0,0 @@ -/* pages/voucherManagementAddto/index.wxss */ -.van-picker__mask { - background-image: none !important; - } - .van-hairline--top-bottom:after { - border-top: 1px solid #3a4c8b !important; - border-bottom: 1px solid #3a4c8b !important; - } - - .voucher_select_max{ - padding:0 25rpx; - display: flex; - align-items: center; - background: #212737; - height: 90rpx; - border-radius: 10rpx; -} - - -.voucher_select_max_sign{ - padding:0 25rpx; - display: flex; - align-items: center; - background: #212737; - height: 180rpx; - border-radius: 10rpx; -} - - .van-picker { - background: none !important; - } \ No newline at end of file diff --git a/miniprogram/pages/saft-qr-view/index.js b/miniprogram/pages/saft-qr-view/index.js deleted file mode 100644 index 151caa2..0000000 --- a/miniprogram/pages/saft-qr-view/index.js +++ /dev/null @@ -1,178 +0,0 @@ -const app = getApp() -Page({ - - /** - * 页面的初始数据 - */ - data: { - - - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - app.getOPenId() - const {q} = options; - wx.setStorageSync('options', options) -       if (q) { -         let urlStr = decodeURIComponent(q); - let subStrUrl = urlStr.substr(urlStr.indexOf("?"),urlStr.length-1) - let params = this.getRequest(subStrUrl) - this.checkUserApprovalSkipView(params) -       }else{ - - this.checkUserApprovalSkipView(options) - } - }, - - /** - * 获取请求地址信息 - */ - getRequest(url) { - - var theRequest = new Object(); - var strs; - if (url.indexOf("?") != -1) { - let str = url.substr(1); - strs = str.split("&"); - for (let i = 0; i < strs.length; i++) { - theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]); - } - } - return theRequest; - }, - - /** - * 判断扫码用户是否有权限 - */ - checkUserApprovalSkipView(params){ - //获取当前扫码用户的openId - let openId = wx.getStorageSync('openId') != null || wx.getStorageSync('openId') ?wx.getStorageSync('openId'):"123" - wx.request({ - url: app.globalData.szhUrl + "/business/saftEducationOpenIdMap/list", - method:"post", - data:{ - openId - }, - header: { - 'content-type': 'application/x-www-form-urlencoded' //修改此处即可 - }, - success(res){ - let data = res.data - if(data.code == '0' && data.rows.length > 0){ - let result = data.rows - //获取用户在实名制用户信息 - wx.request({ - url: app.globalData.smzUrl+"/mkl/api/searchUserInfoList", - method:"POST", - data:{ - projectId: params.smzProjectId, - isWork:1, - idcardnum:(!result[0].cardId || result[0].cardId == 'null')?'':result[0].cardId, - userphone:(!result[0].phoneNumber || result[0].phoneNumber == 'null')? '':result[0].phoneNumber - }, - header: { - 'content-type': 'application/x-www-form-urlencoded' //修改此处即可 - }, - success(res){ - - //获取二维码内容 - let companyId = params.companyId.split(",") - let userInfo = res.data.data - if(!userInfo){ - app.toast("实名制系统查无此人,请确认系统录入或人员进场") - setTimeout(()=>{ - wx.redirectTo({ - url: '../gengduogongneng/gengduogongneng' - }) - },2000) - return; - } - if(userInfo.length > 0){ - let companyIds = userInfo[0].uninName - if(companyId.indexOf(companyIds) >= 0){ - //当前扫码用户绑定openId和对应劳务公司,跳转学习页面 - wx.navigateTo({ - url: `../winter-training/index?szhprojectId=${params.projectId}&smzprojectId=${params.smzProjectId}&cultivateType=${params.cultivateTypeId}&mainId=${params.id}&userName=${result[0].userName}&typeWordName=${result[0].typeWordName}&companyName=${result[0].companyName}&signUrl=${result[0].signUrl}&cardId=${result[0].cardId}`, - }) - }else{ - //当前扫码用户绑定公司和对应参与公司不符 - app.toast("无权限学习,用户在实名制绑定协作队伍不符") - setTimeout(()=>{ - // wx.exitMiniProgram({success: (res) => {}}) - wx.redirectTo({ - url: '../gengduogongneng/gengduogongneng' - }) - },2000) - } - } - } - }) - }else{ - //当前扫码用户没有绑定openId,跳转二维码绑定页面 - wx.navigateTo({ - url: `../learn-page/index?szhprojectId=${params.projectId}&smzProjectId=${params.smzProjectId}`, - }) - } - }, - fail(res) { - console.log(res) - } - }) - }, - - - - - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow() { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - - } -}) \ No newline at end of file diff --git a/miniprogram/pages/saft-qr-view/index.json b/miniprogram/pages/saft-qr-view/index.json deleted file mode 100644 index 3928faa..0000000 --- a/miniprogram/pages/saft-qr-view/index.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "usingComponents": {} -} \ No newline at end of file diff --git a/miniprogram/pages/saft-qr-view/index.wxml b/miniprogram/pages/saft-qr-view/index.wxml deleted file mode 100644 index a02adc5..0000000 --- a/miniprogram/pages/saft-qr-view/index.wxml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/miniprogram/pages/saft-qr-view/index.wxss b/miniprogram/pages/saft-qr-view/index.wxss deleted file mode 100644 index 52bde7b..0000000 --- a/miniprogram/pages/saft-qr-view/index.wxss +++ /dev/null @@ -1 +0,0 @@ -/* pages/saft-qr-view/index.wxss */ \ No newline at end of file diff --git a/miniprogram/pages/tempRegistration/index.js b/miniprogram/pages/tempRegistration/index.js index 95f31d8..384605b 100644 --- a/miniprogram/pages/tempRegistration/index.js +++ b/miniprogram/pages/tempRegistration/index.js @@ -1,860 +1,66 @@ // pages/tempRegistration/index.js -const app = getApp() Page({ - /** - * 页面的初始数据 - */ - data: { - laborTeamIdList: [], - workTypeList: [], - //身份证正面信息 - id_card_name: '', - id_card_no: '', - id_card_address: '', - birth: '', - sex: '', - nation: '', - //身份证反面信息 - sign_of_origin: '', - sign_of_date: '', - end_of_date: '', - //身份证正面地址 - id_card_front: '', - //身份证反面地址 - id_card_back: '', - //考勤半身照 - half_body_photo: '', - loadShow: false, - //用户openId - openId: '', - //归属劳务公司(实名制劳务公司) - laborCompanyName: '', - laborCompanyId: '', - //归属劳务公司(实名制班组id) - laborTeamName: '', - laborTeamId: '', - //归属工种 - workTypeId: '', - workTypeName: '', - //预计干活多少天 - expectedWorkDays: '', - //项目id - projectId: '', - //项目名称 - projectName: '', - //project - projectObject:{}, - //人员类型 - personTypeList:[ - { - id:"1", - text:"管理人员", - }, - { - id:"2", - text:"劳务人员" - } - ], - personType:'1', - firstLevelList:[], - firstLevel:'', - laborList:[ - { - id:"8", - text:"特殊工种", - list:[ - "电工","电焊工","架子工","建筑起重思索信号工","建筑起重机械司机","建筑起重机械安装拆卸工","高处作业吊篮安装拆卸工","建筑起重机械安装质量检测工","建筑施工现场内机动车司机","其他工种" - ] - }, - { - id:"9", - text:"普通工种", - list:[ - "钢筋工","木工","混凝土工","泥瓦工","抹灰工","防水工","机修工","腻子工","水电工","安装工","装修工","普工","其他工种" - ] - } - ], - manageList:[ - { - id:'1', - text:"管理人员", - list:[ - "项目经理","常务副经理","项目副经理","项目书记","项目副书记","项目总工","安全总监","工会主席" - ] - }, - { - id:'2', - text:"工程部", - list:[ - "项目经理","正部长","副部长","技术员","试验员","资料员","测量员","施工员" - ] - }, - { - id:'3', - text:"工经部", - list:[ - "部长","预算员" - ] - }, - { - id:'4', - text:"物机部", - list:[ - "正部长","副部长","材料员","机械员" - ] - }, - { - id:'5', - text:"财务部", - list:[ - "部长","会计","出纳" - ] - }, - { - id:'6', - text:"办公室", - list:[ - "办公室主任","劳务员","信息员" - ] - }, - { - id:'7', - text:"安质部", - list:[ - "部长","安全员","质检员" - ] - }, - ], - //管理单位 - managementUnitList:[ - { - id:'1', - text:"建设单位", - }, - { - id:'2', - text:"监理单位", - }, - { - id:'3', - text:"总承包单位", - }, - ], - managementUnit:'', - //文化程度 - educationLevelList:[], - educationLevel:'', - //紧急联系人 - emergencyName:'', - //紧急联系人电话 - emergencyPhone:'', - //用工形式列表 - employmentTypeList:[], - employmentType:'' - }, - - - //选择人员类型 - onPersonType(e) { - this.setData({ - personType:e.detail.id - }) - if(e.detail.id == 1) { - this.setData({ - firstLevelList:this.data.manageList, - firstLevel:this.data.manageList[0].id, - expectedWorkDays:'', - managementUnit:'1' - }) - this.getWorkTypeId(this.data.manageList[0].list) - } else { - this.setData({ - firstLevelList:this.data.laborList, - firstLevel:this.data.laborList[0].id - }) - this.getWorkTypeId(this.data.laborList[0].list) - } - }, - //管理单位 - onManagementUnit(e) { - if(e.detail.id == 1) { - this.setData({ - managementUnit:e.detail.id, - educationLevel:'', - emergencyName:'', - emergencyPhone:'', - expectedWorkDays:'' - }) - } else { - this.setData({ - managementUnit:e.detail.id - }) - } - - }, - //选择归属劳务公司(班组id) - onSelectLabourCompanyName(e) { - this.setData({ - laborCompanyId: e.detail.id, - laborCompanyName: e.detail.text, - laborTeamIdList:e.detail.teamList, - laborTeamId:e.detail.teamList[0].id == undefined ?"":e.detail.teamList[0].id, - laborTeamName: e.detail.teamList[0].text == undefined ?"":e.detail.teamList[0].text - }) - }, - //选择归属劳务公司(班组id) - onSelectLabourTeamName(e) { - this.setData({ - laborTeamId: e.detail.id, - laborTeamName: e.detail.text - }) - }, - onSelectFirstLevel(e) { - this.setData({ - firstLevel:e.detail.id - }) - var list = e.detail.list - //获取二级工种 - this.getWorkTypeId(list) - }, - //选择归属工种 - onSelectworkType(e) { - this.setData({ - workTypeId: e.detail.id, - workTypeName: e.detail.text - }) - }, - //预计干活天数 - onExpectedWorkDays(e) { - this.setData({ - expectedWorkDays: e.detail.value - }) - }, - onClickShow() { - this.setData({ - loadShow: true - }); - }, - - onClickHide() { - this.setData({ - loadShow: false - }); - }, - /** - * 用工形式 - */ - getEmploymentType() { - var that = this - wx.request({ - url: app.globalData.szhUrl + '/system/dict/data/listData', - method: "post", - data: { - dictType: "employment_type" - }, - header: { - 'content-type': 'application/x-www-form-urlencoded' //修改此处即可 - }, - success(res) { - var list = [] - if (res.data.code == 0) { - if (res.data.rows.length > 0) { - var data = res.data.rows; - data.forEach(item => { - var obj = {} - obj.id = item.dictValue - obj.text = item.dictLabel - list.push(obj) - }); - that.setData({ - employmentTypeList: list, - employmentType:list[0].id - }) - } else { - that.setData({ - employmentTypeList: [], - employmentType:'' - }) - } - - } else { - that.setData({ - employmentTypeList: [], - employmentType:'' - }) - } - } - }) - }, - onSelectEmploymentType(e) { - if(e.detail.id == 1) { - this.setData({ - employmentType: e.detail.id, - }) - } else { - this.setData({ - employmentType: e.detail.id, - expectedWorkDays:3 - }) - } - }, - /** - * 获取人员文化程度 - */ - getEducatuinLevelList() { - var that = this - wx.request({ - url: app.globalData.szhUrl + '/system/dict/data/listData', - method: "post", - data: { - dictType: "education_level" - }, - header: { - 'content-type': 'application/x-www-form-urlencoded' //修改此处即可 - }, - success(res) { - var list = [] - if (res.data.code == 0) { - if (res.data.rows.length > 0) { - var data = res.data.rows; - data.forEach(item => { - var obj = {} - obj.id = item.dictValue - obj.text = item.dictLabel - list.push(obj) - }); - that.setData({ - educationLevelList: list, - educationLevel:list[0].id - }) - } else { - that.setData({ - educationLevelList: [], - educationLevel:'' - }) - } - - } else { - that.setData({ - educationLevelList: [], - educationLevel:'' - }) - } - } - }) - }, - /** - * 文化程度变化 + /** + * 页面的初始数据 */ - onSelectEducationLevel(e) { - this.setData({ - educationLevel: e.detail.id, - }) - }, - /** - * 紧急联系人 + data: { + + }, + + /** + * 生命周期函数--监听页面加载 */ - onEmergencyName(e) { - this.setData({ - emergencyName: e.detail.value - }) - }, - /** - * 紧急联系人联系方式 - */ - onEmergencyPhone(e) { - this.setData({ - emergencyPhone: e.detail.value - }) - }, + onLoad(options) { - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - app.getOPenId() - const {q} = options; - console.log(q) - if (q) { - let urlStr = decodeURIComponent(q); - let subStrUrl = urlStr.substr(urlStr.indexOf("?"), urlStr.length - 1) - let params = this.getRequest(subStrUrl) - this.setData({ - projectId: params.projectId - }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { - // 获取当前项目对应劳务实名制的projectId - if(params.projectId != "" && params.projectId != undefined) { - this.getProjectInfo(params.projectId) - } } - // this.setData({ - // projectId: 147 - // }) - // this.getProjectInfo(147) - - if(this.data.personType == 1) { - this.setData({ - firstLevelList:this.data.manageList, - firstLevel:this.data.manageList[0].id, - managementUnit:'1' - }) - this.getWorkTypeId(this.data.manageList[0].list) - } else { - this.setData({ - firstLevel:this.data.laborList, - firstLevel:this.data.laborList[0].id, - managementUnit:'1' - }) - this.getWorkTypeId(this.data.laborList[0].list) - } - this.getEducatuinLevelList() - this.getEmploymentType() - // this.getLaborCompanyId(); - }, - - /** - * 获取当前项目对应关系 - */ - getProjectInfo(projectId) { - var that = this; - wx.request({ - url: app.globalData.szhUrl + '/system/registration/getProjectInfo', - data: { - "projectId": projectId - }, - header: { - "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8" - }, - method: "POST", - - success: (res) => { - - if(res.data.code == 0) { - if(res.data.data.length > 0) { - var list = res.data.data; - that.setData({ - projectObject:list[0], - projectName:list[0].projectName - }) - that.onClickShow(); - //获取用户openId - that.getUserOpenId(); - //获取归属劳务公司列表 - that.getLaborCompanyId(); - } - } - } - }) - }, - /** - * 获取请求地址信息 - */ - getRequest(url) { - - var theRequest = new Object(); - var strs; - if (url.indexOf("?") != -1) { - let str = url.substr(1); - strs = str.split("&"); - for (let i = 0; i < strs.length; i++) { - theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]); - } - } - return theRequest; - }, - /** - * 获取用户openId - */ - getUserOpenId() { - wx.login({ - success: res => { - wx.request({ - url: app.globalData.reqUrl + '/weixin/userLogin/getOpenId', - data: { - "code": res.code, - "appId": app.globalData.appId, - }, - success: (res) => { - this.setData({ - openId: res.data.openid, - }) - } - }) - this.onClickHide() - } - }) - }, - /** - * 获取工种类型 - */ - getWorkTypeId: function (selectList) { - let list = []; - wx.request({ - url: app.globalData.smzUrl + '/mkl/basic/getWorkTypeList?appid=1c3d51aaf0c54a15b2c727ace5ccbe8d&sign=E5153931BE2113A48EF2E759811F375E', - data: {}, - method: "GET", - success: (res) => { - if (res.data.code == 0) { - if (res.data.data.length > 0) { - for (let i = 0; i < res.data.data.length; i++) { - if(selectList.includes(res.data.data[i].workType)) { - var obj = {}; - obj.id = res.data.data[i].id; - obj.text = res.data.data[i].workType; - list.push(obj); - } - } - - } - } - this.setData({ - workTypeList: list, - workTypeId:list[0].id, - workTypeName:list[0].text - }) - this.onClickHide(); - } - }) - }, - - /** - * 获取劳务公司类型 - */ - getLaborCompanyId: function () { - var that = this - let list = []; - wx.request({ - url:app.globalData.smzUrl + '/mkl/tools/getToken?appid=1c3d51aaf0c54a15b2c727ace5ccbe8d&projectId='+that.data.projectObject.smz, - //url:app.globalData.smzUrl + '/mkl/tools/getToken?appid=1c3d51aaf0c54a15b2c727ace5ccbe8d&projectId=169', - data:{}, - method:"GET", - header:{ - appsecret:'AB05BFC6CC7D406BA45B1E08219E41D1' - }, - success:(res=>{ - if(res.data.code == 0) { - var sign = res.data.sign - - wx.request({ - url: app.globalData.smzUrl + '/mkl/basic/getUnitList?appid=1c3d51aaf0c54a15b2c727ace5ccbe8d&sign='+sign+'&projectId=' + that.data.projectObject.smz, - // url: app.globalData.smzUrl + '/mkl/basic/getUnitList?appid=1c3d51aaf0c54a15b2c727ace5ccbe8d&sign='+sign+'&projectId=169' , - data: {}, - method: "GET", - success: (res) => { - if (res.statusCode == 200) { - if (res.data.data.length > 0) { - for (let i = 0; i < res.data.data.length; i++) { - var obj = {}; - obj.id = res.data.data[i].unitTypeid; - obj.text = res.data.data[i].enterpriseName; - var tempList = [] - if(res.data.data[i].teamList.length > 0) { - res.data.data[i].teamList.forEach(item=>{ - var teamObj = {} - teamObj.id = item.id - teamObj.text = item.teamName - tempList.push(teamObj) - }) - } - obj.teamList = tempList - list.push(obj); - } - - } - } - console.log(list) - this.setData({ - laborCompanyIdList: list, - laborCompanyId:list[0].id, - laborCompanyName:list[0].text, - laborTeamIdList:list[0].teamList, - laborTeamId:list[0].teamList[0].id, - laborTeamName:list[0].teamList[0].text - }) - this.onClickHide(); - } - }) - } - }) - }) - - - }, - - /** - * - * 身份证正面上传 - * - */ - onImagesIdCardFront(e) { - // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式 - wx.uploadFile({ - //图片上传地址 - url: app.globalData.reqUrl + '/weixin/security/fileUpload', - filePath: e.detail[0], - name: 'file', - header: { - "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8" - }, - formData: { - user: 'test' - }, - success: res => { - let data = JSON.parse(res.data); - this.setData({ - id_card_front: data.url - }); - - let that = this; - - wx.request({ - url: app.globalData.szhUrl + '/weixin/tempRegistration/ocrIdCard', - data: { - path: data.url, - type: 'front' - }, - method: "POST", - success: function (res1) { - that.setData({ - id_card_name: res1.data.words_result.姓名.words, - id_card_no: res1.data.words_result.公民身份号码.words, - id_card_address: res1.data.words_result.住址.words, - birth: res1.data.words_result.出生.words, - sex: res1.data.words_result.性别.words, - nation: res1.data.words_result.民族.words, - }); - } - }) - }, - }); - }, - //身份证反面上传 - onImagesArr(e) { - // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式 - wx.uploadFile({ - //图片上传地址 - url: app.globalData.reqUrl + '/weixin/security/fileUpload', - filePath: e.detail[0], - name: 'file', - header: { - "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8" - }, - formData: { - user: 'test' - }, - success: res => { - let data = JSON.parse(res.data); - this.setData({ - id_card_back: data.url - }); - - let that = this; - - wx.request({ - url: app.globalData.szhUrl + '/weixin/tempRegistration/ocrIdCard', - data: { - path: data.url, - type: 'back' - }, - method: "POST", - success: function (res1) { - that.setData({ - sign_of_origin: res1.data.words_result.签发机关.words, - sign_of_date: res1.data.words_result.签发日期.words, - end_of_date: res1.data.words_result.失效日期.words, - }); - } - }) - }, - }); - }, - //考勤半身照上传 - onHalfBodyImg(e) { - // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式 - wx.uploadFile({ - //图片上传地址 - url: app.globalData.reqUrl + '/weixin/security/fileUpload', - filePath: e.detail[0], - name: 'file', - header: { - "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8" - }, - formData: { - user: 'test' - }, - success: res => { - let data = JSON.parse(res.data); - this.setData({ - half_body_photo: data.url - }); - }, - }); - }, - - add: function () { - if(this.data.personType == 1) { - //管理人员 - if (this.data.managementUnit == '' || this.data.managementUnit == undefined) { - app.toast("请选择管理单位"); - return; - } - } - - - - //判断值是否为空 - if (this.data.laborCompanyId == '' || this.data.laborCompanyId == undefined) { - app.toast("请选择归属劳务公司"); - return; - } else if (this.data.laborTeamId == '' || this.data.laborTeamId == undefined) { - app.toast("请选择归属劳务班组"); - return; - } else if (this.data.firstLevel == '' || this.data.firstLevel == undefined) { - app.toast("请选择一级工种"); - return; - } else if (this.data.workTypeId == '' || this.data.workTypeId == undefined) { - app.toast("请选择二级工种"); - return; - } else if (this.data.employmentType == '' || this.data.employmentType == undefined) { - app.toast("请选择用工形式"); - return; - } else if (this.data.id_card_front == '' || this.data.id_card_front == undefined) { - app.toast("请上传身份证正面照片"); - return; - } else if (this.data.id_card_back == '' || this.data.id_card_back == undefined) { - app.toast("请上传身份证反面照片"); - return; - } else if (this.data.id_card_no == '' || this.data.id_card_no == undefined) { - app.toast("请填写身份证号码"); - return; - } else if (this.data.half_body_photo == '' || this.data.half_body_photo == undefined) { - app.toast("请上传考勤半身照片"); - return; - } - - //身份证校验 - wx.request({ - header: { - 'content-type': 'application/x-www-form-urlencoded' - }, - url: app.globalData.szhUrl + '/system/registration/checkUser', - data: { - idCardNo: this.data.id_card_no, - projectId:this.data.projectId - }, - method: "POST", - success: res => { - if (res.data.code == 0) { - wx.setStorageSync('userOpenId', this.data.openId) - wx.setStorageSync('idCardNo', this.data.id_card_no) - wx.request({ - header: { - 'content-type': 'application/x-www-form-urlencoded' - }, - url: app.globalData.szhUrl + '/system/registration/add', - data: { - projectId:this.data.projectId, - openId: this.data.openId, - laborCompanyId:this.data.laborCompanyId, - laborCompanyName:this.data.laborCompanyName, - laborTeamId: this.data.laborTeamId, - laborTeamName: this.data.laborTeamName, - workTypeId: this.data.workTypeId, - workTypeName: this.data.workTypeName, - expectedWorkDays: this.data.expectedWorkDays, - idCardFront: this.data.id_card_front, - idCardBack: this.data.id_card_back, - idCardName: this.data.id_card_name, - idCardNo: this.data.id_card_no, - birth: this.data.birth, - sex: this.data.sex, - nation: this.data.nation, - halfBodyPhoto: this.data.half_body_photo, - idCardAddress: this.data.id_card_address, - signOfOrigin: this.data.sign_of_origin, - signOfDate: this.data.sign_of_date, - endOfDate: this.data.end_of_date, - personType:this.data.personType, - firstLevel:this.data.firstLevel, - educationLevel:this.data.educationLevel, - emergencyName:this.data.emergencyName, - emergencyPhone:this.data.emergencyPhone, - employmentType:this.data.employmentType - }, - method: "POST", - success: res=> { - if (res.data.code == 0) { - app.toast("添加成功!") - if(this.data.personType == 1) { - //在需要退出小程序的地方调用添加下面代码即可(js文件中) - wx.exitMiniProgram({ - success: (res) => {} - }) - } else { - wx.redirectTo({ - url: '../newAddPage/safetyBriefingLearning/index?projectId='+this.data.projectId+"&firstWorkType="+this.data.firstLevel+"&secondWorkType="+this.data.workTypeId - ,complete:function(res){ - console.log(res) - },fail: err => { - console.log(err) - } - }); - } - - } else { - app.toast("添加失败"); - return; - } - } - }) - } else { - if(res.data.code == 500 && res.data.msg == "人员信息已存在,无需重复录入!") { - var that = this - //人员二次进场,修改数据状态 - wx.request({ - header: { - 'content-type': 'application/x-www-form-urlencoded' - }, - url: app.globalData.szhUrl + '/mkl/api/changTempoaryPersonState', - data: { - projectId:that.data.projectId, - idCardNo: that.data.id_card_no, - auditState:0 - }, - method: "POST", - success: function (result) { - if (result.data.code == 0) { - app.toast("温馨提醒:人员信息已成功提交,审核通过后可通过人脸识别闸机进场!"); - } - } - }) - } else { - wx.redirectTo({ - url: '../newAddPage/safetyBriefingLearning/index?projectId='+that.data.projectId - }) - } - } - } - }) - }, - /** - * 重置 - */ - resetForm() { - wx.reLaunch({ - url: '../tempRegistration/index' - }) - }, - /** - * 身份证号码输入 - */ - onidCardIdNo(e) { - if (e.detail.value != "") { - this.setData({ - id_card_no: e.detail.value - }) - } - } }) \ No newline at end of file diff --git a/miniprogram/pages/tempRegistration/index.json b/miniprogram/pages/tempRegistration/index.json deleted file mode 100644 index 803abc5..0000000 --- a/miniprogram/pages/tempRegistration/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "usingComponents": { - "van-overlay": "@vant/weapp/overlay/index" - }, - "navigationStyle":"custom" -} \ No newline at end of file diff --git a/miniprogram/pages/tempRegistration/index.wxml b/miniprogram/pages/tempRegistration/index.wxml index fa67795..df20ea7 100644 --- a/miniprogram/pages/tempRegistration/index.wxml +++ b/miniprogram/pages/tempRegistration/index.wxml @@ -1,136 +1,2 @@ - - - - - - - - 劳务人员信息注册 - - - - - - - - - - - - - {{projectName}} - - - -

*

人员类型
- -
- - -

*

管理单位
- -
- - -

*

归属单位
- -
- - -

*

归属劳务班组
- -
- - -

*

归属工种
- -
- - - - - - - -

*

用工形式
- -
- - - 文化程度 - - - - - - 紧急联系人 - - - - - 紧急联系人电话 - - - - - - -

*

身份证照片上传
- - - - - - - - 上传身份证正面 - - - - - - - - - 上传身份证反面 - - - - -
- - - - 姓名 - - - - -

*

身份证号码
- -
- - - - -

*

上传考勤半身照
- -
- - - 重置 - 保存 - - -
- - - - 数据加载中!请稍后... - - - - +pages/tempRegistration/index.wxml diff --git a/miniprogram/pages/tempRegistration/index.wxss b/miniprogram/pages/tempRegistration/index.wxss deleted file mode 100644 index dc0c183..0000000 --- a/miniprogram/pages/tempRegistration/index.wxss +++ /dev/null @@ -1,47 +0,0 @@ -/* pages/tempRegistration/index.wxss */ -.van-picker__mask { - background-image: none !important; - } - .van-hairline--top-bottom:after { - border-top: 1px solid #3a4c8b !important; - border-bottom: 1px solid #3a4c8b !important; - } - .van-picker { - background: none !important; - } - /* 身份证部分 */ - .identity-prove{ - display: flex; - justify-content: space-between; - align-items: center; - } - .identity-prove-box{ - display: flex; - flex-direction: column; - justify-content: space-between; - align-items: center; - width: 330rpx; - height: 260rpx; - border: 1px solid #212838; - } - .identity-prove-top{ - position: relative; - width: 100%; - height: 196rpx; - } - .identity-prove-tops{ - position: relative; - width: 100%; - height: 196rpx; - } - .identity-prove-bottom{ - text-align: center; - width: 100%; - height: 60rpx; - line-height: 60rpx; - font-size: 28rpx; - color: #8ca0e7; - background-color: #30364e; - margin-top: 50rpx; - } - \ No newline at end of file diff --git a/miniprogram/pages/temporaryToExamine/index.js b/miniprogram/pages/temporaryToExamine/index.js index aea1bcc..51349f5 100644 --- a/miniprogram/pages/temporaryToExamine/index.js +++ b/miniprogram/pages/temporaryToExamine/index.js @@ -1,517 +1,66 @@ // pages/temporaryToExamine/index.js -const app = getApp() Page({ - /** - * 页面的初始数据 - */ - data: { - activeState:1, - a:0, - b:0, - c:0, - projectName:'', - projectId:'', - loginName:'', - userName:'', + /** + * 页面的初始数据 + */ + data: { - //筛选条件 - startDate:'', - endDate:'', - //列表数据 - environList:[], - //数据加载参数 - show:false, - initData:{}, + }, - stateShow:false, - nav:0, + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { - //当前选中数量 - number:0, - //是否全选 - allchecked:false, + }, - //审核结果信息 - id:'',//当前数据ID - auditState:0,//审核结果(0:待审核;1:通过;2:驳回) - labelShow:true, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { - //数字化管控平台project - szhProjectId:'', - }, + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { - //项目切换 返回值 - onProjectSelect(e){ - this.onClickShow(); - let projectId = e.detail.id; - let projectName = e.detail.text; - app.globalData.projectId = projectId; - app.globalData.projectName = projectName; - this.setData({ - projectId:projectId, - projectName:projectName - }) - // 获取当前项目对应劳务实名制的projectId - if(projectId != "" && projectId != undefined) { - this.getProjectInfo(projectId) } - - }, - /** - * 获取当前项目对应关系 - */ - getProjectInfo(projectId) { - var that = this; - wx.request({ - url: app.globalData.reqUrl + '/weixin/training/getProjectCorrespondence', - data: { - "projectId": projectId - }, - method: "get", - success: function (res) { - that.setData({ - szhProjectId:res.data.szh - }) - that.selectEnvironDayAndMonth(0); - } - }) - - - }, - showPopup() { - this.setData({ show: true }); - }, - /** - * 返回到更多功能页面 - */ - goGCLB:function(){ - wx.redirectTo({ - url: '../../pages/gengduogongneng/gengduogongneng' - }) - }, - onClose() { - this.setData({ show: false }); - }, - onClickShow() { - this.setData({ show: true }); - }, - - onClickHide() { - this.setData({ show: false }); - }, - - //审核结果弹窗 - onWarningInfo(e){ - this.setData({ - stateShow:true, - id:e.currentTarget.dataset.id, - }) - }, - - //审核结果标签切换 - onLabelNav(e){ - this.setData({ - nav:e.currentTarget.dataset.nav, - auditState:e.currentTarget.dataset.nav - }) - }, - - // tab切换 - trainingTypeJump(e){ - var that = this - // this.onClickShow(); - let index = e.currentTarget.dataset.index; - var videoList = [] - let titleName = ''; - - - switch(index) { - case '1': - titleName = '待审核'; - this.selectEnvironDayAndMonth(0); - this.setData({labelShow:true}); - break; - case '2': - titleName = '已通过'; - this.selectEnvironDayAndMonth(1); - this.setData({labelShow:false}) - break; - case '3': - titleName = '已驳回'; - this.selectEnvironDayAndMonth(2); - this.setData({labelShow:false}); - break; - default: - break - } - - - this.setData({ - titleName:titleName, - activeState:index, - videoList:videoList, - pageNo:1, - type:1, - trainingType:index, - startDate:'', - endDate:'', - collaborateRanksId:'' - }); - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - var that = this; - //启动蒙版 - that.onClickShow(); - //获取缓存数据 - wx.getStorage({ - key: 'userinfo', - success:function(res){ - that.setData({ - loginName:res.data.loginName, - userName:res.data.userName, - projectName: app.globalData.projectName, - projectId:app.globalData.projectId, - initData:{text:app.globalData.projectName,id:app.globalData.projectId} - }) - that.getProjectInfo(app.globalData.projectId) - } - }); - }, - - /** - * 加载待审核,已通过,已驳回审核列表信息 - */ - selectEnvironDayAndMonth(auditState){ - var that = this; - wx.request({ - url: app.globalData.szhUrl+'/mkl/api/getTemporaryPersonnelRegistrationList', - data:{ - "auditState":auditState, - "startDate":this.data.startDate, - "endDate":this.data.endDate, - "projectId":this.data.szhProjectId - }, - method:"GET", - success:function(res){ - //关闭蒙版 - that.onClickHide(); - that.setData({ - environList:res.data.data, - a:res.data.dsh_num, - b:res.data.ytg_num, - c:res.data.ybh_num - }) - } - }) - }, - - /** - * 审核提交 - */ - submit:function(){ - var that = this; - if(this.data.auditState == 0){ - app.toast("请选择审核结果!"); - return; - } - - var ids = [] - var list = this.data.environList - for(let i = 0;i 9) ? month : ("0" + month); - day = (day < 10) ? ("0" + day) : day; - var today = year + "-" + month + "-" + day; - return today; - }, - - /** - * 打开附件 - * @param {url} e - */ - openFile(e){ - var url = e.currentTarget.dataset.url - wx.downloadFile({ - // 示例 url,并非真实存在 - url: url, - success: function (res) { - const filePath = res.tempFilePath - wx.openDocument({ - filePath: filePath, - success: function (res) { - console.log('打开文档成功') - } - }) - } - }) - }, - - /** - * 全选 - */ - checkAll(){ - var selectAllStatus = this.data.allchecked; - selectAllStatus = !selectAllStatus; - var dataList = this.data.environList; - for (let i = 0; i < dataList .length; i++) { - dataList [i].selected = selectAllStatus; - } - this.setData({ - allchecked: selectAllStatus, - environList: dataList, - }); - //计算已选数量 - this.countSelectNum(); - }, - - /** - * 选择 - */ - selectList(e){ - var index = e.currentTarget.dataset.index - let dataArr = this.data.environList - let selected = dataArr[index].selected - dataArr[index].selected = !selected - this.setData({ - environList: dataArr - }); - - //判断全选 - for (var i = 0; i < this.data.environList.length; i++) { - if (this.data.allchecked){ - if (!this.data.environList[i].selected){ - this.setData({ - allchecked: false - }); - break; - } - }else{ - if (this.data.environList[i].selected) { - this.setData({ - allchecked: true - }); - } else { - this.setData({ - allchecked: false - }); - break; - } - } - } - //计算已选数量 - this.countSelectNum() - }, - - /** - * 计算已选数量 - */ - countSelectNum(){ - var number = 0; - let dataArr = this.data.environList - for(let i = 0;i < dataArr.length;i++){ - if(dataArr[i].selected)number++ - } - this.setData({ - number: number - }); - }, - - //筛选待审核列表 - screenCondition1(e){ - this.setData({ - startDate:e.detail.startDate, - endDate:e.detail.endDate, - }) - this.selectEnvironDayAndMonth(0); - }, - - //筛选已通过列表 - screenCondition2(e){ - this.setData({ - startDate:e.detail.startDate, - endDate:e.detail.endDate, - }) - this.selectEnvironDayAndMonth(1); - }, - - //筛选已驳回列表 - screenCondition3(e){ - this.setData({ - startDate:e.detail.startDate, - endDate:e.detail.endDate, - }) - this.selectEnvironDayAndMonth(2); - }, - - //再次人员入场 - resynchronousTemporaryPersonnel(data) { - //1 进场 2退场 - wx.request({ - url: app.globalData.smzUrl+'/mkl/api/userInfoTempEnterAndOut', - data:{ - "projectId":data.smz, - "idcardnum": data.id_card_no, - "isWork":1 - }, - method:"POST", - success:function(res){ - app.toast("人员已再次入场"); - console.log(res) - } - }) - - } - - - }) \ No newline at end of file diff --git a/miniprogram/pages/temporaryToExamine/index.json b/miniprogram/pages/temporaryToExamine/index.json deleted file mode 100644 index 3ecdb22..0000000 --- a/miniprogram/pages/temporaryToExamine/index.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "usingComponents": { - "van-row": "@vant/weapp/row", - "van-col": "@vant/weapp/col", - "van-tab": "@vant/weapp/tab/index", - "van-tabs": "@vant/weapp/tabs/index", - "van-tag": "@vant/weapp/tag/index", - "van-overlay": "@vant/weapp/overlay/index" - }, - "navigationBarTitleText": "临时人员审核" - } \ No newline at end of file diff --git a/miniprogram/pages/temporaryToExamine/index.wxml b/miniprogram/pages/temporaryToExamine/index.wxml index e54b5f4..e336009 100644 --- a/miniprogram/pages/temporaryToExamine/index.wxml +++ b/miniprogram/pages/temporaryToExamine/index.wxml @@ -1,402 +1,2 @@ - - - - - - 待审核({{a}}) - 已通过({{b}}) - 已驳回({{c}}) - - - - - - - - - - - - - - - 待审核人员列表 - - - - - - - - - - - {{item.labor_team_name}} - - - - - - - - 归属工种: - {{item.work_type_name}} - - - - 姓名: - {{item.id_card_name}} - - - - 注册时间:{{item.create_time}} - 安全教育时间:{{item.safety_education_time}} - 安全教育成绩: - {{item.score}}分 - (合格) - (不合格) - - - 安全承诺书签订时间:{{item.sign_time}} - - - - - - - - - - - - - - - - - - 已通过人员列表 - - - - - - - - - {{item.labor_team_name}} - - - - - - - - 归属工种: - {{item.work_type_name}} - - - - 姓名: - {{item.id_card_name}} - - - - 注册时间:{{item.create_time}} - 安全教育时间:{{item.safety_education_time}} - 安全教育成绩: - {{item.score}}分 - (合格) - (不合格) - - - 安全承诺书签订时间:{{item.sign_time}} - - - - - - - - - - - - - - - - - - 已驳回人员列表 - - - - - - - - - - {{item.labor_team_name}} - - - - - - - - 归属工种: - {{item.work_type_name}} - - - - 姓名: - {{item.id_card_name}} - - - - 注册时间:{{item.create_time}} - 安全教育时间:{{item.safety_education_time}} - 安全教育成绩: - {{item.score}}分 - (合格) - (不合格) - - - 安全承诺书签订时间:{{item.sign_time}} - - - - - - - - - - - - - - - - - - - - - - - 审核结果 - - 通过 - 驳回 - - - - 关闭 - 确定 - - - - - - - - - - 数据加载中!请稍后... - - - - - - 全选 - - - - 已选 ({{number}}) - - - 去审核 - - - \ No newline at end of file +pages/temporaryToExamine/index.wxml diff --git a/miniprogram/pages/temporaryToExamine/index.wxss b/miniprogram/pages/temporaryToExamine/index.wxss deleted file mode 100644 index 9b5cef1..0000000 --- a/miniprogram/pages/temporaryToExamine/index.wxss +++ /dev/null @@ -1,167 +0,0 @@ -/* pages/temporaryToExamine/index.wxss */ -.van-ellipsis{ - background: #191d28; - } - .van-tab--active{ - color:#8aa2e8 !important; - } - .van-hairline--top-bottom:after{ - border-width: 0 0 !important - } - .van-tabs__line{ - background: #8aa2e8 !important; - font-weight: bold !important; - } - .van-tag--mark{ - margin:0 10rpx ; - } - .van-tag--mark,.van-tag--mark:after { - border-radius: 15rpx 0 15rpx 0 !important; - } - /* 页面样式 */ - .max_content_none{ - padding: 0 0 50rpx; - } - .new_tips{ - text-align: center; - font-size: 24rpx; - color:#8aa2e8 ; - padding: 20rpx 0; - } - .new_tips image{ - width: 30rpx; - height: 30rpx; - } - .new_nav{ - padding:200rpx 30rpx 30rpx 30rpx; - } - .new_con_info{ - padding: 30rpx 0 0; - } - .new_con_info_min{ - background:#232943 ; - border-radius: 20rpx; - padding:20rpx 30rpx; - margin-bottom: 30rpx; - } - .new_con_title{ - font-weight: bold; - font-size: 30rpx; - } - .new_con_ds{ - padding: 20rpx 0 0; - } - .new_con_td{ - color:#8aa2e8 ; - font-size: 26rpx; - padding: 8rpx; - } - .new_zhong_clz{ - font-size: 28rpx; - color: #9499ac; - text-align: center; - margin-top: 20rpx; - } - .new_zhong_wc{ - background:linear-gradient(to right, #8b4bf7 , #7457ff); - font-size: 28rpx; - text-align: center; - margin-top: 20rpx; - padding: 10rpx 0; - border-radius: 50rpx; - } - .new_zhong_dcb{ - font-size: 28rpx; - color: #f49829; - text-align: center; - margin-top: 20rpx; - } - .new_zhong_ycb{ - background:#5c5e6b; - font-size: 28rpx; - text-align: center; - margin-top: 20rpx; - padding: 10rpx 0; - border-radius: 50rpx; - } - - /* 弹窗 */ - .state_wrapper{ - display: flex; - align-items: center; - justify-content: center; - height: 100%; - } - .state_content{ - width: 90%; - background: #1d212e; - border-radius: 10rpx; - } - .state_content_title{ - padding: 30rpx; - } - .state_content_nav{ - padding: 15rpx 30rpx; - display: flex; - align-items: center; - } - .state_content_nav view{ - padding: 5rpx 30rpx; - border: 1px solid #444957; - color: #444957; - margin-right: 30rpx; - font-size: 26rpx; - border-radius: 30rpx; - } - .state_content_nav .active{ - border: 1px solid #8aa2e8; - color: #8aa2e8; - } - .state_content_remar_max{ - padding: 30rpx; - } - .state_content_remar{ - background: #2c3346; - padding: 30rpx; - border-radius: 10rpx; - } - .state_content_remar textarea{ - min-height: 150rpx; - width:100%; - background: #2c3346; - } - .state_content_btn{ - padding: 30rpx 30rpx 0; - display: flex; - align-items: center; - justify-content:flex-end; - } - .state_content_btn view{ - padding: 10rpx; - width: 130rpx; - border: 1px solid #252c3d; - background: #252c3d; - text-align: center; - color: #6a7faa; - margin-left: 20rpx; - } - /* 外盒子边框 */ - .boxInsideStyle{ - padding: 0rpx 30rpx; - } - .whoBox{ - position: absolute; - top: 144rpx; - left: 0; - width: 100%; - display: none; -} -/* .outsideBox{ - position: absolute; - top: 0; - left: 0; - -} */ -.showBoxs{ -display: block; -} \ No newline at end of file diff --git a/miniprogram/utils/api.js b/miniprogram/utils/api.js deleted file mode 100644 index 4e9e9f7..0000000 --- a/miniprogram/utils/api.js +++ /dev/null @@ -1,40 +0,0 @@ -function request (url, method, data, header = {}) { - wx.showLoading({ - title: '加载中' - }) - return new Promise((resolve, reject) => { - wx.request({ - url: app.globalData.reqUrl+ url, - method: method, - data: data, - header: { - 'content-type': 'application/json', - 'Authorization': 'Bearer '+wx.getStorageSync('cookie').toString(), - ...header - }, - success: function (res) { - wx.hideLoading() - resolve(res.data) - }, - fail: function (error) { - wx.hideLoading() - reject(error) - }, - complete: function () { - wx.hideLoading() - } - }) - }) - } - function get (obj) { - return request(obj.url, 'GET', obj.data) - } - function post (obj) { - return request(obj.url, 'POST', obj.data) - } - - export default { - request, - get, - post - } \ No newline at end of file