Commit 2d8a8a4e authored by shaoan123's avatar shaoan123

修改消息平台界面跳转逻辑

parent 72d8343b
Pipeline #31945 passed with stages
in 30 minutes 59 seconds
...@@ -139,6 +139,7 @@ const TableManager = () => { ...@@ -139,6 +139,7 @@ const TableManager = () => {
Object.keys(groupData).map((item, index) => { Object.keys(groupData).map((item, index) => {
newArr.push({ type: item, key: index }) newArr.push({ type: item, key: index })
}) })
console.log('groupData',groupData);
setAllData(groupData) setAllData(groupData)
setGroupArr(newArr) setGroupArr(newArr)
} }
...@@ -301,7 +302,7 @@ const TableManager = () => { ...@@ -301,7 +302,7 @@ const TableManager = () => {
{ {
title: '类型', dataIndex: 'type', key: 'type', title: '类型', dataIndex: 'type', key: 'type',
render: text => { render: text => {
return (<div style={{ color: '#3764a0' }}>{text}({allData?[text].length:0}个)</div>) return (<div style={{ color: '#3764a0' }}>{text}({allData&&allData[text]?allData[text].length:0}个)</div>)
} }
}, },
......
...@@ -7,9 +7,10 @@ import { ...@@ -7,9 +7,10 @@ import {
Button, Button,
Select, Select,
Popconfirm, Popconfirm,
message message,
Tooltip
} from 'antd'; } from 'antd';
import { PlusCircleOutlined } from '@ant-design/icons'; import { PlusCircleOutlined, EditTwoTone, DeleteOutlined, FundViewOutlined } from '@ant-design/icons';
import { useHistory } from 'react-router-dom'; import { useHistory } from 'react-router-dom';
const { Search } = Input; const { Search } = Input;
const { Option } = Select; const { Option } = Select;
...@@ -72,24 +73,16 @@ const ProjectManage = () => { ...@@ -72,24 +73,16 @@ const ProjectManage = () => {
ellipsis: true, ellipsis: true,
render: (text, record) => ( render: (text, record) => (
<Space> <Space>
<Button <Tooltip title="测试">
type="primary" <FundViewOutlined style={{ fontSize: '16px', color: '#1890FF' }} onClick={() => {
size="small"
onClick={() => {
TestDesc(record); TestDesc(record);
}} }} />
> </Tooltip>
测试 <Tooltip title="编辑">
</Button> <EditTwoTone style={{ fontSize: '16px', color: '#e86060' }} onClick={() => {
<Button
type="primary"
size="small"
onClick={() => {
changeDesc(record); changeDesc(record);
}} }}></EditTwoTone>
> </Tooltip>
编辑
</Button>
{ {
record.name != "通用报警" record.name != "通用报警"
...@@ -104,9 +97,8 @@ const ProjectManage = () => { ...@@ -104,9 +97,8 @@ const ProjectManage = () => {
DeleteProject(record) DeleteProject(record)
}} }}
> >
<Button size="small" danger>
删除 <DeleteOutlined style={{ fontSize: '16px', color: '#e86060' }}></DeleteOutlined>
</Button>
</Popconfirm> </Popconfirm>
</div>) </div>)
} }
...@@ -121,8 +113,8 @@ const ProjectManage = () => { ...@@ -121,8 +113,8 @@ const ProjectManage = () => {
} }
const changeDesc = (record) => { const changeDesc = (record) => {
setCurrentTempalte(record) setCurrentTempalte(record)
// history.push({ pathname: `/platformCenter/schemeDetail`, state: { template: record } }) history.push({ pathname: `/platformCenter/schemeDetail`, state: { template: record } })
handleShowModal("editVisible", true) // handleShowModal("editVisible", true)
} }
const TestDesc = (record) => { const TestDesc = (record) => {
if (record.ThemeName) if (record.ThemeName)
...@@ -188,6 +180,7 @@ const ProjectManage = () => { ...@@ -188,6 +180,7 @@ const ProjectManage = () => {
setvisibleParams({ ...visibleParams, [key]: value }); setvisibleParams({ ...visibleParams, [key]: value });
}; };
const editModal = () => { const editModal = () => {
handleShowModal("editVisbile", false) handleShowModal("editVisbile", false)
setFlag(flag + 1) setFlag(flag + 1)
} }
...@@ -197,7 +190,8 @@ const ProjectManage = () => { ...@@ -197,7 +190,8 @@ const ProjectManage = () => {
} }
const onAddClick = () => { const onAddClick = () => {
setCurrentTempalte({}) setCurrentTempalte({})
handleShowModal("addVisible", true) // handleShowModal("addVisible", true)
history.push({ pathname: `/platformCenter/schemeDetail`, state: { template: {} } })
} }
const onTypeChange = (value) => { const onTypeChange = (value) => {
if (value == "全部") { if (value == "全部") {
...@@ -236,7 +230,7 @@ const ProjectManage = () => { ...@@ -236,7 +230,7 @@ const ProjectManage = () => {
res => { res => {
let mesList = [] let mesList = []
if (res.code === 0) { if (res.code === 0) {
console.log('res.data.MessageConfigModels',res.data.MessageConfigModels); console.log('res.data.MessageConfigModels', res.data.MessageConfigModels);
res.data.MessageConfigModels.map((item) => { res.data.MessageConfigModels.map((item) => {
mesList.push({ mesList.push({
name: item.MessageConfig.MsgType, name: item.MessageConfig.MsgType,
......
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
align-items: center; align-items: center;
.title { .title {
margin-left: 5px; margin-left: 18px;
margin-right: 5px; margin-right: 10px;
} }
} }
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
align-items: center; align-items: center;
.title { .title {
margin-left: 20px; margin-left: 25px;
margin-right: 5px; margin-right: 10px;
} }
} }
} }
......
...@@ -105,12 +105,13 @@ const EditModal = props => { ...@@ -105,12 +105,13 @@ const EditModal = props => {
console.log(form.getFieldValue()) console.log(form.getFieldValue())
let fv = form.getFieldValue() let fv = form.getFieldValue()
if (template.ThemeName) { if (template.ThemeName) {
console.log('fv.wx_template',fv.wx_template);
console.log('fv.push_mode.toString()',fv.push_mode.toString());
let a = { let a = {
ID: template.ID, ID: template.ID,
ThemeName: template.ThemeName, ThemeName: template.ThemeName,
MsgType: fv.name, MsgType: fv.name,
PublicTemplateID: fv.wx_template, PublicTemplateID: fv.wx_template.toString(),
PublicConfig: template.PublicConfig, PublicConfig: template.PublicConfig,
PublicPath: fv.h5_path, PublicPath: fv.h5_path,
MsgTemplateName: template.MsgTemplateName, MsgTemplateName: template.MsgTemplateName,
...@@ -157,6 +158,7 @@ const EditModal = props => { ...@@ -157,6 +158,7 @@ const EditModal = props => {
) )
} else { } else {
console.log('fv.push_mode.toString()',fv.push_mode.toString());
let b = { let b = {
ThemeName: "定时推送", ThemeName: "定时推送",
MsgType: fv.name, MsgType: fv.name,
...@@ -209,7 +211,6 @@ const EditModal = props => { ...@@ -209,7 +211,6 @@ const EditModal = props => {
} }
const onTypeChange = (value) => { const onTypeChange = (value) => {
console.log(value)
setCurrentTrench({ setCurrentTrench({
isAPPShow: value.indexOf("平台弹框") > -1 ? true : false, isAPPShow: value.indexOf("平台弹框") > -1 ? true : false,
isWXShow: value.indexOf("公众号推送") > -1 ? true : false, isWXShow: value.indexOf("公众号推送") > -1 ? true : false,
......
...@@ -6,6 +6,7 @@ import DayOfWeekSelect from './DayOfWeekSelect' ...@@ -6,6 +6,7 @@ import DayOfWeekSelect from './DayOfWeekSelect'
import styles from './VisibleIISAgentConfig.less' import styles from './VisibleIISAgentConfig.less'
import moment from 'moment' import moment from 'moment'
import { tr } from 'voca'; import { tr } from 'voca';
import {EditOutlined } from '@ant-design/icons';
const { Item } = Form; const { Item } = Form;
...@@ -164,8 +165,7 @@ const VisibleIISAgentConfig = props => { ...@@ -164,8 +165,7 @@ const VisibleIISAgentConfig = props => {
return ( return (
<div className={styles.agent_container}> <div className={styles.agent_container}>
<Input value={selectRole} disabled={true} /> <Input value={selectRole} disabled={true} />
<div className={styles.select_btn} onClick={handleClick}>推送计划</div> <div className={styles.select_btn} onClick={handleClick}><EditOutlined style={{fontSize:'18px'}}/></div>
<SiteModal <SiteModal
{...props} {...props}
title="编辑定时任务" title="编辑定时任务"
......
...@@ -4,12 +4,10 @@ ...@@ -4,12 +4,10 @@
width: 80%; width: 80%;
.select_btn { .select_btn {
display: inline-block; display: inline-block;
color: #2f54eb;
cursor: pointer; cursor: pointer;
border-bottom: 1px solid #2f54eb;
width: 6rem;
text-align: center; text-align: center;
margin-left: 20px; padding: 0 0.8rem;
color: rgba(22,133,255,1);
} }
.select_result {} .select_result {}
......
...@@ -24,7 +24,7 @@ const VisibleRoleModal = props => { ...@@ -24,7 +24,7 @@ const VisibleRoleModal = props => {
const [dataTree, setDataTree] = useState([]) const [dataTree, setDataTree] = useState([])
const [dataLeafs, setDataLeafs] = useState([]) const [dataLeafs, setDataLeafs] = useState([])
const [selectValues, setSelectValues] = useState([]) const [selectValues, setSelectValues] = useState([])
const { onSubmit, title, operate,initValues } = props const { onSubmit, title, operate, initValues, selectValue } = props
const GetRoleGroupList = () => { const GetRoleGroupList = () => {
...@@ -50,11 +50,11 @@ const VisibleRoleModal = props => { ...@@ -50,11 +50,11 @@ const VisibleRoleModal = props => {
// for (const id of initValues) { // for (const id of initValues) {
// if(id == roleItem.roleID){ // if(id == roleItem.roleID){
// leafNode.checked = true // leafNode.checked = true
// } // }
// } // }
return leafNode return leafNode
}) })
}) })
}) })
...@@ -66,6 +66,7 @@ const VisibleRoleModal = props => { ...@@ -66,6 +66,7 @@ const VisibleRoleModal = props => {
useEffect(() => { useEffect(() => {
setSelectRole(props.value) setSelectRole(props.value)
selectValue && setSelectRole(selectValue)
GetRoleGroupList() GetRoleGroupList()
}, []) }, [])
...@@ -110,7 +111,7 @@ const VisibleRoleModal = props => { ...@@ -110,7 +111,7 @@ const VisibleRoleModal = props => {
<SiteModal <SiteModal
{...props} {...props}
title={title ? `选择${title}` : "关联角色"} title={title && Object.prototype.toString.call(title) !== '[object Object]' ? `选择${title}` : "关联角色"}
bodyStyle={{ width: '100%', minHeight: '100px' }} bodyStyle={{ width: '100%', minHeight: '100px' }}
style={{ top: 200, borderRadius: '20px' }} style={{ top: 200, borderRadius: '20px' }}
width="800px" width="800px"
...@@ -124,7 +125,7 @@ const VisibleRoleModal = props => { ...@@ -124,7 +125,7 @@ const VisibleRoleModal = props => {
> >
<div className={styles.list_card}> <div className={styles.list_card}>
<ListCard {...props} onChange2={onChange2} data={dataTree} dataLeafs={dataLeafs} initValues={initValues}/> <ListCard {...props} onChange2={onChange2} data={dataTree} dataLeafs={dataLeafs} initValues={initValues} />
</div> </div>
</SiteModal> </SiteModal>
</div> </div>
...@@ -147,7 +148,7 @@ const checkChildrenByCondition = ( ...@@ -147,7 +148,7 @@ const checkChildrenByCondition = (
const ListCard = props => { const ListCard = props => {
const { onChange, onChange2, data, dataLeafs,initValues } = props const { onChange, onChange2, data, dataLeafs, initValues } = props
const [changedItem, setChangedItem] = useState({ item: {} }); const [changedItem, setChangedItem] = useState({ item: {} });
const [valueList, setValueList] = useState([]); const [valueList, setValueList] = useState([]);
...@@ -219,7 +220,7 @@ const ListCard = props => { ...@@ -219,7 +220,7 @@ const ListCard = props => {
} }
useEffect(() => { useEffect(() => {
initValues&&setValueList(initValues) initValues && setValueList(initValues)
}, []) }, [])
return ( return (
<div> <div>
......
...@@ -4,12 +4,10 @@ ...@@ -4,12 +4,10 @@
width: 80%; width: 80%;
.select_btn { .select_btn {
display: inline-block; display: inline-block;
color: #2f54eb;
cursor: pointer; cursor: pointer;
border-bottom: 1px solid #2f54eb;
width: 6rem;
text-align: center; text-align: center;
margin-left: 20px; padding: 0 0.8rem;
color: rgba(22,133,255,1);
} }
} }
.list_card{ .list_card{
......
...@@ -4,6 +4,14 @@ ...@@ -4,6 +4,14 @@
height: calc(100% - 20px); height: calc(100% - 20px);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
button[ant-click-animating-without-extra-node]:after {
border: 0 none;
opacity: 0;
animation:none 0 ease 0 1 normal;
}
.content{ .content{
height: calc(100vh - 140px); height: calc(100vh - 140px);
overflow-y: scroll; overflow-y: scroll;
...@@ -13,8 +21,9 @@ ...@@ -13,8 +21,9 @@
flex-wrap: wrap; flex-wrap: wrap;
.cardListItem{ .cardListItem{
width: 50%; width: 50%;
line-height: 3rem; margin-bottom: 1rem;
} }
} }
.ant-card-bordered { .ant-card-bordered {
border-right: none; border-right: none;
...@@ -28,7 +37,7 @@ ...@@ -28,7 +37,7 @@
justify-content: space-between; justify-content: space-between;
.trench_card{ .trench_card{
margin-top: 1rem; margin-top: 1rem;
width: 49.6%; width: 49.2%;
border-width: 1px; border-width: 1px;
border-color: #EEEEEE; border-color: #EEEEEE;
border-style: solid; border-style: solid;
...@@ -46,7 +55,7 @@ ...@@ -46,7 +55,7 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content:space-between; justify-content:space-between;
padding: 0 1rem; padding: 0 1.6rem;
align-items: center; align-items: center;
.lable{ .lable{
font-size: large; font-size: large;
......
...@@ -50,8 +50,8 @@ const standingBook = props => { ...@@ -50,8 +50,8 @@ const standingBook = props => {
const columns = [ const columns = [
{ {
title: '台账类型', title: '台账类型',
dataIndex: 'type', dataIndex: 'AccountType',
key: 'type', key: 'AccountType',
width: 100, width: 100,
}, },
{ {
......
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