From 81702e466fb584075b91468c603f5d81f11f1d27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=8C=E6=B5=B7?= <14166000+zhangtonghai@user.noreply.gitee.com> Date: Thu, 26 Sep 2024 11:51:50 +0800 Subject: [PATCH] =?UTF-8?q?=E8=88=AA=E7=BA=BF=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/baseinfo/infoclient/columns.tsx | 2 +- .../baseinfo/lanes/TenantAuditStepModal.vue | 59 ++++++++++--------- 2 files changed, 31 insertions(+), 30 deletions(-) diff --git a/src/views/baseinfo/infoclient/columns.tsx b/src/views/baseinfo/infoclient/columns.tsx index f5191110..0b8de01c 100644 --- a/src/views/baseinfo/infoclient/columns.tsx +++ b/src/views/baseinfo/infoclient/columns.tsx @@ -417,7 +417,7 @@ export const searchFormSchema: FormSchema[] = [ label: '客户属性', field: 'clientTag', component: 'ApiSelect', - colProps: { span: 4 }, + colProps: { span: 8 }, componentProps: () => { return { api: () => { diff --git a/src/views/baseinfo/lanes/TenantAuditStepModal.vue b/src/views/baseinfo/lanes/TenantAuditStepModal.vue index cd39d532..4f624d8b 100644 --- a/src/views/baseinfo/lanes/TenantAuditStepModal.vue +++ b/src/views/baseinfo/lanes/TenantAuditStepModal.vue @@ -51,40 +51,41 @@ const loading = ref(false) const rowId = ref('') const { createMessage } = useMessage() - const [registerForm, { resetFields, setFieldsValue, validate, updateSchema, getFieldsValue }] = useForm({ - labelWidth: 100, - schemas: formSchema, - showActionButtonGroup: false, - }) - const [registerModal, { setModalProps, closeModal, updateFormField }] = useModalInner(async (data) => { - resetFields() - setModalProps({ confirmLoading: false, loading: true }) - updateFormField(updateSchema) - isUpdate.value = !!data?.isUpdate - if (unref(isUpdate)) { - // setModalProps({ confirmLoading: true }); - rowId.value = data.record.id - const res: API.DataResult = await ApiInfo({ id: unref(rowId) }) - // getFieldList() - if (res.succeeded) { - setFieldsValue({ - ...res.data - }) - // console.log('返回数据Form', getFieldsValue()); - // setFieldsValue({ trainId: unref(res.data.trainId) }); + const [registerForm, { resetFields, setFieldsValue, validate, updateSchema, getFieldsValue }] = + useForm({ + labelWidth: 100, + schemas: formSchema, + showActionButtonGroup: false, + }) + const [registerModal, { setModalProps, closeModal, updateFormField }] = useModalInner( + async (data) => { + resetFields() + setModalProps({ confirmLoading: false, loading: true }) + updateFormField(updateSchema) + isUpdate.value = !!data?.isUpdate + if (unref(isUpdate)) { + // setModalProps({ confirmLoading: true }); + rowId.value = data.record.id + const res: API.DataResult = await ApiInfo({ id: unref(rowId) }) + // getFieldList() + if (res.succeeded) { + setFieldsValue({ + ...res.data, + }) + // console.log('返回数据Form', getFieldsValue()); + // setFieldsValue({ trainId: unref(res.data.trainId) }); + } + // setModalProps({ confirmLoading: false }); + } else { + setFieldsValue({ permissionIdentity: unref(2) }) } - // setModalProps({ confirmLoading: false }); - } else { - setFieldsValue({ permissionIdentity: unref(2) }) - } - setModalProps({ loading: false }) - }) + 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 })