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
738be5b3
Commit
738be5b3
authored
Dec 09, 2024
by
LiXuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据表-改
parent
5c8fe63a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
97 additions
and
57 deletions
+97
-57
index.ts
src/router/routes/index.ts
+1
-1
index.vue
src/views/dataQuality/dataSheet/rule/index.vue
+10
-7
rule.data.ts
src/views/dataQuality/dataSheet/rule/rule.data.ts
+10
-12
ruleEditModel.vue
src/views/dataQuality/dataSheet/rule/ruleEditModel.vue
+75
-36
index.vue
...s/dataStandards/labelDropInspection/labelReport/index.vue
+1
-1
No files found.
src/router/routes/index.ts
View file @
738be5b3
...
@@ -787,7 +787,7 @@ export const QualityRuleRoute: AppRouteRecordRaw = {
...
@@ -787,7 +787,7 @@ export const QualityRuleRoute: AppRouteRecordRaw = {
name
:
'rule'
,
name
:
'rule'
,
component
:
()
=>
import
(
'@/views/dataQuality/dataSheet/rule/index.vue'
),
component
:
()
=>
import
(
'@/views/dataQuality/dataSheet/rule/index.vue'
),
meta
:
{
meta
:
{
title
:
'质量规则
批量创建
'
,
title
:
'质量规则'
,
icon
:
''
,
icon
:
''
,
},
},
},
},
...
...
src/views/dataQuality/dataSheet/rule/index.vue
View file @
738be5b3
<
template
>
<
template
>
<PageWrapper
dense
contentFullHeight
fixedHeight
contentClass=
"flex"
>
<PageWrapper
dense
contentFullHeight
fixedHeight
contentClass=
"flex"
>
<div
class=
"w-1/4 xl:w-1/5"
>
<div
class=
"w-1/4 xl:w-1/5"
style=
"padding: 0 0 0 16px"
>
<Tabs
default-active-key=
"1"
>
<Tabs
default-active-key=
"1"
>
<Tabs
.
TabPane
key=
"1"
tab=
"数据库"
>
<Tabs
.
TabPane
key=
"1"
tab=
"数据库"
>
<BasicTree
:treeData=
"treeData"
:checkable=
"true"
defaultExpandLevel=
"1"
/>
<BasicTree
:treeData=
"treeData"
:checkable=
"true"
defaultExpandLevel=
"1"
/>
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
<a-button
type=
"primary"
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
>
导出
</a-button>
<a-button
type=
"primary"
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
>
导出
</a-button>
<a-button
type=
"primary"
@
click=
"handleAdd"
>
新建规则
</a-button>
<a-button
type=
"primary"
@
click=
"handleAdd"
>
新建规则
</a-button>
<a-button
type=
"primary"
@
click=
"handleMoreAdd"
>
批量新建规则
</a-button>
<a-button
type=
"primary"
@
click=
"handleMoreAdd"
>
批量新建规则
</a-button>
<a-button
type=
"primary"
>
新建质量任务
</a-button>
<a-button
type=
"primary"
@
click=
"handleAddQuality"
>
新建质量任务
</a-button>
</
template
>
</
template
>
<
template
#
bodyCell=
"{ column, record }"
>
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.key === 'action'"
>
<template
v-if=
"column.key === 'action'"
>
...
@@ -97,7 +97,7 @@
...
@@ -97,7 +97,7 @@
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
h
,
ref
}
from
'vue'
;
import
{
h
,
ref
}
from
'vue'
;
import
{
FolderAddOutlined
,
SettingOutlined
}
from
'@ant-design/icons-vue'
;
import
{
FolderAddOutlined
,
SettingOutlined
}
from
'@ant-design/icons-vue'
;
import
ImportModal
from
"@/views/dataQuality/dataSheet/rule/rulesExport.vue"
;
import
ImportModal
from
'@/views/dataQuality/dataSheet/rule/rulesExport.vue'
;
// 模态框
// 模态框
const
isAdd
=
ref
(
true
);
const
isAdd
=
ref
(
true
);
const
{
push
}
=
useRouter
();
const
{
push
}
=
useRouter
();
...
@@ -140,7 +140,7 @@
...
@@ -140,7 +140,7 @@
];
];
// 新增
// 新增
function
handleAdd
()
{
function
handleAdd
()
{
isAdd
.
value
=
true
isAdd
.
value
=
true
;
openRuleEditModel
(
true
,
{
openRuleEditModel
(
true
,
{
isUpdate
:
false
,
isUpdate
:
false
,
});
});
...
@@ -151,6 +151,11 @@
...
@@ -151,6 +151,11 @@
path
:
'/dataQuality/ruleMoreAdd'
,
path
:
'/dataQuality/ruleMoreAdd'
,
});
});
}
}
function
handleAddQuality
()
{
push
({
path
:
'/dataQuality/dataSheet/task'
,
});
}
function
handlePlus
(
node
)
{}
function
handlePlus
(
node
)
{}
/**
/**
...
@@ -175,7 +180,7 @@
...
@@ -175,7 +180,7 @@
* 列表编辑
* 列表编辑
*/
*/
function
handleEdit
(
record
)
{
function
handleEdit
(
record
)
{
isAdd
.
value
=
false
isAdd
.
value
=
false
;
openRuleEditModel
(
true
,
{
openRuleEditModel
(
true
,
{
record
,
record
,
isUpdate
:
true
,
isUpdate
:
true
,
...
@@ -206,8 +211,6 @@
...
@@ -206,8 +211,6 @@
});
});
}
}
/** 导入按钮*/
/** 导入按钮*/
function
handleImport
()
{
function
handleImport
()
{
openImportModal
(
true
,
{});
openImportModal
(
true
,
{});
...
...
src/views/dataQuality/dataSheet/rule/rule.data.ts
View file @
738be5b3
...
@@ -129,10 +129,7 @@ export const ruleModelFormSchema: any[] = [
...
@@ -129,10 +129,7 @@ export const ruleModelFormSchema: any[] = [
field
:
'model'
,
field
:
'model'
,
label
:
'关键模板'
,
label
:
'关键模板'
,
required
:
true
,
required
:
true
,
component
:
'Select'
,
slot
:
'model'
,
componentProps
:
{
options
:
[{
label
:
'公民身份号码'
,
value
:
'公民身份号码'
}],
},
colProps
:
{
lg
:
24
,
md
:
24
},
colProps
:
{
lg
:
24
,
md
:
24
},
},
},
{
{
...
@@ -147,7 +144,6 @@ export const ruleModelFormSchema: any[] = [
...
@@ -147,7 +144,6 @@ export const ruleModelFormSchema: any[] = [
component
:
'Select'
,
component
:
'Select'
,
colProps
:
{
lg
:
24
,
md
:
24
},
colProps
:
{
lg
:
24
,
md
:
24
},
show
:
({
values
})
=>
{
show
:
({
values
})
=>
{
console
.
log
(
'values'
,
values
);
return
values
.
group
?
values
.
group
.
substring
(
0
,
2
)
===
'主体'
:
false
;
return
values
.
group
?
values
.
group
.
substring
(
0
,
2
)
===
'主体'
:
false
;
},
},
},
},
...
@@ -156,8 +152,11 @@ export const ruleModelFormSchema: any[] = [
...
@@ -156,8 +152,11 @@ export const ruleModelFormSchema: any[] = [
label
:
'SQL预览'
,
label
:
'SQL预览'
,
component
:
'InputTextArea'
,
component
:
'InputTextArea'
,
componentProps
:
{
componentProps
:
{
placeholder
:
'
请输入描述
'
,
placeholder
:
'
'
,
rows
:
4
,
rows
:
4
,
style
:
{
pointerEvents
:
'none'
,
},
},
},
colProps
:
{
lg
:
24
,
md
:
24
},
colProps
:
{
lg
:
24
,
md
:
24
},
},
},
...
@@ -206,10 +205,7 @@ export const ruleEditModelFormSchema: any[] = [
...
@@ -206,10 +205,7 @@ export const ruleEditModelFormSchema: any[] = [
field
:
'model'
,
field
:
'model'
,
label
:
'关键模板'
,
label
:
'关键模板'
,
required
:
true
,
required
:
true
,
component
:
'Select'
,
slot
:
'model'
,
componentProps
:
{
options
:
[{
label
:
'公民身份号码'
,
value
:
'公民身份号码'
}],
},
colProps
:
{
lg
:
24
,
md
:
24
},
colProps
:
{
lg
:
24
,
md
:
24
},
},
},
{
{
...
@@ -224,7 +220,6 @@ export const ruleEditModelFormSchema: any[] = [
...
@@ -224,7 +220,6 @@ export const ruleEditModelFormSchema: any[] = [
component
:
'Select'
,
component
:
'Select'
,
colProps
:
{
lg
:
24
,
md
:
24
},
colProps
:
{
lg
:
24
,
md
:
24
},
show
:
({
values
})
=>
{
show
:
({
values
})
=>
{
console
.
log
(
'values'
,
values
);
return
values
.
group
?
values
.
group
.
substring
(
0
,
2
)
===
'主体'
:
false
;
return
values
.
group
?
values
.
group
.
substring
(
0
,
2
)
===
'主体'
:
false
;
},
},
},
},
...
@@ -233,8 +228,11 @@ export const ruleEditModelFormSchema: any[] = [
...
@@ -233,8 +228,11 @@ export const ruleEditModelFormSchema: any[] = [
label
:
'SQL预览'
,
label
:
'SQL预览'
,
component
:
'InputTextArea'
,
component
:
'InputTextArea'
,
componentProps
:
{
componentProps
:
{
placeholder
:
'
请输入描述
'
,
placeholder
:
'
'
,
rows
:
4
,
rows
:
4
,
style
:
{
pointerEvents
:
'none'
,
},
},
},
colProps
:
{
lg
:
24
,
md
:
24
},
colProps
:
{
lg
:
24
,
md
:
24
},
},
},
...
...
src/views/dataQuality/dataSheet/rule/ruleEditModel.vue
View file @
738be5b3
...
@@ -68,6 +68,9 @@
...
@@ -68,6 +68,9 @@
<
template
#
dataSourceTxt=
"{ model, field }"
>
<
template
#
dataSourceTxt=
"{ model, field }"
>
{{
model
[
field
]
}}
{{
model
[
field
]
}}
</
template
>
</
template
>
<
template
#
model=
"{ field, model }"
>
<Select
v-model:value=
"model[field]"
@
change=
"changeModel"
:options=
"modelOptions"
/>
</
template
>
<
template
#
config
>
<
template
#
config
>
<div>
<div>
<BasicTable
@
register=
"configTable"
>
<BasicTable
@
register=
"configTable"
>
...
@@ -130,17 +133,19 @@
...
@@ -130,17 +133,19 @@
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
const
[
ruleGroupAddModel
,
{
openModal
:
openRuleGroupAddModel
}]
=
useModal
();
const
[
ruleGroupAddModel
,
{
openModal
:
openRuleGroupAddModel
}]
=
useModal
();
const
[
addNewVersion
,
{
openModal
:
openAddNewVersion
}]
=
useModal
();
const
[
addNewVersion
,
{
openModal
:
openAddNewVersion
}]
=
useModal
();
const
modelOptions
=
[{
label
:
'公民身份号码'
,
value
:
'公民身份号码'
}];
//初始化表单
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
resetSchema
,
resetFields
,
validate
}]
=
useForm
({
const
[
registerForm
,
{
setFieldsValue
,
getFieldsValue
,
resetSchema
,
resetFields
,
validate
}]
=
labelWidth
:
100
,
useForm
({
baseColProps
:
{
lg
:
12
,
md
:
24
},
labelWidth
:
100
,
// schemas: props.isAdd ? ruleModelFormSchema : ruleEditModelFormSchema,
baseColProps
:
{
lg
:
12
,
md
:
24
},
showActionButtonGroup
:
false
,
// schemas: props.isAdd ? ruleModelFormSchema : ruleEditModelFormSchema,
disabled
:
props
.
disabled
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
disabled
:
props
.
disabled
,
span
:
23
,
actionColOptions
:
{
},
span
:
23
,
});
},
});
//初始化弹框
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
await
resetFields
();
await
resetFields
();
...
@@ -161,32 +166,66 @@
...
@@ -161,32 +166,66 @@
await
resetSchema
([...
ruleModelFormSchema
]);
await
resetSchema
([...
ruleModelFormSchema
]);
}
}
});
});
const
[
configTable
,
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
,
getRowSelection
}]
=
// 关键模板-修改后
useTable
({
function
changeModel
()
{
title
:
''
,
// 更新表单
// 定高
reload
();
scroll
:
{
y
:
150
},
// 更新sql预览
api
:
async
(
params
)
=>
{
getSql
();
console
.
log
(
'params:'
,
params
);
}
const
response
=
{
function
getSql
()
{
pageNu
:
'1'
,
const
model
=
getFieldsValue
();
pageSize
:
'10'
,
if
(
model
.
model
)
{
pages
:
'1'
,
// 修改表单-SQL预览
total
:
configData
.
length
,
setFieldsValue
({
code
:
''
,
preview
:
message
:
''
,
'SELECT COUNT(*)
\
n'
+
data
:
configData
,
'FROM $(table a}
\
n'
+
};
'WHERE ${column a}IS NOT NULL AND ${column a}NOT IN (${range a})'
,
return
{
...
response
};
});
},
}
else
{
rowKey
:
'businessId'
,
setFieldsValue
({
columns
:
configColumn
,
preview
:
null
,
striped
:
false
,
});
showIndexColumn
:
false
,
}
showTableSetting
:
false
,
}
bordered
:
true
,
// 获取数据 判断表单
pagination
:
false
,
function
getData
()
{
});
const
model
=
getFieldsValue
();
if
(
model
.
model
)
{
return
[...
configData
];
}
else
{
return
[];
}
}
const
[
configTable
,
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
,
getRowSelection
,
setTableData
},
]
=
useTable
({
title
:
''
,
// 定高
scroll
:
{
y
:
150
},
api
:
async
(
params
)
=>
{
console
.
log
(
'params:'
,
params
);
const
response
=
{
pageNu
:
'1'
,
pageSize
:
'10'
,
pages
:
'1'
,
total
:
getData
().
length
,
code
:
''
,
message
:
''
,
data
:
getData
(),
};
return
{
...
response
};
},
rowKey
:
'businessId'
,
columns
:
configColumn
,
striped
:
false
,
showIndexColumn
:
false
,
showTableSetting
:
false
,
bordered
:
true
,
pagination
:
false
,
});
const
[
taskTable
]
=
useTable
({
const
[
taskTable
]
=
useTable
({
title
:
''
,
title
:
''
,
// 定高
// 定高
...
...
src/views/dataStandards/labelDropInspection/labelReport/index.vue
View file @
738be5b3
<
template
>
<
template
>
<PageWrapper
contentBackground
headerSticky
>
<PageWrapper
dense
contentBackground
headerSticky
>
<template
#
headerContent
>
<template
#
headerContent
>
<div
class=
"flex"
style=
"gap: 10px"
>
<div
class=
"flex"
style=
"gap: 10px"
>
<div
class=
"flex-1 flex"
style=
"gap: 10px"
>
<div
class=
"flex-1 flex"
style=
"gap: 10px"
>
...
...
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