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.
- package/CHANGELOG.md +8 -0
- package/docs/notice.md +22 -22
- package/package.json +90 -90
- package/src/base-client/components/common/FormGroupEdit/FormGroupEdit.vue +149 -149
- package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +315 -315
- package/src/base-client/components/common/XForm/XForm.vue +275 -275
- package/src/base-client/components/iot/CustomerDetailsView/CustomerDetailsView.vue +225 -225
- package/src/base-client/components/iot/DataAnalysisView/DataAnalysisView.vue +244 -244
- package/src/base-client/components/iot/DeviceBrandDetailsView/DeviceBrandDetailsView.vue +452 -452
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsCount.vue +330 -330
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsException.vue +57 -57
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsInstructOperate.vue +121 -121
- package/src/base-client/components/iot/DeviceDetailsView/part/DeviceDetailsRead.vue +131 -131
- package/src/base-client/components/iot/DeviceTypeDetailsView/DeviceTypeDetailsView.vue +276 -276
- package/src/base-client/components/iot/InstructDetailsView/InstructDetailsView.vue +469 -469
- package/src/base-client/components/iot/LogDetailsView/LogDetailsView.vue +379 -379
- package/src/base-client/components/iot/MeterDetailsView/MeterDetailsView.vue +359 -359
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsCount.vue +335 -335
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsException.vue +184 -184
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsHandPlan.vue +291 -291
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsInstruct.vue +236 -236
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsMain.vue +256 -256
- package/src/base-client/components/iot/MeterDetailsView/part/MeterDetailsSellGas.vue +189 -189
- package/src/base-client/components/iot/WebmeterAnalysisView/WebmeterAnalysisView.vue +722 -722
- package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +231 -231
- package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +247 -247
- package/src/base-client/components/ticket/EmployeeDetailsView/EmployeeDetailsView.vue +370 -370
- package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +3 -3
- package/src/base-client/components/ticket/TicketDetailsView/part/TicketDetailsFlow.vue +260 -260
- package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +532 -532
- package/src/base-client/plugins/AppData.js +67 -67
- package/src/base-client/plugins/GetLoginInfoService.js +252 -252
- package/src/components/exception/ExceptionPage.vue +70 -70
- package/src/components/setting/Setting.vue +235 -237
- package/src/config/default/setting.config.js +5 -4
- package/src/config/index.js +3 -6
- package/src/layouts/SinglePageView.vue +13 -17
- package/src/layouts/header/HeaderNotice.vue +97 -97
- package/src/layouts/tabs/TabsView.vue +3 -5
- package/src/pages/login/Login.vue +4 -1
- package/src/pages/report/ReportTableHome.vue +28 -28
- package/src/pages/resourceManage/depListManage.vue +23 -23
- package/src/pages/resourceManage/funListManage.vue +23 -23
- package/src/pages/resourceManage/index.js +15 -15
- package/src/pages/resourceManage/orgListManage.vue +98 -98
- package/src/pages/resourceManage/roleListManage.vue +23 -23
- package/src/pages/resourceManage/staffListManage.vue +23 -23
- package/src/pages/system/ticket/submitTicketSuccess.vue +248 -248
- package/src/router/async/config.async.js +26 -26
- package/src/router/async/router.map.js +58 -59
- package/src/router/index.js +27 -27
- package/src/services/api/common.js +47 -47
- package/src/services/api/index.js +39 -39
- package/src/services/user.js +34 -34
- package/src/utils/indexedDB.js +146 -146
- package/src/utils/routerUtil.js +359 -360
- package/vue.config.js +2 -2
- package/src/config/config.js +0 -15
|
@@ -1,248 +1,248 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<a-card class="result-success" :bordered="false">
|
|
3
|
-
<result :is-success="icon" :description="description" :title="title">
|
|
4
|
-
<template slot="action">
|
|
5
|
-
<span style="margin-right: 10px" v-if="countDown > 0">{{ countDownFormat() }}</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
|
-
</template>
|
|
9
|
-
<a-modal
|
|
10
|
-
title="关闭工单"
|
|
11
|
-
:visible="closeVisible"
|
|
12
|
-
@ok="handleCloseOk"
|
|
13
|
-
@cancel="handleCloseCancel"
|
|
14
|
-
:zIndex="1002"
|
|
15
|
-
>
|
|
16
|
-
<p>是否确认手动关闭工单?</p>
|
|
17
|
-
<p style="color: red">(该操作不可撤销,请谨慎操作!)</p>
|
|
18
|
-
</a-modal>
|
|
19
|
-
<div>
|
|
20
|
-
<div class="project-name">工单处理进度</div>
|
|
21
|
-
<detail-list size="small" style="max-width: 800px; margin-bottom: 8px">
|
|
22
|
-
<detail-list-item term="工单编号">{{ serialNumber }}</detail-list-item>
|
|
23
|
-
<detail-list-item term="负责人">{{ details.name }}</detail-list-item>
|
|
24
|
-
<detail-list-item term="提交时间">2016-12-12</detail-list-item>
|
|
25
|
-
</detail-list>
|
|
26
|
-
<a-steps :current="step" progressDot>
|
|
27
|
-
<a-step title="工单提交">
|
|
28
|
-
<a-step-item-group slot="description">
|
|
29
|
-
<a-step-item :title="details.uploader" />
|
|
30
|
-
<a-step-item :title="details.createdTime"/>
|
|
31
|
-
</a-step-item-group>
|
|
32
|
-
</a-step>
|
|
33
|
-
<a-step title="工单处理中" >
|
|
34
|
-
<a-step-item-group slot="description">
|
|
35
|
-
<a-step-item :title="details.name" v-if="step >= 1" />
|
|
36
|
-
<a-step-item :title="details.confirmTime" v-if="step >= 1"/>
|
|
37
|
-
</a-step-item-group>
|
|
38
|
-
</a-step>
|
|
39
|
-
<a-step title="工单完成" >
|
|
40
|
-
<a-step-item-group slot="description">
|
|
41
|
-
<a-step-item :title="details.finishedTime" v-if="step >= 2"/>
|
|
42
|
-
</a-step-item-group>
|
|
43
|
-
</a-step>
|
|
44
|
-
</a-steps>
|
|
45
|
-
</div>
|
|
46
|
-
</result>
|
|
47
|
-
</a-card>
|
|
48
|
-
</template>
|
|
49
|
-
|
|
50
|
-
<script>
|
|
51
|
-
import Result from '@vue2-client/components/result/Result'
|
|
52
|
-
import DetailList from '@vue2-client/components/tool/DetailList'
|
|
53
|
-
import AStepItem from '@vue2-client/components/tool/AStepItem'
|
|
54
|
-
import { TicketDetailsViewApi, post } from '@vue2-client/services/api'
|
|
55
|
-
import { formatDate } from '@vue2-client/utils/util'
|
|
56
|
-
|
|
57
|
-
const AStepItemGroup = AStepItem.Group
|
|
58
|
-
const DetailListItem = DetailList.Item
|
|
59
|
-
|
|
60
|
-
export default {
|
|
61
|
-
name: 'submitTicketSuccess',
|
|
62
|
-
components: { AStepItemGroup, AStepItem, DetailListItem, DetailList, Result },
|
|
63
|
-
data () {
|
|
64
|
-
return {
|
|
65
|
-
title: '提交成功',
|
|
66
|
-
description: '您创建的工单已成功提交,请保持电话畅通,我们的工作人员将尽快与您取得联系。' +
|
|
67
|
-
'如果需要加急,请在倒计时结束后点击加急按钮,加急后我们将优先处理您的工单',
|
|
68
|
-
// 工单序列号
|
|
69
|
-
serialNumber: '',
|
|
70
|
-
// 工单详情
|
|
71
|
-
details: {
|
|
72
|
-
uploader: '',
|
|
73
|
-
status: '',
|
|
74
|
-
name: '',
|
|
75
|
-
priority: undefined,
|
|
76
|
-
createdTime: '',
|
|
77
|
-
confirmTime: '',
|
|
78
|
-
finishedTime: ''
|
|
79
|
-
},
|
|
80
|
-
// 控制加急按钮
|
|
81
|
-
urgentAccess: true,
|
|
82
|
-
// 倒计时
|
|
83
|
-
countDown: 0,
|
|
84
|
-
// 控制加急按钮显示
|
|
85
|
-
UrgentAvailable: true,
|
|
86
|
-
// 刷新页面的定时器
|
|
87
|
-
timer: undefined,
|
|
88
|
-
// 取消工单确认框可见性
|
|
89
|
-
closeVisible: false,
|
|
90
|
-
// 控制页面大图标
|
|
91
|
-
icon: true
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
mounted () {
|
|
95
|
-
this.serialNumber = this.$route.query.serialNumber
|
|
96
|
-
this.getTicketDetail()
|
|
97
|
-
this.refresh()
|
|
98
|
-
this.countDown = 0
|
|
99
|
-
},
|
|
100
|
-
beforeDestroy () {
|
|
101
|
-
clearInterval(this.timer)
|
|
102
|
-
},
|
|
103
|
-
methods: {
|
|
104
|
-
format (date, format) {
|
|
105
|
-
return formatDate(date, format)
|
|
106
|
-
},
|
|
107
|
-
// 关闭工单确认后操作
|
|
108
|
-
handleCloseOk () {
|
|
109
|
-
return post(TicketDetailsViewApi.manualCloseTicketByCustomer, {
|
|
110
|
-
serialNumber: this.serialNumber,
|
|
111
|
-
time: new Date()
|
|
112
|
-
})
|
|
113
|
-
.then(res => {
|
|
114
|
-
this.closeVisible = false
|
|
115
|
-
this.title = '工单已关闭'
|
|
116
|
-
this.description = ''
|
|
117
|
-
this.icon = false
|
|
118
|
-
clearInterval(this.timer)
|
|
119
|
-
}, err => {
|
|
120
|
-
console.error(err)
|
|
121
|
-
})
|
|
122
|
-
},
|
|
123
|
-
// 关闭工单取消后业务逻辑
|
|
124
|
-
handleCloseCancel () {
|
|
125
|
-
this.closeVisible = false
|
|
126
|
-
},
|
|
127
|
-
// 关闭工单按钮
|
|
128
|
-
closeBtn () {
|
|
129
|
-
this.closeVisible = true
|
|
130
|
-
},
|
|
131
|
-
// 过10s刷新一下页面数据
|
|
132
|
-
refresh () {
|
|
133
|
-
this.timer = setInterval(() => {
|
|
134
|
-
this.getTicketDetail()
|
|
135
|
-
}, 10 * 1000)
|
|
136
|
-
},
|
|
137
|
-
// 对工单进行加急处理
|
|
138
|
-
urgent () {
|
|
139
|
-
return post(TicketDetailsViewApi.rushTicket, {
|
|
140
|
-
serialNumber: this.serialNumber
|
|
141
|
-
})
|
|
142
|
-
.then(res => {
|
|
143
|
-
if (res === 1) {
|
|
144
|
-
this.$message.success(
|
|
145
|
-
'操作成功',
|
|
146
|
-
5
|
|
147
|
-
)
|
|
148
|
-
this.description = '您的工单已经被加急处理,我们的工作人员会优先处理您的请求。'
|
|
149
|
-
this.UrgentAvailable = false
|
|
150
|
-
} else {
|
|
151
|
-
this.$message.error(
|
|
152
|
-
'操作失败',
|
|
153
|
-
5
|
|
154
|
-
)
|
|
155
|
-
}
|
|
156
|
-
}, err => {
|
|
157
|
-
console.log(err)
|
|
158
|
-
})
|
|
159
|
-
},
|
|
160
|
-
// 格式化倒计时
|
|
161
|
-
countDownFormat () {
|
|
162
|
-
const hours = '00'
|
|
163
|
-
let mins = Math.floor(this.countDown / 60)
|
|
164
|
-
let secs = this.countDown % 60
|
|
165
|
-
if (mins < 10) {
|
|
166
|
-
mins = '0' + mins
|
|
167
|
-
}
|
|
168
|
-
if (secs < 10) {
|
|
169
|
-
secs = '0' + secs
|
|
170
|
-
}
|
|
171
|
-
return hours + ':' + mins + ':' + secs
|
|
172
|
-
},
|
|
173
|
-
// 设置用于控制加急按钮倒计时定时器,加急按钮5分钟后才可点击
|
|
174
|
-
setTimer () {
|
|
175
|
-
this.countDown = 5
|
|
176
|
-
const time = setInterval(() => {
|
|
177
|
-
this.countDown--
|
|
178
|
-
if (this.countDown <= 0) {
|
|
179
|
-
this.urgentAccess = false
|
|
180
|
-
clearInterval(time)
|
|
181
|
-
this.countDown = -1
|
|
182
|
-
}
|
|
183
|
-
}, 1000)
|
|
184
|
-
},
|
|
185
|
-
// 获取工单详情
|
|
186
|
-
getTicketDetail () {
|
|
187
|
-
return post(TicketDetailsViewApi.getTicketDetailsForUploader, {
|
|
188
|
-
serialNumber: this.serialNumber
|
|
189
|
-
})
|
|
190
|
-
.then(res => {
|
|
191
|
-
this.details.uploader = res.uploader
|
|
192
|
-
// 判断负责人有没有值
|
|
193
|
-
if (res.name === undefined) {
|
|
194
|
-
this.details.name = ''
|
|
195
|
-
} else {
|
|
196
|
-
this.details.name = res.name
|
|
197
|
-
}
|
|
198
|
-
// 判断工单被确认时间
|
|
199
|
-
if (res.confirmtime === undefined) {
|
|
200
|
-
this.details.confirmTime = ''
|
|
201
|
-
} else {
|
|
202
|
-
this.details.confirmTime = this.format(res.confirmtime, 'yyyy-MM-dd hh:mm:ss')
|
|
203
|
-
}
|
|
204
|
-
// 判断工单完成时间
|
|
205
|
-
if (res.finishedtime === undefined) {
|
|
206
|
-
this.details.finishedTime = ''
|
|
207
|
-
} else {
|
|
208
|
-
this.details.finishedTime = this.format(res.finishedtime, 'yyyy-MM-dd hh:mm:ss')
|
|
209
|
-
}
|
|
210
|
-
this.details.createdTime = this.format(res.createdtime, 'yyyy-MM-dd hh:mm:ss')
|
|
211
|
-
this.details.status = res.status
|
|
212
|
-
this.details.priority = res.priority
|
|
213
|
-
|
|
214
|
-
// 如果当前状态为一般,设置定时器,五分钟后允许加急
|
|
215
|
-
if (this.details.priority > 1 && this.countDown === 0) {
|
|
216
|
-
this.setTimer()
|
|
217
|
-
}
|
|
218
|
-
}, err => {
|
|
219
|
-
console.log(err)
|
|
220
|
-
})
|
|
221
|
-
}
|
|
222
|
-
},
|
|
223
|
-
computed: {
|
|
224
|
-
// 用于进度条,进度显示控制
|
|
225
|
-
step () {
|
|
226
|
-
if (this.details.status !== 0 && this.details.status !== 1) {
|
|
227
|
-
return 2
|
|
228
|
-
} else {
|
|
229
|
-
return this.details.status
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
</script>
|
|
235
|
-
|
|
236
|
-
<style scoped lang="less">
|
|
237
|
-
.result-success{
|
|
238
|
-
.action:not(:first-child){
|
|
239
|
-
margin-left: 8px;
|
|
240
|
-
}
|
|
241
|
-
.project-name{
|
|
242
|
-
font-size: 16px;
|
|
243
|
-
color: @title-color;
|
|
244
|
-
font-weight: 500;
|
|
245
|
-
margin-bottom: 20px;
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<a-card class="result-success" :bordered="false">
|
|
3
|
+
<result :is-success="icon" :description="description" :title="title">
|
|
4
|
+
<template slot="action">
|
|
5
|
+
<span style="margin-right: 10px" v-if="countDown > 0">{{ countDownFormat() }}</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
|
+
</template>
|
|
9
|
+
<a-modal
|
|
10
|
+
title="关闭工单"
|
|
11
|
+
:visible="closeVisible"
|
|
12
|
+
@ok="handleCloseOk"
|
|
13
|
+
@cancel="handleCloseCancel"
|
|
14
|
+
:zIndex="1002"
|
|
15
|
+
>
|
|
16
|
+
<p>是否确认手动关闭工单?</p>
|
|
17
|
+
<p style="color: red">(该操作不可撤销,请谨慎操作!)</p>
|
|
18
|
+
</a-modal>
|
|
19
|
+
<div>
|
|
20
|
+
<div class="project-name">工单处理进度</div>
|
|
21
|
+
<detail-list size="small" style="max-width: 800px; margin-bottom: 8px">
|
|
22
|
+
<detail-list-item term="工单编号">{{ serialNumber }}</detail-list-item>
|
|
23
|
+
<detail-list-item term="负责人">{{ details.name }}</detail-list-item>
|
|
24
|
+
<detail-list-item term="提交时间">2016-12-12</detail-list-item>
|
|
25
|
+
</detail-list>
|
|
26
|
+
<a-steps :current="step" progressDot>
|
|
27
|
+
<a-step title="工单提交">
|
|
28
|
+
<a-step-item-group slot="description">
|
|
29
|
+
<a-step-item :title="details.uploader" />
|
|
30
|
+
<a-step-item :title="details.createdTime"/>
|
|
31
|
+
</a-step-item-group>
|
|
32
|
+
</a-step>
|
|
33
|
+
<a-step title="工单处理中" >
|
|
34
|
+
<a-step-item-group slot="description">
|
|
35
|
+
<a-step-item :title="details.name" v-if="step >= 1" />
|
|
36
|
+
<a-step-item :title="details.confirmTime" v-if="step >= 1"/>
|
|
37
|
+
</a-step-item-group>
|
|
38
|
+
</a-step>
|
|
39
|
+
<a-step title="工单完成" >
|
|
40
|
+
<a-step-item-group slot="description">
|
|
41
|
+
<a-step-item :title="details.finishedTime" v-if="step >= 2"/>
|
|
42
|
+
</a-step-item-group>
|
|
43
|
+
</a-step>
|
|
44
|
+
</a-steps>
|
|
45
|
+
</div>
|
|
46
|
+
</result>
|
|
47
|
+
</a-card>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<script>
|
|
51
|
+
import Result from '@vue2-client/components/result/Result'
|
|
52
|
+
import DetailList from '@vue2-client/components/tool/DetailList'
|
|
53
|
+
import AStepItem from '@vue2-client/components/tool/AStepItem'
|
|
54
|
+
import { TicketDetailsViewApi, post } from '@vue2-client/services/api'
|
|
55
|
+
import { formatDate } from '@vue2-client/utils/util'
|
|
56
|
+
|
|
57
|
+
const AStepItemGroup = AStepItem.Group
|
|
58
|
+
const DetailListItem = DetailList.Item
|
|
59
|
+
|
|
60
|
+
export default {
|
|
61
|
+
name: 'submitTicketSuccess',
|
|
62
|
+
components: { AStepItemGroup, AStepItem, DetailListItem, DetailList, Result },
|
|
63
|
+
data () {
|
|
64
|
+
return {
|
|
65
|
+
title: '提交成功',
|
|
66
|
+
description: '您创建的工单已成功提交,请保持电话畅通,我们的工作人员将尽快与您取得联系。' +
|
|
67
|
+
'如果需要加急,请在倒计时结束后点击加急按钮,加急后我们将优先处理您的工单',
|
|
68
|
+
// 工单序列号
|
|
69
|
+
serialNumber: '',
|
|
70
|
+
// 工单详情
|
|
71
|
+
details: {
|
|
72
|
+
uploader: '',
|
|
73
|
+
status: '',
|
|
74
|
+
name: '',
|
|
75
|
+
priority: undefined,
|
|
76
|
+
createdTime: '',
|
|
77
|
+
confirmTime: '',
|
|
78
|
+
finishedTime: ''
|
|
79
|
+
},
|
|
80
|
+
// 控制加急按钮
|
|
81
|
+
urgentAccess: true,
|
|
82
|
+
// 倒计时
|
|
83
|
+
countDown: 0,
|
|
84
|
+
// 控制加急按钮显示
|
|
85
|
+
UrgentAvailable: true,
|
|
86
|
+
// 刷新页面的定时器
|
|
87
|
+
timer: undefined,
|
|
88
|
+
// 取消工单确认框可见性
|
|
89
|
+
closeVisible: false,
|
|
90
|
+
// 控制页面大图标
|
|
91
|
+
icon: true
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
mounted () {
|
|
95
|
+
this.serialNumber = this.$route.query.serialNumber
|
|
96
|
+
this.getTicketDetail()
|
|
97
|
+
this.refresh()
|
|
98
|
+
this.countDown = 0
|
|
99
|
+
},
|
|
100
|
+
beforeDestroy () {
|
|
101
|
+
clearInterval(this.timer)
|
|
102
|
+
},
|
|
103
|
+
methods: {
|
|
104
|
+
format (date, format) {
|
|
105
|
+
return formatDate(date, format)
|
|
106
|
+
},
|
|
107
|
+
// 关闭工单确认后操作
|
|
108
|
+
handleCloseOk () {
|
|
109
|
+
return post(TicketDetailsViewApi.manualCloseTicketByCustomer, {
|
|
110
|
+
serialNumber: this.serialNumber,
|
|
111
|
+
time: new Date()
|
|
112
|
+
})
|
|
113
|
+
.then(res => {
|
|
114
|
+
this.closeVisible = false
|
|
115
|
+
this.title = '工单已关闭'
|
|
116
|
+
this.description = ''
|
|
117
|
+
this.icon = false
|
|
118
|
+
clearInterval(this.timer)
|
|
119
|
+
}, err => {
|
|
120
|
+
console.error(err)
|
|
121
|
+
})
|
|
122
|
+
},
|
|
123
|
+
// 关闭工单取消后业务逻辑
|
|
124
|
+
handleCloseCancel () {
|
|
125
|
+
this.closeVisible = false
|
|
126
|
+
},
|
|
127
|
+
// 关闭工单按钮
|
|
128
|
+
closeBtn () {
|
|
129
|
+
this.closeVisible = true
|
|
130
|
+
},
|
|
131
|
+
// 过10s刷新一下页面数据
|
|
132
|
+
refresh () {
|
|
133
|
+
this.timer = setInterval(() => {
|
|
134
|
+
this.getTicketDetail()
|
|
135
|
+
}, 10 * 1000)
|
|
136
|
+
},
|
|
137
|
+
// 对工单进行加急处理
|
|
138
|
+
urgent () {
|
|
139
|
+
return post(TicketDetailsViewApi.rushTicket, {
|
|
140
|
+
serialNumber: this.serialNumber
|
|
141
|
+
})
|
|
142
|
+
.then(res => {
|
|
143
|
+
if (res === 1) {
|
|
144
|
+
this.$message.success(
|
|
145
|
+
'操作成功',
|
|
146
|
+
5
|
|
147
|
+
)
|
|
148
|
+
this.description = '您的工单已经被加急处理,我们的工作人员会优先处理您的请求。'
|
|
149
|
+
this.UrgentAvailable = false
|
|
150
|
+
} else {
|
|
151
|
+
this.$message.error(
|
|
152
|
+
'操作失败',
|
|
153
|
+
5
|
|
154
|
+
)
|
|
155
|
+
}
|
|
156
|
+
}, err => {
|
|
157
|
+
console.log(err)
|
|
158
|
+
})
|
|
159
|
+
},
|
|
160
|
+
// 格式化倒计时
|
|
161
|
+
countDownFormat () {
|
|
162
|
+
const hours = '00'
|
|
163
|
+
let mins = Math.floor(this.countDown / 60)
|
|
164
|
+
let secs = this.countDown % 60
|
|
165
|
+
if (mins < 10) {
|
|
166
|
+
mins = '0' + mins
|
|
167
|
+
}
|
|
168
|
+
if (secs < 10) {
|
|
169
|
+
secs = '0' + secs
|
|
170
|
+
}
|
|
171
|
+
return hours + ':' + mins + ':' + secs
|
|
172
|
+
},
|
|
173
|
+
// 设置用于控制加急按钮倒计时定时器,加急按钮5分钟后才可点击
|
|
174
|
+
setTimer () {
|
|
175
|
+
this.countDown = 5
|
|
176
|
+
const time = setInterval(() => {
|
|
177
|
+
this.countDown--
|
|
178
|
+
if (this.countDown <= 0) {
|
|
179
|
+
this.urgentAccess = false
|
|
180
|
+
clearInterval(time)
|
|
181
|
+
this.countDown = -1
|
|
182
|
+
}
|
|
183
|
+
}, 1000)
|
|
184
|
+
},
|
|
185
|
+
// 获取工单详情
|
|
186
|
+
getTicketDetail () {
|
|
187
|
+
return post(TicketDetailsViewApi.getTicketDetailsForUploader, {
|
|
188
|
+
serialNumber: this.serialNumber
|
|
189
|
+
})
|
|
190
|
+
.then(res => {
|
|
191
|
+
this.details.uploader = res.uploader
|
|
192
|
+
// 判断负责人有没有值
|
|
193
|
+
if (res.name === undefined) {
|
|
194
|
+
this.details.name = ''
|
|
195
|
+
} else {
|
|
196
|
+
this.details.name = res.name
|
|
197
|
+
}
|
|
198
|
+
// 判断工单被确认时间
|
|
199
|
+
if (res.confirmtime === undefined) {
|
|
200
|
+
this.details.confirmTime = ''
|
|
201
|
+
} else {
|
|
202
|
+
this.details.confirmTime = this.format(res.confirmtime, 'yyyy-MM-dd hh:mm:ss')
|
|
203
|
+
}
|
|
204
|
+
// 判断工单完成时间
|
|
205
|
+
if (res.finishedtime === undefined) {
|
|
206
|
+
this.details.finishedTime = ''
|
|
207
|
+
} else {
|
|
208
|
+
this.details.finishedTime = this.format(res.finishedtime, 'yyyy-MM-dd hh:mm:ss')
|
|
209
|
+
}
|
|
210
|
+
this.details.createdTime = this.format(res.createdtime, 'yyyy-MM-dd hh:mm:ss')
|
|
211
|
+
this.details.status = res.status
|
|
212
|
+
this.details.priority = res.priority
|
|
213
|
+
|
|
214
|
+
// 如果当前状态为一般,设置定时器,五分钟后允许加急
|
|
215
|
+
if (this.details.priority > 1 && this.countDown === 0) {
|
|
216
|
+
this.setTimer()
|
|
217
|
+
}
|
|
218
|
+
}, err => {
|
|
219
|
+
console.log(err)
|
|
220
|
+
})
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
computed: {
|
|
224
|
+
// 用于进度条,进度显示控制
|
|
225
|
+
step () {
|
|
226
|
+
if (this.details.status !== 0 && this.details.status !== 1) {
|
|
227
|
+
return 2
|
|
228
|
+
} else {
|
|
229
|
+
return this.details.status
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
</script>
|
|
235
|
+
|
|
236
|
+
<style scoped lang="less">
|
|
237
|
+
.result-success{
|
|
238
|
+
.action:not(:first-child){
|
|
239
|
+
margin-left: 8px;
|
|
240
|
+
}
|
|
241
|
+
.project-name{
|
|
242
|
+
font-size: 16px;
|
|
243
|
+
color: @title-color;
|
|
244
|
+
font-weight: 500;
|
|
245
|
+
margin-bottom: 20px;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
</style>
|
|
@@ -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
|