提交 5cf77944 authored 作者: liuluyu's avatar liuluyu

更新代码格式

上级 42364432
......@@ -90,14 +90,6 @@
const planFormStore = usePlanFormStore();
const isInitialized = ref(false);
// const formData = ref({
// id: '',
// executeStatus: '',
// actualStartTime: null,
// actualEndTime: null,
// executeEcord: '',
// attachments: [],
// });
const formData = reactive({
id: '',
executeStatus: '',
......@@ -107,9 +99,9 @@
attachments: [] as any[],
});
// accept external formData prop from parent modal
const props = defineProps({
formData: {
initialData: {
// 改名:不使用 formData 作为 prop 名
type: Object,
default: () => ({}),
},
......@@ -117,7 +109,7 @@
// sync incoming prop into internal reactive formData
watch(
() => props.formData,
() => props.initialData,
(v) => {
if (v && Object.keys(v).length > 0) {
Object.assign(formData, v);
......@@ -192,11 +184,6 @@
await nextTick();
planFormStore.updateFormDataCache(newFormData);
isInitialized.value = true;
// Object.assign(formData, newFormData);
// planFormStore.updateFormDataCache(newFormData);
// isInitialized.value = true;
// console.log('[v0] 表单初始化成功,数据:', newFormData);
}
} catch (error: any) {
console.error('初始化表单数据失败:', error);
......@@ -287,7 +274,6 @@
if (response) {
// message.success('保存成功');
// 更新缓存
planFormStore.updateFormDataCache(formData);
}
......
......@@ -65,7 +65,6 @@
const loading = ref(false);
const submitting = ref(false);
const formData = ref<Record<string, any>>({});
const idsystoken = ref('');
const [registerForm, { setFieldsValue, setProps, getFieldsValue, resetFields, validate }] = useForm({
labelWidth: 150,
......
......@@ -253,12 +253,6 @@
const visible = ref(false);
const formRef = ref();
// const exeRules = ref([
// { value: 1, label: '事件触发' },
// { value: 2, label: '周期执行' },
// { value: 3, label: '一次性执行' },
// ]);
const formModel = reactive({
projectName: '',
projectType: '',
......@@ -347,7 +341,6 @@
resetForm();
closeModal();
} catch (e) {
} finally {
setModalProps({ confirmLoading: false });
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论