vue2-client 1.2.103 → 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 +8 -0
- 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 +6 -0
- package/src/base-client/components/common/XTable/XTable.vue +6 -1
- package/src/components/STable/index.js +2 -2
- package/src/pages/login/Login.vue +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
> 所有关于本项目的变化都在该文档里。
|
|
3
3
|
|
|
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
|
+
|
|
4
12
|
**1.2.103 -2022-08-11 @苗艳强**
|
|
5
13
|
- xform-table的afterSubmit事件增加表单参数
|
|
6
14
|
|
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: {
|
|
@@ -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) {
|
|
@@ -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 })
|