From 16783b802606b24595f03957f8018be9be83b041 Mon Sep 17 00:00:00 2001 From: 2256907009 <2256907009@qq.com> Date: Thu, 2 Oct 2025 13:59:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=B7=BB=E5=8A=A0=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8=E6=96=B0=E5=BB=BA=E5=AE=B9=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/acs/server.js | 9 +- src/views/Login.vue | 8 +- src/views/acs/nodes/server.vue | 615 ++++++++++++++++++++++++++++++++- 3 files changed, 618 insertions(+), 14 deletions(-) diff --git a/src/utils/acs/server.js b/src/utils/acs/server.js index 016ad30..30e767b 100644 --- a/src/utils/acs/server.js +++ b/src/utils/acs/server.js @@ -53,7 +53,14 @@ export const selectServerPlan = data => { } }); }; - +/**新增容器 */ +export const addContainer = data => { + return http2.post("/v1/admin/container/add_container", data, { + headers: { + "Content-Type": "multipart/form-data" + } + }); +}; /**删除容器网络 */ export const deleteContainerNetwork = data => { return http2.post("/v1/user/container/delete_connect", data, { diff --git a/src/views/Login.vue b/src/views/Login.vue index f202058..0be731d 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -93,10 +93,10 @@ const loginRules = { { required: true, message: '请输入用户名', trigger: 'blur' }, { min: 3, max: 20, message: '长度在 3 到 20 个字符', trigger: 'blur' } ], - password: [ - { required: true, message: '请输入密码', trigger: 'blur' }, - { min: 6, max: 20, message: '长度在 6 到 20 个字符', trigger: 'blur' } - ] + // password: [ + // { required: true, message: '请输入密码', trigger: 'blur' }, + // { min: 6, max: 20, message: '长度在 6 到 20 个字符', trigger: 'blur' } + // ] } const forgetPassword = () => { diff --git a/src/views/acs/nodes/server.vue b/src/views/acs/nodes/server.vue index 7ad298e..a30f815 100644 --- a/src/views/acs/nodes/server.vue +++ b/src/views/acs/nodes/server.vue @@ -541,13 +541,22 @@

容器管理

- +
+ + + 添加容器 + +
+ + + + +
+ + + +
+ + +
+
基本信息
+ + + + + + + + + + + {{ plan.name }} + + ¥{{ plan.price }}/月 + + + + + + +
+ +
+
价格与时间
+ + + + + + +
+ + {{ selectedPlanPrice }}/月 × {{ addContainerForm.pay_months }}月 = ¥{{ addContainerForm.pay }} + +
+
+
+ + + + + + + + + + +
+
+ +
+
镜像与支付
+ + + + + + {{ mirror.name }} + + {{ mirror.size }}MB + + + + + + + + + + + + + + +
+ +
+
网络配置
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
环境配置
+ + + + + + + +
+
+ + +
@@ -2362,6 +2905,12 @@ import { ElMessageBox } from 'element-plus'; width: 240px; } +.header-actions { + display: flex; + align-items: center; + gap: 12px; +} + .action-btns { display: flex; gap: 8px; @@ -2451,6 +3000,54 @@ import { ElMessageBox } from 'element-plus'; margin-top: 16px; } +/* 服务器状态信息样式 */ +.server-status-info { + margin-bottom: 20px; +} + +.status-details { + margin-top: 12px; +} + +.status-details p { + margin: 8px 0; + font-size: 14px; + line-height: 1.5; +} + +.status-details strong { + color: #303133; + font-weight: 600; +} + +.status-warning { + display: flex; + align-items: center; + gap: 8px; + color: #E6A23C; + font-weight: 500; + margin-top: 12px; + padding: 8px 12px; + background-color: rgba(230, 162, 60, 0.1); + border-radius: 4px; + border-left: 3px solid #E6A23C; +} + +.status-warning .el-icon { + font-size: 16px; +} + +/* 价格计算显示样式 */ +.price-calculation { + margin-top: 4px; +} + +.price-calculation .text-muted { + color: #909399; + font-size: 12px; + line-height: 1.4; +} + /* 响应式设计 */ @media screen and (max-width: 1200px) { .server-info {