zxh 1 vuosi sitten
vanhempi
commit
f620e29b55

+ 23 - 11
src/views/spectrum/dynamicMonitor/realTimeMonitor/widget.vue

@@ -23,6 +23,9 @@
           <el-button type="primary" @click="query()">查询</el-button>
           <el-button type="primary" @click="reset()">重置</el-button>
         </el-form-item>
+        <!-- <el-form-item style="float:right">
+          <el-button type="primary" @click="exportData()">导出</el-button>
+        </el-form-item> -->
       </el-form>
     </div>
     <!-- 表格 -->
@@ -32,7 +35,7 @@
         <template slot="empty">
           <img src="@/assets/icon/null.png" alt="" />
         </template>
-        <el-table-column prop="date" label="序号" width="50" align="center" fixed>
+        <el-table-column prop="date" label="序号" width="90" align="center" fixed sortable>
           <template slot-scope="scope">{{ scope.$index + 1 }}</template>
         </el-table-column>
         <el-table-column label="操作" align="center">
@@ -40,12 +43,13 @@
             <el-button type="text" @click="openCurve(row)" style="padding:0">监测曲线</el-button>
           </template>
         </el-table-column>
-        <el-table-column prop="siteName" label="监测点名称" show-overflow-tooltip width="200" align="center"></el-table-column>
+        <el-table-column prop="siteName" label="监测点名称" show-overflow-tooltip width="200" align="left" sortable></el-table-column>
         <!-- <el-table-column prop="siteState" label="站点状态" show-overflow-tooltip width="150" align="center">
           <template slot-scope="{ row }">{{ ['正常', '报警', '离线', '维护中'][row.siteState - 1] }}</template>
         </el-table-column> -->
-        <el-table-column prop="collectionDate" label="最近一次数据采集时间" show-overflow-tooltip width="180" align="center"></el-table-column>
-        <el-table-column label="上传间隔(分钟)" show-overflow-tooltip width="120" align="center">
+        <el-table-column prop="total" label="数据总量" width="120" show-overflow-tooltip align="center" sortable></el-table-column>
+        <el-table-column prop="collectionDate" label="最近一次数据采集时间" show-overflow-tooltip width="210" align="center" sortable></el-table-column>
+        <el-table-column label="上传间隔(分钟)" show-overflow-tooltip width="140" align="center" sortable>
           <template slot-scope="{ row }">{{ getIntervalMinutes(row.collectionDate) }}</template>
         </el-table-column>
         <el-table-column prop="liquid" label="液位(m)" show-overflow-tooltip width="150" align="center" sortable>
@@ -54,12 +58,12 @@
         <el-table-column prop="cod" label="化学需氧量(mg/L)" show-overflow-tooltip width="170" align="center" sortable>
           <template slot-scope="{ row }">{{ row.cod ? row.cod : '/' }}</template>
         </el-table-column>
-        <el-table-column prop="turb" label="浊度(NTU)" show-overflow-tooltip width="150" align="center" sortable>
-          <template slot-scope="{ row }">{{ row.turb ? row.turb : '/' }}</template>
-        </el-table-column>
         <el-table-column prop="ec" label="电导率(uS/cm)" show-overflow-tooltip width="150" align="center" sortable>
           <template slot-scope="{ row }">{{ row.ec ? row.ec : '/' }}</template>
         </el-table-column>
+        <el-table-column prop="turb" label="浊度(NTU)" show-overflow-tooltip width="150" align="center" sortable>
+          <template slot-scope="{ row }">{{ row.turb ? row.turb : '/' }}</template>
+        </el-table-column>
         <el-table-column prop="temperature" label="温度(℃)" show-overflow-tooltip width="150" align="center" sortable>
           <template slot-scope="{ row }">{{ row.temperature ? row.temperature : '/' }}</template>
         </el-table-column>
@@ -78,9 +82,9 @@
         <el-table-column prop="tss" label="悬浮物(mg/L)" show-overflow-tooltip width="150" align="center" sortable>
           <template slot-scope="{ row }">{{ row.tss ? row.tss : '/' }}</template>
         </el-table-column>
-        <el-table-column prop="partitionName" label="排水分区" show-overflow-tooltip width="150" align="center"></el-table-column>
-        <el-table-column prop="groupByName" label="监测分组" show-overflow-tooltip width="150" align="center"></el-table-column>
-        <el-table-column prop="deviceTypeName" label="监测设备类型" show-overflow-tooltip width="150" align="center"></el-table-column>
+        <el-table-column prop="partitionName" label="排水分区" show-overflow-tooltip width="150" align="center" sortable></el-table-column>
+        <el-table-column prop="groupByName" label="监测分组" show-overflow-tooltip width="150" align="center" sortable></el-table-column>
+        <el-table-column prop="deviceTypeName" label="监测设备类型" show-overflow-tooltip width="150" align="center" sortable></el-table-column>
       </el-table>
     </div>
     <!-- 分页 -->
