Browse Source

Merge branch 'dev' of https://gitea.anxinyun.cn/gao.zhiyuan/Highways4Good into dev

release_0.0.4^2
巴林闲侠 3 years ago
parent
commit
3c10799b4c
  1. 34
      web/client/src/sections/fillion/actions/infor.js
  2. 62
      web/client/src/sections/fillion/components/infor/details.js
  3. 2
      web/client/src/sections/fillion/components/inforTable.js
  4. 1
      web/client/src/sections/fillion/components/operationalTable.js
  5. 1
      web/client/src/sections/fillion/components/project/project.js
  6. 1
      web/client/src/sections/fillion/components/transportationTable.js
  7. 7
      web/log/development.txt

34
web/client/src/sections/fillion/actions/infor.js

@ -63,7 +63,7 @@ export function putSpecificVehicle(query) {
data: query, data: query,
actionType: 'put_SPECIFIC_VEHICLE', actionType: 'put_SPECIFIC_VEHICLE',
url: ApiTable.putSpecificVehicle, url: ApiTable.putSpecificVehicle,
msg: { error: '编辑车辆信息失败' }, msg: { option: '编辑车辆信息' },
}); });
} }
@ -74,7 +74,7 @@ export function putHouseholds(query) {
data: query, data: query,
actionType: 'put_HOUSEHOLDS', actionType: 'put_HOUSEHOLDS',
url: ApiTable.putHouseholds, url: ApiTable.putHouseholds,
msg: { error: '编辑业户信息失败' }, msg: { option: '编辑业户信息' },
}); });
} }
@ -107,7 +107,7 @@ export function putRoadway(query) {
data: query, data: query,
actionType: 'PUT_ROADWAY', actionType: 'PUT_ROADWAY',
url: ApiTable.putRoadway, url: ApiTable.putRoadway,
msg: { error: '编辑道路信息失败' }, msg: { option: '编辑道路信息' },
}); });
} }
@ -129,7 +129,7 @@ export function putBridge(query) {
data: query, data: query,
actionType: 'PUT_BRIDGE', actionType: 'PUT_BRIDGE',
url: ApiTable.putBridge, url: ApiTable.putBridge,
msg: { error: '编辑桥梁信息失败' }, msg: { option: '编辑桥梁信息' },
}); });
} }
@ -151,7 +151,7 @@ export function putProject(query) {
data: query, data: query,
actionType: 'GET_PROJECT', actionType: 'GET_PROJECT',
url: ApiTable.putProject, url: ApiTable.putProject,
msg: { error: '编辑工程信息失败' }, msg: { option: '编辑工程信息' },
}); });
} }
@ -173,7 +173,7 @@ export function putHighways(query) {
data: query, data: query,
actionType: 'GET_HIGHWAYS', actionType: 'GET_HIGHWAYS',
url: ApiTable.putHighways, url: ApiTable.putHighways,
msg: { error: '编辑路政信息失败' }, msg: { option: '编辑路政信息' },
}); });
} }
@ -195,7 +195,7 @@ export function putCircuit(query) {
data: query, data: query,
actionType: 'PUT_CIRCUIT', actionType: 'PUT_CIRCUIT',
url: ApiTable.putCircuit, url: ApiTable.putCircuit,
msg: { error: '编辑线路信息失败' }, msg: { option: '编辑线路信息' },
}); });
} }
@ -217,7 +217,7 @@ export function putVehicle(query) {
data: query, data: query,
actionType: 'PUT_VEHICLE', actionType: 'PUT_VEHICLE',
url: ApiTable.putVehicle, url: ApiTable.putVehicle,
msg: { error: '编辑车辆信息失败' }, msg: { option: '编辑车辆信息' },
}); });
} }
@ -227,7 +227,7 @@ export function delRoadway(query) {
dispatch: dispatch, dispatch: dispatch,
actionType: 'DEL_ROADWAY', actionType: 'DEL_ROADWAY',
url: ApiTable.delRoadway.replace("{roadId}", query?.roadId), url: ApiTable.delRoadway.replace("{roadId}", query?.roadId),
msg: { error: '删除车辆信息失败' }, msg: { option: '删除车辆信息' },
}); });
} }
@ -237,7 +237,7 @@ export function delProject(query) {
dispatch: dispatch, dispatch: dispatch,
actionType: 'DEL_PROJECT', actionType: 'DEL_PROJECT',
url: ApiTable.delProject.replace("{projectId}", query?.projectId), url: ApiTable.delProject.replace("{projectId}", query?.projectId),
msg: { error: '删除工程信息失败' }, msg: { option: '删除工程信息' },
}); });
} }
@ -247,7 +247,7 @@ export function delBridge(query) {
dispatch: dispatch, dispatch: dispatch,
actionType: 'DEL_BRIDGE', actionType: 'DEL_BRIDGE',
url: ApiTable.delBridge.replace("{bridgeId}", query?.bridgeId), url: ApiTable.delBridge.replace("{bridgeId}", query?.bridgeId),
msg: { error: '删除桥梁信息失败' }, msg: { option: '删除桥梁信息' },
}); });
} }
@ -257,7 +257,7 @@ export function delSpecificVehicle(query) {
dispatch: dispatch, dispatch: dispatch,
actionType: 'DEL_SPECIFICVENICLE', actionType: 'DEL_SPECIFICVENICLE',
url: ApiTable.delSpecificVehicle.replace("{vehicleId}", query?.vehicleId), url: ApiTable.delSpecificVehicle.replace("{vehicleId}", query?.vehicleId),
msg: { error: '删除车辆信息失败' }, msg: { option: '删除车辆信息' },
}); });
} }
@ -267,7 +267,7 @@ export function delHouseholds(query) {
dispatch: dispatch, dispatch: dispatch,
actionType: 'DEL_HOUSEHOLDS', actionType: 'DEL_HOUSEHOLDS',
url: ApiTable.delHouseholds.replace("{businessId}", query?.businessId), url: ApiTable.delHouseholds.replace("{businessId}", query?.businessId),
msg: { error: '删除业户信息失败' }, msg: { option: '删除业户信息' },
}); });
} }
@ -277,7 +277,7 @@ export function delCircuit(query) {
dispatch: dispatch, dispatch: dispatch,
actionType: 'DEL_CIRCUIT', actionType: 'DEL_CIRCUIT',
url: ApiTable.delCircuit.replace("{lineId}", query?.lineId), url: ApiTable.delCircuit.replace("{lineId}", query?.lineId),
msg: { error: '删除运营线路信息失败' }, msg: { option: '删除运营线路信息' },
}); });
} }
@ -287,7 +287,7 @@ export function delVehicle(query) {
dispatch: dispatch, dispatch: dispatch,
actionType: 'DEL_VEHICLE', actionType: 'DEL_VEHICLE',
url: ApiTable.delVehicle.replace("{carId}", query?.carId), url: ApiTable.delVehicle.replace("{carId}", query?.carId),
msg: { error: '删除车辆信息失败' }, msg: { option: '删除车辆信息' },
}); });
} }
@ -310,7 +310,7 @@ export function putPurchase(query) {
data: query, data: query,
actionType: 'PUT_PURCHASE', actionType: 'PUT_PURCHASE',
url: ApiTable.putPurchase, url: ApiTable.putPurchase,
msg: { error: '获取治超信息失败' }, msg: { option: '编辑治超信息' },
}); });
} }
@ -320,7 +320,7 @@ export function delPurchase(query) {
dispatch: dispatch, dispatch: dispatch,
actionType: 'DEL_PURCHASE', actionType: 'DEL_PURCHASE',
url: ApiTable.delPurchase.replace("{overspeedId}", query?.overspeedId), url: ApiTable.delPurchase.replace("{overspeedId}", query?.overspeedId),
msg: { error: '删除车辆信息失败' }, msg: { option: '删除车辆信息' },
}); });
} }

