manage-client 3.2.249 → 3.2.251

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,12 +9,12 @@
9
9
  import * as Util from '../../Util'
10
10
  import co from 'co'
11
11
  import echarts from 'echarts'
12
- import { HttpResetClass } from 'vue-client'
12
+ import {HttpResetClass} from 'vue-client'
13
13
 
14
- let getData = function * (self) {
14
+ let getData = function* (self) {
15
15
  let load = new HttpResetClass()
16
- load.load('POST','rs/sql/sellinggasvalue',
17
- {data: {startDate: self.startdate, endDate: self.enddate,key:'f_user_type',f_orgid:self.orgid}},
16
+ load.load('POST', 'rs/sql/sellinggasvalue',
17
+ {data: {startDate: self.startdate, endDate: self.enddate, key: 'f_user_nature', f_orgid: self.orgid}},
18
18
  {resolveMsg: null, rejectMsg: null})
19
19
  .then((res) => {
20
20
  let arrparams = []
@@ -26,26 +26,26 @@ let getData = function * (self) {
26
26
  item.value = res.data[i].gas_value
27
27
  gasdata.push(item)
28
28
  }
29
- console.log("加载echars组件")
30
- self.setGas(arrparams,gasdata)
29
+ console.log('加载echars组件')
30
+ self.setGas(arrparams, gasdata)
31
31
  })
32
32
  let load1 = new HttpResetClass()
33
- load1.load('POST','rs/sql/sellinggasvalue',
34
- {data: {startDate: self.startdate, endDate: self.enddate,key:'f_payment',f_orgid:self.orgid}},
35
- {resolveMsg: null, rejectMsg: null})
36
- .then((res) => {
37
- let arrparams = []
38
- let moneydata = []
39
- for (var i = 0; i < res.data.length; i++) {
40
- let item1={}
33
+ load1.load('POST', 'rs/sql/sellinggasvalue',
34
+ {data: {startDate: self.startdate, endDate: self.enddate, key: 'f_payment', f_orgid: self.orgid}},
35
+ {resolveMsg: null, rejectMsg: null})
36
+ .then((res) => {
37
+ let arrparams = []
38
+ let moneydata = []
39
+ for (var i = 0; i < res.data.length; i++) {
40
+ let item1 = {}
41
41
  arrparams[i] = res.data[i].name
42
42
  item1.name = res.data[i].name
43
43
  item1.value = res.data[i].money_value
44
44
  moneydata.push(item1)
45
- }
46
- console.log("加载echars组件")
47
- self.setMoney(arrparams,moneydata)
48
- })
45
+ }
46
+ console.log('加载echars组件')
47
+ self.setMoney(arrparams, moneydata)
48
+ })
49
49
  }
50
50
  export default {
51
51
  props: {
@@ -60,135 +60,136 @@ export default {
60
60
  orgid: {
61
61
  type: String
62
62
  }
63
- },
64
- data () {
65
- return {
66
- xc: '',
67
- xd: ''
68
- }
69
- },
70
- methods: {
63
+ },
64
+ data () {
65
+ return {
66
+ xc: '',
67
+ xd: ''
68
+ }
69
+ },
70
+ methods: {
71
71
 
72
- setGas (arrparams,gasdata) {
73
- console.log("进入组件")
74
- let option1 = {
75
- title: [
76
- {
77
- text: '收费来源气量金额饼状图',
78
- x: '0%',
79
- y: '0%',
80
- textStyle: {
81
- color: '#010606',
82
- fontSize: 18,
83
- }
84
- }, {
85
- text: '气量分布',
86
- x: '40%',
87
- y: '18%',
88
- textStyle: {
89
- color: '#010606',
90
- fontSize: 16,
91
- }
92
- }],
93
- tooltip: {
94
- trigger: 'item',
95
- formatter: '{a} <br/>{b}: ({c}m³) ({d}%)'
96
- },
97
- legend: {
98
- orient: 'horizontal',
99
- icon: 'circle',
100
- x: 'center',
101
- y: '80%',
72
+ setGas (arrparams, gasdata) {
73
+ console.log('进入组件')
74
+ let option1 = {
75
+ color: ['#FE974B', '#3D72FF', '#00C953'],
76
+ title: [
77
+ {
78
+ text: '收费来源气量金额饼状图',
79
+ x: '0%',
80
+ y: '0%',
81
+ textStyle: {
82
+ color: '#010606',
83
+ fontSize: 18
84
+ }
85
+ }, {
86
+ text: '气量分布',
87
+ x: '40%',
88
+ y: '18%',
89
+ textStyle: {
90
+ color: '#010606',
91
+ fontSize: 16
92
+ }
93
+ }],
94
+ tooltip: {
95
+ trigger: 'item',
96
+ formatter: '{a} <br/>{b}: ({c}m³) ({d}%)'
97
+ },
98
+ legend: {
99
+ orient: 'horizontal',
100
+ icon: 'circle',
101
+ x: 'center',
102
+ y: '80%',
102
103
 
103
- textStyle: {
104
- padding: [0, 0, 0, 4],
105
- color: '#010606'
106
- },
107
- data: arrparams
108
- },
109
- series : [
110
- {
111
- name: '气量',
112
- type: 'pie',
113
- radius: ['0%', '40%'],
114
- center: ['50%', '50%'],
115
- hoverAnimation: true,
116
- minAngle: 15,//最小角度
117
- startAngle: 60, //起始角度
118
- label: {normal: {show:true,}},
119
- labelLine: { normal: {show:true,}},
120
- data: gasdata
121
- },
122
- ]
104
+ textStyle: {
105
+ padding: [0, 0, 0, 4],
106
+ color: '#010606'
107
+ },
108
+ data: arrparams
109
+ },
110
+ series: [
111
+ {
112
+ name: '气量',
113
+ type: 'pie',
114
+ radius: ['0%', '40%'],
115
+ center: ['50%', '50%'],
116
+ hoverAnimation: true,
117
+ minAngle: 15, // 最小角度
118
+ startAngle: 60, // 起始角度
119
+ label: {normal: {show: true}},
120
+ labelLine: {normal: {show: true}},
121
+ data: gasdata
122
+ }
123
+ ]
123
124
 
124
- }
125
- this.xd = echarts.init(document.getElementById('ps'))
126
- this.xd.setOption(option1,true)
127
- },
128
- setMoney (arrparams,moneydata) {
129
- console.log("进入组件")
130
- let option = {
131
- title: [
132
- {
133
- text: '',
134
- x: '0%',
135
- y: '0%',
136
- textStyle: {
137
- color: '#010606',
138
- fontSize: 18,
139
- }
140
- }, {
141
- text: '金额分布',
142
- x: '40%',
143
- y: '18%',
144
- textStyle: {
145
- color: '#010606',
146
- fontSize: 16,
147
- }
148
- }],
149
- tooltip: {
150
- trigger: 'item',
151
- formatter: '{a} <br/>{b}: ({c}元) ({d}%)'
152
- },
153
- legend: {
154
- orient: 'horizontal',
155
- icon: 'circle',
156
- x: 'center',
157
- y: '80%',
125
+ }
126
+ this.xd = echarts.init(document.getElementById('ps'))
127
+ this.xd.setOption(option1, true)
128
+ },
129
+ setMoney (arrparams, moneydata) {
130
+ console.log('进入组件')
131
+ let option = {
132
+ title: [
133
+ {
134
+ text: '',
135
+ x: '0%',
136
+ y: '0%',
137
+ textStyle: {
138
+ color: '#010606',
139
+ fontSize: 18
140
+ }
141
+ }, {
142
+ text: '金额分布',
143
+ x: '40%',
144
+ y: '18%',
145
+ textStyle: {
146
+ color: '#010606',
147
+ fontSize: 16
148
+ }
149
+ }],
150
+ tooltip: {
151
+ trigger: 'item',
152
+ formatter: '{a} <br/>{b}: ({c}元) ({d}%)'
153
+ },
154
+ legend: {
155
+ orient: 'horizontal',
156
+ icon: 'circle',
157
+ x: 'center',
158
+ y: '80%',
158
159
 
159
- textStyle: {
160
- padding: [0, 0, 0, 4],
161
- color: '#010606'
162
- },
163
- data: arrparams
164
- },
165
- series : [
166
- {
167
- name: '金额',
168
- type: 'pie',
169
- radius: ['0%', '40%'],
170
- center: ['50%', '50%'],
171
- hoverAnimation: true,
172
- minAngle: 15,//最小角度
173
- startAngle: 60, //起始角度
174
- label: {normal: {show:true,}},
175
- labelLine: { normal: {show:true,}},
176
- data: moneydata
177
- }
178
- ]
160
+ textStyle: {
161
+ padding: [0, 0, 0, 4],
162
+ color: '#010606'
163
+ },
164
+ data: arrparams
165
+ },
166
+ series: [
167
+ {
168
+ name: '金额',
169
+ type: 'pie',
170
+ radius: ['0%', '40%'],
171
+ center: ['50%', '50%'],
172
+ hoverAnimation: true,
173
+ minAngle: 15, // 最小角度
174
+ startAngle: 60, // 起始角度
175
+ label: {normal: {show: true}},
176
+ labelLine: {normal: {show: true}},
177
+ data: moneydata
178
+ }
179
+ ]
179
180
 
180
- }
181
- this.xc = echarts.init(document.getElementById('pp'))
182
- this.xc.setOption(option,true)
183
- },
184
- searchdata () {
185
- let getGen =getData(this);
186
- co(getGen);
187
- }
188
- },
189
- ready () {
190
- this.searchdata()
191
- },
181
+ }
182
+ this.xc = echarts.init(document.getElementById('pp'))
183
+ this.xc.setOption(option, true)
184
+ },
185
+ searchdata () {
186
+ let getGen = getData(this)
187
+ co(getGen)
188
+ }
189
+ },
190
+ ready () {
191
+ this.searchdata()
192
+ },
192
193
  watch: {
193
194
  'startdate' (val) {
194
195
  this.searchdata()
@@ -12,31 +12,20 @@ import {HttpResetClass} from 'vue-client'
12
12
 
13
13
  let getData = function* (self) {
14
14
  let load = new HttpResetClass()
15
- load.load('POST', 'rs/logic/sellinggasvalue',
16
- {data: {startDate: self.startdate, endDate: self.enddate, key: 'f_user_type', f_orgid: self.orgid}},
15
+ load.load('POST', 'rs/sql/sellinggasvalue',
16
+ {data: {startDate: self.startdate, endDate: self.enddate, key: 'f_user_nature', f_orgid: self.orgid}},
17
17
  {resolveMsg: null, rejectMsg: null})
18
18
  .then((res) => {
19
- console.log(res + 'aaaaaaaaaaaa')
20
- self.texttile = '用户类型'
21
- let arrparams1 = []
22
- let numdata1 = []
23
- let gasdata1 = []
24
- let pricedata1 = []
25
- let arrparams2 = []
26
- let numdata2 = []
27
- let gasdata2 = []
28
- let pricedata2 = []
29
- console.log('res.data', res.data)
30
- console.log(res.data.name1)
31
- arrparams1[0] = res.data.name1
32
- numdata1[0] = res.data.num_value1
33
- gasdata1[0] = res.data.gas_value1
34
- pricedata1[0] = res.data.money_value1
35
- arrparams2[0] = res.data.name2
36
- numdata2[0] = res.data.num_value2
37
- gasdata2[0] = res.data.gas_value2
38
- pricedata2[0] = res.data.money_value2
39
- self.set(arrparams1, numdata1, gasdata1, pricedata1, arrparams2, numdata2, gasdata2, pricedata2)
19
+ self.texttile = '用户性质'
20
+ let arrparams = []
21
+ let numdata = []
22
+ let gasdata = []
23
+ for (var i = 0; i < res.data.length; i++) {
24
+ arrparams[i] = res.data[i].name
25
+ numdata[i] = res.data[i].num_value
26
+ gasdata[i] = res.data[i].gas_value
27
+ }
28
+ self.set(arrparams, numdata, gasdata)
40
29
  })
41
30
  }
42
31
  export default {
@@ -53,33 +42,34 @@ export default {
53
42
  type: String
54
43
  }
55
44
  },
45
+ title: '站点管理',
56
46
  data () {
57
- title: '站点管理'
58
47
  return {
59
48
  texttile: '',
60
49
  xc: ''
61
50
  }
62
51
  },
63
52
  methods: {
64
- set (arrparams1, numdata1, gasdata1, pricedata1, arrparams2, numdata2, gasdata2, pricedata2) {
53
+ set (arrparams, numdata, gasdata) {
65
54
  this.xc = echarts.init(document.getElementById('gph'))
66
55
  this.xc.setOption({
56
+ color: ['#894BE5', '#FE974B'],
67
57
  title: {
68
58
  text: '民用及非民用缴费散列图',
69
59
  subtext: '数据查询来源',
70
60
  x: 'left'
71
61
  },
72
62
  tooltip: {
73
- trigger: 'item',
63
+ trigger: 'axis',
74
64
  formatter: function (params) {
75
- let str = ''
76
- console.log(JSON.stringify(params) + '-----------')
77
- if (params.seriesName.includes('气量')) {
78
- str += params.seriesName + ': ' + params.value + 'm³'
79
- } else if (params.seriesName.includes('数量')) {
80
- str += params.seriesName + ': ' + params.value + '笔'
81
- } else {
82
- str += params.seriesName + ': ' + params.value + '元'
65
+ var str = ''
66
+ str += params[0].name + '</br>'
67
+ for (var i = 0; i < params.length; i++) {
68
+ if (i === 0) {
69
+ str += params[i].marker + params[i].seriesName + ': ' + params[i].data + '户' + '</br>'
70
+ } else {
71
+ str += params[i].marker + params[i].seriesName + ': ' + params[i].data + 'm³' + '</br>'
72
+ }
83
73
  }
84
74
  return str
85
75
  }
@@ -87,7 +77,7 @@ export default {
87
77
  legend: {
88
78
  x: 'left',
89
79
  y: 'bottom',
90
- data: ['民用数量', '民用气量', '民用金额', '非民用数量', '非民用气量', '非民用金额']
80
+ data: ['户数', '气量']
91
81
  },
92
82
  toolbox: {
93
83
  show: true,
@@ -102,7 +92,7 @@ export default {
102
92
  xAxis: [
103
93
  {
104
94
  type: 'category',
105
- data: ['数据']
95
+ data: arrparams
106
96
  }
107
97
  ],
108
98
  yAxis: [
@@ -112,91 +102,10 @@ export default {
112
102
  ],
113
103
  series: [
114
104
  {
115
- name: '民用数量',
116
- type: 'bar',
117
- data: numdata1,
118
- barMinHeight: 5,
119
- itemStyle: {
120
- normal: {
121
- color: function (params) {
122
- // 给出颜色组
123
- var colorList = ['#FE8463']
124
- return colorList[params.dataIndex]
125
- }
126
- }
127
- },
128
- markLine: {
129
- data: [
130
- {type: 'average', name: '平均值'}
131
- ]
132
- }
133
- },
134
- {
135
- name: '民用气量',
136
- type: 'bar',
137
- data: gasdata1,
138
- itemStyle: {
139
- normal: {
140
- color: function (params) {
141
- // 给出颜色组
142
- var colorList = ['#45AC89']
143
- return colorList[params.dataIndex]
144
- }
145
- }
146
- },
147
- markLine: {
148
- data: [
149
- {type: 'average', name: '平均值'}
150
- ]
151
- }
152
- },
153
- {
154
- name: '民用金额',
105
+ name: '户数',
155
106
  type: 'bar',
156
- data: pricedata1,
157
- itemStyle: {
158
- normal: {
159
- color: function (params) {
160
- // 给出颜色组
161
- var colorList = ['#183467']
162
- return colorList[params.dataIndex]
163
- }
164
- }
165
- }
166
- },
167
- {
168
- name: '非民用数量',
169
- type: 'bar',
170
- data: numdata2,
107
+ data: numdata,
171
108
  barMinHeight: 5,
172
- itemStyle: {
173
- normal: {
174
- color: function (params) {
175
- // 给出颜色组
176
- var colorList = ['#9BCA63']
177
- return colorList[params.dataIndex]
178
- }
179
- }
180
- },
181
- markLine: {
182
- data: [
183
- {type: 'average', name: '平均值'}
184
- ]
185
- }
186
- },
187
- {
188
- name: '非民用气量',
189
- type: 'bar',
190
- data: gasdata2,
191
- itemStyle: {
192
- normal: {
193
- color: function (params) {
194
- // 给出颜色组
195
- var colorList = ['#26C0C0']
196
- return colorList[params.dataIndex]
197
- }
198
- }
199
- },
200
109
  markLine: {
201
110
  data: [
202
111
  {type: 'average', name: '平均值'}
@@ -204,24 +113,87 @@ export default {
204
113
  }
205
114
  },
206
115
  {
207
- name: '非民用金额',
116
+ name: '气量',
208
117
  type: 'bar',
209
- data: pricedata2,
210
- itemStyle: {
211
- normal: {
212
- color: function (params) {
213
- // 给出颜色组
214
- var colorList = ['#27727B']
215
- return colorList[params.dataIndex]
216
- }
217
- }
218
- },
118
+ data: gasdata,
219
119
  markLine: {
220
120
  data: [
221
121
  {type: 'average', name: '平均值'}
222
122
  ]
223
123
  }
224
124
  }
125
+ // {
126
+ // name: '商业数量',
127
+ // type: 'bar',
128
+ // data: numdata2,
129
+ // itemStyle: {
130
+ // normal: {
131
+ // color: function (params) {
132
+ // // 给出颜色组
133
+ // var colorList = ['#894BE5']
134
+ // return colorList[params.dataIndex]
135
+ // }
136
+ // }
137
+ // }
138
+ // },
139
+ // {
140
+ // name: '商业气量',
141
+ // type: 'bar',
142
+ // data: gasdata2,
143
+ // barMinHeight: 5,
144
+ // itemStyle: {
145
+ // normal: {
146
+ // color: function (params) {
147
+ // // 给出颜色组
148
+ // var colorList = ['#FE974B']
149
+ // return colorList[params.dataIndex]
150
+ // }
151
+ // }
152
+ // },
153
+ // markLine: {
154
+ // data: [
155
+ // {type: 'average', name: '平均值'}
156
+ // ]
157
+ // }
158
+ // },
159
+ // {
160
+ // name: '工业数量',
161
+ // type: 'bar',
162
+ // data: numdata3,
163
+ // itemStyle: {
164
+ // normal: {
165
+ // color: function (params) {
166
+ // // 给出颜色组
167
+ // var colorList = ['#894BE5']
168
+ // return colorList[params.dataIndex]
169
+ // }
170
+ // }
171
+ // },
172
+ // markLine: {
173
+ // data: [
174
+ // {type: 'average', name: '平均值'}
175
+ // ]
176
+ // }
177
+ // },
178
+ // {
179
+ // name: '工业气量',
180
+ // type: 'bar',
181
+ // data: gasdata3,
182
+ // itemStyle: {
183
+ // normal: {
184
+ // color: function (params) {
185
+ // // 给出颜色组
186
+ // var colorList = ['#FE974B']
187
+ // return colorList[params.dataIndex]
188
+ // }
189
+ // }
190
+ // },
191
+ // markLine: {
192
+ // data: [
193
+ // {type: 'average', name: '平均值'}
194
+ // ]
195
+ // }
196
+ // }
225
197
  ]
226
198
  })
227
199
  },