diff --git a/src/components/Descriptions/src/Descriptions.vue b/src/components/Descriptions/src/Descriptions.vue index f81f8f35a..a7c49f853 100644 --- a/src/components/Descriptions/src/Descriptions.vue +++ b/src/components/Descriptions/src/Descriptions.vue @@ -127,6 +127,7 @@ const showAll = () =>{ :label-align="labelAlign" :label-class-name="labelClassName" :width="width" + :span="item.span" > + + diff --git a/src/utils/formatTime.ts b/src/utils/formatTime.ts index 64bb9c8b3..db7948081 100644 --- a/src/utils/formatTime.ts +++ b/src/utils/formatTime.ts @@ -26,11 +26,10 @@ export function formatDate(date: Date | number, format?: string): string { /** * 获取当前的日期+时间 */ -export function addDay(date: Date | number,addDay:number) { - return dayjs(date).add(addDay,'day') +export function addDay(date: Date | number, addDay: number) { + return dayjs(date).add(addDay, 'day') } - /** * 获取当前的日期+时间 */ @@ -163,6 +162,21 @@ export const dateFormatter = (row, column, cellValue) => { } return formatDate(cellValue) } +/** + * element plus 的时间 Formatter 实现,使用 YYYY-MM-DD HH:mm:ss 格式 + * + * @param row 行数据 + * @param column 字段 + * @param cellValue 字段值 + */ +// @ts-ignore +export const dateFormatter3 = (row, column, cellValue) => { + if (!cellValue) { + return + } + let str = formatDate(cellValue).split(' ')[1] + return str +} // 获取时间戳 export const formatGetTime = (row, column, cellValue) => { console.log(cellValue.getTime()) diff --git a/src/views/qms/inspectionJob/index.vue b/src/views/qms/inspectionJob/index.vue index 3566e702d..edd41b170 100644 --- a/src/views/qms/inspectionJob/index.vue +++ b/src/views/qms/inspectionJob/index.vue @@ -1,33 +1,52 @@