See999 пре 5 година
родитељ
комит
736502af40

+ 33 - 12
package-lock.json Прегледај датотеку

@@ -2305,6 +2305,7 @@
2305 2305
       "resolved": "http://registry.npm.taobao.org/boom/download/boom-2.10.1.tgz",
2306 2306
       "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=",
2307 2307
       "dev": true,
2308
+      "optional": true,
2308 2309
       "requires": {
2309 2310
         "hoek": "2.x.x"
2310 2311
       }
@@ -5734,7 +5735,8 @@
5734 5735
         "ansi-regex": {
5735 5736
           "version": "2.1.1",
5736 5737
           "bundled": true,
5737
-          "dev": true
5738
+          "dev": true,
5739
+          "optional": true
5738 5740
         },
5739 5741
         "aproba": {
5740 5742
           "version": "1.2.0",
@@ -5755,12 +5757,14 @@
5755 5757
         "balanced-match": {
5756 5758
           "version": "1.0.0",
5757 5759
           "bundled": true,
5758
-          "dev": true
5760
+          "dev": true,
5761
+          "optional": true
5759 5762
         },
5760 5763
         "brace-expansion": {
5761 5764
           "version": "1.1.11",
5762 5765
           "bundled": true,
5763 5766
           "dev": true,
5767
+          "optional": true,
5764 5768
           "requires": {
5765 5769
             "balanced-match": "^1.0.0",
5766 5770
             "concat-map": "0.0.1"
@@ -5775,17 +5779,20 @@
5775 5779
         "code-point-at": {
5776 5780
           "version": "1.1.0",
5777 5781
           "bundled": true,
5778
-          "dev": true
5782
+          "dev": true,
5783
+          "optional": true
5779 5784
         },
5780 5785
         "concat-map": {
5781 5786
           "version": "0.0.1",
5782 5787
           "bundled": true,
5783
-          "dev": true
5788
+          "dev": true,
5789
+          "optional": true
5784 5790
         },
5785 5791
         "console-control-strings": {
5786 5792
           "version": "1.1.0",
5787 5793
           "bundled": true,
5788
-          "dev": true
5794
+          "dev": true,
5795
+          "optional": true
5789 5796
         },
5790 5797
         "core-util-is": {
5791 5798
           "version": "1.0.2",
@@ -5902,7 +5909,8 @@
5902 5909
         "inherits": {
5903 5910
           "version": "2.0.3",
5904 5911
           "bundled": true,
5905
-          "dev": true
5912
+          "dev": true,
5913
+          "optional": true
5906 5914
         },
5907 5915
         "ini": {
5908 5916
           "version": "1.3.5",
@@ -5914,6 +5922,7 @@
5914 5922
           "version": "1.0.0",
5915 5923
           "bundled": true,
5916 5924
           "dev": true,
5925
+          "optional": true,
5917 5926
           "requires": {
5918 5927
             "number-is-nan": "^1.0.0"
5919 5928
           }
@@ -5928,6 +5937,7 @@
5928 5937
           "version": "3.0.4",
5929 5938
           "bundled": true,
5930 5939
           "dev": true,
5940
+          "optional": true,
5931 5941
           "requires": {
5932 5942
             "brace-expansion": "^1.1.7"
5933 5943
           }
@@ -5935,12 +5945,14 @@
5935 5945
         "minimist": {
5936 5946
           "version": "0.0.8",
5937 5947
           "bundled": true,
5938
-          "dev": true
5948
+          "dev": true,
5949
+          "optional": true
5939 5950
         },
5940 5951
         "minipass": {
5941 5952
           "version": "2.2.4",
5942 5953
           "bundled": true,
5943 5954
           "dev": true,
5955
+          "optional": true,
5944 5956
           "requires": {
5945 5957
             "safe-buffer": "^5.1.1",
5946 5958
             "yallist": "^3.0.0"
@@ -5959,6 +5971,7 @@
5959 5971
           "version": "0.5.1",
5960 5972
           "bundled": true,
5961 5973
           "dev": true,
5974
+          "optional": true,
5962 5975
           "requires": {
5963 5976
             "minimist": "0.0.8"
5964 5977
           }
@@ -6039,7 +6052,8 @@
6039 6052
         "number-is-nan": {
6040 6053
           "version": "1.0.1",
6041 6054
           "bundled": true,
6042
-          "dev": true
6055
+          "dev": true,
6056
+          "optional": true
6043 6057
         },
6044 6058
         "object-assign": {
6045 6059
           "version": "4.1.1",
@@ -6051,6 +6065,7 @@
6051 6065
           "version": "1.4.0",
6052 6066
           "bundled": true,
6053 6067
           "dev": true,
6068
+          "optional": true,
6054 6069
           "requires": {
6055 6070
             "wrappy": "1"
6056 6071
           }
@@ -6136,7 +6151,8 @@
6136 6151
         "safe-buffer": {
6137 6152
           "version": "5.1.1",
6138 6153
           "bundled": true,
6139
-          "dev": true
6154
+          "dev": true,
6155
+          "optional": true
6140 6156
         },
6141 6157
         "safer-buffer": {
6142 6158
           "version": "2.1.2",
@@ -6172,6 +6188,7 @@
6172 6188
           "version": "1.0.2",
6173 6189
           "bundled": true,
6174 6190
           "dev": true,
6191
+          "optional": true,
6175 6192
           "requires": {
6176 6193
             "code-point-at": "^1.0.0",
6177 6194
             "is-fullwidth-code-point": "^1.0.0",
@@ -6191,6 +6208,7 @@
6191 6208
           "version": "3.0.1",
6192 6209
           "bundled": true,
6193 6210
           "dev": true,
6211
+          "optional": true,
6194 6212
           "requires": {
6195 6213
             "ansi-regex": "^2.0.0"
6196 6214
           }
@@ -6234,12 +6252,14 @@
6234 6252
         "wrappy": {
6235 6253
           "version": "1.0.2",
6236 6254
           "bundled": true,
6237
-          "dev": true
6255
+          "dev": true,
6256
+          "optional": true
6238 6257
         },
6239 6258
         "yallist": {
6240 6259
           "version": "3.0.2",
6241 6260
           "bundled": true,
6242
-          "dev": true
6261
+          "dev": true,
6262
+          "optional": true
6243 6263
         }
6244 6264
       }
6245 6265
     },
@@ -6697,7 +6717,8 @@
6697 6717
       "version": "2.16.3",
6698 6718
       "resolved": "http://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz",
6699 6719
       "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=",
6700
-      "dev": true
6720
+      "dev": true,
6721
+      "optional": true
6701 6722
     },
6702 6723
     "home-or-tmp": {
6703 6724
       "version": "2.0.0",

+ 27 - 25
src/main.js Прегледај датотеку

@@ -1,25 +1,27 @@
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'
11
-
12
-import '@/styles/reset.scss'
13
-import '@/styles/variables.scss'
14
-import '@/styles/style.scss'
15
-
16
-import Vant from 'vant'
17
-import 'vant/lib/index.css'
18
-import 'vant/lib/icon/local.css'
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
+
12
+import "@/styles/reset.scss";
13
+import "@/styles/variables.scss";
14
+import "@/styles/style.scss";
15
+
16
+import Vant from "vant";
17
+import "vant/lib/index.css";
18
+import "vant/lib/icon/local.css";
19 19
 // import '@/styles/vant-css/index.css'
20 20
 
21
-import ElementUI from 'element-ui'
22
-import 'element-ui/lib/theme-chalk/index.css'
21
+import ElementUI from "element-ui";
22
+import "element-ui/lib/theme-chalk/index.css";
23
+
24
+import "@/styles/media.scss";
23 25
 
24 26
 // main.js
25 27
 // import 'lib-flexible'
@@ -29,16 +31,16 @@ import 'element-ui/lib/theme-chalk/index.css'
29 31
 // Vue.use(AlertPlugin)
30 32
 // Vue.use(ToastPlugin)
31 33
 
32
-Vue.use(MintUI)
33
-Vue.use(Vant)
34
-Vue.use(ElementUI)
35
-Vue.config.productionTip = false
34
+Vue.use(MintUI);
35
+Vue.use(Vant);
36
+Vue.use(ElementUI);
37
+Vue.config.productionTip = false;
36 38
 
37 39
 /* eslint-disable no-new */
38 40
 new Vue({
39
-  el: '#app',
41
+  el: "#app",
40 42
   router,
41 43
   store,
42 44
   components: { App },
43
-  template: '<App/>'
44
-})
45
+  template: "<App/>"
46
+});

+ 428 - 353
src/pages/advice/DialysisAdviceTable.vue Прегледај датотеку

@@ -2,37 +2,71 @@
2 2
   <div class="mainBox">
3 3
     <div class="choice">
4 4
       <ul>
5
-
6
-        <el-popover placement="bottom" trigger="click" v-model="show_patient_type_selector">
7
-          <li slot="reference">{{patient_types[patient_selected].text}}<span class="iconfont">&#xe74a;</span></li>
5
+        <el-popover
6
+          placement="bottom"
7
+          trigger="click"
8
+          v-model="show_patient_type_selector"
9
+        >
10
+          <li slot="reference">
11
+            {{ patient_types[patient_selected].text
12
+            }}<span class="iconfont">&#xe74a;</span>
13
+          </li>
8 14
           <div class="popover-demo-content">
9 15
             <ul>
10
-              <li v-for="type in patient_types" :key="type.value" @click="handlePaitentType(type.value)"
11
-                  :class="advice_type_selected == type.value ? 'tick' : ''">{{type.text}}
16
+              <li
17
+                v-for="type in patient_types"
18
+                :key="type.value"
19
+                @click="handlePaitentType(type.value)"
20
+                :class="advice_type_selected == type.value ? 'tick' : ''"
21
+              >
22
+                {{ type.text }}
12 23
               </li>
13 24
             </ul>
14 25
           </div>
15 26
         </el-popover>
16 27
 
17
-
18
-        <el-popover placement="bottom" trigger="click" v-model="show_zone_selector">
19
-          <li slot="reference">{{zones[zone_selected].text}}<span class="iconfont">&#xe74a;</span></li>
28
+        <el-popover
29
+          placement="bottom"
30
+          trigger="click"
31
+          v-model="show_zone_selector"
32
+        >
33
+          <li slot="reference">
34
+            {{ zones[zone_selected].text
35
+            }}<span class="iconfont">&#xe74a;</span>
36
+          </li>
20 37
           <div class="popover-demo-content">
21 38
             <ul>
22
-              <li v-for="(zone, index) in zones" :key="zone.value" @click="handleZoneChange(index)"
23
-                  :class="zone_selected == index ? 'tick' : ''">{{zone.text}}
39
+              <li
40
+                v-for="(zone, index) in zones"
41
+                :key="zone.value"
42
+                @click="handleZoneChange(index)"
43
+                :class="zone_selected == index ? 'tick' : ''"
44
+              >
45
+                {{ zone.text }}
24 46
               </li>
25 47
             </ul>
26 48
           </div>
27 49
         </el-popover>
28
-        <el-popover placement="bottom" trigger="click" v-model="show_sch_type_selector">
29
-          <li slot="reference">{{schedule_types[schedule_type_selected].text}}<span class="iconfont">&#xe74a;</span>
50
+        <el-popover
51
+          placement="bottom"
52
+          trigger="click"
53
+          v-model="show_sch_type_selector"
54
+        >
55
+          <li slot="reference">
56
+            {{ schedule_types[schedule_type_selected].text
57
+            }}<span class="iconfont">&#xe74a;</span>
30 58
           </li>
31 59
           <div class="popover-demo-content">
32 60
             <ul>
33
-              <li v-for="scheduleType in schedule_types" :key="scheduleType.value"
34
-                  @click="handletimeType(scheduleType.value)"
35
-                  :class="schedule_type_selected == scheduleType.value ? 'tick' : ''">{{scheduleType.text}}
61
+              <li
62
+                v-for="scheduleType in schedule_types"
63
+                :key="scheduleType.value"
64
+                @click="handletimeType(scheduleType.value)"
65
+                :class="
66
+                  schedule_type_selected == scheduleType.value ? 'tick' : ''
67
+                "
68
+              >
69
+                {{ scheduleType.text }}
36 70
               </li>
37 71
             </ul>
38 72
           </div>
@@ -53,7 +87,10 @@
53 87
       </ul>
54 88
     </div>
55 89
 
56
-    <div style="width:100%;overflow:hildden;overflow-x:auto;" class="DialysisAdvice">
90
+    <div
91
+      style="width:100%;overflow:hildden;overflow-x:auto;"
92
+      class="DialysisAdvice"
93
+    >
57 94
       <div class="blueBorder"></div>
58 95
       <table class="table">
59 96
         <tr>
@@ -69,8 +106,6 @@
69 106
           <th width="100px">校对时间</th>
70 107
           <th width="50px">开嘱医生</th>
71 108
           <th width="100px">开嘱时间</th>
72
-
73
-
74 109
         </tr>
75 110
         <template v-for="(schedules, zone_name, index) in filtedScheduals">
76 111
           <tr :key="index">
@@ -87,57 +122,88 @@
87 122
             <td></td>
88 123
             <td></td>
89 124
           </tr>
90
-          <template v-for="(schedule) in schedules">
125
+          <template v-for="schedule in schedules">
91 126
             <template v-for="(group, group_index) in schedule.new_advice">
92
-              <tr v-for="(advice, advice_index) in group.advices" @click="clickfunction(schedule)">
127
+              <tr
128
+                v-for="(advice, advice_index) in group.advices"
129
+                @click="clickfunction(schedule)"
130
+              >
93 131
                 <!--<td  v-if="advice_index == 0"-->
94 132
                 <!--:rowspan="group.advices.length">{{ advice.parent_id == 0 ? schedule.device_number.number : "" }}</td>-->
95 133
 
96 134
                 <!--<td  v-if="advice_index == 0" :rowspan="group.advices.length">{{ advice.parent_id == 0 && advice.dialysis_order&&advice.dialysis_order.device_number&& advice.dialysis_order.device_number.number.length > 0 ? advice.dialysis_order.device_number.number : schedule.device_number.number }}</td>-->
97 135
                 <!--<td v-if="advice_index == 0" :rowspan="group.advices.length">-->
98
-                  <!--{{getNumber(advice,schedule)}}-->
136
+                <!--{{getNumber(advice,schedule)}}-->
99 137
                 <!--</td>-->
100 138
 
101
-                <td v-if="advice_index == 0"
102
-                    :rowspan="group.advices.length" style="color:#409eff;">{{ advice.parent_id == 0 ?
103
-                  schedule.patient.name : '' }}
139
+                <td
140
+                  v-if="advice_index == 0"
141
+                  :rowspan="group.advices.length"
142
+                  style="color:#409eff;"
143
+                >
144
+                  {{ advice.parent_id == 0 ? schedule.patient.name : "" }}
104 145
                 </td>
105
-                <td v-if="advice_index == 0"
106
-                    :rowspan="group.advices.length">{{ advice.parent_id == 0 ? schedule.patient.dialysis_no : '' }}
146
+                <td v-if="advice_index == 0" :rowspan="group.advices.length">
147
+                  {{
148
+                    advice.parent_id == 0 ? schedule.patient.dialysis_no : ""
149
+                  }}
107 150
                 </td>
108
-                <td v-if="advice_index == 0"
109
-                    :rowspan="group.advices.length">{{ getAdaviceType(advice.advice_type,advice.parent_id)}}
151
+                <td v-if="advice_index == 0" :rowspan="group.advices.length">
152
+                  {{ getAdaviceType(advice.advice_type, advice.parent_id) }}
110 153
                 </td>
111
-                <td v-if="advice_index == 0" :rowspan="group.advices.length">{{ advice.parent_id == 0 ? parseTime(advice.start_time, "{m}-{d} {h}:{i}"):''}}
154
+                <td v-if="advice_index == 0" :rowspan="group.advices.length">
155
+                  {{
156
+                    advice.parent_id == 0
157
+                      ? parseTime(advice.start_time, "{m}-{d} {h}:{i}")
158
+                      : ""
159
+                  }}
112 160
                 </td>
113
-                <td :class="advice.parent_id == 0 ? 'advice_content' : 'subadvice_content'">
114
-                  <span>{{advice.advice_name }}</span>
115
-                  <span>{{advice.advice_desc}}{{advice.drug_spec_unit}}</span>
161
+                <td
162
+                  :class="
163
+                    advice.parent_id == 0
164
+                      ? 'advice_content'
165
+                      : 'subadvice_content'
166
+                  "
167
+                >
168
+                  <span>{{ advice.advice_name }}</span>
116 169
                   <span
117
-                    v-if="advice.prescribing_number">{{advice.prescribing_number}}{{advice.prescribing_number_unit}}</span>
118
-                  <span v-if="advice.single_dose"> 单次用量 {{advice.single_dose}}{{advice.single_dose_unit}}</span>
119
-                  <span>{{advice.delivery_way}}</span>
120
-                  <span>{{advice.execution_frequency}}</span>
121
-                  <span v-if="advice.parent_id == 0 && advice.remark.length > 0">({{advice.remark}})</span>
122
-
170
+                    >{{ advice.advice_desc }}{{ advice.drug_spec_unit }}</span
171
+                  >
172
+                  <span v-if="advice.prescribing_number"
173
+                    >{{ advice.prescribing_number
174
+                    }}{{ advice.prescribing_number_unit }}</span
175
+                  >
176
+                  <span v-if="advice.single_dose">
177
+                    单次用量 {{ advice.single_dose
178
+                    }}{{ advice.single_dose_unit }}</span
179
+                  >
180
+                  <span>{{ advice.delivery_way }}</span>
181
+                  <span>{{ advice.execution_frequency }}</span>
182
+                  <span v-if="advice.parent_id == 0 && advice.remark.length > 0"
183
+                    >({{ advice.remark }})</span
184
+                  >
185
+                </td>
186
+                <td>
187
+                  {{ parseTime(advice.execution_time, "{m}-{d} {h}:{i}") }}
123 188
                 </td>
124
-                <td>{{ parseTime(advice.execution_time, '{m}-{d} {h}:{i}') }}</td>
125 189
                 <td>{{ getName(advice.execution_staff) }}</td>
126 190
                 <td>{{ getName(advice.checker) }}</td>
127
-                <td>{{ parseTime(advice.check_time, '{m}-{d} {h}:{i}') }}</td>
191
+                <td>{{ parseTime(advice.check_time, "{m}-{d} {h}:{i}") }}</td>
128 192
                 <td>{{ getName(advice.advice_doctor) }}</td>
129
-                <td>{{ parseTime(advice.created_time, '{m}-{d} {h}:{i}')}}</td>
130
-
131
-
193
+                <td>{{ parseTime(advice.created_time, "{m}-{d} {h}:{i}") }}</td>
132 194
               </tr>
133 195
             </template>
134
-
135 196
           </template>
136 197
         </template>
137 198
       </table>
138
-      <div class="NoData" v-show="zones.length  <= 1"><img style="margin-top: 50px; margin-bottom: 50px"
139
-                                                           src="@/assets/login/data.jpg" alt=""></div>
140 199
 
200
+      <div class="NoData" v-show="zones.length <= 1">
201
+        <img
202
+          style="margin-top: 50px; margin-bottom: 50px"
203
+          src="@/assets/login/data.jpg"
204
+          alt=""
205
+        />
206
+      </div>
141 207
     </div>
142 208
 
143 209
     <mt-datetime-picker
@@ -147,306 +213,310 @@
147 213
       year-format="{value} "
148 214
       month-format="{value} "
149 215
       date-format="{value} "
150
-      @confirm="requestSchedualDoctors">
216
+      @confirm="requestSchedualDoctors"
217
+    >
151 218
     </mt-datetime-picker>
152 219
   </div>
153 220
 </template>
154 221
 
155 222
 <script>
156
-  import SideBar from '@/pages/layout/SideBar'
157
-  import {parseTime} from '@/utils'
158
-  import {getSchedualDoctors} from '@/api/advice'
159
-
160
-  export default {
161
-    name: 'DialysisAdviceTable',
162
-    components: {
163
-      SideBar
223
+import SideBar from "@/pages/layout/SideBar";
224
+import { parseTime } from "@/utils";
225
+import { getSchedualDoctors } from "@/api/advice";
226
+
227
+export default {
228
+  name: "DialysisAdviceTable",
229
+  components: {
230
+    SideBar
231
+  },
232
+  data() {
233
+    return {
234
+      selected_date: new Date(),
235
+      admin_user: [],
236
+
237
+      show_sch_type_selector: false,
238
+      schedule_type_selected: 0,
239
+      schedule_types: [
240
+        { value: 0, text: "全部班次" },
241
+        { value: 1, text: "上午" },
242
+        { value: 2, text: "下午" },
243
+        { value: 3, text: "晚上" }
244
+      ],
245
+
246
+      show_zone_selector: false,
247
+      zone_selected: 0,
248
+      show_patient_type_selector: false,
249
+      zones: [{ value: 0, text: "全部分区", select: true }],
250
+
251
+      show_advice_type_selector: false,
252
+      advice_type_selected: 0,
253
+      advice_types: [
254
+        { value: 0, text: "全部医嘱" },
255
+        { value: 1, text: "长期医嘱" },
256
+        { value: 3, text: "临时医嘱" }
257
+      ],
258
+
259
+      patient_types: [
260
+        { value: 0, text: "全部病人" },
261
+        { value: 1, text: "我的病人" },
262
+        { value: 2, text: "未执行病人" }
263
+      ],
264
+      patient_selected: 0,
265
+
266
+      scheduleMap: {}
267
+    };
268
+  },
269
+  computed: {
270
+    selected_date_str: function() {
271
+      return parseTime(this.selected_date, "{y}-{m}-{d}");
164 272
     },
165
-    data () {
166
-      return {
167
-        selected_date: new Date(),
168
-        admin_user: [],
169
-
170
-        show_sch_type_selector: false,
171
-        schedule_type_selected: 0,
172
-        schedule_types: [
173
-          {value: 0, text: '全部班次'},
174
-          {value: 1, text: '上午'},
175
-          {value: 2, text: '下午'},
176
-          {value: 3, text: '晚上'}
177
-        ],
178
-
179
-        show_zone_selector: false,
180
-        zone_selected: 0,
181
-        show_patient_type_selector: false,
182
-        zones: [{value: 0, text: '全部分区', select: true}],
183
-
184
-        show_advice_type_selector: false,
185
-        advice_type_selected: 0,
186
-        advice_types: [
187
-          {value: 0, text: '全部医嘱'},
188
-          {value: 1, text: '长期医嘱'},
189
-          {value: 3, text: '临时医嘱'}
190
-        ],
191
-
192
-        patient_types: [
193
-          {value: 0, text: '全部病人'},
194
-          {value: 1, text: '我的病人'},
195
-          {value: 2, text: '未执行病人'}
196
-        ],
197
-        patient_selected: 0,
198
-
199
-        scheduleMap: {}
200
-      }
201
-    },
202
-    computed: {
203
-      selected_date_str: function () {
204
-        return parseTime(this.selected_date, '{y}-{m}-{d}')
205
-      },
206
-      filtedScheduals: function () {
207
-        var scheduleMap = new Object()
208
-        if (this.zone_selected == 0) {
209
-          for (const key in this.scheduleMap) {
210
-            scheduleMap[key] = this.scheduleMap[key]
211
-          }
212
-        } else {
213
-          var zone_name = this.zones[this.zone_selected].text
214
-          scheduleMap[zone_name] = this.scheduleMap[zone_name]
273
+    filtedScheduals: function() {
274
+      var scheduleMap = new Object();
275
+      if (this.zone_selected == 0) {
276
+        for (const key in this.scheduleMap) {
277
+          scheduleMap[key] = this.scheduleMap[key];
215 278
         }
279
+      } else {
280
+        var zone_name = this.zones[this.zone_selected].text;
281
+        scheduleMap[zone_name] = this.scheduleMap[zone_name];
282
+      }
216 283
 
217
-        if (this.schedule_type_selected != 0) {
218
-          var _scheduleMap = {}
219
-          for (const key in scheduleMap) {
220
-            var origin_schedules = scheduleMap[key]
221
-            var schedules = []
222
-            for (let index = 0; index < origin_schedules.length; index++) {
223
-              const schedule = origin_schedules[index]
224
-              if (schedule.schedule_type == this.schedule_type_selected) {
225
-                schedules.push(schedule)
226
-              }
227
-            }
228
-            if (schedules.length > 0) {
229
-              _scheduleMap[key] = schedules
284
+      if (this.schedule_type_selected != 0) {
285
+        var _scheduleMap = {};
286
+        for (const key in scheduleMap) {
287
+          var origin_schedules = scheduleMap[key];
288
+          var schedules = [];
289
+          for (let index = 0; index < origin_schedules.length; index++) {
290
+            const schedule = origin_schedules[index];
291
+            if (schedule.schedule_type == this.schedule_type_selected) {
292
+              schedules.push(schedule);
230 293
             }
231 294
           }
232
-
233
-          scheduleMap = _scheduleMap
234
-        }
235
-        for (var key in scheduleMap) {
236
-          let mapArr = scheduleMap[key]
237
-          for (let i = 0; i < mapArr.length; i++) {
238
-            mapArr[i]['new_advice'] = []
295
+          if (schedules.length > 0) {
296
+            _scheduleMap[key] = schedules;
239 297
           }
240 298
         }
241 299
 
242
-        for (var key in scheduleMap) {
243
-          let mapArr = scheduleMap[key]
244
-          for (let i = 0; i < mapArr.length; i++) {
245
-            var maps = mapArr[i]
246
-            var resp_advices = maps.doctor_advice
247
-            if (resp_advices.length > 0) {
248
-              var newGroupObject = function () {
249
-                return Object.assign({}, {
250
-                  group_no: 0,
251
-                  advices: [],
252
-                })
253
-              }
254
-              var initGroupBlock = function (group, advice) {
255
-                group.group_no = advice.groupno
256
-              }
300
+        scheduleMap = _scheduleMap;
301
+      }
302
+      for (var key in scheduleMap) {
303
+        let mapArr = scheduleMap[key];
304
+        for (let i = 0; i < mapArr.length; i++) {
305
+          mapArr[i]["new_advice"] = [];
306
+        }
307
+      }
257 308
 
258
-              var advice_groups = []
259
-              var group = newGroupObject()
260
-              for (let index = 0; index < resp_advices.length; index++) {
261
-                const advice = resp_advices[index]
262
-                if (advice.groupno == 0) { // 老版本的医嘱
263
-                  if (advice.parent_id > 0) {
264
-                    if (advice_groups.length > 0) {
265
-                      var parent_group = advice_groups[advice_groups.length - 1]
266
-                      if (parent_group.advices.length > 0) {
267
-                        if (parent_group.advices[0].id == advice.parent_id) {
268
-                          parent_group.advices.push(advice)
269
-                        }
309
+      for (var key in scheduleMap) {
310
+        let mapArr = scheduleMap[key];
311
+        for (let i = 0; i < mapArr.length; i++) {
312
+          var maps = mapArr[i];
313
+          var resp_advices = maps.doctor_advice;
314
+          if (resp_advices.length > 0) {
315
+            var newGroupObject = function() {
316
+              return Object.assign(
317
+                {},
318
+                {
319
+                  group_no: 0,
320
+                  advices: []
321
+                }
322
+              );
323
+            };
324
+            var initGroupBlock = function(group, advice) {
325
+              group.group_no = advice.groupno;
326
+            };
327
+
328
+            var advice_groups = [];
329
+            var group = newGroupObject();
330
+            for (let index = 0; index < resp_advices.length; index++) {
331
+              const advice = resp_advices[index];
332
+              if (advice.groupno == 0) {
333
+                // 老版本的医嘱
334
+                if (advice.parent_id > 0) {
335
+                  if (advice_groups.length > 0) {
336
+                    var parent_group = advice_groups[advice_groups.length - 1];
337
+                    if (parent_group.advices.length > 0) {
338
+                      if (parent_group.advices[0].id == advice.parent_id) {
339
+                        parent_group.advices.push(advice);
270 340
                       }
271 341
                     }
272
-                    continue
273
-
274
-                  } else {
275
-                    if (group.group_no > 0) {
276
-                      advice_groups.push(group)
277
-                      group = newGroupObject()
278
-                    }
279
-
280
-                    initGroupBlock(group, advice)
281
-                    group.advices.push(advice)
282
-                    advice_groups.push(group)
283
-                    group = newGroupObject()
284
-                    continue
285 342
                   }
286
-
343
+                  continue;
287 344
                 } else {
288
-                  if (group.group_no > 0 && group.group_no != advice.groupno) {
289
-                    advice_groups.push(group)
290
-                    group = newGroupObject()
291
-                  }
292
-                  if (group.group_no == 0) {
293
-                    initGroupBlock(group, advice)
294
-                  }
295
-                  if (group.group_no == advice.groupno) {
296
-                    group.advices.push(advice)
345
+                  if (group.group_no > 0) {
346
+                    advice_groups.push(group);
347
+                    group = newGroupObject();
297 348
                   }
349
+
350
+                  initGroupBlock(group, advice);
351
+                  group.advices.push(advice);
352
+                  advice_groups.push(group);
353
+                  group = newGroupObject();
354
+                  continue;
355
+                }
356
+              } else {
357
+                if (group.group_no > 0 && group.group_no != advice.groupno) {
358
+                  advice_groups.push(group);
359
+                  group = newGroupObject();
360
+                }
361
+                if (group.group_no == 0) {
362
+                  initGroupBlock(group, advice);
363
+                }
364
+                if (group.group_no == advice.groupno) {
365
+                  group.advices.push(advice);
298 366
                 }
299 367
               }
300
-              if (group.group_no > 0) { // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
301
-                advice_groups.push(group)
302
-              }
303
-              advice_groups = advice_groups
304
-            } else {
305
-              advice_groups = []
306 368
             }
307
-            maps.new_advice = advice_groups
369
+            if (group.group_no > 0) {
370
+              // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
371
+              advice_groups.push(group);
372
+            }
373
+            advice_groups = advice_groups;
374
+          } else {
375
+            advice_groups = [];
308 376
           }
377
+          maps.new_advice = advice_groups;
309 378
         }
379
+      }
310 380
 
311
-        console.log(scheduleMap)
381
+      console.log(scheduleMap);
312 382
 
313
-        return scheduleMap
314
-      }
383
+      return scheduleMap;
384
+    }
385
+  },
386
+  created() {
387
+    this.requestSchedualDoctors();
388
+  },
389
+  methods: {
390
+    // getNumber: function (advice,schedule) {
391
+    //   console.log(advice)
392
+    //   if (advice.parent_id == 0 ) {
393
+    //     if(advice.dialysis_order && advice.dialysis_order.device_number && advice.dialysis_order.device_number.number.length > 0){
394
+    //       return advice.dialysis_order.device_number.number
395
+    //     }else{
396
+    //       return schedule.device_number.number
397
+    //     }
398
+    //   }
399
+    //
400
+    // },
401
+    clickfunction: function(val) {
402
+      // console.log(val);
403
+      this.$router.push({
404
+        path: "/details",
405
+        query: {
406
+          patient_id: val.patient.id,
407
+          date: this.selected_date.getTime() / 1000,
408
+          patient_name: val.patient.name
409
+        }
410
+      });
315 411
     },
316
-    created () {
317
-      this.requestSchedualDoctors()
412
+    handlePaitentType: function(index) {
413
+      this.patient_selected = index;
414
+      this.show_patient_type_selector = false;
415
+      this.requestSchedualDoctors();
318 416
     },
319
-    methods: {
320
-      // getNumber: function (advice,schedule) {
321
-      //   console.log(advice)
322
-      //   if (advice.parent_id == 0 ) {
323
-      //     if(advice.dialysis_order && advice.dialysis_order.device_number && advice.dialysis_order.device_number.number.length > 0){
324
-      //       return advice.dialysis_order.device_number.number
325
-      //     }else{
326
-      //       return schedule.device_number.number
327
-      //     }
328
-      //   }
329
-      //
330
-      // },
331
-      clickfunction: function (val) {
332
-        // console.log(val);
333
-        this.$router.push({
334
-          path: '/details',
335
-          query: {
336
-            patient_id: val.patient.id,
337
-            date: this.selected_date.getTime() / 1000,
338
-            patient_name: val.patient.name
339
-          }
340
-        })
341
-      },
342
-      handlePaitentType: function (index) {
343
-        this.patient_selected = index
344
-        this.show_patient_type_selector = false
345
-        this.requestSchedualDoctors()
346
-      },
347
-      openPicker () {
348
-        this.$refs.picker.open()
349
-      },
350
-      getAdaviceType (type, parent_id) {
351
-        if (parent_id == 0) {
352
-          if (type == 1) {
353
-            return '长嘱'
354
-          } else if (type == 2) {
355
-            return '临嘱'
356
-          } else if (type == 3) {
357
-            return '临嘱'
358
-          }
417
+    openPicker() {
418
+      this.$refs.picker.open();
419
+    },
420
+    getAdaviceType(type, parent_id) {
421
+      if (parent_id == 0) {
422
+        if (type == 1) {
423
+          return "长嘱";
424
+        } else if (type == 2) {
425
+          return "临嘱";
426
+        } else if (type == 3) {
427
+          return "临嘱";
359 428
         }
360
-      },
361
-      getName (val) {
362
-        console.log(this.admin_user)
429
+      }
430
+    },
431
+    getName(val) {
432
+      console.log(this.admin_user);
363 433
 
364
-        for (let i = 0; i < this.admin_user.length; i++) {
365
-          if (this.admin_user[i].id == val) {
366
-            return this.admin_user[i].name
367
-          }
434
+      for (let i = 0; i < this.admin_user.length; i++) {
435
+        if (this.admin_user[i].id == val) {
436
+          return this.admin_user[i].name;
368 437
         }
369
-      },
370
-      handletimeType: function (index) {
371
-        this.schedule_type_selected = index
372
-        this.show_sch_type_selector = false
373
-      },
374
-      handleAdviceType: function (index) {
375
-        this.advice_type_selected = index
376
-        this.show_advice_type_selector = false
377
-        this.requestSchedualDoctors()
378
-      },
379
-      handleZoneChange: function (index) {
380
-        this.zone_selected = index
381
-        this.show_zone_selector = false
382
-      },
383
-      parseTime: function (time, layout) {
384
-        // console.log(time);
385
-        if (time == 0) {
386
-          return ''
387
-        }
388
-        return parseTime(time, layout)
389
-      },
390
-      requestSchedualDoctors () {
391
-        getSchedualDoctors({
392
-          date: this.selected_date_str,
393
-          patient_type: this.patient_selected,
394
-          advice_type: 2
395
-        }).then(rs => {
396
-          var resp = rs.data
397
-          if (resp.state == 1) {
398
-            this.admin_user = resp.data.adminUser
399
-            var schedules = resp.data.scheduals
400
-            var zoneMap = {}
401
-            var scheduleMap = {}
402
-            for (let index = 0; index < schedules.length; index++) {
403
-              const schedule = schedules[index]
404
-              if (schedule.doctor_advice.length == 0) {
405
-                continue
406
-              }
407
-              if (scheduleMap[schedule.device_number.zone.name] == null) {
408
-                scheduleMap[schedule.device_number.zone.name] = []
409
-              }
410
-              scheduleMap[schedule.device_number.zone.name].push(schedule)
411
-              if (zoneMap[schedule.device_number.zone.name] == null) {
412
-                zoneMap[schedule.device_number.zone.name] = schedule.device_number.zone
413
-              }
438
+      }
439
+    },
440
+    handletimeType: function(index) {
441
+      this.schedule_type_selected = index;
442
+      this.show_sch_type_selector = false;
443
+    },
444
+    handleAdviceType: function(index) {
445
+      this.advice_type_selected = index;
446
+      this.show_advice_type_selector = false;
447
+      this.requestSchedualDoctors();
448
+    },
449
+    handleZoneChange: function(index) {
450
+      this.zone_selected = index;
451
+      this.show_zone_selector = false;
452
+    },
453
+    parseTime: function(time, layout) {
454
+      // console.log(time);
455
+      if (time == 0) {
456
+        return "";
457
+      }
458
+      return parseTime(time, layout);
459
+    },
460
+    requestSchedualDoctors() {
461
+      getSchedualDoctors({
462
+        date: this.selected_date_str,
463
+        patient_type: this.patient_selected,
464
+        advice_type: 2
465
+      }).then(rs => {
466
+        var resp = rs.data;
467
+        if (resp.state == 1) {
468
+          this.admin_user = resp.data.adminUser;
469
+          var schedules = resp.data.scheduals;
470
+          var zoneMap = {};
471
+          var scheduleMap = {};
472
+          for (let index = 0; index < schedules.length; index++) {
473
+            const schedule = schedules[index];
474
+            if (schedule.doctor_advice.length == 0) {
475
+              continue;
414 476
             }
415
-
416
-            var zones = []
417
-            zones.push({value: 0, text: '全部分区'})
418
-            for (var zoneName in zoneMap) {
419
-              zones.push({value: zoneMap[zoneName].id, text: zoneName})
477
+            if (scheduleMap[schedule.device_number.zone.name] == null) {
478
+              scheduleMap[schedule.device_number.zone.name] = [];
420 479
             }
480
+            scheduleMap[schedule.device_number.zone.name].push(schedule);
481
+            if (zoneMap[schedule.device_number.zone.name] == null) {
482
+              zoneMap[schedule.device_number.zone.name] =
483
+                schedule.device_number.zone;
484
+            }
485
+          }
421 486
 
422
-            zones = zones.sort(function (a, b) {
423
-              return a.value > b.value
424
-            })
425
-            this.zones = zones
426
-
427
-            this.scheduleMap = scheduleMap
428
-          } else {
429
-            this.$toast({
430
-              message: resp.msg
431
-            })
487
+          var zones = [];
488
+          zones.push({ value: 0, text: "全部分区" });
489
+          for (var zoneName in zoneMap) {
490
+            zones.push({ value: zoneMap[zoneName].id, text: zoneName });
432 491
           }
433
-        })
434
-      },
435
-      adviceDesc (advice) {
436
-      }
437
-    }
492
+
493
+          zones = zones.sort(function(a, b) {
494
+            return a.value > b.value;
495
+          });
496
+          this.zones = zones;
497
+
498
+          this.scheduleMap = scheduleMap;
499
+        } else {
500
+          this.$toast({
501
+            message: resp.msg
502
+          });
503
+        }
504
+      });
505
+    },
506
+    adviceDesc(advice) {}
438 507
   }
508
+};
439 509
 </script>
440 510
 
441 511
 <style style="stylesheet/scss" lang="scss" scoped>
442
-  .top {
512
+.top {
443 513
   .hospital {
444
-  width: 2rem;
514
+    width: 2rem;
445 515
   }
446 516
   .TopTitle {
447
-  font-size: 0.36rem;
448
-  color: $title-color;
449
-  font-weight: normal;
517
+    font-size: 0.36rem;
518
+    color: $title-color;
519
+    font-weight: normal;
450 520
   }
451 521
   padding: 0.3rem 0.3rem;
452 522
   @include display-flex;
@@ -455,16 +525,16 @@
455 525
   @include justify-content-between;
456 526
   border-bottom: 1px #e5e5e5 solid;
457 527
   .title {
458
-  font-size: 0.3rem;
459
-  font-weight: bold;
460
-  color: $pgh-color;
528
+    font-size: 0.3rem;
529
+    font-weight: bold;
530
+    color: $pgh-color;
461 531
   }
462 532
   .iconfont {
463
-  font-size: 0.4rem;
464
-  color: #a8b3ba;
533
+    font-size: 0.4rem;
534
+    color: #a8b3ba;
465 535
   }
466
-  }
467
-  .search {
536
+}
537
+.search {
468 538
   background: #ebf1f7;
469 539
   border-radius: 30px;
470 540
   padding: 0 0.3rem;
@@ -473,17 +543,17 @@
473 543
   color: #a8b3ba;
474 544
 
475 545
   .iconfont {
476
-  color: #a8b3ba;
477
-  font-size: 0.28rem;
546
+    color: #a8b3ba;
547
+    font-size: 0.28rem;
478 548
   }
479 549
   .searchInput {
480
-  font-size: 0.28rem;
481
-  border: none;
482
-  outline: none;
483
-  background: #ebf1f7;
484
-  }
550
+    font-size: 0.28rem;
551
+    border: none;
552
+    outline: none;
553
+    background: #ebf1f7;
485 554
   }
486
-  .choice {
555
+}
556
+.choice {
487 557
   border-bottom: 1px #e5e5e5 solid;
488 558
   position: fixed;
489 559
   top: 63px;
@@ -491,52 +561,57 @@
491 561
   z-index: 66;
492 562
   left: 1.58rem;
493 563
   background: #fff;
494
-  ul {
495
-  @include display-flex;
496
-  @include align-items-center;
497
-  @include text-align;
498
-  @include justify-content-between;
499
-  width: 70%;
500
-  margin: 0 auto;
501
-  font-size: 0.32rem;
502
-  color: $pgh-color;
503
-  li {
504
-  @include display-flex;
505
-  @include align-items-center;
506
-  @include text-align;
507
-  @include justify-content-between;
508
-  padding: 0.3rem 0;
509
-  font-size: 0.32rem;
510
-  .iconfont {
511
-  margin: 0 0.1rem;
512
-  }
513
-  .line {
514
-  background: #a8b3ba;
515
-  width: 0.2rem;
516
-  height: 1px;
517
-  margin: 0 0.2rem;
518
-  display: inline-block;
519
-  }
520
-  }
564
+  @media only screen and (max-width: 812px) {
565
+    top: 43px !important;
521 566
   }
567
+  ul {
568
+    @include display-flex;
569
+    @include align-items-center;
570
+    @include text-align;
571
+    @include justify-content-between;
572
+    width: 70%;
573
+    margin: 0 auto;
574
+    font-size: 0.32rem;
575
+    color: $pgh-color;
576
+    li {
577
+      @include display-flex;
578
+      @include align-items-center;
579
+      @include text-align;
580
+      @include justify-content-between;
581
+      padding: 0.3rem 0;
582
+      font-size: 0.32rem;
583
+      .iconfont {
584
+        margin: 0 0.1rem;
585
+      }
586
+      .line {
587
+        background: #a8b3ba;
588
+        width: 0.2rem;
589
+        height: 1px;
590
+        margin: 0 0.2rem;
591
+        display: inline-block;
592
+      }
593
+    }
522 594
   }
523
-  .DialysisAdvice{
524
-  padding-top:115px;
595
+}
596
+.DialysisAdvice {
597
+  padding-top: 115px;
525 598
   background: #fff;
526 599
   min-height: calc(100vh - 2px);
600
+  @media only screen and (max-width: 812px) {
601
+    padding-top: 80px !important;
527 602
   }
603
+}
528 604
 
529
-
530
-  .advice_content {
605
+.advice_content {
531 606
   text-align: left;
532 607
   padding-left: 5px;
533 608
   padding-right: 5px;
534 609
   // background: #eff6fc;
535
-  }
536
-  .subadvice_content {
610
+}
611
+.subadvice_content {
537 612
   text-align: left;
538 613
   padding-left: 25px;
539 614
   padding-right: 5px;
540 615
   // background: #fafcfe;
541
-  }
616
+}
542 617
 </style>

+ 330 - 228
src/pages/advice/NormalAdviceTable.vue Прегледај датотеку

@@ -2,30 +2,72 @@
2 2
   <div class="mainBox">
3 3
     <div class="choice">
4 4
       <ul>
5
-
6
-        <el-popover placement="bottom" trigger="click" v-model="show_patient_type_selector">
7
-          <li slot="reference">{{patient_types[patient_selected].text}}<span class="iconfont">&#xe74a;</span></li>
5
+        <el-popover
6
+          placement="bottom"
7
+          trigger="click"
8
+          v-model="show_patient_type_selector"
9
+        >
10
+          <li slot="reference">
11
+            {{ patient_types[patient_selected].text
12
+            }}<span class="iconfont">&#xe74a;</span>
13
+          </li>
8 14
           <div class="popover-demo-content">
9 15
             <ul>
10
-              <li v-for="type in patient_types" :key="type.value" @click="handlePaitentType(type.value)" :class="advice_type_selected == type.value ? 'tick' : ''" >{{type.text}}</li>
16
+              <li
17
+                v-for="type in patient_types"
18
+                :key="type.value"
19
+                @click="handlePaitentType(type.value)"
20
+                :class="advice_type_selected == type.value ? 'tick' : ''"
21
+              >
22
+                {{ type.text }}
23
+              </li>
11 24
             </ul>
12 25
           </div>
13 26
         </el-popover>
14 27
 
15
-
16
-        <el-popover placement="bottom" trigger="click" v-model="show_zone_selector">
17
-          <li slot="reference">{{zones[zone_selected].text}}<span class="iconfont">&#xe74a;</span></li>
28
+        <el-popover
29
+          placement="bottom"
30
+          trigger="click"
31
+          v-model="show_zone_selector"
32
+        >
33
+          <li slot="reference">
34
+            {{ zones[zone_selected].text
35
+            }}<span class="iconfont">&#xe74a;</span>
36
+          </li>
18 37
           <div class="popover-demo-content">
19 38
             <ul>
20
-              <li v-for="(zone, index) in zones" :key="zone.value" @click="handleZoneChange(index)"  :class="zone_selected == index ? 'tick' : ''">{{zone.text}}</li>
39
+              <li
40
+                v-for="(zone, index) in zones"
41
+                :key="zone.value"
42
+                @click="handleZoneChange(index)"
43
+                :class="zone_selected == index ? 'tick' : ''"
44
+              >
45
+                {{ zone.text }}
46
+              </li>
21 47
             </ul>
22 48
           </div>
23 49
         </el-popover>
24
-        <el-popover placement="bottom" trigger="click" v-model="show_sch_type_selector">
25
-          <li slot="reference">{{schedule_types[schedule_type_selected].text}}<span class="iconfont">&#xe74a;</span></li>
50
+        <el-popover
51
+          placement="bottom"
52
+          trigger="click"
53
+          v-model="show_sch_type_selector"
54
+        >
55
+          <li slot="reference">
56
+            {{ schedule_types[schedule_type_selected].text
57
+            }}<span class="iconfont">&#xe74a;</span>
58
+          </li>
26 59
           <div class="popover-demo-content">
27 60
             <ul>
28
-              <li v-for="scheduleType in schedule_types" :key="scheduleType.value" @click="handletimeType(scheduleType.value)" :class="schedule_type_selected == scheduleType.value ? 'tick' : ''" >{{scheduleType.text}}</li>
61
+              <li
62
+                v-for="scheduleType in schedule_types"
63
+                :key="scheduleType.value"
64
+                @click="handletimeType(scheduleType.value)"
65
+                :class="
66
+                  schedule_type_selected == scheduleType.value ? 'tick' : ''
67
+                "
68
+              >
69
+                {{ scheduleType.text }}
70
+              </li>
29 71
             </ul>
30 72
           </div>
31 73
         </el-popover>
@@ -45,7 +87,10 @@
45 87
       </ul>
46 88
     </div>
47 89
 
48
-    <div style="width:100%;overflow:hildden;overflow-x:auto;" class="NormalAdvice">
90
+    <div
91
+      style="width:100%;overflow:hildden;overflow-x:auto;"
92
+      class="NormalAdvice"
93
+    >
49 94
       <div class="blueBorder"></div>
50 95
       <table class="table">
51 96
         <tr>
@@ -61,9 +106,6 @@
61 106
           <th width="100px">校对时间</th>
62 107
           <th width="50px">开嘱医生</th>
63 108
           <th width="100px">开嘱时间</th>
64
-
65
-
66
-
67 109
         </tr>
68 110
         <template v-for="(schedules, zone_name, index) in filtedScheduals">
69 111
           <tr :key="index">
@@ -79,39 +121,88 @@
79 121
             <td></td>
80 122
             <td></td>
81 123
             <td></td>
82
-
83 124
           </tr>
84
-          <template v-for="(schedule) in schedules">
85
-            <tr v-for="(advice, advice_index) in schedule.doctor_advice" :key="advice.id + '_' + advice_index + '_' + index"  @click="clickfunction(schedule)">
125
+          <template v-for="schedule in schedules">
126
+            <tr
127
+              v-for="(advice, advice_index) in schedule.doctor_advice"
128
+              :key="advice.id + '_' + advice_index + '_' + index"
129
+              @click="clickfunction(schedule)"
130
+            >
86 131
               <!--<td>{{ advice.parent_id == 0 && advice.dialysis_order&&advice.dialysis_order.device_number&& advice.dialysis_order.device_number.number.length > 0 ? advice.dialysis_order.device_number.number : schedule.device_number.number }}</td>-->
87 132
               <!--<td>{{getNumber(advice)}}</td>-->
88 133
               <td>{{ advice.parent_id == 0 ? schedule.patient.name : "" }}</td>
89
-              <td>{{ advice.parent_id == 0 ? schedule.patient.dialysis_no : "" }}</td>
90
-              <td>{{ getAdaviceType(advice.advice_type,advice.parent_id)}}</td>
91
-              <td>{{ advice.parent_id == 0 ? parseTime(advice.start_time, "{m}-{d} {h}:{i}") : "" }}</td>
92 134
               <td>
93
-                <span >{{advice.advice_name }}</span>
94
-                <span >{{advice.advice_desc}}{{advice.drug_spec_unit}}</span>
95
-
96
-                <span v-if="advice.prescribing_number">{{advice.prescribing_number}}{{advice.prescribing_number_unit}}</span>
97
-                <span v-if="advice.single_dose"> 单次用量 {{advice.single_dose}}{{advice.single_dose_unit}}</span>
98
-                <span >{{advice.delivery_way}}</span>
99
-                <span >{{advice.execution_frequency}}</span>
135
+                {{ advice.parent_id == 0 ? schedule.patient.dialysis_no : "" }}
136
+              </td>
137
+              <td>
138
+                {{ getAdaviceType(advice.advice_type, advice.parent_id) }}
139
+              </td>
140
+              <td>
141
+                {{
142
+                  advice.parent_id == 0
143
+                    ? parseTime(advice.start_time, "{m}-{d} {h}:{i}")
144
+                    : ""
145
+                }}
146
+              </td>
147
+              <td>
148
+                <span>{{ advice.advice_name }}</span>
149
+                <span>{{ advice.advice_desc }}{{ advice.drug_spec_unit }}</span>
150
+
151
+                <span v-if="advice.prescribing_number"
152
+                  >{{ advice.prescribing_number
153
+                  }}{{ advice.prescribing_number_unit }}</span
154
+                >
155
+                <span v-if="advice.single_dose">
156
+                  单次用量 {{ advice.single_dose
157
+                  }}{{ advice.single_dose_unit }}</span
158
+                >
159
+                <span>{{ advice.delivery_way }}</span>
160
+                <span>{{ advice.execution_frequency }}</span>
161
+              </td>
162
+              <td>
163
+                {{
164
+                  advice.parent_id == 0
165
+                    ? parseTime(advice.execution_time, "{m}-{d} {h}:{i}")
166
+                    : ""
167
+                }}
168
+              </td>
169
+              <td>
170
+                {{
171
+                  advice.parent_id == 0 ? getName(advice.execution_staff) : ""
172
+                }}
173
+              </td>
174
+              <td>
175
+                {{ advice.parent_id == 0 ? getName(advice.checker) : "" }}
176
+              </td>
177
+              <td>
178
+                {{
179
+                  advice.parent_id == 0
180
+                    ? parseTime(advice.check_time, "{m}-{d} {h}:{i}")
181
+                    : ""
182
+                }}
183
+              </td>
184
+              <td>
185
+                {{ advice.parent_id == 0 ? getName(advice.advice_doctor) : "" }}
186
+              </td>
187
+              <td>
188
+                {{
189
+                  advice.parent_id == 0
190
+                    ? parseTime(advice.created_time, "{m}-{d} {h}:{i}")
191
+                    : ""
192
+                }}
100 193
               </td>
101
-              <td>{{ advice.parent_id == 0 ? parseTime(advice.execution_time, "{m}-{d} {h}:{i}") : "" }}</td>
102
-              <td>{{ advice.parent_id == 0 ? getName(advice.execution_staff) : "" }}</td>
103
-              <td>{{ advice.parent_id == 0 ? getName(advice.checker) : "" }}</td>
104
-              <td>{{ advice.parent_id == 0 ? parseTime(advice.check_time, "{m}-{d} {h}:{i}") : "" }}</td>
105
-              <td>{{ advice.parent_id == 0 ? getName(advice.advice_doctor) : "" }}</td>
106
-              <td>{{ advice.parent_id == 0 ? parseTime(advice.created_time, "{m}-{d} {h}:{i}") : "" }}</td>
107
-
108
-
109 194
             </tr>
110 195
           </template>
111 196
         </template>
112 197
       </table>
113
-      <div class="NoData" v-show="zones.length  <= 1"><img style="margin-top: 50px; margin-bottom: 50px" src="@/assets/login/data.jpg" alt=""></div>
114 198
 
199
+      <div class="NoData" v-show="zones.length <= 1">
200
+        <img
201
+          style="margin-top: 50px; margin-bottom: 50px"
202
+          src="@/assets/login/data.jpg"
203
+          alt=""
204
+        />
205
+      </div>
115 206
     </div>
116 207
     <!--<div class="NoData" v-show="zones.length <= 1"><img src="@/assets/login/data.jpg" alt=""></div>-->
117 208
 
@@ -122,208 +213,215 @@
122 213
       year-format="{value} "
123 214
       month-format="{value} "
124 215
       date-format="{value} "
125
-      @confirm="requestSchedualDoctors">
216
+      @confirm="requestSchedualDoctors"
217
+    >
126 218
     </mt-datetime-picker>
127 219
   </div>
128 220
 </template>
129 221
 
130 222
 <script>
131
-  import SideBar from "@/pages/layout/SideBar";
132
-  import { parseTime } from "@/utils";
133
-  import { getSchedualDoctors } from "@/api/advice";
134
-  export default {
135
-    name: "DialysisAdviceTable",
136
-    components: {
137
-      SideBar
138
-    },
139
-    data() {
140
-      return {
141
-        selected_date: new Date(),
142
-        admin_user:[],
143
-
144
-        show_sch_type_selector: false,
145
-        schedule_type_selected: 0,
146
-        schedule_types: [
147
-          { value: 0, text: "全部班次" },
148
-          { value: 1, text: "上午" },
149
-          { value: 2, text: "下午" },
150
-          { value: 3, text: "晚上" }
151
-        ],
152
-
153
-        show_zone_selector: false,
154
-        zone_selected: 0,
155
-        show_patient_type_selector:false,
156
-        zones: [{ value: 0, text: "全部分区", select: true }],
157
-
158
-        show_advice_type_selector: false,
159
-        advice_type_selected: 0,
160
-        advice_types: [
161
-          { value: 0, text: "全部医嘱" },
162
-          { value: 1, text: "长期医嘱" },
163
-          { value: 3, text: "临时医嘱" }
164
-        ],
165
-
166
-        patient_types: [
167
-          { value: 0, text: "全部病人" },
168
-          { value: 1, text: "我的病人" },
169
-          { value: 2, text: "未执行病人" },
170
-        ],
171
-        patient_selected: 0,
172
-
173
-        scheduleMap: {}
174
-      };
223
+import SideBar from "@/pages/layout/SideBar";
224
+import { parseTime } from "@/utils";
225
+import { getSchedualDoctors } from "@/api/advice";
226
+export default {
227
+  name: "DialysisAdviceTable",
228
+  components: {
229
+    SideBar
230
+  },
231
+  data() {
232
+    return {
233
+      selected_date: new Date(),
234
+      admin_user: [],
235
+
236
+      show_sch_type_selector: false,
237
+      schedule_type_selected: 0,
238
+      schedule_types: [
239
+        { value: 0, text: "全部班次" },
240
+        { value: 1, text: "上午" },
241
+        { value: 2, text: "下午" },
242
+        { value: 3, text: "晚上" }
243
+      ],
244
+
245
+      show_zone_selector: false,
246
+      zone_selected: 0,
247
+      show_patient_type_selector: false,
248
+      zones: [{ value: 0, text: "全部分区", select: true }],
249
+
250
+      show_advice_type_selector: false,
251
+      advice_type_selected: 0,
252
+      advice_types: [
253
+        { value: 0, text: "全部医嘱" },
254
+        { value: 1, text: "长期医嘱" },
255
+        { value: 3, text: "临时医嘱" }
256
+      ],
257
+
258
+      patient_types: [
259
+        { value: 0, text: "全部病人" },
260
+        { value: 1, text: "我的病人" },
261
+        { value: 2, text: "未执行病人" }
262
+      ],
263
+      patient_selected: 0,
264
+
265
+      scheduleMap: {}
266
+    };
267
+  },
268
+  computed: {
269
+    selected_date_str: function() {
270
+      return parseTime(this.selected_date, "{y}-{m}-{d}");
175 271
     },
176
-    computed: {
177
-      selected_date_str: function() {
178
-        return parseTime(this.selected_date, "{y}-{m}-{d}");
179
-      },
180
-      filtedScheduals: function() {
181
-        var scheduleMap = new Object();
182
-        if (this.zone_selected == 0) {
183
-          for (const key in this.scheduleMap) {
184
-            scheduleMap[key] = this.scheduleMap[key];
185
-          }
186
-        } else {
187
-          var zone_name = this.zones[this.zone_selected].text;
188
-          scheduleMap[zone_name] = this.scheduleMap[zone_name];
272
+    filtedScheduals: function() {
273
+      var scheduleMap = new Object();
274
+      if (this.zone_selected == 0) {
275
+        for (const key in this.scheduleMap) {
276
+          scheduleMap[key] = this.scheduleMap[key];
189 277
         }
278
+      } else {
279
+        var zone_name = this.zones[this.zone_selected].text;
280
+        scheduleMap[zone_name] = this.scheduleMap[zone_name];
281
+      }
190 282
 
191
-        if (this.schedule_type_selected != 0) {
192
-          var _scheduleMap = {};
193
-          for (const key in scheduleMap) {
194
-            var origin_schedules = scheduleMap[key];
195
-            var schedules = [];
196
-            for (let index = 0; index < origin_schedules.length; index++) {
197
-              const schedule = origin_schedules[index];
198
-              if (schedule.schedule_type == this.schedule_type_selected) {
199
-                schedules.push(schedule);
200
-              }
201
-            }
202
-            if (schedules.length > 0) {
203
-              _scheduleMap[key] = schedules;
283
+      if (this.schedule_type_selected != 0) {
284
+        var _scheduleMap = {};
285
+        for (const key in scheduleMap) {
286
+          var origin_schedules = scheduleMap[key];
287
+          var schedules = [];
288
+          for (let index = 0; index < origin_schedules.length; index++) {
289
+            const schedule = origin_schedules[index];
290
+            if (schedule.schedule_type == this.schedule_type_selected) {
291
+              schedules.push(schedule);
204 292
             }
205 293
           }
206
-
207
-          scheduleMap = _scheduleMap;
294
+          if (schedules.length > 0) {
295
+            _scheduleMap[key] = schedules;
296
+          }
208 297
         }
209
-        return scheduleMap;
298
+
299
+        scheduleMap = _scheduleMap;
300
+      }
301
+      return scheduleMap;
302
+    }
303
+  },
304
+  created() {
305
+    this.requestSchedualDoctors();
306
+  },
307
+  methods: {
308
+    getNumber: function(advice) {
309
+      if (
310
+        advice.parent_id == 0 &&
311
+        advice.dialysis_order &&
312
+        advice.dialysis_order.device_number &&
313
+        advice.dialysis_order.device_number.number.length > 0
314
+      ) {
315
+        console.log("111111");
316
+      } else {
317
+        console.log("222222");
210 318
       }
211 319
     },
212
-    created() {
320
+    clickfunction: function(val) {
321
+      // console.log(val);
322
+      this.$router.push({
323
+        path: "/details",
324
+        query: {
325
+          patient_id: val.patient.id,
326
+          date: this.selected_date.getTime() / 1000,
327
+          patient_name: val.patient.name
328
+        }
329
+      });
330
+    },
331
+    handlePaitentType: function(index) {
332
+      this.patient_selected = index;
333
+      this.show_patient_type_selector = false;
213 334
       this.requestSchedualDoctors();
214 335
     },
215
-    methods: {
216
-      getNumber:function(advice){
217
-        if(advice.parent_id == 0 && advice.dialysis_order&&advice.dialysis_order.device_number&& advice.dialysis_order.device_number.number.length > 0){
218
-          console.log("111111")
219
-        }else{
220
-          console.log("222222")
221
-        }
222
-
223
-
224
-      },
225
-      clickfunction: function(val) {
226
-        // console.log(val);
227
-        this.$router.push({
228
-          path: "/details",
229
-          query: {
230
-            patient_id: val.patient.id,
231
-            date: this.selected_date.getTime() / 1000,
232
-            patient_name: val.patient.name
233
-          }
234
-        });
235
-      }, handlePaitentType:function(index){
236
-        this.patient_selected = index;
237
-        this.show_patient_type_selector = false;
238
-        this.requestSchedualDoctors();
239
-
240
-      },
241
-      openPicker() {
242
-        this.$refs.picker.open();
243
-      },  getAdaviceType(type,parent_id) {
244
-        if(parent_id == 0) {
245
-          if (type == 1) {
246
-            return "长嘱";
247
-          } else if (type == 2) {
248
-            return "临嘱";
249
-          } else if (type == 3) {
250
-            return "临嘱";
251
-          }
252
-        }
253
-      },getName(val){
254
-        for(let i = 0; i < this.admin_user.length; i++){
255
-          if(this.admin_user[i].id == val){
256
-            return this.admin_user[i].name
257
-          }
336
+    openPicker() {
337
+      this.$refs.picker.open();
338
+    },
339
+    getAdaviceType(type, parent_id) {
340
+      if (parent_id == 0) {
341
+        if (type == 1) {
342
+          return "长嘱";
343
+        } else if (type == 2) {
344
+          return "临嘱";
345
+        } else if (type == 3) {
346
+          return "临嘱";
258 347
         }
259
-      },
260
-      handletimeType: function(index) {
261
-        this.schedule_type_selected = index;
262
-        this.show_sch_type_selector = false;
263
-      },
264
-      handleAdviceType: function(index) {
265
-        this.advice_type_selected = index;
266
-        this.show_advice_type_selector = false;
267
-        this.requestSchedualDoctors();
268
-      },
269
-      handleZoneChange: function(index) {
270
-        this.zone_selected = index;
271
-        this.show_zone_selector = false;
272
-      },
273
-      parseTime: function(time, layout) {
274
-        if (time == 0) {
275
-          return "";
348
+      }
349
+    },
350
+    getName(val) {
351
+      for (let i = 0; i < this.admin_user.length; i++) {
352
+        if (this.admin_user[i].id == val) {
353
+          return this.admin_user[i].name;
276 354
         }
277
-        return parseTime(time, layout);
278
-      },
279
-      requestSchedualDoctors() {
280
-        getSchedualDoctors({
281
-          date: this.selected_date_str,
282
-          patient_type:this.patient_selected,
283
-          advice_type: this.advice_type_selected,
284
-        }).then(rs => {
285
-          var resp = rs.data;
286
-          if (resp.state == 1) {
287
-            this.admin_user = resp.data.adminUser
288
-            var schedules = resp.data.scheduals;
289
-            var zoneMap = {};
290
-            var scheduleMap = {};
291
-            for (let index = 0; index < schedules.length; index++) {
292
-              const schedule = schedules[index];
293
-              if (schedule.doctor_advice.length == 0) {
294
-                continue;
295
-              }
296
-              if (scheduleMap[schedule.device_number.zone.name] == null) {
297
-                scheduleMap[schedule.device_number.zone.name] = [];
298
-              }
299
-              scheduleMap[schedule.device_number.zone.name].push(schedule);
300
-              if (zoneMap[schedule.device_number.zone.name] == null) {
301
-                zoneMap[schedule.device_number.zone.name] = schedule.device_number.zone;
302
-              }
355
+      }
356
+    },
357
+    handletimeType: function(index) {
358
+      this.schedule_type_selected = index;
359
+      this.show_sch_type_selector = false;
360
+    },
361
+    handleAdviceType: function(index) {
362
+      this.advice_type_selected = index;
363
+      this.show_advice_type_selector = false;
364
+      this.requestSchedualDoctors();
365
+    },
366
+    handleZoneChange: function(index) {
367
+      this.zone_selected = index;
368
+      this.show_zone_selector = false;
369
+    },
370
+    parseTime: function(time, layout) {
371
+      if (time == 0) {
372
+        return "";
373
+      }
374
+      return parseTime(time, layout);
375
+    },
376
+    requestSchedualDoctors() {
377
+      getSchedualDoctors({
378
+        date: this.selected_date_str,
379
+        patient_type: this.patient_selected,
380
+        advice_type: this.advice_type_selected
381
+      }).then(rs => {
382
+        var resp = rs.data;
383
+        if (resp.state == 1) {
384
+          this.admin_user = resp.data.adminUser;
385
+          var schedules = resp.data.scheduals;
386
+          var zoneMap = {};
387
+          var scheduleMap = {};
388
+          for (let index = 0; index < schedules.length; index++) {
389
+            const schedule = schedules[index];
390
+            if (schedule.doctor_advice.length == 0) {
391
+              continue;
303 392
             }
304
-
305
-            var zones = [];
306
-            zones.push({ value: 0, text: "全部分区" });
307
-            for (var zoneName in zoneMap) {
308
-              zones.push({ value: zoneMap[zoneName].id, text: zoneName });
393
+            if (scheduleMap[schedule.device_number.zone.name] == null) {
394
+              scheduleMap[schedule.device_number.zone.name] = [];
309 395
             }
396
+            scheduleMap[schedule.device_number.zone.name].push(schedule);
397
+            if (zoneMap[schedule.device_number.zone.name] == null) {
398
+              zoneMap[schedule.device_number.zone.name] =
399
+                schedule.device_number.zone;
400
+            }
401
+          }
310 402
 
311
-            zones = zones.sort(function(a, b) {
312
-              return a.value > b.value;
313
-            });
314
-            this.zones = zones;
315
-
316
-            this.scheduleMap = scheduleMap;
317
-          } else {
318
-            this.$toast({
319
-              message: resp.msg
320
-            });
403
+          var zones = [];
404
+          zones.push({ value: 0, text: "全部分区" });
405
+          for (var zoneName in zoneMap) {
406
+            zones.push({ value: zoneMap[zoneName].id, text: zoneName });
321 407
           }
322
-        });
323
-      },
324
-      adviceDesc(advice) {}
325
-    }
326
-  };
408
+
409
+          zones = zones.sort(function(a, b) {
410
+            return a.value > b.value;
411
+          });
412
+          this.zones = zones;
413
+
414
+          this.scheduleMap = scheduleMap;
415
+        } else {
416
+          this.$toast({
417
+            message: resp.msg
418
+          });
419
+        }
420
+      });
421
+    },
422
+    adviceDesc(advice) {}
423
+  }
424
+};
327 425
 </script>
328 426
 
329 427
 <style style="stylesheet/scss" lang="scss" scoped>
@@ -373,12 +471,15 @@
373 471
 }
374 472
 .choice {
375 473
   border-bottom: 1px #e5e5e5 solid;
376
-   position: fixed;
377
-    top: 63px;
378
-    right: 0;
379
-    z-index: 66;
380
-    left: 1.58rem;
381
-    background: #fff;
474
+  position: fixed;
475
+  top: 63px;
476
+  right: 0;
477
+  z-index: 66;
478
+  left: 1.58rem;
479
+  background: #fff;
480
+  @media only screen and (max-width: 812px) {
481
+    top: 43px !important;
482
+  }
382 483
   ul {
383 484
     @include display-flex;
384 485
     @include align-items-center;
@@ -410,11 +511,12 @@
410 511
 }
411 512
 .table {
412 513
 }
413
-.NormalAdvice{
414
-  padding-top:115px;
514
+.NormalAdvice {
515
+  padding-top: 115px;
415 516
   background: #fff;
416 517
   min-height: calc(100vh - 2px);
518
+  @media only screen and (max-width: 812px) {
519
+    padding-top: 80px !important;
520
+  }
417 521
 }
418
-
419
-
420 522
 </style>

+ 138 - 114
src/pages/main/DialysisArea.vue Прегледај датотеку

@@ -1,85 +1,112 @@
1 1
 <template>
2 2
   <div>
3 3
     <div v-loading="loading">
4
-
5
-    <div class="screening">
6
-      <ul>
7
-        <el-popover
8
-          v-model="zone_options_visible"
9
-          placement="bottom"
10
-          trigger="click">
11
-          <li slot="reference">
12
-            {{ zones.length <= 1 && zone_selected > 0 ? "全部分区" : zones[zone_selected].text }}
13
-            <span class="iconfont">&#xe74a;</span>
14
-          </li>
15
-          <div class="popover-demo-content">
16
-            <ul>
17
-              <li
18
-                v-for="(zone, index) in zones"
19
-                :key="zone.value"
20
-                @click="handleZoneChange(index)"
21
-                :class="zone_selected == index ? 'tick' : ''"
22
-              >{{zone.text}}</li>
23
-            </ul>
24
-          </div>
25
-        </el-popover>
26
-
27
-        <el-popover
28
-          v-model="sch_type_options_visible"
29
-          placement="bottom"
30
-          trigger="click">
31
-          <li slot="reference">
32
-            {{ schedual_types[schedual_type_selected].text}}
4
+      <div class="screening">
5
+        <ul>
6
+          <el-popover
7
+            v-model="zone_options_visible"
8
+            placement="bottom"
9
+            trigger="click"
10
+          >
11
+            <li slot="reference">
12
+              {{
13
+                zones.length <= 1 && zone_selected > 0
14
+                  ? "全部分区"
15
+                  : zones[zone_selected].text
16
+              }}
17
+              <span class="iconfont">&#xe74a;</span>
18
+            </li>
19
+            <div class="popover-demo-content">
20
+              <ul>
21
+                <li
22
+                  v-for="(zone, index) in zones"
23
+                  :key="zone.value"
24
+                  @click="handleZoneChange(index)"
25
+                  :class="zone_selected == index ? 'tick' : ''"
26
+                >
27
+                  {{ zone.text }}
28
+                </li>
29
+              </ul>
30
+            </div>
31
+          </el-popover>
32
+
33
+          <el-popover
34
+            v-model="sch_type_options_visible"
35
+            placement="bottom"
36
+            trigger="click"
37
+          >
38
+            <li slot="reference">
39
+              {{ schedual_types[schedual_type_selected].text }}
40
+              <span class="iconfont">&#xe74a;</span>
41
+            </li>
42
+            <div class="popover-demo-content">
43
+              <ul>
44
+                <li
45
+                  v-for="schedualType in schedual_types"
46
+                  :key="schedualType.value"
47
+                  @click="handletimeType(schedualType.value)"
48
+                  :class="
49
+                    schedual_type_selected == schedualType.value ? 'tick' : ''
50
+                  "
51
+                >
52
+                  {{ schedualType.text }}
53
+                </li>
54
+              </ul>
55
+            </div>
56
+          </el-popover>
57
+
58
+          <li @click="openPicker()">
59
+            {{ selected_date_str }}
33 60
             <span class="iconfont">&#xe74a;</span>
34 61
           </li>
35
-          <div class="popover-demo-content">
36
-            <ul>
37
-              <li
38
-                v-for="schedualType in schedual_types"
39
-                :key="schedualType.value"
40
-                @click="handletimeType(schedualType.value)"
41
-                :class="schedual_type_selected == schedualType.value ? 'tick' : ''"
42
-              >{{schedualType.text}}</li>
43
-            </ul>
44
-          </div>
45
-        </el-popover>
46
-
47
-        <li @click="openPicker()">
48
-          {{selected_date_str}}
49
-          <span class="iconfont">&#xe74a;</span>
50
-        </li>
51
-      </ul>
52
-    </div>
53
-    <div class="stateBox">
54
-      <div v-for="(item, index) in filtedScheduals" :key="index">
55
-        <h2 class="title">{{item.zone_name}}</h2>
56
-        <patient-box class="clearfix" :patients="item.scheduals"></patient-box>
62
+        </ul>
57 63
       </div>
58
-      <div class="NoData" v-if="filtedScheduals.length == 0&&networkStates">
59
-        <img style="margin-top: 50px; margin-bottom: 50px" src="@/assets/login/data.jpg" alt>
64
+      <div class="stateBox">
65
+        <div v-for="(item, index) in filtedScheduals" :key="index">
66
+          <h2 class="title">{{ item.zone_name }}</h2>
67
+          <patient-box
68
+            class="clearfix"
69
+            :patients="item.scheduals"
70
+          ></patient-box>
71
+        </div>
72
+        <div class="NoData" v-if="filtedScheduals.length == 0 && networkStates">
73
+          <img
74
+            style="margin-top: 50px; margin-bottom: 50px"
75
+            src="@/assets/login/data.jpg"
76
+            alt
77
+          />
78
+        </div>
79
+        <div
80
+          class="NoData"
81
+          v-if="!networkStates"
82
+          style="display: block;text-align: center"
83
+        >
84
+          <p style="margin-top: 100px;font-size: 18px">
85
+            网络异常,请点击重新加载
86
+          </p>
87
+
88
+          <!--<img style="margin-top: 50px; margin-bottom: 50px" src="@/assets/login/no_network.jpg" alt="">-->
89
+          <van-button
90
+            slot="button"
91
+            size="normal"
92
+            type="info"
93
+            style="display:block;margin:0 auto"
94
+            @click="reloads()"
95
+            >重新加载
96
+          </van-button>
97
+        </div>
60 98
       </div>
61
-      <div class="NoData" v-if="!networkStates" style="display: block;text-align: center">
62
-        <p  style="margin-top: 100px;font-size: 18px">网络异常,请点击重新加载</p>
63
-
64
-
65
-        <!--<img style="margin-top: 50px; margin-bottom: 50px" src="@/assets/login/no_network.jpg" alt="">-->
66
-        <van-button  slot="button" size="normal" type="info" style="display:block;margin:0 auto"  @click="reloads()">重新加载
67
-        </van-button>
68
-      </div>
69
-
99
+      <mt-datetime-picker
100
+        v-model="selected_date"
101
+        ref="picker"
102
+        type="date"
103
+        year-format="{value} "
104
+        month-format="{value} "
105
+        date-format="{value} "
106
+        @confirm="handleScheduleDateChange"
107
+      ></mt-datetime-picker>
70 108
     </div>
71
-    <mt-datetime-picker
72
-      v-model="selected_date"
73
-      ref="picker"
74
-      type="date"
75
-      year-format="{value} "
76
-      month-format="{value} "
77
-      date-format="{value} "
78
-      @confirm="handleScheduleDateChange"
79
-    ></mt-datetime-picker>
80 109
   </div>
81
-  </div>
82
-
83 110
 </template>
84 111
 
85 112
 <script>
@@ -88,7 +115,7 @@ import { Popover } from "vux";
88 115
 import { Datetime } from "vux";
89 116
 import { parseTime } from "@/utils/index";
90 117
 import { getDialysisScheduals } from "@/api/dialysis";
91
-import {Toast} from 'vant'
118
+import { Toast } from "vant";
92 119
 
93 120
 export default {
94 121
   name: "DialysisArea",
@@ -97,13 +124,13 @@ export default {
97 124
     Popover,
98 125
     Datetime
99 126
   },
100
-  inject: ['reload'],
127
+  inject: ["reload"],
101 128
   data() {
102 129
     return {
103
-      loading:false,
130
+      loading: false,
104 131
 
105
-      networkStates:true,
106
-      timer:null,
132
+      networkStates: true,
133
+      timer: null,
107 134
       selected_date: this.$store.getters.app.dialysis_area.schedule_date, //new Date(),
108 135
       schedual_types: [
109 136
         { value: 0, text: "全部班", select: true },
@@ -119,7 +146,7 @@ export default {
119 146
       dialysis_scheduals: [],
120 147
 
121 148
       zone_options_visible: false,
122
-      sch_type_options_visible: false,
149
+      sch_type_options_visible: false
123 150
     };
124 151
   },
125 152
   props: {
@@ -211,18 +238,18 @@ export default {
211 238
   created() {
212 239
     this.requestDialysisScheduals();
213 240
   },
214
-  mounted(){
215
-  this.timer =   window.setInterval(() => {
216
-      setTimeout(this.requestDialysisScheduals(), 0)
217
-    }, 30000)
241
+  mounted() {
242
+    this.timer = window.setInterval(() => {
243
+      setTimeout(this.requestDialysisScheduals(), 0);
244
+    }, 30000);
218 245
   },
219 246
   beforeDestroy() {
220 247
     clearInterval(this.timer);
221 248
     this.timer = null;
222 249
   },
223 250
   methods: {
224
-    reloads:function(){
225
-      this.reload()
251
+    reloads: function() {
252
+      this.reload();
226 253
     },
227 254
     handletimeType: function(index) {
228 255
       this.sch_type_options_visible = false;
@@ -259,16 +286,14 @@ export default {
259 286
 
260 287
     requestDialysisScheduals() {
261 288
       // this.$toast.loading({forbidClick: true, duration: 0})
262
-      this.loading = true
289
+      this.loading = true;
263 290
       var type = 0;
264 291
       getDialysisScheduals({ type: type, date: this.selected_date_str })
265 292
         .then(rs => {
266
-          this.networkStates = true
293
+          this.networkStates = true;
267 294
           var resp = rs.data;
268 295
           if (resp.state == 1) {
269
-            this.loading = false
270
-
271
-
296
+            this.loading = false;
272 297
 
273 298
             // console.log(resp.data)
274 299
             var scheduals = resp.data.scheduals;
@@ -314,8 +339,7 @@ export default {
314 339
             }
315 340
             this.dialysis_scheduals = dialysis_scheduals;
316 341
           } else {
317
-            this.loading = false
318
-
342
+            this.loading = false;
319 343
 
320 344
             this.$toast({
321 345
               message: resp.msg
@@ -323,27 +347,23 @@ export default {
323 347
           }
324 348
         })
325 349
         .catch(error => {
326
-          this.loading = false
327
-
328
-
350
+          this.loading = false;
329 351
 
330 352
           //超时之后在这里捕抓错误信息.
331 353
           if (error.response) {
332
-            this.networkStates = false
354
+            this.networkStates = false;
333 355
 
334
-
335
-            console.log('error.response')
356
+            console.log("error.response");
336 357
             console.log(error.response);
337 358
           } else if (error.request) {
338
-            this.networkStates = false
359
+            this.networkStates = false;
339 360
 
340 361
             // if(error.request.readyState == 4 && error.request.status == 0){
341 362
             //   //我在这里重新请求
342 363
             //   this.networkStates = false
343 364
             // }
344 365
           } else {
345
-
346
-            this.networkStates = false
366
+            this.networkStates = false;
347 367
           }
348 368
         });
349 369
     },
@@ -363,6 +383,9 @@ export default {
363 383
   z-index: 66;
364 384
   left: 1.58rem;
365 385
   background: #fff;
386
+  @media only screen and (max-width: 812px) {
387
+    top: 50px !important;
388
+  }
366 389
   ul {
367 390
     @include display-flex;
368 391
     @include align-items-center;
@@ -378,6 +401,9 @@ export default {
378 401
         font-size: 0.32rem;
379 402
         color: #a8b3ba;
380 403
         margin-left: 0.1rem;
404
+        @media only screen and (max-width: 812px) {
405
+          font-size: 12px !important;
406
+        }
381 407
       }
382 408
     }
383 409
   }
@@ -395,18 +421,17 @@ export default {
395 421
   }
396 422
 }
397 423
 
398
-  .shadow{
399
-  width:100%;
400
-  height:100%;
401
-  position:absolute;
402
-  left:0;
403
-  top:0;
404
-  z-index:998;
405
-  background-color:#000;
406
-  opacity:0.6;
407
-  display:none;
408
-  }
409
-
424
+.shadow {
425
+  width: 100%;
426
+  height: 100%;
427
+  position: absolute;
428
+  left: 0;
429
+  top: 0;
430
+  z-index: 998;
431
+  background-color: #000;
432
+  opacity: 0.6;
433
+  display: none;
434
+}
410 435
 </style>
411 436
 
412 437
 <style>
@@ -421,4 +446,3 @@ export default {
421 446
   }
422 447
 }
423 448
 </style>
424
-

+ 447 - 410
src/pages/main/WaitingArea.vue Прегледај датотеку

@@ -1,435 +1,470 @@
1 1
 <template>
2 2
   <div>
3 3
     <div v-loading="loading">
4
-
5
-    <div class="screening">
6
-      <!--<div @click="reloads()">刷新</div>-->
7
-      <ul>
8
-        <li v-for="(item,i) in menuList" :class="select_index == i ? 'active' : ''" @click="menuTabClick(i)"
9
-            :key="i">{{ item.label + (item.count > 0 ? '(' + item.count + ')' : '') }}
10
-        </li>
11
-
12
-
13
-        <el-popover
14
-          v-model="zone_options_visible"
15
-          placement="bottom"
16
-          trigger="click">
17
-          <li slot="reference">
18
-            {{ zone_options[zone_selected].text }}<span class="iconfont">&#xe74a;</span>
4
+      <div class="screening">
5
+        <!--<div @click="reloads()">刷新</div>-->
6
+        <ul>
7
+          <li
8
+            v-for="(item, i) in menuList"
9
+            :class="select_index == i ? 'active' : ''"
10
+            @click="menuTabClick(i)"
11
+            :key="i"
12
+          >
13
+            {{ item.label + (item.count > 0 ? "(" + item.count + ")" : "") }}
19 14
           </li>
20
-          <div class="popover-demo-content">
21
-            <ul>
22
-              <li v-for="(option, index) in zone_options" :key="index" @click="handleZoneChange(index)"
23
-                  :class="zone_selected == index ? 'tick' : ''">{{ option.text }}
24
-              </li>
25
-            </ul>
26
-          </div>
27
-        </el-popover>
28 15
 
29
-        <el-popover
30
-          v-model="time_options_visible"
31
-          placement="bottom"
32
-          trigger="click">
33
-          <li slot="reference">
34
-            {{ time_options[time_selected].text }}<span class="iconfont">&#xe74a;</span>
35
-          </li>
36
-          <div class="popover-demo-content">
37
-            <ul>
38
-              <li v-for="(option, index) in time_options" :key="index" @click="handleTimeChange(index)"
39
-                  :class="time_selected == index ? 'tick' : ''">{{ option.text }}
40
-              </li>
41
-            </ul>
42
-          </div>
43
-        </el-popover>
44
-
45
-      </ul>
46
-    </div>
47
-    <div class="stateBox ">
48
-      <!-- <patient-box class="clearfix" :patients="filtedScheduals "></patient-box> -->
49
-      <div v-for="(item, index) in filtedScheduals" :key="index">
50
-        <h2 class="title">{{item.zone_name}}</h2>
51
-        <patient-box class="clearfix" :patients="item.scheduals"></patient-box>
16
+          <el-popover
17
+            v-model="zone_options_visible"
18
+            placement="bottom"
19
+            trigger="click"
20
+          >
21
+            <li slot="reference">
22
+              {{ zone_options[zone_selected].text
23
+              }}<span class="iconfont">&#xe74a;</span>
24
+            </li>
25
+            <div class="popover-demo-content">
26
+              <ul>
27
+                <li
28
+                  v-for="(option, index) in zone_options"
29
+                  :key="index"
30
+                  @click="handleZoneChange(index)"
31
+                  :class="zone_selected == index ? 'tick' : ''"
32
+                >
33
+                  {{ option.text }}
34
+                </li>
35
+              </ul>
36
+            </div>
37
+          </el-popover>
38
+
39
+          <el-popover
40
+            v-model="time_options_visible"
41
+            placement="bottom"
42
+            trigger="click"
43
+          >
44
+            <li slot="reference">
45
+              {{ time_options[time_selected].text
46
+              }}<span class="iconfont">&#xe74a;</span>
47
+            </li>
48
+            <div class="popover-demo-content">
49
+              <ul>
50
+                <li
51
+                  v-for="(option, index) in time_options"
52
+                  :key="index"
53
+                  @click="handleTimeChange(index)"
54
+                  :class="time_selected == index ? 'tick' : ''"
55
+                >
56
+                  {{ option.text }}
57
+                </li>
58
+              </ul>
59
+            </div>
60
+          </el-popover>
61
+        </ul>
52 62
       </div>
53
-      <div class="NoData" v-if="filtedScheduals.length == 0&&networkStates"><img style="margin-top: 50px; margin-bottom: 50px"
54
-                                                                    src="@/assets/login/data.jpg" alt=""></div>
55
-
56
-      <div class="NoData" v-if="!networkStates" style="display: block;text-align: center;">
57
-        <!--<img style="margin-top: 50px; margin-bottom: 50px" src="@/assets/login/no_network.jpg" alt="">-->
58
-        <p  style="margin-top: 100px;font-size: 18px">网络异常,请点击重新加载</p>
59
-        <van-button  slot="button" size="normal" type="info" style="display:block;margin:0 auto"  @click="reloads()">重新加载
60
-        </van-button>
63
+      <div class="stateBox ">
64
+        <!-- <patient-box class="clearfix" :patients="filtedScheduals "></patient-box> -->
65
+        <div v-for="(item, index) in filtedScheduals" :key="index">
66
+          <h2 class="title">{{ item.zone_name }}</h2>
67
+          <patient-box
68
+            class="clearfix"
69
+            :patients="item.scheduals"
70
+          ></patient-box>
71
+        </div>
72
+        <div class="NoData" v-if="filtedScheduals.length == 0 && networkStates">
73
+          <img
74
+            style="margin-top: 50px; margin-bottom: 50px"
75
+            src="@/assets/login/data.jpg"
76
+            alt=""
77
+          />
78
+        </div>
79
+
80
+        <div
81
+          class="NoData"
82
+          v-if="!networkStates"
83
+          style="display: block;text-align: center;"
84
+        >
85
+          <!--<img style="margin-top: 50px; margin-bottom: 50px" src="@/assets/login/no_network.jpg" alt="">-->
86
+          <p style="margin-top: 100px;font-size: 18px">
87
+            网络异常,请点击重新加载
88
+          </p>
89
+          <van-button
90
+            slot="button"
91
+            size="normal"
92
+            type="info"
93
+            style="display:block;margin:0 auto"
94
+            @click="reloads()"
95
+            >重新加载
96
+          </van-button>
97
+        </div>
61 98
       </div>
62
-
63 99
     </div>
64 100
   </div>
65
-  </div>
66
-
67 101
 </template>
68 102
 
69 103
 <script>
70
-  import PatientBox from './PatientBox'
71
-  import {getWaitingScheduals} from '@/api/dialysis'
72
-  import {parseTime} from '@/utils'
73
-  import {Popover} from 'vux'
74
-  import {Toast} from 'vant'
75
-
76
-  import {
77
-    getSelectedAreaDataConfigList,
78
-    getSelectedTimesDataConfigList,
79
-    setSelectedAreaDataConfigList,
80
-    setSelectedTimesDataConfigList,
81
-    setWaitTypeSelectedConfig,
82
-    getWaitTypeSelectedConfig,
83
-  } from '@/utils/data_config'
84
-
85
-  export default {
86
-    name: 'WaitingArea',
87
-    components: {
88
-      PatientBox,
89
-      Popover
90
-    },
91
-    inject: ['reload'],
92
-    data () {
93
-      return {
94
-        loading:false,
95
-        menuList: [
96
-          {value: '1', label: '全部', count: 0},
97
-          {value: '3', label: '待开处方', count: 0},
98
-          {value: '2', label: '透前称量', count: 0}
99
-        ],
100
-
101
-        select_index: 0,
102
-        zone_selected: 0,
103
-        time_selected: 0,
104
-        networkStates:true,
105
-        scheduals: [],
106
-
107
-        zone_options: [{value: 0, text: '全部分区'}],
108
-        zone_scheduals: [],
109
-
110
-        time_options: [{value: 0, text: '全部班'}, {value: 1, text: '上午'}, {value: 2, text: '下午'}, {value: 3, text: '晚上'}],
111
-
112
-        zone_options_visible: false,
113
-        time_options_visible: false,
114
-
115
-      }
116
-
117
-    },
118
-    props: {
119
-      search_keyword: {
120
-        type: String
104
+import PatientBox from "./PatientBox";
105
+import { getWaitingScheduals } from "@/api/dialysis";
106
+import { parseTime } from "@/utils";
107
+import { Popover } from "vux";
108
+import { Toast } from "vant";
109
+
110
+import {
111
+  getSelectedAreaDataConfigList,
112
+  getSelectedTimesDataConfigList,
113
+  setSelectedAreaDataConfigList,
114
+  setSelectedTimesDataConfigList,
115
+  setWaitTypeSelectedConfig,
116
+  getWaitTypeSelectedConfig
117
+} from "@/utils/data_config";
118
+
119
+export default {
120
+  name: "WaitingArea",
121
+  components: {
122
+    PatientBox,
123
+    Popover
124
+  },
125
+  inject: ["reload"],
126
+  data() {
127
+    return {
128
+      loading: false,
129
+      menuList: [
130
+        { value: "1", label: "全部", count: 0 },
131
+        { value: "3", label: "待开处方", count: 0 },
132
+        { value: "2", label: "透前称量", count: 0 }
133
+      ],
134
+
135
+      select_index: 0,
136
+      zone_selected: 0,
137
+      time_selected: 0,
138
+      networkStates: true,
139
+      scheduals: [],
140
+
141
+      zone_options: [{ value: 0, text: "全部分区" }],
142
+      zone_scheduals: [],
143
+
144
+      time_options: [
145
+        { value: 0, text: "全部班" },
146
+        { value: 1, text: "上午" },
147
+        { value: 2, text: "下午" },
148
+        { value: 3, text: "晚上" }
149
+      ],
150
+
151
+      zone_options_visible: false,
152
+      time_options_visible: false
153
+    };
154
+  },
155
+  props: {
156
+    search_keyword: {
157
+      type: String
158
+    }
159
+  },
160
+  computed: {
161
+    filtedScheduals: function() {
162
+      var search_keyword = this.search_keyword;
163
+      if (this.search_keyword.length > 0) {
164
+        var scheduals = [];
165
+        for (let index = 0; index < this.scheduals.length; index++) {
166
+          const schedual = this.scheduals[index];
167
+          if (
168
+            schedual.patient.name.indexOf(search_keyword) != -1 ||
169
+            schedual.patient.dialysis_no.indexOf(search_keyword) != -1
170
+          ) {
171
+            scheduals.push(schedual);
172
+          }
173
+        }
174
+        return this.processScheduals(scheduals);
121 175
       }
122
-    },
123
-    computed: {
124
-      filtedScheduals: function () {
125
-        var search_keyword = this.search_keyword
126
-        if (this.search_keyword.length > 0) {
127
-          var scheduals = []
128
-          for (let index = 0; index < this.scheduals.length; index++) {
129
-            const schedual = this.scheduals[index]
176
+      //
177
+      // if (this.zone_selected != 0) {
178
+      //   var zone_name = this.zone_options[this.zone_selected].text
179
+      //   for (let index = 0; index < this.zone_scheduals.length; index++) {
180
+      //     const zone_scheduals = this.zone_scheduals[index]
181
+      //     if (zone_scheduals.zone_name == zone_name) {
182
+      //       return [zone_scheduals]
183
+      //     }
184
+      //   }
185
+      // }
186
+
187
+      // if (this.time_selected != 0) {
188
+      //   var zone_name = this.zone_options[this.zone_selected].text
189
+      //   console.log(zone_name)
190
+      //   var schedules = [];
191
+      //   for (let o_i = 0; o_i < this.zone_scheduals.length; o_i++) {
192
+      //     const scheduleInfo = this.zone_scheduals[o_i];
193
+      //     var originSchedules = scheduleInfo.scheduals;
194
+      //     var filtedSchedules = [];
195
+      //     for (let s_i = 0; s_i < originSchedules.length; s_i++) {
196
+      //       const schedule = originSchedules[s_i];
197
+      //       if(this.zone_selected == 0){
198
+      //         if (this.time_selected == 0 || schedule.schedule_type == this.time_selected) {
199
+      //           filtedSchedules.push(schedule);
200
+      //         }
201
+      //
202
+      //       }else{
203
+      //         console.log(zone_name)
204
+      //         console.log(schedule.device_number.zone.name)
205
+      //
206
+      //         if ((zone_name.length > 0 && zone_name == schedule.device_number.zone.name)) {
207
+      //           if (this.time_selected == 0 || schedule.schedule_type == this.time_selected) {
208
+      //             filtedSchedules.push(schedule);
209
+      //           }
210
+      //         }
211
+      //       }
212
+      //     }
213
+      //     if (filtedSchedules.length > 0) {
214
+      //       schedules.push({
215
+      //         zone_name: scheduleInfo.zone_name,
216
+      //         scheduals: filtedSchedules
217
+      //       });
218
+      //     }
219
+      //   }
220
+      //   return schedules
221
+      // }
222
+
223
+      var zone_selected = this.zone_selected;
224
+      var timetype_selected = this.time_selected;
225
+      if (zone_selected != 0 || timetype_selected != 0) {
226
+        var zone_name =
227
+          zone_selected == 0 ? "" : this.zone_options[zone_selected].text;
228
+        var schedules = [];
229
+        for (let o_i = 0; o_i < this.zone_scheduals.length; o_i++) {
230
+          const scheduleInfo = this.zone_scheduals[o_i];
231
+          var originSchedules = scheduleInfo.scheduals;
232
+          var filtedSchedules = [];
233
+          for (let s_i = 0; s_i < originSchedules.length; s_i++) {
234
+            const schedule = originSchedules[s_i];
130 235
             if (
131
-              schedual.patient.name.indexOf(search_keyword) != -1 ||
132
-              schedual.patient.dialysis_no.indexOf(search_keyword) != -1
236
+              zone_name.length == 0 ||
237
+              (zone_name.length > 0 &&
238
+                zone_name == schedule.device_number.zone.name)
133 239
             ) {
134
-              scheduals.push(schedual)
135
-            }
136
-          }
137
-          return this.processScheduals(scheduals)
138
-        }
139
-        //
140
-        // if (this.zone_selected != 0) {
141
-        //   var zone_name = this.zone_options[this.zone_selected].text
142
-        //   for (let index = 0; index < this.zone_scheduals.length; index++) {
143
-        //     const zone_scheduals = this.zone_scheduals[index]
144
-        //     if (zone_scheduals.zone_name == zone_name) {
145
-        //       return [zone_scheduals]
146
-        //     }
147
-        //   }
148
-        // }
149
-
150
-        // if (this.time_selected != 0) {
151
-        //   var zone_name = this.zone_options[this.zone_selected].text
152
-        //   console.log(zone_name)
153
-        //   var schedules = [];
154
-        //   for (let o_i = 0; o_i < this.zone_scheduals.length; o_i++) {
155
-        //     const scheduleInfo = this.zone_scheduals[o_i];
156
-        //     var originSchedules = scheduleInfo.scheduals;
157
-        //     var filtedSchedules = [];
158
-        //     for (let s_i = 0; s_i < originSchedules.length; s_i++) {
159
-        //       const schedule = originSchedules[s_i];
160
-        //       if(this.zone_selected == 0){
161
-        //         if (this.time_selected == 0 || schedule.schedule_type == this.time_selected) {
162
-        //           filtedSchedules.push(schedule);
163
-        //         }
164
-        //
165
-        //       }else{
166
-        //         console.log(zone_name)
167
-        //         console.log(schedule.device_number.zone.name)
168
-        //
169
-        //         if ((zone_name.length > 0 && zone_name == schedule.device_number.zone.name)) {
170
-        //           if (this.time_selected == 0 || schedule.schedule_type == this.time_selected) {
171
-        //             filtedSchedules.push(schedule);
172
-        //           }
173
-        //         }
174
-        //       }
175
-        //     }
176
-        //     if (filtedSchedules.length > 0) {
177
-        //       schedules.push({
178
-        //         zone_name: scheduleInfo.zone_name,
179
-        //         scheduals: filtedSchedules
180
-        //       });
181
-        //     }
182
-        //   }
183
-        //   return schedules
184
-        // }
185
-
186
-        var zone_selected = this.zone_selected
187
-        var timetype_selected = this.time_selected
188
-        if ((zone_selected != 0 || timetype_selected != 0)) {
189
-          var zone_name = zone_selected == 0 ? '' : this.zone_options[zone_selected].text
190
-          var schedules = []
191
-          for (let o_i = 0; o_i < this.zone_scheduals.length; o_i++) {
192
-            const scheduleInfo = this.zone_scheduals[o_i]
193
-            var originSchedules = scheduleInfo.scheduals
194
-            var filtedSchedules = []
195
-            for (let s_i = 0; s_i < originSchedules.length; s_i++) {
196
-              const schedule = originSchedules[s_i]
197 240
               if (
198
-                zone_name.length == 0 ||
199
-                (zone_name.length > 0 &&
200
-                  zone_name == schedule.device_number.zone.name)
241
+                timetype_selected == 0 ||
242
+                schedule.schedule_type == timetype_selected
201 243
               ) {
202
-                if (
203
-                  timetype_selected == 0 ||
204
-                  schedule.schedule_type == timetype_selected
205
-                ) {
206
-                  filtedSchedules.push(schedule)
207
-                }
244
+                filtedSchedules.push(schedule);
208 245
               }
209 246
             }
210
-            if (filtedSchedules.length > 0) {
211
-              schedules.push({
212
-                zone_name: scheduleInfo.zone_name,
213
-                scheduals: filtedSchedules
214
-              })
215
-            }
216 247
           }
217
-          return schedules
248
+          if (filtedSchedules.length > 0) {
249
+            schedules.push({
250
+              zone_name: scheduleInfo.zone_name,
251
+              scheduals: filtedSchedules
252
+            });
253
+          }
218 254
         }
255
+        return schedules;
256
+      }
219 257
 
220
-        if (this.select_index == 2) {
221
-          var scheduals = []
222
-          for (let index = 0; index < this.scheduals.length; index++) {
223
-            const schedual = this.scheduals[index]
224
-            if (schedual.assessment_before_dislysis == null) {
225
-              scheduals.push(schedual)
226
-            }
258
+      if (this.select_index == 2) {
259
+        var scheduals = [];
260
+        for (let index = 0; index < this.scheduals.length; index++) {
261
+          const schedual = this.scheduals[index];
262
+          if (schedual.assessment_before_dislysis == null) {
263
+            scheduals.push(schedual);
227 264
           }
228
-          return this.processScheduals(scheduals)
229
-          // return scheduals;
230
-        } else if (this.select_index == 1) {
231
-          var scheduals = []
232
-          for (let index = 0; index < this.scheduals.length; index++) {
233
-            const schedual = this.scheduals[index]
234
-            if (
235
-              schedual.assessment_before_dislysis == null &&
236
-              schedual.prescription == null
237
-            ) {
238
-              scheduals.push(schedual)
239
-            }
265
+        }
266
+        return this.processScheduals(scheduals);
267
+        // return scheduals;
268
+      } else if (this.select_index == 1) {
269
+        var scheduals = [];
270
+        for (let index = 0; index < this.scheduals.length; index++) {
271
+          const schedual = this.scheduals[index];
272
+          if (
273
+            schedual.assessment_before_dislysis == null &&
274
+            schedual.prescription == null
275
+          ) {
276
+            scheduals.push(schedual);
240 277
           }
241
-          // return scheduals;
242
-          return this.processScheduals(scheduals)
243
-        } else {
244
-          return this.zone_scheduals
245
-
246 278
         }
247
-
248
-      }
249
-    },
250
-    created () {
251
-      var area = getSelectedAreaDataConfigList()
252
-      var time = getSelectedTimesDataConfigList()
253
-      var type = getWaitTypeSelectedConfig()
254
-
255
-
256
-      if (area != null){
257
-        this.zone_options_visible = false
258
-        this.zone_selected = parseInt(area)
259
-        this.select_index = -1
279
+        // return scheduals;
280
+        return this.processScheduals(scheduals);
281
+      } else {
282
+        return this.zone_scheduals;
260 283
       }
284
+    }
285
+  },
286
+  created() {
287
+    var area = getSelectedAreaDataConfigList();
288
+    var time = getSelectedTimesDataConfigList();
289
+    var type = getWaitTypeSelectedConfig();
290
+
291
+    if (area != null) {
292
+      this.zone_options_visible = false;
293
+      this.zone_selected = parseInt(area);
294
+      this.select_index = -1;
295
+    }
261 296
 
262
-      if(time != null){
263
-        this.time_selected = parseInt(time)
264
-        this.select_index = -1
265
-        this.time_options_visible = false
266
-      }
267
-      if(type != null){
268
-        this.select_index = parseInt(type)
269
-      }
270
-      this.requestScheduals()
297
+    if (time != null) {
298
+      this.time_selected = parseInt(time);
299
+      this.select_index = -1;
300
+      this.time_options_visible = false;
301
+    }
302
+    if (type != null) {
303
+      this.select_index = parseInt(type);
304
+    }
305
+    this.requestScheduals();
306
+  },
307
+  mounted() {
308
+    this.timer = window.setInterval(() => {
309
+      setTimeout(this.requestScheduals(), 0);
310
+    }, 30000);
311
+  },
312
+  beforeDestroy() {
313
+    clearInterval(this.timer);
314
+    this.timer = null;
315
+    // this.$once('hook:beforeDestroy', () => {
316
+    //   clearInterval(this.timer);
317
+    // })
318
+  },
319
+  methods: {
320
+    reloads: function() {
321
+      this.reload();
271 322
     },
272
-    mounted () {
273
-      this.timer = window.setInterval(() => {
274
-        setTimeout(this.requestScheduals(), 0)
275
-      }, 30000)
323
+    handleAllChange: function(tabIndex) {
324
+      this.select_index = tabIndex;
325
+      this.zone_selected = 0;
326
+      this.time_selected = 0;
276 327
     },
277
-    beforeDestroy () {
278
-      clearInterval(this.timer)
279
-      this.timer = null
280
-      // this.$once('hook:beforeDestroy', () => {
281
-      //   clearInterval(this.timer);
282
-      // })
328
+    menuTabClick: function(tabIndex) {
329
+      this.select_index = tabIndex;
330
+      this.zone_selected = 0;
331
+      this.time_selected = 0;
332
+      setSelectedAreaDataConfigList(this.zone_selected);
333
+      setSelectedTimesDataConfigList(this.time_selected);
334
+      setWaitTypeSelectedConfig(tabIndex);
335
+    },
336
+    handleZoneChange: function(index) {
337
+      this.zone_options_visible = false;
338
+      this.zone_selected = index;
339
+      this.select_index = -1;
340
+      setSelectedAreaDataConfigList(index.toString());
341
+    },
342
+    handleTimeChange: function(index) {
343
+      this.time_selected = index;
344
+      this.select_index = -1;
345
+      this.time_options_visible = false;
346
+      setSelectedTimesDataConfigList(index.toString());
283 347
     },
284
-    methods: {
285
-      reloads:function(){
286
-        this.reload()
287
-
288
-      },
289
-      handleAllChange: function (tabIndex) {
290
-        this.select_index = tabIndex
291
-        this.zone_selected = 0
292
-        this.time_selected = 0
293
-
294
-      },
295
-      menuTabClick: function (tabIndex) {
296
-        this.select_index = tabIndex
297
-        this.zone_selected = 0
298
-        this.time_selected = 0
299
-        setSelectedAreaDataConfigList(this.zone_selected)
300
-        setSelectedTimesDataConfigList(this.time_selected)
301
-        setWaitTypeSelectedConfig(tabIndex)
302
-      },
303
-      handleZoneChange: function (index) {
304
-        this.zone_options_visible = false
305
-        this.zone_selected = index
306
-        this.select_index = -1
307
-        setSelectedAreaDataConfigList(index.toString())
308
-      }, handleTimeChange: function (index) {
309
-        this.time_selected = index
310
-        this.select_index = -1
311
-        this.time_options_visible = false
312
-        setSelectedTimesDataConfigList(index.toString())
313
-      },
314 348
 
315
-      requestScheduals () {
316
-        this.loading = true
317
-        var date = parseTime(Date.parse(new Date()), '{y}-{m}-{d}')
318
-        getWaitingScheduals({date: date}).then(rs => {
319
-          var resp = rs.data
349
+    requestScheduals() {
350
+      this.loading = true;
351
+      var date = parseTime(Date.parse(new Date()), "{y}-{m}-{d}");
352
+      getWaitingScheduals({ date: date })
353
+        .then(rs => {
354
+          var resp = rs.data;
320 355
           if (resp.state == 1) {
321
-            this.loading = false
356
+            this.loading = false;
322 357
 
323
-            var scheduals = resp.data.scheduals
324
-            var totalCount = scheduals.length
325
-            var prescription_count = 0
326
-            var assessment_before_dislysis_count = 0
358
+            var scheduals = resp.data.scheduals;
359
+            var totalCount = scheduals.length;
360
+            var prescription_count = 0;
361
+            var assessment_before_dislysis_count = 0;
327 362
             for (let index = 0; index < scheduals.length; index++) {
328
-              const schedual = scheduals[index]
363
+              const schedual = scheduals[index];
329 364
               if (schedual.assessment_before_dislysis == null) {
330
-                assessment_before_dislysis_count += 1
365
+                assessment_before_dislysis_count += 1;
331 366
               }
332 367
               if (schedual.prescription == null) {
333
-                prescription_count += 1
368
+                prescription_count += 1;
334 369
               }
335 370
             }
336
-            this.menuList[2].count = assessment_before_dislysis_count
337
-            this.menuList[1].count = prescription_count
338
-            this.scheduals = scheduals
371
+            this.menuList[2].count = assessment_before_dislysis_count;
372
+            this.menuList[1].count = prescription_count;
373
+            this.scheduals = scheduals;
339 374
 
340
-            this.zone_options = this.makeZones(scheduals)
341
-            this.zone_scheduals = this.processScheduals(scheduals)
375
+            this.zone_options = this.makeZones(scheduals);
376
+            this.zone_scheduals = this.processScheduals(scheduals);
342 377
           } else {
343
-            this.loading = false
378
+            this.loading = false;
344 379
 
345 380
             this.$toast({
346 381
               message: resp.msg
347
-            })
382
+            });
348 383
           }
349
-        }).catch(error => {
350
-          this.loading = false
384
+        })
385
+        .catch(error => {
386
+          this.loading = false;
351 387
 
352 388
           //超时之后在这里捕抓错误信息.
353 389
           if (error.response) {
354
-            this.networkStates = false
355
-
390
+            this.networkStates = false;
356 391
           } else if (error.request) {
357
-            this.networkStates = false
392
+            this.networkStates = false;
358 393
             // if(error.request.readyState == 4 && error.request.status == 0){
359 394
             //   //我在这里重新请求
360 395
             //   this.networkStates = false
361 396
             // }
362 397
           } else {
363
-            this.networkStates = false
398
+            this.networkStates = false;
364 399
           }
365 400
         });
366
-      },
367
-      makeZones: function (scheduals) {
368
-        var zoneMap = {}
369
-        for (let index = 0; index < scheduals.length; index++) {
370
-          const schedual = scheduals[index]
371
-          if (zoneMap[schedual.device_number.zone.id] == null) {
372
-            zoneMap[schedual.device_number.zone.id] = schedual.device_number.zone
373
-          }
401
+    },
402
+    makeZones: function(scheduals) {
403
+      var zoneMap = {};
404
+      for (let index = 0; index < scheduals.length; index++) {
405
+        const schedual = scheduals[index];
406
+        if (zoneMap[schedual.device_number.zone.id] == null) {
407
+          zoneMap[schedual.device_number.zone.id] = schedual.device_number.zone;
374 408
         }
409
+      }
375 410
 
376
-        var zones = []
377
-        zones.push({value: 0, text: '全部分区'})
411
+      var zones = [];
412
+      zones.push({ value: 0, text: "全部分区" });
378 413
 
379
-        for (var zoneId in zoneMap) {
380
-          zones.push({value: zoneMap[zoneId].id, text: zoneMap[zoneId].name})
381
-        }
414
+      for (var zoneId in zoneMap) {
415
+        zones.push({ value: zoneMap[zoneId].id, text: zoneMap[zoneId].name });
416
+      }
382 417
 
383
-        // zones = zones.sort(function (a, b) {
384
-        //   return a.value > b.value
385
-        // })
386
-        return zones
387
-      },
388
-      processScheduals: function (scheduals) {
389
-        var zoneMap = {}
390
-        var schedualMap = {}
391
-        for (let index = 0; index < scheduals.length; index++) {
392
-          const schedual = scheduals[index]
393
-          if (schedualMap[schedual.device_number.zone.id] == null) {
394
-            schedualMap[schedual.device_number.zone.id] = []
395
-          }
396
-          schedualMap[schedual.device_number.zone.id].push(schedual)
397
-          if (zoneMap[schedual.device_number.zone.id] == null) {
398
-            zoneMap[schedual.device_number.zone.id] = schedual.device_number.zone
399
-          }
418
+      // zones = zones.sort(function (a, b) {
419
+      //   return a.value > b.value
420
+      // })
421
+      return zones;
422
+    },
423
+    processScheduals: function(scheduals) {
424
+      var zoneMap = {};
425
+      var schedualMap = {};
426
+      for (let index = 0; index < scheduals.length; index++) {
427
+        const schedual = scheduals[index];
428
+        if (schedualMap[schedual.device_number.zone.id] == null) {
429
+          schedualMap[schedual.device_number.zone.id] = [];
400 430
         }
401
-
402
-        var zones = []
403
-        // zones.push({ value: 0, text: "全部分区" })
404
-        for (var zoneId in zoneMap) {
405
-          zones.push({id: zoneMap[zoneId].id, name: zoneMap[zoneId].name})
431
+        schedualMap[schedual.device_number.zone.id].push(schedual);
432
+        if (zoneMap[schedual.device_number.zone.id] == null) {
433
+          zoneMap[schedual.device_number.zone.id] = schedual.device_number.zone;
406 434
         }
435
+      }
407 436
 
408
-        zones = zones.sort(function (a, b) {
409
-          return a.id > b.id
410
-        })
411
-        // this.zones = zones
437
+      var zones = [];
438
+      // zones.push({ value: 0, text: "全部分区" })
439
+      for (var zoneId in zoneMap) {
440
+        zones.push({ id: zoneMap[zoneId].id, name: zoneMap[zoneId].name });
441
+      }
412 442
 
413
-        var zone_scheduals = []
414
-        for (let index = 0; index < zones.length; index++) {
415
-          const zone = zones[index]
416
-          var scheduals = schedualMap[zone.id]
417
-          zone_scheduals.push({
418
-            zone_id: zone.id,
419
-            zone_name: zone.name,
443
+      zones = zones.sort(function(a, b) {
444
+        return a.id > b.id;
445
+      });
446
+      // this.zones = zones
420 447
 
421
-            scheduals: scheduals
422
-          })
423
-        }
424
-        // this.zone_scheduals = zone_scheduals;
425
-        return zone_scheduals
448
+      var zone_scheduals = [];
449
+      for (let index = 0; index < zones.length; index++) {
450
+        const zone = zones[index];
451
+        var scheduals = schedualMap[zone.id];
452
+        zone_scheduals.push({
453
+          zone_id: zone.id,
454
+          zone_name: zone.name,
455
+
456
+          scheduals: scheduals
457
+        });
426 458
       }
459
+      // this.zone_scheduals = zone_scheduals;
460
+      return zone_scheduals;
427 461
     }
428 462
   }
463
+};
429 464
 </script>
430 465
 
431 466
 <style style="stylesheet/scss" lang="scss" scoped>
432
-  .screening {
467
+.screening {
433 468
   border-bottom: 1px #e5e5e5 solid;
434 469
   position: fixed;
435 470
   top: 63px;
@@ -437,58 +472,60 @@
437 472
   z-index: 66;
438 473
   left: 1.58rem;
439 474
   background: #fff;
440
-  ul {
441
-  @include display-flex;
442
-  @include align-items-center;
443
-  @include text-align;
444
-  @include justify-content-between;
445
-  width: 60%;
446
-  margin: 0 auto;
447
-  font-size: 0.32rem;
448
-  color:$title-color;
449
-  li {
450
-  padding: 0.3rem 0;
451
-  .iconfont {
452
-  font-size: 0.32rem;
453
-  margin-left: 0.1rem;
454
-  }
455
-  }
456
-  .active {
457
-  position: relative;
458
-  &::before {
459
-  position: absolute;
460
-  bottom: 0;
461
-  left: 0;
462
-  width: 100%;
463
-  height: 2px;
464
-  background: $main-color;
465
-  // border-bottom: 0.04rem $main-color solid;
466
-  content: "";
467
-  }
468
-  }
475
+  @media only screen and (max-width: 812px) {
476
+    top: 50px !important;
469 477
   }
478
+  ul {
479
+    @include display-flex;
480
+    @include align-items-center;
481
+    @include text-align;
482
+    @include justify-content-between;
483
+    width: 60%;
484
+    margin: 0 auto;
485
+    font-size: 0.32rem;
486
+    color: $title-color;
487
+    li {
488
+      padding: 0.3rem 0;
489
+      .iconfont {
490
+        font-size: 0.32rem;
491
+        margin-left: 0.1rem;
492
+      }
493
+    }
494
+    .active {
495
+      position: relative;
496
+      &::before {
497
+        position: absolute;
498
+        bottom: 0;
499
+        left: 0;
500
+        width: 100%;
501
+        height: 2px;
502
+        background: $main-color;
503
+        // border-bottom: 0.04rem $main-color solid;
504
+        content: "";
505
+      }
506
+    }
470 507
   }
471
-  .stateBox {
508
+}
509
+.stateBox {
472 510
   // padding: 0.5rem 0 0 0.6rem;
473 511
   .title {
474
-  font-size: 0.34rem;
475
-  color: #34495e;
476
-  font-weight: 600;
477
-  height: 1rem;
478
-  line-height: 1rem;
479
-  display: inline-block;
480
-  }
481
-  }
482
-  .shadow{
483
-  width:100%;
484
-  height:100%;
485
-  position:absolute;
486
-  left:0;
487
-  top:0;
488
-  z-index:998;
489
-  background-color:#000;
490
-  opacity:0.6;
491
-  display:none;
512
+    font-size: 0.34rem;
513
+    color: #34495e;
514
+    font-weight: 600;
515
+    height: 1rem;
516
+    line-height: 1rem;
517
+    display: inline-block;
492 518
   }
519
+}
520
+.shadow {
521
+  width: 100%;
522
+  height: 100%;
523
+  position: absolute;
524
+  left: 0;
525
+  top: 0;
526
+  z-index: 998;
527
+  background-color: #000;
528
+  opacity: 0.6;
529
+  display: none;
530
+}
493 531
 </style>
494
-

+ 414 - 338
src/pages/main/add_urgent_schedule.vue Прегледај датотеку

@@ -4,7 +4,9 @@
4 4
     <div class="mainContent">
5 5
       <div class="navigation">
6 6
         <div class="goBack">
7
-          <span class="back" @click="$router.back(-1)"><span class="iconfont">&#xe720;</span>返回</span>
7
+          <span class="back" @click="$router.back(-1)"
8
+            ><span class="iconfont">&#xe720;</span>返回</span
9
+          >
8 10
         </div>
9 11
         <div class="nav">
10 12
           <span>临时排班</span>
@@ -25,23 +27,23 @@
25 27
             <div class="field_panel">
26 28
               <van-field v-model="date" class="field"></van-field>
27 29
             </div>
28
-
29 30
           </van-col>
30
-
31
-
32 31
         </van-row>
33 32
         <van-row class="row">
34
-
35 33
           <van-col :span="9">
36 34
             <span class="title">患者:</span>
37 35
             <div class="field_panel">
38
-              <van-field ref="patient_field" @focus="selectPatientAction" :value="patient_name" class="field"
39
-                         left-icon="arrow-down"></van-field>
36
+              <van-field
37
+                ref="patient_field"
38
+                @focus="selectPatientAction"
39
+                :value="patient_name"
40
+                class="field"
41
+                left-icon="arrow-down"
42
+              ></van-field>
40 43
             </div>
41 44
           </van-col>
42 45
 
43 46
           <van-col :span="9">
44
-
45 47
             <div class="field_panel">
46 48
               <el-autocomplete
47 49
                 style="float: right"
@@ -59,29 +61,43 @@
59 61
               </el-autocomplete>
60 62
             </div>
61 63
           </van-col>
62
-
63 64
         </van-row>
64 65
         <van-row class="row">
65 66
           <van-col :span="9">
66 67
             <span class="title">班次:</span>
67 68
             <div class="field_panel">
68
-              <van-field ref="sch_type_field" @focus="selectSchTypeAction" :value="schedule_type_title" class="field"
69
-                         left-icon="arrow-down"></van-field>
69
+              <van-field
70
+                ref="sch_type_field"
71
+                @focus="selectSchTypeAction"
72
+                :value="schedule_type_title"
73
+                class="field"
74
+                left-icon="arrow-down"
75
+              ></van-field>
70 76
             </div>
71 77
           </van-col>
72 78
 
73 79
           <van-col :span="9">
74 80
             <span class="title">治疗模式:</span>
75 81
             <div class="field_panel">
76
-              <van-field ref="mode_field" @focus="selectModeAction" :value="mode_name" class="field"
77
-                         left-icon="arrow-down"></van-field>
82
+              <van-field
83
+                ref="mode_field"
84
+                @focus="selectModeAction"
85
+                :value="mode_name"
86
+                class="field"
87
+                left-icon="arrow-down"
88
+              ></van-field>
78 89
             </div>
79 90
           </van-col>
80 91
           <van-col :span="9">
81 92
             <span class="title">床位:</span>
82 93
             <div class="field_panel">
83
-              <van-field ref="bed_field" @focus="selectBedAction" :value="bed_name" class="field"
84
-                         left-icon="arrow-down"></van-field>
94
+              <van-field
95
+                ref="bed_field"
96
+                @focus="selectBedAction"
97
+                :value="bed_name"
98
+                class="field"
99
+                left-icon="arrow-down"
100
+              ></van-field>
85 101
             </div>
86 102
           </van-col>
87 103
         </van-row>
@@ -89,7 +105,9 @@
89 105
           <van-col :span="24">
90 106
             <span class="title">&nbsp;</span>
91 107
             <div class="field_panel">
92
-              <van-button type="info" size="normal" @click="submitAction">立即排班</van-button>
108
+              <van-button type="info" size="normal" @click="submitAction"
109
+                >立即排班</van-button
110
+              >
93 111
             </div>
94 112
           </van-col>
95 113
         </van-row>
@@ -97,252 +115,286 @@
97 115
     </div>
98 116
 
99 117
     <van-popup v-model="show_patient_picker" position="bottom" class="popup">
100
-      <van-picker :columns="patients" value-key="name" @change="didChangePatient"></van-picker>
118
+      <van-picker
119
+        :columns="patients"
120
+        value-key="name"
121
+        @change="didChangePatient"
122
+      ></van-picker>
101 123
     </van-popup>
102 124
     <van-popup v-model="show_mode_picker" position="bottom" class="popup">
103
-      <van-picker :columns="modes" value-key="name" @change="didChangeMode"></van-picker>
125
+      <van-picker
126
+        :columns="modes"
127
+        value-key="name"
128
+        @change="didChangeMode"
129
+      ></van-picker>
104 130
     </van-popup>
105 131
     <van-popup v-model="show_bed_picker" position="bottom" class="popup">
106
-      <van-picker :columns="zone_device_options" value-key="number" @change="didChangeBed"></van-picker>
132
+      <van-picker
133
+        :columns="zone_device_options"
134
+        value-key="number"
135
+        @change="didChangeBed"
136
+      ></van-picker>
107 137
     </van-popup>
108 138
     <van-popup v-model="show_sch_type_picker" position="bottom" class="popup">
109
-      <van-picker :columns="schedule_types" value-key="text" @change="didChangeSchType"></van-picker>
139
+      <van-picker
140
+        :columns="schedule_types"
141
+        value-key="text"
142
+        @change="didChangeSchType"
143
+      ></van-picker>
110 144
     </van-popup>
111 145
   </div>
112 146
 </template>
113 147
 
114 148
 <script>
115
-  import SideBar from '@/pages/layout/SideBar'
116
-  import {parseTime} from '@/utils'
117
-  import {getUrgentScheduleInitData, PostSearch, postUrgentSchedule} from '@/api/dialysis'
118
-  import {Dialog, Toast} from 'vant'
119
-
120
-  export default {
121
-    name: 'AddUrgentSchedule',
122
-    components: {
123
-      SideBar,
124
-    },
125
-    data () {
126
-      return {
127
-        loading: false,
128
-        value: '',
129
-        date: '2019-09-09',
130
-        patient_id: 0,
131
-        mode_id: 0,
132
-        device_id: 0,
133
-        schedule_type: 1,
134
-        zone_name: '',
135
-
136
-        show_patient_picker: false,
137
-        show_mode_picker: false,
138
-        show_bed_picker: false,
139
-        show_sch_type_picker: false,
140
-
141
-        patients: [],
142
-        modes: [],
143
-        schedule_types: [
144
-          {value: 1, text: '上午'},
145
-          {value: 2, text: '下午'},
146
-          {value: 3, text: '晚上'},
147
-        ],
148
-
149
-        origin_device_numbers: [],
150
-        zone_device_map: {},
151
-        zone_names: [],
152
-        current_devices: [],
153
-        zone_device_options: [],
154
-
155
-        origin_schedules: [],
149
+import SideBar from "@/pages/layout/SideBar";
150
+import { parseTime } from "@/utils";
151
+import {
152
+  getUrgentScheduleInitData,
153
+  PostSearch,
154
+  postUrgentSchedule
155
+} from "@/api/dialysis";
156
+import { Dialog, Toast } from "vant";
157
+
158
+export default {
159
+  name: "AddUrgentSchedule",
160
+  components: {
161
+    SideBar
162
+  },
163
+  data() {
164
+    return {
165
+      loading: false,
166
+      value: "",
167
+      date: "2019-09-09",
168
+      patient_id: 0,
169
+      mode_id: 0,
170
+      device_id: 0,
171
+      schedule_type: 1,
172
+      zone_name: "",
173
+
174
+      show_patient_picker: false,
175
+      show_mode_picker: false,
176
+      show_bed_picker: false,
177
+      show_sch_type_picker: false,
178
+
179
+      patients: [],
180
+      modes: [],
181
+      schedule_types: [
182
+        { value: 1, text: "上午" },
183
+        { value: 2, text: "下午" },
184
+        { value: 3, text: "晚上" }
185
+      ],
186
+
187
+      origin_device_numbers: [],
188
+      zone_device_map: {},
189
+      zone_names: [],
190
+      current_devices: [],
191
+      zone_device_options: [],
192
+
193
+      origin_schedules: []
194
+    };
195
+  },
196
+  computed: {
197
+    patient_name: function() {
198
+      for (let index = 0; index < this.patients.length; index++) {
199
+        const patient = this.patients[index];
200
+        if (patient.id == this.patient_id) {
201
+          return patient.name;
202
+        }
156 203
       }
204
+      return "";
157 205
     },
158
-    computed: {
159
-      patient_name: function () {
160
-        for (let index = 0; index < this.patients.length; index++) {
161
-          const patient = this.patients[index]
162
-          if (patient.id == this.patient_id) {
163
-            return patient.name
164
-          }
165
-        }
166
-        return ''
167
-      },
168
-      mode_name: function () {
169
-        for (let index = 0; index < this.modes.length; index++) {
170
-          const mode = this.modes[index]
171
-          if (mode.id == this.mode_id) {
172
-            return mode.name
173
-          }
174
-        }
175
-        return ''
176
-      },
177
-      bed_name: function () {
178
-        if (this.zone_name.length > 0 && this.device_id != 0) {
179
-          for (let index = 0; index < this.current_devices.length; index++) {
180
-            const device_number = this.current_devices[index]
181
-            if (device_number.id == this.device_id) {
182
-              return device_number.zone.name + ' - ' + device_number.number
183
-            }
184
-          }
206
+    mode_name: function() {
207
+      for (let index = 0; index < this.modes.length; index++) {
208
+        const mode = this.modes[index];
209
+        if (mode.id == this.mode_id) {
210
+          return mode.name;
185 211
         }
186
-        return ''
187
-      },
188
-      schedule_type_title: function () {
189
-        for (let index = 0; index < this.schedule_types.length; index++) {
190
-          const type = this.schedule_types[index]
191
-          if (type.value == this.schedule_type) {
192
-            return type.text
212
+      }
213
+      return "";
214
+    },
215
+    bed_name: function() {
216
+      if (this.zone_name.length > 0 && this.device_id != 0) {
217
+        for (let index = 0; index < this.current_devices.length; index++) {
218
+          const device_number = this.current_devices[index];
219
+          if (device_number.id == this.device_id) {
220
+            return device_number.zone.name + " - " + device_number.number;
193 221
           }
194 222
         }
195
-        return ''
196
-      },
223
+      }
224
+      return "";
197 225
     },
198
-    mounted () {
199
-      var today = new Date()
200
-      this.date = parseTime(today, '{y}-{m}-{d}')
201
-
202
-      var hour = today.getHours()
203
-      if (hour > 3 && hour < 11) {
204
-        this.schedule_type = 1
205
-      } else if (hour >= 11 && hour < 18) {
206
-        this.schedule_type = 2
207
-      } else {
208
-        this.schedule_type = 3
226
+    schedule_type_title: function() {
227
+      for (let index = 0; index < this.schedule_types.length; index++) {
228
+        const type = this.schedule_types[index];
229
+        if (type.value == this.schedule_type) {
230
+          return type.text;
231
+        }
209 232
       }
233
+      return "";
234
+    }
235
+  },
236
+  mounted() {
237
+    var today = new Date();
238
+    this.date = parseTime(today, "{y}-{m}-{d}");
239
+
240
+    var hour = today.getHours();
241
+    if (hour > 3 && hour < 11) {
242
+      this.schedule_type = 1;
243
+    } else if (hour >= 11 && hour < 18) {
244
+      this.schedule_type = 2;
245
+    } else {
246
+      this.schedule_type = 3;
247
+    }
210 248
 
211
-      this.loading = true
212
-      let params = {
213
-        type: this.schedule_type
214
-      }
215
-      console.log(params)
216
-      getUrgentScheduleInitData(params).then(rs => {
217
-        this.loading = false
249
+    this.loading = true;
250
+    let params = {
251
+      type: this.schedule_type
252
+    };
253
+    console.log(params);
254
+    getUrgentScheduleInitData(params)
255
+      .then(rs => {
256
+        this.loading = false;
218 257
         // console.log(rs.data.data)
219 258
         if (rs.data.state == 1) {
220
-          this.origin_schedules = rs.data.data.schedules
221
-          this.patients = rs.data.data.patients
222
-          this.modes = rs.data.data.modes
223
-          this.origin_device_numbers = rs.data.data.device_numbers
259
+          this.origin_schedules = rs.data.data.schedules;
260
+          this.patients = rs.data.data.patients;
261
+          this.modes = rs.data.data.modes;
262
+          this.origin_device_numbers = rs.data.data.device_numbers;
224 263
 
225 264
           for (let i = this.origin_schedules.length - 1; i >= 0; i--) {
226 265
             for (let y = this.origin_device_numbers.length - 1; y >= 0; y--) {
227
-              if (this.origin_device_numbers[y].id == this.origin_schedules[i].bed_id) {
228
-                this.origin_device_numbers.splice(y, 1)
266
+              if (
267
+                this.origin_device_numbers[y].id ==
268
+                this.origin_schedules[i].bed_id
269
+              ) {
270
+                this.origin_device_numbers.splice(y, 1);
229 271
               }
230 272
             }
231 273
           }
232 274
 
233 275
           if (this.patients.length > 0) {
234
-            this.patient_id = this.patients[0].id
276
+            this.patient_id = this.patients[0].id;
235 277
           }
236 278
           if (this.modes.length > 0) {
237
-            this.mode_id = this.modes[0].id
279
+            this.mode_id = this.modes[0].id;
238 280
           }
239 281
 
240
-          var zone_device_map = {}
241
-          for (let index = 0; index < this.origin_device_numbers.length; index++) {
242
-            const device_number = this.origin_device_numbers[index]
243
-            if (zone_device_map[device_number.zone.name] == null || zone_device_map[device_number.zone.name] == undefined) {
244
-              zone_device_map[device_number.zone.name] = []
282
+          var zone_device_map = {};
283
+          for (
284
+            let index = 0;
285
+            index < this.origin_device_numbers.length;
286
+            index++
287
+          ) {
288
+            const device_number = this.origin_device_numbers[index];
289
+            if (
290
+              zone_device_map[device_number.zone.name] == null ||
291
+              zone_device_map[device_number.zone.name] == undefined
292
+            ) {
293
+              zone_device_map[device_number.zone.name] = [];
245 294
             }
246
-            zone_device_map[device_number.zone.name].push(device_number)
295
+            zone_device_map[device_number.zone.name].push(device_number);
247 296
           }
248
-          this.zone_device_map = zone_device_map
297
+          this.zone_device_map = zone_device_map;
249 298
 
250
-          this.zone_names = Object.keys(this.zone_device_map)
299
+          this.zone_names = Object.keys(this.zone_device_map);
251 300
           if (this.zone_names.length > 0) {
252
-            this.zone_name = this.zone_names[0]
253
-            this.current_devices = this.zone_device_map[this.zone_name]
254
-            this.device_id = this.current_devices[0].id
301
+            this.zone_name = this.zone_names[0];
302
+            this.current_devices = this.zone_device_map[this.zone_name];
303
+            this.device_id = this.current_devices[0].id;
255 304
           }
256 305
           this.zone_device_options = [
257
-            {values: this.zone_names},
306
+            { values: this.zone_names },
258 307
             // { values: this.getDeviceNumberNames(this.current_devices) },
259
-            {values: this.current_devices},
260
-          ]
308
+            { values: this.current_devices }
309
+          ];
261 310
         } else {
262
-          Toast.fail(rs.data.msg)
311
+          Toast.fail(rs.data.msg);
263 312
         }
264
-
265
-      }).catch(err => {
266
-        this.loading = false
267
-        Toast.fail(err)
268 313
       })
314
+      .catch(err => {
315
+        this.loading = false;
316
+        Toast.fail(err);
317
+      });
318
+  },
319
+  methods: {
320
+    handleSelect(val) {
321
+      this.patient_name = val.name;
322
+      this.patient_id = val.id;
269 323
     },
270
-    methods: {
271
-      handleSelect (val) {
272
-        this.patient_name = val.name
273
-        this.patient_id = val.id
274
-      },
275
-      querySearchAsync (keyword, cb) {
276
-        let key = ''
277
-        if (keyword != undefined) {
278
-          key = keyword
324
+    querySearchAsync(keyword, cb) {
325
+      let key = "";
326
+      if (keyword != undefined) {
327
+        key = keyword;
328
+      }
329
+      let searchArray = [];
330
+      PostSearch(key).then(response => {
331
+        if (response.data.state == 1) {
332
+          searchArray = response.data.data.patient;
333
+          cb(searchArray);
334
+        } else {
335
+          cb([]);
279 336
         }
280
-        let searchArray = []
281
-        PostSearch(key).then(response => {
282
-          if (response.data.state == 1) {
283
-            searchArray = response.data.data.patient
284
-            cb(searchArray)
285
-          } else {
286
-            cb([])
287
-          }
288
-        })
289
-      },
290
-
291
-      selectPatientAction: function () {
292
-        this.$refs.patient_field.blur()
293
-        this.show_patient_picker = true
294
-      },
295
-      selectModeAction: function () {
296
-        this.$refs.mode_field.blur()
297
-        this.show_mode_picker = true
298
-      },
299
-      selectBedAction: function () {
300
-        this.$refs.bed_field.blur()
301
-        this.show_bed_picker = true
302
-      },
303
-      selectSchTypeAction: function () {
304
-        this.$refs.sch_type_field.blur()
305
-        this.show_sch_type_picker = true
306
-      },
307
-
308
-      didChangePatient: function (picker, patient, index) {
309
-        this.patient_id = patient.id
310
-      },
311
-      didChangeMode: function (picker, mode, index) {
312
-        this.mode_id = mode.id
313
-      },
314
-      didChangeBed: function (picker, values, col_index) {
315
-        if (col_index == 0) {
316
-          this.zone_name = values[0]
317
-          this.current_devices = this.zone_device_map[this.zone_name]
318
-          this.device_id = this.current_devices[0].id
337
+      });
338
+    },
319 339
 
320
-          picker.setColumnValues(1, this.current_devices)
340
+    selectPatientAction: function() {
341
+      this.$refs.patient_field.blur();
342
+      this.show_patient_picker = true;
343
+    },
344
+    selectModeAction: function() {
345
+      this.$refs.mode_field.blur();
346
+      this.show_mode_picker = true;
347
+    },
348
+    selectBedAction: function() {
349
+      this.$refs.bed_field.blur();
350
+      this.show_bed_picker = true;
351
+    },
352
+    selectSchTypeAction: function() {
353
+      this.$refs.sch_type_field.blur();
354
+      this.show_sch_type_picker = true;
355
+    },
321 356
 
322
-        } else if (col_index == 1) {
323
-          this.device_id = values[1].id
324
-        }
325
-      },
326
-      didChangeSchType: function (picker, sch_type, index) {
327
-        this.schedule_type = sch_type.value
357
+    didChangePatient: function(picker, patient, index) {
358
+      this.patient_id = patient.id;
359
+    },
360
+    didChangeMode: function(picker, mode, index) {
361
+      this.mode_id = mode.id;
362
+    },
363
+    didChangeBed: function(picker, values, col_index) {
364
+      if (col_index == 0) {
365
+        this.zone_name = values[0];
366
+        this.current_devices = this.zone_device_map[this.zone_name];
367
+        this.device_id = this.current_devices[0].id;
368
+
369
+        picker.setColumnValues(1, this.current_devices);
370
+      } else if (col_index == 1) {
371
+        this.device_id = values[1].id;
372
+      }
373
+    },
374
+    didChangeSchType: function(picker, sch_type, index) {
375
+      this.schedule_type = sch_type.value;
328 376
 
329
-        this.loading = true
330
-        let params = {
331
-          type: this.schedule_type
332
-        }
333
-        getUrgentScheduleInitData(params).then(rs => {
334
-          this.loading = false
377
+      this.loading = true;
378
+      let params = {
379
+        type: this.schedule_type
380
+      };
381
+      getUrgentScheduleInitData(params)
382
+        .then(rs => {
383
+          this.loading = false;
335 384
           // console.log(rs.data.data)
336 385
           if (rs.data.state == 1) {
337
-            this.origin_schedules = rs.data.data.schedules
338
-            this.patients = rs.data.data.patients
339
-            this.modes = rs.data.data.modes
340
-            this.origin_device_numbers = rs.data.data.device_numbers
386
+            this.origin_schedules = rs.data.data.schedules;
387
+            this.patients = rs.data.data.patients;
388
+            this.modes = rs.data.data.modes;
389
+            this.origin_device_numbers = rs.data.data.device_numbers;
341 390
 
342 391
             for (let i = this.origin_schedules.length - 1; i >= 0; i--) {
343 392
               for (let y = this.origin_device_numbers.length - 1; y >= 0; y--) {
344
-                if (this.origin_device_numbers[y].id == this.origin_schedules[i].bed_id) {
345
-                  this.origin_device_numbers.splice(y, 1)
393
+                if (
394
+                  this.origin_device_numbers[y].id ==
395
+                  this.origin_schedules[i].bed_id
396
+                ) {
397
+                  this.origin_device_numbers.splice(y, 1);
346 398
                 }
347 399
               }
348 400
             }
@@ -354,167 +406,191 @@
354 406
             //   this.mode_id = this.modes[0].id
355 407
             // }
356 408
 
357
-            var zone_device_map = {}
358
-            for (let index = 0; index < this.origin_device_numbers.length; index++) {
359
-              const device_number = this.origin_device_numbers[index]
360
-              if (zone_device_map[device_number.zone.name] == null || zone_device_map[device_number.zone.name] == undefined) {
361
-                zone_device_map[device_number.zone.name] = []
409
+            var zone_device_map = {};
410
+            for (
411
+              let index = 0;
412
+              index < this.origin_device_numbers.length;
413
+              index++
414
+            ) {
415
+              const device_number = this.origin_device_numbers[index];
416
+              if (
417
+                zone_device_map[device_number.zone.name] == null ||
418
+                zone_device_map[device_number.zone.name] == undefined
419
+              ) {
420
+                zone_device_map[device_number.zone.name] = [];
362 421
               }
363
-              zone_device_map[device_number.zone.name].push(device_number)
422
+              zone_device_map[device_number.zone.name].push(device_number);
364 423
             }
365
-            this.zone_device_map = zone_device_map
424
+            this.zone_device_map = zone_device_map;
366 425
 
367
-            this.zone_names = Object.keys(this.zone_device_map)
426
+            this.zone_names = Object.keys(this.zone_device_map);
368 427
             if (this.zone_names.length > 0) {
369
-              this.zone_name = this.zone_names[0]
370
-              this.current_devices = this.zone_device_map[this.zone_name]
371
-              this.device_id = this.current_devices[0].id
428
+              this.zone_name = this.zone_names[0];
429
+              this.current_devices = this.zone_device_map[this.zone_name];
430
+              this.device_id = this.current_devices[0].id;
372 431
             }
373 432
             this.zone_device_options = [
374
-              {values: this.zone_names},
433
+              { values: this.zone_names },
375 434
               // { values: this.getDeviceNumberNames(this.current_devices) },
376
-              {values: this.current_devices},
377
-            ]
435
+              { values: this.current_devices }
436
+            ];
378 437
           } else {
379
-            Toast.fail(rs.data.msg)
438
+            Toast.fail(rs.data.msg);
380 439
           }
381
-
382
-        }).catch(err => {
383
-          this.loading = false
384
-          Toast.fail(err)
385 440
         })
386
-      },
441
+        .catch(err => {
442
+          this.loading = false;
443
+          Toast.fail(err);
444
+        });
445
+    },
387 446
 
388
-      submitAction: function () {
389
-        if (this.patient_id == 0 || this.mode_id == 0 || this.device_id == 0) {
390
-          Toast.fail('请选择班次、床位等')
391
-          return
392
-        }
447
+    submitAction: function() {
448
+      if (this.patient_id == 0 || this.mode_id == 0 || this.device_id == 0) {
449
+        Toast.fail("请选择班次、床位等");
450
+        return;
451
+      }
393 452
 
394
-        var repeated = false
395
-        for (let index = 0; index < this.origin_schedules.length; index++) {
396
-          const schedule = this.origin_schedules[index]
397
-          if (schedule.bed_id == this.device_id && this.schedule_type == schedule.schedule_type) {
398
-            repeated = true
399
-            break
400
-          }
453
+      var repeated = false;
454
+      for (let index = 0; index < this.origin_schedules.length; index++) {
455
+        const schedule = this.origin_schedules[index];
456
+        if (
457
+          schedule.bed_id == this.device_id &&
458
+          this.schedule_type == schedule.schedule_type
459
+        ) {
460
+          repeated = true;
461
+          break;
401 462
         }
402
-        if (repeated) {
403
-          Dialog.confirm({
404
-            title: '提醒',
405
-            message: '你选择的床位已经被排班,确认要替换吗?'
406
-          }).then(() => {
463
+      }
464
+      if (repeated) {
465
+        Dialog.confirm({
466
+          title: "提醒",
467
+          message: "你选择的床位已经被排班,确认要替换吗?"
468
+        })
469
+          .then(() => {
407 470
             // on confirm
408
-            this.submit()
409
-          }).catch(() => {
410
-            // on cancel
471
+            this.submit();
411 472
           })
412
-        } else {
413
-          this.submit()
414
-        }
415
-      },
416
-      submit: function () {
417
-        var params = {
418
-          patient_id: this.patient_id,
419
-          mode: this.mode_id,
420
-          schedule_type: this.schedule_type,
421
-          bed: this.device_id,
422
-        }
423
-        this.loading = true
424
-        postUrgentSchedule(params).then(rs => {
425
-          this.loading = false
426
-          var resp = rs.data
473
+          .catch(() => {
474
+            // on cancel
475
+          });
476
+      } else {
477
+        this.submit();
478
+      }
479
+    },
480
+    submit: function() {
481
+      var params = {
482
+        patient_id: this.patient_id,
483
+        mode: this.mode_id,
484
+        schedule_type: this.schedule_type,
485
+        bed: this.device_id
486
+      };
487
+      this.loading = true;
488
+      postUrgentSchedule(params)
489
+        .then(rs => {
490
+          this.loading = false;
491
+          var resp = rs.data;
427 492
           if (resp.state == 1) {
428
-            console.log(resp.data)
429
-            var patient = resp.data.patient
430
-            var schedule = resp.data.schedule
493
+            console.log(resp.data);
494
+            var patient = resp.data.patient;
495
+            var schedule = resp.data.schedule;
431 496
             this.$router.push({
432
-              path: '/details',
433
-              query: {patient_id: patient.id, date: schedule.schedule_date, patient_name: patient.name}
434
-            })
435
-
497
+              path: "/details",
498
+              query: {
499
+                patient_id: patient.id,
500
+                date: schedule.schedule_date,
501
+                patient_name: patient.name
502
+              }
503
+            });
436 504
           } else {
437
-            Toast.fail(resp.msg)
505
+            Toast.fail(resp.msg);
438 506
           }
439
-
440
-        }).catch(err => {
441
-          this.loading = false
442
-          Toast.fail('err')
443 507
         })
444
-      }
508
+        .catch(err => {
509
+          this.loading = false;
510
+          Toast.fail("err");
511
+        });
445 512
     }
446 513
   }
514
+};
447 515
 </script>
448 516
 
449 517
 <style style="stylesheet/scss" lang="scss" scoped>
450
-  .mainContent {
518
+.mainContent {
451 519
   position: relative;
452 520
   .navigation {
453
-  padding: 0.3rem 0.36rem;
454
-  border-bottom: 1px #e5e5e5 solid;
455
-  position: fixed;
456
-  top: 0;
457
-  left:1.58rem;
458
-  right: 0;
459
-  z-index: 100;
460
-  background: #fff;
461
-  .goBack {
462
-  float: left;
463
-  .back {
464
-  color: $main-color;
465
-  margin-right: 0.87rem;
466
-  .iconfont {
467
-  color: $main-color;
468
-  }
469
-  }
470
-  }
471
-  .nav {
472
-  text-align: center;
473
-  font-size: 0.36rem;
474
-  }
521
+    padding: 0.3rem 0.36rem;
522
+    border-bottom: 1px #e5e5e5 solid;
523
+    position: fixed;
524
+    top: 0;
525
+    left: 1.58rem;
526
+    right: 0;
527
+    z-index: 100;
528
+    background: #fff;
529
+    .goBack {
530
+      float: left;
531
+      .back {
532
+        color: $main-color;
533
+        margin-right: 0.87rem;
534
+        .iconfont {
535
+          color: $main-color;
536
+        }
537
+      }
538
+    }
539
+    .nav {
540
+      text-align: center;
541
+      font-size: 0.36rem;
542
+    }
475 543
   }
476 544
 
477 545
   .form {
478
-  background: #fff;
479
-  min-height: calc(100vh - 2px);
480
-  padding-top:55px;
481
-  padding-left: 20px;
482
-  .row {
483
-  padding: 5px 0;
484
-  .title {
485
-  color: #8f8f8f;
486
-  margin-right: 5px;
487
-  text-align: right;
488
-  font-size: 16px;
489
-  line-height: 45px;
490
-  width: 80px;
491
-  float: left;
492
-  }
493
-  .field_panel {
494
-  display: inline-block;
495
-  .field {
496
-  padding: 0 0;
497
-  font-size: 18px;
498
-  line-height: 45px;
499
-  width: 180px;
500
-  @media only screen and (max-width: 812px) {
501
-  width: 100px;
502
-  }
503
-  }
504
-  }
546
+    background: #fff;
547
+    min-height: calc(100vh - 2px);
548
+    padding-top: 55px;
549
+    padding-left: 20px;
550
+    .row {
551
+      padding: 5px 0;
552
+      .title {
553
+        color: #8f8f8f;
554
+        margin-right: 5px;
555
+        text-align: right;
556
+        font-size: 16px;
557
+        line-height: 45px;
558
+        width: 80px;
559
+        float: left;
560
+        @media only screen and (max-width: 812px) {
561
+          font-size: 0.3rem !important;
562
+        }
563
+      }
564
+      .el-input__inner {
565
+        @media only screen and (max-width: 812px) {
566
+          height: 24px !important;
567
+          line-height: 24px !important;
568
+        }
569
+      }
570
+      .field_panel {
571
+        display: inline-block;
572
+        .field {
573
+          padding: 0 0;
574
+          font-size: 18px;
575
+          line-height: 45px;
576
+          width: 180px;
577
+          @media only screen and (max-width: 812px) {
578
+            width: 100px;
579
+          }
580
+        }
581
+      }
505 582
 
506
-  .danger_hint {
507
-  font-size: 0.34rem;
508
-  line-height: 40px;
509
-  text-align: center;
510
-  color: red;
511
-  }
512
-  }
513
-  }
583
+      .danger_hint {
584
+        font-size: 0.34rem;
585
+        line-height: 40px;
586
+        text-align: center;
587
+        color: red;
588
+      }
589
+    }
514 590
   }
515
-  .popup {
591
+}
592
+.popup {
516 593
   border-radius: 0 !important;
517 594
   top: initial !important;
518
-  }
595
+}
519 596
 </style>
520
-

+ 4 - 0
src/pages/main/dialog/LongDialog.vue Прегледај датотеку

@@ -504,6 +504,9 @@ export default {
504 504
   max-height: 10.6rem;
505 505
   min-height: 5rem;
506 506
   overflow-y: scroll;
507
+   @media only screen and (max-width: 812px) {
508
+    min-height: 8rem !important;
509
+  }
507 510
   ul {
508 511
     li {
509 512
       height: 1rem;
@@ -534,6 +537,7 @@ export default {
534 537
   max-height: 10.6rem;
535 538
   min-height: 5rem;
536 539
   overflow-y: scroll;
540
+  
537 541
   ul {
538 542
     li {
539 543
       line-height: 1rem;

+ 64 - 34
src/pages/main/dialog/TwoMenu.vue Прегледај датотеку

@@ -1,21 +1,36 @@
1 1
 <template>
2 2
   <div class="Dialog" v-show="show">
3 3
     <div class="DialogTit">
4
-      <div class="back" @click="hide()"><span class="iconfont" >&#xe720; </span>返回</div>
4
+      <div class="back" @click="hide()">
5
+        <span class="iconfont">&#xe720; </span>返回
6
+      </div>
5 7
       <h1 class="name">{{ title }}</h1>
6 8
       <!-- <span class="success" @click="handle_selected()">完成</span> -->
7
-      <span  v-if="type == 1" class="success">  </span>
8
-      <span  v-if="type == 2" @click="handle_selected" class="success">确定</span>
9
+      <span v-if="type == 1" class="success"> </span>
10
+      <span v-if="type == 2" @click="handle_selected" class="success"
11
+        >确定</span
12
+      >
9 13
     </div>
10 14
 
11 15
     <div class="optionsBox" v-show="type == 1">
12 16
       <div class="list">
13 17
         <ul>
14
-          <li v-for="(item, i) in single.options" 
15
-          :key="i" 
16
-          :value="single.id_key.lenght == 0 ? item : item[single.id_key]" 
17
-          :class="single.cur_id == (single.id_key.lenght == 0 ? item : item[single.id_key]) ? 'tick':'' "
18
-          @click="single_click(single.id_key.lenght == 0 ? item : item[single.id_key])">
18
+          <li
19
+            v-for="(item, i) in single.options"
20
+            :key="i"
21
+            :value="single.id_key.lenght == 0 ? item : item[single.id_key]"
22
+            :class="
23
+              single.cur_id ==
24
+              (single.id_key.lenght == 0 ? item : item[single.id_key])
25
+                ? 'tick'
26
+                : ''
27
+            "
28
+            @click="
29
+              single_click(
30
+                single.id_key.lenght == 0 ? item : item[single.id_key]
31
+              )
32
+            "
33
+          >
19 34
             {{ single.show_key.lenght == 0 ? item : item[single.show_key] }}
20 35
           </li>
21 36
         </ul>
@@ -25,8 +40,13 @@
25 40
     <div class="CheckBox" v-show="type == 2">
26 41
       <ul>
27 42
         <li>
28
-          <van-checkbox-group v-model="mutable.selected_values"  >
29
-            <van-checkbox style="border-bottom: 1px #e5e5e5 solid;padding: 0 0.38rem;width:100%;" v-for="(item, index) in mutable.options" :key="index" :name="mutable.id_key.lenght == 0 ? item : item[mutable.id_key]">
43
+          <van-checkbox-group v-model="mutable.selected_values">
44
+            <van-checkbox
45
+              style="border-bottom: 1px #e5e5e5 solid;padding: 0 0.38rem;width:100%;"
46
+              v-for="(item, index) in mutable.options"
47
+              :key="index"
48
+              :name="mutable.id_key.lenght == 0 ? item : item[mutable.id_key]"
49
+            >
30 50
               {{ mutable.show_key.lenght == 0 ? item : item[mutable.show_key] }}
31 51
             </van-checkbox>
32 52
           </van-checkbox-group>
@@ -54,28 +74,36 @@ export default {
54 74
         options: [],
55 75
         cur_id: 0,
56 76
         show_key: "",
57
-        id_key: "",
77
+        id_key: ""
58 78
       },
59 79
 
60 80
       mutable: {
61 81
         options: [],
62 82
         selected_values: [],
63 83
         show_key: "",
64
-        id_key: "",
84
+        id_key: ""
65 85
       }
66 86
     };
67 87
   },
68 88
   methods: {
69
-    showSingleSelect(list_options, current_select_id, title, show_key, id_key, handle_select, handle_hide) {
70
-      this.show = true
71
-      this.type = 1
72
-      this.title = title
73
-      this.single.options = list_options
74
-      this.single.cur_id = current_select_id
75
-      this.single.show_key = show_key
76
-      this.single.id_key = id_key
77
-      this.handle_select = handle_select
78
-      this.handle_hide = handle_hide
89
+    showSingleSelect(
90
+      list_options,
91
+      current_select_id,
92
+      title,
93
+      show_key,
94
+      id_key,
95
+      handle_select,
96
+      handle_hide
97
+    ) {
98
+      this.show = true;
99
+      this.type = 1;
100
+      this.title = title;
101
+      this.single.options = list_options;
102
+      this.single.cur_id = current_select_id;
103
+      this.single.show_key = show_key;
104
+      this.single.id_key = id_key;
105
+      this.handle_select = handle_select;
106
+      this.handle_hide = handle_hide;
79 107
     },
80 108
     // showMutableSelect(list_options, selected_values, title, show_key, id_key, handle_select) {
81 109
     //   this.show = true
@@ -89,18 +117,18 @@ export default {
89 117
     // },
90 118
     hide() {
91 119
       if (this.handle_hide != null && this.handle_hide != undefined) {
92
-        this.handle_hide()
120
+        this.handle_hide();
93 121
       }
94
-      this.show = false
122
+      this.show = false;
95 123
     },
96 124
     single_click: function(id) {
97
-      this.single.cur_id = id
98
-      this.finish_selected()
99
-      this.hide()
125
+      this.single.cur_id = id;
126
+      this.finish_selected();
127
+      this.hide();
100 128
     },
101
-    finish_selected: function () {
129
+    finish_selected: function() {
102 130
       if (this.handle_select != null && this.handle_select != undefined) {
103
-        this.handle_select(this.single.cur_id)
131
+        this.handle_select(this.single.cur_id);
104 132
       }
105 133
     }
106 134
   }
@@ -108,16 +136,19 @@ export default {
108 136
 </script>
109 137
 
110 138
 <style style="stylesheet/scss" lang="scss" scoped>
111
-.van-checkbox__icon--checked .van-icon{
139
+.van-checkbox__icon--checked .van-icon {
112 140
   color: #fff;
113
-    border-color:$main-color !important;
114
-    background-color: $main-color !important;
141
+  border-color: $main-color !important;
142
+  background-color: $main-color !important;
115 143
 }
116 144
 .optionsBox {
117 145
   background: #fff;
118 146
   max-height: 10.6rem;
119 147
   min-height: 5rem;
120 148
   overflow-y: scroll;
149
+  @media only screen and (max-width: 812px) {
150
+    min-height: 8rem !important;
151
+  }
121 152
   ul {
122 153
     li {
123 154
       height: 1rem;
@@ -147,7 +178,7 @@ export default {
147 178
   background: #fff;
148 179
   max-height: 10.6rem;
149 180
   min-height: 5rem;
150
-  overflow-y: scroll; 
181
+  overflow-y: scroll;
151 182
   ul {
152 183
     li {
153 184
       line-height: 1rem;
@@ -155,4 +186,3 @@ export default {
155 186
   }
156 187
 }
157 188
 </style>
158
-

+ 276 - 208
src/pages/main/dialog/new_order/select_advice_template_dialog.vue Прегледај датотеку

@@ -1,196 +1,259 @@
1 1
 <template>
2
-    <div v-if="visibility" class="Dialog">
3
-        <div class="DialogTit">
4
-            <div class="back" @click="backAction">
5
-                <span class="iconfont">&#xe720;</span>返回
6
-            </div>
7
-            <h1 class="name">医嘱模板</h1>
8
-            <span class="success" @click="submitAction">完成</span>
9
-        </div>
10
-
11
-        <div class="optionsBox">
12
-            <div>
13
-                <div v-for="(template, index) in templates" :key="index">
14
-                    <div class="template">
15
-                        <div class="template_name">
16
-                            <div v-show="isFold(template.id) && !isTemplateSelectingAllAdvices(template)" class="select_all_btn" @click="selectTemplateAllAdviceAction(template)">全选</div>
17
-                            <div v-show="isFold(template.id) && isTemplateSelectingAllAdvices(template)" class="select_all_btn" @click="cancelSelectTemplateAllAdviceAction(template)">取消全选</div>
2
+  <div v-if="visibility" class="Dialog">
3
+    <div class="DialogTit">
4
+      <div class="back" @click="backAction">
5
+        <span class="iconfont">&#xe720;</span>返回
6
+      </div>
7
+      <h1 class="name">医嘱模板</h1>
8
+      <span class="success" @click="submitAction">完成</span>
9
+    </div>
18 10
 
19
-                            <span v-if="isFold(template.id)" class="iconfont">&#xe749;</span>
20
-                            <span v-if="!isFold(template.id)" class="iconfont">&#xe74a;</span>
21
-                            <div @click="foldTemplateAction(template.id)" class="name">
22
-                                {{ template.name }}
23
-                            </div>
24
-                        </div>
25
-                        <div v-show="isFold(template.id)" class="advice" v-for="(advice, index) in template.DoctorAdviceTemplate" :key="index">
26
-                            <span v-if="advice.parent_id > 0" class="subdrug_info">
27
-                              <span> {{ advice.advice_name }}</span>
28
-                              <span> {{ advice.advice_desc }}{{advice.drug_spec_unit}} </span>
29
-                              <span v-if="advice.prescribing_number"> {{ advice.prescribing_number }} {{ advice.prescribing_number_unit }}</span>
30
-                              <span v-if="advice.single_dose">  单次用量{{ advice.single_dose }}{{ advice.single_dose_unit }}</span>
11
+    <div class="optionsBox">
12
+      <div>
13
+        <div v-for="(template, index) in templates" :key="index">
14
+          <div class="template">
15
+            <div class="template_name">
16
+              <div
17
+                v-show="
18
+                  isFold(template.id) &&
19
+                    !isTemplateSelectingAllAdvices(template)
20
+                "
21
+                class="select_all_btn"
22
+                @click="selectTemplateAllAdviceAction(template)"
23
+              >
24
+                全选
25
+              </div>
26
+              <div
27
+                v-show="
28
+                  isFold(template.id) && isTemplateSelectingAllAdvices(template)
29
+                "
30
+                class="select_all_btn"
31
+                @click="cancelSelectTemplateAllAdviceAction(template)"
32
+              >
33
+                取消全选
34
+              </div>
31 35
 
32
-                            </span>
33
-                            <van-checkbox v-else class="advice_info" :value="isAdviceSelecting(advice.id)" @click="selectAdviceAction(template, advice)">
34
-                              <span> {{ advice.advice_name }}</span>
35
-                              <span> {{ advice.advice_desc }}{{advice.drug_spec_unit}}</span>
36
-                              <span v-if="advice.prescribing_number"> {{ advice.prescribing_number }} {{ advice.prescribing_number_unit }}</span>
37
-                              <span v-if="advice.single_dose">  单次用量{{ advice.single_dose }}{{ advice.single_dose_unit }}</span>
38
-                              <span> {{ advice.delivery_way }} </span>
39
-                              <span> {{ advice.execution_frequency }}</span>
40
-                              <!--{{ advice.advice_name }} {{ advice.advice_desc }} {{ advice.prescribing_number }}{{ advice.prescribing_number_unit }} 单次用量{{ advice.single_dose }}{{ advice.single_dose_unit }} {{ advice.delivery_way }} {{ advice.execution_frequency }}-->
41
-                            </van-checkbox>
42
-                        </div>
43
-                    </div>
44
-                </div>
36
+              <span v-if="isFold(template.id)" class="iconfont">&#xe749;</span>
37
+              <span v-if="!isFold(template.id)" class="iconfont">&#xe74a;</span>
38
+              <div @click="foldTemplateAction(template.id)" class="name">
39
+                {{ template.name }}
40
+              </div>
41
+            </div>
42
+            <div
43
+              v-show="isFold(template.id)"
44
+              class="advice"
45
+              v-for="(advice, index) in template.DoctorAdviceTemplate"
46
+              :key="index"
47
+            >
48
+              <span v-if="advice.parent_id > 0" class="subdrug_info">
49
+                <span> {{ advice.advice_name }}</span>
50
+                <span>
51
+                  {{ advice.advice_desc }}{{ advice.drug_spec_unit }}
52
+                </span>
53
+                <span v-if="advice.prescribing_number">
54
+                  {{ advice.prescribing_number }}
55
+                  {{ advice.prescribing_number_unit }}</span
56
+                >
57
+                <span v-if="advice.single_dose">
58
+                  单次用量{{ advice.single_dose
59
+                  }}{{ advice.single_dose_unit }}</span
60
+                >
61
+              </span>
62
+              <van-checkbox
63
+                v-else
64
+                class="advice_info"
65
+                :value="isAdviceSelecting(advice.id)"
66
+                @click="selectAdviceAction(template, advice)"
67
+              >
68
+                <span> {{ advice.advice_name }}</span>
69
+                <span>
70
+                  {{ advice.advice_desc }}{{ advice.drug_spec_unit }}</span
71
+                >
72
+                <span v-if="advice.prescribing_number">
73
+                  {{ advice.prescribing_number }}
74
+                  {{ advice.prescribing_number_unit }}</span
75
+                >
76
+                <span v-if="advice.single_dose">
77
+                  单次用量{{ advice.single_dose
78
+                  }}{{ advice.single_dose_unit }}</span
79
+                >
80
+                <span> {{ advice.delivery_way }} </span>
81
+                <span> {{ advice.execution_frequency }}</span>
82
+                <!--{{ advice.advice_name }} {{ advice.advice_desc }} {{ advice.prescribing_number }}{{ advice.prescribing_number_unit }} 单次用量{{ advice.single_dose }}{{ advice.single_dose_unit }} {{ advice.delivery_way }} {{ advice.execution_frequency }}-->
83
+              </van-checkbox>
45 84
             </div>
85
+          </div>
46 86
         </div>
87
+      </div>
47 88
     </div>
89
+  </div>
48 90
 </template>
49 91
 
50 92
 <script>
51 93
 export default {
52
-    name: "SelectAdviceTemplate",
53
-    props: {
54
-        visibility: {
55
-            type: Boolean,
56
-            default: false
57
-        },
58
-        templates: {
59
-            type: Array,
60
-            default: () => {
61
-                return []
62
-            }
94
+  name: "SelectAdviceTemplate",
95
+  props: {
96
+    visibility: {
97
+      type: Boolean,
98
+      default: false
99
+    },
100
+    templates: {
101
+      type: Array,
102
+      default: () => {
103
+        return [];
104
+      }
105
+    }
106
+  },
107
+  data() {
108
+    return {
109
+      fold_template_ids: [],
110
+      selecting_advice_ids: []
111
+    };
112
+  },
113
+  methods: {
114
+    backAction: function() {
115
+      this.$emit("back");
116
+    },
117
+    foldTemplateAction: function(template_id) {
118
+      for (let index = 0; index < this.fold_template_ids.length; index++) {
119
+        if (this.fold_template_ids[index] == template_id) {
120
+          this.fold_template_ids.splice(index, 1);
121
+          return;
63 122
         }
123
+      }
124
+      this.fold_template_ids.push(template_id);
64 125
     },
65
-    data() {
66
-        return {
67
-            fold_template_ids: [],
68
-            selecting_advice_ids: [],
126
+    selectAdviceAction: function(template, advice) {
127
+      var isCancelSelect = false;
128
+      for (let index = 0; index < this.selecting_advice_ids.length; index++) {
129
+        if (this.selecting_advice_ids[index].advice_id == advice.id) {
130
+          this.selecting_advice_ids.splice(index, 1);
131
+          isCancelSelect = true;
132
+          break;
69 133
         }
134
+      }
135
+      if (!isCancelSelect) {
136
+        this.selecting_advice_ids.push({
137
+          template_id: template.id,
138
+          advice_id: advice.id
139
+        });
140
+      }
70 141
     },
71
-    methods: {
72
-        backAction: function() {
73
-            this.$emit("back");
74
-        },
75
-        foldTemplateAction: function(template_id) {
76
-            for (let index = 0; index < this.fold_template_ids.length; index++) {
77
-                if (this.fold_template_ids[index] == template_id) {
78
-                    this.fold_template_ids.splice(index, 1)
79
-                    return
80
-                }
81
-            }
82
-            this.fold_template_ids.push(template_id)
83
-        },
84
-        selectAdviceAction: function(template, advice) {
85
-            var isCancelSelect = false;
86
-            for (let index = 0; index < this.selecting_advice_ids.length; index++) {
87
-                if (this.selecting_advice_ids[index].advice_id == advice.id) {
88
-                    this.selecting_advice_ids.splice(index, 1)
89
-                    isCancelSelect = true
90
-                    break
91
-                }
92
-            }
93
-            if (!isCancelSelect) {
94
-                this.selecting_advice_ids.push({ template_id: template.id, advice_id: advice.id })
95
-            }
96
-        },
97
-        selectTemplateAllAdviceAction: function(template) {
98
-            for (let index = 0; index < template.DoctorAdviceTemplate.length; index++) {
99
-                const advice = template.DoctorAdviceTemplate[index];
100
-                if (advice.parent_id > 0) {
101
-                    continue
102
-                }
103
-                var didSelect = false
104
-                for (let s_a_index = 0; s_a_index < this.selecting_advice_ids.length; s_a_index++) {
105
-                    if (this.selecting_advice_ids[s_a_index].advice_id == advice.id) {
106
-                        didSelect = true
107
-                        break
108
-                    }
109
-                }
110
-                if (!didSelect) {
111
-                    this.selecting_advice_ids.push({ template_id: template.id, advice_id: advice.id })
112
-                }
113
-            }
114
-        },
115
-        cancelSelectTemplateAllAdviceAction: function(template) {
116
-            for (let index = this.selecting_advice_ids.length - 1; index >= 0; index--) {
117
-                if (this.selecting_advice_ids[index].template_id == template.id) {
118
-                    this.selecting_advice_ids.splice(index, 1)
119
-                }
120
-            }
121
-        },
122
-        submitAction: function() {
123
-            var advices = []
124
-            // WAIN: 效率低,可以通过在 selecting_advice_ids 加上 template_index 和 advice_index 字段来消除 this.templates 的循环
125
-            for (let t_a_i = 0; t_a_i < this.selecting_advice_ids.length; t_a_i++) {
126
-                const tpl_advice = this.selecting_advice_ids[t_a_i];
127
-                for (let t_i = 0; t_i < this.templates.length; t_i++) {
128
-                    const tpl = this.templates[t_i];
129
-                    if (tpl.id == tpl_advice.template_id) {
130
-                        var child_begin = false
131
-                        for (let a_i = 0; a_i < tpl.DoctorAdviceTemplate.length; a_i++) {
132
-                            const adv = tpl.DoctorAdviceTemplate[a_i];
133
-                            if (adv.id == tpl_advice.advice_id) {
134
-                                advices.push(adv)
135
-                                child_begin = true
136
-
137
-                            } else if (child_begin == true) {
138
-                                if (adv.parent_id == tpl_advice.advice_id) {
139
-                                    advices.push(adv)
140
-                                } else {
141
-                                    break
142
-                                }
143
-                            }
144
-                        }
145
-                    }
142
+    selectTemplateAllAdviceAction: function(template) {
143
+      for (
144
+        let index = 0;
145
+        index < template.DoctorAdviceTemplate.length;
146
+        index++
147
+      ) {
148
+        const advice = template.DoctorAdviceTemplate[index];
149
+        if (advice.parent_id > 0) {
150
+          continue;
151
+        }
152
+        var didSelect = false;
153
+        for (
154
+          let s_a_index = 0;
155
+          s_a_index < this.selecting_advice_ids.length;
156
+          s_a_index++
157
+        ) {
158
+          if (this.selecting_advice_ids[s_a_index].advice_id == advice.id) {
159
+            didSelect = true;
160
+            break;
161
+          }
162
+        }
163
+        if (!didSelect) {
164
+          this.selecting_advice_ids.push({
165
+            template_id: template.id,
166
+            advice_id: advice.id
167
+          });
168
+        }
169
+      }
170
+    },
171
+    cancelSelectTemplateAllAdviceAction: function(template) {
172
+      for (
173
+        let index = this.selecting_advice_ids.length - 1;
174
+        index >= 0;
175
+        index--
176
+      ) {
177
+        if (this.selecting_advice_ids[index].template_id == template.id) {
178
+          this.selecting_advice_ids.splice(index, 1);
179
+        }
180
+      }
181
+    },
182
+    submitAction: function() {
183
+      var advices = [];
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++) {
186
+        const tpl_advice = this.selecting_advice_ids[t_a_i];
187
+        for (let t_i = 0; t_i < this.templates.length; t_i++) {
188
+          const tpl = this.templates[t_i];
189
+          if (tpl.id == tpl_advice.template_id) {
190
+            var child_begin = false;
191
+            for (let a_i = 0; a_i < tpl.DoctorAdviceTemplate.length; a_i++) {
192
+              const adv = tpl.DoctorAdviceTemplate[a_i];
193
+              if (adv.id == tpl_advice.advice_id) {
194
+                advices.push(adv);
195
+                child_begin = true;
196
+              } else if (child_begin == true) {
197
+                if (adv.parent_id == tpl_advice.advice_id) {
198
+                  advices.push(adv);
199
+                } else {
200
+                  break;
146 201
                 }
202
+              }
147 203
             }
148
-            this.$emit("finish", advices)
204
+          }
205
+        }
206
+      }
207
+      this.$emit("finish", advices);
149 208
 
150
-            this.$nextTick(() => {
151
-                this.fold_template_ids = []
152
-                this.selecting_advice_ids = []
153
-            })
154
-        },
209
+      this.$nextTick(() => {
210
+        this.fold_template_ids = [];
211
+        this.selecting_advice_ids = [];
212
+      });
213
+    },
155 214
 
156
-        isFold: function(template_id) {
157
-            for (let index = 0; index < this.fold_template_ids.length; index++) {
158
-                if (this.fold_template_ids[index] == template_id) {
159
-                    return true
160
-                }
161
-            }
162
-            return false
163
-        },
164
-        isAdviceSelecting: function(advice_id) {
165
-            for (let index = 0; index < this.selecting_advice_ids.length; index++) {
166
-                if (this.selecting_advice_ids[index].advice_id == advice_id) {
167
-                    return true
168
-                }
169
-            }
170
-            return false
171
-        },
172
-        isTemplateSelectingAllAdvices: function(template) {
173
-            var count = 0
174
-            for (let t_a_i = 0; t_a_i < this.selecting_advice_ids.length; t_a_i++) {
175
-                if (this.selecting_advice_ids[t_a_i].template_id == template.id) {
176
-                    count ++;
177
-                }
178
-            }
215
+    isFold: function(template_id) {
216
+      for (let index = 0; index < this.fold_template_ids.length; index++) {
217
+        if (this.fold_template_ids[index] == template_id) {
218
+          return true;
219
+        }
220
+      }
221
+      return false;
222
+    },
223
+    isAdviceSelecting: function(advice_id) {
224
+      for (let index = 0; index < this.selecting_advice_ids.length; index++) {
225
+        if (this.selecting_advice_ids[index].advice_id == advice_id) {
226
+          return true;
227
+        }
228
+      }
229
+      return false;
230
+    },
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++) {
234
+        if (this.selecting_advice_ids[t_a_i].template_id == template.id) {
235
+          count++;
236
+        }
237
+      }
179 238
 
180
-            var p_advice_count = 0
181
-            for (let index = 0; index < template.DoctorAdviceTemplate.length; index++) {
182
-                if (template.DoctorAdviceTemplate[index].parent_id == 0) {
183
-                    p_advice_count++;
184
-                }
185
-            }
186
-            if (count < p_advice_count) {
187
-                return false
188
-            } else {
189
-                return true
190
-            }
239
+      var p_advice_count = 0;
240
+      for (
241
+        let index = 0;
242
+        index < template.DoctorAdviceTemplate.length;
243
+        index++
244
+      ) {
245
+        if (template.DoctorAdviceTemplate[index].parent_id == 0) {
246
+          p_advice_count++;
191 247
         }
248
+      }
249
+      if (count < p_advice_count) {
250
+        return false;
251
+      } else {
252
+        return true;
253
+      }
192 254
     }
193
-}
255
+  }
256
+};
194 257
 </script>
195 258
 
196 259
 <style style="stylesheet/scss" lang="scss" scoped>
@@ -199,6 +262,9 @@ export default {
199 262
   max-height: 10.6rem;
200 263
   min-height: 5rem;
201 264
   overflow-y: scroll;
265
+  @media only screen and (max-width: 812px) {
266
+    min-height: 8rem !important;
267
+  }
202 268
   ul {
203 269
     li {
204 270
       height: 1rem;
@@ -225,46 +291,46 @@ export default {
225 291
   }
226 292
 
227 293
   .template {
228
-      border-bottom: 1px #e5e5e5 solid;
294
+    border-bottom: 1px #e5e5e5 solid;
229 295
 
230
-      .template_name {
231
-        height: 1rem;
232
-        line-height: 1rem;
233
-        padding: 0 0.38rem;
296
+    .template_name {
297
+      height: 1rem;
298
+      line-height: 1rem;
299
+      padding: 0 0.38rem;
234 300
 
235
-        .select_all_btn {
236
-            display: inline-block;
237
-            border: 1px #409eff solid;
238
-            color: #409eff;
239
-            font-size: 0.3rem;
240
-            height: 0.5rem;
241
-            line-height: 0.5rem;
242
-            padding: 0 0.1rem;
243
-            margin-right: 0.1rem;
244
-            border-radius: 0.08rem;
245
-        }
246
-        .name {
247
-            display: inline-block;
248
-            width: 80%;
249
-        }
301
+      .select_all_btn {
302
+        display: inline-block;
303
+        border: 1px #409eff solid;
304
+        color: #409eff;
305
+        font-size: 0.3rem;
306
+        height: 0.5rem;
307
+        line-height: 0.5rem;
308
+        padding: 0 0.1rem;
309
+        margin-right: 0.1rem;
310
+        border-radius: 0.08rem;
311
+      }
312
+      .name {
313
+        display: inline-block;
314
+        width: 80%;
250 315
       }
316
+    }
251 317
 
252
-      .advice {
253
-          border-top: 1px #e5e5e5 solid;
254
-          margin-left: 0.38rem;
255
-          color: #445a70;
318
+    .advice {
319
+      border-top: 1px #e5e5e5 solid;
320
+      margin-left: 0.38rem;
321
+      color: #445a70;
256 322
 
257
-          .advice_info {
258
-              height: 1rem;
259
-              line-height: 1rem;
260
-              padding: 0 0.38rem 0 0;
261
-          }
262
-          .subdrug_info {
263
-              height: 1rem;
264
-              line-height: 1rem;
265
-              padding: 0 0.38rem 0 0.9rem;
266
-          }
323
+      .advice_info {
324
+        height: 1rem;
325
+        line-height: 1rem;
326
+        padding: 0 0.38rem 0 0;
327
+      }
328
+      .subdrug_info {
329
+        height: 1rem;
330
+        line-height: 1rem;
331
+        padding: 0 0.38rem 0 0.9rem;
267 332
       }
333
+    }
268 334
   }
269 335
 }
270 336
 .CheckBox {
@@ -272,6 +338,10 @@ export default {
272 338
   max-height: 6.8rem;
273 339
   min-height: 5rem;
274 340
   overflow-y: scroll;
341
+  @media only screen and (max-width: 812px) {
342
+    max-height: 8rem !important;
343
+    min-height: 8rem !important;
344
+  }
275 345
   ul {
276 346
     li {
277 347
       line-height: 1rem;
@@ -279,5 +349,3 @@ export default {
279 349
   }
280 350
 }
281 351
 </style>
282
-
283
-

+ 22 - 5
src/pages/main/dialog/new_order/single_option_dialog.vue Прегледај датотеку

@@ -15,9 +15,19 @@
15 15
           <li
16 16
             @click="itemClick(index)"
17 17
             v-for="(option, index) in options"
18
-            :key="option_key != null && option_key.length > 0 ? option[option_key] : index"
18
+            :key="
19
+              option_key != null && option_key.length > 0
20
+                ? option[option_key]
21
+                : index
22
+            "
19 23
             :class="select_index == index ? 'tick' : ''"
20
-          >{{ option_label_key != null && option_label_key.length > 0 ? option[option_label_key] : option }}</li>
24
+          >
25
+            {{
26
+              option_label_key != null && option_label_key.length > 0
27
+                ? option[option_label_key]
28
+                : option
29
+            }}
30
+          </li>
21 31
         </ul>
22 32
       </div>
23 33
     </div>
@@ -72,10 +82,13 @@ export default {
72 82
 .optionsBox {
73 83
   background: #fff;
74 84
   min-height: 5rem;
85
+  @media only screen and (max-width: 812px) {
86
+    min-height: 8rem !important;
87
+  }
75 88
   ul {
76
-  overflow-y: scroll;
77
-  max-height: 9.0rem;
78
-  li {
89
+    overflow-y: scroll;
90
+    max-height: 9rem;
91
+    li {
79 92
       height: 1rem;
80 93
       line-height: 1rem;
81 94
       border-bottom: 1px #e5e5e5 solid;
@@ -104,6 +117,10 @@ export default {
104 117
   max-height: 6.8rem;
105 118
   min-height: 5rem;
106 119
   overflow-y: scroll;
120
+  @media only screen and (max-width: 812px) {
121
+    max-height: 8rem !important;
122
+    min-height: 8rem !important;
123
+  }
107 124
   ul {
108 125
     li {
109 126
       line-height: 1rem;

+ 49 - 42
src/pages/main/dialog/subMenu/LongDialogMenu.vue Прегледај датотеку

@@ -1,52 +1,57 @@
1 1
 <template>
2
-    <div class="Dialog">
3
-        <div class="DialogTit">
4
-            <span class="iconfont" @click="closeDialog()">&#xe720; 返回</span>
5
-            <h1 class="name">{{title}}</h1>
6
-            <span class="success"></span>
7
-        </div>
2
+  <div class="Dialog">
3
+    <div class="DialogTit">
4
+      <span class="iconfont" @click="closeDialog()">&#xe720; 返回</span>
5
+      <h1 class="name">{{ title }}</h1>
6
+      <span class="success"></span>
7
+    </div>
8 8
 
9
-        <div class="optionsBox">
10
-          <div class="list">
11
-            <ul>
12
-              <li @click="handleClick(item)" v-for="item in optionList" :key="item.id" value="item.id" :class="index == item.id? 'tick':'' ">{{item.name}}</li>
13
-            </ul>
14
-          </div>
15
-        </div>
9
+    <div class="optionsBox">
10
+      <div class="list">
11
+        <ul>
12
+          <li
13
+            @click="handleClick(item)"
14
+            v-for="item in optionList"
15
+            :key="item.id"
16
+            value="item.id"
17
+            :class="index == item.id ? 'tick' : ''"
18
+          >
19
+            {{ item.name }}
20
+          </li>
21
+        </ul>
22
+      </div>
16 23
     </div>
24
+  </div>
17 25
 </template>
18 26
 
19 27
 <script>
20 28
 export default {
21 29
   name: "LongDialogMenu",
22
-  props:{
23
-      title:'',
24
-      index:0,
25
-      option_poro:{
26
-          type:Array,
27
-      },
28
-      show_prop:{
29
-        type: Object,
30
-      },
31
-      show_index:{
32
-        type: Number,
33
-        default:0,
34
-      },
35
-      data_prop:{
36
-
37
-      },
38
-      data_mode:{
39
-        type: String,
40
-      }
41
-
30
+  props: {
31
+    title: "",
32
+    index: 0,
33
+    option_poro: {
34
+      type: Array
35
+    },
36
+    show_prop: {
37
+      type: Object
38
+    },
39
+    show_index: {
40
+      type: Number,
41
+      default: 0
42
+    },
43
+    data_prop: {},
44
+    data_mode: {
45
+      type: String
46
+    }
42 47
   },
43
-  methods:{
44
-    handleClick(item){
48
+  methods: {
49
+    handleClick(item) {
45 50
       switch (this.data_mode) {
46 51
         case "mode":
47 52
           this.data_prop.mode_id = item.id;
48 53
           this.data_prop.mode_name = item.name;
49
-          this.data_prop.mode = item.id;     
54
+          this.data_prop.mode = item.id;
50 55
           break;
51 56
         case "perfusion_apparatus":
52 57
           this.data_prop.perfusion_apparatus = item.id;
@@ -68,23 +73,23 @@ export default {
68 73
           this.data_prop.hemodialysis_machine = item.id;
69 74
           this.data_prop.hemodialysis_machine_name = item.name;
70 75
           break;
71
-      
76
+
72 77
         default:
73 78
           break;
74 79
       }
75 80
       this.show_prop.mode_show[this.show_index] = false;
76 81
       this.show_prop.paden_show = true;
77 82
     },
78
-    closeDialog(){
83
+    closeDialog() {
79 84
       this.show_prop.paden_show = true;
80 85
       this.show_prop.mode_show[this.show_index] = false;
81
-    },
86
+    }
82 87
   },
83 88
   data() {
84 89
     return {
85 90
       // index: 0,
86 91
       optionList: this.option_poro,
87
-      id:this.id_prop,
92
+      id: this.id_prop
88 93
     };
89 94
   }
90 95
 };
@@ -96,6 +101,9 @@ export default {
96 101
   max-height: 10.6rem;
97 102
   min-height: 5rem;
98 103
   overflow-y: scroll;
104
+  @media only screen and (max-width: 812px) {
105
+    min-height: 8rem !important;
106
+  }
99 107
   ul {
100 108
     li {
101 109
       height: 1rem;
@@ -125,7 +133,7 @@ export default {
125 133
   background: #fff;
126 134
   max-height: 10.6rem;
127 135
   min-height: 5rem;
128
-  overflow-y: scroll; 
136
+  overflow-y: scroll;
129 137
   ul {
130 138
     li {
131 139
       line-height: 1rem;
@@ -133,4 +141,3 @@ export default {
133 141
   }
134 142
 }
135 143
 </style>
136
-

+ 32 - 15
src/pages/main/dialog/subMenu/checkBoxSubMenu.vue Прегледај датотеку

@@ -1,20 +1,31 @@
1 1
 <template>
2 2
   <div v-if="visibility" class="Dialog">
3 3
     <div class="DialogTit">
4
-      <div class="back" @click="cancle()"><span class="iconfont" >&#xe720; </span>返回</div>
5
-      <h1 class="name">{{propsForm.title}}</h1>
6
-      <span  v-if="propsForm.isMultiple == 1" @click="comfirm" class="success">  </span>
7
-      <span  v-if="propsForm.isMultiple == 2" @click="comfirm" class="success">确定</span>
8
-
4
+      <div class="back" @click="cancle()">
5
+        <span class="iconfont">&#xe720; </span>返回
6
+      </div>
7
+      <h1 class="name">{{ propsForm.title }}</h1>
8
+      <span v-if="propsForm.isMultiple == 1" @click="comfirm" class="success">
9
+      </span>
10
+      <span v-if="propsForm.isMultiple == 2" @click="comfirm" class="success"
11
+        >确定</span
12
+      >
9 13
     </div>
10 14
 
11 15
     <div v-if="propsForm.isMultiple == 1" class="optionsBox">
12 16
       <div class="list">
13 17
         <ul>
14
-          <li  @click="itemClick(-2)"  :key="-2" value="-2" >请选择</li>
15
-          <li  @click="itemClick(item.id)"  v-for="item in propsForm.optionList" :key="item.id" value="item" :class="propsForm.selectId == item.id? 'tick':'' ">{{item.name}}</li>
18
+          <li @click="itemClick(-2)" :key="-2" value="-2">请选择</li>
19
+          <li
20
+            @click="itemClick(item.id)"
21
+            v-for="item in propsForm.optionList"
22
+            :key="item.id"
23
+            value="item"
24
+            :class="propsForm.selectId == item.id ? 'tick' : ''"
25
+          >
26
+            {{ item.name }}
27
+          </li>
16 28
           <!--<li v-if="propsForm.isHasOther == 1 && this.$store.getters.user.template_info.template_id == 2" @click="itemClick(-1)"  :key="-1" value="-1" :class="propsForm.selectId == -1? 'tick':'' ">其他</li>-->
17
-
18 29
         </ul>
19 30
       </div>
20 31
     </div>
@@ -22,7 +33,7 @@
22 33
     <div v-if="propsForm.isMultiple == 2" class="CheckBox">
23 34
       <ul>
24 35
         <li>
25
-          <van-checkbox-group v-model="propsForm.result" >
36
+          <van-checkbox-group v-model="propsForm.result">
26 37
             <van-checkbox
27 38
               style="border-bottom: 1px #e5e5e5 solid;padding: 0 0.38rem"
28 39
               v-for="(item, index) in propsForm.list"
@@ -79,7 +90,7 @@ export default {
79 90
       return form;
80 91
     },
81 92
     itemClick: function(id) {
82
-      if(id == -2){
93
+      if (id == -2) {
83 94
         this.$emit("menu-empty", this.getValue());
84 95
       }
85 96
       this.propsForm.selectId = id;
@@ -97,18 +108,21 @@ export default {
97 108
 <style style="stylesheet/scss" lang="scss" scoped>
98 109
 .optionsBox {
99 110
   background: #fff;
100
-  max-height: 10.0rem;
111
+  max-height: 10rem;
101 112
   min-height: 5rem;
113
+  @media only screen and (max-width: 812px) {
114
+    min-height: 8rem !important;
115
+  }
102 116
   ul {
103
-  overflow-y: scroll;
104
-  max-height: 9.0rem;
117
+    overflow-y: scroll;
118
+    max-height: 9rem;
105 119
     li {
106 120
       height: 1.1rem;
107 121
       line-height: 1.1rem;
108 122
       border-bottom: 1px #e5e5e5 solid;
109 123
       padding: 0 0.38rem;
110 124
       font-size: 0.36rem;
111
-      color:$title-color;
125
+      color: $title-color;
112 126
     }
113 127
     .tick {
114 128
       position: relative;
@@ -133,6 +147,10 @@ export default {
133 147
   max-height: 6.8rem;
134 148
   min-height: 5rem;
135 149
   overflow-y: scroll;
150
+  @media only screen and (max-width: 812px) {
151
+    max-height: 8rem !important;
152
+    min-height: 8rem !important;
153
+  }
136 154
 
137 155
   ul {
138 156
     li {
@@ -141,4 +159,3 @@ export default {
141 159
   }
142 160
 }
143 161
 </style>
144
-

+ 101 - 88
src/pages/main/dialog/subMenu/newCheckBoxSubMenu.vue Прегледај датотеку

@@ -1,123 +1,136 @@
1 1
 <template>
2 2
   <div v-if="show" class="Dialog">
3 3
     <div class="DialogTit">
4
-      <div class="back" @click="cancle()"><span class="iconfont" >&#xe720; </span>返回</div>
5
-      <h1 class="name">{{propsForm.title}}</h1>
6
-      <span  @click="comfirm" class="success">  </span>
4
+      <div class="back" @click="cancle()">
5
+        <span class="iconfont">&#xe720; </span>返回
6
+      </div>
7
+      <h1 class="name">{{ propsForm.title }}</h1>
8
+      <span @click="comfirm" class="success"> </span>
7 9
     </div>
8
-    <div  class="optionsBox">
10
+    <div class="optionsBox">
9 11
       <div class="list">
10 12
         <ul>
11
-          <li  @click="itemClick(-2)"  :key="-2" value="-2" >请选择</li>
12
-          <li  @click="itemClick(item.id)"  v-for="item in propsForm.optionList" :key="item.id" value="item" :class="propsForm.selectId == item.id? 'tick':'' ">{{item.name}}</li>
13
+          <li @click="itemClick(-2)" :key="-2" value="-2">请选择</li>
14
+          <li
15
+            @click="itemClick(item.id)"
16
+            v-for="item in propsForm.optionList"
17
+            :key="item.id"
18
+            value="item"
19
+            :class="propsForm.selectId == item.id ? 'tick' : ''"
20
+          >
21
+            {{ item.name }}
22
+          </li>
13 23
         </ul>
14 24
       </div>
15 25
     </div>
16 26
   </div>
17 27
 </template>
18 28
 
19
-
20 29
 <script>
21
-
22
-  export default {
23
-    name: "newCheckBoxSubMenu",
24
-    created() {},
25
-    data() {
26
-      return {
27
-        result: [],
28
-        id: 0,
29
-        selectName: ""
30
-      };
30
+export default {
31
+  name: "newCheckBoxSubMenu",
32
+  created() {},
33
+  data() {
34
+    return {
35
+      result: [],
36
+      id: 0,
37
+      selectName: ""
38
+    };
39
+  },
40
+  props: {
41
+    propsForm: {
42
+      type: Object
31 43
     },
32
-    props: {
33
-      propsForm: {
34
-        type: Object
35
-      },
36
-      show: {
37
-        type: Boolean,
38
-        default: false
39
-      }
44
+    show: {
45
+      type: Boolean,
46
+      default: false
47
+    }
48
+  },
49
+  methods: {
50
+    cancle: function() {
51
+      this.$emit("menu-cancle");
52
+    },
53
+    comfirm: function() {
54
+      this.$emit("menu-comfirm", this.getValue());
40 55
     },
41
-    methods: {
42
-      cancle: function() {
43
-        this.$emit("menu-cancle");
44
-      },
45
-      comfirm: function() {
46
-        this.$emit("menu-comfirm", this.getValue());
47
-      },
48
-      getValue: function() {
49
-        let form = {};
50
-        if (this.propsForm.isMultiple == 2) {
51
-          form["type"] = this.propsForm.type;
52
-          form["result"] = this.propsForm.result;
53
-          // form["click_ref"] = this.propsForm.click_ref
54
-        } else {
55
-          form["type"] = this.propsForm.type;
56
-          form["selectId"] = this.propsForm.selectId;
57
-          // form["click_ref"] = this.propsForm.click_ref
58
-        }
59
-        return form;
60
-      },
61
-      itemClick: function(id) {
62
-        if(id == -2){
63
-          this.$emit("menu-empty", this.getValue());
64
-        }
65
-        this.propsForm.selectId = id;
66
-        this.$emit("menu-comfirm", this.getValue());
56
+    getValue: function() {
57
+      let form = {};
58
+      if (this.propsForm.isMultiple == 2) {
59
+        form["type"] = this.propsForm.type;
60
+        form["result"] = this.propsForm.result;
61
+        // form["click_ref"] = this.propsForm.click_ref
62
+      } else {
63
+        form["type"] = this.propsForm.type;
64
+        form["selectId"] = this.propsForm.selectId;
65
+        // form["click_ref"] = this.propsForm.click_ref
67 66
       }
67
+      return form;
68 68
     },
69
-    watch: {
70
-      visibility(val) {
71
-        //初始化数据操作
69
+    itemClick: function(id) {
70
+      if (id == -2) {
71
+        this.$emit("menu-empty", this.getValue());
72 72
       }
73
+      this.propsForm.selectId = id;
74
+      this.$emit("menu-comfirm", this.getValue());
73 75
     }
74
-  };
75
-
76
+  },
77
+  watch: {
78
+    visibility(val) {
79
+      //初始化数据操作
80
+    }
81
+  }
82
+};
76 83
 </script>
77 84
 
78 85
 <style style="stylesheet/scss" lang="scss" scoped>
79
-  .optionsBox {
86
+.optionsBox {
80 87
   background: #fff;
81 88
   max-height: 10.6rem;
82 89
   min-height: 5rem;
83 90
   overflow-y: scroll;
84
-  ul {
85
-  li {
86
-  height: 1.1rem;
87
-  line-height: 1.1rem;
88
-  border-bottom: 1px #e5e5e5 solid;
89
-  padding: 0 0.38rem;
90
-  font-size: 0.36rem;
91
-  color:$title-color;
92
-  }
93
-  .tick {
94
-  position: relative;
95
-  &::before {
96
-  content: "";
97
-  display: inline-block;
98
-  border: 2px solid $main-color;
99
-  border-top-width: 0;
100
-  border-right-width: 0;
101
-  width: 0.3rem;
102
-  height: 0.15rem;
103
-  -webkit-transform: rotate(-50deg);
104
-  position: absolute;
105
-  top: 0.38rem;
106
-  right: 0.44rem;
107
-  }
108
-  }
91
+  @media only screen and (max-width: 812px) {
92
+    min-height: 8rem !important;
109 93
   }
94
+  ul {
95
+    li {
96
+      height: 1.1rem;
97
+      line-height: 1.1rem;
98
+      border-bottom: 1px #e5e5e5 solid;
99
+      padding: 0 0.38rem;
100
+      font-size: 0.36rem;
101
+      color: $title-color;
102
+    }
103
+    .tick {
104
+      position: relative;
105
+      &::before {
106
+        content: "";
107
+        display: inline-block;
108
+        border: 2px solid $main-color;
109
+        border-top-width: 0;
110
+        border-right-width: 0;
111
+        width: 0.3rem;
112
+        height: 0.15rem;
113
+        -webkit-transform: rotate(-50deg);
114
+        position: absolute;
115
+        top: 0.38rem;
116
+        right: 0.44rem;
117
+      }
118
+    }
110 119
   }
111
-  .CheckBox {
120
+}
121
+.CheckBox {
112 122
   background: #fff;
113 123
   max-height: 6.8rem;
114 124
   min-height: 5rem;
115 125
   overflow-y: scroll;
116
-
117
-  ul {
118
-  li {
119
-  line-height: 1rem;
120
-  }
126
+  @media only screen and (max-width: 812px) {
127
+    max-height: 8rem !important;
128
+    min-height: 8rem !important;
121 129
   }
130
+  ul {
131
+    li {
132
+      line-height: 1rem;
133
+    }
122 134
   }
135
+}
123 136
 </style>

+ 16 - 7
src/pages/main/records/CaseHistory.vue Прегледај датотеку

@@ -2,14 +2,21 @@
2 2
   <div>
3 3
     <div class="nav">
4 4
       <ul style="width: 30%">
5
-        <li  v-for="(item,i) in ['基本信息','检验检查','医嘱']" :key="i" :class="index == i? 'active':'' "  @click="ClickTab(i,item)" >{{item}}</li>
5
+        <li
6
+          v-for="(item, i) in ['基本信息', '检验检查', '医嘱']"
7
+          :key="i"
8
+          :class="index == i ? 'active' : ''"
9
+          @click="ClickTab(i, item)"
10
+        >
11
+          {{ item }}
12
+        </li>
6 13
       </ul>
7 14
     </div>
8 15
 
9 16
     <div class="tab-content">
10
-      <records-tab  v-show="index==0"  ></records-tab>
11
-      <check-tab v-show="index==1" ref="item"></check-tab>
12
-      <advice-table v-show="index==2"></advice-table>
17
+      <records-tab v-show="index == 0"></records-tab>
18
+      <check-tab v-show="index == 1" ref="item"></check-tab>
19
+      <advice-table v-show="index == 2"></advice-table>
13 20
     </div>
14 21
   </div>
15 22
 </template>
@@ -65,13 +72,16 @@ export default {
65 72
 <style style="stylesheet/scss" lang="scss" scoped>
66 73
 .nav {
67 74
   border-bottom: 1px #e5e5e5 solid;
68
-    position: fixed;
75
+  position: fixed;
69 76
   top: 63px;
70 77
   right: 0;
71 78
   z-index: 66;
72 79
   left: 1.58rem;
73 80
   background: #fff;
74
-    background: #fff;
81
+  background: #fff;
82
+  @media only screen and (max-width: 812px) {
83
+    top: 45px !important;
84
+  }
75 85
   ul {
76 86
     width: 60%;
77 87
     margin: 0 auto;
@@ -103,4 +113,3 @@ export default {
103 113
   }
104 114
 }
105 115
 </style>
106
-

+ 133 - 41
src/pages/monitoring/index.vue Прегледај датотеку

@@ -3,35 +3,58 @@
3 3
     <side-bar :active_index="1"></side-bar>
4 4
     <div class="mainContent">
5 5
       <div class="top">
6
-        <div class="hospital" style="width:4.2rem;" ><span style="visibility:hidden"></span></div>
6
+        <div class="hospital" style="width:4.2rem;">
7
+          <span style="visibility:hidden"></span>
8
+        </div>
7 9
         <div class="department">
8 10
           <ul>
9 11
             <li>透析监控</li>
10 12
           </ul>
11 13
         </div>
12 14
         <div class="search">
13
-          <van-field v-model="patient_keyword" ref="search_field" placeholder="透析号/姓名" class="field">
15
+          <van-field
16
+            v-model="patient_keyword"
17
+            ref="search_field"
18
+            placeholder="透析号/姓名"
19
+            class="field"
20
+          >
14 21
             <i class="iconfont" slot="left-icon">&#xe741;</i>
15
-            <van-button slot="button" size="small" type="info" style="border: none;" @click="searchWithKeyword(1)">搜索</van-button>
22
+            <van-button
23
+              slot="button"
24
+              size="small"
25
+              type="info"
26
+              style="border: none;"
27
+              @click="searchWithKeyword(1)"
28
+              >搜索</van-button
29
+            >
16 30
           </van-field>
17 31
         </div>
18 32
       </div>
19 33
 
20 34
       <div class="choice">
21 35
         <ul>
22
-          <el-popover
23
-            v-model="visible"
24
-            placement="bottom"
25
-            trigger="click">
26
-            <li slot="reference">{{partitionName(partition)}}<span class="iconfont">&#xe74a;</span></li>
36
+          <el-popover v-model="visible" placement="bottom" trigger="click">
37
+            <li slot="reference">
38
+              {{ partitionName(partition)
39
+              }}<span class="iconfont">&#xe74a;</span>
40
+            </li>
27 41
             <div class="popover-demo-content">
28
-              <ul >
29
-                <li v-for="item in partitionArr" :key="item.id" @click="itemClick(item.id)" :class="partition == item.id ? 'tick' : ''">{{item.name}}</li>
42
+              <ul>
43
+                <li
44
+                  v-for="item in partitionArr"
45
+                  :key="item.id"
46
+                  @click="itemClick(item.id)"
47
+                  :class="partition == item.id ? 'tick' : ''"
48
+                >
49
+                  {{ item.name }}
50
+                </li>
30 51
               </ul>
31 52
             </div>
32 53
           </el-popover>
33
-          <li @click="openPicker">{{parseTime(date.getTime()/1000, "{y}-{m}-{d}")}}<span
34
-            class="iconfont">&#xe74a;</span></li>
54
+          <li @click="openPicker">
55
+            {{ parseTime(date.getTime() / 1000, "{y}-{m}-{d}")
56
+            }}<span class="iconfont">&#xe74a;</span>
57
+          </li>
35 58
         </ul>
36 59
       </div>
37 60
       <van-list
@@ -40,8 +63,8 @@
40 63
         finished-text="  "
41 64
         @load="onLoad"
42 65
       >
43
-      <div class="blueBorder"></div>
44
-        <table class="table"  >
66
+        <div class="blueBorder"></div>
67
+        <table class="table">
45 68
           <tr>
46 69
             <th width="8%">机号</th>
47 70
             <th width="10%">姓名</th>
@@ -53,9 +76,14 @@
53 76
             <th width="27%">监控预警(血压/心率)</th>
54 77
           </tr>
55 78
         </table>
56
-        <table class="table" v-for="(items,index) in dialysis_scheduals" :key="index">
79
+
80
+        <table
81
+          class="table"
82
+          v-for="(items, index) in dialysis_scheduals"
83
+          :key="index"
84
+        >
57 85
           <tr v-if="items.zone_name.length > 0">
58
-            <td width="8%">{{items.zone_name}}</td>
86
+            <td width="8%">{{ items.zone_name }}</td>
59 87
             <td width="10%"></td>
60 88
             <td width="9%"></td>
61 89
             <td width="13%"></td>
@@ -64,27 +92,75 @@
64 92
             <td width="14%"></td>
65 93
             <td width="27%"></td>
66 94
           </tr>
67
-          <tr v-for="(item,index) in items.scheduals" :key="index" @click="clickfunction(item)">
68
-            <td width="8%">{{item.dialysis_order.device_number.number.length > 0 ? item.dialysis_order.device_number.number:item.device_number.number}}</td>
69
-            <td width="10%" style="color:#409eff;">{{item.patient.name}}</td>
70
-            <td width="9%">{{item.patient.dialysis_no}}</td>
71
-            <td width="13%">{{parseTime(item.schedule_date, "{y}-{m}-{d}")}}</td>
72
-            <td width="10%">{{item.treatment_mode.name}}</td>
73
-            <td width="9%">{{item.prescription.dewater_amount?item.prescription.dewater_amount:""}}</td>
95
+          <tr
96
+            v-for="(item, index) in items.scheduals"
97
+            :key="index"
98
+            @click="clickfunction(item)"
99
+          >
100
+            <td width="8%">
101
+              {{
102
+                item.dialysis_order.device_number.number.length > 0
103
+                  ? item.dialysis_order.device_number.number
104
+                  : item.device_number.number
105
+              }}
106
+            </td>
107
+            <td width="10%" style="color:#409eff;">{{ item.patient.name }}</td>
108
+            <td width="9%">{{ item.patient.dialysis_no }}</td>
109
+            <td width="13%">
110
+              {{ parseTime(item.schedule_date, "{y}-{m}-{d}") }}
111
+            </td>
112
+            <td width="10%">{{ item.treatment_mode.name }}</td>
113
+            <td width="9%">
114
+              {{
115
+                item.prescription.dewater_amount
116
+                  ? item.prescription.dewater_amount
117
+                  : ""
118
+              }}
119
+            </td>
74 120
             <td width="14%">
75
-              {{item.assessment_before_dislysis.weight_before?item.assessment_before_dislysis.weight_before:""}}/{{item.assessment_after_dislysis.weight_after?item.assessment_after_dislysis.weight_after:""}}
121
+              {{
122
+                item.assessment_before_dislysis.weight_before
123
+                  ? item.assessment_before_dislysis.weight_before
124
+                  : ""
125
+              }}/{{
126
+                item.assessment_after_dislysis.weight_after
127
+                  ? item.assessment_after_dislysis.weight_after
128
+                  : ""
129
+              }}
76 130
             </td>
77 131
             <td width="27%">
78
-              <span v-if="monitorBloodPressureStatus(item.monitoring_record) == 1">低压</span>
79
-              <span v-if="monitorBloodPressureStatus(item.monitoring_record) == 2">正常</span>
80
-              <span v-if="monitorBloodPressureStatus(item.monitoring_record) == 3">高压</span>
81
-              <span v-if="monitorRateStatus(item.monitoring_record) == 1">心率过缓</span>
82
-              <span v-if="monitorRateStatus(item.monitoring_record) == 2">正常</span>
83
-              <span v-if="monitorRateStatus(item.monitoring_record) == 3">心率过高</span>
132
+              <span
133
+                v-if="monitorBloodPressureStatus(item.monitoring_record) == 1"
134
+                >低压</span
135
+              >
136
+              <span
137
+                v-if="monitorBloodPressureStatus(item.monitoring_record) == 2"
138
+                >正常</span
139
+              >
140
+              <span
141
+                v-if="monitorBloodPressureStatus(item.monitoring_record) == 3"
142
+                >高压</span
143
+              >
144
+              <span v-if="monitorRateStatus(item.monitoring_record) == 1"
145
+                >心率过缓</span
146
+              >
147
+              <span v-if="monitorRateStatus(item.monitoring_record) == 2"
148
+                >正常</span
149
+              >
150
+              <span v-if="monitorRateStatus(item.monitoring_record) == 3"
151
+                >心率过高</span
152
+              >
84 153
             </td>
85 154
           </tr>
86 155
         </table>
87
-        <div class="NoData" v-show="dialysis_scheduals.length == 0"><img style="margin-top: 50px; margin-bottom: 50px" src="@/assets/login/data.jpg" alt=""></div>
156
+
157
+        <div class="NoData" v-show="dialysis_scheduals.length == 0">
158
+          <img
159
+            style="margin-top: 50px; margin-bottom: 50px"
160
+            src="@/assets/login/data.jpg"
161
+            alt=""
162
+          />
163
+        </div>
88 164
       </van-list>
89 165
     </div>
90 166
     <mt-datetime-picker
@@ -92,7 +168,8 @@
92 168
       type="date"
93 169
       @confirm="handleDateConfirm"
94 170
       :endDate="new Date()"
95
-      v-model="date">
171
+      v-model="date"
172
+    >
96 173
     </mt-datetime-picker>
97 174
   </div>
98 175
 </template>
@@ -242,11 +319,20 @@ export default {
242 319
       }
243 320
       for (let i = 0; i < val.length; i++) {
244 321
         //舒张压(低压)(diastolic_blood_pressure)    收缩压(高压)(systolic_blood_pressure)
245
-        if (val[i].systolic_blood_pressure >= 140 || val[i].diastolic_blood_pressure >= 90) {
246
-          status = 3;  //高压
247
-        } else if (val[i].diastolic_blood_pressure < 60 || val[i].systolic_blood_pressure < 90) {
322
+        if (
323
+          val[i].systolic_blood_pressure >= 140 ||
324
+          val[i].diastolic_blood_pressure >= 90
325
+        ) {
326
+          status = 3; //高压
327
+        } else if (
328
+          val[i].diastolic_blood_pressure < 60 ||
329
+          val[i].systolic_blood_pressure < 90
330
+        ) {
248 331
           status = 1; //低压
249
-        } else if (val[i].diastolic_blood_pressure >= 60 || val[i].systolic_blood_pressure < 140) {
332
+        } else if (
333
+          val[i].diastolic_blood_pressure >= 60 ||
334
+          val[i].systolic_blood_pressure < 140
335
+        ) {
250 336
           status = 2; //正常
251 337
         }
252 338
 
@@ -354,9 +440,9 @@ export default {
354 440
   .iconfont {
355 441
     font-size: 0.4rem;
356 442
     color: #a8b3ba;
357
-  @media only screen and (max-width: 812px) {
358
-  margin-right: 0 !important;
359
-  }
443
+    @media only screen and (max-width: 812px) {
444
+      margin-right: 0 !important;
445
+    }
360 446
   }
361 447
 }
362 448
 .choice {
@@ -367,6 +453,9 @@ export default {
367 453
   z-index: 66;
368 454
   left: 1.58rem;
369 455
   background: #fff;
456
+  @media only screen and (max-width: 812px) {
457
+    top: 43px !important;
458
+  }
370 459
   ul {
371 460
     @include display-flex;
372 461
     @include align-items-center;
@@ -399,9 +488,12 @@ export default {
399 488
 .table {
400 489
   width: 100%;
401 490
 }
402
-.van-list{
403
-  padding-top:115px;
491
+.van-list {
492
+  padding-top: 115px;
404 493
   background: #fff;
405 494
   min-height: calc(100vh - 1px);
495
+  @media only screen and (max-width: 812px) {
496
+    padding-top: 80px !important;
497
+  }
406 498
 }
407 499
 </style>

+ 94 - 78
src/pages/personal/ElectronicSignature.vue Прегледај датотеку

@@ -11,7 +11,7 @@
11 11
       </h1>
12 12
       <div class="information">
13 13
         <div class="blueBorder"></div>
14
-        <div class="name" v-show="showpan=='canvas'">
14
+        <div class="name" v-show="showpan == 'canvas'">
15 15
           <canvas
16 16
             id="canvas"
17 17
             class="fl"
@@ -25,64 +25,72 @@
25 25
             @touchmove="canvasMove($event)"
26 26
           ></canvas>
27 27
         </div>
28
-        <div class="imagename" v-show="showpan=='image'">
29
-          <img :src="electronicsignature" alt="" srcset="">
28
+        <div class="imagename" v-show="showpan == 'image'">
29
+          <img :src="electronicsignature" alt="" srcset="" />
30 30
         </div>
31 31
         <div class="set">
32 32
           <el-row>
33 33
             <el-button @click="clearCanvas">重写签名</el-button>
34
-            <el-button :disabled="nobeginAction" type="primary" @click="getImageAction">上传签名</el-button>
34
+            <el-button
35
+              :disabled="nobeginAction"
36
+              type="primary"
37
+              @click="getImageAction"
38
+              >上传签名</el-button
39
+            >
35 40
           </el-row>
36 41
         </div>
37 42
       </div>
38 43
     </div>
39 44
     <el-dialog
40
-    title="提示"
41
-    :visible.sync="centerDialogVisible"
42
-    width="70%"
43
-    v-loading="loading"
44
-     element-loading-text="正在保存签名图片"
45
-     element-loading-spinner="el-icon-loading"
46
-    center>
47
-    <vue-cropper
48
-      ref="cropper"
49
-      :src="imgUrl"
50
-      alt="Source Image"
51
-      :cropmove="cropImage"
45
+      title="提示"
46
+      :visible.sync="centerDialogVisible"
47
+      width="70%"
48
+      v-loading="loading"
49
+      element-loading-text="正在保存签名图片"
50
+      element-loading-spinner="el-icon-loading"
51
+      center
52 52
     >
53
-    </vue-cropper>
54
-    <span slot="footer" class="dialog-footer">
55
-      <el-button @click="centerDialogVisible = false">取 消</el-button>
56
-      <el-button type="primary" @click="uploadImage">确 定</el-button>
57
-    </span>
58
-  </el-dialog>
59
-
53
+      <vue-cropper
54
+        ref="cropper"
55
+        :src="imgUrl"
56
+        alt="Source Image"
57
+        :cropmove="cropImage"
58
+      >
59
+      </vue-cropper>
60
+      <span slot="footer" class="dialog-footer">
61
+        <el-button @click="centerDialogVisible = false">取 消</el-button>
62
+        <el-button type="primary" @click="uploadImage">确 定</el-button>
63
+      </span>
64
+    </el-dialog>
60 65
   </div>
61 66
 </template>
62 67
 
63 68
 <script>
64 69
 import SideBar from "@/pages/layout/SideBar";
65 70
 import { getToken } from "@/api/qiniu";
66
-import { GetElectronicSignature, SaveElectronicSignature } from "@/api/admin_user";
67
-import VueCropper from 'vue-cropperjs';
68
-import { Toast  } from 'vant';
71
+import {
72
+  GetElectronicSignature,
73
+  SaveElectronicSignature
74
+} from "@/api/admin_user";
75
+import VueCropper from "vue-cropperjs";
76
+import { Toast } from "vant";
69 77
 
70 78
 export default {
71 79
   name: "ElectronicSignature",
72 80
   components: {
73 81
     VueCropper,
74
-    SideBar,
82
+    SideBar
75 83
   },
76 84
   data() {
77 85
     return {
78
-      showpan:'',
79
-      nobeginAction:true,
80
-      loading:false,
81
-      electronicsignature:'',
82
-      uptoken:"",
86
+      showpan: "",
87
+      nobeginAction: true,
88
+      loading: false,
89
+      electronicsignature: "",
90
+      uptoken: "",
83 91
       avatarUrl2: null,
84
-      centerDialogVisible:false,
85
-      cropper: '',
92
+      centerDialogVisible: false,
93
+      cropper: "",
86 94
       centerDialogVisible: false,
87 95
       colors: [
88 96
         "#fef4ac",
@@ -108,7 +116,7 @@ export default {
108 116
       ],
109 117
       context: {},
110 118
       imgUrl: "",
111
-      uploadImgUrl:'',
119
+      uploadImgUrl: "",
112 120
       canvasMoveUse: false,
113 121
       // 存储当前表面状态数组-上一步
114 122
       preDrawAry: [],
@@ -168,26 +176,27 @@ export default {
168 176
     }
169 177
   },
170 178
   methods: {
171
-    GetElectronicSignature(){
172
-      GetElectronicSignature().then(response=>{
173
-        if(response.data.state==1 && response.data.data.state==1) {
174
-          this.electronicsignature = response.data.data.electronic_signature.url;
175
-          this.showpan = 'image';
176
-        }else {
177
-          this.showpan = 'canvas';
179
+    GetElectronicSignature() {
180
+      GetElectronicSignature().then(response => {
181
+        if (response.data.state == 1 && response.data.data.state == 1) {
182
+          this.electronicsignature =
183
+            response.data.data.electronic_signature.url;
184
+          this.showpan = "image";
185
+        } else {
186
+          this.showpan = "canvas";
178 187
         }
179 188
       });
180 189
     },
181
-    getToken(){
190
+    getToken() {
182 191
       getToken().then(response => {
183
-        if(response.data.state==1) {
192
+        if (response.data.state == 1) {
184 193
           this.uptoken = response.data.data.uptoken;
185 194
         }
186 195
       });
187 196
     },
188
-    cropImage(event){
197
+    cropImage(event) {
189 198
       var dataurl = this.$refs.cropper.getCroppedCanvas();
190
-      var rectImage = dataurl.toDataURL('image/png');
199
+      var rectImage = dataurl.toDataURL("image/png");
191 200
       this.uploadImgUrl = rectImage;
192 201
     },
193 202
     isPc() {
@@ -287,65 +296,62 @@ export default {
287 296
         this.context.canvas.width,
288 297
         this.context.canvas.height
289 298
       );
290
-      
299
+
291 300
       this.context.fillStyle = this.config.fillStyle;
292 301
       this.context.fillRect(0, 0, 600, 400);
293
-      
302
+
294 303
       this.preDrawAry = [];
295 304
       this.nextDrawAry = [];
296 305
       this.middleAry = [this.middleAry[0]];
297 306
       this.nobeginAction = true;
298
-      this.showpan = 'canvas';
307
+      this.showpan = "canvas";
299 308
     },
300 309
     getImageAction() {
301 310
       this.getImage();
302 311
       this.centerDialogVisible = true;
303 312
 
304
-      if(typeof(this.$refs.cropper)!= 'undefined') {
313
+      if (typeof this.$refs.cropper != "undefined") {
305 314
         this.$refs.cropper.replace(this.imgUrl);
306 315
       }
307
-
308 316
     },
309
-    uploadImage(){
310
-      
317
+    uploadImage() {
311 318
       var dataurl = this.$refs.cropper.getCroppedCanvas();
312
-      var rectImage = dataurl.toDataURL('image/png');
319
+      var rectImage = dataurl.toDataURL("image/png");
313 320
       this.uploadImgUrl = rectImage;
314 321
 
315
-      if(typeof(this.uploadImgUrl) == 'undefined') {
316
-        Toast.fail('获取截图资源失败');
317
-        return  false;
322
+      if (typeof this.uploadImgUrl == "undefined") {
323
+        Toast.fail("获取截图资源失败");
324
+        return false;
318 325
       }
319
-      if(this.uptoken == '') {
320
-        Toast.fail('七牛上传token无效,无法上传');
321
-        return  false;
326
+      if (this.uptoken == "") {
327
+        Toast.fail("七牛上传token无效,无法上传");
328
+        return false;
322 329
       }
323 330
 
324 331
       this.loading = true;
325
-      var _this=this;
326
-      var pic = this.uploadImgUrl.split(',')[1];
332
+      var _this = this;
333
+      var pic = this.uploadImgUrl.split(",")[1];
327 334
       var url = "https://upload.qiniup.com/putb64/-1";
328 335
       var xhr = new XMLHttpRequest();
329 336
       xhr.onreadystatechange = function() {
330
-
331 337
         if (xhr.readyState == 4) {
332 338
           var returnData = JSON.parse(xhr.responseText);
333
-          SaveElectronicSignature(returnData).then(response=>{
334
-            if(response.data.state==1) {
335
-              _this.electronicsignature = response.data.data.electronic_signature.url;
336
-              _this.showpan = 'image';
339
+          SaveElectronicSignature(returnData).then(response => {
340
+            if (response.data.state == 1) {
341
+              _this.electronicsignature =
342
+                response.data.data.electronic_signature.url;
343
+              _this.showpan = "image";
337 344
               _this.nobeginAction = true;
338 345
               _this.centerDialogVisible = false;
339
-              Toast.success('成功');
346
+              Toast.success("成功");
340 347
               // _this.$router.push({path: "/my"})
341
-            }else {
342
-              Toast.fail('保存图片时失败');
343
-              
348
+            } else {
349
+              Toast.fail("保存图片时失败");
344 350
             }
345 351
           });
346 352
           _this.loading = false;
347 353
         }
348
-      }
354
+      };
349 355
       xhr.open("POST", url, true);
350 356
       xhr.setRequestHeader("Content-Type", "application/octet-stream");
351 357
       xhr.setRequestHeader("Authorization", "UpToken " + _this.uptoken);
@@ -399,12 +405,12 @@ export default {
399 405
   .information {
400 406
     width: 100%;
401 407
     margin: 0 auto;
402
-    .imagename{
403
-        width: 600px;
404
-        margin: 0 auto;
405
-        text-align: center;
406
-        padding: 10px 0;
407
-        background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC');
408
+    .imagename {
409
+      width: 600px;
410
+      margin: 0 auto;
411
+      text-align: center;
412
+      padding: 10px 0;
413
+      background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC");
408 414
     }
409 415
     .name {
410 416
       background: #fff;
@@ -412,6 +418,10 @@ export default {
412 418
       height: 400px;
413 419
       margin: 0 auto;
414 420
       border-radius: 4px;
421
+      @media only screen and (max-width: 812px) {
422
+        width: 500px !important;
423
+        height: 200px !important;
424
+      }
415 425
       .item {
416 426
         padding: 0.37rem 0.4rem;
417 427
         @include align-items-center;
@@ -446,4 +456,10 @@ export default {
446 456
     }
447 457
   }
448 458
 }
459
+.fl {
460
+  @media only screen and (max-width: 812px) {
461
+    width: 500px !important;
462
+    height: 200px !important;
463
+  }
464
+}
449 465
 </style>

+ 10 - 1
src/styles/media.scss Прегледај датотеку

@@ -1,6 +1,6 @@
1 1
 @media only screen and (max-width: 812px) {
2 2
   html {
3
-    font-size: 25px;
3
+    font-size: 29px;
4 4
   }
5 5
 }
6 6
 
@@ -10,3 +10,12 @@
10 10
 //     font-size: 50px;
11 11
 //   }
12 12
 // }
13
+
14
+@media screen and (orientation: portrait) and (max-width: 640px) {
15
+  // .mainBox {
16
+  //   -webkit-transform: rotate(-90deg);
17
+  //   -moz-transform: rotate(-90deg);
18
+  //   -ms-transform: rotate(-90deg);
19
+  //   transform: rotate(-90deg);
20
+  // }
21
+}

+ 96 - 67
src/styles/style.scss Прегледај датотеку

@@ -201,8 +201,8 @@
201 201
   @include justify-content-around;
202 202
   background: #fff;
203 203
   span {
204
-    height: 0.60rem;
205
-    line-height: 0.60rem;
204
+    height: 0.6rem;
205
+    line-height: 0.6rem;
206 206
     background: #fff;
207 207
     border-radius: 50px;
208 208
     border: 1px $border-color solid;
@@ -352,16 +352,27 @@
352 352
   width: 0.25rem;
353 353
   height: 0.25rem;
354 354
   background-color: #fff;
355
+  @media only screen and (max-width: 812px) {
356
+    width: 0 !important;
357
+    height: 0 !important;
358
+    background-color: transparent !important;
359
+  }
355 360
 }
356 361
 
357 362
 ::-webkit-scrollbar-track {
358 363
   -webkit-box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
359 364
   background-color: #fff;
365
+  @media only screen and (max-width: 812px) {
366
+    background-color: transparent !important;
367
+  }
360 368
 }
361 369
 
362 370
 ::-webkit-scrollbar-thumb {
363 371
   -webkit-box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
364 372
   background-color: #e5e5e5;
373
+  @media only screen and (max-width: 812px) {
374
+    background-color: transparent !important;
375
+  }
365 376
 }
366 377
 
367 378
 // 弹窗样式
@@ -391,6 +402,9 @@
391 402
         font-size: 0.5rem;
392 403
         color: $main-color;
393 404
         font-weight: bold;
405
+        @media only screen and (max-width: 812px) {
406
+          font-size: 0.34rem !important;
407
+        }
394 408
       }
395 409
       .back {
396 410
         font-size: 0.36rem;
@@ -427,6 +441,9 @@
427 441
       height: 6.8rem;
428 442
       overflow-y: scroll;
429 443
       background: #fff;
444
+      @media only screen and (max-width: 812px) {
445
+        height: 8.8rem !important;
446
+      }
430 447
       .item {
431 448
         padding: 0 0.32rem;
432 449
         border-bottom: 1px #e5e5e5 solid;
@@ -551,12 +568,12 @@
551 568
   color: #fff;
552 569
   border-color: $main-color !important;
553 570
   background-color: $main-color !important;
554
-   @media only screen and (max-width: 812px) {
555
-      font-size: 14px !important;
556
-      line-height: 16px !important;
557
-      width: 16px !important;
558
-      height: 16px !important;
559
-    }
571
+  @media only screen and (max-width: 812px) {
572
+    font-size: 14px !important;
573
+    line-height: 16px !important;
574
+    width: 16px !important;
575
+    height: 16px !important;
576
+  }
560 577
 }
561 578
 
562 579
 .van-checkbox__icon .van-icon {
@@ -571,9 +588,9 @@
571 588
 .CheckBox .van-checkbox__label {
572 589
   width: 94%;
573 590
   font-size: 0.34rem;
574
-   @media only screen and (max-width: 812px) {
575
-      width: 90%;
576
-    }
591
+  @media only screen and (max-width: 812px) {
592
+    width: 90%;
593
+  }
577 594
 }
578 595
 
579 596
 .mint-datetime-action {
@@ -588,8 +605,8 @@
588 605
   width: 100%;
589 606
   text-align: center;
590 607
   background: #fff;
591
-  padding:0.3rem 0;
592
-  display:flex;
608
+  padding: 0.3rem 0;
609
+  display: flex;
593 610
   align-items: center;
594 611
   justify-content: center;
595 612
   text-align: center;
@@ -597,8 +614,8 @@
597 614
     width: 180px;
598 615
   }
599 616
 }
600
-.el-popper{
601
-  margin-top: 0!important;
617
+.el-popper {
618
+  margin-top: 0 !important;
602 619
 }
603 620
 
604 621
 .CheckBox,
@@ -645,57 +662,62 @@
645 662
 
646 663
 .el-form-item__label {
647 664
   font-size: 0.34rem !important; // width: 90px !important;
665
+  @media only screen and (max-width: 812px) {
666
+    text-align: left !important;
667
+  }
648 668
 }
649 669
 
650 670
 .el-radio__label {
651 671
   font-size: 0.32rem !important;
652 672
 }
653 673
 
654
-.el-radio+.el-radio {
674
+.el-radio + .el-radio {
655 675
   margin-left: 15px !important;
676
+  @media only screen and (max-width: 812px) {
677
+    margin-left: 0 !important;
678
+  }
656 679
 }
657 680
 
658
-
659
-.el-button--mini{
681
+.el-button--mini {
660 682
   font-size: 0.32rem !important;
661 683
 }
662
-.el-form-item__label,.el-radio,.van-checkbox__label {
663
-  color: $title-color!important;
684
+.el-form-item__label,
685
+.el-radio,
686
+.van-checkbox__label {
687
+  color: $title-color !important;
664 688
 }
665 689
 
666
-
667
-.el-collapse-item__header{
668
-  font-size: 0.35rem!important;
669
-  color: $pgh-color!important;
670
-  height: 64px!important;
671
-  line-height: 64px!important;
672
-   @media only screen and (max-width: 812px) {
673
-      font-size: 0.35rem !important;
674
-      color: $pgh-color !important;
675
-      height: 48px !important;
676
-      line-height: 48px !important;
677
-    }
690
+.el-collapse-item__header {
691
+  font-size: 0.35rem !important;
692
+  color: $pgh-color !important;
693
+  height: 64px !important;
694
+  line-height: 64px !important;
695
+  @media only screen and (max-width: 812px) {
696
+    font-size: 0.35rem !important;
697
+    color: $pgh-color !important;
698
+    height: 48px !important;
699
+    line-height: 48px !important;
700
+  }
678 701
 }
679
-.el-collapse-item__arrow{
680
-  color: #a8b3ba!important;
681
-  line-height: 64px!important;
682
-    @media only screen and (max-width: 812px) {
683
-      line-height: 48px !important;
684
-    }
702
+.el-collapse-item__arrow {
703
+  color: #a8b3ba !important;
704
+  line-height: 64px !important;
705
+  @media only screen and (max-width: 812px) {
706
+    line-height: 48px !important;
707
+  }
685 708
 }
686 709
 
687
-
688 710
 // 搜索全局
689 711
 .search {
690 712
   color: #a8b3ba;
691 713
   width: 4.2rem;
692 714
   float: right;
693 715
   font-size: 0.34rem;
694
-   .field {
695
-      @media only screen and (max-width: 812px) {
696
-        margin-top: 6px;
697
-      }
716
+  .field {
717
+    @media only screen and (max-width: 812px) {
718
+      margin-top: 6px;
698 719
     }
720
+  }
699 721
   .iconfont {
700 722
     color: #a8b3ba;
701 723
     font-size: 0.42rem;
@@ -706,8 +728,8 @@
706 728
     border-radius: 30px;
707 729
     display: flex;
708 730
     align-items: center;
709
-    height: 0.64rem!important;
710
-    line-height: 0.64rem!important;
731
+    height: 0.64rem !important;
732
+    line-height: 0.64rem !important;
711 733
     @media only screen and (max-width: 812px) {
712 734
       padding: 0 0 0 4px;
713 735
     }
@@ -740,7 +762,16 @@
740 762
     font-size: 16px !important;
741 763
   }
742 764
 }
743
-
765
+.picker-toolbar {
766
+  @media only screen and (max-width: 812px) {
767
+    height: 30px !important;
768
+  }
769
+}
770
+.mint-datetime-action {
771
+  @media only screen and (max-width: 812px) {
772
+    line-height: 30px !important;
773
+  }
774
+}
744 775
 
745 776
 // 返回
746 777
 .goBack {
@@ -764,32 +795,32 @@
764 795
   }
765 796
 }
766 797
 
767
-.van-button--small{
768
-  font-size: 0.28rem!important;
798
+.van-button--small {
799
+  font-size: 0.28rem !important;
769 800
   @media only screen and (max-width: 812px) {
770
-      min-width: 36px !important;
771
-    }
801
+    min-width: 36px !important;
802
+  }
772 803
 }
773 804
 
774
-.el-input{
775
-  color: #1b2631!important;
776
-  font-size: 0.36rem!important;
805
+.el-input {
806
+  color: #1b2631 !important;
807
+  font-size: 0.36rem !important;
777 808
 }
778 809
 
779
-.el-collapse-item__content{
780
-  height: 7.4rem!important;
781
-    overflow-y: auto!important;
810
+.el-collapse-item__content {
811
+  height: 7.4rem !important;
812
+  overflow-y: auto !important;
782 813
 }
783 814
 
784 815
 // 顶部导航固定
785 816
 .top,
786
-.top_row{
787
-  position: fixed!important;
788
-    top: 0;
789
-    left: 1.58rem;
790
-    right: 0;
791
-    z-index: 1000;
792
-    background: #fff;
817
+.top_row {
818
+  position: fixed !important;
819
+  top: 0;
820
+  left: 1.58rem;
821
+  right: 0;
822
+  z-index: 1000;
823
+  background: #fff;
793 824
 }
794 825
 // .choice,
795 826
 // .screening{
@@ -800,11 +831,9 @@
800 831
 //   left: 1.58rem;
801 832
 //   background: #fff;
802 833
 // }
803
-.stateBox{
804
-  padding-top:115px;
834
+.stateBox {
835
+  padding-top: 115px;
805 836
   background: #fff;
806 837
   min-height: calc(100vh - 2px);
807 838
   padding-left: 0.45rem;
808 839
 }
809
-
810
-