修改 83399,国内外政策-入库--选择政策体系页面的样式建议调整并增加搜索功能
This commit is contained in:
@@ -1,17 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-drawer
|
<el-drawer
|
||||||
title="政策体系"
|
title="政策体系"
|
||||||
:visible.sync="visible"
|
:visible.sync="visible"
|
||||||
>
|
>
|
||||||
|
<el-input v-model="filterText" placeholder="请输入政策体系" class="filterInput" style="width: 100%;padding: 10px 5px"/>
|
||||||
<div style="flex: 1">
|
<div style="flex: 1">
|
||||||
<el-tree
|
<el-tree
|
||||||
ref="tree"
|
ref="tree"
|
||||||
:data="treeList"
|
:data="treeList"
|
||||||
:props="defaultProps"
|
:props="defaultProps"
|
||||||
node-key="id"
|
node-key="id"
|
||||||
highlight-current
|
highlight-current
|
||||||
:expand-on-click-node="false"
|
:filter-node-method="filterNode"
|
||||||
/>
|
:expand-on-click-node="false"
|
||||||
|
>
|
||||||
|
<span slot-scope="{ node, data }" class="custom-tree-node">
|
||||||
|
<span :class="data.children.length !== 0 ? 'is-show' : 'is-leaf-none'" />
|
||||||
|
<span style="font-size:12px"> {{ node.label }} </span>
|
||||||
|
</span>
|
||||||
|
</el-tree>
|
||||||
</div>
|
</div>
|
||||||
<div class="demo-drawer-footer" style="height: 51px">
|
<div class="demo-drawer-footer" style="height: 51px">
|
||||||
<el-button size="mini" @click="cancel">取消</el-button>
|
<el-button size="mini" @click="cancel">取消</el-button>
|
||||||
@@ -28,6 +35,7 @@ export default {
|
|||||||
visible: false,
|
visible: false,
|
||||||
getListStand: 'sarResource/ts-resource/getListStandIgnoreMyCollection',
|
getListStand: 'sarResource/ts-resource/getListStandIgnoreMyCollection',
|
||||||
treeList: [],
|
treeList: [],
|
||||||
|
filterText: '',
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
children: 'children',
|
children: 'children',
|
||||||
label: 'menuName'
|
label: 'menuName'
|
||||||
@@ -37,7 +45,16 @@ export default {
|
|||||||
mounted () {
|
mounted () {
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
filterText (val) {
|
||||||
|
this.$refs.tree.filter(val);
|
||||||
|
},
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
filterNode (value, data) {
|
||||||
|
if (!value) return true;
|
||||||
|
return data.menuName.indexOf(value) !== -1;
|
||||||
|
},
|
||||||
getList () {
|
getList () {
|
||||||
this.$http._getData(this.getListStand, {
|
this.$http._getData(this.getListStand, {
|
||||||
sorDivide: 'FOREIGN_LAWS',
|
sorDivide: 'FOREIGN_LAWS',
|
||||||
@@ -51,9 +68,10 @@ export default {
|
|||||||
open (key) {
|
open (key) {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
this.filterText = ''
|
||||||
key === '' ?
|
key === '' ?
|
||||||
this.$refs.tree.setCurrentKey() :
|
this.$refs.tree.setCurrentKey() :
|
||||||
this.$refs.tree.setCurrentKey(key)
|
this.$refs.tree.setCurrentKey(key)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
cancel () {
|
cancel () {
|
||||||
@@ -76,5 +94,20 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
/deep/ .is-leaf-none{
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
|
background: url('~@/assets/images/shangqi/img/none-file-new.png');
|
||||||
|
background-size:100% 100%;
|
||||||
|
}
|
||||||
|
/deep/ .is-show{
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
|
background:url('~@/assets/images/shangqi/img/tree.png');
|
||||||
|
background-size:100% 100%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user