fix: 大屏管理
This commit is contained in:
@@ -17,5 +17,5 @@ export const fetchBlockList = []
|
||||
|
||||
// fts 接口列表(不添加 /Visual/v1 前缀)
|
||||
export const ftsList = [
|
||||
'/fts/v1/uploader'
|
||||
'/Assets/v1/fts/uploader'
|
||||
]
|
||||
@@ -11,7 +11,7 @@ const FtsUpload = (data: any, onUploadProgress?: (progress: number) => void) =>
|
||||
const baseUrl = import.meta.env.PROD ? import.meta.env.VITE_PRO_PATH : import.meta.env.VITE_DEV_PATH
|
||||
|
||||
return axiosInstance({
|
||||
url: `${baseUrl}/fts/v1/uploader`,
|
||||
url: `${baseUrl}/Assets/v1/fts/uploader`,
|
||||
method: 'POST',
|
||||
data,
|
||||
headers: {
|
||||
|
||||
@@ -62,12 +62,25 @@ export const routerTurnByPath = (
|
||||
path: string,
|
||||
query?: Array<string | number>,
|
||||
isReplace?: boolean,
|
||||
windowOpen?: boolean
|
||||
windowOpen?: boolean,
|
||||
queryParams?: Record<string, string | number | undefined>
|
||||
) => {
|
||||
let fullPath = ''
|
||||
if (query?.length) {
|
||||
fullPath = `${path}/${query.join('/')}`
|
||||
}
|
||||
const searchParams = new URLSearchParams()
|
||||
if (queryParams) {
|
||||
Object.entries(queryParams).forEach(([key, value]) => {
|
||||
if (value !== undefined && value !== '') {
|
||||
searchParams.set(key, String(value))
|
||||
}
|
||||
})
|
||||
}
|
||||
const queryString = searchParams.toString()
|
||||
if (queryString) {
|
||||
fullPath = `${fullPath}${fullPath.includes('?') ? '&' : '?'}${queryString}`
|
||||
}
|
||||
if (windowOpen) {
|
||||
return openNewWindow(fullPath)
|
||||
}
|
||||
|
||||
@@ -256,7 +256,8 @@ export const useSync = () => {
|
||||
if (res.data) {
|
||||
updateStoreInfo(res.data)
|
||||
// 更新全局数据
|
||||
await updateComponent(JSONParse(res.data.content))
|
||||
const storageInfo = res.data.content ? JSONParse(res.data.content) : chartEditStore.getStorageInfo()
|
||||
await updateComponent(storageInfo || chartEditStore.getStorageInfo())
|
||||
return
|
||||
}else {
|
||||
chartEditStore.setProjectInfo(ProjectInfoEnum.PROJECT_ID, fetchRouteParamsLocation())
|
||||
|
||||
@@ -41,10 +41,13 @@ import { PageEnum, ChartEnum } from '@/enums/pageEnum'
|
||||
import { ResultEnum } from '@/enums/httpEnum'
|
||||
import { fetchPathByName, routerTurnByPath, renderLang, getUUID } from '@/utils'
|
||||
import { createProjectApi } from '@/api/path'
|
||||
import { useSystemStore } from '@/store/modules/systemStore/systemStore'
|
||||
import { SystemStoreUserInfoEnum } from '@/store/modules/systemStore/systemStore.d'
|
||||
|
||||
const { FishIcon, CloseIcon } = icon.ionicons5
|
||||
const { StoreIcon, ObjectStorageIcon } = icon.carbon
|
||||
const showRef = ref(false)
|
||||
const systemStore = useSystemStore()
|
||||
|
||||
const emit = defineEmits(['close'])
|
||||
const props = defineProps({
|
||||
@@ -101,7 +104,8 @@ const btnHandle = async (key: string) => {
|
||||
|
||||
const { identity } = res.data
|
||||
const path = fetchPathByName(ChartEnum.CHART_HOME_NAME, 'href')
|
||||
routerTurnByPath(path, [identity], undefined, true)
|
||||
const token = systemStore.getUserInfo?.[SystemStoreUserInfoEnum.USER_TOKEN]
|
||||
routerTurnByPath(path, [identity], undefined, true, { token })
|
||||
closeHandle()
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
@@ -35,9 +35,12 @@ import { ChartEnum } from '@/enums/pageEnum'
|
||||
import { fetchPathByName, routerTurnByPath, getUUID } from '@/utils'
|
||||
import { createProjectApi } from '@/api/path'
|
||||
import { ResultEnum } from '@/enums/httpEnum'
|
||||
import { useSystemStore } from '@/store/modules/systemStore/systemStore'
|
||||
import { SystemStoreUserInfoEnum } from '@/store/modules/systemStore/systemStore.d'
|
||||
|
||||
const { DuplicateIcon, DuplicateOutlineIcon } = icon.ionicons5
|
||||
const designStore = useDesignStore()
|
||||
const systemStore = useSystemStore()
|
||||
|
||||
const props = defineProps({
|
||||
collapsed: Boolean
|
||||
@@ -58,7 +61,8 @@ const clickHandle = async () => {
|
||||
const { identity } = res.data || {}
|
||||
console.log('identity', identity)
|
||||
const path = fetchPathByName(ChartEnum.CHART_HOME_NAME, 'href')
|
||||
routerTurnByPath(path, [identity], undefined, true)
|
||||
const token = systemStore.getUserInfo?.[SystemStoreUserInfoEnum.USER_TOKEN]
|
||||
routerTurnByPath(path, [identity], undefined, true, { token })
|
||||
} else {
|
||||
window['$message'].error(window['$t']('project.create_failure'))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user