|
|
@@ -5,17 +5,68 @@
|
|
|
|
|
|
import React, { Component } from 'react'
|
|
|
import { connect } from 'react-redux'
|
|
|
-import CurrencyList from '../../../pages/common/currencyList/CurrencyList'
|
|
|
+import './task-todo.less'
|
|
|
+import TaskTodoItem from '../../../components/private/tasktodo/TaskTodoItem'
|
|
|
+import { isObjEmpty } from '../../../utils/common/common.util'
|
|
|
+import { message } from 'antd'
|
|
|
+import { Toast, SearchBar } from 'antd-mobile'
|
|
|
+import { fetchPostObj, fetchGet } from '../../../utils/common/fetchRequest'
|
|
|
+import { API } from '../../../configs/api.config'
|
|
|
|
|
|
class TaskTodo extends Component {
|
|
|
|
|
|
constructor () {
|
|
|
super()
|
|
|
|
|
|
- this.state = {}
|
|
|
+ this.state = {
|
|
|
+ data: [],
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
componentDidMount () {
|
|
|
+ const dataArr = [{
|
|
|
+ recorder: '李剑辉',
|
|
|
+ taskName: '费用报销单111111111111111111111111111111111111111111111111111',
|
|
|
+ statDate: '2020-09-32 15:34:32',
|
|
|
+ status: '进行中',
|
|
|
+ TaskId: 2665939,
|
|
|
+ }, {
|
|
|
+ recorder: '李剑辉',
|
|
|
+ taskName: '费用报销单',
|
|
|
+ statDate: '2020-09-38 15:34:38',
|
|
|
+ status: '进行中',
|
|
|
+ TaskId: 2665941,
|
|
|
+ }, {
|
|
|
+ recorder: '李剑辉',
|
|
|
+ taskName: '费用报销单',
|
|
|
+ statDate: '2020-09-37 15:34:37',
|
|
|
+ status: '进行中',
|
|
|
+ TaskId: 2665940,
|
|
|
+ }, {
|
|
|
+ recorder: '詹国胜',
|
|
|
+ taskName: '采购物料',
|
|
|
+ statDate: '2020-10-31 16:23:31',
|
|
|
+ status: '已结案',
|
|
|
+ TaskId: 2666002,
|
|
|
+ }]
|
|
|
+ // Toast.loading('正在获取数据', 0)
|
|
|
+ // fetchGet(API.APPCOMMON_TASKTODO)
|
|
|
+ // .then(response => {
|
|
|
+ // Toast.hide()
|
|
|
+ // // console.log('123', response)
|
|
|
+ // //message.success('保存成功')
|
|
|
+ // }).catch(error => {
|
|
|
+ // Toast.hide()
|
|
|
+ // if (typeof error === 'string') {
|
|
|
+ // message.error(error)
|
|
|
+ // } else {
|
|
|
+ // message.error('待办事项获取失败')
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+
|
|
|
+ this.setState({
|
|
|
+ data: dataArr,
|
|
|
+ })
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -24,12 +75,20 @@ class TaskTodo extends Component {
|
|
|
}
|
|
|
|
|
|
render () {
|
|
|
+ let { data } = this.state
|
|
|
+
|
|
|
return (
|
|
|
- <div>
|
|
|
- 待办
|
|
|
+ <div className="task-todo-page">
|
|
|
+ <SearchBar placeholder='搜索'
|
|
|
+ onSubmit={value => this.onSubmit(value)}/>
|
|
|
+ <TaskTodoItem rowList={data}/>
|
|
|
</div>
|
|
|
)
|
|
|
}
|
|
|
+
|
|
|
+ onSubmit = (value) => {
|
|
|
+ //console.log(value)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
let mapStateToProps = (state) => ({})
|