From e96d6c76904bf9cab3658606476d2429cae4ebad Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Fri, 21 May 2021 17:09:21 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/jfpt-Vue

---
 src/views/realTimePolice/real.vue                       |    4 
 src/views/supervisoryConsole/data.vue                   |   29 
 src/views/suser/suser.vue                               |    1 
 public/map/widgets/clientManagement/ClientManagement.js |  476 ++++----
 src/api/system/tenant.js                                |    8 
 src/views/attendance/attendance.vue                     |   32 
 src/views/system/tenant.vue                             |    2 
 public/map/index.html                                   |    2 
 src/views/clientManagement/clientManagement.vue         |    3 
 src/views/system/cs.vue                                 | 2584 ++++++++++++++++++++++++------------------------
 10 files changed, 1,572 insertions(+), 1,569 deletions(-)

diff --git a/public/map/index.html b/public/map/index.html
index 8f218cd..2d2dd89 100644
--- a/public/map/index.html
+++ b/public/map/index.html
@@ -51,6 +51,8 @@
           _framework.onSiderContainerShow();
           _framework.resize();
           _AppEvent = AppEvent;
+          //获取设备id
+          window.clientID = locationObj.clientID;
 
           _AppEvent.addAppEventListener("mapLoad", function(map){
             if (locationObj && locationObj != null) {
diff --git a/public/map/widgets/clientManagement/ClientManagement.js b/public/map/widgets/clientManagement/ClientManagement.js
index 9c1cc5d..eed6fb6 100644
--- a/public/map/widgets/clientManagement/ClientManagement.js
+++ b/public/map/widgets/clientManagement/ClientManagement.js
@@ -7,257 +7,255 @@
  * @LastEditTime: 2021-02-25 13:59:29
  */
 define([
-  "dojo",
-  "dojo/_base/declare",
-  "dojo/_base/lang",
-  "base/BaseWidget",
-  "dojo/text!widgets/clientManagement/template.html",
-  "base/AppEvent",
-  "base/ConfigData",
-  "widgets/realTimePolice/config",
-  "dojo/dom",
-  "dojo/dom-construct",
-  "dojo/dom-attr",
-  "dojo/dom-style",
-  "dojo/on",
-  "esri/layers/ArcGISDynamicMapServiceLayer",
-  "esri/layers/ArcGISTiledMapServiceLayer",
-  "esri/layers/FeatureLayer",
-  "controls/tab/TabControl",
-  "esri/dijit/SymbolStyler",
-  "esri/styles/basic",
-  "dojo/_base/array",
-  "esri/InfoTemplate",
-  "esri/tasks/query",
-  "esri/tasks/QueryTask",
-  "esri/Color",
-  "esri/graphic",
-  "esri/geometry/Point",
-  "esri/tasks/FeatureSet",
-  "esri/renderers/HeatmapRenderer",
-  "esri/symbols/SimpleLineSymbol",
-  "esri/symbols/SimpleFillSymbol",
-  "esri/symbols/PictureMarkerSymbol",
-  "esri/symbols/SimpleMarkerSymbol",
-  "esri/SpatialReference",
-  "esri/tasks/GeometryService",
-  "esri/tasks/ProjectParameters",
-  "esri/layers/GraphicsLayer",
-  "esri/layers/LabelLayer",
-  "esri/symbols/TextSymbol",
-  "esri/renderers/SimpleRenderer",
-  "esri/renderers/ClassBreaksRenderer",
-  "esri/tasks/Geoprocessor",
-  "esri/tasks/DataFile",
-  "esri/geometry/webMercatorUtils",
-  "esri/symbols/Font",
-  "esri/geometry/ScreenPoint",
-  "esri/layers/ImageParameters",
-  "esri/geometry/geometryEngine",
-  "esri/dijit/PopupTemplate",
-  "widgets/clientManagement/FlareClusterLayer_v3",
-  "dojo/domReady!",
-  "widgets/realTimePolice/LayUIDataTable"
-], function (
-  dojo,
-  declare,
-  lang,
-  BaseWidget,
-  template,
-  AppEvent,
-  ConfigData,
-  config,
-  dom,
-  domConstruct,
-  domAttr,
-  domStyle,
-  on,
-  ArcGISDynamicMapServiceLayer,
-  ArcGISTiledMapServiceLayer,
-  FeatureLayer,
-  TabControl,
-  SymbolStyler,
-  basic,
-  arrayUtils,
-  InfoTemplate,
-  Query,
-  QueryTask,
-  Color,
-  Graphic,
-  Point,
-  FeatureSet,
-  HeatmapRenderer,
-  SimpleLineSymbol,
-  SimpleFillSymbol,
-  PictureMarkerSymbol,
-  SimpleMarkerSymbol,
-  SpatialReference,
-  GeometryService,
-  ProjectParameters,
-  GraphicsLayer,
-  LabelLayer,
-  TextSymbol,
-  SimpleRenderer,
-  ClassBreaksRenderer,
-  Geoprocessor,
-  DataFile,
-  webMercatorUtils,
-  Font,
-  ScreenPoint,
-  ImageParameters,
-  geometryEngine,
-  PopupTemplate,
-  FlareClusterLayer
+    "dojo",
+    "dojo/_base/declare",
+    "dojo/_base/lang",
+    "base/BaseWidget",
+    "dojo/text!widgets/clientManagement/template.html",
+    "base/AppEvent",
+    "base/ConfigData",
+    "widgets/realTimePolice/config",
+    "dojo/dom",
+    "dojo/dom-construct",
+    "dojo/dom-attr",
+    "dojo/dom-style",
+    "dojo/on",
+    "esri/layers/ArcGISDynamicMapServiceLayer",
+    "esri/layers/ArcGISTiledMapServiceLayer",
+    "esri/layers/FeatureLayer",
+    "controls/tab/TabControl",
+    "esri/dijit/SymbolStyler",
+    "esri/styles/basic",
+    "dojo/_base/array",
+    "esri/InfoTemplate",
+    "esri/tasks/query",
+    "esri/tasks/QueryTask",
+    "esri/Color",
+    "esri/graphic",
+    "esri/geometry/Point",
+    "esri/tasks/FeatureSet",
+    "esri/renderers/HeatmapRenderer",
+    "esri/symbols/SimpleLineSymbol",
+    "esri/symbols/SimpleFillSymbol",
+    "esri/symbols/PictureMarkerSymbol",
+    "esri/symbols/SimpleMarkerSymbol",
+    "esri/SpatialReference",
+    "esri/tasks/GeometryService",
+    "esri/tasks/ProjectParameters",
+    "esri/layers/GraphicsLayer",
+    "esri/layers/LabelLayer",
+    "esri/symbols/TextSymbol",
+    "esri/renderers/SimpleRenderer",
+    "esri/renderers/ClassBreaksRenderer",
+    "esri/tasks/Geoprocessor",
+    "esri/tasks/DataFile",
+    "esri/geometry/webMercatorUtils",
+    "esri/symbols/Font",
+    "esri/geometry/ScreenPoint",
+    "esri/layers/ImageParameters",
+    "esri/geometry/geometryEngine",
+    "esri/dijit/PopupTemplate",
+    "widgets/clientManagement/FlareClusterLayer_v3",
+    "dojo/domReady!",
+    "widgets/realTimePolice/LayUIDataTable"
+], function(
+    dojo,
+    declare,
+    lang,
+    BaseWidget,
+    template,
+    AppEvent,
+    ConfigData,
+    config,
+    dom,
+    domConstruct,
+    domAttr,
+    domStyle,
+    on,
+    ArcGISDynamicMapServiceLayer,
+    ArcGISTiledMapServiceLayer,
+    FeatureLayer,
+    TabControl,
+    SymbolStyler,
+    basic,
+    arrayUtils,
+    InfoTemplate,
+    Query,
+    QueryTask,
+    Color,
+    Graphic,
+    Point,
+    FeatureSet,
+    HeatmapRenderer,
+    SimpleLineSymbol,
+    SimpleFillSymbol,
+    PictureMarkerSymbol,
+    SimpleMarkerSymbol,
+    SpatialReference,
+    GeometryService,
+    ProjectParameters,
+    GraphicsLayer,
+    LabelLayer,
+    TextSymbol,
+    SimpleRenderer,
+    ClassBreaksRenderer,
+    Geoprocessor,
+    DataFile,
+    webMercatorUtils,
+    Font,
+    ScreenPoint,
+    ImageParameters,
+    geometryEngine,
+    PopupTemplate,
+    FlareClusterLayer
 ) {
-  var Widget = declare([BaseWidget], {
-    widgetName: "RealTimePolice",
-    label: "实时报警",
-    templateString: template,
-    _map: null,
-    objThis: null,
-    _siteLayer: new GraphicsLayer(),
-    layuiLayer: null,
-    layuiLadate: null,
-    tabIndex: 0,
+    var Widget = declare([BaseWidget], {
+        widgetName: "RealTimePolice",
+        label: "实时报警",
+        templateString: template,
+        _map: null,
+        objThis: null,
+        _siteLayer: new GraphicsLayer(),
+        layuiLayer: null,
+        layuiLadate: null,
+        tabIndex: 0,
 
-    zTree: null,
+        zTree: null,
 
-    //存放表格数据
-    clientTableData: null,
-    //刷新表格
-    updateTable: null,
+        //存放表格数据
+        clientTableData: null,
+        //刷新表格
+        updateTable: null,
 
-    //存放查询条件值,方便联动查询
-    queryXZQ: null,
-    queryType: null,
-    queryZT: null,
+        //存放查询条件值,方便联动查询
+        queryXZQ: null,
+        queryType: null,
+        queryZT: null,
 
-    //存放弹窗
-    mylay: null,
+        //存放弹窗
+        mylay: null,
 
-    //存放聚合实体
-    clusterLayer: null,
+        //存放聚合实体
+        clusterLayer: null,
 
-    //存放地图是否隐藏参数
-    mapShow: 1,
+        //存放地图是否隐藏参数
+        mapShow: 1,
 
-    //存放树状图id
-    zTreeId: null,
+        //存放树状图id
+        zTreeId: null,
 
-    constructor: function (options, srcRefNode) {
-      this._map = options.map;
-      objThis = this;
+        constructor: function(options, srcRefNode) {
+            this._map = options.map;
+            objThis = this;
 
-      this._map.addLayer(this.realTimeAddEntitys);
-      this._map.addLayer(this.addOneEntitys);
-    },
-    startup: function () {
-      objThis._map.addLayer(objThis._siteLayer);
-      var that = this;
-
-
-    },
-
-
-    open: function () {
-      var that = this;
-      $.ajax({
-        url: '/api/blade-jfpts/alarm/alarm/listAll?',
-        type: 'get',
-        dataType: 'JSON',
-        success: function (data) {
-          var datas = data.data;
-          for (var i = 0; i < datas.length; i++) {
-            datas[i].x = Number(datas[i].jd);
-            datas[i].y = Number(datas[i].wd);
-          }
-          that.flareClusterLayer(datas);
-        }
-      });
-
-    },
-
-
-    close: function () {
-
-    },
-
-    // 鼠标点击事件
-    clickHand: function () {
-    },
-
-    //聚合图层事件
-    flareClusterLayer: function (datas) {
-
-      var that = this;
-
-      var preClustered = false;
-      var displaySingleFlaresAtCount = 10;
-      var areaDisplayMode = "";
-      // var allData = JSON.parse(DATA);
-      // DataManager.setData(allData);
-
-      //init the layer, more options are available and explained in the cluster layer constructor
-      that.clusterLayer = new FlareClusterLayer({
-        id: "flare-cluster-layer",
-        spatialReference: new esri.SpatialReference({"wkid": 4326}),
-        subTypeFlareProperty: "facilityType",
-        singleFlareTooltipProperty: "name",
-        displaySubTypeFlares: true,
-        displaySingleFlaresAtCount: displaySingleFlaresAtCount,
-        flareShowMode: "mouse",
-        preClustered: preClustered,
-        clusterRatio: 75,
-        clusterAreaDisplay: areaDisplayMode,
-        clusteringBegin: function () {
-          console.log("clustering begin");
+            this._map.addLayer(this.realTimeAddEntitys);
+            this._map.addLayer(this.addOneEntitys);
         },
-        clusteringComplete: function () {
-          console.log("clustering complete");
+        startup: function() {
+            objThis._map.addLayer(objThis._siteLayer);
+            var that = this;
+
+
+        },
+
+
+        open: function() {
+            var that = this;
+            $.ajax({
+                url: '/api/blade-jfpts/equipment/equipment/pageDept?deviceName='+ window.clientID,
+                type: 'get',
+                dataType: 'JSON',
+                success: function(data) {
+                    var datas = data.data.records;
+                    for (var i = 0; i < datas.length; i++) {
+                        datas[i].x = Number(datas[i].jd);
+                        datas[i].y = Number(datas[i].wd);
+                    }
+                    that.flareClusterLayer(datas);
+                }
+            });
+
+        },
+
+
+        close: function() {
+
+        },
+
+        // 鼠标点击事件
+        clickHand: function() {},
+
+        //聚合图层事件
+        flareClusterLayer: function(datas) {
+
+            var that = this;
+
+            var preClustered = false;
+            var displaySingleFlaresAtCount = 10;
+            var areaDisplayMode = "";
+            // var allData = JSON.parse(DATA);
+            // DataManager.setData(allData);
+
+            //init the layer, more options are available and explained in the cluster layer constructor
+            that.clusterLayer = new FlareClusterLayer({
+                id: "flare-cluster-layer",
+                spatialReference: new esri.SpatialReference({ "wkid": 4326 }),
+                subTypeFlareProperty: "facilityType",
+                singleFlareTooltipProperty: "name",
+                displaySubTypeFlares: true,
+                displaySingleFlaresAtCount: displaySingleFlaresAtCount,
+                flareShowMode: "mouse",
+                preClustered: preClustered,
+                clusterRatio: 75,
+                clusterAreaDisplay: areaDisplayMode,
+                clusteringBegin: function() {
+                    console.log("clustering begin");
+                },
+                clusteringComplete: function() {
+                    console.log("clustering complete");
+                }
+            });
+
+            //set up a class breaks renderer to render different symbols based on the cluster count. Use the required clusterCount property to break on.
+            var defaultSym = new PictureMarkerSymbol("./images/selfbaojin2.gif", 80, 80).setOffset(0, 15);
+            var renderer = new ClassBreaksRenderer(defaultSym, "clusterCount");
+            var xlSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 32, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new dojo.Color([200, 52, 59, 0.8]), 1), new dojo.Color([250, 65, 74, 0.8]));
+            var lgSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 28, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new dojo.Color([41, 163, 41, 0.8]), 1), new dojo.Color([51, 204, 51, 0.8]));
+            var mdSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 24, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new dojo.Color([82, 163, 204, 0.8]), 1), new dojo.Color([102, 204, 255, 0.8]));
+            var smSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 22, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new dojo.Color([230, 184, 92, 0.8]), 1), new dojo.Color([255, 204, 102, 0.8]));
+            renderer.addBreak(0, 19, smSymbol);
+            renderer.addBreak(20, 150, mdSymbol);
+            renderer.addBreak(151, 1000, lgSymbol);
+            renderer.addBreak(1001, Infinity, xlSymbol);
+
+            that.clusterLayer.setRenderer(renderer); //use standard setRenderer.
+
+            //set up a popup template
+            var template = new PopupTemplate({
+                title: "{name}",
+                fieldInfos: [
+                    { fieldName: "facilityType", label: "Facility Type", visible: true },
+                    { fieldName: "postcode", label: "Post Code", visible: true },
+                    { fieldName: "isOpen", label: "Opening Hours", visible: true }
+                ]
+            });
+
+            //clusterLayer.infoTemplate = template;
+            that._map.infoWindow.titleInBody = false;
+
+            that._map.addLayer(that.clusterLayer);
+
+            //var data = DataManager.getData();
+            that.clusterLayer.addData(datas);
+
+        },
+        clearLayer: function() {
+            var that = this;
+            that._map.removeLayer(that.clusterLayer);
+            that.clusterLayer = null;
         }
-      });
-
-      //set up a class breaks renderer to render different symbols based on the cluster count. Use the required clusterCount property to break on.
-      var defaultSym = new PictureMarkerSymbol("./images/jingbaored.png", 33, 48).setOffset(0, 15);
-      var renderer = new ClassBreaksRenderer(defaultSym, "clusterCount");
-      var xlSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 32, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new dojo.Color([200, 52, 59, 0.8]), 1), new dojo.Color([250, 65, 74, 0.8]));
-      var lgSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 28, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new dojo.Color([41, 163, 41, 0.8]), 1), new dojo.Color([51, 204, 51, 0.8]));
-      var mdSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 24, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new dojo.Color([82, 163, 204, 0.8]), 1), new dojo.Color([102, 204, 255, 0.8]));
-      var smSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 22, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new dojo.Color([230, 184, 92, 0.8]), 1), new dojo.Color([255, 204, 102, 0.8]));
-      renderer.addBreak(0, 19, smSymbol);
-      renderer.addBreak(20, 150, mdSymbol);
-      renderer.addBreak(151, 1000, lgSymbol);
-      renderer.addBreak(1001, Infinity, xlSymbol);
-
-      that.clusterLayer.setRenderer(renderer); //use standard setRenderer.
-
-      //set up a popup template
-      var template = new PopupTemplate({
-        title: "{name}",
-        fieldInfos: [
-          {fieldName: "facilityType", label: "Facility Type", visible: true},
-          {fieldName: "postcode", label: "Post Code", visible: true},
-          {fieldName: "isOpen", label: "Opening Hours", visible: true}
-        ]
-      });
-
-      //clusterLayer.infoTemplate = template;
-      that._map.infoWindow.titleInBody = false;
-
-      that._map.addLayer(that.clusterLayer);
-
-      //var data = DataManager.getData();
-      that.clusterLayer.addData(datas);
-
-    }
-    , clearLayer: function () {
-      var that = this;
-      that._map.removeLayer(that.clusterLayer);
-      that.clusterLayer = null;
-    }
 
 
-  });
-  return Widget;
+    });
+    return Widget;
 });
