|
@ -181,7 +181,7 @@ Vue.component('copd-patient-record', {
|
|
|
watch: {
|
|
|
rangeCode(nv) {
|
|
|
if (nv == 'hospital') {
|
|
|
this.initScope(5)
|
|
|
// this.initScope(5)
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@ -229,6 +229,13 @@ Vue.component('copd-patient-record', {
|
|
|
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))
|
|
|
} else if (vm.userRole.code.length == 10) {
|
|
|
this.rangeList = [{ name: '按社区', code: 'hospital' }]
|
|
|
this.rangeCode = 'hospital'
|
|
|
this.areaList = [{ name: this.userRole.name.substring(0, 3), code: this.userRole.code.substring(0, 6) }]
|
|
|
this.areaCode = this.userRole.code.substring(0, 6)
|
|
|
this.communityList = [{ name: this.userRole.name, code: this.userRole.code }]
|
|
|
this.communityCode = this.userRole.code
|
|
|
}
|
|
|
} else {
|
|
|
this.communityCode = null
|
|
@ -576,20 +583,20 @@ Vue.component('copd-patient-record', {
|
|
|
endTime: this.chooseYear == '全部' ? '' : this.chooseYear + '-12-31',
|
|
|
isSign: this.isSign
|
|
|
}
|
|
|
if(this.liveAddress.length >0){
|
|
|
if(this.liveAddress[0]=='other'){
|
|
|
if (this.liveAddress.length > 0) {
|
|
|
if (this.liveAddress[0] == 'other') {
|
|
|
params.liveProvince = 'other'
|
|
|
}else{
|
|
|
} else {
|
|
|
params.liveProvince = this.liveAddress[0]
|
|
|
params.liveCity = this.liveAddress[1]
|
|
|
params.liveTown = this.liveAddress[2]
|
|
|
params.liveStreet = this.liveAddress[3]
|
|
|
}
|
|
|
}
|
|
|
if(this.registAddress.length > 0){
|
|
|
if(this.registAddress[0]=='other'){
|
|
|
if (this.registAddress.length > 0) {
|
|
|
if (this.registAddress[0] == 'other') {
|
|
|
params.registProvince = 'other'
|
|
|
}else{
|
|
|
} else {
|
|
|
params.registProvince = this.registAddress[0]
|
|
|
params.registCity = this.registAddress[1]
|
|
|
params.registTown = this.registAddress[2]
|
|
@ -813,7 +820,7 @@ Vue.component('copd-patient-record', {
|
|
|
return true
|
|
|
}
|
|
|
},
|
|
|
handleItemChange(val, type){
|
|
|
handleItemChange(val, type) {
|
|
|
// 获取地址
|
|
|
if (val.length == 1) {
|
|
|
// 获取市
|
|
@ -872,15 +879,14 @@ Vue.component('copd-patient-record', {
|
|
|
if (res.status == 200) {
|
|
|
var detailModelList = res.list
|
|
|
|
|
|
for(let item of detailModelList){
|
|
|
if(id == 3){
|
|
|
for (let item of detailModelList) {
|
|
|
if (id == 3) {
|
|
|
item.children = null
|
|
|
}else{
|
|
|
} else {
|
|
|
item.children = []
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
if (arr[provinceIndex].children[activeIndex]) {
|
|
|
arr[provinceIndex].children[activeIndex].children = detailModelList
|
|
|
}
|
|
@ -917,9 +923,9 @@ Vue.component('copd-patient-record', {
|
|
|
if (res.status == 200) {
|
|
|
var detailModelList = res.list
|
|
|
if (arr[provinceIndex].children[activeIndex].children[xIndex]) {
|
|
|
if(detailModelList.length >0){
|
|
|
if (detailModelList.length > 0) {
|
|
|
arr[provinceIndex].children[activeIndex].children[xIndex].children = detailModelList
|
|
|
}else{
|
|
|
} else {
|
|
|
arr[provinceIndex].children[activeIndex].children[xIndex].children = null
|
|
|
}
|
|
|
}
|
|
@ -929,11 +935,11 @@ Vue.component('copd-patient-record', {
|
|
|
initDistrict() {
|
|
|
var vm = this
|
|
|
homeAPI.getDistrict({ type: 1, code: '' }).then(function (res) {
|
|
|
var detailModelList = res.list.concat({code:'other',name:'不详'})
|
|
|
var detailModelList = res.list.concat({ code: 'other', name: '不详' })
|
|
|
detailModelList.forEach(function (item) {
|
|
|
if(item.code == 'other'){
|
|
|
if (item.code == 'other') {
|
|
|
item.children = null
|
|
|
}else{
|
|
|
} else {
|
|
|
item.children = []
|
|
|
}
|
|
|
})
|
|
@ -941,5 +947,38 @@ Vue.component('copd-patient-record', {
|
|
|
vm.addressOptions2 = JSON.parse(JSON.stringify(detailModelList))
|
|
|
})
|
|
|
},
|
|
|
selChange: function (type) {
|
|
|
var vm = this,
|
|
|
name = ''
|
|
|
if (type == 3) {
|
|
|
vm.initSelOption('community')
|
|
|
vm.initSelOption('team')
|
|
|
vm.getCommunityHospital()
|
|
|
} else if (type == 5) {
|
|
|
vm.initSelOption('team')
|
|
|
// vm.teamListByArea();
|
|
|
}
|
|
|
},
|
|
|
initSelOption: function (param) {
|
|
|
var vm = this
|
|
|
vm[param + 'List'] = [{ code: '', name: '全部' }]
|
|
|
if (param == 'team') {
|
|
|
vm[param + 'List'] = [{ id: '', name: '全部' }]
|
|
|
}
|
|
|
vm[param + 'Code'] = vm[param + 'List'][0].code || vm[param + 'List'][0].id
|
|
|
},
|
|
|
getCommunityHospital: function () {
|
|
|
var vm = this,
|
|
|
list = [{ code: '', name: '全部' }],
|
|
|
param = 'community'
|
|
|
homeAPI.getCommunityHospital({ area: vm.areaCode == '350200' ? '' : vm.areaCode }).then(function (res) {
|
|
|
if (res.status == 200) {
|
|
|
vm[param + 'List'] = list.concat(res.data)
|
|
|
vm[param + 'Code'] = vm[param + 'List'][0].code
|
|
|
} else {
|
|
|
vm.$message.error(res.msg)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
})
|