Эх сурвалжийг харах

注气驱替修改-提交

lxh 20 цаг өмнө
parent
commit
500eccbd75

+ 1 - 1
package.json

@@ -67,7 +67,7 @@
     "md5": "^2.3.0",
     "md5": "^2.3.0",
     "mky-svg": "^1.0.2",
     "mky-svg": "^1.0.2",
     "mockjs": "^1.1.0",
     "mockjs": "^1.1.0",
-    "moment": "^2.29.4",
+    "moment": "^2.30.1",
     "nprogress": "^0.2.0",
     "nprogress": "^0.2.0",
     "path-to-regexp": "^6.2.1",
     "path-to-regexp": "^6.2.1",
     "pinia": "2.1.6",
     "pinia": "2.1.6",

+ 1 - 1
src/views/vent/home/configurable/components/gasInject/LineAndBarDetail.vue

@@ -109,7 +109,7 @@ function getSearch() {
     case '8':
     case '8':
       getHistoryData(timerTabs.value)
       getHistoryData(timerTabs.value)
       break;
       break;
-    case '6':
+    case '5':
       getHistoryData(timerTabs.value)
       getHistoryData(timerTabs.value)
       break;
       break;
   }
   }

+ 14 - 7
src/views/vent/home/configurable/components/gasInject/TableAndLine.vue

@@ -9,7 +9,7 @@
             <a-radio value="5">按分钟</a-radio>
             <a-radio value="5">按分钟</a-radio>
           </a-radio-group>
           </a-radio-group>
           <!-- 时间查询条件 -->
           <!-- 时间查询条件 -->
-          <span>时间:</span>
+          <!-- <span style="color:#fff">时间:</span> -->
           <a-range-picker style="width:340px" :value="[searchData.startTime, searchData.endTime]"
           <a-range-picker style="width:340px" :value="[searchData.startTime, searchData.endTime]"
             :show-time="{ format: 'HH:mm:ss' }" valueFormat="YYYY-MM-DD HH:mm:ss" :placeholder="['开始时间', '结束时间']"
             :show-time="{ format: 'HH:mm:ss' }" valueFormat="YYYY-MM-DD HH:mm:ss" :placeholder="['开始时间', '结束时间']"
             @change="onRangeChange" />
             @change="onRangeChange" />
@@ -84,7 +84,7 @@ import { computed, onMounted, reactive, ref } from 'vue'
 import echartLineDate from './echartLineDate.vue'
 import echartLineDate from './echartLineDate.vue'
 import { tableColumnSshl, tableColumnLjhl, tableColumnCcl, tableColumnWshl, tableColumnJdsl } from './gasInject.data'
 import { tableColumnSshl, tableColumnLjhl, tableColumnCcl, tableColumnWshl, tableColumnJdsl } from './gasInject.data'
 import { ccHlEchartOption, ccLEchartOption, wshLEchartOption, jdsLEchartOption } from './gasInject.data'
 import { ccHlEchartOption, ccLEchartOption, wshLEchartOption, jdsLEchartOption } from './gasInject.data'
-import { historydata, listdays } from './gasInject.api'
+import { historydata, listdays, historydataEvaluation,historydataZq } from './gasInject.api'
 import dayjs from 'dayjs'
 import dayjs from 'dayjs'
 import { message } from 'ant-design-vue'
 import { message } from 'ant-design-vue'
 
 
