bri-components 1.5.14 → 1.5.16
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 +83 -83
- package/lib/0.bri-components.min.js +1 -1
- package/lib/1.bri-components.min.js +1 -1
- package/lib/10.bri-components.min.js +1 -1
- package/lib/2.bri-components.min.js +1 -1
- package/lib/3.bri-components.min.js +1 -1
- package/lib/4.bri-components.min.js +1 -1
- package/lib/5.bri-components.min.js +1 -1
- package/lib/6.bri-components.min.js +1 -1
- package/lib/7.bri-components.min.js +1 -1
- package/lib/8.bri-components.min.js +1 -1
- package/lib/9.bri-components.min.js +1 -1
- package/lib/bri-components.min.js +4 -4
- package/lib/styles/bundle.css +12 -12
- package/lib/styles/font/fontello.svg +31 -31
- package/package.json +125 -125
- package/src/components/Error/Error403.vue +42 -42
- package/src/components/Error/Error404.vue +40 -40
- package/src/components/Error/Error500.vue +51 -51
- package/src/components/Error/error.less +162 -162
- package/src/components/Error/errorBack.vue +40 -40
- package/src/components/controls/DshControlInput.vue +195 -195
- package/src/components/controls/base/BriUpload/BriUpload.vue +434 -434
- package/src/components/controls/base/BriUpload/BriUploadImage.vue +377 -377
- package/src/components/controls/base/BriUpload/uploadList.vue +727 -727
- package/src/components/controls/base/BriUpload/uploadMixin.js +446 -446
- package/src/components/controls/base/DshCascader/DshCascader.vue +215 -215
- package/src/components/controls/base/DshCascader/components/cascaderModal.vue +366 -366
- package/src/components/controls/base/DshCascader/components/cascaderPicker.vue +416 -416
- package/src/components/controls/base/DshCascader/components/cascaderSimple.vue +141 -141
- package/src/components/controls/base/DshCascader/components/cascaderTree.vue +151 -151
- package/src/components/controls/base/DshCoordinates.vue +577 -577
- package/src/components/controls/base/DshDate/DshDate.vue +191 -191
- package/src/components/controls/base/DshDate/DshDaterange.vue +186 -186
- package/src/components/controls/base/DshDivider.vue +201 -201
- package/src/components/controls/base/DshEditor.vue +274 -274
- package/src/components/controls/base/DshInput/BriInputs.vue +166 -166
- package/src/components/controls/base/DshInput/DshInput.vue +260 -260
- package/src/components/controls/base/DshNumber/BriInputNumber/BriInputNumber.vue +435 -435
- package/src/components/controls/base/DshNumber/BriInputNumber/mixins/emitter.js +34 -34
- package/src/components/controls/base/DshNumber/BriInputNumber/mixins/form.js +14 -14
- package/src/components/controls/base/DshNumber/BriInputNumber/utils/assist.js +322 -322
- package/src/components/controls/base/DshNumber/DshNumber.vue +143 -143
- package/src/components/controls/base/DshNumber/DshNumberange.vue +109 -109
- package/src/components/controls/base/DshSelect/DshCheckbox.vue +168 -168
- package/src/components/controls/base/DshSelect/DshSelect.vue +180 -180
- package/src/components/controls/base/DshSwitch/DshSwitch.vue +115 -115
- package/src/components/controls/control.less +324 -324
- package/src/components/controls/controlMap.js +114 -114
- package/src/components/controls/extra/DshColor.vue +81 -81
- package/src/components/controls/extra/DshThemeColor.vue +100 -100
- package/src/components/controls/extra/DshThemeIcon.vue +122 -122
- package/src/components/controls/mixins/cascaderMixin.js +325 -325
- package/src/components/controls/mixins/cascaderPickerMixin.js +227 -227
- package/src/components/controls/mixins/cascaderTableMixin.js +130 -130
- package/src/components/controls/mixins/controlMixin.js +393 -393
- package/src/components/controls/mixins/dateMixin.js +149 -149
- package/src/components/controls/mixins/flatTableMixin.js +111 -111
- package/src/components/controls/mixins/numberMixin.js +112 -112
- package/src/components/controls/mixins/selectMixin.js +233 -233
- package/src/components/controls/mixins/switchMixin.js +87 -87
- package/src/components/controls/mixins/userAndDepartMixin.js +260 -260
- package/src/components/controls/senior/DshLabels.vue +333 -333
- package/src/components/controls/senior/DshPackage.vue +57 -57
- package/src/components/controls/senior/cascaderTable.vue +213 -213
- package/src/components/controls/senior/flatTable.vue +138 -138
- package/src/components/controls/senior/selectDepartments.vue +399 -399
- package/src/components/controls/senior/selectUsers/departMenu.vue +293 -293
- package/src/components/controls/senior/selectUsers/selectUsers.vue +712 -712
- package/src/components/controls/special/DshBack.vue +42 -42
- package/src/components/controls/special/DshUndeveloped.vue +41 -41
- package/src/components/form/DshAdvSearch.vue +510 -510
- package/src/components/form/DshDefaultSearch.vue +260 -260
- package/src/components/form/DshForm.vue +494 -494
- package/src/components/form/searchMixin.js +376 -376
- package/src/components/list/BriCard.vue +95 -95
- package/src/components/list/BriTable.vue +205 -205
- package/src/components/list/BriTree.vue +529 -529
- package/src/components/list/BriTreeItem.vue +163 -163
- package/src/components/list/DshBox/DshBox.vue +219 -219
- package/src/components/list/DshBox/DshCard.vue +446 -446
- package/src/components/list/DshBox/DshCrossTable.vue +827 -827
- package/src/components/list/DshBox/DshList.vue +404 -404
- package/src/components/list/DshBox/DshPanel.vue +669 -669
- package/src/components/list/DshBox/DshSingleData.vue +119 -119
- package/src/components/list/DshBox/DshTable.vue +239 -239
- package/src/components/list/DshCascaderTable.vue +115 -115
- package/src/components/list/DshFlatTable.vue +337 -337
- package/src/components/list/DshPage.vue +194 -194
- package/src/components/list/DshTreeTable.vue +113 -113
- package/src/components/list/common/importModal.vue +243 -243
- package/src/components/list/common/quoteListModal.vue +206 -206
- package/src/components/list/mixins/DshCascaderTableMixin.js +278 -278
- package/src/components/list/mixins/DshFlatTableMixin.js +509 -509
- package/src/components/list/mixins/DshTreeTableMixin.js +286 -286
- package/src/components/list/mixins/tableBaseMixin.js +1653 -1653
- package/src/components/list/mixins/treeTableBaseMixin.js +145 -145
- package/src/components/other/BriAvatar.vue +166 -166
- package/src/components/other/BriCode.vue +125 -125
- package/src/components/other/BriCollapseTree.vue +207 -207
- package/src/components/other/BriGantt.vue +1087 -1087
- package/src/components/other/BriIframe.vue +116 -116
- package/src/components/other/BriLoading.vue +171 -171
- package/src/components/other/BriSvg.vue +27 -27
- package/src/components/other/DshColorPanel.vue +128 -128
- package/src/components/other/DshMenuNav.vue +188 -188
- package/src/components/small/BriButton.vue +71 -71
- package/src/components/small/BriDrawer.vue +169 -169
- package/src/components/small/BriTooltip.vue +87 -87
- package/src/components/small/DshBtnModal.vue +68 -68
- package/src/components/small/DshButtons.vue +324 -324
- package/src/components/small/DshDropdown.vue +225 -225
- package/src/components/small/DshIcons.vue +59 -59
- package/src/components/small/DshListRender.js +21 -21
- package/src/components/small/DshModal.vue +160 -160
- package/src/components/small/DshSteps.vue +141 -141
- package/src/components/small/DshTabs.vue +598 -598
- package/src/components/small/DshTabsSet.vue +309 -309
- package/src/components/small/DshTags.vue +251 -251
- package/src/components/small/DshTitle.vue +50 -50
- package/src/components/small/render.js +20 -20
- package/src/components/unit/DshFormUnit.vue +398 -398
- package/src/components/unit/DshListUnit.vue +115 -115
- package/src/components/unit/unitMixin.js +86 -86
- package/src/data/index.js +4 -4
- package/src/index.js +282 -282
- package/src/styles/bundle.css +12 -12
- package/src/styles/components/BriButton.less +307 -307
- package/src/styles/components/BriTable.less +344 -344
- package/src/styles/components/DshModal.less +257 -257
- package/src/styles/components/index.less +3 -3
- package/src/styles/global/animate.less +11 -11
- package/src/styles/global/base.less +45 -45
- package/src/styles/global/box.less +186 -186
- package/src/styles/global/control.less +122 -122
- package/src/styles/global/flex.less +282 -282
- package/src/styles/global/global.less +8 -8
- package/src/styles/global/text.less +59 -59
- package/src/styles/global/variables.less +85 -85
- package/src/styles/iconfont/iconfont.css +254 -254
- package/src/styles/iconfont/iconfont.json +422 -422
- package/src/styles/iconfont/iconfont.svg +137 -137
- package/src/styles/index.less +26 -26
- package/src/styles/reset-easytable.less +21 -21
- package/src/styles/reset-iview-controls.less +145 -145
- package/src/styles/reset-iview-other.less +49 -49
- package/src/styles/reset-iview-variables.less +43 -43
- package/src/styles/reset.less +45 -45
- package/src/utils/index.js +5 -5
- package/src/utils/table.js +175 -175
- package/lib/11.bri-components.min.js +0 -1
|
@@ -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
|
+
};
|