Ming 4 年 前
コミット
8df23169bf

+ 81 - 79
package-lock.json

@@ -1807,63 +1807,6 @@
           "integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=",
           "dev": true
         },
-        "ansi-styles": {
-          "version": "4.3.0",
-          "resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz?cache=0&sync_timestamp=1618995547052&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fansi-styles%2Fdownload%2Fansi-styles-4.3.0.tgz",
-          "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.1",
-          "resolved": "https://registry.nlark.com/chalk/download/chalk-4.1.1.tgz?cache=0&sync_timestamp=1618995355917&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-4.1.1.tgz",
-          "integrity": "sha1-yAs/qyi/Y3HmhjMl7uZ+YYt35q0=",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz",
-          "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz",
-          "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=",
-          "dev": true,
-          "optional": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "resolved": "https://registry.nlark.com/has-flag/download/has-flag-4.0.0.tgz?cache=0&sync_timestamp=1618847009337&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhas-flag%2Fdownload%2Fhas-flag-4.0.0.tgz",
-          "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=",
-          "dev": true,
-          "optional": true
-        },
-        "loader-utils": {
-          "version": "2.0.0",
-          "resolved": "https://registry.npm.taobao.org/loader-utils/download/loader-utils-2.0.0.tgz",
-          "integrity": "sha1-5MrOW4FtQloWa18JfhDNErNgZLA=",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "big.js": "^5.2.2",
-            "emojis-list": "^3.0.0",
-            "json5": "^2.1.2"
-          }
-        },
         "ssri": {
           "version": "8.0.1",
           "resolved": "https://registry.npm.taobao.org/ssri/download/ssri-8.0.1.tgz?cache=0&sync_timestamp=1617826725566&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fssri%2Fdownload%2Fssri-8.0.1.tgz",
@@ -1872,28 +1815,6 @@
           "requires": {
             "minipass": "^3.1.1"
           }
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "resolved": "https://registry.nlark.com/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1622293579301&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz",
-          "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        },
-        "vue-loader-v16": {
-          "version": "npm:vue-loader@16.2.0",
-          "resolved": "https://registry.nlark.com/vue-loader/download/vue-loader-16.2.0.tgz",
-          "integrity": "sha1-BGpTMI3Ufljv4g3ewe3sAnzjtG4=",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "chalk": "^4.1.0",
-            "hash-sum": "^2.0.0",
-            "loader-utils": "^2.0.0"
-          }
         }
       }
     },
@@ -12335,6 +12256,87 @@
         }
       }
     },
