Browse Source

提交新版本

lxh 1 year ago
parent
commit
c59b74460d

+ 5 - 4
src/views/vent/dust/warnRecordDust/index.vue

@@ -88,7 +88,8 @@ async function getTreeList() {
 function selectChange(treeNode) {
   console.log(treeNode, 'treeNode--------')
   pagination.current = 1
-  dataSource.value = dataSource.value.filter(v => v.areaName == treeNode.node.dataRef.title)
+  areaCode.value=treeData.filter(v=>v.areaName==treeNode.node.dataRef.title)[0]['areaCode']
+  getDustWarnHistoryList()
 }
 //时间选项切换
 function onDataChange(value, dateString) {
@@ -98,9 +99,9 @@ function onDataChange(value, dateString) {
 
 //获取预警记录
 async function getDustWarnHistoryList() {
-  let ttime_begin = `${dayjs(TimeRange.value[0]).format('YYYY-MM-DD')} 00:00:00`
-  let ttime_end = `${dayjs(TimeRange.value[1]).format('YYYY-MM-DD')} 00:00:00`
-  let res = await getDustWarnHistory({ pageNo: pagination.current, pageSize: pagination.pageSize, ttime_begin: ttime_begin, ttime_end: ttime_end })
+  let startTime = `${dayjs(TimeRange.value[0]).format('YYYY-MM-DD')} 00:00:00`
+  let endTime = `${dayjs(TimeRange.value[1]).format('YYYY-MM-DD')} 00:00:00`
+  let res = await getDustWarnHistory({ pageNo: pagination.current, pageSize: pagination.pageSize,areaCode:areaCode.value,startTime: startTime, endTime: endTime })
   console.log(res, '预警记录------------')
   if (res.records.length != 0) {
     res.records.forEach(el => {

+ 1 - 1
src/views/vent/fire/fireHome/components/workJc.vue

@@ -44,7 +44,7 @@
 </template>
 
 <script setup lang="ts">
-import { ref, reactive, onMounted, nextTick, defineProps, watch } from 'vue';
+import { ref, reactive, nextTick, defineProps, watch } from 'vue';
 import { Vue3SeamlessScroll } from 'vue3-seamless-scroll'
 import * as echarts from 'echarts';
 

+ 5 - 4
src/views/vent/fire/warnRecordFire/index.vue

@@ -87,7 +87,8 @@ async function getTreeList() {
 function selectChange(treeNode) {
   console.log(treeNode, 'treeNode--------')
   pagination.current = 1
-  dataSource.value = dataSource.value.filter(v => v.areaName == treeNode.node.dataRef.title)
+  areaCode.value=treeData.filter(v=>v.areaName==treeNode.node.dataRef.title)[0]['areaCode']
+  getFireWarnHistoryList()
 }
 //时间选项切换
 function onDataChange(value, dateString) {
@@ -97,9 +98,9 @@ function onDataChange(value, dateString) {
 
 //获取预警记录
 async function getFireWarnHistoryList() {
-  let ttime_begin = `${dayjs(TimeRange.value[0]).format('YYYY-MM-DD')} 00:00:00`
-  let ttime_end = `${dayjs(TimeRange.value[1]).format('YYYY-MM-DD')} 00:00:00`
-  let res = await getFireWarnHistory({ pageNo: pagination.current, pageSize: pagination.pageSize, ttime_begin: ttime_begin, ttime_end: ttime_end })
+  let startTime = `${dayjs(TimeRange.value[0]).format('YYYY-MM-DD')} 00:00:00`
+  let endTime  = `${dayjs(TimeRange.value[1]).format('YYYY-MM-DD')} 00:00:00`
+  let res = await getFireWarnHistory({ pageNo: pagination.current, pageSize: pagination.pageSize,areaCode:areaCode.value, startTime : startTime, endTime : endTime })
   console.log(res, '预警记录------------')
   if (res.records.length != 0) {
     res.records.forEach(el => {

+ 1 - 1
src/views/vent/fire/warnRecordFire/warnRecordFire.api.ts

@@ -2,7 +2,7 @@ import { defHttp } from '@/utils/http/axios';
 
 enum Api {
   getFireAreaInfo = '/fire/fireDisasterApi/getFireAreaInfo',
-  getFireWarnHistory='/fire/fireDisasterApi/getFireWarnHistory  '
+  getFireWarnHistory='/fire/fireDisasterApi/getFireWarnHistory'
 }
 /**
  * 菜单树接口