|  |  | 
 |  |  | import { useToast } from "wot-design-uni"; | 
 |  |  |  | 
 |  |  | const emits = defineEmits(["refresh"]); | 
 |  |  | const paramsId = ref(); | 
 |  |  | const toast = useToast(); | 
 |  |  | const { form: model } = useFormData({ | 
 |  |  |   diskMaterial: undefined, // 盘具类型 | 
 |  |  | 
 |  |  | }); | 
 |  |  |  | 
 |  |  | const submit = async () => { | 
 |  |  |   const { code } = await TwistApi.addStrandedWireDish([model]); | 
 |  |  |   const { code } = await TwistApi.addStrandedWireDish([ | 
 |  |  |     { | 
 |  |  |       wireId: paramsId.value, | 
 |  |  |       ...model, | 
 |  |  |     }, | 
 |  |  |   ]); | 
 |  |  |   if (code == 200) { | 
 |  |  |     toast.success("新增成功"); | 
 |  |  |     emits("refresh"); | 
 |  |  | 
 |  |  |   } | 
 |  |  | }; | 
 |  |  |  | 
 |  |  | onLoad((options: any) => { | 
 |  |  |   paramsId.value = options.id; | 
 |  |  | }); | 
 |  |  |  | 
 |  |  | defineExpose({ | 
 |  |  |   submit, | 
 |  |  | }); | 
 
 |  |  | 
 |  |  | import { useToast } from "wot-design-uni"; | 
 |  |  |  | 
 |  |  | const emits = defineEmits(["refresh"]); | 
 |  |  | const paramsId = ref(); | 
 |  |  | const toast = useToast(); | 
 |  |  | const { form: model } = useFormData({ | 
 |  |  |   model: undefined, // 规格型号 | 
 |  |  | 
 |  |  | }); | 
 |  |  |  | 
 |  |  | const submit = async () => { | 
 |  |  |   const { code } = await TwistApi.addStrandedWireDish([model]); | 
 |  |  |   const { code } = await TwistApi.addStrandedWireDish([ | 
 |  |  |     { | 
 |  |  |       wireId: paramsId.value, | 
 |  |  |       ...model, | 
 |  |  |     }, | 
 |  |  |   ]); | 
 |  |  |   if (code == 200) { | 
 |  |  |     toast.success("新增成功"); | 
 |  |  |     emits("refresh"); | 
 |  |  | 
 |  |  |   } | 
 |  |  | }; | 
 |  |  |  | 
 |  |  | onLoad((options: any) => { | 
 |  |  |   paramsId.value = options.id; | 
 |  |  | }); | 
 |  |  |  | 
 |  |  | defineExpose({ | 
 |  |  |   submit, | 
 |  |  | }); |