From 37d91e0a828f994795d24306d652f47cdf59d420 Mon Sep 17 00:00:00 2001 From: liujiangyong Date: Tue, 9 May 2023 14:32:42 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- weapp/package/troubleshooting/index.js | 13 +-- weapp/package/troubleshooting/index.json | 4 +- weapp/package/troubleshooting/index.wxml | 96 ++++++++++--------- weapp/package/troubleshooting/index.wxss | 52 +++++++++- .../troubleshooting/shootingForm/index.wxml | 45 +++++---- .../troubleshooting/shootingForm/index.wxss | 18 +++- 6 files changed, 144 insertions(+), 84 deletions(-) diff --git a/weapp/package/troubleshooting/index.js b/weapp/package/troubleshooting/index.js index f04b474..54a3deb 100644 --- a/weapp/package/troubleshooting/index.js +++ b/weapp/package/troubleshooting/index.js @@ -14,7 +14,7 @@ Page({ userInfo: wx.getStorageSync("userInfo"), // dataList: [], - currentTab: '0', + currentTab: 0, // 筛选选择 structList: [], structResult: [], @@ -31,19 +31,14 @@ Page({ // 顶部tab切换 clickTab (e) { this.setData({ - currentTab: e.currentTarget.dataset.current + currentTab: e.detail.name }) - if (e.currentTarget.dataset.current == '0') { - - } else if (e.currentTarget.dataset.current == '1') { - - } this.setData({ page: 0, dataList: [] }, () => { this.getData({ - type: e.currentTarget.dataset.current == '0' ? 'backlog' : 'haveDone' + type: e.detail.name === 0 ? 'backlog' : 'haveDone' }); }) }, @@ -154,7 +149,7 @@ Page({ onDropDownClose () { const { currentTab, startTime, endTime, pointList, structResult } = this.data this.getData({ - type: currentTab == '0' ? 'backlog' : 'haveDone', + type: currentTab === 0 ? 'backlog' : 'haveDone', startTime, endTime, pointId: pointList.length ? (() => { diff --git a/weapp/package/troubleshooting/index.json b/weapp/package/troubleshooting/index.json index af35bd8..64f9398 100644 --- a/weapp/package/troubleshooting/index.json +++ b/weapp/package/troubleshooting/index.json @@ -13,6 +13,8 @@ "van-checkbox-group": "@vant/weapp/checkbox-group/index", "van-datetime-picker": "@vant/weapp/datetime-picker/index", "timePicker": "/components/timePicker/index", - "t-date-time-picker": "tdesign-miniprogram/date-time-picker/date-time-picker" + "t-date-time-picker": "tdesign-miniprogram/date-time-picker/date-time-picker", + "van-tab": "@vant/weapp/tab/index", + "van-tabs": "@vant/weapp/tabs/index" } } \ No newline at end of file diff --git a/weapp/package/troubleshooting/index.wxml b/weapp/package/troubleshooting/index.wxml index b078981..7c5d92f 100644 --- a/weapp/package/troubleshooting/index.wxml +++ b/weapp/package/troubleshooting/index.wxml @@ -1,14 +1,10 @@ - - - 待办事项 - - - 已办事项 - - + + + + @@ -49,46 +45,52 @@ - - - - - {{item.PatrolRecord.points.project.name}} - - {{ - currentTab == 0? - item.state == 1 ?'制定计划': - item.state == 2 ?'审批计划': - item.state == 3 ?'修改计划': - item.state == 4 ?'维修处理': - item.state == 5 ?'质检验收': - item.state == 6 ?'查看详情':'驳回重修' - : - item.state == 1 ?'制定计划': - item.state == 2 ?'计划已提交待审批': - item.state == 3 ?'计划审批驳回': - item.state == 4 ?'计划审批通过待维修': - item.state == 5 ?'维修完成待验收': - item.state == 6 ?'验收通过':'驳回重修' - }} - - - {{ - item.state == 1 ?'制定计划': - item.state == 2 ?'计划已提交待审批': - item.state == 3 ?'计划审批驳回': - item.state == 4 ?'计划审批通过待维修': - item.state == 5 ?'维修完成待验收': - item.state == 6 ?'验收通过':'驳回重修' - }} - - - - - + + + + + {{item.PatrolRecord.points.project.name}} - - + + 点位名称:{{item.PatrolRecord.points.itemData.name}} + + + 异常等级:{{item.PatrolRecord.points.itemData.name}} + + + 任务下发时间:{{item.createTime}} + + + + {{ + currentTab == 0? + item.state == 1 ?'制定计划': + item.state == 2 ?'审批计划': + item.state == 3 ?'修改计划': + item.state == 4 ?'维修处理': + item.state == 5 ?'质检验收': + item.state == 6 ?'查看详情':'驳回重修' + : + item.state == 1 ?'制定计划': + item.state == 2 ?'计划已提交待审批': + item.state == 3 ?'计划审批驳回': + item.state == 4 ?'计划审批通过待维修': + item.state == 5 ?'维修完成待验收': + item.state == 6 ?'验收通过':'驳回重修' + }} + + + {{ + item.state == 1 ?'制定计划': + item.state == 2 ?'计划已提交待审批': + item.state == 3 ?'计划审批驳回': + item.state == 4 ?'计划审批通过待维修': + item.state == 5 ?'维修完成待验收': + item.state == 6 ?'验收通过':'驳回重修' + }} + + + diff --git a/weapp/package/troubleshooting/index.wxss b/weapp/package/troubleshooting/index.wxss index 33f25ba..e45adea 100644 --- a/weapp/package/troubleshooting/index.wxss +++ b/weapp/package/troubleshooting/index.wxss @@ -5,6 +5,14 @@ position: relative; } +.divider { + width: 100%; + height: 0px; + border-top: 1px solid #F5F5F5; + margin-top: 19px; + margin-bottom: 9px; +} + /* 顶部tab */ .swiper-tab { display: flex; @@ -41,21 +49,57 @@ } /* 任务卡片 */ -.mission-card {} +.mission-card { + background-color: #fff; + border-radius: 10rpx; + margin-bottom: 30rpx; + overflow: hidden; +} .mission-card-title { - background-color: #fff; overflow: auto; padding: 24rpx 16px; display: flex; - justify-content: space-between; align-items: center } +.mission-card-title .icon { + float: left; + width: 24px; + height: 24px; + margin-right: 5px; +} + +.mission-card-title .title { + float: left; + font-size: 16px; + line-height: 24px; + font-weight: bold; + color: #333333; +} + +.mission-card .text-key { + font-weight: 400; + font-size: 14px; + color: #000000a6; +} + +.mission-card .text-value { + font-weight: 400; + font-size: 14px; + color: #000000d9; +} + +.mission-card .btn { + float: right; + margin-right: 12px; + margin-bottom: 10px; +} + .value-class { flex: none !important; } -.time-option .van-picker{ +.time-option .van-picker { width: 45vw; } \ No newline at end of file diff --git a/weapp/package/troubleshooting/shootingForm/index.wxml b/weapp/package/troubleshooting/shootingForm/index.wxml index 6937e1e..ddddfff 100644 --- a/weapp/package/troubleshooting/shootingForm/index.wxml +++ b/weapp/package/troubleshooting/shootingForm/index.wxml @@ -1,26 +1,28 @@ - - + + - 巡检信息 + + 巡检信息 - - - - + + + + + 问题详情 - + - + - - + + 现场照片 @@ -36,6 +38,7 @@ + 维修计划信息 @@ -49,7 +52,7 @@ - + 质检人 @@ -104,8 +107,8 @@ - - + + @@ -136,7 +139,7 @@ 质检验收 - + @@ -159,23 +162,23 @@ - - + + 提交 - + 同意 - + 驳回 - + 验收通过 - + 验收不通过 diff --git a/weapp/package/troubleshooting/shootingForm/index.wxss b/weapp/package/troubleshooting/shootingForm/index.wxss index a7340ed..fa2ab27 100644 --- a/weapp/package/troubleshooting/shootingForm/index.wxss +++ b/weapp/package/troubleshooting/shootingForm/index.wxss @@ -5,12 +5,26 @@ overflow: auto; padding: 24rpx 16px; display: flex; - justify-content: space-between; align-items: center } +.mission-card-title .icon { + float: left; + width: 24px; + height: 24px; + margin-right: 5px; +} + +.mission-card-title .title { + float: left; + font-size: 16px; + line-height: 24px; + font-weight: bold; + color: #333333; +} + .mission-center-card-title { - padding-top: 64rpx; + margin-top: 16px; } .fs-cell-title {