瀏覽代碼

修改部分接口 BUG

huangweihang 3 年之前
父節點
當前提交
49a031f3f0

+ 16 - 132
src/configure.ts

@@ -14,6 +14,8 @@ if (urlIp.indexOf("10.10.11") < 0) {
         geometryService = "http://223.86.170.232:8085";
 }  
 
+const MapServerUrl = 'http://118.24.21.156:6080' // 'http://192.168.2.245:6080'
+
 var AppX = {
     root: root,
     appConfig: {
@@ -23,16 +25,21 @@ var AppX = {
         "online":true,//是否使用在线天地图
         "mainContainer": "#mainContainer",  
         "userToken": "",//系统用户token
-        "apiRoot": "http://192.168.100.204:1111",
-        //"apiRoot": "http://192.168.2.231:1111",
-        //"apiRoot": "http://xrty.vipgz4.idcfengye.com",
+        // "apiRoot": "http://192.168.2.231:1111",
+        "apiRoot": "http://xrty.vipgz4.idcfengye.com",
+        "timeOut": {
+            "warring": 1000 * 60 * 5,
+            "mapWarring": 1000 * 60 * 5,
+            "waterState": 1000 * 60 * 5,
+            "processMap": 1000 * 60 * 5,
+        },
         "dapingRoot":"/gis",
         //"dapingRoot":"/tofly-xrtygisch",//大屏接口前缀
+        "ApiToken": "013dd1fe-7eb0-4523-82e6-717fb9671611",
         "tdtKey":"700ea8c1e2dd873c349dc880169fd96d",
         "wkid":4490,
         "geographical":true,//是否为地理坐标,以便工具使用
-        //"font_url":"http://118.24.21.156:8099/arcgis_js_api/library/fonts/",    
-        "font_url":"http://192.168.100.204:8099/arcgis_js_api/library/fonts/",    
+        "font_url":"http://118.24.21.156:8099/arcgis_js_api/library/fonts/",        
         "initextent": {xmin: 104.438132608 , ymin: 30.843883235,xmax: 104.466086516,ymax: 30.868439273,spatialReference: { wkid: 4490 }},//地图初始范围 
         "riverextent":{xmin: 104.438132608 , ymin: 30.843883235,xmax: 104.466086516,ymax: 30.868439273,spatialReference: { wkid: 4490 }},
         "loadOnStartWidgets": [
@@ -156,17 +163,6 @@ var AppX = {
                 "depend": "BaseWidget",
                 "optional": false
             },
-            {
-                "subsys": "gis",
-                "name": "Camara",
-                "discription": "视频监控",
-                "url": "widgets/Camara",
-                "main": "Widget",
-                "configPath": "",
-                "templatePath": "",
-                "depend": "BaseWidget",
-                "optional": false
-            },
             {
                 "subsys": "gis",
                 "name": "Warning",
@@ -282,7 +278,7 @@ var AppX = {
                 "config": 
                     {
                         "name": "管道地图",
-                        "url": "http://192.168.100.202:6080/arcgis/rest/services/xrty/pipe_dptysw/MapServer"
+                        "url": MapServerUrl + "/arcgis/rest/services/xrty/pipe_dptysw/MapServer"
                     }                
             },
             "river_thema": {
@@ -291,7 +287,7 @@ var AppX = {
                 "config": 
                     {
                         "name": "水系专题图",
-                        "url": "http://192.168.100.202:6080/arcgis/rest/services/xrty/pipe_river/MapServer"
+                        "url": MapServerUrl + "/arcgis/rest/services/xrty/pipe_river/MapServer"
                     }                
             },
             "geometry": {
@@ -300,7 +296,7 @@ var AppX = {
                 "config": 
                     {
                         "name": "几何服务",
-                        "url": "http://192.168.100.202:6080/arcgis/rest/services/Utilities/Geometry/GeometryServer"
+                        "url": MapServerUrl + "/arcgis/rest/services/Utilities/Geometry/GeometryServer"
                     }                
             },
             "themapipe": {
@@ -309,122 +305,10 @@ var AppX = {
                 "config": 
                     {
                         "name": "管线专题服务",
-                        "url": "http://192.168.100.202:6080/arcgis/rest/services/xrty/pipe_tysw/MapServer/14"
+                        "url": MapServerUrl + "/arcgis/rest/services/xrty/pipe_tysw/MapServer/14"
                     }                
             }
         }
-
-        // "gisResource": {
-        //     "tdt_raster": {
-        //         "groupname": "离线影像服务",
-        //         "type": "tiled",
-        //         "config":
-        //         {
-        //                 "name": "影像地图",
-        //                 // "url": "http://192.168.2.169:6080/arcgis/rest/services/xrty/tysw_img/MapServer"
-        //                 "url":"http://192.168.2.169:6080/arcgis/rest/services/xrty/test/MapServer"
-        //         }            
-        //     },
-        //     "tdtano_raster": {
-        //         "groupname": "离线影像地名服务",
-        //         "type": "tiled",
-        //         "config":
-        //         {
-        //                 "name": "影像地名",
-        //                 "url": "http://192.168.2.169:6080/arcgis/rest/services/xrty/tysw_imgano/MapServer"
-        //         }            
-        //     },
-        //     "tdt_terrain": {
-        //         "groupname": "离线矢量服务",
-        //         "type": "tiled",
-        //         "config":
-        //             {
-        //                 "name": "矢量地图",
-        //                 "url": "http://192.168.2.169:6080/arcgis/rest/services/xrty/tysw_vec/MapServer"
-        //             }
-        //     },
-        //     "tdtano_terrain": {
-        //         "groupname": "离线矢量地名服务",
-        //         "type": "tiled",
-        //         "config":
-        //             {
-        //                 "name": "矢量地名",
-        //                 "url": "http://192.168.2.169:6080/arcgis/rest/services/xrty/tysw_vecano/MapServer"
-        //             }
-        //     },
-        //     "tdt_dynamic": {
-        //         "groupname": "天地图矢量服务",
-        //         "type": "tiled",
-        //         "config":
-        //             {
-        //                 "name": "矢量地图",
-        //                 "url": "tdt_dynamic"
-        //             }
-        //     },
-        //     "tdtimg_dynamic": {
-        //         "groupname": "天地图影像服务",
-        //         "type": "tiled",
-        //         "config": 
-        //             {
-        //                 "name": "影像地图",
-        //                 "url": "tdtimg_dynamic"
-        //             }
-        //     },
-        //     "tdtano_dynamic": {
-        //         "groupname": "天地图注记服务",
-        //         "type": "tiled",
-        //         "config": 
-        //             {
-        //                 "name": "影像地名",
-        //                 "url": "tdtano_dynamic"
-        //             }
-        //     },
-        //     "tdtvecano_dynamic": {
-        //         "groupname": "天地图注记服务",
-        //         "type": "tiled",
-        //         "config": 
-        //             {
-        //                 "name": "矢量地名",
-        //                 "url": "tdtano_dynamic"
-        //             }
-        //     },
-        //     "pipe": {
-        //         "groupname": "管道服务",
-        //         "type": "dynamic",
-        //         "config": 
-        //             {
-        //                 "name": "管道地图",
-        //                 "url": "http://118.24.21.156:6080/arcgis/rest/services/xrty/pipe_dptysw/MapServer"
-        //             }                
-        //     },
-        //     "river_thema": {
-        //         "groupname": "水系专题图服务",
-        //         "type": "dynamic",
-        //         "config": 
-        //             {
-        //                 "name": "水系专题图",
-        //                 "url": "http://118.24.21.156:6080/arcgis/rest/services/xrty/pipe_river/MapServer"
-        //             }                
-        //     },
-        //     "geometry": {
-        //         "groupname": "几何服务",
-        //         "type":"geometry",
-        //         "config": 
-        //             {
-        //                 "name": "几何服务",
-        //                 "url": "http://118.24.21.156:6080/arcgis/rest/services/Utilities/Geometry/GeometryServer"
-        //             }                
-        //     },
-        //     "themapipe": {
-        //         "groupname": "管线专题服务",
-        //         "type":"featureserver",
-        //         "config": 
-        //             {
-        //                 "name": "管线专题服务",
-        //                 "url": "http://118.24.21.156:6080/arcgis/rest/services/xrty/pipe_tysw/MapServer/14"
-        //             }                
-        //     }
-        // }
     },
 
     // 运行时配置

+ 3 - 0
src/css/style.scss

@@ -308,6 +308,9 @@ div::-webkit-scrollbar-thumb:hover {
 .esri-view-height-xlarge .esri-popup__main-container {
     width: 920px;
 }
+.esri-ui {
+    z-index: 2;
+}
 .esri-ui .esri-popup {
     margin-bottom: 100px;
 }

+ 4 - 4
src/index.html

@@ -5,8 +5,8 @@
     <meta charset="utf-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
     <title></title>
-    <link rel="stylesheet" href="http://192.168.100.204:8099/arcgis_js_api/library/4.16/esri/css/main.css">
-    <!-- <link rel="stylesheet" href="http://118.24.21.156:8099/arcgis_js_api/library/4.16/esri/css/main.css"> -->
+    <!-- <link rel="stylesheet" href="http://192.168.100.204:8099/arcgis_js_api/library/4.16/esri/css/main.css"> -->
+    <link rel="stylesheet" href="http://118.24.21.156:8099/arcgis_js_api/library/4.16/esri/css/main.css">
     <!-- <link rel="stylesheet" href="http://192.168.2.238:8080/arcgis_js_api/v416/arcgis_js_api/library/4.16/esri/css/main.css"> -->
     <link href="css/style.css" rel="stylesheet" />
     <link rel="stylesheet" href="vendor/bootstrap/css/bootstrap.min.css">
@@ -60,8 +60,8 @@
     <script src="vendor/toflyUI/toflyUI.js"></script> 
     <script src="vendor/jquery-viewer/js/viewer.js"></script>
     <script src="vendor/liMarquee/jquery.liMarquee.js"></script>
-    <script src="http://192.168.100.204:8099/arcgis_js_api/library/4.16/dojo/dojo.js"></script>
-    <!-- <script src="http://118.24.21.156:8099/arcgis_js_api/library/4.16/dojo/dojo.js"></script> -->
+    <!-- <script src="http://192.168.100.204:8099/arcgis_js_api/library/4.16/dojo/dojo.js"></script> -->
+    <script src="http://118.24.21.156:8099/arcgis_js_api/library/4.16/dojo/dojo.js"></script>
     <!-- <script src="http://192.168.2.238:8080/arcgis_js_api/v416/arcgis_js_api/library/4.16/dojo/dojo.js"></script> -->
     <script>
         require(["./main.js", "dojo/domReady!"]);

+ 24 - 24
src/vendor/bootstrap-datetimepicker/css/bootstrap-datetimepicker.css

@@ -8,17 +8,17 @@
  *
  */
 .datetimepicker {
-	padding: 4px;
-	margin-top: 1px;
-	-webkit-border-radius: 4px;
-	-moz-border-radius: 4px;
-	border-radius: 4px;
+	padding: 8px;
+	margin-top: 2px;
+	-webkit-border-radius: 8px;
+	-moz-border-radius: 8px;
+	border-radius: 8px;
 	direction: ltr;
     color: #fff;
 }
 
 .datetimepicker-inline {
-	width: 220px;
+	width: 440px;
 }
 
 .datetimepicker.datetimepicker-rtl {
@@ -37,9 +37,9 @@
 [class*=" datetimepicker-dropdown"]:before {
 	content: '';
 	display: inline-block;
-	border-left: 7px solid transparent;
-	border-right: 7px solid transparent;
-	border-bottom: 7px solid #cccccc;
+	border-left: 14px solid transparent;
+	border-right: 14px solid transparent;
+	border-bottom: 14px solid #cccccc;
 	border-bottom-color: rgba(0, 0, 0, 0.2);
 	position: absolute;
 }
@@ -47,18 +47,18 @@
 [class*=" datetimepicker-dropdown"]:after {
 	content: '';
 	display: inline-block;
-	border-left: 6px solid transparent;
-	border-right: 6px solid transparent;
-	border-bottom: 6px solid #ffffff;
+	border-left: 12px solid transparent;
+	border-right: 12px solid transparent;
+	border-bottom: 12px solid #ffffff;
 	position: absolute;
 }
 
 [class*=" datetimepicker-dropdown-top"]:before {
 	content: '';
 	display: inline-block;
-	border-left: 7px solid transparent;
-	border-right: 7px solid transparent;
-	border-top: 7px solid #cccccc;
+	border-left: 14px solid transparent;
+	border-right: 14px solid transparent;
+	border-top: 14px solid #cccccc;
 	border-top-color: rgba(0, 0, 0, 0.2);
 	border-bottom: 0;
 }
@@ -66,9 +66,9 @@
 [class*=" datetimepicker-dropdown-top"]:after {
 	content: '';
 	display: inline-block;
-	border-left: 6px solid transparent;
-	border-right: 6px solid transparent;
-	border-top: 6px solid #ffffff;
+	border-left: 12px solid transparent;
+	border-right: 12px solid transparent;
+	border-top: 12px solid #ffffff;
 	border-bottom: 0;
 }
 
@@ -294,7 +294,7 @@
 
 .datetimepicker table tr td span {
 	display: block;
-	width: 23%;
+	width: 30%;
 	height: 54px;
 	line-height: 54px;
 	float: left;
@@ -306,8 +306,8 @@
 }
 
 .datetimepicker .datetimepicker-hours span {
-	height: 26px;
-	line-height: 26px;
+	height: 2vh;
+	line-height: 2vh;
 }
 
 .datetimepicker .datetimepicker-hours table tr td span.hour_am,
@@ -322,8 +322,8 @@
 }
 
 .datetimepicker .datetimepicker-minutes span {
-	height: 26px;
-	line-height: 26px;
+	height: 2vh;
+	line-height: 2vh;
 }
 
 .datetimepicker table tr td span:hover {
@@ -397,7 +397,7 @@
 }
 
 .datetimepicker th.switch {
-	width: 145px;
+	width: 290px;
 }
 
 .datetimepicker th span.glyphicon {

文件差異過大導致無法顯示
+ 1 - 1
src/vendor/bootstrap/css/bootstrap.min.css


+ 1 - 0
src/widgets/Header/Widget.ts

@@ -12,6 +12,7 @@ class Header extends BaseWidget {
      * 初始化启动
      */
     startup() {
+        return
         this.setHtml(this.template, ".body");
         this.ready();
         this.loadTime();

+ 3 - 2
src/widgets/MapWarring/Widget.ts

@@ -117,12 +117,13 @@ class MapWarring extends BaseWidget {
         }
         
     }
+    setInterval(_ => this.warringReload(), this.AppX.appConfig.timeOut.mapWarring)
   }  
 
   warringReload() {
     $.ajax({  //结果
-      url: this.AppX.appConfig.apiRoot + '/gis/bigScreen/warnHistory?isconfirm=0&current=1&size=50', type: 'GET',
-      success: (res) => res.code == 1 ? addWariingOnMap(res.result.records) : console.error(res),
+      url: this.AppX.appConfig.apiRoot + '/gis/bigScreen/getWarn', type: 'GET',
+      success: (res) => res.code == 1 ? addWariingOnMap(res.result) : console.error(res),
       error: (e) => console.error(e)
     })
     var addWariingOnMap = (warring) => {

+ 10 - 11
src/widgets/ProcessMap/Widget.ts

@@ -14,7 +14,7 @@ class ProcessMap extends BaseWidget {
   baseClass: string = "widgets-processmap";  
   ids: '';
   scada: any;
-  nextDo: 0;
+  nextDo: number;
   chart: any;
   selectSite: any;
   date1: HTMLInputElement;
@@ -250,7 +250,7 @@ class ProcessMap extends BaseWidget {
       $.ajax({  //结果
         url: this.AppX.appConfig.apiRoot + '/gis/bigScreen/getSiteInfos?stids=' + this.ids,  
         type: 'GET',
-        success: function (data) {
+        success: (data) => {
           if(data.code == 1) {
             data = data.result
             for(var item in data) {
@@ -265,11 +265,10 @@ class ProcessMap extends BaseWidget {
               }
             }
           }
-          this.nextDo = setTimeout(loadInfo, 1000 * 60 * 5)
+          this.nextDo = setTimeout(loadInfo, this.AppX.appConfig.timeOut.processMap)
         },
         error: function (e) {
-          console.error(e);
-          this.nextDo = setTimeout(loadInfo, 1000 * 60 * 5)
+          console.error(e)
         }.bind(this)
       })
     }
@@ -320,7 +319,7 @@ class ProcessMap extends BaseWidget {
     tableJq.dataTable().fnDestroy()
     $.ajax({  //结果
       url: this.AppX.appConfig.apiRoot + '/gis/bigScreen/getIndexInfo?code=1&stid=' + 
-        stid + '&itnm=' + zbx.replace(/#/g, '%23') + '&start=' + times[0] + '&end=' + times[1],
+        stid + '&itnm=' + zbx.replace(/#/g, '%23').replace(/&/g, '%26') + '&start=' + times[0] + '&end=' + times[1],
       type: 'GET',
       success: (res) => {
         var chart = this.chart
@@ -389,9 +388,9 @@ class ProcessMap extends BaseWidget {
                 return [date.getFullYear(), date.getMonth() + 1, date.getDate()].join('-') + '\n' + time.join(':')
                 }
               }],
-              toolbox: { feature: { saveAsImage: {} } },
-              tooltip: { 
-              trigger: 'axis',
+            toolbox: { feature: { saveAsImage: {} } },
+            tooltip: { 
+              trigger: 'axis', padding: 10, textStyle: { fontSize: 28},
               formatter(a) {
                 a = a[0].data
                 var date = new Date(a[0])
@@ -404,7 +403,7 @@ class ProcessMap extends BaseWidget {
                 '<br>' + type + ' ' + a[1] + ' ' + unit
               } 
             },
-            xAxis: [{ name: '日期', boundaryGap: false, type: 'category',scale: true,
+            xAxis: [{ name: '日期', boundaryGap: false, scale: true, max:Xmax, min: Xmin,
               axisLabel:{
                 color: '#B5BFC8', fontSize: 24,
                 formatter(v, i) {
@@ -426,7 +425,7 @@ class ProcessMap extends BaseWidget {
               axisLine: {lineStyle: { color: '#356490', width: 4 }},
               splitLine: { lineStyle: { color: '#233E59', width: 4 } } 
             }],
-            series: [{ type: 'line', smooth: true, data: dataX, symbolSize: 16, }]
+            series: [{ type: 'line', smooth: true, symbol: 'none', data: dataX, symbolSize: 16, }]
           })
         } else this.AppX.runtimeConfig.toast.Show(res.message)
         loading.style.display = 'none'

+ 5 - 5
src/widgets/ProcessMap/config.json

@@ -8,11 +8,11 @@
   "craftConfig": [  
         { "type": "point", "id": "m1p1", "name": "基准点1", "x": [0, 250], "y": [0.4625, 0] },
         { "type": "text", "id": "m1t1", "name": "进厂口指标", "point": [1, 0.5], "from": "m1p1", "margin": { "x": [0, 30], "y": [0, 0]}, "value": [
-            { "id": "t1", "name": "进水COD", "value": 1323.32, "unit": "mg/L"},
-            { "id": "t2", "name": "进水氨氮", "value": 1323.32, "unit": "mg/L"},
-            { "id": "t3", "name": "进水锰", "value": 1323.32, "unit": "mg/L"},
-            { "id": "t4", "name": "进水温度", "value": 1323.32, "unit": "℃"},
-            { "id": "t5", "name": "进水叶绿素", "value": 1323.32, "unit": "μg/L"}
+            { "id": "t1", "name": "进水COD", "value": 1323.32, "unit": "mg/L", "itnm": "自来水二厂\\取水头\\COD.PV"},
+            { "id": "t2", "name": "进水氨氮", "value": 1323.32, "unit": "mg/L", "itnm": "自来水二厂\\取水头\\AnDan.PV"},
+            { "id": "t3", "name": "进水锰", "value": 1323.32, "unit": "mg/L", "itnm": "自来水二厂\\取水头\\Mn.PV"},
+            { "id": "t4", "name": "进水温度", "value": 1323.32, "unit": "℃", "itnm": "自来水二厂\\取水头\\TEMP.PV"},
+            { "id": "t5", "name": "进水叶绿素", "value": 1323.32, "unit": "μg/L", "itnm": "自来水二厂\\取水头\\SPAD.PV"}
         ] },
         { "type": "image", "id": "m1i1", "name": "取水头部", "class": "qushui", "text": "取水头部", "point": [0.5, 0.5], "from": "m1p1", "margin": { "x": [0, 70], "y": [0, 0]}, "width": 65, "height": 420, "src": "qushui1.png" },
         { "type": "image", "id": "m1i2", "name": "头1#阀", "point": [0.5, 0.75], "from": "m1i1", "margin": { "x": [0, 55], "y": [0, -180]}, "width": 35, "height": 45, "src": "famen.png" },

+ 2 - 2
src/widgets/Warning/Widget.ts

@@ -77,7 +77,7 @@ class Warning extends BaseWidget {
             this.toast.Show('获取报警数据失败:' + res.message)
             console.error(res)
           }
-          setTimeout(timerForLoadWarring, 1000 * 60 * 5)
+          setTimeout(timerForLoadWarring, this.AppX.appConfig.timeOut.warring)
           loading.style.display = 'none'
         },
         error: (e) => console.error(e)
@@ -270,7 +270,7 @@ class Warning extends BaseWidget {
         var id = that.id
         if(id == 'undefined') return
         $.ajax({  //结果
-            url: this.AppX.appConfig.apiRoot + '/gis/bigScreen/handleWarn?code=0&wanrIds=' + id + '&id=' + perBotton.value, type: 'GET',
+            url: this.AppX.appConfig.apiRoot + '/gis/bigScreen/handleWarnHistroy?code=0&wanrIds=' + id + '&id=' + perBotton.value, type: 'GET',
             success: (res) => {
               AppX.runtimeConfig.toast.Show(res.code == 1 ? '确认成功!' : (console.error(res), '确认失败!' + res.message));
               that.trueCallBack()

+ 1 - 0
src/widgets/Warning/css/style.scss

@@ -90,6 +90,7 @@
     position: relative;
     .botton-popup {
         position: absolute;
+        width: 220%;
         z-index: 1;
         cursor: default;
         padding: 18px;

+ 5 - 2
src/widgets/WaterInfo/Widget.ts

@@ -231,6 +231,8 @@ class WaterInfo extends BaseWidget {
     var setChart = (res) => {
       var chart = echarts.init(document.getElementById('waterInfo-c3'))
       var data = res.monSupSellWater.map(e => [e.month, e.gsl, e.ssl])
+      var yearSupSellWater = res.yearSupSellWater[0] || { gsl: '-', ssl: '-' }
+      var yearSupSellWaterPlan = res.yearSupSellWaterPlan[0] || { gsl: '-', ssl: '-' }
       chart.setOption({
         color:['rgb(52,104,252)','rgb(15,195,132)','rgb(228,218,120)', 'rgb(52,151,253)'],
         tooltip: { trigger: 'axis', padding: 10, textStyle: { fontSize: 28} }, 
@@ -253,8 +255,8 @@ class WaterInfo extends BaseWidget {
         ],
         grid: [{ right: '70%',bottom: '70px',left:'80px',top:'30px' }, { left: '40%',bottom: '70px',right:'20px',top:'40px' }],
         series: [
-          { name: '供水量', type: 'bar', stack: 'total', data: [res.yearSupSellWater[0].gsl, res.yearSupSellWater[0].ssl], itemStyle: { borderWidth:'4',borderColor:'rgba(0,0,0,0.3)' } },
-          { name: '售水量', type: 'bar', stack: 'total', data: [res.yearSupSellWaterPlan[0].gsl, res.yearSupSellWaterPlan[0].ssl], itemStyle: { borderWidth:'4',borderColor:'rgba(0,0,0,0.3)' } }, 
+          { name: '供水量', type: 'bar', stack: 'total', data: [yearSupSellWater.gsl, yearSupSellWater.ssl], itemStyle: { borderWidth:'4',borderColor:'rgba(0,0,0,0.3)' } },
+          { name: '售水量', type: 'bar', stack: 'total', data: [yearSupSellWaterPlan.gsl, yearSupSellWaterPlan.ssl], itemStyle: { borderWidth:'4',borderColor:'rgba(0,0,0,0.3)' } }, 
           { data: data.map(e => e[1]), name: '当月供水量', smooth: true, type: 'line', barWidth: '20%', xAxisIndex: 1, yAxisIndex: 1 },
           { data: data.map(e => e[2]), name: '当月售水量', smooth: true, type: 'line', barWidth: '20%', xAxisIndex: 1, yAxisIndex: 1 }
         ]
@@ -456,6 +458,7 @@ class WaterInfo extends BaseWidget {
               var dw = ['一厂', '二厂', '全部'][works.value]
               var dy = yearsSelect.value
               var dr = res[yearsSelect.value]
+              if(!dr.cost) dr.cost = {}
               var data = { 
                 year: dy, 
                 fixed: isByMonth ? Array['from']({length:12}, (e, i) => '-') : Array['from']({length:4}, (e, i) => '-'), 

+ 4 - 4
src/widgets/WaterStatus/Widget.ts

@@ -81,7 +81,7 @@ class WaterStatus extends BaseWidget {
       $.ajax({  //结果
         url: this.AppX.appConfig.apiRoot + '/gis/bigScreen/getSiteInfos?stids=' + this.ids,  
         type: 'GET',
-        success: function (data) {
+        success: (data) => {
           if(data.code == 1) {
             data = data.result
             for(var item in data) {
@@ -97,7 +97,7 @@ class WaterStatus extends BaseWidget {
             }
           }
           loading.style.display = 'none'
-          nextDo = setTimeout(loadInfo, 1000 * 60 * 5)
+          nextDo = setTimeout(loadInfo, this.AppX.appConfig.timeOut.waterState)
         },
         error: (e) => console.error(e)
       })
@@ -289,7 +289,7 @@ class WaterStatus extends BaseWidget {
               '<br>' + type + ' ' + a[1] + ' ' + unit
             } 
           },
-          xAxis: [{ name: '日期', boundaryGap: false, type: 'category',scale: true,
+          xAxis: [{ name: '日期', boundaryGap: false, scale: true, max:Xmax, min: Xmin,
             axisLabel:{
               color: '#B5BFC8', fontSize: 24,
               formatter(v, i) {
@@ -312,7 +312,7 @@ class WaterStatus extends BaseWidget {
             axisLine: {lineStyle: { color: '#356490', width: 4 }},
             splitLine: { lineStyle: { color: '#233E59', width: 4 } } 
           }],
-          series: [{ type: 'line', smooth: true, data: dataX, symbolSize: 16, }]
+          series: [{ type: 'line', smooth: true, symbol: 'none', data: dataX, symbolSize: 16, }]
         })
         } else this.AppX.runtimeConfig.toast.Show(res.message)
         loading.style.display = 'none'

+ 1 - 0
typings/locals/appx/index.d.ts

@@ -32,6 +32,7 @@ interface AppConfig {
     wkid?:any,
     userToken?:string,
     apiRoot?:string,
+    timeOut?:any,
     title?: string,
     subtitle?: string,
     version?: string,