Browse Source

feat: api

烬玊 1 year ago
parent
commit
f601697132

+ 30 - 56
src/api/article_liao.js

@@ -1,70 +1,44 @@
1 1
 // 文章
2
-import axios from "../../util/ajax";
2
+import axios from "../util/ajax";
3 3
 
4
-//分页获取文章列表
5
-const queryIndexContent = (page, limit, params) =>
6
-  axios.post(`/xyjc/index-content/query/${page}/${limit}`, params);
7
-
8
-// 增加内容
9
-const addIndexContent = params => axios.post(`/xyjc/index-content/add`, params);
10
-
11
-// 编辑内容
12
-const editIndexContent = params =>
13
-  axios.post(`/xyjc/index-content/update`, params);
14
-
15
-// 删除内容
16
-const deleteIndexContent = id =>
17
-  axios.delete(`/xyjc/index-content/delete/${id}`);
18
-
19
-// 下架内容
20
-const downOffIndexContent = (id, status) =>
21
-  axios.post(`/xyjc/index-content/downOff/${id}?status=${status}`);
22
-
23
-// 根据id查询内容
24
-const detailIndexContent = id => axios.post(`/xyjc/index-content/detail/${id}`);
4
+const qualificationExamine = (params) => axios.post('/dash/employee/qualification/examine',params)
25 5
 
26
-// 获取算法商城文章列表
27
-const queryAlgorithmList = (page, limit, params) =>
28
-  axios.post(`/xyjc/algorithm-mall/query/${page}/${limit}`, params);
6
+//收费数据分析
7
+const businessAnalysisStat = (params) =>axios.post('/dash/charge/business/analysis/stat1',params)
29 8
 
30
-// 删除算法信息
31
-const deleteAlgorithm = (id) => axios.delete(`/xyjc/algorithm-mall/delete/${id}`)
9
+//支付渠道分析
10
+const businessAnalysisStat2 = (params) =>axios.post('/dash/charge/business/analysis/stat2',params)
32 11
 
33
-// 增加具体算法信息
34
-const addAlgorithm = (params) => axios.post(`/xyjc/algorithm-mall/add`, params)
12
+//催缴情况分析
13
+const businessAnalysisStat3 = (params) =>axios.post('/dash/charge/business/analysis/stat3',params)
35 14
 
36
-// 根据ID查询具体算法信息
37
-const getAlgorithmDetail = (id, hasGetChild) => axios.post(`/xyjc/algorithm-mall/detail/${id}?hasGetChild=${hasGetChild}`)
15
+//资源利用分析
16
+const parkMonitorStat = (params) =>axios.post('/dash/park/monitor/stat',params)
38 17
 
39
-// 上下架算法信息 status=0正常 1下架
40
-const downOffAlgorithm = (id, status) => axios.post(`/xyjc/algorithm-mall/downOff/${id}?status=${status}`)
18
+//停车时长分析
19
+const parkBehaviorDuration = (params) =>axios.post('/dash/park/behavior/duration',params)
41 20
 
42
-// 获取算法名称列表下拉框
43
-const getDropDownList = (params) => axios.get(`/xyjc/algorithm-mall/queryName`, { params })
21
+//停车时段分析
22
+const parkBehaviorRange = (params) =>axios.post('/dash/park/behavior/range',params)
44 23
 
45
-// 编辑具体算法信息
46
-const updateAlgorithm = (params) => axios.post(`/xyjc/algorithm-mall/update`, params)
24
+//临时停车分析
25
+const parkBehaviorTemporary = (params) =>axios.post('/dash/park/behavior/temporary',params)
47 26
 
48
-// 下载文件
49
-const downloadFile= (id) => axios.get(`/xyjc/index-files/download/${id}`, {responseType: 'blob'})
27
+//泊位饱和度
28
+const dashBerthRoadStat1 = (params) =>axios.post('/dash/berth/road/stat1',params)
50 29
 
51
-//从业人员考核
52
-const qualificationExamine = (params) => axios.post('/dash/employee/qualification/examine',params)
30
+//路段泊位周转率
31
+const dashBerthRoadStat2 = (params) =>axios.post('/dash/berth/road/stat2',params)
53 32
 
54 33
 export default {
55
-  queryIndexContent,
56
-  addIndexContent,
57
-  editIndexContent,
58
-  deleteIndexContent,
59
-  downOffIndexContent,
60
-  detailIndexContent,
61
-  queryAlgorithmList,
62
-  deleteAlgorithm,
63
-  addAlgorithm,
64
-  getAlgorithmDetail,
65
-  downOffAlgorithm,
66
-  getDropDownList,
67
-  updateAlgorithm,
68
-  downloadFile,
69
-  qualificationExamine
34
+  qualificationExamine,
35
+  businessAnalysisStat,
36
+  businessAnalysisStat2,
37
+  businessAnalysisStat3,
38
+  parkMonitorStat,
39
+  parkBehaviorDuration,
40
+  parkBehaviorRange,
41
+  parkBehaviorTemporary,
42
+  dashBerthRoadStat1,
43
+  dashBerthRoadStat2
70 44
 };

