Commit fcd466a7 authored by 仇晓婷's avatar 仇晓婷

数据字典

parent a42f5179
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
</Button> </Button>
</ButtonGroup> </ButtonGroup>
</h3> </h3>
<div class="tree" :style="{height:treeHeight+'px'}"> <div>
<Input v-model="keys" search placeholder="请输入客户名称" clearable /> <Input v-model.trim="keys" search placeholder="请输入客户名称" clearable />
<Tree :data="projectList" @on-select-change="change" /> <Tree :data="projectList" @on-select-change="change" class="tree-i" />
</div> </div>
</Sider> </Sider>
<Content class="content"> <Content class="content">
...@@ -210,10 +210,18 @@ export default { ...@@ -210,10 +210,18 @@ export default {
search(this.keys, items); search(this.keys, items);
function search(keys, data) { function search(keys, data) {
data.map(u => { data.map(u => {
if (keys.length < 3) { if (keys.length == u.title) {
result.push(u); result.push(u);
} else { } else {
if (u.title.indexOf(keys) > -1) { let code = "";
if (u.data && u.data.code) {
u.data.code.toLowerCase();
if (keys) {
keys = keys.toLowerCase();
}
code = u.data.code + "";
}
if (u.title.indexOf(keys) > -1 || code.indexOf(keys) > -1) {
result.push(u); result.push(u);
} else if (u.children) { } else if (u.children) {
search(keys, u.children); search(keys, u.children);
...@@ -403,6 +411,10 @@ export default { ...@@ -403,6 +411,10 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
.full { .full {
margin-top: 0; margin-top: 0;
.tree-i {
height: 78vh;
overflow: auto;
}
} }
.ivu-color-picker-confirm { .ivu-color-picker-confirm {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment