| | |
| | | </up-grid> |
| | | </view> |
| | | </view> |
| | | <!-- 项目管理模块 --> |
| | | <view class="common-module project-module" |
| | | v-if="hasProjectItems"> |
| | | <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 projectItems" |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container"> |
| | | <image :src="item.icon" |
| | | class="item-icon"></image> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | | </up-grid> |
| | | </view> |
| | | </view> |
| | | <!-- 营销管理模块 --> |
| | | <view class="common-module marketing-module" |
| | | v-if="hasMarketingItems"> |
| | |
| | | </up-grid> |
| | | </view> |
| | | </view> |
| | | <!-- 车辆管理模块 --> |
| | | <view class="common-module vehicle-module" |
| | | v-if="hasVehicleItems"> |
| | | <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 vehicleItems" |
| | | :key="index" |
| | | @click="handleCommonItemClick(item)"> |
| | | <view class="icon-container"> |
| | | <image :src="item.icon" |
| | | class="item-icon"></image> |
| | | </view> |
| | | <text class="item-label">{{item.label}}</text> |
| | | </up-grid-item> |
| | | </up-grid> |
| | | </view> |
| | | </view> |
| | | <!-- 安全生产模块 --> |
| | | <view class="common-module collaboration-module" |
| | | v-if="hasSafetyItems"> |
| | |
| | | }, |
| | | ]); |
| | | |
| | | // 项目管理功能数据 |
| | | const projectItems = reactive([ |
| | | { |
| | | icon: "/static/images/icon/xiangmuguanli.svg", |
| | | label: "项目管理", |
| | | }, |
| | | ]); |
| | | |
| | | // 车辆管理功能数据 |
| | | const vehicleItems = reactive([ |
| | | { |
| | | icon: "/static/images/icon/cheliangguanli.svg", |
| | | label: "车辆管理", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/jiayoukaguanli.svg", |
| | | label: "加油卡管理", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/jiayoujilu.svg", |
| | | label: "加油记录", |
| | | }, |
| | | ]); |
| | | |
| | | // 营销管理功能数据 |
| | | const marketingItems = reactive([ |
| | | { |
| | |
| | | { |
| | | icon: "/static/images/icon/kehuwanglai.svg", |
| | | label: "客户往来", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/zhaotoubiaoguanli.svg", |
| | | label: "招投标管理", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/susongguanli.svg", |
| | | label: "诉讼管理", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/fahuotaizhang.svg", |
| | | label: "发货台账", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/hetongguanli.svg", |
| | | label: "销售合同", |
| | | }, |
| | | ]); |
| | | |
| | |
| | | icon: "/static/images/icon/chuchangjianyan.svg", |
| | | label: "出厂检验", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/baobiaoguanli.svg", |
| | | label: "报表管理", |
| | | }, |
| | | ]); |
| | | const safetyItems = reactive([ |
| | | { |
| | |
| | | icon: "/static/images/icon/baoxiaoguanli.svg", |
| | | label: "费用报销", |
| | | path: "/pages/oa/ReimburseManage/cost-reimburse/index", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/kuandaiyutongxin.svg", |
| | | label: "宽带与通信管理", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/fangwuzulin.svg", |
| | | label: "房屋租赁管理", |
| | | }, |
| | | ]); |
| | | |
| | |
| | | case "客户往来": |
| | | uni.navigateTo({ |
| | | url: "/pages/sales/receiptPaymentLedger/index", |
| | | }); |
| | | break; |
| | | case "项目管理": |
| | | uni.navigateTo({ |
| | | url: "/pages/projectManagement/project/index", |
| | | }); |
| | | break; |
| | | case "招投标管理": |
| | | uni.navigateTo({ |
| | | url: "/pages/sales/biddingManagement/index", |
| | | }); |
| | | break; |
| | | case "诉讼管理": |
| | | uni.navigateTo({ |
| | | url: "/pages/sales/lawsuitManagement/index", |
| | | }); |
| | | break; |
| | | case "发货台账": |
| | | uni.navigateTo({ |
| | | url: "/pages/sales/deliveryLedger/index", |
| | | }); |
| | | break; |
| | | case "销售合同": |
| | | uni.navigateTo({ |
| | | url: "/pages/sales/contractManagement/index", |
| | | }); |
| | | break; |
| | | case "报表管理": |
| | | uni.navigateTo({ |
| | | url: "/pages/qualityManagement/inspectionReport/index", |
| | | }); |
| | | break; |
| | | case "车辆管理": |
| | | uni.navigateTo({ |
| | | url: "/pages/inventoryManagement/vehicleInfo/index", |
| | | }); |
| | | break; |
| | | case "加油卡管理": |
| | | uni.navigateTo({ |
| | | url: "/pages/inventoryManagement/fuelCard/index", |
| | | }); |
| | | break; |
| | | case "加油记录": |
| | | uni.navigateTo({ |
| | | url: "/pages/inventoryManagement/fuelRecord/index", |
| | | }); |
| | | break; |
| | | case "宽带与通信管理": |
| | | uni.navigateTo({ |
| | | url: "/pages/cooperativeOffice/broadbandCommunication/index", |
| | | }); |
| | | break; |
| | | case "房屋租赁管理": |
| | | uni.navigateTo({ |
| | | url: "/pages/cooperativeOffice/houseLeaseManagement/index", |
| | | }); |
| | | break; |
| | | case "采购台账": |
| | |
| | | specialMapping: { 规章制度: "规章制度管理" }, |
| | | }, |
| | | purchase: { specialMapping: { 供应商档案: "供应商管理" } }, |
| | | // 手机端人事模块已占用「合同管理」label(走 /staff/staffContract), |
| | | // 销售合同改用「销售合同」label,此处映射回后端的菜单标题 |
| | | marketing: { specialMapping: { 销售合同: "合同管理" } }, |
| | | }; |
| | | console.log(allowedMenuTitles); |
| | | // 通用过滤函数 |
| | |
| | | }; |
| | | |
| | | // 过滤各个模块 |
| | | filterArray(marketingItems); |
| | | filterArray(marketingItems, menuMapping.marketing.specialMapping); |
| | | filterArray(designItems); |
| | | filterArray(purchaseItems, menuMapping.purchase.specialMapping); |
| | | filterArray(financeManagementItems); |
| | |
| | | filterArray(equipmentItems); |
| | | filterArray(archiveManagementItems); |
| | | filterArray(afterSalesServiceItems); |
| | | filterArray(projectItems); |
| | | filterArray(vehicleItems); |
| | | }; |
| | | |
| | | // 检查模块是否有菜单项需要显示 |
| | |
| | | const hasArchiveManagementItems = computed( |
| | | () => archiveManagementItems.length > 0 |
| | | ); |
| | | const hasProjectItems = computed(() => projectItems.length > 0); |
| | | const hasVehicleItems = computed(() => vehicleItems.length > 0); |
| | | |
| | | onMounted(() => { |
| | | // 每次进入首页都强制刷新用户信息和路由权限,不做本地缓存判断 |
| | |
| | | --module-color: #9c27b0; |
| | | } |
| | | |
| | | .project-module { |
| | | --module-color: #0066ff; |
| | | } |
| | | |
| | | .vehicle-module { |
| | | --module-color: #ff8a3d; |
| | | } |
| | | |
| | | .module-header { |
| | | margin-bottom: 10px; |
| | | display: flex; |
| | |
| | | --module-color: #9c27b0; |
| | | } |
| | | |
| | | .project-module { |
| | | --module-color: #0066ff; |
| | | } |
| | | |
| | | .vehicle-module { |
| | | --module-color: #ff8a3d; |
| | | } |
| | | |
| | | .module-header { |
| | | margin-bottom: 18px; |
| | | padding-left: 18px; |