Browse Source

样式更改

xiaoming_global 5 years ago
parent
commit
76b955408a

+ 6 - 6
src/pages/main/dialog/LongDialog.vue View File

231
 </template>
231
 </template>
232
 
232
 
233
 <script>
233
 <script>
234
-import LongDialogMenu from './subMenu/LongDialogMenu';
235
-import { createPatientDialysisSolution } from '@/api/patient';
236
-import { Toast } from 'vant';
234
+import LongDialogMenu from './subMenu/LongDialogMenu'
235
+import { createPatientDialysisSolution } from '@/api/patient'
236
+import { Toast } from 'vant'
237
 
237
 
238
 export default {
238
 export default {
239
   name: 'LongDialog',
239
   name: 'LongDialog',
393
       for (let index = 0; index < this.dialyserList.length; index++) {
393
       for (let index = 0; index < this.dialyserList.length; index++) {
394
         if (machine == this.dialyserList[index].id) {
394
         if (machine == this.dialyserList[index].id) {
395
           this.dialysisSolution.hemodialysis_machine_name = this.dialyserList[index].name
395
           this.dialysisSolution.hemodialysis_machine_name = this.dialyserList[index].name
396
-          break;
396
+          break
397
         }
397
         }
398
       }
398
       }
399
     },
399
     },
405
       for (let index = 0; index < this.perfusion_apparatus.length; index++) {
405
       for (let index = 0; index < this.perfusion_apparatus.length; index++) {
406
         if (apparatus == this.perfusion_apparatus[index].id) {
406
         if (apparatus == this.perfusion_apparatus[index].id) {
407
           this.dialysisSolution.perfusion_apparatus_name = this.perfusion_apparatus[index].name
407
           this.dialysisSolution.perfusion_apparatus_name = this.perfusion_apparatus[index].name
408
-          break;
408
+          break
409
         }
409
         }
410
       }
410
       }
411
     },
411
     },
417
       for (let index = 0; index < this.replacementWays.length; index++) {
417
       for (let index = 0; index < this.replacementWays.length; index++) {
418
         if (way == this.replacementWays[index].id) {
418
         if (way == this.replacementWays[index].id) {
419
           this.dialysisSolution.replacement_way_name = this.replacementWays[index].name
419
           this.dialysisSolution.replacement_way_name = this.replacementWays[index].name
420
-          break;
420
+          break
421
         }
421
         }
422
       }
422
       }
423
     }
423
     }

+ 54 - 54
src/pages/main/dialog/new_order/select_advice_template_dialog.vue View File

91
 
91
 
92
 <script>
92
 <script>
