Commit 8e05c038 authored by 皮倩雯's avatar 皮倩雯

fix: '集成登录'

parent cf73b19f
Pipeline #54679 failed with stages
/* eslint-disable prefer-template */
/* eslint-disable react/jsx-boolean-value */
import React, { useState, useEffect } from 'react';
import { Form, Modal, Input, notification, Radio, Button, message, Upload, Row, Col } from 'antd';
import {
Form,
Modal,
Input,
notification,
Radio,
Button,
message,
Upload,
Row,
Col,
Image,
} from 'antd';
import { AddIntegratedLogin, EditIntegratedLogin } from '@/services/integratedLogin/api';
import { PlusOutlined, LoadingOutlined } from '@ant-design/icons';
import { get, PUBLISH_SERVICE } from '@/services';
......@@ -26,6 +38,7 @@ const AddModal = props => {
form.setFieldsValue({
accountParam: pickItem.AccountParam,
internetAddress: pickItem.InternetAddress,
intranetAddress: pickItem.IntranetAddress,
systemClient: pickItem.SystemClient,
systemName: pickItem.SystemName,
iconUrl: pickItem.iconUrl,
......@@ -62,6 +75,7 @@ const AddModal = props => {
if (validate) {
setLoading(true);
let obj = form.getFieldsValue();
console.log(obj);
if (obj.iconUrl.file) {
obj.iconUrl = obj.iconUrl.file.response.data;
}
......@@ -221,24 +235,17 @@ const AddModal = props => {
getContainer={false}
>
<Form form={form} {...layout}>
<Item label="名称" name="systemName" rules={[{ required: true, message: '请输入名称' }]}>
<Item label="标题" name="systemName" rules={[{ required: true, message: '请输入名称' }]}>
<Input allowClear style={{ width: '100%' }} placeholder="请输入名称" />
</Item>
<Item label="标识" name="systemClient" rules={[{ required: true, message: '请输入标识' }]}>
<Input allowClear placeholder="请输入标识" />
</Item>
<Item label="副标题" name="subtitle" rules={[{ required: true, message: '请输入副标题' }]}>
<Input allowClear placeholder="建议使用英文" />
</Item>
{/* <Item
label="内网地址"
name="intranetAddress"
rules={[{ required: true, message: '请输入内网地址' }]}
>
<Input allowClear />
</Item> */}
<Item label="标识" name="systemClient" rules={[{ required: true, message: '请输入标识' }]}>
<Input allowClear placeholder="请输入标识" />
</Item>
<Item
label="访问地址"
label="外网地址"
name="internetAddress"
rules={[{ required: true, message: '请输入外网地址' }]}
>
......@@ -247,6 +254,9 @@ const AddModal = props => {
placeholder="示例:http://192.168.12.116:8500/civbase/user/noscret?client=city"
/>
</Item>
<Item label="内网地址" name="intranetAddress">
<Input allowClear />
</Item>
{/* <Item label="请求方式" name="method">
<Radio.Group onChange={onChange2} value={radio2}>
<Radio value="Get">Get</Radio>
......@@ -278,6 +288,7 @@ const AddModal = props => {
},
]}
>
{/* <Image width="90%" src={imageUrl} /> */}
<Upload
name="singleFile"
listType="picture-card"
......
/* eslint-disable import/no-unresolved */
/* eslint-disable prefer-template */
/* eslint-disable no-undef */
import React, { useState, useEffect } from 'react';
......@@ -18,6 +19,7 @@ import { EditTwoTone, DeleteOutlined, PlusOutlined, SyncOutlined } from '@ant-de
import styles from './integrate.less';
import AddModal from './AddModal';
import Master from './Master';
import Pdf from './Pdf';
const Integrate = () => {
const [loading, setLoading] = useState(false);
......@@ -29,6 +31,7 @@ const Integrate = () => {
const [pickItem, setPickItem] = useState('');
const [type, setType] = useState('');
const [masterVisible, setMasterVisible] = useState(false);
const [pdfVisible, setPdfVisible] = useState(false);
const { Search } = Input;
......@@ -123,7 +126,6 @@ const Integrate = () => {
align: 'center',
width: 200,
render: (text, record) => {
console.log(text);
if (text) {
// if (text.startsWith('CityTemp') || text.startsWith('civ_integratedlogin')) {
// return <Image src={`http://192.168.12.116:8017/${text}`} height="50px" />;
......@@ -209,11 +211,13 @@ const Integrate = () => {
};
const dele = e => {
console.log(e, 'aaaaaaaaaa');
setPickItem(e);
setLoading(true);
DelIntegratedLogin({
ID: e.ID,
client: e.SystemClient,
}).then(res => {
console.log('11111111111ss');
if (res.code === 0) {
setFlag(flag + 1);
notification.success({
......@@ -275,6 +279,10 @@ const Integrate = () => {
setMasterVisible(true);
};
const openPdf = () => {
setPdfVisible(true);
};
return (
<div className={styles.Integrate}>
<div className={styles.head}>
......@@ -302,6 +310,15 @@ const Integrate = () => {
新增
</Button>
</div>
{/* <Button
onClick={openPdf}
style={{
float: 'right',
verticalAlign: 'middle',
}}
>
查看说明文档
</Button> */}
<Button
type="primary"
onClick={masterStation}
......@@ -340,6 +357,7 @@ const Integrate = () => {
callBackSubmit={onSubmit}
/>
<Master visible={masterVisible} onCancel={() => setMasterVisible(false)} />
<Pdf visible={pdfVisible} onCancel={() => setPdfVisible(false)} />
</div>
);
};
......
......@@ -123,12 +123,12 @@ const PreviewModal = props => {
// height="100px"
// />
<div className={styles.divItem} key={index}>
<CheckCircleTwoTone
{/* <CheckCircleTwoTone
className={classnames({
[styles.iconHidden]: index !== pickItem || i.groupName !== keepItem,
[styles.iconItem]: index === pickItem && i.groupName === keepItem,
})}
/>
/> */}
<img
src={window.location.origin + `/${k.path}`}
className={classnames({
......
......@@ -24,6 +24,7 @@
box-sizing: border-box;
border-radius: 5px;
display: inline-block;
z-index: -1;
}
.imgHidden {
border: none;
......@@ -37,19 +38,21 @@
}
.iconItem {
position: absolute;
margin-left: 70px;
// position: absolute;
// margin-left: 70px;
margin-top: -3px;
font-size: 17px;
float: right;
margin-left: -10px;
}
.iconHidden {
display: none;
}
.iconHidden:hover {
position: absolute;
margin-left: 70px;
margin-top: -3px;
font-size: 17px;
float: right;
margin-left: -10px;
}
.table {
......
......@@ -331,11 +331,11 @@ export default {
url: '/web4/?widget=product/oms/MqttConfig/MqttConfig.js|hideMap=true',
component: HostManager,
},
// {
// path: '/platform/integrate',
// name: '集成登录',
// component: IntegratedLogin,
// },
{
path: '/platform/integrate',
name: '集成登录',
component: IntegratedLogin,
},
],
},
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment