feat: 导入调整
This commit is contained in:
@@ -150,13 +150,13 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
auth: ['license:customer:export'],
|
||||
onClick: onExport,
|
||||
},
|
||||
{
|
||||
label: $t('ui.actionTitle.import', [$t('customer.customer')]),
|
||||
type: 'primary',
|
||||
icon: ACTION_ICON.UPLOAD,
|
||||
auth: ['license:customer:import'],
|
||||
onClick: handleImport,
|
||||
},
|
||||
// {
|
||||
// label: $t('ui.actionTitle.import', [$t('customer.customer')]),
|
||||
// type: 'primary',
|
||||
// icon: ACTION_ICON.UPLOAD,
|
||||
// auth: ['license:customer:import'],
|
||||
// onClick: handleImport,
|
||||
// },
|
||||
]"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -96,7 +96,7 @@ const columns = [
|
||||
color: 'red',
|
||||
},
|
||||
},
|
||||
` → ${data.value.new}`,
|
||||
` ${data.value.new ? '→' : ''} ${data.value.new}`,
|
||||
);
|
||||
return h('div', {}, [data.value.old, after]);
|
||||
}
|
||||
@@ -210,7 +210,9 @@ const handleUpload = async (record: any) => {
|
||||
</template>
|
||||
<template
|
||||
v-else-if="
|
||||
props.formData?.status === 3 && props.formData?.showUpload
|
||||
props.formData?.status === 3 &&
|
||||
props.formData?.showUpload &&
|
||||
false
|
||||
"
|
||||
>
|
||||
<div
|
||||
|
||||
@@ -97,6 +97,9 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
},
|
||||
dependencies: {
|
||||
trigger(values, form) {
|
||||
if (values.id) {
|
||||
return;
|
||||
}
|
||||
const projectCode = projectList.value.find((project) => {
|
||||
return project.id === values.projectId;
|
||||
})?.code;
|
||||
@@ -109,7 +112,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
);
|
||||
},
|
||||
// 只有指定的字段改变时,才会触发
|
||||
triggerFields: ['customerId', 'projectId'],
|
||||
triggerFields: ['customerId', 'projectId', 'id'],
|
||||
},
|
||||
rules: z.string().refine(
|
||||
async (value: string) => {
|
||||
|
||||
@@ -171,13 +171,13 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
auth: ['license:project:export'],
|
||||
onClick: onExport,
|
||||
},
|
||||
{
|
||||
label: $t('ui.actionTitle.import', [$t('project.project')]),
|
||||
type: 'primary',
|
||||
icon: ACTION_ICON.UPLOAD,
|
||||
auth: ['license:project:import'],
|
||||
onClick: handleImport,
|
||||
},
|
||||
// {
|
||||
// label: $t('ui.actionTitle.import', [$t('project.project')]),
|
||||
// type: 'primary',
|
||||
// icon: ACTION_ICON.UPLOAD,
|
||||
// auth: ['license:project:import'],
|
||||
// onClick: handleImport,
|
||||
// },
|
||||
]"
|
||||
/>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user