航线 调整

szh-new
张同海 2 months ago
parent 217d5ded31
commit 81702e466f

@ -417,7 +417,7 @@ export const searchFormSchema: FormSchema[] = [
label: '客户属性', label: '客户属性',
field: 'clientTag', field: 'clientTag',
component: 'ApiSelect', component: 'ApiSelect',
colProps: { span: 4 }, colProps: { span: 8 },
componentProps: () => { componentProps: () => {
return { return {
api: () => { api: () => {

@ -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 })

Loading…
Cancel
Save