bri-components 1.3.47 → 1.3.48
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/package.json +1 -1
- package/src/components/controls/base/DshCoordinates.vue +1 -1
- package/src/components/controls/base/DshDate/DshDate.vue +2 -2
- package/src/components/controls/mixins/controlMixin.js +1 -1
- package/src/components/list/DshFlatTable.vue +1 -1
- package/src/components/list/DshTreeTable.vue +19 -35
- package/src/components/list/mixins/tableBaseMixin.js +33 -1
package/package.json
CHANGED
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
const curDateStr = this.$transformDate(date, "/", this.subType);
|
|
120
120
|
|
|
121
121
|
// 日期字段的对比
|
|
122
|
-
const
|
|
122
|
+
const compareResult = this.$validateComparedRuleFunc(
|
|
123
123
|
this.selfPropsObj,
|
|
124
124
|
{
|
|
125
125
|
...this.value,
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
calResultObj = this.$isComparedAccord(curDateStr, parentDateStr, this.compareOperator, "date", this.subType, this.subType);
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
return !
|
|
145
|
+
return !compareResult || !calResultObj.bool;
|
|
146
146
|
}
|
|
147
147
|
};
|
|
148
148
|
}
|
|
@@ -130,7 +130,7 @@ export default {
|
|
|
130
130
|
},
|
|
131
131
|
// 是否为tag显示
|
|
132
132
|
tagShow () {
|
|
133
|
-
return ["users", "departments", "select", "checkbox", "regions", "cascaders", "switch"].includes(this.controlType);
|
|
133
|
+
return ["users", "departments", "select", "checkbox", "regions", "cascaders", "switch", "labels", "refSelect"].includes(this.controlType);
|
|
134
134
|
},
|
|
135
135
|
commonDealPropsObj () {
|
|
136
136
|
const selectControlTypes = ["date", "switch", "select", "checkbox", "file", "region", "regions", "cascader", "cascaders", "coordinates", "users", "departments"];
|
|
@@ -34,18 +34,22 @@
|
|
|
34
34
|
<!-- 添加行 -->
|
|
35
35
|
<dsh-buttons
|
|
36
36
|
v-if="!isSearching"
|
|
37
|
-
class="
|
|
37
|
+
class="DshTreeTable-create"
|
|
38
38
|
:list="$getOperationList(['canCreate'])"
|
|
39
39
|
@click="$dispatchEvent($event)"
|
|
40
40
|
></dsh-buttons>
|
|
41
41
|
|
|
42
42
|
<!-- 全屏模式 -->
|
|
43
43
|
<dsh-modal
|
|
44
|
+
class="DshTreeTable-fullscreen"
|
|
44
45
|
v-model="isEnlarge"
|
|
45
46
|
:mode="modalPropsObj.mode"
|
|
46
47
|
:propsObj="modalPropsObj"
|
|
47
48
|
>
|
|
48
|
-
<
|
|
49
|
+
<div
|
|
50
|
+
v-if="isEnlargeFlag"
|
|
51
|
+
class="DshTreeTable-fullscreen-inner"
|
|
52
|
+
>
|
|
49
53
|
<!-- 搜索条件 -->
|
|
50
54
|
<template v-if="searchFormList.length">
|
|
51
55
|
<dsh-default-search
|
|
@@ -69,11 +73,11 @@
|
|
|
69
73
|
|
|
70
74
|
<!-- 添加行 -->
|
|
71
75
|
<dsh-buttons
|
|
72
|
-
class="
|
|
76
|
+
class="DshTreeTable-create"
|
|
73
77
|
:list="$getOperationList(['canCreate'])"
|
|
74
78
|
@click="$dispatchEvent($event)"
|
|
75
79
|
></dsh-buttons>
|
|
76
|
-
</
|
|
80
|
+
</div>
|
|
77
81
|
</dsh-modal>
|
|
78
82
|
|
|
79
83
|
<!-- 各种模态框共用 -->
|
|
@@ -98,44 +102,18 @@
|
|
|
98
102
|
deleteProperties: ["__treeIndex__", "__old__", "__isExpand__", "__isRendered__", "__isShow__", "__isTmpShow__", "__isSearchShow__"], // 除了__readonly__和__isQuote__不处理
|
|
99
103
|
isExpandAction: false,
|
|
100
104
|
|
|
101
|
-
searchMode: "flat"
|
|
102
|
-
advSearchObj: {
|
|
103
|
-
logic: "and",
|
|
104
|
-
conditions: []
|
|
105
|
-
}
|
|
105
|
+
searchMode: "flat" // "flat", "tree"
|
|
106
106
|
};
|
|
107
107
|
},
|
|
108
108
|
computed: {
|
|
109
109
|
selfPropsObj () {
|
|
110
110
|
return {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
...this.commonPropsObj,
|
|
114
|
-
|
|
115
|
-
_maxLevel: this.commonPropsObj._maxLevel || 3
|
|
111
|
+
_maxLevel: 3, // 最大级数
|
|
112
|
+
...this.commonPropsObj
|
|
116
113
|
};
|
|
117
114
|
},
|
|
118
115
|
maxLevel () {
|
|
119
|
-
return this.selfPropsObj._maxLevel;
|
|
120
|
-
},
|
|
121
|
-
searchLabelWidth () {
|
|
122
|
-
return this.selfPropsObj._searchLabelWidth;
|
|
123
|
-
},
|
|
124
|
-
searchFormList () {
|
|
125
|
-
return (this.selfPropsObj._searchFields || []) // 级联表切层级表时 值会undefined覆盖selfPropsObj默认的[]
|
|
126
|
-
.map(fieldKey => this.columns.find(column => column._key === fieldKey))
|
|
127
|
-
.filter(column => !!column)
|
|
128
|
-
.map(column => {
|
|
129
|
-
return {
|
|
130
|
-
...column,
|
|
131
|
-
_span: 6
|
|
132
|
-
};
|
|
133
|
-
});
|
|
134
|
-
},
|
|
135
|
-
isSearching () {
|
|
136
|
-
return this.searchFormList.length && this.advSearchObj.conditions.some(conditionItem =>
|
|
137
|
-
conditionItem.fieldValue.length && conditionItem.fieldValue.some(valItem => !this.$isEmptyData(valItem))
|
|
138
|
-
);
|
|
116
|
+
return this.selfPropsObj._maxLevel || 3;
|
|
139
117
|
},
|
|
140
118
|
|
|
141
119
|
allTreeData () {
|
|
@@ -599,7 +577,13 @@
|
|
|
599
577
|
}
|
|
600
578
|
|
|
601
579
|
&-create {
|
|
602
|
-
margin-top:
|
|
580
|
+
margin-top: 3px;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
&-fullscreen {
|
|
584
|
+
&-inner {
|
|
585
|
+
padding: 10px 20px;
|
|
586
|
+
}
|
|
603
587
|
}
|
|
604
588
|
}
|
|
605
589
|
</style>
|
|
@@ -59,6 +59,11 @@ export default {
|
|
|
59
59
|
showRuleMessage: false, // 进行全体校验
|
|
60
60
|
ruleRecordMap: {}, // 单元格是否发生校验的记录映射
|
|
61
61
|
|
|
62
|
+
advSearchObj: {
|
|
63
|
+
logic: "and",
|
|
64
|
+
conditions: []
|
|
65
|
+
},
|
|
66
|
+
|
|
62
67
|
dshRenderName: undefined,
|
|
63
68
|
showQuoteModal: false,
|
|
64
69
|
showImportModal: false,
|
|
@@ -153,6 +158,8 @@ export default {
|
|
|
153
158
|
return {
|
|
154
159
|
// isShare: false, // 是否是分享页在用
|
|
155
160
|
|
|
161
|
+
_searchList: [], // 作为搜索的字段
|
|
162
|
+
_searchLabelWidth: 100, // 搜索的label宽度
|
|
156
163
|
_showRequired: true, // 表头显示校验符号*
|
|
157
164
|
_showDescription: true, // 表头显示提示
|
|
158
165
|
_headHeightAuto: false, // 表头高度自适应
|
|
@@ -180,6 +187,18 @@ export default {
|
|
|
180
187
|
// isShare () {
|
|
181
188
|
// return this.selfPropsObj.isShare;
|
|
182
189
|
// },
|
|
190
|
+
searchList () {
|
|
191
|
+
return this.selfPropsObj._searchList || []; // 级联表切层级表时 值会undefined覆盖selfPropsObj默认的[]
|
|
192
|
+
},
|
|
193
|
+
searchListMap () {
|
|
194
|
+
return this.$arrToMap(this.searchList, "_key");
|
|
195
|
+
},
|
|
196
|
+
searchListFields () {
|
|
197
|
+
return this.searchList.map(searchItem => searchItem._key);
|
|
198
|
+
},
|
|
199
|
+
searchLabelWidth () {
|
|
200
|
+
return this.selfPropsObj._searchLabelWidth;
|
|
201
|
+
},
|
|
183
202
|
contentHeight () {
|
|
184
203
|
return this.selfPropsObj._contentHeight;
|
|
185
204
|
},
|
|
@@ -301,6 +320,18 @@ export default {
|
|
|
301
320
|
};
|
|
302
321
|
},
|
|
303
322
|
|
|
323
|
+
searchFormList () {
|
|
324
|
+
return this.$filterList(this.searchListFields, this.columns).map(formItem => ({
|
|
325
|
+
...formItem,
|
|
326
|
+
...this.searchListMap[formItem._key],
|
|
327
|
+
_name: formItem._name
|
|
328
|
+
}));
|
|
329
|
+
},
|
|
330
|
+
isSearching () {
|
|
331
|
+
return this.searchFormList.length && this.advSearchObj.conditions.some(conditionItem =>
|
|
332
|
+
conditionItem.fieldValue.length && conditionItem.fieldValue.some(valItem => !this.$isEmptyData(valItem))
|
|
333
|
+
);
|
|
334
|
+
},
|
|
304
335
|
filterColumns () {
|
|
305
336
|
return this.columns.filter(col => this.$isAdvRelyShow(col, this.allListData, this.parentObj, true));
|
|
306
337
|
},
|
|
@@ -672,7 +703,8 @@ export default {
|
|
|
672
703
|
(col._oldReadonly ? !row.__old__ : true) && // 老数据行里某些列不可编辑
|
|
673
704
|
(row.__isQuote__ ? this.quoteDataCanEdit : true) && // 引用过来的数据是否可编辑
|
|
674
705
|
col._enterType !== "calculate" && // 计算的不可编辑
|
|
675
|
-
col._readonly !== true
|
|
706
|
+
col._readonly !== true && // 不能为只读
|
|
707
|
+
col.canEdit;
|
|
676
708
|
},
|
|
677
709
|
// 单元格最终编辑状态
|
|
678
710
|
getUnitCanEdit (col, row) {
|