Merge pull request #11677 from dataease/pr@dev-v2@fix_url_field

fix(图表): 修复查询组件 URL 字段识别为时间字段
This commit is contained in:
wisonic-s 2024-08-21 20:12:04 +08:00 committed by GitHub
commit dc8879dacb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 3 deletions

View File

@ -347,13 +347,15 @@ const drop = e => {
checkedFieldsMap[ele.id] = componentInfo.id
}
})
// URL
const displayType = componentInfo.deType === 7 ? 0 : componentInfo.deType
list.value.push({
...infoFormat(componentInfo),
auto: true,
optionValueSource: 1,
checkedFields,
checkedFieldsMap,
displayType: `${componentInfo.deType}`
displayType
})
})
element.value.propValue = [...list.value]

View File

@ -330,6 +330,9 @@ const setType = () => {
if (!(field?.deType === 1 && curComponent.value.displayType === '7')) {
curComponent.value.displayType = `${[3, 4].includes(field?.deType) ? 2 : field?.deType}`
}
if (field?.deType === 7) {
curComponent.value.displayType = '0'
}
if (
displayType !== curComponent.value.displayType &&
!([3, 4].includes(+displayType) && +curComponent.value.displayType === 2)
@ -1848,7 +1851,8 @@ defineExpose({
v-for="ele in curComponent.dataset.fields.filter(
ele =>
ele.deType === +curComponent.displayType ||
([3, 4].includes(ele.deType) && +curComponent.displayType === 2)
([3, 4].includes(ele.deType) && +curComponent.displayType === 2) ||
(ele.deType === 7 && +curComponent.displayType === 0)
)"
:key="ele.id"
:label="ele.name"
@ -1899,7 +1903,8 @@ defineExpose({
v-for="ele in curComponent.dataset.fields.filter(
ele =>
ele.deType === +curComponent.displayType ||
([3, 4].includes(ele.deType) && +curComponent.displayType === 2)
([3, 4].includes(ele.deType) && +curComponent.displayType === 2) ||
(ele.deType === 7 && +curComponent.displayType === 0)
)"
:key="ele.id"
:label="ele.name"