Commit ae083634d0f326f2847c0e94dad305fc5be4c847

Authored by Andy
2 parents 7636c7d7 50b9599a

Merge branch 'test' of http://gitlab.renniting.cn/web_developers/lzsandtable into test

index.html
... ... @@ -5,7 +5,7 @@
5 5 <meta name="viewport" content="width=device-width,initial-scale=1.0">
6 6 <title>兰州沙盘</title>
7 7 <link rel="shortcut icon" type="image/x-icon" href="static/favicon.ico">
8   - <link rel="stylesheet" href="src/style/reset.css" >
  8 + <link href="src/style/reset.css" rel="stylesheet" type="text/css" />
9 9 <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=cuMSxNl5LOY6sf1M3nDGtG6tGXl5a0Bb"></script>
10 10 </head>
11 11 <body>
... ...
src/components/VHeader.vue
1 1 <template>
2 2 <header class="header-wrap">
3 3 <span>车场实时概况</span>
  4 + <div class="header-time">
  5 + <p>{{headerDay}}</p>
  6 + <p>{{headerTime}}</p>
  7 + </div>
4 8 </header>
5 9 </template>
6 10  
7 11 <script>
  12 +import { formateTime, formateday } from "../utils/formate";
  13 +
8 14 export default {
9 15 name: 'VHeader',
10   -
  16 + data() {
  17 + return {
  18 + headerDay: formateday(),
  19 + headerTime: formateTime(),
  20 + }
  21 + }
11 22 }
12 23 </script>
13 24  
14   -<style scoped>
  25 +<style scoped lang="scss">
15 26 header {
16 27 height: 65px;
17   - line-height: 65px;
18 28 text-align: center;
19   - font-size: 32px;
  29 + position: relative;
20 30 background-image: url("../images/header/headerbg.png");
21 31 background-repeat: no-repeat;
22 32 background-position: center center;
23   -
  33 + >span{
  34 + font-size: 32px;
  35 + line-height: 75px;
  36 + }
  37 + .header-time{
  38 + width: 128px;
  39 + height: 35px;
  40 + line-height: 18px;
  41 + position: absolute;
  42 + right: 10px;
  43 + top:16px;
  44 + padding-left: 45px;
  45 + text-align: left;
  46 + background:url("../images/header/headertime.png") no-repeat 0 center;
  47 + background-size: 35px 35px;
  48 + }
24 49 }
25 50 </style>
... ...
src/images/content/frame-wrap.png 0 → 100644

1.11 KB

src/images/header/headertime.png 0 → 100644

3.25 KB

src/utils/formate.js 0 → 100644
  1 +function formateday() {
  2 + let date = new Date()
  3 + let str = ''
  4 + let year = date.getFullYear()
  5 + let month = date.getMonth()+1<10? "0"+ (date.getMonth()+1) : date.getMonth()+1
  6 + let day = date.getDate()<10 ? "0"+date.getDate() : date.getDate
  7 + str = year +"-"+ month +"-"+ day
  8 + return str
  9 +}
  10 +
  11 +function formateTime() {
  12 + let date = new Date()
  13 + let str = ''
  14 + let hours = date.getHours()<10? "0"+date.getHours() : date.getHours()
  15 + let minutes=date.getMinutes()<10 ? "0"+date.getMinutes() : date.getMinutes();
  16 + let seconds=date.getSeconds()<10 ? "0"+date.getSeconds() : date.getSeconds();
  17 +
  18 + str = hours+":"+minutes+":"+seconds
  19 + return str
  20 +}
  21 +
  22 +export { formateday, formateTime }
... ...
src/view/VHome.vue
... ... @@ -2,11 +2,19 @@
2 2 <div class="main-content">
3 3 <v-header></v-header>
4 4 <ul class="main-wrap">
5   - <li class="main-left">left</li>
  5 + <li class="main-left">
  6 + <div class="frame-wrap"></div>
  7 + <div class="frame-wrap frame-wrap-center"></div>
  8 + <div class="frame-wrap"></div>
  9 + </li>
6 10 <li class="main-center">
7 11 <v-map></v-map>
8 12 </li>
9   - <li class="main-right">right</li>
  13 + <li class="main-right">
  14 + <div class="frame-wrap"></div>
  15 + <div class="frame-wrap frame-wrap-center"></div>
  16 + <div class="frame-wrap"></div>
  17 + </li>
10 18 </ul>
11 19 </div>
12 20 </template>
... ... @@ -37,7 +45,6 @@ export default {
37 45 }
38 46 }
39 47 .main-left,.main-right{
40   - background-color: #ccc;
41 48 width: 25%;
42 49 }
43 50 .main-center{
... ... @@ -45,5 +52,16 @@ export default {
45 52 margin: 0 10px;
46 53 border:1px solid #1679de;
47 54 }
  55 + .frame-wrap-center{
  56 + margin: 10px 0;
  57 + }
  58 + .frame-wrap{
  59 + height: calc((100% - 20px)/3);
  60 + border-image-source: url("../images/content/frame-wrap.png");
  61 + border-image-slice: 10 16 15 10 fill;
  62 + border-width: 10px 16px 15px 10px;
  63 + border-style: solid;
  64 + background-clip: border-box;
  65 + }
48 66  
49 67 </style>
... ...