-
diff --git a/src/api/system/tenant.js b/src/api/system/tenant.js
index a97c008..2ab722b 100644
--- a/src/api/system/tenant.js
+++ b/src/api/system/tenant.js
@@ -103,13 +103,12 @@
     data: row
   })
 }
-export const instery = (dj, had, ht, ctime, content,hn) => {
+export const instery = (dj, ht, ctime, content,hn) => {
   return request({
     url: '/api/blade-system/tenant/instery',
     method: 'post',
     params: {
       dj,
-      had,
       ht,
       ctime,
       content,
@@ -117,7 +116,7 @@
     }
   })
 }
-export const insertsr = (category, attributes, developers, had, housetype, content, hn) => {
+export const insertsr = (category, attributes, developers, housetype, content, hn) => {
   return request({
     url: '/api/blade-system/tenant/insertsr',
     method: 'post',
@@ -125,7 +124,6 @@
       category,
       attributes,
       developers,
-      had,
       housetype,
       content,
       hn
@@ -178,7 +176,7 @@
 }
 export const updateInfos = (nature, had, motto, ctime, content,hn) => {
   return request({
-    url: '/api/blade-system/tenant/updateInfoy',
+    url: '/api/blade-system/tenant/updateInfos',
     method: 'post',
     params: {
       nature,
diff --git a/src/views/attendance/attendance.vue b/src/views/attendance/attendance.vue
index 13e3c16..ae5b1cd 100644
--- a/src/views/attendance/attendance.vue
+++ b/src/views/attendance/attendance.vue
@@ -54,7 +54,7 @@
       </template>
       <template slot-scope="{ row }" slot="attendancetype">
         <el-tag>{{
-            row.attendancetype == "0" ? "正常" : row.attendancetype == "1" ? "迟到" : "早退"
+            row.attendancetype == "0" ? "正常" : row.attendancetype == "1" ? "迟到" : row.attendancetype == "2" ? "早退" : "无效"
           }}
         </el-tag>
       </template>
@@ -178,8 +178,8 @@
               label: "考勤时间",
               prop: "releaseTimeRange",
               type: "datetime",
-              format: "yyyy-MM-dd hh:mm:ss",
-              valueFormat: "yyyy-MM-dd hh:mm:ss",
+              format: "yyyy-MM-dd HH:mm:ss",
+              valueFormat: "yyyy-MM-dd HH:mm:ss",
               searchSpan: 6,
               searchRange:true,
               hide: true,
@@ -198,8 +198,8 @@
               prop: "clocktime",
               type: "date",
               width: 200,
-              format: "yyyy-MM-dd hh:mm:ss",
-              valueFormat: "yyyy-MM-dd hh:mm:ss",
+              format: "yyyy-MM-dd HH:mm:ss",
+              valueFormat: "yyyy-MM-dd HH:mm:ss",
               rules: [{
                 required: true,
                 message: "请输入clocktime",
@@ -215,15 +215,15 @@
                 trigger: "blur"
               }]
             },
-            {
-              label: "天气",
-              prop: "weather",
-              rules: [{
-                required: true,
-                message: "请输入天气",
-                trigger: "blur"
-              }]
-            },
+            // {
+            //   label: "天气",
+            //   prop: "weather",
+            //   rules: [{
+            //     required: true,
+            //     message: "请输入天气",
+            //     trigger: "blur"
+            //   }]
+            // },
             {
               label: "经度",
               prop: "jd",
@@ -291,6 +291,10 @@
                {
                  label: "早退",
                    value: "2"
+                },
+               {
+                 label: "无效",
+                   value: "4"
                }
               ]
             },
diff --git a/src/views/clientManagement/clientManagement.vue b/src/views/clientManagement/clientManagement.vue
index f404769..b1efccc 100644
--- a/src/views/clientManagement/clientManagement.vue
+++ b/src/views/clientManagement/clientManagement.vue
@@ -447,6 +447,7 @@
               addDisplay: true,
               editDisplay: true,
               viewDisplay: true,
+              searchSpan: 3,
               dicUrl: "/api/blade-system/dict-biz/dictionary?code=manufacturers",
               props: {
                 label: "dictValue",
@@ -1038,7 +1039,7 @@
 
           for (var i = 0; i < data.records.length; i++) {
             var date = new Date(data.records[i].heartbeat).getTime();
-            if ((Dqdate - date) >= (60 * 60 * 24 * 1000)) {
+            if ((Dqdate - date) >= (150 * 1000)) {
               data.records[i].dxzt = 0;
             } else if (data.records[i].heartbeat == "") {
               data.records[i].dxzt = 0;
diff --git a/src/views/realTimePolice/real.vue b/src/views/realTimePolice/real.vue
index 6600b59..39e9a37 100644
--- a/src/views/realTimePolice/real.vue
+++ b/src/views/realTimePolice/real.vue
@@ -731,7 +731,7 @@
       this.$router.push({ query: {} });
       var today = new Date();
       var params ={};
-     
+
       if(e==0){
         params = {
           beginTime: this.showToDay(today)+" 00:00:00",
@@ -867,7 +867,7 @@
       this.showMap = true;
       this.$nextTick(() => {
         this.$refs.mapDiv.onload = () => {
-          window.frames[1].init("ClientManagement", { x: row.jd, y: row.wd });
+          window.frames[1].init("ClientManagement", { x: row.jd, y: row.wd , clientID: row.deviceNumber});
         };
       });
     },
diff --git a/src/views/supervisoryConsole/data.vue b/src/views/supervisoryConsole/data.vue
index c209b07..5a7aecb 100644
--- a/src/views/supervisoryConsole/data.vue
+++ b/src/views/supervisoryConsole/data.vue
@@ -379,20 +379,21 @@
         ],
         tooltip: {
           trigger: "item",
-          formatter: function (parms) {
-            var str =
-              parms.marker +
-              "" +
-              parms.data.legendname +
-              "</br>" +
-              "数量:" +
-              parms.data.value +
-              "</br>" +
-              "占比:" +
-              parms.percent +
-              "%";
-            return str;
-          },
+          // formatter: function (parms) {
+          //   var str =
+          //     parms.marker +
+          //     "" +
+          //     parms.data.legendname +
+          //     "</br>" +
+          //     "数量:" +
+          //     parms.data.value +
+          //     "</br>" +
+          //     "占比:" +
+          //     parms.percent +
+          //     "%";
+          //   return str;
+          // },
+          formatter: "{b}: {c} ({d}%)",
         },
         series: [
           {
diff --git a/src/views/suser/suser.vue b/src/views/suser/suser.vue
index 4b65252..554bcf6 100644
--- a/src/views/suser/suser.vue
+++ b/src/views/suser/suser.vue
@@ -222,7 +222,6 @@
         let ids = [];
           console.log(this.selectionList,111111111);
         this.selectionList.forEach(ele => {
-          console.log(ele,id,2222222222);
           ids.push(ele.id);
         });
           console.log(this.selectionList,333333333333);
diff --git a/src/views/system/cs.vue b/src/views/system/cs.vue
index 6949ebe..2088243 100644
--- a/src/views/system/cs.vue
+++ b/src/views/system/cs.vue
@@ -30,7 +30,7 @@
           v-if="permission.tenant_delete"
           plain
           @click="handleDelete"
-          >删 除
+        >删 除
         </el-button>
         <!--        <el-button size="small"-->
         <!--                   plain-->
@@ -48,7 +48,7 @@
       <template slot-scope="{ row }" slot="accountNumber">
         <el-tag>{{
           row.accountNumber > 0 ? row.accountNumber : "不限制"
-        }}</el-tag>
+          }}</el-tag>
       </template>
       <template slot-scope="{ row }" slot="expireTime">
         <el-tag>{{ row.expireTime ? row.expireTime : "不限制" }}</el-tag>
@@ -56,13 +56,13 @@
       <template slot-scope="{ row }" slot="type">
         <el-tag>{{
           row.type === "0"
-            ? "医院"
-            : row.type === "1"
-            ? "学校"
-            : row.type === "2"
-            ? "小区"
-            : "未知"
-        }}</el-tag>
+          ? "医院"
+          : row.type === "1"
+          ? "学校"
+          : row.type === "2"
+          ? "小区"
+          : "未知"
+          }}</el-tag>
       </template>
     </avue-crud>
     <el-dialog
@@ -125,7 +125,7 @@
                   ? 'baojinl'
                   : '',
               ]"
-              >{{ scope.row.states }}</el-tag
+            >{{ scope.row.states }}</el-tag
             >
           </template>
         </avue-crud>
@@ -135,1329 +135,1329 @@
 </template>
 
 <script>
-import { getListliu, getListliuc } from "@/api/client/client";
-import {
-  getList,
-  getDetail,
-  remove,
-  update,
-  add,
-  setting,
-  datasource,
-  instery,
-  updateInfoy,
-  selectTy,
-  insertss,
-  updateInfos,
-  selectTs,
-  insertsr,
-  updateInfor,
-  selectTr,
-  deletey,
-  deletes,
-  deleter,
-} from "@/api/system/tenant";
-import { mapGetters } from "vuex";
-import website from "@/config/website";
-import { getRoleTree } from "@/api/system/role";
-import AvueMap from "avue-plugin-map";
-var that;
-export default {
-  data() {
-    that = this;
-    return {
-      form: {},
-      selectionList: [],
-      query: {},
-      loading: true,
-      box: false,
-      datasourceBox: false,
-      dialogVisible: false, //右侧弹窗
-      onceData: {}, //数据
-      datas: [], //cc
-      loadings: true, //等待
-      querys: {}, //搜索
-      isEdit: false,
-      pages: {
-        pageSize: 10,
-        currentPage: 1,
-        total: 0,
-      },
-      options: {
-        //表格数据
-        addBtn: false,
-        height: "auto",
-        indexLabel: "序号",
-        index: true,
-        card: true,
-        menu: false,
-        header: false,
-        searchShow: true,
-        searchMenuSpan: 8,
-        searchSpan: 8,
-        searchEnter: true,
-        calcHeight: 80,
-        stripe: true,
-        title: "表格的标题",
-        titleSize: "h3",
-        titleStyle: {
-          color: "red",
-        },
-        align: "center",
-        menuAlign: "center",
-        column: [
-          {
-            label: "设备名称",
-            width: 200,
-            prop: "deviceName",
-            searchPlaceholder: "设备名称/编号",
-            search: true,
-            sortable: false,
-            rules: [
-              {
-                required: true,
-                message: "请输入设备名称",
-                trigger: "blur",
-              },
-            ],
-          },
-          {
-            label: "设备编号",
-            prop: "deviceNumber",
-            width: 110,
-          },
-          {
-            label: "使用方",
-            prop: "pid",
-            width: 200,
-            search: true,
-            hide: true,
-            type: "select",
-            // dicUrl: "/api/blade-system/dept/trees",
-            dicData: [], //getUser中直接赋值
-          },
-          {
-            label: "使用方",
-            prop: "deptName",
-            width: 200,
-          },
-          {
-            label: "布撤防状态",
-            prop: "stateSevicestate",
-            width: 110,
-          },
-          {
-            label: "设备状态",
-            prop: "states",
-            width: 90,
-            slot: true,
-            // className: "cityClass1",
-          },
-        ],
-      },
-      page: {
-        pageSize: 10,
-        currentPage: 1,
-        total: 0,
-      },
-      option: {
-        height: "auto",
-        calcHeight: 54,
-        size: "mini",
-        tip: false,
-        searchShow: true,
-        searchMenuSpan: 6,
-        border: false,
-        stripe: true,
-        index: true,
-        selection: true,
-        viewBtn: true,
-        //dialogType: 'drawer',
-        dialogClickModal: false,
-        //  searchSize: 'mini',
-        column: [
-          {
-            label: "客户ID",
-            prop: "tenantId",
-            width: 100,
-            addDisplay: false,
-            editDisplay: false,
-            span: 24,
-            rules: [
-              {
-                required: true,
-                message: "请输入租户ID",
-                trigger: "blur",
-              },
-            ],
-          },
-          {
-            label: "客户名称",
-            prop: "tenantName",
-            search: true,
-            width: 190,
-            span: 12,
-            searchSpan: 3,
-            rules: [
-              {
-                required: true,
-                message: "请输入参数名称",
-                trigger: "blur",
-              },
-            ],
-          },
-          {
-            label: "联系人",
-            prop: "linkman",
-            width: 100,
-            search: true,
-            searchSpan: 3,
-            rules: [
-              {
-                required: true,
-                message: "请输入联系人",
-                trigger: "blur",
-              },
-            ],
-          },
-          {
-            label: "联系电话",
-            prop: "contactNumber",
-            width: 150,
-          },
-          {
-            label: "省份",
-            prop: "province",
-            search: true,
-            searchSpan: 3,
-            searchLabelWidth: 45,
-            placeholder: "省份",
-            type: "select",
-            props: {
-              label: "name",
-              value: "code",
-            },
-            cascaderItem: ["city", "district"],
-            dicUrl: "/api/blade-system/region/select",
-            span: 6,
-            className: "cityClass1",
-          },
-          {
-            label: "地市",
-            prop: "city",
-            type: "select",
-            searchPlaceholder: "地市",
-            placeholder: "地市",
-            searchLabelWidth: 1,
-            searchSpan: 2,
-            search: true,
-            props: {
-              label: "name",
-              value: "code",
-            },
-            dicUrl: "/api/blade-system/region/select?code={{key}}",
-            span: 3,
-            labelWidth: "0",
-            className: "cityClass2",
-          },
-          {
-            label: "区县",
-            searchSpan: 2,
-            searchLabelWidth: 1,
-            searchPlaceholder: "区县",
-            placeholder: "区县",
-            search: true,
-            prop: "district",
-            type: "select",
-            props: {
-              label: "name",
-              value: "code",
-            },
-            dicUrl: "/api/blade-system/region/select?code={{key}}",
-            span: 3,
-            labelWidth: "0",
-            className: "cityClass3",
-          },
-          {
-            label: "地址",
-            prop: "address",
-            span: 10,
-            // labelWidth: '60',
-            hide: true,
-          },
-          {
-            label: null,
-            prop: "map",
-            labelWidth: "0",
-            searchSpan: 0,
-            maxlength: 0,
-            hide: true,
-            span: 2,
-            // display:false,
-            component: "AvueMap",
-          },
-          {
-            label: "纬度",
-            hide: true,
-            addDisplay: false,
-            prop: "wd",
-            span: 6,
-          },
-          {
-            label: "经度",
-            labelWidth: "50",
-            hide: true,
-            addDisplay: false,
-            prop: "jd",
-            span: 5,
-          },
-          {
-            label: "账号额度",
-            prop: "accountNumber",
-            width: 90,
-            slot: true,
-            hide: true,
-            addDisplay: false,
-            editDisplay: false,
-          },
-          {
-            label: "过期时间",
-            prop: "expireTime",
-            width: 180,
-            slot: true,
-            hide: true,
-            addDisplay: false,
-            editDisplay: false,
-          },
-          {
-            label: "类型",
-            prop: "type",
-            width: 80,
-            type: "select",
-            rules: [
-              {
-                required: true,
-                message: "请选择类型",
-                trigger: "blur",
-              },
-            ],
-            dicData: [
-              {
-                label: "医院",
-                value: "0",
-              },
-              {
-                label: "学校",
-                value: "1",
-              },
-              {
-                label: "小区",
-                value: "2",
-              },
-            ],
-            change: function (value, column) {
-              if (value.value == "0") {
-                that.option.group = [
-                  {
-                    label: "详细信息",
-                    prop: "detailInfo",
-                    icon: "el-icon-s-order",
-                    column: [
-                      {
-                        label: "医院等级",
-                        prop: "dj",
-                        hide: true,
-                        dicData: [],
-                        props: {
-                          label: "title",
-                          value: "",
-                        },
-                        checkStrictly: true,
-                        rules: [
-                          {
-                            required: true,
-                            message: "请输入医院等级",
-                            trigger: "blur",
-                          },
-                        ],
-                      },
-                      {
-                        label: "医院类别",
-                        prop: "ht",
-                        rules: [
-                          {
-                            required: true,
-                            message: "请输入医院类别",
-                            trigger: "blur",
-                          },
-                        ],
-                      },
-                      {
-                        label: "成立时间",
-                        type: "datetime",
-                        prop: "ctime",
-                        format: "yyyy-MM-dd",
-                        valueFormat: "yyyy-MM-dd",
-                        rules: [
-                          {
-                            required: true,
-                            message: "请输入成立时间",
-                            trigger: "blur",
-                          },
-                        ],
-                      },
-                      {
-                        label: "介绍",
-                        prop: "content",
-                        rules: [
-                          {
-                            required: true,
-                            message: "请输入介绍",
-                            trigger: "blur",
-                          },
-                        ],
-                        span: 24,
-                      },
-                    ],
-                  },
-                ];
-              } else if (value.value == "1") {
-                that.option.group = [
-                  {
-                    label: "详细信息",
-                    prop: "dutyInfo",
-                    icon: "el-icon-s-custom",
-                    column: [
-                      {
-                        label: "学校性质",
-                        prop: "nature",
-                        hide: true,
-                        dicData: [],
-                        props: {
-                          label: "title",
-                          value: "",
-                        },
-                        rules: [
-                          {
-                            required: true,
-                            message: "请输入学校性质",
-                            trigger: "blur",
-                          },
-                        ],
-                      },
-                      {
-                        label: "校训",
-                        prop: "motto",
-                        rules: [
-                          {
-                            required: true,
-                            message: "请输入校训",
-                            trigger: "blur",
-                          },
-                        ],
-                      },
-                      {
-                        label: "创办时间",
-                        type: "datetime",
-                        prop: "ctime",
-                        format: "yyyy-MM-dd",
-                        valueFormat: "yyyy-MM-dd",
-                        rules: [
-                          {
-                            required: true,
-                            message: "请输入创办时间",
-                          },
-                        ],
-                      },
-                      {
-                        label: "介绍",
-                        prop: "content",
-                        span: 24,
-                        rules: [
-                          {
-                            required: true,
-                            message: "请输入介绍",
-                          },
-                        ],
-                      },
-                    ],
-                  },
-                ];
-              } else if (value.value == "2") {
-                that.option.group = [
-                  {
-                    label: "详细信息",
-                    prop: "baseInfo",
-                    icon: "el-icon-s-solid",
-                    column: [
-                      {
-                        label: "小区类别",
-                        prop: "category",
-                        hide: true,
-                        dicData: [],
-                        props: {
-                          label: "title",
-                          value: "",
-                        },
-                        rules: [
-                          {
-                            required: true,
-                            message: "请输入小区类别",
-                          },
-                        ],
-                      },
-                      {
-                        label: "小区属性",
-                        prop: "attributes",
-                        rules: [
-                          {
-                            required: true,
-                            message: "请输入小区属性",
-                          },
-                        ],
-                      },
-                      {
-                        label: "开发商",
-                        prop: "developers",
-                        rules: [
-                          {
-                            required: true,
-                            message: "请输入开发商",
-                          },
-                        ],
-                      },
-                      {
-                        label: "户型",
-                        prop: "housetype",
-                        rules: [
-                          {
-                            required: true,
-                            message: "请输入户型",
-                          },
-                        ],
-                      },
-                      {
-                        label: "介绍",
-                        prop: "content",
-                        rules: [
-                          {
-                            required: true,
-                            message: "请输入介绍",
-                          },
-                        ],
-                        span: 24,
-                      },
-                    ],
-                  },
-                ];
-              } else {
-                that.option.group = [];
-              }
-            },
-          },
-          {
-            label: "绑定域名",
-            prop: "domain",
-            hide: true,
-          },
-          {
-            label: "系统背景",
-            prop: "backgroundUrl",
-            type: "upload",
-            listType: "picture-img",
-            action: "/api/blade-resource/oss/endpoint/put-file",
-            propsHttp: {
-              res: "data",
-              url: "link",
-            },
-            hide: true,
-            span: 24,
-          },
-        ],
-        group: [],
-      },
-      data: [],
-      settingForm: {},
-      settingOption: {
-        column: [
-          {
-            label: "账号额度",
-            prop: "accountNumber",
-            type: "number",
-            span: 24,
-          },
-          {
-            label: "过期时间",
-            prop: "expireTime",
-            type: "date",
-            format: "yyyy-MM-dd hh:mm:ss",
-            valueFormat: "yyyy-MM-dd hh:mm:ss",
-            span: 24,
-          },
-        ],
-      },
-      datasourceForm: {},
-      datasourceOption: {
-        column: [
-          {
-            label: "数据源",
-            prop: "datasourceId",
-            search: true,
-            span: 24,
-            type: "select",
-            dicUrl: "/api/blade-develop/datasource/select",
-            props: {
-              label: "name",
-              value: "id",
-            },
-            rules: [
-              {
-                required: true,
-                message: "请选择数据源",
-                trigger: "blur",
-              },
-            ],
-          },
-        ],
-      },
-    };
-  },
-  //报错: TypeError: val is undefined 处理时间2021.4.10,处理人  liuyg
-  watch: {
-    "form.map": {
-      // form是表单或者表格绑定的数据集,v-model='form'
-      handler(val) {
-        if (val) {
-          if (that.isEdit) {
-            getDetail(this.form.id).then((res) => {
-              this.form = res.data.data;
-              this.form.wd = val.latitude;
-              this.form.jd = val.longitude;
-            });
-          }
-          //地址截取,从县/区开始截取,并且取从县区第一个出现的位置开始
-          var address = val.formattedAddress.toString();
-          if (address.search("县") != -1) {
-            this.form.address = address.substring(
-              address.indexOf("县") + 1,
-              address.length
-            );
-          }
-          if (address.search("区") != -1) {
-            this.form.address = address.substring(
-              address.indexOf("区") + 1,
-              address.length
-            );
-          }
-          //写入新的省市区
-          that.form.province = val.addressComponent.province;
-          if (val.addressComponent.city == "") {
-            that.form.city = val.addressComponent.province;
-          } else {
-            that.form.city = val.addressComponent.city;
-          }
-          that.form.district = val.addressComponent.district;
-        }
-      },
-      immediate: true,
-    },
-  },
-  computed: {
-    ...mapGetters(["userInfo", "permission"]),
-    permissionList() {
+  import { getListliu, getListliuc } from "@/api/client/client";
+  import {
+    getList,
+    getDetail,
+    remove,
+    update,
+    add,
+    setting,
+    datasource,
+    instery,
+    updateInfoy,
+    selectTy,
+    insertss,
+    updateInfos,
+    selectTs,
+    insertsr,
+    updateInfor,
+    selectTr,
+    deletey,
+    deletes,
+    deleter,
+  } from "@/api/system/tenant";
+  import { mapGetters } from "vuex";
+  import website from "@/config/website";
+  import { getRoleTree } from "@/api/system/role";
+  import AvueMap from "avue-plugin-map";
+  var that;
+  export default {
+    data() {
+      that = this;
       return {
-        addBtn: this.vaildData(this.permission.tenant_add, false),
-        viewBtn: this.vaildData(this.permission.tenant_view, false),
-        delBtn: this.vaildData(this.permission.tenant_delete, false),
-        editBtn: this.vaildData(this.permission.tenant_edit, false),
+        form: {},
+        selectionList: [],
+        query: {},
+        loading: true,
+        box: false,
+        datasourceBox: false,
+        dialogVisible: false, //右侧弹窗
+        onceData: {}, //数据
+        datas: [], //cc
+        loadings: true, //等待
+        querys: {}, //搜索
+        isEdit: false,
+        pages: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0,
+        },
+        options: {
+          //表格数据
+          addBtn: false,
+          height: "auto",
+          indexLabel: "序号",
+          index: true,
+          card: true,
+          menu: false,
+          header: false,
+          searchShow: true,
+          searchMenuSpan: 8,
+          searchSpan: 8,
+          searchEnter: true,
+          calcHeight: 80,
+          stripe: true,
+          title: "表格的标题",
+          titleSize: "h3",
+          titleStyle: {
+            color: "red",
+          },
+          align: "center",
+          menuAlign: "center",
+          column: [
+            {
+              label: "设备名称",
+              width: 200,
+              prop: "deviceName",
+              searchPlaceholder: "设备名称/编号",
+              search: true,
+              sortable: false,
+              rules: [
+                {
+                  required: true,
+                  message: "请输入设备名称",
+                  trigger: "blur",
+                },
+              ],
+            },
+            {
+              label: "设备编号",
+              prop: "deviceNumber",
+              width: 110,
+            },
+            {
+              label: "使用方",
+              prop: "pid",
+              width: 200,
+              search: true,
+              hide: true,
+              type: "select",
+              // dicUrl: "/api/blade-system/dept/trees",
+              dicData: [], //getUser中直接赋值
+            },
+            {
+              label: "使用方",
+              prop: "deptName",
+              width: 200,
+            },
+            {
+              label: "布撤防状态",
+              prop: "stateSevicestate",
+              width: 110,
+            },
+            {
+              label: "设备状态",
+              prop: "states",
+              width: 90,
+              slot: true,
+              // className: "cityClass1",
+            },
+          ],
+        },
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0,
+        },
+        option: {
+          height: "auto",
+          calcHeight: 54,
+          size: "mini",
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: false,
+          stripe: true,
+          index: true,
+          selection: true,
+          viewBtn: true,
+          //dialogType: 'drawer',
+          dialogClickModal: false,
+          //  searchSize: 'mini',
+          column: [
+            {
+              label: "客户ID",
+              prop: "tenantId",
+              width: 100,
+              addDisplay: false,
+              editDisplay: false,
+              span: 24,
+              rules: [
+                {
+                  required: true,
+                  message: "请输入租户ID",
+                  trigger: "blur",
+                },
+              ],
+            },
+            {
+              label: "客户名称",
+              prop: "tenantName",
+              search: true,
+              width: 190,
+              span: 12,
+              searchSpan: 3,
+              rules: [
+                {
+                  required: true,
+                  message: "请输入参数名称",
+                  trigger: "blur",
+                },
+              ],
+            },
+            {
+              label: "联系人",
+              prop: "linkman",
+              width: 100,
+              search: true,
+              searchSpan: 3,
+              rules: [
+                {
+                  required: true,
+                  message: "请输入联系人",
+                  trigger: "blur",
+                },
+              ],
+            },
+            {
+              label: "联系电话",
+              prop: "contactNumber",
+              width: 150,
+            },
+            {
+              label: "省份",
+              prop: "province",
+              search: true,
+              searchSpan: 3,
+              searchLabelWidth: 45,
+              placeholder: "省份",
+              type: "select",
+              props: {
+                label: "name",
+                value: "code",
+              },
+              cascaderItem: ["city", "district"],
+              dicUrl: "/api/blade-system/region/select",
+              span: 6,
+              className: "cityClass1",
+            },
+            {
+              label: "地市",
+              prop: "city",
+              type: "select",
+              searchPlaceholder: "地市",
+              placeholder: "地市",
+              searchLabelWidth: 1,
+              searchSpan: 2,
+              search: true,
+              props: {
+                label: "name",
+                value: "code",
+              },
+              dicUrl: "/api/blade-system/region/select?code={{key}}",
+              span: 3,
+              labelWidth: "0",
+              className: "cityClass2",
+            },
+            {
+              label: "区县",
+              searchSpan: 2,
+              searchLabelWidth: 1,
+              searchPlaceholder: "区县",
+              placeholder: "区县",
+              search: true,
+              prop: "district",
+              type: "select",
+              props: {
+                label: "name",
+                value: "code",
+              },
+              dicUrl: "/api/blade-system/region/select?code={{key}}",
+              span: 3,
+              labelWidth: "0",
+              className: "cityClass3",
+            },
+            {
+              label: "地址",
+              prop: "address",
+              span: 10,
+              // labelWidth: '60',
+              hide: true,
+            },
+            {
+              label: null,
+              prop: "map",
+              labelWidth: "0",
+              searchSpan: 0,
+              maxlength: 0,
+              hide: true,
+              span: 2,
+              // display:false,
+              component: "AvueMap",
+            },
+            {
+              label: "纬度",
+              hide: true,
+              addDisplay: false,
+              prop: "wd",
+              span: 6,
+            },
+            {
+              label: "经度",
+              labelWidth: "50",
+              hide: true,
+              addDisplay: false,
+              prop: "jd",
+              span: 5,
+            },
+            {
+              label: "账号额度",
+              prop: "accountNumber",
+              width: 90,
+              slot: true,
+              hide: true,
+              addDisplay: false,
+              editDisplay: false,
+            },
+            {
+              label: "过期时间",
+              prop: "expireTime",
+              width: 180,
+              slot: true,
+              hide: true,
+              addDisplay: false,
+              editDisplay: false,
+            },
+            {
+              label: "类型",
+              prop: "type",
+              width: 80,
+              type: "select",
+              rules: [
+                {
+                  required: true,
+                  message: "请选择类型",
+                  trigger: "blur",
+                },
+              ],
+              dicData: [
+                {
+                  label: "医院",
+                  value: "0",
+                },
+                {
+                  label: "学校",
+                  value: "1",
+                },
+                {
+                  label: "小区",
+                  value: "2",
+                },
+              ],
+              change: function (value, column) {
+                if (value.value == "0") {
+                  that.option.group = [
+                    {
+                      label: "详细信息",
+                      prop: "detailInfo",
+                      icon: "el-icon-s-order",
+                      column: [
+                        {
+                          label: "医院等级",
+                          prop: "dj",
+                          hide: true,
+                          dicData: [],
+                          props: {
+                            label: "title",
+                            value: "",
+                          },
+                          checkStrictly: true,
+                          rules: [
+                            {
+                              required: true,
+                              message: "请输入医院等级",
+                              trigger: "blur",
+                            },
+                          ],
+                        },
+                        {
+                          label: "医院类别",
+                          prop: "ht",
+                          rules: [
+                            {
+                              required: true,
+                              message: "请输入医院类别",
+                              trigger: "blur",
+                            },
+                          ],
+                        },
+                        {
+                          label: "成立时间",
+                          type: "datetime",
+                          prop: "ctime",
+                          format: "yyyy-MM-dd",
+                          valueFormat: "yyyy-MM-dd",
+                          rules: [
+                            {
+                              required: true,
+                              message: "请输入成立时间",
+                              trigger: "blur",
+                            },
+                          ],
+                        },
+                        {
+                          label: "介绍",
+                          prop: "content",
+                          rules: [
+                            {
+                              required: true,
+                              message: "请输入介绍",
+                              trigger: "blur",
+                            },
+                          ],
+                          span: 24,
+                        },
+                      ],
+                    },
+                  ];
+                } else if (value.value == "1") {
+                  that.option.group = [
+                    {
+                      label: "详细信息",
+                      prop: "dutyInfo",
+                      icon: "el-icon-s-custom",
+                      column: [
+                        {
+                          label: "学校性质",
+                          prop: "nature",
+                          hide: true,
+                          dicData: [],
+                          props: {
+                            label: "title",
+                            value: "",
+                          },
+                          rules: [
+                            {
+                              required: true,
+                              message: "请输入学校性质",
+                              trigger: "blur",
+                            },
+                          ],
+                        },
+                        {
+                          label: "校训",
+                          prop: "motto",
+                          rules: [
+                            {
+                              required: true,
+                              message: "请输入校训",
+                              trigger: "blur",
+                            },
+                          ],
+                        },
+                        {
+                          label: "创办时间",
+                          type: "datetime",
+                          prop: "ctime",
+                          format: "yyyy-MM-dd",
+                          valueFormat: "yyyy-MM-dd",
+                          rules: [
+                            {
+                              required: true,
+                              message: "请输入创办时间",
+                            },
+                          ],
+                        },
+                        {
+                          label: "介绍",
+                          prop: "content",
+                          span: 24,
+                          rules: [
+                            {
+                              required: true,
+                              message: "请输入介绍",
+                            },
+                          ],
+                        },
+                      ],
+                    },
+                  ];
+                } else if (value.value == "2") {
+                  that.option.group = [
+                    {
+                      label: "详细信息",
+                      prop: "baseInfo",
+                      icon: "el-icon-s-solid",
+                      column: [
+                        {
+                          label: "小区类别",
+                          prop: "category",
+                          hide: true,
+                          dicData: [],
+                          props: {
+                            label: "title",
+                            value: "",
+                          },
+                          rules: [
+                            {
+                              required: true,
+                              message: "请输入小区类别",
+                            },
+                          ],
+                        },
+                        {
+                          label: "小区属性",
+                          prop: "attributes",
+                          rules: [
+                            {
+                              required: true,
+                              message: "请输入小区属性",
+                            },
+                          ],
+                        },
+                        {
+                          label: "开发商",
+                          prop: "developers",
+                          rules: [
+                            {
+                              required: true,
+                              message: "请输入开发商",
+                            },
+                          ],
+                        },
+                        {
+                          label: "户型",
+                          prop: "housetype",
+                          rules: [
+                            {
+                              required: true,
+                              message: "请输入户型",
+                            },
+                          ],
+                        },
+                        {
+                          label: "介绍",
+                          prop: "content",
+                          rules: [
+                            {
+                              required: true,
+                              message: "请输入介绍",
+                            },
+                          ],
+                          span: 24,
+                        },
+                      ],
+                    },
+                  ];
+                } else {
+                  that.option.group = [];
+                }
+              },
+            },
+            {
+              label: "绑定域名",
+              prop: "domain",
+              hide: true,
+            },
+            {
+              label: "系统背景",
+              prop: "backgroundUrl",
+              type: "upload",
+              listType: "picture-img",
+              action: "/api/blade-resource/oss/endpoint/put-file",
+              propsHttp: {
+                res: "data",
+                url: "link",
+              },
+              hide: true,
+              span: 24,
+            },
+          ],
+          group: [],
+        },
+        data: [],
+        settingForm: {},
+        settingOption: {
+          column: [
+            {
+              label: "账号额度",
+              prop: "accountNumber",
+              type: "number",
+              span: 24,
+            },
+            {
+              label: "过期时间",
+              prop: "expireTime",
+              type: "date",
+              format: "yyyy-MM-dd hh:mm:ss",
+              valueFormat: "yyyy-MM-dd hh:mm:ss",
+              span: 24,
+            },
+          ],
+        },
+        datasourceForm: {},
+        datasourceOption: {
+          column: [
+            {
+              label: "数据源",
+              prop: "datasourceId",
+              search: true,
+              span: 24,
+              type: "select",
+              dicUrl: "/api/blade-develop/datasource/select",
+              props: {
+                label: "name",
+                value: "id",
+              },
+              rules: [
+                {
+                  required: true,
+                  message: "请选择数据源",
+                  trigger: "blur",
+                },
+              ],
+            },
+          ],
+        },
       };
     },
-    ids() {
-      let ids = [];
-      this.selectionList.forEach((ele) => {
-        ids.push(ele.id);
-      });
-      return ids.join(",");
-    },
-    tenantId() {
-      return this.selectionList[0].tenantId;
-    },
-  },
-  methods: {
-    rowSave(row, done, loading) {
-      add(row).then(
-        () => {
-          if (row.type == "0") {
-            console.log(123);
-            instery(
-              row.dj,
-              // row.had,
-              row.ht,
-              row.ctime,
-              row.content,
-              row.tenantName
-            );
-          } else if (row.type == "1") {
-            insertss(
-              row.dj,
-              row.nature,
-              // row.had,
-              row.motto,
-              row.ctime,
-              row.content,
-              row.tenantName
-            );
-          } else if (row.type == "2") {
-            insertsr(
-              row.dj,
-              row.category,
-              row.attributes,
-              row.developers,
-              // row.had,
-              row.housetype,
-              row.content,
-              row.hn
-            );
+    //报错: TypeError: val is undefined 处理时间2021.4.10,处理人  liuyg
+    watch: {
+      "form.map": {
+        // form是表单或者表格绑定的数据集,v-model='form'
+        handler(val) {
+          if (val) {
+            if (that.isEdit) {
+              getDetail(this.form.id).then((res) => {
+                this.form = res.data.data;
+                this.form.wd = val.latitude;
+                this.form.jd = val.longitude;
+              });
+            }
+            //地址截取,从县/区开始截取,并且取从县区第一个出现的位置开始
+            var address = val.formattedAddress.toString();
+            if (address.search("县") != -1) {
+              this.form.address = address.substring(
+                address.indexOf("县") + 1,
+                address.length
+              );
+            }
+            if (address.search("区") != -1) {
+              this.form.address = address.substring(
+                address.indexOf("区") + 1,
+                address.length
+              );
+            }
+            //写入新的省市区
+            that.form.province = val.addressComponent.province;
+            if (val.addressComponent.city == "") {
+              that.form.city = val.addressComponent.province;
+            } else {
+              that.form.city = val.addressComponent.city;
+            }
+            that.form.district = val.addressComponent.district;
           }
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!",
-          });
-          done();
         },
-        (error) => {
-          window.console.log(error);
-          loading();
-        }
-      );
+        immediate: true,
+      },
     },
-    rowUpdate(row, index, done, loading) {
-      if (row.type == "0") {
-        updateInfoy(
-          row.dj,
-          row.had,
-          row.ht,
-          row.ctime,
-          row.content,
-          row.tenantName
-        );
-      } else if (row.type == "1") {
-        updateInfos(
-          row.dj,
-          row.nature,
-          row.had,
-          row.motto,
-          row.ctime,
-          row.content,
-          row.tenantName
-        );
-      } else if (row.type == "2") {
-        updateInfor(
-          row.dj,
-          row.category,
-          row.attributes,
-          row.developers,
-          row.had,
-          row.housetype,
-          row.content,
-          row.tenantName
-        );
-      }
-      update(row).then(
-        () => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!",
-          });
-          done();
-        },
-        (error) => {
-          window.console.log(error);
-          loading();
-        }
-      );
+    computed: {
+      ...mapGetters(["userInfo", "permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.tenant_add, false),
+          viewBtn: this.vaildData(this.permission.tenant_view, false),
+          delBtn: this.vaildData(this.permission.tenant_delete, false),
+          editBtn: this.vaildData(this.permission.tenant_edit, false),
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach((ele) => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      },
+      tenantId() {
+        return this.selectionList[0].tenantId;
+      },
     },
-    rowDel(row) {
-      this.$confirm("确定将选择数据删除?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          if (row.type == "0") {
-            deletey(row.tenantName);
-          } else if (row.type == "1") {
-            deletes(row.tenantName);
-          } else if (row.type == "2") {
-            deleter(row.tenantName);
-          }
-          return remove(row.id);
-        })
-        .then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!",
-          });
-        });
-    },
-    beforeOpen(done, type) {
-      if (["edit"].includes(type)) {
-        that.isEdit = true;
-        getDetail(this.form.id).then((res) => {
-          if (this.form.type == "1") {
-            const data = res.data.data;
-            selectTs(this.form.tenantName).then((re) => {
-              const data = res.data.data;
-              data.nature = re.data.data[0].nature;
-              data.dj = re.data.data[0].dj;
-              data.motto = re.data.data[0].motto;
-              data.ctime = re.data.data[0].ctime;
-              //data.had = re.data.data[0].had;
-              data.content = re.data.data[0].content;
-              this.form = data;
-            });
-          } else if (this.form.type == "0") {
-            selectTy(this.form.tenantName).then((re) => {
-              console.log(re, 123);
-              const data = res.data.data;
-              data.dj = re.data.data[0].dj;
-              data.ht = re.data.data[0].ht;
-              data.ctime = re.data.data[0].ctime;
-              //.had = re.data.data[0].had;
-              data.content = re.data.data[0].content;
-              this.form = data;
-            });
-          } else if (this.form.type == "2") {
-            selectTr(this.form.tenantName).then((re) => {
-              const data = res.data.data;
-              data.dj = re.data.data[0].dj;
-              data.category = re.data.data[0].category;
-              data.attributes = re.data.data[0].attributes;
-              data.developers = re.data.data[0].developers;
-              //data.had = re.data.data[0].had;
-              data.housetype = re.data.data[0].housetype;
-              data.content = re.data.data[0].content;
-              this.form = data;
-            });
-          }
-        });
-      } else if (["view"].includes(type)) {
-        getDetail(this.form.id).then((res) => {
-          if (this.form.type == "1") {
-            selectTs(this.form.tenantName).then((re) => {
-              const data = res.data.data;
-              data.nature = re.data.data[0].nature;
-              data.motto = re.data.data[0].motto;
-              data.ctime = re.data.data[0].ctime;
-              //data.had = re.data.data[0].had;
-              data.content = re.data.data[0].content;
-              if (!(data.accountNumber > 0)) {
-                data.accountNumber = "不限制";
-              }
-              if (!data.expireTime) {
-                data.expireTime = "不限制";
-              }
-              this.form = data;
-            });
-          } else if (this.form.type == "0") {
-            selectTy(this.form.tenantName).then((re) => {
-              const data = res.data.data;
-              data.dj = re.data.data[0].dj;
-              data.ht = re.data.data[0].ht;
-              data.ctime = re.data.data[0].ctime;
-              //data.had = re.data.data[0].had;
-              data.content = re.data.data[0].content;
-              if (!(data.accountNumber > 0)) {
-                data.accountNumber = "不限制";
-              }
-              if (!data.expireTime) {
-                data.expireTime = "不限制";
-              }
-              this.form = data;
-            });
-          } else if (this.form.type == "2") {
-            selectTr(this.form.tenantName).then((re) => {
-              const data = res.data.data;
-              data.category = re.data.data[0].category;
-              data.attributes = re.data.data[0].attributes;
-              data.developers = re.data.data[0].developers;
-              //data.had = re.data.data[0].had;
-              data.housetype = re.data.data[0].housetype;
-              data.content = re.data.data[0].content;
-              if (!(data.accountNumber > 0)) {
-                data.accountNumber = "不限制";
-              }
-              if (!data.expireTime) {
-                data.expireTime = "不限制";
-              }
-              this.form = data;
-            });
-          }
-        });
-      }
+    methods: {
+      rowSave(row, done, loading) {
 
-      if (["edit"].includes(type)) {
-        that.isEdit = false;
-      }
-      done();
-    },
-    searchReset() {
-      this.query = {};
-      this.onLoad(this.page);
-    },
-    searchChange(params, done) {
-      this.query = params;
-      this.page.currentPage = 1;
-      this.onLoad(this.page, params);
-      done();
-    },
-    selectionChange(list) {
-      this.selectionList = list;
-    },
-    selectionClear() {
-      this.selectionList = [];
-      this.$refs.crud.toggleSelection();
-    },
-    handleDelete() {
-      if (this.selectionList.length === 0) {
-        this.$message.warning("请选择至少一条数据");
-        return;
-      }
-      this.$confirm("确定将选择数据删除?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          return remove(this.ids);
+        add(row).then(
+          () => {
+            debugger
+            if (row.type == "0") {
+              console.log(123);
+              instery(
+                row.dj,
+                // row.had,
+                row.ht,
+                row.ctime,
+                row.content,
+                row.tenantName
+              );
+            } else if (row.type == "1") {
+              insertss(
+                row.nature,
+                row.had,
+                // row.had,
+                row.motto,
+                row.ctime,
+                row.content,
+                row.tenantName
+              );
+            } else if (row.type == "2") {
+              insertsr(
+                row.category,
+                row.attributes,
+                row.developers,
+                row.housetype,
+                row.content,
+                row.tenantName
+              );
+            }
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!",
+            });
+            done();
+          },
+          (error) => {
+            window.console.log(error);
+            loading();
+          }
+        );
+      },
+      rowUpdate(row, index, done, loading) {
+        debugger
+        if (row.type == "0") {
+          updateInfoy(
+            row.dj,
+            row.had,
+            row.ht,
+            row.ctime,
+            row.content,
+            row.tenantName
+          );
+        } else if (row.type == "1") {
+          updateInfos(
+            row.nature,
+            row.had,
+            row.motto,
+            row.ctime,
+            row.content,
+            row.tenantName
+          );
+        } else if (row.type == "2") {
+          updateInfor(
+            row.category,
+            row.attributes,
+            row.developers,
+            row.had,
+            row.housetype,
+            row.content,
+            row.tenantName
+          );
+        }
+        update(row).then(
+          () => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!",
+            });
+            done();
+          },
+          (error) => {
+            window.console.log(error);
+            loading();
+          }
+        );
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
         })
-        .then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!",
+          .then(() => {
+            debugger
+            if (row.type == "0") {
+              deletey(row.tenantName);
+            } else if (row.type == "1") {
+              deletes(row.tenantName);
+            } else if (row.type == "2") {
+              deleter(row.tenantName);
+            }
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!",
+            });
           });
