index.vue 3.11 KB
Newer Older
Z's avatar
Z committed
1
<template>
xd's avatar
xd committed
2 3
  <d2-container class="ct">
    <div class="test">
xd's avatar
xd committed
4
      <!-- <div class="tac"> -->
xd's avatar
xd committed
5 6 7 8 9 10 11 12 13 14 15
        <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>
          <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 19 20 21 22 23
            <span slot="title">柜组管理</span>
          </el-menu-item>
          <el-menu-item index="3" @click="handleMenuChange('3')">
            <span class="circle"><d2-icon-svg name="store"/></span>
            <span slot="title">门店管理</span>
          </el-menu-item>
        </el-menu>
xd's avatar
xd committed
24
      <!-- </div> -->
xd's avatar
xd committed
25 26
    </div>
    <div class="content">
xd's avatar
xd committed
27 28 29 30
      <mail v-if="index == '1' && isHistoryShow == false"  @isShow="contorlHistoryShow"></mail>
      <counter v-if="index == '2'"></counter>
      <store v-if="index == '3'"></store>
      <history v-if="isHistoryShow == true" @isShow="contorlHistoryShow"></history>
xd's avatar
xd committed
31
    </div>
Z's avatar
Z committed
32 33
  </d2-container>
</template>
xd's avatar
xd committed
34 35 36 37 38

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