Compare commits
No commits in common. "ca515c0b56653dc10eba39535e5a9c1c69779722" and "559c08a557216ac0b940c7d030032a107cc13871" have entirely different histories.
ca515c0b56
...
559c08a557
@ -10,6 +10,6 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<script type="module" src="./src/main.ts"></script>
|
<script type="module" src="./src/main.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,69 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 通过图表对象获取数据
|
|
||||||
export const getData = async (data:any) => {
|
|
||||||
delete data.data
|
|
||||||
return request.post('/chartData/getData', data).then((res:any) => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
return res?.data
|
|
||||||
} else {
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export const innerExportDetails = async (data: any) => {
|
|
||||||
return request.post('/chartData/innerExportDetails', data, {
|
|
||||||
method: 'post',
|
|
||||||
responseType: 'blob'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export const innerExportDataSetDetails = async (data: any) => {
|
|
||||||
return request.post('/chartData/innerExportDataSetDetails', data, {
|
|
||||||
method: 'post',
|
|
||||||
responseType: 'blob'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 通过图表id获取数据
|
|
||||||
export const getChart = async (id: string) => {
|
|
||||||
return request.post(`/chart/getChart/${id}`, {}).then(res => {
|
|
||||||
return res?.data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 单个图表保存测试
|
|
||||||
export const saveChart = async (data: any) => {
|
|
||||||
delete data.data
|
|
||||||
return request.post('/chart/save', data).then(res => {
|
|
||||||
return res?.data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取单个字段枚举值
|
|
||||||
export const getFieldData = async ({ fieldId, fieldType, data }: { fieldId: string, fieldType: string, data: any }) => {
|
|
||||||
delete data.data
|
|
||||||
return request
|
|
||||||
.post(`/chartData/getFieldData/${fieldId}/${fieldType}`, data)
|
|
||||||
.then(res => {
|
|
||||||
return res
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取下钻字段枚举值
|
|
||||||
export const getDrillFieldData = async ({ fieldId, data }: { fieldId: string, data: any }) => {
|
|
||||||
delete data.data
|
|
||||||
return request.post(`/chartData/getDrillFieldData/${fieldId}`, data).then(res => {
|
|
||||||
return res
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getChartDetail = async (id: string) => {
|
|
||||||
return request.post(`chart/getDetail/${id}`, {}).then(res => {
|
|
||||||
return res
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export const checkSameDataSet = async (viewIdSource: string, viewIdTarget: string) =>
|
|
||||||
request.get('/chart/checkSameDataSet/' + viewIdSource + '/' + viewIdTarget)
|
|
@ -1,95 +0,0 @@
|
|||||||
<script lang="ts" setup>
|
|
||||||
import { ref, onMounted, reactive,nextTick,onBeforeMount } from 'vue'
|
|
||||||
import { useRoute } from 'vue-router'
|
|
||||||
import DvPreview from './DvPreview.vue'
|
|
||||||
|
|
||||||
// import { initCanvasData } from '@/utils/canvasUtils'
|
|
||||||
// import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
|
||||||
const dvMainStore = dvMainStoreWithOut()
|
|
||||||
const state = reactive({
|
|
||||||
canvasDataPreview: null,
|
|
||||||
canvasStylePreview: null,
|
|
||||||
canvasViewInfoPreview: null,
|
|
||||||
dvInfo: null,
|
|
||||||
curPreviewGap: 0
|
|
||||||
})
|
|
||||||
const dataInitState = ref(true)
|
|
||||||
const downloadStatus = ref(false)
|
|
||||||
const dvPreviewRef = ref(null)
|
|
||||||
const showPosition = ref("preview")
|
|
||||||
const route = useRoute()
|
|
||||||
const applicationId:any = ref('')
|
|
||||||
const busiFlag = ref('dataV')
|
|
||||||
onMounted(() => {
|
|
||||||
applicationId.value = route.query.id
|
|
||||||
loadCanvasData("1927640677370306561",9,0)
|
|
||||||
})
|
|
||||||
const loadCanvasData = (dvId, weight?, ext?) => {
|
|
||||||
const initMethod = initCanvasData
|
|
||||||
dataInitState.value = false
|
|
||||||
initMethod(
|
|
||||||
dvId,
|
|
||||||
busiFlag.value,
|
|
||||||
function ({
|
|
||||||
canvasDataResult,
|
|
||||||
canvasStyleResult,
|
|
||||||
dvInfo,
|
|
||||||
canvasViewInfoPreview,
|
|
||||||
curPreviewGap
|
|
||||||
}) {
|
|
||||||
dvInfo['weight'] = weight
|
|
||||||
dvInfo['ext'] = ext || 0
|
|
||||||
state.canvasDataPreview = canvasDataResult
|
|
||||||
state.canvasStylePreview = canvasStyleResult
|
|
||||||
state.canvasViewInfoPreview = canvasViewInfoPreview
|
|
||||||
state.dvInfo = dvInfo
|
|
||||||
state.curPreviewGap = curPreviewGap
|
|
||||||
dataInitState.value = true
|
|
||||||
dvMainStore.updateCurDvInfo(dvInfo)
|
|
||||||
nextTick(() => {
|
|
||||||
dvPreviewRef.value?.restore()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
onBeforeMount(() => {
|
|
||||||
dvMainStore.canvasDataInit()
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
<template>
|
|
||||||
<div class="project-box">
|
|
||||||
<dv-preview
|
|
||||||
ref="dvPreviewRef"
|
|
||||||
class="dvPreviewRef"
|
|
||||||
v-if="state.canvasStylePreview && dataInitState"
|
|
||||||
:show-position="showPosition"
|
|
||||||
:canvas-data-preview="state.canvasDataPreview"
|
|
||||||
:canvas-style-preview="state.canvasStylePreview"
|
|
||||||
:canvas-view-info-preview="state.canvasViewInfoPreview"
|
|
||||||
:dv-info="state.dvInfo"
|
|
||||||
:cur-preview-gap="state.curPreviewGap"
|
|
||||||
:download-status="downloadStatus"
|
|
||||||
></dv-preview>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style lang="less" scoped>
|
|
||||||
.project-box{
|
|
||||||
width: 100vw;
|
|
||||||
height: 100vh;
|
|
||||||
background-color: rgba(21, 21, 21, 1);
|
|
||||||
.project-content{
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.Leftmenu{
|
|
||||||
position: relative;
|
|
||||||
z-index:2;
|
|
||||||
}
|
|
||||||
.dvPreviewRef{
|
|
||||||
position: relative;
|
|
||||||
z-index:1;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -3,7 +3,7 @@ import App from './App.vue'
|
|||||||
import router from './router'
|
import router from './router'
|
||||||
import { createPinia } from 'pinia'
|
import { createPinia } from 'pinia'
|
||||||
import ElementPlus from 'element-plus'
|
import ElementPlus from 'element-plus'
|
||||||
import FcDesigner from '@/data-collect/index.es.js'
|
import FcDesigner from '@/fcDesignerPro/index.es.js'
|
||||||
import 'element-plus/dist/index.css'
|
import 'element-plus/dist/index.css'
|
||||||
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
||||||
import './styles/index.scss'
|
import './styles/index.scss'
|
@ -2,16 +2,15 @@ import { createRouter, createWebHistory } from 'vue-router'
|
|||||||
import { useUserStore } from '@/store/user'
|
import { useUserStore } from '@/store/user'
|
||||||
|
|
||||||
// 路由配置
|
// 路由配置
|
||||||
const routes:any = [
|
const routes = [
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
redirect: '/dashboard'
|
redirect: '/dashboard'
|
||||||
},
|
},
|
||||||
// 登录页面路由配置
|
|
||||||
{
|
{
|
||||||
path: '/login',
|
path: '/login',
|
||||||
name: 'Login',
|
name: 'Login',
|
||||||
component: () => import('@/data-public/Login.vue'), // 使用标准组件路径
|
component: () => import('@/views/Login.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: '登录',
|
title: '登录',
|
||||||
requiresAuth: false
|
requiresAuth: false
|
||||||
@ -20,7 +19,7 @@ const routes:any = [
|
|||||||
{
|
{
|
||||||
path: '/dashboard',
|
path: '/dashboard',
|
||||||
name: 'Dashboard',
|
name: 'Dashboard',
|
||||||
component: () => import('@/data-public/Dashboard.vue'),
|
component: () => import('@/views/Dashboard.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: '仪表板',
|
title: '仪表板',
|
||||||
requiresAuth: true
|
requiresAuth: true
|
||||||
@ -29,7 +28,7 @@ const routes:any = [
|
|||||||
{
|
{
|
||||||
path: '/users',
|
path: '/users',
|
||||||
name: 'Users',
|
name: 'Users',
|
||||||
component: () => import('@/data-public/Users.vue'),
|
component: () => import('@/views/Users.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: '用户管理',
|
title: '用户管理',
|
||||||
requiresAuth: true
|
requiresAuth: true
|
||||||
@ -38,7 +37,7 @@ const routes:any = [
|
|||||||
{
|
{
|
||||||
path: '/roles',
|
path: '/roles',
|
||||||
name: 'Roles',
|
name: 'Roles',
|
||||||
component: () => import('@/data-public/Roles.vue'),
|
component: () => import('@/views/Roles.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: '角色管理',
|
title: '角色管理',
|
||||||
requiresAuth: true
|
requiresAuth: true
|
||||||
@ -47,7 +46,7 @@ const routes:any = [
|
|||||||
{
|
{
|
||||||
path: '/organizations',
|
path: '/organizations',
|
||||||
name: 'Organizations',
|
name: 'Organizations',
|
||||||
component: () => import('@/data-public/Organizations.vue'),
|
component: () => import('@/views/Organizations.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: '组织管理',
|
title: '组织管理',
|
||||||
requiresAuth: true
|
requiresAuth: true
|
||||||
@ -56,7 +55,7 @@ const routes:any = [
|
|||||||
{
|
{
|
||||||
path: '/dictionaries',
|
path: '/dictionaries',
|
||||||
name: 'Dictionaries',
|
name: 'Dictionaries',
|
||||||
component: () => import('@/data-public/Dictionaries.vue'),
|
component: () => import('@/views/Dictionaries.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: '字典管理',
|
title: '字典管理',
|
||||||
requiresAuth: true
|
requiresAuth: true
|
||||||
@ -65,7 +64,7 @@ const routes:any = [
|
|||||||
{
|
{
|
||||||
path: '/FormCreateDesigner',
|
path: '/FormCreateDesigner',
|
||||||
name: 'FormCreateDesigner',
|
name: 'FormCreateDesigner',
|
||||||
component: () => import('@/data-public/FormCreateDesigner.vue'),
|
component: () => import('@/views/FormCreateDesigner.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: '字典管理',
|
title: '字典管理',
|
||||||
requiresAuth: true
|
requiresAuth: true
|
||||||
@ -74,7 +73,7 @@ const routes:any = [
|
|||||||
{
|
{
|
||||||
path: '/:pathMatch(.*)*',
|
path: '/:pathMatch(.*)*',
|
||||||
name: '404',
|
name: '404',
|
||||||
component: () => import('@/data-public/error-page/404.vue'),
|
component: () => import('@/views/error-page/404.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: '页面未找到',
|
title: '页面未找到',
|
||||||
requiresAuth: false
|
requiresAuth: false
|
6
frontend/src/shims-vue.d.ts
vendored
6
frontend/src/shims-vue.d.ts
vendored
@ -1,6 +0,0 @@
|
|||||||
// 类型声明文件
|
|
||||||
declare module '*.vue' {
|
|
||||||
import type { DefineComponent } from 'vue'
|
|
||||||
const component: DefineComponent<{}, {}, any>
|
|
||||||
export default component
|
|
||||||
}
|
|
@ -2,9 +2,11 @@ import axios from 'axios'
|
|||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { useUserStore } from '@/store/user'
|
import { useUserStore } from '@/store/user'
|
||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
|
console.log( import.meta.env.VITE_API_BASE_URL)
|
||||||
|
|
||||||
// 创建axios实例
|
// 创建axios实例
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
baseURL: (import.meta as any).env?.VITE_API_BASE_URL || '/api',
|
baseURL: import.meta.env.VITE_API_BASE_URL || '/api',
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json;charset=UTF-8'
|
'Content-Type': 'application/json;charset=UTF-8'
|
@ -1,20 +0,0 @@
|
|||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"target": "es6",
|
|
||||||
"module": "esnext",
|
|
||||||
"strict": true,
|
|
||||||
"jsx": "preserve",
|
|
||||||
"importHelpers": true,
|
|
||||||
"moduleResolution": "node",
|
|
||||||
"esModuleInterop": true,
|
|
||||||
"skipLibCheck": true,
|
|
||||||
"outDir": "./dist",
|
|
||||||
"baseUrl": ".",
|
|
||||||
"types": ["vite-plugin-vue-type-imports", "vue"],
|
|
||||||
"paths": {
|
|
||||||
"@/*": ["./src/*"]
|
|
||||||
},
|
|
||||||
"lib": ["esnext", "dom", "dom.iterable", "scripthost"]
|
|
||||||
},
|
|
||||||
"include": ["src/**/*"]
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"baseUrl": ".",
|
|
||||||
"paths": {
|
|
||||||
"@/*": ["./frontend/src/*"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user