mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-24 18:22:53 +08:00
合并单元格
This commit is contained in:
@@ -96,7 +96,7 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<el-dialog :visible.sync="dialogTableVisible">
|
||||
<el-dialog :visible.sync="dialogTableVisible">
|
||||
<span slot="title" class="dialog-header">
|
||||
<div>全岗位路径</div>
|
||||
<div class="otherImg">
|
||||
@@ -112,9 +112,9 @@
|
||||
<span>其他路径(无权限)</span>
|
||||
</div>
|
||||
</span>
|
||||
<el-table :data="gridData" border>
|
||||
<el-table :data="gridData" border :span-method="objectSpanMethod">
|
||||
<el-table-column align="center" property="name" label=""></el-table-column>
|
||||
<el-table-column align="center" label="市场企划岗" >
|
||||
<el-table-column align="center" label="市场企划岗">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.marketStatus === 0"><img src="../../assets/images/growth/CurrentPath.png" alt=""></span>
|
||||
<span v-else-if="scope.row.marketStatus === 1">
|
||||
@@ -123,7 +123,7 @@
|
||||
<span v-else><img src="../../assets/images/growth/NoPermissionPath.png" alt=""></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="销售岗" >
|
||||
<el-table-column align="center" label="销售岗">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.saleStatus === 0"><img src="../../assets/images/growth/CurrentPath.png" alt=""></span>
|
||||
<span v-else-if="scope.row.saleStatus === 1">
|
||||
@@ -281,6 +281,24 @@ export default {
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
if (columnIndex !== 0) {
|
||||
if (rowIndex <= 1) { return false }
|
||||
if (rowIndex % 2 === 0) {
|
||||
console.log(rowIndex, '上');
|
||||
return {
|
||||
rowspan: 2,
|
||||
colspan: 1
|
||||
};
|
||||
} else {
|
||||
console.log(rowIndex, '下');
|
||||
return {
|
||||
rowspan: 0,
|
||||
colspan: 0
|
||||
};
|
||||
}
|
||||
}
|
||||
},
|
||||
switchInfo(num) {
|
||||
if (num === 5) {
|
||||
this.dataList = [{
|
||||
|
||||
Reference in New Issue
Block a user