Browse Source

bug修改

zhangjiansheng 3 months ago
parent
commit
80184a5442
2 changed files with 21 additions and 8 deletions
  1. 8 1
      src/api/allApi.js
  2. 13 7
      src/views/settingsPage/clinicMaintenance/index.vue

+ 8 - 1
src/api/allApi.js

@@ -906,4 +906,11 @@ export function noticeManageDetails(params) {
906
     method: 'get',
906
     method: 'get',
907
     params
907
     params
908
   })
908
   })
909
-}
909
+}
910
+
911
+export function delClinict(id) {
912
+  return request({
913
+    url: `/sys/clinict/`+id,
914
+    method: 'delete'
915
+  })
916
+}

+ 13 - 7
src/views/settingsPage/clinicMaintenance/index.vue

@@ -91,6 +91,8 @@
91
 import {clinictList,delClinict} from '@/api/allApi.js'
91
 import {clinictList,delClinict} from '@/api/allApi.js'
92
 import addClinic from "./addClinic.vue";
92
 import addClinic from "./addClinic.vue";
93
 import upgrade from "./upgrade.vue";
93
 import upgrade from "./upgrade.vue";
94
+// 分页组件
95
+import Pagination from "@/components/Pagination";
94
 
96
 
95
 export default {
97
 export default {
96
   name: 'EitcErmPcIndex',
98
   name: 'EitcErmPcIndex',
@@ -149,17 +151,21 @@ export default {
149
       console.log(val)
151
       console.log(val)
150
     },
152
     },
151
     async initList() {
153
     async initList() {
152
-      let obj = {}
154
+      let obj = {pageNum: this.form.pageNum,pageSize: this.form.pageSize}
153
       if (this.clinicName.length>0){
155
       if (this.clinicName.length>0){
154
         obj = {clinicName: this.clinicName}
156
         obj = {clinicName: this.clinicName}
155
       }
157
       }
156
       const res = await clinictList(obj)
158
       const res = await clinictList(obj)
157
-      this.tableData = res.rows;
158
-      this.tableData.forEach(x=>{
159
-        const today = new Date();
160
-        let endTime = new Date(Date.parse(x.expireTime.replace(/-/g, "/"))).getTime();
161
-        x.isExpire =Math.ceil(Math.abs((today - endTime)) / (1000 * 60 * 60 * 24));
162
-      })
159
+      if (res.code === 200){
160
+        this.total = res.total;
161
+        this.tableData = res.rows;
162
+        this.tableData.forEach(x=>{
163
+          const today = new Date();
164
+          let endTime = new Date(Date.parse(x.expireTime.replace(/-/g, "/"))).getTime();
165
+          x.isExpire =Math.ceil(Math.abs((today - endTime)) / (1000 * 60 * 60 * 24));
166
+        })
167
+        this.loading = false;
168
+      }
163
     },
169
     },
164
     /**
170
     /**
165
      * 重置
171
      * 重置