准入资质维护管理/版本对比
parent
ef9a2924db
commit
2f099ff407
|
|
@ -30,7 +30,7 @@
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"zy-react-library": "^1.0.136"
|
"zy-react-library": "^1.0.156"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@antfu/eslint-config": "^5.4.1",
|
"@antfu/eslint-config": "^5.4.1",
|
||||||
|
|
|
||||||
|
|
@ -29,11 +29,11 @@ export const qualificationMaintenanceQualificationsList = declareRequest(
|
||||||
`Post > @/xgfManager/qualificationsDetail/list`,
|
`Post > @/xgfManager/qualificationsDetail/list`,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
export const qualificationMaintenanceChangeLogList = declareRequest(
|
export const qualificationMaintenanceChangeLogList = declareRequest(
|
||||||
"qualificationMaintenanceLoading",
|
"qualificationMaintenanceLoading",
|
||||||
`Post > @/xgfManager/qualificationsChangeLog/list`,
|
`Post > @/xgfManager/qualificationsChangeLog/list`,
|
||||||
);export const getQualificationMaintenanceChangeLogByIds = declareRequest(
|
);
|
||||||
|
export const getQualificationMaintenanceChangeLogByIds = declareRequest(
|
||||||
"qualificationMaintenanceLoading",
|
"qualificationMaintenanceLoading",
|
||||||
`Get > /xgfManager/qualificationsChangeLog/listByIds?ids={ids}`,
|
`Get > /xgfManager/qualificationsChangeLog/listByIds?ids={ids}`,
|
||||||
);
|
);
|
||||||
|
|
@ -1,22 +1,47 @@
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
import { Button } from "antd";
|
||||||
|
import { useState } from "react";
|
||||||
|
import HeaderBack from "zy-react-library/components/HeaderBack";
|
||||||
import Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { NS_QUALIFICATION_MAINTENANCE } from "~/enumerate/namespace";
|
import { NS_QUALIFICATION_MAINTENANCE } from "~/enumerate/namespace";
|
||||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
|
||||||
import HeaderBack from "zy-react-library/components/HeaderBack";
|
|
||||||
|
|
||||||
function ChangeLogList(props) {
|
function ChangeLogList(props) {
|
||||||
|
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
||||||
const { id } = useGetUrlQuery();
|
const { id } = useGetUrlQuery();
|
||||||
const { tableProps, getData } = useTable(props["qualificationMaintenanceChangeLogList"], {
|
const { tableProps } = useTable(props["qualificationMaintenanceChangeLogList"], {
|
||||||
params: {
|
params: {
|
||||||
eqQualificationsId: id,
|
eqQualificationsId: id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<div>
|
||||||
|
<HeaderBack title="变更记录" />
|
||||||
<div style={{ padding: 20 }}>
|
<div style={{ padding: 20 }}>
|
||||||
<HeaderBack title="添加资质" />
|
|
||||||
<Table
|
<Table
|
||||||
|
rowSelection={{
|
||||||
|
preserveSelectedRowKeys: true,
|
||||||
|
selectedRowKeys,
|
||||||
|
onChange: (selectedRowKeys) => {
|
||||||
|
if (selectedRowKeys.length <= 2)
|
||||||
|
setSelectedRowKeys(selectedRowKeys);
|
||||||
|
},
|
||||||
|
getCheckboxProps: record => ({ disabled: selectedRowKeys.length >= 2 && !selectedRowKeys.includes(record.id) }),
|
||||||
|
hideSelectAll: true,
|
||||||
|
}}
|
||||||
|
toolBarRender={() => (
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
disabled={selectedRowKeys.length !== 2}
|
||||||
|
onClick={() => {
|
||||||
|
props.history.push(`./changeLogView?ids=${selectedRowKeys.join(",")}`);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
版本对比
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "操作时间", dataIndex: "createTime" },
|
{ title: "操作时间", dataIndex: "createTime" },
|
||||||
{ title: "操作人", dataIndex: "createName" },
|
{ title: "操作人", dataIndex: "createName" },
|
||||||
|
|
@ -24,6 +49,7 @@ function ChangeLogList(props) {
|
||||||
{...tableProps}
|
{...tableProps}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,88 @@
|
||||||
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
import { Descriptions, Divider } from "antd";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
import HeaderBack from "zy-react-library/components/HeaderBack";
|
||||||
|
import Table from "zy-react-library/components/Table";
|
||||||
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
|
import { getLabelName } from "zy-react-library/utils";
|
||||||
|
import { NS_QUALIFICATION_MAINTENANCE } from "~/enumerate/namespace";
|
||||||
|
|
||||||
|
function ChangeLogView(props) {
|
||||||
|
const [info, setInfo] = useState([]);
|
||||||
|
const { ids } = useGetUrlQuery();
|
||||||
|
const getData = async () => {
|
||||||
|
const { data } = await props["getQualificationMaintenanceChangeLogByIds"]({ ids });
|
||||||
|
console.log(data);
|
||||||
|
setInfo(data);
|
||||||
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
getData();
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<HeaderBack title="版本对比" />
|
||||||
|
<div style={{ padding: "0 20px 20px 20px" }}>
|
||||||
|
<div style={{ display: "flex" }}>
|
||||||
|
{
|
||||||
|
info.map((item, index) => (
|
||||||
|
<div
|
||||||
|
key={item.id}
|
||||||
|
style={{
|
||||||
|
flex: 1,
|
||||||
|
borderRight: index === 0 ? "1px solid #ccc" : "",
|
||||||
|
paddingRight: index === 0 ? 20 : 0,
|
||||||
|
paddingLeft: index === 0 ? 0 : 20,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Divider orientation="left">基础信息</Divider>
|
||||||
|
<Descriptions
|
||||||
|
bordered
|
||||||
|
column={1}
|
||||||
|
styles={{ label: { width: 200 } }}
|
||||||
|
items={[
|
||||||
|
{ label: "操作时间", children: item.createTime },
|
||||||
|
{ label: "操作人员", children: item.createName },
|
||||||
|
{ label: "资质名称", children: item.info.qualificationsName },
|
||||||
|
{ label: "资质类别", children: item.info.qualificationsTypeName },
|
||||||
|
{ label: "资质等级", children: item.info.stakeholderLevelName },
|
||||||
|
{ label: "主管部门", children: item.info.managerDeptName },
|
||||||
|
{
|
||||||
|
label: "是否启用",
|
||||||
|
children: getLabelName({
|
||||||
|
list: [{ name: "是", bianma: 0 }, { name: "否", bianma: 1 }],
|
||||||
|
status: item.info.status,
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
<Divider orientation="left">资料信息</Divider>
|
||||||
|
<Table
|
||||||
|
options={false}
|
||||||
|
disabledResizer={true}
|
||||||
|
pagination={false}
|
||||||
|
dataSource={item.info.details || []}
|
||||||
|
columns={[
|
||||||
|
{ title: "资料属性", dataIndex: "dataTypeName" },
|
||||||
|
{ title: "资料名称", dataIndex: "dataName" },
|
||||||
|
{
|
||||||
|
title: "是否涉及时效",
|
||||||
|
dataIndex: "isValidity",
|
||||||
|
render: (_, record) => getLabelName({
|
||||||
|
list: [{ name: "是", bianma: 0 }, { name: "否", bianma: 1 }],
|
||||||
|
status: record.isValidity,
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
))
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Connect([NS_QUALIFICATION_MAINTENANCE], true)(ChangeLogView);
|
||||||
Loading…
Reference in New Issue