feat: 删除SFTP上传工具,修复OSS配置bug
主要变更: - 删除管理员工具栏及上传工具相关功能(后端API + 前端UI) - 删除upload-tool目录及相关文件 - 修复OSS配置测试连接bug(testUser缺少has_oss_config标志) - 新增backend/utils加密和缓存工具模块 - 更新.gitignore排除测试报告文件 技术改进: - 统一使用OSS存储,废弃SFTP上传方式 - 修复OSS配置保存和测试连接时的错误处理 - 完善代码库文件管理,排除临时报告文件
This commit is contained in:
@@ -1315,18 +1315,13 @@
|
||||
<!-- 工具栏 -->
|
||||
<div style="margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center;">
|
||||
<div style="display: flex; gap: 10px;">
|
||||
<!-- 本地存储:显示网页上传按钮 -->
|
||||
<button v-if="storageType === 'local'" class="btn btn-primary" @click="$refs.fileUploadInput.click()">
|
||||
<!-- 网页上传按钮(支持本地和OSS存储) -->
|
||||
<button class="btn btn-primary" @click="$refs.fileUploadInput.click()">
|
||||
<i class="fas fa-upload"></i> 上传文件
|
||||
</button>
|
||||
<button v-if="storageType === 'local'" class="btn btn-primary" @click="showCreateFolderModal = true">
|
||||
<button class="btn btn-primary" @click="showCreateFolderModal = true">
|
||||
<i class="fas fa-folder-plus"></i> 新建文件夹
|
||||
</button>
|
||||
<!-- OSS存储:显示下载上传工具按钮 -->
|
||||
<button v-else class="btn btn-primary" @click="downloadUploadTool" :disabled="downloadingTool">
|
||||
<i :class="downloadingTool ? 'fas fa-spinner fa-spin' : 'fas fa-download'"></i>
|
||||
{{ downloadingTool ? '生成中...' : '下载上传工具' }}
|
||||
</button>
|
||||
<button class="btn btn-primary" @click="showShareAllModal = true">
|
||||
<i class="fas fa-share-nodes"></i> 分享所有文件
|
||||
</button>
|
||||
@@ -2192,10 +2187,6 @@
|
||||
:style="{ padding: '15px 25px', border: 'none', background: adminTab === 'users' ? '#667eea' : 'transparent', color: adminTab === 'users' ? 'white' : '#666', cursor: 'pointer', fontWeight: '600', fontSize: '14px', borderRadius: adminTab === 'users' ? '8px 8px 0 0' : '0', transition: 'all 0.2s' }">
|
||||
<i class="fas fa-users"></i> 用户
|
||||
</button>
|
||||
<button @click="adminTab = 'tools'"
|
||||
:style="{ padding: '15px 25px', border: 'none', background: adminTab === 'tools' ? '#667eea' : 'transparent', color: adminTab === 'tools' ? 'white' : '#666', cursor: 'pointer', fontWeight: '600', fontSize: '14px', borderRadius: adminTab === 'tools' ? '8px 8px 0 0' : '0', transition: 'all 0.2s' }">
|
||||
<i class="fas fa-tools"></i> 工具
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2842,76 +2833,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- 用户标签页结束 -->
|
||||
|
||||
<!-- ========== 工具标签页 ========== -->
|
||||
<div v-show="adminTab === 'tools'">
|
||||
<!-- 上传工具管理区域 -->
|
||||
<div class="card">
|
||||
<h3 style="margin-bottom: 20px;">
|
||||
<i class="fas fa-cloud-upload-alt"></i> 上传工具管理
|
||||
</h3>
|
||||
|
||||
<!-- 工具状态显示 -->
|
||||
<div v-if="uploadToolStatus !== null">
|
||||
<div v-if="uploadToolStatus.exists" style="padding: 15px; background: rgba(34, 197, 94, 0.15); border-left: 4px solid #22c55e; border-radius: 6px; margin-bottom: 20px;">
|
||||
<div style="display: flex; align-items: center; justify-content: space-between;">
|
||||
<div>
|
||||
<div style="color: #86efac; font-weight: 600; margin-bottom: 5px;">
|
||||
<i class="fas fa-check-circle"></i> 上传工具已存在
|
||||
</div>
|
||||
<div style="color: #86efac; font-size: 13px;">
|
||||
文件大小: {{ uploadToolStatus.fileInfo.sizeMB }} MB
|
||||
</div>
|
||||
<div style="color: #86efac; font-size: 12px; margin-top: 3px;">
|
||||
最后修改: {{ formatDate(uploadToolStatus.fileInfo.modifiedAt) }}
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-primary" @click="checkUploadTool" style="background: #22c55e;">
|
||||
<i class="fas fa-sync-alt"></i> 重新检测
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else style="padding: 15px; background: rgba(245, 158, 11, 0.15); border-left: 4px solid #f59e0b; border-radius: 6px; margin-bottom: 20px;">
|
||||
<div style="color: #fbbf24; font-weight: 600; margin-bottom: 5px;">
|
||||
<i class="fas fa-exclamation-triangle"></i> 上传工具不存在
|
||||
</div>
|
||||
<div style="color: #fbbf24; font-size: 13px;">
|
||||
普通用户将无法下载上传工具,请上传工具文件
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 操作按钮组 -->
|
||||
<div style="display: flex; gap: 10px; margin-top: 15px; flex-wrap: wrap;">
|
||||
<button class="btn btn-primary" @click="checkUploadTool" :disabled="checkingUploadTool" style="background: #3b82f6;">
|
||||
<i class="fas fa-search" v-if="!checkingUploadTool"></i>
|
||||
<i class="fas fa-spinner fa-spin" v-else></i>
|
||||
{{ checkingUploadTool ? '检测中...' : '检测上传工具' }}
|
||||
</button>
|
||||
|
||||
<button v-if="uploadToolStatus && !uploadToolStatus.exists" class="btn btn-primary" @click="$refs.uploadToolInput.click()" :disabled="uploadingTool" style="background: #22c55e;">
|
||||
<i class="fas fa-upload" v-if="!uploadingTool"></i>
|
||||
<i class="fas fa-spinner fa-spin" v-else></i>
|
||||
{{ uploadingTool ? '上传中...' : '上传工具文件' }}
|
||||
</button>
|
||||
|
||||
<input ref="uploadToolInput" type="file" accept=".exe" style="display: none;" @change="handleUploadToolFile">
|
||||
</div>
|
||||
|
||||
<!-- 使用说明 -->
|
||||
<div style="margin-top: 20px; padding: 12px; background: rgba(59, 130, 246, 0.1); border-left: 4px solid #3b82f6; border-radius: 6px;">
|
||||
<div style="color: #93c5fd; font-size: 13px; line-height: 1.6;">
|
||||
<strong><i class="fas fa-info-circle"></i> 说明:</strong>
|
||||
<ul style="margin: 8px 0 0 20px; padding-left: 0;">
|
||||
<li>上传工具文件应为 .exe 格式,大小通常在 20-50 MB</li>
|
||||
<li>上传后,普通用户可以在设置页面下载该工具</li>
|
||||
<li>如果安装脚本下载失败,可以在这里手动上传</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- 工具标签页结束 -->
|
||||
</div><!-- 管理员视图结束 -->
|
||||
|
||||
<!-- 忘记密码模态框 -->
|
||||
|
||||
Reference in New Issue
Block a user