Browse Source

Merge branch 'master' of http://192.168.1.220:10080/raolu/PC-application

linehang 6 years ago
parent
commit
346e950313
2 changed files with 55 additions and 39 deletions
  1. 1 1
      app/sign/html/userInfo.html
  2. 54 38
      app/sign/js/userInfo.js

+ 1 - 1
app/sign/html/userInfo.html

@ -138,7 +138,7 @@
							<div class="flex-box">
								<span class="w-110 c-999">所属居委会</span>
								<div class="flex-box-item">
									{{userInfo.address}}
									{{jwh}}
								</div>
							</div>
						</div>

+ 54 - 38
app/sign/js/userInfo.js

@ -8,47 +8,63 @@ var httpData=GetRequest();
			jkqk:[],//健康情况
			jblx:[],//疾病标签
			tdbq:[],//团队标签
			},
			mounted: function(){
				this.getPatient();
			},
			methods: {
				getPatient:function(){
					var vm=this;
					var data={
						patient:vm.patient
			jwh:'',
		},
		mounted: function(){
			this.getPatient();
			this.getJWH();
		},
		methods: {
			getPatient:function(){
				var vm=this;
				var data={
					patient:vm.patient
				}
				signAPI.getPatient(data).then(function(res){
					if(res.status==200){
						res.data &&(vm.userInfo=res.data);
						console.log(vm.userInfo)
					}else{
						top.layer.msg(res.msg, {icon: 5})
					}
					signAPI.getPatient(data).then(function(res){
						if(res.status==200){
							res.data &&(vm.userInfo=res.data);
							console.log(vm.userInfo)
						}else{
							top.layer.msg(res.msg, {icon: 5})
						}
					})
					signAPI.patientLabel(data).then(function(res){
						if(res.status==200){
							var data=res.data
							if(data.length){
								for(var i in data){
									var item=data[i]
									if(item.labelType==2){
										vm.jkqk.push(item)
									}else if(item.labelType==3){
										vm.jblx.push(item)
									}else if(item.labelType==4){
										vm.tdbq.push(item)
									}
				})
				signAPI.patientLabel(data).then(function(res){
					if(res.status==200){
						var data=res.data
						if(data.length){
							for(var i in data){
								var item=data[i]
								if(item.labelType==2){
									vm.jkqk.push(item)
								}else if(item.labelType==3){
									vm.jblx.push(item)
								}else if(item.labelType==4){
									vm.tdbq.push(item)
								}
							}
						}else{
							top.layer.msg(res.msg, {icon: 5})
						}
					})
				},
				goPcPrompt:function(){
					top.layer.msg('请前往客户端查看', {icon: 5})
					}else{
						top.layer.msg(res.msg, {icon: 5})
					}
				})
			},
			getJWH:function(){
				var vm=this;
//						获取居委会
				var data={
					code:vm.patient
				}
				signAPI.patientSign(data).then(function(res){
					if(res.status==200){
						vm.jwh=res.data && res.data.sickVillageName
					}else{
						top.layer.msg(res.msg, {icon: 5})
					}
				})
				},
			goPcPrompt:function(){
				top.layer.msg('请前往客户端查看', {icon: 5})
			}
		})
	})();
		}
	})
})();