mirror of
https://github.com/dataease/dataease.git
synced 2026-05-14 21:12:33 +08:00
fix(仪表板): 在配置图表时字段可以直接拖拽到响应位置。 #17406
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M9.71952 18.0526C13.8471 18.0526 17.2237 14.8374 17.4815 10.7749C17.499 10.4994 17.2734 10.2748 16.9973 10.2748C14.5714 10.2748 12.1454 10.2748 9.71952 10.2748C9.71952 7.40872 9.71952 4.98267 9.71952 2.99669C9.71952 2.72055 9.49501 2.4954 9.21942 2.51289C5.15692 2.77069 1.94174 6.1473 1.94174 10.2748C1.94174 14.5704 5.42397 18.0526 9.71952 18.0526Z" class="svg-primary-color"/>
|
||||
<path d="M12.1306 8.60807C11.7192 8.60807 11.3857 8.2746 11.3857 7.86325V2.49351C11.3857 2.19784 11.6417 1.96535 11.9329 2.01629C15.011 2.55462 17.4392 4.9828 17.9775 8.0609C18.0285 8.35215 17.796 8.60807 17.5003 8.60807H12.1306Z" fill="#00D6B9"/>
|
||||
<path d="M12.1306 8.60807C11.7192 8.60807 11.3857 8.2746 11.3857 7.86325V2.49351C11.3857 2.19784 11.6417 1.96535 11.9329 2.01629C15.011 2.55462 17.4392 4.9828 17.9775 8.0609C18.0285 8.35215 17.796 8.60807 17.5003 8.60807H12.1306Z" class="svg-primary-color"/>
|
||||
<path d="M12.1306 8.60807C11.7192 8.60807 11.3857 8.2746 11.3857 7.86325V2.49351C11.3857 2.19784 11.6417 1.96535 11.9329 2.01629C15.011 2.55462 17.4392 4.9828 17.9775 8.0609C18.0285 8.35215 17.796 8.60807 17.5003 8.60807H12.1306Z" fill="white" fill-opacity="0.4"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 740 B After Width: | Height: | Size: 1016 B |
@@ -296,6 +296,7 @@ onMounted(() => {
|
||||
}"
|
||||
>
|
||||
<span class="item-name">{{ item.chartShowName ? item.chartShowName : item.name }}</span>
|
||||
<span :data-id="item.id" class="node-id_private"></span>
|
||||
</span>
|
||||
</el-tooltip>
|
||||
<el-icon v-if="showHideIcon" style="margin-left: 4px">
|
||||
|
||||
@@ -186,6 +186,7 @@ onMounted(() => {
|
||||
:class="{ 'sort-status': index !== 0 && item.sort !== 'none' }"
|
||||
>
|
||||
<span class="item-name">{{ item.chartShowName ? item.chartShowName : item.name }}</span>
|
||||
<span :data-id="item.id" class="node-id_private"></span>
|
||||
</span>
|
||||
</el-tooltip>
|
||||
<el-icon class="child remove-icon" size="14px">
|
||||
|
||||
@@ -114,6 +114,7 @@ onMounted(() => {
|
||||
</el-icon>
|
||||
</span>
|
||||
<span class="item-span-style" :title="item.name">{{ item.name }}</span>
|
||||
<span :data-id="item.id" class="node-id_private"></span>
|
||||
<el-icon class="child remove-icon" size="14px">
|
||||
<Icon name="icon_delete-trash_outlined" class-name="inner-class"
|
||||
><icon_deleteTrash_outlined @click="removeItem" class="svg-icon inner-class"
|
||||
|
||||
@@ -393,6 +393,7 @@ onMounted(() => {
|
||||
<span v-if="item.summary !== ''" class="item-right-summary">
|
||||
({{ t('chart.' + item.summary) }})
|
||||
</span>
|
||||
<span :data-id="item.id" class="node-id_private"></span>
|
||||
</span>
|
||||
</el-tooltip>
|
||||
<span
|
||||
|
||||
@@ -1941,7 +1941,14 @@ const drop = (ev: MouseEvent, type = 'xAxis') => {
|
||||
const obj = cloneDeep(arr[i])
|
||||
state.moveId = obj.id as unknown as number
|
||||
view.value[type] ??= []
|
||||
view.value[type].push(obj)
|
||||
const targetId = ev.srcElement.offsetParent?.querySelector('.node-id_private')?.dataset?.id
|
||||
const index = view.value[type].findIndex(ele => ele.id === targetId && ele.id !== obj.id)
|
||||
if (index !== -1) {
|
||||
view.value[type].splice(index + 1, 0, obj)
|
||||
} else {
|
||||
view.value[type].push(obj)
|
||||
}
|
||||
|
||||
const e = { newDraggableIndex: view.value[type].length - 1 }
|
||||
|
||||
if ('drillFields' === type) {
|
||||
|
||||
Reference in New Issue
Block a user