+    "vue-loader-v16": {
+      "version": "npm:vue-loader@16.3.0",
+      "resolved": "https://registry.nlark.com/vue-loader/download/vue-loader-16.3.0.tgz?cache=0&sync_timestamp=1624994309035&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fvue-loader%2Fdownload%2Fvue-loader-16.3.0.tgz",
+      "integrity": "sha1-LxleS6D7DiY1ltaDDfF9Gjbok2w=",
+      "dev": true,
+      "optional": true,
+      "requires": {
+        "chalk": "^4.1.0",
+        "hash-sum": "^2.0.0",
+        "loader-utils": "^2.0.0"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "4.3.0",
+          "resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz?cache=0&sync_timestamp=1618995778321&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fansi-styles%2Fdownload%2Fansi-styles-4.3.0.tgz",
+          "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "color-convert": "^2.0.1"
+          }
+        },
+        "chalk": {
+          "version": "4.1.1",
+          "resolved": "https://registry.nlark.com/chalk/download/chalk-4.1.1.tgz?cache=0&sync_timestamp=1618995355917&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-4.1.1.tgz",
+          "integrity": "sha1-yAs/qyi/Y3HmhjMl7uZ+YYt35q0=",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "ansi-styles": "^4.1.0",
+            "supports-color": "^7.1.0"
+          }
+        },
+        "color-convert": {
+          "version": "2.0.1",
+          "resolved": "https://registry.nlark.com/color-convert/download/color-convert-2.0.1.tgz",
+          "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "color-name": "~1.1.4"
+          }
+        },
+        "color-name": {
+          "version": "1.1.4",
+          "resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz",
+          "integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=",
+          "dev": true,
+          "optional": true
+        },
+        "has-flag": {
+          "version": "4.0.0",
+          "resolved": "https://registry.nlark.com/has-flag/download/has-flag-4.0.0.tgz?cache=0&sync_timestamp=1618847009337&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhas-flag%2Fdownload%2Fhas-flag-4.0.0.tgz",
+          "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=",
+          "dev": true,
+          "optional": true
+        },
+        "loader-utils": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npm.taobao.org/loader-utils/download/loader-utils-2.0.0.tgz",
+          "integrity": "sha1-5MrOW4FtQloWa18JfhDNErNgZLA=",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "big.js": "^5.2.2",
+            "emojis-list": "^3.0.0",
+            "json5": "^2.1.2"
+          }
+        },
+        "supports-color": {
+          "version": "7.2.0",
+          "resolved": "https://registry.nlark.com/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1622293579301&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz",
+          "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "has-flag": "^4.0.0"
+          }
+        }
+      }
+    },
     "vue-router": {
       "version": "4.0.8",
       "resolved": "https://registry.nlark.com/vue-router/download/vue-router-4.0.8.tgz",

+ 321 - 11
src/assets/css/index.css

@@ -1,16 +1,326 @@
 @font-face {
     font-family: 'svgfont';
     src: url('iconfont/iconfont.eot');
-    src: url('iconfont/iconfont.eot?#iefix') format('embedded-opentype'),
-        url('iconfont/iconfont.woff2') format('woff2'),
-        url('iconfont/iconfont.woff') format('woff'),
-        url('iconfont/iconfont.ttf') format('truetype'),
-        url('iconfont/iconfont.svg#iconfont') format('svg');
+    src: url('iconfont/iconfont.eot?#iefix') format('embedded-opentype'), url('iconfont/iconfont.woff2') format('woff2'), url('iconfont/iconfont.woff') format('woff'), url('iconfont/iconfont.ttf') format('truetype'), url('iconfont/iconfont.svg#iconfont') format('svg');
 }
+
 .svgfont {
-font-family: "svgfont" !important;
-font-size: 16px;
-font-style: normal;
--webkit-font-smoothing: antialiased;
--moz-osx-font-smoothing: grayscale;
-}
+    font-family: "svgfont" !important;
+    font-size: 16px;
+    font-style: normal;
+    -webkit-font-smoothing: antialiased;
+    -moz-osx-font-smoothing: grayscale;
+}
+
+
+/* ming start */
+
+* {
+    margin: 0;
+    padding: 0;
+    box-sizing: border-box;
+}
+
+li {
+    list-style: none;
+}
+
+body {
+    font-family: Arial, Helvetica, sans-serif;
+    margin: 0;
+    padding: 0;
+    /*  背景图定位 / 背景图尺寸  cover 完全铺满容器  contain 完整显示在容器内 */
+    background: url(../images/bg.png) no-repeat #000;
+    background-size: cover;
+    /* 行高是字体1.15倍 */
+    line-height: 1.15;
+    height: 100vh;
+    min-height: 600px;
+}
+
+header {
+    position: relative;
+    /* height: 1.25rem; */
+    height: 1.125rem;
+    background: url(../images/head_bg.png) no-repeat;
+    background-position: 20% 0;
+    background-size: cover;
+}
+
+header h1 {
+    font-size: 0.475rem;
+    color: #fff;
+    text-align: center;
+    line-height: 1rem;
+}
+
+header .showTime {
+    position: absolute;
+    top: 0;
+    right: 0.375rem;
+    line-height: 0.9375rem;
+    font-size: 0.25rem;
+    color: rgba(255, 255, 255, 0.7);
+}
+
+.mainbox {
+    min-width: 1024px;
+    max-width: 1920px;
+    padding: 0.125rem 0.125rem 0;
+    height: calc(100vh - 1.125rem)
+}
+
+.mainbox .column {
+    flex: 3;
+}
+
+.topBox,
+.bottomBox {
+    display: flex;
+    position: relative;
+    width: 100%;
+}
+
+.topBox .column:nth-child(2) {
+    flex: 5;
+    margin: 0 0.125rem 0;
+    overflow: hidden;
+}
+
+.topBox {
+    height: 70%;
+    border: 1px solid red;
+}
+
+.bottomBox {
+    height: calc(30% - 0.45rem);
+    border: 1px solid pink;
+    margin-top: 0.225rem;
+}
+
+.bottomBox .column {
+    text-align: end;
+    border: 1px solid red
+}
+
+.bottomBox .column:first-child {
+    margin-right: 0.1125rem
+}
+
+.bottomBox .column:last-child {
+    margin-left: 0.1125rem
+}
+
+.panel {
+    position: relative;
+    height: 3.875rem;
+    border: 1px solid rgba(25, 186, 139, 0.17);
+    /* background: rgba(255, 255, 255, 0.04) url(../images/line\(1\).png); */
+    padding: 0 .225rem 0.5rem;
+    margin-bottom: .225rem;
+}
+
+.panel.statisTop {
+    height: 60%;
+    border: 1px solid green
+}
+
+.panel.statisBottom {
+    height: calc(100% - 60% - 0.225rem);
+    border: 1px solid blue
+}
+
+.panel.deviceSum {
+    height: 50%;
+    border: 1px solid red;
+}
+
+.panel.operStatus {
+    height: calc(50% - 0.225rem);
+    border: 1px solid red;
+}
+
+.panel::before {
+    position: absolute;
+    top: 0;
+    left: 0;
+    content: "";
+    width: 10px;
+    height: 10px;
+    border-top: 2px solid #02a6b5;
+    border-left: 2px solid #02a6b5;
+}
+
+.panel::after {
+    position: absolute;
+    top: 0;
+    right: 0;
+    content: "";
+    width: 10px;
+    height: 10px;
+    border-top: 2px solid #02a6b5;
+    border-right: 2px solid #02a6b5;
+}
+
+.panel .panel-footer {
+    position: absolute;
+    left: 0;
+    bottom: 0;
+    width: 100%;
+}
+
+.panel .panel-footer::before {
+    position: absolute;
+    bottom: 0;
+    left: 0;
+    content: "";
+    width: 10px;
+    height: 10px;
+    border-bottom: 2px solid #02a6b5;
+    border-left: 2px solid #02a6b5;
+}
+
+.panel .panel-footer::after {
+    position: absolute;
+    bottom: 0;
+    right: 0;
+    content: "";
+    width: 10px;
+    height: 10px;
+    border-bottom: 2px solid #02a6b5;
+    border-right: 2px solid #02a6b5;
+}
+
+.panel h2 {
+    height: 0.6rem;
+    line-height: 0.6rem;
+    text-align: center;
+    color: #fff;
+    font-size: 0.25rem;
+    font-weight: 400;
+}
+
+.panel h2 a {
+    margin: 0 .225rem;
+    color: #fff;
+    text-decoration: underline;
+}
+
+.panel .chart {
+    height: 3rem;
+}
+
+.no {
+    background: rgba(101, 132, 226, 0.1);
+    padding: .225rem;
+}
+
+.no .no-hd {
+    position: relative;
+    border: 1px solid rgba(25, 186, 139, 0.17);
+}
+
+.no .no-hd::before {
+    content: "";
+    position: absolute;
+    width: 30px;
+    height: 10px;
+    border-top: 2px solid #02a6b5;
+    border-left: 2px solid #02a6b5;
+    top: 0;
+    left: 0;
+}
+
+.no .no-hd::after {
+    content: "";
+    position: absolute;
+    width: 30px;
+    height: 10px;
+    border-bottom: 2px solid #02a6b5;
+    border-right: 2px solid #02a6b5;
+    right: 0;
+    bottom: 0;
+}
+
+.no .no-hd ul {
+    display: flex;
+}
+
+.no .no-hd ul li {
+    position: relative;
+    flex: 1;
+    text-align: center;
+    height: 1rem;
+    line-height: 1rem;
+    font-size: 0.875rem;
+    color: #ffeb7b;
+    padding: 0.05rem 0;
+    font-family: electronicFont;
+    font-weight: bold;
+}
+
+.no .no-hd ul li:first-child::after {
+    content: "";
+    position: absolute;
+    height: 50%;
+    width: 1px;
+    background: rgba(255, 255, 255, 0.2);
+    right: 0;
+    top: 25%;
+}
+
+.no .no-bd ul {
+    display: flex;
+}
+
+.no .no-bd ul li {
+    flex: 1;
+    height: 0.5rem;
+    line-height: 0.5rem;
+    text-align: center;
+    font-size: 0.225rem;
+    color: rgba(255, 255, 255, 0.7);
+    padding-top: 0.125rem;
+}
+
+.map {
+    width: 100%;
+    height: 100%;
+    background: url(../../assets/images/map.png);
+    background-repeat: no-repeat;
+    background-size: cover;
+    background-position: top center;
+}
+
+@keyframes rotate {
+    from {
+        transform: translate(-50%, -50%) rotate(0deg);
+    }
+    to {
+        transform: translate(-50%, -50%) rotate(360deg);
+    }
+}
+
+@keyframes rotate1 {
+    from {
+        transform: translate(-50%, -50%) rotate(0deg);
+    }
+    to {
+        transform: translate(-50%, -50%) rotate(-360deg);
+    }
+}
+
+@media screen and (max-width: 1024px) {
+    html {
+        font-size: 42px !important;
+    }
+}
+
+@media screen and (min-width: 1920) {
+    html {
+        font-size: 80px !important;
+    }
+}
+
+
+/* ming end */

