Browse Source

增加异常上报\道路巡检两个模块 web+小程序 60%

dev
巴林闲侠 2 years ago
parent
commit
46046f7ed6
  1. 1
      .gitignore
  2. 4
      api/.vscode/launch.json
  3. 8
      api/app/lib/controllers/report/index.js
  4. 9
      api/app/lib/models/report.js
  5. 15
      api/log/development.log
  6. 4
      scripts/1.2.1/schema/1update_report.sql
  7. 7
      weapp/project.config.json
  8. 6
      weapp/project.private.config.json
  9. 4
      weapp/src/config.js
  10. 71
      weapp/src/packages/patrol/index.jsx
  11. 44
      weapp/src/packages/patrolView/index.jsx
  12. 2
      weapp/src/packages/patrolView/index.scss
  13. 34
      weapp/src/pages/home/index.jsx
  14. 10
      weapp/src/pages/home/index.scss
  15. 26
      weapp/src/pages/user/index.jsx
  16. 49
      weapp/src/static/img/home/fill-anomaly.svg
  17. 218
      weapp/src/static/img/home/fill-bg.svg
  18. 49
      weapp/src/static/img/home/fill-road.svg
  19. 3
      web/client/src/layout/containers/layout/index.js
  20. 11
      web/client/src/sections/fillion/actions/patrol.js
  21. 99
      web/client/src/sections/fillion/components/patrolTable.js
  22. 11
      web/client/src/sections/fillion/containers/patrol.js
  23. 6
      web/client/src/sections/fillion/nav-item.js
  24. 12
      web/client/src/sections/fillion/routes.js
  25. 258
      web/package-lock.json
  26. 2
      web/package.json

1
.gitignore

@ -142,3 +142,4 @@ dist
web/client/assets/color.less
package-lock.json
development.text
web/package-lock.json

4
api/.vscode/launch.json

