shaogen1995 1 mese fa
parent
commit
6ea83b59f8

+ 14 - 0
后台管理/src/pages/A1record/A1add/index.module.scss

@@ -59,6 +59,20 @@
           }
         }
 
+        .A1aRow3 {
+          .ant-form-item {
+            &:nth-of-type(1) {
+              width: 48%;
+            }
+            &:nth-of-type(2) {
+              width: 22%;
+            }
+            &:nth-of-type(3) {
+              width: 22%;
+            }
+          }
+        }
+
         .formRow {
           display: flex;
 

+ 32 - 13
后台管理/src/pages/A1record/A1add/index.tsx

@@ -1,11 +1,20 @@
 import React, { useCallback, useEffect, useRef, useState } from 'react'
 import styles from './index.module.scss'
-import { Button, Cascader, DatePicker, Form, FormInstance, Input, Radio, Select } from 'antd'
+import {
+  Button,
+  Cascader,
+  Checkbox,
+  DatePicker,
+  Form,
+  FormInstance,
+  Input,
+  Radio,
+  Select
+} from 'antd'
 import MyPopconfirm from '@/components/MyPopconfirm'
 import { nationSelect } from '../data'
-import { useDispatch, useSelector } from 'react-redux'
+import { useDispatch } from 'react-redux'
 import { A1_APIgetInfo, A1_APIgetNumList, A1_APIsave } from '@/store/action/A1record'
-import { RootState } from '@/store'
 import A1num from '../A1num'
 import { myCity } from '@/utils/history'
 import TextArea from 'antd/es/input/TextArea'
@@ -151,7 +160,7 @@ function A1add({ sId, closeFu, addTableFu, upTableFu }: Props) {
     dispatch(A1_APIgetNumList())
   }, [dispatch])
 
-  const numList = useSelector((state: RootState) => state.A1record.numList)
+  // const numList = useSelector((state: RootState) => state.A1record.numList)
 
   const [numShow, setNumShow] = useState(false)
 
@@ -172,7 +181,7 @@ function A1add({ sId, closeFu, addTableFu, upTableFu }: Props) {
               autoComplete='off'
               scrollToFirstError
             >
-              <div className='A1aRow'>
+              <div className='A1aRow A1aRow3'>
                 <Form.Item
                   label='姓名'
                   name='name'
@@ -194,10 +203,14 @@ function A1add({ sId, closeFu, addTableFu, upTableFu }: Props) {
                     ]}
                   />
                 </Form.Item>
+
+                <Form.Item valuePropName='checked' label='寻亲烈士' name='display'>
+                  <Checkbox></Checkbox>
+                </Form.Item>
               </div>
 
               <div className='A1aRow'>
-                <Form.Item label='名族' name='nation'>
+                <Form.Item label='族' name='nation'>
                   <Select
                     getPopupContainer={() => formDomRef.current!}
                     allowClear
@@ -206,6 +219,12 @@ function A1add({ sId, closeFu, addTableFu, upTableFu }: Props) {
                     options={nationSelect}
                   />
                 </Form.Item>
+                <Form.Item label='番号' name='intro'>
+                  <Input maxLength={50} showCount placeholder='请输入内容' />
+                </Form.Item>
+              </div>
+
+              {/* <div className='A1aRow'>
                 <div className='A1aRowSon'>
                   <Form.Item label='番号' name='dictPanId'>
                     <Select
@@ -224,7 +243,7 @@ function A1add({ sId, closeFu, addTableFu, upTableFu }: Props) {
                     管理
                   </Button>
                 </div>
-              </div>
+              </div> */}
 
               <div className='A1aRow'>
                 <Form.Item label='籍贯' name='myNative'>
@@ -245,19 +264,19 @@ function A1add({ sId, closeFu, addTableFu, upTableFu }: Props) {
               </div>
 
               <div className='A1aRow'>
-                <Form.Item label='出生年' name='dateStart'>
-                  <DatePicker />
+                <Form.Item label='出生年' name='dateStart'>
+                  <DatePicker picker='month' placeholder='请选择年月' />
                 </Form.Item>
-                <Form.Item label='死亡年份' name='dateEnd'>
-                  <DatePicker />
+                <Form.Item label='牺牲年月' name='dateEnd'>
+                  <DatePicker picker='month' placeholder='请选择年月' />
                 </Form.Item>
               </div>
 
-              <div className='A1aRowAll'>
+              {/* <div className='A1aRowAll'>
                 <Form.Item label='个人介绍' name='intro'>
                   <TextArea maxLength={500} showCount placeholder='请输入内容' />
                 </Form.Item>
-              </div>
+              </div> */}
 
               {/* 多个图片 */}
               <div className='formRow'>

+ 5 - 0
后台管理/src/pages/A1record/A1look/index.module.scss

@@ -34,6 +34,11 @@
             width: calc(100% - 82px);
             word-wrap: break-word;
             white-space: pre-wrap;
+
+            a {
+              color: var(--themeColor) !important;
+            }
+
             // 图片查看调整
             .ZTboxImgMain {
               margin-top: 0;

+ 12 - 4
后台管理/src/pages/A1record/A1look/index.tsx

@@ -105,7 +105,7 @@ function A1look({ sId }: Props) {
               </div>
               <div className='A1topRow'>
                 <div className='A1top1LL'>番号:</div>
-                <div className='A1top1RR'>{info.dictPanName || '(空)'}</div>
+                <div className='A1top1RR'>{info.intro || '(空)'}</div>
               </div>
               <div className='A1topRow'>
                 <div className='A1top1LL'>籍贯:</div>
@@ -121,10 +121,10 @@ function A1look({ sId }: Props) {
                   dangerouslySetInnerHTML={{ __html: jiGuanFu(info, true, '牺牲地') }}
                 ></div>
               </div>
-              <div className='A1topRow'>
+              {/* <div className='A1topRow'>
                 <div className='A1top1LL'>个人介绍:</div>
                 <div className='A1top1RR'>{info.intro || '(空)'}</div>
-              </div>
+              </div> */}
               <div className='A1topRow'>
                 <div className='A1top1LL'>图片:</div>
                 <div className='A1top1RR'>
@@ -161,7 +161,15 @@ function A1look({ sId }: Props) {
 
               <div className='A1topRow'>
                 <div className='A1top1LL'>场景链接:</div>
-                <div className='A1top1RR'>{info.link || '(空)'}</div>
+                <div className='A1top1RR'>
+                  {info.link ? (
+                    <a href={info.link} target='_blank' rel='noreferrer'>
+                      {info.link}
+                    </a>
+                  ) : (
+                    '(空)'
+                  )}
+                </div>
               </div>
 
               <div className='A1topRow'>

+ 1 - 1
后台管理/src/pages/A1record/data.ts

@@ -46,7 +46,7 @@ export type LookInfoType = {
   txt: '' | '新增' | '编辑' | '查看'
 }
 
-// 56个
+// 56个
 export const nationSelect = [
   {
     value: '汉族',

+ 1 - 1
后台管理/src/pages/A1record/index.tsx

@@ -93,7 +93,7 @@ function A1record() {
         render: (item: A1ListType) => (item.gender === 1 ? '男' : '女')
       },
       { title: '民族', width: 100, render: (item: A1ListType) => item.nation || '(空)' },
-      { title: '番号', render: (item: A1ListType) => item.dictPanName || '(空)' },
+      { title: '番号', render: (item: A1ListType) => item.intro || '(空)' },
       {
         title: '籍贯',