[update] 树形弹窗组件
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
@ok="handleOk"
|
@ok="handleOk"
|
||||||
@cancel="handleCancel">
|
@cancel="handleCancel">
|
||||||
|
|
||||||
<a-spin :spinning="confirmLoading">
|
<div class="modal-content">
|
||||||
<a-input-search style="margin-bottom: 1px" :placeholder="$t('pleaseEnter') + $t('treeSelection.primaryNodeName')" @search="onSearch" />
|
<a-input-search style="margin-bottom: 1px" :placeholder="$t('pleaseEnter') + $t('treeSelection.primaryNodeName')" @search="onSearch" />
|
||||||
<a-tree
|
<a-tree
|
||||||
ref="tree"
|
ref="tree"
|
||||||
@@ -34,7 +34,16 @@
|
|||||||
<span v-else>{{name}}</span>
|
<span v-else>{{name}}</span>
|
||||||
</template>
|
</template>
|
||||||
</a-tree>
|
</a-tree>
|
||||||
</a-spin>
|
</div>
|
||||||
|
|
||||||
|
<p class="modal-content-title">{{ $t('treeSelection.selectedData') }}</p>
|
||||||
|
<div v-if="dataSourceRight && dataSourceRight.length > 0" class="name-content">
|
||||||
|
<div v-for="(item, index) in dataSourceRight" :key="item.code" class="name-div">
|
||||||
|
{{ item.name }}
|
||||||
|
<a-icon type="close" @click="handleDelete(item, index)" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a-empty v-else />
|
||||||
</j-modal>
|
</j-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -97,6 +106,17 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
default: 'name',
|
default: 'name',
|
||||||
required: false
|
required: false
|
||||||
|
},
|
||||||
|
dictId: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
// 懒加载接口,默认是涉及系统/部件的懒加载接口
|
||||||
|
lazyLoadHref: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: '/laws/dictTree/getChild'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -229,10 +249,7 @@ export default {
|
|||||||
getTreeData () {
|
getTreeData () {
|
||||||
this.confirmLoading = true
|
this.confirmLoading = true
|
||||||
const params = {}
|
const params = {}
|
||||||
// 查询条件的名称
|
params.dictId = this.dictId
|
||||||
params[this.searchFieldName] = this.searchValue
|
|
||||||
// 展开的节点
|
|
||||||
// params.expandedKeys = this.expandedKeys.join(',')
|
|
||||||
getAction(this.optionsHref, params).then(res => {
|
getAction(this.optionsHref, params).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.treeData = res.result.records || res.result
|
this.treeData = res.result.records || res.result
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
:value="value"
|
:value="value"
|
||||||
:storeField="storeField"
|
:storeField="storeField"
|
||||||
:textField="textField"
|
:textField="textField"
|
||||||
|
:dict-id="dictId"
|
||||||
:options-href="optionsHref"
|
:options-href="optionsHref"
|
||||||
@ok="handleOK"/>
|
@ok="handleOK"/>
|
||||||
</div>
|
</div>
|
||||||
@@ -75,6 +76,11 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
required: false,
|
required: false,
|
||||||
default: ''
|
default: ''
|
||||||
|
},
|
||||||
|
dictId: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
|
|||||||
Reference in New Issue
Block a user