@@ -92,7 +96,7 @@
 </template>
 
 <script>
-import { getSites, getPGBSiteData } from '@/views/spectrum/dynamicMonitor/api/api'
+import { getSites, getPGBSiteData,getDevicecheckdataList } from '@/views/spectrum/dynamicMonitor/api/api'
 
 import historyCurve from '@/views/spectrum/common/historyCurve/index'
 import { getSiteIcon } from '@/views/spectrum/common/siteIcon/siteIcon' // 站点图标1
@@ -215,6 +219,14 @@ export default {
       this.form = this.$options.data().form
       this.getPGBSiteData()
     },
+    /**
+     * 导出数据
+     */
+    exportData(){
+      getDevicecheckdataList({export:1}).then(res=>{
+        console.log('导出',res);
+      })
+    },
     /**
      * 打开历史曲线
      */

+ 1 - 1
src/views/spectrum/dynamicMonitor/siteMonitor/widget.vue

@@ -398,7 +398,7 @@ export default {
       let entity = viewer.entities.getById(data.id)
       console.log(entity);
       if (!entity) {
-        this.$message.info('该站点处于停用状态!')
+        // this.$message.info('该站点处于停用状态!')
         return
       }
       // 本组件定义弹窗存在先移除

+ 1 - 3
src/views/spectrum/dynamicMonitor/waterQualityLedger/widget.vue

@@ -43,9 +43,7 @@
         <el-table-column prop="date" label="序号" width="50" align="center">
           <template slot-scope="scope">{{scope.$index+1}}</template>
         </el-table-column>
-        <el-table-column prop="siteName" label="编辑" show-overflow-tooltip width="200" align="center">
-
-        </el-table-column>
+        <!-- <el-table-column prop="siteName" label="编辑" show-overflow-tooltip width="200" align="center"></el-table-column> -->
         <el-table-column prop="siteName" label="监测点名称" show-overflow-tooltip width="200" align="center"></el-table-column>
         <el-table-column prop="collectionDate" label="采集数据时间" show-overflow-tooltip width="200" align="center"></el-table-column>
         <el-table-column prop="isWarning" label="是否存在报警" show-overflow-tooltip width="150" align="center">

+ 1 - 3
src/views/spectrum/dynamicMonitor/waterQualityLedgerEdit/widget.vue

@@ -43,9 +43,7 @@
         <el-table-column prop="date" label="序号" width="50" align="center">
           <template slot-scope="scope">{{scope.$index+1}}</template>
         </el-table-column>
-        <el-table-column prop="siteName" label="编辑" show-overflow-tooltip width="200" align="center">
-
-        </el-table-column>
+        <!-- <el-table-column prop="siteName" label="编辑" show-overflow-tooltip width="200" align="center"></el-table-column> -->
         <el-table-column prop="siteName" label="监测点名称" show-overflow-tooltip width="200" align="center"></el-table-column>
         <el-table-column prop="collectionDate" label="采集数据时间" show-overflow-tooltip width="200" align="center"></el-table-column>
         <el-table-column prop="isWarning" label="是否存在报警" show-overflow-tooltip width="150" align="center">

+ 328 - 389
src/views/spectrum/reform/preAssess/widget.vue

@@ -23,7 +23,7 @@
             <span v-else>暂未发现</span>
           </div>
           <div class="chart" ref="chart1">
-            <img src="@/assets/icon/null.png"   style="width: 100px" />
+            <img src="@/assets/icon/null.png" style="width: 100px" />
           </div>
         </div>
         <div class="chart-box" style="padding-left: 20px">
@@ -38,7 +38,7 @@
             <span v-else>暂未发现</span>
           </div>
           <div class="chart" ref="chart2">
-            <img src="@/assets/icon/null.png"   style="width: 100px" />
+            <img src="@/assets/icon/null.png" style="width: 100px" />
           </div>
         </div>
       </div>
@@ -53,20 +53,14 @@
             </el-checkbox-group>
           </span>
         </div>
-        <el-table
-          :data="tableData1"
-          style="width: 100%"
-          stripe
-          :header-cell-style="{
+        <el-table :data="tableData1" style="width: 100%" stripe :header-cell-style="{
             background: 'rgba(45, 116, 231,0.2)',
             color: '#333333',
             height: '40px',
             textAlign: 'center'
-          }"
-          height="240px"
-        >
+          }" height="240px">
           <template slot="empty">
