diff --git a/back/src/views/modules/sys/user.vue b/back/src/views/modules/sys/user.vue index 5fbacc01..c77ab078 100644 --- a/back/src/views/modules/sys/user.vue +++ b/back/src/views/modules/sys/user.vue @@ -1,209 +1,92 @@ @@ -214,7 +97,7 @@ import AddOrUpdate from './user-add-or-update' import qs from 'qs' export default { mixins: [mixinViewModule], - data () { + data() { return { mixinViewModuleOptions: { getDataListURL: '/sys/user/page', @@ -235,30 +118,33 @@ export default { components: { AddOrUpdate }, - created () { + created() { this.getPostList() }, methods: { - reset () { + reset() { + this.dataForm.username = '' + this.dataForm.real_name = '' + this.dataForm.deptId = '' + this.dataForm.postId = '' + this.dataForm.gender = '' + if (this.$refs.renDeptTree) { + this.$refs.renDeptTree.showDeptName = ''; + } this.$http .get( this.mixinViewModuleOptions.getDataListURL + - '?' + - qs.stringify({ - page: 1, - limit: 10, - username: '', - deptId: '', - postId: '', - gender: '' - }) + '?' + + qs.stringify({ + page: 1, + limit: 10, + username: '', + deptId: '', + postId: '', + gender: '' + }) ) .then(({ data: res }) => { - this.dataForm.username = '' - this.dataForm.real_name = '' - this.dataForm.deptId = '' - this.dataForm.postId = '' - this.dataForm.gender = '' if (res.code !== 0) { this.dataList = [] this.total = 0 @@ -279,7 +165,7 @@ export default { this.dataListLoading = false }) }, - getPostList () { + getPostList() { this.$http .get('/sys/post/list') .then(({ data: res }) => { @@ -288,7 +174,7 @@ export default { } this.postList = res.data }) - .catch(() => {}) + .catch(() => { }) } } }