shaogen1995 недель назад: 2
Родитель
Сommit
13cfc4e4fc

+ 6 - 0
src/pages/Eculture/E2story/E2edit/index.module.scss

@@ -55,6 +55,12 @@
       }
       .Edtop1rowFull {
         width: 100%;
+        .zztxtRow {
+          margin-bottom: 0;
+        }
+        .noUpThumb {
+          display: none;
+        }
       }
     }
   }

+ 1 - 1
src/pages/Eculture/E2story/E2edit/index.tsx

@@ -180,7 +180,7 @@ function E2edit() {
                 />
               </div>
             </div>
-            <div className='Edtop1row'>
+            <div className='Edtop1row Edtop1rowFull'>
               <div className='Edtop1ll'>备注 :</div>
               <div className='Edtop1rr'>
                 <TextArea

+ 2 - 1
src/pages/Zother/AddGoods/index.tsx

@@ -166,7 +166,8 @@ function AddGoods({ closeFu, succFu, isEdit, moduleId, info, APIsave, fileUpInfo
         const resObj = { ...res.data }
         if (info.pageType === 'clue') {
           resObj.clueId = info.id
-          if (info.id2) delSnapIdsRef.current.push(info.id2)
+          if (info.id2 && !delSnapIdsRef.current.includes(info.id2))
+            delSnapIdsRef.current.push(info.id2)
         }
 
         succFu(info.id > 0 ? '编辑' : '新增', resObj)

+ 11 - 18
src/pages/Zother/SonGoodsList/index.tsx

@@ -17,7 +17,6 @@ import { useParams } from 'react-router-dom'
 import { openLink } from '@/utils/history'
 import { FileUpInfoType } from '../data'
 import SelectGoods from '../SelectGoods'
-import AddClues from '../AddClues'
 
 type Props = {
   // 上传附件的信息(不需要新增藏品的不用传)
@@ -53,9 +52,6 @@ function SonGoodsList({
 
   const [openInfo, setOpenInfo] = useState({} as GoodsType)
 
-  // 打开线索弹窗-查看详情
-  const [clueInfo, setClueInfo] = useState({} as GoodsType)
-
   const tableLastBtn = useMemo(() => {
     return [
       {
@@ -165,8 +161,17 @@ function SonGoodsList({
             //需要过滤掉已经有id的-不替换数据,没有id的替换数据 因为数据可能已经在另外一个弹窗更新了
             const nowIds = snaps.map(v => v.id)
             let dataRes = data.map((v, i) => {
-              if (nowIds.includes(v.id)) return snaps[i]
-              else return v
+              if (nowIds.includes(v.id)) {
+                if (v.id2 && delSnapIdsRef.current.includes(v.id2)) {
+                  delSnapIdsRef.current = delSnapIdsRef.current.filter(c => c !== v.id2)
+                }
+                return snaps[i]
+              } else {
+                if (v.id2 && !delSnapIdsRef.current.includes(v.id2)) {
+                  delSnapIdsRef.current.push(v.id2)
+                }
+                return v
+              }
             })
 
             dataRes.forEach(v => {
@@ -184,18 +189,6 @@ function SonGoodsList({
           }}
         />
       ) : null}
-
-      {/* 线索查看详情 */}
-      {clueInfo.id ? (
-        <AddClues
-          info={clueInfo}
-          closeFu={() => setClueInfo({} as GoodsType)}
-          succFu={() => {}}
-          moduleId={0}
-          fileUpInfo={{} as FileUpInfoType}
-          isLook={true}
-        />
-      ) : null}
     </div>
   )
 }