diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl
index 9a4a65eac..cb83bebe7 100755
--- a/templates/repo/header.tmpl
+++ b/templates/repo/header.tmpl
@@ -138,7 +138,7 @@
{{end}}
{{if .Permission.CanRead $.UnitTypeDatasets}}
-
+
diff --git a/web_src/js/components/dataset/referenceDataset.vue b/web_src/js/components/dataset/referenceDataset.vue
index c5f82ea5e..0beb59292 100644
--- a/web_src/js/components/dataset/referenceDataset.vue
+++ b/web_src/js/components/dataset/referenceDataset.vue
@@ -428,6 +428,9 @@ export default {
return item.ID === id;
});
this.datasetList.splice(index, 1);
+ if (this.datasetList.length === 0) {
+ this.showFlag = false;
+ }
} else {
this.$message.error(res.data.Message);
}
@@ -442,10 +445,8 @@ export default {
this.dialogVisible = false;
},
changeCheckbox(checked, item) {
- console.log(this.checkList, checked);
if (this.checkList.length > this.maxReferenceNum) {
this.checkList.pop();
- console.log(this.checkList);
this.$message.error("关联超过20个数据集");
return;
}
@@ -505,7 +506,6 @@ 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;
@@ -585,7 +585,13 @@ export default {
},
showFlag(val) {
if (!val) {
- location.reload();
+ document
+ .getElementById("header-dataset")
+ .setAttribute("href", this.repoLink + "/datasets");
+ } else {
+ document
+ .getElementById("header-dataset")
+ .setAttribute("href", this.repoLink + "/reference_datasets");
}
},
},