Browse Source

后台桥梁道路接入数据

release_0.0.1
xingyongchun 3 years ago
parent
commit
70033810a3
  1. 25
      web/client/assets/color.less
  2. 33
      web/client/src/sections/fillion/actions/infor.js
  3. 2021
      web/client/src/sections/fillion/components/bridgeTable.js
  4. 1470
      web/client/src/sections/fillion/components/highwaysTable.js
  5. 173
      web/client/src/sections/fillion/components/infor/details.js
  6. 1880
      web/client/src/sections/fillion/components/transportationTable.js
  7. 10
      web/client/src/utils/webapi.js
  8. 1341
      web/log/development.txt
  9. 2
      web/package-lock.json
  10. 3
      web/package.json

25
web/client/assets/color.less

@ -1128,10 +1128,17 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
.ant-mentions-dropdown-menu-item-active {background-color: @item-hover-bg;} .ant-mentions-dropdown-menu-item-active {background-color: @item-hover-bg;}
.ant-menu-item-danger.ant-menu-item {color: #ff4d4f;} .ant-menu-item-danger.ant-menu-item {color: #ff4d4f;}
.ant-menu-item-danger.ant-menu-item:hover, .ant-menu-item-danger.ant-menu-item-active {color: #ff4d4f;} .ant-menu-item-danger.ant-menu-item:hover, .ant-menu-item-danger.ant-menu-item-active {color: #ff4d4f;}
<<<<<<< Updated upstream
.ant-menu-item-danger.ant-menu-item:active {background: #fff1f0;} .ant-menu-item-danger.ant-menu-item:active {background: #fff1f0;}
.ant-menu-item-danger.ant-menu-item-selected {color: #ff4d4f;} .ant-menu-item-danger.ant-menu-item-selected {color: #ff4d4f;}
.ant-menu-item-danger.ant-menu-item-selected > a, .ant-menu-item-danger.ant-menu-item-selected > a:hover {color: #ff4d4f;} .ant-menu-item-danger.ant-menu-item-selected > a, .ant-menu-item-danger.ant-menu-item-selected > a:hover {color: #ff4d4f;}
.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-danger.ant-menu-item-selected {background-color: #fff1f0;} .ant-menu:not(.ant-menu-horizontal) .ant-menu-item-danger.ant-menu-item-selected {background-color: #fff1f0;}
=======
.ant-menu-item-danger.ant-menu-item:active {background: color(~`colorPalette("@{modal-header-border-color-split}", 1)`);}
.ant-menu-item-danger.ant-menu-item-selected {color: #ff4d4f;}
.ant-menu-item-danger.ant-menu-item-selected > a, .ant-menu-item-danger.ant-menu-item-selected > a:hover {color: #ff4d4f;}
.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-danger.ant-menu-item-selected {background-color: color(~`colorPalette("@{modal-header-border-color-split}", 1)`);}
>>>>>>> Stashed changes
.ant-menu-inline .ant-menu-item-danger.ant-menu-item::after {border-right-color: #ff4d4f;} .ant-menu-inline .ant-menu-item-danger.ant-menu-item::after {border-right-color: #ff4d4f;}
.ant-menu-dark .ant-menu-item-danger.ant-menu-item, .ant-menu-dark .ant-menu-item-danger.ant-menu-item:hover, .ant-menu-dark .ant-menu-item-danger.ant-menu-item > a {color: #ff4d4f;} .ant-menu-dark .ant-menu-item-danger.ant-menu-item, .ant-menu-dark .ant-menu-item-danger.ant-menu-item:hover, .ant-menu-dark .ant-menu-item-danger.ant-menu-item > a {color: #ff4d4f;}
.ant-menu-dark.ant-menu-dark:not(.ant-menu-horizontal) .ant-menu-item-danger.ant-menu-item-selected {color: #fff;background-color: #ff4d4f;} .ant-menu-dark.ant-menu-dark:not(.ant-menu-horizontal) .ant-menu-item-danger.ant-menu-item-selected {color: #fff;background-color: #ff4d4f;}
@ -1702,11 +1709,19 @@ tr.ant-table-expanded-row:hover > td {background: @table-expanded-row-bg;}
.ant-tag-checkable:active, .ant-tag-checkable-checked {color: #fff;} .ant-tag-checkable:active, .ant-tag-checkable-checked {color: #fff;}
.ant-tag-checkable-checked {background-color: @primary-color;} .ant-tag-checkable-checked {background-color: @primary-color;}
.ant-tag-checkable:active {background-color: color(~`colorPalette("@{primary-color}", 7)`);} .ant-tag-checkable:active {background-color: color(~`colorPalette("@{primary-color}", 7)`);}
<<<<<<< Updated upstream
.ant-tag-pink {color: #c41d7f;background: #fff0f6;border-color: #ffadd2;} .ant-tag-pink {color: #c41d7f;background: #fff0f6;border-color: #ffadd2;}
.ant-tag-pink-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;} .ant-tag-pink-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;}
.ant-tag-magenta {color: #c41d7f;background: #fff0f6;border-color: #ffadd2;} .ant-tag-magenta {color: #c41d7f;background: #fff0f6;border-color: #ffadd2;}
.ant-tag-magenta-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;} .ant-tag-magenta-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;}
.ant-tag-red {color: #cf1322;background: #fff1f0;border-color: #ffa39e;} .ant-tag-red {color: #cf1322;background: #fff1f0;border-color: #ffa39e;}
=======
.ant-tag-pink {color: #c41d7f;background: color(~`colorPalette("@{success-color-deprecated-bg}", 1)`);border-color: #ffadd2;}
.ant-tag-pink-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;}
.ant-tag-magenta {color: #c41d7f;background: color(~`colorPalette("@{success-color-deprecated-bg}", 1)`);border-color: #ffadd2;}
.ant-tag-magenta-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;}
.ant-tag-red {color: #cf1322;background: color(~`colorPalette("@{modal-header-border-color-split}", 1)`);border-color: #ffa39e;}
>>>>>>> Stashed changes
.ant-tag-red-inverse {color: #fff;background: #f5222d;border-color: #f5222d;} .ant-tag-red-inverse {color: #fff;background: #f5222d;border-color: #f5222d;}
.ant-tag-volcano {color: #d4380d;background: #fff2e8;border-color: #ffbb96;} .ant-tag-volcano {color: #d4380d;background: #fff2e8;border-color: #ffbb96;}
.ant-tag-volcano-inverse {color: #fff;background: #fa541c;border-color: #fa541c;} .ant-tag-volcano-inverse {color: #fff;background: #fa541c;border-color: #fa541c;}
@ -1722,9 +1737,15 @@ tr.ant-table-expanded-row:hover > td {background: @table-expanded-row-bg;}
.ant-tag-lime-inverse {color: #fff;background: #a0d911;border-color: #a0d911;} .ant-tag-lime-inverse {color: #fff;background: #a0d911;border-color: #a0d911;}
.ant-tag-green {color: #389e0d;background: #f6ffed;border-color: #b7eb8f;} .ant-tag-green {color: #389e0d;background: #f6ffed;border-color: #b7eb8f;}
.ant-tag-green-inverse {color: #fff;background: #52c41a;border-color: #52c41a;} .ant-tag-green-inverse {color: #fff;background: #52c41a;border-color: #52c41a;}
<<<<<<< Updated upstream
.ant-tag-blue {color: #096dd9;background: color(~`colorPalette("@{pagination-item-input-bg}", 1)`);border-color: #91d5ff;} .ant-tag-blue {color: #096dd9;background: color(~`colorPalette("@{pagination-item-input-bg}", 1)`);border-color: #91d5ff;}
.ant-tag-blue-inverse {color: #fff;background: #1890ff;border-color: #1890ff;} .ant-tag-blue-inverse {color: #fff;background: #1890ff;border-color: #1890ff;}
.ant-tag-geekblue {color: #1d39c4;background: color(~`colorPalette("@{avatar-bg}", 4)`);border-color: #adc6ff;} .ant-tag-geekblue {color: #1d39c4;background: color(~`colorPalette("@{avatar-bg}", 4)`);border-color: #adc6ff;}
=======
.ant-tag-blue {color: #096dd9;background: #e6f7ff;border-color: color(~`colorPalette("@{alert-info-border-color}", 5)`);}
.ant-tag-blue-inverse {color: #fff;background: #1890ff;border-color: #1890ff;}
.ant-tag-geekblue {color: #1d39c4;background: color(~`colorPalette("@{tree-bg}", 1)`);border-color: #adc6ff;}
>>>>>>> Stashed changes
.ant-tag-geekblue-inverse {color: #fff;background: #2f54eb;border-color: #2f54eb;} .ant-tag-geekblue-inverse {color: #fff;background: #2f54eb;border-color: #2f54eb;}
.ant-tag-purple {color: #531dab;background: color(~`colorPalette("@{calendar-bg}", 1)`);border-color: #d3adf7;} .ant-tag-purple {color: #531dab;background: color(~`colorPalette("@{calendar-bg}", 1)`);border-color: #d3adf7;}
.ant-tag-purple-inverse {color: #fff;background: #722ed1;border-color: #722ed1;} .ant-tag-purple-inverse {color: #fff;background: #722ed1;border-color: #722ed1;}
@ -1963,7 +1984,11 @@ a.ant-typography.ant-typography-disabled:hover, .ant-typography a.ant-typography
.ant-upload-list-picture .ant-upload-list-item-error, .ant-upload-list-picture-card .ant-upload-list-item-error {border-color: #ff4d4f;} .ant-upload-list-picture .ant-upload-list-item-error, .ant-upload-list-picture-card .ant-upload-list-item-error {border-color: #ff4d4f;}
.ant-upload-list-picture .ant-upload-list-item:hover .ant-upload-list-item-info, .ant-upload-list-picture-card .ant-upload-list-item:hover .ant-upload-list-item-info {background: transparent;} .ant-upload-list-picture .ant-upload-list-item:hover .ant-upload-list-item-info, .ant-upload-list-picture-card .ant-upload-list-item:hover .ant-upload-list-item-info {background: transparent;}
.ant-upload-list-picture .ant-upload-list-item-uploading, .ant-upload-list-picture-card .ant-upload-list-item-uploading {border-style: dashed;} .ant-upload-list-picture .ant-upload-list-item-uploading, .ant-upload-list-picture-card .ant-upload-list-item-uploading {border-style: dashed;}
<<<<<<< Updated upstream
.ant-upload-list-picture .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='color(~`colorPalette("@{pagination-item-input-bg}", 1)`)'], .ant-upload-list-picture-card .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='color(~`colorPalette("@{pagination-item-input-bg}", 1)`)'] {fill: @error-color-deprecated-bg;} .ant-upload-list-picture .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='color(~`colorPalette("@{pagination-item-input-bg}", 1)`)'], .ant-upload-list-picture-card .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='color(~`colorPalette("@{pagination-item-input-bg}", 1)`)'] {fill: @error-color-deprecated-bg;}
=======
.ant-upload-list-picture .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#e6f7ff'], .ant-upload-list-picture-card .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#e6f7ff'] {fill: @error-color-deprecated-bg;}
>>>>>>> Stashed changes
.ant-upload-list-picture .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#1890ff'], .ant-upload-list-picture-card .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#1890ff'] {fill: #ff4d4f;} .ant-upload-list-picture .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#1890ff'], .ant-upload-list-picture-card .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#1890ff'] {fill: #ff4d4f;}
.ant-upload-list-picture-card .ant-upload-list-item-info::before {background-color: rgba(0, 0, 0, 0.5);} .ant-upload-list-picture-card .ant-upload-list-item-info::before {background-color: rgba(0, 0, 0, 0.5);}
.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-eye, .ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-download, .ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-delete {color: rgba(255, 255, 255, 0.85);} .ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-eye, .ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-download, .ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-delete {color: rgba(255, 255, 255, 0.85);}

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

@ -67,6 +67,17 @@ export function getRoadway(query) {
// reducer: { name: 'reportstatistic' } // reducer: { name: 'reportstatistic' }
}); });
} }
export function putRoadway(query) {
return dispatch => basicAction({
type: 'put',
dispatch: dispatch,
data: query,
actionType: 'PUT_ROADWAY',
url: ApiTable.putRoadway,
msg: { error: '编辑道路信息失败' },
// reducer: { name: 'reportstatistic' }
});
}
export function getBridge(query) { export function getBridge(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'get', type: 'get',
@ -78,6 +89,17 @@ export function getBridge(query) {
// reducer: { name: 'reportstatistic' } // reducer: { name: 'reportstatistic' }
}); });
} }
export function putBridge(query) {
return dispatch => basicAction({
type: 'put',
dispatch: dispatch,
data: query,
actionType: 'PUT_BRIDGE',
url: ApiTable.putBridge,
msg: { error: '编辑桥梁信息失败' },
// reducer: { name: 'reportstatistic' }
});
}
export function getProject(query) { export function getProject(query) {
return dispatch => basicAction({ return dispatch => basicAction({
type: 'get', type: 'get',
@ -89,3 +111,14 @@ export function getProject(query) {
// reducer: { name: 'reportstatistic' } // reducer: { name: 'reportstatistic' }
}); });
} }
export function putProject(query) {
return dispatch => basicAction({
type: 'put',
dispatch: dispatch,
data: query,
actionType: 'GET_PROJECT',
url: ApiTable.putProject,
msg: { error: '编辑工程信息失败' },
// reducer: { name: 'reportstatistic' }
});
}

2021
web/client/src/sections/fillion/components/bridgeTable.js

File diff suppressed because it is too large

1470
web/client/src/sections/fillion/components/highwaysTable.js

File diff suppressed because it is too large

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

@ -1,44 +1,159 @@
import React from 'react'; import React, { useEffect, useState } from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { Spin, Table } from 'antd'; import { Form, Spin, Table } from 'antd';
import { DrawerForm, ProForm, ProFormText } from '@ant-design/pro-form'; import { DrawerForm, ProForm, ProFormText } from '@ant-design/pro-form';
import moment from 'moment'; import { putRoadway } from "../../actions/infor"
import { putBridge } from "../../actions/infor"
const UserModal = (props) => { const UserModal = (props) => {
const { visible, onVisibleChange,typecard } = props const { visible, onVisibleChange, typecard, rewkeys, data, recortd, sitename, dispatch, date, setRecortd,engineering } = props
console.log(typecard) const [newlys, setNewlys] = useState() //必填数据
const [newlysay, setNewlysay] = useState() //处理hou
const [records, setRecords] = useState()//处理
const [recordsay, setRecordsay] = useState()//必填数据
const [success, setSuccess] = useState() //状态
useEffect(() => {
const array = []
if (rewkeys === 'transportation') {
const xindata=[...data]
setNewlys(xindata?.splice(0, 2))
setNewlysay(xindata)
} if (rewkeys === 'bridge') {
_.forIn(data, function (value, key) {
array.push({ name: value, type: key })
});
setNewlys(array?.splice(0, 2))
setNewlysay(array)
console.log(array)
}
}, [])
useEffect(() => {
const arr = []
if (rewkeys === 'transportation') {
_.forIn(recortd, function (value, key) {
arr.push({ value: value, type: key })
});
setRecordsay(arr.splice(1, 2))
setRecords(arr)
}
if (rewkeys === 'bridge') {
_.forIn(recortd, function (value, key) {
arr.push({ value: value, type: key })
});
setRecordsay(arr.splice(1, 2))
setRecords(arr)
}
}, [recortd])
useEffect(() => {
return () => {
setRecortd()
}
}, [])
// console.log(recortd)
return ( return (
<Spin spinning={false}> <Spin spinning={false}>
{/* {
newlysay ? */}
<DrawerForm <DrawerForm
width={'90rem'} width={'90rem'}
visible={visible} visible={visible}
onVisibleChange={onVisibleChange} onVisibleChange={onVisibleChange}
// submitter={false} onFinish={(values) => {
if (rewkeys === 'transportation') {
if (typecard == '111') {
console.log(values)
const query = { ...values, level: sitename, roadId: records?.[0]?.value || '' }
dispatch(putRoadway(query)).then((res) => {
setSuccess(res.success)
})
return success
} else {
const query = { ...values, level: sitename }
dispatch(putRoadway(query)).then((res) => {
setSuccess(res.success)
})
return success
}
}
if (rewkeys === 'bridge') {
if (typecard == '111') {
console.log(values)
const query = { ...values, roadId: records?.[0]?.value || '' }
dispatch(putBridge(query)).then((res) => {
setSuccess(res.success)
})
return success
} else {
const query = { ...values }
dispatch(putBridge(query)).then((res) => {
setSuccess(res.success)
})
return success
}
}
}}
initialValues={recortd}
> >
{typecard==111?<ProForm.Group> {typecard == '111' ?
<ProFormText <ProForm.Group
name="name" >
width="md" <ProFormText
label="签约客户名称" name={newlys?.[0]?.type}
tooltip="最长为 24 位" width="md"
placeholder="请输入名称" label={newlys?.[0]?.name}
value="wowowo" tooltip="最长为 24 位"
rules={[{ required: true, message: "必填" }]} placeholder="请输入名称"
/> value={recordsay?.[0]?.value}
<ProFormText width="md" name="company" label="我方公司名称" placeholder="请输入名称" /> rules={[{ required: true, message: "必填" }]}
</ProForm.Group> /><ProFormText
:<ProForm.Group> name={newlys?.[1]?.type}
<ProFormText width="md"
name="name" label={newlys?.[1]?.name}
width="md" tooltip="最长为 24 位"
label="签约客户名称" placeholder="请输入名称"
tooltip="最长为 24 位" value={recordsay?.[1]?.value}
placeholder="请输入名称" rules={[{ required: true, message: "必填" }]}
rules={[{ required: true, message: "必填" }]} />
/>
<ProFormText width="md" name="company" label="我方公司名称" placeholder="请输入名称" /> {newlysay?.map((item, index) => {
</ProForm.Group>} return <ProFormText width="md"
name={item?.type} label={newlysay[index]?.name} placeholder="请输入名称"
key={index}
/>
})}
</ProForm.Group>
: <ProForm.Group>
<ProFormText
name={newlys?.[0]?.type}
width="md"
label={newlys?.[0]?.name}
tooltip="最长为 24 位"
placeholder="请输入名称"
// value={recordssy?.[0]?.value}
rules={[{ required: true, message: "必填" }]}
/><ProFormText
name={newlys?.[1]?.type}
width="md"
label={newlys?.[1]?.name}
tooltip="最长为 24 位"
placeholder="请输入名称"
// value={recordssy?.[1]?.value}
rules={[{ required: true, message: "必填" }]}
/>
{newlysay?.map((item, index) => {
return <ProFormText width="md"
name={item?.type} label={newlysay[index]?.name} placeholder="请输入名称" key={index}
tooltip="最长为 24 位"
/>
})}
</ProForm.Group>}
</DrawerForm> </DrawerForm>
{/* : ''
} */}
</Spin> </Spin>
) )
} }

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

File diff suppressed because it is too large

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

@ -45,10 +45,12 @@ export const ApiTable = {
getSpecificVehicle: 'vehicle/specific', getSpecificVehicle: 'vehicle/specific',
getHouseholds: 'vehicle/business', getHouseholds: 'vehicle/business',
getRoadway: 'road', getRoadway: 'road',
//桥梁管理 //桥梁管理
getBridge: 'bridge', getBridge:'bridge',
//工程数据 putBridge:'bridge',
getProject: 'project', //工程数据
getProject:'project',
putProject:'project',
//道路统计 //道路统计
getBgroadstatistics: "build/road_state", getBgroadstatistics: "build/road_state",

1341
web/log/development.txt

File diff suppressed because it is too large

2
web/package-lock.json

@ -7585,7 +7585,7 @@
"lodash": { "lodash": {
"version": "4.17.21", "version": "4.17.21",
"resolved": "http://npm.anxinyun.cn/lodash/-/lodash-4.17.21.tgz", "resolved": "http://npm.anxinyun.cn/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha1-Z5WRxWTDv/quhFTPCz3zcMPWkRw=" "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
}, },
"lodash-es": { "lodash-es": {
"version": "4.17.21", "version": "4.17.21",

3
web/package.json

@ -6,7 +6,7 @@
"scripts": { "scripts": {
"test": "mocha", "test": "mocha",
"start": "cross-env NODE_ENV=development npm run start-params", "start": "cross-env NODE_ENV=development npm run start-params",
"start-params": "npm run color && node server -p 5000 -u https://3024-117-90-36-177.jp.ngrok.io", "start-params": "npm run color && node server -p 5000 -u http://10.8.30.7:14000",
"deploy": "export NODE_ENV=production&&npm run color && npm run build && node server", "deploy": "export NODE_ENV=production&&npm run color && npm run build && node server",
"build-dev": "export NODE_ENV=development&&webpack --config webpack.config.js", "build-dev": "export NODE_ENV=development&&webpack --config webpack.config.js",
"build": "export NODE_ENV=production&&webpack --config webpack.config.prod.js", "build": "export NODE_ENV=production&&webpack --config webpack.config.prod.js",
@ -82,6 +82,7 @@
"koa-convert": "^2.0.0", "koa-convert": "^2.0.0",
"koa-proxy": "^1.0.0-alpha.3", "koa-proxy": "^1.0.0-alpha.3",
"koa-view": "^2.1.4", "koa-view": "^2.1.4",
"lodash": "^4.17.21",
"mini-dynamic-antd-theme": "^0.5.3", "mini-dynamic-antd-theme": "^0.5.3",
"moment": "^2.22.0", "moment": "^2.22.0",
"react-color": "^2.19.3", "react-color": "^2.19.3",

Loading…
Cancel
Save