tongshanglei %!s(int64=3) %!d(string=hai) anos
pai
achega
4266aa511a

+ 183 - 0
src/components/Charts/GlMapChart.vue

@@ -0,0 +1,183 @@
+<template>
+  <div  id="myChartChina" ref="myEchart" :style="{height:height,width:width}" @contextmenu.prevent="rightClick()"/>
+</template>
+
+<script>
+// 引入 merge
+import { merge } from 'lodash';
+// 按需引入 引入 ECharts 主模块
+// import echarts from 'echarts/lib/echarts'
+import * as echarts from 'echarts/lib/echarts'
+
+import './js/china.js'
+// 引入 resize
+import resize from './mixins/resize'
+
+const defaultOptions = {
+    tooltip: {
+        trigger: 'item',
+
+        ifbox:false,
+      TipsList:[],
+    },
+    legend: {
+        // type: 'scroll',
+        // icon: 'circle',
+        // orient: "vertical",
+        // left: 'center'
+    },
+    series: [
+        {
+            type: 'pie',
+            // radius: ['35%', '60%'], // 内外半径
+            center: ['50%', '50%'],
+            data: [],
+            animationEasing: 'cubicInOut',
+            animationDuration: 2600
+        }
+    ]
+      
+}
+
+export default {
+  mixins: [resize],
+  props: {
+    options: {
+      type: Object,
+      default: function() {
+        return defaultOptions
+      }
+    },
+
+    width: {
+      type: String,
+      default: '100%'
+    },
+    height: {
+      type: String,
+      default: '100%'
+    }
+  },
+  data() {
+    return {
+      chart: null,
+      mapType:'china',
+      cityArr:[
+          ['上海', '河北', '山西', '内蒙古', '辽宁', '吉林','黑龙江',  '江苏', '浙江', '安徽', '福建', '江西', '山东','河南', '湖北', '湖南', '广东', '广西', '海南', '四川', '贵州', '云南', '西藏', '陕西', '甘肃', '青海', '宁夏', '新疆', '北京', '天津', '重庆', '香港', '澳门', '台湾'],
+          ['shanghai', 'hebei','shanxi','neimenggu','liaoning','jilin','heilongjiang','jiangsu','zhejiang','anhui','fujian','jiangxi','shandong','henan','hubei','hunan','guangdong','guangxi','hainan','sichuan','guizhou','yunnan','xizang','shanxi1','gansu','qinghai','ningxia','xinjiang', 'beijing', 'tianjin', 'chongqing', 'xianggang', 'aomen', 'taiwan']
+      ]
+    }
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.initChart()
+    })
+  },
+  beforeDestroy() {
+    if (!this.chart) {
+      return
+    }
+    this.chart.dispose()
+    this.chart = null
+  },
+  watch: {
+    options(newVal){
+      // console.log(newVal)
+      // this.options.geo.map=this.mapType
+      this.initChart()
+    }
+  },
+
+  methods: {
+
+    /**
+     * 初始化echart视图
+     */
+    initChart() {
+
+        var that=this;
+
+        // console.log(this.options)
+         let  myChartMap = echarts.init(document.getElementById('myChartChina'));
+        //  organizationQueryWithPage().then(data=>{
+        //   var dataObj = {}
+        //   data.result.records.map(v=>{
+        //     dataObj = {
+        //       name:v.name,
+        //       value:[Number(v.longitude),Number(v.latitude),v.id],
+        //     }
+        //     this.optionMap.series[0].data.push(dataObj);
+        //   })
+        //   this.optionMap.series[0].data = JSON.parse(JSON.stringify(this.optionMap.series[0].data))
+        //   window.addEventListener("resize",()=> {
+        //     myChartMap.resize();
+        //   });
+        //   myChartMap.setOption(this.optionMap);
+        // })
+
+	        myChartMap.setOption(this.options);
+          window.addEventListener("resize",()=> {
+            myChartMap.resize();
+          });
+
+          // let myChartChina =  echarts.init(document.getElementById('myChartChina')) //这里是为了获得容器所在位置  
+          //   echarts.use([ VisualMapComponent, GeoComponent,EffectScatterChart])
+         
+          //   myChartChina.setOption(this.option)
+          //   console.log('渲染后得options===',myChartChina.setOption(this.option))
+          //   //echarts自适应
+            
+
+    },
+    showCity(zhName, pyName){
+      var that=this;
+        // console.log(zhName, pyName);
+        let myChartChina = this.$echarts.init(document.getElementById('myChartChina')) //这里是为了获得容器所在位置    
+        // that.loadBdScript('./node_modules/echarts/map/js/province/'+pyName+'.js', function(){
+            // 设定中文省份名才能显示相关省份,之后想要设置什么数据,直接设置到option这里就可以了
+            that.options.geo.map=zhName;
+            that.mapType=zhName
+            // 深拷贝,另建option以免丢失原始option数据
+            var cityOption = JSON.parse(JSON.stringify(that.options));
+            // cityOption.series[0].data=[{
+            //         name: '梅州市',
+            //         value: [100, 100]
+            //     }, {
+            //         name: '深圳市',
+            //         value: [100, 200]
+            //     }]
+            myChartChina.setOption(cityOption);
+        // });
+    },
+    loadBdScript(url, callback) {
+      // console.log(url)
+         var script = document.createElement("script")  
+            script.type = "text/javascript";  
+            if (script.readyState){  //IE  
+                script.onreadystatechange = function(){  
+                    if (script.readyState == "loaded" || script.readyState == "complete"){  
+                        script.onreadystatechange = null;  
+                        callback();  
+                    }  
+                };  
+            } else {  //Others  
+                script.onload = function(){  
+                    callback();  
+                };  
+            }  
+            script.src = url; 
+
+            document.getElementsByTagName("head")[0].appendChild(script); 
+    },
+    rightClick(){
+      var that=this;
+      let myChartChina = this.$echarts.init(document.getElementById('myChartChina')) //这里是为了获得容器所在位置    
+      that.options.geo.map='china';
+      that.mapType='china'
+      var cityOption = JSON.parse(JSON.stringify(that.options));
+      myChartChina.setOption(cityOption);
+    }
+
+  }
+}
+</script>

