diff --git a/index.html b/index.html index d91d93f..9a2bf07 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ - + AI软著引擎 diff --git a/public/newvite.svg b/public/newvite.svg new file mode 100644 index 0000000..b6d446b --- /dev/null +++ b/public/newvite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/route/Correction/Correction.css b/src/route/Correction/Correction.css new file mode 100644 index 0000000..b14f45c --- /dev/null +++ b/src/route/Correction/Correction.css @@ -0,0 +1,53 @@ +.correctDownBox { + width: 138px; + height: 94px; + /* background: rgba(238, 10, 10, 0.7); */ + border-radius: 10px; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + font-size: 16px; +} + +.correctDownBtn { + width: 138px; + height: 47px; + background: rgba(242, 242, 242, 0.7); + text-align: center; + line-height: 47px; + +} + +.correctionType { + display: flex; + /* background-color: red; */ + align-items: center; + margin-left: 10px; + width: 124px; + font-size: 12px; + color: #5e5b59; + border-radius: 5px; + +} + +.corrTypeA { + flex: 1; + height: 25px; + background: rgba(255, 189, 146, 0.32); + /* padding: 10px; */ + box-sizing: border-box; + text-align: center; + line-height: 25px; + border-right: 1px dashed #d1d1d1; +} + +.corrTypeB { + flex: 1; + height: 25px; + background: rgba(255, 189, 146, 0.32); + /* padding: 10px; */ + box-sizing: border-box; + text-align: center; + line-height: 25px; +} \ No newline at end of file diff --git a/src/route/Correction/Correction.tsx b/src/route/Correction/Correction.tsx index effb882..0d548be 100644 --- a/src/route/Correction/Correction.tsx +++ b/src/route/Correction/Correction.tsx @@ -1,8 +1,13 @@ +import './Correction.css'; import { useState, useEffect, } from 'react'; import { - Table, - // Pagination, - Modal, Tag, message, Spin, Empty + // Table, + Pagination, + Modal, + // Tag, + message, Spin, + Empty, + Dropdown } from 'antd'; // import { // // MenuFoldOutlined, @@ -14,26 +19,32 @@ import { put, downloadUrl, Axios } from '../../util/AjaxUtils' -import type { TableProps } from 'antd'; +// import type { TableProps } from 'antd'; import { useLocation } from 'react-router-dom'; // import { getMenuActive } from '../../util/cache' // import { useNavigate } from "react-router-dom"; -interface DataType { - projName: string; - type: string; //类型 - correctionType: string; //补正种类 - correctionReason: string; - gmtCreate: string; //补正时间 - gmtReview: string;//审核时间 - reviewReason: string;//审核意见 - projId: string; - applyStatus: string;//审核状态 - correctionVoucherFileKVs: any //补正凭证 - projCorrectionApplyId: string - authorName: string; -} +// interface DataType { +// projName: string; +// type: string; //类型 +// correctionType: string; //补正种类 +// correctionReason: string; +// gmtCreate: string; //补正时间 +// gmtReview: string;//审核时间 +// reviewReason: string;//审核意见 +// projId: string; +// applyStatus: string;//审核状态 +// correctionVoucherFileKVs: any //补正凭证 +// projCorrectionApplyId: string +// authorName: string; +// } import revokeImg from '../../static/revoke.png' // import { useLocation } from 'react-router-dom' +import logoImg from '../../static/projBox/logo.png' +import reason from '../../static/projBox/reson.png' +import green from '../../static/projBox/green.png' +import red from '../../static/projBox/red.png' +import blue from '../../static/projBox/blue.png' +import black from '../../static/projBox/black.png' export default function Correction() { const height = window.innerHeight - 180; const [messageApi, contextHolder] = message.useMessage(); @@ -56,647 +67,647 @@ export default function Correction() { const authorId = state ? state.authorId : '' const correctionNumType = state ? state.correctionNumType : '' const correctionType = state ? state.correctionType : '' - const columns: TableProps['columns'] = - // 撤销状态 - applyStatus == 'CANCELED' ? [ - { - title: '序号', - dataIndex: 'index', - align: 'center', - width: 80, - fixed: 'left', - render: (_text, _record, index) => (page - 1) * 20 + index + 1, // 显示序号,从1开始 - }, - { - title: '系统名称', - dataIndex: 'projName', - align: 'center', - key: 'projName', - fixed: 'left', - width: 150, - render: (text) =>
{text}
, - }, - { - title: '产权所属者', - dataIndex: 'authorName', - align: 'center', - key: 'authorName', - width: 150, - render: (text) =>
{text}
, - }, - { - title: '类型', - dataIndex: 'type', - key: 'type', - width: 130, - align: 'center', - render: (text) =>
{text == 'CORRECTION1' ? '一次补正' : text == 'CORRECTION2' ? '二次补正' : ''}
, - }, - { - title: '补正种类', - dataIndex: 'correctionType', - key: 'correctionType', - align: 'center', - width: 130, - render: (text) =>
{text == 'CODE' ? '代码' : text == 'MANUAL' ? '操作手册' : text == 'ALL' ? '全部补正' : ''}
, - }, - { - title: '补正原因', - dataIndex: 'correctionReason', - key: 'correctionReason', - align: 'center', - width: 150, - render: (text) =>
{text}
, - }, - { - title: '申请补正时间', - dataIndex: 'gmtCreate', - key: 'gmtCreate', - align: 'center', - width: 200, - }, + // const columns: TableProps['columns'] = + // // 撤销状态 + // applyStatus == 'CANCELED' ? [ + // { + // title: '序号', + // dataIndex: 'index', + // align: 'center', + // width: 80, + // fixed: 'left', + // render: (_text, _record, index) => (page - 1) * 20 + index + 1, // 显示序号,从1开始 + // }, + // { + // title: '系统名称', + // dataIndex: 'projName', + // align: 'center', + // key: 'projName', + // fixed: 'left', + // width: 150, + // render: (text) =>
{text}
, + // }, + // { + // title: '产权所属者', + // dataIndex: 'authorName', + // align: 'center', + // key: 'authorName', + // width: 150, + // render: (text) =>
{text}
, + // }, + // { + // title: '类型', + // dataIndex: 'type', + // key: 'type', + // width: 130, + // align: 'center', + // render: (text) =>
{text == 'CORRECTION1' ? '一次补正' : text == 'CORRECTION2' ? '二次补正' : ''}
, + // }, + // { + // title: '补正种类', + // dataIndex: 'correctionType', + // key: 'correctionType', + // align: 'center', + // width: 130, + // render: (text) =>
{text == 'CODE' ? '代码' : text == 'MANUAL' ? '操作手册' : text == 'ALL' ? '全部补正' : ''}
, + // }, + // { + // title: '补正原因', + // dataIndex: 'correctionReason', + // key: 'correctionReason', + // align: 'center', + // width: 150, + // render: (text) =>
{text}
, + // }, + // { + // title: '申请补正时间', + // dataIndex: 'gmtCreate', + // key: 'gmtCreate', + // align: 'center', + // width: 200, + // }, - { - title: '审核状态', - dataIndex: 'applyStatus', - key: 'applyStatus', - align: 'center', - width: 100, - render: (text) => {text == "APPROVED" ? '已通过' : text == "REJECTED" ? '未通过' : text == "PENDING" ? '待审核' : text == "CANCELED" ? '已取消' : '未知'}, - }, + // { + // title: '审核状态', + // dataIndex: 'applyStatus', + // key: 'applyStatus', + // align: 'center', + // width: 100, + // render: (text) => {text == "APPROVED" ? '已通过' : text == "REJECTED" ? '未通过' : text == "PENDING" ? '待审核' : text == "CANCELED" ? '已取消' : '未知'}, + // }, - { - title: '补正凭证', - dataIndex: 'correctionVoucherFileKVs', - key: 'correctionVoucherFileKVs', - width: 150, - align: 'center', - render: (_, record) => ( - (record.correctionVoucherFileKVs).map((item: any, index: number) => ( + // { + // title: '补正凭证', + // dataIndex: 'correctionVoucherFileKVs', + // key: 'correctionVoucherFileKVs', + // width: 150, + // align: 'center', + // render: (_, record) => ( + // (record.correctionVoucherFileKVs).map((item: any, index: number) => ( -
{ - window.open(downloadUrl(item.key, false), '_blank') - }}>{item.value}
+ //
{ + // window.open(downloadUrl(item.key, false), '_blank') + // }}>{item.value}
- )) + // )) - ), - }, + // ), + // }, - ] - : applyStatus == 'PENDING' ? - // PENDING待审核状态 - [ - { - title: '序号', - dataIndex: 'index', - align: 'center', - width: 80, - fixed: 'left', - render: (_text, _record, index) => (page - 1) * 20 + index + 1, // 显示序号,从1开始 - }, - { - title: '系统名称', - dataIndex: 'projName', - align: 'center', - key: 'projName', - width: 150, - fixed: 'left', - render: (text) =>
{text}
, - }, - { - title: '产权所属者', - dataIndex: 'authorName', - align: 'center', - key: 'authorName', - width: 150, - render: (text) =>
{text}
, - }, - { - title: '类型', - dataIndex: 'type', - key: 'type', - align: 'center', - width: 130, - render: (text) =>
{text == 'CORRECTION1' ? '一次补正' : text == 'CORRECTION2' ? '二次补正' : ''}
, - }, - { - title: '补正种类', - dataIndex: 'correctionType', - key: 'correctionType', - width: 130, - align: 'center', - render: (text) =>
{text == 'CODE' ? '代码' : text == 'MANUAL' ? '操作手册' : text == 'ALL' ? '全部补正' : ''}
, - }, - { - title: '补正原因', - dataIndex: 'correctionReason', - key: 'correctionReason', - align: 'center', - width: 150, - render: (text) =>
{text}
, - }, - { - title: '申请补正时间', - dataIndex: 'gmtCreate', - key: 'gmtCreate', - align: 'center', - width: 200, - }, - { - title: '审核状态', - dataIndex: 'applyStatus', - key: 'applyStatus', - align: 'center', - width: 100, - render: (text) => {text == "APPROVED" ? '已通过' : text == "REJECTED" ? '未通过' : text == "PENDING" ? '待审核' : text == "CANCELED" ? '已取消' : '未知'}, - }, - { - title: '补正凭证', - dataIndex: 'correctionVoucherFileKVs', - key: 'correctionVoucherFileKVs', - width: 150, - align: 'center', - render: (_, record) => ( - (record.correctionVoucherFileKVs).map((item: any, index: number) => ( + // ] + // : applyStatus == 'PENDING' ? + // // PENDING待审核状态 + // [ + // { + // title: '序号', + // dataIndex: 'index', + // align: 'center', + // width: 80, + // fixed: 'left', + // render: (_text, _record, index) => (page - 1) * 20 + index + 1, // 显示序号,从1开始 + // }, + // { + // title: '系统名称', + // dataIndex: 'projName', + // align: 'center', + // key: 'projName', + // width: 150, + // fixed: 'left', + // render: (text) =>
{text}
, + // }, + // { + // title: '产权所属者', + // dataIndex: 'authorName', + // align: 'center', + // key: 'authorName', + // width: 150, + // render: (text) =>
{text}
, + // }, + // { + // title: '类型', + // dataIndex: 'type', + // key: 'type', + // align: 'center', + // width: 130, + // render: (text) =>
{text == 'CORRECTION1' ? '一次补正' : text == 'CORRECTION2' ? '二次补正' : ''}
, + // }, + // { + // title: '补正种类', + // dataIndex: 'correctionType', + // key: 'correctionType', + // width: 130, + // align: 'center', + // render: (text) =>
{text == 'CODE' ? '代码' : text == 'MANUAL' ? '操作手册' : text == 'ALL' ? '全部补正' : ''}
, + // }, + // { + // title: '补正原因', + // dataIndex: 'correctionReason', + // key: 'correctionReason', + // align: 'center', + // width: 150, + // render: (text) =>
{text}
, + // }, + // { + // title: '申请补正时间', + // dataIndex: 'gmtCreate', + // key: 'gmtCreate', + // align: 'center', + // width: 200, + // }, + // { + // title: '审核状态', + // dataIndex: 'applyStatus', + // key: 'applyStatus', + // align: 'center', + // width: 100, + // render: (text) => {text == "APPROVED" ? '已通过' : text == "REJECTED" ? '未通过' : text == "PENDING" ? '待审核' : text == "CANCELED" ? '已取消' : '未知'}, + // }, + // { + // title: '补正凭证', + // dataIndex: 'correctionVoucherFileKVs', + // key: 'correctionVoucherFileKVs', + // width: 150, + // align: 'center', + // render: (_, record) => ( + // (record.correctionVoucherFileKVs).map((item: any, index: number) => ( -
{ - window.open(downloadUrl(item.key, false), '_blank') - }}>{item.value}
+ //
{ + // window.open(downloadUrl(item.key, false), '_blank') + // }}>{item.value}
- )) + // )) - ), - }, - { - title: '操作', - align: 'center', - fixed: 'right', - width: 100, - render: (_, record) => ( - // {record.name} -
{ - // console.log(record); - setRevokeModal(true) - setprojCorrectionApplyId(record.projCorrectionApplyId) - }}> 撤销
+ // ), + // }, + // { + // title: '操作', + // align: 'center', + // fixed: 'right', + // width: 100, + // render: (_, record) => ( + // // {record.name} + //
{ + // // console.log(record); + // setRevokeModal(true) + // setprojCorrectionApplyId(record.projCorrectionApplyId) + // }}> 撤销
- ), - }, - ] - // 未通过 状态 - : applyStatus == 'REJECTED' ? - [ - { - title: '序号', - dataIndex: 'index', - align: 'center', - width: 80, - fixed: 'left', - render: (_text, _record, index) => (page - 1) * 20 + index + 1, // 显示序号,从1开始 - }, - { - title: '系统名称', - dataIndex: 'projName', - align: 'center', - key: 'projName', - fixed: 'left', - width: 150, - render: (text) =>
{text}
, - }, - { - title: '产权所属者', - dataIndex: 'authorName', - align: 'center', - key: 'authorName', - width: 150, - render: (text) =>
{text}
, - }, + // ), + // }, + // ] + // // 未通过 状态 + // : applyStatus == 'REJECTED' ? + // [ + // { + // title: '序号', + // dataIndex: 'index', + // align: 'center', + // width: 80, + // fixed: 'left', + // render: (_text, _record, index) => (page - 1) * 20 + index + 1, // 显示序号,从1开始 + // }, + // { + // title: '系统名称', + // dataIndex: 'projName', + // align: 'center', + // key: 'projName', + // fixed: 'left', + // width: 150, + // render: (text) =>
{text}
, + // }, + // { + // title: '产权所属者', + // dataIndex: 'authorName', + // align: 'center', + // key: 'authorName', + // width: 150, + // render: (text) =>
{text}
, + // }, - { - title: '类型', - dataIndex: 'type', - key: 'type', - width: 130, - align: 'center', - render: (text) =>
{text == 'CORRECTION1' ? '一次补正' : text == 'CORRECTION2' ? '二次补正' : ''}
, - }, - { - title: '补正种类', - dataIndex: 'correctionType', - key: 'correctionType', - align: 'center', - width: 130, - render: (text) =>
{text == 'CODE' ? '代码' : text == 'MANUAL' ? '操作手册' : text == 'ALL' ? '全部补正' : ''}
, - }, - { - title: '补正原因', - dataIndex: 'correctionReason', - key: 'correctionReason', - align: 'center', - width: 150, - render: (text) =>
{text}
, - }, - { - title: '申请补正时间', - dataIndex: 'gmtCreate', - key: 'gmtCreate', - align: 'center', - width: 200, - }, - { - title: '审核时间', - dataIndex: 'gmtReview', - key: 'gmtReview', - align: 'center', - width: 200, - render: (text) =>
- {text ? text : '—'} -
- }, - { - title: '审核状态', - dataIndex: 'applyStatus', - key: 'applyStatus', - align: 'center', - width: 100, - render: (text) => {text == "APPROVED" ? '已通过' : text == "REJECTED" ? '未通过' : text == "PENDING" ? '待审核' : text == "CANCELED" ? '已取消' : '未知'}, - }, - { - title: '审核意见', - dataIndex: 'reviewReason', - key: 'reviewReason', - align: 'center', - width: 150, - render: (text) =>
{text ? text : '—'}
, - }, - { - title: '补正凭证', - dataIndex: 'correctionVoucherFileKVs', - key: 'correctionVoucherFileKVs', - width: 150, - align: 'center', - render: (_, record) => ( - (record.correctionVoucherFileKVs).map((item: any, index: number) => ( + // { + // title: '类型', + // dataIndex: 'type', + // key: 'type', + // width: 130, + // align: 'center', + // render: (text) =>
{text == 'CORRECTION1' ? '一次补正' : text == 'CORRECTION2' ? '二次补正' : ''}
, + // }, + // { + // title: '补正种类', + // dataIndex: 'correctionType', + // key: 'correctionType', + // align: 'center', + // width: 130, + // render: (text) =>
{text == 'CODE' ? '代码' : text == 'MANUAL' ? '操作手册' : text == 'ALL' ? '全部补正' : ''}
, + // }, + // { + // title: '补正原因', + // dataIndex: 'correctionReason', + // key: 'correctionReason', + // align: 'center', + // width: 150, + // render: (text) =>
{text}
, + // }, + // { + // title: '申请补正时间', + // dataIndex: 'gmtCreate', + // key: 'gmtCreate', + // align: 'center', + // width: 200, + // }, + // { + // title: '审核时间', + // dataIndex: 'gmtReview', + // key: 'gmtReview', + // align: 'center', + // width: 200, + // render: (text) =>
+ // {text ? text : '—'} + //
+ // }, + // { + // title: '审核状态', + // dataIndex: 'applyStatus', + // key: 'applyStatus', + // align: 'center', + // width: 100, + // render: (text) => {text == "APPROVED" ? '已通过' : text == "REJECTED" ? '未通过' : text == "PENDING" ? '待审核' : text == "CANCELED" ? '已取消' : '未知'}, + // }, + // { + // title: '审核意见', + // dataIndex: 'reviewReason', + // key: 'reviewReason', + // align: 'center', + // width: 150, + // render: (text) =>
{text ? text : '—'}
, + // }, + // { + // title: '补正凭证', + // dataIndex: 'correctionVoucherFileKVs', + // key: 'correctionVoucherFileKVs', + // width: 150, + // align: 'center', + // render: (_, record) => ( + // (record.correctionVoucherFileKVs).map((item: any, index: number) => ( -
{ - window.open(downloadUrl(item.key, false), '_blank') - }}>{item.value}
+ //
{ + // window.open(downloadUrl(item.key, false), '_blank') + // }}>{item.value}
- )) + // )) - ), - }, + // ), + // }, - ] - //已通过状态 - : applyStatus == 'APPROVED' ? - [ - { - title: '序号', - dataIndex: 'index', - align: 'center', - fixed: 'left', - width: 80, - render: (_text, _record, index) => (page - 1) * 20 + index + 1, // 显示序号,从1开始 - }, - { - title: '系统名称', - dataIndex: 'projName', - align: 'center', - key: 'projName', - width: 150, - fixed: 'left', - render: (text) =>
{text}
, - }, - { - title: '产权所属者', - dataIndex: 'authorName', - align: 'center', - width: 150, - key: 'authorName', - render: (text) =>
{text}
, - }, + // ] + // //已通过状态 + // : applyStatus == 'APPROVED' ? + // [ + // { + // title: '序号', + // dataIndex: 'index', + // align: 'center', + // fixed: 'left', + // width: 80, + // render: (_text, _record, index) => (page - 1) * 20 + index + 1, // 显示序号,从1开始 + // }, + // { + // title: '系统名称', + // dataIndex: 'projName', + // align: 'center', + // key: 'projName', + // width: 150, + // fixed: 'left', + // render: (text) =>
{text}
, + // }, + // { + // title: '产权所属者', + // dataIndex: 'authorName', + // align: 'center', + // width: 150, + // key: 'authorName', + // render: (text) =>
{text}
, + // }, - { - title: '类型', - dataIndex: 'type', - key: 'type', - width: 130, - align: 'center', - render: (text) =>
{text == 'CORRECTION1' ? '一次补正' : text == 'CORRECTION2' ? '二次补正' : ''}
, - }, - { - title: '补正种类', - width: 130, - dataIndex: 'correctionType', - key: 'correctionType', - align: 'center', - render: (text) =>
{text == 'CODE' ? '代码' : text == 'MANUAL' ? '操作手册' : text == 'ALL' ? '全部补正' : ''}
, - }, - { - title: '补正原因', - width: 150, - dataIndex: 'correctionReason', - key: 'correctionReason', - align: 'center', - render: (text) =>
{text}
, - }, - { - title: '申请补正时间', - dataIndex: 'gmtCreate', - key: 'gmtCreate', - align: 'center', - width: 200, - }, - { - title: '审核时间', - dataIndex: 'gmtReview', - key: 'gmtReview', - align: 'center', - width: 200, - render: (text) =>
- {text ? text : '—'} -
- }, - { - title: '审核状态', - dataIndex: 'applyStatus', - key: 'applyStatus', - align: 'center', - width: 100, - render: (text) => {text == "APPROVED" ? '已通过' : text == "REJECTED" ? '未通过' : text == "PENDING" ? '待审核' : text == "CANCELED" ? '已取消' : '未知'}, - }, - { - title: '审核意见', - dataIndex: 'reviewReason', - key: 'reviewReason', - align: 'center', - width: 150, - render: (text) =>
{text ? text : '—'}
, - }, - { - title: '补正凭证', - dataIndex: 'correctionVoucherFileKVs', - key: 'correctionVoucherFileKVs', - width: 150, - align: 'center', - render: (_, record) => ( - (record.correctionVoucherFileKVs).map((item: any, index: number) => ( + // { + // title: '类型', + // dataIndex: 'type', + // key: 'type', + // width: 130, + // align: 'center', + // render: (text) =>
{text == 'CORRECTION1' ? '一次补正' : text == 'CORRECTION2' ? '二次补正' : ''}
, + // }, + // { + // title: '补正种类', + // width: 130, + // dataIndex: 'correctionType', + // key: 'correctionType', + // align: 'center', + // render: (text) =>
{text == 'CODE' ? '代码' : text == 'MANUAL' ? '操作手册' : text == 'ALL' ? '全部补正' : ''}
, + // }, + // { + // title: '补正原因', + // width: 150, + // dataIndex: 'correctionReason', + // key: 'correctionReason', + // align: 'center', + // render: (text) =>
{text}
, + // }, + // { + // title: '申请补正时间', + // dataIndex: 'gmtCreate', + // key: 'gmtCreate', + // align: 'center', + // width: 200, + // }, + // { + // title: '审核时间', + // dataIndex: 'gmtReview', + // key: 'gmtReview', + // align: 'center', + // width: 200, + // render: (text) =>
+ // {text ? text : '—'} + //
+ // }, + // { + // title: '审核状态', + // dataIndex: 'applyStatus', + // key: 'applyStatus', + // align: 'center', + // width: 100, + // render: (text) => {text == "APPROVED" ? '已通过' : text == "REJECTED" ? '未通过' : text == "PENDING" ? '待审核' : text == "CANCELED" ? '已取消' : '未知'}, + // }, + // { + // title: '审核意见', + // dataIndex: 'reviewReason', + // key: 'reviewReason', + // align: 'center', + // width: 150, + // render: (text) =>
{text ? text : '—'}
, + // }, + // { + // title: '补正凭证', + // dataIndex: 'correctionVoucherFileKVs', + // key: 'correctionVoucherFileKVs', + // width: 150, + // align: 'center', + // render: (_, record) => ( + // (record.correctionVoucherFileKVs).map((item: any, index: number) => ( -
{ - window.open(downloadUrl(item.key, false), '_blank') - }}>{item.value}
+ //
{ + // window.open(downloadUrl(item.key, false), '_blank') + // }}>{item.value}
- )) + // )) - ), - }, - { - title: '操作', - align: 'center', - width: 180, - fixed: 'right', - render: (_, record) => ( + // ), + // }, + // { + // title: '操作', + // align: 'center', + // width: 180, + // fixed: 'right', + // render: (_, record) => ( - //
{ + // //
{ - // if (record.correctionType == 'CODE') { - // window.open(`${Axios.defaults?.baseURL}/route/proj/download/code/correction/${record.projId}`) - // } - // if (record.correctionType == 'MANUAL') { - // window.open(`${Axios.defaults?.baseURL}/route/proj/download/manual/correction/${record.projId}`) - // } - // }}> 下载
-
-
下载代码: - { - e.preventDefault(); - window.open(`${Axios.defaults?.baseURL}/route/proj/download/code/correction/${record.projId}`) - }} - >word - { - e.preventDefault(); - window.open(`${Axios.defaults?.baseURL}/route/proj/download/code/correction/pdf/${record.projId}`) - }} - style={{ marginLeft: 5 }} - >pdf -
-
{ - window.open(`${Axios.defaults?.baseURL}/route/proj/download/manual/correction/${record.projId}`) - }}> 下载手册: - { - e.preventDefault(); - window.open(`${Axios.defaults?.baseURL}/route/proj/download/manual/correction/${record.projId}`) + // // if (record.correctionType == 'CODE') { + // // window.open(`${Axios.defaults?.baseURL}/route/proj/download/code/correction/${record.projId}`) + // // } + // // if (record.correctionType == 'MANUAL') { + // // window.open(`${Axios.defaults?.baseURL}/route/proj/download/manual/correction/${record.projId}`) + // // } + // // }}> 下载
+ //
+ // + // -
+ // }} + // >word + // { + // e.preventDefault(); + // window.open(`${Axios.defaults?.baseURL}/route/proj/download/manual/correction/pdf/${record.projId}`) + // }} + // style={{ marginLeft: 5 }} + // >pdf + //
+ //
- ), - } + // ), + // } - ] : [{ - title: '序号', - dataIndex: 'index', - align: 'center', - width: 80, - fixed: 'left', - render: (_text, _record, index) => (page - 1) * 20 + index + 1, // 显示序号,从1开始 - }, - { - title: '系统名称', - dataIndex: 'projName', - align: 'center', - key: 'projName', - fixed: 'left', - width: 150, - render: (text) =>
{text}
, - }, - { - title: '产权所属者', - dataIndex: 'authorName', - align: 'center', - key: 'authorName', - width: 150, - render: (text) =>
{text}
, - }, + // ] : [{ + // title: '序号', + // dataIndex: 'index', + // align: 'center', + // width: 80, + // fixed: 'left', + // render: (_text, _record, index) => (page - 1) * 20 + index + 1, // 显示序号,从1开始 + // }, + // { + // title: '系统名称', + // dataIndex: 'projName', + // align: 'center', + // key: 'projName', + // fixed: 'left', + // width: 150, + // render: (text) =>
{text}
, + // }, + // { + // title: '产权所属者', + // dataIndex: 'authorName', + // align: 'center', + // key: 'authorName', + // width: 150, + // render: (text) =>
{text}
, + // }, - { - title: '类型', - dataIndex: 'type', - width: 130, - key: 'type', - align: 'center', - render: (text) =>
{text == 'CORRECTION1' ? '一次补正' : text == 'CORRECTION2' ? '二次补正' : ''}
, - }, - { - title: '补正种类', - dataIndex: 'correctionType', - width: 130, - key: 'correctionType', - align: 'center', - render: (text) =>
{text == 'CODE' ? '代码' : text == 'MANUAL' ? '操作手册' : text == 'ALL' ? '全部补正' : ''}
, - }, - { - title: '补正原因', - dataIndex: 'correctionReason', - key: 'correctionReason', - align: 'center', - width: 150, - render: (text) =>
{text}
, - }, - { - title: '申请补正时间', - dataIndex: 'gmtCreate', - key: 'gmtCreate', - align: 'center', - width: 200, - }, - { - title: '审核时间', - dataIndex: 'gmtReview', - key: 'gmtReview', - align: 'center', - width: 200, - render: (text) =>
- {text ? text : '—'} -
- }, - { - title: '审核状态', - dataIndex: 'applyStatus', - key: 'applyStatus', - align: 'center', - width: 100, - render: (text) => {text == "APPROVED" ? '已通过' : text == "REJECTED" ? '未通过' : text == "PENDING" ? '待审核' : text == "CANCELED" ? '已取消' : '未知'}, - }, - { - title: '审核意见', - dataIndex: 'reviewReason', - key: 'reviewReason', - align: 'center', - width: 150, - render: (text) =>
{text ? text : '—'}
, - }, - { - title: '补正凭证', - dataIndex: 'correctionVoucherFileKVs', - key: 'correctionVoucherFileKVs', - width: 150, - align: 'center', - render: (_, record) => ( - (record.correctionVoucherFileKVs).map((item: any, index: number) => ( + // { + // title: '类型', + // dataIndex: 'type', + // width: 130, + // key: 'type', + // align: 'center', + // render: (text) =>
{text == 'CORRECTION1' ? '一次补正' : text == 'CORRECTION2' ? '二次补正' : ''}
, + // }, + // { + // title: '补正种类', + // dataIndex: 'correctionType', + // width: 130, + // key: 'correctionType', + // align: 'center', + // render: (text) =>
{text == 'CODE' ? '代码' : text == 'MANUAL' ? '操作手册' : text == 'ALL' ? '全部补正' : ''}
, + // }, + // { + // title: '补正原因', + // dataIndex: 'correctionReason', + // key: 'correctionReason', + // align: 'center', + // width: 150, + // render: (text) =>
{text}
, + // }, + // { + // title: '申请补正时间', + // dataIndex: 'gmtCreate', + // key: 'gmtCreate', + // align: 'center', + // width: 200, + // }, + // { + // title: '审核时间', + // dataIndex: 'gmtReview', + // key: 'gmtReview', + // align: 'center', + // width: 200, + // render: (text) =>
+ // {text ? text : '—'} + //
+ // }, + // { + // title: '审核状态', + // dataIndex: 'applyStatus', + // key: 'applyStatus', + // align: 'center', + // width: 100, + // render: (text) => {text == "APPROVED" ? '已通过' : text == "REJECTED" ? '未通过' : text == "PENDING" ? '待审核' : text == "CANCELED" ? '已取消' : '未知'}, + // }, + // { + // title: '审核意见', + // dataIndex: 'reviewReason', + // key: 'reviewReason', + // align: 'center', + // width: 150, + // render: (text) =>
{text ? text : '—'}
, + // }, + // { + // title: '补正凭证', + // dataIndex: 'correctionVoucherFileKVs', + // key: 'correctionVoucherFileKVs', + // width: 150, + // align: 'center', + // render: (_, record) => ( + // (record.correctionVoucherFileKVs).map((item: any, index: number) => ( -
{ - window.open(downloadUrl(item.key, false), '_blank') - }}>{item.value}
+ //
{ + // window.open(downloadUrl(item.key, false), '_blank') + // }}>{item.value}
- )) + // )) - ), - }, - { - title: '操作', - align: 'center', - fixed: 'right', - width: 180, - render: (_, record) => ( - // {record.applyStatus} - record.applyStatus == 'APPROVED' ? ( -
-
下载代码: - { - e.preventDefault(); - window.open(`${Axios.defaults?.baseURL}/route/proj/download/code/correction/${record.projId}`) - }} - >word - { - e.preventDefault(); - window.open(`${Axios.defaults?.baseURL}/route/proj/download/code/correction/pdf/${record.projId}`) - }} - style={{ marginLeft: 5 }} - >pdf -
-
{ - window.open(`${Axios.defaults?.baseURL}/route/proj/download/manual/correction/${record.projId}`) - }}> 下载手册: - { - e.preventDefault(); - window.open(`${Axios.defaults?.baseURL}/route/proj/download/manual/correction/${record.projId}`) + // ), + // }, + // { + // title: '操作', + // align: 'center', + // fixed: 'right', + // width: 180, + // render: (_, record) => ( + // // {record.applyStatus} + // record.applyStatus == 'APPROVED' ? ( + //
+ // + // -
- ) : record.applyStatus == 'PENDING' ? (
{ - // console.log(record); - setRevokeModal(true) - setprojCorrectionApplyId(record.projCorrectionApplyId) - }}> 撤销
) : (<>—) + // }} + // >word + // { + // e.preventDefault(); + // window.open(`${Axios.defaults?.baseURL}/route/proj/download/manual/correction/pdf/${record.projId}`) + // }} + // style={{ marginLeft: 5 }} + // >pdf + //
+ //
+ // ) : record.applyStatus == 'PENDING' ? (
{ + // // console.log(record); + // setRevokeModal(true) + // setprojCorrectionApplyId(record.projCorrectionApplyId) + // }}> 撤销
) : (<>—) - ), - } - ] + // ), + // } + // ] const dispath = useDispatch() const redxuState: any = useSelector(state => state) @@ -805,6 +816,13 @@ export default function Correction() { // console.log('嘻嘻',correctionArray); }, [keyWords, applyStatus, authorId, correctionNumType, correctionType]) + useEffect(() => { + // 获取id为refun的元素 + const refun: any = document.getElementById('refun'); + // 当更换页码时候滚动到最上面 + refun.scrollTop = 0; + + }, [correctionArray]) useEffect(() => { // getData(1) if (newCorrection) { @@ -821,109 +839,219 @@ export default function Correction() { return (
{contextHolder} -
- {/*
- { - setType(value) - }} - options={[ - // { value: '', label: '全部项目' }, - { value: 'PENDING', label: '待审核' }, - { value: 'APPROVED', label: '已通过' }, - { value: 'REJECTED', label: '未通过' }, - { value: 'CANCELED', label: '已取消' }, - ]} - // defaultValue="" - placeholder={'选择状态'} - allowClear - /> -