Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bigDataSystem
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
bigDataSystem
Commits
05a3f373
Commit
05a3f373
authored
Nov 14, 2024
by
LiXuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据质量规则-导出
parent
4e756298
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
66 deletions
+63
-66
rulesExport.vue
src/views/dataQuality/dataSheet/rule/rulesExport.vue
+63
-66
No files found.
src/views/dataQuality/dataSheet/rule/rulesExport.vue
View file @
05a3f373
<
template
>
<BasicModal
min-height=
"100"
width=
"
3
0%"
width=
"
4
0%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
...
...
@@ -11,18 +11,15 @@
<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:
-6
px; margin-left: 5px"
>
数据质量只能导入单个zip文件
</div
<div
style=
"width: 200px; margin-top:
5
px; margin-left: 5px"
>
数据质量只能导入单个zip文件
</div
>
</div>
</
template
>
...
...
@@ -30,67 +27,67 @@
</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
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
24
,
md
:
24
},
schemas
:
importSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
26
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
setModalProps
({
confirmLoading
:
false
});
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
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
26
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
setModalProps
({
confirmLoading
:
false
});
if
(
unref
(
isUpdate
))
{
// 通过id获取行详情信息
// 塞值
setFieldsValue
({
...
data
.
record
,
});
}
});
if
(
unref
(
isUpdate
))
{
// 通过id获取行详情信息
// 塞值
setFieldsValue
({
...
data
.
record
,
});
}
});
const
getTitle
=
computed
(()
=>
'导入文件选择'
);
const
getTitle
=
computed
(()
=>
'导入文件选择'
);
async
function
handleSubmit
()
{
try
{
const
values
=
await
validate
();
setModalProps
({
confirmLoading
:
true
});
// TODO custom api
closeModal
();
emit
(
'success'
,
{
isUpdate
:
unref
(
isUpdate
),
values
:
{
...
values
,
id
:
rowId
.
value
}
});
}
finally
{
setModalProps
({
confirmLoading
:
false
});
async
function
handleSubmit
()
{
try
{
const
values
=
await
validate
();
setModalProps
({
confirmLoading
:
true
});
// TODO custom api
closeModal
();
emit
(
'success'
,
{
isUpdate
:
unref
(
isUpdate
),
values
:
{
...
values
,
id
:
rowId
.
value
}
});
}
finally
{
setModalProps
({
confirmLoading
:
false
});
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.modalBody
{
display
:
flex
;
align-items
:
center
;
.title
{
padding-right
:
15px
;
.modalBody
{
display
:
flex
;
align-items
:
center
;
.title
{
padding-right
:
15px
;
}
}
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment