From e36d04fc335547bc293078a77924c94a31e99cdc Mon Sep 17 00:00:00 2001 From: Mr Ke <kelq@hugeinfo.com.cn> Date: Fri, 15 May 2020 16:51:54 +0800 Subject: [PATCH] 发布问卷做问卷总分值100的最大限制 --- SunshineIns/src/page/CareList.jsx | 32 ++++++++++++++++++-------------- 1 files changed, 18 insertions(+), 14 deletions(-) diff --git a/SunshineIns/src/page/CareList.jsx b/SunshineIns/src/page/CareList.jsx index 2b2fa4e..5432a72 100644 --- a/SunshineIns/src/page/CareList.jsx +++ b/SunshineIns/src/page/CareList.jsx @@ -3,7 +3,7 @@ import HeadView from '../view/HeadView'; import TableBtnView from '../view/TableBtnView'; import CommonSearchForm from '../view/CommonSearchForm'; -import { Input, Button, DatePicker, Divider, message, Popconfirm, Select, Badge } from 'antd'; +import { Input, Button, DatePicker, Divider, message, Popconfirm, Select, Badge, Breadcrumb } from 'antd'; import moment from 'moment'; import Fetch from '../fetch'; import TableView from '../view/TableView'; @@ -32,6 +32,7 @@ 1, 2, 3, + 4 ] const activityStatusIds = { 0: '未开始', @@ -41,9 +42,9 @@ } const activityStatusList = [ + 0, 1, - 2, - 3, + 2 ] export default class CareList extends React.Component { constructor(props) { @@ -61,7 +62,7 @@ } componentDidMount() { - document.title = '社会关护管理'; + document.title = '社会观护管理'; this.getData(); } @@ -169,7 +170,7 @@ key: 'status', render: text => ( text == 0 ? - <Badge style={{ backgroundColor: '#6C757C' }} count={'未开始'} /> : text == 1 ? <Badge count={'进行中'} style={{ backgroundColor: '#6C757C' }} /> : text == 2 ? <Badge count={'已结束'} style={{ backgroundColor: '#6C757C' }} /> : <Badge count={'结束'} style={{ backgroundColor: '#2ECC71' }} /> + <Badge style={{ backgroundColor: '#6C757C' }} count={'未开始'} /> : text == 1 ? <Badge count={'进行中'} style={{ backgroundColor: '#F1C40F' }} /> : text == 2 ? <Badge count={'已结束'} style={{ backgroundColor: '#2ECC71' }} /> : <Badge count={'结束'} style={{ backgroundColor: '#2ECC71' }} /> ) }, { title: '创建时间', @@ -192,11 +193,7 @@ render: (text, record) => ( <span> { - record.status == 1 ? - <React.Fragment> - <Divider type="vertical" /> - <a onClick={() => this.showModal(record.id)}>结束任务</a> - </React.Fragment> : + record.status == 0 ? <React.Fragment> <a onClick={() => this.showModal(record.id)}>编辑</a> <Divider type="vertical" /> @@ -209,7 +206,14 @@ > <a href="#">删除</a> </Popconfirm> - </React.Fragment> + </React.Fragment> : + record.status == 1 ? + <React.Fragment> + <a onClick={() => this.showModal(record.id)}>查看</a> + <Divider type="vertical" /> + <a onClick={() => this.showModal(record.id)}>结束任务</a> + </React.Fragment> : + <a onClick={() => this.showModal(record.id)}>查看</a> } </span> ), @@ -218,13 +222,13 @@ return ( <div className="app-page"> <HeadView history={this.props.history} /> - <div style={{ marginLeft: '90%', marginBottom: '20px', marginTop: '20px' }}> - <Button type="primary" size='large' onClick={() => this.showModal('new')}>新建任务</Button> - </div> {/* <Breadcrumb style={{ padding: '20px' }}> <Breadcrumb.Item><a href="">后台中心</a></Breadcrumb.Item> <Breadcrumb.Item>社会关护</Breadcrumb.Item> </Breadcrumb> */} + <div style={{ marginLeft: '90%', marginBottom: '20px', marginTop: '20px' }}> + <Button type="primary" size='large' onClick={() => this.showModal('new')}>新建任务</Button> + </div> <div style={{ background: '#fff', margin: 20 }}> <CommonSearchForm {...this.props} -- Gitblit v1.8.0