mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 10:56:44 +08:00
修改考试管理
This commit is contained in:
@@ -63,21 +63,26 @@
|
||||
<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.enabled == false" @click="enableddata(scope.row,true)">上架</el-button>
|
||||
<el-button type="text" v-if="scope.row.enabled == true" @click="enableddata(scope.row,false)">下架</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>
|
||||
<el-button type="text" v-if="scope.row.published" @click="creatQrCode(scope.row)">二维码</el-button>
|
||||
<!-- <el-button type="text" v-if="scope.row.published" @click="creatQrCode(scope.row)">二维码</el-button> -->
|
||||
<el-button type="text" v-if="scope.row.published" @click="releaseData(scope.row,false)">取消发布</el-button>
|
||||
<el-dropdown type="text" v-if="!scope.row.published" style="margin-left:10px">
|
||||
<el-dropdown type="text" style="margin-left:10px">
|
||||
<el-button type="text" > 考试 <i class="el-icon-arrow-down el-icon--right"></i> </el-button>
|
||||
<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="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">
|
||||
<el-dropdown-item command="d" v-if="scope.row.enabled == false" @click.native="enableddata(scope.row,true)">上架</el-dropdown-item>
|
||||
<el-dropdown-item command="e" v-if="scope.row.enabled == true" @click.native="open(scope.row,false)">下架</el-dropdown-item>
|
||||
</div>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
@@ -112,18 +117,19 @@
|
||||
</el-cascader>
|
||||
</el-form-item> -->
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="模式" prop="testType">
|
||||
<el-select v-model="examForm.testType">
|
||||
<el-select :disabled="swichpublished" v-model="examForm.testType">
|
||||
<el-option label="测试模式" :value="1"></el-option>
|
||||
<el-option label="练习模式" :value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="24">
|
||||
<el-col :span="24" >
|
||||
<el-form-item label="考试名称" prop="testName">
|
||||
<el-input v-model="examForm.testName" maxlength="50"
|
||||
<el-input :disabled="swichpublished" v-model="examForm.testName" maxlength="50"
|
||||
show-word-limit placeholder="请输入名称"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -157,7 +163,7 @@
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="试卷" prop="paperId">
|
||||
<el-select v-model="examForm.paperId" placeholder="请选择" @change="changePaper">
|
||||
<el-select :disabled="swichpublished" v-model="examForm.paperId" placeholder="请选择" @change="changePaper">
|
||||
<el-option
|
||||
v-for="item in questDirOptions"
|
||||
:key="item.id"
|
||||
@@ -292,7 +298,7 @@
|
||||
{{ resOwnerName(detailInfo.resOwner1) }}/{{resOwnerName(detailInfo.resOwner2)}}{{ detailInfo.resOwner3 ? '/' : ''}}{{ resOwnerName(detailInfo.resOwner3) }}
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="模式">
|
||||
<span v-if="detailInfo.testType == 1">测试模式</span>
|
||||
<span v-if="detailInfo.testType == 2">练习模式</span>
|
||||
@@ -680,6 +686,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
swichpublished:false,
|
||||
toScoreTow,
|
||||
qnum:0,//这里默认是30吧
|
||||
examDateTime:[],
|
||||
@@ -762,6 +769,24 @@ export default {
|
||||
this.loadData()
|
||||
},
|
||||
methods: {
|
||||
open(row,num) {
|
||||
this.$confirm('确定要下架改考试么?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.enableddata(row,num);
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '下架成功!'
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消下架'
|
||||
});
|
||||
});
|
||||
},
|
||||
exportsList(){
|
||||
if(this.answerData.data.length == 0){
|
||||
return this.$message.warning('暂无导出数据!')
|
||||
@@ -993,6 +1018,7 @@ export default {
|
||||
}
|
||||
},
|
||||
editData(row) {
|
||||
this.swichpublished = row.published;
|
||||
if(this.questDirOptions.length==0){
|
||||
this.findPapers();//获取试卷列表
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user