Browse Source

项目信息模块基础

master
xingyongchun 2 years ago
parent
commit
eed1a8dcee
  1. 4
      web/client/src/app.js
  2. 0
      web/client/src/sections/article/containers/default.js
  3. 583
      web/client/src/sections/article/containers/edit-article.js
  4. 154
      web/client/src/sections/article/containers/index.js
  5. 2
      web/client/src/sections/article/nav-item.js
  6. 10
      web/client/src/sections/article/routes.js
  7. 3
      web/client/src/sections/index.js
  8. 6
      web/client/src/sections/organization/actions/index.js
  9. 61
      web/client/src/sections/organization/actions/party.js
  10. 892
      web/client/src/sections/organization/components/OutgoingVisibleModel.js
  11. 82
      web/client/src/sections/organization/components/edit-party.js
  12. 42
      web/client/src/sections/organization/components/index.less
  13. 799
      web/client/src/sections/organization/components/memberVisibleModel.js
  14. 823
      web/client/src/sections/organization/components/newlyVisibleModel.js
  15. 6
      web/client/src/sections/organization/containers/index.js
  16. 339
      web/client/src/sections/organization/containers/organization.js
  17. 225
      web/client/src/sections/organization/containers/partyMember.js
  18. 13
      web/client/src/sections/organization/index.js
  19. 22
      web/client/src/sections/organization/nav-item.js
  20. 19
      web/client/src/sections/organization/reducers/index.js
  21. 27
      web/client/src/sections/organization/routes.js

4
web/client/src/app.js

@ -1,6 +1,6 @@
import React, { useEffect } from 'react'; import React, { useEffect } from 'react';
import { import {
Auth, AlarmConfure, Article, Party,Organization Auth, AlarmConfure, Article, Party
} from './sections'; } from './sections';
import Layout from './layout'; import Layout from './layout';
@ -19,7 +19,7 @@ function App(props) {
return ( return (
<Layout <Layout
title={projectName} title={projectName}
sections={[Auth, AlarmConfure, Article, Party,Organization]} sections={[Auth, AlarmConfure, Article, Party]}
/> />
); );
} }

0
web/client/src/sections/article/containers/default.js

583
web/client/src/sections/article/containers/edit-article.js

@ -1,583 +0,0 @@
import React, { useReducer, useEffect } from "react";
import PropTypes from "prop-types";
import { push } from "react-router-redux";
import { reducerCreater } from "../../../utils";
import BraftEditor from "braft-editor";
import { connect } from "react-redux";
import moment from "moment";
import {
Input,
Button,
Form,
Icon,
Tabs,
Upload,
message,
Radio,
Spin,
Space,
Modal,
Select,
} from "antd";
import {
LoadingOutlined,
UploadOutlined,
PictureOutlined,
} from "@ant-design/icons";
import { addArticle, editArticle } from "../actions/article";
const { TabPane } = Tabs;
const { TextArea } = Input;
const { Option } = Select;
let viewing = false;
const sizeBase = 5.72;
const isFirstLoad = true;
let braftTimer = null;
const initialState = {
counter: 0,
disabled: false,
articlePictureMessage: [],
uploading: false,
tabKey: 1,
loading: false,
imageUrl: "",
submitType: "",
imgSavePath: "",
articalUploading: false,
isVisible: false,
content: "",
title: "",
inputTxtLength: 0,
overview: {
createTime: "",
company: "",
category: "",
authCategory: "",
},
fileList: [],
};
const txtLength = {
1: 5000,
2: 1500,
};
const ArticleModify = (props) => {
const { width, height } = props;
const [form] = Form.useForm();
const [state, dispatch] = useReducer(reducer, initialState);
const {
uploading,
articlePictureMessage,
disabled,
loading,
imageUrl,
tabKey,
inputTxtLength,
fileList,
} = state;
function reducer(state, action) {
return reducerCreater(initialState, state, action);
}
useEffect(() => {
const {
match: { params },
} = props;
const { state, type } = params;
if (type)
if (type == "message") dispatch({ type: "tabKey", payload: "2" });
else dispatch({ type: "tabKey", payload: "1" });
}, [true]);
useEffect(() => {
const {
match: { params },
} = props;
const strData = localStorage.getItem("modifyData");
if (strData) {
const modifyData = JSON.parse(strData);
const { state, type } = params;
if (state == "post") {
form.setFieldsValue({
authCategory: "公开",
});
}
if (state == "put")
if (modifyData) {
console.log("modifyData: ");
console.log(modifyData);
if (type == "message") {
form.setFieldsValue({
content: BraftEditor.createEditorState(modifyData.content),
authCategory: modifyData.authCategory,
});
} else {
form.setFieldsValue({
content: BraftEditor.createEditorState(modifyData.content),
type: `${modifyData.type}`,
title: modifyData.title,
image: modifyData.image,
});
const path = modifyData.image;
if (typeof path == 'string' && path.trim() != '') {
const filename = path.substr(path.lastIndexOf("/") + 1);
dispatch({
type: 'fileList', payload: [{
uid: '-1',
name: filename,
status: 'done',
url: modifyData.image,
},]
})
dispatch({ type: "imageUrl", payload: modifyData.image });
dispatch({ type: "imgSavePath", payload: modifyData.image });
}
}
}
}
return () => {
localStorage.removeItem("modifyData");
};
}, [localStorage.getItem("modifyData")]);
// 定义输入转换函数
function unitImportFn(unit, type, source) {
// type为单位类型,例如font-size等
// source为输入来源,可能值为create或paste
// 此函数的返回结果,需要过滤掉单位,只返回数值
if (unit.indexOf("em")) {
return parseFloat(unit, 10) * sizeBase;
} else {
return parseFloat(unit, 10);
}
}
// 定义输出转换函数
function unitExportFn(unit, type, target) {
if (type === "line-height") {
// 输出行高时不添加单位
return unit;
}
// target的值可能是html或者editor,对应输出到html和在编辑器中显示这两个场景
if (target === "html" && !viewing) {
// 只在将内容输出为html时才进行转换
return unit / sizeBase + "rem";
} else {
// 在编辑器中显示时,按px单位展示
return unit + "px";
}
}
const myValidateFn = (file) => {
return file.size < 1024 * 1024;
};
let media = {
accepts: {
image: "image/png,image/jpeg,image/gif,image/webp,image/apng,image/svg",
video: false,
audio: false,
},
validateFn: myValidateFn,
};
function getBase64(img, callback) {
const reader = new FileReader();
reader.addEventListener("load", () => callback(reader.result));
reader.readAsDataURL(img);
}
function beforeUpload(file) {
// const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
// if (!isJpgOrPng) {
// message.error('请确认文件格式为 JPG/PNG');
// }
const isLt10M = file.size / 1024 / 1024 < 10;
if (!isLt10M) {
message.error("文件大小必须小于 10MB!");
}
// return isJpgOrPng && isLt2M;
return isLt10M || Upload.LIST_IGNORE;
}
function handleChange(info) {
let fileList = [];
if (info.fileList.length && info.fileList.length > 1) {
fileList = info.fileList.slice(-1);
} else fileList = info.fileList;
dispatch({ type: "fileList", payload: fileList });
if (info.file.status === "uploading") {
dispatch({ type: "uploading", payload: true });
return;
}
if (info.file.status === "done") {
const savePath = info.file.response.uploaded;
dispatch({
type: "imageUrl",
payload: savePath,
});
dispatch({ type: "uploading", payload: false });
}
}
const uploadButton = (
<div>
{/* {uploading ? <LoadingOutlined /> : <PlusOutlined />} */}
<Button icon={uploading ? <LoadingOutlined /> : <UploadOutlined />}>文件上传</Button>
</div>
);
const onFinish = (values) => {
const {
match: { params },
modifyData,
} = props;
dispatch({ type: "articalUploading", payload: true });
console.log(values.content.toHTML());
console.log("Received values of form: ", values);
let status = 0; // 草稿
if (state.submitType == "submit") status = 1; // 发布
// if (params.state == 'put' && modifyData.status == 3) {
// status = 7
// }
// const desc = ((document.getElementsByClassName("public-DraftEditor-content") || [])[0] || {}).innerText || ''
let rslt = {
type: values.type,
createTime: moment(),
creator: props.user.userId,
status,
title: values.title ? values.title : "",
content: values.content.toHTML(),
image: imageUrl,
read: 0,
};
console.log(rslt);
if (params.state == "post") {
props.dispatch(addArticle(rslt)).then((res) => {
const { type } = res;
if (type == "ADD_ARTICLE_SUCCESS") {
if (state.submitType == "save") {
message.success("保存草稿箱成功");
} else message.success("提交成功");
dispatch({ type: "articalUploading", payload: false });
dispatch({ type: "imageUrl", payload: "" });
dispatch({ type: 'fileList', payload: [] })
props.dispatch(push(`/article`))
form.resetFields();
// setTimeout(() => {
// props.dispatch(push(`/article/modify`))
// }, 500);
} else if (type == "ADD_ARTICLE_ERROR") {
if (state.submitType == "save") message.success("保存草稿箱失败");
else message.error("提交失败");
dispatch({ type: "articalUploading", payload: false });
}
});
} else {
const strData = localStorage.getItem("modifyData");
const modifyData = JSON.parse(strData);
rslt.id = modifyData.id;
props.dispatch(editArticle(rslt)).then(res => {
const { type } = res;
if (type == "EDIT_ARTICLE_SUCCESS") {
if (state.submitType == "save") {
message.success("保存草稿箱成功");
} else message.success("发布成功");
dispatch({ type: "articalUploading", payload: false });
dispatch({ type: "imageUrl", payload: "" });
dispatch({ type: 'fileList', payload: [] })
props.dispatch(push(`/article`))
form.resetFields();
} else if (type == "EDIT_ARTICLE_ERROR") {
if (state.submitType == "save") message.success("保存草稿箱失败");
else message.error("发布失败");
dispatch({ type: "articalUploading", payload: false });
}
});
}
};
const onFinishFailed = () => {
console.log("test");
};
const onBraftChanged = (editorState) => {
if (braftTimer) clearTimeout(braftTimer);
braftTimer = setTimeout(() => {
let inputTxtLength = 0;
const txtAreaContainer = document.getElementsByClassName(
"public-DraftEditor-content"
)[0];
if (txtAreaContainer) {
inputTxtLength = txtAreaContainer.innerText.split("\n").join("").length;
dispatch({ type: "inputTxtLength", payload: inputTxtLength });
}
}, 1000 * 0.5);
};
function renderArticalContent() {
return (
<div>
<Form
name="basic"
labelCol={{ span: 2 }}
wrapperCol={{ span: 8 }}
labelAlign="left"
form={form}
onFinish={onFinish}
onFinishFailed={onFinishFailed}
autoComplete="off"
>
<Form.Item
label="资讯类型"
name="type"
initialValue="0"
rules={[{ required: true, message: "请选择资讯类型" }]}
>
<Select defaultValue="0" rows={1}>
<Option value="0">活动风采</Option>
<Option value="1">党建资讯</Option>
<Option value="2">工会资讯</Option>
</Select>
</Form.Item>
<Form.Item
label="文章标题"
name="title"
rules={[
{ required: true, message: "请输入文章标题" },
// { max: 72, message: "最多72个字符" },
]}
>
<TextArea disabled={disabled} rows={1}></TextArea>
</Form.Item>
<Form.Item
name="content"
rules={[
{ required: true, message: "请输入文章内容" },
// {
// validator: () => {
// if (inputTxtLength > txtLength[tabKey])
// return Promise.reject(`最多输入${txtLength[tabKey]}个字符`);
// // else if (inputTxtLength == 0)
// // return Promise.reject(`请输入文章内容`)
// else return Promise.resolve();
// },
// },
]}
wrapperCol={{ span: 24 }}
>
<BraftEditor
readOnly={disabled}
placeholder="请输入正文内容"
controls={controls}
fontFamilies={fontFamilies}
// stripPastedStyles={true}
lineHeights={[1, 1.25, 1.5, 1.75, 2, 2.5, 2.8, 3, 4]}
media={media}
onChange={onBraftChanged}
converts={{
unitImportFn: unitImportFn,
unitExportFn: unitExportFn,
}}
/>
</Form.Item>
{/* <span style={{ position: "relative", float: "right" }}>
{state.inputTxtLength}/{txtLength[tabKey]}
</span> */}
<br />
<Form.Item
label="添加附件"
name="image"
rules={[{ required: false, message: "请添加文章附件" }]}
>
<Upload
name="avatar"
// listType="picture-card"
className="avatar-uploader"
showUploadList={true}
action="/_upload/attachments/project"
beforeUpload={beforeUpload}
onChange={handleChange}
onRemove={(file) => {
dispatch({ type: "imageUrl", payload: null });
dispatch({ type: "imgSavePath", payload: null });
return true;
}}
fileList={fileList}
>
{fileList.length == 0 ? uploadButton : ''}
</Upload>
</Form.Item>
<Form.Item noStyle={true}>
<div
style={{
padding: "12px 0",
width: "100%",
textAlign: "right",
}}
>
{
<span>
{/* {tabKey == 1 ? <Button
disabled={uploading}
style={{ marginRight: 16, width: 88 }}
onClick={(r) => {
onViewClick()
}
}
>预览</Button> : ''} */}
<Button
disabled={uploading}
style={{ marginRight: 16, width: 88 }}
onClick={() => {
props.dispatch(push(`/article`));
}}
>
返回
</Button>
<Button
htmlType="submit"
disabled={uploading}
style={{ marginRight: 16, width: 88 }}
onClick={() =>
dispatch({ type: "submitType", payload: "submit" })
}
>
发布
</Button>
<Button
htmlType="submit"
disabled={uploading}
style={{ marginRight: 16, width: 88 }}
onClick={() =>
dispatch({ type: "submitType", payload: "save" })
}
>
保存草稿
</Button>
</span>
}
</div>
</Form.Item>
</Form>
</div>
);
}
const onViewClick = () => {
const { getFieldsValue } = form;
let values = getFieldsValue();
let title = values.title ? values.title : "";
let content = values.content ? values.content.toHTML() : "";
dispatch({ type: "isVisible", payload: true });
dispatch({ type: "content", payload: content });
dispatch({ type: "overview", payload: values });
setTimeout(() => {
if (window.document.getElementById("submitmodalContent")) {
window.document.getElementById("submitmodalContent").innerHTML =
content;
if (content.indexOf("<img") > -1) {
var img_obj = document.getElementsByTagName("img");
img_obj[img_obj.length - 1].style.width = "100%";
}
}
}, 300);
};
return (
<div>
{/* <div style={styles.rollBack} onClick={() => { props.dispatch(push(`/article/modify`)) }}>
<a><RollbackOutlined />返回</a>
</div> */}
<Spin size="large" spinning={state.articalUploading}>
{renderArticalContent()}
</Spin>
</div>
);
};
const styles = {
rollBack: { position: "absolute", right: 30, top: 18, fontSize: 18 },
};
ArticleModify.propTypes = {};
function mapStateToProps(state) {
const { auth, modifyData } = state;
return {
user: auth.user,
modifyData: modifyData.data,
};
}
export default connect(mapStateToProps)(ArticleModify);
const controls = [
"undo",
"redo",
"font-size",
"font-family",
"bold",
"italic",
"underline",
"text-color",
"text-indent",
{
key: "media",
text: <PictureOutlined theme="outlined" />,
title: "插入图片",
},
"letter-spacing",
"line-height",
"list-ol",
"list-ul",
"remove-styles",
"text-align",
"clear",
];
const fontFamilies = [
{
name: "Araial",
family: "Arial, Helvetica, sans-serif",
},
{
name: "Georgia",
family: "Georgia, serif",
},
{
name: "Impact",
family: "Impact, serif",
},
{
name: "Monospace",
family: '"Courier New", Courier, monospace',
},
{
name: "仿宋",
family: "仿宋",
},
{
name: "宋体",
family: 'tahoma, arial, "Hiragino Sans GB", 宋体, sans-serif',
},
{
name: "黑体",
family: "黑体",
},
{
name: "楷体",
family: "楷体",
},
{
name: "等线",
family: "等线",
},
{
name: "微软雅黑",
family: "微软雅黑",
},
];

