Prechádzať zdrojové kódy

Merge branch 'master' of http://121.28.134.38:2039/yuhuitao/bjjxjy-ui into wxd

wxd 10 mesiacov pred
rodič
commit
38837891fe

+ 44 - 0
src/api/jianliyuan/index.js

@@ -17,4 +17,48 @@ export function getClassList(data){
 		url:"/system/Class/curriculumList",
 		params:data
 	})
+}
+
+
+//保存用户观看记录
+export function saveRecord(data){
+	return request({
+		url:"/system/ClassVideo/recordVideo",
+		data:data,
+		method:"post"
+	})
+}
+
+
+//查询试卷详情
+export function getSjContent(id){
+	return request({
+		url:"/system/PaperInfo/rencaiPaper?personId="+id, 
+	})
+}
+
+
+//提交考试结果
+export function submitDaan(data){
+	return request({
+		url:"/system/PaperInfo/submitRencaiPaper",
+		data:data,
+		method:"post"
+	})
+}
+
+
+//查询考试记录
+export function getKsList(){
+	return request({
+		url:"/system/PaperInfo/paperReancaiList"
+	})
+}
+
+
+//查询考过的试卷详情
+export function getFinishSjInfo(id){
+	return request({
+		url:"/system/PaperInfo/rencaiPaperInfo?UserScoreID="+id
+	})
 }

+ 0 - 1
src/main.js

@@ -50,7 +50,6 @@ import "vue-video-player/src/custom-theme.css";
 
 import Subheading from "@/components/Subheading";
 
-console.log(VideoPlayer);
 
 Vue.use(VideoPlayer);
 

+ 584 - 1
src/views/components/baoming/jlgcs.vue

@@ -1,8 +1,591 @@
 <template>
+	<div>
+		<el-form ref="classForm" label-position="left" label-width="120px" :model="classForm" :rules="classRules">
+			<el-row :gutter="40">
+				<el-col :span="24">
+					<div style="background-color: #eee;font-weight: bold;text-align: center;font-size: 16px;"
+						class="pd-10 m-b-10">
+						<!-- 2024年第四期铁路监理工程师网络继续教育(土建专业) -->
+						{{info.TrainName}}
+					</div>
+				</el-col>
+				<el-col :span="24">
+					<div class="formTitle m-b-20">
+						企业信息
+					</div>
+				</el-col>
+				<el-col :span="16">
+					<el-form-item label="企业名称" prop="qiye.qyinfo">
+						<el-select v-model="classForm.qiye.qyinfo" filterable remote reserve-keyword clearable
+							placeholder="请输入企业名称" :remote-method="remoteMethod" :loading="loading" @change="chooseQy">
+							<el-option v-for="(item,index) in options" :key="item.id" :label="item.qyname"
+								:value="index">
+							</el-option>
+						</el-select>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="联系人姓名" prop="name">
+						<el-input v-model="classForm.qiye.name" readonly type="text" auto-complete="off"
+							placeholder="请输入联系人姓名"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="联系人电话" prop="photo">
+						<el-input v-model="classForm.qiye.photo" readonly type="text" auto-complete="off"
+							placeholder="请输入联系人电话"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="邮政编码" prop="yzbm">
+						<el-input v-model="classForm.qiye.yzbm" type="text" readonly auto-complete="off"
+							placeholder="请输入邮政编码"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="考试地点" prop="lxryx">
+						<el-input v-model="classForm.qiye.lxryx" type="text" readonly auto-complete="off"
+							placeholder="请输入考试地点"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="电子邮箱" prop="lxryx">
+						<el-input v-model="classForm.qiye.lxryx" type="text" readonly auto-complete="off"
+							placeholder="请输入电子邮箱"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="24">
+					<div class="formTitle m-b-20">
+						监理工程师信息
+					</div>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="姓名" >
+						<el-input v-model="classForm.renCai.Name" type="text" readonly auto-complete="off"
+							placeholder="请输入姓名"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="性别" > 
+						<el-select v-model="classForm.renCai.Sex" clearable readonly placeholder="请输入企业名称">
+							<el-option label="男" value="男">
+								男
+							</el-option>
+							<el-option label="女" value="女">
+								女
+							</el-option>
+						</el-select>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="身份证号" prop="renCai.ShenFenZheng">
+						<el-input v-model="classForm.renCai.ShenFenZheng" type="text" @blur="searchPerson" auto-complete="off"
+							placeholder="请输入身份证号"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="民族" prop="renCai.ShenFenZheng">
+						<el-input v-model="classForm.renCai.ShenFenZheng" type="text" @blur="searchPerson" auto-complete="off"
+							placeholder="请输入民族"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="联系电话" prop="renCai.Phone">
+						<el-input v-model="classForm.renCai.Phone" type="text" auto-complete="off"
+							placeholder="请输入联系电话"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="职称" prop="ZhiCheng">
+						<el-input v-model="classForm.ZhiCheng" type="text" auto-complete="off"
+							placeholder="请输入职称"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="职称专业" prop="ZhiCheng">
+						<el-input v-model="classForm.ZhiCheng" type="text" auto-complete="off"
+							placeholder="请输入职称专业"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="职称评定时间">
+						<!-- <el-input v-model="classForm.qyname" type="text" auto-complete="off"
+							placeholder="请输入证书有效期"></el-input> -->
+						<el-date-picker v-model="classForm.renCai.JLYxqz" readonly type="date" placeholder="选择日期时间"> </el-date-picker>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="专业工作年限" prop="ZhiCheng">
+						<el-input v-model="classForm.ZhiCheng" type="text" auto-complete="off"
+							placeholder="请输入工作年限"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="监理工作年限" prop="ZhiCheng">
+						<el-input v-model="classForm.ZhiCheng" type="text" auto-complete="off"
+							placeholder="请输入工作年限"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="职务" prop="renCai.Phone">
+						<el-input v-model="classForm.renCai.Phone" type="text" auto-complete="off"
+							placeholder="请输入职务"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="16">
+					<el-form-item label="毕业证院校" prop="byyx">
+						<el-input v-model="classForm.byyx" type="text" auto-complete="off"
+							placeholder="请输入毕业证院"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="16">
+					<el-form-item label="毕业专业" prop="byyx">
+						<el-input v-model="classForm.byyx" type="text" auto-complete="off"
+							placeholder="请输入毕业专业"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="毕业时间">
+						<!-- <el-input v-model="classForm.qyname" type="text" auto-complete="off"
+							placeholder="请输入证书有效期"></el-input> -->
+						<el-date-picker v-model="classForm.renCai.JLYxqz" readonly type="date" placeholder="选择日期时间"> </el-date-picker>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="学历" prop="renCai.XueLi"> 
+						<el-select v-model="classForm.renCai.XueLi" placeholder="请选择学历" clearable>
+							<el-option v-for="dict in dict.type.jxjy_xl" :key="dict.value" :label="dict.label"
+								:value="dict.value" />
+						</el-select>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="培训专业" prop="renCai.XueLi"> 
+						<el-select v-model="classForm.renCai.XueLi" placeholder="请选择培训专业" clearable>
+							<el-option v-for="dict in dict.type.jxjy_xl" :key="dict.value" :label="dict.label"
+								:value="dict.value" />
+						</el-select>
+					</el-form-item>
+				</el-col>
+				<el-col :span="16">
+					<el-form-item label="考试地点" prop="byyx">
+						<el-input v-model="classForm.byyx" type="text" auto-complete="off"
+							placeholder="请输入考试地点"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="24">
+					<el-form-item label="工作简历" prop="yeji">
+						<el-input v-model="classForm.yeji" type="textarea" :rows="3" auto-complete="off"
+							placeholder="请输入新增简历工程师业绩"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="24">
+					<div class="formTitle m-b-20">
+						开票信息
+					</div>
+				</el-col>
+				<el-col :span="24">
+					<div style="color:#F56C6C;">
+						注意事项:发票均每人单独开出,在网络报名时,选择付款单位,选择付款单位后,发票将不能更换。开票信息为空的,请联系企业完善开票信息。
+					</div>
+					<div class="m-t-10">
+						<el-form-item label="发票抬头" prop="yjType">
+							<el-radio-group v-model="classForm.yjType" @change="$refs.classForm.clearValidate(['renCai.Email','qiye.kplx','qiye.kpfs','qiye.kpdw','qiye.nsrsbh','qiye.dzfpyx'])">
+								<el-radio :label="0">不需要开发票</el-radio>
+								<el-radio :label="1">个人</el-radio>
+								<el-radio :label="2">企业</el-radio>
+							</el-radio-group>
+						</el-form-item>
+					</div>
+					<el-row :gutter="40" v-if="classForm.yjType == 1">
+						<el-col :span="14">
+							<el-form-item label="个人姓名">
+								<el-input v-model="classForm.renCai.Name" readonly type="text" auto-complete="off"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="10"> 
+							<el-form-item label="身份证号" prop="renCai.ShenFenZheng">
+								<el-input v-model="classForm.renCai.ShenFenZheng" type="text" @blur="searchPerson" auto-complete="off"
+									placeholder="请输入身份证号"></el-input>
+							</el-form-item>
+						</el-col>
+					</el-row>
+					<el-row :gutter="40" v-if="classForm.yjType == 2">
+						<el-col :span="12">
+							<el-form-item label="开票类型" prop="qiye.kplx" :rules="{required: true,message: '请联系企业负责人先完善发票信息,再进行报名',trigger: ['blur', 'change']}">
+								<el-input v-model="classForm.qiye.kplx" readonly type="text" auto-complete="off"></el-input>
+							</el-form-item>
+						</el-col> 
+						<el-col :span="12">
+							<el-form-item label="开票单位" prop="qiye.kpdw" :rules="{required: true,message: '请联系企业负责人先完善发票信息,再进行报名',trigger: ['blur', 'change']}">
+								<el-input v-model="classForm.qiye.kpdw" readonly type="text" auto-complete="off"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="纳税人识别号" prop="qiye.nsrsbh" :rules="{required: true,message: '请联系企业负责人先完善发票信息,再进行报名',trigger: ['blur', 'change']}">
+								<el-input v-model="classForm.qiye.nsrsbh" readonly type="text" auto-complete="off"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="24">
+							<el-form-item label="电子发票邮箱" prop="qiye.dzfpyx" :rules="{required: true,message: '请联系企业负责人先完善发票信息,再进行报名',trigger: ['blur', 'change']}">
+								<el-input v-model="classForm.qiye.dzfpyx" readonly type="text" auto-complete="off"></el-input>
+							</el-form-item>
+						</el-col>
+					</el-row>
+				</el-col>
+				<el-col :span="24">
+					<div class="formTitle m-b-20">
+						证件上传
+					</div>
+				</el-col>
+				<el-col :span="24">
+					<el-form-item label="身份证上传" prop="personcord.0.ZJImgUrl">
+						<el-upload class="avatar-uploader" :action="uploadUrl" :limit="1" list-type="picture-card" :file-list="fileList0"
+							:on-success="function(file){return handleAvatarSuccess(file,0)}" :on-remove="function(file){return handleRemove(file,0)}"
+							:class="classForm.personcord[0].ZJImgUrl == null?'':'hide'">
+							<i class="el-icon-plus"></i>
+						</el-upload>
+					</el-form-item>
+				</el-col>
+				<el-col :span="24">
+					<el-form-item label="监理工程师证书扫描件上传" prop="personcord.1.ZJImgUrl" >
+						<el-upload class="avatar-uploader" :action="uploadUrl" :limit="1" list-type="picture-card" :file-list="fileList1"
+							:on-success="function(file){return handleAvatarSuccess(file,1)}" :on-remove="function(file){return handleRemove(file,1)}"
+							:class="classForm.personcord[1].ZJImgUrl == null?'':'hide'">
+							<i class="el-icon-plus"></i>
+						</el-upload>
+					</el-form-item>
+				</el-col>
+				<el-col :span="24">
+					<el-form-item label="职称证上传" prop="personcord.2.ZJImgUrl">
+						<el-upload class="avatar-uploader" :action="uploadUrl" :limit="1" list-type="picture-card" :file-list="fileList2"
+							:on-success="function(file){return handleAvatarSuccess(file,2)}" :on-remove="function(file){return handleRemove(file,2)}"
+							:class="classForm.personcord[2].ZJImgUrl == null?'':'hide'">
+							<i class="el-icon-plus"></i>
+						</el-upload>
+					</el-form-item>
+				</el-col>
+				<el-col :span="24">
+					<el-form-item label="学信网证明" prop="personcord.2.ZJImgUrl">
+						<el-upload class="avatar-uploader" :action="uploadUrl" :limit="1" list-type="picture-card" :file-list="fileList2"
+							:on-success="function(file){return handleAvatarSuccess(file,2)}" :on-remove="function(file){return handleRemove(file,2)}"
+							:class="classForm.personcord[2].ZJImgUrl == null?'':'hide'">
+							<i class="el-icon-plus"></i>
+						</el-upload>
+					</el-form-item>
+				</el-col>
+				<el-col :span="24">
+					<div style="color: #F56C6C;font-size: 14px;font-weight: bold;">
+						2001年前在学信网查不到的,请单位开具证明信并盖章
+					</div>
+				</el-col>
+			</el-row>
+		</el-form>
+	</div>
 </template>
 
 <script>
