shaogen1995 2 дней назад
Родитель
Сommit
0ce464b193

+ 3 - 3
README.md

@@ -1,10 +1,10 @@
 1.使用 yarn。 npm 有问题
 node 版本:24.12.0(如果 npm run build 报错,使用 22.18.0)
 
-2.测试后端文档地址:xxxx
+2.测试后端文档地址:https://sit-qingdaobeer.4dage.com/api/doc.html#/home
 
-3.测试堡垒机位置:xxxxx
+3.测试堡垒机位置:/Default/腾讯云/项目节点/腾讯云-四维时代-项目测试服务器-111.230.233.212/data/data/museum_shandong_qingdao_pijiu_storage_data/backstage
 
-4:测试网址:xxxx
+4:测试网址:https://sit-qingdaobeer.4dage.com/backstage
 
 5:蓝湖地址:https://lanhuapp.com/web/#/item/project/product?tid=de3e5e3e-a489-4b19-862a-7c87ce113467&pid=bee8cc26-6a17-4b77-8e80-45b03b05465a&image_id=a4256a90-52f3-41bc-acb3-6ae1344fa1c2&docId=a4256a90-52f3-41bc-acb3-6ae1344fa1c2&docType=axure&versionId=77cd75fb-b6af-43d6-b5e2-11d3ac67d9b5&pageId=2fe0d9a1b6a144c1b199ed14c162aa98&parentId=8f795cc5-2462-4553-acc4-02267adcff9a&share_type=quickShare

+ 3 - 0
src/components/Z3upFiles/data.ts

@@ -7,6 +7,9 @@ export type FileListType = {
   filePath: string
   thumb: string
   type: 'img' | 'video' | 'doc'
+
+  // 图片类型
+  effect?: string
 }
 
 // 查看 权限 图片 /视频 、音频

+ 57 - 50
src/pages/Cledger/C4file/index.tsx

@@ -12,6 +12,7 @@ import { FileListType } from '@/components/Z3upFiles/data'
 import ImageLazy from '@/components/ImageLazy'
 import { EyeOutlined } from '@ant-design/icons'
 import DownLog from '@/pages/Zother/DownLog'
