bri-components 1.3.5 → 1.3.6
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.6",
|
|
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,26 @@ 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 = []) => {
|
|
120
|
+
return arr
|
|
121
|
+
? arr.reduce((arr, item) => {
|
|
122
|
+
if (item.rm !== 1) {
|
|
123
|
+
if (item.children && item.children.length) {
|
|
124
|
+
item.children = loop(item.children);
|
|
125
|
+
} else {
|
|
126
|
+
item.children = this.isMobile ? undefined : [];
|
|
127
|
+
}
|
|
128
|
+
arr.push(item);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return arr;
|
|
132
|
+
}, [])
|
|
133
|
+
: [];
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
return loop(this.cascaderAllData);
|
|
137
|
+
},
|
|
118
138
|
|
|
119
139
|
curValObj () {
|
|
120
140
|
return this.getItemObj(this.curValList);
|
|
@@ -180,7 +200,7 @@ export default {
|
|
|
180
200
|
|
|
181
201
|
/* --------- 工具类 -------- */
|
|
182
202
|
getItemObj (val) {
|
|
183
|
-
const objArr = this.$getTreeLinealDatas(val, this.
|
|
203
|
+
const objArr = this.$getTreeLinealDatas(val, this.cascaderAllData, undefined, this.saveKey);
|
|
184
204
|
|
|
185
205
|
return !this.$isEmptyData(val)
|
|
186
206
|
? objArr.length
|
|
@@ -215,7 +235,7 @@ export default {
|
|
|
215
235
|
},
|
|
216
236
|
// 转化出级联全名
|
|
217
237
|
transformFullName (val) {
|
|
218
|
-
return this.renderFormat(this.$getTreeLinealDatas(val, this.
|
|
238
|
+
return this.renderFormat(this.$getTreeLinealDatas(val, this.cascaderAllData, this.nameKey, this.saveKey));
|
|
219
239
|
}
|
|
220
240
|
}
|
|
221
241
|
};
|
|
@@ -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 {
|