-            <img src="@/assets/icon/null.png"   style="width: 100px" />
+            <img src="@/assets/icon/null.png" style="width: 100px" />
           </template>
           <el-table-column label="序号" align="center" width="50px">
             <template slot-scope="scope">{{ scope.$index + 1 }}</template>
@@ -83,10 +77,10 @@
             </template>
           </el-table-column>
           <el-table-column prop="upstreamMonitor" label="上游监测点" align="center" show-overflow-tooltip>
-          <template slot-scope="{ row }">
+            <template slot-scope="{ row }">
               <el-button type="text" style="padding: 0" @click="locationSite(row)">{{ row.upstreamMonitor }}</el-button>
             </template>
-        </el-table-column>
+          </el-table-column>
           <el-table-column prop="wellName" label="关联检查井" align="center" show-overflow-tooltip></el-table-column>
           <el-table-column prop="hiddenDangerType" label="发现隐患类型" align="center"></el-table-column>
           <el-table-column prop="hiddenDangerTime" label="发现隐患时间" align="center"></el-table-column>
@@ -100,44 +94,23 @@
       <div class="bottom-box">
         <el-tabs v-model="activeName">
           <el-tab-pane label="改造工作量" name="first">
-            <el-table
-              :data="tableData2"
-              class="cust-table"
-              style="width: 100%; margin-top: 20px"
-              :header-cell-style="{
+            <el-table :data="tableData2" class="cust-table" style="width: 100%; margin-top: 20px" :header-cell-style="{
                 background: '#f5f5f5',
                 color: '#333333',
                 height: '30px',
                 padding: '6px 0',
                 textAlign: 'center'
-              }"
-              height="260px"
-            >
+              }" height="260px">
               <template slot="empty">
-                <img src="@/assets/icon/null.png"   style="width: 100px" />
+                <img src="@/assets/icon/null.png" style="width: 100px" />
               </template>
               <el-table-column prop="remouldPriority" label="工作优先级" align="center"></el-table-column>
               <el-table-column prop="drainageType" label="排水类型" align="center"></el-table-column>
               <el-table-column prop="pipelineLevel" label="管道级别" align="center"></el-table-column>
               <el-table-column label="管径" align="center">
-                <el-table-column
-                  prop="leDn"
-                  label="小于DN400"
-                  align="center"
-                  :formatter="($event) => formatter($event.leDn)"
-                />
-                <el-table-column
-                  prop="eqDn"
-                  label="DN400~DN800"
-                  align="center"
-                  :formatter="($event) => formatter($event.eqDn)"
-                />
-                <el-table-column
-                  prop="gtDn"
-                  label="大于DN800"
-                  align="center"
-                  :formatter="($event) => formatter($event.gtDn)"
-                />
+                <el-table-column prop="leDn" label="小于DN400" align="center" :formatter="($event) => formatter($event.leDn)" />
+                <el-table-column prop="eqDn" label="DN400~DN800" align="center" :formatter="($event) => formatter($event.eqDn)" />
+                <el-table-column prop="gtDn" label="大于DN800" align="center" :formatter="($event) => formatter($event.gtDn)" />
               </el-table-column>
             </el-table>
           </el-tab-pane>
@@ -151,55 +124,28 @@
               </el-form-item>
               <el-form-item label="隐患类型" label-width="70px" style="margin: 0 0 10px 0">
                 <el-select v-model="form.hiddenDangerType" placeholder="请选择" style="width: 150px" clearable>
-                  <el-option
-                    v-for="(item, index) in dangerTypes"
-                    :key="index"
-                    :label="item.notes"
-                    :value="item.codeValue"
-                  ></el-option>
+                  <el-option v-for="(item, index) in dangerTypes" :key="index" :label="item.notes" :value="item.codeValue"></el-option>
                 </el-select>
               </el-form-item>
               <el-form-item label-width="20px" style="margin: 0">
                 <el-button type="primary" @click="queryWarningPage()">查询</el-button>
               </el-form-item>
             </el-form>
-            <el-table
-              :data="tableData3"
-              style="width: 100%"
-              :header-cell-style="{
+            <el-table :data="tableData3" style="width: 100%" :header-cell-style="{
                 background: 'rgba(45, 116, 231,0.2)',
                 color: '#333333',
                 height: '40px',
                 textAlign: 'center'
-              }"
-              height="calc(100% - 74px)"
-            >
+              }" height="calc(100% - 74px)">
               <template slot="empty">
-                <img src="@/assets/icon/null.png"   style="width: 100px" />
+                <img src="@/assets/icon/null.png" style="width: 100px" />
               </template>
               <el-table-column label="序号" align="center" width="50">
                 <template slot-scope="scope">{{ scope.$index + 1 }}</template>
               </el-table-column>