BIN
src/assets/images/bg.png


BIN
src/assets/images/head_bg.png


BIN
src/assets/images/map.png


+ 43 - 0
src/assets/js/flexible.js

@@ -0,0 +1,43 @@
+(function flexible(window, document) {
+    var docEl = document.documentElement;
+    var dpr = window.devicePixelRatio || 1;
+
+    // adjust body font size
+    function setBodyFontSize() {
+        if (document.body) {
+            document.body.style.fontSize = 12 * dpr + "px";
+        } else {
+            document.addEventListener("DOMContentLoaded", setBodyFontSize);
+        }
+    }
+    setBodyFontSize();
+
+    // set 1rem = viewWidth / 10
+    function setRemUnit() {
+        var rem = docEl.clientWidth / 24;
+        docEl.style.fontSize = rem + "px";
+    }
+
+    setRemUnit();
+
+    // reset rem unit on page resize
+    window.addEventListener("resize", setRemUnit);
+    window.addEventListener("pageshow", function(e) {
+        if (e.persisted) {
+            setRemUnit();
+        }
+    });
+
+    // detect 0.5px supports
+    if (dpr >= 2) {
+        var fakeBody = document.createElement("body");
+        var testElement = document.createElement("div");
+        testElement.style.border = ".5px solid transparent";
+        fakeBody.appendChild(testElement);
+        docEl.appendChild(fakeBody);
+        if (testElement.offsetHeight === 1) {
+            docEl.classList.add("hairlines");
+        }
+        docEl.removeChild(fakeBody);
+    }
+})(window, document);