+import { fileImgArr } from '@/utils'
 
 const C4search = [
   {
@@ -206,61 +207,67 @@ function C4file() {
   }, [])
 
   const staBtn = useMemo(() => {
-    return [
-      {
-        title: '缩略图/查看',
-        render: (item: FileListType) => {
-          if (item.type === 'img') {
-            return (
-              <div className='tableImgAuto'>
-                <ImageLazy
-                  width={60}
-                  height={60}
-                  src={item.thumb || item.filePath}
-                  srcBig={item.filePath || item.thumb}
-                />
+    let arr: any[] = []
+
+    arr.push({
+      title: '缩略图/查看',
+      render: (item: FileListType) => {
+        const lastNameArr = item.fileName.split('.')
+        let lastName = lastNameArr[lastNameArr.length - 1]
+        lastName = lastName.toLocaleLowerCase()
+
+        if (fileImgArr.includes(lastName)) {
+          return (
+            <div className='tableImgAuto'>
+              <ImageLazy
+                width={60}
+                height={60}
+                src={item.thumb || item.filePath}
+                srcBig={item.filePath || item.thumb}
+              />
+            </div>
+          )
+        } else if (item.type === 'video') {
+          return (
+            <div className='tablelookVideo'>
+              <div
+                className='tablelookBox'
+                onClick={() =>
+                  store.dispatch({
+                    type: 'layout/lookDom',
+                    payload: { src: item.filePath, type: 'video' }
+                  })
+                }
+              >
+                <EyeOutlined rev={undefined} />
+                &nbsp;
+                <div>预览</div>
               </div>
-            )
-          } else if (item.type === 'video') {
+              <video src={baseURL + item.filePath} />
+            </div>
+          )
+        } else {
+          const lastNameArr = item.fileName.split('.')
+          let laseName = lastNameArr[lastNameArr.length - 1]
+          laseName = laseName.toLocaleLowerCase()
+          if (['pdf', 'txt'].includes(laseName)) {
             return (
-              <div className='tablelookVideo'>
-                <div
-                  className='tablelookBox'
-                  onClick={() =>
-                    store.dispatch({
-                      type: 'layout/lookDom',
-                      payload: { src: item.filePath, type: 'video' }
-                    })
-                  }
-                >
-                  <EyeOutlined rev={undefined} />
-                  &nbsp;
-                  <div>预览</div>
-                </div>
-                <video src={baseURL + item.filePath} />
-              </div>
+              <Button
+                size='small'
+                type='text'
+                onClick={() => {
+                  window.open(baseURL + item.filePath)
+                }}
+              >
+                查看
+              </Button>
             )
-          } else {
-            const lastNameArr = item.fileName.split('.')
-            let laseName = lastNameArr[lastNameArr.length - 1]
-            laseName = laseName.toLocaleLowerCase()
-            if (laseName === 'pdf') {
-              return (
-                <Button
-                  size='small'
-                  type='text'
-                  onClick={() => {
-                    window.open(baseURL + item.filePath)
-                  }}
-                >
-                  查看
-                </Button>
-              )
-            } else return <div className='tableImgAuto'>-</div>
-          }
+          } else return <div className='tableImgAuto'>-</div>
         }
       }
-    ]
+    })
+
+    return arr
   }, [])
 
   return (

+ 32 - 16
src/pages/Layout/data.ts

@@ -65,25 +65,29 @@ const tabLeftArr: RouterType = [
         id: 210,
         name: '藏品征集',
         path: '/collect',
-        Com: React.lazy(() => import('../Benter/B1collect'))
+        Com: React.lazy(() => import('../Benter/B1collect')),
+        pageType: 'ZJ'
       },
       {
         id: 220,
         name: '藏品入馆',
         path: '/enterGuan',
-        Com: React.lazy(() => import('../Benter/B2enterGuan'))
+        Com: React.lazy(() => import('../Benter/B2enterGuan')),
+        pageType: 'RG'
       },
       {
         id: 230,
         name: '藏品鉴定',
         path: '/auth',
-        Com: React.lazy(() => import('../Benter/B3auth'))
+        Com: React.lazy(() => import('../Benter/B3auth')),
+        pageType: 'JD'
       },
       {
         id: 240,
         name: '藏品入藏',
         path: '/enterCang',
-        Com: React.lazy(() => import('../Benter/B4enterCang'))
+        Com: React.lazy(() => import('../Benter/B4enterCang')),
+        pageType: 'RC'
       }
     ]
   },
@@ -128,25 +132,29 @@ const tabLeftArr: RouterType = [
         id: 410,
         name: '藏品登记',
         path: '/register',
-        Com: React.lazy(() => import('../Dmanage/D1register'))
+        Com: React.lazy(() => import('../Dmanage/D1register')),
+        pageType: 'DJ'
       },
       {
         id: 420,
         name: '藏品修改',
         path: '/edit',
-        Com: React.lazy(() => import('../Dmanage/D2edit'))
+        Com: React.lazy(() => import('../Dmanage/D2edit')),
+        pageType: 'XG'
       },
       {
         id: 430,
         name: '藏品注销',
         path: '/writeOff',
-        Com: React.lazy(() => import('../Dmanage/D3writeOff'))
+        Com: React.lazy(() => import('../Dmanage/D3writeOff')),
+        pageType: 'ZX'
       },
       {
         id: 440,
         name: '资源使用',
         path: '/resource',
-        Com: React.lazy(() => import('../Dmanage/D4resource'))
+        Com: React.lazy(() => import('../Dmanage/D4resource')),
+        pageType: 'SY'
       }
     ]
   },
@@ -178,31 +186,36 @@ const tabLeftArr: RouterType = [
         id: 1010,
         name: '藏品入库',
         path: '/inStorage',
-        Com: React.lazy(() => import('../Fstorehouse/F1inStorage'))
+        Com: React.lazy(() => import('../Fstorehouse/F1inStorage')),
+        pageType: 'RK'
       },
       {
         id: 1020,
         name: '藏品移库',
         path: '/moveStorage',
-        Com: React.lazy(() => import('../Fstorehouse/F2moveStorage'))
+        Com: React.lazy(() => import('../Fstorehouse/F2moveStorage')),
+        pageType: 'YK'
       },
       {
         id: 1030,
         name: '藏品出库',
         path: '/outStorage',
-        Com: React.lazy(() => import('../Fstorehouse/F3outStorage'))
+        Com: React.lazy(() => import('../Fstorehouse/F3outStorage')),
+        pageType: 'CK'
       },
       {
         id: 1040,
         name: '藏品盘点',
         path: '/check',
-        Com: React.lazy(() => import('../Fstorehouse/F4check'))
+        Com: React.lazy(() => import('../Fstorehouse/F4check')),
+        pageType: 'PD'
       },
       {
         id: 1050,
         name: '人员出入库',
         path: '/staff',
-        Com: React.lazy(() => import('../Fstorehouse/F5staff'))
+        Com: React.lazy(() => import('../Fstorehouse/F5staff')),
+        pageType: 'RY'
       }
     ]
   },
