|
@@ -112,13 +112,13 @@ const uuid = getRandom(4)
|
|
//渲染完成
|
|
//渲染完成
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
setSplitRef()
|
|
setSplitRef()
|
|
- getNodeType()
|
|
|
|
|
|
+ // getNodeType()
|
|
})
|
|
})
|
|
//获节点类型
|
|
//获节点类型
|
|
const nodeOptions = ref([])
|
|
const nodeOptions = ref([])
|
|
-const getNodeType = async () => {
|
|
|
|
- const { data } = await getDictionary({
|
|
|
|
- code: 'meter_node_type',
|
|
|
|
|
|
+const getNodeType = async (id) => {
|
|
|
|
+ const { data } = await unitApi.getNodeTypeList({
|
|
|
|
+ id,
|
|
})
|
|
})
|
|
nodeOptions.value = getArrValue(data)
|
|
nodeOptions.value = getArrValue(data)
|
|
nodeOptions.value.forEach((ele)=>{
|
|
nodeOptions.value.forEach((ele)=>{
|
|
@@ -196,6 +196,7 @@ const treeMenus = [
|
|
]
|
|
]
|
|
const menuType = ref('')
|
|
const menuType = ref('')
|
|
const treeMenuTap = ({ key, node, data, keys }) => {
|
|
const treeMenuTap = ({ key, node, data, keys }) => {
|
|
|
|
+ getNodeType(data.id)
|
|
menuType.value = key
|
|
menuType.value = key
|
|
setStoreValue('wbsTreeExpandKeys', keys)
|
|
setStoreValue('wbsTreeExpandKeys', keys)
|
|
TreeAutoExpandKeys.value = keys || []
|
|
TreeAutoExpandKeys.value = keys || []
|
|
@@ -309,6 +310,7 @@ const treeModalSave = async () => {
|
|
//树被点击
|
|
//树被点击
|
|
const curTreeData = ref({})
|
|
const curTreeData = ref({})
|
|
const wbsElTreeClick = ({ node, data, keys }) => {
|
|
const wbsElTreeClick = ({ node, data, keys }) => {
|
|
|
|
+ getNodeType(data.id)
|
|
TreeAutoExpandKeys.value = keys || []
|
|
TreeAutoExpandKeys.value = keys || []
|
|
setStoreValue('wbsTreeExpandKeys', keys)
|
|
setStoreValue('wbsTreeExpandKeys', keys)
|
|
getTreeNodeDetail(data)
|
|
getTreeNodeDetail(data)
|