From 8bc25357d5742f07710baa7a6f1d6ac4023da3ac Mon Sep 17 00:00:00 2001 From: wangting <wangting@vci-tech.com> Date: 星期三, 25 十二月 2024 12:00:55 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/index.vue | 113 +++++++++++++++++++++++++++++++++----------------------- 1 files changed, 67 insertions(+), 46 deletions(-) diff --git a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/index.vue b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/index.vue index 3e8d85d..a39c8a4 100644 --- a/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/index.vue +++ b/Source/plt-web/plt-web-ui/src/views/modelingMenu/queryTemplate/businessTypeQuery/index.vue @@ -8,7 +8,7 @@ <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"> + <span> <i class="el-icon-s-promotion"></i> {{ (node || {}).label }} </span> @@ -22,11 +22,11 @@ <el-main> <basic-container> <div v-if="this.nodeRow && this.nodeRow.label"> - <el-button icon="el-icon-plus" size="small" type="primary" @click="addHandler">鍒涘缓</el-button> - <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editHandler">淇敼</el-button> - <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delHandler">鍒犻櫎</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 v-if="permissionList.addBtn" icon="el-icon-plus" size="small" type="primary" @click="addHandler">鍒涘缓</el-button> + <el-button v-if="permissionList.editBtn" icon="el-icon-edit" plain size="small" type="primary" @click="editHandler">淇敼</el-button> + <el-button v-if="permissionList.delBtn" icon="el-icon-delete" plain size="small" type="danger" @click="delHandler">鍒犻櫎</el-button> + <el-button v-if="permissionList.importBtn" icon="el-icon-upload2" plain size="small" type="primary" @click="upLoadClickHandler">瀵煎叆</el-button> + <el-button v-if="permissionList.exportBtn" icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭</el-button> </div> <avue-crud ref="crud" @selection-change="selectionChange" @@ -37,6 +37,19 @@ <!--瀵煎叆 --> <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="瀵煎叆" @updata="uploadCallBack"></upload-file> + + <div> + <fieldset> + <legend> 鏌ヨ鏉′欢 </legend> + <form-query-dialog ref="formQuery" + style="height: 260px;" + :readOnly="true" + :queryCondition="queryCondition" + :queryTree="queryTree" + :levelFlag.sync="levelFlag" + ></form-query-dialog> + </fieldset> + </div> </basic-container> </el-main> @@ -51,9 +64,11 @@ import func from "@/util/func"; import {dateFormat} from "@/util/date"; import FormDialog from "./formDialog.vue" +import formQueryDialog from "@/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue"; +import {mapGetters} from "vuex"; export default { name: "index", - components: {FormDialog}, + components: {FormDialog,formQueryDialog}, data() { return { treeOption: { @@ -68,7 +83,7 @@ } }, nodeRow: {}, - treeData: [ { + treeData: [{ label: '涓氬姟绫诲瀷鏍�', oid: 'topNode', children: [] @@ -95,7 +110,7 @@ selection: true, menu: false, height: "auto", - calcHeight: -40, + calcHeight: 300, tip: false, header:false, column: [{ @@ -115,7 +130,24 @@ ], upFileType: ['vciqtf'], fileUrl: 'api/templateController/impBtmTemplate', + //楂樼骇鏌ヨ鏉′欢 + queryTree:{}, + //鏅�氭煡璇㈡潯浠� + queryCondition:[], + levelFlag:0 } + }, + 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), + }; + }, }, created() { this.getTreeList(); @@ -126,14 +158,26 @@ const loading = this.$loading({}); getBizTypes().then(res => { const data = res.data.data.map(item => { - item.label = item.attributes.id; - return item; + this.processChildren(item); // 澶勭悊姣忎釜鑺傜偣 + item.attributes.label = item.attributes.id; + return item.attributes; }); this.treeData[0].children = data; loading.close(); + }).catch(error=>{ + loading.close(); }) }, - + // 澶勭悊鏍戝舰缁撴瀯 + processChildren(item) { + if (item.children && item.children.length > 0) { + item.attributes.children = item.children.map(child => { + child.attributes.label = child.attributes.id; + this.processChildren(child); // 閫掑綊澶勭悊姣忎釜瀛愯妭鐐� + return child.attributes; // 鍙繑鍥炲瓙鑺傜偣鐨� attributes + }); + } + }, // 鏍戠偣鍑� nodeClick(row) { this.nodeRow = row; @@ -145,12 +189,19 @@ getObjTypeQTs(this.nodeRow.label).then(res => { this.crudData = res.data.data; this.tableLoading = false; + this.queryCondition=[]; + this.queryTree={}; + this.levelFlag=0; }) }, rowClick(row) { this.$refs.crud.toggleSelection(); this.$refs.crud.toggleRowSelection(row); //閫変腑褰撳墠琛� this.selectionRow = [row]; + + this.queryCondition=row.queryTemplate.condition; + this.queryTree=row.tree; + this.levelFlag=row.levelFlag; }, selectionChange(list) { this.selectionRow = list; @@ -251,40 +302,10 @@ .el-scrollbar__wrap { overflow: auto !important; } - .headerCon{ - .el-button{ - width: 82px; - } - } } - -.headerCon { - display: flex; - flex-wrap: wrap; - margin-bottom: 5px; - - .el-button + .el-button { - margin-left: 5px; - } - - .el-button { - margin-top: 5px; - } +fieldset { + padding: 10px 6px; + margin: 10px 0 0 0; + border: 1px solid #EBEEF5; } - -.headerCon > .el-button:nth-child(4) { - margin-left: 0; -} - -.headerCon > .el-button:nth-child(7) { - margin-left: 0; -} - - -.smallBtn { - width: 82px; - text-align: center; - padding-left: 4.5px; -} - </style> -- Gitblit v1.9.3