[update] 树形弹框

This commit is contained in:
lideqin
2024-08-08 09:48:47 +08:00
parent b78de96fdc
commit b27d9987a2
2 changed files with 14 additions and 15 deletions
@@ -48,15 +48,16 @@
<!--底部父子关联操作和确认取消按钮-->
<template slot="footer" v-if="treeOpera && checkable">
<div class="drawer-bootom-button">
<a-dropdown style="float: left" :trigger="['click']" placement="topCenter">
<a-menu slot="overlay">
<a-menu-item key="1" @click="switchCheckStrictly(1)">{{ $t('parentChildConnection') }}</a-menu-item>
<a-menu-item key="2" @click="switchCheckStrictly(2)">{{ $t('cancelConnection') }}</a-menu-item>
</a-menu>
<a-button>
{{ treeOperationText }} <a-icon type="up" />
</a-button>
</a-dropdown>
<!-- <a-dropdown style="float: left" :trigger="['click']" placement="topCenter">-->
<!-- <a-menu slot="overlay">-->
<!-- <a-menu-item key="1" @click="switchCheckStrictly(1)">{{ $t('parentChildConnection') }}</a-menu-item>-->
<!-- <a-menu-item key="2" @click="switchCheckStrictly(2)">{{ $t('cancelConnection') }}</a-menu-item>-->
<!-- </a-menu>-->
<!-- <a-button>-->
<!-- {{ treeOperationText }} <a-icon type="up" />-->
<!-- </a-button>-->
<!-- </a-dropdown>-->
<a-button style="float: left" @click="switchCheckStrictly(parentChildRelate ? 1 : 2)">{{ treeOperationText }}</a-button>
<a-button @click="handleCancel" type="primary" style="margin-right: 0.8rem">{{ $t('close') }}</a-button>
<a-button @click="handleOk" type="primary" >{{ $t('confirm') }}</a-button>
</div>
@@ -117,7 +118,7 @@ export default {
}
},
treeOperationText () {
return this.parentChildRelate ? this.$t('parentChildConnection') : this.$t('cancelConnection')
return this.parentChildRelate ? this.$t('cancelConnection') : this.$t('parentChildConnection')
}
},
watch: {
@@ -143,7 +144,7 @@ export default {
this.searchFieldName = 'nodeName'
this.lazyLoadPidFieldName = 'dictItemId'
} else { // 标签库
this.replaceFields = { children: 'childrenList', title: 'itemText', key: 'id' }
this.replaceFields = { children: 'childrenList', title: 'itemText', key: 'itemValue' }
this.lazyLoadHref = '/laws/dictTree/getChild'
this.searchFieldName = 'nodeName'
this.lazyLoadPidFieldName = 'dictItemId'
@@ -161,7 +162,7 @@ export default {
width: 800,
visible: false,
confirmLoading: false,
parentChildRelate: false, // 父子节点是否关联
parentChildRelate: true, // 父子节点是否关联
autoExpandParent: false, // 是否自动展开父节点
treeData: [],
expandedKeys: [],
@@ -419,8 +420,7 @@ export default {
if (this.optionsHref === '/laws/standard/partName/queryFirstList') {
url = '/laws/standard/partName/echo'
} else { // 标签库
// url = '/laws/lawsLabelDatabase/queryByCodes'
url = '/laws/standard/partName/echo'
url = '/laws/dictTree/echo'
}
if (!url) {
return
@@ -19,7 +19,6 @@
<script>
import TreeDataSelectModal from './TreeDataSelectModal'
import { underLinetoHump } from '@/components/_util/StringUtil'
export default {
name: 'TreeDataSelection',