Browse Source

修改打印单

张保健 4 years ago
parent
commit
20cb6bfc60
1 changed files with 284 additions and 282 deletions
  1. 284 282
      src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue

+ 284 - 282
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue View File

@@ -582,10 +582,10 @@
582 582
                       style="width: 100px;text-align: center"
583 583
                     >
584 584
                       {{
585
-                        predialysis.weight_after_last_transparency
585
+                        lastafterdialysis.weight_after_last_transparency
586 586
                           ? parseFloat(
587
-                              predialysis.weight_after_last_transparency -
588
-                                predialysis.additional_weight
587
+                              lastafterdialysis.weight_after -
588
+                                lastafterdialysis.additional_weight
589 589
                             ).toFixed(1)
590 590
                           : "未称重"
591 591
                       }}
@@ -1942,19 +1942,19 @@
1942 1942
 </template>
1943 1943
 
1944 1944
 <script>
1945
-import CheckBox from "../batch_print/option_check_box";
1946
-import { getDialysisRecord } from "@/api/dialysis";
1947
-import { getDataConfig } from "@/utils/data";
1948
-import { jsGetAge, uParseTime } from "@/utils/tools";
1949
-import LabelBox from "../printItem/LabelBox";
1950
-import BreadCrumb from "@/xt_pages/components/bread-crumb";
1945
+import CheckBox from '../batch_print/option_check_box'
1946
+import { getDialysisRecord } from '@/api/dialysis'
1947
+import { getDataConfig } from '@/utils/data'
1948
+import { jsGetAge, uParseTime } from '@/utils/tools'
1949
+import LabelBox from '../printItem/LabelBox'
1950
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
1951 1951
 // import DialysisPrintOrderOne from './template/dialysisPrintOrderOne'
1952 1952
 // import DialysisPrintOrderTwo from './template/dialysisPrintOrderTwo'
1953
-import print from "print-js";
1953
+import print from 'print-js'
1954 1954
 
