Commit bc7af539 authored by shaoan123's avatar shaoan123

更改消息平台界面

parent d2abfe48
Pipeline #32001 passed with stages
in 33 minutes 7 seconds
......@@ -8,7 +8,8 @@ import {
Select,
Popconfirm,
message,
Tooltip
Tooltip,
Spin
} from 'antd';
import { PlusCircleOutlined, EditTwoTone, DeleteOutlined, FundViewOutlined } from '@ant-design/icons';
import { useHistory } from 'react-router-dom';
......@@ -37,6 +38,7 @@ const ProjectManage = () => {
const [pageIndex, setPageIndex] = useState(0)
const [pageSize, setPageSize] = useState(10)
const [dataList, setDataList] = useState([])
const [treeLoading, setTreeLoading] = useState(false);
const columns = [
{
title: '方案名称',
......@@ -74,7 +76,7 @@ const ProjectManage = () => {
render: (text, record) => (
<Space>
<Tooltip title="测试">
<FundViewOutlined style={{ fontSize: '16px', color: '#1890FF' }} onClick={() => {
<FundViewOutlined style={{ fontSize: '16px', color: '#1890FF' }} onClick={() => {
TestDesc(record);
}} />
</Tooltip>
......@@ -98,7 +100,7 @@ const ProjectManage = () => {
}}
>
<DeleteOutlined style={{ fontSize: '16px', color: '#e86060' }}></DeleteOutlined>
<DeleteOutlined style={{ fontSize: '16px', color: '#e86060' }}></DeleteOutlined>
</Popconfirm>
</div>)
}
......@@ -213,8 +215,10 @@ const ProjectManage = () => {
}
useEffect(() => {
setTreeLoading(true)
GetMsgTypeList().then(
res => {
setTreeLoading(false)
if (res.code === 0) {
setMessageTypes(res.data)
}
......@@ -226,8 +230,10 @@ const ProjectManage = () => {
}, [flag])
const GetMessageList = (params) => {
setTreeLoading(true)
GetMessageConfigList(params).then(
res => {
setTreeLoading(false)
let mesList = []
if (res.code === 0) {
console.log('res.data.MessageConfigModels', res.data.MessageConfigModels);
......@@ -242,7 +248,7 @@ const ProjectManage = () => {
item: item
})
})
console.log('mesList', mesList);
setDataList(mesList)
}
}
......@@ -250,61 +256,63 @@ const ProjectManage = () => {
}
return (
<div className={styles.project_container}>
<div className={styles.operate_bar}>
<div className={styles.template_type}>
<div className={styles.title}>方案类型</div>
<Select placeholder="请选择方案类型!" defaultValue={currentType} style={{ width: "150px" }} onChange={onTypeChange}>
<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>
<Select placeholder="请选择方案名称!" defaultValue={currentName} style={{ width: "150px" }} onChange={onNameChange}>
<Option value="全部">全部</Option>
{
messageTypes.map((item, idx) => {
return (
<Option key={idx} value={item.MsgType}>{item.MsgType}</Option>
)
})
}
</Select>
</div>
<div className={styles.fast_search}>
<div className={styles.title}>快速检索</div>
<Search
allowClear
placeholder={placeholder}
onSearch={handleSearch}
// onChange={handleChange}
enterButton
style={{ width: "300px" }}
/>
</div>
<Button type="primary" onClick={handleReset}>重置</Button>
<Spin tip="loading..." spinning={treeLoading}>
<div className={styles.operate_bar}>
<div className={styles.template_type}>
<div className={styles.title}>方案类型</div>
<Select placeholder="请选择方案类型!" defaultValue={currentType} style={{ width: "150px" }} onChange={onTypeChange}>
<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>
<Select placeholder="请选择方案名称!" defaultValue={currentName} style={{ width: "150px" }} onChange={onNameChange}>
<Option value="全部">全部</Option>
{
messageTypes.map((item, idx) => {
return (
<Option key={idx} value={item.MsgType}>{item.MsgType}</Option>
)
})
}
</Select>
</div>
<div className={styles.fast_search}>
<div className={styles.title}>快速检索</div>
<Search
allowClear
placeholder={placeholder}
onSearch={handleSearch}
// onChange={handleChange}
enterButton
style={{ width: "300px" }}
/>
</div>
<Button type="primary" onClick={handleReset}>重置</Button>
<Button type="primary" style={{ marginLeft: "10px" }} icon={<PlusCircleOutlined />} onClick={onAddClick}>新增</Button>
<Button type="primary" style={{ marginLeft: "10px" }} icon={<PlusCircleOutlined />} onClick={onAddClick}>新增</Button>
</div>
<div className={styles.list_view}>
<Table columns={columns} dataSource={dataList} pagination={{ pageSize: '10' }} rowKey='ID' />
</div>
<EditModal
visible={visibleParams.editVisible}
template={currentTemplate}
onCancel={() => handleShowModal('editVisible', false)}
confirmModal={editModal}
/>
<EditModal
visible={visibleParams.addVisible}
template={{}}
onCancel={() => handleShowModal('addVisible', false)}
confirmModal={bddModal}
/>
</div>
<div className={styles.list_view}>
<Table columns={columns} dataSource={dataList} pagination={{ pageSize: '10' }} rowKey='ID' />
</div>
<EditModal
visible={visibleParams.editVisible}
template={currentTemplate}
onCancel={() => handleShowModal('editVisible', false)}
confirmModal={editModal}
/>
<EditModal
visible={visibleParams.addVisible}
template={{}}
onCancel={() => handleShowModal('addVisible', false)}
confirmModal={bddModal}
/>
</Spin>
</div>
)
}
......
......@@ -61,7 +61,7 @@ const DayOfWeekSelect = props => {
{
hours.map((item, idx) => {
return (
<Col span={4}>
<Col span={4} key={idx}>
<Checkbox value={item.value}>{item.name}</Checkbox>
</Col>
)
......
......@@ -81,7 +81,7 @@ const HourOfDaySelect = props => {
{
hours.map((item, idx) => {
return (
<Col span={4}>
<Col span={4} key={idx}>
<Checkbox value={item.value}>{item.name}</Checkbox>
</Col>
)
......
......@@ -17,4 +17,9 @@
height: 500px;
}
.loopShow{
display: flex;
align-items: center;
margin-left: 3.6rem;
}
......@@ -330,7 +330,7 @@ const EditModal = props => {
<Item
label="模板"
name="app_template"
labelCol={{ span: 4 }}
labelCol={{ span: 3 }}
>
<Select style={{ width: '97%' }} disabled={!currentTrench.isAPPShow} >
{
......@@ -345,7 +345,7 @@ const EditModal = props => {
<Item
label="功能路径"
name="app_path"
labelCol={{ span: 4 }}
labelCol={{ span: 3 }}
>
<Input style={{ width: '97%' }} disabled={!currentTrench.isAPPShow} placeholder="请输入功能路径" />
</Item>
......@@ -405,7 +405,7 @@ const EditModal = props => {
<Item
label="模板"
name="web_template"
labelCol={{ span: 4 }}
labelCol={{ span: 3 }}
>
<Select style={{ width: '97%' }} disabled={!currentTrench.isWEBShow}>
{
......@@ -420,7 +420,7 @@ const EditModal = props => {
<Item
label="功能路径"
name="web_path"
labelCol={{ span: 4 }}
labelCol={{ span: 3 }}
>
<Input style={{ width: '97%' }} disabled={!currentTrench.isWEBShow} placeholder="请输入功能路径" />
</Item>
......
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