From d336c430e5d22ade703ff12f3d523889eb3d75d6 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期五, 08 十一月 2024 10:54:26 +0800
Subject: [PATCH] action管理 编辑 新增 分类禁用bug
---
Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue | 33 +++++++++++++++++++++++----------
1 files changed, 23 insertions(+), 10 deletions(-)
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue
index bb43485..0258cd6 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/queryDefine/index.vue
@@ -3,7 +3,7 @@
<el-aside>
<basic-container>
<div ref="TreeBox" style="height: calc(100vh - 154px);!important;">
- <div class="headerCon">
+ <div class="headerCon" style="display: flex;justify-content: center">
<avue-radio v-model="radioForm" :dic="radioDic" style="margin: 10px 0 5px"></avue-radio>
</div>
<!-- 宸︿晶鏍� -->
@@ -23,7 +23,8 @@
<el-main>
<basic-container>
- 妯℃澘鍒楄〃锛�<avue-select v-model="templateForm" placeholder="璇烽�夋嫨妯℃澘" type="tree" :dic="templateData" @change="changeTemp"></avue-select>
+ 妯℃澘鍒楄〃锛�<avue-select v-model="templateForm" placeholder="璇烽�夋嫨妯℃澘" type="tree" :dic="templateData" @change="changeTemp" style="width:300px;"></avue-select>
+ <h3>鏌ヨ灞炴��</h3>
<avue-crud ref="queryCrud"
:data="attrData" :option="attrOption" :table-loading="tableLoading" style="margin-top: 10px">
<template slot="menuLeft" slot-scope="scope">
@@ -124,7 +125,6 @@
menu:false,
height: "auto",
calcHeight: -40,
- title:'鏌ヨ灞炴��',
tip:false,
column: [{
label: '瀛楁缂栫爜',
@@ -170,8 +170,9 @@
if (newval ==0) {
getBizTypes().then(res => {
const data = res.data.data.map(item => {
- item.label=item.attributes.id;
- return item;
+ this.processChildren(item); // 澶勭悊姣忎釜鑺傜偣
+ item.attributes.label = item.attributes.id;
+ return item.attributes;
});
this.treeData = data;
loading.close();
@@ -195,14 +196,26 @@
const loading = this.$loading({});
getBizTypes().then(res => {
const data = res.data.data.map(item => {
- item.label=item.attributes.id;
- return item;
+ this.processChildren(item); // 澶勭悊姣忎釜鑺傜偣
+ item.attributes.label = item.attributes.id;
+ return item.attributes;
});
this.treeData = data;
loading.close();
+ }).catch(error=>{
+ loading.close();
})
},
-
+ // 澶勭悊涓氬姟绫诲瀷鏍戝舰缁撴瀯
+ processChildren(item) {
+ if (item.children && item.children.length > 0) {
+ item.attributes.children = item.children.map(child => {
+ child.attributes.label = child.attributes.id;
+ this.processChildren(child); // 閫掑綊澶勭悊姣忎釜瀛愯妭鐐�
+ return child.attributes; // 鍙繑鍥炲瓙鑺傜偣鐨� attributes
+ });
+ }
+ },
// 鏍戠偣鍑�
nodeClick(row) {
this.nodeRow = row;
@@ -238,7 +251,7 @@
this.tableLoading = false;
})
},
- selectHandler(selection, row){debugger;
+ selectHandler(selection, row){
this.dialogSelectionRow=selection
},
changeTemp(data) {
@@ -335,7 +348,7 @@
cancelButtonText: '鍙栨秷',
type: 'warning'
}).then(() => {
- deleteTemplate({name:this.templateForm,btmName: this.nodeRow.label, linkFlag: this.radioForm == 1}).then(res => {
+ deleteTemplate({name:this.templateForm}).then(res => {
if (res.data.code === 200) {
this.$message.success(res.data.obj);
this.getTemp();
--
Gitblit v1.9.3