|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div class="bs-table" style="height:calc(100vh - 330px)">
|
|
|
|
|
|
|
+ <div class="bs-table" :style="{height:height?height:'calc(100vh - 330px)'}">
|
|
|
<el-table border stripe ref="tables" :row-class-name="tableClassName" :header-cell-style="{background:'#fafafafa',height:'40px','color':'#000000'}" highlight-current-row :data="data" size="mini" @row-click="rowClick" height="100%" style="width:100%;" @selection-change="handleSelectionChange" >
|
|
<el-table border stripe ref="tables" :row-class-name="tableClassName" :header-cell-style="{background:'#fafafafa',height:'40px','color':'#000000'}" highlight-current-row :data="data" size="mini" @row-click="rowClick" height="100%" style="width:100%;" @selection-change="handleSelectionChange" >
|
|
|
<!-- <div slot="empty">
|
|
<!-- <div slot="empty">
|
|
|
<el-empty :image="require('../../../assets/empty.svg')" :image-size="250">
|
|
<el-empty :image="require('../../../assets/empty.svg')" :image-size="250">
|
|
@@ -13,7 +13,7 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column show-overflow-tooltip v-for="(col) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :width="col.width ? col.width : 0" :min-width="col.width === 0 ? 150 : col.width" :fixed="checkFixed(col.columnname)">
|
|
<el-table-column show-overflow-tooltip v-for="(col) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :width="col.width ? col.width : 0" :min-width="col.width === 0 ? 150 : col.width" :fixed="checkFixed(col.columnname)">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<slot v-if="col.columnname !== 'operation'" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>
|
|
<slot v-if="col.columnname !== 'operation'" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>
|
|
|
|
|
|
|
|
<slot v-if="col.columnname === 'operation'" name="opreation" :data="scope.row"></slot>
|
|
<slot v-if="col.columnname === 'operation'" name="opreation" :data="scope.row"></slot>
|
|
@@ -21,12 +21,12 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<!-- <el-table-column v-for="(col) in layout" :key="col.tablecolid">
|
|
<!-- <el-table-column v-for="(col) in layout" :key="col.tablecolid">
|
|
|
<template #header>
|
|
<template #header>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<el-input v-if="col.filter === 1" size="mini" v-model="col.value" @change="inputChange" @keyup.native.enter="headerSearch(col.columnname)" @clear="headerSearch(col.columnname)" clearable/>
|
|
<el-input v-if="col.filter === 1" size="mini" v-model="col.value" @change="inputChange" @keyup.native.enter="headerSearch(col.columnname)" @clear="headerSearch(col.columnname)" clearable/>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<slot v-if="col.filter === 2" name="temp" :data="col.columnname"></slot>
|
|
<slot v-if="col.filter === 2" name="temp" :data="col.columnname"></slot>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
</template>
|
|
</template>
|
|
|
<el-table-column :prop="col.columnname" :label="col.title" :width="col.width ? col.width : 0" :min-width="col.width === 0 ? 150 : col.width" :fixed="checkFixed(col.columnname)">
|
|
<el-table-column :prop="col.columnname" :label="col.title" :width="col.width ? col.width : 0" :min-width="col.width === 0 ? 150 : col.width" :fixed="checkFixed(col.columnname)">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
@@ -34,8 +34,8 @@
|
|
|
<slot v-if="col.columnname === 'operation'" name="opreation" :data="scope.row"></slot>
|
|
<slot v-if="col.columnname === 'operation'" name="opreation" :data="scope.row"></slot>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
</el-table-column> -->
|
|
</el-table-column> -->
|
|
|
</el-table>
|
|
</el-table>
|
|
|
</div>
|
|
</div>
|
|
@@ -50,7 +50,7 @@ export default {
|
|
|
custom:是否启用自定义结构;
|
|
custom:是否启用自定义结构;
|
|
|
opwidth:操作列宽度
|
|
opwidth:操作列宽度
|
|
|
*/
|
|
*/
|
|
|
- props:['data','tableName','custom','layout','fixRightData','fixLeftData'],
|
|
|
|
|
|
|
+ props:['data','tableName','custom','layout','fixRightData','fixLeftData','height'],
|
|
|
data () {
|
|
data () {
|
|
|
return {
|
|
return {
|
|
|
list:[],
|
|
list:[],
|
|
@@ -79,7 +79,7 @@ export default {
|
|
|
row.index = rowIndex
|
|
row.index = rowIndex
|
|
|
},
|
|
},
|
|
|
handleSelectionChange(val) {
|
|
handleSelectionChange(val) {
|
|
|
- this.$emit('checkboxCallBack',val)
|
|
|
|
|
|
|
+ this.$emit('checkboxCallBack',val)
|
|
|
},
|
|
},
|
|
|
checkFixed (columnname) {
|
|
checkFixed (columnname) {
|
|
|
let isRight = this.fixRightData.some(item=>item === columnname)
|
|
let isRight = this.fixRightData.some(item=>item === columnname)
|
|
@@ -127,4 +127,4 @@ export default {
|
|
|
/deep/.el-table .el-table__cell {
|
|
/deep/.el-table .el-table__cell {
|
|
|
padding: 0 !important;
|
|
padding: 0 !important;
|
|
|
}
|
|
}
|
|
|
-</style>
|
|
|
|
|
|
|
+</style>
|