|
@ -44,17 +44,39 @@ Vue.component('gxb-mz', {
|
|
|
tableHeader: [],
|
|
|
constantHeader: [
|
|
|
{ label: '下转次数', prop: 'totalTimes', width: '90' },
|
|
|
{ label: '门诊下转次数', prop: 'mzTimes', width: '90' },
|
|
|
{ label: '门诊下转次数', prop: 'mzTimes', width: '110' },
|
|
|
{ label: '出院下转次数', prop: 'zyTimes', width: '110' },
|
|
|
{ label: '下转人数', prop: 'totalNum', width: '110' },
|
|
|
{ label: '门诊下转人数', prop: 'mzNum', width: '110' },
|
|
|
{ label: '出院下转人数', prop: 'zyNum', width: '110' },
|
|
|
{ label: '门诊下转已评估', prop: 'mzScreenNum', width: '110' },
|
|
|
{ label: '门诊下转未评估', prop: 'unMzScreenNum', width: '110' },
|
|
|
{ label: '出院下转已评估', prop: 'zyScreenNum', width: '110' },
|
|
|
{ label: '出院下转未评估', prop: 'unZyScreenNum', width: '110' }
|
|
|
{ label: '门诊下转已评估', prop: 'mzScreenNum', width: '120' },
|
|
|
{ label: '门诊下转未评估', prop: 'unMzScreenNum', width: '120' },
|
|
|
{ label: '出院下转已评估', prop: 'zyScreenNum', width: '120' },
|
|
|
{ label: '出院下转未评估', prop: 'unZyScreenNum', width: '120' }
|
|
|
],
|
|
|
level: 0
|
|
|
level: 0,
|
|
|
visible: false,
|
|
|
query: {},
|
|
|
dataRangeOption: [],
|
|
|
dialogTableData: [],
|
|
|
dialogHeader: [],
|
|
|
page: 1,
|
|
|
size: 10,
|
|
|
total: 0,
|
|
|
messageVisible: false,
|
|
|
messInfo: null,
|
|
|
remind: '',
|
|
|
dialogExportLoading: false,
|
|
|
statusOptions: [],
|
|
|
rehabilitationHospital: [],
|
|
|
archiveList: [],
|
|
|
inviteStatus: [
|
|
|
{ value: '', label: '全部' },
|
|
|
{ value: '1', label: '门诊患者' },
|
|
|
{ value: '2', label: '出院患者' }
|
|
|
],
|
|
|
communityHospitals: [],
|
|
|
title: ''
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@ -95,7 +117,9 @@ Vue.component('gxb-mz', {
|
|
|
this.getTeam(selectedRole.code)
|
|
|
}
|
|
|
this.initTime()
|
|
|
this.getList()
|
|
|
this.searchFn()
|
|
|
this.getDictData()
|
|
|
this.hospitalsByType()
|
|
|
},
|
|
|
initTime() {
|
|
|
var vm = this
|
|
@ -119,7 +143,22 @@ Vue.component('gxb-mz', {
|
|
|
delete this.form.team
|
|
|
}
|
|
|
},
|
|
|
getList() {
|
|
|
getDictData() {
|
|
|
var vm = this
|
|
|
statisticAPI.getDictByDictName({ name: 'rehabilitation_status' }).then(function (res) {
|
|
|
vm.statusOptions = [{ value: '全部', code: '' }]
|
|
|
vm.statusOptions = vm.statusOptions.concat(res.list)
|
|
|
})
|
|
|
statisticAPI.getDictByDictName({ name: 'rehabilitation_hospital' }).then(function (res) {
|
|
|
vm.rehabilitationHospital = [{ value: '全部', code: '' }]
|
|
|
vm.rehabilitationHospital = vm.rehabilitationHospital.concat(res.list)
|
|
|
})
|
|
|
statisticAPI.getDictByDictName({ name: 'archive_status' }).then(function (res) {
|
|
|
vm.archiveList = [{ value: '全部', code: '' }]
|
|
|
vm.archiveList = vm.archiveList.concat(res.list)
|
|
|
})
|
|
|
},
|
|
|
searchFn() {
|
|
|
var vm = this
|
|
|
this.loading = true
|
|
|
var params = {
|
|
@ -134,19 +173,32 @@ Vue.component('gxb-mz', {
|
|
|
params.endDate = this.chooseTime[1]
|
|
|
}
|
|
|
}
|
|
|
|
|
|
httpRequest.get('statistics/collaborate/gxbMzTurnDownInfo', { data: params }).then(function (res) {
|
|
|
if (this.form.range == 'town') {
|
|
|
this.tableHeader = getTownHeader().concat(this.constantHeader)
|
|
|
} else if (this.form.range == 'hospital') {
|
|
|
this.tableHeader = getHospitalHeader().concat(this.constantHeader)
|
|
|
} else {
|
|
|
this.tableHeader = getTeamHeader().concat(this.constantHeader)
|
|
|
}
|
|
|
httpRequest.get('statistics/collaborate/gxbTurnDownInfo', { data: params }).then(function (res) {
|
|
|
if (res.status == 200) {
|
|
|
vm.tableData = res.detailModelList
|
|
|
vm.total = res.totalCount
|
|
|
vm.tableData = res.detailModelList.map(function (item) {
|
|
|
var data = JSON.parse(JSON.stringify(item))
|
|
|
if (vm.form.range == 'town') {
|
|
|
data.town = item.name
|
|
|
data.hasChildren = true
|
|
|
} else if (vm.form.range == 'hospital') {
|
|
|
data.hospital = item.name
|
|
|
data.hasChildren = true
|
|
|
} else if (vm.form.range == 'team') {
|
|
|
data.team = item.name
|
|
|
}
|
|
|
return data
|
|
|
})
|
|
|
}
|
|
|
vm.loading = false
|
|
|
})
|
|
|
},
|
|
|
queryDate() {
|
|
|
this.page = 1
|
|
|
this.getList()
|
|
|
},
|
|
|
exportTable() {
|
|
|
var vm = this
|
|
|
var params = {
|
|
@ -163,7 +215,7 @@ Vue.component('gxb-mz', {
|
|
|
}
|
|
|
this.exportLoading = true
|
|
|
var fileName = `冠心病门诊下转统计表${new Date().getTime()}.xls`
|
|
|
httpRequest.downLoadFileForAjax('statistics/collaborate/exportGxbMzTurnDownInfo', fileName, params).then(function () {
|
|
|
httpRequest.downLoadFileForAjax('statistics/collaborate/exportGxbTurnDownInfo', fileName, params).then(function () {
|
|
|
vm.exportLoading = false
|
|
|
})
|
|
|
},
|
|
@ -206,37 +258,187 @@ Vue.component('gxb-mz', {
|
|
|
vm.teamOptions = res.data
|
|
|
})
|
|
|
},
|
|
|
renderHeader: function (h, item) {
|
|
|
var index = item.$index
|
|
|
var column = item.column
|
|
|
load(row, treeNode, resolve) {
|
|
|
var params = {}
|
|
|
var len = row.code.length
|
|
|
if (len == 6) {
|
|
|
params.range = 'hospital'
|
|
|
params.area = row.code
|
|
|
} else if (len == 10) {
|
|
|
params.range = 'team'
|
|
|
params.hospital = row.code
|
|
|
}
|
|
|
if (this.yearType == '1') {
|
|
|
params.startDate = this.chooseYear + '-01-01'
|
|
|
params.endDate = this.chooseYear + '-12-31'
|
|
|
} else {
|
|
|
if (this.chooseTime) {
|
|
|
params.startDate = this.chooseTime[0]
|
|
|
params.endDate = this.chooseTime[1]
|
|
|
}
|
|
|
}
|
|
|
httpRequest.get('statistics/collaborate/gxbTurnDownInfo', { data: params }).then(function (res) {
|
|
|
if (res.status == 200) {
|
|
|
var children = res.detailModelList.map(function (item) {
|
|
|
var data = JSON.parse(JSON.stringify(item))
|
|
|
if (len == 6) {
|
|
|
data.hospital = item.name
|
|
|
data.hasChildren = true
|
|
|
} else if (len == 10) {
|
|
|
data.team = item.name
|
|
|
}
|
|
|
return data
|
|
|
})
|
|
|
|
|
|
if (index == 6 || index == 7) {
|
|
|
return [
|
|
|
index == '6' ? '门诊下转已评估' : '门诊下转未评估',
|
|
|
h(
|
|
|
'el-tooltip',
|
|
|
{
|
|
|
props: {
|
|
|
content: (function () {
|
|
|
return index == '6'
|
|
|
? '统计查询时间内,门诊下转的患者中,在当年有进行ASCVD风险评估的患者人数'
|
|
|
: '统计查询时间内,门诊下转的患者中,在当年未进行ASCVD风险评估的患者人数'
|
|
|
})(),
|
|
|
placement: 'top'
|
|
|
}
|
|
|
},
|
|
|
[
|
|
|
h('span', {
|
|
|
class: {
|
|
|
'el-icon-question': true
|
|
|
}
|
|
|
resolve(children)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
dialogSearchFn() {
|
|
|
this.page = 1
|
|
|
this.gxbTurnUpInfoPage()
|
|
|
},
|
|
|
dialogExportFn() {
|
|
|
var vm = this
|
|
|
var params = {
|
|
|
...this.query
|
|
|
}
|
|
|
if (this.yearType == '1') {
|
|
|
params.startDate = this.chooseYear + '-01-01'
|
|
|
params.endDate = this.chooseYear + '-12-31'
|
|
|
} else {
|
|
|
if (this.chooseTime) {
|
|
|
params.startDate = this.chooseTime[0]
|
|
|
params.endDate = this.chooseTime[1]
|
|
|
}
|
|
|
}
|
|
|
this.dialogExportLoading = true
|
|
|
var fileName = `冠心病下转情况统计表${new Date().getTime()}.xls`
|
|
|
httpRequest.downLoadFileForAjax('statistics/collaborate/exportGxbTurnDownInfo', fileName, params).then(function () {
|
|
|
vm.dialogExportLoading = false
|
|
|
})
|
|
|
},
|
|
|
dialogReset() {
|
|
|
var params = {
|
|
|
...this.query
|
|
|
}
|
|
|
this.query = {
|
|
|
sex: '',
|
|
|
range: params.range,
|
|
|
area: params.area,
|
|
|
hospital: params.hospital,
|
|
|
team: params.team
|
|
|
}
|
|
|
},
|
|
|
handleCurrentChange(val) {
|
|
|
this.page = val
|
|
|
this.gxbTurnUpInfoPage()
|
|
|
},
|
|
|
handleSizeChange(val) {
|
|
|
this.size = val
|
|
|
this.gxbTurnUpInfoPage()
|
|
|
},
|
|
|
// 获取社区医院
|
|
|
hospitalsByType() {
|
|
|
var vm = this
|
|
|
// 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 }]
|
|
|
} else {
|
|
|
var type = 1
|
|
|
if (selectedRole.code.indexOf('350200') > -1) {
|
|
|
type = 1 // 市卫健委
|
|
|
} else if (selectedRole.code.length == 6) {
|
|
|
type = 2
|
|
|
}
|
|
|
statisticAPI
|
|
|
.hospitalsByType({
|
|
|
type: type,
|
|
|
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')
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
openDialog(row, prop) {
|
|
|
this.query = {}
|
|
|
if (['totalTimes', 'mzTimes', 'zyTimes'].includes(prop)) {
|
|
|
this.visible = true
|
|
|
this.title = '康复下转明细列表'
|
|
|
this.dialogHeader = [
|
|
|
{ label: '姓名', prop: 'name' },
|
|
|
{ label: '性别', prop: 'sex' },
|
|
|
{ label: '年龄', prop: 'age' },
|
|
|
{ label: '手机号', prop: 'mobile' },
|
|
|
{ label: '下转医院', prop: 'hospitalName' },
|
|
|
{ label: '下转医生', prop: 'hospitalDoctor' },
|
|
|
{ label: '下转时间', prop: 'createTime' },
|
|
|
{ label: '患者类型', prop: 'patientType' },
|
|
|
{ label: '下转状态', prop: 'statusName' },
|
|
|
{ label: '接收社区医院', prop: 'orgName' },
|
|
|
{ label: '接收签约医生', prop: 'doctorName' },
|
|
|
{ label: '接收时间', prop: 'receiveTime' },
|
|
|
{ label: '档案状态', prop: 'archiveStatusName' }
|
|
|
]
|
|
|
switch (prop) {
|
|
|
case 'mzTimes':
|
|
|
this.query.patientType = 1
|
|
|
break
|
|
|
case 'zyTimes':
|
|
|
this.query.patientType = 2
|
|
|
break
|
|
|
}
|
|
|
} else if (['totalNum', 'mzNum', 'zyNum'].includes(prop)) {
|
|
|
this.visible = true
|
|
|
this.title = '下转情况数据列表'
|
|
|
this.dialogHeader = [
|
|
|
{ label: '姓名', prop: 'name' },
|
|
|
{ label: '性别', prop: 'sex' },
|
|
|
{ label: '年龄', prop: 'age' },
|
|
|
{ label: '手机号', prop: 'mobile' },
|
|
|
{ label: '是否签约', prop: 'isSign' },
|
|
|
{ label: '社区医院', prop: 'hospitalName' },
|
|
|
{ label: '下转次数', prop: 'num' },
|
|
|
{ label: '最近一次下转诊断', prop: 'diagnosisName' },
|
|
|
{ label: '最近一次下转时间', prop: 'turnDownTime' },
|
|
|
{ label: '最近一次下转类型', prop: 'eventType' }
|
|
|
]
|
|
|
}
|
|
|
var len = row.code.length
|
|
|
if (len == 6) {
|
|
|
this.query.range = 'town'
|
|
|
this.query.area = row.code
|
|
|
} else if (len == 10) {
|
|
|
this.query.range = 'hospital'
|
|
|
this.query.hospital = row.code
|
|
|
} else {
|
|
|
return [column.label]
|
|
|
this.query.range = 'team'
|
|
|
this.query.team = row.code
|
|
|
}
|
|
|
this.dataRangeOption = [{ label: row.name, value: row.code }]
|
|
|
},
|
|
|
closeDialog() {
|
|
|
this.visible = false
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|