|
@@ -121,12 +121,9 @@ import { get } from '@/utils/request';
|
|
import { Delete, Plus } from "@element-plus/icons-vue"
|
|
import { Delete, Plus } from "@element-plus/icons-vue"
|
|
import { FormInstance } from 'element-plus';
|
|
import { FormInstance } from 'element-plus';
|
|
import { getFromValue } from '@/utils/tools';
|
|
import { getFromValue } from '@/utils/tools';
|
|
-const props = defineProps<{
|
|
|
|
- visible: boolean,
|
|
|
|
- saveLoading: saveLoadingType,
|
|
|
|
- editForm: Object
|
|
|
|
-}>()
|
|
|
|
-const emit = defineEmits(['closeModalVisible', 'submitForm'])
|
|
|
|
|
|
+import { Props, Emits, TASK_VALUE_TYPE, REPEAT_VALUE_TYPE, } from './type';
|
|
|
|
+const props = defineProps<Props>()
|
|
|
|
+const emits = defineEmits<Emits>();
|
|
watch(() => props.saveLoading, (val) => {
|
|
watch(() => props.saveLoading, (val) => {
|
|
if (val == "3") {
|
|
if (val == "3") {
|
|
formRef.value?.resetFields();
|
|
formRef.value?.resetFields();
|
|
@@ -177,7 +174,7 @@ const generateFormData = ref<any>(defaultGenerateFormData);
|
|
const modalVisible = ref(false);
|
|
const modalVisible = ref(false);
|
|
function closeVisible() {
|
|
function closeVisible() {
|
|
generateFormData.value = defaultGenerateFormData;
|
|
generateFormData.value = defaultGenerateFormData;
|
|
- emit('closeModalVisible')
|
|
|
|
|
|
+ emits('close')
|
|
}
|
|
}
|
|
function submitForm(formEl: FormInstance | undefined, isClose: boolean) {
|
|
function submitForm(formEl: FormInstance | undefined, isClose: boolean) {
|
|
if (!formEl) return
|
|
if (!formEl) return
|
|
@@ -192,8 +189,7 @@ function submitForm(formEl: FormInstance | undefined, isClose: boolean) {
|
|
repeatDesignDay,
|
|
repeatDesignDay,
|
|
...res
|
|
...res
|
|
})
|
|
})
|
|
- console.log("submitDAata", submitData);
|
|
|
|
- emit('submitForm', submitData, isClose)
|
|
|
|
|
|
+ emits('submit', submitData, isClose)
|
|
}).catch((err: any) => {
|
|
}).catch((err: any) => {
|
|
console.log(err);
|
|
console.log(err);
|
|
})
|
|
})
|