XMLWAN 4 년 전
부모
커밋
cdda4919e6

+ 2 - 2
src/pages/allDoctorAdvice/index.vue 파일 보기

@@ -13,11 +13,11 @@
13 13
         :key="index"
14 14
       >
15 15
         <div v-for="(it, i) in item.child" :key="i">
16
-            <div style="display:flex;justify-content:space-between;align-items:center">
16
+          <div style="display:flex;justify-content:space-between;align-items:center">
17 17
             <p class="time" v-if="i<1">
18 18
               {{ it.advice_date ? getTime(it.advice_date) : "" }}
19 19
             </p>
20
-            <van-icon class="ellipsis" name="ellipsis" @click="DeleteFive(item.start_time,item.child[0].execution_staff,index)" />
20
+            <span v-if="i<1"><van-icon class="ellipsis" name="ellipsis" @click="DeleteFive(item.start_time,item.child[0].execution_staff,index)" /></span>
21 21
             </div>
22 22
           <div class="statOrder">
23 23
             <div v-if="it.advice_type == 1 && it.parent_id == 0">

+ 253 - 0
src/pages/configureCenter/editBed.vue 파일 보기

@@ -0,0 +1,253 @@
1
+<template>
2
+  <div class="page_newBed">
3
+    <div class="newBedTitle">
4
+      <i class="iconfont icon-zuojiantou jiantou" @click="toReturn"></i>
5
+      <span class="titleName">编辑床位</span>
6
+        <div style="margin-left:80px">
7
+        <span @click="spread" id="copy">修改</span>
8
+      </div>
9
+    </div>
10
+    <div class="infoBox">
11
+      <van-field v-model="name" required label="床位号" placeholder="请输入" :readonly="readonly"/>
12
+      <van-field
13
+        label="所属分区"
14
+        v-model="zone"
15
+        right-icon="arrow"
16
+        placeholder="请选择"
17
+        required
18
+        readonly
19
+        @click="clickType"
20
+      />
21
+      <van-popup v-model="show" position="bottom" :style="{ height: '40%' }">
22
+        <van-picker :columns="columns" show-toolbar @confirm="confirmZone" @cancel="cancelZone"/>
23
+      </van-popup>
24
+
25
+      <van-field
26
+        label="所属分组"
27
+        v-model="group"
28
+        right-icon="arrow"
29
+        placeholder="请选择"
30
+        required
31
+        readonly
32
+        @click="clickTypeOne"
33
+      />
34
+      <van-popup v-model="show1" position="bottom" :style="{ height: '40%' }">
35
+        <van-picker :columns="columns1" show-toolbar @confirm="confirmGroup" @cancel="cancelGroup"/>
36
+      </van-popup>
37
+    </div>
38
+  </div>
39
+</template>
40
+
41
+<script>
42
+import { getAllGroupOne, getBedDetail, updateBed } from "@/api/patient/patient";
43
+export default {
44
+  data() {
45
+    return {
46
+      show: false,
47
+      show1: false,
48
+      columns: [],
49
+      columns1: [],
50
+      active: 0,
51
+      group: "",
52
+      name: "",
53
+      zone: "",
54
+      form: {
55
+        id: 0,
56
+        zone: "",
57
+        group: ""
58
+      },
59
+      data: [],
60
+      dataOne: [],
61
+      zoneData: [],
62
+      groupData: [],
63
+      readonly: true
64
+    };
65
+  },
66
+  methods: {
67
+    toReturn() {
68
+      this.$router.push("/configurecenter?active=" + this.active);
69
+    },
70
+    getAllGroupOne() {
71
+      getAllGroupOne().then(response => {
72
+        if (response.data.state === 1) {
73
+          var group = response.data.data.group;
74
+          for (let i = 0; i < group.length; i++) {
75
+            this.columns1.push(group[i].name);
76
+          }
77
+          this.data = group;
78
+          var zone = response.data.data.zone;
79
+
80
+          for (let j = 0; j < zone.length; j++) {
81
+            this.columns.push(zone[j].name);
82
+          }
83
+          this.dataOne = zone;
84
+        }
85
+      });
86
+    },
87
+    confirmZone(val) {
88
+      this.zone = val;
89
+      for (let i = 0; i < this.dataOne.length; i++) {
90
+        if (this.dataOne[i].name === val) {
91
+          this.form.zone = this.dataOne[i].id;
92
+        }
93
+      }
94
+      this.show = false;
95
+    },
96
+    cancelZone() {
97
+      this.show = false;
98
+    },
99
+    confirmGroup(val) {
100
+      this.group = val;
101
+      for (let i = 0; i < this.data.length; i++) {
102
+        if (val === this.data[i].name) {
103
+          this.form.group = this.data[i].id;
104
+        }
105
+      }
106
+      this.show1 = false;
107
+    },
108
+    cancelGroup() {
109
+      this.show1 = false;
110
+    },
111
+    getBedDetail(id) {
112
+      getBedDetail(id).then(response => {
113
+        if (response.data.state === 1) {
114
+          var bedDetail = response.data.data.bedDetail;
115
+          this.form.id = bedDetail.id;
116
+          var zone = response.data.data.zone;
117
+          console.log(zone);
118
+          var group = response.data.data.group;
119
+          console.log("bedDetail", bedDetail);
120
+          // this.zone = bedDetail.zone_id;
121
+          this.name = bedDetail.number;
122
+          for (let i = 0; i < zone.length; i++) {
123
+            if (bedDetail.zone_id === zone[i].id) {
124
+              this.zone = zone[i].name;
125
+            }
126
+          }
127
+          for (let j = 0; j < group.length; j++) {
128
+            if (bedDetail.group_id === group[j].id) {
129
+              this.group = group[j].name;
130
+            }
131
+          }
132
+        }
133
+      });
134
+    },
135
+    spread() {
136
+      var spancontent = document.getElementById("copy").innerHTML;
137
+      if (spancontent == "修改") {
138
+        this.readonly = false;
139
+        document.getElementById("copy").innerHTML = "保存";
140
+      }
141
+      if (spancontent == "保存") {
142
+        this.updateBed();
143
+      }
144
+    },
145
+    clickType() {
146
+      if (this.readonly == true) {
147
+        this.show = false;
148
+      }
149
+      if (this.readonly == false) {
150
+        this.show = true;
151
+      }
152
+    },
153
+    clickTypeOne() {
154
+      if (this.readonly == true) {
155
+        this.show1 = false;
156
+      }
157
+      if (this.readonly == false) {
158
+        this.show1 = true;
159
+      }
160
+    },
161
+    updateBed() {
162
+      if (this.name === "") {
163
+        this.$toast("床位号不能为空");
164
+        return false;
165
+      }
166
+      if (this.form.zone === "") {
167
+        for (let i = 0; i < this.dataOne.length; i++) {
168
+          if (this.zone === this.dataOne[i].name) {
169
+            this.form.zone = this.dataOne[i].id;
170
+          }
171
+        }
172
+      }
173
+      if (this.form.group === "") {
174
+        for (let i = 0; i < this.data.length; i++) {
175
+          if ((this.group = this.data[i].name)) {
176
+            this.form.group = this.data[i].id;
177
+          }
178
+        }
179
+      }
180
+      const params = {
181
+        id: this.form.id,
182
+        name: this.name,
183
+        zone: this.form.zone,
184
+        group: this.form.group
185
+      };
186
+      updateBed(params).then(response => {
187
+        if (response.data.state === 1) {
188
+          var number = response.data.data.number;
189
+          console.log("number", number);
190
+          this.$router.push("/configurecenter?active=" + this.active);
191
+        }
192
+      });
193
+    }
194
+  },
195
+  created() {
196
+    this.active = parseInt(this.$route.query.active);
197
+    this.getAllGroupOne();
198
+    var id = this.$route.query.id;
199
+    this.getBedDetail(id);
200
+  }
201
+};
202
+</script>
203
+
204
+<style lang="scss" scoped>
205
+.page_newBed {
206
+  height: 100%;
207
+  overflow: hidden;
208
+  overflow-y: auto;
209
+  background: #fafafa;
210
+  .newBedTitle {
211
+    background: #fff;
212
+    padding: 0 1.125rem;
213
+    height: 3.125rem;
214
+    display: flex;
215
+    align-items: center;
216
+  }
217
+  .jiantou {
218
+    font-size: 1.5rem;
219
+    font-weight: 600;
220
+    margin-right: 7rem;
221
+  }
222
+  .titleName {
223
+    font-size: 1.125rem;
224
+    font-weight: 600;
225
+  }
226
+  .infoBox {
227
+    margin-top: 1rem;
228
+  }
229
+  .save {
230
+    width: 19.25rem;
231
+    height: 2.875rem;
232
+    margin: 0 auto;
233
+    background: rgba(51, 138, 251, 1);
234
+    box-shadow: 0px 1px 12px 0px rgba(51, 138, 251, 1);
235
+    border-radius: 1.4375rem;
236
+    text-align: center;
237
+    line-height: 2.875rem;
238
+    color: #fff;
239
+    margin-top: 2.875rem;
240
+  }
241
+}
242
+</style>
243
+<style lang="scss">
244
+.infoBox {
245
+  .van-field__body {
246
+    width: 100%;
247
+  }
248
+  .van-cell__value {
249
+    display: flex;
250
+    align-items: center;
251
+  }
252
+}
253
+</style>