154
web/client/src/sections/article/containers/index.js

@ -17,40 +17,31 @@ export const Default = (props) => {
const tableActionRef = useRef(); const tableActionRef = useRef();
const columns = [ const columns = [
{ {
title: "标题", title: "项目计划",
dataIndex: "name", dataIndex: "name",
key: "name", key: "name",
order: 2, hideInSearch: true,
fieldProps: {
onChange: (value, cs) => {
setHeading(value.currentTarget.value);
},
placeholder: "请输入标题进行搜索",
getPopupContainer: (triggerNode) => triggerNode.parentNode,
},
render: (dom, record) => { render: (dom, record) => {
return record.title; return record.title;
}, },
}, },
{ {
title: "类别", title: "投入人力",
key: "category", key: "category",
dataIndex: "category", dataIndex: "category",
valueType: "category",
hideInSearch: true, hideInSearch: true,
render: (dom, record) => { render: (dom, record) => {
return record.type === 0 return record.type === 0
? "活动风采" ? "活动风采"
: record.type === 1 : record.type === 1
? "党建资讯" ? "党建资讯"
: "工会资讯"; : "工会资讯";
}, },
}, },
{ {
title: "发布人", title: "构建时间",
key: "since", key: "since",
dataIndex: "createdAt", dataIndex: "createdAt",
valueType: "dateTime",
hideInSearch: true, hideInSearch: true,
render: (dom, record) => { render: (dom, record) => {
return record.publisher === null ? "SuperAdmin" : record.publisher; return record.publisher === null ? "SuperAdmin" : record.publisher;
@ -60,74 +51,23 @@ export const Default = (props) => {
title: "发布时间", title: "发布时间",
key: "dateRange", key: "dateRange",
dataIndex: "createdAtRange", dataIndex: "createdAtRange",
valueType: "dateRange", hideInSearch: true,
order: 4,
sorter: (a, b) => {
if (a.publishTime) {
var atime = a.publishTime
.slice(0, 10)
.replace("-", "")
.replace("-", "");
}
if (b.publishTime) {
var btime = b.publishTime
.slice(0, 10)
.replace("-", "")
.replace("-", "");
}
return atime - btime;
},
defaultSortOrder: "bscend",
fieldProps: {
onChange: (value, cs) => {
setDay(cs);
},
getPopupContainer: (triggerNode) => triggerNode.parentNode,
},
render: (dom, record) => { render: (dom, record) => {
return record.publishTime === null return record.publisher === null ? "SuperAdmin" : record.publisher;
? "--"
: [moment(record.publishTime).format("YYYY-MM-DD")];
}, },
}, },
{ {
title: "状态", title: "目前进度",
dataIndex: "regionName", dataIndex: "regionName",
valueType: "select", valueType: "select",
initialValue: null, hideInSearch: true,
order: 3, order: 3,
fieldProps: {
label: null,
onChange: (value, cs) => {
setState(value);
},
options: [
{
label: "全部",
value: null,
},
{
label: "草稿",
value: 0,
},
{
label: "已发布",
value: 1,
},
{
label: "已撤回",
value: 2,
},
],
},
render: (dom, record) => { render: (dom, record) => {
return record.status === 0 return record.status === 0
? "草稿" ? "草稿"
: record.status === 1 : record.status === 1
? "已发布" ? "已发布"
: "已撤回"; : "已撤回";
}, },
}, },
{ {
@ -137,34 +77,7 @@ export const Default = (props) => {
valueType: "dateTime", valueType: "dateTime",
hideInSearch: true, hideInSearch: true,
render: (dom, record) => { render: (dom, record) => {
return record.status === 0 ? ( return (
<div>
<a
onClick={() => {
editor(record);
}}
>
编辑
</a>
<Popconfirm
title="确认删除?"
onConfirm={() => {
delDataList(record.id);
}}
>
<Button type="link">删除</Button>
</Popconfirm>
</div>
) : record.status === 1 ? (
<Popconfirm
title="确认撤回?"
onConfirm={() => {
withdRew(record);
}}
>
<a>撤回</a>
</Popconfirm>
) : (
<div> <div>
<a <a
onClick={() => { onClick={() => {
@ -182,7 +95,8 @@ export const Default = (props) => {
<Button type="link">删除</Button> <Button type="link">删除</Button>
</Popconfirm> </Popconfirm>
</div> </div>
); )
}, },
}, },
{ {
@ -199,7 +113,7 @@ export const Default = (props) => {
dispatch(push(`article/update/post`)); dispatch(push(`article/update/post`));
}} }}
> >
新增资讯 项目信息导入
</Button> </Button>
); );
}, },
@ -219,32 +133,17 @@ export const Default = (props) => {
dispatch(push(`article/update/put`)); dispatch(push(`article/update/put`));
localStorage.setItem("modifyData", JSON.stringify(record)); localStorage.setItem("modifyData", JSON.stringify(record));
}; };
//撤回
const withdRew = (record) => {
const records = { ...record, status: 2 };
dispatch(Action.editArticle(records)).then((res) => {
if (res.success) {
// 刷新
tableActionRef.current.reload();
}
});
};
return ( return (
<div style={{ height: "100%" }}> <div style={{ height: "100%" }}>
<Scroller containerId={"article-container-query"} height={"100%"}> <Scroller containerId={"article-container-query"} height={"100%"}>
<ProTable <ProTable
search={{
defaultCollapsed: false,
}}
actionRef={tableActionRef} actionRef={tableActionRef}
columns={columns} columns={columns}
options={false} options={false}
dataSource={(counts || {}).data || []} dataSource={(counts || {}).data || []}
onReset={() => { search={{
setHeading(); optionRender: false,
setDay(null); collapsed: false,
setState(null);
}} }}
request={async (params) => { request={async (params) => {
let query = { let query = {
@ -256,9 +155,9 @@ export const Default = (props) => {
publishTime: publishTime:
day && day.length && day[0].trim() != "" day && day.length && day[0].trim() != ""
? JSON.stringify([ ? JSON.stringify([
moment(day[0]).startOf("day"), moment(day[0]).startOf("day"),
moment(day[1]).endOf("day"), moment(day[1]).endOf("day"),
]) ])
: null, : null,
}; };
const res = await dispatch(Action.getDataList(query)); const res = await dispatch(Action.getDataList(query));
@ -285,3 +184,12 @@ Default.propTypes = {
const mapStateToProps = (state) => ({}); const mapStateToProps = (state) => ({});
export default connect(mapStateToProps)(Default); 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'}
]

2
web/client/src/sections/article/nav-item.js

@ -6,7 +6,7 @@ import { BarChartOutlined } from '@ant-design/icons';
export function getNavItem() { export function getNavItem() {
return ( return (
<Menu.Item key="article" icon={<BarChartOutlined />}> <Menu.Item key="article" icon={<BarChartOutlined />}>
<Link to="/article">资讯管理</Link> <Link to="/article">项目信息</Link>
</Menu.Item> </Menu.Item>
); );
} }

10
web/client/src/sections/article/routes.js

@ -1,5 +1,4 @@
import Container from './containers'; import Container from './containers';
import ArticleModify from "./containers/edit-article"
export default [ export default [
{ {
type: 'inner', type: 'inner',
@ -9,12 +8,5 @@ export default [
component: Container, component: Container,
} }
}, },
{
type: 'inner',
route: {
key: 'articleUpdate',
path: '/article/update/:state',// type: artical/message state:post/put
component: ArticleModify
}
}
]; ];

3
web/client/src/sections/index.js

@ -2,7 +2,6 @@ import Auth from './auth';
import AlarmConfure from './homePage'; import AlarmConfure from './homePage';
import Article from './article' import Article from './article'
import Party from './party' import Party from './party'
import Organization from './organization'
export { export {
Auth, AlarmConfure, Article, Party,Organization Auth, AlarmConfure, Article, Party
}; };

6
web/client/src/sections/organization/actions/index.js

@ -1,6 +0,0 @@
'use strict';
import { editLaborParty } from './party'
export default {
editLaborParty
}

61
web/client/src/sections/organization/actions/party.js

@ -1,61 +0,0 @@
'use strict';
import { ApiTable } from '$utils'
import { Request } from '@peace/utils'
import { basicAction } from '@peace/utils'
export function editLaborParty(obj) {
return dispatch => basicAction({
type: 'put',
dispatch: dispatch,
data: obj,
actionType: 'EDIT_PARTY',
url: `${ApiTable.getpartyMember}`,
msg: { error: '编辑党员工会人数失败' },
reducer: { name: 'editLaborParty' }
});
}
export function getCommittee(query) {
return dispatch => basicAction({
type: 'get',
dispatch: dispatch,
query,
actionType: 'GET_COMMITTEE',
url: `${ApiTable.getCommittee}`,
msg: { error: '获取支委会人员信息失败' },
// reducer: { name: 'editLaborParty' }
});
}
export function postCommittee(query) {
return dispatch => basicAction({
type: 'post',
dispatch: dispatch,
data:query,
actionType: 'POST_COMMITTEE',
url: `${ApiTable.postCommittee}`,
msg: { error: '新增支委会人员信息失败' },
// reducer: { name: 'editLaborParty' }
});
}
export function putCommittee(query,putid) {
return dispatch => basicAction({
type: 'put',
dispatch: dispatch,
data:query,
actionType: 'PUT_COMMITTEE',
url: ApiTable.putCommittee.replace(':id',putid),
msg: { error: '修改支委会人员信息失败' },
// reducer: { name: 'editLaborParty' }
});
}
export function delCommittee(query,putid) {
return dispatch => basicAction({
type: 'del',
dispatch: dispatch,
data:query,
actionType: 'DEL_COMMITTEE',
url: ApiTable.putCommittee.replace(':id',putid),
msg: { error: '删除支委会人员信息失败' },
// reducer: { name: 'editLaborParty' }
});
}

892
web/client/src/sections/organization/components/OutgoingVisibleModel.js

@ -1,892 +0,0 @@
import React, { useEffect, useState } from "react";
import { connect } from "react-redux";
import { Form, Spin, message, Row, Col } from "antd";
import {
ModalForm,
ProForm,
ProFormText,
ProFormSelect,
ProFormDatePicker,
ProFormTextArea,
} from "@ant-design/pro-form";
import { getCommittee, putCommittee } from "../actions/party";
import _ from "lodash";
import Uploads from "../../../components/Upload/fujian.js";
import "./index.less";
import { Scroller } from "$components";
const ProjectModal = (props) => {
const {
visible,
onVisibleChange,
typecard,
rewkeys,
recortd,
dispatch,
flageMold,
setFlageMold,
setFlageRef,
} = props;
const [newlys, setNewlys] = useState(); //必填数据
const [newlysay, setNewlysay] = useState(); //处理hou
const [records, setRecords] = useState(); //处理
const [recordsay, setRecordsay] = useState(); //必填数据
const [uploadVisible, setUploadVisible] = useState(false);
const [files, setFiles] = useState();
// const [lin, setlin] = useState([]);
// useEffect(() => {
// if (recortd?.photograph?.length > 0) {
// setlin(JSON.parse(recortd?.photograph));
// }
// }, [recortd]);
// useEffect(() => {
// return () => {
// setlin(null);
// };
// });
const onFileUploaded = (fileList) => {
// setlin(fileList.length === 0 ? [] : localStorage.getItem("modifyData") ? JSON.parse(localStorage.getItem("modifyData"))?.files !== null ? JSON.parse(JSON.parse(localStorage.getItem("modifyData"))?.files) : [] : [])
// console.log(fileList.length === 0 ? [] : localStorage.getItem("modifyData") ? JSON.parse(localStorage.getItem("modifyData"))?.files !== null ? JSON.parse(JSON.parse(localStorage.getItem("modifyData"))?.files) : [] : [])
setFiles(fileList);
};
return (
<Spin spinning={false}>
<ModalForm
width={"76rem"}
style={{ height: "40rem" }}
title="离任"
visible={visible}
onVisibleChange={onVisibleChange}
modalProps={{
destroyOnClose: true,
}}
submitter={typecard == "outexamine" ? false : true}
onFinish={(values) => {
console.log(values);
console.log(recortd);
if (typecard == "Outgoing") {
// setDelet(values);
const putid = recortd?.id;
let photograp = null;
if (
JSON.stringify(recortd?.photograph) !==
JSON.stringify(values.photograph)
) {
photograp = values?.photograph;
} else {
photograp = recortd?.photograph;
}
const query = {
...values,
mold: false,
photograph: photograp,
};
dispatch(putCommittee(query, putid)).then((res) => {
setFlageMold(!flageMold);
if (res.success) {
message.success("离任成功");
} else {
message.error("离任失败");
}
});
return true;
}
if (typecard == "Outgoingss") {
// setDelet(values);
const putid = recortd?.id;
let photograp = null;
if (
JSON.stringify(recortd?.photograph) !==
JSON.stringify(values.photograph)
) {
photograp = values?.photograph;
} else {
photograp = recortd?.photograph;
}
const query = {
...values,
forOrganization: "中共江西飞尚科技有限公司支部委员会",
photograph: photograp,
};
dispatch(putCommittee(query, putid)).then((res) => {
// tableActionRef.current.reload();
setFlageMold(!flageMold);
if (res.success) {
message.success("修改成功");
} else {
message.error("修改失败");
}
});
return true;
}
}}
initialValues={recortd}
>
<Scroller containerId={"article-container-query"} height={"100%"}>
{typecard === "Outgoing" ? (
<ProForm.Group>
<Row style={{ width: "75rem" }}>
<Col span={7}>
<ProFormText
name="name"
width="md"
label="姓名"
placeholder="请输入姓名"
// value={recortd?.laborUnion}
rules={[{ required: true, message: "必填", max: 50 }]}
// initialValue={recortd?.laborUnion}
/>
</Col>
<Col style={{ width: "20.5rem", marginLeft: 5 }}>
<ProFormSelect
options={[
{
value: "小学",
label: "小学",
},
{
value: "高中",
label: "高中",
},
{
value: "中技",
label: "中技",
},
{
value: "中专",
label: "中专",
},
{
value: "大专",
label: "大专",
},
{
value: "本科",
label: "本科",
},
{
value: "研究生",
label: "研究生",
},
{
value: "博士",
label: "博士",
},
{
value: "博士后",
label: "博士后",
},
]}
name="education"
label="学历"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
<Col span={8} style={{ marginLeft: 26 }}>
<ProForm.Item label="上传照片" name="photograph">
<Uploads
fileTypes={["png", "jpg", "jpeg"]}
maxFilesNum={1}
maxFileSize={10}
onChange={onFileUploaded}
clearFileList={uploadVisible}
// value={lin}
listType={"picture-card"}
/>
</ProForm.Item>
</Col>
</Row>
<Row style={{ width: "65rem" }} justify="space-around">
<Col span={24}>
<ProFormText
name="phone"
width="md"
label="联系电话"
placeholder="请输入电话"
rules={[
{ required: true, message: "必填" },
{
pattern:
/^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/,
message: "请输入正确的手机号",
},
]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormSelect
options={[
{
value: "男",
label: "男",
},
{
value: "女",
label: "女",
},
]}
name="sexuality"
label="性别"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }} justify="space-around">
<Col span={24}>
<ProFormText
name="forOrganization"
width="md"
disabled
label="任职组织"
placeholder="请输入任职组织"
value="中共江西飞尚科技有限公司支部委员会"
// rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormSelect
options={[
{
value: "党支部书记",
label: "党支部书记",
},
{
value: "党支部副书记",
label: "党支部副书记",
},
{
value: "党支部委员",
label: "党支部委员",
},
]}
name="partyPosts"
label="党内职务"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormSelect
options={[
{
value: "选举",
label: "选举",
},
{
value: "任命",
label: "任命",
},
]}
name="howPositions"
label="任职方式"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<div className="model-increase">
<Row style={{ width: "75rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormDatePicker
name="employmentTime"
label="任职时间"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
<Col span={6} style={{ marginLeft: 26 }}>
<ProFormText
name="tenure"
width="md"
label="任期"
placeholder="请输入任期"
// value={recordsay?.[0]?.value}
rules={[{ required: true, message: "必填", max: 50 },{
pattern:
/(^-?[1-9]([0-9]*)$|^-?[0-9]$)/,
message: "请输入正确的任期",
},]}
/>
</Col>
<Col span={8} style={{ marginLeft: 26 }}>
<ProFormDatePicker
name="expirationTime"
label="届满时间"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
</div>
<div className="remark-field">
<Row style={{ width: "65rem" }}>
<Col>
<ProFormTextArea
label="职责"
name="responsibility"
rules={[{ max: 500 }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col>
<ProFormTextArea
label="备注"
name="remark"
rules={[{ max: 500 }]}
/>
</Col>
</Row>
</div>
<div className="outgoing-date">
<Row style={{ width: "65rem" }}>
<Col>
<ProFormDatePicker
name="leaveTime"
label="离任时间"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col>
<ProFormTextArea
label="离任原因"
name="leavingReason"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
</div>
</ProForm.Group>
) : (
""
)}
{typecard === "Outgoingss" ? (
<ProForm.Group>
<Row style={{ width: "75rem" }}>
<Col span={7}>
<ProFormText
name="name"
width="md"
label="姓名"
placeholder="请输入姓名"
// value={recortd?.laborUnion}
rules={[{ required: true, message: "必填", max: 50 }]}
/>
</Col>
<Col style={{ width: "20.5rem", marginLeft: 5 }}>
<ProFormSelect
options={[
{
value: "小学",
label: "小学",
},
{
value: "高中",
label: "高中",
},
{
value: "中技",
label: "中技",
},
{
value: "中专",
label: "中专",
},
{
value: "大专",
label: "大专",
},
{
value: "本科",
label: "本科",
},
{
value: "研究生",
label: "研究生",
},
{
value: "博士",
label: "博士",
},
{
value: "博士后",
label: "博士后",
},
]}
name="education"
label="学历"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
<Col span={8} style={{ marginLeft: 26 }}>
<ProForm.Item label="上传照片" name="photograph">
<Uploads
fileTypes={["png", "jpg", "jpeg"]}
maxFilesNum={1}
maxFileSize={10}
onChange={onFileUploaded}
clearFileList={uploadVisible}
// value={lin}
listType={"picture-card"}
/>
</ProForm.Item>
</Col>
</Row>
<Row style={{ width: "65rem" }} justify="space-around">
<Col span={24}>
<ProFormText
name="phone"
width="md"
label="联系电话"
placeholder="请输入电话"
rules={[
{ required: true, message: "必填" },
{
pattern:
/^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/,
message: "请输入正确的手机号",
},
]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormSelect
options={[
{
value: "男",
label: "男",
},
{
value: "女",
label: "女",
},
]}
name="sexuality"
label="性别"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }} justify="space-around">
<Col span={24}>
<ProFormText
name="for_organization"
width="md"
disabled
label="任职组织"
placeholder="请输入任职组织"
value="中共江西飞尚科技有限公司支部委员会"
// rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormSelect
options={[
{
value: "党支部书记",
label: "党支部书记",
},
{
value: "党支部副书记",
label: "党支部副书记",
},
{
value: "党支部委员",
label: "党支部委员",
},
]}
name="partyPosts"
label="党内职务"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormSelect
options={[
{
value: "选举",
label: "选举",
},
{
value: "任命",
label: "任命",
},
]}
name="howPositions"
label="任职方式"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<div className="model-increase">
<Row style={{ width: "75rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormDatePicker
name="employmentTime"
label="任职时间"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
<Col span={6} style={{ marginLeft: 26 }}>
<ProFormText
name="tenure"
width="md"
label="任期"
placeholder="请输入任期"
// value={recordsay?.[0]?.value}
rules={[{ required: true, message: "必填", max: 50 },{
pattern:
/(^-?[1-9]([0-9]*)$|^-?[0-9]$)/,
message: "请输入正确的任期",
},]}
/>
</Col>
<Col span={8} style={{ marginLeft: 26 }}>
<ProFormDatePicker
name="expirationTime"
label="届满时间"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
</div>
<div className="remark-field">
<Row style={{ width: "65rem" }}>
<Col>
<ProFormTextArea
label="职责"
name="responsibility"
rules={[{ max: 500 }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col>
<ProFormTextArea
label="备注"
name="remark"
rules={[{ max: 500 }]}
/>
</Col>
</Row>
</div>
<div className="outgoing-date">
<Row style={{ width: "65rem" }}>
<Col>
<ProFormDatePicker
name="leaveTime"
label="离任时间"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col>
<ProFormTextArea
label="离任原因"
name="leavingReason"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
</div>
</ProForm.Group>
) : (
""
)}
{typecard == "outexamine" ? (
<ProForm.Group>
<Row style={{ width: "75rem" }}>
<Col span={7}>
<ProFormText
name="name"
width="md"
disabled
label="姓名"
placeholder="请输入姓名"
value={recortd?.name}
rules={[{ required: true, message: "必填", max: 50 }]}
/>
</Col>
<Col style={{ width: "20.5rem", marginLeft: 5 }}>
<ProFormSelect
disabled
options={[
{
value: "小学",
label: "小学",
},
{
value: "高中",
label: "高中",
},
{
value: "中技",
label: "中技",
},
{
value: "中专",
label: "中专",
},
{
value: "大专",
label: "大专",
},
{
value: "本科",
label: "本科",
},
{
value: "研究生",
label: "研究生",
},
{
value: "博士",
label: "博士",
},
{
value: "博士后",
label: "博士后",
},
]}
name="education"
label="学历"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
<Col span={8} style={{ marginLeft: 26 }}>
<ProForm.Item label="上传照片" name="photograph">
<Uploads
fileTypes={["png", "jpg", "jpeg"]}
maxFilesNum={1}
maxFileSize={10}
onChange={onFileUploaded}
clearFileList={uploadVisible}
// value={lin}
listType={"picture-card"}
/>
</ProForm.Item>
</Col>
</Row>
<Row style={{ width: "65rem" }} justify="space-around">
<Col span={24}>
<ProFormText
name="phone"
disabled
width="md"
label="联系电话"
placeholder="请输入电话"
rules={[
{ required: true, message: "必填" },
{
pattern:
/^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/,
message: "请输入正确的手机号",
},
]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormSelect
options={[
{
value: "男",
label: "男",
},
{
value: "女",
label: "女",
},
]}
name="sexuality"
disabled
label="性别"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }} justify="space-around">
<Col span={24}>
<ProFormText
name="forOrganization"
width="md"
disabled
label="任职组织"
placeholder="请输入任职组织"
value="中共江西飞尚科技有限公司支部委员会"
// rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormSelect
disabled
options={[
{
value: "党支部书记",
label: "党支部书记",
},
{
value: "党支部副书记",
label: "党支部副书记",
},
{
value: "党支部委员",
label: "党支部委员",
},
]}
name="partyPosts"
label="党内职务"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormSelect
disabled
options={[
{
value: "选举",
label: "选举",
},
{
value: "任命",
label: "任命",
},
]}
name="howPositions"
label="任职方式"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<div className="model-increase">
<Row style={{ width: "75rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormDatePicker
disabled
name="employmentTime"
label="任职时间"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
<Col span={6} style={{ marginLeft: 26 }}>
<ProFormText
name="tenure"
width="md"
disabled
label="任期"
placeholder="请输入任期"
// value={recordsay?.[0]?.value}
rules={[{ required: true, message: "必填", max: 50 },{
pattern:
/(^-?[1-9]([0-9]*)$|^-?[0-9]$)/,
message: "请输入正确的任期",
},]}
/>
</Col>
<Col span={8} style={{ marginLeft: 26 }}>
<ProFormDatePicker
disabled
name="expirationTime"
label="届满时间"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
</div>
<div className="remark-field">
<Row style={{ width: "65rem" }}>
<Col>
<ProFormTextArea
disabled
label="职责"
name="responsibility"
rules={[{ max: 500 }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col>
<ProFormTextArea
disabled
label="备注"
name="remark"
rules={[{ max: 500 }]}
/>
</Col>
</Row>
</div>
<div className="outgoing-date">
<Row style={{ width: "65rem" }}>
<Col>
<ProFormDatePicker
disabled
name="leaveTime"
label="离任时间"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col>
<ProFormTextArea
disabled
label="离任原因"
name="leavingReason"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
</div>
</ProForm.Group>
) : (
""
)}
</Scroller>
</ModalForm>
</Spin>
);
};
function mapStateToProps(state) {
const { depMessage } = state;
const pakData = (dep) => {
return dep.map((d) => {
return {
title: d.name,
value: d.id,
children: pakData(d.subordinate),
};
});
};
// let depData = pakData(depMessage.data || [])
return {
// loading: depMessage.isRequesting,
// depData,
};
}
export default connect(mapStateToProps)(ProjectModal);

82
web/client/src/sections/organization/components/edit-party.js

@ -1,82 +0,0 @@
// import React from 'react'
// import PropTypes from 'prop-types'
// import { Modal, Form, InputNumber, Button } from 'antd'
// import { useEffect } from 'react'
// const EditParty = props => {
// const { visible, handleOk, handleCancel, editData } = props
// const [form] = Form.useForm();
// useEffect(() => {
// if (editData && visible) {
// form.setFieldsValue({
// party: editData.partyNumber,
// labor: editData.laborUnion
// })
// }
// }, [editData, visible])
// return (
// <Modal
// visible={visible}
// // onOk={handleOk}
// onCancel={handleCancel}
// footer={null}
// title="党员、工会人数编辑"
// >
// <Form
// name="basic"
// labelCol={{ span: 8 }}
// wrapperCol={{ span: 16 }}
// labelAlign="left"
// form={form}
// onFinish={handleOk}
// // onFinishFailed={onFinishFailed}
// autoComplete="off"
// >
// <Form.Item
// label="党员人数"
// name="party"
// rules={[{ required: true, message: '请输入党员人数' }]}
// >
// <InputNumber rows={1} min={0} width={180}></InputNumber>
// </Form.Item>
// <Form.Item
// label="工会人数"
// name="labor"
// rules={[{ required: true, message: '请输入工会人数' }]}
// >
// <InputNumber rows={1} min={0} width={180}></InputNumber>
// </Form.Item>
// <Form.Item noStyle={true}>
// <div style={{
// padding: '12px 0',
// width: '100%',
// textAlign: 'right',
// }}>
// <Button
// style={{ marginRight: 16, width: 88 }}
// onClick={handleCancel}
// >取消</Button>
// <Button
// htmlType="submit"
// type="primary"
// style={{ marginRight: 16, width: 88 }}
// // onClick={() => handleOk(form)}
// >确定</Button>
// </div>
// </Form.Item>
// </Form>
// </Modal>
// )
// }
// EditParty.propTypes = {
// visible: PropTypes.bool,
// handleCancel: PropTypes.func,
// handleOk: PropTypes.func,
// editData: PropTypes.object
// }
// export default EditParty

42
web/client/src/sections/organization/components/index.less

@ -1,42 +0,0 @@
.model-increase{
.ant-picker-input{
width: 19rem !important;
}
.ant-input{
width: 19rem !important;
}
}
.remark-field{
.ant-col{
width: 63rem !important;
}
}
.ant-row{
margin-left: 26px !important;
}
.outgoing-date{
.ant-picker-input{
width: 17rem;
}
.ant-form-item-control-input{
width: 61.5rem;
}
}
.display-ok{
.ant-space-item{
display: none !important;
}
}
.model-cancel{
.ant-modal-footer{
display: none !important;
}
}
.model-increase-two{
.ant-picker-input{
width: 17.5rem !important;
}
.ant-select-show-arrow{
width: 308px !important;
}
}

799
web/client/src/sections/organization/components/memberVisibleModel.js

@ -1,799 +0,0 @@
import React, { useEffect, useState } from "react";
import { connect } from "react-redux";
import { Select, Spin, message, Row, Col, Radio } from "antd";
import {
ModalForm,
ProForm,
ProFormText,
ProFormSelect,
ProFormDatePicker,
ProFormTextArea,
} from "@ant-design/pro-form";
import { postCommittee, putCommittee } from "../actions/party";
import _ from "lodash";
import Uploads from "../../../components/Upload/fujian.js";
import "./index.less";
import { Scroller } from "$components";
const { Option } = Select;
const ProjectModal = (props) => {
const {
visible,
onVisibleChange,
typecard,
tableActionRef,
recortd,
dispatch,
flageMold,
setFlageMold,
category,
} = props;
const [newlys, setNewlys] = useState(); //必填数据
const [newlysay, setNewlysay] = useState(); //处理hou
const [records, setRecords] = useState(); //处理
const [recordsay, setRecordsay] = useState(); //必填数据
const [files, setFiles] = useState();
const [uploadVisible, setUploadVisible] = useState(false);
// const [lin, setlin] = useState([]);
// useEffect(() => {
// if (recortd?.photograph?.length > 0) {
// setlin(JSON.parse(recortd?.photograph));
// }
// }, [recortd]);
// useEffect(() => {
// return () => {
// setlin([])
// }
// })
const onFileUploaded = (fileList) => {
console.log(fileList);
// setlin(fileList.length === 0 ? [] : localStorage.getItem("modifyData") ? JSON.parse(localStorage.getItem("modifyData"))?.files !== null ? JSON.parse(JSON.parse(localStorage.getItem("modifyData"))?.files) : [] : [])
// console.log(fileList.length === 0 ? [] : localStorage.getItem("modifyData") ? JSON.parse(localStorage.getItem("modifyData"))?.files !== null ? JSON.parse(JSON.parse(localStorage.getItem("modifyData"))?.files) : [] : [])
setFiles(fileList);
};
const nation = [ "汉族","满族","蒙古族","回族","藏族","维吾尔族","苗族","彝族","壮族","布依族","侗族","瑶族","白族","土家族","哈尼族","哈萨克族","傣族","黎族","傈僳族","佤族","畲族","高山族","拉祜族","水族","东乡族","纳西族","景颇族","柯尔克孜族","土族","达斡尔族","仫佬族","羌族","布朗族","撒拉族","毛南族","仡佬族","锡伯族","阿昌族","普米族","朝鲜族","塔吉克族","怒族","乌孜别克族","俄罗斯族","鄂温克族","德昂族","保安族","裕固族","京族","塔塔尔族","独龙族","鄂伦春族","赫哲族","门巴族","珞巴族",
"基诺族",
"其他民族",
"外国血统",
"外国民族",
];
return (
<Spin spinning={false}>
<div>
<ModalForm
width={"76rem"}
style={{ height: "40rem" }}
title={category}
visible={visible}
onVisibleChange={onVisibleChange}
modalProps={{
destroyOnClose: true,
}}
submitter={typecard == "examine" ? false : true}
onFinish={(values) => {
console.log(values);
if (typecard == "compile") {
// setDelet(values);
const query = {
...values,
mold: true,
forOrganization: "中共江西飞尚科技有限公司支部委员会",
photograph: values?.photograph ? values?.photograph : [],
};
dispatch(postCommittee(query)).then((res) => {
setFlageMold(!flageMold);
if (res.success) {
message.success("新增委员成功");
} else {
message.error("新增委员失败");
}
});
return true;
}
if (typecard == "modification") {
// setDelet(values);
const putid = recortd?.id;
let photograp = null;
if (
JSON.stringify(recortd?.photograph) !==
JSON.stringify(values.photograph)
) {
photograp = values?.photograph;
} else {
photograp = recortd?.photograph;
}
const query = {
...values,
mold: true,
photograph: photograp,
};
dispatch(putCommittee(query, putid)).then((res) => {
// tableActionRef.current.reload();
setFlageMold(!flageMold);
if (res.success) {
message.success("修改成功");
} else {
message.error("修改失败");
}
});
return true;
}
}}
initialValues={recortd}
>
<Scroller containerId={"article-container-query"} height={"100%"}>
{typecard == "compile" ? (
<ProForm.Group>
<Row style={{ width: "65rem" }}>
{" "}
<Col span={24}>
<ProForm.Item label="上传头像" name="photograph">
<Uploads
fileTypes={["png", "jpg", "jpeg"]}
maxFilesNum={1}
maxFileSize={10}
onChange={onFileUploaded}
clearFileList={uploadVisible}
// value={lin}
listType={"picture-card"}
/>
</ProForm.Item>
</Col>
<Col span={12}></Col>
</Row>
<Row>
<Col style={{ width: "20.5rem" }}>
<ProFormText
name="name"
width="md"
label="姓名"
placeholder="请输入姓名"
// value={recortd?.laborUnion}
rules={[{ required: true, message: "必填", max: 50 }]}
// initialValue={recortd?.laborUnion}
/>
</Col>
<Col style={{ width: "20.5rem" }}>
<ProFormText
name="phone"
width="md"
label="手机号"
placeholder="请输入手机号"
rules={[
{ required: true, message: "必填" },
{
pattern:
/^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/,
message: "请输入正确的手机号",
},
]}
/>
</Col>
</Row>
<Row style={{width: "65rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormText
name="name"
width="md"
label="身份证"
placeholder="请输入身份证"
// value={recortd?.laborUnion}
rules={[{ required: true, message: "必填", max: 50 }]}
// initialValue={recortd?.laborUnion}
/>
</Col>
<Col style={{ width: "20.5rem" }}>
<ProFormSelect
options={[
{
value: "预备党员",
label: "预备党员",
},
{
value: "正式党员",
label: "正式党员",
},
]}
name="education"
label="人员类别"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormSelect
options={[
{
value: "男",
label: "男",
},
{
value: "女",
label: "女",
},
]}
name="sexuality"
label="性别"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
<Col style={{ width: "20.5rem", marginLeft: 5 }}>
<ProForm.Item
name="education"
label="民族"
rules={[{ required: true, message: "必填" }]}
>
<Select>
{nation.map((item) => {
return <Option value={item}>{item}</Option>;
})}
</Select>
</ProForm.Item>
</Col>
</Row>
<div className="model-increase-two">
<Row>
<Col style={{ width: "20.5rem" }}>
<ProFormDatePicker
name="employmentTime"
label="出生日期"
placeholder="请选择出生日期"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
<Col>
<ProFormSelect
options={[
{
value: "小学",
label: "小学",
},
{
value: "高中",
label: "高中",
},
{
value: "中技",
label: "中技",
},
{
value: "中专",
label: "中专",
},
{
value: "大专",
label: "大专",
},
{
value: "本科",
label: "本科",
},
{
value: "研究生",
label: "研究生",
},
{
value: "博士",
label: "博士",
},
{
value: "博士后",
label: "博士后",
},
]}
name="education"
label="学历"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormDatePicker
name="employmentTime"
label="加入党组织日期"
placeholder="请选择加入党组织日期"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
<Col style={{ width: "20.5rem" }}>
<ProFormDatePicker
name="employmentTime"
label="转为正式党员日期"
placeholder="请选择转为正式党员日期"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormSelect
options={[
{
value: "党支部书记",
label: "党支部书记",
},
{
value: "党支部副书记",
label: "党支部副书记",
},
{
value: "党支部委员",
label: "党支部委员",
},
]}
name="partyPosts"
label="工作岗位"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProForm.Item
name="howPositions"
label="是否为单位领导成员"
rules={[{ required: true, message: "必填" }]}
>
<Radio.Group>
<Radio value="true"> </Radio>
<Radio value="false"> </Radio>
</Radio.Group>
</ProForm.Item>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProForm.Item
name="howPositions"
label="是否新社会阶层"
rules={[{ required: true, message: "必填" }]}
>
<Radio.Group>
<Radio value="true"> </Radio>
<Radio value="false"> </Radio>
</Radio.Group>
</ProForm.Item>
</Col>
</Row>
</div>
</ProForm.Group>
) : (
""
)}
{typecard == "modification" ? (
<ProForm.Group>
<Row style={{ width: "75rem" }}>
<Col span={7}>
<ProFormText
name="name"
width="md"
label="姓名"
placeholder="请输入姓名"
// value={recortd?.laborUnion}
rules={[{ required: true, message: "必填", max: 50 }]}
/>
</Col>
<Col style={{ width: "20.5rem", marginLeft: 5 }}>
<ProFormSelect
options={[
{
value: "小学",
label: "小学",
},
{
value: "高中",
label: "高中",
},
{
value: "中技",
label: "中技",
},
{
value: "中专",
label: "中专",
},
{
value: "大专",
label: "大专",
},
{
value: "本科",
label: "本科",
},
{
value: "研究生",
label: "研究生",
},
{
value: "博士",
label: "博士",
},
{
value: "博士后",
label: "博士后",
},
]}
name="education"
label="学历"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
<Col span={8} style={{ marginLeft: 26 }}>
<ProForm.Item label="上传照片" name="photograph">
<Uploads
fileTypes={["png", "jpg", "jpeg"]}
maxFilesNum={1}
maxFileSize={10}
onChange={onFileUploaded}
clearFileList={uploadVisible}
// value={lin}
listType={"picture-card"}
/>
</ProForm.Item>
</Col>
</Row>
<Row style={{ width: "65rem" }} justify="space-around">
<Col span={24}>
<ProFormText
name="phone"
width="md"
label="联系电话"
placeholder="请输入电话"
rules={[
{ required: true, message: "必填" },
{
pattern:
/^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/,
message: "请输入正确的手机号",
},
]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }} justify="space-around">
<Col span={24}>
<ProFormText
name="forOrganization"
width="md"
disabled
label="任职组织"
placeholder="请输入任职组织"
value="中共江西飞尚科技有限公司支部委员会"
// rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormSelect
options={[
{
value: "党支部书记",
label: "党支部书记",
},
{
value: "党支部副书记",
label: "党支部副书记",
},
{
value: "党支部委员",
label: "党支部委员",
},
]}
name="partyPosts"
label="党内职务"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormSelect
options={[
{
value: "选举",
label: "选举",
},
{
value: "任命",
label: "任命",
},
]}
name="howPositions"
label="任职方式"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<div className="model-increase">
<Row style={{ width: "75rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormDatePicker
name="employmentTime"
label="任职时间"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
<Col span={6} style={{ marginLeft: 26 }}>
<ProFormText
name="tenure"
width="md"
label="任期"
placeholder="请输入任期"
// value={recordsay?.[0]?.value}
rules={[{ required: true, message: "必填", max: 50 }]}
/>
</Col>
<Col span={8} style={{ marginLeft: 26 }}>
<ProFormDatePicker
name="expirationTime"
label="届满时间"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
</div>
<div className="remark-field">
<Row style={{ width: "65rem" }}>
<Col>
<ProFormTextArea
label="职责"
name="responsibility"
rules={[{ max: 500 }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col>
<ProFormTextArea
label="备注"
name="remark"
rules={[{ max: 500 }]}
/>
</Col>
</Row>
</div>
</ProForm.Group>
) : (
""
)}
{typecard == "examine" ? (
<ProForm.Group>
<Row style={{ width: "75rem" }}>
<Col span={7}>
<ProFormText
name="name"
width="md"
disabled
label="姓名"
placeholder="请输入姓名"
value={recortd?.laborUnion}
rules={[{ required: true, message: "必填", max: 50 }]}
/>
</Col>
<Col style={{ width: "20.5rem", marginLeft: 5 }}>
<ProFormSelect
disabled
options={[
{
value: "小学",
label: "小学",
},
{
value: "高中",
label: "高中",
},
{
value: "中技",
label: "中技",
},
{
value: "中专",
label: "中专",
},
{
value: "大专",
label: "大专",
},
{
value: "本科",
label: "本科",
},
{
value: "研究生",
label: "研究生",
},
{
value: "博士",
label: "博士",
},
{
value: "博士后",
label: "博士后",
},
]}
name="education"
label="学历"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
<Col span={8} style={{ marginLeft: 26 }}>
<ProForm.Item label="上传照片" name="photograph">
<Uploads
fileTypes={["png", "jpg", "jpeg"]}
maxFilesNum={1}
maxFileSize={10}
onChange={onFileUploaded}
clearFileList={uploadVisible}
// value={lin}
listType={"picture-card"}
/>
</ProForm.Item>
</Col>
</Row>
<Row style={{ width: "65rem" }} justify="space-around">
<Col span={24}>
<ProFormText
name="phone"
disabled
width="md"
label="联系电话"
placeholder="请输入电话"
rules={[
{ required: true, message: "必填" },
{
pattern:
/^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/,
message: "请输入正确的手机号",
},
]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }} justify="space-around">
<Col span={24}>
<ProFormText
name="forOrganization"
width="md"
disabled
label="任职组织"
placeholder="请输入任职组织"
value="中共江西飞尚科技有限公司支部委员会"
// rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormSelect
disabled
options={[
{
value: "党支部书记",
label: "党支部书记",
},
{
value: "党支部副书记",
label: "党支部副书记",
},
{
value: "党支部委员",
label: "党支部委员",
},
]}
name="partyPosts"
label="党内职务"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormSelect
disabled
options={[
{
value: "选举",
label: "选举",
},
{
value: "任命",
label: "任命",
},
]}
name="howPositions"
label="任职方式"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<div className="model-increase">
<Row style={{ width: "75rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormDatePicker
disabled
name="employmentTime"
label="任职时间"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
<Col span={6} style={{ marginLeft: 26 }}>
<ProFormText
name="tenure"
width="md"
disabled
label="任期"
placeholder="请输入任期"
// value={recordsay?.[0]?.value}
rules={[{ required: true, message: "必填", max: 50 }]}
/>
</Col>
<Col span={8} style={{ marginLeft: 26 }}>
<ProFormDatePicker
disabled
name="expirationTime"
label="届满时间"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
</div>
<div className="remark-field">
<Row style={{ width: "65rem" }}>
<Col>
<ProFormTextArea
disabled
label="职责"
name="responsibility"
rules={[{ max: 500 }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col>
<ProFormTextArea
disabled
label="备注"
name="remark"
rules={[{ max: 500 }]}
/>
</Col>
</Row>
</div>
</ProForm.Group>
) : (
""
)}
</Scroller>
</ModalForm>
</div>
</Spin>
);
};
function mapStateToProps(state) {
const { depMessage } = state;
const pakData = (dep) => {
return dep.map((d) => {
return {
title: d.name,
value: d.id,
children: pakData(d.subordinate),
};
});
};
// let depData = pakData(depMessage.data || [])
return {
// loading: depMessage.isRequesting,
// depData,
};
}
export default connect(mapStateToProps)(ProjectModal);

823
web/client/src/sections/organization/components/newlyVisibleModel.js

@ -1,823 +0,0 @@
import React, { useEffect, useState } from "react";
import { connect } from "react-redux";
import { Button, Spin, message, Row, Col } from "antd";
import {
ModalForm,
ProForm,
ProFormText,
ProFormSelect,
ProFormDatePicker,
ProFormTextArea,
} from "@ant-design/pro-form";
import { postCommittee, putCommittee } from "../actions/party";
import _ from "lodash";
import Uploads from "../../../components/Upload/fujian.js";
import "./index.less";
import { Scroller } from "$components";
const ProjectModal = (props) => {
const {
visible,
onVisibleChange,
typecard,
tableActionRef,
recortd,
dispatch,
flageMold,
setFlageMold,
category,
} = props;
const [newlys, setNewlys] = useState(); //必填数据
const [newlysay, setNewlysay] = useState(); //处理hou
const [records, setRecords] = useState(); //处理
const [recordsay, setRecordsay] = useState(); //必填数据
const [files, setFiles] = useState();
const [uploadVisible, setUploadVisible] = useState(false);
// const [lin, setlin] = useState([]);
// useEffect(() => {
// if (recortd?.photograph?.length > 0) {
// setlin(JSON.parse(recortd?.photograph));
// }
// }, [recortd]);
// useEffect(() => {
// return () => {
// setlin([])
// }
// })
const onFileUploaded = (fileList) => {
console.log(fileList);
// setlin(fileList.length === 0 ? [] : localStorage.getItem("modifyData") ? JSON.parse(localStorage.getItem("modifyData"))?.files !== null ? JSON.parse(JSON.parse(localStorage.getItem("modifyData"))?.files) : [] : [])
// console.log(fileList.length === 0 ? [] : localStorage.getItem("modifyData") ? JSON.parse(localStorage.getItem("modifyData"))?.files !== null ? JSON.parse(JSON.parse(localStorage.getItem("modifyData"))?.files) : [] : [])
setFiles(fileList);
};
return (
<Spin spinning={false}>
<div><ModalForm
width={"76rem"}
style={{ height: "40rem" }}
title={category}
visible={visible}
onVisibleChange={onVisibleChange}
modalProps={{
destroyOnClose: true,
}}
submitter={typecard == "examine"?false:true}
onFinish={(values) => {
console.log(values)
if (typecard == "compile") {
// setDelet(values);
const query = {
...values,
mold: true,
forOrganization: "中共江西飞尚科技有限公司支部委员会",
photograph: values?.photograph ? values?.photograph : [],
};
dispatch(postCommittee(query)).then((res) => {
setFlageMold(!flageMold);
if (res.success) {
message.success("新增委员成功");
} else {
message.error("新增委员失败");
}
});
return true;
}
if (typecard == "modification") {
// setDelet(values);
const putid = recortd?.id;
let photograp = null;
if (
JSON.stringify(recortd?.photograph) !==
JSON.stringify(values.photograph)
) {
photograp = values?.photograph;
} else {
photograp = recortd?.photograph;
}
const query = {
...values,
mold: true,
photograph: photograp,
};
dispatch(putCommittee(query, putid)).then((res) => {
// tableActionRef.current.reload();
setFlageMold(!flageMold);
if (res.success) {
message.success("修改成功");
} else {
message.error("修改失败");
}
});
return true;
}
}}
initialValues={recortd}
>
<Scroller containerId={"article-container-query"} height={"100%"}>
{typecard == "compile" ? (
<ProForm.Group>
<Row style={{ width: "75rem" }}>
<Col span={7}>
<ProFormText
name="name"
width="md"
label="姓名"
placeholder="请输入姓名"
// value={recortd?.laborUnion}
rules={[{ required: true, message: "必填", max: 50 }]}
// initialValue={recortd?.laborUnion}
/>
</Col>
<Col style={{ width: "20.5rem", marginLeft: 5 }}>
<ProFormSelect
options={[
{
value: "小学",
label: "小学",
},
{
value: "高中",
label: "高中",
},
{
value: "中技",
label: "中技",
},
{
value: "中专",
label: "中专",
},
{
value: "大专",
label: "大专",
},
{
value: "本科",
label: "本科",
},
{
value: "研究生",
label: "研究生",
},
{
value: "博士",
label: "博士",
},
{
value: "博士后",
label: "博士后",
},
]}
name="education"
label="学历"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
<Col span={8} style={{ marginLeft: 26 }}>
<ProForm.Item label="上传照片" name="photograph">
<Uploads
fileTypes={["png", "jpg", "jpeg"]}
maxFilesNum={1}
maxFileSize={10}
onChange={onFileUploaded}
clearFileList={uploadVisible}
// value={lin}
listType={"picture-card"}
/>
</ProForm.Item>
</Col>
</Row>
<Row style={{ width: "65rem" }} justify="space-around">
<Col span={24}>
<ProFormText
name="phone"
width="md"
label="联系电话"
placeholder="请输入电话"
rules={[
{ required: true, message: "必填" },
{
pattern:
/^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/,
message: "请输入正确的手机号",
},
]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormSelect
options={[
{
value: "男",
label: "男",
},
{
value: "女",
label: "女",
},
]}
name="sexuality"
label="性别"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }} justify="space-around">
<Col span={24}>
<ProFormText
name="forOrganization"
width="md"
disabled
label="任职组织"
placeholder="请输入组织"
value="中共江西飞尚科技有限公司支部委员会"
// rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormSelect
options={[
{
value: "党支部书记",
label: "党支部书记",
},
{
value: "党支部副书记",
label: "党支部副书记",
},
{
value: "党支部委员",
label: "党支部委员",
},
]}
name="partyPosts"
label="党内职务"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormSelect
options={[
{
value: "选举",
label: "选举",
},
{
value: "任命",
label: "任命",
},
]}
name="howPositions"
label="任职方式"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<div className="model-increase">
<Row style={{ width: "75rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormDatePicker
name="employmentTime"
label="任职时间"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
<Col span={6} style={{ marginLeft: 26 }}>
<ProFormText
name="tenure"
width="md"
label="任期"
placeholder="请输入任期"
// value={recordsay?.[0]?.value}
rules={[{ required: true, message: "必填", max: 50 },{
pattern:
/(^-?[1-9]([0-9]*)$|^-?[0-9]$)/,
message: "请输入正确的任期",
},]}
/>
</Col>
<Col span={8} style={{ marginLeft: 26 }}>
<ProFormDatePicker
name="expirationTime"
label="届满时间"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
</div>
<div className="remark-field">
<Row style={{ width: "65rem" }}>
<Col>
<ProFormTextArea
label="职责"
name="responsibility"
rules={[{ max: 500 }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col>
<ProFormTextArea
label="备注"
name="remark"
rules={[{ max: 500 }]}
/>
</Col>
</Row>
</div>
</ProForm.Group>
) : (
""
)}
{typecard == "modification" ? (
<ProForm.Group>
<Row style={{ width: "75rem" }}>
<Col span={7}>
<ProFormText
name="name"
width="md"
label="姓名"
placeholder="请输入姓名"
// value={recortd?.laborUnion}
rules={[{ required: true, message: "必填", max: 50 }]}
/>
</Col>
<Col style={{ width: "20.5rem", marginLeft: 5 }}>
<ProFormSelect
options={[
{
value: "小学",
label: "小学",
},
{
value: "高中",
label: "高中",
},
{
value: "中技",
label: "中技",
},
{
value: "中专",
label: "中专",
},
{
value: "大专",
label: "大专",
},
{
value: "本科",
label: "本科",
},
{
value: "研究生",
label: "研究生",
},
{
value: "博士",
label: "博士",
},
{
value: "博士后",
label: "博士后",
},
]}
name="education"
label="学历"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
<Col span={8} style={{ marginLeft: 26 }}>
<ProForm.Item label="上传照片" name="photograph">
<Uploads
fileTypes={["png", "jpg", "jpeg"]}
maxFilesNum={1}
maxFileSize={10}
onChange={onFileUploaded}
clearFileList={uploadVisible}
// value={lin}
listType={"picture-card"}
/>
</ProForm.Item>
</Col>
</Row>
<Row style={{ width: "65rem" }} justify="space-around">
<Col span={24}>
<ProFormText
name="phone"
width="md"
label="联系电话"
placeholder="请输入电话"
rules={[
{ required: true, message: "必填" },
{
pattern:
/^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/,
message: "请输入正确的手机号",
},
]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormSelect
options={[
{
value: "男",
label: "男",
},
{
value: "女",
label: "女",
},
]}
name="sexuality"
label="性别"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }} justify="space-around">
<Col span={24}>
<ProFormText
name="forOrganization"
width="md"
disabled
label="任职组织"
placeholder="请输入任职组织"
value="中共江西飞尚科技有限公司支部委员会"
// rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormSelect
options={[
{
value: "党支部书记",
label: "党支部书记",
},
{
value: "党支部副书记",
label: "党支部副书记",
},
{
value: "党支部委员",
label: "党支部委员",
},
]}
name="partyPosts"
label="党内职务"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormSelect
options={[
{
value: "选举",
label: "选举",
},
{
value: "任命",
label: "任命",
},
]}
name="howPositions"
label="任职方式"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<div className="model-increase">
<Row style={{ width: "75rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormDatePicker
name="employmentTime"
label="任职时间"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
<Col span={6} style={{ marginLeft: 26 }}>
<ProFormText
name="tenure"
width="md"
label="任期"
placeholder="请输入任期"
// value={recordsay?.[0]?.value}
rules={[{ required: true, message: "必填", max: 50 },{
pattern:
/(^-?[1-9]([0-9]*)$|^-?[0-9]$)/,
message: "请输入正确的任期",
},]}
/>
</Col>
<Col span={8} style={{ marginLeft: 26 }}>
<ProFormDatePicker
name="expirationTime"
label="届满时间"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
</div>
<div className="remark-field">
<Row style={{ width: "65rem" }}>
<Col>
<ProFormTextArea
label="职责"
name="responsibility"
rules={[{ max: 500 }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col>
<ProFormTextArea
label="备注"
name="remark"
rules={[{ max: 500 }]}
/>
</Col>
</Row>
</div>
</ProForm.Group>
) : (
""
)}
{typecard == "examine" ? (
<ProForm.Group>
<Row style={{ width: "75rem" }}>
<Col span={7}>
<ProFormText
name="name"
width="md"
disabled
label="姓名"
placeholder="请输入姓名"
value={recortd?.laborUnion}
rules={[{ required: true, message: "必填", max: 50 }]}
/>
</Col>
<Col style={{ width: "20.5rem", marginLeft: 5 }}>
<ProFormSelect
disabled
options={[
{
value: "小学",
label: "小学",
},
{
value: "高中",
label: "高中",
},
{
value: "中技",
label: "中技",
},
{
value: "中专",
label: "中专",
},
{
value: "大专",
label: "大专",
},
{
value: "本科",
label: "本科",
},
{
value: "研究生",
label: "研究生",
},
{
value: "博士",
label: "博士",
},
{
value: "博士后",
label: "博士后",
},
]}
name="education"
label="学历"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
<Col span={8} style={{ marginLeft: 26 }}>
<ProForm.Item label="上传照片" name="photograph">
<Uploads
fileTypes={["png", "jpg", "jpeg"]}
maxFilesNum={1}
maxFileSize={10}
onChange={onFileUploaded}
clearFileList={uploadVisible}
// value={lin}
listType={"picture-card"}
/>
</ProForm.Item>
</Col>
</Row>
<Row style={{ width: "65rem" }} justify="space-around">
<Col span={24}>
<ProFormText
name="phone"
disabled
width="md"
label="联系电话"
placeholder="请输入电话"
rules={[
{ required: true, message: "必填" },
{
pattern:
/^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/,
message: "请输入正确的手机号",
},
]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormSelect
options={[
{
value: "男",
label: "男",
},
{
value: "女",
label: "女",
},
]}
name="sexuality"
disabled
label="性别"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }} justify="space-around">
<Col span={24}>
<ProFormText
name="forOrganization"
width="md"
disabled
label="任职组织"
placeholder="请输入任职组织"
value="中共江西飞尚科技有限公司支部委员会"
// rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormSelect
disabled
options={[
{
value: "党支部书记",
label: "党支部书记",
},
{
value: "党支部副书记",
label: "党支部副书记",
},
{
value: "党支部委员",
label: "党支部委员",
},
]}
name="partyPosts"
label="党内职务"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormSelect
disabled
options={[
{
value: "选举",
label: "选举",
},
{
value: "任命",
label: "任命",
},
]}
name="howPositions"
label="任职方式"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
<div className="model-increase">
<Row style={{ width: "75rem" }}>
<Col style={{ width: "20.5rem" }}>
<ProFormDatePicker
disabled
name="employmentTime"
label="任职时间"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
<Col span={6} style={{ marginLeft: 26 }}>
<ProFormText
name="tenure"
width="md"
disabled
label="任期"
placeholder="请输入任期"
// value={recordsay?.[0]?.value}
rules={[{ required: true, message: "必填", max: 50 },{
pattern:
/(^-?[1-9]([0-9]*)$|^-?[0-9]$)/,
message: "请输入正确的任期",
},]}
/>
</Col>
<Col span={8} style={{ marginLeft: 26 }}>
<ProFormDatePicker
disabled
name="expirationTime"
label="届满时间"
rules={[{ required: true, message: "必填" }]}
/>
</Col>
</Row>
</div>
<div className="remark-field">
<Row style={{ width: "65rem" }}>
<Col>
<ProFormTextArea
disabled
label="职责"
name="responsibility"
rules={[{ max: 500 }]}
/>
</Col>
</Row>
<Row style={{ width: "65rem" }}>
<Col>
<ProFormTextArea
disabled
label="备注"
name="remark"
rules={[{ max: 500 }]}
/>
</Col>
</Row>
</div>
</ProForm.Group>
) : (
""
)}
</Scroller>
</ModalForm></div>
</Spin>
);
};
function mapStateToProps(state) {
const { depMessage } = state;
const pakData = (dep) => {
return dep.map((d) => {
return {
title: d.name,
value: d.id,
children: pakData(d.subordinate),
};
});
};
// let depData = pakData(depMessage.data || [])
return {
// loading: depMessage.isRequesting,
// depData,
};
}
export default connect(mapStateToProps)(ProjectModal);

6
web/client/src/sections/organization/containers/index.js

@ -1,6 +0,0 @@
'use strict';
import organization from './organization';
import partyMember from './partyMember';
export {organization,partyMember};

339
web/client/src/sections/organization/containers/organization.js

@ -1,339 +0,0 @@
import PropTypes from 'prop-types'
import React, { useEffect, useState,useRef } from "react";
import { connect } from 'react-redux'
import { Table, message,Button } from 'antd'
import ProTable from '@ant-design/pro-table';
import '../components/index.less'
import { getPartyMember } from '../../homePage/actions/profile'
import { getCommittee,delCommittee,putCommittee } from '../actions/party'
import EditParty from '../components/edit-party';
import NewlyVisibleModel from '../components/newlyVisibleModel';
import OutgoingVisibleModel from '../components/OutgoingVisibleModel';
import moment from "moment";
import { Scroller } from "$components";
var request = false
export const Default = (props) => {
const { dispatch } = props;
const [counts, setCounts] = useState(); //数据
const [showEdit, setShowEdit] = useState(false);
const [editData, setEditData] = useState();
const [partyLabor, setPartyLabor] = useState();
const [newlyVisible, setNewlyVisible] = useState(false);// 新增
const [outgoingVisible, setOutgoingVisible] = useState(false);// 离任新增
const [recortd,setRecortd]=useState()
const [outgoingRecortd,setOutgoingRecortd]=useState()
const [category, setCategory] = useState() //类别
const [typecard, setTypecard] = useState() //xinzeng 编辑
const [outcategory, setOutCategory] = useState() //类别
const [outTypecard, setOutTypecard] = useState() //liren 编辑
const [flageMold, setFlageMold] = useState(true) //上下table联动
const [nameSou,setNameSou]=useState() //姓名搜索
const tableActionRef = useRef();
useEffect(() => {
let query = {
limit: 5,
};
dispatch(getCommittee(query)).then(res => {
if (res.success) {
setPartyLabor(res.payload.data);
const dataCoutn = res.payload.data?.filter((item) => {
return item.mold===true
})
setCounts(dataCoutn);
}
})
}, [flageMold])
//删除人员信息
const deldata = (record,id) => {
let query={...record,mold:true,leaveTime:'',leavingReason:''}
dispatch(putCommittee(query,id)).then((res) => {
console.log(res)
setFlageMold(!flageMold)
if (res.success) {
message.success('删除成功');
} else {
message.error('删除失败');
}
})
}
//打开增补弹窗
const openModal = (type, record) => {
setNewlyVisible(true);
}
//打开离任弹窗
const leaveModal = ( record,type) => {
setOutgoingVisible(true);
setOutgoingRecortd(record)
setOutTypecard(type)
}
const columns = [
// {
// key: 'num',
// dataIndex: 'num',
// title: '序号',
// search: false,
// render: () => {
// return <span>1</span>
// }
// },
{
title: '姓名',
dataIndex: 'name',
key: 'name',
render: (dom, record) => {
return <div>{record.name}</div>
},
fieldProps: {
onChange: (value, cs) => {
setNameSou(value.currentTarget.value)
},
placeholder: '请输入姓名进行搜索',
getPopupContainer: (triggerNode) => triggerNode.parentNode,
}
},
{
title: '性别',
dataIndex: 'sexuality',
key: 'sexuality',
search: false,
render: (dom, record) => {
return <div>{record.sexuality}</div>
},
},
{
title: '党内职务',
dataIndex: 'mode',
key: 'mode',
search: false,
render: (dom, record) => {
return <div>{record.partyPosts}</div>
},
},
{
title: '任职方式',
dataIndex: 'mode',
key: 'mode',
search: false,
render: (dom, record) => {
return <div>{record.howPositions}</div>
},
},{
title: '任职时间',
dataIndex: 'mode',
key: 'mode',
search: false,
render: (dom, record) => {
return <div>{moment(record.employmentTime).format("YYYY-MM-DD")}</div>
},
},{
title: '联系电话',
dataIndex: 'mode',
key: 'mode',
search: false,
render: (dom, record) => {
return <div>{record.phone}</div>
},
},
{
key: 'ation',
title: '操作',
search: false,
width:150,
render: (text, record) => {
return <div><a onClick={() => {
leaveModal(record,'Outgoing')
// setOutTypecard('Outgoing')
}}>离任</a>
<a style={{marginLeft:10}} onClick={() => {openModal(record)
setTypecard('examine')
setRecortd(record)
setCategory('查看')}}>查看</a>
<a style={{ marginLeft: 10 }} onClick={() => {
openModal(record)
setTypecard('modification')
setRecortd(record)
setCategory('修改委员信息')
}}>修改</a></div>
}
}
, {
key: "direction",
hideInTable: true,
dataIndex: "direction",
order: 6,
renderFormItem: (item, { type, defaultRender, ...rest }) => {
return (
<div> <Button
type="primary"
style={{ width: "100px" }}
onClick={() => {
openModal()
setTypecard('compile')
setCategory('新增委员信息')
setRecortd()
}}
>
委员增补
</Button>
</div>
);
},
},
]
return (
<div >
<p style={{ fontSize: 16 ,float:'left',marginBottom:0}}>中共江西飞尚科技有限公司支部委员会</p>
<ProTable
actionRef={tableActionRef}
scroll={{ x: 800 }}
options={false}
style={{ width: "100% ", overflow: "auto", height: 400 }}
rowKey='id'
columns={columns}
dataSource={counts || []}
onReset={() => {
setNameSou('')
}}
request={async (params) => {
let query = {
page: params.current,
limit: 5,
name:nameSou
};
const res = await dispatch(getCommittee(query));
const dataCoutn = res.payload.data?.filter((item) => {
return item.mold===true
})
setCounts(dataCoutn);
return {
...res,
total: res.payload.data ? res.payload.data : '',
};
}}
>
</ProTable>
<OutgoingList partyLabor={partyLabor} leaveModal={leaveModal} setOutgoingVisible={setOutgoingVisible} setOutCategory={setOutCategory} deldata={deldata} />
<NewlyVisibleModel visible={newlyVisible} onVisibleChange={setNewlyVisible} typecard={typecard} recortd={recortd} category={category} setRecortd={setRecortd} setFlageMold={setFlageMold} flageMold={flageMold} />
<OutgoingVisibleModel visible={outgoingVisible} onVisibleChange={setOutgoingVisible} typecard={outTypecard} recortd={outgoingRecortd} category={outcategory} setFlageMold={setFlageMold} flageMold={flageMold} deldata={deldata} />
</div>
)
}
const OutgoingList = (props) => {
const { partyLabor, leaveModal,setOutTypecard,deldata } = props
const dataLabor = partyLabor?.filter((item) => {
return item.mold===false
})
const tableColumns = [
// {
// key: 'num',
// dataIndex: 'num',
// title: '序号',
// render: () => {
// return <span>1</span>
// }
// },
{
key: 'name',
dataIndex: 'name',
title: '姓名',
search: false,
render: (dom, record) => {
return <div>{record.name}</div>
},
},
{
title: '性别',
dataIndex: 'sexuality',
key: 'sexuality',
search: false,
render: (dom, record) => {
return <div>{record.sexuality}</div>
},
},
{
key: 'laborUnion',
dataIndex: 'laborUnion',
title: '离任前党内职务',
search: false,
render: (dom, record) => {
return <div>{record.partyPosts}</div>
},
}, {
key: 'laborUnion',
dataIndex: 'laborUnion',
title: '任职方式',
search: false,
render: (dom, record) => {
return <div>{record.howPositions}</div>
},
}, {
key: 'laborUnion',
dataIndex: 'laborUnion',
title: '离任时间',
search: false,
render: (dom, record) => {
return <div>{ moment(record.leaveTime).format("YYYY-MM-DD")}</div>
},
}, {
key: 'laborUnion',
dataIndex: 'laborUnion',
title: '离任原因',
search: false,
render: (dom, record) => {
return <div>{record.leavingReason}</div>
},
},
{
key: 'ation',
title: '操作',
search: false,
width:150,
render: (text, record) => {
return <div><a onClick={() => {
leaveModal(record,'Outgoingss')
}
}>修改</a>
<a style={{marginLeft:10}} onClick={() => {deldata(record,record.id)}}>删除</a>
<a style={{ marginLeft: 10 }} onClick={() => {
leaveModal(record,'outexamine')
}}>查看</a></div>
}
}
]
return <div><p style={{ fontSize: 16 ,float:'left',marginBottom:0}}>离任领导列表</p>
<ProTable
scroll={{ x: 800 }}
options={false}
style={{ width: "100% ", overflow: "auto", height: 400 }}
rowKey='id'
columns={tableColumns}
dataSource={dataLabor || []}
onReset={() => {
setName(null)
}}
form={{
submitter: false
}}
>
</ProTable></div>
}
Default.propTypes = {
second: PropTypes.third
}
const mapStateToProps = (state) => ({})
export default connect(mapStateToProps)(Default)

225
web/client/src/sections/organization/containers/partyMember.js

@ -1,225 +0,0 @@
import PropTypes from 'prop-types'
import React, { useEffect, useState,useRef } from "react";
import { connect } from 'react-redux'
import { Table, message,Button } from 'antd'
import ProTable from '@ant-design/pro-table';
import { getPartyMember } from '../../homePage/actions/profile'
import { getCommittee,delCommittee,putCommittee } from '../actions/party'
import EditParty from '../components/edit-party';
import MemberVisibleModel from '../components/memberVisibleModel';
import OutgoingVisibleModel from '../components/OutgoingVisibleModel';
import moment from "moment";
import { Scroller } from "$components";
var request = false
export const PartyMember = (props) => {
const { dispatch } = props;
const [counts, setCounts] = useState(); //数据
const [showEdit, setShowEdit] = useState(false);
const [editData, setEditData] = useState();
const [partyLabor, setPartyLabor] = useState();
const [newlyVisibles, setNewlyVisibles] = useState(false);// 新增
const [outgoingVisible, setOutgoingVisible] = useState(false);// 离任新增
const [recortd,setRecortd]=useState()
const [outgoingRecortd,setOutgoingRecortd]=useState()
const [category, setCategory] = useState() //类别
const [typecard, setTypecard] = useState() //xinzeng 编辑
const [outcategory, setOutCategory] = useState() //类别
const [outTypecard, setOutTypecard] = useState() //liren 编辑
const [flageMold, setFlageMold] = useState(true) //上下table联动
const [nameSou,setNameSou]=useState() //姓名搜索
const tableActionRef = useRef();
useEffect(() => {
let query = {
limit: 5,
};
dispatch(getCommittee(query)).then(res => {
if (res.success) {
setPartyLabor(res.payload.data);
const dataCoutn = res.payload.data?.filter((item) => {
return item.mold===true
})
setCounts(dataCoutn);
}
})
}, [flageMold])
//删除人员信息
const deldata = (record,id) => {
let query={...record,mold:true,leaveTime:'',leavingReason:''}
dispatch(putCommittee(query,id)).then((res) => {
console.log(res)
setFlageMold(!flageMold)
if (res.success) {
message.success('删除成功');
} else {
message.error('删除失败');
}
})
}
//打开增补弹窗
const openModal = (type, record) => {
setNewlyVisibles(true);
}
const columns = [
// {
// key: 'num',
// dataIndex: 'num',
// title: '序号',
// search: false,
// render: () => {
// return <span>1</span>
// }
// },
{
title: '姓名',
dataIndex: 'name',
key: 'name',
render: (dom, record) => {
return <div>{record.name}</div>
},
fieldProps: {
onChange: (value, cs) => {
setNameSou(value.currentTarget.value)
},
placeholder: '请输入姓名进行搜索',
getPopupContainer: (triggerNode) => triggerNode.parentNode,
}
},
{
title: '性别',
dataIndex: 'sexuality',
key: 'sexuality',
search: false,
render: (dom, record) => {
return <div>{record.sexuality}</div>
},
},
{
title: '党内职务',
dataIndex: 'mode',
key: 'mode',
search: false,
render: (dom, record) => {
return <div>{record.partyPosts}</div>
},
},
{
title: '任职方式',
dataIndex: 'mode',
key: 'mode',
search: false,
render: (dom, record) => {
return <div>{record.howPositions}</div>
},
},{
title: '任职时间',
dataIndex: 'mode',
key: 'mode',
search: false,
render: (dom, record) => {
return <div>{moment(record.employmentTime).format("YYYY-MM-DD")}</div>
},
},{
title: '联系电话',
dataIndex: 'mode',
key: 'mode',
search: false,
render: (dom, record) => {
return <div>{record.phone}</div>
},
},
{
key: 'ation',
title: '操作',
search: false,
width:150,
render: (text, record) => {
return <div><a onClick={() => {
leaveModal(record,'Outgoing')
// setOutTypecard('Outgoing')
}}>离任</a>
<a style={{marginLeft:10}} onClick={() => {openModal(record)
setTypecard('examine')
setRecortd(record)
setCategory('查看')}}>查看</a>
<a style={{ marginLeft: 10 }} onClick={() => {
openModal(record)
setTypecard('modification')
setRecortd(record)
setCategory('修改委员信息')
}}>修改</a></div>
}
}
, {
key: "direction",
hideInTable: true,
dataIndex: "direction",
order: 6,
renderFormItem: (item, { type, defaultRender, ...rest }, form, record) => {
return (
<div> <Button
type="primary"
style={{ width: "100px" }}
onClick={() => {
openModal()
setTypecard('compile')
setCategory('新增党员信息')
setRecortd()
}}
>
党员增补
</Button>
</div>
);
},
},
]
const memberList=[{name:'党员数量',number:12},{name:'预备党员',number:1},{name:'女党员',number:2},{name:'少数民族党员',number:1},{name:'大专以上党员',number:12}]
return (
<div>
<div style={{display:'flex'}}>{memberList.map((item) => {
return <div style={{marginLeft:20}}><p>{item.name}</p><p style={{fontWeight:500,fontSize:18}}>{ item.number}</p></div>
})}</div>
<ProTable
actionRef={tableActionRef}
scroll={{ x: 800 }}
options={false}
style={{ width: "100% ", overflow: "auto"}}
rowKey='id'
columns={columns}
dataSource={counts || []}
onReset={() => {
setNameSou('')
}}
request={async (params) => {
let query = {
page: params.current,
limit: 5,
name:nameSou
};
const res = await dispatch(getCommittee(query));
const dataCoutn = res.payload.data?.filter((item) => {
return item.mold===true
})
setCounts(dataCoutn);
return {
...res,
total: res.payload.data ? res.payload.data : '',
};
}}
>
</ProTable>
<MemberVisibleModel visible={newlyVisibles} onVisibleChange={setNewlyVisibles} typecard={typecard} recortd={recortd} category={category} setRecortd={setRecortd} setFlageMold={setFlageMold} flageMold={flageMold} />
</div>
)
}
// PartyMember.propTypes = {
// second: PropTypes.third
// }
const mapStateToProps = (state) => ({})
export default connect(mapStateToProps)(PartyMember)

13
web/client/src/sections/organization/index.js

@ -1,13 +0,0 @@
import routes from './routes';
import reducers from './reducers';
import actions from './actions';
import {getNavItem} from './nav-item';
export default {
key: 'organization',
name: '党组织架构管理',
reducers,
routes,
actions,
getNavItem: getNavItem
};

22
web/client/src/sections/organization/nav-item.js

@ -1,22 +0,0 @@
'use strict';
import React from "react";
import { Link } from "react-router-dom";
import { Menu } from "antd";
import { BarChartOutlined } from "@ant-design/icons";
const SubMenu = Menu.SubMenu;
export function getNavItem() {
return (
<SubMenu key="organization" icon={<BarChartOutlined />} title={'党组织架构管理'}>
<Menu.Item key="userManage" >
<Link to="/organization/user">支委会人员</Link>
</Menu.Item>
{/* <Menu.Item key="partyMember" >
<Link to="/organization/partyMember">党员基本信息</Link>
</Menu.Item> */}
</SubMenu>
);
}
export default getNavItem;

19
web/client/src/sections/organization/reducers/index.js

@ -1,19 +0,0 @@
'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,
}

27
web/client/src/sections/organization/routes.js

@ -1,27 +0,0 @@
import { organization } from "./containers";
import { partyMember } from "./containers";
export default [
{
type: "inner",
route: {
path: '/organization',
key: 'organization',
breadcrumb: '党组织架构管理',
menuSelectKeys: ['organization'],
menuOpenKeys: ['organization'],
childRoutes: [{
path: '/user',
key: 'userManage',
menuSelectKeys: ['userManage'],
component: organization,
breadcrumb: '支委会人员',
},{
path: '/partyMember',
key: 'partyMember',
menuSelectKeys: ['partyMember'],
component: partyMember,
breadcrumb: '党员信息',
}]
},
},
];
Loading…
Cancel
Save