Przeglądaj źródła

feat: 外加工厂量

@dayan_hjm 2 lat temu
rodzic
commit
243d14581f

BIN
src/assets/imgs/dataVImg/wuQuanXuan.png


+ 42 - 7
src/pages/tqcDataVHome/component/bottomLineForSend.jsx

@@ -2,7 +2,7 @@
2 2
  * @Author: dayan_hjm 近30天产量
3 3
  * @Date: 2023-10-23 09:32:12 
4 4
  * @Last Modified by: dayan_hjm
5
- * @Last Modified time: 2023-11-17 10:21:39
5
+ * @Last Modified time: 2023-11-24 10:25:30
6 6
  */
7 7
 
8 8
 
@@ -22,6 +22,7 @@ class BottomLineForSend extends Component {
22 22
     super(props, context);
23 23
     this.store = mod;
24 24
     this.state = {
25
+      factoryProdcution_arr:[],
25 26
       missionsIntensity_arr:[],
26 27
       year:[],
27 28
     };
@@ -33,13 +34,14 @@ class BottomLineForSend extends Component {
33 34
   async getUrl() {
34 35
     await mondService().then(({ data = [], resultCode }) => {
35 36
       if (+resultCode === 0) {
36
-        let year = [], missionsIntensity_arr = [];
37
+        let year = [], missionsIntensity_arr = [], factoryProdcution_arr = [];
37 38
         data.map((x, i) => {
38 39
           const name_ = x.indexDate.split('-')[1]+ '-'+x.indexDate.split('-')[2];
39 40
           year.push(name_);
40
-          missionsIntensity_arr.push(x.indexValue)
41
+          missionsIntensity_arr.push(x.indexValue);
42
+          factoryProdcution_arr.push(x.factoryProdcution)
41 43
         });
42
-        this.setState({ year, missionsIntensity_arr });
44
+        this.setState({ year, missionsIntensity_arr,factoryProdcution_arr });
43 45
         this.setData();
44 46
       }
45 47
     });
@@ -62,9 +64,7 @@ class BottomLineForSend extends Component {
62 64
             fontSize:12,
63 65
             color:"#ededed"
64 66
           },
65
-          backgroundColor:"#0000008a"
66
-
67
-          // formatter:'{c}' ,
67
+          backgroundColor:"#0000008a",
68 68
         },
69 69
         grid: {
70 70
           left: '8%',
@@ -180,6 +180,41 @@ class BottomLineForSend extends Component {
180 180
             data: this.state.missionsIntensity_arr,
181 181
             "smooth": true
182 182
           },
183
+          {
184
+            name: '外加工产量',
185
+            type: 'line',
186
+            smooth: true,
187
+            symbol: 'circle',
188
+            symbolSize: 0,
189
+            showSymbol: false,
190
+            lineStyle: {
191
+              normal: {
192
+                color: '#69FFDE',
193
+                width: 0
194
+              }
195
+            },
196
+            areaStyle: {
197
+              normal: {
198
+                color: new echarts.graphic.LinearGradient(0, 0, 0, 0, [{
199
+                  offset: 0,
200
+                  color: '#69ffde5c'
201
+                }, {
202
+                  offset: 1,
203
+                  color: 'rgba(228, 228, 126, 0)'
204
+                }], false),
205
+                shadowColor: 'rgba(0, 0, 0, 0)',
206
+              }
207
+            },
208
+            itemStyle: {
209
+              normal: {
210
+                color: 'rgba(228, 228, 126, 1)',
211
+                borderColor: 'rgba(228, 228, 126, .1)',
212
+                borderWidth: 0
213
+              }
214
+            },
215
+            data: this.state.factoryProdcution_arr,
216
+            "smooth": true
217
+          },
183 218
           // {
184 219
           //   name: '字段2',
185 220
           //   type: 'line',