diff --git a/web/client/src/app.js b/web/client/src/app.js index edef086..9e47938 100644 --- a/web/client/src/app.js +++ b/web/client/src/app.js @@ -1,6 +1,6 @@ import React, { useEffect } from 'react'; import { - Auth, AlarmConfure, Article, Party + Auth, AlarmConfure, Article, Party,Personnel } from './sections'; import Layout from './layout'; @@ -19,7 +19,7 @@ function App(props) { return ( ); } diff --git a/web/client/src/index.js b/web/client/src/index.js index 824a005..442a180 100644 --- a/web/client/src/index.js +++ b/web/client/src/index.js @@ -4,4 +4,4 @@ import { } from 'react-dom'; import App from './app'; -render((), document.getElementById('App')); +render((), document.getElementById('App')); diff --git a/web/client/src/layout/components/header/index.js b/web/client/src/layout/components/header/index.js index 864dc6a..71ae3e8 100644 --- a/web/client/src/layout/components/header/index.js +++ b/web/client/src/layout/components/header/index.js @@ -61,7 +61,7 @@ function Header(props) {
{/* */} - 党建工会后台管理 + 研发看板后台管理
diff --git a/web/client/src/layout/containers/layout/index.js b/web/client/src/layout/containers/layout/index.js index e30928f..4a3e190 100644 --- a/web/client/src/layout/containers/layout/index.js +++ b/web/client/src/layout/containers/layout/index.js @@ -48,13 +48,12 @@ function LayoutContainer(props) { // 根据登录验证,如果尚未登录,则不可跳转/article useEffect(() => { const { pathname } = location; - const rightList = ['/article']; + const rightList = ["/article"]; if (rightList.every((path) => pathname.indexOf(path) == -1)) { - if (!sessionStorage.getItem("user")) { - dispatch(push("/article")); - } + // if (!sessionStorage.getItem("user")) { + // dispatch(push("/article")); + // } } - }, [location]); const [themeName, setThemeName] = useState( localStorage.getItem("theme-name") || "light" @@ -231,9 +230,4 @@ function mapStateToProps(state) { export default connect(mapStateToProps)(LayoutContainer); - -var pathList = [ - '/article', - '/party', - '/organization' -]; \ No newline at end of file +var pathList = ["/article", "/party", "/organization", "/personnel"]; diff --git a/web/client/src/sections/article/components/import_model.js b/web/client/src/sections/article/components/import_model.js new file mode 100644 index 0000000..41098a5 --- /dev/null +++ b/web/client/src/sections/article/components/import_model.js @@ -0,0 +1,163 @@ +/* + * @description : + * @Date : 2021-04-07 14:39:33 + * @FilePath : \web\client\src\sections\user\components\userManagement\importUser.js + * @useStrict : use strict + */ + +'use strict'; +import React, { useState } from 'react'; +import { connect } from 'react-redux'; +import { Button, Input, Card, Modal, Upload, message } from 'antd'; +import { Request } from '@peace/utils' +import request from 'superagent' +import XLSX from 'xlsx' +// import { userBulkAdd } from '../../actions' + +//TODO 下载模板和上传文件读取 +const ImportUser = props => { + const { user, dispatch, handleCancel, params,editData } = props + const [msg, setMsg] = useState('') + const [loading, setLoading] = useState('') + const [postData, setPostData] = useState([]) + + const confirm = () => { + if (postData.length) { + setLoading(true) + // dispatch(userBulkAdd(postData, params.departmentId ? params.departmentId : null)).then(res => { + // if (res.success) { + + // } + // setLoading(false) + // }) + } else { + message.warn('没有数据可以提交,请上传数据文件') + } + } + + return ( + { + setMsg('') + setLoading(false) + setPostData([]) + handleCancel() + }} + destroyOnClose + > + {/* */} + + + +
下载模板后填写完整后上传
+
+ { + setMsg('') + setPostData([]) + const extNames = file.name.split('.'); + let isDAE = false; + if (extNames.length > 0) { + let fileType = extNames[extNames.length - 1].toLowerCase(); + isDAE = ['xlsx', 'xls'].some((f) => f == fileType); + } + if (!isDAE) { + setMsg(`只能上传 ${['xlsx', 'xls'].join()} 格式的文件!`); + return false; + } + }, + onChange(info) { + + }, + customRequest: async (data) => { + const { file, onSuccess, onError } = data + + const reader = new FileReader(); // 使用 FileReader 读取数据 + reader.onload = function (e) { // 数据读取完成后的回调函数 + const data = new Uint8Array(e.target.result); + const workbook = XLSX.read(data, { type: 'array' }); // workbook 是 xlsx 解析 excel 后返回的对象 + + const firstSheetName = workbook.SheetNames[0]; // 获取第一个 sheet 的名字 + const worksheet = workbook.Sheets[firstSheetName]; // 获取第一个 sheet 的内容 + const res = XLSX.utils.sheet_to_json(worksheet); // 使用 utils 里的方法转换内容为便于使用的数组 + const error = (msg) => { + setMsg(msg) + onError({ message: msg }) + } + if (res.length > 1000) { + error('一次性上传数据行数应小于1000行,请分批上传') + return + } + if (!res.length) { + error('请填写至少一行数据') + return + } + let postData = [] + const pattern = /^1[3|4|5|6|7|8|9]\d{9}$/ + for (let i = 0; i < res.length; i++) { + let d = res[i] + let name = String(d['姓名']).trim(); + let phone = String(d['手机号码']).trim(); + let account = String(d['账号']).trim(); + let peopleCode = d['人员编号'] && String(d['人员编号']).trim(); + if (!name || !phone || !account || !peopleCode) { + error(`第${i + 1} 行有空值,请填写后重新上传`) + return + } + if (!pattern.test(phone)) { + error(`第${i + 1} 行手机号码错误`) + return + } + if (name.length > 128 || account.length > 128) { + error(`第${i + 1} 行数据字符长度大于 128,请更改后重新上传`) + return + } + if (postData.some(p => p.account == account)) { + error(`第${i + 1} 行账号重复,请更改后重新上传`) + return + } + postData.push({ + name, phone, account, peopleCode + }) + } + if (postData.length) { + setPostData(postData) + } + let msg = '文件解析完成,点击确定按钮上传保存!' + setMsg(msg) + onSuccess({ message: msg }) + }; + reader.readAsArrayBuffer(file); // 读取数据 + }, + }}> + + +
+ {msg} +
+
+ ) +} + +function mapStateToProps(state) { + const { auth, customizeList } = state; + return { + user: auth.user, + } +} + + +export default connect(mapStateToProps)(ImportUser); \ No newline at end of file diff --git a/web/client/src/sections/article/components/modeal.js b/web/client/src/sections/article/components/modeal.js new file mode 100644 index 0000000..53e5c41 --- /dev/null +++ b/web/client/src/sections/article/components/modeal.js @@ -0,0 +1,96 @@ +import React,{useState,useEffect} from 'react' +import { Modal, Form, Input, Button,DatePicker,Select } from 'antd' +import dayjs from 'dayjs'; +function modeal(props) { + const [form] = Form.useForm(); + const { visible, handleOk, handleCancel, editData } = props + console.log(editData) + useEffect(() => { + if (editData && visible) { + form.setFieldsValue({ + name_project: editData.name_project, + part_people: editData.part_people, + build_time: dayjs(editData?.build_time), + publish_time: dayjs(editData.publish_time), + progress:editData.progress + }) + } + }, [editData, visible]) + return ( + +
+ + + + + + + + + + + + + + + + +
+ + +
+
+ +
+
+ ) +} + +export default modeal \ No newline at end of file diff --git a/web/client/src/sections/article/containers/index.js b/web/client/src/sections/article/containers/index.js index 472a88c..a8dc5de 100644 --- a/web/client/src/sections/article/containers/index.js +++ b/web/client/src/sections/article/containers/index.js @@ -7,6 +7,8 @@ import Action from "../actions/index"; import moment from "moment"; import { push } from "react-router-redux"; import { Scroller } from "$components"; +import ProjectModeal from '../components/modeal' +import ImportModeal from '../components/import_model' export const Default = (props) => { const { dispatch } = props; @@ -14,60 +16,56 @@ export const Default = (props) => { const [state, setState] = useState(); //状态 const [day, setDay] = useState(); //发布时间 const [counts, setCounts] = useState(); //数据 + const [visible, setVisible] = useState(false); //弹窗 + const [editData, setEditData] = useState(); //数据 + const [importVisible, setImportVisible] = useState(false); //弹窗 + const tableActionRef = useRef(); + const dataSore = [{ name_project: '企服v1.0.1', part_people: '投入研发3、测试1', build_time: new Date( ), publish_time: new Date( ), progress: '研发中' }] const columns = [ { title: "项目计划", - dataIndex: "name", - key: "name", + dataIndex: "name_project", + key: "name_project", hideInSearch: true, render: (dom, record) => { - return record.title; + return record.name_project; }, }, { title: "投入人力", key: "category", - dataIndex: "category", + dataIndex: "part_people", hideInSearch: true, render: (dom, record) => { - return record.type === 0 - ? "活动风采" - : record.type === 1 - ? "党建资讯" - : "工会资讯"; + return record.part_people }, }, { title: "构建时间", - key: "since", - dataIndex: "createdAt", + key: "build_time", + dataIndex: "build_time", hideInSearch: true, render: (dom, record) => { - return record.publisher === null ? "SuperAdmin" : record.publisher; + return moment(record.build_time).format('YYYY-MM-DD') }, }, { title: "发布时间", - key: "dateRange", - dataIndex: "createdAtRange", + key: "publish_time", + dataIndex: "publish_time", hideInSearch: true, render: (dom, record) => { - return record.publisher === null ? "SuperAdmin" : record.publisher; + return moment(record.publish_time).format('YYYY-MM-DD') }, }, { title: "目前进度", - dataIndex: "regionName", - valueType: "select", + dataIndex: "progress", hideInSearch: true, order: 3, render: (dom, record) => { - return record.status === 0 - ? "草稿" - : record.status === 1 - ? "已发布" - : "已撤回"; + return record.progress }, }, { @@ -110,7 +108,7 @@ export const Default = (props) => { type="primary" style={{ width: "200px" }} onClick={() => { - dispatch(push(`article/update/post`)); + setImportVisible(true) }} > 项目信息导入 @@ -119,6 +117,15 @@ export const Default = (props) => { }, }, ]; + const handleCancel = () => { + setVisible(false) + } + const handOk = () => { + + } + const importHandleCancel = () => { + setImportVisible(false) + } //删除资讯 const delDataList = (ids, type) => { dispatch(Action.delDataList(ids)).then((res) => { @@ -130,8 +137,8 @@ export const Default = (props) => { }; //编辑 const editor = (record) => { - dispatch(push(`article/update/put`)); - localStorage.setItem("modifyData", JSON.stringify(record)); + setVisible(true) + setEditData(record) }; return (
@@ -140,7 +147,7 @@ export const Default = (props) => { actionRef={tableActionRef} columns={columns} options={false} - dataSource={(counts || {}).data || []} + dataSource={dataSore} search={{ optionRender: false, collapsed: false, @@ -173,6 +180,8 @@ export const Default = (props) => { }} /> + +
); }; @@ -187,9 +196,9 @@ export default connect(mapStateToProps)(Default); const data = [ -{ name: 'yongchu', age: '18', 任务1: 'v1', 计划1: 'time1' }, -{ name: 'yongchu', age: '18', 任务1: 'v1', 计划1: 'time1' }, -{ name: 'yongchu', age: '18', 任务1: 'v1', 计划1: 'time1' }, -{name:'大王',age:'18',任务1:'v1',计划1:'time1'}, -{name:'大王',age:'18',任务1:'v1',计划1:'time1'} + { name: 'yongchu', age: '18', 任务1: 'v1', 计划1: 'time1' }, + { name: 'yongchu', age: '18', 任务1: 'v1', 计划1: 'time1' }, + { name: 'yongchu', age: '18', 任务1: 'v1', 计划1: 'time1' }, + { name: '大王', age: '18', 任务1: 'v1', 计划1: 'time1' }, + { name: '大王', age: '18', 任务1: 'v1', 计划1: 'time1' } ] \ No newline at end of file diff --git a/web/client/src/sections/article/index.js b/web/client/src/sections/article/index.js index 9bb11a8..ba3f44d 100644 --- a/web/client/src/sections/article/index.js +++ b/web/client/src/sections/article/index.js @@ -5,7 +5,7 @@ import nativeItem from './nav-item'; export default { key: 'article', - name: '资讯管理', + name: '项目信息', reducers, routes, actions, diff --git a/web/client/src/sections/index.js b/web/client/src/sections/index.js index c5b4244..7752219 100644 --- a/web/client/src/sections/index.js +++ b/web/client/src/sections/index.js @@ -2,6 +2,8 @@ import Auth from './auth'; import AlarmConfure from './homePage'; import Article from './article' import Party from './party' +import Personnel from './personnel' + export { - Auth, AlarmConfure, Article, Party + Auth, AlarmConfure, Article, Party,Personnel }; diff --git a/web/client/src/sections/personnel/actions/article.js b/web/client/src/sections/personnel/actions/article.js new file mode 100644 index 0000000..cdada0d --- /dev/null +++ b/web/client/src/sections/personnel/actions/article.js @@ -0,0 +1,64 @@ +"use strict"; +import { ApiTable } from "$utils"; +import { Request } from "@peace/utils"; +import { basicAction } from "@peace/utils"; + +export function addArticle(articleObj) { + return (dispatch) => + basicAction({ + type: "post", + dispatch: dispatch, + data: articleObj, + actionType: "ADD_ARTICLE", + url: `${ApiTable.addArticle}`, + msg: { error: "新增文章失败" }, + reducer: { name: "articleInsertInfo" }, + }); +} + +export function editArticle(articleObj) { + return (dispatch) => + basicAction({ + type: "put", + dispatch: dispatch, + data: articleObj, + actionType: "EDIT_ARTICLE", + url: `${ApiTable.addArticle}`, + msg: { error: "编辑文章失败" }, + reducer: { name: "articleInsertInfo" }, + }); +} +export function getDataList(query) { + return (dispatch) => + basicAction({ + type: "get", + dispatch: dispatch, + actionType: "GET_DATALIST", + url: ApiTable.getDataList, + query: query, + msg: { error: "获取文章信息失败" }, + reducer: { + name: "articlesfrom", + }, + }); +} +export function delDataList(id) { + return (dispatch) => + basicAction({ + type: "del", + dispatch: dispatch, + actionType: "DEL_DATALIST11", + url: ApiTable.delDataList + `?id=${id}`, + query: { id: id }, + + msg: { error: "删除文章信息失败" }, + }); +} +export const MODIFYARTICAL = { + REQUEST_SUCCESS: "MODIFY_ARTICAL_SUCCESS", +}; +export function setModifyData(data) { + return (dispatch) => { + dispatch({ type: MODIFYARTICAL.REQUEST_SUCCESS, payload: { data } }); + }; +} diff --git a/web/client/src/sections/personnel/actions/index.js b/web/client/src/sections/personnel/actions/index.js new file mode 100644 index 0000000..5995a74 --- /dev/null +++ b/web/client/src/sections/personnel/actions/index.js @@ -0,0 +1,9 @@ +"use strict"; +import { addArticle, editArticle, getDataList, delDataList } from "./article"; + +export default { + addArticle, + editArticle, + getDataList, + delDataList, +}; diff --git a/web/client/src/sections/personnel/components/import_model.js b/web/client/src/sections/personnel/components/import_model.js new file mode 100644 index 0000000..41098a5 --- /dev/null +++ b/web/client/src/sections/personnel/components/import_model.js @@ -0,0 +1,163 @@ +/* + * @description : + * @Date : 2021-04-07 14:39:33 + * @FilePath : \web\client\src\sections\user\components\userManagement\importUser.js + * @useStrict : use strict + */ + +'use strict'; +import React, { useState } from 'react'; +import { connect } from 'react-redux'; +import { Button, Input, Card, Modal, Upload, message } from 'antd'; +import { Request } from '@peace/utils' +import request from 'superagent' +import XLSX from 'xlsx' +// import { userBulkAdd } from '../../actions' + +//TODO 下载模板和上传文件读取 +const ImportUser = props => { + const { user, dispatch, handleCancel, params,editData } = props + const [msg, setMsg] = useState('') + const [loading, setLoading] = useState('') + const [postData, setPostData] = useState([]) + + const confirm = () => { + if (postData.length) { + setLoading(true) + // dispatch(userBulkAdd(postData, params.departmentId ? params.departmentId : null)).then(res => { + // if (res.success) { + + // } + // setLoading(false) + // }) + } else { + message.warn('没有数据可以提交,请上传数据文件') + } + } + + return ( + { + setMsg('') + setLoading(false) + setPostData([]) + handleCancel() + }} + destroyOnClose + > + {/* */} + + + +
下载模板后填写完整后上传
+
+ { + setMsg('') + setPostData([]) + const extNames = file.name.split('.'); + let isDAE = false; + if (extNames.length > 0) { + let fileType = extNames[extNames.length - 1].toLowerCase(); + isDAE = ['xlsx', 'xls'].some((f) => f == fileType); + } + if (!isDAE) { + setMsg(`只能上传 ${['xlsx', 'xls'].join()} 格式的文件!`); + return false; + } + }, + onChange(info) { + + }, + customRequest: async (data) => { + const { file, onSuccess, onError } = data + + const reader = new FileReader(); // 使用 FileReader 读取数据 + reader.onload = function (e) { // 数据读取完成后的回调函数 + const data = new Uint8Array(e.target.result); + const workbook = XLSX.read(data, { type: 'array' }); // workbook 是 xlsx 解析 excel 后返回的对象 + + const firstSheetName = workbook.SheetNames[0]; // 获取第一个 sheet 的名字 + const worksheet = workbook.Sheets[firstSheetName]; // 获取第一个 sheet 的内容 + const res = XLSX.utils.sheet_to_json(worksheet); // 使用 utils 里的方法转换内容为便于使用的数组 + const error = (msg) => { + setMsg(msg) + onError({ message: msg }) + } + if (res.length > 1000) { + error('一次性上传数据行数应小于1000行,请分批上传') + return + } + if (!res.length) { + error('请填写至少一行数据') + return + } + let postData = [] + const pattern = /^1[3|4|5|6|7|8|9]\d{9}$/ + for (let i = 0; i < res.length; i++) { + let d = res[i] + let name = String(d['姓名']).trim(); + let phone = String(d['手机号码']).trim(); + let account = String(d['账号']).trim(); + let peopleCode = d['人员编号'] && String(d['人员编号']).trim(); + if (!name || !phone || !account || !peopleCode) { + error(`第${i + 1} 行有空值,请填写后重新上传`) + return + } + if (!pattern.test(phone)) { + error(`第${i + 1} 行手机号码错误`) + return + } + if (name.length > 128 || account.length > 128) { + error(`第${i + 1} 行数据字符长度大于 128,请更改后重新上传`) + return + } + if (postData.some(p => p.account == account)) { + error(`第${i + 1} 行账号重复,请更改后重新上传`) + return + } + postData.push({ + name, phone, account, peopleCode + }) + } + if (postData.length) { + setPostData(postData) + } + let msg = '文件解析完成,点击确定按钮上传保存!' + setMsg(msg) + onSuccess({ message: msg }) + }; + reader.readAsArrayBuffer(file); // 读取数据 + }, + }}> + + +
+ {msg} +
+
+ ) +} + +function mapStateToProps(state) { + const { auth, customizeList } = state; + return { + user: auth.user, + } +} + + +export default connect(mapStateToProps)(ImportUser); \ No newline at end of file diff --git a/web/client/src/sections/personnel/components/modeal.js b/web/client/src/sections/personnel/components/modeal.js new file mode 100644 index 0000000..53e5c41 --- /dev/null +++ b/web/client/src/sections/personnel/components/modeal.js @@ -0,0 +1,96 @@ +import React,{useState,useEffect} from 'react' +import { Modal, Form, Input, Button,DatePicker,Select } from 'antd' +import dayjs from 'dayjs'; +function modeal(props) { + const [form] = Form.useForm(); + const { visible, handleOk, handleCancel, editData } = props + console.log(editData) + useEffect(() => { + if (editData && visible) { + form.setFieldsValue({ + name_project: editData.name_project, + part_people: editData.part_people, + build_time: dayjs(editData?.build_time), + publish_time: dayjs(editData.publish_time), + progress:editData.progress + }) + } + }, [editData, visible]) + return ( + +
+ + + + + + + + + + + + + + + + +
+ + +
+
+ +
+
+ ) +} + +export default modeal \ No newline at end of file diff --git a/web/client/src/sections/personnel/containers/index.js b/web/client/src/sections/personnel/containers/index.js new file mode 100644 index 0000000..91d6308 --- /dev/null +++ b/web/client/src/sections/personnel/containers/index.js @@ -0,0 +1,186 @@ +import PropTypes from "prop-types"; +import React, { useEffect, useState, useRef } from "react"; +import { connect } from "react-redux"; +import { Button, Popconfirm } from "antd"; +import ProTable from "@ant-design/pro-table"; +import Action from "../actions/index"; +import moment from "moment"; +import { push } from "react-router-redux"; +import { Scroller } from "$components"; +import ProjectModeal from '../components/modeal' +import ImportModeal from '../components/import_model' + +export const Default = (props) => { + const { dispatch } = props; + const [heading, setHeading] = useState(); //标题 + const [state, setState] = useState(); //状态 + const [day, setDay] = useState(); //发布时间 + const [counts, setCounts] = useState(); //数据 + const [visible, setVisible] = useState(false); //弹窗 + const [editData, setEditData] = useState(); //数据 + const [importVisible, setImportVisible] = useState(false); //弹窗 + + const tableActionRef = useRef(); + const dataSore = [{ name_project: '企服v1.0.1', part_people: '投入研发3、测试1', build_time: new Date( ), publish_time: new Date( ), progress: '研发中' }] + const columns = [ + { + title: "人员姓名", + dataIndex: "name_project", + key: "name_project", + hideInSearch: true, + render: (dom, record) => { + return record.name_project; + }, + }, + { + title: "岗位", + key: "category", + dataIndex: "part_people", + hideInSearch: true, + render: (dom, record) => { + return record.part_people + }, + }, + { + title: "本周工作计划", + key: "build_time", + dataIndex: "build_time", + hideInSearch: true, + render: (dom, record) => { + return moment(record.build_time).format('YYYY-MM-DD') + }, + }, + { + title: "操作", + key: "since", + dataIndex: "createdAt", + valueType: "dateTime", + hideInSearch: true, + render: (dom, record) => { + return ( +
+ { + editor(record); + }} + > + 编辑 + + { + delDataList(record.id); + }} + > + + +
+ ) + + }, + }, + { + key: "direction", + hideInTable: true, + dataIndex: "direction", + order: 6, + renderFormItem: (item, { type, defaultRender, ...rest }, form) => { + return ( + + ); + }, + }, + ]; + const handleCancel = () => { + setVisible(false) + } + const handOk = () => { + + } + const importHandleCancel = () => { + setImportVisible(false) + } + //删除资讯 + const delDataList = (ids, type) => { + dispatch(Action.delDataList(ids)).then((res) => { + if (res.success) { + // 刷新 + tableActionRef.current.reload(); + } + }); + }; + //编辑 + const editor = (record) => { + setVisible(true) + setEditData(record) + }; + return ( +
+ + { + let query = { + type: -1, + searchValue: heading, + status: state, + page: params.current, + limit: params.pageSize, + publishTime: + day && day.length && day[0].trim() != "" + ? JSON.stringify([ + moment(day[0]).startOf("day"), + moment(day[1]).endOf("day"), + ]) + : null, + }; + const res = await dispatch(Action.getDataList(query)); + setCounts(res.payload.data); + return { + ...res, + total: res.payload.data ? res.payload.data.total : 0, + }; + }} + rowKey="id" + pagination={{ + showSizeChanger: true, + }} + /> + + + +
+ ); +}; + +Default.propTypes = { + second: PropTypes.third, +}; + +const mapStateToProps = (state) => ({}); + +export default connect(mapStateToProps)(Default); + + +const data = [ + { name: 'yongchu', age: '18', 任务1: 'v1', 计划1: 'time1' }, + { name: 'yongchu', age: '18', 任务1: 'v1', 计划1: 'time1' }, + { name: 'yongchu', age: '18', 任务1: 'v1', 计划1: 'time1' }, + { name: '大王', age: '18', 任务1: 'v1', 计划1: 'time1' }, + { name: '大王', age: '18', 任务1: 'v1', 计划1: 'time1' } +] \ No newline at end of file diff --git a/web/client/src/sections/personnel/index.js b/web/client/src/sections/personnel/index.js new file mode 100644 index 0000000..583d19f --- /dev/null +++ b/web/client/src/sections/personnel/index.js @@ -0,0 +1,13 @@ +import routes from './routes'; +import reducers from './reducers'; +import actions from './actions'; +import nativeItem from './nav-item'; + +export default { + key: 'personnel', + name: '人员任务', + reducers, + routes, + actions, + getNavItem: nativeItem +}; diff --git a/web/client/src/sections/personnel/nav-item.js b/web/client/src/sections/personnel/nav-item.js new file mode 100644 index 0000000..cecf852 --- /dev/null +++ b/web/client/src/sections/personnel/nav-item.js @@ -0,0 +1,14 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import { Menu } from 'antd'; +import { BarChartOutlined } from '@ant-design/icons'; + +export function getNavItem() { + return ( + }> + 项目信息 + + ); +} + +export default getNavItem; diff --git a/web/client/src/sections/personnel/reducers/index.js b/web/client/src/sections/personnel/reducers/index.js new file mode 100644 index 0000000..10ebcbf --- /dev/null +++ b/web/client/src/sections/personnel/reducers/index.js @@ -0,0 +1,19 @@ +'use strict'; + +const initModifyData = { + data: null +} + +function modifyData(state = initModifyData, actions) { + const { type, payload } = actions + switch (type) { + case 'MODIFY_ARTICAL_SUCCESS': + return Object.assign({}, state, { data: payload.data }); + default: + return state; + } +} + +export default { + modifyData, +} \ No newline at end of file diff --git a/web/client/src/sections/personnel/routes.js b/web/client/src/sections/personnel/routes.js new file mode 100644 index 0000000..5b94ffe --- /dev/null +++ b/web/client/src/sections/personnel/routes.js @@ -0,0 +1,12 @@ +import Container from './containers'; +export default [ + { + type: 'inner', + route: { + path: '/personnel', + key: 'personnel', + component: Container, + } + }, + +]; diff --git a/web/client/src/themes/light.json b/web/client/src/themes/light.json index a46b2bd..730250a 100644 --- a/web/client/src/themes/light.json +++ b/web/client/src/themes/light.json @@ -1 +1 @@ -{"@line-height-base":"1.66667","@mode":"compact","@font-size-base":"12px","@font-size-lg":"@font-size-base + 2px","@default-padding-lg":"24px","@default-padding-md":"16px","@default-padding-sm":"12px","@default-padding-xs":"8px","@default-padding-xss":"4px","@padding-lg":"16px","@padding-md":"8px","@padding-sm":"8px","@padding-xs":"4px","@padding-xss":"0px","@control-padding-horizontal":"@padding-sm","@control-padding-horizontal-sm":"@default-padding-xs","@margin-lg":"16px","@margin-md":"8px","@margin-sm":"8px","@margin-xs":"4px","@margin-xss":"0px","@height-base":"28px","@height-lg":"32px","@height-sm":"22px","@btn-padding-horizontal-base":"@default-padding-sm - 1px","@btn-padding-horizontal-lg":"@btn-padding-horizontal-base","@btn-padding-horizontal-sm":"@default-padding-xs - 1px","@btn-square-only-icon-size-lg":"16px","@btn-square-only-icon-size":"14px","@btn-square-only-icon-size-sm":"12px","@breadcrumb-font-size":"@font-size-base","@breadcrumb-icon-font-size":"@font-size-base","@dropdown-line-height":"18px","@menu-item-padding-horizontal":"12px","@menu-horizontal-line-height":"38px","@menu-inline-toplevel-item-height":"32px","@menu-item-height":"32px","@menu-item-vertical-margin":"0px","@menu-item-boundary-margin":"0px","@menu-icon-margin-right":"8px","@checkbox-size":"14px","@checkbox-group-item-margin-right":"6px","@picker-panel-cell-height":"22px","@picker-panel-cell-width":"32px","@picker-text-height":"32px","@picker-time-panel-cell-height":"24px","@picker-panel-without-time-cell-height":"48px","@form-item-margin-bottom":"16px","@form-vertical-label-padding":"0 0 4px","@rate-star-size":"16px","@radio-size":"14px","@radio-wrapper-margin-right":"6px","@switch-height":"20px","@switch-sm-height":"14px","@switch-min-width":"40px","@switch-sm-min-width":"24px","@switch-inner-margin-min":"4px","@switch-inner-margin-max":"22px","@slider-handle-size":"12px","@slider-handle-margin-top":"-4px","@input-padding-vertical-base":"round(\n max(\n (round(((@input-height-base - @font-size-base * @line-height-base) / 2) * 10) / 10) -\n @border-width-base,\n 2px\n )\n)","@input-padding-horizontal-lg":"11px","@page-header-padding":"16px","@page-header-padding-vertical":"8px","@page-header-heading-title":"16px","@page-header-heading-sub-title":"12px","@page-header-tabs-tab-font-size":"14px","@pagination-mini-options-size-changer-top":"1px","@pagination-item-size-sm":"22px","@cascader-dropdown-line-height":"@dropdown-line-height","@select-dropdown-height":"@height-base","@select-single-item-height-lg":"32px","@select-multiple-item-height":"@input-height-base - max(@input-padding-vertical-base, 4) * 2","@select-multiple-item-height-lg":"24px","@select-multiple-item-spacing-half":"3px","@tree-title-height":"20px","@transfer-item-padding-vertical":"3px","@transfer-list-search-icon-top":"8px","@transfer-header-height":"36px","@comment-actions-margin-bottom":"0px","@comment-actions-margin-top":"@margin-xs","@comment-content-detail-p-margin-bottom":"0px","@steps-icon-size":"24px","@steps-icon-custom-size":"20px","@steps-icon-custom-font-size":"20px","@steps-icon-custom-top":"2px","@steps-icon-margin":"2px 8px 2px 0","@steps-icon-font-size":"@font-size-base","@steps-dot-top":"4px","@steps-icon-top":"0px","@steps-small-icon-size":"20px","@steps-vertical-icon-width":"12px","@steps-vertical-tail-width":"12px","@steps-vertical-tail-width-sm":"10px","@collapse-header-padding-extra":"32px","@collapse-content-padding":"@padding-md @padding-lg","@list-item-meta-description-font-size":"@font-size-sm","@list-item-padding-sm":"4px 12px","@list-item-padding-lg":"12px 16px","@drawer-header-padding":"11px @padding-lg","@drawer-footer-padding-vertical":"@padding-sm","@drawer-footer-padding-horizontal":"@padding-sm","@drawer-header-close-size":"44px","@modal-header-padding-vertical":"11px","@modal-header-padding":"@modal-header-padding-vertical @modal-header-padding-horizontal","@modal-footer-padding-vertical":"@padding-sm","@modal-header-close-size":"@modal-header-title-line-height + 2 * @modal-header-padding-vertical","@modal-confirm-body-padding":"24px 24px 16px","@message-notice-content-padding":"8px 16px","@popover-min-height":"28px","@popover-padding-horizontal":"@default-padding-sm","@card-head-height":"36px","@card-head-font-size":"@card-head-font-size-sm","@card-head-padding":"8.5px","@card-padding-base":"12px","@card-padding-base-sm":"@card-padding-base","@card-head-height-sm":"30px","@card-head-padding-sm":"6px","@card-actions-li-margin":"4px 0","@card-head-tabs-margin-bottom":"-9px","@table-padding-vertical":"12px","@table-padding-horizontal":"8px","@table-padding-vertical-md":"8px","@table-padding-horizontal-md":"8px","@table-padding-vertical-sm":"4px","@table-padding-horizontal-sm":"4px","@table-selection-column-width":"32px","@statistic-content-font-size":"20px","@alert-with-description-no-icon-padding-vertical":"7px","@alert-with-description-padding-vertical":"11px","@alert-icon-top":"7px + @font-size-base * (@line-height-base / 2) - (@font-size-base / 2)","@alert-with-description-icon-size":"20px","@skeleton-paragraph-margin-top":"20px","@skeleton-paragraph-li-margin-top":"12px","@skeleton-paragraph-li-height":"14px","@skeleton-title-height":"14px","@skeleton-title-paragraph-margin-top":"20px","@descriptions-title-margin-bottom":"8px","@descriptions-default-padding":"12px @padding-lg","@descriptions-item-padding-bottom":"@padding-xs","@avatar-size-base":"28px","@avatar-size-lg":"32px","@avatar-size-sm":"22px","@avatar-font-size-base":"16px","@avatar-font-size-lg":"20px","@avatar-font-size-sm":"12px","@badge-height":"18px","@tag-line-height":"18px","@notification-padding-vertical":"12px","@notification-padding-horizontal":"16px","@result-title-font-size":"20px","@result-icon-font-size":"64px","@result-extra-margin":"24px 0 0 0","@anchor-link-top":"4px","@anchor-link-left":"16px","@anchor-link-padding":"@anchor-link-top 0 @anchor-link-top @anchor-link-left","@tabs-card-horizontal-padding":"4px @padding-md","@progress-circle-text-font-size":"0.833333em","@image-size-base":"48px","@image-font-size-base":"24px","@primary-color":"#0057C9","@layout-header-background":"#fff","@layout-breadcrum-background":"#fff","@layout-content-background":"#fff","@layout-body-background":"#F6F6F7","@layout-header-shadow":"0px 3px 6px -4px rgba(0, 0, 0, 0.12)","@layout-slder-shadow":"3px 0px 6px -4px rgba(0, 0, 0, 0.12)","@mark-background-color":"#f5fdca","@component-background":"#FFF"} \ No newline at end of file +{"@line-height-base":"1.66667","@mode":"compact","@font-size-base":"12px","@font-size-lg":"@font-size-base + 2px","@default-padding-lg":"24px","@default-padding-md":"16px","@default-padding-sm":"12px","@default-padding-xs":"8px","@default-padding-xss":"4px","@padding-lg":"16px","@padding-md":"8px","@padding-sm":"8px","@padding-xs":"4px","@padding-xss":"0px","@control-padding-horizontal":"@padding-sm","@control-padding-horizontal-sm":"@default-padding-xs","@margin-lg":"16px","@margin-md":"8px","@margin-sm":"8px","@margin-xs":"4px","@margin-xss":"0px","@height-base":"28px","@height-lg":"32px","@height-sm":"22px","@btn-padding-horizontal-base":"@default-padding-sm - 1px","@btn-padding-horizontal-lg":"@btn-padding-horizontal-base","@btn-padding-horizontal-sm":"@default-padding-xs - 1px","@btn-square-only-icon-size-lg":"16px","@btn-square-only-icon-size":"14px","@btn-square-only-icon-size-sm":"12px","@breadcrumb-font-size":"@font-size-base","@breadcrumb-icon-font-size":"@font-size-base","@dropdown-line-height":"18px","@menu-item-padding":"0 12px","@menu-horizontal-line-height":"38px","@menu-inline-toplevel-item-height":"32px","@menu-item-height":"32px","@menu-item-vertical-margin":"0px","@menu-item-boundary-margin":"0px","@menu-icon-margin-right":"8px","@checkbox-size":"14px","@checkbox-group-item-margin-right":"6px","@picker-panel-cell-height":"22px","@picker-panel-cell-width":"32px","@picker-text-height":"32px","@picker-time-panel-cell-height":"24px","@picker-panel-without-time-cell-height":"48px","@form-item-margin-bottom":"16px","@form-vertical-label-padding":"0 0 4px","@rate-star-size":"16px","@radio-size":"14px","@radio-wrapper-margin-right":"6px","@switch-height":"20px","@switch-sm-height":"14px","@switch-min-width":"40px","@switch-sm-min-width":"24px","@switch-inner-margin-min":"4px","@switch-inner-margin-max":"22px","@slider-handle-size":"12px","@slider-handle-margin-top":"-4px","@input-padding-vertical-base":"round(\n max(\n (round(((@input-height-base - @font-size-base * @line-height-base) / 2) * 10) / 10) -\n @border-width-base,\n 2px\n )\n)","@input-padding-horizontal-lg":"11px","@page-header-padding":"16px","@page-header-padding-vertical":"8px","@page-header-heading-title":"16px","@page-header-heading-sub-title":"12px","@page-header-tabs-tab-font-size":"14px","@pagination-mini-options-size-changer-top":"1px","@pagination-item-size-sm":"22px","@cascader-dropdown-line-height":"@dropdown-line-height","@select-dropdown-height":"@height-base","@select-single-item-height-lg":"32px","@select-multiple-item-height":"@input-height-base - max(@input-padding-vertical-base, 4) * 2","@select-multiple-item-height-lg":"24px","@select-multiple-item-spacing-half":"3px","@tree-title-height":"20px","@transfer-item-padding-vertical":"3px","@transfer-list-search-icon-top":"8px","@transfer-header-height":"36px","@comment-actions-margin-bottom":"0px","@comment-actions-margin-top":"@margin-xs","@comment-content-detail-p-margin-bottom":"0px","@steps-icon-size":"24px","@steps-icon-custom-size":"20px","@steps-icon-custom-font-size":"20px","@steps-icon-custom-top":"2px","@steps-icon-margin":"2px 8px 2px 0","@steps-icon-font-size":"@font-size-base","@steps-dot-top":"4px","@steps-icon-top":"0px","@steps-small-icon-size":"20px","@steps-vertical-icon-width":"12px","@steps-vertical-tail-width":"12px","@steps-vertical-tail-width-sm":"10px","@collapse-header-padding-extra":"32px","@collapse-content-padding":"@padding-md @padding-lg","@list-item-meta-description-font-size":"@font-size-sm","@list-item-padding-sm":"4px 12px","@list-item-padding-lg":"12px 16px","@drawer-header-padding":"11px @padding-lg","@drawer-footer-padding-vertical":"@padding-sm","@drawer-footer-padding-horizontal":"@padding-sm","@drawer-header-close-size":"44px","@modal-header-padding":"11px @modal-header-padding-horizontal","@modal-footer-padding-vertical":"@padding-sm","@modal-header-close-size":"44px","@modal-confirm-body-padding":"24px 24px 16px","@message-notice-content-padding":"8px 16px","@popover-min-height":"28px","@popover-padding-horizontal":"@default-padding-sm","@card-padding-base":"12px","@card-head-height":"36px","@card-head-font-size":"@card-head-font-size-sm","@card-head-padding":"8.5px","@card-padding-base-sm":"@card-padding-base","@card-head-height-sm":"30px","@card-head-padding-sm":"6px","@card-actions-li-margin":"4px 0","@card-head-tabs-margin-bottom":"-9px","@table-padding-vertical":"12px","@table-padding-horizontal":"8px","@table-padding-vertical-md":"8px","@table-padding-horizontal-md":"8px","@table-padding-vertical-sm":"4px","@table-padding-horizontal-sm":"4px","@table-selection-column-width":"32px","@statistic-content-font-size":"20px","@alert-with-description-no-icon-padding-vertical":"7px","@alert-with-description-padding-vertical":"11px","@alert-icon-top":"7px + @font-size-base * (@line-height-base / 2) - (@font-size-base / 2)","@alert-with-description-icon-size":"20px","@skeleton-paragraph-margin-top":"20px","@skeleton-paragraph-li-margin-top":"12px","@skeleton-paragraph-li-height":"14px","@skeleton-title-height":"14px","@skeleton-title-paragraph-margin-top":"20px","@descriptions-title-margin-bottom":"8px","@descriptions-default-padding":"12px @padding-lg","@descriptions-item-padding-bottom":"@padding-xs","@avatar-size-base":"28px","@avatar-size-lg":"32px","@avatar-size-sm":"22px","@avatar-font-size-base":"16px","@avatar-font-size-lg":"20px","@avatar-font-size-sm":"12px","@badge-height":"18px","@tag-line-height":"18px","@notification-padding-vertical":"12px","@notification-padding-horizontal":"16px","@result-title-font-size":"20px","@result-icon-font-size":"64px","@result-extra-margin":"24px 0 0 0","@anchor-link-top":"4px","@anchor-link-left":"16px","@anchor-link-padding":"@anchor-link-top 0 @anchor-link-top @anchor-link-left","@tabs-card-horizontal-padding":"4px @padding-md","@progress-circle-text-font-size":"0.833333em","@image-size-base":"48px","@image-font-size-base":"24px","@primary-color":"#0057C9","@layout-header-background":"#fff","@layout-breadcrum-background":"#fff","@layout-content-background":"#fff","@layout-body-background":"#F6F6F7","@layout-header-shadow":"0px 3px 6px -4px rgba(0, 0, 0, 0.12)","@layout-slder-shadow":"3px 0px 6px -4px rgba(0, 0, 0, 0.12)","@mark-background-color":"#f5fdca","@component-background":"#FFF"} \ No newline at end of file