1955 1955
 export default {
1956
-  name: "dialysisPrintOrderSix",
1957
-  props: ["childResponse"],
1956
+  name: 'dialysisPrintOrderSix',
1957
+  props: ['childResponse'],
1958 1958
   components: {
1959 1959
     // DialysisPrintOrderOne,
1960 1960
     // DialysisPrintOrderTwo,
@@ -1974,34 +1974,34 @@ export default {
1974 1974
       nutrition_arr: [],
1975 1975
 
1976 1976
       crumbs: [
1977
-        { path: false, name: "透析管理" },
1978
-        { path: false, name: "打印单" }
1977
+        { path: false, name: '透析管理' },
1978
+        { path: false, name: '打印单' }
1979 1979
       ],
1980 1980
       operators: [],
1981 1981
       adminUser: [],
1982 1982
       check: {},
1983
-      xtdate: "",
1983
+      xtdate: '',
1984 1984
       dialysisOrder: {
1985 1985
         DeviceNumber: []
1986 1986
       },
1987 1987
       displaceLiquiPartOptions: [],
1988 1988
       operatorMaps: {},
1989 1989
       complications: [
1990
-        "低血压",
1991
-        "高血压",
1992
-        "心律失常",
1993
-        "头晕",
1994
-        "头痛",
1995
-        "呕吐",
1996
-        "抽搐",
1997
-        "出血",
1998
-        "心衰",
1999
-        "腹痛"
1990
+        '低血压',
1991
+        '高血压',
1992
+        '心律失常',
1993
+        '头晕',
1994
+        '头痛',
1995
+        '呕吐',
1996
+        '抽搐',
1997
+        '出血',
1998
+        '心衰',
1999
+        '腹痛'
2000 2000
       ],
2001 2001
       jilurow: 0,
2002 2002
       advice_jilurow: 0,
2003 2003
       loading: false,
2004
-      orgname: "",
2004
+      orgname: '',
2005 2005
       patientInfo_gender_1: false,
2006 2006
       patientInfo_gender_2: false,
2007 2007
       patientInfo_source_2: false,
@@ -2014,30 +2014,31 @@ export default {
2014 2014
       dialysateFormulationOptions: {},
2015 2015
       totollength: 0,
2016 2016
       queryParams: {
2017
-        xtdate: "",
2018
-        xtno: ""
2017
+        xtdate: '',
2018
+        xtno: ''
2019 2019
       },
2020 2020
       patientInfo: {
2021
-        birth: "",
2022
-        age: "",
2021
+        birth: '',
2022
+        age: '',
2023 2023
         DialysisSchedule: {
2024
-          device_number: { number: "" },
2025
-          device_zone: { name: "" }
2024
+          device_number: { number: '' },
2025
+          device_zone: { name: '' }
2026 2026
         },
2027 2027
         gender: 0
2028 2028
       },
2029 2029
       predialysis: {
2030
-        score: "",
2031
-        internal_fistula: "",
2032
-        internal_fistula_skin: "",
2033
-        catheter: "",
2034
-        blood_access_part_opera_name: ""
2030
+        score: '',
2031
+        internal_fistula: '',
2032
+        internal_fistula_skin: '',
2033
+        catheter: '',
2034
+        blood_access_part_opera_name: ''
2035 2035
       },
2036 2036
       afterdialysis: {
2037
-        complications_index: ""
2037
+        complications_index: ''
2038 2038
       },
2039
+      lastafterdialysis: {},
2039 2040
       prescription: {
2040
-        dialysate_formulation_name: "",
2041
+        dialysate_formulation_name: '',
2041 2042
         device: {}
2042 2043
       },
2043 2044
       advices: [],
@@ -2058,110 +2059,110 @@ export default {
2058 2059
 
2059 2060
       AlPanel: {
2060 2061
         id: 0,
2061
-        name: "",
2062
+        name: '',
2062 2063
         type: 1,
2063 2064
         shouji: 2,
2064 2065
         weichi: 2,
2065 2066
         zongliang: 2,
2066 2067
         gaimingcheng: -1,
2067 2068
         gaijiliang: -1,
2068
-        shouji_unit: "mg",
2069
-        weichi_unit: "mg/h",
2070
-        zongliang_unit: "mg",
2071
-        gaimingcheng_unit: "",
2072
-        gaijiliang_unit: ""
2069
+        shouji_unit: 'mg',
2070
+        weichi_unit: 'mg/h',
2071
+        zongliang_unit: 'mg',
2072
+        gaimingcheng_unit: '',
2073
+        gaijiliang_unit: ''
2073 2074
       }
2074
-    };
2075
+    }
2075 2076
   },
2076 2077
   methods: {
2077 2078
     getDisplaceLiquiPart: function(val) {
2078
-      let displace_liqui_part_name = "/";
2079
-      const displace_liqui_part = this.displaceLiquiPartOptions;
2079
+      let displace_liqui_part_name = '/'
2080
+      const displace_liqui_part = this.displaceLiquiPartOptions
2080 2081
       for (let i = 0; i < displace_liqui_part.length; i++) {
2081 2082
         if (displace_liqui_part[i].id == val) {
2082
-          displace_liqui_part_name = displace_liqui_part[i].name;
2083
+          displace_liqui_part_name = displace_liqui_part[i].name
2083 2084
         }
2084 2085
       }
2085
-      return displace_liqui_part_name;
2086
+      return displace_liqui_part_name
2086 2087
     },
2087 2088
     replacementWaysById: function(val) {
2088
-      let replacementWaysname = "/";
2089
+      let replacementWaysname = '/'
2089 2090
       // let vascular_access = getDataConfig('hemodialysis', 'vascular_access')
2090 2091
 
2091 2092
       for (let i = 0; i < this.replacementWays.length; i++) {
2092 2093
         if (this.replacementWays[i].id == val) {
2093
-          replacementWaysname = this.replacementWays[i].name;
2094
+          replacementWaysname = this.replacementWays[i].name
2094 2095
         }
2095 2096
       }
2096
-      return replacementWaysname;
2097
+      return replacementWaysname
2097 2098
     },
2098 2099
     QueryPartById: function(val) {
2099
-      let vascular_access_part_name = "/";
2100
-      const vascular_access = getDataConfig("hemodialysis", "vascular_access");
2100
+      let vascular_access_part_name = '/'
2101
+      const vascular_access = getDataConfig('hemodialysis', 'vascular_access')
2101 2102
 
2102 2103
       for (let i = 0; i < vascular_access.length; i++) {
2103 2104
         if (vascular_access[i].id == val) {
2104
-          vascular_access_part_name = vascular_access[i].name;
2105
+          vascular_access_part_name = vascular_access[i].name
2105 2106
         }
2106 2107
       }
2107
-      return vascular_access_part_name;
2108
+      return vascular_access_part_name
2108 2109
     },
2109 2110
     getAdminUser(id) {
2110 2111
       if (id == 0) {
2111
-        return "";
2112
+        return ''
2112 2113
       }
2113 2114
       if (id == undefined) {
2114
-        return "";
2115
+        return ''
2115 2116
       }
2116 2117
       for (let i = 0; i < this.adminUser.length; i++) {
2117 2118
         if (this.adminUser[i].id == id) {
2118
-          return this.adminUser[i].name;
2119
+          return this.adminUser[i].name
2119 2120
         }
2120 2121
       }
2121 2122
     },
2122 2123
     getTime(value, temp) {
2123 2124
       if (value == 0) {
2124
-        return "";
2125
+        return ''
2125 2126
       }
2126 2127
       if (value != undefined) {
2127
-        return uParseTime(value, temp);
2128
+        return uParseTime(value, temp)
2128 2129
       }
2129
-      return "";
2130
+      return ''
2130 2131
     },
2131 2132
     getUnit: function(val) {
2132 2133
       switch (val) {
2133 2134
         case 1:
2134
-          return "g";
2135
-          break;
2135
+          return 'g'
2136
+          break
2136 2137
         case 2:
2137
-          return "ml";
2138
-          break;
2138
+          return 'ml'
2139
+          break
2139 2140
       }
2140 2141
     },
2141 2142
     printThisPage() {
2142
-      var ptime = Math.round(new Date().getTime() / 1000);
2143
-      this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
2143
+      var ptime = Math.round(new Date().getTime() / 1000)
2144
+      this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}')
2144 2145
 
2145 2146
       const style =
2146
-        '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}.dialysis-print-order .print-table-no{width:100%;text-align:left;border-collapse:collapse;font-size:14px} .dialysis-print-order .under_line {display: inline-block;border-bottom: 1px solid #999;text-align:left;white-space: nowrap;width: 50%;} .dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}';
2147
+        '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}.dialysis-print-order .print-table-no{width:100%;text-align:left;border-collapse:collapse;font-size:14px} .dialysis-print-order .under_line {display: inline-block;border-bottom: 1px solid #999;text-align:left;white-space: nowrap;width: 50%;} .dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;}   .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;}  .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}'
2147 2148
 
2148 2149
       if (this.org_template_info.template_id == 1) {
2149 2150
         printJS({
2150
-          printable: "dialysis-print-box",
2151
-          type: "html",
2151
+          printable: 'dialysis-print-box',
2152
+          type: 'html',
2152 2153
           style: style,
2153 2154
           scanStyles: false
2154
-        });
2155
+        })
2155 2156
       } else if (
2156 2157
         this.org_template_info.template_id == 2 ||
2157 2158
         this.org_template_info.template_id == 0
2158 2159
       ) {
2159 2160
         printJS({
2160
-          printable: "dialysis-print-box-1",
2161
-          type: "html",
2161
+          printable: 'dialysis-print-box-1',
2162
+          type: 'html',
2162 2163
           style: style,
2163 2164
           scanStyles: false
2164
-        });
2165
+        })
2165 2166
       }
