index.vue 3.37 KB
Newer Older
Z's avatar
Z committed
1
<template>
xd's avatar
xd committed
2
  <d2-container class="ct">
xd's avatar
xd committed
3
    <!-- <div class="test">
xd's avatar
xd committed
4 5 6 7 8 9 10 11 12 13
        <el-menu
          :default-active="index"
          class="el-menu-vertical-demo"
          @open="handleOpen"
          @close="handleClose"
        >
          <el-menu-item index="1" @click="handleMenuChange('1')">
            <span class="circle"><d2-icon-svg name="mail"/></span>
            <span slot="title">通讯录管理</span>
          </el-menu-item>
14

xd's avatar
xd committed
15
          <el-menu-item index="2" @click="handleMenuChange('2')">
xd's avatar
xd committed
16
            <span class="circle"><d2-icon-svg name="counters"/></span>
xd's avatar
xd committed
17 18
            <span slot="title">柜组管理</span>
          </el-menu-item>
19

xd's avatar
xd committed
20 21
          <el-menu-item index="3" @click="handleMenuChange('3')">
            <span class="circle"><d2-icon-svg name="store"/></span>
Z's avatar
Z committed
22
            <span slot="title">品牌管理</span>
xd's avatar
xd committed
23
          </el-menu-item>
24 25 26 27 28
          
          <el-menu-item index="4" @click="handleMenuChange('4')">
            <span class="circle"><d2-icon-svg name="store"/></span>
            <span slot="title">组织架构管理</span>
          </el-menu-item>
xd's avatar
xd committed
29
        </el-menu>
xd's avatar
xd committed
30 31

    </div> -->
xd's avatar
xd committed
32
    <div class="content">
xd's avatar
xd committed
33 34 35
      <mail v-if="index == '1' && isHistoryShow == false"  @isShow="contorlHistoryShow"></mail>
      <counter v-if="index == '2'"></counter>
      <store v-if="index == '3'"></store>
36
      <org v-if="index == '4'"></org>
xd's avatar
xd committed
37
      <history v-if="isHistoryShow == true" @isShow="contorlHistoryShow"></history>
xd's avatar
xd committed
38
    </div>
Z's avatar
Z committed
39 40
  </d2-container>
</template>
xd's avatar
xd committed
41 42 43 44

<script>
import Mail from "./mail";
import Store from "./store";
45
import Org from "./org";
xd's avatar
xd committed
46
import Counter from "./counter";
xd's avatar
xd committed
47
import History from "./components/history";
xd's avatar
xd committed
48 49 50 51
export default {
  components: {
    Mail,
    Store,
52
    Org,
xd's avatar
xd committed
53 54
    Counter,
    History
xd's avatar
xd committed
55 56 57
  },
  data () {
    return {
xd's avatar
xd committed
58 59
      index: '1',
      isHistoryShow: false
xd's avatar
xd committed
60 61 62 63 64 65 66
    }
  },
  methods: {
    handleClose () {},
    handleOpen (index) {
    },
    handleMenuChange (index) {
Z's avatar
Z committed
67
      this.index = index
xd's avatar
xd committed
68
      this.isHistoryShow = false
xd's avatar
xd committed
69
    },
Z's avatar
Z committed
70
    contorlHistoryShow (val) {
xd's avatar
xd committed
71
      this.isHistoryShow = val
xd's avatar
xd committed
72
    }
Z's avatar
Z committed
73
  }
xd's avatar
xd committed
74 75 76 77
}
</script>
<style></style>
<style scoped>
xd's avatar
xd committed
78 79 80 81 82 83
.ct >>> .d2-container-full__body{
  overflow: visible !important;
}
.ct >>> .d2-container-full {
  padding: 0 !important;
}
xd's avatar
xd committed
84 85 86
.d2-theme-container-main {
  background-color: #f8f8f8;
}
xd's avatar
xd committed
87
.test {
xd's avatar
xd committed
88
  width: 13%;
xd's avatar
xd committed
89 90
  min-height: 100%;
  display: flex;
xd's avatar
xd committed
91
  box-shadow:0px 2px 4px 0px rgba(221,221,221,1);
xd's avatar
xd committed
92
}
xd's avatar
xd committed
93
.content {
xd's avatar
xd committed
94
  width: 100%;
xd's avatar
xd committed
95
  display: flex;
xd's avatar
xd committed
96
}
xd's avatar
xd committed
97 98 99 100 101
.ct >>> .d2-container-full__body {
  display: flex;
  justify-content: space-between;
  padding: 0 !important;
}
xd's avatar
xd committed
102
/* .tac {
xd's avatar
xd committed
103
  width: 99%;
xd's avatar
xd committed
104
  height: 100%;
xd's avatar
xd committed
105
  box-shadow:0px 2px 4px 0px rgba(221,221,221,1);
xd's avatar
xd committed
106 107
} */
.test >>> .el-menu {
xd's avatar
xd committed
108 109
  border-right: none;
}
xd's avatar
xd committed
110
.test >>> .el-menu-item.is-active{
xd's avatar
xd committed
111 112
  border-left: 2px solid rgba(78,89,199,1);
}
xd's avatar
xd committed
113 114 115 116
.test >>> .el-menu {
  width: 100%;
  box-shadow: 0px 2px 4px 0px #ddd;
} 
xd's avatar
xd committed
117 118
.content {
  flex: 6;
xd's avatar
xd committed
119 120
  padding: 16px;
  background-color: #f8f8f8;
xd's avatar
xd committed
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
}
.circle {
  display: inline-block;
  width: 24px;
  height: 24px;
  background:rgba(255,255,255,1);
  box-shadow: 0px 1px 2px 0px rgba(78,89,199,1);
  border-radius: 50%;
  line-height: 24px;
  text-align: center;
  margin-right: 12px;
}
.theme-d2 .el-menu-item svg, .theme-d2 .el-submenu__title svg {
  margin-right: 0;
}
xd's avatar
xd committed
136 137 138
.ct >>> .d2-layout-header-aside-group .d2-layout-header-aside-content .d2-theme-container .d2-theme-container-main .d2-theme-container-main-layer {
  left: 0 !important;
}
xd's avatar
xd committed
139
</style>