roose 5 years ago
parent
commit
e1a2ce2a2f

+ 2 - 2
src/api/index.js

@@ -1,6 +1,6 @@
 import ajax from './ajax'
-//const BASE_URL = 'http://info.windd.cn/bigScreen'
-const BASE_URL = 'http://10.16.4.12:8001'
+const BASE_URL = 'http://info.windd.cn/bigScreen'
+//const BASE_URL = 'http://10.16.4.12:8001'
 
 /**
  * 获取地区

+ 0 - 1
src/components/PatrolmanStatistics/2.vue

@@ -42,7 +42,6 @@
 
             for(let i = 0; i < this.dataArr.length; i++) {
                 const d = this.dataArr[i];
-                console.log(d.label)
                 seriesArr.push({
                     name: d.label,
                     type: 'bar',

+ 0 - 3
src/components/PatrolmanStatistics/3.vue

@@ -23,9 +23,6 @@
           async draw() {
               const result = await oldPersonSelectByJob({}, 'POST');
               this.dataArr = result;
-
-              console.log(JSON.stringify(result))
-
               const seriesArr = [];
               const titleArr = [];
 

+ 0 - 2
src/components/index/2.vue

@@ -42,7 +42,6 @@
 
                 for(let i = 0; i < this.dataArr.length; i++) {
                     const d = this.dataArr[i];
-                    console.log(d.label)
                     seriesArr.push({
                         name: d.label,
                         type: 'bar',
@@ -196,7 +195,6 @@
 
                 for(let i = 0; i < this.dataArr.length; i++) {
                     const d = this.dataArr[i];
-                    console.log(d.label)
                     seriesArr.push({
                         name: d.label,
                         type: 'bar',

+ 0 - 4
src/components/index/jlMap.vue

@@ -30,7 +30,6 @@
 
     methods: {
       backMap() {
-        console.log("0000")
         // this.$options.methods.mapChart();
         this.myChart.dispose();
         this.mapChart();
@@ -571,7 +570,6 @@
 
         // 点击触发
         myChart.on("click", param => {
-          console.log("点击了")
           if(param.data.dept3) {
             dataList=dataList.map((item)=>{
               if(param.data.name===item.name) {
@@ -632,7 +630,6 @@
 
         //展示对应的省
         function showProvince(eName,param) {
-          console.log(eName, param)
           $.getJSON(`/vueScreen/map/province/${eName}.json`, data=>{
             that.$echarts.registerMap(param, data);
             initEcharts(param);
@@ -642,7 +639,6 @@
 
         //展示对应市
         function showCitys(cName, param) {
-          console.log(cName, param)
           // 显示县级地图
           $.getJSON(`/vueScreen/map/city/${cName}.json`, data=>{
             that.$echarts.registerMap(param, data);

+ 28 - 4
src/pages/PatrolmanStatistics.vue

@@ -211,25 +211,49 @@
                 return result;
             },
             async provinceChange(val) {
-                this.citys = await this.findDept({ fid: val });
+                if(val != '' && val != null) {
+                    this.citys = await this.findDept({ fid: val });
+                } else {
+                    this.citys = [];
+                    this.areas = [];
+                    this.countys = [];
+                    this.villages = [];
+                }
                 this.dept2 = '';
                 this.dept3 = '';
                 this.dept4 = '';
                 this.dept5 = '';
             },
             async cityChange(val) {
-                this.areas = await this.findDept({ fid: val });
+                if(val != '' && val != null) {
+                    this.areas = await this.findDept({ fid: val });
+                } else {
+                    this.areas = [];
+                    this.countys = [];
+                    this.villages = [];
+                }
+
                 this.dept3 = '';
                 this.dept4 = '';
                 this.dept5 = '';
             },
             async areaChange(val) {
-                this.countys = await this.findDept({ fid: val });
+                if(val != '' && val != null) {
+                    this.countys = await this.findDept({ fid: val });
+                } else {
+                    this.countys = [];
+                    this.villages = [];
+                }
                 this.dept4 = '';
                 this.dept5 = '';
             },
             async countyChange(val) {
-                this.villages = await this.findDept({ fid: val });
+                if(val != '' && val != null) {
+                    this.villages = await this.findDept({ fid: val });
+                } else {
+                    this.villages = [];
+                }
+
                 this.dept5 = '';
             },
             //返回首页

+ 28 - 5
src/pages/Ranking.vue

@@ -164,28 +164,51 @@
                 return result;
             },
             async provinceChange(val) {
-                this.citys = await this.findDept({ fid: val });
+                if(val != '' && val != null) {
+                    this.citys = await this.findDept({ fid: val });
+                } else {
+                    this.citys = [];
+                    this.areas = [];
+                    this.countys = [];
+                    this.villages = [];
+                }
                 this.dept2 = '';
                 this.dept3 = '';
                 this.dept4 = '';
                 this.dept5 = '';
             },
             async cityChange(val) {
-                this.areas = await this.findDept({ fid: val });
+                if(val != '' && val != null) {
+                    this.areas = await this.findDept({ fid: val });
+                } else {
+                    this.areas = [];
+                    this.countys = [];
+                    this.villages = [];
+                }
+
                 this.dept3 = '';
                 this.dept4 = '';
                 this.dept5 = '';
             },
             async areaChange(val) {
-                this.countys = await this.findDept({ fid: val });
+                if(val != '' && val != null) {
+                    this.countys = await this.findDept({ fid: val });
+                } else {
+                    this.countys = [];
+                    this.villages = [];
+                }
                 this.dept4 = '';
                 this.dept5 = '';
             },
             async countyChange(val) {
-                this.villages = await this.findDept({ fid: val });
+                if(val != '' && val != null) {
+                    this.villages = await this.findDept({ fid: val });
+                } else {
+                    this.villages = [];
+                }
+
                 this.dept5 = '';
             },
-
             async loadDeptData(obj) {
                 const result = await visitDeptPage(obj, 'POST');
                 this.listData = result;

+ 28 - 4
src/pages/oldStatistics.vue

@@ -176,25 +176,49 @@
                 return result;
             },
             async provinceChange(val) {
-                this.citys = await this.findDept({ fid: val });
+                if(val != '' && val != null) {
+                    this.citys = await this.findDept({ fid: val });
+                } else {
+                    this.citys = [];
+                    this.areas = [];
+                    this.countys = [];
+                    this.villages = [];
+                }
                 this.dept2 = '';
                 this.dept3 = '';
                 this.dept4 = '';
                 this.dept5 = '';
             },
             async cityChange(val) {
-                this.areas = await this.findDept({ fid: val });
+                if(val != '' && val != null) {
+                    this.areas = await this.findDept({ fid: val });
+                } else {
+                    this.areas = [];
+                    this.countys = [];
+                    this.villages = [];
+                }
+
                 this.dept3 = '';
                 this.dept4 = '';
                 this.dept5 = '';
             },
             async areaChange(val) {
-                this.countys = await this.findDept({ fid: val });
+                if(val != '' && val != null) {
+                    this.countys = await this.findDept({ fid: val });
+                } else {
+                    this.countys = [];
+                    this.villages = [];
+                }
                 this.dept4 = '';
                 this.dept5 = '';
             },
             async countyChange(val) {
-                this.villages = await this.findDept({ fid: val });
+                if(val != '' && val != null) {
+                    this.villages = await this.findDept({ fid: val });
+                } else {
+                    this.villages = [];
+                }
+
                 this.dept5 = '';
             },