From d835d1b51f832889929cdf69010034a30ef44d02 Mon Sep 17 00:00:00 2001
From: Junjie <xjj@123>
Date: 星期四, 17 十月 2024 13:57:29 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/pages/map/index.jsx | 28 +++++++++++++++++++---------
1 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/zy-asrs-flow/src/pages/map/index.jsx b/zy-asrs-flow/src/pages/map/index.jsx
index 6e970a7..8407a6d 100644
--- a/zy-asrs-flow/src/pages/map/index.jsx
+++ b/zy-asrs-flow/src/pages/map/index.jsx
@@ -1,7 +1,7 @@
import * as React from 'react'
import * as TWEEDLE from 'tweedle.js';
import { FormattedMessage, useIntl, useModel } from '@umijs/max';
-import { Layout, Button, Flex, Row, Col, FloatButton, Select, notification, Segmented, message } from 'antd';
+import { Layout, Button, Flex, Row, Col, FloatButton, Select, notification, Segmented, message, Popconfirm } from 'antd';
const { Header, Content } = Layout;
import {
AppstoreAddOutlined,
@@ -250,6 +250,10 @@
}, [curSprite]);
const prevCurSprite = prevCurSpriteRef.current;
+ const clearLockPathConfirm = (e) => {
+ clearLockPath(curFloor);
+ };
+
const clearLockPath = async (floor) => {
const hide = message.loading(intl.formatMessage({ id: 'page.clearing', defaultMessage: '姝e湪娓呯┖' }));
try {
@@ -345,15 +349,21 @@
{model === MapModel.OBSERVER_MODEL && (
<>
- <Button
- className='map-header-button'
- size={'large'}
- onClick={() => {
- clearLockPath(curFloor)
- }}
+ <Popconfirm
+ title="娓呯┖璺緞"
+ description="姝ゆ搷浣滃彲鑳藉鑷村皬杞︾鎾烇紝纭娓呯┖璺緞鍚楋紵"
+ onConfirm={clearLockPathConfirm}
+ okText="纭"
+ cancelText="鍙栨秷"
>
- <FormattedMessage id='map.clearLockPath' defaultMessage='娓呯┖璺緞' />
- </Button>
+ <Button
+ className='map-header-button'
+ size={'large'}
+ >
+ <FormattedMessage id='map.clearLockPath' defaultMessage='娓呯┖璺緞' />
+ </Button>
+ </Popconfirm>
+
<Button
className='map-header-button'
--
Gitblit v1.9.1