From 3ef0ee19b5991ee38ec6404a36c325171014f7fa Mon Sep 17 00:00:00 2001 From: yuxc <yuxc@vci-tech.com> Date: 星期二, 07 一月 2025 18:01:47 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/plt-web/plt-web-ui/src/views/modelingMenu/ui/formDefine/index.vue | 111 ++++++++++++++++++++++++++++++++++++------------------- 1 files changed, 73 insertions(+), 38 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 f92c433..fa92e85 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 @@ -11,12 +11,12 @@ <el-radio v-model="treeRadio" label="1" @input="TreeRadioChange">閾炬帴绫诲瀷鏍�</el-radio> </div> <avue-tree v-loading="treeLoading" :data="treeData" :option="treeOption" @node-click="nodeClick"> - <span slot-scope="{ node, data }" class="el-tree-node__label"> - <span style="font-size: 15px"> - <i class="el-icon-s-promotion"></i> - {{ (node || {}).label }} - </span> - </span> + <span slot-scope="{ node, data }" class="el-tree-node__label"> + <span> + <icon-show :name="data.icon"></icon-show> + {{ (node || {}).label }} + </span> + </span> </avue-tree> </div> </div> @@ -26,12 +26,30 @@ <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 v-if="permissionList.addBtn" class="button-custom-icon" plain size="small" type="primary" + @click="addClickHandler"> + <icon-show :name="permissionList.addBtn.source"></icon-show> + 澧炲姞 </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 v-if="permissionList.delBtn" class="button-custom-icon" plain size="small" type="danger" + @click="deleteClickHandler"> + <icon-show :name="permissionList.delBtn.source"></icon-show> + 鍒犻櫎 + </el-button> + <el-button v-if="permissionList.cloneBtn" class="button-custom-icon" plain size="small" type="primary" + @click="copyClickHandler"> + <icon-show :name="permissionList.cloneBtn.source"></icon-show> + 鍏嬮殕 + </el-button> + <el-button v-if="permissionList.importBtn" class="button-custom-icon" plain size="small" type="primary" + @click="upLoadClickHandler"> + <icon-show :name="permissionList.importBtn.source"></icon-show> + 瀵煎叆 + </el-button> + <el-button v-if="permissionList.exportBtn" class="button-custom-icon" plain size="small" type="primary" + @click="exportClickHandler"> + <icon-show :name="permissionList.exportBtn.source"></icon-show> + 瀵煎嚭 </el-button> </div> <avue-crud @@ -58,15 +76,20 @@ </div> </template> <template slot="menu" slot-scope="scope"> - <el-button icon="el-icon-edit" size="small" type="text" @click="editBtnClick(scope.row)">缂栬緫 + <el-button v-if="permissionList.editBtn" size="small" type="text" @click="editBtnClick(scope.row)"> + <icon-show :name="permissionList.editBtn.source"></icon-show> + 缂栬緫 </el-button> - <el-button icon="el-icon-delete" size="small" type="text" @click="rowDeleteHandler(scope.row)">鍒犻櫎 + <el-button v-if="permissionList.delBtn" size="small" type="text" @click="rowDeleteHandler(scope.row)"> + <icon-show :name="permissionList.delBtn.source"></icon-show> + 鍒犻櫎 </el-button> </template> </avue-crud> </basic-container> </el-main> - <form-dialog ref="formDialog" :TreeNodeRow="this.nodeRow" :editRow="editRow" :treeRadio="treeRadio"></form-dialog> + <form-dialog ref="formDialog" :TreeNodeRow="this.nodeRow" :editRow="editRow" :treeRadio="treeRadio" + @updataTable="getRightPortalVIDatas"></form-dialog> <table-dialog ref="tableDialog" :TreeNodeRow="this.nodeRow" :treeRadio="treeRadio" @updataTable="getRightPortalVIDatas"></table-dialog> <!-- 瀵煎叆 --> @@ -89,12 +112,12 @@ </div> <avue-tree ref="cloneTree" v-loading="cloneTreeLoading" :data="cloneTreeData" :option="treeOption" @node-click="cloneTreeNodeClick"> - <span slot-scope="{ node, data }" class="el-tree-node__label"> - <span style="font-size: 15px"> - <i class="el-icon-s-promotion"></i> - {{ (node || {}).label }} - </span> - </span> + <span slot-scope="{ node, data }" class="el-tree-node__label"> + <span> + <icon-show :name="data.icon"></icon-show> + {{ (node || {}).label }} + </span> + </span> </avue-tree> </div> </div> @@ -115,6 +138,7 @@ import {getBizTypes} from "@/api/modeling/businessType/api"; import {gridLink} from "@/api/modeling/linkType/api"; import func from "@/util/func"; +import {mapGetters} from "vuex"; export default { name: "index", @@ -187,6 +211,17 @@ this.getTreeList(); }, computed: { + ...mapGetters(["permission"]), + permissionList() { + return { + addBtn: this.vaildData(this.permission[this.$route.query.id].ADD, false), + delBtn: this.vaildData(this.permission[this.$route.query.id].DELETE, false), + editBtn: this.vaildData(this.permission[this.$route.query.id].EDIT, false), + exportBtn: this.vaildData(this.permission[this.$route.query.id].EXPORT, false), + importBtn: this.vaildData(this.permission[this.$route.query.id].IMPORT, false), + cloneBtn: this.vaildData(this.permission[this.$route.query.id].CLONE, false), + }; + }, tableStatus() { return func.isEmptyObject(this.nodeRow); } @@ -204,8 +239,9 @@ this.$refs.formDialog.getTreeList(); } else { this.$refs.tableDialog.visible = true; - this.$refs.tableDialog.getDbList(); - this.$refs.tableDialog.getSearchSelectList(); + this.$refs.tableDialog.getDbList(); // 鍙屽嚮鎿嶄綔涓嬫媺鎺ュ彛 + this.$refs.tableDialog.getSearchSelectList(); // 閫夋嫨琛ㄥ崟涓嬫媺鎺ュ彛 + this.$refs.tableDialog.getFormSelect(); // 鏌ヨ妯℃澘涓嬫媺鎺ュ彛 } }, @@ -216,6 +252,7 @@ const data = res.data.data.map(item => { this.processChildren(item); // 澶勭悊姣忎釜鑺傜偣 item.attributes.id = item.attributes.id; + item.attributes.icon = item.attributes.imageName; return item.attributes; // 杩斿洖澶勭悊鍚庣殑 attributes }); this.treeData = data; @@ -234,6 +271,7 @@ const data = res.data.data.map(item => { this.processChildren(item); // 澶勭悊姣忎釜鑺傜偣 item.attributes.id = item.attributes.id; + item.attributes.icon = item.attributes.imageName; return item.attributes; // 杩斿洖澶勭悊鍚庣殑 attributes }); this.treeData = data; @@ -256,6 +294,7 @@ if (item.children && item.children.length > 0) { item.attributes.children = item.children.map(child => { child.attributes.id = child.attributes.id; + child.attributes.icon = child.attributes.imageName; this.processChildren(child); // 閫掑綊澶勭悊姣忎釜瀛愯妭鐐� return child.attributes; // 鍙繑鍥炲瓙鑺傜偣鐨� attributes }); @@ -264,7 +303,6 @@ // 宸︿晶鏍戠偣鍑� nodeClick(row) { - console.log(row); this.tableRadio = null; this.nodeRow = row; this.getRightPortalVIDatas(row); @@ -311,7 +349,6 @@ // 缂栬緫鎸夐挳 editBtnClick(row) { - console.log('row', row); // 琛ㄦ牸 if (row.viType === 0) { const params = { @@ -330,14 +367,19 @@ // 鏇存柊琛ㄥ崟 this.$refs.tableDialog.form = { ...prmItem, + itemFieldWidthList: prmItem.itemFieldWidthList.map(item => { + return { + ...item, + $cellEdit: true, + } + }), viName: res.data.obj.viName, + itemQtName: res.data.obj.prm.formQtName, editNodeId: row.id, - itemOutFieldList: (prmItem.itemOutFieldList || []).map(item => ({id: item})), + itemOutFieldList: (prmItem.itemOutFieldList || []), itemSearchFieldList: (prmItem.itemSearchFieldList || []).map(item => ({id: item})), - itemKeyFieldList: (prmItem.itemKeyFieldList || []).map(item => ({id: item})), - searchLabel: prmItem.itemSeniorQueryCols || '', - searchNumber: prmItem.itemSeniorQueryColsCounts || '1', - searchSql: prmItem.itemQuerySql || '', + itemKeyFieldList: (prmItem.itemKeyFieldList || []), + searchNumber: '1', itemFileWidthSelect: (prmItem.itemFieldWidthList && prmItem.itemFieldWidthList.length > 0) ? prmItem.itemFieldWidthList[0].key : '', itemWidth: (prmItem.itemFieldWidthList && prmItem.itemFieldWidthList.length > 0) ? prmItem.itemFieldWidthList[0].value : '250' }; @@ -346,9 +388,6 @@ const [width = '0', height = '0'] = (prmItem.itemImgWH || '0,0').split(','); this.$refs.tableDialog.itemImgWidth = width; this.$refs.tableDialog.itemImgHeight = height; - - // 鍙屽嚮鎿嶄綔鑾峰彇鏁版嵁鏂规硶 - this.$refs.tableDialog.getDbList(); // 鏄剧ず瀵硅瘽妗� this.$refs.tableDialog.visible = true; @@ -374,9 +413,9 @@ this.$refs.formDialog.formList = updatedData; this.$refs.formDialog.getTreeList(); this.$refs.formDialog.topForm.viName = res.data.obj.viName; + this.$refs.formDialog.topForm.itemQtName = res.data.obj.prm.formQtName; 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; } }) @@ -461,7 +500,7 @@ this.lastIndex = newIndex; }, () => { - this.selectList = []; + this.selectList = [row]; } ); }, @@ -479,8 +518,6 @@ exportExcel(params).then(res => { func.downloadFileByBlobHandler(res); this.$message.success('瀵煎嚭鎴愬姛'); - }).catch(err => { - this.$message.error(err); }); }, @@ -518,7 +555,6 @@ // 鍏嬮殕鏍戠偣鍑� cloneTreeNodeClick(row) { - console.log(row); this.cloneTreeNode = row; }, @@ -574,7 +610,6 @@ confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', }).then(({value}) => { - console.log(obj); const params = { clonePortalVIDTOList: [ { -- Gitblit v1.9.3