| | |
| | | <div> |
| | | <el-dialog |
| | | v-dialogDrag |
| | | v-dialog-resize |
| | | :title="title" |
| | | :visible.sync="visible" |
| | | :width="onlyTable?'60%': '80%'" |
| | |
| | | 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 |
| | |
| | | |
| | | <el-tree |
| | | class="filter-tree" |
| | | :style="'height: calc('+height+' - 100px);'" |
| | | :data="treeItem.treeData" |
| | | :lazy="lazy" |
| | | :load="treeLoad" |
| | |
| | | </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" |
| | |
| | | </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> |
| | | |
| | |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default:'500px' |
| | | default:(document.body.clientHeight-400)+'px' |
| | | }, |
| | | reloadFormKey: { |
| | | type: String, |
| | |
| | | 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 |
| | |
| | | option: { |
| | | addBtn: false, |
| | | columnBtn: false, |
| | | calcHeight: 30, |
| | | tip: false, |
| | | menu: false, |
| | | searchShow: true, |
| | |
| | | reserveSelection: true, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | height:parseInt(this.height)-150, |
| | | rowKey: "id", |
| | | rowParentKey: "parentId", |
| | | column: [], |
| | |
| | | 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) { |
| | |
| | | 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 |
| | |
| | | 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; |
| | |
| | | padding: 6px 15px; |
| | | line-height: 1; |
| | | } |
| | | .filter-tree{ |
| | | overflow-y: auto; |
| | | } |
| | | </style> |