Эх сурвалжийг харах

新增index 2,3,4 自动轮播效果

zhbyyy 2 жил өмнө
parent
commit
0b2fca2dfe

+ 5 - 4
manpower/index2.html

@@ -19,14 +19,14 @@
   <script src="./libs/lodash.min.js"></script>
   <script src="./js/request.js"></script>
   <script src="./js/data2.js"></script>
+  <script src="./libs/echarts-tooltip-carousel.js"></script>
 </head>
 
 <body>
   <div id="app">
     <header class="my-header">
-      <span class="left" @click="handleGoBack"><img
-        style="width: 70px;height: 70px;"
-        src="./images/back.png"></img> </span>
+      <span class="left" @click="handleGoBack"><img style="width: 70px;height: 70px;" src="./images/back.png"></img>
+      </span>
       <span>晋能控股</span>
       <span class="right">{{time}}</span>
     </header>
@@ -219,7 +219,8 @@
       </div>
     </div>
     <div class="footer">
-      <a class="item" v-for="(item,index) in companyList" :key="index" @click="handleGoPage(item.link)">{{item.name}}</a>
+      <a class="item" v-for="(item,index) in companyList" :key="index"
+        @click="handleGoPage(item.link)">{{item.name}}</a>
     </div>
   </div>
   <script src="./js/index2.js"></script>

+ 5 - 4
manpower/index3.html

@@ -18,14 +18,14 @@
   <script src="./libs/lodash.min.js"></script>
   <script src="./js/request.js"></script>
   <script src="./js/data3.js"></script>
+  <script src="./libs/echarts-tooltip-carousel.js"></script>
 </head>
 
 <body>
   <div id="app">
     <header class="my-header">
-      <span class="left" @click="handleGoBack"><img
-        style="width: 70px;height: 70px;"
-        src="./images/back.png"></img> </span>
+      <span class="left" @click="handleGoBack"><img style="width: 70px;height: 70px;" src="./images/back.png"></img>
+      </span>
       <span>山西煤炭运销集团长治有限公司</span>
       <span class="right">{{time}}</span>
     </header>
@@ -218,7 +218,8 @@
       </div>
     </div>
     <div class="footer" style="width: 70%;">
-      <a class="item" v-for="(item,index) in companyList" :key="index" @click="handleGoPage(item.link)">{{item.name}}</a>
+      <a class="item" v-for="(item,index) in companyList" :key="index"
+        @click="handleGoPage(item.link)">{{item.name}}</a>
     </div>
   </div>
   <script src="./js/index3.js"></script>

+ 3 - 3
manpower/index4.html

@@ -18,14 +18,14 @@
   <script src="./libs/lodash.min.js"></script>
   <script src="./js/request.js"></script>
   <script src="./js/data4.js"></script>
+  <script src="./libs/echarts-tooltip-carousel.js"></script>
 </head>
 
 <body>
   <div id="app">
     <header class="my-header">
-      <span class="left" @click="handleGoBack"><img
-        style="width: 70px;height: 70px;"
-        src="./images/back.png"></img> </span>
+      <span class="left" @click="handleGoBack"><img style="width: 70px;height: 70px;" src="./images/back.png"></img>
+      </span>
       <span>山西三元煤业股份有限公司</span>
       <span class="right">{{time}}</span>
     </header>

+ 21 - 13
manpower/js/index2.js

