shaogen1995 пре 20 часа
родитељ
комит
1b4d5eeeab
39 измењених фајлова са 74267 додато и 217 уклоњено
  1. 1 0
      public/index.html
  2. 127 0
      public/myData/index.js
  3. BIN
      public/usdzModel/favicon.ico
  4. 93 0
      public/usdzModel/index.html
  5. 1556 0
      public/usdzModel/js/OrbitControls.js
  6. 256 0
      public/usdzModel/js/main.js
  7. 48830 0
      public/usdzModel/js/three.core.js
  8. 17313 0
      public/usdzModel/js/three.module.js
  9. 5630 0
      public/usdzModel/js/tinyusdz.js
  10. BIN
      public/usdzModel/js/tinyusdz.wasm
  11. 5 0
      src/assets/styles/base.css
  12. 5 0
      src/assets/styles/base.less
  13. 46 0
      src/pages/A1check/A1ledger/data.ts
  14. 11 0
      src/pages/A1check/A1ledger/index.module.scss
  15. 64 0
      src/pages/A1check/A1ledger/index.tsx
  16. 4 0
      src/pages/A1check/A2manage/index.module.scss
  17. 13 0
      src/pages/A1check/A2manage/index.tsx
  18. 4 0
      src/pages/A1check/A3result/index.module.scss
  19. 13 0
      src/pages/A1check/A3result/index.tsx
  20. 1 1
      src/pages/AAnew/AA1info/index.tsx
  21. 2 2
      src/pages/AAnew/AA1onePu/index.tsx
  22. 1 1
      src/pages/AAnew/AAlook/index.tsx
  23. 38 5
      src/pages/Layout/data.ts
  24. 4 4
      src/pages/Layout/index.module.scss
  25. 5 39
      src/pages/Layout/index.tsx
  26. 4 1
      src/pages/Z_system/Z4organization/index.module.scss
  27. 1 1
      src/pages/Z_system/Z4organization/index.tsx
  28. 1 1
      src/pages/Z_system/Z6user/index.tsx
  29. 1 1
      src/pages/AAnew/AAbtn/index.module.scss
  30. 17 5
      src/pages/AAnew/AAbtn/index.tsx
  31. 47 0
      src/pages/ZcomPage/TopSearch/index.module.scss
  32. 132 0
      src/pages/ZcomPage/TopSearch/index.tsx
  33. 4 0
      src/pages/ZgoodsInfo/index.module.scss
  34. 13 0
      src/pages/ZgoodsInfo/index.tsx
  35. 3 3
      src/store/action/AAnew/AA1onePu.ts
  36. 1 0
      src/types/declaration.d.ts
  37. 6 17
      src/utils/history.ts
  38. 15 110
      src/utils/select.ts
  39. 0 26
      src/utils/storage.ts

+ 1 - 0
public/index.html

@@ -9,6 +9,7 @@
     <link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
 
     <title>此物-文物AI识别比对系统</title>
+    <script src="./myData/index.js"></script>
     <script>
       const baseUrlTempOne = 'https://sit-ciwu.4dage.com'
     </script>

+ 127 - 0
public/myData/index.js

@@ -0,0 +1,127 @@
+const dictStrTemp = {
+  编号类型: [
+    { value: '藏品总登记号', label: '藏品总登记号' },
+    { value: '辅助账号', label: '辅助账号' },
+    { value: '索书号', label: '索书号' },
+    { value: '档案编号', label: '档案编号' },
+    { value: '固定资产登记号', label: '固定资产登记号' },
+    { value: '财产登记号', label: '财产登记号' },
+    { value: '出土(水)登记号', label: '出土(水)登记号' },
+    { value: '其他编号', label: '其他编号' }
+  ],
+  年代: [
+    { value: '夏', label: '夏' },
+    { value: '商', label: '商' },
+    { value: '周', label: '周' },
+    { value: '秦', label: '秦' },
+    { value: '汉', label: '汉' },
+    { value: '三国', label: '三国' },
+    { value: '西晋', label: '西晋' },
+    { value: '东晋十六国', label: '东晋十六国' },
+    { value: '南北朝', label: '南北朝' },
+    { value: '隋', label: '隋' },
+    { value: '唐', label: '唐' },
+    { value: '五代十国', label: '五代十国' },
+    { value: '宋', label: '宋' },
+    { value: '辽', label: '辽' },
+    { value: '西夏', label: '西夏' },
+    { value: '金', label: '金' },
+    { value: '元', label: '元' },
+    { value: '明', label: '明' },
+    { value: '清', label: '清' },
+    { value: '中华民国', label: '中华民国' },
+    { value: '中华人民共和国', label: '中华人民共和国' }
+  ],
+  类别: [
+    { value: '玉石器、宝石', label: '玉石器、宝石' },
+    { value: '陶器', label: '陶器' },
+    { value: '瓷器', label: '瓷器' },
+    { value: '铜器', label: '铜器' },
+    { value: '金银器', label: '金银器' },
+    { value: '铁器、其他金属', label: '铁器、其他金属' },
+    { value: '漆器', label: '漆器' },
+    { value: '雕塑、造像', label: '雕塑、造像' },
+    { value: '石器、石刻、砖瓦', label: '石器、石刻、砖瓦' },
+    { value: '书法、绘画', label: '书法、绘画' },
+    { value: '文具', label: '文具' },
+    { value: '甲骨', label: '甲骨' },
+    { value: '玺印符牌', label: '玺印符牌' },
+    { value: '钱币', label: '钱币' },
+    { value: '牙骨角器', label: '牙骨角器' },
+    { value: '竹木雕', label: '竹木雕' },
+    { value: '家具', label: '家具' },
+    { value: '珐琅器', label: '珐琅器' },
+    { value: '织绣', label: '织绣' },
+    { value: '古籍图书', label: '古籍图书' },
+    { value: '碑帖拓本', label: '碑帖拓本' },
+    { value: '武器', label: '武器' },
+    { value: '邮品', label: '邮品' },
+    { value: '文件、宣传品', label: '文件、宣传品' },
+    { value: '档案文书', label: '档案文书' },
+    { value: '名人遗物', label: '名人遗物' },
+    { value: '玻璃器', label: '玻璃器' },
+    { value: '乐器、法器', label: '乐器、法器' },
+    { value: '皮革', label: '皮革' },
+    { value: '音像制品', label: '音像制品' },
+    { value: '票据', label: '票据' },
+    { value: '交通、运输工具', label: '交通、运输工具' },
+    { value: '度量衡器', label: '度量衡器' },
+    { value: '标本、化石', label: '标本、化石' },
+    { value: '其他', label: '其他' }
+  ],
+  质地: [
+    { value: '木', label: '木' },
+    { value: '竹', label: '竹' },
+    { value: '纸', label: '纸' },
+    { value: '毛', label: '毛' },
+    { value: '丝', label: '丝' },
+    { value: '皮革', label: '皮革' },
+    { value: '骨角牙', label: '骨角牙' },
+    { value: '棉麻纤维', label: '棉麻纤维' },
+    { value: '其他植物质', label: '其他植物质' },
+    { value: '其他动物质', label: '其他动物质' },
+    { value: '其他有机质', label: '其他有机质' },
+    { value: '石', label: '石' },
+    { value: '瓷', label: '瓷' },
+    { value: '砖瓦', label: '砖瓦' },
+    { value: '泥', label: '泥' },
+    { value: '陶', label: '陶' },
+    { value: '玻璃', label: '玻璃' },
+    { value: '铁', label: '铁' },
+    { value: '铜', label: '铜' },
+    { value: '宝玉石', label: '宝玉石' },
+    { value: '金', label: '金' },
+    { value: '银', label: '银' },
+    { value: '其他金属', label: '其他金属' },
+    { value: '其他无机质', label: '其他无机质' }
+  ],
+  文物级别: [
+    { value: '一级', label: '一级' },
+    { value: '二级', label: '二级' },
+    { value: '三级', label: '三级' },
+    { value: '一般', label: '一般' },
+    { value: '未定级', label: '未定级' }
+  ],
+  相符情况: [
+    { value: '相符 注:总登记账数量=相符件数', label: '相符 注:总登记账数量=相符件数' },
+    { value: '不相符 注:不相符数量不为0', label: '不相符 注:不相符数量不为0' }
+  ],
+  不符情况: [
+    { value: '数量不符', label: '数量不符' },
+    { value: '赝品/复仿制品', label: '赝品/复仿制品' },
+    { value: '长期出借,无法确认', label: '长期出借,无法确认' },
+    { value: '其他', label: '其他' }
+  ],
+  不符原因: [
+    { value: '记录错误', label: '记录错误' },
+    { value: '损毁', label: '损毁' },
+    { value: '被盗', label: '被盗' },
+    { value: '丢失', label: '丢失' },
+    { value: '长期出借,无法确认', label: '长期出借,无法确认' },
+    { value: '其他', label: '其他' }
+  ],
+  生效状态: [
+    { value: '生效中', label: '生效中' },
+    { value: '已作废', label: '已作废' }
+  ]
+}

