Bladeren bron

消息中心气泡提示、消息中心页面

Reiskuchen 5 jaren geleden
bovenliggende
commit
379879e6a3
4 gewijzigde bestanden met toevoegingen van 121 en 94 verwijderingen
  1. 90 78
      ys_vue/index.html
  2. 24 11
      ys_vue/src/views/Home.vue
  3. 1 1
      ys_vue/src/views/detection/detection.vue
  4. 6 4
      ys_vue/src/views/message.vue

+ 90 - 78
ys_vue/index.html

@@ -1,87 +1,99 @@
 <!DOCTYPE html>
 <html>
-    <head>
-        <meta charset="utf-8">
-        <title>云塑网后台管理系统</title>
-        <!-- 高德地图 -->
-        <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=362cff852a3a37d328f9697352eebacd"></script>
-        <style>
-            /* 地图弹窗样式 */
-            .window {
-                background: #fff;
-                padding: 0px 0px 10px;
-                border:1px solid silver;
-                border-radius: 5px;
-            }
 
-            .info-top {
-                position: relative;
-                background: none repeat scroll 0 0 #F9F9F9;
-                border-bottom: 1px solid #CCC;
-                border-radius: 5px 5px 0 0;
-            }
+<head>
+    <meta charset="utf-8">
+    <title>云塑网后台管理系统</title>
+    <!-- 高德地图 -->
+    <script type="text/javascript"
+        src="https://webapi.amap.com/maps?v=1.4.15&key=362cff852a3a37d328f9697352eebacd"></script>
+    <style>
+        /* 地图弹窗样式 */
+        .window {
+            background: #fff;
+            padding: 0px 0px 10px;
+            border: 1px solid silver;
+            border-radius: 5px;
+        }
 
-            div.info-top div {
-                display: inline-block;
-                color: #333333;
-                font-size: 14px;
-                font-weight: bold;
-                line-height: 31px;
-                padding: 0 10px;
-            }
+        .info-top {
+            position: relative;
+            background: none repeat scroll 0 0 #F9F9F9;
+            border-bottom: 1px solid #CCC;
+            border-radius: 5px 5px 0 0;
+        }
 
-            div.info-top div span {
-                font-size:11px;
-                color:#F00;
-            }
+        div.info-top div {
+            display: inline-block;
+            color: #333333;
+            font-size: 14px;
+            font-weight: bold;
+            line-height: 31px;
+            padding: 0 10px;
+        }
 
-            div.info-top i {
-                position: absolute;
-                top: 10px;
-                right: 10px;
-                transition-duration: 0.25s;
-                cursor: pointer;
-            }
+        div.info-top div span {
+            font-size: 11px;
+            color: #F00;
+        }
 
-            div.info-middle {
-                font-size: 12px;
-                padding: 10px 6px;
-                line-height: 20px;
-                background-color: #fff;
-            }
-            
-            .customWidth {
-                width: 675px!important;
-            }
+        div.info-top i {
+            position: absolute;
+            top: 10px;
+            right: 10px;
+            transition-duration: 0.25s;
+            cursor: pointer;
+        }
+
+        div.info-middle {
+            font-size: 12px;
+            padding: 10px 6px;
+            line-height: 20px;
+            background-color: #fff;
+        }
+
+        .customWidth {
+            width: 675px !important;
+        }
+
+        /* 滚动条样式修改 */
+        /*滚动条凹槽的颜色,还可以设置边框属性 */
+        ::-webkit-scrollbar-track-piece {
+            background-color: #f8f8f8;
+            -webkit-border-radius: 2em;
+            -moz-border-radius: 2em;
+            border-radius: 2em;
+        }
+
+        /*滚动条的宽度*/
+        ::-webkit-scrollbar {
+            width: 9px;
+        }
+
+        /*滚动条的设置*/
+        ::-webkit-scrollbar-thumb {
+            background-color: #dddddd;
+            background-clip: padding-box;
+            -webkit-border-radius: 2em;
+            -moz-border-radius: 2em;
+            border-radius: 2em;
+        }
+
+        /*滚动条鼠标移上去*/
+        ::-webkit-scrollbar-thumb:hover {
+            background-color: #bbb;
+        }
+
+        /*取消消息列表弹出框的内边距*/
+        .popover-self {
+            padding: 0 !important;
+        }
+    </style>
+</head>
+
+<body>
+    <div id="app"></div>
+    <!-- built files will be auto injected -->
+</body>
 
