From 969eac21df2bd32f2dd091a73d0395e9a39ee99b Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 17 Feb 2026 10:18:12 +0800 Subject: [PATCH] =?UTF-8?q?fix(mes-dv):=20=E4=BF=AE=E5=A4=8D=20MachineryTy?= =?UTF-8?q?peForm=20=E7=9A=84=20TypeScript=20linter=20=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除 formData 声明中多余的 `as unknown as number/string` 类型断言, 与 WorkstationForm 等其他表单组件保持一致的写法。 Co-Authored-By: Claude Opus 4.6 --- src/views/mes/dv/machinery/type/MachineryTypeForm.vue | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/views/mes/dv/machinery/type/MachineryTypeForm.vue b/src/views/mes/dv/machinery/type/MachineryTypeForm.vue index 8a02d7e18..6aa2dabc2 100644 --- a/src/views/mes/dv/machinery/type/MachineryTypeForm.vue +++ b/src/views/mes/dv/machinery/type/MachineryTypeForm.vue @@ -65,13 +65,13 @@ const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ - id: undefined as unknown as number, - parentId: undefined as unknown as number, - code: undefined as unknown as string, - name: undefined as unknown as string, + id: undefined, + parentId: undefined, + code: undefined, + name: undefined, sort: 0, status: CommonStatusEnum.ENABLE, - remark: undefined as unknown as string + remark: undefined }) const formRules = reactive({ parentId: [{ required: true, message: '上级类型不能为空', trigger: 'blur' }], @@ -132,7 +132,6 @@ const submitForm = async () => { /** 重置表单 */ const resetForm = () => { - // TODO @AI:linter formData.value = { id: undefined, parentId: undefined,