Commit 05a3f373 authored by LiXuyang's avatar LiXuyang

数据质量规则-导出

parent 4e756298
<template>
<BasicModal
min-height="100"
width="30%"
width="40%"
v-bind="$attrs"
@register="registerModal"
:title="getTitle"
......@@ -11,17 +11,14 @@
<template #fileMethods="{ model, field }">
<div style="display: flex">
<div>
<a-button
style="border: 1px solid #158eff;
border-radius: 5px;
margin-left: 5px;"
>下载模板</a-button>
<a-button
style="border: 1px solid #158eff;
border-radius: 5px;
margin-left: 5px;" >选择</a-button>
<a-button style="border: 1px solid #158eff; border-radius: 5px; margin-left: 5px"
>下载模板</a-button
>
<a-button style="border: 1px solid #158eff; border-radius: 5px; margin-left: 5px"
>选择</a-button
>
</div>
<div style="width: 200px; margin-top: -6px; margin-left: 5px"
<div style="width: 200px; margin-top: 5px; margin-left: 5px"
>数据质量只能导入单个zip文件</div
>
</div>
......@@ -30,25 +27,25 @@
</BasicModal>
</template>
<script lang="ts" setup>
import { Radio, RadioGroup } from 'ant-design-vue';
import { ref, computed, unref, reactive } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form';
// import { formSchema } from './gradingResults.data';
import Icon from '@/components/Icon/Icon.vue';
import { useMessage } from '@/hooks/web/useMessage';
import { importSchema } from '@/views/dataQuality/dataSheet/rule/rule.data.ts';
import { Radio, RadioGroup } from 'ant-design-vue';
import { ref, computed, unref, reactive } from 'vue';
import { BasicModal, useModalInner } from '@/components/Modal';
import { BasicForm, useForm } from '@/components/Form';
// import { formSchema } from './gradingResults.data';
import Icon from '@/components/Icon/Icon.vue';
import { useMessage } from '@/hooks/web/useMessage';
import { importSchema } from '@/views/dataQuality/dataSheet/rule/rule.data.ts';
defineOptions({ name: 'ImportModal' });
defineOptions({ name: 'ImportModal' });
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
const isUpdate = ref(true);
const rowId = ref('');
const value = ref<string>('1');
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({
const emit = defineEmits(['success', 'register']);
const { createMessage } = useMessage();
const isUpdate = ref(true);
const rowId = ref('');
const value = ref<string>('1');
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] = useForm({
labelWidth: 100,
baseColProps: { lg: 24, md: 24 },
schemas: importSchema,
......@@ -56,9 +53,9 @@ const [registerForm, { setFieldsValue, updateSchema, resetFields, validate }] =
actionColOptions: {
span: 26,
},
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
});
//初始化弹框
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields();
setModalProps({ confirmLoading: false });
......@@ -69,11 +66,11 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
...data.record,
});
}
});
});
const getTitle = computed(() => '导入文件选择');
const getTitle = computed(() => '导入文件选择');
async function handleSubmit() {
async function handleSubmit() {
try {
const values = await validate();
setModalProps({ confirmLoading: true });
......@@ -83,14 +80,14 @@ async function handleSubmit() {
} finally {
setModalProps({ confirmLoading: false });
}
}
}
</script>
<style lang="scss" scoped>
.modalBody {
.modalBody {
display: flex;
align-items: center;
.title {
padding-right: 15px;
}
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment