Commit 04e5aa31 by ym

ui

1 parent 4ba717c0
<template>
<div class="glsx-table">
<el-table id="initTable" :ref="tableParams.mutiSelectName + 'MutiTable' || 'MutiTable'" :data="getListApi ? data : tableData" :row-key="tableParams.mutiSelectUniqueKey || ''" v-loading="loading" :border="border" :tableId="tableId" :highlight-current-row="true" :stripe="true" @sort-change="sortChange" @selection-change="handleSelect" :size="size" :header-cell-style="headerStyle">
<el-table id="initTable" :ref="tableParams.mutiSelectName + 'MutiTable' || 'MutiTable'" :data="getListApi ? data : tableData" :row-key="tableParams.mutiSelectUniqueKey || ''" v-loading="loading" :height="tableHeightValues" :border="border" :tableId="tableId" :highlight-current-row="true" :stripe="true" @sort-change="sortChange" @selection-change="handleSelect" :size="size" :header-cell-style="headerStyle">
<el-table-column v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName" type="selection" width="55" :selectable="checkSelectable" :reserve-selection="true"></el-table-column>
<el-table-column v-if="hasNum" align="center" width="60px" label="序号" type="index" :index="index => index + (page[this.pageConf.pageNum] - 1) * page[this.pageConf.pageSize] + 1"></el-table-column>
<el-table-column v-for="(item, index) in tableColumns" :key="index" :label="item.label" :prop="item.prop" :width="item.width" :min-width="item.minWidth" :align="item.align || 'center'" :sortable="item.sortable">
......@@ -25,11 +25,11 @@
<slot name="auth-button" :scope="scope.row"></slot>
</template>
</el-table-column>
<div slot="empty" class="emptyBg">
<template slot="empty" class="emptyBg">
<img class="noDataImg" :src="noDataImg" v-if="noDataImg" alt="" />
<div>{{ noDataText }}</div>
<slot name="additionalContent"></slot>
</div>
</template>
</el-table>
<el-pagination v-if="hasPage" background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page[this.pageConf.pageNum]" :page-sizes="[10, 20, 30, 40]" :page-size="page[this.pageConf.pageSize]" :total="getListApi ? total : tableTotal" :layout="layout"></el-pagination>
</div>
......@@ -195,8 +195,9 @@ export default {
// 多选数组
mutiSelectArr: {},
tableColumns: [],
showClass: false
showClass: false,
tableHeightValues:null
}
},
......@@ -249,6 +250,14 @@ export default {
//设置表格高度
setTableHeightFun(navHeight = 0) {
//navHeight 传值底部高度
var baseNavEle = document.querySelector('.scrm-base-nav')
var baseSubNavEle = document.querySelector('.scrm-base-sub-nav')
var baseNavEleHeight = 0
var baseSubNavEleHeight = 0
if (baseNavEle && baseNavEle) {
baseNavEleHeight = baseNavEle.clientHeight//60
baseSubNavEleHeight = baseSubNavEle.clientHeight//14
}
let paginationHeight
if (document.querySelector('.el-pagination')) {
paginationHeight = document.querySelector('.el-pagination').clientHeight + 20
......@@ -258,8 +267,9 @@ export default {
let offsettop = document.getElementById('initTable').offsetTop
let clientHeight = document.documentElement.clientHeight
document.getElementById('initTable').style.height = clientHeight - offsettop - paginationHeight - navHeight + 'px'
document.querySelector('.el-table__empty-block').style.height=(clientHeight - offsettop - paginationHeight - navHeight)+'px';
// document.getElementById('initTable').style.height = clientHeight - offsettop - paginationHeight - navHeight + 'px'
// document.querySelector('.el-table__empty-block').style.height=(clientHeight - offsettop - paginationHeight - navHeight)+'px';
this.tableHeightValues=(clientHeight - offsettop - paginationHeight - baseNavEleHeight-baseSubNavEleHeight-10-30-20)+'px';
},
refreshTable(isResetPageNum = true, isClearMuti = true) {
......@@ -281,6 +291,9 @@ export default {
this.data = this.findVal(res, this.tableParams.listName)
this.total = this.findVal(res, this.pageConf.totalCount)
this.loading = false
if(this.data.length){
this.$emit('setTableFinishFun',this.data)//表格请求到数据
}
})
.catch(() => {
this.loading = false
......@@ -346,14 +359,61 @@ export default {
padding-right: 14px !important;
}
.glsx-table .emptyBg {
display: inline-block;
/* margin-top: 150px; */
height: 100%;
}
.glsx-table .emptyBg div {
margin: -20px 0 10px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100%;
}
.el-table__body-wrapper::-webkit-scrollbar {
width: 10px;
height: 10px;
/* display: none; */
}
/*正常情况下滑块的样式*/
.el-table__body-wrapper::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.05);
border-radius: 10px;
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
}
/*鼠标悬浮在该类指向的控件上时滑块的样式*/
.el-table__body-wrapper::-webkit-scrollbar-thumb {
/* background-color: rgba(0, 0, 0, 0.2); */
background: #e9e8ff;
border-radius: 10px;
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
}
/*鼠标悬浮在滑块上时滑块的样式*/
/* &::-webkit-scrollbar-thumb:hover {
background-color: rgba(0, 0, 0, 0.4);
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
} */
/*正常时候的主干部分*/
.el-table__body-wrapper::-webkit-scrollbar-track {
border-radius: 10px;
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);
background-color: white;
}
/*鼠标悬浮在滚动条上的主干部分*/
/* .el-table__body-wrapper::-webkit-scrollbar-track:hover {
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.4);
background-color: rgba(0, 0, 0, 0.01);
} */
/* .hasTableContent .el-table__body{
height: 100%;
} */
......
......@@ -153,6 +153,7 @@ $dackColor: #4f48e6;
.el-button--text {
color: $defaultColor;
padding: 0px;
}
.el-select-dropdown__item.selected {
......@@ -160,6 +161,10 @@ $dackColor: #4f48e6;
font-weight: bold;
}
.el-textarea__inner:focus {
border-color: $dackColor;
}
.el-switch.is-checked .el-switch__core {
border-color: $defaultColor;
background-color: $defaultColor;
......@@ -170,6 +175,13 @@ $dackColor: #4f48e6;
background: #fff;
}
.el-radio-button__orig-radio:checked+.el-radio-button__inner {
background-color: $defaultColor;
border-color: $defaultColor;
-webkit-box-shadow: -1px 0 0 0 $defaultColor;
box-shadow: -1px 0 0 0 $defaultColor;
}
.el-radio__inner:after {
background-color: $defaultColor;
width: 10px;
......@@ -184,6 +196,10 @@ $dackColor: #4f48e6;
color: $defaultColor;
}
.el-radio-button__inner:hover {
color: $defaultColor;
}
.el-checkbox__input.is-checked .el-checkbox__inner {
background-color: $defaultColor;
border-color: $defaultColor;
......@@ -268,11 +284,11 @@ $dackColor: #4f48e6;
/* 表格 */
.el-table--medium .el-table__cell {
padding: 8.5px 0px;
padding: 16px 0px;
}
.el-table .cell {
line-height: 36px;
line-height: 20px;
}
.el-table .el-table__header tr {
......@@ -355,6 +371,17 @@ $dackColor: #4f48e6;
margin-left: 10px;
}
.el-pagination.is-background .el-pager li:not(.disabled):hover {
color: $defaultColor;
}
.el-drawer__header {
font-size: 22px;
font-weight: 600;
color: #333333;
line-height: 30px;
}
.el-form-item__label {
font-size: 14px;
font-weight: 400;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!