style:登记类型总量模块的修改
Showing
1 changed file
with
10 additions
and
17 deletions
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-07-04 13:48:00 | 4 | * @LastEditTime: 2023-07-04 13:54:34 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <!-- 登记类型总量 --> | 7 | <!-- 登记类型总量 --> |
8 | <Chart :cdata="cdata" /> | 8 | <Chart :cdata="cdata" /> |
9 | </template> | 9 | </template> |
10 | |||
11 | <script> | 10 | <script> |
12 | import Chart from "./Chart"; | 11 | import Chart from "./Chart"; |
13 | import work from "@/api/work"; | 12 | import work from "@/api/work"; |
... | @@ -17,12 +16,12 @@ | ... | @@ -17,12 +16,12 @@ |
17 | cdata: { | 16 | cdata: { |
18 | timer: null, | 17 | timer: null, |
19 | category: [], | 18 | category: [], |
20 | lineData: [], | 19 | lineData: [] |
21 | }, | 20 | } |
22 | }; | 21 | } |
23 | }, | 22 | }, |
24 | components: { | 23 | components: { |
25 | Chart, | 24 | Chart |
26 | }, | 25 | }, |
27 | mounted () { | 26 | mounted () { |
28 | this.getDjlxtotal() | 27 | this.getDjlxtotal() |
... | @@ -39,17 +38,13 @@ | ... | @@ -39,17 +38,13 @@ |
39 | QLLX: "", | 38 | QLLX: "", |
40 | XZQDM: "", | 39 | XZQDM: "", |
41 | }; | 40 | }; |
42 | let res = await work.getDjlxtotal(p); | 41 | let res = await work.getDjlxtotal(p) |
43 | res.result.map((item) => { | 42 | this.cdata.category = res.result.map(item => item.AREACODE) |
44 | return ( | 43 | this.cdata.lineData = res.result.map(item => item.ywtotal) |
45 | this.cdata.category.push(item.AREACODE), | ||
46 | this.cdata.lineData.push(item.ywtotal) | ||
47 | ); | ||
48 | }); | ||
49 | } catch (error) { | 44 | } catch (error) { |
50 | this.$refs.msg.messageShow(); | 45 | this.$refs.msg.messageShow() |
51 | } | 46 | } |
52 | }); | 47 | }) |
53 | } | 48 | } |
54 | }, | 49 | }, |
55 | destroyed () { | 50 | destroyed () { |
... | @@ -57,5 +52,3 @@ | ... | @@ -57,5 +52,3 @@ |
57 | } | 52 | } |
58 | }; | 53 | }; |
59 | </script> | 54 | </script> |
60 | <style lang="scss" scoped> | ||
61 | </style> | ... | ... |
-
Please register or sign in to post a comment