mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-22 01:06:43 +08:00
增加试卷的编辑
This commit is contained in:
@@ -63,7 +63,7 @@
|
||||
<template slot-scope="scope">
|
||||
<!-- v-if="scope.row.collectNumber === 0" -->
|
||||
<el-button type="text" v-if="!scope.row.published" @click="releaseData(scope.row,true)">发布</el-button>
|
||||
|
||||
|
||||
<!-- // 成绩控制需要结束状态 -->
|
||||
<el-button type="text" v-if="scope.row.published" @click="viewResults(scope.row)">成绩</el-button>
|
||||
<el-button type="text" v-if="scope.row.published" @click="pushResults(scope.row)">推送</el-button>
|
||||
@@ -74,6 +74,7 @@
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<!-- <el-dropdown-item command="a">查看</el-dropdown-item> -->
|
||||
<el-dropdown-item command="b" @click.native="editData(scope.row)">编辑</el-dropdown-item>
|
||||
<el-dropdown-item command="b" @click.native="editPaper(scope.row)">修改试卷</el-dropdown-item>
|
||||
<el-dropdown-item command="c" @click.native="deleteData(scope.row)">删除</el-dropdown-item>
|
||||
<el-dropdown-item command="a" @click.native="creatQrCode(scope.row)">二维码</el-dropdown-item>
|
||||
<div v-if="scope.row.published">
|
||||
@@ -122,7 +123,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
|
||||
<el-col :span="24" >
|
||||
<el-form-item label="考试名称" prop="testName">
|
||||
@@ -660,6 +661,7 @@
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-container>
|
||||
<editPaper ref="comEditPaper"></editPaper>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -676,8 +678,10 @@ import usergroupApi from "@/api/modules/usergroup";
|
||||
import pushRecordApi from "@/api/modules/pushRecord";
|
||||
import {toScoreTow} from '@/utils/tools.js'
|
||||
import apiUserBasic from '@/api/boe/userbasic.js';
|
||||
import editPaper from "@/components/Exam/EditPaper";
|
||||
export default {
|
||||
name: 'articleItems',
|
||||
components:{editPaper},
|
||||
computed: {
|
||||
...mapGetters(['resOwnerMap','sysTypeMap']),
|
||||
},
|
||||
@@ -766,6 +770,13 @@ export default {
|
||||
this.loadData()
|
||||
},
|
||||
methods: {
|
||||
editPaper(row){
|
||||
if(!row.paperId){
|
||||
this.$message.error("此考试还未选择试卷");
|
||||
return;
|
||||
}
|
||||
this.$refs.comEditPaper.show(row.paperId);
|
||||
},
|
||||
open(row,num) {
|
||||
this.$confirm('确定要下架改考试么?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
@@ -781,7 +792,7 @@ export default {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消下架'
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
exportsList(){
|
||||
|
||||
@@ -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