+	import {
+		getQy,jxjyBm
+	} from "@/api/userIndex"
+	import {
+		getPersonInfo,
+		getYeji
+	} from "@/api/xiehui/jxjy/Person"
+	export default {
+		name: "Jly",
+		props:{
+			info: { // 传入的继续教育name
+				type: Object,
+				default: {},
+			},
+		},
+		dicts: ['jxjy_xl'],
+		data() {
+			return {
+				uploadUrl: process.env.VUE_APP_BASE_API + "/common/upload", //上传路径
+				loading: false, //按钮加载
+				classForm: {
+					id: this.info.id, //继续教育id
+					renCai:{
+						ShenFenZheng:'152131196304260314',
+					},//人员信息
+					yeji:null,//业绩
+					personcord:[
+						{
+							ZJLX:"0",ZJImgUrl:null,
+						},{
+							ZJLX:"1",ZJImgUrl:null,
+						},
+						{
+							ZJLX:"3",ZJImgUrl:null,
+						}
+					],//附件
+					qiye:{
+						qyinfo:null,//所选企业索引
+					},//企业信息
+					yjType:null,//开票类型 0不开 1个人 2企业
+					byyx:null,//毕业院校
+					zcpzdw:null,//职称批准单位
+					jianli:[],//已有的简历列表
+					kpGRName:"个人"
+				},
+				classRules: {
+					'renCai.ShenFenZheng': {
+						required: true,
+						message: '请输入身份证号',
+						trigger: ['blur', 'change']
+					},
+					'renCai.Email':{
+						required: true,
+						message: '请输入邮箱',
+						trigger: ['blur']
+					},
+					'renCai.Phone':{
+						required: true,
+						message: '请输入联系电话',
+						trigger: ['blur', 'change']
+					},
+					'renCai.XueLi':{
+						required: true,
+						message: '请选择学历',
+						trigger: ['blur', 'change']
+					},
+					'renCai.zhi':{
+						required: true,
+						message: '请选择学历',
+						trigger: ['blur', 'change']
+					},
+					byyx:{
+						required: true,
+						message: '请填写毕业院校',
+						trigger: ['blur', 'change']
+					},
+					zcpzdw:{
+						required: true,
+						message: '请填写职称批准单位',
+						trigger: ['blur', 'change']
+					},
+					'renCai.ZhiCheng':{
+						required: true,
+						message: '请填写职称',
+						trigger: ['blur', 'change']
+					},
+					yeji:[
+						{
+							required: true,
+							message: '请填写监理工程师业绩/简历',
+							trigger: ['blur', 'change']
+						},
+						{ min: 10, message: '业绩内容需为10字以上', trigger: 'blur' }
+					],
+					yjType:{
+						required: true,
+						message: '请选择开票抬头',
+						trigger: ['blur', 'change']
+					},
+					'personcord.0.ZJImgUrl':{required: true,message: '请上传身份证',trigger: ['blur', 'change']},
+					'personcord.1.ZJImgUrl':{required: true,message: '请上传毕业证',trigger: ['blur', 'change']},
+					'personcord.2.ZJImgUrl':{required: true,message: '请上传职称证',trigger: ['blur', 'change']}
+				},
+				//企业列表
+				options: [],
+				fileList0:[],
+				fileList1:[],
+				fileList2:[],
+				baseUrl: process.env.VUE_APP_BASE_API,
+			}
+		},
+		methods: {
+			//表单重置
+			reset(){
+				this.options = []
+				this.classForm = {
+					id: null, //继续教育id
+					renCai:{
+						ShenFenZheng:'152131196304260314',
+					},//人员信息
+					yeji:null,//业绩
+					personcord:[
+						{
+							UserCord:null,ZJLX:"0",ZJImgUrl:null,
+						},{
+							UserCord:null,ZJLX:"1",ZJImgUrl:null,
+						},
+						{
+							UserCord:null,ZJLX:"3",ZJImgUrl:null,
+						}
+					],//附件
+					qiye:{
+						qyinfo:null,//所选企业索引
+					},//企业信息
+					yjType:null,//开票类型 0不开 1个人 2企业
+					byyx:null,//毕业院校
+					zcpzdw:null,//职称批准单位
+					jianli:[],//已有的简历列表
+				}
+				this.fileList0 = []
+				this.fileList1 = []
+				this.fileList2 = []
+				this.resetForm("classForm")
+			},
+			//查询企业
+			remoteMethod(query) {
+				if (query !== '') {
+					this.loading = true;
+					getQy({
+						name: query
+					}).then(res => {
+						this.options = res.data
+						this.loading = false;
+					})
+				} else {
+					this.options = [];
+				}
+			},
+			//选择企业
+			chooseQy(v) {
+				this.classForm.qiye = {
+					...this.classForm.qiye,
+					...this.options[v]
+				}
+				// this.classForm.sjr = this.options[v].yjSjr
+				// this.classForm.sjrsj = this.options[v].yjSjphone
+				// this.classForm.yjdz = this.options[v].yjAddress
+				// this.classForm.yjbm = this.options[v].yjCode
+				// this.form = 
+			},
+			//根据身份证号查询人员信息
+			searchPerson() {
+				if (this.classForm.qiye.qyinfo == null) {
+					this.$message({
+						type: "error",
+						message: "请先选择企业"
+					})
+				} else {
+					this.$refs.classForm.validate((valid, results) => {
+						if (results.UserCord == undefined) {
+							getPersonInfo({
+								ShenFenZheng: this.classForm.renCai.ShenFenZheng,
+								Dept: this.classForm.qiye.qyname
+							}).then(res => {
+								this.classForm.renCai = {
+									...this.classForm.renCai,
+									...res.data
+								}
+								this.classForm.personcord[0].UserCord = res.data.ShenFenZheng
+								this.classForm.personcord[1].UserCord = res.data.ShenFenZheng
+								this.classForm.personcord[2].UserCord = res.data.ShenFenZheng
+								for(let i in res.data.personcords){
+									if(res.data.personcords[i].ZJLX == '0' && i<3){
+										this.classForm.personcord[0].ZJImgUrl = res.data.personcords[i].ZJImgUrl
+										this.classForm.personcord[0] = {...res.data.personcords[i],...this.classForm.personcord[0]}
+										this.fileList0 = [ {url:this.baseUrl+res.data.personcords[i].ZJImgUrl}]
+										this.$refs.classForm.validateField('personcord.0.ZJImgUrl')
+									}else if(res.data.personcords[i].ZJLX == '1' && i<3){
+										this.classForm.personcord[1].ZJImgUrl = res.data.personcords[i].ZJImgUrl
+										this.classForm.personcord[1] = {...res.data.personcords[i],...this.classForm.personcord[1]}
+										this.fileList1 = [ {url:this.baseUrl+res.data.personcords[i].ZJImgUrl}]
+										this.$refs.classForm.validateField('personcord.1.ZJImgUrl')
+									}else if(res.data.personcords[i].ZJLX == '3' && i<3){
+										this.classForm.personcord[2].ZJImgUrl = res.data.personcords[i].ZJImgUrl
+										this.classForm.personcord[2] = {...res.data.personcords[i],...this.classForm.personcord[2]}
+										this.fileList2 = [ {url:this.baseUrl+res.data.personcords[i].ZJImgUrl}]
+										this.$refs.classForm.validateField('personcord.2.ZJImgUrl')
+									}
+								}
+								this.$forceUpdate()
+								getYeji({
+									ShenFenZheng: this.classForm.renCai.ShenFenZheng
+								}).then(qwe => {
+									this.classForm.jianli = qwe.data
+								})
+							})
+						}
+					})
+				}
+			},
+			//删除图片
+			//上传成功
+			handleAvatarSuccess(file,index) {
+				if(index == 0){
+					this.classForm.personcord[0].ZJImgUrl = file.fileName
+					this.$refs.classForm.validateField('personcord.0.ZJImgUrl')
+					this.$forceUpdate()
+				}else if(index == 1){
+					this.classForm.personcord[1].ZJImgUrl = file.fileName
+					this.$refs.classForm.validateField('personcord.1.ZJImgUrl')
+					this.$forceUpdate()
+				}else{
+					this.classForm.personcord[2].ZJImgUrl = file.fileName
+					this.$refs.classForm.validateField('personcord.2.ZJImgUrl')
+					this.$forceUpdate()
+				}
+			},
+			//移除成功
+			handleRemove(file,index) {
+				// this.classForm.yyzz = null
+				if(index == 0){
+					this.classForm.personcord[0].ZJImgUrl = null
+					this.fileList0 = []
+				}else if(index == 1){
+					this.classForm.personcord[1].ZJImgUrl = null
+					this.fileList1 = []
+				}else{
+					this.classForm.personcord[2].ZJImgUrl = null
+					this.fileList2 = []
+				}
+			},
+			submit(){
+				this.$refs.classForm.validate(valid => {
+					if (valid) {
+						jxjyBm(this.classForm).then(res=>{
+							this.$message({
+								type:"success",
+								message:res.msg
+							})
+							this.reset()
+							this.$emit('submitSuccess',false)
+						})
+					} else {
+				
+					}
+				})
+			}
+			
+		}
+	}
 </script>
 
-<style>
+<style scoped lang="scss">
+	.formTitle {
+		color: #409EFF;
+		border-bottom: 1px solid #409EFF;
+		padding: 10px;
+		font-size: 16px;
+		font-weight: bold;
+	}
+
+	::v-deep .el-form-item__label {
+		text-align: justify !important;
+
+		text-align-last: justify !important;
+	}
+
+	::v-deep .el-select {
+		width: 100% !important;
+	}
+
+	::v-deep .select-container {
+		width: 100%;
+		/* 如果需要,可以设置外部容器的宽度 */
+	}
+
+	::v-deep .select-container .el-select {
+		width: 100%;
+		/* 让 el-select 占满外部容器的宽度 */
+	}
+	::v-deep .hide .el-upload--picture-card {
+		display: none;
+	}
 </style>

+ 564 - 1
src/views/components/baoming/jly.vue

@@ -1,8 +1,571 @@
 <template>
+	<div>
+		<el-form ref="classForm" label-position="left" label-width="120px" :model="classForm" :rules="classRules">
+			<el-row :gutter="40">
+				<el-col :span="24">
+					<div style="background-color: #eee;font-weight: bold;text-align: center;font-size: 16px;"
+						class="pd-10 m-b-10">
+						<!-- 2024年第四期铁路监理工程师网络继续教育(土建专业) -->
+						{{info.TrainName}}
+					</div>
+				</el-col>
+				<el-col :span="24">
+					<div class="formTitle m-b-20">
+						企业信息
+					</div>
+				</el-col>
+				<el-col :span="16">
+					<el-form-item label="企业名称" prop="qiye.qyinfo">
+						<!-- <el-input v-model="classForm.qyname" type="text" auto-complete="off"
+							placeholder="请输入正确的公司全称"></el-input> -->
+						<el-select v-model="classForm.qiye.qyinfo" filterable remote reserve-keyword clearable
+							placeholder="请输入企业名称" :remote-method="remoteMethod" :loading="loading" @change="chooseQy">
+							<el-option v-for="(item,index) in options" :key="item.id" :label="item.qyname"
+								:value="index">
+							</el-option>
+						</el-select>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="联系人姓名" prop="name">
+						<el-input v-model="classForm.qiye.name" readonly type="text" auto-complete="off"
+							placeholder="请输入联系人姓名"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="联系人电话" prop="photo">
+						<el-input v-model="classForm.qiye.photo" readonly type="text" auto-complete="off"
+							placeholder="请输入联系人电话"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="邮政编码" prop="yzbm">
+						<el-input v-model="classForm.qiye.yzbm" type="text" readonly auto-complete="off"
+							placeholder="请输入邮政编码"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="考试地点" prop="lxryx">
+						<el-input v-model="classForm.qiye.lxryx" type="text" readonly auto-complete="off"
+							placeholder="请输入考试地点"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="电子邮箱" prop="lxryx">
+						<el-input v-model="classForm.qiye.lxryx" type="text" readonly auto-complete="off"
+							placeholder="请输入电子邮箱"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="24">
+					<div class="formTitle m-b-20">
+						监理员信息
+					</div>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="姓名" >
+						<el-input v-model="classForm.renCai.Name" type="text" readonly auto-complete="off"
+							placeholder="请输入姓名"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="性别" > 
+						<el-select v-model="classForm.renCai.Sex" clearable readonly placeholder="请输入企业名称">
+							<el-option label="男" value="男">
+								男
+							</el-option>
+							<el-option label="女" value="女">
+								女
+							</el-option>
+						</el-select>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="身份证号" prop="renCai.ShenFenZheng">
+						<el-input v-model="classForm.renCai.ShenFenZheng" type="text" @blur="searchPerson" auto-complete="off"
+							placeholder="请输入身份证号"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="民族" prop="renCai.ShenFenZheng">
+						<el-input v-model="classForm.renCai.ShenFenZheng" type="text" @blur="searchPerson" auto-complete="off"
+							placeholder="请输入民族"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="职称" prop="ZhiCheng">
+						<el-input v-model="classForm.ZhiCheng" type="text" auto-complete="off"
+							placeholder="请输入职称"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="职称专业" prop="ZhiCheng">
+						<el-input v-model="classForm.ZhiCheng" type="text" auto-complete="off"
+							placeholder="请输入职称专业"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="联系电话" prop="renCai.Phone">
+						<el-input v-model="classForm.renCai.Phone" type="text" auto-complete="off"
+							placeholder="请输入联系电话"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="工作年限" prop="ZhiCheng">
+						<el-input v-model="classForm.ZhiCheng" type="text" auto-complete="off"
+							placeholder="请输入工作年限"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="职务" prop="renCai.Phone">
+						<el-input v-model="classForm.renCai.Phone" type="text" auto-complete="off"
+							placeholder="请输入职务"></el-input>
+					</el-form-item>
+				</el-col>
+				
+				<el-col :span="8">
+					<el-form-item label="职称评定时间">
+						<!-- <el-input v-model="classForm.qyname" type="text" auto-complete="off"
+							placeholder="请输入证书有效期"></el-input> -->
+						<el-date-picker v-model="classForm.renCai.JLYxqz" readonly type="date" placeholder="选择日期时间"> </el-date-picker>
+					</el-form-item>
+				</el-col>
+				<el-col :span="16">
+					<el-form-item label="毕业证专业" prop="byyx">
+						<el-input v-model="classForm.byyx" type="text" auto-complete="off"
+							placeholder="请输入毕业证专业"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="毕业时间">
+						<!-- <el-input v-model="classForm.qyname" type="text" auto-complete="off"
+							placeholder="请输入证书有效期"></el-input> -->
+						<el-date-picker v-model="classForm.renCai.JLYxqz" readonly type="date" placeholder="选择日期时间"> </el-date-picker>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="学历" prop="renCai.XueLi">
+						<!-- <el-input v-model="classForm.renCai.XueLi" type="text" auto-complete="off"
+							placeholder="请选择学历"></el-input> -->
+						<el-select v-model="classForm.renCai.XueLi" placeholder="请选择学历" clearable>
+							<el-option v-for="dict in dict.type.jxjy_xl" :key="dict.value" :label="dict.label"
+								:value="dict.value" />
+						</el-select>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="考试地点" prop="byyx">
+						<el-input v-model="classForm.byyx" type="text" auto-complete="off"
+							placeholder="请输入考试地点"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="24">
+					<el-form-item label="工作简历" prop="yeji">
+						<el-input v-model="classForm.yeji" type="textarea" :rows="3" auto-complete="off"
+							placeholder="请输入新增简历工程师业绩"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="24">
+					<div class="formTitle m-b-20">
+						开票信息
+					</div>
+				</el-col>
+				<el-col :span="24">
+					<div style="color:#F56C6C;">
+						注意事项:发票均每人单独开出,在网络报名时,选择付款单位,选择付款单位后,发票将不能更换。开票信息为空的,请联系企业完善开票信息。
+					</div>
+					<div class="m-t-10">
+						<el-form-item label="发票抬头" prop="yjType">
+							<el-radio-group v-model="classForm.yjType" @change="$refs.classForm.clearValidate(['renCai.Email','qiye.kplx','qiye.kpfs','qiye.kpdw','qiye.nsrsbh','qiye.dzfpyx'])">
+								<el-radio :label="0">不需要开发票</el-radio>
+								<el-radio :label="1">个人</el-radio>
+								<el-radio :label="2">企业</el-radio>
+							</el-radio-group>
+						</el-form-item>
+					</div>
+					<el-row :gutter="40" v-if="classForm.yjType == 1">
+						<el-col :span="14">
+							<el-form-item label="个人姓名">
+								<el-input v-model="classForm.renCai.Name" readonly type="text" auto-complete="off"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="10">
+							<!-- <el-form-item label="个人邮箱" prop="renCai.Email">
+								<el-input v-model="classForm.renCai.Email" type="text" auto-complete="off"
+									placeholder="请输入个人邮箱"></el-input>
+							</el-form-item> -->
+							<el-form-item label="身份证号" prop="renCai.ShenFenZheng">
+								<el-input v-model="classForm.renCai.ShenFenZheng" type="text" @blur="searchPerson" auto-complete="off"
+									placeholder="请输入身份证号"></el-input>
+							</el-form-item>
+						</el-col>
+					</el-row>
+					<el-row :gutter="40" v-if="classForm.yjType == 2">
+						<el-col :span="12">
+							<el-form-item label="开票类型" prop="qiye.kplx" :rules="{required: true,message: '请联系企业负责人先完善发票信息,再进行报名',trigger: ['blur', 'change']}">
+								<el-input v-model="classForm.qiye.kplx" readonly type="text" auto-complete="off"></el-input>
+							</el-form-item>
+						</el-col>
+						<!-- <el-col :span="12">
+							<el-form-item label="开票方式" prop="qiye.kpfs" :rules="{required: true,message: '请联系企业负责人先完善发票信息,再进行报名',trigger: ['blur', 'change']}">
+								<el-input v-model="classForm.qiye.kpfs" readonly type="text" auto-complete="off"></el-input>
+							</el-form-item>
+						</el-col> -->
+						<el-col :span="12">
+							<el-form-item label="开票单位" prop="qiye.kpdw" :rules="{required: true,message: '请联系企业负责人先完善发票信息,再进行报名',trigger: ['blur', 'change']}">
+								<el-input v-model="classForm.qiye.kpdw" readonly type="text" auto-complete="off"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="12">
+							<el-form-item label="纳税人识别号" prop="qiye.nsrsbh" :rules="{required: true,message: '请联系企业负责人先完善发票信息,再进行报名',trigger: ['blur', 'change']}">
+								<el-input v-model="classForm.qiye.nsrsbh" readonly type="text" auto-complete="off"></el-input>
+							</el-form-item>
+						</el-col>
+						<el-col :span="24">
+							<el-form-item label="电子发票邮箱" prop="qiye.dzfpyx" :rules="{required: true,message: '请联系企业负责人先完善发票信息,再进行报名',trigger: ['blur', 'change']}">
+								<el-input v-model="classForm.qiye.dzfpyx" readonly type="text" auto-complete="off"></el-input>
+							</el-form-item>
+						</el-col>
+					</el-row>
+				</el-col>
+				<el-col :span="24">
+					<div class="formTitle m-b-20">
+						证件上传
+					</div>
+				</el-col>
+				<el-col :span="24">
+					<el-form-item label="身份证上传" prop="personcord.0.ZJImgUrl">
+						<el-upload class="avatar-uploader" :action="uploadUrl" :limit="1" list-type="picture-card" :file-list="fileList0"
+							:on-success="function(file){return handleAvatarSuccess(file,0)}" :on-remove="function(file){return handleRemove(file,0)}"
+							:class="classForm.personcord[0].ZJImgUrl == null?'':'hide'">
+							<i class="el-icon-plus"></i>
+						</el-upload>
+					</el-form-item>
+				</el-col>
+				<el-col :span="24">
+					<el-form-item label="监理工程师证书扫描件上传" prop="personcord.1.ZJImgUrl" >
+						<el-upload class="avatar-uploader" :action="uploadUrl" :limit="1" list-type="picture-card" :file-list="fileList1"
+							:on-success="function(file){return handleAvatarSuccess(file,1)}" :on-remove="function(file){return handleRemove(file,1)}"
+							:class="classForm.personcord[1].ZJImgUrl == null?'':'hide'">
+							<i class="el-icon-plus"></i>
+						</el-upload>
+					</el-form-item>
+				</el-col>
+				<el-col :span="24">
+					<el-form-item label="职称证上传" prop="personcord.2.ZJImgUrl">
+						<el-upload class="avatar-uploader" :action="uploadUrl" :limit="1" list-type="picture-card" :file-list="fileList2"
+							:on-success="function(file){return handleAvatarSuccess(file,2)}" :on-remove="function(file){return handleRemove(file,2)}"
+							:class="classForm.personcord[2].ZJImgUrl == null?'':'hide'">
+							<i class="el-icon-plus"></i>
+						</el-upload>
+					</el-form-item>
+				</el-col>
+			</el-row>
+		</el-form>
+	</div>
 </template>
 
 <script>
