| | |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| | | <template #default="scope"> |
| | | <!-- <el-button--> |
| | | <!-- size="mini"--> |
| | | <!-- type="text"--> |
| | | <!-- v-if="scope.row.status == 1"--> |
| | | <!-- @click="handleEnable(scope.row)"--> |
| | | <!-- >启用</el-button>--> |
| | | <!-- <el-button--> |
| | | <!-- size="mini"--> |
| | | <!-- type="text"--> |
| | | <!-- v-if="scope.row.status == 0"--> |
| | | <!-- @click="handleDisable(scope.row)"--> |
| | | <!-- >监管禁用</el-button>--> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | v-if="scope.row.status == 1" |
| | | @click="handleEnable(scope.row)" |
| | | >启用</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | v-if="scope.row.status == 0" |
| | | @click="handleEnable(scope.row)" |
| | | >监管禁用</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | |
| | | <script> |
| | | import addDialog from '@/views/onlineEducation/platformManage/components/addDialog.vue' |
| | | import { delExam } from '@/api/coalMine/placeManage/exam' |
| | | import { delPlat, listPlat } from '@/api/onlineEducation/plat' |
| | | import { delPlat, listPlat, modPlatStatus } from '@/api/onlineEducation/plat' |
| | | export default { |
| | | name: "platformManage", |
| | | components: {addDialog}, |
| | |
| | | this.$refs.addDialogRef.openDialog(type, data); |
| | | }, |
| | | handleEnable(data){ |
| | | if(data.status == 1){ |
| | | this.$confirm('确认启用该平台?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | // delExam( val.siteId).then((res) => { |
| | | // if (res.code == 200) { |
| | | // this.$message({ |
| | | // type:'success', |
| | | // message: '删除成功' |
| | | // }) |
| | | // this.getList() |
| | | // } |
| | | // }) |
| | | const param={ |
| | | id:data.id, |
| | | status: 0 |
| | | } |
| | | modPlatStatus( param).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message({ |
| | | type:'success', |
| | | message: '操作成功' |
| | | }) |
| | | this.getList() |
| | | } |
| | | }) |
| | | }) |
| | | }else { |
| | | this.$confirm('确认禁用该平台?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | const param={ |
| | | id:data.id, |
| | | status: 1 |
| | | } |
| | | modPlatStatus( param).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message({ |
| | | type:'success', |
| | | message: '操作成功' |
| | | }) |
| | | this.getList() |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | |
| | | }, |
| | | handleDisable(data){ |
| | | this.$confirm('确认禁用该平台?', '提示', { |