修改bug

prod
wangwei 2 years ago
parent 7e30fcd8e7
commit 3ef1afac78

@ -56,7 +56,7 @@
:total="total" :total="total"
:page.sync="filterQuery.page" :page.sync="filterQuery.page"
:limit.sync="filterQuery.limit" :limit.sync="filterQuery.limit"
@pagination="getList" @pagination="handleCurrentChange"
/> />
<el-dialog <el-dialog
:title="formMap[formName]" :title="formMap[formName]"
@ -209,8 +209,9 @@ export default {
this.getList(); this.getList();
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.filterQuery.page = val; this.filterQuery.page = val.page;
this.getList(); this.getList();
this.filterQuery.page =1;
}, },
getList() { getList() {
this.loading = true; this.loading = true;
@ -312,7 +313,6 @@ export default {
created() { created() {
this.getStorage(); this.getStorage();
// //
this.getList(); this.getList();
}, },
}; };

@ -173,7 +173,7 @@ export default {
}, },
userData: [], userData: [],
userTotal: 0, userTotal: 0,
userDataList:[],
//-------------------- //--------------------
selectUserQuery: { selectUserQuery: {
@ -206,25 +206,29 @@ export default {
}; };
}, },
loadUserList() { // loadUserList() { //
// if (val != null) { // if (val != null) {
// this.userQuery.page = val; // this.userQuery.page = val;
// } // }
// //
warehouseUserList(this.userQuery).then((res) => { warehouseUserList(this.userQuery).then((res) => {
this.userData = res.data.list; this.userData = res.data.list;
this.userTotal = res.data.total; this.userTotal = res.data.total;
}).catch((error) => { }).catch((error) => {
this.$message.error("用户数据加载失败") this.$message.error("用户数据加载失败")
}); });
}, },
addUser() { // addUser() { //
debugger
this.currentCode = this.inputQuery.code; this.currentCode = this.inputQuery.code;
this.userFormVisible = true; this.userFormVisible = true;
this.selectUserQuery.code = this.inputQuery.code; this.selectUserQuery.code = this.inputQuery.code;
this.selectUserQuery.page = 1; this.selectUserQuery.page = 1;
for(var i=0;i<this.userData.length;i++){
this.userDataList[i]=this.userData[i].id;
}
this.selectUserQuery.listUser=this.userDataList;
this.getSelectUser(); this.getSelectUser();
}, },
@ -309,6 +313,7 @@ export default {
created() { created() {
this.userQuery.code = this.inputQuery.code; this.userQuery.code = this.inputQuery.code;
this.loadUserList(); this.loadUserList();
} }
} }
</script> </script>

Loading…
Cancel
Save