Commit 7c8e2d03 authored by 皮倩雯's avatar 皮倩雯

fix: '消息平台新增配置'

parent 6567b4fa
Pipeline #64618 waiting for manual action with stages
......@@ -184,8 +184,8 @@ const patrolFeedback = () => {
});
data.区域巡检 = area;
data.DMA巡检 = dma;
data.未分组 = other;
if (other.length > 0) {
data.未分组 = other;
setGroupName(['区域巡检', 'DMA巡检', '未分组']);
}
}
......
......@@ -228,6 +228,7 @@ const ProjectManage = props => {
setShowSearchStyle(true);
};
const changeDesc = record => {
console.log(record);
setCurrentTempalte(record);
history.push({
pathname: `/platform/schemeDetail`,
......@@ -410,14 +411,15 @@ const ProjectManage = props => {
onChange={onTypeChange}
>
<Option value="全部">全部</Option>
<Option value="自定义">自定义</Option>
<Option value="定时推送">定时推送</Option>
<Option value="监控报警">监控报警</Option>
<Option value="工单办理">工单办理</Option>
<Option value="平台公告">平台公告</Option>
<Option value="定时推送">定时推送</Option>
</Select>
</div>
<div className={styles.template_type}>
<div className={styles.title}>方案名称</div>
{/* <div className={styles.title}>方案名称</div>
<Select
placeholder="请选择方案名称!"
value={currentName}
......@@ -431,7 +433,7 @@ const ProjectManage = props => {
{item.MsgType}
</Option>
))}
</Select>
</Select> */}
</div>
<div className={styles.fast_search}>
<div className={styles.title}>快速检索</div>
......
......@@ -333,6 +333,7 @@ const EditModal = props => {
<Item label="功能路径" name="web_path">
<Input placeholder="请输入功能路径" />
</Item>
</div>
</div>
)}
......
/* eslint-disable arrow-body-style */
/* eslint-disable no-useless-escape */
/* eslint-disable no-lonely-if */
/* eslint-disable no-unused-expressions */
/* eslint-disable prefer-template */
/* eslint-disable react/jsx-boolean-value */
import React, { useState, useEffect } from 'react';
import { Modal, Collapse, notification, Upload, Input, Empty, Tooltip } from 'antd';
import { GetImageOrderByFile, GetImageOrderByPath } from '@/services/integratedLogin/api';
import classnames from 'classnames';
import styles from './PreviewModal.less';
const { Panel } = Collapse;
const PreviewModal = props => {
const {
callBackSubmit = () => {},
visible,
onCancel,
imageUrl,
keepImgeUrl,
type,
imgDataList,
} = props;
const [imgData, setImgData] = useState([]);
const [pickItem, setPickItem] = useState('');
const [chooseItem, setChooseItem] = useState('');
const [keepItem, setKeepItem] = useState('');
const [keepGroupName, setKeepGroupName] = useState([]);
const [search, setSearch] = useState('');
const { Search } = Input;
useEffect(() => {
if (visible) {
console.log(imageUrl);
console.log(keepImgeUrl);
setChooseItem(imageUrl);
update();
} else {
setPickItem('');
setKeepItem('');
setChooseItem('');
}
}, [visible]);
const update = () => {
console.log(imgDataList);
let bb = [];
let aa = [];
imgDataList.map((i, a) => {
if (i.files.length > 0) {
bb.push(i);
aa.push(i.groupName);
}
});
setKeepGroupName(aa);
console.log(bb);
setImgData(bb);
imgDataList.map(i => {
i.files.map((j, index) => {
if (keepImgeUrl) {
if (j.path == keepImgeUrl) {
setKeepItem(i.name);
setPickItem(index);
setChooseItem(j.path);
}
} else {
if (chooseItem == j.path) {
setKeepItem(i.name);
setPickItem(index);
setChooseItem(j.path);
}
}
});
});
};
// 提交
const onSubmit = () => {
console.log(keepItem);
if (keepItem) {
console.log(chooseItem);
callBackSubmit(chooseItem);
}
onCancel();
};
const handleCollapseChange = key => {
setKeepGroupName(key);
};
return (
<Modal
title="图片库"
style={{ top: '100px' }}
width="1000px"
destroyOnClose
maskClosable={false}
cancelText="取消"
okText="确认"
{...props}
onOk={() => onSubmit()}
forceRender={true}
getContainer={false}
>
{imgData.length > 0 ? (
<Collapse
style={{ height: '600px', overflow: 'scroll', marginTop: '20px' }}
bordered={false}
activeKey={keepGroupName}
onChange={handleCollapseChange}
>
{imgData.map((i, j) => {
return (
<Panel
header={i.groupName}
key={i.groupName}
style={{
marginBottom: '24px',
overflow: 'hidden',
border: '0px',
background: '#f7f7f7',
borderRadius: '2px',
}}
>
{i.files &&
i.files.map((k, index) => {
return (
<div className={styles.divItem} key={index}>
<img
src={window.location.origin + `/${k.path}`}
className={classnames({
[styles.imgHidden]: k.path !== chooseItem,
[styles.imgItem]: k.path == chooseItem,
})}
height="80px"
width="80px"
alt="集成登录默认"
onClick={e => {
setPickItem(index);
setKeepItem(i.groupName);
setChooseItem(k.path);
}}
/>
<div
style={{
textAlign: 'center',
width: '100px',
}}
>
<Tooltip title={k.name}>
<p
style={{
height: '22px',
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
}}
>
{k.name}
</p>
</Tooltip>
</div>
</div>
);
})}
</Panel>
);
})}
</Collapse>
) : (
<Empty
image={Empty.PRESENTED_IMAGE_SIMPLE}
description="暂无数据"
style={{ height: '600px', margin: '20px auto 0px auto', paddingTop: '50px' }}
/>
)}
</Modal>
);
};
export default PreviewModal;
.divItem {
display: inline-block;
margin-left: 30px;
margin-bottom: 30px;
width: 100px;
}
.imgItem {
border: 3px solid #00ff37;
box-sizing: border-box;
border-radius: 5px;
display: inline-block;
margin-left: 10px;
background-color: #2881a1;
}
.imgHidden {
margin-left: 10px;
border: none;
display: inline-block;
background-color: #2881a1;
}
.imgHidden:hover {
margin-left: 10px;
border: 3px solid #00ff37;
box-sizing: border-box;
border-radius: 5px;
display: inline-block;
}
.iconItem {
// position: relative;
// left: 70px;
// top: 10px;
// font-size: 17px;
margin-top: -3px;
font-size: 17px;
float: right;
margin-left: -10px;
}
.iconHidden {
display: none;
}
.iconHidden:hover {
// position: relative;
// left: 70px;
// top: 10px;
// font-size: 17px;
margin-top: -3px;
font-size: 17px;
float: right;
margin-left: -10px;
}
.table {
background-color: white;
height: calc(100vh - 130px);
margin-top: 10px;
overflow-y: scroll;
}
// .ant-card-body {
// padding: 0px 24px 24px 17px;
// }
.sel {
width: 200px;
}
.icon {
margin-top: -5px !important;
vertical-align: text-bottom;
}
.redText {
color: red;
}
\ No newline at end of file
......@@ -65,9 +65,10 @@
margin-top: 10px;
width: 100%;
padding: 10px;
height: 12rem;
height: 13rem;
display: flex;
flex-direction: column;
overflow: scroll;
}
.ant-switch {
margin-right: 0.5rem;
......@@ -78,3 +79,20 @@
}
}
}
.imgg {
position: relative;
top: -95px;
left: -9px;
height: 104px;
width: 104px;
background: rgba(0, 0, 0, 0.5);
border-radius: 2px;
z-index: 1;
}
.imgg :hover {
opacity: 0.7;
width: '100%';
background-color: '#2881a1';
}
......@@ -43,3 +43,6 @@ export const GetIISAgentConfig = param =>
export const RoleGroupList = param => get(`${PUBLISH_SERVICE}/UserCenter/RoleGroupList`, param);
export const GetGroupUserTree = param =>
get(`${PUBLISH_SERVICE}/UserCenter/GetGroupUserTree`, param);
// 获取图片路径接口
export const GetMessageIcon = param => get(`${PUBLISH_SERVICE}/MessageConfig/GetMessageIcon`, param);
\ No newline at end of file
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