@@ -218,11 +218,18 @@ async function getHistoryData(skip) {
 
 
 //导出历史数据
 //导出历史数据
 async function handleHisExport() {
 async function handleHisExport() {
-  let res = await historydata({ ttime_begin: searchData.startTime, ttime_end: searchData.endTime, skip: '8', gdeviceids: props.deviceID, pageNo: 1, pageSize: 1000, strtype: props.strtype })
-  console.log(res, '导出---')
-  let fileName = props.activeFlag == 'ccsj' ? '支管抽采数据' : props.activeFlag == 'xgpj' ? '促抽效果评价' : ''
-  let filename = `${fileName}-${new Date().getFullYear()}.${new Date().getMonth() + 1}.${new Date().getDate()}.xlsx`;
-  downFilePublic(res, filename);
+  if (props.activeFlag == 'xgpj') {
+    let res = await historydataEvaluation({ ttime_begin: searchData.startTime, ttime_end: searchData.endTime, skip: '8', gdeviceids: props.deviceID, pageNo: 1, pageSize: 1000, strtype: props.strtype })
+    console.log(res, '导出---')
+    let filename = `促抽效果评价-${new Date().getFullYear()}.${new Date().getMonth() + 1}.${new Date().getDate()}.xlsx`;
+    downFilePublic(res, filename);
+  } else {
+ let res = await historydataZq({ ttime_begin: searchData.startTime, ttime_end: searchData.endTime, skip: '8', gdeviceids: props.deviceID, pageNo: 1, pageSize: 1000, strtype: props.strtype })
+    console.log(res, '导出---')
+    let filename = `支管抽采数据-${new Date().getFullYear()}.${new Date().getMonth() + 1}.${new Date().getDate()}.xlsx`;
+    downFilePublic(res, filename);
+  }
+
   message.success('导出成功')
   message.success('导出成功')
 }
 }
 // 下载公用方法
 // 下载公用方法

+ 3 - 2
src/views/vent/home/configurable/components/gasInject/curveEchartDetail.vue

@@ -34,7 +34,7 @@
     </template>
     </template>
     <template v-else>
     <template v-else>
       <zqHistoryExport :tableColumn="tableColumn" :detailType="'history'" :deviceId="deviceID" :isShowExports="isShowExports" :strtype="strtype"
       <zqHistoryExport :tableColumn="tableColumn" :detailType="'history'" :deviceId="deviceID" :isShowExports="isShowExports" :strtype="strtype"
-        @handleBack="handleBack">
+      :sysType="sysType"  @handleBack="handleBack">
       </zqHistoryExport>
       </zqHistoryExport>
     </template>
     </template>
   </div>
   </div>
@@ -147,11 +147,12 @@ async function getHistoryData(skip) {
 }
 }
 //查询
 //查询
 function getSearch() {
 function getSearch() {
+  console.log(timerTabs.value,'timerTabs.value')
   switch (timerTabs.value) {
   switch (timerTabs.value) {
     case '8':
     case '8':
       getHistoryData(timerTabs.value)
       getHistoryData(timerTabs.value)
       break;
       break;
-    case '6':
+    case '5':
       getHistoryData(timerTabs.value)
       getHistoryData(timerTabs.value)
       break;
       break;
   }
   }

+ 1 - 1
src/views/vent/home/configurable/components/gasInject/echartLineDate.vue

@@ -4,7 +4,7 @@
     <div v-if="echartOption.showTime" class="radio-box">
     <div v-if="echartOption.showTime" class="radio-box">
       <a-radio-group v-model:value="nowData" name="radioGroup" @change="changeRadio">
       <a-radio-group v-model:value="nowData" name="radioGroup" @change="changeRadio">
         <a-radio value="8">按小时</a-radio>
         <a-radio value="8">按小时</a-radio>
-        <a-radio value="6">按分钟</a-radio>
+        <a-radio value="5">按分钟</a-radio>
       </a-radio-group>
       </a-radio-group>
     </div>
     </div>
     <div class="echart-line" ref="echartLines"></div>
     <div class="echart-line" ref="echartLines"></div>

+ 3 - 3
src/views/vent/home/configurable/components/gasInject/echartLineDateGk.vue

@@ -29,7 +29,7 @@
 <script setup lang="ts">
 <script setup lang="ts">
 import { computed, nextTick, ref, watch, onMounted, reactive } from 'vue'
 import { computed, nextTick, ref, watch, onMounted, reactive } from 'vue'
 import * as echarts from 'echarts';
 import * as echarts from 'echarts';
-import { listdays,historydata } from './gasInject.api'
+import { listdays,historydata,historydataEquipment } from './gasInject.api'
 import dayjs from 'dayjs';
 import dayjs from 'dayjs';
 import { message } from 'ant-design-vue';
 import { message } from 'ant-design-vue';
 
 
@@ -91,7 +91,7 @@ function getSearch() {
     case '8':
     case '8':
       getInit(timerTabs.value)
       getInit(timerTabs.value)
       break;
       break;
-    case '6':
+    case '5':
       getInit(timerTabs.value)
       getInit(timerTabs.value)
       break;
       break;
   }
   }
@@ -161,7 +161,7 @@ function getOption() {
 }
 }
 //导出
 //导出
 async function handleHistory() {
 async function handleHistory() {
- let res = await historydata({ ttime_begin: searchData.startTime, ttime_end: searchData.endTime, skip: timerTabs.value, gdeviceids:props.deviceID, pageNo: 1, pageSize: 1000, strtype:props.strtype })
+ let res = await historydataEquipment({ ttime_begin: searchData.startTime, ttime_end: searchData.endTime, skip: timerTabs.value, gdeviceids:props.deviceID, pageNo: 1, pageSize: 1000, strtype:props.strtype })
   console.log(res, '导出---')
   console.log(res, '导出---')
   let filename = `装备运行工况-${new Date().getFullYear()}.${new Date().getMonth() +1}.${new Date().getDate()}.xlsx`;
   let filename = `装备运行工况-${new Date().getFullYear()}.${new Date().getMonth() +1}.${new Date().getDate()}.xlsx`;
   downFilePublic(res, filename);
   downFilePublic(res, filename);

+ 9 - 3
src/views/vent/home/configurable/components/gasInject/environHistoryExport.vue

@@ -13,7 +13,7 @@
           <span> 间隔时间:</span>
           <span> 间隔时间:</span>
           <a-select ref="select" v-model:value="skip" style="width: 240px">
           <a-select ref="select" v-model:value="skip" style="width: 240px">
             <a-select-option v-for="(item, index) in timeOption" :key="item.label" :value="item.value">{{ item.label
             <a-select-option v-for="(item, index) in timeOption" :key="item.label" :value="item.value">{{ item.label
-              }}</a-select-option>
+            }}</a-select-option>
           </a-select>
           </a-select>
         </div>
         </div>
         <div class="search-item">
         <div class="search-item">
@@ -29,7 +29,7 @@
     </div>
     </div>
     <div class="main-content">
     <div class="main-content">
       <a-table size="small" :dataSource="dataSource" :columns="tableColumn" :scroll="{ y: 455 }"
       <a-table size="small" :dataSource="dataSource" :columns="tableColumn" :scroll="{ y: 455 }"
-        :pagination="pagination">
+        :pagination="pagination" @change="changePage">
         <template #action="{ record }">
         <template #action="{ record }">
           <!-- <a class="table-action-link" @click="handleSpDetail(record)">审批详情</a> -->
           <!-- <a class="table-action-link" @click="handleSpDetail(record)">审批详情</a> -->
         </template>
         </template>
@@ -67,7 +67,7 @@ let searchData = reactive({
   startTime: dayjs().subtract(1, 'day').format('YYYY-MM-DD HH:mm:ss'),
   startTime: dayjs().subtract(1, 'day').format('YYYY-MM-DD HH:mm:ss'),
   endTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
   endTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
 })
 })