+	import {
+		getQy,jxjyBm
+	} from "@/api/userIndex"
+	import {
+		getPersonInfo,
+		getYeji
+	} from "@/api/xiehui/jxjy/Person"
+	export default {
+		name: "Jly",
+		props:{
+			info: { // 传入的继续教育name
+				type: Object,
+				default: {},
+			},
+		},
+		dicts: ['jxjy_xl'],
+		data() {
+			return {
+				uploadUrl: process.env.VUE_APP_BASE_API + "/common/upload", //上传路径
+				loading: false, //按钮加载
+				classForm: {
+					id: this.info.id, //继续教育id
+					renCai:{
+						ShenFenZheng:'152131196304260314',
+					},//人员信息
+					yeji:null,//业绩
+					personcord:[
+						{
+							ZJLX:"0",ZJImgUrl:null,
+						},{
+							ZJLX:"1",ZJImgUrl:null,
+						},
+						{
+							ZJLX:"3",ZJImgUrl:null,
+						}
+					],//附件
+					qiye:{
+						qyinfo:null,//所选企业索引
+					},//企业信息
+					yjType:null,//开票类型 0不开 1个人 2企业
+					byyx:null,//毕业院校
+					zcpzdw:null,//职称批准单位
+					jianli:[],//已有的简历列表
+					kpGRName:"个人"
+				},
+				classRules: {
+					'renCai.ShenFenZheng': {
+						required: true,
+						message: '请输入身份证号',
+						trigger: ['blur', 'change']
+					},
+					'renCai.Email':{
+						required: true,
+						message: '请输入邮箱',
+						trigger: ['blur']
+					},
+					'renCai.Phone':{
+						required: true,
+						message: '请输入联系电话',
+						trigger: ['blur', 'change']
+					},
+					'renCai.XueLi':{
+						required: true,
+						message: '请选择学历',
+						trigger: ['blur', 'change']
+					},
+					'renCai.zhi':{
+						required: true,
+						message: '请选择学历',
+						trigger: ['blur', 'change']
+					},
+					byyx:{
+						required: true,
+						message: '请填写毕业院校',
+						trigger: ['blur', 'change']
+					},
+					zcpzdw:{
+						required: true,
+						message: '请填写职称批准单位',
+						trigger: ['blur', 'change']
+					},
+					'renCai.ZhiCheng':{
+						required: true,
+						message: '请填写职称',
+						trigger: ['blur', 'change']
+					},
+					yeji:[
+						{
+							required: true,
+							message: '请填写监理工程师业绩/简历',
+							trigger: ['blur', 'change']
+						},
+						{ min: 10, message: '业绩内容需为10字以上', trigger: 'blur' }
+					],
+					yjType:{
+						required: true,
+						message: '请选择开票抬头',
+						trigger: ['blur', 'change']
+					},
+					'personcord.0.ZJImgUrl':{required: true,message: '请上传身份证',trigger: ['blur', 'change']},
+					'personcord.1.ZJImgUrl':{required: true,message: '请上传毕业证',trigger: ['blur', 'change']},
+					'personcord.2.ZJImgUrl':{required: true,message: '请上传职称证',trigger: ['blur', 'change']}
+				},
+				//企业列表
+				options: [],
+				fileList0:[],
+				fileList1:[],
+				fileList2:[],
+				baseUrl: process.env.VUE_APP_BASE_API,
+			}
+		},
+		methods: {
+			//表单重置
+			reset(){
+				this.options = []
+				this.classForm = {
+					id: null, //继续教育id
+					renCai:{
+						ShenFenZheng:'152131196304260314',
+					},//人员信息
+					yeji:null,//业绩
+					personcord:[
+						{
+							UserCord:null,ZJLX:"0",ZJImgUrl:null,
+						},{
+							UserCord:null,ZJLX:"1",ZJImgUrl:null,
+						},
+						{
+							UserCord:null,ZJLX:"3",ZJImgUrl:null,
+						}
+					],//附件
+					qiye:{
+						qyinfo:null,//所选企业索引
+					},//企业信息
+					yjType:null,//开票类型 0不开 1个人 2企业
+					byyx:null,//毕业院校
+					zcpzdw:null,//职称批准单位
+					jianli:[],//已有的简历列表
+				}
+				this.fileList0 = []
+				this.fileList1 = []
+				this.fileList2 = []
+				this.resetForm("classForm")
+			},
+			//查询企业
+			remoteMethod(query) {
+				if (query !== '') {
+					this.loading = true;
+					getQy({
+						name: query
+					}).then(res => {
+						this.options = res.data
+						this.loading = false;
+					})
+				} else {
+					this.options = [];
+				}
+			},
+			//选择企业
+			chooseQy(v) {
+				this.classForm.qiye = {
+					...this.classForm.qiye,
+					...this.options[v]
+				}
+				// this.classForm.sjr = this.options[v].yjSjr
+				// this.classForm.sjrsj = this.options[v].yjSjphone
+				// this.classForm.yjdz = this.options[v].yjAddress
+				// this.classForm.yjbm = this.options[v].yjCode
+				// this.form = 
+			},
+			//根据身份证号查询人员信息
+			searchPerson() {
+				if (this.classForm.qiye.qyinfo == null) {
+					this.$message({
+						type: "error",
+						message: "请先选择企业"
+					})
+				} else {
+					this.$refs.classForm.validate((valid, results) => {
+						if (results.UserCord == undefined) {
+							getPersonInfo({
+								ShenFenZheng: this.classForm.renCai.ShenFenZheng,
+								Dept: this.classForm.qiye.qyname
+							}).then(res => {
+								this.classForm.renCai = {
+									...this.classForm.renCai,
+									...res.data
+								}
+								this.classForm.personcord[0].UserCord = res.data.ShenFenZheng
+								this.classForm.personcord[1].UserCord = res.data.ShenFenZheng
+								this.classForm.personcord[2].UserCord = res.data.ShenFenZheng
+								for(let i in res.data.personcords){
+									if(res.data.personcords[i].ZJLX == '0' && i<3){
+										this.classForm.personcord[0].ZJImgUrl = res.data.personcords[i].ZJImgUrl
+										this.classForm.personcord[0] = {...res.data.personcords[i],...this.classForm.personcord[0]}
+										this.fileList0 = [ {url:this.baseUrl+res.data.personcords[i].ZJImgUrl}]
+										this.$refs.classForm.validateField('personcord.0.ZJImgUrl')
+									}else if(res.data.personcords[i].ZJLX == '1' && i<3){
+										this.classForm.personcord[1].ZJImgUrl = res.data.personcords[i].ZJImgUrl
+										this.classForm.personcord[1] = {...res.data.personcords[i],...this.classForm.personcord[1]}
+										this.fileList1 = [ {url:this.baseUrl+res.data.personcords[i].ZJImgUrl}]
+										this.$refs.classForm.validateField('personcord.1.ZJImgUrl')
+									}else if(res.data.personcords[i].ZJLX == '3' && i<3){
+										this.classForm.personcord[2].ZJImgUrl = res.data.personcords[i].ZJImgUrl
+										this.classForm.personcord[2] = {...res.data.personcords[i],...this.classForm.personcord[2]}
+										this.fileList2 = [ {url:this.baseUrl+res.data.personcords[i].ZJImgUrl}]
+										this.$refs.classForm.validateField('personcord.2.ZJImgUrl')
+									}
+								}
+								this.$forceUpdate()
+								getYeji({
+									ShenFenZheng: this.classForm.renCai.ShenFenZheng
+								}).then(qwe => {
+									this.classForm.jianli = qwe.data
+								})
+							})
+						}
+					})
+				}
+			},
+			//删除图片
+			//上传成功
+			handleAvatarSuccess(file,index) {
+				if(index == 0){
+					this.classForm.personcord[0].ZJImgUrl = file.fileName
+					this.$refs.classForm.validateField('personcord.0.ZJImgUrl')
+					this.$forceUpdate()
+				}else if(index == 1){
+					this.classForm.personcord[1].ZJImgUrl = file.fileName
+					this.$refs.classForm.validateField('personcord.1.ZJImgUrl')
+					this.$forceUpdate()
+				}else{
+					this.classForm.personcord[2].ZJImgUrl = file.fileName
+					this.$refs.classForm.validateField('personcord.2.ZJImgUrl')
+					this.$forceUpdate()
+				}
+			},
+			//移除成功
+			handleRemove(file,index) {
+				// this.classForm.yyzz = null
+				if(index == 0){
+					this.classForm.personcord[0].ZJImgUrl = null
+					this.fileList0 = []
+				}else if(index == 1){
+					this.classForm.personcord[1].ZJImgUrl = null
+					this.fileList1 = []
+				}else{
+					this.classForm.personcord[2].ZJImgUrl = null
+					this.fileList2 = []
+				}
+			},
+			submit(){
+				this.$refs.classForm.validate(valid => {
+					if (valid) {
+						jxjyBm(this.classForm).then(res=>{
+							this.$message({
+								type:"success",
+								message:res.msg
+							})
+							this.reset()
+							this.$emit('submitSuccess',false)
+						})
+					} else {
+				
+					}
+				})
+			}
+			
+		}
+	}
 </script>
 
-<style>
+<style scoped lang="scss">
+	.formTitle {
+		color: #409EFF;
+		border-bottom: 1px solid #409EFF;
+		padding: 10px;
+		font-size: 16px;
+		font-weight: bold;
+	}
+
+	::v-deep .el-form-item__label {
+		text-align: justify !important;
+
+		text-align-last: justify !important;
+	}
+
+	::v-deep .el-select {
+		width: 100% !important;
+	}
+
+	::v-deep .select-container {
+		width: 100%;
+		/* 如果需要,可以设置外部容器的宽度 */
+	}
+
+	::v-deep .select-container .el-select {
+		width: 100%;
+		/* 让 el-select 占满外部容器的宽度 */
+	}
+	::v-deep .hide .el-upload--picture-card {
+		display: none;
+	}
 </style>

+ 15 - 11
src/views/components/baoming/kaoshi.vue

@@ -180,38 +180,42 @@
 					<el-row :gutter="40" v-if="classForm.yjType == 1">
 						<el-col :span="14">
 							<el-form-item label="个人姓名">
-								<el-input v-model="classForm.kpGRName" readonly type="text" auto-complete="off"></el-input>
+								<el-input v-model="classForm.renCai.Name" readonly type="text" auto-complete="off"></el-input>
 							</el-form-item>
 						</el-col>
 						<el-col :span="10">
-							<el-form-item label="个人邮箱" prop="renCai.Email">
+							<!-- <el-form-item label="个人邮箱" prop="renCai.Email">
 								<el-input v-model="classForm.renCai.Email" type="text" auto-complete="off"
 									placeholder="请输入个人邮箱"></el-input>
+							</el-form-item> -->
+							<el-form-item label="身份证号" prop="renCai.ShenFenZheng">
+								<el-input v-model="classForm.renCai.ShenFenZheng" type="text" @blur="searchPerson" auto-complete="off"
+									placeholder="请输入身份证号"></el-input>
 							</el-form-item>
 						</el-col>
 					</el-row>
 					<el-row :gutter="40" v-if="classForm.yjType == 2">
-						<el-col :span="14">
+						<el-col :span="12">
 							<el-form-item label="开票类型" prop="qiye.kplx" :rules="{required: true,message: '请联系企业负责人先完善发票信息,再进行报名',trigger: ['blur', 'change']}">
 								<el-input v-model="classForm.qiye.kplx" readonly type="text" auto-complete="off"></el-input>
 							</el-form-item>
 						</el-col>
-						<el-col :span="10">
+						<!-- <el-col :span="12">
 							<el-form-item label="开票方式" prop="qiye.kpfs" :rules="{required: true,message: '请联系企业负责人先完善发票信息,再进行报名',trigger: ['blur', 'change']}">
 								<el-input v-model="classForm.qiye.kpfs" readonly type="text" auto-complete="off"></el-input>
 							</el-form-item>
-						</el-col>
-						<el-col :span="14">
+						</el-col> -->
+						<el-col :span="12">
 							<el-form-item label="开票单位" prop="qiye.kpdw" :rules="{required: true,message: '请联系企业负责人先完善发票信息,再进行报名',trigger: ['blur', 'change']}">
 								<el-input v-model="classForm.qiye.kpdw" readonly type="text" auto-complete="off"></el-input>
 							</el-form-item>
 						</el-col>
-						<el-col :span="10">
+						<el-col :span="12">
 							<el-form-item label="纳税人识别号" prop="qiye.nsrsbh" :rules="{required: true,message: '请联系企业负责人先完善发票信息,再进行报名',trigger: ['blur', 'change']}">
 								<el-input v-model="classForm.qiye.nsrsbh" readonly type="text" auto-complete="off"></el-input>
 							</el-form-item>
 						</el-col>
-						<el-col :span="24" v-if="classForm.qiye.kplx == '增值税专用发票'">
+						<!-- <el-col :span="24" v-if="classForm.qiye.kplx == '增值税专用发票'">
 							<el-row :gutter="20">
 								<el-col :span="14">
 									<el-form-item label="注册地址" prop="qiye.kpzcdz" :rules="{required: true,message: '请联系企业负责人先完善发票信息,再进行报名',trigger: ['blur', 'change']}">
@@ -234,7 +238,7 @@
 									</el-form-item>
 								</el-col>
 							</el-row>
-						</el-col>
+						</el-col> -->
 						<el-col :span="24">
 							<el-form-item label="电子发票邮箱" prop="qiye.dzfpyx" :rules="{required: true,message: '请联系企业负责人先完善发票信息,再进行报名',trigger: ['blur', 'change']}">
 								<el-input v-model="classForm.qiye.dzfpyx" readonly type="text" auto-complete="off"></el-input>
@@ -242,7 +246,7 @@
 						</el-col>
 					</el-row>
 				</el-col>
-				<el-col :span="24">
+				<!-- <el-col :span="24">
 					<div class="formTitle m-b-20">
 						邮寄信息
 					</div>
@@ -275,7 +279,7 @@
 					<div style="color: #F56C6C;">
 						注意事项:发票统一邮寄到付款单位,不单独邮寄给分公司或者个人。
 					</div>
-				</el-col>
+				</el-col> -->
 				<el-col :span="24">
 					<div class="formTitle m-b-20">
 						证件上传

+ 293 - 179
src/views/components/baoming/zj.vue

@@ -1,11 +1,12 @@
 <template>
 	<div>
-		<el-form ref="classForm" label-position="left" label-width="100px" :model="classForm" :rules="classRules">
+		<el-form ref="classForm" label-position="left" label-width="120px" :model="classForm" :rules="classRules">
 			<el-row :gutter="40">
 				<el-col :span="24">
 					<div style="background-color: #eee;font-weight: bold;text-align: center;font-size: 16px;"
 						class="pd-10 m-b-10">
-						2024年第四期铁路监理工程师网络继续教育(土建专业)
+						<!-- 2024年第四期铁路监理工程师网络继续教育(土建专业) -->
+						{{info.TrainName}}
 					</div>
 				</el-col>
 				<el-col :span="24">
@@ -14,10 +15,10 @@
 					</div>
 				</el-col>
 				<el-col :span="16">
-					<el-form-item label="企业名称" prop="qyinfo">
+					<el-form-item label="企业名称" prop="qiye.qyinfo">
 						<!-- <el-input v-model="classForm.qyname" type="text" auto-complete="off"
 							placeholder="请输入正确的公司全称"></el-input> -->
-						<el-select v-model="classForm.qyinfo" filterable remote reserve-keyword clearable
+						<el-select v-model="classForm.qiye.qyinfo" filterable remote reserve-keyword clearable
 							placeholder="请输入企业名称" :remote-method="remoteMethod" :loading="loading" @change="chooseQy">
 							<el-option v-for="(item,index) in options" :key="item.id" :label="item.qyname"
 								:value="index">
@@ -27,31 +28,31 @@
 				</el-col>
 				<el-col :span="8">
 					<el-form-item label="联系人姓名" prop="name">
-						<el-input v-model="classForm.name" readonly type="text" auto-complete="off"
-							placeholder="请输入负责人姓名"></el-input>
+						<el-input v-model="classForm.qiye.name" readonly type="text" auto-complete="off"
+							placeholder="请输入联系人姓名"></el-input>
 					</el-form-item>
 				</el-col>
 				<el-col :span="8">
 					<el-form-item label="联系人电话" prop="photo">
-						<el-input v-model="classForm.photo" readonly type="text" auto-complete="off"
-							placeholder="请输入手机号码"></el-input>
+						<el-input v-model="classForm.qiye.photo" readonly type="text" auto-complete="off"
+							placeholder="请输入联系人电话"></el-input>
 					</el-form-item>
 				</el-col>
 				<el-col :span="8">
 					<el-form-item label="邮政编码" prop="yzbm">
-						<el-input v-model="classForm.yzbm" type="text" readonly auto-complete="off"
+						<el-input v-model="classForm.qiye.yzbm" type="text" readonly auto-complete="off"
 							placeholder="请输入邮政编码"></el-input>
 					</el-form-item>
 				</el-col>
 				<el-col :span="8">
