XMLWAN vor 4 Jahren
Ursprung
Commit
a7fe31a331

+ 54 - 0
src/api/patient/patient.js Datei anzeigen

@@ -12,6 +12,42 @@ export function getBloodDialysisPatient(page, limit) {
12 12
   })
13 13
 }
14 14
 
15
+export function getAllBloodDialysisPatient(page, limit) {
16
+  const params = {
17
+    page: page,
18
+    limit: limit
19
+  }
20
+  return request({
21
+    url: '/m/api/patient/getallblooddialysispatient',
22
+    method: 'get',
23
+    params: params
24
+  })
25
+}
26
+
27
+export function getAllSlowPatient(page, limit) {
28
+  const params = {
29
+    page: page,
30
+    limit: limit
31
+  }
32
+  return request({
33
+    url: '/m/api/patient/getallslowpatient',
34
+    method: 'get',
35
+    params: params
36
+  })
37
+}
38
+
39
+export function getAllMemberPatient(page, limit) {
40
+  const params = {
41
+    page: page,
42
+    limit: limit
43
+  }
44
+  return request({
45
+    url: '/m/api/patient/getallmemberpatient',
46
+    method: 'get',
47
+    params: params
48
+  })
49
+}
50
+
15 51
 export function GenerateDialysisNo(params) {
16 52
   return request({
17 53
     url: '/m/api/patients/generatedialysisnotwo',
@@ -89,6 +125,8 @@ export function getDryWeight(id, startime, endtime, limit, page) {
89 125
 
90 126
 export function getBloodDialysisPatientTwo(page, limit) {
91 127
   console.log('数据出发了没有')
128
+  console.log('page', page)
129
+  console.log('limit', limit)
92 130
   const params = {
93 131
     page: page,
94 132
     limit: limit
@@ -163,3 +201,19 @@ export function getCourseManagement(id, limit, page, startime, endtime) {
163 201
     params: params
164 202
   })
165 203
 }
204
+
205
+export function DeleteCouseManage(id, params) {
206
+  return request({
207
+    url: '/m/api/patient/delelecousemanage?id=' + id,
208
+    method: 'delete',
209
+    params: params
210
+  })
211
+}
212
+
213
+export function getCouseManagementDetail(id, params) {
214
+  return request({
215
+    url: '/m/api/patient/getcousemanagementdetail?id=' + id,
216
+    method: 'get',
217
+    params: params
218
+  })
219
+}

+ 25 - 23
src/main.js Datei anzeigen

@@ -1,26 +1,26 @@
1 1
 // The Vue build version to load with the `import` command
2 2
 // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
3
-import Vue from "vue";
4
-import App from "./App";
5
-import router from "./router";
6
-import MintUI from "mint-ui";
7
-import store from "./store";
8
-import "mint-ui/lib/style.css";
9
-import "./assets/styles/iconfont.css";
10
-import "./permission";
3
+import Vue from 'vue'
4
+import App from './App'
5
+import router from './router'
6
+import MintUI from 'mint-ui'
7
+import store from './store'
8
+import 'mint-ui/lib/style.css'
9
+import './assets/styles/iconfont.css'
10
+import './permission'
11 11
 
12
-import "@/styles/reset.scss";
13
-import "@/styles/variables.scss";
12
+import '@/styles/reset.scss'
13
+import '@/styles/variables.scss'
14 14
 // import "@/styles/style.scss";
15 15
 // eslint-disable-next-line import/no-duplicates
16 16
 // import Vant from "vant";
17 17
 // import "vant/lib/index.css";
18 18
 // import "vant/lib/icon/local.css";
19 19
 // import '@/styles/vant-css/index.css'
20
-import "@/styles/media.scss";
21
-import ElementUI from "element-ui";
22
-import "element-ui/lib/theme-chalk/index.css";
23
-import pinyin from "js-pinyin";
20
+import '@/styles/media.scss'
21
+import ElementUI from 'element-ui'
22
+import 'element-ui/lib/theme-chalk/index.css'
23
+import pinyin from 'js-pinyin'
24 24
 // import "./libs/rem.js";
25 25
 import {
26 26
   DropdownMenu,
@@ -47,9 +47,10 @@ import {
47 47
   Toast,
48 48
   Search,
49 49
   IndexBar,
50
-  IndexAnchor
50
+  IndexAnchor,
51
+  Dialog
51 52
   // eslint-disable-next-line no-irregular-whitespace,import/no-duplicates
52
-} from "vant";
53
+} from 'vant'
53 54
 Vue.use(DropdownMenu)
54 55
   .use(DropdownItem)
55 56
   .use(Tab)
@@ -74,7 +75,8 @@ Vue.use(DropdownMenu)
74 75
   .use(Toast)
75 76
   .use(Search)
76 77
   .use(IndexBar)
77
-  .use(IndexAnchor);
78
+  .use(IndexAnchor)
79
+  .use(Dialog)
78 80
 // import "@/lib/flexible.js";
79 81
 
80 82
 // main.js
@@ -85,20 +87,20 @@ Vue.use(DropdownMenu)
85 87
 // Vue.use(AlertPlugin)
86 88
 // Vue.use(ToastPlugin)
87 89
 
88
-Vue.use(MintUI);
90
+Vue.use(MintUI)
89 91
 // Vue.use(Vant)
90
-Vue.use(ElementUI);
91
-Vue.config.productionTip = false;
92
+Vue.use(ElementUI)
93
+Vue.config.productionTip = false
92 94
 
93 95
 /* eslint-disable no-new */
94 96
 new Vue({
95
-  el: "#app",
97
+  el: '#app',
96 98
   router,
97 99
   store,
98 100
   components: {
99 101
     App
100 102
   },
101
-  template: "<App/>"
102
-});
103
+  template: '<App/>'
104
+})
103 105
 
104 106
 // eslint-disable-next-line no-undef

+ 63 - 8
src/pages/doctorAdvice/components/CourseManagement.vue Datei anzeigen

@@ -18,13 +18,13 @@
18 18
       <div class="adviceBox">
19 19
         <van-list
20 20
           v-model="loading"
21
-          :finished="finished"
22 21
           finished-text="没有更多了"
23 22
           @load="onLoad"
23
+          :finished="finished"
24 24
         >
25 25
           <div
26 26
             class="adviceOne"
27
-            v-for="item in this.courseManagement"
27
+            v-for="(item, index) in this.courseManagement"
28 28
             :key="item.id"
29 29
           >
30 30
             <div class="adviceTitle">
@@ -32,7 +32,7 @@
32 32
               <van-icon
33 33
                 class="ellipsis"
34 34
                 name="ellipsis"
35
-                @click="newShow = true"
35
+                @click="toDeleteCourseManagement(item.id, index)"
36 36
               />
37 37
             </div>
38 38
             <div class="statOrder">
@@ -48,7 +48,7 @@
48 48
                 <p>记录医生:{{ item.user_name }}</p>
49 49
               </div>
50 50
             </div>
51
-            <div class="all">全部</div>
51
+            <div class="all" @click="toCourseDetail(item.id)">全部</div>
52 52
           </div>
53 53
         </van-list>
54 54
       </div>
@@ -97,19 +97,23 @@
97 97
           @cancel="endShow = false"
98 98
         />
99 99
       </van-popup>
100
+
100 101
       <van-action-sheet
101 102
         v-model="newShow"
102 103
         :actions="actions"
103 104
         cancel-text="取消"
104 105
         @cancel="onCancel"
106
+        @select="onDeleteConfirm"
105 107
       />
106 108
     </div>
107 109
   </div>
108 110
 </template>
109 111
 
110 112
 <script>
111
-import { getCourseManagement } from "@/api/patient/patient";
113
+import { getCourseManagement, DeleteCouseManage } from "@/api/patient/patient";
112 114
 import { uParseTime } from "@/utils/tools";
115
+import Vue from "vue";
116
+import { Dialog } from "vant";
113 117
 const moment = require("moment");
114 118
 export default {
115 119
   data() {
@@ -128,15 +132,18 @@ export default {
128 132
       limit: 10,
129 133
       page: 1,
130 134
       total: 0,
131
-      finished: false,
132 135
       loading: false,
136
+      finished: false,
133 137
       typeShow: false,
134 138
       columns: [],
135
-      courseManagement: []
139
+      courseManagement: [],
140
+      patientid: 0,
141
+      list: [],
142
+      patient_id: 0,
143
+      patient_index: 0
136 144
     };
137 145
   },
138 146
   methods: {
139
-    onLoad() {},
140 147
     onCancel() {
141 148
       this.typeShow = false;
142 149
     },
@@ -191,13 +198,61 @@ export default {
191 198
           console.log("病程管理", coursemanagement);
192 199
           this.courseManagement = coursemanagement;
193 200
           var total = response.data.data.total;
201
+          this.total = total;
194 202
           console.log("总共", total);
195 203
         }
196 204
       });
205
+    },
206
+    onLoad() {
207
+      setTimeout(() => {
208
+        for (let i = 0; i < this.limit; i++) {
209
+          this.list.push(this.list.length + 1);
210
+        }
211
+        // 加载状态结束
212
+        this.loading = false;
213
+        if (this.courseManagement.length > 10) {
214
+          this.page++;
215
+        }
216
+        this.getCourseManagement(this.patientid);
217
+        // 数据全部加载完成
218
+        if (this.list.length >= this.total) {
219
+          this.finished = true;
220
+        }
221
+      }, 1000);
222
+    },
223
+    toDeleteCourseManagement(id, index) {
224
+      this.patient_id = id;
225
+      this.patient_index = index;
226
+      this.newShow = true;
227
+      console.log("数据", this.patient_id, "下标", this.patient_index);
228
+    },
229
+    onDeleteConfirm(value) {
230
+      if (value.name == "删除") {
231
+        this.DeleteCouseManage(this.patient_id);
232
+      }
233
+    },
234
+    DeleteCouseManage(id, index) {
235
+      Dialog.confirm({
236
+        title: "删除提示!",
237
+        message: "确认删除该条信息吗?,删除后将无法恢复!"
238
+      }).then(() => {
239
+        DeleteCouseManage(id).then(response => {
240
+          if (response.data.state === 1) {
241
+            var msg = response.data.data.msg;
242
+            console.log("msg", msg);
243
+            this.courseManagement.splice(index, 1);
244
+            this.newShow = false;
245
+          }
246
+        });
247
+      });
248
+    },
249
+    toCourseDetail(id) {
250
+      this.$router.push("/coursedetail?id=" + id);
197 251
     }
198 252
   },
