Browse Source

道路数据录入

release_0.0.1
巴林闲侠 3 years ago
parent
commit
575c6f0ce6
  1. 15
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/actions/example.js
  2. 7
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/actions/index.js
  3. 53
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/example.js
  4. 8
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/build/index.js
  5. 0
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/build/left.js
  6. 0
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/build/right.js
  7. 8
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/conserve/index.js
  8. 8
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/guanli/index.js
  9. 29
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/index.js
  10. 17
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/centerLeft.js
  11. 19
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/centerRight.js
  12. 14
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/centerRight/center-right-bottom.js
  13. 14
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/centerRight/center-right-center.js
  14. 14
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/centerRight/center-right-centertop.js
  15. 15
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/centerRight/center-right-top.js
  16. 14
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/centerleft/center-left-bottom.js
  17. 16
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/centerleft/center-left-center.js
  18. 14
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/centerleft/center-left-centertop.js
  19. 15
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/centerleft/center-left-top.js
  20. 18
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/index.js
  21. 17
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/left.js
  22. 14
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/left/left-bottom.js
  23. 14
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/left/left-center.js
  24. 14
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/left/left-top.js
  25. 16
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/right.js
  26. 14
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/right/right-bottom.js
  27. 9
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/right/right-center.js
  28. 13
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/right/right-top.js
  29. 8
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/operation/index.js
  30. 40
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/heand/index.js
  31. 23
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/heand/style.less
  32. 6
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/index.js
  33. 4
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/public/font.css
  34. 22
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/public/module.js
  35. 15
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/index.js
  36. 16
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/nav-item.js
  37. 5
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/reducers/index.js
  38. 21
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/routes.js
  39. 3
      scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/style.less
  40. 61
      scripts/0.0.1/data/工具脚本(无需执行)/dataIn.js
  41. 8
      scripts/0.0.1/data/工具脚本(无需执行)/index.js
  42. 4
      scripts/0.0.1/data/工具脚本(无需执行)/道路_数据脚本对应.sql

15
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/actions/example.js

@ -1,15 +0,0 @@
'use strict';
import { basicAction } from '@peace/utils'
import { ApiTable } from '$utils'
export function getMembers(orgId) {
return dispatch => basicAction({
type: 'get',
dispatch: dispatch,
actionType: 'GET_MEMBERS',
url: `${ApiTable.getEnterprisesMembers.replace('{enterpriseId}', orgId)}`,
msg: { error: '获取用户列表失败' },
reducer: { name: 'members' }
});
}

7
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/actions/index.js

@ -1,7 +0,0 @@
'use strict';
import * as example from './example'
export default {
...example
}

53
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/example.js

@ -1,53 +0,0 @@
import React, { useEffect, useState } from 'react';
import { connect } from 'react-redux';
import { Spin, Card } from 'antd';
import Build from './footer/build'
import '../style.less';
import Header from './heand';
import Footer from './footer';
import ProTable, { TableDropdown } from '@ant-design/pro-table';
const Example = (props) => {
const { dispatch, actions, user, loading } = props
const [tabKey, setTabKey] = useState('leadership')
useEffect(() => {
dispatch(actions.example.getMembers(user.orgId))
}, [])
const tabChange = (tab) => {
//leader 领导驾驶舱 site 工地 toilet 公厕 light 照明 water水质 encomic经济 environment 生态环境 security 智慧安监
// setCurrentTab(tab);
setTabKey(tab)
// dispatch({ type: 'TAB-CHANGE', data: tab })
}
return (
<Spin tip="biubiubiu~" spinning={loading}>
<div id='example2' style={{
backgroundColor: "#031839", width: "100vw", height: "100vh", /* transform: `scale(${Math.min(
document.body.clientWidth / 1920,
document.body.clientHeight / 1080
)})`, */
}}>
<div style={{ width: "100%", height: "10%" }}>
<Header tabChange={tabChange} tabKey={tabKey} dispatch={dispatch} />
</div>
<div style={{ width: "100%", height: "90%" }}>
<Footer tabKey={tabKey} />
</div>
</div>
</Spin>
)
}
function mapStateToProps(state) {
const { auth, global, members } = state;
return {
loading: members.isRequesting,
user: auth.user,
actions: global.actions,
members: members.data
};
}
export default connect(mapStateToProps)(Example);

8
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/build/index.js

@ -1,8 +0,0 @@
import React from 'react'
const Build = () => {
return (
<>Build</>
)
}
export default Build

0
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/build/left.js

0
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/build/right.js

8
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/conserve/index.js

@ -1,8 +0,0 @@
import React from 'react'
const Conserve = () => {
return (
<>1212121</>
)
}
export default Conserve

