瀏覽代碼

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

陈少旭 6 月之前
父節點
當前提交
a39ad83ddb

+ 54 - 0
src/api/patient.js 查看文件

@@ -1242,3 +1242,57 @@ export function getNewSickHistory(params){
1242 1242
   })
1243 1243
 }
1244 1244
 
1245
+
1246
+export function deleteNewSickHistory(id,params){
1247
+  
1248
+  return request({
1249
+    url:"/api/patient/deletenewsickhistory?id="+id,
1250
+    method:"get",
1251
+    params:params,
1252
+  })
1253
+}
1254
+
1255
+export function saveSickHistoryTemplate(data){
1256
+
1257
+  return request({
1258
+    url:"/api/patient/savesickhistorytemplate",
1259
+    method:"post",
1260
+    data:data,
1261
+  })
1262
+}
1263
+
1264
+export function getSickHistoryTempalate(params){
1265
+
1266
+  return request({
1267
+    url:"/api/patient/getsickhistorytemplate",
1268
+    method:"get",
1269
+    params:params
1270
+  })
1271
+}
1272
+
1273
+export function modifySickHistoryTemplate(data){
1274
+
1275
+  return request({
1276
+    url:"/api/patient/modifysickhistorytemplate",
1277
+    method:"post",
1278
+    data:data,
1279
+  })
1280
+}
1281
+
1282
+export function deleteSickHistoryTempalte(id,params){
1283
+
1284
+  return request({
1285
+    url:"/api/patient/deletesickhistorytemplate?id="+id,
1286
+    method:"get",
1287
+    params:params
1288
+  })
1289
+}
1290
+
1291
+export function createNewCourseOfDiseaseRecord(data){
1292
+
1293
+  return request({
1294
+    url:"/api/patient/createnewcourseofdiseaserecord",
1295
+    method:"post",
1296
+    data:data,
1297
+  })
1298
+}

+ 14 - 1
src/router/modules/dialysis.js 查看文件

@@ -781,6 +781,7 @@ export default {
781 781
         noCache: true
782 782
       }
783 783
     },
784
+    
784 785
     {
785 786
       path: '/dialysis/print/batch/thirtyTwo',
786 787
       component: () =>
@@ -1130,7 +1131,7 @@ export default {
1130 1131
         noCache: true
1131 1132
       }
1132 1133
     },
1133
-    {//80
1134
+    {//81
1134 1135
       path: '/dialysis/print/batch/eightyone',
1135 1136
       component: () =>
1136 1137
         import('@/xt_pages/dialysis/batch_print/batch_print_order_eightyone'),
@@ -1142,6 +1143,18 @@ export default {
1142 1143
         noCache: true
1143 1144
       }
1144 1145
     },
1146
+    {//82
1147
+      path: '/dialysis/print/batch/eightyTwo',
1148
+      component: () =>
1149
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_eightyTwo'),
1150
+      hidden: true,
1151
+      is_menu: false,
1152
+      name: 'batch_print_order_eightyTwo',
1153
+      meta: {
1154
+        title: '批量打印',
1155
+        noCache: true
1156
+      }
1157
+    },
1145 1158
     {
1146 1159
       path: '/dialysis/flow',
1147 1160
       component: () => import('@/xt_pages/dialysis/dialysisFlow'),

+ 4 - 0
src/xt_pages/Pharmacy/drugCode.vue 查看文件

@@ -418,6 +418,10 @@
418 418
                 this.tableData[i].is_medicine_name = "未发药"
419 419
              }
420 420
              this.tableData[i].specification_name = this.getDrugSpec(this.tableData[i].drug_id)
421
+
422
+             this.tableData[i].prescribing_numbers = ""
423
+
424
+             this.tableData[i].prescribing_numbers = this.tableData[i].prescribing_number + this.tableData[i].prescribing_number_unit
421 425
            }
422 426
         }
423 427
 

+ 3 - 3
src/xt_pages/dialysis/batch_print/batch_print_order_eighty.vue 查看文件

@@ -199,7 +199,7 @@
199 199
                               : ""
200 200
                           }}
201 201
                         </div>
202
-                        
202
+                        /
203 203
                         <div class="under_line" style="width: 50px; text-align: center">
