From 0a0114964007502d1a855c34e601e437be947c5e Mon Sep 17 00:00:00 2001
From: 李喆(开发组) <lzhe@yxqiche.com>
Date: 星期二, 18 十一月 2025 16:09:45 +0800
Subject: [PATCH] 1
---
src/views/mdc/MYTree.vue | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/src/views/mdc/MYTree.vue b/src/views/mdc/MYTree.vue
index f9b59f0..24993bc 100644
--- a/src/views/mdc/MYTree.vue
+++ b/src/views/mdc/MYTree.vue
@@ -1,7 +1,7 @@
<!--
* @Date: 2024-04-18 19:53:35
- * @LastEditors: gaoshp
- * @LastEditTime: 2024-11-04 20:05:01
+ * @LastEditors: 鏉庡枂(寮�鍙戠粍) lzhe@yxqiche.com
+ * @LastEditTime: 2025-03-27 14:47:57
* @FilePath: /cps-web/src/views/mdc/MYTree.vue
-->
<template>
@@ -40,6 +40,10 @@
default: () => {
return {}
}
+ },
+ isSelectId: { //榛樿閫変腑
+ type: String,
+ default: ""
}
},
data() {
@@ -50,7 +54,7 @@
tableData: [],
pmsPng,
firstWorkKey: '',
- currentNodeKey: [],
+ currentNodeKey: '',
defalutProps: {
label: 'title',
children: 'children',
@@ -91,6 +95,9 @@
localStorage.setItem(this.$route.path, val ? '1' : '0')
},
handleSelectionChange(selection) {
+ if (this.getAll) {
+ return this.value = selection
+ }
this.value = selection.map(v => v.id)
},
rowClick(row) {
@@ -126,7 +133,11 @@
})
},
setCurrentKey(data) {
- this.currentNodeKey = data.find(v => v.isWorkstation && v.title.indexOf(this.word) > -1).id
+ if(this.isSelectId) {
+ this.currentNodeKey = this.isSelectId;
+ }else {
+ this.currentNodeKey = data.find(v => v.isWorkstation && v.title.indexOf(this.word) > -1).id;
+ }
},
formatData(data, current) {
let newData = []
--
Gitblit v1.9.3