|
|
|
@ -1,14 +1,15 @@ |
|
|
|
|
import React from "react"; |
|
|
|
|
import {Button, Form, Tab, Table, Tabs} from "react-bootstrap"; |
|
|
|
|
import {ManagerEntity} from "./entity"; |
|
|
|
|
import {ManagerEntity, PageProps} from "./entity"; |
|
|
|
|
import {Input} from "./ui/InputGroup"; |
|
|
|
|
import {Cookies} from "react-cookie"; |
|
|
|
|
import {MyDialog} from "./ui/MyDialog"; |
|
|
|
|
import {JSONResponse, Method, request} from "./interface"; |
|
|
|
|
import {API} from "./api"; |
|
|
|
|
import {EmptyBodyTransform, ManagerList, ManagerTransform, SimpleMessage} from "./result"; |
|
|
|
|
import {EmptyBodyTransform, ManagerList, ManagerTransform, PageDataMessage, SimpleMessage} from "./result"; |
|
|
|
|
import {manager_cookie} from "./account/PropCookie"; |
|
|
|
|
import {register} from './public' |
|
|
|
|
import {Page} from "./ui/Page"; |
|
|
|
|
|
|
|
|
|
enum Type { |
|
|
|
|
modify, |
|
|
|
@ -91,6 +92,7 @@ export class Manager extends React.Component< |
|
|
|
|
dialog:JSX.Element|null; |
|
|
|
|
//操作反馈
|
|
|
|
|
tipContent:JSX.Element|null; |
|
|
|
|
page?:PageProps; |
|
|
|
|
}>{ |
|
|
|
|
|
|
|
|
|
constructor(props: Readonly<any>) { |
|
|
|
@ -98,7 +100,7 @@ export class Manager extends React.Component< |
|
|
|
|
|
|
|
|
|
this.state={ |
|
|
|
|
tipContent: null, |
|
|
|
|
dialog:null, |
|
|
|
|
dialog:null |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -138,12 +140,17 @@ export class Manager extends React.Component< |
|
|
|
|
currentPage:page+"" |
|
|
|
|
},new ManagerTransform(),function (res:ManagerList) { |
|
|
|
|
switch (res.customResult) { |
|
|
|
|
case SimpleMessage.ok: |
|
|
|
|
case PageDataMessage.ok: |
|
|
|
|
that.setState({ |
|
|
|
|
managerList:res.dataList |
|
|
|
|
managerList:res.dataList, |
|
|
|
|
page: res.page |
|
|
|
|
}) |
|
|
|
|
break |
|
|
|
|
case PageDataMessage.fail: |
|
|
|
|
that.setState({ |
|
|
|
|
tipContent:<h3 className="text-center text-danger">加载数据失败,请联系管理员</h3> |
|
|
|
|
}) |
|
|
|
|
break |
|
|
|
|
case SimpleMessage.fail: |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
@ -234,11 +241,12 @@ export class Manager extends React.Component< |
|
|
|
|
</tbody> |
|
|
|
|
</Table> |
|
|
|
|
|
|
|
|
|
{this.state.page?<Page onClick={(page:number)=>this.loadManager(page)} currentPage={this.state.page.currentPage} |
|
|
|
|
totalPage={this.state.page.totalPage} pageSize={this.state.page.pageSize}/>:null} |
|
|
|
|
|
|
|
|
|
{this.state.dialog} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<MyDialog content={this.state.tipContent} open={this.state.tipContent!=null} |
|
|
|
|
titleId={"manager-tip"} menuName={"提示信息"} onClose={()=>this.setState({ |
|
|
|
|
tipContent:null |
|
|
|
|