| | |
| | | "name" : "线缆上报", |
| | | "appid" : "__UNI__F64E0A4", |
| | | "description" : "", |
| | | "versionName" : "1.0.25", |
| | | "versionName" : "1.0.26", |
| | | "versionCode" : "100", |
| | | "transformPx" : false, |
| | | /* 5+App特有相关 */ |
| | |
| | | return userInfo.value.roles.some((role: any) => role.roleKey === "qualitative-inspector"); |
| | | }); |
| | | |
| | | // 判断是否为出库角色 |
| | | const isStorage = computed(() => { |
| | | if (!userInfo.value || !userInfo.value.roles || !Array.isArray(userInfo.value.roles)) { |
| | | return false; |
| | | } |
| | | console.log( |
| | | "userInfo.value.roles", |
| | | userInfo.value.roles.some((role: any) => role.roleKey === "storage") |
| | | ); |
| | | return userInfo.value.roles.some((role: any) => role.roleKey === "storage"); |
| | | }); |
| | | |
| | | const fileProgress = reactive({ |
| | | show: false, |
| | | progress: 0, |
| | |
| | | // url: "/pages/work/config/index", |
| | | // prem: "sys:config:query", |
| | | // }, |
| | | { |
| | | icon: "/static/icons/log.png", |
| | | title: "时效报工", |
| | | url: "/pages/timely/index", |
| | | show: false, |
| | | }, |
| | | // { |
| | | // icon: "/static/icons/log.png", |
| | | // title: "时效报工", |
| | | // url: "/pages/timely/index", |
| | | // show: false, |
| | | // }, |
| | | { |
| | | icon: "/static/icons/routingInspection.png", |
| | | title: "巡检", |
| | |
| | | icon: "/static/icons/log.png", |
| | | title: "出库", |
| | | url: "/pages/outbound/index", |
| | | show: true, |
| | | show: false, |
| | | }, |
| | | ]); |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | // 判断是否为巡检员角色 |
| | | if (data.deviceGroupName == "时效组") { |
| | | navList[1].show = true; |
| | | } else { |
| | | if (data.deviceGroupName.includes("丝") || data.deviceGroupName.includes("绞")) { |
| | | // 如果是丝或绞,显示生产管理菜单 |
| | | navList[0].show = true; |
| | | } |
| | | if (isInspector.value) { |
| | | // 如果是巡检员,显示巡检菜单 |
| | | navList[1].show = true; |
| | | } |
| | | if (isStorage.value) { |
| | | // 如果是出库角色,显示出库菜单 |
| | | navList[2].show = true; |
| | | } |
| | | }; |