bri-components 1.2.56 → 1.2.58
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 +2 -2
- package/src/components/controls/base/BriUpload/BriUpload.vue +1 -1
- package/src/components/controls/base/DshCascader/DshCascader.vue +49 -203
- package/src/components/controls/base/DshCascader/{cascaderModal.vue → components/cascaderModal.vue} +24 -32
- package/src/components/controls/base/DshCascader/{cascaderPicker.vue → components/cascaderPicker.vue} +25 -21
- package/src/components/controls/base/DshCascader/components/cascaderSimple.vue +141 -0
- package/src/components/controls/base/DshCoordinates.vue +1 -1
- package/src/components/controls/base/DshDate/DshDate.vue +1 -1
- package/src/components/controls/base/DshDate/DshDaterange.vue +1 -1
- package/src/components/controls/base/DshDivider.vue +1 -1
- package/src/components/controls/base/DshEditor.vue +1 -1
- package/src/components/controls/base/DshInput/BriInputs.vue +1 -1
- package/src/components/controls/base/DshInput/DshInput.vue +1 -1
- package/src/components/controls/base/DshNumber/DshNumber.vue +1 -1
- package/src/components/controls/base/DshNumber/DshNumberange.vue +1 -1
- package/src/components/controls/base/DshSelect/DshCheckbox.vue +1 -1
- package/src/components/controls/base/DshSelect/DshSelect.vue +1 -1
- package/src/components/controls/base/DshSwitch/switchMixin.js +1 -1
- package/src/components/controls/extra/themeColor.vue +1 -1
- package/src/components/controls/extra/themeIcon.vue +1 -1
- package/src/components/controls/{base/DshCascader → mixins}/cascaderMixin.js +19 -34
- package/src/components/controls/{base/DshCascader → mixins}/cascaderPickerMixin.js +52 -44
- package/src/components/controls/{base/DshSelect → mixins}/selectMixin.js +1 -1
- package/src/components/controls/senior/BriLabels.vue +1 -1
- package/src/components/controls/senior/DshPackage.vue +1 -1
- package/src/components/controls/senior/cascaderTable.vue +1 -1
- package/src/components/controls/senior/flatTable.vue +11 -6
- package/src/components/controls/senior/flatTableImportModal.vue +7 -36
- package/src/components/controls/senior/selectDepartments.vue +1 -1
- package/src/components/controls/senior/selectUsers/selectUsers.vue +1 -1
- package/src/components/controls/special/DshBack.vue +1 -1
- package/src/components/controls/special/DshUndeveloped.vue +1 -1
- package/src/components/form/DshAdvSearch.vue +1 -1
- package/src/components/list/DshBox/DshCard.vue +153 -38
- package/src/components/list/DshBox/DshPanel.vue +260 -93
- package/src/components/small/BriTooltip.vue +2 -2
- package/src/components/unit/DshFormUnit.vue +6 -18
- package/src/styles/components/index.less +0 -2
- package/src/styles/components/list/DshBox/DshCard.less +0 -59
- package/src/styles/components/list/DshBox/DshPanel.less +0 -107
- /package/src/components/controls/{controlMixin.js → mixins/controlMixin.js} +0 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="cascaderSimple">
|
|
3
|
+
<Cascader
|
|
4
|
+
:value="activeCodeValue"
|
|
5
|
+
:data="renderData"
|
|
6
|
+
:placeholder="selfPropsObj._placeholder"
|
|
7
|
+
:disabled="selfPropsObj._disabled"
|
|
8
|
+
:clearable="selfPropsObj._clearable"
|
|
9
|
+
:size="selfPropsObj._size"
|
|
10
|
+
:filterable="useFilter"
|
|
11
|
+
:render-format="renderFormat"
|
|
12
|
+
:change-on-select="changeOnSelect"
|
|
13
|
+
:transfer="selfPropsObj._transfer"
|
|
14
|
+
:transfer-class-name="selfPropsObj._transferClassName"
|
|
15
|
+
:load-data="loadData"
|
|
16
|
+
@on-visible-change="changeVisible"
|
|
17
|
+
@on-change="changeSelect"
|
|
18
|
+
@click.native="clickCascader"
|
|
19
|
+
>
|
|
20
|
+
<slot></slot>
|
|
21
|
+
</Cascader>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script>
|
|
26
|
+
import cascaderPickerMixin from "../../../mixins/cascaderPickerMixin.js";
|
|
27
|
+
|
|
28
|
+
export default {
|
|
29
|
+
name: "cascaderSimple",
|
|
30
|
+
mixins: [
|
|
31
|
+
cascaderPickerMixin
|
|
32
|
+
],
|
|
33
|
+
components: {},
|
|
34
|
+
props: {},
|
|
35
|
+
data () {
|
|
36
|
+
return {
|
|
37
|
+
renderAll: false
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
computed: {
|
|
41
|
+
selfPropsObj () {
|
|
42
|
+
return {
|
|
43
|
+
...this.propsObj
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
useFilter () {
|
|
47
|
+
// 多选暂不支持搜索,值得弄成false,不然出bug
|
|
48
|
+
return this.multipleMode ? false : this.filterable;
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
renderData () {
|
|
52
|
+
return this.renderAll
|
|
53
|
+
? this.data
|
|
54
|
+
: this.data.map(item => {
|
|
55
|
+
return {
|
|
56
|
+
...item,
|
|
57
|
+
children: []
|
|
58
|
+
};
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
created () {},
|
|
63
|
+
methods: {
|
|
64
|
+
// 动态加载数据
|
|
65
|
+
loadData (treeItem, cb) {
|
|
66
|
+
const linealDatas = this.$getTreeLinealDatas(treeItem.keys, this.data, undefined, this.saveKey);
|
|
67
|
+
const lastData = linealDatas.slice(-1)[0];
|
|
68
|
+
treeItem.children = lastData.children.map(item =>
|
|
69
|
+
({
|
|
70
|
+
...item,
|
|
71
|
+
children: []
|
|
72
|
+
})
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
cb();
|
|
76
|
+
},
|
|
77
|
+
// 点击级联框 如果是需要搜索,需要先渲染完多有节点,不然搜索起来
|
|
78
|
+
clickCascader () {
|
|
79
|
+
// if (
|
|
80
|
+
// !this.selfPropsObj._disabled &&
|
|
81
|
+
// this.useFilter === true &&
|
|
82
|
+
// this.renderAll === false &&
|
|
83
|
+
// !this.clickFlag
|
|
84
|
+
// ) {
|
|
85
|
+
// this.clickFlag = true; // 这个处理其实觉大概率没必要,有没有不受影响
|
|
86
|
+
// setTimeout(() => {
|
|
87
|
+
// this.renderAll = true;
|
|
88
|
+
// }, 0);
|
|
89
|
+
// }
|
|
90
|
+
},
|
|
91
|
+
// 展开和关闭弹窗时触发
|
|
92
|
+
changeVisible (bool) {
|
|
93
|
+
this.isVisible = bool;
|
|
94
|
+
|
|
95
|
+
if (this.isVisible === false) {
|
|
96
|
+
// 多选时
|
|
97
|
+
if (this.multipleMode) {
|
|
98
|
+
this.clickConfirm();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
// 选项变化
|
|
103
|
+
changeSelect (value, selectedOptions) {
|
|
104
|
+
if (this.isVisible || !value.length) {
|
|
105
|
+
const node = selectedOptions.slice(-1)[0] || {
|
|
106
|
+
keys: [],
|
|
107
|
+
loading: false
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
// 避免重复点击 -简易模式其实无效,不过为了代码对照好看
|
|
111
|
+
if (JSON.stringify(this.selectedValue) !== JSON.stringify(node.keys)) {
|
|
112
|
+
this.selectedValue = node.keys;
|
|
113
|
+
|
|
114
|
+
const obj = {
|
|
115
|
+
value: this.selectedValue,
|
|
116
|
+
selectedOptions: this.selectedOptions
|
|
117
|
+
};
|
|
118
|
+
this.$emit("change", obj);
|
|
119
|
+
node.loading === undefined && this.$emit("finish", obj);
|
|
120
|
+
|
|
121
|
+
// 单选时
|
|
122
|
+
if (!this.multipleMode) {
|
|
123
|
+
this.clickConfirm();
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
clickConfirm () {
|
|
129
|
+
if (this.selectedValue.length && this.selectedOptions.length) {
|
|
130
|
+
this.$emit("confirm", this.selectedValue, this.selectedOptions);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
</script>
|
|
136
|
+
|
|
137
|
+
<style lang="less">
|
|
138
|
+
.cascaderSimple {
|
|
139
|
+
|
|
140
|
+
}
|
|
141
|
+
</style>>
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
</template>
|
|
63
63
|
|
|
64
64
|
<script>
|
|
65
|
-
import controlMixin from "../../controlMixin.js";
|
|
65
|
+
import controlMixin from "../../mixins/controlMixin.js";
|
|
66
66
|
import BriInputNumber from "./BriInputNumber/BriInputNumber.vue";
|
|
67
67
|
import DshNumberange from "./DshNumberange.vue";
|
|
68
68
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import controlMixin from "
|
|
1
|
+
import controlMixin from "./controlMixin.js";
|
|
2
2
|
import { regionData, userIndustryData } from "bri-datas";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
@@ -15,35 +15,25 @@ export default {
|
|
|
15
15
|
const _joinSymbol = this.propsObj._joinSymbol || "/";
|
|
16
16
|
return {
|
|
17
17
|
_showMode: "default",
|
|
18
|
+
_saveKey: "_key",
|
|
19
|
+
_valueKey: "code",
|
|
20
|
+
_nameKey: "name",
|
|
18
21
|
_filterable: true,
|
|
19
22
|
_cascaderFilterVals: [], // 过滤级联数据,只保留的数组
|
|
20
|
-
_changeOnSelect: false, // 每级菜单都可取值
|
|
21
23
|
_renderFormat: (labels) => labels.join(_joinSymbol),
|
|
22
24
|
|
|
23
25
|
...this.propsObj,
|
|
24
26
|
...this.commonDealPropsObj,
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
_changeOnSelect: this.isOnSearch
|
|
29
|
+
? true
|
|
30
|
+
: this.propsObj._changeOnSelect == undefined ? false : this.propsObj._changeOnSelect, // 每级菜单都可取值 -默认取末级
|
|
29
31
|
_joinSymbol: _joinSymbol // 级联拼接符
|
|
30
32
|
};
|
|
31
33
|
},
|
|
32
34
|
showType () {
|
|
33
35
|
return this.selfPropsObj._showMode;
|
|
34
36
|
},
|
|
35
|
-
filterable () {
|
|
36
|
-
return this.selfPropsObj._filterable;
|
|
37
|
-
},
|
|
38
|
-
cascaderLevel () {
|
|
39
|
-
return this.selfPropsObj._cascaderLevel;
|
|
40
|
-
},
|
|
41
|
-
cascaderFilterVals () {
|
|
42
|
-
return this.selfPropsObj._cascaderFilterVals;
|
|
43
|
-
},
|
|
44
|
-
changeOnSelect () {
|
|
45
|
-
return this.isOnSearch ? true : this.selfPropsObj._changeOnSelect;
|
|
46
|
-
},
|
|
47
37
|
saveKey () {
|
|
48
38
|
return this.selfPropsObj._saveKey;
|
|
49
39
|
},
|
|
@@ -53,6 +43,12 @@ export default {
|
|
|
53
43
|
nameKey () {
|
|
54
44
|
return this.selfPropsObj._nameKey;
|
|
55
45
|
},
|
|
46
|
+
cascaderLevel () {
|
|
47
|
+
return this.selfPropsObj._cascaderLevel;
|
|
48
|
+
},
|
|
49
|
+
cascaderFilterVals () {
|
|
50
|
+
return this.selfPropsObj._cascaderFilterVals;
|
|
51
|
+
},
|
|
56
52
|
renderFormat () {
|
|
57
53
|
return this.selfPropsObj._renderFormat;
|
|
58
54
|
},
|
|
@@ -65,13 +61,13 @@ export default {
|
|
|
65
61
|
: this.selfPropsObj._data;
|
|
66
62
|
},
|
|
67
63
|
cascaderData () {
|
|
68
|
-
const loop = (
|
|
69
|
-
if (
|
|
70
|
-
|
|
64
|
+
const loop = (arr = [], level, parentKeys = [], filterVals = [], isMobile = false) => {
|
|
65
|
+
if (arr && filterVals.length) {
|
|
66
|
+
arr = arr.filter(item => filterVals.includes(item[this.saveKey]));
|
|
71
67
|
}
|
|
72
68
|
|
|
73
|
-
return
|
|
74
|
-
?
|
|
69
|
+
return arr
|
|
70
|
+
? arr.reduce((arr, item) => {
|
|
75
71
|
let newItem = {
|
|
76
72
|
keys: [...parentKeys, item[this.saveKey]], // !!此处就是用_key拼,不会用别的属性
|
|
77
73
|
code: [...parentKeys, item._key].join(""),
|
|
@@ -102,9 +98,7 @@ export default {
|
|
|
102
98
|
|
|
103
99
|
return loop(this.originData, this.cascaderLevel, undefined, this.cascaderFilterVals, this.isMobile);
|
|
104
100
|
},
|
|
105
|
-
|
|
106
|
-
return this.$getTreeLinealDatas(this.curValList, this.cascaderData, this.valueKey, this.saveKey);
|
|
107
|
-
},
|
|
101
|
+
|
|
108
102
|
curValName: {
|
|
109
103
|
get () {
|
|
110
104
|
return this.transformFullName(this.curValList);
|
|
@@ -131,15 +125,6 @@ export default {
|
|
|
131
125
|
},
|
|
132
126
|
created () { },
|
|
133
127
|
methods: {
|
|
134
|
-
// 点击选择框 进行选择
|
|
135
|
-
clickInput (e) {
|
|
136
|
-
if (!this.selfPropsObj._disabled) {
|
|
137
|
-
this.openModal();
|
|
138
|
-
} else {
|
|
139
|
-
e.stopPropagation();
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
|
|
143
128
|
// 点击清除
|
|
144
129
|
clickClear () {
|
|
145
130
|
this.curValList = [];
|
|
@@ -6,6 +6,10 @@ export default {
|
|
|
6
6
|
type: Boolean,
|
|
7
7
|
default: false
|
|
8
8
|
},
|
|
9
|
+
multipleMode: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: false
|
|
12
|
+
},
|
|
9
13
|
|
|
10
14
|
activeValue: {
|
|
11
15
|
type: Array,
|
|
@@ -13,10 +17,6 @@ export default {
|
|
|
13
17
|
return [];
|
|
14
18
|
}
|
|
15
19
|
},
|
|
16
|
-
activeStr: {
|
|
17
|
-
type: String,
|
|
18
|
-
default: ""
|
|
19
|
-
},
|
|
20
20
|
data: {
|
|
21
21
|
type: Array,
|
|
22
22
|
drfault () {
|
|
@@ -36,7 +36,9 @@ export default {
|
|
|
36
36
|
showMode: "default", // "flat", "default"
|
|
37
37
|
maxFlatModeSearchNum: 80,
|
|
38
38
|
|
|
39
|
+
inputStr: "",
|
|
39
40
|
selectedValue: [],
|
|
41
|
+
activeCodeValue: [],
|
|
40
42
|
|
|
41
43
|
operationMap: {
|
|
42
44
|
canCancel: {
|
|
@@ -71,12 +73,6 @@ export default {
|
|
|
71
73
|
...this.propsObj
|
|
72
74
|
};
|
|
73
75
|
},
|
|
74
|
-
filterable () {
|
|
75
|
-
return this.selfPropsObj._filterable;
|
|
76
|
-
},
|
|
77
|
-
changeOnSelect () {
|
|
78
|
-
return this.selfPropsObj._changeOnSelect;
|
|
79
|
-
},
|
|
80
76
|
saveKey () {
|
|
81
77
|
return this.selfPropsObj._saveKey;
|
|
82
78
|
},
|
|
@@ -86,12 +82,18 @@ export default {
|
|
|
86
82
|
nameKey () {
|
|
87
83
|
return this.selfPropsObj._nameKey;
|
|
88
84
|
},
|
|
89
|
-
renderFormat () {
|
|
90
|
-
return this.selfPropsObj._renderFormat;
|
|
91
|
-
},
|
|
92
85
|
resourceKey () {
|
|
93
86
|
return this.selfPropsObj._resourceKey;
|
|
94
87
|
},
|
|
88
|
+
filterable () {
|
|
89
|
+
return this.selfPropsObj._filterable;
|
|
90
|
+
},
|
|
91
|
+
changeOnSelect () {
|
|
92
|
+
return this.selfPropsObj._changeOnSelect;
|
|
93
|
+
},
|
|
94
|
+
renderFormat () {
|
|
95
|
+
return this.selfPropsObj._renderFormat;
|
|
96
|
+
},
|
|
95
97
|
|
|
96
98
|
canUseModeSwitch () {
|
|
97
99
|
return this.searchName.trim() &&
|
|
@@ -107,15 +109,8 @@ export default {
|
|
|
107
109
|
将不支持使用模式切换,因为此时平级方式不方便,不适用`;
|
|
108
110
|
},
|
|
109
111
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
return this.activeStr;
|
|
113
|
-
},
|
|
114
|
-
set (str) {
|
|
115
|
-
if (!str) {
|
|
116
|
-
this.$emit("clear", []);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
112
|
+
initData () {
|
|
113
|
+
return this.data;
|
|
119
114
|
},
|
|
120
115
|
matchFunc () {
|
|
121
116
|
return node => {
|
|
@@ -141,48 +136,44 @@ export default {
|
|
|
141
136
|
};
|
|
142
137
|
});
|
|
143
138
|
},
|
|
139
|
+
// activeCodeValue () {
|
|
140
|
+
// return this.$getTreeLinealDatas(this.activeValue, this.data, this.valueKey, this.saveKey);
|
|
141
|
+
// },
|
|
144
142
|
// 选中项 -各级数据对象集合
|
|
145
143
|
selectedOptions () {
|
|
146
144
|
return this.$getTreeLinealDatas(this.selectedValue, this.showTreeData, undefined, this.saveKey);
|
|
147
145
|
},
|
|
148
146
|
// 选中项 -最后一级数据对象
|
|
149
|
-
|
|
147
|
+
selectedObj () {
|
|
150
148
|
return this.selectedOptions.slice(-1)[0];
|
|
151
149
|
},
|
|
152
150
|
// 选中项 -名字
|
|
153
151
|
selectedName () {
|
|
154
|
-
return this.
|
|
152
|
+
return this.selectedObj ? this.selectedObj[this.nameKey] : "";
|
|
155
153
|
}
|
|
156
154
|
},
|
|
157
|
-
created () {
|
|
155
|
+
created () {
|
|
156
|
+
this.cascaderPickerInit();
|
|
157
|
+
},
|
|
158
158
|
methods: {
|
|
159
|
-
|
|
159
|
+
cascaderPickerInit () {
|
|
160
|
+
this.selectedValue = this.activeValue;
|
|
161
|
+
this.activeCodeValue = this.$getTreeLinealDatas(this.activeValue, this.data, this.valueKey, this.saveKey);
|
|
162
|
+
},
|
|
163
|
+
|
|
164
|
+
clickInput (e) {
|
|
160
165
|
if (!this.selfPropsObj._disabled) {
|
|
161
166
|
this.showModal = true;
|
|
167
|
+
} else {
|
|
168
|
+
e.stopPropagation();
|
|
162
169
|
}
|
|
163
170
|
},
|
|
164
|
-
clickItem (node) {
|
|
165
|
-
this.oldSelectedValue = this.selectedValue;
|
|
166
|
-
this.selectedValue = node.keys;
|
|
167
|
-
// 避免重复点击
|
|
168
|
-
if (JSON.stringify(this.selectedValue) !== JSON.stringify(this.oldSelectedValue)) {
|
|
169
|
-
const obj = {
|
|
170
|
-
value: this.selectedValue,
|
|
171
|
-
selectedOptions: this.selectedOptions,
|
|
172
|
-
tabIndex: this.curTabIndex
|
|
173
|
-
};
|
|
174
|
-
this.$emit("change", obj);
|
|
175
|
-
!node.children.length && this.$emit("finish", obj);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
this.clickItemCb && this.clickItemCb(node);
|
|
179
|
-
},
|
|
180
171
|
clickCancel () {
|
|
181
172
|
this.showModal = false;
|
|
182
173
|
},
|
|
183
174
|
clickConfirm () {
|
|
184
175
|
if (this.selectedValue.length && this.selectedOptions.length) {
|
|
185
|
-
if (!this.changeOnSelect && !this.
|
|
176
|
+
if (!this.changeOnSelect && !this.selectedObj.isLeaf) {
|
|
186
177
|
this.$Message.error({
|
|
187
178
|
content: "请选择到末级数据!",
|
|
188
179
|
duration: 2
|
|
@@ -196,7 +187,24 @@ export default {
|
|
|
196
187
|
duration: 2
|
|
197
188
|
});
|
|
198
189
|
}
|
|
190
|
+
},
|
|
191
|
+
getDescription (value = []) {
|
|
192
|
+
if (value.length) {
|
|
193
|
+
this.$https({
|
|
194
|
+
url: {
|
|
195
|
+
module: "sheet",
|
|
196
|
+
name: "getResourceDescription"
|
|
197
|
+
},
|
|
198
|
+
params: {
|
|
199
|
+
resourceKey: this.resourceKey,
|
|
200
|
+
nodeKeys: value
|
|
201
|
+
},
|
|
202
|
+
callback: data => {
|
|
203
|
+
this.description = data;
|
|
204
|
+
this.selectedObj.description = data;
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
}
|
|
199
208
|
}
|
|
200
|
-
|
|
201
209
|
}
|
|
202
210
|
};
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
</template>
|
|
69
69
|
|
|
70
70
|
<script>
|
|
71
|
-
import controlMixin from "../controlMixin.js";
|
|
71
|
+
import controlMixin from "../mixins/controlMixin.js";
|
|
72
72
|
import DshBtnModal from "../../small/DshBtnModal.vue";
|
|
73
73
|
import DshCascaderTable from "../../list/DshCascaderTable.vue";
|
|
74
74
|
|
|
@@ -82,12 +82,13 @@
|
|
|
82
82
|
:propsObj="propsObj"
|
|
83
83
|
:importParams="importParams"
|
|
84
84
|
@input="toggleBatchImportModal"
|
|
85
|
+
@importCb="importCb"
|
|
85
86
|
></flat-table-import-modal>
|
|
86
87
|
</div>
|
|
87
88
|
</template>
|
|
88
89
|
|
|
89
90
|
<script>
|
|
90
|
-
import controlMixin from "../controlMixin.js";
|
|
91
|
+
import controlMixin from "../mixins/controlMixin.js";
|
|
91
92
|
import DshBtnModal from "../../small/DshBtnModal.vue";
|
|
92
93
|
import BriFlatTable from "../../list/BriFlatTable.vue";
|
|
93
94
|
import flatTableImportModal from "./flatTableImportModal.vue";
|
|
@@ -166,9 +167,9 @@
|
|
|
166
167
|
if (this.propsObj._isExport) {
|
|
167
168
|
btnList.unshift("canExport");
|
|
168
169
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
170
|
+
if (this.propsObj._isImport && this.finalCanEdit) {
|
|
171
|
+
btnList.unshift("canImport");
|
|
172
|
+
}
|
|
172
173
|
|
|
173
174
|
return btnList;
|
|
174
175
|
},
|
|
@@ -185,10 +186,10 @@
|
|
|
185
186
|
created () {},
|
|
186
187
|
methods: {
|
|
187
188
|
clickBatchImport () {
|
|
188
|
-
|
|
189
|
+
this.openBatchImportModal();
|
|
189
190
|
},
|
|
190
191
|
openBatchImportModal () {
|
|
191
|
-
|
|
192
|
+
this.showBatchImportModal = true;
|
|
192
193
|
},
|
|
193
194
|
// 关闭批量导入模态框
|
|
194
195
|
closeBatchImportModal () {
|
|
@@ -249,6 +250,10 @@
|
|
|
249
250
|
}
|
|
250
251
|
});
|
|
251
252
|
},
|
|
253
|
+
// 回调- 导入成功
|
|
254
|
+
importCb (data) {
|
|
255
|
+
this.value[this.controlKey] = data;
|
|
256
|
+
},
|
|
252
257
|
|
|
253
258
|
// 校验方法 -供外部使用
|
|
254
259
|
validate () {
|