+ 17 - 9
src/pages/index/components/berth_road.vue

@@ -106,6 +106,7 @@ import piechart from "@/components/pieChart";
106 106
 import linechart from "@/components/lineChart";
107 107
 import barchart from "@/components/barChart";
108 108
 import vtable from "@/components/vtableNew";
109
+import article_liao from "../../../api/article_liao";
109 110
 
110 111
 
111 112
 export default {
@@ -113,7 +114,8 @@ export default {
113 114
     piechart,
114 115
     linechart,
115 116
     barchart,
116
-    vtable
117
+    vtable,
118
+    article_liao
117 119
   },
118 120
   data() {
119 121
     return {
@@ -124,25 +126,21 @@ export default {
124 126
       linedata: [{month: '星期一',lastYearAmount: 44, thisYearAmount: 440}, {month: '星期二', lastYearAmount:55, thisYearAmount:505}
125 127
         , {month: '星期三', lastYearAmount:71, thisYearAmount:414}, {month: '星期四', lastYearAmount:67, thisYearAmount:301}, {month: '星期五', lastYearAmount:52, thisYearAmount:327}
126 128
         , {month: '星期六', lastYearAmount:103, thisYearAmount:413}, {month: '星期天', lastYearAmount:89, thisYearAmount:671}],
127
-      linedata1: [{month: '星期一', lastAmount: 40}, {month: '星期二', lastAmount:31}
128
-        , {month: '星期三', lastAmount:43}, {month: '星期四', lastAmount:20}, {month: '星期五', lastAmount:51}
129
-        , {month: '星期六', lastAmount:25}, {month: '星期天', lastAmount:39}],
129
+      linedata1: [],
130 130
       linedata2: [{month: '星期一',lastYearAmount: 21, thisYearAmount: 31}, {month: '星期二', lastYearAmount:38, thisYearAmount:32}
131 131
         , {month: '星期三', lastYearAmount:27, thisYearAmount:43}, {month: '星期四', lastYearAmount:43, thisYearAmount:45}, {month: '星期五', lastYearAmount:42, thisYearAmount:44}
132 132
         , {month: '星期六', lastYearAmount:78, thisYearAmount:52}, {month: '星期天', lastYearAmount:90, thisYearAmount:67}],
133
-      bardata: [{month: '星期一', hs: 120, cs: 200},{month: '星期二', hs: 115, cs: 200}
134
-        ,{month: '星期三', hs:107, cs: 200},{month: '星期四', hs:97, cs: 300},{month: '星期五', hs:87, cs:300}
135
-        ,{month: '星期六', hs: 180, cs: 110},{month: '星期天', hs: 185, cs: 140},],
136
-
133
+      bardata: [],
137 134
     }
138 135
   },
139 136
   mounted() {
137
+    this.dashBerthRoadStat1()
138
+    this.dashBerthRoadStat2()
140 139
   },
141 140
   watch: {
142 141
 
143 142
   },
144 143
   methods: {
145
-
146 144
     lineTooltipFormat1(params) {
147 145
       const data = params[0].data;
148 146
       return `<div class="line-tooltip">
@@ -190,6 +188,16 @@ export default {
190 188
         params[0].data.cs || "--"}个</div>
191 189
 </div>`;
192 190
     },
191
+    dashBerthRoadStat1(){
192
+      article_liao.dashBerthRoadStat1().then(res =>{
193
+        this.bardata = res.data
194
+      })
195
+    },
196
+    dashBerthRoadStat2(){
197
+      article_liao.dashBerthRoadStat2().then(res =>{
198
+        this.linedata1 = res.data
199
+      })
200
+    },
193 201
   }
194 202
 }
195 203
 </script>

+ 24 - 7
src/pages/index/components/charge_business_analysis.vue

@@ -54,26 +54,29 @@
54 54
 <script>
55 55
 import piechart from "@/components/pieChart";
56 56
 import barchart from "@/components/barChart";
57
-
57
+import article_liao from "../../../api/article_liao";
58 58
 
59 59
 export default {
60 60
   components: {
61 61
     piechart,
62 62
     barchart,
63
+    article_liao
63 64
   },
64 65
   data() {
65 66
     return {
66 67
       modelPieColor: ["#4382f6","#9078f8", "#79a7db", "#FF9800", "#9C27B0"],
67 68
       modelPieColor1: ["#4382f6","#9078f8", "#6aa1e1", "#FF9800", "#9C27B0"],
68 69
       modelData: {
69
-        list: [{name: '微信支付', value: 5580}, {name: '支付宝支付', value:6155},{name: '银行卡支付', value:3160}, {name: '现金支付', value:4200},{name: '其他', value:800}],
70
-        list1: [{name: '已催缴', value: 600}, {name: '未催缴', value:2350},{name: '部分催缴', value:1100}, {name: '催缴无效', value: 250}]
70
+        list: [],
71
+        list1: []
71 72
       },
72
-      bardata: [{month: '市图书馆停车场', hs: 2350, cs: 2150},{month: '中山公园停车场', hs:3600, cs:3160},{month: '天地广场停车场', hs:2500, cs:2170}
73
-        ,{month: '市中心医院停车场', hs:3450, cs:3010},{month: '建设路停车场', hs:3155, cs:2950}],
73
+      bardata: []
74 74
     }
75 75
   },
76 76
   mounted() {
77
+    this.businessAnalysisStat()
78
+    this.businessAnalysisStat2()
79
+    this.businessAnalysisStat3()
77 80
   },
78 81
   watch: {
79 82
 
@@ -89,14 +92,28 @@ export default {
89 92
         params[0].data.cs || "--"}元</div>
90 93
 </div>`;
91 94
     },
95
+    businessAnalysisStat(){
96
+      article_liao.businessAnalysisStat().then(res =>{
97
+        this.bardata = res.data
98
+      })
99
+    },
100
+    businessAnalysisStat2(){
101
+      article_liao.businessAnalysisStat2().then(res =>{
102
+        this.modelData.list = res.data
103
+      })
104
+    },
105
+    businessAnalysisStat3(){
106
+      article_liao.businessAnalysisStat3().then(res =>{
107
+        this.modelData.list1 = res.data
108
+      })
109
+    },
92 110
     xLabelFormat(name) {
93 111
       const nameArr = []
94 112
       for(let i=0; i<name.length; i+=7) {
95 113
         nameArr.push(name.substring(i, i+7))
96 114
       }
97 115
       return nameArr.join('\n');
98
-    },
99
-
116
+    }
100 117
   }
101 118
 }
102 119
 </script>

File diff suppressed because it is too large
+ 19 - 60
src/pages/index/components/park_bahavior.vue


+ 11 - 31
src/pages/index/components/park_monitor.vue

@@ -12,9 +12,10 @@
12 12
           id="chart1"
13 13
           :radiusArr="['30%', '70%']"
14 14
           :colorArr="modelPieColor"
15
-          :labelFormat="['{name|{b}}', '{sub|{@value}万元 {d}%}', '{hr|}']"
15
+          :labelFormat="['{mouth|{b}}', '{sub|{@thisYearAmount}-{d}%}', '{hr|}']"
16 16
           :dataset="modelData.list"
17
-          :encode="{ itemName: 'name', value: 'value' }"
17
+          :roseType="false"
18
+          :encode="{ itemName: 'mouth', value: 'thisYearAmount' }"
18 19
         />
19 20
       </div>
20 21
     </div>
@@ -58,17 +59,19 @@
58 59
 import api from "@/api/audit.js";
59 60
 import piechart from "@/components/pieChart";
60 61
 import vtable from "@/components/vtableNew";
62
+import article_liao from "../../../api/article_liao";
61 63
 
62 64
 export default {
63 65
   components: {
64 66
     piechart,
65
-    vtable
67
+    vtable,
68
+    article_liao
66 69
   },
67 70
   data() {
68 71
     return {
69 72
       modelPieColor: ["#4382f6","#9078f8"],
70 73
       modelData: {
71
-        list: [{name: '占用位', value: 100}, {name: '空闲位', value: 100}]
74
+        list: []
72 75
       },
73 76
       linedata: [{month: '11', lastYearAmount: 20, thisYearAmount: 30}, {month: '12', lastYearAmount: 40, thisYearAmount: 50}],
74 77
       bardata: [{month: '01', hs: 100, cs: 200},{month: '02', hs: 300, cs: 200},{month: '03', hs: 400, cs: 200},],
@@ -174,13 +177,10 @@ export default {
174 177
       radio: '2',
175 178
       dialogVisible: false,
176 179
       selRow: {},
177
-      searchWords: undefined,
178
-      searchWords2: undefined,
179
-      searchWords3: undefined
180 180
     }
181 181
   },
182 182
   mounted() {
183
-    this.getTableData()
183
+    this.parkMonitorStat()
184 184
   },
185 185
   watch: {
186 186
   },
@@ -195,18 +195,9 @@ export default {
195 195
     handleCancelApply(row) {
196 196
       console.log('enter handle cancel apply')
197 197
     },
198
-    handleConfirm() {
199
-      const {id} = this.selRow
200
-      console.log('radio', this.radio)
201
-      api.applyResource({id, applyType: this.radio}).then(res => {
202
-        if(res.success) {
203
-          this.dialogVisible = false
204
-          this.$message({
205
-            message: '审核成功!',
206
-            type: 'success'
207
-          })
208
-          this.getTableData()
209
-        }
198
+    parkMonitorStat(){
199
+      article_liao.parkMonitorStat().then(res =>{
200
+        this.modelData.list = res.data
210 201
       })
211 202
     },
212 203
     getTableData() {
@@ -221,17 +212,6 @@ export default {
221 212
         this.total = res.data.total
222 213
       })
223 214
     },
224
-    getApplyTypeText(val) {
225
-      if (!val){
226
-        return '未申请'
227
-      }
228
-      const textMap = {
229
-        1: '待审批',
230
-        2: '审批通过',
231
-        3: '审批驳回'
232
-      }
233
-      return textMap[val]
234
-    },
235 215
     handleSearch() {
236 216
       this.pageNum = 1
237 217
       this.getTableData()