199 253
   created() {
200 254
     var patientid = this.$route.query.patientid;
255
+    this.patientid = patientid;
201 256
     console.log("干体重id", patientid);
202 257
     this.getCourseManagement(patientid);
203 258
   }

+ 2 - 5
src/pages/homeIndex/index.vue Datei anzeigen

@@ -41,9 +41,7 @@
41 41
           管理控制台
42 42
           <span>(仅管理员可见)</span>
43 43
         </div>
44
-        <div class="setting">
45
-          <van-icon name="setting-o" />管理
46
-        </div>
44
+        <div class="setting"><van-icon name="setting-o" />管理</div>
47 45
       </div>
48 46
       <div class="managementBox">
49 47
         <div class="managementOne">
@@ -63,7 +61,7 @@
63 61
     <div class="application">
64 62
       <div class="applicationTitle">
65 63
         <div class="applicationName">应用工作台</div>
66
-        <div class="applicationService">+ 应用服务</div>
64
+        <div class="applicationService">+ 更多应用</div>
67 65
       </div>
68 66
       <div class="applicationBox">
69 67
         <div class="applicationOne" @click="toPatients">
@@ -157,7 +155,6 @@ export default {
157 155
 };
158 156
 </script>
159 157
 
160
-
161 158
 <style lang="scss" scoped>
