lanxin hai 4 días
pai
achega
ac0e0ac9b9

+ 3 - 3
front/package.json

@@ -14,7 +14,7 @@
     "@types/react": "^18.0.24",
     "@types/react-dom": "^18.0.8",
     "@zxing/library": "^0.21.3",
-    "antd": "^5.8.3",
+    "antd": "5.25.0",
     "antd-mobile": "^5.30.0",
     "axios": "^1.1.3",
     "braft-editor": "^2.3.9",
@@ -38,7 +38,7 @@
     "web-vitals": "^2.1.4"
   },
   "scripts": {
-    "dev": "craco start",
+    "dev": "craco start --host",
     "build": "craco build",
     "test": "craco test",
     "eject": "react-scripts eject"
@@ -68,4 +68,4 @@
     "react-app-rewired": "^2.2.1"
   },
   "homepage": "."
-}
+}

BIN=BIN
front/src/assets/img/headLineBg.png


+ 13 - 3
front/src/components/ImageLazy/index.tsx

@@ -16,7 +16,14 @@ type Props = {
   offline?: boolean
 }
 
-function ImageLazy({ width = 100, height = 100, src, srcBig, noLook, offline = false }: Props) {
+function ImageLazy({
+  width = 100,
+  height = 100,
+  src,
+  srcBig,
+  noLook,
+  offline = false
+}: Props) {
   // 默认不能预览图片,加载成功之后能预览
   const [lookImg, setLookImg] = useState(false)
 
@@ -29,7 +36,10 @@ function ImageLazy({ width = 100, height = 100, src, srcBig, noLook, offline = f
   const lookBigImg = useCallback(() => {
     store.dispatch({
       type: 'layout/lookBigImg',
-      payload: { url: offline ? src : srcBig ? baseURL + srcBig : baseURL + src, show: true }
+      payload: {
+        url: offline ? src : srcBig ? baseURL + srcBig : baseURL + src,
+        show: true
+      }
     })
   }, [offline, src, srcBig])
 
@@ -48,7 +58,7 @@ function ImageLazy({ width = 100, height = 100, src, srcBig, noLook, offline = f
         {/* 图片预览 */}
         {noLook || !lookImg ? null : (
           <div className='lookImg' onClick={lookBigImg}>
-            <EyeOutlined rev={undefined} />
+            <EyeOutlined />
             &nbsp;
             <div>预览</div>
           </div>

+ 1 - 1
front/src/components/ImageLazyList/index.tsx

@@ -67,7 +67,7 @@ function ImageLazy({
                   className='lookImg'
                   onClick={() => lookBigImg(item.thumb, item.filePath)}
                 >
-                  <EyeOutlined rev={undefined} />
+                  <EyeOutlined />
                   &nbsp;
                   <div>预览</div>
                 </div>

+ 8 - 7
front/src/components/LookDom/index.module.scss

@@ -1,24 +1,25 @@
 .LookDom {
-  transition: opacity .3s;
+  transition: opacity 0.3s;
   position: fixed;
-  z-index: 9991;
+  z-index: 10000;
   opacity: 0;
-  pointer-events: none;
+  pointer-events: none !important;
   top: 0;
   left: 0;
   width: 100vw;
   height: 100vh;
-  background-color: rgba(0, 0, 0, .6);
+  // background-color: rgba(0, 0, 0, 0.6);
 
   :global {
     .close {
+      opacity: 0;
       color: #fff;
       position: absolute;
       right: 70px;
       top: 70px;
       font-size: 30px;
       cursor: pointer;
-      z-index: 10;
+      z-index: 1000;
     }
 
     .viedoBox {
@@ -28,7 +29,7 @@
       transform: translate(-50%, -50%);
       width: 800px;
       height: 500px;
-
+      pointer-events: auto;
       video {
         width: 100%;
         height: 100%;
@@ -62,4 +63,4 @@
       }
     }
   }
-}
+}

+ 26 - 29
front/src/components/LookDom/index.tsx

@@ -1,53 +1,50 @@
 /* eslint-disable jsx-a11y/iframe-has-title */
-import React from "react";
-import { CloseCircleOutlined } from "@ant-design/icons";
-import styles from "./index.module.scss";
-import { useSelector } from "react-redux";
-import store, { RootState } from "@/store";
-import { baseURL } from "@/utils/http";
+import React from 'react'
+import { CloseCircleOutlined } from '@ant-design/icons'
+import styles from './index.module.scss'
+import { useSelector } from 'react-redux'
+import store, { RootState } from '@/store'
+import { baseURL } from '@/utils/http'
+
 function LookDom() {
-  const { src, type, flag } = useSelector(
-    (state: RootState) => state.A0Layout.lookDom
-  );
-  console.log(src, type, flag, '123');
+  const { src, type, flag } = useSelector((state: RootState) => state.A0Layout.lookDom)
+  const closeFu = () => {
+    store.dispatch({
+      type: 'layout/lookDom',
+      payload: { src: '', type: '', flag: false }
+    })
+  }
   return (
     <div
       className={styles.LookDom}
-      style={src ? { opacity: 1, pointerEvents: "auto" } : {}}
+      onClick={closeFu}
+      style={src ? { opacity: 1, pointerEvents: 'auto' } : {}}
     >
       {src ? (
         <>
-          {type === "video" ? (
-            <div className="viedoBox">
+          {type === 'video' ? (
+            <div className='viedoBox'>
               <video autoPlay controls src={flag ? src : baseURL + src}></video>
             </div>
-          ) : type === "audio" ? (
-            <div className="audioBox">
+          ) : type === 'audio' ? (
+            <div className='audioBox'>
               <audio autoPlay controls src={flag ? src : baseURL + src}></audio>
             </div>
           ) : (
-            <div className="modelBox">
+            <div className='modelBox'>
               <iframe src={`model.html?m=${src}`}></iframe>
             </div>
           )}
 
-          <div
-            className="close"
-            onClick={() =>
-              store.dispatch({
-                type: "layout/lookDom",
-                payload: { src: "", type: "", flag: false },
-              })
-            }
-          >
-            <CloseCircleOutlined rev={undefined} />
+          <div className='close' onClick={closeFu}>
+            <CloseCircleOutlined />
           </div>
         </>
       ) : null}
     </div>
-  );
+  )
 }
 
-const MemoLookDom = React.memo(LookDom);
+const MemoLookDom = React.memo(LookDom)
 
-export default MemoLookDom;
+export default MemoLookDom

+ 3 - 5
front/src/components/ZRichTexts/index.tsx

@@ -379,7 +379,7 @@ function ZRichTexts(
                   )}
                   onClick={() => moveSectionFu(index, -1)}
                 >
-                  <ArrowUpOutlined title='上移' rev={undefined} />
+                  <ArrowUpOutlined title='上移' />
                 </div>
                 &emsp;
                 <div
@@ -390,16 +390,14 @@ function ZRichTexts(
                   )}
                   onClick={() => moveSectionFu(index, 1)}
                 >
-                  <ArrowDownOutlined title='下移' rev={undefined} />
+                  <ArrowDownOutlined title='下移' />
                 </div>
                 &emsp;
                 {isLook || sectionArr.length <= 1 ? null : (
                   <MyPopconfirm
                     txtK='删除'
                     onConfirm={() => delSectionAllFu(item.id)}
-                    Dom={
-                      <DeleteOutlined title='删除' className='ZTbox2X' rev={undefined} />
-                    }
+                    Dom={<DeleteOutlined title='删除' className='ZTbox2X' />}
                   />
                 )}
               </div>

+ 2 - 3
front/src/components/ZupAudio/index.tsx

@@ -96,7 +96,6 @@ function ZupAudio({
         <div className='ZupAudio2'>
           <div title={fileInfo.fileName}>{fileInfo.fileName}</div>
           <EyeOutlined
-            rev={undefined}
             title='预览'
             onClick={() =>
               store.dispatch({
@@ -112,14 +111,14 @@ function ZupAudio({
               <MyPopconfirm
                 txtK='删除'
                 onConfirm={delFu}
-                Dom={<DeleteOutlined title='删除' className='ZTbox2X' rev={undefined} />}
+                Dom={<DeleteOutlined title='删除' className='ZTbox2X' />}
               />
             </>
           )}
         </div>
       ) : (
         <div className='ZupAudio1' onClick={() => myInput.current?.click()}>
-          <UploadOutlined rev={undefined} />
+          <UploadOutlined />
           <div className='ZupAudio1_1'>
             <p>上传无障碍音频</p>
             <p>支持{size}MB以下mp3格式</p>

+ 17 - 10
front/src/components/ZupOne/index.tsx

@@ -196,13 +196,13 @@ function ZupOne(
           className='file_upIcon'
           onClick={() => myInput.current?.click()}
         >
-          <PlusOutlined rev={undefined} />
+          <PlusOutlined />
         </div>
       ) : (
         <Button
           hidden={fileUrl.filePath !== ''}
           onClick={() => myInput.current?.click()}
-          icon={<UploadOutlined rev={undefined} />}
+          icon={<UploadOutlined />}
         >
           上传
         </Button>
@@ -226,7 +226,7 @@ function ZupOne(
             <MyPopconfirm
               txtK='删除'
               onConfirm={() => setFileUrl({ fileName: '', filePath: '', thumb: '' })}
-              Dom={<CloseOutlined rev={undefined} />}
+              Dom={<CloseOutlined />}
             />
           </div>
 
@@ -239,10 +239,14 @@ function ZupOne(
                   payload: { url: baseURL + fileUrl.filePath, show: true }
                 })
               }
-              rev={undefined}
             />
-            <a href={baseURL + fileUrl.filePath} download target='_blank' rel='noreferrer'>
-              <DownloadOutlined rev={undefined} />
+            <a
+              href={baseURL + fileUrl.filePath}
+              download
+              target='_blank'
+              rel='noreferrer'
+            >
+              <DownloadOutlined />
             </a>
           </div>
         </div>
@@ -255,7 +259,7 @@ function ZupOne(
             hidden={!fileUrl.filePath || myType === 'epub'}
             onClick={() => lookFileNoImgFu(myType)}
           >
-            <EyeOutlined rev={undefined} />
+            <EyeOutlined />
           </div>
           {/* 视频下载 */}
           <a
@@ -265,7 +269,7 @@ function ZupOne(
             className='clearCover'
             rel='noreferrer'
           >
-            <DownloadOutlined rev={undefined} />
+            <DownloadOutlined />
           </a>
           {/* 视频删除 */}
 
@@ -273,7 +277,7 @@ function ZupOne(
             <MyPopconfirm
               txtK='删除'
               onConfirm={() => setFileUrl({ fileName: '', filePath: '', thumb: '' })}
-              Dom={<CloseOutlined className='clearCover' rev={undefined} />}
+              Dom={<CloseOutlined className='clearCover' />}
             />
           )}
         </div>
@@ -283,7 +287,10 @@ function ZupOne(
         格式要求:支持{formatTxt}格式;最大支持{size}M。{upTxt}
         <br />
         <div
-          className={classNames('noUpThumb', !fileUrl.filePath && fileCheck ? 'noUpThumbAc' : '')}
+          className={classNames(
+            'noUpThumb',
+            !fileUrl.filePath && fileCheck ? 'noUpThumbAc' : ''
+          )}
         >
           {checkTxt}
         </div>

+ 39 - 14
front/src/components/ZupTypes/index.tsx

@@ -210,7 +210,17 @@ function ZupTypes(
         }
       }
     },
-    [audioSize, dirCode, fileList, fileOneType, imgSize, isUpName, modelSize, myUrl, videoSize]
+    [
+      audioSize,
+      dirCode,
+      fileList,
+      fileOneType,
+      imgSize,
+      isUpName,
+      modelSize,
+      myUrl,
+      videoSize
+    ]
   )
 
   // 附件图片的拖动
@@ -270,7 +280,7 @@ function ZupTypes(
                   })
                 }
               >
-                <EyeOutlined rev={undefined} />
+                <EyeOutlined />
               </div>
 
               <a
@@ -280,18 +290,18 @@ function ZupTypes(
                 className='ZTbox2Down'
                 rel='noreferrer'
               >
-                <DownloadOutlined rev={undefined} />
+                <DownloadOutlined />
               </a>
 
               <MyPopconfirm
                 txtK='删除'
                 onConfirm={() => setFileList({ ...fileList, [type]: {} as FileListType })}
-                Dom={<CloseCircleOutlined className='ZTbox2X' rev={undefined} />}
+                Dom={<CloseCircleOutlined className='ZTbox2X' />}
               />
             </div>
           ) : (
             <>
-              <Button onClick={() => upFileFu(type)} icon={<UploadOutlined rev={undefined} />}>
+              <Button onClick={() => upFileFu(type)} icon={<UploadOutlined />}>
                 上传
               </Button>
 
@@ -452,11 +462,13 @@ function ZupTypes(
 
           <div className='ZTbox1Img' style={{ width: isTypeShow ? '100%' : '' }}>
             <div
-              hidden={(!!fileList.img.length && fileList.img.length >= imgLength) || isLook}
+              hidden={
+                (!!fileList.img.length && fileList.img.length >= imgLength) || isLook
+              }
               className='ZTbox1ImgIcon'
               onClick={() => upFileFu('img')}
             >
-              <PlusOutlined rev={undefined} />
+              <PlusOutlined />
             </div>
             {fileList.img.map((v, i) => (
               <div
@@ -469,10 +481,17 @@ function ZupTypes(
                 onDragEnd={() => setDragImg(null)}
               >
                 {v.thumb || v.filePath ? (
-                  <ImageLazy noLook={true} width={100} height={100} src={v.thumb || v.filePath} />
+                  <ImageLazy
+                    noLook={true}
+                    width={100}
+                    height={100}
+                    src={v.thumb || v.filePath}
+                  />
                 ) : null}
 
-                {oneIsCover && i === 0 ? <div className='ZTbox1ImgRowCover'>封面</div> : null}
+                {oneIsCover && i === 0 ? (
+                  <div className='ZTbox1ImgRowCover'>封面</div>
+                ) : null}
 
                 {/* 修改图片名字 */}
                 {isUpName ? (
@@ -496,17 +515,21 @@ function ZupTypes(
                         }
                       })
                     }
-                    rev={undefined}
                   />
-                  <a href={baseURL + v.filePath} download target='_blank' rel='noreferrer'>
-                    <DownloadOutlined rev={undefined} />
+                  <a
+                    href={baseURL + v.filePath}
+                    download
+                    target='_blank'
+                    rel='noreferrer'
+                  >
+                    <DownloadOutlined />
                   </a>
                 </div>
 
                 <MyPopconfirm
                   txtK='删除'
                   onConfirm={() => delImgListFu(v.id!)}
-                  Dom={<CloseOutlined className='ZTbox1ImgRowX' rev={undefined} />}
+                  Dom={<CloseOutlined className='ZTbox1ImgRowX' />}
                 />
               </div>
             ))}
@@ -532,7 +555,9 @@ function ZupTypes(
       {resOneDivDom('video')}
 
       {/* 最后的提示 */}
-      <div className={classNames('ZcheckTxt', fileCheck && fileCheckFu ? 'ZcheckTxtAc' : '')}>
+      <div
+        className={classNames('ZcheckTxt', fileCheck && fileCheckFu ? 'ZcheckTxtAc' : '')}
+      >
         请最少上传一张图片!
       </div>
 

+ 19 - 10
front/src/pages/A1home/index.tsx

@@ -72,7 +72,6 @@ function A1home() {
     []
   )
 
-
   const { list: listAll } = useSelector((state: RootState) => state.Martyr.tableInfo)
   const martyrListByCity = useMemo(
     () =>
@@ -186,6 +185,8 @@ function A1home() {
     }
   }, [])
 
+  // 添加“(数量)”到城市末尾
+
   // 更改tooltip文本内容
   const changeTooltipText = useCallback((cityId: string, text: string) => {
     if (svgRef.current) {
@@ -202,7 +203,7 @@ function A1home() {
             const target = e.target as SVGElement
             const tooltip = svgRef.current?.querySelector(`#tap-${target.id}Tooltip`)
             if (tooltip) {
-              ; (tooltip as HTMLElement).style.opacity = '0'
+              ;(tooltip as HTMLElement).style.opacity = '0'
             }
           })
         })
@@ -226,7 +227,8 @@ function A1home() {
           console.log(martyrListByCity[item][0].cityId)
           addTooltip(
             `${martyrListByCity[item][0].cityId}`,
-            `烈士 ${martyrListByCity[item].length} | 亲属 ${relativeList[item]?.length || 0
+            `烈士 ${martyrListByCity[item].length} | 亲属 ${
+              relativeList[item]?.length || 0
             } | 线索 ${clueList[item]?.length || 0}`
           )
         })
@@ -240,14 +242,14 @@ function A1home() {
     const target = e.target as SVGElement
     const tooltip = svgRef.current?.querySelector(`#tap-${target.id}Tooltip`)
     if (tooltip) {
-      ; (tooltip as HTMLElement).style.opacity = '1'
+      ;(tooltip as HTMLElement).style.opacity = '1'
     }
   }, [])
   const mouseLeave = useCallback((e: MouseEvent) => {
     const target = e.target as SVGElement
     const tooltip = svgRef.current?.querySelector(`#tap-${target.id}Tooltip`)
     if (tooltip) {
-      ; (tooltip as HTMLElement).style.opacity = '0'
+      ;(tooltip as HTMLElement).style.opacity = '0'
     }
   }, [])
   const clickCity = useCallback(
@@ -266,7 +268,6 @@ function A1home() {
         } else {
           setCurCityId('')
         }
-
       }, 800)
     },
     [focusOnCity, isDragging, martyrListByCity]
@@ -348,7 +349,9 @@ function A1home() {
     (cityId: string, name: string, martyrId: number) => {
       getMartyrDetail(martyrId).then(res => {
         setMartyrDetail(res.data)
-        const arrowToCity = res.data.kinship.map((item: any) => nameToCityId[item.city]).filter((item: any) => item?.city !== res.data.nativeCity)
+        const arrowToCity = res.data.kinship
+          .map((item: any) => nameToCityId[item.city])
+          .filter((item: any) => item?.city !== res.data.nativeCity)
         console.log(arrowToCity, 'arrowToCity')
         drawArrows(cityId, arrowToCity)
       })
@@ -359,7 +362,6 @@ function A1home() {
       focusOnCity(cityId)
       changeTooltipText(cityId, name)
       setEnableTooltipEvents(false)
-
     },
     [changeTooltipText, drawArrows, focusOnCity, getMartyrDetail, getRelationList]
   )
@@ -479,13 +481,20 @@ function A1home() {
         classN={isAddClassName ? 'animatedR' : ''}
         handleItemClick={handleItemClick}
       />
-      <Detail relationList={relationList} martyrDetail={martyrDetail} classN={isAddClassName ? 'animatedD' : ''} />
+      <Detail
+        relationList={relationList}
+        martyrDetail={martyrDetail}
+        classN={isAddClassName ? 'animatedD' : ''}
+      />
       <img
         className={isAddClassName ? 'headLine animatedH' : 'headLine'}
         src={require('@/assets/img/headLineBg.png')}
         alt=''
       />
-      <BottomSearch handleItemClick={handleItemClick} classN={isAddClassName ? 'animatedB' : ''} />
+      <BottomSearch
+        handleItemClick={handleItemClick}
+        classN={isAddClassName ? 'animatedB' : ''}
+      />
     </div>
   )
 }

+ 8 - 0
front/src/pages/components/Detail/index.module.scss

@@ -139,11 +139,13 @@
                   cursor: pointer;
                 }
                 .videoMask {
+                  opacity: 0;
                   width: 100%;
                   height: 100%;
                   top: 0;
                   pointer-events: none;
                   position: absolute;
+                  transition: all 0.3s ease-in-out;
                   & > img {
                     width: 30px;
                     height: 30px;
@@ -153,6 +155,12 @@
                     transform: translate(-50%, -50%);
                   }
                 }
+                &:hover {
+                  .videoMask {
+                    opacity: 1;
+                    background-color: rgba(0, 0, 0, 0.5);
+                  }
+                }
               }
             }
           }

+ 59 - 12
front/src/pages/components/Detail/index.tsx

@@ -1,13 +1,13 @@
 import React, { useState, useCallback, useMemo } from 'react'
 import styles from './index.module.scss'
 import classNames from 'classnames'
-import RelationEcharts from './RelationEcharts/index'
-import { Timeline, Image } from 'antd'
+// import RelationEcharts from './RelationEcharts/index'
+import { Timeline, Image, Button } from 'antd'
 import store from '@/store'
 import { MartyrItem, RelationShipItem } from '@/types/api/martyr'
 import { ClueItem } from '@/types/api/clue'
 import ImageLazy from '@/components/ImageLazy/index'
-import ImageLazyList from '@/components/ImageLazyList/index'
+// import ImageLazyList from '@/components/ImageLazyList/index'
 import imgErr from '@/assets/img/IMGerror.png'
 import { baseURL } from '@/utils/http'
 
@@ -100,7 +100,38 @@ function Detail({ classN, relationList, martyrDetail }: DetailProps) {
                   <div className='media'>
                     <>
                       {martyrDetail && (
-                        <Image.PreviewGroup>
+                        <Image.PreviewGroup
+                          preview={{
+                            onChange: (current: number, prev: number) => {
+                              if (current >= martyrDetail.img?.length) {
+                                lookFileFu(
+                                  martyrDetail?.video?.[
+                                    current - martyrDetail.img?.length
+                                  ].filePath
+                                )
+                              } else {
+                                store.dispatch({
+                                  type: 'layout/lookDom',
+                                  payload: { src: '', type: '', flag: false }
+                                })
+                              }
+                            },
+                            onVisibleChange: (visible: boolean) => {
+                              if (!visible) {
+                                store.dispatch({
+                                  type: 'layout/lookDom',
+                                  payload: { src: '', type: '', flag: false }
+                                })
+                              }
+                            },
+                            toolbarRender: (_: any, { current }: { current: number }) => {
+                              if (current >= martyrDetail.img?.length) {
+                                return null
+                              }
+                              return _
+                            }
+                          }}
+                        >
                           {martyrDetail.img?.map((item: any, index: number) => {
                             return (
                               <Image
@@ -108,7 +139,9 @@ function Detail({ classN, relationList, martyrDetail }: DetailProps) {
                                 height={'140px'}
                                 src={baseURL + item.thumb}
                                 preview={{
-                                  src: baseURL + item.filePath
+                                  destroyOnHidden: true,
+                                  src: baseURL + item.filePath,
+                                  toolbarRender: () => null
                                 }}
                                 placeholder={
                                   <img src={require('@/assets/img/loading.gif')} alt='' />
@@ -117,6 +150,21 @@ function Detail({ classN, relationList, martyrDetail }: DetailProps) {
                               />
                             )
                           })}
+                          {martyrDetail?.video?.map((item: any, index: number) => {
+                            return (
+                              <Image
+                                className={`video_${item.id}`}
+                                width={'0'}
+                                height={'0'}
+                                // src='https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png'
+                                preview={{
+                                  src: ''
+                                }}
+                                onClick={() => lookFileFu(item.filePath)}
+                                key={item.id}
+                              />
+                            )
+                          })}
                         </Image.PreviewGroup>
                       )}
                       {martyrDetail?.video?.map((item: any, index: number) => {
@@ -126,7 +174,12 @@ function Detail({ classN, relationList, martyrDetail }: DetailProps) {
                               src={baseURL + item.thumb}
                               onClick={e => {
                                 e.stopPropagation()
-                                lookFileFu(item.filePath)
+                                const dom: HTMLDivElement = document.querySelector(
+                                  `.video_${item.id}`
+                                )!
+                                if (dom) {
+                                  dom.click()
+                                }
                               }}
                             />
                             <div className='videoMask'>
@@ -228,12 +281,6 @@ function Detail({ classN, relationList, martyrDetail }: DetailProps) {
                           <div
                             dangerouslySetInnerHTML={{ __html: content.txtArr[0].txt }}
                           />
-                          <div>
-                            <img
-                              src={baseURL + content.txtArr[0].fileInfo.filePath}
-                              alt=''
-                            />
-                          </div>
                         </div>
                       )
                     }

+ 5 - 2
front/src/pages/components/Left/index.module.scss

@@ -114,15 +114,18 @@
               .labelList {
                 display: flex;
                 gap: 10px;
-                height: 35px;
+                height: 30px;
                 .label {
                   width: 95px;
                   height: 100%;
                   font-size: 13px;
+                  color: #f5eeed;
+                  font-weight: 600;
                   display: flex;
                   align-items: center;
                   justify-content: center;
-                  background: url('../../../assets/img/label.png');
+                  border-radius: 20px;
+                  background: linear-gradient(to bottom, #fcaf80, #b15013);
                   background-size: cover;
                 }
               }

+ 33 - 11
front/src/pages/components/MapTab/index.tsx

@@ -1,4 +1,4 @@
-import React, { useMemo, useCallback } from 'react'
+import React, { useMemo } from 'react'
 import styles from './index.module.scss'
 import { Tabs } from 'antd'
 import type { TabsProps } from 'antd'
@@ -14,25 +14,51 @@ type MapTabProps = {
   handleItemClick: (cityId: string, name: string, martyrId: number) => void
 }
 function MapTab(props: MapTabProps) {
-
-
   const cityName = useMemo(() => cityIdToName[props.cityId], [props.cityId])
 
   const items: TabsProps['items'] = [
     {
       key: '1',
       label: '烈士',
-      children: props.martyrListByCity[cityName].map((item, index) => <div className='text' onClick={() => props.handleItemClick(props.cityId, item.name, item.id)} key={index}>{item.name}</div>)
+      children: props.martyrListByCity[cityName].map((item, index) => (
+        <div
+          className='text'
+          onClick={() => props.handleItemClick(props.cityId, item.name, item.id)}
+          key={index}
+        >
+          {item.name}
+        </div>
+      ))
     },
     {
       key: '2',
       label: '亲属',
-      children: props.relativeList[cityName]?.map((item, index) => <div className='text' onClick={() => props.handleItemClick(props.cityId, item.martyrName, item.martyrId)} key={index}>{item.name}</div>) || <div>暂无</div>
+      children: props.relativeList[cityName]?.map((item, index) => (
+        <div
+          className='text'
+          onClick={() =>
+            props.handleItemClick(props.cityId, item.martyrName, item.martyrId)
+          }
+          key={index}
+        >
+          {item.name}
+        </div>
+      )) || <div>暂无</div>
     },
     {
       key: '3',
       label: '线索',
-      children: props.clueList[cityName]?.map((item, index) => <div className='text' onClick={() => props.handleItemClick(props.cityId, item.martyrName, item.martyrId)} key={index}>{item.remark}</div>) || <div>暂无</div>
+      children: props.clueList[cityName]?.map((item, index) => (
+        <div
+          className='text'
+          onClick={() =>
+            props.handleItemClick(props.cityId, item.martyrName, item.martyrId)
+          }
+          key={index}
+        >
+          {item.remark}
+        </div>
+      )) || <div>暂无</div>
     }
   ]
 
@@ -48,11 +74,7 @@ function MapTab(props: MapTabProps) {
   )
   return (
     <div className={styles.MapTab}>
-      <Tabs
-        defaultActiveKey='1'
-        tabBarExtraContent={operations}
-        items={items}
-      />
+      <Tabs defaultActiveKey='1' tabBarExtraContent={operations} items={items} />
     </div>
   )
 }

+ 1 - 1
front/src/pages/components/Right/index.tsx

@@ -1,4 +1,4 @@
-import React, { useEffect, useCallback, useState } from 'react'
+import React from 'react'
 import styles from './index.module.scss'
 import classNames from 'classnames'
 

+ 1 - 1
front/src/utils/history.ts

@@ -2,9 +2,9 @@ import { createHashHistory } from 'history'
 const history = createHashHistory()
 export default history
 
+// eslint-disable-next-line @typescript-eslint/no-unused-vars
 type Option = {
   value: string
   label: string
   children?: Option[]
 }
-

+ 1 - 1
front/src/utils/http.ts

@@ -4,7 +4,7 @@ import store from '@/store'
 import { MessageFu } from './message'
 import { domShowFu } from './domShow'
 
-const envFlag = process.env.NODE_ENV === 'development'
+// const envFlag = process.env.NODE_ENV === 'development'
 
 // const baseUrlTemp = 'https://sit-jinanlsly.4dage.com/' // 测试环境
 const baseUrlTemp = 'https://sit-jinanlsly.4dage.com/' // 线下环境

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 379 - 279
front/yarn.lock