فهرست منبع

✨ feat(日报): 非生产时效

Zimo 15 ساعت پیش
والد
کامیت
1924041176

+ 11 - 0
src/views/pms/iotrhdailyreport/approval.vue

@@ -53,6 +53,7 @@ interface List {
   status: number // 状态
   opinion: string // 审核意见
   gasElectricityRatio: number // 气电比
+  nonProductionRate: number // 非生产时效
 }
 
 interface Column {
@@ -257,6 +258,16 @@ const columns = ref<Column[]>([
     prop: 'otherNptReason',
     'min-width': '120px'
   },
+  {
+    label: '非生产时效',
+    prop: 'nonProductionRate',
+    'min-width': '120px',
+    formatter: (row: List) => {
+      const nonProductionRate = row?.nonProductionRate ?? 0
+
+      return (nonProductionRate * 100).toFixed(2) + '%'
+    }
+  },
   // {
   //   label: '非生产时间原因',
   //   prop: 'nptReason',

+ 11 - 0
src/views/pms/iotrhdailyreport/fill.vue

@@ -53,6 +53,7 @@ interface List {
   status: number // 状态
   opinion: string // 审核意见
   gasElectricityRatio: number // 气电比
+  nonProductionRate: number // 非生产时效
 }
 
 interface Column {
@@ -257,6 +258,16 @@ const columns = ref<Column[]>([
     prop: 'otherNptReason',
     'min-width': '120px'
   },
+  {
+    label: '非生产时效',
+    prop: 'nonProductionRate',
+    'min-width': '120px',
+    formatter: (row: List) => {
+      const nonProductionRate = row?.nonProductionRate ?? 0
+
+      return (nonProductionRate * 100).toFixed(2) + '%'
+    }
+  },
   // {
   //   label: '非生产时间原因',
   //   prop: 'nptReason',

+ 21 - 0
src/views/pms/iotrhdailyreport/index.vue

@@ -368,6 +368,14 @@
               :min-width="columnWidths.otherNptReason.width"
               resizable
             />
+            <el-table-column
+              label="非生产时效"
+              align="center"
+              prop="nonProductionRate"
+              :formatter="nonProductionRateFormatter"
+              :min-width="columnWidths.nonProductionRate.width"
+              resizable
+            />
             <!-- <el-table-column
               :label="t('project.nptReason')"
               align="center"
@@ -482,6 +490,7 @@
               :min-width="columnWidths.capacity.width"
               resizable
             />
+
             <!-- <el-table-column label="操作" align="center" fixed="right">
               <template #default="scope">
                 <el-button
@@ -816,9 +825,21 @@ const columnWidths = ref<
     prop: 'capacity',
     width: '120px',
     fn: (row: IotRhDailyReportVO) => gasInjectionFormatter(null, null, row.capacity, null)
+  },
+  nonProductionRate: {
+    label: '非生产时效',
+    prop: 'nonProductionRate',
+    width: '120px',
+    fn: (row: IotRhDailyReportVO) => nonProductionRateFormatter(row)
   }
 })
 
+const nonProductionRateFormatter = (row: any) => {
+  const nonProductionRate = row?.nonProductionRate ?? 0
+
+  return (nonProductionRate * 100).toFixed(2) + '%'
+}
+
 const gasElectricityRatioFormatter = (row: any) => {
   const gasElectricityRatio = row?.gasElectricityRatio ?? 0
 

+ 11 - 0
src/views/pms/iotrydailyreport/approval.vue

@@ -75,6 +75,7 @@ interface List {
   equipmentType: string
   transitTime: number
   lastCurrentDepth: number
+  nonProductionRate: number
 }
 
 interface Column {
@@ -344,6 +345,16 @@ const columns = ref<Column[]>([
     label: '其他非生产时间原因',
     prop: 'otherNptReason',
     'min-width': '120px'
+  },
+  {
+    label: '非生产时效',
+    prop: 'nonProductionRate',
+    'min-width': '120px',
+    formatter: (row: List) => {
+      const nonProductionRate = row?.nonProductionRate ?? 0
+
+      return (nonProductionRate * 100).toFixed(2) + '%'
+    }
   }
 ])
 

+ 11 - 0
src/views/pms/iotrydailyreport/fill.vue

@@ -75,6 +75,7 @@ interface List {
   equipmentType: string
   transitTime: number
   lastCurrentDepth: number
+  nonProductionRate: number
 }
 
 interface Column {
@@ -344,6 +345,16 @@ const columns = ref<Column[]>([
     label: '其他非生产时间原因',
     prop: 'otherNptReason',
     'min-width': '120px'
+  },
+  {
+    label: '非生产时效',
+    prop: 'nonProductionRate',
+    'min-width': '120px',
+    formatter: (row: List) => {
+      const nonProductionRate = row?.nonProductionRate ?? 0
+
+      return (nonProductionRate * 100).toFixed(2) + '%'
+    }
   }
 ])
 

+ 20 - 0
src/views/pms/iotrydailyreport/index.vue

@@ -431,6 +431,14 @@
               :min-width="columnWidths.otherNptReason.width"
               resizable
             />
+            <el-table-column
+              label="非生产时效"
+              align="center"
+              prop="nonProductionRate"
+              :formatter="nonProductionRateFormatter"
+              :min-width="columnWidths.nonProductionRate.width"
+              resizable
+            />
             <el-table-column label="操作" align="center" fixed="right">
               <template #default="scope">
                 <el-button
@@ -757,9 +765,21 @@ const columnWidths = ref<
     label: '其他非生产时间原因',
     prop: 'otherNptReason',
     width: '120px'
+  },
+  nonProductionRate: {
+    label: '非生产时效',
+    prop: 'nonProductionRate',
+    width: '120px',
+    fn: (row: any) => nonProductionRateFormatter(row)
   }
 })
 
