Browse Source

查询和接口有问题

查询和接口有问题
Liao 1 year ago
parent
commit
fc35d01ea4
2 changed files with 135 additions and 90 deletions
  1. 26 0
      src/api/article_liao.js
  2. 109 90
      src/pages/index/components/personnel_management.vue

+ 26 - 0
src/api/article_liao.js

@@ -10,5 +10,31 @@ export default {
10
   dashAccessDataAnalysisStat2(params){
10
   dashAccessDataAnalysisStat2(params){
11
     return axios.post('/dash/access/data/analysis/stat2', params)
11
     return axios.post('/dash/access/data/analysis/stat2', params)
12
   },
12
   },
13
+  //获取交接班记录详情
14
+  optPersonnelManagementShiftDetail(params){
15
+    return axios.get('/opt/personnel/management/shift/detail', {params})
16
+  },
17
+  //获取交接班记录分页
18
+  optPersonnelManagementShiftPage(params){
19
+    return axios.get('/opt/personnel/management/shift/page', {params})
20
+  },
21
+  //编辑交接班记录
22
+  optPersonnelManagementShiftEdit(params){
23
+    return axios.post('/opt/personnel/management/shift/edit', params)
24
+  },
25
+  //删除交接班记录
26
+  optPersonnelManagementShiftDelete(params){
27
+    return axios.post('/opt/personnel/management/shift/delete', params)
28
+  },
29
+  //获取收费员信息分页
30
+  optPersonnelManagementBasicPage(params){
31
+    return axios.get('/opt/personnel/management/basic/page', {params})
32
+  },
33
+  //获取收费员信息分页
34
+  optPersonnelManagementBasicDetail(params){
35
+    return axios.get('/opt/personnel/management/basic/detail', {params})
36
+  },
37
+
38
+
13
 
39
 
14
 }
40
 }

+ 109 - 90
src/pages/index/components/personnel_management.vue

@@ -6,7 +6,13 @@
6
           <el-row>
6
           <el-row>
7
             <el-col :span="8">
7
             <el-col :span="8">
8
               <el-form-item label="车场名称: ">
8
               <el-form-item label="车场名称: ">
9
-                <el-input v-model="formInline1.carParkingName" placeholder="请输入"></el-input>
9
+                <el-select clearable v-model="formInline1.carParkName" placeholder="请选择">
10
+                  <el-option
11
+                    v-for="(item,index) in carParkingNameOptions"
12
+                    :key="index"
13
+                    :label="item.carParkName"
14
+                    :value="item.parkId" />
15
+                </el-select>
10
               </el-form-item>
16
               </el-form-item>
11
             </el-col>
17
             </el-col>
12
             <el-col :span="8">
18
             <el-col :span="8">
@@ -14,7 +20,7 @@
14
                 <el-button type="primary" class="query-btn" @click="onSubmit1">查询</el-button>
20
                 <el-button type="primary" class="query-btn" @click="onSubmit1">查询</el-button>
15
               </el-form-item>
21
               </el-form-item>
16
               <el-form-item>
22
               <el-form-item>
17
-                <el-button type="success" @click="handleAdd">添加车场</el-button>
23
+                <el-button type="success" @click="handleAdd">添加交接班记录</el-button>
18
               </el-form-item>
24
               </el-form-item>
19
             </el-col>
25
             </el-col>
20
           </el-row>
26
           </el-row>
@@ -45,23 +51,47 @@
45
           custom-class="audit-dialog">
51
           custom-class="audit-dialog">
46
           <div class="form-div">
52
           <div class="form-div">
47
             <el-form label-position="left" label-width="100px" :model="formLabelAlign">
53
             <el-form label-position="left" label-width="100px" :model="formLabelAlign">
48
-              <el-form-item label="车场名称">
49
-                <el-input v-model="formLabelAlign.carParkingName"></el-input>
54
+              <el-form-item label="车场名称: ">
55
+                <el-select clearable v-model="formLabelAlign.carParkName" placeholder="请选择">
56
+                  <el-option
57
+                    v-for="(item,index) in carParkingNameOptions"
58
+                    :key="index"
59
+                    :label="item.carParkName"
60
+                    :value="item.parkId" />
61
+                </el-select>
50
               </el-form-item>
62
               </el-form-item>
51
               <el-form-item label="收入统计">
63
               <el-form-item label="收入统计">
52
-                <el-input v-model="formLabelAlign.incomeStatistics"></el-input>
64
+                <el-input v-model="formLabelAlign.incomeFee"></el-input>
53
               </el-form-item>
65
               </el-form-item>
54
               <el-form-item label="停车量统计">
66
               <el-form-item label="停车量统计">
