|
|
@ -7,7 +7,7 @@ |
|
|
|
<p>实训项目</p> |
|
|
|
<p>实训项目</p> |
|
|
|
<el-select v-model="projectId" placeholder="请选择" class="select" :disabled="projectPermissions != 0" @change="selectProject"> |
|
|
|
<el-select v-model="projectId" placeholder="请选择" class="select" :disabled="projectPermissions != 0" @change="selectProject"> |
|
|
|
<el-option |
|
|
|
<el-option |
|
|
|
v-for="item in value" |
|
|
|
v-for="item in topicList" |
|
|
|
:key="item.projectId" |
|
|
|
:key="item.projectId" |
|
|
|
:label="item.projectName" |
|
|
|
:label="item.projectName" |
|
|
|
:value="item.projectId" |
|
|
|
:value="item.projectId" |
|
|
@ -50,7 +50,8 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="font_css"> |
|
|
|
<div class="font_css"> |
|
|
|
<div class="experimentalGoal"> |
|
|
|
<div class="experimentalGoal"> |
|
|
|
<div class="break-all" v-html="experimentalGoal"></div> |
|
|
|
<div class="break-all" v-html="projectManage.experimentTarget"> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -63,9 +64,10 @@ |
|
|
|
<el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-card shadow="hover"> |
|
|
|
<el-card shadow="hover"> |
|
|
|
<el-table :data="tableData" :stripe="true" height="405"> |
|
|
|
<el-table :data="requires" stripe height="405"> |
|
|
|
<el-table-column type="index"></el-table-column> |
|
|
|
<el-table-column type="index"></el-table-column> |
|
|
|
<el-table-column prop="judgmentPointsName" label="判分标准" align="center"></el-table-column> |
|
|
|
<el-table-column prop="name" label="判分标准" align="center" width="180"> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="right" label="完成结果" align="center"> |
|
|
|
<el-table-column prop="right" label="完成结果" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<i |
|
|
|
<i |
|
|
@ -91,21 +93,19 @@ |
|
|
|
<el-main> |
|
|
|
<el-main> |
|
|
|
<el-tabs v-model="activeName" type="card"> |
|
|
|
<el-tabs v-model="activeName" type="card"> |
|
|
|
<el-tab-pane label="案例" name="first"> |
|
|
|
<el-tab-pane label="案例" name="first"> |
|
|
|
<div class="break-all" v-html="caseDescription"></div> |
|
|
|
<div class="break-all" v-html="projectManage.experimentDescription"></div> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="实验要求" name="second"> |
|
|
|
<el-tab-pane label="实验要求" name="second"> |
|
|
|
<el-collapse v-model="activeNames"> |
|
|
|
<el-collapse v-model="activeNames" accordion> |
|
|
|
<el-collapse-item v-for="(loop, index) in points" :key="index"> |
|
|
|
<div v-for="(item,index) in requires"> |
|
|
|
<template slot="title"> |
|
|
|
<el-collapse-item :title="item.name" :name="item.id"> |
|
|
|
<i class="el-icon-s-ticket"></i> |
|
|
|
<div class="break-all" v-html="item.experimentalRequirements"></div> |
|
|
|
<span style="font-size:16px">{{loop.judgmentPointsName}}</span> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<div class="break-all" v-html="loop.experimentalRequirements"></div> |
|
|
|
|
|
|
|
</el-collapse-item> |
|
|
|
</el-collapse-item> |
|
|
|
|
|
|
|
</div> |
|
|
|
</el-collapse> |
|
|
|
</el-collapse> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="实验提示" name="fifth" v-if="isstartexperimentSuggests"> |
|
|
|
<el-tab-pane label="实验提示" name="fifth" v-if="isstartexperimentSuggests"> |
|
|
|
<div class="break-all" v-html="experimentSuggests"></div> |
|
|
|
<div class="break-all" v-html="projectManage.experimentHint"></div> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
</el-tabs> |
|
|
|
</el-main> |
|
|
|
</el-main> |
|
|
@ -125,6 +125,10 @@ |
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import util from '@/libs/util' |
|
|
|
import util from '@/libs/util' |
|
|
|
import Setting from '@/setting' |
|
|
|
import Setting from '@/setting' |
|
|
|
|
|
|
|
// 引入封装好的接口 |
|
|
|
|
|
|
|
import {getProjectBySystemId} from "@/api/http.js"; |
|
|
|
|
|
|
|
import {getProjectDetail} from "@/api/http.js"; |
|
|
|
|
|
|
|
import {submit} from "@/api/http.js"; |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
@ -143,10 +147,10 @@ export default { |
|
|
|
millisecond: 0, |
|
|
|
millisecond: 0, |
|
|
|
countVal: this.defaultVal, //获取初始值 |
|
|
|
countVal: this.defaultVal, //获取初始值 |
|
|
|
pauseTime: 0, |
|
|
|
pauseTime: 0, |
|
|
|
day: 0, |
|
|
|
day: '00', |
|
|
|
seconds: 0, |
|
|
|
seconds: '00', |
|
|
|
minutes: 0, |
|
|
|
minutes: '00', |
|
|
|
hour: 0, |
|
|
|
hour: '00', |
|
|
|
createTime: "", //开始时间 |
|
|
|
createTime: "", //开始时间 |
|
|
|
actEndTime: "", //倒计时结束时间 |
|
|
|
actEndTime: "", //倒计时结束时间 |
|
|
|
projectId: "", //选中后绑定的对象 |
|
|
|
projectId: "", //选中后绑定的对象 |
|
|
@ -164,7 +168,7 @@ export default { |
|
|
|
schoolId: '', |
|
|
|
schoolId: '', |
|
|
|
studentId: "", |
|
|
|
studentId: "", |
|
|
|
courseId: "", |
|
|
|
courseId: "", |
|
|
|
projectId: "", |
|
|
|
// projectId: "", |
|
|
|
assessmentId: "", |
|
|
|
assessmentId: "", |
|
|
|
projectPermissions: 0, //项目权限(0、练习 1、考核 2、竞赛) |
|
|
|
projectPermissions: 0, //项目权限(0、练习 1、考核 2、竞赛) |
|
|
|
isSubmit: false, |
|
|
|
isSubmit: false, |
|
|
@ -173,8 +177,11 @@ export default { |
|
|
|
stopTime: '', |
|
|
|
stopTime: '', |
|
|
|
isSelected: false, |
|
|
|
isSelected: false, |
|
|
|
userId: '', |
|
|
|
userId: '', |
|
|
|
isstartexperimentSuggests: 1 |
|
|
|
isstartexperimentSuggests: 1, |
|
|
|
}; |
|
|
|
topicList:[], |
|
|
|
|
|
|
|
projectManage:{}, |
|
|
|
|
|
|
|
requires:[] |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
watch: { |
|
|
|
countVal: { |
|
|
|
countVal: { |
|
|
@ -235,108 +242,186 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
this.assessmentId && this.projectId && this.checkVer() |
|
|
|
this.assessmentId && this.projectId && this.checkVer() |
|
|
|
this.codeId && this.codeIds.push(this.codeId) |
|
|
|
this.codeId && this.codeIds.push(this.codeId) |
|
|
|
|
|
|
|
this.getData() |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
checkVer() { |
|
|
|
//获取项目列表 |
|
|
|
let data = { |
|
|
|
getData(){ |
|
|
|
userId: this.userId, |
|
|
|
let params = { |
|
|
|
id: this.assessmentId |
|
|
|
systemId:'11', |
|
|
|
} |
|
|
|
} |
|
|
|
this.$get(this.api.qualifications,data).then(res => { |
|
|
|
getProjectBySystemId(params).then((data)=>{ |
|
|
|
if(res.message == 'false'){ |
|
|
|
if(data.status == 200){ |
|
|
|
this.isSubmit = true; |
|
|
|
this.topicList = data.data.projects |
|
|
|
// newmain.$emit("isSubmit", this.isSubmit); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}).catch((error)=>{ |
|
|
|
|
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
//重新开始 |
|
|
|
//选择好题目 |
|
|
|
reload() { |
|
|
|
selectProject(){ |
|
|
|
this.$post(this.api.DeleteCodes, this.codeIds).then(res => { |
|
|
|
let params = { |
|
|
|
this.getClearTime() |
|
|
|
projectId:this.projectId, |
|
|
|
this.grade = '00' |
|
|
|
} |
|
|
|
this.codeIds = [] |
|
|
|
getProjectDetail(params).then((data)=>{ |
|
|
|
this.isSubmit = false |
|
|
|
if(data.status == 200){ |
|
|
|
this.startCountFn() |
|
|
|
this.projectManage = data.data.projectManage; |
|
|
|
}); |
|
|
|
this.requires = data.data.projectJudgmentVos; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}).catch((error)=>{ |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
//获取当前时间 |
|
|
|
|
|
|
|
let startTime = new Date().getTime(); |
|
|
|
|
|
|
|
sessionStorage.setItem('startTime', startTime) |
|
|
|
|
|
|
|
this.day = '00'; |
|
|
|
|
|
|
|
this.hour = '00'; |
|
|
|
|
|
|
|
this.minutes = '00'; |
|
|
|
|
|
|
|
this.seconds = '00'; |
|
|
|
|
|
|
|
this.getClearTime(); |
|
|
|
|
|
|
|
this.startCountFn(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
//提交 |
|
|
|
Submit() { |
|
|
|
Submit() { |
|
|
|
if(!this.codeIds.length) return this.$message.error('请先完成实验') |
|
|
|
// if(!this.codeIds.length) return this.$message.error('请先完成实验') |
|
|
|
this.$confirm("此操作将视为结束考试, 是否继续?", "提示", { |
|
|
|
this.$confirm("此操作将视为结束考试, 是否继续?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning", |
|
|
|
type: "warning", |
|
|
|
center: true |
|
|
|
center: true |
|
|
|
}) |
|
|
|
}).then(() => { |
|
|
|
.then(() => { |
|
|
|
|
|
|
|
this.actEndTime = new Date().getTime(); |
|
|
|
this.actEndTime = new Date().getTime(); |
|
|
|
|
|
|
|
console.log(this.actEndTime) |
|
|
|
|
|
|
|
let ruleReqs = sessionStorage.getItem('ruleReqs') |
|
|
|
|
|
|
|
let startTime = sessionStorage.getItem('startTime') |
|
|
|
|
|
|
|
let ruleReqsList = JSON.parse(ruleReqs); |
|
|
|
|
|
|
|
let lcld = [] |
|
|
|
|
|
|
|
for (var i=0;i<this.requires.length;i++){ |
|
|
|
|
|
|
|
lcld.push(this.requires[i].judgmentId) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
let params = { |
|
|
|
|
|
|
|
"accountId": 0, |
|
|
|
|
|
|
|
"assessmentId": 0, |
|
|
|
|
|
|
|
"classId": 0, |
|
|
|
|
|
|
|
"endTime": this.actEndTime, |
|
|
|
|
|
|
|
"lcId": lcld, |
|
|
|
|
|
|
|
"projectId": 0, |
|
|
|
|
|
|
|
"ruleReqs": ruleReqsList, |
|
|
|
|
|
|
|
"startTime": +startTime, |
|
|
|
|
|
|
|
"submitTime": this.actEndTime, |
|
|
|
|
|
|
|
"systemId": 11, |
|
|
|
|
|
|
|
"timeSum": 0 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
submit(params).then((data)=>{ |
|
|
|
|
|
|
|
if(data.status == 200){ |
|
|
|
|
|
|
|
this.topicList = data.data.projects |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}).catch((error)=>{ |
|
|
|
|
|
|
|
}) |
|
|
|
this.getClearTime(); |
|
|
|
this.getClearTime(); |
|
|
|
|
|
|
|
|
|
|
|
//提交代码与判分点进行判断 |
|
|
|
//提交代码与判分点进行判断 |
|
|
|
this.$post(this.api.Submit, { |
|
|
|
// this.$post(this.api.Submit, { |
|
|
|
// projectPermissions: 0, |
|
|
|
// // projectPermissions: 0, |
|
|
|
createTime: this.startTime, |
|
|
|
// createTime: this.startTime, |
|
|
|
endTime: this.stopTime, |
|
|
|
// endTime: this.stopTime, |
|
|
|
projectId: this.projectId, |
|
|
|
// projectId: this.projectId, |
|
|
|
projectPermissions: this.projectPermissions, |
|
|
|
// projectPermissions: this.projectPermissions, |
|
|
|
// assessmentId: 1, |
|
|
|
// // assessmentId: 1, |
|
|
|
assessmentId: this.assessmentId ? this.assessmentId : '', |
|
|
|
// assessmentId: this.assessmentId ? this.assessmentId : '', |
|
|
|
codeIds: this.codeIds, |
|
|
|
// codeIds: this.codeIds, |
|
|
|
judgmentPointsIds: this.judgmentPointsIds, |
|
|
|
// judgmentPointsIds: this.judgmentPointsIds, |
|
|
|
// studentId: 54, |
|
|
|
// // studentId: 54, |
|
|
|
studentId: this.studentId, |
|
|
|
// studentId: this.studentId, |
|
|
|
record: { |
|
|
|
// record: { |
|
|
|
courseId: 1, |
|
|
|
// courseId: 1, |
|
|
|
// courseId: this.courseId, |
|
|
|
// // courseId: this.courseId, |
|
|
|
projectId: this.projectId, |
|
|
|
// projectId: this.projectId, |
|
|
|
createTime: this.startTime, |
|
|
|
// createTime: this.startTime, |
|
|
|
endTime: this.stopTime, |
|
|
|
// endTime: this.stopTime, |
|
|
|
startTime: this.entryTime |
|
|
|
// startTime: this.entryTime |
|
|
|
} |
|
|
|
// } |
|
|
|
}) |
|
|
|
// }).then(res => { |
|
|
|
.then(res => { |
|
|
|
// this.isSubmit = true |
|
|
|
this.isSubmit = true |
|
|
|
// // newmain.$emit("isSubmit", this.isSubmit); |
|
|
|
// newmain.$emit("isSubmit", this.isSubmit); |
|
|
|
// this.tableData = res.message |
|
|
|
this.tableData = res.message |
|
|
|
// //计算总分 |
|
|
|
//计算总分 |
|
|
|
// var s = 0; |
|
|
|
var s = 0; |
|
|
|
// this.tableData.forEach(element => { |
|
|
|
this.tableData.forEach(element => { |
|
|
|
// this.test = element.score; |
|
|
|
this.test = element.score; |
|
|
|
// s += this.test; |
|
|
|
s += this.test; |
|
|
|
// this.grade = s; |
|
|
|
this.grade = s; |
|
|
|
// }); |
|
|
|
}); |
|
|
|
// }) |
|
|
|
}) |
|
|
|
// .catch(err => {}); |
|
|
|
.catch(err => {}); |
|
|
|
}).catch(() => { |
|
|
|
}) |
|
|
|
|
|
|
|
.catch(() => { |
|
|
|
|
|
|
|
this.$message({ |
|
|
|
this.$message({ |
|
|
|
type: "info", |
|
|
|
type: "info", |
|
|
|
message: "已取消提交" |
|
|
|
message: "已取消提交" |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
//开始计时 |
|
|
|
// 倒计时 |
|
|
|
startCountFn() { |
|
|
|
timeFormat(param) { |
|
|
|
if (!this.isStart) { |
|
|
|
return param < 10 ? "0" + param : param; |
|
|
|
this.countVal = this.countVal ? this.countVal : 0; |
|
|
|
|
|
|
|
let timer = setInterval(() => { |
|
|
|
|
|
|
|
this.counterFn(this.countVal++); |
|
|
|
|
|
|
|
}, 1000); |
|
|
|
|
|
|
|
this.globalTimer = timer; |
|
|
|
|
|
|
|
this.isStart = true; |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
toggleCase() { |
|
|
|
counterFn(counterTime) { |
|
|
|
this.caseVisible = !this.caseVisible |
|
|
|
let leave1 = counterTime % (24 * 3600 * 1); //计算天数后剩余的毫秒数 |
|
|
|
|
|
|
|
let leave2 = leave1 % (3600 * 1); //计算小时数后剩余的毫秒数 |
|
|
|
|
|
|
|
let leave3 = leave2 % (60 * 1); //计算分钟数后剩余的毫秒数 |
|
|
|
|
|
|
|
let day = Math.floor(counterTime / (24 * 3600 * 1)); //计算相差天数 |
|
|
|
|
|
|
|
let hour = Math.floor(leave1 / (3600 * 1)); //计算相差小时 |
|
|
|
|
|
|
|
let minutes = Math.floor(leave2 / (60 * 1)); //计算相差分钟 |
|
|
|
|
|
|
|
let seconds = Math.round(leave3 / 1); //计算相差秒 |
|
|
|
|
|
|
|
day = day >= 10 ? day : "0" + day; |
|
|
|
|
|
|
|
hour = hour >= 10 ? hour : "0" + hour; |
|
|
|
|
|
|
|
minutes = minutes >= 10 ? minutes : "0" + minutes; |
|
|
|
|
|
|
|
seconds = seconds >= 10 ? seconds : "0" + seconds; |
|
|
|
|
|
|
|
this.day = day; |
|
|
|
|
|
|
|
this.hour = hour; |
|
|
|
|
|
|
|
this.minutes = minutes; |
|
|
|
|
|
|
|
this.seconds = seconds; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//重新开始 |
|
|
|
|
|
|
|
reload() { |
|
|
|
|
|
|
|
this.getClearTime() |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 清除时间 |
|
|
|
// 清除时间 |
|
|
|
getClearTime() { |
|
|
|
getClearTime() { |
|
|
|
// clearInterval(this.globalTimer); |
|
|
|
|
|
|
|
clearInterval(this.countVal); |
|
|
|
clearInterval(this.countVal); |
|
|
|
this.globalTimer = ""; |
|
|
|
this.globalTimer = ""; |
|
|
|
// if(this.projectPermissions != 0){ |
|
|
|
|
|
|
|
this.countVal = ""; |
|
|
|
this.countVal = ""; |
|
|
|
this.day = "00"; |
|
|
|
this.day = "00"; |
|
|
|
this.seconds = "00"; |
|
|
|
this.seconds = "00"; |
|
|
|
this.minutes = "00"; |
|
|
|
this.minutes = "00"; |
|
|
|
this.hour = "00"; |
|
|
|
this.hour = "00"; |
|
|
|
// }else{ |
|
|
|
}, |
|
|
|
// this.text = '所用' |
|
|
|
checkVer() { |
|
|
|
// } |
|
|
|
let data = { |
|
|
|
|
|
|
|
userId: this.userId, |
|
|
|
|
|
|
|
id: this.assessmentId |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.$get(this.api.qualifications,data).then(res => { |
|
|
|
|
|
|
|
if(res.message == 'false'){ |
|
|
|
|
|
|
|
this.isSubmit = true; |
|
|
|
|
|
|
|
// newmain.$emit("isSubmit", this.isSubmit); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 倒计时 |
|
|
|
|
|
|
|
timeFormat(param) { |
|
|
|
|
|
|
|
return param < 10 ? "0" + param : param; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
toggleCase() { |
|
|
|
|
|
|
|
this.caseVisible = !this.caseVisible |
|
|
|
|
|
|
|
}, |
|
|
|
handleData(project,type){ |
|
|
|
handleData(project,type){ |
|
|
|
if(!this.isSelected){ |
|
|
|
if(!this.isSelected){ |
|
|
|
this.value = project; |
|
|
|
this.value = project; |
|
|
@ -428,43 +513,8 @@ export default { |
|
|
|
// this.handleData(res.message,2) |
|
|
|
// this.handleData(res.message,2) |
|
|
|
// }).catch(res => {}); |
|
|
|
// }).catch(res => {}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
selectProject(){ |
|
|
|
collapse(){ |
|
|
|
this.isSelected = true |
|
|
|
|
|
|
|
this.assessmentId = '' |
|
|
|
|
|
|
|
this.judgmentPointsIds = [] |
|
|
|
|
|
|
|
this.codeIds = [] |
|
|
|
|
|
|
|
this.getQueryProject(this.projectId) |
|
|
|
|
|
|
|
this.isSubmit = false |
|
|
|
|
|
|
|
this.countVal = 0 |
|
|
|
|
|
|
|
// newmain.$emit("isSubmit", this.isSubmit) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
counterFn(counterTime) { |
|
|
|
|
|
|
|
let leave1 = counterTime % (24 * 3600 * 1); //计算天数后剩余的毫秒数 |
|
|
|
|
|
|
|
let leave2 = leave1 % (3600 * 1); //计算小时数后剩余的毫秒数 |
|
|
|
|
|
|
|
let leave3 = leave2 % (60 * 1); //计算分钟数后剩余的毫秒数 |
|
|
|
|
|
|
|
let day = Math.floor(counterTime / (24 * 3600 * 1)); //计算相差天数 |
|
|
|
|
|
|
|
let hour = Math.floor(leave1 / (3600 * 1)); //计算相差小时 |
|
|
|
|
|
|
|
let minutes = Math.floor(leave2 / (60 * 1)); //计算相差分钟 |
|
|
|
|
|
|
|
let seconds = Math.round(leave3 / 1); //计算相差秒 |
|
|
|
|
|
|
|
day = day >= 10 ? day : "0" + day; |
|
|
|
|
|
|
|
hour = hour >= 10 ? hour : "0" + hour; |
|
|
|
|
|
|
|
minutes = minutes >= 10 ? minutes : "0" + minutes; |
|
|
|
|
|
|
|
seconds = seconds >= 10 ? seconds : "0" + seconds; |
|
|
|
|
|
|
|
this.day = day; |
|
|
|
|
|
|
|
this.hour = hour; |
|
|
|
|
|
|
|
this.minutes = minutes; |
|
|
|
|
|
|
|
this.seconds = seconds; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
startCountFn() { |
|
|
|
|
|
|
|
if (!this.isStart) { |
|
|
|
|
|
|
|
this.countVal = this.countVal ? this.countVal : 0; |
|
|
|
|
|
|
|
let timer = setInterval(() => { |
|
|
|
|
|
|
|
this.counterFn(this.countVal++); |
|
|
|
|
|
|
|
}, 1000); |
|
|
|
|
|
|
|
this.globalTimer = timer; |
|
|
|
|
|
|
|
this.isStart = true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
passToParent(data) { |
|
|
|
passToParent(data) { |
|
|
|
this.$emit("getDataFromChild", data); |
|
|
|
this.$emit("getDataFromChild", data); |
|
|
@ -494,7 +544,8 @@ export default { |
|
|
|
<style lang="scss" scoped> |
|
|
|
<style lang="scss" scoped> |
|
|
|
/deep/.el-container { |
|
|
|
/deep/.el-container { |
|
|
|
height: 80%; |
|
|
|
height: 80%; |
|
|
|
&.is-vertical{ |
|
|
|
|
|
|
|
|
|
|
|
&.is-vertical { |
|
|
|
position: fixed; |
|
|
|
position: fixed; |
|
|
|
top: 200px; |
|
|
|
top: 200px; |
|
|
|
bottom: 20px; |
|
|
|
bottom: 20px; |
|
|
@ -502,10 +553,13 @@ export default { |
|
|
|
width: 85%; |
|
|
|
width: 85%; |
|
|
|
height: 70%; |
|
|
|
height: 70%; |
|
|
|
background-color: #f5f5f5; |
|
|
|
background-color: #f5f5f5; |
|
|
|
|
|
|
|
z-index: 999; |
|
|
|
} |
|
|
|
} |
|
|
|
.el-header{ |
|
|
|
|
|
|
|
|
|
|
|
.el-header { |
|
|
|
color: #333; |
|
|
|
color: #333; |
|
|
|
padding: 0 12px 0 20px; |
|
|
|
padding: 0 12px 0 20px; |
|
|
|
|
|
|
|
|
|
|
|
.el-button { |
|
|
|
.el-button { |
|
|
|
background-color: $main-color; |
|
|
|
background-color: $main-color; |
|
|
|
color: #fff; |
|
|
|
color: #fff; |
|
|
@ -513,7 +567,8 @@ export default { |
|
|
|
margin: 5px 0px 5px 5px; |
|
|
|
margin: 5px 0px 5px 5px; |
|
|
|
font-size: 16px; |
|
|
|
font-size: 16px; |
|
|
|
} |
|
|
|
} |
|
|
|
.submit-btn{ |
|
|
|
|
|
|
|
|
|
|
|
.submit-btn { |
|
|
|
padding-left: 30px; |
|
|
|
padding-left: 30px; |
|
|
|
padding-right: 30px; |
|
|
|
padding-right: 30px; |
|
|
|
background: $main-color url(../../assets/img/case/btn.png) 0 0/100% 100% no-repeat; |
|
|
|
background: $main-color url(../../assets/img/case/btn.png) 0 0/100% 100% no-repeat; |
|
|
|