Bläddra i källkod

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

unknown 1 år sedan
förälder
incheckning
49e130f95a
4 ändrade filer med 118 tillägg och 59 borttagningar
  1. 1 1
      manpower/js/index.js
  2. 43 22
      manpower/js/index2.js
  3. 37 18
      manpower/js/index3.js
  4. 37 18
      manpower/js/index4.js

+ 1 - 1
manpower/js/index.js

@@ -860,7 +860,7 @@ let app = new Vue({
             barWidth: 15,
             itemStyle: {
               color: params => {
-                if (params.value < 0 && c2[0][params.dataIndex] < 0) {
+                if (params.value < 0 && c1[1][params.dataIndex] < 0) {
                   return 'red'
                 } else if (params.value < 0) {
                   return 'yellow'

+ 43 - 22
manpower/js/index2.js

@@ -727,6 +727,7 @@ let app = new Vue({
       let myChart = echarts.init(this.$refs['echartC1'])
       let option = {
         ..._.cloneDeep(this.commonOption),
+        color: ['#69c0ff'],
         series: [
           {
             name: '全员劳动生产率(万/人)',
@@ -738,18 +739,36 @@ let app = new Vue({
             symbolSize: 8, //标记的大小
             smooth: false,
             itemStyle: {
-              //折线拐点标志的样式
-              color: '#B889EA',
-              borderColor: '#B889EA',
-              width: 2,
-              shadowColor: '#B889EA',
-              shadowBlur: 4,
+              color: params => {
+                if (params.value < 0 && dataC1[1][params.dataIndex] < 0) {
+                  return 'red'
+                } else if (params.value < 0) {
+                  return 'yellow'
+                } else {
+                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                    {
+                      offset: 0,
+                      color: '#69c0ff',
+                    },
+                    {
+                      offset: 1,
+                      color: '#082550',
+                    },
+                  ])
+                }
+              },
             },
             lineStyle: {
               color: '#B889EA',
               width: 2,
             },
             data: dataC1[0],
+           
+          },
+          {
+            name: '全员劳动生产率同比变化',
+            yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
+            type: 'line',
             markLine: {
               data: [
                 {
@@ -781,11 +800,6 @@ let app = new Vue({
                 distance: [20, 8],
               },
             },
-          },
-          {
-            name: '全员劳动生产率同比变化',
-            yAxisIndex: 1, //使用的 y 轴的 index,在单个图表实例中存在多个 y轴的时候有用
-            type: 'line',
             itemStyle: {
               normal: {
                 color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
@@ -837,6 +851,7 @@ let app = new Vue({
       let myChart = echarts.init(this.$refs['echartC2'])
       let option = {
         ..._.cloneDeep(this.commonOption),
+        color: ['#69c0ff'],
         series: [
           {
             name: '人工成本利润率同比变化',
@@ -867,17 +882,23 @@ let app = new Vue({
             type: 'bar',
             barWidth: 15,
             itemStyle: {
-              normal: {
-                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
-                  {
-                    offset: 0,
-                    color: '#69c0ff',
-                  },
-                  {
-                    offset: 1,
-                    color: '#082550',
-                  },
-                ]),
+              color: params => {
+                if (params.value < 0 && dataC2[1][params.dataIndex] < 0) {
+                  return 'red'
+                } else if (params.value < 0) {
+                  return 'yellow'
+                } else {
+                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                    {
+                      offset: 0,
+                      color: '#69c0ff',
+                    },
+                    {
+                      offset: 1,
+                      color: '#082550',
+                    },
+                  ])
+                }
               },
             },
             data: dataC2[1],

+ 37 - 18
manpower/js/index3.js

@@ -726,7 +726,7 @@ let app = new Vue({
       let myChart = echarts.init(this.$refs['echartC1'])
       let option = {
         ..._.cloneDeep(this.commonOption),
-
+        color: ['#69c0ff'],
         series: [
           {
             name: '全员劳动生产率(万/人)',
@@ -738,12 +738,24 @@ let app = new Vue({
             symbolSize: 8, //标记的大小
             smooth: false,
             itemStyle: {
-              //折线拐点标志的样式
-              color: '#B889EA',
-              borderColor: '#B889EA',
-              width: 2,
-              shadowColor: '#B889EA',
-              shadowBlur: 4,
+              color: params => {
+                if (params.value < 0 && dataC1[1][params.dataIndex] < 0) {
+                  return 'red'
+                } else if (params.value < 0) {
+                  return 'yellow'
+                } else {
+                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                    {
+                      offset: 0,
+                      color: '#69c0ff',
+                    },
+                    {
+                      offset: 1,
+                      color: '#082550',
+                    },
+                  ])
+                }
+              },
             },
             lineStyle: {
               color: '#B889EA',
@@ -837,6 +849,7 @@ let app = new Vue({
       let myChart = echarts.init(this.$refs['echartC2'])
       let option = {
         ..._.cloneDeep(this.commonOption),
+        color: ['#69c0ff'],
         series: [
           {
             name: '人工成本利润率同比变化',
@@ -867,17 +880,23 @@ let app = new Vue({
             type: 'bar',
             barWidth: 15,
             itemStyle: {
-              normal: {
-                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
-                  {
-                    offset: 0,
-                    color: '#69c0ff',
-                  },
-                  {
-                    offset: 1,
-                    color: '#082550',
-                  },
-                ]),
+              color: params => {
+                if (params.value < 0 && dataC2[1][params.dataIndex] < 0) {
+                  return 'red'
+                } else if (params.value < 0) {
+                  return 'yellow'
+                } else {
+                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                    {
+                      offset: 0,
+                      color: '#69c0ff',
+                    },
+                    {
+                      offset: 1,
+                      color: '#082550',
+                    },
+                  ])
+                }
               },
             },
             data: dataC2[1],

+ 37 - 18
manpower/js/index4.js

@@ -725,7 +725,7 @@ let app = new Vue({
       let myChart = echarts.init(this.$refs['echartC1'])
       let option = {
         ..._.cloneDeep(this.commonOption),
-
+        color: ['#69c0ff'],
         series: [
           {
             name: '全员劳动生产率(万/人)',
@@ -737,12 +737,24 @@ let app = new Vue({
             symbolSize: 8, //标记的大小
             smooth: false,
             itemStyle: {
-              //折线拐点标志的样式
-              color: '#B889EA',
-              borderColor: '#B889EA',
-              width: 2,
-              shadowColor: '#B889EA',
-              shadowBlur: 4,
+              color: params => {
+                if (params.value < 0 && dataC1[1][params.dataIndex] < 0) {
+                  return 'red'
+                } else if (params.value < 0) {
+                  return 'yellow'
+                } else {
+                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                    {
+                      offset: 0,
+                      color: '#69c0ff',
+                    },
+                    {
+                      offset: 1,
+                      color: '#082550',
+                    },
+                  ])
+                }
+              },
             },
             lineStyle: {
               color: '#B889EA',
@@ -837,6 +849,7 @@ let app = new Vue({
       let myChart = echarts.init(this.$refs['echartC2'])
       let option = {
         ..._.cloneDeep(this.commonOption),
+        color: ['#69c0ff'],
         series: [
           {
             name: '人工成本利润率同比变化',
@@ -867,17 +880,23 @@ let app = new Vue({
             type: 'bar',
             barWidth: 15,
             itemStyle: {
-              normal: {
-                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
-                  {
-                    offset: 0,
-                    color: '#69c0ff',
-                  },
-                  {
-                    offset: 1,
-                    color: '#082550',
-                  },
-                ]),
+              color: params => {
+                if (params.value < 0 && dataC2[1][params.dataIndex] < 0) {
+                  return 'red'
+                } else if (params.value < 0) {
+                  return 'yellow'
+                } else {
+                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                    {
+                      offset: 0,
+                      color: '#69c0ff',
+                    },
+                    {
+                      offset: 1,
+                      color: '#082550',
+                    },
+                  ])
+                }
               },
             },
             data: dataC2[1],