+ 17 - 0
src/main.js

@@ -11,3 +11,20 @@ app.use(router);
 app.config.globalProperties.$UCore = UCore;
 app.config.globalProperties.$axios = axios;
 app.use(Antd).mount('#app');
+
+
+//引入rem字体配置
+import '@/assets/js/flexible.js';
+
+
+
+
+
+/*路由守卫*/
+router.beforeEach((to, from, next) => {
+    /* 路由发生变化修改页面title */
+    if (to.meta.title) {
+        document.title = to.meta.title
+    }
+    next()
+})

+ 22 - 1
src/router/index.js

@@ -10,7 +10,7 @@ let routes = [
         path: '/',
         name: '/',
         component: () =>
-        import ('../views/CircuitEdit.vue'),
+            import ('../views/CircuitEdit.vue'),
     },
     // 编辑器页面
     {
@@ -25,7 +25,28 @@ let routes = [
         name: 'CircuitPreview',
         component: () =>
             import ('../views/CircuitPreview.vue'),
+    },
+
+
+
+
+
+    // ming router start
+
+    // 大屏首页
+    {
+        path: '/home/index',
+        name: 'home',
+        meta: { title: '首页看板' },
+        component: () =>
+            import ('../views/home/index.vue'),
     }
+    // ming router end
+
+
+
+
+
 
 
 ]

+ 67 - 0
src/views/home/index.vue

@@ -0,0 +1,67 @@
+<template>
+  <div>
+    <header>
+      <h1>智慧用电监控平台</h1>
+      <div class="showTime">当前时间:2020年3月17-0时54分14秒</div>
+    </header>
+    <section class="mainbox">
+      <div class="topBox">
+        <div class="column">
+          <div class="panel statisTop">
+            <h2>
+              柱状图-就业行业 <a href="javascript:;">2019</a>
+              <a href="javacript:;"> 2020</a>
+            </h2>
+            <div class="chart"></div>
+            <div class="panel-footer"></div>
+          </div>
+          <div class="panel statisBottom">
+            <h2>折线图-人员变化</h2>
+            <div class="chart"></div>
+            <div class="panel-footer"></div>
+          </div>
+          <!-- <div class="panel pie">
+          <h2>饼形图-年龄分布</h2>
+          <div class="chart"></div>
+          <div class="panel-footer"></div>
+        </div> -->
+        </div>
+        <div class="column">
+          <div class="map" style="">map</div>
+        </div>
+        <div class="column">
+          <div class="panel deviceSum">
+            <h2>柱状图-技能掌握</h2>
+            <div class="chart"></div>
+            <div class="panel-footer"></div>
+          </div>
+          <div class="panel line1 operStatus">
+            <h2>折线图-播放量</h2>
+            <div class="chart"></div>
+            <div class="panel-footer"></div>
+          </div>
+          <!-- <div class="panel pie1">
+          <h2>饼形图-地区分布</h2>
+          <div class="chart"></div>
+          <div class="panel-footer"></div>
+        </div> -->
+        </div>
+      </div>
+      <div class="bottomBox">
+        <div class="column">221</div>
+        <div class="column">21211</div>
+       
+      </div>
+    </section>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "index",
+  components: {},
+};
+</script>
+
+<style>
+</style>