Commit 00b98044 authored by 张俊's avatar 张俊

合并

parents 4dee93a8 fb362363
<template>
<div id="app">
<bd-menu class="outmenu"></bd-menu>
<router-view />
</div>
</template>
<script>
import bdMenu from './components/menu'
export default {
data: () => ({}),
components:{
bdMenu
},
methods: {
windowResize() {
const remSize = 20; // 1rem === 20px
const rect = document.body.getBoundingClientRect();
const fontSize = (Math.min(rect.width, rect.height) / 720) * remSize;
document.documentElement.style.fontSize = fontSize + "px";
},
initRem() {
this.windowResize();
window.addEventListener("resize", this.windowResize, false);
}
},
created() {
this.initRem();
}
};
</script>
<style scoped>
.outmenu{
position: fixed;
top: 0;
left: 0;
}
#app{
background-color: #f6f7fb;
}
</style>
......@@ -60,7 +60,77 @@
color: #264dd9;
cursor: pointer;
}
.space_bet{
.space_bet{}
/* reset */
html {
}
body {
margin: 0;
font-family: PingFangSC-Regular, sans-serif;
font-size: 1rem;
}
ul {
list-style: none;
padding: 0;
margin: 0;
}
p {
margin: 0;
}
h1,
h2,
h3,
h4,
h5 {
margin: 0;
font-weight: normal;
}
div{
box-sizing: border-box;
}
/* reset end */
/* common */
#app {
/* height: 100%; */
/* overflow: hidden; */
}
.text_clip {
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
white-space: nowrap;
}
.map_container {
background-color: #eee;
}
.ss_card {
padding: 1.2rem;
display: flex;
justify-content: flex-start;
align-items: flex-start;
}
.ss_card > .sc_left_container {
width: 6rem;
height: 6rem;
flex-shrink: 0;
border-radius: 0.5rem;
overflow: hidden;
font-size: 0;
}
.ss_card > .sc_right_container {
width: calc(100% - 7rem);
flex-grow: 1;
margin-left: 1.2rem;
}
.ss_card > .sc_right_container > .sc_title {
font-size: 1.6rem;
font-weight: bold;
line-height: 2.6rem;
}
.ss_card > .sc_right_container > .sc_info {
display: flex;
justify-content: space-between;
}
......
<template>
<div class="menu">
<img src="../assets/imgs/home_img_logo.png" alt="" class="logo">
<span class="user">用户</span>
<img src="../assets/imgs/home_ic_user.png" alt="" class="user_pic">
<div class="number">99+</div>
<img src="../assets/imgs/home_ic_shop.png" alt="" class="car">
<div style="float:right">
<div v-for="(item,index) in menu_arr" :key="index+200" class="menu_box" @click="now_menu = index" :style="now_menu==index?{color:'#fff'}:{}">{{item}}
<div class="bottom_show" v-if="now_menu==index"></div>
</div>
</div>
</div>
</template>
<script>
export default {
data(){
return{
menu_arr:['工作台','技术支持','服务超市'],
now_menu:0,
}
}
}
</script>
<style scoped>
.menu{
width: 100%;
height: 84px;
background-color: #0f2683;
color: #8390ee;
line-height: 84px;
}
.logo{
float: left;
margin: 30px 0 0 40px;
}
.user{
float: right;
margin-right: 113px;
font-size: 16px;
}
.user_pic{
float: right;
margin-right: 15px;
margin-top: 30px;
}
.number{
float: right;
margin-right: 43px;
margin-top: 30px;
width: 40px;
height: 22px;
background-color: #e56600;
border-radius: 11px;
color: #fcefd6;
line-height: 22px;
text-align: center;
}
.car{
float: right;
margin-right: 15px;
margin-top: 30px;
}
.menu_box{
float: right;
width: 185px;
text-align: center;
cursor: pointer;
position: relative;
}
.menu_box:nth-of-type(1){
margin-right: 52px;
}
.bottom_show{
width: 24px;
height: 5px;
background-color: #e56600;
border-radius: 3px;
position: absolute;
bottom: 0px;
left: calc(50% - 12px);
}
</style>
\ No newline at end of file
<template>
<div>
Index
<div class="index_container">
<div class="decor"></div>
<router-view class="contain" />
</div>
</template>
......@@ -11,3 +12,22 @@ export default {
}
};
</script>
<style scoped>
.index_container {
margin-top: 84px;
min-height: 200px;
overflow-x: hidden;
overflow-y: auto;
}
.decor{
width: 100%;
height: 174px;
background-color: #0f2683;
}
.contain{
width: 1200px;
margin: 0 auto;
margin-top: -157px;
}
</style>
<template>
<div>
<div class="person_info">
<div class="preson">
<div class="person_text">
<img src="../assets/imgs/img_head.png" alt="">
<span>你好,{{person}}!最近登录{{login_time}}</span>
</div>
<div class="person_menu">管理功能&nbsp;&nbsp;&nbsp; <img src="../assets/imgs/home_ic_more_w.png" alt=""></div>
</div>
<div class="menu">
<div :class="now_user==0?'menu_box0':now_user==1?'menu_box1':'menu_box2'" v-for="(item,index) in menu_arr[now_user]" :key="index+100" >
<img :src="item.pic" alt="">
<div class="menu_text">
<p>{{item.text}}</p>
<p :style="index == menu_arr[now_user].length - 1||now_user==1&&index==0?{color:item.color,marginRight:'-20px'}:{color:item.color}"><span style="font-size:36px">{{item.num}}</span><span v-if="index == menu_arr[now_user].length - 1||now_user==1&&index==0"></span></p>
</div>
</div>
</div>
</div>
<div class="case_box">
<div class="data_asy">
<p style="margin-top:20px;margin-bottom:10px;">数据分析中心 <img style="vertical-align:-9px;" src="../assets/imgs/home_btn_enter.png" alt=""></p>
<div class="data_charts">
<div class="data_charts_left">
<p><span></span> 服务健康状态</p>
<div :id="health"></div>
</div>
<div class="data_charts_right">
<p><span></span> 服务运营分析</p>
<div :id="yy_asy"></div>
</div>
</div>
</div>
<div class="online_tool"></div>
</div>
</div>
</template>
<script>
export default {
data(){
return{
person:'康先生',
login_time:'2020-03-12 10:21:22',
now_user:0,
health:'',
yy_asy:"",
menu_arr:[
[
{
text:'服务总数',
pic:require('../assets/imgs/ic_fuwuzs_navy.png'),
bg:'#e6ebfe',
color:'#515fe7',
num:'12,332',
},
{
text:'应用总数',
pic:require('../assets/imgs/ic_yingyongzs.png'),
bg:'#e5f4fe',
color:'#38aef9',
num:'223',
},
{
text:'收益总额',
pic:require('../assets/imgs/ic_shouyize.png'),
bg:'#fcefd6',
color:'#ea7d19',
num:'¥2,312',
},
],
[
{
text:'收益总额',
pic:require('../assets/imgs/ic_shouyize.png'),
bg:'#fcefd6',
color:'#ea7d19',
num:'¥2,312',
},
{
text:'服务总数',
pic:require('../assets/imgs/ic_fuwuzs_navy.png'),
bg:'#e6ebfe',
color:'#515fe7',
num:'12,332',
},
{
text:'应用总数',
pic:require('../assets/imgs/ic_yingyongzs.png'),
bg:'#e5f4fe',
color:'#38aef9',
num:'223',
},
{
text:'收益总额',
pic:require('../assets/imgs/ic_shouyize.png'),
bg:'#fcefd6',
color:'#ea7d19',
num:'¥2,312',
},
],
],
}
}
}
</script>
<style scoped>
.person_info{
width: 1200px;
height: 206px;
background-color: #ffffff;
box-shadow: 0px 3px 6px 0px
#f4f7fc;
border-radius: 12px;
padding: 20px;
}
.preson{
width: 100%;
height: 52px;
line-height: 52px;
border-bottom: 2px solid #f4f7fc;
}
.person_text{
float: left;
padding: 0 10px;
}
.person_text img{
border-radius: 18px;
margin-right: 10px;
vertical-align: -10px;
}
.person_menu{
float: right;
width: 100px;
height: 32px;
line-height: 32px;
text-align: center;
background-color: #e56600;
border-radius: 8px;
color: #fff;
cursor: pointer;
margin-top: 10px;
}
.menu{
width: 100%;
height: 102px;
margin-top: 20px;
}
.menu_box0,.menu_box1{
float: left;
width: calc((100% - 60px)/3);
margin-right: 30px;
width: 366px;
height: 92px;
background-color: #e6ebfe;
border-radius: 12px 12px 12px 46px;
}
.menu_box0:nth-last-of-type(1),.menu_box1:nth-last-of-type(1){
margin-right: 0px;
}
.menu_box1{
width: calc((100% - 60px)/4);
margin-right: 20px;
}
.menu img{
float: left;
margin: 28px 0 0 28px;
}
.menu .menu_text{
float: right;
margin-top: 15px;
margin-right: 29px;
}
.menu_text p{
text-align: right;
}
.case_box{
width: 100%;
overflow: hidden;
}
.data_asy{
width: 720px;
float: left;
margin-right: 20px;
}
.data_charts{
width: 720px;
height: 270px;
background-color: #ffffff;
box-shadow: 0px 3px 6px 0px
#f4f7fc;
border-radius: 12px;
padding: 20px;
}
.data_charts_left{
height: 100%;
width: 220px;
float: left;
}
.data_charts_right{
height: 100%;
width: 420px;
float: right;
}
.data_charts_left p,.data_charts_right p{
font-size: 16px;
color: #707693;
}
.data_charts_left p span,.data_charts_right p span{
width: 8px;
height: 8px;
background-color: #515fe7;
border-radius: 4px;
display: inline-block;
margin-right: 5px;
}
</style>
\ No newline at end of file
......@@ -2,7 +2,7 @@ import Vue from "vue";
import Router from "vue-router";
import Index from "@/pages/index";
import workPlace from "@/pages/workPlace"
Vue.use(Router);
export default new Router({
......@@ -15,11 +15,19 @@ export default new Router({
path: "/index",
name: "index",
component: Index,
redirect: "/workplace",
children:[{
path: "/workplace",
name: "workPlace",
component: workPlace,
}]
},
{
path: "/table_example", // 表格实例
name: "table_example",
component: () => import("@/pages/table_example")
},
]
});
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