n20-common-lib 3.0.36 → 3.0.38
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/nstc-g6/components/Form/CheckboxCustom/index.vue +1 -1
- package/nstc-g6/components/NstcConfirm/NstcConfirm.vue +5 -5
- package/nstc-g6/components/NstcFileUpload/NstcFileUpload.vue +1 -1
- package/nstc-g6/components/NstcForm/CheckboxCustom/index.vue +1 -1
- package/package.json +3 -3
- package/src/assets/css/_coreLib.scss +4 -1
- package/src/assets/css/button.scss +8 -19
- package/src/assets/css/element-variables.scss +53 -27
- package/src/assets/css/file-upload-table.scss +35 -9
- package/src/assets/css/filter.scss +1 -1
- package/src/assets/css/layout-aside.scss +3 -9
- package/src/assets/css/layout-content.scss +1 -0
- package/src/assets/css/layout.scss +5 -5
- package/src/{components/PageHeader/style.scss → assets/css/page-header.scss} +22 -7
- package/src/assets/css/page.scss +12 -0
- package/src/assets/css/pagination.scss +75 -17
- package/src/assets/css/rootvar.scss +1 -0
- package/src/assets/css/secondary-tab.scss +60 -43
- package/src/assets/css/table.scss +165 -19
- package/src/assets/css/tabs.scss +68 -0
- package/src/components/FileUploadTable/FileUploadTableV3.vue +79 -7
- package/src/components/FileUploadTable/Png.svg +34 -0
- package/src/components/FileUploadTable/Txt.svg +29 -0
- package/src/components/FileUploadTable/Zip.svg +21 -0
- package/src/components/FileUploadTable/aiCheckDialog.vue +3 -3
- package/src/components/FileUploadTable/not.svg +29 -0
- package/src/components/PageHeader/index.vue +11 -6
- package/src/components/PageLayout/page.vue +15 -3
- package/src/components/Pagination/index.vue +7 -4
- package/src/components/Pagination/main.vue +113 -0
- package/src/components/ProFilterView/advancedQuery.vue +32 -28
- package/src/components/ProFilterView/index.vue +49 -26
- package/src/components/SecondaryTab/index.vue +45 -34
- package/src/components/ShowColumn/index.vue +14 -4
- package/src/components/TableOperate/index.vue +101 -0
- package/src/components/TablePro/index.vue +171 -95
- package/src/components/TableSetSize/index.vue +3 -3
- package/src/components/TableSetSize/index1.vue +82 -0
- package/src/components/Tabs/index.vue +64 -0
- package/src/index.js +4 -1
- package/style/index.css +1 -3
- package/theme/blue.css +1 -3
- package/theme/cctcRed.css +1 -3
- package/theme/green.css +1 -3
- package/theme/lightBlue.css +1 -3
- package/theme/orange.css +1 -3
- package/theme/purple.css +1 -3
- package/theme/red.css +1 -3
- package/theme/yellow.css +1 -3
- package/src/components/TableSetSize/index copy.vue +0 -69
- package/src/components/TableSetSize/style.scss +0 -81
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
trigger="click"
|
|
10
10
|
class="m-r"
|
|
11
11
|
>
|
|
12
|
-
<el-button slot="reference" class="botton" :class="{ activiti: selectedItem !== '
|
|
12
|
+
<el-button slot="reference" class="botton" :class="{ activiti: selectedItem !== '无视图' }">
|
|
13
13
|
<div class="flex-box flex-v m-r">
|
|
14
14
|
<i class="v3-icon-inbox"></i>
|
|
15
15
|
<div class="popover-title" style="margin: 0 8px" :title="selectedItem">{{ selectedItem }}</div>
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
}}</span>
|
|
29
29
|
<i v-if="selectedItem === item.viewName" class="el-icon-check selected-icon"></i>
|
|
30
30
|
<el-dropdown
|
|
31
|
-
v-if="selectedItem !== item.viewName && item.viewName !== '
|
|
31
|
+
v-if="selectedItem !== item.viewName && item.viewName !== '无视图'"
|
|
32
32
|
trigger="click"
|
|
33
33
|
class="proFilterView-list-item__more"
|
|
34
34
|
@command="(command) => handleCommand(command, item)"
|
|
@@ -206,8 +206,8 @@ export default {
|
|
|
206
206
|
data() {
|
|
207
207
|
return {
|
|
208
208
|
val: '',
|
|
209
|
-
list: ['
|
|
210
|
-
selectedItem: '
|
|
209
|
+
list: ['无视图'],
|
|
210
|
+
selectedItem: '无视图', // 默认选中第一项
|
|
211
211
|
stVisible: false,
|
|
212
212
|
visible: false,
|
|
213
213
|
isAdd: false,
|
|
@@ -322,7 +322,7 @@ export default {
|
|
|
322
322
|
})
|
|
323
323
|
this.list = [
|
|
324
324
|
{
|
|
325
|
-
viewName: '
|
|
325
|
+
viewName: '无视图'
|
|
326
326
|
},
|
|
327
327
|
...list
|
|
328
328
|
]
|
|
@@ -337,7 +337,7 @@ export default {
|
|
|
337
337
|
.catch((err) => {
|
|
338
338
|
this.list = [
|
|
339
339
|
{
|
|
340
|
-
viewName: '
|
|
340
|
+
viewName: '无视图'
|
|
341
341
|
}
|
|
342
342
|
]
|
|
343
343
|
})
|
|
@@ -382,6 +382,7 @@ export default {
|
|
|
382
382
|
} else {
|
|
383
383
|
const parsed = JSON.parse(item.viewConfig || '{}')
|
|
384
384
|
this.conditionGroups = parsed.conditionGroups || []
|
|
385
|
+
|
|
385
386
|
this._savedViewConfigs['1'] = { conditionGroups: this.conditionGroups }
|
|
386
387
|
}
|
|
387
388
|
},
|
|
@@ -402,29 +403,51 @@ export default {
|
|
|
402
403
|
viewConfig = JSON.stringify({ conditionGroups: this.conditionGroups })
|
|
403
404
|
keyIds = []
|
|
404
405
|
}
|
|
406
|
+
console.log(this.conditionGroups)
|
|
405
407
|
this.form.viewConfig = viewConfig
|
|
406
|
-
|
|
407
|
-
|
|
408
|
+
|
|
409
|
+
const hasEmptyValue = this.conditionGroups.some((group) =>
|
|
410
|
+
group.conditions.some((condition) => {
|
|
411
|
+
const val = condition.value
|
|
412
|
+
return val === null || val === undefined || val === '' || (Array.isArray(val) && val.length === 0)
|
|
413
|
+
})
|
|
414
|
+
)
|
|
415
|
+
|
|
416
|
+
this.$refs.form.validate(async (valid) => {
|
|
417
|
+
if (!valid) {
|
|
408
418
|
this.$message.error('请输入视图名称')
|
|
409
|
-
return
|
|
419
|
+
return
|
|
410
420
|
}
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
viewType: this.form.viewType,
|
|
416
|
-
bussId: this.bussId,
|
|
417
|
-
viewConfig: this.form.viewConfig,
|
|
418
|
-
keyIds: JSON.stringify(keyIds),
|
|
419
|
-
viewId: this.viewId
|
|
420
|
-
}
|
|
421
|
-
axios.post('/bems/query/viewColumn/saveOrUpdateViewInfo', obj).then((res) => {
|
|
422
|
-
if (res.code !== 200) {
|
|
423
|
-
return false
|
|
421
|
+
|
|
422
|
+
if (this.form.viewType === '0' && !keyIds.length) {
|
|
423
|
+
this.$message.warning('至少添加一个条件')
|
|
424
|
+
return
|
|
424
425
|
}
|
|
425
|
-
this.
|
|
426
|
-
|
|
427
|
-
|
|
426
|
+
if (this.form.viewType === '1') {
|
|
427
|
+
if (!this.conditionGroups.length || hasEmptyValue) {
|
|
428
|
+
this.$message.warning('至少添加一个条件')
|
|
429
|
+
return
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
// 保存筛选视图
|
|
434
|
+
const obj = {
|
|
435
|
+
viewName: this.form.viewName,
|
|
436
|
+
viewType: this.form.viewType,
|
|
437
|
+
bussId: this.bussId,
|
|
438
|
+
viewConfig: this.form.viewConfig,
|
|
439
|
+
keyIds: JSON.stringify(keyIds),
|
|
440
|
+
viewId: this.viewId
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
axios.post('/bems/query/viewColumn/saveOrUpdateViewInfo', obj).then((res) => {
|
|
444
|
+
if (res.code !== 200) {
|
|
445
|
+
return false
|
|
446
|
+
}
|
|
447
|
+
this.visible = false
|
|
448
|
+
this.$message.success('保存成功')
|
|
449
|
+
this.getFilterList(this.viewId)
|
|
450
|
+
})
|
|
428
451
|
})
|
|
429
452
|
},
|
|
430
453
|
// 删除
|
|
@@ -448,7 +471,7 @@ export default {
|
|
|
448
471
|
this.stVisible = false
|
|
449
472
|
this.selectItem = item
|
|
450
473
|
this.selectedItem = item.viewName
|
|
451
|
-
if (item.viewName === '
|
|
474
|
+
if (item.viewName === '无视图') {
|
|
452
475
|
this.selectItem = ''
|
|
453
476
|
this.searchValue = {}
|
|
454
477
|
this.conditionGroups = []
|
|
@@ -1,31 +1,43 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
<div class="
|
|
4
|
-
|
|
5
|
-
<div v-else-if="data.length === 1" class="n20-secondary-tab m-b-s">
|
|
6
|
-
<div class="el-tabs__item is-active">
|
|
7
|
-
<span v-if="data[0].icon" :class="data[0].icon"></span>
|
|
8
|
-
<sup v-if="data[0].badge" class="el-tabs__item-badge"></sup>
|
|
9
|
-
{{ data[0].name }}
|
|
2
|
+
<div class="n20-secondary-tab__wrapper">
|
|
3
|
+
<div v-if="data.length === 0" class="n20-secondary-tab m-b-s">
|
|
4
|
+
<div class="el-tabs__item is-active">{{ init }}</div>
|
|
10
5
|
</div>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
6
|
+
<div v-else-if="data.length === 1" class="n20-secondary-tab m-b-s">
|
|
7
|
+
<div class="el-tabs__item is-active">
|
|
8
|
+
<span v-if="data[0].icon" :class="data[0].icon"></span>
|
|
9
|
+
<sup v-if="data[0].badge" class="el-tabs__item-badge"></sup>
|
|
10
|
+
{{ data[0].name }}
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
<el-tabs
|
|
14
|
+
v-else
|
|
15
|
+
:value="init"
|
|
16
|
+
:class="classes"
|
|
17
|
+
:tabPosition="tabPosition"
|
|
18
|
+
:before-leave="beforeFn"
|
|
19
|
+
@tab-click="clickFn"
|
|
20
20
|
>
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
<el-tab-pane
|
|
22
|
+
v-for="item of data"
|
|
23
|
+
:key="item.name"
|
|
24
|
+
:tab-info="item"
|
|
25
|
+
:name="item.name"
|
|
26
|
+
:icon="item.icon"
|
|
27
|
+
:disabled="item.disabled"
|
|
28
|
+
>
|
|
29
|
+
<template slot="label">
|
|
30
|
+
<span v-if="item.icon" :class="item.icon"></span>
|
|
31
|
+
<sup v-if="item.badge" class="el-tabs__item-badge"></sup>
|
|
32
|
+
<span v-if="item.content" v-title="`${item.content}`"> {{ item.name }}</span>
|
|
33
|
+
<span v-else>{{ item.name }}</span>
|
|
34
|
+
</template>
|
|
35
|
+
</el-tab-pane>
|
|
36
|
+
</el-tabs>
|
|
37
|
+
<div class="n20-secondary-tab__right">
|
|
38
|
+
<slot></slot>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
29
41
|
</template>
|
|
30
42
|
|
|
31
43
|
<script>
|
|
@@ -51,10 +63,9 @@ export default {
|
|
|
51
63
|
}
|
|
52
64
|
},
|
|
53
65
|
computed: {
|
|
54
|
-
classes(){
|
|
66
|
+
classes() {
|
|
55
67
|
return {
|
|
56
68
|
'n20-secondary-tab': true,
|
|
57
|
-
'm-b-s': this.tabPosition == 'top',
|
|
58
69
|
'left-css': this.tabPosition == 'left'
|
|
59
70
|
}
|
|
60
71
|
}
|
|
@@ -106,17 +117,17 @@ export default {
|
|
|
106
117
|
.tooltip.show {
|
|
107
118
|
opacity: 1;
|
|
108
119
|
}
|
|
109
|
-
.left-css .el-tabs__item.is-active:after{
|
|
120
|
+
.left-css .el-tabs__item.is-active:after {
|
|
110
121
|
width: 2px;
|
|
111
|
-
height: 20px!important;
|
|
112
|
-
margin-top: -22px!important;
|
|
122
|
+
height: 20px !important;
|
|
123
|
+
margin-top: -22px !important;
|
|
113
124
|
margin-left: -10px;
|
|
114
125
|
}
|
|
115
126
|
.left-css .el-tabs__item.is-left {
|
|
116
|
-
text-align: left!important;
|
|
127
|
+
text-align: left !important;
|
|
117
128
|
}
|
|
118
|
-
.left-css .el-tabs__header.is-left{
|
|
119
|
-
margin-right: 0!important;
|
|
120
|
-
margin-left: 10px!important;
|
|
129
|
+
.left-css .el-tabs__header.is-left {
|
|
130
|
+
margin-right: 0 !important;
|
|
131
|
+
margin-left: 10px !important;
|
|
121
132
|
}
|
|
122
133
|
</style>
|
|
@@ -641,19 +641,29 @@ export default {
|
|
|
641
641
|
function saveTransform(list, labelKey, isFilter) {
|
|
642
642
|
let listN = []
|
|
643
643
|
if (!isFilter) {
|
|
644
|
+
// 遍历列配置列表,将每列转换为存储格式
|
|
644
645
|
list.forEach((c) => {
|
|
646
|
+
// 普通列:有prop属性、无子列、非新增列、无宽度设置
|
|
645
647
|
if (c.prop && !c.children && !c.isNew && !c.width & !c.isNew) {
|
|
646
648
|
listN.push({ _colKey: 'prop', _colVal: c.prop })
|
|
647
|
-
}
|
|
649
|
+
}
|
|
650
|
+
// 特殊类型列:多选/序号/展开列
|
|
651
|
+
else if (c.type && ['selection', 'index', 'expand'].includes(c.type)) {
|
|
648
652
|
listN.push({ _colKey: 'type', _colVal: c.type })
|
|
649
|
-
}
|
|
653
|
+
}
|
|
654
|
+
// 其他列:包含函数或需要完整保留的列
|
|
655
|
+
else {
|
|
650
656
|
let sFn = false
|
|
657
|
+
// 检查列配置中是否包含函数类型的属性
|
|
651
658
|
for (let k in c) {
|
|
652
659
|
if (typeof c[k] === 'function') sFn = true
|
|
653
660
|
}
|
|
661
|
+
// 包含函数且有标签的列,使用标签作为标识存储
|
|
654
662
|
if (sFn && c[labelKey]) {
|
|
655
|
-
listN.push({ _colKey: labelKey, _colVal: c[labelKey] })
|
|
656
|
-
}
|
|
663
|
+
listN.push({ _colKey: labelKey, _colVal: c[labelKey], ...c })
|
|
664
|
+
}
|
|
665
|
+
// 其他情况直接存储完整列配置
|
|
666
|
+
else {
|
|
657
667
|
listN.push(c)
|
|
658
668
|
}
|
|
659
669
|
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="el-table-set-size flex-box">
|
|
3
|
+
<div class="el-table-set-size-item m-r-0">
|
|
4
|
+
<i
|
|
5
|
+
v-title="$lc('设置显示列')"
|
|
6
|
+
class="v3-icon-system-solution pointer color-white"
|
|
7
|
+
:class="hoverIconKey === 'showColumn' ? 'color-white' : ''"
|
|
8
|
+
@mouseenter="hoverIconKey = 'showColumn'"
|
|
9
|
+
@mouseleave="hoverIconKey = null"
|
|
10
|
+
@click="$emit('visible-column')"
|
|
11
|
+
></i>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="el-table-set-size-item m-r-0">
|
|
14
|
+
<el-dropdown @command="setSize">
|
|
15
|
+
<i
|
|
16
|
+
v-title="$lc('行高')"
|
|
17
|
+
class="v3-icon-line-height pointer color-white"
|
|
18
|
+
:class="hoverIconKey === 'height' ? 'color-white' : ''"
|
|
19
|
+
@mouseenter="hoverIconKey = 'height'"
|
|
20
|
+
@mouseleave="hoverIconKey = null"
|
|
21
|
+
></i>
|
|
22
|
+
<el-dropdown-menu slot="dropdown">
|
|
23
|
+
<el-dropdown-item command="small">{{ _lang === 'zh' ? '默认' : 'small' }}</el-dropdown-item>
|
|
24
|
+
<el-dropdown-item command="mini">{{ _lang === 'zh' ? '紧凑' : 'mini' }}</el-dropdown-item>
|
|
25
|
+
</el-dropdown-menu>
|
|
26
|
+
</el-dropdown>
|
|
27
|
+
</div>
|
|
28
|
+
<div class="el-table-set-size-item m-r-0">
|
|
29
|
+
<i
|
|
30
|
+
v-title="!isExpand ? $lc('展开分组') : $lc('折叠分组')"
|
|
31
|
+
class="pointer"
|
|
32
|
+
:class="[
|
|
33
|
+
isExpand ? 'v3-icon-group-collapse' : 'v3-icon-group-expand',
|
|
34
|
+
hoverIconKey === 'toggleExpand' ? 'color-white' : ''
|
|
35
|
+
]"
|
|
36
|
+
@mouseenter="hoverIconKey = 'toggleExpand'"
|
|
37
|
+
@mouseleave="hoverIconKey = null"
|
|
38
|
+
@click="$emit('toggle-expand')"
|
|
39
|
+
></i>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<script>
|
|
45
|
+
export default {
|
|
46
|
+
name: 'TableOperate',
|
|
47
|
+
props: {
|
|
48
|
+
size: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: 'small'
|
|
51
|
+
},
|
|
52
|
+
mini: {
|
|
53
|
+
type: Object,
|
|
54
|
+
default: () => ({
|
|
55
|
+
border: false,
|
|
56
|
+
size: 'mini',
|
|
57
|
+
stripe: true
|
|
58
|
+
})
|
|
59
|
+
},
|
|
60
|
+
small: {
|
|
61
|
+
type: Object,
|
|
62
|
+
default: () => ({
|
|
63
|
+
border: false,
|
|
64
|
+
size: 'small',
|
|
65
|
+
stripe: false
|
|
66
|
+
})
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
data() {
|
|
70
|
+
let _this = this
|
|
71
|
+
return {
|
|
72
|
+
isExpand: false,
|
|
73
|
+
hoverIconKey: null, // 当前悬停的静态列头图标标识
|
|
74
|
+
sizeC: localStorage.getItem('table-size') || _this.size
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
watch: {
|
|
78
|
+
size() {
|
|
79
|
+
this.setSize(localStorage.getItem('table-size') || this.size, 'pasv')
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
created() {
|
|
83
|
+
this.setSize(localStorage.getItem('table-size') || this.size, 'pasv')
|
|
84
|
+
},
|
|
85
|
+
methods: {
|
|
86
|
+
setSize(type, t) {
|
|
87
|
+
this.sizeC = type
|
|
88
|
+
localStorage.setItem('table-size', type)
|
|
89
|
+
if (type === 'mini') {
|
|
90
|
+
this.$emit('resize', this.mini)
|
|
91
|
+
} else if (type === 'small') {
|
|
92
|
+
this.$emit('resize', this.small)
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if (t !== 'pasv') {
|
|
96
|
+
this.$emit('update:size', localStorage.getItem('table-size') || type)
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
</script>
|