93
 export default {
93
 export default {
94
-  name: "SelectAdviceTemplate",
94
+  name: 'SelectAdviceTemplate',
95
   props: {
95
   props: {
96
     visibility: {
96
     visibility: {
97
       type: Boolean,
97
       type: Boolean,
100
     templates: {
100
     templates: {
101
       type: Array,
101
       type: Array,
102
       default: () => {
102
       default: () => {
103
-        return [];
103
+        return []
104
       }
104
       }
105
     }
105
     }
106
   },
106
   },
107
-  data() {
107
+  data () {
108
     return {
108
     return {
109
       fold_template_ids: [],
109
       fold_template_ids: [],
110
       selecting_advice_ids: []
110
       selecting_advice_ids: []
111
-    };
111
+    }
112
   },
112
   },
113
   methods: {
113
   methods: {
114
-    backAction: function() {
115
-      this.$emit("back");
114
+    backAction: function () {
115
+      this.$emit('back')
116
     },
116
     },
117
-    foldTemplateAction: function(template_id) {
117
+    foldTemplateAction: function (template_id) {
118
       for (let index = 0; index < this.fold_template_ids.length; index++) {
118
       for (let index = 0; index < this.fold_template_ids.length; index++) {
119
         if (this.fold_template_ids[index] == template_id) {
119
         if (this.fold_template_ids[index] == template_id) {
120
-          this.fold_template_ids.splice(index, 1);
121
-          return;
120
+          this.fold_template_ids.splice(index, 1)
121
+          return
122
         }
122
         }
123
       }
123
       }
124
-      this.fold_template_ids.push(template_id);
124
+      this.fold_template_ids.push(template_id)
125
     },
125
     },
126
-    selectAdviceAction: function(template, advice) {
127
-      var isCancelSelect = false;
126
+    selectAdviceAction: function (template, advice) {
127
+      var isCancelSelect = false
128
       for (let index = 0; index < this.selecting_advice_ids.length; index++) {
128
       for (let index = 0; index < this.selecting_advice_ids.length; index++) {
129
         if (this.selecting_advice_ids[index].advice_id == advice.id) {
129
         if (this.selecting_advice_ids[index].advice_id == advice.id) {
130
-          this.selecting_advice_ids.splice(index, 1);
131
-          isCancelSelect = true;
132
-          break;
130
+          this.selecting_advice_ids.splice(index, 1)
131
+          isCancelSelect = true
132
+          break
133
         }
133
         }
134
       }
134
       }
135
       if (!isCancelSelect) {
135
       if (!isCancelSelect) {
136
         this.selecting_advice_ids.push({
136
         this.selecting_advice_ids.push({
137
           template_id: template.id,
137
           template_id: template.id,
138
           advice_id: advice.id
138
           advice_id: advice.id
139
-        });
139
+        })
140
       }
140
       }
141
     },
141
     },
142
-    selectTemplateAllAdviceAction: function(template) {
142
+    selectTemplateAllAdviceAction: function (template) {
143
       for (
143
       for (
144
         let index = 0;
144
         let index = 0;
145
         index < template.DoctorAdviceTemplate.length;
145
         index < template.DoctorAdviceTemplate.length;
146
         index++
146
         index++
147
       ) {
147
       ) {
148
-        const advice = template.DoctorAdviceTemplate[index];
148
+        const advice = template.DoctorAdviceTemplate[index]
149
         if (advice.parent_id > 0) {
149
         if (advice.parent_id > 0) {
150
-          continue;
150
+          continue
151
         }
151
         }
152
-        var didSelect = false;
152
+        var didSelect = false
153
         for (
153
         for (
154
           let s_a_index = 0;
154
           let s_a_index = 0;
155
           s_a_index < this.selecting_advice_ids.length;
155
           s_a_index < this.selecting_advice_ids.length;
156
           s_a_index++
156
           s_a_index++
157
         ) {
157
         ) {
158
           if (this.selecting_advice_ids[s_a_index].advice_id == advice.id) {
158
           if (this.selecting_advice_ids[s_a_index].advice_id == advice.id) {
159
-            didSelect = true;
160
-            break;
159
+            didSelect = true
160
+            break
161
           }
161
           }
162
         }
162
         }
163
         if (!didSelect) {
163
         if (!didSelect) {
164
           this.selecting_advice_ids.push({
164
           this.selecting_advice_ids.push({
165
             template_id: template.id,
165
             template_id: template.id,
166
             advice_id: advice.id
166
             advice_id: advice.id
167
-          });
167
+          })
168
         }
168
         }
169
       }
169
       }
170
     },
170
     },
171
-    cancelSelectTemplateAllAdviceAction: function(template) {
171
+    cancelSelectTemplateAllAdviceAction: function (template) {
172
       for (
172
       for (
173
         let index = this.selecting_advice_ids.length - 1;
173
         let index = this.selecting_advice_ids.length - 1;
174
         index >= 0;
174
         index >= 0;
175
         index--
175
         index--
176
       ) {
176
       ) {
177
         if (this.selecting_advice_ids[index].template_id == template.id) {
177
         if (this.selecting_advice_ids[index].template_id == template.id) {
178
-          this.selecting_advice_ids.splice(index, 1);
178
+          this.selecting_advice_ids.splice(index, 1)
179
         }
179
         }
180
       }
180
       }
181
     },
181
     },
182
-    submitAction: function() {
183
-      var advices = [];
182
+    submitAction: function () {
183
+      var advices = []
184
       // WAIN: 效率低,可以通过在 selecting_advice_ids 加上 template_index 和 advice_index 字段来消除 this.templates 的循环
184
       // WAIN: 效率低,可以通过在 selecting_advice_ids 加上 template_index 和 advice_index 字段来消除 this.templates 的循环
185
       for (let t_a_i = 0; t_a_i < this.selecting_advice_ids.length; t_a_i++) {
185
       for (let t_a_i = 0; t_a_i < this.selecting_advice_ids.length; t_a_i++) {
186
-        const tpl_advice = this.selecting_advice_ids[t_a_i];
186
+        const tpl_advice = this.selecting_advice_ids[t_a_i]
187
         for (let t_i = 0; t_i < this.templates.length; t_i++) {
187
         for (let t_i = 0; t_i < this.templates.length; t_i++) {
188
-          const tpl = this.templates[t_i];
188
+          const tpl = this.templates[t_i]
189
           if (tpl.id == tpl_advice.template_id) {
189
           if (tpl.id == tpl_advice.template_id) {
190
-            var child_begin = false;
190
+            var child_begin = false
191
             for (let a_i = 0; a_i < tpl.DoctorAdviceTemplate.length; a_i++) {
191
             for (let a_i = 0; a_i < tpl.DoctorAdviceTemplate.length; a_i++) {
192
-              const adv = tpl.DoctorAdviceTemplate[a_i];
192
+              const adv = tpl.DoctorAdviceTemplate[a_i]
193
               if (adv.id == tpl_advice.advice_id) {
193
               if (adv.id == tpl_advice.advice_id) {
194
-                advices.push(adv);
195
-                child_begin = true;
194
+                advices.push(adv)
195
+                child_begin = true
196
               } else if (child_begin == true) {
196
               } else if (child_begin == true) {
197
                 if (adv.parent_id == tpl_advice.advice_id) {
197
                 if (adv.parent_id == tpl_advice.advice_id) {
198
-                  advices.push(adv);
198
+                  advices.push(adv)
199
                 } else {
199
                 } else {
200
-                  break;
200
+                  break
201
                 }
201
                 }
202
               }
202
               }
203
             }
203
             }
204
           }
204
           }
205
         }
205
         }
206
       }
206
       }
207
-      this.$emit("finish", advices);
207
+      this.$emit('finish', advices)
208
 
208
 
209
       this.$nextTick(() => {
209
       this.$nextTick(() => {
210
-        this.fold_template_ids = [];
211
-        this.selecting_advice_ids = [];
212
-      });
210
+        this.fold_template_ids = []
211
+        this.selecting_advice_ids = []
212
+      })
213
     },
213
     },
214
 
214
 
215
-    isFold: function(template_id) {
215
+    isFold: function (template_id) {
216
       for (let index = 0; index < this.fold_template_ids.length; index++) {
216
       for (let index = 0; index < this.fold_template_ids.length; index++) {
217
         if (this.fold_template_ids[index] == template_id) {
217
         if (this.fold_template_ids[index] == template_id) {
218
-          return true;
218
+          return true
219
         }
219
         }
220
       }
220
       }
221
-      return false;
221
+      return false
222
     },
222
     },
223
-    isAdviceSelecting: function(advice_id) {
223
+    isAdviceSelecting: function (advice_id) {
224
       for (let index = 0; index < this.selecting_advice_ids.length; index++) {
224
       for (let index = 0; index < this.selecting_advice_ids.length; index++) {
225
         if (this.selecting_advice_ids[index].advice_id == advice_id) {
225
         if (this.selecting_advice_ids[index].advice_id == advice_id) {
226
-          return true;
226
+          return true
227
         }
227
         }
228
       }
228
       }
229
-      return false;
229
+      return false
230
     },
230
     },
231
-    isTemplateSelectingAllAdvices: function(template) {
232
-      var count = 0;
231
+    isTemplateSelectingAllAdvices: function (template) {
232
+      var count = 0
233
       for (let t_a_i = 0; t_a_i < this.selecting_advice_ids.length; t_a_i++) {
233
       for (let t_a_i = 0; t_a_i < this.selecting_advice_ids.length; t_a_i++) {
234
         if (this.selecting_advice_ids[t_a_i].template_id == template.id) {
234
         if (this.selecting_advice_ids[t_a_i].template_id == template.id) {
235
-          count++;
235
+          count++
236
         }
236
         }
237
       }
237
       }
238
 
238
 
239
-      var p_advice_count = 0;
239
+      var p_advice_count = 0
240
       for (
240
       for (
241
         let index = 0;
241
         let index = 0;
242
         index < template.DoctorAdviceTemplate.length;
242
         index < template.DoctorAdviceTemplate.length;
243
         index++
243
         index++
244
       ) {
244
       ) {
245
         if (template.DoctorAdviceTemplate[index].parent_id == 0) {
245
         if (template.DoctorAdviceTemplate[index].parent_id == 0) {
246
-          p_advice_count++;
246
+          p_advice_count++
247
         }
247
         }
248
       }
248
       }
249
       if (count < p_advice_count) {
249
       if (count < p_advice_count) {
250
-        return false;
250
+        return false
251
       } else {
251
       } else {
252
-        return true;
252
+        return true
253
       }
253
       }
254
     }
254
     }
255
   }
255
   }
256
-};
256
+}
257
 </script>
257
 </script>
258
 
258
 
259
 <style style="stylesheet/scss" lang="scss" scoped>
259
 <style style="stylesheet/scss" lang="scss" scoped>
260
 .optionsBox {
260
 .optionsBox {
261
   background: #fff;
261
   background: #fff;
262
-  max-height: 10.6rem;
262
+  max-height: 9.6rem;
263
   min-height: 5rem;
263
   min-height: 5rem;
264
   overflow-y: scroll;
264
   overflow-y: scroll;
265
   @media only screen and (max-width: 812px) {
265
   @media only screen and (max-width: 812px) {

+ 24 - 24
src/pages/main/dialog/subMenu/newCheckBoxSubMenu.vue View File

28
 
28
 
29
 <script>
29
 <script>
30
 export default {
30
 export default {
31
-  name: "newCheckBoxSubMenu",
32
-  created() {},
33
-  data() {
31
+  name: 'newCheckBoxSubMenu',
32
+  created () {},
33
+  data () {
34
     return {
34
     return {
35
       result: [],
35
       result: [],
36
       id: 0,
36
       id: 0,
37
-      selectName: ""
38
-    };
37
+      selectName: ''
38
+    }
39
   },
39
   },
40
   props: {
40
   props: {
41
     propsForm: {
41
     propsForm: {
47
     }
47
     }
48
   },
48
   },
49
   methods: {
49
   methods: {
50
-    cancle: function() {
51
-      this.$emit("menu-cancle");
50
+    cancle: function () {
51
+      this.$emit('menu-cancle')
52
     },
52
     },
53
-    comfirm: function() {
54
-      this.$emit("menu-comfirm", this.getValue());
53
+    comfirm: function () {
54
+      this.$emit('menu-comfirm', this.getValue())
55
     },
55
     },
56
-    getValue: function() {
57
-      let form = {};
56
+    getValue: function () {
57
+      let form = {}
58
       if (this.propsForm.isMultiple == 2) {
58
       if (this.propsForm.isMultiple == 2) {
59
-        form["type"] = this.propsForm.type;
60
-        form["result"] = this.propsForm.result;
59
+        form['type'] = this.propsForm.type
60
+        form['result'] = this.propsForm.result
61
         // form["click_ref"] = this.propsForm.click_ref
61
         // form["click_ref"] = this.propsForm.click_ref
62
       } else {
62
       } else {
63
-        form["type"] = this.propsForm.type;
64
-        form["selectId"] = this.propsForm.selectId;
63
+        form['type'] = this.propsForm.type
64
+        form['selectId'] = this.propsForm.selectId
65
         // form["click_ref"] = this.propsForm.click_ref
65
         // form["click_ref"] = this.propsForm.click_ref
66
       }
66
       }
67
-      return form;
67
+      return form
68
     },
68
     },
69
-    itemClick: function(id) {
69
+    itemClick: function (id) {
70
       if (id == -2) {
70
       if (id == -2) {
71
-        this.$emit("menu-empty", this.getValue());
71
+        this.$emit('menu-empty', this.getValue())
72
       }
72
       }
73
-      this.propsForm.selectId = id;
74
-      this.$emit("menu-comfirm", this.getValue());
73
+      this.propsForm.selectId = id
74
+      this.$emit('menu-comfirm', this.getValue())
75
     }
75
     }
76
   },
76
   },
77
   watch: {
77
   watch: {
78
-    visibility(val) {
79
-      //初始化数据操作
78
+    visibility (val) {
79
+      // 初始化数据操作
80
     }
80
     }
81
   }
81
   }
82
-};
82
+}
83
 </script>
83
 </script>
84
 
84
 
85
 <style style="stylesheet/scss" lang="scss" scoped>
85
 <style style="stylesheet/scss" lang="scss" scoped>
86
 .optionsBox {
86
 .optionsBox {
87
   background: #fff;
87
   background: #fff;
88
-  max-height: 10.6rem;
88
+  max-height: 9.6rem;
89
   min-height: 5rem;
89
   min-height: 5rem;
90
   overflow-y: scroll;
90
   overflow-y: scroll;
91
   @media only screen and (max-width: 812px) {
91
   @media only screen and (max-width: 812px) {