From c6cf8edf2f0ff628ea5c1323eb9bc685398b3a43 Mon Sep 17 00:00:00 2001 From: 王震 <10952869+daywangzhen@user.noreply.gitee.com> Date: 星期六, 09 九月 2023 17:06:00 +0800 Subject: [PATCH] 改bug --- src/components/view/laboratoryManagement.vue | 31 +++++++++++++++++-------------- 1 files changed, 17 insertions(+), 14 deletions(-) diff --git a/src/components/view/laboratoryManagement.vue b/src/components/view/laboratoryManagement.vue index 55d2727..441e709 100644 --- a/src/components/view/laboratoryManagement.vue +++ b/src/components/view/laboratoryManagement.vue @@ -1,7 +1,7 @@ <template> <div> <el-row> - <el-col :span="12" class="top_left_name">瀹為獙瀹ょ鐞�</el-col> + <el-col :span="12" class="top_left_name">璁惧缁存姢</el-col> <el-col :span="12" style="text-align: right;"> <el-button @click="testItem()" @@ -209,6 +209,7 @@ :props="{ children: 'children', label: 'father' }" node-key="id" default-expand-all + highlight-current @node-click="handleNodeClick" > <div class="custom-tree-node" slot-scope="{ node, data }"> @@ -224,9 +225,9 @@ ></i> {{ data.father }}</span > - <el-button type="text" size="mini" @click.stop="remove(node, data)"> + <!-- <el-button type="text" size="mini" @click.stop="remove(node, data)"> <i class="el-icon-delete"></i> - </el-button> + </el-button> --> </div> </el-tree> </div> @@ -427,7 +428,7 @@ equr:1, }, delete:{}, - equip:[], + equip:1, rules: { name: [ { required: true, message: "璇疯緭鍏ヤ华鍣ㄨ澶囩紪鍙�", trigger: "blur" }, @@ -465,12 +466,20 @@ } }; }, + mounted() { + // 鍒濆鍖栬皟鐢ㄤ簩绾ф爲 + this.twoTreeApi(); + // 鍒濆鍖栬皟鐢ㄨ〃鏍兼暟鎹� + // this.tableDataApi(); + this.selectDevice()//鍙宠竟 + }, methods: { selectDevice() {//鍙宠竟鏁版嵁 - console.log(this.$api.url.selectDevice); + console.log(this.ruleForm.treedata.father); + console.log(this.equip); this.$axios.get(this.$api.url.selectDevice,{ params:{ - father:this.treedata.father, + father:this.ruleForm.treedata.father, type:this.equip, } }).then(res =>{ @@ -582,7 +591,7 @@ }, handleNodeClick(data) { console.log(data); - this.treedata = data + // this.treedata = data this.selectDevice() }, handlerDeptList() { @@ -720,13 +729,7 @@ }); } }, - mounted() { - // 鍒濆鍖栬皟鐢ㄤ簩绾ф爲 - this.twoTreeApi(); - // 鍒濆鍖栬皟鐢ㄨ〃鏍兼暟鎹� - this.tableDataApi(); - this.selectDevice()//鍙宠竟 - }, + watch: { "ruleForm.rawInsProductId": { //鐩戝惉ruleForm.rawInsProductId -- Gitblit v1.9.3