瀏覽代碼

消防页面测试数据联调完成

wangtao 2 年之前
父節點
當前提交
7d6e3aa63d

+ 11 - 1
src/api/business/OM/eventCenter/index.js

@@ -109,6 +109,16 @@ export function tbInfoList(data) { //设备工况
     })
 }
 
+export function tbInfoCollectIco(data) { //设备工况折线图
+    return request({
+        url: "/tbInfo/collectIco",
+        method: 'post',
+        data: data
+    })
+}
+
+
+
 
 export function exportTbDeviceStatus(data) {
     return request({
@@ -178,4 +188,4 @@ export function collectEventManage(data) {
         method: 'get',
         params: data
     })
-}
+}

+ 1 - 1
src/views/business/fireInternet/deviceMonitoring/SSMonitoring/index.vue

@@ -346,7 +346,7 @@ export default {
         path: '/OM/business/OM/workMange',
         query: {
           id: row.workId,
-          type:1
+          type:4
         }
       })
     },

+ 1 - 1
src/views/business/fireInternet/deviceMonitoring/fireMonitoring/index.vue

@@ -341,7 +341,7 @@ export default {
         path: '/OM/business/OM/workMange',
         query: {
           id: row.workId,
-          type:1
+          type:4
         }
       })
     },

+ 17 - 20
src/views/business/fireInternet/deviceMonitoring/waterMonitoring/device/index.vue

@@ -94,7 +94,7 @@
               <el-table-column label="单位名称" align="center" prop="companyName"  show-overflow-tooltip />
               <el-table-column label="剩余电量" align="center" prop="pointData"  show-overflow-tooltip />
               <el-table-column label="报告时间" align="center" prop="createTime" sortable  show-overflow-tooltip />
-              <el-table-column label="操作" align="center" class-name="small-padding fixed-width" >
+              <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width" >
                 <template slot-scope="scope">
                   <el-button
                     size="mini"
@@ -104,7 +104,7 @@
                     v-hasPermi="['system:admin:edit']"
                   >跳转至工单</el-button>
                 </template>
-              </el-table-column>
+              </el-table-column> -->
             </el-table>
           </el-col>
       </el-row>
@@ -123,7 +123,7 @@
 
 <script>
 
-import { tbInfoList } from "@/api/business/OM/eventCenter";
+import { tbInfoList,tbInfoCollectIco } from "@/api/business/OM/eventCenter";
 import { listChannel } from "@/api/system/product";
 import index3 from "@/views/components/fireInternetInfo/index3";
 import index4 from "@/views/components/fireInternetInfo/index4";
