|
@@ -2,12 +2,10 @@
|
2
|
2
|
<div v-if="visibility" class="Dialog">
|
3
|
3
|
<div class="DialogTit">
|
4
|
4
|
<div class="back" @click="cancle()">
|
5
|
|
- <span class="iconfont"> </span>返回
|
|
5
|
+ <span class="iconfont"></span>返回
|
6
|
6
|
</div>
|
7
|
7
|
<h1 class="name">长期医嘱推送</h1>
|
8
|
|
- <span @click="comfirm" class="success"
|
9
|
|
- >确定</span
|
10
|
|
- >
|
|
8
|
+ <span @click="comfirm" class="success">确定</span>
|
11
|
9
|
</div>
|
12
|
10
|
|
13
|
11
|
<div class="CheckBox">
|
|
@@ -20,13 +18,25 @@
|
20
|
18
|
:key="index"
|
21
|
19
|
:name="advice.id"
|
22
|
20
|
>
|
23
|
|
- <div style="padding-top: 15px;padding-left: 10px">开嘱医生 {{ getDoctorName(advice.advice_doctor) }}</div><br/>
|
24
|
|
- <div style="padding-left: 10px">开嘱时间 {{ getTime(advice.created_time) }}</div><br/>
|
25
|
|
- <div style="padding-bottom: 15px;padding-left: 10px"> 医嘱内容 {{getContent(advice)}}</div>
|
26
|
|
- <div style="padding-bottom: 15px;padding-left: 10px" v-if="advice.frequency_type == 1"> 推送频率 每日必推</div>
|
27
|
|
- <div style="padding-bottom: 15px;padding-left: 10px" v-if="advice.frequency_type == 2"> 推送频率 {{advice.day_count}}天/次</div>
|
28
|
|
- <div style="padding-bottom: 15px;padding-left: 10px" v-if="advice.frequency_type == 3"> 推送频率 每周{{advice.week_day}}</div>
|
29
|
|
-
|
|
21
|
+ <div
|
|
22
|
+ style="padding-top: 15px;padding-left: 10px"
|
|
23
|
+ >开嘱医生 {{ getDoctorName(advice.advice_doctor) }}</div>
|
|
24
|
+ <br />
|
|
25
|
+ <div style="padding-left: 10px">开嘱时间 {{ getTime(advice.created_time) }}</div>
|
|
26
|
+ <br />
|
|
27
|
+ <div style="padding-bottom: 15px;padding-left: 10px">医嘱内容 {{getContent(advice)}}</div>
|
|
28
|
+ <div
|
|
29
|
+ style="padding-bottom: 15px;padding-left: 10px"
|
|
30
|
+ v-if="advice.frequency_type == 1"
|
|
31
|
+ >推送频率 每日必推</div>
|
|
32
|
+ <div
|
|
33
|
+ style="padding-bottom: 15px;padding-left: 10px"
|
|
34
|
+ v-if="advice.frequency_type == 2"
|
|
35
|
+ >推送频率 {{advice.day_count}}天/次</div>
|
|
36
|
+ <div
|
|
37
|
+ style="padding-bottom: 15px;padding-left: 10px"
|
|
38
|
+ v-if="advice.frequency_type == 3"
|
|
39
|
+ >推送频率 每周{{advice.week_day}}</div>
|
30
|
40
|
</van-checkbox>
|
31
|
41
|
</van-checkbox-group>
|
32
|
42
|
</li>
|
|
@@ -36,172 +46,204 @@
|
36
|
46
|
</template>
|
37
|
47
|
|
38
|
48
|
<script>
|
39
|
|
- import {parseTime} from '@/utils'
|
40
|
|
-
|
41
|
|
- export default {
|
42
|
|
- name: 'LongAdviceSubMenu',
|
43
|
|
- created () {
|
|
49
|
+import { parseTime } from "@/utils";
|
|
50
|
+
|
|
51
|
+export default {
|
|
52
|
+ name: "LongAdviceSubMenu",
|
|
53
|
+ created() {},
|
|
54
|
+ data() {
|
|
55
|
+ return {
|
|
56
|
+ result: [],
|
|
57
|
+ id: 0,
|
|
58
|
+ selectName: ""
|
|
59
|
+ };
|
|
60
|
+ },
|
|
61
|
+ props: {
|
|
62
|
+ propsForm: {
|
|
63
|
+ type: Object
|
44
|
64
|
},
|
45
|
|
- data () {
|
46
|
|
- return {
|
47
|
|
- result: [],
|
48
|
|
- id: 0,
|
49
|
|
- selectName: ''
|
|
65
|
+ visibility: {
|
|
66
|
+ type: Boolean,
|
|
67
|
+ default: false
|
|
68
|
+ }
|
|
69
|
+ },
|
|
70
|
+ methods: {
|
|
71
|
+ getDoctorName(doctor_id) {
|
|
72
|
+ for (let i = 0; i < this.propsForm.operators.length; i++) {
|
|
73
|
+ if (this.propsForm.operators[i].id == doctor_id) {
|
|
74
|
+ return this.propsForm.operators[i].name;
|
|
75
|
+ }
|
50
|
76
|
}
|
51
|
77
|
},
|
52
|
|
- props: {
|
53
|
|
- propsForm: {
|
54
|
|
- type: Object
|
55
|
|
- },
|
56
|
|
- visibility: {
|
57
|
|
- type: Boolean,
|
58
|
|
- default: false
|
59
|
|
- },
|
|
78
|
+ getTime(val) {
|
|
79
|
+ return parseTime(val, "{y}-{m}-{d} {h}:{i}");
|
60
|
80
|
},
|
61
|
|
- methods: {
|
62
|
|
- getDoctorName (doctor_id) {
|
63
|
|
- for (let i = 0; i < this.propsForm.operators.length; i++) {
|
64
|
|
- if (this.propsForm.operators[i].id == doctor_id) {
|
65
|
|
- return this.propsForm.operators[i].name
|
66
|
|
- }
|
67
|
|
- }
|
68
|
|
- }, getTime (val) {
|
69
|
|
- return parseTime(val, '{y}-{m}-{d} {h}:{i}')
|
70
|
|
-
|
71
|
|
- }, getContent (val) {
|
72
|
|
- let prescribing_number = ''
|
73
|
|
- let single_dose = ''
|
74
|
|
- let advice_desc = ''
|
75
|
|
-
|
76
|
|
- if (val.prescribing_number > 0) {
|
77
|
|
- prescribing_number = val.prescribing_number + val.prescribing_number_unit
|
78
|
|
- }
|
79
|
|
- if (val.single_dose > 0) {
|
80
|
|
- single_dose = ' 单次用量 ' + val.single_dose + val.single_dose_unit
|
81
|
|
- }
|
82
|
|
-
|
83
|
|
- if (val.advice_desc > 0) {
|
84
|
|
- advice_desc = val.advice_desc + val.drug_spec_unit
|
85
|
|
- }
|
|
81
|
+ getContent(val) {
|
|
82
|
+ let prescribing_number = "";
|
|
83
|
+ let single_dose = "";
|
|
84
|
+ let advice_desc = "";
|
|
85
|
+
|
|
86
|
+ if (val.prescribing_number > 0) {
|
|
87
|
+ prescribing_number =
|
|
88
|
+ val.prescribing_number + val.prescribing_number_unit;
|
|
89
|
+ }
|
|
90
|
+ if (val.single_dose > 0) {
|
|
91
|
+ single_dose = " 单次用量 " + val.single_dose + val.single_dose_unit;
|
|
92
|
+ }
|
86
|
93
|
|
87
|
|
- let name = ""
|
88
|
|
- if (val.child.length > 0){
|
89
|
|
- for (let i = 0 ; i < val.child.length; i++){
|
90
|
|
- if(val.child[i].prescribing_number > 0){
|
91
|
|
- val.child[i]['presc'] = val.child[i].prescribing_number + val.child[i].prescribing_number_unit
|
92
|
|
- }else{
|
93
|
|
- val.child[i]['presc'] = ''
|
94
|
|
- }
|
|
94
|
+ if (val.advice_desc > 0) {
|
|
95
|
+ advice_desc = val.advice_desc + val.drug_spec_unit;
|
|
96
|
+ }
|
95
|
97
|
|
96
|
|
- if(val.child[i].single_dose > 0){
|
97
|
|
- val.child[i]['single'] = " "+' 单次用量 '+" "+val.child[i].single_dose + val.child[i].single_dose_unit
|
98
|
|
- }else{
|
99
|
|
- val.child[i]['single'] = ''
|
100
|
|
- }
|
101
|
|
- name = name+"▲"+val.child[i].advice_name+""
|
102
|
|
- + val.child[i].advice_desc
|
103
|
|
- + val.child[i].drug_spec_unit
|
104
|
|
- + val.child[i].presc
|
105
|
|
- + val.child[i].single
|
|
98
|
+ let name = "";
|
|
99
|
+ if (val.child.length > 0) {
|
|
100
|
+ for (let i = 0; i < val.child.length; i++) {
|
|
101
|
+ if (val.child[i].prescribing_number > 0) {
|
|
102
|
+ val.child[i]["presc"] =
|
|
103
|
+ val.child[i].prescribing_number +
|
|
104
|
+ val.child[i].prescribing_number_unit;
|
|
105
|
+ } else {
|
|
106
|
+ val.child[i]["presc"] = "";
|
106
|
107
|
}
|
107
|
|
- return val.advice_name +" "+advice_desc+" "
|
108
|
|
- + val.drug_spec_unit
|
109
|
|
- + prescribing_number
|
110
|
|
- + " "+single_dose+" "+ " "+val.delivery_way+" "+ val.execution_frequency + val.remark +name
|
111
|
|
-
|
112
|
|
- } else {
|
113
|
|
- return val.advice_name +" "+advice_desc
|
114
|
|
- + prescribing_number
|
115
|
|
- + " "+single_dose+" "+ " "+val.delivery_way+" "+ val.execution_frequency + val.remark
|
116
|
|
- }
|
117
|
|
-
|
118
|
108
|
|
119
|
|
- },
|
120
|
|
-
|
121
|
|
- cancle: function () {
|
122
|
|
- this.$emit('menu-cancle-three')
|
123
|
|
- },
|
124
|
|
- comfirm: function () {
|
125
|
|
- this.$emit('menu-comfirm-three', this.getValue())
|
126
|
|
- },
|
127
|
|
- getValue: function () {
|
128
|
|
- let form = {}
|
129
|
|
- let results = []
|
130
|
|
- for (let i = 0; i < this.propsForm.list.length; i++){
|
131
|
|
- for (let a = 0; a < this.propsForm.result.length; a++){
|
132
|
|
- if( this.propsForm.list[i].id == this.propsForm.result[a]){
|
133
|
|
- results.push(this.propsForm.list[i])
|
134
|
|
- }
|
|
109
|
+ if (val.child[i].single_dose > 0) {
|
|
110
|
+ val.child[i]["single"] =
|
|
111
|
+ " " +
|
|
112
|
+ " 单次用量 " +
|
|
113
|
+ " " +
|
|
114
|
+ val.child[i].single_dose +
|
|
115
|
+ val.child[i].single_dose_unit;
|
|
116
|
+ } else {
|
|
117
|
+ val.child[i]["single"] = "";
|
135
|
118
|
}
|
|
119
|
+ name =
|
|
120
|
+ name +
|
|
121
|
+ "▲" +
|
|
122
|
+ val.child[i].advice_name +
|
|
123
|
+ "" +
|
|
124
|
+ val.child[i].advice_desc +
|
|
125
|
+ val.child[i].drug_spec_unit +
|
|
126
|
+ val.child[i].presc +
|
|
127
|
+ val.child[i].single;
|
136
|
128
|
}
|
137
|
|
- var obj5={}
|
138
|
|
- results = results.reduce((cur, next) => {
|
139
|
|
- obj5[next.id] ? '' : obj5[next.id] = true && cur.push(next)
|
140
|
|
- return cur
|
141
|
|
- }, [])
|
142
|
|
- return results
|
143
|
|
- },
|
|
129
|
+ return (
|
|
130
|
+ val.advice_name +
|
|
131
|
+ " " +
|
|
132
|
+ advice_desc +
|
|
133
|
+ " " +
|
|
134
|
+ val.drug_spec_unit +
|
|
135
|
+ prescribing_number +
|
|
136
|
+ " " +
|
|
137
|
+ single_dose +
|
|
138
|
+ " " +
|
|
139
|
+ " " +
|
|
140
|
+ val.delivery_way +
|
|
141
|
+ " " +
|
|
142
|
+ val.execution_frequency +
|
|
143
|
+ val.remark +
|
|
144
|
+ name
|
|
145
|
+ );
|
|
146
|
+ } else {
|
|
147
|
+ return (
|
|
148
|
+ val.advice_name +
|
|
149
|
+ " " +
|
|
150
|
+ advice_desc +
|
|
151
|
+ prescribing_number +
|
|
152
|
+ " " +
|
|
153
|
+ single_dose +
|
|
154
|
+ " " +
|
|
155
|
+ " " +
|
|
156
|
+ val.delivery_way +
|
|
157
|
+ " " +
|
|
158
|
+ val.execution_frequency +
|
|
159
|
+ val.remark
|
|
160
|
+ );
|
|
161
|
+ }
|
|
162
|
+ },
|
144
|
163
|
|
|
164
|
+ cancle: function() {
|
|
165
|
+ this.$emit("menu-cancle-three");
|
145
|
166
|
},
|
146
|
|
- watch: {
|
147
|
|
- visibility (val) {
|
148
|
|
- //初始化数据操作
|
|
167
|
+ comfirm: function() {
|
|
168
|
+ this.$emit("menu-comfirm-three", this.getValue());
|
|
169
|
+ },
|
|
170
|
+ getValue: function() {
|
|
171
|
+ let form = {};
|
|
172
|
+ let results = [];
|
|
173
|
+ for (let i = 0; i < this.propsForm.list.length; i++) {
|
|
174
|
+ for (let a = 0; a < this.propsForm.result.length; a++) {
|
|
175
|
+ if (this.propsForm.list[i].id == this.propsForm.result[a]) {
|
|
176
|
+ results.push(this.propsForm.list[i]);
|
|
177
|
+ }
|
|
178
|
+ }
|
149
|
179
|
}
|
|
180
|
+ var obj5 = {};
|
|
181
|
+ results = results.reduce((cur, next) => {
|
|
182
|
+ obj5[next.id] ? "" : (obj5[next.id] = true && cur.push(next));
|
|
183
|
+ return cur;
|
|
184
|
+ }, []);
|
|
185
|
+ return results;
|
|
186
|
+ }
|
|
187
|
+ },
|
|
188
|
+ watch: {
|
|
189
|
+ visibility(val) {
|
|
190
|
+ //初始化数据操作
|
150
|
191
|
}
|
151
|
192
|
}
|
|
193
|
+};
|
152
|
194
|
</script>
|
153
|
195
|
|
154
|
196
|
<style style="stylesheet/scss" lang="scss" scoped>
|
155
|
|
- .optionsBox {
|
|
197
|
+.optionsBox {
|
156
|
198
|
background: #fff;
|
157
|
199
|
max-height: 10rem;
|
158
|
200
|
min-height: 5rem;
|
159
|
201
|
@media only screen and (max-width: 812px) {
|
160
|
|
- min-height: 8rem !important;
|
|
202
|
+ min-height: 8rem !important;
|
161
|
203
|
}
|
162
|
204
|
ul {
|
163
|
|
- overflow-y: scroll;
|
164
|
|
- max-height: 9rem;
|
165
|
|
- li {
|
166
|
|
- height: 1.1rem;
|
167
|
|
- line-height: 1.1rem;
|
168
|
|
- border-bottom: 1px #e5e5e5 solid;
|
169
|
|
- padding: 0 0.38rem;
|
170
|
|
- font-size: 0.36rem;
|
171
|
|
- color: $title-color;
|
172
|
|
- }
|
173
|
|
- .tick {
|
174
|
|
- position: relative;
|
175
|
|
- &::before {
|
176
|
|
- content: "";
|
177
|
|
- display: inline-block;
|
178
|
|
- border: 2px solid $main-color;
|
179
|
|
- border-top-width: 0;
|
180
|
|
- border-right-width: 0;
|
181
|
|
- width: 0.3rem;
|
182
|
|
- height: 0.15rem;
|
183
|
|
- -webkit-transform: rotate(-50deg);
|
184
|
|
- position: absolute;
|
185
|
|
- top: 0.38rem;
|
186
|
|
- right: 0.44rem;
|
187
|
|
- }
|
188
|
|
- }
|
189
|
|
- }
|
|
205
|
+ overflow-y: scroll;
|
|
206
|
+ max-height: 9rem;
|
|
207
|
+ li {
|
|
208
|
+ height: 1.1rem;
|
|
209
|
+ line-height: 1.1rem;
|
|
210
|
+ border-bottom: 1px #e5e5e5 solid;
|
|
211
|
+ padding: 0 0.38rem;
|
|
212
|
+ font-size: 0.36rem;
|
|
213
|
+ color: $title-color;
|
|
214
|
+ }
|
|
215
|
+ .tick {
|
|
216
|
+ position: relative;
|
|
217
|
+ &::before {
|
|
218
|
+ content: "";
|
|
219
|
+ display: inline-block;
|
|
220
|
+ border: 2px solid $main-color;
|
|
221
|
+ border-top-width: 0;
|
|
222
|
+ border-right-width: 0;
|
|
223
|
+ width: 0.3rem;
|
|
224
|
+ height: 0.15rem;
|
|
225
|
+ -webkit-transform: rotate(-50deg);
|
|
226
|
+ position: absolute;
|
|
227
|
+ top: 0.38rem;
|
|
228
|
+ right: 0.44rem;
|
|
229
|
+ }
|
|
230
|
+ }
|
190
|
231
|
}
|
191
|
|
- .CheckBox {
|
|
232
|
+}
|
|
233
|
+.CheckBox {
|
192
|
234
|
background: #fff;
|
193
|
235
|
max-height: 6.8rem;
|
194
|
236
|
min-height: 5rem;
|
195
|
237
|
overflow-y: scroll;
|
196
|
238
|
@media only screen and (max-width: 812px) {
|
197
|
|
- max-height: 8rem !important;
|
198
|
|
- min-height: 8rem !important;
|
|
239
|
+ max-height: 14.8rem !important;
|
|
240
|
+ min-height: 8rem !important;
|
199
|
241
|
}
|
200
|
242
|
|
201
|
243
|
ul {
|
202
|
|
- li {
|
203
|
|
- line-height: 1rem;
|
204
|
|
- }
|
205
|
|
- }
|
|
244
|
+ li {
|
|
245
|
+ line-height: 1rem;
|
|
246
|
+ }
|
206
|
247
|
}
|
|
248
|
+}
|
207
|
249
|
</style>
|