Commit f3f2ce0a authored by zhangjianqian's avatar zhangjianqian

隐患是否逾期

parent 12de4132
......@@ -57,6 +57,13 @@ public class TStaningBookServiceImpl implements ITStaningBookService
tStaningBook.setUserId(0l);
}
List<TStaningBook> list = tStaningBookMapper.selectTStaningBookList(tStaningBook);
for (TStaningBook t : list){
if(t.getRectificationTerm()!=null&&t.getRectificationTerm().getTime()<new Date().getTime()&&t.getState()==0){
t.setFinishDay(1l);
}else {
t.setFinishDay(0l);
}
}
return list;
}
public List<Long> selectDeptIds(List<Long> list,List<Long> deptIds){
......
......@@ -86,6 +86,12 @@
</el-table-column>
<el-table-column label="责任部门" align="center" prop="deptName" />
<el-table-column label="整改人" align="center" prop="rectificationName" />
<el-table-column label="是否过期 " align="center" prop="state" >
<template slot-scope="scope">
<span v-if="scope.row.finishDay==0"></span>
<span style="color: red" v-if="scope.row.finishDay==1"></span>
</template>
</el-table-column>
<el-table-column label="整改时间" align="center" prop="rectificationTime" width="180">
</el-table-column>
<el-table-column label="隐患状态 " align="center" prop="state" >
......@@ -392,8 +398,11 @@
</div>
</el-dialog>
<!--详情-->
<el-dialog :title="title" :visible.sync="open2" width="900px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-dialog :title="title" :visible.sync="open2" style="position: absolute" width="900px" append-to-body>
<div v-if="form.finishDay==1" class="guoqi">
<span>(已过期)</span>
</div>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-divider content-position="left"><i class="el-icon-info"></i><span class="boxx">隐患信息</span></el-divider>
<el-form-item label="隐患名称">
<el-input v-model="form.troubleName" placeholder="请输入隐患名称" disabled/>
......@@ -1176,6 +1185,7 @@ export default {
const bookId = row.bookId || this.ids
getBook(bookId).then(response => {
this.form = response.data;
this.form.finishDay = row.finishDay;
if(this.form.troubleLevel==1){
this.zhong = 1
}
......@@ -1358,6 +1368,13 @@ export default {
font-weight: bold;
padding-left: 5px;
}
.guoqi{
position: relative;
top: -35px;
left: 120px;
font-size: 17px;
color: red;
}
::v-deep .el-dialog__body{
padding:0px 20px!important;
}
......
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