-          this.$refs.crud.toggleSelection();
-        });
-    },
-    handleSetting() {
-      if (this.selectionList.length === 0) {
-        this.$message.warning("请选择至少一条数据");
-        return;
-      }
-      if (this.selectionList.length === 1) {
+      },
+      beforeOpen(done, type) {
+        if (["edit"].includes(type)) {
+          that.isEdit = true;
+          getDetail(this.form.id).then((res) => {
+            if (this.form.type == "1") {
+              const data = res.data.data;
+              selectTs(this.form.tenantName).then((re) => {
+                const data = res.data.data;
+                data.nature = re.data.data[0].nature;
+                data.dj = re.data.data[0].dj;
+                data.motto = re.data.data[0].motto;
+                data.ctime = re.data.data[0].ctime;
+                //data.had = re.data.data[0].had;
+                data.content = re.data.data[0].content;
+                this.form = data;
+              });
+            } else if (this.form.type == "0") {
+              selectTy(this.form.tenantName).then((re) => {
+                console.log(re, 123);
+                const data = res.data.data;
+                data.dj = re.data.data[0].dj;
+                data.ht = re.data.data[0].ht;
+                data.ctime = re.data.data[0].ctime;
+                //.had = re.data.data[0].had;
+                data.content = re.data.data[0].content;
+                this.form = data;
+              });
+            } else if (this.form.type == "2") {
+              selectTr(this.form.tenantName).then((re) => {
+                const data = res.data.data;
+                data.dj = re.data.data[0].dj;
+                data.category = re.data.data[0].category;
+                data.attributes = re.data.data[0].attributes;
+                data.developers = re.data.data[0].developers;
+                //data.had = re.data.data[0].had;
+                data.housetype = re.data.data[0].housetype;
+                data.content = re.data.data[0].content;
+                this.form = data;
+              });
+            }
+          });
+        } else if (["view"].includes(type)) {
+          getDetail(this.form.id).then((res) => {
+            if (this.form.type == "1") {
+              selectTs(this.form.tenantName).then((re) => {
+                const data = res.data.data;
+                data.nature = re.data.data[0].nature;
+                data.motto = re.data.data[0].motto;
+                data.ctime = re.data.data[0].ctime;
+                //data.had = re.data.data[0].had;
+                data.content = re.data.data[0].content;
+                if (!(data.accountNumber > 0)) {
+                  data.accountNumber = "不限制";
+                }
+                if (!data.expireTime) {
+                  data.expireTime = "不限制";
+                }
+                this.form = data;
+              });
+            } else if (this.form.type == "0") {
+              selectTy(this.form.tenantName).then((re) => {
+                const data = res.data.data;
+                data.dj = re.data.data[0].dj;
+                data.ht = re.data.data[0].ht;
+                data.ctime = re.data.data[0].ctime;
+                //data.had = re.data.data[0].had;
+                data.content = re.data.data[0].content;
+                if (!(data.accountNumber > 0)) {
+                  data.accountNumber = "不限制";
+                }
+                if (!data.expireTime) {
+                  data.expireTime = "不限制";
+                }
+                this.form = data;
+              });
+            } else if (this.form.type == "2") {
+              selectTr(this.form.tenantName).then((re) => {
+                const data = res.data.data;
+                data.category = re.data.data[0].category;
+                data.attributes = re.data.data[0].attributes;
+                data.developers = re.data.data[0].developers;
+                //data.had = re.data.data[0].had;
+                data.housetype = re.data.data[0].housetype;
+                data.content = re.data.data[0].content;
+                if (!(data.accountNumber > 0)) {
+                  data.accountNumber = "不限制";
+                }
+                if (!data.expireTime) {
+                  data.expireTime = "不限制";
+                }
+                this.form = data;
+              });
+            }
+          });
+        }
+
+        if (["edit"].includes(type)) {
+          that.isEdit = false;
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!",
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      handleSetting() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        if (this.selectionList.length === 1) {
+          getDetail(this.selectionList[0].id).then((res) => {
+            const data = res.data.data;
+            this.settingForm.accountNumber = data.accountNumber;
+            this.settingForm.expireTime = data.expireTime;
+          });
+        } else {
+          this.settingForm.accountNumber = -1;
+          this.settingForm.expireTime = "";
+        }
+        this.box = true;
+      },
+      handleDatasource() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        if (this.selectionList.length !== 1) {
+          this.$message.warning("只能选择一条数据");
+          return;
+        }
         getDetail(this.selectionList[0].id).then((res) => {
           const data = res.data.data;
-          this.settingForm.accountNumber = data.accountNumber;
-          this.settingForm.expireTime = data.expireTime;
+          this.datasourceForm.datasourceId = data.datasourceId;
         });
-      } else {
-        this.settingForm.accountNumber = -1;
-        this.settingForm.expireTime = "";
-      }
-      this.box = true;
-    },
-    handleDatasource() {
-      if (this.selectionList.length === 0) {
-        this.$message.warning("请选择至少一条数据");
-        return;
-      }
-      if (this.selectionList.length !== 1) {
-        this.$message.warning("只能选择一条数据");
-        return;
-      }
-      getDetail(this.selectionList[0].id).then((res) => {
-        const data = res.data.data;
-        this.datasourceForm.datasourceId = data.datasourceId;
-      });
-      this.datasourceBox = true;
-    },
-    handleSubmit(form, done, loading) {
-      setting(this.ids, form).then(
-        () => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "配置成功!",
-          });
-          done();
-          this.box = false;
-        },
-        (error) => {
-          window.console.log(error);
-          loading();
-        }
-      );
-    },
-    handleDatasourceSubmit(form, done, loading) {
-      datasource(this.tenantId, form.datasourceId).then(
-        () => {
-          this.$message({
-            type: "success",
-            message: "配置成功!",
-          });
-          done();
-          this.datasourceBox = false;
-        },
-        (error) => {
-          window.console.log(error);
-          loading();
-        }
-      );
-    },
-    currentChange(currentPage) {
-      this.page.currentPage = currentPage;
-    },
-    sizeChange(pageSize) {
-      this.page.pageSize = pageSize;
-    },
-    refreshChange() {
-      this.onLoad(this.page, this.query);
-    },
-    onLoad(page, params = {}) {
-      this.loading = true;
-      getList(
-        page.currentPage,
-        page.pageSize,
-        Object.assign(params, this.query)
-      ).then((res) => {
-        // console.log(res);
-        // this.onceData = res.data.data.records[0];
-        const data = res.data.data;
-        this.page.total = data.total;
-        this.data = data.records;
-        this.loading = false;
-        this.selectionClear();
-      });
-    },
-    rowClick(val) {
-      //行点击事件 //右侧弹窗事件
-      this.onceData = val;
-      this.dialogVisible = true;
-    },
-    rowClicks(val) {
-      //弹窗行点击事件
-      // console.log(val);
-      // this.$router.push({ path: "/dataL/dataL", query: val });
-      let routeData = this.$router.resolve({
-        path: "/datalOnce",
-        query: val,
-      });
-      window.open(routeData.href, "_blank");
-    },
-    changeDataOpen(dat) {
-      //处理弹出框数据
-      console.log(dat);
-      if (dat.length > 0) {
-        for (var key in dat) {
-          let states;
-          // if (dat[key].state != "") {
-          //   states = "故障";
-          // } else {
-          //   if (dat[key].jtype != 1) {
-          //     if (dat[key].onlineStatus == 1) {
-          //       states = "在线";
-          //     } else {
-          //       states = "掉线";
-          //     }
-          //   } else {
-          //     states = "预警";
-          //   }
-          // }
-          states =
-            dat[key].dtype == 0
-              ? "掉线"
-              : dat[key].dtype == 1
-              ? "正常"
-              : dat[key].dtype == 2
-              ? "预警"
-              : dat[key].dtype == 3
-              ? "故障"
-              : "";
-          // console.log(states);
-          dat[key].states = states;
-          dat[key].stateSevicestate =
-            dat[key].devicestate == "0"
-              ? "撤防"
-              : dat[key].devicestate == "1"
-              ? "布防"
-              : "无";
-        }
-      }
-    },
-    getMout(fid) {
-      getListliuc(fid).then((res) => {
-        // console.log(res.data.data);
-        this.getUser(res.data.data);
-      });
-    },
-    getUser(dat) {
-      //建立使用方搜索关键词
-      // console.log(dat);
-      if (dat.length > 0) {
-        this.users = [];
-        for (var key in dat) {
-          this.users.push({
-            label: dat[key].title,
-            value: dat[key].id,
-          });
-        }
-      }
-      // this.users.push([
-      //   {
-
-      //   }
-      // ])
-      this.options.column[2].dicData = this.users;
-    },
-    searchResets() {
-      //清空搜索框中的内容
-      this.querys = {};
-      //清空this.$route.query
-      this.$router.push({ querys: {} });
-      this.onLoads(this.pages);
-    },
-    searchChanges(params, done) {
-      //搜索
-      console.log(params, done, 222);
-      this.querys = params;
-      this.pages.currentPage = 1;
-      this.onLoads(this.pages, params);
-      done();
-    },
-    currentChanges(currentPage) {
-      //分页改变时候触发
-      this.pages.currentPage = currentPage;
-    },
-    sizeChanges(pageSize) {
-      this.pages.pageSize = pageSize;
-    },
-    onLoads(pages, params = {}) {
-      // this.$message.success("分页信息:" + JSON.stringify(pages));
-      // this.pages.total = 40;
-      // console.log(1)
-      this.loadings = true;
-      //  console.log(2)
-      let values = {
-        ...params,
-      };
-      // console.log(3)
-      // getListliu(1, 10, {}, val.id).then((res) => {
-      var useId = this.onceData.deptId;
-      // console.log(4)
-      getListliu(pages.currentPage, pages.pageSize, values, useId).then(
-        (res) => {
-          // console.log(5)
-          // console.log(pages.currentPage, pages.pageSize, values, useId,332332)
-          // console.log(this.datas);
-          // getListliu('1', '10', {}, '1353972967828533249').then((res) => {
-          //拿到数据
-          this.datas = res.data.data.records;
-          // console.log(this.datas);
-          // console.log(pages.currentPage);
-          // console.log(pages.pageSize);
-          // console.log(this.onceData);
+        this.datasourceBox = true;
+      },
+      handleSubmit(form, done, loading) {
+        setting(this.ids, form).then(
+          () => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "配置成功!",
+            });
+            done();
+            this.box = false;
+          },
+          (error) => {
+            window.console.log(error);
+            loading();
+          }
+        );
+      },
+      handleDatasourceSubmit(form, done, loading) {
+        datasource(this.tenantId, form.datasourceId).then(
+          () => {
+            this.$message({
+              type: "success",
+              message: "配置成功!",
+            });
+            done();
+            this.datasourceBox = false;
+          },
+          (error) => {
+            window.console.log(error);
+            loading();
+          }
+        );
+      },
+      currentChange(currentPage) {
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize) {
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        getList(
+          page.currentPage,
+          page.pageSize,
+          Object.assign(params, this.query)
+        ).then((res) => {
+          // console.log(res);
+          // this.onceData = res.data.data.records[0];
           const data = res.data.data;
-          this.pages.total = data.total;
-          this.changeDataOpen(this.datas);
-          this.getMout(this.onceData.deptId);
-          this.loadings = false;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      },
+      rowClick(val) {
+        //行点击事件 //右侧弹窗事件
+        this.onceData = val;
+        this.dialogVisible = true;
+      },
+      rowClicks(val) {
+        //弹窗行点击事件
+        // console.log(val);
+        // this.$router.push({ path: "/dataL/dataL", query: val });
+        let routeData = this.$router.resolve({
+          path: "/datalOnce",
+          query: val,
+        });
+        window.open(routeData.href, "_blank");
+      },
+      changeDataOpen(dat) {
+        //处理弹出框数据
+        console.log(dat);
+        if (dat.length > 0) {
+          for (var key in dat) {
+            let states;
+            // if (dat[key].state != "") {
+            //   states = "故障";
+            // } else {
+            //   if (dat[key].jtype != 1) {
+            //     if (dat[key].onlineStatus == 1) {
+            //       states = "在线";
+            //     } else {
+            //       states = "掉线";
+            //     }
+            //   } else {
+            //     states = "预警";
+            //   }
+            // }
+            states =
+              dat[key].dtype == 0
+                ? "掉线"
+                : dat[key].dtype == 1
+                ? "正常"
+                : dat[key].dtype == 2
+                  ? "预警"
+                  : dat[key].dtype == 3
+                    ? "故障"
+                    : "";
+            // console.log(states);
+            dat[key].states = states;
+            dat[key].stateSevicestate =
+              dat[key].devicestate == "0"
+                ? "撤防"
+                : dat[key].devicestate == "1"
+                ? "布防"
+                : "无";
+          }
         }
-      );
+      },
+      getMout(fid) {
+        getListliuc(fid).then((res) => {
+          // console.log(res.data.data);
+          this.getUser(res.data.data);
+        });
+      },
+      getUser(dat) {
+        //建立使用方搜索关键词
+        // console.log(dat);
+        if (dat.length > 0) {
+          this.users = [];
+          for (var key in dat) {
+            this.users.push({
+              label: dat[key].title,
+              value: dat[key].id,
+            });
+          }
+        }
+        // this.users.push([
+        //   {
+
+        //   }
+        // ])
+        this.options.column[2].dicData = this.users;
+      },
+      searchResets() {
+        //清空搜索框中的内容
+        this.querys = {};
+        //清空this.$route.query
+        this.$router.push({ querys: {} });
+        this.onLoads(this.pages);
+      },
+      searchChanges(params, done) {
+        //搜索
+        console.log(params, done, 222);
+        this.querys = params;
+        this.pages.currentPage = 1;
+        this.onLoads(this.pages, params);
+        done();
+      },
+      currentChanges(currentPage) {
+        //分页改变时候触发
+        this.pages.currentPage = currentPage;
+      },
+      sizeChanges(pageSize) {
+        this.pages.pageSize = pageSize;
+      },
+      onLoads(pages, params = {}) {
+        // this.$message.success("分页信息:" + JSON.stringify(pages));
+        // this.pages.total = 40;
+        // console.log(1)
+        this.loadings = true;
+        //  console.log(2)
+        let values = {
+          ...params,
+        };
+        // console.log(3)
+        // getListliu(1, 10, {}, val.id).then((res) => {
+        var useId = this.onceData.deptId;
+        // console.log(4)
+        getListliu(pages.currentPage, pages.pageSize, values, useId).then(
+          (res) => {
+            // console.log(5)
+            // console.log(pages.currentPage, pages.pageSize, values, useId,332332)
+            // console.log(this.datas);
+            // getListliu('1', '10', {}, '1353972967828533249').then((res) => {
+            //拿到数据
+            this.datas = res.data.data.records;
+            // console.log(this.datas);
+            // console.log(pages.currentPage);
+            // console.log(pages.pageSize);
+            // console.log(this.onceData);
+            const data = res.data.data;
+            this.pages.total = data.total;
+            this.changeDataOpen(this.datas);
+            this.getMout(this.onceData.deptId);
+            this.loadings = false;
+          }
+        );
+      },
     },
