全没空的联系人
continuous-integration/drone/push Build is passing Details

master
cxz66666 2020-09-18 20:26:48 +08:00
parent 211b525138
commit 367cbea735
1 changed files with 55 additions and 35 deletions

View File

@ -1,6 +1,17 @@
import React from "react";
import axios from "axios";
import {Button,Form,Spin,message,Checkbox,Alert,BackTop,Layout,Card,List} from "antd";
import {
Button,
Form,
Spin,
message,
Checkbox,
Alert,
BackTop,
Layout,
Card,
List,
} from "antd";
import "antd/dist/antd.css";
import { confirmAlert } from "react-confirm-alert";
import "react-confirm-alert/src/react-confirm-alert.css";
@ -127,8 +138,11 @@ class TimePicker extends React.Component {
this.setState({
info: result.data.data,
});
if(this.state.info.times.length !== 0){
message.warning("你已选择过面试时间!重复提交面试时间可能导致场次排错,请谨慎重复提交!",0)
if (this.state.info.times.length !== 0) {
message.warning(
"你已选择过面试时间!重复提交面试时间可能导致场次排错,请谨慎重复提交!",
0
);
}
} else {
message.error("获取个人信息失败,请稍后重试");
@ -147,7 +161,6 @@ class TimePicker extends React.Component {
},
};
const { getFieldDecorator } = this.props.form;
if (this.state.confirmed) {
return this.state.option_list ? (
@ -309,32 +322,34 @@ class TimePicker extends React.Component {
</Spin>
</div>
);
} else if(this.state.info){
return( this.state.info.times.length !== 0 ?
} else if (this.state.info) {
return this.state.info.times.length !== 0 ? (
<Alert
message="你已经选择过面试时间!"
description={
<div >
<p>重复提交面试时间可能导致场次排错请谨慎重复提交点击右上角关闭警告以继续</p>
<div>
<p>
重复提交面试时间可能导致场次排错请谨慎重复提交点击右上角关闭警告以继续
</p>
<List
size="small"
header={<div>已选择的时间</div>}
bordered
dataSource={this.state.info.times}
renderItem={item => <List.Item>{item}</List.Item>}
renderItem={(item) => <List.Item>{item}</List.Item>}
/>
</div>
}
type="warning"
showIcon
closable
style={{ height: "700px", textAlign: "center"}}
afterClose = {()=>{
const info = Object.assign({},this.state.info,{times: []});
this.setState({info:info})
}
}
/>:
style={{ height: "700px", textAlign: "center" }}
afterClose={() => {
const info = Object.assign({}, this.state.info, { times: [] });
this.setState({ info: info });
}}
/>
) : (
<div>
<Card title="个人信息">
<Card type="inner" title="姓名">
@ -367,8 +382,9 @@ class TimePicker extends React.Component {
确认个人信息
</Button>
</div>
)}else{
return(
);
} else {
return (
<div>
<Spin size="large" tip="Loading...">
<Alert
@ -406,6 +422,10 @@ class ChooseTime extends React.Component {
<h2 class="ant-typography" style={{ textAlign: "center" }}>
浙江大学学生E志者协会2020年面试时间
</h2>
<h3 class="ant-typography" style={{ textAlign: "center" }}>
如果下列时间全部没空请联系林同学电话18768081099
或加入qq纳新咨询群1126888868
</h3>
<Chooser />
<BackTop visibilityHeight={200} />
<p style={{ textAlign: "center" }}>