vue2-client 1.2.1 → 1.2.2
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/docs/notice.md +1 -3
- package/package.json +1 -1
- package/src/assets/img/SunClientDownload.png +0 -0
- package/src/assets/img/SunClientManual/1.png +0 -0
- package/src/assets/img/SunClientManual/2.png +0 -0
- package/src/assets/img/SunClientManual/3.png +0 -0
- package/src/assets/img/SunClientManual/4.png +0 -0
- package/src/assets/img/ToDeskDownload.png +0 -0
- package/src/assets/img/ToDeskManual/1.png +0 -0
- package/src/assets/img/ToDeskManual/2.png +0 -0
- package/src/assets/img/ToDeskManual/3.png +0 -0
- package/src/assets/img/ToDeskManual/4.png +0 -0
- package/src/assets/sound/newNote.mp3 +0 -0
- package/src/base-client/components/common/CreateQuery/CreateQuery.vue +10 -12
- package/src/base-client/components/common/XFormTable/XFormTable.vue +3 -1
- package/src/base-client/components/common/XFormTable/index.md +1 -1
- package/src/base-client/components/ticket/EmployeeDetailsView/EmployeeDetailsView.vue +8 -43
- package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +411 -59
- package/src/base-client/components/ticket/TicketDetailsView/part/TicketDetailsFlow.vue +95 -18
- package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +281 -56
- package/src/services/api/EmployeeDetailsViewApi.js +3 -1
- package/src/services/api/TicketDetailsViewApi.js +9 -1
- package/src/services/api/common.js +1 -3
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<a-card :bordered="false"
|
|
3
|
+
<a-card :bordered="false" :loading="loading">
|
|
4
4
|
<a-timeline ref="timeline" :pending="pendingText" :reverse="true" mode="alternate" style="max-width: 800px;margin: 0 auto;">
|
|
5
5
|
<a-timeline-item v-if="index < 3 ? true : advanced" :key="index" v-for="(value,index) in workFLowList" color="green">
|
|
6
6
|
<div style="color: #0d1a26;font-weight: 500;">
|
|
7
7
|
<span style="font-size: 16px;">{{ value.name }}</span>
|
|
8
8
|
<span style="margin-left: 5px;">({{ format(value.created_time,'yyyy-MM-dd hh:mm:ss') }} 至 {{ format(value.end_time,'yyyy-MM-dd hh:mm:ss') }})</span>
|
|
9
9
|
</div>
|
|
10
|
-
<div class="antd-pro-pages-profile-advanced-style-stepDescription" >
|
|
11
|
-
|
|
10
|
+
<div class="antd-pro-pages-profile-advanced-style-stepDescription" style="margin-top: 5px;margin-bottom: 5px">
|
|
11
|
+
<span class="note" style="font-size: 1.1em;margin-top: 5px;margin-bottom: 5px">留言:{{ value.note }}</span>
|
|
12
12
|
</div>
|
|
13
|
+
<img
|
|
14
|
+
v-for="(item,n) in value.images"
|
|
15
|
+
:src="'data:image/png;base64,' + item.url"
|
|
16
|
+
:key="'s' + n"
|
|
17
|
+
@click="changePhotoClass(item)"
|
|
18
|
+
class="img_sm"
|
|
19
|
+
>
|
|
13
20
|
</a-timeline-item>
|
|
14
21
|
</a-timeline>
|
|
15
22
|
<a-col :md="!advanced && 8 || 24" :sm="24" v-if="workFLowList.length > 3">
|
|
@@ -54,7 +61,18 @@
|
|
|
54
61
|
advanced: false,
|
|
55
62
|
workFLowList: [],
|
|
56
63
|
loading: false,
|
|
57
|
-
pendingText: '持续记录中...'
|
|
64
|
+
pendingText: '持续记录中...',
|
|
65
|
+
// 工单流转留言,详细信息框可见性
|
|
66
|
+
workFlowDetailsVisible: false,
|
|
67
|
+
// 模态框中内容
|
|
68
|
+
modalData: {
|
|
69
|
+
note: '',
|
|
70
|
+
images: []
|
|
71
|
+
},
|
|
72
|
+
// 选中照片是否显示
|
|
73
|
+
selectedImageShow: false,
|
|
74
|
+
// 选中的照片
|
|
75
|
+
selectedImage: null
|
|
58
76
|
}
|
|
59
77
|
},
|
|
60
78
|
mounted () {
|
|
@@ -64,6 +82,10 @@
|
|
|
64
82
|
format (date, format) {
|
|
65
83
|
return formatDate(date, format)
|
|
66
84
|
},
|
|
85
|
+
// 图像点击切换放大缩小
|
|
86
|
+
changePhotoClass (item) {
|
|
87
|
+
this.$emit('imageClick', item)
|
|
88
|
+
},
|
|
67
89
|
// 获取流转工单详情
|
|
68
90
|
getTicketWorkFlowDetail (num) {
|
|
69
91
|
if (this.disableCloseBtn) {
|
|
@@ -75,21 +97,31 @@
|
|
|
75
97
|
return post(TicketDetailsViewApi.getTicketWorkFlowDetails, {
|
|
76
98
|
ticketId: num
|
|
77
99
|
}).then(res => {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
100
|
+
this.workFLowDetails = res
|
|
101
|
+
// 解析workFLowDetails数据
|
|
102
|
+
this.workFLowList = []
|
|
103
|
+
const len = this.workFLowDetails.length
|
|
104
|
+
for (let i = 0; i < len; i++) {
|
|
105
|
+
if (this.workFLowDetails[i].note === undefined) {
|
|
106
|
+
this.workFLowDetails[i].note = ''
|
|
107
|
+
}
|
|
108
|
+
if (this.workFLowDetails[i].images === undefined) {
|
|
109
|
+
this.workFLowDetails[i].images = []
|
|
110
|
+
}
|
|
111
|
+
this.workFLowList.push({
|
|
112
|
+
name: this.workFLowDetails[i].name,
|
|
113
|
+
created_time: this.workFLowDetails[i].created_time,
|
|
114
|
+
end_time: this.workFLowDetails[i].end_time,
|
|
115
|
+
note: this.workFLowDetails[i].note,
|
|
116
|
+
images: this.workFLowDetails[i].images
|
|
117
|
+
})
|
|
118
|
+
for (let j = 0; j < this.workFLowDetails[i].images.length; j++) {
|
|
119
|
+
this.workFLowDetails[i].images[j].isLarge = false
|
|
89
120
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
121
|
+
}
|
|
122
|
+
this.workFLowList = this.workFLowList.reverse()
|
|
123
|
+
this.loading = false
|
|
124
|
+
})
|
|
93
125
|
},
|
|
94
126
|
toggleAdvanced () {
|
|
95
127
|
this.advanced = !this.advanced
|
|
@@ -181,4 +213,49 @@
|
|
|
181
213
|
text-align: left;
|
|
182
214
|
}
|
|
183
215
|
}
|
|
216
|
+
|
|
217
|
+
.img_sm {
|
|
218
|
+
border: rgba(84, 84, 84, 0.2) solid 1.5px;
|
|
219
|
+
border-radius: 5px;
|
|
220
|
+
padding: 10px;
|
|
221
|
+
width: 160px;
|
|
222
|
+
height: 120px;
|
|
223
|
+
}
|
|
224
|
+
.img_xl {
|
|
225
|
+
position: absolute;
|
|
226
|
+
top:0;bottom:0;left:0;right:0;
|
|
227
|
+
margin: auto;
|
|
228
|
+
width: 100%;
|
|
229
|
+
max-width: 1000px;
|
|
230
|
+
cursor: zoom-out;
|
|
231
|
+
z-index: 9999;
|
|
232
|
+
animation: imgZoomIn 0.4s;
|
|
233
|
+
-webkit-animation: imgZoomIn 0.4s;
|
|
234
|
+
}
|
|
235
|
+
@keyframes imgZoomIn
|
|
236
|
+
{
|
|
237
|
+
from {width: 160px;}
|
|
238
|
+
to {width: 100%;}
|
|
239
|
+
}
|
|
240
|
+
.img_sm:hover {
|
|
241
|
+
opacity: 0.6;
|
|
242
|
+
cursor: zoom-in;
|
|
243
|
+
}
|
|
244
|
+
.img_sm_dark{
|
|
245
|
+
filter: grayscale(100%);
|
|
246
|
+
opacity: 0.6;
|
|
247
|
+
border: rgba(84, 84, 84, 0.2) solid 1.5px;
|
|
248
|
+
border-radius: 5px;
|
|
249
|
+
padding: 10px;
|
|
250
|
+
width: 160px;
|
|
251
|
+
height: 120px;
|
|
252
|
+
}
|
|
253
|
+
.imgBackground {
|
|
254
|
+
position: absolute;
|
|
255
|
+
top:0;bottom:0;left:0;right:0;
|
|
256
|
+
width: 100%;
|
|
257
|
+
height: 100%;
|
|
258
|
+
z-index: 9998;
|
|
259
|
+
background-color: rgba(0,0,0,0.7);
|
|
260
|
+
}
|
|
184
261
|
</style>
|
package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue
CHANGED
|
@@ -6,14 +6,53 @@
|
|
|
6
6
|
:visible="visible"
|
|
7
7
|
@close="onClose"
|
|
8
8
|
>
|
|
9
|
+
<!-- 添加描述弹框 -->
|
|
10
|
+
<a-modal
|
|
11
|
+
title="追加问题描述"
|
|
12
|
+
:visible="addOnVisible"
|
|
13
|
+
@ok="handleAddOn"
|
|
14
|
+
@cancel="handleCancelAddOn"
|
|
15
|
+
:zIndex="1001"
|
|
16
|
+
>
|
|
17
|
+
<a-form-model-item label="描述">
|
|
18
|
+
<a-input v-model="desc" type="textarea" />
|
|
19
|
+
</a-form-model-item>
|
|
20
|
+
<div class="clearfix">
|
|
21
|
+
<a-upload
|
|
22
|
+
name="avatar"
|
|
23
|
+
list-type="picture-card"
|
|
24
|
+
:before-upload="beforeUpload"
|
|
25
|
+
action="/webmeteruploadapi/upload"
|
|
26
|
+
:file-list="fileList"
|
|
27
|
+
@preview="handlePreview"
|
|
28
|
+
@change="handleChange"
|
|
29
|
+
:remove="remove"
|
|
30
|
+
>
|
|
31
|
+
<div v-if="fileList.length < 5">
|
|
32
|
+
<a-icon type="plus" />
|
|
33
|
+
<div class="ant-upload-text">点击上传</div>
|
|
34
|
+
</div>
|
|
35
|
+
</a-upload>
|
|
36
|
+
<a-modal
|
|
37
|
+
:visible="previewVisible"
|
|
38
|
+
:footer="null"
|
|
39
|
+
@cancel="handleCancel"
|
|
40
|
+
>
|
|
41
|
+
<img style="width: 100%" :src="previewImage" alt="图片上传"/>
|
|
42
|
+
</a-modal>
|
|
43
|
+
</div>
|
|
44
|
+
</a-modal>
|
|
9
45
|
<a-card class="result-success" :bordered="false">
|
|
10
|
-
<result :is-success="icon" :description="
|
|
46
|
+
<result :is-success="icon" :description="getDescription()" :title="getTitle()" :title-class="titleClass">
|
|
11
47
|
<template slot="action">
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
<a-button type="primary" v-if="UrgentAvailable" :disabled="urgentAccess"
|
|
15
|
-
|
|
16
|
-
|
|
48
|
+
<a-space v-show="btnGroup">
|
|
49
|
+
<!--<a-tooltip placement="topLeft" :title="tip" arrow-point-at-center>-->
|
|
50
|
+
<!-- <a-button type="primary" v-if="UrgentAvailable && details.status === 0 && details.priority === 2" :disabled="urgentAccess" @click="urgent">请求加急处理</a-button>-->
|
|
51
|
+
<!--</a-tooltip>-->
|
|
52
|
+
<a-button type="primary" @click="addOnVisible = true" >追加问题描述</a-button>
|
|
53
|
+
<a-button type="danger" @click="closeBtn" >撤销工单</a-button>
|
|
54
|
+
</a-space>
|
|
55
|
+
<a-button v-show="!btnGroup" type="primary" @click="onClose">返回</a-button>
|
|
17
56
|
</template>
|
|
18
57
|
<a-modal
|
|
19
58
|
title="关闭工单"
|
|
@@ -64,6 +103,14 @@ import { TicketDetailsViewApi } from '@vue2-client/services/api/TicketDetailsVie
|
|
|
64
103
|
import { post } from '@vue2-client/services/api/restTools'
|
|
65
104
|
import { mapState } from 'vuex'
|
|
66
105
|
import { formatDate } from '@vue2-client/utils/util'
|
|
106
|
+
function getBase64 (file) {
|
|
107
|
+
return new Promise((resolve, reject) => {
|
|
108
|
+
const reader = new FileReader()
|
|
109
|
+
reader.readAsDataURL(file)
|
|
110
|
+
reader.onload = () => resolve(reader.result)
|
|
111
|
+
reader.onerror = error => reject(error)
|
|
112
|
+
})
|
|
113
|
+
}
|
|
67
114
|
|
|
68
115
|
const AStepItemGroup = AStepItem.Group
|
|
69
116
|
const DetailListItem = DetailList.Item
|
|
@@ -74,10 +121,8 @@ export default {
|
|
|
74
121
|
return {
|
|
75
122
|
// 页面宽度
|
|
76
123
|
screenWidth: document.documentElement.clientWidth,
|
|
77
|
-
title: '
|
|
78
|
-
description: '
|
|
79
|
-
// 加急按钮气泡文字
|
|
80
|
-
tip: '如果需要加急,请在5分钟倒计时结束后点击加急按钮,加急后我们将优先处理您的工单',
|
|
124
|
+
title: '',
|
|
125
|
+
description: '',
|
|
81
126
|
// 控制标题样式
|
|
82
127
|
titleClass: 'title',
|
|
83
128
|
// 工单详情
|
|
@@ -88,7 +133,8 @@ export default {
|
|
|
88
133
|
priority: undefined,
|
|
89
134
|
createdTime: '',
|
|
90
135
|
confirmTime: '',
|
|
91
|
-
finishedTime: ''
|
|
136
|
+
finishedTime: '',
|
|
137
|
+
createdTimestamp: undefined
|
|
92
138
|
},
|
|
93
139
|
// 控制加急按钮
|
|
94
140
|
urgentAccess: true,
|
|
@@ -103,7 +149,25 @@ export default {
|
|
|
103
149
|
// 控制页面大图标
|
|
104
150
|
icon: true,
|
|
105
151
|
// 控制加急后定时器
|
|
106
|
-
showTelephoneCountDown: 0
|
|
152
|
+
showTelephoneCountDown: 0,
|
|
153
|
+
// 控制预览显示
|
|
154
|
+
previewVisible: false,
|
|
155
|
+
// 图片真实地址
|
|
156
|
+
previewImage: '',
|
|
157
|
+
// 图片列表
|
|
158
|
+
fileList: [],
|
|
159
|
+
// 控制添加描述框显示
|
|
160
|
+
addOnVisible: false,
|
|
161
|
+
// 描述
|
|
162
|
+
desc: '',
|
|
163
|
+
// 等待时间计时器
|
|
164
|
+
waitTimer: undefined,
|
|
165
|
+
// 控制三个按钮显示
|
|
166
|
+
btnGroup: true,
|
|
167
|
+
// 控制工单关闭后标题显示
|
|
168
|
+
titleEnd: 0,
|
|
169
|
+
// 控制显示文字
|
|
170
|
+
descriptionUrgentLevel: 0
|
|
107
171
|
}
|
|
108
172
|
},
|
|
109
173
|
props: {
|
|
@@ -114,21 +178,111 @@ export default {
|
|
|
114
178
|
visible: {
|
|
115
179
|
type: Boolean,
|
|
116
180
|
default: false
|
|
181
|
+
},
|
|
182
|
+
categoryStr: {
|
|
183
|
+
type: String,
|
|
184
|
+
required: true
|
|
117
185
|
}
|
|
118
186
|
},
|
|
119
187
|
mounted () {
|
|
120
|
-
this.
|
|
121
|
-
this.refresh()
|
|
122
|
-
this.countDown = 0
|
|
188
|
+
this.initView()
|
|
123
189
|
},
|
|
124
190
|
methods: {
|
|
191
|
+
initView () {
|
|
192
|
+
this.getTicketDetail()
|
|
193
|
+
this.refresh()
|
|
194
|
+
this.titleClass = 'title'
|
|
195
|
+
this.countDown = 0
|
|
196
|
+
},
|
|
197
|
+
// 提交添加描述
|
|
198
|
+
handleAddOn () {
|
|
199
|
+
return post(TicketDetailsViewApi.AddonDescriptionToTicket, {
|
|
200
|
+
description: this.desc,
|
|
201
|
+
fileList: this.fileList,
|
|
202
|
+
serialNumber: this.serialNumber
|
|
203
|
+
})
|
|
204
|
+
.then(res => {
|
|
205
|
+
this.$message.success('提交成功!')
|
|
206
|
+
this.desc = ''
|
|
207
|
+
this.fileList = []
|
|
208
|
+
this.addOnVisible = false
|
|
209
|
+
}, err => {
|
|
210
|
+
console.log(err)
|
|
211
|
+
})
|
|
212
|
+
},
|
|
213
|
+
// 放弃添加
|
|
214
|
+
handleCancelAddOn () {
|
|
215
|
+
return post(TicketDetailsViewApi.removeAllImages, {
|
|
216
|
+
fileList: this.fileList
|
|
217
|
+
})
|
|
218
|
+
.then(res => {
|
|
219
|
+
this.desc = ''
|
|
220
|
+
this.fileList = []
|
|
221
|
+
this.addOnVisible = false
|
|
222
|
+
}, err => {
|
|
223
|
+
console.log(err)
|
|
224
|
+
})
|
|
225
|
+
},
|
|
226
|
+
// 图像修改检测
|
|
227
|
+
handleChange ({ fileList }) {
|
|
228
|
+
this.fileList = fileList.filter((item) => {
|
|
229
|
+
return item.status === 'done' || item.status === 'uploading'
|
|
230
|
+
})
|
|
231
|
+
},
|
|
232
|
+
// 在上传页面,点击图片上的垃圾桶,撤销上传
|
|
233
|
+
remove (file) {
|
|
234
|
+
return post(TicketDetailsViewApi.revocationImage, {
|
|
235
|
+
file: file
|
|
236
|
+
})
|
|
237
|
+
.then(res => {
|
|
238
|
+
if (res === 'success') {
|
|
239
|
+
this.$message.success('删除成功')
|
|
240
|
+
}
|
|
241
|
+
this.fileList = this.fileList.filter((item) => {
|
|
242
|
+
return item.response.name !== file.response.name
|
|
243
|
+
})
|
|
244
|
+
}, err => {
|
|
245
|
+
console.log(err)
|
|
246
|
+
})
|
|
247
|
+
},
|
|
248
|
+
// 上传头像前校验
|
|
249
|
+
beforeUpload (file) {
|
|
250
|
+
const isJpgOrPng =
|
|
251
|
+
file.type === 'image/jpeg' ||
|
|
252
|
+
file.type === 'image/jpg' ||
|
|
253
|
+
file.type === 'image/png'
|
|
254
|
+
const Lt2M = file.size / 1024 / 1024 < 2
|
|
255
|
+
if (!Lt2M) {
|
|
256
|
+
this.$message.error('图片不得大于2MB!')
|
|
257
|
+
}
|
|
258
|
+
if (!isJpgOrPng) {
|
|
259
|
+
this.$message.error('只能上传jpg/png格式的图片')
|
|
260
|
+
}
|
|
261
|
+
return isJpgOrPng && Lt2M
|
|
262
|
+
},
|
|
263
|
+
handleCancel () {
|
|
264
|
+
this.previewVisible = false
|
|
265
|
+
},
|
|
266
|
+
// 处理预览图像
|
|
267
|
+
async handlePreview (file) {
|
|
268
|
+
if (!file.url && !file.preview) {
|
|
269
|
+
file.preview = await getBase64(file.originFileObj)
|
|
270
|
+
}
|
|
271
|
+
this.previewImage = file.url || file.preview
|
|
272
|
+
this.previewVisible = true
|
|
273
|
+
},
|
|
125
274
|
// 关闭抽屉时回调
|
|
126
275
|
onClose () {
|
|
276
|
+
this.titleEnd = 0
|
|
127
277
|
this.urgentAccess = true
|
|
128
278
|
clearInterval(this.timer)
|
|
279
|
+
clearInterval(this.waitTimer)
|
|
280
|
+
this.timer = undefined
|
|
281
|
+
this.waitTimer = undefined
|
|
282
|
+
this.btnGroup = true
|
|
129
283
|
this.$emit('update:visible', false)
|
|
130
284
|
this.titleClass = 'title'
|
|
131
|
-
this.
|
|
285
|
+
this.descriptionUrgentLevel = 0
|
|
132
286
|
this.title = '提交成功'
|
|
133
287
|
this.UrgentAvailable = true
|
|
134
288
|
},
|
|
@@ -143,10 +297,14 @@ export default {
|
|
|
143
297
|
})
|
|
144
298
|
.then(res => {
|
|
145
299
|
this.closeVisible = false
|
|
146
|
-
this.
|
|
147
|
-
this.description = ''
|
|
148
|
-
this.icon = false
|
|
300
|
+
this.details.status = 2
|
|
149
301
|
clearInterval(this.timer)
|
|
302
|
+
clearInterval(this.waitTimer)
|
|
303
|
+
this.timer = undefined
|
|
304
|
+
this.waitTimer = undefined
|
|
305
|
+
this.btnGroup = false
|
|
306
|
+
this.titleEnd = 1
|
|
307
|
+
this.getTicketDetail()
|
|
150
308
|
}, err => {
|
|
151
309
|
console.error(err)
|
|
152
310
|
})
|
|
@@ -161,29 +319,29 @@ export default {
|
|
|
161
319
|
},
|
|
162
320
|
// 过10s刷新一下页面数据
|
|
163
321
|
refresh () {
|
|
164
|
-
this.timer
|
|
165
|
-
this.
|
|
166
|
-
|
|
322
|
+
if (this.timer === undefined) {
|
|
323
|
+
this.timer = setInterval(() => {
|
|
324
|
+
this.getTicketDetail()
|
|
325
|
+
}, 5000)
|
|
326
|
+
}
|
|
167
327
|
},
|
|
168
328
|
// 对工单进行加急处理
|
|
169
329
|
urgent () {
|
|
170
330
|
return post(TicketDetailsViewApi.rushTicket, {
|
|
171
|
-
serialNumber: this.serialNumber
|
|
331
|
+
serialNumber: this.serialNumber,
|
|
332
|
+
categoryStr: this.categoryStr
|
|
172
333
|
})
|
|
173
334
|
.then(res => {
|
|
174
335
|
if (res === 1) {
|
|
175
336
|
this.$message.success(
|
|
176
|
-
'
|
|
337
|
+
'已为您自动加急',
|
|
177
338
|
5
|
|
178
339
|
)
|
|
179
|
-
this.
|
|
180
|
-
this.titleClass = 'title_danger'
|
|
181
|
-
this.description = '您的工单已经被加急处理,我们的工作人员会马上与您取得联系'
|
|
340
|
+
this.details.priority = 1
|
|
182
341
|
this.UrgentAvailable = false
|
|
183
|
-
this.showPhoneNumberTimer()
|
|
184
342
|
} else {
|
|
185
343
|
this.$message.error(
|
|
186
|
-
'
|
|
344
|
+
'自动加急失败',
|
|
187
345
|
5
|
|
188
346
|
)
|
|
189
347
|
}
|
|
@@ -193,7 +351,6 @@ export default {
|
|
|
193
351
|
},
|
|
194
352
|
// 格式化倒计时
|
|
195
353
|
countDownFormat () {
|
|
196
|
-
const hours = '00'
|
|
197
354
|
let mins = Math.floor(this.countDown / 60)
|
|
198
355
|
let secs = this.countDown % 60
|
|
199
356
|
if (mins < 10) {
|
|
@@ -202,31 +359,88 @@ export default {
|
|
|
202
359
|
if (secs < 10) {
|
|
203
360
|
secs = '0' + secs
|
|
204
361
|
}
|
|
205
|
-
return
|
|
362
|
+
return mins + ':' + secs
|
|
206
363
|
},
|
|
207
364
|
// 设置用于控制加急按钮倒计时定时器,加急按钮5分钟后才可点击
|
|
208
365
|
setTimer () {
|
|
209
|
-
this.countDown =
|
|
210
|
-
|
|
211
|
-
this.
|
|
212
|
-
|
|
213
|
-
this.
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
366
|
+
this.countDown = this.timePass()
|
|
367
|
+
if (this.waitTimer === undefined) {
|
|
368
|
+
this.waitTimer = setInterval(() => {
|
|
369
|
+
this.countDown++
|
|
370
|
+
if (this.countDown >= 300 && this.details.priority === 2) {
|
|
371
|
+
this.urgent()
|
|
372
|
+
this.details.priority = 1
|
|
373
|
+
}
|
|
374
|
+
}, 1000)
|
|
375
|
+
}
|
|
218
376
|
},
|
|
219
|
-
//
|
|
220
|
-
|
|
221
|
-
this.
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
377
|
+
// 获取显示文字内容
|
|
378
|
+
getDescription () {
|
|
379
|
+
if (this.details.status === 1) {
|
|
380
|
+
// 处理中
|
|
381
|
+
return '工单已被接受,请保持电话畅通。我们的工作人员正在尽快为您解决问题'
|
|
382
|
+
}
|
|
383
|
+
if (this.details.status >= 2) {
|
|
384
|
+
// 已关闭
|
|
385
|
+
return ''
|
|
386
|
+
}
|
|
387
|
+
// 已提交,判断优先级
|
|
388
|
+
if (this.details.priority >= 2) {
|
|
389
|
+
// 低优先级
|
|
390
|
+
// 判断用时
|
|
391
|
+
if (this.timePass() < 300) {
|
|
392
|
+
// 5分钟以内
|
|
393
|
+
return '您创建的工单已成功提交,请保持电话畅通,我们的工作人员将在5分钟内与您联系'
|
|
394
|
+
} else if (this.timePass() >= 300 && this.timePass() <= 600) {
|
|
395
|
+
// 5-10分钟
|
|
396
|
+
return '由于您的工单等待时间过长,系统已为您自动加急工单,请保持电话畅通,感谢您的理解'
|
|
397
|
+
} else {
|
|
398
|
+
// 超过十分钟
|
|
399
|
+
return '很抱歉让您久等,029-88888888 您可以直接拨打此电话,与我们技术人员直接交谈!'
|
|
228
400
|
}
|
|
229
|
-
}
|
|
401
|
+
} else {
|
|
402
|
+
// 高优先级
|
|
403
|
+
// 判断用时
|
|
404
|
+
if (this.timePass() < 300) {
|
|
405
|
+
// 5分钟以内
|
|
406
|
+
return '您的工单已经被加急处理,我们的工作人员会马上与您取得联系'
|
|
407
|
+
} else if (this.timePass() >= 300 && this.timePass() <= 600) {
|
|
408
|
+
// 5-10分钟
|
|
409
|
+
return '您的工单已经被加急处理,我们的工作人员会马上与您取得联系'
|
|
410
|
+
} else {
|
|
411
|
+
// 超过十分钟
|
|
412
|
+
return '很抱歉让您久等,029-88888888 您可以直接拨打此电话,与我们技术人员直接交谈!'
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
// 获取标题内容
|
|
417
|
+
getTitle () {
|
|
418
|
+
const titleTime = this.countDownFormat()
|
|
419
|
+
if (this.details.status === 1) {
|
|
420
|
+
// 处理中
|
|
421
|
+
this.titleClass = 'title'
|
|
422
|
+
return '工单正在处理中'
|
|
423
|
+
}
|
|
424
|
+
if (this.details.status >= 2) {
|
|
425
|
+
// 已关闭
|
|
426
|
+
this.titleClass = 'title'
|
|
427
|
+
return '工单已关闭'
|
|
428
|
+
}
|
|
429
|
+
// 已提交,判断优先级
|
|
430
|
+
if (this.details.priority >= 2) {
|
|
431
|
+
// 低优先级
|
|
432
|
+
this.titleClass = 'title'
|
|
433
|
+
return '已提交工单' + '\xa0\xa0\xa0\xa0\xa0(\xa0已等待\xa0\xa0' + titleTime + '\xa0)'
|
|
434
|
+
} else {
|
|
435
|
+
// 高优先级
|
|
436
|
+
this.titleClass = 'title_danger'
|
|
437
|
+
return '加急成功' + '\xa0\xa0\xa0\xa0\xa0(\xa0已等待\xa0\xa0' + titleTime + '\xa0)'
|
|
438
|
+
}
|
|
439
|
+
},
|
|
440
|
+
// 获取工单创建以来过了多久,单位:秒
|
|
441
|
+
timePass () {
|
|
442
|
+
const now = new Date().getTime()
|
|
443
|
+
return Math.floor((now - this.details.createdTimestamp) / 1000)
|
|
230
444
|
},
|
|
231
445
|
// 获取工单详情
|
|
232
446
|
getTicketDetail () {
|
|
@@ -256,11 +470,22 @@ export default {
|
|
|
256
470
|
this.details.createdTime = this.format(res.createdtime, 'yyyy-MM-dd hh:mm:ss')
|
|
257
471
|
this.details.status = res.status
|
|
258
472
|
this.details.priority = res.priority
|
|
259
|
-
|
|
473
|
+
const dateStr = formatDate(this.details.createdTime)
|
|
474
|
+
this.details.createdTimestamp = new Date(dateStr).getTime()
|
|
475
|
+
const timepass = this.timePass()
|
|
260
476
|
// 如果当前状态为一般,设置定时器,五分钟后允许加急
|
|
261
|
-
if (this.
|
|
477
|
+
if (this.countDown === 0 && this.details.status === 0) {
|
|
262
478
|
this.setTimer()
|
|
263
479
|
}
|
|
480
|
+
if (timepass > 300) {
|
|
481
|
+
this.urgentAccess = false
|
|
482
|
+
}
|
|
483
|
+
if (this.details.status >= 2) {
|
|
484
|
+
this.btnGroup = false
|
|
485
|
+
}
|
|
486
|
+
if (this.details.priority <= 1 && this.details.status === 0) {
|
|
487
|
+
this.descriptionUrgentLevel = 2
|
|
488
|
+
}
|
|
264
489
|
}, err => {
|
|
265
490
|
console.log(err)
|
|
266
491
|
})
|
|
@@ -279,10 +504,10 @@ export default {
|
|
|
279
504
|
}
|
|
280
505
|
},
|
|
281
506
|
watch: {
|
|
282
|
-
'
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
507
|
+
'visible' (val) {
|
|
508
|
+
if (val) {
|
|
509
|
+
this.initView()
|
|
510
|
+
}
|
|
286
511
|
}
|
|
287
512
|
}
|
|
288
513
|
}
|
|
@@ -10,7 +10,9 @@ const EmployeeDetailsViewApi = {
|
|
|
10
10
|
// 查询:获取部门名字典
|
|
11
11
|
getDepartmentDictionary: '/webmeterapi/getDepartmentDictionary',
|
|
12
12
|
// 查询:获取模块名字典
|
|
13
|
-
getModelDictionary: '/webmeterapi/getModelDictionary'
|
|
13
|
+
getModelDictionary: '/webmeterapi/getModelDictionary',
|
|
14
|
+
// 查询:获取所有员工名,供前端展示备选项
|
|
15
|
+
getAllEmployeeName: '/webmeterapi/getAllEmployeeName'
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
export { EmployeeDetailsViewApi }
|
|
@@ -24,7 +24,15 @@ const TicketDetailsViewApi = {
|
|
|
24
24
|
// 获取工单类别字典
|
|
25
25
|
getTicketCategoryDictionary: '/webmeterapi/getTicketCategoryDictionary',
|
|
26
26
|
// 在工单提交页面删除照片
|
|
27
|
-
revocationImage: '/webmeterapi/revocationImage'
|
|
27
|
+
revocationImage: '/webmeterapi/revocationImage',
|
|
28
|
+
// 在工单提交页面删除照片
|
|
29
|
+
getTicketImages: '/webmeterapi/getTicketImages',
|
|
30
|
+
// 用户填写附加信息时取消了操作,将已上传的照片清空
|
|
31
|
+
removeAllImages: '/webmeterapi/removeAllImages',
|
|
32
|
+
// 提交用户填写附加信息
|
|
33
|
+
AddonDescriptionToTicket: '/webmeterapi/AddonDescriptionToTicket',
|
|
34
|
+
// 获取用户填写附加信息
|
|
35
|
+
getAddonDescription: '/webmeterapi/getAddonDescription'
|
|
28
36
|
}
|
|
29
37
|
|
|
30
38
|
export { TicketDetailsViewApi }
|
|
@@ -10,9 +10,7 @@ const commonApi = {
|
|
|
10
10
|
// 通用删除
|
|
11
11
|
delete: '/webmeterapi/commonDelete',
|
|
12
12
|
// 获取字典键列表
|
|
13
|
-
getDictionaryParam: '/webmeterapi/getDictionaryParam'
|
|
14
|
-
// 根据字典键获取值
|
|
15
|
-
getDictionaryValue: '/webmeterapi/getDictionaryValue'
|
|
13
|
+
getDictionaryParam: '/webmeterapi/getDictionaryParam'
|
|
16
14
|
}
|
|
17
15
|
|
|
18
16
|
/**
|