diff --git a/src/App.vue b/src/App.vue index 39596c9..9b90682 100644 --- a/src/App.vue +++ b/src/App.vue @@ -57,8 +57,8 @@ header { .main-content { /* padding-top: 30px; */ - overflow: hidden; - height: 100vh; + /* overflow: hidden; */ + /* height: 100vh; */ } .x-search-bar .ant-form-item { diff --git a/src/components/Header.vue b/src/components/Header.vue index 766bd83..5ea0792 100644 --- a/src/components/Header.vue +++ b/src/components/Header.vue @@ -4,7 +4,7 @@ 首页 - 算力中心 + 算力中心 云主机 diff --git a/src/components/layout.vue b/src/components/layout.vue index e0ecfb4..a79301e 100644 --- a/src/components/layout.vue +++ b/src/components/layout.vue @@ -38,6 +38,7 @@ import Sidebar from './sidebar.vue' .main-content { flex: 1; min-width: 0; + min-height: 100vh; background: #f5f5f5; } diff --git a/src/router/index.ts b/src/router/index.ts index e6b72f0..a2e4a9b 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -87,6 +87,16 @@ const routes: RouteRecordRaw[] = [ name: "LayoutHome", component: () => import("@/views/home/index.vue"), }, + { + path: "market", + name: "LayoutMarket", + component: () => import("@/views/market/index.vue"), + }, + { + path: "create", + name: "Create", + component: () => import("@/views/instanceCreate/index.vue"), + }, { path: "admin", name: "Admin", diff --git a/src/views/instanceCreate/index.vue b/src/views/instanceCreate/index.vue new file mode 100644 index 0000000..e8b2638 --- /dev/null +++ b/src/views/instanceCreate/index.vue @@ -0,0 +1,1250 @@ + + + + + + 算力中心 + + 创建实例 + + + + + + + + + + 按量计费 + 包日 + 包周 + 包月 + + 计费规则 + + + 创建完主机后仍然可以转换计费方式。如选择按量计费,价格发生变动以实例开机时的价格为准 + + + + + + + + + 选择地区: + + + + {{ region.label }} + {{ region.tag.text + }} + + + + + + + + 二级专区: + + + + {{ zone.label }} + + + + + + + + GPU型号: + + + 全部 + + {{ model.label }} + ({{ model.available }}/{{ model.total }}) + + + + + + + + GPU数量: + + + + {{ count }} + + + + + + + + + + 选择主机: + 共 {{ filteredMachineList.length }} 台可用主机 + + + + + handleSelectMachine(record.id)" /> + + + + {{ record.gpuModel }} + {{ record.gpuMemory }} + + + + + {{ record.freeGpu }} + / + {{ record.totalGpu }} + + + + + CPU:{{ record.cpuCores }}核 + 内存:{{ record.memory }}GB + + + + + 数据盘:{{ record.dataDisk }}GB + 可扩容:{{ record.expandableDisk }}GB + + + + + 驱动:{{ record.driver }} + CUDA:{{ record.cuda }} + + + + + + ¥{{ getPrice(record) }}/{{ billingUnit }} + + + ¥{{ getOriginalPrice(record) }}/{{ billingUnit }} + + + + + + + + + + + + + + + + + + 免费50GB SSD + 需要扩容 + + + 扩容大小: + + 最大可扩容 {{ maxExpandSize }}GB + + + + + + + + + GPU型号 + {{ selectedGpuModelLabel }} * {{ gpuCount }}卡 + + + CPU + {{ cpuCores }}核心 + + + 内存 + {{ memory }}GB + + + 系统盘 + 30GB + + + 数据盘 + {{ totalDiskSize }}GB SSD + + + + + + + + + + 基础镜像 + + 社区镜像 + hot + + 我的镜像 + + 没有我要的环境? + + + + + + 基础镜像包含常用基本软件,如:深度学习框架、Miniconda等。如需其他软件可创建后安装 + + + + 创建完成后仍然可以更换其他镜像 + + + + + + + + + 不使用优惠券 + + {{ coupon.name }} - ¥{{ coupon.amount }} + + + + 可用优惠券:{{ availableCoupons.length }} 张 + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/layout/index.vue b/src/views/layout/index.vue index a616738..c2ec94e 100644 --- a/src/views/layout/index.vue +++ b/src/views/layout/index.vue @@ -81,7 +81,7 @@ watch(() => route.path, () => { // 菜单数据(key 使用子路径,如 '/admin') const leftRoutes = ref([ { key: '/home', label: '首页' }, - { key: '/center', label: '算力中心' }, + { key: '/market', label: '算力中心' }, { key: '/yunmain', label: '云主机' } ]) const rightRoutes = ref([ @@ -157,7 +157,7 @@ const logout = () => { .gx_layout_content { margin-top: 60px; - height: calc(100% - 60px); + min-height: calc(100% - 60px); background-color: rgba(240, 240, 240, 1); } } diff --git a/src/views/market/index.vue b/src/views/market/index.vue new file mode 100644 index 0000000..9719274 --- /dev/null +++ b/src/views/market/index.vue @@ -0,0 +1,1555 @@ + + + + + + + + + + 计费方式: + + + + {{ type.label }} + + + + + + + + 选择地区: + + + + {{ region.label }} + {{ region.tag.text }} + + + + + + + + 选择专区: + + + + {{ zone.label }} + + + + + + + + GPU型号: + + + 全部 + + {{ model.label }} + ({{ model.available }}/{{ model.total }}) + + + + + + + + GPU数量: + + + + {{ count }} + + + + + + + + + + + + + + + + + {{ record.region === 'beijingDC2' ? '北京B区' : record.region }} + / + {{ record.machineName }} + + | {{ record.id }} + 可租用至:2027-01-01 + + + + + {{ record.gpuModel }} + / {{ record.gpuMemory }} + + 空闲/总量 {{ record.freeGpu }} / {{ record.totalGpu }} + + + + + + + + + + + + + + 每GPU分配 + + CPU: + {{ record.cpuCores }} 核, {{ record.cpuModel }} + + + 内存: + {{ record.memory }} GB + + + + + + 硬盘 + + 系统盘: + 30 GB + + + 数据盘: + {{ record.dataDisk }} GB,可扩容 {{ record.expandableDisk }} GB + + + + + + 其它 + + GPU驱动: + {{ record.driver }} + + + CUDA版本: + {{ record.cuda }} + + + + + + + + ¥{{ getPrice(record) }}/时 + + + ¥{{ getOriginalPrice(record) }}/时 + + + 💰 + 9.5折 + + + 会员最低享9.5折 ¥2.98/时 + + + {{ record.freeGpu > 0 ? '1卡可租' : '暂不可租' }} + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file