diff --git a/src/pages/config/pages/mechanismManage/index.vue b/src/pages/config/pages/mechanismManage/index.vue index cf1d1930e..6f613fbf6 100644 --- a/src/pages/config/pages/mechanismManage/index.vue +++ b/src/pages/config/pages/mechanismManage/index.vue @@ -59,7 +59,7 @@ + class="common-button-primary" @click="getDatas"> 查询 @@ -238,6 +238,7 @@ export default { name: 'MechanismManage', data() { return { + peopleType: '', //1为树结构 2 为全机构 nodeKeyId: '', searchForm: { uname: "", @@ -417,7 +418,33 @@ export default { console.log(e); }) }, + getDatas() { + this.peopleType = 2; + this.$http.post('SarInstitution/institution/user', { + current: this.page, + size: this.pageSize, + uname: this.searchForm.uname, + email: this.searchForm.email + }, { + _this: this, + loading: 'Loading' + }, res => { + res.data.records.forEach((item) => { + let NameList = '' + item.positions.forEach((items) => { + if (NameList.length > 0) { + NameList += ',' + } + NameList += items.name + }) + item.NameList = NameList + }) + this.data = res.data.records + this.total = res.data.total + }) + }, getData() { + this.peopleType = 1; this.$http.post('SarInstitution/institution/user', { current: this.page, size: this.pageSize, @@ -444,11 +471,19 @@ export default { }, pageChange(page) { this.page = page - this.getData() + if(this.peopleType === 1){ + this.getData() + }else{ + this.getDatas() + } }, pageSizeChange(pageSize) { this.pageSize = pageSize - this.getData() + if(this.peopleType === 1){ + this.getData() + }else{ + this.getDatas() + } }, pageChange2(page) { this.page = page