|
|
@ -1,6 +1,6 @@ |
|
|
|
import React from "react"; |
|
|
|
import React from "react"; |
|
|
|
import {Button, Form, Image, ListGroup, Tab, Table, Tabs} from "react-bootstrap"; |
|
|
|
import {Button, Form, Image, ListGroup, Tab, Table, Tabs} from "react-bootstrap"; |
|
|
|
import {ManagerActivity} from "./entity"; |
|
|
|
import {ManagerActivity, PageProps} from "./entity"; |
|
|
|
import {JSONResponse, Method, request} from "./interface"; |
|
|
|
import {JSONResponse, Method, request} from "./interface"; |
|
|
|
import {API, prefix} from "./api"; |
|
|
|
import {API, prefix} from "./api"; |
|
|
|
import {EmptyBodyTransform, FindActivityRes, FindActivityTransform, PageDataMessage, SimpleMessage} from "./result"; |
|
|
|
import {EmptyBodyTransform, FindActivityRes, FindActivityTransform, PageDataMessage, SimpleMessage} from "./result"; |
|
|
@ -8,6 +8,7 @@ import {MyDialog} from "./ui/MyDialog"; |
|
|
|
import moment from "moment"; |
|
|
|
import moment from "moment"; |
|
|
|
import {Input} from "./ui/InputGroup"; |
|
|
|
import {Input} from "./ui/InputGroup"; |
|
|
|
import {UploadImg} from "./ui/UploadImg"; |
|
|
|
import {UploadImg} from "./ui/UploadImg"; |
|
|
|
|
|
|
|
import {Page} from "./ui/Page"; |
|
|
|
|
|
|
|
|
|
|
|
const contentMaxLength=50 |
|
|
|
const contentMaxLength=50 |
|
|
|
/** |
|
|
|
/** |
|
|
@ -68,7 +69,8 @@ class EditActive extends React.Component< |
|
|
|
export class Active extends React.Component<any, { |
|
|
|
export class Active extends React.Component<any, { |
|
|
|
activeList?:Array<ManagerActivity>; |
|
|
|
activeList?:Array<ManagerActivity>; |
|
|
|
tipContent:JSX.Element|null |
|
|
|
tipContent:JSX.Element|null |
|
|
|
dialog:JSX.Element|null |
|
|
|
dialog:JSX.Element|null, |
|
|
|
|
|
|
|
page?:PageProps |
|
|
|
}>{ |
|
|
|
}>{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -77,7 +79,7 @@ export class Active extends React.Component<any, { |
|
|
|
|
|
|
|
|
|
|
|
this.state={ |
|
|
|
this.state={ |
|
|
|
tipContent:null, |
|
|
|
tipContent:null, |
|
|
|
dialog:null |
|
|
|
dialog:null, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -90,9 +92,9 @@ export class Active extends React.Component<any, { |
|
|
|
switch (res.customResult) { |
|
|
|
switch (res.customResult) { |
|
|
|
case PageDataMessage.ok: |
|
|
|
case PageDataMessage.ok: |
|
|
|
that.setState({ |
|
|
|
that.setState({ |
|
|
|
activeList:res.dataList |
|
|
|
activeList:res.dataList, |
|
|
|
|
|
|
|
page:res.page |
|
|
|
}) |
|
|
|
}) |
|
|
|
// that.loadActive(1)
|
|
|
|
|
|
|
|
break |
|
|
|
break |
|
|
|
case PageDataMessage.fail: |
|
|
|
case PageDataMessage.fail: |
|
|
|
that.setState({ |
|
|
|
that.setState({ |
|
|
@ -155,6 +157,10 @@ export class Active extends React.Component<any, { |
|
|
|
</tbody> |
|
|
|
</tbody> |
|
|
|
</Table> |
|
|
|
</Table> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{this.state.page?<Page onClick={(page:number)=>this.loadActive(page)} currentPage={this.state.page.currentPage} |
|
|
|
|
|
|
|
totalPage={this.state.page.totalPage} pageSize={this.state.page.pageSize}/> |
|
|
|
|
|
|
|
:<span className="text-danger text-center">丢失分页数据</span>} |
|
|
|
|
|
|
|
|
|
|
|
{this.state.dialog} |
|
|
|
{this.state.dialog} |
|
|
|
|
|
|
|
|
|
|
|
<MyDialog content={this.state.tipContent} open={this.state.tipContent!=null} titleId={"user-dialog"} menuName={"操作提示"} |
|
|
|
<MyDialog content={this.state.tipContent} open={this.state.tipContent!=null} titleId={"user-dialog"} menuName={"操作提示"} |
|
|
|