@@ -216,19 +229,22 @@ const tabLeftArr: RouterType = [
         id: 510,
         name: '事故登记',
         path: '/accident',
-        Com: React.lazy(() => import('../Gmaintain/G1accident'))
+        Com: React.lazy(() => import('../Gmaintain/G1accident')),
+        pageType: 'SG'
       },
       {
         id: 540,
         name: '现状登记',
         path: '/actuality',
-        Com: React.lazy(() => import('../Gmaintain/G2actuality'))
+        Com: React.lazy(() => import('../Gmaintain/G2actuality')),
+        pageType: 'XZ'
       },
       {
         id: 550,
         name: '修复登记',
         path: '/repair',
-        Com: React.lazy(() => import('../Gmaintain/G3repair'))
+        Com: React.lazy(() => import('../Gmaintain/G3repair')),
+        pageType: 'XF'
       }
     ]
   },

+ 40 - 12
src/pages/ZgoodsInfo/GItab2/index.tsx

@@ -1,8 +1,9 @@
-import React, { useMemo } from 'react'
+import React, { useCallback, useEffect, useMemo, useState } from 'react'
 import styles from './index.module.scss'
 import MyTable from '@/components/MyTable'
 import { GoodsType } from '@/pages/Zother/SonGoodsList/data'
 import { selectObj } from '@/utils/dataChange'
+import { API_GIsiteInfo } from '@/store/action/Cledger/C1ledger'
 
 type Props = {
   info: GoodsType
@@ -17,23 +18,50 @@ function GItab2({ info }: Props) {
     return txt
   }, [info.siteStatus])
 
