Commit a2e738aa by liwk
2 parents 5eca6a69 7d2740d0
......@@ -54,13 +54,13 @@
label='员工信息'
name='second'
>
<gl-table :table="staffTableData"></gl-table>
<gl-table v-loading="staffLoading" :table="staffTableData"></gl-table>
</gl-tab-pane>
<gl-tab-pane
label='分组信息'
name='third'
>
<gl-table :table="groupTableData">
<gl-table v-loading="groupLoading" :table="groupTableData">
<gl-table-column align="center" v-for="(i, index) in groupTableData.column" :key="index" :label='i.label' :prop='i.prop' >
<template slot-scope="scope">
<template v-if='i.prop === "groupName"'>
......@@ -135,8 +135,8 @@ export default {
// loading标记
// loading: [0, 0, 0],
// basicLoading: false,
// staffLoading: false,
// groupLoading: false,
staffLoading: false,
groupLoading: false,
// 标记merchantId是否改变
IdChange: [0, 0, 0],
activeName: 'first',
......@@ -331,9 +331,11 @@ export default {
this.IdChange[0] && this.getBasicInfo()
break
case 'second':
this.staffLoading = this.IdChange[1]
this.IdChange[1] && this.getStaffInfo()
break
case 'third':
this.groupLoading = this.IdChange[2]
this.IdChange[2] && this.getGroupInfo()
break
}
......@@ -375,10 +377,12 @@ export default {
request.req(params).then(res => {
this.staffTableData.data = res.merchantPersonals
this.IdChange[1] = 0
console.log(this.IdChange[1])
notice.okTips()
this.staffLoading = false
// console.log(this.IdChange[1])
// notice.okTips()
}).catch(err => {
this.IdChange[1] = 0
this.staffLoading = false
notice.errorTips(err)
})
},
......@@ -389,10 +393,12 @@ export default {
request.req(params).then(res => {
this.groupTableData.data = res.merchantGroups
this.IdChange[2] = 0
console.log(this.IdChange[2])
notice.okTips()
this.groupLoading = false
// console.log(this.IdChange[2])
// notice.okTips()
}).catch(err => {
this.IdChange[2] = 0
this.groupLoading = false
notice.errorTips(err)
})
},
......@@ -404,8 +410,8 @@ export default {
this.detailVisible()
request.req(params).then(res => {
// console.log([res.parentMerchantLevel])
this.parentLevelTableData.data = [res.parentMerchantLevel]
this.childLevelTableData.data = res.childMerchantLevels
res.parentMerchantLevel && (this.parentLevelTableData.data = [res.parentMerchantLevel])
res.childMerchantLevels && (this.childLevelTableData.data = res.childMerchantLevels)
}).catch(err => {
// console.log(err)
notice.errorTips(err)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!