xs-common-plugins 1.0.3 → 1.0.7
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/README.md +17 -0
- package/package.json +1 -1
- package/src/common/common.js +28 -1
- package/src/components/ReportCmp/index.vue +1 -1
- package/src/plugins/im/components/chat/index.vue +1 -0
- package/src/plugins/im/components/chat/methods.js +1 -1
- package/src/styles/index.scss +0 -1
- package/src/styles/table.scss +7 -8
- package/src/views/callback/index.vue +0 -4
package/README.md
CHANGED
|
@@ -206,4 +206,21 @@
|
|
|
206
206
|
1.0.3
|
|
207
207
|
1. 弹窗组件中能使用 this.$store
|
|
208
208
|
2. 移除 .el-radio-group 中 的 display: flex;
|
|
209
|
+
```
|
|
210
|
+
```
|
|
211
|
+
1.0.4
|
|
212
|
+
1. 报表组件 show-summary 增加判断
|
|
213
|
+
2. common.js 增加公用方法 common.format 用于快速格式化样式
|
|
214
|
+
```
|
|
215
|
+
```
|
|
216
|
+
1.0.5
|
|
217
|
+
1. 报表组件 过多不出滚动条问题修复
|
|
218
|
+
```
|
|
219
|
+
```
|
|
220
|
+
1.0.6
|
|
221
|
+
1. 处理 登录后 菜单权限推送两次的问题
|
|
222
|
+
```
|
|
223
|
+
```
|
|
224
|
+
1.0.7
|
|
225
|
+
1. 融云聊天功能剔除已读消息
|
|
209
226
|
```
|
package/package.json
CHANGED
package/src/common/common.js
CHANGED
|
@@ -66,7 +66,7 @@ common.getObject = (url, obj = ask) => {
|
|
|
66
66
|
|
|
67
67
|
*/
|
|
68
68
|
common.saveData = (that, url, query, ref, callBack) => {
|
|
69
|
-
let newQuery = query ? query : that.postForm;
|
|
69
|
+
let newQuery = query ? query : JSON.parse(JSON.stringify(that.postForm)); // 深拷贝, 避免影响页面显示
|
|
70
70
|
if(ref === false) {
|
|
71
71
|
common.handleData(that, url, newQuery, callBack)
|
|
72
72
|
} else {
|
|
@@ -363,4 +363,31 @@ common.requiredList = (list) => {
|
|
|
363
363
|
return obj
|
|
364
364
|
}
|
|
365
365
|
|
|
366
|
+
/**
|
|
367
|
+
* 格式化数据样式
|
|
368
|
+
* @param {*} value 值
|
|
369
|
+
* @param {*} type 要格式化的类型 [date, price]
|
|
370
|
+
* @returns
|
|
371
|
+
*/
|
|
372
|
+
common.format = (value, type="date") => {
|
|
373
|
+
switch (type) {
|
|
374
|
+
case 'date':
|
|
375
|
+
if(value) return value.replace("T", ' ').substr(0, 19)
|
|
376
|
+
else return ''
|
|
377
|
+
break;
|
|
378
|
+
case 'price':
|
|
379
|
+
if(typeof(value) === 'number') {
|
|
380
|
+
return value.toFixed(2).toString().replace(/,/g,'').replace(/\d+/, function (n) { // 先提取整数部分
|
|
381
|
+
return n.replace(/(\d)(?=(\d{3})+$)/g, function ($1) { // 对整数部分添加分隔符
|
|
382
|
+
return $1 + ",";
|
|
383
|
+
});
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
else return ''
|
|
387
|
+
break;
|
|
388
|
+
default:
|
|
389
|
+
break;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
366
393
|
export default common
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
<div class="t-table">
|
|
13
13
|
<el-table v-if="query.data && query.data.data && query.data.data.length > 0" ref="table" size="mini"
|
|
14
|
-
:data="query.data.data" style="width: 100%" :height="'100%'" :show-summary="showSummary" border fit
|
|
14
|
+
:data="query.data.data" style="width: 100%" :height="'100%'" :show-summary="showSummary || query.report.totalCol == 2" border fit
|
|
15
15
|
highlight-current-row :row-class-name="rowClassName" @selection-change="handleSelectionChange"
|
|
16
16
|
@sort-change="customSortChange">
|
|
17
17
|
<!--:fixed="idx==0"-->
|
|
@@ -58,7 +58,7 @@ export default {
|
|
|
58
58
|
let messages = result.messageList;
|
|
59
59
|
let hasMore = result.hasMore;
|
|
60
60
|
this.hasMore = hasMore
|
|
61
|
-
let messageList = messages.concat(this.messageList);
|
|
61
|
+
let messageList = messages.concat(this.messageList).filter(item => item.messageType !== 'RC:ReadNtf'); // 过滤 已读标识消息
|
|
62
62
|
console.log('messageList', messageList)
|
|
63
63
|
|
|
64
64
|
let toView = '';
|
package/src/styles/index.scss
CHANGED
package/src/styles/table.scss
CHANGED
|
@@ -81,11 +81,10 @@ tbody td .cell img {
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
|
|
85
|
-
.el-radio-group {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
84
|
+
//影响全局的样式, 单项目里自行调整
|
|
85
|
+
// .el-radio-group {
|
|
86
|
+
// margin-top: 13px;
|
|
87
|
+
// >div {
|
|
88
|
+
// margin-right: 30px;
|
|
89
|
+
// }
|
|
90
|
+
// }
|
|
@@ -4,10 +4,7 @@ import { setToken } from "@/utils/auth"; // get token from cookie
|
|
|
4
4
|
import { getQuery } from "@/common/utils";
|
|
5
5
|
import { getConfig } from "@/utils/global-config";
|
|
6
6
|
import { setLocalStorage } from "@utils/localStorage";
|
|
7
|
-
// TODO moduleConfig
|
|
8
|
-
import { main } from "@/utils/getMenu";
|
|
9
7
|
const endTimestamp = new Date(new Date().toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1;
|
|
10
|
-
|
|
11
8
|
export default {
|
|
12
9
|
mounted() {
|
|
13
10
|
if (getConfig("ID4_LOGINTYPE")) {
|
|
@@ -22,7 +19,6 @@ export default {
|
|
|
22
19
|
sessionStorage.setItem("token", user.access_token);
|
|
23
20
|
sessionStorage.setItem("iframeAuthExpireTime", endTimestamp);
|
|
24
21
|
var redic_url = getQuery(window.location.href, "redic_url");
|
|
25
|
-
main();
|
|
26
22
|
that.$router.push(
|
|
27
23
|
redic_url ? decodeURIComponent(redic_url).substr(1) : `/`
|
|
28
24
|
);
|