diff --git a/web/client/src/app.js b/web/client/src/app.js
index 3ae1d4f..edef086 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,Organization
+ Auth, AlarmConfure, Article, Party
} from './sections';
import Layout from './layout';
@@ -19,7 +19,7 @@ function App(props) {
return (
);
}
diff --git a/web/client/src/sections/article/containers/default.js b/web/client/src/sections/article/containers/default.js
deleted file mode 100644
index e69de29..0000000
diff --git a/web/client/src/sections/article/containers/edit-article.js b/web/client/src/sections/article/containers/edit-article.js
deleted file mode 100644
index d00d81d..0000000
--- a/web/client/src/sections/article/containers/edit-article.js
+++ /dev/null
@@ -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 = (
-
- {/* {uploading ?
:
} */}
-
:
}>文件上传
-
- );
-
- 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 (
-
-
-
-
-
-
-
-
{
- // if (inputTxtLength > txtLength[tabKey])
- // return Promise.reject(`最多输入${txtLength[tabKey]}个字符`);
- // // else if (inputTxtLength == 0)
- // // return Promise.reject(`请输入文章内容`)
- // else return Promise.resolve();
- // },
- // },
- ]}
- wrapperCol={{ span: 24 }}
- >
-
-
- {/*
- {state.inputTxtLength}/{txtLength[tabKey]}
- */}
-
-
- {
- dispatch({ type: "imageUrl", payload: null });
- dispatch({ type: "imgSavePath", payload: null });
- return true;
- }}
- fileList={fileList}
- >
- {fileList.length == 0 ? uploadButton : ''}
-
-
-
-
- {
-
- {/* {tabKey == 1 ? : ''} */}
-
-
-
-
- }
-
-
-
-
- );
- }
-
- 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(" -1) {
- var img_obj = document.getElementsByTagName("img");
- img_obj[img_obj.length - 1].style.width = "100%";
- }
- }
- }, 300);
- };
-
- return (
-
- {/*
{ props.dispatch(push(`/article/modify`)) }}>
-
返回
-
*/}
-
- {renderArticalContent()}
-
-
- );
-};
-
-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: ,
- 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: "微软雅黑",
- },
-];
diff --git a/web/client/src/sections/article/containers/index.js b/web/client/src/sections/article/containers/index.js
index 8892da5..472a88c 100644
--- a/web/client/src/sections/article/containers/index.js
+++ b/web/client/src/sections/article/containers/index.js
@@ -17,40 +17,31 @@ export const Default = (props) => {
const tableActionRef = useRef();
const columns = [
{
- title: "标题",
+ title: "项目计划",
dataIndex: "name",
key: "name",
- order: 2,
- fieldProps: {
- onChange: (value, cs) => {
- setHeading(value.currentTarget.value);
- },
- placeholder: "请输入标题进行搜索",
- getPopupContainer: (triggerNode) => triggerNode.parentNode,
- },
+ hideInSearch: true,
render: (dom, record) => {
return record.title;
},
},
{
- title: "类别",
+ title: "投入人力",
key: "category",
dataIndex: "category",
- valueType: "category",
hideInSearch: true,
render: (dom, record) => {
return record.type === 0
? "活动风采"
: record.type === 1
- ? "党建资讯"
- : "工会资讯";
+ ? "党建资讯"
+ : "工会资讯";
},
},
{
- title: "发布人",
+ title: "构建时间",
key: "since",
dataIndex: "createdAt",
- valueType: "dateTime",
hideInSearch: true,
render: (dom, record) => {
return record.publisher === null ? "SuperAdmin" : record.publisher;
@@ -60,74 +51,23 @@ export const Default = (props) => {
title: "发布时间",
key: "dateRange",
dataIndex: "createdAtRange",
- valueType: "dateRange",
- 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,
- },
+ hideInSearch: true,
render: (dom, record) => {
- return record.publishTime === null
- ? "--"
- : [moment(record.publishTime).format("YYYY-MM-DD")];
+ return record.publisher === null ? "SuperAdmin" : record.publisher;
},
},
{
- title: "状态",
+ title: "目前进度",
dataIndex: "regionName",
valueType: "select",
- initialValue: null,
+ hideInSearch: true,
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) => {
return record.status === 0
? "草稿"
: record.status === 1
- ? "已发布"
- : "已撤回";
+ ? "已发布"
+ : "已撤回";
},
},
{
@@ -137,34 +77,7 @@ export const Default = (props) => {
valueType: "dateTime",
hideInSearch: true,
render: (dom, record) => {
- return record.status === 0 ? (
-
- ) : record.status === 1 ? (
- {
- withdRew(record);
- }}
- >
- 撤回
-
- ) : (
+ return (
- );
+ )
+
},
},
{
@@ -199,7 +113,7 @@ export const Default = (props) => {
dispatch(push(`article/update/post`));
}}
>
- 新增资讯
+ 项目信息导入
);
},
@@ -219,32 +133,17 @@ export const Default = (props) => {
dispatch(push(`article/update/put`));
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 (
{
- setHeading();
- setDay(null);
- setState(null);
+ search={{
+ optionRender: false,
+ collapsed: false,
}}
request={async (params) => {
let query = {
@@ -256,9 +155,9 @@ export const Default = (props) => {
publishTime:
day && day.length && day[0].trim() != ""
? JSON.stringify([
- moment(day[0]).startOf("day"),
- moment(day[1]).endOf("day"),
- ])
+ moment(day[0]).startOf("day"),
+ moment(day[1]).endOf("day"),
+ ])
: null,
};
const res = await dispatch(Action.getDataList(query));
@@ -285,3 +184,12 @@ Default.propTypes = {
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/article/nav-item.js b/web/client/src/sections/article/nav-item.js
index e58b936..d970b83 100644
--- a/web/client/src/sections/article/nav-item.js
+++ b/web/client/src/sections/article/nav-item.js
@@ -6,7 +6,7 @@ import { BarChartOutlined } from '@ant-design/icons';
export function getNavItem() {
return (
}>
- 资讯管理
+ 项目信息
);
}
diff --git a/web/client/src/sections/article/routes.js b/web/client/src/sections/article/routes.js
index 154daf2..df596a1 100644
--- a/web/client/src/sections/article/routes.js
+++ b/web/client/src/sections/article/routes.js
@@ -1,5 +1,4 @@
import Container from './containers';
-import ArticleModify from "./containers/edit-article"
export default [
{
type: 'inner',
@@ -9,12 +8,5 @@ export default [
component: Container,
}
},
- {
- type: 'inner',
- route: {
- key: 'articleUpdate',
- path: '/article/update/:state',// type: artical/message state:post/put
- component: ArticleModify
- }
- }
+
];
diff --git a/web/client/src/sections/index.js b/web/client/src/sections/index.js
index 4f713d7..c5b4244 100644
--- a/web/client/src/sections/index.js
+++ b/web/client/src/sections/index.js
@@ -2,7 +2,6 @@ import Auth from './auth';
import AlarmConfure from './homePage';
import Article from './article'
import Party from './party'
-import Organization from './organization'
export {
- Auth, AlarmConfure, Article, Party,Organization
+ Auth, AlarmConfure, Article, Party
};
diff --git a/web/client/src/sections/organization/actions/index.js b/web/client/src/sections/organization/actions/index.js
deleted file mode 100644
index 1e6b011..0000000
--- a/web/client/src/sections/organization/actions/index.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-import { editLaborParty } from './party'
-
-export default {
- editLaborParty
-}
\ No newline at end of file
diff --git a/web/client/src/sections/organization/actions/party.js b/web/client/src/sections/organization/actions/party.js
deleted file mode 100644
index 673a3ed..0000000
--- a/web/client/src/sections/organization/actions/party.js
+++ /dev/null
@@ -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' }
- });
-}
diff --git a/web/client/src/sections/organization/components/OutgoingVisibleModel.js b/web/client/src/sections/organization/components/OutgoingVisibleModel.js
deleted file mode 100644
index 1237998..0000000
--- a/web/client/src/sections/organization/components/OutgoingVisibleModel.js
+++ /dev/null
@@ -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 (
-
- {
- 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}
- >
-
- {typecard === "Outgoing" ? (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ) : (
- ""
- )}
- {typecard === "Outgoingss" ? (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ) : (
- ""
- )}
- {typecard == "outexamine" ? (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ) : (
- ""
- )}
-
-
-
- );
-};
-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);
diff --git a/web/client/src/sections/organization/components/edit-party.js b/web/client/src/sections/organization/components/edit-party.js
deleted file mode 100644
index e75ea82..0000000
--- a/web/client/src/sections/organization/components/edit-party.js
+++ /dev/null
@@ -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 (
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-
-//
-//
-// )
-// }
-
-// EditParty.propTypes = {
-// visible: PropTypes.bool,
-// handleCancel: PropTypes.func,
-// handleOk: PropTypes.func,
-// editData: PropTypes.object
-// }
-
-// export default EditParty
\ No newline at end of file
diff --git a/web/client/src/sections/organization/components/index.less b/web/client/src/sections/organization/components/index.less
deleted file mode 100644
index 9d2abb5..0000000
--- a/web/client/src/sections/organization/components/index.less
+++ /dev/null
@@ -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;
- }
-}
\ No newline at end of file
diff --git a/web/client/src/sections/organization/components/memberVisibleModel.js b/web/client/src/sections/organization/components/memberVisibleModel.js
deleted file mode 100644
index f65583c..0000000
--- a/web/client/src/sections/organization/components/memberVisibleModel.js
+++ /dev/null
@@ -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 (
-
-
-
{
- 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}
- >
-
- {typecard == "compile" ? (
-
-
- {" "}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 是
- 否
-
-
-
-
-
-
-
-
- 是
- 否
-
-
-
-
-
-
- ) : (
- ""
- )}
- {typecard == "modification" ? (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ) : (
- ""
- )}
- {typecard == "examine" ? (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ) : (
- ""
- )}
-
-
-
-
- );
-};
-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);
diff --git a/web/client/src/sections/organization/components/newlyVisibleModel.js b/web/client/src/sections/organization/components/newlyVisibleModel.js
deleted file mode 100644
index 40f7827..0000000
--- a/web/client/src/sections/organization/components/newlyVisibleModel.js
+++ /dev/null
@@ -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 (
-
- {
- 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}
- >
-
- {typecard == "compile" ? (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ) : (
- ""
- )}
- {typecard == "modification" ? (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ) : (
- ""
- )}
- {typecard == "examine" ? (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ) : (
- ""
- )}
-
-
-
-
- );
-};
-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);
diff --git a/web/client/src/sections/organization/containers/index.js b/web/client/src/sections/organization/containers/index.js
deleted file mode 100644
index 70793e9..0000000
--- a/web/client/src/sections/organization/containers/index.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-
-import organization from './organization';
-import partyMember from './partyMember';
-
-export {organization,partyMember};
\ No newline at end of file
diff --git a/web/client/src/sections/organization/containers/organization.js b/web/client/src/sections/organization/containers/organization.js
deleted file mode 100644
index b78aeca..0000000
--- a/web/client/src/sections/organization/containers/organization.js
+++ /dev/null
@@ -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 1
- // }
- // },
- {
- title: '姓名',
- dataIndex: 'name',
- key: 'name',
- render: (dom, record) => {
- return {record.name}
- },
- fieldProps: {
- onChange: (value, cs) => {
- setNameSou(value.currentTarget.value)
- },
- placeholder: '请输入姓名进行搜索',
- getPopupContainer: (triggerNode) => triggerNode.parentNode,
- }
- },
- {
- title: '性别',
- dataIndex: 'sexuality',
- key: 'sexuality',
- search: false,
- render: (dom, record) => {
- return {record.sexuality}
- },
-},
-{
- title: '党内职务',
- dataIndex: 'mode',
- key: 'mode',
- search: false,
- render: (dom, record) => {
- return {record.partyPosts}
- },
-},
-{
- title: '任职方式',
- dataIndex: 'mode',
- key: 'mode',
- search: false,
- render: (dom, record) => {
- return {record.howPositions}
- },
-},{
- title: '任职时间',
- dataIndex: 'mode',
- key: 'mode',
- search: false,
- render: (dom, record) => {
- return {moment(record.employmentTime).format("YYYY-MM-DD")}
- },
-},{
- title: '联系电话',
- dataIndex: 'mode',
- key: 'mode',
- search: false,
- render: (dom, record) => {
- return {record.phone}
- },
-},
- {
- key: 'ation',
- title: '操作',
- search: false,
- width:150,
- render: (text, record) => {
- return
- }
- }
- , {
- key: "direction",
- hideInTable: true,
- dataIndex: "direction",
- order: 6,
- renderFormItem: (item, { type, defaultRender, ...rest }) => {
- return (
-
-
- );
- },
- },
- ]
- return (
-
-
中共江西飞尚科技有限公司支部委员会
-
{
- 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 : '',
- };
- }}
- >
-
-
-
-
-
- )
-}
-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 1
- // }
- // },
- {
- key: 'name',
- dataIndex: 'name',
- title: '姓名',
- search: false,
- render: (dom, record) => {
- return {record.name}
- },
- },
- {
- title: '性别',
- dataIndex: 'sexuality',
- key: 'sexuality',
- search: false,
- render: (dom, record) => {
- return {record.sexuality}
-
- },
- },
- {
- key: 'laborUnion',
- dataIndex: 'laborUnion',
- title: '离任前党内职务',
- search: false,
- render: (dom, record) => {
- return {record.partyPosts}
- },
- }, {
- key: 'laborUnion',
- dataIndex: 'laborUnion',
- title: '任职方式',
- search: false,
- render: (dom, record) => {
- return {record.howPositions}
- },
- }, {
- key: 'laborUnion',
- dataIndex: 'laborUnion',
- title: '离任时间',
- search: false,
- render: (dom, record) => {
- return { moment(record.leaveTime).format("YYYY-MM-DD")}
- },
- }, {
- key: 'laborUnion',
- dataIndex: 'laborUnion',
- title: '离任原因',
- search: false,
- render: (dom, record) => {
- return {record.leavingReason}
- },
- },
- {
- key: 'ation',
- title: '操作',
- search: false,
- width:150,
- render: (text, record) => {
- return
- }
- }
- ]
- return 离任领导列表
-
{
-
- setName(null)
- }}
- form={{
- submitter: false
- }}
- >
-
-}
-Default.propTypes = {
- second: PropTypes.third
-}
-
-const mapStateToProps = (state) => ({})
-
-
-export default connect(mapStateToProps)(Default)
\ No newline at end of file
diff --git a/web/client/src/sections/organization/containers/partyMember.js b/web/client/src/sections/organization/containers/partyMember.js
deleted file mode 100644
index a3280cb..0000000
--- a/web/client/src/sections/organization/containers/partyMember.js
+++ /dev/null
@@ -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 1
- // }
- // },
- {
- title: '姓名',
- dataIndex: 'name',
- key: 'name',
- render: (dom, record) => {
- return {record.name}
- },
- fieldProps: {
- onChange: (value, cs) => {
- setNameSou(value.currentTarget.value)
- },
- placeholder: '请输入姓名进行搜索',
- getPopupContainer: (triggerNode) => triggerNode.parentNode,
- }
- },
- {
- title: '性别',
- dataIndex: 'sexuality',
- key: 'sexuality',
- search: false,
- render: (dom, record) => {
- return {record.sexuality}
- },
-},
-{
- title: '党内职务',
- dataIndex: 'mode',
- key: 'mode',
- search: false,
- render: (dom, record) => {
- return {record.partyPosts}
- },
-},
-{
- title: '任职方式',
- dataIndex: 'mode',
- key: 'mode',
- search: false,
- render: (dom, record) => {
- return {record.howPositions}
- },
-},{
- title: '任职时间',
- dataIndex: 'mode',
- key: 'mode',
- search: false,
- render: (dom, record) => {
- return {moment(record.employmentTime).format("YYYY-MM-DD")}
- },
-},{
- title: '联系电话',
- dataIndex: 'mode',
- key: 'mode',
- search: false,
- render: (dom, record) => {
- return {record.phone}
- },
-},
- {
- key: 'ation',
- title: '操作',
- search: false,
- width:150,
- render: (text, record) => {
- return
- }
- }
- , {
- key: "direction",
- hideInTable: true,
- dataIndex: "direction",
- order: 6,
- renderFormItem: (item, { type, defaultRender, ...rest }, form, record) => {
- return (
-
-
- );
- },
- },
- ]
- const memberList=[{name:'党员数量',number:12},{name:'预备党员',number:1},{name:'女党员',number:2},{name:'少数民族党员',number:1},{name:'大专以上党员',number:12}]
- return (
-
-
{memberList.map((item) => {
- return
{item.name}
{ item.number}
- })}
-
{
- 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 : '',
- };
- }}
- >
-
-
-
- )
-}
-// PartyMember.propTypes = {
-// second: PropTypes.third
-// }
-const mapStateToProps = (state) => ({})
-export default connect(mapStateToProps)(PartyMember)
\ No newline at end of file
diff --git a/web/client/src/sections/organization/index.js b/web/client/src/sections/organization/index.js
deleted file mode 100644
index a4b42f6..0000000
--- a/web/client/src/sections/organization/index.js
+++ /dev/null
@@ -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
-};
diff --git a/web/client/src/sections/organization/nav-item.js b/web/client/src/sections/organization/nav-item.js
deleted file mode 100644
index 6f442a8..0000000
--- a/web/client/src/sections/organization/nav-item.js
+++ /dev/null
@@ -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 (
- } title={'党组织架构管理'}>
-
- 支委会人员
-
- {/*
- 党员基本信息
- */}
-
- );
-}
-
-export default getNavItem;
diff --git a/web/client/src/sections/organization/reducers/index.js b/web/client/src/sections/organization/reducers/index.js
deleted file mode 100644
index 10ebcbf..0000000
--- a/web/client/src/sections/organization/reducers/index.js
+++ /dev/null
@@ -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,
-}
\ No newline at end of file
diff --git a/web/client/src/sections/organization/routes.js b/web/client/src/sections/organization/routes.js
deleted file mode 100644
index 27dd4bc..0000000
--- a/web/client/src/sections/organization/routes.js
+++ /dev/null
@@ -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: '党员信息',
- }]
- },
- },
-];