mirror of
https://github.com/dataease/dataease.git
synced 2025-02-25 03:52:59 +08:00
Merge pull request #13609 from dataease/pr@dev-v2@fix_picture-group
fix: 修复部分数据集下的图片组无法联动问题
This commit is contained in:
commit
e473ea3ad7
@ -33,7 +33,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('visualization.description')" prop="description">
|
||||
<el-input
|
||||
:placeholder="t('visualization.input_content')"
|
||||
:placeholder="t('commons.input_content')"
|
||||
show-word-limit
|
||||
v-model="state.form.description"
|
||||
type="textarea"
|
||||
@ -44,7 +44,7 @@
|
||||
<template #footer>
|
||||
<div class="apply" style="width: 100%">
|
||||
<el-button secondary @click="close">{{ t('commons.cancel') }} </el-button>
|
||||
<el-button type="primary" @click="downloadApp">{{ t('visualization.export') }}</el-button>
|
||||
<el-button type="primary" @click="downloadApp">{{ t('chart.export') }}</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-drawer>
|
||||
|
@ -1,16 +1,14 @@
|
||||
<template>
|
||||
<div class="pic-main">
|
||||
<chart-error v-if="isError" :err-msg="errMsg" />
|
||||
<img
|
||||
draggable="false"
|
||||
v-if="state.showUrl"
|
||||
v-else-if="state.showUrl"
|
||||
:style="imageAdapter"
|
||||
:src="imgUrlTrans(state.showUrl)"
|
||||
/>
|
||||
<template v-else>
|
||||
<chart-empty-info
|
||||
:themes="canvasStyleData.dashboard.themeColor"
|
||||
:view-icon="view.type"
|
||||
></chart-empty-info>
|
||||
<chart-empty-info :view-icon="view.type"></chart-empty-info>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
@ -35,6 +33,7 @@ import { parseJson } from '@/views/chart/components/js/util'
|
||||
import { mappingColor } from '@/views/chart/components/js/panel/common/common_table'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import ChartEmptyInfo from '@/views/chart/components/views/components/ChartEmptyInfo.vue'
|
||||
import ChartError from "@/views/chart/components/views/components/ChartError.vue";
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
const { canvasViewInfo, editMode, mobileInPc, canvasStyleData } = storeToRefs(dvMainStore)
|
||||
const state = reactive({
|
||||
@ -202,12 +201,17 @@ const calcData = (viewCalc: Chart, callback) => {
|
||||
}
|
||||
if (viewCalc.tableId || viewCalc['dataFrom'] === 'template') {
|
||||
const v = JSON.parse(JSON.stringify(viewCalc))
|
||||
v.type = 'table-info'
|
||||
v.render = 'antv'
|
||||
v.resultCount = 1
|
||||
getData(v)
|
||||
.then(res => {
|
||||
if (res.code && res.code !== 0) {
|
||||
isError.value = true
|
||||
errMsg.value = res.msg
|
||||
} else {
|
||||
res.type = 'picture-group'
|
||||
res.render = 'custom'
|
||||
state.data = res?.data
|
||||
state.viewDataInfo = res
|
||||
state.totalItems = res?.totalItems
|
||||
|
@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, toRefs, PropType, CSSProperties } from 'vue'
|
||||
import { computed, toRefs, PropType } from 'vue'
|
||||
import Chart from '@/views/chart/components/views/index.vue'
|
||||
|
||||
const props = defineProps({
|
||||
|
@ -62,7 +62,7 @@ const routers: any[] = formatRoute(permissionStore.getRoutersNotHidden as AppCus
|
||||
const showSystem = ref(false)
|
||||
const showToolbox = ref(false)
|
||||
const showOverlay = ref(false)
|
||||
const showOverlayCopilot = ref(true)
|
||||
const showOverlayCopilot = ref(false)
|
||||
const handleSelect = (index: string) => {
|
||||
// 自定义事件
|
||||
if (isExternal(index)) {
|
||||
@ -100,11 +100,11 @@ const initAiBase = async () => {
|
||||
|
||||
const initCopilotBase = async () => {
|
||||
const aiCopilotCheck = wsCache.get('DE-COPILOT-TIPS-CHECK')
|
||||
if (aiCopilotCheck === 'CHECKED') {
|
||||
showOverlayCopilot.value = false
|
||||
} else {
|
||||
showOverlayCopilot.value = true
|
||||
}
|
||||
// if (aiCopilotCheck === 'CHECKED') {
|
||||
// showOverlayCopilot.value = false
|
||||
// } else {
|
||||
// showOverlayCopilot.value = true
|
||||
// }
|
||||
}
|
||||
|
||||
const aiTipsConfirm = () => {
|
||||
|
@ -141,8 +141,8 @@ const optInit = (type, data: BusiTreeNode, exec, parentSelect = false) => {
|
||||
const placeholderLabel =
|
||||
data.leaf || type === 'leaf'
|
||||
? props.curCanvasType === 'dataV'
|
||||
? t('visualization.screen')
|
||||
: t('visualization.dashboard')
|
||||
? t('work_branch.screen')
|
||||
: t('work_branch.dashboard')
|
||||
: t('visualization.folder')
|
||||
placeholder.value = t('visualization.input_name_tips', [placeholderLabel])
|
||||
filterText.value = ''
|
||||
|
@ -342,6 +342,7 @@ const newWindowFromDiv = ref(false)
|
||||
let p = null
|
||||
const XpackLoaded = () => p(true)
|
||||
onMounted(async () => {
|
||||
snapshotStore.initSnapShot()
|
||||
if (window.location.hash.includes('#/dvCanvas')) {
|
||||
newWindowFromDiv.value = true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user