fix: bug#10994

This commit is contained in:
xieyonghong 2023-03-25 22:26:49 +08:00
parent 9fb9571699
commit 1455fe8141
1 changed files with 14 additions and 3 deletions

View File

@ -6,12 +6,12 @@
title="导入"
okText="确定"
cancelText="取消"
@ok="handleCancel"
@ok="handleOk"
@cancel="handleCancel"
>
<div style="margin-top: 10px">
<j-form :layout="'vertical'">
<j-form-item label="平台对接" required>
<j-form :layout="'vertical'" :model="modelRef" ref="formRef" :rules="rules">
<j-form-item label="平台对接" required name="configId">
<j-select
showSearch
v-model:value="modelRef.configId"
@ -92,6 +92,7 @@ const configList = ref<Record<string, any>[]>([]);
const loading = ref<boolean>(false);
const totalCount = ref<number>(0);
const errCount = ref<number>(0);
const formRef = ref(null)
const modelRef = reactive({
configId: undefined,
@ -99,6 +100,10 @@ const modelRef = reactive({
fileType: 'xlsx',
});
const rules = {
configId: [{ required: true, message: '请选择平台对接'}]
}
const getConfig = async () => {
const resp: any = await queryPlatformNoPage({
paging: false,
@ -162,6 +167,12 @@ const handleCancel = () => {
emit('close', true);
};
const handleOk = () => {
formRef.value.validate().then(res => {
handleCancel()
})
}
getConfig();
</script>