@@ -174,7 +174,6 @@ export default {
         size:10,
         companyCode:undefined,
         pointCodes: [201,202],
-        isNew:1,
         deviceId:"",
         startTime:getThisDateBeforMonth(),
         endTime:YearMonthDate(),
@@ -220,28 +219,26 @@ export default {
       }
       /* 饼图、折线图 */
         tbInfoList(this.queryParams2).then(response =>{//pointCode=201 信息  pointCode=202 电量
-        console.log(response)
-          let data = response.data.records
-          let arr = [[],[],[]]
+          let data = response.data.records.reverse()
+          let arr = [[],[],[],[]]
           let array = {}
           for(let i = 0; i<data.length;i++){
-            if(data[i].pointCode == "201"){
-              array.dianliang = data[i].pointData
-              arr[0][i] = []
-              arr[0][i].push(data[i].createTime,13)
-            }
-            if(data[i].pointCode == "202"){
-              arr[1][(i-1)/2] = []
-              array.xinhao = data[i].pointData
-              array.createTime = data[i].createTime
-              arr[1][(i-1)/2].push(data[i].createTime,20)
+            if(i%2>0){
+              arr[0].push([data[i].createTime,Number(data[i].pointData)])
+              arr[3].push((data[i].createTime))
+            }else{
+              arr[1].push([data[i].createTime,Number(data[i].pointData)])
             }
           }
           this.index1Data = array
           this.contain2 = true
           this.index2Data = arr
+          this.index1Data = {
+            dianliang:this.index2Data[0][0][1],
+            xinhao:this.index2Data[1][0][1],
+            createTime:this.index2Data[0][0][0]
+          }
           this.index2Data[2] = {name:"水系统设备工况情况跟踪",color:"#00FFFF"}
-          console.log(this.index2Data)
           this.loading1 = false
           this.loading2 = false
         })
@@ -262,8 +259,8 @@ export default {
       this.$router.push({
         path: '/OM/business/OM/workMange',
         query: {
-          id: row.id,
-          type:1
+          id: row.workId,
+          type:4
         }
       })
     },

+ 2 - 2
src/views/business/fireInternet/deviceMonitoring/waterMonitoring/offLine/index.vue

@@ -344,8 +344,8 @@ export default {
       this.$router.push({
         path: '/OM/business/OM/workMange',
         query: {
-          id: row.id,
-          type:1
+          id: row.workId,
+          type:4
         }
       })
     },

+ 1 - 0
src/views/business/fireInternet/fireAlarm/fireMonitoring/index.vue

@@ -378,6 +378,7 @@ export default {
       });
       /* 折线图 */
       getTbAlarmCollectIcoDetail(this.queryParams2).then((response) => {
+        console.log(response)
         let data = response.data;
         let lineData = [];
         let total = [];

+ 3 - 5
src/views/components/fireInternetInfo/index1.vue

@@ -62,10 +62,8 @@ export default {
           trigger: "item",
           formatter: function(params) {
             return (
-              params.name +
-              ":" +
-              params.value +
-              "<br>占比:" +
+
+              "占比:" +
               (params.value * 100).toFixed(2) +
               "%"
             );
@@ -79,7 +77,7 @@ export default {
             emphasis: {
               label: {
                 show: true,
-                fontSize: '20',
+                fontSize: '14',
                 fontWeight: 'bold'
               }
             },

+ 1 - 1
src/views/components/fireInternetInfo/index3.vue

@@ -67,7 +67,7 @@ export default {
             emphasis: {
               label: {
                 show: true,
-                fontSize: '20',
+                fontSize: '14',
                 fontWeight: 'bold'
               }
             },

+ 55 - 56
src/views/components/fireInternetInfo/index4.vue

@@ -22,34 +22,6 @@ export default {
     getData() {
       let myChart = echarts.init(document.getElementById("index4"));
       let data = this.resData;
-    //   let data = [
-    //     [
-    //         [
-    //             "2022-08-09 13:11:19",
-    //             13
-    //         ],
-    //         [
-    //             "2022-08-09 13:30:19",
-    //             20
-    //         ]
-    //     ],
-    //     [
-    //         [
-    //             "2022-08-09 13:11:19",
-    //             20
-    //         ],
-    //         [
-    //             "2022-08-09 13:30:19",
-    //             50
-    //         ]
-    //     ],
-    //     {
-    //         "name": "水系统设备工况情况跟踪",
-    //         "color": "#00FFFF"
-    //     }
-    // ]
-
-      console.log(data)
       let option = {
         legend: {
           itemGap: 20, // 图例每项之间的间隔。
@@ -69,27 +41,33 @@ export default {
             color:data[2].color,//设置主标题字体颜色
           },
         },
+        tooltip: {
+          trigger: "axis",
+          confine: true,
+          textStyle: {
+            fontSize: 12
+          }
+        },
         color: ["#FF0087" , "#80FFA5" ],
         xAxis: {
-            type: 'time',
-            splitLine:{
-              show:false
+            show:true,//false
+            boundaryGap:false,// true | ['30%', '20%'],x轴两边是否留白,true留白,false不留白
+            axisLabel:{//x坐标轴刻度标签
+                show:true,
+                color:'#ccc',//'#ccc',设置标签颜色
+                // rotate: -45,
             },
-            axisLine: {
-              // show:false,
-              lineStyle: {
-                  type:  'solid' ,
-                  color:  '#ccc' , //左边线的颜色
-                  width: '1' //坐标线的宽度
-              }
-            },
-            axisLabel: {
-                textStyle: {
-                    color:  '#fff' , //坐标值得具体的颜色
+            axisLine:{//x坐标轴轴线
+                show:true,
+                lineStyle:{//x坐标轴轴线样式
+                    color:'#ccc',//'#ccc' | 'rgb(128, 128, 128)' | 'rgba(128, 128, 128, 0.5)',设置标签颜色
                 }
-            }
+            },
+            data:data[3]
         },
         yAxis: [{
+            // min:0,  //取0为最小刻度
+            // max: 100,
             name:"剩\n余\n电\n量",
             type: 'value',
             splitLine:{
@@ -111,8 +89,11 @@ export default {
                 textStyle: {
                     color:  '#FF0087' , //坐标值得具体的颜色
                 }
-            }
+            },
+
         }, {
+            // min:0,  //取0为最小刻度
+            // max: 5,
             name:"无\n线\n信\n号",
             type: 'value',
             splitLine:{
@@ -134,7 +115,7 @@ export default {
                 textStyle: {
                     color:  '#80FFA5' , //坐标值得具体的颜色
                 }
-            }
+            },
         }],
         series: [{
             name: "剩余电量",
@@ -147,11 +128,24 @@ export default {
                 width: 0, //这里是为了突出显示加上的
               }
             },
+            areaStyle: {
+              opacity: 0.8,
+              color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                {
+                    offset: 0,
+                    color: 'rgb(128, 255, 165)'
+                  },
+                  {
+                    offset: 1,
+                    color: 'rgb(1, 191, 236)'
+                  }
+              ])
+            },
             showSymbol: false,
             emphasis: {
               focus: 'series'
             },
-            data: data[0],
+            data: data[1],
             yAxisIndex: 0,  // 通过这个判断左右
         }, {
           name: "信号",
@@ -164,25 +158,30 @@ export default {
                 width: 0, //这里是为了突出显示加上的
             }
           },
+          areaStyle: {
+                opacity: 0.8,
+                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+
+                  {
+                      offset: 0,
+                      color: 'rgb(255, 0, 135)'
+                    },
+                    {
+                      offset: 1,
+                      color: 'rgb(135, 0, 157)'
+                    }
+                ])
+              },
           showSymbol: false,
           emphasis: {
             focus: 'series'
           },
-          data: data[1],
+          data: data[0],
           yAxisIndex: 1,
 
         }]
       };
 
-
-
-
-
-
-
-
-
-
         myChart.setOption(option);
         window.addEventListener("resize", function() {
             myChart.resize();

+ 1 - 0
vue.config.js

@@ -34,6 +34,7 @@ module.exports = {
             // detail: https://cli.vuejs.org/config/#devserver-proxy
             [process.env.VUE_APP_BASE_API]: {
                 //target: `http://172.16.120.213:8084/`, //本地
+                //target: 'http://172.16.120.49/dmapi/', //49
                 target: 'https://smartpark.caih.com/dmapi/', //东信
                 changeOrigin: true,
                 pathRewrite: {