Commit 7dcb754e authored by songrui's avatar songrui

简易筛查结果修改

parent 71002ae8
<svg width="15" height="14" viewBox="0 0 15 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7.42523 13.6666C3.77764 13.6666 0.820869 10.682 0.820869 6.99998C0.820869 3.31798 3.77764 0.333313 7.42523 0.333313C11.0728 0.333313 14.0296 3.31798 14.0296 6.99998C14.0296 10.682 11.0728 13.6666 7.42523 13.6666ZM7.42523 12.3333C8.8265 12.3333 10.1704 11.7714 11.1612 10.7712C12.1521 9.77102 12.7087 8.41447 12.7087 6.99998C12.7087 5.58549 12.1521 4.22894 11.1612 3.22874C10.1704 2.22855 8.8265 1.66665 7.42523 1.66665C6.02396 1.66665 4.68009 2.22855 3.68924 3.22874C2.69839 4.22894 2.14174 5.58549 2.14174 6.99998C2.14174 8.41447 2.69839 9.77102 3.68924 10.7712C4.68009 11.7714 6.02396 12.3333 7.42523 12.3333ZM6.76479 3.66665H8.08567V4.99998H6.76479V3.66665ZM6.76479 6.33331H8.08567V10.3333H6.76479V6.33331Z" fill="#768092"/>
</svg>
......@@ -10,11 +10,6 @@ const routes = [
path: 'screening/simple/form',
name: 'tumour-screening-simple-form',
component: () => import(/* webpackChunkName: "page-tumour" */ '@/tumour/screening/simple/form/Index.vue')
},
{
path: 'screening/simple/result',
name: 'tumour-screening-simple-result',
component: () => import(/* webpackChunkName: "page-tumour" */ '@/tumour/screening/simple/form/Result.vue')
}
]
},
......
......@@ -10,6 +10,7 @@
<BaseForm ref="base" v-show="setp === 1"/>
<QuestionForm ref="question" v-if="setp === 2"
:species="species"/>
<Result v-if="setp === 3" :info="resultInfo"/>
<div class="bt-group">
<van-button type="primary" block v-if="setp === 1"
@click="onNext">下一步</van-button>
......@@ -24,6 +25,7 @@
<script>
import BaseForm from './base.vue'
import QuestionForm from './Question.vue'
import Result from './Result.vue'
import { showNotify } from 'vant'
import { addSimpleScreen } from '@/tumour/api/screening.js'
import { fetchDataHandle } from '@/utils/common.js'
......@@ -31,7 +33,8 @@ import { fetchDataHandle } from '@/utils/common.js'
export default {
components: {
BaseForm,
QuestionForm
QuestionForm,
Result
},
data() {
return {
......@@ -39,7 +42,10 @@ export default {
setp: 1,
// 步骤1中选中的癌种
species: [],
baseInfo: {}
// 基础用户信息
baseInfo: {},
// 提交结果信息
resultInfo: {}
}
},
computed: {
......@@ -83,10 +89,13 @@ export default {
species: 'arrToStr'
})
console.log(query)
addSimpleScreen(query).then(() => {
this.$router.replace({
name: 'tumour-screening-simple-result'
})
addSimpleScreen(query).then(res => {
this.resultInfo = {
species: result.species,
details: result.details,
unitName: res.data
}
this.setp = 3
})
})
}
......
<template>
<div class="form-result">
<div class="flex align-center justify-center" style="padding-top: 14vh;">
<doc-icon type="doc-check-circle" class="text-16"/>
<span class="ml-1">提交成功</span>
<div class="p-4 form-result">
<div v-for="item in list" :key="item.key" class="p-3 mb-4 list-item">
<div class="mb-2">
<span class="mr-2 font-semibold">{{ item.title }}</span>
<span v-if="item.status == 1" class="tag-red">高风险</span>
<span v-else class="tag-green">无高风险</span>
</div>
<div style="color: #8C8C8C;" class="mb-2">{{ item.date }}</div>
<div class="mb-2 flex items-center tip" v-if="item.status == 1">
<doc-icon type="doc-exclamation-circle" class="text-16"/>
<span class="ml-2">建议到 {{ item.unitName }} 进行检查</span>
</div>
<div style="line-height: 1.5" v-if="item.status == 1">
备注:{{ item.remark }}
</div>
</div>
</div>
</template>
<script>
export default {
import { getDictValue } from '@/tumour/utils/dictionaries.js'
import { getQuestion } from '@/tumour//screening/simple/config.js'
import dayjs from 'dayjs'
export default {
props: {
info: { default: () => ({}) }
},
data() {
return {
list: []
}
},
created() {
const { species = [], details = {}, unitName = '本单位' } = this.info
// console.log(species, details, unitName)
species.forEach(e => {
const q = getQuestion(e)
this.list.push({
key: e,
title: getDictValue('DC00032', e) + '筛查结果',
status: details[e].highRisk,
remark: q.remark,
date: dayjs().format('YYYY.MM.DD'),
unitName
})
})
}
}
</script>
<style lang="less" scoped>
.list-item {
border: 1px solid #F0F0F0;
}
.font-12 {
font-size: 12px;
}
.tip {
background-color: #F8FAFC;
color: #768092;
padding: 4px 12px;
}
.tag-red {
color: #F5222D;
background-color: #FFF1F0;
padding: 4px 6px;
border-radius: 2px;
}
.tag-green {
color: #52C41A;
background-color: #D9F7BE;
padding: 4px 6px;
border-radius: 2px;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment