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

fix: '集成登录'

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