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