8
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/guanli/index.js

@ -1,8 +0,0 @@
import React from 'react'
const Guanli = () => {
return (
<>管理</>
)
}
export default Guanli

29
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/index.js

@ -1,29 +0,0 @@
import React from 'react'
import Build from './build'
import Conserve from './conserve'
import Guanli from './guanli'
import Leadership from './leadership'
import Operation from './operation'
const Footer = ({ tabKey }) => {
return (
<>
{
(() => {
switch (tabKey) {
case 'build':
return <Build />
case 'conserve':
return <Conserve />
case "leadership":
return <Leadership />
case "guanli":
return <Guanli />
case "operation":
return <Operation />
}
})()
}
</>
)
}
export default Footer

17
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/centerLeft.js

@ -1,17 +0,0 @@
import React from 'react'
import Centerlefttop from "./centerleft/center-left-top"
import Centerleftcenter from "./centerleft/center-left-center"
import Centerleftcentertop from "./centerleft/center-left-centertop"
import Centerleftbottom from "./centerleft/center-left-bottom"
const CenterLeft = () => {
return (
<>
<div style={{ width: "23%", height: "100%", float: "left", marginLeft: "1%" }}>
<Centerlefttop />
<Centerleftbottom />
</div>
</>
)
}
export default CenterLeft

19
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/centerRight.js

@ -1,19 +0,0 @@
import React from 'react'
import Centerrighttop from "./centerRight/center-right-top"
import Centerrightcenter from "./centerRight/center-right-center"
import CenterRightcentertop from "./centerRight/center-right-centertop"
import Centerrightbottom from "./centerRight/center-right-bottom"
const CenterLeft = () => {
return (
<>
<div style={{ width: "23%", height: "100%", float: "right", marginRight: "1%" }}>
<Centerrighttop />
<CenterRightcentertop />
<Centerrightcenter />
<Centerrightbottom />
</div>
</>
)
}
export default CenterLeft

14
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/centerRight/center-right-bottom.js

@ -1,14 +0,0 @@
import React from 'react'
import Module from '../../../public/module'
const Rightbottom = () => {
const style = { height: "33%" }
return (
<>
<Module style={style}>
<div style={{ width: "40%", height: "40%", background: "red" }}></div>
</Module>
</>
)
}
export default Rightbottom

14
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/centerRight/center-right-center.js

@ -1,14 +0,0 @@
import React from 'react'
import Module from '../../../public/module'
const Rightcenter = () => {
const style = { height: "17%" }
return (
<>
<Module style={style}>
<div style={{ width: "40%", height: "40%", background: "red" }}></div>
</Module>
</>
)
}
export default Rightcenter

14
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/centerRight/center-right-centertop.js

@ -1,14 +0,0 @@
import React from 'react'
import Module from '../../../public/module'
const Rightcentertop = () => {
const style = { height: "23%" }
return (
<>
<Module style={style}>
<div style={{ width: "40%", height: "40%", background: "red" }}></div>
</Module>
</>
)
}
export default Rightcentertop

15
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/centerRight/center-right-top.js

@ -1,15 +0,0 @@
import React from 'react'
import Module from '../../../public/module'
const Righttop = (props) => {
const { } = props
const style = { height: "17%" }
return (
<>
<Module style={style}>
<div style={{ width: "40%", height: "40%", background: "red" }}></div>
</Module>
</>
)
}
export default Righttop

14
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/centerleft/center-left-bottom.js

@ -1,14 +0,0 @@
import React from 'react'
import Module from '../../../public/module'
const Leftbottom = () => {
const style = { height: "23%", marginTop: "5%" }
return (
<>
<Module style={style}>
<div style={{ width: "40%", height: "40%", background: "red" }}></div>
</Module>
</>
)
}
export default Leftbottom

16
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/centerleft/center-left-center.js

@ -1,16 +0,0 @@
import React from 'react'
import Module from '../../../public/module'
const Leftcenter = () => {
const style = {
height: "23%"
}
return (
<>
<Module style={style}>
<div style={{ width: "40%", height: "40%", background: "red" }}></div>
</Module>
</>
)
}
export default Leftcenter

14
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/centerleft/center-left-centertop.js

@ -1,14 +0,0 @@
import React from 'react'
import Module from '../../../public/module'
const Leftcentertop = () => {
const style = { height: "23%" }
return (
<>
<Module style={style}>
<div style={{ width: "40%", height: "40%", background: "red" }}></div>
</Module>
</>
)
}
export default Leftcentertop

15
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/centerleft/center-left-top.js

