Explorar el Código

fix-🐛一波

shaogen1995 hace 2 años
padre
commit
b63fab8394

+ 2 - 2
src/pages/A1Camera/index.tsx

@@ -107,7 +107,7 @@ function A1Camera() {
               ...v,
               typeIn: v.typeIn === "pc" ? "系统" : "移动端",
               remark: v.remark || "(空)",
-              pmName: v.id === 1 ? "管理员" : v.pmName || "匿名",
+              pmName: v.id === 1 ? "管理员" : v.pmName || "(空)",
             })),
             sheetName: name,
             sheetFilter: [
@@ -147,7 +147,7 @@ function A1Camera() {
         render: (item: A1ListType) => {
           if (item.id === 1) return "管理员";
           else {
-            return item.pmName || "匿名";
+            return item.pmName || "(空)";
           }
         },
       },

+ 11 - 4
src/pages/A2Psychz/index.tsx

@@ -120,9 +120,10 @@ function A2Psychz() {
       if (res.code === 0) {
         MessageFu.success("删除成功!");
         getListFu();
+        getCityFu()
       }
     },
-    [getListFu]
+    [getCityFu, getListFu]
   );
 
   const columns = useMemo(() => {
@@ -222,7 +223,7 @@ function A2Psychz() {
 
     const res = await A2_APIgetlistDerive({
       ...tableSelect,
-      site: tableSelect.site ? tableSelect.site[1] : null,
+      site: tableSelect.site ? tableSelect.site : null,
       pageNum: 1,
       pageSize: 99999,
     });
@@ -379,8 +380,14 @@ function A2Psychz() {
         <AddPsychz
           openInfo={openInfo}
           closeFu={() => setOpenInfo({ id: 0, txt: "" })}
-          upTableFu={getListFu}
-          addTableFu={resetSelectFu}
+          upTableFu={() => {
+            getListFu();
+            getCityFu();
+          }}
+          addTableFu={() => {
+            resetSelectFu();
+            getCityFu();
+          }}
         />
       ) : null}
     </div>

+ 2 - 7
src/pages/B1Plan/index.tsx

@@ -123,12 +123,7 @@ function B1Plan() {
       },
       {
         title: "项目经理",
-        render: (item: B1tableType) => {
-          if (item.creatorId === 1) return "管理员";
-          else {
-            return item.pmName || "匿名";
-          }
-        },
+        render: (item: B1tableType) =>  item.pmName || "(空)"
       },
       {
         title: "场景码",
@@ -184,7 +179,7 @@ function B1Plan() {
               myCity:
                 !v.province && !v.city ? "(空)" : `${v.province} - ${v.city}`,
               roomNum: v.roomNum,
-              pmName: v.creatorId === 1 ? "管理员" : v.pmName || "匿名",
+              pmName:  v.pmName || "(空)",
               sceneCode: v.sceneCode || "(空)",
               auditStatus:
                 Reflect.get(B1options1Obj, v.auditStatus) || "(空)",

+ 8 - 3
src/pages/B2Scene/AuditMo.tsx

@@ -14,7 +14,12 @@ type Props = {
     auditDesc: string;
   };
   colseFu: () => void;
-  upTableFu: (id: number, newState: number, newDesc: string) => void;
+  upTableFu: (
+    id: number,
+    newState: number,
+    newDesc: string,
+    newTime: string
+  ) => void;
 };
 
 function AuditMo({ auditInfo, colseFu, upTableFu }: Props) {
@@ -39,8 +44,8 @@ function AuditMo({ auditInfo, colseFu, upTableFu }: Props) {
     });
 
     if (res.code === 0) {
-      MessageFu.success("修改审核状态成功!");
-      upTableFu(auditInfo.id, audit, description);
+      MessageFu.success("提交成功!");
+      upTableFu(auditInfo.id, audit, description, res.timestamp);
       colseFu();
     }
   }, [

+ 11 - 0
src/pages/B2Scene/index.module.scss

@@ -54,6 +54,17 @@
           padding: 8px !important;
         }
       }
+
+      // 下载json
+      .B2TabA{
+        color: var(--themeColor);
+   
+      }
+      .B2TabANo{
+        color: #ccc;
+        cursor: not-allowed;
+      }
+
     }
   }
 }

