+
{
- editData?.points?.inspectContent && Object.keys(editData?.points?.inspectContent).map(key => {
- if (editData?.points?.inspectContent[key]?.isNormal == false) {
- return
-
-
-
-
-
-
-
-
-
-
-
+ editData?.points?.inspectContent && Array.isArray(editData?.points?.inspectContent) &&
+ editData?.points?.inspectContent?.map(s => {
+ if (s?.alarm == true) {
+ return <>
+ {s?.deviceName &&
+
+
+ }
+ {
+ s?.checkItems?.map(k => {
+ return
+
+
+
+
+
+
+
+
+
+
+
+
-
- {
- let nextV = []
- for (let s of (editData?.points?.inspectContent[key].imgs || [])) {
- if (s) {
- nextV.push({
- storageUrl: s
- })
+
+ {
+ let nextV = []
+ for (let s of (k.imgs || [])) {
+ if (s) {
+ nextV.push({
+ storageUrl: s
+ })
+ }
+ }
+ return nextV
+ })()
}
- }
- return nextV
- })()
- }
- />
+ />
+
+
+
+
+ })
+ }
+ >
+
-
-
-
}
})
}
diff --git a/web/client/src/sections/issueHandle/containers/patrolRecord.js b/web/client/src/sections/issueHandle/containers/patrolRecord.js
index 6d2d01c..641ceba 100644
--- a/web/client/src/sections/issueHandle/containers/patrolRecord.js
+++ b/web/client/src/sections/issueHandle/containers/patrolRecord.js
@@ -119,7 +119,7 @@ const PatrolRecord = (props) => {
dataIndex: 'source',
key: 'source',
showInDetail: true,
- render: (text, record, index) => '巡检上报' //暂定巡检上报 后续会增加平台录入
+ render: (text, record, index) => record?.patrolPlanId == -1 ? '主动上报' : '巡检上报' //暂定巡检上报 后续会增加平台录入
},
{
title: '严重等级',
diff --git a/web/client/src/sections/patrolManage/containers/patrolRecord.js b/web/client/src/sections/patrolManage/containers/patrolRecord.js
index 6fb7668..1a4b3b0 100644
--- a/web/client/src/sections/patrolManage/containers/patrolRecord.js
+++ b/web/client/src/sections/patrolManage/containers/patrolRecord.js
@@ -43,7 +43,7 @@ const PatrolRecord = (props) => {
width: '10%',
showInDetail: true,
render: (text, record, index) => {
- return !record.points?.project ? '' : {record.points.project.name}
+ return !record.points?.project ? '--' : {record.points.project.name}
}
}, {
title: '巡检计划',
@@ -52,7 +52,7 @@ const PatrolRecord = (props) => {
width: '10%',
showInDetail: true,
render: (text, record, index) => {
- return !record.patrolPlan ? '' : {record.patrolPlan.name}
+ return !record.patrolPlan ? '--' : {record?.patrolPlan?.name || '-'}
}
}, {
title: '巡检点位',
@@ -61,7 +61,7 @@ const PatrolRecord = (props) => {
showInDetail: true,
width: '10%',
render: (text, record, index) => {
- return !record.points?.user ? '' : {record.points.itemData.name}
+ return !record.points?.user ? '--' : {record.points.itemData.name}
}
}, {
title: '巡检人',
@@ -70,7 +70,7 @@ const PatrolRecord = (props) => {
showInDetail: true,
width: '10%',
render: (text, record, index) => {
- return !record.points?.user ? '' : {record.points.user.name}
+ return !record.points?.user ? '--' : {record.points.user.name}
}
}, {
title: '巡检单位',
@@ -79,7 +79,7 @@ const PatrolRecord = (props) => {
key: 'type',
width: '10%',
render: (text, record, index) => {
- return !record.points?.user ? '' : {record.points.user.department.name}
+ return !record.points?.user ? '--' : {record.points.user.department.name}
}
}, {
title: '巡检频次',
@@ -88,7 +88,7 @@ const PatrolRecord = (props) => {
showInDetail: true,
width: '10%',
render: (text, record, index) => {
- return !record.points ? '' : {record.points.frequency}
+ return !record.points ? '--' : {record.points.frequency || '-'}
}
}, {
title: '上次巡检日期',
@@ -207,56 +207,121 @@ const PatrolRecord = (props) => {
}
})
if (modelData && modelData.points && modelData.points.inspectContent) {
- let inspectContent = modelData.points.inspectContent
- for (let k in inspectContent) {
- dataArr.push(
- <>
-
- {k} :
-
- {
- inspectContent[k].isNormal ? '正常' :
-
-
-
- 巡查详情 :
- {inspectContent[k].msgInp}
- 严重等级 :
- {inspectContent[k].level}
- 现场照片 :
-
- {
- let nextV = []
- for (let s of (inspectContent[k].imgs || [])) {
- if (s) {
- nextV.push({
- storageUrl: s
- })
+ if (modelData?.points?.itemData?.pointDevices?.length > 0) {
+ let inspectContent = modelData.points.inspectContent
+ inspectContent?.map(s => {
+ dataArr.push(
+ <>
+
+ {s?.deviceName} :
+
+ {
+ !s.alarm ? '正常' :
+
+
+ {s?.checkItems?.map(k => {
+ return <>
+ {k.name}:
+
+ 巡查详情 :
+ {k.msgInp}
+ 严重等级 :
+ {k.level}
+ 现场照片 :
+
+ {
+ let nextV = []
+ for (let s of (k.imgs || [])) {
+ if (s) {
+ nextV.push({
+ storageUrl: s
+ })
+ }
+ }
+ return nextV
+ })()
}
+ />
+
+
+ >
+
+ })}
+
+
+
+ }
+
+
+ >
+ )
+ })
+
+ } else {
+ let inspectContent = modelData.points.inspectContent
+ for (let v in inspectContent) {
+ inspectContent[v]?.checkItems?.map(k => {
+ dataArr.push(
+ <>
+
+ {k?.name} :
+
+ {
+ !inspectContent[v].alarm ? '正常' :
+
+
+
+ 巡查详情 :
+ {k.msgInp}
+ 严重等级 :
+ {k.level}
+ 现场照片 :
+
+ {
+ let nextV = []
+ for (let s of (k.imgs || [])) {
+ if (s) {
+ nextV.push({
+ storageUrl: s
+ })
+ }
+ }
+ return nextV
+ })()
}
- return nextV
- })()
- }
- />
-
-
-
-
- }
-
-
- >
- )
+ />
+
+
+
+
+ }
+
+
+ >
+ )
+ })
+
+ }
}
+
}
return dataArr
})()}
diff --git a/web/client/src/sections/projectRegime/components/pointModel.js b/web/client/src/sections/projectRegime/components/pointModel.js
index 2818258..45274ff 100644
--- a/web/client/src/sections/projectRegime/components/pointModel.js
+++ b/web/client/src/sections/projectRegime/components/pointModel.js
@@ -7,7 +7,7 @@ import Uploads from '$components/Uploads';
import { useEffect } from 'react';
import moment from 'moment';
-const ProjectAddModel = ({ dispatch, actions, user, modelData, close, success, qrCodeId }) => {
+const ProjectAddModel = ({ dispatch, actions, user, modelData, close, success, qrCodeId, devices }) => {
const { projectRegime } = actions
const [showBaiduMap, setShowBaiduMap] = useState(false)
@@ -172,6 +172,16 @@ const ProjectAddModel = ({ dispatch, actions, user, modelData, close, success, q
initialValue={modelData?.equipmentModel}>
+ s?.deviceId) || []}>
+
+
{
const { projectRegime } = actions
const [showBaiduMap, setShowBaiduMap] = useState(false)
+ const [type, setType] = useState(modelData?.type || type_options[0])
const [form] = Form.useForm();
useEffect(() => {
@@ -103,15 +107,33 @@ const ProjectAddModel = ({ dispatch, actions, user, modelData, close, success, f
// rules={[{ required: true, message: '请选择结构物类型' },]}
>
+ {type == '管廊' &&
+
+ }
{
- const { dispatch, actions } = props
+ const { dispatch, actions, devices } = props
const { projectRegime } = actions
const [tableList, settableList] = useState([])
const [addModel, setAddModel] = useState(false)
@@ -28,6 +28,7 @@ const Information = (props) => {
const projectList = (obj) => {
const { limit, page } = obj
+ dispatch(actions.deviceManage.getDeviceList());
dispatch(projectRegime.positionList({ limit, page: 0, projectId: qrCodeId })).then(res => {
if (res.success) {
let data = []
@@ -166,6 +167,7 @@ const Information = (props) => {
{
setAddModel(false)
setModelData({})
@@ -183,10 +185,11 @@ const Information = (props) => {
}
function mapStateToProps(state) {
- const { auth, global } = state;
+ const { auth, global, device } = state;
return {
user: auth.user,
actions: global.actions,
+ devices: device?.data?.rows || []
};
}
diff --git a/web/client/src/utils/webapi.js b/web/client/src/utils/webapi.js
index 07f09da..b54b2f0 100644
--- a/web/client/src/utils/webapi.js
+++ b/web/client/src/utils/webapi.js
@@ -139,6 +139,11 @@ export const ApiTable = {
getProjectPoints: 'project/{projectId}/all/points',
getDeployPoints: 'picture/{pictureId}/deploy/points',
setDeployPoints: 'set/picture/{pictureId}/deploy/points',
+
+ //设备管理
+ getDeviceList: 'device',
+ addDevice: 'device',
+ modifyDevice: 'device/{id}',
};
export const RouteTable = {