@ -1,15 +0,0 @@
import React from 'react'
import Module from '../../../public/module'
const Lefttop = (props) => {
const { } = props
const style = { height: "23%" }
return (
<>
<Module style={style}>
<div style={{ width: "40%", height: "40%", background: "red" }}></div>
</Module>
</>
)
}
export default Lefttop

18
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/index.js

@ -1,18 +0,0 @@
import React from 'react'
import Left from './left'
import Right from './right'
import CenterLeft from "./centerLeft"
import Centerright from "./centerRight"
const Leadership = () => {
return (
<>
<Left />
<CenterLeft />
<Right />
{/* <Centerright /> */}
</>
)
}
export default Leadership

17
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/left.js

@ -1,17 +0,0 @@
import React from 'react'
import Lefttop from './left/left-top'
import Leftcenter from "./left/left-center"
import Leftbottom from './left/left-bottom'
const Left = () => {
return (
<>
<div style={{ width: "23%", height: "100%", float: "left" }}>
<Lefttop />
<Leftcenter />
<Leftbottom />
</div>
</>
)
}
export default Left

14
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/left/left-bottom.js

@ -1,14 +0,0 @@
import React from 'react'
import Module from '../../../public/module'
const Leftbottom = () => {
const style = { height: "25%", marginTop: "5%" }
return (
<>
<Module style={style} title={""}>
</Module>
</>
)
}
export default Leftbottom

14
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/left/left-center.js

@ -1,14 +0,0 @@
import React from 'react'
import Module from '../../../public/module'
const Leftcenter = () => {
const style = { height: "30%", marginTop: "5%" }
return (
<>
<Module style={style}>
<div style={{ width: "40%", height: "40%", background: "red" }}></div>
</Module>
</>
)
}
export default Leftcenter

14
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/left/left-top.js

@ -1,14 +0,0 @@
import React from 'react'
import Module from '../../../public/module'
const Lefttop = () => {
const style = { height: "25%" }
return (
<>
<Module style={style} title={"道路拥堵指数"} >
{/* <div style={{ width: "40%", height: "40%", background: "red" }}></div> */}
</Module>
</>
)
}
export default Lefttop

16
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/right.js

@ -1,16 +0,0 @@
import React from 'react'
import Righttop from './right/right-top'
import Rightcenter from './right/right-center'
import Rightbottom from './right/right-bottom'
const Right = () => {
return (
<>
<div style={{ width: "25%", height: "100%", float: "right" }}>
<Righttop />
<Rightbottom />
</div>
</>
)
}
export default Right

14
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/right/right-bottom.js

@ -1,14 +0,0 @@
import React from 'react'
import Module from '../../../public/module'
const Rightbottom = () => {
const style = { height: "45%", marginTop: "5%" }
return (
<>
<Module style={style}>
<div style={{ width: "40%", height: "40%", background: "red" }}></div>
</Module>
</>
)
}
export default Rightbottom

9
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/right/right-center.js

@ -1,9 +0,0 @@
import React from 'react'
const Rightcenter = () => {
return (
<><div style={{ width: /* width || */ "100%", height: /* height || */ "30%" }}>
</div></>
)
}
export default Rightcenter

13
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/leadership/right/right-top.js

@ -1,13 +0,0 @@
import React from 'react'
import Module from '../../../public/module'
const Righttop = () => {
const style = { height: "45%" }
return (
<>
<Module style={style}>
</Module>
</>
)
}
export default Righttop

8
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/footer/operation/index.js

@ -1,8 +0,0 @@
import React from 'react'
const Operation = () => {
return (
<>运营</>
)
}
export default Operation

40
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/heand/index.js

