feat
parent
eb144fef1c
commit
9ff67beafa
|
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
"openapi": "3.0.1",
|
||||
"info": { "title": "删除审核专家", "version": "1.0.0" },
|
||||
"paths": {
|
||||
"/qual-filing-expert/delete": {
|
||||
"post": {
|
||||
"summary": "删除审核专家",
|
||||
"tags": ["审核专家管理"],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "query",
|
||||
"description": "主键ID",
|
||||
"required": true,
|
||||
"schema": { "type": "integer" }
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": { "$ref": "#/components/schemas/SingleResponseVoid" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"SingleResponseVoid": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"success": { "type": "boolean" },
|
||||
"code": { "type": "string" },
|
||||
"message": { "type": "string" },
|
||||
"data": { "type": "null" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
/** POST /qual-filing-expert/delete — 删除审核专家(id 为 query 参数) */
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
"openapi": "3.0.1",
|
||||
"info": { "title": "查询审核专家详情", "version": "1.0.0" },
|
||||
"paths": {
|
||||
"/qual-filing-expert/get": {
|
||||
"get": {
|
||||
"summary": "查询审核专家详情",
|
||||
"tags": ["审核专家管理"],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "query",
|
||||
"description": "主键ID",
|
||||
"required": true,
|
||||
"schema": { "type": "integer" }
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": { "$ref": "#/components/schemas/SingleResponseQualFilingExpertCO" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"QualFilingExpertCO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": { "type": "integer", "format": "int64", "description": "主键ID(后端Long)" },
|
||||
"userName": { "type": "string", "description": "用户名称/姓名" },
|
||||
"account": { "type": "string", "description": "账号" },
|
||||
"genderCode": { "type": "integer", "description": "性别编码(1男2女)" },
|
||||
"genderName": { "type": "string", "description": "性别名称" },
|
||||
"idCardNo": { "type": "string", "description": "身份证号" },
|
||||
"certificate": { "type": "string", "description": "证书" },
|
||||
"tenantId": { "type": "integer", "format": "int64", "description": "租户ID" }
|
||||
}
|
||||
},
|
||||
"SingleResponseQualFilingExpertCO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"success": { "type": "boolean" },
|
||||
"code": { "type": "string" },
|
||||
"message": { "type": "string" },
|
||||
"data": { "$ref": "#/components/schemas/QualFilingExpertCO" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/** GET /qual-filing-expert/get — 查询审核专家详情 */
|
||||
|
||||
interface QualFilingExpertCO {
|
||||
id?: string; // 主键ID(后端Long)
|
||||
userName?: string; // 用户名称/姓名
|
||||
account?: string; // 账号
|
||||
genderCode?: number; // 性别编码(1男2女)
|
||||
genderName?: string; // 性别名称
|
||||
idCardNo?: string; // 身份证号
|
||||
certificate?: string; // 证书
|
||||
tenantId?: string; // 租户ID(后端Long)
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
{
|
||||
"openapi": "3.0.1",
|
||||
"info": { "title": "修改审核专家", "version": "1.0.0" },
|
||||
"paths": {
|
||||
"/qual-filing-expert/modify": {
|
||||
"post": {
|
||||
"summary": "修改审核专家",
|
||||
"tags": ["审核专家管理"],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": { "$ref": "#/components/schemas/QualFilingExpertModifyCmd" }
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": { "$ref": "#/components/schemas/SingleResponseQualFilingExpertCO" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"QualFilingExpertModifyCmd": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": { "type": "integer", "format": "int64", "description": "主键ID(后端Long)" },
|
||||
"userName": { "type": "string", "description": "用户名称/姓名" },
|
||||
"account": { "type": "string", "description": "账号" },
|
||||
"genderCode": { "type": "integer", "description": "性别编码(1男2女)" },
|
||||
"genderName": { "type": "string", "description": "性别名称" },
|
||||
"idCardNo": { "type": "string", "description": "身份证号" },
|
||||
"certificate": { "type": "string", "description": "证书" }
|
||||
}
|
||||
},
|
||||
"QualFilingExpertCO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": { "type": "integer", "format": "int64", "description": "主键ID(后端Long)" },
|
||||
"userName": { "type": "string", "description": "用户名称/姓名" },
|
||||
"account": { "type": "string", "description": "账号" },
|
||||
"genderCode": { "type": "integer", "description": "性别编码(1男2女)" },
|
||||
"genderName": { "type": "string", "description": "性别名称" },
|
||||
"idCardNo": { "type": "string", "description": "身份证号" },
|
||||
"certificate": { "type": "string", "description": "证书" },
|
||||
"tenantId": { "type": "integer", "format": "int64", "description": "租户ID" }
|
||||
}
|
||||
},
|
||||
"SingleResponseQualFilingExpertCO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"success": { "type": "boolean" },
|
||||
"code": { "type": "string" },
|
||||
"message": { "type": "string" },
|
||||
"data": { "$ref": "#/components/schemas/QualFilingExpertCO" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
/** POST /qual-filing-expert/modify — 修改审核专家 */
|
||||
|
||||
interface QualFilingExpertModifyCmd {
|
||||
id?: string; // 主键ID(后端Long)
|
||||
userName?: string; // 用户名称/姓名
|
||||
account?: string; // 账号
|
||||
genderCode?: number; // 性别编码(1男2女)
|
||||
genderName?: string; // 性别名称
|
||||
idCardNo?: string; // 身份证号
|
||||
certificate?: string; // 证书
|
||||
}
|
||||
|
||||
interface QualFilingExpertCO {
|
||||
id?: string; // 主键ID(后端Long)
|
||||
userName?: string; // 用户名称/姓名
|
||||
account?: string; // 账号
|
||||
genderCode?: number; // 性别编码(1男2女)
|
||||
genderName?: string; // 性别名称
|
||||
idCardNo?: string; // 身份证号
|
||||
certificate?: string; // 证书
|
||||
tenantId?: string; // 租户ID(后端Long)
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
"openapi": "3.0.1",
|
||||
"info": { "title": "分页查询审核专家", "version": "1.0.0" },
|
||||
"paths": {
|
||||
"/qual-filing-expert/page": {
|
||||
"get": {
|
||||
"summary": "分页查询审核专家",
|
||||
"tags": ["审核专家管理"],
|
||||
"parameters": [
|
||||
{ "name": "current", "in": "query", "description": "当前页(默认1)", "required": false, "schema": { "type": "integer", "format": "int64", "default": 1 } },
|
||||
{ "name": "size", "in": "query", "description": "每页条数(默认10)", "required": false, "schema": { "type": "integer", "format": "int64", "default": 10 } },
|
||||
{ "name": "orders", "in": "query", "description": "排序(格式: column:asc|desc, 多个用逗号分隔)", "required": false, "schema": { "type": "string" } },
|
||||
{ "name": "userName", "in": "query", "description": "用户名称/姓名", "required": false, "schema": { "type": "string" } },
|
||||
{ "name": "account", "in": "query", "description": "账号", "required": false, "schema": { "type": "string" } },
|
||||
{ "name": "genderCode", "in": "query", "description": "性别编码(1男2女)", "required": false, "schema": { "type": "integer" } },
|
||||
{ "name": "idCardNo", "in": "query", "description": "身份证号", "required": false, "schema": { "type": "string" } }
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": { "$ref": "#/components/schemas/PageResponseQualFilingExpertCO" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"QualFilingExpertCO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": { "type": "integer", "format": "int64", "description": "主键ID(后端Long)" },
|
||||
"userName": { "type": "string", "description": "用户名称/姓名" },
|
||||
"account": { "type": "string", "description": "账号" },
|
||||
"genderCode": { "type": "integer", "description": "性别编码(1男2女)" },
|
||||
"genderName": { "type": "string", "description": "性别名称" },
|
||||
"idCardNo": { "type": "string", "description": "身份证号" },
|
||||
"certificate": { "type": "string", "description": "证书" },
|
||||
"tenantId": { "type": "integer", "format": "int64", "description": "租户ID" }
|
||||
}
|
||||
},
|
||||
"PageResponseQualFilingExpertCO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"success": { "type": "boolean", "description": "是否成功" },
|
||||
"code": { "type": "string", "description": "响应码" },
|
||||
"message": { "type": "string", "description": "响应消息" },
|
||||
"data": { "type": "array", "items": { "$ref": "#/components/schemas/QualFilingExpertCO" }, "description": "响应数据" },
|
||||
"total": { "type": "integer", "format": "int64", "description": "总条数" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
/** GET /qual-filing-expert/page — 分页查询审核专家 */
|
||||
|
||||
interface QualFilingExpertCO {
|
||||
id?: string; // 主键ID(后端Long)
|
||||
userName?: string; // 用户名称/姓名
|
||||
account?: string; // 账号
|
||||
genderCode?: number; // 性别编码(1男2女)
|
||||
genderName?: string; // 性别名称
|
||||
idCardNo?: string; // 身份证号
|
||||
certificate?: string; // 证书
|
||||
tenantId?: string; // 租户ID(后端Long)
|
||||
}
|
||||
|
||||
interface PageResponseQualFilingExpertCO {
|
||||
success?: boolean;
|
||||
code?: string;
|
||||
message?: string;
|
||||
data?: QualFilingExpertCO[];
|
||||
total?: number;
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
{
|
||||
"openapi": "3.0.1",
|
||||
"info": { "title": "新增审核专家", "version": "1.0.0" },
|
||||
"paths": {
|
||||
"/qual-filing-expert/save": {
|
||||
"post": {
|
||||
"summary": "新增审核专家",
|
||||
"tags": ["审核专家管理"],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": { "$ref": "#/components/schemas/QualFilingExpertAddCmd" }
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": { "$ref": "#/components/schemas/SingleResponseQualFilingExpertCO" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"QualFilingExpertAddCmd": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"userName": { "type": "string", "description": "用户名称/姓名" },
|
||||
"account": { "type": "string", "description": "账号" },
|
||||
"genderCode": { "type": "integer", "description": "性别编码(1男2女)" },
|
||||
"genderName": { "type": "string", "description": "性别名称" },
|
||||
"idCardNo": { "type": "string", "description": "身份证号" },
|
||||
"certificate": { "type": "string", "description": "证书" }
|
||||
}
|
||||
},
|
||||
"QualFilingExpertCO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": { "type": "integer", "format": "int64", "description": "主键ID(后端Long, 前端按字符串保证精度)" },
|
||||
"userName": { "type": "string", "description": "用户名称/姓名" },
|
||||
"account": { "type": "string", "description": "账号" },
|
||||
"genderCode": { "type": "integer", "description": "性别编码(1男2女)" },
|
||||
"genderName": { "type": "string", "description": "性别名称" },
|
||||
"idCardNo": { "type": "string", "description": "身份证号" },
|
||||
"certificate": { "type": "string", "description": "证书" },
|
||||
"tenantId": { "type": "integer", "format": "int64", "description": "租户ID" }
|
||||
}
|
||||
},
|
||||
"SingleResponseQualFilingExpertCO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"success": { "type": "boolean", "description": "是否成功" },
|
||||
"code": { "type": "string", "description": "响应码" },
|
||||
"message": { "type": "string", "description": "响应消息" },
|
||||
"data": { "$ref": "#/components/schemas/QualFilingExpertCO", "description": "响应数据" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
/** POST /qual-filing-expert/save — 新增审核专家 */
|
||||
|
||||
interface QualFilingExpertAddCmd {
|
||||
userName?: string; // 用户名称/姓名
|
||||
account?: string; // 账号
|
||||
genderCode?: number; // 性别编码(1男2女)
|
||||
genderName?: string; // 性别名称
|
||||
idCardNo?: string; // 身份证号
|
||||
certificate?: string; // 证书
|
||||
}
|
||||
|
||||
interface QualFilingExpertCO {
|
||||
id?: string; // 主键ID(后端Long)
|
||||
userName?: string; // 用户名称/姓名
|
||||
account?: string; // 账号
|
||||
genderCode?: number; // 性别编码(1男2女)
|
||||
genderName?: string; // 性别名称
|
||||
idCardNo?: string; // 身份证号
|
||||
certificate?: string; // 证书
|
||||
tenantId?: string; // 租户ID(后端Long)
|
||||
}
|
||||
|
|
@ -10,7 +10,7 @@ module.exports = {
|
|||
javaGitBranch: "<branch-name>",
|
||||
// 本地联调 safetyEval-service(context-path: /safetyEval,默认端口 8095)
|
||||
// 可通过环境变量覆盖: SAFETY_EVAL_API_HOST=http://192.168.x.x:8095
|
||||
API_HOST: "http://192.168.0.204",
|
||||
API_HOST: "http://192.168.0.134",
|
||||
},
|
||||
production: {
|
||||
// 应用后端分支名称,部署上线需要
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
// 分页查询
|
||||
export const queryExpertPage = declareRequest(
|
||||
"qualExpertLoading",
|
||||
"Get > /safetyEval/qual-filing-expert/page",
|
||||
"qualExpertList: [] | res.data || [] & qualExpertTotal: 0 | res.total || 0",
|
||||
);
|
||||
|
||||
// 新增
|
||||
export const saveExpert = declareRequest(
|
||||
"qualExpertSubmitLoading",
|
||||
"Post > @/safetyEval/qual-filing-expert/save",
|
||||
);
|
||||
|
||||
// 查询详情
|
||||
export const getExpertDetail = declareRequest(
|
||||
"qualExpertDetailLoading",
|
||||
"Get > /safetyEval/qual-filing-expert/get",
|
||||
"qualExpertDetail: {} | res.data || {}",
|
||||
);
|
||||
|
||||
// 修改
|
||||
export const modifyExpert = declareRequest(
|
||||
"qualExpertSubmitLoading",
|
||||
"Post > @/safetyEval/qual-filing-expert/modify",
|
||||
);
|
||||
|
||||
// 删除
|
||||
export const deleteExpert = declareRequest(
|
||||
"qualExpertSubmitLoading",
|
||||
"Post > @/safetyEval/qual-filing-expert/delete",
|
||||
);
|
||||
|
|
@ -345,3 +345,5 @@ export const submitQualFiling = declareRequest(
|
|||
"qualFilingSubmitLoading",
|
||||
"Post > @/safetyEval/qual-filing/aggregationSaveOrEdit",
|
||||
);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,12 @@ export const CHANGE_STATUS_MAP = {
|
|||
approved: { label: "已审核", color: "success" },
|
||||
};
|
||||
|
||||
/** 性别 */
|
||||
export const GENDER_OPTIONS = [
|
||||
{ label: "男", value: 1 },
|
||||
{ label: "女", value: 2 },
|
||||
];
|
||||
|
||||
/** 专家等级 */
|
||||
export const EXPERT_LEVEL_MAP = {
|
||||
1: "一级",
|
||||
|
|
|
|||
|
|
@ -19,3 +19,4 @@ export const NS_STAFF_RESIGNATION_APPLY = defineNamespace("staffResignationApply
|
|||
export const NS_EQUIP_INFO = defineNamespace("equipInfo");
|
||||
export const NS_QUAL_FILING = defineNamespace("qualFiling");
|
||||
export const NS_QUAL_REVIEW = defineNamespace("qualReview");
|
||||
export const NS_QUAL_EXPERT = defineNamespace("qualExpert");
|
||||
|
|
|
|||
|
|
@ -0,0 +1,257 @@
|
|||
import React, { useEffect, useState } from "react";
|
||||
import { Button, Descriptions, Form, Input, message, Modal, Select, Table } from "antd";
|
||||
import TableAction from "@cqsjjb/jjb-react-admin-component/TableAction";
|
||||
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
||||
import SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm";
|
||||
import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper";
|
||||
import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd";
|
||||
import { tools } from "@cqsjjb/jjb-common-lib";
|
||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { NS_QUAL_EXPERT } from "~/enumerate/namespace";
|
||||
import { GENDER_OPTIONS } from "~/enumerate/constant";
|
||||
|
||||
const { router } = tools;
|
||||
|
||||
const ExperManage = (props) => {
|
||||
const [searchForm] = Form.useForm();
|
||||
const [editForm] = Form.useForm();
|
||||
const [detailVisible, setDetailVisible] = useState(false);
|
||||
const [editVisible, setEditVisible] = useState(false);
|
||||
const [editingId, setEditingId] = useState(null);
|
||||
const [submiting, setSubmiting] = useState(false);
|
||||
|
||||
const { qualExpert, queryExpertPage, getExpertDetail, saveExpert, modifyExpert, deleteExpert } = props;
|
||||
const { qualExpertList, qualExpertTotal, qualExpertLoading, qualExpertDetail, qualExpertDetailLoading } = qualExpert || {};
|
||||
|
||||
const getData = () => {
|
||||
queryExpertPage({
|
||||
...router.query,
|
||||
current: router.query.current || 1,
|
||||
size: router.query.size || 10,
|
||||
});
|
||||
};
|
||||
|
||||
const handleReset = (values) => {
|
||||
router.query = {
|
||||
...router.query,
|
||||
...values,
|
||||
current: 1,
|
||||
size: 10,
|
||||
};
|
||||
getData();
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
searchForm.setFieldsValue(router.query);
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
// ─── 查看详情 ───
|
||||
|
||||
const openDetail = async (id) => {
|
||||
setDetailVisible(true);
|
||||
await getExpertDetail({ id });
|
||||
};
|
||||
|
||||
// ─── 新增 / 编辑 ───
|
||||
|
||||
const openAdd = () => {
|
||||
editForm.resetFields();
|
||||
setEditingId(null);
|
||||
setEditVisible(true);
|
||||
};
|
||||
|
||||
const openEdit = async (id) => {
|
||||
setEditingId(id);
|
||||
setEditVisible(true);
|
||||
const res = await getExpertDetail({ id });
|
||||
if (res?.success !== false) {
|
||||
editForm.setFieldsValue(res.data || qualExpertDetail);
|
||||
}
|
||||
};
|
||||
|
||||
const handleEditSubmit = async () => {
|
||||
const values = await editForm.validateFields();
|
||||
setSubmiting(true);
|
||||
const action = editingId ? modifyExpert : saveExpert;
|
||||
const params = editingId ? { ...values, id: editingId } : values;
|
||||
const res = await action(params);
|
||||
setSubmiting(false);
|
||||
if (res?.success !== false) {
|
||||
message.success(editingId ? "修改成功" : "新增成功");
|
||||
setEditVisible(false);
|
||||
getData();
|
||||
}
|
||||
};
|
||||
|
||||
// ─── 删除 ───
|
||||
|
||||
const handleDelete = (record) => {
|
||||
Modal.confirm({
|
||||
title: "确认删除",
|
||||
content: `确认删除专家「${record.userName}」?此操作不可恢复。`,
|
||||
okText: "确认删除",
|
||||
okButtonProps: { danger: true },
|
||||
cancelText: "取消",
|
||||
onOk: async () => {
|
||||
const res = await deleteExpert({ id: record.id });
|
||||
if (res?.success !== false) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
// ─── 表格列 ───
|
||||
|
||||
const columns = [
|
||||
{
|
||||
title: "序号",
|
||||
width: 60,
|
||||
fixed: "left",
|
||||
render: (_, __, index) => index + 1,
|
||||
},
|
||||
{ title: "姓名", dataIndex: "userName", width: 100 },
|
||||
{ title: "账号", dataIndex: "account", width: 140 },
|
||||
{
|
||||
title: "性别",
|
||||
dataIndex: "genderName",
|
||||
width: 70,
|
||||
render: (text) => text || "--",
|
||||
},
|
||||
{ title: "身份证号", dataIndex: "idCardNo", width: 180 },
|
||||
{ title: "证书", dataIndex: "certificate", width: 120, ellipsis: true },
|
||||
{
|
||||
title: "操作",
|
||||
width: 180,
|
||||
fixed: "right",
|
||||
render: (_, record) => (
|
||||
<TableAction>
|
||||
<Button type="link" size="small" onClick={() => openDetail(record.id)}>查看</Button>
|
||||
<Button type="link" size="small" onClick={() => openEdit(record.id)}>编辑</Button>
|
||||
<Button type="link" size="small" danger onClick={() => handleDelete(record)}>删除</Button>
|
||||
</TableAction>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<PageLayout
|
||||
title="专家管理"
|
||||
extra={
|
||||
<Button type="primary" onClick={openAdd}>新增专家</Button>
|
||||
}
|
||||
>
|
||||
<SearchForm
|
||||
style={{ marginBottom: 24 }}
|
||||
form={searchForm}
|
||||
loading={qualExpertLoading}
|
||||
formLine={[
|
||||
<Form.Item key="userName" name="userName">
|
||||
<ControlWrapper.Input label="姓名" placeholder="请输入" allowClear />
|
||||
</Form.Item>,
|
||||
<Form.Item key="account" name="account">
|
||||
<ControlWrapper.Input label="账号" placeholder="请输入" allowClear />
|
||||
</Form.Item>,
|
||||
<Form.Item key="genderCode" name="genderCode">
|
||||
<ControlWrapper.Select
|
||||
label="性别"
|
||||
placeholder="请选择"
|
||||
allowClear
|
||||
style={{ width: "100%" }}
|
||||
>
|
||||
{GENDER_OPTIONS.map((item) => (
|
||||
<Select.Option key={item.value} value={item.value}>{item.label}</Select.Option>
|
||||
))}
|
||||
</ControlWrapper.Select>
|
||||
</Form.Item>,
|
||||
<Form.Item key="idCardNo" name="idCardNo">
|
||||
<ControlWrapper.Input label="身份证号" placeholder="请输入" allowClear />
|
||||
</Form.Item>,
|
||||
]}
|
||||
onReset={handleReset}
|
||||
onFinish={(values) => {
|
||||
router.query = {
|
||||
...router.query,
|
||||
...values,
|
||||
current: 1,
|
||||
size: 10,
|
||||
};
|
||||
getData();
|
||||
}}
|
||||
/>
|
||||
|
||||
<Table
|
||||
rowKey="id"
|
||||
columns={columns}
|
||||
dataSource={qualExpertList}
|
||||
scroll={{ y: props.scrollY }}
|
||||
loading={qualExpertLoading}
|
||||
pagination={{
|
||||
total: qualExpertTotal,
|
||||
showSizeChanger: true,
|
||||
showQuickJumper: true,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
current: router.query.current || 1,
|
||||
pageSize: router.query.size || 10,
|
||||
onChange: (page, pageSize) => {
|
||||
router.query = { ...router.query, current: page, size: pageSize };
|
||||
getData();
|
||||
},
|
||||
}}
|
||||
/>
|
||||
|
||||
{/* 查看详情弹窗 */}
|
||||
<Modal
|
||||
title="专家详情"
|
||||
open={detailVisible}
|
||||
onCancel={() => setDetailVisible(false)}
|
||||
footer={<Button onClick={() => setDetailVisible(false)}>关闭</Button>}
|
||||
width={560}
|
||||
>
|
||||
<Descriptions column={2} bordered size="small" loading={qualExpertDetailLoading}>
|
||||
<Descriptions.Item label="姓名">{qualExpertDetail?.userName || "--"}</Descriptions.Item>
|
||||
<Descriptions.Item label="账号">{qualExpertDetail?.account || "--"}</Descriptions.Item>
|
||||
<Descriptions.Item label="性别">{qualExpertDetail?.genderName || "--"}</Descriptions.Item>
|
||||
<Descriptions.Item label="身份证号">{qualExpertDetail?.idCardNo || "--"}</Descriptions.Item>
|
||||
<Descriptions.Item label="证书" span={2}>{qualExpertDetail?.certificate || "--"}</Descriptions.Item>
|
||||
</Descriptions>
|
||||
</Modal>
|
||||
|
||||
{/* 新增/编辑弹窗 */}
|
||||
<Modal
|
||||
title={editingId ? "编辑专家" : "新增专家"}
|
||||
open={editVisible}
|
||||
onCancel={() => setEditVisible(false)}
|
||||
onOk={handleEditSubmit}
|
||||
confirmLoading={submiting}
|
||||
width={520}
|
||||
>
|
||||
<Form form={editForm} layout="vertical">
|
||||
<Form.Item name="userName" label="姓名" rules={[{ required: true, message: "请输入姓名" }]}>
|
||||
<Input placeholder="请输入" allowClear />
|
||||
</Form.Item>
|
||||
<Form.Item name="account" label="账号" rules={[{ required: true, message: "请输入账号" }]}>
|
||||
<Input placeholder="请输入" allowClear />
|
||||
</Form.Item>
|
||||
<Form.Item name="genderCode" label="性别">
|
||||
<Select placeholder="请选择" allowClear style={{ width: "100%" }}>
|
||||
{GENDER_OPTIONS.map((item) => (
|
||||
<Select.Option key={item.value} value={item.value}>{item.label}</Select.Option>
|
||||
))}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
<Form.Item name="idCardNo" label="身份证号">
|
||||
<Input placeholder="请输入" allowClear />
|
||||
</Form.Item>
|
||||
<Form.Item name="certificate" label="证书">
|
||||
<Input placeholder="请输入" allowClear />
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</Modal>
|
||||
</PageLayout>
|
||||
);
|
||||
};
|
||||
|
||||
export default Connect([NS_QUAL_EXPERT], true)(AntdTableFuncControl(ExperManage));
|
||||
Loading…
Reference in New Issue