-              <el-table-column
-                prop="siteName"
-                label="监测点"
-                align="center"
-                show-overflow-tooltip
-                width="200"
-              ></el-table-column>
-              <el-table-column
-                prop="hiddenDangerType"
-                label="隐患类型"
-                align="center"
-                show-overflow-tooltip
-                width="150"
-              ></el-table-column>
-              <el-table-column
-                prop="warningCause"
-                label="告警原因"
-                align="center"
-                show-overflow-tooltip
-              ></el-table-column>
+              <el-table-column prop="siteName" label="监测点" align="center" show-overflow-tooltip width="200"></el-table-column>
+              <el-table-column prop="hiddenDangerType" label="隐患类型" align="center" show-overflow-tooltip width="150"></el-table-column>
+              <el-table-column prop="warningCause" label="告警原因" align="center" show-overflow-tooltip></el-table-column>
               <el-table-column prop="monitorDate" label="监测时段" align="center" show-overflow-tooltip width="200">
                 <template slot-scope="{ row }">
                   <span v-cloak> {{ `${row.beginDate || ''} ~ ${row.monitorDate || ''}` }}</span>
@@ -212,15 +158,8 @@
               </el-table-column>
             </el-table>
             <div class="pagination" style="padding-top: 10px">
-              <el-pagination
-                @size-change="handleSizeChange"
-                @current-change="handleCurrentChange"
-                :current-page="pagination.current"
-                :page-sizes="[100, 200, 300, 400]"
-                :page-size="pagination.size"
-                layout="total, sizes, prev, pager, next, jumper"
-                :total="pagination.total"
-              >
+              <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pagination.current" :page-sizes="[50, 100, 200, 300, 400]" :page-size="pagination.size"
+                layout="total, sizes, prev, pager, next, jumper" :total="pagination.total">
               </el-pagination>
             </div>
           </el-tab-pane>
@@ -233,156 +172,156 @@
 </template>
 
 <script>
-  import miniMap from '@/views/widgets/miniMap/index.vue'
-  import moniterSee from '@/views/spectrum/reform/monitorSee/index.vue'
-  import thematicMap from '@/views/widgets/thematicMap/index.vue'
-  import historyCurve from '@/views/spectrum/common/historyCurve/index'
-  import * as echarts from 'echarts'
+import miniMap from '@/views/widgets/miniMap/index.vue'
+import moniterSee from '@/views/spectrum/reform/monitorSee/index.vue'
+import thematicMap from '@/views/widgets/thematicMap/index.vue'
+import historyCurve from '@/views/spectrum/common/historyCurve/index'
+import * as echarts from 'echarts'
 
-  import {
-    getAsessmentConclusion,
-    getHiddenDangerAnalyse,
-    getWarningPage,
-    getRemouldWorkload,
-    getHiddenDangerCount,
-    getAssPipeList
-  } from '@/views/spectrum/reform/api/api'
+import {
+  getAsessmentConclusion,
+  getHiddenDangerAnalyse,
+  getWarningPage,
+  getRemouldWorkload,
+  getHiddenDangerCount,
+  getAssPipeList
+} from '@/views/spectrum/reform/api/api'
 
-  import { getSites } from '@/views/spectrum/dynamicMonitor/api/api'
-  import { fetchDictionary } from '@/api/common/index'
+import { getSites } from '@/views/spectrum/dynamicMonitor/api/api'
+import { fetchDictionary } from '@/api/common/index'
 
