@@ -38,6 +38,7 @@
remote
:remote-method="remoteAlgorithm"
@change="changeAlgorithmName"
@click.native="getAlgorithmItem"
>
<el-option
v-for="item in algorithmNameOption"
@@ -84,6 +85,7 @@
filterable
remote
:remote-method="remoteImage"
@click.native="getImageItem"
>
<el-option
v-for="item in imageNameOption"
@@ -112,6 +114,7 @@
remote
:remote-method="remoteDataSet"
@change="changeDataSetName"
@click.native="getDataSetItem"
>
<el-option
v-for="item in dataSetNameOption"
@@ -637,12 +640,18 @@
}
if (this.ruleForm.imageSource === 'pre') {
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') {
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) {
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') {
@@ -691,7 +701,8 @@
if (response.data.datasets === null) {
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.algorithmNameCount = 1
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.imageNameCount = 1
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.dataSetNameCount = 1
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
})
}
}
}
}