web打包修改
This commit is contained in:
14
docker/urbanLifeline/nginx/.env.example
Normal file
14
docker/urbanLifeline/nginx/.env.example
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# ------------------------------
|
||||||
|
# 挂载目录配置
|
||||||
|
# ------------------------------
|
||||||
|
# 数据目录
|
||||||
|
DATA_ROOT=./volumes
|
||||||
|
|
||||||
|
# 配置文件目录
|
||||||
|
CONFIG_ROOT=./volumes
|
||||||
|
|
||||||
|
# 配置文件位置
|
||||||
|
CONFIG_FILE_ROOT=./volumes
|
||||||
|
|
||||||
|
# SSL证书目录
|
||||||
|
SSL_ROOT=
|
||||||
@@ -17,11 +17,11 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
TZ: Asia/Shanghai
|
TZ: Asia/Shanghai
|
||||||
volumes:
|
volumes:
|
||||||
- ./volumes/nginx/logs:/var/log/nginx
|
- ${LOG_ROOT:-./volumes/nginx/logs}:/var/log/nginx
|
||||||
- ./volumes/nginx.conf:/etc/nginx/nginx.conf:ro
|
- ${CONFIG_FILE_ROOT:-./volumes/nginx.conf}:/etc/nginx/nginx.conf:ro
|
||||||
- ./volumes/conf.d:/etc/nginx/conf.d:ro
|
- ${CONFIG_ROOT:-./volumes/conf.d}:/etc/nginx/conf.d:ro
|
||||||
# SSL 证书(可选)
|
# SSL 证书(可选)
|
||||||
- ./volumes/cert:/etc/nginx/ssl:ro
|
- ${SSL_ROOT:-./volumes/cert}:/etc/nginx/ssl:ro
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost/health"]
|
test: ["CMD", "curl", "-f", "http://localhost/health"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
@@ -125,7 +125,7 @@ server {
|
|||||||
|
|
||||||
# 后端 API 代理
|
# 后端 API 代理
|
||||||
location /urban-lifeline/ {
|
location /urban-lifeline/ {
|
||||||
proxy_pass http://gateway/;
|
proxy_pass http://gateway;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
@@ -148,3 +148,4 @@ server {
|
|||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4,6 +4,31 @@
|
|||||||
# ================================================
|
# ================================================
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
# ====================== Redis 缓存 ======================
|
||||||
|
redis:
|
||||||
|
image: redis:7-alpine
|
||||||
|
container_name: urban-lifeline-redis
|
||||||
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
- urban-lifeline
|
||||||
|
expose:
|
||||||
|
- "6379"
|
||||||
|
environment:
|
||||||
|
TZ: Asia/Shanghai
|
||||||
|
command: redis-server --appendonly yes --requirepass ${REDIS_PASSWORD:-redis123}
|
||||||
|
volumes:
|
||||||
|
- ${REDIS_DATA:-./volumes/redis}:/data
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
memory: ${REDIS_MEMORY_LIMIT:-512M}
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD:-redis123}", "ping"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 3
|
||||||
|
|
||||||
|
# ====================== 后端服务 ======================
|
||||||
urban-lifeline-serv:
|
urban-lifeline-serv:
|
||||||
image: urban-lifeline-serv:${IMAGE_VERSION:-latest}
|
image: urban-lifeline-serv:${IMAGE_VERSION:-latest}
|
||||||
container_name: urban-lifeline-serv
|
container_name: urban-lifeline-serv
|
||||||
@@ -12,13 +37,20 @@ services:
|
|||||||
- .env
|
- .env
|
||||||
networks:
|
networks:
|
||||||
- urban-lifeline
|
- urban-lifeline
|
||||||
ports:
|
# 不对外暴露端口,仅通过 nginx 反向代理访问
|
||||||
- "${GATEWAY_PORT:-8080}:8080"
|
expose:
|
||||||
|
- "8080"
|
||||||
environment:
|
environment:
|
||||||
TZ: Asia/Shanghai
|
TZ: Asia/Shanghai
|
||||||
SPRING_PROFILES_ACTIVE: ${SPRING_PROFILES_ACTIVE:-prod}
|
SPRING_PROFILES_ACTIVE: ${SPRING_PROFILES_ACTIVE:-prod}
|
||||||
NACOS_SERVER_ADDR: ${NACOS_SERVER_ADDR:-nacos:8848}
|
NACOS_SERVER_ADDR: ${NACOS_SERVER_ADDR:-nacos:8848}
|
||||||
NACOS_NAMESPACE: ${NACOS_NAMESPACE:-}
|
NACOS_NAMESPACE: ${NACOS_NAMESPACE:-}
|
||||||
|
REDIS_HOST: urban-lifeline-redis
|
||||||
|
REDIS_PORT: 6379
|
||||||
|
REDIS_PASSWORD: ${REDIS_PASSWORD:-redis123}
|
||||||
|
depends_on:
|
||||||
|
redis:
|
||||||
|
condition: service_healthy
|
||||||
volumes:
|
volumes:
|
||||||
# 配置文件目录
|
# 配置文件目录
|
||||||
- ${CONFIG_ROOT:-./volumes/config}:/app/config:ro
|
- ${CONFIG_ROOT:-./volumes/config}:/app/config:ro
|
||||||
|
|||||||
@@ -12,12 +12,13 @@ services:
|
|||||||
- .env
|
- .env
|
||||||
networks:
|
networks:
|
||||||
- urban-lifeline
|
- urban-lifeline
|
||||||
ports:
|
# 不对外暴露端口,仅通过 nginx 反向代理访问
|
||||||
- "${SHARED_PORT:-8000}:8000"
|
expose:
|
||||||
- "${PLATFORM_PORT:-8001}:8001"
|
- "8000"
|
||||||
- "${WORKCASE_PORT:-8002}:8002"
|
- "8001"
|
||||||
- "${BIDDING_PORT:-8003}:8003"
|
- "8002"
|
||||||
- "${WORKCASE_WECHAT_PORT:-8004}:8004"
|
- "8003"
|
||||||
|
- "8004"
|
||||||
environment:
|
environment:
|
||||||
TZ: Asia/Shanghai
|
TZ: Asia/Shanghai
|
||||||
SHARED_PORT: ${SHARED_PORT:-8000}
|
SHARED_PORT: ${SHARED_PORT:-8000}
|
||||||
|
|||||||
@@ -245,5 +245,5 @@ watch(
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import url("./SidebarLayout.scss");
|
@import "./SidebarLayout.scss";
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ import { createPinia } from 'pinia'
|
|||||||
import ElementPlus from 'element-plus'
|
import ElementPlus from 'element-plus'
|
||||||
import 'element-plus/dist/index.css'
|
import 'element-plus/dist/index.css'
|
||||||
|
|
||||||
|
// 导入 shared 的全局样式(Module Federation 远程模块样式)
|
||||||
|
import 'shared/styles'
|
||||||
|
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
import router from './router/'
|
import router from './router/'
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
import type { RouteRecordRaw } from 'vue-router'
|
import type { RouteRecordRaw } from 'vue-router'
|
||||||
import router from './index'
|
import router from './index'
|
||||||
import { SidebarLayout, BlankLayout, SubSidebarLayout } from '@/layouts'
|
import { SidebarLayout } from '@/layouts'
|
||||||
|
|
||||||
// 动态导入 shared 模块(避免顶层 import 阻塞)
|
// 动态导入 shared 模块(避免顶层 import 阻塞)
|
||||||
async function loadSharedModules() {
|
async function loadSharedModules() {
|
||||||
@@ -25,10 +25,11 @@ async function loadSharedModules() {
|
|||||||
// Bidding 布局组件映射
|
// Bidding 布局组件映射
|
||||||
const biddingLayoutMap: Record<string, () => Promise<any>> = {
|
const biddingLayoutMap: Record<string, () => Promise<any>> = {
|
||||||
'SidebarLayout': () => Promise.resolve({ default: SidebarLayout }),
|
'SidebarLayout': () => Promise.resolve({ default: SidebarLayout }),
|
||||||
'BlankLayout': () => Promise.resolve({ default: BlankLayout }),
|
|
||||||
'NavigationLayout': () => Promise.resolve({ default: SidebarLayout }),
|
'NavigationLayout': () => Promise.resolve({ default: SidebarLayout }),
|
||||||
'BasicLayout': () => Promise.resolve({ default: SidebarLayout }),
|
'BasicLayout': () => Promise.resolve({ default: SidebarLayout }),
|
||||||
'SubSidebarLayout': () => Promise.resolve({ default: SubSidebarLayout })
|
// 动态导入 shared 的布局组件,避免静态导入阻塞
|
||||||
|
'BlankLayout': () => import('shared/layouts').then(m => ({ default: m.BlankLayout })),
|
||||||
|
'SubSidebarLayout': () => import('shared/layouts').then(m => ({ default: m.SubSidebarLayout }))
|
||||||
}
|
}
|
||||||
|
|
||||||
// 视图组件加载器
|
// 视图组件加载器
|
||||||
|
|||||||
@@ -251,5 +251,5 @@ watch(
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import url("./AdminSidebarLayout.scss");
|
@import "./AdminSidebarLayout.scss";
|
||||||
</style>
|
</style>
|
||||||
@@ -269,5 +269,5 @@ watch(
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import url("./SidebarLayout.scss");
|
@import "./SidebarLayout.scss";
|
||||||
</style>
|
</style>
|
||||||
@@ -5,6 +5,9 @@ import { createPinia } from 'pinia'
|
|||||||
import ElementPlus from 'element-plus'
|
import ElementPlus from 'element-plus'
|
||||||
import 'element-plus/dist/index.css'
|
import 'element-plus/dist/index.css'
|
||||||
|
|
||||||
|
// 导入 shared 的全局样式(Module Federation 远程模块样式)
|
||||||
|
import 'shared/styles'
|
||||||
|
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
import router from './router/'
|
import router from './router/'
|
||||||
import { AES_SECRET_KEY } from './config'
|
import { AES_SECRET_KEY } from './config'
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
import type { RouteRecordRaw } from 'vue-router'
|
import type { RouteRecordRaw } from 'vue-router'
|
||||||
import router from './index'
|
import router from './index'
|
||||||
import { SidebarLayout, BlankLayout, AdminSidebarLayout, SubSidebarLayout } from '@/layouts'
|
import { SidebarLayout, AdminSidebarLayout } from '@/layouts'
|
||||||
|
|
||||||
// 动态导入 shared 模块(避免顶层 import 阻塞)
|
// 动态导入 shared 模块(避免顶层 import 阻塞)
|
||||||
async function loadSharedModules() {
|
async function loadSharedModules() {
|
||||||
@@ -25,11 +25,12 @@ async function loadSharedModules() {
|
|||||||
// Platform 布局组件映射
|
// Platform 布局组件映射
|
||||||
const platformLayoutMap: Record<string, () => Promise<any>> = {
|
const platformLayoutMap: Record<string, () => Promise<any>> = {
|
||||||
'SidebarLayout': () => Promise.resolve({ default: SidebarLayout }),
|
'SidebarLayout': () => Promise.resolve({ default: SidebarLayout }),
|
||||||
'BlankLayout': () => Promise.resolve({ default: BlankLayout }),
|
|
||||||
'NavigationLayout': () => Promise.resolve({ default: SidebarLayout }),
|
'NavigationLayout': () => Promise.resolve({ default: SidebarLayout }),
|
||||||
'BasicLayout': () => Promise.resolve({ default: SidebarLayout }),
|
'BasicLayout': () => Promise.resolve({ default: SidebarLayout }),
|
||||||
'AdminSidebarLayout': () => Promise.resolve({ default: AdminSidebarLayout }),
|
'AdminSidebarLayout': () => Promise.resolve({ default: AdminSidebarLayout }),
|
||||||
'SubSidebarLayout': () => Promise.resolve({ default: SubSidebarLayout })
|
// 动态导入 shared 的布局组件,避免静态导入阻塞
|
||||||
|
'BlankLayout': () => import('shared/layouts').then(m => ({ default: m.BlankLayout })),
|
||||||
|
'SubSidebarLayout': () => import('shared/layouts').then(m => ({ default: m.SubSidebarLayout }))
|
||||||
}
|
}
|
||||||
|
|
||||||
// 视图组件加载器
|
// 视图组件加载器
|
||||||
|
|||||||
@@ -7,5 +7,5 @@
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import url("./OverviewView.scss");
|
@import "./OverviewView.scss";
|
||||||
</style>
|
</style>
|
||||||
@@ -7,5 +7,5 @@
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import url("./UserManagementView.scss");
|
@import "./UserManagementView.scss";
|
||||||
</style>
|
</style>
|
||||||
@@ -252,5 +252,5 @@ const handleSaveAgent = async (agentData: Partial<Agent>) => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import url('./AgentPlatformView.scss');
|
@import './AgentPlatformView.scss';
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -39,5 +39,5 @@ defineEmits<{
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import url('./AgentCard.scss');
|
@import './AgentCard.scss';
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -248,5 +248,5 @@ const handleSave = () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import url('./AgentEdit.scss');
|
@import './AgentEdit.scss';
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -423,5 +423,5 @@ onMounted(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import url('./AIChatView.scss');
|
@import './AIChatView.scss';
|
||||||
</style>
|
</style>
|
||||||
@@ -105,5 +105,5 @@ const handleSuggestionClick = (suggestion: string) => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import url('./ChatDefault.scss');
|
@import './ChatDefault.scss';
|
||||||
</style>
|
</style>
|
||||||
@@ -4,6 +4,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style lang="scss">
|
||||||
@import url("./DocumentDetail.scss");
|
// DocumentDetail 样式 - 去掉 scoped 以支持 Module Federation
|
||||||
|
.document-detail {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// 文档分段组件样式 - 去掉 scoped 以支持 Module Federation
|
||||||
.segment-dialog {
|
.segment-dialog {
|
||||||
:deep(.el-dialog) {
|
:deep(.el-dialog) {
|
||||||
border-radius: 14px;
|
border-radius: 14px;
|
||||||
@@ -10,7 +11,6 @@
|
|||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #101828;
|
color: #101828;
|
||||||
letter-spacing: -0.02em;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,21 +47,12 @@
|
|||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
padding-right: 4px;
|
padding-right: 4px;
|
||||||
|
|
||||||
&::-webkit-scrollbar {
|
&::-webkit-scrollbar { width: 6px; }
|
||||||
width: 6px;
|
&::-webkit-scrollbar-track { background: transparent; }
|
||||||
}
|
|
||||||
|
|
||||||
&::-webkit-scrollbar-track {
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
&::-webkit-scrollbar-thumb {
|
&::-webkit-scrollbar-thumb {
|
||||||
background: #D1D5DB;
|
background: #D1D5DB;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
|
&:hover { background: #9CA3AF; }
|
||||||
&:hover {
|
|
||||||
background: #9CA3AF;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.segment-item {
|
.segment-item {
|
||||||
@@ -77,9 +68,7 @@
|
|||||||
box-shadow: 0 4px 12px rgba(64, 158, 255, 0.12);
|
box-shadow: 0 4px 12px rgba(64, 158, 255, 0.12);
|
||||||
}
|
}
|
||||||
|
|
||||||
&:last-child {
|
&:last-child { margin-bottom: 0; }
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.segment-header {
|
.segment-header {
|
||||||
@@ -93,7 +82,6 @@
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #101828;
|
color: #101828;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
letter-spacing: -0.01em;
|
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -101,7 +89,6 @@
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #6A7282;
|
color: #6A7282;
|
||||||
letter-spacing: -0.01em;
|
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,14 +102,6 @@
|
|||||||
|
|
||||||
.segment-content {
|
.segment-content {
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
|
|
||||||
.el-textarea {
|
|
||||||
textarea {
|
|
||||||
font-family: inherit;
|
|
||||||
font-size: 14px;
|
|
||||||
line-height: 1.6;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.segment-text {
|
.segment-text {
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
@@ -134,7 +113,6 @@
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
letter-spacing: -0.01em;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,7 +148,6 @@
|
|||||||
gap: 6px;
|
gap: 6px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
color: #667085;
|
color: #667085;
|
||||||
letter-spacing: -0.01em;
|
|
||||||
|
|
||||||
.el-icon {
|
.el-icon {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@@ -190,13 +167,6 @@
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #6A7282;
|
color: #6A7282;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
letter-spacing: -0.01em;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.pagination-container {
|
|
||||||
margin-top: 16px;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
@@ -496,6 +496,6 @@ function formatTimestamp(timestamp: number): string {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss">
|
||||||
@import url("./DocumentSegment.scss");
|
// 样式已分离到 styles/components.scss 统一管理
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -576,6 +576,6 @@ defineExpose({
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss">
|
||||||
@import url("./DynamicFormItem.scss");
|
// 样式已分离到 styles/components.scss 统一管理
|
||||||
</style>
|
</style>
|
||||||
@@ -150,6 +150,6 @@ const handleCustomAction = (key: string, row: KnowledgeFileVO) => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss">
|
||||||
@import url('./FileHistory.scss');
|
// 样式已分离到 styles/components.scss 统一管理
|
||||||
</style>
|
</style>
|
||||||
@@ -574,6 +574,6 @@ defineExpose({
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss">
|
||||||
@import url('./FileUpload.scss');
|
// 样式已分离到 styles/components.scss 统一管理
|
||||||
</style>
|
</style>
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
// IframeView 组件样式
|
||||||
|
.iframe-view {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
.iframe-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 12px 16px;
|
||||||
|
background: var(--el-bg-color);
|
||||||
|
border-bottom: 1px solid var(--el-border-color-light);
|
||||||
|
flex-shrink: 0;
|
||||||
|
|
||||||
|
.iframe-title {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: var(--el-text-color-primary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.iframe-content {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border: none;
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
|
&.with-header {
|
||||||
|
height: calc(100% - 49px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.iframe-error {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 100%;
|
||||||
|
color: var(--el-text-color-secondary);
|
||||||
|
|
||||||
|
.error-icon {
|
||||||
|
font-size: 48px;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
color: var(--el-color-warning);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.iframe-loading {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background: var(--el-bg-color);
|
||||||
|
gap: 12px;
|
||||||
|
|
||||||
|
.is-loading {
|
||||||
|
animation: iframe-rotating 1.5s linear infinite;
|
||||||
|
color: var(--el-color-primary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes iframe-rotating {
|
||||||
|
from { transform: rotate(0deg); }
|
||||||
|
to { transform: rotate(360deg); }
|
||||||
|
}
|
||||||
@@ -140,83 +140,7 @@ onUnmounted(() => {
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss">
|
||||||
.iframe-view {
|
// 样式已分离到 styles/components.scss 统一管理
|
||||||
position: relative;
|
// 这里保留空的 style 标签以便后续扩展
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.iframe-header {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
padding: 12px 16px;
|
|
||||||
background: var(--el-bg-color);
|
|
||||||
border-bottom: 1px solid var(--el-border-color-light);
|
|
||||||
flex-shrink: 0;
|
|
||||||
|
|
||||||
.iframe-title {
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 500;
|
|
||||||
color: var(--el-text-color-primary);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.iframe-content {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
border: none;
|
|
||||||
flex: 1;
|
|
||||||
|
|
||||||
&.with-header {
|
|
||||||
height: calc(100% - 49px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.iframe-error {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
height: 100%;
|
|
||||||
color: var(--el-text-color-secondary);
|
|
||||||
|
|
||||||
.error-icon {
|
|
||||||
font-size: 48px;
|
|
||||||
margin-bottom: 16px;
|
|
||||||
color: var(--el-color-warning);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.iframe-loading {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
background: var(--el-bg-color);
|
|
||||||
gap: 12px;
|
|
||||||
|
|
||||||
.is-loading {
|
|
||||||
animation: rotating 1.5s linear infinite;
|
|
||||||
color: var(--el-color-primary);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes rotating {
|
|
||||||
from {
|
|
||||||
transform: rotate(0deg);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
transform: rotate(360deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -353,6 +353,6 @@ watch(
|
|||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss">
|
||||||
@import url("./SubSidebarLayout.scss");
|
// 样式已分离到 styles/layouts.scss 统一管理
|
||||||
</style>
|
</style>
|
||||||
@@ -9,10 +9,6 @@
|
|||||||
// 适用于全屏页面,如聊天页面、独立功能页等
|
// 适用于全屏页面,如聊天页面、独立功能页等
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style lang="scss">
|
||||||
.blank-layout {
|
// 样式已分离到 styles/layouts.scss 统一管理
|
||||||
width: 100%;
|
|
||||||
height: 100vh;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
// ==================== 品牌色变量 ====================
|
// ==================== Shared Layouts 样式 ====================
|
||||||
|
// 所有样式都用根类名包裹,避免全局污染
|
||||||
|
|
||||||
$brand-color: #0055AA;
|
$brand-color: #0055AA;
|
||||||
$brand-color-light: #EBF5FF;
|
$brand-color-light: #EBF5FF;
|
||||||
$brand-color-hover: #004488;
|
$brand-color-hover: #004488;
|
||||||
|
|
||||||
|
// ==================== SubSidebarLayout ====================
|
||||||
.sidebar-layout {
|
.sidebar-layout {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -10,451 +13,246 @@ $brand-color-hover: #004488;
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: #f8fafc;
|
background: #f8fafc;
|
||||||
font-family: 'Inter', 'Noto Sans SC', sans-serif;
|
font-family: 'Inter', 'Noto Sans SC', sans-serif;
|
||||||
}
|
|
||||||
|
|
||||||
// ==================== 2级侧边栏(子导航样式)====================
|
.sidebar {
|
||||||
.sidebar {
|
width: 224px;
|
||||||
width: 224px;
|
height: 100%;
|
||||||
height: 100%;
|
background: #fff;
|
||||||
background: #fff;
|
display: flex;
|
||||||
display: flex;
|
flex-direction: column;
|
||||||
flex-direction: column;
|
color: #333;
|
||||||
color: #333;
|
flex-shrink: 0;
|
||||||
flex-shrink: 0;
|
transition: all 0.3s ease;
|
||||||
transition: all 0.3s ease;
|
border-right: 1px solid #f1f5f9;
|
||||||
border-right: 1px solid #f1f5f9;
|
position: relative;
|
||||||
position: relative;
|
|
||||||
|
|
||||||
&.collapsed {
|
|
||||||
width: 64px;
|
|
||||||
overflow: visible;
|
|
||||||
|
|
||||||
.sidebar-header {
|
&.collapsed {
|
||||||
padding: 16px 0;
|
width: 64px;
|
||||||
justify-content: center;
|
overflow: visible;
|
||||||
|
|
||||||
.logo {
|
.sidebar-header {
|
||||||
display: none;
|
padding: 16px 0;
|
||||||
|
justify-content: center;
|
||||||
|
.logo { display: none; }
|
||||||
|
.collapse-btn { display: flex; }
|
||||||
}
|
}
|
||||||
|
|
||||||
.collapse-btn {
|
.nav-item {
|
||||||
display: flex;
|
justify-content: center;
|
||||||
}
|
padding: 10px;
|
||||||
}
|
margin: 2px 8px;
|
||||||
|
span { display: none; }
|
||||||
.nav-item {
|
.expand-icon { display: none; }
|
||||||
justify-content: center;
|
&:hover .nav-tooltip { opacity: 1; visibility: visible; }
|
||||||
padding: 10px;
|
|
||||||
margin: 2px 8px;
|
|
||||||
|
|
||||||
span {
|
|
||||||
display: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.expand-icon {
|
.nav-child-item { display: none; }
|
||||||
display: none;
|
.user-section { justify-content: center; padding: 16px 8px; }
|
||||||
}
|
|
||||||
|
|
||||||
// 折叠状态下显示 tooltip
|
|
||||||
&:hover .nav-tooltip {
|
|
||||||
opacity: 1;
|
|
||||||
visibility: visible;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-child-item {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-section {
|
|
||||||
justify-content: center;
|
|
||||||
padding: 16px 8px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// 侧边栏头部
|
.sidebar-header {
|
||||||
.sidebar-header {
|
height: 64px;
|
||||||
height: 64px;
|
padding: 0 16px;
|
||||||
padding: 0 16px;
|
border-bottom: 1px solid #f1f5f9;
|
||||||
border-bottom: 1px solid #f1f5f9;
|
display: flex;
|
||||||
display: flex;
|
align-items: center;
|
||||||
align-items: center;
|
justify-content: space-between;
|
||||||
justify-content: space-between;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.collapse-btn {
|
.collapse-btn {
|
||||||
width: 32px;
|
|
||||||
height: 32px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
border-radius: 8px;
|
|
||||||
cursor: pointer;
|
|
||||||
color: #94a3b8;
|
|
||||||
background: transparent;
|
|
||||||
border: none;
|
|
||||||
transition: all 0.2s;
|
|
||||||
flex-shrink: 0;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background: #f1f5f9;
|
|
||||||
color: #64748b;
|
|
||||||
}
|
|
||||||
|
|
||||||
svg {
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 展开按钮(折叠状态显示在右侧)
|
|
||||||
.expand-toggle {
|
|
||||||
position: absolute;
|
|
||||||
right: -12px;
|
|
||||||
top: 80px;
|
|
||||||
width: 24px;
|
|
||||||
height: 24px;
|
|
||||||
background: #fff;
|
|
||||||
border: 1px solid #e2e8f0;
|
|
||||||
border-radius: 50%;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
cursor: pointer;
|
|
||||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
|
||||||
transition: all 0.2s;
|
|
||||||
z-index: 10;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background: #f8fafc;
|
|
||||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-icon {
|
|
||||||
font-size: 14px;
|
|
||||||
color: #64748b;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.logo {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 8px;
|
|
||||||
|
|
||||||
.logo-icon {
|
|
||||||
width: 32px;
|
width: 32px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
background: #3b82f6;
|
|
||||||
border-radius: 8px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-shrink: 0;
|
|
||||||
|
|
||||||
.el-icon {
|
|
||||||
font-size: 18px;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.logo-img {
|
|
||||||
width: 100%;
|
|
||||||
height: 32px;
|
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
object-fit: contain;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logo-text {
|
|
||||||
font-size: 15px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #1e293b;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 导航菜单
|
|
||||||
.nav-menu {
|
|
||||||
flex: 1;
|
|
||||||
// overflow-y: auto;
|
|
||||||
padding: 8px 0;
|
|
||||||
|
|
||||||
&::-webkit-scrollbar {
|
|
||||||
width: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&::-webkit-scrollbar-thumb {
|
|
||||||
background: rgba(0, 0, 0, 0.1);
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&::-webkit-scrollbar-track {
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-section {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 导航分组容器
|
|
||||||
.nav-group {
|
|
||||||
margin-bottom: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 子菜单容器(二级)
|
|
||||||
.nav-children {
|
|
||||||
padding-left: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 子菜单项包装器
|
|
||||||
.nav-child-wrapper {
|
|
||||||
margin-bottom: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 三级菜单容器
|
|
||||||
.nav-sub-children {
|
|
||||||
padding-left: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 1级导航项(分组标题)
|
|
||||||
.nav-item {
|
|
||||||
position: relative;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
gap: 8px;
|
|
||||||
padding: 10px 16px;
|
|
||||||
margin: 2px 8px;
|
|
||||||
border-radius: 8px;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: all 0.2s ease;
|
|
||||||
color: #64748b;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 500;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background: #f8fafc;
|
|
||||||
color: #475569;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.active {
|
|
||||||
background: $brand-color-light;
|
|
||||||
color: $brand-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.has-children {
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
|
||||||
|
|
||||||
.el-icon {
|
|
||||||
font-size: 18px;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
span {
|
|
||||||
flex: 1;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
.expand-icon {
|
|
||||||
font-size: 14px;
|
|
||||||
color: #94a3b8;
|
color: #94a3b8;
|
||||||
transition: transform 0.2s;
|
background: transparent;
|
||||||
}
|
border: none;
|
||||||
|
|
||||||
// 折叠时的 Tooltip
|
|
||||||
.nav-tooltip {
|
|
||||||
position: absolute;
|
|
||||||
left: calc(100% + 16px);
|
|
||||||
top: 50%;
|
|
||||||
transform: translateY(-50%);
|
|
||||||
background: #1e293b;
|
|
||||||
color: #fff;
|
|
||||||
padding: 6px 12px;
|
|
||||||
border-radius: 6px;
|
|
||||||
font-size: 12px;
|
|
||||||
white-space: nowrap;
|
|
||||||
z-index: 100;
|
|
||||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
||||||
opacity: 0;
|
|
||||||
visibility: hidden;
|
|
||||||
transition: all 0.2s;
|
transition: all 0.2s;
|
||||||
pointer-events: none;
|
flex-shrink: 0;
|
||||||
|
|
||||||
.tooltip-arrow {
|
&:hover { background: #f1f5f9; color: #64748b; }
|
||||||
position: absolute;
|
svg { width: 20px; height: 20px; }
|
||||||
right: 100%;
|
|
||||||
top: 50%;
|
|
||||||
transform: translateY(-50%);
|
|
||||||
border: 5px solid transparent;
|
|
||||||
border-right-color: #1e293b;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// 2级导航项(子菜单)
|
.expand-toggle {
|
||||||
.nav-child-item {
|
position: absolute;
|
||||||
padding: 8px 16px 8px 40px;
|
right: -12px;
|
||||||
margin: 1px 8px;
|
top: 80px;
|
||||||
border-radius: 6px;
|
width: 24px;
|
||||||
font-size: 13px;
|
height: 24px;
|
||||||
font-weight: 400;
|
background: #fff;
|
||||||
|
border: 1px solid #e2e8f0;
|
||||||
&:hover {
|
border-radius: 50%;
|
||||||
background: #f8fafc;
|
|
||||||
color: #475569;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.active {
|
|
||||||
background: $brand-color;
|
|
||||||
color: #fff;
|
|
||||||
font-weight: 500;
|
|
||||||
|
|
||||||
.el-icon {
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-icon {
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 3级导航项
|
|
||||||
.nav-sub-child-item {
|
|
||||||
padding: 6px 16px 6px 56px;
|
|
||||||
margin: 1px 8px;
|
|
||||||
border-radius: 6px;
|
|
||||||
font-size: 13px;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #64748b;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background: #f8fafc;
|
|
||||||
color: #475569;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.active {
|
|
||||||
background: $brand-color;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 用户信息
|
|
||||||
.user-section {
|
|
||||||
padding: 16px;
|
|
||||||
border-top: 1px solid #f1f5f9;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: background 0.2s;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background: #f8fafc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-info-wrapper {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 12px;
|
justify-content: center;
|
||||||
|
cursor: pointer;
|
||||||
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
||||||
|
transition: all 0.2s;
|
||||||
|
z-index: 10;
|
||||||
|
|
||||||
|
&:hover { background: #f8fafc; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); }
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-avatar {
|
.logo {
|
||||||
flex-shrink: 0;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
|
||||||
|
.logo-img {
|
||||||
|
width: 100%;
|
||||||
|
height: 32px;
|
||||||
|
border-radius: 8px;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo-text {
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #1e293b;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-name {
|
.nav-menu {
|
||||||
|
flex: 1;
|
||||||
|
padding: 8px 0;
|
||||||
|
|
||||||
|
&::-webkit-scrollbar { width: 4px; }
|
||||||
|
&::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.1); border-radius: 4px; }
|
||||||
|
&::-webkit-scrollbar-track { background: transparent; }
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-section { padding: 0; }
|
||||||
|
.nav-group { margin-bottom: 4px; }
|
||||||
|
.nav-children { padding-left: 12px; }
|
||||||
|
.nav-child-wrapper { margin-bottom: 2px; }
|
||||||
|
.nav-sub-children { padding-left: 12px; }
|
||||||
|
|
||||||
|
.nav-item {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 8px;
|
||||||
|
padding: 10px 16px;
|
||||||
|
margin: 2px 8px;
|
||||||
|
border-radius: 8px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
color: #64748b;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #374151;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ==================== 主内容区 ====================
|
|
||||||
.main-content {
|
|
||||||
flex: 1;
|
|
||||||
height: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
background: #f8fafc;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
// iframe 容器
|
|
||||||
.iframe-container {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.iframe-header {
|
|
||||||
height: 56px;
|
|
||||||
padding: 0 24px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
border-bottom: 1px solid #e2e8f0;
|
|
||||||
background: #fff;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.iframe-title {
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #1e293b;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content-iframe {
|
|
||||||
flex: 1;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
border: none;
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.iframe-loading {
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
gap: 12px;
|
|
||||||
color: $brand-color;
|
|
||||||
font-size: 14px;
|
|
||||||
z-index: 10;
|
|
||||||
|
|
||||||
.el-icon {
|
|
||||||
font-size: 32px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ==================== 响应式 ====================
|
|
||||||
@media (max-width: 768px) {
|
|
||||||
.sidebar {
|
|
||||||
width: 64px;
|
|
||||||
|
|
||||||
&:not(.collapsed) {
|
&:hover { background: #f8fafc; color: #475569; }
|
||||||
width: 224px;
|
&.active { background: $brand-color-light; color: $brand-color; }
|
||||||
position: fixed;
|
&.has-children { cursor: pointer; }
|
||||||
left: 0;
|
|
||||||
top: 0;
|
span {
|
||||||
z-index: 1000;
|
flex: 1;
|
||||||
box-shadow: 4px 0 16px rgba(0, 0, 0, 0.1);
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.iframe-header {
|
|
||||||
padding: 0 16px;
|
|
||||||
|
|
||||||
.iframe-title {
|
.expand-icon {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
color: #94a3b8;
|
||||||
|
transition: transform 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-tooltip {
|
||||||
|
position: absolute;
|
||||||
|
left: calc(100% + 16px);
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
background: #1e293b;
|
||||||
|
color: #fff;
|
||||||
|
padding: 6px 12px;
|
||||||
|
border-radius: 6px;
|
||||||
|
font-size: 12px;
|
||||||
|
white-space: nowrap;
|
||||||
|
z-index: 100;
|
||||||
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||||
|
opacity: 0;
|
||||||
|
visibility: hidden;
|
||||||
|
transition: all 0.2s;
|
||||||
|
pointer-events: none;
|
||||||
|
|
||||||
|
.tooltip-arrow {
|
||||||
|
position: absolute;
|
||||||
|
right: 100%;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
border: 5px solid transparent;
|
||||||
|
border-right-color: #1e293b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-child-item {
|
||||||
|
padding: 8px 16px 8px 40px;
|
||||||
|
margin: 1px 8px;
|
||||||
|
border-radius: 6px;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 400;
|
||||||
|
|
||||||
|
&:hover { background: #f8fafc; color: #475569; }
|
||||||
|
&.active {
|
||||||
|
background: $brand-color;
|
||||||
|
color: #fff;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-sub-child-item {
|
||||||
|
padding: 6px 16px 6px 56px;
|
||||||
|
margin: 1px 8px;
|
||||||
|
border-radius: 6px;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #64748b;
|
||||||
|
|
||||||
|
&:hover { background: #f8fafc; color: #475569; }
|
||||||
|
&.active { background: $brand-color; color: #fff; }
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-content {
|
||||||
|
flex: 1;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
background: #f8fafc;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.no-sidebar .main-content {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 响应式
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.sidebar {
|
||||||
|
width: 64px;
|
||||||
|
|
||||||
|
&:not(.collapsed) {
|
||||||
|
width: 224px;
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
z-index: 1000;
|
||||||
|
box-shadow: 4px 0 16px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ==================== BlankLayout ====================
|
||||||
|
.blank-layout {
|
||||||
|
width: 100%;
|
||||||
|
height: 100vh;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|||||||
@@ -497,6 +497,6 @@ watch(
|
|||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss">
|
||||||
@import url("./SubSidebarLayout.scss");
|
// 样式已分离到 styles/layouts.scss 统一管理
|
||||||
</style>
|
</style>
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
// ==================== Shared Components 样式 ====================
|
||||||
|
// 导入各组件的 scss 文件
|
||||||
|
|
||||||
|
@use '../components/iframe/IframeView.scss';
|
||||||
|
@use '../components/file/fileupload/FileUpload.scss';
|
||||||
|
@use '../components/file/fileHistory/FileHistory.scss';
|
||||||
|
@use '../components/dynamicFormItem/DynamicFormItem.scss';
|
||||||
|
@use '../components/ai/knowledge/documentSegment/DocumentSegment.scss';
|
||||||
6
urbanLifelineWeb/packages/shared/src/styles/index.scss
Normal file
6
urbanLifelineWeb/packages/shared/src/styles/index.scss
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
// ==================== Shared 全局样式 ====================
|
||||||
|
// 这个文件需要在宿主应用的 main.ts 中导入
|
||||||
|
// import 'shared/styles'
|
||||||
|
|
||||||
|
@use './layouts.scss';
|
||||||
|
@use './components.scss';
|
||||||
9
urbanLifelineWeb/packages/shared/src/styles/index.ts
Normal file
9
urbanLifelineWeb/packages/shared/src/styles/index.ts
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
// ==================== Shared 全局样式入口 ====================
|
||||||
|
// 这个文件作为样式的 JS 入口,确保 CSS 被正确加载
|
||||||
|
// 在宿主应用中使用: import 'shared/styles'
|
||||||
|
|
||||||
|
// 导入所有样式(Vite 会自动处理 CSS 注入)
|
||||||
|
import './index.scss'
|
||||||
|
|
||||||
|
// 导出空对象,让 Module Federation 能正确处理
|
||||||
|
export {}
|
||||||
1
urbanLifelineWeb/packages/shared/src/styles/layouts.scss
Normal file
1
urbanLifelineWeb/packages/shared/src/styles/layouts.scss
Normal file
@@ -0,0 +1 @@
|
|||||||
|
@use '../layouts/SubSidebarLayout/SubSidebarLayout.scss'
|
||||||
@@ -70,7 +70,11 @@ export default defineConfig({
|
|||||||
'./config': './src/config/index.ts',
|
'./config': './src/config/index.ts',
|
||||||
|
|
||||||
// ========== Layouts 布局模块 ==========
|
// ========== Layouts 布局模块 ==========
|
||||||
'./layouts': './src/layouts/index.ts'
|
'./layouts': './src/layouts/index.ts',
|
||||||
|
|
||||||
|
// ========== Styles 样式模块 ==========
|
||||||
|
// 直接暴露 SCSS 文件,确保 CSS 在远程加载时被正确注入
|
||||||
|
'./styles': './src/styles/index.scss'
|
||||||
},
|
},
|
||||||
// 共享依赖(重要:避免重复加载)
|
// 共享依赖(重要:避免重复加载)
|
||||||
shared: {
|
shared: {
|
||||||
@@ -101,9 +105,18 @@ export default defineConfig({
|
|||||||
minify: false,
|
minify: false,
|
||||||
cssCodeSplit: false,
|
cssCodeSplit: false,
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
|
// 确保 CSS 被提取到单独的文件中
|
||||||
|
cssMinify: true,
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
output: {
|
output: {
|
||||||
format: 'es'
|
format: 'es',
|
||||||
|
// 确保 CSS 文件名可预测
|
||||||
|
assetFileNames: (assetInfo) => {
|
||||||
|
if (assetInfo.name === 'style.css') {
|
||||||
|
return 'assets/style.css'
|
||||||
|
}
|
||||||
|
return 'assets/[name]-[hash][extname]'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -214,5 +214,5 @@ watch(
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import url("./SidebarLayout.scss");
|
@import "./SidebarLayout.scss";
|
||||||
</style>
|
</style>
|
||||||
@@ -5,6 +5,9 @@ import 'element-plus/dist/index.css'
|
|||||||
|
|
||||||
import './assets/css/common.scss'
|
import './assets/css/common.scss'
|
||||||
|
|
||||||
|
// 导入 shared 的全局样式(Module Federation 远程模块样式)
|
||||||
|
import 'shared/styles'
|
||||||
|
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
import router from './router/'
|
import router from './router/'
|
||||||
import { AES_SECRET_KEY } from './config/index'
|
import { AES_SECRET_KEY } from './config/index'
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
import type { RouteRecordRaw } from 'vue-router'
|
import type { RouteRecordRaw } from 'vue-router'
|
||||||
import router from './index'
|
import router from './index'
|
||||||
import { SidebarLayout, BlankLayout, SubSidebarLayout } from '@/layouts'
|
import { SidebarLayout } from '@/layouts'
|
||||||
|
|
||||||
// 动态导入 shared 模块(避免顶层 import 阻塞)
|
// 动态导入 shared 模块(避免顶层 import 阻塞)
|
||||||
async function loadSharedModules() {
|
async function loadSharedModules() {
|
||||||
@@ -25,10 +25,11 @@ async function loadSharedModules() {
|
|||||||
// Workcase 布局组件映射
|
// Workcase 布局组件映射
|
||||||
const workcaseLayoutMap: Record<string, () => Promise<any>> = {
|
const workcaseLayoutMap: Record<string, () => Promise<any>> = {
|
||||||
'SidebarLayout': () => Promise.resolve({ default: SidebarLayout }),
|
'SidebarLayout': () => Promise.resolve({ default: SidebarLayout }),
|
||||||
'BlankLayout': () => Promise.resolve({ default: BlankLayout }),
|
|
||||||
'NavigationLayout': () => Promise.resolve({ default: SidebarLayout }),
|
'NavigationLayout': () => Promise.resolve({ default: SidebarLayout }),
|
||||||
'BasicLayout': () => Promise.resolve({ default: SidebarLayout }),
|
'BasicLayout': () => Promise.resolve({ default: SidebarLayout }),
|
||||||
'SubSidebarLayout': () => Promise.resolve({ default: SubSidebarLayout })
|
// 动态导入 shared 的布局组件,避免静态导入阻塞
|
||||||
|
'BlankLayout': () => import('shared/layouts').then(m => ({ default: m.BlankLayout })),
|
||||||
|
'SubSidebarLayout': () => import('shared/layouts').then(m => ({ default: m.SubSidebarLayout }))
|
||||||
}
|
}
|
||||||
|
|
||||||
// 视图组件加载器
|
// 视图组件加载器
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ const testAgent = () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import url("./AgentView.scss");
|
@import "./AgentView.scss";
|
||||||
|
|
||||||
.agent-container {
|
.agent-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ onMounted(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import url("./CustomerChatView.scss");
|
@import "./CustomerChatView.scss";
|
||||||
|
|
||||||
.chat-container {
|
.chat-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -417,5 +417,5 @@ onMounted(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import url("./KnowLedgeView.scss");
|
@import "./KnowLedgeView.scss";
|
||||||
</style>
|
</style>
|
||||||
@@ -267,7 +267,7 @@ onMounted(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import url("./KnowledgeLogView.scss");
|
@import "./KnowledgeLogView.scss";
|
||||||
|
|
||||||
.log-container {
|
.log-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ const exportLogs = () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import url("./SystemLogView.scss");
|
@import "./SystemLogView.scss";
|
||||||
|
|
||||||
.log-container {
|
.log-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ onMounted(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import url("./WorkcaseLogView.scss");
|
@import "./WorkcaseLogView.scss";
|
||||||
|
|
||||||
.log-container {
|
.log-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -346,7 +346,7 @@ const goToAgent = () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import url("./OverviewView.scss");
|
@import "./OverviewView.scss";
|
||||||
|
|
||||||
.overview-container {
|
.overview-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -846,5 +846,5 @@ onMounted(async () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@import url("./AIChatView.scss");
|
@import "./AIChatView.scss";
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -48,5 +48,5 @@ const handleLoadChat = (chatId: number) => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@import url("./ChatHistory.scss");
|
@import "./ChatHistory.scss";
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -351,7 +351,7 @@ watch(activeTab, async (newVal) => {
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@import url("./ChatMessage.scss");
|
@import "./ChatMessage.scss";
|
||||||
|
|
||||||
.loading-more,
|
.loading-more,
|
||||||
.no-more {
|
.no-more {
|
||||||
|
|||||||
@@ -730,5 +730,5 @@ onUnmounted(() => {
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@import url("./ChatRoomView.scss");
|
@import "./ChatRoomView.scss";
|
||||||
</style>
|
</style>
|
||||||
@@ -270,5 +270,5 @@ async function handleJoinMeeting() {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@import url('./MeetingCard.scss');
|
@import './MeetingCard.scss';
|
||||||
</style>
|
</style>
|
||||||
@@ -459,5 +459,5 @@ defineExpose({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@import url("./ChatRoom.scss");
|
@import "./ChatRoom.scss";
|
||||||
</style>
|
</style>
|
||||||
@@ -130,5 +130,5 @@ const handleSubmit = async () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@import url('./CommentMessageCard.scss');
|
@import './CommentMessageCard.scss';
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -316,5 +316,5 @@ onUnmounted(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@import url('./JitsiMeetingView.scss')
|
@import './JitsiMeetingView.scss'
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -747,5 +747,5 @@ const submitProcessRecord = async () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@import url("./WorkcaseDetail.scss");
|
@import "./WorkcaseDetail.scss";
|
||||||
</style>
|
</style>
|
||||||
@@ -339,5 +339,5 @@ function openInBrowser() {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import url("./Meeting.scss")
|
@import "./Meeting.scss"
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user