@ -1,40 +0,0 @@
import React, { useState, uesEffect } from 'react'
import { push } from 'react-router-redux';
import "./style.less"
import { Tabs } from 'antd';
const { TabPane } = Tabs;
const Header = (props) => {
const { dispatch, tabChange, tabKey } = props
// const [tab, setTad] = useState("base")
const onClick = (tab) => {
// setTad({ tab })
tabChange(tab)
}
const dianji = () => {
dispatch(push('/fillion/infor'))
}
return (
<div style={{ position: "relative" }}>
<img style={{ width: "100%", position: "absolute" }} src='/assets/images/quanju/beijingtou.png' />
<div className={tabKey == "build" ? "tabKey-map" : "notabKey"} style={{ backgroundImage: "url(/assets/images/quanju/zuobeijing.png)", backgroundSize: "100% 100%" }} onClick={() => {
onClick("build")
}}><a>建设</a></div>
<div className={tabKey == "conserve" ? "tabKey-map" : "notabKey"} style={{ left: "11.5%", backgroundImage: "url(/assets/images/quanju/zuobeijing.png)", backgroundSize: "100% 100%" }} onClick={() => {
onClick("conserve")
}}><a>养护</a></div>
<div className={tabKey == "leadership" ? "tabKey-map" : "notabKey"} style={{ left: "23%", backgroundImage: "url(/assets/images/quanju/zuobeijing.png)", backgroundSize: "100% 100%" }} onClick={() => {
onClick("leadership")
}}><a>领导驾驶舱</a></div>
<div className={tabKey == "guanli" ? "tabKey-map" : "notabKey"} style={{ left: "65%", backgroundImage: "url(/assets/images/quanju/youbeijing.png)", backgroundSize: "100% 100%" }} onClick={() => {
onClick("guanli")
}}><a>管理</a></div>
<div className={tabKey == "operation" ? "tabKey-map" : "notabKey"} style={{ left: "76%", backgroundImage: "url(/assets/images/quanju/youbeijing.png)", backgroundSize: "100% 100%" }} onClick={() => {
onClick("operation")
}}><a>运营</a></div>
<div style={{ color: "red", position: "absolute", left: "92%", top: "15px" }} onClick={() => dianji()}>南昌县运输交通总局</div>
</div>
)
}
export default Header

23
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/heand/style.less

@ -1,23 +0,0 @@
.tabKey-map{
width: 12%;
height: 45px;
text-align: center;
position: absolute;
top: 30px;
a{
color: #c3d4f5;
line-height: 45px;
}
}
.notabKey{
width:12%;
height: 45px;
position: absolute;
top: 30px;
text-align: center;
a{
color: #6593c6;
line-height: 45px;
}
}

6
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/index.js

@ -1,6 +0,0 @@
'use strict';
import Example from './example';
import Build from './footer/build'
export { Example, Build };

4
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/public/font.css

@ -1,4 +0,0 @@
@font-face {
font-family: "YouSheBiaoTiHei";
src: url("/assets/fontziti/YouSheBiaoTiHei-2.ttf") format("truetype");
}

22
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/containers/public/module.js

@ -1,22 +0,0 @@
import React from 'react'
import "./font.css"
const Module = (props) => {
const { style, children, title } = props
return (
<>
<div style={{ width: style?.width || "100%", height: style?.height || "30%", backgroundColor: "#042263", marginTop: style?.marginTop || "0" }}>
<div style={{ width: "100%", height: "40px"/* , backgroundColor: "#fff" */, position: "relative" }}>
{/* <p>{title || []}</p> */}
<img src='/assets/images/quanju/icon.png' style={{ width: "4%", position: "absolute", left: "3%", top: "20%" }} />
<span style={{ position: "absolute", color: "#FFFFFF", fontSize: "24px", fontFamily: "YouSheBiaoTiHei", left: "8%" }}>{title || []}</span>
<img src='/assets/images/quanju/mokuaitou.png' style={{ width: "100%", height: "28px", position: "absolute", top: "12px" }} />
</div>
<div style={{ width: "100%", height: "70%" }}>
{children}
</div>
</div>
</>
)
}
export default Module

15
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/index.js

@ -1,15 +0,0 @@
'use strict';
import reducers from './reducers';
import routes from './routes';
import actions from './actions';
import { getNavItem } from './nav-item';
export default {
key: 'example2',
name: '书写示例',
reducers: reducers,
routes: routes,
actions: actions,
getNavItem: getNavItem
};

16
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/nav-item.js

@ -1,16 +0,0 @@
import React from 'react';
import { Link } from 'react-router-dom';
import { Menu } from 'antd';
import { SettingOutlined } from '@ant-design/icons';
const SubMenu = Menu.SubMenu;
export function getNavItem(user, dispatch) {
return (
<SubMenu key="example2" icon={<SettingOutlined />} title={'举个栗子'}>
<Menu.Item key="e1">
<Link to="/example2/e1">举个棒子2</Link>
</Menu.Item>
</SubMenu>
);
}

5
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/reducers/index.js

@ -1,5 +0,0 @@
'use strict';
export default {
}

21
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/routes.js

@ -1,21 +0,0 @@
'use strict';
import { Example, Build } from './containers';
export default [{
type: 'outer',
route: {
path: '/quanju',
key: 'quanju',
breadcrumb: '栗子222',
exact: false,
component: Example,
// 不设置 component 则面包屑禁止跳转
// childRoutes: [{
// path: '/e2',
// key: 'e2',
// exact: false,
// component: Build,
// breadcrumb: '棒子',
// }]
}
}];

3
scripts/0.0.1/data/工具脚本(无需执行)/data/道路/quanju/style.less

