提交代码

dev_xd
姜玉琦 2024-10-07 22:43:41 +08:00
parent 25e37adf01
commit 7352d2df76
34 changed files with 570 additions and 1279 deletions

View File

@ -18,24 +18,20 @@ public class BusTrainingVideo extends BaseEntity
/** 主键 */ /** 主键 */
private Long id; private Long id;
/** 部门主键 */ /** 公司主键 */
@Excel(name = "部门主键") private Long comId;
private Long deptId;
public String getDeptName() { /** 公司名称 */
return deptName; @Excel(name = "公司名称")
} private String comName;
public void setDeptName(String deptName) {
this.deptName = deptName;
}
private String deptName;
/** 项目主键 */ /** 项目主键 */
@Excel(name = "项目主键")
private Long projectId; private Long projectId;
/** 项目名称 */
@Excel(name = "项目名称")
private String projectName;
/** 培训名称 */ /** 培训名称 */
@Excel(name = "培训名称") @Excel(name = "培训名称")
private String trainTitle; private String trainTitle;
@ -72,21 +68,18 @@ public class BusTrainingVideo extends BaseEntity
@Excel(name = "培训文件时长") @Excel(name = "培训文件时长")
private String trainFileTimes; private String trainFileTimes;
/** 播放时长 */
@Excel(name = "播放时长")
private int palyTimes;
/** 播放顺序 */
@Excel(name = "播放顺序")
private int sortBy;
/** 删除标识 */ /** 删除标识 */
@Excel(name = "删除标识") @Excel(name = "删除标识")
private Long isDel; private Long isDel;
private int ord;
public int getOrd() {
return ord;
}
public void setOrd(int ord) {
this.ord = ord;
}
public void setId(Long id) public void setId(Long id)
{ {
this.id = id; this.id = id;
@ -96,15 +89,23 @@ public class BusTrainingVideo extends BaseEntity
{ {
return id; return id;
} }
public void setDeptId(Long deptId)
{ public Long getComId() {
this.deptId = deptId; return comId;
} }
public Long getDeptId() public void setComId(Long comId) {
{ this.comId = comId;
return deptId;
} }
public String getComName() {
return comName;
}
public void setComName(String comName) {
this.comName = comName;
}
public void setProjectId(Long projectId) public void setProjectId(Long projectId)
{ {
this.projectId = projectId; this.projectId = projectId;
@ -114,6 +115,15 @@ public class BusTrainingVideo extends BaseEntity
{ {
return projectId; return projectId;
} }
public String getProjectName() {
return projectName;
}
public void setProjectName(String projectName) {
this.projectName = projectName;
}
public void setTrainTitle(String trainTitle) public void setTrainTitle(String trainTitle)
{ {
this.trainTitle = trainTitle; this.trainTitle = trainTitle;
@ -195,6 +205,23 @@ public class BusTrainingVideo extends BaseEntity
{ {
return trainFileTimes; return trainFileTimes;
} }
public int getSortBy() {
return sortBy;
}
public void setSortBy(int sortBy) {
this.sortBy = sortBy;
}
public int getPalyTimes() {
return palyTimes;
}
public void setPalyTimes(int palyTimes) {
this.palyTimes = palyTimes;
}
public void setIsDel(Long isDel) public void setIsDel(Long isDel)
{ {
this.isDel = isDel; this.isDel = isDel;
@ -209,7 +236,7 @@ public class BusTrainingVideo extends BaseEntity
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId()) .append("id", getId())
.append("deptId", getDeptId()) .append("comId", getComId())
.append("projectId", getProjectId()) .append("projectId", getProjectId())
.append("trainTitle", getTrainTitle()) .append("trainTitle", getTrainTitle())
.append("trainType", getTrainType()) .append("trainType", getTrainType())
@ -220,6 +247,7 @@ public class BusTrainingVideo extends BaseEntity
.append("trainFilePath", getTrainFilePath()) .append("trainFilePath", getTrainFilePath())
.append("trainFileImage", getTrainFileImage()) .append("trainFileImage", getTrainFileImage())
.append("trainFileTimes", getTrainFileTimes()) .append("trainFileTimes", getTrainFileTimes())
.append("sortBy", getSortBy())
.append("isDel", getIsDel()) .append("isDel", getIsDel())
.append("createBy", getCreateBy()) .append("createBy", getCreateBy())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())

View File

@ -18,18 +18,32 @@ public class BusTrainingVideoUser extends BaseEntity
/** 主键 */ /** 主键 */
private Long id; private Long id;
/** 部门主键 */ /** 公司主键 */
@Excel(name = "部门主键")
private Long deptId; private Long deptId;
/** 公司名称 */
@Excel(name = "公司名称")
private String comName;
/** 项目主键 */ /** 项目主键 */
@Excel(name = "项目主键")
private Long projectId; private Long projectId;
/** 项目名称 */
@Excel(name = "项目名称")
private String projectName;
/** 用户主键 */ /** 用户主键 */
@Excel(name = "用户主键") @Excel(name = "用户主键")
private Long userId; private Long userId;
/** 用户名称 */
@Excel(name = "用户名称")
private String userNick;
/** 用户账号 */
@Excel(name = "用户账号")
private String userName;
/** 视频主键 */ /** 视频主键 */
@Excel(name = "视频主键") @Excel(name = "视频主键")
private Long videoId; private Long videoId;
@ -119,6 +133,38 @@ public class BusTrainingVideoUser extends BaseEntity
return isDel; return isDel;
} }
public String getComName() {
return comName;
}
public void setComName(String comName) {
this.comName = comName;
}
public String getProjectName() {
return projectName;
}
public void setProjectName(String projectName) {
this.projectName = projectName;
}
public String getUserNick() {
return userNick;
}
public void setUserNick(String userNick) {
this.userNick = userNick;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

View File

@ -1,61 +0,0 @@
package com.yanzhu.manage.mapper;
import java.util.List;
import com.yanzhu.manage.domain.BusExamInfoQues;
/**
* Mapper
*
* @author JiangYuQi
* @date 2024-08-25
*/
public interface BusExamInfoQuesMapper
{
/**
*
*
* @param examId
* @return
*/
public BusExamInfoQues selectBusExamInfoQuesByExamId(Long examId);
/**
*
*
* @param busExamInfoQues
* @return
*/
public List<BusExamInfoQues> selectBusExamInfoQuesList(BusExamInfoQues busExamInfoQues);
/**
*
*
* @param busExamInfoQues
* @return
*/
public int insertBusExamInfoQues(BusExamInfoQues busExamInfoQues);
/**
*
*
* @param busExamInfoQues
* @return
*/
public int updateBusExamInfoQues(BusExamInfoQues busExamInfoQues);
/**
*
*
* @param examId
* @return
*/
public int deleteBusExamInfoQuesByExamId(Long examId);
/**
*
*
* @param examIds
* @return
*/
public int deleteBusExamInfoQuesByExamIds(Long[] examIds);
}

View File

@ -1,61 +0,0 @@
package com.yanzhu.manage.mapper;
import java.util.List;
import com.yanzhu.manage.domain.BusExamQuestionResult;
/**
* Mapper
*
* @author JiangYuQi
* @date 2024-08-25
*/
public interface BusExamQuestionResultMapper
{
/**
*
*
* @param id
* @return
*/
public BusExamQuestionResult selectBusExamQuestionResultById(Long id);
/**
*
*
* @param busExamQuestionResult
* @return
*/
public List<BusExamQuestionResult> selectBusExamQuestionResultList(BusExamQuestionResult busExamQuestionResult);
/**
*
*
* @param busExamQuestionResult
* @return
*/
public int insertBusExamQuestionResult(BusExamQuestionResult busExamQuestionResult);
/**
*
*
* @param busExamQuestionResult
* @return
*/
public int updateBusExamQuestionResult(BusExamQuestionResult busExamQuestionResult);
/**
*
*
* @param id
* @return
*/
public int deleteBusExamQuestionResultById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteBusExamQuestionResultByIds(Long[] ids);
}

View File

@ -1,61 +0,0 @@
package com.yanzhu.manage.mapper;
import java.util.List;
import com.yanzhu.manage.domain.BusExamUserResult;
/**
* Mapper
*
* @author JiangYuQi
* @date 2024-08-25
*/
public interface BusExamUserResultMapper
{
/**
*
*
* @param examUserId
* @return
*/
public BusExamUserResult selectBusExamUserResultByExamUserId(Long examUserId);
/**
*
*
* @param busExamUserResult
* @return
*/
public List<BusExamUserResult> selectBusExamUserResultList(BusExamUserResult busExamUserResult);
/**
*
*
* @param busExamUserResult
* @return
*/
public int insertBusExamUserResult(BusExamUserResult busExamUserResult);
/**
*
*
* @param busExamUserResult
* @return
*/
public int updateBusExamUserResult(BusExamUserResult busExamUserResult);
/**
*
*
* @param examUserId
* @return
*/
public int deleteBusExamUserResultByExamUserId(Long examUserId);
/**
*
*
* @param examUserIds
* @return
*/
public int deleteBusExamUserResultByExamUserIds(Long[] examUserIds);
}

View File

@ -1,6 +1,8 @@
package com.yanzhu.manage.mapper; package com.yanzhu.manage.mapper;
import java.util.List; import java.util.List;
import java.util.Map;
import com.yanzhu.manage.domain.BusTrainingVideo; import com.yanzhu.manage.domain.BusTrainingVideo;
/** /**
@ -27,6 +29,14 @@ public interface BusTrainingVideoMapper
*/ */
public List<BusTrainingVideo> selectBusTrainingVideoList(BusTrainingVideo busTrainingVideo); public List<BusTrainingVideo> selectBusTrainingVideoList(BusTrainingVideo busTrainingVideo);
/**
*
*
* @param busTrainingVideo
* @return
*/
public List<Map<String, Object>> findBusTrainingVideoByLevel(BusTrainingVideo busTrainingVideo);
/** /**
* *
* *

View File

@ -56,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="projectId != null "> and bei.project_id = #{projectId}</if> <if test="projectId != null "> and bei.project_id = #{projectId}</if>
<if test="activeComId != null "> and bei.com_id = #{activeComId}</if> <if test="activeComId != null "> and bei.com_id = #{activeComId}</if>
<if test="activeProjectId != null "> and bei.project_id = #{activeProjectId}</if> <if test="activeProjectId != null "> and bei.project_id = #{activeProjectId}</if>
<if test="projectName != null and projectName != ''"> and pi.project_name like concat('%', #{projectName}, '%')</if>
<if test="examTitle != null and examTitle != ''"> and bei.exam_title = #{examTitle}</if> <if test="examTitle != null and examTitle != ''"> and bei.exam_title = #{examTitle}</if>
<if test="examType != null and examType != ''"> and bei.exam_type = #{examType}</if> <if test="examType != null and examType != ''"> and bei.exam_type = #{examType}</if>
<if test="craftType != null and craftType != ''"> and bei.craft_type = #{craftType}</if> <if test="craftType != null and craftType != ''"> and bei.craft_type = #{craftType}</if>
@ -157,16 +158,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update bus_exam_info set use_number = use_number+1 where id = #{id} update bus_exam_info set use_number = use_number+1 where id = #{id}
</update> </update>
<delete id="deleteBusExamInfoById" parameterType="Long"> <update id="deleteBusExamInfoById" parameterType="Long">
delete from bus_exam_info where id = #{id} update bus_exam_info set is_del=2 where id = #{id}
</delete> </update>
<delete id="deleteBusExamInfoByIds" parameterType="String"> <update id="deleteBusExamInfoByIds" parameterType="String">
delete from bus_exam_info where id in update bus_exam_info set is_del=2 where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>
</delete> </update>
<delete id="deleteBusExamInfoQuesByExamIds" parameterType="String"> <delete id="deleteBusExamInfoQuesByExamIds" parameterType="String">
delete from bus_exam_info_ques where exam_id in delete from bus_exam_info_ques where exam_id in

View File

@ -1,69 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yanzhu.manage.mapper.BusExamInfoQuesMapper">
<resultMap type="BusExamInfoQues" id="BusExamInfoQuesResult">
<result property="examId" column="exam_id" />
<result property="questionId" column="question_id" />
<result property="marks" column="marks" />
<result property="sortBy" column="sort_by" />
</resultMap>
<sql id="selectBusExamInfoQuesVo">
select exam_id, question_id, marks, sort_by from bus_exam_info_ques
</sql>
<select id="selectBusExamInfoQuesList" parameterType="BusExamInfoQues" resultMap="BusExamInfoQuesResult">
<include refid="selectBusExamInfoQuesVo"/>
<where>
<if test="examId != null "> and exam_id = #{examId}</if>
<if test="questionId != null "> and question_id = #{questionId}</if>
<if test="marks != null "> and marks = #{marks}</if>
<if test="sortBy != null "> and sort_by = #{sortBy}</if>
</where>
</select>
<select id="selectBusExamInfoQuesByExamId" parameterType="Long" resultMap="BusExamInfoQuesResult">
<include refid="selectBusExamInfoQuesVo"/>
where exam_id = #{examId}
</select>
<insert id="insertBusExamInfoQues" parameterType="BusExamInfoQues">
insert into bus_exam_info_ques
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="examId != null">exam_id,</if>
<if test="questionId != null">question_id,</if>
<if test="marks != null">marks,</if>
<if test="sortBy != null">sort_by,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="examId != null">#{examId},</if>
<if test="questionId != null">#{questionId},</if>
<if test="marks != null">#{marks},</if>
<if test="sortBy != null">#{sortBy},</if>
</trim>
</insert>
<update id="updateBusExamInfoQues" parameterType="BusExamInfoQues">
update bus_exam_info_ques
<trim prefix="SET" suffixOverrides=",">
<if test="questionId != null">question_id = #{questionId},</if>
<if test="marks != null">marks = #{marks},</if>
<if test="sortBy != null">sort_by = #{sortBy},</if>
</trim>
where exam_id = #{examId}
</update>
<delete id="deleteBusExamInfoQuesByExamId" parameterType="Long">
delete from bus_exam_info_ques where exam_id = #{examId}
</delete>
<delete id="deleteBusExamInfoQuesByExamIds" parameterType="String">
delete from bus_exam_info_ques where exam_id in
<foreach item="examId" collection="array" open="(" separator="," close=")">
#{examId}
</foreach>
</delete>
</mapper>

View File

@ -56,7 +56,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="projectId != null "> and (beq.project_id = #{projectId} or beq.project_id is null)</if> <if test="projectId != null "> and (beq.project_id = #{projectId} or beq.project_id is null)</if>
<if test="activeComId != null "> and (beq.com_id = #{activeComId} or beq.com_id is null)</if> <if test="activeComId != null "> and (beq.com_id = #{activeComId} or beq.com_id is null)</if>
<if test="activeProjectId != null "> and (beq.project_id = #{activeProjectId} or beq.project_id is null)</if> <if test="activeProjectId != null "> and (beq.project_id = #{activeProjectId} or beq.project_id is null)</if>
<if test="craftType != null and craftType != ''"> and beq.craft_type = #{craftType}</if> <if test="projectName != null and projectName != ''"> and pi.project_name like concat('%', #{projectName}, '%')</if>
<if test="craftType != null and craftType != ''"> and find_in_set(#{craftType}, beq.craft_type)</if>
<if test="craftPost != null and craftPost != ''"> and find_in_set(#{craftPost}, beq.craft_post)</if> <if test="craftPost != null and craftPost != ''"> and find_in_set(#{craftPost}, beq.craft_post)</if>
<if test="questionDiff != null "> and beq.question_diff = #{questionDiff} </if> <if test="questionDiff != null "> and beq.question_diff = #{questionDiff} </if>
<if test="questionType != null "> and beq.question_type = #{questionType} </if> <if test="questionType != null "> and beq.question_type = #{questionType} </if>

View File

@ -1,91 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yanzhu.manage.mapper.BusExamQuestionResultMapper">
<resultMap type="BusExamQuestionResult" id="BusExamQuestionResultResult">
<result property="id" column="id" />
<result property="questionId" column="question_id" />
<result property="opt" column="opt" />
<result property="result" column="result" />
<result property="isOk" column="is_ok" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectBusExamQuestionResultVo">
select id, question_id, opt, result, is_ok, create_by, create_time, update_by, update_time, remark from bus_exam_question_result
</sql>
<select id="selectBusExamQuestionResultList" parameterType="BusExamQuestionResult" resultMap="BusExamQuestionResultResult">
<include refid="selectBusExamQuestionResultVo"/>
<where>
<if test="questionId != null "> and question_id = #{questionId}</if>
<if test="opt != null and opt != ''"> and opt = #{opt}</if>
<if test="result != null and result != ''"> and result like concat('%', #{result}, '%')</if>
<if test="isOk != null "> and is_ok = #{isOk}</if>
</where>
</select>
<select id="selectBusExamQuestionResultById" parameterType="Long" resultMap="BusExamQuestionResultResult">
<include refid="selectBusExamQuestionResultVo"/>
where id = #{id}
</select>
<insert id="insertBusExamQuestionResult" parameterType="BusExamQuestionResult" useGeneratedKeys="true" keyProperty="id">
insert into bus_exam_question_result
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="questionId != null">question_id,</if>
<if test="opt != null">opt,</if>
<if test="result != null">result,</if>
<if test="isOk != null">is_ok,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="questionId != null">#{questionId},</if>
<if test="opt != null">#{opt},</if>
<if test="result != null">#{result},</if>
<if test="isOk != null">#{isOk},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateBusExamQuestionResult" parameterType="BusExamQuestionResult">
update bus_exam_question_result
<trim prefix="SET" suffixOverrides=",">
<if test="questionId != null">question_id = #{questionId},</if>
<if test="opt != null">opt = #{opt},</if>
<if test="result != null">result = #{result},</if>
<if test="isOk != null">is_ok = #{isOk},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteBusExamQuestionResultById" parameterType="Long">
delete from bus_exam_question_result where id = #{id}
</delete>
<delete id="deleteBusExamQuestionResultByIds" parameterType="String">
delete from bus_exam_question_result where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -64,7 +64,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="activeComId != null "> and beu.com_id = #{activeComId}</if> <if test="activeComId != null "> and beu.com_id = #{activeComId}</if>
<if test="activeProjectId != null "> and beu.project_id = #{activeProjectId}</if> <if test="activeProjectId != null "> and beu.project_id = #{activeProjectId}</if>
<if test="userId != null "> and beu.user_id = #{userId}</if> <if test="userId != null "> and beu.user_id = #{userId}</if>
<if test="userName != null and userName != ''"> and (beu.com_id = #{activeComId} or )</if> <if test="projectName != null and projectName != ''"> and pi.project_name like concat('%', #{projectName}, '%')</if>
<if test="userName != null and userName != ''"> and (su.nick_name like concat('%', #{userName}, '%') or su.user_name like concat('%', #{userName}, '%') )</if>
<if test="examTitle != null and examTitle != ''"> and beu.exam_title = #{examTitle}</if> <if test="examTitle != null and examTitle != ''"> and beu.exam_title = #{examTitle}</if>
<if test="examType != null and examType != ''"> and beu.exam_type = #{examType}</if> <if test="examType != null and examType != ''"> and beu.exam_type = #{examType}</if>
<if test="craftType != null and craftType != ''"> and beu.craft_type = #{craftType}</if> <if test="craftType != null and craftType != ''"> and beu.craft_type = #{craftType}</if>
@ -158,16 +159,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id} where id = #{id}
</update> </update>
<delete id="deleteBusExamUserById" parameterType="Long"> <update id="deleteBusExamUserById" parameterType="Long">
delete from bus_exam_user where id = #{id} update bus_exam_user set is_del=2 where id = #{id}
</delete> </update>
<delete id="deleteBusExamUserByIds" parameterType="String"> <update id="deleteBusExamUserByIds" parameterType="String">
delete from bus_exam_user where id in update bus_exam_user set is_del=2 where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>
</delete> </update>
<delete id="deleteBusExamUserResultByExamUserIds" parameterType="String"> <delete id="deleteBusExamUserResultByExamUserIds" parameterType="String">
delete from bus_exam_user_result where exam_user_id in delete from bus_exam_user_result where exam_user_id in

View File

@ -1,79 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yanzhu.manage.mapper.BusExamUserResultMapper">
<resultMap type="BusExamUserResult" id="BusExamUserResultResult">
<result property="examUserId" column="exam_user_id" />
<result property="questionId" column="question_id" />
<result property="answers" column="answers" />
<result property="sortBy" column="sort_by" />
<result property="useRes" column="use_res" />
<result property="useMark" column="use_mark" />
</resultMap>
<sql id="selectBusExamUserResultVo">
select exam_user_id, question_id, answers, sort_by, use_res, use_mark from bus_exam_user_result
</sql>
<select id="selectBusExamUserResultList" parameterType="BusExamUserResult" resultMap="BusExamUserResultResult">
<include refid="selectBusExamUserResultVo"/>
<where>
<if test="examUserId != null "> and exam_user_id = #{examUserId}</if>
<if test="questionId != null "> and question_id = #{questionId}</if>
<if test="answers != null and answers != ''"> and answers = #{answers}</if>
<if test="sortBy != null "> and sort_by = #{sortBy}</if>
<if test="useRes != null and useRes != ''"> and use_res = #{useRes}</if>
<if test="useMark != null and useMark != ''"> and use_mark = #{useMark}</if>
</where>
</select>
<select id="selectBusExamUserResultByExamUserId" parameterType="Long" resultMap="BusExamUserResultResult">
<include refid="selectBusExamUserResultVo"/>
where exam_user_id = #{examUserId}
</select>
<insert id="insertBusExamUserResult" parameterType="BusExamUserResult">
insert into bus_exam_user_result
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="examUserId != null">exam_user_id,</if>
<if test="questionId != null">question_id,</if>
<if test="answers != null">answers,</if>
<if test="sortBy != null">sort_by,</if>
<if test="useRes != null">use_res,</if>
<if test="useMark != null">use_mark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="examUserId != null">#{examUserId},</if>
<if test="questionId != null">#{questionId},</if>
<if test="answers != null">#{answers},</if>
<if test="sortBy != null">#{sortBy},</if>
<if test="useRes != null">#{useRes},</if>
<if test="useMark != null">#{useMark},</if>
</trim>
</insert>
<update id="updateBusExamUserResult" parameterType="BusExamUserResult">
update bus_exam_user_result
<trim prefix="SET" suffixOverrides=",">
<if test="questionId != null">question_id = #{questionId},</if>
<if test="answers != null">answers = #{answers},</if>
<if test="sortBy != null">sort_by = #{sortBy},</if>
<if test="useRes != null">use_res = #{useRes},</if>
<if test="useMark != null">use_mark = #{useMark},</if>
</trim>
where exam_user_id = #{examUserId}
</update>
<delete id="deleteBusExamUserResultByExamUserId" parameterType="Long">
delete from bus_exam_user_result where exam_user_id = #{examUserId}
</delete>
<delete id="deleteBusExamUserResultByExamUserIds" parameterType="String">
delete from bus_exam_user_result where exam_user_id in
<foreach item="examUserId" collection="array" open="(" separator="," close=")">
#{examUserId}
</foreach>
</delete>
</mapper>

View File

@ -6,9 +6,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="BusTrainingVideo" id="BusTrainingVideoResult"> <resultMap type="BusTrainingVideo" id="BusTrainingVideoResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="deptId" column="dept_id" /> <result property="comId" column="com_id" />
<result property="deptName" column="dept_name"/> <result property="comName" column="com_name"/>
<result property="projectId" column="project_id" /> <result property="projectId" column="project_id" />
<result property="projectName" column="project_name" />
<result property="trainTitle" column="train_title" /> <result property="trainTitle" column="train_title" />
<result property="trainType" column="train_type" /> <result property="trainType" column="train_type" />
<result property="trainLevel" column="train_level" /> <result property="trainLevel" column="train_level" />
@ -18,7 +19,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="trainFilePath" column="train_file_path" /> <result property="trainFilePath" column="train_file_path" />
<result property="trainFileImage" column="train_file_image" /> <result property="trainFileImage" column="train_file_image" />
<result property="trainFileTimes" column="train_file_times" /> <result property="trainFileTimes" column="train_file_times" />
<result property="ord" column="ord"/> <result property="palyTimes" column="paly_times"/>
<result property="sortBy" column="sort_by"/>
<result property="isDel" column="is_del" /> <result property="isDel" column="is_del" />
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
@ -28,36 +30,60 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectBusTrainingVideoVo"> <sql id="selectBusTrainingVideoVo">
select bus_training_video.*,sys_dept.dept_name select btv.*, sd.dept_name as com_name, pi.project_name
from bus_training_video from bus_training_video btv
left join sys_dept on bus_training_video.dept_id=sys_dept.dept_id left join pro_project_info pi on pi.id = btv.project_id
left join sys_dept sd on sd.dept_id = btv.com_id
</sql> </sql>
<select id="selectBusTrainingVideoList" parameterType="BusTrainingVideo" resultMap="BusTrainingVideoResult"> <select id="selectBusTrainingVideoList" parameterType="BusTrainingVideo" resultMap="BusTrainingVideoResult">
<include refid="selectBusTrainingVideoVo"/> <include refid="selectBusTrainingVideoVo"/>
<where> <where>
<if test="deptId != null "> and dept_id = #{deptId}</if> and btv.is_del != 2
<if test="projectId != null "> and project_id = #{projectId}</if> <if test="comId != null "> and (btv.com_id = #{comId} or btv.com_id is null)</if>
<if test="trainTitle != null and trainTitle != ''"> and train_title like concat('%', #{trainTitle}, '%')</if> <if test="projectId != null "> and (btv.project_id = #{projectId} or btv.project_id is null)</if>
<if test="trainType != null and trainType != ''"> and train_type = #{trainType}</if> <if test="activeComId != null "> and (btv.com_id = #{activeComId} or btv.com_id is null)</if>
<if test="trainLevel != null and trainLevel != ''"> and train_level = #{trainLevel}</if> <if test="activeProjectId != null "> and (btv.project_id = #{activeProjectId} or btv.project_id is null)</if>
<if test="craftType != null and craftType != ''"> and craft_type = #{craftType}</if> <if test="projectName != null and projectName != ''"> and pi.project_name like concat('%', #{projectName}, '%')</if>
<if test="craftPost != null and craftPost != ''"> and craft_post = #{craftPost}</if> <if test="trainTitle != null and trainTitle != ''"> and btv.train_title like concat('%', #{trainTitle}, '%')</if>
<if test="trainFileType != null and trainFileType != ''"> and train_file_type = #{trainFileType}</if> <if test="trainType != null and trainType != ''"> and btv.train_type = #{trainType}</if>
<if test="isDel != null "> and is_del = #{isDel}</if> <if test="trainLevel != null and trainLevel != ''"> and btv.train_level = #{trainLevel}</if>
<if test="craftType != null and craftType != ''"> and find_in_set(#{craftType}, btv.craft_type)</if>
<if test="craftPost != null and craftPost != ''"> and find_in_set(#{craftPost}, btv.craft_post)</if>
<if test="isDel != null "> and btv.is_del = #{isDel}</if>
</where> </where>
order by ord order by btv.id desc
</select>
<select id="findBusTrainingVideoByLevel" parameterType="BusTrainingVideo" resultType="map">
select btv.train_level as trainLevel, count(1) as total
from bus_training_video btv
left join pro_project_info pi on pi.id = btv.project_id
<where>
and btv.is_del != 2
<if test="comId != null "> and (btv.com_id = #{comId} or btv.com_id is null)</if>
<if test="projectId != null "> and (btv.project_id = #{projectId} or btv.project_id is null)</if>
<if test="activeComId != null "> and (btv.com_id = #{activeComId} or btv.com_id is null)</if>
<if test="activeProjectId != null "> and (btv.project_id = #{activeProjectId} or btv.project_id is null)</if>
<if test="projectName != null and projectName != ''"> and pi.project_name like concat('%', #{projectName}, '%')</if>
<if test="trainTitle != null and trainTitle != ''"> and btv.train_title like concat('%', #{trainTitle}, '%')</if>
<if test="trainType != null and trainType != ''"> and btv.train_type = #{trainType}</if>
<if test="craftType != null and craftType != ''"> and find_in_set(#{craftType}, btv.craft_type)</if>
<if test="craftPost != null and craftPost != ''"> and find_in_set(#{craftPost}, btv.craft_post)</if>
<if test="isDel != null "> and btv.is_del = #{isDel}</if>
</where>
group by btv.train_level
</select> </select>
<select id="selectBusTrainingVideoById" parameterType="Long" resultMap="BusTrainingVideoResult"> <select id="selectBusTrainingVideoById" parameterType="Long" resultMap="BusTrainingVideoResult">
<include refid="selectBusTrainingVideoVo"/> <include refid="selectBusTrainingVideoVo"/>
where id = #{id} where btv.id = #{id}
</select> </select>
<insert id="insertBusTrainingVideo" parameterType="BusTrainingVideo" useGeneratedKeys="true" keyProperty="id"> <insert id="insertBusTrainingVideo" parameterType="BusTrainingVideo" useGeneratedKeys="true" keyProperty="id">
insert into bus_training_video insert into bus_training_video
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deptId != null">dept_id,</if> <if test="comId != null">com_id,</if>
<if test="projectId != null">project_id,</if> <if test="projectId != null">project_id,</if>
<if test="trainTitle != null">train_title,</if> <if test="trainTitle != null">train_title,</if>
<if test="trainType != null">train_type,</if> <if test="trainType != null">train_type,</if>
@ -68,7 +94,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="trainFilePath != null">train_file_path,</if> <if test="trainFilePath != null">train_file_path,</if>
<if test="trainFileImage != null">train_file_image,</if> <if test="trainFileImage != null">train_file_image,</if>
<if test="trainFileTimes != null">train_file_times,</if> <if test="trainFileTimes != null">train_file_times,</if>
<if test="ord != null and ord>=0">ord,</if> <if test="palyTimes != null">paly_times,</if>
<if test="sortBy != null">sort_by,</if>
<if test="isDel != null">is_del,</if> <if test="isDel != null">is_del,</if>
<if test="createBy != null">create_by,</if> <if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
@ -77,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="remark != null">remark,</if> <if test="remark != null">remark,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deptId != null">#{deptId},</if> <if test="comId != null">#{comId},</if>
<if test="projectId != null">#{projectId},</if> <if test="projectId != null">#{projectId},</if>
<if test="trainTitle != null">#{trainTitle},</if> <if test="trainTitle != null">#{trainTitle},</if>
<if test="trainType != null">#{trainType},</if> <if test="trainType != null">#{trainType},</if>
@ -88,7 +115,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="trainFilePath != null">#{trainFilePath},</if> <if test="trainFilePath != null">#{trainFilePath},</if>
<if test="trainFileImage != null">#{trainFileImage},</if> <if test="trainFileImage != null">#{trainFileImage},</if>
<if test="trainFileTimes != null">#{trainFileTimes},</if> <if test="trainFileTimes != null">#{trainFileTimes},</if>
<if test="ord != null and ord>=0">#{ord},</if> <if test="palyTimes != null">#{palyTimes},</if>
<if test="sortBy != null">#{sortBy},</if>
<if test="isDel != null">#{isDel},</if> <if test="isDel != null">#{isDel},</if>
<if test="createBy != null">#{createBy},</if> <if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
@ -101,7 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateBusTrainingVideo" parameterType="BusTrainingVideo"> <update id="updateBusTrainingVideo" parameterType="BusTrainingVideo">
update bus_training_video update bus_training_video
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="deptId != null">dept_id = #{deptId},</if> <if test="comId != null">com_id = #{comId},</if>
<if test="projectId != null">project_id = #{projectId},</if> <if test="projectId != null">project_id = #{projectId},</if>
<if test="trainTitle != null">train_title = #{trainTitle},</if> <if test="trainTitle != null">train_title = #{trainTitle},</if>
<if test="trainType != null">train_type = #{trainType},</if> <if test="trainType != null">train_type = #{trainType},</if>
@ -112,7 +140,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="trainFilePath != null">train_file_path = #{trainFilePath},</if> <if test="trainFilePath != null">train_file_path = #{trainFilePath},</if>
<if test="trainFileImage != null">train_file_image = #{trainFileImage},</if> <if test="trainFileImage != null">train_file_image = #{trainFileImage},</if>
<if test="trainFileTimes != null">train_file_times = #{trainFileTimes},</if> <if test="trainFileTimes != null">train_file_times = #{trainFileTimes},</if>
<if test="ord != null and ord>=0">ord = #{ord},</if> <if test="palyTimes != null">paly_times = #{palyTimes},</if>
<if test="sortBy != null">sort_by = #{sortBy},</if>
<if test="isDel != null">is_del = #{isDel},</if> <if test="isDel != null">is_del = #{isDel},</if>
<if test="createBy != null">create_by = #{createBy},</if> <if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>
@ -123,14 +152,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id} where id = #{id}
</update> </update>
<delete id="deleteBusTrainingVideoById" parameterType="Long"> <update id="deleteBusTrainingVideoById" parameterType="Long">
delete from bus_training_video where id = #{id} update bus_training_video set is_del=2 where id = #{id}
</delete> </update>
<delete id="deleteBusTrainingVideoByIds" parameterType="String"> <update id="deleteBusTrainingVideoByIds" parameterType="String">
delete from bus_training_video where id in update bus_training_video set is_del=2 where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>
</delete> </update>
</mapper> </mapper>

View File

@ -6,9 +6,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="BusTrainingVideoUser" id="BusTrainingVideoUserResult"> <resultMap type="BusTrainingVideoUser" id="BusTrainingVideoUserResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="deptId" column="dept_id" /> <result property="comId" column="com_id" />
<result property="comName" column="com_name" />
<result property="projectId" column="project_id" /> <result property="projectId" column="project_id" />
<result property="projectName" column="project_name" />
<result property="userId" column="user_id" /> <result property="userId" column="user_id" />
<result property="userNick" column="user_nick" />
<result property="userName" column="user_name" />
<result property="videoId" column="video_id" /> <result property="videoId" column="video_id" />
<result property="playStatus" column="play_status" /> <result property="playStatus" column="play_status" />
<result property="sortBy" column="sort_by" /> <result property="sortBy" column="sort_by" />
@ -21,31 +25,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectBusTrainingVideoUserVo"> <sql id="selectBusTrainingVideoUserVo">
select id, dept_id, project_id, user_id, video_id, play_status, sort_by, is_del, create_by, create_time, update_by, update_time, remark from bus_training_video_user select btvu.id, btvu.com_id, sd.dept_name as com_name, btvu.project_id, pi.project_name, btvu.user_id, su.nick_name as user_nick, su.user_name, btvu.video_id, btvu.play_status, btvu.sort_by, btvu.is_del, btvu.create_by, btvu.create_time, btvu.update_by, btvu.update_time, btvu.remark from bus_training_video_user btvu
left join pro_project_info pi on pi.id = btvu.project_id
left join sys_dept sd on sd.com_id = btvu.com_id
left join sys_user su on su.user_id = btvu.user_id
</sql> </sql>
<select id="selectBusTrainingVideoUserList" parameterType="BusTrainingVideoUser" resultMap="BusTrainingVideoUserResult"> <select id="selectBusTrainingVideoUserList" parameterType="BusTrainingVideoUser" resultMap="BusTrainingVideoUserResult">
<include refid="selectBusTrainingVideoUserVo"/> <include refid="selectBusTrainingVideoUserVo"/>
<where> <where>
<if test="deptId != null "> and dept_id = #{deptId}</if> btvu.is_del!=2
<if test="projectId != null "> and project_id = #{projectId}</if> <if test="comId != null "> and btvu.com_id = #{comId}</if>
<if test="userId != null "> and user_id = #{userId}</if> <if test="projectId != null "> and btvu.project_id = #{projectId}</if>
<if test="videoId != null "> and video_id = #{videoId}</if> <if test="activeComId != null "> and btvu.com_id = #{activeComId}</if>
<if test="playStatus != null "> and play_status = #{playStatus}</if> <if test="activeProjectId != null "> and btvu.project_id = #{activeProjectId}</if>
<if test="sortBy != null "> and sort_by = #{sortBy}</if> <if test="projectName != null and projectName != ''"> and pi.project_name like concat('%', #{projectName}, '%')</if>
<if test="isDel != null "> and is_del = #{isDel}</if> <if test="userName != null and userName != ''"> and (su.nick_name like concat('%', #{userName}, '%') or su.user_name like concat('%', #{userName}, '%') )</if>
<if test="userId != null "> and btvu.user_id = #{userId}</if>
<if test="isDel != null "> and btvu.is_del = #{isDel}</if>
</where> </where>
order by btvu.id desc
</select> </select>
<select id="selectBusTrainingVideoUserById" parameterType="Long" resultMap="BusTrainingVideoUserResult"> <select id="selectBusTrainingVideoUserById" parameterType="Long" resultMap="BusTrainingVideoUserResult">
<include refid="selectBusTrainingVideoUserVo"/> <include refid="selectBusTrainingVideoUserVo"/>
where id = #{id} where btvu.id = #{id}
</select> </select>
<insert id="insertBusTrainingVideoUser" parameterType="BusTrainingVideoUser" useGeneratedKeys="true" keyProperty="id"> <insert id="insertBusTrainingVideoUser" parameterType="BusTrainingVideoUser" useGeneratedKeys="true" keyProperty="id">
insert into bus_training_video_user insert into bus_training_video_user
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deptId != null">dept_id,</if> <if test="comId != null">com_id,</if>
<if test="projectId != null">project_id,</if> <if test="projectId != null">project_id,</if>
<if test="userId != null">user_id,</if> <if test="userId != null">user_id,</if>
<if test="videoId != null">video_id,</if> <if test="videoId != null">video_id,</if>
@ -59,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="remark != null">remark,</if> <if test="remark != null">remark,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deptId != null">#{deptId},</if> <if test="comId != null">#{comId},</if>
<if test="projectId != null">#{projectId},</if> <if test="projectId != null">#{projectId},</if>
<if test="userId != null">#{userId},</if> <if test="userId != null">#{userId},</if>
<if test="videoId != null">#{videoId},</if> <if test="videoId != null">#{videoId},</if>
@ -77,7 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateBusTrainingVideoUser" parameterType="BusTrainingVideoUser"> <update id="updateBusTrainingVideoUser" parameterType="BusTrainingVideoUser">
update bus_training_video_user update bus_training_video_user
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="deptId != null">dept_id = #{deptId},</if> <if test="comId != null">com_id = #{comId},</if>
<if test="projectId != null">project_id = #{projectId},</if> <if test="projectId != null">project_id = #{projectId},</if>
<if test="userId != null">user_id = #{userId},</if> <if test="userId != null">user_id = #{userId},</if>
<if test="videoId != null">video_id = #{videoId},</if> <if test="videoId != null">video_id = #{videoId},</if>
@ -93,14 +103,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id} where id = #{id}
</update> </update>
<delete id="deleteBusTrainingVideoUserById" parameterType="Long"> <update id="deleteBusTrainingVideoUserById" parameterType="Long">
delete from bus_training_video_user where id = #{id} update bus_training_video_user set is_del=2 where id = #{id}
</delete> </update>
<delete id="deleteBusTrainingVideoUserByIds" parameterType="String"> <update id="deleteBusTrainingVideoUserByIds" parameterType="String">
delete from bus_training_video_user where id in update bus_training_video_user set is_del=2 where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>
</delete> </update>
</mapper> </mapper>

View File

@ -39,9 +39,4 @@ public class FastDfsSysFileServiceImpl implements ISysFileService
FileTypeUtils.getExtension(file), null); FileTypeUtils.getExtension(file), null);
return domain + "/" + storePath.getFullPath(); return domain + "/" + storePath.getFullPath();
} }
@Override
public String uploadFilePath(MultipartFile file, String path) throws Exception {
return null;
}
} }

View File

@ -17,13 +17,4 @@ public interface ISysFileService
* @throws Exception * @throws Exception
*/ */
public String uploadFile(MultipartFile file) throws Exception; public String uploadFile(MultipartFile file) throws Exception;
/**
*
*
* @param file
* @return 访
* @throws Exception
*/
public String uploadFilePath(MultipartFile file,String path) throws Exception;
} }

View File

@ -44,21 +44,6 @@ public class LocalSysFileServiceImpl implements ISysFileService
public String uploadFile(MultipartFile file) throws Exception public String uploadFile(MultipartFile file) throws Exception
{ {
String name = FileUploadUtils.upload(localFilePath, file); String name = FileUploadUtils.upload(localFilePath, file);
String url = domain + localFilePrefix + name; return localFilePrefix + name;
return url;
}
/**
* &&
*
* @param file
* @return 访
* @throws Exception
*/
@Override
public String uploadFilePath(MultipartFile file, String path) throws Exception {
String name = FileUploadUtils.upload(localFilePath+"/"+path, file);
String url = domain + localFilePrefix + name;
return url;
} }
} }

View File

@ -42,9 +42,4 @@ public class MinioSysFileServiceImpl implements ISysFileService
client.putObject(args); client.putObject(args);
return minioConfig.getUrl() + "/" + minioConfig.getBucketName() + "/" + fileName; return minioConfig.getUrl() + "/" + minioConfig.getBucketName() + "/" + fileName;
} }
@Override
public String uploadFilePath(MultipartFile file, String path) throws Exception {
return null;
}
} }

