提交 c44fc776 authored 作者: leon's avatar leon

fix 经销商管理label宽度。图片字段将数组改为字符串

上级 862ee661
<template> <template>
<BasicDrawer v-bind="$attrs" @register="registerDrawer" showFooter :confirmDisabled="getConfirmDisabled" :title="getTitle" width="600px" @ok="handleSubmit"> <BasicDrawer
v-bind="$attrs"
@register="registerDrawer"
showFooter
:confirmDisabled="getConfirmDisabled"
:title="getTitle"
width="600px"
@ok="handleSubmit"
>
<a-spin :spinning="isLoading"> <a-spin :spinning="isLoading">
<BasicForm @register="registerForm" /> <BasicForm @register="registerForm" />
</a-spin> </a-spin>
...@@ -19,7 +27,7 @@ ...@@ -19,7 +27,7 @@
const entityId = ref(0); const entityId = ref(0);
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({ const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
labelWidth: 120, labelWidth: 130,
schemas: formSchema, schemas: formSchema,
showActionButtonGroup: false, showActionButtonGroup: false,
}); });
...@@ -52,6 +60,7 @@ ...@@ -52,6 +60,7 @@
const formData: any = { const formData: any = {
...detail.value, ...detail.value,
}; };
formData.licensePic = formData.licensePic?.split(',');
await setFieldsValue(formData); await setFieldsValue(formData);
} }
} }
...@@ -71,15 +80,15 @@ ...@@ -71,15 +80,15 @@
try { try {
const values = await validate(); const values = await validate();
setDrawerProps({ confirmLoading: true }); setDrawerProps({ confirmLoading: true });
const { const { ...rest } = values;
...rest rest.licensePic = rest.licensePic?.join(',');
} = values;
const action = !unref(isUpdate) ? DistributorApi.add : DistributorApi.update; const action = !unref(isUpdate) ? DistributorApi.add : DistributorApi.update;
const data = !unref(isUpdate) const data = !unref(isUpdate)
? { ? {
...rest, ...rest,
} }
: Object.assign({}, : Object.assign(
{},
{ {
...rest, ...rest,
id: unref(entityId), id: unref(entityId),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论