| | |
| | | </view> |
| | | </view> |
| | | <!-- 人力资源模块 --> |
| | | <view class="common-module collaboration-module" |
| | | v-if="hasHumanResourcesItems"> |
| | | <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 humanResourcesItems" |
| | | :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="hasHumanResourcesItems">--> |
| | | <!-- <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 humanResourcesItems"--> |
| | | <!-- :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 equipment-module" |
| | | v-if="hasProductionItems"> |
| | |
| | | </up-grid> |
| | | </view> |
| | | </view> |
| | | <!-- 档案管理模块 --> |
| | | <view class="common-module archive-module" |
| | | v-if="hasArchiveManagementItems"> |
| | | <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 archiveManagementItems" |
| | | :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 after-sales-module" |
| | | v-if="hasAfterSalesServiceItems"> |
| | | <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 afterSalesServiceItems" |
| | | :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 after-sales-module"--> |
| | | <!-- v-if="hasAfterSalesServiceItems">--> |
| | | <!-- <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 afterSalesServiceItems"--> |
| | | <!-- :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="hasQualityItems"> |
| | |
| | | </view> |
| | | </view> |
| | | <!-- 安全生产模块 --> |
| | | <view class="common-module collaboration-module" |
| | | v-if="hasSafetyItems"> |
| | | <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 safetyItems" |
| | | :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">--> |
| | | <!-- <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 safetyItems"--> |
| | | <!-- :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>--> |
| | | |
| | | <DownloadProgressMask /> |
| | | </view> |
| | |
| | | const marketingItems = reactive([ |
| | | { |
| | | icon: "/static/images/icon/kehudangan.svg", |
| | | label: "客户档案", |
| | | label: "客户档案(私海)", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/xiaoshoubaojia.svg", |
| | |
| | | { |
| | | icon: "/static/images/icon/gongyingshangwanglai.svg", |
| | | label: "供应商往来", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/gongyingshangdangan.svg", |
| | | label: "供应商档案", |
| | | }, |
| | | { |
| | | icon: "/static/images/icon/caigouguanli.svg", |
| | |
| | | { |
| | | icon: "/static/images/icon/jiekuanguanli.svg", |
| | | label: "借款管理", |
| | | }, |
| | | ]); |
| | | |
| | | // 档案管理功能数据 |
| | | const archiveManagementItems = reactive([ |
| | | { |
| | | icon: "/static/images/icon/gongyingshangdangan.svg", |
| | | label: "供应商档案", |
| | | }, |
| | | ]); |
| | | |
| | |
| | | const handleCommonItemClick = item => { |
| | | // 根据不同的功能项进行跳转 |
| | | switch (item.label) { |
| | | case "客户档案": |
| | | case "客户档案(私海)": |
| | | uni.navigateTo({ |
| | | url: "/pages/basicData/customerFile/index", |
| | | }); |
| | |
| | | |
| | | // 定义菜单配置映射 |
| | | const menuMapping = { |
| | | purchase: { target: purchaseItems, specialMapping: { "供应商档案": "供应商管理" } }, |
| | | collaboration: { target: collaborationItems, specialMapping: { "规章制度": "规章制度管理" } }, |
| | | archiveManagement: { target: archiveManagementItems, specialMapping: { "供应商档案": "供应商管理" } }, |
| | | }; |
| | | console.log(allowedMenuTitles) |
| | | // 通用过滤函数 |
| | |
| | | |
| | | // 过滤各个模块 |
| | | filterArray(marketingItems); |
| | | filterArray(purchaseItems); |
| | | filterArray(purchaseItems, menuMapping.purchase.specialMapping); |
| | | filterArray(financeManagementItems); |
| | | 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 hasCollaborationItems = computed(() => collaborationItems.length > 0); |
| | | const hasSafetyItems = computed(() => safetyItems.length > 0); |