BIN
public/usdzModel/favicon.ico


+ 93 - 0
public/usdzModel/index.html

@@ -0,0 +1,93 @@
+<!doctype html>
+<html lang="zh">
+  <head>
+    <meta charset="utf-8" />
+    <meta
+      name="viewport"
+      content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
+    />
+    <title>四维时代</title>
+    <link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
+    <style>
+      * {
+        margin: 0;
+        padding: 0;
+        box-sizing: border-box;
+      }
+
+      canvas {
+        touch-action: none;
+        /* 禁用浏览器默认触摸行为 */
+      }
+
+      body {
+        background-color: #ccc;
+      }
+
+      .loadingBox {
+        position: absolute;
+        width: 90%;
+        max-width: 1200px;
+        height: 6px;
+        border-radius: 3px;
+        border: 1px solid #2dc0ef;
+        top: 50%;
+        left: 50%;
+        transform: translate(-50%, -50%);
+        opacity: 1;
+        pointer-events: auto;
+        transition: all 0.5s;
+      }
+
+      #loading {
+        position: absolute;
+        top: 0;
+        left: 0;
+        width: 0;
+        height: 100%;
+        background-color: #2dc0ef;
+      }
+
+      /* @media screen and (max-width: 1000px) {
+			.loadingBox {
+				height: 10px;
+				border-radius: 5px;
+
+			}
+		} */
+      .errBox {
+        position: fixed;
+        z-index: 9999;
+        width: 100%;
+        height: 100%;
+        justify-content: center;
+        align-items: center;
+        letter-spacing: 4px;
+        font-size: 16px;
+        display: none;
+        background-color: #cccccc;
+      }
+    </style>
+  </head>
+
+  <body>
+    <script></script>
+    <div class="loadingBox">
+      <div id="loading"></div>
+    </div>
+    <script type="module" src="./js/main.js"></script>
+
+    <div class="errBox"></div>
+  </body>
+  <!-- 
+  <script>
+    window.onload = function () {
+      var script = document.createElement('script')
+      script.src = 'http://cdn.bootcss.com/eruda/1.5.4/eruda.min.js'
+      document.body.appendChild(script)
+      script.onload = function () {
+        eruda.init()
+      }
+    }
+  </script> -->
+</html>

Разлика између датотеке није приказан због своје велике величине
+ 1556 - 0
public/usdzModel/js/OrbitControls.js


+ 256 - 0
public/usdzModel/js/main.js

