Merge pull request !6 from 白书科技/fix/0906
This commit is contained in:
白书科技 2023-09-06 01:57:01 +00:00 committed by Gitee
commit d1049ab5c8
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
8 changed files with 36 additions and 31 deletions

View File

@ -102,7 +102,7 @@ export const TreeCategory = (props: PropInterface) => {
selectedKeys={selectKey} selectedKeys={selectKey}
onExpand={onExpand} onExpand={onExpand}
treeData={treeData} treeData={treeData}
defaultExpandAll={true} // defaultExpandAll={true}
switcherIcon={<i className="iconfont icon-icon-fold c-gray" />} switcherIcon={<i className="iconfont icon-icon-fold c-gray" />}
/> />
)} )}

View File

@ -165,7 +165,7 @@ export const TreeDepartment = (props: PropInterface) => {
onSelect={onSelect} onSelect={onSelect}
onExpand={onExpand} onExpand={onExpand}
treeData={treeData} treeData={treeData}
defaultExpandAll={true} // defaultExpandAll={true}
switcherIcon={<i className="iconfont icon-icon-fold c-gray" />} switcherIcon={<i className="iconfont icon-icon-fold c-gray" />}
/> />
)} )}

View File

@ -695,7 +695,7 @@ export const CourseCreate: React.FC<PropInterface> = ({
form.setFieldsValue({ thumb: url }); form.setFieldsValue({ thumb: url });
}} }}
></UploadImageButton> ></UploadImageButton>
<span className="helper-text ml-16"> <span className="helper-text ml-8">
推荐尺寸:400x300px 推荐尺寸:400x300px
</span> </span>
</div> </div>

View File