View File

@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* Controller * Controller
@ -40,6 +41,18 @@ public class BusTrainingVideoController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
/**
*
* @RequiresPermissions("manage:busTrainingVideo:list")
*
* @param busTrainingVideo
* @return
*/
@GetMapping("/findGroupByLevel")
public AjaxResult findBusTrainingVideoByLevel(BusTrainingVideo busTrainingVideo){
return success(busTrainingVideoService.findBusTrainingVideoByLevel(busTrainingVideo));
}
/** /**
* *
*/ */

View File

@ -1,61 +0,0 @@
package com.yanzhu.manage.service;
import java.util.List;
import com.yanzhu.manage.domain.BusExamInfoQues;
/**
* Service
*
* @author JiangYuQi
* @date 2024-08-25
*/
public interface IBusExamInfoQuesService
{
/**
*
*
* @param examId
* @return
*/
public BusExamInfoQues selectBusExamInfoQuesByExamId(Long examId);
/**
*
*
* @param busExamInfoQues
* @return
*/
public List<BusExamInfoQues> selectBusExamInfoQuesList(BusExamInfoQues busExamInfoQues);
/**
*
*
* @param busExamInfoQues
* @return
*/
public int insertBusExamInfoQues(BusExamInfoQues busExamInfoQues);
/**
*
*
* @param busExamInfoQues
* @return
*/
public int updateBusExamInfoQues(BusExamInfoQues busExamInfoQues);
/**
*
*
* @param examIds
* @return
*/
public int deleteBusExamInfoQuesByExamIds(Long[] examIds);
/**
*
*
* @param examId
* @return
*/
public int deleteBusExamInfoQuesByExamId(Long examId);
}