+ 128 - 0
src/pages/configureCenter/editGrouping.vue 파일 보기

@@ -0,0 +1,128 @@
1
+<template>
2
+  <div class="page_newGrouping">
3
+    <div class="newGroupingTitle">
4
+      <i class="iconfont icon-zuojiantou jiantou" @click="toReturn"></i>
5
+      <span class="titleName">编辑分组</span>
6
+       <div style="margin-left:80px">
7
+        <span @click="spread" id="copy">修改</span>
8
+      </div>
9
+    </div>
10
+    <div class="infoBox">
11
+      <van-field v-model="name" required label="分组名称" placeholder="请输入" :readonly="readonly" />
12
+    </div>
13
+  </div>
14
+</template>
15
+
16
+<script>
17
+import { getGroupDetail, updateGroup } from "@/api/patient/patient";
18
+export default {
19
+  data() {
20
+    return {
21
+      show: false,
22
+      id: 0,
23
+      name: "",
24
+      active: 0,
25
+      readonly: true
26
+    };
27
+  },
28
+  methods: {
29
+    getGroupDetail(id) {
30
+      getGroupDetail(id).then(response => {
31
+        if (response.data.state == 1) {
32
+          var groupdetail = response.data.data.groupDetail;
33
+          console.log("groupdetail", groupdetail);
34
+          this.name = groupdetail.name;
35
+          this.id = groupdetail.id;
36
+        }
37
+      });
38
+    },
39
+    updateGroup() {
40
+      if (this.name === "") {
41
+        this.$toast("请输入分组名");
42
+        return false;
43
+      }
44
+      const params = {
45
+        name: this.name,
46
+        id: this.id
47
+      };
48
+      updateGroup(params).then(response => {
49
+        if (response.data.state === 1) {
50
+          var group = response.data.data.group;
51
+          this.$router.push("/configurecenter?active=" + this.active);
52
+        }
53
+      });
54
+    },
55
+    toReturn() {
56
+      this.$router.push("/configurecenter?active=" + this.active);
57
+    },
58
+    spread() {
59
+      var spancontent = document.getElementById("copy").innerHTML;
60
+      if (spancontent == "修改") {
61
+        this.readonly = false;
62
+        document.getElementById("copy").innerHTML = "保存";
63
+      }
64
+      if (spancontent == "保存") {
65
+        this.updateGroup();
66
+      }
67
+    }
68
+  },
69
+  created() {
70
+    this.active = parseInt(this.$route.query.active);
71
+    var id = this.$route.query.id;
72
+    this.getGroupDetail(id);
73
+  }
74
+};
75
+</script>
76
+
77
+<style lang="scss" scoped>
78
+.page_newGrouping {
79
+  height: 100%;
80
+  overflow: hidden;
81
+  overflow-y: auto;
82
+  background: #fafafa;
83
+  .newGroupingTitle {
84
+    background: #fff;
85
+    padding: 0 1.125rem;
86
+    height: 3.125rem;
87
+    display: flex;
88
+    align-items: center;
89
+  }
90
+  .jiantou {
91
+    font-size: 1.5rem;
92
+    font-weight: 600;
93
+    margin-right: 7rem;
94
+  }
95
+  .titleName {
96
+    font-size: 1.125rem;
97
+    font-weight: 600;
98
+  }
99
+  .infoBox {
100
+    margin-top: 1rem;
101
+
102
+    .van-cell__value {
103
+      display: flex;
104
+      align-items: center;
105
+    }
106
+  }
107
+  .save {
108
+    width: 19.25rem;
109
+    height: 2.875rem;
110
+    margin: 0 auto;
111
+    background: rgba(51, 138, 251, 1);
112
+    box-shadow: 0px 1px 12px 0px rgba(51, 138, 251, 1);
113
+    border-radius: 1.4375rem;
114
+    text-align: center;
115
+    line-height: 2.875rem;
116
+    color: #fff;
117
+    margin-top: 2.875rem;
118
+  }
119
+}
120
+</style>
121
+<style lang="scss">
122
+.infoBox {
123
+  .van-cell__value {
124
+    display: flex;
125
+    align-items: center;
126
+  }
127
+}
128
+</style>

