Просмотр исходного кода

Merge branch 'main' of https://git.sxidc.com/kingdee_large_screen/pc_kingdee_large_screen

zhbyyy 2 лет назад
Родитель
Сommit
7c2cc83339
5 измененных файлов с 122 добавлено и 31 удалено
  1. 1 1
      manpower/js/data3.js
  2. 1 1
      manpower/js/data4.js
  3. 2 1
      manpower/js/index.js
  4. 58 13
      manpower/js/index3.js
  5. 60 15
      manpower/js/index4.js

+ 1 - 1
manpower/js/data3.js

@@ -79,7 +79,7 @@ const dataR2 = [
   [2, 4, 10, 2, 7, 6, 6, 7, 5, 2]
 ]
 const dataR3 = [
-  [30029.00, 116146.00, 213144.00, 308565.00, 105661.00, 98456.00, 87853.00, 38084.00, 8204.00, -3783.00],
+  [30029, 116146, 213144, 308565, 105661, 98456, 87853, 38084, 8204, -3783],
   [2, 4, 10, 2, 7, 6, 6, 7, 5, 2]
 ]
 const dataR4 = [

+ 1 - 1
manpower/js/data4.js

@@ -79,7 +79,7 @@ const dataR2 = [
   [0, 0, 0, 1, 2, 0, 0, 0]
 ]
 const dataR3 = [
-  [0.00, -2000.00, 2610.00, -12442.00, -14428.00, -7992.00, -5780.00, -3602.00],
+  [0, -2000, 2610, -12442, -14428, -7992, -5780, -3602],
   [0, 0, 0, 1, 2, 0, 0, 0]
 ]
 const dataR4 = [

+ 2 - 1
manpower/js/index.js

@@ -20,8 +20,9 @@ let app = new Vue({
         oddRowBGC: '#69c0ff0f',
         evenRowBGC: '',
         headerHeight: '40',
+        columnWidth: [150, 150],
         rowNum: 4,
-        align: ['center','center','center'],
+        align: ['right','center','center','center'],
         data: [
           ['<span class="lightOut"><span class="light red"></span></span>', '2022年1月', '山西焦煤', '已经开展高层次人才引进工作'],
           ['<span class="lightOut"><span class="light yellow"></span></span>', '2022年2月', '山西文旅', '不能按期完成序时进度'],

+ 58 - 13
manpower/js/index3.js

@@ -1132,21 +1132,66 @@ let app = new Vue({
       option.title.text = '各三级企业年利润与招聘情况分析'
       option.legend.data = ['2022年利润(万)', '2022年累计招聘数']
       option.legend.show = true
-      option.yAxis.push({
-        splitLine: {
-          show: false,
-        },
-        axisLine: {
-          show: false,
-        },
-        axisLabel: {
-          show: true,
-          textStyle: {
-            color: 'rgba(250,250,250,0.6)',
-            fontSize: 16,
+      option.yAxis = [
+        {
+          max: function(val) {
+            if (Math.abs(val.max) > Math.abs(val.min)) {
+              return (Math.abs(val.max) * 1.2).toFixed(0)
+            } else {
+              return (Math.abs(val.min) * 1.2).toFixed(0)
+            }
+          },
+          min: function(val) {
+            if (Math.abs(val.max) > Math.abs(val.min)) {
+              return (-Math.abs(val.max) * 1.2).toFixed(0)
+            } else {
+              return (Math.abs(val.min) * 1.2).toFixed(0)
+            }
+          },
+          splitLine: {
+            show: false,
+          },
+          axisLine: {
+            show: false,
+          },
+          axisLabel: {
+            show: true,
+            formatter: '{value}',
+            textStyle: {
+              color: 'rgba(250,250,250,0.6)',
+            },
           },
         },
-      })
+        {
+          max: function(val) {
+            if (Math.abs(val.max) > Math.abs(val.min)) {
+              return (Math.abs(val.max) * 1.2).toFixed(0)
+            } else {
+              return (Math.abs(val.min) * 1.2).toFixed(0)
+            }
+          },
+          min: function(val) {
+            if (Math.abs(val.max) > Math.abs(val.min)) {
+              return (-Math.abs(val.max) * 1.2).toFixed(0)
+            } else {
+              return (Math.abs(val.min) * 1.2).toFixed(0)
+            }
+          },
+          splitLine: {
+            show: false,
+          },
+          axisLine: {
+            show: false,
+          },
+          axisLabel: {
+            show: true,
+            formatter: '{value}',
+            textStyle: {
+              color: 'rgba(250,250,250,0.6)',
+            },
+          },
+        }
+      ]
       myChart.setOption(option)
     },
     initChartR4 () {

+ 60 - 15
manpower/js/index4.js

@@ -382,7 +382,7 @@ let app = new Vue({
         formatter: '{a0}:{c0}' + '<br/>' + '{a1}:{c1}' + '%'
       }
       option.yAxis.push({
-        max: 20,
+        max: 100,
         type: 'value',
         axisLine: {
           show: false,
@@ -1079,7 +1079,7 @@ let app = new Vue({
         },
         axisLabel: {
           show: true,
-          formatter: '{value} %',
+          formatter: '{value}',
           textStyle: {
             color: 'rgba(250,250,250,0.6)',
           },
@@ -1140,21 +1140,66 @@ let app = new Vue({
       option.title.text = '各四级企业年利润与招聘情况分析'
       option.legend.data = ['2022年利润(万)', '2022年累计招聘数']
       option.legend.show = true
-      option.yAxis.push({
-        splitLine: {
-          show: false,
-        },
-        axisLine: {
-          show: false,
-        },
-        axisLabel: {
-          show: true,
-          formatter: '{value}',
-          textStyle: {
-            color: 'rgba(250,250,250,0.6)',
+      option.yAxis = [
+        {
+          max: function(val) {
+            if (Math.abs(val.max) > Math.abs(val.min)) {
+              return (Math.abs(val.max) * 1.2).toFixed(0)
+            } else {
+              return (Math.abs(val.min) * 1.2).toFixed(0)
+            }
+          },
+          min: function(val) {
+            if (Math.abs(val.max) > Math.abs(val.min)) {
+              return (-Math.abs(val.max) * 1.2).toFixed(0)
+            } else {
+              return (Math.abs(val.min) * 1.2).toFixed(0)
+            }
+          },
+          splitLine: {
+            show: false,
+          },
+          axisLine: {
+            show: false,
+          },
+          axisLabel: {
+            show: true,
+            formatter: '{value}',
+            textStyle: {
+              color: 'rgba(250,250,250,0.6)',
+            },
           },
         },
-      })
+        {
+          max: function(val) {
+            if (Math.abs(val.max) > Math.abs(val.min)) {
+              return (Math.abs(val.max) * 1.2).toFixed(0)
+            } else {
+              return (Math.abs(val.min) * 1.2).toFixed(0)
+            }
+          },
+          min: function(val) {
+            if (Math.abs(val.max) > Math.abs(val.min)) {
+              return (-Math.abs(val.max) * 1.2).toFixed(0)
+            } else {
+              return (Math.abs(val.min) * 1.2).toFixed(0)
+            }
+          },
+          splitLine: {
+            show: false,
+          },
+          axisLine: {
+            show: false,
+          },
+          axisLabel: {
+            show: true,
+            formatter: '{value}',
+            textStyle: {
+              color: 'rgba(250,250,250,0.6)',
+            },
+          },
+        }
+      ]
       myChart.setOption(option)
     },
     initChartR4 () {