cnhis-design-vue 2.2.1 → 2.2.3

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.
Files changed (110) hide show
  1. package/CHANGELOG.md +40 -25
  2. package/es/affix/index.js +8 -8
  3. package/es/age/index.js +10 -10
  4. package/es/alert/index.js +8 -8
  5. package/es/anchor/index.js +8 -8
  6. package/es/auto-complete/index.js +8 -8
  7. package/es/avatar/index.js +8 -8
  8. package/es/back-top/index.js +8 -8
  9. package/es/badge/index.js +8 -8
  10. package/es/base/index.js +8 -8
  11. package/es/big-table/index.js +1227 -363
  12. package/es/big-table/style.css +1 -1
  13. package/es/breadcrumb/index.js +8 -8
  14. package/es/button/index.js +33 -33
  15. package/es/calendar/index.js +8 -8
  16. package/es/captcha/index.js +3 -3
  17. package/es/card/index.js +8 -8
  18. package/es/card-reader-sdk/index.js +1 -1
  19. package/es/carousel/index.js +8 -8
  20. package/es/cascader/index.js +8 -8
  21. package/es/checkbox/index.js +9 -9
  22. package/es/col/index.js +8 -8
  23. package/es/collapse/index.js +8 -8
  24. package/es/color-picker/index.js +1 -1
  25. package/es/comment/index.js +8 -8
  26. package/es/config-provider/index.js +8 -8
  27. package/es/date-picker/index.js +8 -8
  28. package/es/descriptions/index.js +8 -8
  29. package/es/direct/index.js +16 -16
  30. package/es/divider/index.js +8 -8
  31. package/es/drag-layout/index.js +3 -3
  32. package/es/drawer/index.js +8 -8
  33. package/es/dropdown/index.js +8 -8
  34. package/es/editor/index.js +1 -1
  35. package/es/ellipsis/index.js +1 -1
  36. package/es/empty/index.js +8 -8
  37. package/es/fabric-chart/index.js +9 -9
  38. package/es/form/index.js +8 -8
  39. package/es/form-model/index.js +8 -8
  40. package/es/form-table/index.js +74 -74
  41. package/es/full-calendar/index.js +4 -4
  42. package/es/index/index.js +1718 -942
  43. package/es/index/style.css +1 -1
  44. package/es/input/index.js +9 -9
  45. package/es/input-number/index.js +8 -8
  46. package/es/layout/index.js +8 -8
  47. package/es/list/index.js +8 -8
  48. package/es/locale-provider/index.js +8 -8
  49. package/es/map/index.js +9 -9
  50. package/es/mentions/index.js +8 -8
  51. package/es/menu/index.js +8 -8
  52. package/es/message/index.js +8 -8
  53. package/es/multi-chat/index.js +76 -76
  54. package/es/multi-chat-client/index.js +70 -70
  55. package/es/multi-chat-history/index.js +4 -4
  56. package/es/multi-chat-record/index.js +14 -14
  57. package/es/multi-chat-setting/index.js +22 -22
  58. package/es/multi-chat-sip/index.js +1 -1
  59. package/es/notification/index.js +8 -8
  60. package/es/page-header/index.js +8 -8
  61. package/es/pagination/index.js +8 -8
  62. package/es/popconfirm/index.js +8 -8
  63. package/es/popover/index.js +8 -8
  64. package/es/progress/index.js +8 -8
  65. package/es/radio/index.js +9 -9
  66. package/es/rate/index.js +8 -8
  67. package/es/result/index.js +8 -8
  68. package/es/row/index.js +8 -8
  69. package/es/scale-container/index.js +9 -9
  70. package/es/scale-view/index.js +27 -27
  71. package/es/select/index.js +190 -13
  72. package/es/select-label/index.js +11 -11
  73. package/es/select-person/index.js +100 -94
  74. package/es/select-person/style.css +1 -1
  75. package/es/select-tag/index.js +4 -4
  76. package/es/shortcut-setter/index.js +10 -10
  77. package/es/skeleton/index.js +8 -8
  78. package/es/slider/index.js +8 -8
  79. package/es/slider-tree/index.js +9 -9
  80. package/es/space/index.js +8 -8
  81. package/es/spin/index.js +8 -8
  82. package/es/statistic/index.js +8 -8
  83. package/es/steps/index.js +8 -8
  84. package/es/switch/index.js +8 -8
  85. package/es/table-filter/index.js +281 -236
  86. package/es/table-filter/style.css +1 -1
  87. package/es/tabs/index.js +8 -8
  88. package/es/tag/index.js +9 -9
  89. package/es/time-picker/index.js +8 -8
  90. package/es/timeline/index.js +8 -8
  91. package/es/tooltip/index.js +8 -8
  92. package/es/transfer/index.js +8 -8
  93. package/es/tree/index.js +8 -8
  94. package/es/tree-select/index.js +8 -8
  95. package/es/upload/index.js +8 -8
  96. package/es/verification-code/index.js +2 -2
  97. package/lib/cui.common.js +1702 -943
  98. package/lib/cui.umd.js +1702 -943
  99. package/lib/cui.umd.min.js +26 -26
  100. package/package.json +1 -1
  101. package/packages/big-table/src/BigTable.vue +28 -83
  102. package/packages/big-table/src/assets/style/table-global.less +1 -155
  103. package/packages/big-table/src/components/HeaderFilter.vue +371 -0
  104. package/packages/big-table/src/utils/bigTableProps.js +2 -1
  105. package/packages/big-table/src/utils/headerFilter.js +183 -29
  106. package/packages/select/index.js +4 -1
  107. package/packages/select/src/PagerSelect/index.vue +92 -0
  108. package/packages/select-person/select-person.vue +12 -6
  109. package/packages/table-filter/src/mixins/wordBookutils.js +21 -4
  110. package/packages/table-filter/src/quick-search/QuickSearch.vue +4 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "2.2.1",