+ 240 - 0
src/pages/configureCenter/editPartion.vue 파일 보기

@@ -0,0 +1,240 @@
1
+<template>
2
+  <div class="page_newPartition">
3
+    <div class="newPartitionTitle">
4
+      <i class="iconfont icon-zuojiantou jiantou" @click="toReturn"></i>
5
+      <span class="titleName">编辑分区</span>
6
+      <div style="margin-left:80px">
7
+        <span @click="spread" id="copy">修改</span>
8
+      </div>
9
+    </div>
10
+    <div class="infoBox">
11
+      <van-field
12
+        v-model="form.name"
13
+        required
14
+        label="分区名称"
15
+        placeholder="请输入"
16
+        :readonly="readonly"
17
+      />
18
+      <van-field
19
+        label="分区类型"
20
+        v-model="type"
21
+        right-icon="arrow"
22
+        placeholder="请选择"
23
+        required
24
+        :readonly="readonly"
25
+        @click="clickType"
26
+      />
27
+      <van-popup v-model="show" position="bottom" :style="{ height: '40%' }">
28
+        <van-picker
29
+          :columns="columns"
30
+          show-toolbar
31
+          @confirm="onConfirm"
32
+          @cancel="oncancel"
33
+        />
34
+      </van-popup>
35
+    </div>
36
+  </div>
37
+</template>
38
+
39
+<script>
40
+import { getPartionDetail, UpdatePartition } from "@/api/patient/patient";
41
+export default {
42
+  data() {
43
+    return {
44
+      show: false,
45
+      columns: ["普通", "乙肝", "丙肝", "艾滋病", "肺结核", "梅毒"],
46
+      form: {
47
+        id: "",
48
+        name: "",
49
+        zoneType: ""
50
+      },
51
+      type: "",
52
+      active: 0,
53
+      showOne: true,
54
+      shoTwo: false,
55
+      readonly: true
56
+    };
57
+  },
58
+  methods: {
59
+    onConfirm(val) {
60
+      if (val === "普通") {
61
+        this.type = val;
62
+        this.form.zoneType = 1;
63
+        this.show = false;
64
+      }
65
+      if (val === "乙肝") {
66
+        this.type = val;
67
+        this.form.zoneType = 2;
68
+        this.show = false;
69
+      }
70
+      if (val === "丙肝") {
71
+        this.type = val;
72
+        this.form.zoneType = 3;
73
+        this.show = false;
74
+      }
75
+      if (val === "艾滋病") {
76
+        this.type = val;
77
+        this.form.zoneType = 4;
78
+        this.show = false;
79
+      }
80
+      if (val === "肺结核") {
81
+        this.type = val;
82
+        this.form.zoneType = 5;
83
+        this.show = false;
84
+      }
85
+      if (val === "梅毒") {
86
+        this.type = val;
87
+        this.form.zoneType = 6;
88
+        this.show = false;
89
+      }
90
+    },
91
+    oncancel() {
92
+      this.show = false;
93
+    },
94
+    getPartionDetail(id) {
95
+      getPartionDetail(id).then(response => {
96
+        if (response.data.state === 1) {
97
+          var partionDetail = response.data.data.partionDetail;
98
+          this.form.name = partionDetail.name;
99
+          this.form.id = partionDetail.id;
100
+          if (partionDetail.type === 1) {
101
+            this.type = "普通";
102
+          }
103
+          if (partionDetail.type === 2) {
104
+            this.type = "乙肝";
105
+          }
106
+          if (partionDetail.type === 3) {
107
+            this.type = "丙肝";
108
+          }
109
+          if (partionDetail.type === 4) {
110
+            this.type = "艾滋病";
111
+          }
112
+          if (partionDetail.type === 5) {
113
+            this.type = "肺结核";
114
+          }
115
+          if (partionDetail.type === 6) {
116
+            this.type = "梅毒";
117
+          }
118
+          console.log("partionDetail", partionDetail);
119
+        }
120
+      });
121
+    },
122
+    UpdatePartition() {
123
+      if (this.form.name === "") {
124
+        this.$toast("请输入分区名");
125
+        return false;
126
+      }
127
+      if (this.form.zoneType === "") {
128
+        if (this.type == "普通") {
129
+          this.form.zoneType = 1;
130
+        }
131
+        if (this.type == "乙肝") {
132
+          this.form.zoneType = 2;
133
+        }
134
+        if (this.type == "丙肝") {
135
+          this.form.zoneType = 3;
136
+        }
137
+        if (this.type == "艾滋病") {
138
+          this.form.zoneType = 4;
139
+        }
140
+        if (this.type == "肺结核") {
141
+          this.form.zoneType = 5;
142
+        }
143
+        if (this.type == "梅毒") {
144
+          this.form.zoneType = 6;
145
+        }
146
+      }
147
+      const params = {
148
+        id: this.form.id,
149
+        name: this.form.name,
150
+        type: this.form.zoneType
151
+      };
152
+      UpdatePartition(params).then(response => {
153
+        if (response.data.state === 1) {
154
+          var zone = response.data.data.zone;
155
+          console.log("zone", zone);
156
+          this.$router.push("/configurecenter");
157
+        }
158
+      });
159
+    },
160
+    toReturn() {
161
+      this.$router.push("/configurecenter?active=" + this.active);
162
+    },
163
+    spread() {
164
+      var spancontent = document.getElementById("copy").innerHTML;
165
+      if (spancontent == "修改") {
166
+        this.readonly = false;
167
+        document.getElementById("copy").innerHTML = "保存";
168
+      }
169
+      if (spancontent == "保存") {
170
+        this.UpdatePartition();
171
+      }
172
+    },
173
+    clickType() {
174
+      if (this.readonly == true) {
175
+        this.show = false;
176
+      }
177
+      if (this.readonly == false) {
178
+        this.show = true;
179
+      }
180
+    }
181
+  },
182
+  created() {
183
+    this.active = parseInt(this.$route.query.active);
184
+    var id = this.$route.query.id;
185
+    console.log("id", id);
186
+    this.getPartionDetail(id);
187
+  }
188
+};
189
+</script>
190
+
191
+<style lang="scss" scoped>
192
+.page_newPartition {
193
+  height: 100%;
194
+  overflow: hidden;
195
+  overflow-y: auto;
196
+  background: #fafafa;
197
+  .newPartitionTitle {
198
+    background: #fff;
199
+    padding: 0 1.125rem;
200
+    height: 3.125rem;
201
+    display: flex;
202
+    align-items: center;
203
+  }
204
+  .jiantou {
205
+    font-size: 1.5rem;
206
+    font-weight: 600;
207
+    margin-right: 7rem;
208
+  }
209
+  .titleName {
210
+    font-size: 1.125rem;
211
+    font-weight: 600;
212
+  }
213
+  .infoBox {
214
+    margin-top: 1rem;
215
+  }
216
+  .save {
217
+    width: 19.25rem;
218
+    height: 2.875rem;
219
+    margin: 0 auto;
220
+    background: rgba(51, 138, 251, 1);
221
+    box-shadow: 0px 1px 12px 0px rgba(51, 138, 251, 1);
222
+    border-radius: 1.4375rem;
223
+    text-align: center;
224
+    line-height: 2.875rem;
225
+    color: #fff;
226
+    margin-top: 2.875rem;
227
+  }
228
+}
229
+</style>
230
+<style lang="scss">
231
+.infoBox {
232
+  .van-field__body {
233
+    width: 100%;
234
+  }
235
+  .van-cell__value {
236
+    display: flex;
237
+    align-items: center;
238
+  }
239
+}
240
+</style>