-  },
-  mounted() {},
-};
+    mounted() {},
+  };
 </script>
 
 <style lang="scss" >
-//scoped
-$city-m-l: 10px;
+  //scoped
+  $city-m-l: 10px;
 
-/*页面样式clientManagement.vue的样式   liuyg改*/
-.el-card__body .city1 {
-  width: 155px;
-  padding-right: 0px !important;
-  margin-left: $city-m-l;
-}
+  /*页面样式clientManagement.vue的样式   liuyg改*/
+  .el-card__body .city1 {
+    width: 155px;
+    padding-right: 0px !important;
+    margin-left: $city-m-l;
+  }
 
-.el-card__body .city2 {
-  width: 100px;
-  padding-left: 0px !important;
-  padding-right: 0px !important;
-  margin-left: $city-m-l;
-}
+  .el-card__body .city2 {
+    width: 100px;
+    padding-left: 0px !important;
+    padding-right: 0px !important;
+    margin-left: $city-m-l;
+  }
 
-.el-card__body .city3 {
-  width: 100px;
-  padding-left: 0px !important;
-  padding-right: 0px !important;
-  margin-left: $city-m-l;
-}
+  .el-card__body .city3 {
+    width: 100px;
+    padding-left: 0px !important;
+    padding-right: 0px !important;
+    margin-left: $city-m-l;
+  }
 
