Browse Source

接口联调

duwendi 1 year ago
parent
commit
9ac9c18264

+ 5 - 1
src/api/article_z.js

@@ -15,7 +15,7 @@ export default {
15 15
     return axios.post(`/dash/gap/analysis/stat1`, params)
16 16
   },
17 17
 
18
-  // todo 设备运营主题(地图)
18
+  //  设备运营主题(地图)
19 19
   queryServiceMap(params) {
20 20
     return axios.post(`/dash/service/operations/page`, params)
21 21
   },
@@ -75,6 +75,10 @@ export default {
75 75
   queryCustomerComplaint_Ksfx(params) {
76 76
     return axios.post(`/dash/customer/complaint/stat`, params)
77 77
   },
78
+  // todo设备运行监测_列表
79
+  sbyxjcList(params) {
80
+    return axios.get('/dash/equipment/running/page', {params})
81
+  },
78 82
   //设备运行监测_摄像头
79 83
   queryEquipmentRunning_Sxt(params) {
80 84
     return axios.post(`/dash/equipment/running/stat1`, params)

+ 14 - 6
src/api/audit.js

@@ -18,13 +18,13 @@ export default {
18 18
   tcqkbhqs(params) {
19 19
     return axios.post('/dash/gap/analysis/stat2', params)
20 20
   },
21
-  // todo 停车难易指数-地图难易指数
21
+  // 停车难易指数-地图难易指数
22 22
   dtnyzs(params) {
23
-    return axios.post('/dash/park/easy/stat', params)
23
+    return axios.post('/dash/park/easy/stat1', params)
24 24
   },
25
-  // todo 停车难易指数-折线图
25
+  // 停车难易指数-折线图
26 26
   zxt(params) {
27
-    return axios.post('/dash/park/easy/page', params)
27
+    return axios.post('/dash/park/easy/stat2', params)
28 28
   },
29 29
   // 全局停车诱导-地图难易指数
30 30
   nyzs(params) {
@@ -83,12 +83,12 @@ export default {
83 83
   zdcljcfx(params) {
84 84
     return axios.post('/dash/other/analyse/stat9', params)
85 85
   },
86
-  // todo 服务发布
86
+  // 服务发布
87 87
   serviceListByPage(params) {
88 88
     return axios.get('/dash/service/publish/page', {params})
89 89
   },
90 90
   servicePublic(params) {
91
-    return axios.post('/dash/service/publish/publish', params)
91
+    return axios.post('/dash/service/publish/save', params)
92 92
   },
93 93
   serviceSave(params) {
94 94
     return axios.post('/dash/service/publish/save', params)
@@ -148,6 +148,14 @@ export default {
148 148
   czrzDetail(params) {
149 149
     return axios.post('/dash/operation/log/detail', params)
150 150
   },
151
+  // todo 停车收费主题
152
+  tcsfListByPage(params) {
153
+    return axios.get('/dash/parking/fee/page', {params})
154
+  },
155
+  // 车主信用监管
156
+  czxyjgListByPage(params) {
157
+    return axios.get('/dash/car/owner/credit/page', {params})
158
+  },
151 159
   // 申请列表
152 160
   applyList(params) {
153 161
     return axios.get('/resourceApply/selectBackedApplyList', {params});

+ 1 - 1
src/pages/index/components/access_data_analysis.vue

@@ -39,7 +39,7 @@
39 39
         />
40 40
       </div>
41 41
       <div style="width: 50%; height: 300px">
42
-        <div align="center" style="color: white">漯河市财政局停车场</div>
42
+<!--        <div align="center" style="color: white">漯河市财政局停车场</div>-->
43 43
         <piechart
44 44
           class="model-pie-body"
45 45
           id="chart1"

+ 17 - 72
src/pages/index/components/car_owner_credit.vue

@@ -9,7 +9,7 @@
9 9
     </el-table>
10 10
     <div class="table-pagination">
11 11
       <el-pagination :background="false" layout="total, prev, pager, next" :total="total" @current-change="handlePageChange"
12
-                     :current-page.sync="pageNum5" :page-size.sync="pageSize5">
12
+                     :current-page.sync="pageNum" :page-size.sync="pageSize">
13 13
       </el-pagination>
14 14
     </div>
15 15
     <br>
@@ -30,97 +30,42 @@ export default {
30 30
       columns: [
31 31
         {
32 32
           label: '姓名',
33
-          key: 'resourceName'
33
+          key: 'name'
34 34
         },
35 35
         {
36
-          label: '欠费金额',
37
-          key: 'resourceType'
36
+          label: '联系方式',
37
+          key: 'phone'
38
+        },
39
+        {
40
+          label: '欠费总次数',
41
+          key: 'totalArrears'
42
+        } ,{
43
+          label: '欠费总钱数',
44
+          key: 'totalMoneyArrears'
38 45
         } ,{
39
-          label: '信用分',
40
-          key: 'resourceName'
46
+          label: '催缴总次数',
47
+          key: 'totalReminders'
41 48
         }
42 49
       ],
43 50
       tableData: [],
44 51
       total: 0,
45 52
       pageSize: 10,
46
-      pageNum: 1,
47
-      radio: '2',
48
-      dialogVisible: false,
49
-      selRow: {},
50
-      searchWords: undefined,
51
-      searchWords2: undefined,
53
+      pageNum: 1
52 54
     }
53 55
   },
54 56
   mounted() {
55 57
     this.getTableData()
56 58
   },
57
-  watch: {
58
-  },
59 59
   methods: {
60 60
     handlePageChange() {
61 61
       this.getTableData()
62 62
     },
63
-    handleAudit(row) {
64
-      this.selRow = row
65
-      this.dialogVisible = true
66
-    },
67
-    handleCancelApply(row) {
68
-      console.log('enter handle cancel apply')
69
-    },
70
-    handleConfirm() {
71
-      const {id} = this.selRow
72
-      api.applyResource({id, applyType: this.radio}).then(res => {
73
-        if(res.success) {
74
-          this.dialogVisible = false
75
-          this.$message({
76
-            message: '审核成功!',
77
-            type: 'success'
78
-          })
79
-          this.getTableData()
80
-        }
81
-      })
82
-    },
83 63
     getTableData() {
84
-      const {pageNum, pageSize, searchWords} = this
85
-      api.applyList({pageNum, pageSize, resourceName: searchWords}).then(res => {
86
-        this.tableData = []
87
-        res.data.records.map((item, index) => {
88
-          const newItem = {...item}
89
-          newItem.applyTypeText = this.getApplyTypeText(item.applyType)
90
-          this.tableData.push(newItem)
91
-        })
64
+      const {pageNum, pageSize} = this
65
+      api.czxyjgListByPage({current: pageNum, size: pageSize}).then(res => {
66
+        this.tableData = res.data.records || []
92 67
         this.total = res.data.total
93 68
       })
94
-    },
95
-    getTableData2() {
96
-      api.applyList({}).then(res => {
97
-        this.tableData2 =  res.data.data
98
-        this.total2 = res.data.total
99
-      })
100
-    },
101
-
102
-    getTableData3() {
103
-      api.applyList({pageNum: this.pageNum2, pageSize:this.pageSize2, resourceName: this.searchWords2}).then(res => {
104
-        this.tableData3 =  res.data.data
105
-        this.total3 = res.data.total
106
-      })
107
-    },
108
-
109
-
110
-    getApplyTypeText(val) {
111
-      if (!val){
112
-        return '未申请'
113
-      }
114
-      const textMap = {
115
-        1: '待审批',
116
-        2: '审批通过',
117
-        3: '审批驳回'
118
-      }
119
-      return textMap[val]
120
-    },
121
-    handleSearch() {
122
-      this.pageNum = 1
123
-      this.getTableData()
124 69
     }
125 70
   }
126 71
 }

+ 16 - 93
src/pages/index/components/equipment_running.vue

@@ -17,8 +17,8 @@
17 17
           :radiusArr="['30%', '70%']"
18 18
           :roseType = "false"
19 19
           :colorArr="modelPieColor"
20
-          :labelFormat="['{name|{b}}', '{sub|{@value} {d}%}', '{hr|}']"
21
-          :dataset="modelData.list"
20
+          :labelFormat="['{name|{b}}', '{sub|{@value} {d}%}', '{hr|}']"
21
+          :dataset="modelData"
22 22
           :encode="{ itemName: 'name', value: 'value' }"
23 23
         />
24 24
       </div>
@@ -31,8 +31,8 @@
31 31
           :radiusArr="['30%', '70%']"
32 32
           :roseType = "false"
33 33
           :colorArr="modelPieColor2"
34
-          :labelFormat="['{name|{b}}', '{sub|{@value} {d}%}', '{hr|}']"
35
-          :dataset="modelData2.list"
34
+          :labelFormat="['{name|{b}}', '{sub|{@value} {d}%}', '{hr|}']"
35
+          :dataset="modelData2"
36 36
           :encode="{ itemName: 'name', value: 'value' }"
37 37
         />
38 38
       </div>
@@ -45,8 +45,8 @@
45 45
           :radiusArr="['30%', '70%']"
46 46
           :roseType = "false"
47 47
           :colorArr="modelPieColor3"
48
-          :labelFormat="['{name|{b}}', '{sub|{@value} {d}%}', '{hr|}']"
49
-          :dataset="modelData3.list"
48
+          :labelFormat="['{name|{b}}', '{sub|{@value} {d}%}', '{hr|}']"
49
+          :dataset="modelData3"
50 50
           :encode="{ itemName: 'name', value: 'value' }"
51 51
         />
52 52
       </div>
@@ -78,22 +78,13 @@ export default {
78 78
         }
79 79
       ],
80 80
       modelPieColor: ["#2E8B57","#9078f8"],
81
-      modelData: {
82
-        list: [{name: '在线', value: 600}, {name: '离线', value: 800}]
83
-      },
81
+      modelData: [],
84 82
       modelPieColor2: ["#2E8B57","#9078f8"],
85
-      modelData2: {
86
-        list: [{name: '在线', value: 600}, {name: '离线', value: 800}]
87
-      },
83
+      modelData2: [],
88 84
       modelPieColor3: ["#2E8B57","#9078f8"],
89
-      modelData3: {
90
-        list: [{name: '在线', value: 600}, {name: '离线', value: 800}]
91
-      },
85
+      modelData3: [],
92 86
 
93 87
       tableData: [],
94
-      tableData2: [],
95
-      tableData3: [],
96
-      tableData4: [],
97 88
       total: 0,
98 89
       pageSize: 10,
99 90
       pageNum: 1,
@@ -104,9 +95,6 @@ export default {
104 95
   },
105 96
   mounted() {
106 97
     this.getTableData()
107
-    this.getTableData2()
108
-    this.getTableData3()
109
-    this.getTableData4()
110 98
     this.getModelDataData()
111 99
     this.getModelData2Data()
112 100
     this.getModelData3Data()
@@ -114,96 +102,31 @@ export default {
114 102
   watch: {
115 103
   },
116 104
   methods: {
117
-
118 105
     getModelDataData(){
119 106
       api1.queryEquipmentRunning_Sxt().then(res=>{
120
-        this.modelData.list=res.data;
107
+        this.modelData=res.data;
121 108
       })
122 109
     },
123 110
     getModelData2Data(){
124 111
       api1.queryEquipmentRunning_Zj().then(res=>{
125
-        this.modelData2.list=res.data;
112
+        this.modelData2=res.data;
126 113
       })
127 114
     },
128 115
     getModelData3Data(){
129 116
       api1.queryEquipmentRunning_Mwxsq().then(res=>{
130
-        this.modelData3.list=res.data;
117
+        this.modelData3=res.data;
131 118
       })
132 119
     },
133 120
     handlePageChange() {
134 121
       this.getTableData()
135
-      this.getTableData2()
136
-      this.getTableData3()
137
-      this.getTableData4()
138
-    },
139
-    handleAudit(row) {
140
-      this.selRow = row
141
-      this.dialogVisible = true
142
-    },
143
-    handleCancelApply(row) {
144
-      console.log('enter handle cancel apply')
145
-    },
146
-    handleConfirm() {
147
-      const {id} = this.selRow
148
-      api.applyResource({id, applyType: this.radio}).then(res => {
149
-        if(res.success) {
150
-          this.dialogVisible = false
151
-          this.$message({
152
-            message: '审核成功!',
153
-            type: 'success'
154
-          })
155
-          this.getTableData()
156
-        }
157
-      })
158 122
     },
159 123
     getTableData() {
160 124
       const {pageNum, pageSize, searchWords} = this
161
-      api.applyList({pageNum, pageSize, resourceName: searchWords}).then(res => {
162
-        this.tableData = []
163
-        res.data.records.map((item, index) => {
164
-          const newItem = {...item}
165
-          newItem.applyTypeText = this.getApplyTypeText(item.applyType)
166
-          this.tableData.push(newItem)
167
-        })
168
-        this.total = res.data.total
169
-      })
125
+      // api.sbyxjcList({current: pageNum, size: pageSize}).then(res => {
126
+      //   this.tableData = res.data.records || []
127
+      //   this.total = res.data.total
128
+      // })
170 129
     },
171
-    getTableData2() {
172
-      api.applyList({}).then(res => {
173
-        this.tableData2 =  res.data.data
174
-        this.total2 = res.data.total
175
-      })
176
-    },
177
-
178
-    getTableData3() {
179
-      api.applyList({}).then(res => {
180
-        this.tableData3 =  res.data.data
181
-        this.total3 = res.data.total
182
-      })
183
-    },
184
-
185
-    getTableData4() {
186
-      api.applyList({}).then(res => {
187
-        this.tableData4 =  res.data.data
188
-        this.total4 = res.data.total
189
-      })
190
-    },
191
-
192
-    getApplyTypeText(val) {
193
-      if (!val){
194
-        return '未申请'
195
-      }
196
-      const textMap = {
197
-        1: '待审批',
198
-        2: '审批通过',
199
-        3: '审批驳回'
200
-      }
201
-      return textMap[val]
202
-    },
203
-    handleSearch() {
204
-      this.pageNum = 1
205
-      this.getTableData()
206
-    }
207 130
   }
208 131
 }
209 132
 </script>

+ 37 - 35
src/pages/index/components/park_easy.vue

@@ -25,7 +25,7 @@
25 25
         :dataset="linedata"
26 26
         :tooltipFormat="lineTooltipFormat"
27 27
         :encode="[
28
-              { x: 'month', y: 'thisYearAmount', seriesName: '难易指数',bool:'true' },
28
+              { x: 'mouth', y: 'lastAmount', seriesName: '难易指数',bool:'true' },
29 29
             ]"
30 30
         id="sxcyfzqk"
31 31
       />
@@ -45,12 +45,7 @@ export default {
45 45
   },
46 46
   data() {
47 47
     return {
48
-      linedata: [{month: '8:00', thisYearAmount: 21}, {month: '10:00', thisYearAmount:22}
49
-        , {month: '12:00', thisYearAmount:23}, {month: '14:00', thisYearAmount:25}
50
-        , {month: '16:00', thisYearAmount:28}, {month: '18:00', thisYearAmount:31}
51
-        , {month: '20:00', thisYearAmount:34}, {month: '22:00', thisYearAmount:36}
52
-        , {month: '0:00', thisYearAmount:38}, {month: '2:00', thisYearAmount:39}
53
-        , {month: '4:00', thisYearAmount:40}, {month: '6:00', thisYearAmount:41}],
48
+      linedata: [],
54 49
       options: [{
55 50
         value: '日间时段',
56 51
         label: '日间时段'
@@ -140,35 +135,9 @@ export default {
140 135
       },
141 136
     };
142 137
   },
143
-  methods: {
144
-    lineTooltipFormat(params) {
145
-      const data = params[0].data;
146
-      return `<div class="line-tooltip">
147
-        <div style="color: ${params[0].color}">${params[0].seriesName}: ${
148
-        params[0].data.thisYearAmount || "--"
149
-      }</div>
150
-      </div>`;
151
-    },
152
-    setIntervalMap(chart) {
153
-      this.timer = setInterval(() => {
154
-        chart.dispatchAction({
155
-          type: "showTip",
156
-          seriesIndex: 0,
157
-          dataIndex: this.dqIndex + 1,
158
-        });
159
-        this.dqIndex++;
160
-        if (this.dqIndex > 4) {
161
-          this.dqIndex = -1;
162
-        }
163
-      }, 3000);
164
-    },
165
-    mapTooltip(data) {
166
-      return `<div class="map-tooltip">
167
-        <div class="map-tooltip-name">${data.name}:<span class="map-tooltip-value">${data.value}%</span></div>
168
-      </div>`;
169
-    },
170
-  },
138
+
171 139
   mounted() {
140
+    this.zxt()
172 141
     api.dtnyzs().then(res => {
173 142
       let arr = []
174 143
       let dataSoure = res.data
@@ -211,6 +180,39 @@ export default {
211 180
       });
212 181
     })
213 182
   },
183
+  methods: {
184
+    zxt() {
185
+      api.zxt().then(res => {
186
+        this.linedata = res.data || []
187
+      })
188
+    },
189
+    lineTooltipFormat(params) {
190
+      const data = params[0].data;
191
+      return `<div class="line-tooltip">
192
+        <div style="color: ${params[0].color}">${params[0].seriesName}: ${
193
+        params[0].data.lastAmount || "--"
194
+      }</div>
195
+      </div>`;
196
+    },
197
+    setIntervalMap(chart) {
198
+      this.timer = setInterval(() => {
199
+        chart.dispatchAction({
200
+          type: "showTip",
201
+          seriesIndex: 0,
202
+          dataIndex: this.dqIndex + 1,
203
+        });
204
+        this.dqIndex++;
205
+        if (this.dqIndex > 4) {
206
+          this.dqIndex = -1;
207
+        }
208
+      }, 3000);
209
+    },
210
+    mapTooltip(data) {
211
+      return `<div class="map-tooltip">
212
+        <div class="map-tooltip-name">${data.name}:<span class="map-tooltip-value">${data.value}%</span></div>
213
+      </div>`;
214
+    },
215
+  },
214 216
 };
215 217
 </script>
216 218
 <style  lang="scss" scoped>

+ 5 - 5
src/pages/index/components/service_call_function.vue

@@ -1,14 +1,14 @@
1 1
 <template>
2 2
   <div class="body-wrapper">
3 3
     <el-form ref="ruleForm" class="form-wrapper" :model="ruleForm">
4
-      <el-form-item label="接口地址" prop="interfaceName">
5
-        <el-input v-model="ruleForm.interfaceName" placeholder="接口地址"></el-input>
4
+      <el-form-item label="接口地址" prop="apiUrl">
5
+        <el-input v-model="ruleForm.apiUrl" placeholder="接口地址"></el-input>
6 6
       </el-form-item>
7 7
       <el-form-item label="accessKey" prop="accessKey">
8
-        <el-input v-model="ruleForm.accessKey" placeholder="接口地址"></el-input>
8
+        <el-input v-model="ruleForm.accessKey" placeholder="accessKey"></el-input>
9 9
       </el-form-item>
10 10
       <el-form-item label="公钥" prop="publicKey">
11
-        <el-input v-model="ruleForm.publicKey" placeholder="接口地址"></el-input>
11
+        <el-input v-model="ruleForm.publicKey" placeholder="公钥"></el-input>
12 12
       </el-form-item>
13 13
       <el-form-item style="text-align: center;margin-top: 20px;">
14 14
         <el-button type="primary" @click="submitForm('ruleForm')">调用接口</el-button>
@@ -24,7 +24,7 @@ export default {
24 24
   data() {
25 25
     return {
26 26
       ruleForm: {
27
-        interfaceName: '',
27
+        apiUrl: '',
28 28
         accessKey: '',
29 29
         publicKey: ''
30 30
       }

+ 6 - 59
src/pages/index/components/service_monitor.vue

@@ -23,31 +23,19 @@ export default {
23 23
     return {
24 24
       columns: [
25 25
         {
26
-          label: '接口名称',
27
-          key: 'interfaceName'
26
+          label: '模块名称',
27
+          key: 'moduleName'
28 28
         },
29 29
         {
30 30
           label: '接口地址',
31
-          key: 'interfaceAddress'
32
-        },
33
-        {
34
-          label: '状态',
35
-          key: 'submitState'
31
+          key: 'apiUrl'
36 32
         },
37 33
       ],
38
-      tableData: [{"interfaceName":'消息通知',"interfaceAddress":'http://39.106.16.100/notification',"submitState":'运行中'}
39
-        ,{"interfaceName":'预警提醒',"interfaceAddress":'http://39.106.16.100/warning',"submitState":'运行中'},
40
-        ,{"interfaceName":'剩余车位推送',
41
-          "interfaceAddress": 'http://39.106.16.100/seatpush',
42
-          "submitState": '运行中'
43
-        }, ,],
34
+      tableData: [],
44 35
       total: 3,
45 36
       pageSize: 10,
46 37
       pageNum: 1,
47
-      radio: '2',
48 38
       dialogVisible: false,
49
-      selRow: {},
50
-      searchWords: undefined
51 39
     }
52 40
   },
53 41
   mounted() {
@@ -58,53 +46,12 @@ export default {
58 46
     handlePageChange() {
59 47
       this.getTableData()
60 48
     },
61
-    handleAudit(row) {
62
-      this.selRow = row
63
-      this.dialogVisible = true
64
-    },
65
-    handleCancelApply(row) {
66
-      console.log('enter handle cancel apply')
67
-    },
68
-    handleConfirm() {
69
-      const {id} = this.selRow
70
-      console.log('radio', this.radio)
71
-      api.applyResource({id, applyType: this.radio}).then(res => {
72
-        if (res.success) {
73
-          this.dialogVisible = false
74
-          this.$message({
75
-            message: '审核成功!',
76
-            type: 'success'
77
-          })
78
-          this.getTableData()
79
-        }
80
-      })
81
-    },
82 49
     getTableData() {
83 50
       const {pageNum, pageSize, searchWords} = this
84
-      api.applyList({pageNum, pageSize, resourceName: searchWords}).then(res => {
85
-        this.tableData = []
86
-        res.data.records.map((item, index) => {
87
-          const newItem = {...item}
88
-          newItem.applyTypeText = this.getApplyTypeText(item.applyType)
89
-          this.tableData.push(newItem)
90
-        })
51
+      api.monitorListByPage({current: pageNum, size: pageSize}).then(res => {
52
+        this.tableData = res.data.records || []
91 53
         this.total = res.data.total
92 54
       })
93
-    },
94
-    getApplyTypeText(val) {
95
-      if (!val) {
96
-        return '未申请'
97
-      }
98
-      const textMap = {
99
-        1: '待审批',
100
-        2: '审批通过',
101
-        3: '审批驳回'
102
-      }
103
-      return textMap[val]
104
-    },
105
-    handleSearch() {
106
-      this.pageNum = 1
107
-      this.getTableData()
108 55
     }
109 56
   }
110 57
 }

+ 43 - 45
src/pages/index/components/service_operations.vue

@@ -14,7 +14,8 @@
14 14
 
15 15
 <script>
16 16
 import * as echarts from 'echarts'
17
-import * as geoJson from '../../../util/411100.json'
17
+import * as geoJson from '@/util/411100.json'
18
+import api from '@/api/article_z'
18 19
 
19 20
 export default {
20 21
   data() {
@@ -130,57 +131,54 @@ export default {
130 131
     },
131 132
     mapTooltip(data) {
132 133
       return `<div class="map-tooltip">
133
-        <div class="map-tooltip-name">${data.name}:<span class="map-tooltip-value">${data.value}%</span></div>
134
+        <div class="map-tooltip-name">${data.name}:<span class="map-tooltip-value">${data.value}</span></div>
134 135
       </div>`;
135 136
     },
136 137
   },
137 138
   mounted() {
138
-    let arr = []
139
-    let dataSoure = {
140
-      '411102': {quyuName: '源汇区', zb: 40},
141
-      '411103': {quyuName: '郾城区', zb: 60},
142
-      '411104': {quyuName: '召陵区', zb: 40},
143
-      '411121': {quyuName: '舞阳县', zb: 50},
144
-      '411122': {quyuName: '临颍县', zb: 30}}
145
-    for (const key in dataSoure) {
146
-      if (key !== '411100') {
147
-        arr.push({
148
-          name: dataSoure[key].quyuName,
149
-          value: Number(dataSoure[key].zb),
150
-        });
139
+    api.queryServiceMap().then(res => {
140
+      let arr = []
141
+      let dataSoure = res.data || {}
142
+      for (const key in dataSoure) {
143
+        if (key !== 411100) {
144
+          arr.push({
145
+            name: dataSoure[key].quyuName,
146
+            value: Number(dataSoure[key].zb),
147
+          });
148
+        }
151 149
       }
152
-    }
153
-    let mapMax = Math.max(...arr.map(item => item.value))
154
-    let mapMin = Math.min(...arr.map(item => item.value))
155
-    console.log(mapMin, '111')
156
-    console.log(mapMax, '222')
157
-    let chart = echarts.init(document.getElementById("map"));
158
-    echarts.registerMap("luohe", geoJson);
159
-    this.option.series[0].data = arr;
160
-    this.option.visualMap.min = mapMin;
161
-    this.option.visualMap.max = mapMax;
162
-    chart.setOption(this.option);
163
-    this.dqIndex = -1;
164
-    this.setIntervalMap(chart);
165
-    //鼠标移入静止播放
166
-    chart.on("mouseover", (e) => {
167
-      clearInterval(this.timer);
168
-      chart.dispatchAction({
169
-        type: "showTip",
170
-        seriesIndex: 0,
171
-        dataIndex: e.dataIndex,
150
+      let mapMax = Math.max(...arr.map(item => item.value))
151
+      let mapMin = Math.min(...arr.map(item => item.value))
152
+      console.log(mapMin, '111')
153
+      console.log(mapMax, '222')
154
+      let chart = echarts.init(document.getElementById("map"));
155
+      echarts.registerMap("luohe", geoJson);
156
+      this.option.series[0].data = arr;
157
+      this.option.visualMap.min = mapMin;
158
+      this.option.visualMap.max = mapMax;
159
+      chart.setOption(this.option);
160
+      this.dqIndex = -1;
161
+      this.setIntervalMap(chart);
162
+      //鼠标移入静止播放
163
+      chart.on("mouseover", (e) => {
164
+        clearInterval(this.timer);
165
+        chart.dispatchAction({
166
+          type: "showTip",
167
+          seriesIndex: 0,
168
+          dataIndex: e.dataIndex,
169
+        });
172 170
       });
173
-    });
174
-    chart.on("mouseout", (e) => {
175
-      clearInterval(this.timer);
176
-      //鼠标移出后先把上次的高亮取消
177
-      chart.dispatchAction({
178
-        type: "downplay",
179
-        seriesIndex: 0,
180
-        dataIndex: e.dataIndex,
171
+      chart.on("mouseout", (e) => {
172
+        clearInterval(this.timer);
173
+        //鼠标移出后先把上次的高亮取消
174
+        chart.dispatchAction({
175
+          type: "downplay",
176
+          seriesIndex: 0,
177
+          dataIndex: e.dataIndex,
178
+        });
179
+        this.setIntervalMap(chart);
181 180
       });
182
-      this.setIntervalMap(chart);
183
-    });
181
+    })
184 182
   },
185 183
 };
186 184
 </script>

+ 27 - 35
src/pages/index/components/service_publish.vue

@@ -19,12 +19,12 @@
19 19
       width="50%"
20 20
       custom-class="audit-dialog">
21 21
       <div style="height: 100px" class="form-div">
22
-        <el-form label-position="left" label-width="80px" :model="formLabelAlign">
23
-          <el-form-item label="接口名称">
22
+        <el-form ref="formLabelAlign" label-position="left" label-width="80px" :model="formLabelAlign">
23
+          <el-form-item label="接口名称" required>
24 24
             <el-input v-model="formLabelAlign.interfaceName"></el-input>
25 25
           </el-form-item>
26
-          <el-form-item label="接口地址">
27
-            <el-input v-model="formLabelAlign.interfaceAddress"></el-input>
26
+          <el-form-item label="接口地址" required>
27
+            <el-input v-model="formLabelAlign.interfaceUrl"></el-input>
28 28
           </el-form-item>
29 29
 <!--          <el-form-item label="提交状态">-->
30 30
 <!--            <el-input v-model="formLabelAlign.submitState"></el-input>-->
@@ -36,7 +36,7 @@
36 36
       </div>
37 37
       <span slot="footer" class="dialog-footer">
38 38
             <el-button @click="dialogVisible = false">取 消</el-button>
39
-            <el-button type="primary" @click="handleConfirm">确 定</el-button>
39
+            <el-button type="primary" @click="handleConfirm('formLabelAlign')">确 定</el-button>
40 40
         </span>
41 41
     </el-dialog>
42 42
   </div>
@@ -55,29 +55,25 @@ export default {
55 55
         },
56 56
         {
57 57
           label: '接口地址',
58
-          key: 'interfaceAddress'
59
-        },
60
-        {
61
-          label: '提交状态',
62
-          key: 'submitState'
58
+          key: 'interfaceUrl'
63 59
         },
64 60
         {
65 61
           label: '发布状态',
66 62
           key: 'publicState'
63
+        },
64
+        {
65
+          label: '发布人',
66
+          key: 'serveName'
67 67
         }
68 68
       ],
69
-      tableData: [{"interfaceName":'消息通知',"interfaceAddress":'http://39.106.16.100/notification',"submitState":'已提交',"publicState":' 未发布'}
70
-        ,{"interfaceName":'预警提醒',"interfaceAddress":'http://39.106.16.100/warning',"submitState":'已提交',"publicState":' 未发布'},
71
-        ,{"interfaceName":'剩余车位推送',"interfaceAddress":'http://39.106.16.100/seatpush',"submitState":'已提交',"publicState":' 已发布'},],
69
+      tableData: [],
72 70
       total: 0,
73 71
       pageSize: 10,
74 72
       pageNum: 1,
75 73
       dialogVisible: false,
76 74
       formLabelAlign: {
77 75
         interfaceName: '',
78
-        interfaceAddress: '',
79
-        // submitState: '',
80
-        // publicState: ''
76
+        interfaceUrl: ''
81 77
       },
82 78
       title: ''
83 79
     }
@@ -92,34 +88,30 @@ export default {
92 88
       this.getTableData()
93 89
     },
94 90
     handleAdd () {
95
-      this.title = '配置服务'
96
-      this.formLabelAlign.interfaceName = ''
97
-      this.formLabelAlign.interfaceAddress = ''
91
+      this.title = '发布服务'
92
+      this.formLabelAlign = {}
98 93
       this.dialogVisible = true
99 94
     },
100
-    handleConfirm() {
101
-      const {id} = this.selRow
102
-      console.log('radio', this.radio)
103
-      api.servicePublic({id, applyType: this.formLabelAlign.interfaceName}).then(res => {
104
-        if(res.code === 200) {
105
-          this.dialogVisible = false
106
-          this.$message({
107
-            message: '发布成功!',
108
-            type: 'success'
95
+    handleConfirm(formName) {
96
+      this.$refs[formName].validate((valid) => {
97
+        if (valid) {
98
+          api.servicePublic(this.formLabelAlign).then(res => {
99
+            if(res.code === 200) {
100
+              this.dialogVisible = false
101
+              this.$message({
102
+                message: '发布成功!',
103
+                type: 'success'
104
+              })
105
+              this.getTableData()
106
+            }
109 107
           })
110
-          this.getTableData()
111 108
         }
112 109
       })
113 110
     },
114 111
     getTableData() {
115 112
       const {pageNum, pageSize, searchWords} = this
116 113
       api.serviceListByPage({pageNum, pageSize, resourceName: searchWords}).then(res => {
117
-        this.tableData = []
118
-        res.data.records.map((item, index) => {
119
-          const newItem = {...item}
120
-          newItem.applyTypeText = this.getApplyTypeText(item.applyType)
121
-          this.tableData.push(newItem)
122
-        })
114
+        this.tableData = res.data.records || []
123 115
         this.total = res.data.total
124 116
       })
125 117
     }

+ 1 - 6
src/pages/index/components/service_subscription_function.vue

@@ -102,12 +102,7 @@ export default {
102 102
       getTableData() {
103 103
         const {pageNum, pageSize, formInline} = this
104 104
         // api.applyList({pageNum, pageSize, resourceName: searchWords}).then(res => {
105
-        //   this.tableData = []
106
-        //   res.data.records.map((item, index) => {
107
-        //     const newItem = {...item}
108
-        //     newItem.applyTypeText = this.getApplyTypeText(item.applyType)
109
-        //     this.tableData.push(newItem)
110
-        //   })
105
+        //   this.tableData = res.data.records || []
111 106
         //   this.total = res.data.total
112 107
         // })
113 108
       }