From 0f7190cc425c0767ae341b1b0150fa1adbfb5624 Mon Sep 17 00:00:00 2001 From: ljlong_2630 Date: Mon, 26 Feb 2024 17:08:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E4=BF=AE=E5=9B=BE=E7=89=87=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/disposition/defaultButtons.ts | 26 ++++++++++ .../deviceInspectionMain.data.ts | 2 +- .../device/deviceMaintainOrderMain/index.vue | 14 ++++-- .../deviceMaintenanceMain.data.ts | 5 +- .../device/deviceMaintenanceMain/index.vue | 28 +++++++++-- .../device/deviceRepair/deviceRepair.data.ts | 11 +++++ src/views/eam/device/deviceRepair/index.vue | 47 +++++++++++++++++-- .../moldInspectionMain.data.ts | 2 +- .../moldMaintenanceMain.data.ts | 2 +- 9 files changed, 121 insertions(+), 16 deletions(-) diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts index 57c03e6..58474e5 100644 --- a/src/utils/disposition/defaultButtons.ts +++ b/src/utils/disposition/defaultButtons.ts @@ -986,6 +986,32 @@ export function uploadFileBtn(option:any) { }) } +// 主列表-完成 +export function viewBtn(option:any) { + return __defaultBtnOption(option,{ + label: '预览', + name: 'view', + hide: false, + type: 'success', + color: '', + link: true, // 文本展现按钮 + hasPermi: '' + }) +} + +// 主列表-完成 +export function pictureBtn(option:any) { + return __defaultBtnOption(option,{ + label: '照片', + name: 'picture', + hide: false, + type: 'success', + color: '', + link: true, // 文本展现按钮 + hasPermi: '' + }) +} + // 默认按钮规则 function __defaultBtnOption(option:any,specific:any){ diff --git a/src/views/eam/device/deviceInspectionMain/deviceInspectionMain.data.ts b/src/views/eam/device/deviceInspectionMain/deviceInspectionMain.data.ts index fae1758..116e2d6 100644 --- a/src/views/eam/device/deviceInspectionMain/deviceInspectionMain.data.ts +++ b/src/views/eam/device/deviceInspectionMain/deviceInspectionMain.data.ts @@ -310,7 +310,7 @@ export const DeviceInspectionDetail = useCrudSchemas(reactive([ }, api: () => dutyUserList, formatter: (_: Recordable, __: TableColumn, cellValue: number) => { - return userList.filter(item=>cellValue.includes(item.id)).map(cur=>cur.name).join(',') + return userList.filter(item=>cellValue?.includes(item.id)).map(cur=>cur.name).join(',') }, form: { component: 'Select', diff --git a/src/views/eam/device/deviceMaintainOrderMain/index.vue b/src/views/eam/device/deviceMaintainOrderMain/index.vue index 20d3052..e7cc4d6 100644 --- a/src/views/eam/device/deviceMaintainOrderMain/index.vue +++ b/src/views/eam/device/deviceMaintainOrderMain/index.vue @@ -92,6 +92,8 @@ :importTemplateData="importTemplateData" @success="importSuccess" /> + + + + diff --git a/src/views/eam/mold/moldInspectionMain/moldInspectionMain.data.ts b/src/views/eam/mold/moldInspectionMain/moldInspectionMain.data.ts index e00ee5f..6031e33 100644 --- a/src/views/eam/mold/moldInspectionMain/moldInspectionMain.data.ts +++ b/src/views/eam/mold/moldInspectionMain/moldInspectionMain.data.ts @@ -310,7 +310,7 @@ export const MoldInspectionDetail = useCrudSchemas(reactive([ }, api: () => dutyUserList, formatter: (_: Recordable, __: TableColumn, cellValue: number) => { - return userList.filter(item=>cellValue.includes(item.id)).map(cur=>cur.name).join(',') + return userList.filter(item=>cellValue?.includes(item.id)).map(cur=>cur.name).join(',') }, form: { component: 'Select', diff --git a/src/views/eam/mold/moldMaintenanceMain/moldMaintenanceMain.data.ts b/src/views/eam/mold/moldMaintenanceMain/moldMaintenanceMain.data.ts index e64e245..b6068b2 100644 --- a/src/views/eam/mold/moldMaintenanceMain/moldMaintenanceMain.data.ts +++ b/src/views/eam/mold/moldMaintenanceMain/moldMaintenanceMain.data.ts @@ -234,7 +234,7 @@ export const MoldMaintenanceDetail = useCrudSchemas(reactive([ sort: 'custom', api: () => userList, formatter: (_: Recordable, __: TableColumn, cellValue) => { - return userList.filter(item=>cellValue.includes(item.id)).map(cur=>cur.name).join(',') + return userList.filter(item=>cellValue?.includes(item.id)).map(cur=>cur.name).join(',') }, tableForm: { type: 'Select',