@@ -0,0 +1,256 @@
+import * as THREE from '../js/three.module.js'
+
+import initTinyUSDZ from '../js/tinyusdz.js'
+
+import { OrbitControls } from '../js/OrbitControls.js'
+
+const urlAll = window.location.href.split('?m=')[1]
+
+// console.log(123456,urlAll);
+
+// const USDZ_FILEPATH = `https://3d-usdz.4dkankan.com/sxz/${urlAll}.usdz`
+
+document.addEventListener('DOMContentLoaded', async () => {
+  try {
+    const loadingBar = document.getElementById('loading') // 获取加载条元素
+    loadingBar.style.display = 'block' // 显示加载条
+
+    const usd_res = await fetch(urlAll)
+
+    // console.log('-----------', usd_res)
+
+    if (usd_res.status !== 200) {
+      const dom = document.querySelector('.errBox')
+      dom.innerHTML = '加载错误或找不到模型文件'
+      dom.style.display = 'flex'
+
+      return
+    }
+
+    const totalBytes = parseInt(usd_res.headers.get('Content-Length'), 10) // 获取总字节数
+    const reader = usd_res.body.getReader() // 获取读取器
+    const chunks = [] // 存储数据块
+    let receivedLength = 0 // 已接收字节数
+
+    let timeOut = -1
+
+    // 更新加载条的函数
+    const updateLoadingBar = loaded => {
+      let percentage = (loaded / totalBytes) * 100
+      if (percentage >= 100) {
+        percentage = 100
+        // 隐藏加载条
+
+        clearTimeout(timeOut)
+        timeOut = setTimeout(() => {
+          const loadingBoxDom = document.querySelector('.loadingBox')
+          loadingBoxDom.style.opacity = 0
+          loadingBoxDom.style.pointerEvents = 'none'
+        }, 300)
+      }
+
+      loadingBar.style.width = `${percentage}%` // 更新加载条宽度
+    }
+
+    // 读取数据流
+    while (true) {
+      const { done, value } = await reader.read() // 读取数据
+      if (done) break // 如果读取完成,退出循环
+      chunks.push(value) // 存储数据块
+      receivedLength += value.length // 更新已接收字节数
+      updateLoadingBar(receivedLength) // 更新加载条
+    }
+
+    const usd_data = new Uint8Array(receivedLength) // 创建最终数据数组
+    let position = 0
+    for (const chunk of chunks) {
+      usd_data.set(chunk, position) // 将数据块写入最终数组
+      position += chunk.length // 更新位置
+    }
+
+    // const usd_binary = new Uint8Array(usd_data);
+
+    // 加载 TinyUSDZ
+    initTinyUSDZ().then(function (TinyUSDZLoader) {
+      const usd = new TinyUSDZLoader.TinyUSDZLoader(usd_data)
+      // console.log(usd.numMeshes());
+      // 隐藏加载条
+      loadingBar.style.display = 'none'
+
+      const scene = new THREE.Scene()
+      const camera = new THREE.PerspectiveCamera(
+        75,
+        window.innerWidth / window.innerHeight,
+        0.1,
+        1000
+      )
+
+      const renderer = new THREE.WebGLRenderer({
+        alpha: true, // 关键配置,设置背景透明
+        antialias: true // 可选抗锯齿
+      })
+
+      renderer.setClearColor(0x000000, 0) // 第二个参数为透明度(0表示完全透明)
+
+      renderer.setSize(window.innerWidth, window.innerHeight)
+      renderer.setAnimationLoop(animate)
+      // 设置输出颜色空间为线性SRGB
+      renderer.outputColorSpace = THREE.LinearSRGBColorSpace
+      document.body.appendChild(renderer.domElement)
+
+      // First mesh only
+      const mesh = usd.getMesh(0)
+      //console.log("usd", usd)
+      //console.log("mesh", mesh);
+
+      //const geometry = new THREE.BoxGeometry( 1, 1, 1 );
+      const geometry = new THREE.BufferGeometry()
+      geometry.setAttribute('position', new THREE.BufferAttribute(mesh.points, 3))
+      // TODO: set normal from mesh
+
+      if (mesh.hasOwnProperty('texcoords')) {
+        // console.log(mesh.texcoords);
+        geometry.setAttribute('uv', new THREE.BufferAttribute(mesh.texcoords, 2))
+      }
+
+      const usdMaterial = usd.getMaterial(mesh.materialId)
+      //console.log("usdMat", usdMaterial);
+      //if (usdMaterial.aaa) {
+      //  console.log("aaa");
+      //}
+
+      var material
+
+      if (usdMaterial.hasOwnProperty('diffuseColorTextureId')) {
+        const diffTex = usd.getTexture(usdMaterial.diffuseColorTextureId)
+
+        const img = usd.getImage(diffTex.textureImageId)
+        // console.log(img);
+
+        // assume RGBA for now.
+        let image8Array = new Uint8ClampedArray(img.data)
+        let imgData = new ImageData(image8Array, img.width, img.height)
+
+        const texture = new THREE.DataTexture(imgData, img.width, img.height)
+        texture.flipY = true
+        texture.needsUpdate = true
+
+        material = new THREE.MeshBasicMaterial({
+          map: texture
+        })
+      } else {
+        material = new THREE.MeshNormalMaterial()
+      }
+
+      // Assume triangulated indices.
+      geometry.setIndex(new THREE.Uint32BufferAttribute(mesh.faceVertexIndices, 1))
+
+      geometry.computeVertexNormals()
+
+      //const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
+      const cube = new THREE.Mesh(geometry, material)
+
+      // 缩放模型
+      cube.scale.set(2, 2, 2)
+      cube.updateMatrixWorld(true) // 强制更新世界矩阵[3](@ref)
+
+      // 计算包围盒
+      const box = new THREE.Box3().setFromObject(cube)
+      const center = new THREE.Vector3()
+      box.getCenter(center)
+
+      // 居中模型
+      cube.position.sub(center)
+
+      // 计算尺寸并调整相机
+      const size = box.getSize(new THREE.Vector3()).length()
+      camera.near = size / 100
+      camera.far = size * 100
+      camera.updateProjectionMatrix()
+      camera.position.set(size * 0.5, size * 0.5, size * 0.5)
+      camera.lookAt(0, 0, 0)
+
+      scene.add(cube)
+
+      const controls = new OrbitControls(camera, renderer.domElement)
+
+      controls.enablePan = true // 禁用右键平移功能
+
+      controls.enableZoom = true // 必须禁用轨道控制器的默认缩放[1](@ref)
+
+      controls.enableDamping = true
+      controls.dampingFactor = 0.25
+      controls.screenSpacePanning = false
+      controls.minPolarAngle = (Math.PI / 180) * 1 // 1 度(约 0.01745 弧度)
+      controls.maxPolarAngle = Math.PI - (Math.PI / 180) * 1 // 179 度(约 3.124 弧度)
+
+      // 兼容鼠标滚轮与触摸屏双指缩放
+      // 兼容鼠标滚轮与触摸屏双指缩放
+      // const handleZoom = (delta) => {
+      //   // console.log('--------',delta);
+
+      //   cube.updateMatrixWorld(true);
+      //   // 计算包围盒
+      //   const box = new THREE.Box3().setFromObject(cube);
+      //   const center = new THREE.Vector3();
+      //   box.getCenter(center);
+
+      //   // 居中模型
+      //   cube.position.sub(center);
+
+      //   cube.scale.multiplyScalar(delta);
+      //   cube.scale.clampScalar(0.5, 4); // 限制缩放范围0.5-3倍[1,6](@ref)
+      // };
+
+      // 鼠标滚轮事件
+      // window.addEventListener(
+      //   "wheel",
+      //   (e) => {
+      //     e.preventDefault();
+      //     const zoomFactor = e.deltaY > 0 ? 0.95 : 1.05;
+      //     handleZoom(zoomFactor);
+      //   },
+      //   { passive: false }
+      // );
+
+      // 触摸屏双指缩放
+      // let initialDistance = 0;
+      // window.addEventListener("touchstart", (e) => {
+      //   if (e.touches.length === 2) {
+      //     initialDistance = Math.hypot(
+      //       e.touches[0].pageX - e.touches[1].pageX,
+      //       e.touches[0].pageY - e.touches[1].pageY
+      //     );
+      //   }
+      // });
+
+      // window.addEventListener("touchmove", (e) => {
+      //   if (e.touches.length === 2) {
+      //     const currentDistance = Math.hypot(
+      //       e.touches[0].pageX - e.touches[1].pageX,
+      //       e.touches[0].pageY - e.touches[1].pageY
+      //     );
+      //     const zoomFactor = currentDistance > initialDistance ? 1.01 : 0.99;
+      //     handleZoom(zoomFactor);
+      //     initialDistance = currentDistance;
+      //   }
+      // });
+
+      function animate() {
+        //cube.rotation.x += 0.01;
+        // cube.rotation.y += 0.02;
+        controls.update()
+
+        renderer.render(scene, camera)
+      }
+
+      window.addEventListener('resize', () => {
+        camera.aspect = window.innerWidth / window.innerHeight
+        camera.updateProjectionMatrix()
+        renderer.setSize(window.innerWidth, window.innerHeight)
+      })
+    })
+  } catch (error) {
+    console.log('--------', error)
+  }
+})