-let skip = ref('9')
+let skip = ref('1')
 
 
 let dataSource = ref<any[]>([])
 let dataSource = ref<any[]>([])
 //分页参数配置
 //分页参数配置
@@ -107,6 +107,12 @@ async function getTbleData() {
   }) || []
   }) || []
   pagination.total = res.datalist.total
   pagination.total = res.datalist.total
 }
 }
+//分页切换
+function changePage(val) {
+  pagination.current = val.current
+  pagination.pageSize = val.pageSize
+  getTbleData()
+}
 //导出历史数据
 //导出历史数据
 async function handleHisExport() {
 async function handleHisExport() {
   let res = await historydata({ ttime_begin: searchData.startTime, ttime_end: searchData.endTime, skip: skip.value, gdeviceids: props.deviceId, pageNo: pagination.current, pageSize: pagination.pageSize, strtype: props.strtype })
   let res = await historydata({ ttime_begin: searchData.startTime, ttime_end: searchData.endTime, skip: skip.value, gdeviceids: props.deviceId, pageNo: pagination.current, pageSize: pagination.pageSize, strtype: props.strtype })

+ 39 - 18
src/views/vent/home/configurable/components/gasInject/gasInject.api.ts

@@ -1,17 +1,18 @@
-
-
 import { defHttp } from '/@/utils/http/axios';
 import { defHttp } from '/@/utils/http/axios';
 import { AesEncryption } from '/@/utils/cipher';
 import { AesEncryption } from '/@/utils/cipher';
 import { loginCipher } from '/@/settings/encryptionSetting';
 import { loginCipher } from '/@/settings/encryptionSetting';
 
 
 
 
 enum Api {
 enum Api {
-  getlist = '/safety/ventanalyDevicesetLog/list',
-  devicecontrol = '/safety/ventanalyMonitorData/devicecontrol',
-  listdays = '/safety/ventanalyMonitorData/listdays',
-  historydata = '/safety/ventanalyMonitorData/export/historydata',
-  getAlarmLogList = '/monitor/groupCompany/getAlarmLogList',
-  exportXls = '/safety/ventanalyAlarmLog/exportXls'
+getlist = '/safety/ventanalyDevicesetLog/list',
+devicecontrol = '/safety/ventanalyMonitorData/devicecontrol',
+listdays = '/safety/ventanalyMonitorData/listdays',
+historydata = '/safety/ventanalyMonitorData/export/historydata',
+getAlarmLogList = '/monitor/groupCompany/getAlarmLogList',
+exportXls = '/safety/ventanalyAlarmLog/exportXls',
+historydataZq='/safety/ventanalyMonitorData/export/injection/historydata',
+historydataEquipment='/safety/ventanalyMonitorData/export/injection/equipment/historydata',
+historydataEvaluation= '/safety/ventanalyMonitorData/export/injection/evaluation/historydata'
 }
 }
 
 
 
 
@@ -28,10 +29,10 @@ export const getList = (params) => defHttp.get({ url: Api.getlist, params }, { j
 * @param params
 * @param params
 */
 */
 export const devicecontrol = (params) => {
 export const devicecontrol = (params) => {
-  // 加密password
-  const encryption = new AesEncryption({ key: loginCipher.key, iv: loginCipher.iv });
-  params.password = encryption.encryptByAES(params.password);
-  return defHttp.put({ url: Api.devicecontrol, params });
+// 加密password
+const encryption = new AesEncryption({ key: loginCipher.key, iv: loginCipher.iv });
+params.password = encryption.encryptByAES(params.password);
+return defHttp.put({ url: Api.devicecontrol, params });
 };
 };
 
 
 /**
 /**
@@ -41,9 +42,9 @@ export const devicecontrol = (params) => {
 export const listdays = (params) => defHttp.get({ url: Api.listdays, params }, { joinParamsToUrl: true });
 export const listdays = (params) => defHttp.get({ url: Api.listdays, params }, { joinParamsToUrl: true });
 
 
 /**
 /**
- * 导出详情历史
- * @param params
- */
+* 导出详情历史
+* @param params
+*/
 export const historydata = (params) => defHttp.get({ url: Api.historydata, params, responseType: 'blob' });
 export const historydata = (params) => defHttp.get({ url: Api.historydata, params, responseType: 'blob' });
 
 
 /**
 /**
@@ -53,7 +54,27 @@ export const historydata = (params) => defHttp.get({ url: Api.historydata, param
 export const getAlarmLogList = (params) => defHttp.post({ url: Api.getAlarmLogList, params },);
 export const getAlarmLogList = (params) => defHttp.post({ url: Api.getAlarmLogList, params },);
 
 
 /**
 /**
- * 异常详情-导出
- * @param params
- */
+* 异常详情-导出
+* @param params
+*/
 export const exportXls = (params) => defHttp.get({ url: Api.exportXls, params, responseType: 'blob' });
 export const exportXls = (params) => defHttp.get({ url: Api.exportXls, params, responseType: 'blob' });
+
+/**
+* 注气参数历史详情-导出
+* @param params
+*/
+export const historydataZq = (params) => defHttp.get({ url: Api.historydataZq, params, responseType: 'blob' });
+
+/**装备运行工况-导出
+* 导出
+* @param params
+*/
+export const historydataEquipment = (params) => defHttp.get({ url: Api.historydataEquipment, params, responseType:
+'blob' });
+
+/**促抽效果评价-导出
+* 导出
+* @param params
+*/
+export const historydataEvaluation = (params) => defHttp.get({ url: Api.historydataEvaluation, params, responseType:
+'blob' });

+ 12 - 8
src/views/vent/home/configurable/components/gasInject/zqHistoryExport.vue

@@ -25,8 +25,8 @@
       </div>
       </div>
     </div>
     </div>
     <div class="main-content">
     <div class="main-content">
-      <a-table size="small" :dataSource="dataSource" :columns="tableColumn"  maxWidth="1310" :scroll="{ x: 'max-content', y: 465 }"
-        :pagination="pagination" @change="changePage">
+      <a-table size="small" :dataSource="dataSource" :columns="tableColumn" maxWidth="1310"
+        :scroll="{ x: 'max-content', y: 465 }" :pagination="pagination" @change="changePage">
         <template #action="{ record }">
         <template #action="{ record }">
           <!-- <a class="table-action-link" @click="handleSpDetail(record)">审批详情</a> -->
           <!-- <a class="table-action-link" @click="handleSpDetail(record)">审批详情</a> -->
         </template>
         </template>
@@ -38,7 +38,7 @@
 <script setup lang="ts">
 <script setup lang="ts">
 import { reactive, ref, onMounted } from 'vue'
 import { reactive, ref, onMounted } from 'vue'
 import { SvgIcon } from '/@/components/Icon';
 import { SvgIcon } from '/@/components/Icon';
-import { listdays, getList, historydata } from './gasInject.api'
+import { listdays, getList, historydata, historydataZq } from './gasInject.api'
 import dayjs from 'dayjs';
 import dayjs from 'dayjs';
 import { message } from 'ant-design-vue';
 import { message } from 'ant-design-vue';
 
 
@@ -66,10 +66,14 @@ let props = defineProps({
   isShowExports: {
   isShowExports: {
     type: Boolean,
     type: Boolean,
     default: true
     default: true
-  }
+  },
+  //详情图表系统类型
+  sysType: {
+    type: String
+  },
 })
 })
 
 
-let timerTabs = ref('4')
+let timerTabs = ref('5')
 let searchData = reactive({
 let searchData = reactive({
   startTime: dayjs().subtract(1, 'day').format('YYYY-MM-DD HH:mm:ss'),
   startTime: dayjs().subtract(1, 'day').format('YYYY-MM-DD HH:mm:ss'),
   endTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
   endTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
@@ -144,10 +148,10 @@ function changePage(val) {
 }
 }
 //导出历史数据
 //导出历史数据
 async function handleHisExport() {
 async function handleHisExport() {
-  let res = await historydata({ ttime_begin: searchData.startTime, ttime_end: searchData.endTime, skip: '8', gdeviceids: props.deviceId, pageNo: pagination.current, pageSize: pagination.pageSize, strtype: props.strtype })
+  let res = await historydataZq({ ttime_begin: searchData.startTime, ttime_end: searchData.endTime, skip: '8', gdeviceids: props.deviceId, pageNo: pagination.current, pageSize: pagination.pageSize, strtype: props.strtype })
   console.log(res, '导出---')
   console.log(res, '导出---')
-  let fileName=props.strtype=='injection_standard' ? '注气数据' : props.strtype=='pump' ? '抽采数据' : ''
-  let filename = `${fileName}-${new Date().getFullYear()}.${new Date().getMonth() +1}.${new Date().getDate()}.xlsx`;
+  let fileName = props.strtype == 'injection_standard' ? '注气数据' : props.strtype == 'pump' ? '抽采数据' : ''
+  let filename = `${fileName}-${new Date().getFullYear()}.${new Date().getMonth() + 1}.${new Date().getDate()}.xlsx`;
   downFilePublic(res, filename);
   downFilePublic(res, filename);
   message.success('导出成功')
   message.success('导出成功')
 }
 }

+ 3 - 1
src/views/vent/home/configurable/components/preset/gasZyChart.vue

@@ -7,6 +7,7 @@
 <script setup lang="ts">
 <script setup lang="ts">
 import { nextTick, onMounted, ref, watch } from 'vue'
 import { nextTick, onMounted, ref, watch } from 'vue'
 import * as echarts from 'echarts';
 import * as echarts from 'echarts';
+import moment from 'moment'
 
 
 let props = defineProps({
 let props = defineProps({
   data: {
   data: {
@@ -91,7 +92,8 @@ function getOption() {
           fontSize: 12,
           fontSize: 12,
         },
         },
         formatter: function (params) {
         formatter: function (params) {
-          return params.marker + params.name + ': ' + (params.value[3] / 1000 / 60 / 60).toFixed(2) + ' h';
+          console.log(params,'00---')
+          return `${params.marker} ${params.name}&nbsp:&nbsp${(params.value[3] / 1000 / 60 / 60).toFixed(2)}h<br/>${params.marker}开始运行&nbsp:&nbsp${moment(params.value[1]).format('YYYY-MM-DD HH:mm:ss')}<br/>${params.marker}结束运行&nbsp:&nbsp${moment(params.value[2]).format('YYYY-MM-DD HH:mm:ss')}`
         },
         },
       },
       },
       grid: {
       grid: {