巴林闲侠 2 years ago
parent
commit
540cd9f87d
  1. 2
      web/client/src/sections/auth/containers/login.jsx
  2. 40
      web/client/src/sections/problem/components/inspection.jsx
  3. 4
      web/client/src/sections/problem/containers/dataAlarm.jsx

2
web/client/src/sections/auth/containers/login.jsx

@ -38,7 +38,7 @@ const Login = props => {
<video
autoPlay loop muted
style={{
width: 'calc(100% - 512px)', objectFit: "cover", objectPosition: 'left top', height: '100%'
width: 'calc(100% - 512px)', objectFit: "fill", objectPosition: 'left top', height: '100%'
}}
src="/assets/video/login_bg.mp4"
type="video/mp4"

40
web/client/src/sections/problem/components/inspection.jsx

@ -2,12 +2,16 @@
import React, { useState, useEffect, useRef } from "react";
import { connect } from "react-redux";
import { Button, Form, Modal, Skeleton, Pagination, Table } from "@douyinfe/semi-ui";
import moment from "moment";
import PerfectScrollbar from "perfect-scrollbar";
let projectScrollbar;
const Inspection = ({ dispatch, actions, route, statistic }) => {
const { problem } = actions
const [selectProject, setSelectProject] = useState([])
const [applyFilter, setApplyFilter] = useState([])
const [selectProject, setSelectProject] = useState([]) //
const [applyFilter, setApplyFilter] = useState([]) //
const [patrolAbnormal, setPatrolAbnormal] = useState([]) //
const api = useRef();
@ -29,13 +33,28 @@ const Inspection = ({ dispatch, actions, route, statistic }) => {
})
dispatch(problem.getAlarmLnspection({})).then((res) => {
console.log(res.payload.data);
if (res.success) {
setPatrolAbnormal(res.payload.data)
}
})
projectScrollbar = new PerfectScrollbar("#inspection", {
suppressScrollY: true,
});
}, [])
useEffect(() => {
const domEquipment = document.getElementById("inspection");
if (domEquipment && projectScrollbar) {
projectScrollbar.update();
}
});
return (
<div style={{ width: '100%', height: 180, backgroundColor: 'white', marginBottom: 20 }}>
<div style={{ width: '100%', height: 250, backgroundColor: 'white', marginBottom: 20 }}>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
<div style={{ width: 400, }}>
<span style={{ width: 3, height: 20, background: '#005ABD', display: 'inline-block', margin: "0 10px 0 20px" }}></span>
@ -52,14 +71,13 @@ const Inspection = ({ dispatch, actions, route, statistic }) => {
style={{ position: "relative", width: "100%", flex: 1 }}
>
<Form.DatePicker
type="dateTimeRange"
type="dateRange"
labelPosition="left"
style={{ width: 352 }}
style={{ width: 242 }}
label='时间筛选:'
field='time'
key='time'
// defaultPickerValue={[new Date('2022-08-08 00:00'), new Date('2022-08-09 12:00')]}
// initValue={[new Date('2022-08-08 00:00'), new Date()]}
initValue={[new Date('2022-08-08'), new Date()]}
onChange={(v) => console.log(v)}
/>
<Form.Select
@ -118,8 +136,12 @@ const Inspection = ({ dispatch, actions, route, statistic }) => {
</div>
</div>
<div style={{}}>
<img src="/_file-server/project/da09f988-4c62-46fc-a532-b4cf053a4b6d/accurate_invest.png" style={{ width: 400, height: 128 }} />
<div id="inspection" style={{ width: "100%", whiteSpace: 'nowrap', textOverflow: 'ellipsis' }}>
{patrolAbnormal?.map(v => <div style={{ width: 400, height: 238, display: 'inline-block' }}>
<img src={`/_file-server/${v.screenshot}`} style={{ width: 400, height: 182 }} />
<div><span>获取时间{moment(v.createTime).format("YYYY-MM-DD HH:MM:SS")}</span><span></span></div>
</div>)}
</div>

4
web/client/src/sections/problem/containers/dataAlarm.jsx

@ -262,7 +262,7 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket }) => {
<div>
{abnormalLenght > 0 ? <div style={{ height: 30, fontSize: 12, display: 'flex' }}><IconAlertCircle /><div>当前滞留5个工单即将超时请尽快处理</div></div> : ""}
</div>
<Statistics
{/* <Statistics
route={route}
tableType={tableType}
statistic={statistic}
@ -272,7 +272,7 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket }) => {
collectData={collectData}
setSetup={setSetup}
exhibition={exhibition}
/>
/> */}
{setup ? (
<Setup
tableType={tableType[route] || []}

Loading…
Cancel
Save