fix(#581): 请修复 Bug #581:[一般] 【住院医生站-临床医嘱-手术】手术申请单缺失多项核心业务字段与强拦截逻辑,导致医疗安全制度无法落地且阻断手术室排班闭环
根因: - Bug #请修复 Bug #581 存在的问题 修复: - 问题 1 — 缺失 `state` 变量定义(运行时崩溃)** - `defineExpose({ state, submit, ... })` 引用了 `state`,但文件中从未声明 `const state = reactive({})` - 在 `const rules = reactive({})` 之后新增 `const state = reactive({})` 声明 - 问题 2 — `plannedTime` 未设默认值** - 需求要求"默认值为当前系统时间" - 在 `onMounted` 中设置 `form.plannedTime` 为当前时间的 `YYYY-MM-DD HH:mm` 格式 - ### 验证结果 - Lint 通过 ✅ - Vite 生产构建成功 ✅(无错误)
This commit is contained in:
@@ -477,6 +477,7 @@ const form = reactive({
|
||||
otherDiagnosisList: [], //其他断目录
|
||||
});
|
||||
const rules = reactive({});
|
||||
const state = reactive({});
|
||||
// 字典选项
|
||||
const surgeryLevelOptions = ref([]);
|
||||
const anesthesiaTypeOptions = ref([]);
|
||||
@@ -489,6 +490,14 @@ const doctorOptions = ref([]);
|
||||
onBeforeMount(() => {});
|
||||
onMounted(() => {
|
||||
getList();
|
||||
// 默认预定手术时间为当前时间
|
||||
const now = new Date();
|
||||
const year = now.getFullYear();
|
||||
const month = String(now.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(now.getDate()).padStart(2, '0');
|
||||
const hours = String(now.getHours()).padStart(2, '0');
|
||||
const minutes = String(now.getMinutes()).padStart(2, '0');
|
||||
form.plannedTime = `${year}-${month}-${day} ${hours}:${minutes}`;
|
||||
loadDictOptions();
|
||||
loadDoctorOptions();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user