浏览代码

🐛从总账操作记录中点击查看/移库的查看原来位置和现在位置

shaogen1995 2 年之前
父节点
当前提交
1777686181

+ 3 - 5
src/pages/Home/index.tsx

@@ -44,9 +44,8 @@ export default function Home() {
   );
 
   useEffect(() => {
-    tabListTemp.forEach(v=>v.done=false)
-    tempDone.forEach(v=>v.done=false)
-    console.log('111----------',tabListTemp);
+    tabListTemp.forEach((v) => (v.done = false));
+    tempDone.forEach((v) => (v.done = false));
 
     powerInfo.forEach((v: any) => {
       if (v.id === 100) tabListTemp[0].done = tempDone[0].done = true;
@@ -56,8 +55,7 @@ export default function Home() {
       if (v.id === 500) tempDone[3].done = true;
       if (v.id === 600) tabListTemp[4].done = tempDone[4].done = true;
     });
-    console.log('222----------',tabListTemp);
-    
+
     window.setTimeout(() => {
       setTabList(tabListTemp);
     }, 100);

+ 2 - 1
src/pages/Object/index.tsx

@@ -197,7 +197,8 @@ export default function Object() {
   useEffect(() => {
     // 没有藏品登记页面的权限 跳到有权限的页面
     if (data[0].id !== 1) {
-      history.replace(data[0].path);
+      // 并且不是从藏品总账里面点击操作记录的查看进来
+      if (!window.location.href.includes("look")) history.replace(data[0].path);
     }
   }, [data]);
 

+ 2 - 1
src/pages/Stores/index.tsx

@@ -76,7 +76,8 @@ export default function Stores() {
   useEffect(() => {
     // 没有库房设置页面的权限 跳到有权限的页面
     if (data[0].id !== 1) {
-      history.replace(data[0].path);
+      // 并且不是从藏品总账里面点击操作记录的查看进来
+      if (!window.location.href.includes("look")) history.replace(data[0].path);
     }
   }, [data]);
 

+ 1 - 1
src/pages/StoresSon/Stores3/AuditStores3/index.tsx

@@ -48,7 +48,7 @@ function AuditStores3() {
     info.create_time = res.data.entity.createTime;
     // 表格信息的整理
     const list = [] as any;
-    const oldData = info.storageAncestorName;
+    const oldData = JSON.parse(res.data.entity.beforeJson).name;
     const newData = JSON.parse(res.data.entity.afterJson).name;
     console.log(123, oldData, newData);
     list.push({

+ 1 - 1
src/pages/StoresSon/Stores3/LookStores3/index.tsx

@@ -41,7 +41,7 @@ function LookStores3() {
     info.reason=res.data.entity.reason
     // 表格信息的整理
     const list = [] as any;
-    const oldData = info.storageAncestorName;
+    const oldData = JSON.parse(res.data.entity.beforeJson).name;
     const newData = JSON.parse(res.data.entity.afterJson).name;
     console.log(123, oldData, newData);
     list.push({