+ 7 - 3
src/pages/doctorAdvice/components/DoctorManagement.vue 파일 보기

@@ -37,10 +37,10 @@
37 37
             </div>
38 38
 
39 39
          <div v-for="(it,i) in item.child.slice(0,3)" :key="i">
40
-            <div class="statOrder"  v-if="it.advice_type == 1 && it.parent_id == 0" >
40
+            <div class="statOrder"  v-if="it.advice_type == 1 && it.parent_id == 0">
41 41
               <div class="statOrderTitle">
42 42
                 <span v-if="i<1">长期医嘱</span>
43
-                <span  v-if="i<1" style="margin-left:1rem">{{getTimes(it.start_time)}}</span>
43
+                <span v-if="i<1" style="margin-left:1rem">{{getTimes(it.start_time)}}</span>
44 44
               </div>
45 45
               <div class="orderContent" v-if="i<4">
46 46
                 <p> {{ it.advice_name }} {{ it.advice_desc
@@ -94,6 +94,7 @@
94 94
                 </div>
95 95
             </div>
96 96
          </div>
97
+
97 98
             <div class="all" @click="toDoctorAdviceDetail(item.start_time)">全部</div>
98 99
           </div>
99 100
         </van-list>
@@ -243,6 +244,7 @@ export default {
243 244
         this.form.limit,
244 245
         this.form.page
245 246
       );
247
+      this.onLoad();
246 248
     },
247 249
     getstartTime(value) {
248 250
       this.form.page = 1;
@@ -267,6 +269,7 @@ export default {
267 269
         this.form.page
268 270
       );
269 271
       this.startShow = false;
272
+      this.onLoad();
270 273
     },
271 274
     getstartTime2(value) {
272 275
       this.form.page = 1;
@@ -292,6 +295,7 @@ export default {
292 295
         this.form.page
293 296
       );
294 297
       this.endShow = false;
298
+      this.onLoad();
295 299
     },
296 300
     getDoctorAdvices(patientid) {
297 301
       if (this.type === "全部") {
@@ -394,7 +398,7 @@ export default {
394 398
           this.loading = false;
395 399
           this.finished = true;
396 400
         }
397
-      }, 1000);
401
+      }, 5000);
398 402
     },
399 403
 
400 404
     toDoctorAdviceDetail(id) {