| | |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container"> |
| | | <image :src="item.icon" class="item-icon"></image> |
| | | <image :src="item.icon" |
| | | class="item-icon"></image> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container"> |
| | | <image :src="item.icon" class="item-icon"></image> |
| | | <image :src="item.icon" |
| | | class="item-icon"></image> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container"> |
| | | <image :src="item.icon" class="item-icon"></image> |
| | | <image :src="item.icon" |
| | | class="item-icon"></image> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container"> |
| | | <image :src="item.icon" class="item-icon"></image> |
| | | <image :src="item.icon" |
| | | class="item-icon"></image> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | | <up-grid-item @click="jumpUrl('/pages/inventoryManagement/scanIn/index')"> |
| | | <view class="icon-container"> |
| | | <image src="/static/images/icon/scanIn.svg" |
| | | class="item-icon"></image> |
| | | </view> |
| | | <text class="item-label">扫码入库</text> |
| | | </up-grid-item> |
| | | <up-grid-item @click="jumpUrl('/pages/inventoryManagement/scanOut/index')"> |
| | | <view class="icon-container"> |
| | | <image src="/static/images/icon/scanOut.svg" |
| | | class="item-icon"></image> |
| | | </view> |
| | | <text class="item-label">扫码出库</text> |
| | | </up-grid-item> |
| | | </up-grid> |
| | | </view> |
| | |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container"> |
| | | <image :src="item.icon" class="item-icon"></image> |
| | | <image :src="item.icon" |
| | | class="item-icon"></image> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container"> |
| | | <image :src="item.icon" class="item-icon"></image> |
| | | <image :src="item.icon" |
| | | class="item-icon"></image> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container"> |
| | | <image :src="item.icon" class="item-icon"></image> |
| | | <image :src="item.icon" |
| | | class="item-icon"></image> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container"> |
| | | <image :src="item.icon" class="item-icon"></image> |
| | | <image :src="item.icon" |
| | | class="item-icon"></image> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container"> |
| | | <image :src="item.icon" class="item-icon"></image> |
| | | <image :src="item.icon" |
| | | class="item-icon"></image> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container"> |
| | | <image :src="item.icon" class="item-icon"></image> |
| | | <image :src="item.icon" |
| | | class="item-icon"></image> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | |
| | | // 设备管理功能数据 |
| | | const equipmentItems = reactive([ |
| | | { |
| | | icon: '/static/images/icon/shengchanbaogong.svg', |
| | | label: '设备台账', |
| | | icon: "/static/images/icon/shengchanbaogong.svg", |
| | | label: "设备台账", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/yunxingguanli.svg", |
| | |
| | | }); |
| | | } |
| | | }; |
| | | const jumpUrl = url => { |
| | | uni.navigateTo({ |
| | | url: url, |
| | | }); |
| | | }; |
| | | |
| | | // 创建对子组件的引用 |
| | | const uToastRef = ref(null); |
| | |
| | | |
| | | // 定义菜单配置映射 |
| | | const menuMapping = { |
| | | collaboration: { target: collaborationItems, specialMapping: { "规章制度": "规章制度管理" } }, |
| | | archiveManagement: { target: archiveManagementItems, specialMapping: { "供应商档案": "供应商管理" } }, |
| | | collaboration: { |
| | | target: collaborationItems, |
| | | specialMapping: { 规章制度: "规章制度管理" }, |
| | | }, |
| | | archiveManagement: { |
| | | target: archiveManagementItems, |
| | | specialMapping: { 供应商档案: "供应商管理" }, |
| | | }, |
| | | }; |
| | | console.log(allowedMenuTitles) |
| | | console.log(allowedMenuTitles); |
| | | // 通用过滤函数 |
| | | const filterArray = (targetArray, specialMapping) => { |
| | | const filtered = targetArray.filter(item => { |
| | |
| | | filterArray(marketingItems); |
| | | filterArray(purchaseItems); |
| | | filterArray(financeManagementItems); |
| | | filterArray(archiveManagementItems, menuMapping.archiveManagement.specialMapping); |
| | | filterArray( |
| | | archiveManagementItems, |
| | | menuMapping.archiveManagement.specialMapping |
| | | ); |
| | | filterArray(collaborationItems, menuMapping.collaboration.specialMapping); |
| | | filterArray(safetyItems); |
| | | filterArray(humanResourcesItems); |
| | |
| | | // 检查模块是否有菜单项需要显示 |
| | | const hasMarketingItems = computed(() => marketingItems.length > 0); |
| | | const hasPurchaseItems = computed(() => purchaseItems.length > 0); |
| | | const hasFinanceManagementItems = computed(() => financeManagementItems.length > 0); |
| | | const hasArchiveManagementItems = computed(() => archiveManagementItems.length > 0); |
| | | const hasAfterSalesServiceItems = computed(() => afterSalesServiceItems.length > 0); |
| | | const hasFinanceManagementItems = computed( |
| | | () => financeManagementItems.length > 0 |
| | | ); |
| | | const hasArchiveManagementItems = computed( |
| | | () => archiveManagementItems.length > 0 |
| | | ); |
| | | const hasAfterSalesServiceItems = computed( |
| | | () => afterSalesServiceItems.length > 0 |
| | | ); |
| | | const hasCollaborationItems = computed(() => collaborationItems.length > 0); |
| | | const hasSafetyItems = computed(() => safetyItems.length > 0); |
| | | const hasQualityItems = computed(() => qualityItems.length > 0); |
| | | // const hasHumanResourcesItems = computed(() => humanResourcesItems.length > 0); |
| | | const hasWarehouseLogisticsItems = computed(() => warehouseLogisticsItems.length > 0); |
| | | const hasWarehouseLogisticsItems = computed( |
| | | () => warehouseLogisticsItems.length > 0 |
| | | ); |
| | | // const hasProductionItems = computed(() => productionItems.length > 0); |
| | | const hasEquipmentItems = computed(() => equipmentItems.length > 0); |
| | | |