@ -96,8 +96,8 @@ export const CourseUpdate: React.FC<PropInterface> = ({
type: type, type: type,
short_desc: res.data.course.short_desc, short_desc: res.data.course.short_desc,
hasChapter: chapterType, hasChapter: chapterType,
published_at: res.data.published_at published_at: res.data.course.published_at
? dayjs(res.data.published_at, "YYYY-MM-DD HH:mm:ss") ? dayjs(res.data.course.published_at, "YYYY-MM-DD HH:mm:ss")
: "", : "",
}); });
setType(type); setType(type);
@ -188,6 +188,10 @@ export const CourseUpdate: React.FC<PropInterface> = ({
setType(e.target.value); setType(e.target.value);
}; };
const disabledDate = (current: any) => {
return current && current >= moment().add(0, "days"); // 选择时间要大于等于当前天。若今天不能被选择,去掉等号即可。
};
return ( return (
<> <>
{open ? ( {open ? (
@ -388,7 +392,7 @@ export const CourseUpdate: React.FC<PropInterface> = ({
form.setFieldsValue({ thumb: url }); form.setFieldsValue({ thumb: url });
}} }}
></UploadImageButton> ></UploadImageButton>
<span className="helper-text ml-16"> <span className="helper-text ml-8">
推荐尺寸:400x300px 推荐尺寸:400x300px
</span> </span>
</div> </div>
@ -403,22 +407,19 @@ export const CourseUpdate: React.FC<PropInterface> = ({
maxLength={200} maxLength={200}
/> />
</Form.Item> </Form.Item>
<Form.Item label="上架时间" required={true}> <Form.Item label="上架时间">
<Space align="baseline" style={{ height: 32 }}> <Space align="baseline" style={{ height: 32 }}>
<Form.Item <Form.Item name="published_at">
name="published_at"
rules={[{ required: true, message: "请选择上架时间!" }]}
>
<DatePicker <DatePicker
disabledDate={disabledDate}
format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD HH:mm:ss"
style={{ width: 240 }} style={{ width: 240 }}
showTime showTime
placeholder="请选择上架时间" placeholder="请选择上架时间"
/> />
</Form.Item> </Form.Item>
<div className="helper-text">
<div className="helper-text ml-24">
</div> </div>
</Space> </Space>
</Form.Item> </Form.Item>

View File

@ -200,8 +200,8 @@ const CoursePage = () => {
), ),
}, },
{ {
title: "创建时间", title: "上架时间",
dataIndex: "created_at", dataIndex: "published_at",
render: (text: string) => <span>{dateFormat(text)}</span>, render: (text: string) => <span>{dateFormat(text)}</span>,
}, },
{ {

View File

@ -161,6 +161,7 @@ export const MemberCreate: React.FC<PropInterface> = ({
rules={[{ required: true, message: "请输入登录邮箱!" }]} rules={[{ required: true, message: "请输入登录邮箱!" }]}
> >
<Input <Input
autoComplete="off"
allowClear allowClear
style={{ width: 274 }} style={{ width: 274 }}
placeholder="请输入学员登录邮箱" placeholder="请输入学员登录邮箱"
@ -172,6 +173,7 @@ export const MemberCreate: React.FC<PropInterface> = ({
rules={[{ required: true, message: "请输入登录密码!" }]} rules={[{ required: true, message: "请输入登录密码!" }]}
> >
<Input.Password <Input.Password
autoComplete="off"
allowClear allowClear
style={{ width: 274 }} style={{ width: 274 }}
placeholder="请输入登录密码" placeholder="请输入登录密码"

View File

@ -202,6 +202,7 @@ export const MemberUpdate: React.FC<PropInterface> = ({
rules={[{ required: true, message: "请输入登录邮箱!" }]} rules={[{ required: true, message: "请输入登录邮箱!" }]}
> >
<Input <Input
autoComplete="off"
style={{ width: 274 }} style={{ width: 274 }}
allowClear allowClear
placeholder="请输入学员登录邮箱" placeholder="请输入学员登录邮箱"
@ -209,6 +210,7 @@ export const MemberUpdate: React.FC<PropInterface> = ({
</Form.Item> </Form.Item>
<Form.Item label="登录密码" name="password"> <Form.Item label="登录密码" name="password">
<Input.Password <Input.Password
autoComplete="off"
style={{ width: 274 }} style={{ width: 274 }}
allowClear allowClear
placeholder="请输入登录密码" placeholder="请输入登录密码"

View File

@ -287,7 +287,7 @@ const SystemConfigPage = () => {
}} }}
></UploadImageButton> ></UploadImageButton>
</div> </div>
<div className="helper-text ml-24"> <div className="helper-text ml-8">
推荐尺寸:240x80pxJPGPNG 推荐尺寸:240x80pxJPGPNG
</div> </div>
</div> </div>
@ -309,7 +309,7 @@ const SystemConfigPage = () => {
}} }}
></UploadImageButton> ></UploadImageButton>
</div> </div>
<div className="helper-text ml-24"> <div className="helper-text ml-8">
推荐尺寸:240x80pxJPGPNG 推荐尺寸:240x80pxJPGPNG
</div> </div>
</div> </div>
@ -388,7 +388,7 @@ const SystemConfigPage = () => {
<Form.Item name="player.disabled_drag" valuePropName="checked"> <Form.Item name="player.disabled_drag" valuePropName="checked">
<Switch onChange={onDragChange} /> <Switch onChange={onDragChange} />
</Form.Item> </Form.Item>
<div className="helper-text ml-24"> <div className="helper-text">
</div> </div>
</Space> </Space>
@ -401,7 +401,7 @@ const SystemConfigPage = () => {
> >
<Switch onChange={onSwitchChange} /> <Switch onChange={onSwitchChange} />
</Form.Item> </Form.Item>
<div className="helper-text ml-24"> <div className="helper-text">
</div> </div>
</Space> </Space>
@ -482,7 +482,7 @@ const SystemConfigPage = () => {
form.setFieldsValue({ "player.poster": url }); form.setFieldsValue({ "player.poster": url });
}} }}
></UploadImageButton> ></UploadImageButton>
<div className="helper-text ml-24"> <div className="helper-text ml-8">
推荐尺寸:1920x1080px 推荐尺寸:1920x1080px
</div> </div>
</div> </div>
@ -504,7 +504,7 @@ const SystemConfigPage = () => {
form.setFieldsValue({ "player.poster": url }); form.setFieldsValue({ "player.poster": url });
}} }}
></UploadImageButton> ></UploadImageButton>
<div className="helper-text ml-24"> <div className="helper-text ml-8">
推荐尺寸:1920x1080px 推荐尺寸:1920x1080px
</div> </div>
</div> </div>
@ -559,7 +559,7 @@ const SystemConfigPage = () => {
form.setFieldsValue({ "member.default_avatar": url }); form.setFieldsValue({ "member.default_avatar": url });
}} }}
></UploadImageButton> ></UploadImageButton>
<div className="helper-text ml-24"></div> <div className="helper-text ml-8"></div>
</div> </div>
</div> </div>
</Form.Item> </Form.Item>
@ -579,7 +579,7 @@ const SystemConfigPage = () => {
form.setFieldsValue({ "member.default_avatar": url }); form.setFieldsValue({ "member.default_avatar": url });
}} }}
></UploadImageButton> ></UploadImageButton>
<div className="helper-text ml-24"></div> <div className="helper-text ml-8"></div>
</div> </div>
</div> </div>
</Form.Item> </Form.Item>
@ -706,8 +706,8 @@ const SystemConfigPage = () => {
placeholder="请填写服务地址" placeholder="请填写服务地址"
/> />
</Form.Item> </Form.Item>
<div className="helper-text ml-24"> <div className="helper-text">
LDAP的对外服务地址ldap.example.com LDAP的对外服务地址ldap.example.com
</div> </div>
</Space> </Space>
</Form.Item> </Form.Item>
@ -720,8 +720,8 @@ const SystemConfigPage = () => {
placeholder="请填写用户名" placeholder="请填写用户名"
/> />
</Form.Item> </Form.Item>
<div className="helper-text ml-24"> <div className="helper-text">
LDAPcn=admin,dc=playedu,dc=xyz LDAPcn=admin,dc=playedu,dc=xyz
</div> </div>
</Space> </Space>
</Form.Item> </Form.Item>
@ -741,7 +741,7 @@ const SystemConfigPage = () => {
placeholder="请填写基本DN" placeholder="请填写基本DN"
/> />
</Form.Item> </Form.Item>
<div className="helper-text ml-24">LDAP根节点搜索用户</div> <div className="helper-text">LDAP根节点搜索用户</div>
</Space> </Space>
</Form.Item> </Form.Item>
<Form.Item style={{ marginBottom: 30 }} label="附件用户DN"> <Form.Item style={{ marginBottom: 30 }} label="附件用户DN">
@ -753,8 +753,8 @@ const SystemConfigPage = () => {
placeholder="请填写基本DN" placeholder="请填写基本DN"
/> />
</Form.Item> </Form.Item>
<div className="helper-text ml-24"> <div className="helper-text">
DN的搜索范围限制 DN的搜索范围限制
</div> </div>
</Space> </Space>
</Form.Item> </Form.Item>