Merge pull request #12382 from dataease/pr@dev-v2_dzz

Pr@dev v2 dzz
This commit is contained in:
dataeaseShu 2024-09-23 15:44:24 +08:00 committed by GitHub
commit addac0bd08
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 42 additions and 11 deletions

View File

@ -415,7 +415,16 @@ const timeParameterList = computed(() => {
const [year, y] = curComponent.value.parameters?.filter(
ele => ele.deType === 1 && !!ele.variableName
)[0].type
return timeList.filter(ele => ele.value === (typeTimeMap[y] || typeTimeMap[year]))
let stopPush = false
return timeList.reduce((pre, ele) => {
if (ele.value === (typeTimeMap[y] || typeTimeMap[year])) {
stopPush = true
pre.push(ele)
} else if (!stopPush) {
pre.push(ele)
}
return pre
}, [])
})
const cancelClick = () => {
@ -1431,6 +1440,11 @@ const addQueryCriteria = () => {
conditions.value.push(addQueryCriteriaConfig())
}
const addQueryCriteriaAndSelect = () => {
addQueryCriteria()
handleCondition(conditions.value[conditions.value.length - 1])
}
const addCriteriaConfig = () => {
addQueryCriteria()
return conditions.value[conditions.value.length - 1].id
@ -1458,7 +1472,7 @@ defineExpose({
<div class="query-condition-list">
<div class="title">
查询条件
<el-icon @click="addQueryCriteria">
<el-icon @click="addQueryCriteriaAndSelect">
<Icon name="icon_add_outlined"><icon_add_outlined class="svg-icon" /></Icon>
</el-icon>
</div>

View File

@ -1,4 +1,5 @@
<script lang="ts" setup>
import dvInfoSvg from '@/assets/svg/dv-info.svg'
import icon_down_outlined1 from '@/assets/svg/icon_down_outlined-1.svg'
import icon_deleteTrash_outlined from '@/assets/svg/icon_delete-trash_outlined.svg'
import icon_info_outlined from '@/assets/svg/icon_info_outlined.svg'
@ -1752,13 +1753,28 @@ const deleteChartFieldItem = id => {
</div>
<div v-if="!canvasCollapse.chartAreaCollapse" style="width: 240px" class="view-panel-row">
<el-row class="editor-title">
<span
id="component-name"
class="name-area"
:class="{ 'component-name-dark': themes === 'dark' }"
@dblclick="editComponentName"
>{{ view.title }}</span
>
<div style="display: flex; align-items: center; width: calc(100% - 24px)">
<div
id="component-name"
class="name-area"
style="max-width: 180px; text-overflow: ellipsis; white-space: nowrap"
:style="{ width: componentNameEdit ? '300px' : 'auto' }"
:class="{ 'component-name-dark': themes === 'dark' }"
@dblclick="editComponentName"
>
{{ view.title }}
</div>
<el-popover show-arrow :offset="8" placement="bottom" width="200" trigger="click">
<template #reference>
<el-icon
v-show="route.path !== '/dvCanvas'"
style="margin-left: 4px; cursor: pointer"
><Icon><dvInfoSvg class="svg-icon" /></Icon
></el-icon>
</template>
{{ view.id }}
</el-popover>
</div>
</el-row>
<el-row style="height: calc(100vh - 110px); overflow-y: auto">
@ -4784,7 +4800,6 @@ span {
line-height: 24px;
height: 24px;
font-size: 14px !important;
width: 300px;
overflow: hidden;
cursor: pointer;
input {

View File

@ -1,5 +1,7 @@
<template>
<div class="info-card">
<div v-if="dvInfo.type === 'dashboard'" class="info-title">仪表板ID</div>
<div v-if="dvInfo.type === 'dashboard'" class="info-content">{{ dvInfo.id }}</div>
<div v-if="dvInfo.creatorName" class="info-title">{{ t('visualization.create_by') }}</div>
<div v-if="dvInfo.creatorName" class="info-content">{{ dvInfo.creatorName }}</div>
<div class="info-title">{{ t('visualization.create_time') }}</div>

View File

@ -169,7 +169,7 @@ const initOpenHandler = newWindow => {
<el-dropdown-menu style="width: 130px">
<el-dropdown-item icon="Refresh" @click="reload()">刷新数据 </el-dropdown-item>
<el-dropdown
style="width: 100%"
style="width: 100%; overflow: hidden"
trigger="hover"
placement="left-start"
v-if="dvInfo.weight > 3"