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