| | |
| | | :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> |
| | | </view> |
| | | <!-- 人力资源模块 --> |
| | | <!-- 人力资源模块(已注释) |
| | | <view class="common-module collaboration-module" |
| | | v-if="hasHumanResourcesItems"> |
| | | <view class="module-header"> |
| | |
| | | </up-grid> |
| | | </view> |
| | | </view> |
| | | <!-- 生产管控模块 --> |
| | | --> |
| | | <!-- 生产管控模块(已注释) |
| | | <view class="common-module equipment-module" |
| | | v-if="hasProductionItems"> |
| | | <view class="module-header"> |
| | |
| | | </up-grid> |
| | | </view> |
| | | </view> |
| | | --> |
| | | <!-- 财务管理模块 --> |
| | | <view class="common-module finance-module" |
| | | v-if="hasFinanceManagementItems"> |
| | |
| | | :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 humanResourcesItems = reactive([ |
| | | { |
| | | icon: "/static/images/icon/dakaqiandao.svg", |
| | | label: "打卡签到", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/renyuanxinzi.svg", |
| | | label: "人员薪资", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/hetongguanli.svg", |
| | | label: "合同管理", |
| | | }, |
| | | ]); |
| | | // 人力资源模块(已注释) |
| | | const humanResourcesItems = reactive([]); |
| | | // const humanResourcesItems = reactive([ |
| | | // { |
| | | // icon: "/static/images/icon/dakaqiandao.svg", |
| | | // label: "打卡签到", |
| | | // }, |
| | | // { |
| | | // icon: "/static/images/icon/renyuanxinzi.svg", |
| | | // label: "人员薪资", |
| | | // }, |
| | | // { |
| | | // icon: "/static/images/icon/hetongguanli.svg", |
| | | // label: "合同管理", |
| | | // }, |
| | | // ]); |
| | | const qualityItems = reactive([ |
| | | { |
| | | icon: "/static/images/icon/yuancailiaojianyan.svg", |
| | |
| | | }, |
| | | ]); |
| | | |
| | | // 生产管控功能数据 |
| | | const productionItems = reactive([ |
| | | // { |
| | | // icon: "/static/images/icon/shengchandingdan@2x.svg", |
| | | // label: "生产订单", |
| | | // }, |
| | | // { |
| | | // icon: "/static/images/icon/shengchanpaigong@2x.svg", |
| | | // label: "生产派工", |
| | | // }, |
| | | // { |
| | | // icon: "/static/images/icon/shengchanpaichan@2x.svg", |
| | | // label: "工序排产", |
| | | // }, |
| | | { |
| | | icon: "/static/images/icon/shengchanbaogong.svg", |
| | | label: "生产报工", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/shengchanbaogong.svg", |
| | | label: "生产工单", |
| | | }, |
| | | // { |
| | | // icon: "/static/images/icon/shengchanhesuan@2x.svg", |
| | | // label: "生产核算", |
| | | // }, |
| | | ]); |
| | | // 生产管控模块(已注释) |
| | | const productionItems = reactive([]); |
| | | // // 生产管控功能数据 |
| | | // const productionItems = reactive([ |
| | | // { |
| | | // icon: "/static/images/icon/shengchandingdan@2x.svg", |
| | | // label: "生产订单", |
| | | // }, |
| | | // { |
| | | // icon: "/static/images/icon/shengchanpaigong@2x.svg", |
| | | // label: "生产派工", |
| | | // }, |
| | | // { |
| | | // icon: "/static/images/icon/shengchanpaichan@2x.svg", |
| | | // label: "工序排产", |
| | | // }, |
| | | // { |
| | | // icon: "/static/images/icon/shengchanbaogong.svg", |
| | | // label: "生产报工", |
| | | // }, |
| | | // { |
| | | // icon: "/static/images/icon/shengchanbaogong.svg", |
| | | // label: "生产工单", |
| | | // }, |
| | | // { |
| | | // icon: "/static/images/icon/shengchanhesuan@2x.svg", |
| | | // label: "生产核算", |
| | | // }, |
| | | // ]); |
| | | |
| | | // 设备管理功能数据 |
| | | const equipmentItems = reactive([ |
| | | // { |
| | | // icon: '/static/images/icon/shebeitaizhang@2x.svg', |
| | | // label: '设备台账', |
| | | // }, |
| | | { |
| | | icon: "/static/images/icon/shengchanbaogong.svg", |
| | | label: "设备台账", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/yunxingguanli.svg", |
| | | label: "运行管理", |
| | |
| | | }); |
| | | } |
| | | }; |
| | | 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 hasProductionItems = computed(() => productionItems.length > 0); |
| | | // const hasHumanResourcesItems = computed(() => humanResourcesItems.length > 0); |
| | | const hasWarehouseLogisticsItems = computed( |
| | | () => warehouseLogisticsItems.length > 0 |
| | | ); |
| | | // const hasProductionItems = computed(() => productionItems.length > 0); |
| | | const hasEquipmentItems = computed(() => equipmentItems.length > 0); |
| | | |
| | | onMounted(() => { |