8 Commits

9 changed files with 559 additions and 629 deletions

230
CLAUDE.md
View File

@@ -1,230 +0,0 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Project Overview
This is the **GFast UI** project (`gfast-ui`), a Vue 3 admin management system based on the vue-next-admin template, customized for a digital advertising/trading platform.
## Commands
- `npm install` - Install dependencies (use `npm install --registry=https://registry.npmmirror.com` for China mainland)
- `npm run dev` - Start development server
- `npm run build` - Build for production
- `npm run lint` - Run ESLint check
- `npm run lint-fix` - Fix ESLint issues automatically
- `npm run type-check` - Run TypeScript type checking
- `npm run quality` - Run both lint and type-check
## Architecture Overview
**Tech Stack:**
- Vue 3 with Composition API (script setup)
- TypeScript
- Vite
- Element Plus (UI framework)
- Pinia (state management)
- Vue Router (with hash mode)
- Axios (HTTP client)
- i18n (internationalization)
- mitt (event bus)
**Directory Structure:**
- `src/api/` - API client methods organized by business domain (ads, assets, cid, customerService, digitalHuman, knowledge, login, menu, settings, system, etc.)
- `src/components/` - Reusable Vue components
- `src/directives/` - Custom Vue directives
- `src/i18n/` - Internationalization configuration
- `src/layout/` - Main layout components
- `src/router/` - Route configuration
- `index.ts` - Router setup and guard
- `backEnd.ts` - Backend-controlled route initialization
- `frontEnd.ts` - Frontend-controlled route initialization
- `route.ts` - Static route definitions
- `src/stores/` - Pinia state stores
- `themeConfig.ts` - Theme and global configuration
- `userInfo.ts` - User information
- `routesList.ts` - Dynamic route management
- `keepAliveNames.ts` - keep-alive cache management
- `src/theme/` - Theme related styles
- `src/types/` - TypeScript type definitions
- `src/utils/` - Utility functions
- `request.ts` - Axios instance with interceptors, error handling, and token management
- `storage.ts` - Session storage wrapper
- `gfast.ts` - GFast-specific helpers (file URL construction, tree building, date formatting)
- `diffUtils.ts` - Field change detection for PUT requests
- `src/views/` - Page components organized by business module
**Key Patterns:**
1. **Routing**: Supports both frontend and backend controlled routing. When backend control is enabled (`isRequestRoutes: true` in themeConfig), routes are fetched from the backend and dynamically added.
2. **API Requests**:
- API methods are organized by domain in `src/api/` (each subdomain has its own directory structure)
- The Axios instance in `src/utils/request.ts` is pre-configured with:
- 50 second request timeout
- `qs` serialization of query parameters with dot notation for nested objects
- Automatically adds Bearer token (from cookies via Session utility) to all requests
- Automatically sends only changed fields for PUT requests (diff comparison with original data via `_originalData` field)
- Handles token expiration globally with redirect to login (prevents multiple overlapping popups)
- Provides error message extraction from multiple response formats (`message`, `msg`, `error`, `detail`)
- Error throttling: maximum one error message every 2 seconds
- Supports error mode configuration via `requestOptions.errorMode`:
- `global`: (default) Global error popup with backend message
- `page`: No automatic popup, reject the error for page-level handling
- `silent`: Completely silent, no error display
- Special handling for `code === 402`: Triggers module not enabled subscription flow (except for specific asset endpoints)
- Response format expects `code`, `message`/`msg`, and data. Known success codes: `0`, `200`.
- Use `getApiErrorMessage(error)` from `/@/utils/request` to extract user-friendly error messages in catch blocks when using `page` or `silent` mode.
3. **Global Properties & Components**:
- Helpers registered globally for template use:
- `getUpFileUrl`, `handleTree`, `useDict`, `selectDictLabel`, `parseTime`, `getItems`, `setItems`, `getOptionValue`, `isEmpty`
- Global components:
- `pagination` - Reusable pagination component
- Global plugins registered:
- `vue-simple-uploader` - Large file upload component
- Global event bus via mitt: `app.config.globalProperties.mittBus`
4. **Authentication**:
- Token is stored in cookies via `js-cookie` (through the `Session` utility). Other user session data is stored in `sessionStorage`.
- The `Session.clearAuth()` method only clears authentication-related keys (`token`, `userInfo`, `userMenu`, `permissions`), preserving other local preferences.
- 401 responses (HTTP or business code) containing token expiration signals trigger automatic logout with a single confirmation popup.
5. **Keep-alive**: Route components can be cached via keep-alive, managed by the `useKeepALiveNames` store.
## Repository Collaboration Rules
These rules capture long-term repository preferences confirmed by the user and should be applied in future sessions unless the user explicitly overrides them.
### Pagination Rules
- Prefer the project global `pagination` component by default.
- Pagination should be fixed and visible as part of the page or dialog layout, not conditionally hidden only because the dataset is small.
- In single-page scenarios, the UI should still show total count together with the pagination area.
- Avoid designs where pagination only appears after data exceeds one page.
### Dialog Layout Rules
- For dialogs that contain searchable tabular data, prefer this structure:
1. search area
2. table/content area
3. pagination area placed under the table inside the dialog body
4. footer action buttons
- The pagination area should remain visually stable and should not be omitted just because the current result set is small.
### Theme and Style Rules
- When functionality and existing theme style conflict, prioritize making the feature clearly visible and usable first.
- After ensuring usability, align the implementation with the repository's existing theme and style system as much as possible.
- Be cautious about global theme styles that may affect local pagination, dialog, or table layouts.
### Problem-solving Workflow
- For repeated UI issues, analyze in this order:
1. interface/request data and returned structure
2. component logic and render conditions
3. theme and style coverage/conflicts
4. then decide whether a rewrite is necessary
- Do not jump straight to a rewrite before checking interface behavior and style interference.
### Execution Workflow Rules
- When modifying a feature, locate it in this order: usage location, component definition, API definition, then at least one similar implementation in the project.
- For common UI features such as pagination, dialogs, and tables, align with an existing similar implementation before making changes.
- Prefer componentization. If a page or Vue SFC is already large, or a block has a clear independent responsibility, split it into components instead of continuing to extend the same file.
- For very long files such as complex page-level `index.vue` files, treat further component splitting as the default direction rather than the exception.
- Before editing large files or complex Vue SFCs, first read the target context; if a replacement fails once, do not repeat the same replacement blindly, and instead expand the context or switch to smaller targeted edits.
- After UI or interaction changes, verify not only lint status for edited files but also render conditions, interface fields, and possible style impact.
- If the same issue is not resolved after one attempt, pause and ask the user before continuing with more speculative changes.
- Do not proactively rewrite a component unless the user explicitly asks for a rewrite.
- At the start of a new conversation, read `CLAUDE.md` before making changes.
- When code changes appear not to take effect, check in this order: compile/HMR status, render conditions, API data, then style overrides.
- Turn repeated low-level mistakes into explicit workflow checks and follow those checks in future edits.
### Environment and Tool Selection Rules
- Before running environment-dependent commands, first follow the known runtime context already provided by the IDE, such as OS and default shell.
- On Windows projects with PowerShell as the active shell, prefer PowerShell-native commands and scripts by default.
- Do not assume Python, bash, sed, awk, or other non-default tooling is installed locally unless the user or repository explicitly indicates that they are available.
- For reading and editing repository files, prefer dedicated file tools first; use shell-based text replacement only when file tools are not suitable for the change.
- When a replacement fails once, do not keep retrying the same method blindly. Re-read the exact target content and switch to a smaller or more reliable edit strategy that matches the current environment.
- Avoid trial-and-error probing for basic tooling when the available environment is already known from context.
### Componentization and Structure Rules
- If a view block has an independent responsibility, prefer extracting it into a component instead of keeping it inside a large page file.
- When a file is already long, or a new feature would further expand responsibilities, proactively split it into components.
- Child components may keep their own local logic when that logic belongs clearly to the childs responsibility; only shared state and necessary events should stay in the parent.
- For complex pages, small-scale components can stay in `component/`, while larger feature areas may be grouped by responsibility in subdirectories.
- For very long page files, prefer keeping the parent focused on composition, state orchestration, and data flow, while moving feature UI and local behavior into child components.
- When extracting new child components from a large file, move their related local styles with them to avoid continued growth of the parent file.
### API and Data Handling Rules
- Follow the projects common response structure by default, but add moderate component-side compatibility handling when equivalent APIs return slightly inconsistent fields.
- For page-level error handling, use global handling by default, but use page-level or silent handling when the interaction requires local control.
- Prefer a unified parameter-building entry for request params instead of assembling the same parameters across multiple functions.
### Form and Interaction Rules
- Follow the projects existing form behavior style: required fields should be clearly validated on submit, while avoiding unnecessarily disruptive validation during input.
- For shared create/edit forms, initialize, patch, and reset form state through a unified initialization path to avoid stale state.
- Search interactions should behave consistently across button click, Enter key, and clear actions, and should reset to the first page by default.
### Dialog and Selector Rules
- Dialogs should clear temporary internal state on close by default; any state that needs to persist should be explicitly provided back by the parent.
- Selector components should follow a consistent pattern: `v-model` for visibility, a default value prop, and a `confirm` event for returning the selected result.
- For temporary selectors and lightweight dialogs, prefer `destroy-on-close`; for more complex stateful forms, decide deliberately rather than applying it blindly.
### Styling Rules
- Prefer local scoped style changes first; only modify global theme styles after confirming the issue is truly shared across multiple places.
- When overriding Element Plus internals, prefer local `:deep()` overrides before considering global style changes.
- Use semantic, area-based class names instead of short or overly generic names.
### Debugging and Validation Rules
- Minimal temporary debugging is allowed when necessary, but all temporary debugging code must be removed before final delivery.
- Temporary `console` output is acceptable only when debugging is genuinely needed and must be removed before final delivery.
- For UI and interaction changes, verify lint, key render conditions, interface fields, and style impact before considering the task complete.
### Change Scope and Consistency Rules
- Prefer the smallest necessary change set, but do not pretend a local-only fix is sufficient when the real root cause is elsewhere in the chain.
- Only fix nearby issues when they are strongly related to the current task; otherwise ask the user before expanding the scope.
- Within the current modification scope, move code toward repository rules when practical, but avoid broad unrelated refactors.
### Communication and Risk Rules
- 默认使用中文进行回复、说明、提问与思考表达;如果用户明确要求使用其他语言,再按用户要求切换。
- Before changing code, confirm with the user when a change involves a rewrite, global side effects, unclear requirements, or a second attempt that still has not solved the issue.
- After changes, explain what changed, why it was changed that way, and any remaining risks or points worth confirming.
- When a requirement still depends on a meaningful assumption, ask the user first instead of silently choosing a direction.
### Repository Memory Rules
- When collaboration reveals a repeated problem pattern, proactively suggest turning it into an explicit repository rule in `CLAUDE.md`.
- Project-specific experience or pitfall notes may be added when they become necessary, but do not expand them prematurely without clear recurring value.
### Rule Documentation Style
- Keep long-term repository rules concise and practical.
- Prefer short rule lists with a small amount of explanation over overly long documentation.
## Environment Variables
- `.env.development` - Development environment settings
- `.env.production` - Production environment settings
- `VITE_API_URL` - Backend API base URL
- `VITE_PORT` - Dev server port
- `VITE_PUBLIC_PATH` - Public base path for production build
- `VITE_OPEN_CDN` - Enable CDN for external dependencies
## Development Notes
- The project uses `/@` alias for `src/`
- Components use the Composition API with `<script setup lang="ts">`
- Styling is done with SCSS
- ESLint enforces code quality
- Node version requirement: `>=16.0.0` (supported: v16.x ~ v20.x)

