diff --git a/.env b/.env index 9456365e..693c5cef 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ # 标题 -VITE_APP_TITLE=生产运营管理系统 +VITE_APP_TITLE=数字化智能中控平台 # 项目本地运行端口号 VITE_PORT=8088 diff --git a/index.html b/index.html index 3411562a..e9f058bc 100644 --- a/index.html +++ b/index.html @@ -7,11 +7,11 @@ %VITE_APP_TITLE% diff --git a/src/api/dashboard/index.ts b/src/api/dashboard/index.ts new file mode 100644 index 00000000..a7125b41 --- /dev/null +++ b/src/api/dashboard/index.ts @@ -0,0 +1,35 @@ +import request from '@/config/axios' +export interface DashboardProductVO { + taskItems: ItemVO[] + planItems: ItemVO[] +} + +export interface ItemVO { + key: string + label: string + value: number +} + +export interface DeviceStatusVO { + key: string + label: string + value: number + level: string +} + + +// 编码生成记录 API +export const DashboardApi = { + // 查询编码生成记录分页 + getProduction: async (params: any) => { + return await request.get({ url: `/mes/dashboard/getProduction`, params }) + }, +getPlan: async () => { + return await request.get({ url: `/mes/dashboard/getPlan` }) + }, + getDevice: async () => { + return await request.get({ url: `/mes/dashboard/getDevice` }) + }, + +} + diff --git a/src/api/mes/deviceledger/index.ts b/src/api/mes/deviceledger/index.ts index 9deeea06..8e6d7a19 100644 --- a/src/api/mes/deviceledger/index.ts +++ b/src/api/mes/deviceledger/index.ts @@ -75,5 +75,9 @@ export const DeviceLedgerApi = { }, exportSpareBased: async (params) => { return await request.download({ url: `/mes/device-ledger/export-spare-based`, params }) + }, + + exportMold: async (params) => { + return await request.download({ url: `/mes/device-ledger/export-mold`, params }) } } diff --git a/src/api/mes/plan/index.ts b/src/api/mes/plan/index.ts index 9225484f..75d46e55 100644 --- a/src/api/mes/plan/index.ts +++ b/src/api/mes/plan/index.ts @@ -88,4 +88,9 @@ export const PlanApi = { getPlanByStatus: async (status: number) => { return await request.get({ url: `/mes/plan/getByStatus?status=` + status }) }, + + // 根据质检类型查询生产计划 + getPlanByTicketType: async (status: number) => { + return await request.get({ url: `/mes/plan/getByTicketType?status=` + status }) + }, } diff --git a/src/layout/components/Logo/src/Logo.vue b/src/layout/components/Logo/src/Logo.vue index d241130d..404f1b2c 100644 --- a/src/layout/components/Logo/src/Logo.vue +++ b/src/layout/components/Logo/src/Logo.vue @@ -73,7 +73,7 @@ watch(
-
欢迎使用您的云上数字工厂
+
欢迎您使用必硕数字化智能中控平台
- 云上数字工厂可以整合您工厂所有设备、自动化、信息化的教据,帮助您对工厂和生产进行建模管理,统一主教报及应用集成,打造您工厂的教字中心和业务中心,并且与产业链相关系统协同,不断提升您的智能制造能力。 + 必硕数字化智能中控平台以生产运营为核心,统一整合生产计划、数据采集、仓储、设备、能源、模具、质量、配方及报表分析等关键业务模块,实现从计划到执行、从设备到制品、从数据到决策的全流程数字化管理。
@@ -35,12 +35,12 @@ v-model="productionOverviewRange" type="daterange" unlink-panels value-format="Y
{{ item.value }}
- + @@ -50,9 +50,13 @@ v-model="productionOverviewRange" type="daterange" unlink-panels value-format="Y - +
-
生产工单 {{ item.orderNo }}
+
生产计划 {{ item.code }} + + {{ getPlanStatusLabel(item.status) }} + +
@@ -60,46 +64,66 @@ v-model="productionOverviewRange" type="daterange" unlink-panels value-format="Y {{ item.productName }}
- 任务数量 - - + 计划数量 + {{ item.planNumber }}
- 客户简称 - - + 生产线 + {{ item.feedingPipelineName }}
- 交货时间 - {{ item.planEndTime }} + 计划开始时间 + {{ formatDate(item.planStartTime) }}
- 投产时间 - {{ item.planStartTime }} + 计划结束时间 + {{ formatDate(item.planEndTime) }}
- 产品型号 - - + 完工数量 + {{ item.wangongNumber }}
- 完成数量 - - + 合格数量 + {{ item.passNumber }}
- 完成进度 - {{ item.completeRate }}% + 不合格数量 + {{ item.noPassNumber }}%
- 工单状态 - {{ item.statusText }} + 合格率 + {{ item.passRate }}
- 完工时间 - - + 实际结束时间 + {{ formatDate(item.endTime) }}
+
+
+
+
+
+ +
+
待办任务
+
+ + + + +
+
{{ item.name }}
+
任务编号:{{ item.id }}
+
任务类型:{{ item.type }}|优先级:{{ item.priority }}
+
计划时间:{{ item.planTime }}
+
责任部门:{{ item.owner }}
+
@@ -110,10 +134,10 @@ v-model="productionOverviewRange" type="daterange" unlink-panels value-format="Y
设备
-
+
@@ -128,7 +152,7 @@ v-model="productionOverviewRange" type="daterange" unlink-panels value-format="Y
-
告警
+
模具
@@ -143,12 +167,12 @@ v-model="productionOverviewRange" type="daterange" unlink-panels value-format="Y
-
设备整体情况
-
+
采集设备整体情况
+
@@ -165,26 +189,6 @@ v-model="deviceOverviewRange" type="daterange" unlink-panels value-format="YYYY- - -
-
待办任务
-
- - - - -
-
{{ item.name }}
-
任务编号:{{ item.id }}
-
任务类型:{{ item.type }}|优先级:{{ item.priority }}
-
计划时间:{{ item.planTime }}
-
责任部门:{{ item.owner }}
-
-
-
-
-
-
@@ -217,7 +221,7 @@ v-model="deviceOverviewRange" type="daterange" unlink-panels value-format="YYYY- - + + +
@@ -315,7 +319,8 @@ import { import { HomeApi } from '@/api/home/info' import { WeatherVO } from '@/api/home/info' import bannerImg from '@/assets/imgs/banner.png' - +import { DashboardApi,DashboardProductVO,DeviceStatusVO } from '@/api/dashboard' +import { formatDate } from '@/utils/formatTime' defineOptions({ name: 'Home' }) const { t } = useI18n() @@ -339,7 +344,8 @@ const productionOverviewRange = ref([]) const deviceOverview = ref(deviceOverviewMock) const deviceOverviewRange = ref([]) const productionProgressTab = ref('all') -const productionProgressList = ref(productionProgressMock) +const productionProgressList = ref() + const todoTaskList = ref(todoTasksMock) const deviceStatus = ref(deviceStatusMock) const alarmStatus = ref(alarmStatusMock) @@ -352,64 +358,24 @@ const formatPercent = (value: number | undefined | null) => { return `${value}%` } -const productionOverviewLeft = computed(() => [ - { - key: 'orderCount', - label: '生产订单数', - value: productionOverview.value.orderCount - }, - { - key: 'runningOrderCount', - label: '生产工单数', - value: productionOverview.value.runningOrderCount - }, - { - key: 'startedOrderCount', - label: '开工工单数', - value: productionOverview.value.startedOrderCount - }, - { - key: 'shutdownOrderCount', - label: '完工工单数', - value: productionOverview.value.shutdownOrderCount - } -]) +const productionOverviewLeft = ref([]) -const productionOverviewCenter = computed(() => [ - { - key: 'plannedOutput', - label: '计划生产数量', - value: productionOverview.value.plannedOutput?.toLocaleString() - }, - { - key: 'completedOutput', - label: '完成生产数量', - value: productionOverview.value.completedOutput?.toLocaleString() - }, - { - key: 'completionRate', - label: '完工率', - value: formatPercent(productionOverview.value.qualifiedRate) - }, - { - key: 'qualifiedRate', - label: '合格率', - value: formatPercent(productionOverview.value.alarmRate) - } -]) +const productionOverviewCenter = ref([]) -const productionOverviewRight = computed(() => [ - { - key: 'attendanceCount', - label: '出勤人数', - value: productionOverview.value.onTimeRate ?? 0 - }, - { - key: 'attendanceRate', - label: '出勤率', - value: formatPercent(productionOverview.value.onTimeRate) - } -]) +const plan = ref([]) + +// const productionOverviewRight = computed(() => [ +// { +// key: 'attendanceCount', +// label: '出勤人数', +// value: productionOverview.value.onTimeRate ?? 0 +// }, +// { +// key: 'attendanceRate', +// label: '出勤率', +// value: formatPercent(productionOverview.value.onTimeRate) +// } +// ]) const deviceOverviewTop = computed(() => [ { @@ -471,26 +437,26 @@ const deviceOverviewBottom = computed(() => [ value: 0 } ]) -const deviceStatusCards = computed(() => [ - { - key: 'inactive', - label: '非活动', - value: deviceStatus.value.inactive, - level: 'mini-danger' - }, - { - key: 'active', - label: '活动', - value: deviceStatus.value.active, - level: 'mini-normal' - }, - { - key: 'total', - label: '总数', - value: deviceStatus.value.total, - level: 'mini-total' - } -]) +// const deviceStatusCards = computed(() => [ +// { +// key: 'inactive', +// label: '非活动', +// value: deviceStatus.value.inactive, +// level: 'mini-danger' +// }, +// { +// key: 'active', +// label: '活动', +// value: deviceStatus.value.active, +// level: 'mini-normal' +// }, +// { +// key: 'total', +// label: '总数', +// value: deviceStatus.value.total, +// level: 'mini-total' +// } +// ]) const alarmStatusCards = computed(() => [ { key: 'serious', @@ -518,7 +484,7 @@ const groupBySize = (list: T[], size: number) => { } return result } -const productionProgressGroups = computed(() => groupBySize(filteredProductionProgressList.value, 3)) + const todoTaskGroups = computed(() => groupBySize(todoTaskList.value, 4)) // 获取统计数 let totalSate = reactive({ @@ -531,6 +497,9 @@ const weatherList = ref([]) const weatherEnable = ref(false) const todayWeather = ref({} as WeatherVO) let weatherCity = "" +const production = ref({} as DashboardProductVO) +const productionProgressGroups = computed(() => groupBySize(plan.value, 3)) +const deviceStatusCards = ref([]) /** 初始化 **/ onMounted(async () => { // 加载 @@ -541,9 +510,28 @@ onMounted(async () => { todayWeather.value = weatherList.value[0] weatherCity = data.city } + production.value = await DashboardApi.getProduction(productionOverviewRange) + plan.value = await DashboardApi.getPlan() + deviceStatusCards.value = await DashboardApi.getDevice() + productionOverviewLeft.value = production.value.taskItems + productionOverviewCenter.value = production.value.planItems }) +const getPlanStatusLabel = (value: any) => { + const v = value === '' || value === null || value === undefined ? undefined : String(value) + if (v == '1') return '已排产' + if (v == '2') return '试产' + if (v == '3') return '量产' + return '-' +} +const getPlanStatusTagType = (value: any) => { + const v = value === '' || value === null || value === undefined ? undefined : String(value) + if (v === '1') return 'success' + if (v === '0') return 'warning' + return 'info' +} + const getCount = async () => { const data = { project: 40, @@ -958,6 +946,14 @@ getAllApi() top: 50%; transform: translateY(-50%); } +/* 左箭头往右移动 */ +.progress-carousel :deep(.el-carousel__arrow--left) { + transform: translate(30px, -50%); /* X轴移动30px,Y轴居中 */ +} +/* 右箭头往左移动 */ +.progress-carousel :deep(.el-carousel__arrow--right) { + transform: translate(-30px, -50%); /* X轴移动-30px,Y轴居中 */ +} .progress-carousel :deep(.el-carousel__arrow--left) { left: -8px; diff --git a/src/views/Home/echarts-data.ts b/src/views/Home/echarts-data.ts index 9692ab90..754c036c 100644 --- a/src/views/Home/echarts-data.ts +++ b/src/views/Home/echarts-data.ts @@ -262,44 +262,6 @@ export const productionOverviewMock = { onTimeRate: 0 } -export const productionProgressMock = [ - { - id: 'SCGD00000036', - orderNo: 'SCGD00000036', - productName: '大中型模具', - statusText: '生产中', - planStartTime: '2021-05-28 18:40:10', - planEndTime: '2021-06-05 18:40:10', - completeRate: 8.33 - }, - { - id: 'SCGD00000037', - orderNo: 'SCGD00000037', - productName: '大型注塑模具', - statusText: '排产中', - planStartTime: '2021-05-28 18:40:10', - planEndTime: '2021-06-10 18:40:10', - completeRate: 6.86 - }, - { - id: 'SCGD00000033', - orderNo: 'SCGD00000033', - productName: '模具零件加工', - statusText: '生产中', - planStartTime: '2021-04-02 17:50:12', - planEndTime: '2021-04-10 17:50:12', - completeRate: 57.58 - }, - { - id: 'SCGD00000040', - orderNo: 'SCGD00000040', - productName: '试模工单', - statusText: '待开工', - planStartTime: '2021-06-15 08:30:00', - planEndTime: '2021-06-20 18:00:00', - completeRate: 0 - } -] export const deviceStatusMock = { inactive: 2, diff --git a/src/views/Home/types.ts b/src/views/Home/types.ts index 06a7bab1..f60b354c 100644 --- a/src/views/Home/types.ts +++ b/src/views/Home/types.ts @@ -68,12 +68,18 @@ export type ProductionOverview = { export type ProductionProgressItem = { id: string - orderNo: string + code: string productName: string - statusText: string - planStartTime: string - planEndTime: string - completeRate: number + planNumber: number + feedingPipelineName: string + planStartTime: Date + planEndTime: Date + wangongNumber: number + passNumber: number + noPassNumber: number + passRate: number + endTime: Date + status: number } export type DeviceStatusSummary = { diff --git a/src/views/erp/stock/in/StockInForm.vue b/src/views/erp/stock/in/StockInForm.vue index 8bb35a0f..71b26cb3 100644 --- a/src/views/erp/stock/in/StockInForm.vue +++ b/src/views/erp/stock/in/StockInForm.vue @@ -8,12 +8,34 @@ v-loading="formLoading" :disabled="disabled" > + + + + + + + +
+ +
+
+
+
- - - - - { inTime: undefined, remark: undefined, fileUrl: undefined, - items: [] + items: [], + isCode: true, + no: undefined } formRef.value?.resetFields() } diff --git a/src/views/mes/bom/ItemNeedIndex.vue b/src/views/mes/bom/ItemNeedIndex.vue index e1d401f6..a823173a 100644 --- a/src/views/mes/bom/ItemNeedIndex.vue +++ b/src/views/mes/bom/ItemNeedIndex.vue @@ -6,10 +6,10 @@ - + diff --git a/src/views/mes/deviceledger/index.vue b/src/views/mes/deviceledger/index.vue index 2c01531c..8a33cb8a 100644 --- a/src/views/mes/deviceledger/index.vue +++ b/src/views/mes/deviceledger/index.vue @@ -395,7 +395,7 @@ type="success" plain :loading="spareExportLoading" @click="handleExportSpareBase - + diff --git a/src/views/mes/energydevice/index.vue b/src/views/mes/energydevice/index.vue index f81b740f..4fbd141d 100644 --- a/src/views/mes/energydevice/index.vue +++ b/src/views/mes/energydevice/index.vue @@ -43,7 +43,7 @@ type="success" plain @click="handleExport" :loading="exportLoading" @current-change="handleCurrentChange" @selection-change="handleSelectionChange" > - + diff --git a/src/views/mes/energydevicecheck/index.vue b/src/views/mes/energydevicecheck/index.vue index 1976f7ce..4ccd9962 100644 --- a/src/views/mes/energydevicecheck/index.vue +++ b/src/views/mes/energydevicecheck/index.vue @@ -44,7 +44,7 @@ ref="tableRef" v-loading="loading" :data="list" :stripe="true" :show-overflow-to