mirror of
https://github.com/dataease/dataease.git
synced 2025-02-25 03:52:59 +08:00
refactor(仪表板、数据大屏): 应用提示优化
This commit is contained in:
parent
f49bd42c48
commit
554b1b5318
@ -8,6 +8,7 @@ import componentList, {
|
|||||||
import eventBus from '@/utils/eventBus'
|
import eventBus from '@/utils/eventBus'
|
||||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||||
import {
|
import {
|
||||||
|
appCanvasNameCheck,
|
||||||
decompression,
|
decompression,
|
||||||
dvNameCheck,
|
dvNameCheck,
|
||||||
findById,
|
findById,
|
||||||
@ -24,6 +25,7 @@ import {
|
|||||||
} from '@/views/chart/components/editor/util/chart'
|
} from '@/views/chart/components/editor/util/chart'
|
||||||
import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot'
|
import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot'
|
||||||
import { deepCopy } from '@/utils/utils'
|
import { deepCopy } from '@/utils/utils'
|
||||||
|
import { ElMessage } from 'element-plus-secondary'
|
||||||
const dvMainStore = dvMainStoreWithOut()
|
const dvMainStore = dvMainStoreWithOut()
|
||||||
const { curBatchOptComponents, dvInfo, canvasStyleData, componentData, canvasViewInfo, appData } =
|
const { curBatchOptComponents, dvInfo, canvasStyleData, componentData, canvasViewInfo, appData } =
|
||||||
storeToRefs(dvMainStore)
|
storeToRefs(dvMainStore)
|
||||||
@ -355,6 +357,20 @@ export async function canvasSave(callBack) {
|
|||||||
watermarkInfo: null
|
watermarkInfo: null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let dsNameCheck = 'success'
|
||||||
|
if (appData.value) {
|
||||||
|
await appCanvasNameCheck({
|
||||||
|
datasetFolderPid: canvasInfo.datasetFolderPid,
|
||||||
|
datasetFolderName: canvasInfo.datasetFolderName
|
||||||
|
}).then(rsp => {
|
||||||
|
dsNameCheck = rsp.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (dsNameCheck === 'repeat') {
|
||||||
|
ElMessage.error('数据集名称已存在')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
const method = dvInfo.value.id && dvInfo.value.optType !== 'copy' ? updateCanvas : saveCanvas
|
const method = dvInfo.value.id && dvInfo.value.optType !== 'copy' ? updateCanvas : saveCanvas
|
||||||
if (method === updateCanvas) {
|
if (method === updateCanvas) {
|
||||||
await dvNameCheck({
|
await dvNameCheck({
|
||||||
|
Loading…
Reference in New Issue
Block a user