From 81c27cf5286329cb56aa54c3a7a568e28bd39886 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=9C=84?= Date: Wed, 1 Nov 2023 18:32:35 +0800 Subject: [PATCH] bug 77930 --- .../domesticStandard/DomesticStandardList.vue | 54 +++++++++++++------ .../overseasStandard/OverseasStandardList.vue | 17 +++--- 2 files changed, 48 insertions(+), 23 deletions(-) diff --git a/src/views/standardRegulationLibrary/domesticStandard/DomesticStandardList.vue b/src/views/standardRegulationLibrary/domesticStandard/DomesticStandardList.vue index 0fa130ab..f0881d31 100644 --- a/src/views/standardRegulationLibrary/domesticStandard/DomesticStandardList.vue +++ b/src/views/standardRegulationLibrary/domesticStandard/DomesticStandardList.vue @@ -13,7 +13,9 @@ @mouseenter="handleTreeMouseover(record.key)" @mouseleave="handleTreeMouseout(record.key)" @click="handleSelectTreeNode(record)"> - + @@ -204,7 +221,14 @@ import { postDownFile } from '../../../api/manage.js' export default { name: 'DomesticStandardList', - components: { Search, JTable, DomesticStandardModal, UserSelectModal, DomesticSystemTreeModal, SelectionDomesticStandardDrawer }, + components: { + Search, + JTable, + DomesticStandardModal, + UserSelectModal, + DomesticSystemTreeModal, + SelectionDomesticStandardDrawer + }, mixins: [ConfigurableTableMixin], data () { return { @@ -433,8 +457,8 @@ export default { * 配置标准 */ handleConfigStandard () { - // 没选择左侧树节点,需要提示“请先选择二级及以下体系” - if (!this.selectedTreeNodeCodes || this.selectedTreeNodeCodes.length === 0) { + if (!this.selectedTreeNodeCodes || this.selectedTreeNodeCodes.length === 0 || + this.selectedTreeNodeCodes.includes('MyCollection') || this.selectedTreeNodeCodes.includes('A02')) { this.$message.warn(this.$t('standardRegulationLibrary.configStandardNoTreeNode')) return } @@ -467,20 +491,20 @@ export default { */ handleRemoveStandard () { // 没选择左侧树节点,需要提示“请先选择二级及以下体系” - if (!this.selectedTreeNodeCodes || this.selectedTreeNodeCodes.length === 0) { + if (!this.selectedTreeNodeCodes || this.selectedTreeNodeCodes.length === 0 || this.selectedTreeNodeCodes.includes('A02')) { this.$message.warn(this.$t('standardRegulationLibrary.configStandardNoTreeNode')) return } - // 没有选择列表数据,需要提示“选中至少一条列表数据” - if (!this.selectedRowKeys || this.selectedRowKeys.length === 0) { - this.$message.warning(this.$t('standardRegulationLibrary.selectLeastOneTableData')) - return - } // 左侧节点选的是我的收藏,不可移出标准 if (this.selectedTreeNodeCodes[0] === 'MyCollection') { this.$message.warn(this.$t('enterpriseStandardLibrary.standard.myCollectNotRemove')) return } + // 没有选择列表数据,需要提示“选中至少一条列表数据” + if (!this.selectedRowKeys || this.selectedRowKeys.length === 0) { + this.$message.warning(this.$t('standardRegulationLibrary.selectLeastOneTableData')) + return + } this.loading = true const params = { nodeCode: this.selectedTreeNodeCodes[0], diff --git a/src/views/standardRegulationLibrary/overseasStandard/OverseasStandardList.vue b/src/views/standardRegulationLibrary/overseasStandard/OverseasStandardList.vue index fe827dcf..0bb5c8da 100644 --- a/src/views/standardRegulationLibrary/overseasStandard/OverseasStandardList.vue +++ b/src/views/standardRegulationLibrary/overseasStandard/OverseasStandardList.vue @@ -434,8 +434,9 @@ export default { * 配置标准 */ handleConfigStandard () { - // 没选择左侧树节点,需要提示“请先选择二级及以下体系” - if (!this.selectedTreeNodeCodes || this.selectedTreeNodeCodes.length === 0) { + // 请先选择二级及以下体系 + if (!this.selectedTreeNodeCodes || this.selectedTreeNodeCodes.length === 0 || + this.selectedTreeNodeCodes.includes('MyCollection') || this.selectedTreeNodeCodes.includes('A03')) { this.$message.warn(this.$t('standardRegulationLibrary.configStandardNoTreeNode')) return } @@ -468,20 +469,20 @@ export default { */ handleRemoveStandard () { // 没选择左侧树节点,需要提示“请先选择二级及以下体系” - if (!this.selectedTreeNodeCodes || this.selectedTreeNodeCodes.length === 0) { + if (!this.selectedTreeNodeCodes || this.selectedTreeNodeCodes.length === 0 || this.selectedTreeNodeCodes.includes('A03')) { this.$message.warn(this.$t('standardRegulationLibrary.configStandardNoTreeNode')) return } - // 没有选择列表数据,需要提示“选中至少一条列表数据” - if (!this.selectedRowKeys || this.selectedRowKeys.length === 0) { - this.$message.warning(this.$t('standardRegulationLibrary.selectLeastOneTableData')) - return - } // 左侧节点选的是我的收藏,不可移出标准 if (this.selectedTreeNodeCodes[0] === 'MyCollection') { this.$message.warn(this.$t('enterpriseStandardLibrary.standard.myCollectNotRemove')) return } + // 没有选择列表数据,需要提示“选中至少一条列表数据” + if (!this.selectedRowKeys || this.selectedRowKeys.length === 0) { + this.$message.warning(this.$t('standardRegulationLibrary.selectLeastOneTableData')) + return + } this.loading = true const params = { nodeCode: this.selectedTreeNodeCodes[0],