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