优化角色管理
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
<el-switch v-model="item.sortable"></el-switch>
|
||||
</span>
|
||||
<span class="fixed_b">
|
||||
<el-switch v-model="item.fixed"></el-switch>
|
||||
<el-switch v-model="item.fix"></el-switch>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -114,7 +114,7 @@
|
||||
.setting-column__list li.ghost {opacity: 0.3;}
|
||||
|
||||
.setting-column__bottom {border-top: 1px solid #EBEEF5;padding-top:15px;text-align: right;}
|
||||
|
||||
|
||||
.dark .setting-column__title {border-color: var(--el-border-color-light);}
|
||||
.dark .setting-column__bottom {border-color: var(--el-border-color-light);}
|
||||
</style>
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
<el-table v-bind="$attrs" :header-cell-style="{'background': '#F5F7FA','color':'#606266'}" :data="tableData" :row-key="rowKey" :key="toggleIndex" ref="scTable" :height="height=='auto'?null:'100%'" :size="config.size" :border="config.config.border" :stripe="config.config.stripe" :summary-method="remoteSummary?remoteSummaryMethod:summaryMethod" @sort-change="sortChange" @filter-change="filterChange">
|
||||
<slot></slot>
|
||||
<template v-for="(item, index) in userColumn" :key="index">
|
||||
<!-- item.showOverflowTooltip-->
|
||||
<el-table-column v-if="!item.hide" :column-key="item.prop" :label="item.label" :prop="item.prop" :width="item.width" :sortable="item.sortable" :fixed="item.fixed" :filters="item.filters" :filter-method="remoteFilter||!item.filters?null:filterHandler" :show-overflow-tooltip="true">
|
||||
<!--item.showOverflowTooltip-->
|
||||
<el-table-column v-if="!item.hide" :column-key="item.prop" :label="item.label" :prop="item.prop" :width="item.width" :sortable="item.sortable" :fixed="item.fix" :filters="item.filters" :filter-method="remoteFilter||!item.filters?null:filterHandler" :show-overflow-tooltip="true">
|
||||
<template #default="scope">
|
||||
<slot :name="item.prop" v-bind="scope">
|
||||
{{scope.row[item.prop]}}
|
||||
@@ -28,6 +28,9 @@
|
||||
</template>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="scTable-total" v-if="!hideTotal">
|
||||
<slot name="total" :params="total_count_item"></slot>
|
||||
</div>
|
||||
<div class="scTable-page" v-if="!hidePagination || !hideDo">
|
||||
<div class="scTable-pagination">
|
||||
<el-pagination v-if="!hidePagination && showPagination" background :small="true" :layout="paginationLayout" :total="total" :page-size="scPageSize" :page-sizes="pageSizes" v-model:currentPage="currentPage" @current-change="paginationChange" @update:page-size="pageSizeChange"></el-pagination>
|
||||
@@ -92,6 +95,7 @@
|
||||
hidePagination: { type: Boolean, default: false },
|
||||
showPagination: { type: Boolean, default: true },
|
||||
hideDo: { type: Boolean, default: false },
|
||||
hideTotal: { type: Boolean, default: true },
|
||||
hideRefresh: { type: Boolean, default: false },
|
||||
hideSetting: { type: Boolean, default: false },
|
||||
paginationLayout: { type: String, default: config.paginationLayout },
|
||||
@@ -117,7 +121,7 @@
|
||||
return Number(this.height)?Number(this.height)+'px':this.height
|
||||
},
|
||||
_table_height() {
|
||||
return this.hidePagination && this.hideDo ? "100%" : "calc(100% - 51px)"
|
||||
return this.hidePagination && this.hideDo ? "100%" : this.hideTotal? "calc(100% - 51px)": "calc(100% - 83px)"
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -127,6 +131,10 @@
|
||||
emptyText: "暂无数据",
|
||||
toggleIndex: 0,
|
||||
tableData: [],
|
||||
total_count_item:{
|
||||
total_quantity:0,
|
||||
total_cost:0
|
||||
},
|
||||
total: 0,
|
||||
currentPage: 1,
|
||||
prop: null,
|
||||
@@ -234,6 +242,9 @@
|
||||
if(response.data.tableConfig && response.data.tableConfig.size){
|
||||
this.config = response.data.tableConfig;
|
||||
}
|
||||
if(response.data.count_item){
|
||||
this.total_count_item = response.data.count_item;
|
||||
}
|
||||
this.total = response.total || 0;
|
||||
this.summary = response.summary || {};
|
||||
this.loading = false;
|
||||
@@ -453,6 +464,7 @@
|
||||
.scTable {}
|
||||
.scTable-table {height: calc(100% - 50px);}
|
||||
.scTable-page {height:50px;display: flex;align-items: center;justify-content: space-between;padding:0 15px;}
|
||||
.scTable-total{background: var(--el-fill-color-light);height: 32px;display: flex;align-items: center;padding: 0 15px;border-bottom: var(--el-table-border);}
|
||||
.scTable-do {white-space: nowrap;}
|
||||
.scTable ::v-deep .el-table__footer .cell {font-weight: bold;}
|
||||
.scTable ::v-deep .el-table__body-wrapper .el-scrollbar__bar.is-horizontal {height: 12px;border-radius: 12px;}
|
||||
|
||||
Reference in New Issue
Block a user