vue2-client 1.2.101 → 1.2.105
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 +13 -1
- package/package.json +1 -1
- package/src/base-client/components/common/Upload/Upload.vue +1 -1
- package/src/base-client/components/common/XForm/XFormItem.vue +1 -1
- package/src/base-client/components/common/XFormTable/XFormTable.vue +7 -1
- package/src/base-client/components/common/XTable/XTable.vue +6 -1
- package/src/components/STable/index.js +2 -2
- package/src/layouts/header/HeaderNotice.vue +38 -3
- package/src/pages/login/Login.vue +1 -1
- package/src/pages/system/ticket/index.vue +5 -68
- package/src/services/api/TicketDetailsViewApi.js +1 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
> 所有关于本项目的变化都在该文档里。
|
|
3
3
|
|
|
4
|
-
**1.2.
|
|
4
|
+
**1.2.105 -2022-08-16 @杨亚文**
|
|
5
|
+
- 设置用户登录失效时间为12小时
|
|
6
|
+
|
|
7
|
+
**1.2.104 -2022-08-16 @杨亚文**
|
|
8
|
+
- Upload 设置上传文件超时时间为1分钟
|
|
9
|
+
- XFormItem 修复删除上传的文件不生效的bug
|
|
10
|
+
- XFormTable XTable STable 数据只有一页时可以自定义是否隐藏分页
|
|
11
|
+
|
|
12
|
+
**1.2.103 -2022-08-11 @苗艳强**
|
|
13
|
+
- xform-table的afterSubmit事件增加表单参数
|
|
14
|
+
|
|
15
|
+
**1.2.94 -2022-08-05 - 1.2.102 @张振宇**
|
|
5
16
|
- 功能新增:
|
|
6
17
|
- 新增表单组件 人员选择框
|
|
7
18
|
- 新增表单配置可以配置自定义请求
|
|
@@ -9,6 +20,7 @@
|
|
|
9
20
|
- 文件表单项cascader 修改了一下能用了
|
|
10
21
|
- xformitem修改了两个文件上传框时得bug
|
|
11
22
|
- 新增制度待确认提示
|
|
23
|
+
- 修改制度待确认提示
|
|
12
24
|
|
|
13
25
|
**1.2.93 -2022-08-03 @江超**
|
|
14
26
|
- 功能新增:
|
package/package.json
CHANGED
|
@@ -116,7 +116,7 @@ export default {
|
|
|
116
116
|
// if (process.env.NODE_ENV === 'production') {
|
|
117
117
|
// url = `/${this.model.stockAlias}/webmeteruploadapi/resource`
|
|
118
118
|
// }
|
|
119
|
-
post('/webmeterresourceapi/upload', formData, { headers }).then(res => {
|
|
119
|
+
post('/webmeterresourceapi/upload', formData, { headers, timeout: 60*1000 }).then(res => {
|
|
120
120
|
// 根据服务端返回的结果判断成功与否,设置文件条目的状态
|
|
121
121
|
if (res.success) {
|
|
122
122
|
fileInfo.status = 'done'
|
|
@@ -327,7 +327,7 @@ export default {
|
|
|
327
327
|
if (!this.form[this.attr.model]) {
|
|
328
328
|
this.form[this.attr.model] = []
|
|
329
329
|
}
|
|
330
|
-
this.form[this.attr.model] = [...
|
|
330
|
+
this.form[this.attr.model] = [...fileIds]
|
|
331
331
|
},
|
|
332
332
|
// 懒加载检索方法
|
|
333
333
|
fetchFunction (value) {
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
:json-data="tableColumns"
|
|
26
26
|
:queryParams="queryParams"
|
|
27
27
|
:queryParamsName="queryParamsName"
|
|
28
|
+
:show-pagination="showPagination"
|
|
28
29
|
@action="action"
|
|
29
30
|
@loadData="loadData"
|
|
30
31
|
@selectRow="selectRow"
|
|
@@ -176,6 +177,11 @@ export default {
|
|
|
176
177
|
tempTableData: {
|
|
177
178
|
type: Object,
|
|
178
179
|
default: null
|
|
180
|
+
},
|
|
181
|
+
// 数据只有一页时是否展示分页,true:展示,auto:隐藏
|
|
182
|
+
showPagination: {
|
|
183
|
+
type: String | Boolean,
|
|
184
|
+
default: true
|
|
179
185
|
}
|
|
180
186
|
},
|
|
181
187
|
watch: {
|
|
@@ -303,7 +309,7 @@ export default {
|
|
|
303
309
|
this.modelVisible = false
|
|
304
310
|
this.$refs.xTable.refresh(true)
|
|
305
311
|
// commit
|
|
306
|
-
this.$emit('afterSubmit', { type: this.businessType, id: res.id })
|
|
312
|
+
this.$emit('afterSubmit', { type: this.businessType, id: res.id, form: requestParameters.form })
|
|
307
313
|
}).catch(e => {
|
|
308
314
|
this.loading = false
|
|
309
315
|
this.modelVisible = false
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
:rowKey="rowKey"
|
|
38
38
|
:rowSelection="rowSelection"
|
|
39
39
|
:scroll="{ x: scrollXWidth, y: scrollYWidth }"
|
|
40
|
-
showPagination="
|
|
40
|
+
:showPagination="showPagination"
|
|
41
41
|
size="default"
|
|
42
42
|
>
|
|
43
43
|
<template
|
|
@@ -171,6 +171,11 @@ export default {
|
|
|
171
171
|
default: () => {
|
|
172
172
|
return undefined
|
|
173
173
|
}
|
|
174
|
+
},
|
|
175
|
+
// 数据只有一页时是否展示分页,true:展示,auto:隐藏
|
|
176
|
+
showPagination: {
|
|
177
|
+
type: String | Boolean,
|
|
178
|
+
default: true
|
|
174
179
|
}
|
|
175
180
|
},
|
|
176
181
|
computed: {
|
|
@@ -171,10 +171,10 @@ export default {
|
|
|
171
171
|
return
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
// 这里用于判断接口是否有返回 r.totalCount 且 this.showPagination =
|
|
174
|
+
// 这里用于判断接口是否有返回 r.totalCount 且 this.showPagination = 'auto' 且 pageNo 和 pageSize 存在 且 totalCount 小于等于 pageNo * pageSize 的大小
|
|
175
175
|
// 当情况满足时,表示数据不满足分页大小,关闭 table 分页功能
|
|
176
176
|
try {
|
|
177
|
-
if ((['auto'
|
|
177
|
+
if ((['auto'].includes(this.showPagination) && r.totalCount <= (r.pageNo * this.localPagination.pageSize))) {
|
|
178
178
|
this.localPagination.hideOnSinglePage = true
|
|
179
179
|
}
|
|
180
180
|
} catch (e) {
|
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
<a-dropdown :trigger="['click']" v-model="show">
|
|
3
3
|
<div slot="overlay">
|
|
4
4
|
<a-spin :spinning="loading">
|
|
5
|
-
<a-tabs
|
|
5
|
+
<a-tabs
|
|
6
|
+
class="dropdown-tabs"
|
|
7
|
+
:tabBarStyle="{textAlign: 'center'}"
|
|
8
|
+
:style="{width: '297px'}"
|
|
9
|
+
v-model="activeKey">
|
|
6
10
|
<a-tab-pane tab="通知" key="1">
|
|
7
11
|
<a-list>
|
|
8
12
|
<a-list-item :key="item.id" class="tab-pane" v-for=" item in exception">
|
|
@@ -24,7 +28,7 @@
|
|
|
24
28
|
<a-tab-pane tab="待办" key="3">
|
|
25
29
|
<a-list item-layout="horizontal" :data-source="backlog" :bordered="true">
|
|
26
30
|
<a-list-item slot="renderItem" slot-scope="item, index">
|
|
27
|
-
<a slot="actions" v-if="item.type==='制度待确认'" @click="confirm_institution(item)"
|
|
31
|
+
<a slot="actions" v-if="item.type==='制度待确认'" @click="confirm_institution(item)">查看</a>
|
|
28
32
|
<a-list-item-meta :title="item.title" :description="item.description"/>
|
|
29
33
|
</a-list-item>
|
|
30
34
|
</a-list>
|
|
@@ -67,7 +71,8 @@ export default {
|
|
|
67
71
|
institution: undefined,
|
|
68
72
|
affirmInstitution: undefined,
|
|
69
73
|
exception: [],
|
|
70
|
-
backlog: []
|
|
74
|
+
backlog: [],
|
|
75
|
+
activeKey: '1'
|
|
71
76
|
}
|
|
72
77
|
},
|
|
73
78
|
components: { InstitutionDetail },
|
|
@@ -96,12 +101,42 @@ export default {
|
|
|
96
101
|
if (this.$login.f.name) {
|
|
97
102
|
post('/webmetersql/getToBeConfirmed', { data: { condition: `state = '待确认' and f_affirm_by = '${this.$login.f.name}'` } }).then(res => {
|
|
98
103
|
this.backlog = [...res]
|
|
104
|
+
if (this.backlog.length > 0) {
|
|
105
|
+
const key = `open${Date.now()}`
|
|
106
|
+
this.$notification.open({
|
|
107
|
+
key,
|
|
108
|
+
message: `您有${this.backlog.length}条待办需要确认`,
|
|
109
|
+
top: '50px',
|
|
110
|
+
description: this.backlog.map((item, index) => index + 1 + '、' + item.title).join(';'),
|
|
111
|
+
icon: <a-icon type="container" style="color: #f5222d"/>,
|
|
112
|
+
btn: h => {
|
|
113
|
+
return h(
|
|
114
|
+
'a-button',
|
|
115
|
+
{
|
|
116
|
+
props: {
|
|
117
|
+
type: 'primary',
|
|
118
|
+
size: 'small',
|
|
119
|
+
},
|
|
120
|
+
on: {
|
|
121
|
+
click: () => this.viewBacklog(key),
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
'查看',
|
|
125
|
+
)
|
|
126
|
+
}
|
|
127
|
+
})
|
|
128
|
+
}
|
|
99
129
|
})
|
|
100
130
|
}
|
|
101
131
|
} catch (e) {
|
|
102
132
|
console.log(e)
|
|
103
133
|
}
|
|
104
134
|
},
|
|
135
|
+
viewBacklog (key) {
|
|
136
|
+
this.$notification.close(key)
|
|
137
|
+
this.show = true
|
|
138
|
+
this.activeKey = '3'
|
|
139
|
+
},
|
|
105
140
|
confirm_institution (item) {
|
|
106
141
|
this.institutionDetailVisible = true
|
|
107
142
|
this.show = false
|
|
@@ -201,7 +201,7 @@ export default {
|
|
|
201
201
|
setACCESSTOKEN (data) {
|
|
202
202
|
localStorage.setItem(ACCESS_TOKEN, data)
|
|
203
203
|
let timestamp = new Date().getTime()// 当前的时间戳
|
|
204
|
-
timestamp = timestamp + 60 * 60 * 1000
|
|
204
|
+
timestamp = timestamp + 12 * 60 * 60 * 1000
|
|
205
205
|
// 格式化时间获取年月日, 登陆过期时间
|
|
206
206
|
const dateAfter = new Date(timestamp)
|
|
207
207
|
setAuthorization({ token: data, expireAt: dateAfter })
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
</a-modal>
|
|
121
121
|
<a-card v-if="visible">
|
|
122
122
|
<div style="text-align: right">
|
|
123
|
-
<p
|
|
123
|
+
<p>欢迎您:{{ currUser.ename }}</p>
|
|
124
124
|
</div>
|
|
125
125
|
<div class="submitTicketTitle">
|
|
126
126
|
<span>奥枫问题反馈平台</span>
|
|
@@ -131,19 +131,6 @@
|
|
|
131
131
|
<a-row v-if="tabActiveKey === 'workSubmit'">
|
|
132
132
|
<a-col :span="18">
|
|
133
133
|
<a-form :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }">
|
|
134
|
-
<!-- 客户名称选择 -->
|
|
135
|
-
<a-form-item v-if="!currUser.ename" label="客户名称">
|
|
136
|
-
<a-select
|
|
137
|
-
v-model="customerName"
|
|
138
|
-
:options="customerOptions"
|
|
139
|
-
:filter-option="false"
|
|
140
|
-
:default-active-first-option="false"
|
|
141
|
-
placeholder="请搜索客户名称"
|
|
142
|
-
show-search
|
|
143
|
-
@search="onCustomerSearch"
|
|
144
|
-
></a-select>
|
|
145
|
-
<strong v-show="showCustomerNameAlert" style="color: red">客户名称不能为空!</strong>
|
|
146
|
-
</a-form-item>
|
|
147
134
|
<!-- 问题类型单选框 -->
|
|
148
135
|
<a-form-item label="问题类型">
|
|
149
136
|
<a-radio-group v-model="form.category" v-for="(item,index) in $appdata.getDictionaryList('ticketCategoryMap')" :key="index">
|
|
@@ -166,7 +153,7 @@
|
|
|
166
153
|
<!-- 图片上传 -->
|
|
167
154
|
<a-form-item :wrapper-col="{ span: 12 }" label="问题截图">
|
|
168
155
|
<div class="clearfix">
|
|
169
|
-
|
|
156
|
+
<a-upload
|
|
170
157
|
name="avatar"
|
|
171
158
|
list-type="picture-card"
|
|
172
159
|
:before-upload="beforeUpload"
|
|
@@ -180,8 +167,7 @@
|
|
|
180
167
|
<a-icon type="plus" />
|
|
181
168
|
<div class="ant-upload-text">点击上传</div>
|
|
182
169
|
</div>
|
|
183
|
-
</a-upload>
|
|
184
|
-
<upload :model="uploadModel" @setFiles="setFiles" />
|
|
170
|
+
</a-upload>
|
|
185
171
|
<a-modal
|
|
186
172
|
:visible="previewVisible"
|
|
187
173
|
:footer="null"
|
|
@@ -193,7 +179,7 @@
|
|
|
193
179
|
</a-form-item>
|
|
194
180
|
<!-- 表单底部按钮 -->
|
|
195
181
|
<a-form-item :wrapper-col="{ span: 12, offset: 5 }">
|
|
196
|
-
<a-button type="primary" @click="onSubmit" style="margin-right: 20px" :disabled="showCategoryAlert || showPhoneAlert
|
|
182
|
+
<a-button type="primary" @click="onSubmit" style="margin-right: 20px" :disabled="showCategoryAlert || showPhoneAlert">
|
|
197
183
|
提交
|
|
198
184
|
</a-button>
|
|
199
185
|
</a-form-item>
|
|
@@ -292,7 +278,6 @@ export default {
|
|
|
292
278
|
// 类别未填写警告信息控制
|
|
293
279
|
showCategoryAlert: true,
|
|
294
280
|
showPhoneAlert: true,
|
|
295
|
-
showCustomerNameAlert: true,
|
|
296
281
|
// 向日葵使用指南可见性
|
|
297
282
|
sunClientManualVisible: false,
|
|
298
283
|
// 向日葵使用指南可见性
|
|
@@ -307,16 +292,7 @@ export default {
|
|
|
307
292
|
phoneNumber: ''
|
|
308
293
|
},
|
|
309
294
|
visible: false,
|
|
310
|
-
tabActiveKey: 'workSubmit'
|
|
311
|
-
uploadModel,
|
|
312
|
-
customerName: undefined,
|
|
313
|
-
customerOptions: []
|
|
314
|
-
}
|
|
315
|
-
},
|
|
316
|
-
computed: {
|
|
317
|
-
// 检查客户名称是否为空
|
|
318
|
-
validCustomerName () {
|
|
319
|
-
return this.currUser.ename || this.customerName ? true : false
|
|
295
|
+
tabActiveKey: 'workSubmit'
|
|
320
296
|
}
|
|
321
297
|
},
|
|
322
298
|
created () {
|
|
@@ -341,9 +317,6 @@ export default {
|
|
|
341
317
|
reader.onerror = error => reject(error)
|
|
342
318
|
})
|
|
343
319
|
},
|
|
344
|
-
setFiles (fileIds) {
|
|
345
|
-
this.fileList = fileIds
|
|
346
|
-
},
|
|
347
320
|
// 图像修改检测
|
|
348
321
|
handleChange ({ fileList }) {
|
|
349
322
|
this.fileList = fileList.filter((item) => {
|
|
@@ -394,29 +367,6 @@ export default {
|
|
|
394
367
|
},
|
|
395
368
|
// 提交按钮逻辑
|
|
396
369
|
onSubmit () {
|
|
397
|
-
let customerName = this.currUser.ename
|
|
398
|
-
if (!customerName) {
|
|
399
|
-
customerName = this.customerName
|
|
400
|
-
}
|
|
401
|
-
const form = {
|
|
402
|
-
customerName,
|
|
403
|
-
problemType: this.form.category,
|
|
404
|
-
contact: this.form.phone,
|
|
405
|
-
problemDetail: this.form.desc,
|
|
406
|
-
Images: this.fileList
|
|
407
|
-
}
|
|
408
|
-
if (this.form.desc === undefined) {
|
|
409
|
-
form.problemDetail = '该用户没有填写描述信息'
|
|
410
|
-
}
|
|
411
|
-
// console.log(data)
|
|
412
|
-
// if (customerName) return
|
|
413
|
-
post(TicketDetailsViewApi.createTicket, { form }).then((res) => {
|
|
414
|
-
this.serialNumber = res
|
|
415
|
-
this.successVisible = true
|
|
416
|
-
this.$message.success('创建成功')
|
|
417
|
-
})
|
|
418
|
-
},
|
|
419
|
-
onSubmitOld () {
|
|
420
370
|
// 根据当前日期调用logic获取订单序列号
|
|
421
371
|
return post(TicketDetailsViewApi.getTicketSerialNumber, {
|
|
422
372
|
priority: this.data.priority,
|
|
@@ -447,7 +397,6 @@ export default {
|
|
|
447
397
|
this.form.desc = ''
|
|
448
398
|
this.showCategoryAlert = true
|
|
449
399
|
this.showPhoneAlert = true
|
|
450
|
-
this.showCustomerNameAlert = true
|
|
451
400
|
}, err => {
|
|
452
401
|
console.log(err)
|
|
453
402
|
})
|
|
@@ -478,14 +427,6 @@ export default {
|
|
|
478
427
|
// 切换标签页
|
|
479
428
|
changeTab (id) {
|
|
480
429
|
this.tabActiveKey = id
|
|
481
|
-
},
|
|
482
|
-
// 客户名称搜索
|
|
483
|
-
onCustomerSearch (value) {
|
|
484
|
-
post('/webmeterapi/getCustomerBySearch', {
|
|
485
|
-
word: value
|
|
486
|
-
}).then(res => {
|
|
487
|
-
this.customerOptions = res
|
|
488
|
-
})
|
|
489
430
|
}
|
|
490
431
|
},
|
|
491
432
|
watch: {
|
|
@@ -497,13 +438,9 @@ export default {
|
|
|
497
438
|
'form.phone' (newVal) {
|
|
498
439
|
const numReg = new RegExp(/^[0-9]+$/)
|
|
499
440
|
this.showPhoneAlert = !numReg.test(newVal)
|
|
500
|
-
},
|
|
501
|
-
customerName (newVal) {
|
|
502
|
-
this.showCustomerNameAlert = !newVal
|
|
503
441
|
}
|
|
504
442
|
}
|
|
505
443
|
}
|
|
506
|
-
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"}')
|
|
507
444
|
</script>
|
|
508
445
|
|
|
509
446
|
<style scoped>
|
|
@@ -32,9 +32,7 @@ const TicketDetailsViewApi = {
|
|
|
32
32
|
// 提交用户填写附加信息
|
|
33
33
|
AddonDescriptionToTicket: '/webmeterapi/AddonDescriptionToTicket',
|
|
34
34
|
// 获取用户填写附加信息
|
|
35
|
-
getAddonDescription: '/webmeterapi/getAddonDescription'
|
|
36
|
-
// 发起售后工单流程
|
|
37
|
-
createTicket: '/webmeterapi/createTicket'
|
|
35
|
+
getAddonDescription: '/webmeterapi/getAddonDescription'
|
|
38
36
|
}
|
|
39
37
|
|
|
40
38
|
export { TicketDetailsViewApi }
|