创建健康档案
This commit is contained in:
@@ -45,59 +45,60 @@
|
||||
<view class="case-inputs">
|
||||
<label class="case-input-label">
|
||||
当前高血脂
|
||||
<text>({{sexName == 'man' ? '男性' : '女性'}}高血脂正常指标 {{ countMin }} ~ {{ countMax }})</text>
|
||||
<text>({{sexName == 'man' ? '男性' : '女性'}}高血脂正常指标 {{ hyperlipemiaMin }} ~ {{ hyperlipemiaMax }})</text>
|
||||
</label>
|
||||
<input class="case-inputs-input" placeholder="输入您当前高血脂值" @input="numberInput" :value="countNumber" type="idcard" :disabled="editState"></input>
|
||||
<text class="case-inputs-tips active" v-if="countNumber > countMax">偏高</text>
|
||||
<text class="case-inputs-tips" v-if="countNumber < countMin && countNumber != ''">偏低</text>
|
||||
<input class="case-inputs-input" placeholder="输入您当前高血脂值" @input="hyperlipemiaInput" :value="hyperlipemiaNumber" type="idcard" :disabled="editState"></input>
|
||||
<text class="case-inputs-tips active" v-if="hyperlipemiaNumber > hyperlipemiaMax">偏高</text>
|
||||
<text class="case-inputs-tips" v-if="hyperlipemiaNumber < hyperlipemiaMin && hyperlipemiaNumber != ''">偏低</text>
|
||||
</view>
|
||||
<view class="case-inputs">
|
||||
<label class="case-input-label">
|
||||
当前高血压
|
||||
<text>({{sexName == 'man' ? '男性' : '女性'}}高血压正常指标 {{ countMin }} ~ {{ countMax }})</text>
|
||||
<text>({{sexName == 'man' ? '男性' : '女性'}}高血压正常指标 {{ hypertensionMin }} ~ {{ hypertensionMax }})</text>
|
||||
</label>
|
||||
<input class="case-inputs-input" placeholder="输入您当前高血压值" @input="numberInput" :value="countNumber" type="idcard" :disabled="editState"></input>
|
||||
<text class="case-inputs-tips active" v-if="countNumber > countMax">偏高</text>
|
||||
<text class="case-inputs-tips" v-if="countNumber < countMin && countNumber != ''">偏低</text>
|
||||
<input class="case-inputs-input" placeholder="输入您当前高血压值" @input="hypertensionInput" :value="hypertensionNumber" type="idcard" :disabled="editState"></input>
|
||||
<text class="case-inputs-tips active" v-if="hypertensionNumber > hypertensionMax">偏高</text>
|
||||
<text class="case-inputs-tips" v-if="hypertensionNumber < hypertensionMin && hypertensionNumber != ''">偏低</text>
|
||||
</view>
|
||||
<view class="case-inputs">
|
||||
<label class="case-input-label">
|
||||
当前高血糖
|
||||
<text>({{sexName == 'man' ? '男性' : '女性'}}高血糖正常指标 {{ countMin }} ~ {{ countMax }})</text>
|
||||
<text>({{sexName == 'man' ? '男性' : '女性'}}高血糖正常指标 {{ hyperglycemiaMin }} ~ {{ hyperglycemiaMax }})</text>
|
||||
</label>
|
||||
<input class="case-inputs-input" placeholder="输入您当前高血糖值" @input="numberInput" :value="countNumber" type="idcard" :disabled="editState"></input>
|
||||
<text class="case-inputs-tips active" v-if="countNumber > countMax">偏高</text>
|
||||
<text class="case-inputs-tips" v-if="countNumber < countMin && countNumber != ''">偏低</text>
|
||||
<input class="case-inputs-input" placeholder="输入您当前高血糖值" @input="hyperglycemiaInput" :value="hyperglycemiaNumber" type="idcard" :disabled="editState"></input>
|
||||
<text class="case-inputs-tips active" v-if="hyperglycemiaNumber > hyperglycemiaMax">偏高</text>
|
||||
<text class="case-inputs-tips" v-if="hyperglycemiaNumber < hyperglycemiaMin && hyperglycemiaNumber != ''">偏低</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="issue-block">
|
||||
<label class="issueNew-title">诊断证明</label>
|
||||
<label class="issueNew-title">上传诊断证明</label>
|
||||
<!-- hyperlipemia;hypertension;hyperglycemia -->
|
||||
<view class="flexrow">
|
||||
<view class="issueNew-photo">
|
||||
<view class="issueNew-content" v-if="editState">
|
||||
<image class="issueNew-icon" @click="openImg(seeData.cover)" :src="seeData.cover" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="issueNew-content" @click="updImg('license')" v-else>
|
||||
<image class="issueNew-icon" :src="license.showpath || '/static/imgs/cover_img.png'" mode="aspectFill"></image>
|
||||
<view class="issueNew-text">请上传诊断证明</view>
|
||||
<view class="issueNew-content" @click="updImg('hyperlipemia')" v-else>
|
||||
<image class="issueNew-icon" :src="hyperlipemia.showpath || '/static/imgs/cover_img.png'" mode="aspectFill"></image>
|
||||
<view class="issueNew-text">高血脂诊断证明</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="issueNew-photo">
|
||||
<view class="issueNew-content" v-if="editState">
|
||||
<image class="issueNew-icon" @click="openImg(seeData.cover)" :src="seeData.cover" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="issueNew-content" @click="updImg('license')" v-else>
|
||||
<image class="issueNew-icon" :src="license.showpath || '/static/imgs/cover_img.png'" mode="aspectFill"></image>
|
||||
<view class="issueNew-text">请上传诊断证明</view>
|
||||
<view class="issueNew-content" @click="updImg('hypertension')" v-else>
|
||||
<image class="issueNew-icon" :src="hypertension.showpath || '/static/imgs/cover_img.png'" mode="aspectFill"></image>
|
||||
<view class="issueNew-text">高血压诊断证明</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="issueNew-photo">
|
||||
<view class="issueNew-content" v-if="editState">
|
||||
<image class="issueNew-icon" @click="openImg(seeData.cover)" :src="seeData.cover" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="issueNew-content" @click="updImg('license')" v-else>
|
||||
<image class="issueNew-icon" :src="license.showpath || '/static/imgs/cover_img.png'" mode="aspectFill"></image>
|
||||
<view class="issueNew-text">请上传诊断证明</view>
|
||||
<view class="issueNew-content" @click="updImg('hyperglycemia')" v-else>
|
||||
<image class="issueNew-icon" :src="hyperglycemia.showpath || '/static/imgs/cover_img.png'" mode="aspectFill"></image>
|
||||
<view class="issueNew-text">高血糖诊断证明</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -121,9 +122,15 @@
|
||||
editState: false, //是否可以编辑表单
|
||||
numberVal: '',
|
||||
count : '',
|
||||
countMax : '',
|
||||
countMin : '',
|
||||
countNumber:'',
|
||||
hyperlipemiaMax : '',
|
||||
hyperlipemiaMin : '',
|
||||
hyperlipemiaNumber:'',
|
||||
hypertensionMax : '',
|
||||
hypertensionMin : '',
|
||||
hypertensionNumber:'',
|
||||
hyperglycemiaMax : '',
|
||||
hyperglycemiaMin : '',
|
||||
hyperglycemiaNumber:'',
|
||||
seeData : {
|
||||
name : '',
|
||||
id_card : '',
|
||||
@@ -135,9 +142,17 @@
|
||||
}, //查看我的病例内容
|
||||
sexIndex : 0,
|
||||
sexName : 'man',
|
||||
license : {
|
||||
hyperlipemia : {
|
||||
showpath: '',
|
||||
path : ''
|
||||
},
|
||||
hypertension:{
|
||||
showpath: '',
|
||||
path : ''
|
||||
},
|
||||
hyperglycemia:{
|
||||
showpath: '',
|
||||
path : ''
|
||||
},
|
||||
sexArray : [{
|
||||
val : 'man',
|
||||
@@ -149,20 +164,23 @@
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
// 病例前置信息
|
||||
goutCreate().then(res => {
|
||||
// 健康前置信息
|
||||
goutCreate().then(res => {
|
||||
this.count = res.count
|
||||
this.countMax = parseInt(res.count.man.max)
|
||||
this.countMin = parseInt(res.count.man.min)
|
||||
this.seeData.username = res.user.username
|
||||
this.hyperlipemiaMax = Number(res.count.man.hyperlipidemia.max)
|
||||
this.hyperlipemiaMin = Number(res.count.man.hyperlipidemia.min)
|
||||
this.hypertensionMax = Number(res.count.man.hypertension.max)
|
||||
this.hypertensionMin = Number(res.count.man.hypertension.min)
|
||||
this.hyperglycemiaMax = Number(res.count.man.hyperglycemia.max)
|
||||
this.hyperglycemiaMin = Number(res.count.man.hyperglycemia.min)
|
||||
this.seeData.username = res.user.username
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
|
||||
if(this.$Route.query.hasCase == true) {
|
||||
})
|
||||
if(this.$Route.query.hasCase === 'true') {
|
||||
this.editState = true
|
||||
// 获取查看病例
|
||||
this.goutSeeInfo();
|
||||
@@ -171,7 +189,7 @@
|
||||
methods: {
|
||||
// 查看病例
|
||||
goutSeeInfo() {
|
||||
goutSee().then(res => {
|
||||
goutSee().then(res => {
|
||||
this.seeData.name = res.case.name
|
||||
this.seeData.username = res.case.user.username
|
||||
this.seeData.sex = res.case.sex
|
||||
@@ -192,9 +210,20 @@
|
||||
bindSexChange(e) {
|
||||
this.sexIndex = parseInt(e.detail.value)
|
||||
this.sexName = this.sexArray[e.detail.value].val
|
||||
if(this.sexArray[e.detail.value].val == 'woman') {
|
||||
this.countMax = parseInt(this.count.woman.max)
|
||||
this.countMin = parseInt(this.count.woman.min)
|
||||
if(this.sexArray[e.detail.value].val == 'woman') {
|
||||
this.hyperlipemiaMax = parseInt(this.count.woman.hyperlipidemia.max)
|
||||
this.hyperlipemiaMin = parseInt(this.count.woman.hyperlipidemia.min)
|
||||
this.hypertensionMax = parseInt(this.count.woman.hypertension.max)
|
||||
this.hypertensionMin = parseInt(this.count.woman.hypertension.min)
|
||||
this.hyperglycemiaMax = parseInt(this.count.woman.hyperglycemia.max)
|
||||
this.hyperglycemiaMin = parseInt(this.count.woman.hyperglycemia.min)
|
||||
}else {
|
||||
this.hyperlipemiaMax = parseInt(this.count.man.hyperlipidemia.max)
|
||||
this.hyperlipemiaMin = parseInt(this.count.man.hyperlipidemia.min)
|
||||
this.hypertensionMax = parseInt(this.count.man.hypertension.max)
|
||||
this.hypertensionMin = parseInt(this.count.man.hypertension.min)
|
||||
this.hyperglycemiaMax = parseInt(this.count.man.hyperglycemia.max)
|
||||
this.hyperglycemiaMin = parseInt(this.count.man.hyperglycemia.min)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -220,25 +249,39 @@
|
||||
})
|
||||
},
|
||||
|
||||
// 尿酸值
|
||||
numberInput(e) {
|
||||
this.countNumber = e.detail.value
|
||||
},
|
||||
// 高血脂
|
||||
hyperlipemiaInput(e) {
|
||||
this.hyperlipemiaNumber = e.detail.value
|
||||
},
|
||||
// 高血压
|
||||
hypertensionInput(e) {
|
||||
this.hypertensionNumber = e.detail.value
|
||||
},
|
||||
// 高血糖
|
||||
hyperglycemiaInput(e) {
|
||||
this.hyperglycemiaNumber = e.detail.value
|
||||
},
|
||||
|
||||
|
||||
// 提交表单
|
||||
issueForm(e) {
|
||||
let value = e.detail.value,
|
||||
newCover = this.license.path,
|
||||
newSex = this.sexArray[this.sexIndex].val
|
||||
goutAdd({
|
||||
name : value.name,
|
||||
age : value.age,
|
||||
mobileNo: value.mobileNo,
|
||||
number : this.countNumber,
|
||||
remark : value.remark,
|
||||
cover : newCover,
|
||||
sex : newSex
|
||||
}).then(res => {
|
||||
|
||||
// 提交表单 hyperlipemia;hypertension;hyperglycemia
|
||||
issueForm(e) {
|
||||
let value = e.detail.value;
|
||||
|
||||
let data = {
|
||||
name : value.name,
|
||||
age : value.age,
|
||||
mobileNo: value.mobileNo,
|
||||
remark : value.remark,
|
||||
sex : this.sexArray[this.sexIndex].val,
|
||||
hyperlipidemia : this.hyperlipemiaNumber,
|
||||
hypertension : this.hypertensionNumber,
|
||||
hyperglycemia : this.hyperglycemiaNumber,
|
||||
hyperlipidemia_cover : this.hyperlipemia.path,
|
||||
hypertension_cover : this.hypertension.path,
|
||||
hyperglycemia_cover : this.hyperglycemia.path,
|
||||
}
|
||||
goutAdd(data).then(res => {
|
||||
this.disabled = true
|
||||
this.$Router.replace({name: "User"})
|
||||
}).catch(err => {
|
||||
@@ -346,12 +389,11 @@
|
||||
text-align: center;
|
||||
color: #999;
|
||||
font-size: 28rpx;
|
||||
background-color: pink;
|
||||
.issueNew-content{
|
||||
.issueNew-content{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 25rpx;
|
||||
left: 25rpx;
|
||||
right: 15rpx;
|
||||
left: 15rpx;
|
||||
bottom: 10rpx;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
@@ -400,7 +442,7 @@
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
|
||||
// 用户信息
|
||||
userInfo() {
|
||||
userIndex().then(res => {
|
||||
userIndex().then(res => {
|
||||
this.userData = res
|
||||
this.avatar = res.avatar
|
||||
this.nickName = res.nickname
|
||||
|
||||
Reference in New Issue
Block a user