-/*新增窗体样式*/
-.el-dialog .city1 {
-  width: 210px;
-  padding-right: 0px !important;
-  margin-left: $city-m-l;
-}
+  /*新增窗体样式*/
+  .el-dialog .city1 {
+    width: 210px;
+    padding-right: 0px !important;
+    margin-left: $city-m-l;
+  }
 
-.el-dialog .city2 {
-  width: 105px;
-  padding-left: 5px !important;
-  padding-right: 5px !important;
-  margin-left: $city-m-l;
-}
+  .el-dialog .city2 {
+    width: 105px;
+    padding-left: 5px !important;
+    padding-right: 5px !important;
+    margin-left: $city-m-l;
+  }
 
-.el-dialog .city3 {
-  width: 105px;
-  padding-left: 0px !important;
-  padding-right: 0px !important;
-  margin-left: $city-m-l;
-}
-.city2 div label {
-  display: none;
-}
+  .el-dialog .city3 {
+    width: 105px;
+    padding-left: 0px !important;
+    padding-right: 0px !important;
+    margin-left: $city-m-l;
+  }
+  .city2 div label {
+    display: none;
+  }
 
-.city3 div label {
-  display: none;
-}
+  .city3 div label {
+    display: none;
+  }
 
-/*页面样式*/
-.el-card__body .cityClass1 {
-  width: 155px;
-  padding-right: 0px !important;
-  margin-left: $city-m-l;
-}
+  /*页面样式*/
+  .el-card__body .cityClass1 {
+    width: 155px;
+    padding-right: 0px !important;
+    margin-left: $city-m-l;
+  }
 
