From b9f3e4a899013ce21de3fc1ac127d137c7494595 Mon Sep 17 00:00:00 2001 From: ludc Date: 星期一, 02 九月 2024 15:21:20 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/plt-web/plt-web-ui/src/components/refer/vciWebReferClassify.vue | 46 +++++++++++++++++++++++++++++++++------------- 1 files changed, 33 insertions(+), 13 deletions(-) diff --git a/Source/plt-web/plt-web-ui/src/components/refer/vciWebReferClassify.vue b/Source/plt-web/plt-web-ui/src/components/refer/vciWebReferClassify.vue index 61847dd..aca0056 100644 --- a/Source/plt-web/plt-web-ui/src/components/refer/vciWebReferClassify.vue +++ b/Source/plt-web/plt-web-ui/src/components/refer/vciWebReferClassify.vue @@ -3,6 +3,7 @@ <div> <el-dialog v-dialogDrag + v-dialog-resize :title="title" :visible.sync="visible" :width="onlyTable?'60%': '80%'" @@ -10,8 +11,8 @@ class="avue-dialog avue-dialog--top" @close="dialogClose" > - <el-container :style="{ 'height': height || '60vh' }"> - <el-aside width="300px" v-if="!onlyTable && classifys.length>0"> + <el-container :style="{ 'height': height }"> + <el-aside style="width:200px;height:100%" v-if="!onlyTable && classifys.length>0"> <el-tabs type="border-card" style="height: 100%" @tab-click="tabClick" v-model="tabName"> <el-tab-pane @@ -25,6 +26,7 @@ <el-tree class="filter-tree" + :style="'height: calc('+height+' - 100px);'" :data="treeItem.treeData" :lazy="lazy" :load="treeLoad" @@ -37,7 +39,7 @@ </el-tab-pane> </el-tabs> </el-aside> - <el-main style="padding: 0 0 0 20px"> + <el-main style="padding: 0 0 0 20px;height:100%"> <avue-crud ref="referCrud" v-model="formValue" @@ -62,9 +64,9 @@ </el-container> <div class="avue-dialog__footer"> <div class="avue-dialog__footer--left valueInfo">{{ valueInfo }}</div> - <el-button @click="escHandler">鍙� 娑�</el-button> - <el-button @click="clearValue">娓� 绌�</el-button> <el-button type="primary" @click="setValue">纭� 瀹�</el-button> + <el-button @click="clearValue">娓� 绌�</el-button> + <el-button @click="escHandler">鍙� 娑�</el-button> </div> </el-dialog> @@ -113,7 +115,7 @@ }, height: { type: String, - default:'500px' + default:(document.body.clientHeight-400)+'px' }, reloadFormKey: { type: String, @@ -153,10 +155,11 @@ lazy: this.referConfig.options.loadType == 'node', loadType: { all: "all", node: "node" }, url: this.referConfig.options.url || "referGrid", - query: {}, + query: {},//鍒楄〃鐨勬悳绱㈡潯浠� + where:{},//鍒楄〃鐨勬煡璇㈡潯浠� loading: false, page: { - layout: "sizes,prev,pager,next,jumper,total", + layout: "sizes,prev,pager,next,jumper,sizes,total", pageSize: 10, currentPage: 1, total: this.referConfig.options.data @@ -168,7 +171,6 @@ option: { addBtn: false, columnBtn: false, - calcHeight: 30, tip: false, menu: false, searchShow: true, @@ -180,6 +182,7 @@ reserveSelection: true, dialogClickModal: false, highlightCurrentRow: true, + height:parseInt(this.height)-150, rowKey: "id", rowParentKey: "parentId", column: [], @@ -273,6 +276,19 @@ tabClick:function (tab){ this.currentTreeIndex= tab.index; this.filterText=this.classifys[tab.index].filterText; + this.option.column.forEach(item => { + if (item.hideInClassify) { + let queryField = this.classifys[this.currentTreeIndex].queryField; + let inClassifyArray = item.hideInClassify.split(","); + if (inClassifyArray.find((value => value === queryField))) { + item.hide = true; + item.showColumn = false; + } else { + item.hide = false; + item.showColumn = true; + } + } + }); }, handleFocus() { if (!this.disabled) { @@ -476,13 +492,13 @@ this.$refs.referCrud.toggleSelection(); }, refreshChange() { - this.onLoad(this.page, this.query); + this.onLoad(this.page); }, onLoad(page, params = {}) { if (this.url) { this.loading = true; getList( - Object.assign(params, this.params, this.query), + Object.assign(params, this.params,this.where, this.query), page.currentPage, page.pageSize, this.url @@ -558,13 +574,14 @@ where[this.classifys[this.currentTreeIndex].queryField] = data.attributes[classifyValueField]; this.url = this.classifys[this.currentTreeIndex].queryByClassifyUrl || this.options.url; this.page.currentPage=1; - this.onLoad(this.page, where); + this.where = where; + this.onLoad(this.page,where); }, }, }; </script> -<style scoped> +<style lang="scss" scoped> .valueInfo { float: left; border: 1px solid #e9e7e7; @@ -573,4 +590,7 @@ padding: 6px 15px; line-height: 1; } +.filter-tree{ + overflow-y: auto; +} </style> -- Gitblit v1.9.3