Просмотр исходного кода

Merge branch 'master' of http://192.168.0.115:3000/shaogen1995/qingDao_goods

lanxin 6 дней назад
Родитель
Сommit
d3df534f95

+ 3 - 1
src/components/Z3upFiles/index.tsx

@@ -338,7 +338,9 @@ function Z3upFiles({
   )
 
   // 获取当前拖拽的文件
-  const activeFile = activeId ? fileList.find(file => file.id === activeId) : null
+  const activeFile = useMemo(() => {
+    return activeId ? fileList.find(file => file.id === activeId) : null
+  }, [activeId, fileList])
 
   // 修复拖拽覆盖层显示问题
   const renderDragOverlay = useCallback(() => {

+ 3 - 1
src/components/Z3upFilesRef/index.tsx

@@ -326,7 +326,9 @@ function Z3upFilesRef(
   )
 
   // 获取当前拖拽的文件
-  const activeFile = activeId ? fileList.find(file => file.id === activeId) : null
+  const activeFile = useMemo(() => {
+    return activeId ? fileList.find(file => file.id === activeId) : null
+  }, [activeId, fileList])
 
   // 修复拖拽覆盖层显示问题
   const renderDragOverlay = useCallback(() => {

+ 9 - 9
src/pages/Layout/data.ts

@@ -27,7 +27,7 @@ const tabLeftArr: RouterType = [
   {
     id: 1,
     name: '工作台',
-    show: true,
+    show: false,
     son: [
       {
         id: 110,
@@ -59,7 +59,7 @@ const tabLeftArr: RouterType = [
   {
     id: 2,
     name: '入藏管理',
-    show: true,
+    show: false,
     son: [
       {
         id: 210,
@@ -91,7 +91,7 @@ const tabLeftArr: RouterType = [
   {
     id: 3,
     name: '藏品台账',
-    show: true,
+    show: false,
     son: [
       {
         id: 310,
@@ -122,7 +122,7 @@ const tabLeftArr: RouterType = [
   {
     id: 4,
     name: '藏品管理',
-    show: true,
+    show: false,
     son: [
       {
         id: 410,
@@ -153,7 +153,7 @@ const tabLeftArr: RouterType = [
   {
     id: 5,
     name: '文创管理',
-    show: true,
+    show: false,
     son: [
       {
         id: 601,
@@ -172,7 +172,7 @@ const tabLeftArr: RouterType = [
   {
     id: 6,
     name: '库房管理',
-    show: true,
+    show: false,
     son: [
       {
         id: 1010,
@@ -210,7 +210,7 @@ const tabLeftArr: RouterType = [
   {
     id: 7,
     name: '藏品维护',
-    show: true,
+    show: false,
     son: [
       {
         id: 510,
@@ -235,7 +235,7 @@ const tabLeftArr: RouterType = [
   {
     id: 8,
     name: '展品管理',
-    show: true,
+    show: false,
     son: [
       {
         id: 910,
@@ -249,7 +249,7 @@ const tabLeftArr: RouterType = [
   {
     id: 9,
     name: '系统管理',
-    show: true,
+    show: false,
     son: [
       {
         id: 709,

+ 1 - 0
src/pages/Layout/index.tsx

@@ -167,6 +167,7 @@ function Layout() {
 
       const resList = tabLeftArr.map(v => ({
         ...v,
+        show: v.son.some(v => v.path === (flagPush ? pathArr[0] : isNowPath)),
         son: v.son.filter(c => isOkIdArr.includes(c.id))
       }))
 

+ 1 - 1
src/pages/Zother/SonGoodsList/index.tsx

@@ -155,7 +155,7 @@ function SonGoodsList({
             // 需要过滤掉已经有id的-不替换数据,没有id的替换数据 因为数据可能已经在另外一个弹窗更新了
             const nowIds = snaps.map(v => v.id)
             const dataRes: GoodsType[] = data.map((v, i) => {
-              v.idTemp = v.id + 'clue'
+              v.idTemp = v.id + (isClueSelect ? 'clue' : 'goods')
               // 优先使用已存在的snap数据,否则使用新数据
               const item = nowIds.includes(v.id) ? snaps[i] : v
               // 如果是线索选择,添加标识