|
@ -1,4 +1,3 @@
|
|
|
|
|
|
// 慢阻肺患者档案表格组件
|
|
|
var template = ''
|
|
|
$.ajax('../../../component/statistics/CopdPatientRecord/index.html', {
|
|
@ -19,79 +18,80 @@ Vue.component('copd-patient-record', {
|
|
|
data() {
|
|
|
return {
|
|
|
docInfo: JSON.parse(window.localStorage.getItem('docInfo')),
|
|
|
daLoading:false,
|
|
|
dataList: [
|
|
|
],
|
|
|
daLoading: false,
|
|
|
dataList: [],
|
|
|
// 当前编辑的数据,点击编辑按钮后设置,取消或退出则清空
|
|
|
currentEditData: null,
|
|
|
// 编辑页面是否显示
|
|
|
editViewVisable: false,
|
|
|
userRoleCode:'',
|
|
|
userRoleCode: '',
|
|
|
//服务记录是否显示
|
|
|
serviceRecordVisable: false,
|
|
|
transferStatusOptions:[{code:'',value:'全部'}],
|
|
|
recordStatusOptions:[{code:'',value:'全部'}],
|
|
|
followStatusArr:[{code:'',value:'全部'}],
|
|
|
receivingHospitalList:[{code:'',name:'全部'}],
|
|
|
receiveStatusOptions:[{value:'',label:'全部'},{value:'1',label:' 已接收'},{value:'0',label:' 未接收'}],
|
|
|
survivalStatusOption:[{code:'',value:'全部'}],
|
|
|
transferStatusOptions: [{ code: '', value: '全部' }],
|
|
|
recordStatusOptions: [{ code: '', value: '全部' }],
|
|
|
followStatusArr: [{ code: '', value: '全部' }],
|
|
|
receivingHospitalList: [{ code: '', name: '全部' }],
|
|
|
receiveStatusOptions: [
|
|
|
{ value: '', label: '全部' },
|
|
|
{ value: '1', label: ' 已接收' },
|
|
|
{ value: '0', label: ' 未接收' }
|
|
|
],
|
|
|
survivalStatusOption: [{ code: '', value: '全部' }],
|
|
|
// 健康档案是否显示
|
|
|
healthRecordVisable: false,
|
|
|
page: 1,
|
|
|
size: 50,
|
|
|
currentSize:50,
|
|
|
currentPage: 1,
|
|
|
rangeList:[{name: '按区', code: 'town'}],
|
|
|
rangeCode:'town',
|
|
|
size: 20,
|
|
|
rangeList: [{ name: '按区', code: 'town' }],
|
|
|
rangeCode: 'town',
|
|
|
totalPage: 0,
|
|
|
totalCount: 0,
|
|
|
name:'',
|
|
|
years:'',
|
|
|
turnDownStatus:'',
|
|
|
receiveStatus:'',
|
|
|
archivesStatus:'',
|
|
|
hospital:'',
|
|
|
doctorName:'',
|
|
|
name: '',
|
|
|
years: '',
|
|
|
turnDownStatus: '',
|
|
|
receiveStatus: '',
|
|
|
archivesStatus: '',
|
|
|
hospital: '',
|
|
|
doctorName: '',
|
|
|
isLive: '',
|
|
|
patientCode:'',
|
|
|
patientCode: '',
|
|
|
firstOrg: '',
|
|
|
currentSelect:[],
|
|
|
followupStatus:[],
|
|
|
dicName:['jkcopd_archivesStatus','jkcopd_turnDownStatus','jkcopd_isLive','jkcopd_followup_status'],
|
|
|
currentSelect: [],
|
|
|
followupStatus: [],
|
|
|
dicName: ['jkcopd_archivesStatus', 'jkcopd_turnDownStatus', 'jkcopd_isLive', 'jkcopd_followup_status'],
|
|
|
isShow: false,
|
|
|
startTime:'',
|
|
|
endTime:'',
|
|
|
startTime: '',
|
|
|
endTime: '',
|
|
|
chooseYear: '',
|
|
|
nowyear:'',
|
|
|
areaList:[],
|
|
|
areaCode:"",
|
|
|
communityCode:'',
|
|
|
fileList: [],
|
|
|
file: undefined,
|
|
|
isProgressShow: false,
|
|
|
percentage: 0,
|
|
|
success: false,
|
|
|
loading: false,
|
|
|
isOver: false,
|
|
|
status: "",
|
|
|
errList: [],
|
|
|
pickerOptions: {
|
|
|
disabledDate(time) {
|
|
|
let timeSpace = time.getTime() <= moment.toDate().getTime();
|
|
|
return timeSpace;
|
|
|
}
|
|
|
},
|
|
|
|
|
|
nowyear: '',
|
|
|
areaList: [],
|
|
|
areaCode: '',
|
|
|
communityCode: '',
|
|
|
fileList: [],
|
|
|
file: undefined,
|
|
|
isProgressShow: false,
|
|
|
percentage: 0,
|
|
|
success: false,
|
|
|
loading: false,
|
|
|
isOver: false,
|
|
|
status: '',
|
|
|
errList: [],
|
|
|
pickerOptions: {
|
|
|
disabledDate(time) {
|
|
|
let timeSpace = time.getTime() <= moment.toDate().getTime()
|
|
|
return timeSpace
|
|
|
}
|
|
|
},
|
|
|
communityList: [],
|
|
|
allocationForm: {},
|
|
|
doctorList: [],
|
|
|
allocationDialog: false,
|
|
|
isGuGan: false, // 判断是否是骨干,若是显示分配,若不是显示批量分配
|
|
|
exportStandardLoading: false
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
showTotalTable() {
|
|
|
return (
|
|
|
this.currentEditData == null &&
|
|
|
this.editViewVisable == false &&
|
|
|
this.serviceRecordVisable == false &&
|
|
|
this.healthRecordVisable == false
|
|
|
)
|
|
|
return this.currentEditData == null && this.editViewVisable == false && this.serviceRecordVisable == false && this.healthRecordVisable == false
|
|
|
},
|
|
|
showEditView() {
|
|
|
return this.currentEditData && this.editViewVisable
|
|
@ -99,11 +99,13 @@ Vue.component('copd-patient-record', {
|
|
|
},
|
|
|
mounted() {
|
|
|
var vm = this
|
|
|
var userRole = window.sessionStorage.getItem('selectedRole');
|
|
|
vm.userRoleCode = JSON.parse(userRole).code;
|
|
|
var userRole = window.sessionStorage.getItem('selectedRole')
|
|
|
vm.userRoleCode = JSON.parse(userRole).code
|
|
|
this.initTime(vm)
|
|
|
this.initScope(this)
|
|
|
this.hospitalList()
|
|
|
|
|
|
this.isGuGan = this.docInfo.expandLevelName.indexOf('慢病骨干') > -1
|
|
|
EventBus.$on('copd-reset-select', function () {
|
|
|
vm.currentEditData = null
|
|
|
vm.editViewVisable = false
|
|
@ -115,20 +117,24 @@ Vue.component('copd-patient-record', {
|
|
|
vm.editViewVisable = false
|
|
|
vm.serviceRecordVisable = false
|
|
|
vm.healthRecordVisable = false
|
|
|
vm.transferStatusOptions=[{code:'',value:'全部'}],
|
|
|
vm.recordStatusOptions=[{code:'',value:'全部'}],
|
|
|
vm.followStatusArr=[{code:'',value:'全部'}],
|
|
|
vm.receiveStatusOptions=[{value:'',label:'全部'},{value:'1',label:' 已接收'},{value:'0',label:' 未接收'}],
|
|
|
vm.survivalStatusOption=[{code:'',value:'全部'}],
|
|
|
vm.getJkCopdPatientPage()
|
|
|
vm.dicName.forEach(function(item) {
|
|
|
;(vm.transferStatusOptions = [{ code: '', value: '全部' }]),
|
|
|
(vm.recordStatusOptions = [{ code: '', value: '全部' }]),
|
|
|
(vm.followStatusArr = [{ code: '', value: '全部' }]),
|
|
|
(vm.receiveStatusOptions = [
|
|
|
{ value: '', label: '全部' },
|
|
|
{ value: '1', label: ' 已接收' },
|
|
|
{ value: '0', label: ' 未接收' }
|
|
|
]),
|
|
|
(vm.survivalStatusOption = [{ code: '', value: '全部' }]),
|
|
|
vm.getJkCopdPatientPage()
|
|
|
vm.dicName.forEach(function (item) {
|
|
|
vm.getDictByDictName(item)
|
|
|
});
|
|
|
})
|
|
|
})
|
|
|
this.getJkCopdPatientPage()
|
|
|
this.dicName.forEach(function(item) {
|
|
|
this.dicName.forEach(function (item) {
|
|
|
vm.getDictByDictName(item)
|
|
|
});
|
|
|
})
|
|
|
},
|
|
|
destroyed() {
|
|
|
EventBus.$off('copd-reset-select')
|
|
@ -136,252 +142,251 @@ Vue.component('copd-patient-record', {
|
|
|
},
|
|
|
methods: {
|
|
|
// 初始化时间
|
|
|
initTime(vm) {
|
|
|
var now = new Date();
|
|
|
vm.endTime = now.format('yyyy-MM-dd');
|
|
|
var start = now.getFullYear()+'-'+'01-01';
|
|
|
vm.startTime = new Date(start).format('yyyy-MM-dd');
|
|
|
initTime(vm) {
|
|
|
var now = new Date()
|
|
|
vm.endTime = now.format('yyyy-MM-dd')
|
|
|
var start = now.getFullYear() + '-' + '01-01'
|
|
|
vm.startTime = new Date(start).format('yyyy-MM-dd')
|
|
|
|
|
|
vm.nowyear = vm.chooseYear = now.getFullYear();
|
|
|
vm.chooseYear='全部'
|
|
|
vm.nowmonth = now.getMonth() + 1;
|
|
|
vm.years = ['全部'];
|
|
|
for (i = vm.nowyear; i >= 2013; i--) {
|
|
|
vm.years.push(i);
|
|
|
}
|
|
|
},
|
|
|
vm.nowyear = vm.chooseYear = now.getFullYear()
|
|
|
vm.chooseYear = '全部'
|
|
|
vm.nowmonth = now.getMonth() + 1
|
|
|
vm.years = ['全部']
|
|
|
for (i = vm.nowyear; i >= 2013; i--) {
|
|
|
vm.years.push(i)
|
|
|
}
|
|
|
},
|
|
|
// 数据范围初始化
|
|
|
initScope(vm) {
|
|
|
//获得缓存中缓存的角色权限
|
|
|
var userRole = window.sessionStorage.getItem('selectedRole');
|
|
|
console.log(userRole,'ssssssssssllllllllllllllll')
|
|
|
var userRole = window.sessionStorage.getItem('selectedRole')
|
|
|
if (!userRole) {
|
|
|
return false;
|
|
|
return false
|
|
|
}
|
|
|
vm.userRole = JSON.parse(userRole);
|
|
|
console.log(vm.userRole.code.length,'aaaaaaaaapppppppppppppppppp')
|
|
|
vm.userRole = JSON.parse(userRole)
|
|
|
//level:2、市,3、区,4、社区,5、团队
|
|
|
vm.initareaLevel = vm.areaLevel = vm.userRole.code == 'jk_350200' ? 2 : vm.userRole.code.length == 9 ? 3 : 4;
|
|
|
vm.initlevel = vm.level = vm.userRole.code == 'jk_350200' ? 4 : vm.userRole.code.length == 9 ? 3 : 2;
|
|
|
vm.initareaLevel = vm.areaLevel = vm.userRole.code == 'jk_350200' ? 2 : vm.userRole.code.length == 9 ? 3 : 4
|
|
|
vm.initlevel = vm.level = vm.userRole.code == 'jk_350200' ? 4 : vm.userRole.code.length == 9 ? 3 : 2
|
|
|
// vm.lowLevel = vm.initlowLevel = vm.userRole.code == '350200' ? 3 : vm.userRole.code.length == 6 ? 2 : 1;
|
|
|
|
|
|
vm.initarea = vm.area = vm.userRole.code;
|
|
|
vm.areaTitle = vm.userRole.name;
|
|
|
|
|
|
|
|
|
vm.initarea = vm.area = vm.userRole.code
|
|
|
vm.areaTitle = vm.userRole.name
|
|
|
|
|
|
// console.log(vm.initlevel,"vm.initlevel");
|
|
|
|
|
|
if (vm.initlevel == 4) {
|
|
|
//市获取区
|
|
|
vm.getDistrict(3, vm.initarea.substring(3), vm.areaTitle.substr(0, 3));
|
|
|
vm.rangeCode = vm.rangeList[0].code;
|
|
|
vm.getDistrict(3, vm.initarea.substring(3), vm.areaTitle.substr(0, 3))
|
|
|
vm.rangeCode = vm.rangeList[0].code
|
|
|
} else if (vm.initlevel == 3) {
|
|
|
//区获取社区
|
|
|
vm.areaList = [{code: vm.initarea, name: vm.areaTitle}];
|
|
|
vm.areaCode = vm.initarea;
|
|
|
vm.rangeCode = vm.rangeList[0].code;
|
|
|
vm.areaList = [{ code: vm.initarea, name: vm.areaTitle }]
|
|
|
vm.areaCode = vm.initarea
|
|
|
vm.rangeCode = vm.rangeList[0].code
|
|
|
} else if (vm.initlevel == 2) {
|
|
|
//社区获取团队
|
|
|
vm.communityList = [{code: vm.initarea, name: vm.areaTitle}];
|
|
|
vm.communityCode = vm.initarea;
|
|
|
vm.rangeList.shift();
|
|
|
vm.rangeCode = vm.rangeList[0].code;
|
|
|
vm.communityList = [{ code: vm.initarea, name: vm.areaTitle }]
|
|
|
vm.communityCode = vm.initarea
|
|
|
vm.rangeList.shift()
|
|
|
vm.rangeCode = vm.rangeList[0]?.code
|
|
|
}
|
|
|
vm.range = vm.rangeCode;
|
|
|
vm.range = vm.rangeCode
|
|
|
},
|
|
|
handlePreview(value) {
|
|
|
var vm = this
|
|
|
var file = value.target.files[0]
|
|
|
this.daLoading=true
|
|
|
console.log(file,'vvvvvvvvvvvv',value,value.target.files[0])
|
|
|
if(file && file.size) {
|
|
|
var formFile = new FormData()
|
|
|
formFile.append("file", file)
|
|
|
httpRequest.post('doctor/jkCopd/importExcel',{
|
|
|
data: formFile,
|
|
|
cache: false,//上传文件无需缓存
|
|
|
processData: false,//用于对data参数进行序列化处理 这里必须false
|
|
|
contentType: false, //必须
|
|
|
}).then(function(res) {
|
|
|
if(res.status == 200) {
|
|
|
vm.getJkCopdPatientPage()
|
|
|
vm.dicName.forEach(function(item) {
|
|
|
vm.getDictByDictName(item)
|
|
|
});
|
|
|
vm.daLoading=false
|
|
|
vm.$message({
|
|
|
message: '导入成功!',
|
|
|
type: 'success'
|
|
|
});
|
|
|
} else {
|
|
|
vm.$message.error('导入失败!')
|
|
|
vm.daLoading=false
|
|
|
}
|
|
|
}).catch(function(e) {
|
|
|
console.error(e)
|
|
|
vm.daLoading=false
|
|
|
})
|
|
|
// statisticAPI.importExcel({file:formFile}).then(function(res){
|
|
|
// console.log('22222222222',res)
|
|
|
// })
|
|
|
}
|
|
|
},
|
|
|
//获取省市区 type:区3
|
|
|
getDistrict: function (type, code, name) {
|
|
|
var vm = this,
|
|
|
list = [],
|
|
|
param = '';
|
|
|
if (type == 3) {
|
|
|
list = [{code: code, name: name}];
|
|
|
param = 'area';
|
|
|
} else if (type == 5) {
|
|
|
list = [{code: '', name: '全部'}];
|
|
|
param = 'community';
|
|
|
}
|
|
|
var params = {
|
|
|
type: type,
|
|
|
code: code
|
|
|
};
|
|
|
homeAPI.getDistrict(params).then(function (res) {
|
|
|
var file = value.target.files[0]
|
|
|
this.daLoading = true
|
|
|
if (file && file.size) {
|
|
|
var formFile = new FormData()
|
|
|
formFile.append('file', file)
|
|
|
httpRequest
|
|
|
.post('doctor/jkCopd/importExcel', {
|
|
|
data: formFile,
|
|
|
cache: false, //上传文件无需缓存
|
|
|
processData: false, //用于对data参数进行序列化处理 这里必须false
|
|
|
contentType: false //必须
|
|
|
})
|
|
|
.then(function (res) {
|
|
|
if (res.status == 200) {
|
|
|
vm[param + 'List'] = list.concat(res.list);
|
|
|
vm[param + 'Code'] = vm[param + 'List'][0].code;
|
|
|
vm.getJkCopdPatientPage()
|
|
|
vm.dicName.forEach(function (item) {
|
|
|
vm.getDictByDictName(item)
|
|
|
})
|
|
|
vm.daLoading = false
|
|
|
vm.$message({
|
|
|
message: '导入成功!',
|
|
|
type: 'success'
|
|
|
})
|
|
|
} else {
|
|
|
vm.$message.error(res.msg);
|
|
|
vm.$message.error('导入失败!')
|
|
|
vm.daLoading = false
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
hospitalList(){
|
|
|
var vm=this
|
|
|
statisticAPI.hospitalList({queryArea:vm.userRoleCode}).then(function(res){
|
|
|
vm.receivingHospitalList=vm.receivingHospitalList&& vm.receivingHospitalList.concat(res.detailModelList)
|
|
|
})
|
|
|
})
|
|
|
.catch(function (e) {
|
|
|
console.error(e)
|
|
|
vm.daLoading = false
|
|
|
})
|
|
|
// statisticAPI.importExcel({file:formFile}).then(function(res){
|
|
|
// console.log('22222222222',res)
|
|
|
// })
|
|
|
}
|
|
|
},
|
|
|
//获取省市区 type:区3
|
|
|
getDistrict: function (type, code, name) {
|
|
|
var vm = this,
|
|
|
list = [],
|
|
|
param = ''
|
|
|
if (type == 3) {
|
|
|
list = [{ code: code, name: name }]
|
|
|
param = 'area'
|
|
|
} else if (type == 5) {
|
|
|
list = [{ code: '', name: '全部' }]
|
|
|
param = 'community'
|
|
|
}
|
|
|
var params = {
|
|
|
type: type,
|
|
|
code: code
|
|
|
}
|
|
|
homeAPI.getDistrict(params).then(function (res) {
|
|
|
if (res.status == 200) {
|
|
|
vm[param + 'List'] = list.concat(res.list)
|
|
|
vm[param + 'Code'] = vm[param + 'List'][0].code
|
|
|
} else {
|
|
|
vm.$message.error(res.msg)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
hospitalList() {
|
|
|
var vm = this
|
|
|
statisticAPI.hospitalList({ queryArea: vm.userRoleCode }).then(function (res) {
|
|
|
vm.receivingHospitalList = vm.receivingHospitalList && vm.receivingHospitalList.concat(res.detailModelList)
|
|
|
})
|
|
|
},
|
|
|
exportTable(){
|
|
|
var vm=this
|
|
|
vm.daLoading=true
|
|
|
exportTable() {
|
|
|
var vm = this
|
|
|
vm.daLoading = true
|
|
|
var params = {
|
|
|
startTime: this.chooseYear=='全部'?'': this.chooseYear+'-01-01',
|
|
|
endTime:this.chooseYear=='全部'?'': this.chooseYear+'-12-31',
|
|
|
name:this.name,
|
|
|
turnDownStatus:this.turnDownStatus,
|
|
|
receiveStatus:this.receiveStatus,
|
|
|
archivesStatus:this.archivesStatus,
|
|
|
hospital:this.hospital,
|
|
|
doctorName:this.doctorName,
|
|
|
startTime: this.chooseYear == '全部' ? '' : this.chooseYear + '-01-01',
|
|
|
endTime: this.chooseYear == '全部' ? '' : this.chooseYear + '-12-31',
|
|
|
name: this.name,
|
|
|
turnDownStatus: this.turnDownStatus,
|
|
|
receiveStatus: this.receiveStatus,
|
|
|
archivesStatus: this.archivesStatus,
|
|
|
hospital: this.hospital,
|
|
|
doctorName: this.doctorName,
|
|
|
isLive: this.isLive,
|
|
|
firstOrg: this.firstOrg,
|
|
|
queryArea:this.userRoleCode
|
|
|
queryArea: this.userRoleCode
|
|
|
}
|
|
|
statisticAPI.exportJkCopdAchives(params,'居民档案.xls').then(
|
|
|
function(res){
|
|
|
vm.daLoading=false
|
|
|
vm.$message({
|
|
|
message: '导出成功!',
|
|
|
type: 'success'
|
|
|
});
|
|
|
}
|
|
|
)
|
|
|
},
|
|
|
selectionLineChangeHandle(val){
|
|
|
var vm=this
|
|
|
var arr=[]
|
|
|
val.forEach(function(item){
|
|
|
statisticAPI.exportJkCopdAchives(params, '居民档案.xls').then(function (res) {
|
|
|
vm.daLoading = false
|
|
|
vm.$message({
|
|
|
message: '导出成功!',
|
|
|
type: 'success'
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
selectionLineChangeHandle(val) {
|
|
|
var vm = this
|
|
|
var arr = []
|
|
|
val.forEach(function (item) {
|
|
|
arr.push(item.id)
|
|
|
})
|
|
|
vm.currentSelect=arr
|
|
|
vm.currentSelect = arr
|
|
|
},
|
|
|
synPatient(){
|
|
|
var vm=this
|
|
|
if(vm.currentSelect.length){
|
|
|
|
|
|
statisticAPI.synPatient({
|
|
|
ids:vm.currentSelect.join(','),
|
|
|
doctor: vm.docInfo.code
|
|
|
}).then(function(res){
|
|
|
if(res.status=='200'){
|
|
|
vm.$message({
|
|
|
message: res.message,
|
|
|
type: 'success'
|
|
|
});
|
|
|
vm.getJkCopdPatientPage()
|
|
|
vm.dicName.forEach(function(item) {
|
|
|
vm.getDictByDictName(item)
|
|
|
});
|
|
|
|
|
|
}else{
|
|
|
vm.$message({
|
|
|
message: res.message,
|
|
|
type: 'warning'
|
|
|
});
|
|
|
}
|
|
|
})
|
|
|
}else{
|
|
|
synPatient() {
|
|
|
var vm = this
|
|
|
if (vm.currentSelect.length) {
|
|
|
statisticAPI
|
|
|
.synPatient({
|
|
|
ids: vm.currentSelect.join(','),
|
|
|
doctor: vm.docInfo.code
|
|
|
})
|
|
|
.then(function (res) {
|
|
|
if (res.status == '200') {
|
|
|
vm.$message({
|
|
|
message: res.message,
|
|
|
type: 'success'
|
|
|
})
|
|
|
vm.getJkCopdPatientPage()
|
|
|
vm.dicName.forEach(function (item) {
|
|
|
vm.getDictByDictName(item)
|
|
|
})
|
|
|
} else {
|
|
|
vm.$message({
|
|
|
message: res.message,
|
|
|
type: 'warning'
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
} else {
|
|
|
vm.$message('请勾选患者!')
|
|
|
}
|
|
|
},
|
|
|
queryDate(){
|
|
|
queryDate() {
|
|
|
this.getJkCopdPatientPage()
|
|
|
},
|
|
|
distributionHospital(){
|
|
|
var vm=this
|
|
|
if(vm.currentSelect.length){
|
|
|
vm.daLoading=true
|
|
|
statisticAPI.distributionHospital({
|
|
|
type:1,
|
|
|
ids:vm.currentSelect.join(','),
|
|
|
doctor: vm.docInfo.code
|
|
|
}).then(function(res){
|
|
|
if(res.status=='200'){
|
|
|
vm.daLoading=false
|
|
|
vm.$message({
|
|
|
message: res.message,
|
|
|
type: 'success'
|
|
|
});
|
|
|
vm.getJkCopdPatientPage()
|
|
|
vm.dicName.forEach(function(item) {
|
|
|
vm.getDictByDictName(item)
|
|
|
});
|
|
|
|
|
|
}else{
|
|
|
vm.daLoading=false
|
|
|
vm.$message({
|
|
|
message: res.message,
|
|
|
type: 'warning'
|
|
|
});
|
|
|
}
|
|
|
})
|
|
|
}else{
|
|
|
vm.daLoading=false
|
|
|
distributionHospital() {
|
|
|
var vm = this
|
|
|
if (vm.currentSelect.length) {
|
|
|
vm.daLoading = true
|
|
|
statisticAPI
|
|
|
.distributionHospital({
|
|
|
type: 1,
|
|
|
ids: vm.currentSelect.join(','),
|
|
|
doctor: vm.docInfo.code
|
|
|
})
|
|
|
.then(function (res) {
|
|
|
if (res.status == '200') {
|
|
|
vm.daLoading = false
|
|
|
vm.$message({
|
|
|
message: res.message,
|
|
|
type: 'success'
|
|
|
})
|
|
|
vm.getJkCopdPatientPage()
|
|
|
vm.dicName.forEach(function (item) {
|
|
|
vm.getDictByDictName(item)
|
|
|
})
|
|
|
} else {
|
|
|
vm.daLoading = false
|
|
|
vm.$message({
|
|
|
message: res.message,
|
|
|
type: 'warning'
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
} else {
|
|
|
vm.daLoading = false
|
|
|
vm.$message('请勾选患者!')
|
|
|
}
|
|
|
},
|
|
|
eliminateClick(){
|
|
|
this.name='',
|
|
|
this.turnDownStatus='',
|
|
|
this.receiveStatus='',
|
|
|
this.archivesStatus='',
|
|
|
this.hospital='',
|
|
|
this.doctorName='',
|
|
|
this.isLive= '',
|
|
|
this.firstOrg= ''
|
|
|
eliminateClick() {
|
|
|
;(this.name = ''),
|
|
|
(this.turnDownStatus = ''),
|
|
|
(this.receiveStatus = ''),
|
|
|
(this.archivesStatus = ''),
|
|
|
(this.hospital = ''),
|
|
|
(this.doctorName = ''),
|
|
|
(this.isLive = ''),
|
|
|
(this.firstOrg = '')
|
|
|
},
|
|
|
//下转状态
|
|
|
getDictByDictName(value){
|
|
|
var vm=this
|
|
|
statisticAPI.getDictByDictName({name:value}).then(function(res){
|
|
|
if(value=='jkcopd_turnDownStatus'){
|
|
|
vm.transferStatusOptions= vm.transferStatusOptions.concat(res.list)
|
|
|
}else if(value=='jkcopd_archivesStatus'){
|
|
|
vm.recordStatusOptions=vm.recordStatusOptions.concat(res.list)
|
|
|
}else if(value=='jkcopd_isLive'){
|
|
|
vm.survivalStatusOption= vm.survivalStatusOption.concat(res.list)
|
|
|
}else if(value=='jkcopd_followup_status'){
|
|
|
vm.followStatusArr= vm.followStatusArr.concat(res.list)
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
getDictByDictName(value) {
|
|
|
var vm = this
|
|
|
statisticAPI.getDictByDictName({ name: value }).then(function (res) {
|
|
|
if (value == 'jkcopd_turnDownStatus') {
|
|
|
vm.transferStatusOptions = vm.transferStatusOptions.concat(res.list)
|
|
|
} else if (value == 'jkcopd_archivesStatus') {
|
|
|
vm.recordStatusOptions = vm.recordStatusOptions.concat(res.list)
|
|
|
} else if (value == 'jkcopd_isLive') {
|
|
|
vm.survivalStatusOption = vm.survivalStatusOption.concat(res.list)
|
|
|
} else if (value == 'jkcopd_followup_status') {
|
|
|
vm.followStatusArr = vm.followStatusArr.concat(res.list)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
onClickEdit(record) {
|
|
|
window.localStorage.setItem('editDetail',JSON.stringify(record))
|
|
|
window.localStorage.setItem('editDetail', JSON.stringify(record))
|
|
|
if (!record) {
|
|
|
return
|
|
|
}
|
|
@ -393,157 +398,222 @@ Vue.component('copd-patient-record', {
|
|
|
this.serviceRecordVisable = true
|
|
|
},
|
|
|
/*打开预览链接*/
|
|
|
openURL (url) {
|
|
|
let aLabel = document.createElement('a');
|
|
|
//设置链接
|
|
|
aLabel.setAttribute('href', url);
|
|
|
//新窗口打开链接
|
|
|
aLabel.setAttribute('target', '_blank');
|
|
|
//设置标签ID
|
|
|
aLabel.setAttribute('id', 'reportpoint');
|
|
|
// 防止反复添加
|
|
|
if (document.getElementById('reportpoint')) {
|
|
|
document.body.removeChild(document.getElementById('reportpoint'));
|
|
|
}
|
|
|
document.body.appendChild(aLabel);
|
|
|
aLabel.click();
|
|
|
console.log("打开链接:",url);
|
|
|
//window.open(url);
|
|
|
},
|
|
|
openURL(url) {
|
|
|
let aLabel = document.createElement('a')
|
|
|
//设置链接
|
|
|
aLabel.setAttribute('href', url)
|
|
|
//新窗口打开链接
|
|
|
aLabel.setAttribute('target', '_blank')
|
|
|
//设置标签ID
|
|
|
aLabel.setAttribute('id', 'reportpoint')
|
|
|
// 防止反复添加
|
|
|
if (document.getElementById('reportpoint')) {
|
|
|
document.body.removeChild(document.getElementById('reportpoint'))
|
|
|
}
|
|
|
document.body.appendChild(aLabel)
|
|
|
aLabel.click()
|
|
|
//window.open(url);
|
|
|
},
|
|
|
|
|
|
onClickHealthRecord(record) {
|
|
|
this.getCode(record.idcard)
|
|
|
},
|
|
|
getCode(idcard){
|
|
|
var vm=this
|
|
|
getCode(idcard) {
|
|
|
var vm = this
|
|
|
this.patientCode = ''
|
|
|
statisticAPI.getPatientAccetokenByIdcard({idcard:idcard}).then(function(res){
|
|
|
if (res.status == 200) {
|
|
|
vm.patientCode=res.data.patientCode
|
|
|
var healthRecordServer="http://www.xmtyw.cn/wlyy/profileweb/#/menzhen" //健康档案服务
|
|
|
//var healthRecordServer="https://www.xmtyw.cn/wlyytest/profileweb/#/menzhen" //健康档案服务wlyytest
|
|
|
window.open(healthRecordServer + '?patientCode=' + res.data.patientCode)
|
|
|
}else{
|
|
|
vm.patientCode=''
|
|
|
this.$message.error('获取授权码失败')
|
|
|
statisticAPI.getPatientAccetokenByIdcard({ idcard: idcard }).then(function (res) {
|
|
|
if (res.status == 200) {
|
|
|
vm.patientCode = res.data.patientCode
|
|
|
var healthRecordServer = 'http://www.xmtyw.cn/wlyy/profileweb/#/menzhen' //健康档案服务
|
|
|
//var healthRecordServer="https://www.xmtyw.cn/wlyytest/profileweb/#/menzhen" //健康档案服务wlyytest
|
|
|
window.open(healthRecordServer + '?patientCode=' + res.data.patientCode)
|
|
|
} else {
|
|
|
vm.patientCode = ''
|
|
|
this.$message.error('获取授权码失败')
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
handleCurrentChange:function(val) {
|
|
|
handleCurrentChange: function (val) {
|
|
|
this.page = val
|
|
|
this.getJkCopdPatientPage()
|
|
|
},
|
|
|
handleSizeChange(val) {
|
|
|
this.size = val
|
|
|
this.getJkCopdPatientPage()
|
|
|
},
|
|
|
getJkCopdPatientPage: function (val) {
|
|
|
this.daLoading=true
|
|
|
var vm =this
|
|
|
this.daLoading = true
|
|
|
var vm = this
|
|
|
var params = {
|
|
|
page: this.page,
|
|
|
size: this.size,
|
|
|
name:this.name,
|
|
|
turnDownStatus:this.turnDownStatus,
|
|
|
receiveStatus:this.receiveStatus,
|
|
|
archivesStatus:this.archivesStatus,
|
|
|
hospital:this.hospital,
|
|
|
doctorName:this.doctorName,
|
|
|
name: this.name,
|
|
|
turnDownStatus: this.turnDownStatus,
|
|
|
receiveStatus: this.receiveStatus,
|
|
|
archivesStatus: this.archivesStatus,
|
|
|
hospital: this.hospital,
|
|
|
doctorName: this.doctorName,
|
|
|
isLive: this.isLive,
|
|
|
queryArea:this.userRoleCode,
|
|
|
queryArea: this.userRoleCode,
|
|
|
firstOrg: this.firstOrg,
|
|
|
startTime: this.chooseYear=='全部'?"": this.chooseYear+'-01-01',
|
|
|
endTime:this.chooseYear=='全部'?"": this.chooseYear+'-12-31',
|
|
|
startTime: this.chooseYear == '全部' ? '' : this.chooseYear + '-01-01',
|
|
|
endTime: this.chooseYear == '全部' ? '' : this.chooseYear + '-12-31'
|
|
|
}
|
|
|
statisticAPI.jkCopdAchivesPage(params).then(function (res) {
|
|
|
vm.totalCount = res.totalCount
|
|
|
vm.totalPage = res.totalPage
|
|
|
vm.currentPage=res.currPage
|
|
|
vm.dataList = res.detailModelList
|
|
|
console.log(vm.currentPage,res,'88888888888')
|
|
|
vm.daLoading=false
|
|
|
vm.daLoading = false
|
|
|
})
|
|
|
},
|
|
|
|
|
|
//上传
|
|
|
toggle(isShow){
|
|
|
toggle(isShow) {
|
|
|
this.isShow = isShow
|
|
|
if(!isShow){
|
|
|
this.reset()
|
|
|
if (!isShow) {
|
|
|
this.reset()
|
|
|
}
|
|
|
},
|
|
|
reset(type){
|
|
|
},
|
|
|
reset(type) {
|
|
|
this.percentage = 0
|
|
|
this.success = false
|
|
|
this.isOver = false
|
|
|
this.errList = []
|
|
|
if(type!=1){
|
|
|
this.loading = false
|
|
|
this.file = undefined
|
|
|
this.month = ""
|
|
|
if (type != 1) {
|
|
|
this.loading = false
|
|
|
this.file = undefined
|
|
|
this.month = ''
|
|
|
}
|
|
|
},
|
|
|
close(type){
|
|
|
},
|
|
|
close(type) {
|
|
|
this.reset(type)
|
|
|
this.isProgressShow = false
|
|
|
if(type!=1){
|
|
|
this.isShow = false
|
|
|
if (type != 1) {
|
|
|
this.isShow = false
|
|
|
}
|
|
|
},
|
|
|
beforeUploadPic(file){
|
|
|
console.log(file,'000000000000000000000')
|
|
|
},
|
|
|
beforeUploadPic(file) {
|
|
|
this.file = file
|
|
|
},
|
|
|
check(){
|
|
|
},
|
|
|
check() {
|
|
|
var vm = this
|
|
|
vm.loading = true
|
|
|
if(!vm.file){
|
|
|
vm.loading = false
|
|
|
vm.$message('请选择文件');
|
|
|
return
|
|
|
if (!vm.file) {
|
|
|
vm.loading = false
|
|
|
vm.$message('请选择文件')
|
|
|
return
|
|
|
}
|
|
|
vm.save()
|
|
|
},
|
|
|
save(){
|
|
|
},
|
|
|
save() {
|
|
|
var vm = this
|
|
|
vm.daLoading=true
|
|
|
vm.daLoading = true
|
|
|
var formData = new FormData()
|
|
|
formData.append("file", vm.file)
|
|
|
formData.append('file', vm.file)
|
|
|
// vm.initProgress()
|
|
|
console.log(formData, 'formData');
|
|
|
httpRequest.post('doctor/jkCopd/importExcel',{
|
|
|
data: formData,
|
|
|
cache: false,//上传文件无需缓存
|
|
|
processData: false,//用于对data参数进行序列化处理 这里必须false
|
|
|
contentType: false, //必须
|
|
|
}).then(function(res) {
|
|
|
if(res.status == 200) {
|
|
|
vm.getJkCopdPatientPage()
|
|
|
vm.dicName.forEach(function(item) {
|
|
|
vm.getDictByDictName(item)
|
|
|
});
|
|
|
vm.daLoading=false
|
|
|
vm.isShow = false
|
|
|
vm.$message({
|
|
|
message: '导入成功!',
|
|
|
type: 'success'
|
|
|
});
|
|
|
} else {
|
|
|
vm.$message.error('导入失败!')
|
|
|
vm.daLoading=false
|
|
|
}
|
|
|
}).catch(function(e) {
|
|
|
console.error(e)
|
|
|
vm.daLoading=false
|
|
|
})
|
|
|
},
|
|
|
initProgress(){
|
|
|
httpRequest
|
|
|
.post('doctor/jkCopd/importExcel', {
|
|
|
data: formData,
|
|
|
cache: false, //上传文件无需缓存
|
|
|
processData: false, //用于对data参数进行序列化处理 这里必须false
|
|
|
contentType: false //必须
|
|
|
})
|
|
|
.then(function (res) {
|
|
|
if (res.status == 200) {
|
|
|
vm.getJkCopdPatientPage()
|
|
|
vm.dicName.forEach(function (item) {
|
|
|
vm.getDictByDictName(item)
|
|
|
})
|
|
|
vm.daLoading = false
|
|
|
vm.isShow = false
|
|
|
vm.$message({
|
|
|
message: '导入成功!',
|
|
|
type: 'success'
|
|
|
})
|
|
|
} else {
|
|
|
vm.$message.error('导入失败!')
|
|
|
vm.daLoading = false
|
|
|
}
|
|
|
})
|
|
|
.catch(function (e) {
|
|
|
console.error(e)
|
|
|
vm.daLoading = false
|
|
|
})
|
|
|
},
|
|
|
initProgress() {
|
|
|
var vm = this
|
|
|
this.isProgressShow = true
|
|
|
setTimeout(()=>{
|
|
|
if(!vm.isOver && vm.percentage!=90){
|
|
|
vm.percentage += 10
|
|
|
vm.initProgress()
|
|
|
}
|
|
|
setTimeout(() => {
|
|
|
if (!vm.isOver && vm.percentage != 90) {
|
|
|
vm.percentage += 10
|
|
|
vm.initProgress()
|
|
|
}
|
|
|
}, 1000)
|
|
|
},
|
|
|
openAllocationDialog() {
|
|
|
if (this.currentSelect.length == 0) {
|
|
|
this.$message.warning('请选择患者')
|
|
|
return
|
|
|
}
|
|
|
var vm = this
|
|
|
this.allocationDialog = true
|
|
|
statisticAPI.findDoctorList({ hospital: this.docInfo.hospital }).then(function (res) {
|
|
|
vm.doctorList = res.detailModelList
|
|
|
})
|
|
|
},
|
|
|
closeAllocationDialog() {
|
|
|
this.allocationDialog = false
|
|
|
},
|
|
|
back() {
|
|
|
var vm = this
|
|
|
vm.currentEditData = null
|
|
|
vm.editViewVisable = false
|
|
|
vm.serviceRecordVisable = false
|
|
|
vm.healthRecordVisable = false
|
|
|
},
|
|
|
allocationFn() {
|
|
|
var vm = this
|
|
|
this.$refs.allocationForm.validate(function (valid) {
|
|
|
if (valid) {
|
|
|
statisticAPI.distributionPatient({ ids: vm.currentSelect.join(','), doctor: vm.allocationForm.doctor }).then(function (res) {
|
|
|
if (res.status == 200) {
|
|
|
vm.allocationDialog = false
|
|
|
vm.$message.success('分配成功')
|
|
|
vm.getJkCopdPatientPage()
|
|
|
} else {
|
|
|
vm.$message.error(res.msg)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
standardExport() {
|
|
|
var vm = this
|
|
|
vm.exportStandardLoading = true
|
|
|
var params = {
|
|
|
page: this.page,
|
|
|
size: this.size,
|
|
|
name: this.name,
|
|
|
turnDownStatus: this.turnDownStatus,
|
|
|
receiveStatus: this.receiveStatus,
|
|
|
archivesStatus: this.archivesStatus,
|
|
|
hospital: this.hospital,
|
|
|
doctorName: this.doctorName,
|
|
|
isLive: this.isLive,
|
|
|
queryArea: this.userRoleCode,
|
|
|
firstOrg: this.firstOrg,
|
|
|
startTime: this.chooseYear == '全部' ? '' : this.chooseYear + '-01-01',
|
|
|
endTime: this.chooseYear == '全部' ? '' : this.chooseYear + '-12-31'
|
|
|
}
|
|
|
var time = new Date().getTime()
|
|
|
statisticAPI.exportCountryStandard(params, `国家标准${time}.xls`).then(function (res) {
|
|
|
vm.exportStandardLoading = false
|
|
|
vm.$message({
|
|
|
message: '导出成功!',
|
|
|
type: 'success'
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
|