Browse Source

康复下转

yht2016 5 years ago
parent
commit
7ea3cfd187
2 changed files with 58 additions and 16 deletions
  1. 4 0
      api/rehabilitation-api.js
  2. 54 16
      app/recover/html/addRecoveryDown.html

+ 4 - 0
api/rehabilitation-api.js

@ -85,6 +85,10 @@
		getRehabilitationPatientList: function(data) {
			return httpRequest.get("/doctor/rehabilitation/getRehabilitationPatientList", {data: data})
		},
		//获取居民标签字典(健康情况、疾病类型、自定义分组)
		getSpecialistPatientLabel: function(data) {
			return httpRequest.get("doctor/patient_label/getSpecialistPatientLabel", {data: data})
		},
		//获取居民标签(健康情况、疾病类型、自定义分组)
		getPatientLabelInfo: function(data) {
			return httpRequest.get("doctor/patient_label_info/getPatientLabelInfo", {data: data})

+ 54 - 16
app/recover/html/addRecoveryDown.html

@ -51,7 +51,7 @@
			    <div class="flex vc">
			        <label class="c-999 w-80">健康情况:</label>
					<select v-model="curHealthStatu" class="form-control w-180 h30">
						<option v-for="(o, i) in healthLabel" v-bind:value="o.label">{{o.labelName}}</option> 
						<option v-for="(o, i) in healthLabel" v-bind:value="o.labelCode">{{o.labelName}}</option> 
					</select>
			    </div>
			    <div class="flex mt20">
@ -167,19 +167,38 @@
							}
						})
					},
					// 获取居民标签(健康情况、疾病类型、自定义分组)
					getPatientLabelInfo: function(){
					getSpecialistTeamList: function(){
						var vm = this,
							loading = layer.load(0, {shade: false})
						var params = {
							patient: vm.patientInfo.patient // "915cdef5-5b1d-11e6-8344-fa163e8aee56"
							doctor: docInfo.code
						}
						rehaAPI.getPatientLabelInfo(params).then(function(res){
						rehaAPI.getSpecialistTeamList(params).then(function(res){
							layer.close(loading)
							if(res.status == 200) {
								vm.teamList = res.data || []
								vm.curTeamId = vm.teamList[0].id
								vm.getSpecialistPatientLabel(vm.curTeamId)
							} else {
								showErrorMessage(res.msg);
							}
						})
					},
					// 获取居民标签字典(健康情况、疾病类型、自定义分组)
					getSpecialistPatientLabel: function(teamId){
						var vm = this,
							loading = layer.load(0, {shade: false})
						var params = {
							teamCode: teamId
						}
						rehaAPI.getSpecialistPatientLabel(params).then(function(res){
							layer.close(loading)
							if(res.status==200){
								var diseaseLabel = [], customLabel = [];
								$.each(res.data['diseaseServer'], function(index, o){
								$.each(res.data['diseaseLabel'], function(index, o){
									o.flag = false
									o.disease = o.code
									o.diseaseName = o.name
									diseaseLabel.push(o)
								})
								$.each(res.data['customLabel'], function(index, o){
@ -187,25 +206,44 @@
									customLabel.push(o)
								})
								vm.healthLabel = res.data['healthLabel'] || []
								vm.curHealthStatu = vm.healthLabel.length>0?vm.healthLabel[0].label:undefined
								vm.curHealthStatu = vm.healthLabel.length>0?vm.healthLabel[0].labelCode:undefined
								vm.diseaseLabel = diseaseLabel
								vm.customLabel = customLabel
							} else {
							}else{
								showErrorMessage(res.msg);
							}
						})
					},
					getSpecialistTeamList: function(){
					// 获取居民标签(健康情况、疾病类型、自定义分组)
					getPatientLabelInfo: function(){
						var vm = this,
							loading = layer.load(0, {shade: false})
						var params = {
							doctor: docInfo.code
							patient: vm.patientInfo.patient // "915cdef5-5b1d-11e6-8344-fa163e8aee56"
						}
						rehaAPI.getSpecialistTeamList(params).then(function(res){
						rehaAPI.getPatientLabelInfo(params).then(function(res){
							layer.close(loading)
							if(res.status == 200) {
								vm.teamList = res.data || []
								vm.curTeamId = vm.teamList[0].id
								if(res.data['healthLabel'].length>0){
									vm.curHealthStatu = res.data['healthLabel'][0].label
								}
								$.each(res.data['diseaseServer'], function(index, o){
									$.each(vm.diseaseLabel, function(index1, o1){
										if(o.disease == o1.disease){
											o1.flag = true
										}
										vm.$set(vm.diseaseLabel, index1, o1)
									})
								})
								$.each(res.data['customLabel'], function(index, o){
									$.each(vm.customLabel, function(index1, o1){
										if(o.label == o1.labelCode){
											o1.flag = true
										}
										vm.$set(vm.customLabel, index1, o1)
									})
								})
							} else {
								showErrorMessage(res.msg);
							}
@ -220,9 +258,9 @@
							return false
						}
						$.each(vm.healthLabel, function(index, o){
							if(o.label == vm.curHealthStatu){
							if(o.labelCode == vm.curHealthStatu){
								health = {
									label: o.label,
									label: o.labelCode,
									labelName: o.labelName,
									labelType: o.labelType
								}
@ -249,7 +287,7 @@
								num2++
							} else {
								custom.push({
									label: o.label,
									label: o.labelCode,
									labelName: o.labelName,
									labelType: o.labelType
								})