bri-components 1.2.53 → 1.2.54
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/DshCascader/DshCascader.vue +246 -302
- package/src/components/controls/base/DshCascader/InfoCascader.vue +112 -86
- package/src/components/controls/base/DshCascader/cascaderMixin.js +187 -0
- package/src/components/controls/base/DshCascader/cascaderPicker.vue +530 -0
- package/src/components/controls/base/DshEditor.vue +1 -1
- package/src/components/controls/controlMixin.js +14 -4
- package/src/components/controls/senior/selectDepartments.vue +0 -8
- package/src/components/controls/senior/selectUsers/{DepartmentMenu.vue → departMenu.vue} +26 -16
- package/src/components/controls/senior/selectUsers/selectUsers.vue +5 -12
- package/src/components/list/DshBox/DshCrossTable.vue +1 -1
- package/src/components/small/BriTooltip.vue +6 -0
- package/src/index.js +2 -2
- package/src/styles/components/index.less +0 -1
- package/src/styles/components/list/DshBox/DshCrossTable.less +32 -22
- package/src/styles/components/small/BriTooltip.less +0 -25
- package/src/styles/global/base.less +3 -3
- package/src/styles/global/control.less +3 -3
- package/src/styles/reset-iview-other.less +21 -0
package/package.json
CHANGED
|
@@ -1,246 +1,244 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
>
|
|
22
|
-
<bri-control-input
|
|
23
|
-
:class="{
|
|
24
|
-
...commonClass,
|
|
25
|
-
'DshCascader-edit-multiple-edit': true,
|
|
26
|
-
'DshCascader-row-edit': isFullRow && multipleMode
|
|
27
|
-
}"
|
|
28
|
-
:canEdit="finalCanEdit"
|
|
29
|
-
:value="curValNameList"
|
|
30
|
-
:inputIcon="inputIcon"
|
|
31
|
-
:propsObj="selfPropsObj"
|
|
32
|
-
@deleteItem="clickDeleteItem"
|
|
33
|
-
@clear="clickClear"
|
|
34
|
-
@click.native="clickInput"
|
|
35
|
-
></bri-control-input>
|
|
36
|
-
</Cascader>
|
|
37
|
-
</template>
|
|
38
|
-
|
|
39
|
-
<!-- 单选 -->
|
|
40
|
-
<template v-else>
|
|
41
|
-
<!-- 弹框方式 -->
|
|
42
|
-
<template v-if="showMode === 'custom'">
|
|
43
|
-
<bri-control-input
|
|
44
|
-
:class="{
|
|
45
|
-
...commonClass,
|
|
46
|
-
'DshCascader-edit-custom': true
|
|
47
|
-
}"
|
|
48
|
-
:canEdit="finalCanEdit"
|
|
49
|
-
:value="curValName"
|
|
50
|
-
:inputIcon="inputIcon"
|
|
51
|
-
:propsObj="selfPropsObj"
|
|
52
|
-
@clear="clickClear"
|
|
53
|
-
@click.native="openModal"
|
|
54
|
-
></bri-control-input>
|
|
2
|
+
<!-- 单选模式 编辑 -->
|
|
3
|
+
<div
|
|
4
|
+
v-if="!multipleMode && canEdit"
|
|
5
|
+
class="DshCascader"
|
|
6
|
+
>
|
|
7
|
+
<!-- 弹框方式 -->
|
|
8
|
+
<template v-if="showType === 'custom'">
|
|
9
|
+
<bri-control-input
|
|
10
|
+
:class="{
|
|
11
|
+
...commonClass,
|
|
12
|
+
'DshCascader-custom': true
|
|
13
|
+
}"
|
|
14
|
+
:canEdit="finalCanEdit"
|
|
15
|
+
:value="curValName"
|
|
16
|
+
:inputIcon="inputIcon"
|
|
17
|
+
:propsObj="selfPropsObj"
|
|
18
|
+
@clear="clickClear"
|
|
19
|
+
@click.native="clickInput"
|
|
20
|
+
></bri-control-input>
|
|
55
21
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
</template>
|
|
22
|
+
<!-- 弹框 -->
|
|
23
|
+
<cascader-modal
|
|
24
|
+
:showModal="showModal"
|
|
25
|
+
v-model="curValList"
|
|
26
|
+
:data="cascaderData"
|
|
27
|
+
:propsObj="selfPropsObj"
|
|
28
|
+
@close="closeModal"
|
|
29
|
+
@change="change"
|
|
30
|
+
></cascader-modal>
|
|
31
|
+
</template>
|
|
67
32
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
</template>
|
|
89
|
-
</template>
|
|
33
|
+
<!-- 简洁方式 -->
|
|
34
|
+
<template v-else-if="showType === 'simple'">
|
|
35
|
+
<Cascader
|
|
36
|
+
class="DshCascader-simple"
|
|
37
|
+
:value="curValList"
|
|
38
|
+
:data="renderCascaderData"
|
|
39
|
+
:placeholder="selfPropsObj._placeholder"
|
|
40
|
+
:disabled="selfPropsObj._disabled"
|
|
41
|
+
:change-on-select="changeOnSelect"
|
|
42
|
+
:clearable="selfPropsObj._clearable"
|
|
43
|
+
:size="selfPropsObj._size"
|
|
44
|
+
:filterable="selfPropsObj._filterable"
|
|
45
|
+
:render-format="renderFormat"
|
|
46
|
+
:transfer="selfPropsObj._transfer"
|
|
47
|
+
:transfer-class-name="selfPropsObj._transferClassName"
|
|
48
|
+
:load-data="loadData"
|
|
49
|
+
@on-visible-change="visibleChange"
|
|
50
|
+
@on-change="changeVal"
|
|
51
|
+
@click="clickCascader"
|
|
52
|
+
></Cascader>
|
|
90
53
|
</template>
|
|
91
54
|
|
|
92
|
-
<!--
|
|
55
|
+
<!-- 确认面板方式 -->
|
|
93
56
|
<template v-else>
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
'DshCascader-row-show': !isUnitShow && isFullRow && multipleMode
|
|
106
|
-
}">
|
|
107
|
-
<!-- 有值 -->
|
|
108
|
-
<dsh-tags
|
|
109
|
-
v-if="!$isEmptyData(curValList)"
|
|
110
|
-
class="text"
|
|
111
|
-
:list="curValNameList"
|
|
112
|
-
></dsh-tags>
|
|
57
|
+
<cascader-picker
|
|
58
|
+
class="DshCascader-simple"
|
|
59
|
+
v-model="showModal"
|
|
60
|
+
:activeValue="curValList"
|
|
61
|
+
:activeStr="curValName"
|
|
62
|
+
:data="cascaderData"
|
|
63
|
+
:propsObj="selfPropsObj"
|
|
64
|
+
@confirm="clickConfirm"
|
|
65
|
+
></cascader-picker>
|
|
66
|
+
</template>
|
|
67
|
+
</div>
|
|
113
68
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
69
|
+
<!-- 单选模式 查看 -->
|
|
70
|
+
<div
|
|
71
|
+
v-else-if="!multipleMode && !canEdit"
|
|
72
|
+
class="DshCascader"
|
|
73
|
+
>
|
|
74
|
+
<!-- 有值 -->
|
|
75
|
+
<bri-tooltip
|
|
76
|
+
v-if="!$isEmptyData(curValList)"
|
|
77
|
+
:content="showVal"
|
|
78
|
+
placement="top"
|
|
79
|
+
maxWidth="200"
|
|
80
|
+
:transfer="true"
|
|
81
|
+
>
|
|
82
|
+
<div :class="{
|
|
83
|
+
...commonClass
|
|
84
|
+
}">
|
|
85
|
+
{{ showVal }}
|
|
86
|
+
</div>
|
|
87
|
+
</bri-tooltip>
|
|
121
88
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
89
|
+
<!-- 无值 -->
|
|
90
|
+
<div
|
|
91
|
+
v-else
|
|
92
|
+
:class="{
|
|
93
|
+
...commonClass
|
|
94
|
+
}"
|
|
95
|
+
>
|
|
96
|
+
{{ emptyShowVal }}
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
<!-- 多选模式 编辑 -->
|
|
101
|
+
<div
|
|
102
|
+
v-else-if="multipleMode && canEdit"
|
|
103
|
+
class="DshCascaders"
|
|
104
|
+
>
|
|
105
|
+
<!-- 简洁方式 -->
|
|
106
|
+
<template v-if="showType === 'simple'">
|
|
107
|
+
<!-- 多选 多选的filterable必须是false,不然出bug -->
|
|
108
|
+
<Cascader
|
|
109
|
+
class="DshCascaders-wrap"
|
|
110
|
+
:value="multipleSelectVal"
|
|
111
|
+
:data="renderCascaderData"
|
|
112
|
+
:disabled="selfPropsObj._disabled"
|
|
113
|
+
:change-on-select="changeOnSelect"
|
|
114
|
+
:clearable="selfPropsObj._clearable"
|
|
115
|
+
:size="selfPropsObj._size"
|
|
116
|
+
:filterable="false"
|
|
117
|
+
:transfer="selfPropsObj._transfer"
|
|
118
|
+
:transfer-class-name="selfPropsObj._transferClassName"
|
|
119
|
+
:load-data="loadData"
|
|
120
|
+
@on-visible-change="multipleVisibleChange"
|
|
121
|
+
@on-change="createItem"
|
|
122
|
+
>
|
|
123
|
+
<bri-control-input
|
|
124
|
+
:class="{
|
|
131
125
|
...commonClass,
|
|
132
|
-
'
|
|
133
|
-
}"
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
126
|
+
'DshCascaders-input-row': isFullRow
|
|
127
|
+
}"
|
|
128
|
+
:canEdit="finalCanEdit"
|
|
129
|
+
:value="curValNameList"
|
|
130
|
+
:inputIcon="inputIcon"
|
|
131
|
+
:propsObj="selfPropsObj"
|
|
132
|
+
@deleteItem="clickDeleteItem"
|
|
133
|
+
@clear="clickClear"
|
|
134
|
+
@click.native="clickInput"
|
|
135
|
+
></bri-control-input>
|
|
136
|
+
</Cascader>
|
|
137
|
+
</template>
|
|
138
|
+
|
|
139
|
+
<!-- 确认面板方式 -->
|
|
140
|
+
<template v-else>
|
|
141
|
+
<cascader-picker
|
|
142
|
+
class="DshCascader-simple"
|
|
143
|
+
v-model="showModal"
|
|
144
|
+
:data="cascaderData"
|
|
145
|
+
:propsObj="selfPropsObj"
|
|
146
|
+
@confirm="clickConfirm"
|
|
147
|
+
>
|
|
148
|
+
<bri-control-input
|
|
149
|
+
:class="{
|
|
150
|
+
...commonClass,
|
|
151
|
+
'DshCascaders-input-row': isFullRow
|
|
152
|
+
}"
|
|
153
|
+
:canEdit="finalCanEdit"
|
|
154
|
+
:value="curValNameList"
|
|
155
|
+
:inputIcon="inputIcon"
|
|
156
|
+
:propsObj="selfPropsObj"
|
|
157
|
+
@deleteItem="clickDeleteItem"
|
|
158
|
+
@clear="clickClear"
|
|
159
|
+
@click.native="clickInput"
|
|
160
|
+
></bri-control-input>
|
|
161
|
+
</cascader-picker>
|
|
138
162
|
</template>
|
|
139
163
|
</div>
|
|
140
|
-
</template>
|
|
141
164
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
165
|
+
<!-- 多选模式 查看 -->
|
|
166
|
+
<div
|
|
167
|
+
v-else
|
|
168
|
+
class="DshCascaders-show"
|
|
169
|
+
>
|
|
170
|
+
<!-- 有值 -->
|
|
171
|
+
<bri-tooltip
|
|
172
|
+
v-if="!$isEmptyData(curValList)"
|
|
173
|
+
:content="showMulVal"
|
|
174
|
+
placement="top"
|
|
175
|
+
maxWidth="200"
|
|
176
|
+
:transfer="true"
|
|
177
|
+
>
|
|
178
|
+
<div :class="{
|
|
179
|
+
...commonClass,
|
|
180
|
+
'DshCascader-show-row': isFullRow && !isUnitShow
|
|
181
|
+
}">
|
|
182
|
+
<dsh-tags
|
|
183
|
+
class="text"
|
|
184
|
+
:list="curValNameList"
|
|
185
|
+
></dsh-tags>
|
|
186
|
+
</div>
|
|
187
|
+
</bri-tooltip>
|
|
146
188
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
};
|
|
159
|
-
if (!level || level > item.level) {
|
|
160
|
-
newItem.children = loop(item.children, level, newItem.codeArr);
|
|
161
|
-
newItem.children.length && (newItem.loading = false); // 此代码为了所请求的级出现继续加载的箭头图标
|
|
162
|
-
} else {
|
|
163
|
-
newItem.children = [];
|
|
164
|
-
}
|
|
165
|
-
arr.push(newItem);
|
|
189
|
+
<!-- 无值 -->
|
|
190
|
+
<div
|
|
191
|
+
v-else
|
|
192
|
+
:class="{
|
|
193
|
+
...commonClass
|
|
194
|
+
}"
|
|
195
|
+
>
|
|
196
|
+
{{ emptyShowVal }}
|
|
197
|
+
</div>
|
|
198
|
+
</div>
|
|
199
|
+
</template>
|
|
166
200
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
201
|
+
<script>
|
|
202
|
+
import cascaderMixin from "./cascaderMixin.js";
|
|
203
|
+
import cascaderPicker from "./cascaderPicker.vue";
|
|
204
|
+
import cascaderModal from "./InfoCascader.vue";
|
|
171
205
|
|
|
172
206
|
export default {
|
|
173
207
|
name: "DshCascader",
|
|
174
208
|
mixins: [
|
|
175
|
-
|
|
209
|
+
cascaderMixin
|
|
176
210
|
],
|
|
177
211
|
components: {
|
|
178
|
-
|
|
212
|
+
cascaderPicker,
|
|
213
|
+
cascaderModal
|
|
179
214
|
},
|
|
180
215
|
props: {},
|
|
181
216
|
data () {
|
|
182
217
|
return {
|
|
218
|
+
curSelectVal: [],
|
|
219
|
+
|
|
183
220
|
renderDataFlag: true,
|
|
184
221
|
clickInputFlag: true,
|
|
185
222
|
isVisible: false,
|
|
186
|
-
multipleSelectVal: []
|
|
187
|
-
selectVal: [],
|
|
188
|
-
|
|
189
|
-
showModal: false
|
|
223
|
+
multipleSelectVal: [] // 必须要,每次选完之后再选,需清空上次选的
|
|
190
224
|
};
|
|
191
225
|
},
|
|
192
226
|
computed: {
|
|
193
|
-
// 级联拼接符
|
|
194
|
-
joinSymbol () {
|
|
195
|
-
return this.propsObj._joinSymbol || "/";
|
|
196
|
-
},
|
|
197
|
-
nameKey () {
|
|
198
|
-
return this.propsObj._nameKey || "name";
|
|
199
|
-
},
|
|
200
|
-
|
|
201
227
|
selfPropsObj () {
|
|
202
228
|
return {
|
|
203
|
-
_showMode:
|
|
204
|
-
_filterable: true,
|
|
205
|
-
_changeOnSelect: false,
|
|
206
|
-
_renderFormat: (label) => label.join(this.joinSymbol),
|
|
229
|
+
_showMode: "default", // 只有单选模式有效,值为"default", "custom", "simple"
|
|
207
230
|
_transfer: true,
|
|
208
231
|
|
|
209
|
-
...this.
|
|
210
|
-
...this.commonDealPropsObj
|
|
232
|
+
...this.basePropsObj
|
|
211
233
|
};
|
|
212
234
|
},
|
|
213
|
-
|
|
214
|
-
changeOnSelect () {
|
|
215
|
-
return this.isOnSearch ? true : this.selfPropsObj._changeOnSelect;
|
|
216
|
-
},
|
|
217
|
-
cascaderLevel () {
|
|
218
|
-
return this.selfPropsObj._cascaderLevel;
|
|
219
|
-
},
|
|
220
|
-
cascaderFilterVals () {
|
|
221
|
-
return this.selfPropsObj._cascaderFilterVals;
|
|
222
|
-
},
|
|
223
|
-
// 只有单选模式有效
|
|
224
|
-
showMode () {
|
|
235
|
+
showType () {
|
|
225
236
|
return this.selfPropsObj._showMode;
|
|
226
237
|
},
|
|
227
238
|
inputIcon () {
|
|
228
239
|
return this.isVisible ? "ios-arrow-up" : "ios-arrow-down";
|
|
229
240
|
},
|
|
230
241
|
|
|
231
|
-
originData () {
|
|
232
|
-
return ["region", "regions"].includes(this.controlType)
|
|
233
|
-
? regionData
|
|
234
|
-
: ["userIndustry"].includes(this.controlType)
|
|
235
|
-
? userIndustryData
|
|
236
|
-
: this.selfPropsObj._data;
|
|
237
|
-
},
|
|
238
|
-
cascaderData: {
|
|
239
|
-
get () {
|
|
240
|
-
return loop(this.originData, this.cascaderLevel, undefined, this.cascaderFilterVals);
|
|
241
|
-
},
|
|
242
|
-
set () {}
|
|
243
|
-
},
|
|
244
242
|
renderCascaderData () {
|
|
245
243
|
return this.renderDataFlag
|
|
246
244
|
? this.cascaderData.map(item => {
|
|
@@ -250,90 +248,24 @@
|
|
|
250
248
|
};
|
|
251
249
|
})
|
|
252
250
|
: this.cascaderData;
|
|
253
|
-
},
|
|
254
|
-
curValName () {
|
|
255
|
-
return this.$getTreeLinealDatas(this.curValList, this.cascaderData, this.nameKey).join(this.joinSymbol);
|
|
256
|
-
},
|
|
257
|
-
showVal () {
|
|
258
|
-
return this.$isEmptyData(this.curValList)
|
|
259
|
-
? this.emptyShowVal
|
|
260
|
-
: this.curValName;
|
|
261
|
-
},
|
|
262
|
-
// 多选用
|
|
263
|
-
curValNameList () {
|
|
264
|
-
return this.curValList.map(item =>
|
|
265
|
-
this.$getTreeLinealDatas(item, this.cascaderData, this.nameKey).join(this.joinSymbol)
|
|
266
|
-
);
|
|
267
|
-
},
|
|
268
|
-
showMulVal () {
|
|
269
|
-
return this.$isEmptyData(this.curValList)
|
|
270
|
-
? this.emptyShowVal
|
|
271
|
-
: this.curValNameList.join("、");
|
|
272
251
|
}
|
|
273
252
|
},
|
|
274
253
|
created () {},
|
|
275
254
|
methods: {
|
|
276
255
|
// 动态加载数据
|
|
277
256
|
loadData (treeItem, cb) {
|
|
278
|
-
let list = this.$getTreeLinealDatas(treeItem.
|
|
279
|
-
treeItem.children = list[list.length - 1]
|
|
257
|
+
let list = this.$getTreeLinealDatas(treeItem.keys, this.cascaderData, undefined, this.saveKey);
|
|
258
|
+
treeItem.children = list[list.length - 1]
|
|
259
|
+
? list[list.length - 1].children.map(item =>
|
|
260
|
+
({
|
|
261
|
+
...item,
|
|
262
|
+
children: []
|
|
263
|
+
})
|
|
264
|
+
)
|
|
265
|
+
: [];
|
|
280
266
|
|
|
281
267
|
cb();
|
|
282
268
|
},
|
|
283
|
-
// 点击清除
|
|
284
|
-
clickClear () {
|
|
285
|
-
this.curValList = [];
|
|
286
|
-
},
|
|
287
|
-
|
|
288
|
-
/* --------- 多选模式 -------- */
|
|
289
|
-
clickInput (e) {
|
|
290
|
-
if (!this.finalCanEdit) {
|
|
291
|
-
e.stopPropagation();
|
|
292
|
-
}
|
|
293
|
-
},
|
|
294
|
-
// 展开和关闭弹窗时触发
|
|
295
|
-
multipleVisibleChange (bool) {
|
|
296
|
-
this.isVisible = bool;
|
|
297
|
-
|
|
298
|
-
if (bool === false) {
|
|
299
|
-
if (this.selectVal.length) {
|
|
300
|
-
if (this.curValList.some(item => JSON.stringify(item) === JSON.stringify(this.selectVal))) {
|
|
301
|
-
this.$Message.error({
|
|
302
|
-
content: `"${this.$getTreeLinealDatas(this.selectVal, this.cascaderData, this.nameKey).join(this.joinSymbol)}"已选择,请勿重复选择!`,
|
|
303
|
-
duration: 5
|
|
304
|
-
});
|
|
305
|
-
} else {
|
|
306
|
-
this.curValList = [...this.curValList, this.selectVal];
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
this.selectVal = [];
|
|
311
|
-
this.multipleSelectVal = [];
|
|
312
|
-
}
|
|
313
|
-
},
|
|
314
|
-
// 添加
|
|
315
|
-
createItem (selectVal, ...params) {
|
|
316
|
-
if (this.isVisible) {
|
|
317
|
-
this.selectVal = selectVal;
|
|
318
|
-
}
|
|
319
|
-
},
|
|
320
|
-
// 删除
|
|
321
|
-
clickDeleteItem (item, index) {
|
|
322
|
-
this.curValList.splice(index, 1);
|
|
323
|
-
this.curValList = [...this.curValList];
|
|
324
|
-
},
|
|
325
|
-
|
|
326
|
-
/* -------- 单选模式 -弹窗方式 ------- */
|
|
327
|
-
// 弹窗方式的 -打开模态框
|
|
328
|
-
openModal () {
|
|
329
|
-
if (this.finalCanEdit) {
|
|
330
|
-
this.showModal = true;
|
|
331
|
-
}
|
|
332
|
-
},
|
|
333
|
-
// 弹窗方式的 -关闭模态框
|
|
334
|
-
toggleModal (bool) {
|
|
335
|
-
this.showModal = bool;
|
|
336
|
-
},
|
|
337
269
|
|
|
338
270
|
/* -------- 单选模式 -输入框方式 ------- */
|
|
339
271
|
// 默认方式的
|
|
@@ -367,6 +299,25 @@
|
|
|
367
299
|
if (this.isVisible || !val.length) {
|
|
368
300
|
this.curValList = val;
|
|
369
301
|
}
|
|
302
|
+
},
|
|
303
|
+
|
|
304
|
+
/* --------- 多选模式 -------- */
|
|
305
|
+
// 展开和关闭弹窗时触发
|
|
306
|
+
multipleVisibleChange (bool) {
|
|
307
|
+
this.isVisible = bool;
|
|
308
|
+
|
|
309
|
+
if (bool === false) {
|
|
310
|
+
this.clickConfirm();
|
|
311
|
+
|
|
312
|
+
this.curSelectVal = [];
|
|
313
|
+
this.multipleSelectVal = [];
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
// 添加
|
|
317
|
+
createItem (val, ...params) {
|
|
318
|
+
if (this.isVisible) {
|
|
319
|
+
this.curSelectVal = val;
|
|
320
|
+
}
|
|
370
321
|
}
|
|
371
322
|
},
|
|
372
323
|
watch: {
|
|
@@ -381,47 +332,40 @@
|
|
|
381
332
|
.DshCascader {
|
|
382
333
|
width: 100%;
|
|
383
334
|
|
|
384
|
-
|
|
335
|
+
//新模式
|
|
336
|
+
&-custom {
|
|
337
|
+
width: 100%;
|
|
338
|
+
}
|
|
385
339
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
340
|
+
// 简单模式
|
|
341
|
+
&-simple {
|
|
342
|
+
width: 100%;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
389
345
|
|
|
390
|
-
|
|
391
|
-
|
|
346
|
+
// 多选
|
|
347
|
+
.DshCascaders {
|
|
348
|
+
&-wrap {
|
|
349
|
+
width: 100%;
|
|
350
|
+
}
|
|
392
351
|
|
|
393
|
-
|
|
394
|
-
&-
|
|
395
|
-
width: 100%;
|
|
396
|
-
}
|
|
352
|
+
&-input {
|
|
353
|
+
&-row {
|
|
397
354
|
|
|
398
|
-
// 单选 -默认模式
|
|
399
|
-
&-single {
|
|
400
|
-
width: 100%;
|
|
401
355
|
}
|
|
402
356
|
}
|
|
403
357
|
|
|
404
|
-
// 查看
|
|
405
358
|
&-show {
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
&-single {}
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
// 多选类型且独自一行时
|
|
412
|
-
&-row {
|
|
413
|
-
&-edit {}
|
|
414
|
-
|
|
415
|
-
&-show {
|
|
416
|
-
height: auto;
|
|
359
|
+
height: auto;
|
|
417
360
|
|
|
361
|
+
&-row {
|
|
418
362
|
.text,
|
|
419
363
|
.overflow {
|
|
364
|
+
.bri-scrollbar3();
|
|
420
365
|
width: 100%;
|
|
421
366
|
height: 100%;
|
|
422
367
|
white-space: normal;
|
|
423
368
|
overflow: auto;
|
|
424
|
-
.bri-scrollbar3();
|
|
425
369
|
}
|
|
426
370
|
}
|
|
427
371
|
}
|