Commit 2c4dacf4 authored by tianhongyang's avatar tianhongyang

表格bug样式修改

parent 91e9e678
...@@ -361,10 +361,7 @@ li { ...@@ -361,10 +361,7 @@ li {
.is-scrolling-left + .el-table__fixed, .is-scrolling-left + .el-table__fixed,
.is-scrolling-middle + .el-table__fixed, .is-scrolling-middle + .el-table__fixed,
.is-scrolling-right + .el-table__fixed { .is-scrolling-right + .el-table__fixed {
//box-shadow:none;
//-webkit-box-shadow: 2px 0px 1px -2px #C3CBD5;
box-shadow: 2px 0 8px -7px #202020; box-shadow: 2px 0 8px -7px #202020;
//border-right: 1px solid #C3CBD5;
height: auto !important; height: auto !important;
bottom: 16px !important; bottom: 16px !important;
} }
...@@ -455,7 +452,7 @@ li { ...@@ -455,7 +452,7 @@ li {
} }
} }
// 封装组件样式 // 封装组件样式 不要改动
.table-list-com-ins { .table-list-com-ins {
.table-item { .table-item {
.el-table { .el-table {
...@@ -514,8 +511,7 @@ li { ...@@ -514,8 +511,7 @@ li {
.is-scrolling-middle + .el-table__fixed, .is-scrolling-middle + .el-table__fixed,
.is-scrolling-right + .el-table__fixed { .is-scrolling-right + .el-table__fixed {
box-shadow: 2px 0 8px -7px #202020; box-shadow: 2px 0 8px -7px #202020;
height: auto !important; bottom: 15px !important;
bottom: 16px !important;
} }
.el-table__body tr.current-row > td.el-table__cell { .el-table__body tr.current-row > td.el-table__cell {
background: none; background: none;
......
<template> <template>
<div class="table-list-com-ins" :class="{'is-empty-table' : !tableDataTotal,'no-pagination' : !hasQueryParams}"> <div class="table-list-com-ins" :class="{'is-empty-table' : !tableDataTotal,'no-pagination' : !hasQueryParams,'auto-max-height' : maxHeight}">
<div class="table-item"> <div class="table-item">
<el-table v-if="tableDataTotal>0" class="fixed-table" v-loading="tableLoading" :data="tableData" element-loading-text="Loading" ref="tableRef" <el-table v-if="tableDataTotal>0" class="fixed-table" v-loading="tableLoading" :data="tableData" element-loading-text="Loading" ref="tableRef"
border fit highlight-current-row :default-sort="defaultSort?defaultSort:{}" @sort-change="sortChange" @selection-change="selectionChange" border fit highlight-current-row :default-sort="defaultSort?defaultSort:{}" @sort-change="sortChange" @selection-change="selectionChange"
...@@ -51,7 +51,7 @@ export default { ...@@ -51,7 +51,7 @@ export default {
type: [String, Number] type: [String, Number]
}, },
maxHeight: { maxHeight: {
type: Boolean type: [Boolean, Number]
}, },
isIndex: { isIndex: {
type: Boolean, type: Boolean,
...@@ -167,6 +167,10 @@ export default { ...@@ -167,6 +167,10 @@ export default {
async maxHeightInit() { async maxHeightInit() {
try { try {
await this.$nextTick(); await this.$nextTick();
if (typeof this.maxHeight == "number") {
this.comMaxHeight = `${this.maxHeight}px`;
return;
}
/** /**
* @type {HTMLDivElement} * @type {HTMLDivElement}
*/ */
...@@ -220,6 +224,7 @@ export default { ...@@ -220,6 +224,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.table-list-com-ins { .table-list-com-ins {
/* 空数据样式 */
&.is-empty-table { &.is-empty-table {
.table-item { .table-item {
max-height: unset; max-height: unset;
...@@ -227,6 +232,32 @@ export default { ...@@ -227,6 +232,32 @@ export default {
} }
} }
/* maxHeight自适应样式 */
&.auto-max-height {
::v-deep .table-item {
.el-table {
/* 右侧fixed列 */
.el-table__fixed-right {
z-index: 9;
right: 16px !important;
bottom: 15px !important;
.el-table__fixed-header-wrapper {
position: absolute;
}
}
.el-table__fixed-right-patch {
width: 16px !important;
z-index: 9;
background: #f0f3fa;
border: 1px solid #e6eaf1;
border-left: unset;
border-bottom: unset;
}
}
}
}
/* 不需要分页 或没有分页参数 */
&.no-pagination { &.no-pagination {
::v-deep .table-item { ::v-deep .table-item {
max-height: 100%; max-height: 100%;
...@@ -290,13 +321,11 @@ export default { ...@@ -290,13 +321,11 @@ export default {
.el-table__header-wrapper { .el-table__header-wrapper {
min-height: 40px; min-height: 40px;
} }
/* 右侧fixed列 */ .el-table__fixed {
.el-table__fixed-right { height: 100% !important;
right: 16px !important;
bottom: 16px !important;
.el-table__fixed-header-wrapper {
position: absolute;
} }
.el-table__fixed-right {
height: 100% !important;
} }
} }
} }
...@@ -344,19 +373,6 @@ export default { ...@@ -344,19 +373,6 @@ export default {
::v-deep .el-table--enable-row-hover .el-table__body tr:hover > td { ::v-deep .el-table--enable-row-hover .el-table__body tr:hover > td {
background-color: #dcebff; background-color: #dcebff;
} }
::v-deep .fixed-table {
overflow: visible;
}
::v-deep .el-table__header-wrapper {
position: sticky;
top: 0;
z-index: 9;
}
::v-deep .el-table__fixed-header-wrapper {
position: sticky;
z-index: 9;
top: 0;
}
::v-deep .el-table__fixed { ::v-deep .el-table__fixed {
overflow-x: clip; overflow-x: clip;
overflow-y: clip; overflow-y: clip;
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<!-- 数据列表部分 --> <!-- 数据列表部分 -->
<div class="project-feedsummary-list-container"> <div class="project-feedsummary-list-container">
<dsk-skeleton v-if="tableLoading"></dsk-skeleton> <dsk-skeleton v-if="tableLoading"></dsk-skeleton>
<custom-table :tableData="tableDataList" :formColum="formColum" v-else-if="!tableLoading" :maxHeight="true" :tableDataTotal="total" <custom-table :tableData="tableDataList" :formColum="formColum" v-else-if="!tableLoading" :tableDataTotal="total"
:paging="false"> :paging="false">
<template slot="action-field-bar" slot-scope="scope"> <template slot="action-field-bar" slot-scope="scope">
<div class="project-action-field-bar" v-if="scope.row.id != '0'"> <div class="project-action-field-bar" v-if="scope.row.id != '0'">
...@@ -128,7 +128,7 @@ export default { ...@@ -128,7 +128,7 @@ export default {
total: 0, total: 0,
// 列表表头 // 列表表头
formColum: [ formColum: [
{ label: '序号', prop: "staticSerialNumber", type: "index", lock: true, width: "53", fixed: false, uid: v4() }, { label: '序号', prop: "staticSerialNumber", type: "index", lock: true, width: "53", fixed: "left", uid: v4() },
{ label: '成本科目', prop: "cbSubjectName", width: "137", uid: v4(), slot: true }, { label: '成本科目', prop: "cbSubjectName", width: "137", uid: v4(), slot: true },
{ label: '公司编码', prop: "companyNo", width: "137", uid: v4() }, { label: '公司编码', prop: "companyNo", width: "137", uid: v4() },
{ label: '集团编码', prop: "orgNo", width: "137", uid: v4() }, { label: '集团编码', prop: "orgNo", width: "137", uid: v4() },
...@@ -535,7 +535,7 @@ export default { ...@@ -535,7 +535,7 @@ export default {
.project-feedsummary-list-container { .project-feedsummary-list-container {
width: 100%; width: 100%;
height: calc(100% - 48px); height: calc(100% - 48px);
/* overflow: auto; */ overflow: auto;
.dsk-skeleton-outer-container { .dsk-skeleton-outer-container {
padding: 0px; padding: 0px;
......
...@@ -193,8 +193,8 @@ export default { ...@@ -193,8 +193,8 @@ export default {
const detail = await getProjectDetailApi(projectId); const detail = await getProjectDetailApi(projectId);
if (detail.code == 200 && detail.data) { if (detail.code == 200 && detail.data) {
if (detail.data.id) detail.data["projectId"] = detail.data.id; if (detail.data.id) detail.data["projectId"] = detail.data.id;
// detail.data["projectId"] = "1754425038355890177"; detail.data["projectId"] = "1754425038355890177";
// detail.data["cbStage"] = 0; detail.data["cbStage"] = 0;
this.detailInfo = detail.data; this.detailInfo = detail.data;
} }
} catch (error) { } catch (error) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment