#90 fix:#32:notebook及训练管理创建任务界面下拉框搜索优化;

Merged
liwei03 merged 3 commits from openioctopus/octopus:master into master 2 years ago
  1. +94
    -7
      openai-portal/src/views/modelDev/components/notebook/notebookCreation.vue
  2. +123
    -10
      openai-portal/src/views/trainingManager/components/createDialog/index.vue

+ 94
- 7
openai-portal/src/views/modelDev/components/notebook/notebookCreation.vue View File

@@ -327,7 +327,7 @@ export default {
}, },
created() { created() {
this.getResource(); this.getResource();
this.getAlgorithmNameList();
// this.getAlgorithmNameList();
}, },
methods: { methods: {
getErrorMsg(code) { getErrorMsg(code) {
@@ -657,10 +657,15 @@ export default {
this.getAlgorithmNameList(this.algorithmNameTemp); this.getAlgorithmNameList(this.algorithmNameTemp);
}, },
getAlgorithmItem() { getAlgorithmItem() {
this.algorithmNameOption = []
this.algorithmNameTemp = '' this.algorithmNameTemp = ''
this.algorithmNameCount = 1 this.algorithmNameCount = 1
this.getAlgorithmNameList();
getMyAlgorithmList({
pageIndex: this.algorithmNameCount,
pageSize: 10,
}).then(response => {
this.algorithmNameOption = response.data.algorithms;
this.algorithmNameTotal = response.data.totalSize
})
}, },
// 远程请求镜像名称 // 远程请求镜像名称
remoteImage(searchKey) { remoteImage(searchKey) {
@@ -674,10 +679,55 @@ export default {
this.getImageNameList(this.imageTemp); this.getImageNameList(this.imageTemp);
}, },
getImageItem() { getImageItem() {
this.imageNameOption = []
this.imageTemp = '' this.imageTemp = ''
this.imageNameCount = 1 this.imageNameCount = 1
this.getImageNameList();
if (this.ruleForm.imageSource === "my") {
getMyImage({
pageIndex: this.imageNameCount,
pageSize: 10,
imageStatus: 3,
imageType: 1,
}).then(response => {
if (response.data.images.length !== 0) {
const data = response.data.images;
const tableData = [];
this.imageNameTotal = response.data.totalSize;
data.forEach(item => {
tableData.push({
...item.image,
isShared: item.isShared
});
});
this.imageNameOption = tableData
}
});
}
if (this.ruleForm.imageSource === "pre") {
getPreImage({
pageIndex: this.imageNameCount,
pageSize: 10,
imageStatus: 3,
imageType: 1,
}).then(response => {
if (response.data.images.length !== 0) {
this.imageNameOption = response.data.images
this.imageNameTotal = response.data.totalSize;
}
});
}
if (this.ruleForm.imageSource === "common") {
getPublicImage({
pageIndex: this.imageNameCount,
pageSize: 10,
imageStatus: 3,
imageType: 1,
}).then(response => {
if (response.data.images.length !== 0) {
this.imageNameOption = response.data.images
this.imageNameTotal = response.data.totalSize;
}
});
}
}, },
// 远程请求数据集名称 // 远程请求数据集名称
remoteDataSet(searchKey) { remoteDataSet(searchKey) {
@@ -691,10 +741,47 @@ export default {
this.getDataSetNameList(this.dataSetTemp); this.getDataSetNameList(this.dataSetTemp);
}, },
getDataSetItem() { getDataSetItem() {
this.dataSetNameOption = []
this.dataSetTemp = '' this.dataSetTemp = ''
this.dataSetNameCount = 1 this.dataSetNameCount = 1
this.getDataSetNameList();
if (this.ruleForm.dataSetSource === "my") {
getMyDatasetList({
pageIndex: this.dataSetNameCount,
pageSize: 10,
}).then(response => {
if (response.data.datasets === null) {
response.data.datasets = []
} else {
this.dataSetNameOption = response.data.datasets;
this.dataSetNameTotal = response.data.totalSize;
}
});
}
if (this.ruleForm.dataSetSource === "pre") {
getPresetDatasetList({
pageIndex: this.dataSetNameCount,
pageSize: 10,
}).then(response => {
if (response.data.datasets !== null) {
this.dataSetNameOption = response.data.datasets
this.dataSetNameTotal = response.data.totalSize;
} else {
response.data.datasets = [];
}
});
}
if (this.ruleForm.dataSetSource === "common") {
getPublicDatasetList({
pageIndex: this.dataSetNameCount,
pageSize: 10,
}).then(response => {
if (response.data.datasets !== null) {
this.dataSetNameOption = response.data.datasets
this.dataSetNameTotal = response.data.totalSize;
} else {
response.data.datasets = [];
}
});
}
} }
} }
}; };


+ 123
- 10
openai-portal/src/views/trainingManager/components/createDialog/index.vue View File

@@ -38,6 +38,7 @@
remote remote
:remote-method="remoteAlgorithm" :remote-method="remoteAlgorithm"
@change="changeAlgorithmName" @change="changeAlgorithmName"
@click.native="getAlgorithmItem"
> >
<el-option <el-option
v-for="item in algorithmNameOption" v-for="item in algorithmNameOption"
@@ -84,6 +85,7 @@
filterable filterable
remote remote
:remote-method="remoteImage" :remote-method="remoteImage"
@click.native="getImageItem"
> >
<el-option <el-option
v-for="item in imageNameOption" v-for="item in imageNameOption"
@@ -112,6 +114,7 @@
remote remote
:remote-method="remoteDataSet" :remote-method="remoteDataSet"
@change="changeDataSetName" @change="changeDataSetName"
@click.native="getDataSetItem"
> >
<el-option <el-option
v-for="item in dataSetNameOption" v-for="item in dataSetNameOption"
@@ -637,12 +640,18 @@
} }
if (this.ruleForm.imageSource === 'pre') { if (this.ruleForm.imageSource === 'pre') {
getPreImage({ pageIndex: this.imageNameCount, pageSize: 10, imageStatus: 3, imageType: 2, nameVerLike: searchKey }).then(response => { getPreImage({ pageIndex: this.imageNameCount, pageSize: 10, imageStatus: 3, imageType: 2, nameVerLike: searchKey }).then(response => {
if (response.data.images.length !== 0) { this.imageNameOption = this.imageNameOption.concat(response.data.images); this.imageNameTotal = response.data.totalSize }
if (response.data.images.length !== 0) {
this.imageNameOption = this.imageNameOption.concat(response.data.images);
this.imageNameTotal = response.data.totalSize
}
}) })
} }
if (this.ruleForm.imageSource === 'common') { if (this.ruleForm.imageSource === 'common') {
getPublicImage({ pageIndex: this.imageNameCount, pageSize: 10, imageStatus: 3, imageType: 2, nameVerLike: searchKey }).then(response => { getPublicImage({ pageIndex: this.imageNameCount, pageSize: 10, imageStatus: 3, imageType: 2, nameVerLike: searchKey }).then(response => {
if (response.data.images.length !== 0) { this.imageNameOption = this.imageNameOption.concat(response.data.images); this.imageNameTotal = response.data.totalSize }
if (response.data.images.length !== 0) {
this.imageNameOption = this.imageNameOption.concat(response.data.images);
this.imageNameTotal = response.data.totalSize
}
}) })
} }
}, },
@@ -683,7 +692,8 @@
if (response.data.datasets === null) { if (response.data.datasets === null) {
response.data.datasets = [] response.data.datasets = []
} }
this.dataSetNameOption = this.dataSetNameOption.concat(response.data.datasets); this.dataSetNameTotal = response.data.totalSize
this.dataSetNameOption = this.dataSetNameOption.concat(response.data.datasets);
this.dataSetNameTotal = response.data.totalSize
}) })
} }
if (this.ruleForm.dataSetSource === 'common') { if (this.ruleForm.dataSetSource === 'common') {
@@ -691,7 +701,8 @@
if (response.data.datasets === null) { if (response.data.datasets === null) {
response.data.datasets = [] response.data.datasets = []
} }
this.dataSetNameOption = this.dataSetNameOption.concat(response.data.datasets); this.dataSetNameTotal = response.data.totalSize
this.dataSetNameOption = this.dataSetNameOption.concat(response.data.datasets);
this.dataSetNameTotal = response.data.totalSize
}) })
} }
}, },
@@ -733,25 +744,127 @@
}); });
}, },
// 远程请求算法名称 // 远程请求算法名称
remoteAlgorithm(a) {
if (a == '') { this.algorithmNameTemp = '' } else { this.algorithmNameTemp = a }
remoteAlgorithm(searchName) {
if (searchName == '') {
this.algorithmNameTemp = ''
} else {
this.algorithmNameTemp = searchName
}
this.algorithmNameOption = [] this.algorithmNameOption = []
this.algorithmNameCount = 1 this.algorithmNameCount = 1
this.getAlgorithmNameList(this.algorithmNameTemp) this.getAlgorithmNameList(this.algorithmNameTemp)
}, },
getAlgorithmItem() {
this.algorithmNameTemp = ''
this.algorithmNameCount = 1
if (this.ruleForm.algorithmSource === 'my') {
getMyAlgorithmList({ pageIndex: this.algorithmNameCount, pageSize: 10 }).then(response => {
this.algorithmNameOption = response.data.algorithms;
this.algorithmNameTotal = response.data.totalSize
})
}
if (this.ruleForm.algorithmSource === 'pre') {
getPresetAlgorithmList({ pageIndex: this.algorithmNameCount, pageSize: 10 }).then(response => {
if (response.data.algorithms.length !== 0) {
this.algorithmNameOption = response.data.algorithms;
this.algorithmNameTotal = response.data.totalSize
}
})
}
if (this.ruleForm.algorithmSource === 'common') {
getPublicAlgorithmList({ pageIndex: this.algorithmNameCount, pageSize: 10 }).then(response => {
if (response.data.algorithms.length !== 0) {
this.algorithmNameOption = response.data.algorithms;
this.algorithmNameTotal = response.data.totalSize
}
})
}
},
// 远程请求镜像名称 // 远程请求镜像名称
remoteImage(a) {
if (a == '') { this.imageTemp = '' } else { this.imageTemp = a }
remoteImage(searchName) {
if (searchName == '') {
this.imageTemp = ''
} else {
this.imageTemp = searchName
}
this.imageNameOption = [] this.imageNameOption = []
this.imageNameCount = 1 this.imageNameCount = 1
this.getImageNameList(this.imageTemp) this.getImageNameList(this.imageTemp)
}, },
getImageItem() {
this.imageTemp = ''
this.imageNameCount = 1
if (this.ruleForm.imageSource === 'my') {
getMyImage({ pageIndex: this.imageNameCount, pageSize: 10, imageStatus: 3, imageType: 2 }).then(response => {
if (response.data.images.length !== 0) {
const data = response.data.images;
const tableData = [];
this.imageNameTotal = response.data.totalSize
data.forEach(item => {
tableData.push({ ...item.image, isShared: item.isShared })
})
this.imageNameOption = tableData
}
})
}
if (this.ruleForm.imageSource === 'pre') {
getPreImage({ pageIndex: this.imageNameCount, pageSize: 10, imageStatus: 3, imageType: 2 }).then(response => {
if (response.data.images.length !== 0) {
this.imageNameOption = response.data.images;
this.imageNameTotal = response.data.totalSize
}
})
}
if (this.ruleForm.imageSource === 'common') {
getPublicImage({ pageIndex: this.imageNameCount, pageSize: 10, imageStatus: 3, imageType: 2 }).then(response => {
if (response.data.images.length !== 0) {
this.imageNameOption = response.data.images;
this.imageNameTotal = response.data.totalSize
}
})
}
},
// 远程请求数据集名称 // 远程请求数据集名称
remoteDataSet(a) {
if (a == '') { this.dataSetTemp = '' } else { this.dataSetTemp = a }
remoteDataSet(searchName) {
if (searchName == '') {
this.dataSetTemp = ''
} else {
this.dataSetTemp = searchName
}
this.dataSetNameOption = [] this.dataSetNameOption = []
this.dataSetNameCount = 1 this.dataSetNameCount = 1
this.getDataSetNameList(this.dataSetTemp) this.getDataSetNameList(this.dataSetTemp)
},
getDataSetItem() {
this.dataSetTemp = ''
this.dataSetNameCount = 1
if (this.ruleForm.dataSetSource === 'my') {
getMyDatasetList({ pageIndex: this.dataSetNameCount, pageSize: 10 }).then(response => {
if (response.data.datasets === null) {
response.data.datasets = []
}
this.dataSetNameOption = response.data.datasets
this.dataSetNameTotal = response.data.totalSize
})
}
if (this.ruleForm.dataSetSource === 'pre') {
getPresetDatasetList({ pageIndex: this.dataSetNameCount, pageSize: 10 }).then(response => {
if (response.data.datasets === null) {
response.data.datasets = []
}
this.dataSetNameOption = response.data.datasets;
this.dataSetNameTotal = response.data.totalSize
})
}
if (this.ruleForm.dataSetSource === 'common') {
getPublicDatasetList({ pageIndex: this.dataSetNameCount, pageSize: 10 }).then(response => {
if (response.data.datasets === null) {
response.data.datasets = []
}
this.dataSetNameOption = response.data.datasets;
this.dataSetNameTotal = response.data.totalSize
})
}
} }
} }
} }


Loading…
Cancel
Save