vue2-client 1.3.1 → 1.3.4
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/CHANGELOG.md +9 -1
- package/index.js +30 -28
- package/package.json +1 -1
- package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +225 -225
- package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +777 -777
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +553 -553
- package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +165 -163
- package/src/base-client/components/common/ScrollList/ScrollList.vue +113 -0
- package/src/base-client/components/common/ScrollList/index.js +3 -0
- package/src/base-client/components/common/Upload/Upload.vue +161 -158
- package/src/base-client/components/common/XAddForm/XAddForm.vue +349 -349
- package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +321 -322
- package/src/base-client/components/common/XForm/XForm.vue +273 -268
- package/src/base-client/components/common/XForm/XFormItem.vue +387 -371
- package/src/base-client/components/common/XFormTable/XFormTable.vue +6 -5
- package/src/base-client/components/common/XTable/XTable.vue +278 -274
- package/src/base-client/components/{iot → system}/LogDetailsView/LogDetailsView.vue +0 -0
- package/src/base-client/components/{iot → system}/LogDetailsView/index.js +0 -0
- package/src/base-client/components/{iot → system}/LogDetailsView/index.md +0 -0
- package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +281 -280
- package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +806 -804
- package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +24 -24
- package/src/base-client/plugins/PagedList.js +177 -176
- package/src/components/STable/index.js +318 -316
- package/src/components/index.js +36 -36
- package/src/components/table/StandardTable.vue +141 -142
- package/src/components/tool/TagSelect.vue +83 -83
- package/src/layouts/header/AdminHeader.vue +104 -109
- package/src/layouts/header/HeaderNotice.vue +167 -199
- package/src/layouts/header/InstitutionDetail.vue +181 -182
- package/src/pages/CreateQueryPage.vue +65 -59
- package/src/pages/system/dictionary/index.vue +43 -41
- package/src/pages/system/file/Info.vue +56 -0
- package/src/pages/system/file/index.vue +317 -0
- package/src/pages/system/queryParams/index.vue +43 -41
- package/src/pages/system/ticket/index.vue +458 -452
- package/src/pages/system/ticket/submitTicketSuccess.vue +206 -203
- package/src/router/async/config.async.js +2 -1
- package/src/router/async/router.map.js +56 -60
- package/src/services/api/DictionaryDetailsViewApi.js +6 -6
- package/src/services/api/LogDetailsViewApi.js +10 -10
- package/src/services/api/QueryParamsDetailsViewApi.js +6 -6
- package/src/services/api/TicketDetailsViewApi.js +42 -40
- package/src/services/api/commonTempTable.js +10 -0
- package/src/services/api/index.js +2 -24
- package/src/services/api/manage.js +8 -16
- package/src/utils/excel/Blob.js +181 -181
- package/src/utils/excel/Export2Excel.js +141 -142
- package/src/utils/i18n.js +80 -80
- package/src/utils/request.js +4 -4
- package/src/utils/routerUtil.js +358 -350
- package/src/utils/theme-color-replacer-extend.js +91 -92
- package/vue.config.js +109 -163
- package/src/base-client/all.js +0 -62
- package/src/base-client/components/iot/CustomerDetailsView/CustomerDetailsView.vue +0 -225
- package/src/base-client/components/iot/CustomerDetailsView/index.js +0 -3
- package/src/base-client/components/iot/CustomerDetailsView/index.md +0 -40
- package/src/base-client/components/iot/DataAnalysisUser/DataAnalysisUser.vue +0 -127
- package/src/base-client/components/iot/DataAnalysisUser/index.js +0 -3
- package/src/base-client/components/iot/DeviceBrandDetailsView/DeviceBrandDetailsView.vue +0 -452
- package/src/base-client/components/iot/DeviceBrandDetailsView/index.js +0 -3
- package/src/base-client/components/iot/DeviceDetailsView/DeviceDetailsView.vue +0 -232
- package/src/base-client/components/iot/DeviceDetailsView/index.js +0 -3
- package/src/base-client/components/iot/DeviceDetailsView/index.md +0 -41
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsCount.vue +0 -678
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsException.vue +0 -57
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsInstruct.vue +0 -122
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsInstructOperate.vue +0 -121
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsMain.vue +0 -269
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsRead.vue +0 -131
- package/src/base-client/components/iot/DeviceDetailsView/part/index.js +0 -8
- package/src/base-client/components/iot/DeviceTypeDetailsView/DeviceTypeDetailsView.vue +0 -300
- package/src/base-client/components/iot/DeviceTypeDetailsView/index.js +0 -3
- package/src/base-client/components/iot/InstructDetailsView/InstructDetailsView.vue +0 -464
- package/src/base-client/components/iot/InstructDetailsView/index.js +0 -3
- package/src/base-client/components/iot/InstructDetailsView/index.md +0 -43
- package/src/base-client/components/iot/MeterDetailsView/MeterDetailsView.vue +0 -352
- package/src/base-client/components/iot/MeterDetailsView/index.js +0 -3
- package/src/base-client/components/iot/MeterDetailsView/index.md +0 -41
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsCount.vue +0 -330
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsException.vue +0 -179
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsHandPlan.vue +0 -285
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsInstruct.vue +0 -230
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsMain.vue +0 -251
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsSellGas.vue +0 -184
- package/src/base-client/components/iot/MeterDetailsView/part/index.js +0 -9
- package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +0 -960
- package/src/base-client/components/iot/WebmeterAnalysisView/index.js +0 -3
- package/src/base-client/components/iot/WebmeterAnalysisView/index.md +0 -42
- package/src/base-client/components/ticket/EmployeeDetailsView/EmployeeDetailsView.vue +0 -370
- package/src/base-client/components/ticket/EmployeeDetailsView/index.js +0 -3
- package/src/base-client/components/ticket/EmployeeDetailsView/index.md +0 -28
- package/src/components/Charts/DataUserOrderSituation.vue +0 -77
- package/src/components/Charts/DataUserReporting.vue +0 -74
- package/src/components/Charts/DataUserSituation.vue +0 -107
- package/src/services/api/CustomerDetailsViewApi.js +0 -6
- package/src/services/api/DeviceBrandDetailsViewApi.js +0 -14
- package/src/services/api/DeviceDetailsViewApi.js +0 -10
- package/src/services/api/DeviceTypeDetailsViewApi.js +0 -6
- package/src/services/api/EmployeeDetailsViewApi.js +0 -12
- package/src/services/api/FormGroupEditApi.js +0 -6
- package/src/services/api/InstructDetailsViewApi.js +0 -12
- package/src/services/api/MeterDetailsViewApi.js +0 -24
- package/src/services/api/WebmeterAnalysisViewApi.js +0 -24
- package/src/services/api/applyInstallApi.js +0 -14
- package/src/services/api/iot/DeviceDetailsView/DeviceDetailsCountApi.js +0 -18
- package/src/services/api/iot.js +0 -7
- package/src/services/api/service.js +0 -12
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# WebmeterAnalysisView 物联网表综合分析页
|
|
2
|
-
|
|
3
|
-
提供一个可以对物联网表模块综合分析,展示图表,排行等汇总数据界面的抽屉实现
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## 何时使用
|
|
8
|
-
|
|
9
|
-
允许用户查看物联网表模块整体的综合分析图表,排行等汇总数据。
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
引用方式:
|
|
14
|
-
|
|
15
|
-
```javascript
|
|
16
|
-
import WebmeterAnalysisView from '@vue2-client/base-client/components/WebmeterAnalysisView'
|
|
17
|
-
|
|
18
|
-
export default {
|
|
19
|
-
components: {
|
|
20
|
-
WebmeterAnalysisView
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
## 代码演示
|
|
28
|
-
|
|
29
|
-
```html
|
|
30
|
-
<webmeter-analysis-view
|
|
31
|
-
:visible.sync="detailVisible"
|
|
32
|
-
/>
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## API
|
|
36
|
-
|
|
37
|
-
| 参数 | 说明 | 类型 | 默认值 |
|
|
38
|
-
|---------------|-----------|---------|-------|
|
|
39
|
-
| visible | 是否显示 | Boolean | false |
|
|
40
|
-
| webmeterUrl | 物联网表服务名 | String | null |
|
|
41
|
-
| systemVersion | 系统所属版本 | String | null |
|
|
42
|
-
| dataSource | 系统所属数据库版本 | String | null |
|
|
@@ -1,370 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<a-drawer
|
|
3
|
-
title="员工详情"
|
|
4
|
-
placement="right"
|
|
5
|
-
:width="isMobile ? screenWidth : screenWidth * 0.85"
|
|
6
|
-
:visible="visible"
|
|
7
|
-
@close="onClose"
|
|
8
|
-
>
|
|
9
|
-
<!-- 头部信息展示 -->
|
|
10
|
-
<a-page-header :title="'员工编号:' + this.empId">
|
|
11
|
-
<div class="row">
|
|
12
|
-
<div class="content">
|
|
13
|
-
<a-descriptions size="small" :column="isMobile ? 1 : 2">
|
|
14
|
-
<a-descriptions-item label="姓名">{{ details.name }}</a-descriptions-item>
|
|
15
|
-
<a-descriptions-item label="部门">{{ details.department }}</a-descriptions-item>
|
|
16
|
-
<a-descriptions-item label="负责模块">{{ details.model_in_charge }}</a-descriptions-item>
|
|
17
|
-
</a-descriptions>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
</a-page-header>
|
|
21
|
-
|
|
22
|
-
<!-- 数据展示 -->
|
|
23
|
-
<br/>
|
|
24
|
-
<br/>
|
|
25
|
-
<br/>
|
|
26
|
-
<!-- 应答工单统计 -->
|
|
27
|
-
<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
|
|
28
|
-
<x-card :loadState="confirmLoadState" :retry="loadConfirmCount">
|
|
29
|
-
<chart-card title="总应答数" :total="details.response_ticket_count | NumberFormat">
|
|
30
|
-
<a-tooltip title="刷新" slot="action" :style="{ marginRight: '10px' }" @click="loadConfirmCount()">
|
|
31
|
-
<a-icon type="redo" />
|
|
32
|
-
</a-tooltip>
|
|
33
|
-
<div>
|
|
34
|
-
<mini-area :dataSource="confirmSumWeekly" :scale="confirmSumWeeklyScale" />
|
|
35
|
-
</div>
|
|
36
|
-
<template slot="footer">7日新增 <span> {{ confirmLastWeekCount | NumberFormat }}</span></template>
|
|
37
|
-
</chart-card>
|
|
38
|
-
</x-card>
|
|
39
|
-
</a-col>
|
|
40
|
-
<!-- 完成工单统计 -->
|
|
41
|
-
<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
|
|
42
|
-
<x-card :loadState="finishLoadState" :retry="loadFinishCount">
|
|
43
|
-
<chart-card title="总完成数" :total="details.finished_ticket_count | NumberFormat">
|
|
44
|
-
<a-tooltip title="刷新" slot="action" :style="{ marginRight: '10px' }" @click="loadFinishCount()">
|
|
45
|
-
<a-icon type="redo" />
|
|
46
|
-
</a-tooltip>
|
|
47
|
-
<div>
|
|
48
|
-
<mini-bar :dataSource="finishSumWeekly" :scale="finishSumWeeklyScale" />
|
|
49
|
-
</div>
|
|
50
|
-
<template slot="footer">7日新增 <span>{{ finishLastWeekCount | NumberFormat }}</span></template>
|
|
51
|
-
</chart-card>
|
|
52
|
-
</x-card>
|
|
53
|
-
</a-col>
|
|
54
|
-
<!-- 工单完成率 -->
|
|
55
|
-
<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
|
|
56
|
-
<x-card :loadState="finishedRatioLoadStatus">
|
|
57
|
-
<chart-card title="工单完成占比" :total="details.finished_ticket_ratio + '%'">
|
|
58
|
-
<a-tooltip title="刷新" slot="action" :style="{ marginRight: '10px' }" @click="loadFinishedRatio">
|
|
59
|
-
<a-icon type="redo" />
|
|
60
|
-
</a-tooltip>
|
|
61
|
-
<div>
|
|
62
|
-
<mini-progress :color="finishRatioColor" :target="20" :percentage="details.finished_ticket_ratio" height="8px" />
|
|
63
|
-
</div>
|
|
64
|
-
</chart-card>
|
|
65
|
-
</x-card>
|
|
66
|
-
</a-col>
|
|
67
|
-
</a-drawer>
|
|
68
|
-
</template>
|
|
69
|
-
|
|
70
|
-
<script>
|
|
71
|
-
import JsonViewer from 'vue-json-viewer'
|
|
72
|
-
import { formatDate } from '@vue2-client/utils/util'
|
|
73
|
-
import { EmployeeDetailsViewApi, post } from '@vue2-client/services/api'
|
|
74
|
-
import XTable from '@vue2-client/base-client/components/common/XTable/XTable'
|
|
75
|
-
import { mapState } from 'vuex'
|
|
76
|
-
import {
|
|
77
|
-
ChartCard,
|
|
78
|
-
MiniArea,
|
|
79
|
-
MiniBar,
|
|
80
|
-
MiniProgress,
|
|
81
|
-
RankList,
|
|
82
|
-
Bar,
|
|
83
|
-
Trend,
|
|
84
|
-
NumberInfo,
|
|
85
|
-
MiniSmoothArea
|
|
86
|
-
} from '@vue2-client/components'
|
|
87
|
-
|
|
88
|
-
export default {
|
|
89
|
-
name: 'EmployeeDetailsView',
|
|
90
|
-
components: {
|
|
91
|
-
JsonViewer,
|
|
92
|
-
XTable,
|
|
93
|
-
ChartCard,
|
|
94
|
-
MiniArea,
|
|
95
|
-
MiniBar,
|
|
96
|
-
MiniProgress,
|
|
97
|
-
RankList,
|
|
98
|
-
Bar,
|
|
99
|
-
Trend,
|
|
100
|
-
NumberInfo,
|
|
101
|
-
MiniSmoothArea
|
|
102
|
-
},
|
|
103
|
-
data () {
|
|
104
|
-
return {
|
|
105
|
-
// 页面宽度
|
|
106
|
-
screenWidth: document.documentElement.clientWidth,
|
|
107
|
-
// 员工详情
|
|
108
|
-
details: {
|
|
109
|
-
name: '',
|
|
110
|
-
department: undefined,
|
|
111
|
-
model_in_charge: undefined,
|
|
112
|
-
response_ticket_count: undefined,
|
|
113
|
-
finished_ticket_count: undefined,
|
|
114
|
-
finished_ticket_ratio: undefined
|
|
115
|
-
},
|
|
116
|
-
// 控制加载过程
|
|
117
|
-
loadTicketDetails: false,
|
|
118
|
-
// 控制应答数加载
|
|
119
|
-
confirmLoadState: 'Loading...',
|
|
120
|
-
// 控制完成数加载
|
|
121
|
-
finishLoadState: 'Loading...',
|
|
122
|
-
// 控制完成比例加载
|
|
123
|
-
finishedRatioLoadStatus: 'Loading...',
|
|
124
|
-
// 一周应答明细
|
|
125
|
-
confirmSumWeekly: [],
|
|
126
|
-
// 一周完成明细
|
|
127
|
-
finishSumWeekly: [],
|
|
128
|
-
// 一周应答明细列
|
|
129
|
-
confirmSumWeeklyScale: [
|
|
130
|
-
{
|
|
131
|
-
dataKey: 'x',
|
|
132
|
-
alias: '时间'
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
dataKey: 'y',
|
|
136
|
-
alias: '应答数'
|
|
137
|
-
}
|
|
138
|
-
],
|
|
139
|
-
// 一周完成明细列
|
|
140
|
-
finishSumWeeklyScale: [
|
|
141
|
-
{
|
|
142
|
-
dataKey: 'x',
|
|
143
|
-
alias: '时间'
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
dataKey: 'y',
|
|
147
|
-
alias: '完成数'
|
|
148
|
-
}
|
|
149
|
-
],
|
|
150
|
-
// 7日新增应答数
|
|
151
|
-
confirmLastWeekCount: 0,
|
|
152
|
-
// 7日新增完成数
|
|
153
|
-
finishLastWeekCount: 0,
|
|
154
|
-
// 控制订单完成比例颜色
|
|
155
|
-
finishRatioColor: ''
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
mounted () {
|
|
159
|
-
this.loadConfirmCount()
|
|
160
|
-
this.loadFinishCount()
|
|
161
|
-
this.initView()
|
|
162
|
-
},
|
|
163
|
-
computed: {
|
|
164
|
-
...mapState('account', { currUser: 'user' }),
|
|
165
|
-
...mapState('setting', ['isMobile'])
|
|
166
|
-
},
|
|
167
|
-
props: {
|
|
168
|
-
empId: {
|
|
169
|
-
type: String,
|
|
170
|
-
required: true
|
|
171
|
-
},
|
|
172
|
-
visible: {
|
|
173
|
-
type: Boolean,
|
|
174
|
-
default: false
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
|
-
methods: {
|
|
178
|
-
// 初始化组件
|
|
179
|
-
initView () {
|
|
180
|
-
this.loadTicketDetails = true
|
|
181
|
-
this.finishedRatioLoadStatus = 'Loading...'
|
|
182
|
-
this.details.finished_ticket_ratio = 0
|
|
183
|
-
return post(EmployeeDetailsViewApi.getEmployeeDetails, {
|
|
184
|
-
empId: this.empId
|
|
185
|
-
})
|
|
186
|
-
.then(res => {
|
|
187
|
-
this.details = res
|
|
188
|
-
if (this.details.finished_ticket_ratio === undefined) {
|
|
189
|
-
this.details.finished_ticket_ratio = 0
|
|
190
|
-
}
|
|
191
|
-
this.details.finished_ticket_ratio = this.details.finished_ticket_ratio * 100
|
|
192
|
-
this.finishRatioColor = this.getFinishedRatioColor(this.details.finished_ticket_ratio)
|
|
193
|
-
// 字典值解析
|
|
194
|
-
const departmentValue = this.details.department
|
|
195
|
-
this.details.department = this.$appdata.getDictionaryList('departmentMap')[departmentValue].label
|
|
196
|
-
const modelInChargeValue = this.details.model_in_charge
|
|
197
|
-
const modelDictionary = this.$appdata.getDictionaryList('serviceModuleType')
|
|
198
|
-
for (let i = 0; i < modelDictionary.length; i++) {
|
|
199
|
-
if (modelInChargeValue === modelDictionary[i].value) {
|
|
200
|
-
this.details.model_in_charge = this.$appdata.getDictionaryList('serviceModuleType')[i].label
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
this.finishedRatioLoadStatus = 'success'
|
|
204
|
-
this.loadTicketDetails = false
|
|
205
|
-
}, err => {
|
|
206
|
-
this.loadTicketDetails = false
|
|
207
|
-
console.error(err)
|
|
208
|
-
})
|
|
209
|
-
},
|
|
210
|
-
// 获取应答订单数量
|
|
211
|
-
loadConfirmCount () {
|
|
212
|
-
this.confirmSumWeekly = []
|
|
213
|
-
this.confirmLoadState = 'Loading...'
|
|
214
|
-
return post(EmployeeDetailsViewApi.getConfirmTicketsCountWeekly, {
|
|
215
|
-
empId: this.empId
|
|
216
|
-
}).then(res => {
|
|
217
|
-
this.confirmLastWeekCount = 0
|
|
218
|
-
for (let i = 0, len = res.length; i < len; i++) {
|
|
219
|
-
this.confirmLastWeekCount = this.confirmLastWeekCount + res[i].num
|
|
220
|
-
this.confirmSumWeekly.push({
|
|
221
|
-
x: res[i].date,
|
|
222
|
-
y: res[i].num
|
|
223
|
-
})
|
|
224
|
-
}
|
|
225
|
-
this.confirmLoadState = 'success'
|
|
226
|
-
}, err => {
|
|
227
|
-
console.warn(err)
|
|
228
|
-
this.confirmLoadState = 'error'
|
|
229
|
-
})
|
|
230
|
-
},
|
|
231
|
-
// 获取完成订单数据
|
|
232
|
-
loadFinishCount () {
|
|
233
|
-
this.finishSumWeekly = []
|
|
234
|
-
this.finishLoadState = 'Loading...'
|
|
235
|
-
return post(EmployeeDetailsViewApi.getFinishedTicketsCountWeekly, {
|
|
236
|
-
empId: this.empId
|
|
237
|
-
}).then(res => {
|
|
238
|
-
this.finishLastWeekCount = 0
|
|
239
|
-
for (let i = 0, len = res.length; i < len; i++) {
|
|
240
|
-
this.finishLastWeekCount = this.finishLastWeekCount + res[i].num
|
|
241
|
-
this.finishSumWeekly.push({
|
|
242
|
-
x: res[i].date,
|
|
243
|
-
y: res[i].num
|
|
244
|
-
})
|
|
245
|
-
}
|
|
246
|
-
this.finishLoadState = 'success'
|
|
247
|
-
}, err => {
|
|
248
|
-
console.warn(err)
|
|
249
|
-
this.finishLoadState = 'error'
|
|
250
|
-
})
|
|
251
|
-
},
|
|
252
|
-
// 获取完成订单比例数据
|
|
253
|
-
loadFinishedRatio () {
|
|
254
|
-
this.initView()
|
|
255
|
-
},
|
|
256
|
-
// 根据占比返回完成度颜色
|
|
257
|
-
getFinishedRatioColor (percent) {
|
|
258
|
-
if (percent < 10) {
|
|
259
|
-
return 'rgb(242, 99, 123)'
|
|
260
|
-
} else if (percent >= 10 && percent <= 20) {
|
|
261
|
-
return 'rgb(251, 212, 55)'
|
|
262
|
-
} else {
|
|
263
|
-
return 'rgb(19, 194, 194)'
|
|
264
|
-
}
|
|
265
|
-
},
|
|
266
|
-
// 关闭抽屉时回调
|
|
267
|
-
onClose () {
|
|
268
|
-
this.$emit('update:visible', false)
|
|
269
|
-
this.details.finished_ticket_ratio = undefined
|
|
270
|
-
},
|
|
271
|
-
// 日期格式化
|
|
272
|
-
format (date, format) {
|
|
273
|
-
return formatDate(date, format)
|
|
274
|
-
},
|
|
275
|
-
// 转换JSON
|
|
276
|
-
toJSON (value) {
|
|
277
|
-
try {
|
|
278
|
-
return JSON.parse(value)
|
|
279
|
-
} catch (e) {
|
|
280
|
-
return value
|
|
281
|
-
}
|
|
282
|
-
},
|
|
283
|
-
// 控制开始处理按钮可用状态
|
|
284
|
-
handlerBtnDisable () {
|
|
285
|
-
return this.step !== 0
|
|
286
|
-
},
|
|
287
|
-
// 控制移交他人按钮可用状态
|
|
288
|
-
transferBtnDisable () {
|
|
289
|
-
return this.step === 0
|
|
290
|
-
}
|
|
291
|
-
},
|
|
292
|
-
watch: {
|
|
293
|
-
'visible' (val) {
|
|
294
|
-
if (val) {
|
|
295
|
-
this.initView()
|
|
296
|
-
this.loadConfirmCount()
|
|
297
|
-
this.loadFinishCount()
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
</script>
|
|
303
|
-
|
|
304
|
-
<style lang="less" scoped>
|
|
305
|
-
.high-priority{
|
|
306
|
-
background-color: rgba(163, 30, 30, 0.66);
|
|
307
|
-
border: red solid 1px;
|
|
308
|
-
font-size: large;
|
|
309
|
-
padding: 5px;
|
|
310
|
-
color: white;
|
|
311
|
-
border-radius: 10px;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
.detail-layout {
|
|
315
|
-
margin-left: 44px;
|
|
316
|
-
}
|
|
317
|
-
.text {
|
|
318
|
-
color: rgba(0, 0, 0, .45);
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
.heading {
|
|
322
|
-
color: rgba(0, 0, 0, .85);
|
|
323
|
-
font-size: 20px;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
.no-data {
|
|
327
|
-
color: rgba(0, 0, 0, .25);
|
|
328
|
-
text-align: center;
|
|
329
|
-
line-height: 64px;
|
|
330
|
-
font-size: 16px;
|
|
331
|
-
|
|
332
|
-
i {
|
|
333
|
-
font-size: 24px;
|
|
334
|
-
margin-right: 16px;
|
|
335
|
-
position: relative;
|
|
336
|
-
top: 3px;
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
.mobile {
|
|
341
|
-
.detail-layout {
|
|
342
|
-
margin-left: unset;
|
|
343
|
-
}
|
|
344
|
-
.text {
|
|
345
|
-
|
|
346
|
-
}
|
|
347
|
-
.status-list {
|
|
348
|
-
text-align: left;
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
.row {
|
|
353
|
-
display: flex;
|
|
354
|
-
|
|
355
|
-
.content {
|
|
356
|
-
-webkit-box-flex: 1;
|
|
357
|
-
flex: auto;
|
|
358
|
-
-ms-flex: auto;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
.extra {
|
|
362
|
-
flex: 0 1 auto;
|
|
363
|
-
-webkit-box-flex: 0;
|
|
364
|
-
-ms-flex: 0 1 auto;
|
|
365
|
-
min-width: 242px;
|
|
366
|
-
margin-left: 88px;
|
|
367
|
-
text-align: right;
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
</style>
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# EmployeeDetailsView 员工详情页
|
|
2
|
-
|
|
3
|
-
提供一个可以对某位员工进行一系列通用业务操作的抽屉实现
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## 何时使用
|
|
8
|
-
|
|
9
|
-
允许用户对某位员工进行一系列通用业务操作
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## 代码演示
|
|
14
|
-
|
|
15
|
-
```html
|
|
16
|
-
<employee-details-view
|
|
17
|
-
:visible.sync="detailVisible"
|
|
18
|
-
:empId="empId"
|
|
19
|
-
v-if="empId"
|
|
20
|
-
/>
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## API
|
|
24
|
-
|
|
25
|
-
| 参数 | 说明 | 类型 | 默认值 |
|
|
26
|
-
|---------------|-------|---------|-------|
|
|
27
|
-
| detailVisible | 是否显示 | Boolean | false |
|
|
28
|
-
| empId | 员工编号 | String | null |
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div style="margin-top: 100px">
|
|
3
|
-
<canvas id="OrderSituation" width="350" height="250" top="30"></canvas>
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
// eslint-disable-next-line no-unused-vars
|
|
9
|
-
import { Line } from '@antv/g2plot'
|
|
10
|
-
import F2 from '@antv/f2/lib/index-all'
|
|
11
|
-
// eslint-disable-next-line no-unused-vars
|
|
12
|
-
import _ from 'lodash'
|
|
13
|
-
export default {
|
|
14
|
-
name: 'DataUserOrderSituation',
|
|
15
|
-
data () {
|
|
16
|
-
return {
|
|
17
|
-
chart: null
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
props: {
|
|
21
|
-
instructSituation: {
|
|
22
|
-
type: Array,
|
|
23
|
-
default: () => {
|
|
24
|
-
return []
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
mounted () {
|
|
29
|
-
console.log('instructSituation', this.instructSituation)
|
|
30
|
-
var v = this
|
|
31
|
-
this.$nextTick(() => {
|
|
32
|
-
v.createcon()
|
|
33
|
-
})
|
|
34
|
-
},
|
|
35
|
-
watch: {
|
|
36
|
-
'instructSituation' () {
|
|
37
|
-
this.createcon()
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
methods: {
|
|
41
|
-
createcon () {
|
|
42
|
-
const data = []
|
|
43
|
-
if (this.chart) {
|
|
44
|
-
this.chart.clear()
|
|
45
|
-
}
|
|
46
|
-
if (this.instructSituation.length > 0) {
|
|
47
|
-
console.log(this.instructSituation)
|
|
48
|
-
// eslint-disable-next-line no-unused-vars
|
|
49
|
-
this.instructSituation.forEach(item => {
|
|
50
|
-
const re = {
|
|
51
|
-
genre: item.name,
|
|
52
|
-
sold: parseFloat(item.cout).toFixed(2)
|
|
53
|
-
}
|
|
54
|
-
data.push(re)
|
|
55
|
-
})
|
|
56
|
-
}
|
|
57
|
-
console.log('-00000000', this.instructSituation)
|
|
58
|
-
this.chart = new F2.Chart({
|
|
59
|
-
id: 'OrderSituation',
|
|
60
|
-
pixelRatio: window.devicePixelRatio,
|
|
61
|
-
aria: true, // 开启无障碍描述生成
|
|
62
|
-
title: '指令情况' // 图表标题,可被无障碍识别
|
|
63
|
-
})
|
|
64
|
-
this.chart.source(data)
|
|
65
|
-
this.chart.interval()
|
|
66
|
-
.position('genre*sold')
|
|
67
|
-
.color('genre')
|
|
68
|
-
|
|
69
|
-
this.chart.render()
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
</script>
|
|
74
|
-
|
|
75
|
-
<style scoped>
|
|
76
|
-
|
|
77
|
-
</style>
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="About">
|
|
3
|
-
<canvas id="containers" width="350" height="250"></canvas>
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
// eslint-disable-next-line no-unused-vars
|
|
9
|
-
import F2 from '@antv/f2'
|
|
10
|
-
export default {
|
|
11
|
-
name: 'Radar',
|
|
12
|
-
data () {
|
|
13
|
-
return {
|
|
14
|
-
chart: null
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
props: {
|
|
18
|
-
reportSituation: {
|
|
19
|
-
type: Array,
|
|
20
|
-
default: () => {
|
|
21
|
-
return []
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
mounted () {
|
|
26
|
-
var v = this
|
|
27
|
-
this.$nextTick(() => {
|
|
28
|
-
v.createcon()
|
|
29
|
-
})
|
|
30
|
-
},
|
|
31
|
-
methods: {
|
|
32
|
-
createcon () {
|
|
33
|
-
const data = []
|
|
34
|
-
if (this.chart) {
|
|
35
|
-
this.chart.clear()
|
|
36
|
-
}
|
|
37
|
-
// eslint-disable-next-line no-const-assign
|
|
38
|
-
if (this.reportSituation.length > 0) {
|
|
39
|
-
// eslint-disable-next-line no-unused-vars
|
|
40
|
-
this.reportSituation.forEach(item => {
|
|
41
|
-
const re = {
|
|
42
|
-
genre: item.name,
|
|
43
|
-
sold: parseFloat(item.cout).toFixed(2)
|
|
44
|
-
}
|
|
45
|
-
data.push(re)
|
|
46
|
-
})
|
|
47
|
-
}
|
|
48
|
-
console.log('reportSituation==data', data)
|
|
49
|
-
this.chart = new F2.Chart({
|
|
50
|
-
id: 'containers',
|
|
51
|
-
pixelRatio: window.devicePixelRatio,
|
|
52
|
-
aria: true, // 开启无障碍描述生成
|
|
53
|
-
title: '抄表上报' // 图表标题,可被无障碍识别
|
|
54
|
-
})
|
|
55
|
-
this.chart.source(data)
|
|
56
|
-
this.chart.interval()
|
|
57
|
-
.position('genre*sold')
|
|
58
|
-
.color('genre')
|
|
59
|
-
|
|
60
|
-
this.chart.render()
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
watch: {
|
|
64
|
-
'reportSituation' () {
|
|
65
|
-
console.log('222.')
|
|
66
|
-
this.createcon()
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
</script>
|
|
71
|
-
|
|
72
|
-
<style scoped>
|
|
73
|
-
|
|
74
|
-
</style>
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="About">
|
|
3
|
-
<canvas id="conter" width="350" height="250"></canvas>
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
// eslint-disable-next-line no-unused-vars
|
|
9
|
-
import { Line } from '@antv/g2plot'
|
|
10
|
-
import F2 from '@antv/f2'
|
|
11
|
-
export default {
|
|
12
|
-
name: 'DataUserSituation',
|
|
13
|
-
data () {
|
|
14
|
-
return {
|
|
15
|
-
chart: null
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
props: {
|
|
19
|
-
alarmSituation: {
|
|
20
|
-
type: Array,
|
|
21
|
-
default: () => {
|
|
22
|
-
return []
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
mounted () {
|
|
27
|
-
var v = this
|
|
28
|
-
this.$nextTick(() => {
|
|
29
|
-
v.createcon()
|
|
30
|
-
})
|
|
31
|
-
},
|
|
32
|
-
methods: {
|
|
33
|
-
createcon () {
|
|
34
|
-
const data = []
|
|
35
|
-
if (this.chart) {
|
|
36
|
-
this.chart.clear()
|
|
37
|
-
}
|
|
38
|
-
// eslint-disable-next-line no-const-assign
|
|
39
|
-
if (this.alarmSituation.length > 0) {
|
|
40
|
-
let sums = 0
|
|
41
|
-
this.alarmSituation.forEach(function (item) {
|
|
42
|
-
sums += item.cout
|
|
43
|
-
})
|
|
44
|
-
this.alarmSituation.forEach(function (item) {
|
|
45
|
-
const res = {
|
|
46
|
-
name: item.name,
|
|
47
|
-
percent: parseFloat((item.cout / (sums * 0.01)).toFixed(2)),
|
|
48
|
-
a: '1'
|
|
49
|
-
}
|
|
50
|
-
data.push(res)
|
|
51
|
-
})
|
|
52
|
-
}
|
|
53
|
-
console.log('alarmSituation==data', data)
|
|
54
|
-
const map = {}
|
|
55
|
-
data.forEach(function (obj) {
|
|
56
|
-
map[obj.name] = parseFloat(obj.percent) + '%'
|
|
57
|
-
})
|
|
58
|
-
this.chart = new F2.Chart({
|
|
59
|
-
id: 'conter',
|
|
60
|
-
padding: [ 20, 'auto' ]
|
|
61
|
-
})
|
|
62
|
-
this.chart.source(data, {
|
|
63
|
-
percent: {
|
|
64
|
-
formatter: function formatter (val) {
|
|
65
|
-
return val + '%'
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
})
|
|
69
|
-
console.log(this.chart)
|
|
70
|
-
this.chart.tooltip(false)
|
|
71
|
-
this.chart.legend({
|
|
72
|
-
position: 'right',
|
|
73
|
-
itemFormatter: function itemFormatter (val) {
|
|
74
|
-
return val + ' ' + map[val]
|
|
75
|
-
}
|
|
76
|
-
})
|
|
77
|
-
this.chart.coord('polar', {
|
|
78
|
-
transposed: true,
|
|
79
|
-
innerRadius: 0.7,
|
|
80
|
-
radius: 0.87
|
|
81
|
-
})
|
|
82
|
-
this.chart.axis(false)
|
|
83
|
-
this.chart.interval()
|
|
84
|
-
.position('a*percent')
|
|
85
|
-
.color('name', [ '#FE5D4D', '#3BA4FF', '#65e25c', '#FFAC4EA2', '#FF65E25C' ])
|
|
86
|
-
.adjust('stack')
|
|
87
|
-
this.chart.guide().html({
|
|
88
|
-
position: [ '5px', '3px' ],
|
|
89
|
-
html: `<div style="text-align: center;">
|
|
90
|
-
<div style="font-size: 15px"></div>
|
|
91
|
-
</div>`
|
|
92
|
-
})
|
|
93
|
-
console.log('1111111')
|
|
94
|
-
this.chart.render()
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
watch: {
|
|
98
|
-
'alarmSituation' () {
|
|
99
|
-
this.createcon()
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
</script>
|
|
104
|
-
|
|
105
|
-
<style scoped>
|
|
106
|
-
|
|
107
|
-
</style>
|