View File

@@ -1,16 +0,0 @@
FROM node:18-alpine
# 配置Alpine国内镜像源加速apk
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
WORKDIR /app
COPY package*.json ./
RUN npm install --registry=https://registry.npmmirror.com
COPY . .
EXPOSE 8080
CMD ["npm", "run", "dev"]

View File

@@ -7,6 +7,13 @@ server {
return 301 https://$host$request_uri; return 301 https://$host$request_uri;
} }
# MinIO 域名转发HTTP
server {
listen 80;
server_name minio.redpowerfuture.com;
return 301 https://$host$request_uri;
}
# HTTP 重定向到 HTTPS其他域名 # HTTP 重定向到 HTTPS其他域名
server { server {
listen 80; listen 80;
@@ -106,3 +113,26 @@ server {
proxy_read_timeout 30s; proxy_read_timeout 30s;
} }
} }
# MinIO 域名转发HTTPS
server {
listen 443 ssl;
server_name minio.redpowerfuture.com;
ssl_certificate /etc/nginx/ssl/minio.redpowerfuture.com.pem;
ssl_certificate_key /etc/nginx/ssl/minio.redpowerfuture.com.key;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
location / {
proxy_pass http://minio.redpowerfuture.com:9000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_connect_timeout 30s;
proxy_send_timeout 30s;
proxy_read_timeout 30s;
}
}