-            /* 滚动条样式修改 */
-            /*滚动条凹槽的颜色,还可以设置边框属性 */
-            ::-webkit-scrollbar-track-piece {
-                background-color:#f8f8f8;
-                -webkit-border-radius: 2em;
-                -moz-border-radius: 2em;
-                border-radius: 2em;
-            }
-            /*滚动条的宽度*/
-            ::-webkit-scrollbar {
-                width:9px;
-            }
-            /*滚动条的设置*/
-            ::-webkit-scrollbar-thumb {
-                background-color:#dddddd;
-                background-clip:padding-box;
-                -webkit-border-radius: 2em;
-                -moz-border-radius: 2em;
-                border-radius: 2em;
-            }
-            /*滚动条鼠标移上去*/
-            ::-webkit-scrollbar-thumb:hover {
-                background-color:#bbb;
-            }
-        </style>
-    </head>
-    <body>
-        <div id="app"></div>
-        <!-- built files will be auto injected -->
-    </body>
 </html>

+ 24 - 11
ys_vue/src/views/Home.vue

@@ -15,7 +15,13 @@
         <el-badge is-dot class="itemNew">
           <i class="el-icon-message-solid" style="font-size:24px" v-popover:popover1></i>
           <!-- 消息中心 -->
-          <el-popover ref="popover1" placement="bottom" width="400" trigger="hover">
+          <el-popover
+            ref="popover1"
+            placement="bottom"
+            width="400"
+            trigger="hover"
+            popper-class="popover-self"
+          >
             <div class="popover-main">消息盒子</div>
             <div class="popover-item" v-for="item in popoverData">
               <p class="popover-title">
@@ -24,7 +30,7 @@
               </p>
               <p>{{item.article}}</p>
             </div>
-              <router-link :to="'/message'" tag="div" class="popover-button">查看全部</router-link>
+            <router-link :to="'/message'" tag="div" class="popover-button">查看全部</router-link>
           </el-popover>
         </el-badge>
         <el-dropdown trigger="hover">
@@ -424,22 +430,29 @@ export default {
 
 .popover-main {
   font-weight: 700;
-  padding-bottom: 12px;
-  border-bottom: 1px grey solid;
+  padding: 10px;
+  border-bottom: 1px #CCC solid;
+}
+.popover-item {
+  padding: 10px;
+  border-bottom: 1px #CCC solid;
+}
+.popover-item>p {
+  margin: 0;
+  line-height: 18px;
 }
 .popover-title {
-  color: blue;
+  color: #409EFF;
+  padding-bottom: 8px;
 }
 .popover-type {
-  color: black;
+  color: #AAA;
+  font-size: 8px;
   float: right;
 }
-.popover-item {
-  border-bottom: 1px grey solid;
-}
 .popover-button {
-  font-weight: 700;
-  padding-top: 12px;
+  font-weight: 900;
+  padding: 10px;
   text-align: center;
 }
 </style>

+ 1 - 1
ys_vue/src/views/detection/detection.vue

@@ -37,7 +37,7 @@
       <el-table-column prop="area" label="位置" width="200" sortable></el-table-column>
       <el-table-column prop="runTimes" label="运行次数" width="100" sortable></el-table-column>
       <el-table-column prop="ocCycle" label="每模平均周期" width="140" sortable></el-table-column>
-      <el-table-column label="电量" width="80" sortable></el-table-column>
+      <el-table-column prop="hillNumber" label="电量" width="80" sortable></el-table-column>
       <el-table-column prop="state" label="当前状态" width="100" sortable></el-table-column>
       <el-table-column label="模具保养" width="100">
         <template slot-scope="scope">

+ 6 - 4
ys_vue/src/views/message.vue

@@ -15,7 +15,7 @@
         <span class="message-title">{{item.title}}</span>
         <span class="message-time">{{item.time}}</span>
       </p>
-      <p>{{item.article}}</p>
+      <p class="message-article">{{item.article}}</p>
     </div>
   </section>
 </template>
@@ -62,13 +62,15 @@ export default {
   margin: 0;
 }
 .message-type {
-  font-weight: 800;
+  font-weight: 700;
 }
 .message-title {
-  font-weight: 800;
 }
 .message-time {
   padding-left: 30px;
-  color: grey;
+  color: #777;
+}
+.message-article {
+  color: #555;
 }
 </style>