+const nonProductionRateFormatter = (row: any) => {
+  const nonProductionRate = row?.nonProductionRate ?? 0
+
+  return (nonProductionRate * 100).toFixed(2) + '%'
+}
+
 // 计算文本宽度
 const getTextWidth = (text: string, fontSize = 12) => {
   const span = document.createElement('span')

+ 11 - 0
src/views/pms/iotrydailyreport/xapproval.vue

@@ -57,6 +57,7 @@ interface List {
   opinion: string
   offDutyStaffNum: number
   remark: string
+  nonProductionRate: number
 }
 
 interface Column {
@@ -279,6 +280,16 @@ const columns = ref<Column[]>([
     prop: 'otherNptReason',
     'min-width': '120px'
   },
+  {
+    label: '非生产时效',
+    prop: 'nonProductionRate',
+    'min-width': '120px',
+    formatter: (row: List) => {
+      const nonProductionRate = row?.nonProductionRate ?? 0
+
+      return (nonProductionRate * 100).toFixed(2) + '%'
+    }
+  },
   {
     label: '生产动态',
     prop: 'productionStatus',

+ 11 - 0
src/views/pms/iotrydailyreport/xfill.vue

@@ -57,6 +57,7 @@ interface List {
   opinion: string
   offDutyStaffNum: number
   remark: string
+  nonProductionRate: number
 }
 
 interface Column {
@@ -279,6 +280,16 @@ const columns = ref<Column[]>([
     prop: 'otherNptReason',
     'min-width': '120px'
   },
+  {
+    label: '非生产时效',
+    prop: 'nonProductionRate',
+    'min-width': '120px',
+    formatter: (row: List) => {
+      const nonProductionRate = row?.nonProductionRate ?? 0
+
+      return (nonProductionRate * 100).toFixed(2) + '%'
+    }
+  },
   // {
   //   label: '非生产时间原因',
   //   prop: 'ryNptReason',

+ 20 - 0
src/views/pms/iotrydailyreport/xjindex.vue

@@ -383,6 +383,14 @@
               :min-width="columnWidths.otherNptReason.width"
               resizable
             />
+            <el-table-column
+              label="非生产时效"
+              align="center"
+              prop="nonProductionRate"
+              :formatter="nonProductionRateFormatter"
+              :min-width="columnWidths.nonProductionRate.width"
+              resizable
+            />
             <!-- <el-table-column
               :label="t('project.nptReason')"
               align="center"
@@ -785,9 +793,21 @@ const columnWidths = ref<
     label: '休假人员数量',
     prop: 'leaveStaffNum',
     width: '120px'
+  },
+  nonProductionRate: {
+    label: '非生产时效',
+    prop: 'nonProductionRate',
+    width: '120px',
+    fn: (row: any) => nonProductionRateFormatter(row)
   }
 })
 
+const nonProductionRateFormatter = (row: any) => {
+  const nonProductionRate = row?.nonProductionRate ?? 0
+
+  return (nonProductionRate * 100).toFixed(2) + '%'
+}
+
 // 计算文本宽度
 const getTextWidth = (text: string, fontSize = 12) => {
   const span = document.createElement('span')