@@ -161,10 +161,10 @@ let app = new Vue({
     }
   },
   methods: {
-    handleGoPage(url){
+    handleGoPage (url) {
       window.location.href = url
     },
-    handleGoBack(){
+    handleGoBack () {
       window.history.go(-1)
     },
     numFormat (value) {
@@ -379,7 +379,7 @@ let app = new Vue({
       option.legend.show = true
       option.tooltip = {
         trigger: 'axis',
-        formatter: '{a0}:{c0}' +'<br/>'+ '{a1}:{c1}' + '%'
+        formatter: '{a0}:{c0}' + '<br/>' + '{a1}:{c1}' + '%'
       }
       option.yAxis.push({
         type: 'value',
@@ -455,7 +455,7 @@ let app = new Vue({
       option.legend.show = true
       option.tooltip = {
         trigger: 'axis',
-        formatter: '{a0}:{c0}' +'<br/>'+ '{a1}:{c1}' + '%'
+        formatter: '{a0}:{c0}' + '<br/>' + '{a1}:{c1}' + '%'
       }
       option.yAxis.push({
         type: 'value',
@@ -573,9 +573,9 @@ let app = new Vue({
       option.legend.show = true
       option.tooltip = {
         trigger: 'axis',
-        formatter: '{a0}:{c0}'+ '%' +'<br/>'+ '{a1}:{c1}' + '%'
+        formatter: '{a0}:{c0}' + '%' + '<br/>' + '{a1}:{c1}' + '%'
       }
-      option.yAxis= [
+      option.yAxis = [
         {
           type: 'value',
           axisLine: {
@@ -667,9 +667,9 @@ let app = new Vue({
       option.legend.show = true
       option.tooltip = {
         trigger: 'axis',
-        formatter: '{a0}:{c0}'+ '%' +'<br/>'+ '{a1}:{c1}' + '%'
+        formatter: '{a0}:{c0}' + '%' + '<br/>' + '{a1}:{c1}' + '%'
       }
-      option.yAxis= [
+      option.yAxis = [
         {
           type: 'value',
           axisLine: {
@@ -792,7 +792,7 @@ let app = new Vue({
       option.legend.show = true
       option.tooltip = {
         trigger: 'axis',
-        formatter: '{a0}:{c0}' +'<br/>'+ '{a1}:{c1}' + '%'
+        formatter: '{a0}:{c0}' + '<br/>' + '{a1}:{c1}' + '%'
       }
       option.yAxis.push({
         type: 'value',
@@ -811,6 +811,10 @@ let app = new Vue({
         },
       })
       myChart.setOption(option)
+      tools.loopShowTooltip(myChart, option, {
+        nterval: 2000,
+        loopSeries: true,
+      });
     },
     initChartC2 () {
       let myChart = echarts.init(this.$refs['echartC2'])
@@ -839,7 +843,7 @@ let app = new Vue({
               width: 2,
             },
             data: dataC2[0],
-            
+
           },
           {
             name: '人工成本利润率',
@@ -899,7 +903,7 @@ let app = new Vue({
       option.legend.show = true
       option.tooltip = {
         trigger: 'axis',
-        formatter: '{a0}:{c0}' + '%' +'<br/>'+ '{a1}:{c1}' + '%'
+        formatter: '{a0}:{c0}' + '%' + '<br/>' + '{a1}:{c1}' + '%'
       }
       option.grid.right = '15%'
       option.yAxis = [
@@ -935,6 +939,10 @@ let app = new Vue({
         }
       ]
       myChart.setOption(option)
+      tools.loopShowTooltip(myChart, option, {
+        nterval: 2000,
+        loopSeries: true,
+      });
     },
     // 右侧图表---------------------------------------------开始
     initChartR1 () {
@@ -1270,7 +1278,7 @@ let app = new Vue({
         ],
       }
       option.title.text = '各二级企业在岗职工平均薪酬'
-      option.legend.data = ['去年同期在岗职工平均薪酬', '在岗职工平均薪酬' ]
+      option.legend.data = ['去年同期在岗职工平均薪酬', '在岗职工平均薪酬']
       option.legend.show = true
       option.yAxis.push({
         type: 'value',
@@ -1344,7 +1352,7 @@ let app = new Vue({
       option.legend.data = ['2022年利润累计涨幅率', '2022年薪酬累计涨幅率']
       option.tooltip = {
         trigger: 'axis',
-        formatter: '{a0}:{c0}' + '%' +'<br/>'+ '{a1}:{c1}' + '%'
+        formatter: '{a0}:{c0}' + '%' + '<br/>' + '{a1}:{c1}' + '%'
       }
       option.yAxis = [
         {

+ 18 - 10
manpower/js/index3.js

@@ -161,10 +161,10 @@ let app = new Vue({
     }
   },
   methods: {
-    handleGoPage(url){
+    handleGoPage (url) {
       window.location.href = url
     },
-    handleGoBack(){
+    handleGoBack () {
       window.history.go(-1)
     },
     numFormat (value) {
@@ -379,7 +379,7 @@ let app = new Vue({
       option.legend.show = true
       option.tooltip = {
         trigger: 'axis',
-        formatter: '{a0}:{c0}' +'<br/>'+ '{a1}:{c1}' + '%'
+        formatter: '{a0}:{c0}' + '<br/>' + '{a1}:{c1}' + '%'
       }
       option.yAxis.push({
         max: 20,
@@ -455,7 +455,7 @@ let app = new Vue({
       option.legend.show = true
       option.tooltip = {
         trigger: 'axis',
-        formatter: '{a0}:{c0}' +'<br/>'+ '{a1}:{c1}' + '%'
+        formatter: '{a0}:{c0}' + '<br/>' + '{a1}:{c1}' + '%'
       }
       option.yAxis.push({
         type: 'value',
@@ -572,7 +572,7 @@ let app = new Vue({
       option.legend.show = true
       option.tooltip = {
         trigger: 'axis',
-        formatter: '{a0}:{c0}' + '%' +'<br/>'+ '{a1}:{c1}' + '%'
+        formatter: '{a0}:{c0}' + '%' + '<br/>' + '{a1}:{c1}' + '%'
       }
       option.yAxis = [
         {
@@ -666,7 +666,7 @@ let app = new Vue({
       option.legend.show = true
       option.tooltip = {
         trigger: 'axis',
-        formatter: '{a0}:{c0}' + '%' +'<br/>'+ '{a1}:{c1}' + '%'
+        formatter: '{a0}:{c0}' + '%' + '<br/>' + '{a1}:{c1}' + '%'
       }
       option.yAxis = [
         {
@@ -792,7 +792,7 @@ let app = new Vue({
       option.legend.show = true
       option.tooltip = {
         trigger: 'axis',
-        formatter: '{a0}:{c0}' +'<br/>'+ '{a1}:{c1}' + '%'
+        formatter: '{a0}:{c0}' + '<br/>' + '{a1}:{c1}' + '%'
       }
       option.yAxis.push({
         type: 'value',
@@ -811,6 +811,10 @@ let app = new Vue({
         },
       })
       myChart.setOption(option)
+      tools.loopShowTooltip(myChart, option, {
+        nterval: 2000,
+        loopSeries: true,
+      });
     },
     initChartC2 () {
       let myChart = echarts.init(this.$refs['echartC2'])
@@ -839,7 +843,7 @@ let app = new Vue({
               width: 2,
             },
             data: dataC2[0],
-            
+
           },
           {
             name: '人工成本利润率',
@@ -899,7 +903,7 @@ let app = new Vue({
       option.legend.show = true
       option.tooltip = {
         trigger: 'axis',
-        formatter: '{a0}:{c0}' +'<br/>'+ '{a1}:{c1}' + '%'
+        formatter: '{a0}:{c0}' + '<br/>' + '{a1}:{c1}' + '%'
       }
       option.grid.right = '15%'
       option.yAxis = [
@@ -935,6 +939,10 @@ let app = new Vue({
         }
       ]
       myChart.setOption(option)
+      tools.loopShowTooltip(myChart, option, {
+        nterval: 2000,
+        loopSeries: true,
+      });
     },
     // 右侧图表---------------------------------------------开始
     initChartR1 () {
@@ -1333,7 +1341,7 @@ let app = new Vue({
       option.legend.data = ['2022年利润累计涨幅率', '2022年薪酬累计涨幅率']
       option.tooltip = {
         trigger: 'axis',
-        formatter: '{a0}:{c0}' + '%' +'<br/>'+ '{a1}:{c1}' + '%'
+        formatter: '{a0}:{c0}' + '%' + '<br/>' + '{a1}:{c1}' + '%'
       }
       option.yAxis = [
         {

+ 18 - 10
manpower/js/index4.js

@@ -161,10 +161,10 @@ let app = new Vue({
     }
   },
   methods: {
-    handleGoPage(url){
+    handleGoPage (url) {
       window.location.href = url
     },
-    handleGoBack(){
+    handleGoBack () {
       window.history.go(-1)
     },
     numFormat (value) {
@@ -379,7 +379,7 @@ let app = new Vue({
       option.legend.show = true
       option.tooltip = {
         trigger: 'axis',
-        formatter: '{a0}:{c0}' +'<br/>'+ '{a1}:{c1}' + '%'
+        formatter: '{a0}:{c0}' + '<br/>' + '{a1}:{c1}' + '%'
       }
       option.yAxis.push({
         max: 20,
@@ -455,7 +455,7 @@ let app = new Vue({
       option.legend.show = true
       option.tooltip = {
         trigger: 'axis',
-        formatter: '{a0}:{c0}' +'<br/>'+ '{a1}:{c1}' + '%'
+        formatter: '{a0}:{c0}' + '<br/>' + '{a1}:{c1}' + '%'
       }
       option.yAxis.push({
         type: 'value',
@@ -572,7 +572,7 @@ let app = new Vue({
       option.legend.show = true
       option.tooltip = {
         trigger: 'axis',
-        formatter: '{a0}:{c0}' + '%' +'<br/>'+ '{a1}:{c1}' + '%'
+        formatter: '{a0}:{c0}' + '%' + '<br/>' + '{a1}:{c1}' + '%'
       }
       option.yAxis = [
         {
@@ -666,7 +666,7 @@ let app = new Vue({
       option.legend.show = true
       option.tooltip = {
         trigger: 'axis',
-        formatter: '{a0}:{c0}' + '%' +'<br/>'+ '{a1}:{c1}' + '%'
+        formatter: '{a0}:{c0}' + '%' + '<br/>' + '{a1}:{c1}' + '%'
       }
       option.yAxis = [
         {
@@ -793,7 +793,7 @@ let app = new Vue({
       option.legend.show = true
       option.tooltip = {
         trigger: 'axis',
-        formatter: '{a0}:{c0}' + '%' +'<br/>'+ '{a1}:{c1}' + '%'
+        formatter: '{a0}:{c0}' + '%' + '<br/>' + '{a1}:{c1}' + '%'
       }
       option.yAxis.push({
         type: 'value',
@@ -812,6 +812,10 @@ let app = new Vue({
         },
       })
       myChart.setOption(option)
+      tools.loopShowTooltip(myChart, option, {
+        nterval: 2000,
+        loopSeries: true,
+      });
     },
     initChartC2 () {
       let myChart = echarts.init(this.$refs['echartC2'])
@@ -840,7 +844,7 @@ let app = new Vue({
               width: 2,
             },
             data: dataC2[0],
-            
+
           },
           {
             name: '人工成本利润率',
@@ -900,7 +904,7 @@ let app = new Vue({
       option.legend.show = true
       option.tooltip = {
         trigger: 'axis',
-        formatter: '{a0}:{c0}' +'<br/>'+ '{a1}:{c1}' + '%'
+        formatter: '{a0}:{c0}' + '<br/>' + '{a1}:{c1}' + '%'
       }
       option.grid.right = '15%'
       option.yAxis = [
@@ -936,6 +940,10 @@ let app = new Vue({
         }
       ]
       myChart.setOption(option)
+      tools.loopShowTooltip(myChart, option, {
+        nterval: 2000,
+        loopSeries: true,
+      });
     },
     // 右侧图表---------------------------------------------开始
     initChartR1 () {
@@ -1341,7 +1349,7 @@ let app = new Vue({
       option.legend.data = ['2022年利润累计涨幅率', '2022年薪酬累计涨幅率']
       option.tooltip = {
         trigger: 'axis',
-        formatter: '{a0}:{c0}' + '%' +'<br/>'+ '{a1}:{c1}' + '%'
+        formatter: '{a0}:{c0}' + '%' + '<br/>' + '{a1}:{c1}' + '%'
       }
       option.yAxis = [
         {