Browse Source

修改样式

See999 4 years ago
parent
commit
ffd71ee372

+ 27 - 25
src/main.js View File

@@ -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
+});

+ 18 - 8
src/pages/advice/AdvicePage.vue View File

@@ -9,30 +9,37 @@
9 9
       <van-col :span="8">
10 10
         <div class="department">
11 11
           <ul>
12
-            <li v-for="(item,i) in ['透析临嘱','普通医嘱']" :key="i" :class="index == i? 'active':'' " @click="ClickTab(i)" >{{item}}</li>
12
+            <li
13
+              v-for="(item,i) in ['透析临嘱','普通医嘱']"
14
+              :key="i"
15
+              :class="index == i? 'active':'' "
16
+              @click="ClickTab(i)"
17
+            >{{item}}</li>
13 18
           </ul>
14 19
         </div>
15 20
       </van-col>
16 21
 
17
-
18 22
       <van-col :span="5">
19
-        <router-link to="/add_urgent_schedule">
20
-        </router-link>
23
+        <router-link to="/add_urgent_schedule"></router-link>
21 24
         <div class="search" style="visibility: hidden">
22 25
           <van-field v-model="search_input" ref="search_field" placeholder="透析号/姓名" class="field">
23 26
             <i class="iconfont" slot="left-icon">&#xe741;</i>
24
-            <van-button slot="button" size="small" type="info" style="border: none;" @click="searchWithKeyword">搜索</van-button>
27
+            <van-button
28
+              slot="button"
29
+              size="small"
30
+              type="info"
31
+              style="border: none;"
32
+              @click="searchWithKeyword"
33
+            >搜索</van-button>
25 34
           </van-field>
26 35
         </div>
27 36
       </van-col>
28 37
     </van-row>
29 38
 
30
-
31 39
     <div class="area">
32
-      <DialysisAdviceTable v-show="index==0"> </DialysisAdviceTable>
40
+      <DialysisAdviceTable v-show="index==0"></DialysisAdviceTable>
33 41
       <NormalAdviceTable v-show="index==1"></NormalAdviceTable>
34 42
     </div>
35
-
36 43
   </div>
37 44
 </template>
38 45
 
@@ -122,6 +129,9 @@ export default {
122 129
   float: right;
123 130
   background-color: #ff7978;
124 131
   border: none;
132
+  @media only screen and (max-width: 812px) {
133
+    min-width: 60px !important;
134
+  }
125 135
 }
126 136
 </style>
127 137
 

+ 73 - 62
src/pages/main/DetailsPage.vue View File

@@ -1,52 +1,54 @@
1 1
 <template>
2
-    <div class="mainBox">
3
-        <side-bar :active_index="0"></side-bar>
4
-        <div class="mainContent">
5
-            <div class="navigation">
6
-                <div class="goBack">
7
-                    <span class="back" @click="backAction()"><span class="iconfont">&#xe720;</span>返回</span>
8
-                    <el-popover
9
-                      placement="bottom"
10
-                      trigger="click" :disabled="true">
11
-                      <li slot="reference" class="name">{{ patient_name }}</li>
12
-                    </el-popover>
13
-                </div>
14
-                <div class="nav">
15
-                  <ul>
16
-                     <li v-for="(item,i) in ['病历','透析','今日']" :key="i" :class="index == i? 'active':'' " @click="ClickTab(i)" >{{item}}</li>
17
-                  </ul>
18
-                </div>
2
+  <div class="mainBox">
3
+    <side-bar :active_index="0"></side-bar>
4
+    <div class="mainContent">
5
+      <div class="navigation">
6
+        <div class="goBack">
7
+          <span class="back" @click="backAction()">
8
+            <span class="iconfont">&#xe720;</span>返回
9
+          </span>
10
+          <el-popover placement="bottom" trigger="click" :disabled="true">
11
+            <li slot="reference" class="name">{{ patient_name }}</li>
12
+          </el-popover>
13
+        </div>
14
+        <div class="nav">
15
+          <ul>
16
+            <li
17
+              v-for="(item,i) in ['病历','透析','今日']"
18
+              :key="i"
19
+              :class="index == i? 'active':'' "
20
+              @click="ClickTab(i)"
21
+            >{{item}}</li>
22
+          </ul>
23
+        </div>
19 24
 
20
-                <!-- <div @click="openPicker()" class="time">
25
+        <!-- <div @click="openPicker()" class="time">
21 26
                   {{pickerVisible}}<span class="iconfont">&#xe74a;</span>
22
-                </div> -->
23
-                <!-- <div class="time" style="width:1.49rem;">
27
+        </div>-->
28
+        <!-- <div class="time" style="width:1.49rem;">
24 29
                   <span class="iconfont">2018-01-01&#xe74a;</span>
25
-                </div> -->
26
-
27
-              <div class="print" style="float: right">
28
-                <el-button size="mini" type="primary" @click="print" icon="el-icon-printer">打印</el-button>
29
-              </div>
30
-
31
-            </div>
32
-            <div class="Tab">
33
-              <CaseHistory v-show="index==0" title="病历"></CaseHistory>
34
-              <!--<check-tab v-show="index==1" title="化验单"></check-tab>-->
35
-              <dialysis-tab v-show="index==1" title="透析" v-on:records="jump(val)"></dialysis-tab>
36
-              <today-tab ref="today" v-show="index==2" title="今日" ></today-tab>
37
-            </div>
38
-
30
+        </div>-->
39 31
 
32
+        <div class="print" style="float: right">
33
+          <el-button size="mini" type="primary" @click="print" icon="el-icon-printer">打印</el-button>
40 34
         </div>
41
-         <!-- <mt-datetime-picker
35
+      </div>
36
+      <div class="Tab">
37
+        <CaseHistory v-show="index==0" title="病历"></CaseHistory>
38
+        <!--<check-tab v-show="index==1" title="化验单"></check-tab>-->
39
+        <dialysis-tab v-show="index==1" title="透析" v-on:records="jump(val)"></dialysis-tab>
40
+        <today-tab ref="today" v-show="index==2" title="今日"></today-tab>
41
+      </div>
42
+    </div>
43
+    <!-- <mt-datetime-picker
42 44
             v-model="pickerVisible"
43 45
             type="date"
44 46
             ref="picker"
45 47
             year-format="{value} "
46 48
             month-format="{value} "
47 49
             date-format="{value} ">
48
-        </mt-datetime-picker> -->
49
-    </div>
50
+    </mt-datetime-picker>-->
51
+  </div>
50 52
 </template>
51 53
 
52 54
 <script>
@@ -56,9 +58,9 @@ import DialysisTab from "./dialysis/DialysisTab";
56 58
 import RecordsTab from "./records/RecordsTab";
57 59
 import { Popover } from "vux";
58 60
 import CheckTab from "./dialysis/CheckTab";
59
-import {parseTime} from "@/utils"
60
-import {GetPatientInfoWithDiseases} from "@/api/patient";
61
-import { Toast } from 'vant';
61
+import { parseTime } from "@/utils";
62
+import { GetPatientInfoWithDiseases } from "@/api/patient";
63
+import { Toast } from "vant";
62 64
 import CaseHistory from "./records/CaseHistory";
63 65
 
