CODE 1 year ago
parent
commit
208696fbea
  1. 24
      api/app/lib/controllers/data/road.js
  2. 2
      api/app/lib/index.js
  3. 3
      api/app/lib/routes/data/index.js
  4. 16
      web/client/src/sections/fillion/actions/infor.js
  5. 745
      web/client/src/sections/fillion/components/infor/details.js
  6. 8014
      web/client/src/sections/fillion/components/transportationTable.js
  7. 11
      web/client/src/sections/fillion/containers/maintenanceSpotCheck-new.js
  8. 1
      web/client/src/utils/webapi.js

24
api/app/lib/controllers/data/road.js

@ -39,7 +39,10 @@ async function get (ctx) {
let findOption = { let findOption = {
where: {}, where: {},
order: [['id', 'DESC']] order: [['id', 'DESC']],
}
if (level == '村') {
findOption.include = [{ model: models.Village, }]
} }
if (alterId) { if (alterId) {
findOption.where.id = { $notIn: alterId } findOption.where.id = { $notIn: alterId }
@ -173,8 +176,27 @@ async function del (ctx) {
} }
} }
async function getVillageList (ctx) {
try {
const models = ctx.fs.dc.models;
const { } = ctx.query;
const res = await models.Village.findAll()
ctx.status = 200;
ctx.body = res
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
message: typeof error == 'string' ? error : undefined
}
}
}
module.exports = { module.exports = {
importIn, importIn,
getRoadSection, getRoadSection,
get, edit, del, get, edit, del,
getVillageList,
}; };

2
api/app/lib/index.js

@ -95,6 +95,8 @@ module.exports.models = function (dc) { // dc = { orm: Sequelize对象, ORM: Seq
VillageDistance.belongsTo(Village, { foreignKey: 'calcVillage', targetKey: 'id' }); VillageDistance.belongsTo(Village, { foreignKey: 'calcVillage', targetKey: 'id' });
Village.hasMany(VillageDistance, { foreignKey: 'calcVillage', sourceKey: 'id' }); Village.hasMany(VillageDistance, { foreignKey: 'calcVillage', sourceKey: 'id' });
Road.belongsTo(Village, { foreignKey: 'villageId', targetKey: 'id' });
Report.belongsTo(Road, { foreignKey: 'roadId', targetKey: 'id', as: 'road_' }); Report.belongsTo(Road, { foreignKey: 'roadId', targetKey: 'id', as: 'road_' });
Road.hasMany(Report, { foreignKey: 'roadId', sourceKey: 'id', as: 'road_' }); Road.hasMany(Report, { foreignKey: 'roadId', sourceKey: 'id', as: 'road_' });
}; };

3
api/app/lib/routes/data/index.js

@ -111,6 +111,9 @@ module.exports = function (app, router, opts) {
app.fs.api.logAttr['DEL/road/:roadId'] = { content: '删除道路数据', visible: false }; app.fs.api.logAttr['DEL/road/:roadId'] = { content: '删除道路数据', visible: false };
router.del('/road/:roadId', road.del); router.del('/road/:roadId', road.del);
app.fs.api.logAttr['GET/village/list'] = { content: '获取村庄数据', visible: true };
router.get('/village/list', road.getVillageList);
// 道路 END // 道路 END
// 桥梁 // 桥梁

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

@ -111,6 +111,19 @@ export function putRoadway (query) {
msg: { option: query?.roadId ? '编辑' : '新增' + '道路信息' }, msg: { option: query?.roadId ? '编辑' : '新增' + '道路信息' },
}); });
} }
export function getVillageList(query={}) { // fId, limit, offset, searchTxt
return dispatch => basicAction({
type: 'get',
dispatch: dispatch,
actionType: 'GET_VILLAGE_LIST',
url: ApiTable.getVillageList,
query,
msg: { error: '获取村庄数据失败' },
reducer: { name: 'villageList' }
});
}
export function getBridge (query) { export function getBridge (query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'get', type: 'get',
@ -433,4 +446,5 @@ export function getxiuyangas (query) {
msg: { error: '获取信息失败' }, msg: { error: '获取信息失败' },
reducer: { name: 'xiuyang' } reducer: { name: 'xiuyang' }
}); });
} }

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

