yanghao 4 일 전
부모
커밋
b8a5dac979

+ 1 - 1
.env.local

@@ -4,7 +4,7 @@ NODE_ENV=development
 VITE_DEV=true
 
 # 请求路径  http://192.168.188.200:48080  https://iot.deepoil.cc:5443  http://172.26.0.56:48080  http://192.168.188.198:48080
-VITE_BASE_URL='https://iot.deepoil.cc:5443'
+VITE_BASE_URL='http://192.168.188.86:48080'
 
 # 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
 VITE_UPLOAD_TYPE=server

+ 20 - 3
src/views/pms/constructionDailyReport/components/ConstructionDailyReportFormSection.vue

@@ -39,6 +39,19 @@ function isFieldDisabled(field: ConstructionDailyReportField) {
 function getDictOptions(field: ConstructionDailyReportField) {
   return field.dictType ? getStrDictOptions(field.dictType) : []
 }
+
+function getNumberSuffix(field: ConstructionDailyReportField) {
+  return field.suffix || ''
+}
+
+function getGridColumnsClass() {
+  return props.section.columns === 3 ? 'grid-cols-3' : 'grid-cols-2'
+}
+
+function getFieldClass(field: ConstructionDailyReportField) {
+  if (field.span !== 2) return undefined
+  return props.section.columns === 3 ? 'col-span-3' : 'col-span-2'
+}
 </script>
 
 <template>
@@ -49,13 +62,13 @@ function getDictOptions(field: ConstructionDailyReportField) {
         {{ props.section.title }}
       </div>
     </div>
-    <div class="grid grid-cols-2 gap-4">
+    <div class="grid gap-4" :class="getGridColumnsClass()">
       <el-form-item
         v-for="field in props.section.fields"
         :key="`${props.section.title}-${String(field.prop)}-${field.label}`"
         :label="field.label"
         :prop="field.prop"
-        :class="{ 'col-span-2': field.span === 2 }"
+        :class="getFieldClass(field)"
       >
         <el-input
           v-if="field.type === 'textarea'"
@@ -88,7 +101,11 @@ function getDictOptions(field: ConstructionDailyReportField) {
           :precision="field.precision"
           :disabled="isFieldDisabled(field)"
           @update:model-value="updateField(field.prop, $event)"
-        />
+        >
+          <template v-if="getNumberSuffix(field)" #suffix>
+            <span class="text-[var(--el-text-color-secondary)]">{{ getNumberSuffix(field) }}</span>
+          </template>
+        </el-input-number>
         <el-input
           v-else
           size="default"

+ 53 - 8
src/views/pms/constructionDailyReport/components/report-config.ts

@@ -22,6 +22,19 @@ export interface ConstructionDailyReportRow {
   cengshu?: number | null
   dailyFuel?: number | null
   nonProductionTime?: number | null
+  accidentTime?: number | null
+  repairTime?: number | null
+  selfStopTime?: number | null
+  complexityTime?: number | null
+  relocationTime?: number | null
+  rectificationTime?: number | null
+  waitingStopTime?: number | null
+  winterBreakTime?: number | null
+  partyaDesign?: number | null
+  partyaPrepare?: number | null
+  partyaResource?: number | null
+  otherNptTime?: number | null
+  otherNptReason?: string
   nptReason?: string
   singleWellWorkload?: number | string | null
   productionStatus?: string
@@ -55,12 +68,14 @@ export interface ConstructionDailyReportField {
   type?: 'text' | 'number' | 'textarea' | 'select'
   span?: 1 | 2
   precision?: number
+  suffix?: string
   editableInEdit?: boolean
   dictType?: string
 }
 
 export interface ConstructionDailyReportSection {
   title: string
+  columns?: 2 | 3
   fields: ConstructionDailyReportField[]
 }
 
@@ -73,7 +88,6 @@ export const tableColumns: Array<{
 }> = [
   { prop: 'reportName', label: '日报名称', minWidth: 180, fixed: 'left' },
   { prop: 'createTime', label: '创建日期', width: 120 },
-  // { prop: 'constructionEndDate', label: '施工结束日期', width: 120 },
   { prop: 'projectName', label: '项目', minWidth: 160, fixed: 'left' },
   { prop: 'location', label: '施工区域', minWidth: 140 },
   { prop: 'deptName', label: '队伍', minWidth: 140 },
@@ -87,7 +101,6 @@ export const tableColumns: Array<{
   { prop: 'monthWorkingWells', label: '当月作业井数', width: 120 },
   { prop: 'monthWorkingLayers', label: '当月作业层数', width: 120 },
   { prop: 'dailyFuel', label: '当日油耗(L)', width: 110 },
-  { prop: 'nonProductionTime', label: '当日非生产时间', width: 130 },
   { prop: 'nptReason', label: '造成非生产时间原因', minWidth: 180 },
   { prop: 'singleWellWorkload', label: '单井工作量', width: 120 },
   { prop: 'productionStatus', label: '施工动态', minWidth: 180 },
@@ -149,12 +162,6 @@ export const formSections: ConstructionDailyReportSection[] = [
         type: 'number',
         editableInEdit: true
       },
-      {
-        prop: 'nonProductionTime',
-        label: '当日非生产时间',
-        type: 'number',
-        editableInEdit: true
-      },
       { prop: 'singleWellWorkload', label: '单井工作量', editableInEdit: true },
       { prop: 'planWorkingLayers', label: '本月计划层数', type: 'number' }
     ]
@@ -179,6 +186,31 @@ export const formSections: ConstructionDailyReportSection[] = [
       { prop: 'weather', label: '天气', editableInEdit: true },
       { prop: 'temperature', label: '气温(℃)', editableInEdit: true }
     ]
+  },
+  {
+    title: '非生产时间',
+    columns: 3,
+    fields: [
+      { prop: 'accidentTime', label: '工程质量', type: 'number', suffix: '小时(H)', editableInEdit: true },
+      { prop: 'repairTime', label: '设备故障', type: 'number', suffix: '小时(H)', editableInEdit: true },
+      { prop: 'selfStopTime', label: '设备保养', type: 'number', suffix: '小时(H)', editableInEdit: true },
+      { prop: 'complexityTime', label: '技术受限', type: 'number', suffix: '小时(H)', editableInEdit: true },
+      { prop: 'relocationTime', label: '生产配合', type: 'number', suffix: '小时(H)', editableInEdit: true },
+      { prop: 'rectificationTime', label: '生产组织', type: 'number', suffix: '小时(H)', editableInEdit: true },
+      { prop: 'waitingStopTime', label: '不可抗力', type: 'number', suffix: '小时(H)', editableInEdit: true },
+      { prop: 'winterBreakTime', label: '待命', type: 'number', suffix: '小时(H)', editableInEdit: true },
+      { prop: 'partyaDesign', label: '甲方设计', type: 'number', suffix: '小时(H)', editableInEdit: true },
+      { prop: 'partyaPrepare', label: '甲方准备', type: 'number', suffix: '小时(H)', editableInEdit: true },
+      { prop: 'partyaResource', label: '甲方资源', type: 'number', suffix: '小时(H)', editableInEdit: true },
+      { prop: 'otherNptTime', label: '其它非生产时间', type: 'number', suffix: '小时(H)', editableInEdit: true },
+      {
+        prop: 'otherNptReason',
+        label: '其它非生产时间原因',
+        type: 'textarea',
+        span: 2,
+        editableInEdit: true
+      }
+    ]
   }
 ]
 
@@ -193,6 +225,19 @@ export function createEmptyConstructionDailyReport(): ConstructionDailyReportRow
     cengshu: null,
     dailyFuel: null,
     nonProductionTime: null,
+    accidentTime: null,
+    repairTime: null,
+    selfStopTime: null,
+    complexityTime: null,
+    relocationTime: null,
+    rectificationTime: null,
+    waitingStopTime: null,
+    winterBreakTime: null,
+    partyaDesign: null,
+    partyaPrepare: null,
+    partyaResource: null,
+    otherNptTime: null,
+    otherNptReason: '',
     singleWellWorkload: null,
     planWorkingLayers: null
   }