Commit cdf52348 authored by shaoan123's avatar shaoan123

修改消息平台样式

parent 80e9b264
Pipeline #32435 skipped with stages
# 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.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为转发前缀,后面为代理转发的地址
# PROXY2 = test : http://localhost:8006/
......
......@@ -11,7 +11,7 @@ import {
Tooltip,
Spin
} 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';
const { Search } = Input;
const { Option } = Select;
......@@ -44,7 +44,16 @@ const ProjectManage = () => {
title: '方案名称',
dataIndex: '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: '方案类型',
......@@ -156,7 +165,7 @@ const ProjectManage = () => {
}
)
}
else{
else {
message.error(res.msg)
}
}
......@@ -250,7 +259,7 @@ const ProjectManage = () => {
item: item
})
})
setDataList(mesList)
}
}
......@@ -296,11 +305,11 @@ const ProjectManage = () => {
</div>
<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 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>
<EditModal
visible={visibleParams.editVisible}
......
......@@ -49,5 +49,9 @@
display: flex;
flex-direction: column;
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 => {
const dateFormat = 'YYYY-MM-DD HH:mm:ss';
const { agentConfig, value, onIISAgentSubmit } = props
useEffect(() => {
console.log('agentConfig', 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')
console.log('agentConfig', agentConfig);
console.log(startTime, 'startTime');
form.setFieldsValue({
is_enable: agentConfig.Enabled,
url_type: agentConfig.Absolute ? false : true,
......@@ -72,7 +70,7 @@ const VisibleIISAgentConfig = props => {
setLogCheck(agentConfig.AllowLog)
setInterval(agentConfig.Interval)
setLoop_unit(agentConfig.LoopUnit)
setWaitCheck(agentConfig.UseTimeout)
setWaitCheck(agentConfig.UseTimeout || false)
setTime_out(agentConfig.Timeout)
if (agentConfig.LoopMode === 'ByOnce') {
setIsType('执行一次')
......@@ -87,7 +85,13 @@ const VisibleIISAgentConfig = props => {
type: '重复执行'
})
setExeType(false)
if (agentConfig.LoopMode === 'ByDay') {
setSelectValues(agentConfig.HourOfDay.split(','))
}
else if (agentConfig.LoopMode === 'ByWeek') {
setWeekData(agentConfig.DayOfWeek.split(','))
}
setExeType(true)
}
} else {
......@@ -103,8 +107,6 @@ const VisibleIISAgentConfig = props => {
setIsUse(true)
setInterval(1)
setLoop_unit('Hour')
}
......@@ -121,10 +123,8 @@ const VisibleIISAgentConfig = props => {
const handleCancel = () => {
setPreviewVisible(false)
}
const handleOk = () => {
let fv = form.getFieldValue()
if ((fv.loop_mode === 'ByDay' && !selectValues.length) || (fv.loop_mode === 'ByWeek' && !weekData.length)) {
message.warning('请选择计划执行日')
......@@ -222,6 +222,12 @@ const VisibleIISAgentConfig = props => {
}
const onLoopModeChange = (e) => {
changeLoopMode(e.target.value)
if (e.target.value === 'BYLOOP') {
form.setFieldsValue({
hour_of_day: '',
day_of_week: ''
})
}
}
const onChange = (value) => {
setIsUse(value)
......@@ -233,6 +239,8 @@ const VisibleIISAgentConfig = props => {
changeLoopMode('ByOnce')
form.setFieldsValue({
loop_mode: 'ByOnce',
hour_of_day: '',
day_of_week: ''
})
if (!agentConfig) {
form.setFieldsValue({
......@@ -249,7 +257,9 @@ const VisibleIISAgentConfig = props => {
})
if (!agentConfig) {
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'))
}
......@@ -275,7 +285,6 @@ const VisibleIISAgentConfig = props => {
if (data) setSelectValues(data)
}
const changeWeek = (data) => {
console.log('data', data);
if (data) setWeekData(data)
}
......
......@@ -69,7 +69,6 @@ const TemplateManage = () => {
}
const selectFocus = (obj) => {
setOption([]);
GetThirdpartyTemplates(obj).then(res => {
if (res.msg==="Ok") {
setOption(res.data);
......@@ -79,11 +78,9 @@ const TemplateManage = () => {
duration: 15,
description: res.message,
});
setOption([]);
}
})
.catch(err => {
console.log(3)
console.error(err);
});
};
......@@ -169,7 +166,7 @@ const TemplateManage = () => {
delTemplate(record);
}}
>
<DeleteOutlined danger style={{ fontSize: '16px', color: '#e86060' }}/>
<DeleteOutlined style={{ fontSize: '16px', color: '#e86060' }}/>
</Popconfirm>
</div>
</Tooltip>
......@@ -251,8 +248,6 @@ const TemplateManage = () => {
handleShowModal("editVisible", false)
}
const onAddSubmit = (result) => {
console.log(result)
InsertMessageTemplate({
Type:result.type,
LikeName:result.name,
......@@ -307,6 +302,7 @@ const TemplateManage = () => {
<Table
columns={columns}
dataSource={data}
bordered
pagination={{ pageSize: '10' }}
scroll={{ y: '500px' }}
/>
......
......@@ -4,6 +4,10 @@
.ant-select-arrow .anticon {
vertical-align: middle;
}
.ant-table-thead tr th{
font-weight: 600;
color:rgba(0,0,0,0.85);
}
.operate_bar{
width: 100%;
height: 60px;
......
......@@ -90,9 +90,9 @@ const EditModal = props => {
},
]}
>
<Select >
<Option value="公众号">公众号</Option>
<Option value="短信">短信</Option>
<Select>
<Select.Option value="公众号">公众号</Select.Option>
<Select.Option value="短信">短信</Select.Option>
</Select>
</Item>
</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