| | |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | path: '/setting', |
| | | layout: false, |
| | | name:'系统设置', |
| | | routes: [ |
| | | { |
| | | name: '职位管理', |
| | | path: '/career', |
| | | component: './setting/career', |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | path: '/work-order', |
| | | layout: false, |
| | | name:'工单事项管理', |
| | | routes: [ |
| | | { |
| | | name: '工单事项配置', |
| | | path: '/configuration', |
| | | component: './work-order-settimg/configuration', |
| | | }, |
| | | ], |
| | | }, |
| | | |
| | | ]; |
New file |
| | |
| | | import { Form, Input, Modal,Button } from 'antd'; |
| | | import { forwardRef, useImperativeHandle, useState } from 'react'; |
| | | |
| | | const formItemLayout = { |
| | | labelCol: { span: 7 }, |
| | | wrapperCol: { span: 12 }, |
| | | }; |
| | | |
| | | const AddEditView = ({ visible, onSave, onUpdate, onCancel }, ref) => { |
| | | const [form] = Form.useForm(); |
| | | const [editData, setEditData] = useState({}); |
| | | const [rolesList, setRolesList] = useState(); |
| | | |
| | | /** |
| | | * 确定按钮事件 |
| | | */ |
| | | const okHandle = () => { |
| | | form.validateFields().then((values) => { |
| | | if (editData.deptId) { |
| | | values.deptId = editData.deptId; |
| | | onUpdate(values); |
| | | } else { |
| | | onSave(values); |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | useImperativeHandle(ref, () => { |
| | | return { |
| | | refreshData: (data) => { |
| | | form.resetFields(); |
| | | form.setFieldsValue(data); |
| | | setEditData(data); |
| | | }, |
| | | clean: () => { |
| | | form.resetFields(); |
| | | }, |
| | | }; |
| | | }); |
| | | |
| | | return ( |
| | | <Modal |
| | | getContainer={false} |
| | | width="25%" |
| | | destroyOnClose |
| | | title={editData.deptId ? '编辑职位' : '添加职位'} |
| | | open={visible} |
| | | onCancel={() => onCancel(false)} |
| | | footer={[ |
| | | <Button key="back" onClick={() => onCancel(false)}> |
| | | 关闭 |
| | | </Button>, |
| | | <Button key="submit" type="primary" onClick={okHandle}> |
| | | 确认 |
| | | </Button> |
| | | ]} |
| | | > |
| | | <Form layout="horizontal" {...formItemLayout} form={form} initialValues={{ isAuctioneer: 1 }}> |
| | | <Form.Item |
| | | name="deptName" |
| | | required |
| | | label="职位名称" |
| | | rules={[{ required: true, message: '请输入职位名称' }]} |
| | | > |
| | | <Input placeholder="请输入职位名称" /> |
| | | </Form.Item> |
| | | </Form> |
| | | </Modal> |
| | | ); |
| | | }; |
| | | |
| | | export default forwardRef(AddEditView); |
New file |
| | |
| | | import { buildProTableDataSource, sendRequest, showDelConfirm } from '@/utils/antdUtils'; |
| | | import { PageContainer, ProTable } from '@ant-design/pro-components'; |
| | | import { Button, InputNumber, Select, Space } from 'antd'; |
| | | import { useRef, useState } from 'react'; |
| | | import { Access, useAccess } from 'umi'; |
| | | import AddAndEdit from './components/addAndEdit'; |
| | | import { add, edit, del, getList, updateStatus, resetPaswword } from './service'; |
| | | const Account = () => { |
| | | const actionRef = useRef(); |
| | | const addViewRef = useRef(); |
| | | const [modalVisible, handleModalVisible] = useState(false); |
| | | const access = useAccess(); |
| | | |
| | | const columns = [ |
| | | { |
| | | title: '职位名称', |
| | | dataIndex: 'deptName', |
| | | }, |
| | | { |
| | | title: '操作', |
| | | hideInSearch: true, |
| | | render: (text, record) => { |
| | | return ( |
| | | <Space> |
| | | { |
| | | !record.admin && |
| | | <Button |
| | | type="link" |
| | | onClick={() => { |
| | | addViewRef.current.refreshData(record); |
| | | handleModalVisible(true); |
| | | }} |
| | | > |
| | | 编辑 |
| | | </Button> |
| | | } |
| | | { |
| | | !record.admin && |
| | | <Button |
| | | type="link" |
| | | onClick={() => { |
| | | showDelConfirm(async () => { |
| | | let status = await sendRequest(del, record.deptId); |
| | | if (status) { |
| | | actionRef.current.reload(); |
| | | } |
| | | }, '确认删除所选信息吗?'); |
| | | }} |
| | | > |
| | | 删除 |
| | | </Button> |
| | | } |
| | | </Space> |
| | | ); |
| | | }, |
| | | }, |
| | | ]; |
| | | return ( |
| | | <div> |
| | | <PageContainer header={{ |
| | | breadcrumb: {}, |
| | | }}> |
| | | <ProTable |
| | | rowKey="id" |
| | | actionRef={actionRef} |
| | | columns={columns} |
| | | pagination={false} |
| | | request={async(params) => { |
| | | return await buildProTableDataSource(getList, params); |
| | | }} |
| | | toolBarRender={(action, selectRows) => [ |
| | | <Space> |
| | | <Button |
| | | type="primary" |
| | | onClick={() => { |
| | | addViewRef.current.refreshData({}); |
| | | handleModalVisible(true); |
| | | }} |
| | | > |
| | | 添加 |
| | | </Button> |
| | | </Space>, |
| | | ]} |
| | | /> |
| | | <AddAndEdit |
| | | ref={addViewRef} |
| | | visible={modalVisible} |
| | | onCancel={() => handleModalVisible(false)} |
| | | onSave={async (fileds) => { |
| | | const success = await sendRequest(add, fileds); |
| | | if (success) { |
| | | handleModalVisible(false); |
| | | actionRef.current.reload(); |
| | | } |
| | | }} |
| | | onUpdate={async (fileds) => { |
| | | const success = await sendRequest(edit, fileds); |
| | | if (success) { |
| | | handleModalVisible(false); |
| | | actionRef.current.reload(); |
| | | } |
| | | }} |
| | | /> |
| | | </PageContainer> |
| | | </div> |
| | | ); |
| | | }; |
| | | |
| | | export default Account; |
New file |
| | |
| | | import { request } from '@umijs/max'; |
| | | |
| | | // 分页获取部门列表 |
| | | export const getList = async (data) => { |
| | | return request(`/system/dept/list`, { |
| | | method: 'GET', |
| | | params:data |
| | | }); |
| | | } |
| | | |
| | | // 新增部门 |
| | | export const add = async (data) => { |
| | | return request('/system/dept', { |
| | | method: 'POST', |
| | | data, |
| | | }); |
| | | } |
| | | |
| | | // 修改部门 |
| | | export const edit = async (data) => { |
| | | return request('/system/dept', { |
| | | method: 'PUT', |
| | | data |
| | | }); |
| | | } |
| | | |
| | | // 删除部门管理 |
| | | export const del = async (data) => { |
| | | return request(`/system/dept/${data}`, { |
| | | method: 'DELETE', |
| | | }); |
| | | } |
| | | |
| | | |
New file |
| | |
| | | import { showDelConfirm } from '@/utils/antdUtils'; |
| | | import { PageContainer, ProTable } from '@ant-design/pro-components'; |
| | | import { Button, Space, Form, InputNumber, Card } from 'antd'; |
| | | import { useRef, useState, useEffect } from 'react'; |
| | | import { Access, useAccess } from 'umi'; |
| | | import { sendRequest } from '@/utils/antdUtils'; |
| | | |
| | | |
| | | // import AddAndEdit from './components/addAndEdit'; |
| | | // import { getConfig, saveConfig } from './service'; |
| | | const TabPane = Tabs.TabPane; |
| | | const Account = () => { |
| | | const actionRef = useRef(); |
| | | const addViewRef = useRef(); |
| | | const addViewRef1 = useRef(); |
| | | const [form] = Form.useForm(); |
| | | const [tab, setTab] = useState('1'); |
| | | const [modalVisible, handleModalVisible] = useState(false); |
| | | const [selectedRowKeys, setSelectedRowKeys] = useState([]); |
| | | const changeStatusRef = useRef(); |
| | | const [addWarnVisible, handleAddWarnVisible] = useState(false); |
| | | const { RangePicker } = DatePicker; |
| | | const [dataSource, setDataSource] = useState([]); |
| | | const [data, setData] = useState([]); |
| | | const access = useAccess(); |
| | | |
| | | useEffect(() => { |
| | | }, []) |
| | | |
| | | const save = () => { |
| | | form.validateFields().then(async (values) => { |
| | | |
| | | }); |
| | | }; |
| | | |
| | | |
| | | |
| | | return ( |
| | | <div> |
| | | <PageContainer |
| | | header={{ |
| | | title: '述求事项配置', |
| | | breadcrumb: {}, |
| | | }} |
| | | > |
| | | <Card> |
| | | <Form scrollToFirstError form={form}> |
| | | <Card> |
| | | <div><span style={{ fontSize: '14px', fontWeight: 600 }}>*诉求处理时间配置: |
| | | </span><span style={{ marginLeft: 8, color: '#a5a5a5' }}>超过时间未处理诉求,系统自动对该事件承办者发送短信提醒,并知会至上一级管理层进行督办。 |
| | | </span></div> |
| | | <Form.Item label="市级账号" name="isAuctioneer" rules={ |
| | | [{ required: true, message: '请输入市级账号' }] |
| | | }> |
| | | <InputNumber precision={0} min={0} addonAfter="天内" ></InputNumber> |
| | | </Form.Item> |
| | | |
| | | <Form.Item label="区县账号" name="isAuctioneer" rules={ |
| | | [{ required: true, message: '请输入区县账号' }] |
| | | }> |
| | | <InputNumber precision={0} min={0} addonAfter="天内" ></InputNumber> |
| | | </Form.Item> |
| | | |
| | | <Form.Item label="街道账号" name="isAuctioneer" rules={ |
| | | [{ required: true, message: '请输入街道账号' }] |
| | | }> |
| | | <InputNumber precision={0} min={0} addonAfter="天内" ></InputNumber> |
| | | </Form.Item> |
| | | <Form.Item label="社区账号" name="isAuctioneer" rules={ |
| | | [{ required: true, message: '请输入社区账号' }] |
| | | }> |
| | | <InputNumber precision={0} min={0} addonAfter="天内" ></InputNumber> |
| | | </Form.Item> |
| | | <Form.Item label="党员账号" name="isAuctioneer" rules={ |
| | | [{ required: true, message: '请输入党员账号' }] |
| | | }> |
| | | <InputNumber precision={0} min={0} addonAfter="天内" ></InputNumber> |
| | | </Form.Item> |
| | | </Card> |
| | | <Card> |
| | | <div><span style={{ fontSize: '14px', fontWeight: 600 }}>*时限临期提醒配置: |
| | | </span><span style={{ marginLeft: 8, color: '#a5a5a5' }}>超过时间未处理诉求,系统自动对该事件承办者发送短信提醒,并知会至上一级管理层进行督办。 |
| | | </span></div> |
| | | <Form.Item label="市级账号" name="isAuctioneer" rules={ |
| | | [{ required: true, message: '请输入市级账号' }] |
| | | }> |
| | | <InputNumber precision={0} min={0} addonAfter="天内" ></InputNumber> |
| | | </Form.Item> |
| | | |
| | | <Form.Item label="区县账号" name="isAuctioneer" rules={ |
| | | [{ required: true, message: '请输入区县账号' }] |
| | | }> |
| | | <InputNumber precision={0} min={0} addonAfter="天内" ></InputNumber> |
| | | </Form.Item> |
| | | |
| | | <Form.Item label="街道账号" name="isAuctioneer" rules={ |
| | | [{ required: true, message: '请输入街道账号' }] |
| | | }> |
| | | <InputNumber precision={0} min={0} addonAfter="天内" ></InputNumber> |
| | | </Form.Item> |
| | | <Form.Item label="社区账号" name="isAuctioneer" rules={ |
| | | [{ required: true, message: '请输入社区账号' }] |
| | | }> |
| | | <InputNumber precision={0} min={0} addonAfter="天内" ></InputNumber> |
| | | </Form.Item> |
| | | <Form.Item label="党员账号" name="isAuctioneer" rules={ |
| | | [{ required: true, message: '请输入党员账号' }] |
| | | }> |
| | | <InputNumber precision={0} min={0} addonAfter="天内" ></InputNumber> |
| | | </Form.Item> |
| | | </Card> |
| | | <Card> |
| | | <div><span style={{ fontSize: '14px', fontWeight: 600 }}>*诉求处理时间: |
| | | </span><span style={{ marginLeft: 8, color: '#a5a5a5' }}>超过时间未处理诉求,系统自动对该事件承办者发送短信提醒,并知会至上一级管理层进行督办。 |
| | | </span></div> |
| | | <Form.Item label="添加后处理时间" name="isAuctioneer" rules={ |
| | | [{ required: true, message: '请输入添加后处理时间' }] |
| | | }> |
| | | <InputNumber precision={0} min={0} addonAfter="天内" ></InputNumber> |
| | | </Form.Item> |
| | | </Card> |
| | | </Form> |
| | | </Card> |
| | | </PageContainer> |
| | | </div> |
| | | ); |
| | | }; |
| | | |
| | | export default Account; |