This commit is contained in:
ylj20011123 2025-08-08 18:32:49 +08:00
parent c1f19fdafc
commit ab65611732
5 changed files with 41 additions and 10 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "ant-design-pro", "name": "ant-design-pro",
"version": "4.5.18", "version": "4.5.21",
"private": true, "private": true,
"description": "An out-of-box UI solution for enterprise applications", "description": "An out-of-box UI solution for enterprise applications",
"scripts": { "scripts": {

View File

@ -1,5 +1,4 @@
// 首页广告 // 首页广告
// 地址管理
import React, { useRef, useState, Suspense, useEffect } from 'react'; import React, { useRef, useState, Suspense, useEffect } from 'react';
import moment from 'moment'; // 时间相关引用,没有使用可以删除 import moment from 'moment'; // 时间相关引用,没有使用可以删除
import numeral from "numeral"; // 数字相关引用,没有使用可以删除 import numeral from "numeral"; // 数字相关引用,没有使用可以删除
@ -41,6 +40,7 @@ const beforeUpload = (file: any) => {
const HomepageAds: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => { const HomepageAds: React.FC<{ currentUser: CurrentUser | undefined }> = (props) => {
const { currentUser } = props const { currentUser } = props
const { confirm } = Modal;
const actionRef = useRef<ActionType>(); const actionRef = useRef<ActionType>();
const formRef = useRef<FormInstance>(); const formRef = useRef<FormInstance>();
const [currentRow, setCurrentRow] = useState<any>(); const [currentRow, setCurrentRow] = useState<any>();
@ -350,6 +350,7 @@ const HomepageAds: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
<Modal <Modal
title={ title={
<div <div
className='HomepageAds'
style={{ style={{
width: '100%', width: '100%',
cursor: 'move', cursor: 'move',
@ -397,6 +398,7 @@ const HomepageAds: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
disabled={disabled} disabled={disabled}
bounds={bounds} bounds={bounds}
onStart={(event, uiData) => onDraggaleStart(event, uiData)} onStart={(event, uiData) => onDraggaleStart(event, uiData)}
handle={'.HomepageAds'}
> >
<div ref={draggleRef}>{modal}</div> <div ref={draggleRef}>{modal}</div>
</Draggable> </Draggable>
@ -503,6 +505,17 @@ const HomepageAds: React.FC<{ currentUser: CurrentUser | undefined }> = (props)
} else { } else {
message.error("您上传的图片不存在.") message.error("您上传的图片不存在.")
} }
},
onChange: async (info: any) => {
if (info.file.status === 'removed') {
confirm({
title: '确认删除该图片吗?',
icon: <ExclamationCircleOutlined rev={undefined} />,
async onOk() {
setFileList([])
}
});
}
} }
}} }}
/> />

View File

@ -1,3 +1,4 @@
// 失物招领申请
import { connect } from "umi"; import { connect } from "umi";
import type { CurrentUser } from "umi"; import type { CurrentUser } from "umi";
import type { ConnectState } from "@/models/connect"; import type { ConnectState } from "@/models/connect";
@ -49,8 +50,6 @@ const LostandFoundAPPliance: React.FC<{ currentUser: CurrentUser }> = (props) =>
// 显示新增窗口 // 显示新增窗口
const [showAddModal, setShowAddModal] = useState<boolean>(false) const [showAddModal, setShowAddModal] = useState<boolean>(false)
// 树相关的属性和方法 // 树相关的属性和方法
const [selectedId, setSelectedId] = useState<string>() const [selectedId, setSelectedId] = useState<string>()
// 导出的加载效果 // 导出的加载效果
@ -162,6 +161,7 @@ const LostandFoundAPPliance: React.FC<{ currentUser: CurrentUser }> = (props) =>
align: 'center', align: 'center',
valueType: 'select', valueType: 'select',
valueEnum: { valueEnum: {
"1": "审核通过",
"2": "审核中", "2": "审核中",
"9": "已驳回" "9": "已驳回"
}, },
@ -216,7 +216,6 @@ const LostandFoundAPPliance: React.FC<{ currentUser: CurrentUser }> = (props) =>
// } // }
] ]
// 悬浮框的关闭事件 // 悬浮框的关闭事件
const handleModalClose = () => { const handleModalClose = () => {
setConfirmLoading(false) setConfirmLoading(false)
@ -302,6 +301,8 @@ const LostandFoundAPPliance: React.FC<{ currentUser: CurrentUser }> = (props) =>
const handleChangePreview = (val: any) => { const handleChangePreview = (val: any) => {
setImagePreviewVisible(val) setImagePreviewVisible(val)
} }
return ( return (
<div ref={(el) => { <div ref={(el) => {
// 打印报表 // 打印报表
@ -350,7 +351,7 @@ const LostandFoundAPPliance: React.FC<{ currentUser: CurrentUser }> = (props) =>
SearchParameter: { SearchParameter: {
SUGGESTION_TYPES: 4000, SUGGESTION_TYPES: 4000,
SERVERPART_IDS: selectedId, SERVERPART_IDS: selectedId,
SUGGESTION_STATES: "2,9", SUGGESTION_STATES: "1,2,9",
ENUM_LABEL: params?.ENUM_LABEL || '' ENUM_LABEL: params?.ENUM_LABEL || ''
}, },
PageIndex: 1, PageIndex: 1,
@ -403,6 +404,23 @@ const LostandFoundAPPliance: React.FC<{ currentUser: CurrentUser }> = (props) =>
onCancel={() => { onCancel={() => {
handleModalClose() handleModalClose()
}} }}
footer={currentRow?.SUGGESTION_ID ? false :
<div style={{ width: '100%', display: 'flex', alignItems: 'center', justifyContent: 'space-between', boxSizing: 'border-box', padding: '0 16px' }}>
<div></div>
<div>
<Button style={{ marginRight: '8px' }} onClick={() => {
handleModalClose()
}}></Button>
<Button type={'primary'} loading={confirmLoading} onClick={() => {
modalRef.current?.validateFields().then(async (res: any) => {
setConfirmLoading(true)
await handleAddLostThing(res)
setConfirmLoading(false)
})
}}></Button>
</div>
</div>
}
okText={"发起申请"} okText={"发起申请"}
onOk={async () => { // 提交框内的数据 onOk={async () => { // 提交框内的数据
modalRef.current?.validateFields().then(async (res: any) => { modalRef.current?.validateFields().then(async (res: any) => {

View File

@ -465,7 +465,7 @@ const MemberDetail = ({ showDetailDrawer, currentRow, handleCloseModal, currentU
style={{ width: '150px' }} style={{ width: '150px' }}
value={selectUserLabel} value={selectUserLabel}
dropdownStyle={{ maxHeight: 400, overflow: 'auto' }} dropdownStyle={{ maxHeight: 400, overflow: 'auto' }}
placeholder="Please select" placeholder="请选择会员标签"
allowClear allowClear
treeDefaultExpandAll treeDefaultExpandAll
onChange={(e: any) => { onChange={(e: any) => {

View File

@ -1,4 +1,4 @@
// 由 scripts/writeVersion.js 自动生成 // 由 scripts/writeVersion.js 自动生成
export const VERSION = "4.5.18"; export const VERSION = "4.5.21";
export const GIT_HASH = "a07144f"; export const GIT_HASH = "c1f19fd";
export const BUILD_TIME = "2025-08-06T11:01:18.410Z"; export const BUILD_TIME = "2025-08-08T10:13:54.850Z";