fix(mes-dv): 修复 MachineryTypeForm 的 TypeScript linter 警告

移除 formData 声明中多余的 `as unknown as number/string` 类型断言,
与 WorkstationForm 等其他表单组件保持一致的写法。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
pull/871/MERGE
YunaiV 2026-02-17 10:18:12 +08:00
parent c6ab40e175
commit 969eac21df
1 changed files with 5 additions and 6 deletions

View File

@ -65,13 +65,13 @@ const dialogTitle = ref('') // 弹窗的标题
const formLoading = ref(false) // 12 const formLoading = ref(false) // 12
const formType = ref('') // create - update - const formType = ref('') // create - update -
const formData = ref({ const formData = ref({
id: undefined as unknown as number, id: undefined,
parentId: undefined as unknown as number, parentId: undefined,
code: undefined as unknown as string, code: undefined,
name: undefined as unknown as string, name: undefined,
sort: 0, sort: 0,
status: CommonStatusEnum.ENABLE, status: CommonStatusEnum.ENABLE,
remark: undefined as unknown as string remark: undefined
}) })
const formRules = reactive({ const formRules = reactive({
parentId: [{ required: true, message: '上级类型不能为空', trigger: 'blur' }], parentId: [{ required: true, message: '上级类型不能为空', trigger: 'blur' }],
@ -132,7 +132,6 @@ const submitForm = async () => {
/** 重置表单 */ /** 重置表单 */
const resetForm = () => { const resetForm = () => {
// TODO @AIlinter
formData.value = { formData.value = {
id: undefined, id: undefined,
parentId: undefined, parentId: undefined,