refactor(permission): 移除查询按钮权限并按菜单过滤首页
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import type { RouteRecordRaw } from 'vue-router'; |
| | | |
| | | import { computed } from 'vue'; |
| | | |
| | | import { useAccessStore } from '@vben/stores'; |
| | | |
| | | export const QUALITY_MENU_ROUTES = [ |
| | | 'MesQcIqc', |
| | | 'MesQcIpqc', |
| | | 'MesQcOqc', |
| | | 'MesQcRqc', |
| | | ] as const; |
| | | |
| | | export function collectAccessibleRouteNames(routes: RouteRecordRaw[]): Set<string> { |
| | | const names = new Set<string>(); |
| | | const visit = (items: RouteRecordRaw[]) => { |
| | | for (const route of items) { |
| | | if (typeof route.name === 'string') { |
| | | names.add(route.name); |
| | | } |
| | | if (route.children) { |
| | | visit(route.children); |
| | | } |
| | | } |
| | | }; |
| | | visit(routes); |
| | | return names; |
| | | } |
| | | |
| | | export function useMenuAccess() { |
| | | const accessStore = useAccessStore(); |
| | | const routeNames = computed(() => collectAccessibleRouteNames(accessStore.accessRoutes)); |
| | | |
| | | function firstAccessibleRoute(names: readonly string[]) { |
| | | return names.find((name) => routeNames.value.has(name)); |
| | | } |
| | | |
| | | function hasMenuAccess(names: readonly string[]) { |
| | | return firstAccessibleRoute(names) !== undefined; |
| | | } |
| | | |
| | | return { firstAccessibleRoute, hasMenuAccess }; |
| | | } |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['aftersales:compensation:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: 'åæ®µ', |
| | | type: 'link', |
| | | icon: ACTION_ICON.BOOK, |
| | | auth: ['ai:knowledge:query'], |
| | | onClick: handleSegment.bind(null, row.id), |
| | | }, |
| | | { |
| | |
| | | label: $t('ui.widgets.document'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.BOOK, |
| | | auth: ['ai:knowledge:query'], |
| | | onClick: handleDocument.bind(null, row.id), |
| | | }, |
| | | { |
| | | label: 'å¬åæµè¯', |
| | | type: 'link', |
| | | icon: ACTION_ICON.SEARCH, |
| | | auth: ['ai:knowledge:query'], |
| | | onClick: handleRetrieval.bind(null, row.id), |
| | | }, |
| | | { |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['bpm:form:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['bpm:oa-notice:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['bpm:process-instance:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['bpm:process-instance:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: '详æ
', |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['bpm:process-instance:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['bpm:task:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: 'åå²', |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['bpm:task:query'], |
| | | onClick: handleHistory.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: 'åç', |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['bpm:task:query'], |
| | | onClick: handleAudit.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | { |
| | | label: 'æ¥ç', |
| | | type: 'link', |
| | | auth: ['crm:cancellation:query'], |
| | | // å®¡æ ¸éè¿åä»
æä¾åªè¯»è¯¦æ
å
¥å£ |
| | | ifShow: row.auditStatus === 20, |
| | | onClick: handleView.bind(null, row), |
| | |
| | | { |
| | | label: 'æ¥ç订å', |
| | | type: 'link', |
| | | auth: ['erp:sale-order:query'], |
| | | onClick: handleViewOrder.bind(null, row), |
| | | ifShow: !!row.orderId, |
| | | }, |
| | |
| | | { |
| | | label: 'æ¥ç', |
| | | type: 'link', |
| | | auth: ['crm:refund:query'], |
| | | // å®¡æ ¸éè¿åä»
æä¾åªè¯»è¯¦æ
å
¥å£ |
| | | ifShow: row.auditStatus === 20, |
| | | onClick: handleView.bind(null, row), |
| | |
| | | import { useRouter } from 'vue-router'; |
| | | |
| | | import { Page } from '@vben/common-ui'; |
| | | import { useAccess } from '@vben/access'; |
| | | |
| | | import { Card, Col, Row } from 'ant-design-vue'; |
| | | |
| | | import { getHomeSummary } from '#/api/mes/home'; |
| | | import { QUALITY_MENU_ROUTES, useMenuAccess } from '#/utils/menu-access'; |
| | | |
| | | import { defaultSummary } from './data'; |
| | | import AlertPanel from './modules/alert-panel.vue'; |
| | |
| | | defineOptions({ name: 'DashboardAnalytics' }); |
| | | |
| | | const router = useRouter(); |
| | | const { hasAccessByCodes } = useAccess(); |
| | | const { hasMenuAccess } = useMenuAccess(); |
| | | const summary = ref(defaultSummary); |
| | | |
| | | const canViewProduction = computed(() => |
| | | hasAccessByCodes(['mes:pro-work-order:query', 'mes:pro-feedback:query']), |
| | | hasMenuAccess(['MesProWorkOrder', 'MesProFeedback']), |
| | | ); |
| | | const canViewAlerts = computed(() => |
| | | hasAccessByCodes([ |
| | | 'mes:pro-work-order:query', |
| | | 'mes:pro-andon-record:query', |
| | | 'mes:dv-repair:query', |
| | | hasMenuAccess([ |
| | | 'MesProWorkOrder', |
| | | 'MesProAndonRecord', |
| | | 'MesDvRepair', |
| | | ]), |
| | | ); |
| | | const canViewMesSummary = computed(() => |
| | | hasAccessByCodes([ |
| | | 'mes:pro-work-order:query', |
| | | 'mes:pro-feedback:query', |
| | | 'mes:qc-ipqc:query', |
| | | 'mes:dv-machinery:query', |
| | | 'mes:pro-andon-record:query', |
| | | 'mes:dv-repair:query', |
| | | hasMenuAccess([ |
| | | 'MesProWorkOrder', |
| | | 'MesProFeedback', |
| | | ...QUALITY_MENU_ROUTES, |
| | | 'MesDvMachinery', |
| | | 'MesProAndonRecord', |
| | | 'MesDvRepair', |
| | | ]), |
| | | ); |
| | | |
| | |
| | | import { computed, onMounted, ref } from 'vue'; |
| | | |
| | | import { CountTo } from '@vben/common-ui'; |
| | | import { useAccess } from '@vben/access'; |
| | | import { IconifyIcon } from '@vben/icons'; |
| | | import { EchartsUI, useEcharts } from '@vben/plugins/echarts'; |
| | | |
| | | import { Spin } from 'ant-design-vue'; |
| | | |
| | | import { getWorkOrderStatusDistribution } from '#/api/mes/home'; |
| | | import { useMenuAccess } from '#/utils/menu-access'; |
| | | |
| | | defineOptions({ name: 'DashboardAlertPanel' }); |
| | | |
| | |
| | | const emit = defineEmits<{ |
| | | navigate: [name: string]; |
| | | }>(); |
| | | const { hasAccessByCodes } = useAccess(); |
| | | const canViewWorkOrder = computed(() => hasAccessByCodes(['mes:pro-work-order:query'])); |
| | | const canViewAndon = computed(() => hasAccessByCodes(['mes:pro-andon-record:query'])); |
| | | const canViewRepair = computed(() => hasAccessByCodes(['mes:dv-repair:query'])); |
| | | const { hasMenuAccess } = useMenuAccess(); |
| | | const canViewWorkOrder = computed(() => hasMenuAccess(['MesProWorkOrder'])); |
| | | const canViewAndon = computed(() => hasMenuAccess(['MesProAndonRecord'])); |
| | | const canViewRepair = computed(() => hasMenuAccess(['MesDvRepair'])); |
| | | |
| | | const chartRef = ref<EchartsUIType>(); |
| | | const { renderEcharts } = useEcharts(chartRef); |
| | |
| | | <script lang="ts" setup> |
| | | import { onMounted, ref } from 'vue'; |
| | | import { computed, onMounted, ref } from 'vue'; |
| | | |
| | | import { useAccess } from '@vben/access'; |
| | | import { CountTo } from '@vben/common-ui'; |
| | | import { IconifyIcon } from '@vben/icons'; |
| | | |
| | |
| | | import { getSaleOrderPage } from '#/api/erp/sale/order'; |
| | | import { getMaterialStockPage } from '#/api/mes/wm/materialstock'; |
| | | import { getTaskTodoPage } from '#/api/bpm/task'; |
| | | import { useMenuAccess } from '#/utils/menu-access'; |
| | | |
| | | defineOptions({ name: 'DashboardBizCards' }); |
| | | |
| | | const emit = defineEmits<{ |
| | | navigate: [name: string]; |
| | | }>(); |
| | | const { hasAccessByCodes } = useAccess(); |
| | | const canPurchase = hasAccessByCodes(['erp:purchase-order:query']); |
| | | const canSale = hasAccessByCodes(['erp:sale-order:query']); |
| | | const canStock = hasAccessByCodes(['mes:wm-material-stock:query']); |
| | | const canBpmTodo = hasAccessByCodes(['bpm:task:query']); |
| | | const { hasMenuAccess } = useMenuAccess(); |
| | | const canPurchase = computed(() => hasMenuAccess(['ErpPurchaseOrder'])); |
| | | const canSale = computed(() => hasMenuAccess(['ErpSaleOrder'])); |
| | | const canStock = computed(() => hasMenuAccess(['MesWmMaterialStock'])); |
| | | const canBpmTodo = computed(() => hasMenuAccess(['BpmTaskTodo'])); |
| | | |
| | | const purchaseCount = ref(0); |
| | | const saleCount = ref(0); |
| | |
| | | } |
| | | |
| | | onMounted(() => { |
| | | if (canPurchase) loadPurchase(); |
| | | if (canSale) loadSale(); |
| | | if (canStock) loadStock(); |
| | | if (canBpmTodo) loadBpmTodo(); |
| | | if (canPurchase.value) loadPurchase(); |
| | | if (canSale.value) loadSale(); |
| | | if (canStock.value) loadStock(); |
| | | if (canBpmTodo.value) loadBpmTodo(); |
| | | }); |
| | | </script> |
| | | |
| | |
| | | import { computed, ref } from 'vue'; |
| | | |
| | | import { CountTo } from '@vben/common-ui'; |
| | | import { useAccess } from '@vben/access'; |
| | | import { IconifyIcon } from '@vben/icons'; |
| | | |
| | | import { Col, Row } from 'ant-design-vue'; |
| | | import { QUALITY_MENU_ROUTES, useMenuAccess } from '#/utils/menu-access'; |
| | | |
| | | defineOptions({ name: 'DashboardKpiCards' }); |
| | | |
| | | const props = defineProps<{ |
| | | summary: MesHomeApi.Summary; |
| | | }>(); |
| | | const { hasAccessByCodes } = useAccess(); |
| | | const { firstAccessibleRoute, hasMenuAccess } = useMenuAccess(); |
| | | |
| | | const canViewWorkOrder = computed(() => hasAccessByCodes(['mes:pro-work-order:query'])); |
| | | const canViewFeedback = computed(() => hasAccessByCodes(['mes:pro-feedback:query'])); |
| | | const canViewQuality = computed(() => hasAccessByCodes([ |
| | | 'mes:qc-iqc:query', 'mes:qc-ipqc:query', 'mes:qc-oqc:query', 'mes:qc-rqc:query', |
| | | ])); |
| | | const canViewEquipment = computed(() => hasAccessByCodes(['mes:dv-machinery:query'])); |
| | | const canViewWorkOrder = computed(() => hasMenuAccess(['MesProWorkOrder'])); |
| | | const canViewFeedback = computed(() => hasMenuAccess(['MesProFeedback'])); |
| | | const qualityRoute = computed(() => firstAccessibleRoute(QUALITY_MENU_ROUTES)); |
| | | const canViewQuality = computed(() => Boolean(qualityRoute.value)); |
| | | const canViewEquipment = computed(() => hasMenuAccess(['MesDvMachinery'])); |
| | | |
| | | const emit = defineEmits<{ |
| | | navigate: [name: string]; |
| | |
| | | :style="tiltStyle('quality')" |
| | | @mousemove="(e: MouseEvent) => onMouseMove(e, 'quality')" |
| | | @mouseleave="onMouseLeave('quality')" |
| | | @click="emit('navigate', 'MesQcRecord')" |
| | | @click="qualityRoute && emit('navigate', qualityRoute)" |
| | | > |
| | | <div class="relative z-10 flex items-center gap-4 p-5"> |
| | | <div class="flex size-12 flex-shrink-0 items-center justify-center rounded-xl bg-gradient-to-br from-orange-500 to-amber-400 shadow-lg shadow-orange-500/25 transition-transform duration-300 group-hover:scale-110"> |
| | |
| | | <script lang="ts" setup> |
| | | import { computed } from 'vue'; |
| | | |
| | | import { useAccess } from '@vben/access'; |
| | | import { IconifyIcon } from '@vben/icons'; |
| | | |
| | | import { QUALITY_MENU_ROUTES, useMenuAccess } from '#/utils/menu-access'; |
| | | |
| | | defineOptions({ name: 'DashboardQuickActions' }); |
| | | |
| | |
| | | route: string; |
| | | gradient: string; |
| | | shadow: string; |
| | | permissions: string[]; |
| | | routes: readonly string[]; |
| | | } |
| | | |
| | | const { hasAccessByCodes } = useAccess(); |
| | | const { firstAccessibleRoute } = useMenuAccess(); |
| | | const allActions: QuickAction[] = [ |
| | | { title: 'ç产工å', icon: 'lucide:file-text', route: 'MesProWorkOrder', gradient: 'from-blue-500 to-cyan-500', shadow: 'shadow-blue-500/15', permissions: ['mes:pro-work-order:query'] }, |
| | | { title: 'ç产æ¥å·¥', icon: 'lucide:check-square', route: 'MesProFeedback', gradient: 'from-emerald-500 to-green-500', shadow: 'shadow-emerald-500/15', permissions: ['mes:pro-feedback:query'] }, |
| | | { title: 'è´¨æ£ç®¡ç', icon: 'lucide:clipboard-check', route: 'MesQcIqc', gradient: 'from-orange-500 to-amber-500', shadow: 'shadow-orange-500/15', permissions: ['mes:qc-iqc:query', 'mes:qc-ipqc:query', 'mes:qc-oqc:query', 'mes:qc-rqc:query'] }, |
| | | { title: '设å¤å°è´¦', icon: 'lucide:settings', route: 'MesDvMachinery', gradient: 'from-violet-500 to-purple-500', shadow: 'shadow-violet-500/15', permissions: ['mes:dv-machinery:query'] }, |
| | | { title: 'åå·¥æç', icon: 'lucide:calendar-range', route: 'MesCalScheduleDetail', gradient: 'from-cyan-500 to-teal-500', shadow: 'shadow-cyan-500/15', permissions: ['mes:cal-schedule-detail:query'] }, |
| | | { title: 'å®ç¯å¼å«', icon: 'lucide:bell-ring', route: 'MesProAndonRecord', gradient: 'from-red-500 to-rose-500', shadow: 'shadow-red-500/15', permissions: ['mes:pro-andon-record:query'] }, |
| | | { title: 'ç©æåºå', icon: 'lucide:package-search', route: 'MesWmMaterialStock', gradient: 'from-indigo-500 to-blue-500', shadow: 'shadow-indigo-500/15', permissions: ['mes:wm-material-stock:query'] }, |
| | | { title: 'å·¥èºè·¯çº¿', icon: 'lucide:route', route: 'MesProRoute', gradient: 'from-teal-500 to-emerald-500', shadow: 'shadow-teal-500/15', permissions: ['mes:pro-route:query'] }, |
| | | { title: 'ç产工å', icon: 'lucide:file-text', route: 'MesProWorkOrder', gradient: 'from-blue-500 to-cyan-500', shadow: 'shadow-blue-500/15', routes: ['MesProWorkOrder'] }, |
| | | { title: 'ç产æ¥å·¥', icon: 'lucide:check-square', route: 'MesProFeedback', gradient: 'from-emerald-500 to-green-500', shadow: 'shadow-emerald-500/15', routes: ['MesProFeedback'] }, |
| | | { title: 'è´¨æ£ç®¡ç', icon: 'lucide:clipboard-check', route: 'MesQcIqc', gradient: 'from-orange-500 to-amber-500', shadow: 'shadow-orange-500/15', routes: QUALITY_MENU_ROUTES }, |
| | | { title: '设å¤å°è´¦', icon: 'lucide:settings', route: 'MesDvMachinery', gradient: 'from-violet-500 to-purple-500', shadow: 'shadow-violet-500/15', routes: ['MesDvMachinery'] }, |
| | | { title: 'åå·¥æç', icon: 'lucide:calendar-range', route: 'MesCalScheduleDetail', gradient: 'from-cyan-500 to-teal-500', shadow: 'shadow-cyan-500/15', routes: ['MesCalScheduleDetail'] }, |
| | | { title: 'å®ç¯å¼å«', icon: 'lucide:bell-ring', route: 'MesProAndonRecord', gradient: 'from-red-500 to-rose-500', shadow: 'shadow-red-500/15', routes: ['MesProAndonRecord'] }, |
| | | { title: 'ç©æåºå', icon: 'lucide:package-search', route: 'MesWmMaterialStock', gradient: 'from-indigo-500 to-blue-500', shadow: 'shadow-indigo-500/15', routes: ['MesWmMaterialStock'] }, |
| | | { title: 'å·¥èºè·¯çº¿', icon: 'lucide:route', route: 'MesProRoute', gradient: 'from-teal-500 to-emerald-500', shadow: 'shadow-teal-500/15', routes: ['MesProRoute'] }, |
| | | ]; |
| | | const actions = computed(() => |
| | | allActions.filter((action) => hasAccessByCodes(action.permissions)), |
| | | allActions.flatMap((action) => { |
| | | const route = firstAccessibleRoute(action.routes); |
| | | return route ? [{ ...action, route }] : []; |
| | | }), |
| | | ); |
| | | </script> |
| | | |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['mes:em-alert:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['mes:em-meter:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['mes:em-quota:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['mes:em-record:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['erp:finance-payment:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: 'æ¥ç审æ¹', |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['erp:finance-payment:query'], |
| | | ifShow: () => row.status === 20 || !!row.reviewRemark, |
| | | onClick: handleViewProcess.bind(null, row), |
| | | }, |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['erp:finance-receipt:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['erp:purchase-in:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['erp:purchase-invoice:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['erp:purchase-order:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: 'æ¥ç审æ¹', |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['erp:purchase-order:query'], |
| | | ifShow: () => row.status === 20 || row.status === 30, |
| | | onClick: handleViewProcess.bind(null, row), |
| | | }, |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['erp:purchase-plan:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['erp:purchase-request:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['erp:purchase-return:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['erp:sale-order:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['erp:sale-out:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['erp:sale-return:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['erp:stock-check:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['erp:stock-in:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['erp:stock-move:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['erp:stock-out:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['hrm:certificate:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['hrm:training:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | </template> |
| | | </Grid> |
| | | </Page> |
| | | </template> |
| | | </template> |
| | |
| | | label: '管ç表æ
', |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['im:manager:face-pack-item:query'], |
| | | onClick: handleItems.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: '详æ
', |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['im:manager:group:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: '详æ
', |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['im:manager:message:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: '详æ
', |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['im:manager:message:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: '详æ
', |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['im:manager:rtc:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['infra:api-access-log:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['infra:api-error-log:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: 'æ§è¡æ¥å¿', |
| | | type: 'primary', |
| | | icon: 'lucide:history', |
| | | auth: ['infra:job:query'], |
| | | onClick: () => handleLog(undefined), |
| | | }, |
| | | { |
| | |
| | | { |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | auth: ['infra:job:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | | label: 'æ¥å¿', |
| | | type: 'link', |
| | | auth: ['infra:job:query'], |
| | | onClick: handleLog.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['infra:job:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | } |
| | | } |
| | | } catch { |
| | | // 没æ mes:cal-holiday:query æéææ¥å£å¼å¸¸æ¶ï¼ä»
忽ç¥åææ è®° |
| | | // æ¥å£å¼å¸¸æ¶ä»
忽ç¥åææ è®°ã |
| | | } |
| | | holidaySet.value = days; |
| | | } |
| | |
| | | label: 'åè§æ ¡éª', |
| | | type: 'primary', |
| | | icon: ACTION_ICON.SEARCH, |
| | | auth: ['mes:cal-schedule-detail:query'], |
| | | onClick: handleCheck, |
| | | }, |
| | | ]" |
| | |
| | | { |
| | | label: 'åè§æ ¡éª', |
| | | type: 'link', |
| | | auth: ['mes:cal-schedule-detail:query'], |
| | | onClick: handleCheckUser.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['mes:dv-check-record:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['mes:dv-machinery:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['mes:dv-mainten-record:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['mes:dv-metering:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['mes:dv-metering-check:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['mes:dv-repair:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | // { |
| | | // label: 'æ¡ç ', |
| | | // type: 'link', |
| | | // auth: ['mes:md-workstation:query'], |
| | | // onClick: handleBarcode.bind(null, row), |
| | | // }, |
| | | ]" |
| | |
| | | label: 'é¶æ¢¯çµä»·æµç®', |
| | | type: 'primary', |
| | | icon: ACTION_ICON.CALC, |
| | | auth: ['mes:pd-basedata:query'], |
| | | ifShow: config.key === 'tieredPrice', |
| | | onClick: handleCalc, |
| | | }, |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['mes:pd-basedata:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['mes:pd-ctc-reel:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['mes:pd-ctc:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['mes:pd-product:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['mes:pd-tech-confirm:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['mes:pro-alternative-plan:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | { |
| | | label: 'å®ç¯è®¾ç½®', |
| | | type: 'primary', |
| | | auth: ['mes:pro-andon-config:query'], |
| | | onClick: handleOpenConfig, |
| | | }, |
| | | { |
| | |
| | | { |
| | | label: '详æ
', |
| | | type: 'link', |
| | | auth: ['mes:pro-andon-record:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['mes:pro-emergency-plan:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['mes:pro-maintenance-plan:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['mes:pro-maintenance-calendar:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['mes:pro-mps:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | // { |
| | | // label: 'æ¡ç ', |
| | | // type: 'link', |
| | | // auth: ['mes:pro-work-order:query'], |
| | | // onClick: handleBarcode.bind(null, row), |
| | | // }, |
| | | { |
| | |
| | | label: 'æ¹æ¬¡è¿½æº¯', |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['mes:wm-batch:query'], |
| | | onClick: handleTrace.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['mes:qc-ipqc:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['mes:qc-iqc:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['mes:qc-oqc:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['mes:qc-outsource-test:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['mes:qc-rqc:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: 'å°ææé', |
| | | type: 'warning', |
| | | icon: 'ant-design:bell-outlined', |
| | | auth: ['srm:supplier-certificate:query'], |
| | | onClick: handleExpiringCertificates, |
| | | }, |
| | | ]" |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['system:login-log:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['system:mail-log:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['system:notify-message:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['system:operate-log:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['system:sms-log:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['system:social-user:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: 'æ«ç è§£æ', |
| | | type: 'primary', |
| | | icon: ACTION_ICON.SCAN, |
| | | auth: ['mes:wm-barcode:query'], |
| | | onClick: handleScan, |
| | | }, |
| | | { |
| | |
| | | { |
| | | label: 'æ¡ç 设置', |
| | | type: 'primary', |
| | | auth: ['mes:wm-barcode-config:query'], |
| | | onClick: handleConfig, |
| | | }, |
| | | { |
| | | label: 'å
¨é¾è·¯è¿½æº¯', |
| | | type: 'primary', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['mes:wm-batch:query'], |
| | | onClick: handleTraceCenter, |
| | | }, |
| | | { |
| | |
| | | { |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | auth: ['mes:wm-barcode:query'], |
| | | onClick: handleView.bind(null, row), |
| | | }, |
| | | { |
| | | label: '追溯', |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |
| | | auth: ['mes:wm-batch:query'], |
| | | ifShow: isTraceable(row), |
| | | onClick: handleTrace.bind(null, row), |
| | | }, |
| | |
| | | { |
| | | label: `${row.count ?? 0}`, |
| | | type: 'link', |
| | | auth: ['mes:wm-sn:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | { |
| | | label: 'æ¥çæç»', |
| | | type: 'link', |
| | | auth: ['mes:wm-sn:query'], |
| | | onClick: handleDetail.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | { |
| | | label: '详æ
', |
| | | type: 'link', |
| | | auth: ['mes:wm-sn:query'], |
| | | onClick: handleSnDetail.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | { |
| | | label: 'æ¡ç ', |
| | | type: 'link', |
| | | auth: ['mes:wm-sn:query'], |
| | | onClick: handleBarcode.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | label: '导å
¥æ¨¡æ¿', |
| | | type: 'primary', |
| | | icon: ACTION_ICON.DOWNLOAD, |
| | | auth: ['mes:wm-stock-taking-task:query'], |
| | | onClick: handleImportTemplate, |
| | | }, |
| | | ]" |
| | |
| | | { |
| | | label: 'æ¡ç ', |
| | | type: 'link', |
| | | auth: ['mes:wm-warehouse:query'], |
| | | onClick: handleBarcode.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | { |
| | | label: 'åºåº', |
| | | type: 'link', |
| | | auth: ['mes:wm-warehouse:query'], |
| | | onClick: handleOpenLocation.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | { |
| | | label: 'æ¡ç ', |
| | | type: 'link', |
| | | auth: ['mes:wm-warehouse:query'], |
| | | onClick: handleBarcode.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | { |
| | | label: 'åºä½', |
| | | type: 'link', |
| | | auth: ['mes:wm-warehouse:query'], |
| | | onClick: handleOpenArea.bind(null, row), |
| | | }, |
| | | { |
| | |
| | | { |
| | | label: 'æ¡ç ', |
| | | type: 'link', |
| | | auth: ['mes:wm-warehouse:query'], |
| | | onClick: handleBarcode.bind(null, row), |
| | | }, |
| | | ]" |
| | |
| | | { |
| | | label: 'æå°', |
| | | type: 'link', |
| | | auth: ['wms:check-order:query'], |
| | | onClick: () => printRef?.print(row.id!), |
| | | }, |
| | | ]" |
| | |
| | | { |
| | | label: 'æå°', |
| | | type: 'link', |
| | | auth: ['wms:movement-order:query'], |
| | | onClick: () => printRef?.print(row.id!), |
| | | }, |
| | | ]" |
| | |
| | | { |
| | | label: 'æå°', |
| | | type: 'link', |
| | | auth: ['wms:receipt-order:query'], |
| | | onClick: () => printRef?.print(row.id!), |
| | | }, |
| | | ]" |
| | |
| | | { |
| | | label: 'æå°', |
| | | type: 'link', |
| | | auth: ['wms:shipment-order:query'], |
| | | onClick: () => printRef?.print(row.id!), |
| | | }, |
| | | ]" |