bri-components 1.5.12 → 1.5.14
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.5.
|
|
3
|
+
"version": "1.5.14",
|
|
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.4.0",
|
|
36
36
|
"jshint": "^2.12.0",
|
|
37
37
|
"jsonlint": "^1.6.3",
|
|
38
38
|
"minio": "7.1.0",
|
|
@@ -451,18 +451,14 @@
|
|
|
451
451
|
}
|
|
452
452
|
},
|
|
453
453
|
getBtns (fileItem) {
|
|
454
|
-
|
|
454
|
+
return ["image", "application/pdf", "text/plain"].some(type => fileItem.mimetype.includes(type)) ||
|
|
455
455
|
fileItem.mimetype.includes("wordprocessingml.document") ||
|
|
456
456
|
fileItem.mimetype.includes("application/msword") ||
|
|
457
457
|
fileItem.mimetype.includes("presentationml.presentation") ||
|
|
458
458
|
fileItem.mimetype.includes("application/vnd.ms-powerpoint") ||
|
|
459
|
-
fileItem.mimetype.includes("spreadsheetml.sheet")
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
}
|
|
463
|
-
else {
|
|
464
|
-
["canDelete", "canEdit", "canDownload"];
|
|
465
|
-
}
|
|
459
|
+
fileItem.mimetype.includes("spreadsheetml.sheet")
|
|
460
|
+
? undefined
|
|
461
|
+
: ["canDelete", "canEdit", "canDownload"];
|
|
466
462
|
}
|
|
467
463
|
}
|
|
468
464
|
};
|
|
@@ -70,12 +70,14 @@
|
|
|
70
70
|
components: {},
|
|
71
71
|
props: {},
|
|
72
72
|
data () {
|
|
73
|
-
return {
|
|
73
|
+
return {
|
|
74
|
+
checkList: []
|
|
75
|
+
};
|
|
74
76
|
},
|
|
75
77
|
computed: {},
|
|
76
78
|
created () {},
|
|
77
79
|
methods: {
|
|
78
|
-
changeCheck (checkList, curItem) {
|
|
80
|
+
changeCheck (checkList = [], curItem) {
|
|
79
81
|
// 不是末级节点 -点击后是选中状态话,把子孙后代节点全部展开;点击后是取消勾选状态话,把子孙后代节点全部收起来
|
|
80
82
|
if (!curItem.isLeaf) {
|
|
81
83
|
const loop = (node = { children: [] }) => {
|
|
@@ -85,19 +87,17 @@
|
|
|
85
87
|
loop(curItem);
|
|
86
88
|
}
|
|
87
89
|
|
|
88
|
-
this.
|
|
89
|
-
|
|
90
|
-
return newNodeArr.every(newNode => !node.code.startsWith(newNode.code))
|
|
91
|
-
? [
|
|
92
|
-
...newNodeArr,
|
|
93
|
-
node
|
|
94
|
-
]
|
|
95
|
-
: newNodeArr;
|
|
96
|
-
}, [])
|
|
97
|
-
.map(node => node.keys);
|
|
90
|
+
this.confirmed = false;
|
|
91
|
+
this.checkList = checkList;
|
|
98
92
|
},
|
|
99
93
|
clickConfirm () {
|
|
100
|
-
|
|
94
|
+
if (this.confirmed === false) {
|
|
95
|
+
this.selectedValueArr = this.checkList.filter(node => !!node.checked).map(node => node.keys);
|
|
96
|
+
this.$emit("confirmMul", this.selectedValueArr, this.selectedOptionsArr);
|
|
97
|
+
this.confirmed = true;
|
|
98
|
+
} else {
|
|
99
|
+
this.clickCancel();
|
|
100
|
+
}
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import controlMixin from "./controlMixin.js";
|
|
2
|
-
import { resourceData,
|
|
2
|
+
import { resourceData, regionDataMap, userIndustryData } from "bri-datas";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
mixins: [
|
|
@@ -14,7 +14,7 @@ export default {
|
|
|
14
14
|
basePropsObj () {
|
|
15
15
|
const _joinSymbol = this.propsObj._joinSymbol || "/";
|
|
16
16
|
return {
|
|
17
|
-
_regionType: "default", // "default", "benji"
|
|
17
|
+
_regionType: "default", // "default", "benji"
|
|
18
18
|
_showMode: "default", // "default", "custom", "simple"
|
|
19
19
|
_searchShowMode: undefined, // "tree", "default", "custom", "simple"
|
|
20
20
|
|
|
@@ -87,9 +87,7 @@ export default {
|
|
|
87
87
|
return ["userIndustry"].includes(this.controlType)
|
|
88
88
|
? userIndustryData
|
|
89
89
|
: ["region", "regions"].includes(this.controlType)
|
|
90
|
-
? this.subType
|
|
91
|
-
? benjiRegionData
|
|
92
|
-
: regionData
|
|
90
|
+
? regionDataMap[this.subType] || regionDataMap.default
|
|
93
91
|
: this.selfPropsObj._data;
|
|
94
92
|
},
|
|
95
93
|
cascaderAllData () {
|
|
@@ -264,7 +262,16 @@ export default {
|
|
|
264
262
|
},
|
|
265
263
|
// 多选 -整体多选的回调
|
|
266
264
|
confirmMulCb (selectedValueArr, selectedOptionsArr) {
|
|
267
|
-
this.curValList =
|
|
265
|
+
this.curValList = ["eq", "ne"].includes(this.value.fieldOperator)
|
|
266
|
+
? [...selectedValueArr]
|
|
267
|
+
: selectedValueArr.reduce((newNodeArr, node, nodeIndex) => (
|
|
268
|
+
newNodeArr.every(newNode => !node.join("").startsWith(newNode.join("")))
|
|
269
|
+
? [
|
|
270
|
+
...newNodeArr,
|
|
271
|
+
node
|
|
272
|
+
]
|
|
273
|
+
: newNodeArr
|
|
274
|
+
), []);
|
|
268
275
|
|
|
269
276
|
this.closeModal();
|
|
270
277
|
},
|
package/src/data/index.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
resourceData, regionData, benjiRegionData, userIndustryData,
|
|
3
|
-
dynDateData
|
|
4
|
-
} from "bri-datas";
|
|
5
|
-
|
|
6
1
|
export {
|
|
7
|
-
resourceData
|
|
8
|
-
dynDateData
|
|
9
|
-
};
|
|
2
|
+
resourceData
|
|
3
|
+
// regionDataMap, userIndustryData, dynDateData
|
|
4
|
+
} from "bri-datas";
|