|
|
|
@@ -64,7 +64,7 @@ |
|
|
|
header-align="center" min-width="180"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-for="item in scope.row.SpecsList" :key="item.k"> |
|
|
|
<span>{{ item.v }}</span> |
|
|
|
<span v-html="item.v"></span> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@@ -100,7 +100,7 @@ |
|
|
|
<script> |
|
|
|
import SceneDialog from '../components/SceneDialog.vue'; |
|
|
|
import { getQueueList, getResQueueCode, getResSceneList, updateResScene, getAiCenterList } from '~/apis/modules/resources'; |
|
|
|
import { JOB_TYPE, CLUSTERS, ACC_CARD_TYPE } from '~/const'; |
|
|
|
import { JOB_TYPE, CLUSTERS, ACC_CARD_TYPE, SPECIFICATION_STATUS } from '~/const'; |
|
|
|
import { getListValueWithKey } from '~/utils'; |
|
|
|
import { formatDate } from 'element-ui/lib/utils/date-util'; |
|
|
|
|
|
|
|
@@ -117,6 +117,7 @@ export default { |
|
|
|
selAiCenter: '', |
|
|
|
aiCenterList: [{ k: '', v: this.$t('resourcesManagement.allAiCenter') }], |
|
|
|
accCardTypeList: [...ACC_CARD_TYPE], |
|
|
|
statusList: [{ k: '', v: this.$t('resourcesManagement.allStatus') }, ...SPECIFICATION_STATUS], |
|
|
|
loading: false, |
|
|
|
tableData: [], |
|
|
|
pageInfo: { |
|
|
|
@@ -191,11 +192,11 @@ export default { |
|
|
|
let cluster = ''; |
|
|
|
for (let i = 0, iLen = Specs.length; i < iLen; i++) { |
|
|
|
const Spec = Specs[i]; |
|
|
|
// const NGPU = `${Spec.ComputeResource}:${Spec.AccCardsNum === 0 ? '0' : Spec.AccCardsNum + '*' + getListValueWithKey(this.accCardTypeList, Spec.AccCardType)}`; |
|
|
|
const NGPU = `${Spec.ComputeResource}:${Spec.AccCardsNum + '*' + getListValueWithKey(this.accCardTypeList, Spec.AccCardType)}`; |
|
|
|
const statusStr = Spec.Status != '2' ? `<span style="color:rgb(245, 34, 45)">(${getListValueWithKey(this.statusList, Spec.Status.toString())})</span>` : ''; |
|
|
|
specsList.push({ |
|
|
|
k: Spec.ID, |
|
|
|
v: `${NGPU}, CPU:${Spec.CpuCores}, ${this.$t('resourcesManagement.gpuMem')}:${Spec.GPUMemGiB}GB, ${this.$t('resourcesManagement.mem')}:${Spec.MemGiB}GB, ${this.$t('resourcesManagement.shareMem')}:${Spec.ShareMemGiB}GB, ${this.$t('resourcesManagement.unitPrice')}:${Spec.UnitPrice}${this.$t('resourcesManagement.point_hr')}`, |
|
|
|
v: `${NGPU}, CPU:${Spec.CpuCores}, ${this.$t('resourcesManagement.gpuMem')}:${Spec.GPUMemGiB}GB, ${this.$t('resourcesManagement.mem')}:${Spec.MemGiB}GB, ${this.$t('resourcesManagement.shareMem')}:${Spec.ShareMemGiB}GB, ${this.$t('resourcesManagement.unitPrice')}:${Spec.UnitPrice}${this.$t('resourcesManagement.point_hr')}${statusStr}`, |
|
|
|
}); |
|
|
|
cluster = Spec.Cluster; |
|
|
|
if (queueIds.indexOf(Spec.QueueId) < 0) { |
|
|
|
|