55
-                <el-input v-model="formLabelAlign.parkingStatistics"></el-input>
67
+                <el-input v-model="formLabelAlign.parkingNum"></el-input>
56
               </el-form-item>
68
               </el-form-item>
57
               <el-form-item label="异常事件统计">
69
               <el-form-item label="异常事件统计">
58
-                <el-input v-model="formLabelAlign.abnormalEvent"></el-input>
70
+                <el-input v-model="formLabelAlign.excptionEvent"></el-input>
59
               </el-form-item>
71
               </el-form-item>
60
               <el-form-item label="设备情况">
72
               <el-form-item label="设备情况">
61
-                <el-input v-model="formLabelAlign.equipmentCondition"></el-input>
73
+                <el-input v-model="formLabelAlign.deviceStatus"></el-input>
62
               </el-form-item>
74
               </el-form-item>
63
               <el-form-item label="车辆情况">
75
               <el-form-item label="车辆情况">
64
-                <el-input v-model="formLabelAlign.vehicleCondition"></el-input>
76
+                <el-input v-model="formLabelAlign.vehicleStatus"></el-input>
77
+              </el-form-item>
78
+              <el-form-item label="交班人员: ">
79
+                <el-select clearable v-model="formLabelAlign.carParkName" placeholder="请选择">
80
+                  <el-option
81
+                    v-for="(item,index) in peopleOptions"
82
+                    :key="index"
83
+                    :label="item.tollmanName"
84
+                    :value="item.id" />
85
+                </el-select>
86
+              </el-form-item>
87
+              <el-form-item label="接班人员: ">
88
+                <el-select clearable v-model="formLabelAlign.carParkName" placeholder="请选择">
89
+                  <el-option
90
+                    v-for="(item,index) in peopleOptions"
91
+                    :key="index"
92
+                    :label="item.tollmanName"
93
+                    :value="item.id" />
94
+                </el-select>
65
               </el-form-item>
95
               </el-form-item>
66
             </el-form>
96
             </el-form>
67
           </div>
97
           </div>
@@ -109,7 +139,7 @@
109
           </el-pagination>
139
           </el-pagination>
110
         </div>
140
         </div>
111
         <el-dialog
141
         <el-dialog
112
-          :title="title2"
142
+          :title="title"
113
           :visible.sync="dialogVisible2"
143
           :visible.sync="dialogVisible2"
114
           width="45%"
144
           width="45%"
115
           custom-class="audit-dialog">
145
           custom-class="audit-dialog">
@@ -137,6 +167,8 @@
137
 </template>
167
 </template>
138
 <script>
168
 <script>
139
 import api from "@/api/audit.js";
169
 import api from "@/api/audit.js";
170
+import api_l from "@/api/article_liao.js";
171
+import api_z from "@/api/article_z.js";
140
 import dictionary from "@/util/dictionary";
172
 import dictionary from "@/util/dictionary";
141
 
173
 
