See999 4 vuotta sitten
vanhempi
commit
d2f8cf477f

+ 7 - 0
src/api/patient.js Näytä tiedosto

@@ -356,6 +356,13 @@ export function postExportPatients(params) {
356 356
 
357 357
 
358 358
 
359
+export function getMaxDialysisNo() {
360
+  return request({
361
+    url: '/api/patients/dialysis_no',
362
+    method: 'Get',
363
+  })
364
+}
365
+
359 366
 
360 367
 
361 368
 

+ 9 - 5
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue Näytä tiedosto

@@ -1214,8 +1214,8 @@ export default {
1214 1214
         "hemodialysis",
1215 1215
         "dialysate_formulation"
1216 1216
       );
1217
-      // this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit;
1218
-      // console.log("0000000000", this.anticoagulantsConfit);
1217
+       this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit;
1218
+      console.log("0000000000", this.anticoagulantsConfit);
1219 1219
       var anticoagulantsConfitOne = this.$store.getters.anticoagulants_confit;
1220 1220
       console.log("333", anticoagulantsConfitOne);
1221 1221
       for (let i = 0; i < anticoagulantsConfitOne.length; i++) {
@@ -1238,7 +1238,7 @@ export default {
1238 1238
           }
1239 1239
         });
1240 1240
       });
1241
-      // console.log("arrFour", arrFour);
1241
+      console.log("arrFour", arrFour);
1242 1242
       this.anticoagulantsConfit = arrFour;
1243 1243
       this.dialysisList = this.devices;
1244 1244
 
@@ -1657,12 +1657,16 @@ export default {
1657 1657
       return uParseTime(val, "{y}-{m}-{d} {h}:{i}");
1658 1658
     },