@ -2,382 +2,405 @@ 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 } 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,setDelet, dispatch, setRecortd, engineering,whichofits } = props const { visible, onVisibleChange, typecard, rewkeys, data, recortd, sitename, setDelet, dispatch, setRecortd, engineering, whichofits, villageList } = 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()//处理
const [recordsay, setRecordsay] = useState()//必填数据 const [recordsay, setRecordsay] = useState()//必填数据
// const [success, setSuccess] = useState() //状态 // const [success, setSuccess] = useState() //状态
// const [establishment, setEstablishment] = useState() //业户类型 // const [establishment, setEstablishment] = useState() //业户类型
// console.log(recortd)
useEffect(() => { useEffect(() => {
const array = [] const array = []
if (rewkeys === 'transportation') { if (rewkeys === 'transportation') {
const xindata = [...data] const xindata = [...data]
setNewlys(xindata?.splice(0, 2)) setNewlys(xindata?.splice(0, 2))
setNewlysay(xindata) setNewlysay(xindata)
} if (rewkeys === 'bridge') { } if (rewkeys === 'bridge') {
_.forIn(data, function (value, key) { _.forIn(data, function (value, key) {
array.push({ name: value, type: key }) array.push({ name: value, type: key })
}); });
setNewlys(array?.splice(0, 2)) setNewlys(array?.splice(0, 2))
setNewlysay(array) setNewlysay(array)
// console.log(array) // console.log(array)
} }
if (rewkeys === 'weihuo') { if (rewkeys === 'weihuo') {
_.forIn(data, function (value, key) { _.forIn(data, function (value, key) {
array.push({ name: value, type: key }) array.push({ name: value, type: key })
}); });
setNewlys(array?.splice(0, 2)) setNewlys(array?.splice(0, 2))
setNewlysay(array) setNewlysay(array)
// console.log(array) // console.log(array)
} }
if (rewkeys === 'chuzu') { if (rewkeys === 'chuzu') {
_.forIn(data, function (value, key) { _.forIn(data, function (value, key) {
array.push({ name: value, type: key }) array.push({ name: value, type: key })
}); });
array?.splice(1, 1) array?.splice(1, 1)
setNewlys(array?.splice(0, 2)) setNewlys(array?.splice(0, 2))
setNewlysay(array) setNewlysay(array)
} }
if (rewkeys === 'yehu') { if (rewkeys === 'yehu') {
_.forIn(data, function (value, key) { _.forIn(data, function (value, key) {
array.push({ name: value, type: key }) array.push({ name: value, type: key })
}); });
setNewlys(array?.splice(0, 2)) setNewlys(array?.splice(0, 2))
setNewlysay(array) setNewlysay(array)
// console.log(array) // console.log(array)
} if (rewkeys === 'xianlu') { } if (rewkeys === 'xianlu') {
_.forIn(data, function (value, key) { _.forIn(data, function (value, key) {
array.push({ name: value, type: key }) array.push({ name: value, type: key })
}); });
setNewlys(array?.splice(0, 2)) setNewlys(array?.splice(0, 2))
setNewlysay(array) setNewlysay(array)
} if (rewkeys === 'cheliang') { } if (rewkeys === 'cheliang') {
_.forIn(data, function (value, key) { _.forIn(data, function (value, key) {
array.push({ name: value, type: key }) array.push({ name: value, type: key })
}); });
setNewlys(array?.splice(0, 2)) setNewlys(array?.splice(0, 2))
setNewlysay(array) setNewlysay(array)
}if (rewkeys === 'zhichao') { } if (rewkeys === 'zhichao') {
_.forIn(data, function (value, key) { _.forIn(data, function (value, key) {
array.push({ name: value, type: key }) array.push({ name: value, type: key })
}); });
setNewlys(array?.splice(0, 2)) setNewlys(array?.splice(0, 2))
setNewlysay(array) setNewlysay(array)
} }
}, []) }, [])
useEffect(() => { useEffect(() => {
const arr = [] const arr = []
if (rewkeys === 'transportation') { if (rewkeys === 'transportation') {
_.forIn(recortd, function (value, key) { _.forIn(recortd, function (value, key) {
arr.push({ value: value, type: key }) arr.push({ value: value, type: key })
}); });
setRecordsay(arr.splice(1, 2)) setRecordsay(arr.splice(1, 2))
setRecords(arr) setRecords(arr)
} }
if (rewkeys === 'bridge') { if (rewkeys === 'bridge') {
_.forIn(recortd, function (value, key) { _.forIn(recortd, function (value, key) {
arr.push({ value: value, type: key }) arr.push({ value: value, type: key })
}); });
setRecordsay(arr.splice(1, 2)) setRecordsay(arr.splice(1, 2))
setRecords(arr) setRecords(arr)
} }
if (rewkeys === 'weihuo') { if (rewkeys === 'weihuo') {
_.forIn(recortd, function (value, key) { _.forIn(recortd, function (value, key) {
arr.push({ value: value, type: key }) arr.push({ value: value, type: key })
}); });
setRecordsay(arr.splice(1, 2)) setRecordsay(arr.splice(1, 2))
setRecords(arr) setRecords(arr)
} }
if (rewkeys === 'chuzu') { if (rewkeys === 'chuzu') {
_.forIn(recortd, function (value, key) { _.forIn(recortd, function (value, key) {
arr.push({ value: value, type: key }) arr.push({ value: value, type: key })
}); });
setRecordsay(arr.splice(1, 2)) setRecordsay(arr.splice(1, 2))
setRecords(arr) setRecords(arr)
} if (rewkeys === 'yehu') { } if (rewkeys === 'yehu') {
_.forIn(recortd, function (value, key) { _.forIn(recortd, function (value, key) {
arr.push({ value: value, type: key }) arr.push({ value: value, type: key })
}); });
setRecordsay(arr.splice(1, 2)) setRecordsay(arr.splice(1, 2))
// setEstablishment(arr.splice(-1, 1)) // setEstablishment(arr.splice(-1, 1))
setRecords(arr) setRecords(arr)
} }
if (rewkeys === 'xianlu') { if (rewkeys === 'xianlu') {
_.forIn(recortd, function (value, key) { _.forIn(recortd, function (value, key) {
arr.push({ value: value, type: key }) arr.push({ value: value, type: key })
}); });
setRecordsay(arr.splice(1, 2)) setRecordsay(arr.splice(1, 2))
// setEstablishment(arr.splice(-1, 1)) // setEstablishment(arr.splice(-1, 1))
setRecords(arr) setRecords(arr)
} if (rewkeys === 'cheliang') { } if (rewkeys === 'cheliang') {
_.forIn(recortd, function (value, key) { _.forIn(recortd, function (value, key) {
arr.push({ value: value, type: key }) arr.push({ value: value, type: key })
}); });
setRecordsay(arr.splice(1, 2)) setRecordsay(arr.splice(1, 2))
// setEstablishment(arr.splice(-1, 1)) // setEstablishment(arr.splice(-1, 1))
setRecords(arr) setRecords(arr)
} }
}, [recortd]) }, [recortd])
useEffect(() => { useEffect(() => {
return () => { return () => {
setRecortd() setRecortd()
} }
}, [setRecortd]) }, [setRecortd])
// console.log(recortd) // console.log(recortd)
return ( return (
<Spin spinning={false}> <Spin spinning={false}>
{/* { {/* {
newlysay ? */} newlysay ? */}
<DrawerForm <DrawerForm
width={'90rem'} width={'90rem'}
visible={visible} visible={visible}
onVisibleChange={onVisibleChange} onVisibleChange={onVisibleChange}
onFinish={(values) => { onFinish={(values) => {
if (Object.values(values).length > 0) { if (Object.values(values).length > 0) {
if (rewkeys === 'transportation') { if (rewkeys === 'transportation') {
if (typecard == 'compile') { if (typecard == 'compile') {
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
}
}
if (rewkeys === 'bridge') {
if (typecard == 'compile') {
setDelet(values)
const query = { ...values, roadId: records?.[0]?.value || '' }
dispatch(putBridge(query)).then((res) => {
})
return true
} else {
setDelet(values)
const query = { ...values }
dispatch(putBridge(query)).then((res) => {
})
return true
}
}
if (rewkeys === 'weihuo' || rewkeys === 'chuzu') {
if (typecard == 'compile') {
setDelet(values)
const query = { ...values, vehicleId: records?.[0]?.value || '', type: rewkeys == 'chuzu' ? '出租车' : '危货' }
dispatch(putSpecificVehicle(query)).then((res) => {
})
return true
} else {
setDelet(values)
const query = { ...values, type: rewkeys == 'chuzu' ? '出租车' : '危货' }
dispatch(putSpecificVehicle(query)).then((res) => {
})
return true
}
}
if (rewkeys === 'yehu') {
if (typecard == 'compile') {
setDelet(values)
const query = { ...values, businessId: records?.[0]?.value, type: rewkeys == 'chuzu' ? '出租车' : '危货' }
dispatch(putHouseholds(query)).then((res) => {
})
return true
} else {
setDelet(values)
const query = { ...values, type: rewkeys === 'chuzu' ? '出租车' : '危货' }
dispatch(putHouseholds(query)).then((res) => {
})
return true
}
} if (rewkeys === 'xianlu') {
if (typecard == 'compile') {
setDelet(values)
const query = { ...values, lineId: records?.[0]?.value || '' }
dispatch(putCircuit(query)).then((res) => {
})
return true
} else {
setDelet(values)
const query = { ...values }
dispatch(putCircuit(query)).then((res) => {
})
return true
}
}
if (rewkeys === 'cheliang') {
if (typecard == 'compile') {
setDelet(values)
const query = { ...values, carId: records?.[0]?.value || '' }
dispatch(putVehicle(query)).then((res) => {
})
return true
} else {
setDelet(values)
const query = { ...values }
dispatch(putVehicle(query)).then((res) => {
})
return true
}
}
if (rewkeys == 'zhichao') {
if (typecard == 'compile') {
console.log(typecard)
setDelet(values) })
const query = { ...values, overspeedId: records?.[0]?.value || '' } return true
dispatch(putPurchase(query)).then((res) => { }
console.log(res) }
}) if (rewkeys === 'bridge') {
return true if (typecard == 'compile') {
} else { setDelet(values)
setDelet(values) const query = { ...values, roadId: records?.[0]?.value || '' }
const query = { ...values } dispatch(putBridge(query)).then((res) => {
dispatch(putPurchase(query)).then((res) => {
console.log(res)
})
return true
}
}
} else { return false }
}} })
initialValues={recortd} return true
> } else {
{typecard == 'compile' ? setDelet(values)
<ProForm.Group const query = { ...values }
> dispatch(putBridge(query)).then((res) => {
<ProFormText
name={newlys?.[0]?.type} })
width="md" return true
label={newlys?.[0]?.name} }
}
placeholder="请输入名称" if (rewkeys === 'weihuo' || rewkeys === 'chuzu') {
value={recordsay?.[0]?.value} if (typecard == 'compile') {
// rules={[{ required: true, message: "必填" }]} setDelet(values)
/><ProFormText const query = { ...values, vehicleId: records?.[0]?.value || '', type: rewkeys == 'chuzu' ? '出租车' : '危货' }
name={newlys?.[1]?.type} dispatch(putSpecificVehicle(query)).then((res) => {
width="md"
label={newlys?.[1]?.name} })
return true
placeholder="请输入名称" } else {
value={recordsay?.[1]?.value} setDelet(values)
// rules={[{ required: true, message: "必填" }]} const query = { ...values, type: rewkeys == 'chuzu' ? '出租车' : '危货' }
/> dispatch(putSpecificVehicle(query)).then((res) => {
{rewkeys === 'yehu' ?
<ProFormSelect })
rules={[{ required: true, message: "必填" }]} return true
options={[ }
{ }
value: '出租车', if (rewkeys === 'yehu') {
label: '出租车', if (typecard == 'compile') {
}, { setDelet(values)
value: '危货', const query = { ...values, businessId: records?.[0]?.value, type: rewkeys == 'chuzu' ? '出租车' : '危货' }
label: '危险货运', dispatch(putHouseholds(query)).then((res) => {
},
]} })
name='type' return true
label='类型' } else {
/> : null setDelet(values)
} const query = { ...values, type: rewkeys === 'chuzu' ? '出租车' : '危货' }
{newlysay?.map((item, index) => { dispatch(putHouseholds(query)).then((res) => {
return <ProFormText width="md"
name={item?.type} label={newlysay[index]?.name} placeholder="请输入名称" })
key={index} return true
/> }
})} } if (rewkeys === 'xianlu') {
if (typecard == 'compile') {
setDelet(values)
const query = { ...values, lineId: records?.[0]?.value || '' }
dispatch(putCircuit(query)).then((res) => {
})
return true
} else {
setDelet(values)
const query = { ...values }
dispatch(putCircuit(query)).then((res) => {
})
return true
}
}
if (rewkeys === 'cheliang') {
if (typecard == 'compile') {
setDelet(values)
const query = { ...values, carId: records?.[0]?.value || '' }
dispatch(putVehicle(query)).then((res) => {
})
return true
} else {
setDelet(values)
const query = { ...values }
dispatch(putVehicle(query)).then((res) => {
})
return true
}
}
if (rewkeys == 'zhichao') {
</ProForm.Group> if (typecard == 'compile') {
: <ProForm.Group> console.log(typecard)
<ProFormText
name={newlys?.[0]?.type} setDelet(values)
width="md" const query = { ...values, overspeedId: records?.[0]?.value || '' }
label={newlys?.[0]?.name} dispatch(putPurchase(query)).then((res) => {
console.log(res)
placeholder="请输入名称" })
// value={recordssy?.[0]?.value} return true
} else {
setDelet(values)
const query = { ...values }
dispatch(putPurchase(query)).then((res) => {
console.log(res)
})
return true
}
}
} else { return false }
}}
initialValues={recortd}
>
{typecard == 'compile' ?
<ProForm.Group
>
{rewkeys == 'transportation' && whichofits == '村' ?
<ProFormSelect
width="md"
// rules={[{ required: true, message: "必填" }]} // rules={[{ required: true, message: "必填" }]}
/><ProFormText options={villageList || []}
name={newlys?.[1]?.type} placeholder="请选择所属行政村"
width="md" showSearch={true}
label={newlys?.[1]?.name} name='villageId'
label='所属行政村'
placeholder="请输入名称" /> : null
// value={recordssy?.[1]?.value} }
<ProFormText
name={newlys?.[0]?.type}
width="md"
label={newlys?.[0]?.name}
placeholder="请输入名称"
value={recordsay?.[0]?.value}
// rules={[{ required: true, message: "必填" }]}
/><ProFormText
name={newlys?.[1]?.type}
width="md"
label={newlys?.[1]?.name}
placeholder="请输入名称"
value={recordsay?.[1]?.value}
// rules={[{ required: true, message: "必填" }]}
/>
{rewkeys === 'yehu' ?
<ProFormSelect
rules={[{ required: true, message: "必填" }]}
options={[
{
value: '出租车',
label: '出租车',
}, {
value: '危货',
label: '危险货运',
},
]}
name='type'
label='类型'
/> : null
}
{newlysay?.map((item, index) => {
return <ProFormText width="md"
name={item?.type} label={newlysay[index]?.name} placeholder="请输入名称"
key={index}
/>
})}
</ProForm.Group>
: <ProForm.Group>
{rewkeys == 'transportation' && whichofits == '村' ?
<ProFormSelect
width="md"
// rules={[{ required: true, message: "必填" }]} // rules={[{ required: true, message: "必填" }]}
/> options={villageList || []}
{rewkeys === 'yehu' ? placeholder="请选择所属行政村"
<ProFormSelect showSearch={true}
rules={[{ required: true, message: "必填" }]} name='villageId'
options={[ label='所属行政村'
{ /> : null
value: '出租车', }
label: '出租车', <ProFormText
}, { name={newlys?.[0]?.type}
value: '危货', width="md"
label: '危险货运', label={newlys?.[0]?.name}
},
]} placeholder="请输入名称"
name='type' // value={recordssy?.[0]?.value}
label='类型' // rules={[{ required: true, message: "必填" }]}
/> : null /><ProFormText
} name={newlys?.[1]?.type}
{newlysay?.map((item, index) => { width="md"
return <ProFormText width="md" label={newlys?.[1]?.name}
name={item?.type} label={newlysay[index]?.name} placeholder="请输入名称" key={index}
placeholder="请输入名称"
// value={recordssy?.[1]?.value}
// rules={[{ required: true, message: "必填" }]}
/>
{rewkeys === 'yehu' ?
<ProFormSelect
rules={[{ required: true, message: "必填" }]}
options={[
{
value: '出租车',
label: '出租车',
}, {
value: '危货',
label: '危险货运',
},
]}
name='type'
label='类型'
/> : null
}
{newlysay?.map((item, index) => {
return <ProFormText width="md"
name={item?.type} label={newlysay[index]?.name} placeholder="请输入名称" key={index}
/> />
})} })}
</ProForm.Group>} </ProForm.Group>}
</DrawerForm> </DrawerForm>
{/* : '' {/* : ''
} */} } */}
</Spin> </Spin>
) )
} }
function mapStateToProps(state) { function mapStateToProps (state) {
const { depMessage } = state; const { depMessage } = state;
const pakData = (dep) => { const pakData = (dep) => {
return dep.map((d) => { return dep.map((d) => {
return { return {
title: d.name, title: d.name,
value: d.id, value: d.id,
children: pakData(d.subordinate) children: pakData(d.subordinate)
} }
}) })
} }
let depData = pakData(depMessage.data || []) let depData = pakData(depMessage.data || [])
return { return {
loading: depMessage.isRequesting, loading: depMessage.isRequesting,
depData, depData,
}; };
} }
export default connect(mapStateToProps)(UserModal); export default connect(mapStateToProps)(UserModal);

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

