flx:考试新加图片预览
This commit is contained in:
parent
98ec256431
commit
4ba73c5f74
@ -75,8 +75,8 @@
|
||||
<el-input placeholder="请输入" v-model="formInline.workerName" suffix-icon="el-icon-search"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="考试结果" prop="inspectionResult">
|
||||
<el-select v-model="formInline.inspectionResult"
|
||||
<el-form-item label="考试结果" prop="isPass">
|
||||
<el-select v-model="formInline.isPass"
|
||||
:placeholder="$t('message.personnelPosition.please_select')" filterable>
|
||||
<el-option :label="item.inspectionResultName" :value="item.id"
|
||||
v-for="(item, index) in inspectionResultList1" :key="index">
|
||||
@ -111,9 +111,9 @@
|
||||
{{ scope.row.duration }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="inspectionResult" label="考试结果">
|
||||
<el-table-column align="center" prop="isPass" label="考试结果">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.inspectionResult == 1 ? '合格' : '不合格'
|
||||
scope.row.isPass == 1 ? '合格' : '不合格'
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="totalScore" label="考试总分">
|
||||
@ -140,8 +140,8 @@
|
||||
<el-input placeholder="请输入" v-model="formInline.workerName" suffix-icon="el-icon-search"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="考试结果" prop="inspectionResult">
|
||||
<el-select v-model="formInline.inspectionResult"
|
||||
<el-form-item label="考试结果" prop="isPass">
|
||||
<el-select v-model="formInline.isPass"
|
||||
:placeholder="$t('message.personnelPosition.please_select')" filterable>
|
||||
<el-option :label="item.inspectionResultName" :value="item.id"
|
||||
v-for="(item, index) in inspectionResultList1" :key="index">
|
||||
@ -177,9 +177,9 @@
|
||||
{{ scope.row.duration }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="inspectionResult" label="考试结果">
|
||||
<el-table-column align="center" prop="isPass" label="考试结果">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.inspectionResult == 1 ? '合格' : '不合格'
|
||||
scope.row.isPass == 1 ? '合格' : '不合格'
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="totalScore" label="考试总分">
|
||||
@ -311,7 +311,7 @@ export default {
|
||||
cardDialog: false,
|
||||
cardForm: {},
|
||||
formInline: {
|
||||
inspectionResult: "",
|
||||
isPass: "",
|
||||
workerName: "",
|
||||
},
|
||||
isAdd: -1,
|
||||
@ -352,7 +352,7 @@ export default {
|
||||
//刷新
|
||||
refreshBtn(type) {
|
||||
this.formInline= {
|
||||
inspectionResult: "",
|
||||
isPass: "",
|
||||
workerName: "",
|
||||
};
|
||||
if(type == 2) {
|
||||
@ -397,7 +397,7 @@ export default {
|
||||
isReEducation: this.activeName == 'second' ? 0 : 1,
|
||||
projectSn: this.projectSn,
|
||||
workerName: this.formInline.workerName,
|
||||
inspectionResult: this.formInline.inspectionResult,
|
||||
isPass: this.formInline.isPass,
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
}
|
||||
|
||||
@ -33,9 +33,21 @@
|
||||
<el-table class="tables" @row-click="previewDetail" :data="listData" height="200">
|
||||
<el-table-column width="200" align="center" prop="subjectName" label="考试科目"></el-table-column>
|
||||
<el-table-column align="center" prop="name" label="试题名称"></el-table-column>
|
||||
<el-table-column align="center" prop="radio" label="单选题"></el-table-column>
|
||||
<el-table-column align="center" prop="multi" label="多选题"></el-table-column>
|
||||
<el-table-column align="center" prop="judgment" label="判断题"></el-table-column>
|
||||
<el-table-column align="center" prop="radio" label="单选题">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.radio ? scope.row.radio : 0 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="multi" label="多选题">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.multi ? scope.row.multi : 0 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="judgment" label="判断题">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.judgment ? scope.row.judgment : 0 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="duration" label="考试时长(分钟)"></el-table-column>
|
||||
<el-table-column align="center" prop="passLine" label="及格分数"></el-table-column>
|
||||
<el-table-column align="center" width="" prop="createTime" label="上传时间"></el-table-column>
|
||||
@ -62,8 +74,8 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination class="pagerBox" @size-change="sizeChange" @current-change="currentChange"
|
||||
:current-page="pagInfo.pageNo" :page-sizes="$store.state.PAGESIZRS" :page-size="pagInfo.pageSize"
|
||||
layout="total, sizes, prev, pager, next" :total="Number(pagInfo.total)" background></el-pagination>
|
||||
:current-page="pageInfo.pageNo" :page-sizes="$store.state.PAGESIZRS" :page-size="pageInfo.pageSize"
|
||||
layout="total, sizes, prev, pager, next" :total="Number(pageInfo.total)" background></el-pagination>
|
||||
</div>
|
||||
<!-- 新增 -->
|
||||
<el-dialog :modal-append-to-body="false" :title="title" :visible.sync="dialogVisible" width="660px">
|
||||
@ -614,7 +626,7 @@ export default {
|
||||
questions: []
|
||||
},
|
||||
subjectNameList: [],
|
||||
pagInfo: {
|
||||
pageInfo: {
|
||||
//公用分页
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
@ -1196,15 +1208,15 @@ export default {
|
||||
projectSn: this.projectSn,
|
||||
}
|
||||
pagePaperApi({
|
||||
pageNo: this.pagInfo.pageNo,
|
||||
pageSize: this.pagInfo.pageSize,
|
||||
pageNo: this.pageInfo.pageNo,
|
||||
pageSize: this.pageInfo.pageSize,
|
||||
name: this.questionName,
|
||||
subjectId: this.name,
|
||||
}).then((result) => {
|
||||
if (result.success) {
|
||||
console.log(result);
|
||||
this.listData = result.result.records
|
||||
this.pagInfo.total = result.result.total
|
||||
this.pageInfo.total = result.result.total
|
||||
}
|
||||
})
|
||||
},
|
||||
@ -1382,12 +1394,12 @@ export default {
|
||||
},
|
||||
//切换条数
|
||||
sizeChange(val) {
|
||||
this.pagInfo.pageSize = val
|
||||
this.pageInfo.pageSize = val
|
||||
this.getRecordList()
|
||||
},
|
||||
//切换页数
|
||||
currentChange(val) {
|
||||
this.pagInfo.pageNo = val
|
||||
this.pageInfo.pageNo = val
|
||||
this.getRecordList()
|
||||
},
|
||||
//切换条数
|
||||
@ -1419,7 +1431,7 @@ export default {
|
||||
this.dialogVisible3 = false;
|
||||
},
|
||||
refreshFn() {
|
||||
this.pagInfo.pageNo = 1
|
||||
this.pageInfo.pageNo = 1
|
||||
this.getRecordList()
|
||||
},
|
||||
exportBtn(type) {
|
||||
@ -1447,7 +1459,7 @@ export default {
|
||||
// 创建一个<a>元素
|
||||
const link = document.createElement('a');
|
||||
link.href = url;
|
||||
link.download = '安全教育培训台账.xlsx'; // 指定下载文件的文件名
|
||||
link.download = type == 1 ? '安全教育培训台账.xlsx' : '特种人员培训台账.xlsx'; // 指定下载文件的文件名
|
||||
// 模拟点击下载链接
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
|
||||
@ -304,15 +304,27 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="preview-question-content">
|
||||
<div class="preview-question-item" v-for="(item, index) in questionArr" :key="item.id">
|
||||
<el-radio v-model="questionForm.options" :label="item.optionCode"
|
||||
v-if="questionForm.type == 1 || questionForm.type == 3"><span></span></el-radio>
|
||||
<el-checkbox style="pointer-events: none;" :checked="multipleOption(item.optionCode, questionForm.options)"
|
||||
v-if="questionForm.type == 2"><span></span></el-checkbox>
|
||||
<span class="active-style">{{ item.optionCode }}、{{ item.optionDesc }}</span>
|
||||
<!-- <span class="active-style">{{ index | filterAnswerIndex }}、{{item.optionDesc}}</span> -->
|
||||
<div style="display:flex;justify-content: space-between;">
|
||||
<div style="flex: 1;">
|
||||
<div class="preview-question-item" v-for="(item, index) in questionArr" :key="item.id">
|
||||
<el-radio v-model="questionForm.options" :label="item.optionCode"
|
||||
v-if="questionForm.type == 1 || questionForm.type == 3"><span></span></el-radio>
|
||||
<el-checkbox style="pointer-events: none;" :checked="multipleOption(item.optionCode, questionForm.options)"
|
||||
v-if="questionForm.type == 2"><span></span></el-checkbox>
|
||||
<span class="active-style">{{ item.optionCode }}、{{ item.optionDesc }}</span>
|
||||
<!-- <span class="active-style">{{ index | filterAnswerIndex }}、{{item.optionDesc}}</span> -->
|
||||
</div>
|
||||
</div>
|
||||
<div style="flex: 1;text-align: center;">
|
||||
<el-image
|
||||
v-if="questionForm.pic && questionForm.pic.length > 0"
|
||||
style="width: 100px; height: 100px"
|
||||
:src="questionForm.pic[0].url"
|
||||
:preview-src-list="[questionForm.pic[0].url]">
|
||||
</el-image>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width:90%;display:flex;justify-content:space-between;">
|
||||
<div style="width:90%;display:flex;justify-content:space-between;margin-top:10px;">
|
||||
<div>试题分数:{{ questionForm.score }}</div>
|
||||
<div>难易程度:{{ questionForm.difficulty === 1 ? '简单' : questionForm.difficulty === 2 ? '一般' :
|
||||
questionForm.difficulty === 3 ? '困难' : '' }}</div>
|
||||
@ -828,7 +840,10 @@ export default {
|
||||
projectSn: this.$store.state.projectSn
|
||||
}).then(result => {
|
||||
if (result.success) {
|
||||
this.questionForm = result.result;
|
||||
this.questionForm = {
|
||||
...result.result,
|
||||
pic: isJSON(result.result.pic) && result.result.pic != null ? JSON.parse(result.result.pic) : []
|
||||
};
|
||||
this.questionArr = result.result.optionList;
|
||||
}
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user