From c3bb35b20d6e076f73a1cad50fd6b9b94ca399a7 Mon Sep 17 00:00:00 2001 From: zhouwx <1175765986@qq.com> Date: 星期一, 06 一月 2025 16:15:05 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/onlineEducation/platformManage/index.vue | 66 +++++++++++++++++++++++--------- 1 files changed, 47 insertions(+), 19 deletions(-) diff --git a/src/views/onlineEducation/platformManage/index.vue b/src/views/onlineEducation/platformManage/index.vue index 43d5f86..6a4bf1a 100644 --- a/src/views/onlineEducation/platformManage/index.vue +++ b/src/views/onlineEducation/platformManage/index.vue @@ -31,7 +31,7 @@ size="mini" type="text" v-if="scope.row.status == 0" - @click="handleDisable(scope.row)" + @click="handleEnable(scope.row)" >监管禁用</el-button> <el-button size="mini" @@ -51,7 +51,7 @@ <pagination v-show="total>0" :total="total" - :page.sync="queryParams.pageIndex" + :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> @@ -62,7 +62,7 @@ <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}, @@ -76,7 +76,7 @@ total: 0, expertList: [], queryParams: { - pageIndex: 1, + pageNum: 1, pageSize: 10 }, classiFy: [], @@ -125,21 +125,49 @@ this.$refs.addDialogRef.openDialog(type, data); }, handleEnable(data){ - this.$confirm('确认启用该平台?', '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }).then(() => { - // delExam( val.siteId).then((res) => { - // if (res.code == 200) { - // this.$message({ - // type:'success', - // message: '删除成功' - // }) - // this.getList() - // } - // }) - }) + if(data.status == 1){ + this.$confirm('确认启用该平台?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + 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('确认禁用该平台?', '提示', { -- Gitblit v1.9.2