|
@@ -48,13 +48,13 @@
|
|
|
<el-form :model="dataForm2" :rules="dataRule" ref="dataset" label-width="180px">
|
|
|
|
|
|
<el-form-item label="选择数据集:">
|
|
|
- <el-select v-model="value1" multiple placeholder="选择数据集">
|
|
|
+ <el-select v-model="datasetSelected" multiple placeholder="选择数据集" value-key="datasetName">
|
|
|
<el-option-group v-for="group in datasetOptions" :key="group.label" :label="group.label">
|
|
|
<el-option
|
|
|
v-for="item in group.dataset"
|
|
|
- :key="item.filename"
|
|
|
- :label="item.filename"
|
|
|
- :value="item.filename"
|
|
|
+ :key="item.datasetName"
|
|
|
+ :label="item.datasetName"
|
|
|
+ :value="item"
|
|
|
>
|
|
|
|
|
|
</el-option>
|
|
@@ -73,7 +73,7 @@
|
|
|
<div class="block">
|
|
|
<el-form-item label="上传代码:" size="mini" prop="fileList">
|
|
|
<el-upload class="upload-demo" action="#"
|
|
|
- :on-preview="handlePreview" :on-remove="handleRemove" :before-remove="beforeRemove"
|
|
|
+ :on-preview="handlePreview" :on-remove="handleRemove" :before-remove="beforeRemove"
|
|
|
:on-change="fileChange"
|
|
|
multiple :limit="10"
|
|
|
:on-exceed="handleExceed" :file-list="fileList">
|
|
@@ -100,9 +100,9 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
-
|
|
|
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
|
|
|
<el-form-item style="float:right">
|
|
|
<el-button @click="activeName='second'">返回</el-button>
|
|
@@ -138,11 +138,11 @@
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
<el-form-item label="选择数据集:">
|
|
|
|
|
|
- <el-select v-model="value1" multiple placeholder="选择数据集">
|
|
|
+ <el-select v-model="datasetSelected" multiple placeholder="选择数据集" value-key="datasetName">
|
|
|
<el-option-group v-for="group in datasetOptions" :key="group.label" :label="group.label">
|
|
|
<el-option
|
|
|
v-for="item in group.dataset"
|
|
@@ -180,7 +180,7 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
</el-form>
|
|
|
<el-form>
|
|
@@ -189,7 +189,7 @@
|
|
|
<el-button type="primary" @click="dataFormSubmit()">完成</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
-
|
|
|
+
|
|
|
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
@@ -207,7 +207,7 @@ export default {
|
|
|
},
|
|
|
activated() {
|
|
|
this.init();
|
|
|
- },
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
datasetOptions: [
|
|
@@ -219,6 +219,7 @@ export default {
|
|
|
dataset:[]
|
|
|
}
|
|
|
],
|
|
|
+ datasetSelected: [],
|
|
|
algOptions: [],
|
|
|
tmpOptions: [],
|
|
|
value1: [],
|
|
@@ -226,7 +227,7 @@ export default {
|
|
|
value3: [],
|
|
|
images:[],
|
|
|
fileList: [
|
|
|
-
|
|
|
+
|
|
|
],
|
|
|
|
|
|
activeName: "first",
|
|
@@ -262,6 +263,7 @@ export default {
|
|
|
init() {
|
|
|
this.activeName="first",
|
|
|
this.value1= [],
|
|
|
+ this.datasetSelected= [],
|
|
|
this.value2= [],
|
|
|
this.value3=[],
|
|
|
this.fileList=[],
|
|
@@ -275,8 +277,8 @@ export default {
|
|
|
})
|
|
|
// 这块修改为获取类别
|
|
|
.then(({ data }) => {
|
|
|
- this.categoryList = data && data.code === 0
|
|
|
- ? data.list.filter((item) => !item.categoryName.includes("文件"))
|
|
|
+ this.categoryList = data && data.code === 0
|
|
|
+ ? data.list.filter((item) => !item.categoryName.includes("文件"))
|
|
|
: [];
|
|
|
})
|
|
|
.then(() => {
|
|
@@ -333,7 +335,7 @@ export default {
|
|
|
});
|
|
|
//这块为获取所有动态数据集
|
|
|
this.$http({
|
|
|
- url: this.$http.adornUrl("/dataset/listAllDyDataset"),
|
|
|
+ url: this.$http.adornUrl("/datasetdy/listAll"),
|
|
|
method: "get",
|
|
|
params: this.$http.adornParams({
|
|
|
}),
|
|
@@ -390,7 +392,7 @@ export default {
|
|
|
let formData=new FormData();
|
|
|
this.fileList.forEach(file=>{
|
|
|
formData.append('file',file.raw);
|
|
|
- });
|
|
|
+ });
|
|
|
formData.append("algorithmId",undefined);
|
|
|
formData.append("algorithmName",this.dataForm.algorithmName);
|
|
|
formData.append("remark",this.dataForm.remark);
|
|
@@ -398,7 +400,9 @@ export default {
|
|
|
formData.append("uid",this.$store.state.user.id);
|
|
|
formData.append("frameId",this.imageSelected);
|
|
|
formData.append("number",1);
|
|
|
- formData.append("dataSets",this.value1);
|
|
|
+ formData.append("dataSets", JSON.stringify(this.datasetSelected.filter((item) => item.datasetStatus === 1)));
|
|
|
+ formData.append("dataSetsDy", JSON.stringify(this.datasetSelected.filter((item) => item.datasetStatus === 2)));
|
|
|
+ //formData.append("dataSets",this.value1);
|
|
|
formData.append("algModels",this.value2);
|
|
|
formData.append("algTemplates",this.value3);
|
|
|
console.log(formData);
|
|
@@ -431,7 +435,7 @@ export default {
|
|
|
|
|
|
}).catch(() => {})
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
}
|
|
|
});
|
|
@@ -486,4 +490,4 @@ export default {
|
|
|
padding: 5px 0px;
|
|
|
margin: 10px;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|