|
|
@@ -75,7 +75,7 @@ |
|
|
<input |
|
|
<input |
|
|
type="text" |
|
|
type="text" |
|
|
placeholder="搜数据集名称/描述..." |
|
|
placeholder="搜数据集名称/描述..." |
|
|
v-model="search" |
|
|
|
|
|
|
|
|
v-model="search" |
|
|
@keydown.enter.stop.prevent="searchName" |
|
|
@keydown.enter.stop.prevent="searchName" |
|
|
/> |
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
@@ -586,6 +586,8 @@ export default { |
|
|
confirmFlag: false, |
|
|
confirmFlag: false, |
|
|
|
|
|
|
|
|
saveStatusList: [], |
|
|
saveStatusList: [], |
|
|
|
|
|
// 初始化已选择的数据集列表 |
|
|
|
|
|
hasSelectDatasetList: [], |
|
|
//当前项目数据集页面配置的初始化 |
|
|
//当前项目数据集页面配置的初始化 |
|
|
initCurrentPage: 1, |
|
|
initCurrentPage: 1, |
|
|
totalNumCurrent: 0, |
|
|
totalNumCurrent: 0, |
|
|
@@ -644,6 +646,7 @@ export default { |
|
|
|
|
|
|
|
|
//tree 勾选触发事件 |
|
|
//tree 勾选触发事件 |
|
|
onCheck(data, checkedInfo) { |
|
|
onCheck(data, checkedInfo) { |
|
|
|
|
|
this.hasSelectDatasetList = []; |
|
|
if ( |
|
|
if ( |
|
|
this.selectDatasetArray.length === 0 || |
|
|
this.selectDatasetArray.length === 0 || |
|
|
this.selectDatasetArray.every((item) => item.id !== data.id) |
|
|
this.selectDatasetArray.every((item) => item.id !== data.id) |
|
|
@@ -671,9 +674,8 @@ export default { |
|
|
return item.label; |
|
|
return item.label; |
|
|
}); |
|
|
}); |
|
|
this.saveStatusList = this.selectDatasetArray.map((item) => { |
|
|
this.saveStatusList = this.selectDatasetArray.map((item) => { |
|
|
return item.UUID; |
|
|
|
|
|
|
|
|
return item.id; |
|
|
}); |
|
|
}); |
|
|
// this.confirmDatasetList = this.saveStatusList.join(";"); |
|
|
|
|
|
}, |
|
|
}, |
|
|
//已选择数据集checkbox group 勾选事件 |
|
|
//已选择数据集checkbox group 勾选事件 |
|
|
changeCheckbox(checked, data) { |
|
|
changeCheckbox(checked, data) { |
|
|
@@ -686,7 +688,6 @@ export default { |
|
|
}); |
|
|
}); |
|
|
this.selectDatasetArray.splice(index, 1); |
|
|
this.selectDatasetArray.splice(index, 1); |
|
|
this.saveStatusList.splice(index, 1); |
|
|
this.saveStatusList.splice(index, 1); |
|
|
// this.confirmDatasetList = this.saveStatusList.join(";"); |
|
|
|
|
|
}, |
|
|
}, |
|
|
tableHeaderStyle({ row, column, rowIndex, columnIndex }) { |
|
|
tableHeaderStyle({ row, column, rowIndex, columnIndex }) { |
|
|
if (rowIndex === 0) { |
|
|
if (rowIndex === 0) { |
|
|
@@ -722,17 +723,23 @@ export default { |
|
|
.then((res) => { |
|
|
.then((res) => { |
|
|
this.loadingCurrent = false; |
|
|
this.loadingCurrent = false; |
|
|
let data = JSON.parse(res.data.data); |
|
|
let data = JSON.parse(res.data.data); |
|
|
|
|
|
console.log(data); |
|
|
this.currentDatasetList = this.transformeTreeData( |
|
|
this.currentDatasetList = this.transformeTreeData( |
|
|
data, |
|
|
data, |
|
|
"currentTree", |
|
|
"currentTree", |
|
|
this.paramsCurrent.page |
|
|
this.paramsCurrent.page |
|
|
); |
|
|
); |
|
|
this.initCurrentTreeNode = this.currentDatasetList[0]?.id ? [this.currentDatasetList[0].id] : []; |
|
|
|
|
|
|
|
|
this.initCurrentTreeNode = this.currentDatasetList[0]?.id |
|
|
|
|
|
? [this.currentDatasetList[0].id] |
|
|
|
|
|
: []; |
|
|
this.totalNumCurrent = parseInt(res.data.count); |
|
|
this.totalNumCurrent = parseInt(res.data.count); |
|
|
let setCheckedKeysList = this.currentDatasetList.reduce( |
|
|
let setCheckedKeysList = this.currentDatasetList.reduce( |
|
|
(pre, cur) => { |
|
|
(pre, cur) => { |
|
|
cur.Attachments.forEach((item) => { |
|
|
cur.Attachments.forEach((item) => { |
|
|
if (this.saveStatusList.includes(item.id)) { |
|
|
|
|
|
|
|
|
if ( |
|
|
|
|
|
this.saveStatusList.includes(item.id) || |
|
|
|
|
|
this.hasSelectDatasetList.includes(item.id) |
|
|
|
|
|
) { |
|
|
pre.push(item.id); |
|
|
pre.push(item.id); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
@@ -763,7 +770,9 @@ export default { |
|
|
"myTree", |
|
|
"myTree", |
|
|
this.paramsMy.page |
|
|
this.paramsMy.page |
|
|
); |
|
|
); |
|
|
this.initMyTreeNode = this.myDatasetList[0]?.id ? [this.myDatasetList[0].id] : []; |
|
|
|
|
|
|
|
|
this.initMyTreeNode = this.myDatasetList[0]?.id |
|
|
|
|
|
? [this.myDatasetList[0].id] |
|
|
|
|
|
: []; |
|
|
this.totalNumMy = parseInt(res.data.count); |
|
|
this.totalNumMy = parseInt(res.data.count); |
|
|
let setCheckedKeysList = this.myDatasetList.reduce((pre, cur) => { |
|
|
let setCheckedKeysList = this.myDatasetList.reduce((pre, cur) => { |
|
|
cur.Attachments.forEach((item) => { |
|
|
cur.Attachments.forEach((item) => { |
|
|
@@ -796,7 +805,9 @@ export default { |
|
|
"publicTree", |
|
|
"publicTree", |
|
|
this.paramsPublics.page |
|
|
this.paramsPublics.page |
|
|
); |
|
|
); |
|
|
this.initPublicTreeNode = this.publicDatasetList[0]?.id ? [this.publicDatasetList[0].id] : []; |
|
|
|
|
|
|
|
|
this.initPublicTreeNode = this.publicDatasetList[0]?.id |
|
|
|
|
|
? [this.publicDatasetList[0].id] |
|
|
|
|
|
: []; |
|
|
this.totalNumPublic = parseInt(res.data.count); |
|
|
this.totalNumPublic = parseInt(res.data.count); |
|
|
let setCheckedKeysList = this.publicDatasetList.reduce((pre, cur) => { |
|
|
let setCheckedKeysList = this.publicDatasetList.reduce((pre, cur) => { |
|
|
cur.Attachments.forEach((item) => { |
|
|
cur.Attachments.forEach((item) => { |
|
|
@@ -830,7 +841,9 @@ export default { |
|
|
"favoriteTree", |
|
|
"favoriteTree", |
|
|
this.paramsFavorite.page |
|
|
this.paramsFavorite.page |
|
|
); |
|
|
); |
|
|
this.initFavoriteTreeNode = this.MyFavoriteDatasetList[0]?.id ? [this.MyFavoriteDatasetList[0].id] : []; |
|
|
|
|
|
|
|
|
this.initFavoriteTreeNode = this.MyFavoriteDatasetList[0]?.id |
|
|
|
|
|
? [this.MyFavoriteDatasetList[0].id] |
|
|
|
|
|
: []; |
|
|
this.totalNumFavorite = parseInt(res.data.count); |
|
|
this.totalNumFavorite = parseInt(res.data.count); |
|
|
let setCheckedKeysList = this.MyFavoriteDatasetList.reduce( |
|
|
let setCheckedKeysList = this.MyFavoriteDatasetList.reduce( |
|
|
(pre, cur) => { |
|
|
(pre, cur) => { |
|
|
@@ -949,14 +962,38 @@ export default { |
|
|
mounted() { |
|
|
mounted() { |
|
|
this.type = $(".cloudbrain-type").data("cloudbrain-type"); |
|
|
this.type = $(".cloudbrain-type").data("cloudbrain-type"); |
|
|
this.repoLink = $(".cloudbrain-type").data("repo-link"); |
|
|
this.repoLink = $(".cloudbrain-type").data("repo-link"); |
|
|
|
|
|
if ($(".cloudbrain-type").data("dataset-uuid")) { |
|
|
|
|
|
this.hasSelectDatasetList = $(".cloudbrain-type") |
|
|
|
|
|
.data("dataset-uuid") |
|
|
|
|
|
.split(";"); |
|
|
|
|
|
let hasSelectDatasetName = $(".cloudbrain-type") |
|
|
|
|
|
.data("dataset-name") |
|
|
|
|
|
.split(";"); |
|
|
|
|
|
if (this.hasSelectDatasetList.length !== 0) { |
|
|
|
|
|
this.saveStatusList = this.hasSelectDatasetList; |
|
|
|
|
|
this.checkList = hasSelectDatasetName; |
|
|
|
|
|
this.hasSelectDatasetList.forEach((item, index) => { |
|
|
|
|
|
this.selectDatasetArray.push({ |
|
|
|
|
|
id: item, |
|
|
|
|
|
label: hasSelectDatasetName[index], |
|
|
|
|
|
}); |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
this.confirmDataset(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if ( |
|
|
if ( |
|
|
location.href.indexOf("benchmark") !== -1 || |
|
|
location.href.indexOf("benchmark") !== -1 || |
|
|
location.href.indexOf("train-job") !== -1 || |
|
|
location.href.indexOf("train-job") !== -1 || |
|
|
location.href.indexOf("inference") !== -1 |
|
|
|
|
|
|
|
|
location.href.indexOf("inference") !== -1 |
|
|
) { |
|
|
) { |
|
|
|
|
|
console.log("this.benchmarkNew"); |
|
|
this.benchmarkNew = true; |
|
|
this.benchmarkNew = true; |
|
|
} |
|
|
} |
|
|
if (location.href.indexOf("modelarts/notebook/create") !== -1 || location.href.indexOf("/cloudbrain/create") !== -1) { |
|
|
|
|
|
|
|
|
if ( |
|
|
|
|
|
location.href.indexOf("modelarts/notebook/create") !== -1 || |
|
|
|
|
|
location.href.indexOf("/cloudbrain/create") !== -1 |
|
|
|
|
|
) { |
|
|
this.required = false; |
|
|
this.required = false; |
|
|
} |
|
|
} |
|
|
window.onresize = () => { |
|
|
window.onresize = () => { |
|
|
|