|
@@ -16,19 +16,22 @@ import { GetUserLimit } from "@/apis/user";
|
|
|
* @params nameList-按钮列表
|
|
|
*/
|
|
|
export function GetUserPrivilege(nameList) {
|
|
|
- const router = useRoute()
|
|
|
+ // const router = useRoute()
|
|
|
let userData = useRoute().query
|
|
|
- userData.type = userData.digitalTwainType
|
|
|
- userData.sysType = "MA=="
|
|
|
- delete userData.digitalTwainType
|
|
|
- // console.log(userData)
|
|
|
+ console.log(userData)
|
|
|
+ if(userData.digitalTwainType){
|
|
|
+ userData.type = userData.digitalTwainType
|
|
|
+ delete userData.digitalTwainType
|
|
|
+ }
|
|
|
GetUserLimit(userData).then((res) => {
|
|
|
- // console.log(res)
|
|
|
+ console.log(res)
|
|
|
let parentId = []
|
|
|
let limitArr = []
|
|
|
res.data.Rows.forEach((item) => {
|
|
|
- if (item.name.includes('数字孪生业务版') || item.name.includes('数字孪生演示版')) {
|
|
|
- res.data.Rows.forEach((item) => {
|
|
|
+ // if (item.name.includes('数字孪生')) {
|
|
|
+ if (item.name.includes('数字孪生业务版') || item.name.includes('数字孪生演示版')) {
|
|
|
+ res.data.Rows.forEach((item) => {
|
|
|
+ // console.log(item)
|
|
|
parentId.push(item.id)
|
|
|
})
|
|
|
// console.log(parentId)
|
|
@@ -39,10 +42,14 @@ export function GetUserPrivilege(nameList) {
|
|
|
}
|
|
|
|
|
|
})
|
|
|
- nameList.data = nameList.data.filter((item) => {
|
|
|
- if (limitArr.includes(item.name)) {
|
|
|
+ // console.log(nameList.data)
|
|
|
+ console.log(limitArr)
|
|
|
+
|
|
|
+ nameList.data = nameList.data.filter((i) => {
|
|
|
+ if (limitArr.includes(i.name)) {
|
|
|
return true
|
|
|
}
|
|
|
})
|
|
|
+ // console.log(nameList.data)
|
|
|
})
|
|
|
}
|