Browse Source

bug修改

XMLWAN 4 years ago
parent
commit
aee0f06f4d

+ 2 - 3
config/sit.env.js View File

@@ -2,10 +2,9 @@ module.exports = {
2 2
   NODE_ENV: '"production"',
3 3
   ENV_CONFIG: '"sit"',
4 4
   BASE_API: '"http://new_mobile.xt.api.sgjyun.com"',
5
-
6 5
   SSO_HOST: '"https://testsso.sgjyun.com"',
7 6
   SRCM_HOST: '"http://test1.sgjyun.com"',
8 7
   XT_HOST: '"http://xt.test.sgjyun.com"',
9 8
   MIRCO_MALL_HOST: '"https://mall.test.sgjyun.com"',
10
-  CDM_HOST: '"http://cdm.test.sgjyun.com"',
11
-}
9
+  CDM_HOST: '"http://cdm.test.sgjyun.com"'
10
+};

+ 0 - 1
src/api/manage.js View File

@@ -506,7 +506,6 @@ export function UpdateMacheineTwo(data) {
506 506
 }
507 507
 
508 508
 export function getBedForm(id, params) {
509
-  console.log('设备-id', id)
510 509
   return request({
511 510
     url: '/api/manage/getbedform?id=' + id,
512 511
     method: 'get',

+ 2 - 0
src/xt_pages/data/prescription.vue View File

@@ -913,6 +913,7 @@ export default {
913 913
     },
914 914
     changeThisAnticoagulant() {
915 915
       var thismode = parseInt(this.addPlan.anticoagulant);
916
+      console.log("------", thismode);
916 917
       if (isNaN(thismode) || thismode <= 0) {
917 918
         return false;
918 919
       }
@@ -976,6 +977,7 @@ export default {
976 977
     this.anticoagulantsSet = this.$store.getters.anticoagulants_set;
977 978
     this.replacementWays = this.$store.getters.replacement_ways;
978 979
     this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit;
980
+
979 981
     this.blood_filters = this.$store.getters.blood_filters;
980 982
     this.dialysate_formulation = this.$store.getters.dialysate_formulation;
981 983
     this.body_fluid_option = this.$store.getters.body_fluid;

+ 128 - 55
src/xt_pages/dialysis/PatientBox.vue View File

@@ -1,34 +1,67 @@
1 1
 <template>
2
-<div>
3
-  <!-- <router-link to="/dialysis/details"> -->
4
-    <div class="patient" v-for="schedule in schedules" v-if="schedule.patient" :class="borderColor(schedule)"  @click="detailAction(schedule)" :key="schedule.id">
5
-        <div class="kehu" >
6
-          <div class="tx">
7
-            <img :src="schedule.patient.avatar.length > 0 ? schedule.patient.avatar : '../../assets/home/analyze.png'" alt="">
8
-            <div class="right">
9
-               <h3 class="name">{{schedule.patient.name}}<span class="yc" v-show="isAbnormal(schedule)">异常</span></h3>
10
-               <span class="num">{{ genderText(schedule) }} | {{ age(schedule) }} 岁</span>
11
-            </div>
12
-          </div>
13
-          <div class="online" v-show="computeState(schedule) != 4" >
14
-            <p :class="stateColor(schedule)">{{stateText(schedule)}}</p>
2
+  <div>
3
+    <!-- <router-link to="/dialysis/details"> -->
4
+    <div
5
+      class="patient"
6
+      v-for="schedule in schedules"
7
+      v-if="schedule.patient"
8
+      :class="borderColor(schedule)"
9
+      @click="detailAction(schedule)"
10
+      :key="schedule.id"
11
+    >
12
+      <div class="kehu">
13
+        <div class="tx">
14
+          <img
15
+            :src="
16
+              schedule.patient.avatar.length > 0
17
+                ? schedule.patient.avatar
18
+                : '../../assets/home/analyze.png'
19
+            "
20
+            alt=""
21
+          />
22
+          <div class="right">
23
+            <h3 class="name">
24
+              {{ schedule.patient.name
25
+              }}<span class="yc" v-show="isAbnormal(schedule)">异常</span>
26
+            </h3>
27
+            <span class="num"
28
+              >{{ genderText(schedule) }} | {{ getAge(schedule) }} 岁</span
29
+            >
15 30
           </div>
16 31
         </div>
17
-      <div class="function" :class="functionColor(schedule)" >
32
+        <div class="online" v-show="computeState(schedule) != 4">
33
+          <p :class="stateColor(schedule)">{{ stateText(schedule) }}</p>
34
+        </div>
35
+      </div>
36
+      <div class="function" :class="functionColor(schedule)">
18 37
         <ul>
19
-          <li><span class="iconfont">&#xe6f5;</span>班次 : {{timeTypeText(schedule)}}</li>
20
-          <li><span class="iconfont">&#xe6de;</span>床位号 : {{schedule.device_number.number}}</li>
21
-          <li><span class="iconfont">&#xe6f6;</span>透析模式 : {{schedule.mode_id&&$store.getters.treatment_mode[schedule.mode_id]?$store.getters.treatment_mode[schedule.mode_id].name:''}}</li>
38
+          <li>
39
+            <span class="iconfont">&#xe6f5;</span>班次 :
40
+            {{ timeTypeText(schedule) }}
41
+          </li>
42
+          <li>
43
+            <span class="iconfont">&#xe6de;</span>床位号 :
44
+            {{ schedule.device_number.number }}
45
+          </li>
46
+          <li>
47
+            <span class="iconfont">&#xe6f6;</span>透析模式 :
48
+            {{
49
+              schedule.mode_id &&
50
+              $store.getters.treatment_mode[schedule.mode_id]
51
+                ? $store.getters.treatment_mode[schedule.mode_id].name
52
+                : ""
53
+            }}
54
+          </li>
22 55
         </ul>
23 56
       </div>
24 57
     </div>
25 58
     <!-- </router-link> -->
26
-</div>
59
+  </div>
27 60
 </template>
28 61
 
29 62
 <script>
30
-import { parseTime } from "@/utils"
31
-import { jsGetAge } from '@/utils/tools'
63
+import { parseTime } from "@/utils";
64
+import { jsGetAge } from "@/utils/tools";
32 65
 
33 66
 export default {
34 67
   name: "PatientBox",
@@ -68,7 +101,7 @@ export default {
68 101
   },
69 102
   props: {
70 103
     schedules: {
71
-      type: Array,
104
+      type: Array
72 105
     }
73 106
   },
74 107
   methods: {
@@ -116,54 +149,71 @@ export default {
116 149
       }
117 150
     },
118 151
     computeState: function(schedual) {
119
-      if (schedual.dialysis_order == null) { // 未上机
120
-        return 4
121
-      } else if (schedual.dialysis_order.stage == 2) { // 已下机
122
-        return 2
123
-      } else if (schedual.dialysis_order.stage == 1 && schedual.monitoring_records != null && schedual.monitoring_records.length > 1) { // 监测中
124
-        return 3
152
+      if (schedual.dialysis_order == null) {
153
+        // 未上机
154
+        return 4;
155
+      } else if (schedual.dialysis_order.stage == 2) {
156
+        // 已下机
157
+        return 2;
158
+      } else if (
159
+        schedual.dialysis_order.stage == 1 &&
160
+        schedual.monitoring_records != null &&
161
+        schedual.monitoring_records.length > 1
162
+      ) {
163
+        // 监测中
164
+        return 3;
125 165
       } else {
126
-        return 1
166
+        return 1;
127 167
       }
128 168
     },
129 169
 
130 170
     orderState: function(schedual) {
131
-      if (schedual.dialysis_order == null) { // 未上机
132
-        return 4
133
-      } else if (schedual.dialysis_order.stage == 2) { // 已下机
134
-        return 2
135
-      } else if (schedual.dialysis_order.stage == 1 && schedual.monitoring_records != null && schedual.monitoring_records.length > 1) { // 监测中
136
-        return 3
171
+      if (schedual.dialysis_order == null) {
172
+        // 未上机
173
+        return 4;
174
+      } else if (schedual.dialysis_order.stage == 2) {
175
+        // 已下机
176
+        return 2;
177
+      } else if (
178
+        schedual.dialysis_order.stage == 1 &&
179
+        schedual.monitoring_records != null &&
180
+        schedual.monitoring_records.length > 1
181
+      ) {
182
+        // 监测中
183
+        return 3;
137 184
       } else {
138
-        return 1
185
+        return 1;
139 186
       }
140 187
     },
141 188
     isAbnormal: function(schedual) {
142
-      return false // schedual.yc;
189
+      return false; // schedual.yc;
143 190
     },
144 191
     timeTypeText: function(schedual) {
145 192
       if (schedual.schedule_type == 1) {
146
-        return "上午"
193
+        return "上午";
147 194
       } else if (schedual.schedule_type == 2) {
148
-        return "下午"
195
+        return "下午";
149 196
       } else {
150
-        return "晚上"
197
+        return "晚上";
151 198
       }
152 199
     },
153 200
     genderText: function(schedual) {
154 201
       if (schedual.patient.gender == 0) {
155
-        return "未知"
202
+        return "未知";
156 203
       } else if (schedual.patient.gender == 1) {
157
-        return "男"
204
+        return "男";
158 205
       } else {
159
-        return "女"
206
+        return "女";
160 207
       }
161 208
     },
162 209
     age: function(schedual) {
163
-      if (schedual.patient.birthday == 0){
164
-        return ''
165
-      }else{
166
-        return jsGetAge(parseTime(schedual.patient.birthday, '{y}-{m}-{d}'), '-')
210
+      if (schedual.patient.birthday == 0) {
211
+        return "";
212
+      } else {
213
+        return jsGetAge(
214
+          parseTime(schedual.patient.birthday, "{y}-{m}-{d}"),
215
+          "-"
216
+        );
167 217
       }
168 218
 
169 219
       // var now = new Date()
@@ -173,10 +223,35 @@ export default {
173 223
       // // console.log(birthdayYear)
174 224
       // return nowYear - birthdayYear
175 225
     },
226
+    getAge: function(val) {
227
+      var thisLen = val.patient.id_card_no.length;
228
+      var birth = "";
229
+      if (thisLen == 15) {
230
+        birth = "19" + val.patient.id_card_no.substr(6, 6);
231
+      } else {
232
+        birth = val.patient.id_card_no.substr(6, 8);
233
+      }
234
+      var birthtwo =
235
+        birth.substr(0, 4) +
236
+        "-" +
237
+        birth.substr(4, 2) +
238
+        "-" +
239
+        birth.substr(6, 2);
240
+
241
+      var age = jsGetAge(birthtwo, "-");
242
+      return age;
243
+    },
176 244
     detailAction: function(schedual) {
177
-      var patient_id = schedual.patient_id
178
-      var date = schedual.schedule_date
179
-      this.$router.push({ path: "/dialysis/details", query: {patient_id: patient_id, date: date, patient_name: schedual.patient.name}})
245
+      var patient_id = schedual.patient_id;
246
+      var date = schedual.schedule_date;
247
+      this.$router.push({
248
+        path: "/dialysis/details",
249
+        query: {
250
+          patient_id: patient_id,
251
+          date: date,
252
+          patient_name: schedual.patient.name
253
+        }
254
+      });
180 255
     }
181 256
   }
182 257
 };
@@ -187,8 +262,8 @@ export default {
187 262
   border: 1px #e5e5ee solid;
188 263
   padding: 9px 0;
189 264
   margin: 0 15px 15px 0;
190
-    float: left;
191
-    width: 360px;
265
+  float: left;
266
+  width: 360px;
192 267
   cursor: pointer;
193 268
   .function {
194 269
     padding: 15px 5px 0 5px;
@@ -255,7 +330,7 @@ export default {
255 330
           }
256 331
         }
257 332
         .num {
258
-          font-size:13px;
333
+          font-size: 13px;
259 334
           color: #7b8a97;
260 335
         }
261 336
       }
@@ -268,7 +343,7 @@ export default {
268 343
       p {
269 344
         background: #c6cdd2;
270 345
         color: #fff;
271
-        width:65px;
346
+        width: 65px;
272 347
         height: 24px;
273 348
         line-height: 24px;
274 349
         border-radius: 4px;
@@ -301,5 +376,3 @@ export default {
301 376
   border: 1px #ff7979 solid;
302 377
 }
303 378
 </style>
304
-
305
-

+ 217 - 141
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue View File

@@ -9,9 +9,21 @@
9 9
     >
10 10
       <div v-show="edit == false">
11 11
         <div class="txsj">
12
-          <el-button round :disabled="!is_has_create" @click="newRecordAction">新增监测</el-button>
13
-          <el-button round :disabled="!is_has_modify && !is_has_modify_other" @click="modifyRecordAction">修改监测</el-button>
14
-          <el-button round :disabled="!is_has_del && !is_has_del_other" @click="deleteRecordAction">删除监测</el-button>
12
+          <el-button round :disabled="!is_has_create" @click="newRecordAction"
13
+            >新增监测</el-button
14
+          >
15
+          <el-button
16
+            round
17
+            :disabled="!is_has_modify && !is_has_modify_other"
18
+            @click="modifyRecordAction"
19
+            >修改监测</el-button
20
+          >
21
+          <el-button
22
+            round
23
+            :disabled="!is_has_del && !is_has_del_other"
24
+            @click="deleteRecordAction"
25
+            >删除监测</el-button
26
+          >
15 27
         </div>
16 28
         <el-table
17 29
           :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
@@ -155,7 +167,7 @@
155 167
             align="center"
156 168
             label="超滤量(L)"
157 169
             width="110"
158
-            v-if="isShow('超滤量') && template_id != 6 &&  template_id != 10"
170
+            v-if="isShow('超滤量') && template_id != 6 && template_id != 10"
159 171
           >
160 172
             <template slot-scope="scope">
161 173
               {{
@@ -200,7 +212,7 @@
200 212
             align="center"
201 213
             label="置换率(ml/min)"
202 214
             width="120"
203
-            v-if="isShow('置换率') && (template_id == 6  || template_id == 10)"
215
+            v-if="isShow('置换率') && (template_id == 6 || template_id == 10)"
204 216
           >
205 217
             <template slot-scope="scope">
206 218
               {{ scope.row.replacement_rate ? scope.row.replacement_rate : "" }}
@@ -371,7 +383,7 @@
371 383
               <el-button
372 384
                 size="mini"
373 385
                 type="primary"
374
-                @click="venousPressureChange(1)"
386
+                @click="venousPressureChangeOne"
375 387
                 >转换</el-button
376 388
               >
377 389
             </el-form-item>
@@ -385,7 +397,7 @@
385 397
               <el-button
386 398
                 size="mini"
387 399
                 type="primary"
388
-                @click="venousPressureChange(3)"
400
+                @click="venousPressureChangeTwo"
389 401
                 >转换</el-button
390 402
               >
391 403
             </el-form-item>
@@ -406,7 +418,7 @@
406 418
               <el-button
407 419
                 size="mini"
408 420
                 type="primary"
409
-                @click="venousPressureChange(2)"
421
+                @click="venousPressureChangeThree"
410 422
                 >转换</el-button
411 423
               >
412 424
             </el-form-item>
@@ -417,12 +429,18 @@
417 429
               <el-input v-model="form.ultrafiltration_rate"></el-input>
418 430
             </el-form-item>
419 431
           </el-col>
420
-          <el-col :span="8" v-if="isShow('超滤量') &&(template_id != 6 || template_id != 10)">
432
+          <el-col
433
+            :span="8"
434
+            v-if="isShow('超滤量') && (template_id != 6 || template_id != 10)"
435
+          >
421 436
             <el-form-item label="超滤量(ml):">
422 437
               <el-input v-model="form.ultrafiltration_volume"></el-input>
423 438
             </el-form-item>
424 439
           </el-col>
425
-          <el-col :span="8" v-if="isShow('超滤量') && template_id != 6 && template_id != 10">
440
+          <el-col
441
+            :span="8"
442
+            v-if="isShow('超滤量') && template_id != 6 && template_id != 10"
443
+          >
426 444
             <el-form-item label="超滤量(L):">
427 445
               <el-input v-model="form.ultrafiltration_volume"></el-input>
428 446
             </el-form-item>
@@ -598,21 +616,21 @@ import {
598 616
 } from "@/api/dialysis_record";
599 617
 import store from "@/store";
600 618
 
601
-import request from '@/utils/request'
619
+import request from "@/utils/request";
602 620
 
603 621
 export default {
604 622
   name: "MonitorDialog",
605 623
   data() {
606 624
     return {
607
-      is_has_create:true,
608
-      is_has_modify:true,
609
-      is_has_modify_other:true,
610
-      is_has_del:true,
611
-      is_has_del_other:true,
625
+      is_has_create: true,
626
+      is_has_modify: true,
627
+      is_has_modify_other: true,
628
+      is_has_del: true,
629
+      is_has_del_other: true,
612 630
       visible: false,
613 631
       edit: false,
614 632
       current_row_class: "current-box-class",
615
-      creator:0,
633
+      creator: 0,
616 634
       patient_id: 0,
617 635
       schedule_date: 0,
618 636
       template_id: 0,
@@ -656,7 +674,10 @@ export default {
656 674
       dispose_selecteds: [],
657 675
       dispose_options: getDataConfig("hemodialysis", "deals"),
658 676
       result_selecteds: [],
659
-      result_options: getDataConfig("hemodialysis", "results")
677
+      result_options: getDataConfig("hemodialysis", "results"),
678
+      value: 0,
679
+      valuetwo: 0,
680
+      valuethree: 0
660 681
     };
661 682
   },
662 683
   props: {
@@ -696,6 +717,54 @@ export default {
696 717
         );
697 718
       }
698 719
     },
720
+    venousPressureChangeOne() {
721
+      if (this.value == 0) {
722
+        this.form.venous_pressure = Math.ceil(
723
+          Math.round(this.form.venous_pressure * 7.5)
724
+        );
725
+        this.value = 1;
726
+        return false;
727
+      }
728
+      if (this.value == 1) {
729
+        this.form.venous_pressure = Math.ceil(
730
+          Math.round(this.form.venous_pressure / 7.5)
731
+        );
732
+        this.value = 0;
733
+        return false;
734
+      }
735
+    },
736
+    venousPressureChangeTwo() {
737
+      if (this.valuetwo == 0) {
738
+        this.form.arterial_pressure = Math.ceil(
739
+          Math.round(this.form.arterial_pressure * 7.5)
740
+        );
741
+        this.valuetwo = 1;
742
+        return false;
743
+      }
744
+      if (this.valuetwo == 1) {
745
+        this.form.arterial_pressure = Math.ceil(
746
+          Math.round(this.form.arterial_pressure / 7.5)
747
+        );
748
+        this.valuetwo = 0;
749
+        return false;
750
+      }
751
+    },
752
+    venousPressureChangeThree() {
753
+      if (this.valuethree == 0) {
754
+        this.form.transmembrane_pressure = Math.ceil(
755
+          Math.round(this.form.transmembrane_pressure * 7.5)
756
+        );
757
+        this.valuethree = 1;
758
+        return false;
759
+      }
760
+      if (this.valuethree == 1) {
761
+        this.form.transmembrane_pressure = Math.ceil(
762
+          Math.round(this.form.transmembrane_pressure / 7.5)
763
+        );
764
+        this.valuethree = 0;
765
+        return false;
766
+      }
767
+    },
699 768
     isShow(name) {
700 769
       var filedList = store.getters.xt_user.fileds;
701 770
       for (let i = 0; i < filedList.length; i++) {
@@ -713,7 +782,7 @@ export default {
713 782
       this.cancelEditAction();
714 783
     },
715 784
     show() {
716
-      this.getPermission()
785
+      this.getPermission();
717 786
       this.visible = true;
718 787
     },
719 788
     hide() {
@@ -786,10 +855,10 @@ export default {
786 855
         this.$message.error("请选择一条监测记录");
787 856
         return;
788 857
       }
789
-      this.creator = this.table_current_row.creator
790
-      console.log( this.table_current_row)
791
-      console.log( this.table_current_row.creator)
792
-      console.log(this.creator)
858
+      this.creator = this.table_current_row.creator;
859
+      console.log(this.table_current_row);
860
+      console.log(this.table_current_row.creator);
861
+      console.log(this.creator);
793 862
       this.setEditMonitor(this.table_current_row);
794 863
       this.$refs.table.setCurrentRow(null);
795 864
       this.edit = true;
@@ -979,111 +1048,114 @@ export default {
979 1048
         parseFloat(this.form.ktv) == NaN ? 0 : parseFloat(this.form.ktv);
980 1049
       this.form.monitoring_date = parseInt(this.form.monitoring_date);
981 1050
 
982
-
983
-      let mode = "1"
984
-       if(this.form.id > 0){
985
-         mode = "2"
986
-         if(this.creator > 0 && this.creator!= this.$store.getters.xt_user.user.id){
987
-          mode = "3"
988
-         }
1051
+      let mode = "1";
1052
+      if (this.form.id > 0) {
1053
+        mode = "2";
1054
+        if (
1055
+          this.creator > 0 &&
1056
+          this.creator != this.$store.getters.xt_user.user.id
1057
+        ) {
1058
+          mode = "3";
1059
+        }
989 1060
       }
990
-      editMonitor(this.patient_id, this.schedule_date, this.form,mode).then(rs => {
991
-        var resp = rs.data;
992
-        if (resp.state == 1) {
993
-          var monitor = resp.data.monitor;
994
-          if (this.isAdd) {
995
-            this.monitors.unshift(monitor);
996
-            this.monitors.sort((a, b) => b.operate_time - a.operate_time);
997
-            this.monitors.reverse();
998
-          } else {
999
-            for (let index = 0; index < this.monitors.length; index++) {
1000
-              const m = this.monitors[index];
1001
-              if (m.id == monitor.id) {
1002
-                for (const key in monitor) {
1003
-                  m[key] = monitor[key];
1061
+      editMonitor(this.patient_id, this.schedule_date, this.form, mode).then(
1062
+        rs => {
1063
+          var resp = rs.data;
1064
+          if (resp.state == 1) {
1065
+            var monitor = resp.data.monitor;
1066
+            if (this.isAdd) {
1067
+              this.monitors.unshift(monitor);
1068
+              this.monitors.sort((a, b) => b.operate_time - a.operate_time);
1069
+              this.monitors.reverse();
1070
+            } else {
1071
+              for (let index = 0; index < this.monitors.length; index++) {
1072
+                const m = this.monitors[index];
1073
+                if (m.id == monitor.id) {
1074
+                  for (const key in monitor) {
1075
+                    m[key] = monitor[key];
1076
+                  }
1077
+                  break;
1004 1078
                 }
1005
-                break;
1006 1079
               }
1007 1080
             }
1008
-          }
1009
-          this.reset();
1010
-        } else {
1011
-          this.form.systolic_bp =
1012
-            parseFloat(this.form.systolic_bp) == NaN
1013
-              ? 0
1014
-              : parseFloat(this.form.systolic_bp);
1015
-          this.form.diastolic_bp =
1016
-            parseFloat(this.form.diastolic_bp) == NaN
1017
-              ? 0
1018
-              : parseFloat(this.form.diastolic_bp);
1019
-          this.form.temperature =
1020
-            parseFloat(this.form.temperature) == NaN
1021
-              ? 0
1022
-              : parseFloat(this.form.temperature);
1023
-          this.form.pulse_frequency =
1024
-            parseFloat(this.form.pulse_frequency) == NaN
1025
-              ? 0
1026
-              : parseFloat(this.form.pulse_frequency);
1027
-          this.form.breathing_rated =
1028
-            parseFloat(this.form.breathing_rated) == NaN
1029
-              ? 0
1030
-              : parseFloat(this.form.breathing_rated);
1031
-          this.form.blood_flow_volume =
1032
-            parseFloat(this.form.blood_flow_volume) == NaN
1033
-              ? 0
1034
-              : parseFloat(this.form.blood_flow_volume);
1035
-          this.form.venous_pressure =
1036
-            parseFloat(this.form.venous_pressure) == NaN
1037
-              ? 0
1038
-              : parseFloat(this.form.venous_pressure);
1039
-          this.form.transmembrane_pressure =
1040
-            parseFloat(this.form.transmembrane_pressure) == NaN
1041
-              ? 0
1042
-              : parseFloat(this.form.transmembrane_pressure);
1043
-          this.form.ultrafiltration_volume =
1044
-            parseFloat(this.form.ultrafiltration_volume) == NaN
1045
-              ? 0
1046
-              : parseFloat(this.form.ultrafiltration_volume);
1047
-          this.form.ultrafiltration_rate =
1048
-            parseFloat(this.form.ultrafiltration_rate) == NaN
1049
-              ? 0
1050
-              : parseFloat(this.form.ultrafiltration_rate);
1051
-          this.form.arterial_pressure =
1052
-            parseFloat(this.form.arterial_pressure) == NaN
1053
-              ? 0
1054
-              : parseFloat(this.form.arterial_pressure);
1055
-          this.form.sodium_concentration =
1056
-            parseFloat(this.form.sodium_concentration) == NaN
1057
-              ? 0
1058
-              : parseFloat(this.form.sodium_concentration);
1059
-          this.form.dialysate_temperature =
1060
-            parseFloat(this.form.dialysate_temperature) == NaN
1061
-              ? 0
1062
-              : parseFloat(this.form.dialysate_temperature);
1063
-          this.form.replacement_rate =
1064
-            parseFloat(this.form.replacement_rate) == NaN
1065
-              ? 0
1066
-              : parseFloat(this.form.replacement_rate);
1067
-          this.form.displacement_quantity =
1068
-            parseFloat(this.form.displacement_quantity) == NaN
1069
-              ? 0
1070
-              : parseFloat(this.form.displacement_quantity);
1071
-          this.form.conductivity =
1072
-            parseFloat(this.form.conductivity) == NaN
1073
-              ? 0
1074
-              : parseFloat(this.form.conductivity);
1075
-          this.form.displacement_flow_quantity =
1076
-            parseFloat(this.form.displacement_flow_quantity) == NaN
1077
-              ? 0
1078
-              : parseFloat(this.form.displacement_flow_quantity);
1079
-
1080
-          this.form.ktv =
1081
-            parseFloat(this.form.ktv) == NaN ? 0 : parseFloat(this.form.ktv);
1081
+            this.reset();
1082
+          } else {
1083
+            this.form.systolic_bp =
1084
+              parseFloat(this.form.systolic_bp) == NaN
1085
+                ? 0
1086
+                : parseFloat(this.form.systolic_bp);
1087
+            this.form.diastolic_bp =
1088
+              parseFloat(this.form.diastolic_bp) == NaN
1089
+                ? 0
1090
+                : parseFloat(this.form.diastolic_bp);
1091
+            this.form.temperature =
1092
+              parseFloat(this.form.temperature) == NaN
1093
+                ? 0
1094
+                : parseFloat(this.form.temperature);
1095
+            this.form.pulse_frequency =
1096
+              parseFloat(this.form.pulse_frequency) == NaN
1097
+                ? 0
1098
+                : parseFloat(this.form.pulse_frequency);
1099
+            this.form.breathing_rated =
1100
+              parseFloat(this.form.breathing_rated) == NaN
1101
+                ? 0
1102
+                : parseFloat(this.form.breathing_rated);
1103
+            this.form.blood_flow_volume =
1104
+              parseFloat(this.form.blood_flow_volume) == NaN
1105
+                ? 0
1106
+                : parseFloat(this.form.blood_flow_volume);
1107
+            this.form.venous_pressure =
1108
+              parseFloat(this.form.venous_pressure) == NaN
1109
+                ? 0
1110
+                : parseFloat(this.form.venous_pressure);
1111
+            this.form.transmembrane_pressure =
1112
+              parseFloat(this.form.transmembrane_pressure) == NaN
1113
+                ? 0
1114
+                : parseFloat(this.form.transmembrane_pressure);
1115
+            this.form.ultrafiltration_volume =
1116
+              parseFloat(this.form.ultrafiltration_volume) == NaN
1117
+                ? 0
1118
+                : parseFloat(this.form.ultrafiltration_volume);
1119
+            this.form.ultrafiltration_rate =
1120
+              parseFloat(this.form.ultrafiltration_rate) == NaN
1121
+                ? 0
1122
+                : parseFloat(this.form.ultrafiltration_rate);
1123
+            this.form.arterial_pressure =
1124
+              parseFloat(this.form.arterial_pressure) == NaN
1125
+                ? 0
1126
+                : parseFloat(this.form.arterial_pressure);
1127
+            this.form.sodium_concentration =
1128
+              parseFloat(this.form.sodium_concentration) == NaN
1129
+                ? 0
1130
+                : parseFloat(this.form.sodium_concentration);
1131
+            this.form.dialysate_temperature =
1132
+              parseFloat(this.form.dialysate_temperature) == NaN
1133
+                ? 0
1134
+                : parseFloat(this.form.dialysate_temperature);
1135
+            this.form.replacement_rate =
1136
+              parseFloat(this.form.replacement_rate) == NaN
1137
+                ? 0
1138
+                : parseFloat(this.form.replacement_rate);
1139
+            this.form.displacement_quantity =
1140
+              parseFloat(this.form.displacement_quantity) == NaN
1141
+                ? 0
1142
+                : parseFloat(this.form.displacement_quantity);
1143
+            this.form.conductivity =
1144
+              parseFloat(this.form.conductivity) == NaN
1145
+                ? 0
1146
+                : parseFloat(this.form.conductivity);
1147
+            this.form.displacement_flow_quantity =
1148
+              parseFloat(this.form.displacement_flow_quantity) == NaN
1149
+                ? 0
1150
+                : parseFloat(this.form.displacement_flow_quantity);
1082 1151
 
1152
+            this.form.ktv =
1153
+              parseFloat(this.form.ktv) == NaN ? 0 : parseFloat(this.form.ktv);
1083 1154
 
1084
-          this.$message.error(resp.msg);
1155
+            this.$message.error(resp.msg);
1156
+          }
1085 1157
         }
1086
-      });
1158
+      );
1087 1159
     },
1088 1160
 
1089 1161
     symptomTextareaBlur: function() {
@@ -1143,16 +1215,19 @@ export default {
1143 1215
         type: "warning"
1144 1216
       })
1145 1217
         .then(() => {
1146
-          let mode = "4"
1147
-          if(this.table_current_row.creator > 0 && this.table_current_row.creator != this.$store.getters.xt_user.user.id){
1148
-            mode = "5"
1218
+          let mode = "4";
1219
+          if (
1220
+            this.table_current_row.creator > 0 &&
1221
+            this.table_current_row.creator !=
1222
+              this.$store.getters.xt_user.user.id
1223
+          ) {
1224
+            mode = "5";
1149 1225
           }
1150 1226
 
1151 1227
           const params = {
1152 1228
             patient_id: this.patient_id,
1153 1229
             record_id: this.table_current_row.id,
1154 1230
             mode: mode
1155
-
1156 1231
           };
1157 1232
 
1158 1233
           postDelMonitorInfo(params).then(response => {
@@ -1167,14 +1242,14 @@ export default {
1167 1242
                 }
1168 1243
               }
1169 1244
               this.$message.success("删除成功");
1170
-
1171 1245
             }
1172 1246
           });
1173 1247
         })
1174 1248
         .catch(() => {});
1175 1249
     },
1176 1250
     getPermission() {
1177
-        request.get("/api/func_per/get", {
1251
+      request
1252
+        .get("/api/func_per/get", {
1178 1253
           params: {
1179 1254
             create_url: "/api/dislysis/monitor/edit?mode=1",
1180 1255
             modify_url: "/api/dislysis/monitor/edit?mode=2",
@@ -1183,22 +1258,23 @@ export default {
1183 1258
             del_other_url: "/api/dialysis/monitor/del?mode=5",
1184 1259
             module: 7
1185 1260
           }
1186
-        }).then(res => {
1187
-          console.log(res)
1261
+        })
1262
+        .then(res => {
1263
+          console.log(res);
1188 1264
           if (res.data.state == 0) {
1189
-            this.hasPermission = false
1265
+            this.hasPermission = false;
1190 1266
           } else if (res.data.state == 1) {
1191
-            this.is_has_create = res.data.data.is_has_create
1192
-            this.is_has_exce = res.data.data.is_has_exce
1193
-            this.is_has_check = res.data.data.is_has_check
1194
-            this.is_has_modify = res.data.data.is_has_modify
1195
-            this.is_has_modify_other = res.data.data.is_has_modify_other
1196
-            this.is_has_modify_exce = res.data.data.is_has_modify_exce
1197
-            this.is_has_del = res.data.data.is_has_del
1198
-            this.is_has_del_other = res.data.data.is_has_del_other
1267
+            this.is_has_create = res.data.data.is_has_create;
1268
+            this.is_has_exce = res.data.data.is_has_exce;
1269
+            this.is_has_check = res.data.data.is_has_check;
1270
+            this.is_has_modify = res.data.data.is_has_modify;
1271
+            this.is_has_modify_other = res.data.data.is_has_modify_other;
1272
+            this.is_has_modify_exce = res.data.data.is_has_modify_exce;
1273
+            this.is_has_del = res.data.data.is_has_del;
1274
+            this.is_has_del_other = res.data.data.is_has_del_other;
1199 1275
           }
1200
-        })
1201
-      }
1276
+        });
1277
+    }
1202 1278
   }
1203 1279
 };
1204 1280
 </script>
@@ -1256,7 +1332,7 @@ export default {
1256 1332
 .el-table__body-wrapper::-webkit-scrollbar {
1257 1333
   height: 20px;
1258 1334
 }
1259
-.dialog_box .current-box-class .current-row{
1335
+.dialog_box .current-box-class .current-row {
1260 1336
   background: #87ceff;
1261 1337
 }
1262 1338
 .dialog_box tr:hover > td {

+ 36 - 1
src/xt_pages/management/components/RepairForm.vue View File

@@ -511,7 +511,7 @@ export default {
511 511
       getAllRepair(this.limit, this.page).then(response => {
512 512
         if (response.data.state === 1) {
513 513
           var repair = response.data.data.repair;
514
-          // console.log('repair是', repair)
514
+          console.log("repair是", repair);
515 515
           // eslint-disable-next-line no-unused-vars
516 516
           var total = response.data.data.total;
517 517
           this.total = total;
@@ -737,6 +737,41 @@ export default {
737 737
       ).then(response => {
738 738
         if (response.data.state === 1) {
739 739
           var repair = response.data.data.repair;
740
+          for (let index = 0; index < repair.length; index++) {
741
+            if (repair[index].failure_stage === 0) {
742
+              repair[index].failure_stage = "";
743
+            }
744
+
745
+            if (repair[index].failure_stage === 1) {
746
+              repair[index].failure_stage = "开机启动";
747
+            }
748
+            if (repair[index].failure_stage === 2) {
749
+              repair[index].failure_stage = "自检";
750
+            }
751
+            if (repair[index].failure_stage === 3) {
752
+              repair[index].failure_stage = "准备";
753
+            }
754
+            if (repair[index].failure_stage === 4) {
755
+              repair[index].failure_stage = "治疗";
756
+            }
757
+            if (repair[index].failure_stage === 5) {
758
+              repair[index].failure_stage = "消毒";
759
+            }
760
+
761
+            if (repair[index].exclude === 0) {
762
+              repair[index].exclude = "";
763
+            }
764
+
765
+            if (repair[index].exclude === 1) {
766
+              repair[index].exclude = "是";
767
+            }
768
+            if (repair[index].exclude === 2) {
769
+              repair[index].exclude = "待观察";
770
+            }
771
+            if (repair[index].exclude === 3) {
772
+              repair[index].exclude = "未解决";
773
+            }
774
+          }
740 775
           this.tableData = repair;
741 776
         }
742 777
       });

+ 15 - 18
src/xt_pages/management/components/UserForm.vue View File

@@ -1173,7 +1173,7 @@ export default {
1173 1173
             zone.push({ id: item.id, name: item.name });
1174 1174
           }
1175 1175
           this.zones = zone;
1176
-          //  console.log('zones', zones)
1176
+          //console.log("zones", zones);
1177 1177
           var numbers = response.data.data.numbers;
1178 1178
           var number = [{ id: 0, number: "全部" }];
1179 1179
           for (let index = 0; index < numbers.length; index++) {
@@ -1466,7 +1466,7 @@ export default {
1466 1466
       EditUser(id, patientid).then(response => {
1467 1467
         if (response.data.state === 1) {
1468 1468
           var device = response.data.data.device;
1469
-          console.log("device", device);
1469
+          //console.log("device", device);
1470 1470
           var patients = response.data.data.patients;
1471 1471
           // console.log('patients', patients)
1472 1472
           // eslint-disable-next-line no-sequences
@@ -1477,21 +1477,14 @@ export default {
1477 1477
             ));
1478 1478
           this.userform.patient_id = device.patient_id;
1479 1479
           this.userform.classtype = device.class;
1480
-          this.userform.zone = device.zone_id;
1480
+          this.userform.zone = device.zone;
1481 1481
           this.userform.bed_number = device.bed_number;
1482 1482
           this.userform.contagion = device.contagion;
1483 1483
           this.userform.patient_name = patients.name;
1484 1484
           this.userform.dialysis_mode = device.dialysis_mode;
1485
-          // this.userform.start_time = uParseTime(
1486
-          // device.start_time,
1487
-          //  '{y}-{m}-{d} {h}:{i}'
1488
-          // )
1485
+
1489 1486
           this.userform.start_time = this.updateTimes(device.start_time);
1490 1487
           this.userform.end_time = this.updateTimes(device.end_time);
1491
-          // this.userform.end_time = uParseTime(
1492
-          // device.end_time,
1493
-          // '{y}-{m}-{d} {h}:{i}'
1494
-          // )
1495 1488
 
1496 1489
           this.userform.dialysis_hour = device.dialysis_hour;
1497 1490
           this.userform.hyperfiltratio = device.hyperfiltratio;
@@ -1641,11 +1634,7 @@ export default {
1641 1634
       if (this.userform.clean === false) {
1642 1635
         this.userform.clean = 2;
1643 1636
       }
1644
-      // this.userform.start_time = this.getTimes(this.userform.start_time)
1645
-      // this.userform.end_time = this.getTimes(this.userform.end_time)
1646
-      // this.userform.starttime = this.getTimes(this.userform.starttime)
1647
-      // this.userform.endtime = this.getTimes(this.userform.endtime)
1648
-      // eslint-disable-next-line eqeqeq
1637
+
1649 1638
       if (this.userform.start_time == "") {
1650 1639
         this.userform.start_time = "0";
1651 1640
       }
@@ -1669,6 +1658,14 @@ export default {
1669 1658
       var statu = parseInt(status);
1670 1659
       this.userform.disinfection = statu;
1671 1660
 
1661
+      var hyperfiltratio = this.userform.hyperfiltratio;
1662
+      var hyperfiltratios = parseFloat(hyperfiltratio);
1663
+      this.userform.hyperfiltratio = hyperfiltratios;
1664
+
1665
+      var weightloss = this.userform.weight_loss;
1666
+      var weidht = parseFloat(weightloss);
1667
+      this.userform.weight_loss = weidht;
1668
+
1672 1669
       this.$refs[formName].validate(valid => {
1673 1670
         if (valid) {
1674 1671
           UpdateForm(this.userform).then(response => {
@@ -1694,7 +1691,7 @@ export default {
1694 1691
       ).then(response => {
1695 1692
         if (response.data.state === 1) {
1696 1693
           var information = response.data.data.infor;
1697
-          console.log("information", information);
1694
+          // console.log("information", information);
1698 1695
           for (let index = 0; index < information.length; index++) {
1699 1696
             if (information[index].class === 0) {
1700 1697
               information[index].class = "";
@@ -1982,7 +1979,7 @@ export default {
1982 1979
       getUserForm(id, this.limit, this.page).then(response => {
1983 1980
         if (response.data.state === 1) {
1984 1981
           var information = response.data.data.information;
1985
-          console.log("数据是-------", information);
1982
+          //console.log("数据是-------", information);
1986 1983
           // eslint-disable-next-line no-unused-vars
1987 1984
           var addmacher = response.data.data.addmacher;
1988 1985
           // console.log('addmacher', addmacher)

+ 2 - 2
src/xt_pages/management/home.vue View File

@@ -3797,14 +3797,14 @@ export default {
3797 3797
           this.userform.hyperfiltratio = 0
3798 3798
         }
3799 3799
         var hyperfiltratio = this.userform.hyperfiltratio
3800
-        var hyperfiltratios = parseInt(hyperfiltratio)
3800
+       var hyperfiltratios = parseFloat(hyperfiltratio)
3801 3801
         this.userform.hyperfiltratio = hyperfiltratios
3802 3802
 
3803 3803
         if (this.userform.weight_loss === '') {
3804 3804
           this.userform.weight_loss = 0
3805 3805
         }
3806 3806
         var weightloss = this.userform.weight_loss
3807
-        var weidht = parseInt(weightloss)
3807
+        var weidht = parseFloat(weightloss)
3808 3808
         this.userform.weight_loss = weidht
3809 3809
 
3810 3810
         if (this.userform.user_total === '0') {

+ 304 - 227
src/xt_pages/workforce/components/tableWeeks.vue View File

@@ -38,7 +38,7 @@
38 38
     >
39 39
       <el-table-column label="姓名" min-width="100" align="center">
40 40
         <template slot-scope="scope">
41
-          {{ scope.row.patient}}
41
+          {{ scope.row.patient }}
42 42
         </template>
43 43
       </el-table-column>
44 44
       <el-table-column label="分区" min-width="70" align="center">
@@ -58,7 +58,11 @@
58 58
       </el-table-column>
59 59
       <el-table-column label="透析模式" min-width="100" align="center">
60 60
         <template slot-scope="scope">
61
-          {{scope.row.mode_id && modeOptions[scope.row.mode_id] ? modeOptions[scope.row.mode_id].name:'' }}
61
+          {{
62
+            scope.row.mode_id && modeOptions[scope.row.mode_id]
63
+              ? modeOptions[scope.row.mode_id].name
64
+              : ""
65
+          }}
62 66
         </template>
63 67
       </el-table-column>
64 68
       <el-table-column label="透析器" min-width="100" align="center">
@@ -68,26 +72,72 @@
68 72
       </el-table-column>
69 73
       <el-table-column label="抗凝剂" min-width="100" align="center">
70 74
         <template slot-scope="scope">
71
-          {{
72
-            scope.row.prescription.anticoagulant
73
-              ? anticoagulants_confit[scope.row.prescription.anticoagulant].name
74
-              : ""
75
-          }}
75
+          <span v-if="scope.row.prescription.anticoagulant === 1">无肝素</span>
76
+          <span v-if="scope.row.prescription.anticoagulant === 2"
77
+            >普通肝素</span
78
+          >
79
+          <span v-if="scope.row.prescription.anticoagulant === 3"
80
+            >低分子肝素</span
81
+          >
82
+          <span v-if="scope.row.prescription.anticoagulant === 4"
83
+            >阿加曲班</span
84
+          >
85
+          <span v-if="scope.row.prescription.anticoagulant === 5"
86
+            >枸橼酸钠</span
87
+          >
88
+          <span v-if="scope.row.prescription.anticoagulant === 6"
89
+            >低分子肝素钙</span
90
+          >
91
+          <span v-if="scope.row.prescription.anticoagulant === 7"
92
+            >低分子肝素钠</span
93
+          >
76 94
         </template>
77 95
       </el-table-column>
78 96
       <el-table-column label="总量" min-width="100" align="center">
79 97
         <template slot-scope="scope">
80
-          <span v-if="scope.row.prescription.anticoagulant == 1">{{scope.row.prescription.anticoagulant_zongliang?scope.row.prescription.anticoagulant_zongliang+'mg':''}}</span>
81
-          <span v-if="scope.row.prescription.anticoagulant == 2">{{scope.row.prescription.anticoagulant_zongliang?scope.row.prescription.anticoagulant_zongliang+'iu':''}}</span>
82
-          <span v-if="scope.row.prescription.anticoagulant == 3">{{scope.row.prescription.anticoagulant_zongliang?scope.row.prescription.anticoagulant_zongliang+'iu':''}}</span>
83
-          <span v-if="scope.row.prescription.anticoagulant == 4">{{scope.row.prescription.anticoagulant_zongliang?scope.row.prescription.anticoagulant_zongliang+'mg':''}}</span>
84
-
98
+          <span v-if="scope.row.prescription.anticoagulant == 1">{{
99
+            scope.row.prescription.anticoagulant_zongliang
100
+              ? scope.row.prescription.anticoagulant_zongliang + "mg"
101
+              : ""
102
+          }}</span>
103
+          <span v-if="scope.row.prescription.anticoagulant == 2">{{
104
+            scope.row.prescription.anticoagulant_zongliang
105
+              ? scope.row.prescription.anticoagulant_zongliang + "iu"
106
+              : ""
107
+          }}</span>
108
+          <span v-if="scope.row.prescription.anticoagulant == 3">{{
109
+            scope.row.prescription.anticoagulant_zongliang
110
+              ? scope.row.prescription.anticoagulant_zongliang + "iu"
111
+              : ""
112
+          }}</span>
113
+          <span v-if="scope.row.prescription.anticoagulant == 4">{{
114
+            scope.row.prescription.anticoagulant_zongliang
115
+              ? scope.row.prescription.anticoagulant_zongliang + "mg"
116
+              : ""
117
+          }}</span>
118
+          <span v-if="scope.row.prescription.anticoagulant == 5">{{
119
+            scope.row.prescription.anticoagulant_zongliang
120
+              ? scope.row.prescription.anticoagulant_zongliang + "mg"
121
+              : ""
122
+          }}</span>
123
+          <span v-if="scope.row.prescription.anticoagulant == 6">{{
124
+            scope.row.prescription.anticoagulant_zongliang
125
+              ? scope.row.prescription.anticoagulant_zongliang + "iu"
126
+              : ""
127
+          }}</span>
128
+          <span v-if="scope.row.prescription.anticoagulant == 7">{{
129
+            scope.row.prescription.anticoagulant_zongliang
130
+              ? scope.row.prescription.anticoagulant_zongliang + "iu"
131
+              : ""
132
+          }}</span>
85 133
         </template>
86 134
       </el-table-column>
87 135
 
88 136
       <el-table-column label="长期医嘱" min-width="440" align="center">
89 137
         <template slot-scope="scope">
90
-           <span style="white-space: pre">{{getAdvice(scope.row.doctor_advice)}}</span>
138
+          <span style="white-space: pre">{{
139
+            getAdvice(scope.row.doctor_advice)
140
+          }}</span>
91 141
         </template>
92 142
       </el-table-column>
93 143
     </el-table>
@@ -95,241 +145,268 @@
95 145
 </template>
96 146
 
97 147
 <script>
98
-  import { getSchedules, getScheduleWeekDay } from '@/api/schedule'
99
-  import WeekItem from './WeekItem'
148
+import { getSchedules, getScheduleWeekDay } from "@/api/schedule";
149
+import WeekItem from "./WeekItem";
100 150
 
101
-  export default {
102
-    name: 'tableWeeks',
103
-    props: {
104
-      weekTime: {
105
-        type: String,
106
-        default: 'thisWeek'
107
-      }
108
-    },
151
+export default {
152
+  name: "tableWeeks",
153
+  props: {
154
+    weekTime: {
155
+      type: String,
156
+      default: "thisWeek"
157
+    }
158
+  },
109 159
 
110
-    data() {
111
-      return {
112
-        weekArr: [
113
-          { id: 1, name: '周一' },
114
-          { id: 2, name: '周二' },
115
-          { id: 3, name: '周三' },
116
-          { id: 4, name: '周四' },
117
-          { id: 5, name: '周五' },
118
-          { id: 6, name: '周六' },
119
-          { id: 7, name: '周日' }
120
-        ],
121
-        anticoagulants_confit: null,
160
+  data() {
161
+    return {
162
+      weekArr: [
163
+        { id: 1, name: "周一" },
164
+        { id: 2, name: "周二" },
165
+        { id: 3, name: "周三" },
166
+        { id: 4, name: "周四" },
167
+        { id: 5, name: "周五" },
168
+        { id: 6, name: "周六" },
169
+        { id: 7, name: "周日" }
170
+      ],
171
+      anticoagulants_confit: null,
122 172
 
123
-        week_type: '1',
124
-        weekTitle: ['', '', '', '', '', '', ''],
125
-        weekData: {
126
-          Monday: [],
127
-          Tuesday: [],
128
-          Wednesday: [],
129
-          Thursday: [],
130
-          Friday: [],
131
-          Saturday: [],
132
-          Sunday: []
133
-        },
134
-        scheduleData: [],
135
-        modeOptions: null
173
+      week_type: "1",
174
+      weekTitle: ["", "", "", "", "", "", ""],
175
+      weekData: {
176
+        Monday: [],
177
+        Tuesday: [],
178
+        Wednesday: [],
179
+        Thursday: [],
180
+        Friday: [],
181
+        Saturday: [],
182
+        Sunday: []
183
+      },
184
+      scheduleData: [],
185
+      modeOptions: null
186
+    };
187
+  },
188
+  watch: {
189
+    weekTime: function() {
190
+      var theType = this.weekType(this.weekTime);
191
+      this.getSchedules(theType);
192
+    }
193
+  },
194
+
195
+  methods: {
196
+    printAction() {
197
+      this.$router.push({
198
+        path: "/schedule/remind/print?week_type=" + this.week_type
199
+      });
200
+    },
201
+    getScheduleWeekDay(weekType) {
202
+      getScheduleWeekDay(weekType).then(response => {
203
+        this.scheduleData = [];
204
+        if (response.data.state == 1) {
205
+          this.scheduleData = response.data.data.schdules;
206
+          //console.log("排班-----", this.scheduleData);
207
+        } else {
208
+          this.$message.error("网络错误");
209
+          return false;
210
+        }
211
+      });
212
+    },
213
+
214
+    // getSchedules(weekType) {
215
+    //   getSchedules(weekType).then(response => {
216
+    //     this.scheduleData = []
217
+    //     if (response.data.state == 1) {
218
+    //       this.weekTitle = response.data.data.weekTitle
219
+    //       var theSchedules = response.data.data.schdules
220
+    //       var that = this
221
+    //       theSchedules.forEach(function(schedule) {
222
+    //         schedule['mode_name'] = typeof (that.modeOptions[schedule.mode_id]) == 'undefined' ? '' : that.modeOptions[schedule.mode_id].name
223
+    //         var weekPath = that.weekPath(schedule.schedule_week)
224
+    //         if (weekPath.length > 0) {
225
+    //           that.weekData[weekPath].push(schedule)
226
+    //         }
227
+    //       })
228
+    //       var rowNum = 0
229
+    //       console.log(that.weekData)
230
+    //       for (var index in that.weekData) {
231
+    //         var thisLen = that.weekData[index].length
232
+    //         rowNum = rowNum >= thisLen ? rowNum : thisLen
233
+    //       }
234
+    //       console.log(rowNum)
235
+    //       for (let index = 0; index < rowNum; index++) {
236
+    //         var dataItem = {}
237
+    //         for (var weekIndex in that.weekData) {
238
+    //           var weekItem = that.weekData[weekIndex].shift()
239
+    //           console.log('weekItem', weekItem)
240
+    //           if (typeof (weekItem) != 'undefined') {
241
+    //             dataItem[weekIndex] = weekItem
242
+    //           }
243
+    //         }
244
+    //         that.scheduleData.push(dataItem)
245
+    //       }
246
+    //
247
+    //       console.log(that.scheduleData)
248
+    //
249
+    //     } else {
250
+    //       this.$message.error('网络错误')
251
+    //       return false
252
+    //     }
253
+    //   })
254
+    // },
255
+    weekType(weekTime) {
256
+      var theType = 2;
257
+      switch (weekTime) {
258
+        case "lastWeek":
259
+          theType = 1;
260
+          break;
261
+        case "thisWeek":
262
+          theType = 2;
263
+          break;
264
+        case "nextWeek":
265
+          theType = 3;
266
+          break;
267
+        case "nextTwoWeek":
268
+          theType = 4;
269
+          break;
270
+        default:
271
+          theType = 2;
272
+          break;
136 273
       }
274
+      return theType;
137 275
     },
138
-    watch: {
139
-      weekTime: function() {
140
-        var theType = this.weekType(this.weekTime)
141
-        this.getSchedules(theType)
276
+    weekPath(week) {
277
+      var weekArr = {
278
+        1: "Monday",
279
+        2: "Tuesday",
280
+        3: "Wednesday",
281
+        4: "Thursday",
282
+        5: "Friday",
283
+        6: "Saturday",
284
+        7: "Sunday"
285
+      };
286
+      if (typeof weekArr[week] == "undefined") {
287
+        return "";
142 288
       }
289
+      return weekArr[week];
143 290
     },
291
+    selectWeekType(type) {
292
+      this.week_type = type;
293
+      let params = {
294
+        week_type: this.week_type
295
+      };
296
+      this.getScheduleWeekDay(params);
297
+    },
298
+    getSchedulesType: function(type) {
299
+      let type_name = "";
300
+      switch (type) {
301
+        case 1:
302
+          type_name = "上午";
303
+          break;
304
+        case 2:
305
+          type_name = "下午";
306
+          break;
307
+        case 3:
308
+          type_name = "晚上";
309
+          break;
310
+      }
311
+      return type_name;
312
+    },
313
+    getAdvice: function(doctor_advice) {
314
+      if (doctor_advice != null) {
315
+        let name = "";
316
+        for (let i = 0; i < doctor_advice.length; i++) {
317
+          let prescribing_number = "";
318
+          let single_dose = "";
319
+          let drug_spec = "";
144 320
 
145
-    methods: {
146
-      printAction(){
147
-        console.log("111111",this.week_type)
148
-        this.$router.push({ path: '/schedule/remind/print?week_type=' + this.week_type })
149
-
150
-      },
151
-      getScheduleWeekDay(weekType) {
152
-        getScheduleWeekDay(weekType).then(response => {
153
-          this.scheduleData = []
154
-          if (response.data.state == 1) {
155
-            this.scheduleData = response.data.data.schdules
156
-            console.log(this.scheduleData)
157
-          } else {
158
-            this.$message.error('网络错误')
159
-            return false
321
+          if (doctor_advice[i].prescribing_number > 0) {
322
+            prescribing_number =
323
+              doctor_advice[i].prescribing_number +
324
+              doctor_advice[i].prescribing_number_unit;
325
+          }
326
+          if (doctor_advice[i].single_dose > 0) {
327
+            single_dose =
328
+              " 单次用量 " +
329
+              doctor_advice[i].single_dose +
330
+              doctor_advice[i].single_dose_unit;
160 331
           }
161
-        })
162
-      },
163
-
164
-      // getSchedules(weekType) {
165
-      //   getSchedules(weekType).then(response => {
166
-      //     this.scheduleData = []
167
-      //     if (response.data.state == 1) {
168
-      //       this.weekTitle = response.data.data.weekTitle
169
-      //       var theSchedules = response.data.data.schdules
170
-      //       var that = this
171
-      //       theSchedules.forEach(function(schedule) {
172
-      //         schedule['mode_name'] = typeof (that.modeOptions[schedule.mode_id]) == 'undefined' ? '' : that.modeOptions[schedule.mode_id].name
173
-      //         var weekPath = that.weekPath(schedule.schedule_week)
174
-      //         if (weekPath.length > 0) {
175
-      //           that.weekData[weekPath].push(schedule)
176
-      //         }
177
-      //       })
178
-      //       var rowNum = 0
179
-      //       console.log(that.weekData)
180
-      //       for (var index in that.weekData) {
181
-      //         var thisLen = that.weekData[index].length
182
-      //         rowNum = rowNum >= thisLen ? rowNum : thisLen
183
-      //       }
184
-      //       console.log(rowNum)
185
-      //       for (let index = 0; index < rowNum; index++) {
186
-      //         var dataItem = {}
187
-      //         for (var weekIndex in that.weekData) {
188
-      //           var weekItem = that.weekData[weekIndex].shift()
189
-      //           console.log('weekItem', weekItem)
190
-      //           if (typeof (weekItem) != 'undefined') {
191
-      //             dataItem[weekIndex] = weekItem
192
-      //           }
193
-      //         }
194
-      //         that.scheduleData.push(dataItem)
195
-      //       }
196
-      //
197
-      //       console.log(that.scheduleData)
198
-      //
199
-      //     } else {
200
-      //       this.$message.error('网络错误')
201
-      //       return false
202
-      //     }
203
-      //   })
204
-      // },
205
-      weekType(weekTime) {
206
-        var theType = 2
207
-        switch (weekTime) {
208
-          case 'lastWeek':
209
-            theType = 1
210
-            break
211
-          case 'thisWeek':
212
-            theType = 2
213
-            break
214
-          case 'nextWeek':
215
-            theType = 3
216
-            break
217
-          case 'nextTwoWeek':
218
-            theType = 4
219
-            break
220
-          default:
221
-            theType = 2
222
-            break
223
-        }
224
-        return theType
225
-      },
226
-      weekPath(week) {
227
-        var weekArr = {
228
-          1: 'Monday',
229
-          2: 'Tuesday',
230
-          3: 'Wednesday',
231
-          4: 'Thursday',
232
-          5: 'Friday',
233
-          6: 'Saturday',
234
-          7: 'Sunday'
235
-        }
236
-        if (typeof (weekArr[week]) == 'undefined') {
237
-          return ''
238
-        }
239
-        return weekArr[week]
240
-      }, selectWeekType(type) {
241
-        this.week_type = type
242
-        let params = {
243
-          week_type: this.week_type
244
-        }
245
-        this.getScheduleWeekDay(params)
246
-      }, getSchedulesType: function(type) {
247
-        let type_name = ''
248
-        switch (type) {
249
-          case 1:
250
-            type_name = '上午'
251
-            break
252
-          case 2:
253
-            type_name = '下午'
254
-            break
255
-          case 3:
256
-            type_name = '晚上'
257
-            break
258
-        }
259
-        return type_name
260
-      },
261
-      getAdvice:function(doctor_advice) {
262
-        if (doctor_advice != null) {
263
-          let name = ""
264
-          for (let i = 0; i < doctor_advice.length; i++) {
265
-
266
-            let prescribing_number = ''
267
-            let single_dose = ''
268
-            let drug_spec = ''
269
-
270
-            if (doctor_advice[i].prescribing_number > 0) {
271
-              prescribing_number = doctor_advice[i].prescribing_number + doctor_advice[i].prescribing_number_unit
272
-            }
273
-            if (doctor_advice[i].single_dose > 0) {
274
-              single_dose = ' 单次用量 ' + doctor_advice[i].single_dose + doctor_advice[i].single_dose_unit
275
-            }
276
-
277
-            if (doctor_advice[i].drug_spec > 0) {
278
-              drug_spec = doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit
279
-            }
280
-
281
-            name = name + doctor_advice[i].advice_name + " " + drug_spec + " " + prescribing_number + " " + single_dose + " " + doctor_advice[i].delivery_way + " " + doctor_advice[i].execution_frequency + " " + doctor_advice[i].remark + "\n"
282
-
283
-            if (doctor_advice[i].child.length > 0) {
284 332
 
285
-              for (let a = 0; a < doctor_advice[i].child.length; a++) {
333
+          if (doctor_advice[i].drug_spec > 0) {
334
+            drug_spec =
335
+              doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit;
336
+          }
286 337
 
287
-                if (doctor_advice[i].child[a].prescribing_number > 0) {
288
-                  doctor_advice[i].child[a]['presc'] = doctor_advice[i].child[a].prescribing_number + doctor_advice[i].child[a].prescribing_number_unit
289
-                } else {
290
-                  doctor_advice[i].child[a]['presc'] = ''
291
-                }
338
+          name =
339
+            name +
340
+            doctor_advice[i].advice_name +
341
+            " " +
342
+            drug_spec +
343
+            " " +
344
+            prescribing_number +
345
+            " " +
346
+            single_dose +
347
+            " " +
348
+            doctor_advice[i].delivery_way +
349
+            " " +
350
+            doctor_advice[i].execution_frequency +
351
+            " " +
352
+            doctor_advice[i].remark +
353
+            "\n";
292 354
 
293
-                if (doctor_advice[i].child[a].single_dose > 0) {
294
-                  doctor_advice[i].child[a]['single'] = " " + ' 单次用量 ' + " " + doctor_advice[i].child[a].single_dose + doctor_advice[i].child[a].single_dose_unit
295
-                } else {
296
-                  doctor_advice[i].child[a]['single'] = ''
297
-                }
355
+          if (doctor_advice[i].child.length > 0) {
356
+            for (let a = 0; a < doctor_advice[i].child.length; a++) {
357
+              if (doctor_advice[i].child[a].prescribing_number > 0) {
358
+                doctor_advice[i].child[a]["presc"] =
359
+                  doctor_advice[i].child[a].prescribing_number +
360
+                  doctor_advice[i].child[a].prescribing_number_unit;
361
+              } else {
362
+                doctor_advice[i].child[a]["presc"] = "";
363
+              }
298 364
 
299
-                name = name + "▲" + doctor_advice[i].child[a].advice_name + ""
300
-                  + doctor_advice[i].child[a].advice_desc
301
-                  + doctor_advice[i].child[a].drug_spec_unit
302
-                  + doctor_advice[i].child[a].presc
303
-                  + doctor_advice[i].child[a].single + "\n"
365
+              if (doctor_advice[i].child[a].single_dose > 0) {
366
+                doctor_advice[i].child[a]["single"] =
367
+                  " " +
368
+                  " 单次用量 " +
369
+                  " " +
370
+                  doctor_advice[i].child[a].single_dose +
371
+                  doctor_advice[i].child[a].single_dose_unit;
372
+              } else {
373
+                doctor_advice[i].child[a]["single"] = "";
304 374
               }
305 375
 
376
+              name =
377
+                name +
378
+                "▲" +
379
+                doctor_advice[i].child[a].advice_name +
380
+                "" +
381
+                doctor_advice[i].child[a].advice_desc +
382
+                doctor_advice[i].child[a].drug_spec_unit +
383
+                doctor_advice[i].child[a].presc +
384
+                doctor_advice[i].child[a].single +
385
+                "\n";
306 386
             }
307
-
308 387
           }
309
-          return name
310
-
311 388
         }
389
+        return name;
312 390
       }
313
-    },
314
-    components: {
315
-      WeekItem
316
-    },
317
-    created() {
318
-      this.modeOptions = this.$store.getters.treatment_mode
319
-      this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
320
-
321
-
322
-      this.week_type = new Date().getDay()
323
-      if(this.week_type == 0){
324
-        this.week_type = 7
325
-
326
-      }
327
-      let params = {
328
-        week_type: this.week_type
329
-      }
330
-      this.getScheduleWeekDay(params)
331 391
     }
392
+  },
393
+  components: {
394
+    WeekItem
395
+  },
396
+  created() {
397
+    this.modeOptions = this.$store.getters.treatment_mode;
398
+    this.anticoagulants_confit = this.$store.getters.anticoagulants_confit;
399
+    console.log("抗凝机", this.anticoagulants_confit);
400
+    this.week_type = new Date().getDay();
401
+    if (this.week_type == 0) {
402
+      this.week_type = 7;
403
+    }
404
+    let params = {
405
+      week_type: this.week_type
406
+    };
407
+    this.getScheduleWeekDay(params);
332 408
   }
409
+};
333 410
 </script>
334 411
 
335 412
 <style rel="stylesheet/css" lang="scss">