chenlei 1 month ago
parent
commit
092515e835

+ 10 - 3
src/components/ZGaddNow/index.tsx

@@ -23,6 +23,8 @@ type Props = {
   // 藏品登记-只选择一个
   register?: boolean
   httpType?: 'get' | 'post'
+  // 不需要的搜索条件
+  searchFilterKey?: string[]
 }
 
 function ZGaddNow({
@@ -33,7 +35,8 @@ function ZGaddNow({
   oldCheckArr,
   canObj,
   register,
-  httpType = 'post'
+  httpType = 'post',
+  searchFilterKey = []
 }: Props) {
   // 入藏状态特别过滤
   const RuChangSelect = useMemo(() => {
@@ -235,7 +238,9 @@ function ZGaddNow({
     >
       <div className='B3GaMain'>
         <div className='B3GaTop'>
-          <div className='B3Gatopll'>{searchDom(B3nowArr1)}</div>
+          <div className='B3Gatopll'>
+            {searchDom(B3nowArr1.filter(i => !searchFilterKey.includes(i.key)))}
+          </div>
           <div>
             <Checkbox
               checked={formData.isFocus === 1}
@@ -247,7 +252,9 @@ function ZGaddNow({
         </div>
 
         <div className='B3GaTop'>
-          <div className='B3Gatopll'>{searchDom(B3nowArr2)}</div>
+          <div className='B3Gatopll'>
+            {searchDom(B3nowArr2.filter(i => !searchFilterKey.includes(i.key)))}
+          </div>
           <div>
             <Button type='primary' onClick={clickSearch}>
               查询

+ 1 - 1
src/pages/A_workbench/A1dataSta/components/Tab1/index.tsx

@@ -24,7 +24,7 @@ export const A1Tab1: FC = () => {
 
   const getDetail = async (year: number) => {
     const res = await A1_APIGetCheck(year)
-    return res.data ? (JSON.parse(res.data.snap) as Record<string, number>) : null
+    return res.data && res.data.snap ? (JSON.parse(res.data.snap) as Record<string, number>) : null
   }
 
   const getYearList = () => {

+ 1 - 0
src/pages/F_exhibition/F1exhibition/F1edit/index.tsx

@@ -673,6 +673,7 @@ function F1edit() {
       {nowSta.id ? (
         <ZGaddNow
           nowSta={nowSta}
+          searchFilterKey={['statusStorage']}
           closeFu={() => setNowSta({ key: '', id: '' })}
           dataResFu={data => {
             const dataTemp = [...data]