Разлика између датотеке није приказан због своје велике величине
+ 48830 - 0
public/usdzModel/js/three.core.js


Разлика између датотеке није приказан због своје велике величине
+ 17313 - 0
public/usdzModel/js/three.module.js


Разлика између датотеке није приказан због своје велике величине
+ 5630 - 0
public/usdzModel/js/tinyusdz.js


BIN
public/usdzModel/js/tinyusdz.wasm


+ 5 - 0
src/assets/styles/base.css

@@ -192,6 +192,11 @@ textarea {
   height: 20px;
   background-color: var(--themeColor);
 }
+.pageTitle #AAbtn {
+  position: absolute;
+  top: -8px;
+  left: 150px;
+}
 .mySorrl::-webkit-scrollbar {
   /*滚动条整体样式*/
   width: 5px;

+ 5 - 0
src/assets/styles/base.less

@@ -305,6 +305,11 @@ textarea {
     height: 20px;
     background-color: var(--themeColor);
   }
+  #AAbtn {
+    position: absolute;
+    top: -8px;
+    left: 150px;
+  }
 }
 
 // 滚动条

+ 46 - 0
src/pages/A1check/A1ledger/data.ts

@@ -0,0 +1,46 @@
+import { resDictStr } from '@/utils/select'
+
+export const A1topArr = [
+  {
+    key: 'x1',
+    placeholder: '编号类型',
+    type: 'Select',
+    options: resDictStr('编号类型')
+  },
+  {
+    key: 'x2',
+    placeholder: '请输入编号',
+    type: 'Input'
+  },
+  {
+    key: 'x3',
+    placeholder: '请搜索名称或原名',
+    type: 'Input'
+  },
+  {
+    key: 'x4',
+    placeholder: '年代',
+    type: 'Select',
+    options: resDictStr('年代')
+  },
+  {
+    key: 'x5',
+    placeholder: '类别',
+    type: 'Select',
+    options: resDictStr('类别')
+  },
+  {
+    key: 'x6',
+    placeholder: '质地',
+    type: 'Select',
+    options: resDictStr('质地')
+  },
+  {
+    key: 'x7',
+    placeholder: '级别',
+    type: 'Select',
+    options: resDictStr('文物级别')
+  }
+]
+
+export type A1tableType = any

+ 11 - 0
src/pages/A1check/A1ledger/index.module.scss

@@ -0,0 +1,11 @@
+.A1ledger {
+  background-color: #fcf9f5;
+  border-radius: 10px;
+  padding: 15px 24px 0;
+  position: relative;
+  :global {
+    .A1table {
+      padding-top: 15px;
+    }
+  }
+}

+ 64 - 0
src/pages/A1check/A1ledger/index.tsx

@@ -0,0 +1,64 @@
+import React, { useMemo, useRef } from 'react'
+import styles from './index.module.scss'
+import TopSearch from '@/pages/ZcomPage/TopSearch'
+import { A1tableType, A1topArr } from './data'
+import AAbtn from '@/pages/ZcomPage/AAbtn'
+import { MessageFu } from '@/utils/message'
+import { Button } from 'antd'
+import { openLink } from '@/utils/history'
+
+function A1ledger() {
+  // --------------右侧按钮
+  const rightBtn = useMemo(() => {
+    return (
+      <>
+        <AAbtn txt={1} onClick={() => MessageFu.warning('功能开发中')} tit='新增藏品' />
+        <AAbtn txt={1} onClick={() => {}} tit='下载模板' />
+        <AAbtn txt={1} onClick={() => {}} tit='导入数据' />
+        <AAbtn txt={1} onClick={() => topDomRef.current.clickSearch()} tit='查询' />
+        <AAbtn txt={2} onClick={() => topDomRef.current.clickReset()} />
+      </>
+    )
+  }, [])
+
+  const topDomRef = useRef<any>(null)
+  return (
+    <div className={styles.A1ledger}>
+      <div className='pageTitle'>
+        盘库总账
+        <AAbtn
+          txt={3}
+          txtArr={['该操作将清空藏品盘点所有相关数据,请谨慎操作', '清空数据']}
+          onClick={() => {}}
+          tit='重置盘点数据'
+          width={120}
+        />
+      </div>
+
+      <TopSearch
+        ref={topDomRef}
+        leftArr={A1topArr}
+        rightBtn={rightBtn}
+        waiWidth={500}
+        sonWidth='13.3%'
+        columnsTemp={[['txt', '登录账号', 'name']]}
+        tableLastBtn={[
+          {
+            title: '操作',
+            render: (item: A1tableType) => {
+              return (
+                <Button size='small' type='text' onClick={() => openLink(`/goodsLook/${item.id}`)}>
+                  查看
+                </Button>
+              )
+            }
+          }
+        ]}
+      />
+    </div>
+  )
+}
+
+const MemoA1ledger = React.memo(A1ledger)
+
+export default MemoA1ledger

+ 4 - 0
src/pages/A1check/A2manage/index.module.scss

@@ -0,0 +1,4 @@
+.A2manage {
+  :global {
+  }
+}

+ 13 - 0
src/pages/A1check/A2manage/index.tsx

@@ -0,0 +1,13 @@
+import React from 'react'
+import styles from './index.module.scss'
+function A2manage() {
+  return (
+    <div className={styles.A2manage}>
+      <h1>A2manage</h1>
+    </div>
+  )
+}
+
+const MemoA2manage = React.memo(A2manage)
+
+export default MemoA2manage

+ 4 - 0
src/pages/A1check/A3result/index.module.scss

@@ -0,0 +1,4 @@
+.A3result {
+  :global {
+  }
+}

+ 13 - 0
src/pages/A1check/A3result/index.tsx

@@ -0,0 +1,13 @@
+import React from 'react'
+import styles from './index.module.scss'
+function A3result() {
+  return (
+    <div className={styles.A3result}>
+      <h1>A3result</h1>
+    </div>
+  )
+}
+
+const MemoA3result = React.memo(A3result)
+
+export default MemoA3result

+ 1 - 1
src/pages/AAnew/AA1info/index.tsx

@@ -6,7 +6,7 @@ import { AA1_APIgetInfo } from '@/store/action/AAnew/AA1onePu'
 import { AA1infoType, AAdomArr } from '../AA1onePu/data'
 import ImageLazy from '@/components/ImageLazy'
 import AAlook from '../AAlook'
