Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
csbr-daop
/
fe-data-trusted-space
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
7472f3b6
authored
2025-06-30 10:25:17 +0800
by
fanguang
Committed by
lihua
2025-06-30 14:35:24 +0800
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix
1 parent
21cb47eb
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
14 deletions
src/components/Tree/index.vue
src/views/data_meta/components/standardDialog.vue
src/views/data_meta/standard-codetable.vue
src/views/data_meta/standard-import.vue
src/views/data_meta/standard-meta-import.vue
src/views/data_meta/standard.vue
src/components/Tree/index.vue
View file @
7472f3b
...
...
@@ -70,6 +70,9 @@ const editTreeItem = computed(() => {
const
expendAll
=
computed
(()
=>
{
return
props
.
treeInfo
.
expendAll
??
false
})
const
ellipsis
=
computed
(()
=>
{
return
props
.
treeInfo
.
ellipsis
??
true
})
interface
Tree
{
[
key
:
string
]:
any
;
...
...
@@ -182,6 +185,21 @@ const appendChildren = (key, data) => {
const
visibleNodes
=
ref
({});
//解决点击树item,下拉菜单不消失的问题,原因是树的点击事件阻止冒泡了。
function
formatNodeLabel
(
node
)
{
let
sliceLength
=
8
switch
(
node
.
level
)
{
case
2
:
sliceLength
=
10
break
case
3
:
sliceLength
=
8
break
case
4
:
sliceLength
=
8
break
}
return
node
.
label
.
slice
(
0
,
sliceLength
)
}
defineExpose
({
getCheckedNodes
,
getCheckedKeys
,
...
...
@@ -225,8 +243,14 @@ defineExpose({
</span>
<template
v-else-if=
"editTreeItem && data.showEdit !== false"
>
<span
class=
"list-item-text"
>
<ellipsis-tooltip
v-if=
"!customInfo"
:content=
"node.label"
class-name=
"w100f"
popper-class=
"tree-popper"
<template
v-if=
"!ellipsis"
>
<span>
{{
formatNodeLabel
(
node
)
}}
</span>
</
template
>
<
template
v-else
>
<ellipsis-tooltip
v-if=
"!customInfo"
:content=
"node.label"
class-name=
"w100f"
popper-class=
"tree-popper"
:refName=
"'tooltipOver' + node.id"
></ellipsis-tooltip>
</
template
>
</span>
<div
class=
"tags-list-right"
:class=
"visibleNodes[node.data.guid] ? 'active' : ''"
>
<el-popover
v-model:visible=
"visibleNodes[node.data.guid]"
placement=
"bottom"
width=
"96"
trigger=
"click"
...
...
src/views/data_meta/components/standardDialog.vue
View file @
7472f3b
...
...
@@ -25,8 +25,7 @@
:props=
"standardProps"
node-key=
"guid"
:highlight-current=
"true"
:expand-on-click-node=
"true"
show-checkbox
check-strictly
placeholder=
"请选择"
:disabled=
"treeSelectDisabled"
...
...
src/views/data_meta/standard-codetable.vue
View file @
7472f3b
...
...
@@ -1198,6 +1198,10 @@ const batching = (type) => {
})
return
}
if
(
selectRowData
.
value
.
length
>
30
)
{
ElMessage
.
error
(
'选择的代码名称不能超过30个'
)
return
}
// console.log(selectedRowData)
let
uploadSetting
=
selectedRowData
.
value
.
map
(
item
=>
{
return
{
...
...
src/views/data_meta/standard-import.vue
View file @
7472f3b
...
...
@@ -411,6 +411,11 @@ const importData = (info) => {
dialogInfo
.
value
.
visible
=
false
;
return
}
let
sheetNum
=
uploadSetting
.
value
.
filter
(
item
=>
item
.
value
)[
'length'
]
if
(
sheetNum
>
30
)
{
ElMessage
.
error
(
'最多只能导入30个sheet页的数据。'
)
return
}
let
paramUrl
=
''
;
uploadFiles
.
value
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
params
.
append
(
"file"
,
item
.
raw
);
...
...
@@ -422,11 +427,7 @@ const importData = (info) => {
}
})
sheetMaps
=
JSON
.
stringify
(
sheetMaps
)
// console.log('sheetMaps', sheetMaps)
paramUrl
=
encodeURI
(
`
${
import
.
meta
.
env
.
VITE_APP_ADD_FILE
}
/import-data/import-batch-common?importType=
${
importType
.
value
}
&staffGuid=
${
userData
.
staffGuid
}
&tenantGuid=
${
userData
.
tenantGuid
}
&sheetMaps=
${
sheetMaps
}
`
)
// if (info && Object.keys(info).length) {
// paramUrl += `&extendFields=${encodeURIComponent(JSON.stringify(info))}`
// }
dialogInfo
.
value
.
footer
.
btns
[
1
].
loading
=
true
;
addImportData
(
paramUrl
,
params
).
then
((
res
:
any
)
=>
{
dialogInfo
.
value
.
footer
.
btns
[
1
].
loading
=
false
;
...
...
@@ -481,7 +482,7 @@ const setUploadInfo = () => {
cover
:
true
,
fileList
:
[],
accept
:
'.xlsx, .xls'
,
tips
:
'当前支持xls、xlsx文件,支持一个文件多个sheet批量导入'
tips
:
'当前支持xls、xlsx文件,支持一个文件多个sheet批量导入
,一次最多只能导入30个sheet页数据。
'
}
}
]
...
...
src/views/data_meta/standard-meta-import.vue
View file @
7472f3b
...
...
@@ -411,6 +411,11 @@ const importData = (info) => {
dialogInfo
.
value
.
visible
=
false
;
return
}
let
sheetNum
=
uploadSetting
.
value
.
filter
(
item
=>
item
.
value
)[
'length'
]
if
(
sheetNum
>
30
)
{
ElMessage
.
error
(
'最多只能导入30个sheet页的数据。'
)
return
}
let
paramUrl
=
''
;
uploadFiles
.
value
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
params
.
append
(
"file"
,
item
.
raw
);
...
...
@@ -422,11 +427,7 @@ const importData = (info) => {
}
})
sheetMaps
=
JSON
.
stringify
(
sheetMaps
)
// console.log('sheetMaps', sheetMaps)
paramUrl
=
encodeURI
(
`
${
import
.
meta
.
env
.
VITE_APP_ADD_FILE
}
/import-data/import-batch-common?importType=
${
importType
.
value
}
&staffGuid=
${
userData
.
staffGuid
}
&tenantGuid=
${
userData
.
tenantGuid
}
&sheetMaps=
${
sheetMaps
}
`
)
// if (info && Object.keys(info).length) {
// paramUrl += `&extendFields=${encodeURIComponent(JSON.stringify(info))}`
// }
dialogInfo
.
value
.
footer
.
btns
[
1
].
loading
=
true
;
addImportData
(
paramUrl
,
params
).
then
((
res
:
any
)
=>
{
dialogInfo
.
value
.
footer
.
btns
[
1
].
loading
=
false
;
...
...
@@ -481,7 +482,7 @@ const setUploadInfo = () => {
cover
:
true
,
fileList
:
[],
accept
:
'.xlsx, .xls'
,
tips
:
'当前支持xls、xlsx文件,支持一个文件多个sheet批量导入'
tips
:
'当前支持xls、xlsx文件,支持一个文件多个sheet批量导入
,一次最多只能导入30个sheet页数据。
'
}
}
]
...
...
src/views/data_meta/standard.vue
View file @
7472f3b
...
...
@@ -52,7 +52,8 @@ const treeInfo = ref({
loading
:
false
,
currentObj
:
{},
editTreeItem
:
true
,
className
:
'tree-list'
className
:
'tree-list'
,
ellipsis
:
false
})
function
nodeClick
(
data
)
{
console
.
log
(
'nodeData'
,
data
)
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment