Merge branch 'master' of http://118.178.224.202:3000/ewide/ewide_core
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
const urls = {
|
||||
houseLogList: '/houseLog/list',
|
||||
houseLogListByInfoId: '/houseLog/listByInfoId',
|
||||
houseLogListByTaskId: '/houseLog/listByTaskId',
|
||||
}
|
||||
|
||||
export default urls
|
||||
@@ -7,6 +7,7 @@ import houseTask from './houseTask'
|
||||
import houseInfo from './houseInfo'
|
||||
import houseQuery from './houseQuery'
|
||||
import houseCompany from './houseCompany'
|
||||
import houseLog from './houseLog'
|
||||
|
||||
const urls = {
|
||||
...houseProjectInfo,
|
||||
@@ -17,7 +18,8 @@ const urls = {
|
||||
...houseTask,
|
||||
...houseInfo,
|
||||
...houseQuery,
|
||||
...houseCompany
|
||||
...houseCompany,
|
||||
...houseLog
|
||||
}
|
||||
|
||||
export default urls
|
||||
@@ -1,10 +1,12 @@
|
||||
import React, { Component } from 'react'
|
||||
import { Spin, Steps, Timeline } from 'antd'
|
||||
import { Descriptions, Spin, Steps, Timeline } from 'antd'
|
||||
import { AntIcon } from 'components'
|
||||
import { api } from 'common/api'
|
||||
import getDictData from 'util/dic'
|
||||
import { toCamelCase } from 'util/format'
|
||||
|
||||
const ellipsisType = [3, 4, 6]
|
||||
|
||||
export default class houseLog extends Component {
|
||||
state = {
|
||||
loading: true,
|
||||
@@ -21,7 +23,11 @@ export default class houseLog extends Component {
|
||||
state.codes = await getDictData('house_log_type')
|
||||
|
||||
if (id) {
|
||||
const { data } = await api.houseLogList({ id })
|
||||
state.data = data
|
||||
} else if (infoId) {
|
||||
const { data } = await api.houseLogListByInfoId({ id: infoId })
|
||||
state.data = data
|
||||
} else if (taskId) {
|
||||
const { data } = await api.houseLogListByTaskId({ id: taskId })
|
||||
state.data = data
|
||||
@@ -51,18 +57,37 @@ export default class houseLog extends Component {
|
||||
<Timeline.Item
|
||||
key={i}
|
||||
dot={
|
||||
[
|
||||
,
|
||||
<AntIcon type="clock-circle" />,
|
||||
<AntIcon type="check-circle" />,
|
||||
][item.status]
|
||||
item.type === 6 ? (
|
||||
<AntIcon type="close-circle" className="text-error" />
|
||||
) : (
|
||||
[
|
||||
,
|
||||
<AntIcon type="clock-circle" />,
|
||||
<AntIcon type="check-circle" className="text-success" />,
|
||||
][item.status]
|
||||
)
|
||||
}
|
||||
>
|
||||
<h5 className="h5">
|
||||
{this.bindCodeValue(item.type, 'house_log_type')}
|
||||
</h5>
|
||||
<p className="text-gray">{item.updatedTime}</p>
|
||||
<p>{item.targetUserNames}</p>
|
||||
<h6 className="h6">
|
||||
<b>
|
||||
{['等待', '正在', ''][item.status] +
|
||||
this.bindCodeValue(item.type, 'house_log_type')}
|
||||
</b>
|
||||
</h6>
|
||||
<p className="text-gray">{item.finishedTime}</p>
|
||||
<Descriptions column={1} colon={false} labelStyle={{ opacity: 0.5 }}>
|
||||
{item.remark && (
|
||||
<Descriptions.Item>{item.remark}</Descriptions.Item>
|
||||
)}
|
||||
<Descriptions.Item label="操作人">
|
||||
{item.targetUserNames.split(',').join(' / ')}
|
||||
</Descriptions.Item>
|
||||
{item.finishedUserName && (
|
||||
<Descriptions.Item label="实际操作人">
|
||||
{item.finishedUserName}
|
||||
</Descriptions.Item>
|
||||
)}
|
||||
</Descriptions>
|
||||
</Timeline.Item>
|
||||
))}
|
||||
</Timeline>
|
||||
|
||||
@@ -10,9 +10,10 @@ import {
|
||||
message as Message,
|
||||
Radio,
|
||||
Select,
|
||||
Drawer,
|
||||
} from 'antd'
|
||||
import { isEqual } from 'lodash'
|
||||
import { AntIcon, Auth, Container, QueryTable, QueryTableActions } from 'components'
|
||||
import { AntIcon, Auth, Container, HouseLog, QueryTable, QueryTableActions } from 'components'
|
||||
import { api } from 'common/api'
|
||||
import getDictData from 'util/dic'
|
||||
import auth from 'components/authorized/handler'
|
||||
@@ -39,6 +40,8 @@ export default class index extends Component {
|
||||
},
|
||||
|
||||
type: '',
|
||||
|
||||
visibleLog: false,
|
||||
}
|
||||
|
||||
// 表格实例
|
||||
@@ -95,7 +98,7 @@ export default class index extends Component {
|
||||
if (flag) {
|
||||
this.columns.push({
|
||||
title: '操作',
|
||||
width: 150,
|
||||
width: 180,
|
||||
dataIndex: 'actions',
|
||||
render: (text, record) => (
|
||||
<QueryTableActions>
|
||||
@@ -111,6 +114,7 @@ export default class index extends Component {
|
||||
<a>删除</a>
|
||||
</Popconfirm>
|
||||
</Auth>
|
||||
<a onClick={() => this.onShowLog(record.id)}>日志</a>
|
||||
</QueryTableActions>
|
||||
),
|
||||
})
|
||||
@@ -255,10 +259,13 @@ export default class index extends Component {
|
||||
}
|
||||
|
||||
//#region 自定义方法
|
||||
onShowLog(id) {
|
||||
this.setState({ visibleLog: id })
|
||||
}
|
||||
//#endregion
|
||||
|
||||
render() {
|
||||
const { options, codes, type } = this.state
|
||||
const { options, codes, type, visibleLog } = this.state
|
||||
|
||||
return (
|
||||
<Container mode="fluid">
|
||||
@@ -348,7 +355,14 @@ export default class index extends Component {
|
||||
}
|
||||
/>
|
||||
</Card>
|
||||
{this.props.supportInfo}
|
||||
<Drawer
|
||||
width={600}
|
||||
visible={visibleLog}
|
||||
onClose={() => this.setState({ visibleLog: false })}
|
||||
destroyOnClose
|
||||
>
|
||||
<HouseLog id={visibleLog} />
|
||||
</Drawer>
|
||||
</Container>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -250,7 +250,7 @@ export default class index extends Component {
|
||||
通过
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
type="danger"
|
||||
onClick={() => this.onCheck(-1)}
|
||||
>
|
||||
退回
|
||||
|
||||
@@ -1,6 +1,25 @@
|
||||
import React, { Component } from 'react'
|
||||
import { Button, Card, Form, Input, message as Message, Popconfirm, Radio, Select, Tag } from 'antd'
|
||||
import { AntIcon, Auth, Container, ModalForm, QueryTable, QueryTableActions } from 'components'
|
||||
import {
|
||||
Button,
|
||||
Card,
|
||||
Drawer,
|
||||
Form,
|
||||
Input,
|
||||
message as Message,
|
||||
Popconfirm,
|
||||
Radio,
|
||||
Select,
|
||||
Tag,
|
||||
} from 'antd'
|
||||
import {
|
||||
AntIcon,
|
||||
Auth,
|
||||
Container,
|
||||
HouseLog,
|
||||
ModalForm,
|
||||
QueryTable,
|
||||
QueryTableActions,
|
||||
} from 'components'
|
||||
import { api } from 'common/api'
|
||||
import auth from 'components/authorized/handler'
|
||||
import { isEqual } from 'lodash'
|
||||
@@ -37,6 +56,8 @@ export default class index extends Component {
|
||||
},
|
||||
|
||||
type: '',
|
||||
|
||||
visibleLog: false,
|
||||
}
|
||||
|
||||
// 表格实例
|
||||
@@ -113,6 +134,7 @@ export default class index extends Component {
|
||||
{record.state === 3 ? `审核` : `查看`}
|
||||
</a>
|
||||
</Auth>
|
||||
<a onClick={() => this.onShowLog(record.id)}>日志</a>
|
||||
</QueryTableActions>
|
||||
),
|
||||
})
|
||||
@@ -228,10 +250,13 @@ export default class index extends Component {
|
||||
}
|
||||
|
||||
//#region 自定义方法
|
||||
onShowLog(id) {
|
||||
this.setState({ visibleLog: id })
|
||||
}
|
||||
//#endregion
|
||||
|
||||
render() {
|
||||
const { codes, type } = this.state
|
||||
const { codes, type, visibleLog } = this.state
|
||||
|
||||
return (
|
||||
<Container mode="fluid">
|
||||
@@ -298,6 +323,15 @@ export default class index extends Component {
|
||||
}
|
||||
/>
|
||||
</Card>
|
||||
|
||||
<Drawer
|
||||
width={600}
|
||||
visible={visibleLog}
|
||||
onClose={() => this.setState({ visibleLog: false })}
|
||||
destroyOnClose
|
||||
>
|
||||
<HouseLog taskId={visibleLog} />
|
||||
</Drawer>
|
||||
</Container>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { Component } from 'react'
|
||||
import { Card, Checkbox, Form, Input, message as Message, Radio, Select, Tag } from 'antd'
|
||||
import { Auth, Container, QueryTable, QueryTableActions } from 'components'
|
||||
import { Card, Checkbox, Drawer, Form, Input, message as Message, Radio, Select, Tag } from 'antd'
|
||||
import { Auth, Container, HouseLog, QueryTable, QueryTableActions } from 'components'
|
||||
import { api } from 'common/api'
|
||||
import auth from 'components/authorized/handler'
|
||||
import { isEqual } from 'lodash'
|
||||
@@ -35,6 +35,8 @@ export default class index extends Component {
|
||||
},
|
||||
|
||||
type: '',
|
||||
|
||||
visibleLog: false,
|
||||
}
|
||||
|
||||
// 表格实例
|
||||
@@ -115,6 +117,7 @@ export default class index extends Component {
|
||||
: `登记`}
|
||||
</a>
|
||||
</Auth>
|
||||
<a onClick={() => this.onShowLog(record.id)}>日志</a>
|
||||
</QueryTableActions>
|
||||
),
|
||||
})
|
||||
@@ -230,10 +233,13 @@ export default class index extends Component {
|
||||
}
|
||||
|
||||
//#region 自定义方法
|
||||
onShowLog(id) {
|
||||
this.setState({ visibleLog: id })
|
||||
}
|
||||
//#endregion
|
||||
|
||||
render() {
|
||||
const { codes, type } = this.state
|
||||
const { codes, type, visibleLog } = this.state
|
||||
|
||||
return (
|
||||
<Container mode="fluid">
|
||||
@@ -310,6 +316,15 @@ export default class index extends Component {
|
||||
}
|
||||
/>
|
||||
</Card>
|
||||
|
||||
<Drawer
|
||||
width={600}
|
||||
visible={visibleLog}
|
||||
onClose={() => this.setState({ visibleLog: false })}
|
||||
destroyOnClose
|
||||
>
|
||||
<HouseLog taskId={visibleLog} />
|
||||
</Drawer>
|
||||
</Container>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user