+ 29 - 18
src/pages/B2Scene/index.tsx

@@ -137,6 +137,7 @@ function B2Scene() {
             ? "(空)"
             : `${item.province} - ${item.city}`,
       },
+      // 待完善
       {
         title: "项目经理",
         render: (item: B2tableType) => {
@@ -176,15 +177,19 @@ function B2Scene() {
         render: (item: B2tableType) => (
           <>
             {item.sceneCode || "(空)"}
-            <span
-              style={{ cursor: "pointer" }}
-              hidden={!item.scheduleStatus && item.scheduleStatus !== 0}
-            >
-              <Tooltip title={Reflect.get(B2ResNum, item.scheduleStatus)}>
-                &nbsp;
-                <QuestionCircleOutlined rev={undefined} />
-              </Tooltip>
-            </span>
+
+            {/* up-只有计算失败的时候显示 ?  */}
+            {item.scheduleStatus === 2 ? (
+              <span
+                style={{ cursor: "pointer" }}
+                hidden={!item.scheduleStatus && item.scheduleStatus !== 0}
+              >
+                <Tooltip title={Reflect.get(B2ResNum, item.scheduleStatus)}>
+                  &nbsp;
+                  <QuestionCircleOutlined rev={undefined} />
+                </Tooltip>
+              </span>
+            ) : null}
           </>
         ),
       },
@@ -242,14 +247,6 @@ function B2Scene() {
         title: "操作",
         render: (item: B2tableType) => (
           <>
-            <a
-              hidden={!item.filePath}
-              href={item.filePath}
-              download={item.sceneName || item.sceneCode + ".json"}
-            >
-              下载Json
-            </a>
-
             <Popconfirm
               title="将重置该场景的审核状态,推送状态,请谨慎操作。"
               okText="重置"
@@ -262,6 +259,19 @@ function B2Scene() {
               </Button>
             </Popconfirm>
 
+            {item.filePath ? (
+              <a
+                className="B2TabA"
+                // hidden={!item.filePath}
+                href={item.filePath}
+                download={item.sceneName || item.sceneCode + ".json"}
+              >
+                下载Json
+              </a>
+            ) : (
+              <span className="B2TabANo">下载Json</span>
+            )}
+
             <Popconfirm
               title="删除后无法恢复,是否删除?"
               okText="删除"
@@ -441,13 +451,14 @@ function B2Scene() {
           colseFu={() =>
             setAuditInfo({ oldState: -1, id: 0, sceneCode: "", auditDesc: "" })
           }
-          upTableFu={(id, newState, newDesc) => {
+          upTableFu={(id, newState, newDesc,newTime) => {
             const oldObj = store.getState().B2Scene.B2TableList;
             const newObj = {
               list: oldObj.list.map((v) => ({
                 ...v,
                 auditStatus: v.id === id ? newState : v.auditStatus,
                 auditDesc: v.id === id ? newDesc : v.auditDesc,
+                auditTime:v.id===id?newTime:v.auditTime
               })),
               total: oldObj.total,
             };

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

@@ -130,6 +130,7 @@ function B3Push() {
             ? "(空)"
             : `${item.province} - ${item.city}`,
       },
+     // 待完善
       {
         title: "项目经理",
         render: (item: B3tableType) => {

+ 1 - 0
src/utils/http.ts

@@ -17,6 +17,7 @@ export const baseURL =
 declare module "axios" {
   interface AxiosResponse {
     code: number;
+    timestamp:string
     // 这里追加你的参数
   }
 }