|
@ -16,29 +16,56 @@ Vue.component('mzf-hzcx', {
|
|
template: template,
|
|
template: template,
|
|
data: function() {
|
|
data: function() {
|
|
return {
|
|
return {
|
|
mzfHzcxData:[{name: '测试数据'}],
|
|
|
|
|
|
tableData:[],
|
|
|
|
testArr1: [],
|
|
|
|
testArr2: [],
|
|
|
|
testPosition1: 0,
|
|
|
|
testPosition2: 0,
|
|
list:[],
|
|
list:[],
|
|
startTime:new Date('2023','05','26'),
|
|
startTime:new Date('2023','05','26'),
|
|
endTime:new Date(),
|
|
endTime:new Date(),
|
|
regionList:[],
|
|
|
|
regionData:[
|
|
regionData:[
|
|
{label:'全市',id:'1',type:'1'}
|
|
|
|
|
|
{label:'全部',value:'8'},
|
|
|
|
{label:'未管理',value:'0'},
|
|
|
|
{label:'在管',value:'1'},
|
|
|
|
{label:'失访',value:'2'},
|
|
|
|
{label:'出组',value:'3'},
|
|
|
|
{label:'不纳入管理 ',value:'4'},
|
|
|
|
{label:'入组 ',value:'5'},
|
|
|
|
{label:'死亡 ',value:'6'},
|
|
|
|
{label:'已管理 ',value:'7'},
|
|
],
|
|
],
|
|
regionListList:[],
|
|
|
|
tertiaryHospitalsData:[
|
|
|
|
{label:'全部',id:'1',type:'2'}
|
|
|
|
|
|
region: '8', //管理状态
|
|
|
|
|
|
|
|
tertiaryHospitalsData:[],
|
|
|
|
tertiary: [], //地区
|
|
|
|
|
|
|
|
communityHospitalsData:[],
|
|
|
|
communityHospitals: [], // 三级医院
|
|
|
|
|
|
|
|
groupingData:[],
|
|
|
|
group: [], // 社区
|
|
|
|
|
|
|
|
queryLevel: 1, // :1.全部 2.区 3.等级医院 4.社区医院
|
|
|
|
patientName: '', // 患者姓名
|
|
|
|
|
|
|
|
stageType: '0,1,2,10,20',// 阶段
|
|
|
|
// 0:慢阻肺测试患者 1:第一阶段 2:第二阶段 10:测试账号 20:其他' 全部 0,1,2,10,20
|
|
|
|
stageData: [
|
|
|
|
{label:'全部',value:'0,1,2,10,20'},
|
|
|
|
{label:'慢阻肺测试患者',value:'0'},
|
|
|
|
{label:'第一阶段 ',value:'1'},
|
|
|
|
{label:'第二阶段 ',value:'2'},
|
|
|
|
{label:'测试账号',value:'10'},
|
|
|
|
{label:'其他',value:'20'},
|
|
],
|
|
],
|
|
communityHospitalsList:[],
|
|
|
|
communityHospitalsData:[
|
|
|
|
{label:'全部',id:'1',type:'3'}
|
|
|
|
],
|
|
|
|
groupingList:[],
|
|
|
|
groupingData:[
|
|
|
|
{label:'全部',id:'1',type:'4'}
|
|
|
|
],
|
|
|
|
administrationStatusList:[],
|
|
|
|
|
|
|
|
|
|
administration:[],
|
|
administrationStatusData:[
|
|
administrationStatusData:[
|
|
{label:'全部',id:'1',type:'5'}
|
|
|
|
|
|
{label:'全部',value:'0'},
|
|
|
|
{label:'康复组',value:'1'},
|
|
|
|
{label:'对照组',value:'2'}
|
|
|
|
|
|
],
|
|
],
|
|
show:false,
|
|
show:false,
|
|
showTwo:false,
|
|
showTwo:false,
|
|
@ -55,14 +82,17 @@ Vue.component('mzf-hzcx', {
|
|
s:'',
|
|
s:'',
|
|
e:'',
|
|
e:'',
|
|
dialogVisible: false,
|
|
dialogVisible: false,
|
|
num: ''
|
|
|
|
|
|
dataInfo: [],
|
|
|
|
dialogVisible1: false,
|
|
|
|
dataJl: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created: function(){
|
|
created: function(){
|
|
this.s = this.startTime.format('yyyy-MM-dd')
|
|
this.s = this.startTime.format('yyyy-MM-dd')
|
|
this.e = this.endTime.format('yyyy-MM-dd')
|
|
this.e = this.endTime.format('yyyy-MM-dd')
|
|
this.list.unshift({type:'0',id:'time',label:this.s +"~"+ this.e})
|
|
this.list.unshift({type:'0',id:'time',label:this.s +"~"+ this.e})
|
|
// this.hospitalWorkStatistics()
|
|
|
|
|
|
this.getCopdPatientInfoList(1, 1 , '350200')
|
|
|
|
this.cascadingFindHosptail(1, '')
|
|
},
|
|
},
|
|
watch:{
|
|
watch:{
|
|
'startTime':{
|
|
'startTime':{
|
|
@ -85,16 +115,102 @@ Vue.component('mzf-hzcx', {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
hospitalWorkStatistics:function() {
|
|
|
|
|
|
// 获取地区
|
|
|
|
cascadingFindHosptail: function(type, val, hos) {
|
|
|
|
var vm = this
|
|
|
|
var data = {
|
|
|
|
findType: type ? type: 1,
|
|
|
|
areaCode: val.length!=0 ? val.join(',') : '',
|
|
|
|
hosptialCode: hos ? hos.join(',') : ''
|
|
|
|
}
|
|
|
|
statisticAPI.cascadingFindHosptail({
|
|
|
|
jsonStr: JSON.stringify(data)
|
|
|
|
}).then(function(res){
|
|
|
|
if(res.status===200) {
|
|
|
|
console.log(res, 'dq');
|
|
|
|
if(type == 2) {
|
|
|
|
vm.communityHospitalsData = res.data
|
|
|
|
} else if(type == 3) {
|
|
|
|
vm.groupingData = res.data
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
vm.tertiaryHospitalsData = res.data
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
tertiaryChange: function(val) {
|
|
|
|
if(val.length == 0) {
|
|
|
|
this.communityHospitals = []
|
|
|
|
this.communityHospitalsData = []
|
|
|
|
this.group = []
|
|
|
|
this.groupingData = []
|
|
|
|
}else {
|
|
|
|
this.queryLevel = 2
|
|
|
|
this.cascadingFindHosptail(2, val)
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
comChange: function (val) {
|
|
|
|
var vm = this
|
|
|
|
if(val.length == 0) {
|
|
|
|
vm.groupingData = []
|
|
|
|
vm.group = []
|
|
|
|
}else {
|
|
|
|
vm.queryLevel = 3
|
|
|
|
vm.cascadingFindHosptail(3, vm.tertiary , val)
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
admChange: function() {
|
|
|
|
|
|
|
|
},
|
|
|
|
groChange: function() {
|
|
|
|
var vm = this
|
|
|
|
vm.queryLevel = 4
|
|
|
|
},
|
|
|
|
// 清除
|
|
|
|
clearGroup: function() {
|
|
|
|
if(this.group.length == 0) {
|
|
|
|
this.queryLevel = 3
|
|
|
|
}
|
|
|
|
},
|
|
|
|
clearCommunityHospitals:function(val) {
|
|
|
|
if(this.communityHospitals.length == 0) {
|
|
|
|
this.queryLevel = 2
|
|
|
|
this.groupingData = []
|
|
|
|
}
|
|
|
|
},
|
|
|
|
clearTertiary: function() {
|
|
|
|
if(this.tertiary.length == 0) {
|
|
|
|
this.queryLevel = 1
|
|
|
|
}
|
|
|
|
},
|
|
|
|
getCopdPatientInfoList:function (page, queryLevel, code) {
|
|
var vm = this
|
|
var vm = this
|
|
vm.loadingTwo = true
|
|
vm.loadingTwo = true
|
|
statisticAPI.hospitalWorkStatistics({
|
|
|
|
startDate:this.startTime.format('yyyy-MM-dd'),
|
|
|
|
endDate:this.endTime.format('yyyy-MM-dd')
|
|
|
|
|
|
var data = {
|
|
|
|
startTime:this.startTime.format('yyyy-MM-dd'),
|
|
|
|
endTime:this.endTime.format('yyyy-MM-dd'),
|
|
|
|
stageType: vm.stageType,
|
|
|
|
findType: 2,
|
|
|
|
copdState: vm.region,
|
|
|
|
page: page,
|
|
|
|
size: 10,
|
|
|
|
searchKey: vm.patientName,
|
|
|
|
queryLevel: queryLevel,
|
|
|
|
queryCode: code,
|
|
|
|
hosptialCode: '', // 医院code
|
|
|
|
pageIf: "true"
|
|
|
|
}
|
|
|
|
statisticAPI.getCopdPatientInfoList({
|
|
|
|
json:JSON.stringify(data)
|
|
}).then(function(res){
|
|
}).then(function(res){
|
|
if(res.status == 200) {
|
|
if(res.status == 200) {
|
|
|
|
console.log(res,'hxsj');
|
|
vm.loadingTwo = false
|
|
vm.loadingTwo = false
|
|
vm.mzfHzcxData = res.data
|
|
|
|
|
|
vm.tableData = res.data.list
|
|
|
|
vm.datatotal = res.data.count
|
|
}
|
|
}
|
|
}).catch(function(err){
|
|
}).catch(function(err){
|
|
vm.loadingTwo = false
|
|
vm.loadingTwo = false
|
|
@ -129,41 +245,133 @@ Vue.component('mzf-hzcx', {
|
|
handleCurrentChange:function(val) {
|
|
handleCurrentChange:function(val) {
|
|
var vm = this
|
|
var vm = this
|
|
vm.currentPage = val
|
|
vm.currentPage = val
|
|
|
|
if(this.queryLevel == 1) {
|
|
|
|
this.getCopdPatientInfoList(val, 1 , '350200')
|
|
|
|
} else if(this.queryLevel == 2) {
|
|
|
|
// 地区
|
|
|
|
var areaCode = this.tertiary.join(',')
|
|
|
|
this.getCopdPatientInfoList(val, this.queryLevel, areaCode)
|
|
|
|
}else if(this.queryLevel == 3) {
|
|
|
|
// 三级医院
|
|
|
|
var areaCode = this.communityHospitals.join(',')
|
|
|
|
this.getCopdPatientInfoList(val, this.queryLevel, areaCode)
|
|
|
|
}else if(this.queryLevel == 4) {
|
|
|
|
// 社区
|
|
|
|
var areaCode = this.group.join(',')
|
|
|
|
this.getCopdPatientInfoList(val, this.queryLevel, areaCode)
|
|
|
|
}
|
|
},
|
|
},
|
|
change:function(val) {
|
|
change:function(val) {
|
|
this.list = this.list.concat(val)
|
|
this.list = this.list.concat(val)
|
|
},
|
|
},
|
|
// 确定
|
|
// 确定
|
|
confirm:function() {
|
|
confirm:function() {
|
|
this.hospitalWorkStatistics()
|
|
|
|
|
|
// 全部 , 也是默认
|
|
|
|
if(this.queryLevel == 1) {
|
|
|
|
this.getCopdPatientInfoList(1, 1 , '350200')
|
|
|
|
} else if(this.queryLevel == 2) {
|
|
|
|
// 地区
|
|
|
|
var areaCode = this.tertiary.join(',')
|
|
|
|
this.getCopdPatientInfoList(1, this.queryLevel, areaCode)
|
|
|
|
}else if(this.queryLevel == 3) {
|
|
|
|
// 三级医院
|
|
|
|
var areaCode = this.communityHospitals.join(',')
|
|
|
|
this.getCopdPatientInfoList(1, this.queryLevel, areaCode)
|
|
|
|
}else if(this.queryLevel == 4) {
|
|
|
|
// 社区
|
|
|
|
var areaCode = this.group.join(',')
|
|
|
|
this.getCopdPatientInfoList(1, this.queryLevel, areaCode)
|
|
|
|
}
|
|
|
|
|
|
},
|
|
},
|
|
// 取消
|
|
// 取消
|
|
cancel:function() {
|
|
cancel:function() {
|
|
this.startTime = new Date('2023','05','26')
|
|
this.startTime = new Date('2023','05','26')
|
|
this.endTime = new Date()
|
|
this.endTime = new Date()
|
|
if(!this.list[0] || this.list[0].type!=0) {
|
|
|
|
this.list.unshift({type:'0',id:'time',label:this.startTime.format('yyyy-MM-dd') +"~"+ this.endTime.format('yyyy-MM-dd')})
|
|
|
|
}else{
|
|
|
|
this.list[0].label = this.startTime.format('yyyy-MM-dd') +"~"+ this.endTime.format('yyyy-MM-dd')
|
|
|
|
|
|
this.tertiary = []
|
|
|
|
this.communityHospitals = []
|
|
|
|
this.group = []
|
|
|
|
this.patientName = ''
|
|
|
|
this.region = '8'
|
|
|
|
this.stageType = '0,1,2,10,20'
|
|
|
|
this.queryLevel = 1
|
|
|
|
},
|
|
|
|
// 查看
|
|
|
|
showInfo: function(item) {
|
|
|
|
var vm = this
|
|
|
|
vm.dialogVisible = true
|
|
|
|
var data = {
|
|
|
|
patientCode: item.patientCode
|
|
|
|
}
|
|
|
|
statisticAPI.findCopdPatientFollowList({
|
|
|
|
jsonStr:JSON.stringify(data)
|
|
|
|
}).then(function(res){
|
|
|
|
if(res.status == 200) {
|
|
|
|
console.log(res, '记录');
|
|
|
|
vm.dataInfo = res.data
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
showJl: function(item) {
|
|
|
|
console.log(item,'item');
|
|
|
|
var vm = this
|
|
|
|
var data = {
|
|
|
|
followupId: item.followupId,
|
|
|
|
visitCount: item.visit_count
|
|
}
|
|
}
|
|
|
|
var jsonStr = JSON.stringify(data)
|
|
|
|
statisticAPI.exportConclusionList({
|
|
|
|
// jsonStr: encodeURIComponent(jsonStr)
|
|
|
|
followupId: item.followupId,
|
|
|
|
visitCount: item.visit_count
|
|
|
|
},'随访计划.pdf').then(function(res){
|
|
|
|
vm.loadingTwo = false
|
|
|
|
})
|
|
},
|
|
},
|
|
// 导出
|
|
// 导出
|
|
exportHandle:function() {
|
|
exportHandle:function() {
|
|
|
|
// 全部 , 也是默认
|
|
|
|
if(this.queryLevel == 1) {
|
|
|
|
this.exportCopdPatientInfoList(1, 1 , '350200')
|
|
|
|
} else if(this.queryLevel == 2) {
|
|
|
|
// 地区
|
|
|
|
var areaCode = this.tertiary.join(',')
|
|
|
|
this.exportCopdPatientInfoList(1, this.queryLevel, areaCode)
|
|
|
|
}else if(this.queryLevel == 3) {
|
|
|
|
// 三级医院
|
|
|
|
var areaCode = this.communityHospitals.join(',')
|
|
|
|
this.exportCopdPatientInfoList(1, this.queryLevel, areaCode)
|
|
|
|
}else if(this.queryLevel == 4) {
|
|
|
|
// 社区
|
|
|
|
var areaCode = this.group.join(',')
|
|
|
|
this.exportCopdPatientInfoList(1, this.queryLevel, areaCode)
|
|
|
|
}
|
|
|
|
},
|
|
|
|
exportCopdPatientInfoList: function(page, queryLevel, code) {
|
|
var vm = this
|
|
var vm = this
|
|
vm.loadingTwo = true
|
|
vm.loadingTwo = true
|
|
statisticAPI.exportHospitalWorkStatistics({
|
|
|
|
startDate:this.startTime.format('yyyy-MM-dd'),
|
|
|
|
endDate:this.endTime.format('yyyy-MM-dd')
|
|
|
|
},'慢阻肺医院工作量表.xls').then(function(res){
|
|
|
|
|
|
var data = {
|
|
|
|
startTime:this.startTime.format('yyyy-MM-dd'),
|
|
|
|
endTime:this.endTime.format('yyyy-MM-dd'),
|
|
|
|
stageType: vm.stageType,
|
|
|
|
findType: 2,
|
|
|
|
copdState: vm.region,
|
|
|
|
page: page,
|
|
|
|
size: 10,
|
|
|
|
searchKey: vm.patientName,
|
|
|
|
queryLevel: queryLevel,
|
|
|
|
queryCode: code,
|
|
|
|
hosptialCode: '', // 医院code
|
|
|
|
pageIf: ""
|
|
|
|
}
|
|
|
|
var jsonStr = JSON.stringify(data)
|
|
|
|
statisticAPI.exportCopdPatientInfoList({
|
|
|
|
json: encodeURIComponent(jsonStr)
|
|
|
|
},'慢阻肺患者查询.xls').then(function(res){
|
|
vm.loadingTwo = false
|
|
vm.loadingTwo = false
|
|
})
|
|
})
|
|
},
|
|
|
|
// 计划/记录
|
|
|
|
showSfjh: function(num,id) {
|
|
|
|
var vm = this
|
|
|
|
vm.num = num
|
|
|
|
this.dialogVisible = true
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
})
|
|
})
|