Przeglądaj źródła

注气详情设备ID添加

lxh 3 tygodni temu
rodzic
commit
2fd3dffed3

+ 1 - 1
package.json

@@ -48,7 +48,7 @@
     "cropperjs": "^1.5.13",
     "crypto-js": "^4.1.1",
     "d3": "^7.8.5",
-    "dayjs": "^1.11.9",
+    "dayjs": "^1.11.20",
     "dexie": "^3.2.2",
     "dom-align": "^1.12.4",
     "echarts": "^6.0.0",

BIN
src/assets/images/gasInjection/2-13.png


BIN
src/assets/images/themify/deepblue/home-container/configurable/gasInjection/2-13.png


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

@@ -13,7 +13,7 @@
     <template v-if="deviceType == 'gas_zq_sj'">
       <!-- <zqMonitorDetail :isShowExport="false" :tableColumn="tableColumnSj" :data="data" :optionDetail="optionDetailZq">
       </zqMonitorDetail> -->
-      <LineAndBarDetail :sysType="'Zq'" :isShowExport="false" :tableColumn="tableColumnSj"></LineAndBarDetail>
+      <LineAndBarDetail :sysType="'Zq'" :isShowExport="false" :tableColumn="tableColumnSj" :deviceID="data.deviceId"></LineAndBarDetail>
     </template>
     <!-- <template v-if="deviceType == 'gas_zq_hj'">
       <zqMonitorDetail :isShowExport="true" :tableColumn="tableColumnHj"></zqMonitorDetail>
@@ -57,7 +57,7 @@
 import { computed, reactive, ref, watch } from 'vue'
 import curveEchartDetail from './curveEchartDetail.vue'
 import zqMonitorDetail from './zqMonitorDetail.vue'
-import { tableColumnSj, tableColumnHj, tableColumnCc, optionDetailZq, optionDetailCc, columnCc, echartOptionGk } from '../gasInject/gasInject.data'
+import { tableColumnSj, tableColumnHj, tableColumnCc, optionDetailZq, optionDetailCc, columnCc, echartOptionGk } from './gasInject.data'
 import SyqDetails from './SyqDetails.vue';
 import systemDetailTable from './systemDetailTable.vue'
 import warnDetailTable from './warnDetailTable.vue'
@@ -76,7 +76,7 @@ let props = defineProps({
   },
   //数据
   data: {
-    type: Object
+    type: Object as any
   }
 
 })
@@ -117,8 +117,6 @@ let modalTitle = computed(() => {
   }
 })
 
