mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 03:46:44 +08:00
Merge branch 'exam' of https://codeup.aliyun.com/6265f483e4166464dc2f9c14/boeu/portal into exam
This commit is contained in:
@@ -63,21 +63,26 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<!-- v-if="scope.row.collectNumber === 0" -->
|
<!-- 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="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="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="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-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-button type="text" > 考试 <i class="el-icon-arrow-down el-icon--right"></i> </el-button>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<!-- <el-dropdown-item command="a">查看</el-dropdown-item> -->
|
<!-- <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="editData(scope.row)">编辑</el-dropdown-item>
|
||||||
<el-dropdown-item command="c" @click.native="deleteData(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-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</template>
|
</template>
|
||||||
@@ -112,18 +117,19 @@
|
|||||||
</el-cascader>
|
</el-cascader>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12" >
|
||||||
<el-form-item label="模式" prop="testType">
|
<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="1"></el-option>
|
||||||
<el-option label="练习模式" :value="2"></el-option>
|
<el-option label="练习模式" :value="2"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="24">
|
|
||||||
|
<el-col :span="24" >
|
||||||
<el-form-item label="考试名称" prop="testName">
|
<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>
|
show-word-limit placeholder="请输入名称"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -157,7 +163,7 @@
|
|||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="试卷" prop="paperId">
|
<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
|
<el-option
|
||||||
v-for="item in questDirOptions"
|
v-for="item in questDirOptions"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -292,7 +298,7 @@
|
|||||||
{{ resOwnerName(detailInfo.resOwner1) }}/{{resOwnerName(detailInfo.resOwner2)}}{{ detailInfo.resOwner3 ? '/' : ''}}{{ resOwnerName(detailInfo.resOwner3) }}
|
{{ resOwnerName(detailInfo.resOwner1) }}/{{resOwnerName(detailInfo.resOwner2)}}{{ detailInfo.resOwner3 ? '/' : ''}}{{ resOwnerName(detailInfo.resOwner3) }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col> -->
|
</el-col> -->
|
||||||
<el-col :span="12">
|
<el-col :span="12" >
|
||||||
<el-form-item label="模式">
|
<el-form-item label="模式">
|
||||||
<span v-if="detailInfo.testType == 1">测试模式</span>
|
<span v-if="detailInfo.testType == 1">测试模式</span>
|
||||||
<span v-if="detailInfo.testType == 2">练习模式</span>
|
<span v-if="detailInfo.testType == 2">练习模式</span>
|
||||||
@@ -680,6 +686,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
swichpublished:false,
|
||||||
toScoreTow,
|
toScoreTow,
|
||||||
qnum:0,//这里默认是30吧
|
qnum:0,//这里默认是30吧
|
||||||
examDateTime:[],
|
examDateTime:[],
|
||||||
@@ -762,6 +769,24 @@ export default {
|
|||||||
this.loadData()
|
this.loadData()
|
||||||
},
|
},
|
||||||
methods: {
|
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(){
|
exportsList(){
|
||||||
if(this.answerData.data.length == 0){
|
if(this.answerData.data.length == 0){
|
||||||
return this.$message.warning('暂无导出数据!')
|
return this.$message.warning('暂无导出数据!')
|
||||||
@@ -993,6 +1018,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
editData(row) {
|
editData(row) {
|
||||||
|
this.swichpublished = row.published;
|
||||||
if(this.questDirOptions.length==0){
|
if(this.questDirOptions.length==0){
|
||||||
this.findPapers();//获取试卷列表
|
this.findPapers();//获取试卷列表
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user