|
|
@@ -6,7 +6,7 @@
|
|
|
</view> -->
|
|
|
<!-- 快捷功能卡片 -->
|
|
|
<view class="quick-cards">
|
|
|
- <view v-for="(item, index) in quickFunctions" :key="index" class="quick-card" @click="handleQuickClick(item)">
|
|
|
+ <view v-for="(item, index) in filteredQuickFunctions" :key="index" class="quick-card" @click="handleQuickClick(item)">
|
|
|
<image class="quick-card-bg" :src="item.bgImage" mode="aspectFill"></image>
|
|
|
<view class="quick-card-content">
|
|
|
<text class="quick-card-title">{{ item.title }}</text>
|
|
|
@@ -80,6 +80,7 @@
|
|
|
icon: string
|
|
|
path: string
|
|
|
badge:number
|
|
|
+ permission: string
|
|
|
}
|
|
|
const receiveListData = ref<UTSJSONObject[]>([])
|
|
|
const receiveLoading = ref<boolean>(false)
|
|
|
@@ -88,15 +89,15 @@
|
|
|
let refreshTimer: number | null = null
|
|
|
let timerLock = false
|
|
|
|
|
|
- // 快捷功能列表
|
|
|
- const quickFunctions = ref<QuickFunction[]>([
|
|
|
+ const quickFunctions = ref<QuickFunction[]>([
|
|
|
{
|
|
|
id: 1,
|
|
|
title: '物料申请',
|
|
|
bgImage: '/static/images/workbench/3.png',
|
|
|
icon: '',
|
|
|
path: '/pages/apply/index',
|
|
|
- badge: 0
|
|
|
+ badge: 0,
|
|
|
+ permission: 'mes:wm:purchaseApply:list'
|
|
|
},
|
|
|
{
|
|
|
id: 2,
|
|
|
@@ -104,7 +105,8 @@
|
|
|
bgImage: '/static/images/workbench/2.png',
|
|
|
icon: '',
|
|
|
path: '/pages/out/index',
|
|
|
- badge: 0
|
|
|
+ badge: 0,
|
|
|
+ permission: 'mes:wm:productsalse:list'
|
|
|
},
|
|
|
{
|
|
|
id: 3,
|
|
|
@@ -112,7 +114,8 @@
|
|
|
bgImage: '/static/images/workbench/4.png',
|
|
|
icon: '',
|
|
|
path: '/pages/item/index',
|
|
|
- badge: 0
|
|
|
+ badge: 0,
|
|
|
+ permission: 'mes:md:mditem:list'
|
|
|
},
|
|
|
{
|
|
|
id: 4,
|
|
|
@@ -120,15 +123,17 @@
|
|
|
bgImage: '/static/images/workbench/5.png',
|
|
|
icon: '',
|
|
|
path: '/pages/pro/index',
|
|
|
- badge: 0
|
|
|
+ badge: 0,
|
|
|
+ permission: 'mes:pro:proreport:list'
|
|
|
},
|
|
|
{
|
|
|
id: 5,
|
|
|
- title: '质检',
|
|
|
+ title: '采购订单',
|
|
|
bgImage: '/static/images/workbench/6.png',
|
|
|
icon: '',
|
|
|
path: '/pages/quality/index',
|
|
|
- badge: 0
|
|
|
+ badge: 0,
|
|
|
+ permission: 'wm:purchase:list'
|
|
|
},
|
|
|
{
|
|
|
id: 6,
|
|
|
@@ -136,9 +141,19 @@
|
|
|
bgImage: '/static/images/workbench/7.png',
|
|
|
icon: '',
|
|
|
path: '/pages/warehouse/index',
|
|
|
- badge: 0
|
|
|
+ badge: 0,
|
|
|
+ permission: 'mes:wm:productrecpt:list'
|
|
|
}
|
|
|
])
|
|
|
+
|
|
|
+ const filteredQuickFunctions = computed(() => {
|
|
|
+ return quickFunctions.value.filter(item => {
|
|
|
+ if (!item.permission || item.permission.length === 0) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return checkPermission(item.permission)
|
|
|
+ })
|
|
|
+ })
|
|
|
|
|
|
// 快捷功能点击
|
|
|
const handleQuickClick = (item: QuickFunction): void => {
|