vue2-client 1.2.65 → 1.2.66
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 +4 -0
- package/package.json +1 -1
- package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +111 -111
- 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/CreateQueryItem.vue +770 -770
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +310 -310
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +550 -550
- package/src/base-client/components/common/Upload/Upload.vue +151 -151
- 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/XForm/XFormItem.vue +358 -358
- package/src/base-client/components/common/XFormTable/XFormTable.vue +484 -484
- package/src/base-client/components/common/XTable/XTable.vue +269 -269
- 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 -272
- package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +647 -647
- package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +532 -532
- package/src/base-client/plugins/AppData.js +70 -70
- package/src/base-client/plugins/compatible/LoginServiceOA.js +20 -20
- package/src/config/CreateQueryConfig.js +301 -301
- 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/common.js +56 -56
- 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/map-utils.js +28 -28
- package/src/utils/request.js +198 -198
- package/src/utils/util.js +222 -222
|
@@ -1,647 +1,647 @@
|
|
|
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 :color="instructRateOfColor" :percentage="instructRateOfSuccessValue" :target="90" height="8px" />
|
|
71
|
-
</div>
|
|
72
|
-
<template slot="footer">
|
|
73
|
-
<trend :flag="instructRateOfSuccessYoW >= 0 ? 'up' : 'down'" style="margin-right: 16px;">
|
|
74
|
-
<span slot="term">同周比</span>
|
|
75
|
-
{{ instructRateOfSuccessYoW + '%' }}
|
|
76
|
-
</trend>
|
|
77
|
-
<trend :flag="instructRateOfSuccessYoD >= 0 ? 'up' : 'down'" style="margin-right: 16px;">
|
|
78
|
-
<span slot="term">日同比</span>
|
|
79
|
-
{{ instructRateOfSuccessYoD + '%' }}
|
|
80
|
-
</trend>
|
|
81
|
-
<span slot="term">昨日成功率</span>
|
|
82
|
-
{{ yesterdayInstructRateOf + '%' }}
|
|
83
|
-
</template>
|
|
84
|
-
</chart-card>
|
|
85
|
-
</x-card>
|
|
86
|
-
</a-col>
|
|
87
|
-
</a-row>
|
|
88
|
-
|
|
89
|
-
<a-card :body-style="{padding: '0'}" :bordered="false" :loading="loading">
|
|
90
|
-
<div class="salesCard">
|
|
91
|
-
<a-tabs :tab-bar-style="{marginBottom: '24px', paddingLeft: '16px'}" default-active-key="1" size="large">
|
|
92
|
-
<div slot="tabBarExtraContent" class="extra-wrapper">
|
|
93
|
-
<div class="extra-item">
|
|
94
|
-
<a>今日</a>
|
|
95
|
-
<a>本周</a>
|
|
96
|
-
<a>本月</a>
|
|
97
|
-
<a>本年</a>
|
|
98
|
-
</div>
|
|
99
|
-
<a-range-picker :style="{width: '256px'}" />
|
|
100
|
-
</div>
|
|
101
|
-
<a-tab-pane key="1" tab="抄表情况分析">
|
|
102
|
-
<a-row :lg="24" :md="24" :sm="24" :xl="24" :xs="24">
|
|
103
|
-
<x-card :loadState="radarLoadState" :retry="loadGasView">
|
|
104
|
-
<div id="container" style="padding: 0 0 0 20px;height: 370px" />
|
|
105
|
-
</x-card>
|
|
106
|
-
</a-row>
|
|
107
|
-
</a-tab-pane>
|
|
108
|
-
<a-tab-pane key="2" tab="访问量">
|
|
109
|
-
<a-row>
|
|
110
|
-
<a-col :lg="12" :md="12" :sm="24" :xl="16" :xs="24">
|
|
111
|
-
<bar :data="barData2" title="销售额趋势" />
|
|
112
|
-
</a-col>
|
|
113
|
-
<a-col :lg="12" :md="12" :sm="24" :xl="8" :xs="24">
|
|
114
|
-
<rank-list :list="rankList" title="门店销售排行榜"/>
|
|
115
|
-
</a-col>
|
|
116
|
-
</a-row>
|
|
117
|
-
</a-tab-pane>
|
|
118
|
-
</a-tabs>
|
|
119
|
-
</div>
|
|
120
|
-
</a-card>
|
|
121
|
-
|
|
122
|
-
<div :class="!isMobile && 'desktop'" class="antd-pro-pages-dashboard-analysis-twoColLayout">
|
|
123
|
-
<a-row :gutter="24" :style="{ marginTop: '24px' }" type="flex">
|
|
124
|
-
<a-col :lg="24" :md="24" :sm="24" :xl="12" :xs="24">
|
|
125
|
-
<a-card :bordered="false" :loading="loading" :style="{ height: '100%' }" title="用气情况排行">
|
|
126
|
-
<a-dropdown slot="extra" :trigger="['click']" placement="bottomLeft">
|
|
127
|
-
<a class="ant-dropdown-link" href="#">
|
|
128
|
-
<a-icon type="ellipsis" />
|
|
129
|
-
</a>
|
|
130
|
-
<a-menu slot="overlay">
|
|
131
|
-
<a-menu-item>
|
|
132
|
-
<a href="javascript:">操作一</a>
|
|
133
|
-
</a-menu-item>
|
|
134
|
-
<a-menu-item>
|
|
135
|
-
<a href="javascript;">操作二</a>
|
|
136
|
-
</a-menu-item>
|
|
137
|
-
</a-menu>
|
|
138
|
-
</a-dropdown>
|
|
139
|
-
<a-row :gutter="68">
|
|
140
|
-
<a-col :sm="12" :style="{ marginBottom: ' 24px'}" :xs="24">
|
|
141
|
-
<number-info :sub-total="17.1" :total="21232.1">
|
|
142
|
-
<span slot="subtitle">
|
|
143
|
-
<span>当天总用气量</span>
|
|
144
|
-
<a-tooltip slot="action" title="指标说明">
|
|
145
|
-
<a-icon :style="{ marginLeft: '8px' }" type="info-circle-o" />
|
|
146
|
-
</a-tooltip>
|
|
147
|
-
</span>
|
|
148
|
-
</number-info>
|
|
149
|
-
<!-- miniChart -->
|
|
150
|
-
<div>
|
|
151
|
-
<mini-smooth-area :dataSource="searchUserData" :scale="searchUserScale" :style="{ height: '45px' }" />
|
|
152
|
-
</div>
|
|
153
|
-
</a-col>
|
|
154
|
-
<a-col :sm="12" :style="{ marginBottom: ' 24px'}" :xs="24">
|
|
155
|
-
<number-info :sub-total="0.2" :total="0.7" status="up">
|
|
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 :dataSource="searchUserData" :scale="searchUserScale" :style="{ height: '45px' }" />
|
|
166
|
-
</div>
|
|
167
|
-
</a-col>
|
|
168
|
-
</a-row>
|
|
169
|
-
<div class="ant-table-wrapper">
|
|
170
|
-
<a-table
|
|
171
|
-
:columns="searchTableColumns"
|
|
172
|
-
:dataSource="searchData"
|
|
173
|
-
:pagination="{ pageSize: 5 }"
|
|
174
|
-
row-key="index"
|
|
175
|
-
size="small"
|
|
176
|
-
>
|
|
177
|
-
<span slot="range" slot-scope="text, record">
|
|
178
|
-
<trend :flag="record.status === 0 ? 'up' : 'down'">
|
|
179
|
-
{{ text }}%
|
|
180
|
-
</trend>
|
|
181
|
-
</span>
|
|
182
|
-
</a-table>
|
|
183
|
-
</div>
|
|
184
|
-
</a-card>
|
|
185
|
-
</a-col>
|
|
186
|
-
<a-col :lg="24" :md="24" :sm="24" :xl="12" :xs="24">
|
|
187
|
-
<a-card :bordered="false" :loading="loading" :style="{ height: '100%' }" class="antd-pro-pages-dashboard-analysis-salesCard" title="指令类别占比">
|
|
188
|
-
<div slot="extra" style="height: inherit;">
|
|
189
|
-
<div class="analysis-salesTypeRadio">
|
|
190
|
-
<a-radio-group defaultValue="a">
|
|
191
|
-
<a-radio-button value="a">本日</a-radio-button>
|
|
192
|
-
<a-radio-button value="b">本周</a-radio-button>
|
|
193
|
-
<a-radio-button value="c">本月</a-radio-button>
|
|
194
|
-
</a-radio-group>
|
|
195
|
-
</div>
|
|
196
|
-
</div>
|
|
197
|
-
<h4></h4>
|
|
198
|
-
<div>
|
|
199
|
-
<!-- style="width: calc(100% - 240px);" -->
|
|
200
|
-
<div>
|
|
201
|
-
<v-chart :data="pieData" :force-fit="true" :height="405" :scale="pieScale">
|
|
202
|
-
<v-tooltip :showTitle="false" dataKey="item*percent" />
|
|
203
|
-
<v-axis />
|
|
204
|
-
<!-- position="right" :offsetX="-140" -->
|
|
205
|
-
<v-legend dataKey="item"/>
|
|
206
|
-
<v-pie :vStyle="pieStyle" color="item" position="percent" />
|
|
207
|
-
<v-coord :innerRadius="0.6" :radius="0.75" type="theta" />
|
|
208
|
-
</v-chart>
|
|
209
|
-
</div>
|
|
210
|
-
</div>
|
|
211
|
-
</a-card>
|
|
212
|
-
</a-col>
|
|
213
|
-
</a-row>
|
|
214
|
-
</div>
|
|
215
|
-
</div>
|
|
216
|
-
</a-page-header>
|
|
217
|
-
</template>
|
|
218
|
-
|
|
219
|
-
<script>
|
|
220
|
-
import moment from 'moment'
|
|
221
|
-
import {
|
|
222
|
-
ChartCard,
|
|
223
|
-
MiniArea,
|
|
224
|
-
MiniBar,
|
|
225
|
-
MiniProgress,
|
|
226
|
-
RankList,
|
|
227
|
-
Bar,
|
|
228
|
-
Trend,
|
|
229
|
-
NumberInfo,
|
|
230
|
-
MiniSmoothArea
|
|
231
|
-
} from '@vue2-client/components'
|
|
232
|
-
import { formatDate } from '@vue2-client/utils/util'
|
|
233
|
-
import { Line } from '@antv/g2plot'
|
|
234
|
-
import { mapState } from 'vuex'
|
|
235
|
-
import { WebmeterAnalysisViewApi, post } from '@vue2-client/services/api'
|
|
236
|
-
|
|
237
|
-
const barData = []
|
|
238
|
-
const barData2 = []
|
|
239
|
-
for (let i = 0; i < 12; i += 1) {
|
|
240
|
-
barData.push({
|
|
241
|
-
x: `${i + 1}月`,
|
|
242
|
-
y: Math.floor(Math.random() * 1000) + 200
|
|
243
|
-
})
|
|
244
|
-
barData2.push({
|
|
245
|
-
x: `${i + 1}月`,
|
|
246
|
-
y: Math.floor(Math.random() * 1000) + 200
|
|
247
|
-
})
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
const rankList = []
|
|
251
|
-
for (let i = 0; i < 7; i++) {
|
|
252
|
-
rankList.push({
|
|
253
|
-
name: '白鹭岛 ' + (i + 1) + ' 号店',
|
|
254
|
-
total: 1234.56 - i * 100
|
|
255
|
-
})
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
const searchUserData = []
|
|
259
|
-
for (let i = 0; i < 7; i++) {
|
|
260
|
-
searchUserData.push({
|
|
261
|
-
x: moment().add(i, 'days').format('YYYY-MM-DD'),
|
|
262
|
-
y: Math.ceil(Math.random() * 10)
|
|
263
|
-
})
|
|
264
|
-
}
|
|
265
|
-
const searchUserScale = [
|
|
266
|
-
{
|
|
267
|
-
dataKey: 'x',
|
|
268
|
-
alias: '时间'
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
dataKey: 'y',
|
|
272
|
-
alias: '用气量',
|
|
273
|
-
min: 0,
|
|
274
|
-
max: 10
|
|
275
|
-
}]
|
|
276
|
-
|
|
277
|
-
const searchTableColumns = [
|
|
278
|
-
{
|
|
279
|
-
dataIndex: 'index',
|
|
280
|
-
title: '用户编号',
|
|
281
|
-
width: 90
|
|
282
|
-
},
|
|
283
|
-
{
|
|
284
|
-
dataIndex: 'keyword',
|
|
285
|
-
title: '用户姓名'
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
dataIndex: 'count',
|
|
289
|
-
title: '用气量'
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
dataIndex: 'range',
|
|
293
|
-
title: '周涨幅',
|
|
294
|
-
align: 'right',
|
|
295
|
-
sorter: (a, b) => a.range - b.range,
|
|
296
|
-
scopedSlots: { customRender: 'range' }
|
|
297
|
-
}
|
|
298
|
-
]
|
|
299
|
-
|
|
300
|
-
const userInfoArray = [
|
|
301
|
-
'德昌鸿公司2',
|
|
302
|
-
'瑞鑫宇公司',
|
|
303
|
-
'保康县熊绎中学',
|
|
304
|
-
'文康置业有限公司',
|
|
305
|
-
'湖北省旗星文化旅游实业有限公司'
|
|
306
|
-
]
|
|
307
|
-
|
|
308
|
-
const searchData = []
|
|
309
|
-
let j = 0
|
|
310
|
-
for (let i = 0; i < 5; i += 1) {
|
|
311
|
-
searchData.push({
|
|
312
|
-
index: Math.floor(Math.random() * 10000000),
|
|
313
|
-
keyword: userInfoArray[j],
|
|
314
|
-
count: Math.floor(Math.random() * 1000),
|
|
315
|
-
range: Math.floor(Math.random() * 10),
|
|
316
|
-
status: Math.floor((Math.random() * 10) % 2)
|
|
317
|
-
})
|
|
318
|
-
j++
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
const DataSet = require('@antv/data-set')
|
|
322
|
-
|
|
323
|
-
const sourceData = [
|
|
324
|
-
{ item: '远程开户', count: 32.2 },
|
|
325
|
-
{ item: '远程充值', count: 21 },
|
|
326
|
-
{ item: '阀门控制', count: 17 },
|
|
327
|
-
{ item: '远程调价', count: 13 },
|
|
328
|
-
{ item: '设置参数', count: 9 },
|
|
329
|
-
{ item: '远程注销', count: 7.8 }
|
|
330
|
-
]
|
|
331
|
-
|
|
332
|
-
const pieScale = [{
|
|
333
|
-
dataKey: 'percent',
|
|
334
|
-
min: 0,
|
|
335
|
-
formatter: '.0%'
|
|
336
|
-
}]
|
|
337
|
-
|
|
338
|
-
const dv = new DataSet.View().source(sourceData)
|
|
339
|
-
dv.transform({
|
|
340
|
-
type: 'percent',
|
|
341
|
-
field: 'count',
|
|
342
|
-
dimension: 'item',
|
|
343
|
-
as: 'percent'
|
|
344
|
-
})
|
|
345
|
-
const pieData = dv.rows
|
|
346
|
-
|
|
347
|
-
export default {
|
|
348
|
-
name: 'WebmeterAnalysisView',
|
|
349
|
-
components: {
|
|
350
|
-
ChartCard,
|
|
351
|
-
MiniArea,
|
|
352
|
-
MiniBar,
|
|
353
|
-
MiniProgress,
|
|
354
|
-
RankList,
|
|
355
|
-
Bar,
|
|
356
|
-
Trend,
|
|
357
|
-
NumberInfo,
|
|
358
|
-
MiniSmoothArea
|
|
359
|
-
},
|
|
360
|
-
data () {
|
|
361
|
-
return {
|
|
362
|
-
// 页面宽度
|
|
363
|
-
screenWidth: document.documentElement.clientWidth,
|
|
364
|
-
// 客户名称
|
|
365
|
-
customerName: '',
|
|
366
|
-
// 指令数统计Loading
|
|
367
|
-
instructSumLoadState: 'loading',
|
|
368
|
-
// 总指令数
|
|
369
|
-
instructSum: 0,
|
|
370
|
-
// 同周比
|
|
371
|
-
instructYoW: 0,
|
|
372
|
-
// 日同比
|
|
373
|
-
instructYoD: 0,
|
|
374
|
-
// 昨日新增指令数
|
|
375
|
-
instructYesAdd: 0,
|
|
376
|
-
// 抄表量统计Loading
|
|
377
|
-
metereadSumLoadState: 'loading',
|
|
378
|
-
// 总抄表量
|
|
379
|
-
metereadSum: 0,
|
|
380
|
-
// 昨日新增抄表量
|
|
381
|
-
metereadYesAdd: 0,
|
|
382
|
-
// 近一周抄表量明细
|
|
383
|
-
metereadSumDataByWeek: [],
|
|
384
|
-
// 近一周抄表量明细列
|
|
385
|
-
metereadSumByWeekScale: [
|
|
386
|
-
{
|
|
387
|
-
dataKey: 'x',
|
|
388
|
-
alias: '时间'
|
|
389
|
-
},
|
|
390
|
-
{
|
|
391
|
-
dataKey: 'y',
|
|
392
|
-
alias: '抄表量'
|
|
393
|
-
}
|
|
394
|
-
],
|
|
395
|
-
// 抄表情况分析Loading
|
|
396
|
-
radarLoadState: 'loading',
|
|
397
|
-
// 在用表具统计Loading
|
|
398
|
-
usingMeterSumLoadState: 'loading',
|
|
399
|
-
// 在用表具总量
|
|
400
|
-
usingMeterSum: 0,
|
|
401
|
-
// 昨日新增在用表具量
|
|
402
|
-
usingMeterYesAdd: 0,
|
|
403
|
-
// 近一周新增在用表具明细
|
|
404
|
-
usingMeterSumDataByWeek: [],
|
|
405
|
-
// 近一周新增在用表具明细列
|
|
406
|
-
usingMeterSumByWeekScale: [
|
|
407
|
-
{
|
|
408
|
-
dataKey: 'x',
|
|
409
|
-
alias: '时间'
|
|
410
|
-
},
|
|
411
|
-
{
|
|
412
|
-
dataKey: 'y',
|
|
413
|
-
alias: '开户数'
|
|
414
|
-
}
|
|
415
|
-
],
|
|
416
|
-
// 指令成功率统计Loading
|
|
417
|
-
instructRateOfSuccessLoadState: 'loading',
|
|
418
|
-
// 指令成功率
|
|
419
|
-
instructRateOfSuccessValue: 0,
|
|
420
|
-
// 昨日指令成功率
|
|
421
|
-
yesterdayInstructRateOf: 0,
|
|
422
|
-
// 同周比
|
|
423
|
-
instructRateOfSuccessYoW: 0,
|
|
424
|
-
// 日同比
|
|
425
|
-
instructRateOfSuccessYoD: 0,
|
|
426
|
-
// 指令成功率进度色
|
|
427
|
-
instructRateOfColor: 'rgb(19, 194, 194)',
|
|
428
|
-
// 是否刷新加载中
|
|
429
|
-
loading: false,
|
|
430
|
-
rankList,
|
|
431
|
-
|
|
432
|
-
// 搜索用户数
|
|
433
|
-
searchUserData,
|
|
434
|
-
searchUserScale,
|
|
435
|
-
searchTableColumns,
|
|
436
|
-
searchData,
|
|
437
|
-
|
|
438
|
-
barData,
|
|
439
|
-
barData2,
|
|
440
|
-
|
|
441
|
-
//
|
|
442
|
-
pieScale,
|
|
443
|
-
pieData,
|
|
444
|
-
sourceData,
|
|
445
|
-
pieStyle: {
|
|
446
|
-
stroke: '#fff',
|
|
447
|
-
lineWidth: 1
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
},
|
|
451
|
-
mounted () {
|
|
452
|
-
// 加载指令数统计
|
|
453
|
-
this.loadInstructSumCount()
|
|
454
|
-
// 加载抄表量统计
|
|
455
|
-
this.loadMetereadSumCount()
|
|
456
|
-
// 加载在用表具量统计
|
|
457
|
-
this.loadUsingMeterSumCount()
|
|
458
|
-
// 加载指令成功率统计
|
|
459
|
-
this.loadInstructRateOfSuccess()
|
|
460
|
-
// 加载g2图表
|
|
461
|
-
this.loadGasView()
|
|
462
|
-
},
|
|
463
|
-
computed: {
|
|
464
|
-
...mapState('setting', ['isMobile'])
|
|
465
|
-
},
|
|
466
|
-
props: {
|
|
467
|
-
},
|
|
468
|
-
methods: {
|
|
469
|
-
loadInstructSumCount () {
|
|
470
|
-
this.instructSumLoadState = 'loading'
|
|
471
|
-
return post(WebmeterAnalysisViewApi.instructSumCount, {}).then(res => {
|
|
472
|
-
this.instructSum = res.instructSum
|
|
473
|
-
this.instructYoW = res.instructYoW
|
|
474
|
-
this.instructYoD = res.instructYoD
|
|
475
|
-
this.instructYesAdd = res.instructYesAdd
|
|
476
|
-
this.instructSumLoadState = 'success'
|
|
477
|
-
}, err => {
|
|
478
|
-
console.warn(err)
|
|
479
|
-
this.instructSumLoadState = 'error'
|
|
480
|
-
})
|
|
481
|
-
},
|
|
482
|
-
loadMetereadSumCount () {
|
|
483
|
-
this.metereadSumDataByWeek = []
|
|
484
|
-
this.metereadSumLoadState = 'loading'
|
|
485
|
-
return post(WebmeterAnalysisViewApi.meteReadSumCount, {}).then(res => {
|
|
486
|
-
// 加载近一周抄表数图表
|
|
487
|
-
post(WebmeterAnalysisViewApi.meteReadDataByWeek, {}).then(res => {
|
|
488
|
-
for (let i = 0, len = res.length; i < len; i++) {
|
|
489
|
-
this.metereadSumDataByWeek.push({
|
|
490
|
-
x: res[i].date,
|
|
491
|
-
y: res[i].num
|
|
492
|
-
})
|
|
493
|
-
}
|
|
494
|
-
})
|
|
495
|
-
this.metereadSum = res.metereadSum
|
|
496
|
-
this.metereadYesAdd = res.metereadYesAdd
|
|
497
|
-
this.metereadSumLoadState = 'success'
|
|
498
|
-
}, err => {
|
|
499
|
-
console.warn(err)
|
|
500
|
-
this.metereadSumLoadState = 'error'
|
|
501
|
-
})
|
|
502
|
-
},
|
|
503
|
-
loadUsingMeterSumCount () {
|
|
504
|
-
this.usingMeterSumDataByWeek = []
|
|
505
|
-
this.usingMeterSumLoadState = 'loading'
|
|
506
|
-
return post(WebmeterAnalysisViewApi.usingMeterSumCount, {}).then(res => {
|
|
507
|
-
// 加载近一周开户数图表
|
|
508
|
-
post(WebmeterAnalysisViewApi.usingMeterDataByWeek, {}).then(res => {
|
|
509
|
-
for (let i = 0, len = res.length; i < len; i++) {
|
|
510
|
-
this.usingMeterSumDataByWeek.push({
|
|
511
|
-
x: res[i].date,
|
|
512
|
-
y: res[i].num
|
|
513
|
-
})
|
|
514
|
-
}
|
|
515
|
-
})
|
|
516
|
-
this.usingMeterSum = res.usingMeterSum
|
|
517
|
-
this.usingMeterYesAdd = res.usingMeterYesAdd
|
|
518
|
-
this.usingMeterSumLoadState = 'success'
|
|
519
|
-
}, err => {
|
|
520
|
-
console.warn(err)
|
|
521
|
-
this.usingMeterSumLoadState = 'error'
|
|
522
|
-
})
|
|
523
|
-
},
|
|
524
|
-
loadInstructRateOfSuccess () {
|
|
525
|
-
this.instructRateOfSuccessLoadState = 'loading'
|
|
526
|
-
return post(WebmeterAnalysisViewApi.instructRateOfSuccess, {}).then(res => {
|
|
527
|
-
this.instructRateOfSuccessValue = res.instructRateOfSuccessValue * 1.0
|
|
528
|
-
if (this.instructRateOfSuccessValue < 70.0) {
|
|
529
|
-
this.instructRateOfColor = 'rgb(242, 99, 123)'
|
|
530
|
-
} else if (this.instructRateOfSuccessValue < 90.0) {
|
|
531
|
-
this.instructRateOfColor = 'rgb(251, 212, 55)'
|
|
532
|
-
} else {
|
|
533
|
-
this.instructRateOfColor = 'rgb(19, 194, 194)'
|
|
534
|
-
}
|
|
535
|
-
this.instructRateOfSuccessYoW = res.instructRateOfSuccessYoW
|
|
536
|
-
this.instructRateOfSuccessYoD = res.instructRateOfSuccessYoD
|
|
537
|
-
this.yesterdayInstructRateOf = res.yesterdayInstructRateOf
|
|
538
|
-
this.instructRateOfSuccessLoadState = 'success'
|
|
539
|
-
}, err => {
|
|
540
|
-
console.warn(err)
|
|
541
|
-
this.instructRateOfSuccessLoadState = 'error'
|
|
542
|
-
})
|
|
543
|
-
},
|
|
544
|
-
format (date, format) {
|
|
545
|
-
return formatDate(date, format)
|
|
546
|
-
},
|
|
547
|
-
loadGasView () {
|
|
548
|
-
const _this = this
|
|
549
|
-
_this.getHandPlanCountByMeterBrand()
|
|
550
|
-
},
|
|
551
|
-
getHandPlanCountByMeterBrand () {
|
|
552
|
-
this.radarLoadState = 'loading'
|
|
553
|
-
fetch('/webmeterapi/foreignaidHandMeterSumCountData', {
|
|
554
|
-
method: 'POST',
|
|
555
|
-
body: JSON.stringify({})
|
|
556
|
-
}).then((res) => res.json())
|
|
557
|
-
.then((data) => {
|
|
558
|
-
const linePlot = new Line('container', {
|
|
559
|
-
data,
|
|
560
|
-
xField: 'date',
|
|
561
|
-
yField: 'value',
|
|
562
|
-
seriesField: 'name',
|
|
563
|
-
yAxis: {
|
|
564
|
-
label: {
|
|
565
|
-
// 数值格式化为千分位
|
|
566
|
-
formatter: (v) => `${v}`.replace(/\d{1,3}(?=(\d{3})+$)/g, (s) => `${s},`)
|
|
567
|
-
}
|
|
568
|
-
},
|
|
569
|
-
tooltip: {
|
|
570
|
-
shared: true
|
|
571
|
-
},
|
|
572
|
-
interactions: [{ type: 'brush' }],
|
|
573
|
-
slider: {
|
|
574
|
-
start: 0.5,
|
|
575
|
-
end: 1
|
|
576
|
-
},
|
|
577
|
-
legend: {
|
|
578
|
-
position: 'top'
|
|
579
|
-
},
|
|
580
|
-
smooth: true
|
|
581
|
-
})
|
|
582
|
-
linePlot.render()
|
|
583
|
-
this.radarLoadState = 'success'
|
|
584
|
-
})
|
|
585
|
-
.catch((ex) => {
|
|
586
|
-
console.error(ex)
|
|
587
|
-
this.radarLoadState = 'error'
|
|
588
|
-
})
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
}
|
|
592
|
-
</script>
|
|
593
|
-
|
|
594
|
-
<style lang="less" scoped>
|
|
595
|
-
|
|
596
|
-
.text {
|
|
597
|
-
color: rgba(0, 0, 0, .45);
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
.heading {
|
|
601
|
-
color: rgba(0, 0, 0, .85);
|
|
602
|
-
font-size: 20px;
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
.extra-wrapper {
|
|
606
|
-
line-height: 55px;
|
|
607
|
-
padding-right: 24px;
|
|
608
|
-
|
|
609
|
-
.extra-item {
|
|
610
|
-
display: inline-block;
|
|
611
|
-
margin-right: 24px;
|
|
612
|
-
|
|
613
|
-
a {
|
|
614
|
-
margin-left: 24px;
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
.antd-pro-pages-dashboard-analysis-twoColLayout {
|
|
620
|
-
position: relative;
|
|
621
|
-
display: flex;
|
|
622
|
-
display: block;
|
|
623
|
-
flex-flow: row wrap;
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
.antd-pro-pages-dashboard-analysis-salesCard {
|
|
627
|
-
height: calc(100% - 24px);
|
|
628
|
-
/deep/ .ant-card-head {
|
|
629
|
-
position: relative;
|
|
630
|
-
}
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
.dashboard-analysis-iconGroup {
|
|
634
|
-
i {
|
|
635
|
-
margin-left: 16px;
|
|
636
|
-
color: rgba(0,0,0,.45);
|
|
637
|
-
cursor: pointer;
|
|
638
|
-
transition: color .32s;
|
|
639
|
-
color: black;
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
.analysis-salesTypeRadio {
|
|
643
|
-
position: absolute;
|
|
644
|
-
right: 54px;
|
|
645
|
-
bottom: 12px;
|
|
646
|
-
}
|
|
647
|
-
</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 :color="instructRateOfColor" :percentage="instructRateOfSuccessValue" :target="90" height="8px" />
|
|
71
|
+
</div>
|
|
72
|
+
<template slot="footer">
|
|
73
|
+
<trend :flag="instructRateOfSuccessYoW >= 0 ? 'up' : 'down'" style="margin-right: 16px;">
|
|
74
|
+
<span slot="term">同周比</span>
|
|
75
|
+
{{ instructRateOfSuccessYoW + '%' }}
|
|
76
|
+
</trend>
|
|
77
|
+
<trend :flag="instructRateOfSuccessYoD >= 0 ? 'up' : 'down'" style="margin-right: 16px;">
|
|
78
|
+
<span slot="term">日同比</span>
|
|
79
|
+
{{ instructRateOfSuccessYoD + '%' }}
|
|
80
|
+
</trend>
|
|
81
|
+
<span slot="term">昨日成功率</span>
|
|
82
|
+
{{ yesterdayInstructRateOf + '%' }}
|
|
83
|
+
</template>
|
|
84
|
+
</chart-card>
|
|
85
|
+
</x-card>
|
|
86
|
+
</a-col>
|
|
87
|
+
</a-row>
|
|
88
|
+
|
|
89
|
+
<a-card :body-style="{padding: '0'}" :bordered="false" :loading="loading">
|
|
90
|
+
<div class="salesCard">
|
|
91
|
+
<a-tabs :tab-bar-style="{marginBottom: '24px', paddingLeft: '16px'}" default-active-key="1" size="large">
|
|
92
|
+
<div slot="tabBarExtraContent" class="extra-wrapper">
|
|
93
|
+
<div class="extra-item">
|
|
94
|
+
<a>今日</a>
|
|
95
|
+
<a>本周</a>
|
|
96
|
+
<a>本月</a>
|
|
97
|
+
<a>本年</a>
|
|
98
|
+
</div>
|
|
99
|
+
<a-range-picker :style="{width: '256px'}" />
|
|
100
|
+
</div>
|
|
101
|
+
<a-tab-pane key="1" tab="抄表情况分析">
|
|
102
|
+
<a-row :lg="24" :md="24" :sm="24" :xl="24" :xs="24">
|
|
103
|
+
<x-card :loadState="radarLoadState" :retry="loadGasView">
|
|
104
|
+
<div id="container" style="padding: 0 0 0 20px;height: 370px" />
|
|
105
|
+
</x-card>
|
|
106
|
+
</a-row>
|
|
107
|
+
</a-tab-pane>
|
|
108
|
+
<a-tab-pane key="2" tab="访问量">
|
|
109
|
+
<a-row>
|
|
110
|
+
<a-col :lg="12" :md="12" :sm="24" :xl="16" :xs="24">
|
|
111
|
+
<bar :data="barData2" title="销售额趋势" />
|
|
112
|
+
</a-col>
|
|
113
|
+
<a-col :lg="12" :md="12" :sm="24" :xl="8" :xs="24">
|
|
114
|
+
<rank-list :list="rankList" title="门店销售排行榜"/>
|
|
115
|
+
</a-col>
|
|
116
|
+
</a-row>
|
|
117
|
+
</a-tab-pane>
|
|
118
|
+
</a-tabs>
|
|
119
|
+
</div>
|
|
120
|
+
</a-card>
|
|
121
|
+
|
|
122
|
+
<div :class="!isMobile && 'desktop'" class="antd-pro-pages-dashboard-analysis-twoColLayout">
|
|
123
|
+
<a-row :gutter="24" :style="{ marginTop: '24px' }" type="flex">
|
|
124
|
+
<a-col :lg="24" :md="24" :sm="24" :xl="12" :xs="24">
|
|
125
|
+
<a-card :bordered="false" :loading="loading" :style="{ height: '100%' }" title="用气情况排行">
|
|
126
|
+
<a-dropdown slot="extra" :trigger="['click']" placement="bottomLeft">
|
|
127
|
+
<a class="ant-dropdown-link" href="#">
|
|
128
|
+
<a-icon type="ellipsis" />
|
|
129
|
+
</a>
|
|
130
|
+
<a-menu slot="overlay">
|
|
131
|
+
<a-menu-item>
|
|
132
|
+
<a href="javascript:">操作一</a>
|
|
133
|
+
</a-menu-item>
|
|
134
|
+
<a-menu-item>
|
|
135
|
+
<a href="javascript;">操作二</a>
|
|
136
|
+
</a-menu-item>
|
|
137
|
+
</a-menu>
|
|
138
|
+
</a-dropdown>
|
|
139
|
+
<a-row :gutter="68">
|
|
140
|
+
<a-col :sm="12" :style="{ marginBottom: ' 24px'}" :xs="24">
|
|
141
|
+
<number-info :sub-total="17.1" :total="21232.1">
|
|
142
|
+
<span slot="subtitle">
|
|
143
|
+
<span>当天总用气量</span>
|
|
144
|
+
<a-tooltip slot="action" title="指标说明">
|
|
145
|
+
<a-icon :style="{ marginLeft: '8px' }" type="info-circle-o" />
|
|
146
|
+
</a-tooltip>
|
|
147
|
+
</span>
|
|
148
|
+
</number-info>
|
|
149
|
+
<!-- miniChart -->
|
|
150
|
+
<div>
|
|
151
|
+
<mini-smooth-area :dataSource="searchUserData" :scale="searchUserScale" :style="{ height: '45px' }" />
|
|
152
|
+
</div>
|
|
153
|
+
</a-col>
|
|
154
|
+
<a-col :sm="12" :style="{ marginBottom: ' 24px'}" :xs="24">
|
|
155
|
+
<number-info :sub-total="0.2" :total="0.7" status="up">
|
|
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 :dataSource="searchUserData" :scale="searchUserScale" :style="{ height: '45px' }" />
|
|
166
|
+
</div>
|
|
167
|
+
</a-col>
|
|
168
|
+
</a-row>
|
|
169
|
+
<div class="ant-table-wrapper">
|
|
170
|
+
<a-table
|
|
171
|
+
:columns="searchTableColumns"
|
|
172
|
+
:dataSource="searchData"
|
|
173
|
+
:pagination="{ pageSize: 5 }"
|
|
174
|
+
row-key="index"
|
|
175
|
+
size="small"
|
|
176
|
+
>
|
|
177
|
+
<span slot="range" slot-scope="text, record">
|
|
178
|
+
<trend :flag="record.status === 0 ? 'up' : 'down'">
|
|
179
|
+
{{ text }}%
|
|
180
|
+
</trend>
|
|
181
|
+
</span>
|
|
182
|
+
</a-table>
|
|
183
|
+
</div>
|
|
184
|
+
</a-card>
|
|
185
|
+
</a-col>
|
|
186
|
+
<a-col :lg="24" :md="24" :sm="24" :xl="12" :xs="24">
|
|
187
|
+
<a-card :bordered="false" :loading="loading" :style="{ height: '100%' }" class="antd-pro-pages-dashboard-analysis-salesCard" title="指令类别占比">
|
|
188
|
+
<div slot="extra" style="height: inherit;">
|
|
189
|
+
<div class="analysis-salesTypeRadio">
|
|
190
|
+
<a-radio-group defaultValue="a">
|
|
191
|
+
<a-radio-button value="a">本日</a-radio-button>
|
|
192
|
+
<a-radio-button value="b">本周</a-radio-button>
|
|
193
|
+
<a-radio-button value="c">本月</a-radio-button>
|
|
194
|
+
</a-radio-group>
|
|
195
|
+
</div>
|
|
196
|
+
</div>
|
|
197
|
+
<h4></h4>
|
|
198
|
+
<div>
|
|
199
|
+
<!-- style="width: calc(100% - 240px);" -->
|
|
200
|
+
<div>
|
|
201
|
+
<v-chart :data="pieData" :force-fit="true" :height="405" :scale="pieScale">
|
|
202
|
+
<v-tooltip :showTitle="false" dataKey="item*percent" />
|
|
203
|
+
<v-axis />
|
|
204
|
+
<!-- position="right" :offsetX="-140" -->
|
|
205
|
+
<v-legend dataKey="item"/>
|
|
206
|
+
<v-pie :vStyle="pieStyle" color="item" position="percent" />
|
|
207
|
+
<v-coord :innerRadius="0.6" :radius="0.75" type="theta" />
|
|
208
|
+
</v-chart>
|
|
209
|
+
</div>
|
|
210
|
+
</div>
|
|
211
|
+
</a-card>
|
|
212
|
+
</a-col>
|
|
213
|
+
</a-row>
|
|
214
|
+
</div>
|
|
215
|
+
</div>
|
|
216
|
+
</a-page-header>
|
|
217
|
+
</template>
|
|
218
|
+
|
|
219
|
+
<script>
|
|
220
|
+
import moment from 'moment'
|
|
221
|
+
import {
|
|
222
|
+
ChartCard,
|
|
223
|
+
MiniArea,
|
|
224
|
+
MiniBar,
|
|
225
|
+
MiniProgress,
|
|
226
|
+
RankList,
|
|
227
|
+
Bar,
|
|
228
|
+
Trend,
|
|
229
|
+
NumberInfo,
|
|
230
|
+
MiniSmoothArea
|
|
231
|
+
} from '@vue2-client/components'
|
|
232
|
+
import { formatDate } from '@vue2-client/utils/util'
|
|
233
|
+
import { Line } from '@antv/g2plot'
|
|
234
|
+
import { mapState } from 'vuex'
|
|
235
|
+
import { WebmeterAnalysisViewApi, post } from '@vue2-client/services/api'
|
|
236
|
+
|
|
237
|
+
const barData = []
|
|
238
|
+
const barData2 = []
|
|
239
|
+
for (let i = 0; i < 12; i += 1) {
|
|
240
|
+
barData.push({
|
|
241
|
+
x: `${i + 1}月`,
|
|
242
|
+
y: Math.floor(Math.random() * 1000) + 200
|
|
243
|
+
})
|
|
244
|
+
barData2.push({
|
|
245
|
+
x: `${i + 1}月`,
|
|
246
|
+
y: Math.floor(Math.random() * 1000) + 200
|
|
247
|
+
})
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
const rankList = []
|
|
251
|
+
for (let i = 0; i < 7; i++) {
|
|
252
|
+
rankList.push({
|
|
253
|
+
name: '白鹭岛 ' + (i + 1) + ' 号店',
|
|
254
|
+
total: 1234.56 - i * 100
|
|
255
|
+
})
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
const searchUserData = []
|
|
259
|
+
for (let i = 0; i < 7; i++) {
|
|
260
|
+
searchUserData.push({
|
|
261
|
+
x: moment().add(i, 'days').format('YYYY-MM-DD'),
|
|
262
|
+
y: Math.ceil(Math.random() * 10)
|
|
263
|
+
})
|
|
264
|
+
}
|
|
265
|
+
const searchUserScale = [
|
|
266
|
+
{
|
|
267
|
+
dataKey: 'x',
|
|
268
|
+
alias: '时间'
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
dataKey: 'y',
|
|
272
|
+
alias: '用气量',
|
|
273
|
+
min: 0,
|
|
274
|
+
max: 10
|
|
275
|
+
}]
|
|
276
|
+
|
|
277
|
+
const searchTableColumns = [
|
|
278
|
+
{
|
|
279
|
+
dataIndex: 'index',
|
|
280
|
+
title: '用户编号',
|
|
281
|
+
width: 90
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
dataIndex: 'keyword',
|
|
285
|
+
title: '用户姓名'
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
dataIndex: 'count',
|
|
289
|
+
title: '用气量'
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
dataIndex: 'range',
|
|
293
|
+
title: '周涨幅',
|
|
294
|
+
align: 'right',
|
|
295
|
+
sorter: (a, b) => a.range - b.range,
|
|
296
|
+
scopedSlots: { customRender: 'range' }
|
|
297
|
+
}
|
|
298
|
+
]
|
|
299
|
+
|
|
300
|
+
const userInfoArray = [
|
|
301
|
+
'德昌鸿公司2',
|
|
302
|
+
'瑞鑫宇公司',
|
|
303
|
+
'保康县熊绎中学',
|
|
304
|
+
'文康置业有限公司',
|
|
305
|
+
'湖北省旗星文化旅游实业有限公司'
|
|
306
|
+
]
|
|
307
|
+
|
|
308
|
+
const searchData = []
|
|
309
|
+
let j = 0
|
|
310
|
+
for (let i = 0; i < 5; i += 1) {
|
|
311
|
+
searchData.push({
|
|
312
|
+
index: Math.floor(Math.random() * 10000000),
|
|
313
|
+
keyword: userInfoArray[j],
|
|
314
|
+
count: Math.floor(Math.random() * 1000),
|
|
315
|
+
range: Math.floor(Math.random() * 10),
|
|
316
|
+
status: Math.floor((Math.random() * 10) % 2)
|
|
317
|
+
})
|
|
318
|
+
j++
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
const DataSet = require('@antv/data-set')
|
|
322
|
+
|
|
323
|
+
const sourceData = [
|
|
324
|
+
{ item: '远程开户', count: 32.2 },
|
|
325
|
+
{ item: '远程充值', count: 21 },
|
|
326
|
+
{ item: '阀门控制', count: 17 },
|
|
327
|
+
{ item: '远程调价', count: 13 },
|
|
328
|
+
{ item: '设置参数', count: 9 },
|
|
329
|
+
{ item: '远程注销', count: 7.8 }
|
|
330
|
+
]
|
|
331
|
+
|
|
332
|
+
const pieScale = [{
|
|
333
|
+
dataKey: 'percent',
|
|
334
|
+
min: 0,
|
|
335
|
+
formatter: '.0%'
|
|
336
|
+
}]
|
|
337
|
+
|
|
338
|
+
const dv = new DataSet.View().source(sourceData)
|
|
339
|
+
dv.transform({
|
|
340
|
+
type: 'percent',
|
|
341
|
+
field: 'count',
|
|
342
|
+
dimension: 'item',
|
|
343
|
+
as: 'percent'
|
|
344
|
+
})
|
|
345
|
+
const pieData = dv.rows
|
|
346
|
+
|
|
347
|
+
export default {
|
|
348
|
+
name: 'WebmeterAnalysisView',
|
|
349
|
+
components: {
|
|
350
|
+
ChartCard,
|
|
351
|
+
MiniArea,
|
|
352
|
+
MiniBar,
|
|
353
|
+
MiniProgress,
|
|
354
|
+
RankList,
|
|
355
|
+
Bar,
|
|
356
|
+
Trend,
|
|
357
|
+
NumberInfo,
|
|
358
|
+
MiniSmoothArea
|
|
359
|
+
},
|
|
360
|
+
data () {
|
|
361
|
+
return {
|
|
362
|
+
// 页面宽度
|
|
363
|
+
screenWidth: document.documentElement.clientWidth,
|
|
364
|
+
// 客户名称
|
|
365
|
+
customerName: '',
|
|
366
|
+
// 指令数统计Loading
|
|
367
|
+
instructSumLoadState: 'loading',
|
|
368
|
+
// 总指令数
|
|
369
|
+
instructSum: 0,
|
|
370
|
+
// 同周比
|
|
371
|
+
instructYoW: 0,
|
|
372
|
+
// 日同比
|
|
373
|
+
instructYoD: 0,
|
|
374
|
+
// 昨日新增指令数
|
|
375
|
+
instructYesAdd: 0,
|
|
376
|
+
// 抄表量统计Loading
|
|
377
|
+
metereadSumLoadState: 'loading',
|
|
378
|
+
// 总抄表量
|
|
379
|
+
metereadSum: 0,
|
|
380
|
+
// 昨日新增抄表量
|
|
381
|
+
metereadYesAdd: 0,
|
|
382
|
+
// 近一周抄表量明细
|
|
383
|
+
metereadSumDataByWeek: [],
|
|
384
|
+
// 近一周抄表量明细列
|
|
385
|
+
metereadSumByWeekScale: [
|
|
386
|
+
{
|
|
387
|
+
dataKey: 'x',
|
|
388
|
+
alias: '时间'
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
dataKey: 'y',
|
|
392
|
+
alias: '抄表量'
|
|
393
|
+
}
|
|
394
|
+
],
|
|
395
|
+
// 抄表情况分析Loading
|
|
396
|
+
radarLoadState: 'loading',
|
|
397
|
+
// 在用表具统计Loading
|
|
398
|
+
usingMeterSumLoadState: 'loading',
|
|
399
|
+
// 在用表具总量
|
|
400
|
+
usingMeterSum: 0,
|
|
401
|
+
// 昨日新增在用表具量
|
|
402
|
+
usingMeterYesAdd: 0,
|
|
403
|
+
// 近一周新增在用表具明细
|
|
404
|
+
usingMeterSumDataByWeek: [],
|
|
405
|
+
// 近一周新增在用表具明细列
|
|
406
|
+
usingMeterSumByWeekScale: [
|
|
407
|
+
{
|
|
408
|
+
dataKey: 'x',
|
|
409
|
+
alias: '时间'
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
dataKey: 'y',
|
|
413
|
+
alias: '开户数'
|
|
414
|
+
}
|
|
415
|
+
],
|
|
416
|
+
// 指令成功率统计Loading
|
|
417
|
+
instructRateOfSuccessLoadState: 'loading',
|
|
418
|
+
// 指令成功率
|
|
419
|
+
instructRateOfSuccessValue: 0,
|
|
420
|
+
// 昨日指令成功率
|
|
421
|
+
yesterdayInstructRateOf: 0,
|
|
422
|
+
// 同周比
|
|
423
|
+
instructRateOfSuccessYoW: 0,
|
|
424
|
+
// 日同比
|
|
425
|
+
instructRateOfSuccessYoD: 0,
|
|
426
|
+
// 指令成功率进度色
|
|
427
|
+
instructRateOfColor: 'rgb(19, 194, 194)',
|
|
428
|
+
// 是否刷新加载中
|
|
429
|
+
loading: false,
|
|
430
|
+
rankList,
|
|
431
|
+
|
|
432
|
+
// 搜索用户数
|
|
433
|
+
searchUserData,
|
|
434
|
+
searchUserScale,
|
|
435
|
+
searchTableColumns,
|
|
436
|
+
searchData,
|
|
437
|
+
|
|
438
|
+
barData,
|
|
439
|
+
barData2,
|
|
440
|
+
|
|
441
|
+
//
|
|
442
|
+
pieScale,
|
|
443
|
+
pieData,
|
|
444
|
+
sourceData,
|
|
445
|
+
pieStyle: {
|
|
446
|
+
stroke: '#fff',
|
|
447
|
+
lineWidth: 1
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
},
|
|
451
|
+
mounted () {
|
|
452
|
+
// 加载指令数统计
|
|
453
|
+
this.loadInstructSumCount()
|
|
454
|
+
// 加载抄表量统计
|
|
455
|
+
this.loadMetereadSumCount()
|
|
456
|
+
// 加载在用表具量统计
|
|
457
|
+
this.loadUsingMeterSumCount()
|
|
458
|
+
// 加载指令成功率统计
|
|
459
|
+
this.loadInstructRateOfSuccess()
|
|
460
|
+
// 加载g2图表
|
|
461
|
+
this.loadGasView()
|
|
462
|
+
},
|
|
463
|
+
computed: {
|
|
464
|
+
...mapState('setting', ['isMobile'])
|
|
465
|
+
},
|
|
466
|
+
props: {
|
|
467
|
+
},
|
|
468
|
+
methods: {
|
|
469
|
+
loadInstructSumCount () {
|
|
470
|
+
this.instructSumLoadState = 'loading'
|
|
471
|
+
return post(WebmeterAnalysisViewApi.instructSumCount, {}).then(res => {
|
|
472
|
+
this.instructSum = res.instructSum
|
|
473
|
+
this.instructYoW = res.instructYoW
|
|
474
|
+
this.instructYoD = res.instructYoD
|
|
475
|
+
this.instructYesAdd = res.instructYesAdd
|
|
476
|
+
this.instructSumLoadState = 'success'
|
|
477
|
+
}, err => {
|
|
478
|
+
console.warn(err)
|
|
479
|
+
this.instructSumLoadState = 'error'
|
|
480
|
+
})
|
|
481
|
+
},
|
|
482
|
+
loadMetereadSumCount () {
|
|
483
|
+
this.metereadSumDataByWeek = []
|
|
484
|
+
this.metereadSumLoadState = 'loading'
|
|
485
|
+
return post(WebmeterAnalysisViewApi.meteReadSumCount, {}).then(res => {
|
|
486
|
+
// 加载近一周抄表数图表
|
|
487
|
+
post(WebmeterAnalysisViewApi.meteReadDataByWeek, {}).then(res => {
|
|
488
|
+
for (let i = 0, len = res.length; i < len; i++) {
|
|
489
|
+
this.metereadSumDataByWeek.push({
|
|
490
|
+
x: res[i].date,
|
|
491
|
+
y: res[i].num
|
|
492
|
+
})
|
|
493
|
+
}
|
|
494
|
+
})
|
|
495
|
+
this.metereadSum = res.metereadSum
|
|
496
|
+
this.metereadYesAdd = res.metereadYesAdd
|
|
497
|
+
this.metereadSumLoadState = 'success'
|
|
498
|
+
}, err => {
|
|
499
|
+
console.warn(err)
|
|
500
|
+
this.metereadSumLoadState = 'error'
|
|
501
|
+
})
|
|
502
|
+
},
|
|
503
|
+
loadUsingMeterSumCount () {
|
|
504
|
+
this.usingMeterSumDataByWeek = []
|
|
505
|
+
this.usingMeterSumLoadState = 'loading'
|
|
506
|
+
return post(WebmeterAnalysisViewApi.usingMeterSumCount, {}).then(res => {
|
|
507
|
+
// 加载近一周开户数图表
|
|
508
|
+
post(WebmeterAnalysisViewApi.usingMeterDataByWeek, {}).then(res => {
|
|
509
|
+
for (let i = 0, len = res.length; i < len; i++) {
|
|
510
|
+
this.usingMeterSumDataByWeek.push({
|
|
511
|
+
x: res[i].date,
|
|
512
|
+
y: res[i].num
|
|
513
|
+
})
|
|
514
|
+
}
|
|
515
|
+
})
|
|
516
|
+
this.usingMeterSum = res.usingMeterSum
|
|
517
|
+
this.usingMeterYesAdd = res.usingMeterYesAdd
|
|
518
|
+
this.usingMeterSumLoadState = 'success'
|
|
519
|
+
}, err => {
|
|
520
|
+
console.warn(err)
|
|
521
|
+
this.usingMeterSumLoadState = 'error'
|
|
522
|
+
})
|
|
523
|
+
},
|
|
524
|
+
loadInstructRateOfSuccess () {
|
|
525
|
+
this.instructRateOfSuccessLoadState = 'loading'
|
|
526
|
+
return post(WebmeterAnalysisViewApi.instructRateOfSuccess, {}).then(res => {
|
|
527
|
+
this.instructRateOfSuccessValue = res.instructRateOfSuccessValue * 1.0
|
|
528
|
+
if (this.instructRateOfSuccessValue < 70.0) {
|
|
529
|
+
this.instructRateOfColor = 'rgb(242, 99, 123)'
|
|
530
|
+
} else if (this.instructRateOfSuccessValue < 90.0) {
|
|
531
|
+
this.instructRateOfColor = 'rgb(251, 212, 55)'
|
|
532
|
+
} else {
|
|
533
|
+
this.instructRateOfColor = 'rgb(19, 194, 194)'
|
|
534
|
+
}
|
|
535
|
+
this.instructRateOfSuccessYoW = res.instructRateOfSuccessYoW
|
|
536
|
+
this.instructRateOfSuccessYoD = res.instructRateOfSuccessYoD
|
|
537
|
+
this.yesterdayInstructRateOf = res.yesterdayInstructRateOf
|
|
538
|
+
this.instructRateOfSuccessLoadState = 'success'
|
|
539
|
+
}, err => {
|
|
540
|
+
console.warn(err)
|
|
541
|
+
this.instructRateOfSuccessLoadState = 'error'
|
|
542
|
+
})
|
|
543
|
+
},
|
|
544
|
+
format (date, format) {
|
|
545
|
+
return formatDate(date, format)
|
|
546
|
+
},
|
|
547
|
+
loadGasView () {
|
|
548
|
+
const _this = this
|
|
549
|
+
_this.getHandPlanCountByMeterBrand()
|
|
550
|
+
},
|
|
551
|
+
getHandPlanCountByMeterBrand () {
|
|
552
|
+
this.radarLoadState = 'loading'
|
|
553
|
+
fetch('/webmeterapi/foreignaidHandMeterSumCountData', {
|
|
554
|
+
method: 'POST',
|
|
555
|
+
body: JSON.stringify({})
|
|
556
|
+
}).then((res) => res.json())
|
|
557
|
+
.then((data) => {
|
|
558
|
+
const linePlot = new Line('container', {
|
|
559
|
+
data,
|
|
560
|
+
xField: 'date',
|
|
561
|
+
yField: 'value',
|
|
562
|
+
seriesField: 'name',
|
|
563
|
+
yAxis: {
|
|
564
|
+
label: {
|
|
565
|
+
// 数值格式化为千分位
|
|
566
|
+
formatter: (v) => `${v}`.replace(/\d{1,3}(?=(\d{3})+$)/g, (s) => `${s},`)
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
tooltip: {
|
|
570
|
+
shared: true
|
|
571
|
+
},
|
|
572
|
+
interactions: [{ type: 'brush' }],
|
|
573
|
+
slider: {
|
|
574
|
+
start: 0.5,
|
|
575
|
+
end: 1
|
|
576
|
+
},
|
|
577
|
+
legend: {
|
|
578
|
+
position: 'top'
|
|
579
|
+
},
|
|
580
|
+
smooth: true
|
|
581
|
+
})
|
|
582
|
+
linePlot.render()
|
|
583
|
+
this.radarLoadState = 'success'
|
|
584
|
+
})
|
|
585
|
+
.catch((ex) => {
|
|
586
|
+
console.error(ex)
|
|
587
|
+
this.radarLoadState = 'error'
|
|
588
|
+
})
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
</script>
|
|
593
|
+
|
|
594
|
+
<style lang="less" scoped>
|
|
595
|
+
|
|
596
|
+
.text {
|
|
597
|
+
color: rgba(0, 0, 0, .45);
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
.heading {
|
|
601
|
+
color: rgba(0, 0, 0, .85);
|
|
602
|
+
font-size: 20px;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
.extra-wrapper {
|
|
606
|
+
line-height: 55px;
|
|
607
|
+
padding-right: 24px;
|
|
608
|
+
|
|
609
|
+
.extra-item {
|
|
610
|
+
display: inline-block;
|
|
611
|
+
margin-right: 24px;
|
|
612
|
+
|
|
613
|
+
a {
|
|
614
|
+
margin-left: 24px;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
.antd-pro-pages-dashboard-analysis-twoColLayout {
|
|
620
|
+
position: relative;
|
|
621
|
+
display: flex;
|
|
622
|
+
display: block;
|
|
623
|
+
flex-flow: row wrap;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
.antd-pro-pages-dashboard-analysis-salesCard {
|
|
627
|
+
height: calc(100% - 24px);
|
|
628
|
+
/deep/ .ant-card-head {
|
|
629
|
+
position: relative;
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
.dashboard-analysis-iconGroup {
|
|
634
|
+
i {
|
|
635
|
+
margin-left: 16px;
|
|
636
|
+
color: rgba(0,0,0,.45);
|
|
637
|
+
cursor: pointer;
|
|
638
|
+
transition: color .32s;
|
|
639
|
+
color: black;
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
.analysis-salesTypeRadio {
|
|
643
|
+
position: absolute;
|
|
644
|
+
right: 54px;
|
|
645
|
+
bottom: 12px;
|
|
646
|
+
}
|
|
647
|
+
</style>
|