vue2-client 1.2.86 → 1.2.90
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.
- package/.env +15 -15
- package/.eslintrc.js +82 -82
- package/CHANGELOG.md +1 -1
- package/package.json +94 -94
- package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +113 -113
- package/src/base-client/components/common/CitySelect/CitySelect.vue +244 -244
- package/src/base-client/components/common/CitySelect/index.js +3 -3
- package/src/base-client/components/common/CitySelect/index.md +109 -109
- package/src/base-client/components/common/CreateQuery/CreateQuery.vue +539 -539
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +310 -310
- package/src/base-client/components/common/Upload/index.js +3 -3
- package/src/base-client/components/common/XAddForm/XAddForm.vue +345 -345
- package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +322 -322
- package/src/base-client/components/common/XForm/XForm.vue +268 -268
- package/src/base-client/components/common/XTable/XTable.vue +269 -269
- package/src/base-client/components/iot/DeviceDetailsView/DeviceDetailsView.vue +232 -232
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsCount.vue +678 -678
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsException.vue +57 -57
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsRead.vue +131 -131
- package/src/base-client/components/iot/DeviceTypeDetailsView/DeviceTypeDetailsView.vue +300 -300
- package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +274 -84
- package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +532 -532
- package/src/base-client/plugins/compatible/LoginServiceOA.js +20 -20
- package/src/pages/CreateQueryPage.vue +59 -58
- package/src/pages/login/Login.vue +55 -51
- package/src/pages/resourceManage/orgListManage.vue +98 -98
- package/src/router/async/config.async.js +26 -26
- package/src/router/async/router.map.js +60 -60
- package/src/router/index.js +27 -27
- package/src/services/api/WebmeterAnalysisViewApi.js +5 -1
- package/src/services/api/common.js +56 -56
- package/src/services/api/index.js +39 -39
- package/src/services/api/iot/DeviceDetailsView/DeviceDetailsCountApi.js +18 -18
- package/src/services/api/manage.js +16 -16
- package/src/services/api/restTools.js +24 -24
- package/src/theme/default/style.less +47 -47
- package/src/utils/request.js +11 -3
- package/src/utils/util.js +222 -222
- package/vue.config.js +158 -153
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
<x-card :loadState="instructSumLoadState" :retry="loadInstructSumCount">
|
|
7
7
|
<chart-card :total="instructSum | NumberFormat" title="总指令数">
|
|
8
8
|
<a-tooltip slot="action" :style="{ marginRight: '10px' }" title="刷新" @click="loadInstructSumCount()">
|
|
9
|
-
<a-icon type="redo"
|
|
9
|
+
<a-icon type="redo"/>
|
|
10
10
|
</a-tooltip>
|
|
11
11
|
<a-tooltip slot="action" title="生成的所有指令总数">
|
|
12
|
-
<a-icon type="info-circle-o"
|
|
12
|
+
<a-icon type="info-circle-o"/>
|
|
13
13
|
</a-tooltip>
|
|
14
14
|
<div>
|
|
15
15
|
<trend :flag="instructYoW >= 0 ? 'up' : 'down'" style="margin-right: 16px;">
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
<x-card :loadState="metereadSumLoadState" :retry="loadMetereadSumCount">
|
|
30
30
|
<chart-card :total="metereadSum | NumberFormat" title="总抄表量">
|
|
31
31
|
<a-tooltip slot="action" :style="{ marginRight: '10px' }" title="刷新" @click="loadMetereadSumCount()">
|
|
32
|
-
<a-icon type="redo"
|
|
32
|
+
<a-icon type="redo"/>
|
|
33
33
|
</a-tooltip>
|
|
34
34
|
<a-tooltip slot="action" title="生成的所有抄表(meteread)总数">
|
|
35
|
-
<a-icon type="info-circle-o"
|
|
35
|
+
<a-icon type="info-circle-o"/>
|
|
36
36
|
</a-tooltip>
|
|
37
37
|
<div>
|
|
38
|
-
<mini-area :dataSource="metereadSumDataByWeek" :scale="metereadSumByWeekScale"
|
|
38
|
+
<mini-area :dataSource="metereadSumDataByWeek" :scale="metereadSumByWeekScale"/>
|
|
39
39
|
</div>
|
|
40
40
|
<template slot="footer">昨日新增 <span> {{ metereadYesAdd | NumberFormat }}</span></template>
|
|
41
41
|
</chart-card>
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
<x-card :loadState="usingMeterSumLoadState" :retry="loadUsingMeterSumCount">
|
|
46
46
|
<chart-card :total="usingMeterSum | NumberFormat" title="在用表具数">
|
|
47
47
|
<a-tooltip slot="action" :style="{ marginRight: '10px' }" title="刷新" @click="loadUsingMeterSumCount()">
|
|
48
|
-
<a-icon type="redo"
|
|
48
|
+
<a-icon type="redo"/>
|
|
49
49
|
</a-tooltip>
|
|
50
50
|
<a-tooltip slot="action" title="开户成功的物联网表总数">
|
|
51
|
-
<a-icon type="info-circle-o"
|
|
51
|
+
<a-icon type="info-circle-o"/>
|
|
52
52
|
</a-tooltip>
|
|
53
53
|
<div>
|
|
54
|
-
<mini-bar :dataSource="usingMeterSumDataByWeek" :scale="usingMeterSumByWeekScale"
|
|
54
|
+
<mini-bar :dataSource="usingMeterSumDataByWeek" :scale="usingMeterSumByWeekScale"/>
|
|
55
55
|
</div>
|
|
56
56
|
<template slot="footer">昨日新增 <span>{{ usingMeterYesAdd | NumberFormat }}</span></template>
|
|
57
57
|
</chart-card>
|
|
@@ -61,13 +61,17 @@
|
|
|
61
61
|
<x-card :loadState="instructRateOfSuccessLoadState" :retry="loadInstructRateOfSuccess">
|
|
62
62
|
<chart-card :total="instructRateOfSuccessValue + '%'" title="指令下发成功率">
|
|
63
63
|
<a-tooltip slot="action" :style="{ marginRight: '10px' }" title="刷新" @click="loadInstructRateOfSuccess()">
|
|
64
|
-
<a-icon type="redo"
|
|
64
|
+
<a-icon type="redo"/>
|
|
65
65
|
</a-tooltip>
|
|
66
66
|
<a-tooltip slot="action" title="执行成功和已发送状态的指令占所有指令的比例">
|
|
67
|
-
<a-icon type="info-circle-o"
|
|
67
|
+
<a-icon type="info-circle-o"/>
|
|
68
68
|
</a-tooltip>
|
|
69
69
|
<div>
|
|
70
|
-
<mini-progress
|
|
70
|
+
<mini-progress
|
|
71
|
+
:color="instructRateOfColor"
|
|
72
|
+
:percentage="instructRateOfSuccessValue"
|
|
73
|
+
:target="90"
|
|
74
|
+
height="8px"/>
|
|
71
75
|
</div>
|
|
72
76
|
<template slot="footer">
|
|
73
77
|
<trend :flag="instructRateOfSuccessYoW >= 0 ? 'up' : 'down'" style="margin-right: 16px;">
|
|
@@ -88,7 +92,12 @@
|
|
|
88
92
|
|
|
89
93
|
<a-card :body-style="{padding: '0'}" :bordered="false">
|
|
90
94
|
<div class="salesCard">
|
|
91
|
-
<a-tabs
|
|
95
|
+
<a-tabs
|
|
96
|
+
:activeKey="tabActiveKey"
|
|
97
|
+
:default-active-key="tabActiveKey"
|
|
98
|
+
:tab-bar-style="{marginBottom: '24px', paddingLeft: '16px'}"
|
|
99
|
+
size="large"
|
|
100
|
+
@change="handleTabChange">
|
|
92
101
|
<div slot="tabBarExtraContent" class="extra-wrapper">
|
|
93
102
|
<div class="extra-item">
|
|
94
103
|
<a-radio-group v-model="countMode" button-style="solid" @change="toggleCountMode">
|
|
@@ -98,19 +107,19 @@
|
|
|
98
107
|
<a-radio-button value="year">近一年</a-radio-button>
|
|
99
108
|
</a-radio-group>
|
|
100
109
|
</div>
|
|
101
|
-
<a-range-picker :style="{width: '256px'}"
|
|
110
|
+
<a-range-picker :style="{width: '256px'}"/>
|
|
102
111
|
</div>
|
|
103
112
|
<a-tab-pane key="1" tab="抄表情况分析">
|
|
104
113
|
<a-row :lg="24" :md="24" :sm="24" :xl="24" :xs="24">
|
|
105
114
|
<x-card :loadState="radarLoadState" :retry="getHandPlanCountByMeterBrand">
|
|
106
|
-
<div id="container" style="padding: 0 0 0 20px;height: 370px"
|
|
115
|
+
<div id="container" style="padding: 0 0 0 20px;height: 370px"/>
|
|
107
116
|
</x-card>
|
|
108
117
|
</a-row>
|
|
109
118
|
</a-tab-pane>
|
|
110
119
|
<a-tab-pane key="2" tab="访问量">
|
|
111
120
|
<a-row>
|
|
112
121
|
<a-col :lg="12" :md="12" :sm="24" :xl="16" :xs="24">
|
|
113
|
-
<bar :data="barData2" title="销售额趋势"
|
|
122
|
+
<bar :data="barData2" title="销售额趋势"/>
|
|
114
123
|
</a-col>
|
|
115
124
|
<a-col :lg="12" :md="12" :sm="24" :xl="8" :xs="24">
|
|
116
125
|
<rank-list :list="rankList" title="门店销售排行榜"/>
|
|
@@ -127,7 +136,7 @@
|
|
|
127
136
|
<x-card :bordered="false" :loadState="useGasLoadState" :retry="loadUseGasData" title="用气情况排行">
|
|
128
137
|
<a-dropdown slot="extra" :trigger="['click']" placement="bottomLeft">
|
|
129
138
|
<a class="ant-dropdown-link" href="#">
|
|
130
|
-
<a-icon type="ellipsis"
|
|
139
|
+
<a-icon type="ellipsis"/>
|
|
131
140
|
</a>
|
|
132
141
|
<a-menu slot="overlay">
|
|
133
142
|
<a-menu-item>
|
|
@@ -140,40 +149,53 @@
|
|
|
140
149
|
</a-dropdown>
|
|
141
150
|
<a-row :gutter="68">
|
|
142
151
|
<a-col :sm="12" :style="{ marginBottom: ' 24px'}" :xs="24">
|
|
143
|
-
<number-info
|
|
152
|
+
<number-info
|
|
153
|
+
:status="useGasSubValue.status"
|
|
154
|
+
:sub-total="useGasSubValue.subValue"
|
|
155
|
+
:total="todayUseGasTotalValue">
|
|
144
156
|
<span slot="subtitle">
|
|
145
157
|
<span>当天总用气量</span>
|
|
146
158
|
<a-tooltip slot="action" title="本日所有物联网表用户总用气量">
|
|
147
|
-
<a-icon :style="{ marginLeft: '8px' }" type="info-circle-o"
|
|
159
|
+
<a-icon :style="{ marginLeft: '8px' }" type="info-circle-o"/>
|
|
148
160
|
</a-tooltip>
|
|
149
161
|
</span>
|
|
150
162
|
</number-info>
|
|
151
163
|
<!-- miniChart -->
|
|
152
164
|
<div>
|
|
153
|
-
<mini-smooth-area
|
|
165
|
+
<mini-smooth-area
|
|
166
|
+
:dataSource="useGasWeekData"
|
|
167
|
+
:scale="useGasWeekDataScale"
|
|
168
|
+
:style="{ height: '45px' }"/>
|
|
154
169
|
</div>
|
|
155
170
|
</a-col>
|
|
156
171
|
<a-col :sm="12" :style="{ marginBottom: ' 24px'}" :xs="24">
|
|
157
|
-
<number-info
|
|
172
|
+
<number-info
|
|
173
|
+
:status="handPlanUserSubValue.status"
|
|
174
|
+
:sub-total="handPlanUserSubValue.subValue"
|
|
175
|
+
:total="todayHandPlanUserCount">
|
|
158
176
|
<span slot="subtitle">
|
|
159
177
|
<span>当天总抄表用户数</span>
|
|
160
178
|
<a-tooltip slot="action" title="当天总抄表用户数">
|
|
161
|
-
<a-icon :style="{ marginLeft: '8px' }" type="info-circle-o"
|
|
179
|
+
<a-icon :style="{ marginLeft: '8px' }" type="info-circle-o"/>
|
|
162
180
|
</a-tooltip>
|
|
163
181
|
</span>
|
|
164
182
|
</number-info>
|
|
165
183
|
<!-- miniChart -->
|
|
166
184
|
<div>
|
|
167
|
-
<mini-smooth-area
|
|
185
|
+
<mini-smooth-area
|
|
186
|
+
:dataSource="handPlanUserData"
|
|
187
|
+
:scale="handPlanUserDataScale"
|
|
188
|
+
:style="{ height: '45px' }"/>
|
|
168
189
|
</div>
|
|
169
190
|
</a-col>
|
|
170
191
|
</a-row>
|
|
171
192
|
<div class="ant-table-wrapper">
|
|
172
193
|
<a-table
|
|
194
|
+
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
|
173
195
|
:columns="searchTableColumns"
|
|
174
196
|
:dataSource="gasConsumptionRanking"
|
|
175
197
|
:pagination="{ pageSize: 5 }"
|
|
176
|
-
row-key="
|
|
198
|
+
row-key="f_userinfo_id"
|
|
177
199
|
size="small"
|
|
178
200
|
>
|
|
179
201
|
<span slot="range" slot-scope="text, record">
|
|
@@ -185,32 +207,40 @@
|
|
|
185
207
|
</div>
|
|
186
208
|
</x-card>
|
|
187
209
|
</a-col>
|
|
188
|
-
<a-col
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
210
|
+
<a-col
|
|
211
|
+
:lg="24"
|
|
212
|
+
:md="24"
|
|
213
|
+
:sm="24"
|
|
214
|
+
:xl="12"
|
|
215
|
+
:xs="24"
|
|
216
|
+
style="background-color:#fff">
|
|
217
|
+
<a-tabs
|
|
218
|
+
:activeKey="PieActiveKey"
|
|
219
|
+
tab-position="top"
|
|
220
|
+
:default-active-key="PieActiveKey"
|
|
221
|
+
:forceRender="true"
|
|
222
|
+
@change="handlePieTabChange">
|
|
223
|
+
<div slot="tabBarExtraContent" class="extra-wrapper">
|
|
224
|
+
<div class="extra-item">
|
|
225
|
+
<a-radio-group v-model="countPieMode" button-style="solid" @change="loadPieMode">
|
|
226
|
+
<a-radio-button value="now">本日</a-radio-button>
|
|
227
|
+
<a-radio-button value="week">本周</a-radio-button>
|
|
228
|
+
<a-radio-button value="month">本月</a-radio-button>
|
|
229
|
+
<a-radio-button value="year">近一年</a-radio-button>
|
|
196
230
|
</a-radio-group>
|
|
197
231
|
</div>
|
|
198
232
|
</div>
|
|
199
|
-
<
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
</v-chart>
|
|
211
|
-
</div>
|
|
212
|
-
</div>
|
|
213
|
-
</a-card>
|
|
233
|
+
<a-tab-pane key="properties" tab="用气量用气性质占比">
|
|
234
|
+
<x-card :loadState="radarLoadState_gasproperties" :retry="loadPieMode">
|
|
235
|
+
<div id="container_gasproperties"></div>
|
|
236
|
+
</x-card>
|
|
237
|
+
</a-tab-pane>
|
|
238
|
+
<a-tab-pane key="gasinuser" tab="用户用气量占比" :disabled="selectedRowKeys.length === 0 ">
|
|
239
|
+
<x-card :loadState="radarLoadState_gasInUser" :retry="loadGasInUser">
|
|
240
|
+
<div id="container_gasInUser"></div>
|
|
241
|
+
</x-card>
|
|
242
|
+
</a-tab-pane>
|
|
243
|
+
</a-tabs>
|
|
214
244
|
</a-col>
|
|
215
245
|
</a-row>
|
|
216
246
|
</div>
|
|
@@ -232,10 +262,22 @@ import {
|
|
|
232
262
|
MiniSmoothArea
|
|
233
263
|
} from '@vue2-client/components'
|
|
234
264
|
import { formatDate } from '@vue2-client/utils/util'
|
|
235
|
-
import { Line } from '@antv/g2plot'
|
|
265
|
+
import { Line, Pie, measureTextWidth } from '@antv/g2plot'
|
|
236
266
|
import { mapState } from 'vuex'
|
|
237
267
|
import { WebmeterAnalysisViewApi, post } from '@vue2-client/services/api'
|
|
238
268
|
|
|
269
|
+
function renderStatistic (containerWidth, text, style) {
|
|
270
|
+
const { width: textWidth, height: textHeight } = measureTextWidth(text, style)
|
|
271
|
+
const R = containerWidth / 2
|
|
272
|
+
// r^2 = (w / 2)^2 + (h - offsetY)^2
|
|
273
|
+
let scale = 1
|
|
274
|
+
if (containerWidth < textWidth) {
|
|
275
|
+
scale = Math.min(Math.sqrt(Math.abs(Math.pow(R, 2) / (Math.pow(textWidth / 2, 2) + Math.pow(textHeight, 2)))), 1)
|
|
276
|
+
}
|
|
277
|
+
const textStyleStr = `width:${containerWidth}px;`
|
|
278
|
+
return `<div style="${textStyleStr};font-size:${scale}em;line-height:${scale < 1 ? 1 : 'inherit'};">${text}</div>`
|
|
279
|
+
}
|
|
280
|
+
|
|
239
281
|
const barData = []
|
|
240
282
|
const barData2 = []
|
|
241
283
|
for (let i = 0; i < 12; i += 1) {
|
|
@@ -309,32 +351,6 @@ for (let i = 0; i < 5; i += 1) {
|
|
|
309
351
|
j++
|
|
310
352
|
}
|
|
311
353
|
|
|
312
|
-
const DataSet = require('@antv/data-set')
|
|
313
|
-
|
|
314
|
-
const sourceData = [
|
|
315
|
-
{ item: '远程开户', count: 32.2 },
|
|
316
|
-
{ item: '远程充值', count: 21 },
|
|
317
|
-
{ item: '阀门控制', count: 17 },
|
|
318
|
-
{ item: '远程调价', count: 13 },
|
|
319
|
-
{ item: '设置参数', count: 9 },
|
|
320
|
-
{ item: '远程注销', count: 7.8 }
|
|
321
|
-
]
|
|
322
|
-
|
|
323
|
-
const pieScale = [{
|
|
324
|
-
dataKey: 'percent',
|
|
325
|
-
min: 0,
|
|
326
|
-
formatter: '.0%'
|
|
327
|
-
}]
|
|
328
|
-
|
|
329
|
-
const dv = new DataSet.View().source(sourceData)
|
|
330
|
-
dv.transform({
|
|
331
|
-
type: 'percent',
|
|
332
|
-
field: 'count',
|
|
333
|
-
dimension: 'item',
|
|
334
|
-
as: 'percent'
|
|
335
|
-
})
|
|
336
|
-
const pieData = dv.rows
|
|
337
|
-
|
|
338
354
|
export default {
|
|
339
355
|
name: 'WebmeterAnalysisView',
|
|
340
356
|
components: {
|
|
@@ -421,13 +437,25 @@ export default {
|
|
|
421
437
|
|
|
422
438
|
// 统计模式
|
|
423
439
|
countMode: 'now',
|
|
440
|
+
// 圆饼图
|
|
441
|
+
countPieMode: 'now',
|
|
424
442
|
// 统计类型
|
|
425
443
|
tabActiveKey: '1',
|
|
444
|
+
// 统计类型
|
|
445
|
+
PieActiveKey: 'properties',
|
|
426
446
|
// >> 表具上报情况统计
|
|
427
447
|
// 上报统计图表
|
|
428
448
|
uploadCountPlot: undefined,
|
|
449
|
+
// 用气性质分析报表
|
|
450
|
+
gasPropertiesPlot: undefined,
|
|
451
|
+
// 用户用气占比
|
|
452
|
+
gasInUserPlot: undefined,
|
|
429
453
|
// 抄表情况分析Loading
|
|
430
454
|
radarLoadState: 'loading',
|
|
455
|
+
// 用气性质统计分析Loading
|
|
456
|
+
radarLoadState_gasproperties: 'loading',
|
|
457
|
+
// 用户在用气量中占比
|
|
458
|
+
radarLoadState_gasInUser: 'loading',
|
|
431
459
|
// >> 用气情况排行统计
|
|
432
460
|
// 用气情况排行统计Loading
|
|
433
461
|
useGasLoadState: 'loading',
|
|
@@ -471,18 +499,10 @@ export default {
|
|
|
471
499
|
searchUserData,
|
|
472
500
|
searchTableColumns,
|
|
473
501
|
searchData,
|
|
474
|
-
|
|
475
502
|
barData,
|
|
476
503
|
barData2,
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
pieScale,
|
|
480
|
-
pieData,
|
|
481
|
-
sourceData,
|
|
482
|
-
pieStyle: {
|
|
483
|
-
stroke: '#fff',
|
|
484
|
-
lineWidth: 1
|
|
485
|
-
}
|
|
504
|
+
// 左下列表选择框
|
|
505
|
+
selectedRowKeys: [],
|
|
486
506
|
}
|
|
487
507
|
},
|
|
488
508
|
mounted () {
|
|
@@ -498,6 +518,8 @@ export default {
|
|
|
498
518
|
this.getHandPlanCountByMeterBrand()
|
|
499
519
|
// 加载用气量统计
|
|
500
520
|
this.loadUseGasData()
|
|
521
|
+
// 加载按用气性质统计用气量
|
|
522
|
+
this.loadGasByGasProperties()
|
|
501
523
|
},
|
|
502
524
|
computed: {
|
|
503
525
|
...mapState('setting', ['isMobile']),
|
|
@@ -519,6 +541,164 @@ export default {
|
|
|
519
541
|
},
|
|
520
542
|
},
|
|
521
543
|
methods: {
|
|
544
|
+
onSelectChange (selectedRowKeys) {
|
|
545
|
+
this.selectedRowKeys = selectedRowKeys
|
|
546
|
+
if (selectedRowKeys.length > 0) {
|
|
547
|
+
if (this.PieActiveKey === 'properties') {
|
|
548
|
+
this.PieActiveKey = 'gasinuser'
|
|
549
|
+
}
|
|
550
|
+
this.loadGasInUser()
|
|
551
|
+
} else {
|
|
552
|
+
this.PieActiveKey = 'properties'
|
|
553
|
+
this.loadGasByGasProperties()
|
|
554
|
+
}
|
|
555
|
+
},
|
|
556
|
+
loadPieMode () {
|
|
557
|
+
if (this.PieActiveKey === 'properties') {
|
|
558
|
+
this.loadGasByGasProperties()
|
|
559
|
+
} else {
|
|
560
|
+
this.loadGasInUser()
|
|
561
|
+
}
|
|
562
|
+
},
|
|
563
|
+
// 加载按用气性质统计用气量
|
|
564
|
+
loadGasByGasProperties () {
|
|
565
|
+
this.radarLoadState_gasproperties = 'loading'
|
|
566
|
+
fetch(WebmeterAnalysisViewApi.GasByGasProperties, {
|
|
567
|
+
method: 'POST',
|
|
568
|
+
body: JSON.stringify({
|
|
569
|
+
type: this.countPieMode
|
|
570
|
+
})
|
|
571
|
+
}).then((res) => res.json())
|
|
572
|
+
.then((data) => {
|
|
573
|
+
const piePlot = {
|
|
574
|
+
appendPadding: 10,
|
|
575
|
+
data,
|
|
576
|
+
angleField: 'value',
|
|
577
|
+
colorField: 'type',
|
|
578
|
+
radius: 1,
|
|
579
|
+
innerRadius: 0.64,
|
|
580
|
+
meta: {
|
|
581
|
+
value: {
|
|
582
|
+
formatter: (v) => `${v} m³`,
|
|
583
|
+
},
|
|
584
|
+
},
|
|
585
|
+
label: {
|
|
586
|
+
type: 'inner',
|
|
587
|
+
offset: '-50%',
|
|
588
|
+
style: {
|
|
589
|
+
textAlign: 'center',
|
|
590
|
+
},
|
|
591
|
+
autoRotate: false,
|
|
592
|
+
content: '{value}',
|
|
593
|
+
},
|
|
594
|
+
statistic: {
|
|
595
|
+
title: {
|
|
596
|
+
offsetY: -4,
|
|
597
|
+
customHtml: (container, view, datum) => {
|
|
598
|
+
const { width, height } = container.getBoundingClientRect()
|
|
599
|
+
const d = Math.sqrt(Math.pow(width / 2, 2) + Math.pow(height / 2, 2))
|
|
600
|
+
const text = datum ? datum.type : '总计'
|
|
601
|
+
return renderStatistic(d, text, { fontSize: 28 })
|
|
602
|
+
},
|
|
603
|
+
},
|
|
604
|
+
content: {
|
|
605
|
+
offsetY: 4,
|
|
606
|
+
style: {
|
|
607
|
+
fontSize: '32px',
|
|
608
|
+
},
|
|
609
|
+
customHtml: (container, view, datum, data) => {
|
|
610
|
+
const { width } = container.getBoundingClientRect()
|
|
611
|
+
const text = datum ? `${datum.value}m³` : `${data.reduce((r, d) => r + d.value, 0)}m³`
|
|
612
|
+
return renderStatistic(width, text, { fontSize: 32 })
|
|
613
|
+
},
|
|
614
|
+
},
|
|
615
|
+
},
|
|
616
|
+
// 添加 中心统计文本 交互
|
|
617
|
+
interactions: [{ type: 'element-selected' }, { type: 'element-active' }, { type: 'pie-statistic-active' }],
|
|
618
|
+
}
|
|
619
|
+
if (this.gasPropertiesPlot) {
|
|
620
|
+
this.gasPropertiesPlot.update(piePlot)
|
|
621
|
+
} else {
|
|
622
|
+
this.gasPropertiesPlot = new Pie('container_gasproperties', piePlot)
|
|
623
|
+
this.gasPropertiesPlot.render()
|
|
624
|
+
}
|
|
625
|
+
this.radarLoadState_gasproperties = 'success'
|
|
626
|
+
})
|
|
627
|
+
.catch((ex) => {
|
|
628
|
+
console.error(ex)
|
|
629
|
+
this.radarLoadState_gasproperties = 'error'
|
|
630
|
+
})
|
|
631
|
+
},
|
|
632
|
+
// 加载按用气性质统计用气量
|
|
633
|
+
loadGasInUser () {
|
|
634
|
+
this.radarLoadState_gasInUser = 'loading'
|
|
635
|
+
fetch(WebmeterAnalysisViewApi.GasInUser, {
|
|
636
|
+
method: 'POST',
|
|
637
|
+
body: JSON.stringify({
|
|
638
|
+
type: this.countPieMode,
|
|
639
|
+
ids: this.selectedRowKeys.join(',')
|
|
640
|
+
})
|
|
641
|
+
}).then((res) => res.json())
|
|
642
|
+
.then((data) => {
|
|
643
|
+
const piePlot = {
|
|
644
|
+
appendPadding: 10,
|
|
645
|
+
data,
|
|
646
|
+
angleField: 'value',
|
|
647
|
+
colorField: 'name',
|
|
648
|
+
radius: 1,
|
|
649
|
+
innerRadius: 0.64,
|
|
650
|
+
meta: {
|
|
651
|
+
value: {
|
|
652
|
+
formatter: (v) => `${v} m³`,
|
|
653
|
+
},
|
|
654
|
+
},
|
|
655
|
+
label: {
|
|
656
|
+
type: 'inner',
|
|
657
|
+
offset: '-50%',
|
|
658
|
+
style: {
|
|
659
|
+
textAlign: 'center',
|
|
660
|
+
},
|
|
661
|
+
autoRotate: false,
|
|
662
|
+
content: '{value}',
|
|
663
|
+
},
|
|
664
|
+
statistic: {
|
|
665
|
+
title: {
|
|
666
|
+
offsetY: -4,
|
|
667
|
+
customHtml: (container, view, datum) => {
|
|
668
|
+
const { width, height } = container.getBoundingClientRect()
|
|
669
|
+
const d = Math.sqrt(Math.pow(width / 2, 2) + Math.pow(height / 2, 2))
|
|
670
|
+
const text = datum ? datum.name : '总计'
|
|
671
|
+
return renderStatistic(d, text, { fontSize: 24 })
|
|
672
|
+
},
|
|
673
|
+
},
|
|
674
|
+
content: {
|
|
675
|
+
offsetY: 4,
|
|
676
|
+
style: {
|
|
677
|
+
fontSize: '32px',
|
|
678
|
+
},
|
|
679
|
+
customHtml: (container, view, datum, data) => {
|
|
680
|
+
const { width } = container.getBoundingClientRect()
|
|
681
|
+
const text = datum ? `${datum.value}m³` : `${data.reduce((r, d) => r + d.value, 0)}m³`
|
|
682
|
+
return renderStatistic(width, text, { fontSize: 32 })
|
|
683
|
+
},
|
|
684
|
+
},
|
|
685
|
+
},
|
|
686
|
+
// 添加 中心统计文本 交互
|
|
687
|
+
interactions: [{ type: 'element-selected' }, { type: 'element-active' }, { type: 'pie-statistic-active' }],
|
|
688
|
+
}
|
|
689
|
+
if (this.gasInUserPlot) {
|
|
690
|
+
this.gasInUserPlot.update(piePlot)
|
|
691
|
+
} else {
|
|
692
|
+
this.gasInUserPlot = new Pie('container_gasInUser', piePlot)
|
|
693
|
+
this.gasInUserPlot.render()
|
|
694
|
+
}
|
|
695
|
+
this.radarLoadState_gasInUser = 'success'
|
|
696
|
+
})
|
|
697
|
+
.catch((ex) => {
|
|
698
|
+
console.error(ex)
|
|
699
|
+
this.radarLoadState_gasInUser = 'error'
|
|
700
|
+
})
|
|
701
|
+
},
|
|
522
702
|
/**
|
|
523
703
|
* 加载指令总数统计
|
|
524
704
|
*/
|
|
@@ -628,6 +808,14 @@ export default {
|
|
|
628
808
|
this.tabActiveKey = key + ''
|
|
629
809
|
this.updateDataByKey()
|
|
630
810
|
},
|
|
811
|
+
/**
|
|
812
|
+
* 右下圆饼图切换
|
|
813
|
+
*/
|
|
814
|
+
handlePieTabChange (key) {
|
|
815
|
+
this.PieActiveKey = key + ''
|
|
816
|
+
this.loadPieMode()
|
|
817
|
+
// this.updateDataByKey()
|
|
818
|
+
},
|
|
631
819
|
/**
|
|
632
820
|
* 根据模式更新数据
|
|
633
821
|
*/
|
|
@@ -748,6 +936,7 @@ export default {
|
|
|
748
936
|
|
|
749
937
|
.antd-pro-pages-dashboard-analysis-salesCard {
|
|
750
938
|
height: calc(100% - 24px);
|
|
939
|
+
|
|
751
940
|
/deep/ .ant-card-head {
|
|
752
941
|
position: relative;
|
|
753
942
|
}
|
|
@@ -756,12 +945,13 @@ export default {
|
|
|
756
945
|
.dashboard-analysis-iconGroup {
|
|
757
946
|
i {
|
|
758
947
|
margin-left: 16px;
|
|
759
|
-
color: rgba(0,0,0
|
|
948
|
+
color: rgba(0, 0, 0, .45);
|
|
760
949
|
cursor: pointer;
|
|
761
950
|
transition: color .32s;
|
|
762
951
|
color: black;
|
|
763
952
|
}
|
|
764
953
|
}
|
|
954
|
+
|
|
765
955
|
.analysis-salesTypeRadio {
|
|
766
956
|
position: absolute;
|
|
767
957
|
right: 54px;
|