Browse Source

新分支

28169 1 year ago
parent
commit
1c98c26401

+ 10 - 1
src/api/role/admin.js View File

318
     method:"Get",
318
     method:"Get",
319
     params:params,
319
     params:params,
320
   })
320
   })
321
-}
321
+}
322
+
323
+// export function getdruginfoInformation(params){
324
+
325
+//    return request({
326
+//     url:"/api/device/getdruginfoinformation",
327
+//     method:"Get",
328
+//     params:params,
329
+//    })
330
+// }

+ 39 - 1
src/xt_pages/dialysis/PatientBox.vue View File

269
   getDialysisScheduleDetail,
269
   getDialysisScheduleDetail,
270
   getLongAdviceOne,
270
   getLongAdviceOne,
271
 } from "@/api/dialysis_record";
271
 } from "@/api/dialysis_record";
272
-
272
+const moment = require('moment')
273
 export default {
273
 export default {
274
   name: "PatientBox",
274
   name: "PatientBox",
275
   components: {
275
   components: {
714
           switch (status) {
714
           switch (status) {
715
             case 2:
715
             case 2:
716
               var totalAdvice = resp.data.advices;
716
               var totalAdvice = resp.data.advices;
717
+              console.log("totalAdvice",totalAdvice)
717
               var longAdvicesTwo = resp.data.advices_two;
718
               var longAdvicesTwo = resp.data.advices_two;
718
               var waitUploadAdvices = [];
719
               var waitUploadAdvices = [];
720
+
721
+              var total_day = ""
722
+              if(moment().weekday() == 1){
723
+                total_day ="周一"
724
+              }
725
+              if(moment().weekday() == 2){
726
+                total_day ="周二"
727
+              }
728
+              if(moment().weekday() == 3){
729
+                total_day ="周三"
730
+              }
731
+              if(moment().weekday() == 4){
732
+                total_day ="周四"
733
+              }
734
+              if(moment().weekday() == 5){
735
+                total_day ="周五"
736
+              }
737
+              if(moment().weekday() == 6){
738
+                total_day ="周六"
739
+              }
740
+              if(moment().weekday() == 0){
741
+                total_day ="周日"
742
+              }
743
+             
744
+              if(totalAdvice!=null && totalAdvice.length >0){
745
+                for (let i = 0; i < totalAdvice.length; i++) {
746
+                  if(totalAdvice[i].week_day.indexOf(total_day)!=-1){
747
+                    totalAdvice[i].isCheck = 1
748
+                  }
749
+                  if(totalAdvice[i].frequency_type == 1){
750
+                    totalAdvice[i].isCheck = 1
751
+                  }
752
+                }
753
+              }
754
+
755
+              console.log("totalAdviceowoowowowow",totalAdvice)
756
+
719
               for (let i = 0; i < totalAdvice.length; i++) {
757
               for (let i = 0; i < totalAdvice.length; i++) {
720
                 totalAdvice[i]["isCheck"] = 1;
758
                 totalAdvice[i]["isCheck"] = 1;
721
               }
759
               }

+ 5 - 0
src/xt_pages/dialysis/details/assessmentAfter.vue View File

328
           <label>累计血容量: </label>
328
           <label>累计血容量: </label>
329
           <span class="content" >{{ this.record.accumulated_blood_volume}}</span>
329
           <span class="content" >{{ this.record.accumulated_blood_volume}}</span>
330
         </li>
330
         </li>
331
+
332
+        <li v-if="isShow('输液量')">
333
+          <label>输液量(ml): </label>
334
+          <span class="content" >{{ this.record.transfusion_volume}}</span>
335
+        </li>
331
       </ul>
336
       </ul>
332
     </div>
337
     </div>
333
     <!-- <div class="note">
338
     <!-- <div class="note">

+ 8 - 2
src/xt_pages/dialysis/details/dialog/AssessmentAfterDislysis.vue View File

622
               <el-input v-model="form.accumulated_blood_volume"></el-input>
622
               <el-input v-model="form.accumulated_blood_volume"></el-input>
623
             </el-form-item>
623
             </el-form-item>
624
         </el-col>
624
         </el-col>
625
+
626
+        <el-col :span="8" v-if="isShow('输液量')">
627
+            <el-form-item label="输液量(ml): " :prop="isName('输液量')" :rules="isCheckmust('输液量')">
628
+              <el-input v-model="form.transfusion_volume"></el-input>
629
+            </el-form-item>
630
+          </el-col>
625
         <el-col :span="24" v-if="isShow('KT/V')">
631
         <el-col :span="24" v-if="isShow('KT/V')">
626
             <el-form-item label="KT/V:" :prop="isName('KT/V')" :rules="isCheckmust('KT/V')">
632
             <el-form-item label="KT/V:" :prop="isName('KT/V')" :rules="isCheckmust('KT/V')">
627
               <el-input type="textarea" :rows="4" v-model="form.ktv"></el-input>
633
               <el-input type="textarea" :rows="4" v-model="form.ktv"></el-input>
858
         machine_run:0,
864
         machine_run:0,
859
         after_urea:"",
865
         after_urea:"",
860
         accumulated_blood_volume:"",
866
         accumulated_blood_volume:"",
861
-
867
+        transfusion_volume:"",
862
       },
868
       },
863
       lapseList:[],
869
       lapseList:[],
864
       leaveOfficeMethod:[],
870
       leaveOfficeMethod:[],
1181
           data["after_urea"] = this.form.after_urea
1187
           data["after_urea"] = this.form.after_urea
1182
           data["pip_coagulation"] = this.form.pip_coagulation
1188
           data["pip_coagulation"] = this.form.pip_coagulation
1183
           data["accumulated_blood_volume"] = this.form.accumulated_blood_volume
1189
           data["accumulated_blood_volume"] = this.form.accumulated_blood_volume
1184
-
1190
+          datap["transfusion_volume"] = this.form.transfusion_volume
1185
           console.log("Data",data)
1191
           console.log("Data",data)
1186
           console.log("Paramsquery",data)
1192
           console.log("Paramsquery",data)
1187
 
1193
 

+ 7 - 1
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue View File

2772
         if(moment().weekday() == 0){
2772
         if(moment().weekday() == 0){
2773
            total_day ="周日"
2773
            total_day ="周日"
2774
         }
2774
         }
2775
-        console.log("---------",this.targetAdvices)
2775
+       
2776
         if(this.targetAdvices!=null && this.targetAdvices.length >0){
2776
         if(this.targetAdvices!=null && this.targetAdvices.length >0){
2777
             for (let i = 0; i < this.targetAdvices.length; i++) {
2777
             for (let i = 0; i < this.targetAdvices.length; i++) {
2778
               if(this.targetAdvices[i].week_day.indexOf(total_day)!=-1){
2778
               if(this.targetAdvices[i].week_day.indexOf(total_day)!=-1){
2779
                 this.targetAdvices[i].isCheck = 1
2779
                 this.targetAdvices[i].isCheck = 1
2780
               }
2780
               }
2781
+              if(this.targetAdvices[i].frequency_type == 1){
2782
+                this.targetAdvices[i].isCheck = 1
2783
+               }
2781
             }
2784
             }
2782
         }
2785
         }
2783
         for (let i = 0; i < this.targetAdvices.length; i++) {
2786
         for (let i = 0; i < this.targetAdvices.length; i++) {
2786
             this.checkedCities.push(this.targetAdvices[i].id)
2789
             this.checkedCities.push(this.targetAdvices[i].id)
2787
           }
2790
           }
2788
         }
2791
         }
2792
+
2793
+
2789
         if(admins.length > 0 ){
2794
         if(admins.length > 0 ){
2790
           for(let i=0;i<admins.length;i++){
2795
           for(let i=0;i<admins.length;i++){
2791
             this.adminRoles.push(admins[i])
2796
             this.adminRoles.push(admins[i])
2792
           }
2797
           }
2793
         }
2798
         }
2799
+        console.log("---------",this.targetAdvices)
2794
         console.log("admin_user_+id2332323223332", this.adminRoles)
2800
         console.log("admin_user_+id2332323223332", this.adminRoles)
2795
       },
2801
       },