-					<el-form-item label="考试地点" prop="yzbm">
-						<el-input v-model="classForm.yzbm" type="text" readonly auto-complete="off"
-							placeholder="请输入邮政编码"></el-input>
+					<el-form-item label="考试地点" prop="lxryx">
+						<el-input v-model="classForm.qiye.lxryx" type="text" readonly auto-complete="off"
+							placeholder="请输入考试地点"></el-input>
 					</el-form-item>
 				</el-col>
 				<el-col :span="8">
 					<el-form-item label="电子邮箱" prop="lxryx">
-						<el-input v-model="classForm.lxryx" type="text" readonly auto-complete="off"
+						<el-input v-model="classForm.qiye.lxryx" type="text" readonly auto-complete="off"
 							placeholder="请输入电子邮箱"></el-input>
 					</el-form-item>
 				</el-col>
@@ -61,16 +62,16 @@
 					</div>
 				</el-col>
 				<el-col :span="8">
-					<el-form-item label="姓名" prop="Name">
-						<el-input v-model="classForm.Name" type="text" readonly auto-complete="off"
+					<el-form-item label="姓名" >
+						<el-input v-model="classForm.renCai.Name" type="text" readonly auto-complete="off"
 							placeholder="请输入姓名"></el-input>
 					</el-form-item>
 				</el-col>
 				<el-col :span="8">
-					<el-form-item label="性别" prop="Sex">
+					<el-form-item label="性别" >
 						<!-- <el-input v-model="classForm.qyname" type="text" auto-complete="off"
 							placeholder="请选择性别"></el-input> -->
-						<el-select v-model="classForm.Sex" clearable readonly placeholder="请输入企业名称">
+						<el-select v-model="classForm.renCai.Sex" clearable readonly placeholder="请输入企业名称">
 							<el-option label="男" value="男">
 							</el-option>
@@ -81,69 +82,98 @@
 					</el-form-item>
 				</el-col>
 				<el-col :span="8">
-					<el-form-item label="民族" prop="Sex">
-						<!-- <el-input v-model="classForm.qyname" type="text" auto-complete="off"
-							placeholder="请选择性别"></el-input> -->
-						<el-select v-model="classForm.Sex" clearable readonly placeholder="请输入企业名称">
-							<el-option :label="item" :value="item" :key="index" v-for="(item,index) in minzuList">
-								{{item}}
-							</el-option>
-						</el-select>
+					<el-form-item label="民族" prop="renCai.ShenFenZheng">
+						<el-input v-model="classForm.renCai.ShenFenZheng" type="text" @blur="searchPerson" auto-complete="off"
+							placeholder="请输入民族"></el-input>
 					</el-form-item>
 				</el-col>
 				<el-col :span="8">
-					<el-form-item label="身份证号" prop="ShenFenZheng">
-						<el-input v-model="classForm.ShenFenZheng" type="text" @blur="searchPerson" auto-complete="off"
+					<el-form-item label="身份证号" prop="renCai.ShenFenZheng">
+						<el-input v-model="classForm.renCai.ShenFenZheng" type="text" @blur="searchPerson" auto-complete="off"
 							placeholder="请输入身份证号"></el-input>
 					</el-form-item>
 				</el-col>
 				<el-col :span="8">
-					<el-form-item label="联系电话" prop="Tel">
-						<el-input v-model="classForm.Tel" type="text" auto-complete="off"
+					<el-form-item label="联系电话" prop="renCai.Phone">
+						<el-input v-model="classForm.renCai.Phone" type="text" auto-complete="off"
 							placeholder="请输入联系电话"></el-input>
 					</el-form-item>
 				</el-col>
 				<el-col :span="8">
-					<el-form-item label="学历" prop="XueLi">
-						<el-input v-model="classForm.XueLi" type="text" auto-complete="off"
-							placeholder="请选择学历"></el-input>
+					<el-form-item label="证书号" prop="renCai.Phone">
+						<el-input v-model="classForm.renCai.Phone" type="text" auto-complete="off"
+							placeholder="请输入证书号"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="职称" prop="ZhiCheng">
+						<el-input v-model="classForm.ZhiCheng" type="text" auto-complete="off"
+							placeholder="请输入职称"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="8">
+					<el-form-item label="职称专业" prop="ZhiCheng">
+						<el-input v-model="classForm.ZhiCheng" type="text" auto-complete="off"
+							placeholder="请输入职称专业"></el-input>
 					</el-form-item>
 				</el-col>
 				<el-col :span="8">
-					<el-form-item label="证书有效期至" prop="JLYxqz">
+					<el-form-item label="职称评定时间">
 						<!-- <el-input v-model="classForm.qyname" type="text" auto-complete="off"
 							placeholder="请输入证书有效期"></el-input> -->
-						<el-date-picker v-model="classForm.JLYxqz" readonly type="date" placeholder="选择日期时间"> </el-date-picker>
+						<el-date-picker v-model="classForm.renCai.JLYxqz" readonly type="date" placeholder="选择日期时间"> </el-date-picker>
 					</el-form-item>
 				</el-col>
-				<el-col :span="16">
-					<el-form-item label="毕业院校" prop="BYschool">
-						<el-input v-model="classForm.BYschool" type="text" auto-complete="off"
-							placeholder="请输入毕业院校"></el-input>
+				<el-col :span="8">
+					<el-form-item label="工作年限" prop="ZhiCheng">
+						<el-input v-model="classForm.ZhiCheng" type="text" auto-complete="off"
+							placeholder="请输入工作年限"></el-input>
 					</el-form-item>
 				</el-col>
 				<el-col :span="8">
-					<el-form-item label="职称" prop="ZhiCheng">
-						<el-input v-model="classForm.ZhiCheng" type="text" readonly auto-complete="off"
-							placeholder="请输入职称"></el-input>
+					<el-form-item label="监理工作年限" prop="ZhiCheng">
+						<el-input v-model="classForm.ZhiCheng" type="text" auto-complete="off"
+							placeholder="请输入监理工作年限"></el-input>
 					</el-form-item>
 				</el-col>
-				<el-col :span="16">
-					<el-form-item label="职称批准单位" prop="ZCpizhunDept">
-						<el-input v-model="classForm.ZCpizhunDept" type="text" auto-complete="off"
-							placeholder="请输入职称批准单位"></el-input>
+				<el-col :span="8">
+					<el-form-item label="监理工程师证书有效期">
+						<!-- <el-input v-model="classForm.qyname" type="text" auto-complete="off"
+							placeholder="请输入证书有效期"></el-input> -->
+						<el-date-picker v-model="classForm.renCai.JLYxqz" readonly type="date" placeholder="选择日期时间"> </el-date-picker>
 					</el-form-item>
 				</el-col>
 				<el-col :span="8">
-					<el-form-item label="监工证书编号" prop="JLZhengHaoNum">
-						<el-input v-model="classForm.JLZhengHaoNum" type="text" auto-complete="off"
-							placeholder="请输入监工证书编号"></el-input>
+					<el-form-item label="毕业时间">
+						<!-- <el-input v-model="classForm.qyname" type="text" auto-complete="off"
+							placeholder="请输入证书有效期"></el-input> -->
+						<el-date-picker v-model="classForm.renCai.JLYxqz" readonly type="date" placeholder="选择日期时间"> </el-date-picker>
+					</el-form-item>
+				</el-col>
+				<el-col :span="16">
+					<el-form-item label="毕业院校" prop="byyx">
+						<el-input v-model="classForm.byyx" type="text" auto-complete="off"
+							placeholder="请输入毕业院校"></el-input>
+					</el-form-item>
+				</el-col>
+				<el-col :span="16">
+					<el-form-item label="毕业证专业" prop="byyx">
+						<el-input v-model="classForm.byyx" type="text" auto-complete="off"
+							placeholder="请输入毕业证专业"></el-input>
 					</el-form-item>
 				</el-col>
 				<el-col :span="24">
-					<el-form-item label="监理工程师业绩/简历" prop="jianli">
-						<!-- <el-input v-model="classForm.qyname" type="text" auto-complete="off"
-							placeholder="请输入正确的公司全称"></el-input> -->
+					<el-form-item label="监理工程师证书是否为国证" prop="renCai.XueLi">
+						<!-- <el-input v-model="classForm.renCai.XueLi" type="text" auto-complete="off"
+							placeholder="请选择学历"></el-input> -->
+						<el-select v-model="classForm.renCai.XueLi" placeholder="请选择学历" clearable>
+							<el-option v-for="dict in dict.type.jxjy_xl" :key="dict.value" :label="dict.label"
+								:value="dict.value" />
+						</el-select>
+					</el-form-item>
+				</el-col>
+				<el-col :span="24">
+					<el-form-item label="监理工程师业绩/简历">
 						<el-table :data="classForm.jianli" style="width: 100%">
 							<el-table-column label="序号" type="index">
 							</el-table-column>
@@ -166,8 +196,8 @@
 					</el-form-item>
 				</el-col>
 				<el-col :span="24">
-					<el-form-item label="新增简历工程师业绩" prop="Undef1">
-						<el-input v-model="classForm.Undef1" type="textarea" :rows="3" auto-complete="off"
+					<el-form-item label="新增简历工程师业绩" prop="yeji">
+						<el-input v-model="classForm.yeji" type="textarea" :rows="3" auto-complete="off"
 							placeholder="请输入新增简历工程师业绩"></el-input>
 					</el-form-item>
 				</el-col>
@@ -181,117 +211,87 @@
 						注意事项:发票均每人单独开出,在网络报名时,选择付款单位,选择付款单位后,发票将不能更换。开票信息为空的,请联系企业完善开票信息。
 					</div>
 					<div class="m-t-10">
-						<el-form-item label="发票抬头" prop="kplxFlg">
-							<el-radio-group v-model="classForm.kplxFlg">
+						<el-form-item label="发票抬头" prop="yjType">
+							<el-radio-group v-model="classForm.yjType" @change="$refs.classForm.clearValidate(['renCai.Email','qiye.kplx','qiye.kpfs','qiye.kpdw','qiye.nsrsbh','qiye.dzfpyx'])">
 								<el-radio :label="0">不需要开发票</el-radio>
 								<el-radio :label="1">个人</el-radio>
 								<el-radio :label="2">企业</el-radio>
 							</el-radio-group>
 						</el-form-item>
 					</div>
-					<el-row :gutter="40" v-if="classForm.kplxFlg == 1">
+					<el-row :gutter="40" v-if="classForm.yjType == 1">
 						<el-col :span="14">
-							<el-form-item label="个人姓名" prop="kpGRName">
-								<el-input v-model="classForm.kpGRName" readonly type="text" auto-complete="off"></el-input>
+							<el-form-item label="个人姓名">
+								<el-input v-model="classForm.renCai.Name" readonly type="text" auto-complete="off"></el-input>
 							</el-form-item>
 						</el-col>
 						<el-col :span="10">
-							<el-form-item label="个人邮箱" prop="kpGRemail">
-								<el-input v-model="classForm.kpGRemail" type="text" auto-complete="off"
+							<!-- <el-form-item label="个人邮箱" prop="renCai.Email">
+								<el-input v-model="classForm.renCai.Email" type="text" auto-complete="off"
 									placeholder="请输入个人邮箱"></el-input>
+							</el-form-item> -->
+							<el-form-item label="身份证号" prop="renCai.ShenFenZheng">
+								<el-input v-model="classForm.renCai.ShenFenZheng" type="text" @blur="searchPerson" auto-complete="off"
+									placeholder="请输入身份证号"></el-input>
 							</el-form-item>
 						</el-col>
 					</el-row>
-					<el-row :gutter="40" v-if="classForm.kplxFlg == 2">
-						<el-col :span="14">
-							<el-form-item label="开票类型" prop="kplx">
-								<el-input v-model="classForm.kplx" readonly type="text" auto-complete="off"></el-input>
+					<el-row :gutter="40" v-if="classForm.yjType == 2">
+						<el-col :span="12">
+							<el-form-item label="开票类型" prop="qiye.kplx" :rules="{required: true,message: '请联系企业负责人先完善发票信息,再进行报名',trigger: ['blur', 'change']}">
+								<el-input v-model="classForm.qiye.kplx" readonly type="text" auto-complete="off"></el-input>
 							</el-form-item>
 						</el-col>
-						<el-col :span="10">
-							<el-form-item label="开票方式" prop="kpfs">
-								<el-input v-model="classForm.kpfs" readonly type="text" auto-complete="off"></el-input>
+						<!-- <el-col :span="12">
+							<el-form-item label="开票方式" prop="qiye.kpfs" :rules="{required: true,message: '请联系企业负责人先完善发票信息,再进行报名',trigger: ['blur', 'change']}">
+								<el-input v-model="classForm.qiye.kpfs" readonly type="text" auto-complete="off"></el-input>
 							</el-form-item>
-						</el-col>
-						<el-col :span="14">
-							<el-form-item label="开票单位" prop="kpdw">
-								<el-input v-model="classForm.kpdw" readonly type="text" auto-complete="off"></el-input>
+						</el-col> -->
+						<el-col :span="12">
+							<el-form-item label="开票单位" prop="qiye.kpdw" :rules="{required: true,message: '请联系企业负责人先完善发票信息,再进行报名',trigger: ['blur', 'change']}">
+								<el-input v-model="classForm.qiye.kpdw" readonly type="text" auto-complete="off"></el-input>
 							</el-form-item>
 						</el-col>
-						<el-col :span="10">
-							<el-form-item label="纳税人识别号" prop="nsrsbh">
-								<el-input v-model="classForm.nsrsbh" readonly type="text" auto-complete="off"></el-input>
+						<el-col :span="12">
+							<el-form-item label="纳税人识别号" prop="qiye.nsrsbh" :rules="{required: true,message: '请联系企业负责人先完善发票信息,再进行报名',trigger: ['blur', 'change']}">
+								<el-input v-model="classForm.qiye.nsrsbh" readonly type="text" auto-complete="off"></el-input>
 							</el-form-item>
 						</el-col>
 						<el-col :span="24">
-							<el-form-item label="电子发票邮箱" prop="dzfpyx">
-								<el-input v-model="classForm.dzfpyx" readonly type="text" auto-complete="off"></el-input>
+							<el-form-item label="电子发票邮箱" prop="qiye.dzfpyx" :rules="{required: true,message: '请联系企业负责人先完善发票信息,再进行报名',trigger: ['blur', 'change']}">
+								<el-input v-model="classForm.qiye.dzfpyx" readonly type="text" auto-complete="off"></el-input>
 							</el-form-item>
 						</el-col>
 					</el-row>
 				</el-col>
-				<el-col :span="24">
-					<div class="formTitle m-b-20">
-						邮寄信息
-					</div>
-				</el-col>
-				<el-col :span="16">
-					<el-form-item label="收件人姓名" prop="yjSjr">
-						<el-input v-model="classForm.sjr" readonly type="text" auto-complete="off"
-							placeholder="请输入收件人姓名"></el-input>
-					</el-form-item>
-				</el-col>
-				<el-col :span="8">
-					<el-form-item label="收件人手机" prop="yjSjphone">
-						<el-input v-model="classForm.sjrsj" readonly type="text" auto-complete="off"
-							placeholder="请输入收件人手机"></el-input>
-					</el-form-item>
-				</el-col>
-				<el-col :span="16">
-					<el-form-item label="邮寄地址" prop="yjAddress">
-						<el-input v-model="classForm.yjdz" readonly type="text" auto-complete="off"
-							placeholder="请输入邮寄地址"></el-input>
-					</el-form-item>
-				</el-col>
-				<el-col :span="8">
-					<el-form-item label="邮政编码" prop="yjCode">
-						<el-input v-model="classForm.yjbm" readonly type="text" auto-complete="off"
-							placeholder="请输入邮政编码"></el-input>
-					</el-form-item>
-				</el-col>
-				<el-col :span="24">
-					<div style="color: #F56C6C;">
-						注意事项:发票统一邮寄到付款单位,不单独邮寄给分公司或者个人。
-					</div>
-				</el-col>
 				<el-col :span="24">
 					<div class="formTitle m-b-20">
 						证件上传
 					</div>
 				</el-col>
 				<el-col :span="24">
-					<el-form-item label="身份证上传" prop="qyname">
-						<el-upload class="avatar-uploader" :action="uploadUrl" limit="1" list-type="picture-card" :file-list="fileList0"
+					<el-form-item label="身份证上传" prop="personcord.0.ZJImgUrl">
+						<el-upload class="avatar-uploader" :action="uploadUrl" :limit="1" list-type="picture-card" :file-list="fileList0"
 							:on-success="function(file){return handleAvatarSuccess(file,0)}" :on-remove="function(file){return handleRemove(file,0)}"
-							:class="classForm.fj0 == null?'':'hide'">
+							:class="classForm.personcord[0].ZJImgUrl == null?'':'hide'">
 							<i class="el-icon-plus"></i>
 						</el-upload>
 					</el-form-item>
 				</el-col>
 				<el-col :span="24">