3
+ "version": "2.2.3",
4
4
  "description": "前端业务UI库",
5
5
  "keyword": "cnhis-design-vue vue cnhis",
6
6
  "homepage": "http://dv.cnhis.com/",
@@ -165,6 +165,7 @@ import batchEditing from './utils/batchEditing';
165
165
  import checkStrictly from './utils/checkStrictly';
166
166
  import headerFilter from './utils/headerFilter';
167
167
  import EditForm from './components/edit-form/EditForm.vue';
168
+ import HeaderFilter from './components/HeaderFilter.vue'
168
169
 
169
170
  import nestTable from './utils/nestTable';
170
171
  import eventBroadcast from './utils/eventBroadcast';
@@ -1522,7 +1523,8 @@ export default create({
1522
1523
  checkAll: false,
1523
1524
  searchFilterText: '',
1524
1525
  searchFilterCONVERT: [],
1525
- filterSort: ''
1526
+ filterSort: '',
1527
+ wordbookSearch: {...this.wordbookSearchDef}
1526
1528
  })
1527
1529
  );
1528
1530
  col.slots.header = this.formatterHeader(item);
@@ -1625,6 +1627,7 @@ export default create({
1625
1627
  setFilterStatus() {
1626
1628
  // 表头没有过滤字段 不需要设置
1627
1629
  if (!this.filterFields || !Object.keys(this.filterFields).length) return;
1630
+ this.filterCheckedOptionMap = {};
1628
1631
  let val = this.quickSearchConfig;
1629
1632
  if (!val || !val.length) {
1630
1633
  let keys = Object.keys(this.filterFields);
@@ -1647,9 +1650,17 @@ export default create({
1647
1650
  this.$set(this.filterFields[itemKey], 'CONVERT', []);
1648
1651
  return false;
1649
1652
  }
1653
+ let value = item.value;
1654
+ if (!this.isApiTable) {
1655
+ if(Array.isArray(value)&& value.length) {
1656
+ value = value.map(item => JSON.stringify(item))
1657
+ }
1658
+ if(value && typeof value === 'string' ) {
1659
+ value = value.includes('|#|') ? value.split('|#|') : [value]
1660
+ }
1661
+ }
1650
1662
 
1651
- let value = this.isApiTable ? item.value : item.value.map(item => JSON.stringify(item));
1652
- this.$set(this.filterFields[itemKey], 'CONVERT', value);
1663
+ this.$set(this.filterFields[itemKey], 'CONVERT', value || []);
1653
1664
  }
1654
1665
  });
1655
1666
  },
@@ -1730,86 +1741,20 @@ export default create({
1730
1741
  width: this.filterWidth + this.distance + 'px'
1731
1742
  }}
1732
1743
  >
1733
- <div class="sort-list" style={{ display: field.isSort ? 'block' : 'none' }}>
1734
- <div class={['sort-item', { active: field.filterSort === 'asc' }]} onClick={() => this.handlefilterBoxClickSort('asc', field)}>
1735
- <i class="sort-icon sort-icon-asc" />
1736
- <span class="sort-text">升序 A to Z</span>
1737
- </div>
1738
- <div class={['sort-item', { active: field.filterSort === 'desc' }]} onClick={() => this.handlefilterBoxClickSort('desc', field)}>
1739
- <i class="sort-icon sort-icon-asc" />
1740
- <span class="sort-text">降序 Z to A</span>
1741
- </div>
1742
- </div>
1743
-
1744
- <div class="filter-header">
1745
- <i class="filter-header-icon vxe-filter--btn vxe-icon--funnel" />
1746
- <span class="filter-header-text">筛选</span>
1747
- </div>
1748
-
1749
- {showfilterSearch ? (
1750
- <div class="checkbox-wrap checkbox-wrap--search">
1751
- <div class="check-search-wrap">
1752
- <a-input-search
1753
- placeholder="字段搜索"
1754
- class="check-seach-input"
1755
- allowClear={true}
1756
- onSearch={val => {
1757
- this.handleFilterSeachDebounce(val, item);
1758
- }}
1759
- />
1760
- </div>
1761
- </div>
1762
- ) : (
1763
- ''
1764
- )}
1765
- <div class="checkbox-box">
1766
- <div class="checkbox-wrap js-checkbox-wrap" style={{ height: this.filterHeight + this.distance + 'px' }}>
1767
- {showSelectAll && !field.searchFilterText ? (
1768
- <div class="ant-checkbox-group">
1769
- <a-checkbox
1770
- indeterminate={field.indeterminate}
1771
- checked={field.checkAll}
1772
- onChange={val => {
1773
- this.handleFilterChangeAll(val, field);
1774
- }}
1775
- >
1776
- 全选
1777
- </a-checkbox>
1778
- </div>
1779
- ) : (
1780
- ''
1781
- )}
1782
-
1783
- {!field.searchFilterText ? (
1784
- <a-checkbox-group options={filterOptions} value={field.CONVERT} onChange={val => this.handleFilterChange(val, item.columnName, field)} />
1785
- ) : (
1786
- <a-checkbox-group
1787
- options={field.filterSettingMap && field.filterSettingMap.filterOptions || []}
1788
- value={field.searchFilterCONVERT}
1789
- onChange={val => this.handleFilterSearchChange(val, item.columnName, field)}
1790
- />
1791
- )}
1792
- </div>
1793
- </div>
1794
-
1795
- <div class="checkbox-btn-wrap" style={{ justifyContent: field.CONVERT.length ? 'space-between' : 'flex-end' }}>
1796
- {field.CONVERT.length ? (
1797
- <div class="checkbox-btn-status">
1798
- <span>已选择{field.CONVERT.length}项</span>
1799
- <a-button class="checkbox-btn checkbox-btn-clear" type="link" onClick={() => this.handleFilterClearAll(field)}>
1800
- 清空
1801
- </a-button>
1802
- </div>
1803
- ) : null}
1804
- <div>
1805
- <a-button class="checkbox-btn" onClick={() => this.handleCancelFilter()}>
1806
- 取消
1807
- </a-button>
1808
- <a-button class="checkbox-btn" type="primary" onClick={() => this.handleFilter(field)}>
1809
- 确定
1810
- </a-button>
1811
- </div>
1812
- </div>
1744
+ <HeaderFilter
1745
+ field={field}
1746
+ cHeight={this.filterHeight + this.distance}
1747
+ handlefilterBoxClickSort={this.handlefilterBoxClickSort}
1748
+ handleFilterSeachDebounce={this.handleFilterSeachDebounce}
1749
+ handleFilterChangeAll={this.handleFilterChangeAll}
1750
+ handleFilterChange={this.handleFilterChange}
1751
+ handleFilterSearchChange={this.handleFilterSearchChange}
1752
+ handleFilterClearAll={this.handleFilterClearAll}
1753
+ handleCancelFilter={this.handleCancelFilter}
1754
+ handleFilter={this.handleFilter}
1755
+ >
1756
+ </HeaderFilter>
1757
+
1813
1758
  <div
1814
1759
  class="arrows-icon"
1815
1760
  onmousedown={e => {
@@ -2,170 +2,16 @@
2
2
  .big-table-filter-wrap {
3
3
  position: absolute;
4
4
  z-index: 99998;
5
- transform: translateX(-2%);
6
-
7
- // max-width: 400px;
8
5
  min-width: 280px;
6
+ min-height: 100px;
9
7
  border-radius: 4px;
10
8
  background-color: #fff;
11
- // border: 1px solid #dadce0;
12
9
  -webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
13
10
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
14
-
15
- display: flex;
16
- flex-wrap: wrap;
17
- flex-direction: column;
18
- overflow: hidden;
19
- transition: width 2s;
20
- padding-top: 8px;
21
- text-align: left;
22
- .sort-item {
23
- line-height: 32px;
24
- padding: 0 13px;
25
- display: flex;
26
- align-items: center;
27
-
28
- &:hover,
29
- &.active {
30
- background: #f2f2f2;
31
- }
32
- }
33
- .sort-icon {
34
- width: 16px;
35
- height: 16px;
36
- background-size: contain;
37
- display: inline-block;
38
- }
39
- .sort-icon-asc {
40
- background-image: url('../img/icon-asc.png');
41
- }
42
- .sort-text {
43
- margin-left: 11px;
44
- font-size: 14px;
45
- line-height: 32px;
46
- color: rgba(0, 0, 0, 0.8);
47
- }
48
- .sort-icon-desc {
49
- background-image: url('../img/icon-desc.png');
50
- }
51
- .filter-header {
52
- padding: 0 13px;
53
- cursor: initial;
54
- }
55
- .filter-header-icon {
56
- border-top-color: #333;
57
- border-right-color: #333;
58
- }
59
- .filter-header-text {
60
- margin-left: 11px;
61
- }
62
-
63
- .check-search-wrap {
64
- padding: 8px 0;
65
- width: 100%;
66
- background: #f7f7f7;
67
- display: flex;
68
- justify-content: center;
69
- }
70
- .check-seach-input {
71
- // width: 206px;
72
- line-height: 32px;
73
- }
74
-
75
- .checkbox-box {
76
- padding-right: 3px;
77
- margin-top: 4px;
78
- width: 100%;
79
- }
80
- .checkbox-wrap {
81
- padding-left: 13px;
82
- padding-right: 3px;
83
- width: 100%;
84
- background: #fff;
85
- display: flex;
86
- flex-direction: column;
87
- // max-height: 165px;
88
- overflow-y: auto;
89
-
90
- &::-webkit-scrollbar {
91
- width: 4px;
92
- height: 4px;
93
- }
94
-
95
- &::-webkit-scrollbar-thumb {
96
- background-color: #d5d5d5;
97
- border-radius: 4px;
98
- }
99
- &::-webkit-scrollbar-track {
100
- background-color: #fff; //设置背景透明
101
- border-radius: 4px;
102
- }
103
- &::-webkit-scrollbar-corner {
104
- background-color: #000;
105
- border-radius: 4px;
106
- width: 4px;
107
- }
108
- }
109
- .checkbox-wrap--search {
110
- padding-right: 10px;
111
- }
112
-
113
- .ant-checkbox-group-item,
114
- .ant-checkbox-wrapper {
115
- padding-left: 10px;
116
- padding-right: 10px;
117
- line-height: 32px;
118
- height: 32px;
119
- box-sizing: border-box;
120
- margin-right: 0;
121
- width: 100%;
122
- overflow: hidden;
123
- text-overflow: ellipsis;
124
- white-space: nowrap;
125
- background: #f7f7f7;
126
- display: block;
127
-
128
- &:hover {
129
- background: #ececec;
130
- }
131
- }
132
-
133
- .checkbox-btn-wrap {
134
- display: flex;
135
- // justify-content: space-between;
136
- padding: 8px 10px 8px 14px;
137
-
138
- .checkbox-btn {
139
- width: 56px;
140
- padding: 0;
141
- }
142
- .checkbox-btn + .checkbox-btn {
143
- margin-left: 8px;
144
- }
145
- .checkbox-btn-status {
146
- .checkbox-btn {
147
- border: 0;
148
- border-radius: 0;
149
- width: initial;
150
- margin: 0 13px;
151
- position: relative;
152
- &:hover::after {
153
- display: block;
154
- content: '';
155
- position: absolute;
156
- bottom: 5px;
157
- width: 100%;
158
- height: 1px;
159
- background-color: @primary-color;
160
- }
161
- }
162
- }
163
- }
164
11
  .arrows-icon {
165
12
  position: absolute;
166
13
  bottom: -1px;
167
14
  right: -1px;
168
- // transform: rotate(90deg);
169
15
  font-size: 15px;
170
16
  cursor: nw-resize;
171
17
  width: 25px;
@@ -0,0 +1,371 @@
1
+ <template>
2
+ <div class="c-filter-container">
3
+ <a-spin :spinning="wordbookSearch.fetchingWordbook" class="filter-loading" >
4
+
5
+
6
+ <div class="sort-list" :style="{ display: field.isSort ? 'block' : 'none' }">
7
+ <div
8
+ :class="['sort-item', { active: field.filterSort === 'asc' }]"
9
+ @click="() => handlefilterBoxClickSort('asc', field)"
10
+ >
11
+ <i class="sort-icon sort-icon-asc"></i>
12
+ <span class="sort-text">升序 A to Z</span>
13
+ </div>
14
+ <div
15
+ :class="['sort-item', { active: field.filterSort === 'desc' }]"
16
+ @click="() => handlefilterBoxClickSort('desc', field)"
17
+ >
18
+ <i class="sort-icon sort-icon-asc"></i>
19
+ <span class="sort-text">降序 Z to A</span>
20
+ </div>
21
+ </div>
22
+ <template v-if="searchErr">
23
+ <a-empty :description="resultMsg" />
24
+ </template>
25
+
26
+ <div class="check-wrap-div" v-show="!searchErr">
27
+ <div v-if="showfilterSearch" class="checkbox-wrap checkbox-wrap--search">
28
+ <div class="check-search-wrap">
29
+ <a-input-search
30
+ placeholder="字段搜索"
31
+ class="check-seach-input"
32
+ :allowClear="true"
33
+ @search="(val) => handleFilterSeachDebounce(val, field)"
34
+ />
35
+ </div>
36
+ </div>
37
+ <div class="checkbox-box">
38
+ <div class="checkbox-wrap js-checkbox-wrap" :style="{ height: useCHeight + 'px' }">
39
+ <div v-if="showCheckAll" class="ant-checkbox-group">
40
+ <a-checkbox
41
+ :indeterminate="indeterminate"
42
+ :checked="checkAll"
43
+ @change="(val) => handleFilterChangeAll(val, field)"
44
+ >
45
+ 全选
46
+ </a-checkbox>
47
+ </div>
48
+ <a-checkbox-group
49
+ v-if="!searchFilterText"
50
+ :options="filterOptions"
51
+ name="CheckboxHeaderFilter_C"
52
+ :value="CONVERT"
53
+ class="c-chekbox-group"
54
+ @change="(val) => handleFilterChange(val, field.columnName, field)"
55
+ >
56
+ <!-- 这里的设置主要是给字典搜索的筛选, 如果展示的label过长那么添加个title -->
57
+ <template slot="label" slot-scope="{ _show_title }" >
58
+ <span :title="_show_title">{{ _show_title }}</span>
59
+ </template>
60
+ </a-checkbox-group>
61
+ <a-checkbox-group
62
+ v-else
63
+ :options="filterOptions"
64
+ :value="searchFilterCONVERT"
65
+ class="s-chekbox-group"
66
+ name="CheckboxHeaderFilter_S"
67
+ @change="(val) => handleFilterSearchChange(val , field.columnName, field)"
68
+ />
69
+ </div>
70
+ <div v-if="showPage" class="checkbox-page">
71
+ <select-pages :searchPageConfig="wordbookSearch" :handleSearchChangePage="handleSearchChangePage" />
72
+ </div>
73
+ </div>
74
+ </div>
75
+
76
+ <div
77
+ class="checkbox-btn-wrap"
78
+ :style="{ justifyContent: CONVERTLen ? 'space-between' : 'flex-end' }"
79
+ >
80
+ <div v-if="CONVERTLen" class="checkbox-btn-status">
81
+ <span>已选择{{ CONVERTLen }}项</span>
82
+ <a-button class="checkbox-btn checkbox-btn-clear" type="link" @click="() => handleFilterClearAll(field)">
83
+ 清空
84
+ </a-button>
85
+ </div>
86
+ <div>
87
+ <a-button class="checkbox-btn" @click="() => handleCancelFilter(field)"> 取消 </a-button>
88
+ <a-button class="checkbox-btn" type="primary" @click="() => handleFilter(field)">确定 </a-button>
89
+ </div>
90
+ </div>
91
+ </a-spin>
92
+ </div>
93
+ </template>
94
+ <script>
95
+ import Vue from 'vue';
96
+ import { Checkbox, Input, Button, Spin, Empty } from 'ant-design-vue';
97
+ import selectPages from '@/component/select-pages';
98
+ export default {
99
+ name: "HeaderFilter",
100
+ props: {
101
+ field: { type: Object, default: () => ({}) },
102
+ cHeight: { type: Number, default: 0 },
103
+ handlefilterBoxClickSort: { type: Function, default: () => {} },
104
+ handleFilterSeachDebounce: { type: Function, default: () => {} },
105
+ handleFilterChangeAll: { type: Function, default: () => {} },
106
+ handleFilterChange: { type: Function, default: () => {} },
107
+ handleFilterSearchChange: { type: Function, default: () => {} },
108
+ handleFilterClearAll: { type: Function, default: () => {} },
109
+ handleCancelFilter: { type: Function, default: () => {} },
110
+ handleFilter: { type: Function, default: () => {} }
111
+ },
112
+ components: {
113
+ [Checkbox.Group.name]:Checkbox.Group,
114
+ [Checkbox.name]: Checkbox,
115
+ [Input.Search.name]: Input.Search,
116
+ [Input.name]: Input,
117
+ [Button.name]: Button,
118
+ [Spin.name]: Spin,
119
+ [Empty.name]: Empty,
120
+ selectPages
121
+ },
122
+
123
+ data() {
124
+ return {};
125
+ },
126
+
127
+ computed: {
128
+
129
+ filterSettingMap() {
130
+ return this.field?.filterSettingMap || {};
131
+ },
132
+ useCHeight() {
133
+ if(!this.showPage) return this.cHeight;
134
+ return this.cHeight - 33;
135
+ },
136
+ showfilterSearch() {
137
+ return this.filterSettingMap.showfilterSearch;
138
+ },
139
+ searchFilterText() {
140
+ return this.field?.searchFilterText;
141
+ },
142
+ showCheckAll() {
143
+ return this.filterSettingMap.showSelectAll && !this.searchFilterText;
144
+ },
145
+ checkAll() {
146
+ return this.field?.checkAll;
147
+ },
148
+ indeterminate() {
149
+ return this.field?.indeterminate;
150
+ },
151
+ filterOptions() {
152
+ return this.filterSettingMap.filterOptions || [];
153
+ },
154
+ CONVERT() {
155
+ return this.field?.CONVERT || [];
156
+ },
157
+ searchFilterCONVERT() {
158
+ return this.field?.searchFilterCONVERT || [];
159
+ },
160
+ CONVERTLen() {
161
+ return this.CONVERT?.length || 0;
162
+ },
163
+ wordbookSearch() {
164
+ return this.field?.wordbookSearch || {};
165
+ },
166
+ searchErr(){
167
+ return this.filterSettingMap.isVaildWordbook && this.wordbookSearch.isRequest && this.wordbookSearch.result && this.wordbookSearch.result !== 'SUCCESS'
168
+ },
169
+ resultMsg(){
170
+ return this.wordbookSearch.resultMsg || '暂无数据';
171
+ },
172
+ showPage(){
173
+ const isVaildWordbook = this.filterSettingMap.isVaildWordbook;
174
+ const {hasNextPage, page} = this.wordbookSearch;
175
+ return isVaildWordbook && (hasNextPage || page > 1)
176
+ },
177
+
178
+ },
179
+ watch: {},
180
+ // 生命周期
181
+ beforeCreate(){},
182
+ created() {},
183
+ mounted() {},
184
+
185
+ // 方法
186
+ methods: {
187
+ handleSearchChangePage(type){
188
+ let cType = type || 'next';
189
+ let { page, keyword = undefined } = this?.wordbookSearch;
190
+ page = cType === 'next' ? page + 1 : page - 1;
191
+ this.handleFilterSeachDebounce(keyword, this.field, {page});
192
+ },
193
+ }
194
+ };
195
+ </script>
196
+ <style lang="less">
197
+ .c-filter-container {
198
+ width: 100%;
199
+ height: 100%;
200
+ overflow: hidden;
201
+ transition: width 2s;
202
+ padding-top: 8px;
203
+ text-align: left;
204
+ border-radius: 4px;
205
+ .filter-loading {
206
+ width: 100%;
207
+ height: 100%;
208
+ overflow: hidden;
209
+ .ant-spin-container {
210
+ width: 100%;
211
+ height: 100%;
212
+ display: flex;
213
+ flex-wrap: wrap;
214
+ flex-direction: column;
215
+ overflow: hidden;
216
+ }
217
+ }
218
+ .sort-item {
219
+ line-height: 32px;
220
+ padding: 0 13px;
221
+ display: flex;
222
+ align-items: center;
223
+
224
+ &:hover,
225
+ &.active {
226
+ background: #f2f2f2;
227
+ }
228
+ }
229
+ .sort-icon {
230
+ width: 16px;
231
+ height: 16px;
232
+ background-size: contain;
233
+ display: inline-block;
234
+ }
235
+ .sort-icon-asc {
236
+ background-image: url("../assets/img/icon-asc.png");
237
+ }
238
+ .sort-text {
239
+ margin-left: 11px;
240
+ font-size: 14px;
241
+ line-height: 32px;
242
+ color: rgba(0, 0, 0, 0.8);
243
+ }
244
+ .sort-icon-desc {
245
+ background-image: url("../assets/img/icon-desc.png");
246
+ }
247
+ .filter-header {
248
+ padding: 0 13px;
249
+ cursor: initial;
250
+ }
251
+ .filter-header-icon {
252
+ border-top-color: #333;
253
+ border-right-color: #333;
254
+ }
255
+ .filter-header-text {
256
+ margin-left: 11px;
257
+ }
258
+
259
+ .check-search-wrap {
260
+ padding: 8px 0;
261
+ width: 100%;
262
+ background: #f7f7f7;
263
+ display: flex;
264
+ justify-content: center;
265
+ }
266
+ .check-seach-input {
267
+ line-height: 32px;
268
+ }
269
+
270
+ .checkbox-box {
271
+ padding-right: 3px;
272
+ margin-top: 4px;
273
+ width: 100%;
274
+ }
275
+ .check-wrap-div {
276
+ width: 100%;
277
+ height: 100%;
278
+ overflow: hidden;
279
+ }
280
+ .checkbox-wrap {
281
+ padding-left: 13px;
282
+ padding-right: 3px;
283
+ width: 100%;
284
+ background: #fff;
285
+ display: flex;
286
+ flex-direction: column;
287
+ overflow-y: auto;
288
+
289
+ &::-webkit-scrollbar {
290
+ width: 4px;
291
+ height: 4px;
292
+ }
293
+
294
+ &::-webkit-scrollbar-thumb {
295
+ background-color: #d5d5d5;
296
+ border-radius: 4px;
297
+ }
298
+ &::-webkit-scrollbar-track {
299
+ background-color: #fff; //设置背景透明
300
+ border-radius: 4px;
301
+ }
302
+ &::-webkit-scrollbar-corner {
303
+ background-color: #000;
304
+ border-radius: 4px;
305
+ width: 4px;
306
+ }
307
+ }
308
+ .checkbox-wrap--search {
309
+ padding-right: 10px;
310
+ }
311
+
312
+ .ant-checkbox-group-item,
313
+ .ant-checkbox-wrapper {
314
+ padding-left: 10px;
315
+ padding-right: 10px;
316
+ line-height: 32px;
317
+ height: 32px;
318
+ box-sizing: border-box;
319
+ margin-right: 0;
320
+ width: 100%;
321
+ overflow: hidden;
322
+ text-overflow: ellipsis;
323
+ white-space: nowrap;
324
+ background: #f7f7f7;
325
+ display: block;
326
+
327
+ &:hover {
328
+ background: #ececec;
329
+ }
330
+ }
331
+
332
+ .checkbox-page {
333
+ padding-left: 13px;
334
+ padding-right: 7px;
335
+ .form-select-btn {
336
+ border: 1px solid #d5d5d5;
337
+ }
338
+ }
339
+
340
+ .checkbox-btn-wrap {
341
+ display: flex;
342
+ padding: 8px 10px 8px 14px;
343
+
344
+ .checkbox-btn {
345
+ width: 56px;
346
+ padding: 0;
347
+ }
348
+ .checkbox-btn + .checkbox-btn {
349
+ margin-left: 8px;
350
+ }
351
+ .checkbox-btn-status {
352
+ .checkbox-btn {
353
+ border: 0;
354
+ border-radius: 0;
355
+ width: initial;
356
+ margin: 0 13px;
357
+ position: relative;
358
+ &:hover::after {
359
+ display: block;
360
+ content: "";
361
+ position: absolute;
362
+ bottom: 5px;
363
+ width: 100%;
364
+ height: 1px;
365
+ background-color: @primary-color;
366
+ }
367
+ }
368
+ }
369
+ }
370
+ }
371
+ </style>
@@ -105,7 +105,8 @@ const bigTableProps = {
105
105
  aboutPositionBtm: { type: Boolean, default: false },
106
106
  treeVirtualScroll: { type: Boolean, default: false }, // 树表是否开启虚拟滚动,目前值对 istree = 1 有效
107
107
  tableDataType: { type: String, defualt: 'SQL' },
108
- libSource: { type: String }
108
+ libSource: { type: String },
109
+ requestGetWordbookData: Function
109
110
  };
110
111
 
111
112
  export default bigTableProps;