更新前端src/views/pages目录文件
This commit is contained in:
parent
ad7a675a9d
commit
1a6899cf8f
@ -15,7 +15,6 @@ import { setupElementPlus, setupElementPlusIcons } from '@/plugins/element-plus'
|
|||||||
// 注册数据大屏组件
|
// 注册数据大屏组件
|
||||||
import { setupCustomComponent } from '@/custom-component'
|
import { setupCustomComponent } from '@/custom-component'
|
||||||
import { installDirective } from '@/directive'
|
import { installDirective } from '@/directive'
|
||||||
// import FcDesigner from '@form-create/designer';
|
|
||||||
import '@/utils/DateUtil'
|
import '@/utils/DateUtil'
|
||||||
import '@/permission'
|
import '@/permission'
|
||||||
import WebSocketPlugin from '../../websocket'
|
import WebSocketPlugin from '../../websocket'
|
||||||
|
@ -24,6 +24,7 @@ const DashboardPanel = defineAsyncComponent(
|
|||||||
)
|
)
|
||||||
|
|
||||||
const Copilot = defineAsyncComponent(() => import('@/views/copilot/index.vue'))
|
const Copilot = defineAsyncComponent(() => import('@/views/copilot/index.vue'))
|
||||||
|
const TemplateManage = defineAsyncComponent(() => import('@/views/template/indexInject.vue'))
|
||||||
|
|
||||||
const Preview = defineAsyncComponent(() => import('@/views/data-visualization/PreviewCanvas.vue'))
|
const Preview = defineAsyncComponent(() => import('@/views/data-visualization/PreviewCanvas.vue'))
|
||||||
const DashboardEmpty = defineAsyncComponent(() => import('@/views/mobile/panel/DashboardEmpty.vue'))
|
const DashboardEmpty = defineAsyncComponent(() => import('@/views/mobile/panel/DashboardEmpty.vue'))
|
||||||
@ -48,7 +49,8 @@ const componentMap = {
|
|||||||
DashboardPanel,
|
DashboardPanel,
|
||||||
DatasetEditor,
|
DatasetEditor,
|
||||||
DashboardEmpty,
|
DashboardEmpty,
|
||||||
Copilot
|
Copilot,
|
||||||
|
TemplateManage
|
||||||
}
|
}
|
||||||
|
|
||||||
const isDataFilling = ref(false)
|
const isDataFilling = ref(false)
|
||||||
|
@ -81,7 +81,7 @@ onBeforeMount(async () => {
|
|||||||
|
|
||||||
req(
|
req(
|
||||||
embeddedParams.dvId,
|
embeddedParams.dvId,
|
||||||
embeddedParams.busiFlag,
|
{ busiFlag: embeddedParams.busiFlag },
|
||||||
function ({
|
function ({
|
||||||
canvasDataResult,
|
canvasDataResult,
|
||||||
canvasStyleResult,
|
canvasStyleResult,
|
||||||
|
@ -11,6 +11,7 @@ import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
|||||||
import { useI18n } from '@/hooks/web/useI18n'
|
import { useI18n } from '@/hooks/web/useI18n'
|
||||||
import { XpackComponent } from '@/components/plugin'
|
import { XpackComponent } from '@/components/plugin'
|
||||||
import EmptyBackground from '../../components/empty-background/src/EmptyBackground.vue'
|
import EmptyBackground from '../../components/empty-background/src/EmptyBackground.vue'
|
||||||
|
import exeRequest from '@/config/axios'
|
||||||
const { wsCache } = useCache()
|
const { wsCache } = useCache()
|
||||||
const interactiveStore = interactiveStoreWithOut()
|
const interactiveStore = interactiveStoreWithOut()
|
||||||
const embeddedStore = useEmbedded()
|
const embeddedStore = useEmbedded()
|
||||||
@ -55,7 +56,7 @@ const checkPer = async resourceId => {
|
|||||||
if (!window.DataEaseBi || !resourceId) {
|
if (!window.DataEaseBi || !resourceId) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
const request = { busiFlag: embeddedParams.busiFlag }
|
const request = { busiFlag: embeddedParams.busiFlag, resourceTable: 'core' }
|
||||||
await interactiveStore.setInteractive(request)
|
await interactiveStore.setInteractive(request)
|
||||||
const key = embeddedParams.busiFlag === 'dataV' ? 'screen-weight' : 'panel-weight'
|
const key = embeddedParams.busiFlag === 'dataV' ? 'screen-weight' : 'panel-weight'
|
||||||
return check(wsCache.get(key), resourceId, 1)
|
return check(wsCache.get(key), resourceId, 1)
|
||||||
@ -69,6 +70,13 @@ onBeforeMount(async () => {
|
|||||||
state.suffixId = embeddedParams.suffixId || 'common'
|
state.suffixId = embeddedParams.suffixId || 'common'
|
||||||
window.addEventListener('message', winMsgHandle)
|
window.addEventListener('message', winMsgHandle)
|
||||||
|
|
||||||
|
let tokenInfo = null
|
||||||
|
if (embeddedStore.getToken && !Object.keys((tokenInfo = embeddedStore.getTokenInfo)).length) {
|
||||||
|
const res = await exeRequest.get({ url: '/embedded/getTokenArgs' })
|
||||||
|
embeddedStore.setTokenInfo(res.data)
|
||||||
|
tokenInfo = embeddedStore.getTokenInfo
|
||||||
|
}
|
||||||
|
|
||||||
// 添加外部参数
|
// 添加外部参数
|
||||||
let attachParams
|
let attachParams
|
||||||
await getOuterParamsInfo(embeddedParams.dvId).then(rsp => {
|
await getOuterParamsInfo(embeddedParams.dvId).then(rsp => {
|
||||||
@ -87,11 +95,14 @@ onBeforeMount(async () => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (tokenInfo && Object.keys(tokenInfo).length) {
|
||||||
|
attachParams = Object.assign({}, attachParams, tokenInfo)
|
||||||
|
}
|
||||||
const chartId = embeddedParams?.chartId
|
const chartId = embeddedParams?.chartId
|
||||||
|
|
||||||
initCanvasData(
|
initCanvasData(
|
||||||
embeddedParams.dvId,
|
embeddedParams.dvId,
|
||||||
embeddedParams.busiFlag,
|
{ busiFlag: embeddedParams.busiFlag },
|
||||||
function ({ canvasDataResult, canvasStyleResult, dvInfo, canvasViewInfoPreview }) {
|
function ({ canvasDataResult, canvasStyleResult, dvInfo, canvasViewInfoPreview }) {
|
||||||
state.canvasDataPreview = canvasDataResult
|
state.canvasDataPreview = canvasDataResult
|
||||||
state.canvasStylePreview = canvasStyleResult
|
state.canvasStylePreview = canvasStyleResult
|
||||||
|
Loading…
Reference in New Issue
Block a user