[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"> <template slot="footer" v-if="treeOpera && checkable">
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
<a-dropdown style="float: left" :trigger="['click']" placement="topCenter"> <!-- <a-dropdown style="float: left" :trigger="['click']" placement="topCenter">-->
<a-menu slot="overlay"> <!-- <a-menu slot="overlay">-->
<a-menu-item key="1" @click="switchCheckStrictly(1)">{{ $t('parentChildConnection') }}</a-menu-item> <!-- <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-item key="2" @click="switchCheckStrictly(2)">{{ $t('cancelConnection') }}</a-menu-item>-->
</a-menu> <!-- </a-menu>-->
<a-button> <!-- <a-button>-->
{{ treeOperationText }} <a-icon type="up" /> <!-- {{ treeOperationText }} <a-icon type="up" />-->
</a-button> <!-- </a-button>-->
</a-dropdown> <!-- </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="handleCancel" type="primary" style="margin-right: 0.8rem">{{ $t('close') }}</a-button>
<a-button @click="handleOk" type="primary" >{{ $t('confirm') }}</a-button> <a-button @click="handleOk" type="primary" >{{ $t('confirm') }}</a-button>
</div> </div>
@@ -117,7 +118,7 @@ export default {
} }
}, },
treeOperationText () { treeOperationText () {
return this.parentChildRelate ? this.$t('parentChildConnection') : this.$t('cancelConnection') return this.parentChildRelate ? this.$t('cancelConnection') : this.$t('parentChildConnection')
} }
}, },
watch: { watch: {
@@ -143,7 +144,7 @@ export default {
this.searchFieldName = 'nodeName' this.searchFieldName = 'nodeName'
this.lazyLoadPidFieldName = 'dictItemId' this.lazyLoadPidFieldName = 'dictItemId'
} else { // 标签库 } else { // 标签库
this.replaceFields = { children: 'childrenList', title: 'itemText', key: 'id' } this.replaceFields = { children: 'childrenList', title: 'itemText', key: 'itemValue' }
this.lazyLoadHref = '/laws/dictTree/getChild' this.lazyLoadHref = '/laws/dictTree/getChild'
this.searchFieldName = 'nodeName' this.searchFieldName = 'nodeName'
this.lazyLoadPidFieldName = 'dictItemId' this.lazyLoadPidFieldName = 'dictItemId'
@@ -161,7 +162,7 @@ export default {
width: 800, width: 800,
visible: false, visible: false,
confirmLoading: false, confirmLoading: false,
parentChildRelate: false, // 父子节点是否关联 parentChildRelate: true, // 父子节点是否关联
autoExpandParent: false, // 是否自动展开父节点 autoExpandParent: false, // 是否自动展开父节点
treeData: [], treeData: [],
expandedKeys: [], expandedKeys: [],
@@ -419,8 +420,7 @@ export default {
if (this.optionsHref === '/laws/standard/partName/queryFirstList') { if (this.optionsHref === '/laws/standard/partName/queryFirstList') {
url = '/laws/standard/partName/echo' url = '/laws/standard/partName/echo'
} else { // 标签库 } else { // 标签库
// url = '/laws/lawsLabelDatabase/queryByCodes' url = '/laws/dictTree/echo'
url = '/laws/standard/partName/echo'
} }
if (!url) { if (!url) {
return return
@@ -19,7 +19,6 @@
<script> <script>
import TreeDataSelectModal from './TreeDataSelectModal' import TreeDataSelectModal from './TreeDataSelectModal'
import { underLinetoHump } from '@/components/_util/StringUtil'
export default { export default {
name: 'TreeDataSelection', name: 'TreeDataSelection',