1659 1659
     show(pre) {
1660
+       console.log("pre--------",pre)
1661
+       if(pre.id == 0){
1662
+         this.dialysisPrescription.anticoagulant = "低分子肝素"
1663
+       }
1660 1664
       if (pre.anticoagulant == 3) {
1661 1665
         this.dialysisPrescription.anticoagulant = "低分子肝素";
1662 1666
       }
1663 1667
       //入口
1664 1668
       var pre = pre;
1665
-      console.log("pre是----", pre);
1669
+    //  console.log("pre是----", pre);
1666 1670
       if (pre.mode_id == 2 || pre.mode_id == 5 || pre.mode_id == 12) {
1667 1671
         this.zhiShow = true;
1668 1672
         this.huShow = true;
@@ -1686,7 +1690,7 @@ export default {
1686 1690
         this.totalShow = false;
1687 1691
       }
1688 1692
       this.pre = pre;
1689
-      console.log("pre1", pre);
1693
+     // console.log("pre1", pre);
1690 1694
       this.getPermission();
1691 1695
 
1692 1696
       let last_weight_after = 0;

+ 1 - 3
src/xt_pages/dialysis/template/DialysisPrintOrderEight.vue Näytä tiedosto

@@ -13,9 +13,7 @@
13 13
           <td style="text-align:center;">
14 14
             姓名:
15 15
             <span style="display:inline-block;margin-left:10px;">
16
-              {{
17
-              patientInfo.name
18
-              }}
16
+              {{patientInfo.name}}
19 17
             </span>
20 18
           </td>
21 19
           <td style="text-align:center;">

+ 10 - 7
src/xt_pages/dialysis/template/DialysisPrintOrderTen.vue Näytä tiedosto

@@ -297,13 +297,6 @@
297 297
                     </div>
298 298
                     ml/min
299 299
                   </div>
300
-                  <div class="inline_block" style="margin-left:10px;flex:1;">
301
-                    透析时间:
302
-                    <div class="under_line" style="width: 50px;text-align: center">
303
-                      {{ prescription.dialysis_duration_hour ? prescription.dialysis_duration_hour : "/" }}
304
-                    </div>
305
-                    h
306
-                  </div>
307 300
                 </div>
308 301
                 <div class="row" style="padding: 2px 0;line-height:23px;display:flex;">
309 302
                   <div class="inline_block" style="flex:1;">
@@ -325,6 +318,16 @@
325 318
                     </div>
326 319
                     kg
327 320
                   </div>
321
+                   <div class="inline_block" style="margin-left:10px;flex:1;">
322
+                    透析时间:
323
+                    <div class="under_line" style="width: 50px;text-align: center">
324
+                      {{ prescription.dialysis_duration_hour ? prescription.dialysis_duration_hour : "/" }}
325
+                    </div>h
326
+                     <div class="under_line" style="width: 50px;text-align: center">
327
+                      {{ prescription.dialysis_duration_minute ? prescription.dialysis_duration_minute : "/" }}
328
+                    </div>
329
+                    min
330
+                  </div>
328 331
                 </div>
329 332
 
330 333
                 <div class="row" style="padding: 2px 0;line-height:23px;display:flex;">

+ 425 - 233
src/xt_pages/user/patients.vue Näytä tiedosto

@@ -5,8 +5,8 @@
5 5
       :visible.sync="dialogVisible"
6 6
       width="40%"
7 7
     >
8
-      <span>您提交的文档不是系统标准导入模板,请检查您的文档或重新 <a href="https://kuyi.shengws.com/patient_template.xlsx" style="color: blue"
9
-                                           download="template">下载导入模板</a></span>
8
+<!--      <span>您提交的文档不是系统标准导入模板,请检查您的文档或重新 <a href="https://kuyi.shengws.com/patient_template.xlsx" style="color: blue"-->
9
+<!--                                           download="template">下载导入模板</a></span>-->
10 10
       <span slot="footer" class="dialog-footer">
11 11
     <el-button @click="dialogVisible = false">取 消</el-button>
12 12
     <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
@@ -14,6 +14,45 @@
14 14
     </el-dialog>
15 15
 
16 16
 
17
+    <el-dialog
18
+      title="提示"
19
+      :visible.sync="dialysisVisible"
20
+      width="40%"
21
+    >
22
+      <span>您提交的文档中存在不同病人存在相同的透析号,请检查修改后在提交 </span>
23
+      <span slot="footer" class="dialog-footer">
24
+    <el-button @click="dialysisVisible = false">取 消</el-button>
25
+    <el-button type="primary" @click="dialysisVisible = false">确 定</el-button>
26
+  </span>
27
+    </el-dialog>
28
+
29
+
30
+    <el-dialog
31
+      title="提示"
32
+      :visible.sync="phoneVisible"
33
+      width="40%"
34
+    >
35
+      <span>您提交的文档中存在不同病人存在相同的手机号,请检查修改后在提交 </span>
36
+      <span slot="footer" class="dialog-footer">
37
+    <el-button @click="phoneVisible = false">取 消</el-button>
38
+    <el-button type="primary" @click="phoneVisible = false">确 定</el-button>
39
+  </span>
40
+    </el-dialog>
41
+
42
+
43
+    <el-dialog
44
+      title="提示"
45
+      :visible.sync="idCardNoVisible"
46
+      width="40%"
47
+    >
48
+      <span>您提交的文档中存在不同病人存在相同的身份证,请检查修改后在提交 </span>
49
+      <span slot="footer" class="dialog-footer">
50
+    <el-button @click="idCardNoVisible = false">取 消</el-button>
51
+    <el-button type="primary" @click="idCardNoVisible = false">确 定</el-button>
52
+  </span>
53
+    </el-dialog>
54
+
55
+
17 56
     <el-dialog
18 57
       title="提示"
19 58
       :visible.sync="exportLogVisible"
@@ -25,7 +64,7 @@
25 64
         <br/>
26 65
         <br/>
27 66
         <span>{{getContent(item)}}</span>
28
-        <span style="color:blue"  @click="generateTxt(item)">点击</span>
67
+        <span style="color:blue" @click="generateTxt(item)">点击</span>
29 68
         <span>查看详情</span>
30 69
         <br/>
31 70
         <br/>
@@ -500,7 +539,7 @@
500 539
 </template>
501 540
 
502 541
 <script>
503
-  import { code, EditLapseto, fetchList, OpenView, postExportPatients } from '@/api/patient'
542
+  import { code, EditLapseto, fetchList, getMaxDialysisNo, OpenView, postExportPatients } from '@/api/patient'
504 543
   import { generateLog } from '@/api/config'
505 544
 
506 545
   import QRCode from 'qrcodejs2'
@@ -536,6 +575,8 @@
536 575
         isIndeterminate: true,
537 576
         dialogVisible: false,
538 577
         exportLogVisible: false,
578
+        phoneVisible:false,
579
+        idCardNoVisible:false,
539 580
         wechatbindimg: '',
540 581
         active: true,
541 582
         schedulType: 0,
@@ -602,7 +643,9 @@
602 643
         // value2: '',
603 644
         total: 0,
604 645
         pageTotal: 0,
646
+        dialysisVisible:false,
605 647
         pageSelect: 0,
648
+        max_dialysis_no: '',
606 649
         listQuery: {
607 650
           page: 1,
608 651
           limit: 10,
@@ -649,25 +692,25 @@
649 692
     },
650 693
 
651 694
     methods: {
652
-      generateTxt:function(log) {
695
+      generateTxt: function(log) {
653 696
         var content = ''
654
-       var errlog =  log.err_logs
655
-        for (let i = 0; i< errlog.length; i++){
697
+        var errlog = log.err_logs
698
+        content = this.getContent(log)
699
+        for (let i = 0; i < errlog.length; i++) {
656 700
           if (content.length == 0) {
657 701
             content = errlog[i].err_msg
658
-          }else{
659
-            content = content +"\n"+errlog[i].err_msg
702
+          } else {
703
+            content = content + '\n' + errlog[i].err_msg
660 704
           }
661 705
         }
662 706
 
663
-
664 707
         var url = new Blob(['\ufeff' + content], { type: 'text/txt,charset=UTF-8' })
665 708
         if (typeof url === 'object' && url instanceof Blob) {
666 709
           url = URL.createObjectURL(url) // 创建blob地址
667 710
         }
668 711
         const aLink = document.createElement('a')
669 712
         aLink.href = url
670
-        aLink.download = this.timestampToTime(log.export_time)+'错误日志'+".txt"
713
+        aLink.download = this.timestampToTime(log.export_time) + '错误日志' + '.txt'
671 714
         aLink.click()
672 715
 
673 716
       },
@@ -681,7 +724,7 @@
681 724
         var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + '日 '
682 725
         var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + '时'
683 726
         var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + '分'
684
-        var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds())+'秒'
727
+        var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()) + '秒'
685 728
         return Y + M + D + h + m + s
686 729
       },
687 730
       generateLog() {
@@ -701,7 +744,8 @@
701 744
 
702 745
       },
703 746
       handleSuccess({ results, header }) {
704
-
747
+        console.log(results)
748
+        console.log(header)
705 749
 
706 750
         if (header != undefined && header.length > 0) {
707 751
           var isHasName = header.includes('*姓名')
@@ -713,177 +757,325 @@
713 757
           var isHasLapseto = header.includes('*治疗状态')
714 758
           var isHasInfectious = header.includes('*传染病')
715 759
           var isHasDiagnose = header.includes('诊断')
716
-          if (!(isHasName && isHasGender && isHasPhone && isHasIdCard && isHasDate && isHasSource && isHasLapseto && isHasInfectious && isHasDiagnose)) {
760
+          var isHasDialysisNo = header.includes('透析号')
761
+
762
+          var isHasDryWeight = header.includes('干体重(kg)')
763
+          var isHasHeight = header.includes('身高(cm)')
764
+          var isHasHomeAddress = header.includes('家庭住址')
765
+
766
+          if (!(isHasName && isHasGender && isHasPhone && isHasIdCard && isHasDate && isHasSource && isHasLapseto && isHasInfectious && isHasDiagnose && isHasDialysisNo && isHasDryWeight && isHasHeight && isHasHomeAddress)) {
717 767
             this.dialogVisible = true
718 768
             return
719 769
           }
720
-        }else{
770
+        } else {
721 771
           this.dialogVisible = true
722 772
           return
723 773
         }
724
-        this.export_date = []
725
-        for (let i = 1; i < results.length; i++) {
726
-          let obj = {}
727
-          for (var key in results[i]) {
728
-            if (results[i]['*姓名'] === undefined) {
729
-              obj['name'] = ''
730
-            } else {
731
-              if (key == '*姓名') {
732
-                obj['name'] = results[i][key]
774
+        getMaxDialysisNo().then(
775
+          response => {
776
+            if (response.data.state === 1) {
777
+              this.max_dialysis_no = response.data.data.dialysis_no
778
+              if (this.max_dialysis_no == 0) {
779
+                this.max_dialysis_no = 1
780
+              } else {
781
+                this.max_dialysis_no++
733 782
               }
734
-            }
735 783
 
736
-            if (results[i]['*性别'] === undefined) {
737
-              obj['gender'] = '0'
738
-            } else {
739
-              if (key == '*性别') {
740
-                if (results[i][key] == '男') {
741
-                  obj['gender'] = '1'
742
-                } else if (results[i][key] == '女') {
743
-                  obj['gender'] = '2'
744
-                } else {
745
-                  obj['gender'] = '0'
784
+
785
+              this.export_date = []
786
+              for (let i = 1; i < results.length; i++) {
787
+                let obj = {}
788
+                for (var key in results[i]) {
789
+                  if (results[i]['*姓名'] === undefined) {
790
+                    obj['name'] = ''
791
+                  } else {
792
+                    if (key == '*姓名') {
793
+                      obj['name'] = results[i][key].replace(/\s/g,"")
794
+
795
+                    }
796
+                  }
797
+
798
+                  if (results[i]['*性别'] === undefined) {
799
+                    obj['gender'] = '0'
800
+                  } else {
801
+                    if (key == '*性别') {
802
+                      if (results[i][key] == '男') {
803
+                        obj['gender'] = '1'
804
+                      } else if (results[i][key] == '女') {
805
+                        obj['gender'] = '2'
806
+                      } else {
807
+                        obj['gender'] = '0'
808
+                      }
809
+                    }
810
+                  }
811
+
812
+                  if (results[i]['*手机号'] === undefined) {
813
+                    obj['phone'] = ''
814
+                  } else {
815
+                    if (key == '*手机号') {
816
+                      obj['phone'] = results[i][key].replace(/\s/g,"")
817
+                    }
818
+                  }
819
+
820
+                  if (results[i]['*身份证号'] === undefined) {
821
+                    obj['id_card_no'] = ''
822
+
823
+                  } else {
824
+                    if (key == '*身份证号') {
825
+                      obj['id_card_no'] = results[i][key].replace(/\s/g,"")
826
+                    }
827
+                  }
828
+
829
+                  if (results[i]['*首次肾脏治疗时间'] === undefined) {
830
+                    obj['first_treatment_date'] = ''
831
+
832
+                  } else {
833
+                    if (key == '*首次肾脏治疗时间') {
834
+                      var month = parseInt(results[i][key].replace(/\s/g,"").split('/')[0])
835
+                      var day = parseInt(results[i][key].replace(/\s/g,"").split('/')[1])
836
+                      var year = parseInt(results[i][key].replace(/\s/g,"").split('/')[2])
837
+
838
+                      if (day < 10) {
839
+                        day = '0' + day
840
+                      }
841
+                      if (month < 10) {
842
+                        month = '0' + month
843
+                      }
844
+                      obj['first_treatment_date'] = '20' + year + '/' + month + '/' + day
845
+                    }
846
+                  }
847
+
848
+                  if (results[i]['*患者来源'] === undefined) {
849
+                    obj['source'] = '0'
850
+
851
+                  } else {
852
+                    if (key == '*患者来源') {
853
+                      if (results[i][key] == '门诊') {
854
+                        obj['source'] = '1'
855
+                      } else if (results[i][key] == '住院') {
856
+                        obj['source'] = '2'
857
+                      } else {
858
+                        obj['source'] = '0'
859
+                      }
860
+                    }
861
+                  }
862
+
863
+                  if (results[i]['*治疗状态'] === undefined) {
864
+                    obj['lapseto'] = '0'
865
+
866
+                  } else {
867
+                    if (key == '*治疗状态') {
868
+                      if (results[i][key] == '留治') {
869
+                        obj['lapseto'] = '1'
870
+                      } else if (results[i][key] == '转归') {
871
+                        obj['lapseto'] = '2'
872
+                      } else {
873
+                        obj['lapseto'] = '0'
874
+                      }
875
+                    }
876
+                  }
877
+
878
+                  if (results[i]['*传染病'] === undefined) {
879
+                    let contagions = []
880
+                    obj['is_infectious'] = '0'
881
+                    obj['contagions'] = contagions
882
+
883
+                  } else {
884
+                    if (key == '*传染病') {
885
+                      if (results[i][key] == '无') {
886
+                        let contagions = []
887
+                        obj['is_infectious'] = '1'
888
+                        obj['contagions'] = contagions
889
+
890
+                      } else if (results[i][key] == '乙肝') {
891
+                        let contagions = []
892
+                        contagions.push(2)
893
+                        obj['is_infectious'] = '2'
894
+                        obj['contagions'] = contagions
895
+                      } else if (results[i][key] == '丙肝') {
896
+                        let contagions = []
897
+                        contagions.push(3)
898
+                        obj['is_infectious'] = '2'
899
+                        obj['contagions'] = contagions
900
+
901
+                      } else if (results[i][key] == '艾滋病') {
902
+                        let contagions = []
903
+                        contagions.push(4)
904
+                        obj['is_infectious'] = '2'
905
+                        obj['contagions'] = contagions
906
+
907
+                      } else if (results[i][key] == '肺结核') {
908
+                        let contagions = []
909
+                        contagions.push(5)
910
+                        obj['is_infectious'] = '2'
911
+                        obj['contagions'] = contagions
912
+
913
+                      } else if (results[i][key] == '梅毒') {
914
+                        let contagions = []
915
+                        contagions.push(6)
916
+                        obj['is_infectious'] = '2'
917
+                        obj['contagions'] = contagions
918
+                      } else {
919
+                        let contagions = []
920
+                        obj['is_infectious'] = '0'
921
+                        obj['contagions'] = contagions
922
+                      }
923
+                    }
924
+                  }
925
+
926
+                  if (results[i]['诊断'] === undefined) {
927
+                    obj['diagnose'] = ''
928
+                  } else {
929
+                    if (key == '诊断') {
930
+                      obj['diagnose'] = results[i][key]
931
+                    }
932
+                  }
933
+                  console.log(obj)
934
+
935
+                  if (results[i]['透析号'] === undefined) {
936
+                    obj['dialysis_no'] = ''
937
+                  } else {
938
+                    if (key == '透析号') {
939
+                      obj['dialysis_no'] = results[i][key].replace(/\s/g,"")
940
+                    }
941
+                  }
942
+
943
+                  console.log(obj)
944
+
945
+                  if (results[i]['干体重(kg)'] === undefined) {
946
+                    obj['dry_weight'] = ''
947
+                  } else {
948
+                    if (key == '干体重(kg)') {
949
+                      obj['dry_weight'] = results[i][key].replace(/\s/g,"")
950
+                    }
951
+                  }
952
+
953
+                  console.log(obj)
954
+
955
+                  if (results[i]['身高(cm)'] === undefined) {
956
+                    obj['height'] = ''
957
+                  } else {
958
+                    if (key == '身高(cm)') {
959
+                      obj['height'] = results[i][key].replace(/\s/g,"")
960
+                    }
961
+                  }
962
+
963
+                  console.log(obj)
964
+
965
+                  if (results[i]['家庭住址'] === undefined) {
966
+                    obj['home_address'] = ''
967
+                  } else {
968
+                    if (key == '家庭住址') {
969
+                      obj['home_address'] = results[i][key]
970
+                    }
971
+                  }
746 972
                 }
973
+
974
+                this.export_date.push(obj)
747 975
               }
748
-            }
749 976
 
750
-            if (results[i]['*手机号'] === undefined) {
751
-              obj['phone'] = ''
752
-            } else {
753
-              if (key == '*手机号') {
754
-                obj['phone'] = results[i][key].trim()
977
+              let index = 0
978
+
979
+              for (let i = 0; i < this.export_date.length; i++) {
980
+                if (this.export_date[i].dialysis_no == '') {
981
+                  let new_dialysis_no = this.max_dialysis_no + index
982
+                  console.log(new_dialysis_no)
983
+                  index++
984
+                  let no = new_dialysis_no.toString()
985
+                  console.log(no)
986
+                  let rep = 3 - no.length
987
+                  console.log(rep)
988
+                  let tempNo = ""
989
+                  if (rep == 1){
990
+                    tempNo = "0"
991
+                  }
992
+
993
+                  if (rep == 2){
994
+                    tempNo = "00"
995
+                  }
996
+
997
+
998
+                  console.log(tempNo)
999
+                  if (rep > 0) {
1000
+                    no = tempNo + no
1001
+                  }
1002
+                  this.export_date[i].dialysis_no = no
1003
+                }
755 1004
               }
756
-            }
757 1005
 
758
-            if (results[i]['*身份证号'] === undefined) {
759
-              obj['id_card_no'] = ''
760 1006
 
761
-            } else {
762
-              if (key == '*身份证号') {
763
-                obj['id_card_no'] = results[i][key].trim()
764
-              }
765
-            }
1007
+              console.log(this.export_date)
766 1008
 
767
-            if (results[i]['*首次肾脏治疗时间'] === undefined) {
768
-              obj['first_treatment_date'] = ''
1009
+              var tempExportDate = this.export_date
1010
+              var tempExportDateOne = this.export_date
1011
+              var tempExportDateTwo = this.export_date
769 1012
 
770
-            } else {
771
-              if (key == '*首次肾脏治疗时间') {
772
-                var month = parseInt(results[i][key].trim().split('/')[0])
773
-                var day = parseInt(results[i][key].trim().split('/')[1])
774
-                var year = parseInt(results[i][key].trim().split('/')[2])
775 1013
 
776
-                if (day < 10) {
777
-                  day = '0' + day
778
-                }
779
-                if (month < 10) {
780
-                  month = '0' + month
781
-                }
782
-                obj['first_treatment_date'] = '20' + year + '/' + month + '/' + day
783
-              }
784
-            }
785 1014
 
786
-            if (results[i]['*患者来源'] === undefined) {
787
-              obj['source'] = '0'
1015
+              const obj2 = {}
1016
+              tempExportDate = tempExportDate.reduce((cur, next) => {
1017
+                obj2[next.dialysis_no] ? '' : obj2[next.dialysis_no] = true && cur.push(next)
1018
+                return cur
1019
+              }, []) // 设置cur默认类型为数组,并且初始值为空的数组
788 1020
 
789
-            } else {
790
-              if (key == '*患者来源') {
791
-                if (results[i][key] == '门诊') {
792
-                  obj['source'] = '1'
793
-                } else if (results[i][key] == '住院') {
794
-                  obj['source'] = '2'
795
-                } else {
796
-                  obj['source'] = '0'
797
-                }
798
-              }
799
-            }
800 1021
 
801
-            if (results[i]['*治疗状态'] === undefined) {
802
-              obj['lapseto'] = '0'
803 1022
 
804
-            } else {
805
-              if (key == '*治疗状态') {
806
-                if (results[i][key] == '留治') {
807
-                  obj['lapseto'] = '1'
808
-                } else if (results[i][key] == '转归') {
809
-                  obj['lapseto'] = '2'
810
-                } else {
811
-                  obj['lapseto'] = '0'
812
-                }
1023
+              if (tempExportDate.length < this.export_date.length){
1024
+                this.dialysisVisible = true
1025
+                return
813 1026
               }
814
-            }
815 1027
 
816
-            if (results[i]['*传染病'] === undefined) {
817
-              let contagions = []
818
-              obj['is_infectious'] = '0'
819
-              obj['contagions'] = contagions
820 1028
 
821
-            } else {
822
-              if (key == '*传染病') {
823
-                if (results[i][key] == '无') {
824
-                  let contagions = []
825
-                  obj['is_infectious'] = '1'
826
-                  obj['contagions'] = contagions
827
-
828
-                } else if (results[i][key] == '乙肝') {
829
-                  let contagions = []
830
-                  contagions.push(2)
831
-                  obj['is_infectious'] = '2'
832
-                  obj['contagions'] = contagions
833
-                } else if (results[i][key] == '丙肝') {
834
-                  let contagions = []
835
-                  contagions.push(3)
836
-                  obj['is_infectious'] = '2'
837
-                  obj['contagions'] = contagions
838
-
839
-                } else if (results[i][key] == '艾滋病') {
840
-                  let contagions = []
841
-                  contagions.push(4)
842
-                  obj['is_infectious'] = '2'
843
-                  obj['contagions'] = contagions
844
-
845
-                } else if (results[i][key] == '肺结核') {
846
-                  let contagions = []
847
-                  contagions.push(5)
848
-                  obj['is_infectious'] = '2'
849
-                  obj['contagions'] = contagions
850
-
851
-                } else if (results[i][key] == '梅毒') {
852
-                  let contagions = []
853
-                  contagions.push(6)
854
-                  obj['is_infectious'] = '2'
855
-                  obj['contagions'] = contagions
856
-                } else {
857
-                  let contagions = []
858
-                  obj['is_infectious'] = '0'
859
-                  obj['contagions'] = contagions
860
-                }
1029
+
1030
+              const obj3 = {}
1031
+              tempExportDateOne = tempExportDateOne.reduce((cur, next) => {
1032
+                obj3[next.phone] ? '' : obj3[next.phone] = true && cur.push(next)
1033
+                return cur
1034
+              }, []) // 设置cur默认类型为数组,并且初始值为空的数组
1035
+
1036
+
1037
+
1038
+              if (tempExportDateOne.length < this.export_date.length){
1039
+                this.phoneVisible = true
1040
+                return
861 1041
               }
862
-            }
863 1042
 
864
-            if (results[i]['诊断'] === undefined) {
865
-              obj['diagnose'] = ''
866
-            } else {
867
-              if (key == '诊断') {
868
-                obj['diagnose'] = results[i][key]
1043
+
1044
+
1045
+
1046
+              const obj4 = {}
1047
+              tempExportDateTwo = tempExportDateTwo.reduce((cur, next) => {
1048
+                obj4[next.id_card_no] ? '' : obj4[next.id_card_no] = true && cur.push(next)
1049
+                return cur
1050
+              }, []) // 设置cur默认类型为数组,并且初始值为空的数组
1051
+
1052
+
1053
+
1054
+              if (tempExportDateTwo.length < this.export_date.length){
1055
+                this.idCardNoVisible = true
1056
+                return
869 1057
               }
870
-            }
871
-          }
872
-          this.export_date.push(obj)
873
-        }
874 1058
 
875
-        let params = {
876
-          'patients': this.export_date
877
-        }
878
-        postExportPatients(params).then(
879
-          response => {
880
-            if (response.data.state === 1) {
881
-              this.getList()
882
-            } else {
883
-              this.$message.error(response.data.msg)
1059
+
1060
+
1061
+
1062
+              // let params = {
1063
+              //   'patients': this.export_date
1064
+              // }
1065
+              // postExportPatients(params).then(
1066
+              //   response => {
1067
+              //     if (response.data.state === 1) {
1068
+              //       this.getList()
1069
+              //     } else {
1070
+              //       this.$message.error(response.data.msg)
1071
+              //     }
1072
+              //   }
1073
+              // )
1074
+
884 1075
             }
885 1076
           }
886 1077
         )
1078
+
887 1079
       },
888 1080
       getCount(row) {
889 1081
         console.log(row)
@@ -947,88 +1139,88 @@
947 1139
         this.pageSelect = this.multipleSelection.length
948 1140
       },
949 1141
 
950
-    handleCheckedCitiesChange(value) {
951
-      const checkedCount = value.length;
952
-      this.checkAll = checkedCount === this.cities.length;
953
-      this.isIndeterminate =
954
-        checkedCount > 0 && checkedCount < this.cities.length;
955
-    },
956
-    handleSizeChange(val) {
957
-      this.listQuery.limit = val;
958
-      this.getList();
959
-    },
960
-    handleCurrentChange(val) {
961
-      this.listQuery.page = val;
962
-      this.getList();
963
-    },
964
-    changeCategoryId(categoryId) {
965
-      this.categoryId = categoryId;
966
-    },
967
-    selectSchedulType(scheduleType) {
968
-      // alert(scheduleType);/
969
-      this.schedulType = scheduleType;
970
-      this.listQuery.schedul_type = scheduleType;
971
-      this.getList();
972
-    },
973
-    selectSystemType(systemType) {
974
-      this.systemType = systemType;
975
-      this.listQuery.binding_state = systemType;
976
-      this.getList();
977
-    },
978
-    selectLapseTo(lapseto) {
979
-      this.lapsetoType = lapseto;
980
-      this.listQuery.lapseto = lapseto;
981
-      this.getList();
982
-    },
983
-    selectSource(source) {
984
-      this.sourceType = source;
985
-      this.listQuery.source = source;
986
-      this.getList();
987
-    },
988
-    changeTimeOne(val) {
989
-      var time = this.getTimestamp(val) - this.end_time;
990
-      if (time > 0) {
991
-        this.$message.error("结束时间不能小于开始时间");
992
-        this.listQuery.start_time = "";
993
-      } else {
994
-        this.getList();
995
-        this.startTime = this.getTimestamp(val);
996
-      }
997
-    },
998
-    changeTime(val) {
999
-      var time = this.getTimestamp(val) - this.startTime;
1000
-      if (time < 0) {
1001
-        this.$message.error("结束时间不能小于开始时间");
1002
-        this.listQuery.end_time = "";
1003
-      } else {
1004
-        this.getList();
1005
-        this.end_time = this.getTimestamp(val);
1006
-      }
1007
-    },
1008
-    getTimestamp(time) {
1009
-      // 把时间日期转成时间戳
1010
-      return new Date(time).getTime() / 1000;
1011
-    },
1012
-    search() {
1013
-      this.listQuery.keywords = this.searchKey;
1014
-      this.getList();
1015
-    },
1016
-    changeOtherSearch() {
1017
-      this.getList();
1018
-    },
1019
-    getList() {
1020
-      fetchList(this.listQuery).then(response => {
1021
-        if (response.data.state === 0) {
1022
-          this.$message.error(response.data.msg);
1023
-          return false;
1142
+      handleCheckedCitiesChange(value) {
1143
+        const checkedCount = value.length
1144
+        this.checkAll = checkedCount === this.cities.length
1145
+        this.isIndeterminate =
1146
+          checkedCount > 0 && checkedCount < this.cities.length
1147
+      },
1148
+      handleSizeChange(val) {
1149
+        this.listQuery.limit = val
1150
+        this.getList()
1151
+      },
1152
+      handleCurrentChange(val) {
1153
+        this.listQuery.page = val
1154
+        this.getList()
1155
+      },
1156
+      changeCategoryId(categoryId) {
1157
+        this.categoryId = categoryId
1158
+      },
1159
+      selectSchedulType(scheduleType) {
1160
+        // alert(scheduleType);/
1161
+        this.schedulType = scheduleType
1162
+        this.listQuery.schedul_type = scheduleType
1163
+        this.getList()
1164
+      },
1165
+      selectSystemType(systemType) {
1166
+        this.systemType = systemType
1167
+        this.listQuery.binding_state = systemType
1168
+        this.getList()
1169
+      },
1170
+      selectLapseTo(lapseto) {
1171
+        this.lapsetoType = lapseto
1172
+        this.listQuery.lapseto = lapseto
1173
+        this.getList()
1174
+      },
1175
+      selectSource(source) {
1176
+        this.sourceType = source
1177
+        this.listQuery.source = source
1178
+        this.getList()
1179
+      },
1180
+      changeTimeOne(val) {
1181
+        var time = this.getTimestamp(val) - this.end_time
1182
+        if (time > 0) {
1183
+          this.$message.error('结束时间不能小于开始时间')
1184
+          this.listQuery.start_time = ''
1024 1185
         } else {
1025
-          this.tableData = response.data.data.patients;
1026
-          // console.log('病人是', this.tableData)
1027
-          this.pageTotal = this.tableData.length;
1028
-          this.total = response.data.data.total;
1186
+          this.getList()
1187
+          this.startTime = this.getTimestamp(val)
1029 1188
         }
1030
-      });
1031
-    },
1189
+      },
1190
+      changeTime(val) {
1191
+        var time = this.getTimestamp(val) - this.startTime
1192
+        if (time < 0) {
1193
+          this.$message.error('结束时间不能小于开始时间')
1194
+          this.listQuery.end_time = ''
1195
+        } else {
1196
+          this.getList()
1197
+          this.end_time = this.getTimestamp(val)
1198
+        }
1199
+      },
1200
+      getTimestamp(time) {
1201
+        // 把时间日期转成时间戳
1202
+        return new Date(time).getTime() / 1000
1203
+      },
1204
+      search() {
1205
+        this.listQuery.keywords = this.searchKey
1206
+        this.getList()
1207
+      },
1208
+      changeOtherSearch() {
1209
+        this.getList()
1210
+      },
1211
+      getList() {
1212
+        fetchList(this.listQuery).then(response => {
1213
+          if (response.data.state === 0) {
1214
+            this.$message.error(response.data.msg)
1215
+            return false
1216
+          } else {
1217
+            this.tableData = response.data.data.patients
1218
+            // console.log('病人是', this.tableData)
1219
+            this.pageTotal = this.tableData.length
1220
+            this.total = response.data.data.total
1221
+          }
1222
+        })
1223
+      },
1032 1224
 
1033 1225
       OpenView(name, number, id) {
1034 1226
         this.name = name

+ 25 - 86
src/xt_pages/workforce/appointment.vue Näytä tiedosto

@@ -11,7 +11,7 @@
11 11
         <br/>
12 12
         <br/>
13 13
         <span>{{getContent(item)}}</span>
14
-        <span style="color:blue"  @click="generateTxt(item)">点击</span>
14
+        <span style="color:blue" @click="generateTxt(item)">点击</span>
15 15
         <span>查看详情</span>
16 16
         <br/>
17 17
         <br/>
@@ -98,7 +98,7 @@
98 98
 <script>
99 99
   import { parseTime } from '@/utils'
100 100
   import tableData from './components/tableData'
101
-  import { exportSchedule, getWeekPanels,initDate } from '@/api/schedule'
101
+  import { exportSchedule, getWeekPanels, initDate } from '@/api/schedule'
102 102
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
103 103
   import UploadExcel from '@/xt_pages/components/UploadExcel'
104 104
   import ScheduleUploadExcel from './components/scheduleUploadExcel/index'
@@ -116,14 +116,14 @@
116 116
         tabPosition: 'top',
117 117
         partitions: {},
118 118
         scheduleZone: [],
119
-        days:[],
120
-        logs:[],
119
+        days: [],
120
+        logs: [],
121 121
         scheduleZoneRow: [],
122 122
         downloadLoading: false,
123 123
         msgTipVisible: false,
124 124
         dialogVisible: false,
125 125
         isExistRepeatVisible: false,
126
-        exportLogVisible:false,
126
+        exportLogVisible: false,
127 127
         theWeek: {
128 128
           lastWeek: 0,
129 129
           thisWeek: 0,
@@ -139,25 +139,26 @@
139 139
       UploadExcel
140 140
     },
141 141
     methods: {
142
-      generateTxt:function(log) {
142
+      generateTxt: function(log) {
143 143
         var content = ''
144
-        var errlog =  log.err_logs
145
-        for (let i = 0; i< errlog.length; i++){
144
+        var errlog = log.err_logs
145
+        content = this.getContent(log)
146
+
147
+        for (let i = 0; i < errlog.length; i++) {
146 148
           if (content.length == 0) {
147 149
             content = errlog[i].err_msg
148
-          }else{
149
-            content = content +"\n"+errlog[i].err_msg
150
+          } else {
151
+            content = content + '\n' + errlog[i].err_msg
150 152
           }
151 153
         }
152 154
 
153
-
154 155
         var url = new Blob(['\ufeff' + content], { type: 'text/txt,charset=UTF-8' })
155 156
         if (typeof url === 'object' && url instanceof Blob) {
156 157
           url = URL.createObjectURL(url) // 创建blob地址
157 158
         }
158 159
         const aLink = document.createElement('a')
159 160
         aLink.href = url
160
-        aLink.download = this.timestampToTime(log.export_time)+'错误日志.txt'
161
+        aLink.download = this.timestampToTime(log.export_time) + '错误日志.txt'
161 162
         aLink.click()
162 163
 
163 164
       },
@@ -168,7 +169,7 @@
168 169
         var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + '日 '
169 170
         var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + '时'
170 171
         var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + '分'
171
-        var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds())+'秒'
172
+        var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()) + '秒'
172 173
         return Y + M + D + h + m + s
173 174
       },
174 175
       getContent(log) {
@@ -415,13 +416,13 @@
415 416
           }
416 417
           console.log(list)
417 418
           const data = this.formatJson(filterVal, list)
418
-          const filename = "排班模版"
419
+          const filename = '排班模版'
419 420
           excel.export_json_to_excel({
420 421
             multiHeader,
421 422
             header,
422 423
             merges,
423 424
             data,
424
-            filename,
425
+            filename
425 426
           })
426 427
           this.downloadLoading = false
427 428
         })
@@ -472,9 +473,7 @@
472 473
         return isShow
473 474
       }, handleSuccess({ results, header }) {
474 475
 
475
-
476
-
477
-        if(results.length > 0) {
476
+        if (results.length > 0) {
478 477
           let headers = []
479 478
           for (let key in results[0]) {
480 479
             headers.push(key)
@@ -607,13 +606,11 @@
607 606
             this.dialogVisible = true
608 607
             return
609 608
           }
610
-        }else{
609
+        } else {
611 610
           this.dialogVisible = true
612 611
           return
613 612
         }
614 613
 
615
-
616
-
617 614
         let is_system_zone = true
618 615
         let is_device_number = true
619 616
         let zones = []
@@ -673,14 +670,7 @@
673 670
         }
674 671
 
675 672
 
676
-        console.log("111111111")
677
-        console.log(is_system_zone)
678
-        console.log(is_device_number)
679
-        console.log("22222222222")
680
-
681
-
682 673
 
683
-        //
684 674
 
685 675
         let tempObj = null
686 676
         if (results.length > 0) {
@@ -694,7 +684,7 @@
694 684
 
695 685
             if (key != '区号' && key != '机号') {
696 686
               let obj = {}
697
-              obj['name'] = results[i + 1][key].trim()
687
+              obj['name'] = results[i + 1][key].replace(/\s/g, '')
698 688
               if (tempObj[key] == '上午') {
699 689
                 obj['schedule_type'] = 1
700 690
               } else if (tempObj[key] == '下午') {
@@ -726,7 +716,7 @@
726 716
 
727 717
               var current_date_two = new Date(m_year + '-' + m_month + '-' + m_date)
728 718
 
729
-              if(new Date(tempObjTwo['schedule_date']).getTime() >=  new Date(current_date_two).getTime()) {
719
+              if (new Date(tempObjTwo['schedule_date']).getTime() >= new Date(current_date_two).getTime()) {
730 720
                 datas.push(tempObjTwo)
731 721
               }
732 722
             }
@@ -734,9 +724,6 @@
734 724
 
735 725
         }
736 726
 
737
-        console.log("333333333")
738
-        console.log(datas)
739
-        console.log("44444444444")
740 727
 
741 728
         let date_arr = []
742 729
         //校验文档是否规范
@@ -772,10 +759,7 @@
772 759
           }
773 760
         }
774 761
 
775
-        console.log("333333333")
776
-        console.log(is_system_zone)
777
-        console.log(is_device_number)
778
-        console.log("44444444444")
762
+
779 763
 
780 764
         //校验文档中同一天同个人是否存在多个排班
781 765
         let is_exist_repeat = false
@@ -815,11 +799,10 @@
815 799
           }
816 800
         }
817 801
 
818
-        console.log(header.length )
819
-        console.log(is_system_zone )
802
+        console.log(header.length)
803
+        console.log(is_system_zone)
820 804
         console.log(is_device_number)
821 805
 
822
-
823 806
         if (header.length > 65 || !is_system_zone || !is_device_number) {
824 807
           this.dialogVisible = true
825 808
           return
@@ -839,30 +822,24 @@
839 822
             var day = day2.getDate() < 10 ? '0' + (day2.getDate()).toString() : (day2.getMonth() + 1).toString()
840 823
 
841 824
             var date = day2.getFullYear() + '-' + month + '-' + day
842
-            exportSchedule(params,date).then(response => {
825
+            exportSchedule(params, date).then(response => {
843 826
               if (response.data.state == 0) {
844 827
                 return false
845 828
               }
846 829
               this.getWeekPanels()
847 830
 
848
-
849
-
850 831
             })
851 832
           }
852 833
 
853 834
         }
854 835
 
855 836
       },
856
-      getInitDate(){
837
+      getInitDate() {
857 838
         initDate().then(response => {
858 839
           if (response.data.state == 0) {
859 840
             return false
860 841
           }
861
-
862 842
           this.days = response.data.data.days
863
-
864
-
865
-
866 843
         })
867 844
       },
868 845
       getWeekByResultsStr(key) {
@@ -1408,23 +1385,18 @@
1408 1385
           case '周一_1': //下周一
1409 1386
             return this.days[7]
1410 1387
 
1411
-
1412
-
1413
-
1414 1388
             break
1415 1389
 
1416 1390
           case '_14': //下周一
1417 1391
 
1418 1392
             return this.days[7]
1419 1393
 
1420
-
1421 1394
             break
1422 1395
 
1423 1396
           case   '_15': //下周一
1424 1397
 
1425 1398
             return this.days[7]
1426 1399
 
1427
-
1428 1400
             break
1429 1401
 
1430 1402
           case '周一_2' : //下下周一
@@ -1437,14 +1409,12 @@
1437 1409
 
1438 1410
             return this.days[14]
1439 1411
 
1440
-
1441 1412
             break
1442 1413
 
1443 1414
           case '_29': //下下周一
1444 1415
 
1445 1416
             return this.days[14]
1446 1417
 
1447
-
1448 1418
             break
1449 1419
 
1450 1420
           case '周二' : //本周二
@@ -1470,19 +1440,16 @@
1470 1440
           case  '_16' ://下周二
1471 1441
             return this.days[8]
1472 1442
 
1473
-
1474 1443
             break
1475 1444
 
1476 1445
           case  '_17'://下周二
1477 1446
             return this.days[8]
1478 1447
 
1479
-
1480 1448
             break
1481 1449
 
1482 1450
           case '周二_2' ://下下周二
1483 1451
             return this.days[15]
1484 1452
 
1485
-
1486 1453
             break
1487 1454
 
1488 1455
           case '_30' ://下下周二
@@ -1503,43 +1470,36 @@
1503 1470
           case  '_4': //本周三
1504 1471
             return this.days[2]
1505 1472
 
1506
-
1507 1473
             break
1508 1474
 
1509 1475
           case '_5': //本周三
1510 1476
             return this.days[2]
1511 1477
 
1512
-
1513 1478
             break
1514 1479
 
1515 1480
           case '周三_1': //下周三
1516 1481
             return this.days[9]
1517 1482
 
1518
-
1519 1483
             break
1520 1484
 
1521 1485
           case  '_18' : //下周三
1522 1486
             return this.days[9]
1523 1487
 
1524
-
1525 1488
             break
1526 1489
 
1527 1490
           case '_19': //下周三
1528 1491
             return this.days[9]
1529 1492
 
1530
-
1531 1493
             break
1532 1494
 
1533 1495
           case '周三_2' : //下下周三
1534 1496
             return this.days[16]
1535 1497
 
1536
-
1537 1498
             break
1538 1499
 
1539 1500
           case '_32' : //下下周三
1540 1501
             return this.days[16]
1541 1502
 
1542
-
1543 1503
             break
1544 1504
 
1545 1505
           case  '_33': //下下周三
@@ -1555,20 +1515,17 @@
1555 1515
           case '_6' :
1556 1516
             return this.days[4]
1557 1517
 
1558
-
1559 1518
             break
1560 1519
 
1561 1520
           case  '_7':
1562 1521
             return this.days[4]
1563 1522
 
1564
-
1565 1523
             break
1566 1524
 
1567 1525
           case '周四_1':
1568 1526
 
1569 1527
             return this.days[10]
1570 1528
 
1571
-
1572 1529
             break
1573 1530
 
1574 1531
           case '_20' :
@@ -1587,7 +1544,6 @@
1587 1544
 
1588 1545
             return this.days[17]
1589 1546
 
1590
-
1591 1547
             break
1592 1548
 
1593 1549
           case '_34':
@@ -1604,24 +1560,20 @@
1604 1560
           case '周五':
1605 1561
             return this.days[4]
1606 1562
 
1607
-
1608 1563
             break
1609 1564
 
1610 1565
           case  '_8':
1611 1566
             return this.days[4]
1612 1567
 
1613
-
1614 1568
             break
1615 1569
 
1616 1570
           case  '_9':
1617 1571
             return this.days[4]
1618 1572
 
1619
-
1620 1573
             break
1621 1574
           case '周五_1' :
1622 1575
             return this.days[11]
1623 1576
 
1624
-
1625 1577
             break
1626 1578
 
1627 1579
           case '_22' :
@@ -1632,18 +1584,15 @@
1632 1584
           case  '_23':
1633 1585
             return this.days[11]
1634 1586
 
1635
-
1636 1587
             break
1637 1588
           case '周五_2' :
1638 1589
             return this.days[18]
1639 1590
 
1640
-
1641 1591
             break
1642 1592
 
1643 1593
           case '_36':
1644 1594
             return this.days[18]
1645 1595
 
1646
-
1647 1596
             break
1648 1597
 
1649 1598
           case  '_37':
@@ -1654,7 +1603,6 @@
1654 1603
           case '周六' :
1655 1604
             return this.days[5]
1656 1605
 
1657
-
1658 1606
             break
1659 1607
 
1660 1608
           case  '_10' :
@@ -1665,18 +1613,15 @@
1665 1613
           case '_11':
1666 1614
             return this.days[5]
1667 1615
 
1668
-
1669 1616
             break
1670 1617
           case '周六_1' :
1671 1618
             return this.days[12]
1672 1619
 
1673
-
1674 1620
             break
1675 1621
 
1676 1622
           case  '_24' :
1677 1623
             return this.days[12]
1678 1624
 
1679
-
1680 1625
             break
1681 1626
 
1682 1627
           case  '_25':
@@ -1687,24 +1632,20 @@
1687 1632
           case '周六_2' :
1688 1633
             return this.days[19]
1689 1634
 
1690
-
1691 1635
             break
1692 1636
 
1693 1637
           case '_38' :
1694 1638
             return this.days[19]
1695 1639
 
1696
-
1697 1640
             break
1698 1641
 
1699 1642
           case '_39':
1700 1643
             return this.days[19]
1701 1644
 
1702
-
1703 1645
             break
1704 1646
           case '周日' :
1705 1647
             return this.days[6]
1706 1648
 
1707
-
1708 1649
             break
1709 1650
 
1710 1651
           case  '_12' :
@@ -1718,13 +1659,11 @@
1718 1659
           case '周日_1' :
1719 1660
             return this.days[13]
1720 1661
 
1721
-
1722 1662
             break
1723 1663
 
1724 1664
           case  '_26' :
1725 1665
             return this.days[13]
1726 1666
 
1727
-
1728 1667
             break
1729 1668
 
1730 1669
           case  '_27':

+ 22 - 7
src/xt_pages/workforce/template.vue Näytä tiedosto

@@ -64,13 +64,27 @@
64 64
 
65 65
     <div class="position">
66 66
       <bread-crumb :crumbs="crumbs"></bread-crumb>
67
+      <div style="display:flex;align-items:center">
68
+        <!-- <el-col :span="3" style="text-align: right;"> -->
69
+        <el-button v-loading="downloadLoading" v-if="template_mode&&(template_mode.mode == 1 || template_mode.mode == 2)"
70
+                  size="small" icon="el-icon-setting" type="primary" @click="import_file()">导出模版
71
+        </el-button>
67 72
 
68
-      <!-- <el-col :span="3" style="text-align: right;"> -->
69
-        <div style="display:flex;align-items:center">
70
-          <el-button v-loading="downloadLoading" v-if="template_mode&&(template_mode.mode == 1 || template_mode.mode == 2)"
71
-                    size="small" icon="el-icon-setting" type="primary" @click="import_file()">导出模版
72
-          </el-button>
73
-          <el-button size="small" icon="el-icon-setting" type="primary" @click="setScheduleTemplateAction">设置模板</el-button>
73
+
74
+        <el-button
75
+          @click="generateLog()"
76
+          class="filter-item"
77
+          type="primary"
78
+          size="small"
79
+        >下载错误日志
80
+        </el-button>
81
+
82
+        <!--<upload-excel style="float:right;" :on-success='handleSuccess' :before-upload="beforeUpload"></upload-excel>-->
83
+        <schedule-template-upload-excel style="margin-right:10px;" :on-success='handleSuccess'
84
+                                        :before-upload="beforeUpload"></schedule-template-upload-excel>
85
+
86
+
87
+        <el-button size="small" icon="el-icon-setting" type="primary" @click="setScheduleTemplateAction">设置模板</el-button>
74 88
       </div>
75 89
       <!-- </el-col> -->
76 90
     </div>
@@ -208,6 +222,7 @@
208 222
       generateTxt:function(log) {
209 223
         var content = ''
210 224
         var errlog =  log.err_logs
225
+        content = this.getContent(log)
211 226
         for (let i = 0; i< errlog.length; i++){
212 227
           if (content.length == 0) {
213 228
             content = errlog[i].err_msg
@@ -551,7 +566,7 @@
551 566
 
552 567
             if (key != '区号' && key != '机号') {
553 568
               let obj = {}
554
-              obj['name'] = results[i + 1][key].trim()
569
+              obj['name'] = results[i + 1][key].replace(/\s/g,"")
555 570
               if (tempObj[key] == '上午') {
556 571
                 obj['schedule_type'] = 1
557 572
               } else if (tempObj[key] == '下午') {