更新前端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 { installDirective } from '@/directive'
|
||||
// import FcDesigner from '@form-create/designer';
|
||||
import '@/utils/DateUtil'
|
||||
import '@/permission'
|
||||
import WebSocketPlugin from '../../websocket'
|
||||
|
@ -24,6 +24,7 @@ const DashboardPanel = defineAsyncComponent(
|
||||
)
|
||||
|
||||
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 DashboardEmpty = defineAsyncComponent(() => import('@/views/mobile/panel/DashboardEmpty.vue'))
|
||||
@ -48,7 +49,8 @@ const componentMap = {
|
||||
DashboardPanel,
|
||||
DatasetEditor,
|
||||
DashboardEmpty,
|
||||
Copilot
|
||||
Copilot,
|
||||
TemplateManage
|
||||
}
|
||||
|
||||
const isDataFilling = ref(false)
|
||||
|
@ -81,7 +81,7 @@ onBeforeMount(async () => {
|
||||
|
||||
req(
|
||||
embeddedParams.dvId,
|
||||
embeddedParams.busiFlag,
|
||||
{ busiFlag: embeddedParams.busiFlag },
|
||||
function ({
|
||||
canvasDataResult,
|
||||
canvasStyleResult,
|
||||
|
@ -11,6 +11,7 @@ import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { XpackComponent } from '@/components/plugin'
|
||||
import EmptyBackground from '../../components/empty-background/src/EmptyBackground.vue'
|
||||
import exeRequest from '@/config/axios'
|
||||
const { wsCache } = useCache()
|
||||
const interactiveStore = interactiveStoreWithOut()
|
||||
const embeddedStore = useEmbedded()
|
||||
@ -55,7 +56,7 @@ const checkPer = async resourceId => {
|
||||
if (!window.DataEaseBi || !resourceId) {
|
||||
return true
|
||||
}
|
||||
const request = { busiFlag: embeddedParams.busiFlag }
|
||||
const request = { busiFlag: embeddedParams.busiFlag, resourceTable: 'core' }
|
||||
await interactiveStore.setInteractive(request)
|
||||
const key = embeddedParams.busiFlag === 'dataV' ? 'screen-weight' : 'panel-weight'
|
||||
return check(wsCache.get(key), resourceId, 1)
|
||||
@ -69,6 +70,13 @@ onBeforeMount(async () => {
|
||||
state.suffixId = embeddedParams.suffixId || 'common'
|
||||
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
|
||||
await getOuterParamsInfo(embeddedParams.dvId).then(rsp => {
|
||||
@ -87,11 +95,14 @@ onBeforeMount(async () => {
|
||||
return
|
||||
}
|
||||
}
|
||||
if (tokenInfo && Object.keys(tokenInfo).length) {
|
||||
attachParams = Object.assign({}, attachParams, tokenInfo)
|
||||
}
|
||||
const chartId = embeddedParams?.chartId
|
||||
|
||||
initCanvasData(
|
||||
embeddedParams.dvId,
|
||||
embeddedParams.busiFlag,
|
||||
{ busiFlag: embeddedParams.busiFlag },
|
||||
function ({ canvasDataResult, canvasStyleResult, dvInfo, canvasViewInfoPreview }) {
|
||||
state.canvasDataPreview = canvasDataResult
|
||||
state.canvasStylePreview = canvasStyleResult
|
||||
|
Loading…
Reference in New Issue
Block a user