fix:员工概况loading添加

This commit is contained in:
xiongchengqiang 2020-05-20 17:01:36 +08:00
parent 7884b74565
commit 6f0ba03418

View File

@ -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)