-.el-card__body .cityClass2 {
-  width: 100px;
-  padding-left: 0px !important;
-  padding-right: 0px !important;
-  margin-left: $city-m-l;
-}
+  .el-card__body .cityClass2 {
+    width: 100px;
+    padding-left: 0px !important;
+    padding-right: 0px !important;
+    margin-left: $city-m-l;
+  }
 
-.el-card__body .cityClass3 {
-  width: 100px;
-  padding-left: 0px !important;
-  padding-right: 0px !important;
-  margin-left: $city-m-l;
-}
+  .el-card__body .cityClass3 {
+    width: 100px;
+    padding-left: 0px !important;
+    padding-right: 0px !important;
+    margin-left: $city-m-l;
+  }
 
-/*新增窗体样式*/
-.el-dialog .cityClass1,
-.el-dialog .cityClass2,
-.el-dialog .cityClass3 {
-  margin-left: $city-m-l;
-  position: relative;
-  left: -10px;
-}
-.el-dialog .cityClass1 {
-  width: 220px;
-  padding-right: 0px !important;
-}
+  /*新增窗体样式*/
+  .el-dialog .cityClass1,
+  .el-dialog .cityClass2,
+  .el-dialog .cityClass3 {
+    margin-left: $city-m-l;
+    position: relative;
+    left: -10px;
+  }
+  .el-dialog .cityClass1 {
+    width: 220px;
+    padding-right: 0px !important;
+  }
 