64 66
 export default {
@@ -70,7 +72,7 @@ export default {
70 72
     TodayTab,
71 73
     DialysisTab,
72 74
     RecordsTab,
73
-    Popover,
75
+    Popover
74 76
   },
75 77
   data() {
76 78
     return {
@@ -79,7 +81,7 @@ export default {
79 81
       patient_name: "",
80 82
       date: 0,
81 83
       index: 2,
82
-      patient: null,
84
+      patient: null
83 85
     };
84 86
   },
85 87
   created() {
@@ -100,27 +102,33 @@ export default {
100 102
     },
101 103
     openPicker() {
102 104
       this.$refs.picker.open();
103
-    },print:function () {
104
-      var xtdate = parseTime(this.date, "{y}-{m}-{d}")
105
-      if(this.patient != null){
106
-        this.$router.push('/Print?xtdate='+xtdate+'&xtno='+this.patient.dialysis_no);
105
+    },
106
+    print: function() {
107
+      var xtdate = parseTime(this.date, "{y}-{m}-{d}");
108
+      if (this.patient != null) {
109
+        this.$router.push(
110
+          "/Print?xtdate=" + xtdate + "&xtno=" + this.patient.dialysis_no
111
+        );
107 112
       }
108
-    },GetPatientInfoWithDiseases(id) {
109
-      GetPatientInfoWithDiseases(id).then(response=>{
110
-        if (response.data.state==1) {
111
-          this.patient = response.data.data.patient;
112
-        }else {
113
+    },
114
+    GetPatientInfoWithDiseases(id) {
115
+      GetPatientInfoWithDiseases(id)
116
+        .then(response => {
117
+          if (response.data.state == 1) {
118
+            this.patient = response.data.data.patient;
119
+          } else {
120
+            Toast.fail("网络异常");
121
+            return false;
122
+          }
123
+        })
124
+        .catch(() => {
125
+          // on cancel
113 126
           Toast.fail("网络异常");
114 127
           return false;
115
-        }
116
-      }).catch(() => {
117
-        // on cancel
118
-        Toast.fail("网络异常");
119
-        return false;
120
-      });
121
-    },jump:function (val) {
122
-      this.index = 2
123
-
128
+        });
129
+    },
130
+    jump: function(val) {
131
+      this.index = 2;
124 132
     }
125 133
   }
126 134
 };
@@ -139,11 +147,11 @@ export default {
139 147
     border-bottom: 1px #e5e5e5 solid;
140 148
     position: fixed;
141 149
     top: 0;
142
-    left:1.58rem;
150
+    left: 1.58rem;
143 151
     right: 0;
144 152
     z-index: 100;
145 153
     background: #fff;
146
-   
154
+
147 155
     .nav {
148 156
       ul {
149 157
         li {
@@ -171,6 +179,9 @@ export default {
171 179
   }
172 180
   .Tab {
173 181
     padding-top: 63px;
182
+    @media only screen and (max-width: 812px) {
183
+      padding-top: 42px !important;
184
+    }
174 185
   }
175 186
 }
176 187
 </style>

+ 68 - 41
src/pages/main/DialysisArea.vue View File

@@ -1,47 +1,68 @@
1 1
 <template>
2
-    <div>
3
-       <div class="screening">
4
-           <ul>
5
-              <popover placement="bottom" >
6
-                <div slot="content" class="popover-demo-content">
7
-                  <ul>
8
-                    <li v-for="(zone, index) in zones" :key="zone.value" @click="handleZoneChange(index)"  :class="zone_selected == index ? 'tick' : ''">{{zone.text}}</li>
9
-                  </ul>
10
-                </div>
11
-               <li>{{ zones.length <= 1 && zone_selected > 0 ? "全部分区" : zones[zone_selected].text }}<span class="iconfont">&#xe74a;</span></li>
12
-               </popover>
13
-               
14
-               <popover placement="bottom" >  
15
-                <div slot="content" class="popover-demo-content">
16
-                  <ul>
17
-                    <li v-for="schedualType in schedual_types" :key="schedualType.value" @click="handletimeType(schedualType.value)" :class="schedual_type_selected == schedualType.value ? 'tick' : ''" >{{schedualType.text}}</li>
18
-                  </ul> 
19
-                </div>
20
-                <li>{{ schedual_types[schedual_type_selected].text}}<span class="iconfont">&#xe74a;</span></li>
21
-               </popover>
2
+  <div>
3
+    <div class="screening">
4
+      <ul>
5
+        <popover placement="bottom">
6
+          <div slot="content" class="popover-demo-content">
7
+            <ul>
8
+              <li
9
+                v-for="(zone, index) in zones"
10
+                :key="zone.value"
11
+                @click="handleZoneChange(index)"
12
+                :class="zone_selected == index ? 'tick' : ''"
13
+              >{{zone.text}}</li>
14
+            </ul>
15
+          </div>
16
+          <li>
17
+            {{ zones.length <= 1 && zone_selected > 0 ? "全部分区" : zones[zone_selected].text }}
18
+            <span
19
+              class="iconfont"
20
+            >&#xe74a;</span>
21
+          </li>
22
+        </popover>
22 23
 
23
-              
24
-               <li @click="openPicker()">{{selected_date_str}}<span class="iconfont">&#xe74a;</span></li>
25
-           </ul>
26
-       </div>
27
-      <div class="stateBox ">
28
-        <div v-for="(item, index) in filtedScheduals" :key="index" >
29
-          <h2 class="title" >{{item.zone_name}}</h2>
30
-          <patient-box class="clearfix" :patients="item.scheduals"></patient-box>
31
-        </div>
32
-        <div class="NoData" v-show="filtedScheduals.length == 0"><img style="margin-top: 50px; margin-bottom: 50px" src="@/assets/login/data.jpg" alt=""></div>
24
+        <popover placement="bottom">
25
+          <div slot="content" class="popover-demo-content">
26
+            <ul>
27
+              <li
28
+                v-for="schedualType in schedual_types"
29
+                :key="schedualType.value"
30
+                @click="handletimeType(schedualType.value)"
31
+                :class="schedual_type_selected == schedualType.value ? 'tick' : ''"
32
+              >{{schedualType.text}}</li>
33
+            </ul>
34
+          </div>
35
+          <li>
36
+            {{ schedual_types[schedual_type_selected].text}}
37
+            <span class="iconfont">&#xe74a;</span>
38
+          </li>
39
+        </popover>
33 40
 
41
+        <li @click="openPicker()">
42
+          {{selected_date_str}}
43
+          <span class="iconfont">&#xe74a;</span>
44
+        </li>
45
+      </ul>
46
+    </div>
47
+    <div class="stateBox">
48
+      <div v-for="(item, index) in filtedScheduals" :key="index">
49
+        <h2 class="title">{{item.zone_name}}</h2>
50
+        <patient-box class="clearfix" :patients="item.scheduals"></patient-box>
34 51
       </div>
35
-      <mt-datetime-picker
36
-        v-model="selected_date"
37
-        ref="picker"
38
-        type="date"
39
-        year-format="{value} "
40
-        month-format="{value} "
41
-        date-format="{value} "
42
-        @confirm="handleScheduleDateChange">
43
-      </mt-datetime-picker>
44
-    </div>  
52
+      <div class="NoData" v-show="filtedScheduals.length == 0">
53
+        <img style="margin-top: 50px; margin-bottom: 50px" src="@/assets/login/data.jpg" alt />
54
+      </div>
55
+    </div>
56
+    <mt-datetime-picker
57
+      v-model="selected_date"
58
+      ref="picker"
59
+      type="date"
60
+      year-format="{value} "
61
+      month-format="{value} "
62
+      date-format="{value} "
63
+      @confirm="handleScheduleDateChange"
64
+    ></mt-datetime-picker>
65
+  </div>
45 66
 </template>
46 67
 
47 68
 <script>
@@ -293,13 +314,19 @@ export default {
293 314
 }
294 315
 </style>
295 316
 
296
-<style>
317
+<style lang="scss">
297 318
 .picker-toolbar {
298 319
   height: 60px;
320
+  @media only screen and (max-width: 812px) {
321
+    height: 30px !important;
322
+  }
299 323
 }
300 324
 .mint-datetime-action {
301 325
   line-height: 60px;
302 326
   font-size: 0.34rem;
327
+  @media only screen and (max-width: 812px) {
328
+    line-height: 30px !important;
329
+  }
303 330
 }
304 331
 </style>
305 332
 

+ 399 - 355
src/pages/main/add_urgent_schedule.vue View File

@@ -1,401 +1,445 @@
1 1
 <template>
2
-    <div class="mainBox">
3
-        <side-bar :active_index="0"></side-bar>
4
-        <div class="mainContent">
5
-            <div class="navigation">
6
-                <div class="goBack">
7
-                    <span class="back" @click="$router.back(-1)"><span class="iconfont">&#xe720;</span>返回</span>
8
-                </div>
9
-                <div class="nav">
10
-                    <span>临时排班</span>
11
-                </div>
12
-                <div class="goBack"></div>
13
-            </div>
14
-
15
-            <div class="form" v-loading="loading">
16
-                <van-row class="row">
17
-                    <van-col :span="24" class="danger_hint">
18
-                        本次临时排班会覆盖已有排班中的同班次、同床位的排班,请仔细检查后再提交
19
-                    </van-col>
20
-                </van-row>  
21
-                <van-row class="row">
22
-                    <van-col :span="9">
23
-                        <span class="title">日期:</span>
24
-                        <div class="field_panel">
25
-                            <van-field v-model="date" disabled class="field"></van-field>
26
-                        </div>
27
-                    </van-col>
28
-                </van-row>
29
-                <van-row class="row">
30
-                    <van-col :span="9">
31
-                        <span class="title">患者:</span>
32
-                        <div class="field_panel">
33
-                            <van-field ref="patient_field" @focus="selectPatientAction" :value="patient_name" class="field" left-icon="arrow-down"></van-field>
34
-                        </div>
35
-                    </van-col>
36
-                    <van-col :span="9">
37
-                        <span class="title">班次:</span>
38
-                        <div class="field_panel">
39
-                            <van-field ref="sch_type_field" @focus="selectSchTypeAction" :value="schedule_type_title" class="field" left-icon="arrow-down"></van-field>
40
-                        </div>
41
-                    </van-col>
42
-                </van-row>
43
-                <van-row class="row">
44
-                    <van-col :span="9">
45
-                        <span class="title">治疗模式:</span>
46
-                        <div class="field_panel">
47
-                            <van-field ref="mode_field" @focus="selectModeAction" :value="mode_name" class="field" left-icon="arrow-down"></van-field>
48
-                        </div>
49
-                    </van-col>
50
-                    <van-col :span="9">
51
-                        <span class="title">床位:</span>
52
-                        <div class="field_panel">
53
-                            <van-field ref="bed_field" @focus="selectBedAction" :value="bed_name" class="field" left-icon="arrow-down"></van-field>
54
-                        </div>
55
-                    </van-col>
56
-                </van-row>
57
-                <van-row class="row">
58
-                    <van-col :span="24">
59
-                        <span class="title">&nbsp;</span>
60
-                        <div class="field_panel">
61
-                            <van-button type="info" @click="submitAction">立即排班</van-button>
62
-                        </div>
63
-                    </van-col>
64
-                </van-row>
65
-            </div>
2
+  <div class="mainBox">
3
+    <side-bar :active_index="0"></side-bar>
4
+    <div class="mainContent">
5
+      <div class="navigation">
6
+        <div class="goBack">
7
+          <span class="back" @click="$router.back(-1)">
8
+            <span class="iconfont">&#xe720;</span>返回
9
+          </span>
10
+        </div>
11
+        <div class="nav">
12
+          <span>临时排班</span>
66 13
         </div>
14
+        <div class="goBack"></div>
15
+      </div>
67 16
 
68
-        <van-popup v-model="show_patient_picker" position="bottom" class="popup">
69
-            <van-picker :columns="patients" value-key="name" @change="didChangePatient"></van-picker>
70
-        </van-popup>
71
-        <van-popup v-model="show_mode_picker" position="bottom" class="popup">
72
-            <van-picker :columns="modes" value-key="name" @change="didChangeMode"></van-picker>
73
-        </van-popup>
74
-        <van-popup v-model="show_bed_picker" position="bottom" class="popup">
75
-            <van-picker :columns="zone_device_options" value-key="number" @change="didChangeBed"></van-picker>
76
-        </van-popup>
77
-        <van-popup v-model="show_sch_type_picker" position="bottom" class="popup">
78
-            <van-picker :columns="schedule_types" value-key="text" @change="didChangeSchType" ></van-picker>
79
-        </van-popup>
17
+      <div class="form" v-loading="loading">
18
+        <van-row class="row">
19
+          <van-col :span="24" class="danger_hint">本次临时排班会覆盖已有排班中的同班次、同床位的排班,请仔细检查后再提交</van-col>
20
+        </van-row>
21
+        <van-row class="row">
22
+          <van-col :span="9">
23
+            <span class="title">日期:</span>
24
+            <div class="field_panel">
25
+              <van-field v-model="date" disabled class="field"></van-field>
26
+            </div>
27
+          </van-col>
28
+        </van-row>
29
+        <van-row class="row">
30
+          <van-col :span="9">
31
+            <span class="title">患者:</span>
32
+            <div class="field_panel">
33
+              <van-field
34
+                ref="patient_field"
35
+                @focus="selectPatientAction"
36
+                :value="patient_name"
37
+                class="field"
38
+                left-icon="arrow-down"
39
+              ></van-field>
40
+            </div>
41
+          </van-col>
42
+          <van-col :span="9">
43
+            <span class="title">班次:</span>
44
+            <div class="field_panel">
45
+              <van-field
46
+                ref="sch_type_field"
47
+                @focus="selectSchTypeAction"
48
+                :value="schedule_type_title"
49
+                class="field"
50
+                left-icon="arrow-down"
51
+              ></van-field>
52
+            </div>
53
+          </van-col>
54
+        </van-row>
55
+        <van-row class="row">
56
+          <van-col :span="9">
57
+            <span class="title">治疗模式:</span>
58
+            <div class="field_panel">
59
+              <van-field
60
+                ref="mode_field"
61
+                @focus="selectModeAction"
62
+                :value="mode_name"
63
+                class="field"
64
+                left-icon="arrow-down"
65
+              ></van-field>
66
+            </div>
67
+          </van-col>
68
+          <van-col :span="9">
69
+            <span class="title">床位:</span>
70
+            <div class="field_panel">
71
+              <van-field
72
+                ref="bed_field"
73
+                @focus="selectBedAction"
74
+                :value="bed_name"
75
+                class="field"
76
+                left-icon="arrow-down"
77
+              ></van-field>
78
+            </div>
79
+          </van-col>
80
+        </van-row>
81
+        <van-row class="row">
82
+          <van-col :span="24">
83
+            <span class="title">&nbsp;</span>
84
+            <div class="field_panel">
85
+              <van-button type="info" @click="submitAction">立即排班</van-button>
86
+            </div>
87
+          </van-col>
88
+        </van-row>
89
+      </div>
80 90
     </div>
91
+
92
+    <van-popup v-model="show_patient_picker" position="bottom" class="popup">
93
+      <van-picker :columns="patients" value-key="name" @change="didChangePatient"></van-picker>
94
+    </van-popup>
95
+    <van-popup v-model="show_mode_picker" position="bottom" class="popup">
96
+      <van-picker :columns="modes" value-key="name" @change="didChangeMode"></van-picker>
97
+    </van-popup>
98
+    <van-popup v-model="show_bed_picker" position="bottom" class="popup">
99
+      <van-picker :columns="zone_device_options" value-key="number" @change="didChangeBed"></van-picker>
100
+    </van-popup>
101
+    <van-popup v-model="show_sch_type_picker" position="bottom" class="popup">
102
+      <van-picker :columns="schedule_types" value-key="text" @change="didChangeSchType"></van-picker>
103
+    </van-popup>
104
+  </div>
81 105
 </template>
82 106
 
83 107
 <script>
84 108
 import SideBar from "@/pages/layout/SideBar";
85
-import { parseTime } from "@/utils"
86
-import { getUrgentScheduleInitData, postUrgentSchedule } from "@/api/dialysis"
87
-import { Toast, Dialog } from 'vant';
109
+import { parseTime } from "@/utils";
110
+import { getUrgentScheduleInitData, postUrgentSchedule } from "@/api/dialysis";
111
+import { Toast, Dialog } from "vant";
88 112
 
89 113
 export default {
90
-    name: "AddUrgentSchedule",
91
-    components: {
92
-        SideBar,
93
-    },
94
-    data() {
95
-        return {
96
-            loading: false,
114
+  name: "AddUrgentSchedule",
115
+  components: {
116
+    SideBar
117
+  },
118
+  data() {
119
+    return {
120
+      loading: false,
97 121
 
98
-            date: "2019-09-09",
99
-            patient_id: 0,
100
-            mode_id: 0,
101
-            device_id: 0,
102
-            schedule_type: 1,
103
-            zone_name: "",
122
+      date: "2019-09-09",
123
+      patient_id: 0,
124
+      mode_id: 0,
125
+      device_id: 0,
126
+      schedule_type: 1,
127
+      zone_name: "",
104 128
 
105
-            show_patient_picker: false,
106
-            show_mode_picker: false,
107
-            show_bed_picker: false,
108
-            show_sch_type_picker: false,
129
+      show_patient_picker: false,
130
+      show_mode_picker: false,
131
+      show_bed_picker: false,
132
+      show_sch_type_picker: false,
109 133
 
110
-            patients: [],
111
-            modes: [],
112
-            schedule_types: [
113
-                { value: 1, text: "上午" },
114
-                { value: 2, text: "下午" },
115
-                { value: 3, text: "晚上" },
116
-            ],
134
+      patients: [],
135
+      modes: [],
136
+      schedule_types: [
137
+        { value: 1, text: "上午" },
138
+        { value: 2, text: "下午" },
139
+        { value: 3, text: "晚上" }
140
+      ],
117 141
 
118
-            origin_device_numbers: [],
119
-            zone_device_map: {},
120
-            zone_names: [],
121
-            current_devices: [],
122
-            zone_device_options: [],
142
+      origin_device_numbers: [],
143
+      zone_device_map: {},
144
+      zone_names: [],
145
+      current_devices: [],
146
+      zone_device_options: [],
123 147
 
124
-            origin_schedules: [],
148
+      origin_schedules: []
149
+    };
150
+  },
151
+  computed: {
152
+    patient_name: function() {
153
+      for (let index = 0; index < this.patients.length; index++) {
154
+        const patient = this.patients[index];
155
+        if (patient.id == this.patient_id) {
156
+          return patient.name;
125 157
         }
158
+      }
159
+      return "";
126 160
     },
127
-    computed: {
128
-        patient_name: function() {
129
-            for (let index = 0; index < this.patients.length; index++) {
130
-                const patient = this.patients[index];
131
-                if (patient.id == this.patient_id) {
132
-                    return patient.name
133
-                }
134
-            }
135
-            return ""
136
-        },
137
-        mode_name: function() {
138
-            for (let index = 0; index < this.modes.length; index++) {
139
-                const mode = this.modes[index];
140
-                if (mode.id == this.mode_id) {
141
-                    return mode.name
142
-                }
143
-            }
144
-            return ""
145
-        },
146
-        bed_name: function() {
147
-            if (this.zone_name.length > 0 && this.device_id != 0) {
148
-                for (let index = 0; index < this.current_devices.length; index++) {
149
-                    const device_number = this.current_devices[index];
150
-                    if (device_number.id == this.device_id) {
151
-                        return device_number.zone.name + " - " + device_number.number
152
-                    }
153
-                }
154
-            }
155
-            return ""
156
-        },
157
-        schedule_type_title: function() {
158
-            for (let index = 0; index < this.schedule_types.length; index++) {
159
-                const type = this.schedule_types[index];
160
-                if (type.value == this.schedule_type) {
161
-                    return type.text
162
-                }
163
-            }
164
-            return ""
165
-        },
161
+    mode_name: function() {
162
+      for (let index = 0; index < this.modes.length; index++) {
163
+        const mode = this.modes[index];
164
+        if (mode.id == this.mode_id) {
165
+          return mode.name;
166
+        }
167
+      }
168
+      return "";
166 169
     },
167
-    mounted() {
168
-        var today = new Date()
169
-        this.date = parseTime(today, "{y}-{m}-{d}")
170
-
171
-        var hour = today.getHours()
172
-        if (hour > 3 && hour < 11) {
173
-            this.schedule_type = 1
174
-        } else if (hour >= 11 && hour < 18) {
175
-            this.schedule_type = 2
176
-        } else {
177
-            this.schedule_type = 3
170
+    bed_name: function() {
171
+      if (this.zone_name.length > 0 && this.device_id != 0) {
172
+        for (let index = 0; index < this.current_devices.length; index++) {
173
+          const device_number = this.current_devices[index];
174
+          if (device_number.id == this.device_id) {
175
+            return device_number.zone.name + " - " + device_number.number;
176
+          }
178 177
         }
178
+      }
179
+      return "";
180
+    },
181
+    schedule_type_title: function() {
182
+      for (let index = 0; index < this.schedule_types.length; index++) {
183
+        const type = this.schedule_types[index];
184
+        if (type.value == this.schedule_type) {
185
+          return type.text;
186
+        }
187
+      }
188
+      return "";
189
+    }
190
+  },
191
+  mounted() {
192
+    var today = new Date();
193
+    this.date = parseTime(today, "{y}-{m}-{d}");
179 194
 
180
-        this.loading = true
181
-        getUrgentScheduleInitData().then(rs => {
182
-            this.loading = false
183
-            // console.log(rs.data.data)
184
-            if (rs.data.state == 1) {
185
-                this.origin_schedules = rs.data.data.schedules
186
-                this.patients = rs.data.data.patients
187
-                this.modes = rs.data.data.modes
188
-                this.origin_device_numbers = rs.data.data.device_numbers
189
-
190
-                if (this.patients.length > 0) {
191
-                    this.patient_id = this.patients[0].id
192
-                }
193
-                if (this.modes.length > 0) {
194
-                    this.mode_id = this.modes[0].id
195
-                }
195
+    var hour = today.getHours();
196
+    if (hour > 3 && hour < 11) {
197
+      this.schedule_type = 1;
198
+    } else if (hour >= 11 && hour < 18) {
199
+      this.schedule_type = 2;
200
+    } else {
201
+      this.schedule_type = 3;
202
+    }
196 203
 
197
-                var zone_device_map = {}
198
-                for (let index = 0; index < this.origin_device_numbers.length; index++) {
199
-                    const device_number = this.origin_device_numbers[index];
200
-                    if (zone_device_map[device_number.zone.name] == null || zone_device_map[device_number.zone.name] == undefined) {
201
-                        zone_device_map[device_number.zone.name] = []
202
-                    }
203
-                    zone_device_map[device_number.zone.name].push(device_number)
204
-                }
205
-                this.zone_device_map = zone_device_map
204
+    this.loading = true;
205
+    getUrgentScheduleInitData()
206
+      .then(rs => {
207
+        this.loading = false;
208
+        // console.log(rs.data.data)
209
+        if (rs.data.state == 1) {
210
+          this.origin_schedules = rs.data.data.schedules;
211
+          this.patients = rs.data.data.patients;
212
+          this.modes = rs.data.data.modes;
213
+          this.origin_device_numbers = rs.data.data.device_numbers;
206 214
 
207
-                this.zone_names = Object.keys(this.zone_device_map)
208
-                if (this.zone_names.length > 0) {
209
-                    this.zone_name = this.zone_names[0]
210
-                    this.current_devices = this.zone_device_map[this.zone_name]
211
-                    this.device_id = this.current_devices[0].id
212
-                }
213
-                this.zone_device_options = [
214
-                    { values: this.zone_names },
215
-                    // { values: this.getDeviceNumberNames(this.current_devices) },
216
-                    { values: this.current_devices },
217
-                ]
215
+          if (this.patients.length > 0) {
216
+            this.patient_id = this.patients[0].id;
217
+          }
218
+          if (this.modes.length > 0) {
219
+            this.mode_id = this.modes[0].id;
220
+          }
218 221
 
219
-            } else {
220
-                Toast.fail(rs.data.msg)
222
+          var zone_device_map = {};
223
+          for (
224
+            let index = 0;
225
+            index < this.origin_device_numbers.length;
226
+            index++
227
+          ) {
228
+            const device_number = this.origin_device_numbers[index];
229
+            if (
230
+              zone_device_map[device_number.zone.name] == null ||
231
+              zone_device_map[device_number.zone.name] == undefined
232
+            ) {
233
+              zone_device_map[device_number.zone.name] = [];
221 234
             }
222
-            
223
-
224
-        }).catch(err => {
225
-            this.loading = false
226
-            Toast.fail(err)
227
-        })
228
-    },
229
-    methods: {
230
-        // getDeviceNumberNames: function(device_numbers) {
231
-        //     var names = []
232
-        //     for (let index = 0; index < device_numbers.length; index++) {
233
-        //         const device_number = device_numbers[index];
234
-        //         names.push(device_number.number)
235
-        //     }
236
-        //     return names
237
-        // },
238
-
239
-        selectPatientAction: function() {
240
-            this.$refs.patient_field.blur()
241
-            this.show_patient_picker = true
242
-        },
243
-        selectModeAction: function() {
244
-            this.$refs.mode_field.blur()
245
-            this.show_mode_picker = true
246
-        },
247
-        selectBedAction: function() {
248
-            this.$refs.bed_field.blur()
249
-            this.show_bed_picker = true
250
-        },
251
-        selectSchTypeAction: function() {
252
-            this.$refs.sch_type_field.blur()
253
-            this.show_sch_type_picker = true
254
-        },
235
+            zone_device_map[device_number.zone.name].push(device_number);
236
+          }
237
+          this.zone_device_map = zone_device_map;
255 238
 
256
-        didChangePatient: function(picker, patient, index) {
257
-            this.patient_id = patient.id
258
-        },
259
-        didChangeMode: function(picker, mode, index) {
260
-            this.mode_id = mode.id
261
-        },
262
-        didChangeBed: function(picker, values, col_index) {
263
-            if (col_index == 0) {
264
-                this.zone_name = values[0]
265
-                this.current_devices = this.zone_device_map[this.zone_name]
266
-                this.device_id = this.current_devices[0].id
267
-
268
-                picker.setColumnValues(1, this.current_devices)
239
+          this.zone_names = Object.keys(this.zone_device_map);
240
+          if (this.zone_names.length > 0) {
241
+            this.zone_name = this.zone_names[0];
242
+            this.current_devices = this.zone_device_map[this.zone_name];
243
+            this.device_id = this.current_devices[0].id;
244
+          }
245
+          this.zone_device_options = [
246
+            { values: this.zone_names },
247
+            // { values: this.getDeviceNumberNames(this.current_devices) },
248
+            { values: this.current_devices }
249
+          ];
250
+        } else {
251
+          Toast.fail(rs.data.msg);
252
+        }
253
+      })
254
+      .catch(err => {
255
+        this.loading = false;
256
+        Toast.fail(err);
257
+      });
258
+  },
259
+  methods: {
260
+    // getDeviceNumberNames: function(device_numbers) {
261
+    //     var names = []
262
+    //     for (let index = 0; index < device_numbers.length; index++) {
263
+    //         const device_number = device_numbers[index];
264
+    //         names.push(device_number.number)
265
+    //     }
266
+    //     return names
267
+    // },
269 268
 
270
-            } else if (col_index == 1) {
271
-                this.device_id = values[1].id
272
-            }
273
-        },
274
-        didChangeSchType: function(picker, sch_type, index) {
275
-            this.schedule_type = sch_type.value
276
-        },
269
+    selectPatientAction: function() {
270
+      this.$refs.patient_field.blur();
271
+      this.show_patient_picker = true;
272
+    },
273
+    selectModeAction: function() {
274
+      this.$refs.mode_field.blur();
275
+      this.show_mode_picker = true;
276
+    },
277
+    selectBedAction: function() {
278
+      this.$refs.bed_field.blur();
279
+      this.show_bed_picker = true;
280
+    },
281
+    selectSchTypeAction: function() {
282
+      this.$refs.sch_type_field.blur();
283
+      this.show_sch_type_picker = true;
284
+    },
277 285
 
278
-        submitAction: function() {
279
-            if (this.patient_id == 0 || this.mode_id == 0 || this.device_id == 0) {
280
-                Toast.fail("请选择班次、床位等")
281
-                return
282
-            }
286
+    didChangePatient: function(picker, patient, index) {
287
+      this.patient_id = patient.id;
288
+    },
289
+    didChangeMode: function(picker, mode, index) {
290
+      this.mode_id = mode.id;
291
+    },
292
+    didChangeBed: function(picker, values, col_index) {
293
+      if (col_index == 0) {
294
+        this.zone_name = values[0];
295
+        this.current_devices = this.zone_device_map[this.zone_name];
296
+        this.device_id = this.current_devices[0].id;
283 297
 
284
-            var repeated = false
285
-            for (let index = 0; index < this.origin_schedules.length; index++) {
286
-                const schedule = this.origin_schedules[index];
287
-                if (schedule.bed_id == this.device_id && this.schedule_type == schedule.schedule_type) {
288
-                    repeated = true
289
-                    break
290
-                }
291
-            }
292
-            if (repeated) {
293
-                Dialog.confirm({
294
-                    title: '提醒',
295
-                    message: '你选择的床位已经被排班,确认要替换吗?'
296
-                }).then(() => {
297
-                    // on confirm
298
-                    this.submit()
299
-                }).catch(() => {
300
-                    // on cancel
301
-                });
302
-            } else {
303
-                this.submit()
304
-            }
305
-        },
306
-        submit: function() {
307
-            var params = {
308
-                patient_id: this.patient_id,
309
-                mode: this.mode_id,
310
-                schedule_type: this.schedule_type,
311
-                bed: this.device_id,
312
-            }
313
-            this.loading = true
314
-            postUrgentSchedule(params).then(rs => {
315
-                this.loading = false
316
-                var resp = rs.data
317
-                if (resp.state == 1) {
318
-                    console.log(resp.data)
319
-                    var patient = resp.data.patient
320
-                    var schedule = resp.data.schedule
321
-                    this.$router.push({ path: "/details", query: {patient_id: patient.id, date: schedule.schedule_date, patient_name: patient.name}})
298
+        picker.setColumnValues(1, this.current_devices);
299
+      } else if (col_index == 1) {
300
+        this.device_id = values[1].id;
301
+      }
302
+    },
303
+    didChangeSchType: function(picker, sch_type, index) {
304
+      this.schedule_type = sch_type.value;
305
+    },
322 306
 
323
-                } else {
324
-                    Toast.fail(resp.msg)
325
-                }
307
+    submitAction: function() {
308
+      if (this.patient_id == 0 || this.mode_id == 0 || this.device_id == 0) {
309
+        Toast.fail("请选择班次、床位等");
310
+        return;
311
+      }
326 312
 
327
-            }).catch(err => {
328
-                this.loading = false
329
-                Toast.fail("err")
330
-            })
313
+      var repeated = false;
314
+      for (let index = 0; index < this.origin_schedules.length; index++) {
315
+        const schedule = this.origin_schedules[index];
316
+        if (
317
+          schedule.bed_id == this.device_id &&
318
+          this.schedule_type == schedule.schedule_type
319
+        ) {
320
+          repeated = true;
321
+          break;
331 322
         }
323
+      }
324
+      if (repeated) {
325
+        Dialog.confirm({
326
+          title: "提醒",
327
+          message: "你选择的床位已经被排班,确认要替换吗?"
328
+        })
329
+          .then(() => {
330
+            // on confirm
331
+            this.submit();
332
+          })
333
+          .catch(() => {
334
+            // on cancel
335
+          });
336
+      } else {
337
+        this.submit();
338
+      }
339
+    },
340
+    submit: function() {
341
+      var params = {
342
+        patient_id: this.patient_id,
343
+        mode: this.mode_id,
344
+        schedule_type: this.schedule_type,
345
+        bed: this.device_id
346
+      };
347
+      this.loading = true;
348
+      postUrgentSchedule(params)
349
+        .then(rs => {
350
+          this.loading = false;
351
+          var resp = rs.data;
352
+          if (resp.state == 1) {
353
+            console.log(resp.data);
354
+            var patient = resp.data.patient;
355
+            var schedule = resp.data.schedule;
356
+            this.$router.push({
357
+              path: "/details",
358
+              query: {
359
+                patient_id: patient.id,
360
+                date: schedule.schedule_date,
361
+                patient_name: patient.name
362
+              }
363
+            });
364
+          } else {
365
+            Toast.fail(resp.msg);
366
+          }
367
+        })
368
+        .catch(err => {
369
+          this.loading = false;
370
+          Toast.fail("err");
371
+        });
332 372
     }
333
-}
373
+  }
374
+};
334 375
 </script>
335 376
 
336 377
 <style style="stylesheet/scss" lang="scss" scoped>
337 378
 .mainContent {
338
-    position: relative;
339
-    .navigation {
340
-        padding: 0.3rem 0.36rem;
341
-        border-bottom: 1px #e5e5e5 solid;
342
-        // position: fixed;
343
-        // top: 0;
344
-        // left:1.58rem;
345
-        // right: 0;
346
-        z-index: 100;
347
-        background: #fff;
348
-        .goBack {
349
-            float: left;
350
-            .back {
351
-                color: $main-color;
352
-                margin-right: 0.87rem;
353
-                .iconfont {
354
-                    color: $main-color;
355
-                }
356
-            }
357
-        }
358
-        .nav {
359
-            text-align: center;
360
-            font-size: 0.36rem;
379
+  position: relative;
380
+  .navigation {
381
+    padding: 0.3rem 0.36rem;
382
+    border-bottom: 1px #e5e5e5 solid;
383
+    // position: fixed;
384
+    // top: 0;
385
+    // left:1.58rem;
386
+    // right: 0;
387
+    z-index: 100;
388
+    background: #fff;
389
+    .goBack {
390
+      float: left;
391
+      .back {
392
+        color: $main-color;
393
+        margin-right: 0.87rem;
394
+        .iconfont {
395
+          color: $main-color;
361 396
         }
397
+      }
362 398
     }
399
+    .nav {
400
+      text-align: center;
401
+      font-size: 0.36rem;
402
+    }
403
+  }
363 404
 
364
-    .form {
365
-        padding: 10px 10px;
366
-        .row {
367
-            padding: 5px 0;
368
-            .title {
369
-                color: #8f8f8f;
370
-                margin-right: 5px;
371
-                text-align: right;
372
-                font-size: 16px;
373
-                line-height: 45px;
374
-                width: 80px;
375
-                float: left;
376
-            }
377
-            .field_panel {
378
-                display: inline-block;
379
-                .field {
380
-                    padding: 0 0; 
381
-                    font-size: 18px; 
382
-                    line-height: 45px;
383
-                    width: 180px;
384
-                }
385
-            }
386
-
387
-            .danger_hint {
388
-                font-size: 0.34rem;
389
-                line-height: 40px;
390
-                text-align: center;
391
-                color: red;
392
-            }
405
+  .form {
406
+    padding: 10px 10px;
407
+    .row {
408
+      padding: 5px 0;
409
+      .title {
410
+        color: #8f8f8f;
411
+        margin-right: 5px;
412
+        text-align: right;
413
+        font-size: 16px;
414
+        line-height: 45px;
415
+        width: 80px;
416
+        float: left;
417
+      }
418
+      .field_panel {
419
+        display: inline-block;
420
+        .field {
421
+          padding: 0 0;
422
+          font-size: 18px;
423
+          line-height: 45px;
424
+          width: 180px;
425
+          @media only screen and (max-width: 812px) {
426
+            width: 100px;
427
+          }
393 428
         }
429
+      }
430
+
431
+      .danger_hint {
432
+        font-size: 0.34rem;
433
+        line-height: 40px;
434
+        text-align: center;
435
+        color: red;
436
+      }
394 437
     }
438
+  }
395 439
 }
396 440
 .popup {
397
-    border-radius: 0 !important;
398
-    top: initial !important;
441
+  border-radius: 0 !important;
442
+  top: initial !important;
399 443
 }
400 444
 </style>
401 445
 

+ 217 - 172
src/pages/main/dialysis/AdviceTable.vue View File

@@ -61,7 +61,7 @@
61 61
             v-model="queryParams.keywords"
62 62
             @change="searchKey()"
63 63
             placeholder="搜索"
64
-          >
64
+          />
65 65
         </li>
66 66
       </ul>
67 67
     </div>
@@ -98,12 +98,15 @@
98 98
               <span v-if="advice.advice_type == 1">长嘱</span>
99 99
               <span v-if="advice.advice_type == 2">临嘱</span>
100 100
               <span v-if="advice.advice_type == 3">临嘱</span>
101
-
102
-
103 101
             </td>
104 102
 
105
-            <td v-if="advice_index == 0" :rowspan="group.advices.length">{{ parseTime(advice.start_time, "{m}-{d} {h}:{i}") }}</td>
106
-            <td :class="{ 'advice_name': advice.parent_id == 0, 'subdrug_name': advice.parent_id > 0 }">{{ advice.advice_name }}</td>
103
+            <td
104
+              v-if="advice_index == 0"
105
+              :rowspan="group.advices.length"
106
+            >{{ parseTime(advice.start_time, "{m}-{d} {h}:{i}") }}</td>
107
+            <td
108
+              :class="{ 'advice_name': advice.parent_id == 0, 'subdrug_name': advice.parent_id > 0 }"
109
+            >{{ advice.advice_name }}</td>
107 110
             <!-- <td>{{ advice.drug_spec }} {{ advice.drug_spec_unit }} * {{ advice.prescribing_number }}{{ advice.prescribing_number_unit }}</td> -->
108 111
             <td>{{ advice.advice_desc }}</td>
109 112
             <td>{{ advice.prescribing_number }}{{ advice.prescribing_number_unit }}</td>
@@ -111,43 +114,69 @@
111 114
             <td>{{ advice.parent_id == 0 ? advice.delivery_way : "" }}</td>
112 115
             <td>{{ advice.parent_id == 0 ? advice.execution_frequency : "" }}</td>
113 116
 
114
-            <td v-if="advice_index == 0" :rowspan="group.advices.length">{{ parseTime(advice.execution_time, "{m}-{d} {h}:{i}") }}</td>
115
-            <td  v-if="advice_index == 0" :rowspan="group.advices.length">
116
-              <span v-if="advice.stop_state == 1 && advice.parent_id == 0">{{ tranDoctor(advice.execution_staff) }}</span>
117
+            <td
118
+              v-if="advice_index == 0"
119
+              :rowspan="group.advices.length"
120
+            >{{ parseTime(advice.execution_time, "{m}-{d} {h}:{i}") }}</td>
121
+            <td v-if="advice_index == 0" :rowspan="group.advices.length">
122
+              <span
123
+                v-if="advice.stop_state == 1 && advice.parent_id == 0"
124
+              >{{ tranDoctor(advice.execution_staff) }}</span>
117 125
             </td>
118 126
 
119
-
120
-
121 127
             <td v-if="advice_index == 0" :rowspan="group.advices.length">
122
-              <span v-if="advice.stop_state == 1 && advice.parent_id == 0">{{ tranDoctor(advice.advice_doctor) }}</span>
128
+              <span
129
+                v-if="advice.stop_state == 1 && advice.parent_id == 0"
130
+              >{{ tranDoctor(advice.advice_doctor) }}</span>
123 131
             </td>
124
-            <td v-if="advice_index == 0" :rowspan="group.advices.length">{{ parseTime(advice.created_time, "{m}-{d} {h}:{i}") }}</td>
132
+            <td
133
+              v-if="advice_index == 0"
134
+              :rowspan="group.advices.length"
135
+            >{{ parseTime(advice.created_time, "{m}-{d} {h}:{i}") }}</td>
125 136
 
126 137
             <td v-if="advice_index == 0" :rowspan="group.advices.length">
127
-              <span v-if="advice.stop_state == 1 && advice.parent_id == 0">{{ tranDoctor(advice.checker) }}</span>
138
+              <span
139
+                v-if="advice.stop_state == 1 && advice.parent_id == 0"
140
+              >{{ tranDoctor(advice.checker) }}</span>
128 141
             </td>
129
-            <td v-if="advice_index == 0" :rowspan="group.advices.length">{{ parseTime(advice.check_time, "{m}-{d} {h}:{i}") }}</td>
142
+            <td
143
+              v-if="advice_index == 0"
144
+              :rowspan="group.advices.length"
145
+            >{{ parseTime(advice.check_time, "{m}-{d} {h}:{i}") }}</td>
130 146
 
131 147
             <!-- <td>{{ advice.remark }}</td> -->
132
-            <td v-if="advice_index == 0" :rowspan="group.advices.length">{{ advice.stop_state == 1 && advice.parent_id == 0 ? parseTime(advice.stop_time, "{y}-{m}-{d} {h}:{i}") : "" }}</td>
148
+            <td
149
+              v-if="advice_index == 0"
150
+              :rowspan="group.advices.length"
151
+            >{{ advice.stop_state == 1 && advice.parent_id == 0 ? parseTime(advice.stop_time, "{y}-{m}-{d} {h}:{i}") : "" }}</td>
133 152
             <td v-if="advice_index == 0" :rowspan="group.advices.length">
134 153
               <span v-if="advice.stop_state == 1 && advice.parent_id == 0">{{ advice.stop_reason }}</span>
135 154
             </td>
136
-            <td  v-if="advice_index == 0" :rowspan="group.advices.length">
137
-              <span v-if="advice.stop_state == 1 && advice.parent_id == 0">{{ tranDoctor(advice.stop_doctor) }}</span>
155
+            <td v-if="advice_index == 0" :rowspan="group.advices.length">
156
+              <span
157
+                v-if="advice.stop_state == 1 && advice.parent_id == 0"
158
+              >{{ tranDoctor(advice.stop_doctor) }}</span>
138 159
             </td>
139 160
 
140 161
             <td class="advice_name">
141 162
               <span class="xg" @click="modifyAdviceAction(group_index, advice_index)">
142 163
                 <span class="iconfont">&#xe6f7;</span>修改医嘱
143 164
               </span>
144
-              <span class="xg" v-if="advice.parent_id == 0 && advice.stop_state != 1" @click="stopAdviceAction(group_index, advice_index)">
165
+              <span
166
+                class="xg"
167
+                v-if="advice.parent_id == 0 && advice.stop_state != 1"
168
+                @click="stopAdviceAction(group_index, advice_index)"
169
+              >
145 170
                 <span class="iconfont">&#xe64c;</span>停止医嘱
146 171
               </span>
147 172
               <span class="sc" @click="deleteAdviceAction(group_index, advice_index)">
148 173
                 <span class="iconfont">&#xe6f8;</span>删除医嘱
149 174
               </span>
150
-              <span class="xg" v-if="advice.parent_id == 0 && advice.stop_state != 1" @click="addSubdrugAction(group_index, advice_index)">
175
+              <span
176
+                class="xg"
177
+                v-if="advice.parent_id == 0 && advice.stop_state != 1"
178
+                @click="addSubdrugAction(group_index, advice_index)"
179
+              >
151 180
                 <span class="iconfont">&#xe604;</span>添加子药
152 181
               </span>
153 182
             </td>
@@ -189,11 +218,11 @@
189 218
               <span class="iconfont">&#xe604;</span>添加医嘱
190 219
             </span>
191 220
           </td>
192
-        </tr> -->
221
+        </tr>-->
193 222
       </table>
194 223
       <!--<div class="NoData" v-show="tableDate.length == 0"><img src="@/assets/login/data.jpg" alt=""></div>-->
195 224
       <div class="NoData" v-show="advice_groups.length == 0">
196
-        <img style="margin-top: 50px; margin-bottom: 50px" src="@/assets/login/data.jpg" alt>
225
+        <img style="margin-top: 50px; margin-bottom: 50px" src="@/assets/login/data.jpg" alt />
197 226
       </div>
198 227
     </div>
199 228
     <mt-datetime-picker
@@ -218,7 +247,7 @@
218 247
         :single_dose_unit_options="unitsOption"
219 248
         :prescribing_number_unit_options="unitsOption"
220 249
       ></advice-form>
221
-      
250
+
222 251
       <modify-advice-form
223 252
         ref="modify_advice_form"
224 253
         @back="showPopup = false"
@@ -334,7 +363,7 @@
334 363
         v-on:menu-cancle="menuCancle"
335 364
         v-on:menu-comfirm="menuComfirm"
336 365
         :propsForm="propForm"
337
-      ></check-box-sub-menu> -->
366
+      ></check-box-sub-menu>-->
338 367
     </van-popup>
339 368
     <van-popup title="停止医嘱" v-model="stopPopup" :overlay="true" :close-on-click-overlay="false">
340 369
       <div class="Dialog" v-show="showForm">
@@ -403,7 +432,7 @@ export default {
403 432
   components: {
404 433
     CheckBoxSubMenu,
405 434
     AdviceForm,
406
-    ModifyAdviceForm,
435
+    ModifyAdviceForm
407 436
   },
408 437
   data() {
409 438
     return {
@@ -487,19 +516,19 @@ export default {
487 516
         stop_time: "",
488 517
         stop_reason: "",
489 518
         group_index: -1,
490
-        advice_index: -1,
519
+        advice_index: -1
491 520
       },
492 521
       record_date: "",
493 522
       patient_id: 0,
494 523
 
495 524
       new_subdrug_context: {
496 525
         group_index: -1,
497
-        advice_index: -1,
526
+        advice_index: -1
498 527
       },
499 528
       modify_advice_context: {
500 529
         group_index: -1,
501
-        advice_index: -1,
502
-      },
530
+        advice_index: -1
531
+      }
503 532
     };
504 533
   },
505 534
   methods: {
@@ -534,43 +563,42 @@ export default {
534 563
         message: "确认删除这条医嘱吗?"
535 564
       }).then(() => {
536 565
         Toast.loading({ forbidClick: true, duration: 0 });
537
-        var group_no = 0
538
-        var advice_id = this.advice_groups[group_index].advices[advice_index].id
539
-        DeleteDoctorAdviceNew(group_no, advice_id).then(rs => {
540
-          if (rs.data.state == 1) {
541
-            var group = this.advice_groups[group_index]
542
-            var advice = group.advices[advice_index];
543
-            if (advice.parent_id > 0) {
544
-              group.advices.splice(advice_index, 1);
545
-            } else {
546
-              var child_count = 0;
547
-              for (
548
-                let index = advice_index + 1;
549
-                index < group.advices.length;
550
-                index++
551
-              ) {
552
-                const adv = group.advices[index];
553
-                if (adv.parent_id == advice.id) {
554
-                  child_count++;
566
+        var group_no = 0;
567
+        var advice_id = this.advice_groups[group_index].advices[advice_index]
568
+          .id;
569
+        DeleteDoctorAdviceNew(group_no, advice_id)
570
+          .then(rs => {
571
+            if (rs.data.state == 1) {
572
+              var group = this.advice_groups[group_index];
573
+              var advice = group.advices[advice_index];
574
+              if (advice.parent_id > 0) {
575
+                group.advices.splice(advice_index, 1);
576
+              } else {
577
+                var child_count = 0;
578
+                for (
579
+                  let index = advice_index + 1;
580
+                  index < group.advices.length;
581
+                  index++
582
+                ) {
583
+                  const adv = group.advices[index];
584
+                  if (adv.parent_id == advice.id) {
585
+                    child_count++;
586
+                  }
555 587
                 }
588
+                group.advices.splice(advice_index, child_count + 1);
556 589
               }
557
-              group.advices.splice(
558
-                advice_index,
559
-                child_count + 1
560
-              );
561
-            }
562
-            if (group.advices.length == 0) {
563
-              this.advice_groups.splice(group_index, 1);
590
+              if (group.advices.length == 0) {
591
+                this.advice_groups.splice(group_index, 1);
592
+              }
593
+              Toast.success("删除成功");
594
+            } else {
595
+              Toast.fail(rs.data.msg);
564 596
             }
565
-            Toast.success("删除成功")
566
-
567
-          } else {
568
-            Toast.fail(rs.data.msg);
569
-          }
570
-        }).catch(err => {
571
-          Toast.fail(err);
572
-        })
573
-      })
597
+          })
598
+          .catch(err => {
599
+            Toast.fail(err);
600
+          });
601
+      });
574 602
     },
575 603
     deleteResetData(index, row) {
576 604
       if (row.parent_id > 0) {
@@ -602,11 +630,11 @@ export default {
602 630
     //   this.stopPopup = true;
603 631
     // },
604 632
     stopAdviceAction: function(group_index, advice_index) {
605
-      var group = this.advice_groups[group_index]
606
-      var advice = group.advices[advice_index]
633
+      var group = this.advice_groups[group_index];
634
+      var advice = group.advices[advice_index];
607 635
       if (advice.stop_state == 1) {
608 636
         Toast("医嘱已停止");
609
-        return
637
+        return;
610 638
       }
611 639
 
612 640
       this.stopForm.id = advice.parent_id > 0 ? advice.parent_id : advice.id;
@@ -630,7 +658,7 @@ export default {
630 658
       StopDoctorAdvice(this.stopForm.id, {
631 659
         id: this.stopForm.id,
632 660
         stop_time: this.stopForm.stop_time,
633
-        stop_reason: this.stopForm.stop_reason,
661
+        stop_reason: this.stopForm.stop_reason
634 662
       }).then(response => {
635 663
         if (response.data.state == 0) {
636 664
           Toast.fail(response.data.msg);
@@ -638,11 +666,15 @@ export default {
638 666
         } else {
639 667
           Toast.success("医嘱停止成功");
640 668
 
641
-          var group_index = this.stopForm.group_index
642
-          var advice_index = this.stopForm.advice_index
643
-          var group = this.advice_groups[group_index]
644
-          var advice = group.advices[advice_index]
645
-          for (let index = advice_index; index < group.advices.length; index++) {
669
+          var group_index = this.stopForm.group_index;
670
+          var advice_index = this.stopForm.advice_index;
671
+          var group = this.advice_groups[group_index];
672
+          var advice = group.advices[advice_index];
673
+          for (
674
+            let index = advice_index;
675
+            index < group.advices.length;
676
+            index++
677
+          ) {
646 678
             const adv = group.advices[index];
647 679
             if (adv.id == advice.id || adv.parent_id == advice.id) {
648 680
               adv.stop_state = 1;
@@ -657,10 +689,10 @@ export default {
657 689
       });
658 690
     },
659 691
     parseTime: function(time, layout) {
660
-      if(time == 0){
661
-        return ""
692
+      if (time == 0) {
693
+        return "";
662 694
       }
663
-      return parseTime(time, layout)
695
+      return parseTime(time, layout);
664 696
     },
665 697
     openEdit(index, item) {
666 698
       if (item.advice_type == 1) {
@@ -701,8 +733,8 @@ export default {
701 733
       this.stopPopup = false;
702 734
     },
703 735
     modifyAdviceAction: function(group_index, advice_index) {
704
-      var group = this.advice_groups[group_index]
705
-      var advice = group.advices[advice_index]
736
+      var group = this.advice_groups[group_index];
737
+      var advice = group.advices[advice_index];
706 738
       if (advice.advice_type == 1) {
707 739
         Toast("长期医嘱不能修改");
708 740
         return;
@@ -718,8 +750,8 @@ export default {
718 750
         return;
719 751
       }
720 752
 
721
-      this.modify_advice_context.group_index = group_index
722
-      this.modify_advice_context.advice_index = advice_index
753
+      this.modify_advice_context.group_index = group_index;
754
+      this.modify_advice_context.advice_index = advice_index;
723 755
 
724 756
       this.showPopup = true;
725 757
       this.$nextTick(() => {
@@ -736,8 +768,8 @@ export default {
736 768
           single_dose_unit: advice.single_dose_unit,
737 769
           prescribing_number: advice.prescribing_number,
738 770
           prescribing_number_unit: advice.prescribing_number_unit
739
-        })
740
-      })
771
+        });
772
+      });
741 773
     },
742 774
     didModifyAdvice: function(advice) {
743 775
       Toast.loading({ forbidClick: true, duration: 0 });
@@ -759,22 +791,23 @@ export default {
759 791
         } else {
760 792
           Toast.success("修改成功");
761 793
 
762
-          var resp_advice = response.data.data.advice
763
-          var group_index = this.modify_advice_context.group_index
764
-          var advice_index = this.modify_advice_context.advice_index
765
-          var group = this.advice_groups[group_index]
766
-          var advice = group.advices[advice_index]
794
+          var resp_advice = response.data.data.advice;
795
+          var group_index = this.modify_advice_context.group_index;
796
+          var advice_index = this.modify_advice_context.advice_index;
797
+          var group = this.advice_groups[group_index];
798
+          var advice = group.advices[advice_index];
767 799
 
768
-          advice.advice_name = resp_advice.advice_name
769
-          advice.advice_desc = resp_advice.advice_desc
800
+          advice.advice_name = resp_advice.advice_name;
801
+          advice.advice_desc = resp_advice.advice_desc;
770 802
           // advice.drug_spec = resp_advice.drug_spec
771 803
           // advice.drug_spec_unit = resp_advice.drug_spec_unit,
772
-          advice.delivery_way = resp_advice.delivery_way,
773
-          advice.execution_frequency = resp_advice.execution_frequency,
774
-          advice.single_dose = resp_advice.single_dose,
775
-          advice.single_dose_unit = resp_advice.single_dose_unit,
776
-          advice.prescribing_number = resp_advice.prescribing_number,
777
-          advice.prescribing_number_unit = resp_advice.prescribing_number_unit
804
+          (advice.delivery_way = resp_advice.delivery_way),
805
+            (advice.execution_frequency = resp_advice.execution_frequency),
806
+            (advice.single_dose = resp_advice.single_dose),
807
+            (advice.single_dose_unit = resp_advice.single_dose_unit),
808
+            (advice.prescribing_number = resp_advice.prescribing_number),
809
+            (advice.prescribing_number_unit =
810
+              resp_advice.prescribing_number_unit);
778 811
 
779 812
           // for (let index = 0; index < group.advices.length; index++) {
780 813
           //   const advice = group.advices[index];
@@ -792,13 +825,13 @@ export default {
792 825
           //   }
793 826
           // }
794 827
 
795
-          this.$refs.modify_advice_form.dismiss()
796
-          this.modify_advice_context.group_index = -1
797
-          this.modify_advice_context.advice_index = -1
828
+          this.$refs.modify_advice_form.dismiss();
829
+          this.modify_advice_context.group_index = -1;
830
+          this.modify_advice_context.advice_index = -1;
798 831
           this.popupDidHide();
799 832
           return false;
800 833
         }
801
-      })
834
+      });
802 835
     },
803 836
     submitEditAdvice() {
804 837
       if (this.adviceForm.advice_name.length == 0) {
@@ -838,11 +871,11 @@ export default {
838 871
       });
839 872
     },
840 873
     addSubdrugAction: function(group_index, advice_index) {
841
-      var group = this.advice_groups[group_index]
842
-      var advice = group.advices[advice_index]
874
+      var group = this.advice_groups[group_index];
875
+      var advice = group.advices[advice_index];
843 876
       this.showPopup = true;
844
-      this.new_subdrug_context.group_index = group_index
845
-      this.new_subdrug_context.advice_index = advice_index
877
+      this.new_subdrug_context.group_index = group_index;
878
+      this.new_subdrug_context.advice_index = advice_index;
846 879
 
847 880
       this.$nextTick(() => {
848 881
         this.$refs.subdrug_form.showWithNewSubDrug(
@@ -852,7 +885,7 @@ export default {
852 885
           advice.delivery_way,
853 886
           advice.execution_frequency
854 887
         );
855
-      })
888
+      });
856 889
     },
857 890
     didAddSubdrug: function(subdrug) {
858 891
       Toast.loading({ forbidClick: true, duration: 0 });
@@ -868,46 +901,52 @@ export default {
868 901
         single_dose: String(subdrug.single_dose),
869 902
         single_dose_unit: subdrug.single_dose_unit,
870 903
         prescribing_number: String(subdrug.prescribing_number),
871
-        prescribing_number_unit: subdrug.prescribing_number_unit,
872
-      }).then(rs => {
873
-        if (rs.data.state == 0) {
874
-          Toast.fail(rs.data.msg);
875
-        } else {
876
-          Toast.success("添加成功");
877
-          var resp_advice = rs.data.data.advice;
878
-          var group_index = this.new_subdrug_context.group_index
879
-          var advice_index = this.new_subdrug_context.advice_index
880
-          var group = this.advice_groups[group_index]
881
-
882
-          var insert_index = -1;
883
-          var last_child_index = -1;
884
-          for (let index = advice_index + 1; index < group.advices.length; index++) {
885
-            const advice = group.advices[index];
886
-            if (resp_advice.parent_id != advice.parent_id) {
887
-              insert_index = index;
888
-              break;
889
-            } else {
890
-              last_child_index = index;
904
+        prescribing_number_unit: subdrug.prescribing_number_unit
905
+      })
906
+        .then(rs => {
907
+          if (rs.data.state == 0) {
908
+            Toast.fail(rs.data.msg);
909
+          } else {
910
+            Toast.success("添加成功");
911
+            var resp_advice = rs.data.data.advice;
912
+            var group_index = this.new_subdrug_context.group_index;
913
+            var advice_index = this.new_subdrug_context.advice_index;
914
+            var group = this.advice_groups[group_index];
915
+
916
+            var insert_index = -1;
917
+            var last_child_index = -1;
918
+            for (
919
+              let index = advice_index + 1;
920
+              index < group.advices.length;
921
+              index++
922
+            ) {
923
+              const advice = group.advices[index];
924
+              if (resp_advice.parent_id != advice.parent_id) {
925
+                insert_index = index;
926
+                break;
927
+              } else {
928
+                last_child_index = index;
929
+              }
891 930
             }
892
-          }
893
-          if (insert_index < 0) {
894
-            if (last_child_index < 0) {
895
-              group.advices.splice(advice_index + 1, 0, resp_advice);
931
+            if (insert_index < 0) {
932
+              if (last_child_index < 0) {
933
+                group.advices.splice(advice_index + 1, 0, resp_advice);
934
+              } else {
935
+                group.advices.splice(last_child_index + 1, 0, resp_advice);
936
+              }
896 937
             } else {
897
-              group.advices.splice(last_child_index + 1, 0, resp_advice);
938
+              group.advices.splice(insert_index, 0, resp_advice);
898 939
             }
899
-          } else {
900
-            group.advices.splice(insert_index, 0, resp_advice);
901
-          }
902 940
 
903
-          this.$refs.subdrug_form.dismiss();
904
-          this.new_subdrug_context.group_index = -1
905
-          this.new_subdrug_context.advice_index = -1
906
-          this.popupDidHide();
907
-        }
908
-      }).catch(err => {
909
-        Toast.fail(err);
910
-      })
941
+            this.$refs.subdrug_form.dismiss();
942
+            this.new_subdrug_context.group_index = -1;
943
+            this.new_subdrug_context.advice_index = -1;
944
+            this.popupDidHide();
945
+          }
946
+        })
947
+        .catch(err => {
948
+          Toast.fail(err);
949
+        });
911 950
     },
912 951
     // submitNewAdvice() {
913 952
     //   if (this.adviceForm.advice_name.length == 0) {
@@ -1246,66 +1285,69 @@ export default {
1246 1285
             this.queryParams.need_doctor = 0;
1247 1286
           }
1248 1287
 
1249
-          var resp_advices = response.data.data.advices
1288
+          var resp_advices = response.data.data.advices;
1250 1289
           if (resp_advices.length > 0) {
1251 1290
             var newGroupObject = function() {
1252
-              return Object.assign({}, {
1253
-                group_no: 0,
1254
-                advices: [],
1255
-              })
1256
-            }
1291
+              return Object.assign(
1292
+                {},
1293
+                {
1294
+                  group_no: 0,
1295
+                  advices: []
1296
+                }
1297
+              );
1298
+            };
1257 1299
             var initGroupBlock = function(group, advice) {
1258
-              group.group_no = advice.groupno
1259
-            }
1300
+              group.group_no = advice.groupno;
1301
+            };
1260 1302
 
1261
-            var advice_groups = []
1262
-            var group = newGroupObject()
1303
+            var advice_groups = [];
1304
+            var group = newGroupObject();
1263 1305
             for (let index = 0; index < resp_advices.length; index++) {
1264 1306
               const advice = resp_advices[index];
1265
-              if (advice.groupno == 0) { // 老版本的医嘱
1307
+              if (advice.groupno == 0) {
1308
+                // 老版本的医嘱
1266 1309
                 if (advice.parent_id > 0) {
1267 1310
                   if (advice_groups.length > 0) {
1268
-                    var parent_group = advice_groups[advice_groups.length - 1]
1311
+                    var parent_group = advice_groups[advice_groups.length - 1];
1269 1312
                     if (parent_group.advices.length > 0) {
1270 1313
                       if (parent_group.advices[0].id == advice.parent_id) {
1271
-                        parent_group.advices.push(advice)
1314
+                        parent_group.advices.push(advice);
1272 1315
                       }
1273 1316
                     }
1274 1317
                   }
1275
-                  continue
1276
-
1318
+                  continue;
1277 1319
                 } else {
1278 1320
                   if (group.group_no > 0) {
1279
-                    advice_groups.push(group)
1280
-                    group = newGroupObject()
1321
+                    advice_groups.push(group);
1322
+                    group = newGroupObject();
1281 1323
                   }
1282
-                    
1283
-                  initGroupBlock(group, advice)
1284
-                  group.advices.push(advice)
1285
-                  advice_groups.push(group)
1286
-                  group = newGroupObject()
1287
-                  continue
1288
-                }
1289 1324
 
1325
+                  initGroupBlock(group, advice);
1326
+                  group.advices.push(advice);
1327
+                  advice_groups.push(group);
1328
+                  group = newGroupObject();
1329
+                  continue;
1330
+                }
1290 1331
               } else {
1291 1332
                 if (group.group_no > 0 && group.group_no != advice.groupno) {
1292
-                  advice_groups.push(group)
1293
-                  group = newGroupObject()
1333
+                  advice_groups.push(group);
1334
+                  group = newGroupObject();
1294 1335
                 }
1295 1336
                 if (group.group_no == 0) {
1296
-                  initGroupBlock(group, advice)
1337
+                  initGroupBlock(group, advice);
1297 1338
                 }
1298 1339
                 if (group.group_no == advice.groupno) {
1299
-                  group.advices.push(advice)
1340
+                  group.advices.push(advice);
1300 1341
                 }
1301 1342
               }
1302 1343
             }
1303
-            if (group.group_no > 0) { // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
1304
-              advice_groups.push(group)
1344
+            if (group.group_no > 0) {
1345
+              // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
1346
+              advice_groups.push(group);
1305 1347
             }
1306
-            this.advice_groups = advice_groups
1348
+            this.advice_groups = advice_groups;
1307 1349
           } else {
1308
-            this.advice_groups = []
1350
+            this.advice_groups = [];
1309 1351
           }
1310 1352
           // var sl = response.data.data.advices.length;
1311 1353
           // for (let index = 0; index < sl; index++) {
@@ -1375,7 +1417,7 @@ export default {
1375 1417
     for (var index in this.unitsOption) {
1376 1418
       this.unitsObj[this.unitsOption[index].id] = this.unitsOption[index];
1377 1419
     }
1378
-  },
1420
+  }
1379 1421
 };
1380 1422
 </script>
1381 1423
 
@@ -1399,6 +1441,9 @@ export default {
1399 1441
       @include justify-content-between;
1400 1442
       .iconfont {
1401 1443
         margin: 0 0.1rem;
1444
+        @media only screen and (max-width: 812px) {
1445
+          font-size: 12px !important;
1446
+        }
1402 1447
       }
1403 1448
       .line {
1404 1449
         background: #a8b3ba;
@@ -1425,7 +1470,7 @@ export default {
1425 1470
       @include align-items-center;
1426 1471
       @include text-align;
1427 1472
       padding-left: 15px;
1428
-      .iconfont{
1473
+      .iconfont {
1429 1474
         font-size: 0.42rem;
1430 1475
       }
1431 1476
       input {

+ 148 - 128
src/pages/main/dialysis/MissionTable.vue View File

@@ -1,93 +1,96 @@
1 1
 <template>
2
-    <div>
3
-        <div class="choice">
4
-          <ul>
5
-            <li>日期查询:
6
-              <div @click="openStartPicker" class="">{{parseTime(startTime.getTime()/1000, "{y}-{m}-{d}")}}<span class="iconfont">&#xe74a;</span> </div>
7
-              <span class="line">  </span>
8
-              <div @click="openEndPicker" class="">{{parseTime(endTime.getTime()/1000, "{y}-{m}-{d}")}}<span class="iconfont">&#xe74a;</span> </div>
9
-            </li>
10
-          </ul>
11
-        </div>
12
-        <div class="blueBorder"></div>
13
-      <van-list
14
-        width="100%"
15
-        v-model="loading"
16
-        :finished="finished"
17
-        @load="onLoad"
18
-      >
19
-           <div class="tableTit " >
20
-                <ul>
21
-                    <li style="width:10%;">序号</li>
22
-                    <li style="width:15%;">日期</li>
23
-                    <li style="width:75%;">宣教内容</li>
24
-                </ul>
25
-            </div>
26
-            <div class="tableDate" >
27
-                <ul v-for="(item,index) in tableDate" :key="index" :value="item.value">
28
-                    <li style="width:10%;">{{index+1}}</li>
29
-                    <li style="width:15%;">{{parseTime(item.assessment_date, "{y}-{m}-{d}")}}</li>
30
-                    <li style="width:75%;">{{item.mission}}</li>
31
-                </ul>
32
-         </div>
33
-          <!--<div class="NoData" v-show="tableDate.length == 0"><img src="@/assets/login/data.jpg" alt=""></div>-->
34
-        <div class="NoData" v-show="tableDate.length == 0"><img style="margin-top: 50px; margin-bottom: 50px" src="@/assets/login/data.jpg" alt=""></div>
35
-
36
-      </van-list>
37
-
38
-
39
-
40
-      <mt-datetime-picker
41
-        ref="start_date_picker"
42
-        type="date"
43
-        @confirm="handleStartDateConfirm"
44
-        :endDate="new Date()"
45
-        v-model="startTime">
46
-      </mt-datetime-picker>
2
+  <div>
3
+    <div class="choice">
4
+      <ul>
5
+        <li>
6
+          日期查询:
7
+          <div @click="openStartPicker" class>
8
+            {{parseTime(startTime.getTime()/1000, "{y}-{m}-{d}")}}
9
+            <span class="iconfont">&#xe74a;</span>
10
+          </div>
11
+          <span class="line"></span>
12
+          <div @click="openEndPicker" class>
13
+            {{parseTime(endTime.getTime()/1000, "{y}-{m}-{d}")}}
14
+            <span class="iconfont">&#xe74a;</span>
15
+          </div>
16
+        </li>
17
+      </ul>
18
+    </div>
19
+    <div class="blueBorder"></div>
20
+    <van-list width="100%" v-model="loading" :finished="finished" @load="onLoad">
21
+      <div class="tableTit">
22
+        <ul>
23
+          <li style="width:10%;">序号</li>
24
+          <li style="width:15%;">日期</li>
25
+          <li style="width:75%;">宣教内容</li>
26
+        </ul>
27
+      </div>
28
+      <div class="tableDate">
29
+        <ul v-for="(item,index) in tableDate" :key="index" :value="item.value">
30
+          <li style="width:10%;">{{index+1}}</li>
31
+          <li style="width:15%;">{{parseTime(item.assessment_date, "{y}-{m}-{d}")}}</li>
32
+          <li style="width:75%;">{{item.mission}}</li>
33
+        </ul>
34
+      </div>
35
+      <!--<div class="NoData" v-show="tableDate.length == 0"><img src="@/assets/login/data.jpg" alt=""></div>-->
36
+      <div class="NoData" v-show="tableDate.length == 0">
37
+        <img style="margin-top: 50px; margin-bottom: 50px" src="@/assets/login/data.jpg" alt />
38
+      </div>
39
+    </van-list>
47 40
 
48
-      <mt-datetime-picker
49
-        ref="end_date_picker"
50
-        type="date"
51
-        @confirm="handleEndDateConfirm"
52
-        :endDate="new Date()"
53
-        v-model="endTime">
54
-      </mt-datetime-picker>
41
+    <mt-datetime-picker
42
+      ref="start_date_picker"
43
+      type="date"
44
+      @confirm="handleStartDateConfirm"
45
+      :endDate="new Date()"
46
+      v-model="startTime"
47
+    ></mt-datetime-picker>
55 48
 
56
-     
57
-    </div>
49
+    <mt-datetime-picker
50
+      ref="end_date_picker"
51
+      type="date"
52
+      @confirm="handleEndDateConfirm"
53
+      :endDate="new Date()"
54
+      v-model="endTime"
55
+    ></mt-datetime-picker>
56
+  </div>
58 57
 </template>
59 58
 
60 59
 <script>
61
-  import {parseTime} from "@/utils"
62
-  import {getAllEducationList} from '@/api/patient';
60
+import { parseTime } from "@/utils";
61
+import { getAllEducationList } from "@/api/patient";
63 62
 
64
-  import { Popover } from "vux";
63
+import { Popover } from "vux";
65 64
 export default {
66 65
   name: "LongTable",
67
-  created(){
68
-    this.tableDate=[]
69
-
66
+  created() {
67
+    this.tableDate = [];
70 68
 
71
-    this.queryParams.start_time = this.parseTime(new Date().getTime() / 1000, "{y}-{m}-{d}")
72
-    this.queryParams.end_time = this.parseTime(new Date().getTime() / 1000, "{y}-{m}-{d}")
73
-    this.queryParams.patient_id = this.$route.query.patient_id
74
-    this.queryParams.page = this.queryParams.page + 1
75
-    this.queryParams.limit = 15
76
-    this.tableDate=[]
69
+    this.queryParams.start_time = this.parseTime(
70
+      new Date().getTime() / 1000,
71
+      "{y}-{m}-{d}"
72
+    );
73
+    this.queryParams.end_time = this.parseTime(
74
+      new Date().getTime() / 1000,
75
+      "{y}-{m}-{d}"
76
+    );
77
+    this.queryParams.patient_id = this.$route.query.patient_id;
78
+    this.queryParams.page = this.queryParams.page + 1;
79
+    this.queryParams.limit = 15;
80
+    this.tableDate = [];
77 81
 
78
-    getAllEducationList(this.queryParams).then(response =>{
79
-      if(response.data.state == 0){
82
+    getAllEducationList(this.queryParams).then(response => {
83
+      if (response.data.state == 0) {
80 84
         return false;
81
-      }else{
82
-        if(response.data.data.total == 0){
83
-        }else{
84
-          for(let i = 0; i < response.data.data.edus.length;i++){
85
-            this.tableDate.push(response.data.data.edus[i])
85
+      } else {
86
+        if (response.data.data.total == 0) {
87
+        } else {
88
+          for (let i = 0; i < response.data.data.edus.length; i++) {
89
+            this.tableDate.push(response.data.data.edus[i]);
86 90
           }
87 91
         }
88 92
       }
89 93
     });
90
-
91 94
   },
92 95
   data() {
93 96
     return {
@@ -99,83 +102,97 @@ export default {
99 102
       endTime: new Date(),
100 103
 
101 104
       queryParams: {
102
-        mode_id: '',
105
+        mode_id: "",
103 106
         start_time: "",
104 107
         end_time: "",
105 108
         page: 0,
106 109
         patient_id: 0,
107
-        limit: 15,
108
-      },
109
-
110
+        limit: 15
111
+      }
110 112
     };
111
-  },  methods: {
113
+  },
114
+  methods: {
112 115
     parseTime(time, layout) {
113
-      return parseTime(time, layout)
114
-    },onLoad() {
115
-      this.queryParams.start_time = this.parseTime(this.startTime.getTime()/1000, "{y}-{m}-{d}")
116
-      this.queryParams.end_time = this.parseTime(this.endTime.getTime()/1000, "{y}-{m}-{d}")
117
-      this.queryParams.patient_id = this.$route.query.patient_id
118
-      this.queryParams.page = this.queryParams.page + 1
119
-      this.queryParams.limit = 15
116
+      return parseTime(time, layout);
117
+    },
118
+    onLoad() {
119
+      this.queryParams.start_time = this.parseTime(
120
+        this.startTime.getTime() / 1000,
121
+        "{y}-{m}-{d}"
122
+      );
123
+      this.queryParams.end_time = this.parseTime(
124
+        this.endTime.getTime() / 1000,
125
+        "{y}-{m}-{d}"
126
+      );
127
+      this.queryParams.patient_id = this.$route.query.patient_id;
128
+      this.queryParams.page = this.queryParams.page + 1;
129
+      this.queryParams.limit = 15;
120 130
 
121
-      getAllEducationList(params).then(response =>{
122
-        if(response.data.state == 0){
131
+      getAllEducationList(params).then(response => {
132
+        if (response.data.state == 0) {
123 133
           this.finished = true;
124 134
           this.loading = false;
125 135
           return false;
126
-        }else{
127
-          if(response.data.data.edus.length == 0){
136
+        } else {
137
+          if (response.data.data.edus.length == 0) {
128 138
             this.finished = true;
129 139
             this.loading = false;
130
-
131
-          }else{
132
-            for(let i = 0; i < response.data.data.edus.length;i++){
133
-              this.tableDate.push(response.data.data.edus[i])
140
+          } else {
141
+            for (let i = 0; i < response.data.data.edus.length; i++) {
142
+              this.tableDate.push(response.data.data.edus[i]);
134 143
             }
135 144
             this.loading = false;
136 145
           }
137 146
         }
138 147
       });
139
-
140
-
141 148
     },
142
-    handleStartDateConfirm: function (val) {
143
-      this.queryParams.start_time = this.parseTime(this.startTime / 1000, "{y}-{m}-{d}")
144
-      this.queryParams.end_time = this.parseTime(this.endTime / 1000, "{y}-{m}-{d}")
145
-      this.queryParams.page =  1
146
-      this.queryParams.limit = 15
147
-
148
-      this.getRecordList(this.queryParams)
149
-
149
+    handleStartDateConfirm: function(val) {
150
+      this.queryParams.start_time = this.parseTime(
151
+        this.startTime / 1000,
152
+        "{y}-{m}-{d}"
153
+      );
154
+      this.queryParams.end_time = this.parseTime(
155
+        this.endTime / 1000,
156
+        "{y}-{m}-{d}"
157
+      );
158
+      this.queryParams.page = 1;
159
+      this.queryParams.limit = 15;
150 160
 
161
+      this.getRecordList(this.queryParams);
151 162
     },
152
-    handleEndDateConfirm: function (val) {
153
-      this.queryParams.start_time = this.parseTime(this.startTime / 1000, "{y}-{m}-{d}")
154
-      this.queryParams.end_time = this.parseTime(this.endTime / 1000, "{y}-{m}-{d}")
155
-      this.queryParams.page =  1
156
-      this.queryParams.limit = 15
157
-      this.getRecordList(this.queryParams)
158
-
159
-    },openStartPicker: function () {
163
+    handleEndDateConfirm: function(val) {
164
+      this.queryParams.start_time = this.parseTime(
165
+        this.startTime / 1000,
166
+        "{y}-{m}-{d}"
167
+      );
168
+      this.queryParams.end_time = this.parseTime(
169
+        this.endTime / 1000,
170
+        "{y}-{m}-{d}"
171
+      );
172
+      this.queryParams.page = 1;
173
+      this.queryParams.limit = 15;
174
+      this.getRecordList(this.queryParams);
175
+    },
176
+    openStartPicker: function() {
160 177
       this.$refs.start_date_picker.open();
161 178
     },
162
-    openEndPicker: function () {
179
+    openEndPicker: function() {
163 180
       this.$refs.end_date_picker.open();
164
-    },getRecordList: function (val) {
165
-      this.tableDate=[]
166
-      getAllEducationList(val).then(response =>{
167
-        if(response.data.state == 0){
181
+    },
182
+    getRecordList: function(val) {
183
+      this.tableDate = [];
184
+      getAllEducationList(val).then(response => {
185
+        if (response.data.state == 0) {
168 186
           return false;
169
-        }else{
170
-          if(response.data.data.edus.length == 0){
171
-          }else{
172
-            for(let i = 0; i < response.data.data.edus.length;i++){
173
-              this.tableDate.push(response.data.data.edus[i])
187
+        } else {
188
+          if (response.data.data.edus.length == 0) {
189
+          } else {
190
+            for (let i = 0; i < response.data.data.edus.length; i++) {
191
+              this.tableDate.push(response.data.data.edus[i]);
174 192
             }
175 193
           }
176 194
         }
177 195
       });
178
-
179 196
     }
180 197
   },
181 198
 
@@ -205,8 +222,11 @@ export default {
205 222
       @include justify-content-between;
206 223
       .iconfont {
207 224
         margin: 0 0.1rem;
225
+        @media only screen and (max-width: 812px) {
226
+          font-size: 12px !important;
227
+        }
208 228
       }
209
-      .line{
229
+      .line {
210 230
         background: #a8b3ba;
211 231
         width: 0.2rem;
212 232
         height: 1px;
@@ -242,12 +262,12 @@ export default {
242 262
   @include box-sizing;
243 263
   ul {
244 264
     @include display-flex;
245
-      @include align-items-center;
246
-      @include text-align;
247
-      @include justify-content-center;
265
+    @include align-items-center;
266
+    @include text-align;
267
+    @include justify-content-center;
248 268
     li {
249 269
       font-size: 0.3rem;
250
-      padding:0.16rem 0;
270
+      padding: 0.16rem 0;
251 271
       line-height: 0.5rem;
252 272
       span {
253 273
         @include flex;

+ 53 - 44
src/pages/main/dialysis/RecordTable.vue View File

@@ -1,19 +1,19 @@
1 1
 <template>
2 2
   <div>
3
-    <van-list
4
-      width="100%"
5
-      v-model="loading"
6
-      :finished="finished"
7
-      @load="onLoad"
8
-    >
3
+    <van-list width="100%" v-model="loading" :finished="finished" @load="onLoad">
9 4
       <div class="choice">
10 5
         <ul>
11
-          <li>透析时间:
12
-            <div @click="openStartPicker" class="">{{parseTime(startTime.getTime()/1000, "{y}-{m}-{d}")}}<span
13
-              class="iconfont">&#xe74a;</span></div>
6
+          <li>
7
+            透析时间:
8
+            <div @click="openStartPicker" class>
9
+              {{parseTime(startTime.getTime()/1000, "{y}-{m}-{d}")}}
10
+              <span class="iconfont">&#xe74a;</span>
11
+            </div>
14 12
             <span class="line"></span>
15
-            <div @click="openEndPicker" class="">{{parseTime(endTime.getTime()/1000, "{y}-{m}-{d}")}}<span
16
-              class="iconfont">&#xe74a;</span></div>
13
+            <div @click="openEndPicker" class>
14
+              {{parseTime(endTime.getTime()/1000, "{y}-{m}-{d}")}}
15
+              <span class="iconfont">&#xe74a;</span>
16
+            </div>
17 17
           </li>
18 18
 
19 19
           <!-- <popover placement="bottom">
@@ -23,24 +23,29 @@
23 23
               </ul>
24 24
             </div>
25 25
             <li>透析模式:{{modeNameOther(mode_id)}}<span class="iconfont">&#xe74a;</span></li>
26
-          </popover> -->
27
-
28
-          <el-popover
29
-                placement="bottom"
30
-                trigger="click">
31
-                <li slot="reference">透析模式:{{modeNameOther(mode_id)}}<span class="iconfont">&#xe74a;</span></li>
32
-                <div class="popover-demo-content">
33
-                  <ul>
34
-                    <li  v-for="item in modeOptions" :key="item.id" @click="itemClick(item.id)"   :class="mode_id == item.id ? 'tick' : ''">{{item.name}}</li>
35
-                  </ul> 
36
-                </div>
37
-              </el-popover>
26
+          </popover>-->
38 27
 
28
+          <el-popover placement="bottom" trigger="click">
29
+            <li slot="reference">
30
+              透析模式:{{modeNameOther(mode_id)}}
31
+              <span class="iconfont">&#xe74a;</span>
32
+            </li>
33
+            <div class="popover-demo-content">
34
+              <ul>
35
+                <li
36
+                  v-for="item in modeOptions"
37
+                  :key="item.id"
38
+                  @click="itemClick(item.id)"
39
+                  :class="mode_id == item.id ? 'tick' : ''"
40
+                >{{item.name}}</li>
41
+              </ul>
42
+            </div>
43
+          </el-popover>
39 44
         </ul>
40 45
       </div>
41 46
       <div class="blueBorder"></div>
42 47
       <div style="width:100%;overflow:hildden;overflow-x:auto;">
43
-        <table class="table" style="">
48
+        <table class="table" style>
44 49
           <tr>
45 50
             <th width="124px">透析日期</th>
46 51
             <th width="72px">班次</th>
@@ -57,7 +62,12 @@
57 62
             <th width="92px">治疗护士</th>
58 63
             <th width="92px">治疗医生</th>
59 64
           </tr>
60
-          <tr v-for="(item,index) in tableDate" :key="index" :value="item.value" @click="jump(item)">
65
+          <tr
66
+            v-for="(item,index) in tableDate"
67
+            :key="index"
68
+            :value="item.value"
69
+            @click="jump(item)"
70
+          >
61 71
             <td>{{parseTime(item.dialysis_date, "{y}-{m}-{d}")}}</td>
62 72
             <td>{{scheduleType(item.schedule_type)}}</td>
63 73
             <td>{{item.partition_name}} - {{item.device_number}}</td>
@@ -77,8 +87,9 @@
77 87
           </tr>
78 88
         </table>
79 89
         <!--<div class="NoData" v-show="tableDate.length == 0"><img src="@/assets/login/data.jpg" alt=""></div>-->
80
-        <div class="NoData" v-show="tableDate.length == 0"><img style="margin-top: 50px; margin-bottom: 50px" src="@/assets/login/data.jpg" alt=""></div>
81
-
90
+        <div class="NoData" v-show="tableDate.length == 0">
91
+          <img style="margin-top: 50px; margin-bottom: 50px" src="@/assets/login/data.jpg" alt />
92
+        </div>
82 93
       </div>
83 94
     </van-list>
84 95
 
@@ -87,17 +98,16 @@
87 98
       type="date"
88 99
       @confirm="handleStartDateConfirm"
89 100
       :endDate="new Date()"
90
-      v-model="startTime">
91
-    </mt-datetime-picker>
101
+      v-model="startTime"
102
+    ></mt-datetime-picker>
92 103
 
93 104
     <mt-datetime-picker
94 105
       ref="end_date_picker"
95 106
       type="date"
96 107
       @confirm="handleEndDateConfirm"
97 108
       :endDate="new Date()"
98
-      v-model="endTime">
99
-    </mt-datetime-picker>
100
-  
109
+      v-model="endTime"
110
+    ></mt-datetime-picker>
101 111
   </div>
102 112
 </template>
103 113
 
@@ -122,9 +132,7 @@ export default {
122 132
     }
123 133
     var nowDate = year + "-" + month + "-" + day;
124 134
 
125
-    this.startTime = new Date(nowDate)
126
-
127
-
135
+    this.startTime = new Date(nowDate);
128 136
 
129 137
     this.modeOptions = this.$store.getters.treatment_mode;
130 138
 
@@ -136,7 +144,7 @@ export default {
136 144
     // console.log(this.modeOptions);
137 145
     this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit;
138 146
     this.queryParams.start_time = this.parseTime(
139
-      this.startTime .getTime() / 1000,
147
+      this.startTime.getTime() / 1000,
140 148
       "{y}-{m}-{d}"
141 149
     );
142 150
     this.queryParams.end_time = this.parseTime(
@@ -386,19 +394,17 @@ export default {
386 394
       this.queryParams.page = 1;
387 395
       this.queryParams.limit = 15;
388 396
       this.getRecordList(this.queryParams);
389
-    },jump:function (val) {
390
-      this.$emit("record",val);
391
-
392
-
397
+    },
398
+    jump: function(val) {
399
+      this.$emit("record", val);
393 400
 
394 401
       this.$router.push({
395 402
         path: "/details",
396 403
         query: {
397 404
           patient_id: val.patient_id,
398
-          date: val.dialysis_date,
405
+          date: val.dialysis_date
399 406
         }
400 407
       });
401
-
402 408
     }
403 409
   },
404 410
   components: {
@@ -415,7 +421,7 @@ export default {
415 421
     @include align-items-center;
416 422
     @include text-align;
417 423
     @include justify-content-between;
418
-    width:70%;
424
+    width: 70%;
419 425
     margin: 0 auto;
420 426
     font-size: 0.32rem;
421 427
     color: $pgh-color;
@@ -426,8 +432,11 @@ export default {
426 432
       @include text-align;
427 433
       .iconfont {
428 434
         margin: 0 0.1rem;
435
+        @media only screen and (max-width: 812px) {
436
+          font-size: 12px !important;
437
+        }
429 438
       }
430
-      .line{
439
+      .line {
431 440
         background: #a8b3ba;
432 441
         width: 0.2rem;
433 442
         height: 1px;

+ 323 - 162
src/pages/main/today/TodayTab.vue View File

@@ -1,84 +1,104 @@
1 1
 <template>
2 2
   <div v-loading="loading">
3
-
4 3
     <div class="grid">
5 4
       <div class="list">
6 5
         <ul>
7 6
           <li @click="menuClick(1)">
8
-            <img src="@/assets/record/2.png">
7
+            <img src="@/assets/record/2.png" />
9 8
             <p>透析处方</p>
10 9
           </li>
11 10
           <li @click="menuClick(2)">
12
-            <img src="@/assets/record/3.png">
11
+            <img src="@/assets/record/3.png" />
13 12
             <p>接诊评估</p>
14 13
           </li>
15 14
           <li @click="menuClick(3)">
16
-            <img src="@/assets/record/4.png">
15
+            <img src="@/assets/record/4.png" />
17 16
             <p>透前评估</p>
18 17
           </li>
19 18
           <li @click="menuClick(4)">
20
-            <img src="@/assets/record/5.png">
19
+            <img src="@/assets/record/5.png" />
21 20
             <p>临时医嘱</p>
22 21
           </li>
23 22
           <li @click="menuClick(5)">
24
-            <img src="@/assets/record/6.png">
23
+            <img src="@/assets/record/6.png" />
25 24
             <p>双人核对</p>
26 25
           </li>
27 26
         </ul>
28
-
29 27
       </div>
30 28
       <div class="list">
31 29
         <ul>
32
-
33 30
           <li @click="menuClick(0)">
34
-            <img src="@/assets/record/1.png">
31
+            <img src="@/assets/record/1.png" />
35 32
             <p>透析上机</p>
36 33
           </li>
37 34
           <li @click="menuClick(6)">
38
-            <img src="@/assets/record/7.png">
35
+            <img src="@/assets/record/7.png" />
39 36
             <p>透析监测</p>
40 37
           </li>
41 38
           <li @click="menuClick(7)">
42
-            <img src="@/assets/record/8.png">
39
+            <img src="@/assets/record/8.png" />
43 40
             <p>透析下机</p>
44 41
           </li>
45 42
           <li @click="menuClick(8)">
46
-            <img src="@/assets/record/9.png">
43
+            <img src="@/assets/record/9.png" />
47 44
             <p>透后评估</p>
48 45
           </li>
49 46
           <li @click="menuClick(9)">
50
-            <img src="@/assets/record/10.png">
47
+            <img src="@/assets/record/10.png" />
51 48
             <p>治疗小结</p>
52 49
           </li>
53 50
         </ul>
54
-
55 51
       </div>
56 52
     </div>
57 53
     <div class="blueBorder"></div>
58
-    <details-info title="基本信息" :patient="patient"
59
-                  :device_number="schedual.device_number == null || schedual.device_number == undefined ? '' : schedual.device_number.number"
60
-                  :step_data="stepData"></details-info>
54
+    <details-info
55
+      title="基本信息"
56
+      :patient="patient"
57
+      :device_number="schedual.device_number == null || schedual.device_number == undefined ? '' : schedual.device_number.number"
58
+      :step_data="stepData"
59
+    ></details-info>
61 60
 
62 61
     <div class="blueBorder"></div>
63
-    <dialysis-prescription id="prescription" :prescription="prescription" :solution="solution" title="透析处方"
64
-                           :device_number_map="device_map"></dialysis-prescription>
62
+    <dialysis-prescription
63
+      id="prescription"
64
+      :prescription="prescription"
65
+      :solution="solution"
66
+      title="透析处方"
67
+      :device_number_map="device_map"
68
+    ></dialysis-prescription>
65 69
 
66 70
     <!-- <div class="blueBorder"></div>
67
-    <past-data class="往期数据"></past-data> -->
71
+    <past-data class="往期数据"></past-data>-->
68 72
 
69 73
     <div class="blueBorder"></div>
70 74
     <accepts-assessment id="accepts_assessment" :record="receiver_treatment_access" title="接诊评估"></accepts-assessment>
71 75
 
72 76
     <div class="blueBorder"></div>
73
-    <assessment-before id="assessment_before" :record="predialysis_evaluation" ref="assessment_before"
74
-                       title="透前评估"></assessment-before>
77
+    <assessment-before
78
+      id="assessment_before"
79
+      :record="predialysis_evaluation"
80
+      ref="assessment_before"
81
+      title="透前评估"
82
+    ></assessment-before>
75 83
 
76 84
     <div class="blueBorder"></div>
77
-    <stat-order id="stat_order" ref="stat_order" title="临时医嘱" :doctor_map="admin_user_map" :advice_groups="advice_groups"></stat-order>
85
+    <stat-order
86
+      id="stat_order"
87
+      ref="stat_order"
88
+      title="临时医嘱"
89
+      :doctor_map="admin_user_map"
90
+      :advice_groups="advice_groups"
91
+    ></stat-order>
78 92
 
79 93
     <div class="blueBorder"></div>
80
-    <dialysis-computer id="dialysis_computer" ref="dialysis_computer" title="透析上机 " :record="dialysis_order"
81
-                       :admin_map="admin_user_map" :device_number_map="device_number_map"></dialysis-computer>
94
+    <dialysis-computer
95
+      id="dialysis_computer"
96
+      ref="dialysis_computer"
97
+      title="透析上机 "
98
+      :record="dialysis_order"
99
+      :admin_map="admin_user_map"
100
+      :device_number_map="device_number_map"
101
+    ></dialysis-computer>
82 102
 
83 103
     <div class="blueBorder"></div>
84 104
     <double-check id="double_check" ref="double_check" title="双人核对 " :record="double_check"></double-check>
@@ -87,77 +107,197 @@
87 107
     <dialysis-monitoring id="monitoring" ref="monitoring" title="透析监测"></dialysis-monitoring>
88 108
 
89 109
     <div class="blueBorder"></div>
90
-    <dialysis-off id="dialysis_off" ref="dialysis_off" title="透析下机 " :record="dialysis_order"
91
-                  :admin_map="admin_user_map"></dialysis-off>
110
+    <dialysis-off
111
+      id="dialysis_off"
112
+      ref="dialysis_off"
113
+      title="透析下机 "
114
+      :record="dialysis_order"
115
+      :admin_map="admin_user_map"
116
+    ></dialysis-off>
92 117
 
93 118
     <div class="blueBorder"></div>
94
-    <assessment-after id="assessment_after" ref="assessment_after" title="透后评估"
95
-                      :record="assessment_after_dislysis"></assessment-after>
119
+    <assessment-after
120
+      id="assessment_after"
121
+      ref="assessment_after"
122
+      title="透后评估"
123
+      :record="assessment_after_dislysis"
124
+    ></assessment-after>
96 125
 
97 126
     <div class="blueBorder"></div>
98 127
     <treatment-of id="treatment_of" ref="treatment_of" title="治疗小结" :record="treatment_summary"></treatment-of>
99 128
 
100 129
     <!-- <div class="blueBorder"></div>
101
-    <operation-staff title="操作人员 "></operation-staff> -->
130
+    <operation-staff title="操作人员 "></operation-staff>-->
102 131
 
103 132
     <!-- 弹框 -->
104 133
     <!-- <van-popup v-show="false" title="长期处方"   :overlay="true" @click-overlay="popupDidHide(0)" :close-on-click-overlay="false">
105 134
         <long-dialog @longSolution="closeDialog(0)" @closeLongDialog="closeDialog(0)" :patient_prop="patient" :solution_prop="solution" :machines_prop="devices"  ref="long_dialog" ></long-dialog>
106
-    </van-popup> -->
107
-
108
-    <van-popup title="透析处方" v-model="menuList[1].showPopup" :overlay="true" :close-on-click-overlay="false">
109
-      <prescription-dialog :patient_prop="patient" :solution_prop="solution" :machines_prop="devices"
110
-                           :prescription_prop="prescription" @finish="closePrescriptionDialog" :operators="operators"
111
-                           @close="closePrescriptionDialog" ref="prescription_dialog"></prescription-dialog>
135
+    </van-popup>-->
136
+
137
+    <van-popup
138
+      title="透析处方"
139
+      v-model="menuList[1].showPopup"
140
+      :overlay="true"
141
+      :close-on-click-overlay="false"
142
+    >
143
+      <prescription-dialog
144
+        :patient_prop="patient"
145
+        :solution_prop="solution"
146
+        :machines_prop="devices"
147
+        :prescription_prop="prescription"
148
+        @finish="closePrescriptionDialog"
149
+        :operators="operators"
150
+        @close="closePrescriptionDialog"
151
+        ref="prescription_dialog"
152
+      ></prescription-dialog>
112 153
     </van-popup>
113 154
 
114
-    <van-popup title="接诊评估" v-model="menuList[2].showPopup" :overlay="true" :close-on-click-overlay="false">
115
-      <accepts-dialog :accepts="receiver_treatment_access" :patient_prop="patient" @finish="closeAcceptsAssessment"
116
-                      @close="closeAcceptsAssessment"></accepts-dialog>
155
+    <van-popup
156
+      title="接诊评估"
157
+      v-model="menuList[2].showPopup"
158
+      :overlay="true"
159
+      :close-on-click-overlay="false"
160
+    >
161
+      <accepts-dialog
162
+        :accepts="receiver_treatment_access"
163
+        :patient_prop="patient"
164
+        @finish="closeAcceptsAssessment"
165
+        @close="closeAcceptsAssessment"
166
+      ></accepts-dialog>
117 167
     </van-popup>
118 168
 
119
-    <van-popup title="透前评估" v-model="menuList[3].showPopup" :overlay="true" :close-on-click-overlay="false">
120
-      <assessment-dialog :predialysis="predialysis_evaluation" :last_predialysis="last_predialysis_evaluation"
121
-                         :patient_prop="patient" @evaluation="update_evaluation" @close="closeAssessmentBefore"
122
-                         ref="assessment_dialog"></assessment-dialog>
169
+    <van-popup
170
+      title="透前评估"
171
+      v-model="menuList[3].showPopup"
172
+      :overlay="true"
173
+      :close-on-click-overlay="false"
174
+    >
175
+      <assessment-dialog
176
+        :predialysis="predialysis_evaluation"
177
+        :last_predialysis="last_predialysis_evaluation"
178
+        :patient_prop="patient"
179
+        @evaluation="update_evaluation"
180
+        @close="closeAssessmentBefore"
181
+        ref="assessment_dialog"
182
+      ></assessment-dialog>
123 183
     </van-popup>
124 184
 
125
-    <van-popup title="临时医嘱" v-model="menuList[4].showPopup" :overlay="true" :close-on-click-overlay="false">
126
-      <orders-dialog :patient_prop="patient" :advice_groups="advice_groups" :advice_list_prop="doctor_advices" :admin_users_prop="admin_users" @orderDialog="closeStatOrder" ref="orders_dialog"></orders-dialog>
185
+    <van-popup
186
+      title="临时医嘱"
187
+      v-model="menuList[4].showPopup"
188
+      :overlay="true"
189
+      :close-on-click-overlay="false"
190
+    >
191
+      <orders-dialog
192
+        :patient_prop="patient"
193
+        :advice_groups="advice_groups"
194
+        :advice_list_prop="doctor_advices"
195
+        :admin_users_prop="admin_users"
196
+        @orderDialog="closeStatOrder"
197
+        ref="orders_dialog"
198
+      ></orders-dialog>
127 199
     </van-popup>
128 200
 
129
-    <van-popup title="双人查对" v-model="menuList[5].showPopup" :overlay="true" :close-on-click-overlay="false">
130
-      <double-dialog :patient_prop="patient" :record="double_check" :admin_users_prop="admin_users"
131
-                     @did_update="closeDoubleCheck" @close="closeDoubleCheck"></double-dialog>
201
+    <van-popup
202
+      title="双人查对"
203
+      v-model="menuList[5].showPopup"
204
+      :overlay="true"
205
+      :close-on-click-overlay="false"
206
+    >
207
+      <double-dialog
208
+        :patient_prop="patient"
209
+        :record="double_check"
210
+        :admin_users_prop="admin_users"
211
+        @did_update="closeDoubleCheck"
212
+        @close="closeDoubleCheck"
213
+      ></double-dialog>
132 214
     </van-popup>
133 215
 
134
-    <van-popup title="透析上机" v-model="menuList[0].showPopup" :overlay="true" :close-on-click-overlay="false">
135
-      <computer-dialog :schedule="schedual" :patient_prop="patient" :record="dialysis_order" :admins="admin_users"
136
-                       :device_numbers="device_numbers" :admin_map="admin_user_map"
137
-                       :device_number_map="device_number_map" @did_start="closeDialysisComputer"
138
-                       @close="closeDialysisComputer" ref="computer_dialog"></computer-dialog>
216
+    <van-popup
217
+      title="透析上机"
218
+      v-model="menuList[0].showPopup"
219
+      :overlay="true"
220
+      :close-on-click-overlay="false"
221
+    >
222
+      <computer-dialog
223
+        :schedule="schedual"
224
+        :patient_prop="patient"
225
+        :record="dialysis_order"
226
+        :admins="admin_users"
227
+        :device_numbers="device_numbers"
228
+        :admin_map="admin_user_map"
229
+        :device_number_map="device_number_map"
230
+        @did_start="closeDialysisComputer"
231
+        @close="closeDialysisComputer"
232
+        ref="computer_dialog"
233
+      ></computer-dialog>
139 234
     </van-popup>
140 235
 
141
-    <van-popup title="透析监测" v-model="menuList[6].showPopup" :overlay="true" :close-on-click-overlay="false">
142
-      <monit-dialog :monitor_records="monitor_records" :last_monitor_record="last_monitor_record" :patient="patient" :order="dialysis_order"
143
-                    @did_add_monitor="didAddMonitor" @did_edit_monitor="didEditMonitor" @did_delete_monitor="didDelMonitor" @close="closeMonitoring"
144
-                    ref="monit_dialog"></monit-dialog>
236
+    <van-popup
237
+      title="透析监测"
238
+      v-model="menuList[6].showPopup"
239
+      :overlay="true"
240
+      :close-on-click-overlay="false"
241
+    >
242
+      <monit-dialog
243
+        :monitor_records="monitor_records"
244
+        :last_monitor_record="last_monitor_record"
245
+        :patient="patient"
246
+        :order="dialysis_order"
247
+        @did_add_monitor="didAddMonitor"
248
+        @did_edit_monitor="didEditMonitor"
249
+        @did_delete_monitor="didDelMonitor"
250
+        @close="closeMonitoring"
251
+        ref="monit_dialog"
252
+      ></monit-dialog>
145 253
     </van-popup>
146 254
 
147
-    <van-popup title="透析下机" v-model="menuList[7].showPopup" :overlay="true" :close-on-click-overlay="false">
148
-      <plane-dialog :patient_prop="patient" :record="dialysis_order" :admins="admin_users" :admin_map="admin_user_map"
149
-                    @did_off="closeDialysisOff" @close="closeDialysisOff" ref="plane_dialog"></plane-dialog>
255
+    <van-popup
256
+      title="透析下机"
257
+      v-model="menuList[7].showPopup"
258
+      :overlay="true"
259
+      :close-on-click-overlay="false"
260
+    >
261
+      <plane-dialog
262
+        :patient_prop="patient"
263
+        :record="dialysis_order"
264
+        :admins="admin_users"
265
+        :admin_map="admin_user_map"
266
+        @did_off="closeDialysisOff"
267
+        @close="closeDialysisOff"
268
+        ref="plane_dialog"
269
+      ></plane-dialog>
150 270
     </van-popup>
151 271
 
152
-    <van-popup title="透后评估" v-model="menuList[8].showPopup" :overlay="true" :close-on-click-overlay="false">
153
-      <thoroug-dialog :patient_prop="patient" :record="assessment_after_dislysis"
154
-                      :last_record="last_assessment_after_dislysis" @did_update="closeAssessmentAfter"
155
-                      @close="closeAssessmentAfter" ref="thoroug_dialog"></thoroug-dialog>
272
+    <van-popup
273
+      title="透后评估"
274
+      v-model="menuList[8].showPopup"
275
+      :overlay="true"
276
+      :close-on-click-overlay="false"
277
+    >
278
+      <thoroug-dialog
279
+        :patient_prop="patient"
280
+        :record="assessment_after_dislysis"
281
+        :last_record="last_assessment_after_dislysis"
282
+        @did_update="closeAssessmentAfter"
283
+        @close="closeAssessmentAfter"
284
+        ref="thoroug_dialog"
285
+      ></thoroug-dialog>
156 286
     </van-popup>
157 287
 
158
-    <van-popup title="治疗小结" v-model="menuList[9].showPopup" :overlay="true" :close-on-click-overlay="false">
159
-      <treatment-dialog :patient_prop="patient" :record="treatment_summary" @did_update="closeTreatmentOf"
160
-                        @close="closeTreatmentOf" ref="treatment_dialog"></treatment-dialog>
288
+    <van-popup
289
+      title="治疗小结"
290
+      v-model="menuList[9].showPopup"
291
+      :overlay="true"
292
+      :close-on-click-overlay="false"
293
+    >
294
+      <treatment-dialog
295
+        :patient_prop="patient"
296
+        :record="treatment_summary"
297
+        @did_update="closeTreatmentOf"
298
+        @close="closeTreatmentOf"
299
+        ref="treatment_dialog"
300
+      ></treatment-dialog>
161 301
     </van-popup>
162 302
 
163 303
     <div class="fixedNav" ref="fixed_nav" v-show="show_fixed_nav">
@@ -174,7 +314,6 @@
174 314
         <li @click="menuClick(9)">治疗小结</li>
175 315
       </ul>
176 316
     </div>
177
-
178 317
   </div>
179 318
 </template>
180 319
 
@@ -207,7 +346,7 @@ import ComputerDialog from "../dialog/ComputerDialog";
207 346
 
208 347
 import { dialysisGlobalConfig, getDialysisRecord } from "@/api/dialysis";
209 348
 import { parseTime } from "@/utils";
210
-import Vue from 'vue'
349
+import Vue from "vue";
211 350
 
212 351
 export default {
213 352
   name: "TodayTab",
@@ -272,7 +411,7 @@ export default {
272 411
       monitor_records: [], // 透析监测
273 412
       last_monitor_record: {
274 413
         id: 0,
275
-        operate_time: (new Date()).getTime(),
414
+        operate_time: new Date().getTime(),
276 415
         sodium_concentration: "",
277 416
         dialysate_temperature: ""
278 417
       }, // 上一次透析的监测记录
@@ -370,7 +509,6 @@ export default {
370 509
     },
371 510
 
372 511
     $route: "requestDialysisRecord"
373
-
374 512
   },
375 513
   methods: {
376 514
     handleScroll: function() {
@@ -382,9 +520,9 @@ export default {
382 520
     },
383 521
 
384 522
     didAddMonitor(monitor) {
385
-      this.monitor_records.push(monitor)
523
+      this.monitor_records.push(monitor);
386 524
 
387
-      this.monitor_records.sort((a,b)=>b.operate_time-a.operate_time)
525
+      this.monitor_records.sort((a, b) => b.operate_time - a.operate_time);
388 526
 
389 527
       // for (let index = 0; index < this.monitor_records.length; index++) {
390 528
       //   const record = this.monitor_records[index];
@@ -393,7 +531,7 @@ export default {
393 531
       //     break
394 532
       //   }
395 533
       // }
396
-      this.last_monitor_record = monitor
534
+      this.last_monitor_record = monitor;
397 535
     },
398 536
 
399 537
     didEditMonitor(monitor) {
@@ -406,35 +544,49 @@ export default {
406 544
         }
407 545
       }
408 546
 
409
-      console.log(monitor)
410
-      console.log(this.monitor_records[monitor_index])
411
-
412
-
413
-      this.monitor_records[monitor_index].arterial_pressure = monitor.arterial_pressure
414
-      this.monitor_records[monitor_index].blood_flow_volume = monitor.blood_flow_volume
415
-      this.monitor_records[monitor_index].breathing_rate = monitor.breathing_rate
416
-      this.monitor_records[monitor_index].dialysate_temperature = monitor.dialysate_temperature
417
-      this.monitor_records[monitor_index].diastolic_bp = monitor.diastolic_bp
418
-      this.monitor_records[monitor_index].displacement_quantity = monitor.displacement_quantity
419
-      this.monitor_records[monitor_index].dispose = monitor.dispose
420
-      this.monitor_records[monitor_index].ktv = monitor.ktv
421
-      this.monitor_records[monitor_index].monitor_date = monitor.monitor_date
422
-      this.monitor_records[monitor_index].monitoring_nurse = monitor.monitoring_nurse
423
-      this.monitor_records[monitor_index].operate_time = monitor.operate_time
424
-      this.monitor_records[monitor_index].pulse_frequency = monitor.pulse_frequency
425
-      this.monitor_records[monitor_index].replacement_rate = monitor.replacement_rate
426
-      this.monitor_records[monitor_index].result = monitor.result
427
-      this.monitor_records[monitor_index].sodium_concentration = monitor.sodium_concentration
428
-      this.monitor_records[monitor_index].symptom = monitor.symptom
429
-      this.monitor_records[monitor_index].systolic_bp = monitor.systolic_bp
430
-      this.monitor_records[monitor_index].transmembrane_pressure = monitor.transmembrane_pressure
431
-      this.monitor_records[monitor_index].ultrafiltration_rate = monitor.ultrafiltration_rate
432
-      this.monitor_records[monitor_index].ultrafiltration_volume = monitor.ultrafiltration_volume
433
-      this.monitor_records[monitor_index].venous_pressure = monitor.venous_pressure
434
-      this.monitor_records[monitor_index].diastolic_blood_pressure = monitor.diastolic_blood_pressure
435
-      this.monitor_records[monitor_index].systolic_blood_pressure = monitor.systolic_blood_pressure
436
-
437
-      this.monitor_records.sort((a,b)=>b.operate_time-a.operate_time)
547
+      console.log(monitor);
548
+      console.log(this.monitor_records[monitor_index]);
549
+
550
+      this.monitor_records[monitor_index].arterial_pressure =
551
+        monitor.arterial_pressure;
552
+      this.monitor_records[monitor_index].blood_flow_volume =
553
+        monitor.blood_flow_volume;
554
+      this.monitor_records[monitor_index].breathing_rate =
555
+        monitor.breathing_rate;
556
+      this.monitor_records[monitor_index].dialysate_temperature =
557
+        monitor.dialysate_temperature;
558
+      this.monitor_records[monitor_index].diastolic_bp = monitor.diastolic_bp;
559
+      this.monitor_records[monitor_index].displacement_quantity =
560
+        monitor.displacement_quantity;
561
+      this.monitor_records[monitor_index].dispose = monitor.dispose;
562
+      this.monitor_records[monitor_index].ktv = monitor.ktv;
563
+      this.monitor_records[monitor_index].monitor_date = monitor.monitor_date;
564
+      this.monitor_records[monitor_index].monitoring_nurse =
565
+        monitor.monitoring_nurse;
566
+      this.monitor_records[monitor_index].operate_time = monitor.operate_time;
567
+      this.monitor_records[monitor_index].pulse_frequency =
568
+        monitor.pulse_frequency;
569
+      this.monitor_records[monitor_index].replacement_rate =
570
+        monitor.replacement_rate;
571
+      this.monitor_records[monitor_index].result = monitor.result;
572
+      this.monitor_records[monitor_index].sodium_concentration =
573
+        monitor.sodium_concentration;
574
+      this.monitor_records[monitor_index].symptom = monitor.symptom;
575
+      this.monitor_records[monitor_index].systolic_bp = monitor.systolic_bp;
576
+      this.monitor_records[monitor_index].transmembrane_pressure =
577
+        monitor.transmembrane_pressure;
578
+      this.monitor_records[monitor_index].ultrafiltration_rate =
579
+        monitor.ultrafiltration_rate;
580
+      this.monitor_records[monitor_index].ultrafiltration_volume =
581
+        monitor.ultrafiltration_volume;
582
+      this.monitor_records[monitor_index].venous_pressure =
583
+        monitor.venous_pressure;
584
+      this.monitor_records[monitor_index].diastolic_blood_pressure =
585
+        monitor.diastolic_blood_pressure;
586
+      this.monitor_records[monitor_index].systolic_blood_pressure =
587
+        monitor.systolic_blood_pressure;
588
+
589
+      this.monitor_records.sort((a, b) => b.operate_time - a.operate_time);
438 590
 
439 591
       // if (monitor_index >= 0) {
440 592
       //   var record = this.monitor_records[monitor_index]
@@ -517,10 +669,8 @@ export default {
517 669
     closeDialog(index) {
518 670
       this.index = -1;
519 671
       this.menuList[index].showPopup = false;
520
-    },refresh(){
521
-
522
-
523
-
672
+    },
673
+    refresh() {
524 674
       var dateStr = parseTime(this.$route.query.date, "{y}-{m}-{d}");
525 675
       var params = {
526 676
         patient_id: this.$route.query.patient_id,
@@ -567,56 +717,59 @@ export default {
567 717
 
568 718
           this.doctor_advices = doctor_advices == null ? [] : doctor_advices;
569 719
           if (this.doctor_advices.length > 0) {
570
-            var group = this.newAdviceGroupObject()
720
+            var group = this.newAdviceGroupObject();
571 721
             var initGroupBlock = function(group, advice) {
572
-              group.group_no = advice.groupno
722
+              group.group_no = advice.groupno;
573 723
               // group.start_time = advice.start_time
574 724
               // group.advice_doctor = advice.advice_doctor
575 725
               // group.exec_staff = advice.execution_staff
576 726
               // group.exec_time = advice.execution_time
577 727
               // group.checker = advice.checker
578
-            }
728
+            };
579 729
             for (let index = 0; index < this.doctor_advices.length; index++) {
580 730
               const advice = this.doctor_advices[index];
581
-              if (advice.groupno == 0) { // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
731
+              if (advice.groupno == 0) {
732
+                // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
582 733
                 if (advice.parent_id > 0) {
583 734
                   if (this.advice_groups.length > 0) {
584
-                    var parent_group = this.advice_groups[this.advice_groups.length - 1]
735
+                    var parent_group = this.advice_groups[
736
+                      this.advice_groups.length - 1
737
+                    ];
585 738
                     if (parent_group.advices.length > 0) {
586 739
                       if (parent_group.advices[0].id == advice.parent_id) {
587
-                        parent_group.advices.push(advice)
740
+                        parent_group.advices.push(advice);
588 741
                       }
589 742
                     }
590 743
                   }
591
-                  continue
592
-
744
+                  continue;
593 745
                 } else {
594 746
                   if (group.group_no > 0) {
595
-                    this.advice_groups.push(group)
596
-                    group = this.newAdviceGroupObject()
747
+                    this.advice_groups.push(group);
748
+                    group = this.newAdviceGroupObject();
597 749
                   }
598 750
 
599
-                  initGroupBlock(group, advice)
600
-                  group.advices.push(advice)
601
-                  this.advice_groups.push(group)
602
-                  group = this.newAdviceGroupObject()
603
-                  continue
751
+                  initGroupBlock(group, advice);
752
+                  group.advices.push(advice);
753
+                  this.advice_groups.push(group);
754
+                  group = this.newAdviceGroupObject();
755
+                  continue;
604 756
                 }
605 757
               }
606 758
 
607 759
               if (group.group_no > 0 && group.group_no != advice.groupno) {
608
-                this.advice_groups.push(group)
609
-                group = this.newAdviceGroupObject()
760
+                this.advice_groups.push(group);
761
+                group = this.newAdviceGroupObject();
610 762
               }
611 763
               if (group.group_no == 0) {
612
-                initGroupBlock(group, advice)
764
+                initGroupBlock(group, advice);
613 765
               }
614 766
               if (group.group_no == advice.groupno) {
615
-                group.advices.push(advice)
767
+                group.advices.push(advice);
616 768
               }
617 769
             }
618
-            if (group.group_no > 0) { // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
619
-              this.advice_groups.push(group)
770
+            if (group.group_no > 0) {
771
+              // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
772
+              this.advice_groups.push(group);
620 773
             }
621 774
 
622 775
             // console.log(this.advice_groups)
@@ -685,7 +838,6 @@ export default {
685 838
           this.loading = false;
686 839
         }
687 840
       });
688
-
689 841
     },
690 842
 
691 843
     requestDialysisRecord() {
@@ -735,58 +887,61 @@ export default {
735 887
 
736 888
           this.doctor_advices = doctor_advices == null ? [] : doctor_advices;
737 889
           if (this.doctor_advices.length > 0) {
738
-            var group = this.newAdviceGroupObject()
890
+            var group = this.newAdviceGroupObject();
739 891
             var initGroupBlock = function(group, advice) {
740
-              group.group_no = advice.groupno
892
+              group.group_no = advice.groupno;
741 893
               // group.start_time = advice.start_time
742 894
               // group.advice_doctor = advice.advice_doctor
743 895
               // group.exec_staff = advice.execution_staff
744 896
               // group.exec_time = advice.execution_time
745 897
               // group.checker = advice.checker
746
-            }
898
+            };
747 899
             for (let index = 0; index < this.doctor_advices.length; index++) {
748 900
               const advice = this.doctor_advices[index];
749
-              if (advice.groupno == 0) { // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
901
+              if (advice.groupno == 0) {
902
+                // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
750 903
                 if (advice.parent_id > 0) {
751 904
                   if (this.advice_groups.length > 0) {
752
-                    var parent_group = this.advice_groups[this.advice_groups.length - 1]
905
+                    var parent_group = this.advice_groups[
906
+                      this.advice_groups.length - 1
907
+                    ];
753 908
                     if (parent_group.advices.length > 0) {
754 909
                       if (parent_group.advices[0].id == advice.parent_id) {
755
-                        parent_group.advices.push(advice)
910
+                        parent_group.advices.push(advice);
756 911
                       }
757 912
                     }
758 913
                   }
759
-                  continue
760
-
914
+                  continue;
761 915
                 } else {
762 916
                   if (group.group_no > 0) {
763
-                    this.advice_groups.push(group)
764
-                    group = this.newAdviceGroupObject()
917
+                    this.advice_groups.push(group);
918
+                    group = this.newAdviceGroupObject();
765 919
                   }
766
-                    
767
-                  initGroupBlock(group, advice)
768
-                  group.advices.push(advice)
769
-                  this.advice_groups.push(group)
770
-                  group = this.newAdviceGroupObject()
771
-                  continue
920
+
921
+                  initGroupBlock(group, advice);
922
+                  group.advices.push(advice);
923
+                  this.advice_groups.push(group);
924
+                  group = this.newAdviceGroupObject();
925
+                  continue;
772 926
                 }
773 927
               }
774 928
 
775 929
               if (group.group_no > 0 && group.group_no != advice.groupno) {
776
-                this.advice_groups.push(group)
777
-                group = this.newAdviceGroupObject()
930
+                this.advice_groups.push(group);
931
+                group = this.newAdviceGroupObject();
778 932
               }
779 933
               if (group.group_no == 0) {
780
-                initGroupBlock(group, advice)
934
+                initGroupBlock(group, advice);
781 935
               }
782 936
               if (group.group_no == advice.groupno) {
783
-                group.advices.push(advice)
937
+                group.advices.push(advice);
784 938
               }
785 939
             }
786
-            if (group.group_no > 0) { // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
787
-              this.advice_groups.push(group)
940
+            if (group.group_no > 0) {
941
+              // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
942
+              this.advice_groups.push(group);
788 943
             }
789
-            
944
+
790 945
             // console.log(this.advice_groups)
791 946
           }
792 947
 
@@ -855,15 +1010,18 @@ export default {
855 1010
       });
856 1011
     },
857 1012
     newAdviceGroupObject: function() {
858
-      return Object.assign({}, {
859
-        group_no: 0,
860
-        // advice_doctor: 0,
861
-        // start_time: 0,
862
-        advices: [],
863
-        // exec_staff: 0,
864
-        // exec_time: 0,
865
-        // checker: 0,
866
-      })
1013
+      return Object.assign(
1014
+        {},
1015
+        {
1016
+          group_no: 0,
1017
+          // advice_doctor: 0,
1018
+          // start_time: 0,
1019
+          advices: []
1020
+          // exec_staff: 0,
1021
+          // exec_time: 0,
1022
+          // checker: 0,
1023
+        }
1024
+      );
867 1025
     },
868 1026
 
869 1027
     closePrescriptionDialog: function() {
@@ -934,7 +1092,7 @@ export default {
934 1092
         li {
935 1093
           font-size: 0.24rem;
936 1094
           color: #5d6b7a;
937
-          margin-top:0.35rem;
1095
+          margin-top: 0.35rem;
938 1096
           p {
939 1097
             line-height: 0.6rem;
940 1098
             color: #34495e;
@@ -959,6 +1117,9 @@ export default {
959 1117
     z-index: 99;
960 1118
     padding: 0 0.1rem;
961 1119
     margin-top: 1.17rem;
1120
+    @media only screen and (max-width: 812px) {
1121
+      margin-top: 1.7rem;
1122
+    }
962 1123
     ul {
963 1124
       @include display-flex;
964 1125
       @include align-items-center;

+ 53 - 28
src/pages/monitoring/index.vue View File

@@ -3,45 +3,59 @@
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>
16 29
           </van-field>
17 30
         </div>
18 31
       </div>
19 32
 
20 33
       <div class="choice">
21 34
         <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>
35
+          <el-popover v-model="visible" placement="bottom" trigger="click">
36
+            <li slot="reference">
37
+              {{partitionName(partition)}}
38
+              <span class="iconfont">&#xe74a;</span>
39
+            </li>
27 40
             <div class="popover-demo-content">
28
-
29
-              <ul >
30
-                <li v-for="item in partitionArr" :key="item.id" @click="itemClick(item.id)" :class="partition == item.id ? 'tick' : ''">{{item.name}}</li>
41
+              <ul>
42
+                <li
43
+                  v-for="item in partitionArr"
44
+                  :key="item.id"
45
+                  @click="itemClick(item.id)"
46
+                  :class="partition == item.id ? 'tick' : ''"
47
+                >{{item.name}}</li>
31 48
               </ul>
32 49
             </div>
33 50
           </el-popover>
34
-          <li @click="openPicker">{{parseTime(date.getTime()/1000, "{y}-{m}-{d}")}}<span
35
-            class="iconfont">&#xe74a;</span></li>
51
+          <li @click="openPicker">
52
+            {{parseTime(date.getTime()/1000, "{y}-{m}-{d}")}}
53
+            <span class="iconfont">&#xe74a;</span>
54
+          </li>
36 55
         </ul>
37 56
       </div>
38 57
       <div class="blueBorder"></div>
39
-      <van-list
40
-        v-model="loading"
41
-        :finished="finished"
42
-        finished-text="没有更多了"
43
-        @load="onLoad"
44
-      >
58
+      <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">
45 59
         <table class="table">
46 60
           <tr>
47 61
             <th width="8%">机号</th>
@@ -61,7 +75,7 @@
61 75
             <td width="9%"></td>
62 76
             <td width="13%"></td>
63 77
             <td width="10%"></td>
64
-            <td width="9%"></td>  
78
+            <td width="9%"></td>
65 79
             <td width="14%"></td>
66 80
             <td width="27%"></td>
67 81
           </tr>
@@ -72,20 +86,28 @@
72 86
             <td width="13%">{{parseTime(item.schedule_date, "{y}-{m}-{d}")}}</td>
73 87
             <td width="10%">{{item.treatment_mode.name}}</td>
74 88
             <td width="9%">{{item.prescription.dewater_amount}}</td>
75
-            <td width="14%">
76
-              {{item.assessment_before_dislysis.weight_before}}/{{item.assessment_after_dislysis.weight_after}}
77
-            </td>
89
+            <td
90
+              width="14%"
91
+            >{{item.assessment_before_dislysis.weight_before}}/{{item.assessment_after_dislysis.weight_after}}</td>
78 92
             <td width="27%">
79 93
               <span v-if="monitorBloodPressureStatus(item.monitoring_record) == 1">低压</span>
80
-              <span style="background-color: dodgerblue" v-if="monitorBloodPressureStatus(item.monitoring_record) == 2">正常</span>
94
+              <span
95
+                style="background-color: dodgerblue"
96
+                v-if="monitorBloodPressureStatus(item.monitoring_record) == 2"
97
+              >正常</span>
81 98
               <span v-if="monitorBloodPressureStatus(item.monitoring_record) == 3">高压</span>
82 99
               <span v-if="monitorRateStatus(item.monitoring_record) == 1">心率过缓</span>
83
-              <span style="background-color: dodgerblue" v-if="monitorRateStatus(item.monitoring_record) == 2">正常</span>
100
+              <span
101
+                style="background-color: dodgerblue"
102
+                v-if="monitorRateStatus(item.monitoring_record) == 2"
103
+              >正常</span>
84 104
               <span v-if="monitorRateStatus(item.monitoring_record) == 3">心率过高</span>
85 105
             </td>
86 106
           </tr>
87 107
         </table>
88
-        <div class="NoData" v-show="dialysis_scheduals.length == 0"><img style="margin-top: 50px; margin-bottom: 50px" src="@/assets/login/data.jpg" alt=""></div>
108
+        <div class="NoData" v-show="dialysis_scheduals.length == 0">
109
+          <img style="margin-top: 50px; margin-bottom: 50px" src="@/assets/login/data.jpg" alt />
110
+        </div>
89 111
       </van-list>
90 112
     </div>
91 113
     <mt-datetime-picker
@@ -93,8 +115,8 @@
93 115
       type="date"
94 116
       @confirm="handleDateConfirm"
95 117
       :endDate="new Date()"
96
-      v-model="date">
97
-    </mt-datetime-picker>
118
+      v-model="date"
119
+    ></mt-datetime-picker>
98 120
   </div>
99 121
 </template>
100 122
 
@@ -351,6 +373,9 @@ export default {
351 373
   .iconfont {
352 374
     font-size: 0.4rem;
353 375
     color: #a8b3ba;
376
+    @media only screen and (max-width: 812px) {
377
+      margin-right: 0 !important;
378
+    }
354 379
   }
355 380
 }
356 381
 .choice {

+ 12 - 0
src/styles/media.scss View File

@@ -0,0 +1,12 @@
1
+@media only screen and (max-width: 812px) {
2
+  html {
3
+    font-size: 25px;
4
+  }
5
+}
6
+
7
+/* Medium devices (landscape tablets, 768px and up) */
8
+// @media only screen and (min-width: 800px) {
9
+//   html {
10
+//     font-size: 50px;
11
+//   }
12
+// }

+ 1 - 1
src/styles/reset.scss View File

@@ -111,7 +111,7 @@ textarea:-ms-input-placeholder {
111 111
 //去掉黄色背景
112 112
 input:-webkit-autofill {
113 113
   -webkit-box-shadow: 0 0 0px 1000px white inset;
114
-} 
114
+}
115 115
 /* 初始化结束 */
116 116
 
117 117
 /* 针对缺省样式 (必须的) */

+ 96 - 34
src/styles/style.scss View File

@@ -200,8 +200,8 @@
200 200
   @include justify-content-around;
201 201
   background: #fff;
202 202
   span {
203
-    height: 0.60rem;
204
-    line-height: 0.60rem;
203
+    height: 0.6rem;
204
+    line-height: 0.6rem;
205 205
     background: #fff;
206 206
     border-radius: 50px;
207 207
     border: 1px $border-color solid;
@@ -365,7 +365,7 @@
365 365
 
366 366
 // 弹窗样式
367 367
 .van-popup {
368
-  //  max-height:8.6rem !important; 
368
+  //  max-height:8.6rem !important;
369 369
 }
370 370
 
371 371
 .van-popup {
@@ -548,11 +548,28 @@
548 548
   color: #fff;
549 549
   border-color: $main-color !important;
550 550
   background-color: $main-color !important;
551
+  @media only screen and (max-width: 812px) {
552
+    font-size: 14px !important;
553
+    line-height: 16px !important;
554
+    width: 16px !important;
555
+    height: 16px !important;
556
+  }
557
+}
558
+.van-checkbox__icon .van-icon {
559
+  @media only screen and (max-width: 812px) {
560
+    font-size: 14px !important;
561
+    line-height: 16px !important;
562
+    width: 16px !important;
563
+    height: 16px !important;
564
+  }
551 565
 }
552 566
 
553 567
 .CheckBox .van-checkbox__label {
554 568
   width: 94%;
555 569
   font-size: 0.34rem;
570
+  @media only screen and (max-width: 812px) {
571
+    width: 90%;
572
+  }
556 573
 }
557 574
 
558 575
 .mint-datetime-action {
@@ -568,7 +585,7 @@
568 585
   text-align: center;
569 586
   background: #fff;
570 587
   margin: 0 auto;
571
-  padding:0.3rem 0; 
588
+  padding: 0.3rem 0;
572 589
   img {
573 590
     width: 100%;
574 591
   }
@@ -624,37 +641,51 @@
624 641
   font-size: 0.32rem !important;
625 642
 }
626 643
 
627
-.el-radio+.el-radio {
644
+.el-radio + .el-radio {
628 645
   margin-left: 15px !important;
629 646
 }
630 647
 
631
-
632
-.el-button--mini{
648
+.el-button--mini {
633 649
   font-size: 0.32rem !important;
634 650
 }
635
-.el-form-item__label,.el-radio,.van-checkbox__label {
636
-  color: $title-color!important;
637
-}
638
-
639
-
640
-.el-collapse-item__header{
641
-  font-size: 0.35rem!important;
642
-  color: $pgh-color!important;
643
-  height: 64px!important;
644
-  line-height: 64px!important;
651
+.el-form-item__label,
652
+.el-radio,
653
+.van-checkbox__label {
654
+  color: $title-color !important;
655
+}
656
+
657
+.el-collapse-item__header {
658
+  font-size: 0.35rem !important;
659
+  color: $pgh-color !important;
660
+  height: 64px !important;
661
+  line-height: 64px !important;
662
+  @media only screen and (max-width: 812px) {
663
+    font-size: 0.35rem !important;
664
+    color: $pgh-color !important;
665
+    height: 48px !important;
666
+    line-height: 48px !important;
667
+  }
645 668
 }
646
-.el-collapse-item__arrow{
647
-  color: #a8b3ba!important;
648
-  line-height: 64px!important;
669
+.el-collapse-item__arrow {
670
+  color: #a8b3ba !important;
671
+  line-height: 64px !important;
672
+  @media only screen and (max-width: 812px) {
673
+    line-height: 48px !important;
674
+  }
649 675
 }
650 676
 
651
-
652 677
 // 搜索全局
653 678
 .search {
654 679
   color: #a8b3ba;
655
-  width: 4.2rem;
680
+  width: 4.4rem;
656 681
   float: right;
657 682
   font-size: 0.34rem;
683
+  .field {
684
+    @media only screen and (max-width: 812px) {
685
+      margin-top: 6px;
686
+    }
687
+  }
688
+
658 689
   .iconfont {
659 690
     color: #a8b3ba;
660 691
     font-size: 0.42rem;
@@ -665,9 +696,37 @@
665 696
     border-radius: 30px;
666 697
     display: flex;
667 698
     align-items: center;
668
-    height: 0.64rem!important;
669
-    line-height: 0.64rem!important;
670
-   
699
+    height: 0.64rem !important;
700
+    line-height: 0.64rem !important;
701
+    @media only screen and (max-width: 812px) {
702
+      padding: 0 0 0 4px;
703
+    }
704
+  }
705
+}
706
+.van-cell {
707
+  @media only screen and (max-width: 812px) {
708
+    font-size: 6px !important;
709
+  }
710
+}
711
+.van-field__left-icon {
712
+  @media only screen and (max-width: 812px) {
713
+    // margin-right: 0 !important;
714
+    margin-top: 1px;
715
+  }
716
+  .van-icon-arrow-down {
717
+    @media only screen and (max-width: 812px) {
718
+      font-size: 12px !important;
719
+    }
720
+  }
721
+}
722
+.van-field__button {
723
+  @media only screen and (max-width: 812px) {
724
+    padding-left: 0 !important;
725
+  }
726
+}
727
+.van-switch {
728
+  @media only screen and (max-width: 812px) {
729
+    font-size: 16px !important;
671 730
   }
672 731
 }
673 732
 
@@ -693,16 +752,19 @@
693 752
   }
694 753
 }
695 754
 
696
-.van-button--small{
697
-  font-size: 0.28rem!important;
755
+.van-button--small {
756
+  font-size: 0.28rem !important;
757
+  @media only screen and (max-width: 812px) {
758
+    min-width: 36px !important;
759
+  }
698 760
 }
699 761
 
700
-.el-input{
701
-  color: #1b2631!important;
702
-  font-size: 0.36rem!important;
762
+.el-input {
763
+  color: #1b2631 !important;
764
+  font-size: 0.36rem !important;
703 765
 }
704 766
 
705
-.el-collapse-item__content{
706
-  height: 7.4rem!important;
707
-    overflow-y: auto!important;
708
-}
767
+.el-collapse-item__content {
768
+  height: 7.4rem !important;
769
+  overflow-y: auto !important;
770
+}