162 159
 .page_homeIndex {
163 160
   .homeTitle {

+ 283 - 0
src/pages/patientManagement/components/Blood.vue Datei anzeigen

@@ -0,0 +1,283 @@
1
+<template>
2
+  <div class="page_patientManagement">
3
+    <div class="toolBox">
4
+      <div class="toolOne" @click="typeShow = true">
5
+        <div style="display: flex;align-items: center;">
6
+          {{ type }}
7
+          <van-icon name="arrow-down" />
8
+        </div>
9
+      </div>
10
+      <div class="toolOne" @click="typeShowOne = true">
11
+        <div style="display: flex;align-items: center;">
12
+          {{ typeOne }}
13
+          <van-icon name="arrow-down" />
14
+        </div>
15
+      </div>
16
+    </div>
17
+    <div class="patientBox">
18
+      <van-list
19
+        v-model="loading"
20
+        :finished="finished"
21
+        finished-text="没有更多了"
22
+        @load="onLoad"
23
+      >
24
+        <div
25
+          class="patientOne"
26
+          v-for="(item, index) in patients"
27
+          :key="index"
28
+          @click="toPatientDetail(item.id)"
29
+        >
30
+          <img :src="item.avatar" alt />
31
+          <p>{{ item.name }}</p>
32
+        </div>
33
+      </van-list>
34
+    </div>
35
+    <!-- 弹出层 -->
36
+    <div>
37
+      <van-popup
38
+        v-model="typeShow"
39
+        position="bottom"
40
+        :style="{ height: '40%' }"
41
+      >
42
+        <van-picker
43
+          show-toolbar
44
+          :columns="columns"
45
+          @cancel="onCancel"
46
+          @confirm="onConfirm"
47
+        />
48
+      </van-popup>
49
+      <van-popup
50
+        v-model="typeShowOne"
51
+        position="bottom"
52
+        :style="{ height: '40%' }"
53
+      >
54
+        <van-picker
55
+          show-toolbar
56
+          :columns="columnsOne"
57
+          @cancel="onCancelOne"
58
+          @confirm="onConfirmOne"
59
+        />
60
+      </van-popup>
61
+    </div>
62
+  </div>
63
+</template>
64
+
65
+<script>
66
+import { getAllBloodDialysisPatient } from "@/api/patient/patient";
67
+export default {
68
+  data() {
69
+    return {
70
+      value: "",
71
+      typeShow: false,
72
+      typeShowOne: false,
73
+      startShow: false,
74
+      endShow: false,
75
+      type: "归转状态",
76
+      typeOne: "患者来源",
77
+      columns: ["留治", "转出"],
78
+      columnsOne: ["门诊", "转院"],
79
+      searchVal: "",
80
+      active: 0,
81
+      list: [],
82
+      loading: false,
83
+      finished: false,
84
+      page: 0,
85
+      limit: 10,
86
+      total: 0,
87
+      value1: 0,
88
+      value2: "a",
89
+      value3: "a",
90
+      option1: [
91
+        { text: "患者类型", value: 0 },
92
+        { text: "新款商品新款商品新款商品", value: 1 },
93
+        { text: "活动商品", value: 2 }
94
+      ],
95
+      option2: [
96
+        { text: "转规状态", value: "a" },
97
+        { text: "好评排序", value: "b" },
98
+        { text: "销量排序", value: "c" }
99
+      ],
100
+      option3: [
101
+        { text: "患者来源", value: "a" },
102
+        { text: "好评排序", value: "b" },
103
+        { text: "销量排序", value: "c" }
104
+      ],
105
+      list: [],
106
+      loading: false,
107
+      finished: false,
108
+      patients: []
109
+    };
110
+  },
111
+  methods: {
112
+    onLoad() {},
113
+    onCancel(value) {
114
+      this.typeShow = false;
115
+    },
116
+    onConfirm(value) {
117
+      this.type = value;
118
+      this.typeShow = false;
119
+    },
120
+    onCancelOne(value) {
121
+      this.typeOne = value;
122
+      this.typeShowOne = false;
123
+    },
124
+    onConfirmOne(value) {
125
+      this.typeOne = value;
126
+      this.typeShowOne = false;
127
+    },
128
+    getAllBloodDialysisPatient() {
129
+      getAllBloodDialysisPatient(this.page, this.limit).then(response => {
130
+        if (response.data.state === 1) {
131
+          var bloodpatient = response.data.data.bloodpatient;
132
+          let arr = this.patients;
133
+          arr.push(...bloodpatient);
134
+          this.patients = arr;
135
+          console.log("血透病人", bloodpatient);
136
+          var total = response.data.data.total;
137
+          // console.log("总计", total);
138
+        }
139
+      });
140
+    },
141
+    onLoad() {
142
+      setTimeout(() => {
143
+        for (let i = 0; i < this.limit; i++) {
144
+          this.list.push(this.list.length + 1);
145
+        }
146
+        // 加载状态结束
147
+        this.loading = false;
148
+        if (this.patients.length > 10) {
149
+          this.page++;
150
+        }
151
+        this.getAllBloodDialysisPatient(this.page, this.limit);
152
+        // 数据全部加载完成
153
+        if (this.list.length >= this.total) {
154
+          this.finished = true;
155
+        }
156
+      }, 1000);
157
+    },
158
+    toPatientDetail(id) {
159
+      this.$router.push("/patientdetail?patientid=" + id);
160
+    }
161
+  },
162
+  created() {
163
+    const baseSize = 32;
164
+    // 设置 rem 函数
165
+    function setRem() {
166
+      const scale = document.documentElement.clientWidth / 750;
167
+      document.documentElement.style.fontSize =
168
+        baseSize * Math.min(scale, 2) + "px";
169
+      //   // 320 默认大小16px; 320px = 20rem ;每个元素px基础上/16
170
+      //   let htmlWidth =
171
+      //     document.documentElement.clientWidth || document.body.clientWidth;
172
+      //   //得到html的Dom元素
173
+      //   let htmlDom = document.getElementsByTagName("html")[0];
174
+      //   //设置根元素字体大小
175
+      //   htmlDom.style.fontSize = htmlWidth / 23.4375 + "px";
176
+    }
177
+    // 初始化
178
+    setRem();
179
+    // 改变窗口大小时重新设置 rem
180
+    window.onresize = function() {
181
+      setRem();
182
+    };
183
+    this.getAllBloodDialysisPatient();
184
+  }
185
+};
186
+</script>
187
+
188
+<style lang="scss" scoped>
189
+.page_patientManagement {
190
+  overflow-y: auto;
191
+  height: 100%;
192
+  .patientManagementTitle {
193
+    background: #fff;
194
+    padding: 0 1.125rem;
195
+    height: 3.125rem;
196
+    display: flex;
197
+    align-items: center;
198
+    justify-content: space-between;
199
+  }
200
+  .jiantou {
201
+    font-size: 1.5rem;
202
+    font-weight: 600;
203
+    margin-right: 3rem;
204
+  }
205
+  .titleName {
206
+    font-size: 1.125rem;
207
+    font-weight: 600;
208
+  }
209
+  .iconBox {
210
+    display: flex;
211
+    align-items: center;
212
+    float: right;
213
+  }
214
+  .iconOne {
215
+    font-size: 1.5rem;
216
+  }
217
+  .add {
218
+    margin-left: 1.25rem;
219
+  }
220
+  .toolBox {
221
+    display: flex;
222
+    height: 3.125rem;
223
+
224
+    align-items: center;
225
+
226
+    .toolOne {
227
+      width: 5.625rem;
228
+      height: 1.875rem;
229
+      background: rgba(246, 246, 246, 1);
230
+      border-radius: 5px;
231
+      text-align: center;
232
+      font-size: 0.8125rem;
233
+      color: #8d8d8d;
234
+      display: flex;
235
+      align-items: center;
236
+      justify-content: space-around;
237
+      margin-left: 0.875rem;
238
+    }
239
+  }
240
+  .van-dropdown-menu__title {
241
+    width: 5.625rem;
242
+    height: 1.875rem;
243
+    line-height: 1.875rem;
244
+    background: rgba(246, 246, 246, 1);
245
+    border-radius: 5px;
246
+    color: #8d8d8d;
247
+    font-size: 0.875rem;
248
+  }
249
+  .van-dropdown-menu__title::after {
250
+    right: 0.5rem;
251
+  }
252
+  .patientBox {
253
+    padding: 0 0.875rem;
254
+    .patientOne {
255
+      display: flex;
256
+      align-items: center;
257
+      height: 3.75rem;
258
+      img {
259
+        width: 2.5rem;
260
+        height: 2.5rem;
261
+        margin-right: 0.875rem;
262
+      }
263
+    }
264
+  }
265
+}
266
+::-webkit-scrollbar {
267
+  width: 0;
268
+}
269
+</style>
270
+
271
+<style lang="scss">
272
+.page_patientManagement {
273
+  .searchBox {
274
+    .van-cell__value {
275
+      display: flex;
276
+      align-items: center;
277
+    }
278
+    .van-field__body {
279
+      width: 100%;
280
+    }
281
+  }
282
+}
283
+</style>

+ 193 - 0
src/pages/patientManagement/components/Member.vue Datei anzeigen

@@ -0,0 +1,193 @@
1
+<template>
2
+  <div class="page_patientManagement">
3
+    <div class="patientBox">
4
+      <van-list
5
+        v-model="loading"
6
+        :finished="finished"
7
+        finished-text="没有更多了"
8
+        @load="onLoad"
9
+      >
10
+        <div class="patientOne" v-for="(item,index) in patients" :key="index"
11
+         @click="toPatientDetail(item.id)"
12
+        >
13
+          <img :src="item.avatar" alt />
14
+          <p>{{ item.name }}</p>
15
+        </div>
16
+      </van-list>
17
+    </div>
18
+   </div>
19
+  </div>
20
+</template>
21
+
22
+<script>
23
+import { getAllMemberPatient } from '@/api/patient/patient'
24
+export default {
25
+  data () {
26
+    return {
27
+      loading: false,
28
+      finished: false,
29
+      limit: 10,
30
+      page: 1,
31
+      total: 0,
32
+      patients: [],
33
+      list: []
34
+    }
35
+  },
36
+  methods: {
37
+    getAllMemberPatient () {
38
+      getAllMemberPatient(this.page, this.limit).then(response => {
39
+        if (response.data.state === 1) {
40
+          var patients = response.data.data.memberpatient
41
+          // console.log('会员管理', patients)
42
+          let arr = this.patients
43
+          arr.push(...patients)
44
+          this.patients = arr
45
+          var total = response.data.data.total
46
+          // console.log('total', total)
47
+          this.total = total
48
+        }
49
+      })
50
+    },
51
+    onLoad () {
52
+      setTimeout(() => {
53
+        for (let i = 0; i < this.limit; i++) {
54
+          this.list.push(this.list.length + 1)
55
+        }
56
+        // 加载状态结束
57
+        this.loading = false
58
+        if (this.patients.length > 10) {
59
+          this.page++
60
+        }
61
+        this.getAllSlowPatient(this.page, this.limit)
62
+        // 数据全部加载完成
63
+        if (this.list.length >= this.total) {
64
+          this.finished = true
65
+        }
66
+      }, 1000)
67
+    },
68
+    toPatientDetail (id) {
69
+      this.$router.push('/patientdetail?patientid=' + id)
70
+    }
71
+  },
72
+  created () {
73
+    const baseSize = 32
74
+    // 设置 rem 函数
75
+    function setRem () {
76
+      const scale = document.documentElement.clientWidth / 750
77
+      document.documentElement.style.fontSize =
78
+        baseSize * Math.min(scale, 2) + 'px'
79
+      //   // 320 默认大小16px; 320px = 20rem ;每个元素px基础上/16
80
+      //   let htmlWidth =
81
+      //     document.documentElement.clientWidth || document.body.clientWidth;
82
+      //   //得到html的Dom元素
83
+      //   let htmlDom = document.getElementsByTagName("html")[0];
84
+      //   //设置根元素字体大小
85
+      //   htmlDom.style.fontSize = htmlWidth / 23.4375 + "px";
86
+    }
87
+    // 初始化
88
+    setRem()
89
+    // 改变窗口大小时重新设置 rem
90
+    window.onresize = function () {
91
+      setRem()
92
+    }
93
+    this.getAllMemberPatient()
94
+  }
95
+}
96
+</script>
97
+
98
+<style lang="scss" scoped>
99
+.page_patientManagement {
100
+  overflow-y: auto;
101
+  height: 100%;
102
+  .patientManagementTitle {
103
+    background: #fff;
104
+    padding: 0 1.125rem;
105
+    height: 3.125rem;
106
+    display: flex;
107
+    align-items: center;
108
+    justify-content: space-between;
109
+  }
110
+  .jiantou {
111
+    font-size: 1.5rem;
112
+    font-weight: 600;
113
+    margin-right: 3rem;
114
+  }
115
+  .titleName {
116
+    font-size: 1.125rem;
117
+    font-weight: 600;
118
+  }
119
+  .iconBox {
120
+    display: flex;
121
+    align-items: center;
122
+    float: right;
123
+  }
124
+  .iconOne {
125
+    font-size: 1.5rem;
126
+  }
127
+  .add {
128
+    margin-left: 1.25rem;
129
+  }
130
+  .toolBox {
131
+    display: flex;
132
+    height: 3.125rem;
133
+
134
+    align-items: center;
135
+
136
+    .toolOne {
137
+      width: 5.625rem;
138
+      height: 1.875rem;
139
+      background: rgba(246, 246, 246, 1);
140
+      border-radius: 5px;
141
+      text-align: center;
142
+      font-size: 0.8125rem;
143
+      color: #8d8d8d;
144
+      display: flex;
145
+      align-items: center;
146
+      justify-content: space-around;
147
+      margin-left: 0.875rem;
148
+    }
149
+  }
150
+  .van-dropdown-menu__title {
151
+    width: 5.625rem;
152
+    height: 1.875rem;
153
+    line-height: 1.875rem;
154
+    background: rgba(246, 246, 246, 1);
155
+    border-radius: 5px;
156
+    color: #8d8d8d;
157
+    font-size: 0.875rem;
158
+  }
159
+  .van-dropdown-menu__title::after {
160
+    right: 0.5rem;
161
+  }
162
+  .patientBox {
163
+    padding: 0 0.875rem;
164
+    .patientOne {
165
+      display: flex;
166
+      align-items: center;
167
+      height: 3.75rem;
168
+      img {
169
+        width: 2.5rem;
170
+        height: 2.5rem;
171
+        margin-right: 0.875rem;
172
+      }
173
+    }
174
+  }
175
+}
176
+::-webkit-scrollbar {
177
+  width: 0;
178
+}
179
+</style>
180
+
181
+<style lang="scss">
182
+.page_patientManagement {
183
+  .searchBox {
184
+    .van-cell__value {
185
+      display: flex;
186
+      align-items: center;
187
+    }
188
+    .van-field__body {
189
+      width: 100%;
190
+    }
191
+  }
192
+}
193
+</style>

+ 194 - 0
src/pages/patientManagement/components/Slow.vue Datei anzeigen

@@ -0,0 +1,194 @@
1
+<template>
2
+  <div class="page_patientManagement">
3
+     <div class="patientBox">
4
+      <van-list
5
+        v-model="loading"
6
+        :finished="finished"
7
+        finished-text="没有更多了"
8
+        @load="onLoad"
9
+      >
10
+        <div class="patientOne" v-for="(item,index) in patients" :key="index"
11
+        @click="toPatientDetail(item.id)">
12
+          <img :src="item.avatar" alt />
13
+          <p>{{ item.name }}</p>
14
+        </div>
15
+      </van-list>
16
+    </div>
17
+   </div>
18
+  </div>
19
+</template>
20
+
21
+<script>
22
+import {
23
+  getAllSlowPatient
24
+} from '@/api/patient/patient'
25
+export default {
26
+  data () {
27
+    return {
28
+      loading: false,
29
+      finished: false,
30
+      limit: 10,
31
+      page: 1,
32
+      total: 0,
33
+      patients: [],
34
+      list: []
35
+    }
36
+  },
37
+  methods: {
38
+    getAllSlowPatient () {
39
+      getAllSlowPatient(this.page, this.limit).then(response => {
40
+        if (response.data.state === 1) {
41
+          var patients = response.data.data.slowpatient
42
+          let arr = this.patients
43
+          arr.push(...patients)
44
+          this.patients = arr
45
+          // console.log('慢病', patients)
46
+          var total = response.data.data.total
47
+          // console.log('total', total)
48
+          this.total = total
49
+        }
50
+      })
51
+    },
52
+    onLoad () {
53
+      setTimeout(() => {
54
+        for (let i = 0; i < this.limit; i++) {
55
+          this.list.push(this.list.length + 1)
56
+        }
57
+        // 加载状态结束
58
+        this.loading = false
59
+        if (this.patients.length > 10) {
60
+          this.page++
61
+        }
62
+        this.getAllSlowPatient(this.page, this.limit)
63
+        // 数据全部加载完成
64
+        if (this.list.length >= this.total) {
65
+          this.finished = true
66
+        }
67
+      }, 1000)
68
+    },
69
+    toPatientDetail (id) {
70
+      this.$router.push('/patientdetail?patientid=' + id)
71
+    }
72
+  },
73
+  created () {
74
+    const baseSize = 32
75
+    // 设置 rem 函数
76
+    function setRem () {
77
+      const scale = document.documentElement.clientWidth / 750
78
+      document.documentElement.style.fontSize =
79
+        baseSize * Math.min(scale, 2) + 'px'
80
+      //   // 320 默认大小16px; 320px = 20rem ;每个元素px基础上/16
81
+      //   let htmlWidth =
82
+      //     document.documentElement.clientWidth || document.body.clientWidth;
83
+      //   //得到html的Dom元素
84
+      //   let htmlDom = document.getElementsByTagName("html")[0];
85
+      //   //设置根元素字体大小
86
+      //   htmlDom.style.fontSize = htmlWidth / 23.4375 + "px";
87
+    }
88
+    // 初始化
89
+    setRem()
90
+    // 改变窗口大小时重新设置 rem
91
+    window.onresize = function () {
92
+      setRem()
93
+    }
94
+    this.getAllSlowPatient()
95
+  }
96
+}
97
+</script>
98
+
99
+<style lang="scss" scoped>
100
+.page_patientManagement {
101
+  overflow-y: auto;
102
+  height: 100%;
103
+  .patientManagementTitle {
104
+    background: #fff;
105
+    padding: 0 1.125rem;
106
+    height: 3.125rem;
107
+    display: flex;
108
+    align-items: center;
109
+    justify-content: space-between;
110
+  }
111
+  .jiantou {
112
+    font-size: 1.5rem;
113
+    font-weight: 600;
114
+    margin-right: 3rem;
115
+  }
116
+  .titleName {
117
+    font-size: 1.125rem;
118
+    font-weight: 600;
119
+  }
120
+  .iconBox {
121
+    display: flex;
122
+    align-items: center;
123
+    float: right;
124
+  }
125
+  .iconOne {
126
+    font-size: 1.5rem;
127
+  }
128
+  .add {
129
+    margin-left: 1.25rem;
130
+  }
131
+  .toolBox {
132
+    display: flex;
133
+    height: 3.125rem;
134
+
135
+    align-items: center;
136
+
137
+    .toolOne {
138
+      width: 5.625rem;
139
+      height: 1.875rem;
140
+      background: rgba(246, 246, 246, 1);
141
+      border-radius: 5px;
142
+      text-align: center;
143
+      font-size: 0.8125rem;
144
+      color: #8d8d8d;
145
+      display: flex;
146
+      align-items: center;
147
+      justify-content: space-around;
148
+      margin-left: 0.875rem;
149
+    }
150
+  }
151
+  .van-dropdown-menu__title {
152
+    width: 5.625rem;
153
+    height: 1.875rem;
154
+    line-height: 1.875rem;
155
+    background: rgba(246, 246, 246, 1);
156
+    border-radius: 5px;
157
+    color: #8d8d8d;
158
+    font-size: 0.875rem;
159
+  }
160
+  .van-dropdown-menu__title::after {
161
+    right: 0.5rem;
162
+  }
163
+  .patientBox {
164
+    padding: 0 0.875rem;
165
+    .patientOne {
166
+      display: flex;
167
+      align-items: center;
168
+      height: 3.75rem;
169
+      img {
170
+        width: 2.5rem;
171
+        height: 2.5rem;
172
+        margin-right: 0.875rem;
173
+      }
174
+    }
175
+  }
176
+}
177
+::-webkit-scrollbar {
178
+  width: 0;
179
+}
180
+</style>
181
+
182
+<style lang="scss">
183
+.page_patientManagement {
184
+  .searchBox {
185
+    .van-cell__value {
186
+      display: flex;
187
+      align-items: center;
188
+    }
189
+    .van-field__body {
190
+      width: 100%;
191
+    }
192
+  }
193
+}
194
+</style>

+ 1 - 3
src/pages/patientManagement/index.vue Datei anzeigen

@@ -80,9 +80,7 @@ export default {
80 80
         if (response.data.state == 1) {
81 81
           var patient = response.data.data.patient;
82 82
           // console.log("病人信息", patient);
83
-          let arr = this.patients;
84
-          arr.push(...patient);
85
-          this.patients = arr;
83
+          this.patients = patient;
86 84
           var total = response.data.data.total;
87 85
           this.total = total;
88 86
           // console.log("总计", total);

+ 278 - 0
src/pages/patientManagement/patientManagement.vue Datei anzeigen

@@ -0,0 +1,278 @@
1
+<template>
2
+  <div class="page_patientManagement">
3
+    <van-sticky>
4
+      <div class="patientManagementTitle">
5
+        <i class="iconfont icon-zuojiantou jiantou"></i>
6
+        <span class="titleName">患者管理</span>
7
+        <div class="iconBox" @click="addPatient">
8
+          <van-icon class="iconOne add" name="add-o" />
9
+        </div>
10
+      </div>
11
+    </van-sticky>
12
+    <div class="searchBox">
13
+      <van-search v-model="value" placeholder="搜索患者透析号/姓名/首拼" />
14
+    </div>
15
+    <div class="chooseBox">
16
+      <van-tabs v-model="active" sticky>
17
+        <van-tab title="全部患者">
18
+          <div class="patientBox">
19
+            <van-list
20
+              v-model="loading"
21
+              finished-text="没有更多了"
22
+              @load="onLoad"
23
+              :finished="finished"
24
+            >
25
+              <div
26
+                class="patientOne"
27
+                v-for="(item, index) in patients"
28
+                :key="index"
29
+                @click="toPatientDetail(item.id)"
30
+              >
31
+                <img :src="item.avatar" alt />
32
+                <p>{{ item.name }}</p>
33
+              </div>
34
+            </van-list>
35
+          </div>
36
+        </van-tab>
37
+        <van-tab title="血透患者">
38
+          <Blood></Blood>
39
+        </van-tab>
40
+        <van-tab title="慢病患者">
41
+          <Slow></Slow>
42
+        </van-tab>
43
+        <van-tab title="会员患者">
44
+          <Member></Member>
45
+        </van-tab>
46
+      </van-tabs>
47
+    </div>
48
+    <!-- 弹出层 -->
49
+    <div>
50
+      <van-popup
51
+        v-model="typeShow"
52
+        position="bottom"
53
+        :style="{ height: '40%' }"
54
+      >
55
+        <van-picker
56
+          show-toolbar
57
+          :columns="columns"
58
+          @cancel="onCancel"
59
+          @confirm="onConfirm"
60
+        />
61
+      </van-popup>
62
+    </div>
63
+  </div>
64
+</template>
65
+
66
+<script>
67
+import { getBloodDialysisPatient } from "@/api/patient/patient";
68
+import Slow from "@/pages/patientManagement/components/Slow";
69
+import Member from "@/pages/patientManagement/components/Member";
70
+import Blood from "@/pages/patientManagement/components/Blood";
71
+export default {
72
+  components: {
73
+    Slow,
74
+    Member,
75
+    Blood
76
+  },
77
+  data() {
78
+    return {
79
+      value: "",
80
+      typeShow: false,
81
+      startShow: false,
82
+      endShow: false,
83
+      type: "归转状态",
84
+      columns: [
85
+        "杭州",
86
+        "宁波",
87
+        "温州",
88
+        "嘉兴",
89
+        "湖州",
90
+        "杭州",
91
+        "宁波",
92
+        "温州",
93
+        "嘉兴",
94
+        "湖州"
95
+      ],
96
+      searchVal: "",
97
+      active: 0,
98
+      list: [],
99
+      loading: false,
100
+      finished: false,
101
+      page: 1,
102
+      limit: 10,
103
+      total: 0,
104
+      patients: []
105
+    };
106
+  },
107
+  methods: {
108
+    onCancel() {
109
+      this.typeShow = false;
110
+    },
111
+    onConfirm(value) {
112
+      this.type = value;
113
+      this.typeShow = false;
114
+    },
115
+    onLoad() {
116
+      setTimeout(() => {
117
+        for (let i = 0; i < this.limit; i++) {
118
+          this.list.push(this.list.length + 1);
119
+        }
120
+        // 加载状态结束
121
+        this.loading = false;
122
+        console.log("长度", this.patients.length);
123
+        if (this.patients.length > 10) {
124
+          this.page++;
125
+        }
126
+        console.log("page是什么", this.page);
127
+        this.getBloodDialysisPatient(this.page, this.limit);
128
+        // 数据全部加载完成
129
+        if (this.list.length >= this.total) {
130
+          this.finished = true;
131
+        }
132
+      }, 1000);
133
+    },
134
+    getBloodDialysisPatient() {
135
+      getBloodDialysisPatient(this.page, this.limit).then(response => {
136
+        if (response.data.state == 1) {
137
+          var patient = response.data.data.patient;
138
+          // console.log("病人信息", patient);
139
+          let arr = this.patients;
140
+          arr.push(...patient);
141
+          this.patients = arr;
142
+          var total = response.data.data.total;
143
+          this.total = total;
144
+          // console.log("总计", total);
145
+        }
146
+      });
147
+    },
148
+
149
+    addPatient() {
150
+      this.$router.push("/addPatints");
151
+    },
152
+    toPatientDetail(id) {
153
+      this.$router.push("/patientdetail?patientid=" + id);
154
+    }
155
+  },
156
+  created() {
157
+    const baseSize = 32;
158
+    // 设置 rem 函数
159
+    function setRem() {
160
+      const scale = document.documentElement.clientWidth / 750;
161
+      document.documentElement.style.fontSize =
162
+        baseSize * Math.min(scale, 2) + "px";
163
+      //   // 320 默认大小16px; 320px = 20rem ;每个元素px基础上/16
164
+      //   let htmlWidth =
165
+      //     document.documentElement.clientWidth || document.body.clientWidth;
166
+      //   //得到html的Dom元素
167
+      //   let htmlDom = document.getElementsByTagName("html")[0];
168
+      //   //设置根元素字体大小
169
+      //   htmlDom.style.fontSize = htmlWidth / 23.4375 + "px";
170
+    }
171
+    // 初始化
172
+    setRem();
173
+    // 改变窗口大小时重新设置 rem
174
+    window.onresize = function() {
175
+      setRem();
176
+    };
177
+    this.getBloodDialysisPatient();
178
+  }
179
+};
180
+</script>
181
+
182
+<style lang="scss" scoped>
183
+.page_patientManagement {
184
+  overflow-y: auto;
185
+  height: 100%;
186
+  .patientManagementTitle {
187
+    background: #fff;
188
+    padding: 0 1.125rem;
189
+    height: 3.125rem;
190
+    display: flex;
191
+    align-items: center;
192
+    justify-content: space-between;
193
+  }
194
+  .jiantou {
195
+    font-size: 1.5rem;
196
+    font-weight: 600;
197
+    margin-right: 3rem;
198
+  }
199
+  .titleName {
200
+    font-size: 1.125rem;
201
+    font-weight: 600;
202
+  }
203
+  .iconBox {
204
+    display: flex;
205
+    align-items: center;
206
+    float: right;
207
+  }
208
+  .iconOne {
209
+    font-size: 1.5rem;
210
+  }
211
+  .add {
212
+    margin-left: 1.25rem;
213
+  }
214
+  .toolBox {
215
+    display: flex;
216
+    height: 3.125rem;
217
+
218
+    align-items: center;
219
+
220
+    .toolOne {
221
+      width: 5.625rem;
222
+      height: 1.875rem;
223
+      background: rgba(246, 246, 246, 1);
224
+      border-radius: 5px;
225
+      text-align: center;
226
+      font-size: 0.8125rem;
227
+      color: #8d8d8d;
228
+      display: flex;
229
+      align-items: center;
230
+      justify-content: space-around;
231
+      margin-left: 0.875rem;
232
+    }
233
+  }
234
+  .van-dropdown-menu__title {
235
+    width: 5.625rem;
236
+    height: 1.875rem;
237
+    line-height: 1.875rem;
238
+    background: rgba(246, 246, 246, 1);
239
+    border-radius: 5px;
240
+    color: #8d8d8d;
241
+    font-size: 0.875rem;
242
+  }
243
+  .van-dropdown-menu__title::after {
244
+    right: 0.5rem;
245
+  }
246
+  .patientBox {
247
+    padding: 0 0.875rem;
248
+    background: #fff;
249
+    .patientOne {
250
+      display: flex;
251
+      align-items: center;
252
+      height: 3.75rem;
253
+      img {
254
+        width: 2.5rem;
255
+        height: 2.5rem;
256
+        margin-right: 0.875rem;
257
+      }
258
+    }
259
+  }
260
+}
261
+::-webkit-scrollbar {
262
+  width: 0;
263
+}
264
+</style>
265
+
266
+<style lang="scss">
267
+.page_patientManagement {
268
+  .searchBox {
269
+    .van-cell__value {
270
+      display: flex;
271
+      align-items: center;
272
+    }
273
+    .van-field__body {
274
+      width: 100%;
275
+    }
276
+  }
277
+}
278
+</style>

+ 7 - 1
src/router/index.js Datei anzeigen

@@ -23,7 +23,7 @@ export default new Router({
23 23
     {
24 24
       path: '/patients',
25 25
       name: 'patients',
26
-      component: () => import('@/pages/patientManagement/index')
26
+      component: () => import('@/pages/patientManagement/patientManagement')
27 27
     },
28 28
     // 新增病人
29 29
     {
@@ -31,6 +31,12 @@ export default new Router({
31 31
       name: 'addpatients',
32 32
       component: () => import('@/pages/patients/addPatient')
33 33
     },
34
+    // 全部病程
35
+    {
36
+      path: '/coursedetail',
37
+      name: 'coursedetail',
38
+      component: () => import('@/pages/allCourseManagement/index')
39
+    },
34 40
     //
35 41
     {
36 42
       path: '/patientdetail',