|
|
@ -8,7 +8,7 @@ import { emit } from "superagent"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const TableData = ({ route,dispatch, actions, collectData, setSetup, exhibition, |
|
|
|
const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition, |
|
|
|
selected, setSelected, setIfBulk, setConfirm, setGenre, query, setQuery }) => { |
|
|
|
const { problem } = actions |
|
|
|
|
|
|
@ -24,6 +24,7 @@ const TableData = ({ route,dispatch, actions, collectData, setSetup, exhibition, |
|
|
|
dispatch(problem.getAlarmLnspectionApi({})).then((res) => { |
|
|
|
console.log(res.payload.data) |
|
|
|
if (res.success) { |
|
|
|
let typeData = { element: "元素异常", apiError: "接口报错 ", timeout: "加载超时" } |
|
|
|
setCount(res.payload.data?.count || 0) |
|
|
|
let tableDatas = res.payload.data?.rows.map(v => ({ |
|
|
|
key: v.id, |
|
|
@ -36,7 +37,7 @@ const TableData = ({ route,dispatch, actions, collectData, setSetup, exhibition, |
|
|
|
confirmTime: v.confirmTime ? moment(v.confirmTime).format("YYYY-MM-DD HH:mm:ss") : "", |
|
|
|
alarmContent: v.alarmContent, |
|
|
|
screenshot: v.screenshot, |
|
|
|
type: v.type, |
|
|
|
type: v.type ? typeData[v.type] : "", |
|
|
|
confirm: v.confirm, |
|
|
|
})) |
|
|
|
// console.log(tableDatas); |
|
|
@ -173,23 +174,23 @@ const TableData = ({ route,dispatch, actions, collectData, setSetup, exhibition, |
|
|
|
marginRight: 10 |
|
|
|
}} |
|
|
|
> |
|
|
|
<img title='导出' src="/assets/images/problem/export.png" style={{ width: 24, height: 24 }} /> |
|
|
|
<img title='设置' src="/assets/images/problem/setup.png" style={{ width: 24, height: 24 }} onClick={() => setSetup(true)} /> |
|
|
|
<img title='导出' src="/assets/images/problem/export.png" style={{ width: 20 }} /> |
|
|
|
<img title='设置' src="/assets/images/problem/setup.png" style={{ width: 20 }} onClick={() => setSetup(true)} /> |
|
|
|
<Button |
|
|
|
theme="solid" |
|
|
|
type="primary" |
|
|
|
style={{ width: 65, height: 30, borderRadius: 3, }} |
|
|
|
style={{ width: 80, height: 32, borderRadius: 3, }} |
|
|
|
onClick={() => { |
|
|
|
api.current.validate().then((v) => { |
|
|
|
console.log(v); |
|
|
|
console.log({ |
|
|
|
state: v.state, |
|
|
|
keywordTarget: v.keywordTarget, |
|
|
|
keyword: v.keyword, |
|
|
|
groupUnitId: v.groupUnitId, |
|
|
|
sustainTimeStart: v.time ? moment(v.time[0]).format("YYYY-MM-DD HH:mm:ss") : "", |
|
|
|
sustainTimeEnd: v.time ? moment(v.time[1]).format("YYYY-MM-DD HH:mm:ss") : "", |
|
|
|
}); |
|
|
|
// console.log(v); |
|
|
|
// console.log({ |
|
|
|
// state: v.state, |
|
|
|
// keywordTarget: v.keywordTarget, |
|
|
|
// keyword: v.keyword, |
|
|
|
// groupUnitId: v.groupUnitId, |
|
|
|
// sustainTimeStart: v.time ? moment(v.time[0]).format("YYYY-MM-DD HH:mm:ss") : "", |
|
|
|
// sustainTimeEnd: v.time ? moment(v.time[1]).format("YYYY-MM-DD HH:mm:ss") : "", |
|
|
|
// }); |
|
|
|
|
|
|
|
setSearch({ |
|
|
|
state: v.state, |
|
|
@ -266,7 +267,7 @@ const TableData = ({ route,dispatch, actions, collectData, setSetup, exhibition, |
|
|
|
} |
|
|
|
setCheckAll(!checkAll) |
|
|
|
}} |
|
|
|
style={{ width: 93, height: 24, borderRadius: '1px', border: '1px solid #0F7EFB', color: '#0F7EFB', fontWeight: 400, margin: '0 10px' }}> |
|
|
|
style={{ width: 93, height: 24, borderRadius: '1px', border: '1px solid #0F7EFB', color: '#0F7EFB',background:"#FFFFFF", fontWeight: 400, margin: '0 10px' }}> |
|
|
|
{checkAll ? '全选' : "取消全选"} |
|
|
|
</Button> |
|
|
|
<Button type='primary' theme='solid' onClick={() => (setIfBulk(true), setConfirm(true))} style={{ width: 93, height: 24, borderRadius: '1px', border: '1px solid #0F7EFB', color: '#FFFFFF', fontWeight: 400, }}>批量确认</Button> |
|
|
|