权限问题优化
This commit is contained in:
parent
bd9c463855
commit
f0cbd6f09c
|
|
@ -32,6 +32,7 @@
|
|||
<h4 class="tit">移动办公</h4>
|
||||
<view class="secs">
|
||||
<view
|
||||
v-show="btnIsShow(part)"
|
||||
v-for="(part, index) in benchList"
|
||||
:key="index"
|
||||
@click="jumpUrl(part.url)">
|
||||
|
|
@ -54,6 +55,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import store from "../../store/user";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -64,12 +66,23 @@
|
|||
name: "领料审批",
|
||||
pic: "/static/fetchExam.png",
|
||||
url: "fetchExam",
|
||||
isShow: "",
|
||||
isShow: [
|
||||
"picking:auditing:fgs",
|
||||
"picking:auditing:sgb",
|
||||
"picking:auditing:jjnb",
|
||||
"picking:auditing:tsnb",
|
||||
"*:*:*",
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "退料审批",
|
||||
pic: "/static/exitExam.png",
|
||||
url: "exitExam",
|
||||
isShow: [
|
||||
"return:auditing:auditing",
|
||||
"return:auditing:auditing:batch",
|
||||
"*:*:*",
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "RFID绑定",
|
||||
|
|
@ -90,6 +103,7 @@
|
|||
name: "新购入库",
|
||||
pic: "/static/newInStore.png",
|
||||
url: "newInStore",
|
||||
isShow: ["warehousing:newTools:auditing", "*:*:*"],
|
||||
},
|
||||
/* {
|
||||
name: '退料入库',
|
||||
|
|
@ -100,26 +114,31 @@
|
|||
name: "修试入库",
|
||||
pic: "/static/repairTestInStore.png",
|
||||
url: "repairTestInStore",
|
||||
isShow: ["warehousing:repair:auditing", "*:*:*"],
|
||||
},
|
||||
{
|
||||
name: "领料出库",
|
||||
pic: "/static/fetchMaterialOutStore.png",
|
||||
url: "fetchMaterialOutStore",
|
||||
isShow: ["picking:outbound:out", "*:*:*"],
|
||||
},
|
||||
{
|
||||
name: "退料接收",
|
||||
pic: "/static/backMaterialReceive.png",
|
||||
url: "backMaterialReceive",
|
||||
isShow: ["return:receive:handler", "*:*:*"],
|
||||
},
|
||||
{
|
||||
name: "维修",
|
||||
pic: "/static/fix.png",
|
||||
url: "fix",
|
||||
isShow: ["service:button", "*:*:*"],
|
||||
},
|
||||
{
|
||||
name: "预报废审核",
|
||||
pic: "/static/preCrashExam.png",
|
||||
url: "preCrashExam",
|
||||
isShow: ["forecast:waste:auditing", "*:*:*"],
|
||||
},
|
||||
{
|
||||
name: "预报废列表",
|
||||
|
|
@ -130,11 +149,17 @@
|
|||
name: "报废审核",
|
||||
pic: "/static/crashExam.png",
|
||||
url: "crashExam",
|
||||
isShow: ["scrap:auditing", "*:*:*"],
|
||||
},
|
||||
{
|
||||
name: "试验检验审核",
|
||||
pic: "/static/testExam.png",
|
||||
url: "testExam",
|
||||
isShow: [
|
||||
"service:batch:auditing",
|
||||
"service:auditing",
|
||||
"*:*:*",
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "IOT设备绑定",
|
||||
|
|
@ -142,9 +167,23 @@
|
|||
url: "IOTBinding",
|
||||
},
|
||||
],
|
||||
store: store.state.permissions || [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
btnIsShow(part) {
|
||||
let isShow = false;
|
||||
try {
|
||||
part.isShow.forEach((e) => {
|
||||
if (store.includes(e)) {
|
||||
isShow = true;
|
||||
throw new Error();
|
||||
}
|
||||
});
|
||||
} catch (error) {}
|
||||
|
||||
return isShow;
|
||||
},
|
||||
iconClick() {
|
||||
console.log(this.iptVal);
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue