Browse Source

bug修改

zxh 2 năm trước cách đây
mục cha
commit
79e259a0ed
25 tập tin đã thay đổi với 1241 bổ sung449 xóa
  1. 1 1
      public/config.json
  2. 1 1
      src/components/Hamburger/index.vue
  3. 3 3
      src/layout/components/Sidebar/Function.vue
  4. 1 1
      src/layout/components/Sidebar/Item.vue
  5. 1 1
      src/layout/components/Sidebar/index.vue
  6. 1 1
      src/styles/base.scss
  7. 1 1
      src/styles/variables.scss
  8. 10 10
      src/utils/request.js
  9. 40 12
      src/views/MapView/miniMap/index.vue
  10. 214 248
      src/views/kxcSystem/PublicHouseManage/HousePrinting/template.js
  11. 6 6
      src/views/kxcSystem/PublicHouseManage/HousePrinting/widget.vue
  12. 10 0
      src/views/kxcSystem/PublicHouseManage/groundQuery/widget.vue
  13. 178 26
      src/views/kxcSystem/PublicHouseManage/houseQuery/widget.vue
  14. 2 1
      src/views/kxcSystem/functionManage/errorCorrection/widget.vue
  15. 4 11
      src/views/kxcSystem/pipelineSystem/specialtyAnalysis/burstAnalysis/widget.vue
  16. 2 7
      src/views/kxcSystem/pipelineSystem/specialtyAnalysis/connectivityAnalysis/widget.vue
  17. 48 0
      src/views/kxcSystem/pipelineSystem/specialtyAnalysis/sewageAnalysis/sewageAnalysisResult/widget.vue
  18. 456 0
      src/views/kxcSystem/pipelineSystem/specialtyAnalysis/sewageAnalysis/widget.vue
  19. 4 0
      src/views/kxcSystem/pipelineSystem/statisticalAnalysis/pipeLineStatistical/css.scss
  20. 13 6
      src/views/kxcSystem/pipelineSystem/statisticalAnalysis/pipeLineStatistical/index.vue
  21. 144 17
      src/views/kxcSystem/pipelineSystem/statisticalAnalysis/pipeLineStatistical/template.js
  22. 34 37
      src/views/login/index.vue
  23. 42 31
      src/views/login/loginUt/loginB/Device_SKF.js
  24. 1 3
      src/views/login/loginUt/loginB/enroll_service_wrapper.js
  25. 24 25
      src/views/login/loginUt/loginB/signx_service_wrapper.js

+ 1 - 1
public/config.json

