From 6f9ac9a2da1ca4a0fdb5c24a6f47648026e275d7 Mon Sep 17 00:00:00 2001
From: yuxc <yuxc@vci-tech.com>
Date: 星期五, 18 十月 2024 16:18:57 +0800
Subject: [PATCH] 1、修改获取权限模块,仅返回按钮数据
---
Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/index.vue | 56 +++++++++++++++++++++++++++++++++++++++++---------------
1 files changed, 41 insertions(+), 15 deletions(-)
diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/index.vue
index d6c1297..37201c5 100644
--- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/index.vue
@@ -25,6 +25,15 @@
<el-main>
<basic-container>
+ <div v-if="!tableStatus" style="display: flex;justify-content: left;margin-top: 15px">
+ <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">澧炲姞</el-button>
+ <el-button icon="el-icon-delete" plain size="small" type="danger" @click="deleteClickHandler">鍒犻櫎</el-button>
+ <el-button icon="el-icon-document-add" plain size="small" type="primary" @click="copyClickHandler">鍏嬮殕
+ </el-button>
+ <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="upLoadClickHandler">瀵煎叆</el-button>
+ <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭
+ </el-button>
+ </div>
<avue-crud
v-if="!tableStatus"
ref="crud"
@@ -61,17 +70,9 @@
</el-button>
</template>
</avue-crud>
- <div v-if="!tableStatus" style="display: flex;justify-content: center;margin-top: 15px">
- <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">澧炲姞</el-button>
- <el-button icon="el-icon-delete" plain size="small" type="danger" @click="deleteClickHandler">鍒犻櫎</el-button>
- <el-button icon="el-icon-document-add" plain size="small" type="primary">鍏嬮殕</el-button>
- <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="upLoadClickHandler">瀵煎叆</el-button>
- <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭
- </el-button>
- </div>
</basic-container>
</el-main>
- <form-dialog ref="formDialog" :TreeNodeRow="this.nodeRow" :treeRadio="treeRadio"></form-dialog>
+ <form-dialog ref="formDialog" :TreeNodeRow="this.nodeRow" :treeRadio="treeRadio" :editRow="editRow"></form-dialog>
<table-dialog ref="tableDialog" :TreeNodeRow="this.nodeRow" :treeRadio="treeRadio"
@updataTable="getRightPortalVIDatas"></table-dialog>
<!-- 瀵煎叆 -->
@@ -117,6 +118,7 @@
addBtn: false,
editBtn: false,
delBtn: false,
+ calcHeight: -60,
column: [
{
label: '涓氬姟鍚嶇О',
@@ -146,7 +148,8 @@
}
},
dbClickList: [],
- defaultData: [], // 鐢ㄤ簬鏌ヨ鎭㈠鍘熷鍊�
+ defaultData: [], // 鐢ㄤ簬鏌ヨ鎭㈠鍘熷鍊�,
+ editRow:{},
}
},
created() {
@@ -165,6 +168,7 @@
return;
}
if (this.tableRadio === "0") {
+ this.editRow.id = "";
this.$refs.formDialog.visible = true;
this.$refs.formDialog.getTreeList();
} else {
@@ -184,6 +188,8 @@
});
this.treeData = data;
this.treeLoading = false;
+ }).catch(error => {
+ loading.close();
});
},
@@ -199,11 +205,12 @@
return item.attributes; // 杩斿洖澶勭悊鍚庣殑 attributes
});
this.treeData = data;
+ this.treeLoading = false;
});
} else {
gridLink().then(res => {
const data = res.data.data.map(item => {
- item.label = item.name;
+ item.id = item.name;
return item;
});
this.treeData = data;
@@ -318,7 +325,7 @@
id: row.id,
viType: row.viType
};
-
+ this.editRow = row;
getPortalVIById(params).then(res => {
if (res.data.code === 200) {
const data = res.data.obj.prm.prmItemList;
@@ -334,6 +341,7 @@
this.$refs.formDialog.getTreeList();
this.$refs.formDialog.topForm.viName = res.data.obj.viName;
this.$refs.formDialog.topForm.columnNumber = this.getValueBasedOnInput(res.data.obj.prm.showCols);
+ this.$refs.formDialog.topForm.showColumn = res.data.obj.prm.showCols;
this.$refs.formDialog.visible = true;
}
@@ -384,12 +392,10 @@
this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�');
return;
}
- console.log(this.selectList);
const params = {
ids: this.selectList.map(item => item.id).join(',')
}
deleteByIds(params).then(res => {
- console.log(res);
if (res.data.code === 200) {
this.$message.success('鍒犻櫎鎴愬姛');
this.getRightPortalVIDatas();
@@ -397,7 +403,14 @@
})
},
-
+ rowDeleteHandler(row) {
+ deleteByIds({ids: row.id}).then(res => {
+ if (res.data.code === 200) {
+ this.$message.success('鍒犻櫎鎴愬姛');
+ this.getRightPortalVIDatas();
+ }
+ })
+ },
// 澶氶��
selectChangeHandler(row) {
this.selectList = row;
@@ -439,6 +452,19 @@
// 瀵煎叆
upLoadClickHandler() {
this.$refs.upload.visible = true;
+ },
+
+ // 瀵煎嚭
+ copyClickHandler() {
+ if (this.selectList.length <= 0) {
+ this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�');
+ return;
+ }
+
+ if (this.selectList.length > 1) {
+ this.$message.error('鍙兘閫夋嫨涓�鏉℃暟鎹�');
+ return;
+ }
}
}
}
--
Gitblit v1.9.3