feat: There is no way the, 角色标准数据权限体系优化 国内标准左侧树 加入技术体系 待完成
This commit is contained in:
@@ -450,11 +450,62 @@ export default {
|
|||||||
}
|
}
|
||||||
this.addModel = true
|
this.addModel = true
|
||||||
},
|
},
|
||||||
getTree3() {
|
// getTree3() {
|
||||||
this.$http.get('sarResource/ts-resource', {}, {}, res => {
|
// this.$http.get('sarResource/ts-resource', {}, {}, res => {
|
||||||
if (res.ok) {
|
// if (res.ok) {
|
||||||
this.treeData3 = res.data
|
// this.treeData3 = res.data
|
||||||
}
|
// }
|
||||||
|
// })
|
||||||
|
// },
|
||||||
|
async getTreeAsync(){
|
||||||
|
let tsResource = await this.getTree3()
|
||||||
|
let sarMenuStandard = await this.getTree4()
|
||||||
|
|
||||||
|
let list1 = []
|
||||||
|
let list2 = []
|
||||||
|
if(tsResource && tsResource.ok && tsResource.data){
|
||||||
|
list1 = tsResource.data
|
||||||
|
}
|
||||||
|
|
||||||
|
if(sarMenuStandard && sarMenuStandard.ok && sarMenuStandard.data){
|
||||||
|
list2 = sarMenuStandard.data
|
||||||
|
}
|
||||||
|
|
||||||
|
if(list2.length > 0){
|
||||||
|
list1 = list1.concat(list2)
|
||||||
|
}
|
||||||
|
|
||||||
|
if(list1.length > 0){
|
||||||
|
this.treeData3 = this.sortByKey(list1,"displaySeq")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
sortByKey(ary, key) {
|
||||||
|
return ary.sort(function (a, b) {
|
||||||
|
let x = a[key]
|
||||||
|
let y = b[key]
|
||||||
|
return ((x < y) ? -1 : (x > y) ? 1 : 0)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getTree3(res,json) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
this.$http.get('sarResource/ts-resource/getListStand', {}, {
|
||||||
|
_this: this
|
||||||
|
}, res => {
|
||||||
|
const history = res;
|
||||||
|
resolve(history)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getTree4(res,json) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
this.$http.get('lawss/sarMenuStandard/getListStand', {dicId:'9m4qqqaansxmox5e82zm'}, {
|
||||||
|
_this: this
|
||||||
|
}, res => {
|
||||||
|
const history = res;
|
||||||
|
resolve(history)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
confirmDialogData() {
|
confirmDialogData() {
|
||||||
@@ -627,7 +678,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getTree()
|
this.getTree()
|
||||||
this.getTree3()
|
this.getTreeAsync()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -3783,6 +3783,59 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
async getTreeAsync(){
|
||||||
|
|
||||||
|
let tsResource = await this.selectMenu1()
|
||||||
|
let sarMenuStandard = await this.selectMenu2()
|
||||||
|
|
||||||
|
let list1 = []
|
||||||
|
let list2 = []
|
||||||
|
if(tsResource && tsResource.ok && tsResource.data){
|
||||||
|
list1 = tsResource.data
|
||||||
|
}
|
||||||
|
|
||||||
|
if(sarMenuStandard && sarMenuStandard.ok && sarMenuStandard.data){
|
||||||
|
list2 = sarMenuStandard.data
|
||||||
|
}
|
||||||
|
|
||||||
|
if(list2.length > 0){
|
||||||
|
list1 = list1.concat(list2)
|
||||||
|
}
|
||||||
|
|
||||||
|
if(list1.length > 0){
|
||||||
|
this.treeList = this.sortByKey(list1,"displaySeq")
|
||||||
|
}
|
||||||
|
},
|
||||||
|
sortByKey(ary, key) {
|
||||||
|
return ary.sort(function (a, b) {
|
||||||
|
let x = a[key]
|
||||||
|
let y = b[key]
|
||||||
|
return ((x < y) ? -1 : (x > y) ? 1 : 0)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
selectMenu1() {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
this.$http.get('sarResource/ts-resource/getListStand', {
|
||||||
|
sorDivide: 'INLAND_STAND',
|
||||||
|
userId: this.$store.getters.userInfo.userId
|
||||||
|
}, {
|
||||||
|
_this: this
|
||||||
|
}, res => {
|
||||||
|
const history = res;
|
||||||
|
resolve(history)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
selectMenu2(res,json) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
this.$http.get('lawss/sarMenuStandard/getListStand', {dicId:'9m4qqqaansxmox5e82zm'}, {
|
||||||
|
_this: this
|
||||||
|
}, res => {
|
||||||
|
const history = res;
|
||||||
|
resolve(history)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
// 查询二级菜单
|
// 查询二级菜单
|
||||||
selectMenu() {
|
selectMenu() {
|
||||||
this.$http.get('sarResource/ts-resource/getListStand', {
|
this.$http.get('sarResource/ts-resource/getListStand', {
|
||||||
@@ -5792,7 +5845,7 @@ export default {
|
|||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
// 进入页面后查询树形结构目录
|
// 进入页面后查询树形结构目录
|
||||||
await this.selectMenu()
|
await this.getTreeAsync()
|
||||||
this.dragControllerLR()
|
this.dragControllerLR()
|
||||||
// 进入页面后查询标准体系树形结构目录 引用 数据字典配置
|
// 进入页面后查询标准体系树形结构目录 引用 数据字典配置
|
||||||
// await this.selectStandardMenu()
|
// await this.selectStandardMenu()
|
||||||
|
|||||||
Reference in New Issue
Block a user