瀏覽代碼

feat: 招聘信息管理页面初始化及接口联调

mnisting 6 月之前
父節點
當前提交
d6ee4c6440

+ 53 - 0
src/api/recruitInfoManage/index.js

@@ -0,0 +1,53 @@
+import request from "@/utils/request";
+
+// 获取招聘信息列表 /business/hireInfo/list
+export const getList = (query) => {
+  return request({
+    url: "/business/hireInfo/list",
+    method: "get",
+    params: query,
+  });
+};
+
+// 获取招聘详情 /business/hireInfo/{hireInfoId}
+export const getDetail = (hireInfoId) => {
+  return request({
+    url: `/business/hireInfo/${hireInfoId}`,
+    method: "get",
+  });
+};
+
+// 新增招聘信息 /business/hireInfo/add
+export const addHireInfo = (data) => {
+  return request({
+    url: "/business/hireInfo/add",
+    method: "post",
+    data,
+  });
+};
+
+// 修改招聘信息 /business/hireInfo/edit
+export const editHireInfo = (data) => {
+  return request({
+    url: "/business/hireInfo/edit",
+    method: "put",
+    data,
+  });
+};
+
+// 修改招聘信息状态 /business/hireInfo/updateStatus
+export const editHireInfoStatus = (query) => {
+  return request({
+    url: "/business/hireInfo/updateStatus",
+    method: "put",
+    params: query,
+  });
+};
+
+// 删除招聘信息 /business/hireInfo/{hireInfoIds}
+export const delHireInfo = (hireInfoIds) => {
+  return request({
+    url: `/business/hireInfo/${hireInfoIds}`,
+    method: "delete",
+  });
+};

+ 102 - 88
src/router/index.js

@@ -1,10 +1,10 @@
-import Vue from 'vue'
-import Router from 'vue-router'
+import Vue from "vue";
+import Router from "vue-router";
 
-Vue.use(Router)
+Vue.use(Router);
 
 /* Layout */