-  import { getSiteIcon } from '@/views/spectrum/common/siteIcon/siteIcon' // 站点图标
-  export default {
-    components: {
-      miniMap,
-      moniterSee,
-      thematicMap,
-      historyCurve
+import { getSiteIcon } from '@/views/spectrum/common/siteIcon/siteIcon' // 站点图标
+export default {
+  components: {
+    miniMap,
+    moniterSee,
+    thematicMap,
+    historyCurve
+  },
+  data() {
+    return {
+      form: {},
+      tableData: [],
+      tableData1: [],
+      tableData2: [],
+      tableData3: [],
+      checkList: [],
+      dangerTypes: [],
+      activeName: 'first',
+      moniterVisible: false,
+      siteOptionTemp: [],
+      siteOption: [],
+      rainFallOptions: [],
+      pagination: { current: 1, size: 50, total: 0 },
+      pipeBroken: { length: 0, monitor: 0 },
+      rainHybrid: { length: 0, monitor: 0 },
+      otherSiteCount: 0
+    }
+  },
+  async mounted() {
+    this.getSites()
+    // await this.getRainFall()
+    await this.getDangerTypes()
+    this.getRemouldWorkload()
+    this.getHiddenDangerAnalyse()
+    this.getAsessmentConclusion()
+    this.getHiddenDangerCount()
+    this.queryWarningPage()
+  },
+  methods: {
+    /**
+     * 获取站点
+     */
+    getSites() {
+      getSites({ projectId: this.$store.state.project.project.id, size: 1000 }).then((res) => {
+        if (res.code && res.code == 1) {
+          this.siteOptionTemp = res.result.records
+          // console.log("所有监测点"+JSON.stringify(this.siteOption))
+        }
+      })
     },
-    data() {
-      return {
-        form: { },
-        tableData: [],
-        tableData1: [],
-        tableData2: [],
-        tableData3: [],
-        checkList: [],
-        dangerTypes: [],
-        activeName: 'first',
-        moniterVisible: false,
-        siteOptionTemp:[],
-        siteOption: [],
-        rainFallOptions: [],
-        pagination: { current: 1, size: 100, total: 0 },
-        pipeBroken: { length: 0, monitor: 0 },
-        rainHybrid: { length: 0, monitor: 0 },
-        otherSiteCount: 0
-      }
+    /**
+     * 获取指标
+     */
+    async getRainFall() {
+      const { result } = await fetchDictionary('DAILY_RAIN_FALL')
+      this.rainFallOptions = result
     },
-    async mounted() {
-      this.getSites()
-      // await this.getRainFall()
-      await this.getDangerTypes()
-      this.getRemouldWorkload()
-      this.getHiddenDangerAnalyse()
-      this.getAsessmentConclusion()
-      this.getHiddenDangerCount()
-      this.queryWarningPage()
+    /**
+     * 获取隐患类型
+     */
+    async getDangerTypes() {
+      const { result: dangerTypes } = await fetchDictionary('HIDDEN_DANGER_TYPE')
+      dangerTypes.forEach((item) => {
+        if (item.notes != "地下水入侵" && item.notes != "污水直排") {
+          this.dangerTypes.push(item)
+        }
+      })
     },
-    methods: {
-      /**
-       * 获取站点
-       */
-      getSites() {
-        getSites({ projectId: this.$store.state.project.project.id, size: 1000 }).then((res) => {
-          if (res.code && res.code == 1) {
-            this.siteOptionTemp = res.result.records
-            // console.log("所有监测点"+JSON.stringify(this.siteOption))
-          }
+    /**
+     * 隐患统计信息
+     */
+    getHiddenDangerCount() {
+      getHiddenDangerCount().then((res) => {
+        if (res.code != 1) return
+        const { result } = res
+        let otherSiteCount = result['总监测点数量'] || 0
+        for (const key in result) {
+          if (key != '总监测点数量' && key != '管网破损' && key != '雨污混接') otherSiteCount -= result[key]
+        }
+        if (otherSiteCount >= 0) this.otherSiteCount = otherSiteCount
       })
-      },
-      /**
-       * 获取指标
-       */
-      async getRainFall() {
-        const { result } = await fetchDictionary('DAILY_RAIN_FALL')
-        this.rainFallOptions = result
-      },
-      /**
-       * 获取隐患类型
-       */
-      async getDangerTypes() {
-        const { result: dangerTypes } = await fetchDictionary('HIDDEN_DANGER_TYPE')
-        dangerTypes.forEach((item) => {
-          if(item.notes != "地下水入侵" && item.notes != "雨污混接"){
-            this.dangerTypes.push(item)
-          }
-        })
-      },
-      /**
-       * 隐患统计信息
-       */
-      getHiddenDangerCount() {
-        getHiddenDangerCount().then((res) => {
-          if (res.code != 1) return
-          const { result } = res
-          let otherSiteCount = result['总监测点数量'] || 0
-          for (const key in result) {
-            if (key != '总监测点数量' && key != '管网破损' && key != '雨污混接') otherSiteCount -= result[key]
-          }
-          if (otherSiteCount >= 0) this.otherSiteCount = otherSiteCount
-        })
-      },
-      /**
-       * 查询监测点
-       */
-      getHiddenDangerAnalyse() {
-        let params = ''
-        if (this.checkList.length == 0) params = '1,4'
-        else params = this.checkList.join(',')
-        getHiddenDangerAnalyse({ hiddenDangerType: params }).then((res) => {
-          if (res.code == 1) {
-            let dataList = res.result
-            this.tableData1 = dataList
-            let points = dataList.filter((item, index, self) => {
-              return self.findIndex((el) => el.monitorId == item.monitorId) === index
-            })
-            const _points = points.map((item) => {
-              return {
-                x: item.longitude,
-                y: item.latitude,
-                icon: getSiteIcon(item, false),
-                name: item.siteName
-              }
-            })
-            setTimeout(() => {
-              this.$refs.minimap.addMarkers(_points)
-            }, 2500)
-          }
-        })
-      },
-      /**
-       *监测点告警情况分页查询
-       */
-      async getWarningPage() {
-        let params = JSON.parse(JSON.stringify(this.pagination))
-        if (this.form.siteId) params['id'] = this.form.siteId
-        if (this.form.dailyRainfall) params['dailyRainfall'] = this.form.dailyRainfall
-        if (this.form.date && this.form.date.length > 0) {
-          params['monitorStartDate'] = this.$moment(this.form.date[0]).format('YYYY-MM-DD 00:00:00')
-          params['monitorEndDate'] = this.$moment(this.form.date[1]).format('YYYY-MM-DD 23:59:59')
+    },
+    /**
+     * 查询监测点
+     */
+    getHiddenDangerAnalyse() {
+      let params = ''
+      if (this.checkList.length == 0) params = '1,4'
+      else params = this.checkList.join(',')
+      getHiddenDangerAnalyse({ hiddenDangerType: params }).then((res) => {
+        if (res.code == 1) {
+          let dataList = res.result
+          this.tableData1 = dataList
+          let points = dataList.filter((item, index, self) => {
+            return self.findIndex((el) => el.monitorId == item.monitorId) === index
+          })
+          const _points = points.map((item) => {
+            return {
+              x: item.longitude,
+              y: item.latitude,
+              icon: getSiteIcon(item, false),
+              name: item.siteName
+            }
+          })
+          setTimeout(() => {
+            this.$refs.minimap.addMarkers(_points)
+          }, 2500)
         }
-        if (this.form.hiddenDangerType) params['hiddenDangerType'] = this.form.hiddenDangerType
-        // if (this.form.isNew) params['isNew'] = this.form.isNew
-        await getWarningPage(params).then((res) => {
-          if (res.code == 1) {
-            this.tableData3 = res.result.records
-            this.pagination.total = res.result.total
-            // console.log("报警监测点"+JSON.stringify(this.tableData3)
-          }
-        })
-        // 站点选择数据筛选
-        this.tableData3.forEach((item) => {
+      })
+    },
+    /**
+     *监测点告警情况分页查询
+     */
+    async getWarningPage() {
+      let params = JSON.parse(JSON.stringify(this.pagination))
+      if (this.form.siteId) params['id'] = this.form.siteId
+      if (this.form.dailyRainfall) params['dailyRainfall'] = this.form.dailyRainfall
+      if (this.form.date && this.form.date.length > 0) {
+        params['monitorStartDate'] = this.$moment(this.form.date[0]).format('YYYY-MM-DD 00:00:00')
+        params['monitorEndDate'] = this.$moment(this.form.date[1]).format('YYYY-MM-DD 23:59:59')
+      }
+      if (this.form.hiddenDangerType) params['hiddenDangerType'] = this.form.hiddenDangerType
+      // if (this.form.isNew) params['isNew'] = this.form.isNew
+      await getWarningPage(params).then((res) => {
+        if (res.code == 1) {
+          this.tableData3 = res.result.records
+          this.pagination.total = res.result.total
+          // console.log("报警监测点"+JSON.stringify(this.tableData3)
+        }
+      })
+      // 站点选择数据筛选
+      this.tableData3.forEach((item) => {
         this.siteOptionTemp.forEach((it) => {
           if (item.siteName == it.siteName) {
             this.siteOption.push(it)
@@ -392,187 +331,187 @@
       // 站点选择数组去重
       let temp = [];
       for (var i = 0; i < this.siteOption.length; i++) {
-        for (var j = 0; j < temp.length; j++) { 
-          if (this.siteOption[i].siteName == temp[j].siteName) { 
-            break 
-            } 
-          } 
-        if (j == temp.length) { 
-            temp.push(this.siteOption[i])
+        for (var j = 0; j < temp.length; j++) {
+          if (this.siteOption[i].siteName == temp[j].siteName) {
+            break
+          }
+        }
+        if (j == temp.length) {
+          temp.push(this.siteOption[i])
         }
       }
       this.siteOption = temp
-      },
-      /**
-       * 搜索告警情况
-       */
-      queryWarningPage() {
-        this.pagination.current = 1
-        this.getWarningPage()
-      },
-      /**
-       * 分页 改变每页条数
-       */
-      handleSizeChange(size) {
-        this.pagination.size = size
-        this.getWarningPage()
-      },
-      /**
-       * 分页 改变当前页
-       */
-      handleCurrentChange(current) {
-        this.pagination.current = current
-        this.getWarningPage()
-      },
-      /**
-       * 获取评估结果
-       */
-      getAsessmentConclusion() {
-        getAsessmentConclusion().then((res) => {
-          if (res.code == 1) {
-            const pipeBroken = res.result.find((item) => {
-              return item.type == '管网破损'
-            })
-            this.pipeBroken = pipeBroken && pipeBroken.map ? pipeBroken.map : { length: 0, monitor: 0 }
-            const chartsData = pipeBroken && pipeBroken.echartsBar ? pipeBroken.echartsBar : null
-            if (chartsData) {
-              this.loadChart('chart1', chartsData.xaxisData, chartsData.seriesData)
-            }
+    },
+    /**
+     * 搜索告警情况
+     */
+    queryWarningPage() {
+      this.pagination.current = 1
+      this.getWarningPage()
+    },
+    /**
+     * 分页 改变每页条数
+     */
+    handleSizeChange(size) {
+      this.pagination.size = size
+      this.getWarningPage()
+    },
+    /**
+     * 分页 改变当前页
+     */
+    handleCurrentChange(current) {
+      this.pagination.current = current
+      this.getWarningPage()
+    },
+    /**
+     * 获取评估结果
+     */
+    getAsessmentConclusion() {
+      getAsessmentConclusion().then((res) => {
+        if (res.code == 1) {
+          const pipeBroken = res.result.find((item) => {
+            return item.type == '管网破损'
+          })
+          this.pipeBroken = pipeBroken && pipeBroken.map ? pipeBroken.map : { length: 0, monitor: 0 }
+          const chartsData = pipeBroken && pipeBroken.echartsBar ? pipeBroken.echartsBar : null
+          if (chartsData) {
+            this.loadChart('chart1', chartsData.xaxisData, chartsData.seriesData)
+          }
 
-            const rainHybrid = res.result.find((item) => {
-              return item.type == '雨污混接'
-            })
-            this.rainHybrid = rainHybrid && rainHybrid.map ? rainHybrid.map : { length: 0, monitor: 0 }
-            const chartsData2 = rainHybrid && rainHybrid.echartsBar ? rainHybrid.echartsBar : null
-            if (chartsData2) {
-              this.loadChart('chart2', chartsData2.xaxisData, chartsData2.seriesData)
+          const rainHybrid = res.result.find((item) => {
+            return item.type == '雨污混接'
+          })
+          this.rainHybrid = rainHybrid && rainHybrid.map ? rainHybrid.map : { length: 0, monitor: 0 }
+          const chartsData2 = rainHybrid && rainHybrid.echartsBar ? rainHybrid.echartsBar : null
+          if (chartsData2) {
+            this.loadChart('chart2', chartsData2.xaxisData, chartsData2.seriesData)
+          }
+        }
+      })
+    },
+    /**
+     * 获取改造工作量
+     */
+    getRemouldWorkload() {
+      getRemouldWorkload().then((res) => {
+        if (res.code == 1) {
+          this.tableData2 = res.result
+        }
+      })
+    },
+    formatter(val) {
+      return val === '0.00m' ? '/' : val
+    },
+    loadChart(domeName, xAxis, seriesData) {
+      let chartDom = this.$refs[domeName]
+      let myChart = echarts.init(chartDom)
+      let option = {
+        tooltip: {
+          trigger: 'axis'
+        },
+        grid: {
+          top: '8%',
+          left: '3%',
+          right: '4%',
+          bottom: '3%',
+          containLabel: true
+        },
+        xAxis: [
+          {
+            type: 'category',
+            data: xAxis,
+            axisTick: {
+              alignWithLabel: true
             }
           }
-        })
-      },
-      /**
-       * 获取改造工作量
-       */
-      getRemouldWorkload() {
-        getRemouldWorkload().then((res) => {
-          if (res.code == 1) {
-            this.tableData2 = res.result
+        ],
+        yAxis: [
+          {
+            type: 'value'
           }
-        })
-      },
-      formatter(val) {
-        return val === '0.00m' ? '/' : val
-      },
-      loadChart(domeName, xAxis, seriesData) {
-        let chartDom = this.$refs[domeName]
-        let myChart = echarts.init(chartDom)
-        let option = {
-          tooltip: {
-            trigger: 'axis'
-          },
-          grid: {
-            top: '8%',
-            left: '3%',
-            right: '4%',
-            bottom: '3%',
-            containLabel: true
-          },
-          xAxis: [
-            {
-              type: 'category',
-              data: xAxis,
-              axisTick: {
-                alignWithLabel: true
-              }
-            }
-          ],
-          yAxis: [
-            {
-              type: 'value'
-            }
-          ],
-          series: [
-            {
-              // name: '管网破损',
-              type: 'bar',
-              data: seriesData,
-              barWidth: 20,
-              itemStyle: {
-                normal: {
-                  color: (params) => {
-                    var colorList = ['#2d74e7', '#02bdc9', '#cca272', '#74608f', '#d7a02b', '#c8ba23']
-                    return colorList[params.dataIndex]
-                  }
+        ],
+        series: [
+          {
+            // name: '管网破损',
+            type: 'bar',
+            data: seriesData,
+            barWidth: 20,
+            itemStyle: {
+              normal: {
+                color: (params) => {
+                  var colorList = ['#2d74e7', '#02bdc9', '#cca272', '#74608f', '#d7a02b', '#c8ba23']
+                  return colorList[params.dataIndex]
                 }
               }
             }
-          ]
-        }
-        myChart.clear()
-        option && myChart.setOption(option)
-      },
-      /**
-       * 定位监测点
-       */
-      locationSite(row) {
-        const site = JSON.parse(JSON.stringify(row))
-        // site['siteState'] = 2
-        const { latitude, longitude } = site
-        this.$refs.minimap.addMarker([longitude, latitude], {
-          icon: require('@/views/spectrum/common/images/Group313.png')
-        })
-      },
-      /**
-       * 关联管网定位
-       */
-      locationPipe(row) {
-        const { monitorId } = row
-        if (!monitorId) {
-          this.$message.info('未知站点!')
+          }
+        ]
+      }
+      myChart.clear()
+      option && myChart.setOption(option)
+    },
+    /**
+     * 定位监测点
+     */
+    locationSite(row) {
+      const site = JSON.parse(JSON.stringify(row))
+      // site['siteState'] = 2
+      const { latitude, longitude } = site
+      this.$refs.minimap.addMarker([longitude, latitude], {
+        icon: require('@/views/spectrum/common/images/Group313.png')
+      })
+    },
+    /**
+     * 关联管网定位
+     */
+    locationPipe(row) {
+      const { monitorId } = row
+      if (!monitorId) {
+        this.$message.info('未知站点!')
+        return
+      }
+      getAssPipeList(monitorId).then((res) => {
+        if (res.code != 1) return
+        const { result: pipes } = res
+        if (!pipes) {
+          this.$message.error('未获取到管网数据!')
           return
         }
-        getAssPipeList(monitorId).then((res) => {
-          if (res.code != 1) return
-          const { result: pipes } = res
-          if (!pipes) {
-            this.$message.error('未获取到管网数据!')
-            return
+        const pipeFeatures = pipes.map((item) => {
+          return {
+            startCoordinates: [item.longitude, item.latitude],
+            endCoordinates: [item.longitude2, item.latitude2]
           }
-          const pipeFeatures = pipes.map((item) => {
-            return {
-              startCoordinates: [item.longitude, item.latitude],
-              endCoordinates: [item.longitude2, item.latitude2]
-            }
-          })
-          this.$refs.minimap.addPipeLines(pipeFeatures)
         })
-      },
-      /**
-       * 曲线查看
-       */
-      viewCurve(row = null) {
-        console.log('000', row)
-        const siteId = row ? row.id : null
-        const options = row
-          ? {
-              beginDate: row.beginDate,
-              endDate: row.monitorDate,
-              targets: [row.checkCode],
-              upMonitorId: row.upMonitorId,
-              comprasionCheckCodes: [row.checkCode],
-              messageList: [{ message: row.warningCause, type: 'warning' }]
-            }
-          : undefined
-        // 查看历史曲线
-        this.$refs.historyCurve.show(siteId, options)
-      },
-      moniterClose() {
-        this.moniterVisible = false
-      }
+        this.$refs.minimap.addPipeLines(pipeFeatures)
+      })
+    },
+    /**
+     * 曲线查看
+     */
+    viewCurve(row = null) {
+      console.log('000', row)
+      const siteId = row ? row.id : null
+      const options = row
+        ? {
+          beginDate: row.beginDate,
+          endDate: row.monitorDate,
+          targets: [row.checkCode],
+          upMonitorId: row.upMonitorId,
+          comprasionCheckCodes: [row.checkCode],
+          messageList: [{ message: row.warningCause, type: 'warning' }]
+        }
+        : undefined
+      // 查看历史曲线
+      this.$refs.historyCurve.show(siteId, options)
+    },
+    moniterClose() {
+      this.moniterVisible = false
     }
   }
+}
 </script>
 
 <style lang="scss" scoped>
-  @import './style.scss';
+@import './style.scss';
 </style>

+ 1 - 1
src/views/spectrum/report/utils.ts

@@ -15,5 +15,5 @@ export const rainfallCols: ColItem[] = [
       `${String(day || '').replace(' 00:00:00', '')}  ${String(hour || '')}${hour ? ':00' : '-'}`
   },
   // { prop: 'hour', label: '小时', width: '120px' },
-  { prop: 'rfall', label: '降雨量(mm)', minWidth: '120px' }
+  { prop: 'rfall', label: '降雨量(mm)', minWidth: '120px',sortable:true }
 ]