|
|
|
@ -10,6 +10,8 @@ |
|
|
|
|
import {BasicForm, useForm} from '/@/components/Form/index'; |
|
|
|
|
import {formSchema} from '../ProjectFile4ZhengWen.data'; |
|
|
|
|
import {saveOrUpdate} from '../ProjectFile4ZhengWen.api'; |
|
|
|
|
import {useRoute} from "vue-router"; |
|
|
|
|
const route = useRoute(); |
|
|
|
|
// Emits声明 |
|
|
|
|
const emit = defineEmits(['register','success']); |
|
|
|
|
const isUpdate = ref(true); |
|
|
|
@ -43,6 +45,9 @@ |
|
|
|
|
async function handleSubmit(v) { |
|
|
|
|
try { |
|
|
|
|
let values = await validate(); |
|
|
|
|
//设置项目id |
|
|
|
|
values.porjectId = route.query.id |
|
|
|
|
values.fileFlag = 'zhengwen' |
|
|
|
|
setModalProps({confirmLoading: true}); |
|
|
|
|
//提交表单 |
|
|
|
|
await saveOrUpdate(values, isUpdate.value); |
|
|
|
|