142
 export default {
174
 export default {
@@ -147,35 +179,35 @@ export default {
147
       columns1: [
179
       columns1: [
148
         {
180
         {
149
           label: '车场名称',
181
           label: '车场名称',
150
-          key: 'carParkingName'
182
+          key: 'carParkName'
151
         },
183
         },
152
         {
184
         {
153
           label: '收入统计',
185
           label: '收入统计',
154
-          key: 'incomeStatistics'
186
+          key: 'incomeFee'
155
         },
187
         },
156
         {
188
         {
157
           label: '停车量统计',
189
           label: '停车量统计',
158
-          key: 'parkingStatistics'
190
+          key: 'parkingNum'
159
         },
191
         },
160
         {
192
         {
161
           label: '异常事件统计',
193
           label: '异常事件统计',
162
-          key: 'abnormalEvent '
194
+          key: 'excptionEvent '
163
         },
195
         },
164
         {
196
         {
165
           label: '设备情况',
197
           label: '设备情况',
166
-          key: 'equipmentCondition'
198
+          key: 'deviceStatus'
167
         },
199
         },
168
         {
200
         {
169
           label: '车辆情况',
201
           label: '车辆情况',
170
-          key: 'vehicleCondition'
202
+          key: 'vehicleStatus'
171
         },
203
         },
172
         {
204
         {
173
           label: '交班人',
205
           label: '交班人',
174
-          key: 'handOver'
206
+          key: 'tollmanName '
175
         },
207
         },
176
         {
208
         {
177
           label: '接班人',
209
           label: '接班人',
178
-          key: 'successor'
210
+          key: 'tollmanReceiveId'
179
         },
211
         },
180
       ],
212
       ],
181
       tableData1: [{carParkingName: 'sasa'}],
213
       tableData1: [{carParkingName: 'sasa'}],
@@ -184,17 +216,27 @@ export default {
184
       pageNum1: 1,
216
       pageNum1: 1,
185
       formInline1: {
217
       formInline1: {
186
         carParkingName: '',
218
         carParkingName: '',
219
+        carParkName:'',
220
+        parkId:''
187
       },
221
       },
188
       title: '',
222
       title: '',
189
       dialogVisible: false,
223
       dialogVisible: false,
224
+      carParkingNameOptions: [],
225
+      peopleOptions:[],
190
       formLabelAlign: {
226
       formLabelAlign: {
191
         id: '',
227
         id: '',
192
-        carParkingName: '',
193
-        incomeStatistics: '',
194
-        parkingStatistics: '',
195
-        abnormalEvent: '',
196
-        equipmentCondition: '',
197
-        vehicleCondition: '',
228
+        parkId: '',
229
+        tollmanFinishId: '',
230
+        tollmanReceiveId: '',
231
+        incomeFee: '',
232
+        parkingNum: '',
233
+        excptionEvent: '',
234
+        deviceStatus: '',
235
+        vehicleStatus: '',
236
+        carParkName: '',
237
+        tollmanName: '',
238
+        jiaobanrenyuan:'',
239
+        jiebanrenyuan:''
198
       },
240
       },
199
       columns2: [
241
       columns2: [
200
         {
242
         {
@@ -232,25 +274,33 @@ export default {
232
     }
274
     }
233
   },
275
   },
234
   mounted() {
276
   mounted() {
235
-    // this.getTableData1()
277
+    this.getTableData1()
236
     // this.getTableData2()
278
     // this.getTableData2()
237
     // this.getTableData3()
279
     // this.getTableData3()
238
     // this.getTableData4()
280
     // this.getTableData4()
281
+    this.getCarParkingName()
282
+    this.getPeople()
239
   },
283
   },
240
   watch: {},
284
   watch: {},
241
   methods: {
285
   methods: {
242
     onSubmit1() {
286
     onSubmit1() {
243
-      this.pageNum1 = 1
244
-      this.getTableData1()
245
-    },
287
+      api_l.optPersonnelManagementShiftPage({parkId: this.formLabelAlign.parkId}).then(res => {
288
+        this.tableData1 = res.data.records
289
+      })
290
+      },
246
     handleAdd() {
291
     handleAdd() {
247
       this.title = '添加'
292
       this.title = '添加'
248
-      this.formLabelAlign.carParkingName = ''
249
-      this.formLabelAlign.incomeStatistics = ''
250
-      this.formLabelAlign.parkingStatistics = ''
251
-      this.formLabelAlign.abnormalEvent = ''
252
-      this.formLabelAlign.equipmentCondition = ''
253
-      this.formLabelAlign.vehicleCondition = ''
293
+      this.formLabelAlign.carParkName = ''
294
+      this.formLabelAlign.parkId = ''
295
+      this.formLabelAlign.id = ''
296
+      this.formLabelAlign.tollmanFinishId = ''
297
+      this.formLabelAlign.tollmanReceiveId = ''
298
+      this.formLabelAlign.incomeFee = ''
299
+      this.formLabelAlign.parkingNum = ''
300
+      this.formLabelAlign.excptionEvent = ''
301
+      this.formLabelAlign.deviceStatus = ''
302
+      this.formLabelAlign.vehicleStatus = ''
303
+      this.formLabelAlign.tollmanName = ''
254
       this.dialogVisible = true
304
       this.dialogVisible = true
255
     },
305
     },
256
     handleEdit(row) {
306
     handleEdit(row) {
@@ -259,41 +309,38 @@ export default {
259
       this.dialogVisible = true
309
       this.dialogVisible = true
260
     },
310
     },
261
     deleteRow(record) {
311
     deleteRow(record) {
262
-      api.deleteWhiteIp({id: record.id}).then(res => {
312
+      api_l.optPersonnelManagementShiftDelete({id: record.id}).then(res => {
263
         if (res.code === 200) {
313
         if (res.code === 200) {
264
           this.$message({type: 'success', message: '删除成功!'})
314
           this.$message({type: 'success', message: '删除成功!'})
265
           this.getTableData1()
315
           this.getTableData1()
266
         }
316
         }
267
       })
317
       })
268
     },
318
     },
319
+    //车场
320
+    getCarParkingName() {
321
+      api_z.querySelectParkListByPage().then(res => {
322
+        this.carParkingNameOptions=res.data
323
+      })
324
+    },
325
+    //人员
326
+    getPeople(){
327
+      api_l.optPersonnelManagementBasicDetail.then(res => {
328
+        this.peopleOptions = res.data
329
+      })
330
+    },
269
     handleConfirm() {
331
     handleConfirm() {
270
       if (this.title === '修改') {
332
       if (this.title === '修改') {
271
-        api.addWhiteIp({ipAddr: this.formLabelAlign.ipAddr, id: this.formLabelAlign.id}).then(res => {
272
-          if (res.code === 200) {
273
-            this.dialogVisible = false
274
-            this.$message({
275
-              message: '修改成功!',
276
-              type: 'success'
277
-            })
278
-            this.getTableData1()
279
-          }
280
-        })
281
-      } else {
282
-        api.addWhiteIp({ipAddr: this.formLabelAlign.ipAddr}).then(res => {
283
-          if (res.code === 200) {
284
-            this.dialogVisible = false
285
-            this.$message({
286
-              message: '添加成功!',
287
-              type: 'success'
288
-            })
289
-            this.getTableData1()
290
-          }
333
+        api_l.optPersonnelManagementShiftEdit({id:this.formLabelAlign.id,incomeFee: this.formLabelAlign.incomeFee, parkingNum: this.formLabelAlign.parkingNum, excptionEvent: this.formLabelAlign.excptionEvent, deviceStatus: this.formLabelAlign.deviceStatus, vehicleStatus: this.formLabelAlign.vehicleStatus}).then(res => {
334
+          this.getTableData1()
335
+          this.dialogVisible = false
291
         })
336
         })
292
       }
337
       }
293
     },
338
     },
294
     onSubmit2() {
339
     onSubmit2() {
295
-      this.pageNum2 = 1
296
-      this.getTableData2()
340
+      api_l.optPersonnelManagementBasicPage({searchKey: this.formLabelAlign.ipAddr}).then(res => {
341
+
342
+      })
343
+
297
     },
344
     },
298
     handleAdd2() {
345
     handleAdd2() {
299
       this.title2 = '添加'
346
       this.title2 = '添加'
@@ -318,26 +365,8 @@ export default {
318
     },
365
     },
319
     handleConfirm2() {
366
     handleConfirm2() {
320
       if (this.title2 === '修改') {
367
       if (this.title2 === '修改') {
321
-        api.addWhiteIp({ipAddr: this.formLabelAlign2.ipAddr, id: this.formLabelAlign2.id}).then(res => {
322
-          if (res.code === 200) {
323
-            this.dialogVisible2 = false
324
-            this.$message({
325
-              message: '修改成功!',
326
-              type: 'success'
327
-            })
328
-            this.getTableData2()
329
-          }
330
-        })
331
-      } else {
332
-        api.addWhiteIp({ipAddr: this.formLabelAlign2.ipAddr}).then(res => {
333
-          if (res.code === 200) {
334
-            this.dialogVisible2 = false
335
-            this.$message({
336
-              message: '添加成功!',
337
-              type: 'success'
338
-            })
339
-            this.getTableData2()
340
-          }
368
+        api_l.optPersonnelManagementShiftEdit({carParkingName: this.formInline1.carParkingName}).then(res => {
369
+          this.tableData1 = res.data
341
         })
370
         })
342
       }
371
       }
343
     },
372
     },
@@ -345,24 +374,14 @@ export default {
345
       this.getTableData1()
374
       this.getTableData1()
346
     },
375
     },
347
     getTableData1() {
376
     getTableData1() {
348
-      const {pageNum1, pageSize1} = this
349
-      api.carListByPage({current: pageNum1, size: pageSize1, ...this.formInline1}).then(res => {
350
-        this.tableData1 = (res.data.records || []).map(item => ({...item, carType: dictionary.typeMap[item.carType]}))
351
-        this.total1 = res.data.total
377
+      api_l.optPersonnelManagementShiftPage({}).then(res => {
378
+        this.tableData1 = res.data.records
352
       })
379
       })
353
     },
380
     },
354
     handlePageChange2() {
381
     handlePageChange2() {
355
       this.getTableData2()
382
       this.getTableData2()
356
     },
383
     },
357
-    getTableData2() {
358
-      const {pageNum2, pageSize2} = this
359
-      api.gjListByPage({current: pageNum2, size: pageSize2, ...this.formInline2}).then(res => {
360
-        this.tableData2 = res.data.records || []
361
-        this.total2 = res.data.total
362
-      })
363
-    },
364
-  }
365
-}
384
+}}
366
 </script>
385
 </script>
367
 <style lang="scss" scoped>
386
 <style lang="scss" scoped>
368
 .body-wrapper {
387
 .body-wrapper {