bri-components 1.5.22 → 1.6.1

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 (154) hide show
  1. package/README.md +83 -83
  2. package/lib/styles/bundle.css +12 -12
  3. package/lib/styles/font/fontello.svg +31 -31
  4. package/package.json +127 -125
  5. package/src/components/Error/Error403.vue +42 -42
  6. package/src/components/Error/Error404.vue +40 -40
  7. package/src/components/Error/Error500.vue +51 -51
  8. package/src/components/Error/error.less +162 -162
  9. package/src/components/Error/errorBack.vue +40 -40
  10. package/src/components/controls/DshControlInput.vue +195 -195
  11. package/src/components/controls/base/BriUpload/BriUpload.vue +435 -434
  12. package/src/components/controls/base/BriUpload/BriUploadImage.vue +430 -377
  13. package/src/components/controls/base/BriUpload/uploadList.vue +738 -727
  14. package/src/components/controls/base/BriUpload/uploadMixin.js +453 -446
  15. package/src/components/controls/base/DshCascader/DshCascader.vue +215 -215
  16. package/src/components/controls/base/DshCascader/components/cascaderModal.vue +366 -366
  17. package/src/components/controls/base/DshCascader/components/cascaderPicker.vue +416 -416
  18. package/src/components/controls/base/DshCascader/components/cascaderSimple.vue +141 -141
  19. package/src/components/controls/base/DshCascader/components/cascaderTree.vue +151 -151
  20. package/src/components/controls/base/DshCoordinates.vue +587 -585
  21. package/src/components/controls/base/DshDate/DshDate.vue +191 -191
  22. package/src/components/controls/base/DshDate/DshDaterange.vue +186 -186
  23. package/src/components/controls/base/DshDivider.vue +201 -201
  24. package/src/components/controls/base/DshEditor.vue +274 -274
  25. package/src/components/controls/base/DshInput/BriInputs.vue +166 -166
  26. package/src/components/controls/base/DshInput/DshInput.vue +260 -260
  27. package/src/components/controls/base/DshNumber/BriInputNumber/BriInputNumber.vue +435 -435
  28. package/src/components/controls/base/DshNumber/BriInputNumber/mixins/emitter.js +34 -34
  29. package/src/components/controls/base/DshNumber/BriInputNumber/mixins/form.js +14 -14
  30. package/src/components/controls/base/DshNumber/BriInputNumber/utils/assist.js +322 -322
  31. package/src/components/controls/base/DshNumber/DshNumber.vue +143 -143
  32. package/src/components/controls/base/DshNumber/DshNumberange.vue +109 -109
  33. package/src/components/controls/base/DshSelect/DshCheckbox.vue +168 -168
  34. package/src/components/controls/base/DshSelect/DshSelect.vue +180 -180
  35. package/src/components/controls/base/DshSelect/DshSelectAll.vue +269 -269
  36. package/src/components/controls/base/DshSwitch/DshSwitch.vue +115 -115
  37. package/src/components/controls/control.less +324 -324
  38. package/src/components/controls/controlMap.js +117 -117
  39. package/src/components/controls/extra/DshColor.vue +81 -81
  40. package/src/components/controls/extra/DshThemeColor.vue +100 -100
  41. package/src/components/controls/extra/DshThemeIcon.vue +122 -122
  42. package/src/components/controls/mixins/cascaderMixin.js +325 -325
  43. package/src/components/controls/mixins/cascaderPickerMixin.js +227 -227
  44. package/src/components/controls/mixins/cascaderTableMixin.js +130 -130
  45. package/src/components/controls/mixins/controlMixin.js +393 -393
  46. package/src/components/controls/mixins/dateMixin.js +149 -149
  47. package/src/components/controls/mixins/flatTableMixin.js +111 -111
  48. package/src/components/controls/mixins/numberMixin.js +112 -112
  49. package/src/components/controls/mixins/selectMixin.js +233 -233
  50. package/src/components/controls/mixins/switchMixin.js +87 -87
  51. package/src/components/controls/mixins/userAndDepartMixin.js +260 -260
  52. package/src/components/controls/senior/DshLabels.vue +333 -333
  53. package/src/components/controls/senior/DshPackage.vue +57 -57
  54. package/src/components/controls/senior/cascaderTable.vue +213 -213
  55. package/src/components/controls/senior/correlation.vue +135 -135
  56. package/src/components/controls/senior/flatTable.vue +138 -138
  57. package/src/components/controls/senior/selectDepartments.vue +397 -399
  58. package/src/components/controls/senior/selectUsers/departMenu.vue +296 -293
  59. package/src/components/controls/senior/selectUsers/selectUsers.vue +712 -712
  60. package/src/components/controls/special/DshBack.vue +42 -42
  61. package/src/components/controls/special/DshUndeveloped.vue +41 -41
  62. package/src/components/form/DshAdvSearch.vue +510 -510
  63. package/src/components/form/DshDefaultSearch.vue +260 -260
  64. package/src/components/form/DshForm.vue +494 -494
  65. package/src/components/form/searchMixin.js +376 -376
  66. package/src/components/list/BriCard.vue +95 -95
  67. package/src/components/list/BriTable.vue +205 -205
  68. package/src/components/list/BriTree.vue +529 -529
  69. package/src/components/list/BriTreeItem.vue +163 -163
  70. package/src/components/list/DshBox/DshBox.vue +219 -219
  71. package/src/components/list/DshBox/DshCard.vue +446 -446
  72. package/src/components/list/DshBox/DshCrossTable.vue +827 -827
  73. package/src/components/list/DshBox/DshList.vue +404 -404
  74. package/src/components/list/DshBox/DshPanel.vue +669 -669
  75. package/src/components/list/DshBox/DshSingleData.vue +119 -119
  76. package/src/components/list/DshBox/DshTable.vue +239 -239
  77. package/src/components/list/DshCascaderTable.vue +115 -115
  78. package/src/components/list/DshFlatTable.vue +334 -337
  79. package/src/components/list/DshPage.vue +194 -194
  80. package/src/components/list/DshTreeTable.vue +113 -113
  81. package/src/components/list/common/importModal.vue +243 -243
  82. package/src/components/list/common/quoteListModal.vue +206 -206
  83. package/src/components/list/mixins/DshCascaderTableMixin.js +278 -278
  84. package/src/components/list/mixins/DshFlatTableMixin.js +509 -509
  85. package/src/components/list/mixins/DshTreeTableMixin.js +286 -286
  86. package/src/components/list/mixins/tableBaseMixin.js +1653 -1653
  87. package/src/components/list/mixins/treeTableBaseMixin.js +145 -145
  88. package/src/components/other/BriAvatar.vue +166 -166
  89. package/src/components/other/BriCode.vue +125 -125
  90. package/src/components/other/BriCollapseTree.vue +207 -207
  91. package/src/components/other/BriGantt.vue +1087 -1087
  92. package/src/components/other/BriIframe.vue +116 -116
  93. package/src/components/other/BriLoading.vue +171 -171
  94. package/src/components/other/BriSvg.vue +27 -27
  95. package/src/components/other/DshColorPanel.vue +128 -128
  96. package/src/components/other/DshMenuNav.vue +188 -188
  97. package/src/components/other/DshVideoPlayer.vue +184 -0
  98. package/src/components/small/BriButton.vue +71 -71
  99. package/src/components/small/BriDrawer.vue +169 -169
  100. package/src/components/small/BriTooltip.vue +87 -87
  101. package/src/components/small/DshBtnModal.vue +68 -68
  102. package/src/components/small/DshButtons.vue +324 -324
  103. package/src/components/small/DshDropdown.vue +225 -225
  104. package/src/components/small/DshIcons.vue +59 -59
  105. package/src/components/small/DshListRender.js +21 -21
  106. package/src/components/small/DshModal.vue +160 -160
  107. package/src/components/small/DshSteps.vue +141 -141
  108. package/src/components/small/DshTabs.vue +598 -598
  109. package/src/components/small/DshTabsSet.vue +309 -309
  110. package/src/components/small/DshTags.vue +251 -251
  111. package/src/components/small/DshTitle.vue +50 -50
  112. package/src/components/small/render.js +20 -20
  113. package/src/components/unit/DshFormUnit.vue +398 -398
  114. package/src/components/unit/DshListUnit.vue +115 -115
  115. package/src/components/unit/unitMixin.js +86 -86
  116. package/src/data/index.js +4 -4
  117. package/src/index.js +287 -285
  118. package/src/styles/bundle.css +12 -12
  119. package/src/styles/components/BriButton.less +307 -307
  120. package/src/styles/components/BriTable.less +344 -344
  121. package/src/styles/components/DshModal.less +257 -257
  122. package/src/styles/components/index.less +3 -3
  123. package/src/styles/global/animate.less +11 -11
  124. package/src/styles/global/base.less +45 -45
  125. package/src/styles/global/box.less +186 -186
  126. package/src/styles/global/control.less +122 -122
  127. package/src/styles/global/flex.less +282 -282
  128. package/src/styles/global/global.less +8 -8
  129. package/src/styles/global/text.less +59 -59
  130. package/src/styles/global/variables.less +85 -85
  131. package/src/styles/iconfont/iconfont.css +254 -254
  132. package/src/styles/iconfont/iconfont.json +422 -422
  133. package/src/styles/iconfont/iconfont.svg +137 -137
  134. package/src/styles/index.less +26 -26
  135. package/src/styles/reset-easytable.less +21 -21
  136. package/src/styles/reset-iview-controls.less +145 -145
  137. package/src/styles/reset-iview-other.less +49 -49
  138. package/src/styles/reset-iview-variables.less +43 -43
  139. package/src/styles/reset.less +45 -45
  140. package/src/utils/index.js +3 -5
  141. package/lib/0.bri-components.min.js +0 -1
  142. package/lib/1.bri-components.min.js +0 -1
  143. package/lib/10.bri-components.min.js +0 -1
  144. package/lib/11.bri-components.min.js +0 -1
  145. package/lib/2.bri-components.min.js +0 -1
  146. package/lib/3.bri-components.min.js +0 -1
  147. package/lib/4.bri-components.min.js +0 -1
  148. package/lib/5.bri-components.min.js +0 -1
  149. package/lib/6.bri-components.min.js +0 -1
  150. package/lib/7.bri-components.min.js +0 -1
  151. package/lib/8.bri-components.min.js +0 -1
  152. package/lib/9.bri-components.min.js +0 -1
  153. package/lib/bri-components.min.js +0 -18
  154. package/src/utils/table.js +0 -175
