You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
224 lines
6.8 KiB
224 lines
6.8 KiB
1 year ago
|
<!-- 巡查记录抽屉 -->
|
||
|
<script>
|
||
|
export default {
|
||
|
name: '',
|
||
|
data() {
|
||
|
return {
|
||
|
drawerVisible: false,
|
||
|
tableData: [
|
||
|
{ content: '张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三张三', photos: '编辑', delete: '删除' },
|
||
|
{ content: '张三', photos: '编辑', delete: '删除' },
|
||
|
{ content: '张三', photos: '编辑', delete: '删除' },
|
||
|
{ content: '张三', photos: '编辑', delete: '删除' },
|
||
|
{ content: '张三', photos: '编辑', delete: '删除' },
|
||
|
{ content: '张三', photos: '编辑', delete: '删除' },
|
||
|
{ content: '张三', photos: '编辑', delete: '删除' },
|
||
|
{ content: '张三', photos: '编辑', delete: '删除' },
|
||
|
{ content: '张三', photos: '编辑', delete: '删除' },
|
||
|
{ content: '张三', photos: '编辑', delete: '删除' },
|
||
|
{ content: '张三', photos: '编辑', delete: '删除' },
|
||
|
{ content: '张三', photos: '编辑', delete: '删除' },
|
||
|
{ content: '张三', photos: '编辑', delete: '删除' },
|
||
|
{ content: '张三', photos: '编辑', delete: '删除' },
|
||
|
{ content: '张三', photos: '编辑', delete: '删除' },
|
||
|
{ content: '张三', photos: '编辑', delete: '删除' },
|
||
|
{ content: '张三', photos: '编辑', delete: '删除' },
|
||
|
{ content: '张三', photos: '编辑', delete: '删除' },
|
||
|
{ content: '张三', photos: '编辑', delete: '删除' },
|
||
|
{ content: '张三', photos: '编辑', delete: '删除' },
|
||
|
]
|
||
|
}
|
||
|
},
|
||
|
methods: {
|
||
|
handleSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||
|
if (columnIndex === 0) {
|
||
|
if (rowIndex < 4 || (rowIndex > 4 && rowIndex < 9) || (rowIndex > 8 && rowIndex < 11) || (rowIndex > 10 && rowIndex < 13) || (rowIndex > 12 && rowIndex < 18)) {
|
||
|
if (rowIndex === 0 || rowIndex === 5 || rowIndex === 9 || rowIndex === 11 || rowIndex === 13) {
|
||
|
return {
|
||
|
rowspan: [4, 4, 2, 2, 5][[0, 5, 9, 11, 13].indexOf(rowIndex)],
|
||
|
colspan: 1
|
||
|
};
|
||
|
} else {
|
||
|
return {
|
||
|
rowspan: 0,
|
||
|
colspan: 0
|
||
|
};
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<template>
|
||
|
<div>
|
||
|
<div class="masking" :class="drawerVisible ? 'masking-in' : ''">
|
||
|
<div class="close-btn" @click="drawerVisible = false">
|
||
|
<i class="el-icon-arrow-right"></i>
|
||
|
</div>
|
||
|
<div class="drawer-title">
|
||
|
<span>巡查记录</span>
|
||
|
</div>
|
||
|
<div class="center-table">
|
||
|
<el-table :data="tableData" height="636" border style="width: 100%" :span-method="handleSpanMethod">
|
||
|
<el-table-column align="center" class="first-column" label="工程部位" width="210">
|
||
|
<template slot-scope="scope">
|
||
|
<div v-if="scope.$index == 0">
|
||
|
<div class="box1">
|
||
|
<div class="item1">一、堤身</div>
|
||
|
<div class="item2">堤顶</div>
|
||
|
<div class="item3">堤坡</div>
|
||
|
<div class="item4">迎水坡</div>
|
||
|
<div class="item5">背水坡</div>
|
||
|
<div class="item6">护坡结构</div>
|
||
|
<div class="item7">堤脚</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div v-if="scope.$index == 4" style="height: 88px;">二、护坡地和堤防工程保护范围</div>
|
||
|
<div v-if="scope.$index == 5">三、堤岸防护工程</div>
|
||
|
<div v-if="scope.$index == 9">四、防渗排水设施</div>
|
||
|
<div v-if="scope.$index == 11">五、交叉建筑物及接连段</div>
|
||
|
<div v-if="scope.$index == 13">六、管理设施</div>
|
||
|
<div v-if="scope.$index == 18">七、生物防护工程</div>
|
||
|
<div v-if="scope.$index == 19">八、其他</div>
|
||
|
</template>
|
||
|
</el-table-column>
|
||
|
<el-table-column prop="content" align="center" class-name="aaaaa" label="检查内容" width="200" />
|
||
|
<el-table-column prop="photos" align="center" label="打卡图片" width="150" />
|
||
|
<el-table-column align="center" label="检查记录">
|
||
|
<el-table-column prop="isNormal" align="center" label="是否正常" width="150" />
|
||
|
<el-table-column prop="problems" align="center" label="存在问题" width="150" />
|
||
|
</el-table-column>
|
||
|
</el-table>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<style scoped lang="less">
|
||
|
.masking {
|
||
|
position: absolute;
|
||
|
top: 0;
|
||
|
width: 50%;
|
||
|
height: 100%;
|
||
|
left: 120%;
|
||
|
z-index: 2;
|
||
|
background-color: #fff;
|
||
|
transition: left 0.5s ease-in-out;
|
||
|
box-shadow: -8px 0px 38px 0px rgba(0, 0, 0, 0.6);
|
||
|
|
||
|
.close-btn {
|
||
|
width: 32px;
|
||
|
height: 32px;
|
||
|
position: absolute;
|
||
|
top: 48px;
|
||
|
left: -16px;
|
||
|
background-color: #fff;
|
||
|
border: 1px solid #DCDCDC;
|
||
|
border-radius: 50%;
|
||
|
display: flex;
|
||
|
justify-content: center;
|
||
|
align-items: center;
|
||
|
cursor: pointer;
|
||
|
|
||
|
i {
|
||
|
color: #36b29e;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
.drawer-title {
|
||
|
width: 100%;
|
||
|
height: 64px;
|
||
|
line-height: 64px;
|
||
|
padding-left: 16px;
|
||
|
border-bottom: 1px solid #e7e7e7;
|
||
|
}
|
||
|
|
||
|
.center-table {
|
||
|
padding: 16px;
|
||
|
|
||
|
.box1 {
|
||
|
height: 352x;
|
||
|
display: grid;
|
||
|
grid-template-columns: repeat(3, 70px);
|
||
|
grid-template-rows: repeat(8, 44px);
|
||
|
}
|
||
|
|
||
|
|
||
|
.item1 {
|
||
|
grid-row: 1 / 9;
|
||
|
grid-column: 1;
|
||
|
line-height: 352px;
|
||
|
justify-content: center;
|
||
|
align-content: center;
|
||
|
border-right: 1px solid #f4f9f7;
|
||
|
}
|
||
|
|
||
|
.item2 {
|
||
|
grid-row: 1/3;
|
||
|
grid-column: 2/ 4;
|
||
|
line-height: 88px;
|
||
|
justify-content: center;
|
||
|
align-content: center;
|
||
|
border-bottom: 1px solid #f4f9f7;
|
||
|
}
|
||
|
|
||
|
.item3 {
|
||
|
grid-row: 3/7;
|
||
|
grid-column: 2;
|
||
|
line-height: 176px;
|
||
|
justify-content: center;
|
||
|
align-content: center;
|
||
|
border-right: 1px solid #f4f9f7;
|
||
|
}
|
||
|
|
||
|
.item4 {
|
||
|
line-height: 44px;
|
||
|
justify-content: center;
|
||
|
align-content: center;
|
||
|
border-bottom: 1px solid #f4f9f7;
|
||
|
}
|
||
|
|
||
|
.item5 {
|
||
|
line-height: 44px;
|
||
|
justify-content: center;
|
||
|
align-content: center;
|
||
|
border-bottom: 1px solid #f4f9f7;
|
||
|
}
|
||
|
|
||
|
.item6 {
|
||
|
grid-row: 7/5;
|
||
|
grid-column: 3;
|
||
|
line-height: 88px;
|
||
|
justify-content: center;
|
||
|
align-content: center;
|
||
|
}
|
||
|
|
||
|
|
||
|
.item7 {
|
||
|
grid-row: 9/7;
|
||
|
grid-column: 2/4;
|
||
|
line-height: 88px;
|
||
|
justify-content: center;
|
||
|
align-content: center;
|
||
|
border-top: 1px solid #f4f9f7;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
.masking-in {
|
||
|
left: 50%;
|
||
|
}
|
||
|
|
||
|
/deep/.el-table__body td {
|
||
|
padding: 0;
|
||
|
height: 88px !important;
|
||
|
/* 设置单元格的固定高度 */
|
||
|
overflow: hidden;
|
||
|
}
|
||
|
|
||
|
/deep/.el-table__body td .cell {
|
||
|
padding: 0 !important;
|
||
|
}
|
||
|
</style>
|