Browse Source

Merge branch 'V20220801' into fix-2454

pull/2604/head
liuzx 2 years ago
parent
commit
6011e86ee6
1 changed files with 9 additions and 9 deletions
  1. +9
    -9
      web_src/js/components/dataset/selectDataset.vue

+ 9
- 9
web_src/js/components/dataset/selectDataset.vue View File

@@ -76,7 +76,7 @@
type="text" type="text"
placeholder="搜数据集名称/描述..." placeholder="搜数据集名称/描述..."
v-model="search" v-model="search"
@keyup.enter="searchName"
@keyup.enter.stop="searchName"
/> />
</div> </div>
<el-row> <el-row>
@@ -727,7 +727,7 @@ export default {
"currentTree", "currentTree",
this.paramsCurrent.page this.paramsCurrent.page
); );
this.initCurrentTreeNode = [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) => {
@@ -742,7 +742,7 @@ export default {
); );
this.$refs.currentTree.setCheckedKeys(setCheckedKeysList); this.$refs.currentTree.setCheckedKeys(setCheckedKeysList);
}) })
.catch(function (error) {
.catch((error) => {
this.loadingCurrent = false; this.loadingCurrent = false;
console.log(error); console.log(error);
}); });
@@ -763,7 +763,7 @@ export default {
"myTree", "myTree",
this.paramsMy.page this.paramsMy.page
); );
this.initMyTreeNode = [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) => {
@@ -775,7 +775,7 @@ export default {
}, []); }, []);
this.$refs.myTree.setCheckedKeys(setCheckedKeysList); this.$refs.myTree.setCheckedKeys(setCheckedKeysList);
}) })
.catch(function (error) {
.catch((error) => {
console.log(error); console.log(error);
}); });
}, },
@@ -796,7 +796,7 @@ export default {
"publicTree", "publicTree",
this.paramsPublics.page this.paramsPublics.page
); );
this.initPublicTreeNode = [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) => {
@@ -808,7 +808,7 @@ export default {
}, []); }, []);
this.$refs.publicTree.setCheckedKeys(setCheckedKeysList); this.$refs.publicTree.setCheckedKeys(setCheckedKeysList);
}) })
.catch(function (error) {
.catch((error) => {
this.loadingPublic = false; this.loadingPublic = false;
console.log(error); console.log(error);
}); });
@@ -830,7 +830,7 @@ export default {
"favoriteTree", "favoriteTree",
this.paramsFavorite.page this.paramsFavorite.page
); );
this.initFavoriteTreeNode = [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) => {
@@ -845,7 +845,7 @@ export default {
); );
this.$refs.favoriteTree.setCheckedKeys(setCheckedKeysList); this.$refs.favoriteTree.setCheckedKeys(setCheckedKeysList);
}) })
.catch(function (error) {
.catch((error) => {
this.loadingFavorite = false; this.loadingFavorite = false;
console.log(error); console.log(error);
}); });


Loading…
Cancel
Save