62
web/client/src/sections/fillion/components/infor/details.js

@ -1,12 +1,12 @@
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { Form, Spin, Table } from 'antd'; import { Form, Spin, Table } from 'antd';
import { DrawerForm, ProForm, ProFormText, ProFormSelect } from '@ant-design/pro-form'; import { DrawerForm, ProForm, ProFormText, ProFormSelect,ProFormDatePicker } from '@ant-design/pro-form';
import { putRoadway, putSpecificVehicle, putHouseholds, putCircuit, putVehicle, putPurchase } from "../../actions/infor" import { putRoadway, putSpecificVehicle, putHouseholds, putCircuit, putVehicle, putPurchase } from "../../actions/infor"
import { putBridge } from "../../actions/infor" import { putBridge } from "../../actions/infor"
import _ from 'lodash' import _ from 'lodash'
const UserModal = (props) => { const UserModal = (props) => {
const { visible, onVisibleChange, typecard, rewkeys, data, recortd, sitename, dispatch, setRecortd, setMonitor,setDelet,whichofits } = props const { visible, onVisibleChange, typecard, rewkeys, data, recortd, sitename, dispatch, setRecortd, setMonitor, setDelet, whichofits } = props
const [newlys, setNewlys] = useState() //必填数据 const [newlys, setNewlys] = useState() //必填数据
const [newlysay, setNewlysay] = useState() //处理hou const [newlysay, setNewlysay] = useState() //处理hou
const [records, setRecords] = useState()//处理 const [records, setRecords] = useState()//处理
@ -70,6 +70,7 @@ const UserModal = (props) => {
array.push({ name: value, type: key }) array.push({ name: value, type: key })
}); });
setNewlys(array?.splice(0, 2)) setNewlys(array?.splice(0, 2))
array?.splice(6, 1)
setNewlysay(array) setNewlysay(array)
} }
}, []) }, [])
@ -155,29 +156,28 @@ const UserModal = (props) => {
setDelet(values) setDelet(values)
const query = { ...values, level: whichofits, roadId: records?.[0]?.value || '' } const query = { ...values, level: whichofits, roadId: records?.[0]?.value || '' }
dispatch(putRoadway(query)).then((res) => { dispatch(putRoadway(query)).then((res) => {
})
return true return true
})
} else { } else {
setDelet(values) setDelet(values)
const query = { ...values, level: whichofits } const query = { ...values, level: whichofits }
dispatch(putRoadway(query)).then((res) => { dispatch(putRoadway(query)).then((res) => {
}) })
return true return true
} }
} }
if (rewkeys === 'bridge') { if (rewkeys === 'bridge') {
if (typecard == '111') { if (typecard == '111') {
setDelet(values) setDelet(values)
const query = { ...values, roadId: records?.[0]?.value || '' } const query = { ...values, roadId: records?.[0]?.value || '' }
dispatch(putBridge(query)).then((res) => { dispatch(putBridge(query)).then((res) => {
}) })
return true return true
} else { } else {
setDelet(values) setDelet(values)
const query = { ...values } const query = { ...values }
dispatch(putBridge(query)).then((res) => { dispatch(putBridge(query)).then((res) => {
@ -185,17 +185,38 @@ const UserModal = (props) => {
return true return true
} }
} }
if (rewkeys === 'weihuo' || rewkeys === 'chuzu') { if (rewkeys === 'weihuo') {
if (typecard == '111') { if (typecard == '111') {
setDelet(values) setDelet(values)
const query = { ...values, vehicleId: records?.[0]?.value || '', type: rewkeys == 'chuzu' ? '出租车' : '危货' } const query = { ...values, vehicleId: records?.[0]?.value || '', type: '危货' }
dispatch(putSpecificVehicle(query)).then((res) => { dispatch(putSpecificVehicle(query)).then((res) => {
}) })
return true return true
} else { } else {
setDelet(values)
const query = { ...values, type: rewkeys == 'chuzu' ? '出租车' : '危货' } setDelet(values)
const query = { ...values, type: '危货' }
dispatch(putSpecificVehicle(query)).then((res) => {
})
return true
}
}
if (rewkeys === 'chuzu') {
if (typecard == '111') {
setDelet(values)
const query = { ...values, vehicleId: records?.[0]?.value || '', type: '出租车' }
dispatch(putSpecificVehicle(query)).then((res) => {
})
return true
} else {
setDelet(values)
const query = { ...values, type: '出租车' }
dispatch(putSpecificVehicle(query)).then((res) => { dispatch(putSpecificVehicle(query)).then((res) => {
}) })
@ -205,14 +226,14 @@ const UserModal = (props) => {
if (rewkeys === 'yehu') { if (rewkeys === 'yehu') {
if (typecard == '111') { if (typecard == '111') {
setDelet(values) setDelet(values)
const query = { ...values, businessId: records?.[0]?.value, type: rewkeys == 'chuzu' ? '出租车' : '危货' } const query = { ...values, businessId: records?.[0]?.value, type: values.type }
dispatch(putHouseholds(query)).then((res) => { dispatch(putHouseholds(query)).then((res) => {
}) })
return true return true
} else { } else {
setDelet(values) setDelet(values)
const query = { ...values, type: rewkeys === 'chuzu' ? '出租车' : '危货' } const query = { ...values, type: values.type }
dispatch(putHouseholds(query)).then((res) => { dispatch(putHouseholds(query)).then((res) => {
}) })
@ -227,7 +248,7 @@ const UserModal = (props) => {
}) })
return true return true
} else { } else {
setDelet(values) setDelet(values)
const query = { ...values } const query = { ...values }
dispatch(putCircuit(query)).then((res) => { dispatch(putCircuit(query)).then((res) => {
@ -244,7 +265,7 @@ const UserModal = (props) => {
}) })
return true return true
} else { } else {
setDelet(values) setDelet(values)
const query = { ...values } const query = { ...values }
dispatch(putVehicle(query)).then((res) => { dispatch(putVehicle(query)).then((res) => {
@ -262,7 +283,7 @@ const UserModal = (props) => {
}) })
return true return true
} else { } else {
setDelet(values) setDelet(values)
const query = { ...values } const query = { ...values }
dispatch(putPurchase(query)).then((res) => { dispatch(putPurchase(query)).then((res) => {
@ -283,7 +304,6 @@ const UserModal = (props) => {
name={newlys?.[0]?.type} name={newlys?.[0]?.type}
width="md" width="md"
label={newlys?.[0]?.name} label={newlys?.[0]?.name}
placeholder="请输入名称" placeholder="请输入名称"
value={recordsay?.[0]?.value} value={recordsay?.[0]?.value}
// rules={[{ required: true, message: "必填" }]} // rules={[{ required: true, message: "必填" }]}
@ -312,6 +332,7 @@ const UserModal = (props) => {
label='类型' label='类型'
/> : null /> : null
} }
{rewkeys === 'zhichao'?<ProFormDatePicker name="testTime" label="检测时间" />:''}
{newlysay?.map((item, index) => { {newlysay?.map((item, index) => {
return <ProFormText width="md" return <ProFormText width="md"
name={item?.type} label={newlysay[index]?.name} placeholder="请输入名称" name={item?.type} label={newlysay[index]?.name} placeholder="请输入名称"
@ -354,6 +375,7 @@ const UserModal = (props) => {
label='类型' label='类型'
/> : null /> : null
} }
{rewkeys === 'zhichao'?<ProFormDatePicker name="testTime" label="检测时间" />:''}
{newlysay?.map((item, index) => { {newlysay?.map((item, index) => {
return <ProFormText width="md" return <ProFormText width="md"
name={item?.type} label={newlysay[index]?.name} placeholder="请输入名称" key={index} name={item?.type} label={newlysay[index]?.name} placeholder="请输入名称" key={index}

2
web/client/src/sections/fillion/components/inforTable.js

@ -213,7 +213,7 @@ const InForTable = (props) => {
dataIndex: 'createdAt', dataIndex: 'createdAt',
valueType: 'date', valueType: 'date',
render: (dom, record) => { render: (dom, record) => {
return record.testTime return record.testTime.slice(0,10)
}, },
fieldProps: { fieldProps: {
onChange: (value, cs) => { onChange: (value, cs) => {

1
web/client/src/sections/fillion/components/operationalTable.js

@ -22,6 +22,7 @@ const OperaTionalTable = (props) => {
const [recortd, setRecortd] = useState() const [recortd, setRecortd] = useState()
const [rewkeys, setRewkeys] = useState('keyun') const [rewkeys, setRewkeys] = useState('keyun')
const [delet, setDelet] = useState() const [delet, setDelet] = useState()
// const [, setDelet] = useState()
const ref = useRef() const ref = useRef()
useEffect(() => { ref.current.reload() }, [rewkeys, activeKey, delet]) useEffect(() => { ref.current.reload() }, [rewkeys, activeKey, delet])

1
web/client/src/sections/fillion/components/project/project.js

@ -145,7 +145,6 @@ const ProjectModal = (props) => {
label: '否', label: '否',
}, },
]} ]}
width="xs"
name='done' name='done'
label='是否已完成' label='是否已完成'
rules={[{ required: true, message: "必填" }]} rules={[{ required: true, message: "必填" }]}

1
web/client/src/sections/fillion/components/transportationTable.js

@ -3836,6 +3836,7 @@ const TransporTationTable = (props) => {
setRowSelected([]); setRowSelected([]);
const res = await dispatch(getProject(query)); const res = await dispatch(getProject(query));
setCounts(res.payload.data) setCounts(res.payload.data)
console.log(res)
return { return {
...res, ...res,
total: res.payload.data ? res.payload.data.count : 0 total: res.payload.data ? res.payload.data.count : 0

7
web/log/development.txt

@ -24236,6 +24236,7 @@
' at emitErrorCloseNT (internal/streams/destroy.js:68:3)\n' + ' at emitErrorCloseNT (internal/streams/destroy.js:68:3)\n' +
' at processTicksAndRejections (internal/process/task_queues.js:84:21)' ' at processTicksAndRejections (internal/process/task_queues.js:84:21)'
} }
<<<<<<< Updated upstream
2022-07-28 10:08:50.687 - error: [FS-ERRHD] 2022-07-28 10:08:50.687 - error: [FS-ERRHD]
{ {
message: 'Error: read ECONNRESET', message: 'Error: read ECONNRESET',
@ -30704,3 +30705,9 @@
} }
2022-07-28 16:51:10.270 - debug: [FS-LOGGER] Init. 2022-07-28 16:51:10.270 - debug: [FS-LOGGER] Init.
2022-07-28 16:51:11.180 - info: [Router] Inject api: attachment/index 2022-07-28 16:51:11.180 - info: [Router] Inject api: attachment/index
=======
2022-07-28 15:21:26.802 - debug: [FS-LOGGER] Init.
2022-07-28 15:21:27.251 - info: [Router] Inject api: attachment/index
2022-07-28 17:47:48.855 - debug: [FS-LOGGER] Init.
2022-07-28 17:47:49.287 - info: [Router] Inject api: attachment/index
>>>>>>> Stashed changes

Loading…
Cancel
Save