From b65cc08bc8a7b557f4bbce33f48063728326b880 Mon Sep 17 00:00:00 2001 From: limingtao <@ming_tao_li> Date: Wed, 17 Jul 2024 17:45:07 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=AD=98=E5=9C=A8=E9=9A=90=E6=82=A3=20=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=BC=96=E8=BE=91bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/problem-tree-item.vue | 23 ++-- pages/investigation/task.vue | 107 ++++++++++++------ pages/logIn/logIn.vue | 2 +- 3 files changed, 86 insertions(+), 46 deletions(-) diff --git a/pages/investigation/components/problem-tree-item.vue b/pages/investigation/components/problem-tree-item.vue index 70c8371..17f4120 100644 --- a/pages/investigation/components/problem-tree-item.vue +++ b/pages/investigation/components/problem-tree-item.vue @@ -50,7 +50,8 @@ export default { $: this.$, originList: [], problemTreeSelect: null, - problemTreeSelectList: [], + problemTreeSelectList: [], + problemTreeSelectAllList: [], problemTreeSelectConfirmList: [], }; }, @@ -74,14 +75,15 @@ export default { .globalRequest("/hiddenDanger/highDanger/getDangerItems", {}, "GET") .then((res) => { if (res.code == 200) { - this.originList = res.result; - this.problemTreeSelectList = res.result; - if(this.hiddenDangerList2.length>0) { - this.problemTreeSelectConfirmList = this.hiddenDangerList2 - console.log(this.hiddenDangerList2) - this.problemTreeSelectList = this.hiddenDangerList2[1].children - this.problemTreeSelect = this.hiddenDangerList2[2].id - } + this.originList =JSON.parse(JSON.stringify( res.result)); + this.problemTreeSelectList =JSON.parse(JSON.stringify( res.result)); + this.problemTreeSelectAllList=JSON.parse(JSON.stringify( res.result)) + // if(this.hiddenDangerList2.length>0) { + // // this.problemTreeSelectConfirmList = this.hiddenDangerList2 + // console.log(this.hiddenDangerList2) + // this.problemTreeSelectList = this.hiddenDangerList2[1].children + // this.problemTreeSelect = this.hiddenDangerList2[2].id + // } } }); }, @@ -89,7 +91,8 @@ export default { skipPage(even) { this.$.open(even); }, - handleSelectProblem(item, index) { + handleSelectProblem(item, index) { + console.log(11111) this.problemTreeSelectConfirmList[Number(item.nlevel) - 1] = item; if (item.children && item.children.length > 0) { this.problemTreeSelectList = item.children; diff --git a/pages/investigation/task.vue b/pages/investigation/task.vue index 6a626b1..b92b143 100644 --- a/pages/investigation/task.vue +++ b/pages/investigation/task.vue @@ -376,7 +376,7 @@ 存在隐患 @@ -386,7 +386,7 @@ {{ item.dangerProblem }} - + - - {{ this.hiddenDangerList2[0].itemname }}/{{ - this.hiddenDangerList2[1].itemname - }}/{{ this.hiddenDangerList2[2].itemname }}{{ hiddenDangerList2[0].itemname }}/{{ + hiddenDangerList2[1].itemname + }}/{{ hiddenDangerList2[2].itemname }} - {{ - this.dangerProblem + {{ + dangerProblem }} 请选择 @@ -693,7 +692,12 @@ export default { hiddenDangerList: [], hiddenDangerList2: [], hiddenDangerList3: [], - dangerProblem: "", + dangerProblem: "", + //隐患新增或者编辑判断标识 + addInvestigationInfo:{ + type:'', + index:0 + } }; }, methods: { @@ -726,8 +730,11 @@ export default { this.showInvestigation2Item = {}; this.showInvestigation2 = false; }, - onHiddenDangerList(v) { - console.log(this.problemTreeSelectConfirmList) + onHiddenDangerList(v,index) { + this.addInvestigationInfo={ + type:'edit', + index:index + } this.showProblem = true; this.dangerProblem = v.dangerProblem; this.describe = { @@ -737,11 +744,23 @@ export default { hdDesc: v.hdDesc, hdPic: v.hdPic, hdInfo: v.hdInfo, - }; - + }; + console.log(v) + let newArr=[] + try{ + newArr= v.dangerProblem.split('/') + }catch(e){ + newArr=['','',''] + } + this.hiddenDangerList2=[{id:v.bigCategory,itemname:newArr[0]}, + {id:v.smallCategory,itemname:newArr[1]}, + {id:v.hdTerm,itemname:newArr[2]}] + console.log(this.hiddenDangerList2) // this.fileList = [v.hdPic]; }, - add() { + add() { + // this.addInvestigationInfo.type='add' + this.$set(this.addInvestigationInfo,'type','add') this.showProblem = true; this.hiddenDangerList2 = []; this.dangerProblem = ''; @@ -867,7 +886,8 @@ export default { this.hiddenDangerList2 = JSON.parse( JSON.stringify(this.hiddenDangerList3) ); - } + } + console.log(this.hiddenDangerList2) }, select(v) { @@ -911,18 +931,27 @@ export default { this.$.toast("已添加"); } }, - investigationHandle2() { - this.hiddenDangerList.push({ - bigCategory: this.hiddenDangerList2[0].id, - bigCategoryName: this.hiddenDangerList2[0].itemname, - smallCategory: this.hiddenDangerList2[1].id, - smallCategoryName: this.hiddenDangerList2[1].itemname, - hdTerm: this.hiddenDangerList2[2].id, - hdTermName: this.hiddenDangerList2[2].itemname, - hdDesc: this.describe.hdDesc, - hdPic: this.fileList.url, - hdInfo: this.describe.hdInfo, - }); + investigationHandle2() { + if(this.hiddenDangerList2.length>0){ + let form={ + bigCategory: this.hiddenDangerList2[0].id, + bigCategoryName: this.hiddenDangerList2[0].itemname, + smallCategory: this.hiddenDangerList2[1].id, + smallCategoryName: this.hiddenDangerList2[1].itemname, + hdTerm: this.hiddenDangerList2[2].id, + hdTermName: this.hiddenDangerList2[2].itemname, + hdDesc: this.describe.hdDesc, + hdPic: this.fileList.url, + hdInfo: this.describe.hdInfo, + dangerProblem:this.hiddenDangerList2[0].itemname+'/'+ this.hiddenDangerList2[1].itemname+'/'+ this.hiddenDangerList2[2].itemname + } + if(this.addInvestigationInfo.type=='add'){ + this.hiddenDangerList.push(form); + }else{ + this.$set(this.hiddenDangerList,this.addInvestigationInfo.index,form) + } + } + this.showProblem = false; }, investigationDetailHandle() { @@ -1019,7 +1048,13 @@ export default { submit(temporary) { console.log(this.formData); console.log(this.investigationSelectList); - console.log(this.hiddenDangerList); + console.log({ + ...this.formData, + businessId: this.businessId, + extraConfigs: extraConfigs, + describe: this.hiddenDangerList, + temporary, + }); let extraConfigs = []; this.investigationSelectList.map((r) => { r.extraConfigs.map((s) => { @@ -1049,11 +1084,11 @@ export default { console.log(res); if (res.code === 200) { this.$.toast("保存成功"); - setTimeout(() => { - uni.navigateBack({ - delta: 1, // 默认值是1,表示返回的页面层数 - }); - }, 1000); + // setTimeout(() => { + // uni.navigateBack({ + // delta: 1, // 默认值是1,表示返回的页面层数 + // }); + // }, 1000); // this.data = res.result; // this.rname = this.data[0].name; @@ -1309,7 +1344,9 @@ export default { .problem-box { width: 100%; padding: 20rpx; - box-sizing: border-box; + box-sizing: border-box; + max-height: calc(100vh - 100px); + overflow: auto; .detail-item { margin-bottom: 20rpx; } diff --git a/pages/logIn/logIn.vue b/pages/logIn/logIn.vue index 3c875e9..8b312d0 100644 --- a/pages/logIn/logIn.vue +++ b/pages/logIn/logIn.vue @@ -167,7 +167,7 @@ export default { this.isDisabled = true this.$request.globalRequest(url, datas, 'POST').then(res => { if(res.code === 200){ - this.$.toast('成功') + this.$.toast('登录成功') this.$.setData('token',res.result) this.$.setData('userInfo', { username: res.result }) setTimeout(() => { From d35c6e1ace1021af18b2a0a816226015b887d813 Mon Sep 17 00:00:00 2001 From: limingtao <@ming_tao_li> Date: Wed, 17 Jul 2024 18:05:39 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=8E=92=E6=9F=A5=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/investigation/task.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pages/investigation/task.vue b/pages/investigation/task.vue index b92b143..c90e3a7 100644 --- a/pages/investigation/task.vue +++ b/pages/investigation/task.vue @@ -473,7 +473,8 @@ label="隐患图片" label-position="top" label-width="200px" - /> + /> + 0?this.fileList[0].url:'', hdInfo: this.describe.hdInfo, dangerProblem:this.hiddenDangerList2[0].itemname+'/'+ this.hiddenDangerList2[1].itemname+'/'+ this.hiddenDangerList2[2].itemname } @@ -1032,7 +1033,8 @@ export default { result: resultInfo, url: resultInfo.result, }) - ); + ); + console.log(this[key]) } else { this.$.toast("上传失败"); this[key].splice( From ce2e91b77448e03b0a28068f34c8bbf988fc70ac Mon Sep 17 00:00:00 2001 From: limingtao <@ming_tao_li> Date: Wed, 17 Jul 2024 18:12:11 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=8E=92=E6=9F=A5=E6=8F=90=E4=BA=A4=20?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/investigation/task.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pages/investigation/task.vue b/pages/investigation/task.vue index c90e3a7..51ae570 100644 --- a/pages/investigation/task.vue +++ b/pages/investigation/task.vue @@ -1086,11 +1086,11 @@ export default { console.log(res); if (res.code === 200) { this.$.toast("保存成功"); - // setTimeout(() => { - // uni.navigateBack({ - // delta: 1, // 默认值是1,表示返回的页面层数 - // }); - // }, 1000); + setTimeout(() => { + uni.navigateBack({ + delta: 1, // 默认值是1,表示返回的页面层数 + }); + }, 1000); // this.data = res.result; // this.rname = this.data[0].name; From 94aabf89f44f153b1ddb8f5eb81163a7ef445ace Mon Sep 17 00:00:00 2001 From: limingtao <@ming_tao_li> Date: Wed, 17 Jul 2024 18:30:45 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E9=87=8D=E7=82=B9=E6=8E=92=E6=9F=A5?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/investigation/components/investigation-item2.vue | 6 +++--- pages/investigation/task.vue | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pages/investigation/components/investigation-item2.vue b/pages/investigation/components/investigation-item2.vue index 2f32ad4..f8e137d 100644 --- a/pages/investigation/components/investigation-item2.vue +++ b/pages/investigation/components/investigation-item2.vue @@ -13,7 +13,7 @@ style="width: 96%; padding: 0" > - + - + - + { - uni.navigateBack({ - delta: 1, // 默认值是1,表示返回的页面层数 - }); - }, 1000); + // setTimeout(() => { + // uni.navigateBack({ + // delta: 1, // 默认值是1,表示返回的页面层数 + // }); + // }, 1000); // this.data = res.result; // this.rname = this.data[0].name; From d3ea1684ab7b63809dd6475d259ad920416e83a7 Mon Sep 17 00:00:00 2001 From: limingtao <@ming_tao_li> Date: Wed, 17 Jul 2024 18:42:42 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E9=87=8D=E7=82=B9=E6=8E=92=E6=9F=A5?= =?UTF-8?q?=E9=99=84=E4=BB=B6=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/investigation-item.vue | 573 ++++++++-------- .../components/investigation-item2.vue | 614 +++++++++--------- pages/investigation/task.vue | 13 +- 3 files changed, 587 insertions(+), 613 deletions(-) diff --git a/pages/investigation/components/investigation-item.vue b/pages/investigation/components/investigation-item.vue index 512c7da..070d2e2 100644 --- a/pages/investigation/components/investigation-item.vue +++ b/pages/investigation/components/investigation-item.vue @@ -1,293 +1,280 @@ - - - - - - + + + + + + \ No newline at end of file diff --git a/pages/investigation/components/investigation-item2.vue b/pages/investigation/components/investigation-item2.vue index f8e137d..bf166c2 100644 --- a/pages/investigation/components/investigation-item2.vue +++ b/pages/investigation/components/investigation-item2.vue @@ -1,314 +1,300 @@ - - - - - - - \ No newline at end of file + + + + + + \ No newline at end of file diff --git a/pages/investigation/task.vue b/pages/investigation/task.vue index c90e3a7..4de9cab 100644 --- a/pages/investigation/task.vue +++ b/pages/investigation/task.vue @@ -702,7 +702,8 @@ export default { }; }, methods: { - showInvestigationTag(v) { + showInvestigationTag(v) { + console.log(v) this.showInvestigation2 = true; this.showInvestigation2Item = v; }, @@ -1086,11 +1087,11 @@ export default { console.log(res); if (res.code === 200) { this.$.toast("保存成功"); - // setTimeout(() => { - // uni.navigateBack({ - // delta: 1, // 默认值是1,表示返回的页面层数 - // }); - // }, 1000); + setTimeout(() => { + uni.navigateBack({ + delta: 1, // 默认值是1,表示返回的页面层数 + }); + }, 1000); // this.data = res.result; // this.rname = this.data[0].name;