Commit 05a3f373 authored by LiXuyang's avatar LiXuyang

数据质量规则-导出

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