From 0bb32824b11004c4234fe173bdb39d0205c2f822 Mon Sep 17 00:00:00 2001 From: qx <1084500556@qq.com> Date: 星期二, 18 三月 2025 14:27:44 +0800 Subject: [PATCH] qx --- src/views/doctor/check/index.vue | 17 ++++++++--------- src/views/hosp/project/index.vue | 21 +++++++++++++++++++-- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/src/views/doctor/check/index.vue b/src/views/doctor/check/index.vue index bc4a6e6..b0026bd 100644 --- a/src/views/doctor/check/index.vue +++ b/src/views/doctor/check/index.vue @@ -274,7 +274,7 @@ <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"> + <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"> @@ -282,8 +282,8 @@ <el-table-column prop="proResult" label="妫�娴嬬粨鏋�" width="150"> <template slot-scope="{ row, $index }"> - <el-input type="textarea" autosize size="mini" v-model="row.proResult" :ref="`input-${$index}`" - @keydown.enter.native="keyInputConfirm($event, $index)" @focus="handleFocus(row)" + <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"></el-input> </template> </el-table-column> @@ -414,7 +414,7 @@ <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"> + <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"> @@ -422,8 +422,8 @@ <el-table-column prop="proResult" label="妫�娴嬬粨鏋�" width="150"> <!-- slot-scope="scope" --> <template slot-scope="{ row, $index }"> - <el-input type="textarea" autosize size="mini" v-model="row.proResult" :ref="`input-${$index}`" - @keydown.enter.native="keyInputConfirm($event, $index)" @focus="handleFocus(row)" + <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)" ></el-input> <!-- @input="vale" --> <!-- <el-input type="textarea" autosize size="mini" v-model="scope.row.proResult" autocomplete="off" :ref="`input-${scope.$index}-${scope.row.proResult}`" @@ -1284,16 +1284,15 @@ this.inputDoms = inputDoms // console.log(this.inputDoms) }, - keyInputConfirm(event, currentRowIndex) { + keyInputConfirm(event,index, currentRowIndex) { // 闃绘榛樿鍥炶溅琛屼负锛屾瘮濡傛彁浜よ〃鍗� event.preventDefault(); event.stopPropagation() const nextRowIndex = currentRowIndex + 1; // 璁$畻涓嬩竴琛岀储寮� - // 濡傛灉涓嬩竴琛屽瓨鍦紝鍒欒仛鐒﹁琛岀殑杈撳叆妗� if (nextRowIndex < this.proParentList.sons.length) { this.$nextTick(() => { - const nextInputRef = `input-${nextRowIndex}`; + const nextInputRef = `input-item${index}-row${nextRowIndex}`; const nextInput = this.$refs[nextInputRef]; if (nextInput) { // 澶勭悊 ref 鍙兘涓烘暟缁勭殑鎯呭喌锛堝鍔ㄦ�佹覆鏌擄級 diff --git a/src/views/hosp/project/index.vue b/src/views/hosp/project/index.vue index 7afbbcb..0e6a6a9 100644 --- a/src/views/hosp/project/index.vue +++ b/src/views/hosp/project/index.vue @@ -685,11 +685,22 @@ project.children = this.handleTree(response.data.list, "proId"); this.key = response.data.key; this.projectOptions.push(project); + // this.open = true; if (row.proId) { this.form.proParentId = row.proId || 0; this.open = true; } else if (this.treeDate.id) { - this.form.proParentId = this.treeDate.id || 0; + if(this.treeDate.qf == "0"){ + this.form.proParentId = "0" + this.projectOptions.forEach((item) => { + item.children.forEach((item1) => { + if (this.treeDate.id == item1.deptId) { + this.form.deptId = item1.deptId; + } + }); + }); + }else{ + this.form.proParentId = this.treeDate.id; this.projectOptions.forEach((item) => { item.children.forEach((item1) => { if (this.form.proParentId == item1.proId) { @@ -697,8 +708,12 @@ } }); }); + } + + this.open = true; } else { + this.form.proParentId = "0" this.open = true; } } @@ -815,7 +830,9 @@ }); }, handleNodeClick(date) { + this.treeDate = date; + console.log(this.treeDate) this.xiugais = date.qf === "0"; let proId = date.id; getInfoByProId(proId).then((response) => { @@ -1059,7 +1076,7 @@ } else { this.form.consumablesList = null; } - if (!this.form.deptId || !this.form.proParentId) { + if (!this.form.deptId || this.form.proParentId == null) { this.$message.error("璇峰~鍐欑埗椤瑰悕绉版垨绉戝鍚嶇О"); this.open = true; } else { -- Gitblit v1.8.0