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

数据字典

parent a42f5179
......@@ -17,9 +17,9 @@
</Button>
</ButtonGroup>
</h3>
<div class="tree" :style="{height:treeHeight+'px'}">
<Input v-model="keys" search placeholder="请输入客户名称" clearable />
<Tree :data="projectList" @on-select-change="change" />
<div>
<Input v-model.trim="keys" search placeholder="请输入客户名称" clearable />
<Tree :data="projectList" @on-select-change="change" class="tree-i" />
</div>
</Sider>
<Content class="content">
......@@ -210,10 +210,18 @@ export default {
search(this.keys, items);
function search(keys, data) {
data.map(u => {
if (keys.length < 3) {
if (keys.length == u.title) {
result.push(u);
} 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);
} else if (u.children) {
search(keys, u.children);
......@@ -403,6 +411,10 @@ export default {
<style lang="less" scoped>
.full {
margin-top: 0;
.tree-i {
height: 78vh;
overflow: auto;
}
}
.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