|
@ -54,12 +54,29 @@ Vue.component('copd-serve-num', {
|
|
|
communityCode: null,
|
|
|
teamList: [{ code: '', name: '全部' }],
|
|
|
teamCode: '',
|
|
|
form: {
|
|
|
range: 'town'
|
|
|
},
|
|
|
userRoleCode: '',
|
|
|
docInfo: JSON.parse(window.localStorage.getItem('docInfo')),
|
|
|
isShowBtn: 0,
|
|
|
isGuGan: false,
|
|
|
areaList: [],
|
|
|
rangeOptions: [
|
|
|
{ label: '区', value: 'town' },
|
|
|
{ label: '社区', value: 'hospital' }
|
|
|
],
|
|
|
areaOptions: [
|
|
|
{ label: '厦门市', value: '' },
|
|
|
{ label: '思明区', value: '350203' },
|
|
|
{ label: '海沧区', value: '350205' },
|
|
|
{ label: '湖里区', value: '350206' },
|
|
|
{ label: '集美区', value: '350211' },
|
|
|
{ label: '同安区', value: '350212' },
|
|
|
{ label: '翔安区', value: '350213' }
|
|
|
],
|
|
|
tabledata: [],
|
|
|
hospitalOptions: [],
|
|
|
tableHeader: [
|
|
|
{ label: '地区', prop: 'name', width: '90' },
|
|
|
{ label: '总患者人数', prop: 'patientNum', width: '90' },
|
|
@ -144,35 +161,60 @@ Vue.component('copd-serve-num', {
|
|
|
// vm.years.push(i)
|
|
|
// }
|
|
|
},
|
|
|
resetArea() {
|
|
|
if (this.level == 1) {
|
|
|
delete this.form.area
|
|
|
delete this.form.hospital
|
|
|
delete this.form.team
|
|
|
} else if (this.level == 2) {
|
|
|
delete this.form.hospital
|
|
|
delete this.form.team
|
|
|
} else {
|
|
|
delete this.form.team
|
|
|
}
|
|
|
},
|
|
|
// 数据范围初始化
|
|
|
initScope(type) {
|
|
|
var vm = this
|
|
|
|
|
|
//获得缓存中缓存的角色权限
|
|
|
var userRole = window.sessionStorage.getItem('selectedRole')
|
|
|
if (!userRole) {
|
|
|
return false
|
|
|
}
|
|
|
vm.userRole = JSON.parse(userRole)
|
|
|
vm.areaTitle = vm.userRole.name
|
|
|
if (vm.isGuGan) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
if (type == 3) {
|
|
|
this.areaCode = null
|
|
|
this.communityCode = null
|
|
|
if (vm.userRole.code == '350200' || vm.userRole.code == 'jk_350200') {
|
|
|
vm.isShowBtn = 1
|
|
|
vm.getDistrict(type, 350200, '厦门市')
|
|
|
} else if (vm.userRole.code.indexOf('jk_') > -1) {
|
|
|
vm.getDistrict(type, vm.userRole.code.substring(3), vm.areaTitle.substring(0, 3))
|
|
|
} else if (vm.userRole.code.length == 6) {
|
|
|
vm.getDistrict(type, vm.userRole.code, vm.areaTitle.substring(0, 3))
|
|
|
var selectedRole = JSON.parse(sessionStorage.getItem('selectedRole'))
|
|
|
if (selectedRole.code.indexOf('350200') > -1) {
|
|
|
this.level = 1 // 市卫健委
|
|
|
this.areaOptions = [
|
|
|
{ label: '厦门市', value: '' },
|
|
|
{ label: '思明区', value: '350203' },
|
|
|
{ label: '海沧区', value: '350205' },
|
|
|
{ label: '湖里区', value: '350206' },
|
|
|
{ label: '集美区', value: '350211' },
|
|
|
{ label: '同安区', value: '350212' },
|
|
|
{ label: '翔安区', value: '350213' }
|
|
|
]
|
|
|
this.rangeOptions = [
|
|
|
{ label: '区', value: 'town' },
|
|
|
{ label: '社区', value: 'hospital' }
|
|
|
]
|
|
|
this.form = {
|
|
|
range: 'town',
|
|
|
area: ''
|
|
|
}
|
|
|
} else if (selectedRole.code.length == 6) {
|
|
|
this.level = 2 // 区管理
|
|
|
this.areaOptions = [{ label: selectedRole.name.substring(0, 3), value: selectedRole.code }]
|
|
|
this.form = {
|
|
|
range: 'town',
|
|
|
area: selectedRole.code
|
|
|
}
|
|
|
this.getHospital(selectedRole.code)
|
|
|
} else {
|
|
|
this.communityCode = null
|
|
|
if (this.rangeCode == 'hospital') vm.getDistrict(type, vm.areaCode)
|
|
|
this.level = 3 // 社区管理
|
|
|
this.rangeOptions = [{ label: '社区', value: 'hospital' }]
|
|
|
this.areaOptions = [{ label: selectedRole.name.substring(0, 3), value: selectedRole.code.substring(0, 6) }]
|
|
|
this.hospitalOptions = [{ name: selectedRole.name, code: selectedRole.code }]
|
|
|
this.form = {
|
|
|
range: 'hospital',
|
|
|
area: selectedRole.code.substring(0, 6),
|
|
|
hospital: selectedRole.code
|
|
|
}
|
|
|
this.getTeam(selectedRole.code)
|
|
|
}
|
|
|
return
|
|
|
//获得缓存中缓存的角色权限
|
|
@ -248,11 +290,11 @@ Vue.component('copd-serve-num', {
|
|
|
vm.daLoading = true
|
|
|
var params = {
|
|
|
year: this.chooseYear,
|
|
|
range: this.rangeCode,
|
|
|
area: this.areaCode == '350200' ? '' : this.areaCode === null ? '' : this.areaCode
|
|
|
range: this.form.range,
|
|
|
area: this.form.area == '350200' ? '' : this.form.area === null ? '' : this.form.area
|
|
|
}
|
|
|
if (this.rangeCode == 'hospital') {
|
|
|
params.hospital = this.communityCode
|
|
|
if (this.form.range == 'hospital') {
|
|
|
params.hospital = this.form.hospital
|
|
|
}
|
|
|
statisticAPI.exportServiceProgress(params, '服务人数配置及进度查询.xls').then(function (res) {
|
|
|
vm.daLoading = false
|
|
@ -262,6 +304,25 @@ Vue.component('copd-serve-num', {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
getHospital(code) {
|
|
|
var vm = this
|
|
|
homeAPI.getCommunityHospital({ area: vm.form.area == '350200' ? '' : vm.form.area }).then(function (res) {
|
|
|
vm.hospitalOptions = [{ code: '', name: '全部' }]
|
|
|
vm.hospitalOptions = vm.hospitalOptions.concat(res.data)
|
|
|
})
|
|
|
},
|
|
|
getTeam(code) {
|
|
|
var vm = this
|
|
|
delete this.form.team
|
|
|
var params = {
|
|
|
hospital: code,
|
|
|
area: this.form.area
|
|
|
}
|
|
|
httpRequest.get('statisticsExport/teamList', { data: params }).then(function (res) {
|
|
|
vm.teamOptions = [{ id: '', name: '全部' }]
|
|
|
vm.teamOptions = vm.teamOptions.concat(res.data)
|
|
|
})
|
|
|
},
|
|
|
resetDate() {
|
|
|
if (this.isGuGan) {
|
|
|
this.rangeCode = 'hospital'
|
|
@ -272,24 +333,31 @@ Vue.component('copd-serve-num', {
|
|
|
this.areaCode = ''
|
|
|
this.communityCode = ''
|
|
|
}
|
|
|
this.startTime = ''
|
|
|
this.endTime = ''
|
|
|
this.quotaStr = ''
|
|
|
this.range = ''
|
|
|
this.area = ''
|
|
|
this.hospital = ''
|
|
|
this.sex = ''
|
|
|
this.firstVisitType = ''
|
|
|
this.firstVisitArea = ''
|
|
|
this.firstVisitOrgLevel = ''
|
|
|
this.hasLung = ''
|
|
|
this.hasCt = ''
|
|
|
this.hasx = ''
|
|
|
this.hasBloodGas = ''
|
|
|
this.hasSmoke = ''
|
|
|
this.hasDrink = ''
|
|
|
this.diseaseConversion = ''
|
|
|
this.age = ''
|
|
|
},
|
|
|
eliminateClick() {
|
|
|
var selectedRole = JSON.parse(sessionStorage.getItem('selectedRole'))
|
|
|
if (this.level == 1) {
|
|
|
this.form = {
|
|
|
range: 'town'
|
|
|
}
|
|
|
} else if (this.level == 2) {
|
|
|
this.form = {
|
|
|
range: 'town',
|
|
|
area: selectedRole.code
|
|
|
}
|
|
|
this.getHospital(selectedRole.code)
|
|
|
} else {
|
|
|
this.form = {
|
|
|
range: 'hospital',
|
|
|
area: selectedRole.code.substring(0, 6),
|
|
|
hospital: selectedRole.code
|
|
|
}
|
|
|
this.getTeam(selectedRole.code)
|
|
|
}
|
|
|
this.yearType = '1'
|
|
|
this.chooseYear = new Date().getFullYear()
|
|
|
this.chooseTime = null
|
|
|
this.$forceUpdate()
|
|
|
},
|
|
|
handleCurrentChange(val) {
|
|
|
this.page = val
|
|
@ -322,11 +390,11 @@ Vue.component('copd-serve-num', {
|
|
|
vm.daLoading = true
|
|
|
var params = {
|
|
|
year: this.chooseYear,
|
|
|
range: this.rangeCode,
|
|
|
area: this.areaCode == '350200' ? '' : this.areaCode === null ? '' : this.areaCode
|
|
|
range: this.form.range,
|
|
|
area: this.form.area == '350200' ? '' : this.form.area === null ? '' : this.form.area
|
|
|
}
|
|
|
if (this.rangeCode == 'hospital') {
|
|
|
params.hospital = this.communityCode
|
|
|
if (this.form.range == 'hospital') {
|
|
|
params.hospital = this.form.hospital
|
|
|
}
|
|
|
statisticAPI.getServiceProgress(params).then(function (res) {
|
|
|
vm.daLoading = false
|