Commit 7a029103 authored by 何远江's avatar 何远江

1

parent 959ea00d
...@@ -314,7 +314,7 @@ const confirmConfig = (configList: any) => { ...@@ -314,7 +314,7 @@ const confirmConfig = (configList: any) => {
} }
} }
// 没有选择过滤字段时 // 没有选择过滤字段时
if (!item.filterMapFiled) { if (!item.filterFiled) {
item.filterMapFiled = null item.filterMapFiled = null
item.filterScripts = [] item.filterScripts = []
item.filterFiled = null item.filterFiled = null
......
...@@ -75,11 +75,12 @@ ...@@ -75,11 +75,12 @@
<el-col> <el-col>
<el-form-item label="过滤字段"> <el-form-item label="过滤字段">
<el-select <el-select
v-model="item.filterMapFiled" v-model="item.filterFiled"
style="width: 260px" style="width: 260px"
filterable filterable
placeholder="请选择" placeholder="请选择"
clearable clearable
value-key="filedName"
@change="filterMapFieldChange" @change="filterMapFieldChange"
> >
<el-option-group <el-option-group
...@@ -91,7 +92,7 @@ ...@@ -91,7 +92,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.filedName" :value="itm"
/> />
</el-option-group> </el-option-group>
</el-select> </el-select>
...@@ -195,14 +196,15 @@ watch( ...@@ -195,14 +196,15 @@ watch(
const filterMapFieldChange = (e) => { const filterMapFieldChange = (e) => {
if (e) { if (e) {
// 找到匹配的过滤字段 // console.log('匹配当前字段')
getFilterMapFieldsFlatList.value.some((items) => { // // 找到匹配的过滤字段
if (items.filedName == e) { // getFilterMapFieldsFlatList.value.some((items) => {
props.item.filterFiled = items // if (items.filedName == e) {
return true // props.item.filterFiled = items
} // return true
return false // }
}) // return false
// })
// 如果没有脚本,设置一个空的脚本 // 如果没有脚本,设置一个空的脚本
if (!props.item?.filterScripts || props.item?.filterScripts?.length == 0) { if (!props.item?.filterScripts || props.item?.filterScripts?.length == 0) {
props.item.filterScripts = [ props.item.filterScripts = [
...@@ -213,9 +215,7 @@ const filterMapFieldChange = (e) => { ...@@ -213,9 +215,7 @@ const filterMapFieldChange = (e) => {
] ]
} }
} else { } else {
// 置空 //
props.item.filterFiled = null
props.item.filterScripts = []
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment