From 3b3ac1fc72e2849eb500840fd9d61e9b8f1960e1 Mon Sep 17 00:00:00 2001
From: yuxc <yuxc@vci-tech.com>
Date: 星期四, 17 十月 2024 16:31:45 +0800
Subject: [PATCH] 1、查询所有的action线程变量用于优化,只查一次平台。 2、新增文件柜管理的controller,servicel以及文件管理的分页查询卷、增加卷、修改卷等接口
---
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue | 250 +++++++++++++++++++++++++++++--------------------
1 files changed, 146 insertions(+), 104 deletions(-)
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue
index 4acc188..66319a6 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue
@@ -2,29 +2,9 @@
<el-container v-loading="createViewLoading">
<el-aside>
<basic-container>
- <div ref="TreeBox" style="height: calc(100vh - 144px);!important;">
- <div class="headerCon">
- <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">鍒涘缓
- </el-button>
- <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">淇敼
- </el-button>
- <el-button icon="el-icon-delete" plain size="small" type="danger" @click="deleteClickHandler">鍒犻櫎
- </el-button>
- <el-button icon="el-icon-view" plain size="small" type="primary">鏌ョ湅
- </el-button>
- <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭
- </el-button>
- <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="upLoadClickHandler">瀵煎叆
- </el-button>
- <el-button class="smallBtn" style="padding-left: 7px !important;" icon="el-icon-circle-plus-outline" plain size="small"
- type="primary" @click="createViewClickHandler">鍒涘缓瑙嗗浘
- </el-button>
- <el-button class="smallBtn" icon="el-icon-menu" plain size="small" style="padding-left: 1px"
- type="primary" @click="checkClickHandler">涓�鑷存�ф鏌�
- </el-button>
- </div>
+ <div ref="TreeBox" style="height: calc(100vh - 154px);!important;">
<!-- 宸︿晶鏍� -->
- <div style="height: calc(100vh - 300px);">
+ <div style="height: calc(100vh - 190px);">
<avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick">
<span slot-scope="{ node, data }" class="el-tree-node__label">
<span style="font-size: 15px">
@@ -41,6 +21,15 @@
<el-main>
<basic-container>
<div>
+ <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">鍒涘缓</el-button>
+ <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">淇敼</el-button>
+ <el-button icon="el-icon-delete" plain size="small" type="danger" @click="deleteClickHandler">鍒犻櫎</el-button>
+ <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭</el-button>
+ <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="upLoadClickHandler">瀵煎叆</el-button>
+ <el-button icon="el-icon-circle-plus-outline" plain size="small" type="primary" @click="createViewClickHandler">鍒涘缓瑙嗗浘</el-button>
+ <el-button icon="el-icon-menu" plain size="small" type="primary" @click="checkClickHandler">涓�鑷存�ф鏌�</el-button>
+ </div>
+ <div style="height: 380px;margin-top: 10px">
<el-descriptions :column="2" border class="margin-top" size="medium">
<el-descriptions-item :contentStyle="descriptionOption.contentStyle"
:labelStyle="descriptionOption.labelStyle">
@@ -93,11 +82,13 @@
<i :class="icons.from"></i>
From绔被鍨�
</template>
- <span v-for="item in nodeRow.btmItemsFrom" style="margin-left:2px;">
- <el-tag effect="plain" style="margin-top: 2px;">
+ <div style="height: 60px;overflow-y: auto;display: flex;flex-wrap: wrap">
+ <span v-for="item in nodeRow.btmItemsFrom" style="margin-left:3px;">
+ <el-tag effect="plain" style="margin-top: 3px;">
{{ item }}
</el-tag>
- </span>
+ </span>
+ </div>
</el-descriptions-item>
<el-descriptions-item :contentStyle="descriptionOption.contentStyle"
:labelStyle="descriptionOption.labelStyle">
@@ -127,11 +118,13 @@
<i :class="icons.to"></i>
To绔被鍨�
</template>
- <span v-for="item in nodeRow.btmItemsTo" style="margin-left:2px;">
- <el-tag effect="plain" style="margin-top: 2px;">
+ <div style="height: 60px;overflow-y: auto;display: flex;flex-wrap: wrap">
+ <span v-for="item in nodeRow.btmItemsTo" style="margin-left:2px;">
+ <el-tag effect="plain" style="margin-top: 2px;">
{{ item }}
- </el-tag>
- </span>
+ </el-tag>
+ </span>
+ </div>
</el-descriptions-item>
<el-descriptions-item :contentStyle="descriptionOption.contentStyle"
:labelStyle="descriptionOption.labelStyle">
@@ -154,7 +147,7 @@
</el-descriptions>
</div>
- <div style="margin-top: 20px">
+ <div style="margin-top: 30px">
<h3>灞炴�ф睜鍒楄〃</h3>
<avue-crud
:data="tableData"
@@ -196,10 +189,6 @@
<div class="centerForm">
<el-form-item label="Form绔被鍨嬶細" label-width="110px">
- <!-- <el-button v-if="!form.btmItemsFrom" plain size="mini" type="success"-->
- <!-- @click="FormItemReferChange('form')">娣诲姞-->
- <!-- </el-button>-->
- <!-- <el-input v-if="form.btmItemsFrom" v-model="form.btmItemsFrom"></el-input>-->
<div style="display: flex; align-items: center">
<div style="height: 200px; width: 280px; border: 1px solid #bdbbbb;overflow-y: auto">
<!-- 鍐呭 -->
@@ -444,6 +433,7 @@
highlightCurrentRow: true,
searchMenuSpan: 8,
searchLabelWidth: 100,
+ calcHeight: 30,
column: [
{
label: '涓氬姟绫诲瀷鍚�',
@@ -574,7 +564,7 @@
editBtn: false,
refreshBtn: false,
selection: false,
- height: 300,
+ height: 200,
addBtn: false,
// index:false,
column: [
@@ -596,6 +586,7 @@
{
label: '璇存槑',
prop: 'description',
+ overHidden: true
}
]
},
@@ -622,6 +613,7 @@
// index:false,
addBtn: false,
menu: false,
+ calcHeight: -40,
column: [
{
label: '灞炴�у悕',
@@ -641,6 +633,7 @@
{
label: '璇存槑',
prop: 'description',
+ overHidden: true
}
]
},
@@ -659,6 +652,8 @@
main: 'el-icon-warning-outline',
desc: 'el-icon-chat-line-square'
},
+ bizLastIndex: null,
+ attrLastIndex: null
}
},
created() {
@@ -707,12 +702,24 @@
this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�');
return;
}
- deleteLink(this.nodeRow).then(res => {
- if (res.data.code === 200) {
- this.$message.success('鍒犻櫎鎴愬姛');
- this.getTreeList();
- }
- })
+ ;
+ this.$confirm('鎮ㄧ‘瀹氳鍒犻櫎鎵�閫夋嫨鐨勬暟鎹悧锛�', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ deleteLink(this.nodeRow).then(res => {
+ if (res.data.code === 200) {
+ this.$message.success('鍒犻櫎鎴愬姛');
+ this.getTreeList();
+ }
+ })
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: '宸插彇娑堝垹闄�'
+ });
+ });
},
// 鍒涘缓鎸夐挳
@@ -755,58 +762,62 @@
// 涓�鑷存�ф鏌�
checkClickHandler() {
- this.conCheckVisible = true;
- this.conCheckLoading = true;
checkLinkType().then(res => {
- if (res.data.code === 200) {
- const data = res.data.data;
- this.conDefaultCheckData = data; // 淇濈暀涓�浠藉師濮嬫暟鎹�
- this.conCheckLoading = false;
+ if (res && res.data && res.data.data) {
+ this.conCheckVisible = true;
+ this.conCheckLoading = true;
+ if (res.data.code === 200) {
+ const data = res.data.data;
+ this.conDefaultCheckData = data; // 淇濈暀涓�浠藉師濮嬫暟鎹�
+ this.conCheckLoading = false;
- const outputData = [];
+ const outputData = [];
- data.forEach(item => {
- Object.entries(item.btmCheckMap).forEach(([id, methodsArray]) => {
- methodsArray.forEach(methods => {
- // 鍒ゆ柇鍓嶇紑
- const action = methods.startsWith('F_') ? '绉婚櫎form绔笟鍔$被鍨�' : '绉婚櫎to绔笟鍔$被鍨�';
- const detail = methods.split('_')[1]; // 鑾峰彇 _ 鍚庨潰鐨勫唴瀹�
- outputData.push({
- id: id,
- methods: `${action}:${detail}`,
- status: '鏈慨澶�'
+ data.forEach(item => {
+ Object.entries(item.btmCheckMap).forEach(([id, methodsArray]) => {
+ methodsArray.forEach(methods => {
+ // 鍒ゆ柇鍓嶇紑
+ const action = methods.startsWith('F_') ? '绉婚櫎form绔笟鍔$被鍨�' : '绉婚櫎to绔笟鍔$被鍨�';
+ const detail = methods.split('_')[1]; // 鑾峰彇 _ 鍚庨潰鐨勫唴瀹�
+ outputData.push({
+ id: id,
+ methods: `${action}:${detail}`,
+ status: '鏈慨澶�'
+ });
});
});
- });
- // 澶勭悊 dbCheckMap
- Object.entries(item.dbCheckMap).forEach(([id, methods]) => {
- const splitMethods = methods.split('(');
- // 鍒ゆ柇绗竴涓鍙峰墠闈㈢殑鍊�
- if (splitMethods[0].startsWith('_ADD')) {
- outputData.push({
- id: id,
- methods: '澧炲姞鍒�(' + splitMethods[1].slice(0, -1) + ')', // 缁撴潫浣嶇疆鍑忓幓)鐨勫瓧绗�
- status: '鏈慨澶�'
- });
- } else if (splitMethods[0].startsWith('_CREATE')) {
- outputData.push({
- id: id,
- methods: '鍒涘缓琛�(' + splitMethods[1].slice(0, -1) + ')',
- status: '鏈慨澶�'
- });
- } else if (splitMethods[0].startsWith('_DROP')) {
- outputData.push({
- id: id,
- methods: '绉婚櫎鍒�(' + splitMethods[1].slice(0, -1) + ')',
- status: '鏈慨澶�'
- });
- } else {
- this.$message.error("涓嶆敮鎸佺殑 dbCheckMap 绫诲瀷锛� " + methods)
- }
+ // 澶勭悊 dbCheckMap
+ Object.entries(item.dbCheckMap).forEach(([id, methods]) => {
+ const splitMethods = methods.split('(');
+ // 鍒ゆ柇绗竴涓鍙峰墠闈㈢殑鍊�
+ if (splitMethods[0].startsWith('_ADD')) {
+ outputData.push({
+ id: id,
+ methods: '澧炲姞鍒�(' + splitMethods[0].slice(0, -1) + ')', // 缁撴潫浣嶇疆鍑忓幓)鐨勫瓧绗�
+ status: '鏈慨澶�'
+ });
+ } else if (splitMethods[0].startsWith('_CREATE')) {
+ outputData.push({
+ id: id,
+ methods: '鍒涘缓琛�(' + splitMethods[0].slice(0, -1) + ')',
+ status: '鏈慨澶�'
+ });
+ } else if (splitMethods[0].startsWith('_DROP')) {
+ outputData.push({
+ id: id,
+ methods: '绉婚櫎鍒�(' + splitMethods[0].slice(0, -1) + ')',
+ status: '鏈慨澶�'
+ });
+ } else {
+ this.$message.error("涓嶆敮鎸佺殑 dbCheckMap 绫诲瀷锛� " + methods)
+ }
+ });
});
- });
- this.conCheckData = outputData;
+ this.conCheckData = outputData;
+ }
+ } else {
+ this.$message.success(res.data.msg);
}
}).catch(err => {
this.$message.error(err);
@@ -815,11 +826,11 @@
// 淇涓�鑷存�ф鏌�
repairClickHandler() {
- console.log(this.conDefaultCheckData)
const params = this.conDefaultCheckData[0];
repairTable(params).then(res => {
if (func.isEmptyObject(res.data.obj[0])) {
this.$message.success('淇鎴愬姛');
+ this.conCheckData = [];
} else {
this.$message.error('淇澶辫触锛岃閲嶆柊灏濊瘯锛�');
}
@@ -835,6 +846,8 @@
this.createViewLoading = false;
this.$message.success(res.data.obj);
}
+ }).catch(err => {
+ this.createViewLoading = false;
})
},
@@ -865,7 +878,18 @@
// 娣诲姞灞炴�ф睜 琛岀偣鍑�
dialogAttrRowClickHandler(row) {
- this.$refs.dialogAttrCrud.toggleRowSelection(row);
+
+ func.rowClickHandler(
+ row,
+ this.$refs.dialogAttrCrud,
+ this.attrLastIndex,
+ (newIndex) => {
+ this.attrLastIndex = newIndex;
+ },
+ () => {
+ this.selectList = [];
+ }
+ );
},
// 娣诲姞灞炴�ф睜 鍏抽棴瀵硅瘽妗�
@@ -894,8 +918,6 @@
this.bizFormData = [];
this.bizToData = [];
this.dialogBottomData = [];
- console.log(this.form);
- console.log('--', this.nodeRow)
},
// 娣诲姞灞炴�ф睜 淇濆瓨
@@ -945,9 +967,13 @@
//娣诲姞灞炴�ф睜 鎼滅储
attrHandleSearch(params, done) {
- this.searchAttrParams = {
- "conditionMap[id]": "*" + params.id + "*"
- };
+ if (func.isEmptyObject(params)) {
+ this.searchAttrParams = {};
+ } else {
+ this.searchAttrParams = {
+ "conditionMap[id]": "*" + params.id + "*"
+ };
+ }
this.getAttrDialogDta();
done();
},
@@ -997,7 +1023,17 @@
// form to 绫诲瀷琛岀偣鍑�
bizTypeRowClick(row) {
- this.$refs.bizTypeCrud.toggleRowSelection(row);
+ func.rowClickHandler(
+ row,
+ this.$refs.bizTypeCrud,
+ this.bizLastIndex,
+ (newIndex) => {
+ this.bizLastIndex = newIndex;
+ },
+ () => {
+ this.selectList = [];
+ }
+ );
},
// form to 绫诲瀷淇濆瓨
@@ -1071,16 +1107,22 @@
this.$message.error('form绔笟鍔$被鍨嬪拰to绔被鍨嬪潎涓嶈兘涓虹┖锛�')
return;
}
- this.form.btmItemsFrom = this.bizFormData.map(item => item.name);
- this.form.btmItemsTo = this.bizToData.map(item => item.name);
- this.form.attributes = this.dialogBottomData.map(item => item.id);
- let flag = this.title === 'add' ? true : false;
- addAndEditLink(flag, this.form).then(res => {
- if (res.data.code === 200) {
- this.visible = false;
- this.$message.success(res.data.msg);
- this.resetForm();
- this.getTreeList();
+ this.$refs.form.validate((valid) => {
+ if (valid) {
+ this.form.btmItemsFrom = this.bizFormData.map(item => item.name);
+ this.form.btmItemsTo = this.bizToData.map(item => item.name);
+ this.form.attributes = this.dialogBottomData.map(item => item.id);
+ let flag = this.title === 'add' ? true : false;
+ addAndEditLink(flag, this.form).then(res => {
+ if (res.data.code === 200) {
+ this.visible = false;
+ this.$message.success(res.data.msg);
+ this.resetForm();
+ this.getTreeList();
+ }
+ });
+ } else {
+ return false;
}
});
},
--
Gitblit v1.9.3