vue2-client 1.2.109 → 1.2.112
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 +6 -0
- package/package.json +13 -32
- package/src/base-client/all.js +0 -4
- package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +113 -113
- package/src/base-client/components/common/CitySelect/CitySelect.vue +244 -244
- package/src/base-client/components/common/CitySelect/index.js +3 -3
- package/src/base-client/components/common/CitySelect/index.md +109 -109
- package/src/base-client/components/common/CreateQuery/CreateQuery.vue +547 -547
- package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +777 -777
- package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQuery.vue +310 -310
- package/src/base-client/components/common/PersonSetting/PersonSetting.vue +210 -210
- package/src/base-client/components/common/PersonSetting/index.js +3 -3
- package/src/base-client/components/common/Upload/index.js +3 -3
- package/src/base-client/components/common/XAddForm/XAddForm.vue +349 -349
- package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +322 -322
- package/src/base-client/components/common/XCard/XCard.vue +64 -64
- package/src/base-client/components/common/XForm/XForm.vue +268 -268
- package/src/base-client/components/common/XFormTable/XFormTable.vue +514 -514
- package/src/base-client/components/common/XFormTable/index.md +96 -96
- package/src/base-client/components/iot/DeviceDetailsView/DeviceDetailsView.vue +232 -232
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsCount.vue +678 -678
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsException.vue +57 -57
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsRead.vue +131 -131
- package/src/base-client/components/iot/DeviceTypeDetailsView/DeviceTypeDetailsView.vue +300 -300
- package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +960 -960
- package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +532 -532
- package/src/base-client/plugins/AppData.js +71 -79
- package/src/base-client/plugins/compatible/LoginServiceOA.js +20 -20
- package/src/config/CreateQueryConfig.js +307 -307
- package/src/layouts/header/HeaderNotice.vue +199 -199
- package/src/layouts/header/InstitutionDetail.vue +182 -182
- package/src/pages/resourceManage/orgListManage.vue +98 -98
- package/src/pages/system/ticket/index.vue +111 -130
- package/src/pages/system/ticket/submitTicketSuccess.vue +11 -76
- 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/TicketDetailsViewApi.js +3 -1
- package/src/services/api/WebmeterAnalysisViewApi.js +24 -24
- package/src/services/api/index.js +39 -39
- package/src/services/api/iot/DeviceDetailsView/DeviceDetailsCountApi.js +18 -18
- package/src/services/api/manage.js +16 -16
- package/src/services/api/restTools.js +24 -24
- package/src/theme/default/style.less +47 -47
- package/src/utils/request.js +7 -3
- package/src/utils/util.js +230 -230
- package/vue.config.js +163 -163
- package/src/base-client/components/common/ScrollList/SrcollList.vue +0 -113
- package/src/base-client/components/common/ScrollList/index.js +0 -3
- package/src/base-client/components/iot/DataAnalysisView/DataAnalysisView.vue +0 -244
- package/src/base-client/components/iot/DataAnalysisView/index.js +0 -3
- package/src/components/dataAnalysisView/UserData.vue +0 -61
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<!-- 显示成功页抽屉 -->
|
|
4
|
-
<
|
|
5
|
-
:
|
|
6
|
-
|
|
7
|
-
:category-str="categoryStr"
|
|
8
|
-
v-if="serialNumber"
|
|
9
|
-
/>
|
|
4
|
+
<a-modal v-model="successVisible" title="工单状态" width="70%" :footer="null" destroy-on-close>
|
|
5
|
+
<submit-ticket-success v-if="serialNumber" :serialNumber="serialNumber" />
|
|
6
|
+
</a-modal>
|
|
10
7
|
<!-- 两个使用手册弹框 -->
|
|
11
8
|
<a-modal
|
|
12
9
|
title="向日葵使用指南"
|
|
@@ -118,9 +115,24 @@
|
|
|
118
115
|
<br/>
|
|
119
116
|
</div>
|
|
120
117
|
</a-modal>
|
|
121
|
-
<a-
|
|
118
|
+
<a-modal
|
|
119
|
+
title="填写信息"
|
|
120
|
+
:visible="infoFormVisible"
|
|
121
|
+
@ok="onInfoFormSubmit"
|
|
122
|
+
@cancel="infoFormVisible = false">
|
|
123
|
+
<a-form-model
|
|
124
|
+
ref="infoFormRef"
|
|
125
|
+
:model="infoForm"
|
|
126
|
+
:label-col="{ span: 5 }"
|
|
127
|
+
:wrapper-col="{ span: 18 }">
|
|
128
|
+
<a-form-model-item label="客户名称" prop="customerName" :rules="{ required: true, message: '请输入客户名称' }">
|
|
129
|
+
<a-input v-model="infoForm.customerName" placeholder="请输入客户名称查询历史工单" />
|
|
130
|
+
</a-form-model-item>
|
|
131
|
+
</a-form-model>
|
|
132
|
+
</a-modal>
|
|
133
|
+
<a-card>
|
|
122
134
|
<div style="text-align: right">
|
|
123
|
-
<p
|
|
135
|
+
<p>欢迎您!{{ currUser.ename }}</p>
|
|
124
136
|
</div>
|
|
125
137
|
<div class="submitTicketTitle">
|
|
126
138
|
<span>奥枫问题反馈平台</span>
|
|
@@ -131,13 +143,19 @@
|
|
|
131
143
|
<a-row v-if="tabActiveKey === 'workSubmit'">
|
|
132
144
|
<a-col :span="18">
|
|
133
145
|
<a-form :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }">
|
|
146
|
+
<!-- 客户名称输入 -->
|
|
147
|
+
<a-form-item v-if="!currUser.ename" label="客户名称">
|
|
148
|
+
<a-input v-model="customerName" placeholder="请输入客户名称"/>
|
|
149
|
+
<strong v-show="showCustomerNameAlert" style="color: red">客户名称不能为空!</strong>
|
|
150
|
+
</a-form-item>
|
|
134
151
|
<!-- 问题类型单选框 -->
|
|
135
152
|
<a-form-item label="问题类型">
|
|
136
|
-
<a-radio-group v-model="form.category" v-for="(item,index) in
|
|
153
|
+
<a-radio-group v-model="form.category" v-for="(item,index) in ticketCategoryMap" :key="index">
|
|
137
154
|
<a-radio :value="item.value" class="radio-item">
|
|
138
155
|
{{ item.label }}
|
|
139
156
|
</a-radio>
|
|
140
157
|
</a-radio-group>
|
|
158
|
+
<a-spin :spinning="ticketCategoryMapLoading" />
|
|
141
159
|
<br/>
|
|
142
160
|
<strong v-show="showCategoryAlert" style="color: red">类型不允许为空!</strong>
|
|
143
161
|
</a-form-item>
|
|
@@ -153,21 +171,7 @@
|
|
|
153
171
|
<!-- 图片上传 -->
|
|
154
172
|
<a-form-item :wrapper-col="{ span: 12 }" label="问题截图">
|
|
155
173
|
<div class="clearfix">
|
|
156
|
-
<
|
|
157
|
-
name="avatar"
|
|
158
|
-
list-type="picture-card"
|
|
159
|
-
:before-upload="beforeUpload"
|
|
160
|
-
action="/webmeteruploadapi/upload"
|
|
161
|
-
:file-list="fileList"
|
|
162
|
-
@preview="handlePreview"
|
|
163
|
-
@change="handleChange"
|
|
164
|
-
:remove="remove"
|
|
165
|
-
>
|
|
166
|
-
<div v-if="fileList.length < 5">
|
|
167
|
-
<a-icon type="plus" />
|
|
168
|
-
<div class="ant-upload-text">点击上传</div>
|
|
169
|
-
</div>
|
|
170
|
-
</a-upload>
|
|
174
|
+
<upload :model="uploadModel" @setFiles="setFiles" />
|
|
171
175
|
<a-modal
|
|
172
176
|
:visible="previewVisible"
|
|
173
177
|
:footer="null"
|
|
@@ -179,7 +183,7 @@
|
|
|
179
183
|
</a-form-item>
|
|
180
184
|
<!-- 表单底部按钮 -->
|
|
181
185
|
<a-form-item :wrapper-col="{ span: 12, offset: 5 }">
|
|
182
|
-
<a-button type="primary" @click="onSubmit" style="margin-right: 20px" :disabled="showCategoryAlert || showPhoneAlert">
|
|
186
|
+
<a-button type="primary" @click="onSubmit" style="margin-right: 20px" :disabled="showCategoryAlert || showPhoneAlert || !validCustomerName">
|
|
183
187
|
提交
|
|
184
188
|
</a-button>
|
|
185
189
|
</a-form-item>
|
|
@@ -239,14 +243,13 @@
|
|
|
239
243
|
|
|
240
244
|
<script>
|
|
241
245
|
import { TicketDetailsViewApi, post } from '@vue2-client/services/api'
|
|
242
|
-
import { logout } from '@vue2-client/services/user'
|
|
243
246
|
import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
|
|
244
|
-
import
|
|
247
|
+
import submitTicketSuccess from './submitTicketSuccess'
|
|
245
248
|
|
|
246
249
|
export default {
|
|
247
250
|
name: 'submitTicket',
|
|
248
251
|
components: {
|
|
249
|
-
XFormTable
|
|
252
|
+
XFormTable, submitTicketSuccess
|
|
250
253
|
},
|
|
251
254
|
data () {
|
|
252
255
|
return {
|
|
@@ -267,42 +270,66 @@ export default {
|
|
|
267
270
|
desc: undefined,
|
|
268
271
|
phone: ''
|
|
269
272
|
},
|
|
270
|
-
// 获取序列号使用
|
|
271
|
-
data: {
|
|
272
|
-
priority: 2,
|
|
273
|
-
category: 0,
|
|
274
|
-
time: this.dataFormat(new Date())
|
|
275
|
-
},
|
|
276
273
|
// 工单序列号
|
|
277
274
|
serialNumber: '',
|
|
278
275
|
// 类别未填写警告信息控制
|
|
279
276
|
showCategoryAlert: true,
|
|
280
277
|
showPhoneAlert: true,
|
|
278
|
+
showCustomerNameAlert: true,
|
|
281
279
|
// 向日葵使用指南可见性
|
|
282
280
|
sunClientManualVisible: false,
|
|
283
281
|
// 向日葵使用指南可见性
|
|
284
282
|
toDeskManualVisible: false,
|
|
285
283
|
// 为工单查询指定条件
|
|
286
284
|
fixedQueryForm: {},
|
|
287
|
-
// 工单类型在字典中显示的文字值
|
|
288
|
-
categoryStr: '',
|
|
289
285
|
// 用户信息
|
|
290
286
|
currUser: {
|
|
291
|
-
ename: ''
|
|
292
|
-
phoneNumber: ''
|
|
287
|
+
ename: ''
|
|
293
288
|
},
|
|
294
|
-
|
|
295
|
-
|
|
289
|
+
tabActiveKey: 'workSubmit',
|
|
290
|
+
uploadModel,
|
|
291
|
+
// 客户名称
|
|
292
|
+
customerName: undefined,
|
|
293
|
+
// 问题类型选项
|
|
294
|
+
ticketCategoryMap: [],
|
|
295
|
+
ticketCategoryMapLoading: false,
|
|
296
|
+
// 未传入客户名称信息手动输入弹框
|
|
297
|
+
infoFormVisible: false,
|
|
298
|
+
infoForm: {
|
|
299
|
+
customerName: ''
|
|
300
|
+
}
|
|
296
301
|
}
|
|
297
302
|
},
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
this.
|
|
302
|
-
|
|
303
|
-
})
|
|
303
|
+
computed: {
|
|
304
|
+
// 检查客户名称是否为空
|
|
305
|
+
validCustomerName () {
|
|
306
|
+
return this.currUser.ename || this.customerName ? true : false
|
|
307
|
+
}
|
|
304
308
|
},
|
|
305
|
-
|
|
309
|
+
created () {
|
|
310
|
+
document.title = '奥枫问题反馈平台'
|
|
311
|
+
const dictionary = this.$appdata.getParams()
|
|
312
|
+
if (dictionary && dictionary['ticketCategoryMap']) {
|
|
313
|
+
console.log('pre', dictionary['ticketCategoryMap'])
|
|
314
|
+
this.ticketCategoryMap = dictionary['ticketCategoryMap']
|
|
315
|
+
} else {
|
|
316
|
+
this.ticketCategoryMapLoading = true
|
|
317
|
+
this.$appdata.load().then(() => {
|
|
318
|
+
this.ticketCategoryMap = this.$appdata.getDictionaryList('ticketCategoryMap')
|
|
319
|
+
console.log('load', this.ticketCategoryMap)
|
|
320
|
+
this.ticketCategoryMapLoading = false
|
|
321
|
+
})
|
|
322
|
+
}
|
|
323
|
+
let customerName = this.$route.query.orgName
|
|
324
|
+
// 分割客户名称
|
|
325
|
+
if (customerName) {
|
|
326
|
+
const partArr = customerName.split('.')
|
|
327
|
+
if (partArr.length === 5) {
|
|
328
|
+
customerName = `${partArr[1]}.${partArr[4]}`
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
this.currUser.ename = customerName
|
|
332
|
+
this.fixedQueryForm['t_uploader'] = this.currUser.ename
|
|
306
333
|
},
|
|
307
334
|
methods: {
|
|
308
335
|
toDetail (record, id) {
|
|
@@ -317,42 +344,8 @@ export default {
|
|
|
317
344
|
reader.onerror = error => reject(error)
|
|
318
345
|
})
|
|
319
346
|
},
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
this.fileList = fileList.filter((item) => {
|
|
323
|
-
return item.status === 'done' || item.status === 'uploading'
|
|
324
|
-
})
|
|
325
|
-
},
|
|
326
|
-
// 在上传页面,点击图片上的垃圾桶,撤销上传
|
|
327
|
-
remove (file) {
|
|
328
|
-
return post(TicketDetailsViewApi.revocationImage, {
|
|
329
|
-
file: file
|
|
330
|
-
})
|
|
331
|
-
.then(res => {
|
|
332
|
-
if (res.data === 'success') {
|
|
333
|
-
this.$message.success('删除成功')
|
|
334
|
-
}
|
|
335
|
-
this.fileList = this.fileList.filter((item) => {
|
|
336
|
-
return item.response.name !== file.response.name
|
|
337
|
-
})
|
|
338
|
-
}, err => {
|
|
339
|
-
console.log(err)
|
|
340
|
-
})
|
|
341
|
-
},
|
|
342
|
-
// 上传头像前校验
|
|
343
|
-
beforeUpload (file) {
|
|
344
|
-
const isJpgOrPng =
|
|
345
|
-
file.type === 'image/jpeg' ||
|
|
346
|
-
file.type === 'image/jpg' ||
|
|
347
|
-
file.type === 'image/png'
|
|
348
|
-
const Lt2M = file.size / 1024 / 1024 < 2
|
|
349
|
-
if (!Lt2M) {
|
|
350
|
-
this.$message.error('图片不得大于2MB!')
|
|
351
|
-
}
|
|
352
|
-
if (!isJpgOrPng) {
|
|
353
|
-
this.$message.error('只能上传jpg/png格式的图片')
|
|
354
|
-
}
|
|
355
|
-
return isJpgOrPng && Lt2M
|
|
347
|
+
setFiles (fileIds) {
|
|
348
|
+
this.fileList = fileIds
|
|
356
349
|
},
|
|
357
350
|
handleCancel () {
|
|
358
351
|
this.previewVisible = false
|
|
@@ -367,50 +360,25 @@ export default {
|
|
|
367
360
|
},
|
|
368
361
|
// 提交按钮逻辑
|
|
369
362
|
onSubmit () {
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
363
|
+
let customerName = this.currUser.ename
|
|
364
|
+
if (!customerName) {
|
|
365
|
+
customerName = this.customerName
|
|
366
|
+
}
|
|
367
|
+
const form = {
|
|
368
|
+
customerName,
|
|
369
|
+
problemType: this.form.category,
|
|
370
|
+
contact: this.form.phone,
|
|
371
|
+
problemDetail: this.form.desc,
|
|
372
|
+
Images: this.fileList
|
|
373
|
+
}
|
|
374
|
+
if (!this.form.desc) {
|
|
375
|
+
form.problemDetail = '该用户没有填写描述信息'
|
|
376
|
+
}
|
|
377
|
+
post(TicketDetailsViewApi.createTicket, { form }).then((res) => {
|
|
378
|
+
this.serialNumber = res
|
|
379
|
+
this.successVisible = true
|
|
380
|
+
this.$message.success('创建成功')
|
|
375
381
|
})
|
|
376
|
-
.then(res => {
|
|
377
|
-
const serialNumber = res
|
|
378
|
-
if (this.form.desc === undefined) {
|
|
379
|
-
this.form.desc = '该用户没有填写描述信息'
|
|
380
|
-
}
|
|
381
|
-
// 拿到序列号,将数据保存到数据库中
|
|
382
|
-
this.categoryStr = this.$appdata.getDictionaryList('ticketCategoryMap')[this.form.category].label
|
|
383
|
-
return post(TicketDetailsViewApi.addTicket, {
|
|
384
|
-
uploader: this.currUser.ename,
|
|
385
|
-
description: this.form.desc,
|
|
386
|
-
category: this.form.category,
|
|
387
|
-
serial_number: serialNumber,
|
|
388
|
-
images: this.fileList,
|
|
389
|
-
categoryStr: this.categoryStr,
|
|
390
|
-
phoneNumber: this.form.phone
|
|
391
|
-
})
|
|
392
|
-
.then(res => {
|
|
393
|
-
this.serialNumber = serialNumber
|
|
394
|
-
this.successVisible = true
|
|
395
|
-
this.fileList = []
|
|
396
|
-
this.form.category = ''
|
|
397
|
-
this.form.desc = ''
|
|
398
|
-
this.showCategoryAlert = true
|
|
399
|
-
this.showPhoneAlert = true
|
|
400
|
-
}, err => {
|
|
401
|
-
console.log(err)
|
|
402
|
-
})
|
|
403
|
-
}, err => {
|
|
404
|
-
console.log(err)
|
|
405
|
-
})
|
|
406
|
-
},
|
|
407
|
-
// 格式化时间,为后台提供yyyyMMdd格式数据,方便后台使用
|
|
408
|
-
dataFormat (time) {
|
|
409
|
-
return `${
|
|
410
|
-
time.getFullYear()}${time.getMonth() + 1 >= 10 ? (time.getMonth() + 1) : '0' +
|
|
411
|
-
(time.getMonth() + 1)}${time.getDate() >= 10 ? time.getDate() : '0' +
|
|
412
|
-
time.getDate()
|
|
413
|
-
}`
|
|
414
382
|
},
|
|
415
383
|
// 点击向日葵链接
|
|
416
384
|
toSunClientClick () {
|
|
@@ -420,13 +388,22 @@ export default {
|
|
|
420
388
|
toDeskClick () {
|
|
421
389
|
window.open('https://www.todesk.com/download.html')
|
|
422
390
|
},
|
|
423
|
-
logout () {
|
|
424
|
-
logout()
|
|
425
|
-
this.$router.push('/login')
|
|
426
|
-
},
|
|
427
391
|
// 切换标签页
|
|
428
392
|
changeTab (id) {
|
|
393
|
+
if (id === 'workHistory' && !this.fixedQueryForm.t_uploader) {
|
|
394
|
+
this.infoFormVisible = true
|
|
395
|
+
return
|
|
396
|
+
}
|
|
429
397
|
this.tabActiveKey = id
|
|
398
|
+
},
|
|
399
|
+
onInfoFormSubmit () {
|
|
400
|
+
this.$refs.infoFormRef.validate(valid => {
|
|
401
|
+
if (valid) {
|
|
402
|
+
this.fixedQueryForm['t_uploader'] = this.infoForm.customerName
|
|
403
|
+
this.tabActiveKey = 'workHistory'
|
|
404
|
+
this.infoFormVisible = false
|
|
405
|
+
}
|
|
406
|
+
})
|
|
430
407
|
}
|
|
431
408
|
},
|
|
432
409
|
watch: {
|
|
@@ -438,9 +415,13 @@ export default {
|
|
|
438
415
|
'form.phone' (newVal) {
|
|
439
416
|
const numReg = new RegExp(/^[0-9]+$/)
|
|
440
417
|
this.showPhoneAlert = !numReg.test(newVal)
|
|
418
|
+
},
|
|
419
|
+
'customerName' (newVal) {
|
|
420
|
+
this.showCustomerNameAlert = !newVal
|
|
441
421
|
}
|
|
442
422
|
}
|
|
443
423
|
}
|
|
424
|
+
const uploadModel = JSON.parse('{"addOrEdit":"all","resUploadStock":1,"pathKey":"cs","rule":{"type":"string","required":"false"},"isOnlyAddOrEdit":true,"acceptCount":5,"type":"image","accept":[".jpg,.jpeg,.ico,.gif,svg,.webp,.png,.bmp,.pjpeg,"],"stockAlias":"webmeter","fileRootPath":"D:\\\\nginx-resource\\\\resource\\\\","name":"图片","resUploadMode":"server","model":"Images"}')
|
|
444
425
|
</script>
|
|
445
426
|
|
|
446
427
|
<style scoped>
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
<a-card class="result-success" :bordered="false">
|
|
3
3
|
<result :is-success="icon" :description="description" :title="title">
|
|
4
4
|
<template slot="action">
|
|
5
|
-
<span style="margin-right: 10px" v-if="countDown > 0">{{
|
|
6
|
-
<a-button type="primary" v-if="UrgentAvailable" :disabled="urgentAccess" style="margin-right: 20px" @click="urgent">请求加急处理</a-button>
|
|
7
|
-
<a-button type="danger" @click="closeBtn"
|
|
5
|
+
<span style="margin-right: 10px" v-if="countDown > 0">{{ countDown }}</span>
|
|
6
|
+
<!-- <a-button type="primary" v-if="UrgentAvailable" :disabled="urgentAccess" style="margin-right: 20px" @click="urgent">请求加急处理</a-button> -->
|
|
7
|
+
<!-- <a-button type="danger" @click="closeBtn">撤销工单</a-button> -->
|
|
8
8
|
</template>
|
|
9
9
|
<a-modal
|
|
10
10
|
title="关闭工单"
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
<div class="project-name">工单处理进度</div>
|
|
21
21
|
<detail-list size="small" style="max-width: 800px; margin-bottom: 8px">
|
|
22
22
|
<detail-list-item term="工单编号">{{ serialNumber }}</detail-list-item>
|
|
23
|
-
<detail-list-item term="负责人">{{ details.name }}</detail-list-item>
|
|
24
|
-
<detail-list-item term="提交时间">
|
|
23
|
+
<detail-list-item v-if="details.name" term="负责人">{{ details.name }}</detail-list-item>
|
|
24
|
+
<detail-list-item term="提交时间">{{ details.createdTime}}</detail-list-item>
|
|
25
25
|
</detail-list>
|
|
26
26
|
<a-steps :current="step" progressDot>
|
|
27
27
|
<a-step title="工单提交">
|
|
@@ -60,19 +60,20 @@ const DetailListItem = DetailList.Item
|
|
|
60
60
|
export default {
|
|
61
61
|
name: 'submitTicketSuccess',
|
|
62
62
|
components: { AStepItemGroup, AStepItem, DetailListItem, DetailList, Result },
|
|
63
|
+
props: {
|
|
64
|
+
// 工单序列号
|
|
65
|
+
serialNumber: String,
|
|
66
|
+
},
|
|
63
67
|
data () {
|
|
64
68
|
return {
|
|
65
69
|
title: '提交成功',
|
|
66
|
-
description: '您创建的工单已成功提交,请保持电话畅通,我们的工作人员将尽快与您取得联系。' +
|
|
67
|
-
'如果需要加急,请在倒计时结束后点击加急按钮,加急后我们将优先处理您的工单',
|
|
68
|
-
// 工单序列号
|
|
69
|
-
serialNumber: '',
|
|
70
|
+
description: '您创建的工单已成功提交,请保持电话畅通,我们的工作人员将尽快与您取得联系。', // +
|
|
71
|
+
// '如果需要加急,请在倒计时结束后点击加急按钮,加急后我们将优先处理您的工单',
|
|
70
72
|
// 工单详情
|
|
71
73
|
details: {
|
|
72
74
|
uploader: '',
|
|
73
75
|
status: '',
|
|
74
76
|
name: '',
|
|
75
|
-
priority: undefined,
|
|
76
77
|
createdTime: '',
|
|
77
78
|
confirmTime: '',
|
|
78
79
|
finishedTime: ''
|
|
@@ -83,9 +84,6 @@ export default {
|
|
|
83
84
|
countDown: 0,
|
|
84
85
|
// 控制加急按钮显示
|
|
85
86
|
UrgentAvailable: true,
|
|
86
|
-
// 刷新页面的定时器
|
|
87
|
-
time: undefined,
|
|
88
|
-
timer: undefined,
|
|
89
87
|
// 取消工单确认框可见性
|
|
90
88
|
closeVisible: false,
|
|
91
89
|
// 控制页面大图标
|
|
@@ -93,14 +91,7 @@ export default {
|
|
|
93
91
|
}
|
|
94
92
|
},
|
|
95
93
|
mounted () {
|
|
96
|
-
this.serialNumber = this.$route.query.serialNumber
|
|
97
94
|
this.getTicketDetail()
|
|
98
|
-
this.refresh()
|
|
99
|
-
this.countDown = 0
|
|
100
|
-
},
|
|
101
|
-
beforeDestroy () {
|
|
102
|
-
this.stopTimer()
|
|
103
|
-
this.stopTimer2()
|
|
104
95
|
},
|
|
105
96
|
methods: {
|
|
106
97
|
format (date, format) {
|
|
@@ -117,7 +108,6 @@ export default {
|
|
|
117
108
|
this.title = '工单已关闭'
|
|
118
109
|
this.description = ''
|
|
119
110
|
this.icon = false
|
|
120
|
-
this.stopTimer()
|
|
121
111
|
}, err => {
|
|
122
112
|
console.error(err)
|
|
123
113
|
})
|
|
@@ -130,14 +120,6 @@ export default {
|
|
|
130
120
|
closeBtn () {
|
|
131
121
|
this.closeVisible = true
|
|
132
122
|
},
|
|
133
|
-
// 过10s刷新一下页面数据
|
|
134
|
-
refresh () {
|
|
135
|
-
if (this.timer === undefined) {
|
|
136
|
-
this.timer = setInterval(() => {
|
|
137
|
-
this.getTicketDetail()
|
|
138
|
-
}, 10 * 1000)
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
123
|
// 对工单进行加急处理
|
|
142
124
|
urgent () {
|
|
143
125
|
return post(TicketDetailsViewApi.rushTicket, {
|
|
@@ -161,33 +143,6 @@ export default {
|
|
|
161
143
|
console.log(err)
|
|
162
144
|
})
|
|
163
145
|
},
|
|
164
|
-
// 格式化倒计时
|
|
165
|
-
countDownFormat () {
|
|
166
|
-
const hours = '00'
|
|
167
|
-
let mins = Math.floor(this.countDown / 60)
|
|
168
|
-
let secs = this.countDown % 60
|
|
169
|
-
if (mins < 10) {
|
|
170
|
-
mins = '0' + mins
|
|
171
|
-
}
|
|
172
|
-
if (secs < 10) {
|
|
173
|
-
secs = '0' + secs
|
|
174
|
-
}
|
|
175
|
-
return hours + ':' + mins + ':' + secs
|
|
176
|
-
},
|
|
177
|
-
// 设置用于控制加急按钮倒计时定时器,加急按钮5分钟后才可点击
|
|
178
|
-
setTimer () {
|
|
179
|
-
this.countDown = 5
|
|
180
|
-
if (this.time === undefined) {
|
|
181
|
-
this.time = setInterval(() => {
|
|
182
|
-
this.countDown--
|
|
183
|
-
if (this.countDown <= 0) {
|
|
184
|
-
this.urgentAccess = false
|
|
185
|
-
this.stopTimer2()
|
|
186
|
-
this.countDown = -1
|
|
187
|
-
}
|
|
188
|
-
}, 1000)
|
|
189
|
-
}
|
|
190
|
-
},
|
|
191
146
|
// 获取工单详情
|
|
192
147
|
getTicketDetail () {
|
|
193
148
|
return post(TicketDetailsViewApi.getTicketDetailsForUploader, {
|
|
@@ -215,30 +170,10 @@ export default {
|
|
|
215
170
|
}
|
|
216
171
|
this.details.createdTime = this.format(res.createdtime, 'yyyy-MM-dd hh:mm:ss')
|
|
217
172
|
this.details.status = res.status
|
|
218
|
-
this.details.priority = res.priority
|
|
219
|
-
|
|
220
|
-
// 如果当前状态为一般,设置定时器,五分钟后允许加急
|
|
221
|
-
if (this.details.priority > 1 && this.countDown === 0) {
|
|
222
|
-
this.setTimer()
|
|
223
|
-
}
|
|
224
173
|
}, err => {
|
|
225
174
|
console.log(err)
|
|
226
175
|
})
|
|
227
176
|
},
|
|
228
|
-
// 停止定时器
|
|
229
|
-
stopTimer () {
|
|
230
|
-
if (this.timer) {
|
|
231
|
-
clearInterval(this.timer)
|
|
232
|
-
this.timer = undefined
|
|
233
|
-
}
|
|
234
|
-
},
|
|
235
|
-
// 停止定时器2
|
|
236
|
-
stopTimer2 () {
|
|
237
|
-
if (this.time) {
|
|
238
|
-
clearInterval(this.time)
|
|
239
|
-
this.time = undefined
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
177
|
},
|
|
243
178
|
computed: {
|
|
244
179
|
// 用于进度条,进度显示控制
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import routerMap from './router.map'
|
|
2
|
-
import { parseRoutes } from '@vue2-client/utils/routerUtil'
|
|
3
|
-
|
|
4
|
-
// 异步路由配置
|
|
5
|
-
const routesConfig = [
|
|
6
|
-
'login',
|
|
7
|
-
'submitTicket',
|
|
8
|
-
'root',
|
|
9
|
-
{
|
|
10
|
-
router: 'exp404',
|
|
11
|
-
path: '*',
|
|
12
|
-
name: '404'
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
router: 'exp403',
|
|
16
|
-
path: '/403',
|
|
17
|
-
name: '403'
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
-
|
|
21
|
-
const options = {
|
|
22
|
-
mode: 'history',
|
|
23
|
-
routes: parseRoutes(routesConfig, routerMap)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export default options
|
|
1
|
+
import routerMap from './router.map'
|
|
2
|
+
import { parseRoutes } from '@vue2-client/utils/routerUtil'
|
|
3
|
+
|
|
4
|
+
// 异步路由配置
|
|
5
|
+
const routesConfig = [
|
|
6
|
+
'login',
|
|
7
|
+
'submitTicket',
|
|
8
|
+
'root',
|
|
9
|
+
{
|
|
10
|
+
router: 'exp404',
|
|
11
|
+
path: '*',
|
|
12
|
+
name: '404'
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
router: 'exp403',
|
|
16
|
+
path: '/403',
|
|
17
|
+
name: '403'
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
const options = {
|
|
22
|
+
mode: 'history',
|
|
23
|
+
routes: parseRoutes(routesConfig, routerMap)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default options
|