vue2-client 1.2.38 → 1.2.40

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 (58) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/docs/notice.md +22 -22
  3. package/package.json +90 -90
  4. package/src/base-client/components/common/FormGroupEdit/FormGroupEdit.vue +149 -149
  5. package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +315 -315
  6. package/src/base-client/components/common/XForm/XForm.vue +275 -275
  7. package/src/base-client/components/iot/CustomerDetailsView/CustomerDetailsView.vue +225 -225
  8. package/src/base-client/components/iot/DataAnalysisView/DataAnalysisView.vue +244 -244
  9. package/src/base-client/components/iot/DeviceBrandDetailsView/DeviceBrandDetailsView.vue +452 -452
  10. package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsCount.vue +330 -330
  11. package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsException.vue +57 -57
  12. package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsInstructOperate.vue +121 -121
  13. package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsRead.vue +131 -131
  14. package/src/base-client/components/iot/DeviceTypeDetailsView/DeviceTypeDetailsView.vue +276 -276
  15. package/src/base-client/components/iot/InstructDetailsView/InstructDetailsView.vue +469 -469
  16. package/src/base-client/components/iot/LogDetailsView/LogDetailsView.vue +379 -379
  17. package/src/base-client/components/iot/MeterDetailsView/MeterDetailsView.vue +359 -359
  18. package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsCount.vue +335 -335
  19. package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsException.vue +184 -184
  20. package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsHandPlan.vue +291 -291
  21. package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsInstruct.vue +236 -236
  22. package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsMain.vue +256 -256
  23. package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsSellGas.vue +189 -189
  24. package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +722 -722
  25. package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +231 -231
  26. package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +247 -247
  27. package/src/base-client/components/ticket/EmployeeDetailsView/EmployeeDetailsView.vue +370 -370
  28. package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +3 -3
  29. package/src/base-client/components/ticket/TicketDetailsView/part/TicketDetailsFlow.vue +260 -260
  30. package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +532 -532
  31. package/src/base-client/plugins/AppData.js +67 -67
  32. package/src/base-client/plugins/GetLoginInfoService.js +252 -252
  33. package/src/components/exception/ExceptionPage.vue +70 -70
  34. package/src/components/setting/Setting.vue +235 -237
  35. package/src/config/default/setting.config.js +5 -4
  36. package/src/config/index.js +3 -6
  37. package/src/layouts/SinglePageView.vue +13 -17
  38. package/src/layouts/header/HeaderNotice.vue +97 -97
  39. package/src/layouts/tabs/TabsView.vue +3 -5
  40. package/src/pages/login/Login.vue +4 -1
  41. package/src/pages/report/ReportTableHome.vue +28 -28
  42. package/src/pages/resourceManage/depListManage.vue +23 -23
  43. package/src/pages/resourceManage/funListManage.vue +23 -23
  44. package/src/pages/resourceManage/index.js +15 -15
  45. package/src/pages/resourceManage/orgListManage.vue +98 -98
  46. package/src/pages/resourceManage/roleListManage.vue +23 -23
  47. package/src/pages/resourceManage/staffListManage.vue +23 -23
  48. package/src/pages/system/ticket/submitTicketSuccess.vue +248 -248
  49. package/src/router/async/config.async.js +26 -26
  50. package/src/router/async/router.map.js +58 -59
  51. package/src/router/index.js +27 -27
  52. package/src/services/api/common.js +47 -47
  53. package/src/services/api/index.js +39 -39
  54. package/src/services/user.js +34 -34
  55. package/src/utils/indexedDB.js +146 -146
  56. package/src/utils/routerUtil.js +359 -360
  57. package/vue.config.js +2 -2
  58. package/src/config/config.js +0 -15
@@ -1,370 +1,370 @@
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
+ <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>