lanxin 1 tháng trước cách đây
mục cha
commit
4e73026284

+ 11 - 1
front/src/pages/A1home/index.tsx

@@ -179,6 +179,7 @@ function A1home() {
       // 计算提示框位置(城市下方)
       rect.setAttribute('x', (cityCX - 50).toString()) // 100宽度居中
       rect.setAttribute('y', (cityCY + 20).toString()) // 下移20px
+      // console.log(city, '现在城市')
       text.setAttribute('x', cityCX.toString())
       text.setAttribute('y', (cityCY + 30).toString()) // 文字在矩形内居中
       countText.setAttribute('x', (cityCX + 14).toString()) // 矩形中心
@@ -238,6 +239,7 @@ function A1home() {
         })
 
         Object.keys(martyrListByCity).forEach(item => {
+          console.log(martyrListByCity, '所有城市')
           console.log(martyrListByCity[item][0].cityId)
           martyrListByCity[item][0].cityId &&
             addTooltip(
@@ -274,7 +276,6 @@ function A1home() {
         return
       }
       const target = e.target as SVGElement
-      console.log(target.id)
       focusOnCity(`tap-${target.id}`)
       setTimeout(() => {
         if (martyrListByCity[cityIdToName[`tap-${target.id}`]]) {
@@ -390,6 +391,7 @@ function A1home() {
       svgRef.current.style.height = '100%'
       panZoomInstance.current = svgPanZoom(svgRef.current, {
         zoomEnabled: true,
+        dblClickZoomEnabled: false,
         panEnabled: true,
         controlIconsEnabled: false,
         fit: true,
@@ -470,6 +472,14 @@ function A1home() {
 
   // 在useEffect中添加箭头标记定义
   useEffect(() => {
+    // window.addEventListener(
+    //   'dblclick',
+    //   function (event) {
+    //     event.preventDefault()
+    //     event.stopPropagation()
+    //   },
+    //   true
+    // )
     if (svgRef.current) {
       addDefs(svgRef)
     }

+ 1 - 0
front/src/pages/components/BottomSearch/index.tsx

@@ -20,6 +20,7 @@ function BottomSearch({ classN, handleItemClick }: BottomSearchProps) {
   const [searchList, setSearchList] = useState<MartyrItem[]>([])
 
   const { list: listAll } = useSelector((state: RootState) => state.Martyr.tableInfo)
+  console.log(listAll.length, 'bottomSearch')
 
   useEffect(() => {
     const martyrSearch = (name: string) => {

+ 14 - 3
front/src/pages/components/Detail/index.module.scss

@@ -46,14 +46,14 @@
             display: flex;
             align-items: center;
             width: 100%;
-            height: 185px;
+            height: 205px;
             gap: 16px;
             .right {
               width: 67%;
               height: 100%;
               display: flex;
               flex-direction: column;
-              gap: 10px;
+              gap: 8px;
               .name {
                 display: flex;
                 align-items: center;
@@ -69,7 +69,18 @@
               .home,
               .sacrifice {
                 height: fit-content;
-                max-height: 35px;
+                max-height: 36px;
+                display: -webkit-box;
+                -webkit-box-orient: vertical;
+                -webkit-line-clamp: 2;
+                line-clamp: 2;
+                overflow: hidden;
+                text-overflow: ellipsis;
+                line-height: 1.4em;
+              }
+              .tombAddress {
+                height: fit-content;
+                max-height: 36px;
                 display: -webkit-box;
                 -webkit-box-orient: vertical;
                 -webkit-line-clamp: 2;

+ 1 - 0
front/src/pages/components/Detail/index.tsx

@@ -83,6 +83,7 @@ function Detail({ classN, relationList, martyrDetail }: DetailProps) {
                     {martyrDetail?.nativeRegion},{martyrDetail?.nativeAddress}
                   </div>
                   <div className='sacrifice'>{`牺牲地:${martyrDetail?.lossProvince}-${martyrDetail?.lossCity}-${martyrDetail?.lossRegion},${martyrDetail?.lossAddress}`}</div>
+                  <div className='tombAddress'>{`墓区位置:${martyrDetail?.tombAddress}`}</div>
                 </div>
               </div>
               <div className='title_img'>

+ 12 - 4
front/src/pages/components/Left/index.tsx

@@ -85,15 +85,23 @@ function Left(props: LeftProps) {
             <div className='num'>{topInfo?.[2].pcs}</div>
           </div>
           <div className='topInfoItem'>
-            <div className='title'>
-              <img src={require('@/assets/img/finding.png')} alt='' />
+            <div className='title' style={{ height: '55%', paddingRight: '15px ' }}>
+              <img
+                src={require('@/assets/img/finding.png')}
+                alt=''
+                style={{ height: '28px', objectFit: 'contain' }}
+              />
               <div>寻亲中</div>
             </div>
             <div className='num'>{topInfo?.[3].pcs}</div>
           </div>
           <div className='topInfoItem'>
-            <div className='title'>
-              <img src={require('@/assets/img/found.png')} alt='' />
+            <div className='title' style={{ height: '55%', paddingRight: '15px ' }}>
+              <img
+                src={require('@/assets/img/found.png')}
+                alt=''
+                style={{ height: '22px', objectFit: 'contain' }}
+              />
               <div>已找到</div>
             </div>
             <div className='num'>{topInfo?.[4].pcs}</div>

+ 14 - 3
front/src/pages/components/Right/index.module.scss

@@ -45,13 +45,13 @@
             display: flex;
             align-items: center;
             width: 100%;
-            height: 135px;
+            height: 170px;
             .left {
               width: 67%;
               height: 100%;
               display: flex;
               flex-direction: column;
-              gap: 10px;
+              gap: 8px;
               .name {
                 display: flex;
                 align-items: center;
@@ -66,7 +66,18 @@
               }
               .home {
                 height: fit-content;
-                max-height: 35px;
+                max-height: 36px;
+                display: -webkit-box;
+                -webkit-box-orient: vertical;
+                -webkit-line-clamp: 2;
+                line-clamp: 2;
+                overflow: hidden;
+                text-overflow: ellipsis;
+                line-height: 1.4em;
+              }
+              .tombAddress {
+                height: fit-content;
+                max-height: 36px;
                 display: -webkit-box;
                 -webkit-box-orient: vertical;
                 -webkit-line-clamp: 2;

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

@@ -14,7 +14,7 @@ type RightProps = {
 }
 function Right(props: RightProps) {
   const { list: listAll } = useSelector((state: RootState) => state.Martyr.tableInfo)
-  console.log(listAll)
+  console.log(listAll.length, 'right')
 
   // const handleItemClick = useCallback(
   //   (cityId: string, name: string) => {
@@ -50,6 +50,7 @@ function Right(props: RightProps) {
                       {item.dateStart} - {item.dateEnd}
                     </div>
                     <div className='home'>{`籍贯:${item.nativeProvince}-${item.nativeCity}-${item.nativeRegion}`}</div>
+                    <div className='tombAddress'>{` 墓区位置:${item.tombAddress}`}</div>
                   </div>
 
                   <div className='right' onClick={e => e.stopPropagation()}>

+ 5 - 4
front/src/store/action/martyr.ts

@@ -16,20 +16,21 @@ export const Martyr_APIgetList = (data: Martyr_APIgetListParams): any => {
   return async (dispatch: AppDispatch) => {
     const res = await http.get('show/martyr/getList', { params: data })
     if (res.code === 0) {
+      console.log(res.data.length, 'res.data')
       const cityMap: Record<string, string> = {
         东营市: 'tap-dongying',
         济南市: 'tap-jinan',
         青岛市: 'tap-qingdao',
-        淄博市: 'tap-zhob',
+        淄博市: 'tap-zibo',
         潍坊市: 'tap-weifang',
         烟台市: 'tap-yantai',
         威海市: 'tap-weihai',
-        日照市: 'tap-rizhisi',
+        日照市: 'tap-rizhao',
         临沂市: 'tap-linyi',
         枣庄市: 'tap-zaozhuang',
-        聊城市: 'tap-chaoyang',
+        聊城市: 'tap-liaocheng',
         滨州市: 'tap-binzhou',
-        菏泽市: 'tap-herz',
+        菏泽市: 'tap-heze',
         德州市: 'tap-dezhou',
         泰安市: 'tap-taian',
         济宁市: 'tap-jining'

+ 76 - 75
front/src/types/api/martyr.d.ts

@@ -1,77 +1,78 @@
- export interface MartyrItem {
-      clue: any ,
-      clueRemark: string,
-      clueType: string,
-      createTime: string,
-      creatorId: number,
-      creatorName: string,
-      dateEnd: string,
-      dateStart: string,
-      dictPanId: number,
-      dictPanName: string,
-      gender: number,
-      id: number,
-      img: any,
-      imgIds: string,
-      intro: string,
-      kinship: any,
-      life: any,
-      link: string,
-      lossAddress: string,
-      lossCity: string,
-      lossProvince: string,
-      lossRegion: string,
-      name: string,
-      nation: string,
-      nativeAddress: string,
-      nativeCity: string,
-      nativeProvince: string,
-      nativeRegion: string, 
-      num: string,  
-      relic: any,
-      remark: string,
-      thumb: string,
-      thumbPc: string,
-      updateTime: string,
-      video: any,
-      videoIds: string,
-      cityId: string,
-    }
+export interface MartyrItem {
+  clue: any
+  clueRemark: string
+  clueType: string
+  createTime: string
+  creatorId: number
+  creatorName: string
+  dateEnd: string
+  dateStart: string
+  dictPanId: number
+  dictPanName: string
+  gender: number
+  id: number
+  img: any
+  imgIds: string
+  intro: string
+  kinship: any
+  life: any
+  link: string
+  lossAddress: string
+  lossCity: string
+  lossProvince: string
+  lossRegion: string
+  name: string
+  nation: string
+  nativeAddress: string
+  nativeCity: string
+  nativeProvince: string
+  nativeRegion: string
+  num: string
+  relic: any
+  remark: string
+  thumb: string
+  thumbPc: string
+  updateTime: string
+  video: any
+  videoIds: string
+  cityId: string
+  tombAddress: string
+}
 
-  export interface RelativeItem{
-      address: string,
-      city: string,
-      contact: string,
-      createTime: string,
-      creatorId: number,
-      creatorName: string,
-      id: number,
-      img: any,
-      imgIds: string,
-      intro: string,
-      martyrId: number,
-      martyrName: string,
-      name: string,
-      province: string,
-      region: string,
-      relation: null,
-      remark: string,
-      updateTime: string,
-      video: null,
-      videoIds: string
-  }
+export interface RelativeItem {
+  address: string
+  city: string
+  contact: string
+  createTime: string
+  creatorId: number
+  creatorName: string
+  id: number
+  img: any
+  imgIds: string
+  intro: string
+  martyrId: number
+  martyrName: string
+  name: string
+  province: string
+  region: string
+  relation: null
+  remark: string
+  updateTime: string
+  video: null
+  videoIds: string
+}
 
-  export interface RelationShipItem{
-    createTime: string,
-    creatorId: number,
-    creatorName: string,
-    id: number,
-    martyrId: number,
-    martyrName: string,
-    moduleId: number,
-    moduleName: string,
-    relationMartyr: string,
-    relationModule: string,
-    type: string,
-    updateTime: string,
-  }
+export interface RelationShipItem {
+  createTime: string
+  creatorId: number
+  creatorName: string
+  id: number
+  martyrId: number
+  martyrName: string
+  moduleId: number
+  moduleName: string
+  relationMartyr: string
+  relationModule: string
+  type: string
+  updateTime: string
+}