View File

@@ -1,65 +1,92 @@
<template> <template>
<div class="input-shell"> <div class="input-shell">
<div class="input-card"> <div class="input-card" :class="{ 'is-focused': isFocused }">
<!-- 已选中状态标签栏 -->
<div v-if="selectedWorkflowId !== null || selectedSkill !== 'default'" class="selected-tags">
<div v-if="selectedWorkflowId !== null" class="selected-tag workflow-tag">
<el-icon><Promotion /></el-icon>
<span>{{ commonWorkflows.find((w) => w.id === selectedWorkflowId)?.name }}</span>
<el-icon class="tag-close" @click="selectedWorkflowId = null"><Close /></el-icon>
</div>
<div v-if="selectedSkill !== 'default'" class="selected-tag skill-tag">
<el-icon><MagicStick /></el-icon>
<span>{{ skillLabels[selectedSkill] }}</span>
<el-icon class="tag-close" @click="selectedSkill = 'default'"><Close /></el-icon>
</div>
</div>
<!-- 文本输入区 -->
<el-input <el-input
v-model="message" v-model="message"
type="textarea" type="textarea"
:rows="1" :autosize="{ minRows: 1, maxRows: 6 }"
:autosize="{ minRows: 2, maxRows: 5 }" placeholder="有什么想聊的?按 Enter 发送Shift+Enter 换行"
placeholder="多说说你的偏好和要求,我会越用越懂你"
class="message-input" class="message-input"
@keydown.enter.exact="handleSend" @focus="isFocused = true"
@blur="isFocused = false"
@keydown.enter.exact.prevent="handleSend"
@keydown.enter.shift.exact="() => {}"
/> />
<!-- 底部工具栏 -->
<div class="input-toolbar"> <div class="input-toolbar">
<div class="toolbar-left"> <div class="toolbar-left">
<el-button circle class="tool-btn" @click="handleAttachment"> <!-- 上传附件 -->
<el-icon><Plus /></el-icon> <el-tooltip content="上传文件" placement="top">
</el-button> <button class="tool-icon-btn" @click="handleAttachment">
<el-dropdown trigger="click" @command="handleSkillSelect"> <el-icon><Paperclip /></el-icon>
<el-button class="pill-btn"> </button>
{{ currentSkillDisplay }} </el-tooltip>
</el-button>
<!-- 选择技能 -->
<el-dropdown trigger="click" placement="top-start" @command="handleSkillSelect">
<el-tooltip content="选择技能" placement="top">
<button class="tool-icon-btn" :class="{ active: selectedSkill !== 'default' }">
<el-icon><MagicStick /></el-icon>
<span class="tool-label">技能</span>
</button>
</el-tooltip>
<template #dropdown> <template #dropdown>
<el-dropdown-menu> <el-dropdown-menu>
<el-dropdown-item command="default">默认对话</el-dropdown-item> <el-dropdown-item command="default">
<el-dropdown-item command="code-review">代码审查</el-dropdown-item> <el-icon><CircleClose /></el-icon>不使用技能
</el-dropdown-item>
<el-dropdown-item divided command="code-review">代码审查</el-dropdown-item>
<el-dropdown-item command="refactor">代码重构</el-dropdown-item> <el-dropdown-item command="refactor">代码重构</el-dropdown-item>
<el-dropdown-item command="writing">内容写作</el-dropdown-item> <el-dropdown-item command="writing">内容写作</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</template> </template>
</el-dropdown> </el-dropdown>
</div> </div>
<div class="toolbar-right">
<el-button circle class="send-btn" :disabled="!message.trim()" @click="handleSend">
<el-icon><Top /></el-icon>
</el-button>
</div>
</div>
<!-- 常用工作流胶囊 --> <div class="toolbar-right">
<div class="workflow-pills" v-if="commonWorkflows.length > 0"> <span class="hint-text">Shift+Enter 换行</span>
<div <button class="send-btn" :disabled="!message.trim()" @click="handleSend">
v-for="wf in commonWorkflows" <el-icon><Top /></el-icon>
:key="wf.id" </button>
class="workflow-pill"
:class="{ active: selectedWorkflowId === wf.id }"
@click="selectWorkflow(wf)"
>
<el-icon class="pill-icon">
<component :is="wf.icon" />
</el-icon>
<span class="pill-text">{{ wf.name }}</span>
</div> </div>
</div> </div>
</div> </div>
<!-- 快捷工作流胶囊输入框下方 -->
<div v-if="commonWorkflows.length > 0" class="workflow-shortcuts">
<button
v-for="wf in commonWorkflows"
:key="wf.id"
class="shortcut-pill"
:class="{ active: selectedWorkflowId === wf.id }"
@click="toggleWorkflow(wf.id)"
>
<el-icon><Promotion /></el-icon>
{{ wf.name }}
</button>
</div>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed } from 'vue'; import { ref } from 'vue';
import { useRouter } from 'vue-router'; import { Top, MagicStick, Promotion, Close, CircleClose, Paperclip } from '@element-plus/icons-vue';
import { Top, Plus, MagicStick, Document, CircleCheck } from '@element-plus/icons-vue';
import { ElMessage } from 'element-plus'; import { ElMessage } from 'element-plus';
interface Emits { interface Emits {
@@ -69,14 +96,12 @@ interface Emits {
interface Workflow { interface Workflow {
id: number; id: number;
name: string; name: string;
icon: any;
prefix: string; prefix: string;
editPath: string;
} }
const emit = defineEmits<Emits>(); const emit = defineEmits<Emits>();
const router = useRouter();
const message = ref(''); const message = ref('');
const isFocused = ref(false);
const selectedSkill = ref('default'); const selectedSkill = ref('default');
const selectedWorkflowId = ref<number | null>(null); const selectedWorkflowId = ref<number | null>(null);
@@ -87,59 +112,28 @@ const skillLabels: Record<string, string> = {
writing: '内容写作', writing: '内容写作',
}; };
const currentSkillDisplay = computed(() => { const skillPrefixes: Record<string, string> = {
return selectedSkill.value === 'default' ? '选择技能' : skillLabels[selectedSkill.value];
});
const skills: Record<string, string> = {
default: '', default: '',
'code-review': '[技能:代码审查] 请帮我审查下面这段代码,找出潜在问题并给出改进建议:\n', 'code-review': '[技能:代码审查] 请帮我审查下面这段代码,找出潜在问题并给出改进建议:\n',
refactor: '[技能:代码重构] 请帮我重构下面这段代码,提升可读性和可维护性:\n', refactor: '[技能:代码重构] 请帮我重构下面这段代码,提升可读性和可维护性:\n',
writing: '[技能:内容写作] 请根据下面的需求帮我创作内容:\n', writing: '[技能:内容写作] 请根据下面的需求帮我创作内容:\n',
}; };
// 常用工作流列表
const commonWorkflows: Workflow[] = [ const commonWorkflows: Workflow[] = [
{ { id: 1, name: '审查', prefix: '[工作流:审查] 完成后请自动生成单元测试:\n' },
id: 1, { id: 2, name: '文档再编码', prefix: '[工作流:文档再编码] 请先编写接口文档,再实现代码:\n' },
name: '审查+测试', { id: 3, name: '代码重构', prefix: '[工作流:代码重构] 请帮我重构这段代码:\n' },
icon: Document, { id: 4, name: '需求分析', prefix: '[工作流:需求分析] 请帮我分析这个需求并拆解任务:\n' },
prefix: '[工作流:审查+测试] 完成后请自动生成单元测试:\n',
editPath: '/settings/workflow',
},
{
id: 2,
name: '文档再编码',
icon: Document,
prefix: '[工作流:文档再编码] 请先编写接口文档,再实现代码:\n',
editPath: '/settings/workflow',
},
{
id: 3,
name: '代码重构',
icon: Document,
prefix: '[工作流:代码重构] 请帮我重构这段代码:\n',
editPath: '/settings/workflow',
},
{
id: 4,
name: '需求分析',
icon: Document,
prefix: '[工作流:需求分析] 请帮我分析这个需求并拆解任务:\n',
editPath: '/settings/workflow',
},
]; ];
const handleSend = (event?: KeyboardEvent) => { const handleSend = () => {
if (event) event.preventDefault();
const msg = message.value.trim(); const msg = message.value.trim();
if (!msg) return; if (!msg) return;
const skillPrefix = skills[selectedSkill.value] || ''; const skillPrefix = skillPrefixes[selectedSkill.value] || '';
const workflowPrefix = selectedWorkflowId.value !== null ? commonWorkflows.find((w) => w.id === selectedWorkflowId.value)?.prefix || '' : ''; const workflowPrefix = selectedWorkflowId.value !== null ? commonWorkflows.find((w) => w.id === selectedWorkflowId.value)?.prefix || '' : '';
const finalMessage = (skillPrefix + workflowPrefix + msg).trim(); const finalMessage = (skillPrefix + workflowPrefix + msg).trim();
emit('send', finalMessage); emit('send', finalMessage);
message.value = ''; message.value = '';
// 发送后清空选择
selectedWorkflowId.value = null; selectedWorkflowId.value = null;
}; };
@@ -147,186 +141,241 @@ const handleAttachment = () => {
ElMessage.info('附件上传功能开发中...'); ElMessage.info('附件上传功能开发中...');
}; };
const handleSkillSelect = (key: string | number | object) => { const handleSkillSelect = (key: string | number | object | null) => {
selectedSkill.value = String(key); selectedSkill.value = String(key ?? 'default');
if (selectedSkill.value !== 'default') {
ElMessage.success(`已选择技能:${skillLabels[selectedSkill.value]}`);
}
}; };
const selectWorkflow = (wf: Workflow) => { const handleWorkflowSelect = (id: number | null) => {
if (selectedWorkflowId.value === wf.id) { selectedWorkflowId.value = id;
selectedWorkflowId.value = null; };
ElMessage.info('已取消工作流');
} else { const toggleWorkflow = (id: number) => {
selectedWorkflowId.value = wf.id; selectedWorkflowId.value = selectedWorkflowId.value === id ? null : id;
ElMessage.success(`已选择工作流:${wf.name}`);
}
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.input-shell { .input-shell {
position: relative; padding: 0 24px 24px;
z-index: 12;
margin-top: -20px;
padding: 0 0 50px;
background: transparent; background: transparent;
} }
.input-card { .input-card {
width: min(1060px, 82%); max-width: 860px;
margin: 0 auto; margin: 0 auto;
background: background: #fff;
linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.94) 100%), border: 1.5px solid #e2e8f0;
radial-gradient(120% 180% at 0% 0%, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0) 38%), border-radius: 16px;
radial-gradient(80% 120% at 100% 100%, rgba(168, 85, 247, 0.08) 0%, rgba(168, 85, 247, 0) 38%); box-shadow: 0 2px 12px rgba(15, 23, 42, 0.07);
border: 1px solid rgba(59, 130, 246, 0.28); transition:
border-radius: 20px; border-color 0.2s,
box-shadow: box-shadow 0.2s;
0 24px 48px rgba(15, 23, 42, 0.12), overflow: hidden;
0 0 0 1px rgba(59, 130, 246, 0.08) inset,
0 8px 16px rgba(37, 99, 235, 0.1); &.is-focused {
padding: 16px 18px 18px; border-color: #93c5fd;
backdrop-filter: blur(16px); box-shadow:
0 0 0 3px rgba(59, 130, 246, 0.12),
0 2px 12px rgba(15, 23, 42, 0.07);
}
} }
/* 已选标签栏 */
.selected-tags {
display: flex;
flex-wrap: wrap;
gap: 6px;
padding: 10px 14px 0;
}
.selected-tag {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 3px 8px 3px 8px;
border-radius: 6px;
font-size: 12px;
font-weight: 500;
line-height: 1.4;
&.workflow-tag {
background: #eff6ff;
color: #2563eb;
border: 1px solid #bfdbfe;
}
&.skill-tag {
background: #f5f3ff;
color: #7c3aed;
border: 1px solid #ddd6fe;
}
.tag-close {
margin-left: 2px;
cursor: pointer;
opacity: 0.6;
transition: opacity 0.15s;
&:hover {
opacity: 1;
}
}
}
/* 文本域 */
.message-input { .message-input {
:deep(.el-textarea__inner) { :deep(.el-textarea__inner) {
border: none; border: none;
box-shadow: none; box-shadow: none;
resize: none; resize: none;
padding: 8px 6px 14px; padding: 14px 16px 8px;
font-size: 15px; font-size: 15px;
line-height: 1.65; line-height: 1.6;
color: #0f172a; color: #0f172a;
background: transparent; background: transparent;
min-height: 50px; min-height: 28px !important;
font-weight: 500;
&::placeholder { &::placeholder {
color: #90a1b7; color: #94a3b8;
font-weight: 400; font-weight: 400;
} }
} }
} }
/* 底部工具栏 */
.input-toolbar { .input-toolbar {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
gap: 10px; padding: 6px 10px 10px 12px;
padding-top: 2px;
} }
.toolbar-left, .toolbar-left,
.toolbar-right { .toolbar-right {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 10px; gap: 4px;
} }
.tool-btn { .tool-icon-btn {
width: 32px; display: inline-flex;
height: 32px; align-items: center;
border: 1px solid #d9e4f5; gap: 4px;
color: #5b6b84; height: 30px;
background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%); padding: 0 10px;
box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06); border: none;
transition: all 0.2s ease; border-radius: 8px;
background: transparent;
color: #64748b;
font-size: 13px;
font-weight: 500;
cursor: pointer;
transition:
background 0.15s,
color 0.15s;
outline: none;
.el-icon {
font-size: 15px;
}
&:hover { &:hover {
color: #2b4d8f; background: #f1f5f9;
background: linear-gradient(135deg, #f0f7ff 0%, #e0edff 100%); color: #334155;
border-color: #bfdbfe; }
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15); &.active {
background: #eff6ff;
color: #2563eb;
} }
} }
.pill-btn { .tool-label {
height: 32px;
padding: 0 14px;
border-radius: 999px;
border: 1px solid #dbe7f7;
color: #30435f;
background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
font-size: 12px; font-size: 12px;
font-weight: 600; }
transition: all 0.2s ease;
&:hover { .hint-text {
background: linear-gradient(135deg, #f0f7ff 0%, #e0edff 100%); font-size: 11px;
border-color: #bfdbfe; color: #cbd5e1;
color: #1d4ed8; margin-right: 6px;
} user-select: none;
} }
.send-btn { .send-btn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 32px; width: 32px;
height: 32px; height: 32px;
border: none; border: none;
background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%); border-radius: 8px;
background: #2563eb;
color: #fff; color: #fff;
box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4); cursor: pointer;
transition: all 0.2s ease; transition:
background 0.15s,
transform 0.1s,
opacity 0.15s;
outline: none;
.el-icon {
font-size: 16px;
}
&:hover:not(:disabled) { &:hover:not(:disabled) {
filter: brightness(1.08); background: #1d4ed8;
transform: translateY(-1px); transform: translateY(-1px);
box-shadow: 0 8px 20px rgba(59, 130, 246, 0.5);
} }
&:disabled { &:disabled {
opacity: 0.5; background: #e2e8f0;
box-shadow: none; color: #94a3b8;
background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%); cursor: not-allowed;
transform: none;
} }
} }
/* 工作流胶囊样式 */ /* 快捷工作流胶囊 */
.workflow-pills { .workflow-shortcuts {
margin-top: 12px; max-width: 860px;
padding-top: 12px; margin: 10px auto 0;
border-top: 1px solid rgba(59, 130, 246, 0.15);
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 8px; gap: 8px;
} }
.workflow-pill { .shortcut-pill {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
gap: 4px; gap: 5px;
padding: 4px 10px; height: 28px;
padding: 0 12px;
border: 1px solid #e2e8f0;
border-radius: 999px; border-radius: 999px;
border: 1px solid rgba(59, 130, 246, 0.3); background: rgba(255, 255, 255, 0.7);
background: rgba(255, 255, 255, 0.6);
cursor: pointer;
transition: all 0.2s ease;
color: #475569; color: #475569;
font-size: 12px;
font-weight: 500;
cursor: pointer;
backdrop-filter: blur(4px);
transition: all 0.15s;
outline: none;
.el-icon {
font-size: 12px;
}
&:hover { &:hover {
border-color: #3b82f6; border-color: #93c5fd;
background: rgba(59, 130, 246, 0.08); color: #2563eb;
transform: translateY(-1px); background: rgba(239, 246, 255, 0.9);
} }
&.active { &.active {
border-color: #3b82f6; border-color: #3b82f6;
background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); background: #2563eb;
color: #ffffff; color: #fff;
box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3); box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}
.pill-icon {
font-size: 14px;
}
.pill-text {
font-size: 12px;
font-weight: 500;
line-height: 1.2;
} }
} }
</style> </style>

