|
@@ -93,9 +93,8 @@
|
|
{{ scope.$index + 1 }}
|
|
{{ scope.$index + 1 }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <!--
|
|
|
|
- <el-table-column label="工单号" align="center" prop="orderNumber" /> -->
|
|
|
|
<el-table-column :label="t('bomList.name')" align="left" prop="name" :width="columnWidths.name"/>
|
|
<el-table-column :label="t('bomList.name')" align="left" prop="name" :width="columnWidths.name"/>
|
|
|
|
+ <el-table-column :label="t('iotDevice.dept')" align="center" prop="deptName" :width="columnWidths.deptName"/>
|
|
<el-table-column :label="t('bomList.status')" align="center" prop="result" :width="columnWidths.result">
|
|
<el-table-column :label="t('bomList.status')" align="center" prop="result" :width="columnWidths.result">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<dict-tag :type="DICT_TYPE.PMS_MAIN_WORK_ORDER_RESULT" :value="scope.row.result" />
|
|
<dict-tag :type="DICT_TYPE.PMS_MAIN_WORK_ORDER_RESULT" :value="scope.row.result" />
|
|
@@ -224,13 +223,14 @@ const hoverText = ref('');
|
|
const columnWidths = ref({
|
|
const columnWidths = ref({
|
|
serial: '80px',
|
|
serial: '80px',
|
|
name: '200px',
|
|
name: '200px',
|
|
|
|
+ deptName: '150px',
|
|
result: '120px',
|
|
result: '120px',
|
|
serviceDue: '150px',
|
|
serviceDue: '150px',
|
|
type: '120px',
|
|
type: '120px',
|
|
responsiblePersonName: '150px',
|
|
responsiblePersonName: '150px',
|
|
createTime: '180px',
|
|
createTime: '180px',
|
|
updateTime: '180px',
|
|
updateTime: '180px',
|
|
- operation: '180px'
|
|
|
|
|
|
+ operation: '150px'
|
|
})
|
|
})
|
|
|
|
|
|
// 计算文本宽度
|
|
// 计算文本宽度
|
|
@@ -293,6 +293,7 @@ const calculateColumnWidths = () => {
|
|
// 计算各列最小宽度
|
|
// 计算各列最小宽度
|
|
calculateColumnMinWidth('serial', t('iotDevice.serial'), (row: any, index: number) => `${index + 1}`);
|
|
calculateColumnMinWidth('serial', t('iotDevice.serial'), (row: any, index: number) => `${index + 1}`);
|
|
const nameMinWidth = calculateColumnMinWidth('name', t('bomList.name'), (row: any) => row.name);
|
|
const nameMinWidth = calculateColumnMinWidth('name', t('bomList.name'), (row: any) => row.name);
|
|
|
|
+ calculateColumnMinWidth('deptName', t('iotDevice.dept'), (row: any) => row.deptName);
|
|
calculateColumnMinWidth('result', t('bomList.status'), (row: any) => {
|
|
calculateColumnMinWidth('result', t('bomList.status'), (row: any) => {
|
|
const dict = getStrDictOptions(DICT_TYPE.PMS_MAIN_WORK_ORDER_RESULT)
|
|
const dict = getStrDictOptions(DICT_TYPE.PMS_MAIN_WORK_ORDER_RESULT)
|
|
.find(d => d.value === row.result);
|
|
.find(d => d.value === row.result);
|
|
@@ -309,8 +310,8 @@ const calculateColumnWidths = () => {
|
|
calculateColumnMinWidth('updateTime', t('dict.fillTime'), (row: any) => row.result == 2 ? formatCellDate(row.updateTime) : '');
|
|
calculateColumnMinWidth('updateTime', t('dict.fillTime'), (row: any) => row.result == 2 ? formatCellDate(row.updateTime) : '');
|
|
|
|
|
|
// 操作列固定宽度
|
|
// 操作列固定宽度
|
|
- minWidths.operation = 180;
|
|
|
|
- totalMinWidth += 180;
|
|
|
|
|
|
+ minWidths.operation = 150;
|
|
|
|
+ totalMinWidth += 150;
|
|
|
|
|
|
// 2. 计算可伸缩列最终宽度
|
|
// 2. 计算可伸缩列最终宽度
|
|
const newWidths: Record<string, string> = {};
|
|
const newWidths: Record<string, string> = {};
|