From ac43f9604b44acd8b2666c33c814b76d5a9d96f6 Mon Sep 17 00:00:00 2001 From: xingyongchun Date: Fri, 2 Dec 2022 11:06:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=BC=96=E8=BE=91=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../article/components/import_model.js | 3 +- .../src/sections/homePage/containers/index.js | 7 +- .../personnel/components/import_model.js | 3 +- .../sections/personnel/components/modeal.js | 1 - .../sections/personnel/containers/index.js | 119 ++++++++++-------- .../src/sections/wait/components/modeal.js | 8 +- .../src/sections/wait/containers/index.js | 3 +- 7 files changed, 79 insertions(+), 65 deletions(-) diff --git a/web/client/src/sections/article/components/import_model.js b/web/client/src/sections/article/components/import_model.js index 95af0de..da54db7 100644 --- a/web/client/src/sections/article/components/import_model.js +++ b/web/client/src/sections/article/components/import_model.js @@ -120,6 +120,7 @@ const ImportUser = (props) => { let build_time = String(d["构建时间"]).trim(); let publish_time = String(d["发布时间"]).trim(); let progress = String(d["目前进度"]).trim(); + let o_name_project='' if (!name_project || !part_people_in || !build_time || !publish_time||!progress) { error(`第${i + 1} 行有空值,请填写后重新上传`); return; @@ -132,7 +133,7 @@ const ImportUser = (props) => { name_project, part_people, build_time, - publish_time,progress + publish_time,progress,o_name_project }); } if (postData.length) { diff --git a/web/client/src/sections/homePage/containers/index.js b/web/client/src/sections/homePage/containers/index.js index c54d20c..033905e 100644 --- a/web/client/src/sections/homePage/containers/index.js +++ b/web/client/src/sections/homePage/containers/index.js @@ -99,6 +99,7 @@ function Management(props) { key: "md", dataIndex: "md", hideInSearch: true, + width: 150, render: (dom, record) => { return record.md }, @@ -196,15 +197,15 @@ function Management(props) {
本周在研项目
/Research project this week
- +
人员情况
/Information on Personnel
- -
+ +
diff --git a/web/client/src/sections/personnel/components/import_model.js b/web/client/src/sections/personnel/components/import_model.js index 362e984..d15f16c 100644 --- a/web/client/src/sections/personnel/components/import_model.js +++ b/web/client/src/sections/personnel/components/import_model.js @@ -121,13 +121,14 @@ const ImportUser = (props) => { let fd = String(d["周五"]).trim(); let sd = String(d["周六"]).trim(); let ssd = String(d["周日"]).trim(); + let o_name_people='' if (!name_people || !post_people || !md || !td||!wd||!thd||!fd||!sd||!ssd) { error(`第${i + 1} 行有空值,请填写后重新上传`); return; } postData.push({ name_people, - post_people,md,td,wd,thd,fd,sd,ssd + post_people,md,td,wd,thd,fd,sd,ssd,o_name_people }); } diff --git a/web/client/src/sections/personnel/components/modeal.js b/web/client/src/sections/personnel/components/modeal.js index 911de20..efd5da3 100644 --- a/web/client/src/sections/personnel/components/modeal.js +++ b/web/client/src/sections/personnel/components/modeal.js @@ -5,7 +5,6 @@ import dayjs from 'dayjs'; function modeal(props) { const [form] = Form.useForm(); const { visible, handleOk, handleCancel, editData } = props - console.log(editData) useEffect(() => { if (editData && visible) { form.setFieldsValue({ diff --git a/web/client/src/sections/personnel/containers/index.js b/web/client/src/sections/personnel/containers/index.js index 30c7501..bf37196 100644 --- a/web/client/src/sections/personnel/containers/index.js +++ b/web/client/src/sections/personnel/containers/index.js @@ -3,12 +3,12 @@ import React, { useEffect, useState, useRef } from "react"; import { connect } from "react-redux"; import { Button, Popconfirm } from "antd"; import ProTable from "@ant-design/pro-table"; -import {postOutPeople,postInPeople,delCancel} from "../actions/article"; +import { postOutPeople, postInPeople, delCancel } from "../actions/article"; import moment from "moment"; import { push } from "react-router-redux"; import { Scroller } from "$components"; -import ProjectModeal from '../components/modeal' -import ImportModeal from '../components/import_model' +import ProjectModeal from "../components/modeal"; +import ImportModeal from "../components/import_model"; export const Default = (props) => { const { dispatch } = props; @@ -37,7 +37,7 @@ export const Default = (props) => { dataIndex: "post_people", hideInSearch: true, render: (dom, record) => { - return record.post_people + return record.post_people; }, }, { @@ -46,7 +46,7 @@ export const Default = (props) => { dataIndex: "md", hideInSearch: true, render: (dom, record) => { - return record.md + return record.md; }, }, { @@ -55,47 +55,52 @@ export const Default = (props) => { dataIndex: "td", hideInSearch: true, render: (dom, record) => { - return record.td + return record.td; }, - },{ + }, + { title: "周三", key: "wd", dataIndex: "wd", hideInSearch: true, render: (dom, record) => { - return record.wd + return record.wd; }, - },{ + }, + { title: "周四", key: "thd ", dataIndex: "thd ", hideInSearch: true, render: (dom, record) => { - return record.thd + return record.thd; }, - },{ + }, + { title: "周五", key: "fd", dataIndex: "fd", hideInSearch: true, render: (dom, record) => { - return record.fd + return record.fd; }, - },{ + }, + { title: "周六", key: "sd", dataIndex: "sd", hideInSearch: true, render: (dom, record) => { - return record.sd + return record.sd; }, - },{ + }, + { title: "周日", key: "ssd", dataIndex: "ssd", hideInSearch: true, render: (dom, record) => { - return record.ssd + return record.ssd; }, }, { @@ -123,8 +128,7 @@ export const Default = (props) => { - ) - + ); }, }, { @@ -138,7 +142,7 @@ export const Default = (props) => { type="primary" style={{ width: "200px" }} onClick={() => { - setImportVisible(true) + setImportVisible(true); }} > 项目信息导入 @@ -148,33 +152,36 @@ export const Default = (props) => { }, ]; const handleCancel = () => { - setVisible(false) + setVisible(false); tableActionRef.current.reload(); - } + }; const handOk = (values) => { - const query = [{ - name_people: values.name_people, - post_people: values.post_people, - md: values.md, - td: values.td, - wd: values.wd, - thd: values.thd, - fd: values.fd, - sd: values.sd, - ssd: values.ssd, - o_name_people:editData?.name_people, - }]; + const query = [ + { + name_people: values.name_people, + post_people: values.post_people, + md: values.md, + td: values.td, + wd: values.wd, + thd: values.thd, + fd: values.fd, + sd: values.sd, + ssd: values.ssd, + o_name_people: editData?.name_people, + }, + ]; dispatch(postInPeople(query)).then((res) => { if (res.success) { handleCancel(); + console.log(res); // tableActionRef.current.reload(); } }); - } + }; const importHandleCancel = () => { - setImportVisible(false) + setImportVisible(false); tableActionRef.current.reload(); - } + }; //删除资讯 const delDataList = (record) => { const query = { @@ -186,30 +193,30 @@ export const Default = (props) => { if (res.success) { // 刷新 // tableActionRef.current.reload(); - handleCancel() + handleCancel(); } }); }; //编辑 const editor = (record) => { - setVisible(true) - setEditData(record) + setVisible(true); + setEditData(record); }; return (
- { + request={async (params) => { const res = await dispatch(postOutPeople()); - + setCounts(res.payload.data.projects); return { ...res, @@ -222,8 +229,17 @@ export const Default = (props) => { }} /> - - + +
); }; @@ -236,11 +252,10 @@ 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 + { 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" }, +]; diff --git a/web/client/src/sections/wait/components/modeal.js b/web/client/src/sections/wait/components/modeal.js index ac28946..4db2f76 100644 --- a/web/client/src/sections/wait/components/modeal.js +++ b/web/client/src/sections/wait/components/modeal.js @@ -63,13 +63,9 @@ function modeal(props) { - +
{ title: '评估工时', dataIndex: 'consum_time', key: 'consum_time', - align: 'center' + align: 'center', + hideInSearch: true, }, { title: "处理进度",