|
@@ -6,6 +6,7 @@
|
|
|
ref="crud"
|
|
|
v-model="form"
|
|
|
:table-loading="loading"
|
|
|
+ :search.sync="query"
|
|
|
:page.sync="page"
|
|
|
@row-del="rowDel"
|
|
|
@row-update="rowUpdate"
|
|
@@ -15,7 +16,6 @@
|
|
|
@search-change="searchChange"
|
|
|
@search-reset="searchReset"
|
|
|
@on-load="onLoad"
|
|
|
- @search-criteria-switch="searchCriteriaSwitch"
|
|
|
@tree-load="treeLoad"
|
|
|
>
|
|
|
<template slot-scope="{ type, size, row, $index }" slot="menuLeft">
|
|
@@ -32,11 +32,12 @@ export default {
|
|
|
name: "customerInformation",
|
|
|
data() {
|
|
|
return {
|
|
|
+ query: {},
|
|
|
+ loading: false,
|
|
|
form: {
|
|
|
positioner: []
|
|
|
},
|
|
|
option: {
|
|
|
- loading: false,
|
|
|
addBtn: false,
|
|
|
headerAlign: "center",
|
|
|
align: "center",
|
|
@@ -250,7 +251,7 @@ export default {
|
|
|
//点击搜索按钮触发
|
|
|
searchChange(params, done) {
|
|
|
this.page.currentPage = 1;
|
|
|
- this.onLoad(this.page, params);
|
|
|
+ this.onLoad(this.page, this.query);
|
|
|
done();
|
|
|
},
|
|
|
searchReset() {
|
|
@@ -258,33 +259,31 @@ export default {
|
|
|
this.treeDeptId = "";
|
|
|
this.onLoad(this.page);
|
|
|
},
|
|
|
- onLoad(page, params = { parentId: 0 }) {
|
|
|
- let queryParams = Object.assign({}, params, {
|
|
|
- size: page.pageSize,
|
|
|
- current: page.currentPage,
|
|
|
- parentId: 0,
|
|
|
- storageTypeId: this.treeDeptId
|
|
|
- });
|
|
|
+ onLoad(page, params = {}) {
|
|
|
+ let obj = {};
|
|
|
+ obj = {
|
|
|
+ ...Object.assign(params, this.query)
|
|
|
+ };
|
|
|
this.loading = true;
|
|
|
- getList(queryParams)
|
|
|
+ getList(page.currentPage, page.pageSize, obj)
|
|
|
.then(res => {
|
|
|
this.dataList = res.data.data.records;
|
|
|
this.page.total = res.data.data.total;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.crud.doLayout();
|
|
|
+ // this.$refs.crud.dicInit();
|
|
|
+ });
|
|
|
})
|
|
|
.finally(() => {
|
|
|
this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
- searchCriteriaSwitch(type) {
|
|
|
- // this.$refs.crud.doLayout();
|
|
|
- // this.$refs.crud.getTableHeight();
|
|
|
- },
|
|
|
//树桩列点击展开触发
|
|
|
treeLoad(tree, treeNode, resolve) {
|
|
|
const parentId = tree.id;
|
|
|
- getList({ parentId: parentId }).then(res => {
|
|
|
- resolve(res.data.data.records);
|
|
|
- });
|
|
|
+ // getList({ parentId: parentId }).then(res => {
|
|
|
+ // resolve(res.data.data.records);
|
|
|
+ // });
|
|
|
}
|
|
|
}
|
|
|
};
|
|
@@ -295,7 +294,7 @@ export default {
|
|
|
height: 94.8vh;
|
|
|
}
|
|
|
::v-deep .el-table .cell {
|
|
|
- padding-right: 0px !important;
|
|
|
+ padding-right: 2px !important;
|
|
|
}
|
|
|
::v-deep .avue-crud .el-table .el-button.el-button--small {
|
|
|
padding: 0px !important;
|