master #12
@@ -195,6 +195,9 @@
|
||||
<el-option v-for="item in planlist" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本" prop="vm_gen">
|
||||
<el-input v-model="imageForm.vm_gen" placeholder="请输入版本"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="description">
|
||||
<el-input
|
||||
v-model="imageForm.description"
|
||||
@@ -322,7 +325,8 @@ const imageForm = reactive({
|
||||
server_id: '',
|
||||
path: '',
|
||||
class_id: '',
|
||||
class_name: ''
|
||||
class_name: '',
|
||||
vm_gen: ''
|
||||
})
|
||||
|
||||
const rules = {
|
||||
@@ -570,6 +574,7 @@ const handleAdd = () => {
|
||||
|
||||
// 编辑镜像
|
||||
const handleEdit = async (row) => {
|
||||
console.log("编辑镜像信息:",row)
|
||||
try {
|
||||
let res = await getServerPlan({ server_id: row.server_id })
|
||||
planlist.value = res.data.data.map(item => {
|
||||
@@ -580,7 +585,7 @@ const handleEdit = async (row) => {
|
||||
})
|
||||
// 获取分类列表
|
||||
await fetchCategoryList(row.server_id)
|
||||
|
||||
console.log("编辑镜像信息:",row)
|
||||
editOr.value = true
|
||||
dialogVisible.value = true
|
||||
showNewCategoryInput.value = false // 编辑时默认不显示新分类输入框
|
||||
|
||||
@@ -837,6 +837,54 @@
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<div class="form-section" v-if="TypeData == 'hyperV'">
|
||||
<div class="section-title">GPU配置</div>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="GPU资源百分比">
|
||||
<el-input v-model="spec_form.gpu_percentage" placeholder="GPU资源百分比" type="number">
|
||||
<template #append>%</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="最小显存">
|
||||
<el-input v-model="spec_form.min_partition_vram" placeholder="最小显存" type="number">
|
||||
<template #append>MB</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="最大显存">
|
||||
<el-input v-model="spec_form.max_partition_vram" placeholder="最大显存" type="number">
|
||||
<template #append>MB</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="最优显存">
|
||||
<el-input v-model="spec_form.optimal_partition_vram" placeholder="最优显存" type="number">
|
||||
<template #append>MB</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="低内存映射IO空间">
|
||||
<el-input v-model="spec_form.low_mmio_space" placeholder="默认128" type="number" :value="spec_form.low_mmio_space || 128">
|
||||
<template #append>MB</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="高内存映射IO空间">
|
||||
<el-input v-model="spec_form.high_mmio_space" placeholder="建议为显存的2倍" type="number">
|
||||
<template #append>MB</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<div class="form-section">
|
||||
<div class="section-title">价格与验证</div>
|
||||
<el-row :gutter="20">
|
||||
@@ -2205,7 +2253,13 @@ const spec_form = reactive({
|
||||
min_iops: "",
|
||||
max_iops: "",
|
||||
description: "",
|
||||
must_real_name: 0
|
||||
must_real_name: 0,
|
||||
gpu_percentage: "",
|
||||
min_partition_vram: "",
|
||||
max_partition_vram: "",
|
||||
optimal_partition_vram: "",
|
||||
low_mmio_space: "",
|
||||
high_mmio_space: ""
|
||||
});
|
||||
|
||||
function show_spec(data = null) {
|
||||
@@ -2227,6 +2281,7 @@ function show_spec(data = null) {
|
||||
spec_form.snapshot_num = '3';
|
||||
spec_form.min_iops = '1000';
|
||||
spec_form.max_iops = '5000';
|
||||
spec_form.low_mmio_space = '128';
|
||||
}
|
||||
} else {
|
||||
// 复制传入的数据
|
||||
|
||||
Reference in New Issue
Block a user