浏览代码

报警获取数据方式及方法定义修改

lizaixun 4 年之前
父节点
当前提交
a1ec1b31ee
共有 1 个文件被更改,包括 8 次插入16 次删除
  1. 8 16
      src/views/rankingIndex/RankingCallThePolice.vue

+ 8 - 16
src/views/rankingIndex/RankingCallThePolice.vue

@@ -52,12 +52,12 @@
             @sort-change="changeTableSort"
             style="font-size: 10px;margin-top:1%">
             <el-table-column label="报警信息统计排行">
-            <el-table-column
+            <!-- <el-table-column
               type="index"
               width="40">
-            </el-table-column>
+            </el-table-column> -->
             <el-table-column
-              prop="num"
+              type="index"
               label="序号"
                width="605">
             </el-table-column>
@@ -68,7 +68,7 @@
             </el-table-column>
             <el-table-column
             :sortable="'custom'"
-              prop="frequency"
+              prop="frequencyday"
               label="频率(次)"
                width="605">
             </el-table-column>
@@ -127,8 +127,8 @@ export default {
         queryApData() {
             this.callThePolicRateData();
             this.$nextTick(function() {
-			this.getChartDataImport('chartHistogram')
-		})
+			    this.getChartDataImport('chartHistogram')
+		    })
         },
         
         headStyle() {
@@ -177,17 +177,10 @@ export default {
             callThePolicRateData.append('endDate',this.endDate);
             this.$http.post('/leaderboard/querywarningStatistical',callThePolicRateData).then((res) => {
                 this.gridData = res.data.data
-            })
-            this.charFreData = [];
-            this.charNameData = [];
-            var callThePolicRateChartData = new URLSearchParams();
-            callThePolicRateChartData.append('type',this.value);
-			callThePolicRateChartData.append('beginDate',this.beginDate);
-            callThePolicRateChartData.append('endDate',this.endDate);
-            this.$http.post('/leaderboard/querywarningStatistical',callThePolicRateChartData).then((res) => {
                 this.gridDataChart = res.data.data
+                console.log(this.gridData)
                 for(let i=0;i<this.gridDataChart.length;i++){
-                    this.charFreData.push(this.gridDataChart[i].frequency);
+                    this.charFreData.push(this.gridDataChart[i].frequencyday);
                     this.charNameData.push(this.gridDataChart[i].name);
                 }
                 console.log(this.charNameData)
@@ -195,7 +188,6 @@ export default {
 			        this.getChartDataImport('chartHistogram')
 		        })
             })
-           
             
         },
         toExcel(){