| | |
| | | // |
| | | |
| | | const { currentUser } = initialState || {}; |
| | | console.log('currentUser currentUser currentUser currentUser',currentUser) |
| | | return <span className="anticon">{currentUser?.userName || '超级管理员'}</span>; |
| | | }; |
| | | |
| | |
| | | const { initialState, setInitialState } = useModel('@@initialState'); |
| | | |
| | | const [unreadCount, setUnreadCount] = useState(0); |
| | | const { currentUser } = initialState || {}; |
| | | useEffect(() => { |
| | | const timer = setInterval(() => { |
| | | getUnreadCount().then((res: any) => { |
| | |
| | | <div style={{ border: '1px solid red', borderRadius: '50%', width: '18px', lineHeight: '16px', marginLeft: '5px', textAlign: 'center', color: 'red', flexShrink: 0 }}>{unreadCount}</div> |
| | | </div> |
| | | } |
| | | <div style={{ marginRight: '25px' }} >{currentUser?.userName || '超级管理员'}</div> |
| | | <div className="logoOut" onClick={onMenuClick}>退出登录<LogoutOutlined style={{ marginLeft: '5px' }} /></div> |
| | | </div> |
| | | }; |
| | |
| | | setInitialState((s: any) => ({ |
| | | ...s, |
| | | token: data.token, |
| | | userName:data.name, |
| | | permission: accessObj, |
| | | currentUser: userInfo, |
| | | settings: Settings, |
| | |
| | | import { Button, message, Space, Select, Cascader } from 'antd'; |
| | | import { useRef, useState, useEffect } from 'react'; |
| | | import { Access, history, useAccess } from 'umi'; |
| | | import { getList, setStatus, getUnitList } from './service' |
| | | import { getList, setStatus, getUnitList,systemPostList } from './service' |
| | | import { render } from 'react-dom'; |
| | | const Banner = () => { |
| | | |
| | | const actionRef = useRef(); |
| | | const access = useAccess(); |
| | | const [items, setItems] = useState([]); |
| | | const [positionList, setPositionList] = useState([]); |
| | | |
| | | const columns = [ |
| | | { |
| | |
| | | allowClear |
| | | placeholder="请选择" |
| | | filterOption={false} |
| | | options={[{ label: '市级', value: '1' }, { label: '区县', value: '2' }, { label: '街道', value: '3' }, { label: '社区', value: '4' }, { label: '党员', value: '5' }]} |
| | | fieldNames={{ label: 'name', value: 'id' }} |
| | | options={positionList} |
| | | > |
| | | </Select > |
| | | ) |
| | |
| | | ] |
| | | useEffect(() => { |
| | | fetchUnit(); |
| | | systemPostList({ pageNum: 1, pageSize: 10000 }).then(res => { |
| | | setPositionList(() => res.data.records) |
| | | }) |
| | | }, []); |
| | | |
| | | const fetchUnit = () => { |
| | |
| | | }; |
| | | |
| | | return <div> |
| | | <PageContainer title='消息通知'> |
| | | <PageContainer title='消息通知' header={{ |
| | | breadcrumb: {}, |
| | | }}> |
| | | <ProTable |
| | | rowKey='id' |
| | | actionRef={actionRef} |
| | |
| | | params |
| | | }); |
| | | } |
| | | // 获取职位列表数据 |
| | | export const systemPostList = async (params) => { |
| | | return request(`/api/huacheng-sangeshenbian/systemPost/list`, { |
| | | method: 'GET',params |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | }, |
| | | ] |
| | | |
| | | return <PageContainer title='角色管理'> |
| | | return <PageContainer title='角色管理' header={{ |
| | | breadcrumb: {}, |
| | | }}> |
| | | <ProTable |
| | | rowKey='id' |
| | | actionRef={actionRef} |
| | |
| | | <Form.Item label="市级账号" name="cityDeadlineReminder" rules={ |
| | | [{ required: true, message: '请输入市级账号' }] |
| | | }> |
| | | <InputNumber precision={0} min={0} addonAfter="天内" controls={false}></InputNumber> |
| | | <InputNumber precision={0} min={0} addonAfter="天前" controls={false}></InputNumber> |
| | | </Form.Item> |
| | | |
| | | <Form.Item label="区县账号" name="districtDeadlineReminder" rules={ |
| | | [{ required: true, message: '请输入区县账号' }] |
| | | }> |
| | | <InputNumber precision={0} min={0} addonAfter="天内" controls={false}></InputNumber> |
| | | <InputNumber precision={0} min={0} addonAfter="天前" controls={false}></InputNumber> |
| | | </Form.Item> |
| | | |
| | | <Form.Item label="街道账号" name="streetDeadlineReminder" rules={ |
| | | [{ required: true, message: '请输入街道账号' }] |
| | | }> |
| | | <InputNumber precision={0} min={0} addonAfter="天内" controls={false}></InputNumber> |
| | | <InputNumber precision={0} min={0} addonAfter="天前" controls={false}></InputNumber> |
| | | </Form.Item> |
| | | <Form.Item label="社区账号" name="communityDeadlineReminder" rules={ |
| | | [{ required: true, message: '请输入社区账号' }] |
| | | }> |
| | | <InputNumber precision={0} min={0} addonAfter="天内" controls={false}></InputNumber> |
| | | <InputNumber precision={0} min={0} addonAfter="天前" controls={false}></InputNumber> |
| | | </Form.Item> |
| | | <Form.Item label="党员账号" name="partyMemberDeadlineReminder" rules={ |
| | | [{ required: true, message: '请输入党员账号' }] |
| | | }> |
| | | <InputNumber precision={0} min={0} addonAfter="天内" controls={false}></InputNumber> |
| | | <InputNumber precision={0} min={0} addonAfter="天前" controls={false}></InputNumber> |
| | | </Form.Item> |
| | | </Space> |
| | | </Card> |
| | |
| | | ] |
| | | |
| | | return <div> |
| | | <PageContainer title='banner管理'> |
| | | <PageContainer title='banner管理' header={{ |
| | | breadcrumb: {}, |
| | | }}> |
| | | <ProTable |
| | | rowKey='id' |
| | | actionRef={actionRef} |
| | |
| | | ]; |
| | | return ( |
| | | <div> |
| | | <PageContainer> |
| | | <PageContainer title="问题类型管理" header={{ |
| | | breadcrumb: {}, |
| | | }}> |
| | | <ProTable |
| | | rowKey="id" |
| | | actionRef={actionRef} |