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 = () => {
...@@ -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{
......
...@@ -6,6 +6,8 @@ import { Switch } from 'react-router'; ...@@ -6,6 +6,8 @@ import { Switch } from 'react-router';
import { iteratee } from 'lodash'; import { iteratee } from 'lodash';
import styles from './schemeDetail.less'; import styles from './schemeDetail.less';
import v from 'voca'; import v from 'voca';
import { UsergroupDeleteOutlined } from '@ant-design/icons';
import VisibleRoleModal from '../messageManage/projectManage/components/RolseSelect/VisibleRoleModal' import VisibleRoleModal from '../messageManage/projectManage/components/RolseSelect/VisibleRoleModal'
import VisibleIISAgentConfig from '../messageManage/projectManage/components/IISAgentConfig/VisibleIISAgentConfig' import VisibleIISAgentConfig from '../messageManage/projectManage/components/IISAgentConfig/VisibleIISAgentConfig'
import { GetMessageTemplate } from '@/services/platform/messagemanage' import { GetMessageTemplate } from '@/services/platform/messagemanage'
...@@ -19,9 +21,11 @@ const EditModal = props => { ...@@ -19,9 +21,11 @@ const EditModal = props => {
const history = useHistory(); const history = useHistory();
const [form] = Form.useForm(); const [form] = Form.useForm();
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [plan,setPlan]= useState('');
const [isStart, setIsStart] = useState(false); const [isStart, setIsStart] = useState(false);
const [IISConfig, setIISConfig] = useState(null) const [IISConfig, setIISConfig] = useState(null)
const [isUse, setIsUse] = useState("0")
const [btnType, setBtnType] = useState("定时推送")
const { template, confirmModal } = props.location.state const { template, confirmModal } = props.location.state
const [currentTrench, setCurrentTrench] = useState({ const [currentTrench, setCurrentTrench] = useState({
isMessageShow: false, isMessageShow: false,
...@@ -29,7 +33,6 @@ const EditModal = props => { ...@@ -29,7 +33,6 @@ const EditModal = props => {
isWEBShow: false, isWEBShow: false,
isWXShow: false isWXShow: false
}) })
const plainOptions = ['平台弹框', '短信推送', '公众号推送'];
const [APP_ITEMS, setAPP_ITEMS] = useState([]) const [APP_ITEMS, setAPP_ITEMS] = useState([])
const [WEB_ITEMS, setWEB_ITEMS] = useState([]) const [WEB_ITEMS, setWEB_ITEMS] = useState([])
const [WX_ITEMS, setWX_ITEMS] = useState([]) const [WX_ITEMS, setWX_ITEMS] = useState([])
...@@ -60,6 +63,7 @@ const EditModal = props => { ...@@ -60,6 +63,7 @@ const EditModal = props => {
}) })
setAPP_ITEMS(arr3) setAPP_ITEMS(arr3)
setMES_ITEMS(arr2) setMES_ITEMS(arr2)
console.log('arr1', arr1);
setWX_ITEMS(arr1) setWX_ITEMS(arr1)
setWEB_ITEMS(arr4) setWEB_ITEMS(arr4)
} }
...@@ -67,25 +71,25 @@ const EditModal = props => { ...@@ -67,25 +71,25 @@ const EditModal = props => {
) )
}, []) }, [])
useEffect(() => { useEffect(() => {
if (template.ThemeName) { if (template.ThemeName) {
console.log(template);
form.setFieldsValue({ form.setFieldsValue({
name: template.MsgType, name: template.MsgType,
isStart: template.IsStarted === "0" ? "关闭" : "开启", isStart: template.IsStarted === "0" ? "关闭" : "开启",
to_person: template.PushGroup, to_person: template.PushGroup,
push_plan: template.MsgType,
push_mode: template.PushMode === null ? '' : template.PushMode.split(","), push_mode: template.PushMode === null ? '' : template.PushMode.split(","),
app_template: template.AppTemplateID, app_template: template.AppTemplateID,
app_path: template.AppFunctionPath, app_path: template.AppFunctionPath,
wx_template: parseInt(template.PublicTemplateID), wx_template: template.PublicTemplateID ? parseInt(template.PublicTemplateID) : '',
h5_path: template.PublicPath, h5_path: template.PublicPath,
miniprogram_path: template.MiniAppRoute, miniprogram_path: template.MiniAppRoute,
web_template: template.WebTemplateID, web_template: template.WebTemplateID,
web_path: template.WebFunctionPath, web_path: template.WebFunctionPath,
message_template: template.MsgTemplateID, message_template: template.MsgTemplateID,
}) })
setPlan(template.MsgType)
setBtnType(template.type)
setIsUse(template.IsStarted)
setCurrentTrench({ setCurrentTrench({
isAPPShow: template.PushMode && template.PushMode.split(",").indexOf("平台弹框") > -1 ? true : false, isAPPShow: template.PushMode && template.PushMode.split(",").indexOf("平台弹框") > -1 ? true : false,
isWXShow: template.PushMode && template.PushMode.split(",").indexOf("公众号推送") > -1 ? true : false, isWXShow: template.PushMode && template.PushMode.split(",").indexOf("公众号推送") > -1 ? true : false,
...@@ -93,24 +97,27 @@ const EditModal = props => { ...@@ -93,24 +97,27 @@ const EditModal = props => {
isMessageShow: template.PushMode && template.PushMode.split(",").indexOf("短信推送") > -1 ? true : false, isMessageShow: template.PushMode && template.PushMode.split(",").indexOf("短信推送") > -1 ? true : false,
}) })
} }
else {
setBtnType('定时推送')
}
}, [props]) }, [props])
const onNameChange = (e) => { const onNameChange = (e) => {
form.setFieldsValue({
push_plan: e.target.value setPlan(e.target.value)
})
} }
const onSubmit = () => { const onSubmit = () => {
console.log(form.getFieldValue())
let fv = form.getFieldValue() let fv = form.getFieldValue()
console.log('fv',fv);
let push_mode = ((currentTrench.isAPPShow || currentTrench.isWEBShow) ? '平台弹框' : '') + (currentTrench.isWXShow ? ',公众号推送' : '') + (currentTrench.isMessageShow ? ',短信推送' : '')
if (template.ThemeName) { if (template.ThemeName) {
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,
...@@ -124,15 +131,15 @@ const EditModal = props => { ...@@ -124,15 +131,15 @@ const EditModal = props => {
IsDelete: template.IsDelete, IsDelete: template.IsDelete,
InputTime: moment().format("YYYY-MM-DD HH:mm:ss"), InputTime: moment().format("YYYY-MM-DD HH:mm:ss"),
Pusher: template.Pusher, Pusher: template.Pusher,
PushMode: fv.push_mode.toString(), PushMode: push_mode,
PushPath: template.PushPath, PushPath: template.PushPath,
IsStarted: fv.isStart, IsStarted: isUse,
MsgTemplateID: fv.message_template, MsgTemplateID: fv.message_template,
AppTemplateID: fv.app_template, AppTemplateID: fv.app_template,
WebTemplateID: fv.web_template, WebTemplateID: fv.web_template,
PushGroup: fv.to_person.toString() PushGroup: fv.to_person ? fv.to_person.toString() : ''
} }
console.log(a)
UpdateMessageConfig(a).then( UpdateMessageConfig(a).then(
res => { res => {
if (res.code === 0) { if (res.code === 0) {
...@@ -141,26 +148,30 @@ const EditModal = props => { ...@@ -141,26 +148,30 @@ const EditModal = props => {
res => { res => {
if (res.code === 0) { if (res.code === 0) {
message.success("保存成功") message.success("保存成功")
confirmModal()
} }
} }
) )
} else { } else {
message.success("保存成功") message.success("保存成功")
confirmModal()
}
} }
} }
else {
notification.error({
message: '提示',
duration: 3,
description: res.msg,
});
}
}
) )
} else { } else {
let b = { let b = {
ThemeName: "定时推送", ThemeName: "定时推送",
MsgType: fv.name, MsgType: fv.name,
PublicTemplateID: fv.wx_template, PublicTemplateID: fv.wx_template?fv.wx_template.toString():null,
PublicConfig: template.PublicConfig, PublicConfig: template.PublicConfig,
PublicPath: fv.h5_path, PublicPath: fv.h5_path,
MsgTemplateName: template.MsgTemplateName, MsgTemplateName: template.MsgTemplateName,
...@@ -174,13 +185,13 @@ const EditModal = props => { ...@@ -174,13 +185,13 @@ const EditModal = props => {
IsDelete: template.IsDelete, IsDelete: template.IsDelete,
InputTime: moment().format("YYYY-MM-DD HH:mm:ss"), InputTime: moment().format("YYYY-MM-DD HH:mm:ss"),
Pusher: template.Pusher, Pusher: template.Pusher,
PushMode: fv.push_mode.toString(), PushMode: push_mode,
PushPath: template.PushPath, PushPath: template.PushPath,
IsStarted: fv.isStart, IsStarted: isUse,
MsgTemplateID: fv.message_template, MsgTemplateID: fv.message_template,
AppTemplateID: fv.app_template, AppTemplateID: fv.app_template,
WebTemplateID: fv.web_template, WebTemplateID: fv.web_template,
PushGroup: fv.to_person.toString() PushGroup: fv.to_person ? fv.to_person.toString() : ''
} }
console.log(b) console.log(b)
InsertMessageConfig(b).then( InsertMessageConfig(b).then(
...@@ -191,14 +202,28 @@ const EditModal = props => { ...@@ -191,14 +202,28 @@ const EditModal = props => {
res => { res => {
if (res.code === 0) { if (res.code === 0) {
message.success("保存成功") message.success("保存成功")
confirmModal()
}
else{
notification.error({
message: '提示',
duration: 3,
description: res.msg,
});
} }
} }
) )
} else { } else {
message.success("保存成功") message.success("保存成功")
confirmModal()
}
} }
else {
notification.error({
message: '提示',
duration: 3,
description: res.msg,
});
} }
} }
) )
...@@ -206,15 +231,7 @@ const EditModal = props => { ...@@ -206,15 +231,7 @@ const EditModal = props => {
} }
const onTypeChange = (value) => {
console.log(value)
setCurrentTrench({
isAPPShow: value.indexOf("平台弹框") > -1 ? true : false,
isWXShow: value.indexOf("公众号推送") > -1 ? true : false,
isWEBShow: value.indexOf("平台弹框") > -1 ? true : false,
isMessageShow: value.indexOf("短信推送") > -1 ? true : false,
})
}
const onIISAgentSubmit = (value) => { const onIISAgentSubmit = (value) => {
setIISConfig(value) setIISConfig(value)
...@@ -232,8 +249,8 @@ const EditModal = props => { ...@@ -232,8 +249,8 @@ const EditModal = props => {
span: 24, span: 24,
}, },
}; };
const onChange = () => { const onChange = (value) => {
setIsUse(value?'1':'0')
} }
const back = () => { const back = () => {
history.push('/platformCenter/notify') history.push('/platformCenter/notify')
...@@ -241,13 +258,15 @@ const EditModal = props => { ...@@ -241,13 +258,15 @@ const EditModal = props => {
const tailLayout = { const tailLayout = {
wrapperCol: { offset: 21, span: 24 }, wrapperCol: { offset: 21, span: 24 },
}; };
const onFinish = (values) => { const onTypeChange = (value, type) => {
console.log(values,'123'); let data = { ...currentTrench }
data[type] = value
setCurrentTrench(data)
} }
return ( return (
<div className={styles.editModal_container}> <div className={styles.editModal_container}>
<Form form={form} {...layout} onFinish={onFinish}> <Form form={form} {...layout} onFinish={onSubmit}>
<div className={styles.content}> <div className={styles.content}>
<Card title="方案" style={{ width: '100%' }}> <Card title="方案" style={{ width: '100%' }}>
<Item <Item
...@@ -268,38 +287,44 @@ const EditModal = props => { ...@@ -268,38 +287,44 @@ const EditModal = props => {
> >
<div className={styles.cardList}> <div className={styles.cardList}>
{listType.map(item => { {listType.map(item => {
return <div key={item.title} className={styles.cardListItem}><Button style={{ marginRight: '1rem' }} disabled >{item.title}</Button> <span>{item.desc}</span></div> return <div key={item.title} className={styles.cardListItem}><Button type={item.title === btnType ? 'primary' : 'default'} style={{ cursor: 'not-allowed', marginRight: '1rem' }} >{item.title}</Button> <span>{item.desc}</span></div>
})} })}
</div> </div>
</Item> </Item>
</Card> </Card>
<Card title="推送信息" style={{ width: '100%', marginTop: '1rem' }}> {btnType === '定时推送' && (<Card title="推送信息" style={{ width: '100%', marginTop: '1rem' }}>
<div style={{ display: 'flex', alignItems: 'center' }}>
<div style={{ display: 'flex', marginLeft: '5rem', alignItems: 'center' }}> <Item
<div style={{ display: 'flex', width: '35rem', alignItems: 'center' }}> label="推送组"
<span>推送组: </span> name="to_person"
labelCol={{ span: 5 }}
style={{ paddingTop: '1.6rem', width: '35rem' }}
>
<VisibleRoleModal <VisibleRoleModal
style={{ display: 'flex', width: '35rem', alignItems: 'center' }}
onSubmit={onPushSubmit} onSubmit={onPushSubmit}
title={"推送人员"} /> selectValue={template && template.PushGroup ? template.PushGroup : []}
</div> title={<UsergroupDeleteOutlined style={{ fontSize: '18px' }} />} />
<div style={{ display: 'flex', width: '35rem', margin: '0 2rem', alignItems: 'center' }}> </Item>
推送计划: <VisibleIISAgentConfig agentConfig={template.item && template.item.AgentConfig} value={form.getFieldValue('name')} onIISAgentSubmit={onIISAgentSubmit} />
<div style={{ display: 'flex', width: '30rem', margin: '0 2rem', alignItems: 'center' }}>
推送计划: <VisibleIISAgentConfig agentConfig={template.item && template.item.AgentConfig} value={plan} onIISAgentSubmit={onIISAgentSubmit} />
</div> </div>
<span> <span>
是否启用:<Switchs defaultChecked onChange={onChange} /> 是否启用:<Switchs checked={isUse === '0' ? false : true} onChange={onChange} />
</span> </span>
</div> </div>
</Card> </Card>)}
<div className={styles.push_trench}> <div className={styles.push_trench}>
{ {
<div className={styles.trench_card}> <div className={styles.trench_card}>
<div className={styles.card_title}> <div className={styles.card_title}>
<div className={styles.lable}>APP</div> <div className={styles.lable}>APP</div>
<Switchs checked={currentTrench.isAPPShow} /> <Switchs onChange={e => onTypeChange(e, 'isAPPShow')} checked={currentTrench.isAPPShow} />
</div> </div>
<div className={styles.card_body}> <div className={styles.card_body}>
<Item <Item
...@@ -307,7 +332,7 @@ const EditModal = props => { ...@@ -307,7 +332,7 @@ const EditModal = props => {
name="app_template" name="app_template"
labelCol={{ span: 4 }} labelCol={{ span: 4 }}
> >
<Select > <Select style={{ width: '97%' }} disabled={!currentTrench.isAPPShow} >
{ {
APP_ITEMS.map((item, idx) => { APP_ITEMS.map((item, idx) => {
return ( return (
...@@ -322,7 +347,7 @@ const EditModal = props => { ...@@ -322,7 +347,7 @@ const EditModal = props => {
name="app_path" name="app_path"
labelCol={{ span: 4 }} labelCol={{ span: 4 }}
> >
<Input placeholder="请输入功能路径" /> <Input style={{ width: '97%' }} disabled={!currentTrench.isAPPShow} placeholder="请输入功能路径" />
</Item> </Item>
</div> </div>
</div> </div>
...@@ -333,7 +358,7 @@ const EditModal = props => { ...@@ -333,7 +358,7 @@ const EditModal = props => {
<div className={styles.trench_card}> <div className={styles.trench_card}>
<div className={styles.card_title}> <div className={styles.card_title}>
<div className={styles.lable}>微信</div> <div className={styles.lable}>微信</div>
<Switchs checked={currentTrench.isWXShow} /> <Switchs onChange={e => onTypeChange(e, 'isWXShow')} checked={currentTrench.isWXShow} />
</div> </div>
<div className={styles.card_body}> <div className={styles.card_body}>
<Item <Item
...@@ -341,7 +366,7 @@ const EditModal = props => { ...@@ -341,7 +366,7 @@ const EditModal = props => {
name="wx_template" name="wx_template"
labelCol={{ span: 4 }} labelCol={{ span: 4 }}
> >
<Select > <Select style={{ width: '97%' }} disabled={!currentTrench.isWXShow} >
{ {
WX_ITEMS.map((item, idx) => { WX_ITEMS.map((item, idx) => {
return ( return (
...@@ -356,14 +381,14 @@ const EditModal = props => { ...@@ -356,14 +381,14 @@ const EditModal = props => {
name="h5_path" name="h5_path"
labelCol={{ span: 4 }} labelCol={{ span: 4 }}
> >
<Input placeholder="请输入功能路径" /> <Input style={{ width: '97%' }} disabled={!currentTrench.isWXShow} placeholder="请输入功能路径" />
</Item> </Item>
<Item <Item
label="小程序路由" label="小程序路由"
name="miniprogram_path" name="miniprogram_path"
labelCol={{ span: 4 }} labelCol={{ span: 4 }}
> >
<Input placeholder="请输入功能路径" /> <Input style={{ width: '97%' }} disabled={!currentTrench.isWXShow} placeholder="请输入功能路径" />
</Item> </Item>
</div> </div>
</div> </div>
...@@ -374,7 +399,7 @@ const EditModal = props => { ...@@ -374,7 +399,7 @@ const EditModal = props => {
<div className={styles.trench_card}> <div className={styles.trench_card}>
<div className={styles.card_title}> <div className={styles.card_title}>
<div className={styles.lable}>WEB</div> <div className={styles.lable}>WEB</div>
<Switchs checked={currentTrench.isWEBShow} /> <Switchs onChange={e => onTypeChange(e, 'isWEBShow')} checked={currentTrench.isWEBShow} />
</div> </div>
<div className={styles.card_body}> <div className={styles.card_body}>
<Item <Item
...@@ -382,7 +407,7 @@ const EditModal = props => { ...@@ -382,7 +407,7 @@ const EditModal = props => {
name="web_template" name="web_template"
labelCol={{ span: 4 }} labelCol={{ span: 4 }}
> >
<Select > <Select style={{ width: '97%' }} disabled={!currentTrench.isWEBShow}>
{ {
WEB_ITEMS.map((item, idx) => { WEB_ITEMS.map((item, idx) => {
return ( return (
...@@ -397,7 +422,7 @@ const EditModal = props => { ...@@ -397,7 +422,7 @@ const EditModal = props => {
name="web_path" name="web_path"
labelCol={{ span: 4 }} labelCol={{ span: 4 }}
> >
<Input placeholder="请输入功能路径" /> <Input style={{ width: '97%' }} disabled={!currentTrench.isWEBShow} placeholder="请输入功能路径" />
</Item> </Item>
</div> </div>
</div> </div>
...@@ -409,7 +434,7 @@ const EditModal = props => { ...@@ -409,7 +434,7 @@ const EditModal = props => {
<div className={styles.trench_card}> <div className={styles.trench_card}>
<div className={styles.card_title}> <div className={styles.card_title}>
<div className={styles.lable}>短信推送</div> <div className={styles.lable}>短信推送</div>
<Switchs checked={ currentTrench.isMessageShow} /> <Switchs onChange={e => onTypeChange(e, 'isMessageShow')} checked={currentTrench.isMessageShow} />
</div> </div>
<div className={styles.card_body}> <div className={styles.card_body}>
<Item <Item
...@@ -417,7 +442,7 @@ const EditModal = props => { ...@@ -417,7 +442,7 @@ const EditModal = props => {
name="message_template" name="message_template"
labelCol={{ span: 4 }} labelCol={{ span: 4 }}
> >
<Select > <Select style={{ width: '97%' }} disabled={!currentTrench.isMessageShow} >
{ {
MES_ITEMS.map((item, idx) => { MES_ITEMS.map((item, idx) => {
return ( return (
......
...@@ -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