vue2-client 1.2.101 → 1.2.102

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.
Files changed (32) hide show
  1. package/.env +15 -15
  2. package/.eslintrc.js +82 -82
  3. package/CHANGELOG.md +246 -245
  4. package/package.json +92 -92
  5. package/src/base-client/all.js +66 -66
  6. package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +113 -113
  7. package/src/base-client/components/common/CitySelect/CitySelect.vue +244 -244
  8. package/src/base-client/components/common/CitySelect/index.js +3 -3
  9. package/src/base-client/components/common/CitySelect/index.md +109 -109
  10. package/src/base-client/components/common/CreateQuery/CreateQuery.vue +547 -547
  11. package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +778 -778
  12. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +310 -310
  13. package/src/base-client/components/common/PersonSetting/PersonSetting.vue +210 -210
  14. package/src/base-client/components/common/PersonSetting/index.js +3 -3
  15. package/src/base-client/components/common/Upload/Upload.vue +157 -157
  16. package/src/base-client/components/common/Upload/index.js +3 -3
  17. package/src/base-client/components/common/XAddForm/XAddForm.vue +349 -349
  18. package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +322 -322
  19. package/src/base-client/components/common/XForm/XForm.vue +268 -268
  20. package/src/base-client/components/common/XForm/XFormItem.vue +371 -371
  21. package/src/base-client/components/common/XFormTable/XFormTable.vue +507 -507
  22. package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +960 -960
  23. package/src/config/CreateQueryConfig.js +307 -307
  24. package/src/layouts/header/HeaderNotice.vue +199 -164
  25. package/src/layouts/header/InstitutionDetail.vue +177 -177
  26. package/src/pages/system/ticket/index.vue +5 -68
  27. package/src/router/async/router.map.js +60 -60
  28. package/src/services/api/TicketDetailsViewApi.js +1 -3
  29. package/src/services/api/WebmeterAnalysisViewApi.js +24 -24
  30. package/src/services/api/manage.js +16 -16
  31. package/src/services/api/restTools.js +24 -24
  32. package/vue.config.js +163 -163
