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