generated from ccsens_fe/uni-vue3-template
4 changed files with 154 additions and 33 deletions
@ -1,16 +1,26 @@ |
|||||
{ |
{ |
||||
"cSpell.words": [ |
"cSpell.words": [ |
||||
|
"CZYSDC", |
||||
|
"datetime", |
||||
"dcloudio", |
"dcloudio", |
||||
|
"DDJZ", |
||||
"easyinput", |
"easyinput", |
||||
|
"FBSJ", |
||||
"FILESYSTEMS", |
"FILESYSTEMS", |
||||
"idcard", |
"idcard", |
||||
|
"JBXX", |
||||
"localdata", |
"localdata", |
||||
|
"LYFS", |
||||
"NIHSS", |
"NIHSS", |
||||
"nvue", |
"nvue", |
||||
"plusempty", |
"plusempty", |
||||
|
"SFXHCZ", |
||||
|
"SFYNCZ", |
||||
"splashscreen", |
"splashscreen", |
||||
|
"TZCZYS", |
||||
"uniui", |
"uniui", |
||||
"uview", |
"uview", |
||||
"vueuse" |
"vueuse", |
||||
|
"ZHZC" |
||||
] |
] |
||||
} |
} |
||||
|
|||||
@ -0,0 +1,38 @@ |
|||||
|
<template> |
||||
|
<view> |
||||
|
<uni-easyinput :value="value" type="text" placeholder="请输入" @input="$emit('on-change', $event)" v-if="config.type === 'input'" /> |
||||
|
|
||||
|
<uni-datetime-picker type="datetime" :value="value" @change="$emit('on-change', $event)" v-else-if="config.type === 'datetime'" /> |
||||
|
|
||||
|
<uni-data-checkbox :value="value" :localdata="config.range" @change="$emit('on-change', $event.detail.value)" /> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { CODE_DICT } from '@/config/code' |
||||
|
import { computed } from 'vue' |
||||
|
|
||||
|
interface IConfig { |
||||
|
text: string |
||||
|
type: string |
||||
|
default: string |
||||
|
range?: { value: string, text: string }[] |
||||
|
showType?: { |
||||
|
type: string |
||||
|
code: string |
||||
|
value: string |
||||
|
} |
||||
|
} |
||||
|
interface IProps { |
||||
|
code: string |
||||
|
value: string |
||||
|
} |
||||
|
|
||||
|
const props = defineProps<IProps>() |
||||
|
defineEmits(['on-change']) |
||||
|
|
||||
|
const config = computed<IConfig>(() => CODE_DICT[props.code]) |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
</style> |
||||
@ -0,0 +1,74 @@ |
|||||
|
export const CODE_DICT = { |
||||
|
'JBXX-SFXHCZ': { |
||||
|
// 是否醒后卒中
|
||||
|
text: '发病时间', |
||||
|
type: 'radio', |
||||
|
default: '已知', |
||||
|
range: [ |
||||
|
{ value: '已知', text: '已知' }, |
||||
|
{ value: '未知', text: '未知' }, |
||||
|
{ value: '醒后卒中', text: '醒后卒中' }, |
||||
|
], |
||||
|
}, |
||||
|
'JBXX-FBSJ': { |
||||
|
text: '发病时间', |
||||
|
type: 'datetime', |
||||
|
default: '', |
||||
|
valueType: 'string', |
||||
|
showType: { |
||||
|
type: 'value', |
||||
|
code: 'JBXX-SFXHCZ', |
||||
|
value: '已知', |
||||
|
}, |
||||
|
}, |
||||
|
'JBXX-ZHZC-TIME': { |
||||
|
text: '最后正常时间', |
||||
|
type: 'datetime', |
||||
|
default: '', |
||||
|
valueType: 'string', |
||||
|
showType: { |
||||
|
type: 'value', |
||||
|
code: 'JBXX-SFXHCZ', |
||||
|
value: '醒后卒中', |
||||
|
}, |
||||
|
}, |
||||
|
'JBXX-SFYNCZ': { |
||||
|
text: '是否院内卒中', |
||||
|
type: 'radio', |
||||
|
range: [ |
||||
|
{ value: '是', text: '是' }, |
||||
|
{ value: '否', text: '否' }, |
||||
|
], |
||||
|
default: '是', |
||||
|
}, |
||||
|
'JBXX-DDJZ-TIME': { |
||||
|
text: '到达急诊时间', |
||||
|
type: 'datetime', |
||||
|
default: '', |
||||
|
valueType: 'string', |
||||
|
}, |
||||
|
'JBXX-TZCZYS-TIME': { |
||||
|
text: '通知卒中医生时间', |
||||
|
type: 'datetime', |
||||
|
default: '', |
||||
|
valueType: 'string', |
||||
|
}, |
||||
|
'JBXX-CZYSDC-TIME': { |
||||
|
text: '卒中到场时间', |
||||
|
type: 'datetime', |
||||
|
default: '', |
||||
|
valueType: 'string', |
||||
|
}, |
||||
|
'JBXX-LYFS': { |
||||
|
text: '来院方式', |
||||
|
type: 'select', |
||||
|
range: [ |
||||
|
{ value: '120', text: '120' }, |
||||
|
{ value: '自行住院', text: '自行住院' }, |
||||
|
{ value: '院内住院患者', text: '院内住院患者' }, |
||||
|
{ value: '院内公共区域患者', text: '院内公共区域患者' }, |
||||
|
{ value: '医疗机构转入', text: '医疗机构转入' }, |
||||
|
], |
||||
|
default: '', |
||||
|
}, |
||||
|
} |
||||
Loading…
Reference in new issue