|
@@ -7,7 +7,8 @@
|
|
|
:page.sync="page"
|
|
|
@search-change="searchChange"
|
|
|
@on-load="onLoad"
|
|
|
- @row-update="rowUpdate">
|
|
|
+ @row-update="rowUpdate"
|
|
|
+ @search-criteria-switch="searchCriteriaSwitch">
|
|
|
<template slot-scope="{ row, index }" slot="salesPrice">
|
|
|
<el-input
|
|
|
v-if="row.$cellEdit"
|
|
@@ -130,6 +131,17 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ created() {
|
|
|
+ let i = 0;
|
|
|
+ this.option.column.forEach(item => {
|
|
|
+ if (item.search) i++
|
|
|
+ })
|
|
|
+ if (i % 3 !== 0){
|
|
|
+ const num = 3 - Number(i % 3)
|
|
|
+ this.option.searchMenuSpan = num * 8;
|
|
|
+ this.option.searchMenuPosition = "right";
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
derivation() {
|
|
|
this.$confirm("是否下载模板?", "提示", {
|
|
@@ -184,8 +196,19 @@ export default {
|
|
|
customerList(queryParams).then(res => {
|
|
|
this.data = res.data.data.records
|
|
|
this.page.total = res.data.data.total
|
|
|
+ if (this.page.total) {
|
|
|
+ this.option.height = window.innerHeight - 240;
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
+ searchCriteriaSwitch(type){
|
|
|
+ if (type){
|
|
|
+ this.option.height = this.option.height - 90
|
|
|
+ }else {
|
|
|
+ this.option.height = this.option.height + 90
|
|
|
+ }
|
|
|
+ this.$refs.crud.getTableHeight()
|
|
|
+ },
|
|
|
rowUpdate(form, index, done) {
|
|
|
console.log(form)
|
|
|
typeSave(form).then(res => {
|