Compare commits
12 Commits
f72508aa83
...
feature/wo
| Author | SHA1 | Date | |
|---|---|---|---|
| 9fbe2c6d64 | |||
| ffab3be854 | |||
| f85107be6d | |||
| 27f35a5679 | |||
| 2ede6f4ba0 | |||
| 195d219f91 | |||
| 536ad8386c | |||
| 10519e7500 | |||
| 79d0a2a9fe | |||
| 20bf8138a8 | |||
| 1c0e966b7a | |||
| 57ca523b5a |
@@ -5,3 +5,5 @@ ENV = 'development'
|
|||||||
# 开发环境走本地代理,避免 CORS
|
# 开发环境走本地代理,避免 CORS
|
||||||
VITE_API_URL = 'http://116.204.74.41:8000'
|
VITE_API_URL = 'http://116.204.74.41:8000'
|
||||||
# VITE_API_URL = 'http://192.168.3.30:8000'
|
# VITE_API_URL = 'http://192.168.3.30:8000'
|
||||||
|
# VITE_API_URL = 'http://192.168.3.135:8000'
|
||||||
|
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -25,3 +25,4 @@ pnpm-debug.log*
|
|||||||
*.sln
|
*.sln
|
||||||
*.sw?
|
*.sw?
|
||||||
/admin-ui.iml
|
/admin-ui.iml
|
||||||
|
.gstack/
|
||||||
|
|||||||
60
CLAUDE.md
60
CLAUDE.md
@@ -221,6 +221,66 @@ These rules capture long-term repository preferences confirmed by the user and s
|
|||||||
- `VITE_PUBLIC_PATH` - Public base path for production build
|
- `VITE_PUBLIC_PATH` - Public base path for production build
|
||||||
- `VITE_OPEN_CDN` - Enable CDN for external dependencies
|
- `VITE_OPEN_CDN` - Enable CDN for external dependencies
|
||||||
|
|
||||||
|
## AI Skills
|
||||||
|
|
||||||
|
本项目已全局安装 **gstack** 和 **Superpowers** 两组技能(skill),通过斜杠命令调用。
|
||||||
|
|
||||||
|
### gstack — 浏览器验证与发布
|
||||||
|
|
||||||
|
负责 QA 测试、浏览器自动化、安全审计、代码审查和发布部署。
|
||||||
|
|
||||||
|
| 阶段 | 命令 | 功能 |
|
||||||
|
|------|------|------|
|
||||||
|
| **审查** | `/gstack-review` | 代码审查,自动修复明显问题,标记完整性缺口 |
|
||||||
|
| | `/gstack-cso` | 安全审计(OWASP Top 10 + STRIDE),含漏洞验证 |
|
||||||
|
| **QA 测试** | `/gstack-qa <url>` | 打开浏览器进行功能测试,发现 bug 并自动修复 |
|
||||||
|
| | `/gstack-qa-only <url>` | 仅检测并报告 bug,不修改代码 |
|
||||||
|
| | `/gstack-browse` | AI 浏览网页内容(通过 Playwright + 系统 Chrome) |
|
||||||
|
| | `/gstack-scrape` | 抓取网页内容 |
|
||||||
|
| **性能** | `/gstack-benchmark` | 页面加载性能基准测试 |
|
||||||
|
| | `/gstack-canary` | 部署后监控:控制台错误、性能回归、页面故障 |
|
||||||
|
| **发布** | `/gstack-ship` | 同步主分支、运行测试、推送、创建 PR |
|
||||||
|
| | `/gstack-land-and-deploy` | 合并 PR、等待 CI、部署、验证生产环境 |
|
||||||
|
| **诊断** | `/gstack-investigate` | 系统性根因调试 |
|
||||||
|
| | `/gstack-retro` | 迭代回顾分析 |
|
||||||
|
|
||||||
|
浏览器功能依赖 Playwright,已配置使用系统 Chrome(`C:\Program Files\Google\Chrome\Application\chrome.exe`),无需额外下载浏览器。
|
||||||
|
|
||||||
|
### Superpowers — 思考与计划
|
||||||
|
|
||||||
|
负责头脑风暴、方案设计、计划编写与执行、系统性调试。
|
||||||
|
|
||||||
|
| 阶段 | 命令 | 功能 |
|
||||||
|
|------|------|------|
|
||||||
|
| **构思** | `/sp-brainstorm` | 交互式头脑风暴,梳理需求和方案 |
|
||||||
|
| | `/sp-using-superpowers` | Superpowers 使用指南 |
|
||||||
|
| **计划** | `/sp-write-plan` | 编写实现计划 |
|
||||||
|
| | `/sp-execute-plan` | 按批次执行计划 |
|
||||||
|
| **开发** | `/sp-subagent-dev` | 子代理驱动开发:规范→审查→实现→验证 |
|
||||||
|
| | `/sp-tdd` | 测试驱动开发工作流 |
|
||||||
|
| | `/sp-dispatch-agents` | 并行分发子代理任务 |
|
||||||
|
| **调试** | `/sp-debug` | 系统性调试方法论 |
|
||||||
|
| **审查** | `/sp-request-review` | 请求代码审查 |
|
||||||
|
| | `/sp-receive-review` | 接收并处理审查反馈 |
|
||||||
|
| **完成** | `/sp-verify` | 完成前验证检查 |
|
||||||
|
| | `/sp-finish-branch` | 完成开发分支 |
|
||||||
|
| **工具** | `/sp-write-skills` | 编写自定义 skill |
|
||||||
|
| | `/sp-git-worktrees` | Git 工作树使用指南 |
|
||||||
|
|
||||||
|
### 工作流建议
|
||||||
|
|
||||||
|
推荐开发流程按此顺序使用两组 skill:
|
||||||
|
|
||||||
|
```
|
||||||
|
/sp-brainstorm → 梳理需求
|
||||||
|
/sp-write-plan → 编写实现计划
|
||||||
|
(编码实现)
|
||||||
|
/gstack-review → 代码审查
|
||||||
|
/gstack-qa <url> → QA 测试
|
||||||
|
/gstack-cso → 安全检查
|
||||||
|
/gstack-ship → 发布
|
||||||
|
```
|
||||||
|
|
||||||
## Development Notes
|
## Development Notes
|
||||||
|
|
||||||
- The project uses `/@` alias for `src/`
|
- The project uses `/@` alias for `src/`
|
||||||
|
|||||||
@@ -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"]
|
|
||||||
30
ngnix.conf
30
ngnix.conf
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,65 +1,88 @@
|
|||||||
<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>
|
<button class="tool-icon-btn" title="上传文件" @click="handleAttachment">
|
||||||
</el-button>
|
<el-icon><Paperclip /></el-icon>
|
||||||
<el-dropdown trigger="click" @command="handleSkillSelect">
|
</button>
|
||||||
<el-button class="pill-btn">
|
|
||||||
{{ currentSkillDisplay }}
|
<!-- 选择技能 -->
|
||||||
</el-button>
|
<el-dropdown trigger="click" placement="top-start" @command="handleSkillSelect">
|
||||||
|
<button class="tool-icon-btn" :class="{ active: selectedSkill !== 'default' }" title="选择技能">
|
||||||
|
<el-icon><MagicStick /></el-icon>
|
||||||
|
<span class="tool-label">技能</span>
|
||||||
|
</button>
|
||||||
<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 +92,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 +108,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 +137,237 @@ 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 toggleWorkflow = (id: number) => {
|
||||||
if (selectedWorkflowId.value === wf.id) {
|
selectedWorkflowId.value = selectedWorkflowId.value === id ? null : id;
|
||||||
selectedWorkflowId.value = null;
|
|
||||||
ElMessage.info('已取消工作流');
|
|
||||||
} else {
|
|
||||||
selectedWorkflowId.value = wf.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>
|
||||||
|
|||||||
@@ -1,41 +1,103 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
<div class="sidebar-header">
|
<!-- 顶部品牌区 -->
|
||||||
<el-button class="new-chat-btn" @click="handleNewChat">
|
<div class="sidebar-brand">
|
||||||
<el-icon>
|
<div class="brand-logo">
|
||||||
<Plus />
|
<el-icon class="brand-icon"><ChatDotRound /></el-icon>
|
||||||
</el-icon>
|
<span class="brand-name">AI 助手</span>
|
||||||
新增对话
|
</div>
|
||||||
</el-button>
|
<el-tooltip content="新建对话" placement="right">
|
||||||
|
<button class="new-chat-icon-btn" @click="handleNewChat">
|
||||||
|
<el-icon><EditPen /></el-icon>
|
||||||
|
</button>
|
||||||
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="historyList.length" class="history-section">
|
<!-- Tab 切换 -->
|
||||||
<div class="history-title">历史对话</div>
|
<div class="sidebar-tabs">
|
||||||
<div class="history-list">
|
<button class="tab-btn" :class="{ active: activeTab === 'history' }" @click="activeTab = 'history'">
|
||||||
|
<el-icon><ChatLineRound /></el-icon>
|
||||||
|
对话记录
|
||||||
|
</button>
|
||||||
|
<button class="tab-btn" :class="{ active: activeTab === 'workspace' }" @click="activeTab = 'workspace'">
|
||||||
|
<el-icon><FolderOpened /></el-icon>
|
||||||
|
工作空间
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 对话记录面板 -->
|
||||||
|
<div v-show="activeTab === 'history'" class="panel">
|
||||||
|
<div v-if="historyList.length" class="panel-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 }"
|
||||||
@click="handleSelectHistory(item.id)"
|
@click="handleSelectHistory(item.id)"
|
||||||
>
|
>
|
||||||
<div class="history-main">
|
<el-icon class="item-icon"><ChatLineRound /></el-icon>
|
||||||
<div class="history-name">{{ item.title }}</div>
|
<div class="item-body">
|
||||||
<div class="history-time">{{ item.time }}</div>
|
<div class="item-title">{{ item.title }}</div>
|
||||||
|
<div class="item-time">{{ item.time }}</div>
|
||||||
</div>
|
</div>
|
||||||
<el-button text class="delete-btn" @click.stop="handleDeleteHistory(item.id)">
|
<button class="item-del-btn" @click.stop="handleDeleteHistory(item.id)">
|
||||||
<el-icon>
|
<el-icon><Delete /></el-icon>
|
||||||
<Delete />
|
</button>
|
||||||
</el-icon>
|
|
||||||
</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
|
<button v-if="historyShowCount < historyList.length" class="load-more-btn" @click="historyShowCount += HISTORY_PAGE">
|
||||||
|
<el-icon><ArrowDown /></el-icon>
|
||||||
|
展开更多 ({{ historyList.length - historyShowCount }} 条)
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div v-else class="panel-empty">暂无对话记录</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 工作空间面板 -->
|
||||||
|
<div v-show="activeTab === 'workspace'" class="panel" v-loading="treeLoading">
|
||||||
|
<el-empty v-if="!treeLoading && treeNodes.length === 0" :image-size="48" description="暂无内容" />
|
||||||
|
<div v-else class="panel-list">
|
||||||
|
<div v-for="dateNode in visibleWorkspace" :key="dateNode.id" class="tree-date-group">
|
||||||
|
<div class="tree-date-label">{{ dateNode.label }}</div>
|
||||||
|
<div v-for="flowNode in dateNode.children" :key="flowNode.id" class="tree-flow-group">
|
||||||
|
<div class="tree-flow-label">
|
||||||
|
<el-icon><Promotion /></el-icon>
|
||||||
|
<span>{{ flowNode.label }}</span>
|
||||||
|
</div>
|
||||||
|
<div v-for="fileNode in flowNode.children" :key="fileNode.id" class="tree-file-item">
|
||||||
|
<el-icon class="file-type-icon">
|
||||||
|
<component :is="getFileIcon(fileNode.fileType)" />
|
||||||
|
</el-icon>
|
||||||
|
<span class="file-name">{{ fileNode.label }}</span>
|
||||||
|
<div v-if="fileNode.fileUrl" class="file-actions">
|
||||||
|
<button class="file-action-btn" @click.stop="handlePreviewNode(fileNode)">预览</button>
|
||||||
|
<button class="file-action-btn" @click.stop="handleDownloadNode(fileNode)">下载</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button v-if="workspaceShowCount < treeNodes.length" class="load-more-btn" @click="workspaceShowCount += WORKSPACE_PAGE">
|
||||||
|
<el-icon><ArrowDown /></el-icon>
|
||||||
|
展开更多 ({{ treeNodes.length - workspaceShowCount }} 条)
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Plus, Delete } from '@element-plus/icons-vue';
|
import { ref, computed } from 'vue';
|
||||||
|
import { Delete, ChatDotRound, ChatLineRound, EditPen, ArrowDown, Promotion, Document, VideoPlay, Headset, Picture, FolderOpened } 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;
|
||||||
@@ -47,6 +109,8 @@ interface Props {
|
|||||||
activeMenu: string;
|
activeMenu: string;
|
||||||
activeHistoryId: number;
|
activeHistoryId: number;
|
||||||
historyList: HistoryItem[];
|
historyList: HistoryItem[];
|
||||||
|
treeNodes: TreeNode[];
|
||||||
|
treeLoading: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Emits {
|
interface Emits {
|
||||||
@@ -54,154 +118,384 @@ 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 HISTORY_PAGE = 10;
|
||||||
emit('new-chat');
|
const WORKSPACE_PAGE = 5;
|
||||||
|
|
||||||
|
const activeTab = ref<'history' | 'workspace'>('history');
|
||||||
|
const historyShowCount = ref(HISTORY_PAGE);
|
||||||
|
const workspaceShowCount = ref(WORKSPACE_PAGE);
|
||||||
|
|
||||||
|
const visibleHistory = computed(() => props.historyList.slice(0, historyShowCount.value));
|
||||||
|
const visibleWorkspace = computed(() => props.treeNodes.slice(0, workspaceShowCount.value));
|
||||||
|
|
||||||
|
const getFileIcon = (fileType?: string) => {
|
||||||
|
if (!fileType) return Document;
|
||||||
|
const t = fileType.toLowerCase();
|
||||||
|
if (t.includes('image') || t.includes('png') || t.includes('jpg') || t.includes('gif')) return Picture;
|
||||||
|
if (t.includes('video') || t.includes('mp4') || t.includes('webm')) return VideoPlay;
|
||||||
|
if (t.includes('audio') || t.includes('mp3') || t.includes('wav')) return Headset;
|
||||||
|
return Document;
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSelectHistory = (id: number) => {
|
const handleNewChat = () => emit('new-chat');
|
||||||
emit('select-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 handleDeleteHistory = (id: number) => {
|
const handleDownloadNode = (data: TreeNode) => emit('download-node', data);
|
||||||
emit('delete-history', id);
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.sidebar {
|
.sidebar {
|
||||||
width: 252px;
|
width: 240px;
|
||||||
background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(249, 251, 255, 0.92) 100%);
|
flex-shrink: 0;
|
||||||
border-right: 1px solid #e7edf7;
|
background: #f8fafc;
|
||||||
|
border-right: 1px solid #e2e8f0;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
box-shadow: 8px 0 30px rgba(15, 23, 42, 0.06);
|
overflow: hidden;
|
||||||
backdrop-filter: blur(10px);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-header {
|
/* 品牌区 */
|
||||||
padding: 18px 16px 14px;
|
.sidebar-brand {
|
||||||
border-bottom: 1px solid #e9eef7;
|
display: flex;
|
||||||
position: relative;
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 16px 12px 12px;
|
||||||
|
border-bottom: 1px solid #e2e8f0;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.new-chat-btn {
|
.brand-logo {
|
||||||
margin-top: 0;
|
display: flex;
|
||||||
width: 100%;
|
align-items: center;
|
||||||
height: 40px;
|
gap: 8px;
|
||||||
border-radius: 12px;
|
}
|
||||||
border: 1px solid rgba(59, 130, 246, 0.28);
|
|
||||||
background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
|
.brand-icon {
|
||||||
color: #ffffff;
|
font-size: 20px;
|
||||||
font-weight: 600;
|
color: #2563eb;
|
||||||
letter-spacing: 0.2px;
|
}
|
||||||
box-shadow: 0 4px 12px rgba(37, 99, 235, 0.26);
|
|
||||||
transition: all 0.2s ease;
|
.brand-name {
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #0f172a;
|
||||||
|
letter-spacing: -0.2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.new-chat-icon-btn {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 8px;
|
||||||
|
background: transparent;
|
||||||
|
color: #64748b;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background 0.15s, color 0.15s;
|
||||||
|
outline: none;
|
||||||
|
|
||||||
|
.el-icon {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
transform: translateY(-1px);
|
background: #e2e8f0;
|
||||||
color: #ffffff;
|
color: #0f172a;
|
||||||
border-color: rgba(59, 130, 246, 0.4);
|
|
||||||
background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
|
|
||||||
box-shadow: 0 6px 16px rgba(37, 99, 235, 0.32);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.history-section {
|
/* Tab 切换 */
|
||||||
flex: 1;
|
.sidebar-tabs {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
padding: 8px 8px 0;
|
||||||
margin-top: 8px;
|
gap: 4px;
|
||||||
min-height: 0;
|
flex-shrink: 0;
|
||||||
background: linear-gradient(180deg, rgba(249, 251, 255, 0.5) 0%, rgba(249, 251, 255, 0.9) 100%);
|
border-bottom: 1px solid #e2e8f0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.history-title {
|
.tab-btn {
|
||||||
padding: 12px 12px 8px;
|
flex: 1;
|
||||||
font-size: 11px;
|
display: inline-flex;
|
||||||
font-weight: 600;
|
align-items: center;
|
||||||
color: #64748b;
|
justify-content: center;
|
||||||
text-transform: uppercase;
|
gap: 5px;
|
||||||
letter-spacing: 0.8px;
|
height: 34px;
|
||||||
}
|
border: none;
|
||||||
|
border-radius: 8px 8px 0 0;
|
||||||
.history-list {
|
background: transparent;
|
||||||
|
color: #64748b;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 500;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background 0.15s, color 0.15s;
|
||||||
|
outline: none;
|
||||||
|
border-bottom: 2px solid transparent;
|
||||||
|
margin-bottom: -1px;
|
||||||
|
|
||||||
|
.el-icon {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover:not(.active) {
|
||||||
|
background: #f1f5f9;
|
||||||
|
color: #334155;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
color: #2563eb;
|
||||||
|
font-weight: 600;
|
||||||
|
background: #fff;
|
||||||
|
border-bottom-color: #2563eb;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 面板通用 */
|
||||||
|
.panel {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
padding: 0 8px 10px;
|
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
padding: 8px 8px 12px;
|
||||||
scrollbar-width: none;
|
scrollbar-width: none;
|
||||||
-ms-overflow-style: none;
|
|
||||||
|
|
||||||
&::-webkit-scrollbar {
|
&::-webkit-scrollbar {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.panel-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel-empty {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #cbd5e1;
|
||||||
|
text-align: center;
|
||||||
|
padding: 32px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 历史记录条目 */
|
||||||
.history-item {
|
.history-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
padding: 10px 10px;
|
padding: 8px;
|
||||||
margin-bottom: 6px;
|
border-radius: 8px;
|
||||||
border-radius: 10px;
|
|
||||||
border: 1px solid transparent;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
transition: background 0.15s;
|
||||||
background: rgba(255, 255, 255, 0.6);
|
margin-bottom: 1px;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
border-color: #bfdbfe;
|
background: #f1f5f9;
|
||||||
background: linear-gradient(135deg, rgba(239, 246, 255, 0.9) 0%, rgba(219, 234, 254, 0.7) 100%);
|
|
||||||
transform: translateX(2px);
|
|
||||||
}
|
|
||||||
|
|
||||||
&.active {
|
.item-del-btn {
|
||||||
border-color: #3b82f6;
|
opacity: 1;
|
||||||
background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0.04) 100%);
|
|
||||||
box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
|
|
||||||
}
|
|
||||||
|
|
||||||
.delete-btn {
|
|
||||||
opacity: 0;
|
|
||||||
color: #94a3b8;
|
|
||||||
transition: all 0.2s ease;
|
|
||||||
padding: 4px;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: #ef4444;
|
|
||||||
background: rgba(239, 68, 68, 0.1);
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover .delete-btn {
|
&.active {
|
||||||
opacity: 1;
|
background: #eff6ff;
|
||||||
|
|
||||||
|
.item-icon {
|
||||||
|
color: #2563eb;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-title {
|
||||||
|
color: #1d4ed8;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.history-main {
|
.item-icon {
|
||||||
min-width: 0;
|
font-size: 14px;
|
||||||
flex: 1;
|
color: #94a3b8;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.history-name {
|
.item-body {
|
||||||
font-size: 12px;
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-title {
|
||||||
|
font-size: 13px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #1e293b;
|
color: #1e293b;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-time {
|
||||||
|
font-size: 11px;
|
||||||
|
color: #94a3b8;
|
||||||
|
margin-top: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-del-btn {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 22px;
|
||||||
|
height: 22px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 5px;
|
||||||
|
background: transparent;
|
||||||
|
color: #94a3b8;
|
||||||
|
cursor: pointer;
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity 0.15s, background 0.15s, color 0.15s;
|
||||||
|
flex-shrink: 0;
|
||||||
|
outline: none;
|
||||||
|
|
||||||
|
.el-icon {
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: #fee2e2;
|
||||||
|
color: #ef4444;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 展开更多按钮 */
|
||||||
|
.load-more-btn {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 5px;
|
||||||
|
width: 100%;
|
||||||
|
height: 32px;
|
||||||
|
margin-top: 4px;
|
||||||
|
border: 1px dashed #cbd5e1;
|
||||||
|
border-radius: 8px;
|
||||||
|
background: transparent;
|
||||||
|
color: #64748b;
|
||||||
|
font-size: 12px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: border-color 0.15s, color 0.15s, background 0.15s;
|
||||||
|
outline: none;
|
||||||
|
|
||||||
|
.el-icon {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
border-color: #93c5fd;
|
||||||
|
color: #2563eb;
|
||||||
|
background: #eff6ff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 工作空间树节点 */
|
||||||
|
.tree-date-group {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tree-date-label {
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #94a3b8;
|
||||||
|
padding: 6px 4px 2px;
|
||||||
|
letter-spacing: 0.4px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tree-flow-group {
|
||||||
margin-bottom: 2px;
|
margin-bottom: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.history-time {
|
.tree-flow-label {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
padding: 6px 8px;
|
||||||
|
border-radius: 6px;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #475569;
|
||||||
|
|
||||||
|
.el-icon {
|
||||||
|
font-size: 13px;
|
||||||
|
color: #7c3aed;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
span {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tree-file-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
padding: 5px 8px 5px 24px;
|
||||||
|
border-radius: 6px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background 0.15s;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: #f1f5f9;
|
||||||
|
|
||||||
|
.file-actions {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-type-icon {
|
||||||
|
font-size: 13px;
|
||||||
|
color: #64748b;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-name {
|
||||||
|
flex: 1;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #334155;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-actions {
|
||||||
|
display: flex;
|
||||||
|
gap: 2px;
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity 0.15s;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-action-btn {
|
||||||
|
border: none;
|
||||||
|
background: transparent;
|
||||||
|
color: #3b82f6;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
color: #94a3b8;
|
cursor: pointer;
|
||||||
|
padding: 2px 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
outline: none;
|
||||||
|
transition: background 0.15s;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: #dbeafe;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -1,123 +1,85 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="cid-apis-container">
|
<div class="cid-apis-container">
|
||||||
<el-card shadow="hover"
|
<el-card shadow="hover">
|
||||||
><el-tabs v-model="tab" @tab-change="onTab"
|
<template #header>
|
||||||
><el-tab-pane label="平台管理" name="platform"
|
<span style="font-weight: 600">平台管理</span>
|
||||||
><el-form ref="pqf" :model="pq" :inline="true" label-width="68px" class="mb15"
|
</template>
|
||||||
><el-form-item label="关键字" prop="keyword"
|
<el-form ref="pqf" :model="pq" :inline="true" label-width="68px" class="mb15">
|
||||||
><el-input
|
<el-form-item label="关键字" prop="keyword">
|
||||||
v-model="pq.keyword"
|
<el-input v-model="pq.keyword" placeholder="请输入平台名称/编码" clearable style="width: 240px" @keyup.enter.native="searchPlatform" />
|
||||||
placeholder="请输入平台名称/编码"
|
</el-form-item>
|
||||||
clearable
|
<el-form-item label="状态" prop="status">
|
||||||
style="width: 240px"
|
<el-select v-model="pq.status" placeholder="平台状态" clearable style="width: 160px">
|
||||||
@keyup.enter.native="searchPlatform" /></el-form-item
|
<el-option label="启用" value="ACTIVE" />
|
||||||
><el-form-item label="状态" prop="status"
|
<el-option label="禁用" value="INACTIVE" />
|
||||||
><el-select v-model="pq.status" placeholder="平台状态" clearable style="width: 160px"
|
</el-select>
|
||||||
><el-option label="启用" value="ACTIVE" /><el-option label="禁用" value="INACTIVE" /></el-select></el-form-item
|
</el-form-item>
|
||||||
><el-form-item
|
<el-form-item>
|
||||||
><el-button type="primary" @click="searchPlatform"
|
<el-button type="primary" @click="searchPlatform"><el-icon><ele-Search /></el-icon>查询</el-button>
|
||||||
><el-icon><ele-Search /></el-icon>查询</el-button
|
<el-button @click="resetPlatformQuery"><el-icon><ele-Refresh /></el-icon>重置</el-button>
|
||||||
><el-button @click="resetPlatformQuery"
|
<el-button type="success" @click="openPlatform()"><el-icon><ele-FolderAdd /></el-icon>新增平台</el-button>
|
||||||
><el-icon><ele-Refresh /></el-icon>重置</el-button
|
</el-form-item>
|
||||||
><el-button type="success" @click="openPlatform()"
|
</el-form>
|
||||||
><el-icon><ele-FolderAdd /></el-icon>新增平台</el-button
|
<el-table :data="platformRows" row-key="id" v-loading="platformLoading">
|
||||||
></el-form-item
|
<el-table-column type="index" label="序号" width="60" />
|
||||||
></el-form
|
<el-table-column prop="platformCode" label="平台编码" min-width="140" show-overflow-tooltip />
|
||||||
><el-table :data="platformRows" row-key="id" v-loading="platformLoading"
|
<el-table-column prop="platformName" label="平台名称" min-width="160" show-overflow-tooltip />
|
||||||
><el-table-column type="index" label="序号" width="60" /><el-table-column
|
<el-table-column prop="apiBaseUrl" label="API地址" min-width="220" show-overflow-tooltip />
|
||||||
prop="platformCode"
|
<el-table-column prop="authType" label="认证" width="100" align="center" />
|
||||||
label="平台编码"
|
<el-table-column prop="status" label="状态" width="90" align="center">
|
||||||
min-width="140"
|
<template #default="s">
|
||||||
show-overflow-tooltip
|
<el-tag size="small" :type="s.row.status === 'ACTIVE' ? 'success' : 'danger'">{{ s.row.status === 'ACTIVE' ? '启用' : '禁用' }}</el-tag>
|
||||||
/><el-table-column prop="platformName" label="平台名称" min-width="160" show-overflow-tooltip /><el-table-column
|
</template>
|
||||||
prop="apiBaseUrl"
|
</el-table-column>
|
||||||
label="API地址"
|
<el-table-column prop="rateLimitPerMinute" label="限流/分钟" width="110" align="center" />
|
||||||
min-width="220"
|
<el-table-column prop="requestTimeoutMs" label="超时(ms)" width="110" align="center" />
|
||||||
show-overflow-tooltip
|
<el-table-column label="创建时间" width="170">
|
||||||
/><el-table-column prop="authType" label="认证" width="100" align="center" /><el-table-column
|
<template #default="s">{{ ft(s.row.createdAt) }}</template>
|
||||||
prop="status"
|
</el-table-column>
|
||||||
label="状态"
|
<el-table-column label="操作" width="240" fixed="right">
|
||||||
width="90"
|
<template #default="s">
|
||||||
align="center"
|
<el-button size="small" text type="primary" @click="manageApis(s.row)">接口管理</el-button>
|
||||||
><template #default="s"
|
<el-button size="small" text type="primary" @click="openPlatform(s.row)">修改</el-button>
|
||||||
><el-tag size="small" :type="s.row.status === 'ACTIVE' ? 'success' : 'danger'">{{
|
<el-button size="small" text type="danger" @click="delPlatform(s.row)">删除</el-button>
|
||||||
s.row.status === 'ACTIVE' ? '启用' : '禁用'
|
</template>
|
||||||
}}</el-tag></template
|
</el-table-column>
|
||||||
></el-table-column
|
</el-table>
|
||||||
><el-table-column prop="rateLimitPerMinute" label="限流/分钟" width="110" align="center" /><el-table-column
|
<pagination :total="platformTotal" v-model:page="pq.pageNum" v-model:limit="pq.pageSize" @pagination="getPlatforms" />
|
||||||
prop="requestTimeoutMs"
|
</el-card>
|
||||||
label="超时(ms)"
|
<el-dialog v-model="apiListDialog.visible" :title="apiListDialog.title" width="1100px" :close-on-click-modal="false" destroy-on-close @closed="handleApiListClose"
|
||||||
width="110"
|
><el-form ref="aqf" :model="aq" :inline="true" label-width="68px" class="mb15"
|
||||||
align="center"
|
><el-form-item label="关键字" prop="keyword"
|
||||||
/><el-table-column label="创建时间" width="170"
|
><el-input v-model="aq.keyword" placeholder="请输入接口名称/编码" clearable style="width: 220px" @keyup.enter.native="searchApi" /></el-form-item
|
||||||
><template #default="s">{{ ft(s.row.createdAt) }}</template></el-table-column
|
><el-form-item label="状态" prop="status"
|
||||||
><el-table-column label="操作" width="150" fixed="right"
|
><el-select v-model="aq.status" placeholder="状态" clearable style="width: 130px"
|
||||||
><template #default="s"
|
><el-option label="启用" value="active" /><el-option label="禁用" value="inactive" /></el-select></el-form-item
|
||||||
><el-button size="small" text type="primary" @click="openPlatform(s.row)">修改</el-button
|
><el-form-item label="方法" prop="method"
|
||||||
><el-button size="small" text type="danger" @click="delPlatform(s.row)">删除</el-button></template
|
><el-select v-model="aq.method" placeholder="请求方式" clearable style="width: 130px"
|
||||||
></el-table-column
|
><el-option v-for="m in methods" :key="m" :label="m" :value="m" /></el-select></el-form-item
|
||||||
></el-table
|
><el-form-item
|
||||||
><pagination :total="platformTotal" v-model:page="pq.pageNum" v-model:limit="pq.pageSize" @pagination="getPlatforms" /></el-tab-pane
|
><el-button type="primary" @click="searchApi"><el-icon><ele-Search /></el-icon>查询</el-button
|
||||||
><el-tab-pane label="接口管理" name="api"
|
><el-button @click="resetApiQuery"><el-icon><ele-Refresh /></el-icon>重置</el-button
|
||||||
><el-form ref="aqf" :model="aq" :inline="true" label-width="68px" class="mb15"
|
><el-button type="success" @click="openApiForCurrentPlatform()"><el-icon><ele-FolderAdd /></el-icon>新增接口</el-button></el-form-item></el-form
|
||||||
><el-form-item label="关键字" prop="keyword"
|
><el-table :data="apiRows" v-loading="apiLoading" max-height="420"
|
||||||
><el-input
|
><el-table-column type="index" label="序号" width="60" /><el-table-column prop="code" label="接口编码" min-width="140" show-overflow-tooltip
|
||||||
v-model="aq.keyword"
|
/><el-table-column prop="name" label="接口名称" min-width="150" show-overflow-tooltip /><el-table-column prop="url" label="URL" min-width="220"
|
||||||
placeholder="请输入接口名称/编码"
|
show-overflow-tooltip /><el-table-column prop="method" label="请求方式" width="100" align="center"
|
||||||
clearable
|
><template #default="s"
|
||||||
style="width: 220px"
|
><el-tag size="small" :type="s.row.method === 'GET' ? 'success' : 'primary'">{{ s.row.method }}</el-tag></template></el-table-column
|
||||||
@keyup.enter.native="searchApi" /></el-form-item
|
><el-table-column prop="status" label="状态" width="90" align="center"
|
||||||
><el-form-item label="平台" prop="platformId"
|
><template #default="s"
|
||||||
><el-select v-model="aq.platformId" placeholder="请选择平台" clearable filterable style="width: 180px"
|
><el-tag size="small" :type="ns(s.row.status) === 'active' ? 'success' : 'danger'">{{ ns(s.row.status) === 'active' ? '启用' : '禁用' }}</el-tag></template></el-table-column
|
||||||
><el-option v-for="i in platforms" :key="i.id" :label="i.platformName" :value="String(i.id)" /></el-select></el-form-item
|
><el-table-column prop="platformName" label="所属平台" min-width="140" show-overflow-tooltip /><el-table-column label="创建时间" width="170"
|
||||||
><el-form-item label="状态" prop="status"
|
><template #default="s">{{ ft(s.row.createdAt) }}</template></el-table-column
|
||||||
><el-select v-model="aq.status" placeholder="状态" clearable style="width: 130px"
|
><el-table-column label="操作" width="160" fixed="right"
|
||||||
><el-option label="启用" value="active" /><el-option label="禁用" value="inactive" /></el-select></el-form-item
|
><template #default="s"
|
||||||
><el-form-item label="方法" prop="method"
|
><el-button size="small" text type="primary" @click="openApi(String(s.row.id))">修改</el-button
|
||||||
><el-select v-model="aq.method" placeholder="请求方式" clearable style="width: 130px"
|
><el-button size="small" text type="danger" @click="delApi(s.row)">删除</el-button></template></el-table-column></el-table
|
||||||
><el-option v-for="m in methods" :key="m" :label="m" :value="m" /></el-select></el-form-item
|
><template #footer
|
||||||
><el-form-item
|
><div style="display: flex; justify-content: space-between; align-items: center; width: 100%;"
|
||||||
><el-button type="primary" @click="searchApi"
|
><pagination :total="apiTotal" v-model:page="aq.pageNum" v-model:limit="aq.pageSize" @pagination="getApis" />
|
||||||
><el-icon><ele-Search /></el-icon>查询</el-button
|
<el-button type="primary" @click="apiListDialog.visible = false">关闭</el-button></div></template
|
||||||
><el-button @click="resetApiQuery"
|
></el-dialog>
|
||||||
><el-icon><ele-Refresh /></el-icon>重置</el-button
|
|
||||||
><el-button type="success" @click="openApi()"
|
|
||||||
><el-icon><ele-FolderAdd /></el-icon>新增接口</el-button
|
|
||||||
></el-form-item
|
|
||||||
></el-form
|
|
||||||
><el-table :data="apiRows" v-loading="apiLoading"
|
|
||||||
><el-table-column type="index" label="序号" width="60" /><el-table-column
|
|
||||||
prop="code"
|
|
||||||
label="接口编码"
|
|
||||||
min-width="140"
|
|
||||||
show-overflow-tooltip
|
|
||||||
/><el-table-column prop="name" label="接口名称" min-width="150" show-overflow-tooltip /><el-table-column
|
|
||||||
prop="url"
|
|
||||||
label="URL"
|
|
||||||
min-width="220"
|
|
||||||
show-overflow-tooltip
|
|
||||||
/><el-table-column prop="method" label="请求方式" width="100" align="center"
|
|
||||||
><template #default="s"
|
|
||||||
><el-tag size="small" :type="s.row.method === 'GET' ? 'success' : 'primary'">{{ s.row.method }}</el-tag></template
|
|
||||||
></el-table-column
|
|
||||||
><el-table-column prop="status" label="状态" width="90" align="center"
|
|
||||||
><template #default="s"
|
|
||||||
><el-tag size="small" :type="ns(s.row.status) === 'active' ? 'success' : 'danger'">{{
|
|
||||||
ns(s.row.status) === 'active' ? '启用' : '禁用'
|
|
||||||
}}</el-tag></template
|
|
||||||
></el-table-column
|
|
||||||
><el-table-column prop="platformName" label="所属平台" min-width="140" show-overflow-tooltip /> ><el-table-column
|
|
||||||
label="创建时间"
|
|
||||||
width="170"
|
|
||||||
><template #default="s">{{ ft(s.row.createdAt) }}</template></el-table-column
|
|
||||||
><el-table-column label="操作" width="160" fixed="right"
|
|
||||||
><template #default="s"
|
|
||||||
><el-button size="small" text type="primary" @click="openApi(String(s.row.id))">修改</el-button
|
|
||||||
><el-button size="small" text type="danger" @click="delApi(s.row)">删除</el-button></template
|
|
||||||
></el-table-column
|
|
||||||
></el-table
|
|
||||||
><pagination :total="apiTotal" v-model:page="aq.pageNum" v-model:limit="aq.pageSize" @pagination="getApis" /></el-tab-pane></el-tabs
|
|
||||||
></el-card>
|
|
||||||
<el-dialog v-model="platformDialog.visible" :title="platformDialog.title" width="720px" :close-on-click-modal="false" destroy-on-close
|
<el-dialog v-model="platformDialog.visible" :title="platformDialog.title" width="720px" :close-on-click-modal="false" destroy-on-close
|
||||||
><el-form ref="platformFormRef" :model="platformForm" :rules="platformRules" label-width="120px" v-loading="platformDialog.loading"
|
><el-form ref="platformFormRef" :model="platformForm" :rules="platformRules" label-width="120px" v-loading="platformDialog.loading"
|
||||||
><el-row :gutter="16"
|
><el-row :gutter="16"
|
||||||
@@ -138,7 +100,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"
|
||||||
@@ -235,7 +197,7 @@ import {
|
|||||||
type ApiInterfaceInfo,
|
type ApiInterfaceInfo,
|
||||||
} from '/@/api/cid/apis';
|
} from '/@/api/cid/apis';
|
||||||
defineOptions({ name: 'cidApis' });
|
defineOptions({ name: 'cidApis' });
|
||||||
const tab = ref('platform'),
|
const currentPlatform = ref<any>(null),
|
||||||
methods = ['GET', 'POST', 'PUT', 'DELETE'],
|
methods = ['GET', 'POST', 'PUT', 'DELETE'],
|
||||||
platforms = ref<any[]>([]),
|
platforms = ref<any[]>([]),
|
||||||
platformRows = ref<any[]>([]),
|
platformRows = ref<any[]>([]),
|
||||||
@@ -251,7 +213,8 @@ const pqf = ref<FormInstance>(),
|
|||||||
const pq = reactive({ pageNum: 1, pageSize: 10, keyword: '', status: '' }),
|
const pq = reactive({ pageNum: 1, pageSize: 10, keyword: '', status: '' }),
|
||||||
aq = reactive({ pageNum: 1, pageSize: 10, keyword: '', platformId: '', status: '', method: '' });
|
aq = reactive({ pageNum: 1, pageSize: 10, keyword: '', platformId: '', status: '', method: '' });
|
||||||
const platformDialog = reactive({ visible: false, title: '', loading: false, saving: false }),
|
const platformDialog = reactive({ visible: false, title: '', loading: false, saving: false }),
|
||||||
apiDialog = reactive({ visible: false, title: '', loading: false, saving: false });
|
apiDialog = reactive({ visible: false, title: '', loading: false, saving: false }),
|
||||||
|
apiListDialog = reactive({ visible: false, title: '' });
|
||||||
const dpf = () => ({
|
const dpf = () => ({
|
||||||
id: '',
|
id: '',
|
||||||
platformCode: '',
|
platformCode: '',
|
||||||
@@ -356,7 +319,6 @@ const getApis = async () => {
|
|||||||
apiLoading.value = false;
|
apiLoading.value = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const onTab = () => (tab.value === 'platform' ? getPlatforms() : getApis());
|
|
||||||
const searchPlatform = () => {
|
const searchPlatform = () => {
|
||||||
pq.pageNum = 1;
|
pq.pageNum = 1;
|
||||||
getPlatforms();
|
getPlatforms();
|
||||||
@@ -373,6 +335,23 @@ const resetApiQuery: any = () => {
|
|||||||
aqf.value?.resetFields();
|
aqf.value?.resetFields();
|
||||||
searchApi();
|
searchApi();
|
||||||
};
|
};
|
||||||
|
const manageApis = (row: any) => {
|
||||||
|
currentPlatform.value = row;
|
||||||
|
aq.platformId = String(row.id);
|
||||||
|
aq.pageNum = 1;
|
||||||
|
aq.keyword = '';
|
||||||
|
aq.status = '';
|
||||||
|
aq.method = '';
|
||||||
|
apiListDialog.title = `${row.platformName} - 接口管理`;
|
||||||
|
apiListDialog.visible = true;
|
||||||
|
getApis();
|
||||||
|
};
|
||||||
|
const handleApiListClose = () => {
|
||||||
|
currentPlatform.value = null;
|
||||||
|
};
|
||||||
|
const openApiForCurrentPlatform = () => {
|
||||||
|
openApi('', currentPlatform.value?.id || '');
|
||||||
|
};
|
||||||
const openPlatform = async (row?: any) => {
|
const openPlatform = async (row?: any) => {
|
||||||
Object.assign(platformForm, dpf());
|
Object.assign(platformForm, dpf());
|
||||||
platformFormRef.value?.clearValidate();
|
platformFormRef.value?.clearValidate();
|
||||||
@@ -535,6 +514,6 @@ const delApi = (row: any) => {
|
|||||||
};
|
};
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await loadPlatforms();
|
await loadPlatforms();
|
||||||
await Promise.all([getPlatforms(), getApis()]);
|
await getPlatforms();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1985,7 +1985,7 @@ const handleCreationFieldUpload = async (node: any, field: any, file: any) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const uploadRes = await uploadFile(raw);
|
const uploadRes = await uploadFile(raw, { timeout: 0 });
|
||||||
if (!uploadRes || !uploadRes.data || !uploadRes.data.fileURL) throw new Error('上传失败:未返回文件URL');
|
if (!uploadRes || !uploadRes.data || !uploadRes.data.fileURL) throw new Error('上传失败:未返回文件URL');
|
||||||
const fileUrl = uploadRes.data.fileAddressPrefix ? `${uploadRes.data.fileAddressPrefix}${uploadRes.data.fileURL}` : uploadRes.data.fileURL;
|
const fileUrl = uploadRes.data.fileAddressPrefix ? `${uploadRes.data.fileAddressPrefix}${uploadRes.data.fileURL}` : uploadRes.data.fileURL;
|
||||||
if (!creationFieldFiles[key]) creationFieldFiles[key] = [];
|
if (!creationFieldFiles[key]) creationFieldFiles[key] = [];
|
||||||
|
|||||||
27
ssl/minio.redpowerfuture.com.key
Normal file
27
ssl/minio.redpowerfuture.com.key
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
|
MIIEpAIBAAKCAQEAvoMUrxhR2vYC/tyGZlplkANptmFfqcglnd+ETk1ppE/tMyrI
|
||||||
|
PxBLvjN1BIcbBFkHthuv/Ut/dSgtS0hbI52Z1bMACbJ5SdPLTBZzNpXgHWXUHf/S
|
||||||
|
OsQB8s7gsCekcVly3Tf1emsXxcyeXQ7u8/ZrNEAKGZwT3xkAvtte01NqJeaIMddY
|
||||||
|
1o/nrlVhgV6CvDtCAFLRVvw2p5zc/Vejc/MLEXV4l9g3VIODfcIbLsczUmsT98zO
|
||||||
|
LOwwgVssCQcdnA12T1X3U4sX4U0Pin0MexT5L8/Kx3pHbajpQK+ID0TDpmP4QKf5
|
||||||
|
QkAHJxM7py4u1EHNBo3nkrxWNPfZTTnhbvowjwIDAQABAoIBAAcLQ14FU615ZXtK
|
||||||
|
kxZAvGWamAjcHn82vRv9EjVvoPrS0Q3lxI6ptGs9bX5eh84ILq6kj8QZS7FSFs6k
|
||||||
|
R75lit+/D77MCwutmY7gJkq74ulOBQ2bkl3a4R7lraLFwcubx5FMtYuyXv17cdWL
|
||||||
|
V6Qh6y0nkFgJuyWyFSLOwKRRVBOU8KTldFLR+iF7oULALpUZeci9RF+EEGKarFmp
|
||||||
|
07OjPbLjdBl+FT05c2KRy4lVl+BRQB6YfU+Al84VQPdoE8byE3mrzomo6CiMTCQ9
|
||||||
|
aNN2QfpVZ6x16gOEcgpJZHYvD+gC5H7q//TWBJ/jdR6ToKYcRK7HOJQjZgUFLSUs
|
||||||
|
wCf1ybkCgYEA7V7XkB10SdfT2axO2jdsRM3kW1U86k//dF26G4OKlRmWpibcJXnk
|
||||||
|
i0M3be0b1VrqefYEWot3MVhJheQCCa+tNR4hSovN7FqCNVUzXZ8YWrTaycXi46po
|
||||||
|
urfRLUeupTXJinBfmIPCdbqr0bPOJ0q5NfpG+LeG0LlsAfxjALgjGrcCgYEAzXbG
|
||||||
|
0TLaDNwB3aXTUPpsL7DrrQTaVi9ScH5sa2IJjes2Pv/MyTB05JyHG9rqAtIShjJi
|
||||||
|
/N3qMnN0q40GSnzPj99+Sep3p+41LvxfvRma9HMZRnczyPZIT31TMQF++QP3d8gz
|
||||||
|
giDVNND0GXY11bwcqIuS+ouNwU4P6tvLKznQIOkCgYEAxBZ0JuZeGV5E8O2p2hSs
|
||||||
|
yQ35FgYNI1dgpUWEJ5R71/3ieHFjrUXLqcumL5YPRyoqxwOXxyCtH0NawVOA53WL
|
||||||
|
tXSldcqWGykNpXczzqRN3yjGEKb7bq1ohM6y6x/rQylyy31XS0uVSeIibEKIC+dr
|
||||||
|
pw6QsIgTw7tZYS6YrpBu13MCgYBb5t7zP+2shtQG0l98/yZZBqfEEkGe/ze+va29
|
||||||
|
MnLXmff/oed1rkj64NDGMtstO82xXORN+u0AeAgdm8zOkJk+31bbtRakdLYxOA2S
|
||||||
|
xds7sCgEDtmI8DBT7djCOMsUkyOj3la7w/fZ0gT9RpS575RaB2RM0RMs/b+862cr
|
||||||
|
BIcF0QKBgQCrO6f1zj9vr4h3nWohSjgpAkZHpeUxDf6s39U960JU5Dvz/bhCHr51
|
||||||
|
uuVO183cFmx9W8IW6BI4dwEKk5MrXD2hdM8uGAIi+ip/SwBqej072HuY1xD2Elp9
|
||||||
|
mWXLESLAedhWvp9QhNQbHib1RzaPV8TUgCDN/QLGQE+jdVqfk/Smfw==
|
||||||
|
-----END RSA PRIVATE KEY-----
|
||||||
62
ssl/minio.redpowerfuture.com.pem
Normal file
62
ssl/minio.redpowerfuture.com.pem
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIGJTCCBQ2gAwIBAgIQAWng8l3t5rBYcCmLpCDdJTANBgkqhkiG9w0BAQsFADBu
|
||||||
|
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
|
||||||
|
d3cuZGlnaWNlcnQuY29tMS0wKwYDVQQDEyRFbmNyeXB0aW9uIEV2ZXJ5d2hlcmUg
|
||||||
|
RFYgVExTIENBIC0gRzIwHhcNMjYwNjEyMDAwMDAwWhcNMjYwOTA5MjM1OTU5WjAj
|
||||||
|
MSEwHwYDVQQDExhtaW5pby5yZWRwb3dlcmZ1dHVyZS5jb20wggEiMA0GCSqGSIb3
|
||||||
|
DQEBAQUAA4IBDwAwggEKAoIBAQC+gxSvGFHa9gL+3IZmWmWQA2m2YV+pyCWd34RO
|
||||||
|
TWmkT+0zKsg/EEu+M3UEhxsEWQe2G6/9S391KC1LSFsjnZnVswAJsnlJ08tMFnM2
|
||||||
|
leAdZdQd/9I6xAHyzuCwJ6RxWXLdN/V6axfFzJ5dDu7z9ms0QAoZnBPfGQC+217T
|
||||||
|
U2ol5ogx11jWj+euVWGBXoK8O0IAUtFW/DannNz9V6Nz8wsRdXiX2DdUg4N9whsu
|
||||||
|
xzNSaxP3zM4s7DCBWywJBx2cDXZPVfdTixfhTQ+KfQx7FPkvz8rHekdtqOlAr4gP
|
||||||
|
RMOmY/hAp/lCQAcnEzunLi7UQc0GjeeSvFY099lNOeFu+jCPAgMBAAGjggMIMIID
|
||||||
|
BDAfBgNVHSMEGDAWgBR435GQX+7erPbFdevVTFVT7yRKtjAdBgNVHQ4EFgQUm+W1
|
||||||
|
VEi2C0CdxtuncyBFtX9cS5UwQQYDVR0RBDowOIIYbWluaW8ucmVkcG93ZXJmdXR1
|
||||||
|
cmUuY29tghx3d3cubWluaW8ucmVkcG93ZXJmdXR1cmUuY29tMD4GA1UdIAQ3MDUw
|
||||||
|
MwYGZ4EMAQIBMCkwJwYIKwYBBQUHAgEWG2h0dHA6Ly93d3cuZGlnaWNlcnQuY29t
|
||||||
|
L0NQUzAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUF
|
||||||
|
BwMCMIGABggrBgEFBQcBAQR0MHIwJAYIKwYBBQUHMAGGGGh0dHA6Ly9vY3NwLmRp
|
||||||
|
Z2ljZXJ0LmNvbTBKBggrBgEFBQcwAoY+aHR0cDovL2NhY2VydHMuZGlnaWNlcnQu
|
||||||
|
Y29tL0VuY3J5cHRpb25FdmVyeXdoZXJlRFZUTFNDQS1HMi5jcnQwDAYDVR0TAQH/
|
||||||
|
BAIwADCCAX0GCisGAQQB1nkCBAIEggFtBIIBaQFnAHUAwjF+V0UZo0XufzjespBB
|
||||||
|
68fCIVoiv3/Vta12mtkOUs0AAAGeucefAgAABAMARjBEAiBdD793ndAhFw/xk4gS
|
||||||
|
Pycc/U4IGSbSFNg1wXMMBkma9gIgSK8LNW9lqHn4wEYFRQrBfmYMUkJhUR51JmOb
|
||||||
|
rUESBu8AdgDXbX0Q0af1d8LH6V/XAL/5gskzWmXh0LMBcxfAyMVpdwAAAZ65x57r
|
||||||
|
AAAEAwBHMEUCIALrNS+sHrfHVl72YGHkqSb4quYzH6xZ0JNCTLakfjK4AiEA0jbR
|
||||||
|
ORUL7BLzYbw5geZfMb8NJmD+7CbgXdHNPWmowdYAdgCUTkOH+uzB74HzGSQmqBhl
|
||||||
|
AcfTXzgCAT9yZ31VNy4Z2AAAAZ65x58NAAAEAwBHMEUCIQCn753LSIK5ODnAw8za
|
||||||
|
2BUf7PZQhtwhe1I0fEfrFjwcAAIgPZtnV83cNV8UK9zGQhWso4QX/oK+ziXQMuP5
|
||||||
|
+lApPpcwDQYJKoZIhvcNAQELBQADggEBAKceFp1JWPgaR5TGrMXQNY0qgRPhY0ZC
|
||||||
|
MSVLqtbgWPeODl3p+BTpLJ/taGR1v1mlL/2cM+EU/RQVDobYUu91Td0Tibp1T8vv
|
||||||
|
KKgnGTj8fVTzimTR5YsFHKc0XFqHpbneArZFb9tbMnRLheDjAqJ3Xs5H5t/XNDSi
|
||||||
|
vasqxdvAYZPP+7JZPRrFqq/fPZR79NRz7kl45YiQX199d/8oPRVFRrq1TGtp41Nk
|
||||||
|
7rP31tq0YZDpBHXXmpYXmOZalWBHoASnZJDq0+H5bSBzNVHR25eOZe0dt5lWMzrf
|
||||||
|
bzFMatWnPKI/aLhc3GGZAxyy7PCRA5pJGB+qnaJAakODvB02VvJey/Y=
|
||||||
|
-----END CERTIFICATE-----
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIEqjCCA5KgAwIBAgIQDeD/te5iy2EQn2CMnO1e0zANBgkqhkiG9w0BAQsFADBh
|
||||||
|
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
|
||||||
|
d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBH
|
||||||
|
MjAeFw0xNzExMjcxMjQ2NDBaFw0yNzExMjcxMjQ2NDBaMG4xCzAJBgNVBAYTAlVT
|
||||||
|
MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j
|
||||||
|
b20xLTArBgNVBAMTJEVuY3J5cHRpb24gRXZlcnl3aGVyZSBEViBUTFMgQ0EgLSBH
|
||||||
|
MjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAO8Uf46i/nr7pkgTDqnE
|
||||||
|
eSIfCFqvPnUq3aF1tMJ5hh9MnO6Lmt5UdHfBGwC9Si+XjK12cjZgxObsL6Rg1njv
|
||||||
|
NhAMJ4JunN0JGGRJGSevbJsA3sc68nbPQzuKp5Jc8vpryp2mts38pSCXorPR+sch
|
||||||
|
QisKA7OSQ1MjcFN0d7tbrceWFNbzgL2csJVQeogOBGSe/KZEIZw6gXLKeFe7mupn
|
||||||
|
NYJROi2iC11+HuF79iAttMc32Cv6UOxixY/3ZV+LzpLnklFq98XORgwkIJL1HuvP
|
||||||
|
ha8yvb+W6JislZJL+HLFtidoxmI7Qm3ZyIV66W533DsGFimFJkz3y0GeHWuSVMbI
|
||||||
|
lfsCAwEAAaOCAU8wggFLMB0GA1UdDgQWBBR435GQX+7erPbFdevVTFVT7yRKtjAf
|
||||||
|
BgNVHSMEGDAWgBROIlQgGJXm427mD/r6uRLtBhePOTAOBgNVHQ8BAf8EBAMCAYYw
|
||||||
|
HQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMBIGA1UdEwEB/wQIMAYBAf8C
|
||||||
|
AQAwNAYIKwYBBQUHAQEEKDAmMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdp
|
||||||
|
Y2VydC5jb20wQgYDVR0fBDswOTA3oDWgM4YxaHR0cDovL2NybDMuZGlnaWNlcnQu
|
||||||
|
Y29tL0RpZ2lDZXJ0R2xvYmFsUm9vdEcyLmNybDBMBgNVHSAERTBDMDcGCWCGSAGG
|
||||||
|
/WwBAjAqMCgGCCsGAQUFBwIBFhxodHRwczovL3d3dy5kaWdpY2VydC5jb20vQ1BT
|
||||||
|
MAgGBmeBDAECATANBgkqhkiG9w0BAQsFAAOCAQEAoBs1eCLKakLtVRPFRjBIJ9LJ
|
||||||
|
L0s8ZWum8U8/1TMVkQMBn+CPb5xnCD0GSA6L/V0ZFrMNqBirrr5B241OesECvxIi
|
||||||
|
98bZ90h9+q/X5eMyOD35f8YTaEMpdnQCnawIwiHx06/0BfiTj+b/XQih+mqt3ZXe
|
||||||
|
xNCJqKexdiB2IWGSKcgahPacWkk/BAQFisKIFYEqHzV974S3FAz/8LIfD58xnsEN
|
||||||
|
GfzyIDkH3JrwYZ8caPTf6ZX9M1GrISN8HnWTtdNCH2xEajRa/h9ZBXjUyFKQrGk2
|
||||||
|
n2hcLrfZSbynEC/pSw/ET7H5nWwckjmAJ1l9fcnbqkU/pf6uMQmnfl0JQjJNSg==
|
||||||
|
-----END CERTIFICATE-----
|
||||||
Reference in New Issue
Block a user