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
168f18c4
Commit
168f18c4
authored
Nov 15, 2024
by
罗林杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改元数据,质量白名单
parent
675ce2bd
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1520 additions
and
10 deletions
+1520
-10
FileTree.vue
...iews/dataQuality/agentClass/qualityWhitelist/FileTree.vue
+101
-0
createFile.vue
...ws/dataQuality/agentClass/qualityWhitelist/createFile.vue
+95
-0
createWhiteModal.vue
...aQuality/agentClass/qualityWhitelist/createWhiteModal.vue
+86
-0
data.ts
src/views/dataQuality/agentClass/qualityWhitelist/data.ts
+265
-0
dataQualityWhiteData.ts
...ality/agentClass/qualityWhitelist/dataQualityWhiteData.ts
+612
-0
index.vue
src/views/dataQuality/agentClass/qualityWhitelist/index.vue
+185
-8
moveFile.vue
...iews/dataQuality/agentClass/qualityWhitelist/moveFile.vue
+103
-0
treeTwo.vue
...views/dataQuality/agentClass/qualityWhitelist/treeTwo.vue
+60
-0
index.vue
src/views/metadata/metadataComparison/index.vue
+13
-2
No files found.
src/views/dataQuality/agentClass/qualityWhitelist/FileTree.vue
0 → 100644
View file @
168f18c4
<
template
>
<div
class=
"m-4 mr-0 overflow-hidden bg-white"
>
<BasicTree
title=
"质量主体"
ref=
"treeRef"
toolbar
search
treeWrapperClassName=
"h-[calc(100%-35px)] overflow-auto"
:clickRowToExpand=
"false"
:defaultExpandAll=
"true"
:treeData=
"treeData"
:fieldNames=
"
{ key: 'businessId', title: 'fileName' }"
@select="handleSelect"
:actionList="actionList"
/>
</div>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
h
,
nextTick
,
onMounted
,
ref
,
unref
}
from
'vue'
;
import
{
BasicTree
,
TreeActionType
,
TreeItem
}
from
'@/components/Tree'
;
import
{
Nullable
}
from
'@vben/types'
;
import
{
TreeData
}
from
'@/views/dataQuality/agentClass/mainBody/dataQualityMainBodyData'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
ReloadOutlined
}
from
'@ant-design/icons-vue'
;
defineOptions
({
name
:
'DeptTree'
});
const
{
createMessage
}
=
useMessage
();
const
emit
=
defineEmits
([
'select'
]);
const
treeData
=
ref
<
TreeItem
[]
>
([]);
const
treeRef
=
ref
<
Nullable
<
TreeActionType
>>
(
null
);
function
getTree
()
{
const
tree
=
unref
(
treeRef
);
if
(
!
tree
)
{
throw
new
Error
(
'tree is null!'
);
}
return
tree
;
}
async
function
fetch
()
{
const
data
=
TreeData
;
treeData
.
value
=
handleTree
(
data
,
'businessId'
,
undefined
,
undefined
,
undefined
);
await
nextTick
(()
=>
{
getTree
().
expandAll
(
true
);
});
}
function
handleTree
(
data
,
id
,
parentId
,
children
,
rootId
)
{
id
=
id
||
'id'
;
parentId
=
parentId
||
'parentId'
;
children
=
children
||
'children'
;
rootId
=
rootId
||
Math
.
min
.
apply
(
Math
,
data
.
map
((
item
)
=>
{
return
item
[
parentId
];
}),
)
||
0
;
// 对源数据深度克隆
const
cloneData
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
// 循环所有项
const
treeData
=
cloneData
.
filter
((
father
)
=>
{
const
branchArr
=
cloneData
.
filter
((
child
)
=>
{
// 返回每一项的子级数组
return
father
[
id
]
===
child
[
parentId
];
});
branchArr
.
length
>
0
?
(
father
.
children
=
branchArr
)
:
''
;
// 返回第一层
return
father
[
parentId
]
===
rootId
;
});
return
treeData
!==
''
?
treeData
:
data
;
}
function
handleSelect
(
keys
)
{
emit
(
'select'
,
keys
[
0
]);
}
onMounted
(()
=>
{
fetch
();
});
// 树的操作列表
const
actionList
=
[
{
render
:
()
=>
{
return
h
(
ReloadOutlined
,
{
class
:
'ml-2'
,
onClick
:
()
=>
{
refresh
();
},
});
},
},
];
function
refresh
()
{
createMessage
.
success
(
'刷新成功'
);
}
</
script
>
src/views/dataQuality/agentClass/qualityWhitelist/createFile.vue
0 → 100644
View file @
168f18c4
<
template
>
<BasicModal
width=
"30%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
/>
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
createFileFormSchema
}
from
'./data'
;
import
{
TreeData
}
from
'./dataQualityWhiteData'
;
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
isUpdate
=
ref
(
true
);
const
isMove
=
ref
(
false
);
const
rowId
=
ref
(
''
);
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
createFileFormSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
resetFields
();
setModalProps
({
confirmLoading
:
false
});
const
formData
=
{
taskId
:
'100'
,
};
// 塞值
setFieldsValue
({
...
formData
,
});
const
treeList
=
handleTree
(
TreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
);
updateSchema
([
{
field
:
'taskId'
,
componentProps
:
{
treeData
:
treeList
,
},
},
]);
});
const
getTitle
=
computed
(()
=>
'新建文件夹'
);
/**确定按钮*/
async
function
handleSubmit
()
{
closeModal
();
}
/**数组对象转成树*/
function
handleTree
(
data
,
id
,
parentId
,
children
,
rootId
)
{
id
=
id
||
'id'
;
parentId
=
parentId
||
'parentId'
;
children
=
children
||
'children'
;
rootId
=
rootId
||
Math
.
min
.
apply
(
Math
,
data
.
map
((
item
)
=>
{
return
item
[
parentId
];
}),
)
||
0
;
// 对源数据深度克隆
const
cloneData
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
// 循环所有项
const
treeData
=
cloneData
.
filter
((
father
)
=>
{
const
branchArr
=
cloneData
.
filter
((
child
)
=>
{
// 返回每一项的子级数组
return
father
[
id
]
===
child
[
parentId
];
});
branchArr
.
length
>
0
?
(
father
.
children
=
branchArr
)
:
''
;
// 返回第一层
return
father
[
parentId
]
===
rootId
;
});
return
treeData
!==
''
?
treeData
:
data
;
}
</
script
>
src/views/dataQuality/agentClass/qualityWhitelist/createWhiteModal.vue
0 → 100644
View file @
168f18c4
<
template
>
<BasicModal
width=
"40%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"title"
@
ok=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
/>
<div
class=
"modalRow"
>
<div>
可见范围
</div>
<div
class=
"right"
>
<div
class=
"clearAll"
>
清空
</div>
<div>
<a-button
type=
"primary"
>
添加工作组
</a-button>
</div>
</div>
</div>
<div
class=
"addDialogBG"
>
<div
style=
"float: right"
>
<Icon
icon=
"ant-design:delete-outlined"
:size=
"25"
:color=
"'#ED6F6F'"
/>
</div>
<TreeTwo
class=
"w-1/4 xl:w-1/5"
/>
</div>
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
ref
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
formSchemaMain
}
from
'./data'
;
import
TreeTwo
from
'./treeTwo.vue'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
Icon
from
'@/components/Icon/Icon.vue'
;
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
isUpdate
=
ref
(
true
);
const
title
=
ref
(
''
);
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
resetFields
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
24
,
md
:
24
},
schemas
:
formSchemaMain
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
]
=
useModalInner
(
async
(
data
)
=>
{
await
resetFields
();
title
.
value
=
data
.
title
;
});
async
function
handleSubmit
()
{
createMessage
.
success
(
'提交成功'
);
}
</
script
>
<
style
lang=
"scss"
scoped
>
.modalRow
{
padding
:
0
20px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
.clearAll
{
padding-right
:
10px
;
font-size
:
16px
;
}
.right
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
}
.addDialogBG
{
margin
:
10px
;
border-radius
:
10px
;
padding
:
20px
;
background-color
:
#e8ecf7
;
width
:
98%
;
height
:
400px
;
}
</
style
>
src/views/dataQuality/agentClass/qualityWhitelist/data.ts
0 → 100644
View file @
168f18c4
import
{
BasicColumn
,
FormSchema
}
from
'@/components/Table'
;
export
const
columns
:
BasicColumn
[]
=
[
{
title
:
'文件名称'
,
dataIndex
:
'fileName'
,
width
:
150
,
slots
:
{
customRender
:
'fileName'
},
},
{
title
:
'创建时间'
,
dataIndex
:
'createDate'
,
width
:
150
,
},
{
title
:
'更新时间'
,
dataIndex
:
'updateDate'
,
width
:
150
,
},
{
title
:
'拥有者'
,
dataIndex
:
'holder'
,
width
:
150
,
},
{
title
:
'权属工作组'
,
dataIndex
:
'workGroupName'
,
width
:
150
,
},
];
export
const
searchFormSchema
:
FormSchema
[]
=
[
{
field
:
'name'
,
label
:
'名称'
,
component
:
'Input'
,
componentProps
:
{
placeholder
:
'请输入名称'
,
},
colProps
:
{
span
:
7
},
},
];
export
const
accountFormSchema
:
any
[]
=
[
{
field
:
'fileName'
,
label
:
'文件名称'
,
component
:
'Input'
,
colProps
:
{
lg
:
24
,
md
:
24
},
componentProps
:
{
disabled
:
true
,
},
},
{
field
:
'location'
,
label
:
'保存位置'
,
component
:
'Input'
,
colProps
:
{
lg
:
24
,
md
:
24
},
componentProps
:
{
disabled
:
true
,
},
},
{
field
:
'createDate'
,
label
:
'创建时间'
,
component
:
'Input'
,
colProps
:
{
lg
:
24
,
md
:
24
},
componentProps
:
{
disabled
:
true
,
},
},
{
field
:
'updateDate'
,
label
:
'最近修改'
,
component
:
'Input'
,
colProps
:
{
lg
:
24
,
md
:
24
},
componentProps
:
{
disabled
:
true
,
},
},
];
/**移动*/
export
const
MoveFormSchema
:
any
[]
=
[
{
field
:
'taskId'
,
label
:
'路径'
,
component
:
'TreeSelect'
,
colProps
:
{
lg
:
24
,
md
:
24
},
componentProps
:
{
fieldNames
:
{
label
:
'fileName'
,
value
:
'businessId'
,
},
getPopupContainer
:
()
=>
document
.
body
,
},
required
:
true
,
},
];
export
const
resetNameFormSchema
:
FormSchema
[]
=
[
{
field
:
'fileName'
,
label
:
'文件名称'
,
component
:
'Input'
,
rules
:
[
{
required
:
true
,
message
:
'请输入文件名称'
,
},
],
componentProps
:
{
placeholder
:
'请输入文件名称'
,
},
colProps
:
{
span
:
8
},
},
];
export
const
createFileFormSchema
:
FormSchema
[]
=
[
{
field
:
'taskId'
,
label
:
'路径'
,
component
:
'TreeSelect'
,
colProps
:
{
lg
:
24
,
md
:
24
},
componentProps
:
{
fieldNames
:
{
label
:
'fileName'
,
value
:
'businessId'
,
},
getPopupContainer
:
()
=>
document
.
body
,
},
required
:
true
,
},
{
field
:
'fileName'
,
label
:
'文件名称'
,
component
:
'Input'
,
colProps
:
{
lg
:
24
,
md
:
24
},
rules
:
[
{
required
:
true
,
message
:
'请输入文件名称'
,
},
],
componentProps
:
{
placeholder
:
'请输入文件名称'
,
},
},
];
export
const
createTaskFormSchema
:
FormSchema
[]
=
[
{
field
:
'taskId'
,
label
:
'路径'
,
component
:
'TreeSelect'
,
colProps
:
{
lg
:
24
,
md
:
24
},
componentProps
:
{
fieldNames
:
{
label
:
'fileName'
,
value
:
'businessId'
,
},
getPopupContainer
:
()
=>
document
.
body
,
},
required
:
true
,
},
{
field
:
'name'
,
label
:
'质量主体名称'
,
component
:
'Input'
,
rules
:
[
{
required
:
true
,
message
:
'请输入质量主体名称'
,
},
],
componentProps
:
{
placeholder
:
'请输入质量主体名称'
,
},
colProps
:
{
lg
:
24
,
md
:
24
},
},
{
field
:
'fileType'
,
label
:
'文件类型'
,
component
:
'Input'
,
defaultValue
:
'质量主体'
,
componentProps
:
{
readonly
:
true
,
style
:
{
border
:
'none'
,
backgroundColor
:
'transparent'
,
},
},
colProps
:
{
lg
:
24
,
md
:
24
},
},
];
export
const
formSchemaMain
:
any
=
[
{
field
:
'path'
,
label
:
'路径'
,
component
:
'TreeSelect'
,
rules
:
[
{
required
:
true
,
message
:
'请选择上级菜单'
,
},
],
componentProps
:
{
fieldNames
:
{
label
:
'label'
,
value
:
'businessId'
,
},
getPopupContainer
:
()
=>
document
.
body
,
},
},
{
field
:
'name'
,
label
:
'主体名称'
,
component
:
'Input'
,
colProps
:
{
span
:
8
},
componentProps
:
{
placeholder
:
'输入主体名称'
,
},
},
{
field
:
'des'
,
label
:
'描述'
,
component
:
'Input'
,
colProps
:
{
span
:
8
},
componentProps
:
{
placeholder
:
'输入描述'
,
},
},
{
field
:
'fileType'
,
label
:
'文件类型'
,
component
:
'Input'
,
defaultValue
:
'质量白名单'
,
colProps
:
{
span
:
8
},
componentProps
:
{
readOnly
:
true
,
disabled
:
true
,
placeholder
:
'输入描述'
,
},
},
{
field
:
'menuModal'
,
label
:
'目录权属模式'
,
component
:
'Input'
,
defaultValue
:
'资源自定义'
,
colProps
:
{
span
:
8
},
componentProps
:
{
readOnly
:
true
,
disabled
:
true
,
placeholder
:
'输入描述'
,
},
},
{
field
:
'group'
,
label
:
'权属工作组'
,
component
:
'Select'
,
defaultValue
:
'默认工作组'
,
colProps
:
{
span
:
8
},
componentProps
:
{
placeholder
:
'输入描述'
,
options
:
[{
label
:
'默认工作组'
,
value
:
'默认工作组'
}],
},
},
];
src/views/dataQuality/agentClass/qualityWhitelist/dataQualityWhiteData.ts
0 → 100644
View file @
168f18c4
This diff is collapsed.
Click to expand it.
src/views/dataQuality/agentClass/qualityWhitelist/index.vue
View file @
168f18c4
<
template
>
<PageWrapper
dense
contentFullHeight
fixedHeight
contentClass=
"flex"
>
<DeptTree
class=
"w-1/4 xl:w-1/5"
@
select=
"handleSelect"
/>
<BasicTable
@
register=
"registerTable"
class=
"w-3/4 xl:w-4/5"
:searchInfo=
"searchInfo"
>
<template
#
toolbar
>
<a-button
type=
"primary"
@
click=
"handleMove"
>
移动
</a-button>
<a-button
type=
"primary"
@
click=
"deleteButton"
>
删除
</a-button>
<a-button
type=
"primary"
@
click=
"createFileButton"
>
新建文件夹
</a-button>
<a-button
type=
"primary"
@
click=
"createWhite"
>
新建白名单
</a-button>
</
template
>
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.key === 'action'"
>
<TableAction
:actions=
"[
{
label: '编辑',
onClick: handleEdit.bind(null, record),
},
{
color: 'error',
label: '删除',
popConfirm: {
title: '是否确认删除',
placement: 'left',
confirm: handleDelete.bind(null, record),
},
},
]"
/>
</
template
>
</template>
</BasicTable>
<MoveFile
@
register=
"registerMoveFile"
/>
<CreateFile
@
register=
"registerCreateFileModal"
/>
<CreateWhite
@
register=
"registerCreateWhiteFile"
/>
</PageWrapper>
</template>
<
script
lang=
"ts"
setup
>
import
{
reactive
,
onMounted
,
ref
}
from
'vue'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
DeptTree
from
'./FileTree.vue'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
columns
,
searchFormSchema
}
from
'./data'
;
import
{
useRoute
,
onBeforeRouteLeave
}
from
'vue-router'
;
import
{
useFilterStore
}
from
'@/store/modules/filterData'
;
import
{
TreeData
}
from
'./dataQualityWhiteData'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
MoveFile
from
'./moveFile.vue'
;
import
CreateFile
from
'./createFile.vue'
;
import
CreateWhite
from
'./createWhiteModal.vue'
;
<
script
>
export
default
{
name
:
"index"
}
</
script
>
defineOptions
({
name
:
'AccountManagement'
});
const
{
createMessage
,
createConfirm
}
=
useMessage
();
const
filterStore
=
useFilterStore
();
const
route
=
useRoute
();
const
searchInfo
=
reactive
<
Recordable
>
({});
const
tableData
=
ref
([]);
const
[
registerMoveFile
,
{
openModal
:
openMoveFileModal
}]
=
useModal
();
const
[
registerCreateWhiteFile
,
{
openModal
:
openCreateWhiteModal
}]
=
useModal
();
const
[
registerCreateFileModal
,
{
openModal
:
openCreateFileModal
}]
=
useModal
();
// 新建文件夹弹窗
const
[
registerTable
,
{
reload
,
getSearchInfo
,
getForm
}]
=
useTable
({
api
:
async
(
params
)
=>
{
//过滤掉tableData.value中,businessId等于100的
var
data
=
[];
if
(
params
.
taskId
==
undefined
||
params
.
taskId
==
''
)
{
data
=
tableData
.
value
.
filter
((
item
)
=>
item
.
businessId
>=
200
);
}
else
if
(
params
.
taskId
>=
200
)
{
data
=
tableData
.
value
.
filter
((
item
)
=>
item
.
businessId
==
params
.
taskId
);
}
else
{
data
=
tableData
.
value
.
filter
((
item
)
=>
item
.
parentId
==
params
.
taskId
);
}
const
response
=
{
pageNu
:
'1'
,
pageSize
:
'10'
,
pages
:
'1'
,
total
:
data
.
length
,
code
:
''
,
message
:
''
,
data
:
[],
};
//过滤data中的数据,取出等于params.deptId的数据
return
{
...
response
,
data
:
data
};
},
rowKey
:
'businessId'
,
columns
,
rowSelection
:
true
,
formConfig
:
{
labelWidth
:
120
,
schemas
:
searchFormSchema
,
autoSubmitOnEnter
:
true
,
resetFunc
:
()
=>
{
searchInfo
.
taskId
=
''
;
},
},
useSearchForm
:
true
,
showTableSetting
:
false
,
showIndexColumn
:
false
,
bordered
:
true
,
handleSearchInfoFn
(
info
)
{
return
info
;
},
actionColumn
:
{
width
:
120
,
title
:
'操作'
,
dataIndex
:
'action'
,
},
});
/**删除按钮*/
function
deleteButton
()
{
createConfirm
({
iconType
:
'warning'
,
title
:
'确认删除'
,
content
:
'确认批量删除选中数据吗?'
,
onOk
()
{
createMessage
.
success
(
'删除成功!'
);
reload
();
},
});
}
/**新建文件夹*/
function
createFileButton
()
{
openCreateFileModal
(
true
,
{
isAdd
:
true
,
});
}
/**新建白名单*/
function
createWhite
()
{
openCreateWhiteModal
(
true
,
{
title
:
'新建文件'
,
});
}
<
style
scoped
>
/** 部门树的select*/
function
handleSelect
(
taskId
=
''
)
{
searchInfo
.
taskId
=
taskId
;
reload
();
}
</
style
>
/** 编辑按钮*/
function
handleEdit
(
record
:
Recordable
)
{}
/** 删除按钮*/
function
handleDelete
(
record
:
Recordable
)
{
tableData
.
value
.
splice
(
tableData
.
value
.
findIndex
((
item
)
=>
item
.
businessId
===
record
.
businessId
),
1
,
);
createMessage
.
success
(
'删除成功!'
);
reload
();
}
/** 移动按钮*/
function
handleMove
(
record
:
Recordable
)
{
openMoveFileModal
(
true
,
{
record
,
isMove
:
true
,
});
}
onMounted
(()
=>
{
tableData
.
value
=
TreeData
;
const
path
=
route
.
path
;
if
(
filterStore
.
getSearchParams
[
path
])
{
if
(
JSON
.
parse
(
filterStore
.
getSearchParams
[
path
]
!==
{}))
{
const
params
=
JSON
.
parse
(
filterStore
.
getSearchParams
[
path
]);
getForm
().
setFieldsValue
({
page
:
params
.
page
,
pageSize
:
params
.
pageSize
,
username
:
params
.
username
,
flag
:
params
.
flag
,
});
searchInfo
.
institutionId
=
params
.
institutionId
;
}
}
});
onBeforeRouteLeave
((
to
,
from
,
next
)
=>
{
const
params
=
Object
.
assign
({},
getSearchInfo
(),
getForm
().
getFieldsValue
());
filterStore
.
setSearchParams
({
path
:
from
.
path
,
param
:
{
...
params
,
},
});
next
();
// 允许导航
});
</
script
>
src/views/dataQuality/agentClass/qualityWhitelist/moveFile.vue
0 → 100644
View file @
168f18c4
<
template
>
<BasicModal
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
width=
"30%"
>
<BasicForm
@
register=
"registerForm"
/>
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
MoveFormSchema
}
from
'./data'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
import
{
TreeData
}
from
'./dataQualityWhiteData'
;
defineOptions
({
name
:
'AccountModal'
});
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
createMessage
}
=
useMessage
();
const
isUpdate
=
ref
(
true
);
const
rowId
=
ref
(
''
);
const
rowData
=
ref
([]);
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
span
:
24
},
schemas
:
MoveFormSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
//每次点击弹窗 需要清空存储的数据
rowData
.
value
=
[];
//重置表单数据
resetFields
();
setModalProps
({
confirmLoading
:
false
});
if
(
data
.
idList
!=
null
&&
data
.
idList
!=
undefined
&&
data
.
idList
.
length
>
0
)
{
}
else
{
rowData
.
value
.
push
(
data
.
record
);
//单个移动
rowId
.
value
=
data
.
record
.
businessId
;
data
.
record
.
taskId
=
data
.
record
.
businessId
;
setFieldsValue
({
...
data
.
record
,
});
}
const
treeList
=
handleTree
(
TreeData
,
'businessId'
,
undefined
,
undefined
,
undefined
);
updateSchema
([
{
field
:
'taskId'
,
componentProps
:
{
treeData
:
treeList
,
},
},
]);
console
.
log
(
'treeList:'
,
treeList
);
});
const
getTitle
=
computed
(()
=>
'移动'
);
/**确定按钮*/
async
function
handleSubmit
()
{
createMessage
.
success
(
'移动成功!'
);
closeModal
();
}
/**数组对象转成树*/
function
handleTree
(
data
,
id
,
parentId
,
children
,
rootId
)
{
id
=
id
||
'id'
;
parentId
=
parentId
||
'parentId'
;
children
=
children
||
'children'
;
rootId
=
rootId
||
Math
.
min
.
apply
(
Math
,
data
.
map
((
item
)
=>
{
return
item
[
parentId
];
}),
)
||
0
;
// 对源数据深度克隆
const
cloneData
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
// 循环所有项
const
treeData
=
cloneData
.
filter
((
father
)
=>
{
const
branchArr
=
cloneData
.
filter
((
child
)
=>
{
// 返回每一项的子级数组
return
father
[
id
]
===
child
[
parentId
];
});
branchArr
.
length
>
0
?
(
father
.
children
=
branchArr
)
:
''
;
// 返回第一层
return
father
[
parentId
]
===
rootId
;
});
return
treeData
!==
''
?
treeData
:
data
;
}
</
script
>
src/views/dataQuality/agentClass/qualityWhitelist/treeTwo.vue
0 → 100644
View file @
168f18c4
<
template
>
<div
class=
"m-4 mr-0 overflow-hidden bg-white"
>
<BasicTree
title=
"工作组"
ref=
"treeRef"
toolbar
search
treeWrapperClassName=
"h-[calc(100%-35px)] overflow-auto"
:clickRowToExpand=
"true"
:checkable=
"true"
:defaultExpandAll=
"true"
:treeData=
"treeData"
:fieldNames=
"
{ key: 'businessId', title: 'label' }"
@select="handleSelect"
/>
</div>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
nextTick
,
onMounted
,
ref
,
unref
}
from
'vue'
;
import
{
BasicTree
,
TreeActionType
,
TreeItem
}
from
'@/components/Tree'
;
import
{
Nullable
}
from
'@vben/types'
;
import
{
treeDataListTwo
}
from
'./dataQualityWhiteData'
;
defineOptions
({
name
:
'DeptTree'
});
const
emit
=
defineEmits
([
'select'
]);
const
treeData
=
ref
<
TreeItem
[]
>
([]);
const
treeRef
=
ref
<
Nullable
<
TreeActionType
>>
(
null
);
async
function
fetch
()
{
treeData
.
value
=
treeDataListTwo
;
await
nextTick
(()
=>
{
getTree
().
expandAll
(
true
);
});
}
function
getTree
()
{
const
tree
=
unref
(
treeRef
);
if
(
!
tree
)
{
throw
new
Error
(
'tree is null!'
);
}
return
tree
;
}
function
handleSelect
(
keys
)
{
emit
(
'select'
,
keys
[
0
]);
}
onMounted
(()
=>
{
fetch
();
});
</
script
>
<
style
lang=
"scss"
scoped
>
.bg-white
{
width
:
97%
;
}
::v-deep
(
.vben-tree
)
{
background-color
:
#e8ecf7
!
important
;
}
</
style
>
src/views/metadata/metadataComparison/index.vue
View file @
168f18c4
...
...
@@ -24,10 +24,20 @@
<a-button
style=
"margin-right: 5px"
type=
"primary"
v-show=
"cancelType"
@
click=
"handleCancel"
>
退出
</a-button
>
<a-button
style=
"margin-right: 5px"
type=
"primary"
@
click=
"handleComparison"
<a-button
style=
"margin-right: 70px"
type=
"primary"
v-show=
"!cancelType"
@
click=
"handleComparison"
>
开始对比
</a-button
>
<a-button
style=
"margin-right: 70px"
type=
"primary"
@
click=
"handleImport"
>
导出
</a-button>
<a-button
style=
"margin-right: 70px"
type=
"primary"
v-show=
"cancelType"
@
click=
"handleImport"
>
导出
</a-button
>
</div>
</div>
<div
style=
"display: flex"
>
...
...
@@ -171,6 +181,7 @@
labelWidth
:
100
,
schemas
:
lastSchema
,
showActionButtonGroup
:
false
,
disabled
:
cancelType
,
});
const
[
registerMainTable
,
{
reload
:
reloadMain
}]
=
useTable
({
api
:
async
()
=>
{
...
...
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