更新一版 完成到管理系统管理数据盘维护

master
鲁誉程 10 months ago
parent 377f6453c8
commit 89c4e3a1ef

@ -0,0 +1,24 @@
.import_progress{
position: absolute;
top: 0;
left: 0;
width: 340px;
height: 150px;
background-color: lemonchiffon;
display: flex;
align-items: center;
justify-content: center;
border: 1px solid #999;
.progress {
padding-left: 2px;
height: 22px;
width: 310px;
background-color: #fff;
border: 1px solid #999;
border-radius: 3px;
display: flex;
align-items: center;
justify-content: center;
}
}

@ -0,0 +1,49 @@
import { FC, useEffect, useState } from 'react';
import styles from './index.less';
import { Progress } from 'antd';
interface PageProps {
show?: boolean;
onoK: () => void;
}
const ImportProgress: FC<PageProps> = ({
show = false,
onoK,
...props
}) => {
const [percentVal, setPercentVal] = useState(0);
// 监听是否到安装进度条步骤
useEffect(() => {
if (show) {
const interval = setInterval(() => {
setPercentVal((val) => {
const randomStep = Math.round(Math.random() * (100 / 15));
const newPercent = val + randomStep;
if (newPercent >= 100) {
clearInterval(interval);
onoK()
return 100;
}
return newPercent;
});
}, 100);
return () => clearInterval(interval);
}
}, [show])
return (
<div className={styles.import_progress}>
<div className={styles.progress}>
<Progress percent={percentVal} steps={31} size={[8, 18]} strokeColor={'rgb(56, 158, 13)'} trailColor={'rgba(0,0,0,0)'} showInfo={false} />
</div>
</div>
)
}
export default ImportProgress

