Commit 0e22c1f5 authored by huangjie's avatar huangjie

Merge branch 'V20231129-中建一局二公司' of http://192.168.60.201/root/dsk-operate-sys...

Merge branch 'V20231129-中建一局二公司' of http://192.168.60.201/root/dsk-operate-sys into V20231129-中建一局二公司
parents 67e9202b 792aba24
......@@ -2,17 +2,12 @@
<div class="custom-table-list-com-ins"
:class="{'is-empty-table' : !tableDataTotal,'no-pagination' : !hasQueryParams,'auto-max-height' : maxHeight,'has-y-Scroll' : maxHeight && hasYScroll}"
:style="maxBodyFixedStyle">
<div class="table-item">
<el-table v-if="tableDataTotal>0" class="custom-table" v-loading="tableLoading" :data="tableData" element-loading-text="Loading"
<div class="custom-table-item">
<el-table v-if="tableDataTotal>0" class="custom-table" v-loading="comTableLoading" :data="tableData" element-loading-text="加载中"
ref="customTableRef" border fit highlight-current-row :default-sort="defaultSort?defaultSort:{}" @sort-change="sortChange"
@selection-change="selectionChange" :cell-class-name="cellClassName" :cell-style="cellStyle" :row-class-name="rowClassName"
:row-style="rowStyle" :height="height" :maxHeight="comMaxHeight" v-sticky-header="stickyHeader">
<el-table-column type="selection" :width="needSelection.width ? needSelection.width : '38px'" v-if="needSelection.flag"
:fixed="needSelection.fixed" :align="needSelection.align" :show-overflow-tooltip="needSelection.showOverflowTooltip">
</el-table-column>
<el-table-column type="index" v-if="isIndex" label="序号" :width="flexWidth(tableData)" align="left" :fixed="indexFixed" :resizable="false">
<template slot-scope="scope">{{pagingHandler(hasQueryParams,queryParams,scope)}}</template>
</el-table-column>
@selection-change="selectionChange" @expand-change="expandChange" :cell-class-name="cellClassName" :cell-style="cellStyle"
:row-class-name="rowClassName" :row-style="rowStyle" :row-key="rowKey" :lazy="lazy" :load="loadFn" :tree-props="treeOptions"
:default-expand-all="defaultExpandAll" :indent="indent" :height="height" :maxHeight="comMaxHeight" v-sticky-header="stickyHeader">
<!-- 列二次封装 -->
<template v-for="(item,index) of formColum">
......@@ -57,20 +52,6 @@ export default {
maxHeight: {
type: [Boolean, Number]
},
isIndex: {
type: Boolean,
default: false
},
needSelection: {
type: Object,
default: () => ({
flag: false,
width: "39px",
fixed: false,
align: "left",
showOverflowTooltip: false
})
},
cellClassName: {
type: Function,
default: () => { }
......@@ -87,6 +68,39 @@ export default {
type: Function,
default: () => { }
},
rowKey: {
type: [String, Number],
default: "id"
},
// 是否树形结构懒加载
lazy: {
type: Boolean,
default: false
},
// 懒加载函数
loadFn: {
type: Function,
default: () => { }
},
// 懒加载配置字段映射
treeOptions: {
type: Object,
default: () => ({})
},
// 树形结构默认展开行
defaultExpandAll: {
type: Boolean,
default: false
},
// 树形结构展示事件
expandChange: {
type: Function,
default: () => { }
},
indent: {
type: Number,
default: 16
},
// 吸顶偏移量
stickyHeader: {
type: Object,
......@@ -147,7 +161,8 @@ export default {
headerLastBlockHeight: 0,
hasYScroll: false,
observer: null,
resizeTimer: null
resizeTimer: null,
comTableLoading: this.tableLoading
};
},
watch: {
......@@ -166,6 +181,11 @@ export default {
},
immediate: true,
deep: true
},
tableLoading: {
handler(newValue) {
this.comTableLoading = newValue;
}
}
},
computed: {
......@@ -303,7 +323,7 @@ export default {
.custom-table-list-com-ins {
/* 空数据样式 */
&.is-empty-table {
.table-item {
.custom-table-item {
max-height: unset;
height: 100%;
}
......@@ -312,7 +332,7 @@ export default {
/* maxHeight自适应样式 */
&.auto-max-height {
height: 100%;
::v-deep .table-item {
::v-deep .custom-table-item {
// 原滚动条为6px 现在多10px
.el-table {
/* 右侧fixed列 */
......@@ -350,7 +370,7 @@ export default {
// 是否存在Y轴滚动条
&.has-y-Scroll {
::v-deep .table-item {
::v-deep .custom-table-item {
.el-table {
/* 右侧fixed列 */
.el-table__fixed-right {
......@@ -366,12 +386,12 @@ export default {
/* 不需要分页 或没有分页参数 */
&.no-pagination {
::v-deep .table-item {
::v-deep .custom-table-item {
max-height: 100%;
}
}
::v-deep .table-item {
::v-deep .custom-table-item {
width: 100%;
max-height: calc(100% - 40px);
......
......@@ -72,5 +72,19 @@ export default {
height: calc(100%);
}
}
.title_wrap{
padding: 20px;
background-color: #FFFFFF;
border-bottom: 1px solid #e0e0e0;
}
.enterprise_title{
border-left: 2px solid #445781;
padding-left: 8px;
font-size: 16px;
height: 16px;
line-height: 16px;
font-weight: 700;
color: #232323;
}
}
</style>
......@@ -67,5 +67,19 @@ export default {
height: calc(100%);
}
}
.title_wrap{
padding: 20px;
background-color: #FFFFFF;
border-bottom: 1px solid #e0e0e0;
}
.enterprise_title{
border-left: 2px solid #445781;
padding-left: 8px;
font-size: 16px;
height: 16px;
line-height: 16px;
font-weight: 700;
color: #232323;
}
}
</style>
......@@ -851,7 +851,7 @@ export default {
}
::v-deep .custom-table-list-com-ins {
.table-item {
.custom-table-item {
.el-table {
th {
height: 40px;
......
......@@ -467,7 +467,7 @@ export default {
}
::v-deep .custom-table-list-com-ins {
.table-item {
.custom-table-item {
.el-table {
th {
height: 40px;
......
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