diff --git a/src/views/modules/staff/profile/index.vue b/src/views/modules/staff/profile/index.vue index 44e7355..f366c08 100644 --- a/src/views/modules/staff/profile/index.vue +++ b/src/views/modules/staff/profile/index.vue @@ -51,7 +51,16 @@ export default { }, methods: { async handleGetEmployeessItuation (data = {}) { + const loading = this.$loading({ + lock: true, + text: 'Loading', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }) let result = await apiEmployeessItuation(data) + setTimeout(() => { + loading.close() + }, 500) console.log('result: ', result) if (result.code === 0) { this.dataInfo = result.data @@ -61,14 +70,7 @@ export default { }, // 获取页面数据 async initData () { - const loading = this.$loading({ - lock: true, - text: 'Loading', - spinner: 'el-icon-loading', - background: 'rgba(0, 0, 0, 0.7)' - }) await this.handleGetEmployeessItuation() - loading.close() }, submit (data) { this.handleGetEmployeessItuation(data)