mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-20 16:26:43 +08:00
考试上下架控制调整
This commit is contained in:
@@ -784,22 +784,16 @@ export default {
|
||||
}
|
||||
this.$refs.comEditPaper.show(row.paperId);
|
||||
},
|
||||
open(row,num) {
|
||||
open(row,flag) {
|
||||
this.$confirm('确定要下架改考试么?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.enableddata(row,num);
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '下架成功!'
|
||||
});
|
||||
this.enableddata(row,flag);
|
||||
this.$message({ type: 'success', message: '下架成功!' });
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消下架'
|
||||
});
|
||||
this.$message({ type: 'info', message: '已取消下架' });
|
||||
});
|
||||
},
|
||||
exportsList(){
|
||||
@@ -1086,19 +1080,21 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
enableddata(row,num){
|
||||
console.log(row,num)
|
||||
enableddata(row,flag){
|
||||
//console.log(row,flag)
|
||||
let query = {
|
||||
id:row.id,
|
||||
enabled:num
|
||||
enabled:flag
|
||||
}
|
||||
console.log(query)
|
||||
//console.log(query)
|
||||
apiTest.enabled(query).then(res =>{
|
||||
if(res.status == 200){
|
||||
|
||||
row.enabled=flag;
|
||||
}else{
|
||||
this.$message({ type: 'error', message: res.message})
|
||||
}
|
||||
})
|
||||
this.loadData();
|
||||
|
||||
},
|
||||
releaseData(row,num) {
|
||||
let publish = num;
|
||||
|
||||
@@ -26,7 +26,10 @@
|
||||
<span>{{tipText}}</span>
|
||||
</div>
|
||||
<div v-else>
|
||||
<span v-if="testPaper.enabled">
|
||||
<el-button type="primary" :disabled="startButton" v-if="testStatus == 1" @click="startTest()">{{btnText}}</el-button>
|
||||
</span>
|
||||
<span v-else style="color: #666666;">此考试已下架</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="examStatus==2" style="text-align: center;color:#6d6d6d; ">考试已结束</div>
|
||||
|
||||
Reference in New Issue
Block a user