|
@ -40,58 +40,14 @@ Vue.component('gxb-manage-sum', {
|
|
|
},
|
|
|
loading: false,
|
|
|
exportLoading: false,
|
|
|
tableData: [
|
|
|
{
|
|
|
id: 1,
|
|
|
date: '2016-05-02',
|
|
|
name: '王小虎',
|
|
|
address: '上海市普陀区金沙江路 1518 弄'
|
|
|
},
|
|
|
{
|
|
|
id: 2,
|
|
|
date: '2016-05-04',
|
|
|
name: '王小虎',
|
|
|
address: '上海市普陀区金沙江路 1517 弄'
|
|
|
},
|
|
|
{
|
|
|
id: 3,
|
|
|
date: '2016-05-01',
|
|
|
name: '王小虎',
|
|
|
address: '上海市普陀区金沙江路 1519 弄',
|
|
|
children: [
|
|
|
{
|
|
|
id: 31,
|
|
|
date: '2016-05-01',
|
|
|
name: '王小虎',
|
|
|
address: '上海市普陀区金沙江路 1519 弄'
|
|
|
},
|
|
|
{
|
|
|
id: 32,
|
|
|
date: '2016-05-01',
|
|
|
name: '王小虎',
|
|
|
address: '上海市普陀区金沙江路 1519 弄'
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
id: 4,
|
|
|
date: '2016-05-03',
|
|
|
name: '王小虎',
|
|
|
address: '上海市普陀区金沙江路 1516 弄'
|
|
|
}
|
|
|
tableData: [],
|
|
|
tableHeader: [],
|
|
|
constantHeader: [
|
|
|
{ label: '筛评人数', prop: 'totalNum', width: '90' },
|
|
|
{ label: '上转人数', prop: 'turnUpNum', width: '90' },
|
|
|
{ label: '下转人数', prop: 'turnDownNum', width: '90' },
|
|
|
{ label: '康复管理人数', prop: 'rehabilitationNum', width: '90' }
|
|
|
],
|
|
|
tableHeader: [
|
|
|
{ label: '地区', prop: 'a', width: '90' },
|
|
|
{ label: '社区', prop: 'b', width: '90' },
|
|
|
{ label: '团队', prop: 'c', width: '100' },
|
|
|
{ label: '评估人数', prop: 'd', width: '90' },
|
|
|
{ label: '上转人数', prop: 'e', width: '90' },
|
|
|
{ label: '下转人数', prop: 'f', width: '90' },
|
|
|
{ label: '康复管理人数', prop: 'g', width: '90' }
|
|
|
],
|
|
|
page: 1,
|
|
|
size: 10,
|
|
|
total: 0,
|
|
|
level: 0
|
|
|
}
|
|
|
},
|
|
@ -132,7 +88,7 @@ Vue.component('gxb-manage-sum', {
|
|
|
this.getTeam(selectedRole.code)
|
|
|
}
|
|
|
this.initTime()
|
|
|
this.getList()
|
|
|
this.searchFn()
|
|
|
},
|
|
|
initTime() {
|
|
|
var vm = this
|
|
@ -156,14 +112,12 @@ Vue.component('gxb-manage-sum', {
|
|
|
delete this.form.team
|
|
|
}
|
|
|
},
|
|
|
getList() {
|
|
|
return
|
|
|
searchFn() {
|
|
|
var vm = this
|
|
|
this.loading = true
|
|
|
var params = {
|
|
|
...this.form,
|
|
|
page: this.page,
|
|
|
pageSize: this.size
|
|
|
isTotal: 1
|
|
|
}
|
|
|
if (this.yearType == '1') {
|
|
|
params.startDate = this.chooseYear + '-01-01'
|
|
@ -174,25 +128,37 @@ Vue.component('gxb-manage-sum', {
|
|
|
params.endDate = this.chooseTime[1]
|
|
|
}
|
|
|
}
|
|
|
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/gxbScreenClosedLoop', { data: params }).then(function (res) {
|
|
|
httpRequest.get('statistics/collaborate/gxbScreenInfoTotal', { 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 = item.code && true
|
|
|
} else if (vm.form.range == 'hospital') {
|
|
|
data.hospital = item.name
|
|
|
data.hasChildren = item.code && 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 = {
|
|
|
...this.form,
|
|
|
page: this.page,
|
|
|
pageSize: this.size
|
|
|
...this.form
|
|
|
}
|
|
|
if (this.yearType == '1') {
|
|
|
params.startDate = this.chooseYear + '-01-01'
|
|
@ -204,8 +170,8 @@ Vue.component('gxb-manage-sum', {
|
|
|
}
|
|
|
}
|
|
|
this.exportLoading = true
|
|
|
var fileName = `冠心病管理全流程闭环情况${new Date().getTime()}.xls`
|
|
|
httpRequest.downLoadFileForAjax('statistics/collaborate/exportGxbScreenClosedLoop', fileName, params).then(function () {
|
|
|
var fileName = `冠心病筛评管理情况汇总表${new Date().getTime()}.xls`
|
|
|
httpRequest.downLoadFileForAjax('statistics/collaborate/exportGxbScreenInfoTotal', fileName, params).then(function () {
|
|
|
vm.exportLoading = false
|
|
|
})
|
|
|
},
|
|
@ -241,13 +207,105 @@ Vue.component('gxb-manage-sum', {
|
|
|
vm.teamOptions = vm.teamOptions.concat(res.data)
|
|
|
})
|
|
|
},
|
|
|
handleCurrentChange(val) {
|
|
|
this.page = val
|
|
|
this.getList()
|
|
|
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/gxbScreenInfoTotal', { data: params }).then(function (res) {
|
|
|
if (res.status == 200) {
|
|
|
var children = res.detailModelList.map(function (item) {
|
|
|
var data = {
|
|
|
...item
|
|
|
}
|
|
|
|
|
|
if (len == 6) {
|
|
|
data.hospital = item.name
|
|
|
data.hasChildren = true
|
|
|
data.town1 = row.code
|
|
|
} else if (len == 10) {
|
|
|
data.team = item.name
|
|
|
data.hospital1 = row.code
|
|
|
data.town1 = row.town1
|
|
|
}
|
|
|
return data
|
|
|
})
|
|
|
|
|
|
resolve(children)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
handleSizeChange(val) {
|
|
|
this.size = val
|
|
|
this.getList()
|
|
|
toPage(row, prop) {
|
|
|
var len = row.code.length
|
|
|
var range, area, hospital, team
|
|
|
if (len == 6 && row.code.indexOf('3502') > -1) {
|
|
|
range = 'town'
|
|
|
area = row.code
|
|
|
} else if (len == 10) {
|
|
|
range = 'hospital'
|
|
|
area = row.town1
|
|
|
hospital = row.code
|
|
|
} else {
|
|
|
range = 'team'
|
|
|
area = row.town1
|
|
|
hospital = row.hospital1
|
|
|
team = row.code
|
|
|
}
|
|
|
if (prop == 'totalNum') {
|
|
|
EventBus.$emit('toPage', {
|
|
|
id: '77',
|
|
|
range: range,
|
|
|
area: area,
|
|
|
hospital: hospital,
|
|
|
team: team,
|
|
|
yearType: this.yearType,
|
|
|
time: this.yearType == '1' ? this.chooseYear : this.chooseTime
|
|
|
})
|
|
|
} else if (prop == 'turnUpNum') {
|
|
|
EventBus.$emit('toPage', {
|
|
|
id: '78',
|
|
|
range: range,
|
|
|
area: area,
|
|
|
hospital: hospital,
|
|
|
team: team,
|
|
|
yearType: this.yearType,
|
|
|
time: this.yearType == '1' ? this.chooseYear : this.chooseTime
|
|
|
})
|
|
|
} else if (prop == 'turnDownNum') {
|
|
|
EventBus.$emit('toPage', {
|
|
|
id: '79',
|
|
|
range: range,
|
|
|
area: area,
|
|
|
hospital: hospital,
|
|
|
team: team,
|
|
|
yearType: this.yearType,
|
|
|
time: this.yearType == '1' ? this.chooseYear : this.chooseTime
|
|
|
})
|
|
|
} else if (prop == 'rehabilitationNum') {
|
|
|
EventBus.$emit('toPage', {
|
|
|
id: '80',
|
|
|
range: range,
|
|
|
area: area,
|
|
|
hospital: hospital,
|
|
|
team: team,
|
|
|
yearType: this.yearType,
|
|
|
time: this.yearType == '1' ? this.chooseYear : this.chooseTime
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|