2166 2167
     },
2167 2168
     getNumber() {
@@ -2169,120 +2170,121 @@ export default {
2169 2170
         return (
2170 2171
           this.patientInfo.DialysisSchedule.device_zone.name +
2171 2172
           this.dialysisOrder.DeviceNumber.number
2172
-        );
2173
+        )
2173 2174
       } else {
2174 2175
         return (
2175 2176
           this.patientInfo.DialysisSchedule.device_zone.name +
2176 2177
           this.patientInfo.DialysisSchedule.device_number.number
2177
-        );
2178
+        )
2178 2179
       }
2179 2180
     },
2180 2181
 
2181 2182
     getXuserName(id) {
2182 2183
       if (id <= 0) {
2183
-        return "";
2184
+        return ''
2184 2185
       }
2185
-      var name = "";
2186
-      if (this.users == null || typeof this.users.length === "undefined") {
2187
-        return name;
2186
+      var name = ''
2187
+      if (this.users == null || typeof this.users.length === 'undefined') {
2188
+        return name
2188 2189
       }
2189
-      var leng = this.users.length;
2190
+      var leng = this.users.length
2190 2191
       if (leng == 0) {
2191
-        return name;
2192
+        return name
2192 2193
       }
2193 2194
       for (let index = 0; index < leng; index++) {
2194 2195
         if (this.users[index].id == id) {
2195
-          name = this.users[index].name;
2196
-          break;
2196
+          name = this.users[index].name
2197
+          break
2197 2198
         }
2198 2199
       }
2199
-      return name;
2200
+      return name
2200 2201
     },
2201 2202
     setAdminUserES(id) {
2202 2203
       if (id == 0) {
2203
-        return "";
2204
+        return ''
2204 2205
       }
2205 2206
       if (id in this.operatorMaps) {
2206
-        return this.operatorMaps[id].url;
2207
+        return this.operatorMaps[id].url
2207 2208
       } else {
2208
-        return "";
2209
+        return ''
2209 2210
       }
2210 2211
     },
2211 2212
     modeName(mode_id) {
2212
-      return typeof this.modeOptions[mode_id] !== "undefined" &&
2213
-        typeof this.modeOptions[mode_id].name !== "undefined"
2213
+      return typeof this.modeOptions[mode_id] !== 'undefined' &&
2214
+        typeof this.modeOptions[mode_id].name !== 'undefined'
2214 2215
         ? this.modeOptions[mode_id].name
2215
-        : "";
2216
+        : ''
2216 2217
     },
2217 2218
     getDialysisRecord() {
2218
-      this.loading = true;
2219
+      this.loading = true
2219 2220
 
2220 2221
       // getDialysisRecord(this.queryParams).then(response => {
2221
-      var response = this.childResponse;
2222
+      var response = this.childResponse
2222 2223
       if (response.data.state == 1) {
2223
-        this.adminUser = response.data.data.users;
2224
+        this.adminUser = response.data.data.users
2224 2225
 
2225
-        this.users = response.data.data.users;
2226
-        this.patientInfo = response.data.data.patientInfo;
2226
+        this.users = response.data.data.users
2227
+        this.patientInfo = response.data.data.patientInfo
2227 2228
 
2228 2229
         this.patientInfo.birth = uParseTime(
2229 2230
           this.patientInfo.birthday,
2230
-          "{y}-{m}-{d}"
2231
-        );
2231
+          '{y}-{m}-{d}'
2232
+        )
2232 2233
         // this.patientInfo.age = jsGetAge(this.patientInfo.birth, '-')
2233 2234
         if (response.data.data.patientInfo.first_dialysis_date != 0) {
2234 2235
           this.patientInfo.first_dialysis_date = uParseTime(
2235 2236
             response.data.data.patientInfo.first_dialysis_date,
2236
-            "{y}-{m}-{d}"
2237
-          );
2237
+            '{y}-{m}-{d}'
2238
+          )
2238 2239
         } else {
2239
-          this.patientInfo.first_dialysis_date = "";
2240
+          this.patientInfo.first_dialysis_date = ''
2240 2241
         }
2241
-        this.check = response.data.data.check;
2242
-        this.xtdate = response.data.data.xtdate;
2243
-        this.predialysis = response.data.data.PredialysisEvaluation;
2242
+        this.check = response.data.data.check
2243
+        this.xtdate = response.data.data.xtdate
2244
+        this.predialysis = response.data.data.PredialysisEvaluation
2244 2245
         this.predialysis.blood_access_part_opera_name = this.bloodAccessParOperaName(
2245 2246
           this.predialysis.blood_access_part_opera_id
2246
-        );
2247
-        this.afterdialysis = response.data.data.AssessmentAfterDislysis;
2248
-        this.operators = response.data.data.operators;
2249
-        console.log("operators", this.operators);
2247
+        )
2248
+        this.afterdialysis = response.data.data.AssessmentAfterDislysis
2249
+        this.lastafterdialysis = response.data.data.assessmentAfterDislysis
2250
+        this.operators = response.data.data.operators
2251
+        console.log('operators', this.operators)
2250 2252
         this.dialysisOrder =