@@ -1,149 +1,149 @@
1
- import controlMixin from "./controlMixin.js";
2
- import { dynDateData } from "bri-datas";
3
-
4
- export default {
5
- mixins: [
6
- controlMixin
7
- ],
8
- components: {},
9
- props: {},
10
- data () {
11
- return {
12
- open: false,
13
- open0: false,
14
- open1: false
15
- };
16
- },
17
- computed: {
18
- basePropsObj () {
19
- return {
20
- _dateType: "date", // 子类型5种,"date", "datetime", "year", "month", "time"
21
-
22
- _useDynDate: false, // 使用动态时间
23
- _dynDateType: undefined, // 使用什么类型的动态时间,"start","end"
24
- _dynDateKeys: [], // 仅使用一些指定的动态时间
25
- _dynSearchKeys: [], // 筛选时-仅使用一些指定的动态时间
26
-
27
- _minDate: undefined, // 最小日期
28
- _maxDate: undefined, // 最大日期
29
- _transfer: true,
30
-
31
- ...this.propsObj,
32
- ...this.commonDealPropsObj
33
- };
34
- },
35
-
36
- subType () {
37
- return this.selfPropsObj._dateType;
38
- },
39
- useDynDate () {
40
- return this.isInAnySearch
41
- ? true
42
- : this.selfPropsObj._useDynDate;
43
- },
44
- dynDateType () {
45
- return this.selfPropsObj._dynDateType;
46
- },
47
- dynDateKeys () {
48
- return this.isInAnySearch
49
- ? this.selfPropsObj._dynSearchKeys
50
- : this.selfPropsObj._dynDateKeys;
51
- },
52
- dynDateList () {
53
- return (
54
- this.dynDateKeys.length
55
- ? this.dynDateKeys
56
- .map(dynDateKey =>
57
- dynDateData.find(dynDateItem => dynDateItem._key === dynDateKey)
58
- )
59
- .filter(dynDateItem => !!dynDateItem)
60
- : dynDateData
61
- ).filter(dynDateItem => dynDateItem.dateTypes.includes(this.subType));
62
- },
63
-
64
- curVal0: {
65
- get () {
66
- return this.getVal(this.value[this.controlKey][0]);
67
- },
68
- set (val) {
69
- this.$set(this.value, this.controlKey, [this.transformVal(val), this.value[this.controlKey][1] || ""]);
70
- this.change();
71
- }
72
- },
73
- curVal1: {
74
- get () {
75
- return this.getVal(this.value[this.controlKey][1]);
76
- },
77
- set (val) {
78
- this.$set(this.value, this.controlKey, [this.value[this.controlKey][0] || "", this.transformVal(val)]);
79
- this.change();
80
- }
81
- },
82
- showVal0 () {
83
- return this.getShowVal(this.curVal0);
84
- },
85
- showVal1 () {
86
- return this.getShowVal(this.curVal1);
87
- },
88
- mulShowVal () {
89
- return this.$isEmptyData(this.curValList[0]) && this.$isEmptyData(this.curValList[1])
90
- ? this.emptyShowVal
91
- : `${this.$transformToDateStr(this.curValList[0], "-", this.subType)} - ${this.$transformToDateStr(this.curValList[1], "-", this.subType)}`;
92
- }
93
- },
94
- created () { },
95
- methods: {
96
- // 点击快捷日期
97
- clickDynDate (val, index) {
98
- this[`curVal${index}`] = val;
99
- this.changeOpen(false, index);
100
- },
101
- // 点击清空
102
- clickClear (val, index) {
103
- this[`curVal${index}`] = val;
104
- // this.changeOpen(false, index);
105
- },
106
- // 日期值变化回调
107
- changeVal (val, index) {
108
- this[`curVal${index}`] = val;
109
- this.subType !== "datetime" && this.changeOpen(false, index);
110
- },
111
- changeOpen (bool, index) {
112
- if (!this.disabled) {
113
- this[`open${index}`] = bool;
114
- }
115
- },
116
-
117
- /* -------- 方法 ------- */
118
- getVal (val) {
119
- return this.$isDynDate(val)
120
- ? val
121
- : this.$transformToDateObj(val);
122
- },
123
- transformVal (val) {
124
- return this.$isDynDate(val)
125
- ? val
126
- : this.$transformToDateStr(val, "-", this.subType);
127
- },
128
- getShowVal (val) {
129
- return this.$isDynDate(val)
130
- ? (this.dynDateList.find(dynDateItem => dynDateItem._key === val) || { name: `"${val}"动态时间不存在` }).name
131
- : this.$transformToDateStr(val, "-", this.subType);
132
- },
133
-
134
- getShortCuts (index) {
135
- return this.useDynDate
136
- ? this.dynDateList
137
- .filter(dynDateItem =>
138
- index || index === 0 ? dynDateItem.numbers.includes(index) : true
139
- )
140
- .map(dynDateItem => ({
141
- text: dynDateItem.name,
142
- onClick: () => {
143
- this.clickDynDate(dynDateItem._key, index);
144
- }
145
- }))
146
- : [];
147
- }
148
- }
149
- };
1
+ import controlMixin from "./controlMixin.js";
2
+ import { dynDateData } from "bri-datas";
3
+
4
+ export default {
5
+ mixins: [
6
+ controlMixin
7
+ ],
8
+ components: {},
9
+ props: {},
10
+ data () {
11
+ return {
12
+ open: false,
13
+ open0: false,
14
+ open1: false
15
+ };
16
+ },
17
+ computed: {
18
+ basePropsObj () {
19
+ return {
20
+ _dateType: "date", // 子类型5种,"date", "datetime", "year", "month", "time"
21
+
22
+ _useDynDate: false, // 使用动态时间
23
+ _dynDateType: undefined, // 使用什么类型的动态时间,"start","end"
24
+ _dynDateKeys: [], // 仅使用一些指定的动态时间
25
+ _dynSearchKeys: [], // 筛选时-仅使用一些指定的动态时间
26
+
27
+ _minDate: undefined, // 最小日期
28
+ _maxDate: undefined, // 最大日期
29
+ _transfer: true,
30
+
31
+ ...this.propsObj,
32
+ ...this.commonDealPropsObj
33
+ };
34
+ },
35
+
36
+ subType () {
37
+ return this.selfPropsObj._dateType;
38
+ },
39
+ useDynDate () {
40
+ return this.isInAnySearch
41
+ ? true
42
+ : this.selfPropsObj._useDynDate;
43
+ },
44
+ dynDateType () {
45
+ return this.selfPropsObj._dynDateType;
46
+ },
47
+ dynDateKeys () {
48
+ return this.isInAnySearch
49
+ ? this.selfPropsObj._dynSearchKeys
50
+ : this.selfPropsObj._dynDateKeys;
51
+ },
52
+ dynDateList () {
53
+ return (
54
+ this.dynDateKeys.length
55
+ ? this.dynDateKeys
56
+ .map(dynDateKey =>
57
+ dynDateData.find(dynDateItem => dynDateItem._key === dynDateKey)
58
+ )
59
+ .filter(dynDateItem => !!dynDateItem)
60
+ : dynDateData
61
+ ).filter(dynDateItem => dynDateItem.dateTypes.includes(this.subType));
62
+ },
63
+
64
+ curVal0: {
65
+ get () {
66
+ return this.getVal(this.value[this.controlKey][0]);
67
+ },
68
+ set (val) {
69
+ this.$set(this.value, this.controlKey, [this.transformVal(val), this.value[this.controlKey][1] || ""]);
70
+ this.change();
71
+ }
72
+ },
73
+ curVal1: {
74
+ get () {
75
+ return this.getVal(this.value[this.controlKey][1]);
76
+ },
77
+ set (val) {
78
+ this.$set(this.value, this.controlKey, [this.value[this.controlKey][0] || "", this.transformVal(val)]);
79
+ this.change();
80
+ }
81
+ },
82
+ showVal0 () {
83
+ return this.getShowVal(this.curVal0);
84
+ },
85
+ showVal1 () {
86
+ return this.getShowVal(this.curVal1);
87
+ },
88
+ mulShowVal () {
89
+ return this.$isEmptyData(this.curValList[0]) && this.$isEmptyData(this.curValList[1])
90
+ ? this.emptyShowVal
91
+ : `${this.$transformToDateStr(this.curValList[0], "-", this.subType)} - ${this.$transformToDateStr(this.curValList[1], "-", this.subType)}`;
92
+ }
93
+ },
94
+ created () { },
95
+ methods: {
96
+ // 点击快捷日期
97
+ clickDynDate (val, index) {
98
+ this[`curVal${index}`] = val;
99
+ this.changeOpen(false, index);
100
+ },
101
+ // 点击清空
102
+ clickClear (val, index) {
103
+ this[`curVal${index}`] = val;
104
+ // this.changeOpen(false, index);
105
+ },
106
+ // 日期值变化回调
107
+ changeVal (val, index) {
108
+ this[`curVal${index}`] = val;
109
+ this.subType !== "datetime" && this.changeOpen(false, index);
110
+ },
111
+ changeOpen (bool, index) {
112
+ if (!this.disabled) {
113
+ this[`open${index}`] = bool;
114
+ }
115
+ },
116
+
117
+ /* -------- 方法 ------- */
118
+ getVal (val) {
119
+ return this.$isDynDate(val)
120
+ ? val
121
+ : this.$transformToDateObj(val);
122
+ },
123
+ transformVal (val) {
124
+ return this.$isDynDate(val)
125
+ ? val
126
+ : this.$transformToDateStr(val, "-", this.subType);
127
+ },
128
+ getShowVal (val) {
129
+ return this.$isDynDate(val)
130
+ ? (this.dynDateList.find(dynDateItem => dynDateItem._key === val) || { name: `"${val}"动态时间不存在` }).name
131
+ : this.$transformToDateStr(val, "-", this.subType);
132
+ },
133
+
134
+ getShortCuts (index) {
135
+ return this.useDynDate
136
+ ? this.dynDateList
137
+ .filter(dynDateItem =>
138
+ index || index === 0 ? dynDateItem.numbers.includes(index) : true
139
+ )
140
+ .map(dynDateItem => ({
141
+ text: dynDateItem.name,
142
+ onClick: () => {
143
+ this.clickDynDate(dynDateItem._key, index);
144
+ }
145
+ }))
146
+ : [];
147
+ }
148
+ }
149
+ };
@@ -1,111 +1,111 @@
1
- import controlMixin from "./controlMixin.js";
2
- import DshFlatTable from "../../list/DshFlatTable.vue";
3
-
4
- export default {
5
- mixins: [
6
- controlMixin
7
- ],
8
- components: {
9
- DshFlatTable
10
- },
11
- props: {},
12
- data () {
13
- return {};
14
- },
15
- computed: {
16
- selfPropsObj () {
17
- return {
18
- _subForm: [],
19
- _searchList: [], // 作为搜索的字段
20
- _tableAdvSearch: {
21
- logic: "and",
22
- conditions: []
23
- },
24
- ...this.propsObj
25
- };
26
- },
27
- defaultPropsObj () {
28
- return {
29
- ...this.selfPropsObj,
30
- _tableAdvSearch: {
31
- logic: "and",
32
- conditions: []
33
- }
34
- };
35
- },
36
- subForm () {
37
- return this.selfPropsObj._subForm;
38
- },
39
-
40
- searchList () {
41
- return this.selfPropsObj._searchList;
42
- },
43
- searchListMap () {
44
- return this.$arrToMap(this.searchList, "_key");
45
- },
46
- searchListFields () {
47
- return this.searchList.map(searchItem => searchItem._key);
48
- },
49
- tableAdvSearch () {
50
- return this.$transformAdvSearch(this.selfPropsObj._tableAdvSearch, this.allFormList, this.value);
51
- },
52
- dftAdvSearch () {
53
- return {
54
- logic: ["and", "or"].includes(this.tableAdvSearch.logic) ? this.tableAdvSearch.logic : "and",
55
- conditions: this.tableAdvSearch.conditions.filter(conditionItem =>
56
- this.searchListFields.includes(conditionItem.fieldKey)
57
- )
58
- };
59
- },
60
- // 配置的默认筛选值里 隐藏的看不到的筛选条件
61
- hideAdvSearch () {
62
- return {
63
- logic: ["and", "or"].includes(this.tableAdvSearch.logic) ? this.tableAdvSearch.logic : "and",
64
- conditions: this.tableAdvSearch.conditions.filter(conditionItem =>
65
- !this.searchListFields.includes(conditionItem.fieldKey)
66
- )
67
- };
68
- },
69
- // 过滤行数据的 最终的筛选条件
70
- finalTableAdvSearch () {
71
- return {
72
- logic: "and",
73
- conditions: [
74
- this.hideAdvSearch,
75
- this.dftAdvSearch
76
- ]
77
- };
78
- },
79
- isSearching () {
80
- return this.$isAdvSearching(this.finalTableAdvSearch);
81
- },
82
-
83
- curVal () {
84
- return this.value[this.controlKey] || {
85
- list: []
86
- };
87
- },
88
- showVal () {
89
- return `${this.curVal
90
- ? this.curVal.list.filter((row) =>
91
- this.isSearching
92
- ? this.$isAdvRelyAccord(this.finalTableAdvSearch, row)
93
- : true
94
- ).length
95
- : 0
96
- } 行`;
97
- }
98
- },
99
- created () { },
100
- methods: {
101
- // 校验方法 -供外部使用
102
- validate () {
103
- return this.$refs.table.validate();
104
- },
105
-
106
- // 发生变动
107
- change (...params) {
108
- this.$emit("change", ...params);
109
- }
110
- }
111
- };
1
+ import controlMixin from "./controlMixin.js";
2
+ import DshFlatTable from "../../list/DshFlatTable.vue";
3
+
4
+ export default {
5
+ mixins: [
6
+ controlMixin
7
+ ],
8
+ components: {
9
+ DshFlatTable
10
+ },
11
+ props: {},
12
+ data () {
13
+ return {};
14
+ },
15
+ computed: {
16
+ selfPropsObj () {
17
+ return {
18
+ _subForm: [],
19
+ _searchList: [], // 作为搜索的字段
20
+ _tableAdvSearch: {
21
+ logic: "and",
22
+ conditions: []
23
+ },
24
+ ...this.propsObj
25
+ };
26
+ },
27
+ defaultPropsObj () {
28
+ return {
29
+ ...this.selfPropsObj,
30
+ _tableAdvSearch: {
31
+ logic: "and",
32
+ conditions: []
33
+ }
34
+ };
35
+ },
36
+ subForm () {
37
+ return this.selfPropsObj._subForm;
38
+ },
39
+
40
+ searchList () {
41
+ return this.selfPropsObj._searchList;
42
+ },
43
+ searchListMap () {
44
+ return this.$arrToMap(this.searchList, "_key");
45
+ },
46
+ searchListFields () {
47
+ return this.searchList.map(searchItem => searchItem._key);
48
+ },
49
+ tableAdvSearch () {
50
+ return this.$transformAdvSearch(this.selfPropsObj._tableAdvSearch, this.allFormList, this.value);
51
+ },
52
+ dftAdvSearch () {
53
+ return {
54
+ logic: ["and", "or"].includes(this.tableAdvSearch.logic) ? this.tableAdvSearch.logic : "and",
55
+ conditions: this.tableAdvSearch.conditions.filter(conditionItem =>
56
+ this.searchListFields.includes(conditionItem.fieldKey)
57
+ )
58
+ };
59
+ },
60
+ // 配置的默认筛选值里 隐藏的看不到的筛选条件
61
+ hideAdvSearch () {
62
+ return {
63
+ logic: ["and", "or"].includes(this.tableAdvSearch.logic) ? this.tableAdvSearch.logic : "and",
64
+ conditions: this.tableAdvSearch.conditions.filter(conditionItem =>
65
+ !this.searchListFields.includes(conditionItem.fieldKey)
66
+ )
67
+ };
68
+ },
69
+ // 过滤行数据的 最终的筛选条件
70
+ finalTableAdvSearch () {
71
+ return {
72
+ logic: "and",
73
+ conditions: [
74
+ this.hideAdvSearch,
75
+ this.dftAdvSearch
76
+ ]
77
+ };
78
+ },
79
+ isSearching () {
80
+ return this.$isAdvSearching(this.finalTableAdvSearch);
81
+ },
82
+
83
+ curVal () {
84
+ return this.value[this.controlKey] || {
85
+ list: []
86
+ };
87
+ },
88
+ showVal () {
89
+ return `${this.curVal
90
+ ? this.curVal.list.filter((row) =>
91
+ this.isSearching
92
+ ? this.$isAdvRelyAccord(this.finalTableAdvSearch, row)
93
+ : true
94
+ ).length
95
+ : 0
96
+ } 行`;
97
+ }
98
+ },
99
+ created () { },
100
+ methods: {
101
+ // 校验方法 -供外部使用
102
+ validate () {
103
+ return this.$refs.table.validate();
104
+ },
105
+
106
+ // 发生变动
107
+ change (...params) {
108
+ this.$emit("change", ...params);
109
+ }
110
+ }
111
+ };