|
@@ -0,0 +1,535 @@
|
|
|
|
+<template>
|
|
|
|
+ <div class="out-page">
|
|
|
|
+ <div class="out-top">
|
|
|
|
+ <el-form :inline="true" :model="queryForm" class="query-form-inline" label-width="auto">
|
|
|
|
+ <el-form-item label="井站">
|
|
|
|
+ <div style="width:140px;">{{queryForm.orgName}}</div>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="日期">
|
|
|
|
+ <el-date-picker
|
|
|
|
+ v-model="queryForm.dailyDate"
|
|
|
|
+ type="date"
|
|
|
|
+ placeholder="请选择日报日期"
|
|
|
|
+ value-format="YYYY-MM-DD"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-button type="primary" :loading="btnStatTag==1" :disabled="btnStatTag>0" @click="queryHandle">检索</el-button>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-button type="success" :loading="btnStatTag==2" :disabled="btnStatTag>0" title="汇总其它基础数据到该日报" @click="extractRpt">提取数据</el-button>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-button type="warning" :loading="btnStatTag==3" :disabled="btnStatTag>0" @click="saveRpt">保存</el-button>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <!-- <el-button type="primary" plain icon="Edit">导出</el-button> -->
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="rpt-page" ref="rpt_page">
|
|
|
|
+ <div class="rpt-title" ref="rpt_title">
|
|
|
|
+ <div class="main-title">{{queryForm.orgName}}注水井生产日报表</div>
|
|
|
|
+ <div class="sub-title">
|
|
|
|
+ <div>{{queryForm.orgName}}</div>
|
|
|
|
+ <div>{{dailyDatefmt}}</div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="rpt-box">
|
|
|
|
+ <div class="rpt-table-header" ref="rpt_header">
|
|
|
|
+ <table cellpadding="0" cellspacing="0" class="rpt-table" align="center">
|
|
|
|
+ <tr>
|
|
|
|
+ <td rowspan="3"><div class="rpt-table-cell rpttab-cell-0">井号</div></td>
|
|
|
|
+ <td rowspan="3"><div class="rpt-table-cell rpttab-cell-1">注水方式</div></td>
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-3">班次</div></td>
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4 ">生产时间</div></td>
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-5">巡检时间</div></td>
|
|
|
|
+ <td colspan="4"><div class="rpt-table-cell colspan-center">压力(MPa)</div></td>
|
|
|
|
+ <td rowspan="3"><div class="rpt-table-cell rpttab-cell-4">全井配注(m3/d)</div></td>
|
|
|
|
+ <td rowspan="3"><div class="rpt-table-cell rpttab-cell-4">仪表读数(m3)</div></td>
|
|
|
|
+ <td rowspan="3"><div class="rpt-table-cell rpttab-cell-4">全井实注(m3/d)</div></td>
|
|
|
|
+ <td colspan="9"><div class="rpt-table-cell">分层注水量</div></td>
|
|
|
|
+ <td rowspan="3"><div class="rpt-table-cell rpttab-cell-9">备注</div></td>
|
|
|
|
+ <td patch><div class="rpt-table-cell rpt-patch-cell"></div></td>
|
|
|
|
+ </tr>
|
|
|
|
+
|
|
|
|
+ <tr>
|
|
|
|
+ <td rowspan="2"><div class="rpt-table-cell rpttab-cell-4">h:min</div></td>
|
|
|
|
+ <td rowspan="2"><div class="rpt-table-cell rpttab-cell-4">h:min</div></td>
|
|
|
|
+ <td rowspan="2"><div class="rpt-table-cell rpttab-cell-4">h:min</div></td>
|
|
|
|
+
|
|
|
|
+ <td rowspan="2"><div class="rpt-table-cell rpttab-cell-4">干压</div></td>
|
|
|
|
+ <td rowspan="2"><div class="rpt-table-cell rpttab-cell-4">泵压</div></td>
|
|
|
|
+ <td rowspan="2"><div class="rpt-table-cell rpttab-cell-4">油压</div></td>
|
|
|
|
+ <td rowspan="2"><div class="rpt-table-cell rpttab-cell-4">套压</div></td>
|
|
|
|
+
|
|
|
|
+ <td colspan="3"><div class="rpt-table-cell colspan-center">Ⅰ层</div></td>
|
|
|
|
+ <td colspan="3"><div class="rpt-table-cell colspan-center">Ⅱ层</div></td>
|
|
|
|
+ <td colspan="3"><div class="rpt-table-cell colspan-center">Ⅲ层</div></td>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </tr>
|
|
|
|
+
|
|
|
|
+ <tr>
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4">配注(m3/d)</div></td>
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4">仪表读数(m3)</div></td>
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4">注入量(m3)</div></td>
|
|
|
|
+
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4">配注(m3/d)</div></td>
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4">仪表读数(m3)</div></td>
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4">注入量(m3)</div></td>
|
|
|
|
+
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4">配注(m3/d)</div></td>
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4">仪表读数(m3)</div></td>
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4">注入量(m3)</div></td>
|
|
|
|
+ </tr>
|
|
|
|
+ </table>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="rpt-table-body" @scroll="rptboxScrollHandler" ref="rpt_body">
|
|
|
|
+ <el-form :model="rptDatas" :show-message="false" @validate="formValidHandler" ref="rptform">
|
|
|
|
+ <table cellpadding="0" cellspacing="0" class="rpt-table" align="center">
|
|
|
|
+ <template v-for="(daily,index) in rptDatas " :key="index">
|
|
|
|
+ <tr class="dataRow dbl-line">
|
|
|
|
+ <td rowspan="4"><div class="rpt-table-cell rpttab-cell-0">{{daily.wellName}}</div></td>
|
|
|
|
+ <td rowspan="4"><div class="rpt-table-cell rpttab-cell-1">{{daily.injectMode}}</div></td>
|
|
|
|
+
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4">{{dutyTimes[0]}}</div></td>
|
|
|
|
+ <td><el-input v-model="daily.duties[dutyTimes[0]].injectTime"/></td>
|
|
|
|
+ <td><el-input v-model="daily.duties[dutyTimes[0]].patrolTime"/></td>
|
|
|
|
+
|
|
|
|
+ <td><el-form-item :prop="'['+index+'].duties['+dutyTimes[0]+'].dryPress'" :rules="ruleFloat('干压')"><el-input v-model="daily.duties[dutyTimes[0]].dryPress"/></el-form-item></td>
|
|
|
|
+ <td><el-form-item :prop="'['+index+'].duties['+dutyTimes[0]+'].pumpPress'" :rules="ruleFloat('泵压')"><el-input v-model="daily.duties[dutyTimes[0]].pumpPress"/></el-form-item></td>
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4">{{daily.duties[dutyTimes[0]]?.oilPress}}</div></td>
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4">{{daily.duties[dutyTimes[0]]?.casingPress}}</div></td>
|
|
|
|
+
|
|
|
|
+ <td rowspan="4"><el-form-item :prop="'['+index+'].fullInjectQuota'" :rules="ruleFloat('全井配注')"><el-input v-model="daily.duties[dutyTimes[0]].fullInjectQuota" class="rpt-table-cell rpttab-cell-4"/></el-form-item></td>
|
|
|
|
+ <td><el-form-item :prop="'['+index+'].duties['+dutyTimes[0]+'].fullInjectMeter'" :rules="ruleFloat('仪表读数')"><el-input v-model="daily.duties[dutyTimes[0]].fullInjectMeter"/></el-form-item></td>
|
|
|
|
+ <td><el-form-item :prop="'['+index+'].duties['+dutyTimes[0]+'].fullInjectReal'" :rules="ruleFloat('全井实注')"><el-input v-model="daily.duties[dutyTimes[0]].fullInjectReal"/></el-form-item></td>
|
|
|
|
+
|
|
|
|
+ <td rowspan="4"><el-form-item :prop="'['+index+'].layer1InjectQuota'" :rules="ruleFloat('Ⅰ层配注')"><el-input v-model="daily.duties[dutyTimes[0]].layer1InjectQuota" class="rpt-table-cell rpttab-cell-4"/></el-form-item></td>
|
|
|
|
+ <td><el-form-item :prop="'['+index+'].duties['+dutyTimes[0]+'].layer1InjectMeter'" :rules="ruleFloat('Ⅰ层仪表读数')"><el-input v-model="daily.duties[dutyTimes[0]].layer1InjectMeter"/></el-form-item></td>
|
|
|
|
+ <td><el-form-item :prop="'['+index+'].duties['+dutyTimes[0]+'].layer1InjectReal'" :rules="ruleFloat('Ⅰ层注入量')"><el-input v-model="daily.duties[dutyTimes[0]].layer1InjectReal"/></el-form-item></td>
|
|
|
|
+
|
|
|
|
+ <td rowspan="4"><el-form-item :prop="'['+index+'].layer2InjectQuota'" :rules="ruleFloat('Ⅱ层配注')"><el-input v-model="daily.duties[dutyTimes[0]].layer2InjectQuota" class="rpt-table-cell rpttab-cell-4"/></el-form-item></td>
|
|
|
|
+ <td><el-form-item :prop="'['+index+'].duties['+dutyTimes[0]+'].layer2InjectMeter'" :rules="ruleFloat('Ⅱ层仪表读数')"><el-input v-model="daily.duties[dutyTimes[0]].layer2InjectMeter"/></el-form-item></td>
|
|
|
|
+ <td><el-form-item :prop="'['+index+'].duties['+dutyTimes[0]+'].layer2InjectReal'" :rules="ruleFloat('Ⅱ层注入量')"><el-input v-model="daily.duties[dutyTimes[0]].layer2InjectReal"/></el-form-item></td>
|
|
|
|
+
|
|
|
|
+ <td rowspan="4"><el-form-item :prop="'['+index+'].layer3InjectQuota'" :rules="ruleFloat('Ⅲ层配注')"><el-input v-model="daily.duties[dutyTimes[0]].layer3InjectQuota" class="rpt-table-cell rpttab-cell-4"/></el-form-item></td>
|
|
|
|
+ <td><el-form-item :prop="'['+index+'].duties['+dutyTimes[0]+'].layer3InjectMeter'" :rules="ruleFloat('Ⅲ层仪表读数')"><el-input v-model="daily.duties[dutyTimes[0]].layer3InjectMeter"/></el-form-item></td>
|
|
|
|
+ <td><el-form-item :prop="'['+index+'].duties['+dutyTimes[0]+'].layer3InjectReal'" :rules="ruleFloat('Ⅲ层注入量')"><el-input v-model="daily.duties[dutyTimes[0]].layer3InjectReal"/></el-form-item></td>
|
|
|
|
+
|
|
|
|
+ <td rowspan="4"><el-input v-model="daily.note" class="rpt-table-cell rpttab-cell-4"/></td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr v-for="dt in [dutyTimes[1],dutyTimes[2]]">
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4">{{dt}}</div></td>
|
|
|
|
+ <td><el-input v-model="daily.duties[dt].injectTime"/></td>
|
|
|
|
+ <td><el-input v-model="daily.duties[dt].patrolTime"/></td>
|
|
|
|
+
|
|
|
|
+ <td><el-form-item :prop="'['+index+'].duties['+dt+'].dryPress'" :rules="ruleFloat('干压')"><el-input v-model="daily.duties[dt].dryPress"/></el-form-item></td>
|
|
|
|
+ <td><el-form-item :prop="'['+index+'].duties['+dt+'].pumpPress'" :rules="ruleFloat('泵压')"><el-input v-model="daily.duties[dt].pumpPress"/></el-form-item></td>
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4">{{daily.duties[dt]?.oilPress}}</div></td>
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4">{{daily.duties[dt]?.casingPress}}</div></td>
|
|
|
|
+
|
|
|
|
+ <td><el-form-item :prop="'['+index+'].duties['+dt+'].fullInjectMeter'" :rules="ruleFloat('仪表读数')"><el-input v-model="daily.duties[dt].fullInjectMeter"/></el-form-item></td>
|
|
|
|
+ <td><el-form-item :prop="'['+index+'].duties['+dt+'].fullInjectReal'" :rules="ruleFloat('全井实注')"><el-input v-model="daily.duties[dt].fullInjectReal"/></el-form-item></td>
|
|
|
|
+
|
|
|
|
+ <td><el-form-item :prop="'['+index+'].duties['+dt+'].layer1InjectMeter'" :rules="ruleFloat('Ⅰ层仪表读数')"><el-input v-model="daily.duties[dt].layer1InjectMeter"/></el-form-item></td>
|
|
|
|
+ <td><el-form-item :prop="'['+index+'].duties['+dt+'].layer1InjectReal'" :rules="ruleFloat('Ⅰ层注入量')"><el-input v-model="daily.duties[dt].layer1InjectReal"/></el-form-item></td>
|
|
|
|
+
|
|
|
|
+ <td><el-form-item :prop="'['+index+'].duties['+dt+'].layer2InjectMeter'" :rules="ruleFloat('Ⅱ层仪表读数')"><el-input v-model="daily.duties[dt].layer2InjectMeter"/></el-form-item></td>
|
|
|
|
+ <td><el-form-item :prop="'['+index+'].duties['+dt+'].layer2InjectReal'" :rules="ruleFloat('Ⅱ层注入量')"><el-input v-model="daily.duties[dt].layer2InjectReal"/></el-form-item></td>
|
|
|
|
+
|
|
|
|
+ <td><el-form-item :prop="'['+index+'].duties['+dt+'].layer3InjectMeter'" :rules="ruleFloat('Ⅲ层仪表读数')"><el-input v-model="daily.duties[dt].layer3InjectMeter"/></el-form-item></td>
|
|
|
|
+ <td><el-form-item :prop="'['+index+'].duties['+dt+'].layer3InjectReal'" :rules="ruleFloat('Ⅲ层注入量')"><el-input v-model="daily.duties[dt].layer3InjectReal"/></el-form-item></td>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </tr>
|
|
|
|
+
|
|
|
|
+ <tr>
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4">小计</div></td>
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4"></div></td>
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4"></div></td>
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4"></div></td>
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4"></div></td>
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4"></div></td>
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4"></div></td>
|
|
|
|
+
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4">{{calcSum(daily,'fullInjectMeter')}}</div></td>
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4">{{calcSum(daily,'fullInjectReal')}}</div></td>
|
|
|
|
+
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4">{{calcSum(daily,'layer1InjectMeter')}}</div></td>
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4">{{calcSum(daily,'layer1InjectReal')}}</div></td>
|
|
|
|
+
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4">{{calcSum(daily,'layer2InjectMeter')}}</div></td>
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4">{{calcSum(daily,'layer2InjectReal')}}</div></td>
|
|
|
|
+
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4">{{calcSum(daily,'layer3InjectMeter')}}</div></td>
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4">{{calcSum(daily,'layer3InjectReal')}}</div></td>
|
|
|
|
+ </tr>
|
|
|
|
+
|
|
|
|
+ </template>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <tr class="tab-foot-tr" v-show="rptDatas&&rptDatas.length>0">
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-0"></div></td>
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-1"></div></td>
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4">白班巡检人:</div></td>
|
|
|
|
+ <td><el-input v-model="rptOth.dayPatrolBy"/></td>
|
|
|
|
+ <td></td>
|
|
|
|
+
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4">夜班巡检人:</div></td>
|
|
|
|
+ <td><el-input v-model="rptOth.nightPatrolBy"/></td>
|
|
|
|
+ <td></td>
|
|
|
|
+
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-4">审核人:</div></td>
|
|
|
|
+ <td><el-input v-model="rptOth.auditor"/></td>
|
|
|
|
+ </tr>
|
|
|
|
+ </table>
|
|
|
|
+ </el-form>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="rpt-table-fixed" style="display: none;">
|
|
|
|
+ <div class="rpt-table-header" ref="fixed_header">
|
|
|
|
+ <table cellpadding="0" cellspacing="0" class="rpt-table" align="center">
|
|
|
|
+ <tr>
|
|
|
|
+ <td rowspan="3"><div class="rpt-table-cell rpttab-cell-0">井号</div></td>
|
|
|
|
+ <td rowspan="3"><div class="rpt-table-cell rpttab-cell-1">注水方式</div></td>
|
|
|
|
+ </tr>
|
|
|
|
+ </table>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="rpt-table-body" ref="fixed_body">
|
|
|
|
+ <table cellpadding="0" cellspacing="0" class="rpt-table" align="center">
|
|
|
|
+ <tr class="dataRow dbl-line" v-for=" (daily,index) in rptDatas " :key="index">
|
|
|
|
+ <td rows="4"><div class="rpt-table-cell rpttab-cell-0">{{daily.wellName}}</div></td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr class="tab-foot-tr">
|
|
|
|
+ <td><div class="rpt-table-cell rpttab-cell-0"> </div></td>
|
|
|
|
+ </tr>
|
|
|
|
+ </table>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script setup>
|
|
|
|
+ import {reactive,ref,onMounted,watch,toRaw,nextTick,computed} from 'vue'
|
|
|
|
+ import {ElMessageBox,ElMessage} from 'element-plus'
|
|
|
|
+ import { storeToRefs } from 'pinia'
|
|
|
|
+ import { useHomeStore } from '../../store/home.js'
|
|
|
|
+
|
|
|
|
+ import rptAPI from '../../api/waterDailyRpt.js'
|
|
|
|
+
|
|
|
|
+ const queryForm=reactive({
|
|
|
|
+ dailyDate:null,
|
|
|
|
+ orgId:null,
|
|
|
|
+ orgName:null
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ const dailyDatefmt=computed(()=>{
|
|
|
|
+ if(queryForm.dailyDate){
|
|
|
|
+ let ds=queryForm.dailyDate.split('-')
|
|
|
|
+ return `${ds[0]}年${ds[1]}月${ds[2]}日`
|
|
|
|
+ }
|
|
|
|
+ return null
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ const btnStatTag=ref(0)
|
|
|
|
+
|
|
|
|
+ const dutyTimes=ref(['08:00-16:00','16:00-00:00','00:00-08:00'])
|
|
|
|
+ const rptDatas=ref(null)
|
|
|
|
+ const rptOth=reactive({
|
|
|
|
+ dayPatrolBy:null,
|
|
|
|
+ nightPatrolBy:null,
|
|
|
|
+ auditor:null,
|
|
|
|
+ dailyDate:null
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ const calcSum=(daily,prop)=>{
|
|
|
|
+ let sum=0
|
|
|
|
+ dutyTimes.value.forEach(dt=>{
|
|
|
|
+ sum+=daily.duties[dt][prop]?parseFloat(daily.duties[dt][prop]):0
|
|
|
|
+ })
|
|
|
|
+ return sum
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const clearRpt=()=>{
|
|
|
|
+ rptDatas.value=null
|
|
|
|
+ Object.assign(rptOth,{dayPatrolBy:null,nightPatrolBy:null,auditor:null,dailyDate:null})
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const queryHandle=()=>{
|
|
|
|
+
|
|
|
|
+ if(queryForm.dailyDate==null || queryForm.orgId==null){
|
|
|
|
+ ElMessage.error('请选择井站、日期后再继续')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ clearRpt()
|
|
|
|
+
|
|
|
|
+ btnStatTag.value=1
|
|
|
|
+ rptAPI.load(toRaw(queryForm)).then(resp=>{
|
|
|
|
+ btnStatTag.value=0
|
|
|
|
+ if(resp.code!=0){
|
|
|
|
+ ElMessage.error(resp.msg || "加载数据失败")
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(!resp.data || resp.data.length==0){
|
|
|
|
+ ElMessage.error("未找到对应数据")
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ let {dayPatrolBy,nightPatrolBy,auditor,dailyDate}=resp.data[0]
|
|
|
|
+
|
|
|
|
+ Object.assign(rptOth,{dayPatrolBy,nightPatrolBy,auditor,dailyDate})
|
|
|
|
+
|
|
|
|
+ rptDatas.value=resp.data
|
|
|
|
+
|
|
|
|
+ nextTick(()=>{
|
|
|
|
+ initSize()
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ }).catch(err=>{
|
|
|
|
+ btnStatTag.value=0
|
|
|
|
+ ElMessage.error('加载数据出错')
|
|
|
|
+ console.log(err)
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const rptform=ref(null)
|
|
|
|
+ const rpt_page=ref(null)
|
|
|
|
+ const rpt_title=ref(null)
|
|
|
|
+ const rpt_body=ref(null)
|
|
|
|
+ const rpt_header=ref(null)
|
|
|
|
+ const fixed_body=ref(null)
|
|
|
|
+ const fixed_header=ref(null)
|
|
|
|
+ const rptBodyH=ref(300)
|
|
|
|
+ const fixedBodyH=ref(283)
|
|
|
|
+
|
|
|
|
+ const rptboxScrollHandler=(evn)=>{
|
|
|
|
+ fixed_body.value.scrollTop=evn.target.scrollTop
|
|
|
|
+ rpt_header.value.scrollLeft=evn.target.scrollLeft
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ const ruleFloat=(msg)=>{
|
|
|
|
+ return {
|
|
|
|
+ pattern:/^\d+(\.\d+)?$/,
|
|
|
|
+ message:`${msg}应为大于0的数值`,
|
|
|
|
+ trigger:'blur'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ let formValiding=false //整体验证
|
|
|
|
+
|
|
|
|
+ const formValidHandler=(prop,isValid,message)=>{
|
|
|
|
+ //console.log(prop,isValid,message)
|
|
|
|
+ if(!isValid && !formValiding){
|
|
|
|
+ ElMessage.error(message)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const saveRpt=()=>{
|
|
|
|
+ formValiding=true
|
|
|
|
+ rptform.value.validate((isValid,invalidObj) => {
|
|
|
|
+ formValiding=false
|
|
|
|
+ if(!isValid){
|
|
|
|
+ ElMessage.error('还有数据不符合要求,请先修改再继续')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ btnStatTag.value=3
|
|
|
|
+ rptOth.dailyDate=queryForm.dailyDate
|
|
|
|
+ let saveData=toRaw(rptDatas.value)
|
|
|
|
+ saveData.forEach(daily=>{
|
|
|
|
+ Object.assign(daily,rptOth)
|
|
|
|
+ })
|
|
|
|
+ rptAPI.saveRpt(JSON.stringify(saveData)).then(resp=>{
|
|
|
|
+ btnStatTag.value=0
|
|
|
|
+ if(resp.code!=0){
|
|
|
|
+ ElMessage.error(resp.msg || '保存失败')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ ElMessage.success('保存成功')
|
|
|
|
+
|
|
|
|
+ }).catch(err=>{
|
|
|
|
+ btnStatTag.value=0
|
|
|
|
+ console.error(err)
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const extractRpt=()=>{
|
|
|
|
+ btnStatTag.value=2
|
|
|
|
+ clearRpt()
|
|
|
|
+ rptAPI.extract(toRaw(queryForm)).then(resp=>{
|
|
|
|
+ //console.log(resp)
|
|
|
|
+ btnStatTag.value=0
|
|
|
|
+ if(resp.code!=0){
|
|
|
|
+ ElMessage.error(resp.msg || "提取数据失败")
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //补齐班次数据
|
|
|
|
+ let blankDuty={
|
|
|
|
+ "dutyId": null,
|
|
|
|
+ "dutyTime": null,
|
|
|
|
+ "injectTime": null,
|
|
|
|
+ "patrolTime": null,
|
|
|
|
+ "dryPress": null,
|
|
|
|
+ "pumpPress": null,
|
|
|
|
+ "oilPress": null,
|
|
|
|
+ "casingPress": null,
|
|
|
|
+ "fullInjectMeter": null,
|
|
|
|
+ "fullInjectReal": null,
|
|
|
|
+ "layer1InjectMeter": null,
|
|
|
|
+ "layer1InjectReal": null,
|
|
|
|
+ "layer2InjectMeter": null,
|
|
|
|
+ "layer2InjectReal": null,
|
|
|
|
+ "layer3InjectMeter": null,
|
|
|
|
+ "layer3InjectReal": null,
|
|
|
|
+ "wellId": null,
|
|
|
|
+ "dailyDate": null
|
|
|
|
+ }
|
|
|
|
+ resp.data.forEach(daily=>{
|
|
|
|
+ let [dt1,dt2,dt3] = dutyTimes.value
|
|
|
|
+ if(!daily.duties){
|
|
|
|
+ daily.duties={
|
|
|
|
+ dt1:Object.assign({},blankDuty,{dutyTime:dt1}),
|
|
|
|
+ dt2:Object.assign({},blankDuty,{dutyTime:dt2}),
|
|
|
|
+ dt3:Object.assign({},blankDuty,{dutyTime:dt3})
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ if(!daily.duties[dt1]){
|
|
|
|
+ daily.duties[dt1]=Object.assign({},blankDuty,{dutyTime:dt1})
|
|
|
|
+ }
|
|
|
|
+ if(!daily.duties[dt2]){
|
|
|
|
+ daily.duties[dt2]=Object.assign({},blankDuty,{dutyTime:dt2})
|
|
|
|
+ }
|
|
|
|
+ if(!daily.duties[dt3]){
|
|
|
|
+ daily.duties[dt3]=Object.assign({},blankDuty,{dutyTime:dt3})
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ rptDatas.value=resp.data
|
|
|
|
+
|
|
|
|
+ nextTick(()=>{
|
|
|
|
+ initSize()
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ }).catch(err=>{
|
|
|
|
+ btnStatTag.value=0
|
|
|
|
+ console.error(err)
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ onMounted(()=>{
|
|
|
|
+ setTimeout(()=>{
|
|
|
|
+ initSize()
|
|
|
|
+ },100)
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ const initSize=()=>{
|
|
|
|
+
|
|
|
|
+ //报表内容区高度设置
|
|
|
|
+ rptBodyH.value=rpt_page.value.clientHeight-rpt_title.value.offsetHeight-rpt_header.value.offsetHeight-5
|
|
|
|
+ let diffH=rpt_body.value.offsetHeight-rpt_body.value.clientHeight
|
|
|
|
+ fixedBodyH.value=rptBodyH.value-diffH-1
|
|
|
|
+
|
|
|
|
+ //固定列首格高度设置
|
|
|
|
+ let hdtab=rpt_header.value.querySelector('table')
|
|
|
|
+ let fixedHdtab=fixed_header.value.querySelector('table')
|
|
|
|
+ fixedHdtab.rows[0].cells[0].style.height=(hdtab.rows[0].cells[0].clientHeight+0.5)+'px'
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const synFixedClmVal=()=>{
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const store=useHomeStore()
|
|
|
|
+ const {currentTreeNode} = storeToRefs(store)
|
|
|
|
+ watch(currentTreeNode,(newNode, oldNode)=>{
|
|
|
|
+ if(newNode!=null && newNode.nodeType=='org'){
|
|
|
|
+ queryForm.orgId=newNode.id
|
|
|
|
+ queryForm.orgName=newNode.name
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ },{ immediate: true })
|
|
|
|
+
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style scoped>
|
|
|
|
+ @import url('rpt.css');
|
|
|
|
+ .out-page{
|
|
|
|
+ height: 100%;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ }
|
|
|
|
+ .out-top{
|
|
|
|
+ height:60px;
|
|
|
|
+ padding:10px 20px;
|
|
|
|
+ border-bottom: 1px solid #e8e8e8;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ }
|
|
|
|
+ .rpt-page{
|
|
|
|
+ height: calc(100% - 60px);
|
|
|
|
+ }
|
|
|
|
+ .sub-title{
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-flow: row nowrap;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .rpttab-cell-0{width:120px;}
|
|
|
|
+ .rpttab-cell-1{width:100px;}
|
|
|
|
+ .rpttab-cell-2{width:100px;}
|
|
|
|
+ .rpttab-cell-3{width:100px;}
|
|
|
|
+ .rpttab-cell-4{width:100px;}
|
|
|
|
+ .rpttab-cell-5{width:100px;}
|
|
|
|
+ .rpttab-cell-6{width:100px;}
|
|
|
|
+ .rpttab-cell-7{width:100px;}
|
|
|
|
+ .rpttab-cell-8{width:100px;}
|
|
|
|
+ .rpttab-cell-9{width:100px;}
|
|
|
|
+ .dblh-cell{height:56px;}
|
|
|
|
+ .colspan-center{text-align: center;}
|
|
|
|
+
|
|
|
|
+ .rpt-table-body {
|
|
|
|
+ height: v-bind(rptBodyH+'px');
|
|
|
|
+ }
|
|
|
|
+ .rpt-table-fixed .rpt-table-body{
|
|
|
|
+ height: v-bind(fixedBodyH+'px');
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .rpt-table-body .el-form-item{
|
|
|
|
+ margin:0px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .el-input.rpt-table-cell{
|
|
|
|
+ height: 127px;
|
|
|
|
+ padding:0px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .el-input.rpt-table-cell:deep(.el-input__inner){
|
|
|
|
+ height:100%;
|
|
|
|
+ }
|
|
|
|
+</style>
|