bug 77930
This commit is contained in:
@@ -13,7 +13,9 @@
|
|||||||
@mouseenter="handleTreeMouseover(record.key)"
|
@mouseenter="handleTreeMouseover(record.key)"
|
||||||
@mouseleave="handleTreeMouseout(record.key)"
|
@mouseleave="handleTreeMouseout(record.key)"
|
||||||
@click="handleSelectTreeNode(record)">
|
@click="handleSelectTreeNode(record)">
|
||||||
<a-icon class="parent-node-icon" type="folder" v-if="record.dataRef.children && record.dataRef.children.length > 0" />
|
<a-icon class="parent-node-icon"
|
||||||
|
type="folder"
|
||||||
|
v-if="record.dataRef.children && record.dataRef.children.length > 0" />
|
||||||
<a-tooltip>
|
<a-tooltip>
|
||||||
<template #title>
|
<template #title>
|
||||||
{{ record.title }}
|
{{ record.title }}
|
||||||
@@ -97,13 +99,20 @@
|
|||||||
{{ $t('templateDownload') }}
|
{{ $t('templateDownload') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<!-- 批量删除-->
|
<!-- 批量删除-->
|
||||||
<a-button type="primary" icon="delete" ghost @click="batchDel" v-has="'domesticStandard:batchDel'">{{ $t('batchDelete') }}</a-button>
|
<a-button type="primary" icon="delete" ghost @click="batchDel" v-has="'domesticStandard:batchDel'">{{
|
||||||
|
$t('batchDelete')
|
||||||
|
}}
|
||||||
|
</a-button>
|
||||||
<!-- 配置标准-->
|
<!-- 配置标准-->
|
||||||
<a-button type="primary" icon="setting" ghost @click="handleConfigStandard" v-has="'domesticStandard:configStandard'">
|
<a-button type="primary" icon="setting" ghost @click="handleConfigStandard" v-has="'domesticStandard:configStandard'">
|
||||||
{{ $t('standardRegulationLibrary.configStandard') }}
|
{{ $t('standardRegulationLibrary.configStandard') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<!-- 移出标准-->
|
<!-- 移出标准-->
|
||||||
<a-button type="primary" icon="minus-circle" ghost @click="handleRemoveStandard" v-has="'domesticStandard:removeStandard'">
|
<a-button type="primary"
|
||||||
|
icon="minus-circle"
|
||||||
|
ghost
|
||||||
|
@click="handleRemoveStandard"
|
||||||
|
v-has="'domesticStandard:removeStandard'">
|
||||||
{{ $t('standardRegulationLibrary.removeStandard') }}
|
{{ $t('standardRegulationLibrary.removeStandard') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -124,7 +133,10 @@
|
|||||||
<template v-slot:standard_number="{text, record}">
|
<template v-slot:standard_number="{text, record}">
|
||||||
<a-tooltip overlay-class-name="tooltip-style">
|
<a-tooltip overlay-class-name="tooltip-style">
|
||||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||||
<div class="table-text can-click-table-text" v-if="text || text === 0" @click="toDetailPage(record)">{{ text }}</div>
|
<div class="table-text can-click-table-text" v-if="text || text === 0" @click="toDetailPage(record)">{{
|
||||||
|
text
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
@@ -133,7 +145,10 @@
|
|||||||
<template v-slot:standard_name="{text, record}">
|
<template v-slot:standard_name="{text, record}">
|
||||||
<a-tooltip overlay-class-name="tooltip-style">
|
<a-tooltip overlay-class-name="tooltip-style">
|
||||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||||
<div class="table-text can-click-table-text" v-if="text || text === 0" @click="toDetailPage(record)">{{ text }}</div>
|
<div class="table-text can-click-table-text" v-if="text || text === 0" @click="toDetailPage(record)">{{
|
||||||
|
text
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
<div v-else class="table-text">{{ global.emptyLine }}</div>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
@@ -175,7 +190,9 @@
|
|||||||
<!-- 树新增、编辑-->
|
<!-- 树新增、编辑-->
|
||||||
<domestic-system-tree-modal ref="treeModal" @ok="modalFormOk" />
|
<domestic-system-tree-modal ref="treeModal" @ok="modalFormOk" />
|
||||||
<!-- 配置标准-->
|
<!-- 配置标准-->
|
||||||
<selection-domestic-standard-drawer ref="standardSelectionModal" :node-code="selectedTreeNodeCodes[0]" @change="continueConfigStandard" />
|
<selection-domestic-standard-drawer ref="standardSelectionModal"
|
||||||
|
:node-code="selectedTreeNodeCodes[0]"
|
||||||
|
@change="continueConfigStandard" />
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -204,7 +221,14 @@ import { postDownFile } from '../../../api/manage.js'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DomesticStandardList',
|
name: 'DomesticStandardList',
|
||||||
components: { Search, JTable, DomesticStandardModal, UserSelectModal, DomesticSystemTreeModal, SelectionDomesticStandardDrawer },
|
components: {
|
||||||
|
Search,
|
||||||
|
JTable,
|
||||||
|
DomesticStandardModal,
|
||||||
|
UserSelectModal,
|
||||||
|
DomesticSystemTreeModal,
|
||||||
|
SelectionDomesticStandardDrawer
|
||||||
|
},
|
||||||
mixins: [ConfigurableTableMixin],
|
mixins: [ConfigurableTableMixin],
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
@@ -433,8 +457,8 @@ export default {
|
|||||||
* 配置标准
|
* 配置标准
|
||||||
*/
|
*/
|
||||||
handleConfigStandard () {
|
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'))
|
this.$message.warn(this.$t('standardRegulationLibrary.configStandardNoTreeNode'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -467,20 +491,20 @@ export default {
|
|||||||
*/
|
*/
|
||||||
handleRemoveStandard () {
|
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'))
|
this.$message.warn(this.$t('standardRegulationLibrary.configStandardNoTreeNode'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 没有选择列表数据,需要提示“选中至少一条列表数据”
|
|
||||||
if (!this.selectedRowKeys || this.selectedRowKeys.length === 0) {
|
|
||||||
this.$message.warning(this.$t('standardRegulationLibrary.selectLeastOneTableData'))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// 左侧节点选的是我的收藏,不可移出标准
|
// 左侧节点选的是我的收藏,不可移出标准
|
||||||
if (this.selectedTreeNodeCodes[0] === 'MyCollection') {
|
if (this.selectedTreeNodeCodes[0] === 'MyCollection') {
|
||||||
this.$message.warn(this.$t('enterpriseStandardLibrary.standard.myCollectNotRemove'))
|
this.$message.warn(this.$t('enterpriseStandardLibrary.standard.myCollectNotRemove'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// 没有选择列表数据,需要提示“选中至少一条列表数据”
|
||||||
|
if (!this.selectedRowKeys || this.selectedRowKeys.length === 0) {
|
||||||
|
this.$message.warning(this.$t('standardRegulationLibrary.selectLeastOneTableData'))
|
||||||
|
return
|
||||||
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const params = {
|
const params = {
|
||||||
nodeCode: this.selectedTreeNodeCodes[0],
|
nodeCode: this.selectedTreeNodeCodes[0],
|
||||||
|
|||||||
@@ -434,8 +434,9 @@ export default {
|
|||||||
* 配置标准
|
* 配置标准
|
||||||
*/
|
*/
|
||||||
handleConfigStandard () {
|
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'))
|
this.$message.warn(this.$t('standardRegulationLibrary.configStandardNoTreeNode'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -468,20 +469,20 @@ export default {
|
|||||||
*/
|
*/
|
||||||
handleRemoveStandard () {
|
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'))
|
this.$message.warn(this.$t('standardRegulationLibrary.configStandardNoTreeNode'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 没有选择列表数据,需要提示“选中至少一条列表数据”
|
|
||||||
if (!this.selectedRowKeys || this.selectedRowKeys.length === 0) {
|
|
||||||
this.$message.warning(this.$t('standardRegulationLibrary.selectLeastOneTableData'))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// 左侧节点选的是我的收藏,不可移出标准
|
// 左侧节点选的是我的收藏,不可移出标准
|
||||||
if (this.selectedTreeNodeCodes[0] === 'MyCollection') {
|
if (this.selectedTreeNodeCodes[0] === 'MyCollection') {
|
||||||
this.$message.warn(this.$t('enterpriseStandardLibrary.standard.myCollectNotRemove'))
|
this.$message.warn(this.$t('enterpriseStandardLibrary.standard.myCollectNotRemove'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// 没有选择列表数据,需要提示“选中至少一条列表数据”
|
||||||
|
if (!this.selectedRowKeys || this.selectedRowKeys.length === 0) {
|
||||||
|
this.$message.warning(this.$t('standardRegulationLibrary.selectLeastOneTableData'))
|
||||||
|
return
|
||||||
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const params = {
|
const params = {
|
||||||
nodeCode: this.selectedTreeNodeCodes[0],
|
nodeCode: this.selectedTreeNodeCodes[0],
|
||||||
|
|||||||
Reference in New Issue
Block a user