ソースを参照

✨ feat(日报审批): 表格

Zimo 3 日 前
コミット
668da76537

+ 109 - 104
src/views/pms/iotrhdailyreport/approval.vue

@@ -48,6 +48,7 @@ interface Column {
   label: string
   'min-width'?: string
   isTag?: boolean
+  fixed?: 'left' | 'right'
   formatter?: (row: List) => any
   children?: Column[]
   dictType?: string
@@ -58,26 +59,25 @@ const columns = ref<Column[]>([
     label: '日期',
     prop: 'createTime',
     'min-width': '120px',
+    fixed: 'left',
     formatter: (row: List) => dayjs(row.createTime).format('YYYY-MM-DD')
   },
   {
     label: '施工队伍',
     prop: 'deptName',
-    'min-width': '120px'
-  },
-  {
-    label: '项目',
-    prop: 'contractName',
+    fixed: 'left',
     'min-width': '120px'
   },
   {
     label: '任务',
     prop: 'taskName',
+    fixed: 'left',
     'min-width': '120px'
   },
   {
     label: '施工状态',
     prop: 'constructionStatus',
+    fixed: 'left',
     'min-width': '120px',
     isTag: true,
     dictType: DICT_TYPE.PMS_PROJECT_TASK_SCHEDULE
@@ -101,73 +101,73 @@ const columns = ref<Column[]>([
           return ''
       }
     }
-  }
-  // {
-  //   label: '搬迁安装天数',
-  //   prop: 'relocationDays',
-  //   'min-width': '120px',
-  //   formatter: (row: List) => (row.relocationDays < 0 ? '0' : String(row.relocationDays))
-  // },
-  // {
-  //   label: '设计注气量(万方)',
-  //   prop: 'designInjection',
-  //   'min-width': '120px',
-  //   formatter: (row: List) => row.designInjection || '0'
-  // },
-  // {
-  //   label: '运行时效',
-  //   prop: 'transitTime',
-  //   'min-width': '120px',
-  //   formatter: (row: List) => (row.transitTime * 100).toFixed(2) + '%'
-  // },
-  // {
-  //   label: '当日',
-  //   children: [
-  //     {
-  //       label: '注气量(万方)',
-  //       prop: 'dailyGasInjection',
-  //       'min-width': '120px',
-  //       formatter: (row: List) => (row.dailyGasInjection / 10000).toFixed(2)
-  //     },
-  //     {
-  //       label: '注水量(方)',
-  //       prop: 'dailyWaterInjection',
-  //       'min-width': '120px'
-  //     },
-  //     {
-  //       label: '注气时间(H)',
-  //       prop: 'dailyInjectGasTime',
-  //       'min-width': '120px'
-  //     },
-  //     {
-  //       label: '注水时间(H)',
-  //       prop: 'dailyInjectWaterTime',
-  //       'min-width': '120px'
-  //     },
-  //     {
-  //       label: '用电量(kWh)',
-  //       prop: 'dailyPowerUsage',
-  //       'min-width': '120px'
-  //     },
-  //     {
-  //       label: '油耗(L)',
-  //       prop: 'dailyOilUsage',
-  //       'min-width': '120px'
-  //     }
-  //   ]
-  // },
-  // {
-  //   label: '非生产时间(H)',
-  //   prop: 'nonProductionTime',
-  //   'min-width': '120px'
-  // },
-  // {
-  //   label: '非生产时间原因',
-  //   prop: 'nptReason',
-  //   'min-width': '120px',
-  //   isTag: true,
-  //   dictType: DICT_TYPE.PMS_PROJECT_NPT_REASON
-  // },
+  },
+  {
+    label: '搬迁安装天数',
+    prop: 'relocationDays',
+    'min-width': '120px',
+    formatter: (row: List) => (row.relocationDays < 0 ? '0' : String(row.relocationDays))
+  },
+  {
+    label: '设计注气量(万方)',
+    prop: 'designInjection',
+    'min-width': '120px',
+    formatter: (row: List) => row.designInjection || '0'
+  },
+  {
+    label: '运行时效',
+    prop: 'transitTime',
+    'min-width': '120px',
+    formatter: (row: List) => (row.transitTime * 100).toFixed(2) + '%'
+  },
+  {
+    label: '当日',
+    children: [
+      {
+        label: '注气量(万方)',
+        prop: 'dailyGasInjection',
+        'min-width': '120px',
+        formatter: (row: List) => (row.dailyGasInjection / 10000).toFixed(2)
+      },
+      {
+        label: '注水量(方)',
+        prop: 'dailyWaterInjection',
+        'min-width': '120px'
+      },
+      {
+        label: '注气时间(H)',
+        prop: 'dailyInjectGasTime',
+        'min-width': '120px'
+      },
+      {
+        label: '注水时间(H)',
+        prop: 'dailyInjectWaterTime',
+        'min-width': '120px'
+      },
+      {
+        label: '用电量(kWh)',
+        prop: 'dailyPowerUsage',
+        'min-width': '120px'
+      },
+      {
+        label: '油耗(L)',
+        prop: 'dailyOilUsage',
+        'min-width': '120px'
+      }
+    ]
+  },
+  {
+    label: '非生产时间(H)',
+    prop: 'nonProductionTime',
+    'min-width': '120px'
+  },
+  {
+    label: '非生产时间原因',
+    prop: 'nptReason',
+    'min-width': '120px',
+    isTag: true,
+    dictType: DICT_TYPE.PMS_PROJECT_NPT_REASON
+  },
   // {
   //   label: '施工开始日期',
   //   prop: 'constructionStartDate',
@@ -180,38 +180,43 @@ const columns = ref<Column[]>([
   //   'min-width': '120px',
   //   formatter: (row: List) => dayjs(row.constructionEndDate).format('YYYY-MM-DD HH:mm:ss')
   // },
-  // {
-  //   label: '生产动态',
-  //   prop: 'productionStatus',
-  //   'min-width': '120px'
-  // },
-  // {
-  //   label: '累计',
-  //   children: [
-  //     {
-  //       label: '注气量(万方)',
-  //       prop: 'totalGasInjection',
-  //       'min-width': '120px',
-  //       formatter: (row: List) => (row.totalGasInjection / 10000).toFixed(2)
-  //     },
-  //     {
-  //       label: '注水量(方)',
-  //       prop: 'totalWaterInjection',
-  //       'min-width': '120px'
-  //     },
-  //     {
-  //       label: '完工井次',
-  //       prop: 'cumulativeCompletion',
-  //       'min-width': '120px'
-  //     }
-  //   ]
-  // },
-  // {
-  //   label: '产能(万方)',
-  //   prop: 'capacity',
-  //   'min-width': '120px',
-  //   formatter: (row: List) => (row.capacity / 10000).toFixed(2)
-  // }
+  {
+    label: '生产动态',
+    prop: 'productionStatus',
+    'min-width': '120px'
+  },
+  {
+    label: '项目',
+    prop: 'contractName',
+    'min-width': '120px'
+  },
+  {
+    label: '累计',
+    children: [
+      {
+        label: '注气量(万方)',
+        prop: 'totalGasInjection',
+        'min-width': '120px',
+        formatter: (row: List) => (row.totalGasInjection / 10000).toFixed(2)
+      },
+      {
+        label: '注水量(方)',
+        prop: 'totalWaterInjection',
+        'min-width': '120px'
+      },
+      {
+        label: '完工井次',
+        prop: 'cumulativeCompletion',
+        'min-width': '120px'
+      }
+    ]
+  },
+  {
+    label: '产能(万方)',
+    prop: 'capacity',
+    'min-width': '120px',
+    formatter: (row: List) => (row.capacity / 10000).toFixed(2)
+  }
 ])
 
 const getTextWidth = (text: string, fontSize = 12) => {

+ 182 - 108
src/views/pms/iotrydailyreport/approval.vue

@@ -78,6 +78,7 @@ interface Column {
   label: string
   'min-width'?: string
   isTag?: boolean
+  fixed?: 'left' | 'right'
   formatter?: (row: List) => any
   children?: Column[]
   dictType?: string
@@ -88,29 +89,28 @@ const columns = ref<Column[]>([
     label: '日期',
     prop: 'createTime',
     'min-width': '120px',
-    formatter: (row: List) => dayjs(row.createTime).format('YYYY-MM-DD')
+    formatter: (row: List) => dayjs(row.createTime).format('YYYY-MM-DD'),
+    fixed: 'left'
   },
   {
     label: '施工队伍',
     prop: 'deptName',
-    'min-width': '120px'
-  },
-  {
-    label: '项目',
-    prop: 'contractName',
-    'min-width': '120px'
+    'min-width': '120px',
+    fixed: 'left'
   },
   {
     label: '任务',
     prop: 'taskName',
-    'min-width': '120px'
+    'min-width': '120px',
+    fixed: 'left'
   },
   {
     label: '施工状态',
     prop: 'rigStatus',
     'min-width': '120px',
     isTag: true,
-    dictType: DICT_TYPE.PMS_PROJECT_TASK_SCHEDULE
+    dictType: DICT_TYPE.PMS_PROJECT_TASK_RY_SCHEDULE,
+    fixed: 'left'
   },
   {
     label: '审批状态',
@@ -131,73 +131,94 @@ const columns = ref<Column[]>([
           return ''
       }
     }
-  }
-  // {
-  //   label: '搬迁安装天数',
-  //   prop: 'relocationDays',
-  //   'min-width': '120px',
-  //   formatter: (row: List) => (row.relocationDays < 0 ? '0' : String(row.relocationDays))
-  // },
-  // {
-  //   label: '设计注气量(万方)',
-  //   prop: 'designInjection',
-  //   'min-width': '120px',
-  //   formatter: (row: List) => row.designInjection || '0'
-  // },
-  // {
-  //   label: '运行时效',
-  //   prop: 'transitTime',
-  //   'min-width': '120px',
-  //   formatter: (row: List) => (row.transitTime * 100).toFixed(2) + '%'
-  // },
-  // {
-  //   label: '当日',
-  //   children: [
-  //     {
-  //       label: '注气量(万方)',
-  //       prop: 'dailyGasInjection',
-  //       'min-width': '120px',
-  //       formatter: (row: List) => (row.dailyGasInjection / 10000).toFixed(2)
-  //     },
-  //     {
-  //       label: '注水量(方)',
-  //       prop: 'dailyWaterInjection',
-  //       'min-width': '120px'
-  //     },
-  //     {
-  //       label: '注气时间(H)',
-  //       prop: 'dailyInjectGasTime',
-  //       'min-width': '120px'
-  //     },
-  //     {
-  //       label: '注水时间(H)',
-  //       prop: 'dailyInjectWaterTime',
-  //       'min-width': '120px'
-  //     },
-  //     {
-  //       label: '用电量(kWh)',
-  //       prop: 'dailyPowerUsage',
-  //       'min-width': '120px'
-  //     },
-  //     {
-  //       label: '油耗(L)',
-  //       prop: 'dailyOilUsage',
-  //       'min-width': '120px'
-  //     }
-  //   ]
-  // },
-  // {
-  //   label: '非生产时间(H)',
-  //   prop: 'nonProductionTime',
-  //   'min-width': '120px'
-  // },
-  // {
-  //   label: '非生产时间原因',
-  //   prop: 'nptReason',
-  //   'min-width': '120px',
-  //   isTag: true,
-  //   dictType: DICT_TYPE.PMS_PROJECT_NPT_REASON
-  // },
+  },
+  {
+    label: '设备型号',
+    prop: 'equipmentType',
+    'min-width': '120px'
+  },
+  {
+    label: '上井次完井时间',
+    prop: 'latestWellDoneTime',
+    'min-width': '120px',
+    formatter: (row: List) =>
+      row.latestWellDoneTime ? dayjs(row.latestWellDoneTime).format('YYYY-MM-DD') : ''
+  },
+  {
+    label: '井深(m)',
+    children: [
+      {
+        label: '设计',
+        prop: 'designWellDepth',
+        'min-width': '120px'
+      },
+      {
+        label: '当前',
+        prop: 'currentDepth',
+        'min-width': '120px'
+      }
+    ]
+  },
+  {
+    label: '进尺(m)',
+    children: [
+      {
+        label: '日',
+        prop: 'dailyFootage',
+        'min-width': '120px'
+      },
+      {
+        label: '月',
+        prop: 'monthlyFootage',
+        'min-width': '120px'
+      },
+      {
+        label: '年累计',
+        prop: 'annualFootage',
+        'min-width': '120px'
+      }
+    ]
+  },
+  {
+    label: '总施工井数',
+    prop: 'totalConstructionWells',
+    'min-width': '120px'
+  },
+  {
+    label: '完工井数',
+    prop: 'completedWells',
+    'min-width': '120px'
+  },
+  {
+    label: '泥浆性能',
+    children: [
+      {
+        label: '密度(g/cm³)',
+        prop: 'mudDensity',
+        'min-width': '120px'
+      },
+      {
+        label: '粘度(S)',
+        prop: 'mudViscosity',
+        'min-width': '120px'
+      }
+    ]
+  },
+  {
+    label: '当日',
+    children: [
+      {
+        label: '用电量(kWh)',
+        prop: 'dailyPowerUsage',
+        'min-width': '120px'
+      },
+      {
+        label: '油耗(吨)',
+        prop: 'dailyFuel',
+        'min-width': '120px'
+      }
+    ]
+  },
   // {
   //   label: '施工开始日期',
   //   prop: 'constructionStartDate',
@@ -210,38 +231,91 @@ const columns = ref<Column[]>([
   //   'min-width': '120px',
   //   formatter: (row: List) => dayjs(row.constructionEndDate).format('YYYY-MM-DD HH:mm:ss')
   // },
-  // {
-  //   label: '生产动态',
-  //   prop: 'productionStatus',
-  //   'min-width': '120px'
-  // },
-  // {
-  //   label: '累计',
-  //   children: [
-  //     {
-  //       label: '注气量(万方)',
-  //       prop: 'totalGasInjection',
-  //       'min-width': '120px',
-  //       formatter: (row: List) => (row.totalGasInjection / 10000).toFixed(2)
-  //     },
-  //     {
-  //       label: '注水量(方)',
-  //       prop: 'totalWaterInjection',
-  //       'min-width': '120px'
-  //     },
-  //     {
-  //       label: '完工井次',
-  //       prop: 'cumulativeCompletion',
-  //       'min-width': '120px'
-  //     }
-  //   ]
-  // },
-  // {
-  //   label: '产能(万方)',
-  //   prop: 'capacity',
-  //   'min-width': '120px',
-  //   formatter: (row: List) => (row.capacity / 10000).toFixed(2)
-  // }
+  {
+    label: '水平段长度(m)',
+    prop: 'lateralLength',
+    'min-width': '120px'
+  },
+  {
+    label: '井斜(°)',
+    prop: 'wellInclination',
+    'min-width': '120px'
+  },
+  {
+    label: '方位(°)',
+    prop: 'azimuth',
+    'min-width': '120px'
+  },
+  {
+    label: '设计井身结构',
+    prop: 'designWellStruct',
+    'min-width': '120px'
+  },
+  {
+    label: '生产动态',
+    prop: 'productionStatus',
+    'min-width': '120px'
+  },
+  {
+    label: '项目',
+    prop: 'contractName',
+    'min-width': '120px'
+  },
+  {
+    label: '进尺工作时间(H)',
+    prop: 'drillingWorkingTime',
+    'min-width': '120px'
+  },
+  {
+    label: '其它生产时间(H)',
+    prop: 'otherProductionTime',
+    'min-width': '120px'
+  },
+  {
+    label: '非生产时间',
+    children: [
+      {
+        label: '事故(H)',
+        prop: 'accidentTime',
+        'min-width': '120px'
+      },
+      {
+        label: '修理(H)',
+        prop: 'repairTime',
+        'min-width': '120px'
+      },
+      {
+        label: '自停(H)',
+        prop: 'selfStopTime',
+        'min-width': '120px'
+      },
+      {
+        label: '复杂(H)',
+        prop: 'complexityTime',
+        'min-width': '120px'
+      },
+      {
+        label: '搬迁(H)',
+        prop: 'relocationTime',
+        'min-width': '120px'
+      },
+      {
+        label: '整改(H)',
+        prop: 'rectificationTime',
+        'min-width': '120px'
+      },
+      {
+        label: '等停(H)',
+        prop: 'waitingStopTime',
+        'min-width': '120px'
+      },
+      {
+        label: '冬休(H)',
+        prop: 'winterBreakTime',
+        'min-width': '120px'
+      }
+    ]
+  }
 ])
 
 const getTextWidth = (text: string, fontSize = 12) => {

+ 127 - 121
src/views/pms/iotrydailyreport/xapproval.vue

@@ -53,6 +53,7 @@ interface Column {
   label: string
   'min-width'?: string
   isTag?: boolean
+  fixed?: 'left' | 'right'
   formatter?: (row: List) => any
   children?: Column[]
   dictType?: string
@@ -63,29 +64,29 @@ const columns = ref<Column[]>([
     label: '日期',
     prop: 'createTime',
     'min-width': '120px',
-    formatter: (row: List) => dayjs(row.createTime).format('YYYY-MM-DD')
+    formatter: (row: List) => dayjs(row.createTime).format('YYYY-MM-DD'),
+    fixed: 'left'
   },
   {
     label: '施工队伍',
     prop: 'deptName',
-    'min-width': '120px'
-  },
-  {
-    label: '项目',
-    prop: 'contractName',
-    'min-width': '120px'
+    'min-width': '120px',
+    fixed: 'left'
   },
+
   {
     label: '任务',
     prop: 'taskName',
-    'min-width': '120px'
+    'min-width': '120px',
+    fixed: 'left'
   },
   {
     label: '施工状态',
     prop: 'repairStatus',
     'min-width': '120px',
     isTag: true,
-    dictType: DICT_TYPE.PMS_PROJECT_TASK_RY_REPAIR_SCHEDULE
+    dictType: DICT_TYPE.PMS_PROJECT_TASK_RY_REPAIR_SCHEDULE,
+    fixed: 'left'
   },
   {
     label: '审批状态',
@@ -106,59 +107,59 @@ const columns = ref<Column[]>([
           return ''
       }
     }
-  }
-  // {
-  //   label: '总施工井数',
-  //   prop: 'totalConstructionWells',
-  //   'min-width': '120px'
-  // },
-  // {
-  //   label: '完工井数',
-  //   prop: 'completedWells',
-  //   'min-width': '120px'
-  // },
-  // {
-  //   label: '施工工艺',
-  //   prop: 'technique',
-  //   'min-width': '120px',
-  //   isTag: true,
-  //   dictType: DICT_TYPE.PMS_PROJECT_RY_TECHNOLOGY
-  // },
-  // {
-  //   label: '井别',
-  //   prop: 'wellCategory',
-  //   'min-width': '120px'
-  // },
-  // {
-  //   label: '井深(m)',
-  //   prop: 'designWellDepth',
-  //   'min-width': '120px'
-  // },
-  // {
-  //   label: '套生段产管尺寸(mm)',
-  //   prop: 'casingPipeSize',
-  //   'min-width': '120px'
-  // },
-  // {
-  //   label: '井控级别',
-  //   prop: 'wellControlLevel',
-  //   'min-width': '120px'
-  // },
-  // {
-  //   label: '当日',
-  //   children: [
-  //     {
-  //       label: '用电量(kWh)',
-  //       prop: 'dailyPowerUsage',
-  //       'min-width': '120px'
-  //     },
-  //     {
-  //       label: '油耗(吨)',
-  //       prop: 'dailyFuel',
-  //       'min-width': '120px'
-  //     }
-  //   ]
-  // },
+  },
+  {
+    label: '总施工井数',
+    prop: 'totalConstructionWells',
+    'min-width': '120px'
+  },
+  {
+    label: '完工井数',
+    prop: 'completedWells',
+    'min-width': '120px'
+  },
+  {
+    label: '施工工艺',
+    prop: 'technique',
+    'min-width': '120px',
+    isTag: true,
+    dictType: DICT_TYPE.PMS_PROJECT_RY_TECHNOLOGY
+  },
+  {
+    label: '井别',
+    prop: 'wellCategory',
+    'min-width': '120px'
+  },
+  {
+    label: '井深(m)',
+    prop: 'designWellDepth',
+    'min-width': '120px'
+  },
+  {
+    label: '套生段产管尺寸(mm)',
+    prop: 'casingPipeSize',
+    'min-width': '120px'
+  },
+  {
+    label: '井控级别',
+    prop: 'wellControlLevel',
+    'min-width': '120px'
+  },
+  {
+    label: '当日',
+    children: [
+      {
+        label: '用电量(kWh)',
+        prop: 'dailyPowerUsage',
+        'min-width': '120px'
+      },
+      {
+        label: '油耗(吨)',
+        prop: 'dailyFuel',
+        'min-width': '120px'
+      }
+    ]
+  },
   // {
   //   label: '施工开始日期',
   //   prop: 'constructionStartDate',
@@ -171,65 +172,70 @@ const columns = ref<Column[]>([
   //   'min-width': '120px',
   //   formatter: (row: List) => dayjs(row.constructionEndDate).format('YYYY-MM-DD HH:mm:ss')
   // },
-  // {
-  //   label: '目前工序',
-  //   prop: 'currentOperation',
-  //   'min-width': '120px'
-  // },
-  // {
-  //   label: '下步工序',
-  //   prop: 'nextPlan',
-  //   'min-width': '120px'
-  // },
-  // {
-  //   label: '运行时效',
-  //   prop: 'transitTime',
-  //   'min-width': '120px',
-  //   formatter: (row: List) => (row.transitTime * 100).toFixed(2) + '%'
-  // },
-  // {
-  //   label: '额定生产时间(H)',
-  //   prop: 'ratedProductionTime',
-  //   'min-width': '120px'
-  // },
-  // {
-  //   label: '生产时间(H)',
-  //   prop: 'productionTime',
-  //   'min-width': '120px'
-  // },
-  // {
-  //   label: '非生产时间(H)',
-  //   prop: 'nonProductionTime',
-  //   'min-width': '120px'
-  // },
-  // {
-  //   label: '非生产时间原因',
-  //   prop: 'ryNptReason',
-  //   'min-width': '120px',
-  //   isTag: true,
-  //   dictType: DICT_TYPE.PMS_PROJECT_RY_NPT_REASON
-  // },
-  // {
-  //   label: '生产动态',
-  //   prop: 'productionStatus',
-  //   'min-width': '120px'
-  // },
-  // {
-  //   label: '全员数量',
-  //   prop: 'totalStaffNum',
-  //   'min-width': '120px'
-  // },
-  // {
-  //   label: '在岗人数',
-  //   prop: 'onDutyStaffNum',
-  //   'min-width': '120px',
-  //   formatter: (row: List) => (Number(row.totalStaffNum) || 0) - (Number(row.offDutyStaffNum) || 0)
-  // },
-  // {
-  //   label: '休假人员数量',
-  //   prop: 'leaveStaffNum',
-  //   'min-width': '120px'
-  // }
+  {
+    label: '目前工序',
+    prop: 'currentOperation',
+    'min-width': '120px'
+  },
+  {
+    label: '下步工序',
+    prop: 'nextPlan',
+    'min-width': '120px'
+  },
+  {
+    label: '运行时效',
+    prop: 'transitTime',
+    'min-width': '120px',
+    formatter: (row: List) => (row.transitTime * 100).toFixed(2) + '%'
+  },
+  {
+    label: '额定生产时间(H)',
+    prop: 'ratedProductionTime',
+    'min-width': '120px'
+  },
+  {
+    label: '生产时间(H)',
+    prop: 'productionTime',
+    'min-width': '120px'
+  },
+  {
+    label: '非生产时间(H)',
+    prop: 'nonProductionTime',
+    'min-width': '120px'
+  },
+  {
+    label: '非生产时间原因',
+    prop: 'ryNptReason',
+    'min-width': '120px',
+    isTag: true,
+    dictType: DICT_TYPE.PMS_PROJECT_RY_NPT_REASON
+  },
+  {
+    label: '生产动态',
+    prop: 'productionStatus',
+    'min-width': '120px'
+  },
+  {
+    label: '项目',
+    prop: 'contractName',
+    'min-width': '120px'
+  },
+  {
+    label: '全员数量',
+    prop: 'totalStaffNum',
+    'min-width': '120px'
+  },
+  {
+    label: '在岗人数',
+    prop: 'onDutyStaffNum',
+    'min-width': '120px',
+    formatter: (row: List) => (Number(row.totalStaffNum) || 0) - (Number(row.offDutyStaffNum) || 0)
+  },
+  {
+    label: '休假人员数量',
+    prop: 'leaveStaffNum',
+    'min-width': '120px'
+  }
 ])
 
 const getTextWidth = (text: string, fontSize = 12) => {