|
@@ -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
|
* 重置
|