diff --git a/.vscode/settings.json b/.vscode/settings.json index c9a7707..337eb5e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,16 +1,26 @@ { "cSpell.words": [ + "CZYSDC", + "datetime", "dcloudio", + "DDJZ", "easyinput", + "FBSJ", "FILESYSTEMS", "idcard", + "JBXX", "localdata", + "LYFS", "NIHSS", "nvue", "plusempty", + "SFXHCZ", + "SFYNCZ", "splashscreen", + "TZCZYS", "uniui", "uview", - "vueuse" + "vueuse", + "ZHZC" ] } diff --git a/components/CodeFormItem/CodeFormItem.vue b/components/CodeFormItem/CodeFormItem.vue new file mode 100644 index 0000000..cc24cd0 --- /dev/null +++ b/components/CodeFormItem/CodeFormItem.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/components/DetailBase/DetailBase.vue b/components/DetailBase/DetailBase.vue index a318733..b07b354 100644 --- a/components/DetailBase/DetailBase.vue +++ b/components/DetailBase/DetailBase.vue @@ -1,7 +1,7 @@ @@ -64,6 +38,7 @@ import { reactive, ref } from 'vue'; import { useUserStore } from '@/store/modules/user' import { GENDER_LIST, FIRST_AID_ZL_TYPE } from '@/config/service' import { computed } from 'vue'; +import { CODE_DICT } from '@/config/code'; const baseInfo = reactive({ patientName: '张三', @@ -72,6 +47,18 @@ const baseInfo = reactive({ patientIdCardNo: '142222188901120112', firstAidZlType: 0 }) + +const codeForm = reactive({ + 'JBXX-SFXHCZ': '已知', + 'JBXX-FBSJ': '', + 'JBXX-ZHZC-TIME': '', + 'JBXX-SFYNCZ': '是', + 'JBXX-DDJZ-TIME': '', + 'JBXX-TZCZYS-TIME': '', + 'JBXX-CZYSDC-TIME': '', + 'JBXX-LYFS': '' +}) + const nationList = ref([]) const userStore = useUserStore() @@ -137,6 +124,18 @@ function upload(tempPath: string) { }); } +// code form item change +function onChange(code: string, value: string) { + codeForm[code] = value +} + +// 计算code form 前置条件的显示 +function computeShow(code: string) { + const { showType } = CODE_DICT[code] + if (!showType) return true + return (showType.type === 'value' && codeForm[showType.code] === showType.value) +} + // 查民族列表 async function getNationList() { try { diff --git a/config/code.ts b/config/code.ts new file mode 100644 index 0000000..0c7d4f6 --- /dev/null +++ b/config/code.ts @@ -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: '', + }, +}