From 46046f7ed6f8c700e9719b96f99b70d0ee15508e Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Tue, 27 Jun 2023 21:48:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BC=82=E5=B8=B8=E4=B8=8A?= =?UTF-8?q?=E6=8A=A5\=E9=81=93=E8=B7=AF=E5=B7=A1=E6=A3=80=E4=B8=A4?= =?UTF-8?q?=E4=B8=AA=E6=A8=A1=E5=9D=97=20web+=E5=B0=8F=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=20=20=2060%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +- api/.vscode/launch.json | 4 +- api/app/lib/controllers/report/index.js | 14 +- api/app/lib/models/report.js | 9 + api/log/development.log | 15 + scripts/1.2.1/schema/1update_report.sql | 4 + weapp/project.config.json | 7 +- weapp/project.private.config.json | 6 +- weapp/src/config.js | 6 +- weapp/src/packages/patrol/index.jsx | 201 ++++++++------ weapp/src/packages/patrolView/index.jsx | 58 ++-- weapp/src/packages/patrolView/index.scss | 6 +- weapp/src/pages/home/index.jsx | 36 ++- weapp/src/pages/home/index.scss | 12 +- weapp/src/pages/user/index.jsx | 26 +- weapp/src/static/img/home/fill-anomaly.svg | 49 ++++ weapp/src/static/img/home/fill-bg.svg | 254 ++++++++--------- weapp/src/static/img/home/fill-road.svg | 49 ++++ .../src/layout/containers/layout/index.js | 11 +- .../src/sections/fillion/actions/patrol.js | 17 +- .../fillion/components/patrolTable.js | 221 +++++++++------ .../src/sections/fillion/containers/patrol.js | 55 ++-- web/client/src/sections/fillion/nav-item.js | 8 +- web/client/src/sections/fillion/routes.js | 12 + web/package-lock.json | 258 ++++++++++++------ web/package.json | 2 +- 26 files changed, 879 insertions(+), 464 deletions(-) create mode 100644 scripts/1.2.1/schema/1update_report.sql create mode 100644 weapp/src/static/img/home/fill-anomaly.svg create mode 100644 weapp/src/static/img/home/fill-road.svg diff --git a/.gitignore b/.gitignore index cee3e9c9..68bab034 100644 --- a/.gitignore +++ b/.gitignore @@ -141,4 +141,5 @@ dist *downloadFiles/ web/client/assets/color.less package-lock.json -development.text \ No newline at end of file +development.text +web/package-lock.json diff --git a/api/.vscode/launch.json b/api/.vscode/launch.json index eaa8220c..c3687af2 100644 --- a/api/.vscode/launch.json +++ b/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", diff --git a/api/app/lib/controllers/report/index.js b/api/app/lib/controllers/report/index.js index c098336e..27f2f019 100644 --- a/api/app/lib/controllers/report/index.js +++ b/api/app/lib/controllers/report/index.js @@ -9,12 +9,12 @@ 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'] }], - order: [['time', asc ? 'ASC': 'DESC']], + order: [['time', asc ? 'ASC' : 'DESC']], } if (limit) { findOption.limit = limit @@ -30,8 +30,14 @@ async function reportList (ctx) { } } if (keyword) { - findOption.where.road = { - '$like': `%${keyword}%` + if (reportType == 'road') { + findOption.where.projectName = { + '$like': `%${keyword}%` + } + } else { + findOption.where.road = { + '$like': `%${keyword}%` + } } } if (userId) { diff --git a/api/app/lib/models/report.js b/api/app/lib/models/report.js index 0a49fba5..43a7807a 100644 --- a/api/app/lib/models/report.js +++ b/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: "", diff --git a/api/log/development.log b/api/log/development.log index 673a9986..43963241 100644 --- a/api/log/development.log +++ b/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. diff --git a/scripts/1.2.1/schema/1update_report.sql b/scripts/1.2.1/schema/1update_report.sql new file mode 100644 index 00000000..f562cb0b --- /dev/null +++ b/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; \ No newline at end of file diff --git a/weapp/project.config.json b/weapp/project.config.json index ad77fb8b..96d9c123 100644 --- a/weapp/project.config.json +++ b/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", diff --git a/weapp/project.private.config.json b/weapp/project.private.config.json index afa214e8..55b00acb 100644 --- a/weapp/project.private.config.json +++ b/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" } \ No newline at end of file diff --git a/weapp/src/config.js b/weapp/src/config.js index 329a027e..f2762e95 100644 --- a/weapp/src/config.js +++ b/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', @@ -29,4 +29,4 @@ const production = { const environment = DEV ? development : production; -export default environment; \ No newline at end of file +export default environment; diff --git a/weapp/src/packages/patrol/index.jsx b/weapp/src/packages/patrol/index.jsx index abe505fc..d376c2d6 100644 --- a/weapp/src/packages/patrol/index.jsx +++ b/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) @@ -161,13 +167,17 @@ const Index = () => { ]) }, [reportType]) - function report() { + 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 @@ -226,7 +241,7 @@ const Index = () => { }) } - function deleteReport() { + function deleteReport () { Taro.showModal({ title: '提示', content: '确定删除吗?', @@ -253,7 +268,7 @@ const Index = () => { }) } - function handleInput({ detail: { value } }, type) { + function handleInput ({ detail: { value } }, type) { switch (type) { case 'roadSectionStart': setRoadSectionStart(value) @@ -276,20 +291,24 @@ const Index = () => { break; case 'content': setContent(value) + break; + case "projectName": + setProjectName(value) + break; default: break; } } - function handleTypeChange(e) { + function handleTypeChange (e) { setReportType(e.detail.value) } - function handleImgChange(files, operationType, index, type) { + function handleImgChange (files, operationType, index, type) { if (operationType === 'remove') { setImg(false) } - function setImg(isAdd, url) { + function setImg (isAdd, url) { switch (type) { case 'scenePic': let nextImg = sceneImg @@ -376,7 +395,7 @@ const Index = () => { } } - function handleImgClick(index, file) { + function handleImgClick (index, file) { Taro.previewImage({ urls: [file.url] // 需要预览的图片http链接列表 }) @@ -385,7 +404,9 @@ const Index = () => { return ( { - (!isSuperAdmin || isView) && + (!isSuperAdmin || isView) + && !isRoad && !isAnomaly + && 上报类型 @@ -408,66 +429,92 @@ const Index = () => { } - - - - 所属路段: - handleInput(e, 'roadSectionStart')} - disabled={isView} - /> - { - !isView && - setRoadSectionStart(roadStartSel[e.detail.value])} - > - - - } - 至  - handleInput(e, 'roadSectionEnd')} - disabled={isView} - /> - { - !isView && - setRoadSectionEnd(roadEndSel[e.detail.value])} - > - - - } - + { + isPatrol ? + : '' + } + + { + isRoad ? + + 项目名称: + handleInput(e, 'projectName')} + disabled={isView} + /> + : '' + } + + { + isPatrol || isAnomaly ? + : '' + } + + { + isPatrol || isAnomaly ? + + 所属路段: + handleInput(e, 'roadSectionStart')} + disabled={isView} + /> + { + !isView && + setRoadSectionStart(roadStartSel[e.detail.value])} + > + + + } + 至  + handleInput(e, 'roadSectionEnd')} + disabled={isView} + /> + { + !isView && + setRoadSectionEnd(roadEndSel[e.detail.value])} + > + + + } + : '' + } 具体位置: @@ -490,7 +537,7 @@ const Index = () => { maxLength={50} /> { - reportType === 'patrol' ? + reportType === 'patrol' || isRoad || isAnomaly ? 现场图片: { @@ -577,11 +624,13 @@ const Index = () => { } { isView ? - isSuperAdmin && 删除 : + isSuperAdmin && + 删除 + : 上报 } ) } -export default Index \ No newline at end of file +export default Index diff --git a/weapp/src/packages/patrolView/index.jsx b/weapp/src/packages/patrolView/index.jsx index fe60a993..b317dfa1 100644 --- a/weapp/src/packages/patrolView/index.jsx +++ b/weapp/src/packages/patrolView/index.jsx @@ -14,12 +14,16 @@ import patrolActiveIcon from '../../static/img/patrolView/patrol-active.svg' import conserveIcon from '../../static/img/patrolView/conserve.svg' import conserveActiveIcon from '../../static/img/patrolView/conserve-active.svg' -function Index() { +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,13 +36,13 @@ function Index() { useEffect(() => { setPage(0) setNum(Math.random()) - }, [isPatrol, datePicker]) + }, [reportType, datePicker]) useEffect(() => { getList(page == 0 ? true : false) }, [num]) - function dealError(error) { + function dealError (error) { Taro.showToast({ title: error, icon: 'none', @@ -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 ( - - onTypeChange(true)}> - - 巡查 - - - onTypeChange(false)}> - - 养护 - - - + { + isPatrol ? + + setReportType('patrol')}> + + 巡查 + + + setReportType('conserve')}> + + 养护 + + + : "" + } + + 日期: - + - + { listData && listData.length > 0 ? listData && listData.map((e, index) => { return ( @@ -166,7 +172,7 @@ function Index() { - {e.road} + {e.road || e.projectName} 填报人: {e.user && e.user.name} diff --git a/weapp/src/packages/patrolView/index.scss b/weapp/src/packages/patrolView/index.scss index 7de6c587..a1d36cc0 100644 --- a/weapp/src/packages/patrolView/index.scss +++ b/weapp/src/packages/patrolView/index.scss @@ -11,7 +11,7 @@ page { display: flex; justify-content: space-around; align-items: center; - + .item { flex-grow: 1; display: flex; @@ -34,7 +34,7 @@ page { .filter-box { position: fixed; - top: 80px; + // top: 80px; display: flex; width: 100%; z-index: 100; @@ -136,4 +136,4 @@ page { } } } -} \ No newline at end of file +} diff --git a/weapp/src/pages/home/index.jsx b/weapp/src/pages/home/index.jsx index b6a3166c..18db4a91 100644 --- a/weapp/src/pages/home/index.jsx +++ b/weapp/src/pages/home/index.jsx @@ -26,18 +26,18 @@ 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}` }) } - function toVideo() { + function toVideo () { Taro.navigateTo({ url: '/packages/video/index' }) @@ -47,7 +47,31 @@ const Index = () => { 巡 查 养 护 - + toPatrolView('patrol') + : () => toPatrol('patrol') + }> + {isSuperAdmin ? '查看' : '填报'} + + + + 在 建 道 路 + toPatrolView('road') + : () => toPatrol('road') + }> + {isSuperAdmin ? '查看' : '填报'} + + + + 异 常 反 馈 + toPatrolView('anomaly') + : () => toPatrol('anomaly') + }> {isSuperAdmin ? '查看' : '填报'} diff --git a/weapp/src/pages/home/index.scss b/weapp/src/pages/home/index.scss index ad17ea81..3fdebb5c 100644 --- a/weapp/src/pages/home/index.scss +++ b/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; @@ -34,4 +42,4 @@ border: solid 1px #fff; border-radius: 10px; } -} \ No newline at end of file +} diff --git a/weapp/src/pages/user/index.jsx b/weapp/src/pages/user/index.jsx index bc96468d..14b73fd2 100644 --- a/weapp/src/pages/user/index.jsx +++ b/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 }) => { - + toPatrolReport('patrol') : () => toMyReport('patrol')}> {isSuperAdmin ? '巡查上报' : '我的上报'} @@ -72,6 +72,22 @@ const Index = ({ ...props }) => { + toPatrolReport('road') : () => toMyReport('road')}> + + + {isSuperAdmin ? '在建道路上报' : '在建道路'} + + + + + toPatrolReport('anomaly') : () => toMyReport('anomaly')}> + + + {isSuperAdmin ? '异常反馈上报' : '异常反馈'} + + + + 修改密码 diff --git a/weapp/src/static/img/home/fill-anomaly.svg b/weapp/src/static/img/home/fill-anomaly.svg new file mode 100644 index 00000000..15b0a0b1 --- /dev/null +++ b/weapp/src/static/img/home/fill-anomaly.svg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/weapp/src/static/img/home/fill-bg.svg b/weapp/src/static/img/home/fill-bg.svg index 0a4b818d..f05371c4 100644 --- a/weapp/src/static/img/home/fill-bg.svg +++ b/weapp/src/static/img/home/fill-bg.svg @@ -1,126 +1,130 @@ - - - 椭圆形 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/weapp/src/static/img/home/fill-road.svg b/weapp/src/static/img/home/fill-road.svg new file mode 100644 index 00000000..14424e18 --- /dev/null +++ b/weapp/src/static/img/home/fill-road.svg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/web/client/src/layout/containers/layout/index.js b/web/client/src/layout/containers/layout/index.js index 2ec33a6d..08d3ce8b 100644 --- a/web/client/src/layout/containers/layout/index.js +++ b/web/client/src/layout/containers/layout/index.js @@ -46,10 +46,11 @@ const LayoutContainer = props => { )); } useEffect(() => { - dispatch(getDepMessage()).then((res) => { - setDepMessage(res) - }) - }, [true]) + if (user && user.authorized) + dispatch(getDepMessage()).then((res) => { + setDepMessage(res) + }) + }, [user]) useEffect(() => { scrollbar = new PerfectScrollbar('#page-content', { suppressScrollX: true }); }, []) @@ -132,7 +133,7 @@ const LayoutContainer = props => { ) } -function mapStateToProps(state) { +function mapStateToProps (state) { const { global, auth, ajaxResponse } = state; return { title: global.title, diff --git a/web/client/src/sections/fillion/actions/patrol.js b/web/client/src/sections/fillion/actions/patrol.js index 63507bd9..44ba97e3 100644 --- a/web/client/src/sections/fillion/actions/patrol.js +++ b/web/client/src/sections/fillion/actions/patrol.js @@ -2,7 +2,7 @@ import { basicAction } from '@peace/utils' import { ApiTable } from '$utils' -export function getReportList(query) { +export function getReportList (query) { return dispatch => basicAction({ type: 'get', dispatch: dispatch, @@ -14,7 +14,7 @@ export function getReportList(query) { }); } -export function getReportDetail(reportId) { +export function getReportDetail (reportId) { return dispatch => basicAction({ type: 'get', dispatch: dispatch, @@ -25,7 +25,7 @@ export function getReportDetail(reportId) { }); } -export function getUserList(query) { +export function getUserList (query) { return dispatch => basicAction({ type: 'get', dispatch: dispatch, @@ -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: '获取巡查数据失败' }, + }); +} \ No newline at end of file diff --git a/web/client/src/sections/fillion/components/patrolTable.js b/web/client/src/sections/fillion/components/patrolTable.js index f07f3674..3089ada4 100644 --- a/web/client/src/sections/fillion/components/patrolTable.js +++ b/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,24 +32,27 @@ const DetailForm = (props) => { // }) return keyList.map(obj => { - return
- {obj.key} - { - obj.name != 'scenePic' ? - - : -
- { - data.scenePic && data.scenePic instanceof Array ? data.scenePic.map(imgSrc => { - return
- -
- }) : '暂无图片' - } -
+ return ( + obj.skip ? null : +
+ {obj.key} + { + obj.name != 'scenePic' ? + + : +
+ { + data.scenePic && data.scenePic instanceof Array ? data.scenePic.map(imgSrc => { + return
+ +
+ }) : '暂无图片' + } +
- } -
+ } +
+ ) }) } else { return '暂无数据' @@ -58,7 +64,11 @@ const DetailForm = (props) => { visible={visible} footer={null} onCancel={handleClose} - title={'巡查管理详情'} + title={ + isPatrol ? + '巡查管理详情' : + isRoad ? '建设上报详情' : '异常反馈详情' + } > {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,54 +109,65 @@ const DetailList = (props) => { let counter = 0; const columns = [ - { + isPatrol ? { title: '编号', key: 'id', dataIndex: 'id', align: 'center', render: (text, record) => { let day = moment(record.time).format("YYYYMMDD") - if(!basicDate){ + if (!basicDate) { basicDate = day; - counter +=1; - } else if(basicDate == day){ counter += 1; - } else if(basicDate != day){ + } else if (basicDate == day) { + counter += 1; + } else if (basicDate != day) { basicDate = day; counter = 1; } return moment(record.time).format("YYYYMMDD") * 10000 + counter; } - }, - { - title: '工程类型', - key: 'projectType', - dataIndex: 'projectType', - align: 'center', - render: (text, record) => { - switch (text) { - case 'road': return '道路'; - case 'bridge': return '桥梁'; - case 'culvert': return '涵洞'; - case 'other': return '其他'; - default: return text; + } : '', + isPatrol ? + { + title: '工程类型', + key: 'projectType', + dataIndex: 'projectType', + align: 'center', + render: (text, record) => { + switch (text) { + case 'road': return '道路'; + case 'bridge': return '桥梁'; + case 'culvert': return '涵洞'; + case 'other': return '其他'; + default: return text; + } } - } - }, - { - title: '所属道路', - key: 'road', - dataIndex: 'road', - align: 'center' - }, { - title: '所在路段', - key: 'address', - dataIndex: 'address', - align: 'center', - render: (text, record) => { - return `${record.roadSectionStart || ''}-${record.roadSectionEnd || ''}` - } - }, + } : '', + isRoad ? + { + title: '工程名称', + key: 'projectName', + dataIndex: 'projectName', + align: 'center', + } : '', + isPatrol || isAnomaly ? + { + title: '所属道路', + key: 'road', + dataIndex: 'road', + align: 'center' + } : '', + isPatrol || isAnomaly ? + { + title: '所在路段', + key: 'address', + dataIndex: 'address', + align: 'center', + 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) => { , + isAnomaly ? : null, + isAnomaly ? + + + + + ]} + visible={noProcessingSelectRecord == record.id && noProcessingPopVisible} + trigger="click" + onClick={() => setNoProcessingSelectRecord(record.id)} + title="是否删除该记录?" + onVisibleChange={(newVisible) => setNoProcessingPopVisible(newVisible)} + > + + : null, @@ -193,7 +235,7 @@ const DetailList = (props) => { ] } }, - ]; + ].filter(s => s); return ( { useEffect(() => { - - if (userList && userList instanceof Array && userList.length) { - setSelectRoad(userList[0].id) - // onChange(userList[0]); - } - if(activeTabKey1 == 'tab2'){ - setSelectRoad(null) - } + + if (userList && userList instanceof Array && userList.length) { + setSelectRoad(userList[0].id) + // onChange(userList[0]); + } + if (activeTabKey1 == 'tab2') { + setSelectRoad(null) + } }, [userList, activeTabKey1]) @@ -281,8 +323,8 @@ const PatrolNameList = (props) => { onClick: () => { if (record) { // console.log('record:', record) - let id = record.id - if(selectRoad == record.id){ + let id = record.id + if (selectRoad == record.id) { id = null } setSelectRoad(id); @@ -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: [
- - - -
], + tab1: [ +
+ + + +
+ ], tab2: }; const onTab1Change = (key) => { @@ -396,25 +448,28 @@ const PatrolTable = (props) => { { onTab1Change(key); }} > { - activeTabKey1 == 'tab1' ?
- { setDateRange(dateString) }} /> - - -
: '' + activeTabKey1 == 'tab1' ? +
+ { setDateRange(dateString) }} /> + + +
: '' } {contentList[activeTabKey1]} + loading={reportDetailLoading} + isPatrol={isPatrol} isRoad={isRoad} isAnomaly={isAnomaly} + />
diff --git a/web/client/src/sections/fillion/containers/patrol.js b/web/client/src/sections/fillion/containers/patrol.js index df84bd81..00437e04 100644 --- a/web/client/src/sections/fillion/containers/patrol.js +++ b/web/client/src/sections/fillion/containers/patrol.js @@ -4,36 +4,37 @@ 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 [data, setData] = useState() - useEffect(() => { - // dispatch(getDepMessage()) + const { dispatch, user, location: { pathname } } = props - setData(props) - }, []); + const [data, setData] = useState() + useEffect(() => { + setData(props) + }, []); - useEffect(() => { - dispatch(getUserList()) - }, [true]) - //批量导出 - const exports = (ids, counts) => { - // console.log(user); - let reportIds = ids.toString(); - window.open( - '/_api/' + - `data/export?exp=patrol&ids=${reportIds}&token=${user.token}`) - } - return ( - <> - - ) + useEffect(() => { + dispatch(getUserList()) + }, [true]) + //批量导出 + const exports = (ids, counts) => { + // console.log(user); + let reportIds = ids.toString(); + window.open( + '/_api/' + + `data/export?exp=patrol&ids=${reportIds}&token=${user.token}`) + } + return ( + <> + + + ) } -function mapStateToProps(state) { - const { auth } = state - return { - user: auth.user, - } + +function mapStateToProps (state) { + const { auth } = state + return { + user: auth.user, + } } export default connect(mapStateToProps)(patrol); \ No newline at end of file diff --git a/web/client/src/sections/fillion/nav-item.js b/web/client/src/sections/fillion/nav-item.js index 948b41f6..e4d6b4ee 100644 --- a/web/client/src/sections/fillion/nav-item.js +++ b/web/client/src/sections/fillion/nav-item.js @@ -3,7 +3,7 @@ import { Link } from 'react-router-dom'; import { Menu } from 'antd'; import { ReadOutlined } from '@ant-design/icons'; const SubMenu = Menu.SubMenu; -export function getNavItem(user, dispatch) { +export function getNavItem (user, dispatch) { return ( } title={'数据管理'}> @@ -47,6 +47,12 @@ export function getNavItem(user, dispatch) { 宣传视频 + + 异常反馈 + + + 建设上报 + ); } diff --git a/web/client/src/sections/fillion/routes.js b/web/client/src/sections/fillion/routes.js index 39edd68a..c4fc6448 100644 --- a/web/client/src/sections/fillion/routes.js +++ b/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', diff --git a/web/package-lock.json b/web/package-lock.json index 455a90a6..6ec5b3a6 100644 --- a/web/package-lock.json +++ b/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=" } } }, diff --git a/web/package.json b/web/package.json index 5f4f3de9..e91b1530 100644 --- a/web/package.json +++ b/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",