@@ -1,7 +1,7 @@
 {
     "dev":{
         "name":"开发环境",
-        "BASE_URL": "http://172.28.90.227:1111",
+        "BASE_URL": "http://172.28.94.251:1111",
         "ISERVER_BASE_URL": "http://117.174.10.73:8090/"
     },
     "pro":{

+ 1 - 1
src/components/Hamburger/index.vue

@@ -7,7 +7,7 @@
       xmlns="http://www.w3.org/2000/svg"
       width="64"
       height="64"
-      :style="{'fill': showHeader ? 'rgb(191, 203, 217)' : ''}"
+      :style="{'fill': showHeader ? '#fff' : ''}"
     >
       <path
         d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z"

+ 3 - 3
src/layout/components/Sidebar/Function.vue

@@ -36,7 +36,7 @@ export default {
 .hamburger-container {
     padding: 0 0 0 17px;
     float: left;
-    color: rgb(235, 240, 254);
+    color: #fff;
     cursor: pointer;
     transition: background 0.3s;
     -webkit-tap-highlight-color: transparent;
@@ -77,9 +77,9 @@ export default {
     & .sidebar-title {
       display: inline-block;
       margin: 0;
-      color: rgb(235, 240, 254);
+      color: #fff;;
       font-size: 14px;
-      color: #EBF0FE;
+      color: #fff;
       position: absolute;
       left: 45px;
       line-height: 50px;

+ 1 - 1
src/layout/components/Sidebar/Item.vue

@@ -18,7 +18,7 @@ export default {
 
     if (icon) {
       // vnodes.push(<svg-icon icon-class={icon}/>)
-      vnodes.push(<i style='color:rgb(191, 203, 217)' class={icon}></i>)
+      vnodes.push(<i style='color:#fff' class={icon}></i>)
       // <i class="el-icon-edit"></i>
     }
 

+ 1 - 1
src/layout/components/Sidebar/index.vue

@@ -73,7 +73,7 @@ export default {
   transform: translate(-50%, -50%);
 }
 .el-menu /deep/.el-submenu__title>span:not(.nest-menu span) {
-  margin-left: 12px;
+  margin-left: 12px !important;
 }
 .el-menu /deep/.el-submenu__title:not(.nest-menu .el-submenu__title){
   padding-left: 18px !important;

+ 1 - 1
src/styles/base.scss

@@ -11,7 +11,7 @@ body {
 
     .el-submenu__title,
     .el-menu-item {
-      color: rgb(235, 240, 254) !important;
+      color: #fff !important;
 
       &:hover {
         background: #1c72ac !important;

+ 1 - 1
src/styles/variables.scss

@@ -1,5 +1,5 @@
 // sidebar
-$menuText: #ebf0fe;
+$menuText: #fff;
 $menuActiveText: #daf0ff;
 $subMenuActiveText: #f4f4f5;
 

+ 10 - 10
src/utils/request.js

@@ -67,11 +67,11 @@ service.interceptors.response.use(
             return res
         } else {
             if (res.code !== 1) {
-                Message({
-                    message: res.message || 'Error',
-                    type: 'error',
-                    duration: 5 * 1000
-                })
+                // Message({
+                //     message: res.message || 'Error',
+                //     type: 'error',
+                //     duration: 5 * 1000
+                // })
 
                 // 50008:非法令牌;50012:其他客户端登录;50014:令牌过期; 暂时没用
                 if (res.code === 50008 || res.code === 50012 || res.code === 50014) {
@@ -121,11 +121,11 @@ service.interceptors.response.use(
             });
             location.reload();
         } else {
-            Message({
-                message: error.message,
-                type: 'error',
-                duration: 3 * 1000
-            })
+            // Message({
+            //     message: error.message,
+            //     type: 'error',
+            //     duration: 3 * 1000
+            // })
         }
         return Promise.reject(error)
     }

+ 40 - 12
src/views/MapView/miniMap/index.vue

@@ -10,20 +10,16 @@
 import 'ol/ol.css'
 // 基础工具
 import MapZoom from '@/views/MapView/mapViewTools/mapZoom';
-import { Map, View, Feature, Overlay } from 'ol'
-import { Image, Vector, Tile as TileLayer } from "ol/layer"
-import { OSM, XYZ, ImageWMS, TileWMS, Vector as VectorSource } from 'ol/source'
+import { Map, View, Feature } from 'ol'
+import { Vector, Tile as TileLayer } from "ol/layer"
+import { Vector as VectorSource } from 'ol/source'
 import { Style, Fill, Stroke, Icon, Text, Circle } from 'ol/style';
-import { get as getProjection, fromLonLat } from 'ol/proj';
-import { Polygon, Point } from 'ol/geom';
-import { createStringXY } from 'ol/coordinate'
-import { defaults, MousePosition, FullScreen, Zoom } from "ol/control"
+import { Polygon } from 'ol/geom';
 import MapQueryTool from '../mapViewTools/mapQuery'
 import { mapConfig } from '../map.config'
-import { bbox as bboxStrategy } from 'ol/loadingstrategy';
-import GeoJSON from 'ol/format/GeoJSON';
-import { Logo, TileSuperMapRest, FeatureService, QueryService, MapboxStyles, SuperMap, QueryBySQLParameters } from '@supermap/iclient-ol';
+import { TileSuperMapRest, FeatureService, SuperMap } from '@supermap/iclient-ol';
 import { Draw } from "ol/interaction";
+import { getArea } from 'ol/sphere';
 const Cesium = window.Cesium; // 获取Cesium
 
 export default {
@@ -234,10 +230,31 @@ export default {
         console.log("清理已绘制图形....");
       }
       console.log("开始编辑图形数据....");
+      let proj = this.map.getView().getProjection()
       let feature = null;
       this.vectorSource = new VectorSource({ wrapX: false });
       let vectorLayer = new Vector({
-        source: this.vectorSource
+        source: this.vectorSource,
+        style: feature => {
+          let style = new Style({
+            fill: new Fill({
+              color: [255, 255, 255, 0.5]
+            }),
+            stroke: new Stroke({
+              width: 2,
+              color: '#0099ff'
+            }),
+            text: new Text({
+              textAlign: 'center',
+              textBaseline: 'middle',
+              font: 'normal 14px 微软雅黑',
+              text: `统计面积:${this.formatArea(getArea(feature.getGeometry(), { "projection": proj }))}`,
+              fill: new Fill({ color: '#aa3300' }),
+              stroke: new Stroke({ color: '#ffcc33', width: 2 })
+            })
+          })
+          feature.setStyle(style)
+        }
       });
       this.map.addLayer(vectorLayer);
       let geometryFunction = null;
@@ -397,7 +414,18 @@ export default {
         });
       });
     },
-
+    /**
+    * 格式化面积输出
+    */
+    formatArea(area) {
+      let output;
+      if (area > 10000) {
+        output = (Math.round(area / 1000000 * 100) / 100) + ' ' + 'km²'; //换算成km单位
+      } else {
+        output = (Math.round(area * 100) / 100) + ' ' + 'm²';//m为单位
+      }
+      return output; //返回多边形的面积
+    },
     /**
      * Sql查询异步实现
      */

+ 214 - 248
src/views/kxcSystem/PublicHouseManage/HousePrinting/template.js

@@ -1,13 +1,15 @@
 import { GeoJSON } from 'ol/format'
 import { fromLonLat } from 'ol/proj'
-import { Vector as SourceVector } from 'ol/source'
-import { Vector as LayerVector } from 'ol/layer'
+import { Vector as VectorySource } from 'ol/source'
+import { Vector as VectoryLayer } from 'ol/layer'
 import { getCenter, boundingExtent } from 'ol/extent'
 import Overlay from 'ol/Overlay'
 import { Select, Pointer, Draw, Modify, Snap, Translate } from 'ol/interaction'
 import { createRegularPolygon, createBox } from 'ol/interaction/Draw'
 import { Style, Fill, Stroke, Circle } from 'ol/style'
 import Feature from 'ol/Feature'
+import { Polygon, MultiPolygon } from 'ol/geom';
+import { fromExtent } from 'ol/geom/Polygon';
 import {
   Logo,
   TileSuperMapRest,
@@ -47,39 +49,64 @@ export default {
       defaultExpand: true, //默认el-tree全部展开
       resourceCheckedKey: [],
       selectCount: 0,
-      chart: null
+      chart: null,
+      vectorLayer: null,
+      overlays: []
     }
   },
-  created() {},
+  created() { },
   computed: {},
   watch: {
-    statisticMode(nextvalue, preValue) {
-      nextvalue == '1'
-        ? (this.titleCondition = '条件筛选')
-        : (this.titleCondition = '区域绘制类型选择')
-      this.selectFeatures = []
-      this.removeInteraction()
-    },
     drawType(nextvalue, preValue) {
-      nextvalue == '1'
-        ? this.initDrawHandler('Square')
-        : this.initDrawHandler('Polygon')
+      if (!nextvalue) return
+      this.selectFeatures = []
+      this.initDrawHandler(nextvalue == 1 ? 'Square' : 'Polygon')
     },
     selectRegion(nextvalue, preValue) {
+      if (!nextvalue) return
+      this.selectFeatures = []
       let feature = this.regions.find(item => item.regionCode == nextvalue)
-      if (feature && feature.feature) this.highLightFeature(feature.feature)
-      this.queryBulidNumByRegion(nextvalue)
+      const geo = new GeoJSON().readGeometry(feature.feature.geometry)
+      this.drawArea(geo)
+      if (feature && feature.feature) this.flyToFeature(feature.feature, null)
+      console.log(new GeoJSON().readFeature(feature.feature));
+      this.queryBulidNumByFeature(new Feature({ geometry: geo }))
+    },
+    statisticMode(val, oldVal) {
+      this.selectFeatures = []
+      if (this.drawTool) this.map.removeInteraction(this.drawTool)
+      this.vectorLayer.getSource().clear()
+      this.selectRegion = null
+      this.drawType = null
+      this.clearOverlays()
     }
   },
   destroyed() {
-    this.removeInteraction()
-    this.clearSource()
+    if (this.vectorLayer) this.map.removeLayer(this.vectorLayer)
+    if (this.drawTool) this.map.removeInteraction(this.drawTool)
     this.clearOverlays()
   },
   mounted() {
     this.config = this.data.that.config
     this.map = this.data.that.map
     this.chart = this.$refs.chart
+
+    this.vectorLayer = new VectoryLayer({
+      source: new VectorySource(),
+      style: new Style({
+        //填充色
+        fill: new Fill({
+          color: 'rgba(255, 255, 255)'
+        }),
+        //边线颜色和宽度
+        stroke: new Stroke({
+          color: '#4e71f2',
+          lineDash: [3, 4, 3, 4],
+          width: 3,
+        }),
+      })
+    })
+    this.map.addLayer(this.vectorLayer)
     this.queryRegionServer()
     this.getSecurityLevel()
   },
@@ -94,7 +121,6 @@ export default {
       let useLayers = layers.filter(item => {
         return item.get('securityClass') && item.getVisible()
       })
-      console.log('筛选图层:', useLayers)
       let securityLeves = useLayers.map(item => {
         return parseInt(item.get('securityClass'))
       })
@@ -108,45 +134,35 @@ export default {
     },
     /**
      * 查询所有行政区划数据
-     * @id 行政区ID
      */
-    queryRegionServer(id) {
-      let attributeFilter = '1=1'
-      if (id) {
-        attributeFilter = 'AREANUMBER = ' + id
-      }
+    queryRegionServer() {
       if (!this.config) return
       //指定SQL查询处理
       let url = this.config.iServerUrl.basicGISDataServer.url
-      if (!url || url == '') {
-        this.$message(
-          'info',
-          '请在配置文件中配置行政区划数据服务在map.config.js下的iServerUrl下面'
-        )
+      if (!url) {
+        this.$message.error('未找到行政区服务配置,请联系管理员查看配置是否有误或无权限!')
         return
       }
       let dataSet = this.config.iServerUrl.basicGISDataServer.dataSetInfo.find(
         dataSetinfo => dataSetinfo.label == '区域'
       )
-      if (!dataSet || !dataSet.name) return
-      let queryName =
-        dataSet.name +
-        '@' +
-        this.config.iServerUrl.basicGISDataServer.dataSource
-      let datasetNames =
-        this.config.iServerUrl.basicGISDataServer.dataSource +
-        ':' +
-        dataSet.name
+      if (!dataSet || !dataSet.name) {
+        this.$message.error('未找到行政区服务配置,请联系管理员查看配置是否有误或无权限!')
+        return
+      }
+      let queryName = `${dataSet.name}@${this.config.iServerUrl.basicGISDataServer.dataSource}`
+      let datasetName = `${this.config.iServerUrl.basicGISDataServer.dataSource}:${dataSet.name}`
       //指定SQL查询服务参数
       var sqlParam = new SuperMap.GetFeaturesBySQLParameters({
-        queryParameter: {
-          name: queryName,
-          attributeFilter: attributeFilter
-        },
-        datasetNames: [datasetNames]
+        queryParameter: { name: queryName },
+        datasetNames: [datasetName]
       })
       //向服务器发送请求,并对返回的结果进行处理
       new FeatureService(url).getFeaturesBySQL(sqlParam, serviceResult => {
+        if (serviceResult.type == 'processFailed') {
+          this.$message.error('查询行政区数据失败!')
+          return
+        }
         //获取返回的features数据
         if (serviceResult.result.features) {
           let features = serviceResult.result.features.features
@@ -182,37 +198,9 @@ export default {
      * @drawType String 绘制类型(Point、LineString、Polygon、Circle,Square,Box)
      */
     initDrawHandler(drawType) {
-      this.removeInteraction()
-      //删除之前绘制图形
-      if (this.vectorSource) {
-        this.vectorSource.clear()
-        console.log('清理已绘制图形....', drawType)
-      }
-      console.log('开始编辑图形数据....')
-      let feature = null
-      this.vectorSource = new SourceVector({ wrapX: false })
-      let vectorLayer = new LayerVector({
-        source: this.vectorSource,
-        style: new Style({
-          //填充色
-          fill: new Fill({
-            color: 'rgba(255, 255, 255, 0.2)'
-          }),
-          //边线颜色和宽度
-          stroke: new Stroke({
-            color: '#1E90FF',
-            width: 3
-          }),
-          //形状
-          image: new Circle({
-            radius: 7,
-            fill: new Fill({
-              color: '#ffcc33'
-            })
-          })
-        })
-      })
-      this.map.addLayer(vectorLayer)
+      if (this.drawTool) this.map.removeInteraction(this.drawTool)
+      this.vectorLayer.getSource().clear()
+      // let feature = null
       let geometryFunction = null
       let maxPoint
       //绘制多边形
@@ -226,7 +214,7 @@ export default {
       }
 
       this.drawTool = new Draw({
-        source: this.vectorSource,
+        source: this.vectorLayer.getSource(),
         wrapX: false,
         maxPoints: maxPoint, //最大点数
         type: drawType,
@@ -234,17 +222,17 @@ export default {
       })
       this.drawTool.on('drawstart', evt => {
         //清理已绘制图形
-        if (this.vectorSource) {
-          this.vectorSource.clear()
-          console.log('清理已绘制图形....')
-        }
-        feature = evt.feature
+        this.vectorLayer.getSource().clear()
+        // feature = evt.feature
       })
-      this.drawTool.on('drawend', () => {
-        let geometry = feature.getGeometry()
-        this.drawFeature = feature
-        //this.multiLayerQuery();
-        this.queryBulidNumByFeature(this.drawFeature)
+      this.drawTool.on('drawend', evt => {
+        this.drawType = null
+        this.map.removeInteraction(this.drawTool)
+        setTimeout(() => {
+          this.drawArea(evt.feature.getGeometry())
+          this.flyToFeature(null, evt.feature.getGeometry())
+          this.queryBulidNumByFeature(evt.feature)
+        }, 100);
       })
       this.map.addInteraction(this.drawTool)
     },
@@ -255,32 +243,36 @@ export default {
      */
     queryBulidNumByFeature(feature) {
       let url = this.config.iServerUrl.publicHouseDataServer.url
-      if (!url || url == '') {
-        this.$message(
-          'info',
-          '请在配置文件中配置楼建筑服务在map.config.js下的iServerUrl下面'
-        )
+      if (!url) {
+        this.$message.error('未找到公房服务配置,请联系管理员查看配置是否有误或无权限!')
+        return
+      }
+      let datasetNames = []
+      this.config.iServerUrl.publicHouseDataServer.houseDataSets.forEach(item => {
+        datasetNames.push(`${this.config.iServerUrl.publicHouseDataServer.dataSource}:${item.name}`)
+      });
+      if (datasetNames.length == 0) {
+        this.$message.error('未找到公房服务配置,请联系管理员查看配置是否有误或无权限!')
         return
       }
-      let datasetName =
-        this.config.iServerUrl.publicHouseDataServer.dataSource +
-        ':' +
-        this.config.iServerUrl.publicHouseDataServer.dataSetBataSet
       //添加查询区域
       let polygon = feature.getGeometry()
       //创建集Bounds查询服务
-      let boundsParam = new SuperMap.GetFeaturesByBoundsParameters({
-        datasetNames: [datasetName],
-        bounds: polygon.getExtent()
+      let geometryParameters = new SuperMap.GetFeaturesByGeometryParameters({
+        datasetNames: datasetNames,
+        geometry: polygon,
+        spatialQueryMode: "CONTAIN"
       })
-      new FeatureService(url).getFeaturesByBounds(
-        boundsParam,
-        serviceResult => {
-          if (serviceResult.result.features) {
-            let features = serviceResult.result.features.features
-            this.getBulidStatistic(features, null)
-          }
+      new FeatureService(url).getFeaturesByGeometry(geometryParameters, serviceResult => {
+        if (serviceResult.type == 'processFailed') {
+          this.$message.error('查询数据集失败!')
+          return
         }
+        if (serviceResult.result.features) {
+          let features = serviceResult.result.features.features
+          this.getBulidStatistic(features, null)
+        }
+      }
       )
     },
 
@@ -288,49 +280,57 @@ export default {
      * 根据行政区划查询楼房幢号
      * @regionCode 行政区编号
      */
-    queryBulidNumByRegion(regionCode) {
-      if (regionCode) {
-        let attributeFilter = 'AREANUMBER = ' + regionCode
-        if (!this.config) return
-        //指定SQL查询处理
-        let url = this.config.iServerUrl.publicHouseDataServer.url
-        if (!url || url == '') {
-          this.$message(
-            'info',
-            '请在配置文件中配置楼建筑服务在map.config.js下的iServerUrl下面'
-          )
-          return
-        }
-        let dataSet = this.config.iServerUrl.publicHouseDataServer.dataSetInfo.find(
-          dataSetInfo => dataSetInfo.label == '公房'
-        )
-        if (!dataSet || !dataSet.name) return
-        let queryName =
-          dataSet.name +
-          '@' +
-          this.config.iServerUrl.publicHouseDataServer.dataSource
-        let datasetNames =
-          this.config.iServerUrl.publicHouseDataServer.dataSource +
-          ':' +
-          dataSet.name
-        //指定SQL查询服务参数
-        var sqlParam = new SuperMap.GetFeaturesBySQLParameters({
-          queryParameter: {
-            name: queryName,
-            attributeFilter: attributeFilter
-          },
-          datasetNames: [datasetNames]
-        })
-        //向服务器发送请求,并对返回的结果进行处理
-        new FeatureService(url).getFeaturesBySQL(sqlParam, serviceResult => {
-          //获取返回的features数据
-          if (serviceResult.result.features) {
-            let features = serviceResult.result.features.features
-            this.getBulidStatistic(features, regionCode)
-          }
-        })
-      }
-    },
+    // queryBulidNumByRegion(regionCode) {
+    //   if (regionCode) {
+    //     let attributeFilter = 'AREANUMBER = ' + regionCode
+    //     //指定SQL查询处理
+    //     let url = this.config.iServerUrl.publicHouseDataServer.url
+    //     if (!url) {
+    //       this.$message.error('未找到公房服务配置,请联系管理员查看配置是否有误或无权限!')
+    //       return
+    //     }
+    //     // let dataSet = this.config.iServerUrl.publicHouseDataServer.dataSetInfo.find(
+    //     //   dataSetInfo => dataSetInfo.label == '公房'
+    //     // )
+    //     // if (!dataSet || !dataSet.name) return
+    //     let datasetNames = []
+    //     this.config.iServerUrl.publicHouseDataServer.houseDataSets.forEach(item => {
+    //       datasetNames.push(`${this.config.iServerUrl.publicHouseDataServer.dataSource}:${item.name}`)
+    //     });
+    //     if (datasetNames.length == 0) {
+    //       this.$message.error('未找到公房服务配置,请联系管理员查看配置是否有误或无权限!')
+    //       return
+    //     }
+    //     // let queryName =
+    //     //   dataSet.name +
+    //     //   '@' +
+    //     //   this.config.iServerUrl.publicHouseDataServer.dataSource
+    //     // let datasetNames =
+    //     //   this.config.iServerUrl.publicHouseDataServer.dataSource +
+    //     //   ':' +
+    //     //   dataSet.name
+    //     //指定SQL查询服务参数
+    //     var sqlParam = new SuperMap.GetFeaturesBySQLParameters({
+    //       queryParameter: {
+    //         // name: queryName,
+    //         attributeFilter: attributeFilter
+    //       },
+    //       datasetNames: datasetNames
+    //     })
+    //     //向服务器发送请求,并对返回的结果进行处理
+    //     new FeatureService(url).getFeaturesBySQL(sqlParam, serviceResult => {
+    //       if (serviceResult.type == 'processFailed') {
+    //         this.$message.error('查询数据集失败!')
+    //         return
+    //       }
+    //       //获取返回的features数据
+    //       if (serviceResult.result.features) {
+    //         let features = serviceResult.result.features.features
+    //         this.getBulidStatistic(features, regionCode)
+    //       }
+    //     })
+    //   }
+    // },
 
     /**
      * 初始化幢号楼房显示结果
@@ -386,29 +386,14 @@ export default {
     },
 
     checkChange(data, checked) {
-      //console.log("选择改变事件:", data, checked);
-      this.treeNodeSelectData = this.$refs.featureTree.getCheckedNodes() // 获取当前的选中的数据{对象}
-      if (this.treeNodeSelectData.length == 0) this.selectCount = 0
-      //判断是不是勾选父节点
-      let flag = false
-      let nodeSelectData = []
-      this.treeNodeSelectData.forEach(treeNode => {
-        if (treeNode.hasOwnProperty('children')) flag = true
-        else {
-          nodeSelectData.push(treeNode)
-        }
+      let treeNodeSelectData = this.$refs.featureTree.getCheckedNodes() // 获取当前的选中的数据{对象}
+      console.log("OOPP", data, checked, treeNodeSelectData);
+      this.clearOverlays()
+      // 选择非父级
+      const nodes = treeNodeSelectData.filter(item => {
+        return !item.hasOwnProperty('children')
       })
-      if (flag) {
-        this.selectCount = this.selectCount + 1
-        if (this.selectCount == this.treeNodeSelectData.length) {
-          this.getBuildNumArr(nodeSelectData)
-        }
-      } else {
-        this.getBuildNumArr(nodeSelectData)
-      }
-      if (!checked && this.treeNodeSelectData.length > 0) {
-        this.selectCount = this.selectCount - 1
-      }
+      this.getBuildNumArr(nodes)
     },
 
     /**
@@ -439,9 +424,7 @@ export default {
         .catch(msg => {
           this.$message('查询失败!失败原因:' + msg)
         })
-        .finally(() => {
-          console.log('调用完成!')
-        })
+        .finally(() => { })
     },
 
     /**
@@ -453,7 +436,6 @@ export default {
      */
     getEchartData(records, treeNodes) {
       let echartData = treeNodes
-      console.log('ddddddd', records, treeNodes)
       if (!treeNodes || treeNodes.length < 1) return []
       if (records && records.length > 0) {
       }
@@ -498,7 +480,6 @@ export default {
      */
     showThemic(records, treeNodes) {
       let echartData = this.getEchartData(records, treeNodes)
-      console.log('输出情况:', echartData)
       this.clearOverlays()
       for (let i = 0; i < echartData.length; i++) {
         //1、循环每一条数据,生成id不同的div
@@ -531,7 +512,7 @@ export default {
               },
               itemStyle: {
                 normal: {
-                  color: function(params) {
+                  color: function (params) {
                     //自定义颜色
                     var colorList = ['red', 'green']
                     return colorList[params.dataIndex]
@@ -551,7 +532,7 @@ export default {
                 fontSize: 10,
                 itemStyle: {
                   normal: {
-                    color: function(params) {
+                    color: function (params) {
                       //自定义颜色
                       var colorList = ['#FE8463', '#FAC858', '#91CC75']
                       return colorList[params.dataIndex]
@@ -568,14 +549,14 @@ export default {
         }
         myChart.setOption(option)
         siteDiv.onclick = () => {
-          console.log('parm', echartData[i])
+          // console.log('parm', echartData[i])
         }
         const lonlat = [
           parseFloat(echartData[i].x),
           parseFloat(echartData[i].y)
         ]
-        //3、 new Overlay,将每个柱状图添加到对应的点位上去
-        let marker = new Overlay({
+
+        let overlay = new Overlay({
           id: domid,
           position: lonlat, //默认空
           positioning: 'center', //center-bottom
@@ -583,28 +564,67 @@ export default {
           stopEvent: false,
           offset: [-90, -70] //图片偏移量
         })
-        this.map.addOverlay(marker)
+        this.map.addOverlay(overlay)
+        this.overlays.push(overlay)
       }
     },
 
     guid() {
       //为了生成不一样的id,实现每个装柱状图的盒子的唯一性
-      var d = new Date().getTime()
-      var guid = 'xxxx-xxxx-xxxx-xxxx'.replace(/[xy]/g, function(c) {
-        var r = (d + Math.random() * 16) % 16 | 0
+      let d = new Date().getTime()
+      let guid = 'xxxx-xxxx-xxxx-xxxx'.replace(/[xy]/g, function (c) {
+        let r = (d + Math.random() * 16) % 16 | 0
         d = Math.floor(d / 16)
         return (c == 'x' ? r : (r & 0x7) | 0x8).toString(16)
       })
       return guid
     },
+    /**
+     * 只显示目标区域
+     */
+    drawArea(geometry) {
+      let coordinates = null
+      if (geometry instanceof MultiPolygon) {
+        coordinates = geometry.getCoordinates()[0]
+      } else if (geometry instanceof Polygon) {
+        coordinates = geometry.getCoordinates()
+      }
+      if (!coordinates) return
+      let linearRing = new Polygon(coordinates);
+      let extent = this.map.getView().calculateExtent();
+      for (let i = 0; i < extent.length; i++) {
+        extent[0] = extent[0] - 0.04 //左
+        extent[1] = extent[1] - 0.04 //下
+        extent[2] = extent[2] + 0.04 //右
+        extent[3] = extent[3] + 0.04 //上
+      }
+      let polygonRing = fromExtent(extent);
+      polygonRing.appendLinearRing(linearRing);
+      let polygonsFeature = new Feature({
+        geometry: polygonRing
+      });
+      polygonsFeature.setStyle(new Style({
+        fill: new Fill({
+          color: 'rgba(255, 255, 255)'
+        }),
+        //边线颜色和宽度
+        stroke: new Stroke({
+          color: '#4e71f2',
+          lineDash: [3, 4, 3, 4],
+          width: 3,
+        })
+      }))
+      this.vectorLayer.getSource().clear()
+      this.vectorLayer.getSource().addFeature(polygonsFeature)
+    },
 
     /**
      * 导出地图图片
      */
     pdfExport() {
-      this.map.once('postcompose', function(event) {
+      this.map.once('postcompose', function (event) {
         let canvas = event.context.canvas
-        canvas.toBlob(function(blob) {
+        canvas.toBlob(function (blob) {
           saveAs(blob, 'map.png')
         })
       })
@@ -640,81 +660,27 @@ export default {
      * 点击树节点事件
      */
     handleNodeClick(data) {
-      if (data && data.hasOwnProperty('feature')) {
-        console.log('结点点击事件:', data)
-      }
+
     },
 
     /**
-     * 高亮显示
+     * 定位显示
      * @features 要素
      */
-    highLightFeature(features) {
-      let geometry = features.geometry
+    flyToFeature(jsonFeature = null, geometry) {
       let feature = new Feature({
-        geometry: new GeoJSON().readGeometry(geometry)
-      })
-      this.clearSource()
-      this.queryVectorSource = new SourceVector({
-        features: new GeoJSON().readFeatures(features),
-        wrapX: false
-      })
-      this.queryResultLayer = new LayerVector({
-        source: this.queryVectorSource,
-        style: new Style({
-          //填充色
-          fill: new Fill({
-            color: 'rgba(255, 255, 255, 0.2)'
-          }),
-          //边线颜色
-          stroke: new Stroke({
-            color: '#1E90FF',
-            width: 3
-          }),
-          //形状
-          image: new Circle({
-            radius: 5,
-            fill: new Fill({
-              color: '#ffcc33'
-            })
-          })
-        })
+        geometry: jsonFeature ? new GeoJSON().readGeometry(jsonFeature.geometry) : geometry
       })
-      this.map.addLayer(this.queryResultLayer)
       setTimeout(() => {
-        this.map
-          .getView()
-          .fit(feature.getGeometry().getExtent(), { duration: 600 })
+        this.map.getView().fit(feature.getGeometry().getExtent(), { duration: 600 })
       }, 200)
     },
 
-    queryStatistic() {},
-
-    /**
-     * 移除清理
-     */
-    removeInteraction() {
-      this.drawFeature = null
-      if (this.drawTool) {
-        this.map.removeInteraction(this.drawTool)
-      }
-      if (this.vectorSource) {
-        this.vectorSource.clear()
-      }
-      this.clearSource()
-    },
 
     clearOverlays() {
-      this.map.getOverlays().clear()
+      this.overlays.forEach(overlay => {
+        this.map.removeOverlay(overlay)
+      });
     },
-
-    /**
-     * 清理区县要素类图形
-     */
-    clearSource() {
-      if (this.queryVectorSource) {
-        this.queryVectorSource.clear()
-      }
-    }
   }
 }

+ 6 - 6
src/views/kxcSystem/PublicHouseManage/HousePrinting/widget.vue

@@ -3,14 +3,14 @@
     <div class="box-edit-type">
       <div class="box-hander">
         <!-- <div class="box-icon" /><div class="box-title">选择统计方式</div> -->
-        <div class="item-head">选择统计方式</div>
+        <div class="item-head">选择打印方式</div>
       </div>
       <div class="box-edit-content">
         <el-row>
           <el-col :span="24" style="height:40px;line-height:40px;">
             <el-radio-group v-model="statisticMode">
-              <el-radio :label="1">选择条件统计</el-radio>
-              <el-radio :label="2">绘制区域统计</el-radio>
+              <el-radio :label="1">选择行政区打印</el-radio>
+              <el-radio :label="2">绘制区域打印</el-radio>
             </el-radio-group>
           </el-col>
         </el-row>
@@ -19,7 +19,7 @@
 
     <div class="box-edit-type">
       <div class="box-hander" v-if="statisticMode != ''">
-        <div class="item-head" v-text="titleCondition"></div>
+        <div class="item-head" v-text="titleCondition=statisticMode==1?'选择行政区':'选择绘制类型'"></div>
       </div>
       <div class="box-form-content">
         <el-form label-width="80px" v-if="statisticMode == 1" style="padding-right:20px;">
@@ -47,7 +47,7 @@
       </div>
       <div class="box-form-content">
         <el-row>
-          <el-col :span="24" style="height:40px;line-height:40px;">
+          <el-col :span="24">
             <el-tree :data="selectFeatures" :props="defaultProps" :default-expand-all="defaultExpand" node-key="label" ref="featureTree" :default-checked-keys="resourceCheckedKey" show-checkbox @check-change="checkChange" @node-click="handleNodeClick">
             </el-tree>
           </el-col>
@@ -56,7 +56,7 @@
     </div>
     <!-- <div class="btnExport" @click="pdfExport">导出</div> -->
     <div class="box-edit-type" style="margin-top:30px">
-      <el-button type="primary" @click="expHtmlCanves()" size="small" style="width:100%">导出</el-button>
+      <el-button type="primary" @click="expHtmlCanves()" size="small" style="width:100%">打 印</el-button>
     </div>
   </div>
 </template>

+ 10 - 0
src/views/kxcSystem/PublicHouseManage/groundQuery/widget.vue

@@ -12,6 +12,9 @@
         <el-form-item label="宗地坐落">
           <el-input v-model="queryForm.ADDR" placeholder="宗地坐落" size="small" clearable></el-input>
         </el-form-item>
+        <el-form-item label="楼盘名称">
+          <el-input v-model="queryForm.BUILDINGNAME" placeholder="楼盘名称" size="small" clearable></el-input>
+        </el-form-item>
         <el-form-item>
           <el-button type="primary" size="small" :loading="queryStatus" :disabled="queryStatus" @click="query()" style="width:100px">查 询</el-button>
           <el-button type="danger" size="small" style="width:100px" @click="clear">重 置</el-button>
@@ -29,6 +32,7 @@
         <el-table-column prop="ADDR" label="宗地坐落" align="center" show-overflow-tooltip></el-table-column>
         <el-table-column prop="LAND_AREA" label="宗地面积" align="center" show-overflow-tooltip></el-table-column>
         <el-table-column prop="LAND_USE_TERM" label="土地使用期限" align="center" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="BUILDINGNAME" label="楼盘" align="center" show-overflow-tooltip></el-table-column>
         <el-table-column label="操作" align="center" width="300">
           <template slot-scope="scope">
             <el-button type="text" @click.stop="lookData(scope)">查看</el-button>
@@ -202,6 +206,12 @@
             </el-form-item>
           </el-col>
 
+          <el-col :span="24">
+            <el-form-item label="楼盘名称:">
+              <el-input type="textarea" v-model="formData.BUILDINGNAME" :readonly="true"></el-input>
+            </el-form-item>
+          </el-col>
+
           <el-col :span="24">
             <el-form-item label="说明:">
               <el-input type="textarea" v-model="formData.LAND_REMARK" :readonly="true"></el-input>

+ 178 - 26
src/views/kxcSystem/PublicHouseManage/houseQuery/widget.vue

@@ -9,26 +9,47 @@
       </div>
       <!-- 属性查询表单 -->
       <el-form :inline="true" :model="queryForm" v-if="queryType=='1'" label-width="auto">
-          <el-form-item label="房屋编号" style="margin-left:35px">
-            <el-input v-model="queryForm.houseSid" placeholder="房屋编号" size="small" clearable></el-input>
+        <el-form-item label="房屋编号" style="margin-left:35px">
+          <el-input v-model="queryForm.houseSid" placeholder="房屋编号" size="small" clearable style="width:120px"></el-input>
+        </el-form-item>
+        <el-form-item label="楼栋编号">
+          <el-input v-model="queryForm.buildingNo" placeholder="楼栋编号" size="small" clearable style="width:120px"></el-input>
+        </el-form-item>
+        <el-form-item label="年份" label-width="40px">
+          <!-- <el-input v-model="queryForm.g1" placeholder="年份" size="small" clearable style="width:150px"></el-input> -->
+          <el-date-picker v-model="queryForm.buildingDate" type="year" placeholder="选择年" value-format="yyyy" size="small" style="width:120px"></el-date-picker>
+        </el-form-item>
+        <el-form-item label="地区" label-width="40px">
+          <el-input v-model="queryForm.buildingArea" placeholder="地区" size="small" clearable style="width:120px"></el-input>
+        </el-form-item>
+        <el-form-item label="主题" label-width="40px">
+          <el-input v-model="queryForm.theme" placeholder="主题" size="small" clearable style="width:120px"></el-input>
+        </el-form-item>
+        <el-form-item class="btn-container">
+          <el-button type="primary" size="small" :loading="queryStatus" :disabled="queryStatus" @click="query" style="width:100px">查 询
+          </el-button>
+          <el-button type="danger" size="small" @click="clearGeometryQuery()" style="width:100px">清 除</el-button>
+        </el-form-item>
+      </el-form>
+      <!-- 空间查询 -->
+      <div class="spatialQuery" v-if="queryType=='2'">
+        <el-form :inline="true" :model="queryForm2" label-width="auto">
+          <el-form-item label="行政区" style="margin-left:35px">
+            <el-select v-model="queryForm2.AREANUMBER" placeholder="选择行政区" size="small" clearable>
+              <el-option v-for="item in regions" :key="item.regionCode" :label="item.regionName" :value="item.regionCode"></el-option>
+            </el-select>
           </el-form-item>
-          <el-form-item label="楼栋编号">
-            <el-input v-model="queryForm.buildingNo" placeholder="楼栋编号" size="small" clearable></el-input>
+          <el-form-item label="小区">
+            <el-select v-model="queryForm2.COMMUNITYNAME" placeholder="小区" size="small" clearable>
+              <el-option v-for="(item,index) in communityNames" :key="index" :label="item" :value="item"></el-option>
+            </el-select>
           </el-form-item>
-          <!-- <el-form-item label="宗地编号">
-            <el-input v-model="queryForm.groundNo" placeholder="宗地编号" size="small" clearable></el-input>
-          </el-form-item> -->
           <el-form-item class="btn-container">
-            <el-button type="primary" size="small" :loading="queryStatus" :disabled="queryStatus" @click="query" style="width:100px">查 询
-            </el-button>
-            <el-button type="danger" size="small" @click="clearGeometryQuery()" style="width:100px">清 除</el-button>
+            <el-button type="primary" size="small" style="width:100px;margin-left:35px" @click="geometryQuery(1)">圆查询</el-button>
+            <el-button type="primary" size="small" style="width:100px;padding: 10px 0;" @click="geometryQuery(2)">多边形查询</el-button>
+            <el-button type="danger" size="small" style="width:100px" @click="clearGeometryQuery()">清 除</el-button>
           </el-form-item>
-      </el-form>
-      <!-- 空间查询 -->
-      <div class="spatialQuery" v-if="queryType=='2'">
-        <el-button type="primary" size="small" style="width:100px;margin-left:35px" @click="geometryQuery(1)">圆查询</el-button>
-        <el-button type="primary" size="small" style="width:100px;padding: 10px 0;" @click="geometryQuery(2)">多边形查询</el-button>
-        <el-button type="danger" size="small" style="width:100px" @click="clearGeometryQuery()">清 除</el-button>
+        </el-form>
       </div>
       <!-- 空间查询 -->
       <div class="spatialQuery" v-if="queryType=='3'">
@@ -49,8 +70,7 @@
     </div>
 
     <div class="table-box">
-      <el-table :data="tableData" stripe :header-cell-style="{fontSize: '14px', fontWeight:'600',background:'#eaf1fd',color:'#909399'}"
-                style="width: 100%" height="100%" v-loading="queryStatus" @row-click="rowClick">
+      <el-table :data="tableData" stripe :header-cell-style="{fontSize: '14px', fontWeight:'600',background:'#eaf1fd',color:'#909399'}" style="width: 100%" height="100%" v-loading="queryStatus" @row-click="rowClick">
         <!-- <el-table-column prop="buildingNo" label="小区编号" align="center" show-overflow-tooltip></el-table-column> -->
         <!-- <el-table-column prop="bulidingName" label="小区名称" align="center" show-overflow-tooltip></el-table-column> -->
         <el-table-column prop="buildingNum" label="楼栋" align="center" show-overflow-tooltip></el-table-column>
@@ -78,9 +98,8 @@
     </div>
 
     <div class="table-pagination">
-      <el-pagination :current-page="pagination.current" :page-sizes="[20, 50, 100, 200]" :page-size="pagination.size"
-                     layout="total, sizes, prev, pager, next" :total="pagination.total" @size-change="sizeChange"
-                     @current-change="currentChange">
+      <el-pagination :current-page="pagination.current" :page-sizes="[20, 50, 100, 200]" :page-size="pagination.size" layout="total, sizes, prev, pager, next" :total="pagination.total" @size-change="sizeChange"
+        @current-change="currentChange">
       </el-pagination>
     </div>
 
@@ -203,6 +222,7 @@ export default {
       queryForm: {
         houseStatus: '',
       },
+      queryForm2: {},
       queryByGeo: { houseParams: [], houseNo: "" }, // 几何查询时的请求参数
       bufferDistence: 200, //缓冲距离
       tableData: [],
@@ -217,7 +237,9 @@ export default {
       formData: {},
       queryDraw: null, // 空间查询的绘制对象
       drawLayer: null,
-      allBuilding: [] // 用户能查询的所有楼栋
+      allBuilding: [], // 用户能查询的所有楼栋
+      regions: [],
+      communityNames: []
     }
   },
   mounted() {
@@ -238,6 +260,10 @@ export default {
       type: 'Point',
       source: this.vectorLayer.getSource(),
     })
+    this.queryRegionServer()
+    this.getOnlyValue('COMMUNITYNAME').then(res => {
+      this.communityNames = res
+    })
     this.queryBuilding('', false) // 获取所有的楼栋信息
   },
   watch: {
@@ -312,11 +338,128 @@ export default {
         }
       })
     },
+    /**
+     * 获取字段唯一值
+     * @param {String} field 字段名称
+     */
+    async getOnlyValue(field) {
+      //指定SQL查询处理
+      var url = mapConfig.iServerUrl.publicHouseDataServer.url
+      let datasetNames = []
+      mapConfig.iServerUrl.publicHouseDataServer.houseDataSets.forEach(item => {
+        datasetNames.push(`${mapConfig.iServerUrl.publicHouseDataServer.dataSource}:${item.name}`)
+      });
+      if (datasetNames.length == 0) {
+        this.$message.error('未找到公房服务配置,请联系管理员查看配置是否有误或无权限!')
+        return
+      }
+      //指定SQL查询服务参数
+      let sqlParam = new SuperMap.GetFeaturesBySQLParameters({
+        toIndex: -1,
+        maxFeatures: 10000000,
+        datasetNames: datasetNames,
+        queryParameter: {
+          // name:
+          //   this.targetDataset.value +
+          //   '@' +
+          //   mapConfig.iServerUrl.pipelineDataServer.dataSource,
+          attributeFilter: '',
+          fields: [field],
+          groupBy: field
+        }
+      })
+      return new Promise(resolve => {
+        //向服务器发送请求,并对返回的结果进行处理
+        new FeatureService(url).getFeaturesBySQL(sqlParam, serviceResult => {
+          if (serviceResult.type == 'processFailed') {
+            this.$message.error('获取小区失败!')
+            return
+          }
+          //获取返回的features数据
+          let features = serviceResult.result.features.features
+          // 拿到唯一值
+          let fieldOnlyValue = features.map(item => {
+            return item.properties[field]
+          })
+          resolve(fieldOnlyValue)
+        })
+      })
+    },
+    /**
+     * 查询所有行政区划数据
+     */
+    queryRegionServer() {
+      //指定SQL查询处理
+      let url = mapConfig.iServerUrl.basicGISDataServer.url
+      if (!url) {
+        this.$message.error('未找到行政区服务配置,请联系管理员查看配置是否有误或无权限!')
+        return
+      }
+      let dataSet = mapConfig.iServerUrl.basicGISDataServer.dataSetInfo.find(
+        dataSetinfo => dataSetinfo.label == '区域'
+      )
+      if (!dataSet || !dataSet.name) {
+        this.$message.error('未找到行政区服务配置,请联系管理员查看配置是否有误或无权限!')
+        return
+      }
+      let queryName = `${dataSet.name}@${mapConfig.iServerUrl.basicGISDataServer.dataSource}`
+      let datasetName = `${mapConfig.iServerUrl.basicGISDataServer.dataSource}:${dataSet.name}`
+      //指定SQL查询服务参数
+      var sqlParam = new SuperMap.GetFeaturesBySQLParameters({
+        queryParameter: {
+          name: queryName
+        },
+        datasetNames: [datasetName]
+      })
+      //向服务器发送请求,并对返回的结果进行处理
+      new FeatureService(url).getFeaturesBySQL(sqlParam, serviceResult => {
+        if (serviceResult.type == 'processFailed') {
+          this.$message.error('查询行政区数据失败!')
+          return
+        }
+        //获取返回的features数据
+        if (serviceResult.result.features) {
+          let features = serviceResult.result.features.features
+          this.initRegion(features)
+        }
+      })
+    },
+
+    /**
+     * 初始化行政区
+     * @features 空间数据
+     */
+    initRegion(features) {
+      if (this.regions.length > 0) return
+      if (features && features.length > 0) {
+        features.forEach(feature => {
+          if (
+            feature.properties.hasOwnProperty('AREANUMBER') &&
+            feature.properties.hasOwnProperty('NAME')
+          ) {
+            this.regions.push({
+              regionCode: feature.properties.AREANUMBER,
+              regionName: feature.properties.NAME,
+              feature: feature
+            })
+          }
+        })
+      }
+    },
     /**
      * iServer几何查询
      * @param {Geometry} 查询的几何信息
      */
     queryService(geometry) {
+      // 获取属性条件
+      let sql = ''
+      for (const key in this.queryForm2) {
+        if (this.queryForm2[key]) {
+          sql += key + ' LIKE' + " '%" + this.queryForm2[key] + "%' AND "
+        }
+      }
+      sql = sql.substr(0, sql.length - 5) // 去掉最后一个AND
+      console.log('sql', sql);
       let url = mapConfig.iServerUrl.publicHouseDataServer.url
       // 查询的宗地数据集
       let datasetNames = mapConfig.iServerUrl.publicHouseDataServer.houseDataSets.map(item => {
@@ -328,12 +471,15 @@ export default {
         maxFeatures: 10000000,
         datasetNames: datasetNames,
         geometry: geometry,
+        attributeFilter: sql,
         spatialQueryMode: "INTERSECT" // 相交空间查询模式
       });
       // 查询
       new FeatureService(url).getFeaturesByGeometry(geometryParam, serviceResult => {
-
-        console.log('查询结果:', serviceResult);
+        if (serviceResult.type == 'processFailed') {
+          this.$message.error('查询数据集失败!')
+          return
+        }
         // 显示查询结果
         this.vectorLayer.getSource().addFeatures(new GeoJSON().readFeatures(serviceResult.result.features))
         // 查询具体的房屋
@@ -394,7 +540,7 @@ export default {
       let groundNo = this.queryForm.groundNo ? this.queryForm.groundNo : null
       let houseSid = this.queryForm.houseSid ? this.queryForm.houseSid : null
       let buildingNo = this.queryForm.buildingNo ? this.queryForm.buildingNo : null
-      console.log('9999000',this.allBuilding)
+      console.log('9999000', this.allBuilding)
 
       let paramSids = [] // 参数ids
 
@@ -456,7 +602,13 @@ export default {
         });
       }
 
-      let params = { houseParams: paramSids, houseNo: houseSid ? houseSid.toString() : "" }
+      let params = {
+        houseParams: paramSids,
+        houseNo: houseSid ? houseSid.toString() : ""
+      }
+      if(this.queryForm.buildingDate) params['buildingDate'] = parseInt(this.queryForm.buildingDate)
+      if(this.queryForm.buildingArea) params['buildingArea'] = this.queryForm.buildingArea
+      if(this.queryForm.theme) params['theme'] = this.queryForm.theme
       console.log("过滤的查询参数:", params)
       return params
     },

+ 2 - 1
src/views/kxcSystem/functionManage/errorCorrection/widget.vue

@@ -186,12 +186,13 @@ export default {
         this.sourceName = this.config.iServerUrl.basicGISDataServer.dataSource //: "kxcgw"
         this.dataUrl = this.config.iServerUrl.basicGISDataServer.url
         if (dataSets) {
+          console.log("预测:",dataSets);
           let dataSet = dataSets.find(item => item.label === '标注')
           if (dataSet) {
             this.datasetName = this.sourceName + ':' + dataSet.name
             this.setName = dataSet.name
           } else {
-            this.$message.error('标注图层配置错误,请联系管理员处理!')
+            this.$message.error('标注图层配置错误,请联系管理员处理查看是否有该图层权限!')
           }
         }
       }

+ 4 - 11
src/views/kxcSystem/pipelineSystem/specialtyAnalysis/burstAnalysis/widget.vue

@@ -99,13 +99,12 @@
 <script>
 import { mapConfig } from '@/views/MapView/map.config'
 import { SuperMap, FeatureService } from '@supermap/iclient-ol'
-import { MultiPolygon, Point } from 'ol/geom'
+import { Point } from 'ol/geom'
 import { GeoJSON } from 'ol/format'
 import Feature from 'ol/Feature'
 import { Vector as VectorSource } from 'ol/source'
 import { Vector as VectorLayer } from 'ol/layer'
 import { Style, Circle, Icon, Fill, Stroke, Text } from 'ol/style'
-import * as turf from '@turf/turf'
 import { getCenter } from 'ol/extent'
 export default {
   props: ['data'],
@@ -150,7 +149,7 @@ export default {
   },
   watch: {
     // 监听面板是否被改变
-    '$store.state.map.P_editableTabsValue': function(val, oldVal) {
+    '$store.state.map.P_editableTabsValue': function (val, oldVal) {
       if (val == 'burstAnalysis') {
         this.vectorLayer.setVisible(true)
       } else {
@@ -337,7 +336,7 @@ export default {
       burstPoint.setStyle(
         new Style({
           image: new Icon({
-            src: require('../../../../../assets/images/burst.png')
+            src: require('@/assets/images/burst.png')
           })
         })
       )
@@ -643,19 +642,13 @@ export default {
           dataType = 'point'
           features = this.burstInfo.facilities
         }
-        console.log('输出pid:', pid)
         let panel = {
           path: pid,
           name: pid,
           pathId: pid,
           widgetid: 'HalfPanel',
           type: 'gis',
-          component: () =>
-            import(
-              '@/views/kxcSystem/pipelineSystem/specialtyAnalysis/burstAnalysis/' +
-                pid +
-                '/widget'
-            ),
+          component: () => Promise.resolve(require(`@/views/kxcSystem/pipelineSystem/specialtyAnalysis/burstAnalysis/${pid}/widget`).default),
           label: this.totalResultTable[i].name,
           meta: { title: this.totalResultTable[i].name },
           param: { dataType: dataType, features: features }

+ 2 - 7
src/views/kxcSystem/pipelineSystem/specialtyAnalysis/connectivityAnalysis/widget.vue

@@ -110,7 +110,7 @@ export default {
   },
   watch: {
     // 监听面板是否被改变
-    '$store.state.map.P_editableTabsValue': function(val, oldVal) {
+    '$store.state.map.P_editableTabsValue': function (val, oldVal) {
       if (val == 'connectivityAnalysis') {
         this.vectorLayer.setVisible(true)
       } else {
@@ -441,12 +441,7 @@ export default {
           pathId: pid,
           widgetid: 'HalfPanel',
           type: 'gis',
-          component: () =>
-            import(
-              '@/views/kxcSystem/pipelineSystem/specialtyAnalysis/connectivityAnalysis/' +
-                pid +
-                '/widget'
-            ),
+          component: () =>Promise.resolve(require(`@/views/kxcSystem/pipelineSystem/specialtyAnalysis/connectivityAnalysis/${pid}/widget`).default),
           label: this.totalResultTable[i].name,
           meta: { title: this.totalResultTable[i].name },
           param: { dataType: dataType, features: features }

+ 48 - 0
src/views/kxcSystem/pipelineSystem/specialtyAnalysis/sewageAnalysis/sewageAnalysisResult/widget.vue

@@ -0,0 +1,48 @@
+<template>
+  <div style="width:100%;height:100%">
+    <queryResult v-if="param" :param="param" :data="data"></queryResult>
+  </div>
+</template>
+
+<script>
+import queryResult from '@/views/kxcSystem/pipelineSystem/queryResult/widget'
+export default {
+  props: ['data'],
+  components: {
+    queryResult
+  },
+  data() {
+    return {
+      param: null
+    }
+  },
+  mounted() {
+    this.getParam()
+  },
+  watch: {
+    '$store.state.map.halfPanels': function () {
+      this.getParam()
+    }
+  },
+  methods: {
+    /**
+     * 获取数据
+     */
+    getParam() {
+      for (let index in this.$store.state.map.halfPanels) {
+        let item = this.$store.state.map.halfPanels[index]
+        if (item.com === 'sewageAnalysisResult') {
+          let dataType = item.param.dataType
+          let features = item.param.features
+          this.param = { dataType: dataType, allFeatures: features }
+          break
+        }
+      }
+    },
+  }
+
+}
+</script>
+
+<style>
+</style>

+ 456 - 0
src/views/kxcSystem/pipelineSystem/specialtyAnalysis/sewageAnalysis/widget.vue

@@ -0,0 +1,456 @@
+<template>
+  <!-- 排污分析 -->
+  <div class="query-container">
+    <div class="query-box">
+      <el-row>
+        <el-col :span="24">
+          <div class="item-head">
+            <span>分析条件</span>
+            <el-checkbox v-model="checked" style="margin-left:15px">缓冲区</el-checkbox>
+          </div>
+        </el-col>
+        <el-col :span="24">
+          <el-radio v-model="drawType" label="Circle">圆</el-radio>
+          <el-radio v-model="drawType" label="Box">矩形</el-radio>
+          <el-radio v-model="drawType" label="Polygon">多边形</el-radio>
+          <el-row v-if="checked" style="margin-top:15px">
+            <el-col :span="6" style="padding-right:5px">缓冲距离(米):</el-col>
+            <el-col :span="18">
+              <el-input-number size="small" v-model="bufferDistance" controls-position="right" @blur="checkBufferDistance" :step="10" :min="1" style="width:100%"></el-input-number>
+            </el-col>
+          </el-row>
+        </el-col>
+      </el-row>
+
+      <el-button type="primary" style="width:100%" size="small" @click="executeQuery" :loading="queryStatus">
+        <span v-if="queryStatus==false">查询</span>
+        <span v-else>正在查询中…</span>
+      </el-button>
+    </div>
+    <!-- 查询结果 -->
+    <div class="query-result">
+      <el-row>
+        <el-col :span="24">
+          <div class="item-head">查询结果</div>
+        </el-col>
+        <el-col :span="24">
+          <el-table :data="resultData" v-loading="queryStatus" :header-cell-style="{fontSize: '14px', fontWeight:'600',background:'#eaf1fd',color:'#909399'}" style="width: 100%">
+            <el-table-column prop="layer" align="center" label="名称"></el-table-column>
+            <el-table-column prop="number" align="center" label="数量(个)"></el-table-column>
+            <el-table-column align="center" label="操作">
+              <template slot-scope="scope">
+                <el-button type="text" @click="showQueryResultData()">查看</el-button>
+                <download-excel class="export-btn" :data="scope.row.data" :fields="scope.row.fields" type="xls" :name="getFileName(scope.row.layer)">
+                  <el-button type="text" @click="beforeExport(scope.row)">导出</el-button>
+                </download-excel>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-col>
+      </el-row>
+      <el-button type="danger" style="width:100%" size="small" @click="clearResult">清除结果</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import { mapConfig } from '@/views/MapView/map.config'
+import { SuperMap, FieldService, FeatureService } from '@supermap/iclient-ol'
+import Draw from 'ol/interaction/Draw'
+import { Vector as VectorSource } from 'ol/source'
+import { Vector as VectorLayer } from 'ol/layer'
+import { Style, Circle, Icon, Fill, RegularShape, Stroke, Text } from 'ol/style'
+import { GeoJSON, WFS } from 'ol/format'
+import { getFields } from '@/api/kxc/pipelineSystem'
+import { createBox } from 'ol/interaction/Draw'
+import * as turf from '@turf/turf'
+import { fromCircle as circleToPolygon } from 'ol/geom/Polygon'
+export default {
+  props: ['data'],
+  data() {
+    return {
+      checked: false,
+      bufferDistance: 50,
+      drawType: 'Circle',
+      drawFeature: null, // 绘制的图形要素
+      buffer: null, // 缓冲区要素
+      vectorLayer: null,
+      targetDataset: {},
+      fieldOnlyValue: [],
+      queryStatus: false,
+      resultData: [], // 结果概述
+      resFeatures: [], // 查询到的要素
+      form1: {},
+      pipeBuryTypes: [], //管线埋设方式选项
+      pipeMaterialTypes: [], // 管线材质选项
+      nodeAdjunct: [], // 附属物选项
+      nodeBuryTypes: [] // 特征选项
+    }
+  },
+  mounted() {
+    this.initData()
+    this.initDraw()
+  },
+  destroyed() {
+    if (this.draw) this.data.that.map.removeInteraction(this.draw)
+    this.data.that.map.removeLayer(this.vectorLayer)
+    this.$store.dispatch('map/delHalfPanels', 'facilitiesQueryResult')
+  },
+  watch: {
+    // 几何查询类型
+    checked(val, oldVal) {
+      this.initDraw()
+    },
+    drawType(val, oldVal) {
+      this.initDraw()
+    },
+    // 监听面板是否被改变
+    '$store.state.map.P_editableTabsValue': function (val, oldVal) {
+      if (val == 'sewageAnalysis') this.vectorLayer.setVisible(true)
+      else {
+        if (this.draw) this.data.that.map.removeInteraction(this.draw)
+        this.vectorLayer.setVisible(false)
+      }
+    }
+  },
+  methods: {
+    /**导出判断 */
+    beforeExport(row) {
+      if (row.data.length == 0) {
+        this.$message.warning('无数据导出!')
+        return
+      }
+      // 记录日志
+      this.$store.dispatch('gis/writeLog', {
+        operateModule: '排污分析',
+        operateContent: `导出对排污分析的结果,共导出数据${row.data.length}条`,
+        operateParams: ''
+      })
+    },
+    /**
+     * 获取导出文件的密级,以图层密级为准
+     */
+    getFileName(layerName) {
+      let securities = this.$store.state.permission.sysDics.serviceLevel
+      let securityClass = securities.find(item => {
+        return (
+          item.code.toString() == this.targetDataset.securityClass.toString()
+        )
+      })
+      let securityName = securityClass ? securityClass.value + '★' : ''
+      return `${securityName}${layerName}`
+    },
+    checkBufferDistance() {
+      if (!this.bufferDistance) {
+        this.bufferDistance = 1
+      }
+    },
+    initData() {
+      console.log("数据集::", mapConfig.iServerUrl.pipelineDataServer.dataSetInfo);
+      this.targetDataset = mapConfig.iServerUrl.pipelineDataServer.dataSetInfo.find(item => {
+        return item.label == '排水污水管线节点'
+      })
+      if (!this.targetDataset) this.$message.error("排水污水设施图层配置错误,请联系管理员处理查看是否有该图层权限!")
+      // 初始化显示图层
+      this.vectorLayer = new VectorLayer({
+        source: new VectorSource(),
+        style: new Style({
+          stroke: new Stroke({
+            width: 5,
+            color: '#ed1941'
+          }),
+          image: new Circle({
+            radius: 6,
+            stroke: new Stroke({
+              width: 2,
+              color: '#ed1941'
+            }),
+            fill: new Fill({
+              color: '#FFF'
+            })
+          })
+        })
+      })
+      this.data.that.map.addLayer(this.vectorLayer)
+    },
+    /**
+     * 初始化绘制组件
+     */
+    initDraw() {
+      this.vectorLayer.getSource().clear()
+      if (this.draw) this.data.that.map.removeInteraction(this.draw)
+      this.drawFeature = null
+      // 绘制组件
+      this.draw = new Draw({
+        source: this.vectorLayer.getSource(),
+        type: this.drawType == 'Box' ? 'Circle' : this.drawType,
+        geometryFunction: this.drawType == 'Box' ? createBox() : null,
+        style: new Style({
+          stroke: new Stroke({
+            lineDash: [10, 10],
+            color: '#0099ff',
+            width: 3
+          }),
+          fill: new Fill({
+            color: 'rgba(255, 255, 255,0.6)'
+          })
+        })
+      })
+      this.data.that.map.addInteraction(this.draw)
+      //结束绘制
+      this.draw.on('drawend', evt => {
+        this.data.that.map.removeInteraction(this.draw)
+        evt.feature.setStyle(
+          new Style({
+            stroke: new Stroke({
+              color: '#0099ff',
+              width: 3
+            }),
+            fill: new Fill({
+              color: 'rgba(255, 255, 255,0.6)'
+            }),
+            image: new Circle({
+              radius: 7,
+              stroke: new Stroke({
+                width: 3,
+                color: '#0099ff'
+              }),
+              fill: new Fill({
+                color: '#fff'
+              })
+            })
+          })
+        )
+        this.drawFeature = evt.feature
+      })
+    },
+    /**
+     * 要素缓冲
+     */
+    getBufferFeature(feature) {
+      let geometry = feature.getGeometry()
+      let fea = null
+      if (this.drawType == 'Circle') {
+        fea = turf.polygon(circleToPolygon(geometry).getCoordinates())
+      } else {
+        fea = turf.polygon(geometry.getCoordinates())
+      } // turf的面要素
+      let resultFeature = new GeoJSON().readFeature(
+        turf.buffer(fea, this.bufferDistance / 1000, { units: 'kilometers' })
+      )
+      resultFeature.setStyle(
+        new Style({
+          stroke: new Stroke({
+            color: '#0099ff',
+            width: 3
+          }),
+          fill: new Fill({
+            color: 'rgba(255, 255, 255,0.6)'
+          })
+        })
+      )
+      return resultFeature
+    },
+    /**
+     * 处理返回的结果
+     */
+    delQueryResult(serviceResult) {
+      if (serviceResult.type == 'processFailed') {
+        this.$message.error('获取结果失败!')
+        this.queryStatus = false
+        return
+      }
+      //获取返回的features数据
+      this.vectorLayer.getSource().clear()
+      let features = serviceResult.result.features.features
+      if (features.length >= 0) {
+        this.vectorLayer.getSource().addFeature(this.drawFeature)
+        if (this.checked) this.vectorLayer.getSource().addFeature(this.buffer)
+        this.vectorLayer.getSource().addFeatures(new GeoJSON().readFeatures(serviceResult.result.features))
+        this.resFeatures = features.map(item => {
+          item.properties['geometry'] = item.geometry
+          return item.properties
+        })
+        // 导出的字段信息
+        let fields = {}
+        if (this.targetDataset.type == 'line')
+          this.$store.state.common.PipeLineFields.forEach(item => {
+            fields[item.pipelineVal] = item.pipelineKey
+          })
+        else {
+          this.$store.state.common.PipePointFields.forEach(item => {
+            fields[item.pipelineVal] = item.pipelineKey
+          })
+        }
+        // 查询的结果
+        this.resultData = [
+          {
+            layer: "排污口设施",
+            number: serviceResult.result.featureCount,
+            data: this.resFeatures,
+            fields: fields
+          }
+        ]
+
+        const drawTypes = {
+          Circle: '圆',
+          Box: '矩形',
+          Polygon: '多边形'
+        }
+        // 记录日志
+        this.$store.dispatch('gis/writeLog', {
+          operateModule: '综合查询',
+          operateContent: `执行排污分析,分析的几何方式为:${drawTypes[this.drawType]}`,
+          operateParams: JSON.stringify(this.form1)
+        })
+      } else {
+        this.$message.info('未查询到结果!')
+      }
+      this.queryStatus = false // 查询完成状态
+    },
+    /**
+     * iserver几何查询
+     */
+    geoQuery() {
+      let geo = null
+      if (this.checked == true) {
+        geo = this.buffer.getGeometry()
+      } else {
+        if (this.drawType == 'Circle' && this.checked == false)
+          geo = circleToPolygon(this.drawFeature.getGeometry())
+        else geo = this.drawFeature.getGeometry()
+      }
+
+      this.queryStatus = true // 查询中状态
+      let geoQueryParam = new SuperMap.GetFeaturesByGeometryParameters({
+        toIndex: -1,
+        maxFeatures: 10000000,
+        geometry: geo,
+        attributeFilter: "ADJUNCT like '排水口'",
+        datasetNames: [`${mapConfig.iServerUrl.pipelineDataServer.dataSource}:${this.targetDataset.name}`],
+        spatialQueryMode: 'INTERSECT' // 相交空间查询模式
+      })
+      const url = mapConfig.iServerUrl.pipelineDataServer.url
+      new FeatureService(url).getFeaturesByGeometry(
+        geoQueryParam,
+        serviceResult => {
+          this.delQueryResult(serviceResult)
+        }
+      )
+    },
+    /**
+     * 执行查询
+     */
+    executeQuery() {
+      if (!this.targetDataset || Object.keys(this.targetDataset).length == 0) {
+        this.$message.error('排水污水设施图层配置错误,请联系管理员处理查看是否有该图层权限!')
+        return
+      }
+      if (!this.drawFeature && !this.buffer) {
+        this.$message.error('请先绘制几何图形!')
+        return
+      } else {
+        if (this.checked == true) this.buffer = this.getBufferFeature(this.drawFeature)
+        this.geoQuery()
+      }
+    },
+    /**
+     * 清除结果
+     */
+    clearResult() {
+      this.resultData = []
+      this.vectorLayer.getSource().clear()
+      this.initDraw()
+    },
+    showQueryResultData() {
+      var info = {
+        path: 'sewageAnalysisResult',
+        name: 'sewageAnalysisResult',
+        pathId: 'sewageAnalysisResult',
+        widgetid: 'HalfPanel',
+        type: 'gis',
+        component: () => import(`@/views/kxcSystem/pipelineSystem/specialtyAnalysis/sewageAnalysis/sewageAnalysisResult/widget`),
+        label: '排污分析结果',
+        meta: { title: '排污分析结果' },
+        param: { dataType: this.targetDataset.type, features: this.resFeatures }
+      }
+      this.$store.dispatch('map/delHalfPanels', 'facilitiesQueryResult')
+      this.$store.dispatch('map/changeMethod', info)
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.query-container {
+  .query-box {
+    width: 100%;
+    box-sizing: border-box;
+    padding: 10px;
+    >>> .el-row {
+      font-size: 14px;
+      font-family: Source Han Sans CN;
+      font-weight: 400;
+      line-height: 32px;
+      margin-bottom: 15px;
+      .form1 {
+        .el-form-item {
+          margin-right: 0;
+          margin-bottom: 5px;
+        }
+      }
+    }
+    .btn-col {
+      .el-button--small {
+        padding: 9px 0px;
+      }
+      button {
+        width: 42px;
+        float: left;
+        margin-left: 5px !important;
+        &:focus {
+          background: #eaf1fd;
+          border-color: #abc7f5;
+          color: #2d74e7;
+        }
+      }
+    }
+  }
+  .query-result {
+    width: 100%;
+    box-sizing: border-box;
+    padding: 10px;
+    >>> .el-row {
+      font-size: 14px;
+      font-family: Source Han Sans CN;
+      font-weight: 400;
+      line-height: 32px;
+      margin-bottom: 15px;
+    }
+  }
+  .item-head {
+    font-size: 14px;
+    font-family: Source Han Sans CN;
+    color: #333333;
+    line-height: 18px;
+    margin: 10px 0;
+    font-weight: 600;
+
+    &::before {
+      content: '';
+      display: inline-block;
+      width: 3px;
+      height: 12px;
+      background: #2a77f7;
+      vertical-align: middle;
+      margin-right: 5px;
+    }
+  }
+  >>> .el-radio {
+    margin-right: 20px;
+  }
+  .export-btn {
+    display: inline-block;
+  }
+}
+</style>

+ 4 - 0
src/views/kxcSystem/pipelineSystem/statisticalAnalysis/pipeLineStatistical/css.scss

@@ -89,6 +89,10 @@
         .echartSta {
           width: 100%;
           height: 33.3%;
+          div{
+            width: 370px !important;
+            height: 100%;
+          }
         }
       }
     }

+ 13 - 6
src/views/kxcSystem/pipelineSystem/statisticalAnalysis/pipeLineStatistical/index.vue

@@ -2,8 +2,7 @@
   <div class="statisticContainer">
     <div class="leftContainer">
       <div class="topContainer">
-        <MiniMap :statisticMode='selectType' :statisticCondition='staCondition' :returnFunction='returnFunction'
-                 :statisticType='statisticType' :miniMap="miniMap"></MiniMap>
+        <MiniMap :statisticMode='selectType' :statisticCondition='staCondition' :returnFunction='returnFunction' :statisticType='statisticType' :miniMap="miniMap"></MiniMap>
         <div class="queryTools">
           <el-radio v-model="selectType" label="1">全图范围</el-radio>
           <el-radio v-model="selectType" label="5">绘制范围</el-radio>
@@ -36,7 +35,7 @@
         <el-row>
           <el-col :span="24">
             <el-tabs type="border-card" class="card-statistic" v-model="activeName" @tab-click="handleClick">
-              <el-tab-pane class="pane-statistic" name='line' label="线图层">
+              <el-tab-pane class="pane-statistic" name='line' label="线图层" :disabled="queryStatus">
                 <!-- <span slot="label"><i class="el-icon-date"></i>线图层</span> -->
                 <div class="lineLayerSta statistic">
                   <el-select v-model="pipeLineType" class="layer-select" placeholder="请选择">
@@ -50,7 +49,7 @@
                   </div>
                 </div>
               </el-tab-pane>
-              <el-tab-pane class="pane-statistic" name='point' label="点图层">
+              <el-tab-pane class="pane-statistic" name='point' label="点图层" :disabled="queryStatus">
                 <div class="pointLayerSta statistic">
                   <el-select v-model="pipePointType" class="layer-select" placeholder="请选择">
                     <el-option v-for="item in pipePointTypes" :key="item.value" :label="item.label" :value="item.value">
@@ -58,12 +57,20 @@
                   </el-select>
                   <div class="echartStatistic">
                     <div class="diamStatistic echartSta" ref="pointDiamStatistic" id="pointDiamStatistic" v-loading="queryStatus"></div>
-                    <div class="materialStatistic echartSta" ref="pointMaterialStatistic" id="pointMaterialStatistic"
-                         v-loading="queryStatus"></div>
+                    <div class="materialStatistic echartSta" ref="pointMaterialStatistic" id="pointMaterialStatistic" v-loading="queryStatus"></div>
                     <div class="typeStatistic echartSta" ref="pointTypeStatistic" id="pointTypeStatistic" v-loading="queryStatus"></div>
                   </div>
                 </div>
               </el-tab-pane>
+              <el-tab-pane class="pane-statistic" name='other' label="其他" :disabled="queryStatus">
+                <div class="pointLayerSta statistic">
+                  <div class="echartStatistic">
+                    <div class="diamStatistic echartSta" ref="accident" id="accident" v-loading="queryStatus"></div>
+                    <div class="materialStatistic echartSta" ref="gas" id="gas" v-loading="queryStatus"></div>
+                    <div class="materialStatistic echartSta" ref="installTime" id="installTime" v-loading="queryStatus"></div>
+                  </div>
+                </div>
+              </el-tab-pane>
             </el-tabs>
           </el-col>
         </el-row>

+ 144 - 17
src/views/kxcSystem/pipelineSystem/statisticalAnalysis/pipeLineStatistical/template.js

@@ -106,7 +106,12 @@ export default {
      * 鼠标切换tab事件 
      */
     handleClick(tab, event) {
-      console.log('1111111111', tab, tab.name, event, this.$refs.pointDiamStatistic.style.width);
+      // console.log('1111111111', tab, tab.name, event, this.$refs.pointDiamStatistic.style.width);
+      if (tab.name == 'other') {
+        this.accidentStatistical()
+        this.gasStatistical()
+        this.installTimeStatistical()
+      }
     },
 
     /**
@@ -436,12 +441,7 @@ export default {
         toolbox: {
           show: true,
           feature: {
-            // dataZoom: {
-            //     yAxisIndex: 'none'
-            // },
-            // dataView: {readOnly: false},
             magicType: { type: ['line', 'bar'] },
-            // restore: {},
             saveAsImage: {}
           }
         },
@@ -484,24 +484,13 @@ export default {
         },
         xAxis: {
           type: 'category',
-          //boundaryGap: false,
-          //坐标轴文字倾斜
-          // axisLabel: {  
-          //   interval:0,  
-          //   rotate:40  
-          // } ,
           data: dataName
         },
         // 工具
         toolbox: {
           show: true,
           feature: {
-            // dataZoom: {
-            //     yAxisIndex: 'none'
-            // },
-            // dataView: {readOnly: false},
             magicType: { type: ['line', 'bar', 'pie'] },
-            // restore: {},
             saveAsImage: {}
           }
         },
@@ -654,5 +643,143 @@ export default {
       });
     },
 
+    /**
+     * 区域管网事故统计
+     */
+    accidentStatistical() {
+      const dataName = ['火灾', '爆炸', '泄露', '爆燃', '设备故障']
+      const dataValue = [4, 2, 6, 4, 14];
+      const option = this.getClassifyoption("管网事故统计", dataName, dataValue)
+      const chartDom = this.$refs.accident;
+      const myChart = echarts.init(chartDom);
+      this.$nextTick(() => {
+        myChart.clear()
+        option && myChart.setOption(option);
+        elementResizeDetectorMaker().listenTo(this.$refs.accident, () => {
+          this.$nextTick(myChart.resize)
+        });
+      })
+    },
+    /**
+     * 用气量
+     */
+    gasStatistical() {
+      const chartDom = this.$refs.gas;
+      const myChart = echarts.init(chartDom);
+      const option = {
+        title: {
+          text: '区域用气量',
+          left: 'left',
+          textStyle: {
+            color: '#2D74E7',
+            fontSize: '3.2rem',
+          }
+        },
+        tooltip: {
+          trigger: 'axis'
+        },
+        color: ['#188df0'],
+        xAxis: {
+          type: 'category',
+          boundaryGap: false,
+          data: [this.getDay(-5), this.getDay(-4), this.getDay(-3), this.getDay(-2), this.getDay(-1), this.getDay(0)]
+        },
+        yAxis: {
+          type: 'value'
+        },
+        series: [
+          {
+            data: [224, 218, 135, 147, 260,300],
+            type: 'line'
+          }
+        ]
+      };
+      this.$nextTick(() => {
+        myChart.clear()
+        option && myChart.setOption(option);
+        elementResizeDetectorMaker().listenTo(this.$refs.gas, () => {
+          this.$nextTick(myChart.resize)
+        });
+      })
+    },
+    /**
+     * 安装时间统计
+     */
+    installTimeStatistical() {
+      const chartDom = this.$refs.installTime;
+      const myChart = echarts.init(chartDom);
+      const option = {
+        title: {
+          text: '附属设施安装时间',
+          subtext: '',
+          left: 'left',
+          textStyle: {
+            color: '#2D74E7',
+            fontSize: '3.2rem',
+          }
+        },
+        tooltip: {
+          trigger: 'item'
+        },
+        // 工具
+        toolbox: {
+          show: true,
+          feature: {
+            saveAsImage: {}
+          }
+        },
+        color:['#188df0', '#207bb8', '#6ba7f0','#1591b2','#4bc4c4','#97bace'],
+        series: [
+          {
+            name: '附属设施安装时间',
+            type: 'pie',
+            radius: '50%',
+            data: [
+              { value: 1048, name: '2016年' },
+              { value: 735, name: '2017年' },
+              { value: 580, name: '2018年' },
+              { value: 484, name: '2019年' },
+              { value: 300, name: '2020年' }
+            ],
+            emphasis: {
+              itemStyle: {
+                shadowBlur: 10,
+                shadowOffsetX: 0,
+                shadowColor: 'rgba(0, 0, 0, 0.5)'
+              }
+            }
+          }
+        ]
+      };
+
+      this.$nextTick(() => {
+        myChart.clear()
+        option && myChart.setOption(option);
+        elementResizeDetectorMaker().listenTo(this.$refs.installTime, () => {
+          this.$nextTick(myChart.resize)
+        });
+      })
+    },
+    /**
+     * 获取前几天
+     */
+    getDay(day) {
+      const today = new Date();
+      const targetday_milliseconds = today.getTime() + 1000 * 60 * 60 * 24 * day;
+      today.setTime(targetday_milliseconds); //注意,这行是关键代码
+      const doHandleMonth = function (month) {
+        var m = month;
+        if (month.toString().length == 1) {
+          m = "0" + month;
+        }
+        return m;
+      }
+      // const tYear = today.getFullYear();
+      let tMonth = today.getMonth();
+      let tDate = today.getDate();
+      tMonth = doHandleMonth(tMonth + 1);
+      tDate = doHandleMonth(tDate);
+      return tMonth + "-" + tDate;
+    }
   }
 }

+ 34 - 37
src/views/login/index.vue

@@ -131,7 +131,7 @@ export default {
             }
           }
         } else {
-          console.log('error submit!!')
+          console.log('表单验证未通过!')
           return false
         }
       })
@@ -302,14 +302,11 @@ export default {
             label: v["name"]
           }));
           this.selectCert = this.options[0];
-          // this.formData.userName = this.selectCert["value"];
           this.$set(this.formData, 'userName', this.selectCert["value"])
         } else {
           console.error('CA登录获取认证信息失败!')
-          // throw new Error("CA登录获取认证信息失败!");
         }
       } catch (error) {
-        // this.$errorMessage(error, "CA登录获取认证信息失败!");
         console.error('CA登录获取认证信息失败!')
         return false;
       }
@@ -329,32 +326,41 @@ export default {
     handleDataCheck() {
       let containerURI = null;
       try {
-        containerURI = this.device.getContainerUriByCertSN(
-          this.selectCert.sn,
-          false
-        );
+        containerURI = this.device.getContainerUriByCertSN(this.selectCert.sn, false);
       } catch (error) {
-        console.error('服务证书获取失败,请确认介质是否插入!')
+        this.$message.error('服务证书获取失败,请确认介质是否插入!')
         return false;
       }
-      try {
-        const returnData = this.device.login2(
-          containerURI,
-          this.formData.password
-        );
-        if (returnData === -1) {
-          // throw new Error("证书key已暂锁!");
-          this.$message.error('证书key已暂锁!')
-        }
-        if (returnData !== 0 && returnData !== -1) {
-          // throw new Error(`密码不正确!(剩余输入次数${returnData})!`);
-          this.$message.error(`密码不正确!(剩余输入次数${returnData})!`)
-        }
-      } catch (error) {
-        // this.$errorMessage(error, "介质设备PIN码(密码)不正确!");
-        this.$message.error(error, "介质设备PIN码(密码)不正确!")
-        return false;
+      const returnData = this.device.login2(
+        containerURI,
+        this.formData.password
+      );
+      if (returnData == -1) {
+        this.$message.error('证书key已暂锁!')
       }
+      if (returnData != 0 && returnData != -1) {
+        this.$message.error(`密码不正确!(剩余输入次数${returnData})!`)
+      }
+      // try {
+      //   console.log('准备执行this.device.login2');
+      //   const returnData = this.device.login2(
+      //     containerURI,
+      //     this.formData.password
+      //   );
+      //   console.log('--->,returnData', returnData);
+      //   if (returnData === -1) {
+      //     // throw new Error("证书key已暂锁!");
+      //     this.$message.error('证书key已暂锁!')
+      //   }
+      //   if (returnData !== 0 && returnData !== -1) {
+      //     // throw new Error(`密码不正确!(剩余输入次数${returnData})!`);
+      //     this.$message.error(`密码不正确!(剩余输入次数${returnData})!`)
+      //   }
+      // } catch (error) {
+      //   // this.$errorMessage(error, "介质设备PIN码(密码)不正确!");
+      //   this.$message.error(error, "介质设备PIN码(密码)不正确!")
+      //   return false;
+      // }
       this.requestAction();
     },
     getRandomNum(size) {
@@ -391,15 +397,6 @@ export default {
         signedData: signData,
         authType: 'K'
       };
-      // 测试
-      // const params = {
-      //   k_username: "sad9sc",
-      //   certKey: 'certKey',
-      //   certSerial: 'thisselectCertsn',
-      //   originData: this.getRandomNum(20),
-      //   signedData: '5s559d5s2sd5',
-      //   authType: 'K'
-      // };
       this.$store.dispatch('user/login', params).then(res => {
         this.$router.push({ path: '/map' })
         this.loading = false
@@ -431,7 +428,7 @@ export default {
       await getLoginType().then(res => {
         if (res.code == 1) {
           this.loginEvn = res.result.loginType
-          this.$store.commit('permission/SET_ENV',this.loginEvn)
+          this.$store.commit('permission/SET_ENV', this.loginEvn)
           if (res.result.loginType == 'K') {
             this.leftBoxClass = ['b_box', 'b-left', 'loginB']
             // B网
@@ -443,7 +440,7 @@ export default {
           }
         }
       }).catch(error => {
-
+        console.log('获取网络环境出错!', error);
       })
     }
   }

+ 42 - 31
src/views/login/loginUt/loginB/Device_SKF.js

@@ -4,6 +4,7 @@
  */
 
 /* eslint-disable */
+import { MessageBox, Message } from 'element-ui'
 import { enroll_webcall_service } from './enroll_service_wrapper'
 import { signx_webcall_service } from './signx_service_wrapper'
 
@@ -32,7 +33,7 @@ export const Imp_SKF = function Imp_SKF() {
   /**
      * 证书操作对象
      */
-  this.getCertX = function() {
+  this.getCertX = function () {
     if (this.g_CertX != null) {
       return this.g_CertX
     } else {
@@ -49,7 +50,7 @@ export const Imp_SKF = function Imp_SKF() {
   /**
      * 签名对象
      */
-  this.getSignX = function() {
+  this.getSignX = function () {
     if (this.g_SignX != null) {
       return this.g_SignX
     } else {
@@ -67,7 +68,7 @@ export const Imp_SKF = function Imp_SKF() {
      * 初始化实现类
      *
      */
-  this.init = function() {
+  this.init = function () {
     this.getCertX()
     this.getSignX()
 
@@ -80,7 +81,7 @@ export const Imp_SKF = function Imp_SKF() {
      * 				text - 设备名称
      *          	value - 设备下标
      */
-  this.enumDevice = function() {
+  this.enumDevice = function () {
     var deviceCount = this.g_CertX.GetDevCount()
     if (deviceCount == -1) {
       return 0
@@ -108,7 +109,7 @@ export const Imp_SKF = function Imp_SKF() {
      *
      * @return 应用总数,无应用返回0
      */
-  this.getAppCount = function() {
+  this.getAppCount = function () {
     var appCount = this.g_CertX.GetAppCount(this.device_URI)
     if (appCount == -1) {
       appCount = 0
@@ -121,7 +122,7 @@ export const Imp_SKF = function Imp_SKF() {
      * @return appList - text - 应用名
      *            value - 应用下标
      */
-  this.enumAppList = function() {
+  this.enumAppList = function () {
     var appCount = this.g_CertX.GetAppCount(this.device_URI)
     if (appCount == -1) {
       return 0
@@ -144,7 +145,7 @@ export const Imp_SKF = function Imp_SKF() {
      * 设置device_URI
      * @param selectedDevice 选中的设备option
      */
-  this.setDevice = function(selectedDevice) {
+  this.setDevice = function (selectedDevice) {
     var index = selectedDevice.value
     if (index !== null && index !== '') {
       this.device_URI = this.g_CertX.GetDevUri(selectedDevice.value)
@@ -156,7 +157,7 @@ export const Imp_SKF = function Imp_SKF() {
   /**
      * 获取设备总数
      */
-  this.getDevCount = function() {
+  this.getDevCount = function () {
     var devCount = this.g_CertX.GetDevCount()
     if (devCount == -1) {
       devCount = 0
@@ -167,7 +168,7 @@ export const Imp_SKF = function Imp_SKF() {
   /**
      * @param appIndex 应用下标
      */
-  this.setAppUri = function(appIndex) {
+  this.setAppUri = function (appIndex) {
     if (appIndex !== null && appIndex !== '') {
       this.app_URI = this.g_CertX.GetAppUri(this.device_URI, appIndex)
     } else {
@@ -180,7 +181,7 @@ export const Imp_SKF = function Imp_SKF() {
      *
      * @param appIndex 应用下标
      */
-  this.getAppUri = function(appIndex) {
+  this.getAppUri = function (appIndex) {
     if (appIndex !== null && appIndex !== '') {
       this.app_URI = this.g_CertX.GetAppUri(this.device_URI, appIndex)
     } else {
@@ -192,7 +193,7 @@ export const Imp_SKF = function Imp_SKF() {
   /**
      * 查询设备序列号
      */
-  this.getDevSerialNumber = function() {
+  this.getDevSerialNumber = function () {
     return this.g_CertX.GetDevSerialNumber(this.device_URI)
   }
 
@@ -201,7 +202,7 @@ export const Imp_SKF = function Imp_SKF() {
      * @param bsPasswd 应用PIN码
      * @return true ; false
      */
-  this.login = function(bsPasswd) {
+  this.login = function (bsPasswd) {
     return this.g_CertX.LoginApp(this.app_URI, bsPasswd)
   }
 
@@ -210,14 +211,14 @@ export const Imp_SKF = function Imp_SKF() {
      * @param bsPasswd 应用PIN码
      * @return true ; false
      */
-  this.login2 = function(appUri, bsPasswd) {
+  this.login2 = function (appUri, bsPasswd) {
     return this.g_SignX.LoginApp(appUri, bsPasswd)
   }
 
   /**
      * @author liujf
      */
-  this.loginOut_liujf = function(appUri) {
+  this.loginOut_liujf = function (appUri) {
     return this.g_CertX.LogOutApp(appUri)
   }
 
@@ -228,7 +229,7 @@ export const Imp_SKF = function Imp_SKF() {
      * @param dwKeyLen  密钥长度 只对RSA有效
      * @return pbsPubB64 密钥对公钥的Base64编码信息
      */
-  this.genKeyPair = function(dwKeyType, dwKeySpec, dwKeyLen) {
+  this.genKeyPair = function (dwKeyType, dwKeySpec, dwKeyLen) {
     return this.g_CertX.GenSignKeyPair(this.container_URI, dwKeyType, dwKeySpec, dwKeyLen)
   }
 
@@ -238,7 +239,7 @@ export const Imp_SKF = function Imp_SKF() {
      * @param bsSplit 分隔符 一般为','
      * @param dwKeyLen  密钥长度 只对RSA有效
      */
-  this.genCertReq = function(dwKeyType, dwKeySpec, dwKeyLen, certDN, bsSplit) {
+  this.genCertReq = function (dwKeyType, dwKeySpec, dwKeyLen, certDN, bsSplit) {
     this.genKeyPair(dwKeyType, dwKeySpec, dwKeyLen)
     return this.g_CertX.GenPkcs10Req(this.container_URI, certDN, bsSplit)
   }
@@ -247,7 +248,7 @@ export const Imp_SKF = function Imp_SKF() {
      * 创建容器
      * @param containerName 容器名称
      */
-  this.createContainer = function(containerName) {
+  this.createContainer = function (containerName) {
     var ret = this.g_CertX.CreateContainer(this.app_URI, containerName)
     if (ret == 0) {
       this.container_URI = this.app_URI + '|' + containerName
@@ -271,7 +272,7 @@ export const Imp_SKF = function Imp_SKF() {
      * 		证书信息之间默认使用'|'分割,各个证书之间使用外部传入的参数分割。形如
      * 		sha1(1)|sha256(1)|snDec(1)|snHex(1)#sha1(2)|sha256(2)|snDec(2)|snHex(2)
      */
-  this.getAllCerts = function(cert_flag_bits, separator) {
+  this.getAllCerts = function (cert_flag_bits, separator) {
     if (separator == null) {
       separator = CONTAINER_INFO_SEPARATOR
     }
@@ -286,7 +287,7 @@ export const Imp_SKF = function Imp_SKF() {
      *
      * @return 证书容器名称,为找到返回null
      */
-  this.getCertUriByCertSN = function(bsCertSN, beHex) {
+  this.getCertUriByCertSN = function (bsCertSN, beHex) {
     var snflag = parseInt('00000100', 2) // 获取十进制系列号
     if (beHex) {
       snflag = parseInt('00001000', 2) // 获取十六进制系列号
@@ -315,7 +316,7 @@ export const Imp_SKF = function Imp_SKF() {
      *
      * @return 证书容器名称,为找到返回null
      */
-  this.getContainerUriByCertSN = function(bsCertSN, beHex) {
+  this.getContainerUriByCertSN = function (bsCertSN, beHex) {
     var certUri = this.getCertUriByCertSN(bsCertSN, beHex)
     return certUri.substring(0, certUri.lastIndexOf('|'))
   }
@@ -333,13 +334,13 @@ export const Imp_SKF = function Imp_SKF() {
      *
      * @return base64编码证书,若未找到,反馈空字符串
      */
-  this.getCertValueBySn = function(bsCertSN, certType, beHex) {
+  this.getCertValueBySn = function (bsCertSN, certType, beHex) {
     var containerUri = this.getContainerUriByCertSN(bsCertSN, beHex)
 
     return this.g_SignX.GetCert(containerUri, certType)
   }
 
-  this.getDuplicateCertValueBySn = function(bsCertSN, certType, beHex) {
+  this.getDuplicateCertValueBySn = function (bsCertSN, certType, beHex) {
     var containerUri = this.getContainerUriByCertSN(bsCertSN, beHex)
 
     return this.g_SignX.DuplicateCert(containerUri, certType)
@@ -353,7 +354,7 @@ export const Imp_SKF = function Imp_SKF() {
      *
      * @return 容器中证书序列号数组
      */
-  this.enumSNList = function(snflag, separator) {
+  this.enumSNList = function (snflag, separator) {
     var certInfoStr = this.getAllCerts(snflag, separator)
     var certInfos = certInfoStr.split(separator)
 
@@ -384,7 +385,7 @@ export const Imp_SKF = function Imp_SKF() {
      *
      * @return true:存在;false:不存在
      */
-  this.checkCertExists = function(bsCertSN, beHex) {
+  this.checkCertExists = function (bsCertSN, beHex) {
     var container = this.getContainerUriByCertSN(bsCertSN, beHex)
     if (container != null && container != '') {
       return true
@@ -399,7 +400,7 @@ export const Imp_SKF = function Imp_SKF() {
      * @param	appUri 应用uri
      * @param	containerName 容器名称
      */
-  this.deleteContainer = function(appUri, containerName) {
+  this.deleteContainer = function (appUri, containerName) {
     return this.g_CertX.DeleteContainer(appUri, containerName)
   }
 
@@ -413,7 +414,7 @@ export const Imp_SKF = function Imp_SKF() {
      * @param containerURI
      * 			容器URI
      */
-  this.doInstall = function(lraInfo, sigCert, containerURI) {
+  this.doInstall = function (lraInfo, sigCert, containerURI) {
     var isDouble = false // 是否是双证书
     var isEnvelopd = false // 是否为密钥不落地
     var encCert = null
@@ -446,7 +447,7 @@ export const Imp_SKF = function Imp_SKF() {
      * 安装证书
      * @param certValue BASE64证书
      */
-  this.installCert = function(containerURI, certValue) {
+  this.installCert = function (containerURI, certValue) {
     this.g_CertX.ImportX509Cert(containerURI, certValue)
   }
 
@@ -454,7 +455,7 @@ export const Imp_SKF = function Imp_SKF() {
      * 安装pfx证书
      * @param certValue BASE64证书
      */
-  this.installPfxCert = function(containerURI, certPfxValue) {
+  this.installPfxCert = function (containerURI, certPfxValue) {
     this.g_CertX.ImportPfxCert(containerURI, certPfxValue, '123456')
   }
 
@@ -463,7 +464,7 @@ export const Imp_SKF = function Imp_SKF() {
      * @param certValue BASE64加密证书
      * @param encKey 封装的加密密钥对 ASN1结构
      */
-  this.installEncCert = function(containerURI, certValue, encKey) {
+  this.installEncCert = function (containerURI, certValue, encKey) {
     this.g_CertX.ImportEncKeyPair(containerURI, encKey)
     this.installCert(containerURI, certValue)
   }
@@ -482,7 +483,7 @@ export const Imp_SKF = function Imp_SKF() {
      * @return  pbsSignBase64
      * 				base64格式的p7签名数据
      */
-  this.signP7ByCertSN = function(certSn, bsSrcData, includeSrcData, pinCode) {
+  this.signP7ByCertSN = function (certSn, bsSrcData, includeSrcData, pinCode) {
     var signdData = null
 
     // 根据序列号找到容器名称
@@ -517,10 +518,15 @@ export const Imp_SKF = function Imp_SKF() {
      * @return  成功返回文本签名数据,失败返回空
      *
      */
-  this.signData = function(certSn, dataBase64, pinCode, beHex) {
+  this.signData = function (certSn, dataBase64, pinCode, beHex) {
     // 根据序列号找到容器名称
     var containUri = this.getContainerUriByCertSN(certSn, beHex)
     if (containUri == null || containUri == '') {
+      Message({
+        message: "证书签名失败,介质中未找到序列号'" + certSn + "'" + '所在的容器!',
+        type: 'error',
+        duration: 3 * 1000
+      });
       throw new Error("证书签名失败,介质中未找到序列号'" + certSn + "'" + '所在的容器!')
     }
 
@@ -529,6 +535,11 @@ export const Imp_SKF = function Imp_SKF() {
       try {
         this.g_SignX.LoginApp(containUri, pinCode)
       } catch (e) {
+        Message({
+          message: '介质设备PIN码(密码)不正确!',
+          type: 'error',
+          duration: 3 * 1000
+        });
         throw new Error('介质设备PIN码(密码)不正确!')
       }
     }

+ 1 - 3
src/views/login/loginUt/loginB/enroll_service_wrapper.js

@@ -1,4 +1,3 @@
-// import Notify from '@/utils/notify'
 
 import { Thrift } from './thrift0.11'
 import { enroll_serviceClient } from './enroll_service'
@@ -45,8 +44,7 @@ const enroll_service_thrift = {
     if (this._callback != null) {
       this._callback(retValue)
     } else {
-        // Notify.info(`调用接口:${this.callback_message.caller.name}错误,错误消息:${retValue.error}`)
-        console.error(`调用接口:${this.callback_message.caller.name}错误,错误消息:${retValue.error}`);
+        console.log(`调用接口:${this.callback_message.caller.name}错误,错误消息:${retValue.error}`)
     }
   },
 

+ 24 - 25
src/views/login/loginUt/loginB/signx_service_wrapper.js

@@ -1,4 +1,4 @@
-// import Notify from '@/utils/notify'
+
 import { Thrift } from './thrift0.11'
 import { signx_serviceClient } from './signx_service'
 
@@ -19,15 +19,15 @@ const signx_service_thrift = {
   FAILED: -1, // 失败
 
   // 连接服务
-  connect_service: function(ip, port) {
+  connect_service: function (ip, port) {
     this._transport = new Thrift.TXHRTransport('http://' + ip + ':' + port.toString()),
-    this._mp = new Thrift.Multiplexer(),
-    this._client = this._mp.createClient(this._name, signx_serviceClient, this._transport),
-    this._sessionid = this.GetSessionID()
+      this._mp = new Thrift.Multiplexer(),
+      this._client = this._mp.createClient(this._name, signx_serviceClient, this._transport),
+      this._sessionid = this.GetSessionID()
   },
 
   // SSL安全连接服务
-  connect_service_with_ssl: function(ip, port) {
+  connect_service_with_ssl: function (ip, port) {
     this._transport = new Thrift.TXHRTransport('https://' + ip + ':' + port.toString())
     this._mp = new Thrift.Multiplexer()
     this._client = this._mp.createClient(this._name, signx_serviceClient, this._transport)
@@ -35,22 +35,21 @@ const signx_service_thrift = {
   },
 
   // 设置错误值回调接口
-  SetCallback: function(callback) {
+  SetCallback: function (callback) {
     this._callback = callback
   },
 
   // 服务返回值 {'result':'0', 'value':'xxxx', 'error':'xxxx'}
-  callback_message: function(retValue) {
+  callback_message: function (retValue) {
     if (this._callback != null) {
       this._callback(retValue)
     } else {
-        // Notify.info(`调用接口:${this.callback_message.caller.name}错误,错误消息:${retValue.error}`)
-        console.error(`调用接口:${this.callback_message.caller.name}错误,错误消息:${retValue.error}`);
+      console.log(`调用接口:${this.callback_message.caller.name}错误,错误消息:${retValue.error}`)
     }
   },
 
   // 服务的版本号
-  GetVersion: function() {
+  GetVersion: function () {
     var retValue = this._client.version()
     if (retValue.result == this.SUCCESS) {
       return retValue.value
@@ -59,7 +58,7 @@ const signx_service_thrift = {
   },
 
   // 获取SessionID
-  GetSessionID: function() {
+  GetSessionID: function () {
     var retValue = this._client.regist()
     if (retValue.result == this.SUCCESS) {
       return retValue.value
@@ -68,7 +67,7 @@ const signx_service_thrift = {
   },
 
   // 登陆APP
-  LoginApp: function(app_uri, app_pin) {
+  LoginApp: function (app_uri, app_pin) {
     var retValue = this._client.login(this._sessionid, app_uri, app_pin)
     if (retValue.result == this.SUCCESS) {
       return retValue.result
@@ -79,7 +78,7 @@ const signx_service_thrift = {
   },
 
   // 注销APP
-  LogOutApp: function(app_uri) {
+  LogOutApp: function (app_uri) {
     var retValue = this._client.logout(this._sessionid, app_uri)
     if (retValue.result == this.SUCCESS) {
       return retValue.result
@@ -90,14 +89,14 @@ const signx_service_thrift = {
   },
 
   // 数据签名
-  SignData: function(con_uri, data_json) {
+  SignData: function (con_uri, data_json) {
     var retValue
     /*
         if (JSON.parse(data_json).type == "1") {
             retValue = this._client.signdata(this._sessionid, con_uri, data_json);
         }
         else {
-		*/
+    */
     retValue = this._client.signdata(this._sessionid, con_uri + '|sig', data_json)
     // }
     if (retValue.result == this.SUCCESS) {
@@ -109,7 +108,7 @@ const signx_service_thrift = {
   },
 
   // 验证签名
-  VerifyData: function(con_uri, src_data_b64, signed_data_b64) {
+  VerifyData: function (con_uri, src_data_b64, signed_data_b64) {
     var retValue = this._client.verify_signdata(this._sessionid, con_uri + '|sig', src_data_b64, signed_data_b64)
     if (retValue.result == this.SUCCESS) {
       return retValue.result
@@ -120,7 +119,7 @@ const signx_service_thrift = {
   },
 
   // 数据签名pkcs7
-  SignMessage: function(con_uri, data_b64, b_attach_data) {
+  SignMessage: function (con_uri, data_b64, b_attach_data) {
     var retValue = this._client.signmessage(this._sessionid, con_uri + '|sig', data_b64, b_attach_data)
     if (retValue.result == this.SUCCESS) {
       return retValue.value
@@ -131,7 +130,7 @@ const signx_service_thrift = {
   },
 
   // 验证签名pkcs7
-  VerifyMessage: function(con_uri, src_data_b64, signed_data_b64) {
+  VerifyMessage: function (con_uri, src_data_b64, signed_data_b64) {
     var retValue = this._client.verify_message(this._sessionid, con_uri + '|sig', src_data_b64, signed_data_b64)
     if (retValue.result == this.SUCCESS) {
       return retValue.result
@@ -142,7 +141,7 @@ const signx_service_thrift = {
   },
 
   // 外部密钥数据签名
-  EXT_EccSignData: function(con_uri, ecc_priblob_b64, src_data_b64) {
+  EXT_EccSignData: function (con_uri, ecc_priblob_b64, src_data_b64) {
     var retValue = this._client.ext_eccsigndata(this._sessionid, con_uri + '|sig', ecc_priblob_b64, src_data_b64)
     if (retValue.result == this.SUCCESS) {
       return retValue.value
@@ -153,7 +152,7 @@ const signx_service_thrift = {
   },
 
   // 外部密钥验证签名
-  EXT_EccVerifyData: function(con_uri, ecc_pubblob_b64, src_data_b64, signed_data_b64) {
+  EXT_EccVerifyData: function (con_uri, ecc_pubblob_b64, src_data_b64, signed_data_b64) {
     var retValue = this._client.ext_eccverify(this._sessionid, con_uri + '|sig', ecc_pubblob_b64, src_data_b64, signed_data_b64)
     if (retValue.result == this.SUCCESS) {
       return retValue.result
@@ -164,7 +163,7 @@ const signx_service_thrift = {
   },
 
   // 外部证书验证签名
-  EXT_EccVerifyDataEx: function(con_uri, ecc_cert_b64, src_data_b64, signed_data_b64) {
+  EXT_EccVerifyDataEx: function (con_uri, ecc_cert_b64, src_data_b64, signed_data_b64) {
     var retValue = this._client.ext_eccverify_ex(this._sessionid, con_uri + '|sig', ecc_cert_b64, src_data_b64, signed_data_b64)
     if (retValue.result == this.SUCCESS) {
       return retValue.result
@@ -183,7 +182,7 @@ const signx_service_thrift = {
   //   00000100 - 10进制证书序列号
   //   00001000 - 16进制证书序列号
   // - with_splite: 多个容器URI的分隔符,如果指定为空值,则使用'####'分割
-  GetAllCerts: function(cert_flag_bits, with_splite) {
+  GetAllCerts: function (cert_flag_bits, with_splite) {
     var retValue = this._client.get_all_con_uri(this._sessionid, cert_flag_bits, with_splite)
     if (retValue.result == this.SUCCESS) {
       return retValue.value
@@ -194,7 +193,7 @@ const signx_service_thrift = {
   },
 
   // 获取证书
-  GetCert: function(con_uri, purpose) {
+  GetCert: function (con_uri, purpose) {
     var retValue = this._client.getb64cert(this._sessionid, con_uri, purpose)
     if (retValue.result == this.SUCCESS) {
       return retValue.value
@@ -205,7 +204,7 @@ const signx_service_thrift = {
   },
 
   // 复制证书
-  DuplicateCert: function(con_uri, purpose, cert_type = 1, bits = 1024, template = '', x509_extension = '', digest = 4, reserve = '') {
+  DuplicateCert: function (con_uri, purpose, cert_type = 1, bits = 1024, template = '', x509_extension = '', digest = 4, reserve = '') {
     var retValue = this._client.dupb64cert_with_template(this._sessionid, con_uri, purpose, cert_type, bits, template, x509_extension, digest, reserve)
     if (retValue.result == this.SUCCESS) {
       return retValue.value