-					<el-form-item label="毕业证上传" prop="qyname">
-						<el-upload class="avatar-uploader" :action="uploadUrl" limit="1" list-type="picture-card" :file-list="fileList1"
+					<el-form-item label="监理工程师证书扫描件上传" prop="personcord.1.ZJImgUrl" >
+						<el-upload class="avatar-uploader" :action="uploadUrl" :limit="1" list-type="picture-card" :file-list="fileList1"
 							:on-success="function(file){return handleAvatarSuccess(file,1)}" :on-remove="function(file){return handleRemove(file,1)}"
-							:class="classForm.jf1 == null?'':'hide'">
+							:class="classForm.personcord[1].ZJImgUrl == null?'':'hide'">
 							<i class="el-icon-plus"></i>
 						</el-upload>
 					</el-form-item>
 				</el-col>
 				<el-col :span="24">
-					<el-form-item label="职称证上传" prop="qyname">
-						<el-upload class="avatar-uploader" :action="uploadUrl" limit="1" list-type="picture-card" :file-list="fileList2"
+					<el-form-item label="职称证上传" prop="personcord.2.ZJImgUrl">
+						<el-upload class="avatar-uploader" :action="uploadUrl" :limit="1" list-type="picture-card" :file-list="fileList2"
 							:on-success="function(file){return handleAvatarSuccess(file,2)}" :on-remove="function(file){return handleRemove(file,2)}"
-							:class="classForm.jf3 == null?'':'hide'">
+							:class="classForm.personcord[2].ZJImgUrl == null?'':'hide'">
 							<i class="el-icon-plus"></i>
 						</el-upload>
 					</el-form-item>
@@ -302,9 +302,8 @@
 </template>
 
 <script>