View File

@ -1,61 +0,0 @@
package com.yanzhu.manage.service;
import java.util.List;
import com.yanzhu.manage.domain.BusExamQuestionResult;
/**
* Service
*
* @author JiangYuQi
* @date 2024-08-25
*/
public interface IBusExamQuestionResultService
{
/**
*
*
* @param id
* @return
*/
public BusExamQuestionResult selectBusExamQuestionResultById(Long id);
/**
*
*
* @param busExamQuestionResult
* @return
*/
public List<BusExamQuestionResult> selectBusExamQuestionResultList(BusExamQuestionResult busExamQuestionResult);
/**
*
*
* @param busExamQuestionResult
* @return
*/
public int insertBusExamQuestionResult(BusExamQuestionResult busExamQuestionResult);
/**
*
*
* @param busExamQuestionResult
* @return
*/
public int updateBusExamQuestionResult(BusExamQuestionResult busExamQuestionResult);
/**
*
*
* @param ids
* @return
*/
public int deleteBusExamQuestionResultByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteBusExamQuestionResultById(Long id);
}

View File

@ -1,61 +0,0 @@
package com.yanzhu.manage.service;
import java.util.List;
import com.yanzhu.manage.domain.BusExamUserResult;
/**
* Service
*
* @author JiangYuQi
* @date 2024-08-25
*/
public interface IBusExamUserResultService
{
/**
*
*
* @param examUserId
* @return
*/
public BusExamUserResult selectBusExamUserResultByExamUserId(Long examUserId);
/**
*
*
* @param busExamUserResult
* @return
*/
public List<BusExamUserResult> selectBusExamUserResultList(BusExamUserResult busExamUserResult);
/**
*
*
* @param busExamUserResult
* @return
*/
public int insertBusExamUserResult(BusExamUserResult busExamUserResult);
/**
*
*
* @param busExamUserResult
* @return
*/
public int updateBusExamUserResult(BusExamUserResult busExamUserResult);
/**
*
*
* @param examUserIds
* @return
*/
public int deleteBusExamUserResultByExamUserIds(Long[] examUserIds);
/**
*
*
* @param examUserId
* @return
*/
public int deleteBusExamUserResultByExamUserId(Long examUserId);
}

