diff --git a/src/pages/InstallExe/exeDialog/GBase.tsx b/src/pages/InstallExe/exeDialog/GBase.tsx index 41123a8..6ad44fc 100644 --- a/src/pages/InstallExe/exeDialog/GBase.tsx +++ b/src/pages/InstallExe/exeDialog/GBase.tsx @@ -92,8 +92,11 @@ const GBase: FC = ({ {active == 1 &&
setValue()}>
} {(active > 1 && active != 11) &&
{ if (active == 8 && verifyPassword()) return; - if (active == 8) setGBasePassword(); - if (active == 12) { installSuccess(); return } + if (active == 12) { + installSuccess(); + setGBasePassword(); + return + } setValue() }}>
} diff --git a/src/pages/InstallExe/index.tsx b/src/pages/InstallExe/index.tsx index 41aace2..2c3875f 100644 --- a/src/pages/InstallExe/index.tsx +++ b/src/pages/InstallExe/index.tsx @@ -91,6 +91,10 @@ const InstallExe: FC = ({ }) => { '用户登录组件' ] + if (urlParams?.fileType == 'offLine') { + notRequireds.push('执勤区安装程序') + } + // needArr 校验依赖程序中是否有未安装的 let needArr = false; listData.slice(0, 7).forEach((k, i) => { @@ -152,7 +156,7 @@ const InstallExe: FC = ({ }) => { setOpen7(true) break; case '执勤区安装程序': - setOpen8(true) + setOpen8(true) break; case '密码资源输入输出设备驱动': setOpen9(true) diff --git a/src/pages/MY/KeyBodyManage/Import/index.tsx b/src/pages/MY/KeyBodyManage/Import/index.tsx index bf070f1..ceb8dbe 100644 --- a/src/pages/MY/KeyBodyManage/Import/index.tsx +++ b/src/pages/MY/KeyBodyManage/Import/index.tsx @@ -236,7 +236,7 @@ export default function Page() { 0 ? { y: 41 * 9 } : {}} + scroll={tableData.length > 0 ? { y: 41 * 10 } : {}} pagination={false} bordered columns={columns} @@ -276,7 +276,9 @@ export default function Page() { centered width={speed != 2 ? 425 : 515} onCancel={() => setVisibility(false)} - footer={null}> + footer={null} + maskClosable={false} + >
{ speed == 1 && diff --git a/src/pages/MY/KeyManage/DataMaintenance/index.tsx b/src/pages/MY/KeyManage/DataMaintenance/index.tsx index 5f50310..9c41f34 100644 --- a/src/pages/MY/KeyManage/DataMaintenance/index.tsx +++ b/src/pages/MY/KeyManage/DataMaintenance/index.tsx @@ -4,7 +4,7 @@ import { ConfigProvider, Input, Modal, Table, Upload, UploadProps, message } fro import { rowClassName } from '@/utils'; import ButtonComp from '@/components/ButtonComp'; -import { manageDiskDataImport, secretFormatList } from '@/services/register'; +import { manageDiskDataImport, managerSysDataList } from '@/services/register'; import ImportProgress from '@/components/ImportProgress'; export default function Page() { @@ -53,7 +53,7 @@ export default function Page() { // 管理系统管理盘数据维护 -- 列表 const getList = () => { - secretFormatList({ pageNumber: 1, pageSize: 50 }).then((res) => { + managerSysDataList({ pageNumber: 1, pageSize: 50 }).then((res) => { if (res?.result == "success") { setTableData(res.data[0]) } else { @@ -90,7 +90,8 @@ export default function Page() { centered width={speed != 1 ? 425 : 515} onCancel={() => setVisibility(false)} - footer={null}> + footer={null} + maskClosable={false}>
{ speed == 1 && diff --git a/src/pages/MY/KeyManage/ManageKeys/index.tsx b/src/pages/MY/KeyManage/ManageKeys/index.tsx index 1592875..d5dd4ef 100644 --- a/src/pages/MY/KeyManage/ManageKeys/index.tsx +++ b/src/pages/MY/KeyManage/ManageKeys/index.tsx @@ -5,11 +5,13 @@ import { ConfigProvider, DatePicker, Form, Modal, Pagination, Radio, Select, Tab import { rowClassName } from '@/utils'; import ButtonComp from '@/components/ButtonComp'; import moment from 'moment'; -import { secretFormatList, secretList } from '@/services/my'; +import { secretKey, secretList } from '@/services/my'; +import { managerSysDataList } from '@/services/register'; +import { sysTypeStr } from '@/utils/sysType'; export default function Page() { const [tableData, setTableData] = useState([]); - const [tableData1, setTableData1] = useState([]); + const [tableData1, setTableData1] = useState([]); const [visibility, setVisibility] = useState(false); const [form] = Form.useForm(); const [pageNumber, setPageNumber] = useState(1); @@ -18,48 +20,79 @@ export default function Page() { const [usageReserveArea, setUsageReserveArea] = useState('1'); const [selectedRowKeys, setSelectedRowKeys] = useState([]); - const [allRowKeys, setAllRowKeys] = useState([]); + const [selectedRowKeys1, setSelectedRowKeys1] = useState([]); + const [selectedData, setSelectedData] = useState(); useEffect(() => { initForm() }, []) const columns: any = [ - { title: '产品名称', dataIndex: 'productName', key: 'productName', align: 'center' }, - { title: '产品编号', dataIndex: 'productNum', key: 'productNum', align: 'center' }, - { title: '装配情况', dataIndex: 'name', key: 'name', align: 'center' } + { + title: '产品名称', dataIndex: 'productName', key: 'productName', align: 'center', + render: (text: any) => { return {text || '--'} }, + }, { + title: '产品编号', dataIndex: 'productNum', key: 'productNum', align: 'center', + render: (text: any) => { return {text || '--'} }, + }, { + title: '装配情况', dataIndex: 'assemblySituation', key: 'assemblySituation', align: 'center', render: (text: any) => { return {text || '--'} }, + } ] const columns1: any = [ { title: '序号', key: 'index', align: 'center', width: 80, - render: (a: any, b: any, c: any) => { - return {c + 1}; - }, - }, - { title: '设备名称', dataIndex: 'deviceName', key: 'deviceName', align: 'center' }, - { title: '管理实体标识', dataIndex: 'managementFlag', key: 'managementFlag', align: 'center' }, - { title: '310标识', dataIndex: 'distType', key: 'distType', align: 'center' }, - { title: '产品名称', dataIndex: 'productName', key: 'productName', align: 'center' }, - { title: '产品编号', dataIndex: 'productNum', key: 'productNum', align: 'center' }, - { title: '使用区/备用区', dataIndex: 'usageReserveArea', key: 'usageReserveArea', align: 'center' }, - { title: '分发状态', dataIndex: 'name', key: 'name', align: 'center' }, - { title: '安装方式', dataIndex: 'installMethod', key: 'installMethod', align: 'center' }, - { + render: (a: any, b: any, c: any) => { return {c + 1} }, + }, { + title: '设备名称', dataIndex: 'deviceName', key: 'deviceName', align: 'center', + render: (text: any) => { return {text || '--'} }, + }, { + title: '管理实体标识', dataIndex: 'managerModelId', key: 'managerModelId', align: 'center', + render: (text: any) => { return {text || '--'} }, + }, { + title: '310标识', dataIndex: 'deviceMarkId', key: 'deviceMarkId', align: 'center', + render: (text: any) => { return {text || '--'} }, + }, { + title: '产品名称', dataIndex: 'productName', key: 'productName', align: 'center', + render: (text: any) => { return {text || '--'} }, + }, { + title: '产品编号', dataIndex: 'productNum', key: 'productNum', align: 'center', + render: (text: any) => { return {text || '--'} }, + }, { + title: '使用区/备用区', dataIndex: 'usageReserveArea', key: 'usageReserveArea', align: 'center', + render: (text: any) => { return {text || '--'} }, + }, { + title: '分发状态', dataIndex: 'distType', key: 'distType', align: 'center', + render: (text: any) => { return {text || '--'} }, + }, { + title: '安装方式', dataIndex: 'installMethod', key: 'installMethod', align: 'center', + render: (text: any) => { return {text || '--'} }, + }, { title: '启用日期', dataIndex: 'activeDate', key: 'activeDate', align: 'center', - render: (text: any) => { - return {text || '--'}; - }, - }, - { title: '套号', dataIndex: 'setNumber', key: 'setNumber', align: 'center' }, - { title: '载体类型', dataIndex: 'carrierType', key: 'carrierType', align: 'center' }, - { title: '输出日期', dataIndex: 'name', key: 'name', align: 'center' }, - { title: '协同管理标志', dataIndex: 'name', key: 'name', align: 'center' } + render: (text: any) => { return {text || '--'} }, + }, { + title: '套号', dataIndex: 'setNumber', key: 'setNumber', align: 'center', + render: (text: any) => { return {text || '--'} }, + }, { + title: '载体类型', dataIndex: 'carrierType', key: 'carrierType', align: 'center', + render: (text: any) => { return {text || '--'} }, + }, { + title: '输出日期', dataIndex: 'name', key: 'name', align: 'center', + render: (text: any) => { return {text || '--'} }, + }, { + title: '协同管理标志', dataIndex: 'managementFlag', key: 'managementFlag', align: 'center', + render: (text: any) => { return {text || '--'} }, + } ] const formItemSty = { width: 'auto', marginBottom: 20, marginRight: 30 }; const initForm = () => { + form.setFieldsValue({ + keyType: null, + web: null, + activeDate: null, + }) } const onFinish = () => { @@ -71,33 +104,21 @@ export default function Page() { setSelectedRowKeys([]) }, [pageNumber]); - // 管理系统管理盘数据维护 -- 列表 - const _secretFormatList = () => { - let res = false - secretFormatList({ pageNumber: 1, pageSize: 10 }).then((res) => { - if (res?.result == "success") { - if (res.data[0].length > 0) { res = true } - } else { - message.error(res?.errorMsg); - } - }) - return res - } - // 获取密钥体列表 const getList = () => { - if (_secretFormatList()) { - message.info('请先完成管理系统管理盘数据维护--数据导入!') - return - } - secretList({ pageNumber, pageSize }).then((res) => { if (res?.result == "success") { - res.data[0].list = res.data[0].list.filter((val: any) => { return val?.content != 'PMCS' }) - setTotal(res.data[0].total - 1) + res.data[0].list = res.data[0].list.filter((val: any) => { + return (['PT0', 'PT2', 'PT3', 'PT4'].includes(val?.content)) + }) + setTotal(res.data[0].list.length) setTableData(res.data[0].list) - const keys = res.data[0].list.map((item: any) => item?.id); - setAllRowKeys(keys); + + let arr: any = [] + arr = res.data[0].list.filter((val: any) => { + return val?.assemblySituation == '未装配' + }) + setTableData1([...arr]) } else { message.error(res?.errorMsg); } @@ -117,6 +138,79 @@ export default function Page() { return current && current < moment().startOf('day'); }; + // 校验是否少了步骤 + const onRules = async () => { + // 校验管理系统管理盘数据维护列表是否有数据 + let stop = false + await managerSysDataList({ pageNumber: 1, pageSize: 10 }).then((res) => { + if (res?.result == "success") { + if (res.data[0].length == 0) { stop = true } + } else { + message.error(res?.errorMsg); + } + }) + + if (stop) { + message.info('请先完成管理系统管理盘数据维护--数据导入!') + return + } + + if (selectedRowKeys.length == 0) { + message.info('请选择一条可装配的密钥体!') + return + } + + form.validateFields().then(() => { + tableData1.forEach(e => { + if (e.id == selectedRowKeys[0]) { setSelectedData(e) } + }); + setVisibility(true) + }) + } + + // 过滤可装配列表 + const onchange = () => { + let info = form.getFieldsValue(); + setSelectedRowKeys([]) + let arr: any = [] + arr = tableData.filter((item) => { + if (item?.assemblySituation == '已装配') return + + if (info?.keyType && info?.web) { + return (item?.keyType == info?.keyType && item?.web == info?.web) + } else if (info?.keyType) { + return item?.keyType == info?.keyType + } else if (info?.web) { + return item?.web == info?.web + } + }) + setTableData1([...arr]) + } + + // 提交装配 + const submit = () => { + const searchParams = new URLSearchParams(location.search); + const sysType = searchParams.get('sysType'); + let info = form.getFieldsValue(); + const formData = new FormData(); + formData.append('activeDate', info.activeDate.format('YYYY-MM-DD')); + formData.append('endDate', moment().format('YYYY-MM-DD')); + formData.append('secretImportId', selectedRowKeys[0]); + formData.append('sysType', sysTypeStr[sysType]); + formData.append('type', '1'); + secretKey(formData).then((res) => { + if (res?.result == "success") { + initForm() + onFinish() + setSelectedRowKeys([]) + message.success('装配成功!') + setVisibility(false) + } else { + message.error(res?.errorMsg); + } + }) + } + return (
{ }} /> @@ -130,14 +224,20 @@ export default function Page() {
- +
0 ? { y: 41 * 5 } : {}} + scroll={tableData.length > 0 ? { y: 41 * 10 } : {}} pagination={false} bordered columns={columns1} @@ -201,7 +308,14 @@ export default function Page() {
{ }} /> - { }} /> + { + if (selectedRowKeys.length == 0) { + message.info('请在管理密钥装配列表中选择一条数据!'); + return + } + onFinish() + message.success('载体输出成功!') + }} /> { }} />
@@ -209,21 +323,22 @@ export default function Page() { title="xx部一体化对称密码管理系统" open={visibility} centered - width={500} + width={450} onCancel={() => setVisibility(false)} - footer={null}> + footer={null} + maskClosable={false}>
-
- 类型判断1: -
装配信息:
-
产品名称 ZY310,
-
产品编号 8151电,
-
启用日期 20231011
-
-
类型判断2: 没有需要装配管理密钥的密码设备!
+ {selectedData &&
+
装配信息:
+
产品名称:{selectedData?.productName} ,
+
产品编号:{selectedData?.productNum} ,
+
启用日期:{form.getFieldValue('activeDate') && form.getFieldValue('activeDate').format('YYYY-MM-DD')}
+
} + {/*
类型判断2: 没有需要装配管理密钥的密码设备!
*/}
- { }} /> + submit()} /> + setVisibility(false)} />
diff --git a/src/pages/MY/KeyManage/PrivateKey/index.tsx b/src/pages/MY/KeyManage/PrivateKey/index.tsx index ed893c9..b6f0854 100644 --- a/src/pages/MY/KeyManage/PrivateKey/index.tsx +++ b/src/pages/MY/KeyManage/PrivateKey/index.tsx @@ -1,12 +1,43 @@ import styles from '../../../GLQ/index.less'; -import { useState } from 'react'; -import { ConfigProvider, Select, Table } from 'antd'; +import { useEffect, useState } from 'react'; +import { ConfigProvider, Select, Table, message } from 'antd'; import { rowClassName } from '@/utils'; import ButtonComp from '@/components/ButtonComp'; +import { secretList } from '@/services/my'; export default function Page() { const [tableData, setTableData] = useState([]); + const [selectedRowKeys, setSelectedRowKeys] = useState([]); + const [selectedData, setSelectedData] = useState([]); + const [proxy, setProxy] = useState('全部'); + const [keyType, setKeyType] = useState(null); + + useEffect(() => { + getList() + }, []) + + const getList = () => { + secretList({ pageNumber: 1, pageSize: 10 }).then((res) => { + if (res?.result == "success") { + let show = true; + let pmcs; + res.data[0].list.forEach((e: any) => { + if (e?.content == 'PMCS') { + pmcs = { ...e, label: e.keyType, value: e.keyType } + } + if (!['PMCS', 'vpn', 'ythglmy'].includes(e?.content) && e?.assemblySituation == '未装配') { + show = false + } + }); + + if (show) { setSelectedData([pmcs]) } + + } else { + message.error(res?.errorMsg); + } + }) + } const columns: any = [ { @@ -15,14 +46,14 @@ export default function Page() { return {c + 1}; }, }, - { title: '设备名称', dataIndex: 'name', key: 'name', align: 'center' }, - { title: '管理实体标识', dataIndex: 'name', key: 'name', align: 'center' }, - { title: '310标识', dataIndex: 'name', key: 'name', align: 'center' }, - { title: '密钥种类名称', dataIndex: 'name', key: 'name', align: 'center' }, - { title: '安装方式', dataIndex: 'name', key: 'name', align: 'center' }, + { title: '设备名称', dataIndex: 'deviceName', key: 'deviceName', align: 'center' }, + { title: '管理实体标识', dataIndex: 'managerModelId', key: 'managerModelId', align: 'center' }, + { title: '310标识', dataIndex: 'deviceMarkId', key: 'deviceMarkId', align: 'center' }, + { title: '密钥种类名称', dataIndex: 'keyType', key: 'keyType', align: 'center' }, + { title: '安装方式', dataIndex: 'installMethod', key: 'installMethod', align: 'center' }, { title: '载体类型', dataIndex: 'carrierType', key: 'carrierType', align: 'center' }, { title: '输出日期', dataIndex: 'name', key: 'name', align: 'center' }, - { title: '协同管理标志', dataIndex: 'name', key: 'name', align: 'center' }, + { title: '协同管理标志', dataIndex: 'managementFlag', key: 'managementFlag', align: 'center' }, { title: '是否下载到邮箱', dataIndex: 'name', key: 'name', align: 'center' } ] @@ -32,15 +63,29 @@ export default function Page() {
密钥类型
- { + setKeyType(e); + setTableData([option]) + }} + options={selectedData} />
管理代理
- setProxy(e)} + options={[ + { label: '全部', value: '全部' }, + { label: '无代理', value: '无代理' } + ]} />
-
专用密钥装配列表
- -
用户密钥装配列表
+
专用密钥装配列表
0 ? { y: 41 * 8 } : {}} pagination={false} @@ -49,10 +94,24 @@ export default function Page() { dataSource={tableData} rowKey={(record: any) => record?.id} rowClassName={rowClassName} + rowSelection={tableData.length > 0 ? { + type: 'radio', + selectedRowKeys, + onChange: (selectedKeys: any) => { + setSelectedRowKeys(selectedKeys); + } + } : null} />
- { }} /> + { + if (selectedRowKeys.length == 0) { + message.info('请在管理密钥装配列表中选择一条数据!'); + return + } + getList() + message.success('载体输出成功!') + }} /> { }} /> { }} />
diff --git a/src/pages/MY/KeyManage/UserKey/index.tsx b/src/pages/MY/KeyManage/UserKey/index.tsx index d944601..168583f 100644 --- a/src/pages/MY/KeyManage/UserKey/index.tsx +++ b/src/pages/MY/KeyManage/UserKey/index.tsx @@ -1,95 +1,354 @@ import styles from '../../../GLQ/index.less'; -import { useState } from 'react'; -import { ConfigProvider, DatePicker, Select, Table } from 'antd'; +import { useEffect, useState } from 'react'; +import { ConfigProvider, DatePicker, Form, Modal, Pagination, Radio, Select, Table, message } from 'antd'; import { rowClassName } from '@/utils'; import ButtonComp from '@/components/ButtonComp'; +import moment from 'moment'; +import { secretKey, secretList } from '@/services/my'; +import { managerSysDataList } from '@/services/register'; +import { sysTypeStr } from '@/utils/sysType'; export default function Page() { const [tableData, setTableData] = useState([]); + const [tableData1, setTableData1] = useState([]); + const [visibility, setVisibility] = useState(false); + const [form] = Form.useForm(); + const [pageNumber, setPageNumber] = useState(1); + const [pageSize, setpageSize] = useState(10); + const [total, setTotal] = useState(); + const [selectedRowKeys, setSelectedRowKeys] = useState([]); + const [selectedRowKeys1, setSelectedRowKeys1] = useState([]); + const [selectedData, setSelectedData] = useState(); + + useEffect(() => { + initForm() + }, []) const columns: any = [ - { title: '产品名称', dataIndex: 'productName', key: 'productName', align: 'center' }, - { title: '产品编号', dataIndex: 'productNum', key: 'productNum', align: 'center' }, - { title: '装配情况', dataIndex: 'name', key: 'name', align: 'center' } + { + title: '产品名称', dataIndex: 'productName', key: 'productName', align: 'center', + render: (text: any) => { return {text || '--'} }, + }, { + title: '产品编号', dataIndex: 'productNum', key: 'productNum', align: 'center', + render: (text: any) => { return {text || '--'} }, + }, { + title: '装配情况', dataIndex: 'assemblySituation', key: 'assemblySituation', align: 'center', render: (text: any) => { return {text || '--'} }, + } ] const columns1: any = [ { title: '序号', key: 'index', align: 'center', width: 80, - render: (a: any, b: any, c: any) => { - return {c + 1}; - }, - }, - { title: '设备名称', dataIndex: 'name', key: 'name', align: 'center' }, - { title: '管理实体标识', dataIndex: 'name', key: 'name', align: 'center' }, - { title: '310标识', dataIndex: 'name', key: 'name', align: 'center' }, - { title: '产品名称', dataIndex: 'productName', key: 'productName', align: 'center' }, - { title: '产品编号', dataIndex: 'productNum', key: 'productNum', align: 'center' }, - { title: '安装方式', dataIndex: 'name', key: 'name', align: 'center' }, - { title: '分发状态', dataIndex: 'name', key: 'name', align: 'center' }, - { title: '启用日期', dataIndex: 'name', key: 'name', align: 'center' }, - { title: '终止日期', dataIndex: 'name', key: 'name', align: 'center' }, - { title: '密钥套号', dataIndex: 'name', key: 'name', align: 'center' }, - { title: '载体类型', dataIndex: 'carrierType', key: 'carrierType', align: 'center' }, - { title: '输出日期', dataIndex: 'name', key: 'name', align: 'center' }, - { title: '协同管理标志', dataIndex: 'name', key: 'name', align: 'center' } + render: (a: any, b: any, c: any) => { return {c + 1} }, + }, { + title: '设备名称', dataIndex: 'deviceName', key: 'deviceName', align: 'center', + render: (text: any) => { return {text || '--'} }, + }, { + title: '管理实体标识', dataIndex: 'managerModelId', key: 'managerModelId', align: 'center', + render: (text: any) => { return {text || '--'} }, + }, { + title: '310标识', dataIndex: 'deviceMarkId', key: 'deviceMarkId', align: 'center', + render: (text: any) => { return {text || '--'} }, + }, { + title: '产品名称', dataIndex: 'productName', key: 'productName', align: 'center', + render: (text: any) => { return {text || '--'} }, + }, { + title: '产品编号', dataIndex: 'productNum', key: 'productNum', align: 'center', + render: (text: any) => { return {text || '--'} }, + }, { + title: '安装方式', dataIndex: 'installMethod', key: 'installMethod', align: 'center', + render: (text: any) => { return {text || '--'} }, + }, { + title: '分发状态', dataIndex: 'distType', key: 'distType', align: 'center', + render: (text: any) => { return {text || '--'} }, + }, { + title: '启用日期', dataIndex: 'activeDate', key: 'activeDate', align: 'center', + render: (text: any) => { return {text || '--'} }, + }, { + title: '终止日期', dataIndex: 'endDate', key: 'endDate', align: 'center', + render: (text: any) => { return {text || '--'} }, + }, { + title: '密钥套号', dataIndex: 'setNumber', key: 'setNumber', align: 'center', + render: (text: any) => { return {text || '--'} }, + }, { + title: '载体类型', dataIndex: 'carrierType', key: 'carrierType', align: 'center', + render: (text: any) => { return {text || '--'} }, + }, { + title: '输出日期', dataIndex: 'name', key: 'name', align: 'center', + render: (text: any) => { return {text || '--'} }, + }, { + title: '协同管理标志', dataIndex: 'managementFlag', key: 'managementFlag', align: 'center', + render: (text: any) => { return {text || '--'} }, + } ] - return ( -
- { }} /> + const formItemSty = { width: 'auto', marginBottom: 20, marginRight: 30 }; -
-
密钥类型
- { }} options={[{ label: '选项1', value: 1 }]} /> + const onFinish = () => { + pageNumber == 1 ? getList() : setPageNumber(1); + }; -
启用日期
- -
+ useEffect(() => { + getList(); + setSelectedRowKeys([]) + }, [pageNumber]); -
-
终止日期
- + // 获取密钥体列表 + const getList = () => { + secretList({ pageNumber, pageSize }).then((res) => { + if (res?.result == "success") { + res.data[0].list = res.data[0].list.filter((val: any) => { + return (['PT5',].includes(val?.content)) + }) + setTotal(res.data[0].list.length) + setTableData(res.data[0].list) -
应用系统
- onchange()} + placeholder={'请选择密钥类型'} + allowClear + options={[ + { label: '密钥种类1', value: '密钥种类1' }, + { label: '密钥种类2', value: '密钥种类2' } + ]} /> + + + onchange()} + placeholder={'请选择应用系统'} + allowClear + options={[ + { label: '全部', value: '全部' } + ]} /> + +
可装配的密钥体列表
0 ? { y: 41 * 5 } : {}} + scroll={tableData1.length > 0 ? { y: 41 * 5 } : {}} pagination={false} bordered columns={columns} - dataSource={tableData} + dataSource={tableData1} rowKey={(record: any) => record?.id} rowClassName={rowClassName} + rowSelection={tableData1.length > 0 ? { + type: 'radio', + selectedRowKeys1, + onChange: (selectedKeys: any) => { + setSelectedRowKeys1(selectedKeys); + } + } : null} />
- { }} /> + onRules()} />
用户密钥装配列表
+
0 ? { y: 41 * 5 } : {}} + scroll={tableData.length > 0 ? { y: 41 * 10 } : {}} pagination={false} bordered columns={columns1} dataSource={tableData} rowKey={(record: any) => record?.id} rowClassName={rowClassName} + rowSelection={tableData.length > 0 ? { + type: 'radio', + selectedRowKeys, + onChange: (selectedKeys: any) => { + setSelectedRowKeys(selectedKeys); + } + } : null} /> + {total > 0 &&
+
共 {total} 条
+ +
} +
{ }} /> - { }} /> + { + if (selectedRowKeys.length == 0) { + message.info('请在用户密钥装配列表中选择一条数据!'); + return + } + onFinish() + message.success('载体输出成功!') + }} /> { }} />
+ + setVisibility(false)} + footer={null} + maskClosable={false}> +
+ {selectedData &&
+
装配信息:
+
产品名称:{selectedData?.productName} ,
+
产品编号:{selectedData?.productNum} ,
+
启用日期:{form.getFieldValue('activeDate') && form.getFieldValue('activeDate').format('YYYY-MM-DD')}
+
终止日期:{form.getFieldValue('endDate') && form.getFieldValue('endDate').format('YYYY-MM-DD')}
+
} + {/*
类型判断2: 没有需要装配管理密钥的密码设备!
*/} +
+
+ submit()} /> + setVisibility(false)} /> +
+
); } \ No newline at end of file diff --git a/src/pages/Register/RegisterManage/DeviceRegister/DeviceTab/Dialog/selectDiskDialog.tsx b/src/pages/Register/RegisterManage/DeviceRegister/DeviceTab/Dialog/selectDiskDialog.tsx index db6da72..956fa18 100644 --- a/src/pages/Register/RegisterManage/DeviceRegister/DeviceTab/Dialog/selectDiskDialog.tsx +++ b/src/pages/Register/RegisterManage/DeviceRegister/DeviceTab/Dialog/selectDiskDialog.tsx @@ -1,5 +1,4 @@ import ButtonComp from "@/components/ButtonComp"; -import { diskDataImport, secretFormatList } from "@/services/register"; import { rowClassName } from "@/utils"; import { Modal, Table, Upload, UploadProps, message } from "antd"; import { FC, useEffect, useState } from "react"; @@ -49,7 +48,8 @@ const SelectDiskDialog: FC = ({ visibility = false, onCancel, onOk}) centered width={900} onCancel={() => onCancel()} - footer={null}> + footer={null} + maskClosable={false}>
提示:请在下面列表中选择管理盘,如果没有,可导入管理盘类型为“310系统二期管理盘”的管理盘
diff --git a/src/services/my.ts b/src/services/my.ts index a627f76..3af5d46 100644 --- a/src/services/my.ts +++ b/src/services/my.ts @@ -81,4 +81,9 @@ export async function keyBodyCarrierEncrypted(data: any) { // 密钥配置查询-根据选择的设备查询出所需要导入的秘钥列表,含管理秘钥和用户秘钥 export async function secretInstallSearch(params: any) { return getRequest(`/xgd/secretInstall/search`, params); +} + +// 管理密钥装配 -- 装配 +export async function secretKey(formData: any) { + return uploadFile(`/xgd/secretInstall/secretInstall`, formData); } \ No newline at end of file diff --git a/src/services/register.ts b/src/services/register.ts index dedf51b..4e850d4 100644 --- a/src/services/register.ts +++ b/src/services/register.ts @@ -66,6 +66,6 @@ export async function manageDiskDataImport(formData: any) { } // 管理系统管理盘数据维护 - 列表 -export async function secretFormatList(params: any) { +export async function managerSysDataList(params: any) { return getRequest(`/xgd/secretInstall/managerSysDataList`, params); } diff --git a/src/utils/sysType.ts b/src/utils/sysType.ts index 49ccdd8..8f881a0 100644 --- a/src/utils/sysType.ts +++ b/src/utils/sysType.ts @@ -1,4 +1,5 @@ export const countType = { + 'offLine': '核心区', 'hx1': '核心区一', 'hx2': '核心区二', 'zq1': '执勤区一', @@ -6,6 +7,7 @@ export const countType = { } export const fileStr = { + 'offLine': 'offLine', 'hx1': 'hx', 'hx2': 'hx', 'zq1': 'zq',