-import AAbtn from '../AAbtn'
+import AAbtn from '../../ZcomPage/AAbtn'
 import { GoodsType } from '../data'
 
 type Props = {

+ 2 - 2
src/pages/AAnew/AA1onePu/index.tsx

@@ -8,7 +8,7 @@ import { RootState } from '@/store'
 import MyTable from '@/components/MyTable'
 import AA1info from '../AA1info'
 import { MessageFu } from '@/utils/message'
-import AAbtn from '../AAbtn'
+import AAbtn from '../../ZcomPage/AAbtn'
 function AA1onePu() {
   const dispatch = useDispatch()
   const [formData, setFormData] = useState(AA1baseForm)
@@ -113,7 +113,7 @@ function AA1onePu() {
 
   return (
     <div className={styles.AA1onePu}>
-      <div className='pageTitle'>{sId ? '盘点详情' : '一普盘点'}</div>
+      <div className='pageTitle'>{sId ? '盘点详情' : '盘点识别'}</div>
 
       <div className='AA1top'>
         <div className='AA1topll'>

+ 1 - 1
src/pages/AAnew/AAlook/index.tsx

@@ -4,7 +4,7 @@ import { Modal } from 'antd'
 import { AAdomArr } from '../AA1onePu/data'
 import classNames from 'classnames'
 import ImageLazy from '@/components/ImageLazy'
-import AAbtn from '../AAbtn'
+import AAbtn from '../../ZcomPage/AAbtn'
 import { GoodsType } from '../data'
 
 type Props = {

+ 38 - 5
src/pages/Layout/data.ts

@@ -3,15 +3,40 @@ import React from 'react'
 
 const tabLeftArr: RouterType = [
   {
-    id: 7,
-    name: '系统管理',
+    id: 6,
+    name: '藏品盘点',
     son: [
       {
-        id: 6601,
-        name: '一普盘点',
+        id: 1,
+        name: '盘库总账',
         path: '/',
-        Com: React.lazy(() => import('../AAnew/AA1onePu'))
+        Com: React.lazy(() => import('../A1check/A1ledger'))
+      },
+      {
+        id: 2,
+        name: '盘库管理',
+        path: '/manage',
+        Com: React.lazy(() => import('../A1check/A2manage'))
       },
+
+      {
+        id: 3,
+        name: '盘库结果',
+        path: '/result',
+        Com: React.lazy(() => import('../A1check/A3result'))
+      },
+      {
+        id: 4,
+        name: '盘点识别',
+        path: '/discern',
+        Com: React.lazy(() => import('../AAnew/AA1onePu'))
+      }
+    ]
+  },
+  {
+    id: 7,
+    name: '系统设置',
+    son: [
       {
         id: 740,
         name: '部门管理',
@@ -24,6 +49,14 @@ const tabLeftArr: RouterType = [
         name: '用户管理',
         path: '/user',
         Com: React.lazy(() => import('../Z_system/Z6user'))
+      },
+      // 不需要 高亮的 详情页
+      {
+        id: 9901,
+        name: '藏品详情',
+        path: '/goodsLook/:id',
+        pathLast: '/goodsLook',
+        Com: React.lazy(() => import('../ZgoodsInfo'))
       }
     ]
   }

+ 4 - 4
src/pages/Layout/index.module.scss

@@ -32,16 +32,16 @@
           background: var(--themeColor2);
         }
         .layoutLRowBox {
+          margin-bottom: 20px;
           .layoutLRowBoxTxt {
-            // opacity: 0.8;
             font-size: 18px;
             font-weight: 700;
             height: 50px;
             line-height: 50px;
-            padding-left: 35px;
-            color: #fff;
+            padding-left: 20px;
             display: flex;
             align-items: center;
+            color: #fff;
             & > img {
               width: 30px;
               height: 30px;
@@ -54,7 +54,7 @@
           .layoutLRowBoxRow {
             color: #fff;
             // text-align: center;
-            padding-left: 24px;
+            padding-left: 36px;
             cursor: pointer;
 
             font-size: 16px;

+ 5 - 39
src/pages/Layout/index.tsx

@@ -10,7 +10,7 @@ import { Button, Form, Input, Modal } from 'antd'
 import { Base64 } from 'js-base64'
 import encodeStr from '@/utils/pass'
 import { passWordEditAPI } from '@/store/action/layout'
-import { changSetFu, getTokenInfo, removeTokenInfo, setTokenInfo } from '@/utils/storage'
+import { getTokenInfo, removeTokenInfo, setTokenInfo } from '@/utils/storage'
 import { MessageFu } from '@/utils/message'
 import NotFound from '@/components/NotFound'
 import { RouterType, RouterTypeRow } from '@/types'
@@ -56,34 +56,10 @@ function Layout() {
     getUserInfoFu()
   }, [getUserInfoFu])
 
-  // 获取角色下载权限
-  const getDownRole = useCallback(async () => {
-    // const info = getTokenInfo().user || {}
-    // if (info && info.roleId) {
-    //   const res = await Z5_APIgetInfo(info.roleId)
-    //   if (res.code === 0) {
-    //     const data = res.data.role
-    //     store.dispatch({
-    //       type: 'layout/downImg',
-    //       payload: {
-    //         可见: data.scopeGoodsFile === 1 ? '可见' : '不可见',
-    //         图片: data.scopeGoodsFileDownload === 1 ? '原图和缩略图' : '缩略图'
-    //       }
-    //     })
-    //     // 藏品详情页面tab和按钮权限
-    //     const scopeGoods: string = data.scopeGoods
-    //     if (scopeGoods) {
-    //       store.dispatch({ type: 'layout/goodsInfoPower', payload: scopeGoods.split(',') })
-    //     }
-    //   }
-    // }
-  }, [])
-
   // 用户信息存到仓库
   useEffect(() => {
     store.dispatch({ type: 'layout/userInfo', payload: (getTokenInfo() || {}).user })
-    getDownRole()
-  }, [getDownRole])
+  }, [])
 
   // 获取用户信息
   const { userInfo, passEditShow } = useSelector((state: RootState) => state.A0Layout)
@@ -123,7 +99,7 @@ function Layout() {
   const getUserAuthFu = useCallback(async () => {
     const userInfo = getTokenInfo().user || {}
 
-    const isOkIdArr: number[] = [6601]
+    const isOkIdArr: number[] = [1, 2, 3, 4, 9901]
 
     // 是管理员
     if (userInfo.roleId === 1) {
@@ -134,9 +110,6 @@ function Layout() {
 
     const tempArr: RouterTypeRow[] = []
 
-    // 权限数据存到仓库
-    const roleArrStoreArr: RouterType = []
-
     tabLeftArr.forEach(v1 => {
       if (v1.son && v1.son[0]) {
         const obj = {
@@ -150,8 +123,6 @@ function Layout() {
             obj.son.push({ ...v2, authority: true })
           }
         })
-
-        roleArrStoreArr.push(obj)
       }
     })
 
@@ -197,14 +168,9 @@ function Layout() {
   // 路由信息(过滤之后的)
   const [RouterCom, setRouterCom] = useState<RouterTypeRow[]>([])
 
-  // useEffect(() => {
-  //   console.log(123, list);
-  // }, [list]);
-
   // 点击跳转
   const pathCutFu = useCallback((item: RouterTypeRow) => {
     history.push(item.path)
-    if (item.name !== '业务中心') changSetFu(item)
   }, [])
 
   // 拿到新密码的输入框的值
@@ -274,13 +240,13 @@ function Layout() {
           {list.map(v => (
             <div className={classNames('layoutLRowBox')} key={v.id}>
               {/* 一级目录 */}
-              <div className='layoutLRowBoxTxt' hidden>
-                <img src={baseURL + '/baseData/tabImg/' + v.name + '.png'} alt='' />
+              <div className='layoutLRowBoxTxt' hidden={!v.son || v.son.length === 0}>
                 {v.name}
               </div>
               {v.son.map(v2 => (
                 <div
                   key={v2.id}
+                  hidden={v2.id >= 9901}
                   className={classNames('layoutLRowBoxRow', pathAcFu(v2.path) ? 'active' : '')}
                   ref={pathAcFu(v2.path) ? sroolRef : null}
                   onClick={() => pathCutFu(v2)}

+ 4 - 1
src/pages/Z_system/Z4organization/index.module.scss

@@ -89,8 +89,11 @@
               }
             }
             .Z4mr2Row0 {
-              margin-bottom: 0;
+              // margin-bottom: 0;
               align-items: center;
+              .Z4mr2Row1 {
+                font-size: 22px;
+              }
             }
             .Z4mr2RowLast {
               align-items: self-start;

+ 1 - 1
src/pages/Z_system/Z4organization/index.tsx

@@ -9,7 +9,7 @@ import { MessageFu } from '@/utils/message'
 import { treeResIdFu } from '../Z1dict/data'
 import { TypeZ4Tree, TypeZ4UserList } from './type'
 import Z4add, { Z4AddInfoType } from './Z4add'
-import AAbtn from '@/pages/AAnew/AAbtn'
+import AAbtn from '@/pages/ZcomPage/AAbtn'
 import { filterTreeByName } from '@/utils/history'
 
 function Z4organization() {

+ 1 - 1
src/pages/Z_system/Z6user/index.tsx

@@ -12,7 +12,7 @@ import MyPopconfirm from '@/components/MyPopconfirm'
 import { getUserListAPI, userPassResetAPI, userRemoveAPI } from '@/store/action/Z6user'
 import { D4_APIgetTree } from '@/store/action/Z4organization'
 import { buMenRes } from '@/utils/history'
-import AAbtn from '@/pages/AAnew/AAbtn'
+import AAbtn from '@/pages/ZcomPage/AAbtn'
 
 const baseFormData: UserTableAPIType = {
   pageNum: 1,

+ 1 - 1
src/pages/AAnew/AAbtn/index.module.scss

@@ -8,7 +8,7 @@
   align-items: center;
   transition: all 0.3s;
   color: #fcf9f5;
-  letter-spacing: 2px;
+  // letter-spacing: 2px;
   font-weight: 400;
   font-size: 14px;
   &:hover {

+ 17 - 5
src/pages/AAnew/AAbtn/index.tsx

@@ -22,9 +22,11 @@ type Props = {
   txt: 1 | 2 | 3
   onClick: () => void
   tit?: string
+  txtArr?: string[]
+  width?: number
 }
 
-function AAbtn({ txt, onClick, tit }: Props) {
+function AAbtn({ txt, onClick, tit, txtArr, width }: Props) {
   const info = useMemo(() => {
     return btnObj[txt]
   }, [txt])
@@ -34,14 +36,19 @@ function AAbtn({ txt, onClick, tit }: Props) {
       {txt === 3 ? (
         <Popconfirm
           placement='bottom'
-          title={`确定${tit || info.name}吗?`}
-          okText='确定'
+          title={txtArr ? txtArr[0] : `确定${tit || info.name}吗?`}
+          okText={txtArr ? txtArr[1] : '确定'}
           cancelText='取消'
           onConfirm={onClick}
           okButtonProps={{ loading: false }}
         >
           <div
-            style={{ backgroundImage: `url(${info.url})` }}
+            id='AAbtn'
+            style={{
+              letterSpacing: width ? '' : '2px',
+              backgroundImage: `url(${info.url})`,
+              width: width ? width + 'px' : ''
+            }}
             className={classNames(styles.AAbtn, styles[`AAbtn${txt}`])}
           >
             {tit || info.name}
@@ -49,8 +56,13 @@ function AAbtn({ txt, onClick, tit }: Props) {
         </Popconfirm>
       ) : (
         <div
+          id='AAbtn'
+          style={{
+            letterSpacing: width ? '' : '2px',
+            backgroundImage: `url(${info.url})`,
+            width: width ? width + 'px' : ''
+          }}
           onClick={onClick}
-          style={{ backgroundImage: `url(${info.url})` }}
           className={classNames(styles.AAbtn, styles[`AAbtn${txt}`])}
         >
           {tit || info.name}

+ 47 - 0
src/pages/ZcomPage/TopSearch/index.module.scss

@@ -0,0 +1,47 @@
+.TopSearch {
+  width: 100%;
+  height: 100%;
+
+  :global {
+    .TOP1 {
+      display: flex;
+      justify-content: space-between;
+      .TT1 {
+        display: flex;
+        flex-wrap: wrap;
+
+        & > div {
+          margin-right: 10px;
+          .ant-select {
+            width: 100%;
+            height: 40px;
+            border: none;
+            .ant-select-selector {
+              background-color: transparent;
+              background-size: 100% 100%;
+              background-image: url('../../../assets/layImg/home_input_bg.png');
+            }
+          }
+          .ant-input-affix-wrapper {
+            width: 100%;
+            height: 40px;
+            border: none;
+            background-size: 100% 100%;
+            background-image: url('../../../assets/layImg/home_input_bg.png');
+          }
+        }
+      }
+      .TT2 {
+        display: flex;
+        flex-wrap: wrap;
+        #AAbtn {
+          margin-left: 10px;
+          margin-bottom: 10px;
+        }
+      }
+    }
+    .TOP2 {
+      padding-top: 15px;
+    }
+  }
+}

+ 132 - 0
src/pages/ZcomPage/TopSearch/index.tsx

@@ -0,0 +1,132 @@
+import React, { useCallback, useEffect, useRef, useState } from 'react'
+import styles from './index.module.scss'
+import { Input, Select } from 'antd'
+import { forwardRef, useImperativeHandle } from 'react'
+import { useDispatch } from 'react-redux'
+import MyTable from '@/components/MyTable'
+
+type Props = {
+  leftArr: any[]
+  rightBtn: JSX.Element
+  waiWidth: number
+  sonWidth: string
+  columnsTemp: any[]
+  tableLastBtn: any[]
+  yHeight?: number
+}
+
+function TopSearch(
+  { leftArr, rightBtn, waiWidth, sonWidth, columnsTemp, tableLastBtn, yHeight = 680 }: Props,
+  ref: any
+) {
+  const dispatch = useDispatch()
+
+  const [formData, setFormData] = useState<any>({ pageNum: 1, pageSize: 10 })
+  const formDataRef = useRef({ pageNum: 1, pageSize: 10 })
+  const formDataOldRef = useRef({ pageNum: 1, pageSize: 10 })
+
+  useEffect(() => {
+    formDataRef.current = formData
+  }, [formData])
+
+  // 点击搜索的 时间戳
+  const [timeKey, setTimeKey] = useState(0)
+
+  // 点击搜索
+  const clickSearch = useCallback(() => {
+    setFormData({ ...formData, pageNum: 1 })
+    setTimeout(() => {
+      setTimeKey(Date.now())
+    }, 50)
+  }, [formData])
+
+  // 封装发送请求的函数
+  const getListFu = useCallback(() => {
+    formDataOldRef.current = { ...formDataRef.current }
+    console.log('-------发送请求---------', formDataRef.current)
+  }, [])
+
+  useEffect(() => {
+    getListFu()
+  }, [getListFu, timeKey])
+
+  // 输入框和下拉框的改变
+  const fromFu = useCallback(
+    (key: string, val: string) => {
+      setFormData({ ...formData, [key]: val })
+    },
+    [formData]
+  )
+
+  // 点击重置
+  const clickReset = useCallback(() => {
+    setFormData({ pageNum: 1, pageSize: 10 })
+    setTimeout(() => {
+      setTimeKey(Date.now())
+    }, 50)
+  }, [])
+
+  // 可以让父组件调用子组件的方法
+  useImperativeHandle(ref, () => ({
+    clickSearch,
+    clickReset
+  }))
+
+  // 页码变化
+  const paginationChange = useCallback(
+    (pageNum: number, pageSize: number) => {
+      setFormData({ ...formData, pageNum, pageSize })
+      setTimeout(() => {
+        setTimeKey(Date.now())
+      }, 50)
+    },
+    [formData]
+  )
+
+  return (
+    <div className={styles.TopSearch}>
+      <div className='TOP1'>
+        <div className='TT1' style={{ width: `calc(100% - ${waiWidth}px)` }}>
+          {leftArr.map(item => (
+            <div key={item.key} style={{ width: sonWidth }}>
+              {item.type === 'Select' ? (
+                <Select
+                  placeholder={item.placeholder}
+                  options={item.options}
+                  allowClear
+                  value={formData[item.key] || null}
+                  onChange={e => fromFu(item.key, e)}
+                />
+              ) : item.type === 'Input' ? (
+                <Input
+                  placeholder={item.placeholder}
+                  allowClear
+                  value={formData[item.key] || ''}
+                  onChange={e => fromFu(item.key, e.target.value.trim())}
+                />
+              ) : null}
+            </div>
+          ))}
+        </div>
+        <div className='TT2' style={{ width: waiWidth + 'px' }}>
+          {rightBtn}
+        </div>
+      </div>
+
+      <div className='TOP2'>
+        <MyTable
+          yHeight={yHeight}
+          list={[{ id: 1, name: 'xxx' }]}
+          columnsTemp={columnsTemp}
+          lastBtn={tableLastBtn}
+          pageNum={formData.pageNum}
+          pageSize={formData.pageSize}
+          total={0}
+          onChange={(pageNum, pageSize) => paginationChange(pageNum, pageSize)}
+        />
+      </div>
+    </div>
+  )
+}
+
+export default forwardRef(TopSearch)

+ 4 - 0
src/pages/ZgoodsInfo/index.module.scss

@@ -0,0 +1,4 @@
+.ZgoodsInfo {
+  :global {
+  }
+}

+ 13 - 0
src/pages/ZgoodsInfo/index.tsx

@@ -0,0 +1,13 @@
+import React from 'react'
+import styles from './index.module.scss'
+function ZgoodsInfo() {
+  return (
+    <div className={styles.ZgoodsInfo}>
+      <h1>ZgoodsInfo</h1>
+    </div>
+  )
+}
+
+const MemoZgoodsInfo = React.memo(ZgoodsInfo)
+
+export default MemoZgoodsInfo

+ 3 - 3
src/store/action/AAnew/AA1onePu.ts

@@ -2,7 +2,7 @@ import { AppDispatch } from '@/store'
 import http from '@/utils/http'
 
 /**
- * 一普盘点 - 获取分页列表
+ * 盘点识别 - 获取分页列表
  */
 export const AA1_APIgetList = (data: any, exportFlag?: boolean): any => {
   if (exportFlag) return http.post('cms/antique/page', data)
@@ -21,14 +21,14 @@ export const AA1_APIgetList = (data: any, exportFlag?: boolean): any => {
 }
 
 /**
- * 一普盘点-详情
+ * 盘点识别-详情
  */
 export const AA1_APIgetInfo = (id: number) => {
   return http.get(`cms/antique/detail/${id}`)
 }
 
 /**
- * 一普盘点-删除
+ * 盘点识别-删除
  */
 export const AA1_APIdel = (id: number) => {
   return http.get(`cms/antique/remove/${id}`)

+ 1 - 0
src/types/declaration.d.ts

@@ -7,3 +7,4 @@ declare module '*.svg'
 declare module 'js-export-excel'
 declare module 'braft-utils'
 declare const baseUrlTempOne: string
+declare const dictStrTemp: any

+ 6 - 17
src/utils/history.ts

@@ -20,28 +20,17 @@ history.listen((_: any, listener: any) => {
 })
 
 // 详情页的返回按钮 如果没有上一级 才push
-export const infoPageBackFu = (url: string) => {
+export const backPageFu = (url: string) => {
   routerLength ? history.go(-1) : history.push(url)
 }
 
 export default history
 
-// -------------------所有藏品详情 全部新页面打开-------------------
-export const openGoodsInfoFu = (id: number, menuId: number, src?: string, orderId?: unknown) => {
-  // const urlArr = window.location
-  // const urlQian = urlArr.origin + urlArr.pathname
-
-  history.push(
-    src
-      ? (src + id).replace('#', '')
-      : `/goodsLook/${id}/${menuId}${orderId ? '?oId=' + orderId : ''}`
-  )
-
-  // dd.openLink({
-  //   url: 'https://sit-yiwubwg.4dage.com/abcd/index.html#/business'
-  // })
-
-  // window.open(src ? urlQian + src + id : `${urlQian}#/goodsLook/${id}`, '_blank')
+// 新窗口打开藏品详情页面
+export const openLink = (path: string) => {
+  const urlAll = window.location.href
+  const qian = urlAll.split('/#/')[0]
+  window.open(`${qian}/#${path}`, '_blank')
 }
 
 // -------------------级联回显-------------------

+ 15 - 110
src/utils/select.ts

@@ -1,111 +1,16 @@
-export const selectObj = {
-  申请状态: [
-    { value: 1, label: '草稿' },
-    { value: 6, label: '待提交' },
-    { value: 2, label: '待审批' },
-    { value: 3, label: '审批不通过' },
-    { value: 4, label: '已完成' },
-    { value: 5, label: '待盘点' }
-  ],
-  角色: [
-    { value: 1, label: '我发起的' },
-    { value: 2, label: '我审批的' },
-    { value: 3, label: '抄送我的' }
-  ],
-  藏品编号类型: [
-    { value: '藏品总登记号', label: '藏品总登记号' },
-    { value: '辅助账号', label: '辅助账号' },
-    { value: '索书号', label: '索书号' },
-    { value: '档案编号', label: '档案编号' },
-    { value: '固定资产登记号', label: '固定资产登记号' },
-    { value: '财产登记号', label: '财产登记号' },
-    { value: '出土(水)登记号', label: '出土(水)登记号' },
-    { value: '其他编号', label: '其他编号' }
-  ],
-  库存状态: [
-    // { value: 0, label: '新建' },
-    { value: 1, label: '待入库' },
-    { value: 2, label: '已入库' },
-    { value: 3, label: '待出库' },
-    { value: 4, label: '已出库' },
-    { value: 5, label: '盘点中' },
-    { value: 6, label: '注销中' },
-    { value: 7, label: '已注销' }
-  ],
-  文物级别: [
-    { value: '一级', label: '一级' },
-    { value: '二级', label: '二级' },
-    { value: '三级', label: '三级' },
-    { value: '一般', label: '一般' },
-    { value: '未定级', label: '未定级' }
-  ],
-  附件类型: [
-    { value: 'img', label: '图像' },
-    { value: 'model', label: '3D' },
-    { value: 'audio', label: '音频' },
-    { value: 'video', label: '视频' },
-    { value: 'doc', label: '文档' },
-    { value: 'other', label: '其他' }
-  ],
-  流程类型: [
-    { value: '藏品管理', label: '藏品管理' },
-    { value: '入藏管理', label: '入藏管理' },
-    { value: '库房管理', label: '库房管理' },
-    { value: '藏品维护', label: '藏品维护' },
-    { value: '展品管理', label: '展品管理' }
-  ],
-  启用状态: [
-    { value: 1, label: '启用' },
-    { value: 0, label: '禁用' }
-  ],
-  入藏状态: [
-    // { value: 1, label: '已鉴定' },
-    { value: 2, label: '已入馆' },
-    { value: 3, label: '已入藏' },
-    { value: 4, label: '已登记' }
-  ],
-  线索类别: [
-    { value: '民间征集', label: '民间征集' },
-    { value: '学术研究', label: '学术研究' },
-    { value: '市场流通', label: '市场流通' },
-    { value: '其他', label: '其他' }
-  ],
-  入藏去向: [
-    { value: '1', label: '藏品' },
-    { value: '2', label: '参考品' },
-    { value: '3', label: '资料' },
-    { value: '4', label: '标本' }
-  ],
-  展览状态: [
-    { value: '6', label: '馆外展览' },
-    { value: '5', label: '馆内展览' }
-  ],
-  流程申请状态: [
-    { value: 1, label: '草稿' },
-    { value: 6, label: '待提交' },
-    { value: 2, label: '待审批' },
-    { value: 3, label: '审批不通过' },
-    { value: 4, label: '已完成' }
-  ],
-  业务类型: [
-    { value: 'ZJ', label: '藏品征集' },
-    { value: 'JD', label: '藏品鉴定' },
-    { value: 'RG', label: '藏品入馆' },
-    { value: 'RC', label: '藏品入藏' },
-    { value: 'DJ', label: '藏品登记' },
-    { value: 'BJ', label: '藏品编辑' },
-    // { value: 'SC', label: '藏品删除' },
-    { value: 'RK', label: '藏品入库' },
-    { value: 'YK', label: '藏品移库' },
-    { value: 'CK', label: '藏品出库' },
-    { value: 'ZX', label: '藏品注销' },
-    { value: 'PD', label: '藏品盘点' },
-    { value: 'CR', label: '人员出入库' },
-    { value: 'SG', label: '事故登记' },
-    // { value: 'CS', label: '残损登记' },
-    { value: 'XZ', label: '现状登记' },
-    { value: 'XF', label: '文物修复' },
-    { value: 'ZL', label: '借展管理' }
-    // { value: 'ZDJ', label: '藏品总登记号' }
-  ]
+export type DictStrType =
+  | '编号类型'
+  | '年代'
+  | '类别'
+  | '质地'
+  | '文物级别'
+  | '相符情况'
+  | '不符情况'
+  | '不符原因'
+  | '生效状态'
+
+// 输出字典
+export const resDictStr = (val: DictStrType) => {
+  const temp: Record<DictStrType, { value: string; label: string }[]> = dictStrTemp
+  return temp[val]
 }

+ 0 - 26
src/utils/storage.ts

@@ -1,7 +1,5 @@
 // ------------------------------------token的本地存储------------------------------------
 
-import { RouterTypeRow } from '@/types'
-
 // 用户 Token 的本地缓存键名,自己定义
 const TOKEN_KEY = 'YWGOODS_HT_USER_INFO'
 
@@ -41,30 +39,6 @@ export const getTokenFu = (): string => {
   return getTokenInfo().token
 }
 
-// --------------------业务中心-常用功能存储
-const CHANG_KEY = 'YWGOODS_HT_CHANG_ARR'
-
-// 存
-export const changSetFu = (info: RouterTypeRow): void => {
-  const oldArr = changGetFu()
-
-  let newArr: RouterTypeRow[] = []
-
-  // 已经存在了
-  const oldIds = oldArr.map(v => v.id)
-  if (oldIds.includes(info.id)) newArr = oldArr
-  else {
-    if (oldArr.length <= 2) newArr = [...oldArr, info]
-    else newArr = [...oldArr.slice(-2), info]
-  }
-
-  localStorage.setItem(CHANG_KEY, JSON.stringify(newArr))
-}
-// 取
-export const changGetFu = (): RouterTypeRow[] => {
-  return JSON.parse(localStorage.getItem(CHANG_KEY) || '[]')
-}
-
 // --------------------是否记住密码
 const PASS_SAVE = 'YWGOODS_HT_PASS_SAVE'