2251 2253
           response.data.data.dialysisOrder === null
2252 2254
             ? null
2253
-            : response.data.data.dialysisOrder;
2255
+            : response.data.data.dialysisOrder
2254 2256
 
2255 2257
         if (this.operators.length > 0) {
2256
-          var operatorsLen = this.operators.length;
2258
+          var operatorsLen = this.operators.length
2257 2259
           for (var index = 0; index < operatorsLen; index++) {
2258 2260
             this.$set(
2259 2261
               this.operatorMaps,
2260 2262
               this.operators[index].creator,
2261 2263
               this.operators[index]
2262
-            );
2264
+            )
2263 2265
           }
2264 2266
         }
2265 2267
 
2266
-        this.afterdialysis.txqnx = -1;
2267
-        if (this.afterdialysis.cruor.indexOf("0度") > -1) {
2268
-          this.afterdialysis.txqnx = 0;
2268
+        this.afterdialysis.txqnx = -1
2269
+        if (this.afterdialysis.cruor.indexOf('0度') > -1) {
2270
+          this.afterdialysis.txqnx = 0
2269 2271
         }
2270
-        if (this.afterdialysis.cruor.indexOf("Ⅰ度") > -1) {
2271
-          this.afterdialysis.txqnx = 1;
2272
+        if (this.afterdialysis.cruor.indexOf('Ⅰ度') > -1) {
2273
+          this.afterdialysis.txqnx = 1
2272 2274
         }
2273
-        if (this.afterdialysis.cruor.indexOf("Ⅱ度") > -1) {
2274
-          this.afterdialysis.txqnx = 2;
2275
+        if (this.afterdialysis.cruor.indexOf('Ⅱ度') > -1) {
2276
+          this.afterdialysis.txqnx = 2
2275 2277
         }
2276
-        if (this.afterdialysis.cruor.indexOf("Ⅲ度") > -1) {
2277
-          this.afterdialysis.txqnx = 3;
2278
+        if (this.afterdialysis.cruor.indexOf('Ⅲ度') > -1) {
2279
+          this.afterdialysis.txqnx = 3
2278 2280
         }
2279 2281
 
2280 2282
         this.afterdialysis.complications = this.afterdialysis.complication.split(
2281
-          ","
2282
-        );
2283
-        this.afterdialysis.complications_other = [];
2284
-        this.afterdialysis.complications_index = [];
2285
-        var acllen = this.afterdialysis.complications.length;
2283
+          ','
2284
+        )
2285
+        this.afterdialysis.complications_other = []
2286
+        this.afterdialysis.complications_index = []
2287
+        var acllen = this.afterdialysis.complications.length
2286 2288
         for (let index = 0; index < acllen; index++) {
2287 2289
           if (
2288 2290
             this.complications.indexOf(
@@ -2291,7 +2293,7 @@ export default {
2291 2293
           ) {
2292 2294
             this.afterdialysis.complications_index.push(
2293 2295
               this.afterdialysis.complications[index]
2294
-            );
2296
+            )
2295 2297
           } else if (
2296 2298
             this.complications.indexOf(
2297 2299
               this.afterdialysis.complications[index]
@@ -2302,35 +2304,35 @@ export default {
2302 2304
           ) {
2303 2305
             this.afterdialysis.complications_other.push(
2304 2306
               this.afterdialysis.complications[index]
2305
-            );
2307
+            )
2306 2308
           }
2307 2309
         }
2308 2310
         this.afterdialysis.complications_other = this.afterdialysis.complications_other.join(
2309
-          ","
2310
-        );
2311
+          ','
2312
+        )
2311 2313
 
2312
-        this.prescription = response.data.data.dialysisPrescription;
2314
+        this.prescription = response.data.data.dialysisPrescription
2313 2315
         // console.log("透析处方", this.prescription);
2314 2316
         this.receiverTreatmentAccess =
2315
-          response.data.data.receiverTreatmentAccess;
2316
-        this.prescription.mode = this.modeName(this.prescription.mode_id);
2317
-        var rwLen = this.replacementWays.length;
2318
-        this.prescription.replacement = "";
2317
+          response.data.data.receiverTreatmentAccess
2318
+        this.prescription.mode = this.modeName(this.prescription.mode_id)
2319
+        var rwLen = this.replacementWays.length
2320
+        this.prescription.replacement = ''
2319 2321
         for (let index = 0; index < rwLen; index++) {
2320 2322
           if (
2321 2323
             this.replacementWays[index].id == this.prescription.replacement_way
2322 2324
           ) {
2323
-            this.prescription.replacement = this.replacementWays[index].name;
2324
-            break;
2325
+            this.prescription.replacement = this.replacementWays[index].name
2326
+            break
2325 2327
           }
2326 2328
         }
2327 2329
 
2328 2330
         this.prescription.dialysate_formulation_name = this.dialysateFormulationName(
2329 2331
           this.prescription.dialysate_formulation
2330
-        );
2332
+        )
2331 2333
 
2332
-        var paLen = this.perfusionApparatus.length;
2333
-        this.prescription.perfusion_apparatus_name = "";
2334
+        var paLen = this.perfusionApparatus.length
2335
+        this.prescription.perfusion_apparatus_name = ''
2334 2336
         for (let index = 0; index < paLen; index++) {
2335 2337
           if (
2336 2338
             this.perfusionApparatus[index].id ==
@@ -2338,122 +2340,122 @@ export default {
2338 2340
           ) {
2339 2341
             this.prescription.perfusion_apparatus_name = this.perfusionApparatus[
2340 2342
               index
2341
-            ].name;
2342
-            break;
2343
+            ].name
2344
+            break
2343 2345
           }
2344 2346
         }
2345 2347
 
2346
-        var acLen = this.anticoagulantsConfit.length;
2347
-        var thisALID = this.prescription.anticoagulant;
2348
-        this.prescription.anticoagulant_name = "";
2348
+        var acLen = this.anticoagulantsConfit.length
2349
+        var thisALID = this.prescription.anticoagulant
2350
+        this.prescription.anticoagulant_name = ''
2349 2351
 
2350 2352
         if (
2351
-          typeof this.anticoagulantsConfit[thisALID] !== "undefined" &&
2353
+          typeof this.anticoagulantsConfit[thisALID] !== 'undefined' &&
2352 2354
           this.anticoagulantsConfit[thisALID] != null
2353 2355
         ) {
2354 2356
           this.prescription.anticoagulant_name = this.anticoagulantsConfit[
2355 2357
             thisALID
2356
-          ].name;
2357
-          this.AlPanel = this.anticoagulantsConfit[thisALID];
2358
+          ].name
2359
+          this.AlPanel = this.anticoagulantsConfit[thisALID]
2358 2360
         }
2359 2361
 
2360
-        this.advices = response.data.data.advices;
2361
-        this.monitors = response.data.data.monitors;
2362
-        this.summary = response.data.data.summary;
2363
-        this.org_template_info = response.data.data.org_template_info;
2362
+        this.advices = response.data.data.advices
2363
+        this.monitors = response.data.data.monitors
2364
+        this.summary = response.data.data.summary
2365
+        this.org_template_info = response.data.data.org_template_info
2364 2366
 
2365 2367
         if (this.monitors.length <= 6) {
2366
-          var nl = 6;
2367
-          this.print_length = 6;
2368
+          var nl = 6
2369
+          this.print_length = 6
2368 2370
 
2369 2371
           for (let index = 0; index < nl; index++) {
2370 2372
             if (
2371 2373
               this.monitors[index] == undefined ||
2372 2374
               this.monitors[index].length <= 0
2373 2375
             ) {
2374
-              this.monitors2.push([]);
2376
+              this.monitors2.push([])
2375 2377
             } else {
2376
-              continue;
2378
+              continue
2377 2379
             }
2378 2380
           }
2379 2381
         }
2380 2382
 
2381
-        var tempmonitorflag = true;
2383
+        var tempmonitorflag = true
2382 2384
         for (let index = 0; index < this.monitors.length; index++) {
2383
-          const monitor = this.monitors[index];
2384
-          this.monitors[index].end = "";
2385
+          const monitor = this.monitors[index]
2386
+          this.monitors[index].end = ''
2385 2387
           if (Object.keys(monitor).length > 0 && index > 1) {
2386 2388
             if (monitor.operate_time == this.dialysisOrder.end_time) {
2387
-              this.monitors[index].end = "【结束透析】";
2388
-              tempmonitorflag = false;
2389
+              this.monitors[index].end = '【结束透析】'
2390
+              tempmonitorflag = false
2389 2391
             }
2390 2392
             if (tempmonitorflag && index == this.monitors.length - 1) {
2391
-              this.monitors[index].end = "【结束透析】";
2393
+              this.monitors[index].end = '【结束透析】'
2392 2394
             }
2393 2395
           }
2394 2396
         }
2395 2397
 
2396
-        this.jilurow = this.monitors.length + 1;
2398
+        this.jilurow = this.monitors.length + 1
2397 2399
 
2398
-        this.advice_jilurow = this.advices.length + 1;
2400
+        this.advice_jilurow = this.advices.length + 1
2399 2401
 
2400
-        var childMap = {};
2402
+        var childMap = {}
2401 2403
         for (const index in this.advices) {
2402 2404
           if (this.advices[index].parent_id == 0) {
2403
-            continue;
2405
+            continue
2404 2406
           }
2405 2407
           if (!(this.advices[index].parent_id in childMap)) {
2406
-            childMap[this.advices[index].parent_id] = [];
2408
+            childMap[this.advices[index].parent_id] = []
2407 2409
           }
2408
-          childMap[this.advices[index].parent_id].push(this.advices[index]);
2410
+          childMap[this.advices[index].parent_id].push(this.advices[index])
2409 2411
         }
2410 2412
 
2411
-        var advices = [];
2413
+        var advices = []
2412 2414
         for (const index in this.advices) {
2413 2415
           if (this.advices[index].parent_id > 0) {
2414
-            continue;
2416
+            continue
2415 2417
           }
2416
-          var item = this.advices[index];
2418
+          var item = this.advices[index]
2417 2419
           if (item.id in childMap) {
2418
-            item.children = childMap[item.id];
2420
+            item.children = childMap[item.id]
2419 2421
           } else {
2420
-            item.children = [];
2422
+            item.children = []
2421 2423
           }
2422
-          advices.push(item);
2424
+          advices.push(item)
2423 2425
         }
2424 2426
 
2425
-        var leftAdvice = [];
2426
-        var rightAdvice = [];
2427
-        var adlen = advices.length;
2427
+        var leftAdvice = []
2428
+        var rightAdvice = []
2429
+        var adlen = advices.length
2428 2430
 
2429
-        var halfLen = adlen % 2 == 0 ? adlen / 2 : (adlen + 1) / 2;
2431
+        var halfLen = adlen % 2 == 0 ? adlen / 2 : (adlen + 1) / 2
2430 2432
         for (var i = 0; i < halfLen; i++) {
2431
-          leftAdvice.push(advices[i]);
2432
-          rightAdvice.push(advices[i + halfLen]);
2433
+          leftAdvice.push(advices[i])
2434
+          rightAdvice.push(advices[i + halfLen])
2433 2435
         }
2434 2436
         if (halfLen < 5) {
2435
-          var nl = 5 - leftAdvice.length;
2437
+          var nl = 5 - leftAdvice.length
2436 2438
           for (let index = 0; index < nl; index++) {
2437
-            leftAdvice.push([]);
2439
+            leftAdvice.push([])
2438 2440
           }
2439
-          var nl = 5 - rightAdvice.length;
2441
+          var nl = 5 - rightAdvice.length
2440 2442
           for (let index = 0; index < nl; index++) {
2441
-            rightAdvice.push([]);
2443
+            rightAdvice.push([])
2442 2444
           }
2443 2445
         }
2444 2446
 
2445
-        this.advices = [];
2447
+        this.advices = []
2446 2448
         for (var i = 0; i < halfLen; i++) {
2447
-          var item = [];
2448
-          item.push(leftAdvice[i]);
2449
-          item.push(rightAdvice[i]);
2450
-          this.advices.push(item);
2449
+          var item = []
2450
+          item.push(leftAdvice[i])
2451
+          item.push(rightAdvice[i])
2452
+          this.advices.push(item)
2451 2453
         }
2452
-        this.loading = false;
2454
+        this.loading = false
2453 2455
         this.doctor_advices =
2454
-          response.data.data.advices == null ? [] : response.data.data.advices;
2456
+          response.data.data.advices == null ? [] : response.data.data.advices
2455 2457
         for (let index = 0; index < this.doctor_advices.length; index++) {
2456
-          this.doctor_advices[index]["isShow"] = 2;
2458
+          this.doctor_advices[index]['isShow'] = 2
2457 2459
         }
2458 2460
 
2459 2461
         // if (this.doctor_advices.length > 0) {
@@ -2535,57 +2537,57 @@ export default {
2535 2537
         //   }
2536 2538
         // }
2537 2539
         if (this.doctor_advices.length <= 6) {
2538
-          var nl = 6;
2539
-          this.print_length = 6;
2540
+          var nl = 6
2541
+          this.print_length = 6
2540 2542
 
2541 2543
           for (let index = 0; index < nl; index++) {
2542 2544
             if (
2543 2545
               this.doctor_advices[index] == undefined ||
2544 2546
               this.doctor_advices[index].length <= 0
2545 2547
             ) {
2546
-              this.doctor_advices.push([]);
2548
+              this.doctor_advices.push([])
2547 2549
             } else {
2548
-              continue;
2550
+              continue
2549 2551
             }
2550 2552
           }
2551 2553
         }
2552 2554
 
2553
-        this.totollength = this.doctor_advices.length + this.monitors.length;
2555
+        this.totollength = this.doctor_advices.length + this.monitors.length
2554 2556
         if (this.totollength > 18) {
2555
-          var temp_advice_length = 17 - this.monitors.length;
2556
-          var doctor_advices_1 = [];
2557
-          var doctor_advices_2 = [];
2557
+          var temp_advice_length = 17 - this.monitors.length
2558
+          var doctor_advices_1 = []
2559
+          var doctor_advices_2 = []
2558 2560
           for (let index = 0; index < this.doctor_advices.length; index++) {
2559
-            const element = this.doctor_advices[index];
2561
+            const element = this.doctor_advices[index]
2560 2562
             if (temp_advice_length > index) {
2561
-              doctor_advices_1.push(element);
2563
+              doctor_advices_1.push(element)
2562 2564
             } else {
2563
-              doctor_advices_2.push(element);
2565
+              doctor_advices_2.push(element)
2564 2566
             }
2565 2567
           }
2566
-          this.doctor_advices = doctor_advices_1;
2567
-          this.doctor_advices_2 = doctor_advices_2;
2568
+          this.doctor_advices = doctor_advices_1
2569
+          this.doctor_advices_2 = doctor_advices_2
2568 2570
         }
2569
-        console.log(this.advice_groups);
2571
+        console.log(this.advice_groups)
2570 2572
       } else {
2571
-        this.loading = false;
2572
-        this.$message.error("请求数据失败");
2573
-        return false;
2573
+        this.loading = false
2574
+        this.$message.error('请求数据失败')
2575
+        return false
2574 2576
       }
2575 2577
       // })
2576 2578
     },
2577 2579
 
2578 2580
     bloodAccessParOperaName(id) {
2579 2581
       if (id in this.bloodAccessParOpera) {
2580
-        return this.bloodAccessParOpera[id].name;
2582
+        return this.bloodAccessParOpera[id].name
2581 2583
       }
2582
-      return "";
2584
+      return ''
2583 2585
     },
2584 2586
     dialysateFormulationName(id) {
2585 2587
       if (id in this.dialysateFormulationOptions) {
2586
-        return this.dialysateFormulationOptions[id].name;
2588
+        return this.dialysateFormulationOptions[id].name
2587 2589
       }
2588
-      return "";
2590
+      return ''
2589 2591
     },
2590 2592
     getAge: function(val) {
2591 2593
       if (
@@ -2593,12 +2595,12 @@ export default {
2593 2595
         this.org_template_info.template_id == 0
2594 2596
       ) {
2595 2597
         if (val.age == 0) {
2596
-          return jsGetAge(val.birth, "-");
2598
+          return jsGetAge(val.birth, '-')
2597 2599
         } else {
2598
-          return val.age;
2600
+          return val.age
2599 2601
         }
2600 2602
       } else {
2601
-        return jsGetAge(val.birth, "-");
2603
+        return jsGetAge(val.birth, '-')
2602 2604
       }
2603 2605
     },
2604 2606
     newAdviceGroupObject: function() {
@@ -2613,119 +2615,119 @@ export default {
2613 2615
           // exec_time: 0,
2614 2616
           // checker: 0,
2615 2617
         }
2616
-      );
2618
+      )
2617 2619
     },