-
-
 //关闭弹窗
 function handleCancel() {
   $emit('closeModal', false)

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

@@ -58,7 +58,12 @@ let props = defineProps({
   //详情图表系统类型
   sysType: {
     type: String
+  },
+  //设备ID
+  deviceID:{
+    type:String,
   }
+  
 })
 //注气参数详情数据
 let listData = ref<any[]>([
@@ -103,6 +108,7 @@ function handleBack() {
 }
 
 watch(() => props.isShowExport, (newV, oldV) => {
+  console.log(props.deviceID,'9900')
   showExport.value = newV
 }, { immediate: true })
 </script>

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

@@ -9,8 +9,9 @@
           <a-radio value="minutes">按分钟</a-radio>
         </a-radio-group>
         <!-- 时间查询条件 -->
-        <a-range-picker style="width:280px" v-model:value="timerSearch" :show-time="formatDate"
-          format="YYYY-MM-DD HH:mm" :placeholder="['开始时间', '结束时间']" />
+        <a-range-picker style="width:340px" :value="[searchData.startTime, searchData.endTime]"
+            :show-time="{ format: 'HH:mm' }" valueFormat="YYYY-MM-DD HH:mm" :placeholder="['开始时间', '结束时间']"
+            @change="onRangeChange" />
       </div>
       <div class="nav-btn" @click="handleHistory">
         <div class="nav-text">
@@ -25,8 +26,10 @@
 </template>
 
 <script setup lang="ts">
-import { computed, nextTick, ref, watch } from 'vue'
+import { computed, nextTick, ref, watch,onMounted, reactive } from 'vue'
 import * as echarts from 'echarts';
+import { listdays } from './gasInject.api'
+import dayjs from 'dayjs';
 
 let props = defineProps({
   //图表配置项
@@ -41,21 +44,25 @@ let props = defineProps({
 
 let timerTabs = ref('day')
 //查询时间段-天
-let timerSearch = ref('')
-let echartLines = ref(null)
+let searchData = reactive({
+  startTime: dayjs().subtract(1, 'day').format('YYYY-MM-DD HH:mm'),
+  endTime: dayjs().format('YYYY-MM-DD HH:mm'),
 
-//时间显示格式
-let formatDate = computed(() => {
-  let showTime = {}
-  if (timerTabs.value == 'day') {
-    showTime = {}
-  } else if (timerTabs.value == 'hours') {
-    showTime = Object.assign({}, { format: 'HH' })
-  } else if (timerTabs.value == 'minutes') {
-    showTime = Object.assign({}, { format: 'HH:mm' })
-  }
-  return showTime
 })
+let echartLines = ref(null)
+
+
+
+//获取图表数据
+async function getInit(){
+  // let res=await listdays({ttime_begin})
+  // console.log(res,'图表曲线')
+}
+//日期切换
+function onRangeChange(__, time) {
+  searchData.startTime = time[0];
+  searchData.endTime = time[1];
+}
 
 function getOption() {
   nextTick(() => {
@@ -110,11 +117,11 @@ function handleHistory() {
 
 }
 
-watch(() => props.ecahrtData, (newV, oldV) => {
-  if (newV) {
-    getOption()
-  }
-}, { immediate: true })
+onMounted(()=>{
+  getInit()
+   getOption()
+})
+
 </script>
 
 <style lang="less" scoped>

+ 85 - 0
src/views/vent/home/configurable/components/gasInject/gasInject.api.ts

@@ -0,0 +1,85 @@
+
+
+import { defHttp } from '/@/utils/http/axios';
+import { AesEncryption } from '/@/utils/cipher';
+import { loginCipher } from '/@/settings/encryptionSetting';
+
+
+enum Api {
+getlist = '/safety/ventanalyDevicesetLog/list',
+devicecontrol='/safety/ventanalyMonitorData/devicecontrol',
+listdays = '/safety/ventanalyMonitorData/listdays',
+
+getCameraUrl = '/monitor/camera/queryByCameraCode',
+//insertSyncRule = '/ventanaly-device/synccontrol/upcoming/saveOrUpdateRule',
+insertSyncRule = '/ventanaly-device/monitor/timeSync/insertSyncRuleClock',
+upcoming = '/ventanaly-device/synccontrol/upcoming',
+GetSyncRule='/ventanaly-device/synccontrol/upcoming/GetSyncRule',
+GetSyncRuleOperationLog='/ventanaly-device/synccontrol/upcoming/GetSyncRuleOperationLog',
+GetSyncRuleExecLog='/ventanaly-device/synccontrol/upcoming/GetSyncRuleExecLog',
+list='/safety/ventanalyDeviceInfo/list',
+edit='/ventanaly-device/safety/ventanalyDeviceInfo/batchEdit',
+manualTimeSync='/ventanaly-device/monitor/timeSync/manualTimeSync',
+isPasswordCurrect='/ventanaly-device/monitor/timeSync/isPasswordCurrect',
+ editDoor='/safety/ventanalyDeviceInfo/edit'
+
+}
+
+
+
+/**
+* 装备运行状态与控制-详情列表
+* @param params
+*/
+export const getList = (params) => defHttp.get({ url: Api.getlist, params },{ joinParamsToUrl: true });
+
+
+/**
+*装备运行状态与控制-控制
+* @param 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 });
+};
+/**
+* 详情历史曲线
+* @param params
+*/
+export const listdays = (params) => defHttp.get({ url: Api.listdays, params },{ joinParamsToUrl: true });
+
+export const cameraAddr = (params) => defHttp.get({ url: Api.getCameraUrl, params });
+
+/**
+* 定时设置-读取规则
+* @param params
+*/
+export const GetSyncRule = (params) => defHttp.post({ url: Api.GetSyncRule, params });
+/**
+* 定时设置-修改规则
+* @param params
+*/
+export const insertSyncRule = (params) => {
+return defHttp.post({ url: Api.insertSyncRule, params });
+};
+
+//读取未来30秒内的预告
+export const upcoming = (params) => defHttp.get({ url: Api.upcoming, params });
+
+//读取规则日志
+export const GetSyncRuleOperationLog = (params) => defHttp.get({ url: Api.GetSyncRuleOperationLog, params });
+
+//读取集控风门操作日志
+export const GetSyncRuleExecLog = (params) => defHttp.get({ url: Api.GetSyncRuleExecLog, params });
+//集控风门列表
+export const controlList = (params) => defHttp.get({ url: Api.list, params });
+//集控风门-确认选中
+export const confirmChoice = (params) => defHttp.put({ url: Api.edit, params });
+//同步PLC时钟
+export const manualTimeSync = () => defHttp.post({ url: Api.manualTimeSync });
+//设备集控选择密码设置
+export const isPasswordCurrect = (params) => defHttp.get({ url: Api.isPasswordCurrect,params });
+//风门勾选-分组
+export const editDoor = (params) => defHttp.put({ url: Api.editDoor, params });

+ 26 - 18
src/views/vent/home/configurable/components/gasInject/zqHistoryExport.vue

@@ -5,8 +5,9 @@
       <div class="nav-search">
         <div class="search-item">
           <span>时间:</span>
-          <a-range-picker style="width:300px" v-model:value="searchData.timer" :show-time="{ format: 'HH:mm' }"
-            format="YYYY-MM-DD HH:mm" :placeholder="['开始时间', '结束时间']" @change="onRangeChange" />
+          <a-range-picker style="width:340px" :value="[searchData.startTime, searchData.endTime]"
+            :show-time="{ format: 'HH:mm' }" valueFormat="YYYY-MM-DD HH:mm" :placeholder="['开始时间', '结束时间']"
+            @change="onRangeChange" />
         </div>
       </div>
       <div class="nav-btn" @click="handleHisExport">
@@ -28,8 +29,10 @@
 </template>
 
 <script setup lang="ts">
-import { reactive, ref } from 'vue'
+import { reactive, ref, onMounted } from 'vue'
 import { SvgIcon } from '/@/components/Icon';
+import { getList } from './gasInject.api'
+import dayjs from 'dayjs';
 
 let props = defineProps({
   //是否显示返回按钮
@@ -42,22 +45,12 @@ let props = defineProps({
 })
 
 let searchData = reactive({
-  timer: '',
+  startTime: dayjs().subtract(1, 'day').format('YYYY-MM-DD HH:mm'),
+  endTime: dayjs().format('YYYY-MM-DD HH:mm'),
+
 })
 let dataSource = ref<any[]>([
-  { fileName: '测试' },
-  { fileName: '测试' },
-  { fileName: '测试' },
-  { fileName: '测试' },
-  { fileName: '测试' },
-  { fileName: '测试' },
-  { fileName: '测试' },
-  { fileName: '测试' },
-  { fileName: '测试' },
-  { fileName: '测试' },
-  { fileName: '测试' },
-  { fileName: '测试' },
-  { fileName: '测试' },
+  // { fileName: '测试' },
 ])
 //分页参数配置
 let pagination = reactive({
@@ -74,10 +67,25 @@ let $emit = defineEmits(['handleBack'])
 function handleBack() {
   $emit('handleBack')
 }
+
+//注气详情table数据
+async function getHistoryTableData() {
+  let res = await getList({ pageNo: pagination.current, pageSize: pagination.pageSize, createTime_begin: searchData.startTime, createTime_end: searchData.endTime, devicetype: 'injection_standard' })
+  console.log(res, '装备运行状态与控制')
+  dataSource.value = res.records || []
+  pagination.total = res.total
+}
 //导出历史数据
 function handleHisExport() { }
 //日期切换
-function onRangeChange() { }
+function onRangeChange(__, time) {
+  searchData.startTime = time[0];
+  searchData.endTime = time[1];
+}
+
+onMounted(() => {
+  getHistoryTableData()
+})
 </script>
 
 <style lang="less" scoped>

+ 2 - 2
src/views/vent/home/configurable/components/preset/gasBoard.vue

@@ -50,7 +50,7 @@ let props = defineProps({
   .gas-board {
     --image-gas_board_bg: url('@/assets/images/themify/deepblue/home-container/configurable/gasInjection/7-4.png');
     --image-gas_board_bg1: url('@/assets/images/themify/deepblue/home-container/configurable/gasInjection/7-5.png');
-    --image-gas_board_bg2: url('@/assets/images/themify/deepblue/home-container/configurable/gasInjection/2-12.png');
+    --image-gas_board_bg2: url('@/assets/images/themify/deepblue/home-container/configurable/gasInjection/2-13.png');
     --image-gas_board_bg3: url('@/assets/images/themify/deepblue/home-container/configurable/gasInjection/3-3.png');
     --image-gas_board_bg4: url('@/assets/images/themify/deepblue/home-container/configurable/gasInjection/3-4.png');
   }
@@ -59,7 +59,7 @@ let props = defineProps({
 .gas-board {
   --image-gas_board_bg: url('@/assets/images/gasInjection/7-4.png');
   --image-gas_board_bg1: url('@/assets/images/gasInjection/7-5.png');
-  --image-gas_board_bg2: url('@/assets/images/gasInjection/2-12.png');
+  --image-gas_board_bg2: url('@/assets/images/gasInjection/2-13.png');
   --image-gas_board_bg3: url('@/assets/images/gasInjection/3-3.png');
   --image-gas_board_bg4: url('@/assets/images/gasInjection/3-4.png');
   display: flex;

+ 21 - 10
src/views/vent/home/configurable/components/preset/gasDeviceStatusControl.vue

@@ -27,7 +27,7 @@
         <div class="nav-btn" @click="handleSetting">
           <div class="nav-text">
             <SvgIcon class="icon-style1" size="12" name="gas-export"></SvgIcon>
-            <span>设置</span>
+            <span @click="handlerClick('set', item)">设置</span>
           </div>
         </div>
       </div>
@@ -35,9 +35,15 @@
     <!--密码操作弹窗 -->
     <a-modal v-model:visible="visibleTip" width="450px" okText="确定" cancelText="" title="提示" centered destroyOnClose
       @cancel="handleCancel" @ok="handleOk">
-      <div class="pass-box" style="display: flex;align-items: center; margin:25px 15px;">
-        <span style="width:100px">操作密码:</span>
-        <a-input-password  v-model:value="passWords"  :disabled="false"  />
+      <div class="pass-box" style="margin:25px 15px;">
+        <p style="display: flex;align-items: center;justify-content: center;">
+          <ExclamationCircleFilled style="color: #ffb700; font-size: 20px;margin-right: 10px;" />
+          您是否要进行{{modalOpration }} ?
+        </p>
+        <div style="display: flex;align-items: center;">
+          <span style="width:100px">操作密码:</span>
+          <a-input-password  v-model:value="passWords" :disabled="false" />
+        </div>
       </div>
     </a-modal>
   </div>
@@ -46,6 +52,8 @@
 <script setup lang="ts">
 import { reactive, ref, watch } from 'vue'
 import { SvgIcon } from '/@/components/Icon';
+import { ExclamationCircleFilled } from '@ant-design/icons-vue';
+import { devicecontrol } from '../gasInject/gasInject.api'
 
 let props = defineProps({
   option: {
@@ -56,9 +64,10 @@ let props = defineProps({
   }
 })
 
-let statusDatas = reactive({})
+let statusDatas = reactive({}) as any
 let presure = ref('')
 let visibleTip = ref(false)//密码提示弹窗是否开启
+let modalOpration = ref('')
 let passWords = ref('')//操作密码
 
 //设置
@@ -67,8 +76,9 @@ function handleSetting() {
 }
 //按钮操作
 function handlerClick(param, item) {
-  passWords.value=''
+  passWords.value = ''
   visibleTip.value = true
+  modalOpration.value=item.label
   switch (param) {
     case 'open':
       statusDatas[item.value] = '1'
@@ -83,7 +93,9 @@ function handlerClick(param, item) {
   }
 }
 //密码提示弹窗-确定
-function handleOk(){
+async function handleOk() {
+  let res= await devicecontrol({deviceid:statusDatas.deviceId,devicetype:statusDatas.devicetype,masterComputer: 0,paramcode:'',password:passWords.value})
+  console.log(res,'控制---')
   visibleTip.value = false
 }
 //密码提示弹窗-关闭
@@ -95,7 +107,7 @@ function handleCancel() {
 watch(() => props.statusData, (newV, oldV) => {
   if (newV) {
     statusDatas = newV
-    presure.value=presure.value ? presure.value : newV.paramSetting
+    presure.value = presure.value ? presure.value : newV.paramSetting
   }
 })
 
@@ -194,7 +206,7 @@ watch(() => props.statusData, (newV, oldV) => {
   .icon-style1 {
     margin-right: 5px;
   }
-  
+
 }
 
 ::v-deep .zxm-input-sm {
@@ -205,5 +217,4 @@ watch(() => props.statusData, (newV, oldV) => {
   border: 1px solid #2cb6ff;
   color: #fff;
 }
-
 </style>

+ 13 - 8
src/views/vent/home/configurable/configurable.api.ts

@@ -689,10 +689,10 @@ export const getSystemApi = (params) => {
     res.historyDataCc = historyDataCc
     //注气数据
     let zqData = res.msgTxt.find(v => v.type == 'injection_standard').datalist[0]
-    let co= res.msgTxt.find(v => v.type == 'modelsensor_co').datalist[0]
-    let ch4= res.msgTxt.find(v => v.type == 'modelsensor_ch4').datalist[0]
-    let o2= res.msgTxt.find(v => v.type == 'modelsensor_o2').datalist[0]
-    let temp= res.msgTxt.find(v => v.type == 'modelsensor_temperature').datalist[0]
+    let co = res.msgTxt.find(v => v.type == 'modelsensor_co').datalist[0]
+    let ch4 = res.msgTxt.find(v => v.type == 'modelsensor_ch4').datalist[0]
+    let o2 = res.msgTxt.find(v => v.type == 'modelsensor_o2').datalist[0]
+    let temp = res.msgTxt.find(v => v.type == 'modelsensor_temperature').datalist[0]
     //注气驱替促抽系统状态
     res.zyStatusData = {
       Pressure: zqData.readData.Pressure,
@@ -705,6 +705,8 @@ export const getSystemApi = (params) => {
     res.historyDataZq = historyDataZq
     //装备运行状态与控制
     res.deviceStatusControl = {
+      deviceId:zqData.deviceID,
+      devicetype:zqData.deviceType,
       remoteStatus: zqData.readData.remoteStatus,
       runStatus: zqData.readData.runStatus,
       paramSetting: zqData.readData.paramSetting,
@@ -719,10 +721,10 @@ export const getSystemApi = (params) => {
     }
     //环境监测
     res.environmentData = {
-     //coVal:co.readData.coval || '-',
-     //ch4Val:co.readData.ch4Value || '-',
-     //o2Val:co.readData.o2Value || '-',
-     //coVal:co.readData.coval || '-',
+      coVal: co.readData.coval || '-',
+      ch4Val: ch4.readData.ch4val || '-',
+      o2Val: o2.readData.o2val || '-',
+      temperature: temp.readData.temperature || '-',
     }
     //装备运行工况监测
     res.deviceGkData = {
@@ -736,6 +738,9 @@ export const getSystemApi = (params) => {
       penyouTemp: zqData.readData.penyouTemp || '-',
       youqitongTemp: zqData.readData.youqitongTemp || '-',
     }
+    //视频监控
+    res.deviceId=zqData.deviceID
+
 
     return res;
   });

+ 6 - 6
src/views/vent/home/configurable/configurable.data.ts

@@ -1201,13 +1201,13 @@ export const testConfigGasInjectZq: Config[] = [
       gallery_list: [],
       preset: [
         {
-          readFrom: '',
+          readFrom: 'environmentData',
           type: 'A',
           option: [
-            { label: '氧气浓度', value: 'xitongVoltage', iconName: 'o2-gas', unit: '%' },
-            { label: '甲烷浓度', value: 'xitongVoltage', iconName: 'ch4-gas', unit: '%' },
-            { label: '环境温度', value: 'xitongVoltage', iconName: 'temp-gas', unit: '℃' },
-            { label: 'CO浓度', value: 'xitongVoltage', iconName: 'wind-gas', unit: 'ppm' },
+            { label: '氧气浓度', value: 'o2Val', iconName: 'o2-gas', unit: '%' },
+            { label: '甲烷浓度', value: 'ch4Val', iconName: 'ch4-gas', unit: '%' },
+            { label: '环境温度', value: 'temperature', iconName: 'temp-gas', unit: '℃' },
+            { label: 'CO浓度', value: 'coVal', iconName: 'wind-gas', unit: 'ppm' },
           ],
         },
       ],
@@ -1371,7 +1371,7 @@ export const testConfigGasInjectZq: Config[] = [
       gallery_list: [],
       preset: [
         {
-          readFrom: '',
+          readFrom: 'deviceId',
         }
       ],
       to: '/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=fanmain',