Browse Source

bug fixed

duwendi 1 year ago
parent
commit
1141b401e2
1 changed files with 12 additions and 4 deletions
  1. 12 4
      src/pages/index/components/customer_complaint.vue

+ 12 - 4
src/pages/index/components/customer_complaint.vue

@@ -172,6 +172,7 @@ export default {
172
         comType: '',
172
         comType: '',
173
         parkId: ''
173
         parkId: ''
174
       },
174
       },
175
+      queryParams: {},
175
       formInline1: {
176
       formInline1: {
176
         parkId: '',
177
         parkId: '',
177
         time:  [date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + (date.getDate()), date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + (date.getDate())],
178
         time:  [date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + (date.getDate()), date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + (date.getDate())],
@@ -239,11 +240,16 @@ export default {
239
   mounted() {
240
   mounted() {
240
     this.getParkDic()
241
     this.getParkDic()
241
     this.getKslx()
242
     this.getKslx()
242
-    this.getTableData()
243
+    this.queryTableData()
243
     this.getModelDataData()
244
     this.getModelDataData()
244
   },
245
   },
245
   watch: {},
246
   watch: {},
246
   methods: {
247
   methods: {
248
+    queryTableData() {
249
+      this.pageNum = 1
250
+      this.queryParams = {...this.formInline}
251
+      this.getTableData()
252
+    },
247
     getKslx() {
253
     getKslx() {
248
       api.getDict({dictType: 'customer_complaint'}).then(res => {
254
       api.getDict({dictType: 'customer_complaint'}).then(res => {
249
         this.complaintOptions = res.data || []
255
         this.complaintOptions = res.data || []
@@ -300,12 +306,14 @@ export default {
300
         if (valid) {
306
         if (valid) {
301
           api.khtsSave(this.formLabelAlign).then(res => {
307
           api.khtsSave(this.formLabelAlign).then(res => {
302
             if (res.code === 200) {
308
             if (res.code === 200) {
309
+              this.$refs[formName].resetFields();
303
               this.dialogVisible = false
310
               this.dialogVisible = false
304
               this.$message({
311
               this.$message({
305
                 message: '添加成功!',
312
                 message: '添加成功!',
306
                 type: 'success'
313
                 type: 'success'
307
               })
314
               })
308
-              this.getTableData()
315
+              this.queryTableData()
316
+              this.getModelDataData()
309
             }
317
             }
310
           })
318
           })
311
         }
319
         }
@@ -337,8 +345,8 @@ export default {
337
       this.dialogVisible2 = false
345
       this.dialogVisible2 = false
338
     },
346
     },
339
     getTableData() {
347
     getTableData() {
340
-      const {pageNum, pageSize} = this
341
-      api.khtsListByPage({current: pageNum, size: pageSize, ...this.formInline}).then(res => {
348
+      const {pageNum, pageSize, queryParams} = this
349
+      api.khtsListByPage({current: pageNum, size: pageSize, ...queryParams}).then(res => {
342
         this.tableData = res.data.records || []
350
         this.tableData = res.data.records || []
343
         this.total = res.data.total
351
         this.total = res.data.total
344
       })
352
       })