diff --git a/backend/apps/dashboard/api/dashboard_api.py b/backend/apps/dashboard/api/dashboard_api.py
index 6ea7a416..f290d8d3 100644
--- a/backend/apps/dashboard/api/dashboard_api.py
+++ b/backend/apps/dashboard/api/dashboard_api.py
@@ -2,7 +2,7 @@ from fastapi import APIRouter, File, UploadFile, HTTPException
from apps.dashboard.crud.dashboard_service import list_resource, load_resource, \
create_resource, create_canvas, validate_name, delete_resource, update_resource, update_canvas
-from apps.dashboard.models.dashboard_model import CreateDashboard, BaseDashboard, QueryDashboard
+from apps.dashboard.models.dashboard_model import CreateDashboard, BaseDashboard, QueryDashboard,DashboardResponse
from common.core.deps import SessionDep, CurrentUser
router = APIRouter(tags=["dashboard"], prefix="/dashboard")
diff --git a/backend/apps/dashboard/crud/dashboard_service.py b/backend/apps/dashboard/crud/dashboard_service.py
index 83064acd..8f6c6ceb 100644
--- a/backend/apps/dashboard/crud/dashboard_service.py
+++ b/backend/apps/dashboard/crud/dashboard_service.py
@@ -24,8 +24,19 @@ def list_resource(session: SessionDep, dashboard: QueryDashboard):
return tree
-def load_resource(session: SessionDep,dashboard: QueryDashboard):
- return session.query(CoreDashboard).filter(CoreDashboard.id == dashboard.id).first()
+def load_resource(session: SessionDep, dashboard: QueryDashboard):
+ sql = text("""
+ SELECT cd.*,
+ creator.name AS create_name,
+ updator.name AS update_name
+ FROM core_dashboard cd
+ LEFT JOIN sys_user creator ON cd.create_by = creator.id::varchar
+ LEFT JOIN sys_user updator
+ ON cd.update_by = updator.id:: varchar
+ WHERE cd.id = :dashboard_id
+ """)
+ result = session.execute(sql, {"dashboard_id": dashboard.id}).mappings().first()
+ return result
def get_create_base_info(user: CurrentUser, dashboard: CreateDashboard):
diff --git a/backend/apps/dashboard/models/dashboard_model.py b/backend/apps/dashboard/models/dashboard_model.py
index 20e14e4f..6104c7da 100644
--- a/backend/apps/dashboard/models/dashboard_model.py
+++ b/backend/apps/dashboard/models/dashboard_model.py
@@ -133,6 +133,10 @@ class DashboardBaseResponse(BaseModel):
update_time: Optional[int] = None
children: List['DashboardBaseResponse'] = []
+class DashboardResponse(CoreDashboard):
+ update_name: Optional[str] = None
+ create_name: Optional[str] = None
+
class BaseDashboard(BaseModel):
id: str = ''
name: str = ''
diff --git a/frontend/package.json b/frontend/package.json
index 032ddb4f..041a7350 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -16,6 +16,7 @@
"dayjs": "^1.11.13",
"element-plus": "^2.10.1",
"element-plus-secondary": "^1.0.0",
+ "element-resize-detector": "^1.2.4",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
"snowflake-id": "^1.1.0",
@@ -28,6 +29,7 @@
"devDependencies": {
"@element-plus/icons-vue": "^2.3.1",
"@types/crypto-js": "^4.2.2",
+ "@types/element-resize-detector": "^1.1.6",
"@types/node": "^22.14.1",
"@vitejs/plugin-vue": "^5.2.2",
"@vue/tsconfig": "^0.7.0",
diff --git a/frontend/src/stores/dashboard/dashboard.ts b/frontend/src/stores/dashboard/dashboard.ts
index 2bf9cb7d..a747a014 100644
--- a/frontend/src/stores/dashboard/dashboard.ts
+++ b/frontend/src/stores/dashboard/dashboard.ts
@@ -20,12 +20,12 @@ export const dashboardStore = defineStore('dashboard', {
workspaceId: null,
status: null,
dataState: null,
- type: null,
- creatorName: null,
+ createName: null,
updateName: null,
createTime: null,
updateTime: null,
- contentId: null
+ contentId: null,
+ type: null
}
}
},
diff --git a/frontend/src/views/dashboard/common/DashboardDetailInfo.vue b/frontend/src/views/dashboard/common/DashboardDetailInfo.vue
index 5b82e301..5e3816f9 100644
--- a/frontend/src/views/dashboard/common/DashboardDetailInfo.vue
+++ b/frontend/src/views/dashboard/common/DashboardDetailInfo.vue
@@ -4,12 +4,12 @@
Dashboard ID
{{ dashboardInfo.id }}
- Creator
- Creator Name
+ Creator
+ {{ dashboardInfo.createName }}
Create Time
{{ timestampFormatDate(dashboardInfo.createTime) }}
Updator
- Updator Name
+ {{ dashboardInfo.updateName }}
Update Time
{{ timestampFormatDate(dashboardInfo.updateTime) }}
@@ -19,17 +19,19 @@
@@ -45,6 +47,7 @@ const timestampFormatDate = (value:any) => {
font-size: 14px;
margin-bottom: 4px;
}
+
.info-content {
color: #1f2329;
font-size: 14px;
diff --git a/frontend/src/views/dashboard/components/sq-tab/index.vue b/frontend/src/views/dashboard/components/sq-tab/index.vue
index f40a7667..96099115 100644
--- a/frontend/src/views/dashboard/components/sq-tab/index.vue
+++ b/frontend/src/views/dashboard/components/sq-tab/index.vue
@@ -23,6 +23,19 @@ const props = defineProps({
configItem: {
type: Object as PropType
,
required: true
+ },
+ canvasViewInfo: {
+ type: Object,
+ required: true
+ },
+ showPosition: {
+ required: false,
+ type: String,
+ default: 'preview'
+ },
+ canvasId: {
+ type: String,
+ default: 'canvas-main'
}
})
@@ -220,11 +233,11 @@ defineExpose({
position: absolute;
width: 100%;
height: 100%;
- margin: 2px!important;// border size
+ margin: 2px !important; // border size
}
-.tab-dashboard-editor-main{
- height: 100%!important;
+.tab-dashboard-editor-main {
+ height: 100% !important;
}
.tab-moveout {
diff --git a/frontend/src/views/dashboard/editor/index.vue b/frontend/src/views/dashboard/editor/index.vue
index 2861c417..4be1147b 100644
--- a/frontend/src/views/dashboard/editor/index.vue
+++ b/frontend/src/views/dashboard/editor/index.vue
@@ -8,7 +8,6 @@ import cloneDeep from 'lodash/cloneDeep';
import {storeToRefs} from "pinia";
import {dashboardStoreWithOut} from "@/stores/dashboard/dashboard.ts";
import router from '@/router'
-import {dashboardApi} from "@/api/dashboard.ts";
import {initCanvasData} from "@/views/dashboard/utils/canvasUtils.ts";
const dashboardStore = dashboardStoreWithOut()
diff --git a/frontend/src/views/dashboard/preview/SQComponentWrapper.vue b/frontend/src/views/dashboard/preview/SQComponentWrapper.vue
new file mode 100644
index 00000000..4c541016
--- /dev/null
+++ b/frontend/src/views/dashboard/preview/SQComponentWrapper.vue
@@ -0,0 +1,73 @@
+
+
+
+
+
+
+
diff --git a/frontend/src/views/dashboard/preview/SQPreview.vue b/frontend/src/views/dashboard/preview/SQPreview.vue
index 2f86b473..428d13bf 100644
--- a/frontend/src/views/dashboard/preview/SQPreview.vue
+++ b/frontend/src/views/dashboard/preview/SQPreview.vue
@@ -1,11 +1,168 @@
-
+
+
+
+
+
-
\ No newline at end of file
+ div::-webkit-scrollbar {
+ width: 0 !important;
+ height: 0 !important;
+ }
+
+ div {
+ -ms-overflow-style: none; /* IE and Edge */
+ scrollbar-width: none; /* Firefox */
+ }
+}
+
+.fix-button {
+ position: fixed !important;
+}
+
+.datav-preview {
+ overflow-y: hidden !important;
+}
+
+.datav-preview-unpublish {
+ background-color: inherit !important;
+}
+
diff --git a/frontend/src/views/dashboard/preview/SQPreviewHead.vue b/frontend/src/views/dashboard/preview/SQPreviewHead.vue
index 875fdb16..f6a057ea 100644
--- a/frontend/src/views/dashboard/preview/SQPreviewHead.vue
+++ b/frontend/src/views/dashboard/preview/SQPreviewHead.vue
@@ -3,28 +3,31 @@ import dashboardInfoSvg from '@/assets/svg/dashboard-info.svg'
import icon_pc_outlined from '@/assets/svg/icon_pc_outlined.svg'
import icon_edit_outlined from '@/assets/svg/icon_edit_outlined.svg'
import DashboardDetailInfo from "@/views/dashboard/common/DashboardDetailInfo.vue";
-import {dashboardStoreWithOut} from "@/stores/dashboard/dashboard.ts";
-import {storeToRefs} from "pinia";
const emit = defineEmits(['reload', 'download', 'downloadAsAppTemplate'])
-const dashboardStore = dashboardStoreWithOut()
-const {dashboardInfo} = storeToRefs(dashboardStore)
const preview = () => {}
const edit = () =>{}
+
+
+defineProps({
+ dashboardInfo: {
+ type: Object,
+ required: true
+ }
+})
+
{{ dashboardInfo.name }}
-
-
-
Creator:{{ dashboardInfo.creatorName }}
+
+
Creator:{{ dashboardInfo.createName }}
+
-
+