dashboard-shell-shell 1.0.114 → 1.0.115
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/components/ResourceTable.vue +68 -22
- package/components/SideNav.vue +35 -14
- package/components/SortableTable/THead.vue +25 -2
- package/components/SortableTable/index.vue +763 -356
- package/components/SortableTable/paging.js +36 -28
- package/components/nav/Group.vue +45 -25
- package/components/nav/Type.vue +19 -35
- package/package.json +1 -1
- package/public/index.html +3 -3
|
@@ -403,7 +403,28 @@ export default {
|
|
|
403
403
|
/**
|
|
404
404
|
* The is the bool the DOM uses to show loading state. it's proxied from `loading` to avoid blipping the indicator (see usages)
|
|
405
405
|
*/
|
|
406
|
-
isLoading
|
|
406
|
+
isLoading,
|
|
407
|
+
isMuchSelected: false,
|
|
408
|
+
inputPerPage: '10',
|
|
409
|
+
inputPage: '', // 输入的要跳至的页码
|
|
410
|
+
perPageOptions: [
|
|
411
|
+
{
|
|
412
|
+
label: '10条/页',
|
|
413
|
+
value: '10',
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
label: '25条/页',
|
|
417
|
+
value: '25',
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
label: '50条/页',
|
|
421
|
+
value: '50',
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
label: '100条/页',
|
|
425
|
+
value: '100',
|
|
426
|
+
}
|
|
427
|
+
]
|
|
407
428
|
};
|
|
408
429
|
},
|
|
409
430
|
|
|
@@ -418,6 +439,13 @@ export default {
|
|
|
418
439
|
this._onScroll = this.onScroll.bind(this);
|
|
419
440
|
$main?.addEventListener('scroll', this._onScroll);
|
|
420
441
|
|
|
442
|
+
const tables = document.querySelectorAll('.sort-table-div');
|
|
443
|
+
|
|
444
|
+
tables.forEach((table) => {
|
|
445
|
+
this._onTableScroll = this.onTableScroll.bind(this, table);
|
|
446
|
+
table.addEventListener('scroll', this._onTableScroll.bind(this, table));
|
|
447
|
+
});
|
|
448
|
+
|
|
421
449
|
this.debouncedPaginationChanged();
|
|
422
450
|
},
|
|
423
451
|
|
|
@@ -432,6 +460,12 @@ export default {
|
|
|
432
460
|
const $main = document.querySelector('main');
|
|
433
461
|
|
|
434
462
|
$main?.removeEventListener('scroll', this._onScroll);
|
|
463
|
+
// 移除所有表格容器的滚动事件监听器
|
|
464
|
+
const tables = document.querySelectorAll('.sort-table-div');
|
|
465
|
+
|
|
466
|
+
tables.forEach((table) => {
|
|
467
|
+
table.removeEventListener('scroll', this._onTableScroll);
|
|
468
|
+
});
|
|
435
469
|
},
|
|
436
470
|
|
|
437
471
|
watch: {
|
|
@@ -480,6 +514,13 @@ export default {
|
|
|
480
514
|
forceUpdateLiveAndDelayed(neu, old) {
|
|
481
515
|
this.watcherUpdateLiveAndDelayed(neu, old);
|
|
482
516
|
},
|
|
517
|
+
selectedRowsText(neu, old) {
|
|
518
|
+
if (neu) {
|
|
519
|
+
this.isMuchSelected = true;
|
|
520
|
+
} else {
|
|
521
|
+
this.isMuchSelected = false;
|
|
522
|
+
}
|
|
523
|
+
},
|
|
483
524
|
|
|
484
525
|
// Ensure we update live and delayed columns on first load
|
|
485
526
|
initalLoad: {
|
|
@@ -767,12 +808,97 @@ export default {
|
|
|
767
808
|
},
|
|
768
809
|
|
|
769
810
|
methods: {
|
|
811
|
+
onTableScroll(table, e) {
|
|
812
|
+
// 记录最后滚动的距离
|
|
813
|
+
let lastScrollTop = 0;
|
|
814
|
+
let lastScrollLeft = 0;
|
|
815
|
+
|
|
816
|
+
// 监听容器滚动
|
|
817
|
+
table.addEventListener('scroll', (e) => {
|
|
818
|
+
// 如果当前垂直滚动距离不等于上次
|
|
819
|
+
if (e.target.scrollTop !== lastScrollTop) {
|
|
820
|
+
// 更新最后距离
|
|
821
|
+
lastScrollTop = e.target.scrollTop;
|
|
822
|
+
|
|
823
|
+
// 移除左右阴影样式
|
|
824
|
+
table.classList.remove('shadow-left');
|
|
825
|
+
table.classList.remove('shadow-right');
|
|
826
|
+
|
|
827
|
+
// 如果滚动到顶部,移除顶部阴影样式
|
|
828
|
+
// if (lastScrollTop === 0) {
|
|
829
|
+
// table.classList.remove('shadow-top');
|
|
830
|
+
// }
|
|
831
|
+
// // 否则添加顶部阴影样式
|
|
832
|
+
// else {
|
|
833
|
+
// table.classList.add('shadow-top');
|
|
834
|
+
// }
|
|
835
|
+
|
|
836
|
+
// 如果滚动到底部,移除底部阴影样式
|
|
837
|
+
// if (lastScrollTop + table.clientHeight === table.scrollHeight) {
|
|
838
|
+
// table.classList.remove('shadow-bottom');
|
|
839
|
+
// }
|
|
840
|
+
// // 否则添加底部阴影样式
|
|
841
|
+
// else {
|
|
842
|
+
// table.classList.add('shadow-bottom');
|
|
843
|
+
// }
|
|
844
|
+
|
|
845
|
+
// 阴影效果修正
|
|
846
|
+
table.classList.remove('shadow-x');
|
|
847
|
+
table.classList.add('shadow-y');
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
// 如果当前水平滚动距离不等于上次
|
|
851
|
+
else if (e.target.scrollLeft !== lastScrollLeft) {
|
|
852
|
+
// 更新最后距离
|
|
853
|
+
lastScrollLeft = e.target.scrollLeft;
|
|
854
|
+
|
|
855
|
+
// 移除上下阴影样式
|
|
856
|
+
// table.classList.remove('shadow-top');
|
|
857
|
+
// table.classList.remove('shadow-bottom');
|
|
858
|
+
|
|
859
|
+
// 如果滚动到左边,移除左边阴影样式
|
|
860
|
+
if (lastScrollLeft === 0) {
|
|
861
|
+
table.classList.remove('shadow-left');
|
|
862
|
+
}
|
|
863
|
+
// 否则添加左边阴影样式
|
|
864
|
+
else {
|
|
865
|
+
table.classList.add('shadow-left');
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
// 如果滚动到右边,移除右边阴影样式
|
|
869
|
+
if (lastScrollLeft + table.clientWidth === table.scrollWidth) {
|
|
870
|
+
table.classList.remove('shadow-right');
|
|
871
|
+
}
|
|
872
|
+
// 否则添加右边阴影样式
|
|
873
|
+
else {
|
|
874
|
+
table.classList.add('shadow-right');
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
// 阴影效果修正
|
|
878
|
+
table.classList.remove('shadow-y');
|
|
879
|
+
table.classList.add('shadow-x');
|
|
880
|
+
}
|
|
881
|
+
});
|
|
882
|
+
},
|
|
883
|
+
changePerPage(value) {
|
|
884
|
+
this.inputPerPage = value;
|
|
885
|
+
this.setgetPerPage(value);
|
|
886
|
+
},
|
|
887
|
+
handleToPage() {
|
|
888
|
+
this.setPage(parseInt(this.inputPage, 10));
|
|
889
|
+
},
|
|
770
890
|
refreshTableData() {
|
|
771
891
|
this.$store.dispatch('resource-fetch/doManualRefresh');
|
|
772
892
|
},
|
|
773
893
|
get,
|
|
774
894
|
dasherize,
|
|
775
895
|
|
|
896
|
+
muchSelect(value) {
|
|
897
|
+
console.log(value);
|
|
898
|
+
|
|
899
|
+
this.isMuchSelected = !this.isMuchSelected;
|
|
900
|
+
this.onToggleAll(value);
|
|
901
|
+
},
|
|
776
902
|
onScroll() {
|
|
777
903
|
if (this.hasLiveColumns || this.hasDelayedColumns) {
|
|
778
904
|
clearTimeout(this._liveColumnsTimer);
|
|
@@ -1055,9 +1181,309 @@ export default {
|
|
|
1055
1181
|
ref="container"
|
|
1056
1182
|
:data-testid="componentTestid + '-list-container'"
|
|
1057
1183
|
>
|
|
1184
|
+
|
|
1185
|
+
<div class="sort-table-div">
|
|
1186
|
+
<table
|
|
1187
|
+
ref="table"
|
|
1188
|
+
class="sortable-table"
|
|
1189
|
+
:class="classObject"
|
|
1190
|
+
width="100%"
|
|
1191
|
+
role="table"
|
|
1192
|
+
>
|
|
1193
|
+
<THead
|
|
1194
|
+
v-if="showHeaders"
|
|
1195
|
+
:label-for="labelFor"
|
|
1196
|
+
:columns="columns"
|
|
1197
|
+
:group="group"
|
|
1198
|
+
:group-options="advGroupOptions"
|
|
1199
|
+
:has-advanced-filtering="hasAdvancedFiltering"
|
|
1200
|
+
:adv-filter-hide-labels-as-cols="advFilterHideLabelsAsCols"
|
|
1201
|
+
:table-actions="tableActions"
|
|
1202
|
+
:table-cols-options="columnOptions"
|
|
1203
|
+
:row-actions="rowActions"
|
|
1204
|
+
:sub-expand-column="subExpandColumn"
|
|
1205
|
+
:row-actions-width="rowActionsWidth"
|
|
1206
|
+
:how-much-selected="howMuchSelected"
|
|
1207
|
+
:sort-by="sortBy"
|
|
1208
|
+
:default-sort-by="_defaultSortBy"
|
|
1209
|
+
:descending="descending"
|
|
1210
|
+
:no-rows="noRows"
|
|
1211
|
+
:loading="isLoading && !loadingDelay"
|
|
1212
|
+
:no-results="noResults"
|
|
1213
|
+
@on-toggle-all="onToggleAll"
|
|
1214
|
+
@on-sort-change="changeSort"
|
|
1215
|
+
@col-visibility-change="changeColVisibility"
|
|
1216
|
+
@group-value-change="(val) => $emit('group-value-change', val)"
|
|
1217
|
+
@update-cols-options="updateColsOptions"
|
|
1218
|
+
/>
|
|
1219
|
+
|
|
1220
|
+
<!-- Don't display anything if we're loading and the delay has yet to pass -->
|
|
1221
|
+
<div v-if="isLoading && !loadingDelay" />
|
|
1222
|
+
|
|
1223
|
+
<tbody v-else-if="isLoading && !altLoading">
|
|
1224
|
+
<slot name="loading">
|
|
1225
|
+
<tr>
|
|
1226
|
+
<td :colspan="fullColspan">
|
|
1227
|
+
<div class="data-loading">
|
|
1228
|
+
<i class="icon-spin icon icon-spinner" />
|
|
1229
|
+
<t
|
|
1230
|
+
k="generic.loading"
|
|
1231
|
+
:raw="true"
|
|
1232
|
+
/>
|
|
1233
|
+
</div>
|
|
1234
|
+
</td>
|
|
1235
|
+
</tr>
|
|
1236
|
+
</slot>
|
|
1237
|
+
</tbody>
|
|
1238
|
+
<tbody v-else-if="noRows">
|
|
1239
|
+
<slot name="no-rows">
|
|
1240
|
+
<tr class="no-rows">
|
|
1241
|
+
<td :colspan="fullColspan">
|
|
1242
|
+
<t
|
|
1243
|
+
v-if="showNoRows"
|
|
1244
|
+
:k="noRowsKey"
|
|
1245
|
+
/>
|
|
1246
|
+
</td>
|
|
1247
|
+
</tr>
|
|
1248
|
+
</slot>
|
|
1249
|
+
</tbody>
|
|
1250
|
+
<tbody v-else-if="noResults">
|
|
1251
|
+
<slot name="no-results">
|
|
1252
|
+
<tr class="no-results">
|
|
1253
|
+
<td
|
|
1254
|
+
:colspan="fullColspan"
|
|
1255
|
+
class="text-center"
|
|
1256
|
+
>
|
|
1257
|
+
<t :k="noDataKey" />
|
|
1258
|
+
</td>
|
|
1259
|
+
</tr>
|
|
1260
|
+
</slot>
|
|
1261
|
+
</tbody>
|
|
1262
|
+
<tbody
|
|
1263
|
+
v-for="(groupedRows) in displayRows"
|
|
1264
|
+
v-else
|
|
1265
|
+
:key="groupedRows.key"
|
|
1266
|
+
tabindex="-1"
|
|
1267
|
+
:class="{ group: groupBy }"
|
|
1268
|
+
>
|
|
1269
|
+
<slot
|
|
1270
|
+
v-if="groupBy"
|
|
1271
|
+
name="group-row"
|
|
1272
|
+
:group="groupedRows"
|
|
1273
|
+
:fullColspan="fullColspan"
|
|
1274
|
+
>
|
|
1275
|
+
<tr class="group-row">
|
|
1276
|
+
<td :colspan="fullColspan">
|
|
1277
|
+
<slot
|
|
1278
|
+
name="group-by"
|
|
1279
|
+
:group="groupedRows.grp"
|
|
1280
|
+
>
|
|
1281
|
+
<div
|
|
1282
|
+
v-trim-whitespace
|
|
1283
|
+
class="group-tab"
|
|
1284
|
+
>
|
|
1285
|
+
{{ groupedRows.ref }}
|
|
1286
|
+
</div>
|
|
1287
|
+
</slot>
|
|
1288
|
+
</td>
|
|
1289
|
+
</tr>
|
|
1290
|
+
</slot>
|
|
1291
|
+
<template
|
|
1292
|
+
v-for="(row, i) in groupedRows.rows"
|
|
1293
|
+
:key="i"
|
|
1294
|
+
>
|
|
1295
|
+
<slot
|
|
1296
|
+
name="main-row"
|
|
1297
|
+
:row="row.row"
|
|
1298
|
+
>
|
|
1299
|
+
<slot
|
|
1300
|
+
:name="'main-row:' + (row.row.mainRowKey || i)"
|
|
1301
|
+
:full-colspan="fullColspan"
|
|
1302
|
+
>
|
|
1303
|
+
<!-- The data-cant-run-bulk-action-of-interest attribute is being used instead of :class because
|
|
1304
|
+
because our selection.js invokes toggleClass and :class clobbers what was added by toggleClass if
|
|
1305
|
+
the value of :class changes. -->
|
|
1306
|
+
<tr
|
|
1307
|
+
class="main-row"
|
|
1308
|
+
:data-testid="componentTestid + '-' + i + '-row'"
|
|
1309
|
+
:class="{ 'has-sub-row': row.showSubRow}"
|
|
1310
|
+
:data-node-id="row.key"
|
|
1311
|
+
:data-cant-run-bulk-action-of-interest="actionOfInterest && !row.canRunBulkActionOfInterest"
|
|
1312
|
+
>
|
|
1313
|
+
<td
|
|
1314
|
+
v-if="tableActions"
|
|
1315
|
+
class="row-check"
|
|
1316
|
+
align="middle"
|
|
1317
|
+
>
|
|
1318
|
+
{{ row.mainRowKey }}
|
|
1319
|
+
<Checkbox
|
|
1320
|
+
class="selection-checkbox"
|
|
1321
|
+
:data-node-id="row.key"
|
|
1322
|
+
:data-testid="componentTestid + '-' + i + '-checkbox'"
|
|
1323
|
+
:value="selectedRows.includes(row.row)"
|
|
1324
|
+
:alternate-label="t('sortableTable.genericRowCheckbox', { item: row && row.row ? row.row.id : '' })"
|
|
1325
|
+
/>
|
|
1326
|
+
</td>
|
|
1327
|
+
<td
|
|
1328
|
+
v-if="subExpandColumn"
|
|
1329
|
+
class="row-expand"
|
|
1330
|
+
align="middle"
|
|
1331
|
+
>
|
|
1332
|
+
<i
|
|
1333
|
+
data-title="Toggle Expand"
|
|
1334
|
+
:class="{
|
|
1335
|
+
icon: true,
|
|
1336
|
+
'icon-chevron-right': !expanded[row.row[keyField]],
|
|
1337
|
+
'icon-chevron-down': !!expanded[row.row[keyField]]
|
|
1338
|
+
}"
|
|
1339
|
+
@click.stop="toggleExpand(row.row)"
|
|
1340
|
+
/>
|
|
1341
|
+
</td>
|
|
1342
|
+
<template
|
|
1343
|
+
v-for="(col, j) in row.columns"
|
|
1344
|
+
:key="j"
|
|
1345
|
+
>
|
|
1346
|
+
<slot
|
|
1347
|
+
:name="'col:' + col.col.name"
|
|
1348
|
+
:row="row.row"
|
|
1349
|
+
:col="col.col"
|
|
1350
|
+
:dt="dt"
|
|
1351
|
+
:expanded="expanded"
|
|
1352
|
+
:rowKey="row.key"
|
|
1353
|
+
>
|
|
1354
|
+
<td
|
|
1355
|
+
v-show="!hasAdvancedFiltering || (hasAdvancedFiltering && col.col.isColVisible)"
|
|
1356
|
+
:key="col.col.name"
|
|
1357
|
+
:data-title="col.col.label"
|
|
1358
|
+
:data-testid="`sortable-cell-${ i }-${ j }`"
|
|
1359
|
+
:align="col.col.align || 'left'"
|
|
1360
|
+
:class="{['col-'+col.dasherize]: !!col.col.formatter, [col.col.breakpoint]: !!col.col.breakpoint, ['skip-select']: col.col.skipSelect}"
|
|
1361
|
+
:width="col.col.width"
|
|
1362
|
+
>
|
|
1363
|
+
<slot
|
|
1364
|
+
:name="'cell:' + col.col.name"
|
|
1365
|
+
:row="row.row"
|
|
1366
|
+
:col="col.col"
|
|
1367
|
+
:value="col.value"
|
|
1368
|
+
>
|
|
1369
|
+
<component
|
|
1370
|
+
:is="col.component"
|
|
1371
|
+
v-if="col.component && col.needRef"
|
|
1372
|
+
ref="column"
|
|
1373
|
+
:value="col.value"
|
|
1374
|
+
:row="row.row"
|
|
1375
|
+
:col="col.col"
|
|
1376
|
+
v-bind="col.col.formatterOpts"
|
|
1377
|
+
:row-key="row.key"
|
|
1378
|
+
:get-custom-detail-link="getCustomDetailLink"
|
|
1379
|
+
/>
|
|
1380
|
+
<component
|
|
1381
|
+
:is="col.component"
|
|
1382
|
+
v-else-if="col.component"
|
|
1383
|
+
:value="col.value"
|
|
1384
|
+
:row="row.row"
|
|
1385
|
+
:col="col.col"
|
|
1386
|
+
v-bind="col.col.formatterOpts"
|
|
1387
|
+
:row-key="row.key"
|
|
1388
|
+
/>
|
|
1389
|
+
<component
|
|
1390
|
+
:is="col.col.formatter"
|
|
1391
|
+
v-else-if="col.col.formatter"
|
|
1392
|
+
:value="col.value"
|
|
1393
|
+
:row="row.row"
|
|
1394
|
+
:col="col.col"
|
|
1395
|
+
v-bind="col.col.formatterOpts"
|
|
1396
|
+
:row-key="row.key"
|
|
1397
|
+
/>
|
|
1398
|
+
<template v-else-if="col.value !== ''">
|
|
1399
|
+
{{ col.formatted }}
|
|
1400
|
+
</template>
|
|
1401
|
+
<template v-else-if="col.col.dashIfEmpty">
|
|
1402
|
+
<span class="text-muted">—</span>
|
|
1403
|
+
</template>
|
|
1404
|
+
</slot>
|
|
1405
|
+
</td>
|
|
1406
|
+
</slot>
|
|
1407
|
+
</template>
|
|
1408
|
+
<td
|
|
1409
|
+
v-if="rowActions"
|
|
1410
|
+
:align="'left'"
|
|
1411
|
+
style="height:60px"
|
|
1412
|
+
>
|
|
1413
|
+
<div style="display: flex;align-items: center;">
|
|
1414
|
+
<slot
|
|
1415
|
+
name="row-actions"
|
|
1416
|
+
:row="row.row"
|
|
1417
|
+
:index="i"
|
|
1418
|
+
>
|
|
1419
|
+
<ActionMenu
|
|
1420
|
+
:resource="row.row"
|
|
1421
|
+
:data-testid="componentTestid + '-' + i + '-action-button'"
|
|
1422
|
+
:button-aria-label="t('sortableTable.tableActionsLabel', { resource: row?.row?.id || '' })"
|
|
1423
|
+
/>
|
|
1424
|
+
</slot>
|
|
1425
|
+
</div>
|
|
1426
|
+
</td>
|
|
1427
|
+
</tr>
|
|
1428
|
+
</slot>
|
|
1429
|
+
</slot>
|
|
1430
|
+
<!-- <slot
|
|
1431
|
+
v-if="row.showSubRow"
|
|
1432
|
+
name="sub-row"
|
|
1433
|
+
:full-colspan="fullColspan"
|
|
1434
|
+
:row="row.row"
|
|
1435
|
+
:sub-matches="subMatches"
|
|
1436
|
+
:keyField="keyField"
|
|
1437
|
+
:componentTestid="componentTestid"
|
|
1438
|
+
:i="i"
|
|
1439
|
+
:onRowMouseEnter="onRowMouseEnter"
|
|
1440
|
+
:onRowMouseLeave="onRowMouseLeave"
|
|
1441
|
+
>
|
|
1442
|
+
<tr
|
|
1443
|
+
v-if="row.row.stateDescription"
|
|
1444
|
+
:key="row.row[keyField] + '-description'"
|
|
1445
|
+
:data-testid="componentTestid + '-' + i + '-row-description'"
|
|
1446
|
+
class="state-description sub-row"
|
|
1447
|
+
@mouseenter="onRowMouseEnter"
|
|
1448
|
+
@mouseleave="onRowMouseLeave"
|
|
1449
|
+
>
|
|
1450
|
+
<td
|
|
1451
|
+
v-if="tableActions"
|
|
1452
|
+
class="row-check"
|
|
1453
|
+
align="middle"
|
|
1454
|
+
/>
|
|
1455
|
+
<td
|
|
1456
|
+
:colspan="fullColspan - (tableActions ? 1: 0)"
|
|
1457
|
+
:class="{ 'text-error' : row.row.stateObj.error }"
|
|
1458
|
+
>
|
|
1459
|
+
{{ row.row.stateDescription }}
|
|
1460
|
+
</td>
|
|
1461
|
+
</tr>
|
|
1462
|
+
</slot> -->
|
|
1463
|
+
</template>
|
|
1464
|
+
</tbody>
|
|
1465
|
+
</table>
|
|
1466
|
+
</div>
|
|
1058
1467
|
<div
|
|
1468
|
+
v-if="!noRows && !noResults"
|
|
1469
|
+
:class="$route.path=== '/account'? 'chebox-padding':''"
|
|
1470
|
+
style="display: flex;justify-content: flex-start;align-content: center;height: 62px;position: sticky;bottom: 0;background-color: var(--header-bg);padding: 15px 20px 0 30px;margin: 0 -20px 0 -20px;z-index:20"
|
|
1471
|
+
>
|
|
1472
|
+
<div style="display: flex;justify-content: center;height: 32px;">
|
|
1473
|
+
<Checkbox
|
|
1474
|
+
v-if="tableActions&&availableActions.some(item => item.action != 'download')"
|
|
1475
|
+
:value="isMuchSelected"
|
|
1476
|
+
class="check"
|
|
1477
|
+
data-testid="sortable-table_check_select_all"
|
|
1478
|
+
:disabled="noRows || noResults"
|
|
1479
|
+
style="display: flex;justify-content: center;align-content: center;"
|
|
1480
|
+
@update:value = "muchSelect"
|
|
1481
|
+
/>
|
|
1482
|
+
</div>
|
|
1483
|
+
<div
|
|
1059
1484
|
:class="{'titled': $slots.title && $slots.title.length}"
|
|
1060
1485
|
class="sortable-table-header"
|
|
1486
|
+
style="margin-left: 10px;min-width: 55%;"
|
|
1061
1487
|
>
|
|
1062
1488
|
<slot name="title" />
|
|
1063
1489
|
<div
|
|
@@ -1246,356 +1672,175 @@ export default {
|
|
|
1246
1672
|
<slot name="header-button" />
|
|
1247
1673
|
</div>
|
|
1248
1674
|
</div>
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
width="100%"
|
|
1255
|
-
role="table"
|
|
1256
|
-
>
|
|
1257
|
-
<THead
|
|
1258
|
-
v-if="showHeaders"
|
|
1259
|
-
:label-for="labelFor"
|
|
1260
|
-
:columns="columns"
|
|
1261
|
-
:group="group"
|
|
1262
|
-
:group-options="advGroupOptions"
|
|
1263
|
-
:has-advanced-filtering="hasAdvancedFiltering"
|
|
1264
|
-
:adv-filter-hide-labels-as-cols="advFilterHideLabelsAsCols"
|
|
1265
|
-
:table-actions="tableActions"
|
|
1266
|
-
:table-cols-options="columnOptions"
|
|
1267
|
-
:row-actions="rowActions"
|
|
1268
|
-
:sub-expand-column="subExpandColumn"
|
|
1269
|
-
:row-actions-width="rowActionsWidth"
|
|
1270
|
-
:how-much-selected="howMuchSelected"
|
|
1271
|
-
:sort-by="sortBy"
|
|
1272
|
-
:default-sort-by="_defaultSortBy"
|
|
1273
|
-
:descending="descending"
|
|
1274
|
-
:no-rows="noRows"
|
|
1275
|
-
:loading="isLoading && !loadingDelay"
|
|
1276
|
-
:no-results="noResults"
|
|
1277
|
-
@on-toggle-all="onToggleAll"
|
|
1278
|
-
@on-sort-change="changeSort"
|
|
1279
|
-
@col-visibility-change="changeColVisibility"
|
|
1280
|
-
@group-value-change="(val) => $emit('group-value-change', val)"
|
|
1281
|
-
@update-cols-options="updateColsOptions"
|
|
1282
|
-
/>
|
|
1283
|
-
|
|
1284
|
-
<!-- Don't display anything if we're loading and the delay has yet to pass -->
|
|
1285
|
-
<div v-if="isLoading && !loadingDelay" />
|
|
1286
|
-
|
|
1287
|
-
<tbody v-else-if="isLoading && !altLoading">
|
|
1288
|
-
<slot name="loading">
|
|
1289
|
-
<tr>
|
|
1290
|
-
<td :colspan="fullColspan">
|
|
1291
|
-
<div class="data-loading">
|
|
1292
|
-
<i class="icon-spin icon icon-spinner" />
|
|
1293
|
-
<t
|
|
1294
|
-
k="generic.loading"
|
|
1295
|
-
:raw="true"
|
|
1296
|
-
/>
|
|
1297
|
-
</div>
|
|
1298
|
-
</td>
|
|
1299
|
-
</tr>
|
|
1300
|
-
</slot>
|
|
1301
|
-
</tbody>
|
|
1302
|
-
<tbody v-else-if="noRows">
|
|
1303
|
-
<slot name="no-rows">
|
|
1304
|
-
<tr class="no-rows">
|
|
1305
|
-
<td :colspan="fullColspan">
|
|
1306
|
-
<t
|
|
1307
|
-
v-if="showNoRows"
|
|
1308
|
-
:k="noRowsKey"
|
|
1309
|
-
/>
|
|
1310
|
-
</td>
|
|
1311
|
-
</tr>
|
|
1312
|
-
</slot>
|
|
1313
|
-
</tbody>
|
|
1314
|
-
<tbody v-else-if="noResults">
|
|
1315
|
-
<slot name="no-results">
|
|
1316
|
-
<tr class="no-results">
|
|
1317
|
-
<td
|
|
1318
|
-
:colspan="fullColspan"
|
|
1319
|
-
class="text-center"
|
|
1320
|
-
>
|
|
1321
|
-
<t :k="noDataKey" />
|
|
1322
|
-
</td>
|
|
1323
|
-
</tr>
|
|
1324
|
-
</slot>
|
|
1325
|
-
</tbody>
|
|
1326
|
-
<tbody
|
|
1327
|
-
v-for="(groupedRows) in displayRows"
|
|
1328
|
-
v-else
|
|
1329
|
-
:key="groupedRows.key"
|
|
1330
|
-
tabindex="-1"
|
|
1331
|
-
:class="{ group: groupBy }"
|
|
1332
|
-
>
|
|
1333
|
-
<slot
|
|
1334
|
-
v-if="groupBy"
|
|
1335
|
-
name="group-row"
|
|
1336
|
-
:group="groupedRows"
|
|
1337
|
-
:fullColspan="fullColspan"
|
|
1338
|
-
>
|
|
1339
|
-
<tr class="group-row">
|
|
1340
|
-
<td :colspan="fullColspan">
|
|
1341
|
-
<slot
|
|
1342
|
-
name="group-by"
|
|
1343
|
-
:group="groupedRows.grp"
|
|
1344
|
-
>
|
|
1345
|
-
<div
|
|
1346
|
-
v-trim-whitespace
|
|
1347
|
-
class="group-tab"
|
|
1348
|
-
>
|
|
1349
|
-
{{ groupedRows.ref }}
|
|
1350
|
-
</div>
|
|
1351
|
-
</slot>
|
|
1352
|
-
</td>
|
|
1353
|
-
</tr>
|
|
1354
|
-
</slot>
|
|
1355
|
-
<template
|
|
1356
|
-
v-for="(row, i) in groupedRows.rows"
|
|
1357
|
-
:key="i"
|
|
1675
|
+
</div>
|
|
1676
|
+
<!-- 分页 -->
|
|
1677
|
+
<div
|
|
1678
|
+
v-if="showPaging"
|
|
1679
|
+
class="paging"
|
|
1358
1680
|
>
|
|
1359
|
-
<
|
|
1360
|
-
|
|
1361
|
-
|
|
1681
|
+
<div style="height: 100%; align-content: center;">
|
|
1682
|
+
共 {{ filteredRows.length }} 条
|
|
1683
|
+
</div>
|
|
1684
|
+
|
|
1685
|
+
<button
|
|
1686
|
+
type="button"
|
|
1687
|
+
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1688
|
+
:disabled="page == 1"
|
|
1689
|
+
:style="{ color: page <= totalPages ? `var(--default-text) !important` : `var(--paimary)`,border: page <= totalPages ? `solid thin var(--border)` : `solid thin var(--paimary)`}"
|
|
1690
|
+
@click="goToPage('prev')"
|
|
1362
1691
|
>
|
|
1363
|
-
<
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1692
|
+
<!-- <i class="icon icon-chevron-left" /> -->
|
|
1693
|
+
<
|
|
1694
|
+
</button>
|
|
1695
|
+
<button
|
|
1696
|
+
type="button"
|
|
1697
|
+
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1698
|
+
:style="{ color: (page == 1) ? `var(--primary)`:`var(--default-text) !important`,border: (page == 1) ? `solid thin var(--primary)` : `solid thin var(--border)`}"
|
|
1699
|
+
@click="goToPage('first')"
|
|
1700
|
+
>
|
|
1701
|
+
<!-- <i class="icon icon-chevron-beginning" /> -->
|
|
1702
|
+
{{ 1 }}
|
|
1703
|
+
</button>
|
|
1704
|
+
<template v-if="totalPages > 2">
|
|
1705
|
+
<div style="display: flex;flex-direction: row;gap: 10px;">
|
|
1706
|
+
<button
|
|
1707
|
+
v-if="page - 2 > 1 && page <= totalPages "
|
|
1708
|
+
type="button"
|
|
1709
|
+
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1710
|
+
:style="{ color: `var(--default-text) !important`,border: `solid thin white`}"
|
|
1376
1711
|
>
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
:col="col.col"
|
|
1440
|
-
v-bind="col.col.formatterOpts"
|
|
1441
|
-
:row-key="row.key"
|
|
1442
|
-
:get-custom-detail-link="getCustomDetailLink"
|
|
1443
|
-
/>
|
|
1444
|
-
<component
|
|
1445
|
-
:is="col.component"
|
|
1446
|
-
v-else-if="col.component"
|
|
1447
|
-
:value="col.value"
|
|
1448
|
-
:row="row.row"
|
|
1449
|
-
:col="col.col"
|
|
1450
|
-
v-bind="col.col.formatterOpts"
|
|
1451
|
-
:row-key="row.key"
|
|
1452
|
-
/>
|
|
1453
|
-
<component
|
|
1454
|
-
:is="col.col.formatter"
|
|
1455
|
-
v-else-if="col.col.formatter"
|
|
1456
|
-
:value="col.value"
|
|
1457
|
-
:row="row.row"
|
|
1458
|
-
:col="col.col"
|
|
1459
|
-
v-bind="col.col.formatterOpts"
|
|
1460
|
-
:row-key="row.key"
|
|
1461
|
-
/>
|
|
1462
|
-
<template v-else-if="col.value !== ''">
|
|
1463
|
-
{{ col.formatted }}
|
|
1464
|
-
</template>
|
|
1465
|
-
<template v-else-if="col.col.dashIfEmpty">
|
|
1466
|
-
<span class="text-muted">—</span>
|
|
1467
|
-
</template>
|
|
1468
|
-
</slot>
|
|
1469
|
-
</td>
|
|
1470
|
-
</slot>
|
|
1471
|
-
</template>
|
|
1472
|
-
<td
|
|
1473
|
-
v-if="rowActions"
|
|
1474
|
-
>
|
|
1475
|
-
<slot
|
|
1476
|
-
name="row-actions"
|
|
1477
|
-
:row="row.row"
|
|
1478
|
-
:index="i"
|
|
1479
|
-
>
|
|
1480
|
-
<ActionMenu
|
|
1481
|
-
:resource="row.row"
|
|
1482
|
-
:data-testid="componentTestid + '-' + i + '-action-button'"
|
|
1483
|
-
:button-aria-label="t('sortableTable.tableActionsLabel', { resource: row?.row?.id || '' })"
|
|
1484
|
-
/>
|
|
1485
|
-
</slot>
|
|
1486
|
-
</td>
|
|
1487
|
-
</tr>
|
|
1488
|
-
</slot>
|
|
1489
|
-
</slot>
|
|
1490
|
-
<slot
|
|
1491
|
-
v-if="row.showSubRow"
|
|
1492
|
-
name="sub-row"
|
|
1493
|
-
:full-colspan="fullColspan"
|
|
1494
|
-
:row="row.row"
|
|
1495
|
-
:sub-matches="subMatches"
|
|
1496
|
-
:keyField="keyField"
|
|
1497
|
-
:componentTestid="componentTestid"
|
|
1498
|
-
:i="i"
|
|
1499
|
-
:onRowMouseEnter="onRowMouseEnter"
|
|
1500
|
-
:onRowMouseLeave="onRowMouseLeave"
|
|
1712
|
+
...
|
|
1713
|
+
</button>
|
|
1714
|
+
<button
|
|
1715
|
+
v-if="page - 1 > 1 && page <= totalPages "
|
|
1716
|
+
type="button"
|
|
1717
|
+
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1718
|
+
:style="{ color: `var(--default-text) !important`,border: `solid thin var(--border)`}"
|
|
1719
|
+
@click="setPage(page-1)"
|
|
1720
|
+
>
|
|
1721
|
+
{{ page-1 }}
|
|
1722
|
+
</button>
|
|
1723
|
+
<button
|
|
1724
|
+
v-if="page > 1 && page < totalPages"
|
|
1725
|
+
type="button"
|
|
1726
|
+
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1727
|
+
:style="{ color: `var(--default-text)`,border: `solid thin var(--primary)`}"
|
|
1728
|
+
@click="setPage(page)"
|
|
1729
|
+
>
|
|
1730
|
+
{{ page }}
|
|
1731
|
+
</button>
|
|
1732
|
+
<button
|
|
1733
|
+
v-if="page + 1 < totalPages "
|
|
1734
|
+
type="button"
|
|
1735
|
+
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1736
|
+
:style="{ color: `var(--default-text) !important`,border: `solid thin var(--border)`}"
|
|
1737
|
+
@click="setPage(page+1)"
|
|
1738
|
+
>
|
|
1739
|
+
{{ page+1 }}
|
|
1740
|
+
</button>
|
|
1741
|
+
<button
|
|
1742
|
+
v-if="page +2 < totalPages "
|
|
1743
|
+
type="button"
|
|
1744
|
+
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1745
|
+
:style="{ color: `var(--default-text) !important`,border: `solid thin white`}"
|
|
1746
|
+
>
|
|
1747
|
+
...
|
|
1748
|
+
</button>
|
|
1749
|
+
</div>
|
|
1750
|
+
</template>
|
|
1751
|
+
<!-- <button
|
|
1752
|
+
type="button"
|
|
1753
|
+
class="btn btn-sm role-multi-action"
|
|
1754
|
+
style="padding: 0;max-width: 32px;background-color: white !important;"
|
|
1755
|
+
>
|
|
1756
|
+
{{ page }}
|
|
1757
|
+
</button> -->
|
|
1758
|
+
<button
|
|
1759
|
+
v-if="totalPages > 1"
|
|
1760
|
+
type="button"
|
|
1761
|
+
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1762
|
+
:style="{ color: (page == totalPages) ? `var(--primary)`:`var(--default-text) !important`,border: (page == totalPages) ? `solid thin var(--primary)` : `solid thin var(--border)`}"
|
|
1763
|
+
@click="goToPage('last')"
|
|
1764
|
+
>
|
|
1765
|
+
<!-- <i class="icon icon-chevron-end" /> -->
|
|
1766
|
+
{{ totalPages }}
|
|
1767
|
+
</button>
|
|
1768
|
+
<button
|
|
1769
|
+
type="button"
|
|
1770
|
+
class="btn btn-sm role-multi-action page-btn-normal"
|
|
1771
|
+
:disabled="page == totalPages"
|
|
1772
|
+
:style="{ color: page <= totalPages ? `var(--default-text) !important` : `var(--paimary)`,border: page <= totalPages ? `solid thin var(--border)` : `solid thin var(--paimary)`}"
|
|
1773
|
+
@click="goToPage('next')"
|
|
1501
1774
|
>
|
|
1502
|
-
<
|
|
1503
|
-
v-if="row.row.stateDescription"
|
|
1504
|
-
:key="row.row[keyField] + '-description'"
|
|
1505
|
-
:data-testid="componentTestid + '-' + i + '-row-description'"
|
|
1506
|
-
class="state-description sub-row"
|
|
1507
|
-
@mouseenter="onRowMouseEnter"
|
|
1508
|
-
@mouseleave="onRowMouseLeave"
|
|
1775
|
+
<!-- <i class="icon icon-chevron-right" /> -->
|
|
1509
1776
|
>
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
>
|
|
1546
|
-
<i class="icon icon-chevron-left" />
|
|
1547
|
-
</button>
|
|
1548
|
-
<span>
|
|
1549
|
-
{{ pagingDisplay }}
|
|
1550
|
-
</span>
|
|
1551
|
-
<button
|
|
1552
|
-
type="button"
|
|
1553
|
-
class="btn btn-sm role-multi-action"
|
|
1554
|
-
data-testid="pagination-next"
|
|
1555
|
-
:disabled="page == totalPages || loading"
|
|
1556
|
-
@click="goToPage('next')"
|
|
1557
|
-
>
|
|
1558
|
-
<i class="icon icon-chevron-right" />
|
|
1559
|
-
</button>
|
|
1560
|
-
<button
|
|
1561
|
-
type="button"
|
|
1562
|
-
class="btn btn-sm role-multi-action"
|
|
1563
|
-
data-testid="pagination-last"
|
|
1564
|
-
:disabled="page == totalPages || loading"
|
|
1565
|
-
@click="goToPage('last')"
|
|
1566
|
-
>
|
|
1567
|
-
<i class="icon icon-chevron-end" />
|
|
1568
|
-
</button>
|
|
1569
|
-
</div>
|
|
1570
|
-
<button
|
|
1571
|
-
v-if="search"
|
|
1572
|
-
v-shortkey.once="['/']"
|
|
1573
|
-
class="hide"
|
|
1574
|
-
@shortkey="focusSearch()"
|
|
1575
|
-
/>
|
|
1576
|
-
<template v-if="tableActions">
|
|
1577
|
-
<button
|
|
1578
|
-
v-shortkey="['j']"
|
|
1579
|
-
class="hide"
|
|
1580
|
-
@shortkey="focusNext($event)"
|
|
1581
|
-
/>
|
|
1582
|
-
<button
|
|
1583
|
-
v-shortkey="['k']"
|
|
1584
|
-
class="hide"
|
|
1585
|
-
@shortkey="focusPrevious($event)"
|
|
1586
|
-
/>
|
|
1587
|
-
<button
|
|
1588
|
-
v-shortkey="['shift','j']"
|
|
1589
|
-
class="hide"
|
|
1590
|
-
@shortkey="focusNext($event, true)"
|
|
1591
|
-
/>
|
|
1777
|
+
</button>
|
|
1778
|
+
|
|
1779
|
+
<!-- 分页页码切换 -->
|
|
1780
|
+
<Select
|
|
1781
|
+
:mode="inputPerPage"
|
|
1782
|
+
:searchable="false"
|
|
1783
|
+
:clearable="false"
|
|
1784
|
+
:options="perPageOptions"
|
|
1785
|
+
v-model:value="inputPerPage"
|
|
1786
|
+
class="pageSelect"
|
|
1787
|
+
@update:value="changePerPage"
|
|
1788
|
+
/>
|
|
1789
|
+
|
|
1790
|
+
<div style="height: 100%; align-content: center;">
|
|
1791
|
+
跳至
|
|
1792
|
+
</div>
|
|
1793
|
+
<input
|
|
1794
|
+
v-model="inputPage"
|
|
1795
|
+
type="number"
|
|
1796
|
+
min="1"
|
|
1797
|
+
step="1"
|
|
1798
|
+
style="padding: 0px 10px;"
|
|
1799
|
+
@keyup.enter="handleToPage"
|
|
1800
|
+
>
|
|
1801
|
+
<div style="height: 100%; align-content: center;">
|
|
1802
|
+
页
|
|
1803
|
+
</div>
|
|
1804
|
+
<!-- <button
|
|
1805
|
+
type="button"
|
|
1806
|
+
class="btn btn-sm role-multi-action"
|
|
1807
|
+
style="padding: 0;max-width: 80px;background-color: white !important;"
|
|
1808
|
+
@click="setPage(inputPage)"
|
|
1809
|
+
>
|
|
1810
|
+
|
|
1811
|
+
</button> -->
|
|
1812
|
+
</div>
|
|
1592
1813
|
<button
|
|
1593
|
-
v-
|
|
1814
|
+
v-if="search"
|
|
1815
|
+
v-shortkey.once="['/']"
|
|
1594
1816
|
class="hide"
|
|
1595
|
-
@shortkey="
|
|
1817
|
+
@shortkey="focusSearch()"
|
|
1596
1818
|
/>
|
|
1597
|
-
<
|
|
1598
|
-
|
|
1819
|
+
<template v-if="tableActions">
|
|
1820
|
+
<button
|
|
1821
|
+
v-shortkey="['j']"
|
|
1822
|
+
class="hide"
|
|
1823
|
+
@shortkey="focusNext($event)"
|
|
1824
|
+
/>
|
|
1825
|
+
<button
|
|
1826
|
+
v-shortkey="['k']"
|
|
1827
|
+
class="hide"
|
|
1828
|
+
@shortkey="focusPrevious($event)"
|
|
1829
|
+
/>
|
|
1830
|
+
<button
|
|
1831
|
+
v-shortkey="['shift','j']"
|
|
1832
|
+
class="hide"
|
|
1833
|
+
@shortkey="focusNext($event, true)"
|
|
1834
|
+
/>
|
|
1835
|
+
<button
|
|
1836
|
+
v-shortkey="['shift','k']"
|
|
1837
|
+
class="hide"
|
|
1838
|
+
@shortkey="focusPrevious($event, true)"
|
|
1839
|
+
/>
|
|
1840
|
+
<slot name="shortkeys" />
|
|
1841
|
+
</template>
|
|
1842
|
+
</div>
|
|
1843
|
+
|
|
1599
1844
|
</div>
|
|
1600
1845
|
</template>
|
|
1601
1846
|
|
|
@@ -1749,9 +1994,12 @@ export default {
|
|
|
1749
1994
|
}
|
|
1750
1995
|
|
|
1751
1996
|
.search-box {
|
|
1752
|
-
height:
|
|
1753
|
-
margin-left:
|
|
1754
|
-
min-width: 180px;
|
|
1997
|
+
height: 32px;
|
|
1998
|
+
margin-left: 0px;
|
|
1999
|
+
/* min-width: 180px; */
|
|
2000
|
+
min-width: 280px;
|
|
2001
|
+
width: 280px !important;
|
|
2002
|
+
border: 1px solid rgb(217, 217, 217);
|
|
1755
2003
|
}
|
|
1756
2004
|
</style>
|
|
1757
2005
|
|
|
@@ -1777,7 +2025,8 @@ export default {
|
|
|
1777
2025
|
border-collapse: collapse;
|
|
1778
2026
|
min-width: 400px;
|
|
1779
2027
|
border-radius: 5px 5px 0 0;
|
|
1780
|
-
|
|
2028
|
+
border-bottom: 1px solid var(--border);
|
|
2029
|
+
/* outline: 1px solid var(--border); */
|
|
1781
2030
|
background: var(--sortable-table-bg);
|
|
1782
2031
|
border-radius: 4px;
|
|
1783
2032
|
|
|
@@ -1791,32 +2040,77 @@ export default {
|
|
|
1791
2040
|
td {
|
|
1792
2041
|
padding: 8px 5px;
|
|
1793
2042
|
border: 0;
|
|
2043
|
+
background: var(--sortable-table-row-bg);
|
|
1794
2044
|
|
|
1795
2045
|
&:first-child {
|
|
1796
2046
|
padding-left: 10px;
|
|
2047
|
+
position: sticky;
|
|
2048
|
+
left: 0;
|
|
2049
|
+
z-index: 2;
|
|
2050
|
+
}
|
|
2051
|
+
&:nth-child(2) {
|
|
2052
|
+
padding-left: 10px;
|
|
2053
|
+
position: sticky;
|
|
2054
|
+
left: 29px;
|
|
2055
|
+
z-index: 2;
|
|
1797
2056
|
}
|
|
1798
2057
|
|
|
1799
2058
|
&:last-child {
|
|
1800
2059
|
padding-right: 10px;
|
|
2060
|
+
position: sticky;
|
|
2061
|
+
right: 0;
|
|
2062
|
+
z-index: 2;
|
|
2063
|
+
/* padding-left: 10px; */
|
|
1801
2064
|
}
|
|
1802
2065
|
|
|
1803
2066
|
&.row-check {
|
|
1804
2067
|
padding-top: 12px;
|
|
2068
|
+
right: 0;
|
|
2069
|
+
position: sticky;
|
|
1805
2070
|
}
|
|
1806
2071
|
}
|
|
2072
|
+
th {
|
|
2073
|
+
padding: 13px 5px;
|
|
2074
|
+
border: 0;
|
|
2075
|
+
/* height: 50.84px; */
|
|
2076
|
+
box-sizing: border-box;
|
|
2077
|
+
background: var(--sortable-table-header-bg);
|
|
2078
|
+
|
|
2079
|
+
&:first-child {
|
|
2080
|
+
padding-left: 10px;
|
|
2081
|
+
position: sticky;
|
|
2082
|
+
left: 0;
|
|
2083
|
+
z-index: 2;
|
|
2084
|
+
}
|
|
2085
|
+
&:nth-child(2) {
|
|
2086
|
+
padding-left: 10px;
|
|
2087
|
+
position: sticky;
|
|
2088
|
+
left: 29px;
|
|
2089
|
+
z-index: 2;
|
|
2090
|
+
}
|
|
2091
|
+
|
|
2092
|
+
&:last-child {
|
|
2093
|
+
padding-left: 10px;
|
|
2094
|
+
padding-right: 10px;
|
|
2095
|
+
position: sticky;
|
|
2096
|
+
right: 0;
|
|
2097
|
+
z-index: 2;
|
|
2098
|
+
}
|
|
1807
2099
|
|
|
2100
|
+
}
|
|
1808
2101
|
tbody {
|
|
1809
2102
|
tr {
|
|
1810
2103
|
border-bottom: 1px solid var(--sortable-table-top-divider);
|
|
1811
2104
|
background-color: var(--sortable-table-row-bg);
|
|
2105
|
+
height: 60px;
|
|
1812
2106
|
|
|
1813
2107
|
&.main-row.has-sub-row {
|
|
1814
|
-
border-bottom: 0;
|
|
2108
|
+
/* border-bottom: 0; */
|
|
1815
2109
|
}
|
|
1816
2110
|
|
|
1817
2111
|
// if a main-row is hovered also hover it's sibling sub row. note - the reverse is handled in selection.js
|
|
1818
2112
|
&.main-row:not(.row-selected):hover + .sub-row {
|
|
1819
|
-
background-color: var(--sortable-table-hover-bg);
|
|
2113
|
+
/* background-color: var(--sortable-table-hover-bg); */
|
|
1820
2114
|
}
|
|
1821
2115
|
|
|
1822
2116
|
&:last-of-type {
|
|
@@ -1824,7 +2118,7 @@ export default {
|
|
|
1824
2118
|
}
|
|
1825
2119
|
|
|
1826
2120
|
&:hover, &.sub-row-hovered {
|
|
1827
|
-
background-color: var(--sortable-table-hover-bg);
|
|
2121
|
+
/* background-color: var(--sortable-table-hover-bg); */
|
|
1828
2122
|
}
|
|
1829
2123
|
|
|
1830
2124
|
&.state-description > td {
|
|
@@ -1839,7 +2133,7 @@ export default {
|
|
|
1839
2133
|
}
|
|
1840
2134
|
|
|
1841
2135
|
tr.row-selected {
|
|
1842
|
-
background: var(--sortable-table-selected-bg);
|
|
2136
|
+
/* background: var(--sortable-table-selected-bg); */
|
|
1843
2137
|
}
|
|
1844
2138
|
|
|
1845
2139
|
.no-rows {
|
|
@@ -1854,18 +2148,22 @@ export default {
|
|
|
1854
2148
|
background-color: var(--body-bg);
|
|
1855
2149
|
}
|
|
1856
2150
|
}
|
|
2151
|
+
.no-results{
|
|
2152
|
+
height: 60px;
|
|
2153
|
+
}
|
|
1857
2154
|
|
|
1858
2155
|
&.group {
|
|
1859
2156
|
&:before {
|
|
1860
2157
|
content: "";
|
|
1861
2158
|
display: block;
|
|
1862
|
-
height:
|
|
2159
|
+
height: 0px;
|
|
1863
2160
|
background-color: transparent;
|
|
1864
2161
|
}
|
|
1865
2162
|
}
|
|
1866
2163
|
|
|
1867
2164
|
tr.group-row {
|
|
1868
2165
|
background-color: initial;
|
|
2166
|
+
height: 40px;
|
|
1869
2167
|
|
|
1870
2168
|
&:first-child {
|
|
1871
2169
|
border-bottom: 2px solid var(--sortable-table-row-bg);
|
|
@@ -1962,7 +2260,7 @@ export default {
|
|
|
1962
2260
|
}
|
|
1963
2261
|
|
|
1964
2262
|
.fixed-header-actions {
|
|
1965
|
-
padding: 0 0 20px 0;
|
|
2263
|
+
/* padding: 0 0 20px 0; */
|
|
1966
2264
|
width: 100%;
|
|
1967
2265
|
z-index: z-index('fixedTableHeader');
|
|
1968
2266
|
background: transparent;
|
|
@@ -2078,12 +2376,121 @@ export default {
|
|
|
2078
2376
|
}
|
|
2079
2377
|
|
|
2080
2378
|
.paging {
|
|
2081
|
-
|
|
2379
|
+
//text-align: center;
|
|
2380
|
+
display: flex;
|
|
2381
|
+
justify-content: flex-end;
|
|
2382
|
+
gap: 0 10px;
|
|
2082
2383
|
text-align: center;
|
|
2083
|
-
|
|
2384
|
+
max-height: 32px;
|
|
2385
|
+
background-color: transparent;
|
|
2386
|
+
flex: 1;
|
|
2084
2387
|
SPAN {
|
|
2085
2388
|
display: inline-block;
|
|
2086
|
-
min-width: 200px;
|
|
2389
|
+
//min-width: 200px;
|
|
2390
|
+
}
|
|
2391
|
+
|
|
2392
|
+
/* 针对Webkit浏览器(如Chrome, Safari) */
|
|
2393
|
+
input[type="number"]::-webkit-inner-spin-button,
|
|
2394
|
+
input[type="number"]::-webkit-outer-spin-button {
|
|
2395
|
+
-webkit-appearance: none;
|
|
2396
|
+
margin: 0;
|
|
2397
|
+
}
|
|
2398
|
+
|
|
2399
|
+
/* 针对Firefox */
|
|
2400
|
+
input[type="number"] {
|
|
2401
|
+
-moz-appearance: textfield;
|
|
2402
|
+
// background-color: var(--disabled-bg) !important;
|
|
2403
|
+
border: 1px var(--border) solid;
|
|
2404
|
+
border-radius: 2px;
|
|
2405
|
+
width: 50px;
|
|
2406
|
+
height: 100%;
|
|
2407
|
+
}
|
|
2408
|
+
}
|
|
2409
|
+
|
|
2410
|
+
</style>
|
|
2411
|
+
<style scoped lang="scss">
|
|
2412
|
+
:deep() .role-link{
|
|
2413
|
+
min-width: unset !important;
|
|
2414
|
+
width: 38px;
|
|
2415
|
+
min-height: 20px !important;
|
|
2416
|
+
height: 20px !important;
|
|
2417
|
+
line-height: 20px !important;
|
|
2418
|
+
&:hover{
|
|
2419
|
+
background-color: unset !important;
|
|
2420
|
+
}
|
|
2421
|
+
}
|
|
2422
|
+
:deep() .checkbox-outer-container-extra{
|
|
2423
|
+
margin-top: 0px !important;
|
|
2424
|
+
}
|
|
2425
|
+
.pageSelect {
|
|
2426
|
+
max-width: 100px;
|
|
2427
|
+
}
|
|
2428
|
+
.page-btn-normal {
|
|
2429
|
+
padding: 0;
|
|
2430
|
+
max-width: 32px;
|
|
2431
|
+
background-color:white !important;
|
|
2432
|
+
}
|
|
2433
|
+
|
|
2434
|
+
.pageSelect{
|
|
2435
|
+
&:deep() .vs__actions:after{
|
|
2436
|
+
padding-top: 10px;
|
|
2087
2437
|
}
|
|
2438
|
+
}
|
|
2439
|
+
.sort-table-div{
|
|
2440
|
+
width:100%;
|
|
2441
|
+
white-space:nowrap;
|
|
2442
|
+
overflow-x: auto;
|
|
2088
2443
|
}
|
|
2444
|
+
|
|
2445
|
+
/* 滚动阴影左边 */
|
|
2446
|
+
.shadow-left td:nth-child(2)::after{
|
|
2447
|
+
content: "";
|
|
2448
|
+
position: absolute;
|
|
2449
|
+
top: 0;
|
|
2450
|
+
width: 10px;
|
|
2451
|
+
height: 100%;
|
|
2452
|
+
right: -10px;
|
|
2453
|
+
background: linear-gradient(to right, rgba(5, 5, 5, 0.06), transparent);
|
|
2454
|
+
}
|
|
2455
|
+
.shadow-left{
|
|
2456
|
+
&:deep() th:nth-child(2)::after{
|
|
2457
|
+
content: "";
|
|
2458
|
+
position: absolute;
|
|
2459
|
+
top: 0;
|
|
2460
|
+
width: 10px;
|
|
2461
|
+
height: 100%;
|
|
2462
|
+
right: -10px;
|
|
2463
|
+
background: linear-gradient(to right, rgba(5, 5, 5, 0.06), transparent);
|
|
2464
|
+
}
|
|
2465
|
+
}
|
|
2466
|
+
|
|
2467
|
+
/* 滚动阴影右边 */
|
|
2468
|
+
.shadow-right td:nth-last-child(1)::after{
|
|
2469
|
+
content: "";
|
|
2470
|
+
position: absolute;
|
|
2471
|
+
top: 0;
|
|
2472
|
+
width: 10px;
|
|
2473
|
+
height: 100%;
|
|
2474
|
+
left: -10px;
|
|
2475
|
+
background: linear-gradient(to left, rgba(5, 5, 5, 0.06), transparent);
|
|
2476
|
+
}
|
|
2477
|
+
|
|
2478
|
+
.shadow-right{
|
|
2479
|
+
&:deep() th:nth-last-child(1)::after {
|
|
2480
|
+
content: "";
|
|
2481
|
+
position: absolute;
|
|
2482
|
+
top: 0;
|
|
2483
|
+
width: 10px;
|
|
2484
|
+
height: 100%;
|
|
2485
|
+
left: -10px;
|
|
2486
|
+
background: linear-gradient(to left, rgba(5, 5, 5, 0.06), transparent);
|
|
2487
|
+
}
|
|
2488
|
+
}
|
|
2489
|
+
|
|
2490
|
+
/* 滚动阴影垂直修正 */
|
|
2491
|
+
.shadow-y td:nth-child(-n + 2), /* 前两列 */
|
|
2492
|
+
.shadow-y td:nth-last-child(1) /* 后一列 */
|
|
2493
|
+
{
|
|
2494
|
+
z-index: 3;
|
|
2495
|
+
}
|
|
2089
2496
|
</style>
|