| @@ -76,7 +76,7 @@ | |||
| type="text" | |||
| placeholder="搜数据集名称/描述..." | |||
| v-model="search" | |||
| @keyup.enter="searchName" | |||
| @keyup.enter.stop="searchName" | |||
| /> | |||
| </div> | |||
| <el-row> | |||
| @@ -727,7 +727,7 @@ export default { | |||
| "currentTree", | |||
| 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); | |||
| let setCheckedKeysList = this.currentDatasetList.reduce( | |||
| (pre, cur) => { | |||
| @@ -742,7 +742,7 @@ export default { | |||
| ); | |||
| this.$refs.currentTree.setCheckedKeys(setCheckedKeysList); | |||
| }) | |||
| .catch(function (error) { | |||
| .catch((error) => { | |||
| this.loadingCurrent = false; | |||
| console.log(error); | |||
| }); | |||
| @@ -763,7 +763,7 @@ export default { | |||
| "myTree", | |||
| 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); | |||
| let setCheckedKeysList = this.myDatasetList.reduce((pre, cur) => { | |||
| cur.Attachments.forEach((item) => { | |||
| @@ -775,7 +775,7 @@ export default { | |||
| }, []); | |||
| this.$refs.myTree.setCheckedKeys(setCheckedKeysList); | |||
| }) | |||
| .catch(function (error) { | |||
| .catch((error) => { | |||
| console.log(error); | |||
| }); | |||
| }, | |||
| @@ -796,7 +796,7 @@ export default { | |||
| "publicTree", | |||
| 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); | |||
| let setCheckedKeysList = this.publicDatasetList.reduce((pre, cur) => { | |||
| cur.Attachments.forEach((item) => { | |||
| @@ -808,7 +808,7 @@ export default { | |||
| }, []); | |||
| this.$refs.publicTree.setCheckedKeys(setCheckedKeysList); | |||
| }) | |||
| .catch(function (error) { | |||
| .catch((error) => { | |||
| this.loadingPublic = false; | |||
| console.log(error); | |||
| }); | |||
| @@ -830,7 +830,7 @@ export default { | |||
| "favoriteTree", | |||
| 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); | |||
| let setCheckedKeysList = this.MyFavoriteDatasetList.reduce( | |||
| (pre, cur) => { | |||
| @@ -845,7 +845,7 @@ export default { | |||
| ); | |||
| this.$refs.favoriteTree.setCheckedKeys(setCheckedKeysList); | |||
| }) | |||
| .catch(function (error) { | |||
| .catch((error) => { | |||
| this.loadingFavorite = false; | |||
| console.log(error); | |||
| }); | |||