|
@@ -41,7 +41,8 @@ import {
|
|
|
gradingUserList,
|
|
|
deleteGradingUser,
|
|
|
resetPwd,
|
|
|
- subjectDetail
|
|
|
+ subjectDetail,
|
|
|
+ enableGradingUser
|
|
|
} from "@/api";
|
|
|
import ModifyGradingUser from "./components/ModifyGradingUser";
|
|
|
import { ROLE_TYPE, MARKER_RIGHT_TYPE } from "@/constants/enumerate";
|
|
@@ -88,6 +89,25 @@ export default {
|
|
|
title: "权重",
|
|
|
key: "weight"
|
|
|
},
|
|
|
+ {
|
|
|
+ title: "启用/禁用",
|
|
|
+ key: "action",
|
|
|
+ width: 120,
|
|
|
+ align: "center",
|
|
|
+ className: "table-action",
|
|
|
+ render: (h, param) => {
|
|
|
+ return h("i", {
|
|
|
+ class:
|
|
|
+ "icon ivu-icon " +
|
|
|
+ (param.row.enabled ? "ivu-icon-enable" : "ivu-icon-disable"),
|
|
|
+ on: {
|
|
|
+ click: () => {
|
|
|
+ this.toEnable(param.row);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
{
|
|
|
title: "操作",
|
|
|
key: "action",
|
|
@@ -166,6 +186,13 @@ export default {
|
|
|
});
|
|
|
return roleNames.join(",");
|
|
|
},
|
|
|
+ async toEnable(row) {
|
|
|
+ await enableGradingUser({
|
|
|
+ userId: row.id,
|
|
|
+ enable: !row.enabled
|
|
|
+ });
|
|
|
+ row.enabled = !row.enabled;
|
|
|
+ },
|
|
|
async toResetPwd(row) {
|
|
|
await resetPwd({ userId: row.id, password: "123456" });
|
|
|
this.$Message.success("重置密码成功!");
|