bri-components 1.3.30 → 1.3.32
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/lib/0.bri-components.min.js +1 -1
- package/lib/1.bri-components.min.js +1 -1
- package/lib/10.bri-components.min.js +1 -0
- package/lib/11.bri-components.min.js +1 -0
- package/lib/2.bri-components.min.js +1 -1
- package/lib/3.bri-components.min.js +1 -1
- package/lib/4.bri-components.min.js +1 -1
- package/lib/5.bri-components.min.js +1 -1
- package/lib/6.bri-components.min.js +1 -1
- package/lib/7.bri-components.min.js +1 -0
- package/lib/8.bri-components.min.js +1 -0
- package/lib/9.bri-components.min.js +1 -0
- package/lib/bri-components.min.js +16 -16
- package/package.json +1 -1
- package/src/components/controls/base/BriUpload/BriUpload.vue +2 -12
- package/src/components/controls/base/BriUpload/uploadList.vue +35 -31
- package/src/components/controls/senior/cascaderTable.vue +29 -173
- package/src/components/controls/senior/flatTable/flatTable.vue +55 -242
- package/src/components/controls/senior/selectUsers/selectUsers.vue +16 -13
- package/src/components/form/DshDefaultSearch.vue +1 -2
- package/src/components/list/DshCascaderTable.vue +231 -34
- package/src/components/list/DshFlatTable.vue +59 -1
- package/src/components/list/DshTreeTable.vue +263 -87
- package/src/components/{controls/senior/flatTable → list/common}/flatTableImportModal.vue +1 -9
- package/src/components/list/mixins/flatTableMixin.js +16 -48
- package/src/components/list/mixins/quoteListModal.vue +215 -0
- package/src/components/list/mixins/tableBaseMixin.js +349 -12
- package/src/styles/components/list/BriTable.less +26 -7
package/package.json
CHANGED
|
@@ -77,11 +77,11 @@
|
|
|
77
77
|
<!-- 编辑和查看 列表 -->
|
|
78
78
|
<slot name="list">
|
|
79
79
|
<upload-list
|
|
80
|
+
:showMode="showMode"
|
|
80
81
|
:canEdit="finalCanEdit"
|
|
81
82
|
:files="curValList"
|
|
82
|
-
:emptyShowVal="emptyShowVal"
|
|
83
|
-
:showMode="showMode"
|
|
84
83
|
:propsObj="propsObj"
|
|
84
|
+
:emptyShowVal="emptyShowVal"
|
|
85
85
|
@deleteItem="clickDeteItem"
|
|
86
86
|
></upload-list>
|
|
87
87
|
</slot>
|
|
@@ -370,16 +370,6 @@
|
|
|
370
370
|
height: 80px;
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
|
-
|
|
374
|
-
&-inline {
|
|
375
|
-
.bri-scrollbar6();
|
|
376
|
-
height: 48px;
|
|
377
|
-
line-height: 48px;
|
|
378
|
-
|
|
379
|
-
.item {
|
|
380
|
-
flex: 0 0 48px
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
373
|
}
|
|
384
374
|
}
|
|
385
375
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
>
|
|
2
|
+
<div :class="{
|
|
3
|
+
uploadList: true,
|
|
4
|
+
[`uploadList-${showMode}`]: true
|
|
5
|
+
}">
|
|
6
6
|
<!-- 普通文本模式 -->
|
|
7
7
|
<template v-if="showMode ==='old'">
|
|
8
8
|
<!-- 有值 -->
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
class="uploadList-nodata"
|
|
51
51
|
>
|
|
52
52
|
<Icon type="ios-time" />
|
|
53
|
-
<span>{{
|
|
53
|
+
<span>{{ noDataText }}</span>
|
|
54
54
|
</div>
|
|
55
55
|
</template>
|
|
56
56
|
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
v-else
|
|
94
94
|
class="uploadList-inline-nodata"
|
|
95
95
|
>
|
|
96
|
-
{{
|
|
96
|
+
{{ noDataText }}
|
|
97
97
|
</span>
|
|
98
98
|
</template>
|
|
99
99
|
</div>
|
|
@@ -106,6 +106,10 @@
|
|
|
106
106
|
export default {
|
|
107
107
|
name: "uploadList",
|
|
108
108
|
props: {
|
|
109
|
+
showMode: {
|
|
110
|
+
type: String,
|
|
111
|
+
default: "old" // inline, old, normal
|
|
112
|
+
},
|
|
109
113
|
canEdit: {
|
|
110
114
|
type: Boolean,
|
|
111
115
|
default: true
|
|
@@ -116,23 +120,19 @@
|
|
|
116
120
|
return [];
|
|
117
121
|
}
|
|
118
122
|
},
|
|
119
|
-
showMode: {
|
|
120
|
-
type: String,
|
|
121
|
-
default: "old" // inline, old, normal
|
|
122
|
-
},
|
|
123
|
-
emptyShowVal: String,
|
|
124
123
|
propsObj: {
|
|
125
124
|
type: Object,
|
|
126
125
|
default () {
|
|
127
126
|
return {};
|
|
128
127
|
}
|
|
129
|
-
}
|
|
128
|
+
},
|
|
129
|
+
emptyShowVal: String
|
|
130
130
|
},
|
|
131
131
|
computed: {
|
|
132
132
|
imageResizeConfig () {
|
|
133
133
|
return {};
|
|
134
134
|
},
|
|
135
|
-
|
|
135
|
+
noDataText () {
|
|
136
136
|
return this.canEdit
|
|
137
137
|
? `未上传${this.propsObj._fileType === "image" ? "图片" : "文件"}`
|
|
138
138
|
: this.emptyShowVal;
|
|
@@ -334,13 +334,13 @@
|
|
|
334
334
|
}
|
|
335
335
|
|
|
336
336
|
&-action {
|
|
337
|
-
background-color: @placeholderColor;
|
|
338
|
-
display: none !important;
|
|
339
337
|
position: absolute;
|
|
340
338
|
right: 0px;
|
|
341
339
|
top: 0px;
|
|
342
340
|
left: 0px;
|
|
343
341
|
bottom: 0px;
|
|
342
|
+
background-color: @placeholderColor;
|
|
343
|
+
display: none !important;
|
|
344
344
|
align-items: center;
|
|
345
345
|
justify-content: center;
|
|
346
346
|
|
|
@@ -349,7 +349,6 @@
|
|
|
349
349
|
height: 22px;
|
|
350
350
|
line-height: 22px;
|
|
351
351
|
color: #fff;
|
|
352
|
-
margin-left: 2px;
|
|
353
352
|
}
|
|
354
353
|
}
|
|
355
354
|
}
|
|
@@ -357,31 +356,25 @@
|
|
|
357
356
|
|
|
358
357
|
// 内部表格inline模式
|
|
359
358
|
&-inline {
|
|
360
|
-
height:
|
|
361
|
-
line-height:
|
|
359
|
+
height: 32px;
|
|
360
|
+
line-height: 32px;
|
|
362
361
|
|
|
363
362
|
&-list {
|
|
364
363
|
width: 100%;
|
|
365
364
|
height: 100%;
|
|
365
|
+
padding-left: 3px;
|
|
366
366
|
display: flex;
|
|
367
367
|
flex-wrap: nowrap;
|
|
368
368
|
overflow-x: auto;
|
|
369
369
|
overflow-y: hidden;
|
|
370
|
-
padding-left: 3px;
|
|
371
370
|
|
|
372
371
|
.item {
|
|
373
|
-
flex: 0 0
|
|
374
|
-
background: #f4f5fa;
|
|
372
|
+
flex: 0 0 32px;
|
|
375
373
|
margin-right: 3px;
|
|
376
|
-
position: relative;
|
|
377
374
|
border-radius: @borderRadius;
|
|
375
|
+
background: #f4f5fa;
|
|
378
376
|
text-align: center;
|
|
379
|
-
|
|
380
|
-
.item-action {
|
|
381
|
-
display: flex !important;
|
|
382
|
-
animation: toTop 0.1s;
|
|
383
|
-
}
|
|
384
|
-
}
|
|
377
|
+
position: relative;
|
|
385
378
|
|
|
386
379
|
img {
|
|
387
380
|
max-width: 100%;
|
|
@@ -390,18 +383,22 @@
|
|
|
390
383
|
}
|
|
391
384
|
|
|
392
385
|
&-action {
|
|
393
|
-
display: none !important;
|
|
394
386
|
position: absolute;
|
|
395
387
|
left: 0;
|
|
396
388
|
right: 0;
|
|
397
389
|
top: 0;
|
|
398
390
|
bottom: 0;
|
|
391
|
+
display: none !important;
|
|
399
392
|
background-color: @placeholderColor;
|
|
400
393
|
color: #fff;
|
|
401
394
|
align-items: center;
|
|
402
395
|
justify-content: center;
|
|
403
|
-
|
|
404
|
-
|
|
396
|
+
|
|
397
|
+
&-icon {
|
|
398
|
+
width: 18px;
|
|
399
|
+
height: 18px;
|
|
400
|
+
line-height: 18px;
|
|
401
|
+
color: #fff;
|
|
405
402
|
}
|
|
406
403
|
}
|
|
407
404
|
|
|
@@ -414,6 +411,13 @@
|
|
|
414
411
|
top: 0;
|
|
415
412
|
}
|
|
416
413
|
}
|
|
414
|
+
|
|
415
|
+
&:hover {
|
|
416
|
+
.item-action {
|
|
417
|
+
display: flex !important;
|
|
418
|
+
animation: toTop 0.1s;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
417
421
|
}
|
|
418
422
|
}
|
|
419
423
|
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
:parentObj="value"
|
|
29
29
|
@change="change"
|
|
30
30
|
></dsh-tree-table>
|
|
31
|
+
|
|
31
32
|
<dsh-cascader-table
|
|
32
33
|
v-else
|
|
33
34
|
:canEdit="finalCanEdit"
|
|
@@ -44,72 +45,33 @@
|
|
|
44
45
|
|
|
45
46
|
<!-- 正常使用 -->
|
|
46
47
|
<template v-else>
|
|
47
|
-
<!--
|
|
48
|
-
<dsh-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
:subColumns="subForm"
|
|
75
|
-
:propsObj="propsObj"
|
|
76
|
-
:parentFormList="allFormList"
|
|
77
|
-
:parentObj="value"
|
|
78
|
-
@change="change"
|
|
79
|
-
></dsh-cascader-table>
|
|
80
|
-
</template>
|
|
81
|
-
|
|
82
|
-
<!-- 全屏查看 -->
|
|
83
|
-
<dsh-modal
|
|
84
|
-
v-model="isEnlarge"
|
|
85
|
-
mode="custom"
|
|
86
|
-
:propsObj="modalPropsObj"
|
|
87
|
-
>
|
|
88
|
-
<template>
|
|
89
|
-
<dsh-tree-table
|
|
90
|
-
v-if="showMode === 'treeTable'"
|
|
91
|
-
:canEdit="finalCanEdit"
|
|
92
|
-
:data="curVal.tree"
|
|
93
|
-
:rowDefault="curVal.rowDefault"
|
|
94
|
-
:columns="subForm"
|
|
95
|
-
:propsObj="propsObj"
|
|
96
|
-
:parentFormList="allFormList"
|
|
97
|
-
:parentObj="value"
|
|
98
|
-
@change="change"
|
|
99
|
-
></dsh-tree-table>
|
|
100
|
-
<dsh-cascader-table
|
|
101
|
-
v-else
|
|
102
|
-
:canEdit="finalCanEdit"
|
|
103
|
-
:data="curVal"
|
|
104
|
-
:treeColumns="treeForm"
|
|
105
|
-
:subColumns="subForm"
|
|
106
|
-
:propsObj="propsObj"
|
|
107
|
-
:parentFormList="allFormList"
|
|
108
|
-
:parentObj="value"
|
|
109
|
-
@change="change"
|
|
110
|
-
></dsh-cascader-table>
|
|
111
|
-
</template>
|
|
112
|
-
</dsh-modal>
|
|
48
|
+
<!-- 层级表 -->
|
|
49
|
+
<dsh-tree-table
|
|
50
|
+
v-if="showMode === 'treeTable'"
|
|
51
|
+
ref="table"
|
|
52
|
+
:canEdit="finalCanEdit"
|
|
53
|
+
:data="curVal.tree"
|
|
54
|
+
:rowDefault="curVal.rowDefault"
|
|
55
|
+
:columns="subForm"
|
|
56
|
+
:propsObj="propsObj"
|
|
57
|
+
:parentFormList="allFormList"
|
|
58
|
+
:parentObj="value"
|
|
59
|
+
@change="change"
|
|
60
|
+
></dsh-tree-table>
|
|
61
|
+
|
|
62
|
+
<!-- 级联表 -->
|
|
63
|
+
<dsh-cascader-table
|
|
64
|
+
v-else
|
|
65
|
+
ref="table"
|
|
66
|
+
:canEdit="finalCanEdit"
|
|
67
|
+
:data="curVal"
|
|
68
|
+
:treeColumns="treeForm"
|
|
69
|
+
:subColumns="subForm"
|
|
70
|
+
:propsObj="propsObj"
|
|
71
|
+
:parentFormList="allFormList"
|
|
72
|
+
:parentObj="value"
|
|
73
|
+
@change="change"
|
|
74
|
+
></dsh-cascader-table>
|
|
113
75
|
</template>
|
|
114
76
|
</template>
|
|
115
77
|
</div>
|
|
@@ -133,29 +95,7 @@
|
|
|
133
95
|
},
|
|
134
96
|
props: {},
|
|
135
97
|
data () {
|
|
136
|
-
return {
|
|
137
|
-
isEnlarge: false,
|
|
138
|
-
timer: null,
|
|
139
|
-
|
|
140
|
-
operationMap: {
|
|
141
|
-
canExport: {
|
|
142
|
-
name: "导出",
|
|
143
|
-
type: "canExport",
|
|
144
|
-
icon: "md-share-alt",
|
|
145
|
-
size: "small",
|
|
146
|
-
btnType: "text",
|
|
147
|
-
event: "clickExport"
|
|
148
|
-
},
|
|
149
|
-
canEnlarge: {
|
|
150
|
-
name: "全屏展示",
|
|
151
|
-
type: "canEnlarge",
|
|
152
|
-
icon: "md-expand",
|
|
153
|
-
size: "small",
|
|
154
|
-
btnType: "text",
|
|
155
|
-
event: "clickEnlarge"
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
};
|
|
98
|
+
return {};
|
|
159
99
|
},
|
|
160
100
|
computed: {
|
|
161
101
|
selfPropsObj () {
|
|
@@ -163,7 +103,6 @@
|
|
|
163
103
|
_showMode: "default", // "default", "treeTable"
|
|
164
104
|
_subForm: [],
|
|
165
105
|
_treeForm: [],
|
|
166
|
-
_isExport: false,
|
|
167
106
|
...this.propsObj
|
|
168
107
|
};
|
|
169
108
|
},
|
|
@@ -179,23 +118,6 @@
|
|
|
179
118
|
? this.curVal._treeForm
|
|
180
119
|
: this.propsObj._treeForm;
|
|
181
120
|
},
|
|
182
|
-
isExport () {
|
|
183
|
-
return this.propsObj._isExport;
|
|
184
|
-
},
|
|
185
|
-
|
|
186
|
-
operationBtns () {
|
|
187
|
-
return this.isExport
|
|
188
|
-
? ["canExport", "canEnlarge"]
|
|
189
|
-
: ["canEnlarge"];
|
|
190
|
-
},
|
|
191
|
-
modalPropsObj () {
|
|
192
|
-
return {
|
|
193
|
-
title: this.controlName,
|
|
194
|
-
fullscreen: true,
|
|
195
|
-
showSlotClose: false,
|
|
196
|
-
closable: true
|
|
197
|
-
};
|
|
198
|
-
},
|
|
199
121
|
|
|
200
122
|
showVal () {
|
|
201
123
|
return `${this.curVal ? this.$getTreeLeafTotal(this.curVal.tree) : 0} 行`;
|
|
@@ -208,66 +130,9 @@
|
|
|
208
130
|
return this.$refs.table.validate();
|
|
209
131
|
},
|
|
210
132
|
|
|
211
|
-
// 点击导出
|
|
212
|
-
clickExport (operationItem) {
|
|
213
|
-
operationItem.disabled = true;
|
|
214
|
-
this.handleExport(operationItem);
|
|
215
|
-
},
|
|
216
|
-
// 打开全屏模态框
|
|
217
|
-
clickEnlarge () {
|
|
218
|
-
this.isEnlarge = true;
|
|
219
|
-
},
|
|
220
133
|
// 发生变动
|
|
221
134
|
change (...params) {
|
|
222
135
|
this.$emit("change", ...params);
|
|
223
|
-
},
|
|
224
|
-
|
|
225
|
-
// 接口 -导出级联表
|
|
226
|
-
handleExport (operationItem) {
|
|
227
|
-
this.$https({
|
|
228
|
-
url: {
|
|
229
|
-
module: "sheet",
|
|
230
|
-
name: "exportCascaderTableExcel"
|
|
231
|
-
},
|
|
232
|
-
params: {
|
|
233
|
-
_key: this.controlKey,
|
|
234
|
-
_id: this.value._id
|
|
235
|
-
},
|
|
236
|
-
callback: data => {
|
|
237
|
-
this.timer = setInterval(() => {
|
|
238
|
-
this.getJobStatusData(operationItem, data.jobId, data.excel_url);
|
|
239
|
-
}, 1000);
|
|
240
|
-
}
|
|
241
|
-
});
|
|
242
|
-
},
|
|
243
|
-
// 接口 -
|
|
244
|
-
getJobStatusData (operationItem, id, url) {
|
|
245
|
-
this.$https({
|
|
246
|
-
url: {
|
|
247
|
-
module: "sheet",
|
|
248
|
-
name: "getJobStatus"
|
|
249
|
-
},
|
|
250
|
-
params: {
|
|
251
|
-
jobId: id
|
|
252
|
-
},
|
|
253
|
-
callback: data => {
|
|
254
|
-
operationItem.disabled = false;
|
|
255
|
-
|
|
256
|
-
if (data.status === "completed") {
|
|
257
|
-
clearInterval(this.timer);
|
|
258
|
-
window.location.href = data.url;
|
|
259
|
-
} else if (data.status === "failed") {
|
|
260
|
-
clearInterval(this.timer);
|
|
261
|
-
this.$Message.info({
|
|
262
|
-
content: "操作失败,请稍后再试"
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
},
|
|
266
|
-
error: data => {
|
|
267
|
-
operationItem.disabled = false;
|
|
268
|
-
this.timer = null;
|
|
269
|
-
}
|
|
270
|
-
});
|
|
271
136
|
}
|
|
272
137
|
}
|
|
273
138
|
};
|
|
@@ -282,14 +147,5 @@
|
|
|
282
147
|
|
|
283
148
|
}
|
|
284
149
|
}
|
|
285
|
-
|
|
286
|
-
&-btns {
|
|
287
|
-
text-align: right;
|
|
288
|
-
color: @textColor;
|
|
289
|
-
|
|
290
|
-
&-item {
|
|
291
|
-
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
150
|
}
|
|
295
151
|
</style>
|