From 90b4c2b2102fbb36c2435cb4cb56dfc66dd94010 Mon Sep 17 00:00:00 2001 From: jiayu Date: Wed, 24 Jul 2024 11:05:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=B7=A1=E6=A3=80=E8=AE=A1?= =?UTF-8?q?=E5=88=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/g-picker/g-picker.vue | 6 +- pages.json | 14 + .../InspectionRoute/editInspectionPlan.vue | 667 ++++++++++++++++++ .../InspectionRoute/editInspectionPoint.vue | 17 +- .../projectEnd/InspectionRoute/inspection.vue | 29 +- .../InspectionRoute/inspectionPlan.vue | 68 +- .../InspectionRoute/inspectionPointDetail.vue | 400 +++++++++++ .../InspectionRoute/inspectionPointList.vue | 8 +- 8 files changed, 1131 insertions(+), 78 deletions(-) create mode 100644 pages/projectEnd/InspectionRoute/editInspectionPlan.vue create mode 100644 pages/projectEnd/InspectionRoute/inspectionPointDetail.vue diff --git a/components/g-picker/g-picker.vue b/components/g-picker/g-picker.vue index 7e291a37..e0cde5af 100644 --- a/components/g-picker/g-picker.vue +++ b/components/g-picker/g-picker.vue @@ -3,7 +3,7 @@ - {{value}} + {{value}} {{placeholder}} @@ -199,6 +199,10 @@ } } } + ._value { + word-break: break-all; + line-height: 36rpx; + } ._placeholder { color: rgb(192, 196, 204); font-size: 14px; diff --git a/pages.json b/pages.json index a1c14a19..4d5e0552 100644 --- a/pages.json +++ b/pages.json @@ -2722,6 +2722,20 @@ { "navigationBarTitleText" : "" } + }, + { + "path" : "pages/projectEnd/InspectionRoute/inspectionPointDetail", + "style" : + { + "navigationBarTitleText" : "" + } + }, + { + "path" : "pages/projectEnd/InspectionRoute/editInspectionPlan", + "style" : + { + "navigationBarTitleText" : "" + } } ], // "subPackages":[{ diff --git a/pages/projectEnd/InspectionRoute/editInspectionPlan.vue b/pages/projectEnd/InspectionRoute/editInspectionPlan.vue new file mode 100644 index 00000000..d29b630e --- /dev/null +++ b/pages/projectEnd/InspectionRoute/editInspectionPlan.vue @@ -0,0 +1,667 @@ + + + + + \ No newline at end of file diff --git a/pages/projectEnd/InspectionRoute/editInspectionPoint.vue b/pages/projectEnd/InspectionRoute/editInspectionPoint.vue index 8996f7b5..d02e38fa 100644 --- a/pages/projectEnd/InspectionRoute/editInspectionPoint.vue +++ b/pages/projectEnd/InspectionRoute/editInspectionPoint.vue @@ -139,7 +139,7 @@ }] } }, - async onLoad(option) { + onLoad(option) { let that = this; uni.$on('locationSuccessEvent',function(data){ console.log('监听到事件来自 locationSuccessEvent', data); @@ -156,11 +156,11 @@ // 编辑 if(option.id) { + this.pageTitle = "编辑巡检点" this.editId = option.id; - await this.getPointAreaFn(); - await this.getData() + this.init(); } else { - await this.getPointAreaFn(); + this.getPointAreaFn(); this.mapGetLocation(); } }, @@ -176,9 +176,14 @@ console.log('this.mobileTopHeight',this.mobileTopHeight) }, methods: { + // 消除异步 + async init() { + await this.getPointAreaFn(); + await this.getData() + }, // 编辑回显 getData() { - new Promise((resolve, reject) => { + return new Promise((resolve, reject) => { console.info("getData", new Date().getTime()) this.sendRequest({ url: 'xmgl/checkingPoint/queryById', @@ -223,7 +228,7 @@ }, // 获取区域列表 getPointAreaFn() { - new Promise((resolve, reject) => { + return new Promise((resolve, reject) => { console.info("getPointAreaFn", new Date().getTime()) let requestData = { projectSn: this.projectSn, diff --git a/pages/projectEnd/InspectionRoute/inspection.vue b/pages/projectEnd/InspectionRoute/inspection.vue index 9c21d5d1..956b86db 100644 --- a/pages/projectEnd/InspectionRoute/inspection.vue +++ b/pages/projectEnd/InspectionRoute/inspection.vue @@ -12,19 +12,19 @@ - {{totalNum}} + {{taskStatus.notStart}} 未开始 - {{totalNum}} + {{taskStatus.run}} 进行中 - {{totalNum}} - 已预期 + {{taskStatus.overdue}} + 已逾期 - {{totalNum}} + {{taskStatus.complete}} 已巡检 @@ -67,10 +67,17 @@ total: 0, page: 1, getGoId: -1, + taskStatus: { + complete: 0, + notStart: 0, + overdue: 0, + run: 0 + } } }, onLoad(option) { this.getGoId = option.id; + this.getData() }, mounted() { this.getTime(); @@ -99,6 +106,18 @@ this.nowTime = `${year}-${mounth}-${day} ${hours}:${minutes}:${seconds}` }, 1000) }, + getData() { + this.sendRequest({ + url: 'xmgl/xzCheckingRouteTask/countMyTaskInspectStatus', + method: 'post', + success: res => { + console.info(res,'res') + if (res.code == 200) { + this.taskStatus = res.result; + } + } + }) + }, jumpPage(page) { console.log(page, 'page'); uni.navigateTo({ diff --git a/pages/projectEnd/InspectionRoute/inspectionPlan.vue b/pages/projectEnd/InspectionRoute/inspectionPlan.vue index e6cfea80..9e4f8252 100644 --- a/pages/projectEnd/InspectionRoute/inspectionPlan.vue +++ b/pages/projectEnd/InspectionRoute/inspectionPlan.vue @@ -106,34 +106,6 @@ - 巡检人员 - 重置 - 查看{{ listNum }}条记录 @@ -244,6 +182,7 @@ }, data() { return { + popupShow: false, mobileTopHeight: 0, listNum: 0, listData: [], @@ -1033,6 +972,11 @@ this.listData = [] this.getListData(false) }, + handleAdd() { + uni.navigateTo({ + url: "/pages/projectEnd/InspectionRoute/editInspectionPlan" + }) + } }, } diff --git a/pages/projectEnd/InspectionRoute/inspectionPointDetail.vue b/pages/projectEnd/InspectionRoute/inspectionPointDetail.vue new file mode 100644 index 00000000..bfecf1a5 --- /dev/null +++ b/pages/projectEnd/InspectionRoute/inspectionPointDetail.vue @@ -0,0 +1,400 @@ + + + + + \ No newline at end of file diff --git a/pages/projectEnd/InspectionRoute/inspectionPointList.vue b/pages/projectEnd/InspectionRoute/inspectionPointList.vue index 306e4f71..528e2116 100644 --- a/pages/projectEnd/InspectionRoute/inspectionPointList.vue +++ b/pages/projectEnd/InspectionRoute/inspectionPointList.vue @@ -53,8 +53,8 @@ 下载二维码 - - + + @@ -193,9 +193,9 @@ } }) }, - goDetails(obj) { + goDetails(data) { uni.navigateTo({ - url: './details?id=' + obj.id + '&type=' + obj.status + url: `/pages/projectEnd/InspectionRoute/inspectionPointDetail?id=${data.id}` }) }, handleAdd() {