Commit 51b4e13e authored by Z's avatar Z

Z: Dot: search done.

parent 8d87583b
......@@ -57,10 +57,10 @@
<div class="pages">
<el-pagination
@current-change="handleCurrentChange"
:current-page="page.currentPage"
:page-size="page.size"
:current-page="zcache.page.nowPage"
:page-size="zcache.page.pageSize"
layout="total, prev, pager, next, jumper"
:total="page.total"
:total="zcache.page.allItem"
></el-pagination>
</div>
......@@ -296,7 +296,13 @@ export default {
zcache: {
status: {
seeDialog: false,
editDialog: false
editDialog: false,
isSearch: false
},
page: {
allItem: 0,
pageSize: 10,
nowPage: 1
}
},
zdata: {
......@@ -491,6 +497,10 @@ export default {
if ((this.$refs.addStore.addStoreDialog = false)) {
this.storeGetMainList();
}
},
'':{
handler: function(){},
deep: true,
}
},
// created() {
......@@ -498,7 +508,8 @@ export default {
// zlog('--->Created!')
// },
mounted() {
this.storeGetMainList();
// this.storeGetMainList();
this.storeSearch();
this.storeGetUnGroupManList();
},
methods: {
......@@ -545,16 +556,19 @@ export default {
}
},
storeSearch() {
let postData = {
keyWords: this.zdata.searchPost.keywords
};
if (this.zdata.searchPost.keywords == "") {
this.zcache.status.isSearch = false;
this.zcache.page.nowPage = 1;
this.storeGetMainList();
} else {
this.zcache.status.isSearch = true;
let postData = {
keyWords: this.zdata.searchPost.keywords,
pageNum: 1
};
ApiStoreSearch(postData)
.then(res => {
let result = [];
console.log("--->res", res);
result.push(res.data.stallInfo);
this.list.main = result;
})
......@@ -564,13 +578,17 @@ export default {
storeGetMainList() {
// zlog("--->In Get API!");
let postData = {
pageNum: 1
pageNum: this.zcache.page.nowPage
};
ApiStoreGetMainList(postData).then(res => {
this.list.main = res.data.pageInfo_adminStalls.list[0];
this.list.man = res.data.pageInfo_principals.list[0];
this.transManIdToManName();
this.zcache.page.allItem = Number(res.data.pageInfo_adminStalls.total)
this.zcache.page.pageSize = res.data.pageInfo_adminStalls.pageSize
this.zcache.page.nowPage = res.data.pageInfo_adminStalls.pageNum
});
},
storeGetStoreDetail(inData) {
......@@ -720,10 +738,10 @@ export default {
message: "编辑成功",
type: "success"
});
this.zcache.status.editDialog = false;
this.zdata.editPost = JSON.parse(
JSON.stringify(this.zdata.editPostDefault)
);
this.zcache.status.editDialog = false;
this.storeGetMainList();
} else {
this.$message({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment