|
@@ -452,6 +452,11 @@
|
452
|
452
|
<span>{{ LapsetoInfo(scope.row) }}</span>
|
453
|
453
|
</template>
|
454
|
454
|
</el-table-column>
|
|
455
|
+ <el-table-column label="患者类型" align="center">
|
|
456
|
+ <template slot-scope="scope">
|
|
457
|
+ <span>{{ getpatient(scope.row.patient_type) }}</span>
|
|
458
|
+ </template>
|
|
459
|
+ </el-table-column>
|
455
|
460
|
<el-table-column label="转出(死亡)时间" min-width="134" align="center">
|
456
|
461
|
<template slot-scope="scope">
|
457
|
462
|
<!-- <span>{{getTime(scope.row.death_time)}}</span>-->
|
|
@@ -929,7 +934,10 @@
|
929
|
934
|
},
|
930
|
935
|
adminUserOptions:[],
|
931
|
936
|
scheduleList:[],
|
932
|
|
- patientsList:[]
|
|
937
|
+ patientsList:[],
|
|
938
|
+ patienttypeArr:[{value:1,label:'血透患者'},{value:2,label:'慢病患者'},{value:3,label:'会员患者'},
|
|
939
|
+ {value:4,label:'腹透患者'},{value:5,label:'CKD患者'},{value:6,label:'其他患者'}
|
|
940
|
+ ]
|
933
|
941
|
}
|
934
|
942
|
},
|
935
|
943
|
created() {
|
|
@@ -953,6 +961,19 @@
|
953
|
961
|
},
|
954
|
962
|
|
955
|
963
|
methods: {
|
|
964
|
+ // 患者类型
|
|
965
|
+ getpatient(id){
|
|
966
|
+ const options = this.patienttypeArr
|
|
967
|
+ if(id !=0&&id!=''){
|
|
968
|
+ for(let i in options){
|
|
969
|
+ if(id == options[i].value){
|
|
970
|
+ return options[i].label
|
|
971
|
+ }
|
|
972
|
+ }
|
|
973
|
+ }else{
|
|
974
|
+ return ''
|
|
975
|
+ }
|
|
976
|
+ },
|
956
|
977
|
getExportList(){
|
957
|
978
|
getExportList(this.listQuery).then(response=>{
|
958
|
979
|
if(response.data.state ==1){
|
|
@@ -1769,132 +1790,132 @@
|
1769
|
1790
|
}
|
1770
|
1791
|
|
1771
|
1792
|
},
|
1772
|
|
- toExport(){
|
1773
|
|
- import('@/vendor/Export2Excel').then(excel => {
|
|
1793
|
+ toExport(){
|
|
1794
|
+ import('@/vendor/Export2Excel').then(excel => {
|
1774
|
1795
|
|
1775
|
|
- console.log("hhhh323223",this.tableData)
|
1776
|
|
- for(let i=0;i<this.tableData.length;i++){
|
1777
|
|
- if(this.tableData[i].gender == 1){
|
1778
|
|
- this.tableData[i].genders = "男"
|
1779
|
|
- }
|
1780
|
|
- if(this.tableData[i].gender == 2){
|
1781
|
|
- this.tableData[i].genders = "女"
|
1782
|
|
- }
|
1783
|
|
- this.tableData[i].age_year = this.tranAge(this.tableData[i])
|
1784
|
|
- this.tableData[i].first_dialysis_date = this.getTime(this.tableData[i].first_dialysis_date)
|
1785
|
|
- if(this.tableData[i].lapseto == 0){
|
1786
|
|
- this.tableData[i].lapesetos = ""
|
1787
|
|
- }
|
1788
|
|
- if(this.tableData[i].lapseto == 1){
|
1789
|
|
- this.tableData[i].lapesetos = "留治"
|
1790
|
|
- }
|
1791
|
|
- if(this.tableData[i].lapseto == 2){
|
1792
|
|
- this.tableData[i].lapesetos = "转归"
|
1793
|
|
- }
|
1794
|
|
- if(this.tableData[i].source == 0){
|
1795
|
|
- this.tableData[i].sources = ""
|
1796
|
|
- }
|
1797
|
|
- if(this.tableData[i].source == 1){
|
1798
|
|
- this.tableData[i].sources = "门诊"
|
1799
|
|
- }
|
1800
|
|
- if(this.tableData[i].source == 2){
|
1801
|
|
- this.tableData[i].sources = "住院"
|
1802
|
|
- }
|
1803
|
|
- if(this.tableData[i].is_infectious == 0){
|
1804
|
|
- this.tableData[i].is_infectiouss = ""
|
1805
|
|
- }
|
1806
|
|
- if(this.tableData[i].is_infectious == 1){
|
1807
|
|
- this.tableData[i].is_infectiouss = "阴性"
|
1808
|
|
- }
|
1809
|
|
- if(this.tableData[i].is_infectious == 2){
|
1810
|
|
- this.tableData[i].is_infectiouss = "阳性"
|
|
1796
|
+ console.log("hhhh323223",this.tableData)
|
|
1797
|
+ for(let i=0;i<this.tableData.length;i++){
|
|
1798
|
+ if(this.tableData[i].gender == 1){
|
|
1799
|
+ this.tableData[i].genders = "男"
|
|
1800
|
+ }
|
|
1801
|
+ if(this.tableData[i].gender == 2){
|
|
1802
|
+ this.tableData[i].genders = "女"
|
|
1803
|
+ }
|
|
1804
|
+ this.tableData[i].age_year = this.tranAge(this.tableData[i])
|
|
1805
|
+ this.tableData[i].first_dialysis_date = this.getTime(this.tableData[i].first_dialysis_date)
|
|
1806
|
+ if(this.tableData[i].lapseto == 0){
|
|
1807
|
+ this.tableData[i].lapesetos = ""
|
|
1808
|
+ }
|
|
1809
|
+ if(this.tableData[i].lapseto == 1){
|
|
1810
|
+ this.tableData[i].lapesetos = "留治"
|
|
1811
|
+ }
|
|
1812
|
+ if(this.tableData[i].lapseto == 2){
|
|
1813
|
+ this.tableData[i].lapesetos = "转归"
|
|
1814
|
+ }
|
|
1815
|
+ if(this.tableData[i].source == 0){
|
|
1816
|
+ this.tableData[i].sources = ""
|
|
1817
|
+ }
|
|
1818
|
+ if(this.tableData[i].source == 1){
|
|
1819
|
+ this.tableData[i].sources = "门诊"
|
|
1820
|
+ }
|
|
1821
|
+ if(this.tableData[i].source == 2){
|
|
1822
|
+ this.tableData[i].sources = "住院"
|
|
1823
|
+ }
|
|
1824
|
+ if(this.tableData[i].is_infectious == 0){
|
|
1825
|
+ this.tableData[i].is_infectiouss = ""
|
|
1826
|
+ }
|
|
1827
|
+ if(this.tableData[i].is_infectious == 1){
|
|
1828
|
+ this.tableData[i].is_infectiouss = "阴性"
|
|
1829
|
+ }
|
|
1830
|
+ if(this.tableData[i].is_infectious == 2){
|
|
1831
|
+ this.tableData[i].is_infectiouss = "阳性"
|
|
1832
|
+ }
|
|
1833
|
+
|
|
1834
|
+ this.tableData[i].ctime = this.getTime(this.tableData[i].created_time)
|
1811
|
1835
|
}
|
1812
|
1836
|
|
1813
|
|
- this.tableData[i].ctime = this.getTime(this.tableData[i].created_time)
|
1814
|
|
- }
|
|
1837
|
+ const tHeader = ['姓名', '性别', '身份证号码','年龄','透析号','首次治疗时间','本人电话','患者来源','治疗状态','传染病','家庭住址','工作单位',"登记时间","家属电话","上家透析医院"]
|
|
1838
|
+ const filterVal = ['name', 'genders', 'id_card_no','age_year','dialysis_no','first_dialysis_date','phone','sources','lapesetos','is_infectiouss','home_address','work_unit','ctime','home_telephone','first_dialysis_hospital']
|
|
1839
|
+ console.log("table",this.tableData)
|
1815
|
1840
|
|
1816
|
|
- const tHeader = ['姓名', '性别', '身份证号码','年龄','透析号','首次治疗时间','本人电话','患者来源','治疗状态','传染病','家庭住址','工作单位',"登记时间","家属电话","上家透析医院"]
|
1817
|
|
- const filterVal = ['name', 'genders', 'id_card_no','age_year','dialysis_no','first_dialysis_date','phone','sources','lapesetos','is_infectiouss','home_address','work_unit','ctime','home_telephone','first_dialysis_hospital']
|
1818
|
|
- console.log("table",this.tableData)
|
|
1841
|
+ const data = this.formatJson(filterVal, this.tableData)
|
|
1842
|
+ excel.export_json_to_excel({
|
|
1843
|
+ header: tHeader,
|
|
1844
|
+ data,
|
|
1845
|
+ filename: '患者名单'
|
|
1846
|
+ })
|
|
1847
|
+ this.downloadLoading = false
|
|
1848
|
+ })
|
|
1849
|
+ },
|
|
1850
|
+ formatJson(filterVal, jsonData) {
|
|
1851
|
+ return jsonData.map(v => filterVal.map(j => v[j]));
|
|
1852
|
+ },
|
1819
|
1853
|
|
1820
|
|
- const data = this.formatJson(filterVal, this.tableData)
|
1821
|
|
- excel.export_json_to_excel({
|
1822
|
|
- header: tHeader,
|
1823
|
|
- data,
|
1824
|
|
- filename: '患者名单'
|
1825
|
|
- })
|
1826
|
|
- this.downloadLoading = false
|
1827
|
|
- })
|
1828
|
|
- },
|
1829
|
|
- formatJson(filterVal, jsonData) {
|
1830
|
|
- return jsonData.map(v => filterVal.map(j => v[j]));
|
1831
|
|
- },
|
|
1854
|
+ toExportOne(){
|
|
1855
|
+ import('@/vendor/Export2Excel').then(excel => {
|
|
1856
|
+
|
|
1857
|
+ console.log("hhhh323223",this.scheduleList)
|
|
1858
|
+ for(let i=0;i<this.scheduleList.length;i++){
|
|
1859
|
+ this.scheduleList[i].name = ""
|
|
1860
|
+ this.scheduleList[i].wort_unit = ""
|
|
1861
|
+ this.scheduleList[i].name = this.GetPatientName(this.scheduleList[i].patient_id)
|
|
1862
|
+ this.scheduleList[i].wort_unit = this.GetPatientWorkUnit(this.scheduleList[i].patient_id)
|
|
1863
|
+ }
|
1832
|
1864
|
|
1833
|
|
- toExportOne(){
|
1834
|
|
- import('@/vendor/Export2Excel').then(excel => {
|
|
1865
|
+ const tHeader = ['姓名', '工作单位']
|
|
1866
|
+ const filterVal = ['name', 'wort_unit']
|
|
1867
|
+ console.log("table",this.scheduleList)
|
1835
|
1868
|
|
1836
|
|
- console.log("hhhh323223",this.scheduleList)
|
1837
|
|
- for(let i=0;i<this.scheduleList.length;i++){
|
1838
|
|
- this.scheduleList[i].name = ""
|
1839
|
|
- this.scheduleList[i].wort_unit = ""
|
1840
|
|
- this.scheduleList[i].name = this.GetPatientName(this.scheduleList[i].patient_id)
|
1841
|
|
- this.scheduleList[i].wort_unit = this.GetPatientWorkUnit(this.scheduleList[i].patient_id)
|
|
1869
|
+ const data = this.formatJson(filterVal, this.scheduleList)
|
|
1870
|
+ excel.export_json_to_excel({
|
|
1871
|
+ header: tHeader,
|
|
1872
|
+ data,
|
|
1873
|
+ filename: '今日透析记录'
|
|
1874
|
+ })
|
|
1875
|
+ this.downloadLoading = false
|
|
1876
|
+ })
|
|
1877
|
+ },
|
|
1878
|
+ tranAge(val) {
|
|
1879
|
+ if(val.birthday){
|
|
1880
|
+ var birth = uParseTime(val.birthday, '{y}-{m}-{d}');
|
|
1881
|
+ return jsGetAge(birth, '-');
|
1842
|
1882
|
}
|
|
1883
|
+ },
|
|
1884
|
+ toOpen(id){
|
|
1885
|
+ this.$router.push({path:"/patients/patient/"+id})
|
|
1886
|
+ this.$router.push({path:'/patient/patient/'+id+'/lapsoSummary'})
|
|
1887
|
+ // getPatientAllagic(id).then(response=>{
|
|
1888
|
+ // if(response.data.state == 1){
|
|
1889
|
+ // var list = response.data.data.list
|
|
1890
|
+ // this.patieintDialogVisible= true
|
|
1891
|
+ // this.patientAllgicList = list
|
|
1892
|
+ // }
|
|
1893
|
+ // })
|
|
1894
|
+ },
|
|
1895
|
+ GetPatientName(id){
|
|
1896
|
+ var name = ""
|
|
1897
|
+ for(let i=0;i<this.patientsList.length;i++){
|
|
1898
|
+ if(id == this.patientsList[i].id){
|
|
1899
|
+ name = this.patientsList[i].name
|
|
1900
|
+ }
|
|
1901
|
+ }
|
|
1902
|
+ return name
|
|
1903
|
+ },
|
|
1904
|
+ GetPatientWorkUnit(id){
|
|
1905
|
+ console.log("HHAHAHAH",this.patientsList)
|
|
1906
|
+ var work_unit =""
|
|
1907
|
+ for(let i=0;i<this.patientsList.length;i++){
|
|
1908
|
+ if(id == this.patientsList[i].id){
|
|
1909
|
+ work_unit = this.patientsList[i].work_unit
|
|
1910
|
+ }
|
|
1911
|
+ }
|
|
1912
|
+ return work_unit
|
|
1913
|
+ },
|
|
1914
|
+ toJiaoBen(){
|
|
1915
|
+ getPatientLapeso().then(response=>{
|
1843
|
1916
|
|
1844
|
|
- const tHeader = ['姓名', '工作单位']
|
1845
|
|
- const filterVal = ['name', 'wort_unit']
|
1846
|
|
- console.log("table",this.scheduleList)
|
1847
|
|
-
|
1848
|
|
- const data = this.formatJson(filterVal, this.scheduleList)
|
1849
|
|
- excel.export_json_to_excel({
|
1850
|
|
- header: tHeader,
|
1851
|
|
- data,
|
1852
|
|
- filename: '今日透析记录'
|
1853
|
1917
|
})
|
1854
|
|
- this.downloadLoading = false
|
1855
|
|
- })
|
1856
|
|
- },
|
1857
|
|
- tranAge(val) {
|
1858
|
|
- if(val.birthday){
|
1859
|
|
- var birth = uParseTime(val.birthday, '{y}-{m}-{d}');
|
1860
|
|
- return jsGetAge(birth, '-');
|
1861
|
1918
|
}
|
1862
|
|
- },
|
1863
|
|
- toOpen(id){
|
1864
|
|
- this.$router.push({path:"/patients/patient/"+id})
|
1865
|
|
- this.$router.push({path:'/patient/patient/'+id+'/lapsoSummary'})
|
1866
|
|
- // getPatientAllagic(id).then(response=>{
|
1867
|
|
- // if(response.data.state == 1){
|
1868
|
|
- // var list = response.data.data.list
|
1869
|
|
- // this.patieintDialogVisible= true
|
1870
|
|
- // this.patientAllgicList = list
|
1871
|
|
- // }
|
1872
|
|
- // })
|
1873
|
|
- },
|
1874
|
|
- GetPatientName(id){
|
1875
|
|
- var name = ""
|
1876
|
|
- for(let i=0;i<this.patientsList.length;i++){
|
1877
|
|
- if(id == this.patientsList[i].id){
|
1878
|
|
- name = this.patientsList[i].name
|
1879
|
|
- }
|
1880
|
|
- }
|
1881
|
|
- return name
|
1882
|
|
- },
|
1883
|
|
- GetPatientWorkUnit(id){
|
1884
|
|
- console.log("HHAHAHAH",this.patientsList)
|
1885
|
|
- var work_unit =""
|
1886
|
|
- for(let i=0;i<this.patientsList.length;i++){
|
1887
|
|
- if(id == this.patientsList[i].id){
|
1888
|
|
- work_unit = this.patientsList[i].work_unit
|
1889
|
|
- }
|
1890
|
|
- }
|
1891
|
|
- return work_unit
|
1892
|
|
- },
|
1893
|
|
- toJiaoBen(){
|
1894
|
|
- getPatientLapeso().then(response=>{
|
1895
|
|
-
|
1896
|
|
- })
|
1897
|
|
- }
|
1898
|
1919
|
|
1899
|
1920
|
|
1900
|
1921
|
}
|