vue2-client 1.3.19 → 1.3.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/CHANGELOG.md +323 -315
  2. package/index.js +30 -30
  3. package/package.json +76 -76
  4. package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +225 -225
  5. package/src/base-client/components/common/CreateQuery/CreateQuery.vue +551 -551
  6. package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +777 -777
  7. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +553 -553
  8. package/src/base-client/components/common/CustomColumnsDrawer/index.md +46 -46
  9. package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +165 -165
  10. package/src/base-client/components/common/JSONToTree/jsontotree.vue +275 -275
  11. package/src/base-client/components/common/Upload/Upload.vue +162 -165
  12. package/src/base-client/components/common/XAddForm/XAddForm.vue +354 -354
  13. package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +327 -327
  14. package/src/base-client/components/common/XCard/XCard.vue +64 -64
  15. package/src/base-client/components/common/XForm/XForm.vue +274 -274
  16. package/src/base-client/components/common/XForm/XFormItem.vue +389 -389
  17. package/src/base-client/components/common/XFormTable/index.md +96 -96
  18. package/src/base-client/components/common/XTable/XTable.vue +278 -278
  19. package/src/base-client/components/system/LogDetailsView/LogDetailsView.vue +376 -376
  20. package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +281 -281
  21. package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +807 -807
  22. package/src/base-client/components/ticket/TicketDetailsView/index.md +29 -29
  23. package/src/base-client/components/ticket/TicketDetailsView/part/TicketDetailsFlow.vue +260 -260
  24. package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +532 -532
  25. package/src/base-client/components/ticket/TicketSubmitSuccessView/index.md +29 -29
  26. package/src/base-client/plugins/AppData.js +69 -69
  27. package/src/base-client/plugins/GetLoginInfoService.js +179 -179
  28. package/src/base-client/plugins/PagedList.js +177 -177
  29. package/src/base-client/plugins/compatible/LoginServiceOA.js +20 -20
  30. package/src/base-client/plugins/i18n-extend.js +32 -32
  31. package/src/components/Ellipsis/index.md +38 -38
  32. package/src/components/NumberInfo/index.md +43 -43
  33. package/src/components/STable/README.md +341 -341
  34. package/src/components/STable/index.js +318 -318
  35. package/src/components/Trend/index.md +45 -45
  36. package/src/components/checkbox/ColorCheckbox.vue +157 -157
  37. package/src/components/checkbox/ImgCheckbox.vue +163 -163
  38. package/src/components/exception/ExceptionPage.vue +70 -70
  39. package/src/components/form/FormRow.vue +52 -52
  40. package/src/components/index.js +36 -36
  41. package/src/components/menu/SideMenu.vue +62 -62
  42. package/src/components/menu/menu.js +273 -273
  43. package/src/components/setting/Setting.vue +235 -235
  44. package/src/components/table/StandardTable.vue +141 -141
  45. package/src/components/table/advance/ActionColumns.vue +158 -158
  46. package/src/components/table/advance/SearchArea.vue +355 -355
  47. package/src/components/tool/AStepItem.vue +60 -60
  48. package/src/components/tool/AvatarList.vue +68 -68
  49. package/src/components/tool/Drawer.vue +142 -142
  50. package/src/components/tool/TagSelect.vue +83 -83
  51. package/src/components/transition/PageToggleTransition.vue +97 -97
  52. package/src/config/default/setting.config.js +41 -41
  53. package/src/config/replacer/resolve.config.js +67 -67
  54. package/src/layouts/AdminLayout.vue +174 -174
  55. package/src/layouts/header/AdminHeader.vue +104 -104
  56. package/src/layouts/header/HeaderNotice.vue +167 -167
  57. package/src/layouts/header/HeaderSearch.vue +67 -67
  58. package/src/layouts/header/InstitutionDetail.vue +181 -181
  59. package/src/layouts/tabs/TabsHead.vue +190 -190
  60. package/src/layouts/tabs/TabsView.vue +379 -379
  61. package/src/mock/goods/index.js +108 -108
  62. package/src/pages/CreateQueryPage.vue +65 -65
  63. package/src/pages/login/Login.vue +277 -277
  64. package/src/pages/report/ReportTable.js +124 -124
  65. package/src/pages/report/ReportTableHome.vue +28 -28
  66. package/src/pages/resourceManage/orgListManage.vue +98 -98
  67. package/src/pages/system/dictionary/index.vue +43 -43
  68. package/src/pages/system/file/index.vue +317 -317
  69. package/src/pages/system/queryParams/index.vue +43 -43
  70. package/src/pages/system/ticket/index.vue +504 -461
  71. package/src/pages/system/ticket/submitTicketSuccess.vue +208 -206
  72. package/src/router/async/config.async.js +27 -27
  73. package/src/router/async/router.map.js +56 -56
  74. package/src/router/index.js +27 -27
  75. package/src/services/api/DictionaryDetailsViewApi.js +6 -6
  76. package/src/services/api/LogDetailsViewApi.js +10 -10
  77. package/src/services/api/QueryParamsDetailsViewApi.js +6 -6
  78. package/src/services/api/TicketDetailsViewApi.js +34 -34
  79. package/src/services/api/common.js +58 -58
  80. package/src/services/api/commonTempTable.js +10 -10
  81. package/src/services/api/index.js +17 -17
  82. package/src/services/api/manage.js +8 -8
  83. package/src/store/mutation-types.js +2 -2
  84. package/src/theme/default/nprogress.less +76 -76
  85. package/src/theme/default/style.less +47 -47
  86. package/src/utils/colors.js +103 -103
  87. package/src/utils/excel/Blob.js +180 -180
  88. package/src/utils/excel/Export2Excel.js +141 -141
  89. package/src/utils/formatter.js +68 -68
  90. package/src/utils/i18n.js +80 -80
  91. package/src/utils/request.js +225 -225
  92. package/src/utils/routerUtil.js +364 -364
  93. package/src/utils/theme-color-replacer-extend.js +91 -91
  94. package/src/utils/themeUtil.js +100 -100
  95. package/src/utils/util.js +230 -230
  96. package/vue.config.js +99 -99
