From 9a64e7bb407317603cdbd3529e2732c777042b7f Mon Sep 17 00:00:00 2001 From: qx <1084500556@qq.com> Date: 星期二, 19 八月 2025 13:58:23 +0800 Subject: [PATCH] qx --- src/views/doctor/check/index.vue | 324 ++++++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 255 insertions(+), 69 deletions(-) diff --git a/src/views/doctor/check/index.vue b/src/views/doctor/check/index.vue index 74de0ab..ea268d3 100644 --- a/src/views/doctor/check/index.vue +++ b/src/views/doctor/check/index.vue @@ -682,7 +682,7 @@ </el-tab-pane> </el-tabs> <span slot="footer" class="dialog-footer"> - <el-button @click="taocan = false">鍙� 娑�</el-button> + <el-button @click="quzxiao">鍙� 娑�</el-button> <el-button type="primary" @click="queding">纭� 瀹�</el-button> </span> </el-dialog> @@ -742,7 +742,7 @@ activeNames: "first", taocan: false, minedis: false, - lastClickedTab:null, + lastClickedTab: null, creatobj: {}, dataText: [], propform: {}, @@ -976,6 +976,18 @@ }); } }); + } else { + if (this.focusrow.proResult != this.focusrow.project.proDefault) { + const substrings = ["姝e父", "鏈寮傚父", "闃存��", "鏈鏄庢樉寮傚父", "鏃�"]; + let containsAllSubstrings = substrings.some(sub => this.focusrow.proResult.includes(sub)); + if (containsAllSubstrings) { + this.focusrow.exceptionDesc = false; + } else { + this.focusrow.exceptionDesc = true; + } + } else { + this.focusrow.exceptionDesc = false; + } } }, @@ -1081,6 +1093,18 @@ }); } }); + } else { + if (this.focusrow.proResult != this.focusrow.project.proDefault) { + const substrings = ["姝e父", "鏈寮傚父", "闃存��", "鏈鏄庢樉寮傚父", "鏃�"]; + let containsAllSubstrings = substrings.some(sub => this.focusrow.proResult.includes(sub)); + if (containsAllSubstrings) { + this.focusrow.exceptionDesc = false; + } else { + this.focusrow.exceptionDesc = true; + } + } else { + this.focusrow.exceptionDesc = false; + } } this.rows.push(row); }, @@ -1330,19 +1354,51 @@ bzxz() { this.taocan = true; - let data = { proId: this.proId, tjNum: this.tableAll.tjNumber }; - getAdviceByTjNumAndPro(data).then((res) => { - if (res.data) { - this.deptAdviceList3 = res.data; - this.deptAdviceList1 = [ - ...new Set(this.deptAdviceList2.concat(this.deptAdviceList3)), + var deptAdviceList1 = [] + // let data = { proId: this.proId, tjNum: this.tableAll.tjNumber }; + // getAdviceByTjNumAndPro(data).then((res) => { + // if (res.data) { + // this.deptAdviceList3 = res.data; + if (this.proParentList.xiaoJieIds.length != 0) { + if (this.vaids.length != 0) { + const result = this.vaids.reduce((acc, item) => { + const matches = this.deptAdviceList.filter(items => { + return item == items.id; // 鎴� === 鏍规嵁闇�姹� + }); + return acc.concat(matches); + }, []); + deptAdviceList1 = result; + + return this.deptAdviceList1 = [ + ...new Set(deptAdviceList1), ]; - this.deptAdviceList3.forEach((items) => { - this.idss.push(items.id); - this.remakes += items.advice + ","; - }); + } else { + this.proParentList.xiaoJieIds.forEach(item => { + this.deptAdviceList.forEach((items) => { + if (item == items.id) { + deptAdviceList1.push(items) + } + }); + }) + return this.deptAdviceList1 = [ + ...new Set(deptAdviceList1), + ]; } - }); + + + } else if (this.proParentList.xiaoJieIds == null) { + this.deptAdviceList1 = [] + } + + // this.deptAdviceList1 = [ + // ...new Set(this.deptAdviceList2.concat(this.deptAdviceList3)), + // ]; + // this.deptAdviceList3.forEach((items) => { + // this.idss.push(items.id); + // this.remakes += items.advice + ","; + // }); + // } + // }); }, result() { @@ -1380,26 +1436,45 @@ handleDelete(row) { this.deptAdviceList1.forEach((item, index) => { - if (item.id == row.id) this.deptAdviceList1.splice(index, 1); + if (item.id == row.id) { + this.deptAdviceList1.splice(index, 1); + this.$refs.multipleTable.toggleRowSelection(item, false); + } + }); }, handleSelectionChanges(selection) { - this.deptAdviceList2 = this.deptAdviceList1; + if (this.deptAdviceList1.length != 0) { + this.deptAdviceList2 = this.deptAdviceList1; + } if (selection.length > 1) { const del_row = selection.shift(); this.$refs.multipleTable.toggleRowSelection(del_row, false); } selection.forEach((item) => this.deptAdviceList2.push(item)); - this.deptAdviceList1 = [ - ...new Set(this.deptAdviceList2.concat(this.deptAdviceList3)), - ]; - }, + // this.deptAdviceList1 = [ + // ...new Set(this.deptAdviceList2), + // ]; + this.deptAdviceList1 = [...new Set( + this.deptAdviceList2.map(item => JSON.stringify(item)) + )].map(str => JSON.parse(str)); + // if( this.deptAdviceList1.length == 0){ + // this.deptAdviceList1 = selection + // }else{ + // selection.forEach((item) => this.deptAdviceList1.push(item)); + // } + }, + quzxiao() { + this.taocan = false; + this.deptAdviceList1 = [] + }, queding() { if (this.proParentList.xiaoJie.length != 0) { this.remakes = ""; this.titles = ""; + this.vaids = [] this.deptAdviceList1.forEach((item1) => { if (this.proParentList.remark != null) { this.titles += item1.title + ","; @@ -1574,7 +1649,14 @@ eventchange(data) { this.dataText = data; - data.forEach((item) => (this.proParentList.remark += item.advice)); + //data.forEach((item) => (this.proParentList.remark += item.advice)); + data.forEach((item) => { + if (item.advice) { + this.proParentList.remark += item.advice + } else if (item.jynr) { + this.proParentList.remark += item.jynr + } + }) }, proposalChange() { @@ -1853,6 +1935,7 @@ this.loading = true; this.drawer = true; this.isLoading = true; + this.titles = "" this.Parent = [] this.tableAll = [] this.proParentList = {} @@ -1958,43 +2041,94 @@ // }); }); - for (var i = 0; i < this.proParentList.sons.length; i++) { - //鍒ゆ柇鏂版暟缁勬槸鍚︽湁杩欎釜鍏冪礌鍊硷紝娌℃湁鐨勮瘽锛屽氨鎶奱rr[i]缁檖ush鍒版柊鏁扮粍newArr涓� - if (this.proParentList.sons[i].proResult == "" || this.proParentList.sons[i].proResult == null) { - this.radio = this.lastClickedTab.name - this.$modal.msgError("璇峰~鍐欒祫鏂�"); - this.minedis = true - return - } else if (this.proParentList.sons[i].proResult.includes(" ")) { - this.$modal.msgError("璇锋煡鐪嬫槸鍚︽湁绌烘牸"); - this.radio = this.lastClickedTab.name - this.minedis = true - return - } else { - this.minedis = false + // for (var i = 0; i < this.proParentList.sons.length; i++) { + // //鍒ゆ柇鏂版暟缁勬槸鍚︽湁杩欎釜鍏冪礌鍊硷紝娌℃湁鐨勮瘽锛屽氨鎶奱rr[i]缁檖ush鍒版柊鏁扮粍newArr涓� + // if (this.proParentList.sons[i].proResult == "" || this.proParentList.sons[i].proResult == null) { + // this.radio = this.lastClickedTab.name + // this.$modal.msgError("璇锋鏌ラ」鐩槸鍚﹀~鍐欏畬鎴�"); + // this.minedis = true + // return + // } else if (this.proParentList.sons[i].proResult.includes(" ")) { + // this.$modal.msgError("璇锋鏌ュ~鍐欓」鐩腑鏄惁鏈夌┖鏍�"); + // this.radio = this.lastClickedTab.name + // this.minedis = true + // return + // } else { + // this.minedis = false + // this.tjOrderDetail.push({ + // proAdvice: this.proParentList.sons[i].proAdvice, + // proName: this.proParentList.sons[i].project.proName, + // proId: this.proParentList.sons[i].project.proId, + // orderDetailId: this.proParentList.sons[i].orderDetailId, + // flowingWaterId: this.proParentList.sons[i].flowingWaterId, + // proResult: this.proParentList.sons[i].proResult, + // tjStatus: 1, + // isReturn: this.proParentList.sons[i].isReturn === true ? 1 : 0, + // exceptionDesc: this.proParentList.sons[i].exceptionDesc === true ? 1 : 0, + // conclusion: this.proParentList.sons[i].conclusion, + // rulesList: this.proParentList.sons[i].rulesList, + // }); + // } + // } + for (const item of this.proParentList.sons) { + const { project, proResult } = item; + + // 蹇呭~椤归獙璇� + if (project.proDefault) { + console.log('蹇呭~椤规鏌�:', project.proDefault); + + if (!proResult || proResult.trim() === '') { + this.$modal.msgError("璇锋鏌ラ」鐩槸鍚﹀~鍐欏畬鎴�"); + this.minedis = true; + return; + } else if (proResult.includes(' ')) { + this.$modal.msgError("璇锋鏌ラ」鐩槸鍚︽湁绌烘牸"); + this.minedis = true; + return; + } else { + this.minedis = false; + this.tjOrderDetail.push({ + proAdvice: item.proAdvice, + proName: project.proName, + proId: project.proId, + orderDetailId: item.orderDetailId, + flowingWaterId: item.flowingWaterId, + proResult: proResult, + tjStatus: 1, + isReturn: item.isReturn ? 1 : 0, + exceptionDesc: item.exceptionDesc ? 1 : 0, + conclusion: item.conclusion, + rulesList: item.rulesList + }); + } + } + + // 闈炲繀濉」鏁版嵁澶勭悊 + if (!project.proDefault) { + console.log('闈炲繀濉」澶勭悊:', this.tjOrderDetail); + this.minedis = false; this.tjOrderDetail.push({ - proAdvice: this.proParentList.sons[i].proAdvice, - proName: this.proParentList.sons[i].project.proName, - proId: this.proParentList.sons[i].project.proId, - orderDetailId: this.proParentList.sons[i].orderDetailId, - flowingWaterId: this.proParentList.sons[i].flowingWaterId, - proResult: this.proParentList.sons[i].proResult, + proAdvice: item.proAdvice, + proName: project.proName, + proId: project.proId, + orderDetailId: item.orderDetailId, + flowingWaterId: item.flowingWaterId, + proResult: proResult, tjStatus: 1, - isReturn: this.proParentList.sons[i].isReturn === true ? 1 : 0, - exceptionDesc: this.proParentList.sons[i].exceptionDesc === true ? 1 : 0, - conclusion: this.proParentList.sons[i].conclusion, - rulesList: this.proParentList.sons[i].rulesList, + isReturn: item.isReturn ? 1 : 0, + exceptionDesc: item.exceptionDesc ? 1 : 0, + conclusion: item.conclusion, + rulesList: item.rulesList }); } } - if (this.minedis == false) { var data = [{ tjNumber, proId: this.proId, remark: this.proParentList.remark, proName: this.proName, - summaryList: this.value, + summaryList: this.vaids, doctorName: this.doctorName, tjOrderDetailList: this.tjOrderDetail, }]; @@ -2014,6 +2148,7 @@ this.nums = tab.name; this.proId = tab.name; this.lastClickedTab = tab + this.minedis = false this.getParentIdsss(); this.getbzlist(); }); @@ -2045,30 +2180,81 @@ // rulesList: item.rulesList, // }); }); - for (var i = 0; i < this.proParentList.sons.length; i++) { - //鍒ゆ柇鏂版暟缁勬槸鍚︽湁杩欎釜鍏冪礌鍊硷紝娌℃湁鐨勮瘽锛屽氨鎶奱rr[i]缁檖ush鍒版柊鏁扮粍newArr涓� - if (this.proParentList.sons[i].proResult == "" || this.proParentList.sons[i].proResult == null) { - this.$modal.msgError("璇峰~鍐欒祫鏂�"); - this.minedis = true - return - } else if (this.proParentList.sons[i].proResult.includes(" ")) { - this.$modal.msgError("璇锋煡鐪嬫槸鍚︽湁绌烘牸"); - this.minedis = true - return - } else { - this.minedis = false + // for (var i = 0; i < this.proParentList.sons.length; i++) { + // //鍒ゆ柇鏂版暟缁勬槸鍚︽湁杩欎釜鍏冪礌鍊硷紝娌℃湁鐨勮瘽锛屽氨鎶奱rr[i]缁檖ush鍒版柊鏁扮粍newArr涓� + // if (this.proParentList.sons[i].proResult == "" || this.proParentList.sons[i].proResult == null) { + // this.$modal.msgError("璇锋鏌ラ」鐩槸鍚﹀~鍐欏畬鎴�"); + // this.minedis = true + // return + // } else if (this.proParentList.sons[i].proResult.includes(" ")) { + // this.$modal.msgError("璇锋鏌ュ~鍐欓」鐩腑鏄惁鏈夌┖鏍�"); + // this.minedis = true + // return + // } else { + // this.minedis = false + // this.tjOrderDetail.push({ + // proAdvice: this.proParentList.sons[i].proAdvice, + // proName: this.proParentList.sons[i].project.proName, + // proId: this.proParentList.sons[i].project.proId, + // orderDetailId: this.proParentList.sons[i].orderDetailId, + // flowingWaterId: this.proParentList.sons[i].flowingWaterId, + // proResult: this.proParentList.sons[i].proResult, + // tjStatus: 1, + // isReturn: this.proParentList.sons[i].isReturn === true ? 1 : 0, + // exceptionDesc: this.proParentList.sons[i].exceptionDesc === true ? 1 : 0, + // conclusion: this.proParentList.sons[i].conclusion, + // rulesList: this.proParentList.sons[i].rulesList, + // }); + // } + // } + for (const item of this.proParentList.sons) { + const { project, proResult } = item; + + // 蹇呭~椤归獙璇� + if (project.proDefault) { + console.log('蹇呭~椤规鏌�:', project.proDefault); + if (!proResult || proResult.trim() === '') { + this.$modal.msgError("璇锋鏌ラ」鐩槸鍚﹀~鍐欏畬鎴�"); + this.minedis = true; + return; + } else if (proResult.includes(' ')) { + this.$modal.msgError("璇锋鏌ラ」鐩槸鍚︽湁绌烘牸"); + this.minedis = true; + return; + } else { + this.minedis = false; + this.tjOrderDetail.push({ + proAdvice: item.proAdvice, + proName: project.proName, + proId: project.proId, + orderDetailId: item.orderDetailId, + flowingWaterId: item.flowingWaterId, + proResult: proResult, + tjStatus: 1, + isReturn: item.isReturn ? 1 : 0, + exceptionDesc: item.exceptionDesc ? 1 : 0, + conclusion: item.conclusion, + rulesList: item.rulesList + }); + } + } + + // 闈炲繀濉」鏁版嵁澶勭悊 + if (!project.proDefault) { + console.log('闈炲繀濉」澶勭悊:', this.tjOrderDetail); + this.minedis = false; this.tjOrderDetail.push({ - proAdvice: this.proParentList.sons[i].proAdvice, - proName: this.proParentList.sons[i].project.proName, - proId: this.proParentList.sons[i].project.proId, - orderDetailId: this.proParentList.sons[i].orderDetailId, - flowingWaterId: this.proParentList.sons[i].flowingWaterId, - proResult: this.proParentList.sons[i].proResult, + proAdvice: item.proAdvice, + proName: project.proName, + proId: project.proId, + orderDetailId: item.orderDetailId, + flowingWaterId: item.flowingWaterId, + proResult: proResult, tjStatus: 1, - isReturn: this.proParentList.sons[i].isReturn === true ? 1 : 0, - exceptionDesc: this.proParentList.sons[i].exceptionDesc === true ? 1 : 0, - conclusion: this.proParentList.sons[i].conclusion, - rulesList: this.proParentList.sons[i].rulesList, + isReturn: item.isReturn ? 1 : 0, + exceptionDesc: item.exceptionDesc ? 1 : 0, + conclusion: item.conclusion, + rulesList: item.rulesList }); } } @@ -2079,7 +2265,7 @@ proId: this.proId, remark: this.proParentList.remark, proName: this.proName, - summaryList: this.vaids1, + summaryList: this.vaids, doctorName: this.doctorName, tjOrderDetailList: this.tjOrderDetail, }, -- Gitblit v1.8.0