@ -13,8 +13,8 @@
"NODE_ENV": "development"
},
"args": [
"-p 14000",
"-f http://localhost:14000",
"-p 13400",
"-f http://localhost:13400",
"-g postgres://postgres:123@10.8.30.32:5432/highways4good",
"--qnak XuDgkao6cL0HidoMAPnA5OB10Mc_Ew08mpIfRJK5",
"--qnsk yewcieZLzKZuDfig0wLZ9if9jKp2P_1jd3CMJPSa",

8
api/app/lib/controllers/report/index.js

@ -9,7 +9,7 @@ async function reportList (ctx) {
where: {
},
attributes: ['id', 'road', 'time', 'projectType', 'roadSectionStart', 'roadSectionEnd', 'reportType', 'content', 'longitude', 'latitude'],
attributes: ['id', 'road', 'time', 'projectType', 'roadSectionStart', 'roadSectionEnd', 'reportType', 'content', 'longitude', 'latitude', 'projectName'],
include: [{
model: models.User,
attributes: ['name']
@ -30,10 +30,16 @@ async function reportList (ctx) {
}
}
if (keyword) {
if (reportType == 'road') {
findOption.where.projectName = {
'$like': `%${keyword}%`
}
} else {
findOption.where.road = {
'$like': `%${keyword}%`
}
}
}
if (userId) {
findOption.where.userId = userId
}

9
api/app/lib/models/report.js

@ -166,6 +166,15 @@ module.exports = dc => {
field: "address",
autoIncrement: false
},
projectName: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "工程名称",
primaryKey: false,
field: "project_name",
autoIncrement: false
},
}, {
tableName: "report",
comment: "",

15
api/log/development.log

@ -11203,3 +11203,18 @@ headers: {}
2022-09-05 15:40:10.680 - debug: [FS-LOGGER] Init.
2022-09-05 15:40:11.273 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-09-05 15:40:11.273 - info: [FS-AUTH] Inject auth and api mv into router.
2023-06-27 15:28:45.497 - debug: [FS-LOGGER] Init.
2023-06-27 15:28:46.411 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2023-06-27 15:28:46.411 - info: [FS-AUTH] Inject auth and api mv into router.
2023-06-27 15:56:55.756 - debug: [FS-LOGGER] Init.
2023-06-27 15:56:56.357 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2023-06-27 15:56:56.358 - info: [FS-AUTH] Inject auth and api mv into router.
2023-06-27 16:32:17.216 - debug: [FS-LOGGER] Init.
2023-06-27 16:32:17.767 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2023-06-27 16:32:17.768 - info: [FS-AUTH] Inject auth and api mv into router.
2023-06-27 18:48:13.296 - debug: [FS-LOGGER] Init.
2023-06-27 18:48:13.664 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2023-06-27 18:48:13.664 - info: [FS-AUTH] Inject auth and api mv into router.
2023-06-27 20:02:06.352 - debug: [FS-LOGGER] Init.
2023-06-27 20:02:06.794 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2023-06-27 20:02:06.795 - info: [FS-AUTH] Inject auth and api mv into router.

4
scripts/1.2.1/schema/1update_report.sql

@ -0,0 +1,4 @@
alter table report
add project_name varchar(512);
alter table report alter column project_type drop not null;

7
weapp/project.config.json

@ -2,7 +2,7 @@
"miniprogramRoot": "dist/",
"projectname": "四好公路",
"description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"appid": "wx3c0c46dcf49a85be",
"appid": "wx79ff58f03d17f24d",
"setting": {
"urlCheck": false,
"es6": false,
@ -14,7 +14,7 @@
"autoAudits": false,
"uglifyFileName": false,
"uploadWithSourceMap": true,
"enhance": true,
"enhance": false,
"showShadowRootInWxmlPanel": true,
"packNpmManually": false,
"packNpmRelationList": [],
@ -29,7 +29,8 @@
},
"disableUseStrict": false,
"useCompilerPlugins": false,
"minifyWXML": true
"minifyWXML": true,
"condition": false
},
"compileType": "miniprogram",
"libVersion": "2.25.1",

6
weapp/project.private.config.json

@ -1,7 +1,9 @@
{
"projectname": "%E5%9B%9B%E5%A5%BD%E5%85%AC%E8%B7%AF",
"setting": {
"compileHotReLoad": true
"compileHotReLoad": true,
"bigPackageSizeSupport": true
},
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html"
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"libVersion": "2.32.2"
}

4
weapp/src/config.js

@ -1,5 +1,5 @@
let DEV = false;
// DEV = true; //使用测试环境
DEV = true; //使用测试环境
const baseConfig = {
errorHandle: false, //是否启用全局异常处理‌‍‍‌‍​‌‌‍​‌‌‌‌‌​‌‌‍‌​‍‌‌‌‌​‍‍‍‍‌​‌‍‍‌‍​‌‌‍​‍‍‍‌‌​‍‌‌‌‌​‍‌‍‌​‍‌‌‌O
@ -8,7 +8,7 @@ const baseConfig = {
};
const development = {
baseUrl: 'http://221.230.55.29:31919',
baseUrl: 'http://10.8.30.112:13400',
// baseUrl: 'https://d763-117-90-37-10.ap.ngrok.io',
// webUrl: 'https://smartwater.anxinyun.cn',
// pcode: 'fce4afe2-5b6a-408a-ab18-a2afa7fa027c',

71
weapp/src/packages/patrol/index.jsx

@ -17,11 +17,16 @@ const Index = () => {
const isSuperAdmin = userInfo && userInfo.username === 'SuperAdmin' ? true : false
const router = useRouter()
const { params: { type } } = router
const { params: { type, kind } } = router
const isView = type === 'view' ? true : false
const isPatrol = kind === 'patrol' ? true : false
const isRoad = kind === 'road' ? true : false
const isAnomaly = kind === 'anomaly' ? true : false
const [reportType, setReportType] = useState('patrol') //
const [projectType, setProjectType] = useState('') //
const [projectName, setProjectName] = useState('') //
const [road, setRoad] = useState('') //
const [roadSectionStart, setRoadSectionStart] = useState('') // Start
const [roadSectionEnd, setRoadSectionEnd] = useState('') // End
@ -84,6 +89,7 @@ const Index = () => {
}
setReportType(data.reportType)
setProjectType(showPrjType || data.projectType)
setProjectName(data.projectName)
setRoad(data.road)
setRoadSectionStart(data.roadSectionStart)
setRoadSectionEnd(data.roadSectionEnd)
@ -163,11 +169,15 @@ const Index = () => {
function report () {
if (!canReport) { return }
if (!projectType || !road) {
if (
(isPatrol && (!projectType || !road))
|| (isAnomaly && !road)
) {
Taro.showToast({ title: '请完善必填信息', icon: 'none' })
return
}
if (prjTypeSelector.indexOf(projectType) === -1) {
if (isPatrol && prjTypeSelector.indexOf(projectType) === -1) {
Taro.showToast({ title: '工程类型错误', icon: 'none' })
return
}
@ -175,10 +185,14 @@ const Index = () => {
Taro.showToast({ title: '内容字数不能超过50', icon: 'none' })
return
}
const reportProjectType = prjType[prjTypeSelector.indexOf(projectType)].value
if (isRoad && !projectName) {
Taro.showToast({ title: '请完善项目名称', icon: 'none' })
return
}
const reportProjectType = prjType[prjTypeSelector.indexOf(projectType)]?.value || ''
let data = {
reportType,
reportType: isPatrol ? reportType : kind,
projectType: reportProjectType,
road,
roadSectionStart,
@ -186,7 +200,8 @@ const Index = () => {
address,
content,
longitude,
latitude
latitude,
projectName,
}
if (reportType === 'patrol') {
data['scenePic'] = sceneImg
@ -276,6 +291,10 @@ const Index = () => {
break;
case 'content':
setContent(value)
break;
case "projectName":
setProjectName(value)
break;
default:
break;
}
@ -385,7 +404,9 @@ const Index = () => {
return (
<View className='patrol'>
{
(!isSuperAdmin || isView) &&
(!isSuperAdmin || isView)
&& !isRoad && !isAnomaly
&&
<View className='report-type'>
<View className='text'>上报类型</View>
<RadioGroup onChange={handleTypeChange}>
@ -408,6 +429,9 @@ const Index = () => {
</RadioGroup>
</View>
}
{
isPatrol ?
<InputPicker
title='工程类型:'
placeholder='请选择工程类型'
@ -415,7 +439,26 @@ const Index = () => {
onInput={setProjectType}
selector={prjTypeSelector}
isView={isView}
/> : ''
}
{
isRoad ?
<View className='address'>
<View className='title'>项目名称</View>
<Input
className='input'
type='text'
placeholder={isView ? '' : '请输入项目名称'}
value={projectName}
onInput={e => handleInput(e, 'projectName')}
disabled={isView}
/>
</View> : ''
}
{
isPatrol || isAnomaly ?
<InputPicker
key={sourceRoadSel} // keyselector
title='所在道路:'
@ -424,8 +467,11 @@ const Index = () => {
onInput={setRoad}
selector={sourceRoadSel}
isView={isView}
/>
/> : ''
}
{
isPatrol || isAnomaly ?
<View className='road-section'>
<View className='title'>所属路段</View>
<Input
@ -467,7 +513,8 @@ const Index = () => {
<Image src={arrowIcon} className='img-r' />
</Picker>
}
</View>
</View> : ''
}
<View className='address'>
<View className='title'>具体位置</View>
@ -490,7 +537,7 @@ const Index = () => {
maxLength={50}
/>
{
reportType === 'patrol' ?
reportType === 'patrol' || isRoad || isAnomaly ?
<View className='patrol-img'>
现场图片
{
@ -577,7 +624,9 @@ const Index = () => {
}
{
isView ?
isSuperAdmin && <AtButton type='primary' className='del-btn' onClick={deleteReport}>删除</AtButton> :
isSuperAdmin &&
<AtButton type='primary' className='del-btn' onClick={deleteReport}>删除</AtButton>
:
<AtButton type='primary' className='sub-btn' onClick={report}>上报</AtButton>
}
</View>

44
weapp/src/packages/patrolView/index.jsx

@ -17,9 +17,13 @@ import conserveActiveIcon from '../../static/img/patrolView/conserve-active.svg'
function Index () {
const userInfo = Taro.getStorageSync('userInfo') || {};
const router = useRouter()
const { params: { filter } } = router
const { params: { filter, kind } } = router
const [isPatrol, setIsPatrol] = useState(true)
const isPatrol = kind === 'patrol' ? true : false
const isRoad = kind === 'road' ? true : false
const isAnomaly = kind === 'anomaly' ? true : false
const [reportType, setReportType] = useState(kind || 'patrol')
const [datePicker, setDatePicker] = useState('')
const [listData, setListData] = useState([])
const [filterText, setFilterText] = useState('')
@ -32,7 +36,7 @@ function Index() {
useEffect(() => {
setPage(0)
setNum(Math.random())
}, [isPatrol, datePicker])
}, [reportType, datePicker])
useEffect(() => {
getList(page == 0 ? true : false)
@ -54,7 +58,7 @@ function Index() {
startTime: datePicker ? datePicker + ' 00:00:00' : '',
endTime: datePicker ? datePicker + ' 23:59:59' : '',
keyword: filterText,
reportType: isPatrol ? 'patrol' : 'conserve',
reportType: reportType,
userId: filter === 'my' ? userInfo.id : '',
}
request.get(getReportList(), data).then(res => {
@ -99,10 +103,6 @@ function Index() {
});
})
const onTypeChange = bool => {
setIsPatrol(bool)
}
const onDateChange = e => {
setDatePicker(e.detail.value);
}
@ -121,23 +121,28 @@ function Index() {
}
const handleDetail = index => {
Taro.navigateTo({ url: `/packages/patrol/index?type=view&id=${listData[index].id}` })
Taro.navigateTo({ url: `/packages/patrol/index?type=view&id=${listData[index].id}&kind=${kind}` })
}
return (
<View>
{
isPatrol ?
<View className='type-box'>
<View className='item' onClick={() => onTypeChange(true)}>
<Image className='type-img' src={isPatrol ? patrolActiveIcon : patrolIcon} />
<View style={{ color: isPatrol ? '#346FC2' : '#999999' }}>巡查</View>
<View className='item' onClick={() => setReportType('patrol')}>
<Image className='type-img' src={reportType == 'patrol' ? patrolActiveIcon : patrolIcon} />
<View style={{ color: reportType == 'patrol' ? '#346FC2' : '#999999' }}>巡查</View>
</View>
<View className='line'></View>
<View className='item' onClick={() => onTypeChange(false)}>
<Image className='type-img' src={isPatrol ? conserveIcon : conserveActiveIcon} />
<View style={{ color: isPatrol ? '#999999' : '#346FC2' }}>养护</View>
<View className='item' onClick={() => setReportType('conserve')}>
<Image className='type-img' src={reportType == 'conserve' ? conserveActiveIcon : conserveIcon} />
<View style={{ color: reportType == 'conserve' ? '#346FC2' : '#999999' }}>养护</View>
</View>
</View>
<View className='filter-box'>
: ""
}
<View className='filter-box' style={{ top: isPatrol ? "40px" : '0' }}>
<View className='filter-item'>
<View style={{ float: 'left', marginLeft: '20rpx', color: '#333' }}>日期</View>
<Picker
@ -154,11 +159,12 @@ function Index() {
</View>
<View class='head-search'>
<Image className='search-img' src={searchIcon} />
<Input class='heard-search-input' value={filterText} placeholder='请输入道路名称' onConfirm={handleConfirm} onInput={handleInput} />
<Input class='heard-search-input' value={filterText} placeholder={
isRoad ? '请输入项目名称' : '请输入道路名称'} onConfirm={handleConfirm} onInput={handleInput} />
</View>
</View>
<View style={{ marginTop: '110px' }}>
<View style={{ marginTop: isPatrol ? '110px' : "80px" }}>
{
listData && listData.length > 0 ? listData && listData.map((e, index) => {
return (
@ -166,7 +172,7 @@ function Index() {
<View className='card-item' >
<Image className='card-bg' src={cardImg} />
<View className='card-position'>
<View className='card-title'>{e.road}</View>
<View className='card-title'>{e.road || e.projectName}</View>
<View style={{ float: 'left', width: '100%', fontSize: '28rpx', marginTop: '16rpx' }}>
<View style={{ float: 'left' }}>填报人</View>
<View style={{ float: 'left' }}>{e.user && e.user.name}</View>

2
weapp/src/packages/patrolView/index.scss

@ -34,7 +34,7 @@ page {
.filter-box {
position: fixed;
top: 80px;
// top: 80px;
display: flex;
width: 100%;
z-index: 100;

34
weapp/src/pages/home/index.jsx

@ -26,14 +26,14 @@ const Index = () => {
}
}, [])
function toPatrol() {
function toPatrol (kind) {
Taro.navigateTo({
url: '/packages/patrol/index?type=edit'
url: `/packages/patrol/index?type=edit&kind=${kind}`
})
}
function toPatrolView() {
function toPatrolView (kind) {
Taro.navigateTo({
url: '/packages/patrolView/index'
url: `/packages/patrolView/index?kind=${kind}`
})
}
@ -47,7 +47,31 @@ const Index = () => {
<View className='page'>
<View className='card fill'>
<View className='title'> </View>
<View className='btn' onClick={isSuperAdmin ? toPatrolView : toPatrol}>
<View className='btn' onClick={
isSuperAdmin ?
() => toPatrolView('patrol')
: () => toPatrol('patrol')
}>
{isSuperAdmin ? '查看' : '填报'}
</View>
</View>
<View className='card fill_road'>
<View className='title'> </View>
<View className='btn' onClick={
isSuperAdmin ?
() => toPatrolView('road')
: () => toPatrol('road')
}>
{isSuperAdmin ? '查看' : '填报'}
</View>
</View>
<View className='card fill_anomaly'>
<View className='title'> </View>
<View className='btn' onClick={
isSuperAdmin ?
() => toPatrolView('anomaly')
: () => toPatrol('anomaly')
}>
{isSuperAdmin ? '查看' : '填报'}
</View>
</View>

10
weapp/src/pages/home/index.scss

@ -7,13 +7,21 @@
margin-top: 30px;
padding: 10px;
width: 94%;
height: 360px;
height: 280px;
}
.fill {
background: url('../../static/img/home/fill-bg.svg') no-repeat;
background-size: 100% 100%;
}
.fill_road {
background: url('../../static/img/home/fill-road.svg') no-repeat;
background-size: 100% 100%;
}
.fill_anomaly {
background: url('../../static/img/home/fill-anomaly.svg') no-repeat;
background-size: 100% 100%;
}
.video {
background: url('../../static/img/home/video-bg.svg') no-repeat;

26
weapp/src/pages/user/index.jsx

@ -23,15 +23,15 @@ const Index = ({ ...props }) => {
Taro.navigateTo({ url: '/packages/changePassword/index' })
}
const toMyReport = () => {
const toMyReport = (kind) => {
Taro.navigateTo({
url: '/packages/patrolView/index?filter=my'
url: `/packages/patrolView/index?filter=my&kind=${kind}`
})
}
const toPatrolReport = () => {
const toPatrolReport = (kind) => {
Taro.navigateTo({
url: '/packages/patrol/index?type=edit'
url: `/packages/patrol/index?type=edit&kind=${kind}`
})
}
@ -64,7 +64,7 @@ const Index = ({ ...props }) => {
</View>
</View>
<View className='box' onClick={isSuperAdmin ? toPatrolReport : toMyReport}>
<View className='box' onClick={isSuperAdmin ? () => toPatrolReport('patrol') : () => toMyReport('patrol')}>
<Image className='box-img' src={reportImg} />
<View className='box-txt'>
{isSuperAdmin ? '巡查上报' : '我的上报'}
@ -72,6 +72,22 @@ const Index = ({ ...props }) => {
<Image className='img' src={moreImg} />
</View>
<View className='box' onClick={isSuperAdmin ? () => toPatrolReport('road') : () => toMyReport('road')}>
<Image className='box-img' src={reportImg} />
<View className='box-txt'>
{isSuperAdmin ? '在建道路上报' : '在建道路'}
</View>
<Image className='img' src={moreImg} />
</View>
<View className='box' onClick={isSuperAdmin ? () => toPatrolReport('anomaly') : () => toMyReport('anomaly')}>
<Image className='box-img' src={reportImg} />
<View className='box-txt'>
{isSuperAdmin ? '异常反馈上报' : '异常反馈'}
</View>
<Image className='img' src={moreImg} />
</View>
<View className='box' onClick={changePassword} style={{ marginTop: '2rpx' }}>
<Image className='box-img' src={pswdImg} />
<View className='box-txt'>修改密码</View>

49
weapp/src/static/img/home/fill-anomaly.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 18 KiB

218
weapp/src/static/img/home/fill-bg.svg

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 38 KiB

49
weapp/src/static/img/home/fill-road.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 16 KiB

3
web/client/src/layout/containers/layout/index.js

@ -46,10 +46,11 @@ const LayoutContainer = props => {
));
}
useEffect(() => {
if (user && user.authorized)
dispatch(getDepMessage()).then((res) => {
setDepMessage(res)
})
}, [true])
}, [user])
useEffect(() => {
scrollbar = new PerfectScrollbar('#page-content', { suppressScrollX: true });
}, [])

11
web/client/src/sections/fillion/actions/patrol.js

@ -36,3 +36,14 @@ export function getUserList(query) {
reducer: { name: 'userList' }
});
}
export function handleReport (data) {
return dispatch => basicAction({
type: 'post',
dispatch: dispatch,
actionType: 'HANDLE_REPORT',
url: ApiTable.handleReport,
data: data,
msg: { option: '获取巡查数据失败' },
});
}

99
web/client/src/sections/fillion/components/patrolTable.js

@ -12,12 +12,15 @@ import styles from './protable.less';
import moment from 'moment';
const DetailForm = (props) => {
const { visible, data, handleClose, loading } = props;
const { visible, data, handleClose, loading, isAnomaly, isRoad, isPatrol } = props;
const [qndmn] = useState(localStorage.getItem('qndmn'));
const keyList = [
// { key: '编号', name: 'id' },
{ key: '工程类型', name: 'projectType' },
{ key: '所在路段', name: 'road' },
{ key: '工程类型', name: 'projectType', skip: !isPatrol },
{ key: '工程名称', name: 'projectName', skip: !isRoad },
{ key: '所在路段', name: 'road', skip: isRoad },
{ key: '具体位置', name: 'address' },
{ key: '巡查内容', name: 'content' },
{ key: '现场照片', name: 'scenePic' },
@ -29,7 +32,9 @@ const DetailForm = (props) => {
// })
return keyList.map(obj => {
return <div style={{ display: 'flex', width: '100%', justifyContent: 'space-between', margin: '12px 0' }}>
return (
obj.skip ? null :
<div style={{ display: 'flex', width: '100%', justifyContent: 'space-between', margin: '12px 0' }}>
<span style={{ fontSize: 16, color: 'gray', minWidth: '26%' }}>{obj.key}</span>
{
obj.name != 'scenePic' ?
@ -47,6 +52,7 @@ const DetailForm = (props) => {
}
</div>
)
})
} else {
return '暂无数据'
@ -58,7 +64,11 @@ const DetailForm = (props) => {
visible={visible}
footer={null}
onCancel={handleClose}
title={'巡查管理详情'}
title={
isPatrol ?
'巡查管理详情' :
isRoad ? '建设上报详情' : '异常反馈详情'
}
>
<Spin spinning={loading}>
{renderContent(data)}
@ -68,9 +78,13 @@ const DetailForm = (props) => {
}
const DetailList = (props) => {
const { reportList, loading, dispatch, handleOpen, handelRefresh } = props;
const { reportList, loading, dispatch, handleOpen, handelRefresh, isAnomaly, isRoad, isPatrol } = props;
const [visible, setVisible] = useState(false)
const [selectRecord, setSelectRecord] = useState();
const [noProcessingPopVisible, setNoProcessingPopVisible] = useState(false);
const [noProcessingSelectRecord, setNoProcessingSelectRecord] = useState();
const checkDetail = (record) => {
dispatch(getReportDetail(record.id))
}
@ -95,7 +109,7 @@ const DetailList = (props) => {
let counter = 0;
const columns = [
{
isPatrol ? {
title: '编号',
key: 'id',
dataIndex: 'id',
@ -113,7 +127,8 @@ const DetailList = (props) => {
}
return moment(record.time).format("YYYYMMDD") * 10000 + counter;
}
},
} : '',
isPatrol ?
{
title: '工程类型',
key: 'projectType',
@ -128,13 +143,23 @@ const DetailList = (props) => {
default: return text;
}
}
},
} : '',
isRoad ?
{
title: '工程名称',
key: 'projectName',
dataIndex: 'projectName',
align: 'center',
} : '',
isPatrol || isAnomaly ?
{
title: '所属道路',
key: 'road',
dataIndex: 'road',
align: 'center'
}, {
} : '',
isPatrol || isAnomaly ?
{
title: '所在路段',
key: 'address',
dataIndex: 'address',
@ -142,7 +167,7 @@ const DetailList = (props) => {
render: (text, record) => {
return `${record.roadSectionStart || ''}-${record.roadSectionEnd || ''}`
}
},
} : '',
{
title: '具体内容',
key: 'content',
@ -150,7 +175,7 @@ const DetailList = (props) => {
align: 'center'
},
{
title: '巡查人',
title: isRoad ? '上报人' : '巡查人',
width: 100,
key: 'userName',
dataIndex: 'userName',
@ -175,6 +200,23 @@ const DetailList = (props) => {
<Button
onClick={() => { checkDetail(record); handleOpen(); }}
style={{ marginRight: 10 }}>查看</Button>,
isAnomaly ? <Button>指派</Button> : null,
isAnomaly ?
<Popover
content={[
<div style={{ width: '100%', height: 30 }}>
<Button onClick={() => setNoProcessingPopVisible(false)} style={{ float: "right" }} ></Button>
<Button type="primary" onClick={() => handleRemove(record)} style={{ marginRight: 8, float: "right" }} ></Button>
</div>
]}
visible={noProcessingSelectRecord == record.id && noProcessingPopVisible}
trigger="click"
onClick={() => setNoProcessingSelectRecord(record.id)}
title="是否删除该记录?"
onVisibleChange={(newVisible) => setNoProcessingPopVisible(newVisible)}
>
<Button>不处理</Button>
</Popover> : null,
<Popover
content={[
<div style={{ width: '100%', height: 30 }}>
@ -193,7 +235,7 @@ const DetailList = (props) => {
]
}
},
];
].filter(s => s);
return (
<ProTable
columns={columns}
@ -299,7 +341,7 @@ const PatrolNameList = (props) => {
const PatrolTable = (props) => {
const { userList, reportList, dispatch, reportListLoading, reportDetail, reportDetailLoading, userLoading, exports } = props;
const { userList, reportList, dispatch, reportListLoading, reportDetail, reportDetailLoading, userLoading, exports, pathname } = props;
const [record, setRecord] = useState();
const [dateRange, setDateRange] = useState();
const [detailVisible, setDetailVisible] = useState(false)
@ -307,6 +349,11 @@ const PatrolTable = (props) => {
const { RangePicker } = DatePicker;
const isRoad = pathname.includes('road')
const isAnomaly = pathname.includes('anomaly')
const isPatrol = !isRoad && !isAnomaly
const reportType = isRoad ? 'road' : isAnomaly ? 'anomaly' : 'patrol';
console.log(isRoad, pathname, isPatrol);
useEffect(() => {
if (userList && userList instanceof Array) {
setRecord(userList[0]);
@ -320,7 +367,7 @@ const PatrolTable = (props) => {
}, [record, dateRange])
const queryData = () => {
let query = { userId: record.id, reportType: 'patrol', asc: true }
let query = { userId: record.id, reportType: reportType, asc: true }
if ((dateRange && dateRange instanceof Array && dateRange[0] != '')) {
query.startTime = moment(dateRange[0]).startOf('day').format('YYYY-MM-DD HH:mm:ss')
query.endTime = moment(dateRange[1]).endOf('day').format('YYYY-MM-DD HH:mm:ss')
@ -337,7 +384,7 @@ const PatrolTable = (props) => {
}, [activeTabKey1])
const handelRefresh = () => {
let query = { userId: record.id, reportType: 'patrol', asc: true }
let query = { userId: record.id, reportType: reportType, asc: true }
dispatch(getReportList(query));
}
@ -358,11 +405,16 @@ const PatrolTable = (props) => {
},
];
const contentList = {
tab1: [<div>
tab1: [
<div>
<Card style={{ flex: 1 }}>
<DetailList reportList={reportList} record={record} loading={reportListLoading} dispatch={dispatch} handleOpen={handleOpen} handelRefresh={handelRefresh} />
<DetailList
reportList={reportList} record={record} loading={reportListLoading} dispatch={dispatch} handleOpen={handleOpen} handelRefresh={handelRefresh}
isPatrol={isPatrol} isRoad={isRoad} isAnomaly={isAnomaly}
/>
</Card>
</div>],
</div>
],
tab2: <PatrolGis userId={(record || {}).id} dispatch={dispatch} reportList={reportList} />
};
const onTab1Change = (key) => {
@ -396,14 +448,15 @@ const PatrolTable = (props) => {
</Card>
<Card
style={{ flex: 1 }}
tabList={tabList}
tabList={isPatrol ? tabList : undefined}
activeTabKey={activeTabKey1}
onTabChange={(key) => {
onTab1Change(key);
}}
>
{
activeTabKey1 == 'tab1' ? <div style={{ marginBottom: 20 }}>
activeTabKey1 == 'tab1' ?
<div style={{ marginBottom: 20 }}>
<RangePicker onChange={(date, dateString) => { setDateRange(dateString) }} />
<Button style={{ marginLeft: 20 }}>查询</Button>
<Button style={{ marginLeft: 20 }} onClick={handleExport} >导出</Button>
@ -414,7 +467,9 @@ const PatrolTable = (props) => {
visible={detailVisible}
handleClose={handleClose}
data={reportDetail}
loading={reportDetailLoading} />
loading={reportDetailLoading}
isPatrol={isPatrol} isRoad={isRoad} isAnomaly={isAnomaly}
/>
</Card>
</div>

11
web/client/src/sections/fillion/containers/patrol.js

@ -4,13 +4,12 @@ import '../style.less';
import { getDepMessage, getReportStatistic } from "../actions/infor"
import { getUserList } from '../actions/patrol';
import PatrolTable from '../components/patrolTable';
const superagent = require('superagent');
const patrol = (props) => {
const { dispatch, user } = props
const { dispatch, user, location: { pathname } } = props
const [data, setData] = useState()
useEffect(() => {
// dispatch(getDepMessage())
setData(props)
}, []);
@ -26,10 +25,12 @@ const patrol = (props) => {
`data/export?exp=patrol&ids=${reportIds}&token=${user.token}`)
}
return (
<> <PatrolTable data={data} exports={exports} />
<>
<PatrolTable data={data} exports={exports} pathname={pathname} />
</>
)
}
function mapStateToProps (state) {
const { auth } = state
return {

6
web/client/src/sections/fillion/nav-item.js

@ -47,6 +47,12 @@ export function getNavItem(user, dispatch) {
<Menu.Item key="fillionpromotional">
<Link to="/fillion/promotional">宣传视频</Link>
</Menu.Item>
<Menu.Item key="fillionpatrolanomaly">
<Link to="/fillion/patrol_anomaly">异常反馈</Link>
</Menu.Item>
<Menu.Item key="fillionpatrolroad">
<Link to="/fillion/patrol_road">建设上报</Link>
</Menu.Item>
</SubMenu>
);
}

12
web/client/src/sections/fillion/routes.js

@ -77,6 +77,18 @@ export default [{
menuSelectKeys: ['fillionpatrol'],
component: Patrol,
breadcrumb: '巡查管理',
}, {
path: '/patrol_anomaly',
key: 'fillionpatrolanomaly',
menuSelectKeys: ['fillionpatrolanomaly'],
component: Patrol,
breadcrumb: '异常反馈',
}, {
path: '/patrol_road',
key: 'fillionpatrolroad',
menuSelectKeys: ['fillionpatrolroad'],
component: Patrol,
breadcrumb: '建设上报',
}, {
path: '/public',
key: 'fillionpublic',

258
web/package-lock.json

@ -2579,18 +2579,21 @@
"dependencies": {
"ansi-styles": {
"version": "3.2.1",
"resolved": false,
"resolved": "http://10.8.30.22:7000/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=",
"requires": {
"color-convert": "^1.9.0"
}
},
"asap": {
"version": "2.0.6",
"resolved": false
"resolved": "http://10.8.30.22:7000/asap/-/asap-2.0.6.tgz",
"integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY="
},
"asn1": {
"version": "0.2.4",
"resolved": false,
"resolved": "http://10.8.30.22:7000/asn1/-/asn1-0.2.4.tgz",
"integrity": "sha1-jSR136tVO7M+d7VOWeiAu4ziMTY=",
"optional": true,
"requires": {
"safer-buffer": "~2.1.0"
@ -2598,31 +2601,37 @@
},
"assert-plus": {
"version": "1.0.0",
"resolved": false,
"resolved": "http://10.8.30.22:7000/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
"optional": true
},
"asynckit": {
"version": "0.4.0",
"resolved": false,
"resolved": "http://10.8.30.22:7000/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
"optional": true
},
"aws-sign2": {
"version": "0.7.0",
"resolved": false,
"resolved": "http://10.8.30.22:7000/aws-sign2/-/aws-sign2-0.7.0.tgz",
"integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=",
"optional": true
},
"aws4": {
"version": "1.8.0",
"resolved": false,
"resolved": "http://10.8.30.22:7000/aws4/-/aws4-1.8.0.tgz",
"integrity": "sha1-8OAD2cqef1nHpQiUXXsu+aBKVC8=",
"optional": true
},
"balanced-match": {
"version": "1.0.0",
"resolved": false
"resolved": "http://10.8.30.22:7000/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
},
"bcrypt-pbkdf": {
"version": "1.0.2",
"resolved": false,
"resolved": "http://10.8.30.22:7000/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
"integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
"optional": true,
"requires": {
"tweetnacl": "^0.14.3"
@ -2630,7 +2639,8 @@
},
"brace-expansion": {
"version": "1.1.11",
"resolved": false,
"resolved": "http://10.8.30.22:7000/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=",
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@ -2638,12 +2648,14 @@
},
"caseless": {
"version": "0.12.0",
"resolved": false,
"resolved": "http://10.8.30.22:7000/caseless/-/caseless-0.12.0.tgz",
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
"optional": true
},
"chalk": {
"version": "2.4.1",
"resolved": false,
"resolved": "http://10.8.30.22:7000/chalk/-/chalk-2.4.1.tgz",
"integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
@ -2652,22 +2664,26 @@
},
"clone": {
"version": "2.1.2",
"resolved": false
"resolved": "http://10.8.30.22:7000/clone/-/clone-2.1.2.tgz",
"integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18="
},
"color-convert": {
"version": "1.9.2",
"resolved": false,
"resolved": "http://10.8.30.22:7000/color-convert/-/color-convert-1.9.2.tgz",
"integrity": "sha1-SYgbj7pn3xKpa98/VsCqueeRMUc=",
"requires": {
"color-name": "1.1.1"
}
},
"color-name": {
"version": "1.1.1",
"resolved": false
"resolved": "http://10.8.30.22:7000/color-name/-/color-name-1.1.1.tgz",
"integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok="
},
"combined-stream": {
"version": "1.0.7",
"resolved": false,
"resolved": "http://10.8.30.22:7000/combined-stream/-/combined-stream-1.0.7.tgz",
"integrity": "sha1-LR0kMXr7ir6V1tLAsHtXgTU52Cg=",
"optional": true,
"requires": {
"delayed-stream": "~1.0.0"
@ -2675,16 +2691,19 @@
},
"concat-map": {
"version": "0.0.1",
"resolved": false
"resolved": "http://10.8.30.22:7000/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"core-util-is": {
"version": "1.0.2",
"resolved": false,
"resolved": "http://10.8.30.22:7000/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
"optional": true
},
"dashdash": {
"version": "1.14.1",
"resolved": false,
"resolved": "http://10.8.30.22:7000/dashdash/-/dashdash-1.14.1.tgz",
"integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
"optional": true,
"requires": {
"assert-plus": "^1.0.0"
@ -2692,12 +2711,14 @@
},
"delayed-stream": {
"version": "1.0.0",
"resolved": false,
"resolved": "http://10.8.30.22:7000/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
"optional": true
},
"ecc-jsbn": {
"version": "0.1.2",
"resolved": false,
"resolved": "http://10.8.30.22:7000/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
"integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
"optional": true,
"requires": {
"jsbn": "~0.1.0",
@ -2706,7 +2727,8 @@
},
"errno": {
"version": "0.1.7",
"resolved": false,
"resolved": "http://10.8.30.22:7000/errno/-/errno-0.1.7.tgz",
"integrity": "sha1-RoTXF3mtOa8Xfj8AeZb3xnyFJhg=",
"optional": true,
"requires": {
"prr": "~1.0.1"
@ -2714,31 +2736,37 @@
},
"escape-string-regexp": {
"version": "1.0.5",
"resolved": false
"resolved": "http://10.8.30.22:7000/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
},
"extend": {
"version": "3.0.2",
"resolved": false,
"resolved": "http://10.8.30.22:7000/extend/-/extend-3.0.2.tgz",
"integrity": "sha1-+LETa0Bx+9jrFAr/hYsQGewpFfo=",
"optional": true
},
"extsprintf": {
"version": "1.3.0",
"resolved": false,
"resolved": "http://10.8.30.22:7000/extsprintf/-/extsprintf-1.3.0.tgz",
"integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
"optional": true
},
"fast-json-stable-stringify": {
"version": "2.0.0",
"resolved": false,
"resolved": "http://10.8.30.22:7000/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=",
"optional": true
},
"forever-agent": {
"version": "0.6.1",
"resolved": false,
"resolved": "http://10.8.30.22:7000/forever-agent/-/forever-agent-0.6.1.tgz",
"integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
"optional": true
},
"form-data": {
"version": "2.3.3",
"resolved": false,
"resolved": "http://10.8.30.22:7000/form-data/-/form-data-2.3.3.tgz",
"integrity": "sha1-3M5SwF9kTymManq5Nr1yTO/786Y=",
"optional": true,
"requires": {
"asynckit": "^0.4.0",
@ -2748,11 +2776,13 @@
},
"fs.realpath": {
"version": "1.0.0",
"resolved": false
"resolved": "http://10.8.30.22:7000/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
"getpass": {
"version": "0.1.7",
"resolved": false,
"resolved": "http://10.8.30.22:7000/getpass/-/getpass-0.1.7.tgz",
"integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
"optional": true,
"requires": {
"assert-plus": "^1.0.0"
@ -2760,7 +2790,8 @@
},
"glob": {
"version": "7.1.3",
"resolved": false,
"resolved": "http://10.8.30.22:7000/glob/-/glob-7.1.3.tgz",
"integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@ -2772,17 +2803,20 @@
},
"graceful-fs": {
"version": "4.1.15",
"resolved": false,
"resolved": "http://10.8.30.22:7000/graceful-fs/-/graceful-fs-4.1.15.tgz",
"integrity": "sha1-/7cD4QZuig7qpMi4C6klPu77+wA=",
"optional": true
},
"har-schema": {
"version": "2.0.0",
"resolved": false,
"resolved": "http://10.8.30.22:7000/har-schema/-/har-schema-2.0.0.tgz",
"integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=",
"optional": true
},
"har-validator": {
"version": "5.1.3",
"resolved": false,
"resolved": "http://10.8.30.22:7000/har-validator/-/har-validator-5.1.3.tgz",
"integrity": "sha1-HvievT5JllV2de7ZiTEQ3DUPoIA=",
"optional": true,
"requires": {
"ajv": "^6.5.5",
@ -2791,7 +2825,8 @@
"dependencies": {
"ajv": {
"version": "6.6.2",
"resolved": false,
"resolved": "http://10.8.30.22:7000/ajv/-/ajv-6.6.2.tgz",
"integrity": "sha1-ys7M9HS/P8POOxR0Q3EaJAY8ww0=",
"optional": true,
"requires": {
"fast-deep-equal": "^2.0.1",
@ -2802,18 +2837,21 @@
},
"fast-deep-equal": {
"version": "2.0.1",
"resolved": false,
"resolved": "http://10.8.30.22:7000/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
"integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=",
"optional": true
}
}
},
"has-flag": {
"version": "3.0.0",
"resolved": false
"resolved": "http://10.8.30.22:7000/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
},
"hash.js": {
"version": "1.1.7",
"resolved": false,
"resolved": "http://10.8.30.22:7000/hash.js/-/hash.js-1.1.7.tgz",
"integrity": "sha1-C6vKU46NTuSg+JiNaIZlN6ADz0I=",
"requires": {
"inherits": "^2.0.3",
"minimalistic-assert": "^1.0.1"
@ -2821,7 +2859,8 @@
},
"http-signature": {
"version": "1.2.0",
"resolved": false,
"resolved": "http://10.8.30.22:7000/http-signature/-/http-signature-1.2.0.tgz",
"integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
"optional": true,
"requires": {
"assert-plus": "^1.0.0",
@ -2831,12 +2870,14 @@
},
"image-size": {
"version": "0.5.5",
"resolved": false,
"resolved": "http://10.8.30.22:7000/image-size/-/image-size-0.5.5.tgz",
"integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=",
"optional": true
},
"inflight": {
"version": "1.0.6",
"resolved": false,
"resolved": "http://10.8.30.22:7000/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"requires": {
"once": "^1.3.0",
"wrappy": "1"
@ -2844,45 +2885,54 @@
},
"inherits": {
"version": "2.0.3",
"resolved": false
"resolved": "http://10.8.30.22:7000/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"is-regexp": {
"version": "2.1.0",
"resolved": false
"resolved": "http://10.8.30.22:7000/is-regexp/-/is-regexp-2.1.0.tgz",
"integrity": "sha1-zXNKVoZOI7lWv058ZsOWpMCyLC0="
},
"is-typedarray": {
"version": "1.0.0",
"resolved": false,
"resolved": "http://10.8.30.22:7000/is-typedarray/-/is-typedarray-1.0.0.tgz",
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
"optional": true
},
"isstream": {
"version": "0.1.2",
"resolved": false,
"resolved": "http://10.8.30.22:7000/isstream/-/isstream-0.1.2.tgz",
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
"optional": true
},
"jsbn": {
"version": "0.1.1",
"resolved": false,
"resolved": "http://10.8.30.22:7000/jsbn/-/jsbn-0.1.1.tgz",
"integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
"optional": true
},
"json-schema": {
"version": "0.2.3",
"resolved": false,
"resolved": "http://10.8.30.22:7000/json-schema/-/json-schema-0.2.3.tgz",
"integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
"optional": true
},
"json-schema-traverse": {
"version": "0.4.1",
"resolved": false,
"resolved": "http://10.8.30.22:7000/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
"integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA=",
"optional": true
},
"json-stringify-safe": {
"version": "5.0.1",
"resolved": false,
"resolved": "http://10.8.30.22:7000/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
"optional": true
},
"jsprim": {
"version": "1.4.1",
"resolved": false,
"resolved": "http://10.8.30.22:7000/jsprim/-/jsprim-1.4.1.tgz",
"integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
"optional": true,
"requires": {
"assert-plus": "1.0.0",
@ -2893,7 +2943,8 @@
},
"less": {
"version": "3.9.0",
"resolved": false,
"resolved": "http://10.8.30.22:7000/less/-/less-3.9.0.tgz",
"integrity": "sha1-t1EcQ/N89X3Iff/ZiD7BISibFHQ=",
"requires": {
"clone": "^2.1.2",
"errno": "^0.1.1",
@ -2908,7 +2959,8 @@
},
"less-plugin-npm-import": {
"version": "2.1.0",
"resolved": false,
"resolved": "http://10.8.30.22:7000/less-plugin-npm-import/-/less-plugin-npm-import-2.1.0.tgz",
"integrity": "sha1-gj5phskzGKmBccqFiEi2vq1Vvz4=",
"requires": {
"promise": "~7.0.1",
"resolve": "~1.1.6"
@ -2916,30 +2968,35 @@
"dependencies": {
"promise": {
"version": "7.0.4",
"resolved": false,
"resolved": "http://10.8.30.22:7000/promise/-/promise-7.0.4.tgz",
"integrity": "sha1-Nj6EpMNsg1a4kP7WLJHOhdAu1Tk=",
"requires": {
"asap": "~2.0.3"
}
},
"resolve": {
"version": "1.1.7",
"resolved": false
"resolved": "http://10.8.30.22:7000/resolve/-/resolve-1.1.7.tgz",
"integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs="
}
}
},
"mime": {
"version": "1.6.0",
"resolved": false,
"resolved": "http://10.8.30.22:7000/mime/-/mime-1.6.0.tgz",
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
"optional": true
},
"mime-db": {
"version": "1.37.0",
"resolved": false,
"resolved": "http://10.8.30.22:7000/mime-db/-/mime-db-1.37.0.tgz",
"integrity": "sha1-C2oM5v2+lXbiXx8tL96IMNwK0Ng=",
"optional": true
},
"mime-types": {
"version": "2.1.21",
"resolved": false,
"resolved": "http://10.8.30.22:7000/mime-types/-/mime-types-2.1.21.tgz",
"integrity": "sha1-KJlaoey3cHQv5q5+WPkYHHRLP5Y=",
"optional": true,
"requires": {
"mime-db": "~1.37.0"
@ -2947,23 +3004,27 @@
},
"minimalistic-assert": {
"version": "1.0.1",
"resolved": false
"resolved": "http://10.8.30.22:7000/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
"integrity": "sha1-LhlN4ERibUoQ5/f7wAznPoPk1cc="
},
"minimatch": {
"version": "3.0.4",
"resolved": false,
"resolved": "http://10.8.30.22:7000/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=",
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "1.2.5",
"resolved": false,
"resolved": "http://10.8.30.22:7000/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha1-Z9ZgFLZqaoqqDAg8X9WN9OTpdgI=",
"optional": true
},
"mkdirp": {
"version": "0.5.5",
"resolved": false,
"resolved": "http://10.8.30.22:7000/mkdirp/-/mkdirp-0.5.5.tgz",
"integrity": "sha1-2Rzv1i0UNsoPQWIOJRKI1CAJne8=",
"optional": true,
"requires": {
"minimist": "^1.2.5"
@ -2971,28 +3032,33 @@
},
"oauth-sign": {
"version": "0.9.0",
"resolved": false,
"resolved": "http://10.8.30.22:7000/oauth-sign/-/oauth-sign-0.9.0.tgz",
"integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==",
"optional": true
},
"once": {
"version": "1.4.0",
"resolved": false,
"resolved": "http://10.8.30.22:7000/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"requires": {
"wrappy": "1"
}
},
"path-is-absolute": {
"version": "1.0.1",
"resolved": false
"resolved": "http://10.8.30.22:7000/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
},
"performance-now": {
"version": "2.1.0",
"resolved": false,
"resolved": "http://10.8.30.22:7000/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
"optional": true
},
"postcss": {
"version": "6.0.23",
"resolved": false,
"resolved": "http://10.8.30.22:7000/postcss/-/postcss-6.0.23.tgz",
"integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==",
"requires": {
"chalk": "^2.4.1",
"source-map": "^0.6.1",
@ -3001,7 +3067,8 @@
},
"promise": {
"version": "7.3.1",
"resolved": false,
"resolved": "http://10.8.30.22:7000/promise/-/promise-7.3.1.tgz",
"integrity": "sha1-BktyYCsY+Q8pGSuLG8QY/9Hr078=",
"optional": true,
"requires": {
"asap": "~2.0.3"
@ -3009,27 +3076,32 @@
},
"prr": {
"version": "1.0.1",
"resolved": false,
"resolved": "http://10.8.30.22:7000/prr/-/prr-1.0.1.tgz",
"integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=",
"optional": true
},
"psl": {
"version": "1.1.31",
"resolved": false,
"resolved": "http://10.8.30.22:7000/psl/-/psl-1.1.31.tgz",
"integrity": "sha1-6aqG0BAbWxBcvpOsa3hM1UcnYYQ=",
"optional": true
},
"punycode": {
"version": "2.1.1",
"resolved": false,
"resolved": "http://10.8.30.22:7000/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha1-tYsBCsQMIsVldhbI0sLALHv0eew=",
"optional": true
},
"qs": {
"version": "6.5.2",
"resolved": false,
"resolved": "http://10.8.30.22:7000/qs/-/qs-6.5.2.tgz",
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
"optional": true
},
"request": {
"version": "2.88.0",
"resolved": false,
"resolved": "http://10.8.30.22:7000/request/-/request-2.88.0.tgz",
"integrity": "sha1-nC/KT301tZLv5Xx/ClXoEFIST+8=",
"optional": true,
"requires": {
"aws-sign2": "~0.7.0",
@ -3056,21 +3128,25 @@
},
"safe-buffer": {
"version": "5.1.2",
"resolved": false,
"resolved": "http://10.8.30.22:7000/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=",
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
"resolved": false,
"resolved": "http://10.8.30.22:7000/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=",
"optional": true
},
"source-map": {
"version": "0.6.1",
"resolved": false
"resolved": "http://10.8.30.22:7000/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM="
},
"sshpk": {
"version": "1.15.2",
"resolved": false,
"resolved": "http://10.8.30.22:7000/sshpk/-/sshpk-1.15.2.tgz",
"integrity": "sha1-yUbWvZsaOdDoY1dj9SQtbtbctik=",
"optional": true,
"requires": {
"asn1": "~0.2.3",
@ -3086,21 +3162,24 @@
},
"strip-css-comments": {
"version": "4.1.0",
"resolved": false,
"resolved": "http://10.8.30.22:7000/strip-css-comments/-/strip-css-comments-4.1.0.tgz",
"integrity": "sha512-azjRwrqk7nK21LU7QuL7DpDyPjvRROQvqPrNyyz6emdzbOh6fsNTvkSvUiThBLzC6+MN90rFu296VbPb/KV+3A==",
"requires": {
"is-regexp": "^2.1.0"
}
},
"supports-color": {
"version": "5.4.0",
"resolved": false,
"resolved": "http://10.8.30.22:7000/supports-color/-/supports-color-5.4.0.tgz",
"integrity": "sha1-HGszdALCE3YF7+GfEP7DkPb6q1Q=",
"requires": {
"has-flag": "^3.0.0"
}
},
"tough-cookie": {
"version": "2.4.3",
"resolved": false,
"resolved": "http://10.8.30.22:7000/tough-cookie/-/tough-cookie-2.4.3.tgz",
"integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==",
"optional": true,
"requires": {
"psl": "^1.1.24",
@ -3109,14 +3188,16 @@
"dependencies": {
"punycode": {
"version": "1.4.1",
"resolved": false,
"resolved": "http://10.8.30.22:7000/punycode/-/punycode-1.4.1.tgz",
"integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
"optional": true
}
}
},
"tunnel-agent": {
"version": "0.6.0",
"resolved": false,
"resolved": "http://10.8.30.22:7000/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
"integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
"optional": true,
"requires": {
"safe-buffer": "^5.0.1"
@ -3124,12 +3205,14 @@
},
"tweetnacl": {
"version": "0.14.5",
"resolved": false,
"resolved": "http://10.8.30.22:7000/tweetnacl/-/tweetnacl-0.14.5.tgz",
"integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
"optional": true
},
"uri-js": {
"version": "4.2.2",
"resolved": false,
"resolved": "http://10.8.30.22:7000/uri-js/-/uri-js-4.2.2.tgz",
"integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
"optional": true,
"requires": {
"punycode": "^2.1.0"
@ -3137,12 +3220,14 @@
},
"uuid": {
"version": "3.3.2",
"resolved": false,
"resolved": "http://10.8.30.22:7000/uuid/-/uuid-3.3.2.tgz",
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==",
"optional": true
},
"verror": {
"version": "1.10.0",
"resolved": false,
"resolved": "http://10.8.30.22:7000/verror/-/verror-1.10.0.tgz",
"integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
"optional": true,
"requires": {
"assert-plus": "^1.0.0",
@ -3152,7 +3237,8 @@
},
"wrappy": {
"version": "1.0.2",
"resolved": false
"resolved": "http://10.8.30.22:7000/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
}
}
},

2
web/package.json

@ -6,7 +6,7 @@
"scripts": {
"test": "mocha",
"start": "cross-env NODE_ENV=development npm run start-params",
"start-params": "node server -p 5000 -u http://localhost:14000 --qndmn http://rfkimpwbb.hn-bkt.clouddn.com",
"start-params": "node server -p 5000 -u http://localhost:13400 --qndmn http://rfkimpwbb.hn-bkt.clouddn.com",
"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": "export NODE_ENV=production&&webpack --config webpack.config.prod.js",

Loading…
Cancel
Save