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
448fa6ba
Commit
448fa6ba
authored
Mar 25, 2025
by
何远江
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug 修改
parent
940c4680
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
6 deletions
+29
-6
excel.ts
src/stores/excel.ts
+6
-0
VarChange.vue
src/views/var/varChange/VarChange.vue
+4
-1
ConfigFormItem.vue
src/views/var/varChange/components/ConfigFormItem.vue
+19
-5
No files found.
src/stores/excel.ts
View file @
448fa6ba
...
@@ -197,6 +197,12 @@ export const useVariableExcelChangeStore = defineStore('variableExcelChangeStore
...
@@ -197,6 +197,12 @@ export const useVariableExcelChangeStore = defineStore('variableExcelChangeStore
getFilterMapFieldsList
():
any
{
getFilterMapFieldsList
():
any
{
// 是否禁用
// 是否禁用
return
this
.
filterMapField
return
this
.
filterMapField
},
getFilterMapFieldsFlatList
():
any
{
return
this
.
filterMapField
?.
reduce
((
pre
,
cur
)
=>
{
pre
.
push
(
cur
.
filedPojos
)
return
pre
},
[])
}
}
},
},
actions
:
{
actions
:
{
...
...
src/views/var/varChange/VarChange.vue
View file @
448fa6ba
...
@@ -310,9 +310,12 @@ const confirmConfig = (configList: any) => {
...
@@ -310,9 +310,12 @@ const confirmConfig = (configList: any) => {
variable
:
true
variable
:
true
}
}
}
}
if
(
!
item
.
filterMapFiled
)
{
item
.
filterMapFiled
=
null
}
return
item
return
item
})
})
.
filter
((
v
)
=>
!!
v
.
mapField
)
.
filter
((
v
)
=>
!!
v
.
mapField
&&
!!
v
.
filterMapFiled
)
)
)
})
})
// 关闭popover
// 关闭popover
...
...
src/views/var/varChange/components/ConfigFormItem.vue
View file @
448fa6ba
...
@@ -75,12 +75,12 @@
...
@@ -75,12 +75,12 @@
<el-col>
<el-col>
<el-form-item
label=
"过滤字段"
>
<el-form-item
label=
"过滤字段"
>
<el-select
<el-select
v-model=
"item.filterFiled"
v-model=
"item.filter
Map
Filed"
style=
"width: 260px"
style=
"width: 260px"
filterable
filterable
placeholder=
"请选择"
placeholder=
"请选择"
clearable
clearable
value-key=
"filedNam
e"
@
change=
"filterMapFieldChang
e"
>
>
<el-option-group
<el-option-group
v-for=
"group in getFilterMapFieldsList"
v-for=
"group in getFilterMapFieldsList"
...
@@ -91,7 +91,7 @@
...
@@ -91,7 +91,7 @@
v-for=
"itm in group.filedPojos"
v-for=
"itm in group.filedPojos"
:key=
"itm.filedName"
:key=
"itm.filedName"
:label=
"itm.fliedTitle"
:label=
"itm.fliedTitle"
:value=
"itm"
:value=
"itm
.filedName
"
/>
/>
</el-option-group>
</el-option-group>
</el-select>
</el-select>
...
@@ -154,7 +154,7 @@ import { onMounted, ref, watch } from 'vue'
...
@@ -154,7 +154,7 @@ import { onMounted, ref, watch } from 'vue'
const
props
=
defineProps
<
{
item
?:
any
;
index
:
number
}
>
()
const
props
=
defineProps
<
{
item
?:
any
;
index
:
number
}
>
()
const
emits
=
defineEmits
([
'remove'
])
const
emits
=
defineEmits
([
'remove'
])
const
excelChangeStore
=
useVariableExcelChangeStore
()
const
excelChangeStore
=
useVariableExcelChangeStore
()
const
{
getScriptList
,
getSpecList
,
getFilterMapFieldsList
}
=
storeToRefs
(
excelChangeStore
)
const
{
getScriptList
,
getSpecList
,
getFilterMapFieldsList
,
getFilterMapFieldsFlatList
}
=
storeToRefs
(
excelChangeStore
)
const
scriptChange
=
(
sitem
,
e
)
=>
{
const
scriptChange
=
(
sitem
,
e
)
=>
{
if
(
e
)
{
if
(
e
)
{
...
@@ -192,8 +192,22 @@ watch(
...
@@ -192,8 +192,22 @@ watch(
}
}
)
)
const
filterMapFieldChange
=
(
e
)
=>
{
if
(
e
)
{
getFilterMapFieldsFlatList
.
value
.
some
((
items
)
=>
{
if
(
items
.
filedName
==
e
)
{
props
.
item
.
filterFiled
=
items
return
true
}
return
false
})
}
else
{
props
.
item
.
filterFiled
=
null
}
}
watch
(
watch
(
()
=>
props
.
item
.
filterFiled
,
()
=>
props
.
item
.
filter
Map
Filed
,
(
val
)
=>
{
(
val
)
=>
{
if
(
!
props
.
item
?.
filterScripts
)
{
if
(
!
props
.
item
?.
filterScripts
)
{
props
.
item
.
filterScripts
=
[]
props
.
item
.
filterScripts
=
[]
...
...
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