chenyue 4 лет назад
Родитель
Сommit
bcb32eb8d7

+ 43 - 18
app/recover/html/new_recover.html

@ -408,6 +408,8 @@
					templateDetail: function(){
						if(this.templateDetail.length==0){
							this.havePlan = false
						}else{
							this.havePlan = true
						}
					}
				},
@ -488,10 +490,13 @@
							}
						})
					},
					comMedicalRecords:function(record){
					comMedicalRecords:function(record,isEdit){
						var vm = this
						var loading = layer.load(0, {shade: false})
						var event=record&&record.event?record.event:""
						if(!isEdit){
							isEdit = ""
						}
						recoverAPI.getPatientAccetokenByIdcard({idcard:vm.pati.idcard}).then(function(res){
							layer.close(loading)
							if(res.status==200){
@ -503,7 +508,7 @@
									closeBtn: 1,
									shift: 5,
									shadeClose: false, //点击遮罩关闭层
									content: httpRequest.server+"profileweb/#/zhuyuan?patientCode="+res.data.patientCode+'&hospital='+docInfo.hospital+"&recoverDown=true&event='+event,
									content: httpRequest.server+"profileweb/#/zhuyuan?patientCode="+res.data.patientCode+"&hospital="+docInfo.hospital+"&recoverDown="+isEdit+"&event="+event,
									end: function(){
										var comProfile = sessionStorage.getItem("comProfile")
										if(comProfile){
@ -516,7 +521,6 @@
								showErrorMessage(res.msg);
							}
						})
						
					},
					comMedicalRecordsBack:function(comProfile,event){
						var vm = this
@ -547,6 +551,9 @@
									vm.medicalRecordsList.unshift(res.data)
								}else{
									vm.$set(vm.medicalRecordsList, vm.curMedicalRecordsIndex, res.data)
								}								
								if(!vm.adviceContent){
									vm.adviceContent = res.data.advice
								}
							}else{
								showErrorMessage(res.msg);
@ -570,21 +577,39 @@
					// 编辑住院病历
					editMedicalRecords: function(o, i){
						var vm = this
						vm.curMedicalRecordsIndex = i
						if(o.event){
							vm.comMedicalRecords(o)
						}else{
							window.localStorage.setItem('curMedicalRecords', JSON.stringify(o))
							this.selectPatientIndex = layer.open({
								type: 2,
								area: ['480px', '650px'],
								shade: 0.5,
								title: '添加住院病历',
								closeBtn: 1,
								shift: 5,
								shadeClose: false, //点击遮罩关闭层
								content: "medical-records.html?patient="+vm.pati.patient+'&patientName='+vm.pati.patientName+'&medicalRecordsId='+o.id
							});
						if(vm.isEditConfig){
							if(o.event){
								vm.comMedicalRecords(o)
							}else{
								window.localStorage.setItem('curMedicalRecords', JSON.stringify(o))
								this.selectPatientIndex = layer.open({
									type: 2,
									area: ['480px', '650px'],
									shade: 0.5,
									title: '添加住院病历',
									closeBtn: 1,
									shift: 5,
									shadeClose: false, //点击遮罩关闭层
									content: "../../rehabilitation/html/medical-records-detail.html?medicalRecordsCode="+o.code
								});
							}
						}else{							
							vm.curMedicalRecordsIndex = i
							if(o.event){
								vm.comMedicalRecords(o,true)
							}else{
								window.localStorage.setItem('curMedicalRecords', JSON.stringify(o))
								this.selectPatientIndex = layer.open({
									type: 2,
									area: ['480px', '650px'],
									shade: 0.5,
									title: '添加住院病历',
									closeBtn: 1,
									shift: 5,
									shadeClose: false, //点击遮罩关闭层
									content: "medical-records.html?patient="+vm.pati.patient+'&patientName='+vm.pati.patientName+'&medicalRecordsId='+o.id
								});
							}
						}
					},
					//关闭添加住院病历弹框

+ 1 - 1
app/rehabilitation/html/rehabilitation_management.html

@ -151,7 +151,7 @@
						<div>
							<div v-for="(o, i) in medicalRecordsList" class="w-row flex vc c-f14 c-border plr10 ptb5 link-control mt10" @click="viewMedicalDetail(o)">
								<span class="c-666 mr15">
									{{o&&o.admissionTime?formatter(o.admissionTime):''}}
									{{o&&o.admissionTime?formatter(o.admissionTime):formatter(o.createTime)}}
								</span>
								<div class="flex1 c-12b7f5 ellipsis-1">
									{{o&&o.hospitalName?o.hospitalName:''}}

+ 35 - 13
app/rehabilitation/js/rehabilitation_management.js

@ -12,6 +12,7 @@
		[11.1, 4],
		[7, 4]
	];
	var docInfo = JSON.parse(localStorage.docInfo);
	function showSuccessMessage(msg) {
		layer.msg(msg, {
			icon: 1
@ -142,18 +143,40 @@
			},
			// 查看住院病历详情
			viewMedicalDetail: function(o){
				layer.open({
					type: 2,
					area: ['600px', '600px'],
					shade: 0.5,
					title: '住院病历详情',
					fixed: true, //不固定
					maxmin: true,
					closeBtn:1,
					shift: 5,
					shadeClose: false, //点击遮罩关闭层
					content: '../../rehabilitation/html/medical-records-detail.html?medicalRecordsCode='+ o.code,
				});
				var vm=this
				if(o.event){
					var loading = layer.load(0, {shade: false})
					recoverAPI.getPatientAccetokenByIdcard({idcard:vm.planInfo.idcard}).then(function(res){
						layer.close(loading)
						if(res.status==200){
							layer.open({
								type: 2,
								area: ['75%', '650px'],
								shade: 0.5,
								title: '住院病历',
								closeBtn: 1,
								shift: 5,
								shadeClose: false, //点击遮罩关闭层
								content: httpRequest.server+"profileweb/#/zhuyuan?patientCode="+res.data.patientCode+"&hospital="+docInfo.hospital+"&event="+o.event,
							});
						}else{
							showErrorMessage(res.msg);
						}
					})
				}else{
					layer.open({
						type: 2,
						area: ['600px', '600px'],
						shade: 0.5,
						title: '住院病历详情',
						fixed: true, //不固定
						maxmin: true,
						closeBtn:1,
						shift: 5,
						shadeClose: false, //点击遮罩关闭层
						content: '../../rehabilitation/html/medical-records-detail.html?medicalRecordsCode='+ o.code,
					});
				}
			},
			formatter: function(time){
				return new Date(time).format('yyyy-MM-dd')
@ -715,7 +738,6 @@
				var participants = []
				var participantsMobile = {}
				var docInfo = JSON.parse(localStorage.docInfo);
				//发起人
				participants.push({mobile: docInfo.mobile, name: docInfo.name, sex: docInfo.sex==1? 1 : 2, birthdate: "", level: 3, hospital_name: docInfo.hospitalName, idcard: ""});