Commit cdb989a6 authored by hubaoshan's avatar hubaoshan

优化样式

parent 0f03b3bd
...@@ -448,7 +448,7 @@ export default { ...@@ -448,7 +448,7 @@ export default {
listResContainerInstance(this.queryParams).then( listResContainerInstance(this.queryParams).then(
response => { response => {
this.resContainerInstanceList = response.rows this.resContainerInstanceList = response.rows
this.total = response.total this.total = Number(response.total)
this.loading = false this.loading = false
console.log(this.resContainerInstanceList) console.log(this.resContainerInstanceList)
} }
......
...@@ -339,7 +339,6 @@ export default { ...@@ -339,7 +339,6 @@ export default {
getSelectLabel() { getSelectLabel() {
listResLabelInfoAll(this.queryParamsLabels).then(response => { listResLabelInfoAll(this.queryParamsLabels).then(response => {
this.statusArr = response.data this.statusArr = response.data
this.total = Number(response.total)
}) })
}, },
/** 查询数据集信息列表 */ /** 查询数据集信息列表 */
...@@ -347,8 +346,9 @@ export default { ...@@ -347,8 +346,9 @@ export default {
this.loading = true this.loading = true
listResDatasetInfo(this.queryParams).then( listResDatasetInfo(this.queryParams).then(
response => { response => {
console.log('response',response)
this.resDatasetInfoList = response.rows this.resDatasetInfoList = response.rows
this.total = response.total this.total = Number(response.total)
this.loading = false this.loading = false
} }
) )
......
...@@ -344,7 +344,7 @@ export default { ...@@ -344,7 +344,7 @@ export default {
listResHost(this.queryParams).then( listResHost(this.queryParams).then(
response => { response => {
this.resHostList = response.rows this.resHostList = response.rows
this.total = response.total this.total = Number(response.total)
this.loading = false this.loading = false
} }
) )
......
...@@ -420,7 +420,6 @@ export default { ...@@ -420,7 +420,6 @@ export default {
} }
listResLabelInfoAll(obj).then(response => { listResLabelInfoAll(obj).then(response => {
this.statusArr = response.data this.statusArr = response.data
this.total = Number(response.total)
}) })
}, },
/** 查询公共镜像列表 */ /** 查询公共镜像列表 */
...@@ -429,7 +428,7 @@ export default { ...@@ -429,7 +428,7 @@ export default {
listResPublicImage(this.queryParams).then( listResPublicImage(this.queryParams).then(
response => { response => {
this.resPublicImageList = response.rows this.resPublicImageList = response.rows
this.total = response.total this.total = Number(response.total)
this.loading = false this.loading = false
} }
) )
...@@ -485,7 +484,6 @@ export default { ...@@ -485,7 +484,6 @@ export default {
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
// this.labelNameList = []
this.reset() this.reset()
const id = row.businessId const id = row.businessId
this.getSelectLabel() this.getSelectLabel()
...@@ -519,6 +517,7 @@ export default { ...@@ -519,6 +517,7 @@ export default {
this.$refs['form'].validate(valid => { this.$refs['form'].validate(valid => {
if (valid) { if (valid) {
if (this.form.businessId !== undefined) { if (this.form.businessId !== undefined) {
console.log('label', this.form.labelId)
updateResPublicImage(this.form).then(response => { updateResPublicImage(this.form).then(response => {
this.msgSuccess('修改成功') this.msgSuccess('修改成功')
this.open = false this.open = false
......
...@@ -168,13 +168,13 @@ ...@@ -168,13 +168,13 @@
<el-input v-model.trim="form.quotaName" show-word-limit :maxlength="255" placeholder="请输入限额模版名称" /> <el-input v-model.trim="form.quotaName" show-word-limit :maxlength="255" placeholder="请输入限额模版名称" />
</el-form-item> </el-form-item>
<el-form-item label="cpu限额" prop="quotaCpuSum"> <el-form-item label="cpu限额" prop="quotaCpuSum">
<el-input v-model.trim="form.quotaCpuSum" controls-position="right" :min="0" placeholder="请输入cpu限额"/> <el-input v-model.trim="form.quotaCpuSum" controls-position="right" :min="0" placeholder="请输入cpu限额" />
</el-form-item> </el-form-item>
<el-form-item label="内存限额" prop="quotaMemorySum"> <el-form-item label="内存限额" prop="quotaMemorySum">
<el-input v-model.trim="form.quotaMemorySum" controls-position="right" :min="0" placeholder="请输入内存限额"/> <el-input v-model.trim="form.quotaMemorySum" controls-position="right" :min="0" placeholder="请输入内存限额" />
</el-form-item> </el-form-item>
<el-form-item label="硬盘限额" prop="quotaDiskSum"> <el-form-item label="硬盘限额" prop="quotaDiskSum">
<el-input v-model.trim="form.quotaDiskSum" controls-position="right" :min="0" placeholder="请输入硬盘限额"/> <el-input v-model.trim="form.quotaDiskSum" controls-position="right" :min="0" placeholder="请输入硬盘限额" />
</el-form-item> </el-form-item>
<el-form-item label="gpu限额" prop="quotaGpuSum"> <el-form-item label="gpu限额" prop="quotaGpuSum">
<el-input v-model.trim="form.quotaGpuSum" show-word-limit :maxlength="255" placeholder="请输入gpu限额" /> <el-input v-model.trim="form.quotaGpuSum" show-word-limit :maxlength="255" placeholder="请输入gpu限额" />
...@@ -183,9 +183,9 @@ ...@@ -183,9 +183,9 @@
<el-input v-model.trim="form.quotaContainerSum" show-word-limit :maxlength="255" placeholder="请输入容器数量限额" /> <el-input v-model.trim="form.quotaContainerSum" show-word-limit :maxlength="255" placeholder="请输入容器数量限额" />
</el-form-item> </el-form-item>
<el-form-item label="权重" prop="weight"> <el-form-item label="权重" prop="weight">
<el-input v-model.trim="form.weight" controls-position="right" :min="0" placeholder="请输入权重"/> <el-input v-model.trim="form.weight" controls-position="right" :min="0" placeholder="请输入权重" />
</el-form-item> </el-form-item>
<el-form-item label="标签选择" class="select-wrapper"> <el-form-item label="标签选择:" class="select-wrapper">
<el-select <el-select
id="lableSelect" id="lableSelect"
v-model="form.labelId" v-model="form.labelId"
...@@ -194,7 +194,8 @@ ...@@ -194,7 +194,8 @@
class="custom-select" class="custom-select"
multiple multiple
collapse-tags collapse-tags
@change="labelChang()"> @change="labelChang()"
>
<el-option <el-option
v-for="labelInfo in statusArr" v-for="labelInfo in statusArr"
:key="labelInfo.businessId" :key="labelInfo.businessId"
...@@ -251,10 +252,8 @@ export default { ...@@ -251,10 +252,8 @@ export default {
statusArr: [], statusArr: [],
labelNameList: [], labelNameList: [],
// 状态菜单 // 状态菜单
dynamicTags: ['标签一', '标签二', '标签三'], // 初始标签列表
selectVisible: false, // 控制下拉框的可见性 selectVisible: false, // 控制下拉框的可见性
selectedValue: '', // 选择的值 selectedValue: '', // 选择的值
tagOptions: ['标签四', '标签五', '标签六'], // 下拉框可选择的标签列表
statusOptions: [ statusOptions: [
{ {
dictLabel: '启用', dictLabel: '启用',
...@@ -276,19 +275,10 @@ export default { ...@@ -276,19 +275,10 @@ export default {
quotaGpuSum: undefined, quotaGpuSum: undefined,
quotaContainerSum: undefined, quotaContainerSum: undefined,
weight: undefined, weight: undefined,
labelId: 0,
flag: ''
},
queryParamsLabels: {
labelName: undefined,
labelType: undefined,
weight: undefined,
flag: '' flag: ''
}, },
// 表单参数 // 表单参数
form: { form: {},
labelId: 0
},
// 表单校验 // 表单校验
rules: { rules: {
} }
...@@ -313,10 +303,13 @@ export default { ...@@ -313,10 +303,13 @@ export default {
this.getSelectLabel()// 标签查询 this.getSelectLabel()// 标签查询
}, },
methods: { methods: {
tagHandleClose(businessId) {
this.labelNameList.splice(this.labelNameList.indexOf(businessId), 1)
this.form.labelId.splice(this.form.labelId.indexOf(businessId), 1)
this.labelChang()
},
// 标签赋值 // 标签赋值
labelChang() { labelChang() {
console.log(this.statusArr)
console.log(this.form)
this.labelNameList = [] this.labelNameList = []
this.statusArr.forEach(item => { this.statusArr.forEach(item => {
this.form.labelId.forEach(item1 => { this.form.labelId.forEach(item1 => {
...@@ -325,7 +318,6 @@ export default { ...@@ -325,7 +318,6 @@ export default {
} }
}) })
}) })
console.log('this.labelNameList', this.labelNameList)
}, },
/** 查询标签列表 */ /** 查询标签列表 */
getSelectLabel() { getSelectLabel() {
...@@ -337,7 +329,6 @@ export default { ...@@ -337,7 +329,6 @@ export default {
} }
listResLabelInfoAll(obj).then(response => { listResLabelInfoAll(obj).then(response => {
this.statusArr = response.data this.statusArr = response.data
this.total = Number(response.total)
}) })
}, },
/** 查询资源限额模版列表 */ /** 查询资源限额模版列表 */
...@@ -346,7 +337,7 @@ export default { ...@@ -346,7 +337,7 @@ export default {
listResQuotaTemplate(this.queryParams).then( listResQuotaTemplate(this.queryParams).then(
response => { response => {
this.resQuotaTemplateList = response.rows this.resQuotaTemplateList = response.rows
this.total = response.total this.total = Number(response.total)
this.loading = false this.loading = false
} }
) )
...@@ -368,10 +359,8 @@ export default { ...@@ -368,10 +359,8 @@ export default {
quotaGpuSum: undefined, quotaGpuSum: undefined,
quotaContainerSum: undefined, quotaContainerSum: undefined,
weight: undefined, weight: undefined,
labelId: undefined,
flag: '1' flag: '1'
} }
this.labelNameList = []
this.resetForm('form') this.resetForm('form')
}, },
/** 查询按钮操作 */ /** 查询按钮操作 */
...@@ -397,6 +386,7 @@ export default { ...@@ -397,6 +386,7 @@ export default {
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.labelNameList = []
this.reset() this.reset()
this.open = true this.open = true
this.title = '添加资源限额模版' this.title = '添加资源限额模版'
...@@ -406,18 +396,10 @@ export default { ...@@ -406,18 +396,10 @@ export default {
handleUpdate(row) { handleUpdate(row) {
this.reset() this.reset()
const id = row.businessId const id = row.businessId
this.getSelectLabel()
getResQuotaTemplate(id).then(response => { getResQuotaTemplate(id).then(response => {
console.log('response.data', response.data)
this.form = response.data this.form = response.data
this.labelNameList = [] this.labelChang()
this.statusArr.forEach(item => {
this.form.labelId.forEach(item1 => {
if (item.businessId === item1) {
this.labelNameList.push(item)
}
})
})
console.log('this.form', this.form)
this.open = true this.open = true
this.title = '修改资源限额模版' this.title = '修改资源限额模版'
}) })
...@@ -499,11 +481,6 @@ export default { ...@@ -499,11 +481,6 @@ export default {
window.URL.revokeObjectURL(href)// 释放掉blob对象 window.URL.revokeObjectURL(href)// 释放掉blob对象
}) })
}) })
},
tagHandleClose(businessId) {
this.labelNameList.splice(this.labelNameList.indexOf(businessId), 1)
this.form.labelId.splice(this.form.labelId.indexOf(businessId), 1)
this.labelChang()
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment