diff --git a/pages/realName/workPlan-details/index.vue b/pages/realName/workPlan-details/index.vue index e50af56..1f7485a 100644 --- a/pages/realName/workPlan-details/index.vue +++ b/pages/realName/workPlan-details/index.vue @@ -24,7 +24,9 @@ - + @@ -53,7 +55,12 @@ - + {{ item.name }} @@ -63,7 +70,12 @@ - + {{ item.certificateName }}({{ item.certificateNum }}) + + + + + {{ item.times }} + + @@ -144,7 +162,10 @@ export default { holdCardList: [], // 持证信息 holdCardTitle: '', holdCardDetailsList: [], // 持证信息详情 - standGuardList: [], // 站班信息 + standGuardList: [ + { img_src: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/shuijiao.jpg', times: '9:20:06' }, + { img_src: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg', times: '9:20:06' } + ], // 站班信息 contentId: '', loading: false, commonParams: { @@ -153,6 +174,31 @@ export default { } } }, + computed: { + getItemClass() { + return index => { + const styleIndex = index % 3 + switch (styleIndex) { + case 0: + return 'blue-border' + case 1: + return 'orange-border' + case 2: + return 'green-border' + } + } + }, + getPersonStyle() { + return item => { + const { kqState, userState } = item + + if (userState == 1 && kqState == 1) return 'style_1' // 固定人员 打卡 + if (userState == 1 && kqState != 1) return 'style_2' // 固定人员 未打卡 + if (userState != 1 && kqState == 1) return 'style_3' // 临时人员 打卡 + if (userState != 1 && kqState != 1) return 'style_4' // 临时人员 未打卡 + } + } + }, methods: { leftClick() { uni.navigateTo({ url: '/pages/realName/workPlan/index' }) @@ -172,6 +218,7 @@ export default { const response = await getStandGuardImgApi(params) this.workPersonList = res.data + console.log('人员信息---', res.data) this.holdCardList = res.datac this.standGuardList = response.data }, @@ -190,7 +237,7 @@ export default { }) const res = await getHoldCardInfoApi(params) uni.hideLoading() - console.log('resresres持证信息详情--', res) + // console.log('resresres持证信息详情--', res) this.holdCardDetailsList = res.data }, /* 关闭持证信息弹框 */ @@ -202,6 +249,22 @@ export default { onClickTableTr(id) { // 跳转人员信息页面 uni.navigateTo({ url: `/pages/realName/index/pages/personDetail?idNumber=${id}` }) + }, + /* 全部人员按钮 */ + onSearchAllPerson() { + this.contentId = '' + this.getWorkPersonnelData() + }, + /* 预览图片 */ + onPreviewImage(index) { + uni.previewImage({ + urls: [ + 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/shuijiao.jpg', + 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg' + ], + current: index, + loop: true + }) } }, onLoad(options) { @@ -240,11 +303,27 @@ export default { view { width: 18%; margin: 12rpx 0 12rpx calc(10% / 4); + box-sizing: border-box; color: #fff; text-align: center; border-radius: 12rpx; + // background-color: #3f9dfd; + } + + .style_1 { background-color: #3f9dfd; } + .style_2 { + border: 1px solid #3f9dfd; + color: #000; + } + .style_3 { + background-color: #fb1515; + } + .style_4 { + border: 1px solid #fb1515; + color: #000; + } } .work-person view:nth-child(5n + 1) { @@ -338,4 +417,27 @@ export default { text-align: left; } } + +.img-container { + width: 100%; + display: flex; + flex-wrap: wrap; + + view { + width: 31%; + margin: 12rpx 0 12rpx calc(6% / 2); + display: flex; + flex-direction: column; + align-items: center; + + .image-content { + width: 100%; + height: 160rpx; + } + } +} + +.img-container view:nth-child(3n + 1) { + margin-left: 0; +} diff --git a/pages/realName/workPlan/index.vue b/pages/realName/workPlan/index.vue index dbf7f77..bdf3440 100644 --- a/pages/realName/workPlan/index.vue +++ b/pages/realName/workPlan/index.vue @@ -40,10 +40,11 @@ {{ item.subComName }} - 可接受风险:{{ item.kjsfx }} - 低风险:{{ item.dfx }} - 中风险:{{ item.zfx }} - 高风险:{{ item.gfx }} + 可接受风险:{{ item.kjsfx }} + 低风险:{{ item.dfx }} + 中风险:{{ item.zfx }} + 高风险:{{ item.gfx }} + 特高风险:{{ item.tgfx }} @@ -124,6 +125,8 @@ export default { success: res => { this.recordsTotal = res.data.recordsTotal this.companyInfoList = res.data.data + + console.log('resssss作业计划列表信息', res) }, fail: err => {} })