mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-20 08:16:44 +08:00
增加试卷的编辑
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
<el-table-column label="操作" width="150px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" icon="el-icon-folder-opened" @click="eidtVolume(scope.row)">编辑</el-button>
|
||||
<!-- <el-button type="text" icon="el-icon-folder-opened" @click="showEditPaper(scope.row)">编辑试题</el-button> -->
|
||||
<el-button type="text" icon="el-icon-delete" @click="deleteVolume(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -190,13 +191,13 @@
|
||||
</div>
|
||||
<div style="padding: 15px;">
|
||||
<div>
|
||||
<div> {{ item.title }}</div>
|
||||
<div> {{ item.title }}</div>
|
||||
<div v-if="item.images" class="xuanxiangimg"><img :src="imageBaseUrl + item.images" alt=""> </div>
|
||||
</div>
|
||||
<div v-if="qpaper.optShow">
|
||||
<div v-if="item.type == 3">{{item.answer=='true'?'正确':'错误'}}</div>
|
||||
<div v-else v-for="(opt, optIdx) in item.optionList" :key="optIdx">
|
||||
<div>{{ optIdx + 1 }}, {{ opt.content }}</div>
|
||||
<div>{{ optIdx + 1 }}, {{ opt.content }}</div>
|
||||
<div v-if="opt.images" class="xuanxiangimg"><img :src="imageBaseUrl + opt.images" alt=""> </div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -287,6 +288,7 @@
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer"><el-button @click="queryLise()"> 搜 索 </el-button></span>
|
||||
</el-dialog>
|
||||
<editPaper ref="comEditPaper"></editPaper>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -297,8 +299,10 @@ import examQuestionApi from "@/api/modules/question";
|
||||
import { deepClone } from '../../utils';
|
||||
import {numberToLetter, deepCopy} from '../../utils/tools.js';
|
||||
import { mapGetters,mapActions} from 'vuex';
|
||||
import editPaper from "@/components/Exam/EditPaper";
|
||||
export default {
|
||||
name: 'articleItems',
|
||||
name: 'testPaper',
|
||||
components:{editPaper},
|
||||
data() {
|
||||
return {
|
||||
imageBaseUrl:process.env.VUE_APP_FILE_BASE_URL,
|
||||
@@ -429,6 +433,9 @@ export default {
|
||||
// }
|
||||
},
|
||||
methods: {
|
||||
showEditPaper(row){
|
||||
this.$refs.comEditPaper.show(row.id);
|
||||
},
|
||||
checkedChange(){
|
||||
this.$forceUpdate();
|
||||
},
|
||||
@@ -493,22 +500,22 @@ export default {
|
||||
this.$forceUpdate();
|
||||
return
|
||||
}
|
||||
let data = deepCopy(this.paperData);
|
||||
if(this.qpaper.qtype !== '') {
|
||||
data = data.filter(item => {
|
||||
if(item.type === this.qpaper.qtype){
|
||||
return item;
|
||||
}
|
||||
});
|
||||
}
|
||||
if(this.qpaper.keyword !== '') {
|
||||
data = data.filter(item => {
|
||||
return item.title.toLowerCase()
|
||||
.indexOf(this.qpaper.keyword.toLowerCase()) > -1;
|
||||
});
|
||||
}
|
||||
this.paper.data = data;
|
||||
this.$forceUpdate();
|
||||
let data = deepCopy(this.paperData);
|
||||
if(this.qpaper.qtype !== '') {
|
||||
data = data.filter(item => {
|
||||
if(item.type === this.qpaper.qtype){
|
||||
return item;
|
||||
}
|
||||
});
|
||||
}
|
||||
if(this.qpaper.keyword !== '') {
|
||||
data = data.filter(item => {
|
||||
return item.title.toLowerCase()
|
||||
.indexOf(this.qpaper.keyword.toLowerCase()) > -1;
|
||||
});
|
||||
}
|
||||
this.paper.data = data;
|
||||
this.$forceUpdate();
|
||||
},
|
||||
checkDelete(index) {
|
||||
this.paper.data.splice(index,1);
|
||||
|
||||
Reference in New Issue
Block a user