Commit 31227ba6 authored by 何远江's avatar 何远江

1

parent ce463b41
......@@ -8,6 +8,7 @@
filterable
placeholder="请选择"
clearable
@change="mapFieldChange"
>
<el-option
v-for="itm in getSpecList"
......@@ -181,45 +182,35 @@ onMounted(() => {
// isVariable.value = !!props.item.orderFiled?.variable
})
watch(
() => props.item.mapField,
(val) => {
// 如果有值,添加脚本
if (val && props.item.scripts.length == 0) {
const mapFieldChange = (e) => {
if (e) {
if (props.item.scripts?.length == 0) {
props.item.scripts.push({
content: '',
scriptName: ''
})
}
} else {
props.item.scripts = []
props.item.orderFiled = null
}
)
}
const filterMapFieldChange = (e) => {
if (e) {
props.item.filterMapFiled = e.filedName
// console.log('匹配当前字段')
// // 找到匹配的过滤字段
// getFilterMapFieldsFlatList.value.some((items) => {
// if (items.filedName == e) {
// props.item.filterFiled = items
// return true
// }
// return false
// })
// 如果没有脚本,设置一个空的脚本
if (!props.item?.filterScripts || props.item?.filterScripts?.length == 0) {
props.item.filterScripts = [
{
content: '',
scriptName: ''
}
]
if (props.item.filterScripts?.length == 0) {
props.item.filterScripts.push({
content: '',
scriptName: ''
})
}
} else {
//
props.item.filterMapFiled = null
props.item.filterScripts = []
}
}
</script>
<style lang="scss" scoped></style>
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