@@ -1,960 +1,960 @@
1
- <template>
2
- <a-page-header title="物联网运行维护">
3
- <div>
4
- <a-row :gutter="24">
5
- <a-col :md="12" :sm="24" :style="{ marginBottom: '24px' }" :xl="6">
6
- <x-card :loadState="instructSumLoadState" :retry="loadInstructSumCount">
7
- <chart-card :total="instructSum | NumberFormat" title="总指令数">
8
- <a-tooltip slot="action" :style="{ marginRight: '10px' }" title="刷新" @click="loadInstructSumCount()">
9
- <a-icon type="redo"/>
10
- </a-tooltip>
11
- <a-tooltip slot="action" title="生成的所有指令总数">
12
- <a-icon type="info-circle-o"/>
13
- </a-tooltip>
14
- <div>
15
- <trend :flag="instructYoW >= 0 ? 'up' : 'down'" style="margin-right: 16px;">
16
- <span slot="term">同周比</span>
17
- {{ instructYoW + '%' }}
18
- </trend>
19
- <trend :flag="instructYoD >= 0 ? 'up' : 'down'">
20
- <span slot="term">日同比</span>
21
- {{ instructYoD + '%' }}
22
- </trend>
23
- </div>
24
- <template slot="footer">昨日新增 <span>{{ instructYesAdd | NumberFormat }}</span></template>
25
- </chart-card>
26
- </x-card>
27
- </a-col>
28
- <a-col :md="12" :sm="24" :style="{ marginBottom: '24px' }" :xl="6">
29
- <x-card :loadState="metereadSumLoadState" :retry="loadMetereadSumCount">
30
- <chart-card :total="metereadSum | NumberFormat" title="总抄表量">
31
- <a-tooltip slot="action" :style="{ marginRight: '10px' }" title="刷新" @click="loadMetereadSumCount()">
32
- <a-icon type="redo"/>
33
- </a-tooltip>
34
- <a-tooltip slot="action" title="生成的所有抄表(meteread)总数">
35
- <a-icon type="info-circle-o"/>
36
- </a-tooltip>
37
- <div>
38
- <mini-area :dataSource="metereadSumDataByWeek" :scale="metereadSumByWeekScale"/>
39
- </div>
40
- <template slot="footer">昨日新增 <span> {{ metereadYesAdd | NumberFormat }}</span></template>
41
- </chart-card>
42
- </x-card>
43
- </a-col>
44
- <a-col :md="12" :sm="24" :style="{ marginBottom: '24px' }" :xl="6">
45
- <x-card :loadState="usingMeterSumLoadState" :retry="loadUsingMeterSumCount">
46
- <chart-card :total="usingMeterSum | NumberFormat" title="在用表具数">
47
- <a-tooltip slot="action" :style="{ marginRight: '10px' }" title="刷新" @click="loadUsingMeterSumCount()">
48
- <a-icon type="redo"/>
49
- </a-tooltip>
50
- <a-tooltip slot="action" title="开户成功的物联网表总数">
51
- <a-icon type="info-circle-o"/>
52
- </a-tooltip>
53
- <div>
54
- <mini-bar :dataSource="usingMeterSumDataByWeek" :scale="usingMeterSumByWeekScale"/>
55
- </div>
56
- <template slot="footer">昨日新增 <span>{{ usingMeterYesAdd | NumberFormat }}</span></template>
57
- </chart-card>
58
- </x-card>
59
- </a-col>
60
- <a-col :md="12" :sm="24" :style="{ marginBottom: '24px' }" :xl="6">
61
- <x-card :loadState="instructRateOfSuccessLoadState" :retry="loadInstructRateOfSuccess">
62
- <chart-card :total="instructRateOfSuccessValue + '%'" title="指令下发成功率">
63
- <a-tooltip slot="action" :style="{ marginRight: '10px' }" title="刷新" @click="loadInstructRateOfSuccess()">
64
- <a-icon type="redo"/>
65
- </a-tooltip>
66
- <a-tooltip slot="action" title="执行成功和已发送状态的指令占所有指令的比例">
67
- <a-icon type="info-circle-o"/>
68
- </a-tooltip>
69
- <div>
70
- <mini-progress
71
- :color="instructRateOfColor"
72
- :percentage="instructRateOfSuccessValue"
73
- :target="90"
74
- height="8px"/>
75
- </div>
76
- <template slot="footer">
77
- <trend :flag="instructRateOfSuccessYoW >= 0 ? 'up' : 'down'" style="margin-right: 16px;">
78
- <span slot="term">同周比</span>
79
- {{ instructRateOfSuccessYoW + '%' }}
80
- </trend>
81
- <trend :flag="instructRateOfSuccessYoD >= 0 ? 'up' : 'down'" style="margin-right: 16px;">
82
- <span slot="term">日同比</span>
83
- {{ instructRateOfSuccessYoD + '%' }}
84
- </trend>
85
- <span slot="term">昨日成功率</span>
86
- {{ yesterdayInstructRateOf + '%' }}
87
- </template>
88
- </chart-card>
89
- </x-card>
90
- </a-col>
91
- </a-row>
92
-
93
- <a-card :body-style="{padding: '0'}" :bordered="false">
94
- <div class="salesCard">
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">
101
- <div slot="tabBarExtraContent" class="extra-wrapper">
102
- <div class="extra-item">
103
- <a-radio-group v-model="countMode" button-style="solid" @change="toggleCountMode">
104
- <a-radio-button value="now">最近24小时</a-radio-button>
105
- <a-radio-button value="week">近一周</a-radio-button>
106
- <a-radio-button value="month">近一个月</a-radio-button>
107
- <a-radio-button value="year">近一年</a-radio-button>
108
- </a-radio-group>
109
- </div>
110
- <a-range-picker :style="{width: '256px'}"/>
111
- </div>
112
- <a-tab-pane key="1" tab="抄表情况分析">
113
- <a-row :lg="24" :md="24" :sm="24" :xl="24" :xs="24">
114
- <x-card :loadState="radarLoadState" :retry="getHandPlanCountByMeterBrand">
115
- <div id="container" style="padding: 0 0 0 20px;height: 370px"/>
116
- </x-card>
117
- </a-row>
118
- </a-tab-pane>
119
- <a-tab-pane key="2" tab="访问量">
120
- <a-row>
121
- <a-col :lg="12" :md="12" :sm="24" :xl="16" :xs="24">
122
- <bar :data="barData2" title="销售额趋势"/>
123
- </a-col>
124
- <a-col :lg="12" :md="12" :sm="24" :xl="8" :xs="24">
125
- <rank-list :list="rankList" title="门店销售排行榜"/>
126
- </a-col>
127
- </a-row>
128
- </a-tab-pane>
129
- </a-tabs>
130
- </div>
131
- </a-card>
132
-
133
- <div :class="!isMobile && 'desktop'" class="antd-pro-pages-dashboard-analysis-twoColLayout">
134
- <a-row :gutter="24" :style="{ marginTop: '24px' }" type="flex">
135
- <a-col :lg="24" :md="24" :sm="24" :xl="12" :xs="24">
136
- <x-card :bordered="false" :loadState="useGasLoadState" :retry="loadUseGasData" title="用气情况排行">
137
- <a-dropdown slot="extra" :trigger="['click']" placement="bottomLeft">
138
- <a class="ant-dropdown-link" href="#">
139
- <a-icon type="ellipsis"/>
140
- </a>
141
- <a-menu slot="overlay">
142
- <a-menu-item>
143
- <a href="javascript:">操作一</a>
144
- </a-menu-item>
145
- <a-menu-item>
146
- <a href="javascript;">操作二</a>
147
- </a-menu-item>
148
- </a-menu>
149
- </a-dropdown>
150
- <a-row :gutter="68">
151
- <a-col :sm="12" :style="{ marginBottom: ' 24px'}" :xs="24">
152
- <number-info
153
- :status="useGasSubValue.status"
154
- :sub-total="useGasSubValue.subValue"
155
- :total="todayUseGasTotalValue">
156
- <span slot="subtitle">
157
- <span>当天总用气量</span>
158
- <a-tooltip slot="action" title="本日所有物联网表用户总用气量">
159
- <a-icon :style="{ marginLeft: '8px' }" type="info-circle-o"/>
160
- </a-tooltip>
161
- </span>
162
- </number-info>
163
- <!-- miniChart -->
164
- <div>
165
- <mini-smooth-area
166
- :dataSource="useGasWeekData"
167
- :scale="useGasWeekDataScale"
168
- :style="{ height: '45px' }"/>
169
- </div>
170
- </a-col>
171
- <a-col :sm="12" :style="{ marginBottom: ' 24px'}" :xs="24">
172
- <number-info
173
- :status="handPlanUserSubValue.status"
174
- :sub-total="handPlanUserSubValue.subValue"
175
- :total="todayHandPlanUserCount">
176
- <span slot="subtitle">
177
- <span>当天总抄表用户数</span>
178
- <a-tooltip slot="action" title="当天总抄表用户数">
179
- <a-icon :style="{ marginLeft: '8px' }" type="info-circle-o"/>
180
- </a-tooltip>
181
- </span>
182
- </number-info>
183
- <!-- miniChart -->
184
- <div>
185
- <mini-smooth-area
186
- :dataSource="handPlanUserData"
187
- :scale="handPlanUserDataScale"
188
- :style="{ height: '45px' }"/>
189
- </div>
190
- </a-col>
191
- </a-row>
192
- <div class="ant-table-wrapper">
193
- <a-table
194
- :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
195
- :columns="searchTableColumns"
196
- :dataSource="gasConsumptionRanking"
197
- :pagination="{ pageSize: 5 }"
198
- row-key="f_userinfo_id"
199
- size="small"
200
- >
201
- <span slot="range" slot-scope="text, record">
202
- <trend :flag="record.status === 0 ? 'up' : 'down'">
203
- {{ text }}%
204
- </trend>
205
- </span>
206
- </a-table>
207
- </div>
208
- </x-card>
209
- </a-col>
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>
230
- </a-radio-group>
231
- </div>
232
- </div>
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>
244
- </a-col>
245
- </a-row>
246
- </div>
247
- </div>
248
- </a-page-header>
249
- </template>
250
-
251
- <script>
252
- import moment from 'moment'
253
- import {
254
- ChartCard,
255
- MiniArea,
256
- MiniBar,
257
- MiniProgress,
258
- RankList,
259
- Bar,
260
- Trend,
261
- NumberInfo,
262
- MiniSmoothArea
263
- } from '@vue2-client/components'
264
- import { formatDate } from '@vue2-client/utils/util'
265
- import { Line, Pie, measureTextWidth } from '@antv/g2plot'
266
- import { mapState } from 'vuex'
267
- import { WebmeterAnalysisViewApi, post } from '@vue2-client/services/api'
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
-
281
- const barData = []
282
- const barData2 = []
283
- for (let i = 0; i < 12; i += 1) {
284
- barData.push({
285
- x: `${i + 1}月`,
286
- y: Math.floor(Math.random() * 1000) + 200
287
- })
288
- barData2.push({
289
- x: `${i + 1}月`,
290
- y: Math.floor(Math.random() * 1000) + 200
291
- })
292
- }
293
-
294
- const rankList = []
295
- for (let i = 0; i < 7; i++) {
296
- rankList.push({
297
- name: '白鹭岛 ' + (i + 1) + ' 号店',
298
- total: 1234.56 - i * 100
299
- })
300
- }
301
-
302
- const searchUserData = []
303
- for (let i = 0; i < 7; i++) {
304
- searchUserData.push({
305
- x: moment().add(i, 'days').format('YYYY-MM-DD'),
306
- y: Math.ceil(Math.random() * 10)
307
- })
308
- }
309
-
310
- const searchTableColumns = [
311
- {
312
- dataIndex: 'f_userinfo_id',
313
- title: '用户编号',
314
- width: 90
315
- },
316
- {
317
- dataIndex: 'f_user_name',
318
- title: '用户姓名'
319
- },
320
- {
321
- dataIndex: 'count',
322
- title: '用气量'
323
- },
324
- {
325
- dataIndex: 'range',
326
- title: '周涨幅',
327
- align: 'right',
328
- sorter: (a, b) => a.range - b.range,
329
- scopedSlots: { customRender: 'range' }
330
- }
331
- ]
332
-
333
- const userInfoArray = [
334
- '德昌鸿公司2',
335
- '瑞鑫宇公司',
336
- '保康县熊绎中学',
337
- '文康置业有限公司',
338
- '湖北省旗星文化旅游实业有限公司'
339
- ]
340
-
341
- const searchData = []
342
- let j = 0
343
- for (let i = 0; i < 5; i += 1) {
344
- searchData.push({
345
- index: Math.floor(Math.random() * 10000000),
346
- keyword: userInfoArray[j],
347
- count: Math.floor(Math.random() * 1000),
348
- range: Math.floor(Math.random() * 10),
349
- status: Math.floor((Math.random() * 10) % 2)
350
- })
351
- j++
352
- }
353
-
354
- export default {
355
- name: 'WebmeterAnalysisView',
356
- components: {
357
- ChartCard,
358
- MiniArea,
359
- MiniBar,
360
- MiniProgress,
361
- RankList,
362
- Bar,
363
- Trend,
364
- NumberInfo,
365
- MiniSmoothArea
366
- },
367
- data () {
368
- return {
369
- // 页面宽度
370
- screenWidth: document.documentElement.clientWidth,
371
- // 客户名称
372
- customerName: '',
373
- // >> 指令总数统计
374
- // 指令数统计Loading
375
- instructSumLoadState: 'loading',
376
- // 总指令数
377
- instructSum: 0,
378
- // 同周比
379
- instructYoW: 0,
380
- // 日同比
381
- instructYoD: 0,
382
- // 昨日新增指令数
383
- instructYesAdd: 0,
384
- // >> 抄表量统计
385
- // 抄表量统计Loading
386
- metereadSumLoadState: 'loading',
387
- // 总抄表量
388
- metereadSum: 0,
389
- // 昨日新增抄表量
390
- metereadYesAdd: 0,
391
- // 近一周抄表量明细
392
- metereadSumDataByWeek: [],
393
- // 近一周抄表量明细列
394
- metereadSumByWeekScale: [
395
- {
396
- dataKey: 'x',
397
- alias: '时间'
398
- },
399
- {
400
- dataKey: 'y',
401
- alias: '抄表量'
402
- }
403
- ],
404
- // >> 在用表具数统计
405
- // 在用表具统计Loading
406
- usingMeterSumLoadState: 'loading',
407
- // 在用表具总量
408
- usingMeterSum: 0,
409
- // 昨日新增在用表具量
410
- usingMeterYesAdd: 0,
411
- // 近一周新增在用表具明细
412
- usingMeterSumDataByWeek: [],
413
- // 近一周新增在用表具明细列
414
- usingMeterSumByWeekScale: [
415
- {
416
- dataKey: 'x',
417
- alias: '时间'
418
- },
419
- {
420
- dataKey: 'y',
421
- alias: '开户数'
422
- }
423
- ],
424
- // >> 表具指令下发成功率统计
425
- // 表具指令成功率
426
- instructRateOfSuccessValue: 0,
427
- // 昨日指令成功率
428
- yesterdayInstructRateOf: 0,
429
- // 同周比
430
- instructRateOfSuccessYoW: 0,
431
- // 日同比
432
- instructRateOfSuccessYoD: 0,
433
- // 指令成功率进度色
434
- instructRateOfColor: 'rgb(19, 194, 194)',
435
- // 表具指令下发成功率加载状态
436
- instructRateOfSuccessLoadState: 'loading',
437
-
438
- // 统计模式
439
- countMode: 'now',
440
- // 圆饼图
441
- countPieMode: 'now',
442
- // 统计类型
443
- tabActiveKey: '1',
444
- // 统计类型
445
- PieActiveKey: 'properties',
446
- // >> 表具上报情况统计
447
- // 上报统计图表
448
- uploadCountPlot: undefined,
449
- // 用气性质分析报表
450
- gasPropertiesPlot: undefined,
451
- // 用户用气占比
452
- gasInUserPlot: undefined,
453
- // 抄表情况分析Loading
454
- radarLoadState: 'loading',
455
- // 用气性质统计分析Loading
456
- radarLoadState_gasproperties: 'loading',
457
- // 用户在用气量中占比
458
- radarLoadState_gasInUser: 'loading',
459
- // >> 用气情况排行统计
460
- // 用气情况排行统计Loading
461
- useGasLoadState: 'loading',
462
- // 当天总用气量
463
- todayUseGasTotalValue: 0,
464
- // 昨天总用气量
465
- yesterdayUseGasTotalValue: 0,
466
- // 近一周的每天用气情况
467
- useGasWeekData: [],
468
- useGasWeekDataScale: [
469
- {
470
- dataKey: 'x',
471
- alias: '时间'
472
- },
473
- {
474
- dataKey: 'y',
475
- alias: '用气量'
476
- }
477
- ],
478
- // 当天抄表用户数
479
- todayHandPlanUserCount: 0,
480
- // 昨天抄表用户数
481
- yesterdayHandPlanUserCount: 0,
482
- // 近一周的每天抄表情况
483
- handPlanUserData: [],
484
- handPlanUserDataScale: [
485
- {
486
- dataKey: 'x',
487
- alias: '时间'
488
- },
489
- {
490
- dataKey: 'y',
491
- alias: '用户数'
492
- }
493
- ],
494
- // 用气排行榜
495
- gasConsumptionRanking: [],
496
- rankList,
497
-
498
- // 搜索用户数
499
- searchUserData,
500
- searchTableColumns,
501
- searchData,
502
- barData,
503
- barData2,
504
- // 左下列表选择框
505
- selectedRowKeys: [],
506
- }
507
- },
508
- mounted () {
509
- // 加载指令数统计
510
- this.loadInstructSumCount()
511
- // 加载抄表量统计
512
- this.loadMetereadSumCount()
513
- // 加载在用表具量统计
514
- this.loadUsingMeterSumCount()
515
- // 加载指令成功率统计
516
- this.loadInstructRateOfSuccess()
517
- // 加载各表厂表具上报情况统计
518
- this.getHandPlanCountByMeterBrand()
519
- // 加载用气量统计
520
- this.loadUseGasData()
521
- // 加载按用气性质统计用气量
522
- this.loadGasByGasProperties()
523
- },
524
- computed: {
525
- ...mapState('setting', ['isMobile']),
526
- useGasSubValue: function () {
527
- const subValue = this.todayUseGasTotalValue - this.yesterdayUseGasTotalValue
528
- const status = subValue >= 0 ? 'up' : 'down'
529
- return {
530
- subValue: subValue,
531
- status: status
532
- }
533
- },
534
- handPlanUserSubValue: function () {
535
- const subValue = this.todayHandPlanUserCount - this.yesterdayHandPlanUserCount
536
- const status = subValue >= 0 ? 'up' : 'down'
537
- return {
538
- subValue: subValue,
539
- status: status
540
- }
541
- },
542
- },
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
- },
702
- /**
703
- * 加载指令总数统计
704
- */
705
- loadInstructSumCount () {
706
- this.instructSumLoadState = 'loading'
707
- post(WebmeterAnalysisViewApi.instructSumCount, {}).then(res => {
708
- this.instructSum = res.instructSum
709
- this.instructYoW = res.instructYoW
710
- this.instructYoD = res.instructYoD
711
- this.instructYesAdd = res.instructYesAdd
712
- this.instructSumLoadState = 'success'
713
- }, err => {
714
- console.warn(err)
715
- this.instructSumLoadState = 'error'
716
- })
717
- },
718
- /**
719
- * 加载抄表总数统计
720
- */
721
- loadMetereadSumCount () {
722
- this.metereadSumDataByWeek = []
723
- this.metereadSumLoadState = 'loading'
724
- post(WebmeterAnalysisViewApi.meteReadSumCount, {}).then(res => {
725
- // 加载近一周抄表数图表
726
- post(WebmeterAnalysisViewApi.meteReadDataByWeek, {}).then(res => {
727
- for (let i = 0, len = res.length; i < len; i++) {
728
- this.metereadSumDataByWeek.push({
729
- x: res[i].date,
730
- y: res[i].num
731
- })
732
- }
733
- })
734
- this.metereadSum = res.metereadSum
735
- this.metereadYesAdd = res.metereadYesAdd
736
- this.metereadSumLoadState = 'success'
737
- }, err => {
738
- console.warn(err)
739
- this.metereadSumLoadState = 'error'
740
- })
741
- },
742
- /**
743
- * 加载在用表具总数情况
744
- */
745
- loadUsingMeterSumCount () {
746
- this.usingMeterSumDataByWeek = []
747
- this.usingMeterSumLoadState = 'loading'
748
- return post(WebmeterAnalysisViewApi.usingMeterSumCount, {}).then(res => {
749
- // 加载近一周开户数图表
750
- post(WebmeterAnalysisViewApi.usingMeterDataByWeek, {}).then(res => {
751
- for (let i = 0, len = res.length; i < len; i++) {
752
- this.usingMeterSumDataByWeek.push({
753
- x: res[i].date,
754
- y: res[i].num
755
- })
756
- }
757
- })
758
- this.usingMeterSum = res.usingMeterSum
759
- this.usingMeterYesAdd = res.usingMeterYesAdd
760
- this.usingMeterSumLoadState = 'success'
761
- }, err => {
762
- console.warn(err)
763
- this.usingMeterSumLoadState = 'error'
764
- })
765
- },
766
- /**
767
- * 加载表具指令下发成功率
768
- */
769
- loadInstructRateOfSuccess () {
770
- this.instructRateOfSuccessLoadState = 'loading'
771
- post(WebmeterAnalysisViewApi.instructRateOfSuccess, {}).then(res => {
772
- this.instructRateOfSuccessValue = res.instructRateOfSuccessValue * 1.0
773
- if (this.instructRateOfSuccessValue < 70.0) {
774
- this.instructRateOfColor = 'rgb(242, 99, 123)'
775
- } else if (this.instructRateOfSuccessValue < 90.0) {
776
- this.instructRateOfColor = 'rgb(251, 212, 55)'
777
- } else {
778
- this.instructRateOfColor = 'rgb(19, 194, 194)'
779
- }
780
- this.instructRateOfSuccessYoW = res.instructRateOfSuccessYoW
781
- this.instructRateOfSuccessYoD = res.instructRateOfSuccessYoD
782
- this.yesterdayInstructRateOf = res.yesterdayInstructRateOf
783
- this.instructRateOfSuccessLoadState = 'success'
784
- }, err => {
785
- console.warn(err)
786
- this.instructRateOfSuccessLoadState = 'error'
787
- })
788
- },
789
- /**
790
- * 格式化日期
791
- * @param date 日期字符串
792
- * @param format 格式化方式
793
- * @returns {string|*} 格式化结果
794
- */
795
- format (date, format) {
796
- return formatDate(date, format)
797
- },
798
- /**
799
- * 切换周期
800
- */
801
- toggleCountMode () {
802
- this.updateDataByKey()
803
- },
804
- /**
805
- * Tab切换
806
- */
807
- handleTabChange (key) {
808
- this.tabActiveKey = key + ''
809
- this.updateDataByKey()
810
- },
811
- /**
812
- * 右下圆饼图切换
813
- */
814
- handlePieTabChange (key) {
815
- this.PieActiveKey = key + ''
816
- this.loadPieMode()
817
- // this.updateDataByKey()
818
- },
819
- /**
820
- * 根据模式更新数据
821
- */
822
- updateDataByKey () {
823
- if (this.tabActiveKey === '1') {
824
- this.getHandPlanCountByMeterBrand()
825
- } else {
826
- // this.getDeviceLostContactCountData()
827
- // this.getDeviceLostContactRankData()
828
- }
829
- },
830
- /**
831
- * 获取各表厂表具上报情况
832
- */
833
- getHandPlanCountByMeterBrand () {
834
- this.radarLoadState = 'loading'
835
- fetch(WebmeterAnalysisViewApi.handMeterSumCountData, {
836
- method: 'POST',
837
- body: JSON.stringify({
838
- type: this.countMode
839
- })
840
- }).then((res) => res.json())
841
- .then((data) => {
842
- const plotOption = {
843
- data,
844
- xField: 'date',
845
- yField: 'value',
846
- seriesField: 'name',
847
- yAxis: {
848
- label: {
849
- // 数值格式化为千分位
850
- formatter: (v) => `${v}`.replace(/\d{1,3}(?=(\d{3})+$)/g, (s) => `${s},`)
851
- }
852
- },
853
- tooltip: {
854
- shared: true
855
- },
856
- interactions: [{ type: 'brush' }],
857
- slider: {
858
- start: 0,
859
- end: 1
860
- },
861
- legend: {
862
- position: 'top',
863
- radio: true,
864
- flipPage: false
865
- },
866
- smooth: true
867
- }
868
- if (this.uploadCountPlot) {
869
- this.uploadCountPlot.update(plotOption)
870
- } else {
871
- this.uploadCountPlot = new Line('container', plotOption)
872
- this.uploadCountPlot.render()
873
- }
874
- this.radarLoadState = 'success'
875
- })
876
- .catch((ex) => {
877
- console.error(ex)
878
- this.radarLoadState = 'error'
879
- })
880
- },
881
- /**
882
- * 获取用气请求排行
883
- */
884
- loadUseGasData () {
885
- this.gasConsumptionRanking = []
886
- this.useGasLoadState = 'loading'
887
- return post(WebmeterAnalysisViewApi.useGasSumCount, {}).then(res => {
888
- this.gasConsumptionRanking = res.gasConsumptionRanking
889
- this.todayUseGasTotalValue = res.todayUseGasTotalValue
890
- this.todayHandPlanUserCount = res.todayHandPlanUserCount
891
- this.yesterdayUseGasTotalValue = res.yesterdayUseGasTotalValue
892
- this.yesterdayHandPlanUserCount = res.yesterdayHandPlanUserCount
893
- this.useGasWeekData = res.useGasWeekData
894
- this.handPlanUserData = res.handPlanUserData
895
- this.useGasLoadState = 'success'
896
- }, err => {
897
- console.warn(err)
898
- this.useGasLoadState = 'error'
899
- })
900
- }
901
- }
902
- }
903
- </script>
904
-
905
- <style lang="less" scoped>
906
-
907
- .text {
908
- color: rgba(0, 0, 0, .45);
909
- }
910
-
911
- .heading {
912
- color: rgba(0, 0, 0, .85);
913
- font-size: 20px;
914
- }
915
-
916
- .extra-wrapper {
917
- line-height: 55px;
918
- padding-right: 24px;
919
-
920
- .extra-item {
921
- display: inline-block;
922
- margin-right: 24px;
923
-
924
- a {
925
- margin-left: 24px;
926
- }
927
- }
928
- }
929
-
930
- .antd-pro-pages-dashboard-analysis-twoColLayout {
931
- position: relative;
932
- display: flex;
933
- display: block;
934
- flex-flow: row wrap;
935
- }
936
-
937
- .antd-pro-pages-dashboard-analysis-salesCard {
938
- height: calc(100% - 24px);
939
-
940
- /deep/ .ant-card-head {
941
- position: relative;
942
- }
943
- }
944
-
945
- .dashboard-analysis-iconGroup {
946
- i {
947
- margin-left: 16px;
948
- color: rgba(0, 0, 0, .45);
949
- cursor: pointer;
950
- transition: color .32s;
951
- color: black;
952
- }
953
- }
954
-
955
- .analysis-salesTypeRadio {
956
- position: absolute;
957
- right: 54px;
958
- bottom: 12px;
959
- }
960
- </style>
1
+ <template>
2
+ <a-page-header title="物联网运行维护">
3
+ <div>
4
+ <a-row :gutter="24">
5
+ <a-col :md="12" :sm="24" :style="{ marginBottom: '24px' }" :xl="6">
6
+ <x-card :loadState="instructSumLoadState" :retry="loadInstructSumCount">
7
+ <chart-card :total="instructSum | NumberFormat" title="总指令数">
8
+ <a-tooltip slot="action" :style="{ marginRight: '10px' }" title="刷新" @click="loadInstructSumCount()">
9
+ <a-icon type="redo"/>
10
+ </a-tooltip>
11
+ <a-tooltip slot="action" title="生成的所有指令总数">
12
+ <a-icon type="info-circle-o"/>
13
+ </a-tooltip>
14
+ <div>
15
+ <trend :flag="instructYoW >= 0 ? 'up' : 'down'" style="margin-right: 16px;">
16
+ <span slot="term">同周比</span>
17
+ {{ instructYoW + '%' }}
18
+ </trend>
19
+ <trend :flag="instructYoD >= 0 ? 'up' : 'down'">
20
+ <span slot="term">日同比</span>
21
+ {{ instructYoD + '%' }}
22
+ </trend>
23
+ </div>
24
+ <template slot="footer">昨日新增 <span>{{ instructYesAdd | NumberFormat }}</span></template>
25
+ </chart-card>
26
+ </x-card>
27
+ </a-col>
28
+ <a-col :md="12" :sm="24" :style="{ marginBottom: '24px' }" :xl="6">
29
+ <x-card :loadState="metereadSumLoadState" :retry="loadMetereadSumCount">
30
+ <chart-card :total="metereadSum | NumberFormat" title="总抄表量">
31
+ <a-tooltip slot="action" :style="{ marginRight: '10px' }" title="刷新" @click="loadMetereadSumCount()">
32
+ <a-icon type="redo"/>
33
+ </a-tooltip>
34
+ <a-tooltip slot="action" title="生成的所有抄表(meteread)总数">
35
+ <a-icon type="info-circle-o"/>
36
+ </a-tooltip>
37
+ <div>
38
+ <mini-area :dataSource="metereadSumDataByWeek" :scale="metereadSumByWeekScale"/>
39
+ </div>
40
+ <template slot="footer">昨日新增 <span> {{ metereadYesAdd | NumberFormat }}</span></template>
41
+ </chart-card>
42
+ </x-card>
43
+ </a-col>
44
+ <a-col :md="12" :sm="24" :style="{ marginBottom: '24px' }" :xl="6">
45
+ <x-card :loadState="usingMeterSumLoadState" :retry="loadUsingMeterSumCount">
46
+ <chart-card :total="usingMeterSum | NumberFormat" title="在用表具数">
47
+ <a-tooltip slot="action" :style="{ marginRight: '10px' }" title="刷新" @click="loadUsingMeterSumCount()">
48
+ <a-icon type="redo"/>
49
+ </a-tooltip>
50
+ <a-tooltip slot="action" title="开户成功的物联网表总数">
51
+ <a-icon type="info-circle-o"/>
52
+ </a-tooltip>
53
+ <div>
54
+ <mini-bar :dataSource="usingMeterSumDataByWeek" :scale="usingMeterSumByWeekScale"/>
55
+ </div>
56
+ <template slot="footer">昨日新增 <span>{{ usingMeterYesAdd | NumberFormat }}</span></template>
57
+ </chart-card>
58
+ </x-card>
59
+ </a-col>
60
+ <a-col :md="12" :sm="24" :style="{ marginBottom: '24px' }" :xl="6">
61
+ <x-card :loadState="instructRateOfSuccessLoadState" :retry="loadInstructRateOfSuccess">
62
+ <chart-card :total="instructRateOfSuccessValue + '%'" title="指令下发成功率">
63
+ <a-tooltip slot="action" :style="{ marginRight: '10px' }" title="刷新" @click="loadInstructRateOfSuccess()">
64
+ <a-icon type="redo"/>
65
+ </a-tooltip>
66
+ <a-tooltip slot="action" title="执行成功和已发送状态的指令占所有指令的比例">
67
+ <a-icon type="info-circle-o"/>
68
+ </a-tooltip>
69
+ <div>
70
+ <mini-progress
71
+ :color="instructRateOfColor"
72
+ :percentage="instructRateOfSuccessValue"
73
+ :target="90"
74
+ height="8px"/>
75
+ </div>
76
+ <template slot="footer">
77
+ <trend :flag="instructRateOfSuccessYoW >= 0 ? 'up' : 'down'" style="margin-right: 16px;">
78
+ <span slot="term">同周比</span>
79
+ {{ instructRateOfSuccessYoW + '%' }}
80
+ </trend>
81
+ <trend :flag="instructRateOfSuccessYoD >= 0 ? 'up' : 'down'" style="margin-right: 16px;">
82
+ <span slot="term">日同比</span>
83
+ {{ instructRateOfSuccessYoD + '%' }}
84
+ </trend>
85
+ <span slot="term">昨日成功率</span>
86
+ {{ yesterdayInstructRateOf + '%' }}
87
+ </template>
88
+ </chart-card>
89
+ </x-card>
90
+ </a-col>
91
+ </a-row>
92
+
93
+ <a-card :body-style="{padding: '0'}" :bordered="false">
94
+ <div class="salesCard">
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">
101
+ <div slot="tabBarExtraContent" class="extra-wrapper">
102
+ <div class="extra-item">
103
+ <a-radio-group v-model="countMode" button-style="solid" @change="toggleCountMode">
104
+ <a-radio-button value="now">最近24小时</a-radio-button>
105
+ <a-radio-button value="week">近一周</a-radio-button>
106
+ <a-radio-button value="month">近一个月</a-radio-button>
107
+ <a-radio-button value="year">近一年</a-radio-button>
108
+ </a-radio-group>
109
+ </div>
110
+ <a-range-picker :style="{width: '256px'}"/>
111
+ </div>
112
+ <a-tab-pane key="1" tab="抄表情况分析">
113
+ <a-row :lg="24" :md="24" :sm="24" :xl="24" :xs="24">
114
+ <x-card :loadState="radarLoadState" :retry="getHandPlanCountByMeterBrand">
115
+ <div id="container" style="padding: 0 0 0 20px;height: 370px"/>
116
+ </x-card>
117
+ </a-row>
118
+ </a-tab-pane>
119
+ <a-tab-pane key="2" tab="访问量">
120
+ <a-row>
121
+ <a-col :lg="12" :md="12" :sm="24" :xl="16" :xs="24">
122
+ <bar :data="barData2" title="销售额趋势"/>
123
+ </a-col>
124
+ <a-col :lg="12" :md="12" :sm="24" :xl="8" :xs="24">
125
+ <rank-list :list="rankList" title="门店销售排行榜"/>
126
+ </a-col>
127
+ </a-row>
128
+ </a-tab-pane>
129
+ </a-tabs>
130
+ </div>
131
+ </a-card>
132
+
133
+ <div :class="!isMobile && 'desktop'" class="antd-pro-pages-dashboard-analysis-twoColLayout">
134
+ <a-row :gutter="24" :style="{ marginTop: '24px' }" type="flex">
135
+ <a-col :lg="24" :md="24" :sm="24" :xl="12" :xs="24">
136
+ <x-card :bordered="false" :loadState="useGasLoadState" :retry="loadUseGasData" title="用气情况排行">
137
+ <a-dropdown slot="extra" :trigger="['click']" placement="bottomLeft">
138
+ <a class="ant-dropdown-link" href="#">
139
+ <a-icon type="ellipsis"/>
140
+ </a>
141
+ <a-menu slot="overlay">
142
+ <a-menu-item>
143
+ <a href="javascript:">操作一</a>
144
+ </a-menu-item>
145
+ <a-menu-item>
146
+ <a href="javascript;">操作二</a>
147
+ </a-menu-item>
148
+ </a-menu>
149
+ </a-dropdown>
150
+ <a-row :gutter="68">
151
+ <a-col :sm="12" :style="{ marginBottom: ' 24px'}" :xs="24">
152
+ <number-info
153
+ :status="useGasSubValue.status"
154
+ :sub-total="useGasSubValue.subValue"
155
+ :total="todayUseGasTotalValue">
156
+ <span slot="subtitle">
157
+ <span>当天总用气量</span>
158
+ <a-tooltip slot="action" title="本日所有物联网表用户总用气量">
159
+ <a-icon :style="{ marginLeft: '8px' }" type="info-circle-o"/>
160
+ </a-tooltip>
161
+ </span>
162
+ </number-info>
163
+ <!-- miniChart -->
164
+ <div>
165
+ <mini-smooth-area
166
+ :dataSource="useGasWeekData"
167
+ :scale="useGasWeekDataScale"
168
+ :style="{ height: '45px' }"/>
169
+ </div>
170
+ </a-col>
171
+ <a-col :sm="12" :style="{ marginBottom: ' 24px'}" :xs="24">
172
+ <number-info
173
+ :status="handPlanUserSubValue.status"
174
+ :sub-total="handPlanUserSubValue.subValue"
175
+ :total="todayHandPlanUserCount">
176
+ <span slot="subtitle">
177
+ <span>当天总抄表用户数</span>
178
+ <a-tooltip slot="action" title="当天总抄表用户数">
179
+ <a-icon :style="{ marginLeft: '8px' }" type="info-circle-o"/>
180
+ </a-tooltip>
181
+ </span>
182
+ </number-info>
183
+ <!-- miniChart -->
184
+ <div>
185
+ <mini-smooth-area
186
+ :dataSource="handPlanUserData"
187
+ :scale="handPlanUserDataScale"
188
+ :style="{ height: '45px' }"/>
189
+ </div>
190
+ </a-col>
191
+ </a-row>
192
+ <div class="ant-table-wrapper">
193
+ <a-table
194
+ :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
195
+ :columns="searchTableColumns"
196
+ :dataSource="gasConsumptionRanking"
197
+ :pagination="{ pageSize: 5 }"
198
+ row-key="f_userinfo_id"
199
+ size="small"
200
+ >
201
+ <span slot="range" slot-scope="text, record">
202
+ <trend :flag="record.status === 0 ? 'up' : 'down'">
203
+ {{ text }}%
204
+ </trend>
205
+ </span>
206
+ </a-table>
207
+ </div>
208
+ </x-card>
209
+ </a-col>
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>
230
+ </a-radio-group>
231
+ </div>
232
+ </div>
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>
244
+ </a-col>
245
+ </a-row>
246
+ </div>
247
+ </div>
248
+ </a-page-header>
249
+ </template>
250
+
251
+ <script>
252
+ import moment from 'moment'
253
+ import {
254
+ ChartCard,
255
+ MiniArea,
256
+ MiniBar,
257
+ MiniProgress,
258
+ RankList,
259
+ Bar,
260
+ Trend,
261
+ NumberInfo,
262
+ MiniSmoothArea
263
+ } from '@vue2-client/components'
264
+ import { formatDate } from '@vue2-client/utils/util'
265
+ import { Line, Pie, measureTextWidth } from '@antv/g2plot'
266
+ import { mapState } from 'vuex'
267
+ import { WebmeterAnalysisViewApi, post } from '@vue2-client/services/api'
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
+
281
+ const barData = []
282
+ const barData2 = []
283
+ for (let i = 0; i < 12; i += 1) {
284
+ barData.push({
285
+ x: `${i + 1}月`,
286
+ y: Math.floor(Math.random() * 1000) + 200
287
+ })
288
+ barData2.push({
289
+ x: `${i + 1}月`,
290
+ y: Math.floor(Math.random() * 1000) + 200
291
+ })
292
+ }
293
+
294
+ const rankList = []
295
+ for (let i = 0; i < 7; i++) {
296
+ rankList.push({
297
+ name: '白鹭岛 ' + (i + 1) + ' 号店',
298
+ total: 1234.56 - i * 100
299
+ })
300
+ }
301
+
302
+ const searchUserData = []
303
+ for (let i = 0; i < 7; i++) {
304
+ searchUserData.push({
305
+ x: moment().add(i, 'days').format('YYYY-MM-DD'),
306
+ y: Math.ceil(Math.random() * 10)
307
+ })
308
+ }
309
+
310
+ const searchTableColumns = [
311
+ {
312
+ dataIndex: 'f_userinfo_id',
313
+ title: '用户编号',
314
+ width: 90
315
+ },
316
+ {
317
+ dataIndex: 'f_user_name',
318
+ title: '用户姓名'
319
+ },
320
+ {
321
+ dataIndex: 'count',
322
+ title: '用气量'
323
+ },
324
+ {
325
+ dataIndex: 'range',
326
+ title: '周涨幅',
327
+ align: 'right',
328
+ sorter: (a, b) => a.range - b.range,
329
+ scopedSlots: { customRender: 'range' }
330
+ }
331
+ ]
332
+
333
+ const userInfoArray = [
334
+ '德昌鸿公司2',
335
+ '瑞鑫宇公司',
336
+ '保康县熊绎中学',
337
+ '文康置业有限公司',
338
+ '湖北省旗星文化旅游实业有限公司'
339
+ ]
340
+
341
+ const searchData = []
342
+ let j = 0
343
+ for (let i = 0; i < 5; i += 1) {
344
+ searchData.push({
345
+ index: Math.floor(Math.random() * 10000000),
346
+ keyword: userInfoArray[j],
347
+ count: Math.floor(Math.random() * 1000),
348
+ range: Math.floor(Math.random() * 10),
349
+ status: Math.floor((Math.random() * 10) % 2)
350
+ })
351
+ j++
352
+ }
353
+
354
+ export default {
355
+ name: 'WebmeterAnalysisView',
356
+ components: {
357
+ ChartCard,
358
+ MiniArea,
359
+ MiniBar,
360
+ MiniProgress,
361
+ RankList,
362
+ Bar,
363
+ Trend,
364
+ NumberInfo,
365
+ MiniSmoothArea
366
+ },
367
+ data () {
368
+ return {
369
+ // 页面宽度
370
+ screenWidth: document.documentElement.clientWidth,
371
+ // 客户名称
372
+ customerName: '',
373
+ // >> 指令总数统计
374
+ // 指令数统计Loading
375
+ instructSumLoadState: 'loading',
376
+ // 总指令数
377
+ instructSum: 0,
378
+ // 同周比
379
+ instructYoW: 0,
380
+ // 日同比
381
+ instructYoD: 0,
382
+ // 昨日新增指令数
383
+ instructYesAdd: 0,
384
+ // >> 抄表量统计
385
+ // 抄表量统计Loading
386
+ metereadSumLoadState: 'loading',
387
+ // 总抄表量
388
+ metereadSum: 0,
389
+ // 昨日新增抄表量
390
+ metereadYesAdd: 0,
391
+ // 近一周抄表量明细
392
+ metereadSumDataByWeek: [],
393
+ // 近一周抄表量明细列
394
+ metereadSumByWeekScale: [
395
+ {
396
+ dataKey: 'x',
397
+ alias: '时间'
398
+ },
399
+ {
400
+ dataKey: 'y',
401
+ alias: '抄表量'
402
+ }
403
+ ],
404
+ // >> 在用表具数统计
405
+ // 在用表具统计Loading
406
+ usingMeterSumLoadState: 'loading',
407
+ // 在用表具总量
408
+ usingMeterSum: 0,
409
+ // 昨日新增在用表具量
410
+ usingMeterYesAdd: 0,
411
+ // 近一周新增在用表具明细
412
+ usingMeterSumDataByWeek: [],
413
+ // 近一周新增在用表具明细列
414
+ usingMeterSumByWeekScale: [
415
+ {
416
+ dataKey: 'x',
417
+ alias: '时间'
418
+ },
419
+ {
420
+ dataKey: 'y',
421
+ alias: '开户数'
422
+ }
423
+ ],
424
+ // >> 表具指令下发成功率统计
425
+ // 表具指令成功率
426
+ instructRateOfSuccessValue: 0,
427
+ // 昨日指令成功率
428
+ yesterdayInstructRateOf: 0,
429
+ // 同周比
430
+ instructRateOfSuccessYoW: 0,
431
+ // 日同比
432
+ instructRateOfSuccessYoD: 0,
433
+ // 指令成功率进度色
434
+ instructRateOfColor: 'rgb(19, 194, 194)',
435
+ // 表具指令下发成功率加载状态
436
+ instructRateOfSuccessLoadState: 'loading',
437
+
438
+ // 统计模式
439
+ countMode: 'now',
440
+ // 圆饼图
441
+ countPieMode: 'now',
442
+ // 统计类型
443
+ tabActiveKey: '1',
444
+ // 统计类型
445
+ PieActiveKey: 'properties',
446
+ // >> 表具上报情况统计
447
+ // 上报统计图表
448
+ uploadCountPlot: undefined,
449
+ // 用气性质分析报表
450
+ gasPropertiesPlot: undefined,
451
+ // 用户用气占比
452
+ gasInUserPlot: undefined,
453
+ // 抄表情况分析Loading
454
+ radarLoadState: 'loading',
455
+ // 用气性质统计分析Loading
456
+ radarLoadState_gasproperties: 'loading',
457
+ // 用户在用气量中占比
458
+ radarLoadState_gasInUser: 'loading',
459
+ // >> 用气情况排行统计
460
+ // 用气情况排行统计Loading
461
+ useGasLoadState: 'loading',
462
+ // 当天总用气量
463
+ todayUseGasTotalValue: 0,
464
+ // 昨天总用气量
465
+ yesterdayUseGasTotalValue: 0,
466
+ // 近一周的每天用气情况
467
+ useGasWeekData: [],
468
+ useGasWeekDataScale: [
469
+ {
470
+ dataKey: 'x',
471
+ alias: '时间'
472
+ },
473
+ {
474
+ dataKey: 'y',
475
+ alias: '用气量'
476
+ }
477
+ ],
478
+ // 当天抄表用户数
479
+ todayHandPlanUserCount: 0,
480
+ // 昨天抄表用户数
481
+ yesterdayHandPlanUserCount: 0,
482
+ // 近一周的每天抄表情况
483
+ handPlanUserData: [],
484
+ handPlanUserDataScale: [
485
+ {
486
+ dataKey: 'x',
487
+ alias: '时间'
488
+ },
489
+ {
490
+ dataKey: 'y',
491
+ alias: '用户数'
492
+ }
493
+ ],
494
+ // 用气排行榜
495
+ gasConsumptionRanking: [],
496
+ rankList,
497
+
498
+ // 搜索用户数
499
+ searchUserData,
500
+ searchTableColumns,
501
+ searchData,
502
+ barData,
503
+ barData2,
504
+ // 左下列表选择框
505
+ selectedRowKeys: [],
506
+ }
507
+ },
508
+ mounted () {
509
+ // 加载指令数统计
510
+ this.loadInstructSumCount()
511
+ // 加载抄表量统计
512
+ this.loadMetereadSumCount()
513
+ // 加载在用表具量统计
514
+ this.loadUsingMeterSumCount()
515
+ // 加载指令成功率统计
516
+ this.loadInstructRateOfSuccess()
517
+ // 加载各表厂表具上报情况统计
518
+ this.getHandPlanCountByMeterBrand()
519
+ // 加载用气量统计
520
+ this.loadUseGasData()
521
+ // 加载按用气性质统计用气量
522
+ this.loadGasByGasProperties()
523
+ },
524
+ computed: {
525
+ ...mapState('setting', ['isMobile']),
526
+ useGasSubValue: function () {
527
+ const subValue = this.todayUseGasTotalValue - this.yesterdayUseGasTotalValue
528
+ const status = subValue >= 0 ? 'up' : 'down'
529
+ return {
530
+ subValue: subValue,
531
+ status: status
532
+ }
533
+ },
534
+ handPlanUserSubValue: function () {
535
+ const subValue = this.todayHandPlanUserCount - this.yesterdayHandPlanUserCount
536
+ const status = subValue >= 0 ? 'up' : 'down'
537
+ return {
538
+ subValue: subValue,
539
+ status: status
540
+ }
541
+ },
542
+ },
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
+ },
702
+ /**
703
+ * 加载指令总数统计
704
+ */
705
+ loadInstructSumCount () {
706
+ this.instructSumLoadState = 'loading'
707
+ post(WebmeterAnalysisViewApi.instructSumCount, {}).then(res => {
708
+ this.instructSum = res.instructSum
709
+ this.instructYoW = res.instructYoW
710
+ this.instructYoD = res.instructYoD
711
+ this.instructYesAdd = res.instructYesAdd
712
+ this.instructSumLoadState = 'success'
713
+ }, err => {
714
+ console.warn(err)
715
+ this.instructSumLoadState = 'error'
716
+ })
717
+ },
718
+ /**
719
+ * 加载抄表总数统计
720
+ */
721
+ loadMetereadSumCount () {
722
+ this.metereadSumDataByWeek = []
723
+ this.metereadSumLoadState = 'loading'
724
+ post(WebmeterAnalysisViewApi.meteReadSumCount, {}).then(res => {
725
+ // 加载近一周抄表数图表
726
+ post(WebmeterAnalysisViewApi.meteReadDataByWeek, {}).then(res => {
727
+ for (let i = 0, len = res.length; i < len; i++) {
728
+ this.metereadSumDataByWeek.push({
729
+ x: res[i].date,
730
+ y: res[i].num
731
+ })
732
+ }
733
+ })
734
+ this.metereadSum = res.metereadSum
735
+ this.metereadYesAdd = res.metereadYesAdd
736
+ this.metereadSumLoadState = 'success'
737
+ }, err => {
738
+ console.warn(err)
739
+ this.metereadSumLoadState = 'error'
740
+ })
741
+ },
742
+ /**
743
+ * 加载在用表具总数情况
744
+ */
745
+ loadUsingMeterSumCount () {
746
+ this.usingMeterSumDataByWeek = []
747
+ this.usingMeterSumLoadState = 'loading'
748
+ return post(WebmeterAnalysisViewApi.usingMeterSumCount, {}).then(res => {
749
+ // 加载近一周开户数图表
750
+ post(WebmeterAnalysisViewApi.usingMeterDataByWeek, {}).then(res => {
751
+ for (let i = 0, len = res.length; i < len; i++) {
752
+ this.usingMeterSumDataByWeek.push({
753
+ x: res[i].date,
754
+ y: res[i].num
755
+ })
756
+ }
757
+ })
758
+ this.usingMeterSum = res.usingMeterSum
759
+ this.usingMeterYesAdd = res.usingMeterYesAdd
760
+ this.usingMeterSumLoadState = 'success'
761
+ }, err => {
762
+ console.warn(err)
763
+ this.usingMeterSumLoadState = 'error'
764
+ })
765
+ },
766
+ /**
767
+ * 加载表具指令下发成功率
768
+ */
769
+ loadInstructRateOfSuccess () {
770
+ this.instructRateOfSuccessLoadState = 'loading'
771
+ post(WebmeterAnalysisViewApi.instructRateOfSuccess, {}).then(res => {
772
+ this.instructRateOfSuccessValue = res.instructRateOfSuccessValue * 1.0
773
+ if (this.instructRateOfSuccessValue < 70.0) {
774
+ this.instructRateOfColor = 'rgb(242, 99, 123)'
775
+ } else if (this.instructRateOfSuccessValue < 90.0) {
776
+ this.instructRateOfColor = 'rgb(251, 212, 55)'
777
+ } else {
778
+ this.instructRateOfColor = 'rgb(19, 194, 194)'
779
+ }
780
+ this.instructRateOfSuccessYoW = res.instructRateOfSuccessYoW
781
+ this.instructRateOfSuccessYoD = res.instructRateOfSuccessYoD
782
+ this.yesterdayInstructRateOf = res.yesterdayInstructRateOf
783
+ this.instructRateOfSuccessLoadState = 'success'
784
+ }, err => {
785
+ console.warn(err)
786
+ this.instructRateOfSuccessLoadState = 'error'
787
+ })
788
+ },
789
+ /**
790
+ * 格式化日期
791
+ * @param date 日期字符串
792
+ * @param format 格式化方式
793
+ * @returns {string|*} 格式化结果
794
+ */
795
+ format (date, format) {
796
+ return formatDate(date, format)
797
+ },
798
+ /**
799
+ * 切换周期
800
+ */
801
+ toggleCountMode () {
802
+ this.updateDataByKey()
803
+ },
804
+ /**
805
+ * Tab切换
806
+ */
807
+ handleTabChange (key) {
808
+ this.tabActiveKey = key + ''
809
+ this.updateDataByKey()
810
+ },
811
+ /**
812
+ * 右下圆饼图切换
813
+ */
814
+ handlePieTabChange (key) {
815
+ this.PieActiveKey = key + ''
816
+ this.loadPieMode()
817
+ // this.updateDataByKey()
818
+ },
819
+ /**
820
+ * 根据模式更新数据
821
+ */
822
+ updateDataByKey () {
823
+ if (this.tabActiveKey === '1') {
824
+ this.getHandPlanCountByMeterBrand()
825
+ } else {
826
+ // this.getDeviceLostContactCountData()
827
+ // this.getDeviceLostContactRankData()
828
+ }
829
+ },
830
+ /**
831
+ * 获取各表厂表具上报情况
832
+ */
833
+ getHandPlanCountByMeterBrand () {
834
+ this.radarLoadState = 'loading'
835
+ fetch(WebmeterAnalysisViewApi.handMeterSumCountData, {
836
+ method: 'POST',
837
+ body: JSON.stringify({
838
+ type: this.countMode
839
+ })
840
+ }).then((res) => res.json())
841
+ .then((data) => {
842
+ const plotOption = {
843
+ data,
844
+ xField: 'date',
845
+ yField: 'value',
846
+ seriesField: 'name',
847
+ yAxis: {
848
+ label: {
849
+ // 数值格式化为千分位
850
+ formatter: (v) => `${v}`.replace(/\d{1,3}(?=(\d{3})+$)/g, (s) => `${s},`)
851
+ }
852
+ },
853
+ tooltip: {
854
+ shared: true
855
+ },
856
+ interactions: [{ type: 'brush' }],
857
+ slider: {
858
+ start: 0,
859
+ end: 1
860
+ },
861
+ legend: {
862
+ position: 'top',
863
+ radio: true,
864
+ flipPage: false
865
+ },
866
+ smooth: true
867
+ }
868
+ if (this.uploadCountPlot) {
869
+ this.uploadCountPlot.update(plotOption)
870
+ } else {
871
+ this.uploadCountPlot = new Line('container', plotOption)
872
+ this.uploadCountPlot.render()
873
+ }
874
+ this.radarLoadState = 'success'
875
+ })
876
+ .catch((ex) => {
877
+ console.error(ex)
878
+ this.radarLoadState = 'error'
879
+ })
880
+ },
881
+ /**
882
+ * 获取用气请求排行
883
+ */
884
+ loadUseGasData () {
885
+ this.gasConsumptionRanking = []
886
+ this.useGasLoadState = 'loading'
887
+ return post(WebmeterAnalysisViewApi.useGasSumCount, {}).then(res => {
888
+ this.gasConsumptionRanking = res.gasConsumptionRanking
889
+ this.todayUseGasTotalValue = res.todayUseGasTotalValue
890
+ this.todayHandPlanUserCount = res.todayHandPlanUserCount
891
+ this.yesterdayUseGasTotalValue = res.yesterdayUseGasTotalValue
892
+ this.yesterdayHandPlanUserCount = res.yesterdayHandPlanUserCount
893
+ this.useGasWeekData = res.useGasWeekData
894
+ this.handPlanUserData = res.handPlanUserData
895
+ this.useGasLoadState = 'success'
896
+ }, err => {
897
+ console.warn(err)
898
+ this.useGasLoadState = 'error'
899
+ })
900
+ }
901
+ }
902
+ }
903
+ </script>
904
+
905
+ <style lang="less" scoped>
906
+
907
+ .text {
908
+ color: rgba(0, 0, 0, .45);
909
+ }
910
+
911
+ .heading {
912
+ color: rgba(0, 0, 0, .85);
913
+ font-size: 20px;
914
+ }
915
+
916
+ .extra-wrapper {
917
+ line-height: 55px;
918
+ padding-right: 24px;
919
+
920
+ .extra-item {
921
+ display: inline-block;
922
+ margin-right: 24px;
923
+
924
+ a {
925
+ margin-left: 24px;
926
+ }
927
+ }
928
+ }
929
+
930
+ .antd-pro-pages-dashboard-analysis-twoColLayout {
931
+ position: relative;
932
+ display: flex;
933
+ display: block;
934
+ flex-flow: row wrap;
935
+ }
936
+
937
+ .antd-pro-pages-dashboard-analysis-salesCard {
938
+ height: calc(100% - 24px);
939
+
940
+ /deep/ .ant-card-head {
941
+ position: relative;
942
+ }
943
+ }
944
+
945
+ .dashboard-analysis-iconGroup {
946
+ i {
947
+ margin-left: 16px;
948
+ color: rgba(0, 0, 0, .45);
949
+ cursor: pointer;
950
+ transition: color .32s;
951
+ color: black;
952
+ }
953
+ }
954
+
955
+ .analysis-salesTypeRadio {
956
+ position: absolute;
957
+ right: 54px;
958
+ bottom: 12px;
959
+ }
960
+ </style>