|
@@ -487,6 +487,14 @@
|
487
|
487
|
|
488
|
488
|
export default {
|
489
|
489
|
props: {
|
|
490
|
+ drugs:Array,
|
|
491
|
+ allDrugs:Array,
|
|
492
|
+ advices_template:Array,
|
|
493
|
+ doctors: Array,
|
|
494
|
+ department:Array,
|
|
495
|
+ sick: Array,
|
|
496
|
+ diagnoses: Array,
|
|
497
|
+ additions: Array,
|
490
|
498
|
patientInfo: Object,
|
491
|
499
|
hisPatientInfo: Object,
|
492
|
500
|
prescriptions: Array,
|
|
@@ -1700,7 +1708,7 @@
|
1700
|
1708
|
},
|
1701
|
1709
|
|
1702
|
1710
|
querySearch2(queryString, cb) {
|
1703
|
|
- var restaurants = this.other_sick
|
|
1711
|
+ var restaurants = this.sick
|
1704
|
1712
|
restaurants.map(item => {
|
1705
|
1713
|
item.value = item.name
|
1706
|
1714
|
})
|
|
@@ -1725,30 +1733,30 @@
|
1725
|
1733
|
return getDictionaryDataConfig(module, filed_name)
|
1726
|
1734
|
|
1727
|
1735
|
},
|
1728
|
|
- getInitData() {
|
1729
|
|
- getInitData().then(response => {
|
1730
|
|
- if (response.data.state == 0) {
|
1731
|
|
- this.$message.error(response.data.msg)
|
1732
|
|
- return false
|
1733
|
|
- } else {
|
1734
|
|
- this.drugs = response.data.data.drugs
|
1735
|
|
- this.allDrugs = response.data.data.drugs
|
1736
|
|
- this.advices_template = response.data.data.advices_template
|
1737
|
|
- this.doctors = response.data.data.doctors
|
1738
|
|
- for (let i = 0; i < this.doctors.length; i++) {
|
1739
|
|
- if (this.doctors[i].user_type == 1) {
|
1740
|
|
- this.doctors.splice(i, 1)
|
1741
|
|
- }
|
1742
|
|
- }
|
1743
|
|
- this.department = response.data.data.department
|
1744
|
|
- this.sick = response.data.data.sick
|
1745
|
|
- this.diagnoses = response.data.data.diagnose
|
1746
|
|
- this.additions = response.data.data.additions
|
1747
|
|
-
|
1748
|
|
- }
|
1749
|
|
- })
|
1750
|
|
-
|
1751
|
|
- },
|
|
1736
|
+ // getInitData() {
|
|
1737
|
+ // getInitData().then(response => {
|
|
1738
|
+ // if (response.data.state == 0) {
|
|
1739
|
+ // this.$message.error(response.data.msg)
|
|
1740
|
+ // return false
|
|
1741
|
+ // } else {
|
|
1742
|
+ // this.drugs = response.data.data.drugs
|
|
1743
|
+ // this.allDrugs = response.data.data.drugs
|
|
1744
|
+ // this.advices_template = response.data.data.advices_template
|
|
1745
|
+ // this.doctors = response.data.data.doctors
|
|
1746
|
+ // for (let i = 0; i < this.doctors.length; i++) {
|
|
1747
|
+ // if (this.doctors[i].user_type == 1) {
|
|
1748
|
+ // this.doctors.splice(i, 1)
|
|
1749
|
+ // }
|
|
1750
|
+ // }
|
|
1751
|
+ // this.department = response.data.data.department
|
|
1752
|
+ // this.sick = response.data.data.sick
|
|
1753
|
+ // this.diagnoses = response.data.data.diagnose
|
|
1754
|
+ // this.additions = response.data.data.additions
|
|
1755
|
+ //
|
|
1756
|
+ // }
|
|
1757
|
+ // })
|
|
1758
|
+ //
|
|
1759
|
+ // },
|
1752
|
1760
|
monthTabclickEvent(val) {
|
1753
|
1761
|
|
1754
|
1762
|
for (let i = 0; i < this.month_prescriptions.length; i++) {
|
|
@@ -1849,7 +1857,10 @@
|
1849
|
1857
|
this.teamList = []
|
1850
|
1858
|
|
1851
|
1859
|
},
|
1852
|
|
- setData(data, info, admin_info, doctors, department, hisPatientInfo, month_data, last_info) {
|
|
1860
|
+ setData(data, info, admin_info, doctors, department, hisPatientInfo, month_data, last_info,sick,diagnoses) {
|
|
1861
|
+ this.sick = sick
|
|
1862
|
+ this.diagnoses = diagnoses
|
|
1863
|
+ this.department = department
|
1853
|
1864
|
this.curMonthPrescriptions = {}
|
1854
|
1865
|
this.curPrescriptions = {}
|
1855
|
1866
|
// this.$refs.tabProjectTeam.clearSelection()
|
|
@@ -1926,108 +1937,86 @@
|
1926
|
1937
|
}
|
1927
|
1938
|
|
1928
|
1939
|
if (this.departmentValue == '' || this.departmentValue == 0) {
|
1929
|
|
- if (this.department.length > 0) {
|
1930
|
|
- this.departmentValue = this.department[0].id
|
|
1940
|
+ if (department.length > 0) {
|
|
1941
|
+ this.departmentValue = department[0].id
|
1931
|
1942
|
|
1932
|
1943
|
}
|
1933
|
1944
|
}
|
1934
|
1945
|
|
1935
|
|
- getInitData().then(response => {
|
1936
|
|
- if (response.data.state == 0) {
|
1937
|
|
- this.$message.error(response.data.msg)
|
1938
|
|
- return false
|
1939
|
|
- } else {
|
1940
|
|
- this.onceTime = false
|
1941
|
|
- this.drugs = response.data.data.drugs
|
1942
|
|
- this.allDrugs = response.data.data.drugs
|
1943
|
|
- this.advices_template = response.data.data.advices_template
|
1944
|
|
- this.doctors = response.data.data.doctors
|
1945
|
|
- for (let i = 0; i < this.doctors.length; i++) {
|
1946
|
|
- if (this.doctors[i].user_type == 1) {
|
1947
|
|
- this.doctors.splice(i, 1)
|
1948
|
|
- }
|
1949
|
|
- }
|
1950
|
|
- this.department = response.data.data.department
|
1951
|
|
- this.sick = response.data.data.sick
|
1952
|
|
- this.diagnoses = response.data.data.diagnose
|
1953
|
|
- this.additions = response.data.data.additions
|
|
1946
|
+ if (info.id > 0) {
|
|
1947
|
+ this.doctorValue = info.doctor_id
|
|
1948
|
+ this.departmentValue = info.departments
|
|
1949
|
+ } else {
|
|
1950
|
+ if (admin_info.id > 0 && admin_info.user_type == 2) {
|
|
1951
|
+ this.doctorValue = admin_info.admin_user_id
|
|
1952
|
+ this.departmentValue = department[0].id
|
1954
|
1953
|
|
1955
|
|
- if (info.id > 0) {
|
1956
|
|
- this.doctorValue = info.doctor_id
|
1957
|
|
- this.departmentValue = info.departments
|
1958
|
|
- } else {
|
1959
|
|
- if (admin_info.id > 0 && admin_info.user_type == 2) {
|
1960
|
|
- this.doctorValue = admin_info.admin_user_id
|
1961
|
|
- this.departmentValue = this.department[0].id
|
|
1954
|
+ } else {
|
|
1955
|
+ this.doctorValue = doctors[0].admin_user_id
|
|
1956
|
+ this.departmentValue = department[0].id
|
|
1957
|
+ }
|
|
1958
|
+ }
|
1962
|
1959
|
|
1963
|
|
- } else {
|
|
1960
|
+ // if (info.register_type == 0) {
|
|
1961
|
+ // for (let i = 0; i < this.register.length; i++) {
|
|
1962
|
+ // this.register_type = this.register[0].value
|
|
1963
|
+ // }
|
|
1964
|
+ // } else {
|
|
1965
|
+ // this.register_type = info.register_type
|
|
1966
|
+ // }
|
1964
|
1967
|
|
1965
|
|
- this.doctorValue = this.doctors[0].admin_user_id
|
1966
|
|
- this.departmentValue = this.department[0].id
|
1967
|
1968
|
|
1968
|
|
- }
|
1969
|
1969
|
|
1970
|
|
- }
|
|
1970
|
+ this.diagnose = []
|
1971
|
1971
|
|
1972
|
|
- if (info.register_type == 0) {
|
1973
|
|
- for (let i = 0; i < this.register.length; i++) {
|
1974
|
|
- this.register_type = this.register[0].value
|
1975
|
|
- }
|
1976
|
|
- } else {
|
1977
|
|
- this.register_type = info.register_type
|
1978
|
|
- }
|
|
1972
|
+ if (info.id == 0) {
|
|
1973
|
+ if (last_info.diagnosis.length == 0) {
|
1979
|
1974
|
this.diagnose = []
|
|
1975
|
+ } else {
|
|
1976
|
+ console.log(last_info.diagnosis)
|
|
1977
|
+ for (let i = 0; i < last_info.diagnosis.split(",").length; i++) {
|
|
1978
|
+ this.diagnose.push(parseInt(last_info.diagnosis.split(',')[i]))
|
|
1979
|
+ }
|
|
1980
|
+ }
|
1980
|
1981
|
|
1981
|
|
- if (info.id == 0) {
|
1982
|
|
- if (last_info.diagnosis.length == 0) {
|
1983
|
|
- this.diagnose = []
|
1984
|
|
- } else {
|
1985
|
|
- for (let i = 0; i < last_info.diagnosis.split(",").length; i++) {
|
1986
|
|
- this.diagnose.push(parseInt(last_info.diagnosis.split(',')[i]))
|
1987
|
|
-
|
1988
|
|
- }
|
1989
|
|
- }
|
1990
|
|
-
|
1991
|
|
- if (last_info.sick_history == 0) {
|
1992
|
|
- this.state2 = ''
|
1993
|
|
- } else {
|
1994
|
|
- this.state2 = last_info.sick_history
|
1995
|
|
- }
|
1996
|
|
-
|
1997
|
|
- } else {
|
1998
|
|
- this.state2 = info.sick_history
|
1999
|
|
- if (this.state2 == 0) {
|
2000
|
|
- this.state2 = ''
|
2001
|
|
- }
|
2002
|
|
- if (info.diagnosis.length == 0) {
|
2003
|
|
- this.diagnose = []
|
2004
|
|
- } else {
|
2005
|
|
- for (let i = 0; i < info.diagnosis.split(",").length; i++) {
|
2006
|
|
- this.diagnose.push(parseInt(info.diagnosis.split(',')[i]))
|
2007
|
|
-
|
2008
|
|
- }
|
|
1982
|
+ if (last_info.sick_history == 0) {
|
|
1983
|
+ this.state2 = ''
|
|
1984
|
+ } else {
|
|
1985
|
+ this.state2 = last_info.sick_history
|
|
1986
|
+ }
|
2009
|
1987
|
|
2010
|
|
- }
|
|
1988
|
+ } else {
|
|
1989
|
+ this.state2 = info.sick_history
|
|
1990
|
+ if (this.state2 == 0) {
|
|
1991
|
+ this.state2 = ''
|
|
1992
|
+ }
|
|
1993
|
+ if (info.diagnosis.length == 0) {
|
|
1994
|
+ this.diagnose = []
|
|
1995
|
+ } else {
|
|
1996
|
+ for (let i = 0; i < info.diagnosis.split(",").length; i++) {
|
|
1997
|
+ this.diagnose.push(parseInt(info.diagnosis.split(',')[i]))
|
2011
|
1998
|
|
2012
|
1999
|
}
|
2013
|
2000
|
|
2014
|
|
- this.state1 = info.sick_type
|
2015
|
|
- if (this.state1 == 0 || this.state1 == '') {
|
2016
|
|
- this.state1 = ''
|
2017
|
|
- for (let i = 0; i < this.sick.length; i++) {
|
2018
|
|
- this.state1 = this.sick[0].id
|
2019
|
|
- }
|
2020
|
|
- }
|
|
2001
|
+ }
|
2021
|
2002
|
|
2022
|
|
- if (this.departmentValue == '' || this.departmentValue == 0) {
|
2023
|
|
- if (this.department.length > 0) {
|
2024
|
|
- this.departmentValue = this.department[0].id
|
|
2003
|
+ }
|
2025
|
2004
|
|
2026
|
|
- }
|
2027
|
|
- }
|
|
2005
|
+ this.state1 = info.sick_type
|
|
2006
|
+ if (this.state1 == 0 || this.state1 == '') {
|
|
2007
|
+ this.state1 = ''
|
|
2008
|
+ for (let i = 0; i < this.sick.length; i++) {
|
|
2009
|
+ this.state1 = this.sick[0].id
|
|
2010
|
+ }
|
|
2011
|
+ }
|
|
2012
|
+
|
|
2013
|
+ if (this.departmentValue == '' || this.departmentValue == 0) {
|
|
2014
|
+ if (department.length > 0) {
|
|
2015
|
+ this.departmentValue = department[0].id
|
2028
|
2016
|
|
2029
|
2017
|
}
|
2030
|
|
- })
|
|
2018
|
+ }
|
|
2019
|
+
|
2031
|
2020
|
|
2032
|
2021
|
},
|
2033
|
2022
|
setMonthData(info, admin_info, doctors, department, hisPatientInfo, month_data, last_info) {
|
|
@@ -3162,7 +3151,7 @@
|
3162
|
3151
|
}
|
3163
|
3152
|
}, mounted() {
|
3164
|
3153
|
this.request_record_date = this.record_date
|
3165
|
|
- this.getInitData()
|
|
3154
|
+ // this.getInitData()
|
3166
|
3155
|
//获取所有项目
|
3167
|
3156
|
this.getlist()
|
3168
|
3157
|
//获取所以项目组套
|