+ 34 - 0
src/components/Charts/js/china.js

@@ -0,0 +1,34 @@
+(function(root, factory) {
+    if (typeof define === 'function' && define.amd) {
+      // AMD. Register as an anonymous module.
+      define(['exports', 'echarts'], factory);
+    } else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
+      // CommonJS
+      factory(exports, require('echarts'));
+    } else {
+      // Browser globals
+      factory({}, root.echarts);
+    }
+  })(this, function(exports, echarts) {
+    var log = function(msg) {
+      if (typeof console !== 'undefined') {
+        console && console.error && console.error(msg);
+      }
+    };
+    if (!echarts) {
+      log('ECharts is not Loaded');
+      return;
+    }
+    if (!echarts.registerMap) {
+      log('ECharts Map is not loaded');
+      return;
+    }
+  
+    // 获取地图数据,这个json就刚刚下载的那个json文件
+    let json = require('./china.json');
+    
+    // 注册地图,第一个参数就是最后一个文件里面相应的的参数
+    echarts.registerMap('china', json);
+  });
+  
+  

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 0
src/components/Charts/js/china.json


+ 41 - 16
src/views/screen/index.vue

@@ -631,14 +631,14 @@ export default {
     },
     getMapOptions() {
       return {
-         title: {
-          text: "风场位置地图",
-          textStyle: {
-            fontWeight: "600",
-            fontSize: "18",
-            color: "#3fd5f1"
-          }
-        },
+        //  title: {
+        //   text: "风场位置地图",
+        //   textStyle: {
+        //     fontWeight: "600",
+        //     fontSize: "18",
+        //     color: "#3fd5f1"
+        //   }
+        // },
         geo: {
           // 这个是重点配置区
           map: "china",
@@ -658,6 +658,30 @@ export default {
             }
           }
         },
+        // aspectScale: 1.1, //地图的长宽比
+				// itemStyle: {
+				// 	borderWidth: 1,
+				// 	borderColor: '#0090fe', //边框颜色
+				// 	areaColor: '#003399', //地图区域颜色
+				// 	shadowColor: '#182f68',
+				// 	shadowOffsetX: 0,
+				// 	shadowOffsetY: 10
+				// },
+
+				// emphasis: {
+				// 	itemStyle: {
+				// 		show: 'true',
+				// 		borderWidth: 4,
+				// 		borderColor: '#b2163c', //边框颜色
+				// 		areaColor: '#531f67', //鼠标移上去的颜色
+				// 	},
+				// 	label: {
+				// 		color: '#fff',
+				// 		fontWeight: 'bold',
+				// 		show: true,
+				// 	}
+				// },
+
         //滑动显示数据
         tooltip: {
           trigger: "item",
@@ -788,25 +812,25 @@ export default {
         // this.alarmData  =data.scrollData
         this.alarmData=[
         {
-          'title': '设备4012发生故障告警',
+          'title': '设备4012发生故障告警',
           'date': '2022-03-04 09:40:35'
         },{
-          'title': '设备4014发生故障告警',
+          'title': '设备4014发生故障告警',
           'date': '2022-03-04 09:49:15'
         },{
-          'title': '设备7812发生故障告警',
+          'title': '设备7812发生故障告警',
           'date': '2022-03-04 10:08:37'
         },{
           'title': '设备5812液压油偏低',
           'date': '2022-03-04 10:10:11'
         },{
-          'title': '设备4542发生故障告警',
+          'title': '设备4542发生故障告警',
           'date': '2022-03-04 10:20:24'
         },{
           'title': '设备4781液压油偏低',
           'date': '2022-03-04 10:29:10'
         },{
-          'title': '设备5421发生故障告警',
+          'title': '设备5421发生故障告警',
           'date': '2022-03-04 10:37:38'
         },{
           'title': '设备7574液压油偏低',
@@ -815,10 +839,10 @@ export default {
           'title': '设备5457检测不合格',
           'date': '2022-03-04 10:49:37'
         },{
-          'title': '设备5475发生故障告警',
+          'title': '设备5475发生故障告警',
           'date': '2022-03-04 10:50:45'
         },{
-          'title': '设备5475发生故障告警',
+          'title': '设备5475发生故障告警',
           'date': '2022-03-04 10:54:27'
         },{
           'title': '设备6757液压油偏低',
@@ -949,7 +973,8 @@ export default {
 #content{
   width:100%;
   min-width: 1280px;
-  height:100%;
+  height: calc(100vh - 84px);
+  /* height: 100vh; */
   min-height: 728px;
 
 }

+ 2 - 1
src/views/screen/index_v1.scss

@@ -204,6 +204,7 @@
   cursor: pointer;
   font-family: datavfont!important;
     font-style: normal;
+    font-size: 16px;
     font-weight: 400;
     font-variant: normal;
     text-transform: none;
@@ -353,7 +354,7 @@
     min-height: 384px;
   }
   .center-bottom{
-    height:29vh;
+    height:25vh;
     min-height: 179px;
   }
   .bm-view {

+ 69 - 16
src/views/screen/preview_v1.vue

@@ -62,14 +62,40 @@
         <div class="grid-content center-box">
           <!--中间地图-->
        
-              <baidu-map class="center-map" :center="center" :zoom="zoom" @ready="mapInit">
+              <!-- <baidu-map class="center-map" :center="center" :zoom="zoom" @ready="mapInit">
                 
                 <bml-marker-clusterer :averageCenter="true">
                   <bm-marker v-for="(marker,index) of windMarkers" :key="index+200" :position="{lng: marker.lng, lat: marker.lat}" :icon="{url: 'https://rlfd.oss-cn-hangzhou.aliyuncs.com/smart_tool/wind_32.png', size: {width: 32, height: 32}}"></bm-marker>
                 </bml-marker-clusterer>
-              </baidu-map>
-
-            <!-- <base-map width="100%"  :options="mapOptions" /> -->
+              </baidu-map> -->
+          
+          <div class="center-map">
+            <!--地图左上设备统计-->
+            <div class="map-left-top">
+              <div class="center-alarm-label">
+                <div class="alarm-label-title">液压泵</div>
+                <div class="alarm-label-value normal-value" >21</div>
+              </div>
+              <div class="center-alarm-label">
+                <div class="alarm-label-title">扳手</div>
+                <div class="alarm-label-value alarm-value">24</div>
+              </div>
+              <div class="center-alarm-label">
+                <div class="alarm-label-title">风机</div>
+                <div class="alarm-label-value contact-value">24</div>
+              </div>
+              <div class="center-alarm-label">
+                <div class="alarm-label-title">其他</div>
+                <div class="alarm-label-value other-value">543</div>
+              </div>
+              <div class="center-alarm-total-label">
+                <div class="alarm-label-title">合计</div>
+                <div class="alarm-label-value total-value">456</div>
+              </div>
+            </div>
+             <base-map width="100%"   :options="mapOptions" />
+          </div>
+           
       
 
           <div class="center-bottom">
@@ -93,7 +119,7 @@
         <div class="grid-content"></div>
       </el-col>
     </el-row>
-     <div class="back-btn" @click="goback"> <i class="el-icon-edit-outline"></i> <br/> <a>返回</a></div>
+     <div class="back-btn" @click="fullscreen"> <i class="el-icon-full-screen"></i> <br/> <a>{{screen_title}}</a></div>
   </div>
   </div>
  
@@ -123,26 +149,53 @@ export default {
       center:'中国',
       zoom:5,
       markers:[],
+      isFullFlag:false,
+      screen_title:'全屏',
       windMarkers:[],
     }
   },
    methods: {
-     mapInit({ BMap, map }) {
-      this.map = map;
-      // 初始化地图,设置中心点坐标
-      this.map.setMapStyle({style:'dark'});
-      map.enableScrollWheelZoom();
+    //  mapInit({ BMap, map }) {
+    //   this.map = map;
+    //   // 初始化地图,设置中心点坐标
+    //   this.map.setMapStyle({style:'dark'});
+    //   map.enableScrollWheelZoom();
       
 
-        for (let i = 0; i < 200; i++) {
-          const position = {lng: Math.random() * 40 + 85, lat: Math.random() * 30 + 21}
-          this.windMarkers.push(position)
+    //     for (let i = 0; i < 200; i++) {
+    //       const position = {lng: Math.random() * 40 + 85, lat: Math.random() * 30 + 21}
+    //       this.windMarkers.push(position)
+    //     }
+      
+    // },
+    fullscreen(){  
+      this.isFullFlag =!this.isFullFlag
+      if(this.isFullFlag){
+        this.screen_title='退出'
+        var el =document.getElementById('content');
+        var rfs = el.requestFullScreen || 
+            el.webkitRequestFullScreen || 
+            el.mozRequestFullScreen || 
+            el.msRequestFullScreen,
+                wscript
+        if (typeof rfs != "undefined" && rfs) {
+            rfs.call(el);
+            return;
+        }
+        if (typeof window.ActiveXObject != "undefined") {
+            wscript = new ActiveXObject("WScript.Shell");
+            if (wscript) {
+                wscript.SendKeys("{F11}");
+            }
         }
+			}else{
+         this.screen_title='全屏'
+				document.exitFullscreen();
+			}
       
     },
-    goback(){  
-      this.$router.go(-1)
-    },
+
+
    }
 };
 </script>

+ 60 - 18
src/views/wind/wind/table/WindTable.vue

@@ -1,26 +1,43 @@
 <template>
     <div class="app-container">
-
-              <regionals
-                class="fl"
+        <div class="search-item fl">
+            <regionals
+               
                 ref="regionals"
                 style="width:40%;margin-right:10px;"
                 @checked="selectArea"
                 :defaultCheckedKeys="queryParam.citys"
-              />
-        <el-input
-            v-model="queryParam.number"
-            placeholder="风场编号/名称"
-            clearable
-            class="filter-item form-search-input fl"
-            @keyup.enter.native="handleSearch"
-          />
-
-          
-     
-        <el-button class="filter-item fl search" icon="el-icon-search" @click="handleSearch">
-            搜索
-        </el-button>
+            />
+            <el-input
+                v-model="queryParam.number"
+                placeholder="风场编号/名称"
+                clearable
+                class="filter-item form-search-input"
+                @keyup.enter.native="handleSearch"
+            />
+            <el-select v-model="queryParam.wind_type"  class="filter-item form-select-input" filterable placeholder="风场类型">
+            <el-option
+                v-for="item in windTypeData"
+                :key="item.value"
+                :label="item.text"
+                :value="item.value">
+            </el-option>
+            </el-select>
+            <el-select v-model="queryParam.env_type"  class="filter-item form-select-input" filterable placeholder="环境类型">
+            <el-option
+                v-for="item in EnvTypeData"
+                :key="item.value"
+                :label="item.text"
+                :value="item.value">
+            </el-option>
+            </el-select>
+        </div>
+        <div class="search-operate-area fl">
+             <el-button class="filter-item search" icon="el-icon-search" @click="handleSearch">
+                搜索
+            </el-button>
+        </div>
+       
         <div class="table-body">
             <el-table
                 :data="tableData"
@@ -127,8 +144,22 @@ export default {
         // showAlarmDialog: false,
         // currentFenceId: null,
         tableData: [],
+        windTypeData: [],
+        EnvTypeData:[],
       }
     },
+    mounted() {
+
+        this.$http.post("sysDictData/getOptions", { type: "WindType" }).then(resp => {
+            this.windTypeData = resp.data
+        });
+        this.$http.post("sysDictData/getOptions", { type: "EnvironmentType" }).then(resp => {
+            this.EnvTypeData = resp.data
+        });
+
+        
+        
+    },
     methods: {
         afterGetList(){
             this.tableData = this.data
@@ -210,9 +241,20 @@ export default {
         height: 178px;
         display: block;
     }
+    .search-item{ 
+        width: 80%;
+    }
     .form-search-input{
-        width:40%;
+        width:50%;
         margin-right: 8px;
         margin-bottom: 10px;
     }
+    .form-select-input{
+        width:45%;
+        margin-right: 8px;
+        margin-bottom: 10px;
+    }
+    .search-operate-area{
+        width:18%;
+    }
 </style>