对接完my模块接口

master_basic
鲁誉程 11 months ago
parent 20f7e338d0
commit 1b148f9e51

@ -72,7 +72,6 @@ export default function Page() {
visibility={visibility}
onCancel={() => setVisibility(false)}
onOk={() => {
if (lines.length == 0) return;
setLines([]);
setCurrentLineIndex(0);
setVisibility(false);

@ -72,7 +72,6 @@ export default function Page() {
visibility={visibility}
onCancel={() => setVisibility(false)}
onOk={() => {
if (lines.length == 0) return;
setLines([]);
setCurrentLineIndex(0);
setVisibility(false);

@ -72,7 +72,6 @@ export default function Page() {
visibility={visibility}
onCancel={() => setVisibility(false)}
onOk={() => {
if (lines.length == 0) return;
setLines([]);
setCurrentLineIndex(0);
setVisibility(false);

@ -72,7 +72,6 @@ export default function Page() {
visibility={visibility}
onCancel={() => setVisibility(false)}
onOk={() => {
if (lines.length == 0) return;
setLines([]);
setCurrentLineIndex(0);
setVisibility(false);

@ -72,7 +72,6 @@ export default function Page() {
visibility={visibility}
onCancel={() => setVisibility(false)}
onOk={() => {
if (lines.length == 0) return;
setLines([]);
setCurrentLineIndex(0);
setVisibility(false);

@ -21,8 +21,8 @@ export default function Page() {
deviceName: '',
deviceIp: '',
deviceId: '',
messageComm: 1,
pingComm: 1,
messageComm: '加密通信',
pingComm: '允许互PING',
})
}, [])
@ -142,9 +142,9 @@ export default function Page() {
style={{ width: 250, marginRight: 20 }}
onChange={(e) => { }}
options={[
{ label: '加密通信', value: 1 },
{ label: '数据明传', value: 2 },
{ label: '通信阻断', value: 3 }
{ label: '加密通信', value: '加密通信' },
{ label: '数据明传', value: '数据明传' },
{ label: '通信阻断', value: '通信阻断' }
]}
/>
</Form.Item>
@ -159,8 +159,8 @@ export default function Page() {
style={{ width: 250, marginRight: 20 }}
onChange={(e) => { }}
options={[
{ label: '允许互PING', value: 1 },
{ label: '阻断互PING', value: 2 }
{ label: '允许互PING', value: '允许互PING' },
{ label: '阻断互PING', value: '阻断互PING' }
]}
/>
</Form.Item>

@ -72,7 +72,6 @@ export default function Page() {
visibility={visibility}
onCancel={() => setVisibility(false)}
onOk={() => {
if (lines.length == 0) return;
setLines([]);
setCurrentLineIndex(0);
setVisibility(false);

@ -72,7 +72,6 @@ export default function Page() {
visibility={visibility}
onCancel={() => setVisibility(false)}
onOk={() => {
if (lines.length == 0) return;
setLines([]);
setCurrentLineIndex(0);
setVisibility(false);

@ -71,7 +71,6 @@ export default function Page() {
visibility={visibility}
onCancel={() => setVisibility(false)}
onOk={() => {
if (lines.length == 0) return;
setLines([]);
setCurrentLineIndex(0);
setVisibility(false);

@ -71,7 +71,6 @@ export default function Page() {
visibility={visibility}
onCancel={() => setVisibility(false)}
onOk={() => {
if (lines.length == 0) return;
setLines([]);
setCurrentLineIndex(0);
setVisibility(false);

@ -4,7 +4,7 @@ import styles1 from './index.less';
import { Form, Input, Upload, UploadProps, message } from 'antd';
import ButtonComp from '@/components/ButtonComp';
import { secretInit_cleanInfo, secretInit_loadData, secretInit_sendData } from '@/services/gql';
import { useEffect, useState, } from 'react';
import { useEffect, useState, } from 'react';
import ClearInfoDialog from '@/components/ClearInfoDialog';
// 网络MMJ管理 --> MMJ初装
@ -20,7 +20,7 @@ export default function Page() {
useEffect(() => {
let layoutInfo: any = localStorage.getItem('MMJInit');
if (layoutInfo) {
form.setFieldsValue({...JSON.parse(layoutInfo)})
form.setFieldsValue({ ...JSON.parse(layoutInfo) })
setDataLoading(true);
}
}, [])
@ -28,14 +28,16 @@ export default function Page() {
const props: UploadProps = {
maxCount: 1,
beforeUpload: (file: any) => {
secretInit_loadData(file).then((res) => {
const formData = new FormData();
formData.append('file', file);
secretInit_loadData(formData).then((res) => {
if (res?.result == "success" && res?.data.length > 0) {
message.success('加载数据成功');
form.setFieldsValue({...res?.data[0]})
form.setFieldsValue({ ...res?.data[0] })
localStorage.setItem('MMJInit', JSON.stringify(res?.data[0]));
setDataLoading(true);
} else {
message.error('加载数据失败');
message.error(res?.errorMsg);
}
})
}
@ -80,36 +82,36 @@ export default function Page() {
<Form.Item
name="passwordInit"
label="初装密钥"
// rules={[
// { required: true, message: '请输入初装密钥' },
// ]}
// rules={[
// { required: true, message: '请输入初装密钥' },
// ]}
>
<Input style={{ width: '560px' }} disabled={true}/>
<Input style={{ width: '560px' }} disabled={true} />
</Form.Item>
<Form.Item
name="algorithmParam"
label="算法参数"
// rules={[
// { required: true, message: '请输入算法参数' },
// ]}
// rules={[
// { required: true, message: '请输入算法参数' },
// ]}
>
<Input style={{ width: '560px' }} disabled={true}/>
<Input style={{ width: '560px' }} disabled={true} />
</Form.Item>
<Form.Item
name="paramCode"
label="参数自检码"
// rules={[
// { required: true, message: '请输入参数自检码' },
// ]}
// rules={[
// { required: true, message: '请输入参数自检码' },
// ]}
>
<Input style={{ width: '560px' }} disabled={true}/>
<Input style={{ width: '560px' }} disabled={true} />
</Form.Item>
</Form>
<div className={styles.btn_warp}>
<Upload {...props} showUploadList={false}>
<ButtonComp style={{ marginRight: 20 }} text={'加载数据'} />
</Upload>
<ButtonComp style={{ marginRight: 20 }} type={'cancel'} text={'发送数据'} onClick={() => {
<ButtonComp style={{ marginRight: 20 }} type={'cancel'} text={'发送数据'} onClick={() => {
goData()
}} />
<ButtonComp type={'cancel'} text={'清空信息'} onClick={() => setVisibility(true)} />
@ -122,6 +124,7 @@ export default function Page() {
onCancel={() => setVisibility(false)}
onOk={() => {
clearInfo()
setVisibility(false)
}}>
<div></div>
</ClearInfoDialog>

@ -72,7 +72,6 @@ export default function Page() {
visibility={visibility}
onCancel={() => setVisibility(false)}
onOk={() => {
if (lines.length == 0) return;
setLines([]);
setCurrentLineIndex(0);
setVisibility(false);

@ -80,7 +80,6 @@ export default function Page() {
visibility={visibility}
onCancel={() => setVisibility(false)}
onOk={() => {
if (lines.length == 0) return;
setLines([]);
setCurrentLineIndex(0);
setVisibility(false);

@ -35,14 +35,16 @@ const DeviceInstall: FC<PageProps> = ({ }) => {
const props: UploadProps = {
maxCount: 1,
beforeUpload: (file: any) => {
deviceInit_init(file).then((res) => {
const formData = new FormData();
formData.append('file', file);
deviceInit_init(formData).then((res) => {
if (res?.result == "success" && res?.data.length > 0) {
message.success('数据加载成功');
setFileInfo(res?.data[0]);
localStorage.setItem('deviceInit', JSON.stringify(res?.data[0]));
setDataLoading(true);
} else {
message.error('数据加载失败');
message.error(res?.errorMsg);
}
})
}

@ -35,7 +35,7 @@ const PowerOnAuth: FC<PageProps> = ({ }) => {
}
setDeviceInfo(res?.data[0]);
} else {
message.error('开机认证失败');
message.error(res?.errorMsg);
}
})
}, [])

@ -1,16 +1,55 @@
import TabsComp from '@/components/TabsComp';
import styles from '../../../GLQ/index.less';
import { useState } from 'react';
import { ConfigProvider, Form, Radio, Select, Table } from 'antd';
import { useEffect, useState } from 'react';
import { ConfigProvider, Form, Input, Pagination, Radio, Select, Table, message } from 'antd';
import { rowClassName } from '@/utils';
import ButtonComp from '@/components/ButtonComp';
import { addSecretAsk, secretAskList, secretFormatList } from '@/services/my';
export default function Page() {
const [activeTab, setActiveTab] = useState(1)
const [tableData, setTableData] = useState([]);
const [form] = Form.useForm();
const formItemSty = { width: 'auto', marginBottom: 20, marginRight: 30 };
const [pageNumber, setPageNumber] = useState(1);
const [pageSize, setpageSize] = useState(10);
const [total, setTotal] = useState(0);
const [selectData, setSelectData] = useState<any>({
productName: [],
productNum: [],
publisherType: [],
carrierNumber: []
});
useEffect(() => {
form.setFieldsValue({
applyNewOld: '申请新密钥体',
})
getSelect()
}, [])
// 获取下拉框数据
const getSelect = () => {
secretFormatList({}).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 publisherType = list.map((item: any) => { return { label: item.publisherType, value: item.publisherType } });
let productNum = list.map((item: any) => { return { label: item.productNum, value: item.productNum } });
let carrierNumber = list.map((item: any) => { return { label: item.carrierNumber, value: item.carrierNumber } });
setSelectData({
productName,
publisherType,
productNum,
carrierNumber
})
} else {
message.error(res?.errorMsg);
}
})
}
const columns: any = [
{
@ -19,21 +58,60 @@ export default function Page() {
return <span>{c + 1}</span>;
},
},
{ 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: 'name', key: 'name', align: 'center' },
{ title: '载体型号', dataIndex: 'name', key: 'name', align: 'center' }
{ title: '申请类型', dataIndex: 'askType', key: 'askType', align: 'center' },
{ title: '产品名称', dataIndex: 'productName', key: 'productName', align: 'center' },
{ title: '产品编号', dataIndex: 'productNum', key: 'productNum', align: 'center' },
{ title: '申请数量', dataIndex: 'applyNum', key: 'applyNum', align: 'center' },
{ title: '申请时间', dataIndex: 'createTime', key: 'createTime', align: 'center' },
{
title: '申请结果', key: 'name', align: 'center',
render: (a: any, b: any, c: any) => {
return <span></span>
}
},
// { title: '载体型号', dataIndex: 'carrierModel', key: 'carrierModel', align: 'center' }
]
const formItemSty = { width: '32%', marginBottom: 20 };
useEffect(() => {
getList();
}, [pageNumber]);
// 获取密钥体列表
const getList = () => {
secretAskList({ pageNumber, pageSize }).then((res) => {
if (res?.result == "success") {
setTotal(res.data[0].total)
setTableData(res.data[0].list)
} else {
message.error(res?.errorMsg);
}
})
}
const onFinish = (values: any) => {
console.log('表单提交:', values);
addSecretAsk(values).then((res) => {
if (res?.result == "success") {
message.success('申请成功')
pageNumber == 1 ? getList() : setPageNumber(1);
form.setFieldsValue({
applyNewOld: '申请新密钥体',
})
} else {
message.error(res?.errorMsg);
}
})
};
const pageOnChange = (pageNumber: number) => {
setPageNumber(pageNumber);
}
const onShowSizeChange = (current: any, pageSize: any) => {
setpageSize(pageSize);
getList();
}
return (
<div className={`${styles.params_warp}`}>
<TabsComp
@ -42,33 +120,45 @@ export default function Page() {
onChange={(e) => setActiveTab(e)} />
<Form form={form} layout={'inline'} onFinish={onFinish} className='mt20'>
<Form.Item name="33" label="" style={{ width: '100%', marginBottom: 20 }}>
<Form.Item name="applyNewOld" label="" style={{ width: '100%', marginBottom: 20 }}>
<Radio.Group>
<Radio value="1"> </Radio>
<Radio value="2"> </Radio>
<Radio value={'申请新密钥体'}> </Radio>
<Radio value={'申请旧密钥体'}> </Radio>
</Radio.Group>
</Form.Item>
<Form.Item name="aaa" label="密钥种类" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
{/* 密钥种类字段未知 未对接字段 */}
{/* <Form.Item name="keyType" label="" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[
{ label: '1管理密销', value: 1 },
{ label: '2用户密钥', value: 2 },
{ label: '3用户密钥', value: 3 }
]} />
</Form.Item> */}
<Form.Item name="productName" label="产品名称" style={formItemSty} rules={[
{ required: true, message: '请选择产品名称' }
]}>
<Select style={{ width: 260 }} placeholder={'请选择'} onChange={(e) => { }} options={selectData.productName} />
</Form.Item>
<Form.Item name="aaa" label="产品名称" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<Form.Item name="productNum" label="产品编号" style={formItemSty} rules={[
{ required: true, message: '请选择产品编号' }
]}>
<Input style={{ width: 260 }} placeholder={'请输入'} />
</Form.Item>
<Form.Item name="aaa" label="产品编号" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
</Form.Item>
<Form.Item name="aaa" label="申请类型" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
</Form.Item>
<Form.Item name="aaa" label="申请数量" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<Form.Item name="askType" label="申请类型" style={formItemSty} rules={[
{ required: true, message: '请选择申请类型' }
]}>
<Select style={{ width: 260 }} placeholder={'请选择'} onChange={(e) => { }} options={selectData.publisherType} />
</Form.Item>
<div className='flex_aiC'>
<Form.Item name="applyNum" label="申请数量" style={{ marginBottom: 30 }} rules={[
{ required: true, message: '请输入申请数量' }
]}>
<Input style={{ width: 260 }} placeholder={'请输入'} type='number' min={1} />
</Form.Item>
<ButtonComp style={{ marginBottom: 30 }} text={'申请密钥体'} onClick={() => form.submit()} />
</div>
</Form>
<div className='flex_jE' style={{ marginBottom: 30 }}>
<ButtonComp text={'申请密钥体'} onClick={() => form.submit()} />
</div>
<div className='mb20'></div>
<Table
scroll={tableData.length > 0 ? { y: 41 * 9 } : {}}
@ -80,6 +170,17 @@ export default function Page() {
rowClassName={rowClassName}
/>
{total > 0 && <div className='flex_aiC_jB mt20'>
<div> {total} </div>
<Pagination
current={pageNumber}
pageSize={pageSize}
total={total}
showQuickJumper
onChange={pageOnChange}
onShowSizeChange={onShowSizeChange}
/>
</div>}
</div>
);
}

@ -1,32 +1,55 @@
import ContentWarp from '@/components/ContentWarp';
import styles from '../../../GLQ/index.less';
import { Form, Input, Select } from 'antd';
import { Form, Input, Select, Upload, UploadProps } from 'antd';
import ButtonComp from '@/components/ButtonComp';
import { useEffect } from 'react';
export default function Page() {
const [form] = Form.useForm();
const formItemSty = { width: 'auto', marginBottom: 20, marginRight: 30 };
const formItemSty = { width: '31%', marginBottom: 20 };
useEffect(() => {
form.setFieldsValue({
carrierType: 1,
carrierModel: 1,
filePath: '',
})
}, [])
const onFinish = (values: any) => {
console.log('表单提交:', values);
};
const props: UploadProps = {
maxCount: 1,
beforeUpload: (file: any) => {
console.log('file',file);
}
};
return (
<div className={styles.params_warp}>
<ContentWarp text={'明文密钥体载体包封'}>
<ContentWarp text={'管理协议加密的密文密钥体载体包封'}>
<div className='pd20' style={{ paddingBottom: 30 }}>
<Form form={form} layout={'inline'} onFinish={onFinish} className='mt20'>
<Form.Item name="aaa" label="载体类型" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<Form.Item name="carrierType" label="载体类型" style={formItemSty} rules={[{ required: true, message: '请选择载体类型' }]}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[
{ label: '软盘', value: 1 },
{ label: '移动盘', value: 2 },
{ label: '光盘', value: 3 },
]} />
</Form.Item>
<Form.Item name="aaa" label="载体型号" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<Form.Item name="carrierModel" label="载体型号" style={formItemSty} rules={[{ required: true, message: '请选择载体型号' }]}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[
{ label: '三寸', value: 1 }
]} />
</Form.Item>
<Form.Item name="sss" label="文件路径" style={{ width: '80%', marginBottom: 20 }}>
<Form.Item name="filePath" label="文件路径" style={{ width: '80%', marginBottom: 20 }} rules={[{ required: true, message: '请选择文件路径' }]}>
<div style={{ display: 'flex' }}>
<Input style={{ width: 500 }} />
<ButtonComp style={{ marginLeft: 20 }} type={'cancel'} text={'选择'} onClick={() => { }} />
<Input style={{ width: 480 }} disabled={true}/>
<Upload {...props} showUploadList={false}>
<ButtonComp style={{ marginLeft: 20 }} type={'cancel'} text={'选择'} onClick={() => { }} />
</Upload>
</div>
</Form.Item>
</Form>
@ -39,18 +62,18 @@ export default function Page() {
<div className='pd20'>
<div className='flex_aiC'>
<div style={{ marginRight: 30 }}></div>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<Input style={{ width: 260 }} disabled={true} />
<div className='ml20' style={{ marginRight: 30 }}></div>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<Input style={{ width: 260 }} disabled={true} />
</div>
<div className='flex_aiC mt20'>
<div className='mr16' ></div>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<Input style={{ width: 260 }} disabled={true} />
<div className='mr16 ml20' ></div>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<Input style={{ width: 260 }} disabled={true} />
</div>
</div>
</ContentWarp>

@ -1,14 +1,34 @@
import TabsComp from '@/components/TabsComp';
import styles from '../../../GLQ/index.less';
import { useState } from 'react';
import { ConfigProvider, Table } from 'antd';
import { useEffect, useState } from 'react';
import { ConfigProvider, Pagination, Table, message } from 'antd';
import { rowClassName } from '@/utils';
import ButtonComp from '@/components/ButtonComp';
import { secretList } from '@/services/my';
export default function Page() {
const [activeTab, setActiveTab] = useState(1)
const [tableData, setTableData] = useState([]);
const [pageNumber, setPageNumber] = useState(1);
const [pageSize, setpageSize] = useState(10);
const [total, setTotal] = useState(0);
useEffect(() => {
getList();
}, [pageNumber]);
// 获取密钥体列表
const getList = () => {
secretList({ pageNumber, pageSize, isClean: 1 }).then((res) => {
if (res?.result == "success") {
setTotal(res.data[0].total)
setTableData(res.data[0].list)
} else {
message.error(res?.errorMsg);
}
})
}
const columns: any = [
{
@ -17,17 +37,26 @@ export default function Page() {
return <span>{c + 1}</span>;
},
},
{ 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: '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: 'productName', key: 'productName', align: 'center' },
{ title: '产品编号', dataIndex: 'productNum', key: 'productNum', align: 'center' },
{ 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: 'createTime', key: 'createTime', align: 'center' },
{ title: '当前状态', dataIndex: 'currentStatus', key: 'currentStatus', align: 'center' },
{ title: '导入时间', dataIndex: 'importTime', key: 'importTime', align: 'center' }
]
const pageOnChange = (pageNumber: number) => {
setPageNumber(pageNumber);
}
const onShowSizeChange = (current: any, pageSize: any) => {
setpageSize(pageSize);
getList();
}
return (
<div className={`${styles.params_warp}`}>
<TabsComp
@ -36,7 +65,9 @@ export default function Page() {
onChange={(e) => setActiveTab(e)} />
<div className='flex_jE mb20'>
<ButtonComp type={'cancel'} text={'刷新'} onClick={() => { }} />
<ButtonComp type={'cancel'} text={'刷新'} onClick={() => {
pageNumber == 1 ? getList() : setPageNumber(1);
}} />
</div>
<Table
@ -49,6 +80,17 @@ export default function Page() {
rowClassName={rowClassName}
/>
{total > 0 && <div className='flex_aiC_jB mt20'>
<div> {total} </div>
<Pagination
current={pageNumber}
pageSize={pageSize}
total={total}
showQuickJumper
onChange={pageOnChange}
onShowSizeChange={onShowSizeChange}
/>
</div>}
</div>
);
}

@ -12,8 +12,8 @@ export default function Page() {
const columns: any = [
{ title: '配发类型', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '产品名称', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '产品编号', 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' }
@ -23,7 +23,7 @@ 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: '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' },
{ title: '备注', dataIndex: 'name', key: 'name', align: 'center' }

@ -1,100 +1,293 @@
import TabsComp from '@/components/TabsComp';
import styles from '../../../GLQ/index.less';
import { useState } from 'react';
import { ConfigProvider, DatePicker, Form, Input, Select, Table } from 'antd';
import { useEffect, useState } from 'react';
import { ConfigProvider, DatePicker, Form, Input, Pagination, Select, Table, message } from 'antd';
import { rowClassName } from '@/utils';
import ButtonComp from '@/components/ButtonComp';
import { mailIssueList, secretFormatList, secretList, secretUpdateStatus } from '@/services/my';
export default function Page() {
const [activeTab, setActiveTab] = useState(1)
const [tableData, setTableData] = useState([]);
const [pageNumber, setPageNumber] = useState(1);
const [pageSize, setpageSize] = useState(10);
const [total, setTotal] = useState(0);
const [form] = Form.useForm();
const [selectData, setSelectData] = useState<any>({
productName: [],
publisherType: []
});
const [tableData1, setTableData1] = useState([]);
const [pageNumber1, setPageNumber1] = useState(1);
const [pageSize1, setpageSize1] = useState(10);
const [total1, setTotal1] = useState(0);
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
const formItemSty = { width: '31%', marginBottom: 20, marginRight: 30 };
const columns: any = [
{
title: '序号', key: 'index', align: 'center', width: 100,
render: (a: any, b: any, c: any) => {
return <span>{c + 1}</span>;
return <span>{(pageNumber - 1) * pageSize + c + 1}</span>;
},
},
{ title: '产品名称', dataIndex: 'productName', key: 'productName', align: 'center' },
{ title: '产品编号', dataIndex: 'productNum', key: 'productNum', align: 'center' },
{ title: '载体类型', dataIndex: 'carrierType', key: 'carrierType', align: 'center' },
{ title: '载体型号', dataIndex: 'applyModel', key: 'applyModel', align: 'center' },
{ title: '数量', dataIndex: 'number', key: 'number', align: 'center' },
{ title: '当前状态', dataIndex: 'currentStatus', key: 'currentStatus', align: 'center' },
{ title: '导入时间', dataIndex: 'importTime', key: 'importTime', align: 'center' },
]
const columns1: any = [
{
title: '序号', key: 'index', align: 'center', width: 100,
render: (a: any, b: any, c: any) => {
return <span>{(pageNumber1 - 1) * pageSize1 + c + 1}</span>;
},
},
{ 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: '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: '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: 'keyDistPlatformName', key: 'keyDistPlatformName', align: 'center' },
{ title: '密钥分发平台实体标识', dataIndex: 'keyDistPlatformEntity', key: 'keyDistPlatformEntity', align: 'center' },
{ title: '产品名称', dataIndex: 'productName', key: 'productName', align: 'center' },
{ title: '产品编号', dataIndex: 'productCode', key: 'productCode', align: 'center' },
{ title: '载体类型', dataIndex: 'carrierType', key: 'carrierType', align: 'center' },
{ title: '载体型号', dataIndex: 'applyModel', key: 'applyModel', align: 'center' },
{ title: '总数量', dataIndex: 'total', key: 'total', align: 'center' },
{ title: '已下载数量', dataIndex: 'downloadNum', key: 'downloadNum', align: 'center' },
{ title: '授权', dataIndex: 'empower', key: 'empower', align: 'center' },
{ title: '优先级', dataIndex: 'priority', key: 'priority', align: 'center' },
{ title: '结束时间', dataIndex: 'overTime', key: 'overTime', align: 'center' },
{ title: '通知标志', dataIndex: 'notificationFlag', key: 'notificationFlag', align: 'center' },
{ title: '删除标志', dataIndex: 'deleteFlag', key: 'deleteFlag', align: 'center' }
]
const formItemSty = { width: '32%', marginBottom: 20 };
useEffect(() => {
form.setFieldsValue({
productName: '',
carrierType: '',
carrierNumber: '',
orderDirection: '',
})
getSelect()
}, [])
// 获取下拉框数据
const getSelect = () => {
secretFormatList({}).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);
}
})
}
const onFinish = (values: any) => {
console.log('表单提交:', values);
useEffect(() => {
getList();
}, [pageNumber]);
useEffect(() => {
getList1();
}, [pageNumber1]);
// 获取密钥体列表
const getList = () => {
let data = form.getFieldsValue()
let params = {
'secretImport.productName': data.productName,
'secretImport.productNum': data.productNum,
'secretImport.carrierType': data.carrierType,
'secretImport.carrierNumber': data.carrierNumber,
}
secretList({ pageNumber, pageSize, ...params }).then((res) => {
if (res?.result == "success") {
setTotal(res.data[0].total)
setTableData(res.data[0].list)
} else {
message.error(res?.errorMsg);
}
})
}
// 获取密钥体邮箱任务列表
const getList1 = () => {
mailIssueList({ pageNumber: pageNumber1, pageSize: pageSize1 }).then((res) => {
if (res?.result == "success") {
setTotal1(res.data[0].total)
setTableData1(res.data[0].list)
} else {
message.error(res?.errorMsg);
}
})
}
const pageOnChange = (pageNumber: number) => {
setPageNumber(pageNumber);
}
const onShowSizeChange = (current: any, pageSize: any) => {
setpageSize(pageSize);
getList();
}
const onFinish = () => {
pageNumber == 1 ? getList() : setPageNumber(1);
};
const sending = (type: number) => {
if (selectedRowKeys.length == 0) {
message.info('请勾选数据');
return
}
let promises = selectedRowKeys.map(item => {
return secretUpdateStatus({ id: item, type }).then((res) => {
if (res?.result === "success") {
return 1;
} else {
message.error(res?.errorMsg);
return 0;
}
});
});
Promise.all(promises).then(results => {
let recordCount = results.reduce((acc: any, val) => acc + val, 0);
if (recordCount === selectedRowKeys.length) {
message.success('配发成功');
pageNumber1 == 1 ? getList1() : setPageNumber1(1);
setSelectedRowKeys([]);
}
});
}
return (
<div className={`${styles.params_warp}`}>
<TabsComp
dataSource={[{ id: 1, name: '密钥体导入' }]}
dataSource={[{ id: 1, name: '向邮箱配发密钥体' }]}
activeTab={activeTab}
onChange={(e) => setActiveTab(e)} />
<Form form={form} layout={'inline'} onFinish={onFinish} className='mt20'>
<Form.Item name="aaa" label="产品名称" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<Form.Item name="productName" label="产品名称" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={selectData.productName} />
</Form.Item>
<Form.Item name="aaa" label="载体类型" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<Form.Item name="carrierType" label="载体类型" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={selectData.carrierType} />
</Form.Item>
<Form.Item name="aaa" label="可下载数量" style={formItemSty}>
{/* <Form.Item name="aaa" label="" style={formItemSty}>
<Input style={{ width: 260 }} />
</Form.Item> */}
<Form.Item name="productNum" label="产品编号" style={formItemSty}>
<Input style={{ width: 260 }} />
</Form.Item>
<Form.Item name="aaa" label="产品编号" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
</Form.Item>
<Form.Item name="aaa" label="载体型号" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
</Form.Item>
<Form.Item name="aaa" label="&nbsp;&nbsp;&nbsp;&nbsp;下载授权" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<div className='flex_aiC'>
<Form.Item name="carrierNumber" label="载体型号" style={{ marginBottom: 30 }}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={selectData.carrierNumber} />
</Form.Item>
<ButtonComp style={{ marginBottom: 30 }} text={'查询'} onClick={() => form.submit()} />
</div>
{/* <Form.Item name="aaa" label="&nbsp;&nbsp;&nbsp;&nbsp;" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[
{ label: '已授权', value: '已授权' },
{ label: '未授权', value: '未授权' }
]} />
</Form.Item>
<Form.Item name="aaa" label="目的系统" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<Form.Item name="systemName" label="目的系统" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[]} />
</Form.Item>
<Form.Item name="aaa" label="配发数量" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<Form.Item name="quantity" label="配发数量" style={formItemSty}>
<Input style={{ width: 260 }} type='number' min={0} />
</Form.Item>
<Form.Item name="aaa" label="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;优先级" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<Select style={{ width: 260 }} onChange={(e) => { }} options={[
{ label: '普通', value: '普通' },
{ label: '特急', value: '特急' },
{ label: '紧急', value: '紧急' }
]} />
</Form.Item>
<Form.Item name="aaa" label="结束时间" style={formItemSty}>
<DatePicker style={{ width: 260 }} />
</Form.Item>
</Form.Item> */}
</Form>
<div className='mb20 flex_aiC_jB'>
<div></div>
<ButtonComp type={'cancel'} text={'配发'} onClick={() => { }} />
<div></div>
<ButtonComp type={'cancel'} text={'配发'} onClick={() => sending(2)} />
</div>
<Table
scroll={tableData.length > 0 ? { y: 41 * 9 } : {}}
scroll={{ x: 800, y: 41 * 11 }}
pagination={false}
bordered
columns={columns}
dataSource={tableData}
rowKey={(record: any) => record?.id}
rowClassName={rowClassName}
rowSelection={{
selectedRowKeys,
onChange: (selectedKeys: any) => {
setSelectedRowKeys(selectedKeys);
}
}}
/>
{total > 0 && <div className='flex_aiC_jB mt20'>
<div> {total} </div>
<Pagination
current={pageNumber}
pageSize={pageSize}
total={total}
showQuickJumper
onChange={pageOnChange}
onShowSizeChange={onShowSizeChange}
/>
</div>}
<div className='mt30 mb20 flex_aiC_jB'>
<div></div>
</div>
<Table
scroll={{ x: 800, y: 41 * 11 }}
pagination={false}
bordered
columns={columns1}
dataSource={tableData1}
rowKey={(record: any) => record?.id}
rowClassName={rowClassName}
/>
{total1 > 0 && <div className='flex_aiC_jB mt20'>
<div> {total1} </div>
<Pagination
current={pageNumber1}
pageSize={pageSize1}
total={total1}
showQuickJumper
onChange={(pageNumber: number) => {
setPageNumber1(pageNumber);
}}
onShowSizeChange={(current: any, pageSize: any) => {
setpageSize1(pageSize);
getList1();
}}
/>
</div>}
</div>
);
}

@ -1,28 +1,73 @@
import TabsComp from '@/components/TabsComp';
import styles from '../../../GLQ/index.less';
import { useState } from 'react';
import { ConfigProvider, Table } from 'antd';
import { useEffect, useState } from 'react';
import { ConfigProvider, Pagination, Table, Upload, UploadProps, message } from 'antd';
import { rowClassName } from '@/utils';
import ButtonComp from '@/components/ButtonComp';
import { secretFormatImport, secretFormatList } from '@/services/my';
export default function Page() {
const [activeTab, setActiveTab] = useState(1)
const [tableData, setTableData] = useState([]);
const [pageNumber, setPageNumber] = useState(1);
const [pageSize, setpageSize] = useState(10);
const [total, setTotal] = useState(0);
const columns: any = [
{
title: '序号', key: 'index', align: 'center', width: 100,
render: (a: any, b: any, c: any) => {
return <span>{c + 1}</span>;
return <span>{(pageNumber - 1) * pageSize + c + 1}</span>;
},
},
{ 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: 'productName', key: 'productName', align: 'center' },
{ title: '载体类型', dataIndex: 'carrierType', key: 'carrierType', align: 'center' },
{ title: '载体型号', dataIndex: 'carrierNumber', key: 'carrierNumber', align: 'center' },
{ title: '管理文件名', dataIndex: 'managerFilename', key: 'managerFilename', align: 'center' }
]
useEffect(() => {
getList();
}, [pageNumber]);
// 获取密钥体格式列表
const getList = () => {
secretFormatList({ pageNumber, pageSize }).then((res) => {
if (res?.result == "success") {
setTotal(res.data[0].total)
setTableData(res.data[0].list)
} else {
message.error(res?.errorMsg);
}
})
}
const pageOnChange = (pageNumber: number) => {
setPageNumber(pageNumber);
}
const onShowSizeChange = (current: any, pageSize: any) => {
setpageSize(pageSize);
getList();
}
const props: UploadProps = {
maxCount: 1,
beforeUpload: (file: any) => {
const formData = new FormData();
formData.append('file', file);
secretFormatImport(formData).then((res) => {
if (res?.result == "success") {
message.success('导入成功');
getList()
} else {
message.error(res?.errorMsg);
}
})
}
};
return (
<div className={`${styles.params_warp}`}>
<TabsComp
@ -33,7 +78,9 @@ export default function Page() {
<div className='mb20 flex_aiC_jB'>
<div></div>
<div style={{ display: 'flex' }}>
<ButtonComp style={{ marginRight: 20 }} type={'cancel'} text={'密钥体格式导入'} onClick={() => { }} />
<Upload {...props} showUploadList={false}>
<ButtonComp style={{ marginRight: 20 }} text={'密钥体格式导入'} />
</Upload>
<ButtonComp type={'delete'} text={'删除'} onClick={() => { }} />
</div>
</div>
@ -47,6 +94,18 @@ export default function Page() {
rowKey={(record: any) => record?.id}
rowClassName={rowClassName}
/>
{total > 0 && <div className='flex_aiC_jB mt20'>
<div> {total} </div>
<Pagination
current={pageNumber}
pageSize={pageSize}
total={total}
showQuickJumper
onChange={pageOnChange}
onShowSizeChange={onShowSizeChange}
/>
</div>}
</div>
);
}

@ -1,16 +1,90 @@
import TabsComp from '@/components/TabsComp';
import styles from '../../../GLQ/index.less';
import { useState } from 'react';
import { ConfigProvider, Form, Select, Table } from 'antd';
import { useEffect, useState } from 'react';
import { ConfigProvider, Form, Pagination, Select, Table, message } from 'antd';
import { rowClassName } from '@/utils';
import ButtonComp from '@/components/ButtonComp';
import { secretFormatList, secretPublisher } from '@/services/my';
export default function Page() {
const [activeTab, setActiveTab] = useState(1)
const [tableData, setTableData] = useState([]);
const [form] = Form.useForm();
const [pageNumber, setPageNumber] = useState(1);
const [pageSize, setpageSize] = useState(10);
const [total, setTotal] = useState(0);
const [selectData, setSelectData] = useState<any>({
productName: [],
carrierType: [],
carrierNumber: [],
publisherType: []
});
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
const [allRowKeys, setAllRowKeys] = useState([]);
const formItemSty = { width: 'auto', marginBottom: 20, marginRight: 30 };
useEffect(() => {
initForm()
getSelect()
}, [])
const initForm = () => {
form.setFieldsValue({
productName: '',
carrierType: '',
carrierNumber: '',
publisherType: ''
})
}
// 获取下拉框数据
const getSelect = () => {
secretFormatList({}).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 } });
let publisherType = list.map((item: any) => { return { label: item.publisherType, value: item.publisherType } });
setSelectData({
productName: [{ label: '全部', value: '' }, ...productName],
carrierType: [{ label: '全部', value: '' }, ...carrierType],
carrierNumber: [{ label: '全部', value: '' }, ...carrierNumber],
publisherType: [{ label: '全部', value: '' }, ...publisherType]
})
} else {
message.error(res?.errorMsg);
}
})
}
useEffect(() => {
getList();
}, [pageNumber]);
// 获取密钥体格式列表
const getList = () => {
let data = form.getFieldsValue()
let params = {
'secretFormat.productName': data.productName,
'secretFormat.carrierType': data.carrierType,
'secretFormat.carrierNumber': data.carrierNumber,
'secretFormat.publisherType': data.publisherType
}
secretFormatList({ pageNumber, pageSize, ...params }).then((res) => {
if (res?.result == "success") {
setTotal(res.data[0].total)
setTableData(res.data[0].list)
const keys = res.data[0].list.map((item: any) => item?.id);
setAllRowKeys(keys);
} else {
message.error(res?.errorMsg);
}
})
}
const columns: any = [
{
@ -19,21 +93,57 @@ export default function Page() {
return <span>{c + 1}</span>;
},
},
{ 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: 'name', key: 'name', align: 'center' },
{ title: '载体型号', dataIndex: 'name', key: 'name', align: 'center' }
{ title: '管理系统名称', dataIndex: 'systemName', key: 'systemName', align: 'center' },
{ title: '管理系统实体标识', dataIndex: 'shstemId', key: 'shstemId', align: 'center' },
{ title: '产品名称', dataIndex: 'productName', key: 'productName', align: 'center' },
{ title: '发布状态', dataIndex: 'currentStatus', key: 'currentStatus', align: 'center' },
{ title: '当前状态', dataIndex: 'currentStatus', key: 'currentStatus', align: 'center' },
{ title: '载体类型', dataIndex: 'carrierType', key: 'carrierType', align: 'center' },
{ title: '载体型号', dataIndex: 'carrierNumber', key: 'carrierNumber', align: 'center' }
]
const formItemSty = { width: '32%', marginBottom: 20 };
const onFinish = (values: any) => {
console.log('表单提交:', values);
const onFinish = () => {
pageNumber == 1 ? getList() : setPageNumber(1);
};
const pageOnChange = (pageNumber: number) => {
setPageNumber(pageNumber);
}
const onShowSizeChange = (current: any, pageSize: any) => {
setpageSize(pageSize);
getList();
}
const sending = () => {
if (selectedRowKeys.length == 0) {
message.info('请勾选需要发布的数据');
return
}
let promises = selectedRowKeys.map(item => {
return secretPublisher({ id: item }).then((res) => {
if (res?.result === "success") {
return 1;
} else {
message.error(res?.errorMsg);
return 0;
}
});
});
Promise.all(promises).then(results => {
let recordCount = results.reduce((acc: any, val) => acc + val, 0);
if (recordCount === selectedRowKeys.length) {
message.success('发布成功');
initForm();
onFinish();
setSelectedRowKeys([]);
}
});
}
return (
<div className={`${styles.params_warp}`}>
<TabsComp
@ -42,31 +152,31 @@ export default function Page() {
onChange={(e) => setActiveTab(e)} />
<Form form={form} layout={'inline'} onFinish={onFinish} className='mt20'>
<Form.Item name="aaa" label="产品名称" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<Form.Item name="productName" label="产品名称" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={selectData.productName} />
</Form.Item>
<Form.Item name="aaa" label="载体类型" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<Form.Item name="carrierType" label="载体类型" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={selectData.carrierType} />
</Form.Item>
<Form.Item name="aaa" label="载体型号" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<Form.Item name="carrierNumber" label="载体型号" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={selectData.carrierNumber} />
</Form.Item>
<Form.Item name="aaa" label="发布方式" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
</Form.Item>
<Form.Item name="aaa" label="目的系统" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<Form.Item name="publisherType" label="发布方式" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={selectData.publisherType} />
</Form.Item>
{/* <Form.Item name="aaa" label="" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[]} />
</Form.Item> */}
</Form>
<div className='flex_jE' style={{ marginBottom: 30 }}>
<ButtonComp style={{ marginRight: 20 }} type={'cancel'} text={'发布'} onClick={() => { }} />
<ButtonComp style={{ marginRight: 20 }} type={'cancel'} text={'发布'} onClick={() => sending()} />
<ButtonComp text={'查询'} onClick={() => form.submit()} />
</div>
<div className='mb20 flex_aiC_jB'>
<div></div>
<ButtonComp type={'cancel'} text={'全部'} onClick={() => { }} />
<ButtonComp type={'cancel'} text={'全部'} onClick={() => setSelectedRowKeys(allRowKeys)} />
</div>
<Table
@ -77,7 +187,25 @@ export default function Page() {
dataSource={tableData}
rowKey={(record: any) => record?.id}
rowClassName={rowClassName}
rowSelection={{
selectedRowKeys,
onChange: (selectedKeys: any) => {
setSelectedRowKeys(selectedKeys);
}
}}
/>
{total > 0 && <div className='flex_aiC_jB mt20'>
<div> {total} </div>
<Pagination
current={pageNumber}
pageSize={pageSize}
total={total}
showQuickJumper
onChange={pageOnChange}
onShowSizeChange={onShowSizeChange}
/>
</div>}
</div>
);
}

@ -1,41 +1,159 @@
import TabsComp from '@/components/TabsComp';
import styles from '../../../GLQ/index.less';
import { useState } from 'react';
import { Button, ConfigProvider, Form, Input, Modal, Select, Table } from 'antd';
import { useEffect, useState } from 'react';
import { Button, ConfigProvider, Form, Input, Modal, Pagination, Select, Table, Upload, UploadProps, message } from 'antd';
import { rowClassName } from '@/utils';
import ButtonComp from '@/components/ButtonComp';
import { secretBodyImport, secretFormatList, secretList, secretUpdateSecret } from '@/services/my';
export default function Page() {
const [activeTab, setActiveTab] = useState(1)
const [activeTab, setActiveTab] = useState(1);
const [tableData, setTableData] = useState([]);
const [visibility, setVisibility] = useState(false);
const [pageNumber, setPageNumber] = useState(1);
const [pageSize, setpageSize] = useState(10);
const [total, setTotal] = useState(0);
const [fileInfo, setFileInfo] = useState(null);
const [productNumber, setProductNumber] = useState('');
const [speed, setSpeed] = useState(1);
const [selectData, setSelectData] = useState<any>({
productName: [],
carrierType: [],
carrierNumber: [],
publisherType: [],
orderDirection: []
});
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
const [allRowKeys, setAllRowKeys] = useState([]);
const [form] = Form.useForm();
const formItemSty = { width: 'auto', marginBottom: 20, marginRight: 30 };
const columns: any = [
{
title: '序号', key: 'index', align: 'center', width: 100,
render: (a: any, b: any, c: any) => {
return <span>{c + 1}</span>;
return <span>{(pageNumber - 1) * pageSize + c + 1}</span>;
},
},
{ 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: 'name', key: 'name', align: 'center' },
{ title: '当前状态', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '导入时间', dataIndex: 'name', key: 'name', align: 'center' }
{ title: '产品名称', dataIndex: 'productName', key: 'productName', align: 'center' },
{ title: '产品编号', dataIndex: 'productNum', key: 'productNum', align: 'center' },
{ 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: 'currentStatus', key: 'currentStatus', align: 'center' },
{ title: '导入时间', dataIndex: 'importTime', key: 'importTime', align: 'center' },
]
const formItemSty = { width: '32%', marginBottom: 20 };
useEffect(() => {
initForm()
getSelect()
}, [])
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);
}
})
}
useEffect(() => {
getList();
}, [pageNumber]);
// 获取密钥体列表
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) => {
if (res?.result == "success") {
setTotal(res.data[0].total)
setTableData(res.data[0].list)
const keys = res.data[0].list.map((item: any) => item?.id);
setAllRowKeys(keys);
} else {
message.error(res?.errorMsg);
}
})
}
const pageOnChange = (pageNumber: number) => {
setPageNumber(pageNumber);
}
const onShowSizeChange = (current: any, pageSize: any) => {
setpageSize(pageSize);
getList();
}
const onFinish = () => {
pageNumber == 1 ? getList() : setPageNumber(1);
};
const onFinish = (values: any) => {
console.log('表单提交:', values);
const props: UploadProps = {
maxCount: 1,
beforeUpload: (file: any) => {
setFileInfo(file);
}
};
const sending = (type: number) => {
if (selectedRowKeys.length == 0) {
message.info('请勾选数据');
return
}
let promises = selectedRowKeys.map(item => {
return secretUpdateSecret({ id: item, type }).then((res) => {
if (res?.result === "success") {
return 1;
} else {
message.error(res?.errorMsg);
return 0;
}
});
});
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) {
message.success(`${str[type]}`);
initForm();
onFinish();
setSelectedRowKeys([]);
}
});
}
return (
<div className={`${styles.params_warp}`}>
<TabsComp
@ -44,31 +162,45 @@ export default function Page() {
onChange={(e) => setActiveTab(e)} />
<Form form={form} layout={'inline'} onFinish={onFinish} className='mt20'>
<Form.Item name="aaa" label="密钥种类" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
</Form.Item>
<Form.Item name="aaa" label="产品名称" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
</Form.Item>
<Form.Item name="aaa" label="载体类型" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
{/* <Form.Item name="keyType" label="" style={formItemSty}>
<Select style={{ width: 260 }} 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 }} onChange={(e) => { }} options={selectData.productName} />
</Form.Item>
<Form.Item name="aaa" label="载体型号" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<Form.Item name="carrierType" label="载体类型" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={selectData.carrierType} />
</Form.Item>
<Form.Item name="aaa" label="产品名称" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<Form.Item name="carrierNumber" label="载体型号" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={selectData.carrierNumber} />
</Form.Item>
{/* <Form.Item name="orderDirection" label="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" style={formItemSty}>
<Select style={{ width: 260 }} 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={() => setVisibility(true)} />
<ButtonComp style={{ marginRight: 20 }} type={'cancel'} text={'导入'} onClick={() => {
setSpeed(1);
setFileInfo(null);
setProductNumber('');
setVisibility(true)
}} />
<ButtonComp text={'查询'} onClick={() => form.submit()} />
</div>
<div className='mb20 flex_aiC_jB'>
<div></div>
<ButtonComp type={'cancel'} text={'全部'} onClick={() => { }} />
<ButtonComp type={'cancel'} text={'全部'} onClick={() => setSelectedRowKeys(allRowKeys)} />
</div>
<Table
@ -79,33 +211,97 @@ export default function Page() {
dataSource={tableData}
rowKey={(record: any) => record?.id}
rowClassName={rowClassName}
rowSelection={{
selectedRowKeys,
onChange: (selectedKeys: any) => {
setSelectedRowKeys(selectedKeys);
}
}}
/>
{total > 0 && <div className='flex_aiC_jB mt20'>
<div> {total} </div>
<Pagination
current={pageNumber}
pageSize={pageSize}
total={total}
showQuickJumper
onChange={pageOnChange}
onShowSizeChange={onShowSizeChange}
/>
</div>}
<div className='flex_jE mt20'>
<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('建设中')}} />
</div>
<Modal
title="请确认或者输入产品编号"
open={visibility}
centered
width={500}
width={550}
onCancel={() => setVisibility(false)}
footer={null}>
<div>
<div className='mb20'>
1
<div> <Input style={{ width: 260 }} /></div>
</div>
<div className='mb20'>
2
<div>1</div>
<div className='flex_aiC'>
<Input style={{ width: 260 }} />
<ButtonComp style={{ marginLeft: 20 }} text={'选择'} onClick={() => { }} />
{
speed == 1 &&
<div className='mb20 mt10'>
<div>
<span style={{ marginRight: 4, color: 'red' }}>*</span>
<Input style={{ width: 300, marginLeft: 16 }}
value={productNumber}
onChange={(e) => setProductNumber(e.target.value)}
/>
</div>
</div>
}
{
speed == 2 &&
<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={'选择'} onClick={() => { }} />
</Upload>
</div>
</div>
</div>
<div>3 </div>
<div>4 </div>
}
{speed == 3 && <div></div>}
{speed == 4 && <div></div>}
</div>
<div className='flex_jE mt20'>
<ButtonComp style={{ marginRight: 20 }} text={'确定'} onClick={() => { }} />
<ButtonComp style={{ marginRight: 20 }} text={'确定'} onClick={() => {
switch (speed) {
case 1:
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);
}
})
break;
case 3:
setSpeed(4)
break;
case 4:
onFinish()
setVisibility(false)
break;
}
}} />
<ButtonComp type='cancel' text={'取消'} onClick={() => setVisibility(false)} />
</div>
</Modal>

@ -1,45 +1,74 @@
import ContentWarp from '@/components/ContentWarp';
import styles from '../../../GLQ/index.less';
import { Form, Input, Select } from 'antd';
import { Form, Input, Select, Upload, UploadProps } from 'antd';
import ButtonComp from '@/components/ButtonComp';
import { useEffect } from 'react';
export default function Page() {
const [form] = Form.useForm();
const formItemSty = { width: 'auto', marginBottom: 20, marginRight: 30 };
const formItemSty = { width: '31%', marginBottom: 20 };
const typeList = [
{ label: '软盘', value: 1 },
{ label: '移动盘', value: 2 },
{ label: 'IC卡', value: 3 },
{ label: '光盘', value: 4 },
{ label: '芯片', value: 5 },
{ label: '密钥枪', value: 6 },
{ label: 'iButton', value: 7 },
{ label: '密码注入器', value: 8 }
]
useEffect(() => {
form.setFieldsValue(() => {
})
}, [])
const onFinish = (values: any) => {
console.log('表单提交:', values);
};
const props: UploadProps = {
maxCount: 1,
beforeUpload: (file: any) => {
console.log('file', file);
}
};
return (
<div className={styles.params_warp}>
<ContentWarp text={'明文密钥体载体包封'}>
<div className='pd20 pb100'>
<Form form={form} layout={'inline'} onFinish={onFinish} className='mt20'>
<Form.Item name="aaa" label="产品名称" style={formItemSty}>
<Form.Item name="aaa" label="产品名称" style={formItemSty} rules={[{ required: true, message: '请输入产品名称' }]}>
<Input style={{ width: 260 }} />
</Form.Item>
<Form.Item name="aaa" label="产品编号" style={formItemSty}>
<Form.Item name="aaa" label="产品编号" style={formItemSty} rules={[{ required: true, message: '请输入产品编号' }]}>
<Input style={{ width: 260 }} />
</Form.Item>
<Form.Item name="aaa" label="载体编号" style={formItemSty}>
<Form.Item name="aaa" label="载体编号" style={formItemSty} rules={[{ required: true, message: '请选输入载体编号' }]}>
<Input style={{ width: 260 }} />
</Form.Item>
<Form.Item name="aaa" label="载体类型" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<Form.Item name="aaa" label="载体类型" style={formItemSty} rules={[{ required: true, message: '请选择载体类型' }]}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={typeList} />
</Form.Item>
<Form.Item name="aaa" label="载体型号" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<Form.Item name="aaa" label="载体型号" style={formItemSty} rules={[{ required: true, message: '请选择载体型号' }]}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '三寸', value: 1 }]} />
</Form.Item>
<Form.Item name="sss" label="文件路径" style={{ width: '80%', marginBottom: 20 }}>
<Form.Item name="filePath" label="文件路径" style={{ width: '80%', marginBottom: 20 }} rules={[{ required: true, message: '请选择文件路径' }]}>
<div style={{ display: 'flex' }}>
<Input style={{ width: 500 }} />
<ButtonComp style={{ marginLeft: 20 }} type={'cancel'} text={'选择'} onClick={() => { }} />
<Input style={{ width: 480 }} disabled={true} />
<Upload {...props} showUploadList={false}>
<ButtonComp style={{ marginLeft: 20 }} type={'cancel'} text={'选择'} onClick={() => { }} />
</Upload>
</div>
</Form.Item>
<Form.Item name="aaa" label="载体位置" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<Form.Item name="aaa" label="载体位置" style={formItemSty} rules={[{ required: true, message: '请选择载体位置' }]}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[
{ label: '1', value: 1 },
{ label: '2', value: 2 }
]} />
</Form.Item>
</Form>
<div className={styles.btn_warp}>

@ -11,11 +11,11 @@ export default function Page() {
const [tableData, setTableData] = useState([]);
const columns: any = [
{ title: '产品名称', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '产品编号', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '来源', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '产品名称', dataIndex: 'productName', key: 'productName', align: 'center' },
{ title: '产品编号', dataIndex: 'productNum', key: 'productNum', align: 'center' },
{ title: '来源', dataIndex: 'orderDirection', key: 'orderDirection', 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: 'name', key: 'name', align: 'center' },
{ title: '发来单位', dataIndex: 'name', key: 'name', align: 'center' }
]
@ -28,12 +28,12 @@ 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: 'name', key: 'name', align: 'center' },
{ title: '导入时间', dataIndex: 'importTime', key: 'importTime', align: 'center' },,
{ title: '备注', dataIndex: 'name', key: 'name', align: 'center' }
]
const [form] = Form.useForm();
const formItemSty = { width: '32%', marginBottom: 20 };
const formItemSty = { width: 'auto', marginBottom: 20, marginRight: 30 };
const onFinish = (values: any) => {
console.log('表单提交:', values);

@ -1,77 +1,213 @@
import TabsComp from '@/components/TabsComp';
import styles from '../../../GLQ/index.less';
import { useState } from 'react';
import { ConfigProvider, Form, Input, Select, Table } from 'antd';
import { useEffect, useState } from 'react';
import { ConfigProvider, Form, Input, Pagination, Select, Table, message } from 'antd';
import { rowClassName } from '@/utils';
import ButtonComp from '@/components/ButtonComp';
import { belowIssueList, secretFormatList, secretList, secretUpdateStatus } from '@/services/my';
export default function Page() {
const [activeTab, setActiveTab] = useState(1)
const [tableData, setTableData] = useState([]);
const [pageNumber, setPageNumber] = useState(1);
const [pageSize, setpageSize] = useState(10);
const [total, setTotal] = useState(0);
const [form] = Form.useForm();
const [tableData1, setTableData1] = useState([]);
const [pageNumber1, setPageNumber1] = useState(1);
const [pageSize1, setpageSize1] = useState(10);
const [total1, setTotal1] = useState(0);
const [selectData, setSelectData] = useState<any>({
productName: [],
productNum: [],
publisherType: []
});
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
const formItemSty = { width: 'auto', marginBottom: 20, marginRight: 30 };
const columns: any = [
{ 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: '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: '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: 'name', key: 'name', align: 'center' },
{ title: '申请编号', dataIndex: 'name', key: 'name', align: 'center' }
{
title: '序号', key: 'index', align: 'center', width: 100,
render: (a: any, b: any, c: any) => {
return <span>{(pageNumber - 1) * pageSize + c + 1}</span>;
},
},
{ title: '产品名称', dataIndex: 'productName', key: 'productName', align: 'center' },
{ title: '产品编号', dataIndex: 'productNum', key: 'productNum', align: 'center' },
{ title: '载体类型', dataIndex: 'carrierType', key: 'carrierType', align: 'center' },
{ title: '载体型号', dataIndex: 'applyModel', key: 'applyModel', align: 'center' },
{ title: '数量', dataIndex: 'number', key: 'number', align: 'center' },
{ title: '当前状态', dataIndex: 'currentStatus', key: 'currentStatus', align: 'center' },
{ title: '导入时间', dataIndex: 'importTime', key: 'importTime', align: 'center' },
]
const formItemSty = { width: '23%', marginBottom: 20 };
const columns1: any = [
{ title: '配发类型', dataIndex: 'issueStatus', key: 'name', align: 'center' },
{ title: '产品名称', dataIndex: 'productName', key: 'productName', align: 'center' },
{ title: '产品编号', dataIndex: 'productNum', key: 'productNum', align: 'center' },
{ title: '载体类型', dataIndex: 'carrierType', key: 'carrierType', align: 'center' },
{ title: '载体型号', dataIndex: 'applyModel', key: 'applyModel', align: 'center' },
{ title: '配发管理系统名称', dataIndex: 'distManagerName', key: 'distManagerName', align: 'center' },
{ title: '配发管理系统实体标识', dataIndex: 'distManagerIdentifer', key: 'distManagerIdentifer', align: 'center' },
{ title: '配发数量', dataIndex: 'issueNum', key: 'issueNum', align: 'center' },
{ title: '配发状态', dataIndex: 'issueStatus', key: 'issueStatus', align: 'center' },
{ title: '删除标志', dataIndex: 'delNotes', key: 'delNotes', align: 'center' },
{ title: '配发操作时间', dataIndex: 'subOperateTime', key: 'subOperateTime', align: 'center' },
{ title: '申请管理系统名称', dataIndex: 'applyManagerSysName', key: 'applyManagerSysName', align: 'center' },
{ title: '申请管理系统实体标识', dataIndex: 'applyManagerModelName', key: 'applyManagerModelName', align: 'center' },
{ title: '申请数量', dataIndex: 'quantity', key: 'quantity', align: 'center' },
{ title: '申请时间', dataIndex: 'quantityTime', key: 'quantityTime', align: 'center' },
{ title: '配发编号', dataIndex: 'distCode', key: 'distCode', align: 'center' },
{ title: '申请编号', dataIndex: 'applyCode', key: 'applyCode', align: 'center' }
]
useEffect(() => {
form.setFieldsValue({
productName: '',
carrierType: '',
carrierNumber: '',
orderDirection: '',
})
getSelect()
}, [])
// 获取下拉框数据
const getSelect = () => {
secretFormatList({}).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);
}
})
}
useEffect(() => {
getList();
}, [pageNumber]);
useEffect(() => {
getList1();
}, [pageNumber1]);
const onFinish = (values: any) => {
console.log('表单提交:', values);
// 获取密钥体列表
const getList = () => {
let data = form.getFieldsValue()
let params = {
'secretImport.productName': data.productName,
'secretImport.productNum': data.productNum,
'secretImport.carrierType': data.carrierType,
'secretImport.carrierNumber': data.carrierNumber,
}
secretList({ pageNumber, pageSize, ...params }).then((res) => {
if (res?.result == "success") {
setTotal(res.data[0].total)
setTableData(res.data[0].list)
} else {
message.error(res?.errorMsg);
}
})
}
// 获取向下级配发列表
const getList1 = () => {
belowIssueList({ pageNumber: pageNumber1, pageSize: pageSize1 }).then((res) => {
if (res?.result == "success") {
setTotal1(res.data[0].total)
setTableData1(res.data[0].list)
} else {
message.error(res?.errorMsg);
}
})
}
const pageOnChange = (pageNumber: number) => {
setPageNumber(pageNumber);
}
const onShowSizeChange = (current: any, pageSize: any) => {
setpageSize(pageSize);
getList();
}
const onFinish = () => {
pageNumber == 1 ? getList() : setPageNumber(1);
};
const sending = (type: number) => {
if (selectedRowKeys.length == 0) {
message.info('请勾选数据');
return
}
let promises = selectedRowKeys.map(item => {
return secretUpdateStatus({ id: item, type }).then((res) => {
if (res?.result === "success") {
return 1;
} else {
message.error(res?.errorMsg);
return 0;
}
});
});
Promise.all(promises).then(results => {
let recordCount = results.reduce((acc: any, val) => acc + val, 0);
if (recordCount === selectedRowKeys.length) {
message.success('配发成功');
pageNumber1 == 1 ? getList1() : setPageNumber1(1);
setSelectedRowKeys([]);
}
});
}
return (
<div className={`${styles.params_warp}`}>
<TabsComp
dataSource={[{ id: 1, name: '密钥体导入' }]}
dataSource={[{ id: 1, name: '在线向下级管理系统配发密钥体' }]}
activeTab={activeTab}
onChange={(e) => setActiveTab(e)} />
<Form form={form} layout={'inline'} onFinish={onFinish} className='mt20'>
<Form.Item name="aaa" label="产品名称" style={formItemSty}>
<Select style={{ width: 180 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
</Form.Item>
<Form.Item name="aaa" label="产品编号" style={formItemSty}>
<Select style={{ width: 180 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<Form.Item name="productName" label="产品名称" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={selectData.productName} />
</Form.Item>
<Form.Item name="aaa" label="载体类型" style={formItemSty}>
<Select style={{ width: 180 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<Form.Item name="productNum" label="产品编号" style={formItemSty}>
<Input style={{ width: 260 }} placeholder={'请输入'} />
</Form.Item>
<Form.Item name="aaa" label="载体型号" style={formItemSty}>
<Select style={{ width: 180 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
</Form.Item>
<Form.Item name="aaa" label="目的系统" style={formItemSty}>
<Select style={{ width: 180 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
</Form.Item>
<Form.Item name="aaa" label="配发数量" style={formItemSty}>
<Input style={{ width: 180 }} />
</Form.Item>
<Form.Item name="aaa" label="申请编号" style={formItemSty}>
<Input style={{ width: 180 }} />
<Form.Item name="carrierType" label="载体类型" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={selectData.carrierType} />
</Form.Item>
<div className='flex_aiC'>
<Form.Item name="carrierNumber" label="载体型号" style={{ marginBottom: 30 }}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={selectData.carrierNumber} />
</Form.Item>
<ButtonComp style={{ marginBottom: 30 }} text={'查询'} onClick={() => form.submit()} />
</div>
{/* <div className='flex_aiC'>
<Form.Item name="number" label="申请编号" style={{ marginBottom: 30 }}>
<Input style={{ width: 260 }} placeholder={'请输入'} />
</Form.Item>
<ButtonComp style={{ marginBottom: 30 }} text={'查询'} onClick={() => form.submit()} />
</div> */}
</Form>
<div className='mb20 flex_aiC_jB'>
<div></div>
<ButtonComp type={'cancel'} text={'配发'} onClick={() => { }} />
<div></div>
<ButtonComp type={'cancel'} text={'配发'} onClick={() => sending(1)} />
</div>
<Table
@ -82,7 +218,56 @@ export default function Page() {
dataSource={tableData}
rowKey={(record: any) => record?.id}
rowClassName={rowClassName}
rowSelection={{
selectedRowKeys,
onChange: (selectedKeys: any) => {
setSelectedRowKeys(selectedKeys);
}
}}
/>
{total > 0 && <div className='flex_aiC_jB mt20'>
<div> {total} </div>
<Pagination
current={pageNumber}
pageSize={pageSize}
total={total}
showQuickJumper
onChange={pageOnChange}
onShowSizeChange={onShowSizeChange}
/>
</div>}
<div className='mt30 mb20 flex_aiC_jB'>
<div></div>
</div>
<Table
scroll={{ x: 800, y: 41 * 11 }}
pagination={false}
bordered
columns={columns1}
dataSource={tableData1}
rowKey={(record: any) => record?.id}
rowClassName={rowClassName}
/>
{total1 > 0 && <div className='flex_aiC_jB mt20'>
<div> {total1} </div>
<Pagination
current={pageNumber1}
pageSize={pageSize1}
total={total1}
showQuickJumper
onChange={(pageNumber: number) => {
setPageNumber1(pageNumber);
}}
onShowSizeChange={(current: any, pageSize: any) => {
setpageSize1(pageSize);
getList1();
}}
/>
</div>}
</div>
);
}

@ -1,37 +1,178 @@
import TabsComp from '@/components/TabsComp';
import styles from '../../../GLQ/index.less';
import { useState } from 'react';
import { ConfigProvider, Form, Input, Radio, Select, Table } from 'antd';
import { useEffect, useState } from 'react';
import { ConfigProvider, Form, Input, Pagination, Radio, Select, Table, message } from 'antd';
import { rowClassName } from '@/utils';
import ButtonComp from '@/components/ButtonComp';
import { privateIssueList, secretFormatList, secretList, secretUpdateStatus } from '@/services/my';
export default function Page() {
const [activeTab, setActiveTab] = useState(1)
const [tableData, setTableData] = useState([]);
const [pageNumber, setPageNumber] = useState(1);
const [pageSize, setpageSize] = useState(10);
const [total, setTotal] = useState(0);
const [form] = Form.useForm();
const [selectData, setSelectData] = useState<any>({
productName: [],
publisherType: []
});
const [tableData1, setTableData1] = useState([]);
const [pageNumber1, setPageNumber1] = useState(1);
const [pageSize1, setpageSize1] = useState(10);
const [total1, setTotal1] = useState(0);
const [tableData2, setTableData2] = useState([]);
const [pageNumber2, setPageNumber2] = useState(1);
const [pageSize2, setpageSize2] = useState(10);
const [total2, setTotal2] = useState(0);
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
const formItemSty = { width: 'auto', marginBottom: 20, marginRight: 30 };
const columns: any = [
{
title: '序号', key: 'index', align: 'center', width: 100,
render: (a: any, b: any, c: any) => {
return <span>{(pageNumber - 1) * pageSize + c + 1}</span>;
},
},
{ title: '产品名称', dataIndex: 'productName', key: 'productName', align: 'center' },
{ title: '产品编号', dataIndex: 'productNum', key: 'productNum', align: 'center' },
{ title: '载体类型', dataIndex: 'carrierType', key: 'carrierType', align: 'center' },
{ title: '载体型号', dataIndex: 'applyModel', key: 'applyModel', align: 'center' },
{ title: '数量', dataIndex: 'number', key: 'number', align: 'center' },
{ title: '当前状态', dataIndex: 'currentStatus', key: 'currentStatus', align: 'center' },
{ title: '导入时间', dataIndex: 'importTime', key: 'importTime', align: 'center' },
]
const columns1: any = [
{ title: '执勤区名称', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '执勤区标识', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '所属网络', dataIndex: 'name', key: 'name', align: 'center' },
{ title: 'IP地址', dataIndex: 'name', key: 'name', align: 'center' },
]
const columns1: any = [
const columns2: any = [
{
title: '序号', key: 'index', align: 'center', width: 100,
render: (a: any, b: any, c: any) => {
return <span>{c + 1}</span>;
},
},
{ 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: 'productName', key: 'productName', align: 'center' },
{ title: '产品编号', dataIndex: 'productNum', key: 'productNum', align: 'center' },
{ title: '配发管理系统名称', dataIndex: 'distManagerName', key: 'distManagerName', align: 'center' },
{ title: '配发管理系统实体标识', dataIndex: 'distManagerIdentifer ', key: 'distManagerIdentifer', align: 'center' },
{ title: '操作时间', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '同步状态', dataIndex: 'name', key: 'name', align: 'center' }
]
useEffect(() => {
form.setFieldsValue({
productName: '',
carrierType: '',
carrierNumber: '',
orderDirection: '',
})
getSelect()
}, [])
// 获取下拉框数据
const getSelect = () => {
secretFormatList({}).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 } });
setSelectData({
productName: [{ label: '全部', value: '' }, ...productName]
})
} else {
message.error(res?.errorMsg);
}
})
}
useEffect(() => {
getList();
}, [pageNumber]);
useEffect(() => {
getList2();
}, [pageNumber2]);
// 获取密钥体列表
const getList = () => {
let data = form.getFieldsValue()
let params = {
'secretImport.productName': data.productName,
'secretImport.productNum': data.productNum,
}
secretList({ pageNumber, pageSize, ...params }).then((res) => {
if (res?.result == "success") {
setTotal(res.data[0].total)
setTableData(res.data[0].list)
} else {
message.error(res?.errorMsg);
}
})
}
const pageOnChange = (pageNumber: number) => {
setPageNumber(pageNumber);
}
const onShowSizeChange = (current: any, pageSize: any) => {
setpageSize(pageSize);
getList();
}
const sending = (type: number) => {
if (selectedRowKeys.length == 0) {
message.info('请勾选数据');
return
}
let promises = selectedRowKeys.map(item => {
return secretUpdateStatus({ id: item, type }).then((res) => {
if (res?.result === "success") {
return 1;
} else {
message.error(res?.errorMsg);
return 0;
}
});
});
Promise.all(promises).then(results => {
let recordCount = results.reduce((acc: any, val) => acc + val, 0);
if (recordCount === selectedRowKeys.length) {
message.success('配发成功');
pageNumber1 == 1 ? getList2() : setPageNumber2(1);
setSelectedRowKeys([]);
}
});
}
const onFinish = () => {
pageNumber == 1 ? getList() : setPageNumber(1);
};
// 获取密钥体邮箱任务列表
const getList2 = () => {
privateIssueList({ pageNumber: pageNumber2, pageSize: pageSize2 }).then((res) => {
if (res?.result == "success") {
setTotal2(res.data[0].total)
setTableData2(res.data[0].list)
} else {
message.error(res?.errorMsg);
}
})
}
return (
<div className={`${styles.params_warp}`}>
<TabsComp
@ -44,30 +185,69 @@ export default function Page() {
</div>
<div className='flex_aiC mt20 mb20'>
<div style={{ marginRight: 12 }}></div>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<div className='ml20' style={{ marginRight: 12 }}></div>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<div className='ml20' style={{ marginRight: 12 }}></div>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
<div className='mr20 ml20'>
<ButtonComp text={'添加'} onClick={() => { }} />
</div>
<ButtonComp text={'查询'} onClick={() => { }} />
<Form form={form} layout={'inline'} onFinish={onFinish} className='mt20'>
{/* <Form.Item name="aaa" label="" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={[]} />
</Form.Item> */}
<Form.Item name="productName" label="产品名称" style={formItemSty}>
<Select style={{ width: 260 }} onChange={(e) => { }} options={selectData.productName} />
</Form.Item>
<div className='flex_aiC'>
<Form.Item name="productNum" label="产品编号" style={{ marginBottom: 30 }}>
<Input style={{ width: 260 }} />
</Form.Item>
{/* <ButtonComp style={{ marginBottom: 30 }} text={'添加'} onClick={() => form.submit()} /> */}
<ButtonComp style={{ marginBottom: 30 }} text={'查询'} onClick={() => form.submit()} />
</div>
</Form>
</div>
<div className='flex_jE mt20 mb20'>
<ButtonComp text={'同步'} onClick={() => { }} />
<div className='mb20 flex_aiC_jB'>
<div></div>
<ButtonComp type={'cancel'} text={'配发'} onClick={() => sending(3)} />
</div>
<Table
scroll={tableData.length > 0 ? { y: 41 * 9 } : {}}
scroll={{ x: 800, y: 41 * 11 }}
pagination={false}
bordered
columns={columns}
dataSource={tableData}
rowKey={(record: any) => record?.id}
rowClassName={rowClassName}
rowSelection={{
selectedRowKeys,
onChange: (selectedKeys: any) => {
setSelectedRowKeys(selectedKeys);
}
}}
/>
{total > 0 && <div className='flex_aiC_jB mt20'>
<div> {total} </div>
<Pagination
current={pageNumber}
pageSize={pageSize}
total={total}
showQuickJumper
onChange={pageOnChange}
onShowSizeChange={onShowSizeChange}
/>
</div>}
<div className='flex_jE mt30 mb20'>
<ButtonComp text={'同步'} onClick={() => { }} />
</div>
<Table
scroll={tableData.length > 0 ? { y: 41 * 9 } : {}}
pagination={false}
bordered
columns={columns1}
dataSource={tableData1}
rowKey={(record: any) => record?.id}
rowClassName={rowClassName}
/>
<div className='mb20' style={{ height: 1, background: '#EDEDED' }}></div>
@ -81,12 +261,28 @@ export default function Page() {
scroll={tableData.length > 0 ? { y: 41 * 9 } : {}}
pagination={false}
bordered
columns={columns1}
dataSource={tableData}
columns={columns2}
dataSource={tableData2}
rowKey={(record: any) => record?.id}
rowClassName={rowClassName}
/>
{total2 > 0 && <div className='flex_aiC_jB mt20'>
<div> {total2} </div>
<Pagination
current={pageNumber2}
pageSize={pageSize2}
total={total2}
showQuickJumper
onChange={(pageNumber: number) => {
setPageNumber2(pageNumber);
}}
onShowSizeChange={(current: any, pageSize: any) => {
setpageSize2(pageSize);
getList2();
}}
/>
</div>}
</div>
);
}

@ -19,7 +19,7 @@ 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: 'name', key: 'name', align: 'center' },
{ title: '导入时间', dataIndex: 'importTime', key: 'importTime', align: 'center' },,
{ title: '数据长度', dataIndex: 'name', key: 'name', align: 'center' }
]

@ -16,14 +16,14 @@ export default function Page() {
return <span>{c + 1}</span>;
},
},
{ title: '产品名称', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '产品名称', dataIndex: 'productName', key: 'productName', align: 'center' },
{ title: '管理实体标识', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '000标识', dataIndex: 'name', key: 'name', align: 'center' },
{ title: 'IP地址', 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: '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' },

@ -10,8 +10,8 @@ export default function Page() {
const [visibility, setVisibility] = useState(false);
const columns: any = [
{ title: '产品名称', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '产品编号', 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' }
]
@ -25,14 +25,14 @@ export default function Page() {
{ title: '设备名称', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '管理实体标识', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '000标识', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '产品名称', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '产品编号', 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: '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' }
]

@ -20,7 +20,7 @@ export default function Page() {
{ title: '000标识', 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' },
{ title: '是否下载到邮箱', dataIndex: 'name', key: 'name', align: 'center' }

@ -11,8 +11,8 @@ export default function Page() {
const [tableData, setTableData] = useState([]);
const columns: any = [
{ title: '载体类型', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '数量', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '载体类型', dataIndex: 'carrierType', key: 'carrierType', align: 'center' },
{ title: '数量', dataIndex: 'number', key: 'number', align: 'center' },
{ title: '载体编号', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '内含文件类型', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '文件内容', dataIndex: 'name', key: 'name', align: 'center' },

@ -9,8 +9,8 @@ export default function Page() {
const [tableData, setTableData] = useState([]);
const columns: any = [
{ title: '产品名称', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '产品编号', 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' }
]
@ -24,14 +24,14 @@ export default function Page() {
{ title: '设备名称', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '管理实体标识', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '000标识', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '产品名称', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '产品编号', 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: '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' }
]

@ -27,14 +27,14 @@ export default function Page() {
{ title: '设备名称', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '管理实体标识', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '000标识', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '产品名称', dataIndex: 'name', key: 'name', align: 'center' },
{ title: '产品编号', 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: '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' }
]

@ -22,7 +22,7 @@ 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: 'name', key: 'name', align: 'center' },
{ title: '当前状态', dataIndex: 'currentStatus', key: 'currentStatus', align: 'center' },
{ title: '配发结果', dataIndex: 'name', key: 'name', align: 'center' }
]

@ -22,7 +22,7 @@ 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: 'name', key: 'name', align: 'center' },
{ title: '当前状态', dataIndex: 'currentStatus', key: 'currentStatus', align: 'center' },
{ title: '配发结果', dataIndex: 'name', key: 'name', align: 'center' }
]

@ -2,8 +2,8 @@ import { getRequest, postRequest, uploadFile } from '@/utils/request';
// --------------------------初装系统---------------------------
// 设备初装
export async function deviceInit_init(data: any) {
return uploadFile(`/xgd/deviceInit/init`, data);
export async function deviceInit_init(formData: any) {
return uploadFile(`/xgd/deviceInit/init`, formData);
}
// 数据安装

@ -16,8 +16,8 @@ export async function secretInit_getStatus(params: any) {
}
// 加载数据
export async function secretInit_loadData(params: any) {
return uploadFile(`/xgd/secretInit/loadData`, params);
export async function secretInit_loadData(formData: any) {
return uploadFile(`/xgd/secretInit/loadData`, formData);
}
// 发送命令

@ -0,0 +1,79 @@
import { getRequest, postFormDataRequest, postRequest, uploadFile } from "@/utils/request";
// 密钥体格式导入
export async function secretFormatImport(formData: any) {
return uploadFile(`/xgd/secretBodyManger/secretFormatImport`, formData);
}
// 密钥体格式列表
export async function secretFormatList(params: any) {
return getRequest(`/xgd/secretBodyManger/secretFormatList`, params);
}
// 修改密钥体状态
// type: 1 删除 2还原 3清理
export async function secretUpdateSecret(data: any) {
return postFormDataRequest(`/xgd/secretBodyManger/updateSecret`, data);
}
// 密钥体格式发布
export async function secretPublisher(data: any) {
return getRequest(`/xgd/secretBodyManger/secretPublisher`, data);
}
// 密钥体导入
export async function secretBodyImport(formData: any) {
return uploadFile(`/xgd/secretBodyManger/secretBodyImport`, formData);
}
// 密钥体接收单列表
export async function secretBodyList(params: any) {
return getRequest(`/xgd/secretBodyManger/secretBodyList`, params);
}
// 密钥体列表
export async function secretList(params: any) {
return getRequest(`/xgd/secretBodyManger/secretList`, params);
}
// 密钥体申请
export async function addSecretAsk(data: any) {
return postRequest(`/xgd/secretBodyManger/addSecretAsk`, data);
}
// 密钥体申请列表
export async function secretAskList(params: any) {
return getRequest(`/xgd/secretBodyManger/secretAskList`, params);
}
// 密钥体配发
// type: 1 向下级配发 2 向邮箱配发 3 向专用密码管理系统配发
export async function secretUpdateStatus(data: any) {
return postFormDataRequest(`/xgd/secretBodyManger/updateStatus`, data);
}
// 密钥体配发-密钥体邮箱任务列表
export async function mailIssueList(params: any) {
return getRequest(`/xgd/secretBodyManger/mailIssueList`, params);
}
// 密钥体配发-向专用密码管理系统配发列表
export async function privateIssueList(params: any) {
return getRequest(`/xgd/secretBodyManger/privateIssueList`, params);
}
// 密钥体配发-向下级配发列表
export async function belowIssueList(params: any) {
return getRequest(`/xgd/secretBodyManger/belowIssueList`, params);
}
// 密钥体载体包封 - 明文载体包封
export async function keyBodyCarrierClearText(data: any) {
return postRequest(`/xgd/secretBodyManger/keyBodyCarrierClearText`, data);
}
// 密钥体载体包封 - 密文载体包封
export async function keyBodyCarrierEncrypted(data: any) {
return postRequest(`/xgd/secretBodyManger/keyBodyCarrierEncrypted`, data);
}

@ -145,12 +145,10 @@ export function downloadFile(url: string, fileName?: string) {
/**
*
* @param {string} url - URL
* @param {File} file -
* @param {File} formData - FormData
* @returns {Promise} - Promise
*/
export function uploadFile(url: string, file: File) {
const formData = new FormData();
formData.append('file', file);
export function uploadFile(url: string, formData: any) {
return fetch(url, {
method: 'POST',
body: formData,

Loading…
Cancel
Save