mirror of
https://github.com/dataease/dataease.git
synced 2026-05-23 13:58:26 +08:00
refactor: 阈值告警支持发布草稿
This commit is contained in:
@@ -39,7 +39,12 @@ import MultiplexingCanvas from '@/views/common/MultiplexingCanvas.vue'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { getPanelAllLinkageInfo, saveLinkage } from '@/api/visualization/linkage'
|
||||
import { queryVisualizationJumpInfo } from '@/api/visualization/linkJump'
|
||||
import { canvasSave, checkCanvasChangePre, initCanvasData } from '@/utils/canvasUtils'
|
||||
import {
|
||||
canvasSave,
|
||||
checkCanvasChangePre,
|
||||
findAllViewsId,
|
||||
initCanvasData
|
||||
} from '@/utils/canvasUtils'
|
||||
import { useEmitt } from '@/hooks/web/useEmitt'
|
||||
import { copyStoreWithOut } from '@/store/modules/data-visualization/copy'
|
||||
import TabsGroup from '@/custom-component/component-group/TabsGroup.vue'
|
||||
@@ -189,11 +194,14 @@ const recoverToPublished = () => {
|
||||
}
|
||||
|
||||
const publishStatusChange = status => {
|
||||
const targetViewIds = []
|
||||
findAllViewsId(componentData.value, targetViewIds)
|
||||
// do update
|
||||
updatePublishStatus({
|
||||
id: dvInfo.value.id,
|
||||
name: dvInfo.value.name,
|
||||
mobileLayout: dvInfo.value.mobileLayout,
|
||||
activeViewIds: targetViewIds,
|
||||
status,
|
||||
type: 'dashboard'
|
||||
}).then(() => {
|
||||
|
||||
@@ -28,7 +28,12 @@ import MediaGroup from '@/custom-component/component-group/MediaGroup.vue'
|
||||
import TextGroup from '@/custom-component/component-group/TextGroup.vue'
|
||||
import CommonGroup from '@/custom-component/component-group/CommonGroup.vue'
|
||||
import DeResourceGroupOpt from '@/views/common/DeResourceGroupOpt.vue'
|
||||
import { canvasSave, checkCanvasChangePre, initCanvasData } from '@/utils/canvasUtils'
|
||||
import {
|
||||
canvasSave,
|
||||
checkCanvasChangePre,
|
||||
findAllViewsId,
|
||||
initCanvasData
|
||||
} from '@/utils/canvasUtils'
|
||||
import { changeSizeWithScale } from '@/utils/changeComponentsSizeWithScale'
|
||||
import MoreComGroup from '@/custom-component/component-group/MoreComGroup.vue'
|
||||
import { XpackComponent } from '@/components/plugin'
|
||||
@@ -313,12 +318,15 @@ const multiplexingCanvasOpen = () => {
|
||||
}
|
||||
|
||||
const publishStatusChange = status => {
|
||||
const targetViewIds = []
|
||||
findAllViewsId(componentData.value, targetViewIds)
|
||||
// do update
|
||||
updatePublishStatus({
|
||||
id: dvInfo.value.id,
|
||||
name: dvInfo.value.name,
|
||||
mobileLayout: dvInfo.value.mobileLayout,
|
||||
status,
|
||||
activeViewIds: targetViewIds,
|
||||
type: 'dataV'
|
||||
}).then(() => {
|
||||
dvMainStore.updateDvInfoCall(status)
|
||||
|
||||
@@ -334,6 +334,7 @@ const removeJumpSenior = () => {
|
||||
:chart="chart"
|
||||
:themes="themes"
|
||||
:is-screen="dvInfo.type === 'dataV'"
|
||||
:resource-table="'snapshot'"
|
||||
jsname="L2NvbXBvbmVudC90aHJlc2hvbGQtd2FybmluZy9TZW5pb3JIYW5kbGVy"
|
||||
/>
|
||||
|
||||
|
||||
@@ -150,6 +150,7 @@ const initOpenHandler = newWindow => {
|
||||
<div class="canvas-opt-button">
|
||||
<el-button
|
||||
v-if="!isIframe"
|
||||
:disabled="dvInfo.status === 0"
|
||||
secondary
|
||||
@click="() => useEmitt().emitter.emit('canvasFullscreen')"
|
||||
>
|
||||
@@ -158,7 +159,7 @@ const initOpenHandler = newWindow => {
|
||||
</template>
|
||||
{{ t('visualization.fullscreen') }}</el-button
|
||||
>
|
||||
<el-button secondary @click="preview()">
|
||||
<el-button secondary @click="preview()" :disabled="dvInfo.status === 0">
|
||||
<template #icon>
|
||||
<icon name="icon_pc_outlined"><icon_pc_outlined class="svg-icon" /></icon>
|
||||
</template>
|
||||
@@ -166,6 +167,7 @@ const initOpenHandler = newWindow => {
|
||||
</el-button>
|
||||
<ShareVisualHead
|
||||
v-if="!shareDisable"
|
||||
:disabled="dvInfo.status === 0"
|
||||
:resource-id="dvInfo.id"
|
||||
:weight="dvInfo.weight"
|
||||
:resource-type="dvInfo.type"
|
||||
@@ -176,7 +178,7 @@ const initOpenHandler = newWindow => {
|
||||
</template>
|
||||
{{ t('visualization.edit') }}</el-button
|
||||
>
|
||||
<el-dropdown popper-class="pad12" trigger="click">
|
||||
<el-dropdown :disabled="dvInfo.status === 0" popper-class="pad12" trigger="click">
|
||||
<el-icon class="head-more-icon">
|
||||
<Icon name="dv-head-more"><dvHeadMore class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<el-button
|
||||
secondary
|
||||
v-if="props.weight >= 7"
|
||||
:disabled="disabled"
|
||||
@click="openPopover"
|
||||
v-click-outside="clickOutPopover"
|
||||
>
|
||||
@@ -242,7 +243,8 @@ const { t } = useI18n()
|
||||
const props = defineProps({
|
||||
resourceId: propTypes.string.def(''),
|
||||
resourceType: propTypes.string.def(''),
|
||||
weight: propTypes.number.def(0)
|
||||
weight: propTypes.number.def(0),
|
||||
disabled: propTypes.bool.def(false)
|
||||
})
|
||||
const popoverVisible = ref(false)
|
||||
const pwdRef = ref(null)
|
||||
|
||||
Reference in New Issue
Block a user