View File

@@ -13,7 +13,7 @@
<div class="history-title">历史对话</div> <div class="history-title">历史对话</div>
<div class="history-list"> <div class="history-list">
<div <div
v-for="item in historyList" v-for="item in visibleHistory"
:key="item.id" :key="item.id"
class="history-item" class="history-item"
:class="{ active: activeHistoryId === item.id }" :class="{ active: activeHistoryId === item.id }"
@@ -31,12 +31,56 @@
</div> </div>
</div> </div>
</div> </div>
<div class="workspace-section">
<div class="workspace-title">工作流</div>
<div class="workspace-tree-wrap" v-loading="treeLoading">
<el-empty v-if="!treeLoading && treeNodes.length === 0" description="暂无作品数据" />
<el-tree
v-else
:data="treeNodes"
node-key="id"
:props="treeProps"
:highlight-current="true"
:expand-on-click-node="true"
>
<template #default="{ data }">
<div
class="tree-node"
:class="[
data.nodeType === 'date' ? 'level-date' :
data.nodeType === 'contentType' ? 'level-flow' : 'level-file',
data.fileType ? data.fileType.replace(/\//g, ' ').split(' ')[0] : ''
]"
>
<span class="ellipsis">{{ data.label }}</span>
<div v-if="data.nodeType === 'title' && data.fileUrl" class="tree-node-actions">
<el-button type="primary" link size="small" @click.stop="handlePreviewNode(data)"> 预览 </el-button>
<el-button type="primary" link size="small" @click.stop="handleDownloadNode(data)"> 下载 </el-button>
</div>
</div>
</template>
</el-tree>
</div>
</div>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { computed } from 'vue';
import { Plus, Delete } from '@element-plus/icons-vue'; import { Plus, Delete } from '@element-plus/icons-vue';
interface TreeNode {
id: string;
label: string;
nodeType: string;
children?: TreeNode[];
fileUrl?: string;
workflowId?: number | string;
fileType?: string;
sessionId?: string;
}
interface HistoryItem { interface HistoryItem {
id: number; id: number;
title: string; title: string;
@@ -47,6 +91,8 @@ interface Props {
activeMenu: string; activeMenu: string;
activeHistoryId: number; activeHistoryId: number;
historyList: HistoryItem[]; historyList: HistoryItem[];
treeNodes: TreeNode[];
treeLoading: boolean;
} }
interface Emits { interface Emits {
@@ -54,22 +100,22 @@ interface Emits {
(e: 'new-chat'): void; (e: 'new-chat'): void;
(e: 'select-history', id: number): void; (e: 'select-history', id: number): void;
(e: 'delete-history', id: number): void; (e: 'delete-history', id: number): void;
(e: 'preview-node', data: TreeNode): void;
(e: 'download-node', data: TreeNode): void;
} }
defineProps<Props>(); const props = defineProps<Props>();
const emit = defineEmits<Emits>(); const emit = defineEmits<Emits>();
const handleNewChat = () => { const treeProps = { children: 'children', label: 'label' };
emit('new-chat');
};
const handleSelectHistory = (id: number) => { const visibleHistory = computed(() => props.historyList);
emit('select-history', id);
};
const handleDeleteHistory = (id: number) => { const handleNewChat = () => emit('new-chat');
emit('delete-history', id); const handleSelectHistory = (id: number) => emit('select-history', id);
}; const handleDeleteHistory = (id: number) => emit('delete-history', id);
const handlePreviewNode = (data: TreeNode) => emit('preview-node', data);
const handleDownloadNode = (data: TreeNode) => emit('download-node', data);
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@@ -113,12 +159,11 @@ const handleDeleteHistory = (id: number) => {
} }
.history-section { .history-section {
flex: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin-top: 8px; margin-top: 8px;
min-height: 0; padding-bottom: 8px;
background: linear-gradient(180deg, rgba(249, 251, 255, 0.5) 0%, rgba(249, 251, 255, 0.9) 100%); border-bottom: 1px solid rgba(59, 130, 246, 0.08);
} }
.history-title { .history-title {
@@ -131,8 +176,8 @@ const handleDeleteHistory = (id: number) => {
} }
.history-list { .history-list {
flex: 1; padding: 0 8px 4px;
padding: 0 8px 10px; max-height: 255px;
overflow-y: auto; overflow-y: auto;
scrollbar-width: none; scrollbar-width: none;
-ms-overflow-style: none; -ms-overflow-style: none;
@@ -204,4 +249,146 @@ const handleDeleteHistory = (id: number) => {
font-size: 11px; font-size: 11px;
color: #94a3b8; color: #94a3b8;
} }
.workspace-section {
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
margin-top: 8px;
}
.workspace-title {
padding: 4px 12px 8px;
font-size: 11px;
font-weight: 600;
color: #64748b;
text-transform: uppercase;
letter-spacing: 0.8px;
}
.workspace-tree-wrap {
flex: 1;
padding: 0 8px 12px;
overflow-y: auto;
scrollbar-width: none;
-ms-overflow-style: none;
&::-webkit-scrollbar {
display: none;
}
:deep(.el-tree) {
background: transparent;
.el-tree-node {
padding: 4px 0;
}
.el-tree-node__content {
height: 38px;
line-height: 38px;
border-radius: 8px;
margin: 2px 0;
backdrop-filter: blur(8px);
transition: all 0.2s ease;
&:hover {
border-width: 2px;
transform: translateX(2px);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
}
.el-tree-node.is-current > .el-tree-node__content {
border-width: 2px;
box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}
.el-tree-node__expand-icon {
color: rgba(59, 130, 246, 0.7);
}
}
:deep(.level-date) .el-tree-node__content {
height: 42px;
background: linear-gradient(135deg, rgba(59, 130, 246, 0.20) 0%, rgba(59, 130, 246, 0.05) 100%);
border: 1px solid rgba(59, 130, 246, 0.28);
font-weight: 600;
}
:deep(.level-flow) .el-tree-node__content {
margin-left: 8px;
background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0.03) 100%);
border: 1px solid rgba(139, 92, 246, 0.18);
}
:deep(.level-file.image) .el-tree-node__content,
:deep(.level-file.jpg) .el-tree-node__content,
:deep(.level-file.png) .el-tree-node__content,
:deep(.level-file.gif) .el-tree-node__content {
margin-left: 16px;
background: linear-gradient(135deg, rgba(16, 185, 129, 0.18) 0%, rgba(16, 185, 129, 0.04) 100%);
border: 1px solid rgba(16, 185, 129, 0.15);
}
:deep(.level-file.video) .el-tree-node__content,
:deep(.level-file.mp4) .el-tree-node__content,
:deep(.level-file.webm) .el-tree-node__content {
margin-left: 16px;
background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(245, 158, 11, 0.04) 100%);
border: 1px solid rgba(245, 158, 11, 0.15);
}
:deep(.level-file.audio) .el-tree-node__content,
:deep(.level-file.mp3) .el-tree-node__content,
:deep(.level-file.wav) .el-tree-node__content {
margin-left: 16px;
background: linear-gradient(135deg, rgba(236, 72, 153, 0.18) 0%, rgba(236, 72, 153, 0.04) 100%);
border: 1px solid rgba(236, 72, 153, 0.15);
}
:deep(.level-file.text) .el-tree-node__content,
:deep(.level-file.md) .el-tree-node__content,
:deep(.level-file.txt) .el-tree-node__content,
:deep(.level-file.markdown) .el-tree-node__content {
margin-left: 16px;
background: linear-gradient(135deg, rgba(79, 70, 229, 0.18) 0%, rgba(79, 70, 229, 0.04) 100%);
border: 1px solid rgba(79, 70, 229, 0.15);
}
:deep(.level-file:not(.image):not(.video):not(.audio):not(.text)) .el-tree-node__content {
margin-left: 16px;
background: linear-gradient(135deg, rgba(100, 116, 139, 0.15) 0%, rgba(100, 116, 139, 0.04) 100%);
border: 1px solid rgba(100, 116, 139, 0.15);
}
}
.tree-node {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
gap: 6px;
.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 13px;
font-weight: 500;
color: #1e293b;
}
.tree-node-actions {
flex-shrink: 0;
.el-button {
font-size: 11px;
padding: 2px 4px;
margin: 0;
line-height: 1;
}
}
}
</style> </style>

