diff --git a/src/common/lang/standardRegulationLibrary/zh-cn.js b/src/common/lang/standardRegulationLibrary/zh-cn.js index c5af4516..08247e5f 100644 --- a/src/common/lang/standardRegulationLibrary/zh-cn.js +++ b/src/common/lang/standardRegulationLibrary/zh-cn.js @@ -57,7 +57,8 @@ module.exports = { typeOfOwnership: '所属类型', uploadData: '上传资料', addAPeer: '新增同级', - newChild: '新增子级' + newChild: '新增子级', + pleaseSelectTheDirectoryOnTheLeft:'请选择左侧目录' }, // 文档动态 documentDynamics: { diff --git a/src/views/standardRegulationLibrary/profileCenter/ProfileCenterList.vue b/src/views/standardRegulationLibrary/profileCenter/ProfileCenterList.vue index 781773e4..bafebc63 100644 --- a/src/views/standardRegulationLibrary/profileCenter/ProfileCenterList.vue +++ b/src/views/standardRegulationLibrary/profileCenter/ProfileCenterList.vue @@ -262,6 +262,10 @@ export default { }) }, handleAdd: function () { + if (!this.selectedTreeKeys||this.selectedTreeKeys.length === 0) { + this.$message.warning(this.$t('standardRegulationLibrary.profileCenter.pleaseSelectTheDirectoryOnTheLeft')) + return + } const folderId = this.selectedTreeKeys && this.selectedTreeKeys.length > 0 ? this.selectedTreeKeys.join(',') : null this.$refs.modalForm.add({ folderId }) this.$refs.modalForm.title = this.$t('newlyAdded')