Compare commits
3 Commits
d0cb13c5e3
...
cb20942024
| Author | SHA1 | Date |
|---|---|---|
|
|
cb20942024 | |
|
|
99c421864b | |
|
|
10097e70a7 |
|
|
@ -153,3 +153,19 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.createRoom {
|
||||||
|
>div {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 14px;
|
||||||
|
|
||||||
|
>span {
|
||||||
|
color: white;
|
||||||
|
flex-shrink: 0;
|
||||||
|
font-size: 14px;
|
||||||
|
text-align: right;
|
||||||
|
width: 70px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -27,12 +27,12 @@ const Index: React.FC = () => {
|
||||||
})
|
})
|
||||||
const [createRoomModal, setCreateRoomModal] = useState(false)
|
const [createRoomModal, setCreateRoomModal] = useState(false)
|
||||||
const [timeSelectModal, setTimeSelectModal] = useState(false)
|
const [timeSelectModal, setTimeSelectModal] = useState(false)
|
||||||
const [createRoomFrom, setCreateRoomFrom] = useState<{ id: string, roomName: string, roomNum: string, subject: string, year: string }>({
|
const [createRoomFrom, setCreateRoomFrom] = useState<{ id: string, roomName: string, roomNum: string, subject: number, year: string }>({
|
||||||
id: "",
|
id: "",
|
||||||
roomName: "",
|
roomName: "",
|
||||||
roomNum: "",
|
roomNum: "",
|
||||||
subject: "",
|
subject: 0,
|
||||||
year: ""
|
year: "0"
|
||||||
})
|
})
|
||||||
const joinSettingRef = useRef<any>();
|
const joinSettingRef = useRef<any>();
|
||||||
const stupWizardRef = useRef<any>();
|
const stupWizardRef = useRef<any>();
|
||||||
|
|
@ -185,8 +185,8 @@ const Index: React.FC = () => {
|
||||||
setCreateRoomFrom({
|
setCreateRoomFrom({
|
||||||
roomName: "",
|
roomName: "",
|
||||||
roomNum: "",
|
roomNum: "",
|
||||||
subject: "",
|
subject: 0,
|
||||||
year: "",
|
year: "0",
|
||||||
id: "",
|
id: "",
|
||||||
})
|
})
|
||||||
getSubDpList()
|
getSubDpList()
|
||||||
|
|
@ -345,79 +345,91 @@ const Index: React.FC = () => {
|
||||||
</div>
|
</div>
|
||||||
<Modal title={isCreateRoom ? '新建会议室' : '修改会议信息'} open={createRoomModal} footer={null} closable={false} centered width={'400px'}>
|
<Modal title={isCreateRoom ? '新建会议室' : '修改会议信息'} open={createRoomModal} footer={null} closable={false} centered width={'400px'}>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div className={styles.createRoom}>
|
||||||
{isCreateRoom ? <Input
|
{isCreateRoom ? <div>
|
||||||
placeholder="请输入房间号"
|
<span>房间号:</span>
|
||||||
style={{ marginBottom: '14px' }}
|
<Input
|
||||||
className={styles.letterSpacing}
|
placeholder="请输入房间号"
|
||||||
showCount
|
style={{ flexGrow: 1 }}
|
||||||
maxLength={8}
|
className={styles.letterSpacing}
|
||||||
value={createRoomFrom.roomNum}
|
showCount
|
||||||
onChange={(e) => {
|
maxLength={8}
|
||||||
const regex = /^[0-9]*$/;
|
value={createRoomFrom.roomNum}
|
||||||
if (regex.test(e.target.value)) {
|
onChange={(e) => {
|
||||||
setCreateRoomFrom({
|
const regex = /^[0-9]*$/;
|
||||||
...createRoomFrom,
|
if (regex.test(e.target.value)) {
|
||||||
roomNum: e.target.value
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
suffix={
|
|
||||||
<span
|
|
||||||
style={{ color: '#47D3D0', cursor: 'pointer' }}
|
|
||||||
onClick={() => {
|
|
||||||
function generateTimestampWithRandom(): string {
|
|
||||||
const timestamp = new Date().getTime();
|
|
||||||
const lastSixDigits = timestamp.toString().slice(-6);
|
|
||||||
const randomTwoDigits = ('0' + Math.floor(Math.random() * 100)).slice(-2);
|
|
||||||
return lastSixDigits + randomTwoDigits;
|
|
||||||
}
|
|
||||||
setCreateRoomFrom({
|
setCreateRoomFrom({
|
||||||
...createRoomFrom,
|
...createRoomFrom,
|
||||||
roomNum: generateTimestampWithRandom(),
|
roomNum: e.target.value
|
||||||
})
|
})
|
||||||
}}
|
}
|
||||||
>获取随机房间号
|
}}
|
||||||
</span>
|
suffix={
|
||||||
}
|
<span
|
||||||
/> : null}
|
style={{ color: '#47D3D0', cursor: 'pointer' }}
|
||||||
<Input.TextArea
|
onClick={() => {
|
||||||
placeholder="请输入房间名字"
|
function generateTimestampWithRandom(): string {
|
||||||
style={{ marginBottom: '14px' }}
|
const timestamp = new Date().getTime();
|
||||||
showCount
|
const lastSixDigits = timestamp.toString().slice(-6);
|
||||||
maxLength={30}
|
const randomTwoDigits = ('0' + Math.floor(Math.random() * 100)).slice(-2);
|
||||||
value={createRoomFrom.roomName}
|
return lastSixDigits + randomTwoDigits;
|
||||||
onChange={(e) => {
|
}
|
||||||
setCreateRoomFrom({
|
setCreateRoomFrom({
|
||||||
...createRoomFrom,
|
...createRoomFrom,
|
||||||
roomName: e.target.value
|
roomNum: generateTimestampWithRandom(),
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
autoSize />
|
>获取随机房间号
|
||||||
<Input
|
</span>
|
||||||
placeholder="请输入届"
|
}
|
||||||
style={{ marginBottom: '14px' }}
|
/>
|
||||||
value={createRoomFrom.year}
|
</div> : null}
|
||||||
onChange={(e) => {
|
<div>
|
||||||
const regex = /^[0-9]*$/;
|
<span>房间名字:</span>
|
||||||
if (regex.test(e.target.value)) {
|
<Input.TextArea
|
||||||
|
placeholder="请输入房间名字"
|
||||||
|
style={{ flexGrow: 1 }}
|
||||||
|
showCount
|
||||||
|
maxLength={30}
|
||||||
|
value={createRoomFrom.roomName}
|
||||||
|
onChange={(e) => {
|
||||||
setCreateRoomFrom({
|
setCreateRoomFrom({
|
||||||
...createRoomFrom,
|
...createRoomFrom,
|
||||||
year: e.target.value
|
roomName: e.target.value
|
||||||
})
|
})
|
||||||
}
|
}}
|
||||||
}}
|
autoSize />
|
||||||
/>
|
</div>
|
||||||
<Select
|
<div>
|
||||||
placeholder='请选择学科'
|
<span>届:</span>
|
||||||
style={{ width: '100%', marginBottom: '14px' }}
|
<Input
|
||||||
options={subjectList}
|
placeholder="请输入届"
|
||||||
value={createRoomFrom.subject === "" ? null : createRoomFrom.subject} onChange={(e) => {
|
style={{ flexGrow: 1 }}
|
||||||
setCreateRoomFrom({
|
value={createRoomFrom.year}
|
||||||
...createRoomFrom,
|
onChange={(e) => {
|
||||||
subject: e
|
const regex = /^[0-9]*$/;
|
||||||
})
|
if (regex.test(e.target.value)) {
|
||||||
}} />
|
setCreateRoomFrom({
|
||||||
|
...createRoomFrom,
|
||||||
|
year: e.target.value
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span>学科:</span>
|
||||||
|
<Select
|
||||||
|
placeholder='请选择学科'
|
||||||
|
style={{ flexGrow: 1 }}
|
||||||
|
options={subjectList}
|
||||||
|
value={createRoomFrom.subject} onChange={(e) => {
|
||||||
|
setCreateRoomFrom({
|
||||||
|
...createRoomFrom,
|
||||||
|
subject: e
|
||||||
|
})
|
||||||
|
}} />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style={{
|
<div style={{
|
||||||
display: 'flex', justifyContent: 'center'
|
display: 'flex', justifyContent: 'center'
|
||||||
|
|
@ -433,9 +445,6 @@ const Index: React.FC = () => {
|
||||||
if (!createRoomFrom.year) {
|
if (!createRoomFrom.year) {
|
||||||
return message.error('请输入届!')
|
return message.error('请输入届!')
|
||||||
}
|
}
|
||||||
if (createRoomFrom.subject === "") {
|
|
||||||
return message.error('请选择学科!')
|
|
||||||
}
|
|
||||||
if (isCreateRoom) {
|
if (isCreateRoom) {
|
||||||
isGetCheckoutRoomNum(createRoomFrom.roomNum, (bool: boolean) => {
|
isGetCheckoutRoomNum(createRoomFrom.roomNum, (bool: boolean) => {
|
||||||
if (bool) {
|
if (bool) {
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,8 @@ const User: React.FC = () => {
|
||||||
RoleId: null,
|
RoleId: null,
|
||||||
Pwd: "",
|
Pwd: "",
|
||||||
UserName: "",
|
UserName: "",
|
||||||
subject: null,
|
subject: 0,
|
||||||
year: "",
|
year: '0',
|
||||||
})
|
})
|
||||||
const [changeUserPawModal, setChangeUserPawModal] = useState(false)
|
const [changeUserPawModal, setChangeUserPawModal] = useState(false)
|
||||||
const [changeImportModal, setChangeImportModal] = useState(false)
|
const [changeImportModal, setChangeImportModal] = useState(false)
|
||||||
|
|
@ -151,8 +151,8 @@ const User: React.FC = () => {
|
||||||
RoleId: null,
|
RoleId: null,
|
||||||
Pwd: "",
|
Pwd: "",
|
||||||
UserName: "",
|
UserName: "",
|
||||||
subject: null,
|
subject: 0,
|
||||||
year: "",
|
year: '0',
|
||||||
})
|
})
|
||||||
setAddUserModal(true)
|
setAddUserModal(true)
|
||||||
}
|
}
|
||||||
|
|
@ -181,8 +181,8 @@ const User: React.FC = () => {
|
||||||
RoleId: null,
|
RoleId: null,
|
||||||
Pwd: "",
|
Pwd: "",
|
||||||
UserName: "",
|
UserName: "",
|
||||||
subject: null,
|
subject: 0,
|
||||||
year: "",
|
year: '0',
|
||||||
})
|
})
|
||||||
setAddUserModal(true)
|
setAddUserModal(true)
|
||||||
}
|
}
|
||||||
|
|
@ -426,9 +426,6 @@ const User: React.FC = () => {
|
||||||
if (!addUserFrom.year) {
|
if (!addUserFrom.year) {
|
||||||
return message.error('请输入届!')
|
return message.error('请输入届!')
|
||||||
}
|
}
|
||||||
if (addUserFrom.subject === null) {
|
|
||||||
return message.error('请选择学科!')
|
|
||||||
}
|
|
||||||
if (isCreateUser === 'add') {
|
if (isCreateUser === 'add') {
|
||||||
await PostUser({
|
await PostUser({
|
||||||
...addUserFrom,
|
...addUserFrom,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue