From db905ecd14f63dba9337b4f4715584ef2d7e8c7e Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: Fri, 07 Mar 2025 14:45:00 +0800
Subject: [PATCH] 修改
---
src/views/onlineEducation/platformManage/index.vue | 88 +++++++++++++++++++++++++++++---------------
1 files changed, 58 insertions(+), 30 deletions(-)
diff --git a/src/views/onlineEducation/platformManage/index.vue b/src/views/onlineEducation/platformManage/index.vue
index 9d1443b..6a4bf1a 100644
--- a/src/views/onlineEducation/platformManage/index.vue
+++ b/src/views/onlineEducation/platformManage/index.vue
@@ -21,18 +21,18 @@
</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"
@@ -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