Commit 6dd9048d authored by lizhichao's avatar lizhichao

培训考试添加主讲人、所属部门

parent 290f5142
......@@ -60,7 +60,7 @@ public class TStaningBookController extends BaseController
{
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
SysUser user = loginUser.getUser();
startPage();
// startPage();
List<TStaningBook> list = tStaningBookService.selectTStaningBookList(tStaningBook,user.getRoles().get(0).getRoleId());
ExcelUtil<TStaningBook> util = new ExcelUtil<TStaningBook>(TStaningBook.class);
return util.exportExcel(list, "隐患台账数据");
......
......@@ -69,7 +69,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="findTime != null "> and b.find_time &gt; #{findTime}</if>
<if test="rectificationTime != null "> and b.find_time &lt; #{rectificationTime}</if>
<if test="state != null "> and b.state = #{state}</if>
<if test="deptId != null "> and b.dept_id = #{deptId}</if>
</where>
order by create_time desc
</select>
<select id="selectTStaningBookById" parameterType="Long" resultMap="TStaningBookResult">
......
......@@ -78,7 +78,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="testStartTime != null "> and test_start_time = #{testStartTime}</if>
<if test="testEndTime != null "> and test_end_time = #{testEndTime}</if>
<if test="testPersons != null and testPersons != ''"> and test_persons = #{testPersons}</if>
<if test="zhujiang != null and zhujiang != ''"> and zhujiang like concat('%', #{zhujiang}, '%')</if>
<if test="deptId != null and deptId != ''"> and deptid = #{deptId}</if>
</where>
order by create_time desc
</select>
<select id="selectTTrainCourseById" parameterType="Long" resultMap="TTrainCourseResult">
......
......@@ -6,6 +6,17 @@
:inline="true"
label-width="68px"
>
<el-form-item label="培训部门" prop="deptId">
<treeselect v-model="queryParams.deptId" style="width: 220px;" :options="deptOptions" :show-count="true" placeholder="请选择培训部门" />
</el-form-item>
<el-form-item label="主讲人" prop="courseName">
<el-input
v-model="queryParams.zhujiang"
placeholder="请输入主讲人"
clearable
size="small"
/>
</el-form-item>
<el-form-item label="培训计划" prop="courseType">
<el-select
v-model="queryParams.courseType"
......@@ -21,24 +32,24 @@
/>
</el-select>
</el-form-item>
<el-form-item label="课程名称" prop="courseName">
<el-form-item label="课程标题" prop="courseName">
<el-input
v-model="queryParams.courseName"
placeholder="请输入课程名称"
placeholder="请输入课程标题"
clearable
size="small"
/>
</el-form-item>
<el-form-item label="发布时间" prop="releaseTime">
<el-date-picker
v-model="queryParams.releaseTime"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
placeholder="选择日期时间"
default-time="12:00:00"
>
</el-date-picker>
</el-form-item>
<!-- <el-form-item label="发布时间" prop="releaseTime">-->
<!-- <el-date-picker-->
<!-- v-model="queryParams.releaseTime"-->
<!-- value-format="yyyy-MM-dd HH:mm:ss"-->
<!-- type="datetime"-->
<!-- placeholder="选择日期时间"-->
<!-- default-time="12:00:00"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<el-form-item>
<el-button
......@@ -288,13 +299,15 @@ import {
// 获取培训计划
import { getPlanList } from "@/api/educationPlanExam/trainingProgram";
import { mapGetters, mapMutations } from "vuex";
import { treeselect } from "@/api/system/dept";
import Dia from "./components/Dia";
import Treeselect from "@riophae/vue-treeselect";
export default {
name: "Book",
components: {
Dia,
Treeselect
},
data() {
return {
......@@ -334,6 +347,8 @@ export default {
courseId: null,
// false为编辑,true为查看,查看不允许编辑的时候
checkLock: false,
// 部门树选项
deptOptions: undefined,
};
},
computed: {
......@@ -351,6 +366,7 @@ export default {
created() {
this.getPlanList();
this.getList();
this.getTreeselect();
},
methods: {
......@@ -368,7 +384,13 @@ export default {
this.setOptions(courseOptions);
});
},
/** 查询部门下拉树结构 */
getTreeselect() {
treeselect().then(response => {
console.log('部门树返回值')
this.deptOptions = response.data;
});
},
/** 查询课程列表 */
getList() {
this.loading = true;
......
......@@ -524,7 +524,7 @@
<!-- </el-form-item>-->
<el-form-item label="角色">
<el-select v-model="form.roleIds" multiple placeholder="请选择">
<el-select v-model="form.roleId" placeholder="请选择">
<el-option
v-for="item in roleOptions"
:key="item.roleId"
......@@ -861,6 +861,7 @@ export default {
});
getStaff(staffId).then(response => {
this.form = response.data;
console.log("form",response.data)
this.postOptions = response.posts;
if (this.form.certificateUrl) {
this.fileList.push({
......
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="责任部门" prop="deptId">
<treeselect v-model="queryParams.deptId" style="width: 220px;" :options="deptOptions" :show-count="true" placeholder="请选择培训部门" />
</el-form-item>
<el-form-item label="隐患名称" prop="troubleName">
<el-input
v-model="queryParams.troubleName"
......@@ -847,17 +850,19 @@
</template>
<script>
import { } from "@/api/system/dept";
import MyFileUpload from '@/components/MyFileUpload';
import FileUpload from '@/components/FileUpload';
import { listBook, getBook, delBook, addBook, updateBook, exportBook } from "@/api/system/book";
import { listDept } from "@/api/system/dept";
import { listDept,treeselect } from "@/api/system/dept";
import { listAllStaff } from "@/api/safetyManagement/staff";
import { getUserProfile } from "@/api/system/user";
import Treeselect from "@riophae/vue-treeselect";
let uploadfile = require("@/assets/uploadfile.png");
export default {
name: "Book",
components: {
MyFileUpload,FileUpload
MyFileUpload,FileUpload,Treeselect
},
data() {
return {
......@@ -960,6 +965,7 @@ export default {
this.getList();
this.getDeptList();
this.getStaffList();
this.getTreeselect();
this.getDicts("t_trouble_type").then(response => {
this.troubleTypeOptions = response.data;
});
......@@ -971,6 +977,12 @@ export default {
});
},
methods: {
/** 查询部门下拉树结构 */
getTreeselect() {
treeselect().then(response => {
this.deptOptions = response.data;
});
},
/** 查询隐患台账列表 */
getList() {
this.loading = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment