Commit 7a37bf19 authored by 周远喜's avatar 周远喜

ok

parent 3daadc1b
<template> <template>
<div class="flex fd tree-menu"> <div class="flex fd tree-menu">
<h3 class="stitle pl10"> <h3>
产品结构 产品结构
<div class="fr mr10 mt10"> <div class="fr mr10 mt10">
<ButtonGroup class="fr" size="small"> <ButtonGroup class="fr" size="small">
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</div> </div>
</h3> </h3>
<div class="search"> <div class="search">
<Input search placeholder="关键字" v-model="keys" clearable/> <Input search placeholder="关键字" v-model="keys" clearable />
</div> </div>
<div class="fg"> <div class="fg">
<div class="tree"> <div class="tree">
...@@ -61,46 +61,46 @@ export default { ...@@ -61,46 +61,46 @@ export default {
toggle() { toggle() {
this.expand = !this.expand; this.expand = !this.expand;
}, },
change(v,b) { change(v, b) {
let ids=[]; let ids = [];
ids.push(b.value); ids.push(b.value);
if(b.children){ if (b.children) {
addId(b.children); addId(b.children);
function addId(data){ function addId(data) {
data.map(u=>{ data.map(u => {
ids.push(u.value) ids.push(u.value);
if(u.children){ if (u.children) {
addId(u.children) addId(u.children);
} }
}) });
} }
} }
this.$emit("on-select",b.value,b,ids) this.$emit("on-select", b.value, b, ids);
}, },
hide(){ hide() {
this.$emit("on-hide") this.$emit("on-hide");
} }
}, },
computed: { computed: {
data() { data() {
let items = this.$u.clone(this.list); let items = this.$u.clone(this.list);
let expand = this.expand; let expand = this.expand;
let result=[]; let result = [];
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 < 3) {
u.expand=expand; u.expand = expand;
result.push(u); result.push(u);
}else{ } else {
u.expand=expand; u.expand = expand;
if(u.title.indexOf(keys)>-1){ if (u.title.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);
} }
} }
}) });
} }
return result; return result;
} }
...@@ -110,6 +110,17 @@ export default { ...@@ -110,6 +110,17 @@ export default {
<style lang="less"> <style lang="less">
.tree-menu { .tree-menu {
h3 {
height: 50px;
font-size: 14px;
font-family: Microsoft YaHei;
font-weight: bold;
line-height: 50px;
color: rgba(81, 90, 110, 1);
background:rgba(245,246,250,1);
opacity: 1;
padding-left: 10px;
}
.search { .search {
height: 50px; height: 50px;
padding: 5px 10px; padding: 5px 10px;
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
.con { .con {
padding: 5px 5px 0px 10px; padding: 5px 5px 0px 10px;
} }
background: rgba(245,246,250,1);
} }
.fullWindow { .fullWindow {
position: fixed; position: fixed;
...@@ -37,10 +38,6 @@ ...@@ -37,10 +38,6 @@
</a> </a>
</div> </div>
<Content class="con"> <Content class="con">
<!-- <a class="detail_href" @click="view">
<Icon type="ios-undo-outline" />详情页面
</a>-->
<Card class="h100">
<DataGrid :columns="columns" ref="grid" :action="action" class="card_box"> <DataGrid :columns="columns" ref="grid" :action="action" class="card_box">
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline> <Form ref="formInline" :model="easySearch" inline>
...@@ -64,7 +61,6 @@ ...@@ -64,7 +61,6 @@
<Button type="primary" @click="add">新增</Button> <Button type="primary" @click="add">新增</Button>
</template> </template>
</DataGrid> </DataGrid>
</Card>
<Modal v-model="modal" :title="title" width="1200" footer-hide> <Modal v-model="modal" :title="title" width="1200" footer-hide>
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" /> <component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" />
</Modal> </Modal>
......
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