Browse Source

Merge branch 'master' of http://git.shengws.com/csx/Vue_New

csx 5 years ago
parent
commit
666ba6d2e2

+ 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
-

+ 26 - 28
src/xt_pages/dialysis/template/DialysisPrintOrderNine.vue View File

@@ -1383,7 +1383,7 @@
1383 1383
                   </tr> -->
1384 1384
                   <tr>
1385 1385
                     <td width="70">拔针压迫:</td>
1386
-                    <td width="350">
1386
+                    <td width="300">
1387 1387
                       <div style="display:flex;justify-content:space-between;">
1388 1388
                         <label-box
1389 1389
                           showValue="自己压迫"
@@ -1405,12 +1405,6 @@
1405 1405
                             afterdialysis.hemostasis_opera == 1 ? true : false
1406 1406
                           "
1407 1407
                         ></label-box>
1408
-                        <label-box
1409
-                          showValue="内瘘止血带"
1410
-                          :isChecked="
1411
-                            afterdialysis.hemostasis_opera == 4 ? true : false
1412
-                          "
1413
-                        ></label-box>
1414 1408
                       </div>
1415 1409
                     </td>
1416 1410
                     <td width="50"></td>
@@ -1669,24 +1663,24 @@
1669 1663
                         ></label-box>
1670 1664
                       </div>
1671 1665
                     </td>
1672
-                    <!--<td width="80"></td>-->
1673
-                    <!--<td width="60">管路:</td>-->
1674
-                    <!--<td width="220">-->
1675
-                      <!--<div style="display:flex;justify-content:space-between;">-->
1676
-                        <!--<label-box showValue="无" :isChecked="-->
1677
-                            <!--afterdialysis.channel == 1 ? true : false-->
1678
-                          <!--"></label-box>-->
1679
-                        <!--<label-box showValue="+" :isChecked="-->
1680
-                            <!--afterdialysis.channel == 2 ? true : false-->
1681
-                          <!--"></label-box>-->
1682
-                        <!--<label-box showValue="+ +" :isChecked="-->
1683
-                            <!--afterdialysis.channel == 3  ? true : false-->
1684
-                          <!--"></label-box>-->
1685
-                        <!--<label-box showValue="+ + +" :isChecked="-->
1686
-                            <!--afterdialysis.channel == 4 ? true : false-->
1687
-                          <!--"></label-box>-->
1688
-                      <!--</div>-->
1689
-                    <!--</td>-->
1666
+                    <td width="80"></td>
1667
+                    <td width="60">管路:</td>
1668
+                    <td width="220">
1669
+                      <div style="display:flex;justify-content:space-between;">
1670
+                        <label-box showValue="无" :isChecked="
1671
+                            afterdialysis.channel == 1 ? true : false
1672
+                          "></label-box>
1673
+                        <label-box showValue="+" :isChecked="
1674
+                            afterdialysis.channel == 2 ? true : false
1675
+                          "></label-box>
1676
+                        <label-box showValue="+ +" :isChecked="
1677
+                            afterdialysis.channel == 3  ? true : false
1678
+                          "></label-box>
1679
+                        <label-box showValue="+ + +" :isChecked="
1680
+                            afterdialysis.channel == 4 ? true : false
1681
+                          "></label-box>
1682
+                      </div>
1683
+                    </td>
1690 1684
                     <td></td>
1691 1685
                   </tr>
1692 1686
                 </tbody>
@@ -1977,9 +1971,13 @@
1977 1971
             <td width="30">医生</td>
1978 1972
             <td width="80">
1979 1973
               <div class="under-line">
1980
-                &nbsp
1981
-                <span v-if=" setAdminUserES(prescription.creater) == '' " >{{ getAdminUser(prescription.creater)}}</span >
1982
-                <img style="height:20px;" :src="setAdminUserES(prescription.creater)" alt="" srcset="" v-else  />
1974
+                &nbsp;
1975
+                <span v-if="doctorForm.url === ''">{{
1976
+                  doctorForm.doctor
1977
+                }}</span>
1978
+                <span v-if="doctorForm.url !== ''">
1979
+                  <img style="height:20px" :src="doctorForm.url" />
1980
+                </span>
1983 1981
               </div>
1984 1982
             </td>
1985 1983
             <td width="50">治疗护士</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">