Commit cdf52348 authored by shaoan123's avatar shaoan123

修改消息平台样式

parent 80e9b264
Pipeline #32435 skipped with stages
# PUBLIC_PATH = reactOMS, 默认转发 /cityinterface # PUBLIC_PATH = reactOMS, 默认转发 /cityinterface
PROXY=/Cityinterface:http://192.168.19.105:8049;/PandaOMS:http://192.168.19.105:8049;/Web4:http://192.168.19.105:8049;/CityTemp:http://192.168.19.105:8049 PROXY=/Cityinterface:http://192.168.19.105:8049;/PandaOMS:http://192.168.19.105:8049;/Web4:http://192.168.19.105:8049;/CityTemp:http://192.168.19.105:8049
# PROXY=/Cityinterface:http://192.168.12.121:8082;/PandaOMS:http://192.168.12.121:8082;/Web4:http://192.168.12.121:8082;/CityTemp:http://192.168.12.121:8082
# 可设置第二个代理,test为转发前缀,后面为代理转发的地址 # 可设置第二个代理,test为转发前缀,后面为代理转发的地址
# PROXY2 = test : http://localhost:8006/ # PROXY2 = test : http://localhost:8006/
......
...@@ -11,7 +11,7 @@ import { ...@@ -11,7 +11,7 @@ import {
Tooltip, Tooltip,
Spin Spin
} from 'antd'; } from 'antd';
import { PlusCircleOutlined, EditTwoTone, DeleteOutlined, FundViewOutlined } from '@ant-design/icons'; import { PlusCircleOutlined, EditTwoTone, DeleteOutlined, FundViewOutlined, FieldTimeOutlined } 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;
...@@ -44,7 +44,16 @@ const ProjectManage = () => { ...@@ -44,7 +44,16 @@ const ProjectManage = () => {
title: '方案名称', title: '方案名称',
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
render: text => <a>{text}</a>, render: (text, record) => (
<div>{record.type == '定时推送' ? text : <div style={{display:'flex',alignItems:'center'}}>
<Tooltip title={text} >
<FieldTimeOutlined
style={{ fontSize: '16px',color: '#1890FF' ,marginRight:'0.1rem'}}
/>
</Tooltip>
{text}
</div>}</div>
)
}, },
{ {
title: '方案类型', title: '方案类型',
...@@ -156,7 +165,7 @@ const ProjectManage = () => { ...@@ -156,7 +165,7 @@ const ProjectManage = () => {
} }
) )
} }
else{ else {
message.error(res.msg) message.error(res.msg)
} }
} }
...@@ -250,7 +259,7 @@ const ProjectManage = () => { ...@@ -250,7 +259,7 @@ const ProjectManage = () => {
item: item item: item
}) })
}) })
setDataList(mesList) setDataList(mesList)
} }
} }
...@@ -296,11 +305,11 @@ const ProjectManage = () => { ...@@ -296,11 +305,11 @@ const ProjectManage = () => {
</div> </div>
<Button type="primary" onClick={handleReset}>重置</Button> <Button type="primary" onClick={handleReset}>重置</Button>
<Button type="primary" style={{ marginLeft: "10px" }} icon={<PlusCircleOutlined />} onClick={onAddClick}><span style={{ marginTop:"-3px"}}>新增</span></Button> <Button type="primary" style={{ marginLeft: "10px" }} icon={<PlusCircleOutlined />} onClick={onAddClick}><span style={{ marginTop: "-3px" }}>新增</span></Button>
</div> </div>
<div className={styles.list_view}> <div className={styles.list_view}>
<Table columns={columns} dataSource={dataList} pagination={{ pageSize: '10' }} rowKey='ID' /> <Table bordered columns={columns} dataSource={dataList} pagination={{ pageSize: '10' }} rowKey='ID' />
</div> </div>
<EditModal <EditModal
visible={visibleParams.editVisible} visible={visibleParams.editVisible}
......
...@@ -49,5 +49,9 @@ ...@@ -49,5 +49,9 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: flex-start; justify-content: flex-start;
.ant-table-thead tr th{
font-weight: 600;
color:rgba(0,0,0,0.85);
}
} }
} }
...@@ -40,11 +40,9 @@ const VisibleIISAgentConfig = props => { ...@@ -40,11 +40,9 @@ const VisibleIISAgentConfig = props => {
const dateFormat = 'YYYY-MM-DD HH:mm:ss'; const dateFormat = 'YYYY-MM-DD HH:mm:ss';
const { agentConfig, value, onIISAgentSubmit } = props const { agentConfig, value, onIISAgentSubmit } = props
useEffect(() => { useEffect(() => {
console.log('agentConfig', agentConfig);
if (agentConfig) { if (agentConfig) {
let startTime = agentConfig.LoopMode === 'ByOnce' ? moment(new Date(new Date().toLocaleDateString()), 'YYYY-MM-DD 00:00:00').add(1, 'days') : moment(new Date(new Date().toLocaleDateString()), 'YYYY-MM-DD 00:00:00') let startTime = agentConfig.LoopMode === 'ByOnce' ? moment(new Date(new Date().toLocaleDateString()), 'YYYY-MM-DD 00:00:00').add(1, 'days') : moment(new Date(new Date().toLocaleDateString()), 'YYYY-MM-DD 00:00:00')
console.log('agentConfig', agentConfig);
console.log(startTime, 'startTime');
form.setFieldsValue({ form.setFieldsValue({
is_enable: agentConfig.Enabled, is_enable: agentConfig.Enabled,
url_type: agentConfig.Absolute ? false : true, url_type: agentConfig.Absolute ? false : true,
...@@ -72,7 +70,7 @@ const VisibleIISAgentConfig = props => { ...@@ -72,7 +70,7 @@ const VisibleIISAgentConfig = props => {
setLogCheck(agentConfig.AllowLog) setLogCheck(agentConfig.AllowLog)
setInterval(agentConfig.Interval) setInterval(agentConfig.Interval)
setLoop_unit(agentConfig.LoopUnit) setLoop_unit(agentConfig.LoopUnit)
setWaitCheck(agentConfig.UseTimeout) setWaitCheck(agentConfig.UseTimeout || false)
setTime_out(agentConfig.Timeout) setTime_out(agentConfig.Timeout)
if (agentConfig.LoopMode === 'ByOnce') { if (agentConfig.LoopMode === 'ByOnce') {
setIsType('执行一次') setIsType('执行一次')
...@@ -87,7 +85,13 @@ const VisibleIISAgentConfig = props => { ...@@ -87,7 +85,13 @@ const VisibleIISAgentConfig = props => {
type: '重复执行' type: '重复执行'
}) })
setExeType(false) if (agentConfig.LoopMode === 'ByDay') {
setSelectValues(agentConfig.HourOfDay.split(','))
}
else if (agentConfig.LoopMode === 'ByWeek') {
setWeekData(agentConfig.DayOfWeek.split(','))
}
setExeType(true)
} }
} else { } else {
...@@ -103,8 +107,6 @@ const VisibleIISAgentConfig = props => { ...@@ -103,8 +107,6 @@ const VisibleIISAgentConfig = props => {
setIsUse(true) setIsUse(true)
setInterval(1) setInterval(1)
setLoop_unit('Hour') setLoop_unit('Hour')
} }
...@@ -121,10 +123,8 @@ const VisibleIISAgentConfig = props => { ...@@ -121,10 +123,8 @@ const VisibleIISAgentConfig = props => {
const handleCancel = () => { const handleCancel = () => {
setPreviewVisible(false) setPreviewVisible(false)
} }
const handleOk = () => { const handleOk = () => {
let fv = form.getFieldValue() let fv = form.getFieldValue()
if ((fv.loop_mode === 'ByDay' && !selectValues.length) || (fv.loop_mode === 'ByWeek' && !weekData.length)) { if ((fv.loop_mode === 'ByDay' && !selectValues.length) || (fv.loop_mode === 'ByWeek' && !weekData.length)) {
message.warning('请选择计划执行日') message.warning('请选择计划执行日')
...@@ -222,6 +222,12 @@ const VisibleIISAgentConfig = props => { ...@@ -222,6 +222,12 @@ const VisibleIISAgentConfig = props => {
} }
const onLoopModeChange = (e) => { const onLoopModeChange = (e) => {
changeLoopMode(e.target.value) changeLoopMode(e.target.value)
if (e.target.value === 'BYLOOP') {
form.setFieldsValue({
hour_of_day: '',
day_of_week: ''
})
}
} }
const onChange = (value) => { const onChange = (value) => {
setIsUse(value) setIsUse(value)
...@@ -233,6 +239,8 @@ const VisibleIISAgentConfig = props => { ...@@ -233,6 +239,8 @@ const VisibleIISAgentConfig = props => {
changeLoopMode('ByOnce') changeLoopMode('ByOnce')
form.setFieldsValue({ form.setFieldsValue({
loop_mode: 'ByOnce', loop_mode: 'ByOnce',
hour_of_day: '',
day_of_week: ''
}) })
if (!agentConfig) { if (!agentConfig) {
form.setFieldsValue({ form.setFieldsValue({
...@@ -249,7 +257,9 @@ const VisibleIISAgentConfig = props => { ...@@ -249,7 +257,9 @@ const VisibleIISAgentConfig = props => {
}) })
if (!agentConfig) { if (!agentConfig) {
form.setFieldsValue({ form.setFieldsValue({
start_time: moment(new Date(new Date().toLocaleDateString()), 'YYYY-MM-DD 00:00:00') start_time: moment(new Date(new Date().toLocaleDateString()), 'YYYY-MM-DD 00:00:00'),
hour_of_day: '',
day_of_week: ''
}) })
setExeTime(moment().format('YYYY-MM-DD 00:00:00')) setExeTime(moment().format('YYYY-MM-DD 00:00:00'))
} }
...@@ -275,7 +285,6 @@ const VisibleIISAgentConfig = props => { ...@@ -275,7 +285,6 @@ const VisibleIISAgentConfig = props => {
if (data) setSelectValues(data) if (data) setSelectValues(data)
} }
const changeWeek = (data) => { const changeWeek = (data) => {
console.log('data', data);
if (data) setWeekData(data) if (data) setWeekData(data)
} }
......
...@@ -69,7 +69,6 @@ const TemplateManage = () => { ...@@ -69,7 +69,6 @@ const TemplateManage = () => {
} }
const selectFocus = (obj) => { const selectFocus = (obj) => {
setOption([]);
GetThirdpartyTemplates(obj).then(res => { GetThirdpartyTemplates(obj).then(res => {
if (res.msg==="Ok") { if (res.msg==="Ok") {
setOption(res.data); setOption(res.data);
...@@ -79,11 +78,9 @@ const TemplateManage = () => { ...@@ -79,11 +78,9 @@ const TemplateManage = () => {
duration: 15, duration: 15,
description: res.message, description: res.message,
}); });
setOption([]);
} }
}) })
.catch(err => { .catch(err => {
console.log(3)
console.error(err); console.error(err);
}); });
}; };
...@@ -169,7 +166,7 @@ const TemplateManage = () => { ...@@ -169,7 +166,7 @@ const TemplateManage = () => {
delTemplate(record); delTemplate(record);
}} }}
> >
<DeleteOutlined danger style={{ fontSize: '16px', color: '#e86060' }}/> <DeleteOutlined style={{ fontSize: '16px', color: '#e86060' }}/>
</Popconfirm> </Popconfirm>
</div> </div>
</Tooltip> </Tooltip>
...@@ -251,8 +248,6 @@ const TemplateManage = () => { ...@@ -251,8 +248,6 @@ const TemplateManage = () => {
handleShowModal("editVisible", false) handleShowModal("editVisible", false)
} }
const onAddSubmit = (result) => { const onAddSubmit = (result) => {
console.log(result)
InsertMessageTemplate({ InsertMessageTemplate({
Type:result.type, Type:result.type,
LikeName:result.name, LikeName:result.name,
...@@ -307,6 +302,7 @@ const TemplateManage = () => { ...@@ -307,6 +302,7 @@ const TemplateManage = () => {
<Table <Table
columns={columns} columns={columns}
dataSource={data} dataSource={data}
bordered
pagination={{ pageSize: '10' }} pagination={{ pageSize: '10' }}
scroll={{ y: '500px' }} scroll={{ y: '500px' }}
/> />
......
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
.ant-select-arrow .anticon { .ant-select-arrow .anticon {
vertical-align: middle; vertical-align: middle;
} }
.ant-table-thead tr th{
font-weight: 600;
color:rgba(0,0,0,0.85);
}
.operate_bar{ .operate_bar{
width: 100%; width: 100%;
height: 60px; height: 60px;
......
...@@ -90,9 +90,9 @@ const EditModal = props => { ...@@ -90,9 +90,9 @@ const EditModal = props => {
}, },
]} ]}
> >
<Select > <Select>
<Option value="公众号">公众号</Option> <Select.Option value="公众号">公众号</Select.Option>
<Option value="短信">短信</Option> <Select.Option value="短信">短信</Select.Option>
</Select> </Select>
</Item> </Item>
</Col> </Col>
......
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