From 76af820e2e11366b322705b51c351ace3d40608a Mon Sep 17 00:00:00 2001 From: qx <1084500556@qq.com> Date: 星期二, 01 七月 2025 16:46:04 +0800 Subject: [PATCH] Merge branch 'master' of http://101.42.27.146:5001/r/ltkj_peisweb_region --- src/views/doctor/check/index.vue | 231 +++++++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 183 insertions(+), 48 deletions(-) diff --git a/src/views/doctor/check/index.vue b/src/views/doctor/check/index.vue index c732377..2f34f30 100644 --- a/src/views/doctor/check/index.vue +++ b/src/views/doctor/check/index.vue @@ -198,6 +198,13 @@ <!-- 鐐瑰嚮鍙宠竟寮瑰嚭灞� --> <el-drawer :visible.sync="drawer" :with-header="false" size="70%" :before-close="handleClose"> + <div + v-loading="isLoading" + element-loading-text="姝e湪鍔犺浇鏁版嵁锛岃绋嶅��..." + element-loading-spinner="el-icon-loading" + element-loading-background="rgba(255, 255, 255, 0.8)" + style="height: 100%; padding: 20px; position: relative" + > <div style="font-size: 14px"> <table style=" width: 96%; @@ -274,28 +281,25 @@ <el-col v-show="baogaoqian"> <template> <el-tabs v-model="radio" type="border-card" @tab-click="handleTabClick" style="margin-left: 10px"> - <el-tab-pane :label="item.proName" :name="item.proId" v-for="(item, index) in Parent" :key="index" :lazy="false"> + <el-tab-pane :label="item.proName" :name="item.proId" v-for="(item, index) in Parent" :key="index" + :lazy="false"> <el-table class="bgc" v-loading="loading" :data="proParentList.sons" border height="460px" style="width: 96%; margin: 10px 10px" :row-class-name="tableRowClassName"> <el-table-column prop="project.proName" label="妫�娴嬮」鐩�" width="150"> </el-table-column> <el-table-column prop="proResult" label="妫�娴嬬粨鏋�" width="150"> - <!-- <template slot-scope="scope"> - <el-input type="textarea" autosize size="mini" v-model="scope.row.proResult" autocomplete="off" - placeholder="璇疯緭鍏ユ娴嬬粨鏋�" @focus="handleFocus(scope.row)" @blur="handleInputConfirm(scope.row)" - @input="vale($event, scope.row)" :disabled="scope.row.project.proName === 'BMI'" - ></el-input> --> - <template slot-scope="{ row, $index }"> - <el-input type="textarea" autosize size="mini" v-model="row.proResult" :ref="`input-item${index}-row${$index}`" - @keydown.enter.native="keyInputConfirm($event,index,$index)" @focus="handleFocus(row)" + <template slot-scope="{ row, $index }"> + <el-input type="textarea" autosize size="mini" v-model="row.proResult" + :ref="`input-item${index}-row${$index}`" + @keydown.enter.native="keyInputConfirm($event, index, $index)" @focus="handleFocus(row)" @blur="handleInputConfirm(row)" @input="vale($event, row)" - :disabled="row.project.proName === 'BMI'" - ></el-input> + :disabled="row.project.proName === 'BMI'"></el-input> </template> </el-table-column> <el-table-column prop="exceptionDesc" label="寮傚父" width="55px" align="center"> <template slot-scope="scope"> - <el-checkbox v-model="scope.row.exceptionDesc" @change="changDesc(scope.row)"></el-checkbox> + <el-checkbox v-model="scope.row.exceptionDesc" @change="changDesc(scope.row)" + :disabled="scope.row.project.sfcyyc === 1 || scope.row.project.proName === 'BMI'"></el-checkbox> </template> </el-table-column> <el-table-column label="瑙勫垯" width="70"> @@ -305,7 +309,12 @@ </el-table-column> <el-table-column prop="project.proMetering" label="鍗曚綅" width="55"> </el-table-column> - <el-table-column prop="project.proScope" label="鍙傝�冭寖鍥�" width="70"> + <el-table-column label="鍙傝�冭寖鍥�" width="70" align="center"> + <template slot-scope="scope"> + + {{ scope.row.project.proScope }} + + </template> </el-table-column> <el-table-column prop="conclusion" label="缁撴灉缁撹" width="200"> <template slot-scope="scope"> @@ -420,22 +429,19 @@ <el-col :span="18" v-show="baogaohou"> <template> <el-tabs v-model="radio" type="border-card" @tab-click="handleTabClick" style="margin-left: 10px"> - <el-tab-pane :label="item.proName" :name="item.proId" v-for="(item, index) in Parent" :key="index" :lazy="false"> + <el-tab-pane :label="item.proName" :name="item.proId" v-for="(item, index) in Parent" :key="index" + :lazy="false"> <el-table class="bgc" v-loading="loading" :data="proParentList.sons" border height="460px" style="width: 96%; margin: 10px 10px" :row-class-name="tableRowClassName"> <el-table-column prop="project.proName" label="妫�娴嬮」鐩�" width="100"> </el-table-column> <el-table-column prop="proResult" label="妫�娴嬬粨鏋�" width="150"> - <!-- <template slot-scope="scope"> - <el-input type="textarea" autosize size="mini" v-model="scope.row.proResult" autocomplete="off" - placeholder="璇疯緭鍏ユ娴嬬粨鏋�" @focus="handleFocus(scope.row)" @blur="handleInputConfirm(scope.row)" - @input="vale"></el-input> --> - <template slot-scope="{ row, $index }"> - <el-input type="textarea" autosize size="mini" v-model="row.proResult" :ref="`input-item${index}-row${$index}`" - @keydown.enter.native="keyInputConfirm($event,index,$index)" @focus="handleFocus(row)" + <template slot-scope="{ row, $index }"> + <el-input type="textarea" autosize size="mini" v-model="row.proResult" + :ref="`input-item${index}-row${$index}`" + @keydown.enter.native="keyInputConfirm($event, index, $index)" @focus="handleFocus(row)" @blur="handleInputConfirm(row)" @input="vale($event, row)" - :disabled="row.project.proName === 'BMI'" - ></el-input> + :disabled="row.project.proName === 'BMI'"></el-input> </template> </el-table-column> <el-table-column label="瑙勫垯" width="70"> @@ -450,7 +456,8 @@ <el-table-column prop="exceptionDesc" label="寮傚父" width="55px" align="center"> <template slot-scope="scope"> - <el-checkbox v-model="scope.row.exceptionDesc"></el-checkbox> + <el-checkbox v-model="scope.row.exceptionDesc" + :disabled="scope.row.project.sfcyyc === 1"></el-checkbox> </template> </el-table-column> <el-table-column prop="isReturn" label="澶嶈瘖" width="55px" align="center"> @@ -577,6 +584,7 @@ <Historicalreport v-show="lishi" :reportHistorydata="reportHistorydata"></Historicalreport> </el-col> </el-row> + </div> </el-drawer> <Public ref="aaa" :row="row" @add="handleChanges" /> <jianceResult ref="bbb" @add="handleChangesZt" /> @@ -909,6 +917,7 @@ proParentList: [], tjNumber: "", DeptadviceAll: [], + isLoading: false, project: {}, summaryList: [], summaryAll: [], @@ -971,10 +980,27 @@ }, methods: { + getBMIStatus(row) { + const bmi = parseFloat(row.proResult); + if (isNaN(bmi) || !row.proResult) return ''; // 澶勭悊鏃犳晥鎴栫┖鐨凚MI鍊� + if (bmi > 28) { + row.exceptionDesc = true; // 鑷姩鍕鹃�夊紓甯稿閫夋 + row.conclusion = '鍋忛珮'; // 璁剧疆缁撹 + return '鍋忛珮'; + } + if (bmi < 12) { + row.exceptionDesc = true; // 鑷姩鍕鹃�夊紓甯稿閫夋 + row.conclusion = '鍋忎綆'; // 璁剧疆缁撹 + return '鍋忎綆'; + } + row.exceptionDesc = false; // 姝e父鑼冨洿鍐呭彇娑堝嬀閫� + row.conclusion = '姝e父'; // 璁剧疆缁撹 + return '姝e父'; + }, // 璁$畻 BMI calculateBMI(height, weight) { if (height && weight) { - const heightInMeters = parseFloat(height) / 100; // cm 杞崲涓� m + const heightInMeters = parseFloat(height) / 100; // 鍘樼背杞崲涓虹背 const weightInKg = parseFloat(weight); const bmi = weightInKg / (heightInMeters * heightInMeters); return bmi.toFixed(1); // 淇濈暀涓�浣嶅皬鏁� @@ -984,6 +1010,7 @@ // 瀹炴椂鏇存柊 BMI vale(value, row) { + console.log(3333) if (row.project.proName === '韬珮' || row.project.proName === '浣撻噸') { const heightRow = this.proParentList.sons.find( item => item.project.proName === '韬珮' @@ -999,10 +1026,51 @@ const height = row.project.proName === '韬珮' ? value : heightRow.proResult; const weight = row.project.proName === '浣撻噸' ? value : weightRow.proResult; const bmi = this.calculateBMI(height, weight); - bmiRow.proResult = bmi || ''; // 瀹炴椂鏇存柊 BMI + bmiRow.proResult = bmi || ''; // 瀹炴椂鏇存柊BMI鍊� + this.getBMIStatus(bmiRow); // 妫�鏌MI鐘舵�佸苟鏇存柊寮傚父澶嶉�夋 } } + + // 鐜版湁鐨勮鍒欐鏌ラ�昏緫淇濇寔涓嶅彉 + this.focusrow = row; + this.proResult = row; + const pattern3 = new RegExp("[0-9]+"); + if (row.proResult) { } + if (pattern3.test(row.proResult)) { + let data = { + proId: this.focusrow.proId, + cusId: this.tableAll.cusId, + tjNum: this.tableAll.tjNumber, + keyNum: this.proResult.proResult, + }; + AutoGetRule(data).then((res) => { + this.focusrow.conclusion = ""; + if (res.data) { + this.autorule = res.data; + this.focusrow.rulesList = res.data; + if (row.project.sfcyyc == 1) { + return; + } else { + if (res.data.length > 0) { + const conditions = ["姝e父", "鏈寮傚父", "闃存��", "鏈鏄庢樉寮傚父"]; + this.focusrow.exceptionDesc = !conditions.some((condition) => + this.autorule[0].bz.includes(condition) + ); + } else { + this.focusrow.exceptionDesc = false; + } + } + if (this.autorule.length !== 0 && (this.autorule[0] || this.autorule[0].nr)) { + this.focusrow.proAdvice = this.autorule[0].nr; + } + this.autorule.forEach((item) => { + this.focusrow.conclusion += this.focusrow.conclusion ? item.bz : item.bz; + }); + } + }); + } }, + // 杈撳叆纭鏃舵洿鏂� BMI handleInputConfirm(row) { @@ -1023,10 +1091,48 @@ const weight = weightRow.proResult; const bmi = this.calculateBMI(height, weight); bmiRow.proResult = bmi || ''; + this.getBMIStatus(bmiRow); // 妫�鏌MI鐘舵�佸苟鏇存柊寮傚父澶嶉�夋 } } - this.rows.push(row); } + // 鐜版湁鐨勮鍒欐鏌ラ�昏緫淇濇寔涓嶅彉 + this.focusrow = row; + this.proResult = row; + const pattern3 = new RegExp("[0-9]+"); + if (pattern3.test(row.proResult)) { + let data = { + proId: this.focusrow.proId, + cusId: this.tableAll.cusId, + tjNum: this.tableAll.tjNumber, + keyNum: this.proResult.proResult, + }; + AutoGetRule(data).then((res) => { + this.focusrow.conclusion = ""; + if (res.data) { + this.autorule = res.data; + this.focusrow.rulesList = res.data; + if (row.project.sfcyyc == 1) { + return; + } else { + if (res.data.length > 0) { + const conditions = ["姝e父", "鏈寮傚父", "闃存��", "鏈鏄庢樉寮傚父"]; + this.focusrow.exceptionDesc = !conditions.some((condition) => + this.autorule[0].bz.includes(condition) + ); + } else { + this.focusrow.exceptionDesc = false; + } + } + if (this.autorule.length !== 0 && (this.autorule[0] || this.autorule[0].nr)) { + this.focusrow.proAdvice = this.autorule[0].nr; + } + this.autorule.forEach((item) => { + this.focusrow.conclusion += this.focusrow.conclusion ? item.bz : item.bz; + }); + } + }); + } + this.rows.push(row); }, // 鍒濆鍖栨暟鎹椂璁$畻 BMI @@ -1068,6 +1174,7 @@ } this.proParentList.sons.forEach((item) => { this.doctorName = item.doctorName; + if (this.doctorName == null) { this.userList.forEach((element) => { const userName = this.$store.state.user.name; @@ -1079,7 +1186,7 @@ if (item.isReturn == 1) item.isReturn = true; if (item.isReturn == 0) item.isReturn = false; if (item.exceptionDesc == "1") item.exceptionDesc = true; - if (item.exceptionDesc == "0") item.exceptionDesc = false; + if (item.exceptionDesc == "0" || item.project.sfcyyc == 1) item.exceptionDesc = false; }); if (this.proParentList.xiaoJie && this.proParentList.xiaoJie.length != 0) { this.Parent.forEach((item3) => { @@ -1093,32 +1200,44 @@ }); }, - // 浠ヤ笅涓哄叾浠栨柟娉曪紝鏈仛淇敼锛屼粎淇濈暀蹇呰閮ㄥ垎锛屽叾浣欑渷鐣ヤ互淇濇寔绠�娲� handleFocus(row) { + console.log(11111) this.autorule = []; - if (!row.resultType || row.resultType == 2 ) { + if (!row.resultType || row.resultType == 2) { return; } else { this.curindex = row; - selectZT({ - proId: row.proId, - }).then((res) => { - if (res.data.length > 0) { - this.$refs.bbb.title = "閫夋嫨妫�娴嬬粨鏋�"; - // this.$refs.bbb.proId = row.proId; - this.$refs.bbb.open = true; - this.$refs.bbb.getList(this.curindex); - } else { - this.$refs.bbb.open = false; - } - }); - + selectZT({ + proId: row.proId, + }).then((res) => { + if (res.data.length > 0) { + this.$refs.bbb.title = "閫夋嫨妫�娴嬬粨鏋�"; + // this.$refs.bbb.proId = row.proId; + this.$refs.bbb.open = true; + this.$refs.bbb.getList(this.curindex); + } else { + this.$refs.bbb.open = false; + } + }); + } }, handleChangesZt(params) { this.curindex.proResult = params.map((item) => item.ruleStr).join(","); this.handleInputConfirm(this.curindex, params); + }, + + handleChanges(param1, param2) { + this.row.conclusion = param1; + this.row.rulesList = param2; + }, + + handleguize(row) { + this.row = row; + this.$refs.aaa.open = true; + this.$refs.aaa.title = "璇婃柇缁撴灉缁撹"; + this.$refs.aaa.getList(this.row); }, tableRowClassName({ row }) { @@ -1262,7 +1381,7 @@ }, handleClose() { - this.$tab.refreshPage(); + this.drawer = false; // 鍙叧闂娊灞夛紝涓嶅埛鏂伴〉闈㈡垨閲嶇疆鏁版嵁 }, handleClose1() { @@ -1274,6 +1393,8 @@ }, changDesc(item) { + + item.conclusion = item.exceptionDesc ? "寮傚父" : "姝e父"; }, @@ -1313,10 +1434,10 @@ - keyInputConfirm(event,index, currentRowIndex) { + keyInputConfirm(event, index, currentRowIndex) { // 闃绘榛樿鍥炶溅琛屼负锛屾瘮濡傛彁浜よ〃鍗� event.preventDefault(); - event.stopPropagation() + event.stopPropagation() const nextRowIndex = currentRowIndex + 1; // 璁$畻涓嬩竴琛岀储寮� // 濡傛灉涓嬩竴琛屽瓨鍦紝鍒欒仛鐒﹁琛岀殑杈撳叆妗� if (nextRowIndex < this.proParentList.sons.length) { @@ -1364,7 +1485,7 @@ }); }, - hb() {}, + hb() { }, propoChange() { this.cusobj = { sex: this.tableAll.cusSex, isZj: 1 }; @@ -1646,6 +1767,10 @@ this.getDept(row.tjNumber); this.loading = true; this.drawer = true; + this.isLoading = true; + this.Parent = [] + this.tableAll= [] + this.proParentList = {} this.$nextTick(() => this.initInputDOM()); this.tableAll = row; this.tjNumber = row.tjNumber; @@ -1653,6 +1778,7 @@ getParentList(this.tjNumber).then((response) => { if (response.data) { this.loading = false; + this.isLoading = false; this.Parent = response.data; this.Parent.forEach((item) => { if (item.type === 1) item.proName += " 鉁�"; @@ -1670,7 +1796,14 @@ this.Parent = []; this.$modal.msgError("璇ョ瀹や笅鏃犻」鐩紒"); } - }); + }) .catch((error) => { + console.error("璇锋眰澶辫触:", error); + this.$modal.msgError("鏁版嵁鍔犺浇澶辫触"); + }) + .finally(() => { + this.loading = false; + this.isLoading = false; // 纭繚鏈�缁堢姸鎬侀噸缃� + }); this.getbzlist(); }, @@ -1756,6 +1889,7 @@ }, determine() { + this.tjOrderDetail = []; let tjNumber = this.tableAll.tjNumber; this.userList.forEach((item) => { if (this.doctorName == item.nickName) this.doctorName = item.userId; @@ -1792,6 +1926,7 @@ }]; getaddRemark(data).then((res) => { this.$modal.msgSuccess("鎻愪氦鎴愬姛"); + this.rows = []; // 鎻愪氦鎴愬姛鍚庢竻绌� this.rows this.drawer = false; }); this.handleClose(); -- Gitblit v1.8.0