From 51fa6f173a5a95e34b4ec31db77035dbaeb968c6 Mon Sep 17 00:00:00 2001 From: gaoshp <291585735@qq.com> Date: 星期日, 29 九月 2024 19:36:11 +0800 Subject: [PATCH] fix some bug --- src/views/console/workstation/index.vue | 22 +++++++++++++--------- 1 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/views/console/workstation/index.vue b/src/views/console/workstation/index.vue index 1464e20..964c685 100644 --- a/src/views/console/workstation/index.vue +++ b/src/views/console/workstation/index.vue @@ -50,7 +50,7 @@ <el-table-column label="宸ヤ綅鍚嶇О" prop="name" width="120"></el-table-column> <el-table-column label="宸ヤ綅绫诲瀷" prop="type" width="120"> <template #default="scope"> - <span>{{ scope.row.type == '0' ? '鏈哄櫒': '浜哄伐' }}</span> + <span>{{ scope.row.type == '0' ? '鏈哄櫒' : '浜哄伐' }}</span> </template> </el-table-column> <el-table-column label="宸ヤ綅鏃ュ巻" prop="calendarName" width="120"></el-table-column> @@ -128,12 +128,12 @@ <el-col :span="8"> {{ basic.machineBrand }} </el-col> - <el-col :span="4"> + <!-- <el-col :span="4"> 椹卞姩鍚嶇О </el-col> <el-col :span="8"> {{ basic.typeName }} - </el-col> + </el-col> --> </el-row> </el-main> </el-container> @@ -143,11 +143,12 @@ <el-button v-show="list.length > 0" @click="() => { editFlag = !editFlag; showTable = !editFlag }" style="margin-left: auto;" text type="primary" - size="small">{{ editFlag ? '鍙栨秷' : '閰嶇疆宸ヤ綅閲囬泦' }}</el-button> + size="small">{{ editFlag ? '鍙栨秷' : '閰嶇疆宸ヤ綅閲囬泦' + }}</el-button> <el-button v-show="editFlag" @click="saveInfo" text type="primary" size="small">淇濆瓨</el-button> - <el-button text type="primary" size="small" - @click="editDMP">淇敼DMP閰嶇疆</el-button> + <!-- <el-button text type="primary" size="small" + @click="editDMP">淇敼DMP閰嶇疆</el-button> --> </el-header> <el-main> <el-table :data="list" height="200px" @@ -572,15 +573,18 @@ let data = this.formatData(res.data) this.group = data this.showGrouploading = false + console.log('>>>>>>>>>>>>>>>>>>>>>') // this.$nextTick(() => { if (!flag) { + debugger let parent = res.data.filter(item => item.parentId == 0)[0] this.treeCheckedNode = parent this.treeCheckKey = parent.id } else { - let parent = res.data.filter(item => item.id == this.treeCheckedNode.id)[0] - this.treeCheckedNode = parent - this.treeCheckKey = parent.id + debugger + let parent = res.data.filter(item => item.parentId == 0)[0] + parent && (this.treeCheckedNode = parent) + parent && (this.treeCheckKey = parent.id) } // }) -- Gitblit v1.9.3