View File

@ -1,6 +1,8 @@
package com.yanzhu.manage.service; package com.yanzhu.manage.service;
import java.util.List; import java.util.List;
import java.util.Map;
import com.yanzhu.manage.domain.BusTrainingVideo; import com.yanzhu.manage.domain.BusTrainingVideo;
/** /**
@ -27,6 +29,14 @@ public interface IBusTrainingVideoService
*/ */
public List<BusTrainingVideo> selectBusTrainingVideoList(BusTrainingVideo busTrainingVideo); public List<BusTrainingVideo> selectBusTrainingVideoList(BusTrainingVideo busTrainingVideo);
/**
*
*
* @param busTrainingVideo
* @return
*/
public List<Map<String, Object>> findBusTrainingVideoByLevel(BusTrainingVideo busTrainingVideo);
/** /**
* *
* *

View File

@ -1,101 +0,0 @@
package com.yanzhu.manage.service.impl;
import java.util.Date;
import java.util.List;
import com.yanzhu.common.core.context.SecurityContextHolder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yanzhu.manage.mapper.BusExamInfoQuesMapper;
import com.yanzhu.manage.domain.BusExamInfoQues;
import com.yanzhu.manage.service.IBusExamInfoQuesService;
/**
* Service
*
* @author JiangYuQi
* @date 2024-08-25
*/
@Service
public class BusExamInfoQuesServiceImpl implements IBusExamInfoQuesService
{
@Autowired
private BusExamInfoQuesMapper busExamInfoQuesMapper;
/**
*
*
* @param examId
* @return
*/
@Override
public BusExamInfoQues selectBusExamInfoQuesByExamId(Long examId)
{
return busExamInfoQuesMapper.selectBusExamInfoQuesByExamId(examId);
}
/**
*
*
* @param busExamInfoQues
* @return
*/
@Override
public List<BusExamInfoQues> selectBusExamInfoQuesList(BusExamInfoQues busExamInfoQues)
{
return busExamInfoQuesMapper.selectBusExamInfoQuesList(busExamInfoQues);
}
/**
*
*
* @param busExamInfoQues
* @return
*/
@Override
public int insertBusExamInfoQues(BusExamInfoQues busExamInfoQues)
{
busExamInfoQues.setCreateBy(SecurityContextHolder.getUserName());
busExamInfoQues.setCreateTime(new Date());
return busExamInfoQuesMapper.insertBusExamInfoQues(busExamInfoQues);
}
/**
*
*
* @param busExamInfoQues
* @return
*/
@Override
public int updateBusExamInfoQues(BusExamInfoQues busExamInfoQues)
{
busExamInfoQues.setUpdateBy(SecurityContextHolder.getUserName());
busExamInfoQues.setUpdateTime(new Date());
return busExamInfoQuesMapper.updateBusExamInfoQues(busExamInfoQues);
}
/**
*
*
* @param examIds
* @return
*/
@Override
public int deleteBusExamInfoQuesByExamIds(Long[] examIds)
{
return busExamInfoQuesMapper.deleteBusExamInfoQuesByExamIds(examIds);
}
/**
*
*
* @param examId
* @return
*/
@Override
public int deleteBusExamInfoQuesByExamId(Long examId)
{
return busExamInfoQuesMapper.deleteBusExamInfoQuesByExamId(examId);
}
}

