From ce8333d79bde86166f182a721c7390b5b4c16cf4 Mon Sep 17 00:00:00 2001 From: zhangqun <179111901@qq.com> Date: Thu, 25 Jul 2024 10:16:41 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/globalJs/request.js | 8 +-- .../components/investigation-item2.vue | 2 +- .../investigation/components/problem-box.vue | 2 +- .../components/problem-tree-item.vue | 4 +- pages/investigation/task.vue | 57 +++++++++++++++---- 5 files changed, 54 insertions(+), 19 deletions(-) diff --git a/common/globalJs/request.js b/common/globalJs/request.js index 05b44fe..359f2df 100644 --- a/common/globalJs/request.js +++ b/common/globalJs/request.js @@ -69,10 +69,10 @@ class Request { // console.log('resInterceptors-----------------',resInterceptors) if(resInterceptors.statusCode == 400 || resInterceptors.data.code == 403){ $.toast('登录信息已过期,请重新登录') - $.removeData('token') - setTimeout(() => { - $.openNew('/pages/logIn/logIn') - },1500) + // $.removeData('token') + // setTimeout(() => { + // $.openNew('/pages/logIn/logIn') + // },1500) return } if (!resInterceptors && resInterceptors != '') { diff --git a/pages/investigation/components/investigation-item2.vue b/pages/investigation/components/investigation-item2.vue index 972b824..d9f8df8 100644 --- a/pages/investigation/components/investigation-item2.vue +++ b/pages/investigation/components/investigation-item2.vue @@ -122,7 +122,7 @@ diff --git a/pages/investigation/components/problem-box.vue b/pages/investigation/components/problem-box.vue index 1cdd9e1..e06df95 100644 --- a/pages/investigation/components/problem-box.vue +++ b/pages/investigation/components/problem-box.vue @@ -29,7 +29,7 @@ > - + - {{ item.itemname }}111 + {{ item.itemname }} - + @@ -250,8 +250,8 @@ - - {{ item.dangerProblem }} + + {{ item.hdTermName }} @@ -266,7 +266,7 @@ - {{ item.hdDesc }} + @@ -321,7 +321,7 @@ @delete="(e) => deletePic(e, 'fileList')" name="1" :maxCount="1"> - + @@ -350,6 +350,18 @@ @first="active = 1" @last="active = 3" /> + + @@ -550,6 +562,10 @@ //选中排查数据 troubleshootingData: [], checked: [], + modalShow: false, + extraConfigs: [], + describeArr: [], + temporary: '' }; }, methods: { @@ -1078,14 +1094,30 @@ extraConfigs: extraConfigs, describe: describe, }); + this.extraConfigs = extraConfigs + this.describeArr = describe + this.temporary = temporary + console.log(this.extraConfigs,this.describeArr) + if(!temporary) { + this.postSaveManualInvestigation() + return + } + if(this.extraConfigs.length <= 0 || this.describeArr.length <= 0) { + this.modalShow = true + } else { + this.postSaveManualInvestigation() + } + }, + postSaveManualInvestigation() { this.$request .globalRequest( "/hiddenDanger/highDanger/saveManualInvestigation", { ...this.formData, businessId: this.businessId, - extraConfigs: extraConfigs, - describe: describe, + extraConfigs: this.extraConfigs, + describe: this.describeArr, + temporary: this.temporary, // describe: [{ // "bigCategory": "1", // "bigCategoryName": "道路线性断面", @@ -1097,14 +1129,17 @@ // "hdPic": "", // "hdInfo": "" // }], - temporary, }, "POST" ) .then((res) => { console.log(res); if (res.code === 200) { - this.$.toast("保存成功"); + if(this.temporary) { + this.$.toast("保存成功"); + } else { + this.$.toast("暂存成功"); + } setTimeout(() => { uni.navigateBack({ delta: 2, // 默认值是1,表示返回的页面层数 @@ -1127,7 +1162,7 @@ this.$.toast(res.msg); } }); - }, + } }, };