From 3ad4d74583b086f65cee613ee85b55b3ec2051ff Mon Sep 17 00:00:00 2001 From: Joe Date: Wed, 10 Dec 2025 16:53:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E6=96=B0=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/UpdateForm.tsx | 29 +++- src/pages/InnovativeService/index.tsx | 48 ++++-- src/services/pop-b2b2c/errorController.ts | 30 ++-- .../pop-b2b2c/pbcActivityController.ts | 111 +++++++++++++- src/services/pop-b2b2c/pbcOssImgController.ts | 32 ++-- .../pop-b2b2c/pbcProductController.ts | 63 ++++++++ .../pbcTrainingClassesVideoController.ts | 2 +- src/services/pop-b2b2c/pbcUsersController.ts | 2 +- src/services/pop-b2b2c/pbcVodController.ts | 2 +- src/services/pop-b2b2c/typings.d.ts | 140 ++++++++++++++---- 10 files changed, 378 insertions(+), 81 deletions(-) diff --git a/src/pages/InnovativeService/components/UpdateForm.tsx b/src/pages/InnovativeService/components/UpdateForm.tsx index 527c606..c4c6557 100644 --- a/src/pages/InnovativeService/components/UpdateForm.tsx +++ b/src/pages/InnovativeService/components/UpdateForm.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useRef, useState } from 'react'; -import { DrawerForm, ProFormInstance, ProFormText, ProFormUploadButton, ProFormRadio, ProForm } from '@ant-design/pro-components'; +import { DrawerForm, ProFormInstance, ProFormText, ProFormUploadButton, ProFormRadio, ProForm, ProFormDigit } from '@ant-design/pro-components'; import { message } from 'antd'; import Upload, { RcFile } from 'antd/es/upload'; import { Editor } from '@/components/Editor'; @@ -116,6 +116,8 @@ const UpdateForm: React.FC = (props) => { }} initialValues={{ pbcTitle: props.values.pbcTitle, + pbcSubTitle: props.values.pbcSubTitle, + pbcPriority: props.values.pbcPriority, pbcType: props.values.pbcType || 1, pbcImage: props.values.pbcType === 1 && props.values.pbcPicAddress ? props.values.pbcPicAddress.split(',').map((e, index) => { return { @@ -164,6 +166,31 @@ const UpdateForm: React.FC = (props) => { width="md" name="pbcTitle" /> + + = () => { title: '标题', dataIndex: 'pbcTitle', }, + { + title: '副标题', + dataIndex: 'pbcSubTitle', + }, { title: '类型', dataIndex: 'pbcType', + width: 70, valueEnum: { 1: '图片', 2: '视频', 3: '文件', }, }, + { + title: '链接', + dataIndex: 'pbcId', + width: 170, + render: (_, record) => '/innovative-services/' + record.pbcId, + search: false, + }, { title: '创建时间', dataIndex: 'pbcCreateAt', valueType: 'date', + width: 100, + search: false, + }, + { + title: "停/启用状态", + dataIndex: 'pbcState', search: false, + width: 100, + render: (_, record) => + + { + const success = await handleUpdateState(record.pbcId || 0, value ? 1 : 2); + if (success) { + if (actionRef.current) { + actionRef.current.reload(); + } + } + }} + /> + }, { title: '操作', valueType: 'option', - width: 230, + width: 180, render: (text, record) => ( - - { - const success = await handleUpdateState(record.pbcId || 0, value ? 1 : 2); - if (success) { - if (actionRef.current) { - actionRef.current.reload(); - } - } - }} - /> -