@@ -1,461 +1,504 @@
1
- <template>
2
- <div>
3
- <!-- 显示成功页抽屉 -->
4
- <a-modal
5
- v-model="successVisible"
6
- :footer="null"
7
- destroy-on-close
8
- title="工单状态"
9
- width="70%"
10
- @cancel="onSuccessCancel">
11
- <submit-ticket-success v-if="serialNumber" :serialNumber="serialNumber" />
12
- </a-modal>
13
- <!-- 两个使用手册弹框 -->
14
- <a-modal
15
- :visible="sunClientManualVisible"
16
- title="向日葵使用指南"
17
- width="1000px"
18
- @cancel="sunClientManualVisible = false"
19
- @ok="sunClientManualVisible = false"
20
- >
21
- <h1>一、安装</h1>
22
- <hr/>
23
- <div style="padding-left: 100px;padding-top: 20px">
24
- <img alt="pic" src="@vue2-client/assets/img/SunClientManual/1.png" style="width: 800px">
25
- <br/>
26
- <br/>
27
- <p style="line-height: 30px;font-size: 1.5em;text-indent: 2em">运行下载好的安装包,按需要手动选择安装路径后,一路点下一步完成安装</p>
28
- <br/>
29
- <br/>
30
- </div>
31
- <h1>二、运行</h1>
32
- <hr/>
33
- <div style="padding-left: 100px;padding-top: 20px">
34
- <p style="line-height: 30px;font-size: 1.5em;text-indent: 2em">在桌面或开始菜单中打开向日葵软件</p>
35
- <img alt="pic" src="@vue2-client/assets/img/SunClientManual/2.png" style="width: 800px">
36
- <br/>
37
- <br/>
38
- <p style="line-height: 30px;font-size: 1.5em;text-indent: 2em">显示此页面时,您已成功运行向日葵</p>
39
- <br/>
40
- <br/>
41
- </div>
42
- <h1>三、截图</h1>
43
- <hr/>
44
- <div style="padding-left: 100px;padding-top: 20px">
45
- <p style="line-height: 30px;font-size: 1.5em;text-indent: 2em">点击软件界面中眼睛样子的按钮,使验证码正常显示</p>
46
- <br/>
47
- <br/>
48
- <img alt="pic" src="@vue2-client/assets/img/SunClientManual/3.png" style="width: 800px">
49
- <br/>
50
- <br/>
51
- <br/>
52
- <p style="line-height: 30px;font-size: 1.5em;text-indent: 2em">
53
- 使用qq,微信,或者任何截图软件。截取屏幕中 “本机识别码” 和 “本机验证码”。
54
- 确保该值清晰可辨别
55
- </p>
56
- <br/>
57
- <br/>
58
- <img alt="pic" src="@vue2-client/assets/img/SunClientManual/4.png" style="width: 800px">
59
- <br/>
60
- <br/>
61
- <p style="line-height: 30px;font-size: 1.5em;text-indent: 2em">
62
- 将您截好的图片,通过表单提交页面,下方 “+” (加号)的按钮,提交给我们。
63
- 这样我们的工作人员就可以远程协助您,排查、解决问题
64
- </p>
65
- <br/>
66
- <br/>
67
- </div>
68
- </a-modal>
69
- <a-modal
70
- :visible="toDeskManualVisible"
71
- title="ToDesk使用指南"
72
- width="1000px"
73
- @cancel="toDeskManualVisible = false"
74
- @ok="toDeskManualVisible = false"
75
- >
76
- <h1>一、安装</h1>
77
- <hr/>
78
- <div style="padding-left: 100px;padding-top: 20px">
79
- <img alt="pic" src="@vue2-client/assets/img/ToDeskManual/1.png" style="width: 800px">
80
- <br/>
81
- <br/>
82
- <p style="line-height: 30px;font-size: 1.5em;text-indent: 2em">运行下载好的安装包,按需要手动选择安装路径后,一路点下一步完成安装</p>
83
- <br/>
84
- <br/>
85
- </div>
86
- <h1>二、运行</h1>
87
- <hr/>
88
- <div style="padding-left: 100px;padding-top: 20px">
89
- <p style="line-height: 30px;font-size: 1.5em;text-indent: 2em">在桌面或开始菜单中打开ToDesk软件</p>
90
- <img alt="pic" src="@vue2-client/assets/img/ToDeskManual/2.png" style="width: 800px">
91
- <br/>
92
- <br/>
93
- <p style="line-height: 30px;font-size: 1.5em;text-indent: 2em">显示此页面时,您已成功运行ToDesk</p>
94
- <br/>
95
- <br/>
96
- </div>
97
- <h1>三、截图</h1>
98
- <hr/>
99
- <div style="padding-left: 100px;padding-top: 20px">
100
- <p style="line-height: 30px;font-size: 1.5em;text-indent: 2em">点击软件界面中眼睛样子的按钮,使临时密码正常显示</p>
101
- <br/>
102
- <br/>
103
- <img alt="pic" src="@vue2-client/assets/img/ToDeskManual/3.png" style="width: 800px">
104
- <br/>
105
- <br/>
106
- <br/>
107
- <p style="line-height: 30px;font-size: 1.5em;text-indent: 2em">
108
- 使用qq,微信,或者任何截图软件。截取屏幕中 “设备代码” 和 “临时密码”。
109
- 确保该值清晰可辨别
110
- </p>
111
- <br/>
112
- <br/>
113
- <img alt="pic" src="@vue2-client/assets/img/ToDeskManual/4.png" style="width: 800px">
114
- <br/>
115
- <br/>
116
- <p style="line-height: 30px;font-size: 1.5em;text-indent: 2em">
117
- 将您截好的图片,通过表单提交页面,下方 “+” (加号)的按钮,提交给我们。
118
- 这样我们的工作人员就可以远程协助您,排查、解决问题
119
- </p>
120
- <br/>
121
- <br/>
122
- </div>
123
- </a-modal>
124
- <a-modal
125
- :visible="infoFormVisible"
126
- title="填写联系方式"
127
- @cancel="infoFormVisible = false"
128
- @ok="onInfoFormSubmit">
129
- <a-form-model
130
- ref="infoFormRef"
131
- :label-col="{ span: 5 }"
132
- :model="infoForm"
133
- :wrapper-col="{ span: 18 }">
134
- <a-form-model-item :rules="{ required: true, message: '请输入联系方式' }" label="联系方式" prop="phone">
135
- <a-input v-model="infoForm.phone" placeholder="请输入联系方式查询历史工单" />
136
- </a-form-model-item>
137
- </a-form-model>
138
- </a-modal>
139
- <a-card>
140
- <div style="text-align: right">
141
- <p>欢迎您!{{ currUser.ename }}</p>
142
- </div>
143
- <div class="submitTicketTitle">
144
- <span>奥枫问题反馈平台</span>
145
- </div>
146
- <a-tabs :activeKey="tabActiveKey" @change="changeTab">
147
- <a-tab-pane key="workSubmit" tab="工单提交">
148
- <!-- 表格主体 -->
149
- <a-row v-if="tabActiveKey === 'workSubmit'">
150
- <a-col :span="18">
151
- <a-form :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }">
152
- <!-- 客户名称输入 -->
153
- <a-form-item v-if="!currUser.ename" label="客户名称">
154
- <a-input v-model="customerName" placeholder="请输入客户名称"/>
155
- <strong v-show="showCustomerNameAlert" style="color: red">客户名称不能为空!</strong>
156
- </a-form-item>
157
- <!-- 问题类型单选框 -->
158
- <a-form-item label="问题类型">
159
- <a-radio-group v-for="(item,index) in ticketCategoryMap" :key="index" v-model="form.category">
160
- <a-radio :value="item.value" class="radio-item">
161
- {{ item.label }}
162
- </a-radio>
163
- </a-radio-group>
164
- <a-spin :spinning="ticketCategoryMapLoading" />
165
- <br/>
166
- <strong v-show="showCategoryAlert" style="color: red">类型不允许为空!</strong>
167
- </a-form-item>
168
- <!-- 联系方式 -->
169
- <a-form-item label="联系方式">
170
- <a-input v-model="form.phone"></a-input>
171
- <strong v-show="showPhoneAlert" style="color: red">联系方式填写有误!</strong>
172
- </a-form-item>
173
- <!-- 问题描述框 -->
174
- <a-form-item label="问题详情描述">
175
- <a-textarea v-model="form.desc" allow-clear placeholder="请用一句话描述您的问题,必要时请注明客户编号,表号,系统功能项等信息"/>
176
- </a-form-item>
177
- <!-- 图片上传 -->
178
- <a-form-item :wrapper-col="{ span: 12 }" label="问题截图">
179
- <div class="clearfix">
180
- <upload v-if="uploadVisible" :model="uploadModel" @setFiles="setFiles" />
181
- <a-modal
182
- :footer="null"
183
- :visible="previewVisible"
184
- @cancel="handleCancel"
185
- >
186
- <img :src="previewImage" alt="图片上传" style="width: 100%"/>
187
- </a-modal>
188
- </div>
189
- </a-form-item>
190
- <!-- 表单底部按钮 -->
191
- <a-form-item :wrapper-col="{ span: 12, offset: 5 }">
192
- <a-button :disabled="showCategoryAlert || showPhoneAlert || !validCustomerName" style="margin-right: 20px" type="primary" @click="onSubmit">
193
- 提交
194
- </a-button>
195
- </a-form-item>
196
- </a-form>
197
- </a-col>
198
- <a-col :span="6">
199
- <a-card title="远程方式快捷下载">
200
- <a-space direction="vertical">
201
- <a-row :gutter="16">
202
- <a-col
203
- :lg="24"
204
- :md="24"
205
- :sm="24"
206
- :xl="12"
207
- :xs="24"
208
- :xxl="12"
209
- style="text-align: center">
210
- <img alt="pic" src="@vue2-client/assets/img/SunClientDownload.png" style="width: 128px;height:128px;cursor: pointer" @click="toSunClientClick"/>
211
- <p style="padding-top:10px;text-align: center"><a @click="sunClientManualVisible = true">向日葵使用说明</a></p>
212
- </a-col>
213
- <a-col
214
- :lg="24"
215
- :md="24"
216
- :sm="24"
217
- :xl="12"
218
- :xs="24"
219
- :xxl="12"
220
- style="text-align: center">
221
- <img alt="pic" src="@vue2-client/assets/img/ToDeskDownload.png" style="width: 128px;height:128px;cursor: pointer" @click="toDeskClick">
222
- <p style="padding-top:10px;text-align: center"><a @click="toDeskManualVisible = true">ToDesk使用说明</a></p>
223
- </a-col>
224
- </a-row>
225
- <a-row :gutter="16" style="text-align: center">
226
- <hr/>
227
- <p style="color: red;font-weight: bolder;padding-top: 10px">如需远程协助,请下载向日葵</p>
228
- <p style="color: red;font-weight: bolder">向日葵安装使用指南,请点击上方“向日葵使用说明”查看</p>
229
- </a-row>
230
- </a-space>
231
- </a-card>
232
- </a-col>
233
- </a-row>
234
- </a-tab-pane>
235
- <a-tab-pane key="workHistory" tab="历史工单">
236
- <!-- 查询表单 -->
237
- <x-form-table
238
- v-if="tabActiveKey === 'workHistory'"
239
- :fixed-query-form="fixedQueryForm"
240
- :queryParamsName="queryParamsName"
241
- title="已提交工单"
242
- @action="toDetail">
243
- <a-button slot="button" type="primary" @click="infoFormVisible = true">填写联系方式</a-button>
244
- </x-form-table>
245
- </a-tab-pane>
246
- </a-tabs>
247
- </a-card>
248
- </div>
249
- </template>
250
-
251
- <script>
252
- import { TicketDetailsViewApi, post } from '@vue2-client/services/api'
253
- import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
254
- import submitTicketSuccess from './submitTicketSuccess'
255
- import Upload from '@vue2-client/base-client/components/common/Upload'
256
-
257
- export default {
258
- name: 'submitTicket',
259
- components: {
260
- XFormTable,
261
- submitTicketSuccess,
262
- Upload
263
- },
264
- data () {
265
- return {
266
- // 查询配置文件名
267
- queryParamsName: 'TicketQueryForCustomer',
268
- // 控制成功页面显示
269
- successVisible: false,
270
- // 控制预览显示
271
- previewVisible: false,
272
- // 图片真实地址
273
- previewImage: '',
274
- // 图片列表
275
- fileList: [],
276
- // 表单数据
277
- form: {
278
- name: '',
279
- category: undefined,
280
- desc: undefined,
281
- phone: ''
282
- },
283
- // 工单序列号
284
- serialNumber: '',
285
- // 类别未填写警告信息控制
286
- showCategoryAlert: true,
287
- showPhoneAlert: true,
288
- showCustomerNameAlert: true,
289
- // 向日葵使用指南可见性
290
- sunClientManualVisible: false,
291
- // 向日葵使用指南可见性
292
- toDeskManualVisible: false,
293
- // 为工单查询指定条件
294
- fixedQueryForm: {},
295
- // 用户信息
296
- currUser: {
297
- ename: ''
298
- },
299
- tabActiveKey: 'workSubmit',
300
- uploadModel,
301
- // 客户名称
302
- customerName: undefined,
303
- // 问题类型选项
304
- ticketCategoryMap: [],
305
- ticketCategoryMapLoading: false,
306
- // 未传入客户名称手动输入联系方式
307
- infoFormVisible: false,
308
- infoForm: {
309
- phone: ''
310
- },
311
- uploadVisible: true
312
- }
313
- },
314
- computed: {
315
- // 检查客户名称是否为空
316
- validCustomerName () {
317
- return !!(this.currUser.ename || this.customerName)
318
- }
319
- },
320
- created () {
321
- document.title = '奥枫问题反馈平台'
322
- const dictionary = this.$appdata.getParams()
323
- if (dictionary && dictionary['ticketCategoryMap']) {
324
- this.ticketCategoryMap = dictionary['ticketCategoryMap']
325
- } else {
326
- this.ticketCategoryMapLoading = true
327
- this.$appdata.load().then(() => {
328
- this.ticketCategoryMap = this.$appdata.getDictionaryList('ticketCategoryMap')
329
- this.ticketCategoryMapLoading = false
330
- })
331
- }
332
- let customerName = this.$route.query.orgName
333
- // 分割客户名称
334
- if (customerName) {
335
- const partArr = customerName.split('.')
336
- if (partArr.length === 5) {
337
- customerName = `${partArr[1]}.${partArr[4]}`
338
- }
339
- }
340
- this.currUser.ename = customerName
341
- this.fixedQueryForm['t_uploader'] = this.currUser.ename
342
- },
343
- methods: {
344
- toDetail (record, id) {
345
- this.serialNumber = id + ''
346
- this.successVisible = true
347
- },
348
- getBase64 (file) {
349
- return new Promise((resolve, reject) => {
350
- const reader = new FileReader()
351
- reader.readAsDataURL(file)
352
- reader.onload = () => resolve(reader.result)
353
- reader.onerror = error => reject(error)
354
- })
355
- },
356
- setFiles (fileIds) {
357
- this.fileList = fileIds
358
- },
359
- handleCancel () {
360
- this.previewVisible = false
361
- },
362
- // 处理预览图像
363
- async handlePreview (file) {
364
- if (!file.url && !file.preview) {
365
- file.preview = await this.getBase64(file.originFileObj)
366
- }
367
- this.previewImage = file.url || file.preview
368
- this.previewVisible = true
369
- },
370
- // 提交按钮逻辑
371
- onSubmit () {
372
- let customerName = this.currUser.ename
373
- if (!customerName) {
374
- customerName = this.customerName
375
- }
376
- const form = {
377
- customerName,
378
- problemType: this.form.category,
379
- contact: this.form.phone,
380
- problemDetail: this.form.desc,
381
- Images: this.fileList
382
- }
383
- if (!this.form.desc) {
384
- form.problemDetail = '该用户没有填写描述信息'
385
- }
386
- post(TicketDetailsViewApi.createTicket, { form }).then((res) => {
387
- this.serialNumber = res
388
- this.successVisible = true
389
- this.$message.success('创建成功')
390
- this.customerName = ''
391
- this.form.category = undefined
392
- this.form.phone = ''
393
- this.form.desc = ''
394
- this.fileList = []
395
- this.uploadVisible = false
396
- if (!this.currUser.ename) {
397
- this.fixedQueryForm.t_uploader_phone = form.contact
398
- this.infoForm.phone = form.contact
399
- }
400
- })
401
- },
402
- onSuccessCancel () {
403
- this.uploadVisible = true
404
- },
405
- // 点击向日葵链接
406
- toSunClientClick () {
407
- window.open('https://sunlogin.oray.com/download')
408
- },
409
- // 点击ToDesk链接
410
- toDeskClick () {
411
- window.open('https://www.todesk.com/download.html')
412
- },
413
- // 切换标签页
414
- changeTab (id) {
415
- if (id === 'workHistory' && !this.fixedQueryForm.t_uploader && !this.fixedQueryForm.t_uploader_phone) {
416
- this.infoFormVisible = true
417
- return
418
- }
419
- this.tabActiveKey = id
420
- },
421
- onInfoFormSubmit () {
422
- this.$refs.infoFormRef.validate(valid => {
423
- if (valid) {
424
- this.fixedQueryForm = {
425
- t_uploader_phone: this.infoForm.phone
426
- }
427
- this.tabActiveKey = 'workHistory'
428
- this.infoFormVisible = false
429
- }
430
- })
431
- }
432
- },
433
- watch: {
434
- // 监控类别的改变,当类别改变,校验通过
435
- 'form.category' (newVal) {
436
- const numReg = new RegExp(/^[0-9]+$/)
437
- this.showCategoryAlert = !numReg.test(newVal)
438
- },
439
- 'form.phone' (newVal) {
440
- const numReg = new RegExp(/^[0-9]+$/)
441
- this.showPhoneAlert = !numReg.test(newVal)
442
- },
443
- 'customerName' (newVal) {
444
- this.showCustomerNameAlert = !newVal
445
- }
446
- }
447
- }
448
- 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"}')
449
- </script>
450
-
451
- <style scoped>
452
- .radio-item{
453
- margin-right: 140px;
454
- }
455
- .submitTicketTitle{
456
- font-size: 40px;
457
- vertical-align: middle;
458
- text-align: center;
459
- margin-bottom: 40px;
460
- }
461
- </style>
1
+ <template>
2
+ <div>
3
+ <!-- 显示成功页抽屉 -->
4
+ <a-modal
5
+ v-model="successVisible"
6
+ :footer="null"
7
+ destroy-on-close
8
+ title="工单状态"
9
+ width="70%"
10
+ @cancel="onSuccessCancel">
11
+ <submit-ticket-success v-if="serialNumber" :serialNumber="serialNumber" />
12
+ </a-modal>
13
+ <!-- 两个使用手册弹框 -->
14
+ <a-modal
15
+ :visible="sunClientManualVisible"
16
+ title="向日葵使用指南"
17
+ width="1000px"
18
+ @cancel="sunClientManualVisible = false"
19
+ @ok="sunClientManualVisible = false"
20
+ >
21
+ <h1>一、安装</h1>
22
+ <hr/>
23
+ <div style="padding-left: 100px;padding-top: 20px">
24
+ <img alt="pic" src="@vue2-client/assets/img/SunClientManual/1.png" style="width: 800px">
25
+ <br/>
26
+ <br/>
27
+ <p style="line-height: 30px;font-size: 1.5em;text-indent: 2em">运行下载好的安装包,按需要手动选择安装路径后,一路点下一步完成安装</p>
28
+ <br/>
29
+ <br/>
30
+ </div>
31
+ <h1>二、运行</h1>
32
+ <hr/>
33
+ <div style="padding-left: 100px;padding-top: 20px">
34
+ <p style="line-height: 30px;font-size: 1.5em;text-indent: 2em">在桌面或开始菜单中打开向日葵软件</p>
35
+ <img alt="pic" src="@vue2-client/assets/img/SunClientManual/2.png" style="width: 800px">
36
+ <br/>
37
+ <br/>
38
+ <p style="line-height: 30px;font-size: 1.5em;text-indent: 2em">显示此页面时,您已成功运行向日葵</p>
39
+ <br/>
40
+ <br/>
41
+ </div>
42
+ <h1>三、截图</h1>
43
+ <hr/>
44
+ <div style="padding-left: 100px;padding-top: 20px">
45
+ <p style="line-height: 30px;font-size: 1.5em;text-indent: 2em">点击软件界面中眼睛样子的按钮,使验证码正常显示</p>
46
+ <br/>
47
+ <br/>
48
+ <img alt="pic" src="@vue2-client/assets/img/SunClientManual/3.png" style="width: 800px">
49
+ <br/>
50
+ <br/>
51
+ <br/>
52
+ <p style="line-height: 30px;font-size: 1.5em;text-indent: 2em">
53
+ 使用qq,微信,或者任何截图软件。截取屏幕中 “本机识别码” 和 “本机验证码”。
54
+ 确保该值清晰可辨别
55
+ </p>
56
+ <br/>
57
+ <br/>
58
+ <img alt="pic" src="@vue2-client/assets/img/SunClientManual/4.png" style="width: 800px">
59
+ <br/>
60
+ <br/>
61
+ <p style="line-height: 30px;font-size: 1.5em;text-indent: 2em">
62
+ 将您截好的图片,通过表单提交页面,下方 “+” (加号)的按钮,提交给我们。
63
+ 这样我们的工作人员就可以远程协助您,排查、解决问题
64
+ </p>
65
+ <br/>
66
+ <br/>
67
+ </div>
68
+ </a-modal>
69
+ <a-modal
70
+ :visible="toDeskManualVisible"
71
+ title="ToDesk使用指南"
72
+ width="1000px"
73
+ @cancel="toDeskManualVisible = false"
74
+ @ok="toDeskManualVisible = false"
75
+ >
76
+ <h1>一、安装</h1>
77
+ <hr/>
78
+ <div style="padding-left: 100px;padding-top: 20px">
79
+ <img alt="pic" src="@vue2-client/assets/img/ToDeskManual/1.png" style="width: 800px">
80
+ <br/>
81
+ <br/>
82
+ <p style="line-height: 30px;font-size: 1.5em;text-indent: 2em">运行下载好的安装包,按需要手动选择安装路径后,一路点下一步完成安装</p>
83
+ <br/>
84
+ <br/>
85
+ </div>
86
+ <h1>二、运行</h1>
87
+ <hr/>
88
+ <div style="padding-left: 100px;padding-top: 20px">
89
+ <p style="line-height: 30px;font-size: 1.5em;text-indent: 2em">在桌面或开始菜单中打开ToDesk软件</p>
90
+ <img alt="pic" src="@vue2-client/assets/img/ToDeskManual/2.png" style="width: 800px">
91
+ <br/>
92
+ <br/>
93
+ <p style="line-height: 30px;font-size: 1.5em;text-indent: 2em">显示此页面时,您已成功运行ToDesk</p>
94
+ <br/>
95
+ <br/>
96
+ </div>
97
+ <h1>三、截图</h1>
98
+ <hr/>
99
+ <div style="padding-left: 100px;padding-top: 20px">
100
+ <p style="line-height: 30px;font-size: 1.5em;text-indent: 2em">点击软件界面中眼睛样子的按钮,使临时密码正常显示</p>
101
+ <br/>
102
+ <br/>
103
+ <img alt="pic" src="@vue2-client/assets/img/ToDeskManual/3.png" style="width: 800px">
104
+ <br/>
105
+ <br/>
106
+ <br/>
107
+ <p style="line-height: 30px;font-size: 1.5em;text-indent: 2em">
108
+ 使用qq,微信,或者任何截图软件。截取屏幕中 “设备代码” 和 “临时密码”。
109
+ 确保该值清晰可辨别
110
+ </p>
111
+ <br/>
112
+ <br/>
113
+ <img alt="pic" src="@vue2-client/assets/img/ToDeskManual/4.png" style="width: 800px">
114
+ <br/>
115
+ <br/>
116
+ <p style="line-height: 30px;font-size: 1.5em;text-indent: 2em">
117
+ 将您截好的图片,通过表单提交页面,下方 “+” (加号)的按钮,提交给我们。
118
+ 这样我们的工作人员就可以远程协助您,排查、解决问题
119
+ </p>
120
+ <br/>
121
+ <br/>
122
+ </div>
123
+ </a-modal>
124
+ <a-modal
125
+ :visible="infoFormVisible"
126
+ title="填写联系方式"
127
+ @cancel="infoFormVisible = false"
128
+ @ok="onInfoFormSubmit">
129
+ <a-form-model
130
+ ref="infoFormRef"
131
+ :label-col="{ span: 5 }"
132
+ :model="infoForm"
133
+ :wrapper-col="{ span: 18 }">
134
+ <a-form-model-item :rules="{ required: true, message: '请输入联系方式' }" label="联系方式" prop="phone">
135
+ <a-input v-model="infoForm.phone" placeholder="请输入联系方式查询历史工单" />
136
+ </a-form-model-item>
137
+ </a-form-model>
138
+ </a-modal>
139
+ <a-card>
140
+ <div style="text-align: right">
141
+ <p>欢迎您!{{ currUser.ename }}</p>
142
+ </div>
143
+ <div class="submitTicketTitle">
144
+ <span>奥枫问题反馈平台</span>
145
+ </div>
146
+ <a-tabs :activeKey="tabActiveKey" @change="changeTab">
147
+ <a-tab-pane key="workSubmit" tab="工单提交">
148
+ <!-- 表格主体 -->
149
+ <a-row v-if="tabActiveKey === 'workSubmit'">
150
+ <a-col :span="18">
151
+ <a-form :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }">
152
+ <!-- 客户名称输入 -->
153
+ <a-form-item v-if="!currUser.ename" label="客户名称">
154
+ <a-input v-model="customerName" placeholder="请输入客户名称(总公司名+分公司名)"/>
155
+ <strong v-show="showCustomerNameAlert" style="color: red">客户名称不能为空!</strong>
156
+ </a-form-item>
157
+ <!-- 问题类型单选框 -->
158
+ <a-form-item label="问题类型">
159
+ <a-radio-group v-for="(item,index) in ticketCategoryMap" :key="index" v-model="form.category">
160
+ <a-radio :value="item.value" class="radio-item">
161
+ {{ item.label }}
162
+ </a-radio>
163
+ </a-radio-group>
164
+ <a-spin :spinning="ticketCategoryMapLoading" />
165
+ <br/>
166
+ <strong v-show="showCategoryAlert" style="color: red">类型不允许为空!</strong>
167
+ </a-form-item>
168
+ <!-- 联系人 -->
169
+ <a-form-item label="联系人">
170
+ <a-input v-model="form.contact"></a-input>
171
+ <strong v-show="showContactAlert" style="color: red">请填写联系人!</strong>
172
+ </a-form-item>
173
+ <!-- 联系方式 -->
174
+ <a-form-item label="联系方式">
175
+ <a-input v-model="form.phone"></a-input>
176
+ <strong v-show="showPhoneAlert" style="color: red">联系方式填写有误!</strong>
177
+ </a-form-item>
178
+ <!-- 问题描述框 -->
179
+ <a-form-item label="问题详情描述">
180
+ <a-textarea v-model="form.desc" allow-clear placeholder="请用一句话描述您的问题,必要时请注明客户编号,表号,系统功能项等信息"/>
181
+ </a-form-item>
182
+ <!-- 图片上传 -->
183
+ <a-form-item :wrapper-col="{ span: 12 }" label="问题截图">
184
+ <div class="clearfix">
185
+ <upload v-if="uploadVisible" :model="imageUploadModel" @setFiles="setImages" />
186
+ <a-modal
187
+ :footer="null"
188
+ :visible="previewVisible"
189
+ @cancel="handleCancel"
190
+ >
191
+ <img :src="previewImage" alt="图片上传" style="width: 100%"/>
192
+ </a-modal>
193
+ </div>
194
+ <strong v-show="!imageList.length" style="color: red">请上传问题截图!</strong>
195
+ </a-form-item>
196
+ <!-- 附件上传 -->
197
+ <a-form-item :wrapper-col="{ span: 12 }" label="附件">
198
+ <div class="clearfix">
199
+ <upload v-if="uploadVisible" :model="fileUploadModel" @setFiles="setFiles" />
200
+ </div>
201
+ </a-form-item>
202
+ <!-- 表单底部按钮 -->
203
+ <a-form-item :wrapper-col="{ span: 12, offset: 5 }">
204
+ <a-button :disabled="showCategoryAlert || showPhoneAlert || !validCustomerName || showContactAlert || !imageList.length" style="margin-right: 20px" type="primary" @click="onSubmit">
205
+ 提交
206
+ </a-button>
207
+ </a-form-item>
208
+ </a-form>
209
+ </a-col>
210
+ <a-col :span="6">
211
+ <a-card title="远程方式快捷下载">
212
+ <a-space direction="vertical">
213
+ <a-row :gutter="16">
214
+ <a-col
215
+ :lg="24"
216
+ :md="24"
217
+ :sm="24"
218
+ :xl="12"
219
+ :xs="24"
220
+ :xxl="12"
221
+ style="text-align: center">
222
+ <img alt="pic" src="@vue2-client/assets/img/SunClientDownload.png" style="width: 128px;height:128px;cursor: pointer" @click="toSunClientClick"/>
223
+ <p style="padding-top:10px;text-align: center"><a @click="sunClientManualVisible = true">向日葵使用说明</a></p>
224
+ </a-col>
225
+ <a-col
226
+ :lg="24"
227
+ :md="24"
228
+ :sm="24"
229
+ :xl="12"
230
+ :xs="24"
231
+ :xxl="12"
232
+ style="text-align: center">
233
+ <img alt="pic" src="@vue2-client/assets/img/ToDeskDownload.png" style="width: 128px;height:128px;cursor: pointer" @click="toDeskClick">
234
+ <p style="padding-top:10px;text-align: center"><a @click="toDeskManualVisible = true">ToDesk使用说明</a></p>
235
+ </a-col>
236
+ </a-row>
237
+ <a-row :gutter="16" style="text-align: center">
238
+ <hr/>
239
+ <p style="color: red;font-weight: bolder;padding-top: 10px">如需远程协助,请下载向日葵</p>
240
+ <p style="color: red;font-weight: bolder">向日葵安装使用指南,请点击上方“向日葵使用说明”查看</p>
241
+ </a-row>
242
+ </a-space>
243
+ </a-card>
244
+ </a-col>
245
+ </a-row>
246
+ </a-tab-pane>
247
+ <a-tab-pane key="workHistory" tab="历史工单">
248
+ <!-- 查询表单 -->
249
+ <x-form-table
250
+ v-if="tabActiveKey === 'workHistory'"
251
+ :fixed-query-form="fixedQueryForm"
252
+ :queryParamsName="queryParamsName"
253
+ title="已提交工单"
254
+ @action="toDetail">
255
+ <a-button slot="button" type="primary" @click="infoFormVisible = true">填写联系方式</a-button>
256
+ </x-form-table>
257
+ </a-tab-pane>
258
+ </a-tabs>
259
+ </a-card>
260
+ </div>
261
+ </template>
262
+
263
+ <script>
264
+ import { TicketDetailsViewApi, post } from '@vue2-client/services/api'
265
+ import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
266
+ import submitTicketSuccess from './submitTicketSuccess'
267
+ import Upload from '@vue2-client/base-client/components/common/Upload'
268
+
269
+ export default {
270
+ name: 'submitTicket',
271
+ components: {
272
+ XFormTable,
273
+ submitTicketSuccess,
274
+ Upload
275
+ },
276
+ data () {
277
+ return {
278
+ // 查询配置文件名
279
+ queryParamsName: 'TicketQueryForCustomer',
280
+ // 控制成功页面显示
281
+ successVisible: false,
282
+ // 控制预览显示
283
+ previewVisible: false,
284
+ // 图片真实地址
285
+ previewImage: '',
286
+ // 图片列表
287
+ imageList: [],
288
+ // 附件列表
289
+ fileList:[],
290
+ // 表单数据
291
+ form: {
292
+ name: '',
293
+ category: undefined,
294
+ desc: undefined,
295
+ contact: '',
296
+ phone: ''
297
+ },
298
+ // 工单序列号
299
+ serialNumber: '',
300
+ // 类别未填写警告信息控制
301
+ showCategoryAlert: true,
302
+ showContactAlert: true,
303
+ showPhoneAlert: true,
304
+ showCustomerNameAlert: true,
305
+ // 向日葵使用指南可见性
306
+ sunClientManualVisible: false,
307
+ // 向日葵使用指南可见性
308
+ toDeskManualVisible: false,
309
+ // 为工单查询指定条件
310
+ fixedQueryForm: {},
311
+ // 用户信息
312
+ currUser: {
313
+ ename: ''
314
+ },
315
+ tabActiveKey: 'workSubmit',
316
+ imageUploadModel,
317
+ fileUploadModel,
318
+ // 客户名称
319
+ customerName: undefined,
320
+ // 问题类型选项
321
+ ticketCategoryMap: [],
322
+ ticketCategoryMapLoading: false,
323
+ // 未传入客户名称手动输入联系方式
324
+ infoFormVisible: false,
325
+ infoForm: {
326
+ phone: ''
327
+ },
328
+ uploadVisible: true
329
+ }
330
+ },
331
+ computed: {
332
+ // 检查客户名称是否为空
333
+ validCustomerName () {
334
+ if (this.currUser.ename || this.customerName) {
335
+ return true
336
+ }
337
+ return false
338
+ }
339
+ },
340
+ created () {
341
+ document.title = '奥枫问题反馈平台'
342
+ const dictionary = this.$appdata.getParams()
343
+ if (dictionary && dictionary['ticketCategoryMap']) {
344
+ this.ticketCategoryMap = dictionary['ticketCategoryMap']
345
+ } else {
346
+ this.ticketCategoryMapLoading = true
347
+ this.$appdata.load().then(() => {
348
+ this.ticketCategoryMap = this.$appdata.getDictionaryList('ticketCategoryMap')
349
+ this.ticketCategoryMapLoading = false
350
+ })
351
+ }
352
+ let customerName = this.$route.query.orgName
353
+ // 分割客户名称
354
+ if (customerName) {
355
+ const partArr = customerName.split('.')
356
+ if (partArr.length === 5) {
357
+ customerName = `${partArr[1]}.${partArr[4]}`
358
+ }
359
+ }
360
+ this.currUser.ename = customerName
361
+ this.fixedQueryForm['t_uploader'] = this.currUser.ename
362
+ },
363
+ methods: {
364
+ toDetail (record, id) {
365
+ this.serialNumber = id + ''
366
+ this.successVisible = true
367
+ },
368
+ getBase64 (file) {
369
+ return new Promise((resolve, reject) => {
370
+ const reader = new FileReader()
371
+ reader.readAsDataURL(file)
372
+ reader.onload = () => resolve(reader.result)
373
+ reader.onerror = error => reject(error)
374
+ })
375
+ },
376
+ setImages (imageIds) {
377
+ this.imageList = imageIds
378
+ },
379
+ setFiles (fileIds) {
380
+ this.fileList = fileIds
381
+ },
382
+ handleCancel () {
383
+ this.previewVisible = false
384
+ },
385
+ // 处理预览图像
386
+ async handlePreview (file) {
387
+ if (!file.url && !file.preview) {
388
+ file.preview = await this.getBase64(file.originFileObj)
389
+ }
390
+ this.previewImage = file.url || file.preview
391
+ this.previewVisible = true
392
+ },
393
+ // 提交按钮逻辑
394
+ onSubmit () {
395
+ let customerName = this.currUser.ename
396
+ if (!customerName) {
397
+ customerName = this.customerName
398
+ }
399
+ const form = {
400
+ customerName,
401
+ problemType: this.form.category,
402
+ contact: this.form.contact,
403
+ phone: this.form.phone,
404
+ problemDetail: this.form.desc,
405
+ Images: this.imageList,
406
+ FilesId: this.fileList
407
+ }
408
+ if (form.customerName.length > 100) {
409
+ this.$message.error('客户名称长度超出限制')
410
+ return
411
+ }
412
+ if (form.problemDetail.length > 300) {
413
+ this.$message.error('问题详情长度超出限制')
414
+ return
415
+ }
416
+ if (form.problemDetail.indexOf('\'')) {
417
+ this.$message.error('问题详情不能包含特殊符号')
418
+ return
419
+ }
420
+ if (!this.form.desc) {
421
+ form.problemDetail = '该用户没有填写描述信息'
422
+ }
423
+ post(TicketDetailsViewApi.createTicket, { form }).then((res) => {
424
+ this.serialNumber = res
425
+ this.successVisible = true
426
+ this.$message.success('创建成功')
427
+ this.customerName = ''
428
+ this.form.category = undefined
429
+ this.form.contact = ''
430
+ this.form.phone = ''
431
+ this.form.desc = ''
432
+ this.imageList = []
433
+ this.fileList = []
434
+ this.uploadVisible = false
435
+ if (!this.currUser.ename) {
436
+ this.fixedQueryForm.t_uploader_phone = form.phone
437
+ this.infoForm.phone = form.phone
438
+ }
439
+ })
440
+ },
441
+ onSuccessCancel () {
442
+ this.uploadVisible = true
443
+ },
444
+ // 点击向日葵链接
445
+ toSunClientClick () {
446
+ window.open('https://sunlogin.oray.com/download')
447
+ },
448
+ // 点击ToDesk链接
449
+ toDeskClick () {
450
+ window.open('https://www.todesk.com/download.html')
451
+ },
452
+ // 切换标签页
453
+ changeTab (id) {
454
+ if (id === 'workHistory' && !this.fixedQueryForm.t_uploader && !this.fixedQueryForm.t_uploader_phone) {
455
+ this.infoFormVisible = true
456
+ return
457
+ }
458
+ this.tabActiveKey = id
459
+ },
460
+ onInfoFormSubmit () {
461
+ this.$refs.infoFormRef.validate(valid => {
462
+ if (valid) {
463
+ this.fixedQueryForm = {
464
+ t_uploader_phone: this.infoForm.phone
465
+ }
466
+ this.tabActiveKey = 'workHistory'
467
+ this.infoFormVisible = false
468
+ }
469
+ })
470
+ }
471
+ },
472
+ watch: {
473
+ // 监控类别的改变,当类别改变,校验通过
474
+ 'form.category' (newVal) {
475
+ const numReg = new RegExp(/^[0-9]+$/)
476
+ this.showCategoryAlert = !numReg.test(newVal)
477
+ },
478
+ 'form.contact' (newVal) {
479
+ this.showContactAlert = newVal.trim().length === 0
480
+ },
481
+ 'form.phone' (newVal) {
482
+ const numReg = new RegExp(/^[0-9]+$/)
483
+ this.showPhoneAlert = !numReg.test(newVal)
484
+ },
485
+ 'customerName' (newVal) {
486
+ this.showCustomerNameAlert = !newVal
487
+ }
488
+ }
489
+ }
490
+ const imageUploadModel = 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"}')
491
+ const fileUploadModel = JSON.parse('{"addOrEdit":"all","resUploadStock":1,"pathKey":"cs","rule":{"type":"string","required":"false"},"isOnlyAddOrEdit":true,"acceptCount":3,"type":"file","accept":["*"],"stockAlias":"webmeter","fileRootPath":"D:\\\\nginx-resource\\\\resource\\\\","name":"附件","resUploadMode":"server","model":"FilesId"}')
492
+ </script>
493
+
494
+ <style scoped>
495
+ .radio-item{
496
+ margin-right: 140px;
497
+ }
498
+ .submitTicketTitle{
499
+ font-size: 40px;
500
+ vertical-align: middle;
501
+ text-align: center;
502
+ margin-bottom: 40px;
503
+ }
504
+ </style>