View File

@ -5,6 +5,7 @@ import java.util.List;
import com.yanzhu.common.core.context.SecurityContextHolder; import com.yanzhu.common.core.context.SecurityContextHolder;
import com.yanzhu.common.core.utils.DateUtils; import com.yanzhu.common.core.utils.DateUtils;
import com.yanzhu.common.core.utils.StringUtils; import com.yanzhu.common.core.utils.StringUtils;
import com.yanzhu.common.security.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList; import java.util.ArrayList;
@ -47,6 +48,8 @@ public class BusExamInfoServiceImpl implements IBusExamInfoService
@Override @Override
public List<BusExamInfo> selectBusExamInfoList(BusExamInfo busExamInfo) public List<BusExamInfo> selectBusExamInfoList(BusExamInfo busExamInfo)
{ {
busExamInfo.setActiveComId(SecurityUtils.getLoginUser().getProjectDeptId());
busExamInfo.setActiveProjectId(SecurityUtils.getLoginUser().getProjectId());
return busExamInfoMapper.selectBusExamInfoList(busExamInfo); return busExamInfoMapper.selectBusExamInfoList(busExamInfo);
} }

View File

@ -1,100 +0,0 @@
package com.yanzhu.manage.service.impl;
import java.util.List;
import com.yanzhu.common.core.context.SecurityContextHolder;
import com.yanzhu.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yanzhu.manage.mapper.BusExamQuestionResultMapper;
import com.yanzhu.manage.domain.BusExamQuestionResult;
import com.yanzhu.manage.service.IBusExamQuestionResultService;
/**
* Service
*
* @author JiangYuQi
* @date 2024-08-25
*/
@Service
public class BusExamQuestionResultServiceImpl implements IBusExamQuestionResultService
{
@Autowired
private BusExamQuestionResultMapper busExamQuestionResultMapper;
/**
*
*
* @param id
* @return
*/
@Override
public BusExamQuestionResult selectBusExamQuestionResultById(Long id)
{
return busExamQuestionResultMapper.selectBusExamQuestionResultById(id);
}
/**
*
*
* @param busExamQuestionResult
* @return
*/
@Override
public List<BusExamQuestionResult> selectBusExamQuestionResultList(BusExamQuestionResult busExamQuestionResult)
{
return busExamQuestionResultMapper.selectBusExamQuestionResultList(busExamQuestionResult);
}
/**
*
*
* @param busExamQuestionResult
* @return
*/
@Override
public int insertBusExamQuestionResult(BusExamQuestionResult busExamQuestionResult)
{
busExamQuestionResult.setCreateTime(DateUtils.getNowDate());
busExamQuestionResult.setCreateBy(SecurityContextHolder.getUserName());
return busExamQuestionResultMapper.insertBusExamQuestionResult(busExamQuestionResult);
}
/**
*
*
* @param busExamQuestionResult
* @return
*/
@Override
public int updateBusExamQuestionResult(BusExamQuestionResult busExamQuestionResult)
{
busExamQuestionResult.setUpdateTime(DateUtils.getNowDate());
busExamQuestionResult.setUpdateBy(SecurityContextHolder.getUserName());
return busExamQuestionResultMapper.updateBusExamQuestionResult(busExamQuestionResult);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteBusExamQuestionResultByIds(Long[] ids)
{
return busExamQuestionResultMapper.deleteBusExamQuestionResultByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteBusExamQuestionResultById(Long id)
{
return busExamQuestionResultMapper.deleteBusExamQuestionResultById(id);
}
}

View File

@ -1,100 +0,0 @@
package com.yanzhu.manage.service.impl;
import java.util.Date;
import java.util.List;
import com.yanzhu.common.core.context.SecurityContextHolder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yanzhu.manage.mapper.BusExamUserResultMapper;
import com.yanzhu.manage.domain.BusExamUserResult;
import com.yanzhu.manage.service.IBusExamUserResultService;
/**
* Service
*
* @author JiangYuQi
* @date 2024-08-25
*/
@Service
public class BusExamUserResultServiceImpl implements IBusExamUserResultService
{
@Autowired
private BusExamUserResultMapper busExamUserResultMapper;
/**
*
*
* @param examUserId
* @return
*/
@Override
public BusExamUserResult selectBusExamUserResultByExamUserId(Long examUserId)
{
return busExamUserResultMapper.selectBusExamUserResultByExamUserId(examUserId);
}
/**
*
*
* @param busExamUserResult
* @return
*/
@Override
public List<BusExamUserResult> selectBusExamUserResultList(BusExamUserResult busExamUserResult)
{
return busExamUserResultMapper.selectBusExamUserResultList(busExamUserResult);
}
/**
*
*
* @param busExamUserResult
* @return
*/
@Override
public int insertBusExamUserResult(BusExamUserResult busExamUserResult)
{
busExamUserResult.setCreateBy(SecurityContextHolder.getUserName());
busExamUserResult.setCreateTime(new Date());
return busExamUserResultMapper.insertBusExamUserResult(busExamUserResult);
}
/**
*
*
* @param busExamUserResult
* @return
*/
@Override
public int updateBusExamUserResult(BusExamUserResult busExamUserResult)
{
busExamUserResult.setUpdateBy(SecurityContextHolder.getUserName());
busExamUserResult.setUpdateTime(new Date());
return busExamUserResultMapper.updateBusExamUserResult(busExamUserResult);
}
/**
*
*
* @param examUserIds
* @return
*/
@Override
public int deleteBusExamUserResultByExamUserIds(Long[] examUserIds)
{
return busExamUserResultMapper.deleteBusExamUserResultByExamUserIds(examUserIds);
}
/**
*
*
* @param examUserId
* @return
*/
@Override
public int deleteBusExamUserResultByExamUserId(Long examUserId)
{
return busExamUserResultMapper.deleteBusExamUserResultByExamUserId(examUserId);
}
}

View File

@ -1,9 +1,11 @@
package com.yanzhu.manage.service.impl; package com.yanzhu.manage.service.impl;
import java.util.List; import java.util.List;
import java.util.Map;
import com.yanzhu.common.core.context.SecurityContextHolder; import com.yanzhu.common.core.context.SecurityContextHolder;
import com.yanzhu.common.core.utils.DateUtils; import com.yanzhu.common.core.utils.DateUtils;
import com.yanzhu.common.security.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.yanzhu.manage.mapper.BusTrainingVideoMapper; import com.yanzhu.manage.mapper.BusTrainingVideoMapper;
@ -43,9 +45,24 @@ public class BusTrainingVideoServiceImpl implements IBusTrainingVideoService
@Override @Override
public List<BusTrainingVideo> selectBusTrainingVideoList(BusTrainingVideo busTrainingVideo) public List<BusTrainingVideo> selectBusTrainingVideoList(BusTrainingVideo busTrainingVideo)
{ {
busTrainingVideo.setActiveComId(SecurityUtils.getLoginUser().getProjectDeptId());
busTrainingVideo.setActiveProjectId(SecurityUtils.getLoginUser().getProjectId());
return busTrainingVideoMapper.selectBusTrainingVideoList(busTrainingVideo); return busTrainingVideoMapper.selectBusTrainingVideoList(busTrainingVideo);
} }
/**
*
*
* @param busTrainingVideo
* @return
*/
@Override
public List<Map<String, Object>> findBusTrainingVideoByLevel(BusTrainingVideo busTrainingVideo){
busTrainingVideo.setActiveComId(SecurityUtils.getLoginUser().getProjectDeptId());
busTrainingVideo.setActiveProjectId(SecurityUtils.getLoginUser().getProjectId());
return busTrainingVideoMapper.findBusTrainingVideoByLevel(busTrainingVideo);
}
/** /**
* *
* *

View File

@ -2,6 +2,7 @@ package com.yanzhu.manage.service.impl;
import com.yanzhu.common.core.context.SecurityContextHolder; import com.yanzhu.common.core.context.SecurityContextHolder;
import com.yanzhu.common.core.utils.DateUtils; import com.yanzhu.common.core.utils.DateUtils;
import com.yanzhu.common.security.utils.SecurityUtils;
import com.yanzhu.manage.domain.BusTrainingVideoUser; import com.yanzhu.manage.domain.BusTrainingVideoUser;
import com.yanzhu.manage.mapper.BusTrainingVideoUserMapper; import com.yanzhu.manage.mapper.BusTrainingVideoUserMapper;
import com.yanzhu.manage.service.IBusTrainingVideoUserService; import com.yanzhu.manage.service.IBusTrainingVideoUserService;
@ -43,6 +44,8 @@ public class BusTrainingVideoUserServiceImpl implements IBusTrainingVideoUserSer
@Override @Override
public List<BusTrainingVideoUser> selectBusTrainingVideoUserList(BusTrainingVideoUser busTrainingVideoUser) public List<BusTrainingVideoUser> selectBusTrainingVideoUserList(BusTrainingVideoUser busTrainingVideoUser)
{ {
busTrainingVideoUser.setActiveComId(SecurityUtils.getLoginUser().getProjectDeptId());
busTrainingVideoUser.setActiveProjectId(SecurityUtils.getLoginUser().getProjectId());
return busTrainingVideoUserMapper.selectBusTrainingVideoUserList(busTrainingVideoUser); return busTrainingVideoUserMapper.selectBusTrainingVideoUserList(busTrainingVideoUser);
} }

View File

@ -144,8 +144,8 @@ public class SysUserController extends BaseController {
} }
// 以项目人员身份登录 // 以项目人员身份登录
sysUser = userService.selectUserByUserName(username, Convert.toLong(list.get(0).get("project_id"))); sysUser = userService.selectUserByUserName(username, Convert.toLong(list.get(0).get("project_id")));
sysUser.setActiveComId(sysUser.getComId()); sysUser.setActiveComId(Convert.toLong(list.get(0).get("com_id")));
sysUser.setActiveComName(sysUser.getComName()); sysUser.setActiveComName(Convert.toStr(list.get(0).get("com_name")));
sysUser.setActiveProjectId(Convert.toLong(list.get(0).get("project_id"))); sysUser.setActiveProjectId(Convert.toLong(list.get(0).get("project_id")));
sysUser.setActiveProjectName(Convert.toStr(list.get(0).get("project_name"))); sysUser.setActiveProjectName(Convert.toStr(list.get(0).get("project_name")));
} }
@ -171,8 +171,8 @@ public class SysUserController extends BaseController {
SysUser sysUser = userService.selectUserByUserName(username, deptId); SysUser sysUser = userService.selectUserByUserName(username, deptId);
List<Map<String, Object>> list = userService.selectProjectsByUserId(sysUser.getUserId()); List<Map<String, Object>> list = userService.selectProjectsByUserId(sysUser.getUserId());
sysUser.setActiveComId(sysUser.getComId()); sysUser.setActiveComId(Convert.toLong(list.get(0).get("com_id")));
sysUser.setActiveComName(sysUser.getComName()); sysUser.setActiveComName(Convert.toStr(list.get(0).get("com_name")));
sysUser.setActiveProjectId(Convert.toLong(list.get(0).get("project_id"))); sysUser.setActiveProjectId(Convert.toLong(list.get(0).get("project_id")));
sysUser.setActiveProjectName(Convert.toStr(list.get(0).get("project_name"))); sysUser.setActiveProjectName(Convert.toStr(list.get(0).get("project_name")));
@ -222,21 +222,7 @@ public class SysUserController extends BaseController {
*/ */
@GetMapping("getInfo") @GetMapping("getInfo")
public AjaxResult getInfo() { public AjaxResult getInfo() {
SysUser cache = SecurityUtils.getLoginUser().getSysUser(); SysUser user = SecurityUtils.getLoginUser().getSysUser();
SysUser user;
if (SecurityUtils.isAdmin(cache.getUserId())) {
user = userService.selectUserById(cache.getUserId());
} else {
if (SecurityUtils.isGSAdmin()) {
user = userService.selectUserByIdAndDept(cache.getUserId(), cache.getComId());
} else {
user = userService.selectUserByIdAndDept(cache.getUserId(), cache.getActiveProjectId());
}
}
user.setActiveComId(cache.getComId());
user.setActiveComName(cache.getComName());
user.setActiveProjectId(cache.getActiveProjectId());
user.setActiveProjectName(cache.getActiveProjectName());
// 角色集合 // 角色集合
Set<String> roles = permissionService.getRolePermission(user); Set<String> roles = permissionService.getRolePermission(user);
// 权限集合 // 权限集合

View File

@ -9,6 +9,15 @@ export function listBusTrainingVideo(query) {
}) })
} }
// 统计培训视频列表
export function findBusTrainingVideo(query) {
return request({
url: '/manage/busTrainingVideo/findGroupByLevel',
method: 'get',
params: query
})
}
// 查询培训视频详细 // 查询培训视频详细
export function getBusTrainingVideo(id) { export function getBusTrainingVideo(id) {
return request({ return request({

View File

@ -498,7 +498,7 @@ function submitForm() {
let craftPostValues = []; let craftPostValues = [];
form.value.craftPost.forEach((item) => { form.value.craftPost.forEach((item) => {
if(craftTypeValues.indexOf(item[0])<0){ if(craftTypeValues.indexOf(item[0])<0){
craftTypeValues.push(item[0]) craftTypeValues.push(item[0]);
} }
craftPostValues.push(item[1]); craftPostValues.push(item[1]);
}); });
@ -626,8 +626,8 @@ function initPage() {
} }
} }
/** 初始化岗位 */
function initPost() { function initPost() {
//
let craftTypeDatas=pro_craft_type._object.pro_craft_type; let craftTypeDatas=pro_craft_type._object.pro_craft_type;
let craftPostDatas=pro_craft_post._object.pro_craft_post; let craftPostDatas=pro_craft_post._object.pro_craft_post;
craftTypeDatas.forEach(item =>{ craftTypeDatas.forEach(item =>{
@ -654,7 +654,7 @@ getList();
<style lang="scss" scope> <style lang="scss" scope>
.gap-2{ .gap-2{
.el-tag--default{ .el-tag--default{
margin:3px 4px; margin:2px 3px;
} }
} }
.el-divider__text{ .el-divider__text{

View File

@ -1,34 +1,25 @@
<template> <template>
<div class="app-container bus-training-video-index"> <div class="app-container bus-training-video-index">
<el-row :gutter="20">
<!--部门数据-->
<el-col :span="6" :xs="24" v-if="1==2">
<div class="head-container">
<el-input v-model="deptName" placeholder="请输入部门名称" clearable prefix-icon="Search"
style="margin-bottom: 20px" />
</div>
<div class="head-container">
<el-tree :data="deptOptions" :props="{ label: 'label', children: 'children' }" :expand-on-click-node="false"
:filter-node-method="filterNode" ref="deptTreeRef" node-key="id" highlight-current accordion
:default-expanded-keys="defaultEK" @node-click="handleNodeClick" />
</div>
</el-col>
<el-col :span="24" :xs="24">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="文件名称" prop="trainTitle"> <el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentProId">
<el-input
v-model="queryParams.projectName"
placeholder="请输入项目名称"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="培训名称" prop="trainTitle">
<el-input v-model="queryParams.trainTitle" placeholder="请输入培训名称" clearable @keyup.enter="handleQuery" /> <el-input v-model="queryParams.trainTitle" placeholder="请输入培训名称" clearable @keyup.enter="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item label="教育级别" prop="trainLevel"> <el-form-item label="培训类型" prop="trainType">
<el-select v-model="queryParams.trainLevel" placeholder="请选择培训级别" clearable> <el-select v-model="queryParams.trainType" placeholder="请选择培训类型" clearable>
<el-option v-for="dict in edu_train_level" :key="dict.value" :label="dict.label" :value="dict.value" /> <el-option v-for="dict in edu_train_type" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="工种" v-if="queryParams.trainLevel==4" prop="craftType" className="fitem-craft-type el-form-item el-form-item--default asterisk-left"> <el-form-item label="工种岗位" prop="craftPost">
<el-select v-model="queryParams.craftType" placeholder="请选择工种类型" clearable @change="getQueryCraftPost"> <el-select v-model="queryParams.craftPost" placeholder="请选择工种岗位" clearable>
<el-option v-for="dict in pro_craft_type" :key="dict.value" :label="dict.label" :value="dict.value" /> <el-option v-for="dict in pro_craft_post" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
<el-select style="margin-left:10px;" v-model="queryParams.craftPost" placeholder="请选择工种岗位" clearable>
<el-option v-for="dict in data.queryCraftPostList" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -42,7 +33,6 @@
<el-button type="primary" plain icon="Plus" @click="handleAdd" <el-button type="primary" plain icon="Plus" @click="handleAdd"
v-hasPermi="['manage:busTrainingVideo:add']">新增</el-button> v-hasPermi="['manage:busTrainingVideo:add']">新增</el-button>
</el-col> </el-col>
<!--
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate" <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate"
v-hasPermi="['manage:busTrainingVideo:edit']">修改</el-button> v-hasPermi="['manage:busTrainingVideo:edit']">修改</el-button>
@ -55,124 +45,137 @@
<el-button type="warning" plain icon="Download" @click="handleExport" <el-button type="warning" plain icon="Download" @click="handleExport"
v-hasPermi="['manage:busTrainingVideo:export']">导出</el-button> v-hasPermi="['manage:busTrainingVideo:export']">导出</el-button>
</el-col> </el-col>
-->
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-tabs
v-model="queryParams.trainLevel"
type="card"
class="demo-tabs"
@tab-change="getList"
>
<el-tab-pane :label="'公司级('+tabs.gsj+''" name="2" />
<el-tab-pane :label="'项目级('+tabs.xmj+''" name="3" />
<el-tab-pane :label="'班组级('+tabs.bzj+''" name="4" />
</el-tabs>
<el-table v-loading="loading" :data="busTrainingVideoList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="busTrainingVideoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="部门" align="center" prop="deptName" /> <el-table-column label="所属公司" align="center" prop="comName" width="120" :show-overflow-tooltip="true">
<el-table-column label="归属模块" align="center" prop="trainType">
<template #default="scope"> <template #default="scope">
<dict-tag :options="video_module" :value="scope.row.trainType" /> <span v-if="scope.row.comId">{{scope.row.comName}}</span>
<span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="培训级别" align="center" prop="trainLevel"> <el-table-column label="项目名称" align="center" prop="projectName" width="120" :show-overflow-tooltip="true">
<template #default="scope">
<span v-if="scope.row.projectId">{{scope.row.projectName}}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="培训名称" align="center" prop="trainTitle"/>
<el-table-column label="培训类型" align="center" prop="trainType" width="120">
<template #default="scope">
<dict-tag :options="edu_train_type" :value="scope.row.trainType" />
</template>
</el-table-column>
<el-table-column label="培训级别" align="center" prop="trainLevel" width="100">
<template #default="scope"> <template #default="scope">
<dict-tag :options="edu_train_level" :value="scope.row.trainLevel" /> <dict-tag :options="edu_train_level" :value="scope.row.trainLevel" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="工种" align="center" width="300"> <el-table-column label="工种岗位" align="center" width="450">
<template #default="scope"> <template #default="scope">
<dict-tag :options="pro_craft_type" :value="scope.row.craftType" /> <div v-if="scope.row.craftPost" class="flex gap-2">
<dict-tag :options="pro_craft_post" :value="scope.row.craftPost" /> <el-tag
v-for="dict in pro_craft_post"
v-show="scope.row.craftPost.indexOf(dict.value)>-1"
effect="dark"
>
{{ dict.label }}
</el-tag>
</div>
<div v-if="!scope.row.craftPost">-</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="视频路径" align="center" prop="videoUrl" width="200px"> <el-table-column label="是否启用" align="center" prop="isDel" width="88">
<template #default="scope"> <template #default="scope">
<video height="80" width="200" controls :key="scope.row.trainFilePath" v-if="scope.row.trainFilePath"> <el-tooltip :content="scope.row.isDel == 0 ? '启用' : '停用'" placement="top">
<source :src="scope.row.trainFilePath" type="video/mp4"/> <el-switch
您的浏览器不支持Video标签 :active-value="parseInt(0)"
</video> :inactive-value="parseInt(1)"
v-model="scope.row.isDel"
:disabled="scope.row.disabledState"
@change="setStatus($event, scope.row)"
/>
</el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="培训文件时长" align="center" prop="trainFileTimes"> <el-table-column label="培训时长" align="center" prop="palyTimes" width="80">
<template #default="scope">{{ scope.row.trainFileTimes }}</template> <template #default="scope">{{ scope.row.palyTimes }}</template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="创建时间" align="center" prop="createTime" width="120">
<template #default="scope"> <template #default="scope">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" fixed="right" width="150" class-name="small-padding fixed-width">
<template #default="scope">
<el-button v-if="!scope.row.disabledState" link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
v-hasPermi="['manage:busTrainingVideo:edit']">修改</el-button> v-hasPermi="['manage:busTrainingVideo:edit']">修改</el-button>
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" <el-button v-if="!scope.row.disabledState" link type="primary" icon="Delete" @click="handleDelete(scope.row)"
v-hasPermi="['manage:busTrainingVideo:remove']">删除</el-button> v-hasPermi="['manage:busTrainingVideo:remove']">删除</el-button>
<el-button v-if="scope.row.disabledState" type="danger" link disabled>-</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
@pagination="getList" /> @pagination="getList" />
</el-col>
</el-row>
<!-- 添加或修改培训视频对话框 --> <!-- 添加或修改培训视频对话框 -->
<el-dialog :title="title" v-model="open" width="500px" append-to-body :close-on-click-modal="false" :close-on-press-escape="false" class="bus-training-video-dlg"> <el-dialog :title="title" v-model="open" width="680px" append-to-body modal-class="bus-training-video-dlg">
<el-form ref="busTrainingVideoRef" :model="form" :rules="rules" label-width="80px"> <el-form ref="busTrainingVideoRef" :model="form" :rules="rules" label-width="80px">
<el-form-item label="归属公司" prop="deptId"> <el-form-item label="所属公司" v-if="form.comId">
<el-input v-model="form.compName" disabled/> <el-tag effect="plain">{{ form.comName }}</el-tag>
</el-form-item> </el-form-item>
<el-form-item label="归属模块" prop="trainType"> <el-form-item label="项目名称" v-if="form.projectId && form.trainLevel && form.trainLevel!='1'" >
<el-select v-model="form.trainType" placeholder="请选择培训类型"> <el-tag effect="plain">{{ form.projectName }}</el-tag>
<el-option v-for="dict in video_module" :key="dict.value" :label="dict.label" </el-form-item>
<el-form-item label="培训类型" prop="trainType">
<el-select v-model="form.trainType" placeholder="请选择培训类型" style="width:100%">
<el-option v-for="dict in edu_train_type" :key="dict.value" :label="dict.label"
:value="dict.value"></el-option> :value="dict.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="文件名称" prop="trainTitle"> <el-form-item label="培训名称" prop="trainTitle">
<el-input v-model="form.trainTitle" placeholder="请输入培训名称" /> <el-input v-model="form.trainTitle" placeholder="请输入培训名称" maxlength="64" show-word-limit />
</el-form-item> </el-form-item>
<el-form-item label="教育级别" prop="trainLevel"> <el-form-item label="培训级别" prop="trainLevel">
<el-select v-model="form.trainLevel" placeholder="请选择培训级别"> <el-select v-model="form.trainLevel" placeholder="请选择培训级别" @change="trainLevelChange" style="width:100%">
<el-option v-for="dict in edu_train_level" :key="dict.value" :label="dict.label" <el-option v-for="dict in data.eduTrainLevelList" :key="dict.value" :label="dict.label"
:value="dict.value"></el-option> :value="dict.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-row v-if="form.trainLevel==4"> <el-form-item label="工种岗位" prop="craftPost">
<el-col :span="12"> <el-cascader
<el-form-item label="归属工种" prop="craftType"> v-model="form.craftPost"
<el-select v-model="form.craftType" placeholder="请选择工种类型" @change="getCraftPost"> :options="craftPostOptions"
<el-option v-for="dict in pro_craft_type" :key="dict.value" :label="dict.label" :props="casProps"
:value="dict.value"></el-option> style="width: 100%"
</el-select> placeholder="请选择工种岗位"
/>
</el-form-item> </el-form-item>
</el-col> <el-form-item label="播放时长" prop="palyTimes">
<el-col :span="12" class="no-form-label" style="padding-left:10px;"> <el-input v-model.number="form.palyTimes" placeholder="请输入播放时长" maxlength="8" show-word-limit/>
<el-form-item label="no" prop="craftPost">
<el-select v-model="form.craftPost" placeholder="请选择工种岗位">
<el-option v-for="dict in data.craftPostList" :key="dict.value" :label="dict.label"
:value="dict.value"></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> <el-form-item label="播放排序" prop="sortBy">
</el-row> <el-input v-model.number="form.sortBy" placeholder="请输入播放排序" maxlength="8" show-word-limit/>
<el-form-item label="显示排序" prop="ord">
<el-input-number v-model="form.ord" controls-position="right" :min="0" style="width:160px;"/>
</el-form-item> </el-form-item>
<el-form-item label="视频时长" prop="trainFileTimes"> <el-form-item label="培训视频" prop="trainFilePath">
<el-input v-model="form.trainFileTimes" placeholder="请输入视频时长" style="width:180px;"> <file-upload v-model="form.trainFilePath" :limit="1" :fileType="['mp4']" :fileSize="500" />
<template #append></template>
</el-input>
</el-form-item> </el-form-item>
<el-form-item label="培训文件类型" prop="trainFileType"> <el-form-item label="视频主图" prop="trainFileImage">
<el-input v-model="form.trainFileType" type="textarea" placeholder="请输入内容" /> <file-upload v-model="form.trainFileImage" :limit="1" :fileType="['jpg','jpeg','png']" />
</el-form-item>
<el-form-item label="培训文件主图" prop="trainFileImage">
<image-upload v-model="form.trainFileImage" />
</el-form-item>
<el-form-item label="培训文件时长" prop="trainFileTimes">
<el-input v-model="form.trainFileTimes" placeholder="请输入培训文件时长" />
</el-form-item>
<el-form-item label="删除标识" prop="isDel">
<el-select v-model="form.isDel" placeholder="请选择删除标识">
<el-option v-for="dict in sys_is_del" :key="dict.value" :label="dict.label"
:value="parseInt(dict.value)"></el-option>
</el-select>
</el-form-item>
<el-form-item label="视频文件" prop="trainFilePath" :class="form.trainFilePath?'has-video':'no-video'" class="fitem-video">
<file-upload v-model="form.trainFilePath" :limit="1" :fileType="['mp4']" :fileSize="100"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<template #footer> <template #footer>
@ -186,11 +189,10 @@
</template> </template>
<script setup name="BusTrainingVideo"> <script setup name="BusTrainingVideo">
import { listBusTrainingVideo, getBusTrainingVideo, delBusTrainingVideo, addBusTrainingVideo, updateBusTrainingVideo } from "@/api/manage/busTrainingVideo"; import { listBusTrainingVideo, findBusTrainingVideo, getBusTrainingVideo, delBusTrainingVideo, addBusTrainingVideo, updateBusTrainingVideo } from "@/api/manage/busTrainingVideo";
import { deptTreeSelect } from "@/api/system/user";
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const { edu_train_level, edu_train_type, pro_craft_type, sys_is_del, pro_craft_post,video_module } = proxy.useDict('edu_train_level', 'edu_train_type', 'pro_craft_type', 'sys_is_del', 'pro_craft_post','video_module'); const { edu_train_level, edu_train_type, pro_craft_type, sys_is_del, pro_craft_post } = proxy.useDict('edu_train_level', 'edu_train_type', 'pro_craft_type', 'sys_is_del', 'pro_craft_post');
const busTrainingVideoList = ref([]); const busTrainingVideoList = ref([]);
const open = ref(false); const open = ref(false);
@ -201,35 +203,32 @@ const single = ref(true);
const multiple = ref(true); const multiple = ref(true);
const total = ref(0); const total = ref(0);
const title = ref(""); const title = ref("");
const deptOptions = ref(undefined); const tabs = ref({'gsj':0,'xmj':0,'bzj':0});
const deptName = ref(""); const activeName = ref("gsj");
const defaultEK = ref([100]); const craftPostOptions = ref([]);
const data = reactive({ const data = reactive({
form: {}, form: {},
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
deptId: null, comId: null,
projectId: null, projectId: null,
projectName: null,
trainTitle: null, trainTitle: null,
trainType: null, trainType: null,
trainLevel: null, trainLevel: '2',
craftType: null,
craftPost: null, craftPost: null,
trainFileType: null,
isDel: null, isDel: null,
}, },
rules: { rules: {
deptId:[{ required: true, message: "归属公司不能为空", trigger: "blur" }], trainType:[{ required: true, message: "培训类型不能为空", trigger: "blur" }],
trainType:[{ required: true, message: "归属模块不能为空", trigger: "blur" }], trainTitle:[{ required: true, message: "培训名称不能为空", trigger: "blur" }],
trainTitle:[{ required: true, message: "文件名称不能为空", trigger: "blur" }], trainLevel:[{ required: true, message: "培训级别不能为空", trigger: "blur" }],
trainLevel:[{ required: true, message: "教育级别不能为空", trigger: "blur" }],
craftType:[{ required: true, message: "工种不能为空", trigger: "blur" }],
craftPost:[{ required: true, message: "工种岗位不能为空", trigger: "blur" }], craftPost:[{ required: true, message: "工种岗位不能为空", trigger: "blur" }],
ord:[{ required: true, message: "显示排序不能为空", trigger: "blur" }], sortBy:[{ required: true, message: "显示排序不能为空", trigger: "blur" },{ type: "number", message: "请输入数字类型", trigger: "blur" }],
trainFileTimes:[{ required: true, message: "视频时长不能为空", trigger: "blur" }], trainFilePath:[{ required: true, message: "培训视频不能为空", trigger: "blur" }],
//trainFilePath:[{ required: true, message: "", trigger: "blur" }], trainFileImage:[{ required: true, message: "视频主图不能为空", trigger: "blur" }],
}, },
craftPostList:[], craftPostList:[],
queryCraftPostList:[] queryCraftPostList:[]
@ -238,14 +237,42 @@ const data = reactive({
const { queryParams, form, rules } = toRefs(data); const { queryParams, form, rules } = toRefs(data);
const userStore = useUserStore() const userStore = useUserStore()
const casProps = {
value: "value",
label: "label",
multiple: true,
};
/** 查询培训视频列表 */ /** 查询培训视频列表 */
function getList() { function getList() {
loading.value = true; loading.value = true;
listBusTrainingVideo(queryParams.value).then(response => { listBusTrainingVideo(queryParams.value).then(response => {
response.rows.forEach(item => {
item.disabledState = initRowDisabled(item);
})
busTrainingVideoList.value = response.rows; busTrainingVideoList.value = response.rows;
total.value = response.total; total.value = response.total;
loading.value = false; loading.value = false;
}); });
findCount();
}
function findCount() {
findBusTrainingVideo(queryParams.value).then(response => {
let countMap = {'gsj':0,'xmj':0,'bzj':0};
response.data.forEach(item =>{
if(item.trainLevel=='2'){
countMap.gsj = item.total;
}else if(item.trainLevel=='3'){
countMap.xmj = item.total;
}else if(item.trainLevel=='4'){
countMap.bzj = item.total;
}else{
//...
}
});
tabs.value = countMap;
});
} }
// //
@ -277,37 +304,12 @@ function reset() {
data.craftPostList=[] data.craftPostList=[]
} }
function getQueryCraftPost(){
let datas=pro_craft_post._object.pro_craft_post;
if(queryParams.value.craftType){
data.queryCraftPostList= datas.filter(d=>d.elTagClass==queryParams.value.craftType);
}else{
data.queryCraftPostList= [];
}
}
function getCraftPost(){
let datas=pro_craft_post._object.pro_craft_post;
console.log("dsds",datas)
if(form.value.craftType){
data.craftPostList= datas.filter(d=>d.elTagClass==form.value.craftType);
}else{
data.craftPostList= [];
}
}
/** 搜索按钮操作 */ /** 搜索按钮操作 */
function handleQuery() { function handleQuery() {
queryParams.value.pageNum = 1; queryParams.value.pageNum = 1;
getList(); getList();
} }
/** 节点单击事件 */
function handleNodeClick(data) {
queryParams.value.deptId = data.id;
handleQuery();
};
/** 重置按钮操作 */ /** 重置按钮操作 */
function resetQuery() { function resetQuery() {
proxy.resetForm("queryRef"); proxy.resetForm("queryRef");
@ -323,7 +325,15 @@ function handleSelectionChange(selection) {
/** 新增按钮操作 */ /** 新增按钮操作 */
function handleAdd() { function handleAdd() {
if(!userStore.currentComId){
proxy.$modal.msgWarning("请切换到项目数据!!!");
open.value = false;
return false;
}
reset(); reset();
initPost();
form.value.comId = userStore.currentComId;
form.value.comName = userStore.currentComName;
open.value = true; open.value = true;
title.value = "添加培训视频"; title.value = "添加培训视频";
} }
@ -331,6 +341,7 @@ function handleAdd() {
/** 修改按钮操作 */ /** 修改按钮操作 */
function handleUpdate(row) { function handleUpdate(row) {
reset(); reset();
initPost();
const _id = row.id || ids.value const _id = row.id || ids.value
getBusTrainingVideo(_id).then(response => { getBusTrainingVideo(_id).then(response => {
form.value = response.data; form.value = response.data;
@ -339,12 +350,40 @@ function handleUpdate(row) {
}); });
} }
/** 培训级别操作 */
function trainLevelChange(){
if(form.value.trainLevel){
if(form.value.trainLevel=='3' || form.value.trainLevel=='4'){
if(!userStore.currentProId){
proxy.$modal.msgWarning("请切换到项目数据!!!");
open.value = false;
return false;
}else{
form.value.projectId = userStore.currentProId;
form.value.projectName = userStore.currentProName;
}
}else{
form.value.projectId = null;
form.value.projectName = null;
}
}
}
/** 提交按钮 */ /** 提交按钮 */
function submitForm() { function submitForm() {
proxy.$refs["busTrainingVideoRef"].validate(valid => { proxy.$refs["busTrainingVideoRef"].validate(valid => {
if (valid) { if (valid) {
let path=form.value.trainFilePath; form.value.remark = JSON.stringify(form.value.craftPost);
form.value.trainFilePath=path.substring( path.indexOf("/statics/")); let craftTypeValues = [];
let craftPostValues = [];
form.value.craftPost.forEach((item) => {
if(craftTypeValues.indexOf(item[0])<0){
craftTypeValues.push(item[0]);
}
craftPostValues.push(item[1]);
});
form.value.craftType = craftTypeValues.toString();
form.value.craftPost = craftPostValues.toString();
if (form.value.id != null) { if (form.value.id != null) {
updateBusTrainingVideo(form.value).then(response => { updateBusTrainingVideo(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功"); proxy.$modal.msgSuccess("修改成功");
@ -362,6 +401,28 @@ function submitForm() {
}); });
} }
/** 启用状态滑块控制 */
function setStatus(val, row) {
proxy.$modal
.confirm(`是否确认${val == 0 ? "启用" : "停用"}当前数据项?`)
.then(function () {
let param = {'id': row.id, 'isDel': val};
return updateBusTrainingVideo(param);
})
.then(() => {
getList();
proxy.$modal.msgSuccess("修改成功");
})
.catch(() => {
//
if (val == 0) {
row.isDel = 1;
} else {
row.isDel = 0;
}
});
}
/** 删除按钮操作 */ /** 删除按钮操作 */
function handleDelete(row) { function handleDelete(row) {
const _ids = row.id || ids.value; const _ids = row.id || ids.value;
@ -379,26 +440,58 @@ function handleExport() {
...queryParams.value ...queryParams.value
}, `busTrainingVideo_${new Date().getTime()}.xlsx`) }, `busTrainingVideo_${new Date().getTime()}.xlsx`)
} }
/** 通过条件过滤节点 */
const filterNode = (value, data) => { /** 初始化行标识 */
if (!value) return true; function initRowDisabled(row) {
return data.label.indexOf(value) !== -1; let roles = userStore.roles;
}; if(roles.includes("admin")){
/** 根据名称筛选部门树 */ return false;
watch(deptName, val => { }else if(roles.includes("gsAdmin") && row.comId){
proxy.$refs["deptTreeRef"].filter(val); return false;
}else if(row.projectId){
return false;
}else{
return true;
}
}
/** 初始化岗位 */
function initPost() {
let craftTypeDatas=pro_craft_type._object.pro_craft_type;
let craftPostDatas=pro_craft_post._object.pro_craft_post;
craftTypeDatas.forEach(item =>{
item.children = craftPostDatas.filter(deatil=>deatil.elTagClass==item.value);
}); });
/** 查询部门下拉树结构 */ console.log("DEFAULT" , craftTypeDatas);
function getDeptTree() { craftPostOptions.value = craftTypeDatas;
deptTreeSelect().then(response => { initTrainLevel();
deptOptions.value = response.data; }
});
}; function initTrainLevel() {
let datas=edu_train_level._object.edu_train_level;
let roles = userStore.roles;
if(roles.includes("admin") || roles.includes("gsAdmin")){
//
data.eduTrainLevelList = datas;
}else{
data.eduTrainLevelList = datas.filter(detail=>detail.value!='2');
}
}
getList(); getList();
getDeptTree();
</script> </script>
<style lang="scss"> <style lang="scss">
.gap-2{
.el-tag--default{
margin:2px 3px;
}
}
.bus-training-video-dlg{
.el-dialog__body{
overflow: auto;
max-height: 680px;
}
}
.bus-training-video-index{ .bus-training-video-index{
.fitem-craft-type{ .fitem-craft-type{
.el-select{ .el-select{

View File

@ -1,50 +1,18 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="部门主键" prop="deptId"> <el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentProId">
<el-input <el-input
v-model="queryParams.deptId" v-model="queryParams.projectName"
placeholder="请输入部门主键" placeholder="请输入项目名称"
clearable clearable
@keyup.enter="handleQuery" @keyup.enter="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="项目主键" prop="projectId"> <el-form-item label="用户账号" prop="userName">
<el-input <el-input
v-model="queryParams.projectId" v-model="queryParams.userName"
placeholder="请输入项目主键" placeholder="请输入用户账号"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="用户主键" prop="userId">
<el-input
v-model="queryParams.userId"
placeholder="请输入用户主键"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="视频主键" prop="videoId">
<el-input
v-model="queryParams.videoId"
placeholder="请输入视频主键"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="排序" prop="sortBy">
<el-input
v-model="queryParams.sortBy"
placeholder="请输入排序"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="删除标识" prop="isDel">
<el-input
v-model="queryParams.isDel"
placeholder="请输入删除标识"
clearable clearable
@keyup.enter="handleQuery" @keyup.enter="handleQuery"
/> />
@ -55,7 +23,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row v-if="false" :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="primary" type="primary"
@ -98,19 +66,22 @@
</el-row> </el-row>
<el-table v-loading="loading" :data="busTrainingVideoUserList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="busTrainingVideoUserList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column label="所属公司" align="center" prop="comName" />
<el-table-column label="主键" align="center" prop="id" /> <el-table-column label="项目名称" align="center" prop="projectName" />
<el-table-column label="部门主键" align="center" prop="deptId" /> <el-table-column label="用户账号" align="center" prop="userName" />
<el-table-column label="项目主键" align="center" prop="projectId" /> <el-table-column label="培训状态" align="center" prop="playStatus" />
<el-table-column label="用户主键" align="center" prop="userId" /> <el-table-column label="培训排序" align="center" prop="sortBy" />
<el-table-column label="视频主键" align="center" prop="videoId" />
<el-table-column label="播放状态" align="center" prop="playStatus" /> <el-table-column label="培训时间" align="center" prop="createTime" width="120">
<el-table-column label="排序" align="center" prop="sortBy" /> <template #default="scope">
<el-table-column label="删除标识" align="center" prop="isDel" /> <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope"> <template #default="scope">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['manage:busTrainingVideoUser:edit']"></el-button> <el-button v-if="false" link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['manage:busTrainingVideoUser:edit']"></el-button>
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['manage:busTrainingVideoUser:remove']"></el-button> <el-button v-if="false" link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['manage:busTrainingVideoUser:remove']"></el-button>
<el-button type="danger" link disabled>-</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>