Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
topsun-baoshen-excel
Project
Project
Details
Activity
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
何远江
topsun-baoshen-excel
Commits
227ba29e
Commit
227ba29e
authored
Mar 25, 2025
by
何远江
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
47237c63
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
16 deletions
+14
-16
ConfigFormItem.vue
src/views/var/varChange/components/ConfigFormItem.vue
+14
-16
No files found.
src/views/var/varChange/components/ConfigFormItem.vue
View file @
227ba29e
...
...
@@ -154,7 +154,8 @@ import { onMounted, ref, watch } from 'vue'
const
props
=
defineProps
<
{
item
?:
any
;
index
:
number
}
>
()
const
emits
=
defineEmits
([
'remove'
])
const
excelChangeStore
=
useVariableExcelChangeStore
()
const
{
getScriptList
,
getSpecList
,
getFilterMapFieldsList
,
getFilterMapFieldsFlatList
}
=
storeToRefs
(
excelChangeStore
)
const
{
getScriptList
,
getSpecList
,
getFilterMapFieldsList
,
getFilterMapFieldsFlatList
}
=
storeToRefs
(
excelChangeStore
)
const
scriptChange
=
(
sitem
,
e
)
=>
{
if
(
e
)
{
...
...
@@ -194,6 +195,7 @@ watch(
const
filterMapFieldChange
=
(
e
)
=>
{
if
(
e
)
{
// 找到匹配的过滤字段
getFilterMapFieldsFlatList
.
value
.
some
((
items
)
=>
{
if
(
items
.
filedName
==
e
)
{
props
.
item
.
filterFiled
=
items
...
...
@@ -201,25 +203,21 @@ const filterMapFieldChange = (e) => {
}
return
false
})
// 如果没有脚本,设置一个空的脚本
if
(
!
props
.
item
?.
filterScripts
||
props
.
item
?.
filterScripts
?.
length
==
0
)
{
props
.
item
.
filterScripts
=
[
{
content
:
''
,
scriptName
:
''
}
]
}
}
else
{
// 置空
props
.
item
.
filterFiled
=
null
props
.
item
.
filterScripts
=
[]
}
}
watch
(
()
=>
props
.
item
.
filterMapFiled
,
(
val
)
=>
{
if
(
!
props
.
item
?.
filterScripts
)
{
props
.
item
.
filterScripts
=
[]
}
// 如果有值,添加脚本
if
(
val
&&
props
.
item
.
filterScripts
?.
length
==
0
)
{
props
.
item
.
filterScripts
.
push
({
content
:
''
,
scriptName
:
''
})
}
}
)
</
script
>
<
style
lang=
"scss"
scoped
></
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