From 7deb6f3a8151b7338ac402e05e462938f8e26ca0 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期日, 28 一月 2024 15:18:46 +0800
Subject: [PATCH] 近义词管理,界面和接口完善
---
Source/UBCS-WEB/src/components/Master/MasterTree.vue | 48 +++++++++++++++++++++++++++++-------------------
1 files changed, 29 insertions(+), 19 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/Master/MasterTree.vue b/Source/UBCS-WEB/src/components/Master/MasterTree.vue
index 4e883aa..3b9a8db 100644
--- a/Source/UBCS-WEB/src/components/Master/MasterTree.vue
+++ b/Source/UBCS-WEB/src/components/Master/MasterTree.vue
@@ -3,7 +3,10 @@
<avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="Treedata" :defaultExpandAll="false"
:option="Treeoption" style="width: fit-content;" @node-click="nodeClick">
<template slot-scope="{ node }">
- <span v-html="node.label"></span>
+ <el-tooltip :content="$createElement('div', { domProps: { innerHTML: node.label } })" class="item" effect="dark"
+ open-delay="350" placement="right-start">
+ <span id="labelSize" v-html="node.label"></span>
+ </el-tooltip>
</template>
</avue-tree>
<div style="position: absolute; right: 3px; top: -1px;">
@@ -54,11 +57,7 @@
delBtn: false,
defaultExpandAll: false,
menu: false,
- lazy: true,
- // treeLoad:function (node,resolve){
- // console.log(node)
- // console.log(resolve)
- // }
+ // lazy: true,
treeLoad: (node, resolve) => {
if (node.data != false) {
const parentId = (node.level === 0) ? 0 : node.data.oid;
@@ -102,15 +101,20 @@
getTreeLists() {
const index = this.$route.query.id.indexOf('@');
const result = this.$route.query.id.substring(0, index);
- this.idData = result
- // console.log(this.$route)
- getTreeList({'conditionMap[id]': this.idData}).then(res => {
+ this.idData = result;
+ this.removeList();
+ let conditionMaps = {};
+ conditionMaps["conditionMap[id]"] = this.idData;
+ conditionMaps["conditionMap[authType]"] = "data_auth";
+ conditionMaps["conditionMap[buttonCode]"] = this.idData;
+ // 鏁版嵁鎺堟潈涓槸鍚﹀叿澶囨煡鐪嬫潈闄�
+ conditionMaps["conditionMap[menuCode]"] = "data_view";
+ getTreeList(conditionMaps).then(res => {
if (res) {
if (res.data.length === 0) {
this.$message.error("涓绘暟鎹垎绫绘煡璇负绌猴紒");
} else {
this.Treedata = res.data;
-
const [firstProperty] = res.data;
this.ModifyProperties(this.Treedata, 'text', 'label');
this.referTreeId = firstProperty.attributes.btmTypeId;
@@ -124,15 +128,19 @@
});
this.$emit("coderuleoid", this.coderuleoid)
this.$emit('Treedata', this.Treedata)
- // console.log(this.Treedata)
}
}
}).catch(res => {
- // console.log(res)
this.$message.error(res)
});
},
-
+ removeList() {
+ this.$emit('tableHeadDataFateher', []);
+ this.$emit('tableHeadFindData', []);
+ this.$emit('tableHeadBttoms', []);
+ this.$emit('tableDataArray', [])
+ this.$emit('total', null)
+ },
//瀹氫箟涓�涓慨鏀规暟鎹睘鎬у悕鐨勬柟娉�
ModifyProperties(obj, oldName, newName) {
for (let key in obj) {
@@ -189,7 +197,8 @@
prop: item.field,
// type: this.columnType[item.type],
sortable: item.sort,
- width: item.minWidth
+ width: item.minWidth,
+ query: item.queryField
};
this.tableHeadFindData.push(Object.assign(item, columnItem))
})
@@ -205,9 +214,7 @@
//鏍戠偣鍑讳簨浠�
async nodeClick(data) {
try {
- // console.log(data)
- this.TreeValue = data.label.split("</span>")[1].trim();
- // console.log('TreeValue',this.TreeValue)
+ this.TreeValue = data.label;
this.$emit('TreeValue', this.TreeValue)
this.nodeClickList = data;
this.tableHeadDataFateher = []
@@ -218,7 +225,6 @@
this.$emit("codeClassifyOid", this.nodeClickList.oid)
this.$emit("nodeClickList", this.nodeClickList)
} catch (error) {
- // 澶勭悊閿欒
this.$message.error(error)
}
}
@@ -229,7 +235,7 @@
<style lang="scss" scoped>
.app {
overflow: auto;
- height: calc(100vh - 150px);
+ height: calc(100vh - 145px);
}
.app::-webkit-scrollbar {
@@ -253,4 +259,8 @@
margin-left: 6px;
font-size: 18px;
}
+
+#labelSize {
+ font-size: 14px !important;
+}
</style>
--
Gitblit v1.9.3