bri-components 1.3.5 → 1.3.7
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bri-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.7",
|
|
4
4
|
"author": "dengshanghui",
|
|
5
5
|
"description": "a component lib for vue project",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"ali-oss": "^6.13.1",
|
|
34
34
|
"axios": "^0.23.0",
|
|
35
|
-
"bri-datas": "^1.
|
|
35
|
+
"bri-datas": "^1.1.27",
|
|
36
36
|
"jshint": "^2.12.0",
|
|
37
37
|
"jsonlint": "^1.6.3",
|
|
38
38
|
"minio": "7.1.0",
|
|
@@ -73,7 +73,7 @@ export default {
|
|
|
73
73
|
? userIndustryData
|
|
74
74
|
: this.selfPropsObj._data;
|
|
75
75
|
},
|
|
76
|
-
|
|
76
|
+
cascaderAllData () {
|
|
77
77
|
const loop = (arr = [], level, parentKeys = [], filterVals = [], isMobile = false) => {
|
|
78
78
|
if (filterVals.length) {
|
|
79
79
|
arr = arr.filter(item =>
|
|
@@ -115,6 +115,30 @@ export default {
|
|
|
115
115
|
|
|
116
116
|
return loop(this.originData, this.cascaderLevel, undefined, this.cascaderFilterVals, this.isMobile);
|
|
117
117
|
},
|
|
118
|
+
cascaderData () {
|
|
119
|
+
const loop = (arr = [], isMobile) => {
|
|
120
|
+
return arr
|
|
121
|
+
? arr.reduce((arr, item) => {
|
|
122
|
+
if (item.rm !== 1) {
|
|
123
|
+
let newItem = {
|
|
124
|
+
...item
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
if (newItem.children && newItem.children.length) {
|
|
128
|
+
newItem.children = loop(newItem.children, isMobile);
|
|
129
|
+
} else {
|
|
130
|
+
newItem.children = isMobile ? undefined : [];
|
|
131
|
+
}
|
|
132
|
+
arr.push(newItem);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
return arr;
|
|
136
|
+
}, [])
|
|
137
|
+
: [];
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
return loop(this.cascaderAllData, this.isMobile);
|
|
141
|
+
},
|
|
118
142
|
|
|
119
143
|
curValObj () {
|
|
120
144
|
return this.getItemObj(this.curValList);
|
|
@@ -180,7 +204,7 @@ export default {
|
|
|
180
204
|
|
|
181
205
|
/* --------- 工具类 -------- */
|
|
182
206
|
getItemObj (val) {
|
|
183
|
-
const objArr = this.$getTreeLinealDatas(val, this.
|
|
207
|
+
const objArr = this.$getTreeLinealDatas(val, this.cascaderAllData, undefined, this.saveKey);
|
|
184
208
|
|
|
185
209
|
return !this.$isEmptyData(val)
|
|
186
210
|
? objArr.length
|
|
@@ -215,7 +239,7 @@ export default {
|
|
|
215
239
|
},
|
|
216
240
|
// 转化出级联全名
|
|
217
241
|
transformFullName (val) {
|
|
218
|
-
return this.renderFormat(this.$getTreeLinealDatas(val, this.
|
|
242
|
+
return this.renderFormat(this.$getTreeLinealDatas(val, this.cascaderAllData, this.nameKey, this.saveKey));
|
|
219
243
|
}
|
|
220
244
|
}
|
|
221
245
|
};
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
"users", "departments", "labels", "flatTable", "reference", "referenceBy"
|
|
171
171
|
],
|
|
172
172
|
ignoreProperties: [
|
|
173
|
-
"_name", "_key", "_default", "_required", "_span", "_br", "_line", "_noLabel", "_clearable",
|
|
173
|
+
"_name", "_key", "_default", "_required", "_span", "_br", "_line", "_noLabel", "_clearable",
|
|
174
174
|
"_disabledBtns", "_disabledOldDataRow"
|
|
175
175
|
],
|
|
176
176
|
subIgnoreProperties: [
|
|
@@ -305,7 +305,7 @@
|
|
|
305
305
|
Object.entries({
|
|
306
306
|
...formData,
|
|
307
307
|
_displayType: "show",
|
|
308
|
-
canEdit:
|
|
308
|
+
canEdit: !["createdAt", "updatedAt", "_creaters"].includes(formData._key)
|
|
309
309
|
}).forEach(arr => {
|
|
310
310
|
!this.ignoreProperties.includes(arr[0]) && (formData.__parentKey__ ? !this.subIgnoreProperties.includes(arr[0]) : true) &&
|
|
311
311
|
this.$set(formItem, arr[0], arr[1]);
|
|
@@ -362,7 +362,7 @@
|
|
|
362
362
|
this.showRuleMessage = true;
|
|
363
363
|
|
|
364
364
|
return this.listData.every(dataItem =>
|
|
365
|
-
this.filterColumns.every(col => this.getRuleResult(col, dataItem
|
|
365
|
+
this.filterColumns.every(col => this.getRuleResult(col, dataItem).bool)
|
|
366
366
|
);
|
|
367
367
|
},
|
|
368
368
|
// 点击 -添加行
|
|
@@ -435,8 +435,8 @@
|
|
|
435
435
|
row[col._key] !== oldRow[col._key];
|
|
436
436
|
},
|
|
437
437
|
// 是否显示 单元格校验提示文字
|
|
438
|
-
getRuleResult (col, row
|
|
439
|
-
if ((this.ruleRecordMap[`${row._id}dsh${col._key}`] || {}).showRuleMessage || showRuleMessage) {
|
|
438
|
+
getRuleResult (col, row) {
|
|
439
|
+
if ((this.ruleRecordMap[`${row._id}dsh${col._key}`] || {}).showRuleMessage || this.showRuleMessage) {
|
|
440
440
|
return this.$getFieldRuleResult(col, row);
|
|
441
441
|
} else {
|
|
442
442
|
return {
|