@ -1,3 +0,0 @@
#example:hover {
font-size: larger;
}

61
scripts/0.0.1/data/工具脚本(无需执行)/dataIn.js

@ -9,10 +9,10 @@ try {
// 连接数据库
const pool = new Pool({
user: 'FashionAdmin',
host: '10.8.30.156',
database: 'SmartEmergency',
password: '123456',
user: 'postgres',
host: '10.8.30.32',
database: 'highways4good',
password: '123',
port: 5432,
})
@ -56,11 +56,27 @@ try {
await client.query('BEGIN')
const fileList = [
{
path: './data/道路/乡道第三方.xls',
n: '道路',
tableName: 'road'
},
// {
// path: './data/道路/村道第三方.xls',
// n: '道路',
// tableName: 'road',
// defaultKey: ['level'],
// defaultValue: ['村'],
// },
// {
// path: './data/道路/县道第三方.xls',
// n: '道路',
// tableName: 'road',
// defaultKey: ['level'],
// defaultValue: ['县'],
// },
// {
// path: './data/道路/乡道第三方.xls',
// n: '道路',
// tableName: 'road',
// defaultKey: ['level'],
// defaultValue: ['乡'],
// },
]
for (let f of fileList) {
@ -70,23 +86,28 @@ try {
let firstSheetName = workbook.SheetNames[0];
let worksheet = workbook.Sheets[firstSheetName];
let res = XLSX.utils.sheet_to_json(worksheet);
console.log(res[0]);
const keyMap = require(`./${f.n}_字段对应.json`);
console.log(keyMap);
const keyMap = require(`./${f.n}_数据库表对应.json`);
// console.log(keyMap);
for (let d of res) {
let data = {};
let insertStr = `INSERT INTO "${f.tableName}" (`;
let insertKeys = (f.defaultKey || []).concat([]);
let insertValues = (f.defaultValue || []).concat([]);
for (let k in keyMap) {
let v = d[keyMap[k]];
// 没做判重
let v = d[k];
if (v) {
if (k == 'name') {
v = await getAnswer(v);
}
data[k] = v;
insertKeys.push(keyMap[k]);
insertValues.push(v);
}
}
console.log(data);
await client.query(`INSERT INTO ${f.tableName} SET ?`, data);
insertStr += insertKeys.join(',') + ') VALUES (';
insertStr += insertKeys.map((k, i) => `$${i + 1}`).join(',') + ')';
// console.log(insertStr, insertValues);
console.log(`插入 ${f.tableName}${insertStr}`);
await client.query(insertStr, insertValues);
// break;
}
// break;
}
// await client.query('ROLLBACK')

8
scripts/0.0.1/data/工具脚本(无需执行)/index.js

@ -9,10 +9,10 @@ try {
// 连接数据库
const pool = new Pool({
user: 'FashionAdmin',
host: '10.8.30.156',
database: 'SmartEmergency',
password: '123456',
user: 'postgres',
host: '10.8.30.32',
database: 'highways4good',
password: '123',
port: 5432,
})

4
scripts/0.0.1/data/工具脚本(无需执行)/道路_数据脚本对应.sql

@ -32,8 +32,8 @@ ON column road.Urban_Management_Section_Or_Not is '是否城管路段'; alter TA
ON column road.Management_And_Maintenance_Unit is '管养单位'; alter TABLE road add Road_Administration_Unit varchar(1024); comment
ON column road.Road_Administration_Unit is '路政管理单位'; alter TABLE road add Alimentation varchar(1024); comment
ON column road.Alimentation is '列养情况'; alter TABLE road add Source_Of_Listed_Maintenance_Funds varchar(1024); comment
ON column road.Source_Of_Listed_Maintenance_Funds is '列养资金来源'; alter TABLE road add Curing_Time_ varchar(1024); comment
ON column road.Curing_Time_ is '养护时间'; alter TABLE road add Greening_Mileage varchar(1024); comment
ON column road.Source_Of_Listed_Maintenance_Funds is '列养资金来源'; alter TABLE road add Curing_Time varchar(1024); comment
ON column road.Curing_Time is '养护时间'; alter TABLE road add Greening_Mileage varchar(1024); comment
ON column road.Greening_Mileage is '可绿化里程'; alter TABLE road add Greening_Mileaged varchar(1024); comment
ON column road.Greening_Mileaged is '已绿化里程'; alter TABLE road add Type_Of_Repeated_Road_Section varchar(1024); comment
ON column road.Type_Of_Repeated_Road_Section is '重复道路路段类型'; alter TABLE road add Serial_Number_Of_Repeated_Section varchar(1024); comment

Loading…
Cancel
Save