@ -113,7 +113,7 @@ const LeftMenuCom: FC<PageProps> = ({ data }) => {
let manager: any = [];
let device: any = [];
// 单位列表
await unitAddressList({ pageNum: 1, pageSize: 100, 'unitAddress.delFlag': 0}).then((res) => {
await unitAddressList({ pageNum: 1, pageSize: 200, 'unitAddress.delFlag': 0}).then((res) => {
if (res?.result == "success") {
res.data[0].list.forEach((val: any) => {
val.title = val.unitName;
@ -126,7 +126,7 @@ const LeftMenuCom: FC<PageProps> = ({ data }) => {
}
})
// 设备注册列表
await deviceHardPage({ pageNumber: 1, pageSize: 100 }).then((res) => {
await deviceHardPage({ pageNumber: 1, pageSize: 200 }).then((res) => {
if (res?.result == "success") {
res.data[0].list.forEach((val: any) => { val.title = val.deviceName; val.key = val.id; })
device = res.data[0].list.filter((val: any) => {return val.delFlag == 0})
@ -152,7 +152,7 @@ const LeftMenuCom: FC<PageProps> = ({ data }) => {
// 更新单位位置管理树结构数据
const getUnitList = (type?: string) => {
unitAddressList({ pageNum: 1, pageSize: 100, 'unitAddress.delFlag': 0}).then((res: any) => {
unitAddressList({ pageNum: 1, pageSize: 200, 'unitAddress.delFlag': 0}).then((res: any) => {
if (res.result == 'success') {
res.data[0].list.forEach((val: any) => { val.title = val.unitName; val.key = val.id; })
// 过滤掉delFlag == 1的数据

@ -6,21 +6,24 @@ import ButtonComp from '@/components/ButtonComp';
import { secretInit_cleanInfo, secretInit_loadData, secretInit_sendData } from '@/services/gql';
import { useEffect, useState, } from 'react';
import ClearInfoDialog from '@/components/ClearInfoDialog';
import { useParams } from 'umi';
// 网络MMJ管理 --> MMJ初装
export default function Page() {
const [dataLoading, setDataLoading] = useState(false);
const [form] = Form.useForm();
const [visibility, setVisibility] = useState<boolean>(false);
const urlParams = useParams();
let sysInfo = localStorage.getItem(`${urlParams?.fileType}`);
let info = sysInfo ? JSON.parse(sysInfo) : null;
const onFinish = (values: any) => {
console.log('表单提交:', values);
};
useEffect(() => {
let layoutInfo: any = localStorage.getItem('MMJInit');
if (layoutInfo) {
form.setFieldsValue({ ...JSON.parse(layoutInfo) })
if (info) {
form.setFieldsValue({ ...info?.MMJInit })
setDataLoading(true);
}
}, [])
@ -34,7 +37,7 @@ export default function Page() {
if (res?.result == "success" && res?.data.length > 0) {
message.success('加载数据成功');
form.setFieldsValue({ ...res?.data[0] })
localStorage.setItem('MMJInit', JSON.stringify(res?.data[0]));
localStorage.setItem(`${urlParams?.fileType}`, JSON.stringify({ ...info, MMJInit: res?.data[0] }))
setDataLoading(true);
} else {
message.error(res?.errorMsg);

@ -6,6 +6,9 @@ import { Button, ConfigProvider, Form, Input, Modal, Pagination, Select, Table,
import { rowClassName } from '@/utils';
import ButtonComp from '@/components/ButtonComp';
import { secretBodyImport, secretFormatList, secretList, secretUpdateSecret } from '@/services/my';
import { useParams } from 'umi';
import { fileStr, sysType, sysTypeStr } from '@/utils/sysType';
import ImportProgress from '@/components/ImportProgress';
export default function Page() {
const [activeTab, setActiveTab] = useState(1);
@ -18,15 +21,16 @@ export default function Page() {
const [productNumber, setProductNumber] = useState('');
const [speed, setSpeed] = useState(1);
const [selectData, setSelectData] = useState<any>({
keyType: [],
productName: [],
carrierType: [],
carrierNumber: [],
publisherType: [],
orderDirection: []
carrierModel: [],
net: []
});
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
const [allRowKeys, setAllRowKeys] = useState([]);
const urlParams = useParams();
const [form] = Form.useForm();
const formItemSty = { width: 'auto', marginBottom: 20, marginRight: 30 };
@ -43,9 +47,9 @@ export default function Page() {
{ title: '载体类型', dataIndex: 'carrierType', key: 'carrierType', align: 'center' },
{ title: '载体型号', dataIndex: 'applyModel', key: 'applyModel', align: 'center' },
{ title: '数量', dataIndex: 'number', key: 'number', align: 'center' },
// { title: '来源', dataIndex: 'orderDirection', key: 'orderDirection', align: 'center' },
{ title: '来源', dataIndex: 'source', key: 'source', align: 'center' },
{ title: '当前状态', dataIndex: 'currentStatus', key: 'currentStatus', align: 'center' },
{ title: '导入时间', dataIndex: 'importTime', key: 'importTime', align: 'center' },
{ title: '导入时间', dataIndex: 'importTime', key: 'importTime', align: 'center'},
]
useEffect(() => {
@ -54,30 +58,32 @@ export default function Page() {
}, [])
const initForm = () => {
form.setFieldsValue({
productName: '',
carrierType: '',
carrierNumber: '',
// orderDirection: '',
})
}
// 获取下拉框数据
const getSelect = () => {
secretFormatList({ pageNumber, pageSize }).then((res) => {
if (res?.result == "success") {
let list = res.data[0].list;
let productName = list.map((item: any) => { return { label: item.productName, value: item.productName } });
let carrierType = list.map((item: any) => { return { label: item.carrierType, value: item.carrierType } });
let carrierNumber = list.map((item: any) => { return { label: item.carrierNumber, value: item.carrierNumber } });
setSelectData({
productName: [{ label: '全部', value: '' }, ...productName],
carrierType: [{ label: '全部', value: '' }, ...carrierType],
carrierNumber: [{ label: '全部', value: '' }, ...carrierNumber],
})
} else {
message.error(res?.errorMsg);
}
setSelectData({
keyType: [
{ label: '密钥种类1', value: '密钥种类1' },
{ label: '密钥种类2', value: '密钥种类2' }
],
productName: [
{ label: '产品名称1', value: '产品名称1' },
{ label: '产品名称2', value: '产品名称2' }
],
carrierType: [
{ label: '软盘', value: '软盘' },
{ label: '移动盘', value: '移动盘' },
{ label: '全部', value: '全部' }
],
carrierModel: [
{ label: '三寸', value: '三寸' },
{ label: '全部', value: '全部' }
],
net: [
{ label: '来自产品1', value: '来自产品1' },
{ label: '来自产品2', value: '来自产品2' },
]
})
}
@ -89,15 +95,10 @@ export default function Page() {
// 获取密钥体列表
const getList = () => {
let data = form.getFieldsValue()
let params = {
'secretImport.productName': data.productName,
'secretImport.carrierType': data.carrierType,
'secretImport.carrierNumber': data.carrierNumber,
}
secretList({ pageNumber, pageSize, ...params}).then((res) => {
secretList({ pageNumber, pageSize }).then((res) => {
if (res?.result == "success") {
setTotal(res.data[0].total)
res.data[0].list = res.data[0].list.filter((val: any) => {return val?.content != 'PMCS'})
setTotal(res.data[0].total - 1)
setTableData(res.data[0].list)
const keys = res.data[0].list.map((item: any) => item?.id);
setAllRowKeys(keys);
@ -132,7 +133,20 @@ export default function Page() {
message.info('请勾选数据');
return
}
let jg = false;
tableData.forEach((item: any) => {
selectedRowKeys.forEach(item2 => {
if (item2 == item?.id && item?.currentStatus == '已使用') {
jg = true;
}
})
})
if (jg) {
message.info('当前状态为已使用的不能删除, 请先将已使用的'); return
}
let promises = selectedRowKeys.map(item => {
return secretUpdateSecret({ id: item, type }).then((res) => {
if (res?.result === "success") {
@ -144,7 +158,7 @@ export default function Page() {
});
});
let str: any = { 1: '删除成功', 2: '还原成功', 3: '清理成功'}
let str: any = { 1: '删除成功', 2: '还原成功', 3: '清理成功' }
Promise.all(promises).then(results => {
let recordCount = results.reduce((acc: any, val) => acc + val, 0);
if (recordCount === selectedRowKeys.length) {
@ -156,6 +170,29 @@ export default function Page() {
});
}
const uploadFiles = () => {
let data = form.getFieldsValue()
let sysTypeName: string = sysType[urlParams?.fileType] + fileStr[urlParams?.fileType]
const formData = new FormData();
formData.append('file', fileInfo);
formData.append('productNumber', `${productNumber}`);
formData.append('keyType', `${data?.keyType}`);
formData.append('productName', `${data?.productName}`);
formData.append('carrierType', `${data?.carrierType}`);
formData.append('carrierModel', `${data?.carrierModel}`);
formData.append('net', `${data?.net}`);
formData.append('sysType', `${sysTypeStr[sysTypeName]}`);
secretBodyImport(formData).then((res) => {
if (res?.result == "success") {
setSpeed(4)
setVisibility(false)
} else {
message.error(res?.errorMsg);
}
})
}
return (
<div className={`${styles.params_warp}`}>
<TabsComp
@ -164,40 +201,33 @@ export default function Page() {
onChange={(e) => setActiveTab(e)} />
<Form form={form} layout={'inline'} onFinish={onFinish} className='mt20'>
{/* <Form.Item name="keyType" label="" style={formItemSty}>
<Select style={{ width: 260 }} placeholder="请选择密钥种类" onChange={(e) => { }} options={[
{ label: '全部', value: '' },
{ label: '1管理密销', value: 1 },
{ label: '2用户密钥', value: 2 },
{ label: '3用户密钥', value: 3 }
]} />
</Form.Item> */}
<Form.Item name="productName" label="产品名称" style={formItemSty}>
<Select style={{ width: 260 }} placeholder="请选择产品名称" onChange={(e) => { }} options={selectData.productName} />
<Form.Item name="keyType" label="密钥种类" style={formItemSty} rules={[{ required: true, message: '请选择密钥种类' }]}>
<Select style={{ width: 260 }} placeholder="请选择密钥种类" options={selectData.keyType} />
</Form.Item>
<Form.Item name="carrierType" label="载体类型" style={formItemSty}>
<Select style={{ width: 260 }} placeholder="请选择载体类型" onChange={(e) => { }} options={selectData.carrierType} />
<Form.Item name="productName" label="产品名称" style={formItemSty} rules={[{ required: true, message: '请选择产品名称' }]}>
<Select style={{ width: 260 }} placeholder="请选择产品名称" options={selectData.productName} />
</Form.Item>
<Form.Item name="carrierNumber" label="载体型号" style={formItemSty}>
<Select style={{ width: 260 }} placeholder="请选择载体型号" onChange={(e) => { }} options={selectData.carrierNumber} />
<Form.Item name="carrierType" label="载体类型" style={formItemSty} rules={[{ required: true, message: '请选择载体类型' }]}>
<Select style={{ width: 260 }} placeholder="请选择载体类型" options={selectData.carrierType} />
</Form.Item>
<Form.Item name="carrierModel" label="载体型号" style={formItemSty} rules={[{ required: true, message: '请选择载体型号' }]}>
<Select style={{ width: 260 }} placeholder="请选择载体型号" options={selectData.carrierModel} />
</Form.Item>
<Form.Item name="net" label="来源" style={{ ...formItemSty, marginLeft: 30 }} rules={[{ required: true, message: '请选择来源' }]}>
<Select style={{ width: 260 }} placeholder="请选择来源" options={selectData.net} />
</Form.Item>
{/* <Form.Item name="orderDirection" label="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" style={formItemSty}>
<Select style={{ width: 260 }} placeholder="请选择来源" onChange={(e) => { }} options={[
{ label: '全部', value: '' },
{ label: '来自产品1', value: 1 },
{ label: '来自产品2', value: 2 },
]} />
</Form.Item> */}
</Form>
<div className='flex_jE' style={{ marginBottom: 30 }}>
<ButtonComp style={{ marginRight: 20 }} type={'cancel'} text={'导入'} onClick={() => {
setSpeed(1);
setFileInfo(null);
setProductNumber('');
setVisibility(true)
form.validateFields().then(() => {
setSpeed(1);
setFileInfo(null);
setProductNumber('');
setVisibility(true)
})
}} />
<ButtonComp text={'查询'} onClick={() => form.submit()} />
<ButtonComp text={'查询'} onClick={() => onFinish()} />
</div>
<div className='mb20 flex_aiC_jB'>
@ -237,14 +267,14 @@ export default function Page() {
<ButtonComp style={{ marginRight: 20 }} type={'cancel'} text={'删除'} onClick={() => sending(1)} />
<ButtonComp style={{ marginRight: 20 }} type={'cancel'} text={'还原'} onClick={() => sending(2)} />
<ButtonComp style={{ marginRight: 20 }} type={'cancel'} text={'清理'} onClick={() => sending(3)} />
<ButtonComp type={'cancel'} text={'载体输出'} onClick={() => { message.info('建设中')}} />
<ButtonComp type={'cancel'} text={'载体输出'} onClick={() => { message.info('建设中') }} />
</div>
<Modal
title="请确认或者输入产品编号"
open={visibility}
centered
width={550}
width={speed != 2 ? 425 : 515}
onCancel={() => setVisibility(false)}
footer={null}>
<div>
@ -266,39 +296,32 @@ export default function Page() {
<div className='mb10'></div>
<div className='flex_aiC'>
<span style={{ marginRight: 4, color: 'red' }}>*</span>
<Input style={{ width: 300, marginLeft: 16 }} value={fileInfo?.name || ''} disabled={true} />
<Input style={{ width: 300, marginLeft: 16 }} value={fileInfo?.name || ''} disabled={true} />
<Upload {...props} showUploadList={false}>
<ButtonComp style={{ marginLeft: 20 }} text={'选择'} onClick={() => { }} />
<ButtonComp style={{ marginLeft: 20 }} text={'选择'} />
</Upload>
</div>
</div>
}
{speed == 3 && <div></div>}
{speed == 4 && <div></div>}
{speed == 5 && <div></div>}
{speed == 6 && <div></div>}
</div>
<div className='flex_jE mt20'>
<ButtonComp style={{ marginRight: 20 }} text={'确定'} onClick={() => {
switch (speed) {
case 1:
if (!productNumber.trim()) { message.error('产品编号不能为空'); return }
if (!productNumber.trim()) { message.error('请输入产品编号'); return }
setSpeed(2)
break;
case 2:
const formData = new FormData();
formData.append('file', fileInfo);
formData.append('productNumber', `${productNumber}`);
secretBodyImport(formData).then((res) => {
if (res?.result == "success") {
setSpeed(3)
} else {
message.error(res?.errorMsg);
}
})
if (!fileInfo) { message.error('请选择文件路径'); return }
setSpeed(3)
break;
case 3:
setSpeed(4)
uploadFiles()
break;
case 4:
case 5:
onFinish()
setVisibility(false)
break;
@ -307,6 +330,11 @@ export default function Page() {
<ButtonComp type='cancel' text={'取消'} onClick={() => setVisibility(false)} />
</div>
</Modal>
{speed == 4 && <ImportProgress show={speed == 4 ? true : false} onoK={() => {
setVisibility(true)
setSpeed(5)
}}/>}
</div>
);
}

@ -1,13 +1,17 @@
import styles from '../../../GLQ/index.less';
import { useState } from 'react';
import { ConfigProvider, Modal, Table } from 'antd';
import { useEffect, useState } from 'react';
import { ConfigProvider, Input, Modal, Table, Upload, UploadProps, message } from 'antd';
import { rowClassName } from '@/utils';
import ButtonComp from '@/components/ButtonComp';
import { manageDiskDataImport, secretFormatList } from '@/services/register';
import ImportProgress from '@/components/ImportProgress';
export default function Page() {
const [tableData, setTableData] = useState([]);
const [visibility, setVisibility] = useState(false);
const [speed, setSpeed] = useState(1);
const [fileInfo, setFileInfo] = useState(null);
const columns: any = [
{
@ -19,16 +23,55 @@ export default function Page() {
{ title: '管理盘号', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '密钥种类', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '当前版本号', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '导入时间', dataIndex: 'importTime', key: 'importTime', align: 'center' },,
{ title: '导入时间', dataIndex: 'importTime', key: 'importTime', align: 'center' }, ,
{ title: '数据长度', dataIndex: 'name', key: 'name', align: 'center' }
]
const props: UploadProps = {
maxCount: 1,
beforeUpload: (file: any) => {
setFileInfo(file);
}
};
useEffect(() => {
getList()
}, [])
const uploadFiles = () => {
const formData = new FormData();
formData.append('file', fileInfo);
manageDiskDataImport(formData).then((res) => {
if (res?.result == "success") {
setVisibility(false)
setSpeed(2)
} else {
message.error(res?.errorMsg);
}
})
}
// 获取密钥体列表
const getList = () => {
secretFormatList({ pageNumber: 1, pageSize: 50 }).then((res) => {
if (res?.result == "success") {
setTableData(res.data[0].list)
} else {
message.error(res?.errorMsg);
}
})
}
return (
<div className={`${styles.params_warp}`}>
<ButtonComp type={'special'} text={'管理系统管理盘数据维护'} onClick={() => { }} />
<div className='flex_aiC mt20 mb20'>
<ButtonComp text={'数据导入'} onClick={() => setVisibility(true)} />
<ButtonComp text={'数据导入'} onClick={() => {
setSpeed(1);
setFileInfo(null);
setVisibility(true)
}} />
</div>
<Table
@ -45,18 +88,48 @@ export default function Page() {
title="xx部一体化对称密码管理系统"
open={visibility}
centered
width={500}
width={speed != 1 ? 425 : 515}
onCancel={() => setVisibility(false)}
footer={null}>
<div>
<div>1 </div>
<div>2 </div>
<div>3 </div>
{
speed == 1 &&
<div className='mb30'>
<div className='mb10'></div>
<div className='flex_aiC'>
<span style={{ marginRight: 4, color: 'red' }}>*</span>
<Input style={{ width: 300, marginLeft: 16 }} value={fileInfo?.name || ''} disabled={true} />
<Upload {...props} showUploadList={false}>
<ButtonComp style={{ marginLeft: 20 }} text={'选择'} />
</Upload>
</div>
</div>
}
{speed == 3 && <div></div>}
{speed == 4 && <div></div>}
</div>
<div className='flex_jE mt20'>
<ButtonComp text={'确定'} onClick={() => { }} />
<ButtonComp text={'确定'} style={{ marginRight: 20 }} onClick={() => {
switch (speed) {
case 1:
uploadFiles()
setSpeed(2)
break;
case 3:
getList()
setVisibility(false)
break;
}
}} />
<ButtonComp type='cancel' text={'取消'} onClick={() => setVisibility(false)} />
</div>
</Modal>
{speed == 2 && <ImportProgress show={speed == 2 ? true : false} onoK={() => {
setVisibility(true)
setSpeed(3)
}} />}
</div>
);
}

@ -1,13 +1,23 @@
import styles from '../../../GLQ/index.less';
import { useState } from 'react';
import { ConfigProvider, Modal, Select, Table } from 'antd';
import { useEffect, useState } from 'react';
import { ConfigProvider, Modal, Select, Table, message } from 'antd';
import { rowClassName } from '@/utils';
import ButtonComp from '@/components/ButtonComp';
import { secretInstallSearch } from '@/services/my';
import { deviceHardPage } from '@/services/register';
export default function Page() {
const [tableData, setTableData] = useState([]);
const [tableData, setTableData] = useState<any>([]);
const [tableData1, setTableData1] = useState<any>([]);
const [visibility, setVisibility] = useState(false);
const [queryParams, setQueryParams] = useState({
a: '',
b: '',
c: '',
d: ''
});
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
const columns: any = [
{
@ -38,21 +48,54 @@ export default function Page() {
return <span>{c + 1}</span>;
},
},
{ title: '设备名称', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '管理实体标识', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '310标识', dataIndex: 'name', key: 'name', align: 'center' },
{ title: 'IP地址', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '设备型号', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '设备名称', dataIndex: 'deviceName', key: 'deviceName', align: 'center' },
{ title: '管理实体标识', dataIndex: 'deviceEntityId', key: 'deviceEntityId', align: 'center' },
{ title: '310标识', dataIndex: 'deviceMarkId', key: 'deviceMarkId', align: 'center' },
{ title: 'IP地址', dataIndex: 'ip', key: 'ip', align: 'center' },
{ title: '设备型号', dataIndex: 'deviceType', key: 'deviceType', 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' }
]
const search = () => { }
const submit = () => {
if (selectedRowKeys.length == 0) {
message.info('请选择设备!')
return
}
secretInstallSearch({deviceId: selectedRowKeys[0]}).then((res) => {
if (res?.result == "success") {
let data = res.data[0].filter((val: any) => { return val.delFlag == 0 })
setTableData([...data])
setVisibility(false)
setSelectedRowKeys([])
} else {
message.error(res?.errorMsg);
}
})
}
const getDeviceHardPage = async () => {
await deviceHardPage({ pageNumber: 1, pageSize: 200 }).then((res) => {
if (res?.result == "success") {
let data = res.data[0].list.filter((val: any) => { return val.delFlag == 0 })
setTableData1([...data])
} else {
message.error(res?.errorMsg);
}
})
}
return (
<div className={`${styles.params_warp}`}>
<ButtonComp type={'special'} text={'密钥配置查询'} onClick={() => { }} />
<ButtonComp style={{ margin: '20px 0 ' }} text={'选择设备'} onClick={() => setVisibility(true)} />
<ButtonComp style={{ margin: '20px 0 ' }} text={'选择设备'} onClick={ () => {
setVisibility(true);
getDeviceHardPage()
}} />
<Table
scroll={tableData.length > 0 ? { y: 41 * 9 } : {}}
@ -73,19 +116,19 @@ export default function Page() {
footer={null}>
<div className='flex_aiC mb20 pt10'>
<div className='mr16'></div>
<Select style={{ width: 120, marginRight: 20 }} placeholder={'请选择检索项'} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<div className='mr16'></div>
<Select style={{ width: 120, marginRight: 20 }} value={queryParams.a} placeholder={'请选择设备型号'} onChange={(e) => { }} options={[{ label: '全部', value: '' }]} />
<div className='mr16'></div>
<Select style={{ width: 120, marginRight: 20 }} placeholder={'请选择检索项'} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<div className='mr16'></div>
<Select style={{ width: 120, marginRight: 20 }} value={queryParams.b} placeholder={'请选择应用系统'} onChange={(e) => { }} options={[{ label: '全部', value: '' }]} />
<div className='mr16'></div>
<Select style={{ width: 120, marginRight: 20 }} placeholder={'请选择设备型号'} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<div className='mr16'></div>
<Select style={{ width: 120, marginRight: 20 }} value={queryParams.b} placeholder={'请选择所属单位'} onChange={(e) => { }} options={[{ label: '全部', value: '' }]} />
<div className='mr16'></div>
<Select style={{ width: 120, marginRight: 20 }} placeholder={'请选择管理代理'} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<Select style={{ width: 120, marginRight: 20 }} value={queryParams.d} placeholder={'请选择管理代理'} onChange={(e) => { }} options={[{ label: '全部', value: '' }]} />
<ButtonComp text={'查找'} onClick={() => { }} />
<ButtonComp text={'查找'} onClick={() => search()} />
</div>
<Table
@ -93,14 +136,21 @@ export default function Page() {
pagination={false}
bordered
columns={columns1}
dataSource={tableData}
dataSource={tableData1}
rowKey={(record: any) => record?.id}
rowClassName={rowClassName}
rowSelection={{
type: 'radio',
selectedRowKeys,
onChange: (selectedKeys: any) => {
setSelectedRowKeys(selectedKeys);
}
}}
/>
<div className='flex_jE mt20'>
<ButtonComp style={{ marginRight: 20 }} text={'确定'} onClick={() => { }} />
<ButtonComp type='cancel' text={'取消'} onClick={() => { }} />
<ButtonComp style={{ marginRight: 20 }} text={'确定'} onClick={() => submit()} />
<ButtonComp type='cancel' text={'取消'} onClick={() => setVisibility(false)} />
</div>
</Modal>
</div>

@ -4,6 +4,7 @@ import { ConfigProvider, DatePicker, Modal, Radio, Select, Table } from 'antd';
import { rowClassName } from '@/utils';
import ButtonComp from '@/components/ButtonComp';
import moment from 'moment';
export default function Page() {
const [tableData, setTableData] = useState([]);
@ -37,26 +38,61 @@ export default function Page() {
{ title: '协同管理标志', dataIndex: 'name', key: 'name', align: 'center' }
]
const disabledDate = (current: any) => {
return current && current < moment().startOf('day');
};
const disabledTime = (current, type) => {
if (type === 'start' && current && current.isSame(moment(), 'day')) {
const currentTime = moment();
const disabledHours = generateOptions(0, currentTime.hour());
const disabledMinutes = generateOptions(0, currentTime.minute());
return {
disabledHours: () => disabledHours,
disabledMinutes: () => disabledMinutes,
};
}
return {};
};
const generateOptions = (start, end) => Array.from({ length: end - start }, (_, i) => start + i);
return (
<div className={`${styles.params_warp}`}>
<ButtonComp type={'special'} text={'管理密钥装配'} onClick={() => { }} />
<div className='flex_aiC mt20 mb20'>
<Radio.Group>
<Radio value="1" style={{ marginRight: 100 }}> 使 </Radio>
<Radio value="1" style={{ marginRight: 50 }}> 使 </Radio>
<Radio value="2"> </Radio>
</Radio.Group>
</div>
<div className='flex_aiC mt20 mb20'>
<div className='mr16'></div>
<Select style={{ width: 260, marginRight: 20 }} placeholder={'请选择密钥类型'} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<Select style={{ width: 260, marginRight: 20 }} placeholder={'请选择密钥类型'}
options={[
{ label: '密钥-111', value: '密钥-111'},
{ label: '密钥-222', value: '密钥-222'}
]} />
<div className='mr16'></div>
<Select style={{ width: 260, marginRight: 20 }} placeholder={'请选择所属网络'} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<Select style={{ width: 260, marginRight: 20 }} placeholder={'请选择所属网络'}
options={[
{ label: '离线', value: '离线' },
{ label: '指挥专网', value: '指挥专网' },
{ label: '军事综合信息网', value: '军事综合信息网' },
{ label: '资源管理网', value: '资源管理网' }
]} />
<div className='mr16'></div>
<DatePicker style={{ width: 260 }} />
<DatePicker
showTime={{ format: 'HH:mm' }}
style={{ width: 260 }}
disabledDate={disabledDate}
disabledTime={disabledTime}
format="YYYY-MM-DD HH:mm"/>
</div>
<div className='mb10'></div>

@ -76,4 +76,9 @@ export async function keyBodyCarrierClearText(data: any) {
// 密钥体载体包封 - 密文载体包封
export async function keyBodyCarrierEncrypted(data: any) {
return postRequest(`/xgd/secretBodyManger/keyBodyCarrierEncrypted`, data);
}
// 密钥配置查询-根据选择的设备查询出所需要导入的秘钥列表,含管理秘钥和用户秘钥
export async function secretInstallSearch(params: any) {
return getRequest(`/xgd/secretInstall/search`, params);
}

@ -61,7 +61,7 @@ export async function unitAddressList(params: any) {
}
// 管理系统管理盘数据维护(导入管理系统盘) - 数据导入
export async function diskDataImport(formData: any) {
export async function manageDiskDataImport(formData: any) {
return uploadFile(`/xgd/secretInstall/dataImport`, formData);
}

Loading…
Cancel
Save