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(); - } - } - }} - /> -