2796
       hide() {
2802
       hide() {

+ 60 - 6
src/xt_pages/role/admin.vue View File

192
           size="small"
192
           size="small"
193
           icon="el-icon-circle-plus-outline"
193
           icon="el-icon-circle-plus-outline"
194
           style="float:left"
194
           style="float:left"
195
-          @click="toSavePDFInformation">生成PDF</el-button>
195
+          @click="toSavePDFInformation">生成PDF</el-button> -->
196
 
196
 
197
 
197
 
198
-        <el-button
198
+        <!-- <el-button
199
           type="primary"
199
           type="primary"
200
           size="small"
200
           size="small"
201
           icon="el-icon-circle-plus-outline"
201
           icon="el-icon-circle-plus-outline"
202
           style="float:left"
202
           style="float:left"
203
           @click="toCheckPDFInformation">PDF验证</el-button> -->
203
           @click="toCheckPDFInformation">PDF验证</el-button> -->
204
+
205
+        
204
      </div>
206
      </div>
205
     
207
     
206
       
208
       
499
 
501
 
500
 <script>
502
 <script>
501
 import { adminMainView, getAdmins, setAdminStatus,toSign,toTestOne,toTestTwo,toTestThree,toTestFour,toTestFive,toTestSeven,toTestEight,toTestNight,toTestTen,toTestElement,toTestThrityMent,saveEnterprise,getEnterPriseById,getMobileCode,savePersionEnterPrise,getPerseEnterPriseById,CreatePersionSeal,CreateNewEnterPrise,toTestThrity,toEndEnterPrise,getEnterPriseDetail
503
 import { adminMainView, getAdmins, setAdminStatus,toSign,toTestOne,toTestTwo,toTestThree,toTestFour,toTestFive,toTestSeven,toTestEight,toTestNight,toTestTen,toTestElement,toTestThrityMent,saveEnterprise,getEnterPriseById,getMobileCode,savePersionEnterPrise,getPerseEnterPriseById,CreatePersionSeal,CreateNewEnterPrise,toTestThrity,toEndEnterPrise,getEnterPriseDetail
502
-  ,CreateQianshuUserName,CreateSKDSendInformation,toSavePDFInformation,toCheckPDFInformation} from "@/api/role/admin";
504
+  ,CreateQianshuUserName,CreateSKDSendInformation,toSavePDFInformation,toCheckPDFInformation,getdruginfoInformation} from "@/api/role/admin";
503
 import { getRoles } from "@/api/role/role";
505
 import { getRoles } from "@/api/role/role";
504
 
506
 
505
 import { parseTime } from "@/utils";
507
 import { parseTime } from "@/utils";
1068
           var information =  response.data.data.information
1070
           var information =  response.data.data.information
1069
            
1071
            
1070
            var orderId = response.data.data.orderId
1072
            var orderId = response.data.data.orderId
1073
+           
1074
+           var base64Img = 'data:image/png;base64'+","+orderId
1075
+           console.log("base64Img",base64Img)
1076
+           var imgFile = this.base64ImgtoFile(base64Img)
1077
+           this.downloadBlob(imgFile, 'test.png')
1078
+           console.log("imgFilewoowow",imgFile)
1071
 
1079
 
1072
-           var imgFile = this.base64ImgtoFile(orderId)
1080
+           const blob = this.base64ToBlob(orderId, 'application/pdf');
1081
+           this.openPdf(blob);
1073
 
1082
 
1074
-           console.log("imgFilewoowow",imgFile)
1075
          }
1083
          }
