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 = [ ...@@ -10,11 +10,6 @@ const routes = [
path: 'screening/simple/form', path: 'screening/simple/form',
name: 'tumour-screening-simple-form', name: 'tumour-screening-simple-form',
component: () => import(/* webpackChunkName: "page-tumour" */ '@/tumour/screening/simple/form/Index.vue') 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 @@ ...@@ -10,6 +10,7 @@
<BaseForm ref="base" v-show="setp === 1"/> <BaseForm ref="base" v-show="setp === 1"/>
<QuestionForm ref="question" v-if="setp === 2" <QuestionForm ref="question" v-if="setp === 2"
:species="species"/> :species="species"/>
<Result v-if="setp === 3" :info="resultInfo"/>
<div class="bt-group"> <div class="bt-group">
<van-button type="primary" block v-if="setp === 1" <van-button type="primary" block v-if="setp === 1"
@click="onNext">下一步</van-button> @click="onNext">下一步</van-button>
...@@ -24,6 +25,7 @@ ...@@ -24,6 +25,7 @@
<script> <script>
import BaseForm from './base.vue' import BaseForm from './base.vue'
import QuestionForm from './Question.vue' import QuestionForm from './Question.vue'
import Result from './Result.vue'
import { showNotify } from 'vant' import { showNotify } from 'vant'
import { addSimpleScreen } from '@/tumour/api/screening.js' import { addSimpleScreen } from '@/tumour/api/screening.js'
import { fetchDataHandle } from '@/utils/common.js' import { fetchDataHandle } from '@/utils/common.js'
...@@ -31,7 +33,8 @@ import { fetchDataHandle } from '@/utils/common.js' ...@@ -31,7 +33,8 @@ import { fetchDataHandle } from '@/utils/common.js'
export default { export default {
components: { components: {
BaseForm, BaseForm,
QuestionForm QuestionForm,
Result
}, },
data() { data() {
return { return {
...@@ -39,7 +42,10 @@ export default { ...@@ -39,7 +42,10 @@ export default {
setp: 1, setp: 1,
// 步骤1中选中的癌种 // 步骤1中选中的癌种
species: [], species: [],
baseInfo: {} // 基础用户信息
baseInfo: {},
// 提交结果信息
resultInfo: {}
} }
}, },
computed: { computed: {
...@@ -83,10 +89,13 @@ export default { ...@@ -83,10 +89,13 @@ export default {
species: 'arrToStr' species: 'arrToStr'
}) })
console.log(query) console.log(query)
addSimpleScreen(query).then(() => { addSimpleScreen(query).then(res => {
this.$router.replace({ this.resultInfo = {
name: 'tumour-screening-simple-result' species: result.species,
}) details: result.details,
unitName: res.data
}
this.setp = 3
}) })
}) })
} }
......
<template> <template>
<div class="form-result"> <div class="p-4 form-result">
<div class="flex align-center justify-center" style="padding-top: 14vh;"> <div v-for="item in list" :key="item.key" class="p-3 mb-4 list-item">
<doc-icon type="doc-check-circle" class="text-16"/> <div class="mb-2">
<span class="ml-1">提交成功</span> <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>
</div> </div>
</template> </template>
<script> <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> </script>
<style lang="less" scoped> <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> </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