From c4e17e16e32f396432303270004883da6ac27161 Mon Sep 17 00:00:00 2001 From: wangting <wangting@vci-tech.com> Date: 星期四, 26 十二月 2024 17:56:27 +0800 Subject: [PATCH] 修改样式,action管理左侧树去掉按钮 --- Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue | 63 +++++++++++++++---------------- 1 files changed, 31 insertions(+), 32 deletions(-) diff --git a/Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue b/Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue index 4a8598a..4942a5a 100644 --- a/Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/systemModel/businessModel/index.vue @@ -3,10 +3,11 @@ <el-aside> <basic-container> <div style="max-height: calc(100vh - 150px);overflow: auto"> - <avue-tree :key="refresh" node-key="id" ref="tree" :data="treeData" :option="treeOption" @node-click="nodeClick"> + <avue-tree :key="refresh" ref="tree" :data="treeData" :option="treeOption" node-key="id" + @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> + <span style="display: flex"> + <icon-show :name="data.icon"></icon-show> {{ (node || {}).label }} </span> </span> @@ -17,8 +18,10 @@ <el-main> <basic-container> - <div v-if="(form.childType || form.childType === 0) && !addStatus && !editStatus && form.category !== 1" class="btnBox"> - <el-button :disabled="(mangeShowBtn || form.childType === 0) ? false : !childTypeBtn" icon="el-icon-plus" plain + <div v-if="(form.childType || form.childType === 0) && !addStatus && !editStatus && form.category !== 1" + class="btnBox"> + <el-button :disabled="(mangeShowBtn || form.childType === 0) ? false : !childTypeBtn" icon="el-icon-plus" + plain size="small" type="primary" @click="addClickHandler">澧炲姞 </el-button> @@ -56,8 +59,8 @@ <el-button v-if="editStatus" icon="el-icon-check" plain size="small" type="success" @click="editSaveClickHandler">淇濆瓨 </el-button> - <el-button icon="el-icon-close" plain size="small" - type="danger" @click="addStatus=false;editStatus=false;">鍙栨秷 + <el-button icon="el-icon-close" plain size="small" + type="danger" @click="addStatus=false;editStatus=false;">鍙栨秷 </el-button> </div> <div v-if="form.category === 1" class="btnBox"> @@ -66,7 +69,7 @@ <el-button icon="el-icon-close" plain size="small" type="danger" @click="deleteOperationClickHandler">鍒犻櫎 </el-button> </div> - <el-form ref="form" :model="form" label-width="85px" style="max-height: calc(100vh - 200px);overflow: auto;"> + <el-form ref="form" :model="form" label-width="85px" size="small" style="max-height: calc(100vh - 200px);overflow: auto;"> <span v-if="form.category !== 1"> <el-form-item label="妯″潡鍚嶏細"> <el-input v-model="form.name" :disabled="!editStatus && !addStatus" placeholder="璇疯緭鍏ユā鍧楀悕"></el-input> @@ -91,9 +94,8 @@ placeholder="鏁板瓧锛屾弿杩拌妯″潡鍦ㄥ叾鐖舵ā鍧椾笅鐨勬樉绀洪『搴�"></el-input> </el-form-item> <el-form-item label="鍥炬爣锛�"> - <avue-input-icon v-model="form.source" :disabled="!editStatus && !addStatus" :icon-list="iconList" - placeholder="璇烽�夋嫨鍥炬爣"> - </avue-input-icon> + <input-icon v-model="form.source" :disabled="!editStatus && !addStatus" placeholder="璇烽�夋嫨鍥炬爣"> + </input-icon> </el-form-item> <el-form-item label="鎻忚堪锛�"> <el-input v-model="form.remark" :disabled="!editStatus && !addStatus" :rows="3" placeholder="璇疯緭鍏ユ弿杩�" @@ -189,13 +191,11 @@ } from "@/api/systemModel/mangeModel/api" import func from "@/util/func"; import basicOption from "@/util/basic-option"; -import iconList from "@/config/iconList"; export default { name: "index", data() { return { - iconList: iconList, tipList: [], upFileType: ['xls', 'xlsx'], fileUrl: 'api/hmSysModConfigController/importModule', @@ -208,7 +208,7 @@ addBtn: false, menu: false, height: 500, - header:false, + header: false, column: [ { label: '鎿嶄綔鍒嗙被', @@ -224,7 +224,7 @@ addStatus: false, editStatus: false, nodeRow: {}, - currentClickNode:null, + currentClickNode: null, form: {}, treeData: [], treeOption: { @@ -240,7 +240,7 @@ lazy: true, treeLoad: (node, resolve) => { const params = { - parentId: node.level === 0 ? "modelManagmentNode" : node.data.id, + parentId: node.level === 0 ? "business" : node.data.id, modeType: node.level === 0 ? "firstNode" : node.data.modeType, } getSysModelTreeMenuByPID(params).then(res => { @@ -249,7 +249,8 @@ ...item, id: item.id, name: item.name, - leaf: !item.hasChildren + leaf: !item.hasChildren, + icon: item.source || 'iconoir:home' } })) }) @@ -279,10 +280,10 @@ }, methods: { // 鏍戣鐐瑰嚮 - nodeClick(row,node) { + nodeClick(row, node) { this.form = {...row}; this.nodeRow = {...row}; - this.currentClickNode=node; + this.currentClickNode = node; this.addStatus = false; this.editStatus = false; }, @@ -293,7 +294,7 @@ this.defalutName.forEach(key => { this.form[key] = null; }) - this.form.isValid = false; + this.form.isValid = true; this.addStatus = true; this.editStatus = false; }, @@ -425,12 +426,12 @@ addMethodsClickHandler() { this.methodsLoading = true; getSysModelTreeMenuByPID({parentId: 'operateNode'}).then(res => { - if (res.data.code === 200 && res.data.data.length>0) { + if (res.data.code === 200 && res.data.data.length > 0) { this.methodsVisble = true; const data = res.data.data; this.methodsData = data; this.methodsLoading = false; - }else { + } else { this.$message.error('鏈壘鍒板彲澧炲姞鐨勬搷浣滅被鍨�'); } }) @@ -500,7 +501,6 @@ operId: this.form.operId } delFuncOperation(params).then(res => { - console.log(res); if (res.data.code === 200) { this.$message.success(res.data.msg); this.handleRefreshTree('del'); @@ -521,28 +521,27 @@ func.downloadFileByBlobHandler(res); this.createdLoading = false this.$message.success('瀵煎嚭鎴愬姛'); - }).catch(err => { - this.$message.error(err); - }) + }); }, // 瀵煎叆 upLoadClickHandler() { this.$refs.upload.visible = true; }, + handleRefreshTree(type) { //type:add\edit\del - if(type=="del"){ + if (type == "del") { this.$refs.tree.remove(this.currentClickNode); - this.currentClickNode=null; - this.form={}; - }else{ + this.currentClickNode = null; + this.form = {}; + } else { if (this.currentClickNode) { let node = this.currentClickNode.parent; node.loaded = false; node.expand(); this.$refs.tree.setCurrentNode(this.currentClickNode); - }else { + } else { this.refresh = Math.random(); // 鍒锋柊宸︿晶鏍� } } @@ -560,7 +559,7 @@ .btnBox { display: flex; - justify-content:left; + justify-content: left; margin-bottom: 15px; } </style> -- Gitblit v1.9.3