Bladeren bron

bug修改

zhangjiansheng 3 maanden geleden
bovenliggende
commit
80184a5442
2 gewijzigde bestanden met toevoegingen van 21 en 8 verwijderingen
  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 906
     method: 'get',
907 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 91
 import {clinictList,delClinict} from '@/api/allApi.js'
92 92
 import addClinic from "./addClinic.vue";
93 93
 import upgrade from "./upgrade.vue";
94
+// 分页组件
95
+import Pagination from "@/components/Pagination";
94 96
 
95 97
 export default {
96 98
   name: 'EitcErmPcIndex',
@@ -149,17 +151,21 @@ export default {
149 151
       console.log(val)
150 152
     },
151 153
     async initList() {
152
-      let obj = {}
154
+      let obj = {pageNum: this.form.pageNum,pageSize: this.form.pageSize}
153 155
       if (this.clinicName.length>0){
154 156
         obj = {clinicName: this.clinicName}
155 157
       }
156 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
      * 重置