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