From 1d1f47e55da5e0f4f20fe5eb20fc426aebb7966a Mon Sep 17 00:00:00 2001 From: qx <1084500556@qq.com> Date: 星期一, 04 八月 2025 15:19:22 +0800 Subject: [PATCH] Merge branch 'master' of http://101.42.27.146:5001/r/ltkj_peisweb_region --- src/views/doctor/checkAll/index.vue | 361 +++++++++++++++++++++++++-------------------------- 1 files changed, 179 insertions(+), 182 deletions(-) diff --git a/src/views/doctor/checkAll/index.vue b/src/views/doctor/checkAll/index.vue index 5525ecb..f0c4367 100644 --- a/src/views/doctor/checkAll/index.vue +++ b/src/views/doctor/checkAll/index.vue @@ -2583,7 +2583,7 @@ this.loading = true; this.status1 = 0; this.yichangList = []; - + return new Promise((resolve, reject) => { yichang({ tjNum: this.tjNumber, @@ -3173,7 +3173,7 @@ this.formobj = {}; }, - handleClick(row) { + /* handleClick(row) { this.qingkong(); this.$refs.Pre.open = false; this.tableAll = row; @@ -3199,97 +3199,8 @@ // 娌℃湁寮哄埗杩涘叆寮规锛岀洿鎺ュ紑鍚姞杞藉拰寮规 this.isLoading = true; this.drawer = true; - // 鍏堣皟鐢ㄥ紓甯哥粨鏋滐紝绛夊緟鍏跺畬鎴愬悗鍐嶇户缁悗缁�昏緫 - this.yichangjieguo().then(() => { - // 濡傛灉寮傚父缁撴灉涓虹┖锛屽乏杈规暟鎹姞杞藉畬鎴愬悗灏卞叧闂姞杞芥 - if (!this.yichangList || this.yichangList.length === 0) { - getInfo().then((response) => { - this.userId = response.user.userId; - if (this.userId) { - let data = { - userId: this.userId, - tjNumber: this.tjNumber, - state: 0, - }; - getModifiedState(data).then((res) => { - this.MsgId = res.msg; - getupdateCheckType(this.tjNumber).then((response) => { - this.isLoading = false; // 鍏抽棴鍔犺浇妗� - this.changedate = response.data; - if (this.changedate) { - this.changedate.forEach((item) => { - this.textarea1 = item.checkAdvice || ""; - }); - this.initialTotalCheckAdvice = this.textarea1; - this.initialState = JSON.parse( - JSON.stringify(this.changedate) - ); - for (let i = 0; i < this.changedate.length; i++) { - this.remark = this.changedate[i].remark; - } - // 鍥炴樉 zhiyeJl 鍜� zhiyeJg - this.zhiyeJl = this.changedate[0].zhiyejl || ""; - this.zhiyeJg = - this.changedate[0].zhiyejg || "鏈彂鐜扮洰鏍囨�х柧鐥�"; - } else { - this.$message({ - type: "warning", - message: "璇ュ鎴锋病鏈変綋妫�椤圭洰鏁版嵁", - }); - // 濡傛灉娌℃湁鏁版嵁锛屾竻绌哄瓧娈� - this.zhiyeJl = ""; - this.zhiyeJg = "鏈彂鐜扮洰鏍囨�х柧鐥�"; - } - - }); - }); - } - }); - } else { - // 寮傚父缁撴灉鏈夋暟鎹紝绛夊緟宸﹀彸涓よ竟閮藉姞杞藉畬鎴� - getInfo().then((response) => { - this.userId = response.user.userId; - if (this.userId) { - let data = { - userId: this.userId, - tjNumber: this.tjNumber, - state: 0, - }; - getModifiedState(data).then((res) => { - this.MsgId = res.msg; - getupdateCheckType(this.tjNumber).then((response) => { - this.isLoading = false; // 鍏抽棴鍔犺浇妗� - this.changedate = response.data; - if (this.changedate) { - this.changedate.forEach((item) => { - this.textarea1 = item.checkAdvice || ""; - }); - this.initialTotalCheckAdvice = this.textarea1; - this.initialState = JSON.parse( - JSON.stringify(this.changedate) - ); - for (let i = 0; i < this.changedate.length; i++) { - this.remark = this.changedate[i].remark; - } - // 鍥炴樉 zhiyeJl 鍜� zhiyeJg - this.zhiyeJl = this.changedate[0].zhiyejl || ""; - this.zhiyeJg = - this.changedate[0].zhiyejg || "鏈彂鐜扮洰鏍囨�х柧鐥�"; - } else { - this.$message({ - type: "warning", - message: "璇ュ鎴锋病鏈変綋妫�椤圭洰鏁版嵁", - }); - // 濡傛灉娌℃湁鏁版嵁锛屾竻绌哄瓧娈� - this.zhiyeJl = ""; - this.zhiyeJg = "鏈彂鐜扮洰鏍囨�х柧鐥�"; - } - }); - }); - } - }); - } - }); + // 鐩存帴鍦╤andleClick涓疄鐜板苟琛屽姞杞� + this.loadDataInHandleClick(); } else { this.$confirm( "" + this.status.name + "姝e湪淇敼璇ヤ俊鎭�, 鏄惁寮哄埗杩涘幓?", @@ -3306,95 +3217,8 @@ // 鐢ㄦ埛纭寮哄埗杩涘叆锛屽紑鍚姞杞藉拰寮规 this.isLoading = true; this.drawer = true; - // 鍏堣皟鐢ㄥ紓甯哥粨鏋滐紝绛夊緟鍏跺畬鎴愬悗鍐嶇户缁悗缁�昏緫 - this.yichangjieguo().then(() => { - // 濡傛灉寮傚父缁撴灉涓虹┖锛屽乏杈规暟鎹姞杞藉畬鎴愬悗灏卞叧闂姞杞芥 - if (!this.yichangList || this.yichangList.length === 0) { - getInfo().then((response) => { - this.userId = response.user.userId; - if (this.userId) { - let data = { - userId: this.userId, - tjNumber: this.tjNumber, - state: 0, - }; - getforceIn(data).then((res) => { - this.MsgId = res.msg; - getupdateCheckType(this.tjNumber).then((response) => { - this.isLoading = false; // 鍏抽棴鍔犺浇妗� - this.changedate = response.data; - if (this.changedate) { - for (let i = 0; i < this.changedate.length; i++) { - this.remark = this.changedate[i].remark; - } - this.initialState = JSON.parse( - JSON.stringify(this.changedate) - ); - this.changedate.forEach((item) => { - this.textarea1 = item.checkAdvice || ""; - }); - // 鍥炴樉 zhiyeJl 鍜� zhiyeJg - this.zhiyeJl = this.changedate[0].zhiyejl || ""; - this.zhiyeJg = - this.changedate[0].zhiyejg || "鏈彂鐜扮洰鏍囨�х柧鐥�"; - } else { - this.$message({ - type: "warning", - message: "璇ュ鎴锋病鏈変綋妫�椤圭洰鏁版嵁", - }); - // 濡傛灉娌℃湁鏁版嵁锛屾竻绌哄瓧娈� - this.zhiyeJl = ""; - this.zhiyeJg = "鏈彂鐜扮洰鏍囨�х柧鐥�"; - } - - }); - }); - } - }); - } else { - // 寮傚父缁撴灉鏈夋暟鎹紝绛夊緟宸﹀彸涓よ竟閮藉姞杞藉畬鎴� - getInfo().then((response) => { - this.userId = response.user.userId; - if (this.userId) { - let data = { - userId: this.userId, - tjNumber: this.tjNumber, - state: 0, - }; - getforceIn(data).then((res) => { - this.MsgId = res.msg; - getupdateCheckType(this.tjNumber).then((response) => { - this.isLoading = false; // 鍏抽棴鍔犺浇妗� - this.changedate = response.data; - if (this.changedate) { - for (let i = 0; i < this.changedate.length; i++) { - this.remark = this.changedate[i].remark; - } - this.initialState = JSON.parse( - JSON.stringify(this.changedate) - ); - this.changedate.forEach((item) => { - this.textarea1 = item.checkAdvice || ""; - }); - // 鍥炴樉 zhiyeJl 鍜� zhiyeJg - this.zhiyeJl = this.changedate[0].zhiyejl || ""; - this.zhiyeJg = - this.changedate[0].zhiyejg || "鏈彂鐜扮洰鏍囨�х柧鐥�"; - } else { - this.$message({ - type: "warning", - message: "璇ュ鎴锋病鏈変綋妫�椤圭洰鏁版嵁", - }); - // 濡傛灉娌℃湁鏁版嵁锛屾竻绌哄瓧娈� - this.zhiyeJl = ""; - this.zhiyeJg = "鏈彂鐜扮洰鏍囨�х柧鐥�"; - } - }); - }); - } - }); - } - }); + // 鐩存帴鍦╤andleClick涓疄鐜板苟琛屽姞杞斤紙寮哄埗杩涘叆妯″紡锛� + this.loadDataInHandleClick(true); }) .catch(() => { this.isLoading = false; // 鍙栨秷鏃朵篃瑕佸叧闂姞杞芥 @@ -3406,6 +3230,179 @@ } } }); + }, */ + + handleClick(row) { + this.qingkong(); + this.$refs.Pre.open = false; + this.tableAll = row; + let dict = "dict_tjtype"; + getDicts(dict).then((res) => { + if (res.code == 200) { + res.data.forEach((item) => { + if (this.tableAll.tjCategory == item.dictValue) { + this.tableAll.tjCategory = item.dictLabel; + } + }); + } else { + throw new Error("鑾峰彇浣撴绫诲瀷瀛楀吀澶辫触"); + } + }); + this.tjproject = "0"; + this.tjNumber = this.tableAll.tjNumber; + + getState(this.tjNumber).then((res) => { + this.status = res.data; + if (this.status) { + if (this.status.status === "1") { + // 寮�鍚姞杞藉拰寮规 + this.isLoading = true; + this.drawer = true; + + // 骞惰鎵ц寮傚父缁撴灉銆佺敤鎴蜂俊鎭幏鍙栧拰浣撴椤圭洰鏁版嵁鑾峰彇 + Promise.all([ + this.yichangjieguo(), + getInfo(), + getupdateCheckType(this.tjNumber), + ]) + .then(([yichangResult, userInfo, checkTypeResult]) => { + this.userId = userInfo.user.userId; + if (this.userId) { + let data = { + userId: this.userId, + tjNumber: this.tjNumber, + state: 0, + }; + getModifiedState(data) + .then((res) => { + this.MsgId = res.msg; + // 鎵�鏈夋暟鎹兘宸插姞杞藉畬鎴愶紝鍏抽棴loading + this.isLoading = false; + + this.changedate = checkTypeResult.data; + if (this.changedate) { + this.changedate.forEach((item) => { + this.textarea1 = item.checkAdvice || ""; + }); + this.initialTotalCheckAdvice = this.textarea1; + this.initialState = JSON.parse( + JSON.stringify(this.changedate) + ); + for (let i = 0; i < this.changedate.length; i++) { + this.remark = this.changedate[i].remark; + } + // 鍥炴樉 zhiyeJl 鍜� zhiyeJg + this.zhiyeJl = this.changedate[0].zhiyejl || ""; + this.zhiyeJg = + this.changedate[0].zhiyejg || "鏈彂鐜扮洰鏍囨�х柧鐥�"; + } else { + this.$message({ + type: "warning", + message: "璇ュ鎴锋病鏈変綋妫�椤圭洰鏁版嵁", + }); + // 濡傛灉娌℃湁鏁版嵁锛屾竻绌哄瓧娈� + this.zhiyeJl = ""; + this.zhiyeJg = "鏈彂鐜扮洰鏍囨�х柧鐥�"; + } + }) + .catch((error) => { + this.isLoading = false; + console.error("淇敼鐘舵�佸け璐�:", error); + this.$message.error("淇敼鐘舵�佸け璐�"); + }); + } else { + this.isLoading = false; + } + }) + .catch((error) => { + this.isLoading = false; + console.error("骞惰鍔犺浇鏁版嵁澶辫触:", error); + this.$message.error("鍔犺浇鏁版嵁澶辫触锛岃閲嶈瘯"); + }); + } else { + this.$confirm( + "" + this.status.name + "姝e湪淇敼璇ヤ俊鎭�, 鏄惁寮哄埗杩涘幓?", + "鎻愮ず", + { + confirmButtonText: "鏄�", + cancelButtonText: "鍚�", + type: "warning", + } + ) + .then(() => { + // 寮�鍚姞杞藉拰寮规 + this.isLoading = true; + this.drawer = true; + + // 骞惰鎵ц寮傚父缁撴灉銆佺敤鎴蜂俊鎭幏鍙栧拰浣撴椤圭洰鏁版嵁鑾峰彇 + Promise.all([ + this.yichangjieguo(), + getInfo(), + getupdateCheckType(this.tjNumber), + ]) + .then(([yichangResult, userInfo, checkTypeResult]) => { + this.userId = userInfo.user.userId; + if (this.userId) { + let data = { + userId: this.userId, + tjNumber: this.tjNumber, + state: 0, + }; + getforceIn(data) + .then((res) => { + this.MsgId = res.msg; + // 鎵�鏈夋暟鎹兘宸插姞杞藉畬鎴愶紝鍏抽棴loading + this.isLoading = false; + + this.changedate = checkTypeResult.data; + if (this.changedate) { + for (let i = 0; i < this.changedate.length; i++) { + this.remark = this.changedate[i].remark; + } + this.initialState = JSON.parse( + JSON.stringify(this.changedate) + ); + this.changedate.forEach((item) => { + this.textarea1 = item.checkAdvice || ""; + }); + // 鍥炴樉 zhiyeJl 鍜� zhiyeJg + this.zhiyeJl = this.changedate[0].zhiyejl || ""; + this.zhiyeJg = + this.changedate[0].zhiyejg || "鏈彂鐜扮洰鏍囨�х柧鐥�"; + } else { + this.$message({ + type: "warning", + message: "璇ュ鎴锋病鏈変綋妫�椤圭洰鏁版嵁", + }); + // 濡傛灉娌℃湁鏁版嵁锛屾竻绌哄瓧娈� + this.zhiyeJl = ""; + this.zhiyeJg = "鏈彂鐜扮洰鏍囨�х柧鐥�"; + } + }) + .catch((error) => { + this.isLoading = false; + console.error("寮哄埗杩涘叆澶辫触:", error); + this.$message.error("寮哄埗杩涘叆澶辫触"); + }); + } else { + this.isLoading = false; + } + }) + .catch((error) => { + this.isLoading = false; + console.error("骞惰鍔犺浇鏁版嵁澶辫触:", error); + this.$message.error("鍔犺浇鏁版嵁澶辫触锛岃閲嶈瘯"); + }); + }) + .catch(() => { + this.$message({ + type: "info", + message: "宸插彇娑堣繘鍏�", + }); + }); + } + } + }); }, handleClose(done) { -- Gitblit v1.8.0