瀏覽代碼

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

csx 2 年之前
父節點
當前提交
b63d7a4f95
共有 2 個文件被更改,包括 82 次插入203 次删除
  1. 82 201
      src/xt_pages/dialysis/batch_print/batch_print_order_six.vue
  2. 0 2
      src/xt_pages/workforce/appointment.vue

+ 82 - 201
src/xt_pages/dialysis/batch_print/batch_print_order_six.vue 查看文件

@@ -350,21 +350,14 @@
350 350
                                     .blood_access_part_id
351 351
                                 : 0
352 352
                           }}
353
-                          <!-- {{
353
+                          {{
354 354
                             record.assessment_before_dislysis &&
355 355
                             record.assessment_before_dislysis
356 356
                               .blood_access_part_opera_name
357 357
                               ? record.assessment_before_dislysis
358 358
                                   .blood_access_part_opera_name
359 359
                               : ""
360
-                          }} -->
361
-                          <span v-for="(item, index) in arrtwo" :key="index">
362
-                          {{
363
-                           record.blood_access_part_opera_id == item.id
364
-                         ? item.name
365
-                            : ""
366 360
                           }}
367
-                        </span>
368 361
                         </div>
369 362
                       </div>
370 363
                       <div class="inline_block" style="flex:1;">
@@ -1142,7 +1135,6 @@
1142 1135
                             执行人签名
1143 1136
                           </td>
1144 1137
                           <td style="font-size: 16px" width="10%">时间</td>
1145
-                          <td style="font-size: 16px" width="10%" v-if="org_id == 10223 ||org_id == 0||org_id == 4">核对者</td>
1146 1138
                         </tr>
1147 1139
                         <!-- <template v-for="group in doctor_advices" > -->
1148 1140
                         <tr
@@ -1150,51 +1142,54 @@
1150 1142
                           :key="advice_index"
1151 1143
                         >
1152 1144
                           <td height="35px">
1153
-                            <span v-if="advice.start_time">
1154
-                              {{ getTime(advice.start_time, "{h}:{i}") }}
1145
+                            <span v-if="advice[0].start_time">
1146
+                              {{ getTime(advice[0].start_time, "{h}:{i}") }}
1155 1147
                             </span>
1148
+                            <!-- <span v-else>&nbsp;<br/>&nbsp;</span> -->
1156 1149
                           </td>
1157
-                          
1158 1150
                           <td
1159 1151
                             height="35px"
1160 1152
                             colspan="2"
1161 1153
                             class="advice-name"
1162 1154
                             style="padding-left:7px;"
1163 1155
                           >
1164
-                            <span v-if="advice.parent_id > 0">---></span>
1165
-                            <span>{{ advice.advice_name }}</span>
1166
-                            <span v-if=" advice[advice_index] && advice.advice_desc != undefined">
1167
-                               ({{ advice.advice_desc}}{{ advice.drug_spec_unit }} )
1156
+                            <span v-if="advice[0].parent_id > 0">---></span>
1157
+                            <span>{{ advice[0].advice_name }}</span>
1158
+                            <span v-if=" advice[advice_index] && advice[0].advice_desc != undefined">
1159
+                               ({{ advice[0].advice_desc}}{{ advice[0].drug_spec_unit }} )
1168 1160
                             </span>
1169
-                            <span v-if="advice.prescribing_number"
1170
-                              >&nbsp;&nbsp; {{ advice.prescribing_number
1171
-                              }}{{ advice.prescribing_number_unit }}</span
1161
+                            <span v-if="advice[0].prescribing_number"
1162
+                              >&nbsp;&nbsp; {{ advice[0].prescribing_number
1163
+                              }}{{ advice[0].prescribing_number_unit }}</span
1172 1164
                             >
1173
-                            <span v-if="advice.single_dose != 0">
1174
-                              {{ advice.single_dose
1175
-                              }}{{ advice.single_dose_unit }}</span
1165
+                            <span v-if="advice[0].single_dose != 0">
1166
+                              {{ advice[0].single_dose
1167
+                              }}{{ advice[0].single_dose_unit }}</span
1176 1168
                             >
1177 1169
                             <span
1178 1170
                               v-if="
1179
-                                advice.parent_id == 0
1171
+                                advice[0].parent_id == 0 &&
1172
+                                  advice[0].children.length == 0
1180 1173
                               "
1181
-                              >{{ advice.delivery_way }}</span
1174
+                              >{{ advice[0].delivery_way }}</span
1182 1175
                             >
1183 1176
                             <span
1184 1177
                               v-if="
1185
-                                advice.parent_id == 0 
1178
+                                advice[0].parent_id == 0 &&
1179
+                                  advice[0].children.length == 0
1186 1180
                               "
1187
-                              >{{ advice.execution_frequency }}</span
1181
+                              >{{ advice[0].execution_frequency }}</span
1188 1182
                             >
1189 1183
                             <span
1190 1184
                               v-if="
1191
-                                advice.parent_id ==0 &&
1192
-                                  advice.remark.length > 0
1185
+                                advice[0].parent_id == 0 &&
1186
+                                  advice[0].children &&
1187
+                                  advice[0].children.length == 0 &&
1188
+                                  advice[0].remark.length > 0
1193 1189
                               "
1194
-                              >({{ advice.remark }})</span
1190
+                              >({{ advice[0].remark }})</span
1195 1191
                             >
1196 1192
                           </td>
1197
-
1198 1193
                           <td height="35px">
1199 1194
                             <span
1200 1195
                               v-if="
@@ -1238,35 +1233,11 @@
1238 1233
                               style="height: 40px;"
1239 1234
                             />
1240 1235
                           </td>
1241
-
1242
-
1243 1236
                           <td height="35px">
1244
-                            <span v-if="advice.execution_time">{{
1245
-                              getTime(advice.execution_time, " {h}:{i}")
1237
+                            <span v-if="advice[0].execution_time">{{
1238
+                              getTime(advice[0].execution_time, " {h}:{i}")
1246 1239
                             }}</span>
1247 1240
                           </td>
1248
-
1249
-                          <td height="35px" v-if="org_id == 10223||org_id == 0||org_id == 4">
1250
-                            <span
1251
-                              v-if="
1252
-                                setAdminUserES(advice[0], 'checker') ==
1253
-                                  ''
1254
-                              "
1255
-                              >{{
1256
-                                getAdminUser(advice[0], "checker")
1257
-                              }}</span
1258
-                            >
1259
-                            <img
1260
-                              class="es-img"
1261
-                              :src="
1262
-                                setAdminUserES(advice[0], 'checker')
1263
-                              "
1264
-                              alt=""
1265
-                              srcset=""
1266
-                              v-else
1267
-                              style="height: 40px;"
1268
-                            />
1269
-                          </td>
1270 1241
                         </tr>
1271 1242
                         <!-- </template> -->
1272 1243
                       </tbody>
@@ -2023,7 +1994,7 @@ export default {
2023 1994
       precaution_arr: [],
2024 1995
       intake_arr: [],
2025 1996
       nutrition_arr: [],
2026
-      arrtwo: [],
1997
+
2027 1998
       records: [
2028 1999
         // 模拟有多条数据
2029 2000
         // {
@@ -2085,84 +2056,6 @@ export default {
2085 2056
       "hemodialysis",
2086 2057
       "vascular_access_desc"
2087 2058
     );
2088
-    var arrtwo = [];
2089
-    for (let i = 0; i < bloodAccessParOpera.length; i++) {
2090
-      if (bloodAccessParOpera[i].name == "内瘘波动及震颤-存在") {
2091
-        bloodAccessParOpera[i].name = "存在";
2092
-        arr.push(bloodAccessParOpera[i]);
2093
-      }
2094
-      if (bloodAccessParOpera[i].name == "内瘘波动及震颤-减弱") {
2095
-        bloodAccessParOpera[i].name = "减弱";
2096
-        arr.push(bloodAccessParOpera[i]);
2097
-      }
2098
-      if (bloodAccessParOpera[i].name == "内瘘波动及震颤-消失") {
2099
-        bloodAccessParOpera[i].name = "消失";
2100
-        arr.push(bloodAccessParOpera[i]);
2101
-      }
2102
-      if (bloodAccessParOpera[i].name == "直穿") {
2103
-        arrtwo.push(bloodAccessParOpera[i]);
2104
-      }
2105
-      if (bloodAccessParOpera[i].name == "动脉直穿") {
2106
-        arrtwo.push(bloodAccessParOpera[i]);
2107
-      }
2108
-      if (bloodAccessParOpera[i].name == "动静脉直穿") {
2109
-        arrtwo.push(bloodAccessParOpera[i]);
2110
-      }
2111
-      if (bloodAccessParOpera[i].name == "带隧道带绦纶套股静脉导管") {
2112
-        arrtwo.push(bloodAccessParOpera[i]);
2113
-      }
2114
-      if (bloodAccessParOpera[i].name == "带隧道带绦纶套锁骨下静脉导管") {
2115
-        arrtwo.push(bloodAccessParOpera[i]);
2116
-      }
2117
-      if (bloodAccessParOpera[i].name == "带隧道带绦纶套颈内静脉导管") {
2118
-        arrtwo.push(bloodAccessParOpera[i]);
2119
-      }
2120
-      if (bloodAccessParOpera[i].name == "无绦纶套股静脉导管") {
2121
-        arrtwo.push(bloodAccessParOpera[i]);
2122
-      }
2123
-      if (bloodAccessParOpera[i].name == "无绦纶套锁骨下静脉导管") {
2124
-        arrtwo.push(bloodAccessParOpera[i]);
2125
-      }
2126
-      if (bloodAccessParOpera[i].name == "无绦纶套颈内静脉导管") {
2127
-        arrtwo.push(bloodAccessParOpera[i]);
2128
-      }
2129
-      if (bloodAccessParOpera[i].name == "直线型移植血管动静脉内瘘") {
2130
-        arrtwo.push(bloodAccessParOpera[i]);
2131
-      }
2132
-      if (bloodAccessParOpera[i].name == "自体动静脉内瘘") {
2133
-        arrtwo.push(bloodAccessParOpera[i]);
2134
-      }
2135
-      if (bloodAccessParOpera[i].name == "袢型移植血管动静脉内瘘") {
2136
-        arrtwo.push(bloodAccessParOpera[i]);
2137
-      }
2138
-      if (bloodAccessParOpera[i].name == "静脉直穿") {
2139
-        arrtwo.push(bloodAccessParOpera[i]);
2140
-      }
2141
-      if (bloodAccessParOpera[i].name == "AVG") {
2142
-        arrtwo.push(bloodAccessParOpera[i]);
2143
-      }
2144
-      if (bloodAccessParOpera[i].name == "自体内瘘") {
2145
-        arrtwo.push(bloodAccessParOpera[i]);
2146
-      }
2147
-      if (bloodAccessParOpera[i].name == "AVF") {
2148
-        arrtwo.push(bloodAccessParOpera[i]);
2149
-      }
2150
-      if (bloodAccessParOpera[i].name == "颈内静脉") {
2151
-        arrtwo.push(bloodAccessParOpera[i]);
2152
-      }
2153
-      if (bloodAccessParOpera[i].name == "股静脉") {
2154
-        arrtwo.push(bloodAccessParOpera[i]);
2155
-      }
2156
-      if (bloodAccessParOpera[i].name == "人造血管") {
2157
-        arrtwo.push(bloodAccessParOpera[i]);
2158
-      }
2159
-      if (bloodAccessParOpera[i].name == "移植血管") {
2160
-        arrtwo.push(bloodAccessParOpera[i]);
2161
-      }
2162
-      this.arrtwo = arrtwo;
2163
-    }
2164
-    console.log("arrtwo", arrtwo)
2165
-
2166 2059
     for (var key in bloodAccessParOpera) {
2167 2060
       this.bloodAccessParOpera[bloodAccessParOpera[key].id] =
2168 2061
         bloodAccessParOpera[key];
@@ -2201,10 +2094,8 @@ export default {
2201 2094
       .then(rs => {
2202 2095
         var resp = rs.data;
2203 2096
         if (resp.state == 1) {
2204
-          // this.records = this.records.concat(resp.data.schedules);
2205
-          // console.log(rs,'rs')
2206
-          this.records = resp.data.schedules;
2207
-          console.log("记录this.records", this.records);
2097
+          this.records = this.records.concat(resp.data.schedules);
2098
+          console.log("记录", this.records);
2208 2099
 
2209 2100
           for (const recordIndex in this.records) {
2210 2101
             var dlegh = 0;
@@ -2235,82 +2126,59 @@ export default {
2235 2126
             }
2236 2127
 
2237 2128
             var delghTwo = 0;
2238
-            console.log(this.records[recordIndex].advices,'长度')
2239 2129
             if (
2240 2130
               this.records[recordIndex].advices &&
2241
-              this.records[recordIndex].advices.length < 6
2131
+              this.records[recordIndex].advices.length < 12
2242 2132
             ) {
2243
-              delghTwo = 6 - this.records[recordIndex].advices.length;
2133
+              delghTwo = 12 - this.records[recordIndex].advices.length;
2244 2134
             } else {
2245 2135
               delghTwo = 0;
2246 2136
             }
2247 2137
 
2248 2138
             if (delghTwo > 0) {
2249
-              console.log(typeof this.records[recordIndex].advices,'typeof this.records[recordIndex].advices')
2250 2139
               if (
2251 2140
                 typeof this.records[recordIndex].advices === "undefined" ||
2252 2141
                 this.records[recordIndex].advices == null
2253 2142
               ) {
2254
-                for (let index = 0; index < delghTwo; index++) {
2255
-                this.records[recordIndex].advices.push([]);
2256
-              }
2143
+                this.records[recordIndex].advices = [];
2257 2144
               }
2258 2145
               for (let index = 0; index < delghTwo; index++) {
2259 2146
                 this.records[recordIndex].advices.push([]);
2260 2147
               }
2261 2148
             }
2262 2149
 
2263
-            // var childMap = {};
2264
-            // for (const index in this.records[recordIndex].advices) {
2265
-            //   if (this.records[recordIndex].advices[index].parent_id == 0) {
2266
-            //     continue;
2267
-            //   }
2268
-            //   if (
2269
-            //     !(
2270
-            //       this.records[recordIndex].advices[index].parent_id in childMap
2271
-            //     )
2272
-            //   ) {
2273
-            //     childMap[
2274
-            //       this.records[recordIndex].advices[index].parent_id
2275
-            //     ] = [];
2276
-            //   }
2277
-            //   childMap[this.records[recordIndex].advices[index].parent_id].push(
2278
-            //     this.records[recordIndex].advices[index]
2279
-            //   );
2280
-            // }
2281
-            // console.log(childMap,'childMap')
2282
-
2283
-            // var advices = [];
2284
-            // for (const index in this.records[recordIndex].advices) {
2285
-            //   if (this.records[recordIndex].advices[index].parent_id > 0) {
2286
-            //     continue;
2287
-            //   }
2288
-            //   var item = this.records[recordIndex].advices[index];
2289
-            //   if (item.id in childMap) {
2290
-            //     item.children = childMap[item.id];
2291
-            //     // advices.push(childMap[item.id]);
2292
-            //   } else {
2293
-            //     item.children = [];
2294
-            //   }
2295
-            //   advices.push(item);
2296
-              
2297
-            // }
2298
-
2299
-          console.log(" this.records[recordIndex].advices", this.records);
2300
-          this.operators = resp.data.medical_staffs;
2301
-          if (this.operators.length > 0) {
2302
-            var operatorsLen = this.operators.length;
2303
-            for (var index = 0; index < operatorsLen; index++) {
2304
-              this.$set(
2305
-                this.operatorMaps,
2306
-                this.operators[index].id,
2307
-                this.operators[index]
2150
+            var childMap = {};
2151
+            for (const index in this.records[recordIndex].advices) {
2152
+              if (this.records[recordIndex].advices[index].parent_id == 0) {
2153
+                continue;
2154
+              }
2155
+              if (
2156
+                !(
2157
+                  this.records[recordIndex].advices[index].parent_id in childMap
2158
+                )
2159
+              ) {
2160
+                childMap[
2161
+                  this.records[recordIndex].advices[index].parent_id
2162
+                ] = [];
2163
+              }
2164
+              childMap[this.records[recordIndex].advices[index].parent_id].push(
2165
+                this.records[recordIndex].advices[index]
2308 2166
               );
2309 2167
             }
2310
-          }
2311
-          this.adminUser = resp.data.users;
2312
-          console.log("使用者", this.adminUser);
2313
-          this.loading = false;
2168
+
2169
+            var advices = [];
2170
+            for (const index in this.records[recordIndex].advices) {
2171
+              if (this.records[recordIndex].advices[index].parent_id > 0) {
2172
+                continue;
2173
+              }
2174
+              var item = this.records[recordIndex].advices[index];
2175
+              if (item.id in childMap) {
2176
+                item.children = childMap[item.id];
2177
+              } else {
2178
+                item.children = [];
2179
+              }
2180
+              advices.push(item);
2181
+            }
2314 2182
 
2315 2183
             var leftAdvice = [];
2316 2184
             var rightAdvice = [];
@@ -2344,20 +2212,31 @@ export default {
2344 2212
             }
2345 2213
           }
2346 2214
 
2347
-         
2348
-        } 
2349
-        else {
2215
+          console.log(" this.records[recordIndex].advices", this.records);
2216
+          this.operators = resp.data.medical_staffs;
2217
+          if (this.operators.length > 0) {
2218
+            var operatorsLen = this.operators.length;
2219
+            for (var index = 0; index < operatorsLen; index++) {
2220
+              this.$set(
2221
+                this.operatorMaps,
2222
+                this.operators[index].id,
2223
+                this.operators[index]
2224
+              );
2225
+            }
2226
+          }
2227
+          this.adminUser = resp.data.users;
2228
+          console.log("使用者", this.adminUser);
2229
+          this.loading = false;
2230
+        } else {
2350 2231
           this.loading = false;
2351 2232
           this.$message.error(resp.msg);
2352 2233
         }
2353 2234
       })
2354 2235
       .catch(err => {
2355
-        // this.$message.error(err);
2356
-        console.log(err)
2236
+        this.$message.error(err);
2357 2237
       });
2358 2238
   },
2359 2239
   methods: {
2360
-
2361 2240
     getUnit: function(val) {
2362 2241
       if (val.assessment_after_dislysis == null) {
2363 2242
         return "";
@@ -2499,6 +2378,8 @@ export default {
2499 2378
       }
2500 2379
     },
2501 2380
     getAdminUser(key, id) {
2381
+      console.log("key", key);
2382
+      console.log("id", id);
2502 2383
       if (
2503 2384
         typeof key === "undefined" ||
2504 2385
         key == null ||

+ 0 - 2
src/xt_pages/workforce/appointment.vue 查看文件

@@ -2838,8 +2838,6 @@
2838 2838
               copy_endtime:copy_endtime,
2839 2839
             }
2840 2840
          
2841
-   
2842
-           
2843 2841
            this.$refs[formName].validate(valid=>{
2844 2842
               if(valid){
2845 2843
                 copyPatientSchedule(params).then(response=>{