-import Layout from '@/layout'
+import Layout from "@/layout";
 
 /**
  * Note: 路由配置项
@@ -31,153 +31,167 @@ import Layout from '@/layout'
 // 公共路由
 export const constantRoutes = [
   {
-    path: '/redirect',
+    path: "/redirect",
     component: Layout,
     hidden: true,
     children: [
       {
-        path: '/redirect/:path(.*)',
-        component: () => import('@/views/redirect')
-      }
-    ]
+        path: "/redirect/:path(.*)",
+        component: () => import("@/views/redirect"),
+      },
+    ],
   },
   {
-    path: '/login',
-    component: () => import('@/views/login'),
-    hidden: true
+    path: "/login",
+    component: () => import("@/views/login"),
+    hidden: true,
   },
   {
-    path: '/register',
-    component: () => import('@/views/register'),
-    hidden: true
+    path: "/register",
+    component: () => import("@/views/register"),
+    hidden: true,
   },
   {
-    path: '/404',
-    component: () => import('@/views/error/404'),
-    hidden: true
+    path: "/404",
+    component: () => import("@/views/error/404"),
+    hidden: true,
   },
   {
-    path: '/401',
-    component: () => import('@/views/error/401'),
-    hidden: true
+    path: "/401",
+    component: () => import("@/views/error/401"),
+    hidden: true,
   },
   {
-    path: '',
+    path: "",
     component: Layout,
-    redirect: 'index',
+    redirect: "index",
     children: [
       {
-        path: 'index',
-        component: () => import('@/views/index'),
-        name: 'Index',
-        meta: { title: '首页', icon: 'dashboard', affix: true }
-      }
-    ]
+        path: "index",
+        component: () => import("@/views/index"),
+        name: "Index",
+        meta: { title: "首页", icon: "dashboard", affix: true },
+      },
+    ],
   },
   {
-    path: '/user',
+    path: "/user",
     component: Layout,
     hidden: true,
-    redirect: 'noredirect',
+    redirect: "noredirect",
     children: [
       {
-        path: 'profile',
-        component: () => import('@/views/system/user/profile/index'),
-        name: 'Profile',
-        meta: { title: '个人中心', icon: 'user' }
-      }
-    ]
-  }
-]
+        path: "profile",
+        component: () => import("@/views/system/user/profile/index"),
+        name: "Profile",
+        meta: { title: "个人中心", icon: "user" },
+      },
+    ],
+  },
+  {
+    path: "/job",
+    component: Layout,
+    redirect: "noredirect",
+    children: [
+      {
+        path: "recruitInfoManage",
+        alwaysShow: true,
+        component: () => import("@/views/recruitInfoManage/index"),
+        name: "RecruitInfoManage",
+        meta: { title: "招聘信息管理", icon: "dashboard", affix: true },
+      },
+    ],
+  },
+];
 
 // 动态路由,基于用户权限动态去加载
 export const dynamicRoutes = [
   {
-    path: '/system/user-auth',
+    path: "/system/user-auth",
     component: Layout,
     hidden: true,
-    permissions: ['system:user:edit'],
+    permissions: ["system:user:edit"],
     children: [
       {
-        path: 'role/:userId(\\d+)',
-        component: () => import('@/views/system/user/authRole'),
-        name: 'AuthRole',
-        meta: { title: '分配角色', activeMenu: '/system/user' }
-      }
-    ]
+        path: "role/:userId(\\d+)",
+        component: () => import("@/views/system/user/authRole"),
+        name: "AuthRole",
+        meta: { title: "分配角色", activeMenu: "/system/user" },
+      },
+    ],
   },
   {
-    path: '/system/role-auth',
+    path: "/system/role-auth",
     component: Layout,
     hidden: true,
-    permissions: ['system:role:edit'],
+    permissions: ["system:role:edit"],
     children: [
       {
-        path: 'user/:roleId(\\d+)',
-        component: () => import('@/views/system/role/authUser'),
-        name: 'AuthUser',
-        meta: { title: '分配用户', activeMenu: '/system/role' }
-      }
-    ]
+        path: "user/:roleId(\\d+)",
+        component: () => import("@/views/system/role/authUser"),
+        name: "AuthUser",
+        meta: { title: "分配用户", activeMenu: "/system/role" },
+      },
+    ],
   },
   {
-    path: '/system/dict-data',
+    path: "/system/dict-data",
     component: Layout,
     hidden: true,
-    permissions: ['system:dict:list'],
+    permissions: ["system:dict:list"],
     children: [
       {
-        path: 'index/:dictId(\\d+)',
-        component: () => import('@/views/system/dict/data'),
-        name: 'Data',
-        meta: { title: '字典数据', activeMenu: '/system/dict' }
-      }
-    ]
+        path: "index/:dictId(\\d+)",
+        component: () => import("@/views/system/dict/data"),
+        name: "Data",
+        meta: { title: "字典数据", activeMenu: "/system/dict" },
+      },
+    ],
   },
   {
-    path: '/monitor/job-log',
+    path: "/monitor/job-log",
     component: Layout,
     hidden: true,
-    permissions: ['monitor:job:list'],
+    permissions: ["monitor:job:list"],
     children: [
       {
-        path: 'index/:jobId(\\d+)',
-        component: () => import('@/views/monitor/job/log'),
-        name: 'JobLog',
-        meta: { title: '调度日志', activeMenu: '/monitor/job' }
-      }
-    ]
+        path: "index/:jobId(\\d+)",
+        component: () => import("@/views/monitor/job/log"),
+        name: "JobLog",
+        meta: { title: "调度日志", activeMenu: "/monitor/job" },
+      },
+    ],
   },
   {
-    path: '/tool/gen-edit',
+    path: "/tool/gen-edit",
     component: Layout,
     hidden: true,
-    permissions: ['tool:gen:edit'],
+    permissions: ["tool:gen:edit"],
     children: [
       {
-        path: 'index/:tableId(\\d+)',
-        component: () => import('@/views/tool/gen/editTable'),
-        name: 'GenEdit',
-        meta: { title: '修改生成配置', activeMenu: '/tool/gen' }
-      }
-    ]
-  }
-]
+        path: "index/:tableId(\\d+)",
+        component: () => import("@/views/tool/gen/editTable"),
+        name: "GenEdit",
+        meta: { title: "修改生成配置", activeMenu: "/tool/gen" },
+      },
+    ],
+  },
+];
 
 // 防止连续点击多次路由报错
 let routerPush = Router.prototype.push;
 let routerReplace = Router.prototype.replace;
 // push
 Router.prototype.push = function push(location) {
-  return routerPush.call(this, location).catch(err => err)
-}
+  return routerPush.call(this, location).catch((err) => err);
+};
 // replace
 Router.prototype.replace = function push(location) {
-  return routerReplace.call(this, location).catch(err => err)
-}
+  return routerReplace.call(this, location).catch((err) => err);
+};
 
 export default new Router({
-  mode: 'history', // 去掉url中的#
+  mode: "history", // 去掉url中的#
   scrollBehavior: () => ({ y: 0 }),
-  routes: constantRoutes
-})
+  routes: constantRoutes,
+});

+ 258 - 0
src/views/recruitInfoManage/components/addJob.vue

@@ -0,0 +1,258 @@
+<template>
+  <div v-loading="loading">
+    <el-form
+      ref="form"
+      :rules="formRules"
+      :model="formData"
+      class="form"
+      label-width="100px"
+    >
+      <el-row :gutter="10">
+        <el-col :span="12">
+          <el-form-item label="职位名称" prop="jobName">
+            <el-input
+              v-model="formData.jobName"
+              maxlength="100"
+              placeholder="请输入职位名称"
+              clearable
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="工作地点" prop="jobLocation">
+            <el-input
+              v-model="formData.jobLocation"
+              maxlength="100"
+              placeholder="请输入工作地点"
+              clearable
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="薪资" prop="salary">
+            <el-input
+              v-model="formData.salary"
+              maxlength="100"
+              placeholder="请输入薪资"
+              clearable
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="资历" prop="seniority">
+            <el-input
+              v-model="formData.seniority"
+              maxlength="100"
+              placeholder="请输入资历"
+              clearable
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="福利" prop="benefit">
+            <el-select
+              style="width: 100%"
+              v-model="formData.benefit"
+              placeholder="请选择福利"
+              multiple
+              clearable
+            >
+              <el-option
+                v-for="dict in benefitOptions"
+                :key="dict.value"
+                :label="dict.label"
+                :value="dict.label"
+              />
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="招聘状态" prop="status">
+            <el-select
+              style="width: 100%"
+              v-model="formData.status"
+              placeholder="请选择招聘状态"
+              clearable
+            >
+              <!-- <el-option
+              v-for="dict in dict.type.sys_job_group"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            /> -->
+              <el-option
+                v-for="dict in statusOptions"
+                :key="dict.value"
+                :label="dict.label"
+                :value="dict.value"
+              />
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="岗位要求" prop="jobRequire">
+            <el-input
+              v-model="formData.jobRequire"
+              type="textarea"
+              :rows="4"
+              placeholder="请输入岗位要求"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="工作职责" prop="jobDuty">
+            <el-input
+              v-model="formData.jobDuty"
+              type="textarea"
+              :rows="4"
+              placeholder="请输入工作职责"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="备注">
+            <el-input
+              v-model="formData.remark"
+              type="textarea"
+              placeholder="请输入备注"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24" style="text-align: right">
+          <el-button type="primary" @click="handleConfirm">确 定</el-button>
+          <el-button @click="handleCancel">取 消</el-button>
+        </el-col>
+      </el-row>
+    </el-form>
+  </div>
+</template>
+
+<script>
+export default {
+  dicts: [],
+  props: {
+    infoData: {
+      type: Object,
+      default: () => {},
+    },
+    loading: {
+      type: Boolean,
+      default: false,
+    },
+  },
+  data() {
+    return {
+      formData: {
+        jobName: "",
+        jobLocation: "",
+        salary: "",
+        seniority: "",
+        jobRequire: "",
+        jobDuty: "",
+        benefit: [],
+        status: "",
+        remark: "",
+      },
+      benefitOptions: [
+        { value: "1", label: "六险一金" },
+        { value: "2", label: "双休" },
+        { value: "3", label: "年终奖" },
+        { value: "4", label: "调薪" },
+        { value: "5", label: "带薪年假" },
+        { value: "6", label: "节日礼品" },
+        { value: "7", label: "体检" },
+        { value: "8", label: "下午茶" },
+        { value: "9", label: "团建活动" },
+      ],
+      statusOptions: [
+        { value: "0", label: "招聘中" },
+        { value: "1", label: "招聘结束" },
+      ],
+      formRules: {
+        jobName: [
+          { required: true, message: "请输入职位名称", trigger: "blur" },
+        ],
+        jobLocation: [
+          { required: true, message: "请输入工作地点", trigger: "blur" },
+        ],
+        salary: [{ required: true, message: "请输入薪资", trigger: "blur" }],
+        seniority: [{ required: true, message: "请输入资历", trigger: "blur" }],
+        // benefit: [
+        //   {
+        //     type: "array",
+        //     required: true,
+        //     message: "请至少选择一个福利",
+        //     trigger: "change",
+        //   },
+        // ],
+        benefit: [{ required: true, message: "请选择福利", trigger: "change" }],
+        status: [
+          { required: true, message: "请选择招聘状态", trigger: "change" },
+        ],
+        jobRequire: [
+          { required: true, message: "请填写岗位要求", trigger: "blur" },
+        ],
+        jobDuty: [
+          { required: true, message: "请填写工作职责", trigger: "blur" },
+        ],
+      },
+    };
+  },
+  watch: {
+    infoData: {
+      handler(newVal) {
+        if (newVal) {
+          this.formData = {
+            hireInfoId: newVal.hireInfoId || "",
+            jobName: newVal.jobName || "",
+            jobLocation: newVal.jobLocation || "",
+            salary: newVal.salary || "",
+            seniority: newVal.seniority || "",
+            jobRequire: newVal.jobRequire || "",
+            jobDuty: newVal.jobDuty || "",
+            benefit: newVal.benefit ? newVal.benefit.split(",") : [],
+            status: newVal.status || "",
+            remark: newVal.remark || "",
+          };
+          this.$nextTick(() => {
+            this.$refs.form && this.$refs.form.clearValidate();
+          });
+        }
+      },
+      immediate: true,
+    },
+  },
+  created() {},
+  methods: {
+    handleConfirm() {
+      let benefit = this.formData.benefit.join();
+      let obj = {
+        ...this.formData,
+        benefit,
+      };
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          this.$emit("save", obj);
+        } else {
+          this.$message.warning("表单校验不通过,请检查");
+        }
+      });
+    },
+    handleCancel() {
+      this.formData = {
+        jobName: "",
+        jobLocation: "",
+        salary: "",
+        seniority: "",
+        jobRequire: "",
+        jobDuty: "",
+        benefit: [],
+        status: "",
+        remark: "",
+      };
+      this.$refs.form.clearValidate();
+      this.$emit("cancel");
+    },
+  },
+};
+</script>

+ 349 - 0
src/views/recruitInfoManage/index.vue

@@ -0,0 +1,349 @@
+<template>
+  <div class="app-container">
+    <!-- 当vue的搜索框form表单有且只有一个输入框时,点击回车,会触发刷新整个页面,
+      可使用 @submit.native.prevent 阻止页面刷新 -->
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      @submit.native.prevent
+    >
+      <el-form-item label="职位名称">
+        <el-input
+          v-model="queryParams.jobName"
+          placeholder="请输入职位名称"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <!-- <el-form-item label="状态" prop="status">
+        <el-select
+          v-model="queryParams.status"
+          placeholder="角色状态"
+          clearable
+          style="width: 240px"
+        >
+          <el-option
+            v-for="dict in dict.type.sys_normal_disable"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item> -->
+      <!-- <el-form-item label="创建时间">
+        <el-date-picker
+          v-model="dateRange"
+          style="width: 240px"
+          value-format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="-"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        ></el-date-picker>
+      </el-form-item> -->
+      <el-form-item>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          >新增</el-button
+        >
+      </el-col>
+      <!-- <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="selectRows.length !== 1"
+          @click="handleUpdate"
+          >编辑</el-button
+        >
+      </el-col> -->
+      <!-- <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="!selectRows.length"
+          @click="handleDelete"
+          >删除</el-button
+        >
+      </el-col> -->
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
+    </el-row>
+
+    <!-- @selection-change="handleSelectionChange" -->
+    <el-table v-loading="loading" :data="tableData">
+      <!-- <el-table-column type="selection" width="55" align="center" /> -->
+      <el-table-column label="职位编号" prop="hireInfoId" width="120" />
+      <el-table-column
+        label="职位名称"
+        prop="jobName"
+        :show-overflow-tooltip="true"
+        width="150"
+      />
+      <el-table-column
+        label="工作地点"
+        prop="jobLocation"
+        :show-overflow-tooltip="true"
+        width="150"
+      />
+      <el-table-column label="薪资" prop="salary" />
+      <el-table-column label="资历" prop="seniority" />
+      <el-table-column label="福利" prop="benefit" />
+
+      <el-table-column label="状态" align="center">
+        <template slot-scope="scope">
+          <el-switch
+            v-model="scope.row.status"
+            active-color="#13ce66"
+            inactive-color="#ff4949"
+            active-value="0"
+            inactive-value="1"
+            @change="changeStatus(scope.row)"
+          >
+          </el-switch>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="创建时间"
+        align="center"
+        prop="createTime"
+        width="180"
+      >
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.createTime) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            >修改</el-button
+          >
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            >删除</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 新增编辑弹窗 width="500px"-->
+    <el-dialog :title="title" :visible.sync="dlgVisible" append-to-body>
+      <addJob
+        :loading="dlgLoading"
+        :infoData="infoData"
+        @save="handleSave"
+        @cancel="handleCancel"
+      ></addJob>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  getList,
+  getDetail,
+  addHireInfo,
+  editHireInfo,
+  editHireInfoStatus,
+  delHireInfo,
+} from "@/api/recruitInfoManage";
+
+import addJob from "./components/addJob.vue";
+
+export default {
+  name: "RecruitInfoManage",
+  components: { addJob },
+  dicts: [],
+  data() {
+    return {
+      // 是否展示筛选项
+      showSearch: true,
+      // 遮罩层
+      loading: true,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        jobName: "",
+      },
+      // 数据量
+      total: 0,
+      // 表格数据
+      tableData: [],
+      // 选中的数据
+      selectRows: [],
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {},
+      // 弹窗相关
+      dlgVisible: false,
+      title: "",
+      infoData: {},
+      dlgLoading: false,
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    // 搜索
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    // 重置
+    resetQuery() {
+      this.queryParams = {
+        pageNum: 1,
+        pageSize: 10,
+        jobName: "",
+      };
+      this.getList();
+    },
+    // 查询列表
+    getList() {
+      this.loading = true;
+      getList(this.queryParams)
+        .then((res) => {
+          console.log(res);
+          this.tableData = res.rows;
+          this.total = res.total;
+        })
+        .finally(() => (this.loading = false));
+    },
+    // 新增
+    handleAdd() {
+      this.dlgVisible = true;
+      this.title = "新增";
+      this.infoData = {};
+    },
+    // 修改
+    handleUpdate(row) {
+      this.dlgVisible = true;
+      this.title = "编辑";
+      const hireInfoId = row.hireInfoId
+        ? row.hireInfoId
+        : this.selectRows[0].hireInfoId;
+      this.dlgLoading = true;
+      getDetail(hireInfoId)
+        .then((res) => {
+          console.log(res);
+          this.infoData = res.data;
+        })
+        .finally(() => (this.dlgLoading = false));
+    },
+    // 确认新增/修改
+    handleSave(data) {
+      this.dlgLoading = true;
+      if (data.hireInfoId) {
+        editHireInfo(data)
+          .then((res) => {
+            this.$message.success(res.msg);
+            this.handleCancel();
+            this.getList();
+          })
+          .finally(() => (this.dlgLoading = false));
+      } else {
+        addHireInfo(data)
+          .then((res) => {
+            this.$message.success(res.msg);
+            this.handleCancel();
+            this.getList();
+          })
+          .finally(() => (this.dlgLoading = false));
+      }
+    },
+    // 关闭弹窗
+    handleCancel() {
+      this.dlgVisible = false;
+    },
+    // 删除
+    handleDelete(row) {
+      const ids = this.selectRows.map((item) => item.hireInfoId).join();
+      const hireInfoIds = row.hireInfoId || ids;
+      this.$modal
+        .confirm("是否确认删除数据")
+        .then(function () {
+          return delHireInfo(hireInfoIds);
+        })
+        .then((res) => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
+    },
+    handleSelectionChange(selection) {
+      this.selectRows = selection;
+    },
+    // 修改招聘信息状态
+    changeStatus(row) {
+      let params = {
+        hireInfoIds: row.hireInfoId,
+        status: row.status,
+      };
+      // console.log(params, 1211);
+      this.$modal
+        .confirm("是否确认修改状态")
+        .then(function () {
+          return editHireInfoStatus(params);
+        })
+        .then((res) => {
+          this.getList();
+          this.$modal.msgSuccess(res.msg);
+        })
+        .catch((err) => {
+          console.log(err, "err");
+          row.status = row.status === "0" ? "1" : "0";
+        });
+    },
+  },
+};
+</script>