bri-components 1.3.6 → 1.3.8
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 +0 -1
- package/src/components/controls/mixins/cascaderMixin.js +10 -6
- package/src/components/controls/senior/flatTable.vue +1 -0
- package/src/components/controls/senior/selectUsers/selectUsers.vue +46 -1
- package/src/components/form/DshForm.vue +2 -2
- package/src/components/list/BriFlatTable.vue +87 -170
- package/src/components/list/DshBox/DshList.vue +122 -0
- package/src/components/list/DshBox/DshTable.vue +11 -4
- package/src/components/list/DshCascaderTable.vue +105 -118
- package/src/components/small/DshTabs.vue +161 -36
- package/src/styles/components/index.less +0 -2
- package/src/styles/components/list/BriTable.less +96 -68
- package/src/utils/table.js +140 -82
- package/src/styles/components/list/DshBox/DshList.less +0 -119
- package/src/styles/components/list/DshBox/DshTable.less +0 -23
package/package.json
CHANGED
|
@@ -116,16 +116,20 @@ export default {
|
|
|
116
116
|
return loop(this.originData, this.cascaderLevel, undefined, this.cascaderFilterVals, this.isMobile);
|
|
117
117
|
},
|
|
118
118
|
cascaderData () {
|
|
119
|
-
const loop = (arr = []) => {
|
|
119
|
+
const loop = (arr = [], isMobile) => {
|
|
120
120
|
return arr
|
|
121
121
|
? arr.reduce((arr, item) => {
|
|
122
122
|
if (item.rm !== 1) {
|
|
123
|
-
|
|
124
|
-
item
|
|
123
|
+
let newItem = {
|
|
124
|
+
...item
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
if (newItem.children && newItem.children.length) {
|
|
128
|
+
newItem.children = loop(newItem.children, isMobile);
|
|
125
129
|
} else {
|
|
126
|
-
|
|
130
|
+
newItem.children = isMobile ? undefined : [];
|
|
127
131
|
}
|
|
128
|
-
arr.push(
|
|
132
|
+
arr.push(newItem);
|
|
129
133
|
}
|
|
130
134
|
|
|
131
135
|
return arr;
|
|
@@ -133,7 +137,7 @@ export default {
|
|
|
133
137
|
: [];
|
|
134
138
|
};
|
|
135
139
|
|
|
136
|
-
return loop(this.cascaderAllData);
|
|
140
|
+
return loop(this.cascaderAllData, this.isMobile);
|
|
137
141
|
},
|
|
138
142
|
|
|
139
143
|
curValObj () {
|
|
@@ -290,7 +290,9 @@
|
|
|
290
290
|
highSearch () {
|
|
291
291
|
return this.isOnSearch ? true : this.selfPropsObj._highSearch;
|
|
292
292
|
},
|
|
293
|
-
|
|
293
|
+
isCompAdmin () {
|
|
294
|
+
return (JSON.parse(sessionStorage.getItem("userData")) || {}).isCompAdmin || this.selfPropsObj._isCompAdmin;
|
|
295
|
+
},
|
|
294
296
|
curCheckAll () {
|
|
295
297
|
return this.userList.length && this.userList.every(userItem =>
|
|
296
298
|
this.newValList.some(newItem => newItem._key === userItem._key)
|
|
@@ -340,6 +342,8 @@
|
|
|
340
342
|
if (departmentItem._key === "_highSearch") {
|
|
341
343
|
this.userList = this.hightUsers;
|
|
342
344
|
this.total = 1;
|
|
345
|
+
} else if (departmentItem._key === "_resign") {
|
|
346
|
+
this.getResignListData();
|
|
343
347
|
} else {
|
|
344
348
|
this.getUserListData();
|
|
345
349
|
}
|
|
@@ -412,6 +416,35 @@
|
|
|
412
416
|
}
|
|
413
417
|
});
|
|
414
418
|
},
|
|
419
|
+
getResignListData () {
|
|
420
|
+
this.userList = [];
|
|
421
|
+
|
|
422
|
+
this.$https({
|
|
423
|
+
url: {
|
|
424
|
+
module: "company",
|
|
425
|
+
name: "userResign"
|
|
426
|
+
},
|
|
427
|
+
params: {
|
|
428
|
+
search: {
|
|
429
|
+
realname: this.searchData.name
|
|
430
|
+
? {
|
|
431
|
+
$regex: `.*${this.$speciaWord(this.searchData.name)}.*`,
|
|
432
|
+
$options: "i"
|
|
433
|
+
}
|
|
434
|
+
: undefined
|
|
435
|
+
},
|
|
436
|
+
pagination: {
|
|
437
|
+
page: this.pagePropsObj.page,
|
|
438
|
+
pagesize: this.pagePropsObj.pagesize
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
loadingName: "loading",
|
|
442
|
+
callback: data => {
|
|
443
|
+
this.userList = data.list;
|
|
444
|
+
this.total = data.total;
|
|
445
|
+
}
|
|
446
|
+
});
|
|
447
|
+
},
|
|
415
448
|
getDepartmentListData () {
|
|
416
449
|
this.$https({
|
|
417
450
|
url: {
|
|
@@ -435,6 +468,18 @@
|
|
|
435
468
|
]
|
|
436
469
|
: []
|
|
437
470
|
),
|
|
471
|
+
...(
|
|
472
|
+
this.highSearch && this.isCompAdmin
|
|
473
|
+
? [
|
|
474
|
+
{
|
|
475
|
+
is_leaf: true,
|
|
476
|
+
level: 1,
|
|
477
|
+
name: "离职人员",
|
|
478
|
+
_key: "_resign"
|
|
479
|
+
}
|
|
480
|
+
]
|
|
481
|
+
: []
|
|
482
|
+
),
|
|
438
483
|
{
|
|
439
484
|
is_leaf: true,
|
|
440
485
|
level: 1,
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
"users", "departments", "labels", "flatTable", "reference", "referenceBy"
|
|
171
171
|
],
|
|
172
172
|
ignoreProperties: [
|
|
173
|
-
"_name", "_key", "_default", "_required", "_span", "_br", "_line", "_noLabel", "_clearable",
|
|
173
|
+
"_name", "_key", "_default", "_required", "_span", "_br", "_line", "_noLabel", "_clearable",
|
|
174
174
|
"_disabledBtns", "_disabledOldDataRow"
|
|
175
175
|
],
|
|
176
176
|
subIgnoreProperties: [
|
|
@@ -305,7 +305,7 @@
|
|
|
305
305
|
Object.entries({
|
|
306
306
|
...formData,
|
|
307
307
|
_displayType: "show",
|
|
308
|
-
canEdit:
|
|
308
|
+
canEdit: !["createdAt", "updatedAt", "_creaters"].includes(formData._key)
|
|
309
309
|
}).forEach(arr => {
|
|
310
310
|
!this.ignoreProperties.includes(arr[0]) && (formData.__parentKey__ ? !this.subIgnoreProperties.includes(arr[0]) : true) &&
|
|
311
311
|
this.$set(formItem, arr[0], arr[1]);
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<!-- 添加行 -->
|
|
14
14
|
<dsh-buttons
|
|
15
15
|
class="BriFlatTable-create"
|
|
16
|
-
:list="$getOperationList(['
|
|
16
|
+
:list="$getOperationList(['canCreate'])"
|
|
17
17
|
@click="$dispatchEvent($event, null, null, listData)"
|
|
18
18
|
></dsh-buttons>
|
|
19
19
|
</div>
|
|
@@ -112,16 +112,19 @@
|
|
|
112
112
|
return {
|
|
113
113
|
isShare: false, // 是否是分享页在用
|
|
114
114
|
|
|
115
|
-
|
|
115
|
+
_showRequired: true, // 表头显示校验符号*
|
|
116
|
+
_showDescription: true, // 表头显示提示
|
|
117
|
+
_headHeightAuto: false, // 表头高度自适应
|
|
118
|
+
_heightAuto: false, // 单元格高度自适应
|
|
116
119
|
_useSelection: false, // 使用选择列
|
|
117
120
|
_useIndex: true, // 使用序号列
|
|
118
121
|
_useSummary: false, // 使用汇总行
|
|
119
122
|
_disabledBtns: false, // 禁用增删按钮
|
|
120
123
|
_disabledCreateBtn: false, // 置灰新增按钮,目前只内部使用,comp_web数据表配置页那块
|
|
121
124
|
_disabledOldDataRow: false, // 置灰老数据行包含删除
|
|
122
|
-
|
|
125
|
+
...this.propsObj,
|
|
123
126
|
|
|
124
|
-
|
|
127
|
+
_contentHeight: this.propsObj._contentHeight || 500 // 表格最大高度
|
|
125
128
|
};
|
|
126
129
|
},
|
|
127
130
|
isShare () {
|
|
@@ -130,6 +133,18 @@
|
|
|
130
133
|
contentHeight () {
|
|
131
134
|
return this.selfPropsObj._contentHeight;
|
|
132
135
|
},
|
|
136
|
+
showRequired () {
|
|
137
|
+
return this.selfPropsObj._showRequired;
|
|
138
|
+
},
|
|
139
|
+
showDescription () {
|
|
140
|
+
return this.selfPropsObj._showDescription;
|
|
141
|
+
},
|
|
142
|
+
headHeightAuto () {
|
|
143
|
+
return this.selfPropsObj._headHeightAuto;
|
|
144
|
+
},
|
|
145
|
+
heightAuto () {
|
|
146
|
+
return this.selfPropsObj._heightAuto;
|
|
147
|
+
},
|
|
133
148
|
useSelection () {
|
|
134
149
|
return this.selfPropsObj._useSelection;
|
|
135
150
|
},
|
|
@@ -148,15 +163,12 @@
|
|
|
148
163
|
disabledOldDataRow () {
|
|
149
164
|
return this.selfPropsObj._disabledOldDataRow;
|
|
150
165
|
},
|
|
151
|
-
heightAuto () {
|
|
152
|
-
return this.selfPropsObj._heightAuto;
|
|
153
|
-
},
|
|
154
166
|
|
|
155
167
|
useCampare () {
|
|
156
168
|
return !!this.oldListData.length;
|
|
157
169
|
},
|
|
158
170
|
filterColumns () {
|
|
159
|
-
return this.columns.filter(colItem => this.$isAdvRelyShow(colItem, this.outObj));
|
|
171
|
+
return this.columns.filter(colItem => this.$isAdvRelyShow(colItem, this.outObj, true));
|
|
160
172
|
},
|
|
161
173
|
showColumns () {
|
|
162
174
|
const operationList = this.$getOperationList(["delete"]);
|
|
@@ -192,95 +204,70 @@
|
|
|
192
204
|
: []
|
|
193
205
|
),
|
|
194
206
|
|
|
195
|
-
...this.$transformToColumns(
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
canEdit: this.getUnitCanEdit(column, row),
|
|
230
|
-
formData: row,
|
|
231
|
-
formItem: this.resetCol(item),
|
|
232
|
-
rowIndex: rowIndex,
|
|
233
|
-
parentData: this.listData
|
|
234
|
-
},
|
|
235
|
-
on: {
|
|
236
|
-
blur: () => this.controlBlur(null, column, row, arguments),
|
|
237
|
-
change: () => this.$dispatchEvent(this.operationMap.changeVal, column, row, rowIndex, arguments)
|
|
238
|
-
}
|
|
239
|
-
}),
|
|
240
|
-
|
|
241
|
-
!this.getRuleResult(column, row).bool
|
|
242
|
-
? h("span", {
|
|
243
|
-
class: "table-row-td-tip"
|
|
244
|
-
}, this.getRuleResult(column, row).message)
|
|
245
|
-
: undefined
|
|
246
|
-
];
|
|
247
|
-
},
|
|
248
|
-
renderHeaderCell: ({ column }, h) => {
|
|
249
|
-
return h("span", {
|
|
250
|
-
style: {
|
|
251
|
-
position: "relative"
|
|
252
|
-
}
|
|
253
|
-
}, [
|
|
254
|
-
column._required && h("i", {
|
|
255
|
-
style: {
|
|
256
|
-
position: "absolute",
|
|
257
|
-
top: "2px",
|
|
258
|
-
left: "-10px",
|
|
259
|
-
color: "#ed4014"
|
|
260
|
-
}
|
|
261
|
-
}, "*"),
|
|
262
|
-
|
|
263
|
-
h("span", column.title),
|
|
264
|
-
|
|
265
|
-
column._description && h("Tooltip", {
|
|
266
|
-
style: {
|
|
267
|
-
display: "inline-block"
|
|
268
|
-
},
|
|
269
|
-
props: {
|
|
270
|
-
content: column._description,
|
|
271
|
-
transfer: true,
|
|
272
|
-
maxWidth: 200
|
|
273
|
-
},
|
|
274
|
-
scopedSlots: {
|
|
275
|
-
default: props => h("i", {
|
|
276
|
-
class: "table-head-description ivu-icon bico-font bico-explain"
|
|
207
|
+
...this.$transformToColumns(
|
|
208
|
+
this.filterColumns.map(item => ({
|
|
209
|
+
filter: undefined,
|
|
210
|
+
sortBy: undefined,
|
|
211
|
+
renderBodyCell: ({ row, column, rowIndex }, h) => {
|
|
212
|
+
return [
|
|
213
|
+
this.isShowCompare(column, row, this.oldListData[rowIndex])
|
|
214
|
+
? h("Tooltip", {
|
|
215
|
+
style: {
|
|
216
|
+
width: "100%"
|
|
217
|
+
},
|
|
218
|
+
props: {
|
|
219
|
+
content: this.$isEmptyData(this.oldListData[rowIndex][column._key])
|
|
220
|
+
? ""
|
|
221
|
+
: this.oldListData[rowIndex][column._key],
|
|
222
|
+
transfer: true,
|
|
223
|
+
maxWidth: 200,
|
|
224
|
+
placement: "top"
|
|
225
|
+
},
|
|
226
|
+
scopedSlots: {
|
|
227
|
+
default: props => h("dsh-list-unit", {
|
|
228
|
+
props: {
|
|
229
|
+
canEdit: this.getUnitCanEdit(column, row),
|
|
230
|
+
formData: row,
|
|
231
|
+
formItem: this.resetCol(item),
|
|
232
|
+
rowIndex: rowIndex,
|
|
233
|
+
parentData: this.listData
|
|
234
|
+
},
|
|
235
|
+
on: {
|
|
236
|
+
blur: () => this.controlBlur(null, column, row, arguments),
|
|
237
|
+
change: () => this.$dispatchEvent(this.operationMap.changeVal, column, row, rowIndex, arguments)
|
|
238
|
+
}
|
|
239
|
+
})
|
|
240
|
+
}
|
|
277
241
|
})
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
242
|
+
: h("dsh-list-unit", {
|
|
243
|
+
props: {
|
|
244
|
+
canEdit: this.getUnitCanEdit(column, row),
|
|
245
|
+
formData: row,
|
|
246
|
+
formItem: this.resetCol(item),
|
|
247
|
+
rowIndex: rowIndex,
|
|
248
|
+
parentData: this.listData
|
|
249
|
+
},
|
|
250
|
+
on: {
|
|
251
|
+
blur: () => this.controlBlur(null, column, row, arguments),
|
|
252
|
+
change: () => this.$dispatchEvent(this.operationMap.changeVal, column, row, rowIndex, arguments)
|
|
253
|
+
}
|
|
254
|
+
}),
|
|
255
|
+
|
|
256
|
+
!this.getRuleResult(column, row).bool
|
|
257
|
+
? h("span", {
|
|
258
|
+
class: "bri-table-td-tip"
|
|
259
|
+
}, this.getRuleResult(column, row).message)
|
|
260
|
+
: undefined
|
|
261
|
+
];
|
|
262
|
+
},
|
|
263
|
+
...item
|
|
264
|
+
})),
|
|
265
|
+
{
|
|
266
|
+
showRequired: this.showRequired,
|
|
267
|
+
showDescription: this.showDescription,
|
|
268
|
+
headHeightAuto: this.headHeightAuto
|
|
269
|
+
}
|
|
270
|
+
),
|
|
284
271
|
|
|
285
272
|
...(
|
|
286
273
|
this.canEdit && operationList.length
|
|
@@ -316,9 +303,9 @@
|
|
|
316
303
|
},
|
|
317
304
|
operationMap () {
|
|
318
305
|
const allOperationMap = {
|
|
319
|
-
|
|
306
|
+
canCreate: {
|
|
320
307
|
name: "添加一行",
|
|
321
|
-
type: "
|
|
308
|
+
type: "canCreate",
|
|
322
309
|
size: "default",
|
|
323
310
|
long: true,
|
|
324
311
|
disabled: !!this.disabledCreateBtn,
|
|
@@ -350,7 +337,7 @@
|
|
|
350
337
|
? this.$categoryMapToMap(
|
|
351
338
|
allOperationMap,
|
|
352
339
|
null,
|
|
353
|
-
this.disabledBtns ? ["
|
|
340
|
+
this.disabledBtns ? ["canCreate", "delete"] : []
|
|
354
341
|
)
|
|
355
342
|
: {};
|
|
356
343
|
}
|
|
@@ -448,81 +435,11 @@
|
|
|
448
435
|
};
|
|
449
436
|
</script>
|
|
450
437
|
|
|
451
|
-
<style lang="less">
|
|
438
|
+
<style lang="less" scoped>
|
|
452
439
|
.BriFlatTable {
|
|
453
440
|
&-main {
|
|
454
441
|
width: 100%;
|
|
455
442
|
height: auto;
|
|
456
|
-
|
|
457
|
-
.table {
|
|
458
|
-
width: 100%;
|
|
459
|
-
border-spacing: 0;
|
|
460
|
-
border-collapse: collapse;
|
|
461
|
-
border-color: #E5E5E5;
|
|
462
|
-
background-color: #fff;
|
|
463
|
-
|
|
464
|
-
&-head {
|
|
465
|
-
background-color: #f0f0f0;
|
|
466
|
-
color: #666;
|
|
467
|
-
|
|
468
|
-
&-description {
|
|
469
|
-
color: #828499;
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
&-row {
|
|
474
|
-
height: 50px;
|
|
475
|
-
|
|
476
|
-
&:hover {
|
|
477
|
-
.table-row-td-add {
|
|
478
|
-
display: inline-block;
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
&-td {
|
|
483
|
-
position: relative;
|
|
484
|
-
|
|
485
|
-
.td-inner {
|
|
486
|
-
&-compare {
|
|
487
|
-
width: 100%;
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
&-tip {
|
|
492
|
-
padding: 2px 5px 0px 20px;
|
|
493
|
-
font-size: 12px;
|
|
494
|
-
line-height: 1;
|
|
495
|
-
color: #ed4014;
|
|
496
|
-
position: absolute;
|
|
497
|
-
top: calc(100% -15px);
|
|
498
|
-
left: 0px;
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
&-add {
|
|
502
|
-
line-height: 20px;
|
|
503
|
-
position: absolute;
|
|
504
|
-
bottom: 0px;
|
|
505
|
-
right: 0px;
|
|
506
|
-
display: none;
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
&-nodata {
|
|
511
|
-
width: 100%;
|
|
512
|
-
height: 40px;
|
|
513
|
-
text-align: center;
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
tbody {
|
|
518
|
-
// display: block;
|
|
519
|
-
// overflow-y: scroll;
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
thead {
|
|
523
|
-
// display: block;
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
443
|
}
|
|
527
444
|
|
|
528
445
|
&-create {
|
|
@@ -280,3 +280,125 @@
|
|
|
280
280
|
}
|
|
281
281
|
};
|
|
282
282
|
</script>
|
|
283
|
+
|
|
284
|
+
<style lang="less">
|
|
285
|
+
.DshList {
|
|
286
|
+
@height:44px;
|
|
287
|
+
|
|
288
|
+
.list {
|
|
289
|
+
&-loading {
|
|
290
|
+
margin-top: 120px;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
&-cols,
|
|
294
|
+
&-rows {
|
|
295
|
+
position: relative;
|
|
296
|
+
|
|
297
|
+
&-left {
|
|
298
|
+
width: 48px;
|
|
299
|
+
text-align: center;
|
|
300
|
+
position: absolute;
|
|
301
|
+
left: 0;
|
|
302
|
+
top: 0;
|
|
303
|
+
|
|
304
|
+
label {
|
|
305
|
+
display: inline-block;
|
|
306
|
+
height: 36px;
|
|
307
|
+
padding: 9px 5px;
|
|
308
|
+
margin: 0px;
|
|
309
|
+
line-height: 18px;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.row {
|
|
314
|
+
width: 100%;
|
|
315
|
+
line-height: 20px;
|
|
316
|
+
display: flex;
|
|
317
|
+
justify-content: space-between;
|
|
318
|
+
|
|
319
|
+
&-item {
|
|
320
|
+
min-width: 120px;
|
|
321
|
+
height: 100%;
|
|
322
|
+
padding: 0 16px;
|
|
323
|
+
font-size: 14px;
|
|
324
|
+
align-items: center;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
&-cols {
|
|
330
|
+
height: @height;
|
|
331
|
+
background: #f0f0f0;
|
|
332
|
+
|
|
333
|
+
&-left {}
|
|
334
|
+
&-right {
|
|
335
|
+
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.row {
|
|
339
|
+
font-weight: 700;
|
|
340
|
+
|
|
341
|
+
&-item {
|
|
342
|
+
padding: 10px 16px;
|
|
343
|
+
border-top: 1px #e5e5e5 solid;
|
|
344
|
+
border-bottom: 1px #f0f0f0 solid;
|
|
345
|
+
border-left: 1px #e5e5e5 solid;
|
|
346
|
+
background: #f0f0f0;
|
|
347
|
+
|
|
348
|
+
&:last-child{
|
|
349
|
+
border-right: 1px #e5e5e5 solid;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
&-inner {
|
|
353
|
+
.dsh-ellipsis{
|
|
354
|
+
font-size: 14px;
|
|
355
|
+
color: #666;
|
|
356
|
+
font-weight: 700;
|
|
357
|
+
line-height: 24px;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
&-rows {
|
|
365
|
+
&-left {
|
|
366
|
+
label {
|
|
367
|
+
height: 44px;
|
|
368
|
+
line-height: 20px;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
&-right {}
|
|
373
|
+
|
|
374
|
+
.row {
|
|
375
|
+
height: 44px;
|
|
376
|
+
line-height: 20px;
|
|
377
|
+
cursor: pointer;
|
|
378
|
+
|
|
379
|
+
&-item {
|
|
380
|
+
display: flex;
|
|
381
|
+
border: 1px solid #E5E5E5;
|
|
382
|
+
border-width: 0 0 1px 1px;
|
|
383
|
+
|
|
384
|
+
&:last-child {
|
|
385
|
+
border-width: 0 1px 1px 1px;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
&-inner {
|
|
389
|
+
width: 100%;
|
|
390
|
+
font-size: 14px;
|
|
391
|
+
color: #333;
|
|
392
|
+
font-weight: 400;
|
|
393
|
+
line-height: 24px;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
&-nodata {
|
|
400
|
+
#dsh-nodata();
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
</style>
|
|
@@ -128,8 +128,8 @@
|
|
|
128
128
|
// 漏在外部按钮的宽度
|
|
129
129
|
this.selfOperationList
|
|
130
130
|
.slice(0, this.selfOperationList.length > maxBtnNum ? maxBtnNum - 1 : this.selfOperationList.length)
|
|
131
|
-
.reduce((total, operationItem) => total + operationItem.width +
|
|
132
|
-
(this.selfOperationList.length > maxBtnNum ?
|
|
131
|
+
.reduce((total, operationItem) => total + operationItem.width + 9, 0) +
|
|
132
|
+
(this.selfOperationList.length > maxBtnNum ? 70 : 0) + // 出现更多按钮的宽度
|
|
133
133
|
(this.selfOperationList.length > 0 ? 40 : 0) + // 操作列的padding
|
|
134
134
|
4 // 留出4px空间,避免麻烦问题
|
|
135
135
|
, 80
|
|
@@ -148,11 +148,11 @@
|
|
|
148
148
|
|
|
149
149
|
// TODO: 注意此处totalOperationList用的一定是表格行显示最多的操作按钮数组,有改动注意看此备注!!!
|
|
150
150
|
return h("dsh-buttons", {
|
|
151
|
+
class: "bri-table-td-operation",
|
|
151
152
|
props: {
|
|
152
|
-
class: "table-operation",
|
|
153
153
|
list: totalOperationList,
|
|
154
154
|
maxFlatNum: maxBtnNum - 1,
|
|
155
|
-
itemClass: "table-operation-btn"
|
|
155
|
+
itemClass: "bri-table-td-operation-btn"
|
|
156
156
|
},
|
|
157
157
|
on: {
|
|
158
158
|
click: (operationItem) => {
|
|
@@ -202,3 +202,10 @@
|
|
|
202
202
|
}
|
|
203
203
|
};
|
|
204
204
|
</script>
|
|
205
|
+
|
|
206
|
+
<style lang="less" scoped>
|
|
207
|
+
.DshTable {
|
|
208
|
+
width: 100%;
|
|
209
|
+
height: 100%;
|
|
210
|
+
}
|
|
211
|
+
</style>
|