|
|
|
@ -51,12 +51,14 @@
|
|
|
|
|
const loading = ref(false)
|
|
|
|
|
const rowId = ref('')
|
|
|
|
|
const { createMessage } = useMessage()
|
|
|
|
|
const [registerForm, { resetFields, setFieldsValue, validate, updateSchema, getFieldsValue }] = useForm({
|
|
|
|
|
const [registerForm, { resetFields, setFieldsValue, validate, updateSchema, getFieldsValue }] =
|
|
|
|
|
useForm({
|
|
|
|
|
labelWidth: 100,
|
|
|
|
|
schemas: formSchema,
|
|
|
|
|
showActionButtonGroup: false,
|
|
|
|
|
})
|
|
|
|
|
const [registerModal, { setModalProps, closeModal, updateFormField }] = useModalInner(async (data) => {
|
|
|
|
|
const [registerModal, { setModalProps, closeModal, updateFormField }] = useModalInner(
|
|
|
|
|
async (data) => {
|
|
|
|
|
resetFields()
|
|
|
|
|
setModalProps({ confirmLoading: false, loading: true })
|
|
|
|
|
updateFormField(updateSchema)
|
|
|
|
@ -68,7 +70,7 @@
|
|
|
|
|
// getFieldList()
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
setFieldsValue({
|
|
|
|
|
...res.data
|
|
|
|
|
...res.data,
|
|
|
|
|
})
|
|
|
|
|
// console.log('返回数据Form', getFieldsValue());
|
|
|
|
|
// setFieldsValue({ trainId: unref(res.data.trainId) });
|
|
|
|
@ -78,13 +80,12 @@
|
|
|
|
|
setFieldsValue({ permissionIdentity: unref(2) })
|
|
|
|
|
}
|
|
|
|
|
setModalProps({ loading: false })
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
const getTitle = computed(() => (!unref(isUpdate) ? '新增航线信息' : '编辑航线信息'))
|
|
|
|
|
|
|
|
|
|
async function handleSave(exit) {
|
|
|
|
|
console.log(getFieldsValue())
|
|
|
|
|
return
|
|
|
|
|
try {
|
|
|
|
|
const values = await validate()
|
|
|
|
|
setModalProps({ confirmLoading: true, loading: true })
|
|
|
|
|