Commit 0bfab4d1 authored by 吴卿华's avatar 吴卿华

Merge remote-tracking branch 'origin/master'

parents ccc30842 a2bbdc18
......@@ -24,8 +24,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectTHiddenLibraryList" parameterType="THiddenLibrary" resultMap="THiddenLibraryResult">
<include refid="selectTHiddenLibraryVo"/>
<where>
<if test="deptId != null "> and dept_id = #{deptId}</if>
<if test="riskPoint != null and riskPoint != ''"> and risk_point like concat('%', #{riskPoint}, '%')</if>
<if test="deptId != null "> and h.dept_id = #{deptId}</if>
<if test="riskPoint != null and riskPoint != ''"> and h.risk_point like concat('%', #{riskPoint}, '%')</if>
</where>
</select>
......
......@@ -259,13 +259,13 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
this.$refs.Dia.title = "新增培训课程";
this.$refs.Dia.title = "新增考试试卷";
this.componentsNum = 1;
this.courseId = null;
this.dilogFlag = true;
},
changeLesson(courseId) {
this.$refs.Dia.title = "修改培训课程";
this.$refs.Dia.title = "修改考试试卷";
this.componentsNum = 1;
this.courseId = courseId;
this.dilogFlag = true;
......
......@@ -27,15 +27,16 @@
<div>
<div class="top">参与培训人员({{personnelOptions.length}})</div>
<div class="bottom">
<el-checkbox-group class="" v-model="infoData.postIds">
<!-- <el-checkbox-group class="" v-model="infoData.postIds"> -->
<el-checkbox
:disabled="!isActive"
v-model="personnel.ischeck"
v-for="personnel in personnelOptions"
:label="personnel.postId"
:key="personnel.postId"
>{{ personnel.postName }}</el-checkbox
>
</el-checkbox-group>
<!-- </el-checkbox-group> -->
</div>
</div>
</div>
......
<template>
<div class="form-wrapper">
<div style="width: 100%;height:100%;">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
<el-form-item label="培训名称" prop="name">
<el-input v-model="ruleForm.name"></el-input>
<el-form :model="contractTrainForm" :rules="rules" ref="contractTrainForm" label-width="100px" class="demo-ruleForm">
<el-form-item label="培训名称" prop="courseName">
<el-input v-model="contractTrainForm.courseName"></el-input>
</el-form-item>
<el-form-item label="培训内容" prop="region">
<el-input type="textarea" v-model="ruleForm.region" rows="5"></el-input>
<el-form-item label="培训内容" prop="courseConent">
<el-input type="textarea" v-model="contractTrainForm.courseConent" rows="5"></el-input>
</el-form-item>
<div class="flex">
<el-form-item label="视频上传" v-if="!readOnly" prop="video">
<FileUpload
listType="picture"
@resFun="getFileInfoVideo"
@remove="listRemoveVideo"
:fileArr="fileListVideo"
:fileSize="500"
:fileType="['mp4']"
/>
<el-input v-show="false" disabled v-model="contractTrainForm.video"></el-input>
</el-form-item>
<el-form-item label="附件上传" v-if="!readOnly" prop="enclosure">
<FileUpload
listType="picture"
@resFun="getFileInfoFile"
@remove="listRemoveFile"
:fileArr="fileListFile"
/>
<el-input v-show="false" disabled v-model="contractTrainForm.enclosure"></el-input>
</el-form-item>
</div>
</el-form>
</div>
<el-form>
<div class="flex">
<el-form-item label="视频上传" v-if="!readOnly" prop="video">
<FileUpload
listType="picture"
@resFun="getFileInfoVideo"
@remove="listRemoveVideo"
:fileArr="fileListVideo"
:fileSize="500"
:fileType="['mp4']"
/>
<el-input v-show="false" disabled v-model="form.video"></el-input>
</el-form-item>
<el-form-item label="附件上传" v-if="!readOnly" prop="enclosure">
<FileUpload
listType="picture"
@resFun="getFileInfoFile"
@remove="listRemoveFile"
:fileArr="fileListFile"
/>
<el-input v-show="false" disabled v-model="form.enclosure"></el-input>
</el-form-item>
</div>
</el-form>
<visitorQuestion></visitorQuestion>
<visitorQuestion ref="visitorQuestion"></visitorQuestion>
</div>
</template>
<script>
import FileUpload from "@/components/FileUpload";
import uploadfile from "@/assets/uploadfile.png";
import visitorQuestion from "@/views/educationPlanExam/visitorProgram/visitorQuestion";
// import visitorDia from "@/views/educationPlanExam/visitorProgram/visitorDia";
export default {
data() {
return {
ruleForm: {
name: '',
region: '',
},
form: {
video: "",
enclosure: "",
},
fileListVideo: [],
fileListFile: [],
readOnly: false,
rules: {
name: [
{ required: true, message: '请输入培训名称', trigger: 'blur' }
],
region: [
{ required: true, message: '请输入培训内容', trigger: 'change' }
],
video: [
{ required: true, trigger: "blue", message: "视频不能为空" }
],
enclosure: [
{ required: true, trigger: "blur", message: "附件不能为空" },
],
import FileUpload from "@/components/FileUpload";
import uploadfile from "@/assets/uploadfile.png";
import visitorQuestion from "@/views/educationPlanExam/visitorProgram/visitorQuestion";
import {listCourse} from "@/api/contractTrain/contractTrain";
export default {
data() {
return {
contractTrainForm: {
courseName: '',
courseConent: '',
video: "",
enclosure: "",
},
fileListVideo: [],
fileListFile: [],
readOnly: false,
rules: {
name: [
{ required: true, message: '请输入培训名称', trigger: 'blur' }
],
region: [
{ required: true, message: '请输入培训内容', trigger: 'change' }
],
video: [
{ required: true, trigger: "blue", message: "视频不能为空" }
],
enclosure: [
{ required: true, trigger: "blur", message: "附件不能为空" },
],
},
};
},
components: {
FileUpload,
visitorQuestion,
},
created() {
this.getContractTrainList();
},
methods: {
getContractTrainList(){
listCourse().then(res =>{
this.contractTrainForm = res.rows[0];
if(this.contractTrainForm.video){
this.fileListVideo = [
{
name: this.contractTrainForm.courseName + "视频",
url: uploadfile,
},
];
}
if(this.contractTrainForm.enclosure){
this.fileListFile = [
{
name: this.contractTrainForm.courseName + "附件",
url: uploadfile,
},
];
}
this.$refs.visitorQuestion.rightNum = this.contractTrainForm.qualifiedNum;
this.$refs.visitorQuestion.getContractTopicList(this.contractTrainForm.contractorCourseId)
})
},
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
alert('submit!');
} else {
console.log('error submit!!');
return false;
}
};
});
},
components: {
FileUpload,
visitorQuestion,
getFileInfoVideo(res) {
this.contractTrainForm.video = res.url;
this.fileListVideo = [
{
name: res.fileName,
url: uploadfile,
},
];
},
created() {
if (this.courseId) {
this.getLessonById();
}
listRemoveVideo(e) {
this.fileListVideo = [];
this.contractTrainForm.video = "";
// this.form.videoName = null;
},
getFileInfoFile(res) {
this.contractTrainForm.enclosure = res.url;
this.fileListFile = [
{
name: res.fileName,
url: uploadfile,
},
];
},
listRemoveFile(e) {
this.fileListFild = [];
this.contractTrainForm.enclosure = "";
// this.form.fileName = null;
},
methods: {
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
alert('submit!');
} else {
console.log('error submit!!');
return false;
}
});
},
getFileInfoVideo(res) {
this.form.video = res.url;
// this.form.videoName = res.fileName;
this.fileListVideo = [
{
name: res.fileName,
url: uploadfile,
},
];
},
listRemoveVideo(e) {
this.fileListVideo = [];
this.form.video = "";
// this.form.videoName = null;
},
getFileInfoFile(res) {
this.form.enclosure = res.url;
// this.form.enclosureName = res.fileName;
this.fileListFile = [
{
name: res.fileName,
url: uploadfile,
},
];
},
listRemoveFile(e) {
this.fileListFild = [];
this.form.enclosure = "";
// this.form.fileName = null;
},
}
}
</script>
}
</script>
<style lang="scss" scoped>
.form-wrapper {
padding-top: 30px;
......@@ -139,4 +153,4 @@ import visitorQuestion from "@/views/educationPlanExam/visitorProgram/visitorQue
justify-content: space-around;
padding: 20px 30px;
}
</style>
\ No newline at end of file
</style>
......@@ -240,7 +240,7 @@
<el-form-item label="任务范围" prop="workRange">
<el-input v-model="form.workRange" placeholder="请输入任务范围" />
</el-form-item>
<el-form-item label="排查库" >
<el-form-item label="排查库" prop="libraryId">
<!--<el-input v-model="form.deptId" placeholder="请输入部门id" />-->
<el-select v-model="form.libraryId" multiple filterable placeholder="请选择" @change="selectLibrary">
<el-option
......@@ -609,6 +609,9 @@ export default {
staffId: [
{ required: true, message: "责任人不能为空", trigger: "blur" }
],
libraryId: [
{required: true, message: "排查库不可为空", trigger: "change"}
],
// content: [
// { required: true, message: "排查内容不能为空", trigger: "blur" }
// ],
......@@ -700,6 +703,7 @@ export default {
workId: null,
parentId: null,
bookId: null,
libraryId: null,
workCycle: null,
workName: null,
workType: null,
......
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