Browse Source

提交编辑增加问题

master
xingyongchun 2 years ago
parent
commit
ac43f9604b
  1. 3
      web/client/src/sections/article/components/import_model.js
  2. 7
      web/client/src/sections/homePage/containers/index.js
  3. 3
      web/client/src/sections/personnel/components/import_model.js
  4. 1
      web/client/src/sections/personnel/components/modeal.js
  5. 117
      web/client/src/sections/personnel/containers/index.js
  6. 8
      web/client/src/sections/wait/components/modeal.js
  7. 3
      web/client/src/sections/wait/containers/index.js

3
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) {

7
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) {
<div className={CX("index-main-box-title")}>本周在研项目</div>
<div className={CX("index-main-box-en")}>/Research project this week</div>
<Spin spinning={false}>
<Table dataSource={projectData} columns={projectCol} size="middle" pagination={false} scroll={{x:500}}/>
<Table dataSource={projectData} columns={projectCol} size="middle" pagination={false} scroll={{x:800}}/>
</Spin>
</div>
<div className={CX("index-main-box")}>
<img className={CX("index-main-box-point")} src={pointImg} />
<div className={CX("index-main-box-title")}>人员情况</div>
<div className={CX("index-main-box-en")}>/Information on Personnel</div>
<Scroller containerId={"article-container-query"} height={"80%"}>
<Table dataSource={peopleData} columns={peopleCol} size="middle" pagination={false} scroll={{ x: 500 }} />
<Scroller containerId={"article-container-query"} height={"90%"}>
<Table dataSource={peopleData} columns={peopleCol} size="middle" pagination={false} scroll={{ x: 1000 }} />
</Scroller>
</div>

3
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
});
}

1
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({

117
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) => {
<Button type="link">删除</Button>
</Popconfirm>
</div>
)
);
},
},
{
@ -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,28 +193,28 @@ export const Default = (props) => {
if (res.success) {
// 刷新
// tableActionRef.current.reload();
handleCancel()
handleCancel();
}
});
};
//编辑
const editor = (record) => {
setVisible(true)
setEditData(record)
setVisible(true);
setEditData(record);
};
return (
<div style={{ height: "100%" }}>
<Scroller containerId={"article-container-query"} height={"100%"}>
<ProTable
<ProTable
actionRef={tableActionRef}
columns={columns}
options={false}
dataSource={counts||[]}
dataSource={counts || []}
search={{
optionRender: false,
collapsed: false,
}}
request={async(params) => {
request={async (params) => {
const res = await dispatch(postOutPeople());
setCounts(res.payload.data.projects);
@ -222,8 +229,17 @@ export const Default = (props) => {
}}
/>
</Scroller>
<ProjectModeal visible={visible} handleOk={handOk} editData={editData} handleCancel={handleCancel}></ProjectModeal>
<ImportModeal importVisible={importVisible} handleCancel={importHandleCancel} editData={editData}></ImportModeal>
<ProjectModeal
visible={visible}
handleOk={handOk}
editData={editData}
handleCancel={handleCancel}
></ProjectModeal>
<ImportModeal
importVisible={importVisible}
handleCancel={importHandleCancel}
editData={editData}
></ImportModeal>
</div>
);
};
@ -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' }
]
{ 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" },
];

8
web/client/src/sections/wait/components/modeal.js

@ -63,13 +63,9 @@ function modeal(props) {
<Form.Item
label="目前进度"
name="progress"
rules={[{ required: true, message: '请选择进度' }]}
rules={[{ required: true, message: '请填写进度' }]}
>
<Select><Select.Option value="需求评审中">需求评审中</Select.Option>
<Select.Option value="研发中">研发中</Select.Option>
<Select.Option value="测试中">测试中</Select.Option>
<Select.Option value="已发布">已发布</Select.Option>
</Select>
<Input/>
</Form.Item>
<Form.Item noStyle={true}>
<div style={{

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

@ -48,7 +48,8 @@ export const Default = (props) => {
title: '评估工时',
dataIndex: 'consum_time',
key: 'consum_time',
align: 'center'
align: 'center',
hideInSearch: true,
},
{
title: "处理进度",

Loading…
Cancel
Save