1076
       })
1084
       })
1077
     },
1085
     },
1086
+    openPdf(blob) {
1087
+      const objectUrl = URL.createObjectURL(blob);
1088
+      const a = document.createElement('a');
1089
+      a.href = objectUrl;
1090
+      a.target = '_blank';
1091
+      a.click();
1092
+      URL.revokeObjectURL(objectUrl);
1093
+    },
1094
+     base64ToBlob(base64Data, contentType) {
1095
+      contentType = contentType || '';
1096
+      const sliceSize = 1024;
1097
+      const byteCharacters = window.atob(base64Data);
1098
+      const bytesLength = byteCharacters.length;
1099
+      const slicesCount = Math.ceil(bytesLength / sliceSize);
1100
+      const byteArrays = new Array(slicesCount);
1101
+
1102
+      for (let sliceIndex = 0; sliceIndex < slicesCount; ++sliceIndex) {
1103
+        const begin = sliceIndex * sliceSize;
1104
+        const end = Math.min(begin + sliceSize, bytesLength);
1105
+
1106
+        const bytes = new Array(end - begin);
1107
+        for (let offset = begin, i = 0; offset < end; ++i, ++offset) {
1108
+          bytes[i] = byteCharacters[offset].charCodeAt(0);
1109
+        }
1110
+        byteArrays[sliceIndex] = new Uint8Array(bytes);
1111
+      }
1112
+
1113
+      return new Blob(byteArrays, {
1114
+        type: contentType
1115
+      });
1116
+    },
1117
+    downloadBlob(blob, filename) {
1118
+      const url = URL.createObjectURL(blob);
1119
+      const a = document.createElement('a');
1120
+      a.href = url;
1121
+      a.download = filename;
1122
+      a.click();
1123
+      URL.revokeObjectURL(url);
1124
+    },
1078
     toCheckPDFInformation(){
1125
     toCheckPDFInformation(){
1079
       toCheckPDFInformation().then(response=>{
1126
       toCheckPDFInformation().then(response=>{
1080
         if(response.data.data == 1){
1127
         if(response.data.data == 1){
1096
       return new File([u8arr], `${filename}.${suffix}`, {
1143
       return new File([u8arr], `${filename}.${suffix}`, {
1097
         type: mime
1144
         type: mime
1098
       })
1145
       })
1099
-    }
1146
+    },
1147
+    // toDrugInfo(){
1148
+    //   getdruginfoInformation().then(response=>{
1149
+    //      if(response.data.state==1){
1150
+           
1151
+    //      }
1152
+    //   })
1153
+    // }
1100
 
1154
 
1101
   },
1155
   },
1102
   watch: {
1156
   watch: {