|
@ -122,6 +122,12 @@ Vue.component('turndown-detail', {
|
|
archiveStatus: '',
|
|
archiveStatus: '',
|
|
patientType: ''
|
|
patientType: ''
|
|
}
|
|
}
|
|
|
|
var selectedRole = JSON.parse(sessionStorage.getItem('selectedRole'))
|
|
|
|
|
|
|
|
// 如果是社区管理员
|
|
|
|
if(selectedRole.code.length > 6){
|
|
|
|
this.form.orgCode = selectedRole.code
|
|
|
|
}
|
|
this.initTime()
|
|
this.initTime()
|
|
},
|
|
},
|
|
getDictData() {
|
|
getDictData() {
|
|
@ -142,25 +148,39 @@ Vue.component('turndown-detail', {
|
|
// 获取社区医院
|
|
// 获取社区医院
|
|
hospitalsByType: function () {
|
|
hospitalsByType: function () {
|
|
var vm = this
|
|
var vm = this
|
|
statisticAPI
|
|
|
|
.hospitalsByType({
|
|
|
|
type: 1,
|
|
|
|
code: '350200'
|
|
|
|
})
|
|
|
|
.then(function (res) {
|
|
|
|
if (res.status == 200) {
|
|
|
|
vm.communityHospitals = [{ label: '全部', value: '' }]
|
|
|
|
res.list.forEach(function (v) {
|
|
|
|
vm.communityHospitals.push({
|
|
|
|
value: v.code,
|
|
|
|
label: v.name
|
|
|
|
|
|
// var code
|
|
|
|
var selectedRole = JSON.parse(sessionStorage.getItem('selectedRole'))
|
|
|
|
// if (selectedRole.code.indexOf('350200') > -1) {
|
|
|
|
// code = '350200' // 市卫健委
|
|
|
|
// } else if (selectedRole.code.length == 6) {
|
|
|
|
// code = selectedRole.code
|
|
|
|
// } else {
|
|
|
|
// this.level = 3 // 社区管理
|
|
|
|
// }
|
|
|
|
if (selectedRole.code.length > 6) {
|
|
|
|
this.communityHospitals = [{ label: selectedRole.name, value: selectedRole.code }]
|
|
|
|
this.form.orgCode = selectedRole.code
|
|
|
|
} else {
|
|
|
|
statisticAPI
|
|
|
|
.hospitalsByType({
|
|
|
|
type: 1,
|
|
|
|
code: selectedRole.code
|
|
|
|
})
|
|
|
|
.then(function (res) {
|
|
|
|
if (res.status == 200) {
|
|
|
|
vm.communityHospitals = [{ label: '全部', value: '' }]
|
|
|
|
res.list.forEach(function (v) {
|
|
|
|
vm.communityHospitals.push({
|
|
|
|
value: v.code,
|
|
|
|
label: v.name
|
|
|
|
})
|
|
})
|
|
})
|
|
})
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.catch(function (err) {
|
|
|
|
console.log(err, 'Errr')
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.catch(function (err) {
|
|
|
|
console.log(err, 'Errr')
|
|
|
|
})
|
|
|
|
}
|
|
},
|
|
},
|
|
handleCurrentChange(val) {
|
|
handleCurrentChange(val) {
|
|
this.page = val
|
|
this.page = val
|
|
@ -203,14 +223,14 @@ Vue.component('turndown-detail', {
|
|
this.dialogVisible = true
|
|
this.dialogVisible = true
|
|
}
|
|
}
|
|
},
|
|
},
|
|
transformData(data, prop){
|
|
|
|
if(prop == 'sex'){
|
|
|
|
if(data == 0){
|
|
|
|
|
|
transformData(data, prop) {
|
|
|
|
if (prop == 'sex') {
|
|
|
|
if (data == 0) {
|
|
return '男'
|
|
return '男'
|
|
}else{
|
|
|
|
|
|
} else {
|
|
return '女'
|
|
return '女'
|
|
}
|
|
}
|
|
}else{
|
|
|
|
|
|
} else {
|
|
return data
|
|
return data
|
|
}
|
|
}
|
|
}
|
|
}
|