2618 2620
     getFloat: function(x) {
2619 2621
       if (x == 0) {
2620
-        return "/";
2622
+        return '/'
2621 2623
       }
2622
-      if (x != ".") {
2623
-        var f = Math.round(x * 100) / 100;
2624
-        var s = f.toString();
2625
-        var rs = s.indexOf(".");
2624
+      if (x != '.') {
2625
+        var f = Math.round(x * 100) / 100
2626
+        var s = f.toString()
2627
+        var rs = s.indexOf('.')
2626 2628
         if (rs <= 0) {
2627
-          rs = s.length;
2628
-          s += ".";
2629
+          rs = s.length
2630
+          s += '.'
2629 2631
         }
2630 2632
         while (s.length <= rs + 1) {
2631
-          s += "0";
2633
+          s += '0'
2632 2634
         }
2633
-        return s;
2635
+        return s
2634 2636
       } else {
2635
-        return "0.0";
2637
+        return '0.0'
2636 2638
       }
2637 2639
     }
2638 2640
   },
2639 2641
   watch: {
2640
-    "patientInfo.gender": function() {
2642
+    'patientInfo.gender': function() {
2641 2643
       if (this.patientInfo.gender == 1) {
2642
-        this.patientInfo_gender_1 = true;
2643
-        this.patientInfo_gender_2 = false;
2644
+        this.patientInfo_gender_1 = true
2645
+        this.patientInfo_gender_2 = false
2644 2646
       } else if (this.patientInfo.gender == 2) {
2645
-        this.patientInfo_gender_2 = true;
2646
-        this.patientInfo_gender_1 = false;
2647
+        this.patientInfo_gender_2 = true
2648
+        this.patientInfo_gender_1 = false
2647 2649
       } else {
2648
-        this.patientInfo_gender_2 = false;
2649
-        this.patientInfo_gender_1 = false;
2650
+        this.patientInfo_gender_2 = false
2651
+        this.patientInfo_gender_1 = false
2650 2652
       }
2651 2653
     },
2652
-    "patientInfo.source": function() {
2654
+    'patientInfo.source': function() {
2653 2655
       if (this.patientInfo.source == 1) {
2654
-        this.patientInfo_source_1 = true;
2655
-        this.patientInfo_source_2 = false;
2656
+        this.patientInfo_source_1 = true
2657
+        this.patientInfo_source_2 = false
2656 2658
       } else if (this.patientInfo.source == 2) {
2657
-        this.patientInfo_source_2 = true;
2658
-        this.patientInfo_source_1 = false;
2659
+        this.patientInfo_source_2 = true
2660
+        this.patientInfo_source_1 = false
2659 2661
       } else {
2660
-        this.patientInfo_source_2 = false;
2661
-        this.patientInfo_source_1 = false;
2662
+        this.patientInfo_source_2 = false
2663
+        this.patientInfo_source_1 = false
2662 2664
       }
2663 2665
     }
2664 2666
   },
2665 2667
   created() {
2666
-    this.way_arr = getDataConfig("hemodialysis", "way");
2667
-    this.consciousness_arr = getDataConfig("hemodialysis", "consciousness");
2668
-    this.appetite_arr = getDataConfig("hemodialysis", "appetite");
2669
-    this.posture_arr = getDataConfig("hemodialysis", "posture");
2670
-    this.sick_condition_arr = getDataConfig("hemodialysis", "sick_condition");
2671
-    this.precaution_arr = getDataConfig("hemodialysis", "precaution");
2672
-    this.intake_arr = getDataConfig("hemodialysis", "intake");
2673
-    this.nutrition_arr = getDataConfig("hemodialysis", "nutrition");
2674
-
2675
-    var xtuser = this.$store.getters.xt_user;
2676
-    this.orgname = xtuser.org.org_name;
2668
+    this.way_arr = getDataConfig('hemodialysis', 'way')
2669
+    this.consciousness_arr = getDataConfig('hemodialysis', 'consciousness')
2670
+    this.appetite_arr = getDataConfig('hemodialysis', 'appetite')
2671
+    this.posture_arr = getDataConfig('hemodialysis', 'posture')
2672
+    this.sick_condition_arr = getDataConfig('hemodialysis', 'sick_condition')
2673
+    this.precaution_arr = getDataConfig('hemodialysis', 'precaution')
2674
+    this.intake_arr = getDataConfig('hemodialysis', 'intake')
2675
+    this.nutrition_arr = getDataConfig('hemodialysis', 'nutrition')
2676
+
2677
+    var xtuser = this.$store.getters.xt_user
2678
+    this.orgname = xtuser.org.org_name
2677 2679
     // this.orgname = "遂溪方济医院";
2678
-    this.modeOptions = this.$store.getters.treatment_mode;
2679
-    this.replacementWays = this.$store.getters.replacement_ways;
2680
-    this.perfusionApparatus = this.$store.getters.perfusion_apparatus;
2681
-    this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit;
2682
-    this.displaceLiquiPartOptions = this.$store.getters.displace_liqui;
2680
+    this.modeOptions = this.$store.getters.treatment_mode
2681
+    this.replacementWays = this.$store.getters.replacement_ways
2682
+    this.perfusionApparatus = this.$store.getters.perfusion_apparatus
2683
+    this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit
2684
+    this.displaceLiquiPartOptions = this.$store.getters.displace_liqui
2683 2685
 
2684
-    this.blood_access_part = getDataConfig("hemodialysis", "vascular_access");
2686
+    this.blood_access_part = getDataConfig('hemodialysis', 'vascular_access')
2685 2687
     this.blood_access_part_opera = getDataConfig(
2686
-      "hemodialysis",
2687
-      "vascular_access_desc"
2688
-    );
2688
+      'hemodialysis',
2689
+      'vascular_access_desc'
2690
+    )
2689 2691
 
2690 2692
     // this.bloodAccessParOpera = getDataConfig('hemodialysis', 'vascular_access_desc')
2691 2693
 
2692 2694
     var bloodAccessParOpera = getDataConfig(
2693
-      "hemodialysis",
2694
-      "vascular_access_desc"
2695
-    );
2695
+      'hemodialysis',
2696
+      'vascular_access_desc'
2697
+    )
2696 2698
     for (var key in bloodAccessParOpera) {
2697 2699
       this.bloodAccessParOpera[bloodAccessParOpera[key].id] =
2698
-        bloodAccessParOpera[key];
2700
+        bloodAccessParOpera[key]
2699 2701
     }
2700 2702
 
2701 2703
     var dialysateFormulationOptions = getDataConfig(
2702
-      "hemodialysis",
2703
-      "dialysate_formulation"
2704
-    );
2704
+      'hemodialysis',
2705
+      'dialysate_formulation'
2706
+    )
2705 2707
     for (var key in dialysateFormulationOptions) {
2706 2708
       this.dialysateFormulationOptions[dialysateFormulationOptions[key].id] =
2707
-        dialysateFormulationOptions[key];
2709
+        dialysateFormulationOptions[key]
2708 2710
     }
