修改
This commit is contained in:
parent
2857b778a7
commit
97f089ac75
99
questionnaire/History/History.vue
Normal file
99
questionnaire/History/History.vue
Normal file
@ -0,0 +1,99 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<view class="" v-if="list&&list.length>0">
|
||||
<view class="list" v-for="aitem in list">
|
||||
<view class="item" v-for="item in aitem.records" @tap='goHistoryQuestionnaire(item)'>
|
||||
<view class="title">
|
||||
{{item.surveySubject==1001?'高血压评估问卷':item.surveySubject==1002?'糖尿病评估问卷':item.surveySubject==1003?
|
||||
'脑卒中评估问卷':item.surveySubject==1004?'慢阻肺评估问卷':item.surveySubject==1005?'慢病评估问卷':item.surveySubject==1006?'糖尿病肾病评估问卷':item.surveySubject==1007?
|
||||
'糖尿病眼病评估问卷':item.surveySubject==1008?'糖尿病足病评估问卷':''}}
|
||||
</view>
|
||||
<view class="time">
|
||||
{{item.date+' '}}{{item.time}}
|
||||
</view>
|
||||
<view class="text">
|
||||
{{item.evaluateResult}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else style="margin-top: 200rpx;">
|
||||
<u-empty mode="data" icon-size='220' text='暂无历史记录'></u-empty>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
timeline
|
||||
} from '@/api/questionnaire/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: null,
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.info();
|
||||
},
|
||||
methods: {
|
||||
goHistoryQuestionnaire(item) {
|
||||
uni.navigateTo({
|
||||
url: `/questionnaire/HistoryQuestionnaire/HistoryQuestionnaire?item=${JSON.stringify(item)}`
|
||||
})
|
||||
},
|
||||
info() {
|
||||
timeline(uni.getStorageSync('patientId')).then(res => {
|
||||
this.list = res.data
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.app {
|
||||
margin-top: 20rpx;
|
||||
|
||||
.list {
|
||||
.item {
|
||||
margin: 20rpx auto;
|
||||
width: 96%;
|
||||
background-color: #fff;
|
||||
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||
border-radius: 5rpx;
|
||||
padding: 0 0 40rpx;
|
||||
position: relative;
|
||||
|
||||
.time {
|
||||
position: absolute;
|
||||
right: 20rpx;
|
||||
top: 35rpx;
|
||||
transform: translateY(-50%);
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
color: #646464;
|
||||
}
|
||||
|
||||
.text {
|
||||
margin: 20rpx auto;
|
||||
width: 96%;
|
||||
font-size: 30rpx;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
line-height: 38rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
margin: 0 auto;
|
||||
width: 96%;
|
||||
font-size: 25rpx;
|
||||
border-bottom: 2rpx solid #E6E6E6;
|
||||
font-weight: 400;
|
||||
color: #646464;
|
||||
line-height: 70rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
106
questionnaire/HistoryQuestionnaire/HistoryQuestionnaire.vue
Normal file
106
questionnaire/HistoryQuestionnaire/HistoryQuestionnaire.vue
Normal file
@ -0,0 +1,106 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<view class="item" v-for="(item,index) in infoslist" :key="index">
|
||||
<view class="title">
|
||||
{{Number(index)+1}}、{{item.questionName}}
|
||||
</view>
|
||||
<view class="text">
|
||||
{{item.optionContent}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
answer,
|
||||
} from '@/api/questionnaire/index.js'
|
||||
import {
|
||||
surveylist
|
||||
} from '@/api/pagesC/healthtest/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
infoslist: null,
|
||||
item: null,
|
||||
query: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
infos() {
|
||||
surveylist(this.query).then(res => {
|
||||
res.rows.forEach(e => {
|
||||
if (e.surveySubject == this.item.surveySubject) {
|
||||
e.questions.forEach(el => el.optionContent = '')
|
||||
this.infoslist = e.questions
|
||||
this.info(this.item.recordId)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
info(id) {
|
||||
answer(id).then(res => {
|
||||
res.data.forEach(e => {
|
||||
this.infoslist.forEach(el => {
|
||||
el.optionContent = e.optionContent
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
onLoad(options) {
|
||||
this.infos()
|
||||
this.item = JSON.parse(options.item)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.app {
|
||||
width: 96%;
|
||||
margin: 16rpx auto;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||
border-radius: 5rpx;
|
||||
padding-bottom: 200rpx;
|
||||
|
||||
.btns {
|
||||
width: 90%;
|
||||
margin: 100rpx auto;
|
||||
background-color: #26A888;
|
||||
text-align: center;
|
||||
line-height: 60rpx;
|
||||
height: 60rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.item {
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
padding: 30rpx 0;
|
||||
|
||||
::v-deep .u-radio {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
padding: 40rpx 0 20rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
::v-deep .uni-picker-container {
|
||||
width: 100%;
|
||||
height: 63rpx;
|
||||
background: #A7A7A7;
|
||||
line-height: 63rpx;
|
||||
opacity: 0.1;
|
||||
border-radius: 5rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user