diff --git a/web_src/vuepages/apis/modules/resources.js b/web_src/vuepages/apis/modules/resources.js index 981df8b2c..32a87c53f 100644 --- a/web_src/vuepages/apis/modules/resources.js +++ b/web_src/vuepages/apis/modules/resources.js @@ -127,7 +127,6 @@ export const syncResSpecification = () => { "JobType":"TRAIN", //任务类型 DEBUG调试任务 BENCHMARK 评测任务 TRAIN 训练 INFERENCE 推理 "IsExclusive":true, //是否专属 "ExclusiveOrg":"123,456", //专属组织 - "QueueId":2, //队列id "SpecIds":[2,3] // 资源规格id } */ diff --git a/web_src/vuepages/pages/resources/components/SceneDialog.vue b/web_src/vuepages/pages/resources/components/SceneDialog.vue index 0bc8068ef..6d3190a25 100644 --- a/web_src/vuepages/pages/resources/components/SceneDialog.vue +++ b/web_src/vuepages/pages/resources/components/SceneDialog.vue @@ -130,10 +130,10 @@ export default { QueueId: '', SpecIds: [], } - this.queueList = []; - this.specsList = []; + this.queueList.splice(0, Infinity); + this.specsList.splice(0, Infinity); }, - getQueueList() { + getQueueList(next) { return getResQueueCode({ cluster: this.dataInfo.Cluster }).then(res => { res = res.data; if (res.Code === 0) { @@ -146,9 +146,15 @@ export default { v: `${item.QueueCode}(${getListValueWithKey(this.clusterList, item.Cluster)} - ${item.AiCenterName})`, }); } + if (this.dataInfo.Cluster === 'C2Net') { + list.unshift({ + k: '-1', + v: this.$t('resourcesManagement.allResQueue'), + }); + } this.queueList.splice(0, Infinity, ...list); - if (this.queueList.length === 0) { - this.changeQueue(); + if (next) { + this.getResSpecificationList(); } } }).catch(err => { @@ -158,11 +164,11 @@ export default { getResSpecificationList() { const params = { cluster: this.dataInfo.Cluster, - queue: this.dataInfo.QueueId, + queue: this.dataInfo.QueueId === '-1' ? '' : this.dataInfo.QueueId, status: 2, page: 1, }; - getResSpecificationList(params).then(res => { + return getResSpecificationList(params).then(res => { res = res.data; if (res.Code === 0) { const list = res.Data.List; @@ -201,12 +207,10 @@ export default { if (this.type === 'add') { // } else if (this.type === 'edit') { - this.dataInfo = Object.assign(this.dataInfo, { ...this.data }); + Object.assign(this.dataInfo, { ...this.data, QueueId: this.data.QueueIds.length === 1 ? this.data.QueueIds[0] : '-1' }); this.queueList.splice(0, Infinity); this.specsList.splice(0, Infinity); - this.getQueueList().then(() => { - this.getResSpecificationList(); - }); + this.getQueueList(true); } this.$emit("open"); }, diff --git a/web_src/vuepages/pages/resources/scene/index.vue b/web_src/vuepages/pages/resources/scene/index.vue index d882c23cc..5bad15a4e 100644 --- a/web_src/vuepages/pages/resources/scene/index.vue +++ b/web_src/vuepages/pages/resources/scene/index.vue @@ -43,9 +43,23 @@ + header-align="center"> + + + header-align="center"> + +