204 204
                           {{
205 205
                             record.assessment_before_dislysis.diastolic_blood_pressure
@@ -603,7 +603,7 @@
603 603
                           <td>
604 604
                             {{
605 605
                               monitor_record.systolic_blood_pressure
606
-                                ? monitor_record.systolic_blood_pressure + ""
606
+                                ? monitor_record.systolic_blood_pressure + "/"
607 607
                                 : ""
608 608
                             }}
609 609
                             {{
@@ -1049,7 +1049,7 @@
1049 1049
                           </span>
1050 1050
                           <span v-else></span>
1051 1051
                         </div>
1052
-                        
1052
+                        /
1053 1053
                         <div class="under_line"
1054 1054
                           style="width: 50px; text-align: center"
1055 1055
                         >

文件差異過大導致無法顯示
+ 1505 - 0
src/xt_pages/dialysis/batch_print/batch_print_order_eightyTwo.vue


+ 18 - 11
src/xt_pages/dialysis/bloodPresssWatch.vue 查看文件

@@ -228,7 +228,7 @@
228 228
             >批量打印</el-button
229 229
           >
230 230
         </template>
231
-        
231
+
232 232
         <template v-if="template_id == 27">
233 233
           <el-button
234 234
             style=""
@@ -268,6 +268,7 @@
268 268
             >批量打印</el-button
269 269
           >
270 270
         </template>
271
+        
271 272
         <template v-if="this.template_id == 32">
272 273
           <el-button
273 274
             size="small"
@@ -548,6 +549,16 @@
548 549
             type="primary"
549 550
             >批量打印</el-button>
550 551
         </template>
552
+        <template v-if="this.template_id == 82">
553
+          <el-button
554
+            size="small"
555
+            icon="el-icon-printer"
556
+            :disabled="selecting_schs.length == 0"
557
+            @click="batchPrintAction"
558
+            type="primary"
559
+            >批量打印</el-button
560
+          >
561
+        </template>
551 562
       </div>
552 563
     </div>
553 564
     <div class="app-container">
@@ -1982,7 +1993,6 @@ export default {
1982 1993
       this.getSchedualPatientList()
1983 1994
     },
1984 1995
     changeEndTime(){
1985
-
1986 1996
       this.getSchedualPatientList()
1987 1997
     },
1988 1998
     getAllZone: function() {
@@ -2014,8 +2024,6 @@ export default {
2014 2024
         this.listQuery.schedul_time = "";
2015 2025
 
2016 2026
       }
2017
-
2018
-
2019 2027
       console.log("params332322332323232",this.listQuery.start_time)
2020 2028
       this.SchedualPatientsTableData = [];
2021 2029
       getSchedualPatient(this.listQuery).then(response => {
@@ -2027,7 +2035,8 @@ export default {
2027 2035
         } else {
2028 2036
           this.loading = false;
2029 2037
           this.total = response.data.data.total;
2030
-          console.log("世界文化遗产",response.data.data.schedule)
2038
+          console.log("世界文化遗产",response.data.data)
2039
+          // const schedualpatientsTableData2=[]
2031 2040
           for (let i = 0; i < response.data.data.schedule.length; i++) {
2032 2041
 
2033 2042
             if (response.data.data.schedule[i].patient&&response.data.data.schedule[i].patient.id > 0) {
@@ -2082,9 +2091,6 @@ export default {
2082 2091
                 SchedualPatientsTable["pressure_name"] =response.data.data.schedule[i].assessment_before_dislysis.systolic_blood_pressure+"/"+ response.data.data.schedule[i].assessment_before_dislysis.diastolic_blood_pressure;
2083 2092
               }
2084 2093
 
2085
-
2086
-
2087
-
2088 2094
               if(response.data.data.schedule[i].monitoring_record!=null &&response.data.data.schedule[i].monitoring_record.length >0 ){
2089 2095
                  SchedualPatientsTable["monitoring_record"]  = response.data.data.schedule[i].monitoring_record
2090 2096
               }
@@ -2107,7 +2113,6 @@ export default {
2107 2113
                }
2108 2114
               }
2109 2115
 
2110
-
2111 2116
               // 体温
2112 2117
               SchedualPatientsTable.tp = [];
2113 2118
 
@@ -2546,8 +2551,8 @@ export default {
2546 2551
                 SchedualPatientsTable["after_pressure_name"] =response.data.data.schedule[i].assessment_after_dislysis.systolic_blood_pressure+"/"+ response.data.data.schedule[i].assessment_after_dislysis.diastolic_blood_pressure;
2547 2552
               }
2548 2553
 
2549
-
2550
-
2554
+              // schedualpatientsTableData2.push(SchedualPatientsTable)
2555
+              // this.SchedualPatientsTableData = schedualpatientsTableData2
2551 2556
               this.SchedualPatientsTableData.push(SchedualPatientsTable);
2552 2557
               // console.log("wode数据",(-100).toString())
2553 2558
               // console.log("数据哦哦😯噢232o",this.SchedualPatientsTableData)
@@ -2782,6 +2787,8 @@ export default {
2782 2787
         this.$router.push({ path: "/dialysis/print/batch/eighty" });
2783 2788
       }else if (this.template_id == 81) {
2784 2789
         this.$router.push({ path: "/dialysis/print/batch/eightyone" });
2790
+      } else if (this.template_id == 82) {
2791
+        this.$router.push({ path: "/dialysis/print/batch/eightyTwo" });
2785 2792
       }
2786 2793
     },
2787 2794
     batchPrintActionOne: function() {

+ 5 - 7
src/xt_pages/dialysis/template/DialysisPrintOrderSeventynine.vue 查看文件

@@ -1389,14 +1389,12 @@ export default {
1389 1389
     },
1390 1390
     getcheckData(val){
1391 1391
       if(val.length >0){
1392
-        let message = `记录单未填数据:<br/><br/>&nbsp;&nbsp;${val.join("<br/><br/>&nbsp;&nbsp;")}`;
1393
-        this.$message({
1392
+        let message = `记录单未填数据:<br/>&nbsp;${val.join("<br/>&nbsp;")}`;
1393
+        this.$alert(message, '提示', {
1394
+          confirmButtonText: '确定',
1395
+          type: 'warning',
1394 1396
           dangerouslyUseHTMLString: true,
1395
-          message:message,
1396
-          duration:0,
1397
-          showClose:true,
1398
-          type:'error'
1399
-        })
1397
+        });
1400 1398
         return message
1401 1399
       }else{
1402 1400
         this.$message.success('核对完成')

+ 16 - 11
src/xt_pages/dialysis/template/DialysisPrintOrderSeventysix.vue 查看文件

@@ -2164,13 +2164,15 @@ export default {
2164 2164
       ) {
2165 2165
         const obj30 = '首剂'
2166 2166
         checkDate.push(obj30);
2167
-      } if (
2168
-        this.prescription.anticoagulant_weichi == "" &&
2169
-        this.prescription.anticoagulant != 1
2170
-      ) {
2171
-        const obj31 = '维持'
2172
-        checkDate.push(obj31);
2173
-      } if (
2167
+      } 
2168
+      // if (
2169
+      //   this.prescription.anticoagulant_weichi == "" &&
2170
+      //   this.prescription.anticoagulant != 1
2171
+      // ) {
2172
+      //   const obj31 = '维持'
2173
+      //   checkDate.push(obj31);
2174
+      // } 
2175
+      if (
2174 2176
         this.prescription.anticoagulant_zongliang == "" &&
2175 2177
         this.prescription.anticoagulant != 1 &&
2176 2178
         this.prescription.anticoagulant != 5
@@ -2945,10 +2947,13 @@ export default {
2945 2947
     },
2946 2948
     getcheckData(val){
2947 2949
       if(val.length >0){
2948
-        const a = val.join(',')
2949
-        console.log('a',a);
2950
-        this.$message.error(a +" 未填");
2951
-        return a
2950
+        let message = `记录单未填数据:<br/>&nbsp;${val.join("<br/>&nbsp;")}`;
2951
+        this.$alert(message, '提示', {
2952
+          confirmButtonText: '确定',
2953
+          type: 'warning',
2954
+          dangerouslyUseHTMLString: true,
2955
+          
2956
+        });
2952 2957
       }else{
2953 2958
         this.$message.success('核对完成')
2954 2959
       }

+ 7 - 7
src/xt_pages/dialysis/template/DialysisPrintOrderSixtyeight.vue 查看文件

@@ -1565,7 +1565,7 @@
1565 1565
                           style="padding-left: 7px"
1566 1566
                         >
1567 1567
                           <div >
1568
-                            <template v-if="advice.children!=undefined && (org_id==10551||org_id == 0)">
1568
+                            <template v-if="advice.children!=undefined && (org_id==10551)">
1569 1569
                               <div v-for="(item,index) in advice.children" :key="index">
1570 1570
                                 {{ item.advice_name }}
1571 1571
                                 <span v-if="item.advice_desc">
@@ -1578,7 +1578,7 @@
1578 1578
                                 <span v-if="item.single_dose !=''">
1579 1579
                                   {{ item.single_dose}}{{ item.single_dose_unit }}
1580 1580
                                 </span>
1581
-                                
1581
+
1582 1582
                               </div>
1583 1583
                             </template>
1584 1584
                             <span v-if="advice.parent_id > 0">---></span>
@@ -3358,7 +3358,7 @@ export default {
3358 3358
         this.users = response.data.data.users;
3359 3359
         this.patientInfo = response.data.data.patientInfo;
3360 3360
         console.log('response.data.data',response.data.data);
3361
-        
3361
+
3362 3362
         this.patientInfo.birth = uParseTime(
3363 3363
           this.patientInfo.birthday,
3364 3364
           "{y}-{m}-{d}"
@@ -3756,14 +3756,14 @@ export default {
3756 3756
           }
3757 3757
         }
3758 3758
 
3759
-        if(this.org_id ==10551 ||this.org_id ==0){
3759
+        if(this.org_id ==10551){
3760 3760
           for(let i in this.doctor_advices){
3761 3761
             if(this.doctor_advices[i].parent_id >0){
3762 3762
               this.doctor_advices.splice(i,1)
3763 3763
             }
3764 3764
           }
3765 3765
         }
3766
-        
3766
+
3767 3767
 
3768 3768
         this.totollength = this.doctor_advices.length + this.monitors.length;
3769 3769
         console.log("this.totollength",this.totollength)
@@ -3779,11 +3779,11 @@ export default {
3779 3779
               doctor_advices_2.push(element);
3780 3780
             }
3781 3781
           }
3782
-          
3782
+
3783 3783
           this.doctor_advices = doctor_advices_1;
3784 3784
           this.doctor_advices_2 = doctor_advices_2;
3785 3785
         }
3786
-        
3786
+
3787 3787
       } else {
3788 3788
         this.loading = false;
3789 3789
         this.$message.error("请求数据失败");

+ 10 - 6
src/xt_pages/dialysis/template/DialysisPrintOrderSop.vue 查看文件

@@ -39,7 +39,7 @@
39 39
                     <label-box :isChecked="predialysis.symptom_before_dialysis_other==''?true :false" showValue="无特殊"></label-box>&nbsp;
40 40
                     <label-box :isChecked="predialysis.symptom_before_dialysis_other!=''?true :false" showValue="出现:"></label-box>
41 41
                   <!-- </span> -->
42
-                  
42
+
43 43
                   <!-- <span>{{predialysis.symptom_before_dialysis}}</span> -->
44 44
                   <span>{{predialysis.symptom_before_dialysis_other}}</span>
45 45
                 </div>
@@ -166,6 +166,7 @@
166 166
                             predialysis.blood_access_part_opera_name!='临时静脉导管' &&
167 167
                             predialysis.blood_access_part_opera_name!=''?true :false" showValue="其它">
168 168
                 </label-box>
169
+
169 170
               </div>&nbsp;&nbsp;
170 171
               <div style="display: inline-block;line-height: 30px;">
171 172
                 穿刺者:
@@ -503,7 +504,7 @@ export default {
503 504
         (this.prescription.mode_id == 2 || this.prescription.mode_id == 5 || this.prescription.mode_id == 12)){
504 505
           const obj3 = "置换量"
505 506
           checkDate.push(obj3)
506
-      } if(this.afterdialysis.actual_treatment_hour == '' && 
507
+      } if(this.afterdialysis.actual_treatment_hour == '' &&
507 508
           this.afterdialysis.actual_treatment_minute == ''
508 509
       ){
509 510
         const obj4 = "治疗时间"
@@ -1270,10 +1271,13 @@ export default {
1270 1271
     },
1271 1272
     getcheckData(val){
1272 1273
       if(val.length >0){
1273
-        const a = val.join(',')
1274
-        console.log('a',a);
1275
-        this.$message.error(a +" 未填");
1276
-        return a
1274
+        let message = `记录单未填数据:<br/>&nbsp;${val.join("<br/>&nbsp;")}`;
1275
+        this.$alert(message, '提示', {
1276
+          confirmButtonText: '确定',
1277
+          type: 'warning',
1278
+          dangerouslyUseHTMLString: true,
1279
+          
1280
+        });
1277 1281
       }else{
1278 1282
         this.$message.success('核对完成')
1279 1283
       }

+ 11 - 10
src/xt_pages/dialysis/template/DialysisPrintOrdereighty.vue 查看文件

@@ -186,7 +186,7 @@
186 186
                             : ""
187 187
                         }}
188 188
                       </div>
189
-                      
189
+                      /
190 190
                       <div class="under_line" style="width: 50px; text-align: center">
191 191
                         {{
192 192
                           predialysis.diastolic_blood_pressure
@@ -584,7 +584,7 @@
584 584
                       </tr>
585 585
                       <tr v-for="(monitor, monindex) in monitors" :key="monindex" style="">
586 586
                         <td>{{ getTime(monitor.operate_time, "{h}:{i}") }}</td>
587
-                        <td>{{monitor.systolic_blood_pressure? monitor.systolic_blood_pressure + " ": ""}}
587
+                        <td>{{monitor.systolic_blood_pressure? monitor.systolic_blood_pressure + "/": ""}}
588 588
                           {{monitor.diastolic_blood_pressure? monitor.diastolic_blood_pressure: ""}}</td>
589 589
                         <td>{{ monitor.pulse_frequency? monitor.pulse_frequency: ""}}</td>
590 590
                         <td>{{monitor.blood_flow_volume? monitor.blood_flow_volume: ""}}</td>
@@ -889,7 +889,7 @@
889 889
                           </span>
890 890
                            <span v-else></span>
891 891
                       </div>
892
-                      
892
+                      /
893 893
                       <div
894 894
                         class="under_line"
895 895
                         style="width: 50px; text-align: center"
@@ -959,10 +959,9 @@
959 959
                       导管:
960 960
                       <div class="under_line"
961 961
                         style="width: 75%; text-align: center;white-space: normal;"
962
-                      >
963
-                        {{
964
-                          afterdialysis.catheter ? afterdialysis.catheter : ""
965
-                        }}
962
+                      > 
963
+
964
+                          {{ afterdialysis.catheter ? afterdialysis.catheter : ""}}
966 965
                       </div>
967 966
                     </div>
968 967
                     <div class="inline_block" style="flex: 2">
@@ -1034,11 +1033,13 @@
1034 1033
                       <div class="under_line"
1035 1034
                         style="width: 70px; text-align: center"
1036 1035
                       >
1037
-                        {{
1038
-                          afterdialysis.dialysis_intakes
1036
+                        <span>
1037
+                          {{ afterdialysis.dialysis_intakes
1039 1038
                             ? afterdialysis.dialysis_intakes
1040 1039
                             : ""
1041
-                        }}
1040
+                          }}
1041
+                        </span>
1042
+                        
1042 1043
                       </div>
1043 1044
 
1044 1045
                       {{ getUnit(afterdialysis.dialysis_intakes_unit) }}

+ 12 - 21
src/xt_pages/dialysis/template/DialysisPrintOrdereightytwo.vue 查看文件

@@ -809,7 +809,7 @@ export default {
809 809
         const obj0 = '血液净化方式'
810 810
         checkDate.push(obj0)
811 811
       }
812
-      if(this.prescription.dialyzer_perfusion_apparatus ==''){
812
+      if(this.prescription.dialysis_dialyszers =='' && this.prescription.dialysis_irrigation == ''){
813 813
         const obj = '血液净化器类型'
814 814
         checkDate.push(obj)
815 815
       } if(this.prescription.dialysate_formulation_name ==''){
@@ -821,10 +821,10 @@ export default {
821 821
       } if(this.predialysis.blood_access_part_opera_name ==''){
822 822
         const obj3 = '血管通路'
823 823
         checkDate.push(obj3)
824
-      } if(this.predialysis.catheter == ''){
824
+      } if(this.predialysis.catheter == '' && this.predialysis.internal_fistula ==''){
825 825
         const obj4 = '透前导管'
826 826
         checkDate.push(obj4)
827
-      } if(this.predialysis.internal_fistula ==''){
827
+      } if(this.predialysis.internal_fistula =='' && this.predialysis.catheter == ''){
828 828
         const obj5 = '透前内瘘'
829 829
         checkDate.push(obj5)
830 830
       } if(this.prescription.anticoagulant == 0){
@@ -913,15 +913,10 @@ export default {
913 913
       ){
914 914
         const obj31 = '透后血压'
915 915
         checkDate.push(obj31)
916
-      } if(this.afterdialysis.symptom_after_dialysis == ""){
917
-        const obj32 = '透后症状'
918
-        checkDate.push(obj32)
919
-      } if(this.afterdialysis.actual_displacement == 0){
916
+      } 
917
+      if(this.afterdialysis.actual_displacement == 0){
920 918
         const obj33 = '实际置换量'
921 919
         checkDate.push(obj33)
922
-      } if(this.afterdialysis.is_eat == 0){
923
-        const obj34 = '透析期间进食'
924
-        checkDate.push(obj34)
925 920
       } if(this.predialysis.is_eat == 1 && this.predialysis.dialysis_during == 0){
926 921
         const obj35 = '透析进食'
927 922
         checkDate.push(obj35)
@@ -943,9 +938,6 @@ export default {
943 938
       } if(this.summary.dialysis_summary == ""){
944 939
         const obj41 = '透析小结'
945 940
         checkDate.push(obj41)
946
-      } if(this.summary.special_record == ""){
947
-        const obj42 = '病情记录'
948
-        checkDate.push(obj42)
949 941
       } if(this.tableAdvice.length > 0){
950 942
         this.tableAdvice.map((item) =>{
951 943
           if(item.id > 0 && (item.created_time || item.start_time)){
@@ -1731,15 +1723,14 @@ export default {
1731 1723
     },
1732 1724
     getcheckData(val){
1733 1725
       if(val.length >0){
1734
-        let message = `记录单未填数据:<br/><br/>&nbsp;&nbsp;${val.join("<br/><br/>&nbsp;&nbsp;")}`;
1735
-        this.$message({
1726
+        let message = `记录单未填数据:<br/>&nbsp;${val.join("<br/>&nbsp;")}`;
1727
+        this.$alert(message, '提示', {
1728
+          confirmButtonText: '确定',
1729
+          type: 'warning',
1736 1730
           dangerouslyUseHTMLString: true,
1737
-          message:message,
1738
-          duration:0,
1739
-          showClose:true,
1740
-          type:'error'
1741
-        })
1742
-        return message
1731
+          
1732
+        });
1733
+        // return message
1743 1734
       }else{
1744 1735
         this.$message.success('核对完成')
1745 1736
       }

+ 4 - 4
src/xt_pages/user/components/PatientSidebar.vue 查看文件

@@ -167,10 +167,10 @@ export default {
167 167
               name: '3-1',
168 168
               label: '病史'
169 169
             },
170
-            // {
171
-            //   name: '3-4',
172
-            //   label: '病史新'
173
-            // },
170
+            {
171
+              name: '3-4',
172
+              label: '病史新'
173
+            },
174 174
             {
175 175
               name: '3-2',
176 176
               label: '体格检查'

+ 66 - 49
src/xt_pages/user/courseOfDisease_new.vue 查看文件

@@ -67,20 +67,23 @@
67 67
               <div style="flex: 1;">
68 68
                 记录时间:
69 69
                 <el-date-picker
70
-                  v-model="value1"
70
+                  v-model="record_date"
71
+                  type="date"
72
+                  format="yyyy-MM-dd"
71 73
                   :disabled="disabled"
72
-                  type="datetime"
73
-                  placeholder="选择日期时间">
74
+                  style="width: 150px;"
75
+                   value-format="yyyy-MM-dd"
76
+                  placeholder="选择日期">
74 77
                 </el-date-picker>
75 78
               </div>
76 79
               <div style="flex: 1;">
77 80
                 病程医生:
78
-                <el-select v-model="value" placeholder="请选择" :disabled="disabled">
81
+                <el-select v-model="admin_user_id" placeholder="请选择" :disabled="disabled">
79 82
                   <el-option
80
-                    v-for="item in options"
81
-                    :key="item.value"
82
-                    :label="item.label"
83
-                    :value="item.value">
83
+                    v-for="item in doctorOptions"
84
+                    :key="item.id"
85
+                    :label="item.name"
86
+                    :value="item.id">
84 87
                   </el-option>
85 88
                 </el-select>
86 89
               </div>
@@ -102,6 +105,8 @@
102 105
           </div>
103 106
         </div>
104 107
       </div>
108
+
109
+
105 110
       <el-dialog
106 111
         title="设置模板"
107 112
         :visible.sync="template_dialog"
@@ -245,7 +250,7 @@
245 250
                 <editor ref="editor"
246 251
                         id="editors"
247 252
                         style="width: 80%"
248
-                        v-bind:r_content="new_content"
253
+                        :content="new_content"
249 254
                         >
250 255
                 </editor>
251 256
               </keep-alive>
@@ -320,13 +325,13 @@
320 325
   const moment = require('moment')
321 326
   import { getDataConfig } from "@/utils/data";
322 327
   import {
323
-    createCourseOfDiseaseRecord,
328
+    createNewCourseOfDiseaseRecord,
324 329
     deleteCourseOfDiseaseRecords,
325 330
     getCourseOfDiseaseRecords,
326 331
     modifyCourseOfDiseaseRecord,
327
-    GetCoursePrintData,
328 332
     getPatientDialysisInfor
329 333
   } from '@/api/patient'
334
+  import { fetchAllDoctorAndNurse } from "@/api/doctor";
330 335
   import { parseTime } from '@/utils'
331 336
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
332 337
   import { uParseTime } from '@/utils/tools'
@@ -366,8 +371,6 @@
366 371
         ids:"",
367 372
         idArr:[],
368 373
         org_id:0,
369
-
370
-
371 374
         add_index:0,
372 375
         disabled:true,
373 376
         template_dialog:false,
@@ -378,9 +381,30 @@
378 381
         end_date:'',
379 382
         quzhi_options:[{value:1,label:'本周'},{value:2,label:'上周'},{value:3,label:'本月'},{value:4,label:'上周'},],
380 383
         tableData:[{index:1,date:'2024-11-12',doctor:'王启年'}],
384
+        admin_user_id:0,
385
+        record_date:""
381 386
       }
382 387
     },
383 388
     created() {
389
+      this.admin_user_id = this.$store.getters.xt_user.user.id
390
+      var now = new Date()
391
+      this.date = [now.getTime() - (7 * 24 * 60 * 60 * 1000), now.getTime()]
392
+
393
+      var nowDate = new Date()
394
+      var nowYear = nowDate.getFullYear()
395
+      var nowMonth = nowDate.getMonth() + 1
396
+      var nowDay = nowDate.getDate()
397
+      this.end_time =
398
+        nowYear +
399
+        '-' +
400
+        (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
401
+        '-' +
402
+        (nowDay < 10 ? '0' + nowDay : nowDay)
403
+      nowDate.setMonth(nowDate.getMonth() - 1)
404
+      nowYear = nowDate.getFullYear()
405
+      nowMonth = nowDate.getMonth() + 1
406
+      nowDay = nowDate.getDate()
407
+      this.record_date = nowYear +'-' +(nowMonth < 10 ? '0' + nowMonth : nowMonth) +'-' +(nowDay < 10 ? '0' + nowDay : nowDay)
384 408
       this.patient_id = parseInt(this.$route.query.id)
385 409
       this.org_id = this.$store.getters.xt_user.template_info.org_id;
386 410
       if (isNaN(this.patient_id) || this.patient_id <= 0) {
@@ -391,27 +415,25 @@
391 415
         this.$router.push('/patients/patients')
392 416
         return
393 417
       }
394
-      // var now = new Date()
395
-      // this.date = [now.getTime() - (7 * 24 * 60 * 60 * 1000), now.getTime()]
396
-
397
-      // var nowDate = new Date()
398
-      // var nowYear = nowDate.getFullYear()
399
-      // var nowMonth = nowDate.getMonth() + 1
400
-      // var nowDay = nowDate.getDate()
401
-      // this.end_time =nowYear +'-' +(nowMonth < 10 ? '0' + nowMonth : nowMonth) +'-' +(nowDay < 10 ? '0' + nowDay : nowDay)
402
-      // nowDate.setMonth(nowDate.getMonth() - 1)
403
-      // nowYear = nowDate.getFullYear() -1
404
-      // nowMonth = nowDate.getMonth() + 1
405
-      // nowDay = nowDate.getDate()
406
-      // this.start_time = nowYear +'-' +(nowMonth < 10 ? '0' + nowMonth : nowMonth) +'-' +(nowDay < 10 ? '0' + nowDay : nowDay)
407
-      this.start_time = moment().month(moment().month() - 6).startOf('month').format('YYYY-MM-DD');
408
-      console.log("start_time",this.start_time)
409
-      this.end_time = moment().endOf('month').format('YYYY-MM-DD');
410
-      console.log("end_time",this.end_time)
418
+     
419
+      // this.start_time = moment().month(moment().month() - 6).startOf('month').format('YYYY-MM-DD');
420
+      // console.log("start_time",this.start_time)
421
+      // this.end_time = moment().endOf('month').format('YYYY-MM-DD');
422
+      // console.log("end_time",this.end_time)
423
+      this.fetchAllDoctorAndNurse()
411 424
       this.requestCourseRecords()
425
+     
412 426
 
413 427
     },
414 428
     methods: {
429
+     fetchAllDoctorAndNurse() {
430
+       fetchAllDoctorAndNurse().then(response => {
431
+        if (response.data.state == 1) {
432
+          this.doctorOptions= []
433
+          this.doctorOptions = response.data.data.doctors;
434
+        }
435
+       });
436
+      },
415 437
       add_click(){
416 438
         this.add_index = 1
417 439
         this.disabled = false
@@ -423,6 +445,9 @@
423 445
       showSave(){
424 446
         this.add_index = 0
425 447
         this.disabled = true
448
+        saveNewCousreOfDisease().then(response=>{
449
+
450
+        })
426 451
       },
427 452
       template_click(){
428 453
         console.log('this.add_index',this.add_index);
@@ -516,33 +541,25 @@
516 541
       },
517 542
 
518 543
       createAction: function() {
519
-        this.new_content = this.$refs.editor.content
544
+        this.new_content = this.$refs.editor.contents
520 545
         console.log("hhhhh2h3h232323232",this.new_content)
521 546
         if (this.new_content.length == 0) {
522 547
           this.$message.error('请填写病程内容')
523 548
           return
524 549
         }
525
-        this.uploading_new_record = true
526
-
527
-        createCourseOfDiseaseRecord(this.patient_id, this.new_content, this.course_of_disease_time, this.title).then(rs => {
528
-          this.uploading_new_record = false
529
-          var resp = rs.data
530
-          if (resp.state == 1) {
531
-            this.records.unshift(resp.data.record)
532
-            // this.$refs.record_table.setCurrentRow()
533
-            // this.$refs.record_table.setCurrentRow(this.records[0])
534
-            // this.current_select_record = this.records[0]
535
-            this.show_dialog = false
536
-            this.new_content = ''
537
-            this.title = ''
550
+        var params = {
551
+          patient_id:this.patient_id,
552
+          record_date:this.record_date,
553
+          content:this.new_content,
554
+          admin_user_id:this.admin_user_id,
555
+        }
556
+        createNewCourseOfDiseaseRecord(params).then(response => {
557
+         if(response.data.state == 1){
538 558
 
539
-          } else {
540
-            this.$message.error(resp.msg)
541
-          }
559
+         }
542 560
 
543 561
         }).catch(error => {
544
-          this.uploading_new_record = false
545
-          this.$message.error(error)
562
+         
546 563
         })
547 564
       },
548 565
       didSelectTemplate: function(templateContent) {

+ 148 - 109
src/xt_pages/user/sickHistory_new.vue 查看文件

@@ -52,7 +52,7 @@
52 52
                   <el-button type="primary" size="small" @click="prints">打印</el-button>
53 53
                 </div>
54 54
                 <div v-if="add_index == 1">
55
-                  <el-button type="primary" size="small" @click="createAction">保存2</el-button>
55
+                  <el-button type="primary" size="small" @click="createAction">保存</el-button>
56 56
                   <el-button size="small" @click="showCancel">取消</el-button>
57 57
                 </div>
58 58
               </div>
@@ -63,8 +63,10 @@
63 63
                 <el-date-picker
64 64
                   v-model="start_time"
65 65
                   type="date"
66
+                  format="yyyy-MM-dd"
66 67
                   :disabled="disabled"
67 68
                   style="width: 150px;"
69
+                   value-format="yyyy-MM-dd"
68 70
                   placeholder="选择日期">
69 71
                 </el-date-picker>
70 72
               </div>
@@ -120,7 +122,7 @@
120 122
             <div style="margin-top: 15px;">
121 123
               <span style="display: inline-block;border-left: 5px solid #3891f1f5;padding-left: 5px;margin-bottom: 5px;">详情</span>
122 124
               <keep-alive>
123
-                <ueditor ref="edit" :content="new_content" id="editor"></ueditor>
125
+                <ueditor ref="editor" :content="new_content" id="editors" :disabled="disabled"></ueditor>
124 126
               </keep-alive>
125 127
             </div>
126 128
             <div style="text-align: right;margin-top:10px ;">
@@ -132,6 +134,10 @@
132 134
         </div>
133 135
 
134 136
       </div>
137
+
138
+
139
+
140
+
135 141
       <el-dialog
136 142
         title="设置模板"
137 143
         :visible.sync="template_dialog"
@@ -143,7 +149,7 @@
143 149
         </div>
144 150
         <span slot="footer" class="dialog-footer">
145 151
           <el-button @click="template_dialog = false">取 消</el-button>
146
-          <el-button type="primary" @click="template_save">确 定</el-button>
152
+          <el-button type="primary" @click="saveTemplate">确 定</el-button>
147 153
         </span>
148 154
       </el-dialog>
149 155
       <el-dialog
@@ -156,19 +162,20 @@
156 162
           <div style="display: flex;">
157 163
             <div style="width: 27%;">
158 164
               <el-table
159
-                :data="tableData"
165
+                 ref="record_table_one"
166
+                :data="templateList"
160 167
                 :highlight-current-row="true"
161
-                @row-click="rowclick"
168
+                @current-change="getCurrentChangeOne"
162 169
                 style="width: 100%">
163
-                <el-table-column
164
-                  prop="index"
165
-                  label="序号"
166
-                  width="">
170
+                <el-table-column prop="index" label="序号" width="" align="center">
171
+                  <template slot-scope="scope">
172
+                       {{ scope.$index + 1 }}
173
+                   </template>
167 174
                 </el-table-column>
168
-                <el-table-column
169
-                  prop="name"
170
-                  label="模板名称"
171
-                  width="">
175
+                <el-table-column  prop="name" label="模板名称" width="" align="center">
176
+                  <template slot-scope="scope">
177
+                       {{ scope.row.title }}
178
+                   </template>
172 179
                 </el-table-column>
173 180
               </el-table>
174 181
             </div>
@@ -176,7 +183,7 @@
176 183
               <div class="Second_title">模板内容</div>
177 184
               <div style="">
178 185
                 <keep-alive>
179
-                  <ueditor ref="editor" id="editors" v-bind:r_content="new_content"></ueditor>
186
+                  <ueditor ref="editorOne" id="editors" :content="new_content"></ueditor>
180 187
                 </keep-alive>
181 188
               </div>
182 189
             </div>
@@ -185,7 +192,7 @@
185 192
         <span slot="footer" class="dialog-footer" style="text-align: center;">
186 193
           <el-button type="danger" @click="template_dele">删除模板</el-button>
187 194
           <el-button type="primary" @click="template_save">保存模板</el-button>
188
-          <el-button type="primary" @click="template_save">应用</el-button>
195
+          <el-button type="primary" @click="toContentPint">应用</el-button>
189 196
           <el-button @click="library_dialog = false">取消</el-button>
190 197
         </span>
191 198
       </el-dialog>
@@ -214,9 +221,13 @@ import { fetchAllDoctorAndNurse } from "@/api/doctor";
214 221
  import print from 'print-js'
215 222
 import {
216 223
   createNewSickHistoryRecord,
217
-  deleteSickHistoryRecords,
224
+  deleteNewSickHistory,
218 225
   getNewSickHistory,
219
-  ModifySickHistoryRecord
226
+  ModifySickHistoryRecord,
227
+  saveSickHistoryTemplate,
228
+  getSickHistoryTempalate,
229
+  modifySickHistoryTemplate,
230
+  deleteSickHistoryTempalte
220 231
 } from '@/api/patient'
221 232
 import { parseTime } from '@/utils'
222 233
 import BreadCrumb from '@/xt_pages/components/bread-crumb' 
@@ -286,6 +297,9 @@ export default {
286 297
       guomi_options:[{value:1,label:'无'},{value:2,label:'有'},{value:3,label:'不详'}],
287 298
       tableData:[],
288 299
       admin_user_id:"",
300
+      templateList:[],
301
+      template_content:"",
302
+      template_id:0,
289 303
     }
290 304
   },
291 305
   created() {
@@ -329,18 +343,34 @@ export default {
329 343
     this.fetchAllDoctorAndNurse()
330 344
 
331 345
   },
332
-  mounted(){
333
-    // setTimeout(()=>{
334
-      // console.log('1111222',this.new_content);
335
-
336
-    //   this.$refs.ue.parent.setDisabled()
337
-    // },10)
338
-  },
339 346
   methods: {
340 347
     template_dele(){
341
-
348
+     deleteSickHistoryTempalte(this.template_id).then(response=>{
349
+        if(response.data.state == 1){
350
+          var msg =  response.data.data.msg
351
+          this.$message.success("删除成功!")
352
+          this.getSickHistoryTempalateOne()
353
+        }
354
+     })
355
+    },
356
+    getSickHistoryTempalateOne(){
357
+      getSickHistoryTempalate().then(response=>{
358
+          if(response.data.state == 1){
359
+
360
+            this.templateList = []
361
+            this.templateList = response.data.data.templateList
362
+            if(this.templateList!=null && this.templateList.length>0){
363
+              this.$refs.record_table_one.setCurrentRow(this.templateList[0])
364
+            }
365
+          }
366
+        })
342 367
     },
343 368
     add_click(){
369
+      this.admin_user_id = ""
370
+      this.admin_user_id = this.$store.getters.xt_user.user.id
371
+      this.fetchAllDoctorAndNurse()
372
+      this.$refs.editor.contents = ""
373
+      this.id = 0
344 374
       this.disabled = false
345 375
       this.add_index = 1
346 376
     },
@@ -362,16 +392,36 @@ export default {
362 392
       if(this.add_index ==0){
363 393
         this.template_dialog = true
364 394
       }else{
365
-        this.library_dialog = true
395
+        getSickHistoryTempalate().then(response=>{
396
+          if(response.data.state == 1){
397
+            this.library_dialog = true
398
+            this.templateList = response.data.data.templateList
399
+            console.log("hahhahahaha",this.$refs)
400
+            if(this.templateList!=null && this.templateList.length>0){
401
+              this.$refs.record_table_one.setCurrentRow(this.templateList[0])
402
+            }
403
+            console.log("haaaaaaaaaaaaa",this.templateList)
404
+            
405
+          }
406
+        })
407
+     
366 408
       }
367 409
 
368 410
     },
369 411
     template_save(){
370
-      this.template_dialog = false
371
-      this.$message({
372
-        message: '模板设置成功',
373
-        type: 'success'
412
+       var params = {
413
+         template_id:this.template_id,
414
+         content:this.$refs.editorOne.contents
415
+       }
416
+      modifySickHistoryTemplate(params).then(response=>{
417
+         if(response.data.state == 1){
418
+           var msg = response.data.data.msg
419
+           this.$message.success("保存成功!")
420
+           this.template_dialog = false
421
+         }
374 422
       })
423
+    
424
+    
375 425
     },
376 426
     prints(){
377 427
       const style ='@media print{.content{width:960px;margin:0 auto;font-size: 23px;}}'
@@ -383,18 +433,15 @@ export default {
383 433
       })
384 434
     },
385 435
 
386
-
387
-
388
-
389 436
     fetchAllDoctorAndNurse() {
390 437
       fetchAllDoctorAndNurse().then(response => {
391 438
         if (response.data.state == 1) {
439
+          this.doctorOptions= []
392 440
           this.doctorOptions = response.data.data.doctors;
393 441
         }
394 442
       });
395 443
     },
396 444
   
397
-
398 445
     didChangeCurrentRecord: function(record) {
399 446
       this.current_select_record = record
400 447
     },
@@ -453,12 +500,14 @@ export default {
453 500
 
454 501
     createAction: function() {
455 502
     
456
-      this.new_content = this.$refs.edit.contents
503
+      console.log("hhhhhhhhhhhhhhhhhh",this.$refs)
504
+      this.new_content = this.$refs.editor.contents
457 505
       if (this.new_content.length == 0) {
458 506
         this.$message.error('请填写病程内容')
459 507
         return
460 508
       }
461 509
       let params = {
510
+        id:this.id,
462 511
         patient_id: this.patient_id,
463 512
         content: this.new_content,
464 513
         record_time: this.start_time,
@@ -469,7 +518,7 @@ export default {
469 518
         guominyaowu_desc:this.guominyaowu_desc,
470 519
         doctor_id: this.admin_user_id
471 520
       }
472
-      console.log("params-------------",params)
521
+     
473 522
       createNewSickHistoryRecord(params).then(response => {
474 523
          if(response.data.state == 1){
475 524
            var patientSickHistory = response.data.data.patientSickHistory
@@ -500,65 +549,34 @@ export default {
500 549
       console.log("select23322332",this.ids)
501 550
       this.selectingRows = selectRows
502 551
     },
503
-    deleteAction: function() {
504
-      if (this.selectingRows.length == 0) {
505
-        return
506
-      }
507
-      var ids = []
508
-      for (let index = 0; index < this.selectingRows.length; index++) {
509
-        const row = this.selectingRows[index]
510
-        ids.push(row.id)
511
-      }
512
-      var ids_str = ids.join(',')
513
-      this.loading = true
552
+    deleteAction(){
553
+        if(this.id == 0){
554
+          this.$message.error("请选择要删除的信息!")
555
+          return false
556
+        }
557
+        this.$confirm('确定要取消吗?', '提示', {
558
+          confirmButtonText: '确定',
559
+          cancelButtonText: '取消',
560
+          type: 'warning'
561
+        }).then(() => {
562
+          deleteNewSickHistory(this.id).then(response=>{
563
+            if (response.data.state==1) {
564
+              var msg = response.data.data.msg
565
+              this.$message.success("保存成功!")
566
+              this.getlist()
567
+            }
568
+          });
569
+        }).catch(() => {
514 570
 
515
-      let params={
516
-        patient_id:this.patient_id,
517
-        ids:ids_str,
518
-      }
571
+        });
519 572
 
520
-      deleteSickHistoryRecords(params).then(rs => {
521
-        var resp = rs.data
522
-        if (resp.state == 1) {
523
-          for (let id_index = 0; id_index < ids.length; id_index++) {
524
-            for (let record_index = 0; record_index < this.records.length; record_index++) {
525
-              if (ids[id_index] == this.records[record_index].id) {
526
-                this.records.splice(record_index, 1)
527
-                break
528
-              }
529
-            }
530
-          }
531
-          this.selectingRows = []
532
-          this.$message.success('已删除')
533 573
 
534
-        } else {
535
-          this.$message.error(resp.msg)
536
-        }
537
-        this.loading = false
538
-      }).catch(err => {
539
-        this.loading = false
540
-        this.$message.error(err)
541
-      })
542
-    },
574
+      },
575
+   
543 576
     showEdit() {
544
-      if (this.table_current_index == -1) {
545
-        this.$message.error('请选择要修改的病程内容')
546
-        return
547
-      }
548
-      this.edit_is_shenyizhishi = this.records[this.table_current_index].is_shenyizhi_history.toString()
549
-      this.edit_is_fumotouxishi = this.records[this.table_current_index].is_fumo_dialysis_history.toString()
550
-      this.edit_is_guominyaowu = this.records[this.table_current_index].is_hypersusceptibility.toString()
551
-      this.edit_guominyaowu_desc = this.records[this.table_current_index].hypersusceptibility_desc
552
-      this.edit_sick_history_time = this.recordTime(this.records[this.table_current_index].record_time)
553
-      this.edit_new_content = this.records[this.table_current_index].content
554
-      this.edit_current_id = this.records[this.table_current_index].id
555
-      this.edit_doctor_id = this.records[this.table_current_index].doctor_id
556
-      console.log(this.edit_new_content )
557
-      this.edit_title = this.records[this.table_current_index].title//
558
-      this.show_edit_dialog = true
559
-
560
-      this.$refs.record_table.setCurrentRow(null)
561
-
577
+      this.add_index =1
578
+      this.disabled = false
579
+   
562 580
     }, tableRow({ row, rowIndex }) {
563 581
       // 把每一行的索引放进row
564 582
       row.index = rowIndex
@@ -566,10 +584,6 @@ export default {
566 584
       this.table_current_index = row.index
567 585
     },
568 586
     print(){
569
-      // if (this.table_current_index == -1) {
570
-      //   this.$message.error('请选择要打印的病程')
571
-      //   return
572
-      // }
573 587
       if(this.ids.length == 0){
574 588
         this.$message.error('请选择要打印的病程')
575 589
         return
@@ -601,24 +615,49 @@ export default {
601 615
       return uParseTime(time, '{y}-{m}-{d}')
602 616
     },
603 617
     getCurrentChange(val){
604
-      
605
-      console.log("new_content2222222222222222222---------------",val.content)
606
-      this.new_content = ""
607
-      this.new_content = val.content
608
-      // var ue = UE.getEditor('editor')
609
-      // ue.setContent(val.content)
610
-     
618
+      this.$refs.editor.contents = val.content
611 619
       this.record_time = this.getTime(val.record_time)
612 620
       this.id = val.id
613 621
       this.guominyaowu_desc = val.hypersusceptibility_desc
614
-      this.shen_fumo = val.is_fumo_dialysis_history
615
-      this.shen_yizhi  = val.is_shenyizhi_history
616
-      this.shen_guomi = val.is_hypersusceptibility
617
-      this.patient_id = val.patient_id
618
-     
619
-     
622
+      if(val.is_fumo_dialysis_history>0){
623
+        this.shen_fumo = val.is_fumo_dialysis_history
624
+      }
625
+      if(val.is_shenyizhi_history>0){
626
+        this.shen_yizhi  = val.is_shenyizhi_history
627
+      }
628
+      if(val.is_hypersusceptibility>0){
629
+        this.shen_guomi = val.is_hypersusceptibility
630
+      }
620 631
       
621
-    }
632
+      this.patient_id = val.patient_id
633
+      this.admin_user_id = val.admin_user_id
634
+    
635
+    },
636
+    getCurrentChangeOne(val){
637
+   
638
+      this.$refs.editorOne.contents = val.content
639
+      this.template_content = ""
640
+      this.template_content = val.content
641
+      this.template_id = val.id
642
+    },
643
+    saveTemplate(){
644
+   
645
+      var params = {
646
+        title:this.template_name,
647
+        content: this.$refs.editor.contents,
648
+      }
649
+   saveSickHistoryTemplate(params).then(response=>{
650
+      if(response.data.state == 1){
651
+        var sickHistoryTemplate =  response.data.data.sickHistoryTemplate
652
+        this.$message.success("保存成功!")
653
+        this.template_dialog = false
654
+      }
655
+     })
656
+   },
657
+   toContentPint(){
658
+    this.$refs.editor.contents = this.template_content
659
+    this.library_dialog = false
660
+   }
622 661
   }
623 662
 }
624 663
 </script>