}
visible={true}
onOk={() => {
}}
width={837}
- onCancel={() => setPicturePop(false)}
+ onCancel={() => {
+ setPicturePop(false)
+ if (timer) clearTimeout(timer)
+ }}
>
-
- {pictureData.notedTime ?
核验信息:{pictureData.notedPepUser} {pictureData.notedTime}:""}
+
+ {pictureData.notedTime ? 核验信息:{pictureData.notedPepUser} {moment(pictureData.notedTime).format("YYYY-MM-DD HH:MM:SS")} : ""}
截取时间:{moment(pictureData.createTime).format("YYYY-MM-DD HH:MM:SS")}
+
: ""
@@ -270,7 +299,7 @@ const Inspection = ({ dispatch, actions, route, statistic }) => {
function mapStateToProps (state) {
const { auth, global, members } = state;
return {
- // user: auth.user,
+ user: auth.user,
actions: global.actions,
// global: global,
// members: members.data,
diff --git a/web/client/src/sections/problem/components/tableData.jsx b/web/client/src/sections/problem/components/tableData.jsx
index 900eba7..0601bce 100644
--- a/web/client/src/sections/problem/components/tableData.jsx
+++ b/web/client/src/sections/problem/components/tableData.jsx
@@ -2,15 +2,43 @@ import React, { useState, useEffect, useRef } from "react";
import { connect } from "react-redux";
import { Button, Form, Modal, Skeleton, Pagination, Table } from "@douyinfe/semi-ui";
import { SkeletonScreen, } from "$components";
+import moment from "moment";
-const TableData = ({ dispatch, actions, route, collectData, setSetup, exhibition }) => {
+const TableData = ({ dispatch, actions, route, collectData, setSetup, exhibition, selected, setSelected, setIfBulk, setConfirm }) => {
+ const { problem } = actions
- const [selected, setSelected] = useState([]) //表格被勾选项
+ const [tableData, setTableData] = useState([]) //表格数据
const api = useRef();
useEffect(() => {
+ switch (route) {
+ case 'useAbnormal':
+ dispatch(problem.getAlarmLnspectionApi({})).then((res) => {
+ console.log(res.payload.data);
+ let tableDatas = res.payload.data?.rows.map(v => ({
+ key: v.id,
+ serialNumber: v.serialNumber,
+ projectName: v.app?.projectCorrelations?.map(r => r.name)?.filter(c => c),
+ appName: v.app?.name,
+ url: v.app?.url,
+ createTime: v.createTime ? moment(v.createTime).format("YYYY-MM-DD HH:MM:SS") : "",
+ updateTime: v.updateTime ? moment(v.updateTime).format("YYYY-MM-DD HH:MM:SS") : "",
+ confirmTime: v.confirmTime ? moment(v.confirmTime).format("YYYY-MM-DD HH:MM:SS") : "",
+ alarmContent: v.alarmContent,
+ screenshot: v.screenshot,
+ type: v.type,
+ confirm: v.confirm,
+ }))
+ console.log(tableDatas);
+ setTableData(tableDatas)
+ })
+ break;
+
+ default:
+ break;
+ }
}, [route])
@@ -20,7 +48,7 @@ const TableData = ({ dispatch, actions, route, collectData, setSetup, exhibition
<>