View File

@@ -4,50 +4,21 @@
:active-menu="activeMenu" :active-menu="activeMenu"
:active-history-id="activeHistoryId" :active-history-id="activeHistoryId"
:history-list="historyList" :history-list="historyList"
:tree-nodes="treeNodes"
:tree-loading="treeLoading"
@menu-change="handleMenuChange" @menu-change="handleMenuChange"
@new-chat="handleCreateHistory" @new-chat="handleCreateHistory"
@select-history="handleSelectHistory" @select-history="handleSelectHistory"
@delete-history="handleDeleteHistory" @delete-history="handleDeleteHistory"
@preview-node="previewNode"
@download-node="downloadNode"
/> />
<div class="main-wrapper"> <div class="main-wrapper">
<MainContent :active-menu="activeMenu" /> <MainContent :active-menu="activeMenu" />
<InputBar @send="handleSend" /> <InputBar @send="handleSend" />
</div> </div>
<!-- 右侧工作空间树形结构 -->
<div class="workspace-panel">
<div class="workspace-tree-wrap" v-loading="treeLoading">
<el-empty v-if="!treeLoading && treeNodes.length === 0" description="暂无作品数据" />
<el-tree
v-else
:data="treeNodes"
node-key="id"
:props="treeProps"
default-expand-all
:highlight-current="true"
:expand-on-click-node="true"
@node-click="handleTreeNodeClick"
>
<template #default="{ data }">
<div
class="tree-node"
:class="[
data.nodeType === 'date' ? 'level-date' :
data.nodeType === 'contentType' ? 'level-flow' : 'level-file',
data.fileType ? data.fileType.replace(/\\/g, ' ').split(' ')[0] : ''
]"
>
<span class="ellipsis">{{ data.label }}</span>
<div v-if="data.nodeType === 'title' && data.fileUrl" class="tree-node-actions">
<el-button type="primary" link size="small" @click.stop="previewNode(data)"> 预览 </el-button>
<el-button type="primary" link size="small" @click.stop="downloadNode(data)"> 下载 </el-button>
</div>
</div>
</template>
</el-tree>
</div>
</div>
<!-- 预览弹窗 - 放在外层避免被右侧容器限制宽度 --> <!-- 预览弹窗 -->
<el-dialog v-model="previewDialogVisible" title="预览" width="95%" top="2vh" :close-on-click-modal="false" destroy-on-close> <el-dialog v-model="previewDialogVisible" title="预览" width="95%" top="2vh" :close-on-click-modal="false" destroy-on-close>
<div class="preview-container"> <div class="preview-container">
<el-image v-if="previewUrl && previewMode === 'image'" :src="previewUrl" fit="contain" style="width: 100%; height: 100%" /> <el-image v-if="previewUrl && previewMode === 'image'" :src="previewUrl" fit="contain" style="width: 100%; height: 100%" />
@@ -107,7 +78,6 @@ const historyList = ref<HistoryItem[]>([
{ id: 4, title: '快捷回复产品设计', time: '2 天前' }, { id: 4, title: '快捷回复产品设计', time: '2 天前' },
]); ]);
const treeProps = { children: 'children', label: 'label' };
const apiBaseUrl = (import.meta.env.VITE_API_URL || '').replace(/\/$/, ''); const apiBaseUrl = (import.meta.env.VITE_API_URL || '').replace(/\/$/, '');
const joinUrl = (b: string, p: string) => `${b.replace(/\/$/, '')}${p.startsWith('/') ? p : `/${p}`}`; const joinUrl = (b: string, p: string) => `${b.replace(/\/$/, '')}${p.startsWith('/') ? p : `/${p}`}`;
@@ -155,15 +125,15 @@ const mockTreeData: ExecutionTreeItem[] = [
flowName: '代码审查任务', flowName: '代码审查任务',
sessionId: 'session-1', sessionId: 'session-1',
items: [ items: [
{ label: '审查结果.md', content: 'https://placekitten.com/800/600', type: 'text/markdown' }, { label: '审查结果.md', content: 'https://placekitten.com/800/600', type: 'text/markdown', timestamp: '' },
{ label: '流程图.png', content: 'https://placekitten.com/800/600', type: 'image/png' }, { label: '流程图.png', content: 'https://placekitten.com/800/600', type: 'image/png', timestamp: '' },
], ],
}, },
{ {
Id: 2, Id: 2,
flowName: '需求分析', flowName: '需求分析',
sessionId: 'session-2', sessionId: 'session-2',
items: [{ label: '需求拆解.txt', content: '# 需求分析结果\n\n- 功能点一\n- 功能点二\n- 需要优化', type: 'text/plain' }], items: [{ label: '需求拆解.txt', content: '# 需求分析结果\n\n- 功能点一\n- 功能点二\n- 需要优化', type: 'text/plain', timestamp: '' }],
}, },
], ],
}, },
@@ -174,7 +144,7 @@ const mockTreeData: ExecutionTreeItem[] = [
Id: 3, Id: 3,
flowName: '生成演示视频', flowName: '生成演示视频',
sessionId: 'session-3', sessionId: 'session-3',
items: [{ label: '输出视频.mp4', content: 'https://www.w3schools.com/html/mov_bbb.mp4', type: 'video/mp4' }], items: [{ label: '输出视频.mp4', content: 'https://www.w3schools.com/html/mov_bbb.mp4', type: 'video/mp4', timestamp: '' }],
}, },
], ],
}, },
@@ -230,10 +200,6 @@ const downloadNode = (data: TreeNode) => {
document.body.removeChild(a); document.body.removeChild(a);
}; };
const handleTreeNodeClick = () => {
// 点击节点不需要额外操作
};
const handleMenuChange = (menu: string) => { const handleMenuChange = (menu: string) => {
activeMenu.value = menu; activeMenu.value = menu;
}; };
@@ -311,151 +277,6 @@ onMounted(() => {
} }
} }
/* 右侧工作空间面板 - 渐变玻璃风格 */
.workspace-panel {
width: 260px;
background: linear-gradient(
180deg,
rgba(255, 255, 255, 0.85) 0%,
rgba(249, 251, 255, 0.7) 50%,
rgba(235, 241, 252, 0.6) 100%
);
border-left: 1px solid rgba(59, 130, 246, 0.15);
display: flex;
flex-direction: column;
height: 100%;
box-shadow: -6px 0 35px rgba(59, 130, 246, 0.08);
backdrop-filter: blur(16px);
}
.workspace-tree-wrap {
flex: 1;
padding: 8px 8px 12px;
overflow-y: auto;
scrollbar-width: none;
-ms-overflow-style: none;
&::-webkit-scrollbar {
display: none;
}
:deep(.el-tree) {
background: transparent;
.el-tree-node {
padding: 4px 0;
}
// 一级节点(日期)- 蓝色渐变
:deep(.level-date) .el-tree-node__content {
height: 42px;
background: linear-gradient(135deg, rgba(59, 130, 246, 0.20) 0%, rgba(59, 130, 246, 0.05) 100%);
border: 1px solid rgba(59, 130, 246, 0.28);
font-weight: 600;
}
// 二级节点(工作流)- 紫色渐变
:deep(.level-flow) .el-tree-node__content {
margin-left: 8px;
background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0.03) 100%);
border: 1px solid rgba(139, 92, 246, 0.18);
}
// 三级节点(文件)- 根据文件类型区分颜色
:deep(.level-file.image) .el-tree-node__content,
:deep(.level-file.jpg) .el-tree-node__content,
:deep(.level-file.png) .el-tree-node__content,
:deep(.level-file.gif) .el-tree-node__content {
margin-left: 16px;
background: linear-gradient(135deg, rgba(16, 185, 129, 0.18) 0%, rgba(16, 185, 129, 0.04) 100%);
border: 1px solid rgba(16, 185, 129, 0.15);
}
:deep(.level-file.video) .el-tree-node__content,
:deep(.level-file.mp4) .el-tree-node__content,
:deep(.level-file.webm) .el-tree-node__content {
margin-left: 16px;
background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(245, 158, 11, 0.04) 100%);
border: 1px solid rgba(245, 158, 11, 0.15);
}
:deep(.level-file.audio) .el-tree-node__content,
:deep(.level-file.mp3) .el-tree-node__content,
:deep(.level-file.wav) .el-tree-node__content {
margin-left: 16px;
background: linear-gradient(135deg, rgba(236, 72, 153, 0.18) 0%, rgba(236, 72, 153, 0.04) 100%);
border: 1px solid rgba(236, 72, 153, 0.15);
}
:deep(.level-file.text) .el-tree-node__content,
:deep(.level-file.md) .el-tree-node__content,
:deep(.level-file.txt) .el-tree-node__content,
:deep(.level-file.markdown) .el-tree-node__content {
margin-left: 16px;
background: linear-gradient(135deg, rgba(79, 70, 229, 0.18) 0%, rgba(79, 70, 229, 0.04) 100%);
border: 1px solid rgba(79, 70, 229, 0.15);
}
// 默认其他文件
:deep(.level-file:not(.image):not(.video):not(.audio):not(.text)) .el-tree-node__content {
margin-left: 16px;
background: linear-gradient(135deg, rgba(100, 116, 139, 0.15) 0%, rgba(100, 116, 139, 0.04) 100%);
border: 1px solid rgba(100, 116, 139, 0.15);
}
.el-tree-node__content {
height: 38px;
line-height: 38px;
border-radius: 8px;
margin: 2px 0;
backdrop-filter: blur(8px);
transition: all 0.2s ease;
&:hover {
border-width: 2px;
transform: translateX(2px);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
}
.el-tree-node.is-current > .el-tree-node__content {
border-width: 2px;
box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}
.el-tree-node__expand-icon {
color: rgba(59, 130, 246, 0.7);
}
}
}
.tree-node {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
gap: 6px;
.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 13px;
font-weight: 500;
color: #1e293b;
}
.tree-node-actions {
flex-shrink: 0;
.el-button {
font-size: 11px;
padding: 2px 4px;
margin: 0;
line-height: 1;
}
}
}
.preview-container { .preview-container {
max-height: 85vh; max-height: 85vh;
overflow: auto; overflow: auto;

View File

@@ -138,7 +138,7 @@
><el-form-item label="状态" prop="status" ><el-form-item label="状态" prop="status"
><el-select v-model="platformForm.status" style="width: 100%" ><el-select v-model="platformForm.status" style="width: 100%"
><el-option label="启用" value="ACTIVE" /><el-option label="停用" value="INACTIVE" /></el-select></el-form-item></el-col></el-row ><el-option label="启用" value="ACTIVE" /><el-option label="停用" value="INACTIVE" /></el-select></el-form-item></el-col></el-row
><el-form-item label="Token / access_token"><el-input v-model="platformForm.token" show-password /></el-form-item ><el-form-item label="Token/密钥"><el-input v-model="platformForm.token" show-password /></el-form-item
><el-form-item label="API Key"><el-input v-model="platformForm.apiKey" show-password /></el-form-item ><el-form-item label="API Key"><el-input v-model="platformForm.apiKey" show-password /></el-form-item
><el-row :gutter="16" ><el-row :gutter="16"
><el-col :span="12" ><el-col :span="12"

View File

@@ -0,0 +1,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