| | |
| | | </up-grid> |
| | | </view> |
| | | </view> |
| | | <!-- 质量管理模块 --> |
| | | <view class="common-module collaboration-module" |
| | | v-if="hasQualityItems"> |
| | | <view class="module-header"> |
| | | <view class="module-title-container"> |
| | | <text class="module-title">质量管理</text> |
| | | </view> |
| | | </view> |
| | | <view class="module-content"> |
| | | <up-grid :border="false" |
| | | col="4"> |
| | | <up-grid-item v-for="(item, index) in qualityItems" |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container" |
| | | :style="{ background: item.bgColor }"> |
| | | <up-icon :name="item.icon" |
| | | :size="58" |
| | | color="#ffffff"></up-icon> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | | </up-grid> |
| | | </view> |
| | | </view> |
| | | <!-- 人力资源模块 --> |
| | | <view class="common-module collaboration-module" |
| | | v-if="hasHumanResourcesItems"> |
| | |
| | | label: "合同管理", |
| | | }, |
| | | ]); |
| | | const qualityItems = reactive([ |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "原材料检验", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "过程检验", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | | label: "出厂检验", |
| | | }, |
| | | ]); |
| | | const safetyItems = reactive([ |
| | | { |
| | | icon: "/static/images/icon/caigoutaizhang@2x.png", |
| | |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/xunjianshangchuan@2x.png", |
| | | label: "巡检上传", |
| | | label: "巡检管理", |
| | | }, |
| | | ]); |
| | | |
| | |
| | | url: "/pages/equipmentManagement/upkeep/index", |
| | | }); |
| | | break; |
| | | case "巡检上传": |
| | | case "巡检管理": |
| | | uni.navigateTo({ |
| | | url: "/pages/inspectionUpload/index", |
| | | }); |
| | |
| | | case "合同管理": |
| | | uni.navigateTo({ |
| | | url: "/pages/humanResources/contractManagement/index", |
| | | }); |
| | | break; |
| | | case "原材料检验": |
| | | uni.navigateTo({ |
| | | url: "/pages/qualityManagement/materialInspection/index", |
| | | }); |
| | | break; |
| | | case "过程检验": |
| | | uni.navigateTo({ |
| | | url: "/pages/qualityManagement/processInspection/index", |
| | | }); |
| | | break; |
| | | case "出厂检验": |
| | | uni.navigateTo({ |
| | | url: "/pages/qualityManagement/finalInspection/index", |
| | | }); |
| | | break; |
| | | default: |
| | |
| | | ...filteredHumanResources |
| | | ); |
| | | |
| | | // 过滤质量管理菜单 |
| | | const originalQuality = [ |
| | | { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "原材料检验" }, |
| | | { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "过程检验" }, |
| | | { icon: "/static/images/icon/caigoutaizhang@2x.png", label: "出厂检验" }, |
| | | ]; |
| | | const filteredQuality = originalQuality.filter(item => { |
| | | return allowedMenuTitles.has(item.label); |
| | | }); |
| | | qualityItems.splice(0, qualityItems.length, ...filteredQuality); |
| | | |
| | | // 过滤生产管控菜单 |
| | | const originalProduction = [ |
| | | { |
| | |
| | | { icon: "/static/images/icon/shbeibaoxiu@2x.png", label: "运行管理" }, |
| | | { icon: "/static/images/icon/shbeibaoxiu@2x.png", label: "设备报修" }, |
| | | { icon: "/static/images/icon/shbeibaoyang@2x.png", label: "设备保养" }, |
| | | { icon: "/static/images/icon/xunjianshangchuan@2x.png", label: "巡检上传" }, |
| | | { icon: "/static/images/icon/xunjianshangchuan@2x.png", label: "巡检管理" }, |
| | | ]; |
| | | const filteredEquipment = originalEquipment.filter(item => { |
| | | return allowedMenuTitles.has(item.label); |
| | |
| | | const hasPurchaseItems = computed(() => purchaseItems.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 hasProductionItems = computed(() => productionItems.length > 0); |
| | | const hasEquipmentItems = computed(() => equipmentItems.length > 0); |