|
|
|
@@ -161,8 +161,10 @@ |
|
|
|
</span> |
|
|
|
<button |
|
|
|
class="ui mini button" |
|
|
|
:class="{ disabled: !canWrite }" |
|
|
|
@click.stop="cancelReferData(item.ID, item.Title)" |
|
|
|
:class="{ disabled1: !canWrite }" |
|
|
|
@click.stop=" |
|
|
|
cancelReferData(item.ID, item.Title, canWrite) |
|
|
|
" |
|
|
|
> |
|
|
|
{{ i18n.disassociate }} |
|
|
|
</button> |
|
|
|
@@ -411,7 +413,10 @@ export default { |
|
|
|
this.paramsPublics.page = 1; |
|
|
|
this.getDatasetList(); |
|
|
|
}, |
|
|
|
cancelReferData(id, name) { |
|
|
|
cancelReferData(id, name, canWrite) { |
|
|
|
if (!canWrite) { |
|
|
|
return; |
|
|
|
} |
|
|
|
let url = `${this.repoLink}/datasets/reference_datasets/${id}`; |
|
|
|
this.$axios |
|
|
|
.delete(url) |
|
|
|
@@ -436,6 +441,12 @@ export default { |
|
|
|
this.dialogVisible = false; |
|
|
|
}, |
|
|
|
changeCheckbox(checked, item) { |
|
|
|
console.log(this.checkList); |
|
|
|
// if (this.checkList.length > 10) { |
|
|
|
// this.checkList.splice(10, 1); |
|
|
|
// this.$message.error("关联超过20个数据集"); |
|
|
|
// return; |
|
|
|
// } |
|
|
|
if (checked) { |
|
|
|
this.selectDatasetArray.push({ ID: item.ID, Title: item.Title }); |
|
|
|
} else { |
|
|
|
@@ -488,9 +499,11 @@ export default { |
|
|
|
this.loadingLinkPage = true; |
|
|
|
let url = `${this.repoLink}/datasets/reference_datasets_data`; |
|
|
|
this.$axios.get(url).then((res) => { |
|
|
|
console.log(res); |
|
|
|
this.loadingLinkPage = false; |
|
|
|
if (!res.data) { |
|
|
|
this.showFlag = false; |
|
|
|
this.datasetList = []; |
|
|
|
return; |
|
|
|
} else { |
|
|
|
this.datasetList = res.data; |
|
|
|
@@ -514,6 +527,10 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
submitReferDataset() { |
|
|
|
if (this.checkList.length > 20) { |
|
|
|
this.$message.error("关联超过20个数据集"); |
|
|
|
return; |
|
|
|
} |
|
|
|
let url = `${this.repoLink}/datasets/reference_datasets`; |
|
|
|
let data = this.qs.stringify( |
|
|
|
{ |
|
|
|
@@ -677,4 +694,7 @@ export default { |
|
|
|
line-height: 20px; |
|
|
|
margin-left: 2rem; |
|
|
|
} |
|
|
|
.disabled1 { |
|
|
|
opacity: 0.45 !important; |
|
|
|
} |
|
|
|
</style> |