mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 11:26:45 +08:00
feat:增加项目-系统考试-查看答卷
This commit is contained in:
275
src/components/drawers/CheckAnsware.vue
Normal file
275
src/components/drawers/CheckAnsware.vue
Normal file
@@ -0,0 +1,275 @@
|
||||
<!-- 查看系统考试答卷--iframe嵌套 -->
|
||||
<template>
|
||||
<a-drawer
|
||||
:visible="CAvisible"
|
||||
class="drawerStyle CheckAnsware"
|
||||
placement="right"
|
||||
width="40%"
|
||||
@after-visible-change="afterVisibleChange"
|
||||
>
|
||||
<div class="drawerMain">
|
||||
<div class="headersub">
|
||||
<div class="headerTitle">查看答卷</div>
|
||||
<img
|
||||
style="width:29px;height:29px;cursor:pointer"
|
||||
src="../../assets/images/basicinfo/close.png"
|
||||
@click="closeDrawer"
|
||||
/>
|
||||
</div>
|
||||
<!-- <div class="headersup"><span>评估名称:<span style="color:#999ba3">管理者进阶作业</span></span><span style="margin-left:25px">考试总分:<span style="color:#999ba3">100分</span></span><span style="margin-left:25px">及格分:<span style="color:#999ba3">60分</span></span></div> -->
|
||||
<div class="main" style="height:860px;display: flex;">
|
||||
<iframe
|
||||
id="iframe"
|
||||
style="width: 100%; height: 100%;"
|
||||
:src="iframeUrl + '/exam/viewanswer?id=' + datasource.targetId "
|
||||
frameborder="0"
|
||||
name="myframe"
|
||||
security="restricted"
|
||||
sandbox="allow-forms allow-scripts allow-same-origin allow-popups"
|
||||
>
|
||||
</iframe>
|
||||
</div>
|
||||
<!-- <div class="btnn">
|
||||
<button class="btn1">取消</button>
|
||||
<button class="btn2">确定</button>
|
||||
</div> -->
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { toRefs,reactive } from '@vue/reactivity';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { iframeUrl } from "../../api/method";
|
||||
import {queryUserAnswerDetail} from '@/api/indexExam';
|
||||
export default {
|
||||
name:"CheckAnsware",
|
||||
props:{
|
||||
CAvisible:{
|
||||
type:Boolean,
|
||||
default:false,
|
||||
},
|
||||
datasource:{
|
||||
type: Object,
|
||||
default: function () {
|
||||
return {};
|
||||
},
|
||||
}
|
||||
},
|
||||
setup(props,ctx){
|
||||
const state = reactive({
|
||||
score:null, //传过来赋给score
|
||||
queData:[
|
||||
{
|
||||
quetype:"判断",
|
||||
quename:"当前项目对您是否有帮助?",
|
||||
value:1,
|
||||
answer:[
|
||||
{
|
||||
value:1,
|
||||
answercontent:"错误",
|
||||
analysis:"暂无解析",
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
quetype:"多选",
|
||||
quename:"哪些项目跨年快乐memememememeemme?",
|
||||
value:2,
|
||||
answer:[
|
||||
{
|
||||
value:1,
|
||||
answercontent:"A、有帮助"
|
||||
},
|
||||
{
|
||||
value:2,
|
||||
answercontent:"B、mei帮助"
|
||||
},
|
||||
{
|
||||
value:3,
|
||||
answercontent:"C、mei5155帮助"
|
||||
},
|
||||
{
|
||||
value:4,
|
||||
answercontent:"D、12345mei帮助"
|
||||
}
|
||||
],
|
||||
answercontent:"错误",
|
||||
analysis:"暂无解析",
|
||||
},
|
||||
{
|
||||
quetype:"多选",
|
||||
quename:"哪些项目跨年快乐memememememeemme?",
|
||||
value:3,
|
||||
answer:[
|
||||
{
|
||||
value:1,
|
||||
answercontent:"A、有帮助"
|
||||
},
|
||||
{
|
||||
value:2,
|
||||
answercontent:"B、mei帮助"
|
||||
},
|
||||
{
|
||||
value:3,
|
||||
answercontent:"C、mei5155帮助"
|
||||
},
|
||||
{
|
||||
value:4,
|
||||
answercontent:"D、12345mei帮助"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
quetype:"判断",
|
||||
quename:"当前项目对您是否有帮助?",
|
||||
value:4,
|
||||
answer:[
|
||||
{
|
||||
value:1,
|
||||
answercontent:"错误",
|
||||
analysis:"暂无解析",
|
||||
},
|
||||
]
|
||||
},
|
||||
],
|
||||
iframeUrl: iframeUrl,
|
||||
})
|
||||
|
||||
const closeDrawer = ()=> {
|
||||
ctx.emit("update:CAvisible",false)
|
||||
}
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log(bool);
|
||||
if(bool == true) {
|
||||
console.log(props.datasource)
|
||||
}
|
||||
}
|
||||
const getQue = () => {
|
||||
queryUserAnswerDetail(1).then(res => {
|
||||
console.log(res)
|
||||
}).catch(err =>{
|
||||
message.error('用户答卷信息获取失败'+err)
|
||||
})
|
||||
}
|
||||
return{
|
||||
...toRefs(state),
|
||||
closeDrawer,
|
||||
afterVisibleChange,
|
||||
getQue
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.CheckAnsware {
|
||||
.drawerMain {
|
||||
min-width: 400px;
|
||||
margin: 0px 32px 0px 32px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.headersub {
|
||||
height: 73px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.headerTitle {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
line-height: 25px;
|
||||
}
|
||||
}
|
||||
.headersup{
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.main {
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
margin-bottom: 70px;
|
||||
.basetext{
|
||||
color: #333333;
|
||||
line-height: 25px;
|
||||
margin-top: 27px ;
|
||||
margin-bottom: 27px ;
|
||||
}
|
||||
.basequestion{
|
||||
.ques{
|
||||
.quename{
|
||||
margin: 10px auto ;
|
||||
font-weight: bold;
|
||||
}
|
||||
.queanswer{
|
||||
padding-left: 25px;
|
||||
.queabox{
|
||||
margin-bottom: 10px;
|
||||
.single{
|
||||
padding: 5px;
|
||||
.queaboxs{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.analysisbox{
|
||||
border: 1px solid #e8e8e8;
|
||||
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.07);
|
||||
border-radius: 8px;
|
||||
margin-left: -10px;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
}
|
||||
.multiple{
|
||||
padding: 5px;
|
||||
.queaboxs{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.analysisbox{
|
||||
border: 1px solid #e8e8e8;
|
||||
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.07);
|
||||
border-radius: 8px;
|
||||
margin-left: -10px;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btnn {
|
||||
height: 72px;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
|
||||
.btn1 {
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
border: 1px solid #4ea6ff;
|
||||
border-radius: 8px;
|
||||
color: #4ea6ff;
|
||||
background-color: #fff;
|
||||
cursor: pointer;
|
||||
}
|
||||
.btn2 {
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
background: #4ea6ff;
|
||||
border-radius: 8px;
|
||||
border: 0;
|
||||
margin-left: 15px;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -116,12 +116,15 @@
|
||||
<!-- 导出成绩抽屉 -->
|
||||
<EScore v-model:eScorevisible="eScorevisible" />
|
||||
</a-drawer>
|
||||
<!-- 查看答卷抽屉 -->
|
||||
<CheckAnsware v-model:CAvisible="CAvisible" :datasource="datasource"/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { toRefs, reactive } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import EScore from "../ExportScore.vue";
|
||||
import CheckAnsware from '../CheckAnsware.vue'
|
||||
import * as api from '../../../api/indexTaskManage';
|
||||
|
||||
// import * as api from "../../../api/index";
|
||||
@@ -129,6 +132,7 @@ export default {
|
||||
name: "ProjectExamManage",
|
||||
components: {
|
||||
EScore,
|
||||
CheckAnsware
|
||||
},
|
||||
props: {
|
||||
TMvisible: {
|
||||
@@ -302,8 +306,34 @@ export default {
|
||||
className: "h",
|
||||
customRender: ({record:{finishStatus}}) => ({1:'通过',2:'未通过'}[finishStatus] || '未开始'),
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "studentKid",
|
||||
key: "studentKid",
|
||||
width: 60,
|
||||
align: "center",
|
||||
ellipsis: true,
|
||||
className: "h",
|
||||
customRender: (text) => {
|
||||
return (
|
||||
<div class="racona">
|
||||
<a
|
||||
onClick={()=>{
|
||||
state.studentKid = text.record.studentKid;
|
||||
state.datasource = text.record;
|
||||
state.CAvisible = true;
|
||||
}}>
|
||||
查看答卷
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
],
|
||||
loadingData: true
|
||||
loadingData: true,
|
||||
studentKid: '',
|
||||
CAvisible: false,
|
||||
datasource: ''
|
||||
});
|
||||
|
||||
const closeDrawer = () => {
|
||||
@@ -358,6 +388,7 @@ export default {
|
||||
status: state.projectName,
|
||||
studentName: state.name,
|
||||
}).then(res=>{
|
||||
console.log(res)
|
||||
state.tabledata = res.data.data.records;
|
||||
state.tableDataTotal = res.data.data.total;
|
||||
state.loadingData = false;
|
||||
|
||||
@@ -717,7 +717,7 @@ import ProjCheckShip from "../../components/drawers/ProjCheckPower";
|
||||
import * as api from "../../api/index1";
|
||||
import * as apiStu from "../../api/index";
|
||||
import { message } from "ant-design-vue";
|
||||
import { storage } from "@/api/storage";
|
||||
// import { storage } from "@/api/storage";
|
||||
import { useStore } from "vuex";
|
||||
import OrgClass from "@/components/project/OrgClass";
|
||||
import NameInput from "@/components/project/NameInput";
|
||||
|
||||
Reference in New Issue
Block a user