Annie há 3 semanas atrás
pai
commit
a2203beca6

BIN
dist.zip


+ 10 - 2
src/views/dashboard/DailyOutput.vue

@@ -9,8 +9,8 @@
     <div class="wrap" ref="editor">
       <div class="sn-container"> 
         <div class="sn-content"> 
-          <div class="sn-title">{{ time }} <span style="color:#ff9829">{{ name }}</span> 每日产量</div> 
-          <div class="sn-body"> 
+          <div class="sn-title" @click="goHome">{{ time }} <span style="color:#ff9829">{{ name }}</span> 每日产量</div> 
+          <div class="sn-body">
             <div class="chartsdom" id="chart_ptrend"></div>
           </div>
         </div>
@@ -42,6 +42,14 @@ export default {
   },
 
   methods: {
+    goHome() {
+      if (process.env.NODE_ENV === 'production') {
+        this.$router.push({ path: '/admin/index' });
+      } else {
+        this.$router.push({ path: '/' });
+      }
+    },
+
     /** 初始化图表 */
     async initChart() {
       try {

+ 8 - 1
src/views/dashboard/DailyPerOutput.vue

@@ -9,7 +9,7 @@
       <div class="wrap" ref="editor">
         <div class="wrap-container sn-container sn-container-top"> 
           <div class="sn-content"> 
-            <div class="sn-title">{{ time }} <span style="color:#ff9829">{{ name }}</span> 日人均产出</div> 
+            <div class="sn-title" @click="goHome">{{ time }} <span style="color:#ff9829">{{ name }}</span> 日人均产出</div> 
             <div class="sn-body"> 
               <div class="wrap-container"> 
                 <div class="chartsdom" id="chart_work"></div>
@@ -56,6 +56,13 @@
   },
   //s
   methods: {
+    goHome() {
+      if (process.env.NODE_ENV === 'production') {
+        this.$router.push({ path: '/admin/index' });
+      } else {
+        this.$router.push({ path: '/' });
+      }
+    },
     async initChart() {
       try {
         await this.getData();

+ 10 - 1
src/views/dashboard/MonthTotal.vue

@@ -9,7 +9,7 @@
   	<div class="wrap" ref="editor">
       <div class="wrap-container sn-container"> 
           <div class="sn-content"> 
-              <div class="sn-title">{{ time }}(截止至{{ date }})<span style="color:#ff9829">{{ name }} </span></div> 
+              <div class="sn-title" @click="goHome">{{ time }}(截止至{{ date }})<span style="color:#ff9829">{{ name }} </span></div> 
               <div class="sn-body"> 
               <div class="wrap-container">
                   <div class="map">
@@ -69,6 +69,13 @@ export default {
     screenSize(this.$refs.editor);
   },
   methods: {
+    goHome() {
+      if (process.env.NODE_ENV === 'production') {
+        this.$router.push({ path: '/admin/index' });
+      } else {
+        this.$router.push({ path: '/' });
+      }
+    },
     timeFormate(timeStamp) { //显示当前时间
         let newDate = new Date(timeStamp);
         let year = newDate.getFullYear();
@@ -137,6 +144,8 @@ export default {
       height: 95%;
   }
   .sn-title {
+    z-index: 99999;
+    cursor: pointer;
     position: absolute;
     height: 50px;
     font-size: 50px;

+ 9 - 1
src/views/dashboard/PassRate.vue

@@ -9,7 +9,7 @@
         <div class="wrap" ref="editor">
             <div class="wrap-container sn-container"> 
                 <div class="sn-content"> 
-                    <div class="sn-title">{{ time }} <span style="color:#ff9829">{{ name }}</span> 每日产品合格率</div> 
+                    <div class="sn-title" @click="goHome">{{ time }} <span style="color:#ff9829">{{ name }}</span> 每日产品合格率</div> 
                     <div class="sn-body"> 
                     <div class="wrap-container"> 
                         <div class="chartsdom" id="chart_arc"></div>
@@ -45,6 +45,13 @@ mounted() {
     this.initChart();
 },
 methods: {
+    goHome() {
+      if (process.env.NODE_ENV === 'production') {
+        this.$router.push({ path: '/admin/index' });
+      } else {
+        this.$router.push({ path: '/' });
+      }
+    },
     /** 初始化图表 */
     async initChart() {
         try {
@@ -213,6 +220,7 @@ height: 91%;
 }
 
 .sn-title {
+    cursor: pointer;
     position: absolute;
     height: 50px;
     font-size: 50px;

+ 10 - 1
src/views/dashboard/Product.vue

@@ -10,7 +10,7 @@
       <div class="sn-content">
         <!-- <div class="top"></div> -->
         <header>
-          <div class="sn-title">{{ date }} <span style="color:#ff9829">智能冲裁</span> 工作情况</div>
+          <div class="sn-title" @click="goHome">{{ date }} <span style="color:#ff9829">智能冲裁</span> 工作情况</div>
         </header>
 
         <ProductList />
@@ -49,6 +49,13 @@ export default {
     this.nowTimes();
   },
   methods: {
+    goHome() {
+      if (process.env.NODE_ENV === 'production') {
+        this.$router.push({ path: '/admin/index' });
+      } else {
+        this.$router.push({ path: '/' });
+      }
+    },
     timeFormate(timeStamp) { //显示当前时间
       let newDate = new Date(timeStamp);
       let year = newDate.getFullYear();
@@ -98,6 +105,8 @@ export default {
     overflow: hidden;
 
     .sn-title {
+      z-index: 99999;
+      cursor: pointer;
       position: absolute;
       height: 50px;
       font-size: 50px;