diff --git a/api/app/lib/controllers/data/overspeed.js b/api/app/lib/controllers/data/overspeed.js
index b123b4ba..0da8d491 100644
--- a/api/app/lib/controllers/data/overspeed.js
+++ b/api/app/lib/controllers/data/overspeed.js
@@ -4,12 +4,12 @@ async function overspeedGet (ctx) {
try {
const models = ctx.fs.dc.models;
const { limit, page, nameOfInspectionPoint, licensePlate, numberOfAxles, overrunRateUpper, overrunRateFloor, testTime } = ctx.query
-
+ const sequelize = ctx.fs.dc.ORM;
let findOption = {
where: {
},
- order: [['id', 'DESC']]
+ order: [['id', 'DESC']],
}
if (limit) {
findOption.limit = limit
@@ -17,16 +17,19 @@ async function overspeedGet (ctx) {
if (page && limit) {
findOption.offset = page * limit
}
- if (nameOfInspectionPoint) {
- findOption.where.nameOfInspectionPoint = {
- '$like': `%${nameOfInspectionPoint}%`
+
+ if (nameOfInspectionPoint || licensePlate) {
+ findOption.where['$or'] = {}
+ if (nameOfInspectionPoint) {
+ findOption.where['$or'].
+ nameOfInspectionPoint = { $like: `%${nameOfInspectionPoint}%` }
}
- }
- if (licensePlate) {
- findOption.where.licensePlate = {
- '$like': `%${licensePlate}%`
+ if (licensePlate) {
+ findOption.where['$or'].
+ licensePlate = { $like: `%${licensePlate}%` }
}
}
+
if (numberOfAxles) {
findOption.where.numberOfAxles = numberOfAxles
}
@@ -38,7 +41,7 @@ async function overspeedGet (ctx) {
if (overrunRateFloor) {
findOption.where.overrunRate = {
$gte: overrunRateFloor
- }
+ }
}
if (testTime) {
findOption.where.testTime = testTime
diff --git a/api/app/lib/controllers/data/road.js b/api/app/lib/controllers/data/road.js
index 71ece58e..842c92b6 100644
--- a/api/app/lib/controllers/data/road.js
+++ b/api/app/lib/controllers/data/road.js
@@ -92,9 +92,8 @@ async function getRoadSection (ctx) {
if (road || sectionStart || sectionEnd) {
findOption.where['$or'] = {}
if (road) {
- findOption.where['$or'].push = {
- routeName: { $like: `%${road}%` }
- }
+ findOption.where['$or'].
+ routeName = { $like: `%${road}%` }
}
if (sectionStart) {
findOption.where['$or'].
diff --git a/api/app/lib/controllers/data/vehicle.js b/api/app/lib/controllers/data/vehicle.js
index 1cae9b49..db6c8e8e 100644
--- a/api/app/lib/controllers/data/vehicle.js
+++ b/api/app/lib/controllers/data/vehicle.js
@@ -213,7 +213,7 @@ async function businessDel (ctx) {
const models = ctx.fs.dc.models;
const { businessId } = ctx.params;
- await models.Vehicle.MunicipalBusiness({
+ await models.MunicipalBusiness.destroy({
where: {
id: businessId
}
diff --git a/api/app/lib/controllers/overview/operation.js b/api/app/lib/controllers/overview/operation.js
index 975760d3..d21eed83 100644
--- a/api/app/lib/controllers/overview/operation.js
+++ b/api/app/lib/controllers/overview/operation.js
@@ -10,25 +10,51 @@ async function busCarLevelList (ctx) {
attributes: ['id', 'company', 'fleet', 'vehicleLicensePlateNumber', 'line'],
})
for (let c of busCarRes) {
- const { company, fleet, line } = c
+ const { company, fleet, vehicleLicensePlateNumber, line } = c
const corCompany = data.find(d => d.name === company)
if (!corCompany) {
data.push({
- name: company,
+ name: company || '--',
child: [{
- name: fleet,
- child: [{ ...c.dataValues }]
+ name: fleet || '--',
+ child: [{
+ name: line || '--',
+ child: [{
+ id: c.id,
+ name: vehicleLicensePlateNumber,
+ }]
+ }]
}]
})
} else {
const corFleet = corCompany.child.find(d => d.name === fleet)
if (!corFleet) {
corCompany.child.push({
- name: fleet,
- child: [{ ...c.dataValues }]
+ name: fleet || '--',
+ child: [{
+ name: line || '--',
+ child: [{
+ id: c.id,
+ name: vehicleLicensePlateNumber || '--',
+ }]
+ }]
})
} else {
- corFleet.child.push({ ...c.dataValues })
+ const corLine = corFleet.child.find(d => d.name === line)
+ if (!corLine) {
+ corFleet.child.push({
+ name: line || '--',
+ child: [{
+ id: c.id,
+ name: vehicleLicensePlateNumber || '--',
+ }]
+ })
+ } else {
+ corLine.child.push({
+ id: c.id,
+ name: vehicleLicensePlateNumber || '--',
+ })
+ }
}
}
}
diff --git a/api/app/lib/models/publicity.js b/api/app/lib/models/publicity.js
index 62a1c77a..a9ceef05 100644
--- a/api/app/lib/models/publicity.js
+++ b/api/app/lib/models/publicity.js
@@ -28,7 +28,7 @@ module.exports = dc => {
},
video: {
index: 3,
- type: DataTypes.ARRAY(DataTypes.INTEGER),
+ type: DataTypes.ARRAY(DataTypes.STRING),
allowNull: true,
defaultValue: null,
comment: null,
diff --git a/web/client/index.ejs b/web/client/index.ejs
index a91dbdd7..0d79375c 100644
--- a/web/client/index.ejs
+++ b/web/client/index.ejs
@@ -15,6 +15,7 @@
}
+
diff --git a/web/client/src/sections/fillion/components/bridgeTable.js b/web/client/src/sections/fillion/components/bridgeTable.js
index d8101bda..2f46b175 100644
--- a/web/client/src/sections/fillion/components/bridgeTable.js
+++ b/web/client/src/sections/fillion/components/bridgeTable.js
@@ -4,7 +4,7 @@ import { Spin, Button, Popconfirm, Badge } from 'antd';
import ProTable from '@ant-design/pro-table';
import './protable.less'
import moment from 'moment';
-import { getBridge, getProject,delBridge,delProject } from "../actions/infor"
+import { getBridge, getProject, delBridge, delProject } from "../actions/infor"
import UserModal from './infor/details';
import ProjectModal from './project/project';
@@ -26,7 +26,23 @@ const BrideTable = (props) => {
const [delet, setDelet] = useState()
const ref = useRef()
- useEffect(() => { ref.current.reload() }, [whichofits,delet])
+ useEffect(() => { ref.current.reload() }, [whichofits, delet])
+ const deldata = (id) => { // 桥梁
+ const query = {
+ bridgeId: id
+ }
+ dispatch(delBridge(query)).then((res) => {
+ setDelet(res)
+ })
+ }
+ const deldatas = (id) => { // 工程
+ const query = {
+ projectId: id
+ }
+ dispatch(delProject(query)).then((res) => {
+ setDelet(res)
+ })
+ }
const columns = {
tab1: [
{
@@ -1493,16 +1509,10 @@ const BrideTable = (props) => {
setTypecard('111')
setRecortd(record)
}}
- >编辑
+ >编辑
+ { deldata(record.id) }}>
+
+
}
},
@@ -1683,16 +1693,9 @@ const BrideTable = (props) => {
setTypecard('111')
setRecortd(record)
}}
- >编辑
+ >编辑 { deldatas(record.id) }}>
+
+
}
},
@@ -1809,20 +1812,20 @@ const BrideTable = (props) => {
dataSource={counts || []}
request={async (params) => {
- if(whichofits=='qiaoliang'){
+ if (whichofits == 'qiaoliang') {
const query = {
- bridgeName:sitename
+ bridgeName: sitename
}
setRowSelected([]);
const res = await dispatch(getBridge(query));
// console.log(res)
-
+
setCounts(res.payload.data)
return {
...res,
total: res.payload.data ? res.payload.data.count : 0
}
- }if(whichofits=='gongcheng'){
+ } if (whichofits == 'gongcheng') {
const query = {
type: 'bridge',
// type:sitename
@@ -1835,7 +1838,7 @@ const BrideTable = (props) => {
total: res.payload.data ? res.payload.data.count : 0
}
}
-
+
}}
search={{
defaultCollapsed: false,
diff --git a/web/client/src/sections/fillion/components/highways/highwaysdata.js b/web/client/src/sections/fillion/components/highways/highwaysdata.js
index 0ced59c2..854781da 100644
--- a/web/client/src/sections/fillion/components/highways/highwaysdata.js
+++ b/web/client/src/sections/fillion/components/highways/highwaysdata.js
@@ -3,7 +3,7 @@ import { connect } from 'react-redux';
import { Form, Spin, Table } from 'antd';
import { ModalForm, ProForm, ProFormText,ProFormSelect } from '@ant-design/pro-form';
import { putOperaTional,putHighways } from "../../actions/infor"
-import { _ } from 'lodash'
+import _ from 'lodash'
const HightModal = (props) => {
const { visible, onVisibleChange, typecard, rewkeys, recortd, dispatch, setRecortd,setDelet } = props
diff --git a/web/client/src/sections/fillion/components/infor/details.js b/web/client/src/sections/fillion/components/infor/details.js
index 26e32560..73b24c7d 100644
--- a/web/client/src/sections/fillion/components/infor/details.js
+++ b/web/client/src/sections/fillion/components/infor/details.js
@@ -155,15 +155,14 @@ const UserModal = (props) => {
setDelet(values)
const query = { ...values, level: whichofits, roadId: records?.[0]?.value || '' }
dispatch(putRoadway(query)).then((res) => {
- setSuccess(res.success)
-
+
})
return true
} else {
setDelet(values)
const query = { ...values, level: whichofits }
dispatch(putRoadway(query)).then((res) => {
- setSuccess(res.success)
+
})
return true
@@ -174,14 +173,14 @@ const UserModal = (props) => {
setDelet(values)
const query = { ...values, roadId: records?.[0]?.value || '' }
dispatch(putBridge(query)).then((res) => {
- setSuccess(res.success)
+
})
return true
} else {
setDelet(values)
const query = { ...values }
dispatch(putBridge(query)).then((res) => {
- setSuccess(res.success)
+
})
return true
}
@@ -189,16 +188,16 @@ const UserModal = (props) => {
if (rewkeys === 'weihuo' || rewkeys === 'chuzu') {
if (typecard == '111') {
setDelet(values)
- const query = { ...values, vehicleId: records?.[0]?.value || '', type: rewkeys === 'chuzu' ? '出租车' : '危货' }
+ const query = { ...values, vehicleId: records?.[0]?.value || '', type: rewkeys == 'chuzu' ? '出租车' : '危货' }
dispatch(putSpecificVehicle(query)).then((res) => {
- setSuccess(res.success)
+
})
return true
} else {
setDelet(values)
- const query = { ...values, type: rewkeys }
+ const query = { ...values, type: rewkeys == 'chuzu' ? '出租车' : '危货' }
dispatch(putSpecificVehicle(query)).then((res) => {
- setSuccess(res.success)
+
})
return true
}
@@ -208,14 +207,14 @@ const UserModal = (props) => {
setDelet(values)
const query = { ...values, businessId: records?.[0]?.value, type: rewkeys == 'chuzu' ? '出租车' : '危货' }
dispatch(putHouseholds(query)).then((res) => {
- setSuccess(res.success)
+
})
return true
} else {
setDelet(values)
const query = { ...values, type: rewkeys === 'chuzu' ? '出租车' : '危货' }
dispatch(putHouseholds(query)).then((res) => {
- setSuccess(res.success)
+
})
return true
}
@@ -224,14 +223,14 @@ const UserModal = (props) => {
setDelet(values)
const query = { ...values, lineId: records?.[0]?.value || '' }
dispatch(putCircuit(query)).then((res) => {
- setSuccess(res.success)
+
})
return true
} else {
setDelet(values)
const query = { ...values }
dispatch(putCircuit(query)).then((res) => {
- setSuccess(res.success)
+
})
return true
}
@@ -241,14 +240,14 @@ const UserModal = (props) => {
setDelet(values)
const query = { ...values, carId: records?.[0]?.value || '' }
dispatch(putVehicle(query)).then((res) => {
- setSuccess(res.success)
+
})
return true
} else {
setDelet(values)
const query = { ...values }
dispatch(putVehicle(query)).then((res) => {
- setSuccess(res.success)
+
})
return true
}
@@ -258,7 +257,7 @@ const UserModal = (props) => {
setDelet(values)
const query = { ...values, overspeedId: records?.[0]?.value || '' }
dispatch(putPurchase(query)).then((res) => {
- setSuccess(res.success)
+
setMonitor(res)
})
return true
@@ -266,7 +265,7 @@ const UserModal = (props) => {
setDelet(values)
const query = { ...values }
dispatch(putPurchase(query)).then((res) => {
- setSuccess(res.success)
+
setMonitor(res)
})
return true
diff --git a/web/client/src/sections/fillion/components/inforTable.js b/web/client/src/sections/fillion/components/inforTable.js
index 00ceafb7..11b05946 100644
--- a/web/client/src/sections/fillion/components/inforTable.js
+++ b/web/client/src/sections/fillion/components/inforTable.js
@@ -51,6 +51,14 @@ const InForTable = (props) => {
`attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`)
})
}
+ const deldata = (id) => { // 治超删除
+ const query = {
+ overspeedId: id
+ }
+ dispatch(delPurchase(query)).then((res) => {
+ setDelet(res)
+ })
+ }
const columns =
[
{
@@ -364,16 +372,11 @@ const InForTable = (props) => {
setTypecard('111')
setRecortd(record)
}}
- >编辑
+ >编辑
+
+ { deldata(record.id) }}>
+
+
}
},
@@ -438,8 +441,8 @@ const InForTable = (props) => {
request={async (params) => {
console.log(params)
const query = {
- limit:params.pageSize,
- page:params.current-1,
+ limit: params.pageSize,
+ page: params.current - 1,
nameOfInspectionPoint: nameOfInspectionPoint,
licensePlate: licensePlate,
numberOfAxles: numberOfAxles,
diff --git a/web/client/src/sections/fillion/components/operationalTable.js b/web/client/src/sections/fillion/components/operationalTable.js
index 5df036be..119e1629 100644
--- a/web/client/src/sections/fillion/components/operationalTable.js
+++ b/web/client/src/sections/fillion/components/operationalTable.js
@@ -1,9 +1,9 @@
-import React, { useEffect, useState,useRef } from 'react';
+import React, { useEffect, useState, useRef } from 'react';
import { connect } from 'react-redux';
import { Spin, Button, Popconfirm, Badge } from 'antd';
import ProTable from '@ant-design/pro-table';
import './protable.less'
-import { getOperaTional, getSpecificVehicle, getHouseholds,delSpecificVehicle,delHouseholds } from "../actions/infor"
+import { getOperaTional, getSpecificVehicle, getHouseholds, delSpecificVehicle, delHouseholds } from "../actions/infor"
import UserModal from './infor/details';
import HightModal from './highways/highwaysdata';
@@ -24,7 +24,7 @@ const OperaTionalTable = (props) => {
const [delet, setDelet] = useState()
const ref = useRef()
- useEffect(() => { ref.current.reload() }, [rewkeys,activeKey,delet])
+ useEffect(() => { ref.current.reload() }, [rewkeys, activeKey, delet])
//打开弹窗
const openModal = (type, record) => {
setModalVisible(true);
@@ -35,6 +35,23 @@ const OperaTionalTable = (props) => {
setModalRecord(null);
}
}
+ const deldata = (id) => { // 出租危货
+ const query = {
+ vehicleId: id
+ }
+ dispatch(delSpecificVehicle(query)).then((res) => {
+ setDelet(res)
+ })
+ }
+
+ const deldatas = (id) => { // 业户
+ const query = {
+ businessId: id
+ }
+ dispatch(delHouseholds(query)).then((res) => {
+ setDelet(res)
+ })
+ }
//打开弹窗
const hightModal = (type, record) => {
setModalVisibleyilan(true);
@@ -73,7 +90,7 @@ const OperaTionalTable = (props) => {
search: false,
fieldProps: {
-
+
placeholder: '请输入道路名称进行搜索',
getPopupContainer: (triggerNode) => triggerNode.parentNode,
},
@@ -132,7 +149,7 @@ const OperaTionalTable = (props) => {
render: (dom, record) => {
return record.nameOfBusinessOwner
},
- },
+ },
{
title: '车籍地',
search: false,
@@ -696,16 +713,9 @@ const OperaTionalTable = (props) => {
setTypecard('111')
setRecortd(record)
}}
- >编辑
+ >编辑 { deldata(record.id) }}>
+
+
}
},
@@ -759,7 +769,7 @@ const OperaTionalTable = (props) => {
render: (dom, record) => {
return record.nameOfBusinessOwner
},
- }, {
+ }, {
title: '品名',
search: false,
dataIndex: 'containers',
@@ -1336,16 +1346,9 @@ const OperaTionalTable = (props) => {
setTypecard('111')
setRecortd(record)
}}
- >编辑
+ >编辑 { deldata(record.id) }}>
+
+
}
},
@@ -1813,16 +1816,9 @@ const OperaTionalTable = (props) => {
setTypecard('111')
setRecortd(record)
}}
- >编辑
+ >编辑 { deldatas(record.id) }}>
+
+
}
},
@@ -1881,16 +1877,20 @@ const OperaTionalTable = (props) => {
},
{
key: 'tab2',
- label: { {
- setRewkeys('chuzu')
- } }}>出租车{activeKey === 'tab2'},
+ label: {
+ {
+ setRewkeys('chuzu')
+ }
+ }}>出租车{activeKey === 'tab2'},
},
{
key: 'tab3',
- label: { {
- setRewkeys('weihuo')
- } }}>危险货运{activeKey === 'tab3'},
+ label: {
+ {
+ setRewkeys('weihuo')
+ }
+ }}>危险货运{activeKey === 'tab3'},
}, {
key: 'tab4',
@@ -1918,58 +1918,62 @@ const OperaTionalTable = (props) => {
}}
columns={columns[activeKey]}
- dataSource={counts || []}
+ dataSource={counts || []}
request={async (params, sort, filter) => {
- if(rewkeys=='keyun'){
+ if (rewkeys == 'keyun') {
const query = {}
- setRowSelected([]);
- const res = await dispatch(getOperaTional(query));
- setCounts(res.payload.data)
- return {
- ...res,
- total: res.payload.data ? res.payload.data.count : 0
- }}
- if(rewkeys=='chuzu'){
+ setRowSelected([]);
+ const res = await dispatch(getOperaTional(query));
+ setCounts(res.payload.data)
+ return {
+ ...res,
+ total: res.payload.data ? res.payload.data.count : 0
+ }
+ }
+ if (rewkeys == 'chuzu') {
const query = {
- type:'出租车',
- nameOfBusinessOwner:sitename
+ type: '出租车',
+ nameOfBusinessOwner: sitename
}
- setRowSelected([]);
- const res = await dispatch(getSpecificVehicle(query));
- setCounts(res.payload.data)
- return {
- ...res,
- total: res.payload.data ? res.payload.data.count : 0
- }}
- if(rewkeys=='weihuo'){
+ setRowSelected([]);
+ const res = await dispatch(getSpecificVehicle(query));
+ setCounts(res.payload.data)
+ return {
+ ...res,
+ total: res.payload.data ? res.payload.data.count : 0
+ }
+ }
+ if (rewkeys == 'weihuo') {
const query = {
- type:'危货',
- nameOfBusinessOwner:sitename
+ type: '危货',
+ nameOfBusinessOwner: sitename
}
- setRowSelected([]);
- const res = await dispatch(getSpecificVehicle(query));
- setCounts(res.payload.data)
- return {
- ...res,
- total: res.payload.data ? res.payload.data.count : 0
- }}
- if(rewkeys=='yehu'){
+ setRowSelected([]);
+ const res = await dispatch(getSpecificVehicle(query));
+ setCounts(res.payload.data)
+ return {
+ ...res,
+ total: res.payload.data ? res.payload.data.count : 0
+ }
+ }
+ if (rewkeys == 'yehu') {
const query = {
- nameOfBusinessOwner:sitename
+ nameOfBusinessOwner: sitename
}
- setRowSelected([]);
- const res = await dispatch(getHouseholds(query));
- setCounts(res.payload.data)
- return {
- ...res,
- total: res.payload.data ? res.payload.data.count : 0
- }}
+ setRowSelected([]);
+ const res = await dispatch(getHouseholds(query));
+ setCounts(res.payload.data)
+ return {
+ ...res,
+ total: res.payload.data ? res.payload.data.count : 0
+ }
+ }
}}
search={{
defaultCollapsed: false,
optionRender: (searchConfig, formProps, dom) => [
...dom.reverse(),
- ['tab2','tab3','tab4'].includes(activeKey) ? { props.exports(rowSelected, counts) }}>
+ ['tab2', 'tab3', 'tab4'].includes(activeKey) ? { props.exports(rowSelected, counts) }}>
+ >编辑 { deldata(record.id) }}>
+
+
}
},
@@ -1113,16 +1122,9 @@ const requestcheliang = (name) => {
setTypecard('111')
setRecortd(record)
}}
- >编辑
+ >编辑 { deldatas(record.id) }}>
+
+
}
},
@@ -1173,16 +1175,20 @@ const requestcheliang = (name) => {
items: [
{
key: 'tab1',
- label: { {
- setRewkeys('xianlu')
- } }}>运营线路{activeKey === 'tab1'},
+ label: {
+ {
+ setRewkeys('xianlu')
+ }
+ }}>运营线路{activeKey === 'tab1'},
},
{
key: 'tab2',
- label: { {
- setRewkeys('cheliang')
- } }}>车辆信息{activeKey === 'tab2'},
+ label: {
+ {
+ setRewkeys('cheliang')
+ }
+ }}>车辆信息{activeKey === 'tab2'},
}
],
@@ -1211,31 +1217,31 @@ const requestcheliang = (name) => {
dataSource={counts || []}
request={async (params) => {
- if(rewkeys=='xianlu'){
+ if (rewkeys == 'xianlu') {
const query = {
- fleet:sitename
+ fleet: sitename
+ }
+ setRowSelected([]);
+ const res = await dispatch(getCircuit(query));
+ setCounts(res.payload.data)
+ return {
+ ...res,
+ total: res.payload.data ? res.payload.data.count : 0
+ }
}
- setRowSelected([]);
- const res = await dispatch(getCircuit(query));
- setCounts(res.payload.data)
- return {
- ...res,
- total: res.payload.data ? res.payload.data.count : 0
- }
- }
- if(rewkeys=='cheliang'){
+ if (rewkeys == 'cheliang') {
const query = {
- fleet:sitename
- }
- setRowSelected([]);
- const res = await dispatch(getVehicle(query));
- setCounts(res.payload.data)
- return {
- ...res,
- total: res.payload.data ? res.payload.data.count : 0
+ fleet: sitename
+ }
+ setRowSelected([]);
+ const res = await dispatch(getVehicle(query));
+ setCounts(res.payload.data)
+ return {
+ ...res,
+ total: res.payload.data ? res.payload.data.count : 0
+ }
}
- }
-
+
}}
search={{
defaultCollapsed: false,
@@ -1252,13 +1258,13 @@ const requestcheliang = (name) => {
>
- {modalVisible ? {
const [whichofits, setWhichofits] = useState('县')
const [delet, setDelet] = useState()
const ref = useRef()
- useEffect(() => { ref.current.reload() }, [ whichofits, delet])
+ useEffect(() => { ref.current.reload() }, [whichofits, delet])
//打开弹窗
const openModal = (type, record) => {
setModalVisible(true);
@@ -42,7 +42,24 @@ const TransporTationTable = (props) => {
setModalRecord(null);
}
}
- // console.log(counts)
+ //删除daolu
+ const deldata = (id) => {
+ const query = {
+ roadId: id
+ }
+ dispatch(delRoadway(query)).then((res) => {
+ setDelet(res)
+ })
+ }
+ //删除工程
+ const deldatas = (id) => {
+ const query = {
+ projectId: id
+ }
+ dispatch(delProject(query)).then((res) => {
+ setDelet(res)
+ })
+ }
//批量导出
const exports = (ids, counts) => {
// console.log(user);
@@ -1170,22 +1187,20 @@ const TransporTationTable = (props) => {
width: 120,
fixed: 'right',
render: (dom, record) => {
+ // node = renderRemoveUser('移除');
return
+ >编辑
+ { deldata(record.id) }}>
+
}
},
@@ -2337,14 +2352,11 @@ const TransporTationTable = (props) => {
setRecortd(record)
}}
- >编辑
+ >编辑
+ { deldata(record.id) }}>
+
+
+
}
},
@@ -3497,15 +3509,10 @@ const TransporTationTable = (props) => {
setRecortd(record)
}}
- >编辑
+ >编辑
+ { deldata(record.id) }}>
+
+
}
},
@@ -3688,16 +3695,11 @@ const TransporTationTable = (props) => {
setTypecard('111')
setRecortd(record)
}}
- >编辑
+ >编辑
+ { deldatas(record.id) }}>
+
+
+
}
},
@@ -3747,19 +3749,19 @@ const TransporTationTable = (props) => {
{
key: 'tab1',
label: {
- setWhichofits('xian')
+ setWhichofits('县')
}}>县道{activeKey === 'tab1'},
},
{
key: 'tab2',
label: {
- setWhichofits('xiang')
+ setWhichofits('乡')
}}>乡道{activeKey === 'tab2'},
},
{
key: 'tab3',
label: {
- setWhichofits('cun')
+ setWhichofits('村')
}}>村道{activeKey === 'tab3'},
}, {
key: 'tab4',
@@ -3875,6 +3877,7 @@ const TransporTationTable = (props) => {
rewkeys={'road'}
recortd={recortd}
setRecortd={setRecortd}
+ setDelet={setDelet}
/> : ''}
)
diff --git a/web/client/src/sections/organization/components/userModal.js b/web/client/src/sections/organization/components/userModal.js
index 29a91f9f..d229bc7a 100644
--- a/web/client/src/sections/organization/components/userModal.js
+++ b/web/client/src/sections/organization/components/userModal.js
@@ -1,22 +1,25 @@
import React from 'react';
import { connect } from 'react-redux';
-import { Spin, Card, Modal, TreeSelect, message } from 'antd';
+import { Spin } from 'antd';
import ProForm, { ProFormText, ModalForm, ProFormSwitch, ProFormTreeSelect } from '@ant-design/pro-form';
const UserModal = (props) => {
const { visible, modalType, depData, onVisibleChange, onConfirm, editData } = props
- const reg_tel = /^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/;
const onFinish = (values) => {
if (onConfirm) {
onConfirm(values);
}
}
- const mobile = (value) => {
- if (reg_tel.test(value)) {
- return
+
+ const checkName = (rule, value, callback) => {
+ if (value && value.replace(/[^\u4E00-\u9FA5]/g).includes('undefined')) {
+ callback(new Error('请输入中文!'));
+ } else {
+ callback()
}
- return message('请输入姓名')
}
+
+
return (
{
label="姓名"
required
placeholder="请输入姓名"
- rules={[{ required: true, message: '请输入姓名' },{ max: 5, message: '请输入5个字以内的名称' }]}
+ rules={[{ required: true, message: '请输入姓名' },
+ { max: 5, message: '请输入5个字以内的名称' },
+ { validator: checkName }
+ ]}
/>
< ProFormText
name={['contract', 'phone']}
diff --git a/web/client/src/sections/organization/containers/user.js b/web/client/src/sections/organization/containers/user.js
index b32dffc2..634c2c7c 100644
--- a/web/client/src/sections/organization/containers/user.js
+++ b/web/client/src/sections/organization/containers/user.js
@@ -374,7 +374,6 @@ const UserManage = (props) => {
function mapStateToProps(state) {
const { depMessage, depUser, global } = state;
- console.log('depMessage:', depMessage);
// console.log(state);
return {
clientHeight: global.clientHeight,
diff --git a/web/client/src/sections/quanju/containers/footer/conserve/index.js b/web/client/src/sections/quanju/containers/footer/conserve/index.js
index 7a141fe5..8d6328c1 100644
--- a/web/client/src/sections/quanju/containers/footer/conserve/index.js
+++ b/web/client/src/sections/quanju/containers/footer/conserve/index.js
@@ -19,25 +19,24 @@ const Conserve = (props) => {
setLoading(false)
setRoadData(res.payload.data || {})
})
- dispatch(getHighways()).then(res =>{
+ dispatch(getHighways()).then(res => {
setHighwaysData(res.payload.data || [])
})
- dispatch(getRoadMaintenances()).then(res =>{
+ dispatch(getRoadMaintenances()).then(res => {
setRoadMaintenances(res.payload.data || [])
})
}, [])
return (
-
-
)
}
function mapStateToProps(state) {
-
// const { auth } = state;
return {
diff --git a/web/client/src/sections/quanju/containers/footer/conserve/left/left-bottom.js b/web/client/src/sections/quanju/containers/footer/conserve/left/left-bottom.js
index 73b69818..29d39de1 100644
--- a/web/client/src/sections/quanju/containers/footer/conserve/left/left-bottom.js
+++ b/web/client/src/sections/quanju/containers/footer/conserve/left/left-bottom.js
@@ -37,7 +37,7 @@ const LeftBottom = (props) => {
total={totalData?.toFixed(3) || 0}
colorList={colorList}
textLeft={'20%'}
- numLeft={'16%'}
+ numLeft={'14.5%'}
underColorList={underColorList}
/>
diff --git a/web/client/src/sections/quanju/containers/footer/conserve/right/right-bottom.js b/web/client/src/sections/quanju/containers/footer/conserve/right/right-bottom.js
index f3f15c41..44f52f73 100644
--- a/web/client/src/sections/quanju/containers/footer/conserve/right/right-bottom.js
+++ b/web/client/src/sections/quanju/containers/footer/conserve/right/right-bottom.js
@@ -62,7 +62,7 @@ const RightBottom = (props) => {
height='100%'
text='养护总数'
textLeft={'21%'}
- numLeft={'23%'}
+ numLeft={'22%'}
total={totalData || 0}
colorList={colorList}
underColorList={underColorList}
diff --git a/web/client/src/sections/quanju/containers/footer/operation/left.js b/web/client/src/sections/quanju/containers/footer/operation/left.js
index 7e7e9f81..2966deaf 100644
--- a/web/client/src/sections/quanju/containers/footer/operation/left.js
+++ b/web/client/src/sections/quanju/containers/footer/operation/left.js
@@ -6,6 +6,7 @@ import { getBusTierList } from '../../../actions/example'
import './style.less'
+
const Left = (props) => {
const [treeData, setTreeData] = useState([])
const [treeDataList, setTreeDataList] = useState([])
@@ -39,9 +40,10 @@ const Left = (props) => {
};
const loop = (treeData) =>
treeData.map((item) => {
- const index = item.title.indexOf(searchValue);
- const beforeStr = item.title.substr(0, index);
- const afterStr = item.title.substr(index + searchValue.length);
+ // console.log(item,'===> item -----');
+ const index = item.title != null && item.title.indexOf(searchValue);
+ const beforeStr = item.title != null && item.title.substr(0, index);
+ const afterStr = item.title != null && item.title.substr(index + searchValue.length);
const title =
index > -1 ? (
@@ -75,47 +77,52 @@ const Left = (props) => {
let busTierList = []
let busTierOpen = []
let dataList = []
-
- busTier && busTier.data && busTier.data.forEach((e, index) => {
- if (index == 0) {
- busTierOpen.push(e.name)
- }
- busTierList.push({
- key: e.name,
- title: e.name,
- children: e.child.map(s => {
- return {
- key: s.name,
- title: s.name,
- children: s.child.map(i => {
- return {
- key: i.vehicleLicensePlateNumber,
- title: i.vehicleLicensePlateNumber,
- }
- })
- }
+ let busTierNewList = []
+ if (busTier && busTier.data && busTier.data.length > 0) {
+ busTierNewList.push(busTier && busTier.data && busTier.data[0])
+ }
+ if (busTierNewList.length > 0) {
+ busTierNewList.forEach((e, index) => {
+ if (index == 0) {
+ busTierOpen.push(e.name)
+ }
+ busTierList.push({
+ key: e.name,
+ title: e.name,
+ children: e.child.map(s => {
+ return {
+ key: s.name,
+ title: s.name,
+ children: s.child.map(i => {
+ return {
+ key: i.name,
+ title: i.name,
+ children: i.child.map(x => {
+ return {
+ key: x.name,
+ title: x.name,
+ }
+ })
+ }
+ })
+ }
+ })
})
})
- })
- busTier && busTier.data && busTier.data.forEach(e => {
- dataList.push({
- key: e.name,
- title: e.name,
- })
- e.child.forEach(i => {
- dataList.push({
- key: i.name,
- title: i.name,
- })
- i.child.forEach(s => {
- dataList.push({
- key: s.vehicleLicensePlateNumber,
- title: s.vehicleLicensePlateNumber,
+ busTierNewList.forEach(e => {
+ e.child.forEach(i => {
+ i.child.forEach(s => {
+ s.child.forEach(x => {
+ dataList.push({
+ key: x.name,
+ title: x.name
+ })
+ })
})
})
})
- })
+ }
setTreeData(busTierList)
setExpandedKeys(busTierOpen)
setTreeDataList(dataList)
diff --git a/web/config.js b/web/config.js
index 436708a8..20df1b7f 100644
--- a/web/config.js
+++ b/web/config.js
@@ -16,9 +16,11 @@ dev && console.log('\x1B[33m%s\x1b[0m', '请遵循并及时更新 readme.md,
args.option(['p', 'port'], '启动端口');
args.option(['u', 'api-url'], 'webapi的URL');
args.option(['r', 'report-node'], '报表进程地址');
+args.option(['r', 'report-node'], '报表进程地址');
const flags = args.parse(process.argv);
const FS_UNIAPP_API = process.env.FS_UNIAPP_API || flags.apiUrl;
+const QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURC || flags.qndmn;
if (!FS_UNIAPP_API) {
console.log('缺少启动参数,异常退出');
@@ -35,6 +37,12 @@ const product = {
host: FS_UNIAPP_API,
match: /^\/_api\//,
}
+ }, {
+ entry: require('./middlewares/proxy').entry,
+ opts: {
+ host: QINIU_DOMAIN_QNDMN_RESOURCE,
+ match: /^\/_file-server\//,
+ }
}, {
entry: require('./middlewares/proxy').entry,
opts: {