Merge pull request #11071 from dataease/pr@dev-v2_st

fix(查询组件): 仪表板-移动端布局-筛选组件-日期筛选-无法正常使用 #11042
This commit is contained in:
dataeaseShu 2024-07-22 14:23:10 +08:00 committed by GitHub
commit 83e872e7e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 45 additions and 17 deletions

View File

@ -211,11 +211,26 @@ const multipleChange = (val: boolean, isMultipleChange = false) => {
const changeMultiple = val => {
multiple.value = val
}
const inputCom = ref()
const displayTypeChange = () => {
inputCom.value?.displayTypeChange?.()
}
const mult = () => {
inputCom.value?.mult?.handleClickOutside?.()
}
const single = () => {
inputCom.value?.single?.handleClickOutside?.()
}
defineExpose({
multipleChange,
handleDialogClick,
changeMultiple
changeMultiple,
displayTypeChange,
mult,
single
})
</script>

View File

@ -290,8 +290,6 @@ const handleCheckedFieldsChangeTree = (value: string[]) => {
setType()
}
const inputCom = ref()
const setParameters = () => {
const fieldArr = Object.values(curComponent.value.checkedFieldsMap).filter(ele => !!ele)
curComponent.value.parameters = fields.value
@ -347,7 +345,7 @@ const setTypeChange = () => {
handleDialogClick()
nextTick(() => {
curComponent.value.field.id = ''
inputCom.value?.displayTypeChange?.()
defaultConfigurationRef.value?.displayTypeChange?.()
if (
+curComponent.value.displayType === 7 &&
['yearrange', 'monthrange', 'daterange', 'datetimerange'].includes(
@ -772,16 +770,16 @@ const validate = () => {
}
const handleBeforeClose = () => {
inputCom.value?.mult?.handleClickOutside?.()
inputCom.value?.single?.handleClickOutside?.()
defaultConfigurationRef.value?.mult()
defaultConfigurationRef.value?.single()
handleDialogClick()
dialogVisible.value = false
}
const emits = defineEmits(['queryData'])
const confirmClick = () => {
if (validate()) return
inputCom.value?.mult?.handleClickOutside?.()
inputCom.value?.single?.handleClickOutside?.()
defaultConfigurationRef.value?.mult()
defaultConfigurationRef.value?.single()
handleDialogClick()
dialogVisible.value = false
conditions.value.forEach(ele => {

View File

@ -135,7 +135,7 @@ const handleValueChange = () => {
})
return
}
config.value.defaultValue = new Date(value).toLocaleString()
config.value.defaultValue = value.map(ele => new Date(ele).toLocaleString())
}
const init = () => {

View File

@ -890,12 +890,19 @@ const mousedownDrag = () => {
width: 20px;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
border: 1px solid var(--deCardStrokeColor, #dee0e3);
border-top-right-radius: 13px;
border-bottom-right-radius: 13px;
display: flex;
align-items: center;
padding-left: 2px;
border-top-right-radius: 12px;
border-bottom-right-radius: 12px;
font-size: 12px;
background: #fff;
.ed-icon {
margin-left: 2px;
&:hover {
padding-left: 4px;
width: 24px;
.ed-icon {
color: var(--ed-color-primary, #3370ff);
}
}
}

View File

@ -2098,12 +2098,20 @@ const getDsIconName = data => {
width: 20px;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
border: 1px solid var(--deCardStrokeColor, #dee0e3);
border-top-right-radius: 13px;
border-bottom-right-radius: 13px;
display: flex;
align-items: center;
padding-left: 2px;
border-top-right-radius: 12px;
border-bottom-right-radius: 12px;
background: #fff;
font-size: 12px;
.ed-icon {
margin-left: 2px;
&:hover {
padding-left: 4px;
width: 24px;
.ed-icon {
color: var(--ed-color-primary, #3370ff);
}
}
}