n20-project-component 1.0.10 → 1.0.11
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/dist/n20-project-component.common.js +87 -78
- package/dist/n20-project-component.css +1 -1
- package/dist/n20-project-component.umd.js +87 -78
- package/dist/n20-project-component.umd.min.js +4 -4
- package/package.json +1 -1
- package/src/components/ProFilterView/AdvancedFilter/index.vue +0 -2
- package/src/components/ProFilterView/index.vue +27 -16
- package/src/components/ProFilterView/style/iconfont.css +17 -6
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<slot name="leftContent"></slot>
|
|
5
5
|
<div class="flex-box flex-v">
|
|
6
6
|
<el-popover
|
|
7
|
-
v-if="
|
|
7
|
+
v-if="_bussId"
|
|
8
8
|
ref="viewPopover"
|
|
9
9
|
v-model="viewPopoverVisible"
|
|
10
10
|
popper-class="pro-filter-view-popover"
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
</div>
|
|
54
54
|
</div>
|
|
55
55
|
</el-popover>
|
|
56
|
-
<el-button v-if="
|
|
56
|
+
<el-button v-if="_bussId && selectItem" class="activiti m-l-s" @click="edit(selectItem, true)">
|
|
57
57
|
<div class="flex-box flex-v">
|
|
58
58
|
<i class="v3-icon-find"></i>
|
|
59
59
|
<div style="margin-left: 8px">
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
:class="{ 'is-hidden': !filterExpanded }"
|
|
75
75
|
:visible.sync="filterExpanded"
|
|
76
76
|
:filter-id="filterId"
|
|
77
|
-
:buss-id="
|
|
77
|
+
:buss-id="_bussId"
|
|
78
78
|
:model="searchValue"
|
|
79
79
|
:filter-list="filterList"
|
|
80
80
|
:filter-readonly="!!selectItem"
|
|
@@ -185,6 +185,10 @@ export default {
|
|
|
185
185
|
type: String,
|
|
186
186
|
default: '',
|
|
187
187
|
},
|
|
188
|
+
isDiffByUser: {
|
|
189
|
+
type: Boolean,
|
|
190
|
+
default: true,
|
|
191
|
+
},
|
|
188
192
|
filterId: {
|
|
189
193
|
type: String,
|
|
190
194
|
default: '',
|
|
@@ -223,9 +227,14 @@ export default {
|
|
|
223
227
|
searchValue: {},
|
|
224
228
|
viewId: undefined,
|
|
225
229
|
isRefresh: false,
|
|
230
|
+
noneViewSearchValue: {}, // 无视图时的筛选值
|
|
226
231
|
};
|
|
227
232
|
},
|
|
228
233
|
computed: {
|
|
234
|
+
_bussId() {
|
|
235
|
+
const userNo = sessionStorage.getItem('userNo');
|
|
236
|
+
return this.bussId ? (this.isDiffByUser ? this.bussId + '_' + userNo : this.bussId) : '';
|
|
237
|
+
},
|
|
229
238
|
/**
|
|
230
239
|
* 本地搜索过滤视图列表
|
|
231
240
|
* @returns {Array} 根据 searchKeyword 过滤后的视图列表;searchKeyword 为空时返回完整列表
|
|
@@ -305,8 +314,8 @@ export default {
|
|
|
305
314
|
},
|
|
306
315
|
},
|
|
307
316
|
mounted() {
|
|
308
|
-
// 只有在有
|
|
309
|
-
if (this.
|
|
317
|
+
// 只有在有 _bussId 时才获取视图列表
|
|
318
|
+
if (this._bussId) {
|
|
310
319
|
this.getFilterList();
|
|
311
320
|
}
|
|
312
321
|
// 合并初始筛选值:slot 字段使用默认值,其他字段使用 initialValue 传入的值
|
|
@@ -409,15 +418,15 @@ export default {
|
|
|
409
418
|
'clear',
|
|
410
419
|
);
|
|
411
420
|
},
|
|
412
|
-
// 通过
|
|
421
|
+
// 通过_bussId拿取视图列表
|
|
413
422
|
getFilterList(viewId) {
|
|
414
|
-
// 如果没有
|
|
415
|
-
if (!this.
|
|
423
|
+
// 如果没有 _bussId,不获取视图列表
|
|
424
|
+
if (!this._bussId) {
|
|
416
425
|
return;
|
|
417
426
|
}
|
|
418
427
|
|
|
419
428
|
axios
|
|
420
|
-
.get(`/bems/query/viewColumn/getViewInfo`, { bussId: this.
|
|
429
|
+
.get(`/bems/query/viewColumn/getViewInfo`, { bussId: this._bussId })
|
|
421
430
|
.then(res => {
|
|
422
431
|
const list = (res.data || []).map(item => {
|
|
423
432
|
item.keyIds = this.safeParse(item.keyIds, []);
|
|
@@ -470,8 +479,7 @@ export default {
|
|
|
470
479
|
this.visible = true;
|
|
471
480
|
this.isAdd = false;
|
|
472
481
|
this.dialogFilterKey++;
|
|
473
|
-
|
|
474
|
-
|
|
482
|
+
|
|
475
483
|
// 浅拷贝,避免修改 form 时污染原始 item
|
|
476
484
|
this.form = { ...item };
|
|
477
485
|
this.viewId = item.viewId;
|
|
@@ -493,7 +501,7 @@ export default {
|
|
|
493
501
|
},
|
|
494
502
|
// 保存视图
|
|
495
503
|
saveSt() {
|
|
496
|
-
if (!this.
|
|
504
|
+
if (!this._bussId) {
|
|
497
505
|
this.$message.warning('缺少业务ID,无法保存视图');
|
|
498
506
|
return;
|
|
499
507
|
}
|
|
@@ -517,7 +525,7 @@ export default {
|
|
|
517
525
|
const obj = {
|
|
518
526
|
viewName: this.form.viewName,
|
|
519
527
|
viewType: '0',
|
|
520
|
-
bussId: this.
|
|
528
|
+
bussId: this._bussId,
|
|
521
529
|
viewConfig: this.form.viewConfig,
|
|
522
530
|
keyIds: JSON.stringify(keyIds),
|
|
523
531
|
viewId: this.viewId,
|
|
@@ -550,14 +558,17 @@ export default {
|
|
|
550
558
|
},
|
|
551
559
|
// 选中视图
|
|
552
560
|
handleSelect(item) {
|
|
553
|
-
|
|
554
|
-
|
|
561
|
+
// 上一个选中的是“无视图”
|
|
562
|
+
if (!this.selectItem.viewId) {
|
|
563
|
+
this.noneViewSearchValue = JSON.parse(JSON.stringify(this.searchValue || {}));
|
|
564
|
+
}
|
|
565
|
+
|
|
555
566
|
this.viewPopoverVisible = false;
|
|
556
567
|
this.selectItem = item;
|
|
557
568
|
this.selectedItem = item.viewName;
|
|
558
569
|
if (!item.viewId) {
|
|
559
570
|
this.selectItem = '';
|
|
560
|
-
this.searchValue = { ...this.
|
|
571
|
+
this.searchValue = { ...this.noneViewSearchValue };
|
|
561
572
|
// 无视图时恢复原来的筛选逻辑
|
|
562
573
|
this.$nextTick(() => {
|
|
563
574
|
const filterRef = this.$refs.filter;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
url('./v3-iconfont.ttf') format('truetype');
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
/* n20
|
|
11
|
+
/* n20 系列图标字体(独立字体文件,与 n20-common-lib 的 core-lib-iconfont 不同,不冲突) */
|
|
12
12
|
@font-face {
|
|
13
13
|
font-family: "n20-iconfont";
|
|
14
14
|
src: url('./n20-iconfont.woff2') format('woff2'),
|
|
@@ -50,12 +50,23 @@
|
|
|
50
50
|
content: "\e6f4";
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
.v3-icon-plus:before {
|
|
54
|
+
content: "\e6eb";
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.v3-icon-delete:before {
|
|
58
|
+
content: "\e6ec";
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.v3-icon-search:before {
|
|
62
|
+
content: "\e6de";
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.v3-icon-folder-add:before {
|
|
66
|
+
content: "\e775";
|
|
67
|
+
}
|
|
68
|
+
|
|
53
69
|
/* ProFilterView 使用的 n20 系列图标 */
|
|
54
70
|
.n20-icon-xiala-moren:before {
|
|
55
71
|
content: "\e66c";
|
|
56
72
|
}
|
|
57
|
-
|
|
58
|
-
/* Element UI 图标 (el-icon-check) */
|
|
59
|
-
/* .el-icon-check:before {
|
|
60
|
-
content: "\e611";
|
|
61
|
-
} */
|