| | |
| | | @size-change="sizeChange" |
| | | @row-click="rowClickChange" |
| | | @search-change='searchChange' |
| | | @filter-change="filterChange" |
| | | @filter="filterChange" |
| | | @selection-change="selectChange"> |
| | | <!--top区域按钮--> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | |
| | | <dynamic-button :componentVO="componentVO" :butttonList="componentVO.buttons" :scope="scope" :dataStore="selectList" :sourceData="sourceData" |
| | | LocationType="menu" |
| | | @afterMethod="handleRefresh" |
| | | @rowView="rowView" |
| | | type="table"></dynamic-button> |
| | | </template> |
| | | <template slot="menuRight" slot-scope="scope"> |
| | |
| | | filterBtn:false, |
| | | selection: true, |
| | | tip: false, |
| | | menuWidth:260, |
| | | height: '100%', |
| | | calcHeight: 15, |
| | | indexFixed: false, |
| | |
| | | onLoad(page, params = {}) { |
| | | if (Object.keys(this.sourceData).length>0 && this.isShow) { |
| | | this.loading = true; |
| | | getList(page.currentPage, page.pageSize, Object.assign(params,this.params,this.query)).then(res => { |
| | | getList(page.currentPage, page.pageSize, Object.assign({},this.params,this.query,params)).then(res => { |
| | | let data = []; |
| | | if (res.data && res.data.data) { |
| | | data = res.data.data; |
| | |
| | | }); |
| | | } |
| | | }, |
| | | rowView(row,index){ |
| | | this.$refs.dataTable.rowView(row,index) |
| | | }, |
| | | rowClickChange(row){ |
| | | this.$refs.dataTable.toggleRowSelection(row); |
| | | }, |
| | |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | searchChange(params,done){ |
| | | this.query = params; |
| | | this.query = {}; |
| | | for (let i in params) { |
| | | this.query['conditionMap["' + i + '"]'] = "*" + params[i] + "*"; |
| | | } |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page); |
| | | done(); |
| | | }, |
| | | filterChange(result){ |
| | | debugger; |
| | | |
| | | let parms={} |
| | | for (let i in result) { |
| | | if(!validatenull(result[i][2])) { |
| | | const fieldVal = result[i][2] |
| | | if (result[i][1] == "=") { |
| | | parms['conditionMap["' + result[i][0] + '"]'] = fieldVal; |
| | | } else if (result[i][1] == "≠") { |
| | | parms['conditionMap["' + result[i][0] + '"]'] = '!=' + fieldVal; |
| | | } else if (result[i][1] == "like") { |
| | | parms['conditionMap["' + result[i][0] + '"]'] = "*" + fieldVal + "*"; |
| | | } else if (result[i][1] == "∈") { |
| | | parms['conditionMap["' + result[i][0] + '"]'] = "*" + fieldVal + "*"; |
| | | } else { |
| | | parms['conditionMap["' + result[i][0] + '"]'] = result[i][1] + fieldVal; |
| | | } |
| | | } |
| | | } |
| | | this.onLoad(this.page,parms); |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | |
| | | } |
| | | }, |
| | | handleRefresh(type) { |
| | | this.onLoad(this.page, this.query); |
| | | this.onLoad(this.page); |
| | | }, |
| | | rowExcel() { |
| | | //导出 |