|
@@ -1,5 +1,5 @@
|
|
|
-import { Button, Form, Input, Table, Tag } from "antd";
|
|
|
-import { FC, useEffect, useMemo, useState } from "react";
|
|
|
+import { Button, Form, Radio, Table, Tag } from "antd";
|
|
|
+import { FC, useEffect, useMemo, useRef, useState } from "react";
|
|
|
import classNames from "classnames";
|
|
|
import {
|
|
|
DageFileResponseType,
|
|
@@ -12,37 +12,68 @@ import {
|
|
|
import { SubEvaluationModal } from "../SubEvaluationModal";
|
|
|
import style from "./index.module.scss";
|
|
|
import {
|
|
|
+ DEPT_STATUS_ENUM,
|
|
|
IManageFormDetail,
|
|
|
IManageIndexDetail,
|
|
|
MaterialType,
|
|
|
- PUBLISH_ENUM,
|
|
|
+ REVIEW_MATERIAL_TYPE,
|
|
|
YES_OR_NO,
|
|
|
} from "@/types";
|
|
|
import { downloadFile, beforeUpload } from "@/utils";
|
|
|
import { getBaseURL } from "@dage/service";
|
|
|
-import { deleteFileApi, getFileListApi, saveManageFileApi } from "@/api";
|
|
|
+import {
|
|
|
+ additionalEvaOpinionApi,
|
|
|
+ assessmentEvaOpinionApi,
|
|
|
+ changeMaterialConditionApi,
|
|
|
+ deleteFileApi,
|
|
|
+ getFileListApi,
|
|
|
+ materialEvaOpinionApi,
|
|
|
+ saveManageFileApi,
|
|
|
+} from "@/api";
|
|
|
+import { EvaluationFormModal } from "../EvaluationFormModal";
|
|
|
+import { ColumnsType } from "antd/es/table";
|
|
|
+import { useSelector } from "react-redux";
|
|
|
+import { RootState } from "@/store";
|
|
|
+import { REVIEW_MATERIAL_STATUS_MAP } from "@/constants";
|
|
|
|
|
|
export interface OverallAssessmentProps {
|
|
|
detail: IManageIndexDetail | IManageFormDetail | null;
|
|
|
isReportDetail?: boolean;
|
|
|
isEvalutionDetail?: boolean;
|
|
|
+ isIndexDetail?: boolean;
|
|
|
+ refreshDetail(): void;
|
|
|
}
|
|
|
|
|
|
-const { TextArea } = Input;
|
|
|
-
|
|
|
export const OverallAssessment: FC<OverallAssessmentProps> = ({
|
|
|
detail,
|
|
|
+ isIndexDetail,
|
|
|
isReportDetail,
|
|
|
isEvalutionDetail,
|
|
|
+ refreshDetail,
|
|
|
}) => {
|
|
|
+ const { userInfo } = useSelector<RootState, RootState["base"]>(
|
|
|
+ (state) => state.base
|
|
|
+ );
|
|
|
const baseUrl = getBaseURL();
|
|
|
- // 待填报
|
|
|
- const toBeFilled =
|
|
|
- (detail as IManageFormDetail)?.publishStatus === PUBLISH_ENUM.PUBLISHED;
|
|
|
- // 已评定
|
|
|
- const evaluated =
|
|
|
- (detail as IManageFormDetail)?.publishStatus === PUBLISH_ENUM.EVALUATED;
|
|
|
- const [modalVisible, setModelVisible] = useState(false);
|
|
|
+ // 是否能够上传附件
|
|
|
+ const canUpload = [
|
|
|
+ DEPT_STATUS_ENUM.PENDING_SUBMIT,
|
|
|
+ DEPT_STATUS_ENUM.RETURN,
|
|
|
+ ].includes((detail as IManageFormDetail)?.deptStatus);
|
|
|
+ // 是否退回状态
|
|
|
+ const isRefund =
|
|
|
+ (detail as IManageFormDetail)?.deptStatus === DEPT_STATUS_ENUM.RETURN;
|
|
|
+ // 当前评定的类型
|
|
|
+ const curEvaluationData = useRef<{
|
|
|
+ type: "material" | "assessment";
|
|
|
+ id: number;
|
|
|
+ } | null>(null);
|
|
|
+ const [initEvaluationContent, setInitEvaluationContent] = useState("");
|
|
|
+ const [subEvaluationVisible, setSubEvaluationVisible] = useState(false);
|
|
|
+ const [evaluationVisible, setEvaluationVisible] = useState(false);
|
|
|
+ // 选中的附加项
|
|
|
+ const checkedAddItem = useRef<any>(null);
|
|
|
+ const checkedAddIndex = useRef(0);
|
|
|
// 加分项
|
|
|
const addList = useMemo(() => {
|
|
|
if (!detail || !detail.jsonAdd) return [];
|
|
@@ -58,13 +89,169 @@ export const OverallAssessment: FC<OverallAssessmentProps> = ({
|
|
|
const [uploadedFileMap, setUploadedFileMap] = useState<
|
|
|
Record<number, MaterialType[]>
|
|
|
>({});
|
|
|
+ const fileColumns = useMemo(() => {
|
|
|
+ const stack: ColumnsType<MaterialType> = [
|
|
|
+ {
|
|
|
+ title: "附件名称",
|
|
|
+ dataIndex: "fileName",
|
|
|
+ align: "center",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "责任部门",
|
|
|
+ dataIndex: "deptName",
|
|
|
+ align: "center",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "上传用户",
|
|
|
+ dataIndex: "creatorName",
|
|
|
+ align: "center",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "操作",
|
|
|
+ align: "center",
|
|
|
+ render: (val) => (
|
|
|
+ <DageTableActions
|
|
|
+ renderBefore={
|
|
|
+ <Button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ onClick={() => {
|
|
|
+ downloadFile(
|
|
|
+ baseUrl + process.env.REACT_APP_IMG_PUBLIC + val.filePath,
|
|
|
+ val.fileName
|
|
|
+ );
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 下载
|
|
|
+ </Button>
|
|
|
+ }
|
|
|
+ showDelete={isReportDetail && canUpload}
|
|
|
+ showEdit={false}
|
|
|
+ onDelete={handleDeleteFile.bind(undefined, val.id)}
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ },
|
|
|
+ ];
|
|
|
+
|
|
|
+ if (isEvalutionDetail || (isReportDetail && isRefund)) {
|
|
|
+ stack.splice(
|
|
|
+ 2,
|
|
|
+ 0,
|
|
|
+ {
|
|
|
+ title: "评定结果",
|
|
|
+ align: "center",
|
|
|
+ render: (item: MaterialType) => {
|
|
|
+ if (
|
|
|
+ item.status === REVIEW_MATERIAL_TYPE.PENDING &&
|
|
|
+ !isEvalutionDetail
|
|
|
+ )
|
|
|
+ return "";
|
|
|
+
|
|
|
+ return isRefund ? (
|
|
|
+ <Tag
|
|
|
+ color={
|
|
|
+ item.status === REVIEW_MATERIAL_TYPE.PASS
|
|
|
+ ? "success"
|
|
|
+ : "error"
|
|
|
+ }
|
|
|
+ >
|
|
|
+ {REVIEW_MATERIAL_STATUS_MAP[item.status]}
|
|
|
+ </Tag>
|
|
|
+ ) : (
|
|
|
+ <Radio.Group
|
|
|
+ defaultValue={item.status}
|
|
|
+ options={[
|
|
|
+ {
|
|
|
+ label: "合格",
|
|
|
+ value: REVIEW_MATERIAL_TYPE.PASS,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "不合格",
|
|
|
+ value: REVIEW_MATERIAL_TYPE.FAIL,
|
|
|
+ },
|
|
|
+ ]}
|
|
|
+ onChange={(v) => {
|
|
|
+ changeMaterialConditionApi({
|
|
|
+ condition: v.target.value,
|
|
|
+ deptId: detail!.id,
|
|
|
+ materialId: item.id,
|
|
|
+ });
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "评定意见",
|
|
|
+ align: "center",
|
|
|
+ render: (val) =>
|
|
|
+ isRefund ? (
|
|
|
+ val.opinion
|
|
|
+ ) : (
|
|
|
+ <Button
|
|
|
+ type="link"
|
|
|
+ onClick={() => {
|
|
|
+ curEvaluationData.current = {
|
|
|
+ type: "material",
|
|
|
+ id: val.id,
|
|
|
+ };
|
|
|
+ setInitEvaluationContent(val.opinion);
|
|
|
+ setEvaluationVisible(true);
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 填写
|
|
|
+ </Button>
|
|
|
+ ),
|
|
|
+ }
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ stack.splice(2, 0, {
|
|
|
+ title: "编辑时间",
|
|
|
+ dataIndex: "updateTime",
|
|
|
+ align: "center",
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ return stack;
|
|
|
+ }, [detail]);
|
|
|
+ const additionalColumns: ColumnsType<any> = [
|
|
|
+ {
|
|
|
+ title: "评定得分",
|
|
|
+ dataIndex: "score",
|
|
|
+ align: "center",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "评定人",
|
|
|
+ dataIndex: "assessor",
|
|
|
+ align: "center",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "评定意见",
|
|
|
+ dataIndex: "comment",
|
|
|
+ align: "center",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "操作",
|
|
|
+ align: "center",
|
|
|
+ hidden: !isEvalutionDetail,
|
|
|
+ render: (item, record, index) => (
|
|
|
+ <Button
|
|
|
+ type="link"
|
|
|
+ onClick={openSubEvaluationModal.bind(undefined, index, item)}
|
|
|
+ >
|
|
|
+ 评定
|
|
|
+ </Button>
|
|
|
+ ),
|
|
|
+ },
|
|
|
+ ];
|
|
|
|
|
|
const getList = async () => {
|
|
|
try {
|
|
|
setLoading(true);
|
|
|
const data = await getFileListApi(
|
|
|
- (detail as IManageFormDetail).accessId,
|
|
|
- "access"
|
|
|
+ isIndexDetail ? detail!.id : (detail as IManageFormDetail).accessId,
|
|
|
+ "assess",
|
|
|
+ detail!.id
|
|
|
);
|
|
|
const temp: typeof uploadedFileMap = {};
|
|
|
data.forEach((item) => {
|
|
@@ -99,6 +286,8 @@ export const OverallAssessment: FC<OverallAssessmentProps> = ({
|
|
|
parentId: item.id,
|
|
|
module: "fill-assess",
|
|
|
moduleId: (detail as IManageFormDetail).accessId,
|
|
|
+ deptId: detail?.id,
|
|
|
+ assessId: (detail as IManageFormDetail).accessId,
|
|
|
});
|
|
|
// @ts-ignore
|
|
|
file.uploaded = true;
|
|
@@ -112,6 +301,46 @@ export const OverallAssessment: FC<OverallAssessmentProps> = ({
|
|
|
getList();
|
|
|
};
|
|
|
|
|
|
+ const handleSubmitEvaluation = async (val: any) => {
|
|
|
+ if (!curEvaluationData.current) return;
|
|
|
+
|
|
|
+ if (curEvaluationData.current.type === "assessment") {
|
|
|
+ await assessmentEvaOpinionApi({
|
|
|
+ deptId: curEvaluationData.current.id,
|
|
|
+ ...val,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ await materialEvaOpinionApi({
|
|
|
+ deptId: detail!.id,
|
|
|
+ materialId: curEvaluationData.current.id,
|
|
|
+ ...val,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ refreshDetail();
|
|
|
+ };
|
|
|
+
|
|
|
+ const openSubEvaluationModal = (index: number, item: any) => {
|
|
|
+ checkedAddIndex.current = index;
|
|
|
+ checkedAddItem.current = item;
|
|
|
+ setSubEvaluationVisible(true);
|
|
|
+ };
|
|
|
+
|
|
|
+ const handleAdditionalEvalution = async (vals: any) => {
|
|
|
+ const temp = [...addList];
|
|
|
+ temp.splice(checkedAddIndex.current, 1, {
|
|
|
+ ...checkedAddItem.current,
|
|
|
+ ...vals,
|
|
|
+ assessor: userInfo?.user.realName,
|
|
|
+ });
|
|
|
+ await additionalEvaOpinionApi({
|
|
|
+ assessId: (detail as IManageFormDetail).accessId,
|
|
|
+ deptId: detail!.id,
|
|
|
+ opinionJson: JSON.stringify(temp),
|
|
|
+ type: checkedAddItem.current.id.indexOf("bonus") > -1 ? "add" : "sub",
|
|
|
+ });
|
|
|
+ refreshDetail();
|
|
|
+ };
|
|
|
+
|
|
|
useEffect(() => {
|
|
|
if (!detail) return;
|
|
|
getList();
|
|
@@ -136,7 +365,8 @@ export const OverallAssessment: FC<OverallAssessmentProps> = ({
|
|
|
<Table
|
|
|
pagination={false}
|
|
|
className="cus-table"
|
|
|
- rowKey="id"
|
|
|
+ dataSource={detail?.plan}
|
|
|
+ rowKey="deptId"
|
|
|
columns={[
|
|
|
{
|
|
|
title: "部门名称",
|
|
@@ -144,9 +374,20 @@ export const OverallAssessment: FC<OverallAssessmentProps> = ({
|
|
|
align: "center",
|
|
|
},
|
|
|
{
|
|
|
+ title: "分配指标数量",
|
|
|
+ dataIndex: "pcsNorm",
|
|
|
+ align: "center",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "完成填报数量",
|
|
|
+ dataIndex: "pcsFill",
|
|
|
+ align: "center",
|
|
|
+ },
|
|
|
+ {
|
|
|
title: "部门考核状态",
|
|
|
- dataIndex: "type",
|
|
|
align: "center",
|
|
|
+ // @ts-ignore
|
|
|
+ render: (val) => REVIEW_MATERIAL_STATUS_MAP[val.status],
|
|
|
},
|
|
|
]}
|
|
|
/>
|
|
@@ -154,11 +395,19 @@ export const OverallAssessment: FC<OverallAssessmentProps> = ({
|
|
|
|
|
|
<Form.Item label="评定意见">
|
|
|
{isEvalutionDetail ? (
|
|
|
- <TextArea
|
|
|
- rows={6}
|
|
|
- placeholder="请输入文字,不超过1000字"
|
|
|
- maxLength={1000}
|
|
|
- />
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ onClick={() => {
|
|
|
+ curEvaluationData.current = {
|
|
|
+ type: "assessment",
|
|
|
+ id: detail!.id,
|
|
|
+ };
|
|
|
+ setInitEvaluationContent(detail!.opinion);
|
|
|
+ setEvaluationVisible(true);
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 填写
|
|
|
+ </Button>
|
|
|
) : (
|
|
|
<p>
|
|
|
1、
|
|
@@ -176,120 +425,78 @@ export const OverallAssessment: FC<OverallAssessmentProps> = ({
|
|
|
)}
|
|
|
|
|
|
<Form.Item label="资料上传">
|
|
|
- {(detail?.materials || []).map((item) => {
|
|
|
- const isUpload = item.isUpload === YES_OR_NO.YES;
|
|
|
+ {(detail?.materials?.filter((i) => i.module === "assess") || []).map(
|
|
|
+ (item) => {
|
|
|
+ const isUpload = item.isUpload === YES_OR_NO.YES;
|
|
|
|
|
|
- return (
|
|
|
- <div key={item.id} className={style.fileUpload}>
|
|
|
- <div className={style.fileUploadHeader}>
|
|
|
- <div>
|
|
|
- <Tag color={isUpload ? "red" : ""}>
|
|
|
- {isUpload ? "必填" : "选填"}
|
|
|
- </Tag>
|
|
|
- <h3>
|
|
|
- {item.name} | {item.suffix || "*"}
|
|
|
- </h3>
|
|
|
+ return (
|
|
|
+ <div key={item.id} className={style.fileUpload}>
|
|
|
+ <div className={style.fileUploadHeader}>
|
|
|
+ <div>
|
|
|
+ <Tag color={isUpload ? "red" : ""}>
|
|
|
+ {isUpload ? "必填" : "选填"}
|
|
|
+ </Tag>
|
|
|
+ <h3>
|
|
|
+ {item.name} | {item.suffix || "*"}
|
|
|
+ </h3>
|
|
|
+ </div>
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ ghost
|
|
|
+ onClick={() =>
|
|
|
+ downloadFile(
|
|
|
+ baseUrl +
|
|
|
+ process.env.REACT_APP_IMG_PUBLIC +
|
|
|
+ item.filePath,
|
|
|
+ item.fileName
|
|
|
+ )
|
|
|
+ }
|
|
|
+ >
|
|
|
+ 下载模板
|
|
|
+ </Button>
|
|
|
+ {canUpload && !isEvalutionDetail && (
|
|
|
+ <DageUploadProvider>
|
|
|
+ <DageUploadConsumer>
|
|
|
+ {(res) => (
|
|
|
+ <DageUpload
|
|
|
+ className={classNames(style.uploadBtn, "no-list")}
|
|
|
+ dType={DageUploadType.DOC}
|
|
|
+ action="/api/cms/fill/file/upload"
|
|
|
+ // @ts-ignore
|
|
|
+ accept={item.suffix}
|
|
|
+ // @ts-ignore
|
|
|
+ beforeUpload={beforeUpload.bind(
|
|
|
+ undefined,
|
|
|
+ item.suffix
|
|
|
+ )}
|
|
|
+ onChange={saveManageFile.bind(undefined, item)}
|
|
|
+ >
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ ghost
|
|
|
+ loading={res?.uploading}
|
|
|
+ >
|
|
|
+ 上传附件
|
|
|
+ </Button>
|
|
|
+ </DageUpload>
|
|
|
+ )}
|
|
|
+ </DageUploadConsumer>
|
|
|
+ </DageUploadProvider>
|
|
|
+ )}
|
|
|
</div>
|
|
|
- <Button
|
|
|
- type="primary"
|
|
|
- ghost
|
|
|
- onClick={() =>
|
|
|
- downloadFile(
|
|
|
- baseUrl +
|
|
|
- process.env.REACT_APP_IMG_PUBLIC +
|
|
|
- item.filePath,
|
|
|
- item.fileName
|
|
|
- )
|
|
|
- }
|
|
|
- >
|
|
|
- 下载模板
|
|
|
- </Button>
|
|
|
- {toBeFilled && !isEvalutionDetail && (
|
|
|
- <DageUploadProvider>
|
|
|
- <DageUploadConsumer>
|
|
|
- {(res) => (
|
|
|
- <DageUpload
|
|
|
- className={classNames(style.uploadBtn, "no-list")}
|
|
|
- dType={DageUploadType.DOC}
|
|
|
- action="/api/cms/fill/file/upload"
|
|
|
- // @ts-ignore
|
|
|
- accept={item.suffix}
|
|
|
- // @ts-ignore
|
|
|
- beforeUpload={beforeUpload.bind(
|
|
|
- undefined,
|
|
|
- item.suffix
|
|
|
- )}
|
|
|
- onChange={saveManageFile.bind(undefined, item)}
|
|
|
- >
|
|
|
- <Button type="primary" ghost loading={res?.uploading}>
|
|
|
- 上传附件
|
|
|
- </Button>
|
|
|
- </DageUpload>
|
|
|
- )}
|
|
|
- </DageUploadConsumer>
|
|
|
- </DageUploadProvider>
|
|
|
- )}
|
|
|
- </div>
|
|
|
|
|
|
- <Table
|
|
|
- rowKey="id"
|
|
|
- loading={loading}
|
|
|
- className="cus-table"
|
|
|
- pagination={false}
|
|
|
- dataSource={uploadedFileMap[item.id]}
|
|
|
- columns={[
|
|
|
- {
|
|
|
- title: "附件名称",
|
|
|
- dataIndex: "fileName",
|
|
|
- align: "center",
|
|
|
- },
|
|
|
- {
|
|
|
- title: "责任部门",
|
|
|
- dataIndex: "deptName",
|
|
|
- align: "center",
|
|
|
- },
|
|
|
- {
|
|
|
- title: "上传用户",
|
|
|
- dataIndex: "creatorName",
|
|
|
- align: "center",
|
|
|
- },
|
|
|
- {
|
|
|
- title: "编辑时间",
|
|
|
- dataIndex: "updateTime",
|
|
|
- align: "center",
|
|
|
- },
|
|
|
- {
|
|
|
- title: "操作",
|
|
|
- align: "center",
|
|
|
- render: (val) => (
|
|
|
- <DageTableActions
|
|
|
- renderBefore={
|
|
|
- <Button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- onClick={() => {
|
|
|
- downloadFile(
|
|
|
- baseUrl +
|
|
|
- process.env.REACT_APP_IMG_PUBLIC +
|
|
|
- val.filePath,
|
|
|
- val.fileName
|
|
|
- );
|
|
|
- }}
|
|
|
- >
|
|
|
- 下载
|
|
|
- </Button>
|
|
|
- }
|
|
|
- showDelete={isReportDetail}
|
|
|
- showEdit={false}
|
|
|
- onDelete={handleDeleteFile.bind(undefined, val.id)}
|
|
|
- />
|
|
|
- ),
|
|
|
- },
|
|
|
- ]}
|
|
|
- />
|
|
|
- </div>
|
|
|
- );
|
|
|
- })}
|
|
|
+ <Table
|
|
|
+ rowKey="id"
|
|
|
+ loading={loading}
|
|
|
+ className="cus-table"
|
|
|
+ pagination={false}
|
|
|
+ dataSource={uploadedFileMap[item.id]}
|
|
|
+ columns={fileColumns}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ }
|
|
|
+ )}
|
|
|
</Form.Item>
|
|
|
|
|
|
{!isReportDetail && (
|
|
@@ -310,27 +517,7 @@ export const OverallAssessment: FC<OverallAssessmentProps> = ({
|
|
|
dataIndex: "num",
|
|
|
align: "center",
|
|
|
},
|
|
|
- {
|
|
|
- title: "评定得分",
|
|
|
- dataIndex: "user",
|
|
|
- align: "center",
|
|
|
- },
|
|
|
- {
|
|
|
- title: "评定人",
|
|
|
- dataIndex: "create_time",
|
|
|
- align: "center",
|
|
|
- },
|
|
|
- {
|
|
|
- title: "评定意见",
|
|
|
- dataIndex: "create_time",
|
|
|
- align: "center",
|
|
|
- },
|
|
|
- {
|
|
|
- title: "操作",
|
|
|
- align: "center",
|
|
|
- hidden: !isEvalutionDetail,
|
|
|
- render: () => <Button type="link">评定</Button>,
|
|
|
- },
|
|
|
+ ...additionalColumns,
|
|
|
]}
|
|
|
/>
|
|
|
|
|
@@ -351,39 +538,23 @@ export const OverallAssessment: FC<OverallAssessmentProps> = ({
|
|
|
dataIndex: "num",
|
|
|
align: "center",
|
|
|
},
|
|
|
- {
|
|
|
- title: "评定得分",
|
|
|
- dataIndex: "user",
|
|
|
- align: "center",
|
|
|
- },
|
|
|
- {
|
|
|
- title: "评定人",
|
|
|
- dataIndex: "create_time",
|
|
|
- align: "center",
|
|
|
- },
|
|
|
- {
|
|
|
- title: "评定意见",
|
|
|
- dataIndex: "create_time",
|
|
|
- align: "center",
|
|
|
- },
|
|
|
- {
|
|
|
- title: "操作",
|
|
|
- align: "center",
|
|
|
- hidden: !isEvalutionDetail,
|
|
|
- render: () => (
|
|
|
- <Button type="link" onClick={() => setModelVisible(true)}>
|
|
|
- 评定
|
|
|
- </Button>
|
|
|
- ),
|
|
|
- },
|
|
|
+ ...additionalColumns,
|
|
|
]}
|
|
|
/>
|
|
|
</Form.Item>
|
|
|
)}
|
|
|
|
|
|
<SubEvaluationModal
|
|
|
- open={modalVisible}
|
|
|
- onCancel={() => setModelVisible(false)}
|
|
|
+ open={subEvaluationVisible}
|
|
|
+ onOk={handleAdditionalEvalution}
|
|
|
+ onCancel={() => setSubEvaluationVisible(false)}
|
|
|
+ />
|
|
|
+
|
|
|
+ <EvaluationFormModal
|
|
|
+ initContent={initEvaluationContent}
|
|
|
+ open={evaluationVisible}
|
|
|
+ onOk={handleSubmitEvaluation}
|
|
|
+ onCancel={() => setEvaluationVisible(false)}
|
|
|
/>
|
|
|
</Form>
|
|
|
);
|