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
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
:visible="visible"
|
|
7
7
|
@close="onClose"
|
|
8
8
|
>
|
|
9
|
+
<!-- 移交工单对话框 -->
|
|
9
10
|
<a-modal
|
|
10
11
|
title="移交工单"
|
|
11
12
|
:visible="transVisible"
|
|
@@ -13,13 +14,41 @@
|
|
|
13
14
|
@cancel="handleTransferCancel"
|
|
14
15
|
:zIndex="1001"
|
|
15
16
|
>
|
|
16
|
-
<a-input placeholder="请输入要转移工单的员工名" v-model="transferTo" @blur="checkEmp
|
|
17
|
+
<a-input placeholder="请输入要转移工单的员工名" v-model="transferTo" @blur="checkEmp" @change="inputChange"/>
|
|
18
|
+
<div class="nameOptions" v-show="nameOptionsVisible">
|
|
19
|
+
<p class="nameOptionsItem" v-for="(item,index) in nameOptionsForChoose" :key="index" @click="chooseName(item.name)">{{ item.name }}</p>
|
|
20
|
+
</div>
|
|
17
21
|
<span v-if="!transferCheck" style="color: red">您输入的员工不存在,请检查后再试</span>
|
|
18
|
-
<span v-
|
|
22
|
+
<span v-else style="color: green">您输入的员工已确认,可以进行工单转移</span>
|
|
19
23
|
<a-form-model-item label="留言">
|
|
20
24
|
<a-input v-model="note" type="textarea" />
|
|
21
25
|
</a-form-model-item>
|
|
26
|
+
<div class="clearfix">
|
|
27
|
+
<a-upload
|
|
28
|
+
name="avatar"
|
|
29
|
+
list-type="picture-card"
|
|
30
|
+
:before-upload="beforeUpload"
|
|
31
|
+
action="/webmeteruploadapi/upload"
|
|
32
|
+
:file-list="fileList"
|
|
33
|
+
@preview="handlePreview"
|
|
34
|
+
@change="handleChange"
|
|
35
|
+
:remove="remove"
|
|
36
|
+
>
|
|
37
|
+
<div v-if="fileList.length < 5">
|
|
38
|
+
<a-icon type="plus" />
|
|
39
|
+
<div class="ant-upload-text">点击上传</div>
|
|
40
|
+
</div>
|
|
41
|
+
</a-upload>
|
|
42
|
+
<a-modal
|
|
43
|
+
:visible="previewVisible"
|
|
44
|
+
:footer="null"
|
|
45
|
+
@cancel="handleCancel"
|
|
46
|
+
>
|
|
47
|
+
<img style="width: 100%" :src="previewImage" alt="图片上传"/>
|
|
48
|
+
</a-modal>
|
|
49
|
+
</div>
|
|
22
50
|
</a-modal>
|
|
51
|
+
<!-- 关闭工单确认框 -->
|
|
23
52
|
<a-modal
|
|
24
53
|
title="关闭工单"
|
|
25
54
|
:visible="closeVisible"
|
|
@@ -30,6 +59,7 @@
|
|
|
30
59
|
<p>是否确认手动关闭工单?</p>
|
|
31
60
|
<p style="color: red">(该操作不可撤销,请谨慎操作!)</p>
|
|
32
61
|
</a-modal>
|
|
62
|
+
<!-- 信息主体 -->
|
|
33
63
|
<a-spin :spinning="loadTicketDetails">
|
|
34
64
|
<a-page-header :title="'订单:' + this.details.serial_number">
|
|
35
65
|
<div class="row">
|
|
@@ -43,6 +73,7 @@
|
|
|
43
73
|
</a-descriptions-item>
|
|
44
74
|
<a-descriptions-item label="发起人">{{ details.uploader }}</a-descriptions-item>
|
|
45
75
|
<a-descriptions-item label="问题类型">{{ details.category }}</a-descriptions-item>
|
|
76
|
+
<a-descriptions-item label="发起人联系方式">{{ details.uploader_phone }}</a-descriptions-item>
|
|
46
77
|
</a-descriptions>
|
|
47
78
|
</div>
|
|
48
79
|
</div>
|
|
@@ -69,14 +100,12 @@
|
|
|
69
100
|
<a-button type="danger" @click="closeBtn()" :disabled="closeBtnDisable()">关闭工单</a-button>
|
|
70
101
|
</a-popover>
|
|
71
102
|
</a-button-group>
|
|
103
|
+
<a-button-group style="margin-right: 4px;">
|
|
104
|
+
<a-button type="dashed" @click="initView" :loading="showSpin">刷新({{ btnCountdownText }})</a-button>
|
|
105
|
+
</a-button-group>
|
|
72
106
|
</template>
|
|
73
|
-
|
|
74
|
-
<br/>
|
|
75
|
-
<br/>
|
|
76
|
-
<br/>
|
|
77
|
-
|
|
78
107
|
<!-- 进度条 -->
|
|
79
|
-
<a-card :bordered="false">
|
|
108
|
+
<a-card :bordered="false" style="margin-top: 40px">
|
|
80
109
|
<a-steps :direction="'horizontal'" :current="step">
|
|
81
110
|
<a-step>
|
|
82
111
|
<template v-slot:title><span>待处理</span></template>
|
|
@@ -98,17 +127,57 @@
|
|
|
98
127
|
</a-step>
|
|
99
128
|
</a-steps>
|
|
100
129
|
</a-card>
|
|
101
|
-
|
|
102
|
-
<
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
130
|
+
<!-- 切换栏 -->
|
|
131
|
+
<a-tabs style="margin-top: 50px;">
|
|
132
|
+
<!-- 问题描述 -->
|
|
133
|
+
<a-tab-pane :key="1" tab="问题详细描述">
|
|
134
|
+
<a-card style="width: 100%" :loading="descriptionLoading">
|
|
135
|
+
<span style="font-size: 2em;margin-right: 20px">{{ details.uploader }}</span>
|
|
136
|
+
<span>{{ format(details.created_time,'yyyy年MM月dd日 hh:mm:ss') }}</span>
|
|
137
|
+
<p style="text-indent: 2em;font-size: 20px;margin: 10px">{{ details.description }}</p>
|
|
138
|
+
<img
|
|
139
|
+
v-for="(originalPic,n) in originalImages"
|
|
140
|
+
:src="'data:image/png;base64,' + originalPic.url"
|
|
141
|
+
@click="changePhotoClass(originalPic.id)"
|
|
142
|
+
:key="'os' + n"
|
|
143
|
+
:class="changePhotoClassForSmall(originalPic.id)"
|
|
144
|
+
style="margin-bottom: 10px"
|
|
145
|
+
>
|
|
146
|
+
<div style="margin-bottom: 10px;height: 1px;background: -webkit-linear-gradient(left, #fff -4%,#6b6c72 50%,#fff 100%);"></div>
|
|
147
|
+
<div v-if="addOnDescription.length > 0" v-for="(item,index) in addOnDescription" :key="index">
|
|
148
|
+
<span style="font-size: 2em;margin-right: 20px;margin-top: 20px">{{ details.uploader }}</span>
|
|
149
|
+
<span>{{ format(item.time,'yyyy年MM月dd日 hh:mm:ss') }}</span>
|
|
150
|
+
<p style="text-indent: 2em;font-size: 20px;margin: 20px">{{ item.description }}</p>
|
|
151
|
+
<img
|
|
152
|
+
v-for="(pic,m) in item.images"
|
|
153
|
+
:src="'data:image/png;base64,' + pic.url"
|
|
154
|
+
@click="changePhotoClass(pic.id)"
|
|
155
|
+
:key="'is' + m"
|
|
156
|
+
:class="changePhotoClassForSmall(pic.id)"
|
|
157
|
+
>
|
|
158
|
+
<div style="height: 1px;background: -webkit-linear-gradient(left, #fff -4%,#6b6c72 50%,#fff 100%);"></div>
|
|
159
|
+
</div>
|
|
160
|
+
</a-card>
|
|
161
|
+
</a-tab-pane>
|
|
162
|
+
<!-- 工单流转历史 -->
|
|
163
|
+
<a-tab-pane :key="2" tab="工单流转历史">
|
|
164
|
+
<ticket-details-flow
|
|
165
|
+
@imageClick="flowImageClick"
|
|
166
|
+
v-if="details.id"
|
|
167
|
+
:ticketId="ticketId"
|
|
168
|
+
:disableCloseBtn="disableCloseBtn"
|
|
169
|
+
:id="details.id"/>
|
|
170
|
+
</a-tab-pane>
|
|
171
|
+
</a-tabs>
|
|
110
172
|
</a-page-header>
|
|
111
173
|
</a-spin>
|
|
174
|
+
<audio controls="controls" hidden src="@/assets/sound/newNote.mp3" ref="audio"></audio>
|
|
175
|
+
<!-- 放大后图片 -->
|
|
176
|
+
<div class="imgBackground" v-if="selectedImageShow" @click="changePhotoClass(selectedImage.id)">
|
|
177
|
+
<img
|
|
178
|
+
:src="'data:image/png;base64,' + selectedImage.url"
|
|
179
|
+
class="img_xl">
|
|
180
|
+
</div>
|
|
112
181
|
</a-drawer>
|
|
113
182
|
</template>
|
|
114
183
|
|
|
@@ -121,6 +190,16 @@
|
|
|
121
190
|
import XTable from '@vue2-client/base-client/components/common/XTable/XTable'
|
|
122
191
|
import { mapState } from 'vuex'
|
|
123
192
|
import TicketDetailsFlow from './part/TicketDetailsFlow'
|
|
193
|
+
import moment from 'moment'
|
|
194
|
+
|
|
195
|
+
function getBase64 (file) {
|
|
196
|
+
return new Promise((resolve, reject) => {
|
|
197
|
+
const reader = new FileReader()
|
|
198
|
+
reader.readAsDataURL(file)
|
|
199
|
+
reader.onload = () => resolve(reader.result)
|
|
200
|
+
reader.onerror = error => reject(error)
|
|
201
|
+
})
|
|
202
|
+
}
|
|
124
203
|
|
|
125
204
|
export default {
|
|
126
205
|
name: 'TicketDetailsView',
|
|
@@ -131,8 +210,17 @@
|
|
|
131
210
|
},
|
|
132
211
|
data () {
|
|
133
212
|
return {
|
|
213
|
+
moment,
|
|
134
214
|
// 页面宽度
|
|
135
215
|
screenWidth: document.documentElement.clientWidth,
|
|
216
|
+
// 控制成功页面显示
|
|
217
|
+
successVisible: false,
|
|
218
|
+
// 控制预览显示
|
|
219
|
+
previewVisible: false,
|
|
220
|
+
// 图片真实地址
|
|
221
|
+
previewImage: '',
|
|
222
|
+
// 图片列表
|
|
223
|
+
fileList: [],
|
|
136
224
|
// 工单详情
|
|
137
225
|
details: {
|
|
138
226
|
// 当前负责人ID
|
|
@@ -146,8 +234,12 @@
|
|
|
146
234
|
confirm_time: '',
|
|
147
235
|
finished_time: '',
|
|
148
236
|
category: '',
|
|
149
|
-
serial_number: ''
|
|
237
|
+
serial_number: '',
|
|
238
|
+
uploader_phone: ''
|
|
150
239
|
},
|
|
240
|
+
images: [],
|
|
241
|
+
selectedImage: null,
|
|
242
|
+
selectedImageShow: false,
|
|
151
243
|
// 当前步骤
|
|
152
244
|
step: 0,
|
|
153
245
|
// 校验转移员工是否存在
|
|
@@ -164,12 +256,31 @@
|
|
|
164
256
|
closeVisible: false,
|
|
165
257
|
// 控制加载过程
|
|
166
258
|
loadTicketDetails: false,
|
|
167
|
-
//
|
|
168
|
-
|
|
259
|
+
// 附加描述
|
|
260
|
+
addOnDescription: [],
|
|
261
|
+
// 上传工单时自带照片
|
|
262
|
+
originalImages: [],
|
|
263
|
+
// 定时刷新定时器
|
|
264
|
+
timer: undefined,
|
|
265
|
+
// 所有员工姓名
|
|
266
|
+
nameOptions: [],
|
|
267
|
+
// 员工姓名备选
|
|
268
|
+
nameOptionsForChoose: [],
|
|
269
|
+
// 员工姓名备选项显示控制
|
|
270
|
+
nameOptionsVisible: false,
|
|
271
|
+
// 工单流转抽屉可见性
|
|
272
|
+
workFlowVisible: false,
|
|
273
|
+
// 控制小加载指示物显示
|
|
274
|
+
showSpin: true,
|
|
275
|
+
// 原始描述长度
|
|
276
|
+
addOnDescriptionOriginal: undefined,
|
|
277
|
+
// 描述加载控制
|
|
278
|
+
descriptionLoading: false,
|
|
279
|
+
// 用于刷新按钮倒计时显示
|
|
280
|
+
btnCountdownText: 5
|
|
169
281
|
}
|
|
170
282
|
},
|
|
171
283
|
mounted () {
|
|
172
|
-
this.getTicketCategory()
|
|
173
284
|
this.initView()
|
|
174
285
|
},
|
|
175
286
|
computed: {
|
|
@@ -187,19 +298,170 @@
|
|
|
187
298
|
}
|
|
188
299
|
},
|
|
189
300
|
methods: {
|
|
301
|
+
// 转移员工姓名change事件,用于展示备选
|
|
302
|
+
inputChange () {
|
|
303
|
+
if (this.transferTo.length === 0) {
|
|
304
|
+
this.nameOptionsVisible = false
|
|
305
|
+
} else {
|
|
306
|
+
this.nameOptionsVisible = true
|
|
307
|
+
var inputName = this.transferTo
|
|
308
|
+
this.nameOptionsForChoose = this.nameOptions.filter(function (element) {
|
|
309
|
+
return element.name.indexOf(inputName) !== -1
|
|
310
|
+
})
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
// 在候选框中点击了名称
|
|
314
|
+
chooseName (name) {
|
|
315
|
+
this.nameOptionsVisible = false
|
|
316
|
+
this.transferTo = name
|
|
317
|
+
this.checkEmp()
|
|
318
|
+
},
|
|
319
|
+
// 获取所有员工名,供输入框备选
|
|
320
|
+
getAllEmpNames () {
|
|
321
|
+
return post(EmployeeDetailsViewApi.getAllEmployeeName, null)
|
|
322
|
+
.then(res => {
|
|
323
|
+
this.nameOptions = res
|
|
324
|
+
}, err => {
|
|
325
|
+
console.log(err)
|
|
326
|
+
})
|
|
327
|
+
},
|
|
328
|
+
// 图像修改检测
|
|
329
|
+
handleChange ({ fileList }) {
|
|
330
|
+
this.fileList = fileList.filter((item) => {
|
|
331
|
+
return item.status === 'done' || item.status === 'uploading'
|
|
332
|
+
})
|
|
333
|
+
},
|
|
334
|
+
// 在上传页面,点击图片上的垃圾桶,撤销上传
|
|
335
|
+
remove (file) {
|
|
336
|
+
return post(TicketDetailsViewApi.revocationImage, {
|
|
337
|
+
file: file
|
|
338
|
+
})
|
|
339
|
+
.then(res => {
|
|
340
|
+
if (res === 'success') {
|
|
341
|
+
this.$message.success('删除成功')
|
|
342
|
+
}
|
|
343
|
+
this.fileList = this.fileList.filter((item) => {
|
|
344
|
+
return item.response.name !== file.response.name
|
|
345
|
+
})
|
|
346
|
+
}, err => {
|
|
347
|
+
console.log(err)
|
|
348
|
+
})
|
|
349
|
+
},
|
|
350
|
+
// 上传头像前校验
|
|
351
|
+
beforeUpload (file) {
|
|
352
|
+
const isJpgOrPng =
|
|
353
|
+
file.type === 'image/jpeg' ||
|
|
354
|
+
file.type === 'image/jpg' ||
|
|
355
|
+
file.type === 'image/png'
|
|
356
|
+
const Lt2M = file.size / 1024 / 1024 < 2
|
|
357
|
+
if (!Lt2M) {
|
|
358
|
+
this.$message.error('图片不得大于2MB!')
|
|
359
|
+
}
|
|
360
|
+
if (!isJpgOrPng) {
|
|
361
|
+
this.$message.error('只能上传jpg/png格式的图片')
|
|
362
|
+
}
|
|
363
|
+
return isJpgOrPng && Lt2M
|
|
364
|
+
},
|
|
365
|
+
handleCancel () {
|
|
366
|
+
this.previewVisible = false
|
|
367
|
+
},
|
|
368
|
+
// 处理预览图像
|
|
369
|
+
async handlePreview (file) {
|
|
370
|
+
if (!file.url && !file.preview) {
|
|
371
|
+
file.preview = await getBase64(file.originFileObj)
|
|
372
|
+
}
|
|
373
|
+
this.previewImage = file.url || file.preview
|
|
374
|
+
this.previewVisible = true
|
|
375
|
+
},
|
|
376
|
+
// 开启定时器
|
|
377
|
+
setTimer () {
|
|
378
|
+
if (this.timer === undefined) {
|
|
379
|
+
this.timer = setInterval(() => {
|
|
380
|
+
if (this.btnCountdownText > 0) {
|
|
381
|
+
this.btnCountdownText--
|
|
382
|
+
if (this.btnCountdownText === 0) {
|
|
383
|
+
this.initView()
|
|
384
|
+
this.btnCountdownText = 5
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}, 1000)
|
|
388
|
+
}
|
|
389
|
+
},
|
|
190
390
|
// 初始化组件
|
|
191
391
|
initView () {
|
|
192
|
-
this.
|
|
392
|
+
this.showSpin = true
|
|
393
|
+
this.descriptionLoading = true
|
|
394
|
+
// 获取所有员工名
|
|
395
|
+
this.getAllEmpNames()
|
|
396
|
+
// 获取工单的基本详情
|
|
193
397
|
this.getTicketDetail(this.ticketId)
|
|
194
|
-
|
|
398
|
+
// 获取工单的附加信息
|
|
399
|
+
this.handleOtherData()
|
|
400
|
+
},
|
|
401
|
+
// 图像点击切换放大缩小
|
|
402
|
+
changePhotoClass (id) {
|
|
403
|
+
for (let i = 0; i < this.images.length; i++) {
|
|
404
|
+
if (id === this.images[i].id) {
|
|
405
|
+
this.images[i].isLarge = !this.images[i].isLarge
|
|
406
|
+
this.selectedImage = this.images[i]
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
this.selectedImageShow = !this.selectedImageShow
|
|
410
|
+
},
|
|
411
|
+
// 控制未放大图像变暗
|
|
412
|
+
changePhotoClassForSmall (id) {
|
|
413
|
+
for (let i = 0; i < this.images.length; i++) {
|
|
414
|
+
if (id == this.images[i].id) {
|
|
415
|
+
if (this.images[i].isLarge === true) {
|
|
416
|
+
return 'img_sm_dark'
|
|
417
|
+
} else {
|
|
418
|
+
return 'img_sm'
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
// 获取当前相关联的照片
|
|
424
|
+
getPhoto () {
|
|
425
|
+
return post(TicketDetailsViewApi.getTicketImages, {
|
|
426
|
+
ticketId: this.ticketId
|
|
427
|
+
})
|
|
428
|
+
.then(res => {
|
|
429
|
+
this.images = res
|
|
430
|
+
for (let i = 0; i < this.images.length; i++) {
|
|
431
|
+
this.images[i].isLarge = false
|
|
432
|
+
}
|
|
433
|
+
this.mergeAddImage()
|
|
434
|
+
}, err => {
|
|
435
|
+
console.log(err)
|
|
436
|
+
})
|
|
195
437
|
},
|
|
196
|
-
//
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
438
|
+
// 将同一次上传的图片,与描述放在一起
|
|
439
|
+
mergeAddImage () {
|
|
440
|
+
this.originalImages = []
|
|
441
|
+
for (let i = 0; i < this.addOnDescription.length; i++) {
|
|
442
|
+
this.addOnDescription[i].images = []
|
|
443
|
+
}
|
|
444
|
+
for (let i = 0; i < this.images.length; i++) {
|
|
445
|
+
if (this.images[i].did === 0) {
|
|
446
|
+
this.originalImages.push(this.images[i])
|
|
447
|
+
continue
|
|
448
|
+
}
|
|
449
|
+
for (let j = 0; j < this.addOnDescription.length; j++) {
|
|
450
|
+
if (this.images[i].did === this.addOnDescription[j].id) {
|
|
451
|
+
this.addOnDescription[j].images.push(this.images[i])
|
|
452
|
+
}
|
|
201
453
|
}
|
|
202
454
|
}
|
|
455
|
+
this.initDone()
|
|
456
|
+
},
|
|
457
|
+
initDone () {
|
|
458
|
+
// 初始化信息
|
|
459
|
+
this.showSpin = false
|
|
460
|
+
this.descriptionLoading = false
|
|
461
|
+
if (this.step !== 3) {
|
|
462
|
+
this.setTimer()
|
|
463
|
+
}
|
|
464
|
+
this.addOnDescriptionOriginal = 1
|
|
203
465
|
},
|
|
204
466
|
// 关闭工单确认后业务逻辑
|
|
205
467
|
handleCloseOk () {
|
|
@@ -239,19 +501,15 @@
|
|
|
239
501
|
})
|
|
240
502
|
.then(res => {
|
|
241
503
|
if (res !== 0) {
|
|
242
|
-
this.$message.success(
|
|
243
|
-
'操作成功',
|
|
244
|
-
5
|
|
245
|
-
)
|
|
246
|
-
this.initView()
|
|
504
|
+
this.$message.success('操作成功', 5)
|
|
247
505
|
} else {
|
|
248
|
-
this.$message.error(
|
|
249
|
-
'操作失败',
|
|
250
|
-
5
|
|
251
|
-
)
|
|
506
|
+
this.$message.error('工单已被他人处理或关闭,请刷新再试', 5)
|
|
252
507
|
}
|
|
508
|
+
this.initView()
|
|
253
509
|
}, err => {
|
|
254
510
|
console.error(err)
|
|
511
|
+
this.$message.error('工单已被他人处理,请刷新再试', 5)
|
|
512
|
+
this.initView()
|
|
255
513
|
})
|
|
256
514
|
},
|
|
257
515
|
// 获取当前登陆员工ID
|
|
@@ -267,7 +525,7 @@
|
|
|
267
525
|
empName: this.transferTo
|
|
268
526
|
})
|
|
269
527
|
.then(res => {
|
|
270
|
-
const num = res
|
|
528
|
+
const num = res
|
|
271
529
|
this.transferCheck = num !== 0
|
|
272
530
|
}, err => {
|
|
273
531
|
console.error(err)
|
|
@@ -297,7 +555,8 @@
|
|
|
297
555
|
ticketId: this.ticketId,
|
|
298
556
|
endTime: new Date(),
|
|
299
557
|
transferTo: this.transferTo,
|
|
300
|
-
note: this.note
|
|
558
|
+
note: this.note,
|
|
559
|
+
images: this.fileList
|
|
301
560
|
})
|
|
302
561
|
.then(res => {
|
|
303
562
|
const result = res
|
|
@@ -308,12 +567,12 @@
|
|
|
308
567
|
'操作成功',
|
|
309
568
|
5
|
|
310
569
|
)
|
|
570
|
+
this.fileList = []
|
|
571
|
+
this.transferTo = ''
|
|
572
|
+
this.transferCheck = false
|
|
311
573
|
this.initView()
|
|
312
574
|
} else {
|
|
313
|
-
this.$message.error(
|
|
314
|
-
'操作失败',
|
|
315
|
-
5
|
|
316
|
-
)
|
|
575
|
+
this.$message.error('工单已被他人处理或关闭,请刷新再试', 5)
|
|
317
576
|
}
|
|
318
577
|
this.handleCancel()
|
|
319
578
|
this.initView()
|
|
@@ -325,43 +584,64 @@
|
|
|
325
584
|
},
|
|
326
585
|
// 转移工单取消后逻辑
|
|
327
586
|
handleTransferCancel () {
|
|
328
|
-
this.transferTo = ''
|
|
329
|
-
this.note = ''
|
|
330
587
|
this.transVisible = false
|
|
331
588
|
this.transferCheck = false
|
|
589
|
+
this.transferTo = ''
|
|
590
|
+
this.note = ''
|
|
332
591
|
},
|
|
333
592
|
// 关闭抽屉时回调
|
|
334
593
|
onClose () {
|
|
594
|
+
clearInterval(this.timer)
|
|
595
|
+
this.timer = undefined
|
|
596
|
+
this.addOnDescription = []
|
|
335
597
|
this.disableCloseBtn = false
|
|
336
598
|
this.$emit('update:visible', false)
|
|
599
|
+
this.originalImages = []
|
|
600
|
+
this.images = []
|
|
601
|
+
this.addOnDescriptionOriginal = undefined
|
|
602
|
+
},
|
|
603
|
+
// 对其他信息进行初始化,包括附加描述,图片
|
|
604
|
+
handleOtherData () {
|
|
605
|
+
const beforeLength = this.addOnDescription.length
|
|
606
|
+
return post(TicketDetailsViewApi.getAddonDescription, {
|
|
607
|
+
ticketId: this.ticketId
|
|
608
|
+
})
|
|
609
|
+
.then(res => {
|
|
610
|
+
this.addOnDescription = res
|
|
611
|
+
this.getPhoto()
|
|
612
|
+
if (this.addOnDescription.length > beforeLength && this.addOnDescriptionOriginal !== undefined) {
|
|
613
|
+
this.addOnDescriptionOriginal = 1
|
|
614
|
+
this.$refs.audio.currentTime = 0
|
|
615
|
+
this.$refs.audio.play()
|
|
616
|
+
this.$notification.open({
|
|
617
|
+
message: '最新通知',
|
|
618
|
+
description:
|
|
619
|
+
'客户追加了问题描述,请及时查看!',
|
|
620
|
+
onClick: () => {
|
|
621
|
+
}
|
|
622
|
+
})
|
|
623
|
+
}
|
|
624
|
+
}, err => {
|
|
625
|
+
console.log(err)
|
|
626
|
+
})
|
|
337
627
|
},
|
|
338
628
|
// 获取工单详情信息
|
|
339
629
|
getTicketDetail (num) {
|
|
340
|
-
this.
|
|
630
|
+
this.showSpin = true
|
|
341
631
|
return post(TicketDetailsViewApi.getTicketDetails, {
|
|
342
632
|
ticketId: num
|
|
343
|
-
})
|
|
344
|
-
.then(res => {
|
|
633
|
+
}).then(res => {
|
|
345
634
|
this.details = res[0]
|
|
346
635
|
this.step = res[0].status
|
|
347
636
|
if (this.details.status === 3) {
|
|
348
637
|
this.disableCloseBtn = true
|
|
349
638
|
}
|
|
350
639
|
const categoryValue = this.details.category
|
|
351
|
-
this.details.category = this.
|
|
640
|
+
this.details.category = this.$appdata.getDictionaryList('ticketCategoryMap')[categoryValue].label
|
|
352
641
|
}, err => {
|
|
353
642
|
console.error(err)
|
|
354
643
|
})
|
|
355
644
|
},
|
|
356
|
-
// 获取工单类别字典
|
|
357
|
-
getTicketCategory () {
|
|
358
|
-
return post(TicketDetailsViewApi.getTicketCategoryDictionary)
|
|
359
|
-
.then(res => {
|
|
360
|
-
this.categoryDictionary = res
|
|
361
|
-
}, err => {
|
|
362
|
-
console.log(err)
|
|
363
|
-
})
|
|
364
|
-
},
|
|
365
645
|
// 日期格式化
|
|
366
646
|
format (date, format) {
|
|
367
647
|
return formatDate(date, format)
|
|
@@ -380,7 +660,7 @@
|
|
|
380
660
|
},
|
|
381
661
|
// 控制移交他人按钮可用状态
|
|
382
662
|
transferBtnDisable () {
|
|
383
|
-
return this.step === 0
|
|
663
|
+
return this.step === 0 || this.step === 3
|
|
384
664
|
},
|
|
385
665
|
// 控制关闭工单按钮可用状态
|
|
386
666
|
closeBtnDisable () {
|
|
@@ -405,6 +685,11 @@
|
|
|
405
685
|
} else {
|
|
406
686
|
return 'error'
|
|
407
687
|
}
|
|
688
|
+
},
|
|
689
|
+
// 单击工单流转历史图片
|
|
690
|
+
flowImageClick (image) {
|
|
691
|
+
this.selectedImage = image
|
|
692
|
+
this.selectedImageShow = !this.selectedImageShow
|
|
408
693
|
}
|
|
409
694
|
},
|
|
410
695
|
watch: {
|
|
@@ -412,6 +697,11 @@
|
|
|
412
697
|
if (val) {
|
|
413
698
|
this.initView()
|
|
414
699
|
}
|
|
700
|
+
},
|
|
701
|
+
'step' (newVal) {
|
|
702
|
+
if (newVal === 3) {
|
|
703
|
+
clearInterval(this.timer)
|
|
704
|
+
}
|
|
415
705
|
}
|
|
416
706
|
}
|
|
417
707
|
}
|
|
@@ -483,4 +773,66 @@
|
|
|
483
773
|
text-align: right;
|
|
484
774
|
}
|
|
485
775
|
}
|
|
776
|
+
|
|
777
|
+
.img_sm {
|
|
778
|
+
border: rgba(84, 84, 84, 0.2) solid 1.5px;
|
|
779
|
+
border-radius: 5px;
|
|
780
|
+
padding: 10px;
|
|
781
|
+
width: 160px;
|
|
782
|
+
height: 120px;
|
|
783
|
+
margin-bottom: 20px;
|
|
784
|
+
margin-left: 20px;
|
|
785
|
+
}
|
|
786
|
+
.img_xl {
|
|
787
|
+
position: absolute;
|
|
788
|
+
top:0;bottom:0;left:0;right:0;
|
|
789
|
+
margin: auto;
|
|
790
|
+
width: 60%;
|
|
791
|
+
max-width: 1000px;
|
|
792
|
+
cursor: zoom-out;
|
|
793
|
+
z-index: 9999;
|
|
794
|
+
animation: imgZoomIn 0.4s;
|
|
795
|
+
-webkit-animation: imgZoomIn 0.4s;
|
|
796
|
+
}
|
|
797
|
+
@keyframes imgZoomIn
|
|
798
|
+
{
|
|
799
|
+
from {width: 160px;}
|
|
800
|
+
to {width: 60%;}
|
|
801
|
+
}
|
|
802
|
+
.img_sm:hover {
|
|
803
|
+
opacity: 0.6;
|
|
804
|
+
cursor: zoom-in;
|
|
805
|
+
}
|
|
806
|
+
.img_sm_dark{
|
|
807
|
+
filter: grayscale(100%);
|
|
808
|
+
opacity: 0.6;
|
|
809
|
+
border: rgba(84, 84, 84, 0.2) solid 1.5px;
|
|
810
|
+
border-radius: 5px;
|
|
811
|
+
padding: 10px;
|
|
812
|
+
width: 160px;
|
|
813
|
+
height: 120px;
|
|
814
|
+
margin-bottom: 20px;
|
|
815
|
+
margin-left: 20px;
|
|
816
|
+
}
|
|
817
|
+
.imgBackground {
|
|
818
|
+
position: absolute;
|
|
819
|
+
top:0;bottom:0;left:0;right:0;
|
|
820
|
+
width: 100%;
|
|
821
|
+
height: 100%;
|
|
822
|
+
z-index: 9998;
|
|
823
|
+
background-color: rgba(0,0,0,0.7);
|
|
824
|
+
}
|
|
825
|
+
.nameOptionsItem {
|
|
826
|
+
padding-left: 5px;
|
|
827
|
+
margin-bottom: 2px;
|
|
828
|
+
}
|
|
829
|
+
.nameOptionsItem:hover {
|
|
830
|
+
background-color: rgb(209,233,255);
|
|
831
|
+
}
|
|
832
|
+
.nameOptionsItem:last-of-type {
|
|
833
|
+
margin-bottom: 0px;
|
|
834
|
+
}
|
|
835
|
+
.nameOptions {
|
|
836
|
+
border: rgba(0,0,0,0.4) solid 1px;
|
|
837
|
+
}
|
|
486
838
|
</style>
|