-	import { getminzu } from "../../../utils/ruoyi"
-import {
-		getQy
+	import {
+		getQy,jxjyBm
 	} from "@/api/userIndex"
 	import {
 		getPersonInfo,
@@ -312,56 +311,140 @@ import {
 	} from "@/api/xiehui/jxjy/Person"
 	export default {
 		name: "Zj",
+		props:{
+			info: { // 传入的继续教育name
+				type: Object,
+				default: {},
+			},
+		},
+		dicts: ['jxjy_xl'],
 		data() {
 			return {
 				uploadUrl: process.env.VUE_APP_BASE_API + "/common/upload", //上传路径
 				loading: false, //按钮加载
 				classForm: {
-					TrainId: null, //培训计划id
-					qyinfo: null,
-					type: null,
-					ShenFenZheng: '430221198101145916',
-					kplxFlg: 1, //开票类型
-					kpGRName: null, //开票个人姓名
-					kpGRemail: null, //开票个人邮箱
-					yyzz: null,
-					jianli: [], //简历
-					fj0:null,//身份证
-					fj1:null,//毕业证
-					fj3:null,//职称证
+					id: this.info.id, //继续教育id
+					renCai:{
+						ShenFenZheng:'152131196304260314',
+					},//人员信息
+					yeji:null,//业绩
+					personcord:[
+						{
+							ZJLX:"0",ZJImgUrl:null,
+						},{
+							ZJLX:"1",ZJImgUrl:null,
+						},
+						{
+							ZJLX:"3",ZJImgUrl:null,
+						}
+					],//附件
+					qiye:{
+						qyinfo:null,//所选企业索引
+					},//企业信息
+					yjType:null,//开票类型 0不开 1个人 2企业
+					byyx:null,//毕业院校
+					zcpzdw:null,//职称批准单位
+					jianli:[],//已有的简历列表
+					kpGRName:"个人"
 				},
 				classRules: {
-					ShenFenZheng: {
+					'renCai.ShenFenZheng': {
 						required: true,
 						message: '请输入身份证号',
 						trigger: ['blur', 'change']
 					},
-					kpGRemail:{
+					'renCai.Email':{
 						required: true,
 						message: '请输入邮箱',
+						trigger: ['blur']
+					},
+					'renCai.Phone':{
+						required: true,
+						message: '请输入联系电话',
 						trigger: ['blur', 'change']
-					}
+					},
+					'renCai.XueLi':{
+						required: true,
+						message: '请选择学历',
+						trigger: ['blur', 'change']
+					},
+					'renCai.zhi':{
+						required: true,
+						message: '请选择学历',
+						trigger: ['blur', 'change']
+					},
+					byyx:{
+						required: true,
+						message: '请填写毕业院校',
+						trigger: ['blur', 'change']
+					},
+					zcpzdw:{
+						required: true,
+						message: '请填写职称批准单位',
+						trigger: ['blur', 'change']
+					},
+					'renCai.ZhiCheng':{
+						required: true,
+						message: '请填写职称',
+						trigger: ['blur', 'change']
+					},
+					yeji:[
+						{
+							required: true,
+							message: '请填写监理工程师业绩/简历',
+							trigger: ['blur', 'change']
+						},
+						{ min: 10, message: '业绩内容需为10字以上', trigger: 'blur' }
+					],
+					yjType:{
+						required: true,
+						message: '请选择开票抬头',
+						trigger: ['blur', 'change']
+					},
+					'personcord.0.ZJImgUrl':{required: true,message: '请上传身份证',trigger: ['blur', 'change']},
+					'personcord.1.ZJImgUrl':{required: true,message: '请上传毕业证',trigger: ['blur', 'change']},
+					'personcord.2.ZJImgUrl':{required: true,message: '请上传职称证',trigger: ['blur', 'change']}
 				},
 				//企业列表
 				options: [],
-				fileList0:[],//身份证
-				fileList1:[],//毕业证
-				fileList2:[],//职称证
+				fileList0:[],
+				fileList1:[],
+				fileList2:[],
 				baseUrl: process.env.VUE_APP_BASE_API,
-				minzuList:this.getminzu()
 			}
 		},
 		methods: {
-			handleRegister() {
-				this.$emit('submitSuccess', 1)
-				// this.$refs.classForm.validate(valid => {
-				// 	if (valid) {
-
-				// 	} else {
-
-				// 	}
-				// })
-
+			//表单重置
+			reset(){
+				this.options = []
+				this.classForm = {
+					id: null, //继续教育id
+					renCai:{
+						ShenFenZheng:'152131196304260314',
+					},//人员信息
+					yeji:null,//业绩
+					personcord:[
+						{
+							UserCord:null,ZJLX:"0",ZJImgUrl:null,
+						},{
+							UserCord:null,ZJLX:"1",ZJImgUrl:null,
+						},
+						{
+							UserCord:null,ZJLX:"3",ZJImgUrl:null,
+						}
+					],//附件
+					qiye:{
+						qyinfo:null,//所选企业索引
+					},//企业信息
+					yjType:null,//开票类型 0不开 1个人 2企业
+					byyx:null,//毕业院校
+					zcpzdw:null,//职称批准单位
+					jianli:[],//已有的简历列表
+				}
+				this.fileList0 = []
+				this.fileList1 = []
+				this.fileList2 = []
+				this.resetForm("classForm")
 			},
 			//查询企业
 			remoteMethod(query) {
@@ -379,19 +462,19 @@ import {
 			},
 			//选择企业
 			chooseQy(v) {
-				this.classForm = {
-					...this.classForm,
+				this.classForm.qiye = {
+					...this.classForm.qiye,
 					...this.options[v]
 				}
-				this.classForm.sjr = this.options[v].yjSjr
-				this.classForm.sjrsj = this.options[v].yjSjphone
-				this.classForm.yjdz = this.options[v].yjAddress
-				this.classForm.yjbm = this.options[v].yjCode
+				// this.classForm.sjr = this.options[v].yjSjr
+				// this.classForm.sjrsj = this.options[v].yjSjphone
+				// this.classForm.yjdz = this.options[v].yjAddress
+				// this.classForm.yjbm = this.options[v].yjCode
 				// this.form = 
 			},
 			//根据身份证号查询人员信息
 			searchPerson() {
-				if (this.classForm.qyinfo == null) {
+				if (this.classForm.qiye.qyinfo == null) {
 					this.$message({
 						type: "error",
 						message: "请先选择企业"
@@ -400,28 +483,37 @@ import {
 					this.$refs.classForm.validate((valid, results) => {
 						if (results.UserCord == undefined) {
 							getPersonInfo({
-								ShenFenZheng: this.classForm.ShenFenZheng,
-								Dept: this.classForm.qyname
+								ShenFenZheng: this.classForm.renCai.ShenFenZheng,
+								Dept: this.classForm.qiye.qyname
 							}).then(res => {
-								this.classForm = {
-									...this.classForm,
+								this.classForm.renCai = {
+									...this.classForm.renCai,
 									...res.data
 								}
-								this.classForm.kpGRName = res.data.Name
+								this.classForm.personcord[0].UserCord = res.data.ShenFenZheng
+								this.classForm.personcord[1].UserCord = res.data.ShenFenZheng
+								this.classForm.personcord[2].UserCord = res.data.ShenFenZheng
 								for(let i in res.data.personcords){
-									if(res.data.personcords[i].ZJLX == '0'){
-										this.classForm.fj0 = res.data.personcords[i].ZJImgUrl
+									if(res.data.personcords[i].ZJLX == '0' && i<3){
+										this.classForm.personcord[0].ZJImgUrl = res.data.personcords[i].ZJImgUrl
+										this.classForm.personcord[0] = {...res.data.personcords[i],...this.classForm.personcord[0]}
 										this.fileList0 = [ {url:this.baseUrl+res.data.personcords[i].ZJImgUrl}]
-									}else if(res.data.personcords[i].ZJLX == '1'){
-										this.classForm.fj1 = res.data.personcords[i].ZJImgUrl
+										this.$refs.classForm.validateField('personcord.0.ZJImgUrl')
+									}else if(res.data.personcords[i].ZJLX == '1' && i<3){
+										this.classForm.personcord[1].ZJImgUrl = res.data.personcords[i].ZJImgUrl
+										this.classForm.personcord[1] = {...res.data.personcords[i],...this.classForm.personcord[1]}
 										this.fileList1 = [ {url:this.baseUrl+res.data.personcords[i].ZJImgUrl}]
-									}else if(res.data.personcords[i].ZJLX == '3'){
-										this.classForm.fj3 = res.data.personcords[i].ZJImgUrl
+										this.$refs.classForm.validateField('personcord.1.ZJImgUrl')
+									}else if(res.data.personcords[i].ZJLX == '3' && i<3){
+										this.classForm.personcord[2].ZJImgUrl = res.data.personcords[i].ZJImgUrl
+										this.classForm.personcord[2] = {...res.data.personcords[i],...this.classForm.personcord[2]}
 										this.fileList2 = [ {url:this.baseUrl+res.data.personcords[i].ZJImgUrl}]
+										this.$refs.classForm.validateField('personcord.2.ZJImgUrl')
 									}
 								}
+								this.$forceUpdate()
 								getYeji({
-									ShenFenZheng: this.classForm.ShenFenZheng
+									ShenFenZheng: this.classForm.renCai.ShenFenZheng
 								}).then(qwe => {
 									this.classForm.jianli = qwe.data
 								})
@@ -434,26 +526,48 @@ import {
 			//上传成功
 			handleAvatarSuccess(file,index) {
 				if(index == 0){
-					this.classForm.fj0 = file.fileName
-					this.$refs.registerForm.validateField('fj0')
+					this.classForm.personcord[0].ZJImgUrl = file.fileName
+					this.$refs.classForm.validateField('personcord.0.ZJImgUrl')
+					this.$forceUpdate()
 				}else if(index == 1){
-					this.classForm.fj1 = file.fileName
-					this.$refs.registerForm.validateField('fj1')
+					this.classForm.personcord[1].ZJImgUrl = file.fileName
+					this.$refs.classForm.validateField('personcord.1.ZJImgUrl')
+					this.$forceUpdate()
 				}else{
-					this.classForm.fj3 = file.fileName
-					this.$refs.registerForm.validateField('fj3')
+					this.classForm.personcord[2].ZJImgUrl = file.fileName
+					this.$refs.classForm.validateField('personcord.2.ZJImgUrl')
+					this.$forceUpdate()
 				}
 			},
 			//移除成功
 			handleRemove(file,index) {
 				// this.classForm.yyzz = null
 				if(index == 0){
-					this.classForm.fj0 = null
+					this.classForm.personcord[0].ZJImgUrl = null
+					this.fileList0 = []
 				}else if(index == 1){
-					this.classForm.fj1 = null
+					this.classForm.personcord[1].ZJImgUrl = null
+					this.fileList1 = []
 				}else{
-					this.classForm.fj3 = null
+					this.classForm.personcord[2].ZJImgUrl = null
+					this.fileList2 = []
 				}
+			},
+			submit(){
+				this.$refs.classForm.validate(valid => {
+					if (valid) {
+						jxjyBm(this.classForm).then(res=>{
+							this.$message({
+								type:"success",
+								message:res.msg
+							})
+							this.reset()
+							this.$emit('submitSuccess',false)
+						})
+					} else {
+				
+					}
+				})
 			}
 			
 		}

+ 24 - 7
src/views/components/shijuan/danxuan.vue

@@ -1,13 +1,13 @@
 <template>
-	<div :style="{backgroundColor:StandardAnswer == null?'':'#F2F6FC'}" style="padding: 20px;">
+	<div :style="{backgroundColor:StandardAnswer == ''?'':'#F2F6FC'}" style="padding: 20px;">
 		<div style="font-size: 16px;">
-			<span>{{(index+1)+". "}}{{getContent.TestContent}}</span><span style="color: #F56C6C;">({{getContent.TestMark
+			<span>{{content.tihao+". "}}{{getContent.TestContent}}</span><span style="color: #F56C6C;">({{getContent.TestMark
 }}分)</span>
 		</div>
 		<div style="padding-left: 20px;margin-top:20px">
 			<div style="display: flex;align-items: center;margin-bottom: 18px;" v-for="(v,i) in getContent.OptionContent
 " :key="v">
-				<el-radio v-model="StandardAnswer" :label="abc[i]">
+				<el-radio v-model="StandardAnswer" :label="abc[i]" @change="chooseXx">
 					<span style="font-weight: bold;font-size: 16px;">
 						{{abc[i]+". "}}
 					</span>
@@ -25,6 +25,7 @@
 </template>
 
 <script>
+import { number } from 'echarts';
 	export default {
 		name:"Danxuan",
 		props: {
@@ -39,25 +40,41 @@
 			show:{
 				type:Boolean,
 				default:true
+			},
+			fIndex:{
+				type:Number,
+				default:null
 			}
 		},
 		data() {
 			return {
 				abc:["A","B","C","D","E","F"],
-				StandardAnswer:null,
+				StandardAnswer:"",
+				tmInfo:{}
 			};
 		},
 		computed: {
 			getContent(){
-				this.content.OptionContent = this.content.OptionContent.split("|")
-				return this.content
+				this.tmInfo = null
+				this.tmInfo = {...this.content}
+				this.tmInfo.OptionContent = this.tmInfo.OptionContent.split("|")
+				this.StandardAnswer = this.tmInfo.userAnswer
+				return this.tmInfo
 			}
 		},
 		mounted() {
 			
 		},
 		methods: {
-			
+			chooseXx(e){ 
+				let obj = {
+					fIndex:this.fIndex,
+					index:this.index,
+					xx:e,
+					tihao:this.content.tihao
+				}
+				this.$emit("chooseXx",obj)
+			}
 		},
 	};
 </script>

+ 43 - 14
src/views/components/shijuan/duoxuan.vue

@@ -1,7 +1,7 @@
 <template>
-	<div :style="{backgroundColor:StandardAnswer == null?'':'#F2F6FC'}" style="padding: 20px;">
+	<div :style="{backgroundColor:daAn.length == 0?'':'#F2F6FC'}" style="padding: 20px;">
 		<div style="font-size: 16px;">
-			<span>{{(index+1)+". "}}{{getContent.TestContent}}</span><span style="color: #F56C6C;">({{getContent.TestMark
+			<span>{{content.tihao+". "}}{{getContent.TestContent}}</span><span style="color: #F56C6C;">({{getContent.TestMark
 }}分)</span>
 		</div>
 		<div style="padding-left: 20px;margin-top:20px">
@@ -40,32 +40,61 @@
 			show:{
 				type:Boolean,
 				default:true
+			},
+			fIndex:{
+				type:Number,
+				default:null
 			}
 		},
 		data() {
 			return {
 				abc:["A","B","C","D","E","F"],
-				StandardAnswer:null,
-				checks:[]
+				StandardAnswer:"",
+				checks:[],
+				daAn:[],
+				tmInfo:{}
 			};
 		},
 		computed: {
 			getContent(){
-				this.content.OptionContent = this.content.OptionContent.split("|")
-				// for(let i in this.content.OptionContent){
-				// 	this.checks.push(true)
-				// } 
-				return this.content
+				this.tmInfo = null 
+				this.daAn = []
+				this.checks = []
+				this.tmInfo = {...this.content}
+				this.tmInfo.OptionContent = this.tmInfo.OptionContent.split("|") 
+				for(let i in this.tmInfo.OptionContent){
+					this.checks.push(false) 
+				} 
+				if(this.tmInfo.userAnswer != null && this.tmInfo.userAnswer !== ""){
+					this.daAn = this.tmInfo.userAnswer.split("")
+					for(let i in this.daAn){
+						let index = this.abc.findIndex(obj=> obj == this.daAn[i])
+						this.checks[index] = true
+					}
+					console.log(this.checks)
+				} 
+				return this.tmInfo
 			}
 		},
 		mounted() {
-			for(let i in this.content.OptionContent){
-				this.checks.push(false)
-			} 
+			
 		},
 		methods: {
-			chooseDa(v,e){
-				this.checks[v] = e
+			chooseDa(i,e){
+				this.checks[i] = e
+				if(e == true){
+					this.daAn.push(this.abc[i])
+				}else{
+					let index = this.daAn.findIndex(obj=> obj == this.abc[i])
+					this.daAn.splice(index,1)
+				}
+				let obj = {
+					fIndex:this.fIndex,
+					index:this.index,
+					xx:this.daAn.join(""),
+					tihao:this.content.tihao
+				}
+				this.$emit("chooseXx",obj)
 			}
 		},
 	};

+ 23 - 7
src/views/components/shijuan/panduan.vue

@@ -1,11 +1,11 @@
 <template>
-	<div :style="{backgroundColor:StandardAnswer == null?'':'#F2F6FC'}" style="padding: 20px;">
+	<div :style="{backgroundColor:StandardAnswer === ''?'':'#F2F6FC'}" style="padding: 20px;">
 		<div style="font-size: 16px;">
-			<span>{{(index+1)+". "}}{{getContent.TestContent}}</span><span style="color: #F56C6C;">({{getContent.TestMark
+			<span>{{content.tihao+". "}}{{getContent.TestContent}}</span><span style="color: #F56C6C;">({{getContent.TestMark
 }}分)</span>
 		</div>
 		<div style="padding-left: 20px;margin-top:20px">
-			<el-radio-group v-model="StandardAnswer" >
+			<el-radio-group v-model="StandardAnswer" @change="chooseXx">
 				<el-radio :label="'正确'" ><span style="font-size: 16px;">正确</span></el-radio>
 				<el-radio :label="'错误'" ><span style="font-size: 16px;">错误</span></el-radio>
 			</el-radio-group>
@@ -31,24 +31,40 @@
 			show:{
 				type:Boolean,
 				default:true
+			},
+			fIndex:{
+				type:Number,
+				default:null,
 			}
+			
 		},
 		data() {
 			return {
-				StandardAnswer:null,
+				StandardAnswer:"",
+				
 			};
 		},
 		computed: {
 			getContent(){
-				
-				return this.content
+				this.tmInfo = null
+				this.tmInfo = {...this.content}
+				this.StandardAnswer = this.tmInfo.userAnswer
+				return this.tmInfo
 			}
 		},
 		mounted() {
 			
 		},
 		methods: {
-			
+			chooseXx(e){ 
+				let obj = {
+					fIndex:this.fIndex,
+					index:this.index,
+					xx:e,
+					tihao:this.content.tihao
+				}
+				this.$emit("chooseXx",obj)
+			}
 		},
 	};
 </script>

+ 286 - 34
src/views/components/shijuan/zhengjuan.vue

@@ -1,12 +1,13 @@
 <template>
-	<div>
-		<div style="padding: 10px;text-align: center;font-size: 20px;font-weight: bold;border-bottom: 2px solid #60A900;position: relative;">
-			{{title}}
+	<div  >
+		<div
+			style="padding: 10px;text-align: center;font-size: 20px;font-weight: bold;border-bottom: 2px solid #60A900;position: relative;">
+			{{sjConfig.PaperName}}
 			<div style="position: absolute;right: 0;bottom: 10px;font-weight: normal;font-size: 14px;">
-				{{getAllNum}}
+				{{allNum}}
 			</div>
 		</div>
-		<div style="padding: 10px 20px;">
+		<div style="padding: 10px 20px;position: relative;">
 			<div v-for="(v,i) in content" :key="i">
 				<div v-for="(item,key) in v" :key="key">
 					<div v-if="key == '27'">
@@ -46,19 +47,75 @@
 						判断题 ({{'共'+item.count+'题,共'+item.score+'分'}})
 					</div>
 					<div v-for="(value,index) in item.rubricInfos" :key="value.RubricID">
-						<div v-if="key == '27'">
-							<danxuan :content="value" :index="index" :show="show"></danxuan>
+						<div v-if="key == '27'" style="width:calc(100% - 360px);">
+							<danxuan :id="`#question-${value.tihao}`" :content="value" :index="index" :fIndex="i" :show="show" @chooseXx="chooseDanx">
+							</danxuan>
 						</div>
-						<div v-else-if="key == '28'">
-							<duoxuan :content="value" :index="index" :show="show"></duoxuan>
+						<div v-else-if="key == '28'" style="width:calc(100% - 360px);">
+							<duoxuan :id="`#question-${value.tihao}`" :content="value" :index="index" :fIndex="i" :show="show" @chooseXx="chooseDuox">
+							</duoxuan>
 						</div>
-						<div v-else>
-							<panduan :content="value" :index="index" :show="show"></panduan>
+						<div v-else style="width:calc(100% - 360px);">
+							<panduan :id="`#question-${value.tihao}`" :content="value" :index="index" :fIndex="i" :show="show" @chooseXx="choosePand">
+							</panduan>
 						</div>
 					</div>
 				</div>
 			</div>
-			
+			<div class="flex-ac-jc pd-20">
+				<el-button type="primary" @click="submitSj">交 卷</el-button> 
+			</div>
+			<div style="position: fixed;top;width: 384px;top:60px;right:20px;z-index: 99;background-color: #fff;border: 2px solid #ccc;padding:5px 10px;border-radius: 10px;">
+				<div style="color: #F56C6C;font-size: 20px;font-weight: bold;" class="p-b-10">
+					考试剩余时间:{{this.min+" :"+this.miao}}
+				</div>
+				<div v-for="(v,i) in content" :key="i">
+					<div v-for="(item,key) in v" :key="key" >
+						<div v-if="key == '27'" class="m-b-10">
+							<span v-if="i==0">
+								一、
+							</span>
+							<span v-else-if="i==1">
+								二、
+							</span>
+							<span v-else>
+								三、
+							</span>
+							单选题 ({{'共'+item.count+'题,共'+item.score+'分'}})
+						</div>
+						<div v-else-if="key == '28'" class="m-b-10">
+							<span v-if="i==0">
+								一、
+							</span>
+							<span v-else-if="i==1">
+								二、
+							</span>
+							<span v-else>
+								三、
+							</span>
+							多选题 ({{'共'+item.count+'题,共'+item.score+'分'}})
+						</div>
+						<div v-else class="m-b-10" >
+							<span v-if="i==0">
+								一、
+							</span>
+							<span v-else-if="i==1">
+								二、
+							</span>
+							<span v-else>
+								三、
+							</span>
+							判断题 ({{'共'+item.count+'题,共'+item.score+'分'}})
+						</div>
+						<div style="width: 100%;display: flex;flex-wrap: wrap;box-sizing: border-box;border-collapse: collapse;" class="m-b-10"> 
+							<div v-for="(value,index) in item.rubricInfos" :key="value.RubricID" style="width: 60px;border:1px solid #ccc;margin-bottom:-1px;margin-right: -1px;" class="pd-10 flex-ac-jc tihao" :style="{backgroundColor:value.userAnswer !==''?'#9dddff':'#fff'}" @click="scrollToQuestion(index,value)"  >
+								{{value.tihao}}
+							</div>
+						</div>
+						
+					</div>
+				</div>
+			</div>
 		</div>
 	</div>
 </template>
@@ -67,49 +124,244 @@
 	import danxuan from "./danxuan.vue"
 	import duoxuan from "./duoxuan.vue"
 	import panduan from "./panduan.vue"
+	import {
+		submitDaan
+	} from "@/api/jianliyuan/index"
 	export default {
-		name:"Zhengjuan",
+		name: "Zhengjuan",
 		props: {
 			content: { // 传入的地址
 				type: Object,
-				default:null,
+				default: null,
+			},
+			sjConfig: {
+				type: Object,
+				default: null
 			},
-			title:{
-				type:String,
-				default:null,
+			personId:{
+				type:Number,
+				default:null
 			}
 		},
-		components:{
-			danxuan,duoxuan,panduan
+		components: {
+			danxuan,
+			duoxuan,
+			panduan
 		},
 		data() {
 			return {
-				show:false,
-				answerList:[]
+				show: false,
+				answerList: [],
+				allNum: null,
+				min:null,
+				second:59,
+				miao:59,
+				ti:null,
+				startTime:null,
 			};
 		},
 		computed: {
-			getAllNum(){
+			
+		},
+		mounted() { 
+			this.startTime = this.parseTime(new Date(),'{y}-{m}-{d} {h}:{i}:{s}')
+			this.getAllNum()
+			this.min = this.sjConfig.ExamTime-1
+			this.ti = setInterval(()=>{
+				this.second --
+				if(this.second == 59){
+					this.min --
+					if(this.min == 0){
+						clearInterval(this.ti) 
+						this.$msgbox({
+						    title: '提示',
+						    message:"答题时间已到,请交卷。",
+						    showCancelButton: true,
+						    confirmButtonText: '交 卷',
+							showCancelButton:false,
+							showClose:false,
+						    beforeClose: (action, instance, done) => {
+						        if (action === 'confirm') {
+						            instance.confirmButtonLoading = true;
+						            instance.confirmButtonText = '交卷中...';
+						            submitDaan({
+										startTime:this.startTime,
+										endTime:this.parseTime(new Date(),'{y}-{m}-{d} {h}:{i}:{s}'),
+										paperInfo:this.sjConfig,
+						            	list:arry,
+						            	personId:this.personId,
+						            	userId:this.$store.state.user.userInfo.ID
+						            }).then(res=>{
+						            	done();
+										instance.confirmButtonLoading = false;
+										setTimeout(()=>{
+											this.tc(res.data)
+										},50)
+						            })
+						        } else {
+									done();
+						        }
+						    }
+						})
+					}
+				}
+				if(this.second>=10){
+					this.miao = this.second
+				}else if(this.second<10 ){
+					this.miao = '0'+this.second
+				}
+				if(this.second == 0){
+					this.second = 60
+				}
+				
+			},1000)
+		},
+		methods: { 
+			getAllNum() {
 				let num = 0
 				let score = 0
-				for(let i in this.content){
-					for(let q in this.content[i]){
+				for (let i in this.content) {
+					this.answerList.push([])
+					for (let q in this.content[i]) {
+						this.answerList[i] = this.content[i][q].rubricInfos.map(item => {
+							item.userAnswer = ""
+							return item
+						})
 						num += this.content[i][q].count
 						score += this.content[i][q].score
 					}
 				}
-				return "总共"+num+"题 共"+score+"分"
-			}
-		},
-		mounted() {
-			
-		},
-		methods: {
-			
+				this.allNum = "总共" + num + "题 共" + score + "分" 
+			},
+			//选择单选
+			chooseDanx(e) { 
+				this.answerList[e.fIndex][e.index].userAnswer = e.xx
+			},
+			//多选
+			chooseDuox(e) {
+				this.answerList[e.fIndex][e.index].userAnswer = e.xx
+			},
+			//判断
+			choosePand(e) {
+				this.answerList[e.fIndex][e.index].userAnswer = e.xx
+			},
+			//提交试卷
+			submitSj() {
+				let arry = [].concat(...this.answerList)
+				for (let i in arry) {
+					if (arry[i].userAnswer === "") {
+						this.$msgbox({
+						    title: '提示',
+						    message:"题目未全部答完,是否交卷?",
+						    showCancelButton: true,
+						    confirmButtonText: '交 卷',
+						    cancelButtonText: '取 消',
+							showClose:false,
+						    beforeClose: (action, instance, done) => {
+						        if (action === 'confirm') {
+						            instance.confirmButtonLoading = true;
+						            instance.confirmButtonText = '交卷中...';
+						            submitDaan({
+										startTime:this.startTime,
+										endTime:this.parseTime(new Date(),'{y}-{m}-{d} {h}:{i}:{s}'),
+										paperInfo:this.sjConfig,
+						            	list:arry,
+						            	personId:this.personId,
+						            	userId:this.$store.state.user.userInfo.ID
+						            }).then(res=>{
+						            	done();
+										instance.confirmButtonLoading = false;
+										setTimeout(()=>{
+											this.tc(res.data)
+										},50)
+						            })
+						        } else {
+									done();
+						        }
+						    }
+						})
+						return
+					}
+				}
+				this.$msgbox({
+				    title: '提示',
+				    message:"是否进行交卷?",
+				    showCancelButton: true,
+				    confirmButtonText: '交 卷',
+				    cancelButtonText: '取 消',
+					showClose:false,
+				    beforeClose: (action, instance, done) => {
+				        if (action === 'confirm') {
+				            instance.confirmButtonLoading = true;
+				            instance.confirmButtonText = '交卷中...';
+				            submitDaan({
+								startTime:this.startTime,
+								endTime:this.parseTime(new Date(),'{y}-{m}-{d} {h}:{i}:{s}'),
+								paperInfo:this.sjConfig,
+				            	list:arry,
+				            	personId:this.personId,
+				            	userId:this.$store.state.user.userInfo.ID
+				            }).then(res=>{
+				            	done();
+								instance.confirmButtonLoading = false;
+								setTimeout(()=>{
+									this.tc(res.data)
+								},50)
+				            })
+				        } else {
+							done();
+				        }
+				    }
+				})
+			},
+			scrollToQuestion(index,value) {  
+			  const questionId = `#question-${value.tihao}`;  
+			  const questionElement = document.getElementById(questionId);  
+		  
+			  if (questionElement) {    
+				questionElement.scrollIntoView({ behavior: 'smooth' });  
+			  }  
+			}, 
+			 //成绩弹窗
+			 tc(data){
+			 	this.$alert(`您的成绩是${data.TotalMark},试卷详情请到考试成绩菜单进行查看`, '提示', {
+			 		confirmButtonText: '确定',
+			 		showClose:false,
+			 		callback: action => {
+			 			this.$emit("subSuccess",data)
+			 		}
+			 	});
+			 }
 		},
 	};
 </script>
 
-<style>
-	
+<style scoped lang="scss">
+	.b-t-2{
+		border-top: 2px solid #ccc;
+	}
+	.b-t-1{
+		border-top: 1px solid #ccc;
+	}
+	.b-l-2{
+		border-left: 2px solid #ccc;
+	}
+	.b-l-1{
+		border-left: 1px solid #ccc;
+	}
+	.b-r-2{
+		border-right: 2px solid #ccc;
+	}
+	.b-r-1{
+		border-right: 1px solid #ccc;
+	}
+	.b-b-2{
+		border-bottom: 2px solid #ccc;
+	}
+	.b-b-1{
+		border-bottom: 1px solid #ccc;
+	}
+	.tihao:hover{
+		cursor: pointer;
+	}
 </style>

+ 381 - 1
src/views/components/shijuan/zhuti.vue

@@ -1,8 +1,388 @@
 <template>
+	<div  >
+		<div
+			style="padding: 10px;text-align: center;font-size: 20px;font-weight: bold;border-bottom: 2px solid #60A900;position: relative;">
+			{{sjConfig.PaperName}}
+			<div style="position: absolute;right: 0;bottom: 10px;font-weight: normal;font-size: 14px;">
+				{{allNum}}
+			</div>
+		</div>
+		<el-row :gutter="40">
+			<el-col :span="6">
+				<div style="background-color: #fff;border: 2px solid #ccc;padding:5px 10px;border-radius: 10px;" class="m-t-10">
+					<div style="color: #F56C6C;font-size: 20px;font-weight: bold;" class="p-b-10">
+						考试剩余时间:{{this.min+" :"+this.miao}}
+					</div>
+					<div v-for="(v,i) in content" :key="i">
+						<div v-for="(item,key) in v" :key="key" >
+							<div v-if="key == '27'" class="m-b-10">
+								<span v-if="i==0">
+									一、
+								</span>
+								<span v-else-if="i==1">
+									二、
+								</span>
+								<span v-else>
+									三、
+								</span>
+								单选题 ({{'共'+item.count+'题,共'+item.score+'分'}})
+							</div>
+							<div v-else-if="key == '28'" class="m-b-10">
+								<span v-if="i==0">
+									一、
+								</span>
+								<span v-else-if="i==1">
+									二、
+								</span>
+								<span v-else>
+									三、
+								</span>
+								多选题 ({{'共'+item.count+'题,共'+item.score+'分'}})
+							</div>
+							<div v-else class="m-b-10"                  >
+								<span v-if="i==0">
+									一、
+								</span>
+								<span v-else-if="i==1">
+									二、
+								</span>
+								<span v-else>
+									三、
+								</span>
+								判断题 ({{'共'+item.count+'题,共'+item.score+'分'}})
+							</div>
+							<div style="width: 100%;display: flex;flex-wrap: wrap;box-sizing: border-box;border-collapse: collapse;" class="m-b-10"> 
+								<div v-for="(value,index) in item.rubricInfos" :key="value.RubricID" style="width: calc(100% / 6);border:1px solid #ccc;margin-bottom:-1px;margin-right: -1px;" class="pd-10 flex-ac-jc tihao" :style="{backgroundColor:answerList[value.tihao-1].userAnswer !==''?'#9dddff':'#fff'}" @click="scrollToQuestion(value.tihao)"  >
+									{{value.tihao}}
+								</div>
+							</div>
+							
+						</div>
+					</div>
+				</div>
+			</el-col>
+			<el-col :span="18">
+				<div class="pd-20" style="font-size: 18px;">
+					<div v-if="answerList[tmIndex].tmType == '27'">
+						<span v-if="answerList[tmIndex].fIndex == 0">
+							一、
+						</span>
+						<span v-else-if="answerList[tmIndex].fIndex == 1">
+							二、
+						</span>
+						<span v-else>
+							三、
+						</span>
+						单选题 ({{'共'+answerList[tmIndex].num+'题,共'+answerList[tmIndex].score+'分'}})
+					</div>
+					<div v-else-if="answerList[tmIndex].tmType == '28'">
+						<span v-if="answerList[tmIndex].fIndex == 0">
+							一、
+						</span>
+						<span v-else-if="answerList[tmIndex].fIndex == 1">
+							二、
+						</span>
+						<span v-else>
+							三、
+						</span>
+						多选题 ({{'共'+answerList[tmIndex].num+'题,共'+answerList[tmIndex].score+'分'}})
+					</div>
+					<div v-else-if="answerList[tmIndex].tmType == '29'">
+						<span v-if="answerList[tmIndex].fIndex == 0">
+							一、
+						</span>
+						<span v-else-if="answerList[tmIndex].fIndex == 1">
+							二、
+						</span>
+						<span v-else>
+							三、
+						</span>
+						判断题 ({{'共'+answerList[tmIndex].num+'题,共'+answerList[tmIndex].score+'分'}})
+					</div>
+				</div>
+				<div style="height: 50vh;">
+					<div v-if="answerList[tmIndex].tmType == '27'" >
+						<danxuan  :content="answerList[tmIndex]" :index="index" :fIndex="i" :show="show" @chooseXx="chooseDanx">
+						</danxuan>
+					</div>
+					<div v-else-if="answerList[tmIndex].tmType == '28'" >
+						<duoxuan  :content="answerList[tmIndex]" :index="index" :fIndex="i" :show="show" @chooseXx="chooseDuox">
+						</duoxuan>
+					</div>
+					<div v-else-if="answerList[tmIndex].tmType == '29'" >
+						<panduan :content="answerList[tmIndex]" :index="index" :fIndex="i" :show="show" @chooseXx="choosePand">
+						</panduan>
+					</div>
+				</div>
+				<div class="flex-ac-jc">
+					  <el-button type="primary" class="m-r-20" @click="back">上一题</el-button>
+					  <el-button type="primary" class="m-r-20" @click="next">下一题</el-button>
+					  <el-button type="danger" @click="submitSj">交 卷</el-button>
+				</div>
+			</el-col>
+		</el-row>
+	</div>
 </template>
 
 <script>
+	import danxuan from "./danxuan.vue"
+	import duoxuan from "./duoxuan.vue"
+	import panduan from "./panduan.vue"
+	import {
+		submitDaan
+	} from "@/api/jianliyuan/index"
+	export default {
+		name: "Zhuti",
+		props: {
+			content: { // 传入的地址
+				type: Object,
+				default: null,
+			},
+			sjConfig: {
+				type: Object,
+				default: null
+			},
+			personId:{
+				type:Number,
+				default:null
+			}
+		},
+		components: {
+			danxuan,
+			duoxuan,
+			panduan
+		},
+		data() {
+			return {
+				show: false,
+				answerList: [],
+				allNum: null,
+				min:null,
+				second:59,
+				miao:59,
+				ti:null,
+				startTime:null,
+				tmList:[],//题目列表
+				tmIndex:0,//题目索引
+				tmNum:0,//题目数量
+				
+			};
+		},
+		computed: {
+			
+		},
+		mounted() {  
+			this.startTime = this.parseTime(new Date(),'{y}-{m}-{d} {h}:{i}:{s}')
+			this.getAllNum()
+			this.min = this.sjConfig.ExamTime-1
+			this.ti = setInterval(()=>{
+				this.second --
+				if(this.second == 59){
+					this.min --
+					if(this.min == 0){
+						clearInterval(this.ti) 
+						this.$msgbox({
+						    title: '提示',
+						    message:"答题时间已到,请交卷。",
+						    showCancelButton: true,
+						    confirmButtonText: '交 卷',
+							showCancelButton:false,
+							showClose:false,
+						    beforeClose: (action, instance, done) => {
+						        if (action === 'confirm') {
+						            instance.confirmButtonLoading = true;
+						            instance.confirmButtonText = '交卷中...';
+						            submitDaan({
+										startTime:this.startTime,
+										endTime:this.parseTime(new Date(),'{y}-{m}-{d} {h}:{i}:{s}'),
+										paperInfo:this.sjConfig,
+						            	list:arry,
+						            	personId:this.personId,
+						            	userId:this.$store.state.user.userInfo.ID
+						            }).then(res=>{
+						            	done();
+										instance.confirmButtonLoading = false;
+										setTimeout(()=>{
+											this.tc(res.data)
+										},50)
+						            })
+						        } else {
+									done();
+						        }
+						    }
+						})
+					}
+				}
+				if(this.second>=10){
+					this.miao = this.second
+				}else if(this.second<10 ){
+					this.miao = '0'+this.second
+				}
+				if(this.second == 0){
+					this.second = 60
+				}
+				
+			},1000)
+		},
+		methods: {
+			getAllNum() {
+				let num = 0
+				let score = 0
+				for (let i in this.content) {
+					this.answerList.push([])
+					for (let q in this.content[i]) { 
+						this.answerList[i] = this.content[i][q].rubricInfos.map(item => {
+							item.userAnswer = ""
+							item.fIndex = i
+							item.tmType = q
+							item.num = this.content[i][q].count
+							item.score = this.content[i][q].score
+							return item
+						})
+						num += this.content[i][q].count
+						score += this.content[i][q].score
+					}
+				}
+				this.answerList = [].concat(...this.answerList)
+				this.tmNum = num
+				this.allNum = "总共" + num + "题 共" + score + "分"  
+			},
+			//选择单选
+			chooseDanx(e) { 
+				this.answerList[e.tihao-1].userAnswer = e.xx
+			},
+			//多选
+			chooseDuox(e) {
+				this.answerList[e.tihao-1].userAnswer = e.xx
+			},
+			//判断
+			choosePand(e) {
+				this.answerList[e.tihao-1].userAnswer = e.xx
+			},
+			//下一题
+			next(){
+				if(this.tmIndex != this.answerList.length){
+					this.tmIndex ++
+				}
+			},
+			//上一题
+			back(){
+				if(this.tmIndex != 0){
+					this.tmIndex --
+				}
+			},
+			//提交试卷
+			submitSj() {
+				let arry = [].concat(...this.answerList)
+				for (let i in arry) {
+					if (arry[i].userAnswer === "") {
+						this.$msgbox({
+						    title: '提示',
+						    message:"题目未全部答完,是否交卷?",
+						    showCancelButton: true,
+						    confirmButtonText: '交 卷',
+						    cancelButtonText: '取 消',
+							showClose:false,
+						    beforeClose: (action, instance, done) => {
+						        if (action === 'confirm') {
+						            instance.confirmButtonLoading = true;
+						            instance.confirmButtonText = '交卷中...';
+						            submitDaan({
+										startTime:this.startTime,
+										endTime:this.parseTime(new Date(),'{y}-{m}-{d} {h}:{i}:{s}'),
+										paperInfo:this.sjConfig,
+						            	list:arry,
+						            	personId:this.personId,
+						            	userId:this.$store.state.user.userInfo.ID
+						            }).then(res=>{
+						            	done();
+										instance.confirmButtonLoading = false;
+										setTimeout(()=>{
+											this.tc(res.data)
+										},50)
+						            })
+						        } else {
+									done();
+						        }
+						    }
+						})
+						return
+					}
+				}
+				this.$msgbox({
+				    title: '提示',
+				    message:"是否进行交卷?",
+				    showCancelButton: true,
+				    confirmButtonText: '交 卷',
+				    cancelButtonText: '取 消',
+					showClose:false,
+				    beforeClose: (action, instance, done) => {
+				        if (action === 'confirm') {
+				            instance.confirmButtonLoading = true;
+				            instance.confirmButtonText = '交卷中...';
+				            submitDaan({
+								startTime:this.startTime,
+								endTime:this.parseTime(new Date(),'{y}-{m}-{d} {h}:{i}:{s}'),
+								paperInfo:this.sjConfig,
+				            	list:arry,
+				            	personId:this.personId,
+				            	userId:this.$store.state.user.userInfo.ID
+				            }).then(res=>{
+				            	done();
+								instance.confirmButtonLoading = false;
+								setTimeout(()=>{
+									this.tc(res.data)
+								},50)
+				            })
+				        } else {
+							done();
+				        }
+				    }
+				})
+			},
+			scrollToQuestion(index) {  
+				this.tmIndex = index-1
+			},  
+			//成绩弹窗
+			tc(data){
+				this.$alert(`您的成绩是${data.TotalMark},试卷详情请到考试成绩菜单进行查看`, '提示', {
+					confirmButtonText: '确定',
+					showClose:false,
+					callback: action => {
+						this.$emit("subSuccess",data)
+					}
+				});
+			}
+		},
+	};
 </script>
 
-<style>
+<style scoped lang="scss">
+	.b-t-2{
+		border-top: 2px solid #ccc;
+	}
+	.b-t-1{
+		border-top: 1px solid #ccc;
+	}
+	.b-l-2{
+		border-left: 2px solid #ccc;
+	}
+	.b-l-1{
+		border-left: 1px solid #ccc;
+	}
+	.b-r-2{
+		border-right: 2px solid #ccc;
+	}
+	.b-r-1{
+		border-right: 1px solid #ccc;
+	}
+	.b-b-2{
+		border-bottom: 2px solid #ccc;
+	}
+	.b-b-1{
+		border-bottom: 1px solid #ccc;
+	}
+	.tihao:hover{
+		cursor: pointer;
+	}
 </style>

+ 95 - 23
src/views/components/xuexi/index.vue

@@ -1,33 +1,80 @@
 <template>
 	<div style="height: calc(100vh - 120px);">
-		<el-row style="height: 100%;">
-			<el-col :span="5" style="height: 100%;border-right: 2px solid #55ffff;overflow-y: auto;" class="classTree">
-				<el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
+		<el-row style="height: 100%;" :gutter="20">
+			<el-col :xl="6" :lg="6" style="height: 100%;border-right: 2px solid #55ffff;overflow-y: auto;"
+				class="classTree hidden-md-and-down">
+				<el-tree :data="data" node-key="Id" @node-click="handleNodeClick">
+					<span class="custom-tree-node" slot-scope="{ node, data }">
+						<span>{{ data.VName }}</span>
+						<span v-if="data.lookstatus != undefined">
+							<span v-if="data.lookstatus != '0'" style="color: #F56C6C;">
+								(已完成)
+							</span>
+						</span>
+						<span v-if="data.allNum != undefined && data.allNum > 0" style="color:#409EFF">
+							(共计:{{data.allNum}},已看完:{{data.studyNum}})
+						</span>
+					</span>
+				</el-tree>
 			</el-col>
-			<el-col :span="19" style="height: 100%;">
+			<el-col :xl="18" :lg="18" :md="24" :sm="24" :xs="24" style="height: 100%;position: relative;">
+				<div style="position: absolute;top: 0px;left: 20px;z-index: 99;" class="hidden-lg-and-up" @click="treeSee">
+					<i class="el-icon-s-unfold" style="font-size: 20px;" ></i>
+				</div>
 				<div style="width: 100%;height: 100%;position: relative;" v-if="videoPath == null">
-					<img src="../../../assets/images/hysy.jpg" style="width: 40%;margin-top: 60px;position: absolute;left: 50%;transform: translateX(-50%);" alt="" />
+					<img src="../../../assets/images/hysy.jpg"
+						style="width: 40%;margin-top: 60px;position: absolute;left: 50%;transform: translateX(-50%);"
+						alt="" />
 				</div>
 				<div style="width: 100%;height: 100%;" v-else>
-					<play-video :path="videoPath"></play-video>
+					<div class="flex-ac-jc" style="height: 60px;font-weight: bold;font-size: 20px;">
+						{{classInfo.VName}}
+					</div>
+					<div style="height: calc(100% - 100px)">
+						<play-video ref="video" :path="videoPath"
+							:lastTime="classInfo.lookstatus == '0'?Number(classInfo.fenzhong):0" :classInfo="classInfo"
+							:isFinish="classInfo.lookstatus == '0'?false : true" @seeOver="seeOver"></play-video>
+					</div>
+					<div class="flex-ac" style="height: 40px;color: #F56C6C;font-weight: bold;font-size: 16px;">
+						注:切换视频将从0开始计时!!
+					</div>
+
 				</div>
 			</el-col>
 		</el-row>
+		<el-drawer title="课程讲解" append-to-body :visible.sync="treeShow" :direction="'ltr'">
+			<el-tree :data="data" node-key="Id" @node-click="handleNodeClick">
+				<span class="custom-tree-node" slot-scope="{ node, data }">
+					<span>{{ data.VName }}</span>
+					<span v-if="data.lookstatus != undefined">
+						<span v-if="data.lookstatus != '0'" style="color: #F56C6C;">
+							(已完成)
+						</span>
+					</span>
+					<span v-if="data.allNum != undefined && data.allNum > 0" style="color:#409EFF">
+						(共计:{{data.allNum}},已看完:{{data.studyNum}})
+					</span>
+				</span>
+			</el-tree>
+		</el-drawer>
 	</div>
 </template>
 
 <script>
 	import playVideo from "./video.vue"
-	import { getClassList } from "@/api/jianliyuan/index"
+	import {
+		getClassList,
+		saveRecord
+	} from "@/api/jianliyuan/index"
 	export default {
 		name: "Xuexi",
-		props:{
-			classData:{
-				type:Object,
-				default:null
+		props: {
+			classData: {
+				type: Object,
+				default: null
 			}
 		},
-		components:{
+		components: {
 			playVideo
 		},
 		data() {
@@ -37,8 +84,10 @@
 					children: 'children',
 					label: 'VName'
 				},
-				videoPath:null,
-				baseUrl:process.env.VUE_APP_BASE_API
+				videoPath: null,
+				baseUrl: process.env.VUE_APP_BASE_API,
+				classInfo: null,
+				treeShow: false,
 			}
 		},
 		created() {
@@ -46,26 +95,49 @@
 		},
 		methods: {
 			handleNodeClick(data) {
-			    console.log(data)
-				this.videoPath = this.baseUrl+data.VPath
-				console.log(this.videoPath)
+				if (data.VPath != undefined) {
+					this.classInfo = null
+					this.videoPath = this.baseUrl + data.VPath
+					this.classInfo = data
+					this.classInfo.personid = this.classData.personid
+				}
+
 			},
 			//查询已报名继续教育课程列表
-			getList(v){
-				getClassList({classIdList:v.classIdList,personId:v.personid}).then(res=>{
-					for(let i in res.data){
+			getList(v) {
+				getClassList({
+					classIdList: v.classIdList,
+					personId: v.personid
+				}).then(res => {
+					for (let i in res.data) {
 						let obj = {
-							VName:i,
-							children:res.data[i]
+							VName: i,
+							Id: i,
+							allNum: res.data[i].filter(obj => obj.lookstatus != undefined).length,
+							studyNum: res.data[i].filter(obj => obj.lookstatus != undefined && obj
+								.lookstatus != '0').length,
+							children: res.data[i]
 						}
 						this.data.push(obj)
 					}
 				})
+			},
+			//视频观看完成
+			seeOver(e) {
+				if (e == true) {
+					this.data = []
+					this.getList(this.classData)
+				}
+
+			},
+			treeSee(){
+				console.log(1)
+				this.treeShow = true
 			}
 		}
 	}
 </script>
 
 <style scoped lang="scss">
-	
+
 </style>

+ 145 - 62
src/views/components/xuexi/video.vue

@@ -9,8 +9,12 @@
 </template>
 
 <script>
+	import {
+		getClassList,
+		saveRecord
+	} from "@/api/jianliyuan/index"
 	export default {
-		name:"playVideo",
+		name: "playVideo",
 		props: {
 			path: { // 传入的地址
 				type: String,
@@ -20,15 +24,20 @@
 				type: Number,
 				default: 0,
 			},
-			isFinish:{
-				type:Boolean,
-				default:false
+			isFinish: {
+				type: Boolean,
+				default: false
+			},
+			classInfo: {
+				type: Object,
+				default: null,
 			}
 		},
 		data() {
 			return {
-				wancheng:this.isFinite,//是否看完
+				wancheng: this.isFinish, //是否看完
 				playedTime: this.lastTime,
+				time: this.lastTime, //正在观看时长
 				currentTime: 0,
 				maxTime: 0,
 				playOptions: {
@@ -59,104 +68,178 @@
 						fullscreenToggle: true, // 是否显示全屏按钮
 					},
 				},
+				data: {
+					classid: null, //课程id
+					videoid: null, //视频id
+					personid: null, //报名id
+					videoname: null, //视频名称
+					fenzhong: null, //分钟数
+					type: null, //状态0未看完 1已看完
+					count: null, //每次观看时长
+				},
+				ti: null, //计时器
 			};
 		},
 		computed: {},
-		watch: {  
-		    path(newVal, oldVal) {  
-		      // 这里不需要做任何操作,因为 Vue 的响应式系统会自动更新 DOM  
-		      // 如果需要手动控制加载,可以在这里调用 loadNewVideo 方法 
-			   this.playOptions.sources[0].src = newVal
-		    },
-			wancheng(newVal,oldVal){
+		watch: {
+			path(newVal, oldVal) {
+				// 这里不需要做任何操作,因为 Vue 的响应式系统会自动更新 DOM  
+				// 如果需要手动控制加载,可以在这里调用 loadNewVideo 方法 
+				this.playOptions.sources[0].src = newVal
+			},
+			wancheng(newVal, oldVal) {
 				this.playOptions.controlBar.progressControl = newVal
+			}, 
+			classInfo:{
+				handler(newVal,oldVal){
+					this.getConfigKey("video_click").then(response => {
+						this.data.count = Number(response.msg)
+					});
+					this.data.classid = newVal.ClassId
+					this.data.videoid = newVal.Id
+					this.data.personid = newVal.personid
+					this.data.videoname = newVal.VName
+					this.data.type = newVal.lookstatus
+				},
+				deep: true,  
+				immediate: true // 立即触发一次回调,可选  
 			}
-		},  
+		},
 		mounted() {
-			// this.getData()  // 调用获取地址的接口,然后修改播放器配置中的src属性
+			document.addEventListener('visibilitychange', this.handleVisibilityChange); 
+			
+
+		},
+		beforeDestroy() {
+			document.removeEventListener('visibilitychange', this.handleVisibilityChange);
 		},
 		methods: {
+			handleVisibilityChange() {
+				console.log("hidden")
+				this.pause()
+			},
 			// 准备好了
 			onPlayerReady() {
 				// console.log("准备好了");
 			},
 			// 视频播放
 			onPlayerPlay(player) {
-				// console.log('播放了');
+				console.log("视频播放")
 				// console.log(player);
-				// let playTime = 0;
-				// if(this.wancheng === false){
-				// 	if ( Number(Math.floor(this.playedTime)) === Number(Math.floor(player.duration())) ) {
-				// 		this.playedTime = 0;
-				// 		playTime = 0;
-				// 	} else if ( Number(Math.floor(player.currentTime())) !== Number(Math.floor(this.playedTime)) ) {
-				// 		playTime = this.playedTime;
-				// 		player.currentTime(playTime)
-				// 	}
-				// }else{ 
-					
-				// }
+				let playTime = 0;
+				if(this.wancheng === false){
+					if ( Number(Math.floor(this.playedTime)) === Number(Math.floor(player.duration())) ) {
+						this.playedTime = 0;
+						playTime = 0;
+					} else if ( Number(Math.floor(player.currentTime())) !== Number(Math.floor(this.playedTime)) ) {
+						playTime = this.playedTime;
+						player.currentTime(playTime)
+					}
+				}else{ 
+
+				}
 				
-			
+
+
 			},
 			// 视频暂停的
 			onPlayerPause(player) {
-				// console.log('暂停中');
+				console.log('暂停中');
 				// console.log(player);
 				this.playedTime = player.currentTime();
 			},
 			// 视频播放完
 			onPlayerEnd(player) {
-				// console.log('播放结束了');
+				console.log('播放结束了');
 				// console.log(player);
 				this.maxTime = player.duration()
-				this.wancheng = true
+				if(this.wancheng == false){
+					this.wancheng = true
+					this.data.fenzhong = Math.floor(player.duration())
+					this.data.type = "1"
+					this.data.count =Number((Math.floor(player.duration()) - Math.floor(this.time))/60) 
+					saveRecord(this.data).then(res=>{
+						this.$emit("seeOver",true)
+					})
+				}
+				
+				
 			},
 			// DOM元素上的readyState更改导致播放停止
 			onPlayerWaiting(player) {
-				// console.log("播放停止中");
+				console.log("播放停止中");
 				// console.log(player);
 			},
 			// 视频已开始播放
 			onPlayerPlaying(player) {
 				// console.log("开始播放了");
 				// console.log(player);
-			},
-			// 当播放器在当前播放位置下载数据时触发
-			onPlayerLoadeddata(player) {
-				// console.log("开始下载数据");
-				// console.log(player);
-			},
-			// 当前播放位置发生变化时触发
-			onPlayerTimeupdate(player) {
-				console.log("播放位置变化了");
-				console.log(player);
-				let timeDisplay = player.currentTime()
-				if(this.wancheng == false){
-					if (timeDisplay - this.currentTime > 1) {
-						player.currentTime(this.currentTime > this.maxTime ? this.currentTime : this.maxTime);
+			
+
+
+		},
+		// 当播放器在当前播放位置下载数据时触发
+		onPlayerLoadeddata(player) {
+			// console.log("开始下载数据");
+			// console.log(player);
+		},
+		// 当前播放位置发生变化时触发
+		onPlayerTimeupdate(player) {
+			// console.log("播放位置变化了");
+			// console.log(player);
+			let timeDisplay = player.currentTime()
+			if (this.wancheng == false) {
+				if(Math.floor(player.duration()) - Math.floor(this.time) > Number(this.data.count) * 60 ){
+					if(Math.floor(timeDisplay) - Math.floor(this.time) == Number(this.data.count) * 60){
+						this.data.fenzhong = Math.floor(timeDisplay)
+						this.time = player.currentTime()
+						this.pause()
+						this.$msgbox({
+							title: '提示',
+							message:`${this.data.count<1?Number(this.data.count) * 60+'秒':this.data.count+'分钟'}已到,请点击确认更新时间继续学习` ,
+							showCancelButton:false,
+							confirmButtonText: '确认',
+							showClose:false,
+							beforeClose: (action, instance, done) => {
+								if (action === 'confirm') {
+									instance.confirmButtonLoading = true;
+									instance.confirmButtonText = '确认中...';
+									saveRecord(this.data).then(res=>{
+										instance.confirmButtonLoading = false;
+										done()
+										this.$refs.videoPlayer.player.play()
+									})
+								} 
+							}
+						})
 					}
-					this.currentTime = player.currentTime();
-					this.maxTime = this.currentTime > this.maxTime ? this.currentTime : this.maxTime;
-				}else{
-					this.currentTime = timeDisplay
 				}
-				
-			},
-			//播放状态改变
-			playerStateChanged(playerCurrentState) {
-				// console.log("播放状态变化了");
-				// console.log(playerCurrentState);
-			},
-			// 手动暂停视频的播放
-			pause() {
-				// 视频播放器的方法调用,要使用this.$refs.videoPlayer.player这个对象去调用
-				this.$refs.videoPlayer.player.pause()
+				// if (timeDisplay - this.currentTime > 1) {
+				// 	player.currentTime(this.currentTime > this.maxTime ? this.currentTime : this.maxTime);
+				// }
+				// this.currentTime = player.currentTime();
+				// this.maxTime = this.currentTime > this.maxTime ? this.currentTime : this.maxTime;
+			} else {
+				this.currentTime = timeDisplay
 			}
+
 		},
+		//播放状态改变
+		playerStateChanged(playerCurrentState) {
+			// console.log("播放状态变化了");
+			// console.log(playerCurrentState);
+		},
+		// 手动暂停视频的播放
+		pause() {
+			// 视频播放器的方法调用,要使用this.$refs.videoPlayer.player这个对象去调用
+			this.$refs.videoPlayer.player.pause()
+		}
+	},
 	};
 </script>
 
 <style lang="scss" scoped>
-
+	::v-deep .vjs-fluid{
+		padding-top: 50%!important;
+	}
 </style>

+ 32 - 8
src/views/jianlirenyuan/chengji/index.vue

@@ -20,31 +20,41 @@
 		<el-table :data="tableData" style="width: 100%">
 			<el-table-column   label="期次" align="center">
 				<template slot-scope="scope">
-					{{scope.row.qiciyear+"第"+scope.row.qici+"期"}}
+					{{scope.row.qiciYear+"第"+scope.row.qiCi+"期"}}
 				</template>
 			</el-table-column>
 			<el-table-column prop="pxlb" label="培训类别" align="center">
 				<template slot-scope="scope">
-					{{scope.row.zhuanye === ""?scope.row.pxlb:scope.row.pxlb+"("+scope.row.zhuanye+")"}}
+					{{scope.row.zhuanYeType === ""?scope.row.zcsZhuanYe:scope.row.zcsZhuanYe+"("+scope.row.zhuanYeType+")"}}
 				</template>
 			</el-table-column>
-			<el-table-column prop="trainName" label="答卷开始时间" align="center" >
+			<el-table-column prop="StartTime" label="答卷开始时间" align="center" >
 			</el-table-column>
-			<el-table-column prop="trainName" label="答卷结束时间" align="center" >
+			<el-table-column prop="EndTime" label="答卷结束时间" align="center" >
 			</el-table-column>
-			<el-table-column prop="zxs" label="考试分数" align="center">
+			<el-table-column prop="TotalMark" label="考试分数" align="center">
 			</el-table-column>
 			<el-table-column prop="zxs" label="总分/及格" align="center">
+				<template slot-scope="scope">
+					{{scope.row.paperMark+" / "+ scope.row.passMark}}
+				</template>
 			</el-table-column>
 			<el-table-column prop="zxs" label="是否及格" align="center">
+				<template slot-scope="scope">
+					{{scope.row.PassState == 0?'不及格':'及格'}}
+				</template>
 			</el-table-column>
 			<el-table-column prop="zxs" label="总考次数/当前次数" align="center">
+				<template slot-scope="scope">
+					{{scope.row.repeatExamNum+" / "+ scope.row.currentCount}}
+				</template>
 			</el-table-column>
 			<el-table-column prop="yxsj" label="证书打印" align="center">
 				<template slot-scope="scope">
-					<span style="color: #F56C6C;">
+					<!-- <span style="color: #F56C6C;">
 						{{scope.row.yxsj}}
-					</span>
+					</span> -->
+					<el-button type="text" @click="getInfo(scope.row)">查询详情</el-button>
 				</template>
 			</el-table-column>
 		</el-table>
@@ -52,6 +62,9 @@
 </template>
 
 <script>
+	import {
+		getKsList,getFinishSjInfo
+	} from "@/api/jianliyuan/index"
 	export default {
 		name: "Chengji",
 		data() {
@@ -65,9 +78,14 @@
 			}
 		},
 		created() {
-			
+			this.getList()
 		},
 		methods: {
+			getList(){
+				getKsList().then(res=>{
+					this.tableData = res.data
+				})
+			},
 			//搜索
 			handleQuery(){
 				this.loading = true
@@ -75,6 +93,12 @@
 			//重置
 			resetQuery(){
 				this.loading = true
+			},
+			//查询试卷详情
+			getInfo(row){
+				getFinishSjInfo(row.UserScoreID).then(res=>{
+					
+				})
 			}
 		}
 	}

+ 70 - 14
src/views/jianlirenyuan/peixunList/index.vue

@@ -29,23 +29,40 @@
 					{{parseTime(scope.row.ksjzrq, '{y}-{m}-{d}')}}
 				</template>
 			</el-table-column>
+			<el-table-column prop="surplusCount" label="剩余考试次数" align="center">
+			</el-table-column>
 			<el-table-column prop="address" label="状态" align="center">
 				<template slot-scope="scope">
-					<el-button size="mini" type="text" icon="el-icon-coin" style="color:#F56C6C ;" @click="studyShow = true" v-if="scope.row.feeflg == 0">缴费</el-button>
-					<el-button size="mini" type="text" icon="el-icon-reading" @click="ksxx(scope.row)" v-else-if="scope.row.feeflg == 1 && scope.row.wanchengflg == 0 ">开始学习</el-button>
-					<el-button size="mini" type="text" icon="el-icon-edit" style="color:#E6A23C;" @click="ksxx(scope.row)" v-else-if="scope.row.feeflg == 1 && scope.row.wanchengflg == 1">开始考试</el-button>
+					<div v-if="scope.row.overFlg === '0' || scope.row.overFlg === '3'">
+						<div v-if=" new Date(scope.row.ksjzrq) > new Date()">
+							<el-button size="mini" type="text" icon="el-icon-coin" style="color:#F56C6C ;" @click="studyShow = true" v-if="scope.row.feeflg === '0'">缴费</el-button>
+							<el-button size="mini" type="text" icon="el-icon-reading" @click="ksxx(scope.row)" v-else-if="scope.row.feeflg === '1' && scope.row.wanchengflg === '0' ">开始学习</el-button>
+							<el-button size="mini" type="text" icon="el-icon-edit" style="color:#E6A23C;" @click="getSjInfo(scope.row)" v-else-if="scope.row.feeflg === '1' && scope.row.wanchengflg === '1'">开始考试</el-button>
+						</div>
+						<div v-else style="color: #909399;">
+							超出考试截止日期
+						</div>
+					</div>
+					<div v-else>
+						<div v-if="scope.row.overFlg === '1'">
+							完成学时|考试通过|打印证明
+						</div>
+						<div v-if="scope.row.overFlg === '2'" style="color: #909399;">
+							考试次数上限未通过
+						</div>
+					</div>
 				</template>
 			</el-table-column>
 		</el-table>
 		<div style="display: flex;color:#F56C6C ;margin-top: 40px;">
-			<div>
+			<div >
 				备注:
 			</div>
 			<div>
-				<div>
+				<div >
 					1、完成学时后即可进行网上考试,请单击左侧查看成绩菜单进行成绩的查询。
 				</div>
-				<div>
+				<div >
 					2、每人有3次网上考试机会,考试通过后,方可打印合格证明。
 				</div>
 				<div>
@@ -67,53 +84,92 @@
 				<div>
 					3、持铁监证过期报名的,自报名成功学习时间为3个月。以上要求是根据网络资源所限,请各单位负责培训人员督促报名人员抓紧时间学习。
 				</div>
-			</div>
-
+			</div> 
 		</div>
 		<el-dialog title="继续教育学习" :visible.sync="studyShow" fullscreen destroy-on-close :before-close="studyOver">
 			<xuexi :classData="classData"></xuexi>
 		</el-dialog>
+		<div class="shijuan">
+			<el-dialog title="继续教育考试" :visible.sync="ksShow" :show-close="false" fullscreen destroy-on-close >
+				<zhengjuan :content="sjContent" :sjConfig="sjConfig" :personId="personId" v-if="sjTYpe == 'zj'" @subSuccess="subSuccess"></zhengjuan>
+				<zhuti :content="sjContent" :sjConfig="sjConfig" :personId="personId" v-else @subSuccess="subSuccess"></zhuti>
+			</el-dialog>
+		</div>
+		
 	</div>
 </template>
 
 <script>
 	import {
-		getJxjy
+		getJxjy,getSjContent,submitDaan
 	} from "@/api/jianliyuan/index"
 	import xuexi from "../../components/xuexi/index"
+	import zhengjuan from "../../components/shijuan/zhengjuan"
+	import zhuti from "../../components/shijuan/zhuti"
 	export default {
 		name: "PeixunList",
 		components:{
-			xuexi
+			xuexi,zhengjuan,zhuti
 		},
 		data() {
 			return {
 				tableData: [],
+				//学习相关
 				studyShow: false,
 				classData:null,
+				//考试相关
+				ksShow:false,
+				sjContent:null,
+				sjConfig:null,
+				personId:null,
+				sjTYpe:'zj'
 			}
 		},
 		created() {
 			this.getList()
 		},
-		methods: {
+		methods: { 
 			getList(){
 				getJxjy().then(res=>{
 					this.tableData = res.data
 				})
 			},
 			ksxx(row){
-				console.log(row)
 				this.classData = row
 				this.studyShow = true
 			},
 			studyOver(){
+				this.getList()
 				this.studyShow = false
+			},
+			//获取试卷信息
+			getSjInfo(row){
+				let that = this
+				this.personId = row.personid
+				getSjContent(row.personid).then(res=>{
+					this.sjTYpe = res.data.parperConfig.ShowModal == 1? 'zj' : 'zt'
+					this.sjConfig = res.data.parperConfig
+					this.sjContent = res.data.parper
+					this.ksShow = true 
+				})
+			},
+			//提交成功回调
+			subSuccess(data){
+				this.getList()
+				this.ksShow = false 			
 			}
+			
 		}
 	}
 </script>
 
 <style lang="scss" scoped>
-	
-</style>
+	::v-deep .shijuan .el-dialog__body{
+		padding: 0 20px;
+	}
+	::v-deep .shijuan .el-dialog__header{
+		display: none!important;
+	}
+</style>
+
+

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 36 - 10
src/views/userIndex.vue