Commit 93409e5b authored by 耿迪迪's avatar 耿迪迪

考试统计接口 gengdidi

parents 3a67c4ec fed02cbc
......@@ -73,13 +73,13 @@ spring:
# redis 配置
redis:
# 地址
host: 127.0.0.1
host: 36.148.23.59
# 端口,默认为6379
port: 6378
port: 6379
# 数据库索引
database: 1
# 密码
password: Redis@2021
password: 1qaz2wsx3edc
# 连接超时时间
timeout: 10s
lettuce:
......
......@@ -20,6 +20,9 @@ public class THiddenTroubleAssessment extends BaseEntity
/** $column.columnComment */
private Long assessmentId;
private Long libraryId;
private Integer isXun;
/** 排查任务id */
@Excel(name = "排查任务id")
private Long workId;
......@@ -94,6 +97,59 @@ public class THiddenTroubleAssessment extends BaseEntity
private Integer updateType = 0;
private String riskPoint;
private String inspectTerm;
private String inspectBasis;
private String libraryContent;
public Long getLibraryId() {
return libraryId;
}
public void setLibraryId(Long libraryId) {
this.libraryId = libraryId;
}
public Integer getIsXun() {
return isXun;
}
public void setIsXun(Integer isXun) {
this.isXun = isXun;
}
public String getRiskPoint() {
return riskPoint;
}
public void setRiskPoint(String riskPoint) {
this.riskPoint = riskPoint;
}
public String getInspectTerm() {
return inspectTerm;
}
public void setInspectTerm(String inspectTerm) {
this.inspectTerm = inspectTerm;
}
public String getInspectBasis() {
return inspectBasis;
}
public void setInspectBasis(String inspectBasis) {
this.inspectBasis = inspectBasis;
}
public String getLibraryContent() {
return libraryContent;
}
public void setLibraryContent(String libraryContent) {
this.libraryContent = libraryContent;
}
public Integer getUpdateType() {
return updateType;
}
......
......@@ -87,6 +87,24 @@ public class TTrainCourse extends BaseEntity
@Excel(name = "考试人员")
private String testPersons;
private Integer personnelType;
public String getPlanName() {
return planName;
}
public void setPlanName(String planName) {
this.planName = planName;
}
public Integer getPersonnelType() {
return personnelType;
}
public void setPersonnelType(Integer personnelType) {
this.personnelType = personnelType;
}
public void setCourseId(Long courseId)
{
this.courseId = courseId;
......
......@@ -26,6 +26,8 @@ public class TTrainPlan extends BaseEntity
@Excel(name = "计划名称")
private String planName;
private Integer personnelType;
/** 排序 */
@Excel(name = "排序")
private Integer sort;
......@@ -37,6 +39,14 @@ public class TTrainPlan extends BaseEntity
private List<PlanPostVo> postList;
public Integer getPersonnelType() {
return personnelType;
}
public void setPersonnelType(Integer personnelType) {
this.personnelType = personnelType;
}
public List<PlanPostVo> getPostList() {
return postList;
}
......
......@@ -45,13 +45,24 @@ public class TTrainUserCourse extends BaseEntity
@Excel(name = "创建人")
private String createUser;
/**人员名称**/
private String staffName;
/**人员部门**/
private String deptName;
public void setUserCourseId(Long userCourseId)
private Integer personnelType;
public Integer getPersonnelType() {
return personnelType;
}
public void setPersonnelType(Integer personnelType) {
this.personnelType = personnelType;
}
public void setUserCourseId(Long userCourseId)
{
this.userCourseId = userCourseId;
}
......
......@@ -69,7 +69,7 @@ public interface TTrainCourseMapper
* @param userIds
* @return
*/
public int insertUserCourse(@Param("courseId") Long courseId,@Param("userIds") List<String> userIds);
public int insertUserCourse(@Param("courseId") Long courseId,@Param("userIds") List<String> userIds,@Param("personnelType")Integer personnelType);
/**
* 用户课程表
......
......@@ -84,10 +84,10 @@ public class THiddenTroubleWorkServiceImpl implements ITHiddenTroubleWorkService
{
tHiddenTroubleWork.setCreateTime(DateUtils.getNowDate());
int a = tHiddenTroubleWorkMapper.insertTHiddenTroubleWork(tHiddenTroubleWork);
// if(tHiddenTroubleWork.getWorkCycle()==1||tHiddenTroubleWork.getParentId()!=0L){
// String[] ids = tHiddenTroubleWork.getContent().split(",");
// tHiddenTroubleAssessmentMapper.inserts(tHiddenTroubleWork.getWorkId(),ids);
// }
if(tHiddenTroubleWork.getWorkCycle()==1){
String[] ids = tHiddenTroubleWork.getContent().split(",");
tHiddenTroubleAssessmentMapper.inserts(tHiddenTroubleWork.getWorkId(),ids);
}
return a;
}
......@@ -205,26 +205,28 @@ public class THiddenTroubleWorkServiceImpl implements ITHiddenTroubleWorkService
work.setWorkStep(0);
work.setCreateTime(d);
if(work.getBookId()!=null){
TStaningBook b = tStaningBookMapper.selectTStaningBookById(work.getBookId());
//如果隐患存在,并绑定的任务已完成则生成新新任务,否则不生成
if(b!=null&&b.getWorkId()!=null){
THiddenTroubleWork w = tHiddenTroubleWorkMapper.selectTHiddenTroubleWorkById(b.getWorkId());
if(w.getWorkStep()==4){
int a = tHiddenTroubleWorkMapper.insertTHiddenTroubleWork(work);
b.setWorkId(work.getWorkId());
tStaningBookMapper.updateTStaningBook(b);
}else{
logger.info("===================任务进行中生成新排查任务失败");
}
}else {
int a = tHiddenTroubleWorkMapper.insertTHiddenTroubleWork(work);
if(b!=null){
b.setWorkId(work.getWorkId());
tStaningBookMapper.updateTStaningBook(b);
}
}
// TStaningBook b = tStaningBookMapper.selectTStaningBookById(work.getBookId());
// //如果隐患存在,并绑定的任务已完成则生成新新任务,否则不生成
// if(b!=null&&b.getWorkId()!=null){
// THiddenTroubleWork w = tHiddenTroubleWorkMapper.selectTHiddenTroubleWorkById(b.getWorkId());
// if(w.getWorkStep()==4){
// int a = tHiddenTroubleWorkMapper.insertTHiddenTroubleWork(work);
// b.setWorkId(work.getWorkId());
// tStaningBookMapper.updateTStaningBook(b);
// }else{
// logger.info("===================任务进行中生成新排查任务失败");
// }
// }else {
// int a = tHiddenTroubleWorkMapper.insertTHiddenTroubleWork(work);
// if(b!=null){
// b.setWorkId(work.getWorkId());
// tStaningBookMapper.updateTStaningBook(b);
// }
// }
}else {
tHiddenTroubleWorkMapper.insertTHiddenTroubleWork(work);
String[] ids = work.getContent().split(",");
tHiddenTroubleAssessmentMapper.inserts(work.getWorkId(),ids);
}
}
}
......@@ -6,6 +6,7 @@ import com.zehong.common.utils.DateUtils;
import com.zehong.system.domain.StatisticsTrainCourse;
import com.zehong.system.domain.TTrainCourse;
import com.zehong.system.domain.TTrainCourseTopic;
import com.zehong.system.domain.TTrainPlan;
import com.zehong.system.domain.TTrainUserCourse;
import com.zehong.system.domain.vo.UserCourseVo;
import com.zehong.system.mapper.TTrainCourseMapper;
......@@ -62,7 +63,7 @@ public class TTrainCourseServiceImpl implements ITTrainCourseService
return 0;
}
List<String> userIds = tTrainPlanMapper.selectAlluserByplanId(course.getCourseType());
tTrainCourseMapper.insertUserCourse(courseId,userIds);
tTrainCourseMapper.insertUserCourse(courseId,userIds,course.getPersonnelType());
course.setStatus(1);
course.setReleaseTime(new Date());
return tTrainCourseMapper.updateTTrainCourse(course);
......@@ -88,6 +89,12 @@ public class TTrainCourseServiceImpl implements ITTrainCourseService
@Override
public Long insertTTrainCourse(TTrainCourse tTrainCourse)
{
if(tTrainCourse.getCourseType()!=null){
TTrainPlan p = tTrainPlanMapper.selectTTrainPlanById(tTrainCourse.getCourseType());
if(p!=null){
tTrainCourse.setPersonnelType(p.getPersonnelType());
}
}
tTrainCourse.setCreateTime(DateUtils.getNowDate());
tTrainCourseMapper.insertTTrainCourse(tTrainCourse);
return tTrainCourse.getCourseId();
......
......@@ -6,6 +6,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="THiddenTroubleAssessment" id="THiddenTroubleAssessmentResult">
<result property="assessmentId" column="assessment_id" />
<result property="libraryId" column="library_id" />
<result property="isXun" column="is_xun" />
<result property="workId" column="work_id" />
<result property="checkFeedback" column="check_feedback" />
<result property="checkUrl" column="check_url" />
......@@ -23,6 +25,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="modifyBegin" column="modify_begin" />
<result property="modifyEnd" column="modify_end" />
<result property="modifyComplete" column="modify_complete" />
<result property="riskPoint" column="risk_point" />
<result property="inspectTerm" column="inspect_term" />
<result property="inspectBasis" column="inspect_basis" />
<result property="libraryContent" column="library_content" />
</resultMap>
<sql id="selectTHiddenTroubleAssessmentVo">
......@@ -30,9 +36,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectTHiddenTroubleAssessmentList" parameterType="THiddenTroubleAssessment" resultMap="THiddenTroubleAssessmentResult">
<include refid="selectTHiddenTroubleAssessmentVo"/>
SELECT a.`assessment_id`,a.library_id,a.is_xun,a.check_url,a.check_time,a.check_user,a.check_feedback,
l.risk_point,l.inspect_term,l.inspect_basis,l.library_content
FROM t_hidden_trouble_assessment a LEFT JOIN t_hidden_library l ON l.`library_id` = a.library_id
<where>
<if test="assessmentLevel != null "> and assessment_level = #{assessmentLevel}</if>
<if test="workId != null "> and work_id = #{workId}</if>
</where>
</select>
......@@ -124,7 +133,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="inserts" >
insert into t_hidden_trouble_assessment (library_id,work_id) VALUES
<foreach collection="ids" item="item" index="index" separator=",">
(${item},workId)
(${item},#{workId})
</foreach>
</insert>
</mapper>
\ No newline at end of file
......@@ -79,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="timeTerm != null">time_term,</if>
<if test="workRange != null">work_range,</if>
<if test="deptId != null">dept_id,</if>
<if test="staffId != null">staff_id,</if>
<if test="workStep != null">work_step,</if>
<if test="content != null">content,</if>
<if test="createTime != null">create_time,</if>
......@@ -98,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="timeTerm != null">#{timeTerm},</if>
<if test="workRange != null">#{workRange},</if>
<if test="deptId != null">#{deptId},</if>
<if test="staffId != null">#{staffId},</if>
<if test="workStep != null">#{workStep},</if>
<if test="content != null">#{content},</if>
<if test="createTime != null">#{createTime},</if>
......
......@@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="planName" column="plan_name" />
<result property="courseConent" column="course_conent" />
<result property="status" column="status" />
<result property="personnelType" column="personnel_type" />
<result property="releaseTime" column="release_time" />
<result property="enclosure" column="enclosure" />
<result property="video" column="video" />
......@@ -36,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectTTrainCourseVo">
select course_id, course_name, course_type, course_conent, status, release_time, enclosure, video, qualified_num, topic_num, create_time, create_user, is_del, data_kind, test_start_time, test_end_time, test_persons from t_train_course
select course_id, course_name, course_type, course_conent, status,personnel_type, release_time, enclosure, video, qualified_num, topic_num, create_time, create_user, is_del, data_kind, test_start_time, test_end_time, test_persons from t_train_course
</sql>
<select id="selectTTrainCourseList" parameterType="TTrainCourse" resultMap="TTrainCourseResult">
......@@ -73,6 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="courseType != null">course_type,</if>
<if test="courseConent != null">course_conent,</if>
<if test="status != null">status,</if>
<if test="personnelType != null">personnel_type,</if>
<if test="releaseTime != null">release_time,</if>
<if test="enclosure != null">enclosure,</if>
<if test="video != null">video,</if>
......@@ -91,6 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="courseType != null">#{courseType},</if>
<if test="courseConent != null">#{courseConent},</if>
<if test="status != null">#{status},</if>
<if test="personnelType != null">#{personnelType},</if>
<if test="releaseTime != null">#{releaseTime},</if>
<if test="enclosure != null">#{enclosure},</if>
<if test="video != null">#{video},</if>
......@@ -113,6 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="courseType != null">course_type = #{courseType},</if>
<if test="courseConent != null">course_conent = #{courseConent},</if>
<if test="status != null">status = #{status},</if>
<if test="personnelType != null">personnel_type = #{personnelType},</if>
<if test="releaseTime != null">release_time = #{releaseTime},</if>
<if test="enclosure != null">enclosure = #{enclosure},</if>
<if test="video != null">video = #{video},</if>
......@@ -140,9 +144,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
<insert id="insertUserCourse">
INSERT INTO t_train_user_course(user_id,course_id,create_time) VALUES
INSERT INTO t_train_user_course(user_id,course_id,personnel_type,create_time) VALUES
<foreach collection="userIds" separator="," item="item">
(#{item},#{courseId},NOW())
(#{item},#{courseId},#{personnelType},NOW())
</foreach>
</insert>
<select id="userCourseList" resultType="com.zehong.system.domain.vo.UserCourseVo">
......@@ -153,7 +157,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
FROM t_train_user_course uc
LEFT JOIN t_train_course c ON c.`course_id` = uc.`course_id`
LEFT JOIN t_train_plan p ON p.`plan_id` = c.`course_type`
WHERE uc.user_id = #{userId}
WHERE uc.user_id = #{userId} and uc.personnel_type =1
<if test="type!=null and type == 1">
and uc.state !=2
</if>
......
......@@ -8,12 +8,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="planId" column="plan_id" />
<result property="planName" column="plan_name" />
<result property="sort" column="sort" />
<result property="personnelType" column="personnel_type" />
<result property="createTime" column="create_time" />
<result property="createUser" column="create_user" />
</resultMap>
<sql id="selectTTrainPlanVo">
select plan_id, plan_name, sort, create_time, create_user from t_train_plan
select plan_id, plan_name, sort, create_time,personnel_type, create_user from t_train_plan
</sql>
<select id="selectTTrainPlanList" parameterType="TTrainPlan" resultMap="TTrainPlanResult">
......@@ -36,6 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="planId != null">plan_id,</if>
<if test="planName != null">plan_name,</if>
<if test="sort != null">sort,</if>
<if test="personnelType != null">personnel_type,</if>
<if test="createTime != null">create_time,</if>
<if test="createUser != null">create_user,</if>
</trim>
......@@ -43,6 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="planId != null">#{planId},</if>
<if test="planName != null">#{planName},</if>
<if test="sort != null">#{sort},</if>
<if test="personnelType != null">#{personnelType},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createUser != null">#{createUser},</if>
</trim>
......@@ -62,6 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="SET" suffixOverrides=",">
<if test="planName != null">plan_name = #{planName},</if>
<if test="sort != null">sort = #{sort},</if>
<if test="personnelType != null">personnel_type = #{personnelType},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createUser != null">create_user = #{createUser},</if>
</trim>
......@@ -84,8 +88,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN t_train_plan_post pp ON ( p.`post_id` = pp.`post_id` AND pp.`plan_id` = #{planId} )
</select>
<select id="selectAlluserByplanId" resultType="java.lang.String">
SELECT user_id FROM sys_user_post
WHERE post_id IN (SELECT post_id FROM t_train_plan_post WHERE plan_id =#{planId})
GROUP BY user_id
SELECT post_id FROM t_train_plan_post WHERE plan_id =#{planId}
</select>
</mapper>
\ No newline at end of file
......@@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="userId" column="user_id" />
<result property="courseId" column="course_id" />
<result property="state" column="state" />
<result property="personnelType" column="personnel_type" />
<result property="examinationTime" column="examination_time" />
<result property="examinationResult" column="examination_result" />
<result property="createTime" column="create_time" />
......@@ -18,12 +19,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectTTrainUserCourseVo">
select user_course_id, user_id, course_id, state, examination_time, examination_result, create_time, create_user from t_train_user_course
select user_course_id, user_id, course_id, state, examination_time, personnel_type,examination_result, create_time, create_user from t_train_user_course
</sql>
<select id="selectTTrainUserCourseList" parameterType="TTrainUserCourse" resultMap="TTrainUserCourseResult">
<include refid="selectTTrainUserCourseVo"/>
<where>
<where>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="courseId != null "> and course_id = #{courseId}</if>
<if test="state != null "> and state = #{state}</if>
......@@ -44,6 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userId != null">user_id,</if>
<if test="courseId != null">course_id,</if>
<if test="state != null">state,</if>
<if test="personnelType != null">personnel_type,</if>
<if test="examinationTime != null">examination_time,</if>
<if test="examinationResult != null">examination_result,</if>
<if test="createTime != null">create_time,</if>
......@@ -53,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userId != null">#{userId},</if>
<if test="courseId != null">#{courseId},</if>
<if test="state != null">#{state},</if>
<if test="personnelType != null">#{personnelType},</if>
<if test="examinationTime != null">#{examinationTime},</if>
<if test="examinationResult != null">#{examinationResult},</if>
<if test="createTime != null">#{createTime},</if>
......@@ -66,6 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userId != null">user_id = #{userId},</if>
<if test="courseId != null">course_id = #{courseId},</if>
<if test="state != null">state = #{state},</if>
<if test="personnelType != null">personnel_type = #{personnelType},</if>
<if test="examinationTime != null">examination_time = #{examinationTime},</if>
<if test="examinationResult != null">examination_result = #{examinationResult},</if>
<if test="createTime != null">create_time = #{createTime},</if>
......
......@@ -8,5 +8,5 @@ VUE_APP_BASE_API = '/dev-api'
VUE_CLI_BABEL_TRANSPILE_MODULES = true
#安全平台后台地址
VUE_APP_TARGET = 'http://36.138.181.113:8091/dangerManage'
VUE_APP_TARGET = 'http://localhost:8908/dangerManage'
......@@ -70,16 +70,16 @@
<el-table v-loading="loading" :data="lessonsList">
<el-table-column label="课程标题" align="center" prop="courseName" />
<el-table-column label="课程类别" align="center" prop="courseType">
<template v-slot="scope">
<div>
{{
courseOptions.filter(
(item) => item.planId == scope.row.courseType
)[0].planName
}}
</div>
</template>
<el-table-column label="课程类别" align="center" prop="planName">
<!--<template v-slot="scope">-->
<!--<div>-->
<!--{{-->
<!--courseOptions.filter(-->
<!--(item) => item.planId == scope.row.courseType-->
<!--)[0].planName-->
<!--}}-->
<!--</div>-->
<!--</template>-->
</el-table-column>
<el-table-column label="课程状态" align="center" prop="status">
<template v-slot="scope">
......@@ -241,7 +241,7 @@ export default {
this.loading = true;
getLessons(this.queryParams)
.then((res) => {
// console.log(res);
console.log(res);
this.lessonsList = res.rows;
this.total = res.total;
})
......
......@@ -67,7 +67,7 @@
<el-table v-loading="loading" :data="workCheckList" row-key="workId"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" @selection-change="handleSelectionChange">
<el-table-column label="任务名称" align="center" prop="workName" />
<el-table-column label="隐患名称" align="center" prop="troubleName" />
<!--<el-table-column label="隐患名称" align="center" prop="troubleName" />-->
<el-table-column label="任务周期" align="center" prop="workCycle" :formatter="workCycleFormat" width="80px"/>
<el-table-column label="排查类型" align="center" prop="workType" :formatter="workTypeFormat" width="80px"/>
<el-table-column label="排查形式" align="center" prop="workForm" :formatter="workFormFormat" width="80px"/>
......@@ -79,19 +79,19 @@
</el-table-column>
<!--<el-table-column label="任务期限" align="center" prop="timeTerm" />-->
<!--<el-table-column label="任务范围" align="center" prop="workRange" />-->
<el-table-column label="责任部门" align="center" prop="deptName" />
<el-table-column label="任务进展 " align="center" prop="workStep" width="80px" >
<template slot-scope="scope">
<div v-if="scope.row.workCycle==1 || scope.row.parentId!=0">
<span style="color: red" v-if="scope.row.workStep==0">未进行</span>
<span v-if="scope.row.workStep==1">待评估</span>
<span v-if="scope.row.workStep==2">已评估</span>
<span v-if="scope.row.workStep==3">待整改</span>
<span v-if="scope.row.workStep==4">已结束</span>
</div>
<span v-if="scope.row.workCycle!=1 && scope.row.parentId==0">--</span>
</template>
</el-table-column>
<el-table-column label="责任人" align="center" prop="staffName" />
<!--<el-table-column label="任务进展 " align="center" prop="workStep" width="80px" >-->
<!--<template slot-scope="scope">-->
<!--<div v-if="scope.row.workCycle==1 || scope.row.parentId!=0">-->
<!--<span style="color: red" v-if="scope.row.workStep==0">未进行</span>-->
<!--<span v-if="scope.row.workStep==1">待评估</span>-->
<!--<span v-if="scope.row.workStep==2">已评估</span>-->
<!--<span v-if="scope.row.workStep==3">待整改</span>-->
<!--<span v-if="scope.row.workStep==4">已结束</span>-->
<!--</div>-->
<!--<span v-if="scope.row.workCycle!=1 && scope.row.parentId==0">&#45;&#45;</span>-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
......@@ -210,7 +210,7 @@
<!--&gt;</el-option>-->
<!--</el-select>-->
<!--</el-form-item>-->
<el-form-item label="责任人" prop="deptId">
<el-form-item label="责任人" prop="staffId">
<el-select v-model="form.staffId" filterable placeholder="请选择责任人">
<el-option
v-for="item in userList"
......@@ -357,104 +357,151 @@
</el-row>
</el-dialog>
<el-dialog title="排查任务详情" :visible.sync="open3" width="1000px" append-to-body>
<el-form label-width="100px">
<!--<el-form-item label="结束时间" prop="workEndTime">-->
<!--{{workInfo.workEndTime}}-->
<!--</el-form-item>-->
<div class="block">
<el-timeline>
<el-timeline-item :timestamp="assessment.checkTime+'(排查反馈)'" placement="top">
<el-card>
<el-form-item label="排查反馈:" >
<dl v-html="assessment.checkFeedback">
{{assessment.checkFeedback}}
</dl>
</el-form-item>
<el-form-item label="现场图片:" >
<img :src="assessment.checkUrl" style="height: 80px" @click="showPicture()"/>
<el-image :zIndex="9999" :ref="'a'+ 1" :src="assessment.checkUrl" v-show="false" :preview-src-list="[assessment.checkUrl]" v-if="assessment.checkUrl != '' && assessment.checkUrl != null"></el-image>
<el-dialog title="排查任务详情" :visible.sync="open3" width="1200px" append-to-body>
<el-table :data="assessmentList" >
<el-table-column label="风险点" align="center" prop="riskPoint" />
<el-table-column label="隐患名称" align="center" prop="inspectTerm" />
<!--<el-table-column label="检查依据" align="center" prop="inspectBasis" >-->
</el-form-item>
<el-form-item label="排查人员:" >
{{assessment.checkUser}}
</el-form-item>
</el-card>
</el-timeline-item>
<el-card v-if="pinggu">
<el-form ref="assessment" :model="assessment" :rules="rules2" label-width="80px">
<el-form-item label="评估内容" prop="assessmentContent">
<editor v-model="assessment.assessmentContent" :min-height="192"/>
</el-form-item>
<!--</el-table-column>-->
<!--<el-table-column label="内容及标准" align="center" prop="libraryContent" >-->
<el-form-item label="风险等级" prop="assessmentLevel">
<el-select v-model="assessment.assessmentLevel" placeholder="请选择评估风险等级">
<el-option
v-for="dict in assessmentLevelOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="parseInt(dict.dictValue)"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="评估人" prop="assessmentUser">
<el-input v-model="assessment.assessmentUser" placeholder="请输入评估人" />
</el-form-item>
</el-form>
<el-button type="primary" style="margin-left:42%" @click="submitping">确定</el-button>
</el-card>
<el-button v-if="!pinggu && assessment.assessmentTime==null" type="primary" style="margin-left:42%" @click="beginping">任务评估</el-button>
<!--</el-table-column>-->
<!--<el-table-column label="任务期限" align="center" prop="timeTerm" />-->
<!--<el-table-column label="任务范围" align="center" prop="workRange" />-->
<el-table-column label="巡检状态" align="center" prop="isXun" width="80" >
<template slot-scope="scope">
<span style="color: red" v-if="scope.row.isXun==0">未巡检</span>
<span v-if="scope.row.isXun==1">已巡检</span>
</template>
</el-table-column>
<el-table-column label="巡检反馈内容" align="center" prop="checkFeedback" />
<el-table-column label="巡检图片" align="center" prop="checkUrl" >
<template slot-scope="scope">
<img :src="scope.row.checkUrl" style="width: 20%;vertical-align:middle;cursor:pointer;" @click="showPicture(scope.row)"/>
<el-image :zIndex="9999" :ref="'a'+scope.row.id" :src="scope.row.checkUrl" v-show="false" :preview-src-list="[scope.row.checkUrl]" v-if="scope.row.checkUrl != '' && scope.row.checkUrl != null"></el-image>
</template>
</el-table-column>
<el-table-column label="巡检人" align="center" prop="checkUser" >
</el-table-column>
<el-table-column label="巡检时间" align="center" prop="checkTime" width="180">
</el-table-column>
<!--<el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!--<template slot-scope="scope">-->
<!--<el-button-->
<!--size="mini"-->
<!--type="text"-->
<!--icon="el-icon-document-copy"-->
<!--@click="handleDetail1(scope.row)"-->
<!--&gt;巡检详情</el-button>-->
<!--</template>-->
<!--</el-table-column>-->
</el-table>
<pagination
style="margin-top: 5px;height: 40px;background: #f7f7f7;"
v-show="total3>0"
:total="total3"
:page.sync="queryParams3.pageNum"
:limit.sync="queryParams3.pageSize"
@pagination="handleDetail(null)"
/>
<!--<el-form label-width="100px">-->
<!--&lt;!&ndash;<el-form-item label="结束时间" prop="workEndTime">&ndash;&gt;-->
<!--&lt;!&ndash;{{workInfo.workEndTime}}&ndash;&gt;-->
<!--&lt;!&ndash;</el-form-item>&ndash;&gt;-->
<!--<div class="block">-->
<!--<el-timeline>-->
<!--<el-timeline-item :timestamp="assessment.checkTime+'(排查反馈)'" placement="top">-->
<!--<el-card>-->
<!--<el-form-item label="排查反馈:" >-->
<!--<dl v-html="assessment.checkFeedback">-->
<!--{{assessment.checkFeedback}}-->
<!--</dl>-->
<!--</el-form-item>-->
<!--<el-form-item label="现场图片:" >-->
<!--<img :src="assessment.checkUrl" style="height: 80px" @click="showPicture()"/>-->
<!--<el-image :zIndex="9999" :ref="'a'+ 1" :src="assessment.checkUrl" v-show="false" :preview-src-list="[assessment.checkUrl]" v-if="assessment.checkUrl != '' && assessment.checkUrl != null"></el-image>-->
<el-timeline-item v-if="assessment.assessmentTime!=null" :timestamp="assessment.assessmentTime+'(风险评估)'" placement="top">
<el-card>
<el-form-item label="风险等级:" >
{{assessment.assessmentLevel}}
</el-form-item>
<el-form-item label="评估内容:" >
<dl v-html="assessment.assessmentContent">
{{assessment.assessmentContent}}
</dl>
</el-form-item>
<el-form-item label="评估人:" >
{{assessment.assessmentUser}}
</el-form-item>
</el-card>
</el-timeline-item>
<el-timeline-item v-if="assessment.modifyBegin!=null" :timestamp="assessment.modifyBegin+'(隐患整改)'" placement="top">
<el-card>
<el-form-item label="是否整改:" >
<span v-if="assessment.isModify==1"></span>
<span v-if="assessment.isModify==0"></span>
</el-form-item>
<el-form-item label="整改意见:" >
<dl v-html="assessment.modifyOpinion">
{{assessment.modifyOpinion}}
</dl>
</el-form-item>
<el-form-item label="整改人:" >
{{assessment.modifyPeople}}
</el-form-item>
<el-form-item label="整改电话:" >
{{assessment.modifyPhone}}
</el-form-item>
<el-form-item label="整改期限:" >
{{assessment.modifyTerm}}天
</el-form-item>
<el-form-item label="结束时间:" >
{{assessment.modifyEnd}}
</el-form-item>
</el-card>
</el-timeline-item>
</el-timeline>
</div>
</el-form>
<!--</el-form-item>-->
<!--<el-form-item label="排查人员:" >-->
<!--{{assessment.checkUser}}-->
<!--</el-form-item>-->
<!--</el-card>-->
<!--</el-timeline-item>-->
<!--<el-card v-if="pinggu">-->
<!--<el-form ref="assessment" :model="assessment" :rules="rules2" label-width="80px">-->
<!--<el-form-item label="评估内容" prop="assessmentContent">-->
<!--<editor v-model="assessment.assessmentContent" :min-height="192"/>-->
<!--</el-form-item>-->
<!--<el-form-item label="风险等级" prop="assessmentLevel">-->
<!--<el-select v-model="assessment.assessmentLevel" placeholder="请选择评估风险等级">-->
<!--<el-option-->
<!--v-for="dict in assessmentLevelOptions"-->
<!--:key="dict.dictValue"-->
<!--:label="dict.dictLabel"-->
<!--:value="parseInt(dict.dictValue)"-->
<!--&gt;</el-option>-->
<!--</el-select>-->
<!--</el-form-item>-->
<!--<el-form-item label="评估人" prop="assessmentUser">-->
<!--<el-input v-model="assessment.assessmentUser" placeholder="请输入评估人" />-->
<!--</el-form-item>-->
<!--</el-form>-->
<!--<el-button type="primary" style="margin-left:42%" @click="submitping">确定</el-button>-->
<!--</el-card>-->
<!--<el-button v-if="!pinggu && assessment.assessmentTime==null" type="primary" style="margin-left:42%" @click="beginping">任务评估</el-button>-->
<!--<el-timeline-item v-if="assessment.assessmentTime!=null" :timestamp="assessment.assessmentTime+'(风险评估)'" placement="top">-->
<!--<el-card>-->
<!--<el-form-item label="风险等级:" >-->
<!--{{assessment.assessmentLevel}}-->
<!--</el-form-item>-->
<!--<el-form-item label="评估内容:" >-->
<!--<dl v-html="assessment.assessmentContent">-->
<!--{{assessment.assessmentContent}}-->
<!--</dl>-->
<!--</el-form-item>-->
<!--<el-form-item label="评估人:" >-->
<!--{{assessment.assessmentUser}}-->
<!--</el-form-item>-->
<!--</el-card>-->
<!--</el-timeline-item>-->
<!--<el-timeline-item v-if="assessment.modifyBegin!=null" :timestamp="assessment.modifyBegin+'(隐患整改)'" placement="top">-->
<!--<el-card>-->
<!--<el-form-item label="是否整改:" >-->
<!--<span v-if="assessment.isModify==1">是</span>-->
<!--<span v-if="assessment.isModify==0">否</span>-->
<!--</el-form-item>-->
<!--<el-form-item label="整改意见:" >-->
<!--<dl v-html="assessment.modifyOpinion">-->
<!--{{assessment.modifyOpinion}}-->
<!--</dl>-->
<!--</el-form-item>-->
<!--<el-form-item label="整改人:" >-->
<!--{{assessment.modifyPeople}}-->
<!--</el-form-item>-->
<!--<el-form-item label="整改电话:" >-->
<!--{{assessment.modifyPhone}}-->
<!--</el-form-item>-->
<!--<el-form-item label="整改期限:" >-->
<!--{{assessment.modifyTerm}}天-->
<!--</el-form-item>-->
<!--<el-form-item label="结束时间:" >-->
<!--{{assessment.modifyEnd}}-->
<!--</el-form-item>-->
<!--</el-card>-->
<!--</el-timeline-item>-->
<!--</el-timeline>-->
<!--</div>-->
<!--</el-form>-->
</el-dialog>
</div>
</template>
<script>
import { listWorkCheck, getWorkCheck, delWorkCheck, addWorkCheck, updateWorkCheck, exportWorkCheck } from "@/api/system/workCheck";
import { getAssessmentWorkId,updateAssessment } from "@/api/system/assessment";
import { getAssessmentWorkId,updateAssessment,listAssessment} from "@/api/system/assessment";
import { listLibrary} from "@/api/system/library";
import { listBook } from "@/api/system/book";
import Editor from '@/components/Editor';
......@@ -483,9 +530,11 @@ export default {
// 总条数
total: 0,
total2: 0,
total3: 0,
// 隐患排查任务表格数据
workCheckList: [],
childrenList:[],
assessmentList:[],
//部门列表
deptList:[],
//资料库
......@@ -528,6 +577,11 @@ export default {
workName: null,
workType: null,
},
queryParams3: {
pageNum: 1,
pageSize: 10,
workId: 0,
},
// 表单参数
form: {},
workInfo:{},
......@@ -552,8 +606,8 @@ export default {
workEndTime: [
{ required: true, message: "排查结束时间不能为空", trigger: "blur" }
],
deptId: [
{ required: true, message: "责任部门不能为空", trigger: "blur" }
staffId: [
{ required: true, message: "责任不能为空", trigger: "blur" }
],
// content: [
// { required: true, message: "排查内容不能为空", trigger: "blur" }
......@@ -727,16 +781,21 @@ export default {
this.open2 = true;
});
},
//任务详情
//任务详情listAssessment
handleDetail(row) {
getAssessmentWorkId(row.workId).then(response => {
console.log(response.data);
if(response.data==undefined){
this.msgError("任务未进行");
return;
}
this.assessment = response.data;
this.assessment.assessmentLevel = this.selectDictLabel(this.assessmentLevelOptions, response.data.assessmentLevel)
if(row!=null){
this.queryParams3.workId = row.workId;
}
listAssessment(this.queryParams3).then(response => {
console.log(response.rows);
this.assessmentList = response.rows;
this.total3 = response.total;
// if(response.data==undefined){
// this.msgError("任务未进行");
// return;
// }
// this.assessment = response.data;
// this.assessment.assessmentLevel = this.selectDictLabel(this.assessmentLevelOptions, response.data.assessmentLevel)
this.open3 = true;
});
},
......@@ -787,6 +846,10 @@ export default {
}
}
},
showPicture(row){
this.$refs['a'+row.id].showViewer = true;
console.log("===",row.id);
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
......@@ -824,6 +887,9 @@ export default {
::v-deep .el-form-item__content{
background: white;
}
::v-deep .el-table{
min-height: 500px;
}
.div-left{
min-height: 530px;
border-radius: 10px;
......
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