parent
2d209d9564
commit
b4630c8669
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,53 @@
|
||||
.menu_item {
|
||||
width: 260px;
|
||||
height: 32px;
|
||||
background: linear-gradient(180deg, #4AB4E4 0%, #A2E1FF 100%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #FFFFFF;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
margin-top:20px;
|
||||
|
||||
.triangle {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 6px solid #fff;
|
||||
border-bottom: 6px solid transparent;
|
||||
border-top: 6px solid transparent;
|
||||
transition: all 0.15s ease-in;
|
||||
}
|
||||
}
|
||||
|
||||
.item_warp {
|
||||
transition: all 2s ease-in;
|
||||
|
||||
.item1 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
margin: 20px 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.item1_img {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
background-color: saddlebrown;
|
||||
}
|
||||
|
||||
.item1_name {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #1A374A;
|
||||
margin-top: 6px;
|
||||
}
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
import { FC, useEffect, useRef, useState } from 'react';
|
||||
import styles from './index.less';
|
||||
import { history, useLocation, useParams } from 'umi';
|
||||
import { Menu, Tree } from 'antd';
|
||||
|
||||
interface PageProps {
|
||||
data: Array<{
|
||||
name: string;
|
||||
url: string
|
||||
}>;
|
||||
}
|
||||
|
||||
const LeftMenuCom: FC<PageProps> = ({ data }) => {
|
||||
const urlParams = useParams();
|
||||
const [list, setList] = useState<any>([]);
|
||||
const [active,setActive] = useState(0)
|
||||
|
||||
let urlStr = `${urlParams?.fileType}${location?.search}`;
|
||||
|
||||
useEffect(() => {
|
||||
setList([...data])
|
||||
}, [])
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<div>
|
||||
{list.map((item: any, index: number) => {
|
||||
return (
|
||||
<div key={index}>
|
||||
{/* 类型 */}
|
||||
<div className={styles.menu_item} onClick={() => {
|
||||
history.push(`${item.url}/${urlStr}`)
|
||||
setActive(index);
|
||||
}}>
|
||||
<div style={{color: active==index? '#fff':'#000'}}>{item.name}</div>
|
||||
{/* <div className={styles.triangle} style={{ transform: list[index].check ? 'rotate(90deg)' : '' }}></div> */}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div >
|
||||
)
|
||||
}
|
||||
|
||||
export default LeftMenuCom
|
||||
|
@ -0,0 +1,33 @@
|
||||
import { FC, useEffect, useRef, useState } from 'react';
|
||||
import styles from './index.less';
|
||||
import { history, useLocation, useParams } from 'umi';
|
||||
|
||||
|
||||
interface PageProps {
|
||||
currStep: number,
|
||||
allStep:number,
|
||||
stepName:string,
|
||||
}
|
||||
|
||||
const LeftMenuCom: FC<PageProps> = ({
|
||||
currStep,
|
||||
allStep,
|
||||
stepName
|
||||
}) => {
|
||||
|
||||
|
||||
return (
|
||||
<div style={{
|
||||
display:'flex',
|
||||
justifyContent:'center',
|
||||
alignItems:'center',
|
||||
width:'100%',
|
||||
height:'100%',
|
||||
}}>
|
||||
<div>步骤{currStep}of{allStep}:{stepName}</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default LeftMenuCom
|
||||
|
@ -1,54 +0,0 @@
|
||||
.entrance {
|
||||
position: relative;
|
||||
width: 100vw;
|
||||
min-height: 100vh;
|
||||
background: url('../../assets/images/bk_img.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
|
||||
.text_warp {
|
||||
width: 80vw;
|
||||
margin: 0 auto;
|
||||
|
||||
div {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div:nth-child(1) {
|
||||
font-size: 36px;
|
||||
font-weight: 600;
|
||||
padding-top: 30vh;
|
||||
}
|
||||
|
||||
div:nth-child(2) {
|
||||
font-size: 50px;
|
||||
font-weight: 600;
|
||||
margin: 50px 0 80px 0;
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
|
||||
div:nth-child(3) {
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
.prompt {
|
||||
position: fixed;
|
||||
bottom: 45px;
|
||||
right: 20px;
|
||||
font-size: 24px;
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.login_warp {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.imges {
|
||||
width: 81px;
|
||||
height: 81px;
|
||||
margin-right: 20px;
|
||||
background-color: saddlebrown;
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
import styles from './index.less';
|
||||
|
||||
// GLQ远程维护 --> 交互维护命令--> 当前IP
|
||||
export default function Page() {
|
||||
return (
|
||||
<div>
|
||||
{'GLQ远程维护 --> 交互维护命令--> 当前IP'}
|
||||
</div>
|
||||
);
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
import styles from './index.less';
|
||||
|
||||
// GLQ远程维护 --> 交互维护命令--> 当前IP
|
||||
export default function Page() {
|
||||
return (
|
||||
<div>
|
||||
{'GLQ远程维护 --> 交互维护命令--> 当前IP'}
|
||||
</div>
|
||||
);
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
import ContentWarp from '@/components/ContentWarp';
|
||||
import styles from '../../index.less';
|
||||
import { Form, Input, message } from 'antd';
|
||||
import ButtonComp from '@/components/ButtonComp';
|
||||
import { setParameter } from '@/services/gql';
|
||||
import { validateIPAddress } from '@/utils/validate';
|
||||
|
||||
export default function Page() {
|
||||
const [form] = Form.useForm();
|
||||
|
||||
const onFinish = (values: any) => {
|
||||
setParameter({
|
||||
ipAddress: values.ipAddress
|
||||
}).then((res) => {
|
||||
if (res.result == 'success') {
|
||||
message.success('连接成功')
|
||||
}else {
|
||||
message.success(res.errorMsg)
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={styles.params_warp}>
|
||||
<ContentWarp text={'参数设置'}>
|
||||
<div className='pd20'>配置与被控端连接的连接参数</div>
|
||||
<div className='line'></div>
|
||||
<div className='pd20 pb100'>
|
||||
<Form form={form} onFinish={onFinish}>
|
||||
<Form.Item
|
||||
name="ipAddress"
|
||||
label="本地GLQ后端IP"
|
||||
rules={[
|
||||
{ required: true, message: '请输入本地GLQ后端IP' },
|
||||
{ validator: validateIPAddress },
|
||||
]}
|
||||
>
|
||||
<Input placeholder="请输入本地GLQ后端IP" style={{ width: '560px' }} />
|
||||
</Form.Item>
|
||||
</Form>
|
||||
<div className={styles.btn_warp}>
|
||||
<ButtonComp style={{ marginRight: 20 }} text={'建立连接'} onClick={() => form.submit()} />
|
||||
<ButtonComp type={'cancel'} text={'参数重置'} onClick={() => form.resetFields()} />
|
||||
</div>
|
||||
</div>
|
||||
</ContentWarp>
|
||||
</div>
|
||||
);
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
import styles from './index.less';
|
||||
|
||||
// GLQ远程维护 --> 交互维护命令--> PING命令
|
||||
export default function Page() {
|
||||
return (
|
||||
<div>
|
||||
{'GLQ远程维护 --> 交互维护命令--> PING命令'}
|
||||
</div>
|
||||
);
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
import styles from './index.less';
|
||||
|
||||
// GLQ远程维护 --> 交互维护命令--> 系统时间
|
||||
export default function Page() {
|
||||
return (
|
||||
<div>
|
||||
{'GLQ远程维护 --> 交互维护命令--> 系统时间'}
|
||||
</div>
|
||||
);
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
import styles from './index.less';
|
||||
|
||||
// GLQ远程维护 --> 交互维护命令-->TELNET命令
|
||||
export default function Page() {
|
||||
return (
|
||||
<div>
|
||||
{'GLQ远程维护 --> 交互维护命令-->TELNET命令'}
|
||||
</div>
|
||||
);
|
||||
}
|
@ -1,123 +0,0 @@
|
||||
import ContentWarp from '@/components/ContentWarp';
|
||||
import styles from '../../index.less';
|
||||
import { Form, Input, Select, message } from 'antd';
|
||||
import ButtonComp from '@/components/ButtonComp';
|
||||
import { useEffect } from 'react';
|
||||
import { remoteFileConfiSendData, remoteFileConfigClean } from '@/services/gql';
|
||||
|
||||
// 网络GLQ配置 --> 远程文件配置--> 管理配置
|
||||
export default function Page() {
|
||||
|
||||
const [form] = Form.useForm();
|
||||
|
||||
useEffect(() => {
|
||||
form.setFieldsValue({
|
||||
deviceLocation: '前端机平台',
|
||||
deviceType: '类型1',
|
||||
hotStandby: 'no',
|
||||
deviceId: '',
|
||||
})
|
||||
}, [])
|
||||
|
||||
const onFinish = (values: any) => {
|
||||
remoteFileConfiSendData({
|
||||
jsonStr: JSON.stringify(values),
|
||||
type: 4
|
||||
}).then((res) => {
|
||||
if (res?.result == "success") {
|
||||
message.success('文件提交成功');
|
||||
form.resetFields();
|
||||
} else {
|
||||
message.error(res?.errorMsg);
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
const clearInfo = () => {
|
||||
remoteFileConfigClean({type: 4}).then(res => {
|
||||
if (res?.result == "success") {
|
||||
message.success('清除信息成功');
|
||||
}else {
|
||||
message.error(res?.errorMsg);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<div className={`${styles.params_warp}`}>
|
||||
<ContentWarp text={'管理文件配置'}>
|
||||
<div className='pd20'>配置隔离器应用程序运行管理参数</div>
|
||||
<div className='line'></div>
|
||||
<div className='pd20 pb100'>
|
||||
<Form
|
||||
form={form}
|
||||
onFinish={onFinish}
|
||||
>
|
||||
<Form.Item
|
||||
name="deviceLocation"
|
||||
label="设备位置"
|
||||
rules={[
|
||||
{ required: true, message: '请选择设备位置' },
|
||||
]}
|
||||
>
|
||||
<Select
|
||||
style={{ width: 560 }}
|
||||
onChange={(e) => { }}
|
||||
options={[
|
||||
{ label: '前端机平台', value: '前端机平台' },
|
||||
{ label: '后端机平台', value: '后端机平台' }
|
||||
]}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="deviceType"
|
||||
label="设备类型"
|
||||
rules={[
|
||||
{ required: true, message: '请选择设备类型' },
|
||||
]}
|
||||
>
|
||||
<Select
|
||||
style={{ width: 560 }}
|
||||
onChange={(e) => { }}
|
||||
options={[
|
||||
{ label: '类型1', value: '类型1' },
|
||||
{ label: '类型2', value: '类型2' }
|
||||
]}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="hotStandby"
|
||||
label="存在热备"
|
||||
rules={[
|
||||
{ required: true, message: '请选择存在热备' },
|
||||
]}
|
||||
>
|
||||
<Select
|
||||
style={{ width: 560 }}
|
||||
onChange={(e) => { }}
|
||||
options={[
|
||||
{ label: 'no', value: 'no' },
|
||||
{ label: 'yes', value: 'yes' }
|
||||
]}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="deviceId"
|
||||
label="设备标识"
|
||||
rules={[
|
||||
{ required: true, message: '请输入设备标识' },
|
||||
]}
|
||||
>
|
||||
<Input placeholder="请输入设备标识" style={{ width: '560px' }} />
|
||||
</Form.Item>
|
||||
</Form>
|
||||
<div className={styles.btn_warp}>
|
||||
<ButtonComp style={{ marginRight: 20 }} text={'文件提交'} onClick={() => form.submit()} />
|
||||
<ButtonComp type={'cancel'} text={'清空信息'} onClick={() => clearInfo()} />
|
||||
</div>
|
||||
</div>
|
||||
</ContentWarp>
|
||||
</div>
|
||||
);
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
.params_warp1 {
|
||||
[class~='ant-form-item-label'] {
|
||||
width: 80px;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
@ -1,85 +0,0 @@
|
||||
import ContentWarp from '@/components/ContentWarp';
|
||||
import styles from '../../index.less';
|
||||
import styles1 from './index.less';
|
||||
import { Form, Input, message } from 'antd';
|
||||
import ButtonComp from '@/components/ButtonComp';
|
||||
import { remoteFileConfiSendData, remoteFileConfigClean } from '@/services/gql';
|
||||
import { subnetMaskValidator, validateIPAddress } from '@/utils/validate';
|
||||
|
||||
// 网络GLQ配置 --> 远程文件配置--> 网络参数
|
||||
export default function Page() {
|
||||
|
||||
const [form] = Form.useForm();
|
||||
|
||||
const onFinish = (values: any) => {
|
||||
remoteFileConfiSendData({
|
||||
jsonStr: JSON.stringify(values),
|
||||
type: 2
|
||||
}).then( (res) => {
|
||||
if (res?.result == "success") {
|
||||
message.success('文件提交成功');
|
||||
form.resetFields();
|
||||
}else {
|
||||
message.error(res?.errorMsg);
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
const clearInfo = () => {
|
||||
remoteFileConfigClean({type: 2}).then(res => {
|
||||
if (res?.result == "success") {
|
||||
message.success('清除信息成功');
|
||||
}else {
|
||||
message.error(res?.errorMsg);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={`${styles.params_warp} ${styles1.params_warp1}`}>
|
||||
<ContentWarp text={'网络参数配置'}>
|
||||
<div className='pd20'>配置隔离器网络运行参数</div>
|
||||
<div className='line'></div>
|
||||
<div className='pd20 pb100'>
|
||||
<Form
|
||||
form={form}
|
||||
onFinish={onFinish}
|
||||
>
|
||||
<Form.Item
|
||||
name="ipAddress"
|
||||
label="IP地址"
|
||||
rules={[
|
||||
{ required: true, message: '请输入IP地址' },
|
||||
{ validator: validateIPAddress }
|
||||
]}
|
||||
>
|
||||
<Input placeholder="请输入IP地址" style={{ width: '560px' }} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="mask"
|
||||
label="子网掩码"
|
||||
rules={[
|
||||
{ required: true, message: '请输入子网掩码' }
|
||||
]}
|
||||
>
|
||||
<Input placeholder="请输入子网掩码" style={{ width: '560px' }} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="defaultGateway"
|
||||
label="默认网关"
|
||||
rules={[
|
||||
{ required: true, message: '请输入默认网关' },
|
||||
]}
|
||||
>
|
||||
<Input placeholder="请输入默认网关" style={{ width: '560px' }} />
|
||||
</Form.Item>
|
||||
</Form>
|
||||
<div className={styles.btn_warp}>
|
||||
<ButtonComp style={{ marginRight: 20 }} text={'文件提交'} onClick={() => form.submit()} />
|
||||
<ButtonComp type={'cancel'} text={'清空信息'} onClick={() => clearInfo()} />
|
||||
</div>
|
||||
</div>
|
||||
</ContentWarp>
|
||||
</div>
|
||||
);
|
||||
}
|
@ -1,111 +0,0 @@
|
||||
|
||||
import ContentWarp from '@/components/ContentWarp';
|
||||
import styles from '../../index.less';
|
||||
import { ConfigProvider, Form, Input, Table, message } from 'antd';
|
||||
import ButtonComp from '@/components/ButtonComp';
|
||||
import { useState } from 'react';
|
||||
|
||||
import { rowClassName } from '@/utils';
|
||||
import { validateIPAddress, validatePort } from '@/utils/validate';
|
||||
import { remoteFileConfiSendData, remoteFileConfigClean } from '@/services/gql';
|
||||
|
||||
// 网络GLQ配置 --> 远程文件配置--> 服务列表
|
||||
export default function Page() {
|
||||
const [form] = Form.useForm();
|
||||
const [tableData, setTableData] = useState<any>([]);
|
||||
|
||||
const onFinish = (values: any) => {
|
||||
values.rowKey = Math.random();
|
||||
setTableData([...tableData, values])
|
||||
};
|
||||
|
||||
const columns: any = [
|
||||
{
|
||||
title: '序号', key: 'index', align: 'center', width: 80,
|
||||
render: (a: any, b: any, c: any) => {
|
||||
return <span>{c + 1}</span>;
|
||||
},
|
||||
},
|
||||
{ title: '服务名称', dataIndex: 'serviceName', key: 'serviceName', align: 'center' },
|
||||
{ title: '服务器IP', dataIndex: 'serviceIP', key: 'serviceIP', align: 'center' },
|
||||
{ title: '服务端口', dataIndex: 'servicePort', key: 'servicePort', align: 'center' },
|
||||
]
|
||||
|
||||
const sending = () => {
|
||||
if(tableData.length == 0) {
|
||||
message.info('请添加数据');
|
||||
return
|
||||
}
|
||||
|
||||
let serviceList = tableData.map(({serviceName, serviceIP, servicePort}: any) => {
|
||||
return {serviceName, serviceIP, servicePort}
|
||||
})
|
||||
remoteFileConfiSendData({
|
||||
jsonStr: JSON.stringify({ serviceList: serviceList }),
|
||||
type: 1
|
||||
}).then( (res) => {
|
||||
if (res?.result == "success") {
|
||||
message.success('发送数据成功');
|
||||
form.resetFields();
|
||||
}else {
|
||||
message.error(res?.errorMsg);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const clearInfo = () => {
|
||||
remoteFileConfigClean({type: 1}).then(res => {
|
||||
if (res?.result == "success") {
|
||||
message.success('清除信息成功');
|
||||
}else {
|
||||
message.error(res?.errorMsg);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={styles.params_warp}>
|
||||
<ContentWarp text={'服务列表配置'}>
|
||||
<div className='pd20'>配置隔离器与应用服务器通信参数列表</div>
|
||||
<div className='line'></div>
|
||||
<div className='pd20 pb100'>
|
||||
|
||||
<Form form={form} layout={'inline'} onFinish={onFinish} className='mb20'>
|
||||
<Form.Item name="serviceName" label="服务名称" rules={[{ required: true, message: '请输入服务名称' }]} >
|
||||
<Input placeholder="请输入服务名称" style={{ width: '200px' }} />
|
||||
</Form.Item>
|
||||
<Form.Item name="serviceIP" label="服务IP" rules={[
|
||||
{ required: true, message: '请输入服务IP' },
|
||||
{ validator: validateIPAddress}
|
||||
]} >
|
||||
<Input placeholder="请输入服务IP" style={{ width: '200px' }} />
|
||||
</Form.Item>
|
||||
<Form.Item name="servicePort" label="服务端口" rules={[
|
||||
{ required: true, message: '请输入服务端口' },
|
||||
{ validator: validatePort }
|
||||
]} >
|
||||
<Input placeholder="请输入服务端口" style={{ width: '200px' }} />
|
||||
</Form.Item>
|
||||
<ButtonComp text={'提交'} onClick={() => form.submit()} />
|
||||
</Form>
|
||||
|
||||
<Table
|
||||
scroll={tableData.length > 0 ? { y: 41 * 5 } : {}}
|
||||
pagination={false}
|
||||
bordered
|
||||
columns={columns}
|
||||
dataSource={tableData}
|
||||
rowKey={(record: any) => record?.rowKey}
|
||||
rowClassName={rowClassName}
|
||||
/>
|
||||
|
||||
<div className={styles.btn_warp}>
|
||||
<ButtonComp style={{ marginRight: 20 }} text={'发送数据'} onClick={() => sending()} />
|
||||
<ButtonComp type={'cancel'} text={'清空信息'} onClick={() => clearInfo()} />
|
||||
</div>
|
||||
</div>
|
||||
</ContentWarp>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -1,6 +0,0 @@
|
||||
.params_warp1 {
|
||||
[class~='ant-form-item-label'] {
|
||||
width: 110px;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
.params_warp1 {
|
||||
[class~='ant-form-item-label'] {
|
||||
width: 100px;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
.params_warp {
|
||||
position: relative;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.btn_warp {
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
right: 20px;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.erroInfo {
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
left: 20px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.html_con {
|
||||
background: #FFFFFF;
|
||||
box-shadow: inset 1px 1px 3px 0px rgba(35, 44, 48, 0.22);
|
||||
border-radius: 1px;
|
||||
border: 1px solid #E3E3E3;
|
||||
width: 100%;
|
||||
height: 330px;
|
||||
overflow-y: scroll;
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
.con_warp {
|
||||
width: calc(100% - 40px);
|
||||
height: calc(100% - 40px);
|
||||
background-color: #fff;
|
||||
font-size: 14px;
|
||||
margin: 20px;
|
||||
|
||||
.title1 {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #191919;
|
||||
}
|
||||
|
||||
.title2 {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
margin: 20px 0 30px 0;
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
|
||||
div:nth-child(1) {
|
||||
width: 80px;
|
||||
text-align: right;
|
||||
margin-right: 16px;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
.con_warp {
|
||||
width: calc(100% - 40px);
|
||||
height: calc(100% - 40px);
|
||||
background-color: #fff;
|
||||
font-size: 14px;
|
||||
margin: 20px;
|
||||
|
||||
.title1 {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #191919;
|
||||
}
|
||||
|
||||
.title2 {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
margin: 20px 0 30px 0;
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 30px;
|
||||
}
|
||||
}
|
@ -1,120 +0,0 @@
|
||||
.initial_warp {
|
||||
width: 100vw;
|
||||
min-height: 100vh;
|
||||
|
||||
.header_warp {
|
||||
height: 56px;
|
||||
background: linear-gradient(180deg, #6DCFEA 0%, #3BA1CF 100%);
|
||||
box-shadow: inset 0px 2px 3px 0px rgba(255, 255, 255, 0.5);
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #FFFFFF;
|
||||
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.main_warp {
|
||||
width: 100%;
|
||||
height: calc(100vh - 58px);
|
||||
min-height: 600px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.nav_title {
|
||||
height: 32px;
|
||||
background: #3EA4D1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 14px;
|
||||
color: #FFFFFF;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.left_menu {
|
||||
width: 260px;
|
||||
min-width: 260px;
|
||||
height: 100%;
|
||||
min-height: calc(100vh - 58px);
|
||||
background: #fff;
|
||||
border-right: 1px solid #D8D8D8;
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.right_warp {
|
||||
height: calc(100% - 58px);
|
||||
min-height: calc(100vh - 58px);
|
||||
width: calc(100vw - 261px);
|
||||
background: #F1F1F1;
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.start_warp {
|
||||
position: relative;
|
||||
width: calc(100% - 40px);
|
||||
height: calc(100% - 40px);
|
||||
background-color: #fff;
|
||||
margin: 20px;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.start_title {
|
||||
font-size: 48px;
|
||||
font-weight: 600;
|
||||
color: #191919;
|
||||
margin-bottom: 60px;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.introduce {
|
||||
position: absolute;
|
||||
right: 40px;
|
||||
bottom: 40px;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
line-height: 26px;
|
||||
|
||||
div:nth-child(2) {
|
||||
margin: 10px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.item1 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
margin: 20px 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.item1_img {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
background-color: saddlebrown;
|
||||
}
|
||||
|
||||
.item1_name {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #1A374A;
|
||||
margin-top: 6px;
|
||||
}
|
@ -1,93 +0,0 @@
|
||||
import React, { FC, useEffect, useState } from 'react';
|
||||
import styles from './index.less';
|
||||
import { Input, Progress, message } from 'antd';
|
||||
|
||||
interface PageProps {
|
||||
open: boolean;
|
||||
onCancel: (name?: string) => void;
|
||||
setInstallExe: (index: number, text: string) => void;
|
||||
}
|
||||
|
||||
const CodeDriver: FC<PageProps> = ({
|
||||
open = false,
|
||||
onCancel,
|
||||
setInstallExe
|
||||
}) => {
|
||||
const [active, setActive] = useState(1);
|
||||
const [percentVal, setPercentVal] = useState(0);
|
||||
|
||||
useEffect(() => {
|
||||
if (open) setActive(1)
|
||||
}, [open])
|
||||
|
||||
// 监听是否到安装进度条步骤
|
||||
useEffect(() => {
|
||||
if (active == 3) {
|
||||
const interval = setInterval(() => {
|
||||
setPercentVal((val) => {
|
||||
const randomStep = Math.round(Math.random() * (100 / 10));
|
||||
const newPercent = val + randomStep;
|
||||
|
||||
if (newPercent >= 100) {
|
||||
clearInterval(interval);
|
||||
setValue()
|
||||
return 100;
|
||||
}
|
||||
|
||||
return newPercent;
|
||||
});
|
||||
}, 500);
|
||||
|
||||
return () => clearInterval(interval);
|
||||
}
|
||||
}, [active])
|
||||
|
||||
// 设置安装步骤进度
|
||||
const setValue = () => {
|
||||
setActive((e) => { return e + 1 })
|
||||
}
|
||||
|
||||
const installSuccess = () => {
|
||||
setInstallExe(14,'一体化密码机驱动安装成功!')
|
||||
onCancel()
|
||||
}
|
||||
|
||||
return <>
|
||||
{
|
||||
open &&
|
||||
<div className={styles.modalOverlay}>
|
||||
<div className={styles.modal} style={{ width: 500, height: 460 }}>
|
||||
<img src={require(`../../../assets/images/codemanage/${active}.png`)} width={500} height={460} />
|
||||
|
||||
<div className={styles.close} onClick={()=>{
|
||||
onCancel('一体化密码机驱动安装程序')
|
||||
}}></div>
|
||||
|
||||
{[1, 2].includes(active) && <div className={styles.title}>一体化密码机驱动 安装程序</div>}
|
||||
{![1, 2].includes(active) && <div className={styles.title1}>一体化密码机驱动 安装程序</div>}
|
||||
|
||||
{active == 1 && <div className={styles.pic1}>一体化密码机驱动安装程序</div>}
|
||||
{active == 2 && <div className={styles.pic1} style={{ top: 166, left: 85 }}>一体化密码机驱动</div>}
|
||||
{active == 4 && <div className={styles.pic1} style={{ top: 123, left: 85 }}>一体化密码机驱动</div>}
|
||||
|
||||
{[1, 2].includes(active) && <div
|
||||
className={styles.net}
|
||||
onClick={() => setValue()}>
|
||||
</div>}
|
||||
|
||||
{active == 3 && <div className={styles.progress} style={{ background: '#fff', height: 15, width: 375, bottom: 222, left: 33, }}>
|
||||
<Progress percent={percentVal} steps={42} size={[7, 14]} strokeColor={'rgb(56, 158, 13)'} trailColor={'rgba(0,0,0,0)'} showInfo={false} />
|
||||
</div>}
|
||||
|
||||
{active == 4 && <div
|
||||
className={styles.net}
|
||||
style={{ bottom: 17, right: 27 }}
|
||||
onClick={() => installSuccess()}>
|
||||
</div>}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</>
|
||||
};
|
||||
|
||||
export default CodeDriver;
|
@ -1,114 +0,0 @@
|
||||
import React, { FC, useEffect, useState } from 'react';
|
||||
import styles from './index.less';
|
||||
import { Input, Progress, message } from 'antd';
|
||||
import { countType } from '@/utils';
|
||||
import { useParams } from 'umi';
|
||||
import DEV from '@/utils/env/dev';
|
||||
|
||||
interface PageProps {
|
||||
open: boolean;
|
||||
onCancel: (name?: string) => void;
|
||||
setInstallExe: (index: number, text: string) => void;
|
||||
}
|
||||
|
||||
const CodeManage: FC<PageProps> = ({
|
||||
open = false,
|
||||
onCancel,
|
||||
setInstallExe
|
||||
}) => {
|
||||
const [active, setActive] = useState(1);
|
||||
const [percentVal, setPercentVal] = useState(0);
|
||||
|
||||
const urlParams = useParams();
|
||||
|
||||
useEffect(() => {
|
||||
if (open) setActive(1)
|
||||
}, [open])
|
||||
|
||||
// 监听是否到安装进度条步骤
|
||||
useEffect(() => {
|
||||
if (active == 3) {
|
||||
const interval = setInterval(() => {
|
||||
setPercentVal((val) => {
|
||||
const randomStep = Math.round(Math.random() * (100 / 10));
|
||||
const newPercent = val + randomStep;
|
||||
|
||||
if (newPercent >= 100) {
|
||||
clearInterval(interval);
|
||||
setValue()
|
||||
return 100;
|
||||
}
|
||||
|
||||
return newPercent;
|
||||
});
|
||||
}, 500);
|
||||
|
||||
return () => clearInterval(interval);
|
||||
}
|
||||
}, [active])
|
||||
|
||||
// 设置安装步骤进度
|
||||
const setValue = () => {
|
||||
setActive((e) => { return e + 1 })
|
||||
}
|
||||
|
||||
// 在指定的目录下安装快捷方式
|
||||
const installSuccess = async () => {
|
||||
try {
|
||||
const response = await fetch('http://localhost:3000/createShortcut', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
mode: "cors",
|
||||
body: JSON.stringify({
|
||||
folderPath: `${DEV.FILE_URL}/${countType[urlParams?.fileType]}`,
|
||||
shortcutName: '专用核心密码综合管理系统',
|
||||
shortcutURL: `${DEV.LOCAL_URL}/initialSystem/${urlParams?.fileType}`
|
||||
}),
|
||||
});
|
||||
const data = await response.text();
|
||||
setInstallExe(13, data)
|
||||
|
||||
onCancel()
|
||||
} catch (error) {
|
||||
message.error(error); // 处理请求错误
|
||||
}
|
||||
}
|
||||
|
||||
return <>
|
||||
{
|
||||
open &&
|
||||
<div className={styles.modalOverlay}>
|
||||
<div className={styles.modal} style={{ width: 500, height: 460 }}>
|
||||
<img src={require(`../../../assets/images/codemanage/${active}.png`)} width={500} height={460} />
|
||||
|
||||
<div className={styles.close} onClick={()=>{
|
||||
onCancel('一体化密码机管理软件')
|
||||
}}></div>
|
||||
|
||||
{[1, 2].includes(active) && <div className={styles.title}>一体化密码机管理软件 安装程序</div>}
|
||||
{![1, 2].includes(active) && <div className={styles.title1}>一体化密码机管理软件 安装程序</div>}
|
||||
{active == 1 && <div className={styles.pic1}>一体化密码机管理软件安装程序</div>}
|
||||
{active == 2 && <div className={styles.pic1} style={{ top: 166, left: 85 }}>一体化密码机管理软件</div>}
|
||||
{active == 4 && <div className={styles.pic1} style={{ top: 123, left: 85 }}>一体化密码机管理软件</div>}
|
||||
|
||||
{[1, 2].includes(active) && <div
|
||||
className={styles.net}
|
||||
onClick={() => setValue()}>
|
||||
</div>}
|
||||
|
||||
{active == 3 && <div className={styles.progress} style={{ background: '#fff', height: 15, width: 375, bottom: 222, left: 33, }}>
|
||||
<Progress percent={percentVal} steps={42} size={[7, 14]} strokeColor={'rgb(56, 158, 13)'} trailColor={'rgba(0,0,0,0)'} showInfo={false} />
|
||||
</div>}
|
||||
|
||||
{active == 4 && <div
|
||||
className={styles.net}
|
||||
style={{ bottom: 17, right: 27 }}
|
||||
onClick={() => installSuccess()}>
|
||||
</div>}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</>
|
||||
};
|
||||
|
||||
export default CodeManage;
|
@ -1,170 +0,0 @@
|
||||
import React, { FC, useEffect, useState } from 'react';
|
||||
import styles from './index.less';
|
||||
import { Input, Progress, message } from 'antd';
|
||||
import { countType, sysType } from '@/utils';
|
||||
import { useParams } from 'umi';
|
||||
import DEV from '@/utils/env/dev';
|
||||
|
||||
interface PageProps {
|
||||
open: boolean;
|
||||
onCancel: (name?: string) => void;
|
||||
setInstallExe: (index: number, text: string) => void;
|
||||
}
|
||||
|
||||
const CoreArea: FC<PageProps> = ({
|
||||
open = false,
|
||||
onCancel,
|
||||
setInstallExe
|
||||
}) => {
|
||||
const [active, setActive] = useState(1);
|
||||
const [percentVal, setPercentVal] = useState(0);
|
||||
const [userName, setUserName] = useState('root');
|
||||
const [password, setPassword] = useState('');
|
||||
|
||||
const [serverIp, setServerIp] = useState('127.0.0.1');
|
||||
const [serverPort, setServerPort] = useState('2222');
|
||||
const [localPort, setLocalPort] = useState('11110');
|
||||
|
||||
const urlParams = useParams();
|
||||
|
||||
useEffect(() => {
|
||||
if (open) {
|
||||
setActive(1)
|
||||
setPassword('')
|
||||
setServerIp('127.0.0.1')
|
||||
}
|
||||
}, [open])
|
||||
|
||||
// 监听是否到安装进度条步骤
|
||||
useEffect(() => {
|
||||
if (active == 4) {
|
||||
const interval = setInterval(() => {
|
||||
setPercentVal((val) => {
|
||||
const randomStep = Math.round(Math.random() * (100 / 10));
|
||||
const newPercent = val + randomStep;
|
||||
|
||||
if (newPercent >= 100) {
|
||||
clearInterval(interval);
|
||||
setValue()
|
||||
return 100;
|
||||
}
|
||||
|
||||
return newPercent;
|
||||
});
|
||||
}, 500);
|
||||
|
||||
return () => clearInterval(interval);
|
||||
}
|
||||
}, [active])
|
||||
|
||||
// 设置安装步骤进度
|
||||
const setValue = () => {
|
||||
setActive((e) => { return e + 1 })
|
||||
}
|
||||
|
||||
// 在指定的目录下安装快捷方式
|
||||
const installSuccess = async () => {
|
||||
try {
|
||||
const response = await fetch('http://localhost:3000/createShortcut', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
mode: "cors",
|
||||
body: JSON.stringify({
|
||||
folderPath: `${DEV.FILE_URL}/${countType[urlParams?.fileType]}`,
|
||||
shortcutName: '核心区客户端',
|
||||
shortcutURL: `${DEV.LOCAL_URL}/coreSystemEntrance/${urlParams?.fileType}?sysType=${encodeURIComponent(sysType[urlParams?.fileType] + '核心区')}`
|
||||
}),
|
||||
});
|
||||
const data = await response.text();
|
||||
setInstallExe(9, data)
|
||||
onCancel()
|
||||
} catch (error) {
|
||||
message.error(error); // 处理请求错误
|
||||
}
|
||||
}
|
||||
|
||||
const verifyPassword = () => {
|
||||
if (userName.trim().length == 0) {
|
||||
message.error('请输入用户名!')
|
||||
return true;
|
||||
}
|
||||
|
||||
if (password.trim().length == 0) {
|
||||
message.error('请输入密码!');
|
||||
return true;
|
||||
}
|
||||
|
||||
let sysName = localStorage.getItem(`${urlParams?.fileType}`);
|
||||
if (sysName) {
|
||||
let info = JSON.parse(sysName)
|
||||
if (password !== info.GBasePassword) {
|
||||
message.error('密码错误!');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return <>
|
||||
{
|
||||
open &&
|
||||
<div className={styles.modalOverlay}>
|
||||
<div className={styles.modal} style={{ width: 500, height: 460 }}>
|
||||
<img src={require(`../../../assets/images/coreArea/${active}.png`)} width={500} height={460} />
|
||||
|
||||
<div className={styles.close} onClick={() => {
|
||||
onCancel('核心区安装程序')
|
||||
}}></div>
|
||||
|
||||
{[1, 2, 3].includes(active) && <div className={styles.title}>核心区客户端 安装程序</div>}
|
||||
{![1, 2, 3].includes(active) && <div className={styles.title1}>核心区客户端 安装程序</div>}
|
||||
|
||||
{active == 1 && <div className={styles.pic1}>核心区客户端安装程序</div>}
|
||||
{active == 2 && <>
|
||||
<div className={styles.pic1} style={{ left: 10 }}>填写GBase账号信息</div>
|
||||
<div className={styles.pic1} style={{ fontSize: 12, top: 130, left: 16 }}>用户名</div>
|
||||
<div className={styles.pic1} style={{ fontSize: 12, top: 180, left: 27 }}>密码</div>
|
||||
<Input disabled value={userName} onChange={(e) => { setUserName(e.target.value) }} className={styles.input1} style={{ top: 121, left: 59, width: 325 }} />
|
||||
<Input value={password} onChange={(e) => { setPassword(e.target.value) }} className={styles.input2} style={{ top: 171, left: 59, width: 325 }} />
|
||||
</>}
|
||||
{active == 3 && <div className={styles.pic1} style={{ top: 166, left: 85 }}>核心区客户端</div>}
|
||||
{active == 5 && <div className={styles.pic1} style={{ top: 123, left: 85 }}>核心区客户端</div>}
|
||||
|
||||
{active == 6 && <>
|
||||
<div className={styles.pic1} style={{ left: 15, top: 45 }}>填写GBase账号信息</div>
|
||||
<div className={styles.pic1} style={{ fontSize: 12, top: 130, left: 16 }}>服务器的ip地址</div>
|
||||
<div className={styles.pic1} style={{ fontSize: 12, top: 180, left: 39 }}>服务器端口</div>
|
||||
<div className={styles.pic1} style={{ fontSize: 12, top: 230, left: 50 }}>本地端口</div>
|
||||
<Input value={serverIp} onChange={(e) => { setServerIp(e.target.value) }} className={styles.input1} style={{ top: 121, left: 109, width: 325 }} />
|
||||
<Input disabled value={serverPort} onChange={(e) => { setServerPort(e.target.value) }} className={styles.input2} style={{ top: 171, left: 109, width: 325 }} />
|
||||
<Input disabled value={localPort} onChange={(e) => { setLocalPort(e.target.value) }} className={styles.input2} style={{ top: 221, left: 109, width: 325 }} />
|
||||
<div className={styles.pic1} style={{ fontSize: 12, top: 427, left: 265 }}>确定</div>
|
||||
<div className={styles.pic1} style={{ fontSize: 12, top: 427, left: 343 }}>取消</div>
|
||||
<div className={styles.pic1} style={{ fontSize: 12, top: 427, left: 420 }}>应用</div>
|
||||
</>}
|
||||
|
||||
{[1, 2, 3].includes(active) && <div
|
||||
className={styles.net}
|
||||
onClick={() => {
|
||||
if (active == 2 && verifyPassword()) return
|
||||
setValue()
|
||||
}}>
|
||||
</div>}
|
||||
|
||||
{active == 4 && <div className={styles.progress} style={{ background: '#fff', height: 15, width: 375, bottom: 222, left: 33, }}>
|
||||
<Progress percent={percentVal} steps={42} size={[7, 14]} strokeColor={'rgb(56, 158, 13)'} trailColor={'rgba(0,0,0,0)'} showInfo={false} />
|
||||
</div>}
|
||||
|
||||
{[5, 6].includes(active) && <div
|
||||
className={styles.net}
|
||||
style={{ bottom: 17, right: active == 5 ? 27 : 187 }}
|
||||
onClick={() => {
|
||||
active == 5 ? setValue() : installSuccess()
|
||||
}}>
|
||||
</div>}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</>
|
||||
};
|
||||
|
||||
export default CoreArea;
|
@ -1,93 +0,0 @@
|
||||
import React, { FC, useEffect, useState } from 'react';
|
||||
import styles from './index.less';
|
||||
import { Input, Progress, message } from 'antd';
|
||||
|
||||
|
||||
interface PageProps {
|
||||
open: boolean;
|
||||
onCancel: (name?: string) => void;
|
||||
setInstallExe: (index: number, text: string) => void;
|
||||
}
|
||||
|
||||
const CodeDriver: FC<PageProps> = ({
|
||||
open = false,
|
||||
onCancel,
|
||||
setInstallExe
|
||||
}) => {
|
||||
const [active, setActive] = useState(1);
|
||||
const [percentVal, setPercentVal] = useState(0);
|
||||
|
||||
useEffect(() => {
|
||||
if (open) setActive(1)
|
||||
}, [open])
|
||||
|
||||
// 监听是否到安装进度条步骤
|
||||
useEffect(() => {
|
||||
if (active == 3) {
|
||||
const interval = setInterval(() => {
|
||||
setPercentVal((val) => {
|
||||
const randomStep = Math.round(Math.random() * (100 / 10));
|
||||
const newPercent = val + randomStep;
|
||||
|
||||
if (newPercent >= 100) {
|
||||
clearInterval(interval);
|
||||
setValue()
|
||||
return 100;
|
||||
}
|
||||
|
||||
return newPercent;
|
||||
});
|
||||
}, 500);
|
||||
|
||||
return () => clearInterval(interval);
|
||||
}
|
||||
}, [active])
|
||||
|
||||
// 设置安装步骤进度
|
||||
const setValue = () => {
|
||||
setActive((e) => { return e + 1 })
|
||||
}
|
||||
const installSuccess = () => {
|
||||
setInstallExe(12, '密码资源输入输出设备驱动安装成功!')
|
||||
onCancel()
|
||||
}
|
||||
|
||||
return <>
|
||||
{
|
||||
open &&
|
||||
<div className={styles.modalOverlay}>
|
||||
<div className={styles.modal} style={{ width: 500, height: 460 }}>
|
||||
<img src={require(`../../../assets/images/codemanage/${active}.png`)} width={500} height={460} />
|
||||
|
||||
<div className={styles.close} onClick={()=>{
|
||||
onCancel('密码资源输入输出设备驱动')
|
||||
}}></div>
|
||||
|
||||
{[1, 2].includes(active) && <div className={styles.title}>密码资源输入输出设备驱动 安装程序</div>}
|
||||
{![1, 2].includes(active) && <div className={styles.title1}>密码资源输入输出设备驱动 安装程序</div>}
|
||||
|
||||
{active == 1 && <div className={styles.pic1}>密码资源输入输出设备驱动安装程序</div>}
|
||||
{active == 2 && <div className={styles.pic1} style={{ top: 166, left: 85}}>密码资源输入输出设备驱动</div>}
|
||||
{active == 4 && <div className={styles.pic1} style={{ top: 123, left: 85}}>密码资源输入输出设备驱动</div>}
|
||||
|
||||
{[1, 2].includes(active) && <div
|
||||
className={styles.net}
|
||||
onClick={() => setValue()}>
|
||||
</div>}
|
||||
|
||||
{active == 3 && <div className={styles.progress} style={{ background: '#fff', height: 15, width: 375, bottom: 222, left: 33, }}>
|
||||
<Progress percent={percentVal} steps={42} size={[7, 14]} strokeColor={'rgb(56, 158, 13)'} trailColor={'rgba(0,0,0,0)'} showInfo={false} />
|
||||
</div>}
|
||||
|
||||
{active == 4 && <div
|
||||
className={styles.net}
|
||||
style={{ bottom: 17, right: 27 }}
|
||||
onClick={() => installSuccess()}>
|
||||
</div>}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</>
|
||||
};
|
||||
|
||||
export default CodeDriver;
|
@ -1,166 +0,0 @@
|
||||
import React, { FC, useEffect, useState } from 'react';
|
||||
import styles from './index.less';
|
||||
import { Input, Progress, message } from 'antd';
|
||||
import { countType, sysType } from '@/utils';
|
||||
import { useParams } from 'umi';
|
||||
import DEV from '@/utils/env/dev';
|
||||
|
||||
interface PageProps {
|
||||
open: boolean;
|
||||
onCancel: (name?: string) => void;
|
||||
setInstallExe: (index: number, text: string) => void;
|
||||
}
|
||||
|
||||
const DutyArea: FC<PageProps> = ({
|
||||
open = false,
|
||||
onCancel,
|
||||
setInstallExe
|
||||
}) => {
|
||||
const [active, setActive] = useState(1);
|
||||
const [percentVal, setPercentVal] = useState(0);
|
||||
const [userName, setUserName] = useState('root');
|
||||
const [password, setPassword] = useState('');
|
||||
|
||||
const [serverIp, setServerIp] = useState('127.0.0.1');
|
||||
const [serverPort, setServerPort] = useState('2222');
|
||||
const [localPort, setLocalPort] = useState('11110');
|
||||
|
||||
const urlParams = useParams();
|
||||
|
||||
useEffect(() => {
|
||||
if (open) {
|
||||
setActive(1)
|
||||
setPassword('')
|
||||
setServerIp('127.0.0.1')
|
||||
}
|
||||
}, [open])
|
||||
|
||||
// 监听是否到安装进度条步骤
|
||||
useEffect(() => {
|
||||
if (active == 4) {
|
||||
const interval = setInterval(() => {
|
||||
setPercentVal((val) => {
|
||||
const randomStep = Math.round(Math.random() * (100 / 10));
|
||||
const newPercent = val + randomStep;
|
||||
|
||||
if (newPercent >= 100) {
|
||||
clearInterval(interval);
|
||||
setValue()
|
||||
return 100;
|
||||
}
|
||||
|
||||
return newPercent;
|
||||
});
|
||||
}, 500);
|
||||
|
||||
return () => clearInterval(interval);
|
||||
}
|
||||
}, [active])
|
||||
|
||||
// 设置安装步骤进度
|
||||
const setValue = () => {
|
||||
setActive((e) => { return e + 1 })
|
||||
}
|
||||
|
||||
// 在指定的目录下安装快捷方式
|
||||
const installSuccess = async () => {
|
||||
try {
|
||||
const response = await fetch('http://localhost:3000/createShortcut', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
mode: "cors",
|
||||
body: JSON.stringify({
|
||||
folderPath: `${DEV.FILE_URL}/${countType[urlParams?.fileType]}`,
|
||||
shortcutName: '执勤区客户端',
|
||||
shortcutURL: `${DEV.LOCAL_URL}/coreSystemEntrance/${urlParams?.fileType}?sysType=${encodeURIComponent(sysType[urlParams?.fileType] + '执勤区')}`
|
||||
}),
|
||||
});
|
||||
const data = await response.text();
|
||||
setInstallExe(10, data)
|
||||
onCancel()
|
||||
} catch (error) {
|
||||
message.error(error); // 处理请求错误
|
||||
}
|
||||
}
|
||||
|
||||
const verifyPassword = () => {
|
||||
if (userName.trim().length == 0) {
|
||||
message.error('请输入用户名!')
|
||||
return true;
|
||||
}
|
||||
|
||||
if (password.trim().length == 0) {
|
||||
message.error('请输入密码!');
|
||||
return true;
|
||||
}
|
||||
|
||||
if (false) {
|
||||
message.error('用户名或密码错误!');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return <>
|
||||
{
|
||||
open &&
|
||||
<div className={styles.modalOverlay}>
|
||||
<div className={styles.modal} style={{ width: 500, height: 460 }}>
|
||||
<img src={require(`../../../assets/images/coreArea/${active}.png`)} width={500} height={460} />
|
||||
|
||||
<div className={styles.close} onClick={()=>{
|
||||
onCancel('执勤区安装程序')
|
||||
}}></div>
|
||||
|
||||
{[1, 2, 3].includes(active) && <div className={styles.title}>执勤区客户端 安装程序</div>}
|
||||
{![1, 2, 3].includes(active) && <div className={styles.title1}>执勤区客户端 安装程序</div>}
|
||||
|
||||
{active == 1 && <div className={styles.pic1}>执勤区客户端安装程序</div>}
|
||||
{active == 2 && <>
|
||||
<div className={styles.pic1} style={{left: 10}}>填写GBase账号信息</div>
|
||||
<div className={styles.pic1} style={{fontSize: 12, top: 130, left: 16}}>用户名</div>
|
||||
<div className={styles.pic1} style={{fontSize: 12, top: 180, left: 27}}>密码</div>
|
||||
<Input value={userName} onChange={(e) => { setUserName(e.target.value) }} className={styles.input1} style={{top: 121, left: 59, width: 325}}/>
|
||||
<Input value={password} onChange={(e) => { setPassword(e.target.value) }} className={styles.input2} style={{top: 171, left: 59, width: 325}}/>
|
||||
</>}
|
||||
{active == 3 && <div className={styles.pic1} style={{ top: 166, left: 85 }}>执勤区客户端</div>}
|
||||
{active == 5 && <div className={styles.pic1} style={{ top: 123, left: 85 }}>执勤区客户端</div>}
|
||||
|
||||
{active == 6 && <>
|
||||
<div className={styles.pic1} style={{left: 15, top: 45}}>填写GBase账号信息</div>
|
||||
<div className={styles.pic1} style={{fontSize: 12, top: 130, left: 16}}>服务器的ip地址</div>
|
||||
<div className={styles.pic1} style={{fontSize: 12, top: 180, left: 39}}>服务器端口</div>
|
||||
<div className={styles.pic1} style={{fontSize: 12, top: 230, left: 50}}>本地端口</div>
|
||||
<Input value={serverIp} onChange={(e) => { setServerIp(e.target.value) }} className={styles.input1} style={{top: 121, left: 109, width: 325}}/>
|
||||
<Input disabled value={serverPort} onChange={(e) => { setServerPort(e.target.value) }} className={styles.input2} style={{top: 171, left: 109, width: 325}}/>
|
||||
<Input disabled value={localPort} onChange={(e) => { setLocalPort(e.target.value) }} className={styles.input2} style={{top: 221, left: 109, width: 325}}/>
|
||||
<div className={styles.pic1} style={{fontSize: 12, top: 427, left: 265}}>确定</div>
|
||||
<div className={styles.pic1} style={{fontSize: 12, top: 427, left: 343}}>取消</div>
|
||||
<div className={styles.pic1} style={{fontSize: 12, top: 427, left: 420}}>应用</div>
|
||||
</>}
|
||||
|
||||
{[1, 2, 3].includes(active) && <div
|
||||
className={styles.net}
|
||||
onClick={() => {
|
||||
if (active == 2 && verifyPassword()) return
|
||||
setValue()
|
||||
}}>
|
||||
</div>}
|
||||
|
||||
{active == 4 && <div className={styles.progress} style={{ background: '#fff', height: 15, width: 375, bottom: 222, left: 33, }}>
|
||||
<Progress percent={percentVal} steps={42} size={[7, 14]} strokeColor={'rgb(56, 158, 13)'} trailColor={'rgba(0,0,0,0)'} showInfo={false} />
|
||||
</div>}
|
||||
|
||||
{[5, 6].includes(active) && <div
|
||||
className={styles.net}
|
||||
style={{ bottom: 17, right: active == 5 ? 27 : 187}}
|
||||
onClick={() => {
|
||||
active == 5 ? setValue() : installSuccess()
|
||||
}}>
|
||||
</div>}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</>
|
||||
};
|
||||
|
||||
export default DutyArea;
|
@ -1,203 +0,0 @@
|
||||
.modalOverlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
|
||||
-webkit-user-select: none; /* Safari */
|
||||
-moz-user-select: none; /* Firefox */
|
||||
-ms-user-select: none; /* IE10+/Edge */
|
||||
user-select: none; /* 标准语法 */
|
||||
}
|
||||
|
||||
.modal {
|
||||
position: relative;
|
||||
width: 689px;
|
||||
height: 508px;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
|
||||
|
||||
.a1 {
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
left: 385px;
|
||||
width: 40px;
|
||||
height: 35px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.a2 {
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
right: 15px;
|
||||
width: 115px;
|
||||
height: 35px;
|
||||
cursor: pointer;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
.dian {
|
||||
position: absolute;
|
||||
bottom: 101px;
|
||||
right: 324px;
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.dian1 {
|
||||
bottom: 133px;
|
||||
background-color: #333;
|
||||
}
|
||||
|
||||
.last {
|
||||
position: absolute;
|
||||
bottom: 25px;
|
||||
right: 40px;
|
||||
color: #444;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.input1, .input2 {
|
||||
width: 344px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
.input1 {
|
||||
position: absolute;
|
||||
bottom: 251px;
|
||||
right: 32px;
|
||||
}
|
||||
|
||||
.input2 {
|
||||
position: absolute;
|
||||
bottom: 208px;
|
||||
right: 32px;
|
||||
}
|
||||
|
||||
.progress {
|
||||
height: 20px;
|
||||
width: 450px;
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
right: 15px;
|
||||
background-color: #DCDFE6;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.g_e {
|
||||
position: absolute;
|
||||
width: 110px;
|
||||
height: 28px;
|
||||
bottom: 31px;
|
||||
right: 155px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.msx1 {
|
||||
position: absolute;
|
||||
width: 95px;
|
||||
height: 25px;
|
||||
bottom: 22px;
|
||||
right: 214px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.f_p {
|
||||
position: absolute;
|
||||
width: 170px;
|
||||
height: 40px;
|
||||
bottom: 30px;
|
||||
right: 27px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.net {
|
||||
position: absolute;
|
||||
width: 74px;
|
||||
height: 20px;
|
||||
bottom: 19px;
|
||||
right: 110px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.percentValVal {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
text-align: right;
|
||||
top: 116px;
|
||||
right: 95px;
|
||||
color: rgba(255, 255, 255, .8);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.h_g_e {
|
||||
position: absolute;
|
||||
width: 110px;
|
||||
height: 26px;
|
||||
color: #000;
|
||||
background-color: rgba(153, 153, 153, 0.2);
|
||||
border: 1px solid rgb(153, 153, 153);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
bottom: 20px;
|
||||
right: 38px;
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.gbase_close {
|
||||
position: absolute;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
top: 3px;
|
||||
right: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.title{
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
left: 25px;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.title1{
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 25px;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.pic1{
|
||||
position: absolute;
|
||||
top: 41px;
|
||||
left: 70px;
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.close{
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
// background: red;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
right: 5px;
|
||||
&:hover{
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
.exeInstall {
|
||||
width: 100vw;
|
||||
min-height: 100vh;
|
||||
background: url('../../assets/images/bk_img.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
|
||||
.title_con {
|
||||
width: 100%;
|
||||
padding: 2.2% 0;
|
||||
text-align: center;
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
color: rgba(15, 61, 123, 0.8);
|
||||
}
|
||||
|
||||
.box {
|
||||
width: 80%;
|
||||
height: 4.4vh;
|
||||
background: #FFFFFF;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #EAEAEA;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 3vh;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 14px;
|
||||
|
||||
&:hover {
|
||||
border-color: #41B0E2;
|
||||
color: #41B0E2;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.active_box {
|
||||
background-color: #41B0E2;
|
||||
color: #fff;
|
||||
border-color: #41B0E2;
|
||||
|
||||
&:hover {
|
||||
color: #fff;
|
||||
border-color: #41B0E2;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,100 @@
|
||||
import { FC, useEffect, useState } from 'react';
|
||||
import { history, useLocation, useParams } from 'umi';
|
||||
import ButtonComp from '@/components/ButtonComp';
|
||||
import ClearInfoDialog from '@/components/ClearInfoDialog';
|
||||
import NodeInitWrap from '@/components/NodeInitWrap';
|
||||
import ContentWarp from '@/components/ContentWarp';
|
||||
import { Button, ConfigProvider, Form, Input, Modal, Radio, Checkbox, message, Space,Select } from 'antd';
|
||||
|
||||
import DEV from '@/utils/env/dev';
|
||||
import { countType } from '@/utils/sysType';
|
||||
|
||||
interface PageProps {
|
||||
|
||||
}
|
||||
|
||||
const NodeInitTool: FC<PageProps> = ({ }) => {
|
||||
const urlParams = useParams();
|
||||
const [authOpen, setAuthOpen] = useState(true);
|
||||
const [noticeOpen,setNoticeOpen] = useState(false)
|
||||
|
||||
let sysInfo = localStorage.getItem(`${urlParams?.fileType}`);
|
||||
let info = sysInfo ? JSON.parse(sysInfo) : null;
|
||||
|
||||
useEffect(() => {
|
||||
installSuccess()
|
||||
setAuthOpen(true)
|
||||
}, [])
|
||||
|
||||
|
||||
// 在指定的目录下安装快捷方式
|
||||
const installSuccess = async () => {
|
||||
try {
|
||||
const response = await fetch('http://localhost:3001/createShortcut', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
mode: "cors",
|
||||
body: JSON.stringify({
|
||||
folderPath: `${DEV.FILE_URL}/${countType[urlParams?.fileType]}`,
|
||||
shortcutName: 'MMD063',
|
||||
shortcutURL: `${DEV.LOCAL_URL}/identifier/${urlParams?.fileType}`
|
||||
}),
|
||||
});
|
||||
} catch (error) {
|
||||
message.error(error); // 处理请求错误
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<section>
|
||||
<Modal
|
||||
title="XXX服务器"
|
||||
open={authOpen}
|
||||
centered
|
||||
footer={null}
|
||||
maskClosable={false}
|
||||
onCancel={() => {
|
||||
setAuthOpen(false)
|
||||
}}
|
||||
>
|
||||
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'flex-start' }}>
|
||||
<div style={{ marginRight: '10px' }}>输入口令</div>
|
||||
<div style={{ flex: 1 }}><Input /></div>
|
||||
</div>
|
||||
|
||||
<div className='flex_jE_AC mt30' >
|
||||
<ButtonComp type={'confirm'} text={'确定'} onClick={() => {
|
||||
setAuthOpen(false)
|
||||
setNoticeOpen(true)
|
||||
}} />
|
||||
</div>
|
||||
</Modal>
|
||||
<Modal
|
||||
title="XXX服务器"
|
||||
open={noticeOpen}
|
||||
centered
|
||||
footer={null}
|
||||
maskClosable={false}
|
||||
onCancel={() => {
|
||||
setAuthOpen(false)
|
||||
}}
|
||||
>
|
||||
<div>
|
||||
<div style={{ marginRight: '10px' }}>系统自检</div>
|
||||
<div>进度条</div>
|
||||
<div>提示文案</div>
|
||||
</div>
|
||||
|
||||
<div className='flex_jE_AC mt30' >
|
||||
<ButtonComp type={'confirm'} text={'确定'} onClick={() => {
|
||||
setNoticeOpen(false)
|
||||
}} />
|
||||
</div>
|
||||
</Modal>
|
||||
</section>
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
export default NodeInitTool
|
@ -0,0 +1,6 @@
|
||||
.nav{
|
||||
display:flex;
|
||||
align-items: center;
|
||||
margin-left:20px;
|
||||
margin-top:10px;
|
||||
}
|
@ -0,0 +1,191 @@
|
||||
import { FC, useEffect, useState } from 'react';
|
||||
import { history, useLocation, useParams } from 'umi';
|
||||
import ButtonComp from '@/components/ButtonComp';
|
||||
import { Table, message } from 'antd';
|
||||
import styles from './index.less';
|
||||
import CheckSelect from '@/components/CheckSelect';
|
||||
import CheckInput from '@/components/CheckInput';
|
||||
|
||||
import DEV from '@/utils/env/dev';
|
||||
import { countType } from '@/utils/sysType';
|
||||
|
||||
interface PageProps {
|
||||
|
||||
}
|
||||
|
||||
const MachineRegister: FC<PageProps> = ({ }) => {
|
||||
|
||||
const [params, setParams] = useState({
|
||||
page: 1,
|
||||
limit: 10,
|
||||
mdepart:null, //设备使用单位
|
||||
mposition:null,//设备部署地点
|
||||
mstate:null,//设备使用状态
|
||||
midentifer:null,// 密码实体标识
|
||||
mnumber:null,//上级设备编号
|
||||
});
|
||||
const [clearAll, setclearAll] = useState(false) // 点击复位按钮时所有的chebox都变为false
|
||||
const [result, setResult] = useState({})
|
||||
const [addModalVisible,setAddModalVisible] = useState<boolean>(false) //控制新增弹窗显隐
|
||||
|
||||
const urlParams = useParams();
|
||||
|
||||
let sysInfo = localStorage.getItem(`${urlParams?.fileType}`);
|
||||
let info = sysInfo ? JSON.parse(sysInfo) : null;
|
||||
|
||||
useEffect(() => {
|
||||
installSuccess()
|
||||
}, [])
|
||||
|
||||
|
||||
// 在指定的目录下安装快捷方式
|
||||
const installSuccess = async () => {
|
||||
try {
|
||||
const response = await fetch('http://localhost:3001/createShortcut', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
mode: "cors",
|
||||
body: JSON.stringify({
|
||||
folderPath: `${DEV.FILE_URL}/${countType[urlParams?.fileType]}`,
|
||||
shortcutName: '客户端',
|
||||
shortcutURL: `${DEV.LOCAL_URL}/machineManage/register/${urlParams?.fileType}`
|
||||
}),
|
||||
});
|
||||
} catch (error) {
|
||||
message.error(error); // 处理请求错误
|
||||
}
|
||||
}
|
||||
|
||||
const columns = [{
|
||||
title: '序号',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
ellipsis: true,
|
||||
fixed: 'left',
|
||||
width: 60,
|
||||
render: (text: any, record: any, index: any) => {
|
||||
return (
|
||||
<span style={{ color: "#333" }}>{params.limit * (params.page - 1) + index + 1}</span>
|
||||
)
|
||||
}
|
||||
}, {
|
||||
title: '设备实体标识',
|
||||
dataIndex: 'school_info',
|
||||
key: 'school_info',
|
||||
ellipsis: true,
|
||||
render: (text: any, record: any, index: any) => <span style={{ color: "#333" }}>{text.name}</span>
|
||||
}, {
|
||||
title: '设备编号',
|
||||
dataIndex: 'department_info',
|
||||
key: 'department_info',
|
||||
ellipsis: true,
|
||||
render: (text: any, record: any, index: any) => <span style={{ color: "#333" }}>{text.name}</span>
|
||||
}, {
|
||||
title: '设备名称',
|
||||
dataIndex: 'teacher_count',
|
||||
key: 'teacher_count',
|
||||
width: 90,
|
||||
ellipsis: true,
|
||||
render: (text: any, record: any) => <span style={{ color: '#165DFF', cursor: 'pointer' }} onClick={() => { history.push(`/colleges/${record?.school_info?.id}/statistics`) }}>{text}</span>
|
||||
}, {
|
||||
title: '工作状态',
|
||||
dataIndex: 'student_count',
|
||||
key: 'student_count',
|
||||
width: 90,
|
||||
ellipsis: true,
|
||||
render: (text: any, record: any) => <span style={{ color: '#165DFF', cursor: 'pointer' }} onClick={() => { history.push(`/colleges/${record?.school_info?.id}/statistics`) }}>{text}</span>
|
||||
}, {
|
||||
title: '使用单位',
|
||||
dataIndex: 'type_cn',
|
||||
key: 'type_cn',
|
||||
width: 100,
|
||||
ellipsis: true,
|
||||
render: (text: any) => <span style={{ color: "#333" }}>{text}</span>
|
||||
}, {
|
||||
title: '监控日志',
|
||||
dataIndex: 'service_end_time',
|
||||
key: 'service_end_time',
|
||||
ellipsis: true,
|
||||
render: (text: any, record: any, index: any) => <span title={(record?.service_start_time && record?.service_end_time) ? `${moment(record?.service_start_time).format('YYYY-MM-DD HH:mm')} - ${moment(record?.service_end_time).format('YYYY-MM-DD HH:mm')}` : '--'}
|
||||
style={{ color: "#000" }}> {(record?.service_start_time && record?.service_end_time) ? `${moment(record?.service_start_time).format('YYYY-MM-DD HH:mm')} - ${moment(record?.service_end_time).format('YYYY-MM-DD HH:mm')}` : '--'}</span>
|
||||
},]
|
||||
|
||||
// 查找
|
||||
const handleSearch = () => {
|
||||
console.log("params-", params)
|
||||
|
||||
}
|
||||
|
||||
// 复位
|
||||
const handleClear = () => {
|
||||
params.mdepart=null;
|
||||
params.mposition=null;
|
||||
params.mstate=null;
|
||||
params.midentifer=null;
|
||||
params.mnumber=null;
|
||||
setParams({...params})
|
||||
setclearAll(true)
|
||||
}
|
||||
|
||||
const getList = () => {
|
||||
|
||||
}
|
||||
|
||||
// 查询条件改变时设置参数
|
||||
const handleChange = (value:any,param:string) =>{
|
||||
params[`${param}`]=value;
|
||||
setParams({...params})
|
||||
setclearAll(false)
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<section style={{ margin: '20px' }}>
|
||||
|
||||
<div style={{ marginTop: '20px' }}>
|
||||
<Table
|
||||
columns={columns}
|
||||
// loading={tableLoading}
|
||||
dataSource={result?.list}
|
||||
pagination={{
|
||||
size: 'default',
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: ['10', '15', '50', '100', '200'],
|
||||
hideOnSinglePage: true,
|
||||
pageSize: params.limit,
|
||||
current: params.page,
|
||||
position: ["bottomRight"],
|
||||
onChange: (page, pagesize) => {
|
||||
params.page = page;
|
||||
params.limit = pagesize;
|
||||
setParams({ ...params });
|
||||
getList();
|
||||
},
|
||||
total: result?.count,
|
||||
showTotal: (total, range) => <span>共<span style={{ color: '#165DFF' }}> {total} </span>条数据</span>
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className='flex_aiC_jB mt30 mb30'>
|
||||
<div className='flex_aiC'>
|
||||
<ButtonComp style={{ marginRight: 20 }} text={'第一页'} onClick={() => { }} />
|
||||
<ButtonComp style={{ marginRight: 20 }} text={'上一页'} onClick={() => { }} />
|
||||
<ButtonComp style={{ marginRight: 20 }} text={'下一页'} onClick={() => { }} />
|
||||
<ButtonComp text={'最后一页'} onClick={() => { }} />
|
||||
</div>
|
||||
<div className='flex_aiC'>
|
||||
<ButtonComp style={{ marginRight: 20 }} type={'cancel'} text={'新增'} onClick={() => {setAddModalVisible(true) }} />
|
||||
<ButtonComp style={{ marginRight: 20 }} type={'cancel'} text={'修改'} onClick={() => { }} />
|
||||
<ButtonComp style={{ marginRight: 20 }} type={'cancel'} text={'删除'} onClick={() => { }} />
|
||||
<ButtonComp style={{ marginRight: 20 }} type={'cancel'} text={'退出'} onClick={() => { }} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
export default MachineRegister
|
@ -0,0 +1,67 @@
|
||||
import { FC, useEffect, useState } from 'react';
|
||||
import { history, useLocation, useParams } from 'umi';
|
||||
import ButtonComp from '@/components/ButtonComp';
|
||||
import ClearInfoDialog from '@/components/ClearInfoDialog';
|
||||
import NodeInitWrap from '@/components/NodeInitWrap';
|
||||
import ContentWarp from '@/components/ContentWarp';
|
||||
import { Button, ConfigProvider, Form, Input, Modal, Radio, Upload,UploadProps, Checkbox, message, Space,Select } from 'antd';
|
||||
|
||||
|
||||
interface PageProps {
|
||||
|
||||
}
|
||||
|
||||
const NodeInitTool: FC<PageProps> = ({ }) => {
|
||||
const [fileOpen, setFileOpen] = useState(true);
|
||||
const uploadprops: UploadProps = {
|
||||
maxCount: 1,
|
||||
beforeUpload: (file: any) => {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file, '11');
|
||||
console.log("file--", file)
|
||||
console.log("formData--", formData)
|
||||
// secretInit_loadData(formData).then((res) => {
|
||||
// if (res?.result == "success" && res?.data.length > 0) {
|
||||
// message.success('加载数据成功');
|
||||
// form.setFieldsValue({ ...res?.data[0] })
|
||||
// localStorage.setItem('MMJInit', JSON.stringify(res?.data[0]));
|
||||
// setDataLoading(true);
|
||||
// } else {
|
||||
// message.error(res?.errorMsg);
|
||||
// }
|
||||
// })
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
<section>
|
||||
<Modal
|
||||
title="导入"
|
||||
open={fileOpen}
|
||||
centered
|
||||
footer={null}
|
||||
maskClosable={false}
|
||||
onCancel={() => {
|
||||
setFileOpen(false)
|
||||
}}
|
||||
>
|
||||
<div><Radio defaultChecked>导入类型</Radio></div>
|
||||
<div className='mt20'>
|
||||
<Upload {...uploadprops} showUploadList={false}>
|
||||
<ButtonComp style={{ marginRight: 20 }} text={'选择一个文件'} />
|
||||
</Upload>
|
||||
</div>
|
||||
|
||||
<div className='flex_jE_AC mt30' >
|
||||
<ButtonComp type={'confirm'} text={'确定'} onClick={() => {
|
||||
setFileOpen(false)
|
||||
}} />
|
||||
</div>
|
||||
</Modal>
|
||||
</section>
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
export default NodeInitTool
|
@ -1,190 +0,0 @@
|
||||
import TabsComp from '@/components/TabsComp';
|
||||
import styles from '../../../GLQ/index.less';
|
||||
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 = [
|
||||
{
|
||||
title: '序号', key: 'index', align: 'center', width: 80,
|
||||
render: (a: any, b: any, c: any) => {
|
||||
return <span>{c + 1}</span>;
|
||||
},
|
||||
},
|
||||
{ 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' }
|
||||
]
|
||||
|
||||
|
||||
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) => {
|
||||
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
|
||||
dataSource={[{ id: 1, name: '密钥体申请' }]}
|
||||
activeTab={activeTab}
|
||||
onChange={(e) => setActiveTab(e)} />
|
||||
|
||||
<Form form={form} layout={'inline'} onFinish={onFinish} className='mt20'>
|
||||
<Form.Item name="applyNewOld" label="" style={{ width: '100%', marginBottom: 20 }}>
|
||||
<Radio.Group>
|
||||
<Radio value={'申请新密钥体'}> 申请新密钥体 </Radio>
|
||||
<Radio value={'申请旧密钥体'}> 申请旧密钥体 </Radio>
|
||||
</Radio.Group>
|
||||
</Form.Item>
|
||||
{/* 密钥种类字段未知 未对接字段 */}
|
||||
{/* <Form.Item name="keyType" label="密钥种类" style={formItemSty}>
|
||||
<Select
|
||||
placeholder="请选择密钥种类"
|
||||
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="productNum" label="产品编号" style={formItemSty} rules={[
|
||||
{ required: true, message: '请输入产品编号' }
|
||||
]}>
|
||||
<Input placeholder="请输入产品编号" style={{ width: 260 }} />
|
||||
</Form.Item>
|
||||
<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 placeholder="请输入申请数量" style={{ width: 260 }} type='number' min={1} />
|
||||
</Form.Item>
|
||||
<ButtonComp style={{ marginBottom: 30 }} text={'申请密钥体'} onClick={() => form.submit()} />
|
||||
</div>
|
||||
</Form>
|
||||
|
||||
<div className='mb20'>申请情况列表</div>
|
||||
<Table
|
||||
scroll={tableData.length > 0 ? { y: 41 * 9 } : {}}
|
||||
pagination={false}
|
||||
bordered
|
||||
columns={columns}
|
||||
dataSource={tableData}
|
||||
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,84 +0,0 @@
|
||||
import ContentWarp from '@/components/ContentWarp';
|
||||
import styles from '../../../GLQ/index.less';
|
||||
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 };
|
||||
|
||||
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={'管理协议加密的密文密钥体载体包封'}>
|
||||
<div className='pd20' style={{ paddingBottom: 30 }}>
|
||||
<Form form={form} layout={'inline'} onFinish={onFinish} className='mt20'>
|
||||
<Form.Item name="carrierType" label="载体类型" style={formItemSty} rules={[{ required: true, message: '请选择载体类型' }]}>
|
||||
<Select style={{ width: 260 }} placeholder="请选择载体类型" onChange={(e) => { }} options={[
|
||||
{ label: '软盘', value: 1 },
|
||||
{ label: '移动盘', value: 2 },
|
||||
{ label: '光盘', value: 3 },
|
||||
]} />
|
||||
</Form.Item>
|
||||
<Form.Item name="carrierModel" label="载体型号" style={formItemSty} rules={[{ required: true, message: '请选择载体型号' }]}>
|
||||
<Select style={{ width: 260 }} placeholder="请选择载体型号" onChange={(e) => { }} options={[
|
||||
{ label: '三寸', value: 1 }
|
||||
]} />
|
||||
</Form.Item>
|
||||
<Form.Item name="filePath" label="文件路径" style={{ width: '80%', marginBottom: 20 }} rules={[{ required: true, message: '请选择文件路径' }]}>
|
||||
<div style={{ display: 'flex' }}>
|
||||
<Input style={{ width: 480 }} disabled={true}/>
|
||||
<Upload {...props} showUploadList={false}>
|
||||
<ButtonComp style={{ marginLeft: 20 }} type={'cancel'} text={'选择'} onClick={() => { }} />
|
||||
</Upload>
|
||||
</div>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
|
||||
<div className='flex_jE mb20'>
|
||||
<ButtonComp text={'包封'} onClick={() => form.submit()} />
|
||||
</div>
|
||||
|
||||
<ContentWarp text={'包封结果'}>
|
||||
<div className='pd20'>
|
||||
<div className='flex_aiC'>
|
||||
<div style={{ marginRight: 30 }}>产品名称</div>
|
||||
<Input placeholder="请输入产品名称" style={{ width: 260 }} disabled={true} />
|
||||
|
||||
<div className='ml20' style={{ marginRight: 30 }}>产品编号</div>
|
||||
<Input placeholder="请输入产品编号" style={{ width: 260 }} disabled={true} />
|
||||
</div>
|
||||
|
||||
<div className='flex_aiC mt20'>
|
||||
<div className='mr16' >发起者标识</div>
|
||||
<Input placeholder="请输入发起者标识" style={{ width: 260 }} disabled={true} />
|
||||
|
||||
<div className='mr16 ml20' >接受者标识</div>
|
||||
<Input placeholder="请输入接受者标识" style={{ width: 260 }} disabled={true} />
|
||||
</div>
|
||||
</div>
|
||||
</ContentWarp>
|
||||
</div>
|
||||
</ContentWarp>
|
||||
</div>
|
||||
);
|
||||
}
|
@ -1,96 +0,0 @@
|
||||
import TabsComp from '@/components/TabsComp';
|
||||
import styles from '../../../GLQ/index.less';
|
||||
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 = [
|
||||
{
|
||||
title: '序号', key: 'index', align: 'center', width: 80,
|
||||
render: (a: any, b: any, c: any) => {
|
||||
return <span>{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: 'source', key: 'source', 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
|
||||
dataSource={[{ id: 1, name: '已清理密钥体列表' }]}
|
||||
activeTab={activeTab}
|
||||
onChange={(e) => setActiveTab(e)} />
|
||||
|
||||
<div className='flex_jE mb20'>
|
||||
<ButtonComp type={'cancel'} text={'刷新'} onClick={() => {
|
||||
pageNumber == 1 ? getList() : setPageNumber(1);
|
||||
}} />
|
||||
</div>
|
||||
|
||||
<Table
|
||||
scroll={tableData.length > 0 ? { y: 41 * 9 } : {}}
|
||||
pagination={false}
|
||||
bordered
|
||||
columns={columns}
|
||||
dataSource={tableData}
|
||||
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,37 +0,0 @@
|
||||
import TabsComp from '@/components/TabsComp';
|
||||
import styles from '../../../GLQ/index.less';
|
||||
import { useState } from 'react';
|
||||
import { ConfigProvider, Table } from 'antd';
|
||||
|
||||
import { rowClassName } from '@/utils';
|
||||
import ButtonComp from '@/components/ButtonComp';
|
||||
|
||||
export default function Page() {
|
||||
const [activeTab, setActiveTab] = useState(1)
|
||||
const [tableData, setTableData] = useState([]);
|
||||
|
||||
const columns: any = [
|
||||
{ title: '密钥体大代号', dataIndex: 'name', key: 'name', align: 'center' },
|
||||
{ title: '密钥体子代号', dataIndex: 'name', key: 'name', align: 'center' }
|
||||
]
|
||||
|
||||
return (
|
||||
<div className={`${styles.params_warp}`}>
|
||||
<TabsComp
|
||||
dataSource={[{ id: 1, name: '密钥体代号对照表' }]}
|
||||
activeTab={activeTab}
|
||||
onChange={(e) => setActiveTab(e)} />
|
||||
|
||||
<Table
|
||||
scroll={tableData.length > 0 ? { y: 41 * 9 } : {}}
|
||||
pagination={false}
|
||||
bordered
|
||||
columns={columns}
|
||||
dataSource={tableData}
|
||||
rowKey={(record: any) => record?.id}
|
||||
rowClassName={rowClassName}
|
||||
/>
|
||||
|
||||
</div>
|
||||
);
|
||||
}
|
@ -1,294 +0,0 @@
|
||||
import TabsComp from '@/components/TabsComp';
|
||||
import styles from '../../../GLQ/index.less';
|
||||
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: 80,
|
||||
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: '序号', key: 'index', align: 'center', width: 80,
|
||||
render: (a: any, b: any, c: any) => {
|
||||
return <span>{(pageNumber1 - 1) * pageSize1 + c + 1}</span>;
|
||||
},
|
||||
},
|
||||
// { 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' }
|
||||
]
|
||||
|
||||
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();
|
||||
setSelectedRowKeys([])
|
||||
}, [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: '向邮箱配发密钥体' }]}
|
||||
activeTab={activeTab}
|
||||
onChange={(e) => setActiveTab(e)} />
|
||||
|
||||
<Form form={form} layout={'inline'} onFinish={onFinish} className='mt20'>
|
||||
<Form.Item name="productName" label="产品名称" style={formItemSty}>
|
||||
<Select style={{ width: 260 }} placeholder="请选择产品名称" onChange={(e) => { }} options={selectData.productName} />
|
||||
</Form.Item>
|
||||
<Form.Item name="carrierType" label="载体类型" style={formItemSty}>
|
||||
<Select style={{ width: 260 }} placeholder="请选择载体类型" onChange={(e) => { }} options={selectData.carrierType} />
|
||||
</Form.Item>
|
||||
{/* <Form.Item name="aaa" label="可下载数量" style={formItemSty}>
|
||||
<Input placeholder="请输入可下载数量" style={{ width: 260 }} />
|
||||
</Form.Item> */}
|
||||
<Form.Item name="productNum" label="产品编号" style={formItemSty}>
|
||||
<Input placeholder="请输入产品编号" style={{ width: 260 }} />
|
||||
</Form.Item>
|
||||
<div className='flex_aiC'>
|
||||
<Form.Item name="carrierNumber" label="载体型号" style={{ marginBottom: 30 }}>
|
||||
<Select style={{ width: 260 }} placeholder="请选择载体型号" onChange={(e) => { }} options={selectData.carrierNumber} />
|
||||
</Form.Item>
|
||||
<ButtonComp style={{ marginBottom: 30 }} text={'查询'} onClick={() => form.submit()} />
|
||||
</div>
|
||||
{/* <Form.Item name="aaa" label=" 下载授权" style={formItemSty}>
|
||||
<Select style={{ width: 260 }} placeholder="请选择下载授权" onChange={(e) => { }} options={[
|
||||
{ label: '已授权', value: '已授权' },
|
||||
{ label: '未授权', value: '未授权' }
|
||||
]} />
|
||||
</Form.Item>
|
||||
<Form.Item name="systemName" label="目的系统" style={formItemSty}>
|
||||
<Select style={{ width: 260 }} placeholder="请选择目的系统" onChange={(e) => { }} options={[]} />
|
||||
</Form.Item>
|
||||
<Form.Item name="quantity" label="配发数量" style={formItemSty}>
|
||||
<Input placeholder="请输入配发数量" style={{ width: 260 }} type='number' min={0} />
|
||||
</Form.Item>
|
||||
<Form.Item name="aaa" label=" 优先级" style={formItemSty}>
|
||||
<Select style={{ width: 260 }} placeholder="请选择优先级" 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>
|
||||
|
||||
|
||||
<div className='mb20 flex_aiC_jB'>
|
||||
<div>密钥体列表</div>
|
||||
<ButtonComp type={'cancel'} text={'配发'} onClick={() => sending(2)} />
|
||||
</div>
|
||||
|
||||
<Table
|
||||
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,111 +0,0 @@
|
||||
import TabsComp from '@/components/TabsComp';
|
||||
import styles from '../../../GLQ/index.less';
|
||||
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: 80,
|
||||
render: (a: any, b: any, c: any) => {
|
||||
return <span>{(pageNumber - 1) * pageSize + c + 1}</span>;
|
||||
},
|
||||
},
|
||||
{ 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
|
||||
dataSource={[{ id: 1, name: '密钥体格式导入和删除' }]}
|
||||
activeTab={activeTab}
|
||||
onChange={(e) => setActiveTab(e)} />
|
||||
|
||||
<div className='mb20 flex_aiC_jB'>
|
||||
<div>密钥体格式列表</div>
|
||||
<div style={{ display: 'flex' }}>
|
||||
<Upload {...props} showUploadList={false}>
|
||||
<ButtonComp style={{ marginRight: 20 }} text={'密钥体格式导入'} />
|
||||
</Upload>
|
||||
<ButtonComp type={'delete'} text={'删除'} onClick={() => { }} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Table
|
||||
scroll={tableData.length > 0 ? { y: 41 * 9 } : {}}
|
||||
pagination={false}
|
||||
bordered
|
||||
columns={columns}
|
||||
dataSource={tableData}
|
||||
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,213 +0,0 @@
|
||||
import TabsComp from '@/components/TabsComp';
|
||||
import styles from '../../../GLQ/index.less';
|
||||
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();
|
||||
setSelectedRowKeys([])
|
||||
setAllRowKeys([])
|
||||
}, [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 = [
|
||||
{
|
||||
title: '序号', key: 'index', align: 'center', width: 80,
|
||||
render: (a: any, b: any, c: any) => {
|
||||
return <span>{c + 1}</span>;
|
||||
},
|
||||
},
|
||||
{ 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 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
|
||||
dataSource={[{ id: 1, name: '密钥体格式发布' }]}
|
||||
activeTab={activeTab}
|
||||
onChange={(e) => setActiveTab(e)} />
|
||||
|
||||
<Form form={form} layout={'inline'} onFinish={onFinish} className='mt20'>
|
||||
<Form.Item name="productName" label="产品名称" style={formItemSty}>
|
||||
<Select style={{ width: 260 }} placeholder="请选择产品名称" onChange={(e) => { }} options={selectData.productName} />
|
||||
</Form.Item>
|
||||
<Form.Item name="carrierType" label="载体类型" style={formItemSty}>
|
||||
<Select style={{ width: 260 }} placeholder="请选择载体类型" onChange={(e) => { }} options={selectData.carrierType} />
|
||||
</Form.Item>
|
||||
<Form.Item name="carrierNumber" label="载体型号" style={formItemSty}>
|
||||
<Select style={{ width: 260 }} placeholder="请选择载体型号" onChange={(e) => { }} options={selectData.carrierNumber} />
|
||||
</Form.Item>
|
||||
<Form.Item name="publisherType" label="发布方式" style={formItemSty}>
|
||||
<Select style={{ width: 260 }} placeholder="请选择发布方式" onChange={(e) => { }} options={selectData.publisherType} />
|
||||
</Form.Item>
|
||||
{/* <Form.Item name="aaa" label="目的系统" style={formItemSty}>
|
||||
<Select style={{ width: 260 }} placeholder="请选择目的系统" onChange={(e) => { }} options={[]} />
|
||||
</Form.Item> */}
|
||||
</Form>
|
||||
|
||||
<div className='flex_jE' style={{ marginBottom: 30 }}>
|
||||
<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={() => setSelectedRowKeys(allRowKeys)} />
|
||||
</div>
|
||||
|
||||
<Table
|
||||
scroll={tableData.length > 0 ? { y: 41 * 9 } : {}}
|
||||
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>
|
||||
);
|
||||
}
|
@ -1,81 +0,0 @@
|
||||
import ContentWarp from '@/components/ContentWarp';
|
||||
import styles from '../../../GLQ/index.less';
|
||||
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 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} rules={[{ required: true, message: '请输入产品名称' }]}>
|
||||
<Input placeholder="请输入产品名称" style={{ width: 260 }} />
|
||||
</Form.Item>
|
||||
<Form.Item name="aaa" label="产品编号" style={formItemSty} rules={[{ required: true, message: '请输入产品编号' }]}>
|
||||
<Input placeholder="请输入产品编号" style={{ width: 260 }} />
|
||||
</Form.Item>
|
||||
<Form.Item name="aaa" label="载体编号" style={formItemSty} rules={[{ required: true, message: '请选输入载体编号' }]}>
|
||||
<Input placeholder="请输入载体编号" style={{ width: 260 }} />
|
||||
</Form.Item>
|
||||
<Form.Item name="aaa" label="载体类型" style={formItemSty} rules={[{ required: true, message: '请选择载体类型' }]}>
|
||||
<Select style={{ width: 260 }} placeholder="请选择载体类型" onChange={(e) => { }} options={typeList} />
|
||||
</Form.Item>
|
||||
<Form.Item name="aaa" label="载体型号" style={formItemSty} rules={[{ required: true, message: '请选择载体型号' }]}>
|
||||
<Select style={{ width: 260 }} placeholder="请选择载体型号" onChange={(e) => { }} options={[{ label: '三寸', value: 1 }]} />
|
||||
</Form.Item>
|
||||
<Form.Item name="filePath" label="文件路径" style={{ width: '80%', marginBottom: 20 }} rules={[{ required: true, message: '请选择文件路径' }]}>
|
||||
<div style={{ display: 'flex' }}>
|
||||
<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} rules={[{ required: true, message: '请选择载体位置' }]}>
|
||||
<Select style={{ width: 260 }} placeholder="请选择载体位置" onChange={(e) => { }} options={[
|
||||
{ label: '1', value: 1 },
|
||||
{ label: '2', value: 2 }
|
||||
]} />
|
||||
</Form.Item>
|
||||
</Form>
|
||||
<div className={styles.btn_warp}>
|
||||
<ButtonComp text={'包封'} onClick={() => form.submit()} />
|
||||
</div>
|
||||
</div>
|
||||
</ContentWarp>
|
||||
</div>
|
||||
);
|
||||
}
|
@ -1,274 +0,0 @@
|
||||
import TabsComp from '@/components/TabsComp';
|
||||
import styles from '../../../GLQ/index.less';
|
||||
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: '序号', key: 'index', align: 'center', width: 80,
|
||||
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: '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();
|
||||
setSelectedRowKeys([])
|
||||
}, [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 = () => {
|
||||
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: '在线向下级管理系统配发密钥体' }]}
|
||||
activeTab={activeTab}
|
||||
onChange={(e) => setActiveTab(e)} />
|
||||
|
||||
<Form form={form} layout={'inline'} onFinish={onFinish} className='mt20'>
|
||||
<Form.Item name="productName" label="产品名称" style={formItemSty}>
|
||||
<Select style={{ width: 260 }} placeholder="请选择产品名称" onChange={(e) => { }} options={selectData.productName} />
|
||||
</Form.Item>
|
||||
<Form.Item name="productNum" label="产品编号" style={formItemSty}>
|
||||
<Input placeholder="载体类型" style={{ width: 260 }} />
|
||||
</Form.Item>
|
||||
<Form.Item name="carrierType" label="载体类型" style={formItemSty}>
|
||||
<Select style={{ width: 260 }} placeholder={'请选择载体类型'} onChange={(e) => { }} options={selectData.carrierType} />
|
||||
</Form.Item>
|
||||
<div className='flex_aiC'>
|
||||
<Form.Item name="carrierNumber" label="载体型号" style={{ marginBottom: 30 }}>
|
||||
<Select style={{ width: 260 }} placeholder={'请选择载体型号'} 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 placeholder="请输入申请编号" 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={() => sending(1)} />
|
||||
</div>
|
||||
|
||||
<Table
|
||||
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,301 +0,0 @@
|
||||
import TabsComp from '@/components/TabsComp';
|
||||
import styles from '../../../GLQ/index.less';
|
||||
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 [form] = Form.useForm();
|
||||
const [selectData, setSelectData] = useState<any>({
|
||||
productName: [],
|
||||
publisherType: []
|
||||
});
|
||||
// 密钥体
|
||||
const [tableData, setTableData] = useState([]);
|
||||
const [pageNumber, setPageNumber] = useState(1);
|
||||
const [pageSize, setpageSize] = useState(10);
|
||||
const [total, setTotal] = useState(0);
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
||||
// 配发
|
||||
const [tableData1, setTableData1] = useState([]);
|
||||
const [pageNumber1, setPageNumber1] = useState(1);
|
||||
const [pageSize1, setpageSize1] = useState(10);
|
||||
const [total1, setTotal1] = useState(0);
|
||||
const [selectedPFKeys, setSelectedPFKeys] = useState([]);
|
||||
const [allRowKeys, setAllRowKeys] = useState([]);
|
||||
// 执勤
|
||||
const [tableData2, setTableData2] = useState([]);
|
||||
const [pageNumber2, setPageNumber2] = useState(1);
|
||||
const [pageSize2, setpageSize2] = useState(10);
|
||||
const [total2, setTotal2] = useState(0);
|
||||
|
||||
const formItemSty = { width: 'auto', marginBottom: 20, marginRight: 30 };
|
||||
|
||||
const columns: any = [
|
||||
{
|
||||
title: '序号', key: 'index', align: 'center', width: 80,
|
||||
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: '序号', key: 'index', align: 'center', width: 80,
|
||||
render: (a: any, b: any, c: any) => {
|
||||
return <span>{c + 1}</span>;
|
||||
},
|
||||
},
|
||||
{ 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' }
|
||||
]
|
||||
|
||||
const columns2: 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' },
|
||||
]
|
||||
|
||||
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();
|
||||
setSelectedRowKeys([])
|
||||
}, [pageNumber]);
|
||||
|
||||
useEffect(() => {
|
||||
getList1();
|
||||
setSelectedPFKeys([])
|
||||
}, [pageNumber1]);
|
||||
|
||||
|
||||
// 获取密钥体列表
|
||||
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 ? getList1() : setPageNumber1(1);
|
||||
setSelectedRowKeys([]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const onFinish = () => {
|
||||
pageNumber == 1 ? getList() : setPageNumber(1);
|
||||
};
|
||||
|
||||
// 获取向专用密码管理系统配发列表
|
||||
const getList1 = () => {
|
||||
privateIssueList({ pageNumber: pageNumber1, pageSize: pageSize1 }).then((res) => {
|
||||
if (res?.result == "success") {
|
||||
setTotal1(res.data[0].total)
|
||||
setTableData1(res.data[0].list)
|
||||
const keys = res.data[0].list.map((item: any) => item?.id);
|
||||
setAllRowKeys(keys);
|
||||
} else {
|
||||
message.error(res?.errorMsg);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={`${styles.params_warp}`}>
|
||||
<TabsComp
|
||||
dataSource={[{ id: 1, name: '向专用密码管理系统配发密钥体' }]}
|
||||
activeTab={activeTab}
|
||||
onChange={(e) => setActiveTab(e)} />
|
||||
|
||||
<div style={{ display: 'flex' }}>
|
||||
<ButtonComp type={'special'} text={'向专用密码管理系统配发密钥体'} onClick={() => { }} />
|
||||
</div>
|
||||
|
||||
<div className='flex_aiC mt20'>
|
||||
|
||||
<Form form={form} layout={'inline'} onFinish={onFinish} className='mt20'>
|
||||
{/* <Form.Item name="aaa" label="目的系统" style={formItemSty}>
|
||||
<Select style={{ width: 260 }} placeholder={'请选择目的系统'} onChange={(e) => { }} options={[]} />
|
||||
</Form.Item> */}
|
||||
<Form.Item name="productName" label="产品名称" style={formItemSty}>
|
||||
<Select style={{ width: 260 }} placeholder={'请选择产品名称'} onChange={(e) => { }} options={selectData.productName} />
|
||||
</Form.Item>
|
||||
<div className='flex_aiC'>
|
||||
<Form.Item name="productNum" label="产品编号" style={{ marginBottom: 30 }}>
|
||||
<Input placeholder="请输入产品编号" 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='mb20 flex_aiC_jB'>
|
||||
<div>密钥体列表</div>
|
||||
<ButtonComp type={'cancel'} text={'配发'} onClick={() => sending(3)} />
|
||||
</div>
|
||||
|
||||
<Table
|
||||
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>
|
||||
<ButtonComp type={'cancel'} text={'全部'} onClick={() => {setSelectedPFKeys(allRowKeys)}} />
|
||||
</div>
|
||||
|
||||
<Table
|
||||
scroll={tableData1.length > 0 ? { y: 41 * 5 } : {}}
|
||||
pagination={false}
|
||||
bordered
|
||||
columns={columns1}
|
||||
dataSource={tableData1}
|
||||
rowKey={(record: any) => record?.id}
|
||||
rowClassName={rowClassName}
|
||||
rowSelection={{
|
||||
selectedRowKeys: selectedPFKeys,
|
||||
onChange: (selectedKeys: any) => {
|
||||
setSelectedPFKeys(selectedKeys);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
{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 className='mt30 mb20 flex_aiC_jB'>
|
||||
<div>执勤列表</div>
|
||||
<ButtonComp text={'同步'} onClick={() => { message.info('建设中') }} />
|
||||
</div>
|
||||
|
||||
<Table
|
||||
scroll={tableData2.length > 0 ? { y: 41 * 5 } : {}}
|
||||
pagination={false}
|
||||
bordered
|
||||
columns={columns2}
|
||||
dataSource={tableData2}
|
||||
rowKey={(record: any) => record?.id}
|
||||
rowClassName={rowClassName}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
@ -1,108 +0,0 @@
|
||||
import styles from '../../../GLQ/index.less';
|
||||
import { useState } from 'react';
|
||||
import { ConfigProvider, Modal, Select, Table } from 'antd';
|
||||
|
||||
import { rowClassName } from '@/utils';
|
||||
import ButtonComp from '@/components/ButtonComp';
|
||||
|
||||
export default function Page() {
|
||||
const [tableData, setTableData] = useState([]);
|
||||
const [visibility, setVisibility] = useState(false);
|
||||
|
||||
const columns: any = [
|
||||
{
|
||||
title: '序号', key: 'index', align: 'center', width: 80,
|
||||
render: (a: any, b: any, c: any) => {
|
||||
return <span>{c + 1}</span>;
|
||||
},
|
||||
},
|
||||
{ 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: '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' }
|
||||
]
|
||||
|
||||
const columns1: any = [
|
||||
{
|
||||
title: '序号', key: 'index', align: 'center', width: 80,
|
||||
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: '310标识', 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: 'name', key: 'name', align: 'center' }
|
||||
]
|
||||
|
||||
return (
|
||||
<div className={`${styles.params_warp}`}>
|
||||
<ButtonComp type={'special'} text={'密钥配置查询'} onClick={() => { }} />
|
||||
<ButtonComp style={{ margin: '20px 0 ' }} text={'选择设备'} onClick={() => setVisibility(true)} />
|
||||
|
||||
<Table
|
||||
scroll={tableData.length > 0 ? { y: 41 * 9 } : {}}
|
||||
pagination={false}
|
||||
bordered
|
||||
columns={columns}
|
||||
dataSource={tableData}
|
||||
rowKey={(record: any) => record?.id}
|
||||
rowClassName={rowClassName}
|
||||
/>
|
||||
|
||||
<Modal
|
||||
title="选择设备"
|
||||
open={visibility}
|
||||
centered
|
||||
width={1100}
|
||||
onCancel={() => setVisibility(false)}
|
||||
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 }} placeholder={'请选择检索项'} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
|
||||
|
||||
<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 }} placeholder={'请选择管理代理'} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
|
||||
|
||||
<ButtonComp text={'查找'} onClick={() => { }} />
|
||||
</div>
|
||||
|
||||
<Table
|
||||
scroll={tableData.length > 0 ? { y: 41 * 8 } : {}}
|
||||
pagination={false}
|
||||
bordered
|
||||
columns={columns1}
|
||||
dataSource={tableData}
|
||||
rowKey={(record: any) => record?.id}
|
||||
rowClassName={rowClassName}
|
||||
/>
|
||||
|
||||
<div className='flex_jE mt20'>
|
||||
<ButtonComp style={{ marginRight: 20 }} text={'确定'} onClick={() => { }} />
|
||||
<ButtonComp type='cancel' text={'取消'} onClick={() => { }} />
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
);
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
import styles from '../../../GLQ/index.less';
|
||||
import { useState } from 'react';
|
||||
import { ConfigProvider, Select, Table } from 'antd';
|
||||
|
||||
import { rowClassName } from '@/utils';
|
||||
import ButtonComp from '@/components/ButtonComp';
|
||||
|
||||
export default function Page() {
|
||||
const [tableData, setTableData] = useState([]);
|
||||
|
||||
const columns: any = [
|
||||
{
|
||||
title: '序号', key: 'index', align: 'center', width: 80,
|
||||
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: '000标识', 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' }
|
||||
]
|
||||
|
||||
return (
|
||||
<div className={`${styles.params_warp}`}>
|
||||
<ButtonComp type={'special'} text={'专用密钥装配'} onClick={() => { }} />
|
||||
|
||||
<div className='flex_aiC mt20 mb20'>
|
||||
<div className='mr16'>密钥类型</div>
|
||||
<Select style={{ width: 260, marginRight: 20 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
|
||||
|
||||
<div className='mr16'>管理代理</div>
|
||||
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
|
||||
</div>
|
||||
|
||||
<div className='mt30 mb30'>专用密钥装配列表</div>
|
||||
|
||||
<div className='mb10'>用户密钥装配列表</div>
|
||||
<Table
|
||||
scroll={tableData.length > 0 ? { y: 41 * 8 } : {}}
|
||||
pagination={false}
|
||||
bordered
|
||||
columns={columns}
|
||||
dataSource={tableData}
|
||||
rowKey={(record: any) => record?.id}
|
||||
rowClassName={rowClassName}
|
||||
/>
|
||||
|
||||
<div className='flex_jE mt20'>
|
||||
<ButtonComp type='cancel' style={{ marginRight: 20 }} text={'过滤'} onClick={() => { }} />
|
||||
<ButtonComp type='cancel' style={{ marginRight: 20 }} text={'载体输出'} onClick={() => { }} />
|
||||
<ButtonComp type='cancel' text={'下载到邮箱'} onClick={() => { }} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
.center_w {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
align-content: center;
|
||||
}
|
||||
|
||||
.btn {
|
||||
position: relative;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: linear-gradient(180deg, #87CDEE 0%, #69C0E9 34%, #7ECDF2 51%, #56B9E6 63%, #81D7FE 100%);
|
||||
box-shadow: 0px 2px 4px 0px #BDCDE2;
|
||||
border-radius: 4px;
|
||||
border: 1px solid rgba(76, 106, 118, 0.22);
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0 15%;
|
||||
}
|
||||
|
||||
.no_btn {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: #E2F3FA;
|
||||
box-shadow: 0px 2px 4px 0px rgba(81,84,90,0.5);
|
||||
border-radius: 4px;
|
||||
border: 1px solid rgba(171, 207, 223, 0.22);
|
||||
cursor: not-allowed;
|
||||
|
||||
.sjx {
|
||||
border-left: 12px solid #9FB5BC;
|
||||
}
|
||||
|
||||
.sjx1 {
|
||||
border-left: 0px solid #9FB5BC;
|
||||
border-right: 12px solid #9FB5BC;
|
||||
}
|
||||
}
|
||||
|
||||
.sjx {
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 12px solid #fff;
|
||||
border-bottom: 12px solid transparent;
|
||||
border-top: 12px solid transparent;
|
||||
transition: all 0.15s ease-in;
|
||||
}
|
||||
|
||||
.sjx1 {
|
||||
border-left: 0px solid #fff;
|
||||
border-right: 12px solid #fff;
|
||||
}
|
@ -1,91 +0,0 @@
|
||||
import styles from '../../../GLQ/index.less';
|
||||
import styles1 from './index.less';
|
||||
import { useState } from 'react';
|
||||
import { ConfigProvider, Select, Table } from 'antd';
|
||||
|
||||
import { rowClassName } from '@/utils';
|
||||
import ButtonComp from '@/components/ButtonComp';
|
||||
|
||||
export default function Page() {
|
||||
const [tableData, setTableData] = useState([]);
|
||||
const [tableData1, setTableData1] = useState([]);
|
||||
|
||||
let number = {
|
||||
title: '序号', key: 'index', align: 'center', width: 80,
|
||||
render: (a: any, b: any, c: any) => {
|
||||
return <span>{c + 1}</span>;
|
||||
},
|
||||
}
|
||||
|
||||
const columns: any = [
|
||||
number,
|
||||
{ title: '设备名称', dataIndex: 'name', key: 'name', align: 'center' },
|
||||
{ title: '管理实体标识', dataIndex: 'name', key: 'name', align: 'center' },
|
||||
{ title: '设备型号', dataIndex: 'name', key: 'name', align: 'center' }
|
||||
]
|
||||
|
||||
const columns1: any = [
|
||||
number,
|
||||
{ title: '设备名称', dataIndex: 'name', key: 'name', align: 'center' },
|
||||
{ title: '管理实体标识', dataIndex: 'name', key: 'name', align: 'center' },
|
||||
{ title: '设备型号', dataIndex: 'name', key: 'name', align: 'center' }
|
||||
]
|
||||
|
||||
return (
|
||||
<div className={`${styles.params_warp}`}>
|
||||
<ButtonComp type={'special'} text={'管理系统管理盘数据维护'} onClick={() => { }} />
|
||||
|
||||
<div className='flex_aiC mt20'>
|
||||
<div className='mr16'>请选择源互通类型</div>
|
||||
<Select style={{ width: 260 }} onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
|
||||
</div>
|
||||
|
||||
<div className='flex_aiC mt20 mb20'>
|
||||
<ButtonComp text={'数据导入'} onClick={() => { }} />
|
||||
</div>
|
||||
|
||||
<div className='flex_jB'>
|
||||
{/* 左侧 */}
|
||||
<div style={{ width: '43%' }}>
|
||||
<div className='mb20' style={{ color: '#0087DA' }}>目标设备信息列表</div>
|
||||
<Table
|
||||
scroll={tableData.length > 0 ? { y: 41 * 10 } : {}}
|
||||
pagination={false}
|
||||
bordered
|
||||
columns={columns}
|
||||
dataSource={tableData}
|
||||
rowKey={(record: any) => record?.id}
|
||||
rowClassName={rowClassName}
|
||||
/>
|
||||
</div>
|
||||
{/* 中间 */}
|
||||
<div className={`${styles1.center_w} mb20`}>
|
||||
<div className={`${styles1.btn} ${tableData.length == 0 ? styles1.no_btn : ''}`} style={{ margin: 40 }}>
|
||||
<div className={styles1.sjx} />
|
||||
</div>
|
||||
<div className={`${styles1.btn} ${tableData1.length == 0 ? styles1.no_btn : ''}`}>
|
||||
<div className={`${styles1.sjx} ${styles1.sjx1}`} />
|
||||
</div>
|
||||
</div>
|
||||
{/* 底部 */}
|
||||
<div style={{ width: '43%' }}>
|
||||
<div className='mb20' style={{ color: '#0087DA' }}>已经配置的设备信息</div>
|
||||
<Table
|
||||
scroll={tableData1.length > 0 ? { y: 41 * 10 } : {}}
|
||||
pagination={false}
|
||||
bordered
|
||||
columns={columns1}
|
||||
dataSource={tableData1}
|
||||
rowKey={(record: any) => record?.id}
|
||||
rowClassName={rowClassName}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='flex_jE' style={{ marginTop: 30 }}>
|
||||
<ButtonComp style={{ marginRight: 20 }} type={'cancel'} text={'取消'} onClick={() => { }} />
|
||||
<ButtonComp text={'保存'} onClick={() => { }} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
@ -1,95 +0,0 @@
|
||||
import styles from '../../../GLQ/index.less';
|
||||
import { useState } from 'react';
|
||||
import { ConfigProvider, DatePicker, Select, Table } from 'antd';
|
||||
|
||||
import { rowClassName } from '@/utils';
|
||||
import ButtonComp from '@/components/ButtonComp';
|
||||
|
||||
export default function Page() {
|
||||
const [tableData, setTableData] = useState([]);
|
||||
|
||||
const columns: any = [
|
||||
{ title: '产品名称', dataIndex: 'productName', key: 'productName', align: 'center' },
|
||||
{ title: '产品编号', dataIndex: 'productNum', key: 'productNum', align: 'center' },
|
||||
{ title: '装配情况', dataIndex: 'name', key: 'name', align: 'center' }
|
||||
]
|
||||
|
||||
const columns1: any = [
|
||||
{
|
||||
title: '序号', key: 'index', align: 'center', width: 80,
|
||||
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: '000标识', dataIndex: 'name', key: 'name', align: 'center' },
|
||||
{ title: '产品名称', dataIndex: 'productName', key: 'productName', align: 'center' },
|
||||
{ title: '产品编号', dataIndex: 'productNum', key: 'productNum', align: 'center' },
|
||||
{ title: '安装方式', dataIndex: 'name', key: 'name', align: 'center' },
|
||||
{ title: '分发状态', dataIndex: 'name', key: 'name', align: 'center' },
|
||||
{ title: '启用日期', dataIndex: 'name', key: 'name', align: 'center' },
|
||||
{ title: '终止日期', dataIndex: 'name', key: 'name', align: 'center' },
|
||||
{ title: '密钥套号', dataIndex: 'name', key: 'name', align: 'center' },
|
||||
{ title: '载体类型', dataIndex: 'carrierType', key: 'carrierType', align: 'center' },
|
||||
{ title: '输出日期', dataIndex: 'name', key: 'name', align: 'center' },
|
||||
{ title: '协同管理标志', dataIndex: 'name', key: 'name', align: 'center' }
|
||||
]
|
||||
|
||||
return (
|
||||
<div className={`${styles.params_warp}`}>
|
||||
<ButtonComp type={'special'} text={'用户密钥装配'} onClick={() => { }} />
|
||||
|
||||
<div className='flex_aiC mt20 mb20'>
|
||||
<div className='mr16'>密钥类型</div>
|
||||
<Select style={{ width: 260, marginRight: 20 }} placeholder="请选择密钥类型" onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
|
||||
|
||||
<div className='mr16'>所属网络</div>
|
||||
<Select style={{ width: 260, marginRight: 20 }} placeholder="请选择所属网络" onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
|
||||
|
||||
<div className='mr16'>启用日期</div>
|
||||
<DatePicker style={{ width: 260, marginRight: 20 }} />
|
||||
</div>
|
||||
|
||||
<div className='flex_aiC mt20 mb20'>
|
||||
<div className='mr16'>终止日期</div>
|
||||
<DatePicker style={{ width: 260, marginRight: 20 }} />
|
||||
|
||||
<div className='mr16'>应用系统</div>
|
||||
<Select style={{ width: 260 }} placeholder="请选择应用系统" onChange={(e) => { }} options={[{ label: '选项1', value: 1 }]} />
|
||||
</div>
|
||||
|
||||
<div className='mb10'>可装配的密钥体列表</div>
|
||||
<Table
|
||||
scroll={tableData.length > 0 ? { y: 41 * 5 } : {}}
|
||||
pagination={false}
|
||||
bordered
|
||||
columns={columns}
|
||||
dataSource={tableData}
|
||||
rowKey={(record: any) => record?.id}
|
||||
rowClassName={rowClassName}
|
||||
/>
|
||||
|
||||
<div className='flex_jE mt20'>
|
||||
<ButtonComp text={'装配'} onClick={() => { }} />
|
||||
</div>
|
||||
|
||||
<div className='mb10 mt30'>用户密钥装配列表</div>
|
||||
<Table
|
||||
scroll={tableData.length > 0 ? { y: 41 * 5 } : {}}
|
||||
pagination={false}
|
||||
bordered
|
||||
columns={columns1}
|
||||
dataSource={tableData}
|
||||
rowKey={(record: any) => record?.id}
|
||||
rowClassName={rowClassName}
|
||||
/>
|
||||
|
||||
<div className='flex_jE mt20'>
|
||||
<ButtonComp type='cancel' style={{ marginRight: 20 }} text={'过滤'} onClick={() => { }} />
|
||||
<ButtonComp type='cancel' style={{ marginRight: 20 }} text={'载体输出'} onClick={() => { }} />
|
||||
<ButtonComp type='cancel' text={'下载到邮箱'} onClick={() => { }} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
import styles from './index.less';
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<div>
|
||||
正在建设中
|
||||
</div>
|
||||
);
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
import { FC, useEffect, useState } from 'react';
|
||||
import { history, useLocation, useParams } from 'umi';
|
||||
import { Radio, Space } from 'antd';
|
||||
import ContentWarp from '@/components/ContentWarp';
|
||||
import ButtonComp from '@/components/ButtonComp';
|
||||
|
||||
interface PageProps {}
|
||||
|
||||
const PageName: FC<PageProps> = ({ }) => {
|
||||
const [radioValue, setRadioValue] = useState(1)
|
||||
|
||||
const urlParams = useParams();
|
||||
const location = useLocation();
|
||||
let urlStr = `${urlParams?.fileType}${location?.search}`;
|
||||
|
||||
const handleRadioChange = (e) => {
|
||||
setRadioValue(e.target.value)
|
||||
}
|
||||
|
||||
return (
|
||||
<section>
|
||||
<ContentWarp text='设备离线管理操作'>
|
||||
<Radio.Group style={{ margin: '20px' }} onChange={handleRadioChange} value={radioValue}>
|
||||
<Space direction="vertical">
|
||||
<Radio value={1}>密码设备注册信息导入</Radio>
|
||||
<Radio value={2}>密码设备注册信息导出</Radio>
|
||||
<Radio value={3}>本设备初始化其他密码设备</Radio>
|
||||
</Space>
|
||||
</Radio.Group>
|
||||
</ContentWarp>
|
||||
|
||||
<div className='flex_jE_AC'>
|
||||
<ButtonComp style={{ marginRight: 20 }} type={'cancel'} text={'下一步'} onClick={() => {
|
||||
if(radioValue ==1){
|
||||
history.push(`/machineManage/offline/import/${urlStr}`)
|
||||
}
|
||||
else if(radioValue ==2){
|
||||
history.push(`/machineManage/offline/export/${urlStr}`)
|
||||
}
|
||||
}} />
|
||||
<ButtonComp style={{ marginRight: 20 }} type={'cancel'} text={'退出'} onClick={() => { }} />
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
export default PageName
|
@ -0,0 +1,16 @@
|
||||
@keyframes typing{
|
||||
from{
|
||||
width:0
|
||||
}
|
||||
to{
|
||||
width:10ch
|
||||
}
|
||||
}
|
||||
|
||||
.importStyle{
|
||||
// width:9em;
|
||||
animation:typing 5s steps(5) infinite ;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
border-right:1px solid;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue