|
@@ -33,17 +33,23 @@ export default {
|
|
|
data () {
|
|
|
return {
|
|
|
item: {},
|
|
|
- menuData: []
|
|
|
+ menuData: [],
|
|
|
+ loading: false
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
async open (item) {
|
|
|
this.item = item
|
|
|
+ this.loading = true
|
|
|
this.$refs.menuDialog.open()
|
|
|
const check = await this.getMenu()
|
|
|
- if (!check) return
|
|
|
+ if (!check) {
|
|
|
+ this.loading = false
|
|
|
+ return
|
|
|
+ }
|
|
|
this.$nextTick(() => {
|
|
|
- this.$refs.menuTree.setCheckedKeys(item.menuIds.split(',').map(e => +e))
|
|
|
+ this.$refs.menuTree.setCheckedKeys(item.menuIds.split(',').map(Number))
|
|
|
+ this.loading = false
|
|
|
})
|
|
|
},
|
|
|
async getMenu () {
|