File diff suppressed because it is too large

11
web/client/src/sections/fillion/containers/maintenanceSpotCheck-new.js

@ -1,6 +1,7 @@
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { Button, Modal, Form, Input, Divider, Spin, Select, DatePicker, Descriptions, Table } from 'antd' import { Button, Modal, Form, Input, Divider, Spin, Select, DatePicker, Tooltip, Table } from 'antd'
import { ExclamationCircleOutlined } from '@ant-design/icons';
import { roadSpotList, roadSpotDetail, roadSpotPrepare, confirmRoadSpot, exportSpotRode } from '../actions/spotCheck'; import { roadSpotList, roadSpotDetail, roadSpotPrepare, confirmRoadSpot, exportSpotRode } from '../actions/spotCheck';
import moment from 'moment' import moment from 'moment'
import Adjustment from '../components/adjustment' import Adjustment from '../components/adjustment'
@ -38,7 +39,7 @@ const MaintenanceSpotCheck = (props) => {
render: (_, record) => record?.date && moment(record?.date).format('YYYY-MM-DD') || '--' render: (_, record) => record?.date && moment(record?.date).format('YYYY-MM-DD') || '--'
}, },
{ {
title: '抽查县道比(%)', title: '抽查县道比(%)',
key: 'countyPercentage', key: 'countyPercentage',
dataIndex: 'countyPercentage', dataIndex: 'countyPercentage',
}, },
@ -225,7 +226,9 @@ const MaintenanceSpotCheck = (props) => {
<Form form={form}> <Form form={form}>
<Form.Item <Form.Item
label="抽取比例(%)" label={<div>抽取县道比例(%)<Tooltip title='默认抽查乡道比例为25%、抽查村道比例为10%'>
<ExclamationCircleOutlined style={{ marginLeft: 6 }} />
</Tooltip></div>}
name="percentValue" name="percentValue"
rules={[ rules={[
{ required: true, message: '请选择抽取比例' }, { required: true, message: '请选择抽取比例' },
@ -235,7 +238,7 @@ const MaintenanceSpotCheck = (props) => {
// }, // },
]} ]}
> >
<Select style={{}} placeholder="请选择抽取比例" options={[{ value: 25, label: '25%', }, { value: 50, label: '50%', }]} /> <Select style={{}} placeholder="请选择抽取比例" options={[{ value: 50, label: '50%', }, { value: 75, label: '75%', }]} />
</Form.Item> </Form.Item>
<Form.Item className="ant-row" style={{ <Form.Item className="ant-row" style={{

1
web/client/src/utils/webapi.js

@ -70,6 +70,7 @@ export const ApiTable = {
getRoadway: 'road', getRoadway: 'road',
putRoadway: 'road', putRoadway: 'road',
delRoadway: 'road/{roadId}', delRoadway: 'road/{roadId}',
getVillageList:'village/list', //获取村庄
//道路统计 //道路统计
getBgroadstatistics: "build/road_state", getBgroadstatistics: "build/road_state",

Loading…
Cancel
Save