diff --git a/src/api/index.js b/src/api/index.js index e94a71a..aea95f8 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -44,7 +44,7 @@ export default { updateStaff: `management/staff/updateStaff`, exportFailureStaff: `${Setting.apiBaseURL}/management/staff/exportFailure`, uploadFileStaff: `${Setting.apiBaseURL}/management/staff/uploadFile`, - downloadStaffTemp: `http://liuwanr.oss-cn-shenzhen.aliyuncs.com/xlsx/20201102/1604658763812.xlsx`, + downloadStaffTemp: `http://39.108.250.202/template/%E8%80%83%E8%AF%95%E5%B9%B3%E5%8F%B0%E5%91%98%E5%B7%A5%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx`, // 角色管理 getRole: `management/role/get`, diff --git a/src/pages/client/list/index.vue b/src/pages/client/list/index.vue index ef1ad52..009bfa0 100644 --- a/src/pages/client/list/index.vue +++ b/src/pages/client/list/index.vue @@ -22,7 +22,7 @@ - + @@ -117,7 +117,7 @@ export default { keyword: function(val) { clearTimeout(this.searchTimer) this.searchTimer = setTimeout(() => { - this.getData() + this.initData() },500) } }, @@ -141,6 +141,10 @@ export default { this.totals = res.data.list.totalCount }).catch(res => {}); }, + initData(){ + this.pageNo = 1 + this.getData() + }, getProvince(){ this.$get(this.api.queryProvince).then(res => { this.provinceList = res.data.list diff --git a/src/pages/system/list/staff.vue b/src/pages/system/list/staff.vue index 5ecc07d..bffbb5f 100644 --- a/src/pages/system/list/staff.vue +++ b/src/pages/system/list/staff.vue @@ -10,7 +10,7 @@
- +
新增员工 @@ -47,7 +47,7 @@ @@ -118,6 +118,7 @@ :limit="1" :on-exceed="handleExceed" :action="this.api.uploadFileStaff" + :data="{schoolId: this.clientId}" :file-list="uploadList" name="file" > @@ -262,7 +263,7 @@ export default { keyword: function(val) { clearTimeout(this.searchTimer) this.searchTimer = setTimeout(() => { - this.getData() + this.initData() },500) } }, @@ -308,13 +309,23 @@ export default { staffProfessionalArchitectureIds: this.oneDepartmentIds, staffGradeIds: this.twoDepartmentIds, searchContent: this.keyword, - schoolId: this.clientId + schoolId: this.clientId, + pageNum: this.pageNo, + pageSize: this.pageSize } this.$get(`${this.api.queryStaff}/${this.pageNo}/${this.pageSize}`,data).then(res => { - this.listData = res.data.staffList - this.total = res.data.total + this.listData = res.data.staffList.list + this.total = res.data.staffList.totalCount + if(!this.listData.length && this.total){ + this.pageNo-- + this.getData() + } }).catch(res => {}); }, + initData(){ + this.pageNo = 1 + this.getData() + }, getRoles() { let data = { clientId: this.clientId diff --git a/src/pages/user/list/index.vue b/src/pages/user/list/index.vue index 79bb8a6..ad874e7 100644 --- a/src/pages/user/list/index.vue +++ b/src/pages/user/list/index.vue @@ -168,7 +168,7 @@ export default { keyword: function(val) { clearTimeout(this.searchTimer) this.searchTimer = setTimeout(() => { - this.getData() + this.initData() },500) } }, @@ -196,6 +196,10 @@ export default { this.totals = res.data.list.totalCount }).catch(res => {}); }, + initData(){ + this.pageNo = 1 + this.getData() + }, accountChange(){ if(this.form.account !== this.originalAccount){ this.$get(`${this.api.getAccount}?account=${this.form.account}`).then(res => { diff --git a/src/setting.js b/src/setting.js index 2389a32..193ecb5 100644 --- a/src/setting.js +++ b/src/setting.js @@ -16,7 +16,7 @@ const Setting = { showProgressBar: true, // 接口请求地址 // apiBaseURL: env === 'development' ? 'http://192.168.31.152:8001' : 'http://39.108.250.202:8000', - apiBaseURL: env === 'development' ? 'http://192.168.31.152:8001' : 'http://39.108.250.202:9000', + apiBaseURL: env === 'development' ? 'http://39.108.250.202:9000' : 'http://39.108.250.202:9000', // 接口请求返回错误时,弹窗的持续时间,单位:秒 modalDuration: 3, // 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice