mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 19:06:43 +08:00
上架下架操作
This commit is contained in:
@@ -63,6 +63,10 @@
|
||||
<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>
|
||||
@@ -1040,6 +1044,20 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
enableddata(row,num){
|
||||
console.log(row,num)
|
||||
let query = {
|
||||
id:row.id,
|
||||
enabled:num
|
||||
}
|
||||
console.log(query)
|
||||
apiTest.enabled(query).then(res =>{
|
||||
if(res.status == 200){
|
||||
|
||||
}
|
||||
})
|
||||
this.loadData();
|
||||
},
|
||||
releaseData(row,num) {
|
||||
let publish = num;
|
||||
this.$confirm(`正在${publish? '':'取消'}发布考试, 是否继续?`, '提示', {
|
||||
|
||||
Reference in New Issue
Block a user