Преглед на файлове

pms 保养工单列表添加 所属队伍

zhangcl преди 1 седмица
родител
ревизия
0a62701fe0
променени са 2 файла, в които са добавени 7 реда и са изтрити 5 реда
  1. 1 0
      src/api/pms/iotmainworkorder/index.ts
  2. 6 5
      src/views/pms/iotmainworkorder/index.vue

+ 1 - 0
src/api/pms/iotmainworkorder/index.ts

@@ -6,6 +6,7 @@ export interface IotMainWorkOrderVO {
   planId: number // 保养计划id
   planSerialNumber: string // 保养计划编号
   deptId: number // 组织id
+  deptName: string // 组织名称
   orderNumber: string // 工单号
   name: string // 工单名称 (吐哈-C14-保养计划)
   type: number // 工单类型(1计划生成  2临时新建)

+ 6 - 5
src/views/pms/iotmainworkorder/index.vue

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