|
|
@@ -1,851 +1,178 @@
|
|
|
-<template>
|
|
|
- <el-row :gutter="20">
|
|
|
- <el-col :span="4" :xs="24">
|
|
|
- <ContentWrap class="h-1/1">
|
|
|
- <DeptTree2 :deptId="rootDeptId" @node-click="handleDeptNodeClick" />
|
|
|
- </ContentWrap>
|
|
|
- </el-col>
|
|
|
- <el-col :span="20" :xs="24">
|
|
|
- <ContentWrap>
|
|
|
- <!-- 搜索工作栏 -->
|
|
|
- <el-form
|
|
|
- class="-mb-15px"
|
|
|
- :model="queryParams"
|
|
|
- ref="queryFormRef"
|
|
|
- :inline="true"
|
|
|
- label-width="68px"
|
|
|
- >
|
|
|
- <el-form-item label="项目" prop="contractName">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.contractName"
|
|
|
- placeholder="请输入项目"
|
|
|
- clearable
|
|
|
- @keyup.enter="handleQuery"
|
|
|
- class="!w-240px"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="任务" prop="taskName">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.taskName"
|
|
|
- placeholder="请输入任务"
|
|
|
- clearable
|
|
|
- @keyup.enter="handleQuery"
|
|
|
- class="!w-240px"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="创建时间" prop="createTime">
|
|
|
- <el-date-picker
|
|
|
- v-model="queryParams.createTime"
|
|
|
- value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
- type="daterange"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期"
|
|
|
- :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
|
|
- class="!w-220px"
|
|
|
- :shortcuts="rangeShortcuts"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-button @click="handleQuery"
|
|
|
- ><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button
|
|
|
- >
|
|
|
- <el-button @click="resetQuery"
|
|
|
- ><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- plain
|
|
|
- @click="openForm('create')"
|
|
|
- v-hasPermi="['pms:iot-rd-daily-report:create']"
|
|
|
- >
|
|
|
- <Icon icon="ep:plus" class="mr-5px" /> 新增
|
|
|
- </el-button>
|
|
|
- <el-button type="success" plain @click="handleExport" :loading="exportLoading">
|
|
|
- <Icon icon="ep:download" class="mr-5px" /> 导出
|
|
|
- </el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- </ContentWrap>
|
|
|
- <!-- 列表 -->
|
|
|
- <ContentWrap ref="tableContainerRef">
|
|
|
- <el-table
|
|
|
- ref="tableRef"
|
|
|
- v-loading="loading"
|
|
|
- :data="list"
|
|
|
- :stripe="true"
|
|
|
- :style="{ width: '100%' }"
|
|
|
- max-height="600"
|
|
|
- show-overflow-tooltip
|
|
|
- border
|
|
|
- >
|
|
|
- <el-table-column
|
|
|
- label="创建时间"
|
|
|
- align="center"
|
|
|
- prop="createTime"
|
|
|
- :formatter="dateFormatter2"
|
|
|
- :min-width="columnWidths.createTime.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="施工队伍"
|
|
|
- align="center"
|
|
|
- prop="deptName"
|
|
|
- :min-width="columnWidths.deptName.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
-
|
|
|
- <el-table-column
|
|
|
- label="任务"
|
|
|
- align="center"
|
|
|
- prop="taskName"
|
|
|
- :min-width="columnWidths.taskName.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
-
|
|
|
- <el-table-column
|
|
|
- :label="t('project.status')"
|
|
|
- align="center"
|
|
|
- prop="rdStatus"
|
|
|
- :min-width="columnWidths.rdStatus.width"
|
|
|
- resizable
|
|
|
- >
|
|
|
- <template #default="scope">
|
|
|
- <dict-tag :type="DICT_TYPE.PMS_PROJECT_RD_STATUS" :value="scope.row.rdStatus" />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column
|
|
|
- label="当日生产动态"
|
|
|
- align="center"
|
|
|
- prop="productionStatus"
|
|
|
- :min-width="columnWidths.productionStatus.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="下步工作计划"
|
|
|
- align="center"
|
|
|
- prop="nextPlan"
|
|
|
- :min-width="columnWidths.nextPlan.width"
|
|
|
- fixed-width
|
|
|
- />
|
|
|
-
|
|
|
- <!--
|
|
|
- <el-table-column label="项目类别(钻井 修井 注氮 酸化压裂... )" align="center" prop="projectClassification" />
|
|
|
- <el-table-column label="施工工艺" align="center" prop="techniqueIds" /> -->
|
|
|
- <!--
|
|
|
- <el-table-column label="施工设备" align="center" prop="deviceIds" /> -->
|
|
|
- <!--
|
|
|
- <el-table-column label="时间节点-结束" align="center" prop="endTime" /> -->
|
|
|
- <el-table-column align="center" label="当日">
|
|
|
- <el-table-column
|
|
|
- label="施工井"
|
|
|
- align="center"
|
|
|
- prop="cumulativeWorkingWell"
|
|
|
- :min-width="columnWidths.cumulativeWorkingWell.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="施工层"
|
|
|
- align="center"
|
|
|
- prop="cumulativeWorkingLayers"
|
|
|
- :min-width="columnWidths.cumulativeWorkingLayers.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="泵车台次"
|
|
|
- align="center"
|
|
|
- prop="dailyPumpTrips"
|
|
|
- :min-width="columnWidths.dailyPumpTrips.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="仪表/混砂"
|
|
|
- align="center"
|
|
|
- prop="dailyToolsSand"
|
|
|
- :min-width="columnWidths.dailyToolsSand.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="趟数"
|
|
|
- align="center"
|
|
|
- prop="runCount"
|
|
|
- :min-width="columnWidths.runCount.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="桥塞"
|
|
|
- align="center"
|
|
|
- prop="bridgePlug"
|
|
|
- :min-width="columnWidths.bridgePlug.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="水方量"
|
|
|
- align="center"
|
|
|
- prop="waterVolume"
|
|
|
- :min-width="columnWidths.waterVolume.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="时间H"
|
|
|
- align="center"
|
|
|
- prop="hourCount"
|
|
|
- :min-width="columnWidths.hourCount.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="油耗(L)"
|
|
|
- align="center"
|
|
|
- prop="dailyFuel"
|
|
|
- :min-width="columnWidths.dailyFuel.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
-
|
|
|
- <el-table-column
|
|
|
- label="外租设备"
|
|
|
- align="center"
|
|
|
- prop="externalRental"
|
|
|
- :min-width="columnWidths.externalRental.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="故障情况"
|
|
|
- align="center"
|
|
|
- prop="malfunction"
|
|
|
- :min-width="columnWidths.malfunction.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="故障误工H"
|
|
|
- align="center"
|
|
|
- prop="faultDowntime"
|
|
|
- :min-width="columnWidths.faultDowntime.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
- <el-table-column label="非生产时间" align="center">
|
|
|
- <el-table-column
|
|
|
- label="工程质量"
|
|
|
- align="center"
|
|
|
- prop="accidentTime"
|
|
|
- :min-width="columnWidths.accidentTime.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="设备故障"
|
|
|
- align="center"
|
|
|
- prop="repairTime"
|
|
|
- :min-width="columnWidths.repairTime.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="设备保养"
|
|
|
- align="center"
|
|
|
- prop="selfStopTime"
|
|
|
- :min-width="columnWidths.selfStopTime.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="技术受限"
|
|
|
- align="center"
|
|
|
- prop="complexityTime"
|
|
|
- :min-width="columnWidths.complexityTime.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="生产配合"
|
|
|
- align="center"
|
|
|
- prop="relocationTime"
|
|
|
- :min-width="columnWidths.relocationTime.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="生产组织"
|
|
|
- align="center"
|
|
|
- prop="rectificationTime"
|
|
|
- :min-width="columnWidths.rectificationTime.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="不可抗力"
|
|
|
- align="center"
|
|
|
- prop="waitingStopTime"
|
|
|
- :min-width="columnWidths.waitingStopTime.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="待命"
|
|
|
- align="center"
|
|
|
- prop="winterBreakTime"
|
|
|
- :min-width="columnWidths.winterBreakTime.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="甲方设计"
|
|
|
- align="center"
|
|
|
- prop="partyaDesign"
|
|
|
- :min-width="columnWidths.partyaDesign.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="甲方准备"
|
|
|
- align="center"
|
|
|
- prop="partyaPrepare"
|
|
|
- :min-width="columnWidths.partyaPrepare.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="甲方资源"
|
|
|
- align="center"
|
|
|
- prop="partyaResource"
|
|
|
- :min-width="columnWidths.partyaResource.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="其它非生产时间"
|
|
|
- align="center"
|
|
|
- prop="otherNptTime"
|
|
|
- :min-width="columnWidths.otherNptTime.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="其他非生产时间原因"
|
|
|
- align="center"
|
|
|
- prop="otherNptReason"
|
|
|
- :min-width="columnWidths.otherNptReason.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="非生产时间填写"
|
|
|
- align="center"
|
|
|
- prop="nonProductFlag"
|
|
|
- :min-width="110"
|
|
|
- >
|
|
|
- <template #default="scope">
|
|
|
- <el-tag
|
|
|
- :type="
|
|
|
- scope.row.nonProductFlag || scope.row.processInstanceId === '2'
|
|
|
- ? 'success'
|
|
|
- : 'danger'
|
|
|
- "
|
|
|
- >
|
|
|
- {{
|
|
|
- scope.row.nonProductFlag || scope.row.processInstanceId === '2'
|
|
|
- ? '已填写'
|
|
|
- : '未填写'
|
|
|
- }}
|
|
|
- </el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="非生产时效"
|
|
|
- align="center"
|
|
|
- prop="nonProductionRate"
|
|
|
- :min-width="80"
|
|
|
- resizable
|
|
|
- :formatter="(row) => (Number(row.nonProductionRate ?? 0) * 100).toFixed(2) + '%'"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="项目"
|
|
|
- align="center"
|
|
|
- prop="contractName"
|
|
|
- :min-width="columnWidths.contractName.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="时间节点"
|
|
|
- align="center"
|
|
|
- prop="timeRange"
|
|
|
- :min-width="columnWidths.timeRange.width"
|
|
|
- resizable
|
|
|
- />
|
|
|
- <el-table-column label="审批状态" align="center" prop="auditStatus" :min-width="84">
|
|
|
- <template #default="scope">
|
|
|
- <el-tag v-if="scope.row.auditStatus === 0" type="info">
|
|
|
- {{ '待提交' }}
|
|
|
- </el-tag>
|
|
|
- <el-tag v-else-if="scope.row.auditStatus === 10">
|
|
|
- {{ '待审批' }}
|
|
|
- </el-tag>
|
|
|
- <el-tag v-else-if="scope.row.auditStatus === 20" type="success">
|
|
|
- {{ '审批通过' }}
|
|
|
- </el-tag>
|
|
|
- <el-tag v-else-if="scope.row.auditStatus === 30" type="danger">
|
|
|
- {{ '审批拒绝' }}
|
|
|
- </el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column label="操作" align="center" min-width="120px" fixed="right">
|
|
|
- <template #default="scope">
|
|
|
- <el-button
|
|
|
- link
|
|
|
- type="success"
|
|
|
- @click="handleDetail(scope.row.id)"
|
|
|
- v-hasPermi="['pms:iot-rd-daily-report:query']"
|
|
|
- >
|
|
|
- 查看
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- link
|
|
|
- type="warning"
|
|
|
- @click="handleApprove(scope.row.id)"
|
|
|
- v-hasPermi="['pms:iot-rd-daily-report:update']"
|
|
|
- v-if="scope.row.auditStatus === 10"
|
|
|
- >
|
|
|
- 审批
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <!-- 分页 -->
|
|
|
- <Pagination
|
|
|
- :total="total"
|
|
|
- v-model:page="queryParams.pageNo"
|
|
|
- v-model:limit="queryParams.pageSize"
|
|
|
- @pagination="getList"
|
|
|
- />
|
|
|
- </ContentWrap>
|
|
|
-
|
|
|
- <!-- 表单弹窗:添加/修改 -->
|
|
|
- <IotRdDailyReportForm ref="formRef" @success="getList" />
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
-</template>
|
|
|
-
|
|
|
-<script setup lang="ts">
|
|
|
-import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
|
|
|
-import { IotRdDailyReportApi, IotRdDailyReportVO } from '@/api/pms/iotrddailyreport'
|
|
|
-import IotRdDailyReportForm from './IotRdDailyReportForm.vue'
|
|
|
-import { DICT_TYPE } from '@/utils/dict'
|
|
|
-import { useRoute } from 'vue-router'
|
|
|
-import DeptTree2 from '@/views/pms/iotrhdailyreport/DeptTree2.vue'
|
|
|
+<script lang="ts" setup>
|
|
|
+import { IotRdDailyReportApi } from '@/api/pms/iotrddailyreport'
|
|
|
+import { useTableComponents } from '@/components/ZmTable/useTableComponents'
|
|
|
+import { useUserStore } from '@/store/modules/user'
|
|
|
+import { DICT_TYPE, getDictOptions } from '@/utils/dict'
|
|
|
+import { rangeShortcuts } from '@/utils/formatTime'
|
|
|
import { useDebounceFn } from '@vueuse/core'
|
|
|
-
|
|
|
+import IotRdDailyReportForm from './IotRdDailyReportForm.vue'
|
|
|
import dayjs from 'dayjs'
|
|
|
-import quarterOfYear from 'dayjs/plugin/quarterOfYear'
|
|
|
import download from '@/utils/download'
|
|
|
|
|
|
-dayjs.extend(quarterOfYear)
|
|
|
+defineOptions({ name: 'IotRdDailyReport' })
|
|
|
|
|
|
-const rangeShortcuts = [
|
|
|
- {
|
|
|
- text: '今天',
|
|
|
- value: () => {
|
|
|
- const today = dayjs()
|
|
|
- return [today.startOf('day').toDate(), today.endOf('day').toDate()]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: '昨天',
|
|
|
- value: () => {
|
|
|
- const yesterday = dayjs().subtract(1, 'day')
|
|
|
- return [yesterday.startOf('day').toDate(), yesterday.endOf('day').toDate()]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: '本周',
|
|
|
- value: () => {
|
|
|
- return [dayjs().startOf('week').toDate(), dayjs().endOf('week').toDate()]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: '上周',
|
|
|
- value: () => {
|
|
|
- const lastWeek = dayjs().subtract(1, 'week')
|
|
|
- return [lastWeek.startOf('week').toDate(), lastWeek.endOf('week').toDate()]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: '本月',
|
|
|
- value: () => {
|
|
|
- return [dayjs().startOf('month').toDate(), dayjs().endOf('month').toDate()]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: '上月',
|
|
|
- value: () => {
|
|
|
- const lastMonth = dayjs().subtract(1, 'month')
|
|
|
- return [lastMonth.startOf('month').toDate(), lastMonth.endOf('month').toDate()]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: '本季度',
|
|
|
- value: () => {
|
|
|
- return [dayjs().startOf('quarter').toDate(), dayjs().endOf('quarter').toDate()]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: '上季度',
|
|
|
- value: () => {
|
|
|
- const lastQuarter = dayjs().subtract(1, 'quarter')
|
|
|
- return [lastQuarter.startOf('quarter').toDate(), lastQuarter.endOf('quarter').toDate()]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: '今年',
|
|
|
- value: () => {
|
|
|
- return [dayjs().startOf('year').toDate(), dayjs().endOf('year').toDate()]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: '去年',
|
|
|
- value: () => {
|
|
|
- const lastYear = dayjs().subtract(1, 'year')
|
|
|
- return [lastYear.startOf('year').toDate(), lastYear.endOf('year').toDate()]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: '最近7天',
|
|
|
- value: () => {
|
|
|
- return [dayjs().subtract(6, 'day').toDate(), dayjs().toDate()]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: '最近30天',
|
|
|
- value: () => {
|
|
|
- return [dayjs().subtract(29, 'day').toDate(), dayjs().toDate()]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: '最近90天',
|
|
|
- value: () => {
|
|
|
- return [dayjs().subtract(89, 'day').toDate(), dayjs().toDate()]
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- text: '最近一年',
|
|
|
- value: () => {
|
|
|
- return [dayjs().subtract(1, 'year').toDate(), dayjs().toDate()]
|
|
|
- }
|
|
|
- }
|
|
|
-]
|
|
|
+const { t } = useI18n()
|
|
|
|
|
|
-/** 瑞都日报 列表 */
|
|
|
-defineOptions({ name: 'IotRdDailyReport' })
|
|
|
+const router = useRouter()
|
|
|
+const route = useRoute()
|
|
|
|
|
|
-const message = useMessage() // 消息弹窗
|
|
|
-const { t } = useI18n() // 国际化
|
|
|
-const { push } = useRouter() // 路由跳转
|
|
|
-const loading = ref(true) // 列表的加载中
|
|
|
-const list = ref<IotRdDailyReportVO[]>([]) // 列表的数据
|
|
|
-const total = ref(0) // 列表的总页数
|
|
|
+const message = useMessage()
|
|
|
|
|
|
-const route = useRoute() // 路由信息
|
|
|
+const id = useUserStore().getUser.deptId
|
|
|
+
|
|
|
+const deptId = id
|
|
|
+
|
|
|
+interface Query {
|
|
|
+ deptId?: number
|
|
|
+ contractName?: string
|
|
|
+ taskName?: string
|
|
|
+ createTime?: string[]
|
|
|
+ wellName?: string
|
|
|
+ taskId?: number
|
|
|
+ pageNo: number
|
|
|
+ pageSize: number
|
|
|
+}
|
|
|
|
|
|
-const queryParams = reactive({
|
|
|
+const initQuery: Query = {
|
|
|
pageNo: 1,
|
|
|
pageSize: 10,
|
|
|
- deptId: undefined,
|
|
|
- projectId: undefined,
|
|
|
- contractName: undefined,
|
|
|
- taskId: undefined,
|
|
|
- taskName: undefined,
|
|
|
- projectClassification: undefined,
|
|
|
- techniqueIds: undefined,
|
|
|
- deviceIds: undefined,
|
|
|
- startTime: [],
|
|
|
- endTime: [],
|
|
|
- cumulativeWorkingWell: undefined,
|
|
|
- cumulativeWorkingLayers: undefined,
|
|
|
- dailyPumpTrips: undefined,
|
|
|
- dailyToolsSand: undefined,
|
|
|
- runCount: undefined,
|
|
|
- bridgePlug: undefined,
|
|
|
- waterVolume: undefined,
|
|
|
- hourCount: undefined,
|
|
|
- dailyFuel: undefined,
|
|
|
- dailyPowerUsage: undefined,
|
|
|
- productionTime: [],
|
|
|
- nonProductionTime: [],
|
|
|
- rdNptReason: undefined,
|
|
|
- constructionStartDate: [],
|
|
|
- constructionEndDate: [],
|
|
|
- productionStatus: undefined,
|
|
|
- externalRental: undefined,
|
|
|
- nextPlan: undefined,
|
|
|
- rdStatus: undefined,
|
|
|
- malfunction: undefined,
|
|
|
- faultDowntime: [],
|
|
|
- personnel: undefined,
|
|
|
- totalStaffNum: undefined,
|
|
|
- leaveStaffNum: undefined,
|
|
|
- extProperty: undefined,
|
|
|
- sort: undefined,
|
|
|
- remark: undefined,
|
|
|
- status: undefined,
|
|
|
- processInstanceId: undefined,
|
|
|
- auditStatus: undefined,
|
|
|
- createTime: []
|
|
|
-})
|
|
|
-const queryFormRef = ref() // 搜索的表单
|
|
|
+ deptId: route.query.deptId ? Number(route.query.deptId) : id,
|
|
|
+ createTime: route.query.createTime ? (route.query.createTime as string[]) : undefined,
|
|
|
+ wellName: route.query.wellName ? (route.query.wellName as string) : undefined,
|
|
|
+ taskId: route.query.taskId ? Number(route.query.taskId) : undefined
|
|
|
+}
|
|
|
|
|
|
-const rootDeptId = ref(163)
|
|
|
+const query = ref<Query>({ ...initQuery })
|
|
|
+
|
|
|
+interface ListItem {
|
|
|
+ createTime: string
|
|
|
+ deptName: string
|
|
|
+ taskName: string
|
|
|
+ rdStatus: string
|
|
|
+ productionStatus: string
|
|
|
+ nextPlan: string
|
|
|
+ cumulativeWorkingWell: number
|
|
|
+ cumulativeWorkingLayers: number
|
|
|
+ dailyPumpTrips: number
|
|
|
+ dailyToolsSand: number
|
|
|
+ runCount: number
|
|
|
+ bridgePlug: number
|
|
|
+ waterVolume: number
|
|
|
+ hourCount: number
|
|
|
+ dailyFuel: number
|
|
|
+ externalRental: string
|
|
|
+ malfunction: string
|
|
|
+ faultDowntime: number
|
|
|
+ accidentTime: number
|
|
|
+ repairTime: number
|
|
|
+ selfStopTime: number
|
|
|
+ complexityTime: number
|
|
|
+ relocationTime: number
|
|
|
+ rectificationTime: number
|
|
|
+ waitingStopTime: number
|
|
|
+ winterBreakTime: number
|
|
|
+ partyaDesign: number
|
|
|
+ partyaPrepare: number
|
|
|
+ partyaResource: number
|
|
|
+ otherNptTime: number
|
|
|
+ otherNptReason: string
|
|
|
+ nonProductFlag: boolean
|
|
|
+ nonProductionRate: number
|
|
|
+ contractName: string
|
|
|
+ timeRange: string
|
|
|
+ auditStatus: number
|
|
|
+}
|
|
|
|
|
|
-// 表格引用
|
|
|
-const tableRef = ref()
|
|
|
-// 表格容器引用
|
|
|
-const tableContainerRef = ref()
|
|
|
+const list = ref<ListItem[]>([])
|
|
|
+const total = ref(0)
|
|
|
|
|
|
-const columnWidths = ref<
|
|
|
- Record<
|
|
|
- string,
|
|
|
- { label: string; prop: string; width: string; fn?: (row: IotRdDailyReportVO) => string }
|
|
|
- >
|
|
|
->({
|
|
|
- createTime: {
|
|
|
- label: '创建时间',
|
|
|
- prop: 'createTime',
|
|
|
- width: '120px',
|
|
|
- fn: (row: IotRdDailyReportVO) => dateFormatter(null, null, row.createTime)
|
|
|
- },
|
|
|
- deptName: {
|
|
|
- label: '施工队伍',
|
|
|
- prop: 'deptName',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- contractName: {
|
|
|
- label: '项目',
|
|
|
- prop: 'contractName',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- taskName: {
|
|
|
- label: '任务',
|
|
|
- prop: 'taskName',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- timeRange: {
|
|
|
- label: '时间节点',
|
|
|
- prop: 'timeRange',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- rdStatus: {
|
|
|
- label: '施工状态',
|
|
|
- prop: 'rdStatus',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- cumulativeWorkingWell: {
|
|
|
- label: '施工井',
|
|
|
- prop: 'cumulativeWorkingWell',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- cumulativeWorkingLayers: {
|
|
|
- label: '施工层',
|
|
|
- prop: 'cumulativeWorkingLayers',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- dailyPumpTrips: {
|
|
|
- label: '泵车台次',
|
|
|
- prop: 'dailyPumpTrips',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- dailyToolsSand: {
|
|
|
- label: '仪表/混砂',
|
|
|
- prop: 'dailyToolsSand',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- runCount: {
|
|
|
- label: '趟数',
|
|
|
- prop: 'runCount',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- bridgePlug: {
|
|
|
- label: '桥塞',
|
|
|
- prop: 'bridgePlug',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- waterVolume: {
|
|
|
- label: '水方量',
|
|
|
- prop: 'waterVolume',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- hourCount: {
|
|
|
- label: '时间H',
|
|
|
- prop: 'hourCount',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- dailyFuel: {
|
|
|
- label: '油耗(L)',
|
|
|
- prop: 'dailyFuel',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- productionStatus: {
|
|
|
- label: '当日生产动态',
|
|
|
- prop: 'productionStatus',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- nextPlan: {
|
|
|
- label: '下步工作计划',
|
|
|
- prop: 'nextPlan',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- externalRental: {
|
|
|
- label: '外租设备',
|
|
|
- prop: 'externalRental',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- malfunction: {
|
|
|
- label: '故障情况',
|
|
|
- prop: 'malfunction',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- faultDowntime: {
|
|
|
- label: '故障误工H',
|
|
|
- prop: 'faultDowntime',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- accidentTime: {
|
|
|
- label: '工程质量',
|
|
|
- prop: 'accidentTime',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- repairTime: {
|
|
|
- label: '设备故障',
|
|
|
- prop: 'repairTime',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- selfStopTime: {
|
|
|
- label: '设备保养',
|
|
|
- prop: 'selfStopTime',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- complexityTime: {
|
|
|
- label: '技术受限',
|
|
|
- prop: 'complexityTime',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- relocationTime: {
|
|
|
- label: '生产配合',
|
|
|
- prop: 'relocationTime',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- rectificationTime: {
|
|
|
- label: '生产组织',
|
|
|
- prop: 'rectificationTime',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- waitingStopTime: {
|
|
|
- label: '不可抗力',
|
|
|
- prop: 'waitingStopTime',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- winterBreakTime: {
|
|
|
- label: '待命',
|
|
|
- prop: 'winterBreakTime',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- partyaDesign: {
|
|
|
- label: '甲方设计',
|
|
|
- prop: 'partyaDesign',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- partyaPrepare: {
|
|
|
- label: '甲方资源',
|
|
|
- prop: 'partyaPrepare',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- partyaResource: {
|
|
|
- label: '甲方准备',
|
|
|
- prop: 'partyaResource',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- otherNptTime: {
|
|
|
- label: '其它非生产时间',
|
|
|
- prop: 'otherNptTime',
|
|
|
- width: '120px'
|
|
|
- },
|
|
|
- otherNptReason: {
|
|
|
- label: '其他非生产时间原因',
|
|
|
- prop: 'otherNptReason',
|
|
|
- width: '120px'
|
|
|
- }
|
|
|
-})
|
|
|
-
|
|
|
-// 计算文本宽度
|
|
|
-const getTextWidth = (text: string, fontSize = 12) => {
|
|
|
- const span = document.createElement('span')
|
|
|
- span.style.visibility = 'hidden'
|
|
|
- span.style.position = 'absolute'
|
|
|
- span.style.whiteSpace = 'nowrap'
|
|
|
- span.style.fontSize = `${fontSize}px`
|
|
|
- span.style.fontFamily = 'PingFang SC'
|
|
|
- span.innerText = text
|
|
|
-
|
|
|
- document.body.appendChild(span)
|
|
|
- const width = span.offsetWidth
|
|
|
- document.body.removeChild(span)
|
|
|
-
|
|
|
- return width
|
|
|
-}
|
|
|
+const loading = ref(false)
|
|
|
|
|
|
-const calculateColumnWidths = useDebounceFn(() => {
|
|
|
- if (!tableContainerRef.value?.$el) return
|
|
|
- Object.values(columnWidths.value).forEach(({ fn, prop, label, width }) => {
|
|
|
- width =
|
|
|
- Math.min(
|
|
|
- ...[
|
|
|
- Math.max(
|
|
|
- ...[
|
|
|
- getTextWidth(label),
|
|
|
- ...list.value.map((v) => {
|
|
|
- return getTextWidth(fn ? fn(v) : v[prop])
|
|
|
- })
|
|
|
- ]
|
|
|
- ) + (label === '施工状态' ? 35 : 20),
|
|
|
- 200
|
|
|
- ]
|
|
|
- ) + 'px'
|
|
|
-
|
|
|
- console.log('width :>> ', width)
|
|
|
-
|
|
|
- columnWidths.value[prop].width = width
|
|
|
- })
|
|
|
-}, 1000)
|
|
|
-
|
|
|
-/** 查询列表 */
|
|
|
-const getList = async () => {
|
|
|
+const loadList = useDebounceFn(async function () {
|
|
|
loading.value = true
|
|
|
try {
|
|
|
- const data = await IotRdDailyReportApi.getIotRdDailyReportPage(queryParams)
|
|
|
+ const data = await IotRdDailyReportApi.getIotRdDailyReportPage(query.value)
|
|
|
list.value = data.list
|
|
|
total.value = data.total
|
|
|
- // 获取数据后计算列宽
|
|
|
- nextTick(() => {
|
|
|
- calculateColumnWidths()
|
|
|
- })
|
|
|
} finally {
|
|
|
loading.value = false
|
|
|
}
|
|
|
+})
|
|
|
+
|
|
|
+function handleSizeChange(val: number) {
|
|
|
+ query.value.pageSize = val
|
|
|
+ handleQuery()
|
|
|
}
|
|
|
|
|
|
-/** 搜索按钮操作 */
|
|
|
-const handleQuery = () => {
|
|
|
- queryParams.pageNo = 1
|
|
|
- getList()
|
|
|
+function handleCurrentChange(val: number) {
|
|
|
+ query.value.pageNo = val
|
|
|
+ loadList()
|
|
|
}
|
|
|
|
|
|
-/** 重置按钮操作 */
|
|
|
-const resetQuery = () => {
|
|
|
- queryFormRef.value.resetFields()
|
|
|
+function handleQuery(setPage = true) {
|
|
|
+ if (setPage) {
|
|
|
+ query.value.pageNo = 1
|
|
|
+ }
|
|
|
+ loadList()
|
|
|
+}
|
|
|
+
|
|
|
+function resetQuery() {
|
|
|
+ query.value = { ...initQuery }
|
|
|
+
|
|
|
handleQuery()
|
|
|
}
|
|
|
|
|
|
-/** 添加/修改操作 */
|
|
|
+watch(
|
|
|
+ [
|
|
|
+ () => query.value.deptId,
|
|
|
+ () => query.value.contractName,
|
|
|
+ () => query.value.taskName,
|
|
|
+ () => query.value.createTime
|
|
|
+ ],
|
|
|
+ () => {
|
|
|
+ handleQuery()
|
|
|
+ },
|
|
|
+ { immediate: true }
|
|
|
+)
|
|
|
+
|
|
|
const formRef = ref()
|
|
|
const openForm = (type: string, id?: number) => {
|
|
|
formRef.value.open(type, id)
|
|
|
}
|
|
|
|
|
|
-/** 查看日报详情 */
|
|
|
-const handleDetail = async (id: number) => {
|
|
|
+const exportLoading = ref(false)
|
|
|
+
|
|
|
+async function handleExport() {
|
|
|
try {
|
|
|
- // 跳转到 FillDailyReportForm 页面,传递审批模式和ID
|
|
|
- push({
|
|
|
+ await message.exportConfirm()
|
|
|
+
|
|
|
+ exportLoading.value = true
|
|
|
+ const res = await IotRdDailyReportApi.exportIotRdDailyReportDetails(query.value)
|
|
|
+
|
|
|
+ download.excel(res, '瑞都日报明细.xlsx')
|
|
|
+ } finally {
|
|
|
+ exportLoading.value = false
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+const { ZmTable, ZmTableColumn } = useTableComponents<ListItem>()
|
|
|
+
|
|
|
+function formCreateTime(row: ListItem) {
|
|
|
+ return dayjs(row.createTime).format('YYYY-MM-DD HH:mm:ss')
|
|
|
+}
|
|
|
+
|
|
|
+function realValue(type: any, value: string) {
|
|
|
+ const option = getDictOptions(type).find((item) => item.value === value)
|
|
|
+ return option?.label || value
|
|
|
+}
|
|
|
+
|
|
|
+function handleDetail(id: number) {
|
|
|
+ try {
|
|
|
+ router.push({
|
|
|
name: 'FillDailyReportForm',
|
|
|
params: {
|
|
|
id: id.toString(),
|
|
|
- mode: 'detail' // 添加详情模式标识
|
|
|
+ mode: 'detail'
|
|
|
}
|
|
|
})
|
|
|
} catch (error) {
|
|
|
@@ -853,156 +180,235 @@ const handleDetail = async (id: number) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// 响应式变量存储选中的部门
|
|
|
-const selectedDept = ref<{ id: number; name: string }>()
|
|
|
-/** 处理部门被点击 */
|
|
|
-const handleDeptNodeClick = async (row) => {
|
|
|
- // 记录选中的部门信息
|
|
|
- selectedDept.value = { id: row.id, name: row.name }
|
|
|
- queryParams.deptId = row.id
|
|
|
- await getList()
|
|
|
-}
|
|
|
-
|
|
|
-/** 审批按钮操作 */
|
|
|
-const handleApprove = async (id: number) => {
|
|
|
+function handleApprove(id: number) {
|
|
|
try {
|
|
|
- // 跳转到 FillDailyReportForm 页面,传递审批模式和ID
|
|
|
- push({
|
|
|
+ router.push({
|
|
|
name: 'FillDailyReportForm',
|
|
|
params: {
|
|
|
id: id.toString(),
|
|
|
- mode: 'approval' // 添加审批模式标识
|
|
|
+ mode: 'approval'
|
|
|
}
|
|
|
})
|
|
|
} catch (error) {
|
|
|
console.error('跳转审批页面失败:', error)
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-/** 删除按钮操作 */
|
|
|
-const handleDelete = async (id: number) => {
|
|
|
- try {
|
|
|
- // 删除的二次确认
|
|
|
- await message.delConfirm()
|
|
|
- // 发起删除
|
|
|
- await IotRdDailyReportApi.deleteIotRdDailyReport(id)
|
|
|
- message.success(t('common.delSuccess'))
|
|
|
- // 刷新列表
|
|
|
- await getList()
|
|
|
- } catch {}
|
|
|
-}
|
|
|
-
|
|
|
-const exportLoading = ref(false)
|
|
|
-
|
|
|
-const handleExport = async () => {
|
|
|
- const res = await IotRdDailyReportApi.exportIotRdDailyReportDetails(queryParams)
|
|
|
-
|
|
|
- download.excel(res, '瑞都日报明细.xlsx')
|
|
|
-}
|
|
|
-
|
|
|
-// 声明 ResizeObserver 实例
|
|
|
-let resizeObserver: ResizeObserver | null = null
|
|
|
-
|
|
|
-/** 初始化 **/
|
|
|
-onMounted(() => {
|
|
|
- if (Object.keys(route.query).length > 0) {
|
|
|
- nextTick(() => {
|
|
|
- if (route.query.deptId) {
|
|
|
- queryParams.deptId = Number(route.query.deptId) as any
|
|
|
- }
|
|
|
-
|
|
|
- if (route.query.createTime?.length) {
|
|
|
- queryParams.createTime = route.query.createTime as any
|
|
|
- }
|
|
|
-
|
|
|
- if (route.query.wellName) {
|
|
|
- queryParams.taskName = route.query.wellName as any
|
|
|
- }
|
|
|
- if (route.query.taskId) {
|
|
|
- queryParams.taskId = route.query.taskId as any
|
|
|
- }
|
|
|
-
|
|
|
- handleQuery()
|
|
|
- })
|
|
|
- } else getList()
|
|
|
- // 创建 ResizeObserver 监听表格容器尺寸变化
|
|
|
- if (tableContainerRef.value?.$el) {
|
|
|
- resizeObserver = new ResizeObserver(() => {
|
|
|
- // 使用防抖避免频繁触发
|
|
|
- clearTimeout((window as any).resizeTimer)
|
|
|
- ;(window as any).resizeTimer = setTimeout(() => {
|
|
|
- calculateColumnWidths()
|
|
|
- }, 100)
|
|
|
- })
|
|
|
- resizeObserver.observe(tableContainerRef.value.$el)
|
|
|
- }
|
|
|
-})
|
|
|
-
|
|
|
-onUnmounted(() => {
|
|
|
- // 清除 ResizeObserver
|
|
|
- if (resizeObserver && tableContainerRef.value?.$el) {
|
|
|
- resizeObserver.unobserve(tableContainerRef.value.$el)
|
|
|
- resizeObserver = null
|
|
|
- }
|
|
|
-
|
|
|
- // 清除定时器
|
|
|
- if ((window as any).resizeTimer) {
|
|
|
- clearTimeout((window as any).resizeTimer)
|
|
|
- }
|
|
|
-})
|
|
|
-
|
|
|
-// 监听列表数据变化重新计算列宽
|
|
|
-watch(
|
|
|
- list,
|
|
|
- () => {
|
|
|
- nextTick(calculateColumnWidths)
|
|
|
- },
|
|
|
- { deep: true }
|
|
|
-)
|
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
-/* 确保表格单元格内容不换行 */
|
|
|
-
|
|
|
-/* :deep(.el-table .cell) {
|
|
|
- white-space: nowrap;
|
|
|
-} */
|
|
|
-
|
|
|
-/* 确保表格列标题不换行 */
|
|
|
-
|
|
|
-/* :deep(.el-table th > .cell) {
|
|
|
- white-space: nowrap;
|
|
|
-} */
|
|
|
-
|
|
|
-/* 调整表格最小宽度,确保内容完全显示 */
|
|
|
-:deep(.el-table) {
|
|
|
- min-width: 100%;
|
|
|
-}
|
|
|
-
|
|
|
-/* 长文本样式 - 多行显示并添加省略号 */
|
|
|
-.long-text {
|
|
|
- display: -webkit-box;
|
|
|
- max-height: 3em; /* 两行文本的高度 */
|
|
|
- overflow: hidden;
|
|
|
- line-height: 1.5;
|
|
|
- text-overflow: ellipsis;
|
|
|
- -webkit-box-orient: vertical;
|
|
|
- -webkit-line-clamp: 2;
|
|
|
-}
|
|
|
+<template>
|
|
|
+ <div
|
|
|
+ class="grid grid-cols-[15%_1fr] grid-rows-[62px_1fr] gap-4 h-[calc(100vh-20px-var(--top-tool-height)-var(--tags-view-height)-var(--app-footer-height))]"
|
|
|
+ >
|
|
|
+ <div class="p-4 bg-white dark:bg-[#1d1e1f] shadow rounded-lg row-span-2">
|
|
|
+ <DeptTreeSelect :top-id="163" :deptId="deptId" v-model="query.deptId" :show-title="false" />
|
|
|
+ </div>
|
|
|
+ <el-form
|
|
|
+ size="default"
|
|
|
+ class="bg-white dark:bg-[#1d1e1f] rounded-lg shadow px-8 gap-8 flex items-center justify-between"
|
|
|
+ >
|
|
|
+ <div class="flex items-center gap-8">
|
|
|
+ <el-form-item label="项目">
|
|
|
+ <el-input
|
|
|
+ v-model="query.contractName"
|
|
|
+ placeholder="请输入项目"
|
|
|
+ clearable
|
|
|
+ @keyup.enter="handleQuery()"
|
|
|
+ class="!w-240px"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="任务">
|
|
|
+ <el-input
|
|
|
+ v-model="query.taskName"
|
|
|
+ placeholder="请输入任务"
|
|
|
+ clearable
|
|
|
+ @keyup.enter="handleQuery()"
|
|
|
+ class="!w-240px"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="创建时间" prop="createTime">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="query.createTime"
|
|
|
+ value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
+ type="daterange"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
|
|
+ class="!w-220px"
|
|
|
+ :shortcuts="rangeShortcuts"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" @click="handleQuery()">
|
|
|
+ <Icon icon="ep:search" class="mr-5px" /> 搜索
|
|
|
+ </el-button>
|
|
|
+ <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" />重置</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ @click="openForm('create')"
|
|
|
+ v-hasPermi="['pms:iot-rd-daily-report:create']"
|
|
|
+ >
|
|
|
+ <Icon icon="ep:plus" class="mr-5px" /> 新增
|
|
|
+ </el-button>
|
|
|
+ <el-button type="success" plain @click="handleExport" :loading="exportLoading">
|
|
|
+ <Icon icon="ep:download" class="mr-5px" /> 导出
|
|
|
+ </el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div class="bg-white dark:bg-[#1d1e1f] shadow rounded-lg flex flex-col p-4">
|
|
|
+ <div class="flex-1 relative">
|
|
|
+ <el-auto-resizer class="absolute">
|
|
|
+ <template #default="{ width, height }">
|
|
|
+ <zm-table
|
|
|
+ :data="list"
|
|
|
+ :loading="loading"
|
|
|
+ :width="width"
|
|
|
+ :max-height="height"
|
|
|
+ :height="height"
|
|
|
+ show-border
|
|
|
+ >
|
|
|
+ <zm-table-column
|
|
|
+ prop="createTime"
|
|
|
+ label="创建时间"
|
|
|
+ cover-formatter
|
|
|
+ :real-value="formCreateTime"
|
|
|
+ />
|
|
|
+ <zm-table-column prop="deptName" label="施工队伍" />
|
|
|
+ <zm-table-column prop="taskName" label="任务" />
|
|
|
+ <zm-table-column
|
|
|
+ prop="rdStatus"
|
|
|
+ :label="t('project.status')"
|
|
|
+ :real-value="
|
|
|
+ (row: ListItem) => realValue(DICT_TYPE.PMS_PROJECT_RD_STATUS, row.rdStatus ?? '')
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <template #default="scope">
|
|
|
+ <dict-tag
|
|
|
+ :type="DICT_TYPE.PMS_PROJECT_RD_STATUS"
|
|
|
+ :value="scope.row.rdStatus ?? ''"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </zm-table-column>
|
|
|
+ <zm-table-column prop="productionStatus" label="当日生产动态" />
|
|
|
+ <zm-table-column prop="nextPlan" label="下步工作计划" />
|
|
|
+ <zm-table-column label="当日">
|
|
|
+ <zm-table-column prop="cumulativeWorkingWell" label="施工井" />
|
|
|
+ <zm-table-column prop="cumulativeWorkingLayers" label="施工层" />
|
|
|
+ <zm-table-column prop="dailyPumpTrips" label="泵车台次" />
|
|
|
+ <zm-table-column prop="dailyToolsSand" label="仪表/混砂" />
|
|
|
+ </zm-table-column>
|
|
|
+ <zm-table-column prop="runCount" label="趟数" />
|
|
|
+ <zm-table-column prop="bridgePlug" label="桥塞" />
|
|
|
+ <zm-table-column prop="waterVolume" label="水方量" />
|
|
|
+ <zm-table-column prop="hourCount" label="时间(H)" />
|
|
|
+ <zm-table-column prop="dailyFuel" label="油耗(L)" />
|
|
|
+ <zm-table-column prop="externalRental" label="外租设备" />
|
|
|
+ <zm-table-column prop="malfunction" label="故障情况" />
|
|
|
+ <zm-table-column prop="faultDowntime" label="故障误工(H)" />
|
|
|
+ <zm-table-column
|
|
|
+ prop="nonProductionRate"
|
|
|
+ label="非生产时效"
|
|
|
+ cover-formatter
|
|
|
+ :real-value="(row) => (Number(row.nonProductionRate ?? 0) * 100).toFixed(2) + '%'"
|
|
|
+ />
|
|
|
+ <zm-table-column label="非生产时间">
|
|
|
+ <zm-table-column prop="accidentTime" label="工程质量" />
|
|
|
+ <zm-table-column prop="repairTime" label="设备故障" />
|
|
|
+ <zm-table-column prop="selfStopTime" label="设备保养" />
|
|
|
+ <zm-table-column prop="complexityTime" label="技术受限" />
|
|
|
+ <zm-table-column prop="relocationTime" label="生产配合" />
|
|
|
+ <zm-table-column prop="rectificationTime" label="生产组织" />
|
|
|
+ <zm-table-column prop="waitingStopTime" label="不可抗力" />
|
|
|
+ <zm-table-column prop="winterBreakTime" label="待命" />
|
|
|
+ <zm-table-column prop="partyaDesign" label="甲方设计" />
|
|
|
+ <zm-table-column prop="partyaPrepare" label="甲方准备" />
|
|
|
+ <zm-table-column prop="partyaResource" label="甲方资源" />
|
|
|
+ <zm-table-column prop="otherNptTime" label="其它非生产时间" />
|
|
|
+ </zm-table-column>
|
|
|
+ <zm-table-column prop="otherNptReason" label="其他非生产时间原因" />
|
|
|
+ <zm-table-column prop="nonProductFlag" label="非生产时间填写">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-tag
|
|
|
+ :type="
|
|
|
+ scope.row.nonProductFlag || scope.row.processInstanceId === '2'
|
|
|
+ ? 'success'
|
|
|
+ : 'danger'
|
|
|
+ "
|
|
|
+ >
|
|
|
+ {{
|
|
|
+ scope.row.nonProductFlag || scope.row.processInstanceId === '2'
|
|
|
+ ? '已填写'
|
|
|
+ : '未填写'
|
|
|
+ }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </zm-table-column>
|
|
|
+ <zm-table-column prop="contractName" label="项目" />
|
|
|
+ <zm-table-column prop="timeRange" label="时间节点" />
|
|
|
+ <zm-table-column prop="auditStatus" label="审批状态">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-tag v-if="scope.row.auditStatus === 0" type="info">
|
|
|
+ {{ '待提交' }}
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-else-if="scope.row.auditStatus === 10">
|
|
|
+ {{ '待审批' }}
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-else-if="scope.row.auditStatus === 20" type="success">
|
|
|
+ {{ '审批通过' }}
|
|
|
+ </el-tag>
|
|
|
+ <el-tag v-else-if="scope.row.auditStatus === 30" type="danger">
|
|
|
+ {{ '审批拒绝' }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </zm-table-column>
|
|
|
+ <zm-table-column label="操作" width="120" fixed="right">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button
|
|
|
+ link
|
|
|
+ type="success"
|
|
|
+ @click="handleDetail(scope.row.id)"
|
|
|
+ v-hasPermi="['pms:iot-rd-daily-report:query']"
|
|
|
+ >
|
|
|
+ 查看
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ link
|
|
|
+ type="warning"
|
|
|
+ @click="handleApprove(scope.row.id)"
|
|
|
+ v-hasPermi="['pms:iot-rd-daily-report:update']"
|
|
|
+ v-if="scope.row.auditStatus === 10"
|
|
|
+ >
|
|
|
+ 审批
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </zm-table-column>
|
|
|
+ </zm-table>
|
|
|
+ </template>
|
|
|
+ </el-auto-resizer>
|
|
|
+ </div>
|
|
|
+ <div class="h-10 mt-4 flex items-center justify-end">
|
|
|
+ <el-pagination
|
|
|
+ size="default"
|
|
|
+ v-show="total > 0"
|
|
|
+ v-model:current-page="query.pageNo"
|
|
|
+ v-model:page-size="query.pageSize"
|
|
|
+ :background="true"
|
|
|
+ :page-sizes="[10, 20, 30, 50, 100]"
|
|
|
+ :total="total"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
|
|
|
-/* 确保固定宽度列不参与自动调整 */
|
|
|
-:deep(.el-table__header-wrapper .el-table__cell.fixed-width),
|
|
|
-:deep(.el-table__body-wrapper .el-table__cell.fixed-width) {
|
|
|
- flex-shrink: 0;
|
|
|
- flex-grow: 0;
|
|
|
-}
|
|
|
-</style>
|
|
|
+ <IotRdDailyReportForm ref="formRef" @success="loadList" />
|
|
|
+</template>
|
|
|
|
|
|
-<style>
|
|
|
-/* 长文本 tooltip 样式 - 保留换行符 */
|
|
|
-.long-text-tooltip {
|
|
|
- max-width: 500px;
|
|
|
- line-height: 1.5;
|
|
|
- white-space: pre-line;
|
|
|
+<style scoped>
|
|
|
+:deep(.el-form-item) {
|
|
|
+ margin-bottom: 0;
|
|
|
}
|
|
|
</style>
|