<template>
|
<el-dialog
|
:visible.sync="dialogVisible"
|
append-to-body
|
:close-on-click-modal="false"
|
width="60%"
|
center
|
>
|
<div class="table_cont">
|
|
<el-table
|
v-loading="listLoading"
|
:key="tableKey"
|
:data="checkList"
|
border
|
fit
|
highlight-current-row
|
style="width: 100%;"
|
>
|
|
<el-table-column type="index" label="序号" align="center" width="80"/>
|
|
<el-table-column label="检查出的隐患问题" prop="info" align="center" width="180">
|
<template slot-scope="scope">
|
<span>{{ scope.row.info }}</span>
|
</template>
|
</el-table-column>
|
|
<el-table-column label="检查时间" prop="checkTime" align="center">
|
<template slot-scope="scope">
|
<span>{{scope.row.checkTime}}</span>
|
</template>
|
</el-table-column>
|
|
<el-table-column label="最后整改期限" prop="deadline" align="center">
|
<template slot-scope="scope">
|
<span>{{ scope.row.deadline }}</span>
|
</template>
|
</el-table-column>
|
|
<el-table-column label="整改资金(元)" prop="money" align="center">
|
<template slot-scope="scope">
|
<span>{{ scope.row.money }}</span>
|
</template>
|
</el-table-column>
|
|
<el-table-column label="整改措施" prop="action" width="130" align="center" sortable>
|
<template slot-scope="scope">
|
<span>{{ scope.row.action }}</span>
|
</template>
|
</el-table-column>
|
|
<el-table-column label="负责人" prop="principal" align="center">
|
<template slot-scope="scope">
|
<span>{{ scope.row.principal }}</span>
|
</template>
|
</el-table-column>
|
|
<el-table-column label="整改状态" prop="fixStatus" align="center">
|
<template slot-scope="scope">
|
<span>{{ scope.row.fixStatus ==0?'未整改':'已整改' }}</span>
|
</template>
|
</el-table-column>
|
|
<el-table-column label="完成整改时间" prop="finishTime" align="center">
|
<template slot-scope="scope">
|
<span>{{ scope.row.finishTime }}</span>
|
</template>
|
</el-table-column>
|
|
<el-table-column label="隐患等级" prop="level" align="center">
|
<template slot-scope="scope">
|
<span>{{ scope.row.level==0 ? '一般隐患' : '重大隐患' }}</span>
|
</template>
|
</el-table-column>
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<template slot-scope="scope">
|
<el-button v-if="scope.row.fixStatus==0" type="text" @click="toFix(scope.row)">整改填报</el-button>
|
<el-button v-else type="text">--</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
|
<el-pagination
|
v-show="recordTotal>0"
|
:current-page="currentPage"
|
:page-sizes="[10, 20, 30, 50]"
|
:page-size="pageSize"
|
:total="recordTotal"
|
layout="total, sizes, prev, pager, next, jumper"
|
background
|
style="float:right;margin:3px"
|
@size-change="handleSizeChange"
|
@current-change="handleCurrentChange"
|
/>
|
</div>
|
<span slot="footer" class="dialog-footer">
|
<el-button @click="dialogVisible = false">取消</el-button>
|
<el-button type="primary" @click="confirm()">提交</el-button>
|
</span>
|
<el-dialog
|
:visible.sync="dialogFix"
|
title="整改填报"
|
append-to-body
|
:close-on-click-modal="false"
|
width="40%"
|
center
|
>
|
<el-form ref="fixformRef" :model="fixForm" label-width="140px">
|
<el-form-item label="当前隐患:">
|
<el-input type="textarea" v-model="fixForm.info"></el-input>
|
</el-form-item>
|
|
<el-form-item label="当前完成整改日期:">
|
<el-date-picker
|
v-model="fixForm.finishDate"
|
type="date"
|
placeholder="请选择整改日期">
|
</el-date-picker>
|
</el-form-item>
|
<el-form-item label="整改资金:">
|
<el-input v-model="fixForm.money"></el-input>
|
</el-form-item>
|
<el-form-item label="整改措施:">
|
<el-input type="textarea" autosize v-model="fixForm.actions"></el-input>
|
</el-form-item>
|
<el-form-item label="负责人:">
|
<el-input v-model="fixForm.name"></el-input>
|
</el-form-item>
|
</el-form>
|
<span slot="footer" class="dialog-footer">
|
<el-button @click="dialogFix = false">取消</el-button>
|
<el-button type="primary" @click="confirmFix()">提交</el-button>
|
</span>
|
</el-dialog>
|
</el-dialog>
|
|
</template>
|
|
<script>
|
import {computePageCount} from "@/utils";
|
|
export default {
|
name: "repair",
|
data(){
|
return{
|
listLoading: false,
|
dialogFix: false,
|
recordTotal: 0,
|
pageSize: 10,
|
pageTotal: 0,
|
currentPage: 1,
|
tableKey: 0,
|
dialogVisible:false,
|
checkList:[
|
{
|
info: '虫吃鼠咬',
|
checkTime: '2022-10-31',
|
deadline: '2022-11-01',
|
money: '30',
|
action: '补充灭虫药',
|
principal: '叼毛',
|
fixStatus: 1,
|
finishTime: '2022-11-01',
|
level: 1
|
},
|
{
|
info: '虫吃鼠咬',
|
checkTime: '2022-10-31',
|
deadline: '2022-11-01',
|
money: '3000',
|
action: '补充灭虫药',
|
principal: '叼毛',
|
fixStatus: 0,
|
finishTime: '2022-11-01',
|
level: 0
|
}
|
],
|
fixForm:{
|
info: '',
|
finishDate: '',
|
money: '',
|
actions: '',
|
name: ''
|
}
|
}
|
},
|
watch: {
|
},
|
methods:{
|
handleSizeChange: function (val) {
|
this.pageSize = val
|
this.currentPage = 1
|
// this.getDataList()
|
},
|
handleCurrentChange: function (val) {
|
this.currentPage = val
|
// this.getDataList()
|
},
|
|
|
confirm(){
|
this.dialogVisible = false
|
},
|
|
confirmFix(){
|
this.dialogFix = false
|
},
|
|
toFix(){
|
this.dialogFix = true
|
}
|
},
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.input-with-select .el-select {
|
width: 120px;
|
}
|
|
.el-date-editor.el-input{
|
width: 100%;
|
}
|
|
.el-divider__text{
|
background-color: #fafafa;
|
color: #034EA2;
|
}
|
|
.table_cont{
|
width: 100%;
|
}
|
</style>
|