-.el-dialog .cityClass2 {
-  width: 130px;
-  padding-left: 5px !important;
-  padding-right: 5px !important;
-}
+  .el-dialog .cityClass2 {
+    width: 130px;
+    padding-left: 5px !important;
+    padding-right: 5px !important;
+  }
 
-.el-dialog .cityClass3 {
-  width: 130px;
-  padding-left: 0px !important;
-  padding-right: 0px !important;
-}
+  .el-dialog .cityClass3 {
+    width: 130px;
+    padding-left: 0px !important;
+    padding-right: 0px !important;
+  }
 
-.cityClass2 div label {
-  display: none;
-}
+  .cityClass2 div label {
+    display: none;
+  }
 
-.cityClass3 div label {
-  display: none;
-}
+  .cityClass3 div label {
+    display: none;
+  }
 
-.tabFontSize {
-  font-size: 15px;
-}
+  .tabFontSize {
+    font-size: 15px;
+  }
 
-.el-input__inner {
-  width: aotu;
-}
-.right-open {
-  //右侧弹窗样式
-  display: flex;
-  justify-content: center;
-  align-items: Center;
-  overflow: hidden;
-
-  .el-dialog {
-    margin: 0 auto !important;
-    height: 100%;
+  .el-input__inner {
+    width: aotu;
+  }
+  .right-open {
+    //右侧弹窗样式
+    display: flex;
+    justify-content: center;
+    align-items: Center;
     overflow: hidden;
-    position: fixed;
-    top: 0;
-    right: 0;
-    .el-dialog__body {
-      position: absolute;
-      left: 0;
-      top: 54px;
-      bottom: 0;
-      right: 0;
-      padding: 0;
-      z-index: 1;
+
+    .el-dialog {
+      margin: 0 auto !important;
+      height: 100%;
       overflow: hidden;
-      overflow-y: auto;
+      position: fixed;
+      top: 0;
+      right: 0;
+      .el-dialog__body {
+        position: absolute;
+        left: 0;
+        top: 54px;
+        bottom: 0;
+        right: 0;
+        padding: 0;
+        z-index: 1;
+        overflow: hidden;
+        overflow-y: auto;
+      }
+    }
+    @keyframes dialog-fade-in {
+      0% {
+        transform: translate3d(0, 0, 0, 100%);
+        opacity: 0;
+      }
+      100% {
+        transform: translate3d(0, 0, 0, 0);
+        opacity: 1;
+      }
+    }
+    @keyframes dialog-fade-out {
+      0% {
+        transform: translate3d(0, 0, 0);
+        opacity: 1;
+      }
+      100% {
+        transform: translate3d(0, 0, 0);
+        opacity: 0;
+      }
+    }
+    .r-o-our {
+      width: calc(100% - 2px);
+      height: calc(100% - 28px);
+      // border: hotpink 1px solid;
+      overflow: auto;
     }
   }
-  @keyframes dialog-fade-in {
-    0% {
-      transform: translate3d(0, 0, 0, 100%);
-      opacity: 0;
-    }
-    100% {
-      transform: translate3d(0, 0, 0, 0);
-      opacity: 1;
-    }
+  .diaoxianl {
+    border: 1px solid #fff;
+    color: #fff;
+    background-color: #cdcdcd;
   }
-  @keyframes dialog-fade-out {
-    0% {
-      transform: translate3d(0, 0, 0);
-      opacity: 1;
-    }
-    100% {
-      transform: translate3d(0, 0, 0);
-      opacity: 0;
-    }
+  .zaixianl {
+    border: 1px solid #fff;
+    color: #fff;
+    background-color: #32c1a2;
   }
-  .r-o-our {
-    width: calc(100% - 2px);
-    height: calc(100% - 28px);
-    // border: hotpink 1px solid;
-    overflow: auto;
+  .guzhagnl {
+    border: 1px solid #fff;
+    color: #fff;
+    background-color: #f49966;
   }
-}
-.diaoxianl {
-  border: 1px solid #fff;
-  color: #fff;
-  background-color: #cdcdcd;
-}
-.zaixianl {
-  border: 1px solid #fff;
-  color: #fff;
-  background-color: #32c1a2;
-}
-.guzhagnl {
-  border: 1px solid #fff;
-  color: #fff;
-  background-color: #f49966;
-}
-.baojinl {
-  border: 1px solid #fff;
-  color: #fff;
-  background-color: #f35b5b;
-}
+  .baojinl {
+    border: 1px solid #fff;
+    color: #fff;
+    background-color: #f35b5b;
+  }
 </style>
diff --git a/src/views/system/tenant.vue b/src/views/system/tenant.vue
index d0eb9ad..fd815ae 100644
--- a/src/views/system/tenant.vue
+++ b/src/views/system/tenant.vue
@@ -97,7 +97,7 @@
         index: true,
         selection: true,
         viewBtn: true,
-        dialogWidth: 900,
+        dialogWidth: 1000,
         dialogClickModal: false,
         column: [
           {

--
Gitblit v1.9.3