Compare commits

..

No commits in common. "cb209420246e7f0940739af9076587877ec2992c" and "d0cb13c5e39e80c9dbc47364da7f15a0a9a1f4e1" have entirely different histories.

3 changed files with 83 additions and 105 deletions

View File

@ -153,19 +153,3 @@
}
}
}
.createRoom {
>div {
display: flex;
align-items: center;
margin-bottom: 14px;
>span {
color: white;
flex-shrink: 0;
font-size: 14px;
text-align: right;
width: 70px;
}
}
}

View File

@ -27,12 +27,12 @@ const Index: React.FC = () => {
})
const [createRoomModal, setCreateRoomModal] = useState(false)
const [timeSelectModal, setTimeSelectModal] = useState(false)
const [createRoomFrom, setCreateRoomFrom] = useState<{ id: string, roomName: string, roomNum: string, subject: number, year: string }>({
const [createRoomFrom, setCreateRoomFrom] = useState<{ id: string, roomName: string, roomNum: string, subject: string, year: string }>({
id: "",
roomName: "",
roomNum: "",
subject: 0,
year: "0"
subject: "",
year: ""
})
const joinSettingRef = useRef<any>();
const stupWizardRef = useRef<any>();
@ -185,8 +185,8 @@ const Index: React.FC = () => {
setCreateRoomFrom({
roomName: "",
roomNum: "",
subject: 0,
year: "0",
subject: "",
year: "",
id: "",
})
getSubDpList()
@ -345,12 +345,10 @@ const Index: React.FC = () => {
</div>
<Modal title={isCreateRoom ? '新建会议室' : '修改会议信息'} open={createRoomModal} footer={null} closable={false} centered width={'400px'}>
<div>
<div className={styles.createRoom}>
{isCreateRoom ? <div>
<span></span>
<Input
<div>
{isCreateRoom ? <Input
placeholder="请输入房间号"
style={{ flexGrow: 1 }}
style={{ marginBottom: '14px' }}
className={styles.letterSpacing}
showCount
maxLength={8}
@ -382,13 +380,10 @@ const Index: React.FC = () => {
>
</span>
}
/>
</div> : null}
<div>
<span></span>
/> : null}
<Input.TextArea
placeholder="请输入房间名字"
style={{ flexGrow: 1 }}
style={{ marginBottom: '14px' }}
showCount
maxLength={30}
value={createRoomFrom.roomName}
@ -399,12 +394,9 @@ const Index: React.FC = () => {
})
}}
autoSize />
</div>
<div>
<span></span>
<Input
placeholder="请输入届"
style={{ flexGrow: 1 }}
style={{ marginBottom: '14px' }}
value={createRoomFrom.year}
onChange={(e) => {
const regex = /^[0-9]*$/;
@ -416,21 +408,17 @@ const Index: React.FC = () => {
}
}}
/>
</div>
<div>
<span></span>
<Select
placeholder='请选择学科'
style={{ flexGrow: 1 }}
style={{ width: '100%', marginBottom: '14px' }}
options={subjectList}
value={createRoomFrom.subject} onChange={(e) => {
value={createRoomFrom.subject === "" ? null : createRoomFrom.subject} onChange={(e) => {
setCreateRoomFrom({
...createRoomFrom,
subject: e
})
}} />
</div>
</div>
<div style={{
display: 'flex', justifyContent: 'center'
}}>
@ -445,6 +433,9 @@ const Index: React.FC = () => {
if (!createRoomFrom.year) {
return message.error('请输入届!')
}
if (createRoomFrom.subject === "") {
return message.error('请选择学科!')
}
if (isCreateRoom) {
isGetCheckoutRoomNum(createRoomFrom.roomNum, (bool: boolean) => {
if (bool) {

View File

@ -31,8 +31,8 @@ const User: React.FC = () => {
RoleId: null,
Pwd: "",
UserName: "",
subject: 0,
year: '0',
subject: null,
year: "",
})
const [changeUserPawModal, setChangeUserPawModal] = useState(false)
const [changeImportModal, setChangeImportModal] = useState(false)
@ -151,8 +151,8 @@ const User: React.FC = () => {
RoleId: null,
Pwd: "",
UserName: "",
subject: 0,
year: '0',
subject: null,
year: "",
})
setAddUserModal(true)
}
@ -181,8 +181,8 @@ const User: React.FC = () => {
RoleId: null,
Pwd: "",
UserName: "",
subject: 0,
year: '0',
subject: null,
year: "",
})
setAddUserModal(true)
}
@ -426,6 +426,9 @@ const User: React.FC = () => {
if (!addUserFrom.year) {
return message.error('请输入届!')
}
if (addUserFrom.subject === null) {
return message.error('请选择学科!')
}
if (isCreateUser === 'add') {
await PostUser({
...addUserFrom,