shaogen1995 преди 5 месеца
родител
ревизия
e9b34d967e

+ 36 - 7
src/assets/styles/base.css

@@ -100,6 +100,39 @@ textarea {
   display: flex;
   justify-content: center;
 }
+#root .tableImgAuto .TvideoBox {
+  cursor: pointer;
+  width: 60px;
+  height: 60px;
+  position: relative;
+}
+#root .tableImgAuto .TvideoBox .TvideoBoxLook {
+  position: absolute;
+  z-index: 10;
+  opacity: 0;
+  transition: opacity 0.3s;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  font-size: 14px;
+  color: #fff;
+  background-color: rgba(0, 0, 0, 0.6);
+}
+#root .tableImgAuto .TvideoBox .TvideoBoxLook .anticon-eye {
+  font-size: 18px;
+}
+#root .tableImgAuto .TvideoBox video {
+  width: 100%;
+  height: 100%;
+  object-fit: cover;
+}
+#root .tableImgAuto .TvideoBox:hover .TvideoBoxLook {
+  opacity: 1;
+}
 #root .ant-image {
   display: none;
 }
@@ -167,17 +200,13 @@ textarea {
   background-color: rgba(0, 0, 0, 0.8) !important;
 }
 .ant-image-preview-mask {
-  z-index: 9999 !important;
+  z-index: 10000 !important;
 }
 .ant-image-preview-wrap {
-  z-index: 9999 !important;
+  z-index: 10001 !important;
 }
 .ant-image-preview-operations-wrapper {
-  z-index: 9999 !important;
-}
-.ant-notification-notice {
-  max-height: 500px !important;
-  overflow-y: auto !important;
+  z-index: 10002 !important;
 }
 .Y2xia {
   display: block;

+ 42 - 7
src/assets/styles/base.less

@@ -181,6 +181,41 @@ textarea {
   .tableImgAuto {
     display: flex;
     justify-content: center;
+    .TvideoBox {
+      cursor: pointer;
+      width: 60px;
+      height: 60px;
+      position: relative;
+      .TvideoBoxLook {
+        position: absolute;
+        z-index: 10;
+        opacity: 0;
+        transition: opacity 0.3s;
+        top: 0;
+        left: 0;
+        width: 100%;
+        height: 100%;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        font-size: 14px;
+        color: #fff;
+        background-color: rgba(0, 0, 0, 0.6);
+        .anticon-eye {
+          font-size: 18px;
+        }
+      }
+      video {
+        width: 100%;
+        height: 100%;
+        object-fit: cover;
+      }
+      &:hover {
+        .TvideoBoxLook {
+          opacity: 1;
+        }
+      }
+    }
   }
 
   /* antd图片预览组件 */
@@ -271,19 +306,19 @@ textarea {
   background-color: rgba(0, 0, 0, 0.8) !important;
 }
 .ant-image-preview-mask {
-  z-index: 9999 !important;
+  z-index: 10000 !important;
 }
 .ant-image-preview-wrap {
-  z-index: 9999 !important;
+  z-index: 10001 !important;
 }
 .ant-image-preview-operations-wrapper {
-  z-index: 9999 !important;
+  z-index: 10002 !important;
 }
 
-.ant-notification-notice {
-  max-height: 500px !important;
-  overflow-y: auto !important;
-}
+// .ant-notification-notice {
+//   max-height: 500px !important;
+//   overflow-y: auto !important;
+// }
 
 // 热点页面打开透明的变化
 // #Y1cathet {

+ 4 - 2
src/components/MyTable/index.tsx

@@ -13,7 +13,8 @@ type Props = {
   pageSize?: number
   pagingInfo?: any | boolean
   onChange?: (pageNum: number, pageSize: number) => void
-  lastBtn?: any
+  lastBtn?: any //后面的操作按钮
+  startBtn?: any
   classKey?: string //一个组件多次使用的时候要传递,分别设置style
   // 表格简单的合并
   merge?: { type: string; num: number; loc: 'rowSpan' | 'colSpan' }
@@ -39,6 +40,7 @@ function MyTable({
   },
   onChange,
   lastBtn = [],
+  startBtn = [],
   classKey = '',
   merge,
   myTitle,
@@ -175,7 +177,7 @@ function MyTable({
       className={`${styles.MyTable} MyTable${classKey}`}
       scroll={{ y: yHeight ? yHeight : '' }}
       dataSource={list}
-      columns={[...columns, ...lastBtn]}
+      columns={[...startBtn, ...columns, ...lastBtn]}
       rowKey='id'
       pagination={
         pagingInfo

+ 2 - 2
src/pages/B_enterTibet/B3_4page/index.tsx

@@ -13,7 +13,7 @@ const { RangePicker } = DatePicker
 
 type InputKeyType = 'aaaa' | 'bbbb' | 'cccc' | 'dddd'
 
-const inputKeyArr: {
+export const B3_4inputKeyArr: {
   name: string
   key: InputKeyType
 }[] = [
@@ -166,7 +166,7 @@ function B34page({ pageSta }: Props) {
 
       <div className='B3top'>
         <div className='B3topll'>
-          {inputKeyArr.map(item => (
+          {B3_4inputKeyArr.map(item => (
             <div key={item.name}>
               <span>{item.name}:</span>
               <Input

+ 11 - 0
src/pages/D_storeManage/D1storage/D1goods/index.module.scss

@@ -27,6 +27,17 @@
       .D1Gmainrr {
         margin-left: 20px;
         width: calc(100% - 320px);
+        .D1GtNum {
+          cursor: pointer;
+          text-decoration: underline;
+          // &:hover {
+          //   color: var(--themeColor);
+          // }
+        }
+
+        .D1GtNumAc {
+          color: var(--themeColor);
+        }
       }
     }
   }

+ 24 - 7
src/pages/D_storeManage/D1storage/D1goods/index.tsx

@@ -7,6 +7,7 @@ import MyTable from '@/components/MyTable'
 import { D1GtableC } from '@/utils/tableData'
 import Y1cathet from '@/pages/Y_goodsDetails/Y1cathet'
 import history from '@/utils/history'
+import classNames from 'classnames'
 
 const baseFormData: TypeD1Gform = {
   pageSize: 10,
@@ -84,6 +85,27 @@ function D1goods({ lookData }: Props) {
   //   [formData]
   // )
 
+  // 打开侧边栏
+  const [cathet, setCathet] = useState(0)
+
+  const startBtn = useMemo(() => {
+    return [
+      {
+        title: '编号类型',
+        render: (item: any) => {
+          return (
+            <span
+              onClick={() => setCathet(item.id)}
+              className={classNames('D1GtNum', item.id === cathet ? 'D1GtNumAc' : '')}
+            >
+              {item.num}
+            </span>
+          )
+        }
+      }
+    ]
+  }, [cathet])
+
   const tableLastBtn = useMemo(() => {
     return [
       {
@@ -103,12 +125,6 @@ function D1goods({ lookData }: Props) {
     ]
   }, [])
 
-  // 打开侧边栏
-  const [cathet, setCathet] = useState(0)
-  const cathetFu = useCallback((id: number) => {
-    setCathet(id)
-  }, [])
-
   return (
     <div className={styles.D1goods}>
       <div className='D1Gtop'>
@@ -173,7 +189,8 @@ function D1goods({ lookData }: Props) {
               { id: 99, thumb: '', num: '一段编号_可点击' },
               { id: 199, thumb: '', num: '一段编号_可点击' }
             ]}
-            columnsTemp={D1GtableC(cathetFu)}
+            columnsTemp={D1GtableC}
+            startBtn={startBtn}
             lastBtn={tableLastBtn}
             pagingInfo={false}
             widthSet={{ description: 200 }}

+ 8 - 3
src/pages/Y_goodsDetails/Y1cathet/Y22com.tsx

@@ -1,7 +1,12 @@
 import MyTable from '@/components/MyTable'
 import { Y22tableC } from '@/utils/tableData'
 import React from 'react'
-function Y22com() {
+
+type Props = {
+  isLook?: boolean
+}
+
+function Y22com({ isLook }: Props) {
   return (
     <div className='Y22com'>
       <div className='Y22sta'>库存状态:待入库</div>
@@ -9,12 +14,12 @@ function Y22com() {
       {/* 表格 */}
       <MyTable
         classKey='Y22comTable'
-        yHeight={666}
+        yHeight={isLook ? 640 : 666}
         list={[{ id: 1 }]}
         columnsTemp={Y22tableC}
         lastBtn={[]}
         pagingInfo={false}
-        widthSet={{ description: 600 }}
+        widthSet={isLook ? undefined : { description: 600 }}
       />
     </div>
   )

+ 154 - 18
src/pages/Y_goodsDetails/Y1cathet/Y33com.tsx

@@ -1,49 +1,185 @@
-import React, { useMemo, useState } from 'react'
+import React, { useCallback, useMemo, useState } from 'react'
 import { Y33BtnArr } from './data'
-import { Button } from 'antd'
+import { Button, Checkbox } from 'antd'
 import MyTable from '@/components/MyTable'
 import { Y33tableC } from '@/utils/tableData'
-function Y33com() {
+import ImageLazy from '@/components/ImageLazy'
+import { EyeOutlined } from '@ant-design/icons'
+import store from '@/store'
+import MyPopconfirm from '@/components/MyPopconfirm'
+import Y33setType from '../Y2look/Y33setType'
+
+type Props = {
+  isLook?: boolean
+}
+
+function Y33com({ isLook }: Props) {
   const [btnAc, setBtnAc] = useState('全部')
 
+  // 多选
+  const [checkArr, setCheckArr] = useState<number[]>([])
+
+  const checkFu = useCallback(
+    (id: number) => {
+      if (checkArr.includes(id)) setCheckArr(checkArr.filter(v => v !== id))
+      else setCheckArr([...checkArr, id])
+    },
+    [checkArr]
+  )
+
+  const startBtn = useMemo(() => {
+    let arr: any = []
+
+    if (isLook)
+      arr.push({
+        title: '选择',
+        width: 50,
+        render: (item: any) => (
+          <Checkbox checked={checkArr.includes(item.id)} onChange={() => checkFu(item.id)} />
+        )
+      })
+
+    if (['全部', '图像', '视频'].includes(btnAc))
+      arr.push({
+        title: '缩略图/视频',
+        render: (item: any) => {
+          return item.type === '图像' ? (
+            <div className='tableImgAuto'>
+              <ImageLazy width={60} height={60} srcBig={item.src} src={item.src} offline={true} />
+            </div>
+          ) : item.type === '视频' ? (
+            <div className='tableImgAuto'>
+              <div className='TvideoBox'>
+                <div
+                  className='TvideoBoxLook'
+                  onClick={() =>
+                    store.dispatch({
+                      type: 'layout/lookDom',
+                      payload: { src: item.src, type: 'video', flag: true }
+                    })
+                  }
+                >
+                  <EyeOutlined />
+                  &nbsp;
+                  <div>预览</div>
+                </div>
+                <video src={item.src}></video>
+              </div>
+            </div>
+          ) : (
+            ' - '
+          )
+        }
+      })
+
+    return arr
+  }, [btnAc, checkArr, checkFu, isLook])
+
   const tableLastBtn = useMemo(() => {
     return [
       {
         title: '操作',
         render: (item: any) => {
           return (
-            <Button size='small' type='text'>
-              下载
-            </Button>
+            <>
+              <Button size='small' type='text'>
+                <a href={item.src} download target='_blank' rel='noreferrer'>
+                  下载
+                </a>
+              </Button>
+              {isLook ? (
+                <>
+                  <Button
+                    size='small'
+                    type='text'
+                    onClick={() =>
+                      setTypeMo({
+                        leiXin: item.type,
+                        yongTu: '',
+                        flag: '单个',
+                        show: true
+                      })
+                    }
+                  >
+                    设置
+                  </Button>
+                  <MyPopconfirm txtK='删除' onConfirm={() => {}} />
+                </>
+              ) : null}
+            </>
           )
         }
       }
     ]
-  }, [])
+  }, [isLook])
+
+  const [typeMo, setTypeMo] = useState({ leiXin: '', yongTu: '', flag: '', show: false })
 
   return (
     <div className='Y33com'>
       <div className='Y33top'>
-        {Y33BtnArr.map(v => (
-          <Button
-            key={v.name}
-            onClick={() => setBtnAc(v.name)}
-            type={btnAc === v.name ? 'primary' : 'default'}
-          >
-            {v.name}
-          </Button>
-        ))}
+        <div className='Y33topll'>
+          {Y33BtnArr.map(v => (
+            <Button
+              key={v.name}
+              onClick={() => setBtnAc(v.name)}
+              type={btnAc === v.name ? 'primary' : 'default'}
+            >
+              {v.name}
+            </Button>
+          ))}
+        </div>
+        {isLook ? (
+          <div className='Y33toprr'>
+            <Button type='primary' disabled={checkArr.length === 0}>
+              批量下载
+            </Button>
+            &emsp;
+            <Button
+              type='primary'
+              disabled={checkArr.length === 0}
+              onClick={() =>
+                setTypeMo({
+                  leiXin: '',
+                  yongTu: '',
+                  flag: '批量',
+                  show: true
+                })
+              }
+            >
+              批量设置
+            </Button>
+          </div>
+        ) : null}
       </div>
 
       {/* 表格 */}
       <MyTable
         classKey='Y33comTable'
-        yHeight={666}
-        list={[{ id: 1, thumb: '' }]}
+        yHeight={isLook ? 640 : 666}
+        list={[
+          {
+            id: 1,
+            type: '图像',
+            src: 'https://houseoss.4dkankan.com/project/DEMO/staticResource/touxiang.jpg'
+          },
+          {
+            id: 2,
+            type: '视频',
+            src: 'https://houseoss.4dkankan.com/project/DEMO/staticResource/loop.mp4'
+          },
+          {
+            id: 3,
+            type: '3D'
+          }
+        ]}
         columnsTemp={Y33tableC}
         lastBtn={tableLastBtn}
+        startBtn={startBtn}
         pagingInfo={false}
       />
+
+      {typeMo.show ? <Y33setType info={typeMo} closeFu={() => setTypeMo({} as any)} /> : null}
     </div>
   )
 }

+ 163 - 5
src/pages/Y_goodsDetails/Y1cathet/Y44com.tsx

@@ -1,8 +1,104 @@
 import MyTable from '@/components/MyTable'
 import { Y44tableC } from '@/utils/tableData'
-import { Button } from 'antd'
-import React, { useMemo } from 'react'
-function Y44com() {
+import { Button, DatePicker, Input, Select } from 'antd'
+import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
+import { TypeY44form } from './type'
+import { B3_4inputKeyArr } from '@/pages/B_enterTibet/B3_4page'
+import dayjs from 'dayjs'
+const { RangePicker } = DatePicker
+
+type InputKeyType = 'aaaa' | 'bbbb' | 'cccc' | 'dddd'
+
+const baseFormData: TypeY44form = {
+  pageSize: 10,
+  pageNum: 1,
+  aaaa: '',
+  bbbb: '',
+  cccc: '',
+  dddd: '',
+  startTime: '',
+  endTime: '',
+  eeee: '',
+  ffff: ''
+}
+// 待完善 没有接入后端
+
+type Props = {
+  isLook?: boolean
+}
+
+function Y44com({ isLook }: Props) {
+  const [formData, setFormData] = useState(baseFormData)
+  const formDataRef = useRef(baseFormData)
+
+  useEffect(() => {
+    formDataRef.current = formData
+  }, [formData])
+
+  // 点击搜索的 时间戳
+  const [timeKey, setTimeKey] = useState(0)
+
+  // 点击搜索
+  const clickSearch = useCallback(() => {
+    setFormData({ ...formData, pageNum: 1 })
+    setTimeout(() => {
+      setTimeKey(Date.now())
+    }, 50)
+  }, [formData])
+
+  // 时间选择器改变
+  const timeChange = useCallback(
+    (date: any, dateString: any) => {
+      let startTime = ''
+      let endTime = ''
+      if (dateString[0] && dateString[1]) {
+        startTime = dateString[0] + ' 00:00:00'
+        endTime = dateString[1] + ' 23:59:59'
+      }
+      setFormData({ ...formData, startTime, endTime })
+    },
+    [formData]
+  )
+
+  // 封装发送请求的函数
+  const getListFu = useCallback(() => {
+    console.log('发送请求', formDataRef.current)
+  }, [])
+
+  useEffect(() => {
+    getListFu()
+  }, [getListFu, timeKey])
+
+  // 输入框的改变
+  const txtChangeFu = useCallback(
+    (txt: string, key: InputKeyType) => {
+      setFormData({
+        ...formData,
+        [key]: txt
+      })
+    },
+    [formData]
+  )
+
+  // 点击重置
+  const resetSelectFu = useCallback(() => {
+    setFormData(baseFormData)
+    setTimeout(() => {
+      setTimeKey(Date.now())
+    }, 50)
+  }, [])
+
+  // 页码变化
+  // const paginationChange = useCallback(
+  //   (pageNum: number, pageSize: number) => {
+  //     setFormData({ ...formData, pageNum, pageSize })
+  //     setTimeout(() => {
+  //       setTimeKey(Date.now())
+  //     }, 50)
+  //   },
+  //   [formData]
+  // )
+
   const tableLastBtn = useMemo(() => {
     return [
       {
@@ -21,11 +117,73 @@ function Y44com() {
 
   return (
     <div className='Y44com'>
+      {isLook ? (
+        <>
+          <div className='Y44top'>
+            <div className='Y44topll'>
+              {B3_4inputKeyArr.map(item => (
+                <div key={item.name}>
+                  <span>{item.name}:</span>
+                  <Input
+                    placeholder={`请输入${item.name}`}
+                    maxLength={30}
+                    value={formData[item.key]}
+                    onChange={e => txtChangeFu(e.target.value, item.key)}
+                  />
+                </div>
+              ))}
+            </div>
+            <div className='Y44toprr'></div>
+          </div>
+          <div className='Y44top'>
+            <div className='Y44topll'>
+              <div>
+                <span>发起日期范围:</span>
+                <RangePicker
+                  value={
+                    formData.startTime ? [dayjs(formData.startTime), dayjs(formData.endTime)] : null
+                  }
+                  onChange={timeChange}
+                />
+              </div>
+
+              <div>
+                <span>业务类型:</span>
+                <Select
+                  placeholder='请选择'
+                  style={{ width: 200 }}
+                  value={formData.ffff}
+                  onChange={e => setFormData({ ...formData, ffff: e })}
+                  options={[{ value: '', label: '全部' }]}
+                />
+              </div>
+
+              <div>
+                <span>申请状态:</span>
+                <Select
+                  placeholder='请选择'
+                  style={{ width: 200 }}
+                  value={formData.eeee}
+                  onChange={e => setFormData({ ...formData, eeee: e })}
+                  options={[{ value: '', label: '全部' }]}
+                />
+              </div>
+            </div>
+            <div className='Y44toprr'>
+              <Button type='primary' onClick={clickSearch}>
+                查询
+              </Button>
+              &emsp;<Button onClick={resetSelectFu}>重置</Button>
+            </div>
+          </div>
+        </>
+      ) : null}
+
       {/* 表格 */}
       <MyTable
         classKey='Y44comTable'
-        yHeight={666}
-        list={[{ id: 1 }]}
+        yHeight={isLook ? 600 : 666}
+        list={[{ id: 1, xxxx: '藏品入馆' }]}
         columnsTemp={Y44tableC}
         lastBtn={tableLastBtn}
         pagingInfo={false}

+ 11 - 11
src/pages/Y_goodsDetails/Y1cathet/data.ts

@@ -17,10 +17,10 @@ export const Y11infoArr2 = [
   { name: '作者介绍', key: '' },
   { name: '数量', key: '' },
   { name: '实际数量', key: '' },
-  { name: '质地', key: '', full: true },
+  { name: '质地', key: '' },
+  { name: '保存状态', key: '' },
   { name: '完残程度', key: '' },
   { name: '完残情况', key: '' },
-  { name: '保存状态', key: '', full: true },
   { name: '色泽', key: '' },
   { name: '用途', key: '' },
   { name: '形状描述', key: '' },
@@ -31,8 +31,8 @@ export const Y11infoArr2 = [
 ]
 
 export const Y11infoArr3 = [
-  { name: '尺寸', key: '', full: true },
-  { name: '具体尺寸', key: '', full: true },
+  { name: '尺寸', key: '' },
+  { name: '具体尺寸', key: '', full: false },
   { name: '质量范围', key: '' },
   { name: '具体质量', key: '' }
 ]
@@ -55,11 +55,11 @@ export const Y11infoArr5 = [
 ]
 
 export const Y33BtnArr = [
-  { name: '全部', key: '' },
-  { name: '图像', key: '' },
-  { name: '3D', key: '' },
-  { name: '音频', key: '' },
-  { name: '视频', key: '' },
-  { name: '文档', key: '' },
-  { name: '其他', key: '' }
+  { name: '全部', key: '1' },
+  { name: '图像', key: '2' },
+  { name: '3D', key: '3' },
+  { name: '音频', key: '4' },
+  { name: '视频', key: '5' },
+  { name: '文档', key: '6' },
+  { name: '其他', key: '7' }
 ]

+ 6 - 1
src/pages/Y_goodsDetails/Y1cathet/index.module.scss

@@ -4,7 +4,7 @@
   right: -900px;
   width: 900px;
   height: 100%;
-  z-index: 9999;
+  z-index: 9990;
   background-color: #fff;
   box-shadow: 1px 1px 4px 4px #ccc;
   padding: 24px;
@@ -78,6 +78,7 @@
           }
           .Y1rowrr {
             width: calc(100% - 120px);
+            word-wrap: break-word;
           }
         }
 
@@ -123,6 +124,7 @@
                 }
                 .y1z2_1r12 {
                   width: calc(100% - 120px);
+                  word-wrap: break-word;
                 }
               }
               .y1z2_1row1Full {
@@ -147,6 +149,9 @@
             margin-bottom: 20px;
             display: flex;
             justify-content: space-around;
+            .ant-btn {
+              margin-right: 15px;
+            }
           }
         }
       }

+ 12 - 0
src/pages/Y_goodsDetails/Y1cathet/type.d.ts

@@ -0,0 +1,12 @@
+export type TypeY44form = {
+  pageSize: number
+  pageNum: number
+  aaaa: string
+  bbbb: string
+  cccc: string
+  dddd: string
+  startTime: string
+  endTime: string
+  eeee: string
+  ffff: string
+}

+ 103 - 0
src/pages/Y_goodsDetails/Y2look/Y33setType.tsx

@@ -0,0 +1,103 @@
+import React, { useCallback, useEffect, useRef, useState } from 'react'
+import styles from './index.module.scss'
+import { Button, Cascader, Form, FormInstance, Modal, Select } from 'antd'
+import { Y33BtnArr } from '../Y1cathet/data'
+import MyPopconfirm from '@/components/MyPopconfirm'
+import { Z1_APIgetDictZhi } from '@/store/action/Z1dict'
+import { TypeZ1dict } from '@/pages/Z_system/Z1dict/type'
+
+type Props = {
+  info: any
+  closeFu: () => void
+}
+
+function Y33setType({ info, closeFu }: Props) {
+  const getTreeFu = useCallback(async () => {
+    const res = await Z1_APIgetDictZhi('12013')
+    if (res.code === 0) {
+      setTreeArr(res.data)
+    }
+  }, [])
+
+  useEffect(() => {
+    getTreeFu()
+  }, [getTreeFu])
+
+  const [treeArr, setTreeArr] = useState<TypeZ1dict[]>([])
+
+  useEffect(() => {
+    if (info.flag === '单个') {
+      FormBoxRef.current?.setFieldsValue({
+        aaaa: info.leiXin
+        // 待完善 设置回显级联
+      })
+    }
+  }, [info.flag, info.leiXin])
+
+  // 设置表单初始数据(区分编辑和新增)
+  const FormBoxRef = useRef<FormInstance>(null)
+
+  // 没有通过校验
+  const onFinishFailed = useCallback(() => {
+    // return MessageFu.warning("有表单不符号规则!");
+  }, [])
+
+  // 通过校验点击确定
+  const onFinish = useCallback(async (values: any) => {
+    console.log(123, values)
+  }, [])
+
+  return (
+    <Modal
+      wrapClassName={styles.Y33setType}
+      destroyOnClose
+      open={true}
+      title='设置'
+      footer={
+        [] // 设置footer为空,去掉 取消 确定默认按钮
+      }
+    >
+      <div className='Y33sMain'>
+        <Form
+          scrollToFirstError={true}
+          ref={FormBoxRef}
+          name='basic'
+          labelCol={{ span: 3 }}
+          onFinish={onFinish}
+          onFinishFailed={onFinishFailed}
+          autoComplete='off'
+        >
+          <Form.Item label='类型' name='aaaa' rules={[{ required: true, message: '请输入类型!' }]}>
+            <Select
+              options={Y33BtnArr.filter(v => v.name !== '全部')}
+              fieldNames={{ label: 'name', value: 'key' }}
+              placeholder='请选择'
+            />
+          </Form.Item>
+
+          <Form.Item label='用途' name='bbbb'>
+            <Cascader
+              changeOnSelect
+              fieldNames={{ label: 'name', value: 'id', children: 'children' }}
+              options={treeArr}
+              placeholder='请选择'
+            />
+          </Form.Item>
+          {/* 确定和取消按钮 */}
+          <br />
+          <Form.Item wrapperCol={{ offset: 9, span: 16 }}>
+            <Button type='primary' htmlType='submit'>
+              提交
+            </Button>
+            &emsp;
+            <MyPopconfirm txtK='取消' onConfirm={closeFu} />
+          </Form.Item>
+        </Form>
+      </div>
+    </Modal>
+  )
+}
+
+const MemoY33setType = React.memo(Y33setType)
+
+export default MemoY33setType

+ 159 - 0
src/pages/Y_goodsDetails/Y2look/index.module.scss

@@ -40,5 +40,164 @@
         }
       }
     }
+
+    // -----------主体
+    .Y2info {
+      width: 100%;
+      margin-top: 5px;
+      height: calc(100% - 18px);
+      font-size: 16px;
+      padding: 15px;
+      overflow-y: auto;
+      .ant-table-cell {
+        padding: 8px !important;
+      }
+      .Y1tit {
+        font-size: 18px;
+        padding-left: 15px;
+        font-weight: 700;
+        position: relative;
+        margin-bottom: 15px;
+        color: var(--themeColor);
+        &::before {
+          position: absolute;
+          left: 0px;
+          top: 50%;
+          transform: translateY(-50%);
+          content: '';
+          width: 6px;
+          height: 18px;
+          background-color: var(--themeColor);
+        }
+      }
+
+      .Y1row {
+        width: 100%;
+        display: flex;
+        margin-bottom: 10px;
+        .Y1rowll {
+          width: 120px;
+          text-align: right;
+          font-weight: 700;
+        }
+        .Y1rowrr {
+          width: calc(100% - 120px);
+          word-wrap: break-word;
+        }
+      }
+
+      // ------------------------档案信息
+      .Y1rowZ {
+        .Y1z1 {
+          margin-bottom: 20px;
+          display: flex;
+          justify-content: space-between;
+          .Y1rowZll {
+            width: 48%;
+            display: flex;
+            flex-direction: column;
+            justify-content: center;
+          }
+          .Y1rowZrr {
+            display: flex;
+            align-items: center;
+            width: 48%;
+          }
+        }
+
+        .Y1z2 {
+          margin-bottom: 20px;
+          .y1z2_1 {
+            display: flex;
+            flex-wrap: wrap;
+            justify-content: space-between;
+            width: 100%;
+            .y1z2_1row1 {
+              margin-bottom: 10px;
+              width: 48%;
+              display: flex;
+              .y1z2_1r11 {
+                width: 120px;
+                text-align: right;
+                font-weight: 700;
+              }
+              .y1z2_1r11long {
+                width: 132px;
+                position: relative;
+                left: -6px;
+              }
+              .y1z2_1r12 {
+                width: calc(100% - 120px);
+                word-wrap: break-word;
+              }
+            }
+            .y1z2_1row1Full {
+              width: 100%;
+            }
+          }
+        }
+      }
+
+      // ------------------------库存信息
+      .Y22com {
+        .Y22sta {
+          font-weight: 700;
+          font-size: 18px;
+          margin-bottom: 20px;
+        }
+      }
+
+      // ------------------------藏品附件
+      .Y33com {
+        .Y33top {
+          margin-bottom: 20px;
+          display: flex;
+          justify-content: space-between;
+          .Y33topll {
+            .ant-btn {
+              margin-right: 15px;
+            }
+          }
+        }
+      }
+
+      // ----------------藏品日志
+      .Y44top {
+        display: flex;
+        justify-content: space-between;
+        margin-bottom: 15px;
+        .Y44topll {
+          display: flex;
+          & > div {
+            position: relative;
+            margin-right: 15px;
+            display: flex;
+            align-items: center;
+            .ant-input {
+              width: 160px;
+            }
+          }
+        }
+      }
+    }
+  }
+}
+
+// 设置类型和用途
+.Y33setType {
+  :global {
+    .ant-modal-close {
+      display: none;
+    }
+
+    // .ant-modal {
+    //   width: 800px !important;
+    // }
+
+    .Y33sMain {
+      border-top: 1px solid #999999;
+      padding-top: 15px;
+      width: 100%;
+    }
   }
 }

+ 11 - 0
src/pages/Y_goodsDetails/Y2look/index.tsx

@@ -6,6 +6,10 @@ import classNames from 'classnames'
 import { Button, Dropdown, MenuProps } from 'antd'
 import MyPopconfirm from '@/components/MyPopconfirm'
 import history from '@/utils/history'
+import Y11com from '../Y1cathet/Y11com'
+import Y22com from '../Y1cathet/Y22com'
+import Y33com from '../Y1cathet/Y33com'
+import Y44com from '../Y1cathet/Y44com'
 
 function Y2look() {
   const { id: sId } = useParams<any>()
@@ -114,6 +118,13 @@ function Y2look() {
           <Button onClick={() => history.go(-1)}>返回</Button>
         </div>
       </div>
+
+      <div className='Y2info'>
+        {tabAc === '藏品信息' ? <Y11com /> : null}
+        {tabAc === '库存信息' ? <Y22com isLook={true} /> : null}
+        {tabAc === '藏品附件' ? <Y33com isLook={true} /> : null}
+        {tabAc === '藏品日志' ? <Y44com isLook={true} /> : null}
+      </div>
     </div>
   )
 }

+ 5 - 0
src/store/action/Z1dict.ts

@@ -17,6 +17,11 @@ export const Z1_APIgetDict = (id?: string, backFu?: (data: TypeZ1dict[]) => void
   }
 }
 
+// 根据指定id返回树结构
+export const Z1_APIgetDictZhi = (id: string) => {
+  return http.get(`cms/dict/getTree?parentId=${id}`)
+}
+
 /**
  * 获取详情
  */

+ 15 - 19
src/utils/tableData.ts

@@ -15,21 +15,18 @@
 //   ];
 
 // 待完善
-export const D1GtableC = (backFu: (id: number) => void) => {
-  return [
-    ['img', '封面图', 'thumb'],
-    ['text', '编号类型', 'num', 50, 'S', backFu],
-    ['txt', '藏品编号', 'userName'],
-    ['txt', '藏品名称', 'userName'],
-    ['txt', '数量', 'userName'],
-    ['txt', '库存状态', 'userName'],
-    ['txt', '区域名称', 'userName'],
-    ['txt', '排架', 'userName'],
-    ['txt', '层数', 'userName'],
-    ['txt', '表格', 'userName'],
-    ['txt', '库位说明', 'description']
-  ]
-}
+export const D1GtableC = [
+  ['img', '封面图', 'thumb'],
+  ['txt', '藏品编号', 'userName'],
+  ['txt', '藏品名称', 'userName'],
+  ['txt', '数量', 'userName'],
+  ['txt', '库存状态', 'userName'],
+  ['txt', '区域名称', 'userName'],
+  ['txt', '排架', 'userName'],
+  ['txt', '层数', 'userName'],
+  ['txt', '表格', 'userName'],
+  ['txt', '库位说明', 'description']
+]
 
 // 待完善
 export const B3tableC = [
@@ -69,14 +66,13 @@ export const D2tableCSon = [
 
 // 待完善
 export const Y22tableC = [
-  ['txt', '库存信息', 'userName'],
+  ['txt', '库存信息', 'xxxx'],
   ['txt', '库存详情', 'description']
 ]
 
 // 待完善
 export const Y33tableC = [
-  ['txt', '附件类型', 'userName'],
-  ['img', '缩略图', 'thumb'],
+  ['txt', '附件类型', 'type'],
   ['txt', '附件名称', 'description'],
   ['txt', '用途', 'description'],
   ['txt', '上传日期', 'description'],
@@ -86,7 +82,7 @@ export const Y33tableC = [
 
 // 待完善
 export const Y44tableC = [
-  ['txt', '业务类型', 'userName'],
+  ['txt', '业务类型', 'xxxx'],
   ['txt', '申请编号', 'description'],
   ['txt', '业务名称', 'description'],
   ['txt', '发起部门', 'description'],