+  const [list, setList] = useState<any[]>([])
+
+  const getInfoFu = useCallback(async () => {
+    if (info.siteId) {
+      const res = await API_GIsiteInfo(info.siteId)
+      if (res.code === 0) {
+        const obj: any = res.data || {}
+        const arr: any[] = []
+
+        const keyArr = [
+          { key: 'storageName', name: '仓库名称' },
+          { key: 'managerUser', name: '仓库负责人' },
+          { key: 'layer1', name: '排' },
+          { key: 'layer2', name: '列' },
+          { key: 'layer3', name: '层' },
+          { key: 'layer4', name: '格' }
+        ]
+
+        keyArr.forEach((v, i) => {
+          arr.push({
+            id: i,
+            xx1: v.name,
+            xx2: obj[v.key]
+          })
+        })
+
+        setList(arr)
+      }
+    }
+  }, [info.siteId])
+
+  useEffect(() => {
+    getInfoFu()
+  }, [getInfoFu])
+
   return (
     <div className={styles.GItab2}>
-      {/* 待完善sg -等陈磊/伟浩写完库房相关*/}
-      <h2>库存状态(开发中):{goodsStatus}</h2>
+      <h2>库存状态:{goodsStatus}</h2>
 
-      {!info.siteStatus || [1, 2, 5].includes(info.siteStatus) || !info.storageId ? (
+      {!info.siteStatus || [1, 2, 5].includes(info.siteStatus) || !info.siteId ? (
         <div className='GImainNone'>当前状态无库存信息</div>
       ) : (
         <MyTable
-          list={[
-            { id: 1, xx1: '仓库名称', xx2: '' },
-            { id: 2, xx1: '仓库负责人', xx2: '' },
-            { id: 3, xx1: '排', xx2: '' },
-            { id: 4, xx1: '列', xx2: '' },
-            { id: 5, xx1: '层', xx2: '' },
-            { id: 6, xx1: '格', xx2: '' }
-          ]}
+          list={list}
           columnsTemp={[
             ['txt', '库存信息', 'xx1'],
             ['txt', '库存详情', 'xx2']

+ 84 - 56
src/pages/ZgoodsInfo/GItab3/index.tsx

@@ -6,7 +6,7 @@ import { API_downloadFiles, API_getFileListByIds } from '@/store/action/Cledger/
 import { Button } from 'antd'
 import { selectObj } from '@/utils/dataChange'
 import { MessageFu } from '@/utils/message'
-import { downloadFileByUrl } from '@/utils'
+import { downloadFileByUrl, fileImgArr } from '@/utils'
 import MyTable from '@/components/MyTable'
 import ImageLazy from '@/components/ImageLazy'
 import store from '@/store'
@@ -14,14 +14,13 @@ import { EyeOutlined } from '@ant-design/icons'
 import { baseURL } from '@/utils/http'
 import { GI3tableC } from '@/utils/tableData'
 import DownLog from '@/pages/Zother/DownLog'
+import SetFileType from '@/pages/Zother/SetFileType'
 
 type Props = {
   info: GoodsType
   fileList: FileListType[]
 }
 
-// 待完善sg-设置模块 等后端写接口
-
 function GItab3({ info, fileList }: Props) {
   const [list, setList] = useState<FileListType[]>([])
 
@@ -77,7 +76,7 @@ function GItab3({ info, fileList }: Props) {
           })
         }
       } else {
-        MessageFu.warning('该文件已经被删除')
+        MessageFu.warning('找不到文件或已被删除')
         getFileListFu()
       }
     } else {
@@ -92,62 +91,79 @@ function GItab3({ info, fileList }: Props) {
   }, [checkArr, getFileListFu, list])
 
   const staBtn = useMemo(() => {
-    return [
-      {
-        title: '缩略图/查看',
-        render: (item: FileListType) => {
-          if (item.type === 'img') {
-            return (
-              <div className='tableImgAuto'>
-                <ImageLazy
-                  width={60}
-                  height={60}
-                  src={item.thumb || item.filePath}
-                  srcBig={item.filePath || item.thumb}
-                />
+    let arr: any[] = []
+
+    arr.push({
+      title: '缩略图/查看',
+      render: (item: FileListType) => {
+        const lastNameArr = item.fileName.split('.')
+        let lastName = lastNameArr[lastNameArr.length - 1]
+        lastName = lastName.toLocaleLowerCase()
+
+        if (fileImgArr.includes(lastName)) {
+          return (
+            <div className='tableImgAuto'>
+              <ImageLazy
+                width={60}
+                height={60}
+                src={item.thumb || item.filePath}
+                srcBig={item.filePath || item.thumb}
+              />
+            </div>
+          )
+        } else if (item.type === 'video') {
+          return (
+            <div className='tablelookVideo'>
+              <div
+                className='tablelookBox'
+                onClick={() =>
+                  store.dispatch({
+                    type: 'layout/lookDom',
+                    payload: { src: item.filePath, type: 'video' }
+                  })
+                }
+              >
+                <EyeOutlined rev={undefined} />
+                &nbsp;
+                <div>预览</div>
               </div>
-            )
-          } else if (item.type === 'video') {
+              <video src={baseURL + item.filePath} />
+            </div>
+          )
+        } else {
+          const lastNameArr = item.fileName.split('.')
+          let laseName = lastNameArr[lastNameArr.length - 1]
+          laseName = laseName.toLocaleLowerCase()
+          if (['pdf', 'txt'].includes(laseName)) {
             return (
-              <div className='tablelookVideo'>
-                <div
-                  className='tablelookBox'
-                  onClick={() =>
-                    store.dispatch({
-                      type: 'layout/lookDom',
-                      payload: { src: item.filePath, type: 'video' }
-                    })
-                  }
-                >
-                  <EyeOutlined rev={undefined} />
-                  &nbsp;
-                  <div>预览</div>
-                </div>
-                <video src={baseURL + item.filePath} />
-              </div>
+              <Button
+                size='small'
+                type='text'
+                onClick={() => {
+                  window.open(baseURL + item.filePath)
+                }}
+              >
+                查看
+              </Button>
             )
-          } else {
-            const lastNameArr = item.fileName.split('.')
-            let laseName = lastNameArr[lastNameArr.length - 1]
-            laseName = laseName.toLocaleLowerCase()
-            if (laseName === 'pdf') {
-              return (
-                <Button
-                  size='small'
-                  type='text'
-                  onClick={() => {
-                    window.open(baseURL + item.filePath)
-                  }}
-                >
-                  查看
-                </Button>
-              )
-            } else return <div className='tableImgAuto'>-</div>
-          }
+          } else return <div className='tableImgAuto'>-</div>
         }
       }
-    ]
-  }, [])
+    })
+
+    if (['all', 'img'].includes(btnAc)) {
+      arr.push({
+        title: '图片类型',
+        render: (item: FileListType) => {
+          let txt = '/'
+          if (item.type === 'img') txt = item.effect || '(空)'
+          return txt
+        }
+      })
+    }
+
+    return arr
+  }, [btnAc])
 
   const tableLastBtn = useMemo(() => {
     return [
@@ -165,7 +181,7 @@ function GItab3({ info, fileList }: Props) {
             >
               下载
             </Button>
-            <Button size='small' type='text' onClick={() => MessageFu.warning('开发中')}>
+            <Button size='small' type='text' onClick={() => setFileType(item)}>
               设置
             </Button>
             <Button size='small' type='text' onClick={() => setDownLogId(item.id)}>
@@ -180,6 +196,9 @@ function GItab3({ info, fileList }: Props) {
   // 下载记录参数
   const [downLogId, setDownLogId] = useState(0)
 
+  // 设置附件
+  const [fileType, setFileType] = useState({} as FileListType)
+
   return (
     <div className={styles.GItab3}>
       <div className='GI3top'>
@@ -216,6 +235,15 @@ function GItab3({ info, fileList }: Props) {
 
       {/* 下载记录 */}
       {downLogId ? <DownLog id={downLogId} closeFu={() => setDownLogId(0)} /> : null}
+
+      {/* 设置附件类型 */}
+      {fileType.id ? (
+        <SetFileType
+          infoTemp={fileType}
+          succFu={getFileListFu}
+          closeFu={() => setFileType({} as FileListType)}
+        />
+      ) : null}
     </div>
   )
 }

+ 3 - 17
src/pages/ZgoodsInfo/GItab4/index.tsx

@@ -11,7 +11,7 @@ import history from '@/utils/history'
 const baseFormData = {
   searchKey: '',
   pageNum: 1,
-  pageSize: 10
+  pageSize: 99999
 }
 
 type Props = {
@@ -84,17 +84,6 @@ function GItab4({ goodId }: Props) {
     }, 50)
   }, [])
 
-  // 页码变化
-  const paginationChange = useCallback(
-    (pageNum: number, pageSize: number) => {
-      setFormData({ ...formData, pageNum, pageSize })
-      setTimeout(() => {
-        setTimeKey(Date.now())
-      }, 50)
-    },
-    [formData]
-  )
-
   const tableLastBtn = useMemo(() => {
     return [
       {
@@ -143,14 +132,11 @@ function GItab4({ goodId }: Props) {
 
       <MyTable
         classKey='GItab4'
-        yHeight={510}
+        yHeight={560}
         list={tableObj.list}
         columnsTemp={GI4tableC}
         lastBtn={tableLastBtn}
-        pageNum={formData.pageNum}
-        pageSize={formData.pageSize}
-        total={tableObj.total}
-        onChange={(pageNum, pageSize) => paginationChange(pageNum, pageSize)}
+        pagingInfo={false}
         widthSet={{ remark: 800 }}
       />
 

+ 6 - 3
src/pages/ZgoodsInfo/GItab5/index.module.scss

@@ -1,7 +1,10 @@
 .GItab5 {
-  width: 100%;
-  height: 100%;
-  overflow-y: auto;
   :global {
+    .GI5top {
+      margin-bottom: 15px;
+    }
+    .ant-table-cell {
+      padding: 8px !important;
+    }
   }
 }

+ 87 - 34
src/pages/ZgoodsInfo/GItab5/index.tsx

@@ -1,43 +1,96 @@
-import React, { useEffect } from 'react'
+import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
 import styles from './index.module.scss'
-function GItab5() {
+import { Button, Input, Select } from 'antd'
+import { Typetable } from '@/pages/Zother/data'
+import { API_GIlog } from '@/store/action/Cledger/C1ledger'
+import history from '@/utils/history'
+import MyTable from '@/components/MyTable'
+import { GI5tableC } from '@/utils/tableData'
+import tabLeftArr from '@/pages/Layout/data'
+
+type Props = {
+  goodId: number
+}
+
+function GItab5({ goodId }: Props) {
+  const [type, setType] = useState(null)
+
+  const [tableList, setTableList] = useState<any[]>([])
+
+  // 封装发送请求的函数
+  const getListFu = useCallback(async () => {
+    if (goodId) {
+      const params = {
+        pageNum: 1,
+        pageSize: 99999,
+        type,
+        goodId
+      }
+
+      const res = await API_GIlog(params)
+      if (res.code === 0) {
+        setTableList(res.data.records || [])
+      }
+    }
+  }, [goodId, type])
+
+  useEffect(() => {
+    getListFu()
+  }, [getListFu])
+
+  const tableLastBtn = useMemo(() => {
+    return [
+      {
+        title: '操作',
+        render: (item: Typetable) => (
+          <>
+            <Button
+              size='small'
+              type='text'
+              onClick={() => history.push(`/story_edit/4/${item.id}`)}
+            >
+              查看
+            </Button>
+          </>
+        )
+      }
+    ]
+  }, [])
+
+  const [list, setList] = useState<any[]>([])
   useEffect(() => {
-    console.log('GItab5')
+    const arr: any[] = []
+    tabLeftArr.forEach(v1 => {
+      v1.son.forEach(v2 => {
+        if (v2.pageType) arr.push({ path: v2.path, value: v2.pageType, label: v2.name })
+      })
+    })
+    setList(arr)
   }, [])
 
   return (
     <div className={styles.GItab5}>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
-      <h1>GItab5</h1>
+      <div className='GI5top'>
+        <Select
+          allowClear
+          placeholder='申请类型'
+          style={{ width: 300 }}
+          options={list}
+          value={type || null}
+          onChange={e => setType(e)}
+        />
+      </div>
+
+      <MyTable
+        classKey='GItab5'
+        yHeight={560}
+        list={tableList}
+        // 待完善sg ---等后端
+        columnsTemp={GI5tableC}
+        lastBtn={tableLastBtn}
+        pagingInfo={false}
+        widthSet={{ remark: 800 }}
+      />
     </div>
   )
 }

+ 10 - 10
src/pages/ZgoodsInfo/index.module.scss

@@ -68,16 +68,16 @@
           overflow-y: auto;
         }
       }
-      .GImainNone {
-        width: 70%;
-        height: 70%;
-        display: flex;
-        justify-content: center;
-        align-items: center;
-        font-weight: 700;
-        font-size: 20px;
-        letter-spacing: 4px;
-      }
+    }
+    .GImainNone {
+      width: 70%;
+      height: 70%;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      font-weight: 700;
+      font-size: 20px;
+      letter-spacing: 4px;
     }
   }
 }

+ 52 - 43
src/pages/ZgoodsInfo/index.tsx

@@ -72,7 +72,7 @@ function ZgoodsInfo() {
         Dom: <GItab3 info={info} fileList={fileList} />
       },
       { id: 334, name: '藏品故事', done: false, show: false, Dom: <GItab4 goodId={info.id} /> },
-      { id: 335, name: '藏品日志', done: false, show: false, Dom: <GItab5 /> }
+      { id: 335, name: '藏品日志', done: false, show: false, Dom: <GItab5 goodId={info.id} /> }
     ]
   }, [fileList, info])
 
@@ -259,54 +259,63 @@ function ZgoodsInfo() {
     <div className={styles.ZgoodsInfo}>
       <div className='GITot'>
         <h2>{info.name || ''}</h2>
-        {info.id ? <i>({goodsStatus})</i> : null}
+        {info.id ? (
+          <i style={{ color: info.status === 8 ? '#ff4d4f' : '' }}>({goodsStatus})</i>
+        ) : null}
         {tagDom}
       </div>
-      <div className='GItab'>
-        <div>
-          {tabArr1.map(item => (
-            <div
-              className={classNames('GItab1', item.show ? 'GItab1Ac' : '')}
-              key={item.id}
-              onClick={() => cutTabFu(item.id)}
-            >
-              {item.name}
-            </div>
-          ))}
-        </div>
-        {/* 已删除状态隐藏右侧抽屉按钮 */}
-        {!info.status || [8, 0].includes(info.status) ? (
-          <div></div>
-        ) : (
-          <div>
-            {tabArr2.map(item => (
-              <Dropdown key={item.id} menu={{ items: item.son }} trigger={['click']}>
-                <Button type='primary'>
+      {info.id ? (
+        <>
+          <div className='GItab'>
+            <div>
+              {tabArr1.map(item => (
+                <div
+                  className={classNames('GItab1', item.show ? 'GItab1Ac' : '')}
+                  key={item.id}
+                  onClick={() => cutTabFu(item.id)}
+                >
                   {item.name}
-                  <CaretDownOutlined />
-                </Button>
-              </Dropdown>
-            ))}
+                </div>
+              ))}
+            </div>
+            {/* 已删除状态隐藏右侧抽屉按钮 */}
+            {!info.status || [8, 0].includes(info.status) ? (
+              <div></div>
+            ) : (
+              <div>
+                {tabArr2.map(item => (
+                  <Dropdown key={item.id} menu={{ items: item.son }} trigger={['click']}>
+                    <Button type='primary'>
+                      {item.name}
+                      <CaretDownOutlined />
+                    </Button>
+                  </Dropdown>
+                ))}
+              </div>
+            )}
           </div>
-        )}
-      </div>
-
-      {/* 主体 */}
-      <div className='GImain'>
-        {tabArr1.length ? (
-          <>
-            {tabArr1.map(item => (
-              <div key={item.id} hidden={!item.show}>
-                {item.done ? item.Dom : null}
+          {/* 主体 */}
+          <div className='GImain'>
+            {tabArr1.length ? (
+              <>
+                {tabArr1.map(item => (
+                  <div key={item.id} hidden={!item.show}>
+                    {item.done ? item.Dom : null}
+                  </div>
+                ))}
+              </>
+            ) : (
+              <div className='GImainNone' hidden={!loding}>
+                暂无权限,请联系管理员进行授权
               </div>
-            ))}
-          </>
-        ) : (
-          <div className='GImainNone' hidden={!loding}>
-            您没有该页面权限,请联系管理员!
+            )}
           </div>
-        )}
-      </div>
+        </>
+      ) : (
+        <div className='GImainNone' hidden={!loding}>
+          找不到相关藏品信息
+        </div>
+      )}
     </div>
   )
 }

+ 35 - 0
src/pages/Zother/SetFileType/index.module.scss

@@ -0,0 +1,35 @@
+.SetFileType {
+  :global {
+    .ant-modal-close {
+      display: none;
+    }
+    .ant-modal {
+      width: 800px !important;
+    }
+    .ant-modal-body {
+      padding-top: 40px !important;
+      border-top: 1px solid #ccc;
+      .ant-table-cell {
+        padding: 8px !important;
+      }
+    }
+    .GI3Mrow {
+      padding-right: 20px;
+      margin-bottom: 20px;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      .GI3Mrow1 {
+        width: 100px;
+        text-align: right;
+        & > span {
+          color: #ff4d4f;
+        }
+      }
+    }
+    .GI3Mbtn {
+      margin-top: 55px;
+      text-align: center;
+    }
+  }
+}

+ 84 - 0
src/pages/Zother/SetFileType/index.tsx

@@ -0,0 +1,84 @@
+import React, { useCallback, useEffect, useState } from 'react'
+import styles from './index.module.scss'
+import { Button, Modal, Select } from 'antd'
+import MyPopconfirm from '@/components/MyPopconfirm'
+import { FileListType } from '@/components/Z3upFiles/data'
+import { selectObj } from '@/utils/dataChange'
+import { API_GIfileType } from '@/store/action/Cledger/C1ledger'
+import { MessageFu } from '@/utils/message'
+
+type Props = {
+  infoTemp: FileListType
+  succFu: () => void
+  closeFu: () => void
+}
+
+function SetFileType({ infoTemp, succFu, closeFu }: Props) {
+  const [info, setInfo] = useState({} as FileListType)
+
+  useEffect(() => {
+    setInfo(infoTemp)
+  }, [infoTemp])
+
+  const changeData = useCallback(
+    (key: 'type' | 'effect', value: string) => {
+      setInfo({ ...info, [key]: value })
+    },
+    [info]
+  )
+
+  const btnOk = useCallback(async () => {
+    const obj = {
+      effect: info.effect || '',
+      ids: [info.id],
+      type: info.type
+    }
+    const res = await API_GIfileType(obj)
+    if (res.code === 0) {
+      MessageFu.success('设置成功')
+      succFu()
+      closeFu()
+    }
+  }, [closeFu, succFu, info])
+
+  return (
+    <Modal wrapClassName={styles.SetFileType} title='类型设置' open={true} footer={[]}>
+      <div className='GI3Mrow'>
+        <div className='GI3Mrow1'>
+          <span>* </span>附件类型:
+        </div>
+        <Select
+          style={{ width: 300 }}
+          options={selectObj['附件类型']}
+          value={info.type}
+          onChange={e => changeData('type', e)}
+        />
+      </div>
+      {info.type === 'img' ? (
+        <div className='GI3Mrow'>
+          <div className='GI3Mrow1'>图片类型:</div>
+          <Select
+            allowClear
+            style={{ width: 300 }}
+            placeholder='请选择'
+            options={selectObj['图片类型']}
+            value={info.effect || null}
+            onChange={e => changeData('effect', e)}
+          />
+        </div>
+      ) : null}
+
+      <div className='GI3Mbtn'>
+        <Button type='primary' onClick={btnOk}>
+          提交
+        </Button>
+        &emsp;
+        <MyPopconfirm txtK='取消' onConfirm={closeFu} />
+      </div>
+    </Modal>
+  )
+}
+
+const MemoSetFileType = React.memo(SetFileType)
+
+export default MemoSetFileType

+ 17 - 0
src/store/action/Cledger/C1ledger.ts

@@ -93,3 +93,20 @@ export const guShiAPI_getInfo = (id: number) => {
 export const guShiAPI_dels = (ids: number[]) => {
   return http.post(`cms/story/removes`, ids)
 }
+
+// ------------------藏品详情模块
+
+// 藏品-库存信息
+export const API_GIsiteInfo = (siteId: number) => {
+  return http.get(`cms/good/ledger/siteInfo/${siteId}`)
+}
+
+// 藏品-附件设置
+export const API_GIfileType = (data: any) => {
+  return http.post('cms/good/ledger/setFileEffect', data)
+}
+
+// 藏品-日志
+export const API_GIlog = (data: any) => {
+  return http.post('cms/good/ledger/log', data)
+}

+ 1 - 1
src/store/action/Isystem/I4processSet.ts

@@ -5,7 +5,7 @@ import http from '@/utils/http'
  */
 export const I4_APIgetList = (data: any): any => {
   return async (dispatch: AppDispatch) => {
-    const res = await http.post('cms/flow/pageList', data)
+    const res = await http.post('cms/flow/pageList', { ...data, pageSize: 99999, pageNum: 1 })
     if (res.code === 0) {
       dispatch({ type: 'I4/getList', payload: res.data.records })
     }

+ 8 - 0
src/utils/dataChange.tsx

@@ -152,6 +152,14 @@ export const selectObj = {
     { value: 'doc', label: '文档' },
     { value: 'other', label: '其他' }
   ],
+  图片类型: [
+    { value: '正视图', label: '正视图' },
+    { value: '俯视图', label: '俯视图' },
+    { value: '侧视图', label: '侧视图' },
+    { value: '全景图', label: '全景图' },
+    { value: '局部图', label: '局部图' },
+    { value: '底部图', label: '底部图' }
+  ],
   维护类型: [
     { value: 'SG', label: '事故登记' },
     { value: 'XZ', label: '现状登记' },

+ 1 - 1
src/utils/http.ts

@@ -7,7 +7,7 @@ import { domShowFu } from './domShow'
 
 export const envFlag = process.env.NODE_ENV === 'development'
 
-// const baseUrlTemp = 'https://sit-jiningbwg.4dage.com' // 测试环境
+// const baseUrlTemp = 'https://sit-qingdaobeer.4dage.com' // 测试环境
 const baseUrlTemp = 'http://192.168.20.61:8112' // 线下环境
 
 const baseFlag = baseUrlTemp.includes('https://')

+ 13 - 1
src/utils/index.ts

@@ -5,7 +5,19 @@ import { baseURL } from './http'
 type FileObjType = {
   [key: string]: string[]
 }
-export const fileImgArr = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'tiff', 'webp', 'svg', 'psd', 'ai']
+export const fileImgArr = [
+  'jpg',
+  'jpeg',
+  'png',
+  'gif',
+  'bmp',
+  'tiff',
+  'webp',
+  'svg',
+  'psd',
+  'ai',
+  'ico'
+]
 export const fileVideoArr = ['mp4', 'mov', 'avi', 'mkv', 'flv', 'wmv', 'mpeg', 'webm']
 
 const fileObj: FileObjType = {

+ 14 - 4
src/utils/tableData.ts

@@ -54,7 +54,7 @@ export const goodsSonTableC = (loc?: boolean) => {
     ['select', '完残程度', 'tornLevel', selectObj['完残程度']],
     ['ping', '数量', 'pcs', 'pcsUnitDictId']
   ]
-  if (loc) arr.push(['txt', '库房位置', '待完善sg'])
+  if (loc) arr.push(['txt', '库房位置', 'siteLoc'])
   return arr
 }
 
@@ -176,22 +176,32 @@ export const outStorageTableC = [
   ['select', '申请状态', 'status', selectObj['藏品入库申请状态']]
 ]
 
-// 待完善sg---一些字段等后端完善
+// 藏品详情----藏品附件
 export const GI3tableC = [
   ['select', '附件类型', 'type', selectObj['附件类型']],
   ['txt', '附件名称', 'fileName'],
-  ['txt', '图片类型', 'xxxx'],
   ['dateRes', '上传日期', 'createTime'],
   ['txtC', '上传人', 'creatorName'],
   ['sizeNum', '文件大小(mb)', 'fileSize', 1024]
 ]
-
+// 藏品详情----藏品故事
 export const GI4tableC = [
   ['txt', '故事名称', 'name'],
   ['text', '备注', 'remark', 50],
   ['txt', '编辑人', 'creatorName']
 ]
 
+// 藏品详情----藏品日志
+export const GI5tableC = [
+  ['txt', '申请类型', 'xxx'],
+  ['txt', '业务发生日期', 'xxx'],
+  ['txt', '申请编号', 'num'],
+  ['txt', '发起部门', 'deptName'],
+  ['txt', '发起人', 'creatorName'],
+  ['txt', '发起日期', 'date'],
+  ['select', '申请状态', 'status', selectObj['藏品入库申请状态']]
+]
+
 // 藏品盘点
 export const checkTableC = [
   ['txt', '盘点日期', 'createTime'],