2709 2711
 
2710
-    const xtdate = this.$route.query && this.$route.query.xtdate;
2711
-    console.log("xtdate", xtdate);
2712
-    const xtno = this.$route.query && this.$route.query.xtno;
2713
-    console.log("xtno", xtno);
2712
+    const xtdate = this.$route.query && this.$route.query.xtdate
2713
+    console.log('xtdate', xtdate)
2714
+    const xtno = this.$route.query && this.$route.query.xtno
2715
+    console.log('xtno', xtno)
2714 2716
     if (
2715
-      typeof xtdate === "string" &&
2717
+      typeof xtdate === 'string' &&
2716 2718
       xtdate.length > 0 &&
2717
-      typeof xtno === "string" &&
2719
+      typeof xtno === 'string' &&
2718 2720
       xtno.length > 0
2719 2721
     ) {
2720
-      this.queryParams.xtdate = xtdate;
2721
-      this.queryParams.xtno = xtno;
2722
-      this.getDialysisRecord();
2722
+      this.queryParams.xtdate = xtdate
2723
+      this.queryParams.xtno = xtno
2724
+      this.getDialysisRecord()
2723 2725
     } else {
2724
-      this.$message.error("参数不齐");
2725
-      return false;
2726
+      this.$message.error('参数不齐')
2727
+      return false
2726 2728
     }
2727 2729
   }
2728
-};
2730
+}
2729 2731
 </script>
2730 2732
 
2731 2733
 <style>