From 99c73e4855442b10dd8cd22233166fc427166a5c Mon Sep 17 00:00:00 2001 From: qx <1084500556@qq.com> Date: 星期五, 14 三月 2025 17:50:36 +0800 Subject: [PATCH] qx --- src/views/doctor/check/index.vue | 40 ++++++++++++++++++- src/views/system/tijian/index.vue | 5 +- src/layout/components/Sidebar/index.vue | 22 ++++++++++- 3 files changed, 60 insertions(+), 7 deletions(-) diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index 1d23080..e067122 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -4,7 +4,7 @@ <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper"> <!-- :default-openeds="['/tijian']" --> <el-menu - + :default-openeds="defaultOpeneds" :default-active="activeMenu" :collapse="isCollapse" :background-color="settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground" @@ -26,6 +26,7 @@ </template> <script> +import { getRouters } from '@/api/menu' import { mapGetters, mapState } from "vuex"; import Logo from "./Logo"; import SidebarItem from "./SidebarItem"; @@ -33,9 +34,16 @@ export default { components: { SidebarItem, Logo }, + data() { + return { + defaultActive: '', + defaultOpeneds: [] + }; + }, computed: { ...mapState(["settings"]), ...mapGetters(["sidebarRouters", "sidebar"]), + activeMenu() { const route = this.$route; const { meta, path } = route; @@ -54,6 +62,16 @@ isCollapse() { return !this.sidebar.opened; } - } + }, + created() { + this.route(); + }, + methods: { + route(){ + getRouters().then(res => { + this.defaultOpeneds = [res.data[0].path] + }) + }, + }, }; </script> diff --git a/src/views/doctor/check/index.vue b/src/views/doctor/check/index.vue index a5cc1af..282a1df 100644 --- a/src/views/doctor/check/index.vue +++ b/src/views/doctor/check/index.vue @@ -280,10 +280,16 @@ <el-table-column prop="project.proName" label="妫�娴嬮」鐩�" width="150"> </el-table-column> <el-table-column prop="proResult" label="妫�娴嬬粨鏋�" width="150"> - <template slot-scope="scope"> + <!-- <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-${$index}`" + @keyup.enter.native="keyInputConfirm($event, $index)" @focus="handleFocus(row)" + @blur="handleInputConfirm(row)" @input="vale($event, row)" + :disabled="row.project.proName === 'BMI'" ></el-input> </template> </el-table-column> @@ -420,10 +426,16 @@ <el-table-column prop="project.proName" label="妫�娴嬮」鐩�" width="100"> </el-table-column> <el-table-column prop="proResult" label="妫�娴嬬粨鏋�" width="150"> - <template slot-scope="scope"> + <!-- <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> + @input="vale"></el-input> --> + <template slot-scope="{ row, $index }"> + <el-input type="textarea" autosize size="mini" v-model="row.proResult" :ref="`input-${$index}`" + @keyup.enter.native="keyInputConfirm($event, $index)" @focus="handleFocus(row)" + @blur="handleInputConfirm(row)" @input="vale($event, row)" + :disabled="row.project.proName === 'BMI'" + ></el-input> </template> </el-table-column> <el-table-column label="瑙勫垯" width="70"> @@ -1388,6 +1400,28 @@ this.row.rulesList = param2; }, + + keyInputConfirm(event, currentRowIndex) { + // 闃绘榛樿鍥炶溅琛屼负锛屾瘮濡傛彁浜よ〃鍗� + event.preventDefault(); + const nextRowIndex = currentRowIndex + 1; // 璁$畻涓嬩竴琛岀储寮� + + // 濡傛灉涓嬩竴琛屽瓨鍦紝鍒欒仛鐒﹁琛岀殑杈撳叆妗� + if (nextRowIndex < this.proParentList.sons.length) { + this.$nextTick(() => { + const nextInputRef = `input-${nextRowIndex}`; + const nextInput = this.$refs[nextInputRef]; + if (nextInput) { + // 澶勭悊 ref 鍙兘涓烘暟缁勭殑鎯呭喌锛堝鍔ㄦ�佹覆鏌擄級 + const target = Array.isArray(nextInput) ? nextInput[0] : nextInput; + target.focus(); // 鑱氱劍杈撳叆妗� + target.select(); // 鍙�夛細閫変腑鏂囨湰 + } + }); + } + + }, + getList() { this.loading = true; this.queryParams.type = this.tjStatus; diff --git a/src/views/system/tijian/index.vue b/src/views/system/tijian/index.vue index ad39758..035f8a4 100644 --- a/src/views/system/tijian/index.vue +++ b/src/views/system/tijian/index.vue @@ -1240,7 +1240,7 @@ this.form.firmId = ""; } if (this.form.firmId) { - this.form.tjType = "1"; + this.form.tjType = this.dict.type.dict_team[2].value; } } }, @@ -1727,6 +1727,7 @@ addCustomer(formData).then((response) => { this.responseList = response.data; + this.form.tjType = this.dict.type.dict_team[0].value; this.$modal.msgSuccess("鏂板鎴愬姛"); _this.tcShow = true; _this.isDisabled = true; @@ -1772,7 +1773,7 @@ if (this.form.reservationId != null) { if (this.form.groupingId) { this.form.firmName = this.form.compName; - this.form.tjType = "1"; + this.form.tjType = this.dict.type.dict_team[2].value; this.CompanyList.forEach((item) => { if (item.cnName == this.form.firmName) { this.form.firmId = item.drugManufacturerId; -- Gitblit v1.8.0