develop #15

Merged
uiujun merged 2 commits from develop into main 2025-10-10 00:29:30 +08:00
5 changed files with 153 additions and 73 deletions
Showing only changes of commit a145e8dabc - Show all commits

View File

@ -16,8 +16,8 @@ export default defineConfig({
'/api/': {
// target: 'http://yt:8003',
// target: 'http://10.39.13.78:8001/',
// target: 'https://test-admin.linyikj.com.cn/',
target: 'https://admin.linyikj.com.cn/',
target: 'https://test-admin.linyikj.com.cn/',
// target: 'https://admin.linyikj.com.cn/',
// target: 'http://c789629c.natappfree.cc',
changeOrigin: true,

View File

@ -12,8 +12,8 @@ export default function infoPreview(props: MyBetaModalFormProps) {
<div className="preview_header">
<div className="avatar"></div>
<div className="info">
<div className="name"></div>
<div className="desc"></div>
<div className="name"></div>
<div className="desc"></div>
</div>
</div>
<div className="preview_content">
@ -31,8 +31,8 @@ export default function infoPreview(props: MyBetaModalFormProps) {
<div className="preview_header">
<div className="avatar"></div>
<div className="info">
<div className="name"></div>
<div className="desc"></div>
<div className="name"></div>
<div className="desc"></div>
</div>
</div>
<div className="preview_content">
@ -55,9 +55,9 @@ export default function infoPreview(props: MyBetaModalFormProps) {
</div>
</div>
<div className="preview_content cover_image_preview">
<div className="cover_image"></div>
<div className="cover_image"></div>
<div className="cover_info">
</div>
</div>
</ProCard>

View File

@ -2,7 +2,7 @@
background-color: #f8f8f8;
width: 400px;
padding: 15px;
margin-left: 10px;
margin-left: 60px;
border-radius: 10px;
.title {
border-left: 3px solid #1890ff;

View File

@ -9,6 +9,7 @@ import { Apis } from '@/gen/Apis';
import {
CustomerMomentsChannelEnum,
CustomerMomentsContentTypeEnum,
CustomerMomentsPushStatusEnum,
CustomerMomentsPushTypeEnum,
CustomerMomentsTaskEndTypeEnum,
} from '@/gen/Enums';
@ -47,15 +48,29 @@ export default function Index({ title = '创建内容' }) {
]}
columns={[
MyColumns.ID(),
MyColumns.EnumTag({
title: '任务推送',
dataIndex: 'push_status',
valueEnum: CustomerMomentsPushStatusEnum,
search: false,
}),
{
title: '名称',
title: '标题',
dataIndex: 'title',
render: (_, i: any) => {
return (
<Card size="small">
<Space align="start">
<img src={i?.cover_image[0]?.url} width={45} height={45} />
<div>{i?.title}</div>
<img
src={
i?.cover_image?.length > 0
? i?.cover_image[0]?.url
: i?.attachments[0]?.url
}
width={45}
height={45}
/>
</Space>
</Card>
);
@ -77,7 +92,7 @@ export default function Index({ title = '创建内容' }) {
valueEnum: CustomerMomentsPushTypeEnum,
}),
{
title: '定时发送时间',
title: '送时间',
dataIndex: 'scheduled_time',
search: false,
},
@ -89,15 +104,16 @@ export default function Index({ title = '创建内容' }) {
search: false,
}),
{
title: '任务结束天数',
title: '任务结束时间',
dataIndex: 'task_days',
search: false,
render: (_, record: any) => {
return record?.task_end_type === 'AfterNDays'
? `任务发送后:${record?.task_days}`
: '${record?.task_end_time}';
},
},
{
title: '定时结束',
dataIndex: 'task_end_time',
search: false,
},
MyColumns.UpdatedAt(),
MyColumns.CreatedAt(),
MyColumns.Option({

View File

@ -40,7 +40,7 @@ export default function Create(props: MyBetaModalFormProps) {
}),
Selects?.Companies({
key: 'companies_id',
title: '公司',
title: '选择机构',
colProps: { span: 24 },
required: true,
}),
@ -54,10 +54,11 @@ export default function Create(props: MyBetaModalFormProps) {
columns: [
MyFormItems.EnumRadio({
key: 'push_type',
title: '推送类型',
title: '任务推送方式',
tooltip: '内容穿创建后,推送任务给员工的方式',
valueEnum: CustomerMomentsPushTypeEnum,
required: true,
colProps: { span: 9 },
colProps: { span: 12 },
}),
{
name: ['push_type'],
@ -67,9 +68,9 @@ export default function Create(props: MyBetaModalFormProps) {
? [
{
key: 'scheduled_time',
title: '定时送时间',
title: '定时送时间',
valueType: 'dateTime',
colProps: { span: 10 },
colProps: { span: 12 },
},
]
: [];
@ -86,7 +87,7 @@ export default function Create(props: MyBetaModalFormProps) {
title: '任务结束类型',
valueEnum: CustomerMomentsTaskEndTypeEnum,
required: true,
colProps: { span: 9 },
colProps: { span: 12 },
}),
{
name: ['task_end_type'],
@ -96,7 +97,7 @@ export default function Create(props: MyBetaModalFormProps) {
? [
{
key: 'task_days',
title: '任务结束天数',
title: ' ',
colProps: { span: 10 },
valueType: 'digit',
formItemProps: { ...rulesHelper.number },
@ -123,7 +124,7 @@ export default function Create(props: MyBetaModalFormProps) {
},
MyFormItems.EnumSelect({
key: 'range_type',
title: '范围类型',
title: '推送范围',
valueEnum: CustomerMomentsRangeTypeEnum,
required: true,
}),
@ -150,6 +151,12 @@ export default function Create(props: MyBetaModalFormProps) {
{
title: '创建内容',
columns: [
{
key: 'title',
title: '标题',
formItemProps: { ...rulesHelper.text },
colProps: { span: 24 },
},
MyFormItems.EnumRadio({
key: 'content_type',
title: '内容类型',
@ -157,29 +164,111 @@ export default function Create(props: MyBetaModalFormProps) {
required: true,
colProps: { span: 24 },
}),
{
key: 'skip_url',
title: '链接',
formItemProps: { ...rulesHelper.text },
colProps: { span: 12 },
},
{
key: 'title',
title: '标题',
formItemProps: { ...rulesHelper.text },
colProps: { span: 12 },
},
{
name: ['content_type'],
valueType: 'dependency',
columns: ({ content_type }: any) => {
setContentType(content_type);
return content_type === 'MiniProgram'
return content_type === CustomerMomentsContentTypeEnum.Image.value
? [
{
key: 'mini_program_app_id',
title: '小程序APPID',
key: 'content',
title: '发送文案',
valueType: 'textarea',
colProps: { span: 24 },
formItemProps: { ...rulesHelper.text },
},
MyFormItems.UploadImages({
key: 'attachments',
title: '上传图片',
// uploadType: 'file',
required: true,
tooltip: '限9张图片',
max: 9,
colProps: { span: 24 },
}),
]
: content_type === CustomerMomentsContentTypeEnum.Video.value
? [
{
key: 'content',
title: '发送文案',
valueType: 'textarea',
colProps: { span: 24 },
formItemProps: { ...rulesHelper.text },
},
MyFormItems.UploadImages({
key: 'attachments',
title: '上传视频',
required: true,
tooltip: '限1个视频',
// uploadType: 'file',
max: 1,
colProps: { span: 24 },
}),
]
: content_type === CustomerMomentsContentTypeEnum.Link.value ||
content_type ===
CustomerMomentsContentTypeEnum.MiniProgram.value
? [
{
key: 'content',
title: '发送文案',
valueType: 'textarea',
colProps: { span: 24 },
formItemProps: { ...rulesHelper.text },
},
{
name: ['content_type'],
valueType: 'dependency',
columns: ({ content_type }: any) => {
setContentType(content_type);
return content_type === 'MiniProgram'
? [
{
key: 'mini_program_app_id',
title: '小程序APPID',
formItemProps: { ...rulesHelper.text },
colProps: { span: 12 },
},
{
key: 'skip_url',
title: '链接地址',
formItemProps: { ...rulesHelper.text },
colProps: { span: 12 },
},
]
: [
{
key: 'skip_url',
title: '链接地址',
formItemProps: { ...rulesHelper.text },
colProps: { span: 24 },
},
];
},
},
{
key: 'desc',
title: '链接标题',
colProps: { span: 24 },
formItemProps: { ...rulesHelper.text },
},
MyFormItems.UploadImages({
key: 'cover_image',
tooltip: '限1张图片',
title: '设置封面',
required: true,
max: 1,
}),
]
: content_type === CustomerMomentsContentTypeEnum.Link.value ||
content_type ===
CustomerMomentsContentTypeEnum.MiniProgram.value
? [
{
key: 'skip_url',
title: '链接',
formItemProps: { ...rulesHelper.text },
colProps: { span: 24 },
},
@ -187,31 +276,6 @@ export default function Create(props: MyBetaModalFormProps) {
: [];
},
},
{
key: 'content',
title: '内容',
valueType: 'textarea',
colProps: { span: 24 },
formItemProps: { ...rulesHelper.text },
},
{
key: 'desc',
title: '描述',
valueType: 'textarea',
colProps: { span: 24 },
},
MyFormItems.UploadImages({
key: 'cover_image',
title: '封面',
max: 1,
}),
MyFormItems.UploadImages({
key: 'attachments',
title: '附件',
uploadType: 'file',
max: 100,
colProps: { span: 12 },
}),
],
},
];
@ -236,23 +300,23 @@ export default function Create(props: MyBetaModalFormProps) {
type="primary"
size={'middle'}
myRef={modalRef}
width="1200px"
width="580px"
node={
<Space direction="vertical">
<div style={{ width: '1160px' }}>
<div style={{ width: '666px' }}>
<Steps
style={{ padding: '50px 150px 30px 150px' }}
style={{ padding: '20px 200px 20px 20px' }}
current={current}
items={steps}
/>
</div>
<Space align="start">
<div style={{ width: '700px' }}>
<div style={{ width: '500px' }}>
<BetaSchemaForm<ApiTypes.Customer.CustomerMomentCategories.Store>
{...MyModalFormProps.props}
title={`添加${props.title}`}
wrapperCol={{ span: 24 }}
width="800px"
// width="1200px"
form={form}
layoutType="Form"
trigger={<MyButtons.Create title={`添加${props.title}`} />}