-
-
-
-
-
-
- {/* 用一个隐藏的input实现上传文件的必填校验 */}
- {getFieldDecorator('attachments', {
- rules: [{ required: true, message: "请上传需求文件" }], validateFirst: true
- })()}
-
-
- {helper(
- "标签:",
- "tag",
- [{ required: true, message: "请选择需求标签" }],
-
- )}
-
- {helper(
- "需求描述:",
- "remark",
- [{ required: true, message: "请输入需求描述" }],
-
- )}
-
-
-
-
-
-
-
+
+ 创客空间 >
+ 任务大厅 >
+ 发布需求
+
任务需求提交
+
+
+
+
联系方式(*必填)
+
+
+ {"神马科技股份有限公司"}
+
+
+ {helper(
+ "联系人:",
+ "contactName",
+ [{ required: true, message: "请输入联系人" }],
+
+ )}
+
+ {helper(
+ "联系电话:",
+ "contactPhone",
+ [{ required: true, message: "请输入联系电话" }],
+
, '',
{ setVisible(true) }} />
+ )}
+
+
+
+
+
+
需求内容(*必填)
+
+ 创客任务列表_2019-07-26_20-53.xlsx
+ 点击下载示例模版
+
+
+
+
选择需求所在领域
+
+
+ {
+ taskCategoryArr.map(item => {
+ return
+ })
+ }
+
+
+ {helper(
+ "",
+ "name",
+ [{ required: true, message: "请用一句话概括您要做什么?比如:开源项目网站开发,最大限制60个字符" }],
+
+ )}
+
+
+ {
+ changeHtml(html);
+ }}
+ />
+ {/* 用一个隐藏的input实现上必填校验 */}
+ {getFieldDecorator('description', {
+ rules: [{ required: true, message: "把您的需求内容补充详细一些吧,越清晰具体,任务完成质量越高哟~" }],
+ validateFirst: true
+ })()}
+
+
+
+ *
+ 注:需求发布之后,将会公开展示在交易中心。不要把与项目、客户相关等隐私信息,以及QQ号、微信号、电话号码等联系方式填写在需求中。
+
+
+
+
+ {getFieldDecorator('uploadFileNumbers', {
+ validateFirst: true
+ })()}
+
+
+
+
+
+
选择任务周期、价格和发布模式(*必填)
+
+
+
+
+
+
{ setVisible(false) }}
+ className="form-edit-modal"
+ >
+
+
+
+
+
+
+
+
+
+
)
})
diff --git a/src/military/task/taskEdit/index.scss b/src/military/task/taskEdit/index.scss
index ad5c9622f..000c8ff66 100644
--- a/src/military/task/taskEdit/index.scss
+++ b/src/military/task/taskEdit/index.scss
@@ -1,4 +1,143 @@
- .achieve-form{
- padding:24px 40px 0px 40px;
+.achieve-form {
+ padding: 24px 40px 0px 40px;
+}
+
+.partTitle {
+ color: #05101a;
+ font-size: 16px;
+ position: relative;
+ height: 20px;
+ line-height: 20px;
+ margin-bottom: 20px !important;
+}
+
+.partTitle:before {
+ position: absolute;
+ left: -10px;
+ top: 3px;
+ width: 2px;
+ height: 16px;
+ background: #459be6;
+ content: "";
+}
+
+.color-red {
+ color: red;
+}
+
+.areaDiv {
+ overflow-y: hidden;
+}
+
+.choose-button {
+ float: left;
+ border: 1px solid #eee;
+ border-radius: 0px;
+ height: 28px;
+ line-height: 28px;
+ padding: 0px 12px;
+ color: #656565;
+ margin: 0px 10px 10px;
+ cursor: pointer;
+}
+
+.choose-button.active {
+ color: #4cacff !important;
+ border: 1px solid #4cacff;
+}
+
+.gray-form {
+ .ant-form-item-required {
+ color: #999;
}
-
+}
+
+.contact-input {
+ max-width: 300px;
+}
+
+.editPhone {
+ margin-left: 1rem;
+ padding: 0.25em;
+ font-size: 1rem;
+ color: #fff;
+ background: #1484ef;
+ border-radius: 50%;
+ cursor: pointer;
+}
+
+.number-input {
+ width: 200px;
+ .ant-input-number-input {
+ padding-right: 1em;
+ text-align: right;
+ }
+}
+
+.task-setting-days {
+ display: flex;
+ flex-flow: row wrap;
+ text-align: center;
+}
+
+.timing_task {
+ flex: 1px;
+ position: relative;
+ line-height: 2;
+ &:before {
+ position: absolute;
+ content: "";
+ width: 100%;
+ height: 2px;
+ background: #efefef;
+ top: 0px;
+ left: 0px;
+ }
+}
+
+.inline-span:before {
+ position: absolute;
+ content: "";
+ width: 10px;
+ height: 10px;
+ border-radius: 50%;
+ top: -4px;
+ left: 50%;
+ margin-left: -6px;
+ background: #bfbfbf;
+ z-index: 1;
+}
+
+.inline-span.active {
+ font-size: 16px;
+ color: #333;
+
+ &:before {
+ background: #4cacff;
+ }
+}
+
+.date-input {
+ margin-right: 0.4rem;
+}
+
+.tel-input{
+ width: 290px;
+}
+.code-input{
+ width: 180px;
+}
+
+.no-label {
+ display: inline-block;
+ .ant-form-explain {
+ white-space: nowrap;
+ }
+}
+.days-word {
+ line-height: 40px;
+}
+
+.ant-modal-footer{
+ text-align: center;
+}
\ No newline at end of file
diff --git a/src/military/task/taskList/index.jsx b/src/military/task/taskList/index.jsx
index f4fc6107e..c294afb0c 100644
--- a/src/military/task/taskList/index.jsx
+++ b/src/military/task/taskList/index.jsx
@@ -1,52 +1,95 @@
import React, { useEffect, useState } from 'react';
-import { Pagination, Icon, Input, Button } from 'antd';
+import { Pagination, Input, Button } from 'antd';
+import moment from 'moment';
import ChooseNav from '../../components/chooseNav';
import SortBox from '../../components/sortBox';
-import ItemList from '../../components/itemListTask';
+import ItemListTask from '../../components/itemListTask';
import Nodata from '../../../forge/Nodata';
-import { taskType, taskStatus } from '../static';
-import { getTaskList } from '../api';
-import './index.scss';
+import { taskTimeArr, taskStatusArr, sortArr, taskModeIdArr } from '../static';
+import { getTaskList, getTaskCategory } from '../api';
const Search = Input.Search;
-export default ({ history }) => {
-
- const [type, setType] = useState(undefined);
- const [title, setTitle] = useState(undefined);
+export default ({ history, current_user }) => {
+ console.log(current_user);
+ const [taskCategoryArr, setTaskCategoryArr] = useState([]);
+ const [categoryId, setCategoryId] = useState('');
+ const [taskModeId, setTaskModeId] = useState('');
+ const [expiredStartTime, setExpiredStartTime] = useState('');
+ const [expiredEndTime, setExpiredEndTime] = useState('');
+ const [status, setStatus] = useState('');
+ const [searchInput, setSearchInput] = useState('');
const [orderBy, setOrderBy] = useState('');
const [curPage, setCurPage] = useState(1);
const [total, setTotal] = useState(0);
- const [taskList, setAchiveList] = useState([]);
+ const [taskList, setTaskList] = useState([]);
+ useEffect(() => {
+ getTaskCategory().then(data => {
+ if (data) {
+ for (const item of data) {
+ item.dicItemCode = item.id;
+ item.dicItemName = item.name;
+ }
+ setTaskCategoryArr(data);
+ }
+ });
+ }, []);
useEffect(() => {
const params = {
+ categoryId,
+ taskModeId,
+ expiredStartTime,
+ expiredEndTime,
+ status,
+ searchInput,
orderBy,
curPage,
- isChecked: 1,
pageSize: 10,
- status: 1,
- type,
- title,
- flag: 1, //后台管理查询:2;前台展示:1
};
+
getTaskList(params).then(data => {
- setAchiveList(data.rows);
- setTotal(data.total);
+ if (data) {
+ setTaskList(data.rows);
+ setTotal(data.total);
+ }
})
- }, [type, title, orderBy, curPage]);
+ }, [categoryId, taskModeId, expiredStartTime, expiredEndTime, status, searchInput, orderBy, curPage]);
function changeOptionId(option, type) {
- console.log(option);
- setType(option.code || '');
+ if (type === 'taskCategory') {
+ setCategoryId(option.dicItemCode);
+ } else if (type === 'taskModeId') {
+ setTaskModeId(option.dicItemCode);
+ } else if (type === 'taskTime') {
+ if (option.dicItemCode) {
+ let nowTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss');
+ let nextTime = moment(new Date().setDate(new Date().getDate() + option.dicItemCode)).format('YYYY-MM-DD HH:mm:ss');
+ setExpiredStartTime(nowTime);
+ setExpiredEndTime(nextTime);
+ } else {
+ setExpiredStartTime('');
+ setExpiredEndTime('');
+ }
+ } else if (type === 'taskStatus') {
+ setStatus(option.dicItemCode);
+ }
}
function changeSort(sortType) {
- // setOrderBy(sortType);
- setCurPage(1);
console.log(sortType);
+ let sortValue = '';
+ if (sortType.type !== 'default') {
+ if (sortType.desc) {
+ sortValue = sortType.type + 'Desc';
+ } else {
+ sortValue = sortType.type + 'Asc';
+ }
+ }
+ setOrderBy(sortValue);
+ setCurPage(1);
}
function taskClick(id) {
@@ -62,18 +105,18 @@ export default ({ history }) => {
@@ -81,7 +124,7 @@ export default ({ history }) => {
key={'taskTime'}
type={'taskTime'}
title={'任务时限'}
- options={taskType}
+ options={taskTimeArr}
changeOptionId={changeOptionId}
/>
@@ -89,7 +132,7 @@ export default ({ history }) => {
key={'taskStatus'}
type={'taskStatus'}
title={'任务状态'}
- options={taskStatus}
+ options={taskStatusArr}
changeOptionId={changeOptionId}
/>
@@ -98,59 +141,36 @@ export default ({ history }) => {
setTitle(value)} />
+ placeholder="请输入任务编号/任务名称关键字"
+ onSearch={(value) => setSearchInput(value)} />
-
{ setCurPage(page) }}
/>
- {taskList.length > 0 ?
-
{ setCurPage(page) }}
- current={curPage}
- total={total}
- showTotal={total => `共 ${total} 条`}
- />
- :
}
)
diff --git a/src/military/task/taskList/index.scss b/src/military/task/taskList/index.scss
deleted file mode 100644
index 7aa398357..000000000
--- a/src/military/task/taskList/index.scss
+++ /dev/null
@@ -1,5 +0,0 @@
-.center-right-but{
- .ant-input-group-addon{
- border: 0 !important;
- }
-}