From e0f131e259cc55c8825a272f20002cd452725d77 Mon Sep 17 00:00:00 2001
From: LUCAS
Date: Sat, 30 Jul 2022 13:38:07 +0800
Subject: [PATCH 01/39] =?UTF-8?q?=E6=95=85=E9=9A=9C=E5=A4=84=E7=90=86?=
=?UTF-8?q?=EF=BC=88=E5=B7=A1=E6=9F=A5=EF=BC=8C=E5=85=BB=E6=8A=A4=EF=BC=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/sections/fillion/components/maintenanceTable.js | 7 ++++++-
.../src/sections/fillion/components/patrolTable.js | 9 ++++++++-
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/web/client/src/sections/fillion/components/maintenanceTable.js b/web/client/src/sections/fillion/components/maintenanceTable.js
index ef49add2..f70d234f 100644
--- a/web/client/src/sections/fillion/components/maintenanceTable.js
+++ b/web/client/src/sections/fillion/components/maintenanceTable.js
@@ -99,6 +99,11 @@ const DetailList = (props) => {
render: (text, record) => {
return moment(record.time).format("YYYYMMDD") * 10000 + record.id;
}
+ }, {
+ title: '工程类型',
+ key: 'projectType',
+ dataIndex: 'projectType',
+ align: 'center',
}, {
title: '所属道路',
key: 'road',
@@ -120,7 +125,7 @@ const DetailList = (props) => {
align: 'center'
},
{
- title: '巡查人',
+ title: '养护人',
width: 100,
key: 'userName',
dataIndex: 'userName',
diff --git a/web/client/src/sections/fillion/components/patrolTable.js b/web/client/src/sections/fillion/components/patrolTable.js
index 1f633d9e..be471922 100644
--- a/web/client/src/sections/fillion/components/patrolTable.js
+++ b/web/client/src/sections/fillion/components/patrolTable.js
@@ -100,7 +100,14 @@ const DetailList = (props) => {
render: (text, record) => {
return moment(record.time).format("YYYYMMDD") * 10000 + record.id;
}
- }, {
+ },
+ {
+ title: '工程类型',
+ key: 'projectType',
+ dataIndex: 'projectType',
+ align: 'center',
+ },
+ {
title: '所属道路',
key: 'road',
dataIndex: 'road',
From 6ae33577119edd476621eae58c405c61eb44c4a2 Mon Sep 17 00:00:00 2001
From: "gao.zhiyuan"
Date: Sat, 30 Jul 2022 13:53:38 +0800
Subject: [PATCH 02/39] RESOURCE
---
api/config.js | 2 +-
web/config.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/api/config.js b/api/config.js
index d922a118..7f4d6c59 100644
--- a/api/config.js
+++ b/api/config.js
@@ -23,7 +23,7 @@ const flags = args.parse(process.argv);
const FS_UNIAPP_DB = process.env.FS_UNIAPP_DB || flags.pg;
// const LOCAL_SVR_ORIGIN = process.env.LOCAL_SVR_ORIGIN || flags.fileHost;
-const QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURC || flags.qndmn;
+const QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE || flags.qndmn;
const QINIU_BUCKET_RESOURCE = process.env.ANXINCLOUD_QINIU_BUCKET_RESOURCE || flags.qnbkt;
const QINIU_AK = process.env.ANXINCLOUD_QINIU_ACCESSKEY || flags.qnak;
const QINIU_SK = process.env.ANXINCLOUD_QINIU_SECRETKEY || flags.qnsk;
diff --git a/web/config.js b/web/config.js
index 4acfc2b1..babd0300 100644
--- a/web/config.js
+++ b/web/config.js
@@ -21,7 +21,7 @@ args.option('qndmn', '七牛');
const flags = args.parse(process.argv);
const FS_UNIAPP_API = process.env.FS_UNIAPP_API || flags.apiUrl;
-const QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURC || flags.qndmn;
+const QINIU_DOMAIN_QNDMN_RESOURCE = process.env.ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE || flags.qndmn;
const API_URL = process.env.API_URL || flags.apiUrl;
if (!FS_UNIAPP_API) {
From 590ec5dd25f7275421165c0d9b175c38d791c4c3 Mon Sep 17 00:00:00 2001
From: wangyue
Date: Sat, 30 Jul 2022 13:58:39 +0800
Subject: [PATCH 03/39] =?UTF-8?q?=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../footer/leadership/left/left-center.js | 8 ++++----
.../footer/leadership/left/left-top.js | 1 -
.../footer/leadership/right/right-top.js | 16 ++++++++--------
3 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/web/client/src/sections/quanju/containers/footer/leadership/left/left-center.js b/web/client/src/sections/quanju/containers/footer/leadership/left/left-center.js
index 16004033..c6c6bf1c 100644
--- a/web/client/src/sections/quanju/containers/footer/leadership/left/left-center.js
+++ b/web/client/src/sections/quanju/containers/footer/leadership/left/left-center.js
@@ -70,7 +70,7 @@ const Leftcenter = () => {
- {
+ {/* {
list.map((item, index) => {
return index + 1 == num ?
@@ -86,15 +86,15 @@ const Leftcenter = () => {
})
- }
+ } */}
-
+ /> */}
>
)
diff --git a/web/client/src/sections/quanju/containers/footer/leadership/left/left-top.js b/web/client/src/sections/quanju/containers/footer/leadership/left/left-top.js
index 373f10e0..9184450f 100644
--- a/web/client/src/sections/quanju/containers/footer/leadership/left/left-top.js
+++ b/web/client/src/sections/quanju/containers/footer/leadership/left/left-top.js
@@ -19,7 +19,6 @@ const Lefttop = (props) => {
setspeed(res.payload.data.speed)
})
}, [])
-
// console.log(mass);
return (
<>
diff --git a/web/client/src/sections/quanju/containers/footer/leadership/right/right-top.js b/web/client/src/sections/quanju/containers/footer/leadership/right/right-top.js
index 6e126ce4..33f01995 100644
--- a/web/client/src/sections/quanju/containers/footer/leadership/right/right-top.js
+++ b/web/client/src/sections/quanju/containers/footer/leadership/right/right-top.js
@@ -77,13 +77,13 @@ const Righttop = () => {
-
监控总数
129
-
在线率
88.87%
+ {/*
监控总数
129
+
在线率
88.87%
*/}
-
+ {/*
*/}
-
+ */}
{/*
{size}
*/}
-
+ {/* */}
@@ -112,13 +112,13 @@ const Righttop = () => {
{/* */}
-
+ /> */}
{/* */}
From 59d3d926b84e633c6a3a6135067bb89ea274a658 Mon Sep 17 00:00:00 2001
From: "gao.zhiyuan"
Date: Sat, 30 Jul 2022 13:59:13 +0800
Subject: [PATCH 04/39] =?UTF-8?q?=E6=96=87=E4=BB=B6=20200M?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/config.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/api/config.js b/api/config.js
index 7f4d6c59..109b5bad 100644
--- a/api/config.js
+++ b/api/config.js
@@ -52,7 +52,7 @@ const product = {
accessKey: QINIU_AK,
secretKey: QINIU_SK
},
- maxSize: 104857600, // 100M
+ maxSize: 104857600 * 2, // 100M * 2
}
}, {
entry: require('./app').entry,
From 7f197eae94c46bfdc9adadd1cc3a2c5b45f6b68f Mon Sep 17 00:00:00 2001
From: wanyiwei
Date: Sat, 30 Jul 2022 14:06:21 +0800
Subject: [PATCH 05/39] =?UTF-8?q?*=E5=A4=A7=E5=B1=8F=E8=A7=86=E9=A2=91?=
=?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=B3=A8=E9=87=8A=E9=9A=90=E8=97=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../containers/footer/operation/right.js | 42 +++++++++----------
1 file changed, 21 insertions(+), 21 deletions(-)
diff --git a/web/client/src/sections/quanju/containers/footer/operation/right.js b/web/client/src/sections/quanju/containers/footer/operation/right.js
index 05561a68..87407e3a 100644
--- a/web/client/src/sections/quanju/containers/footer/operation/right.js
+++ b/web/client/src/sections/quanju/containers/footer/operation/right.js
@@ -1,32 +1,32 @@
import React, { useState } from 'react'
-import { Carousel } from 'antd';
+// import { Carousel } from 'antd';
import Module from '../../public/module'
const Right = () => {
- const [dataLists, setDataList] = useState([
- {
- route: '147',
- plate: '赣APJ090'
- }, {
- route: '166',
- plate: '赣APJ087'
- }, {
- route: '171',
- plate: '赣APJ184'
- }, {
- route: '186',
- plate: '赣APJ241'
- }, {
- route: '199',
- plate: '赣APJ337'
- }
- ])
+ // const [dataLists, setDataList] = useState([
+ // {
+ // route: '147',
+ // plate: '赣APJ090'
+ // }, {
+ // route: '166',
+ // plate: '赣APJ087'
+ // }, {
+ // route: '171',
+ // plate: '赣APJ184'
+ // }, {
+ // route: '186',
+ // plate: '赣APJ241'
+ // }, {
+ // route: '199',
+ // plate: '赣APJ337'
+ // }
+ // ])
const style = { height: "97%", marginTop: "3%" }
return (
From f728f3236f8de73ccec5cd79be49babeaf979227 Mon Sep 17 00:00:00 2001
From: "gao.zhiyuan"
Date: Sat, 30 Jul 2022 14:14:43 +0800
Subject: [PATCH 06/39] =?UTF-8?q?=E5=87=BA=E7=A7=9F=E8=BD=A6=E4=B8=8D?=
=?UTF-8?q?=E5=AF=BC=E5=87=BA=E5=93=81=E5=90=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/app/lib/controllers/data/index.js | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/api/app/lib/controllers/data/index.js b/api/app/lib/controllers/data/index.js
index 4dc8cb25..d7b75558 100644
--- a/api/app/lib/controllers/data/index.js
+++ b/api/app/lib/controllers/data/index.js
@@ -79,9 +79,13 @@ async function dataExport (ctx) {
const tableAttributes = models[modalOption.tableName].tableAttributes
let header = []
for (let k in tableAttributes) {
- if (k != 'id' && tableAttributes[k].comment) {
+ const comment = tableAttributes[k].comment
+ if (k != 'id' && comment) {
+ if (comment == '品名' && municipalType == '出租车') {
+ continue
+ }
header.push({
- title: tableAttributes[k].comment || '-',
+ title: comment || '-',
key: k,
index: tableAttributes[k].index,
})
From 03fa889d51032db006ba1fa2e6dee3d22116a9c8 Mon Sep 17 00:00:00 2001
From: liujiangyong
Date: Sat, 30 Jul 2022 14:17:15 +0800
Subject: [PATCH 07/39] =?UTF-8?q?=E8=A7=86=E9=A2=91=E4=B8=8A=E4=BC=A0?=
=?UTF-8?q?=E5=88=B0=E4=B8=83=E7=89=9B=E4=BA=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
weapp/src/config.js | 4 +-
weapp/src/packages/patrol/index.jsx | 150 +++++++++++++++++++++-------
weapp/src/services/api.js | 5 +
3 files changed, 123 insertions(+), 36 deletions(-)
diff --git a/weapp/src/config.js b/weapp/src/config.js
index d2cb8303..e9e247b1 100644
--- a/weapp/src/config.js
+++ b/weapp/src/config.js
@@ -9,10 +9,10 @@ const baseConfig = {
const development = {
// baseUrl: 'http://221.230.55.29:31919',
- baseUrl: 'https://c5a6-117-90-37-10.ap.ngrok.io',
+ baseUrl: 'https://d763-117-90-37-10.ap.ngrok.io',
// webUrl: 'https://smartwater.anxinyun.cn',
// pcode: 'fce4afe2-5b6a-408a-ab18-a2afa7fa027c',
- imgUrl: 'http://test.resources.anxinyun.cn/',
+ imgUrl: 'http://rfkimpwbb.hn-bkt.clouddn.com/',
// requestCache: true, //开启异步请求缓存
...baseConfig
};
diff --git a/weapp/src/packages/patrol/index.jsx b/weapp/src/packages/patrol/index.jsx
index b4cbdbf5..f491864d 100644
--- a/weapp/src/packages/patrol/index.jsx
+++ b/weapp/src/packages/patrol/index.jsx
@@ -4,10 +4,14 @@ import { View, RadioGroup, Radio, Image, Input, Picker } from '@tarojs/component
import { AtButton, AtTextarea, AtImagePicker } from 'taro-ui';
import InputPicker from '../components/inputPicker';
import request from '@/services/request';
-import { postReport, getReportDetail, delReport, getRoadSection } from '@/services/api';
+import environment from '../../config';
+import { getState } from '../../store/globalState';
+import { postReport, getReportDetail, delReport, getRoadSection, postImage } from '@/services/api';
import './index.scss';
import arrowIcon from '../../static/img/patrol/arrow-down.svg';
+const { baseUrl, imgUrl } = environment;
+
const Index = () => {
const userInfo = Taro.getStorageSync('userInfo') || {};
const isSuperAdmin = userInfo && userInfo.username === 'SuperAdmin' ? true : false
@@ -30,15 +34,20 @@ const Index = () => {
const [longitude, setLongitude] = useState(0) // 经度
const [latitude, setLatitude] = useState(0) // 纬度
+ const [sceneImg, setSceneImg] = useState([]) // 现场图片七牛云url
+ const [conserveBeforeImg, setConserveBeforeImg] = useState([]) // 养护前图片
+ const [conserveUnderwayImg, setConserveUnderwayImg] = useState([]) // 养护中图片
+ const [conserveAfterImg, setConserveAfterImg] = useState([]) // 养护后图片
+
const [sourceRoadSel, setSourceRoadSel] = useState([])
const [sourceRoadStartSel, setSourceRoadStartSel] = useState([])
const [sourceRoadEndSel, setSourceRoadEndSel] = useState([])
const prjType = [
- { text: '道路', value: 'road'},
- { text: '桥梁', value: 'bridge'},
- { text: '涵洞', value: 'culvert'},
- { text: '其他', value: 'other'},
+ { text: '道路', value: 'road' },
+ { text: '桥梁', value: 'bridge' },
+ { text: '涵洞', value: 'culvert' },
+ { text: '其他', value: 'other' },
]
const prjTypeSelector = ['道路', '桥梁', '涵洞', '其他']
const [roadStartSel, setRoadStartSel] = useState([])
@@ -80,10 +89,10 @@ const Index = () => {
setRoadSectionEnd(data.roadSectionEnd)
setAddress(data.address)
setContent(data.content)
- setScenePic(data.scenePic ? data.scenePic.map(item => ({ url: item })) : [])
- setConserveBeforePic(data.conserveBeforePic ? data.conserveBeforePic.map(item => ({ url: item })) : [])
- setConserveUnderwayPic(data.conserveUnderwayPic ? data.conserveUnderwayPic.map(item => ({ url: item })) : [])
- setConserveAfterPic(data.conserveAfterPic ? data.conserveAfterPic.map(item => ({ url: item })) : [])
+ setScenePic(data.scenePic ? data.scenePic.map(item => ({ url: imgUrl + item })) : [])
+ setConserveBeforePic(data.conserveBeforePic ? data.conserveBeforePic.map(item => ({ url: imgUrl + item })) : [])
+ setConserveUnderwayPic(data.conserveUnderwayPic ? data.conserveUnderwayPic.map(item => ({ url: imgUrl + item })) : [])
+ setConserveAfterPic(data.conserveAfterPic ? data.conserveAfterPic.map(item => ({ url: imgUrl + item })) : [])
} else {
Taro.showToast({ title: res.data.message || '请求出错', icon: 'none' })
}
@@ -176,11 +185,11 @@ const Index = () => {
latitude
}
if (reportType === 'patrol') {
- data['scenePic'] = scenePic.length > 0 ? scenePic.map(item => item.url) : null
+ data['scenePic'] = sceneImg
} else {
- data['conserveBeforePic'] = conserveBeforePic.length > 0 ? conserveBeforePic.map(item => item.url) : null
- data['conserveUnderwayPic'] = conserveUnderwayPic.length > 0 ? conserveUnderwayPic.map(item => item.url) : null
- data['conserveAfterPic'] = conserveAfterPic.length > 0 ? conserveAfterPic.map(item => item.url) : null
+ data['conserveBeforePic'] = conserveBeforeImg
+ data['conserveUnderwayPic'] = conserveUnderwayImg
+ data['conserveAfterPic'] = conserveAfterImg
}
Taro.showModal({
@@ -272,24 +281,97 @@ const Index = () => {
setReportType(e.detail.value)
}
- function handleImgChange(files, type) {
- switch (type) {
- case 'scenePic':
- setScenePic(files)
- break;
- case 'conserveBeforePic':
- setConserveBeforePic(files)
- break;
- case 'conserveUnderwayPic':
- setConserveUnderwayPic(files)
- break;
- case 'conserveAfterPic':
- setConserveAfterPic(files)
- break;
- default:
- break;
+ function handleImgChange(files, operationType, index, type) {
+ if (operationType === 'remove') {
+ setImg(false)
+ }
+ function setImg(isAdd, url) {
+ switch (type) {
+ case 'scenePic':
+ let nextImg = sceneImg
+ if (isAdd) {
+ nextImg.push(url)
+ } else {
+ nextImg.splice(index, 1)
+ }
+ setSceneImg(nextImg)
+ setScenePic(files)
+ break;
+ case 'conserveBeforePic':
+ let nextConserveBeforeImg = conserveBeforeImg
+ if (isAdd) {
+ nextConserveBeforeImg.push(url)
+ } else {
+ nextConserveBeforeImg.splice(index, 1)
+ }
+ setConserveBeforeImg(nextConserveBeforeImg)
+ setConserveBeforePic(files)
+ break;
+ case 'conserveUnderwayPic':
+ let nextConserveUnderwayImg = conserveUnderwayImg
+ if (isAdd) {
+ nextConserveUnderwayImg.push(url)
+ } else {
+ nextConserveUnderwayImg.splice(index, 1)
+ }
+ setConserveUnderwayImg(nextConserveUnderwayImg)
+ setConserveUnderwayPic(files)
+ break;
+ case 'conserveAfterPic':
+ let nextConserveAfterImg = conserveAfterImg
+ if (isAdd) {
+ nextConserveAfterImg.push(url)
+ } else {
+ nextConserveAfterImg.splice(index, 1)
+ }
+ setConserveAfterImg(nextConserveAfterImg)
+ setConserveAfterPic(files)
+ break;
+ default:
+ break;
+ }
+ }
+ if (operationType === 'add' && files.length > 0) {
+ Taro.showLoading({ title: '上传中' })
+ let i = 0
+ switch (type) {
+ case 'scenePic':
+ i = scenePic.length
+ break;
+ case 'conserveBeforePic':
+ i = conserveBeforePic.length
+ break;
+ case 'conserveUnderwayPic':
+ i = conserveUnderwayPic.length
+ break;
+ case 'conserveAfterPic':
+ i = conserveAfterPic.length
+ break;
+ default:
+ break;
+ }
+ for (i; i < files.length; i++) {
+ const tempFilePaths = files[i].url
+ let token = getState('token') || Taro.getStorageSync('token')
+ Taro.uploadFile({
+ url: `${baseUrl}${postImage()}?token=${token}`,
+ filePath: tempFilePaths,
+ name: 'file',
+ success: (res) => {
+ if (i === files.length) {
+ Taro.hideLoading();
+ }
+ if (res.statusCode == 200) {
+ setImg(true, JSON.parse(res.data).key)
+ } else {
+ Taro.showToast({ title: '上传失败,请重试', icon: 'error' })
+ }
+ }
+ });
+ }
}
}
+
function handleImgClick(index, file) {
Taro.previewImage({
urls: [file.url] // 需要预览的图片http链接列表
@@ -397,7 +479,7 @@ const Index = () => {
handleInput(e, 'content')}
disabled={isView}
@@ -419,7 +501,7 @@ const Index = () => {
count={3 - scenePic.length}
showAddBtn={scenePic.length >= 3 ? false : true}
files={scenePic}
- onChange={files => handleImgChange(files, 'scenePic')}
+ onChange={(files, operationType, index) => handleImgChange(files, operationType, index, 'scenePic')}
onImageClick={handleImgClick}
/>
}
@@ -442,7 +524,7 @@ const Index = () => {
count={3 - conserveBeforePic.length}
showAddBtn={conserveBeforePic.length >= 3 ? false : true}
files={conserveBeforePic}
- onChange={files => handleImgChange(files, 'conserveBeforePic')}
+ onChange={(files, operationType, index) => handleImgChange(files, operationType, index, 'conserveBeforePic')}
onImageClick={handleImgClick}
/>
}
@@ -462,7 +544,7 @@ const Index = () => {
count={3 - conserveUnderwayPic.length}
showAddBtn={conserveUnderwayPic.length >= 3 ? false : true}
files={conserveUnderwayPic}
- onChange={files => handleImgChange(files, 'conserveUnderwayPic')}
+ onChange={(files, operationType, index) => handleImgChange(files, operationType, index, 'conserveUnderwayPic')}
onImageClick={handleImgClick}
/>
}
@@ -483,7 +565,7 @@ const Index = () => {
count={3 - conserveAfterPic.length}
showAddBtn={conserveAfterPic.length >= 3 ? false : true}
files={conserveAfterPic}
- onChange={files => handleImgChange(files, 'conserveAfterPic')}
+ onChange={(files, operationType, index) => handleImgChange(files, operationType, index, 'conserveAfterPic')}
onImageClick={handleImgClick}
/>
}
diff --git a/weapp/src/services/api.js b/weapp/src/services/api.js
index cecf30b2..2bd2ba09 100644
--- a/weapp/src/services/api.js
+++ b/weapp/src/services/api.js
@@ -37,6 +37,11 @@ export const getRoadSection = () => {
return `/road/section`;
};
+// 上传图片
+export const postImage = () => {
+ return `/attachments/report`;
+};
+
//行业查询
export const getIndustryUrl = () => {
return `/elec/business/industry`
From c2a82d881809c2d7e6117027d6b7c7f50d891499 Mon Sep 17 00:00:00 2001
From: "gao.zhiyuan"
Date: Sat, 30 Jul 2022 14:20:45 +0800
Subject: [PATCH 08/39] =?UTF-8?q?=20=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86-?=
=?UTF-8?q?=E5=88=A0=E9=99=A4=E9=83=A8=E9=97=A8=E5=90=8E=E9=87=8D=E6=96=B0?=
=?UTF-8?q?=E5=88=9B=E5=BB=BA=E7=9B=B8=E5=90=8C=E5=90=8D=E7=A7=B0=E9=83=A8?=
=?UTF-8?q?=E9=97=A8=E5=A4=B1=E8=B4=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/app/lib/controllers/organization/department.js | 1 +
web/package.json | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/api/app/lib/controllers/organization/department.js b/api/app/lib/controllers/organization/department.js
index 9e55dc35..f6e64304 100644
--- a/api/app/lib/controllers/organization/department.js
+++ b/api/app/lib/controllers/organization/department.js
@@ -89,6 +89,7 @@ async function editDep (ctx) {
where: {
dependence: dependence || null,
name: name,
+ delete: false,
}
})
if (repeatNameCount) {
diff --git a/web/package.json b/web/package.json
index b8aaf86a..7cd3d607 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:4000 --qndmn http://rfkimpwbb.hn-bkt.clouddn.com",
+ "start-params": "node server -p 5000 -u http://localhost:14000 --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",
From 770ab3edf04d44886f49a0093a36f789157e8b94 Mon Sep 17 00:00:00 2001
From: liujiangyong
Date: Sat, 30 Jul 2022 14:27:31 +0800
Subject: [PATCH 09/39] =?UTF-8?q?(fix)=E5=B7=A1=E6=9F=A5=E5=86=85=E5=AE=B9?=
=?UTF-8?q?=E5=AD=97=E6=95=B0=E9=99=90=E5=88=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
weapp/src/packages/patrol/index.jsx | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/weapp/src/packages/patrol/index.jsx b/weapp/src/packages/patrol/index.jsx
index f491864d..abe505fc 100644
--- a/weapp/src/packages/patrol/index.jsx
+++ b/weapp/src/packages/patrol/index.jsx
@@ -171,6 +171,10 @@ const Index = () => {
Taro.showToast({ title: '工程类型错误', icon: 'none' })
return
}
+ if (content.length > 50) {
+ Taro.showToast({ title: '内容字数不能超过50', icon: 'none' })
+ return
+ }
const reportProjectType = prjType[prjTypeSelector.indexOf(projectType)].value
let data = {
From a51a11c663772c171a7af6a726d14bab5a3a7f01 Mon Sep 17 00:00:00 2001
From: xingyongchun
Date: Sat, 30 Jul 2022 14:33:45 +0800
Subject: [PATCH 10/39] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E8=A1=A8=E5=A4=B4?=
=?UTF-8?q?=E4=B8=8D=E5=8C=B9=E9=85=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../fillion/components/bridgeTable.js | 8 +++---
.../fillion/components/highwaysTable.js | 4 +++
.../sections/fillion/components/inforTable.js | 4 +--
.../fillion/components/operationalTable.js | 25 +++++++++++--------
.../fillion/components/publicTable.js | 8 +++---
.../fillion/components/transportationTable.js | 16 ++++++------
6 files changed, 37 insertions(+), 28 deletions(-)
diff --git a/web/client/src/sections/fillion/components/bridgeTable.js b/web/client/src/sections/fillion/components/bridgeTable.js
index 770a0e84..1e22bc37 100644
--- a/web/client/src/sections/fillion/components/bridgeTable.js
+++ b/web/client/src/sections/fillion/components/bridgeTable.js
@@ -1534,13 +1534,13 @@ const BrideTable = (props) => {
>
新增
-
+ */}
@@ -1717,13 +1717,13 @@ const BrideTable = (props) => {
>
新增
-
+ */}
diff --git a/web/client/src/sections/fillion/components/highwaysTable.js b/web/client/src/sections/fillion/components/highwaysTable.js
index ccb7dd53..cc47a244 100644
--- a/web/client/src/sections/fillion/components/highwaysTable.js
+++ b/web/client/src/sections/fillion/components/highwaysTable.js
@@ -37,6 +37,7 @@ const hightModal = (type, record) => {
dataIndex: 'placeName',
fixed: 'left',
width: 120,
+ search: false,
options: 1,
backgroundColor: "#ffffff",
fieldProps: {
@@ -91,6 +92,9 @@ const hightModal = (type, record) => {
actionRef={ref}
scroll={{ x: 800 }}
options={false}
+ form={{
+ submitter:false
+ }}
// ref={c => { finishedProductTable = c; }}
style={{ width: "100% ", overflow: "auto", height: '760px' }}
rowKey='id'
diff --git a/web/client/src/sections/fillion/components/inforTable.js b/web/client/src/sections/fillion/components/inforTable.js
index fd616f41..88738971 100644
--- a/web/client/src/sections/fillion/components/inforTable.js
+++ b/web/client/src/sections/fillion/components/inforTable.js
@@ -381,13 +381,13 @@ const InForTable = (props) => {
>
新增
-
+ */}
diff --git a/web/client/src/sections/fillion/components/operationalTable.js b/web/client/src/sections/fillion/components/operationalTable.js
index d61da928..79d5fff3 100644
--- a/web/client/src/sections/fillion/components/operationalTable.js
+++ b/web/client/src/sections/fillion/components/operationalTable.js
@@ -723,7 +723,7 @@ const OperaTionalTable = (props) => {
>
新增
-
+ */}
@@ -1356,7 +1356,7 @@ const OperaTionalTable = (props) => {
>
新增
-
+ */}
@@ -1826,7 +1826,7 @@ const OperaTionalTable = (props) => {
>
新增
-
+ */}
@@ -1848,6 +1848,9 @@ const OperaTionalTable = (props) => {
{
}, {
key: 'tab4',
label: {
- setDifferentiate('business')
- setRewkeys('yehu')
+ setDifferentiate('business')
+ setRewkeys('yehu')
}}>业户{activeKey === 'tab4'},
},
@@ -1900,7 +1903,9 @@ const OperaTionalTable = (props) => {
ref={c => { finishedProductTable = c; }}
style={{ width: "100% ", overflow: "auto", height: '760px' }}
rowKey='id'
- rowSelection={{
+ // alwaysShowAlert
+ // tableAlertRender={true}
+ rowSelection={ rewkeys=='keyun'?false:{
selectedRowKeys: rowSelected,
onChange: (selectedRowKeys) => {
setRowSelected(selectedRowKeys);
@@ -1966,7 +1971,7 @@ const OperaTionalTable = (props) => {
defaultCollapsed: false,
optionRender: (searchConfig, formProps, dom) => [
...dom.reverse(),
- ['tab2', 'tab3', 'tab4'].includes(activeKey) ? { props.exports(rowSelected,differentiate,genre) }}>
+ ['tab2', 'tab3', 'tab4'].includes(activeKey) ? { props.exports(rowSelected, differentiate, genre) }}>
-
+ */}
@@ -1129,7 +1129,7 @@ const PublicTable = (props) => {
>
新增
-
+ */}
diff --git a/web/client/src/sections/fillion/components/transportationTable.js b/web/client/src/sections/fillion/components/transportationTable.js
index c6dafcdd..3b7a7c8f 100644
--- a/web/client/src/sections/fillion/components/transportationTable.js
+++ b/web/client/src/sections/fillion/components/transportationTable.js
@@ -1208,7 +1208,7 @@ const TransporTationTable = (props) => {
>
新增
-
+ */}
);
},
@@ -2363,7 +2363,7 @@ const TransporTationTable = (props) => {
>
新增
-
+ */}
@@ -3519,7 +3519,7 @@ const TransporTationTable = (props) => {
>
新增
-
+ */}
@@ -3706,13 +3706,13 @@ const TransporTationTable = (props) => {
>
新增
-
+ */}
From c1e23e70a3ab643eae0014127e2d0e834f0cca90 Mon Sep 17 00:00:00 2001
From: LUCAS
Date: Sat, 30 Jul 2022 14:38:16 +0800
Subject: [PATCH 11/39] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../fillion/components/maintenanceTable.js | 15 +++++++++++----
.../sections/fillion/components/patrolTable.js | 15 ++++++++++++---
.../src/sections/fillion/components/protable.less | 3 ++-
3 files changed, 25 insertions(+), 8 deletions(-)
diff --git a/web/client/src/sections/fillion/components/maintenanceTable.js b/web/client/src/sections/fillion/components/maintenanceTable.js
index f70d234f..fd71bb1a 100644
--- a/web/client/src/sections/fillion/components/maintenanceTable.js
+++ b/web/client/src/sections/fillion/components/maintenanceTable.js
@@ -119,7 +119,7 @@ const DetailList = (props) => {
}
},
{
- title: '缺陷名称',
+ title: '具体内容',
key: 'content',
dataIndex: 'content',
align: 'center'
@@ -191,7 +191,14 @@ const DetailList = (props) => {
const PatrolNameList = (props) => {
const [users, setUsers] = useState([]);
const { onChange, record, userList, loading } = props;
- const { name } = record || { name: '' }
+ const [selectRoad, setSelectRoad] = useState();
+
+ useEffect(() => {
+ if (userList && userList instanceof Array && userList.length) {
+ setSelectRoad(userList[0].id)
+ // onChange(userList[0]);
+ }
+ }, [userList])
const columns = [
{
title: '巡更人员',
@@ -230,7 +237,7 @@ const PatrolNameList = (props) => {
loading={loading}
rowKey="name"
rowClassName={(record) => {
- return record.patrolName === name ? styles['split-row-select-active'] : '';
+ return record.id == selectRoad ? 'list-row-actived' : '';
}}
toolBarRender={() => [
@@ -242,7 +249,7 @@ const PatrolNameList = (props) => {
return {
onClick: () => {
if (record) {
- console.log('record:', record)
+ setSelectRoad(record.id);
onChange(record);
}
},
diff --git a/web/client/src/sections/fillion/components/patrolTable.js b/web/client/src/sections/fillion/components/patrolTable.js
index be471922..2b1e796d 100644
--- a/web/client/src/sections/fillion/components/patrolTable.js
+++ b/web/client/src/sections/fillion/components/patrolTable.js
@@ -122,7 +122,7 @@ const DetailList = (props) => {
}
},
{
- title: '缺陷名称',
+ title: '具体内容',
key: 'content',
dataIndex: 'content',
align: 'center'
@@ -194,7 +194,15 @@ const DetailList = (props) => {
const PatrolNameList = (props) => {
const [users, setUsers] = useState([]);
const { onChange, record, userList, loading } = props;
- const { name } = record || { name: '' }
+ const [selectRoad, setSelectRoad] = useState();
+
+ useEffect(() => {
+ if (userList && userList instanceof Array && userList.length) {
+ setSelectRoad(userList[0].id)
+ // onChange(userList[0]);
+ }
+ }, [userList])
+
const columns = [
{
title: '巡更人员',
@@ -232,7 +240,7 @@ const PatrolNameList = (props) => {
loading={loading}
rowKey="name"
rowClassName={(record) => {
- return record.patrolName === name ? styles['split-row-select-active'] : '';
+ return record.id == selectRoad ? 'list-row-actived' : '';
}}
toolBarRender={() => [
@@ -245,6 +253,7 @@ const PatrolNameList = (props) => {
onClick: () => {
if (record) {
// console.log('record:', record)
+ setSelectRoad(record.id);
onChange(record);
}
},
diff --git a/web/client/src/sections/fillion/components/protable.less b/web/client/src/sections/fillion/components/protable.less
index 6d66a5df..d8476511 100644
--- a/web/client/src/sections/fillion/components/protable.less
+++ b/web/client/src/sections/fillion/components/protable.less
@@ -10,8 +10,9 @@
}
.list-row-actived {
- background-color: #7cafc6;
+ background-color: #e2f6ff;
font-weight: 600;
+ color: #1E80FF
}
From f9b6cb5471698be46ace8c411871340797dd33e4 Mon Sep 17 00:00:00 2001
From: xingyongchun
Date: Sat, 30 Jul 2022 14:47:27 +0800
Subject: [PATCH 12/39] =?UTF-8?q?=E5=85=AC=E4=BA=A4=E5=AF=BC=E5=87=BA?=
=?UTF-8?q?=E5=A4=B1=E8=B4=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../fillion/components/publicTable.js | 2 +-
.../src/sections/fillion/containers/public.js | 22 +++++++++++--------
2 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/web/client/src/sections/fillion/components/publicTable.js b/web/client/src/sections/fillion/components/publicTable.js
index 666e8164..c16271a1 100644
--- a/web/client/src/sections/fillion/components/publicTable.js
+++ b/web/client/src/sections/fillion/components/publicTable.js
@@ -1231,7 +1231,7 @@ const PublicTable = (props) => {
defaultCollapsed: false,
optionRender: (searchConfig, formProps, dom) => [
...dom.reverse(),
- { props.exports(rowSelected, counts) }}>
+ { props.exports(rowSelected,rewkeys ) }}>
- {isNaN((speed + ((Math.random() * (6) - 3))).toFixed(2)) ? "" : (speed + ((Math.random() * (6) - 3))).toFixed(2)}Km/h
+ {isNaN(nums) ? "" : (nums)}Km/h
From a1dbd74f50d9b0b935ecb412b116b8c96fe0e1ac Mon Sep 17 00:00:00 2001
From: "gao.zhiyuan"
Date: Sat, 30 Jul 2022 15:01:28 +0800
Subject: [PATCH 15/39] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F-=E5=B7=A1?=
=?UTF-8?q?=E6=9F=A5=E5=85=BB=E6=8A=A4=E5=88=97=E8=A1=A8=E5=BB=BA=E8=AE=AE?=
=?UTF-8?q?=E6=8C=89=E7=85=A7=E4=B8=8A=E6=8A=A5=E6=97=B6=E9=97=B4=E9=99=8D?=
=?UTF-8?q?=E5=BA=8F=E5=B1=95=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/app/lib/controllers/report/index.js | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/api/app/lib/controllers/report/index.js b/api/app/lib/controllers/report/index.js
index bbaf89c6..c7aa1d18 100644
--- a/api/app/lib/controllers/report/index.js
+++ b/api/app/lib/controllers/report/index.js
@@ -1,7 +1,7 @@
'use strict';
const { QueryTypes } = require('sequelize');
-async function reportList(ctx) {
+async function reportList (ctx) {
try {
const models = ctx.fs.dc.models;
const { limit, page, startTime, endTime, keyword, userId, reportType, isTop } = ctx.query
@@ -14,6 +14,7 @@ async function reportList(ctx) {
model: models.User,
attributes: ['name']
}],
+ order: [['time', 'DESC']],
}
if (limit) {
findOption.limit = limit
@@ -60,7 +61,7 @@ async function reportList(ctx) {
}
}
-async function reportPosition(ctx) {
+async function reportPosition (ctx) {
try {
const models = ctx.fs.dc.models;
const { startTime, endTime, userId, reportType } = ctx.query
@@ -110,7 +111,7 @@ async function reportPosition(ctx) {
}
}
-async function reportDetail(ctx) {
+async function reportDetail (ctx) {
try {
const models = ctx.fs.dc.models;
const { reportId } = ctx.params
@@ -132,7 +133,7 @@ async function reportDetail(ctx) {
}
}
-async function createReport(ctx) {
+async function createReport (ctx) {
try {
const { userId } = ctx.fs.api
const models = ctx.fs.dc.models;
@@ -154,7 +155,7 @@ async function createReport(ctx) {
}
}
-async function deleteReport(ctx) {
+async function deleteReport (ctx) {
try {
const models = ctx.fs.dc.models;
const { reportId } = ctx.params;
From 1fb203373aa889fed5c112440ec8a0a2aa93774e Mon Sep 17 00:00:00 2001
From: yangsen <952208207@qq.com>
Date: Sat, 30 Jul 2022 15:17:30 +0800
Subject: [PATCH 16/39] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=8A=E4=BC=A0?=
=?UTF-8?q?=E8=A7=86=E9=A2=91=E4=B8=AA=E6=95=B0=EF=BC=8C=E6=96=B0=E5=A2=9E?=
=?UTF-8?q?=E5=8F=96=E6=B6=88=E6=B8=85=E7=A9=BA=E8=A1=A8=E5=8D=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/sections/fillion/actions/infor.js | 6 ++--
.../fillion/components/infor/videoUpload.js | 31 ++++++++++++-------
2 files changed, 22 insertions(+), 15 deletions(-)
diff --git a/web/client/src/sections/fillion/actions/infor.js b/web/client/src/sections/fillion/actions/infor.js
index 83837a88..b06d0c5f 100644
--- a/web/client/src/sections/fillion/actions/infor.js
+++ b/web/client/src/sections/fillion/actions/infor.js
@@ -343,7 +343,7 @@ export function putAddPropagata (query) {
data: query,
actionType: 'PUT_PROPAGATA',
url: ApiTable.putpropagata,
- msg: { error: '新增宣传视频信息失败' },
+ msg: { option: '新增宣传视频' },
// reducer: { name: 'reportstatistic' }
});
}
@@ -354,7 +354,7 @@ export function putEditPropagata (query) {
data: query,
actionType: 'PUT_PROPAGATA',
url: ApiTable.putpropagata,
- msg: { error: '编辑宣传视频信息失败' },
+ msg: { option: '编辑宣传视频' },
// reducer: { name: 'reportstatistic' }
});
}
@@ -364,7 +364,7 @@ export function delPropagata (query) {
dispatch: dispatch,
actionType: 'DEL_PROPAGATA',
url: ApiTable.delpropagata.replace("{publicityId}", query?.publicityId),
- msg: { error: '删除宣传视频信息失败' },
+ msg: { option: '删除宣传视频信息' },
// reducer: { name: 'reportstatistic' }
});
}
\ No newline at end of file
diff --git a/web/client/src/sections/fillion/components/infor/videoUpload.js b/web/client/src/sections/fillion/components/infor/videoUpload.js
index 0bfc3c40..2f1a5607 100644
--- a/web/client/src/sections/fillion/components/infor/videoUpload.js
+++ b/web/client/src/sections/fillion/components/infor/videoUpload.js
@@ -9,7 +9,6 @@ import { getPropagata } from '../../actions/infor';
const VideoUpload = (props) => {
-
const { dispatch, record, counts, setCounts } = props
const [form] = Form.useForm();
@@ -20,11 +19,9 @@ const VideoUpload = (props) => {
}
const showModalEdit = () => {
-
setIsModalVisible(true);
};
-
//新增
const handleOkAdd = () => {
form.validateFields().then((values) => {
@@ -49,24 +46,28 @@ const VideoUpload = (props) => {
form.validateFields().then((values) => {
const videoname = values.username
const id = record.id
- const video = record.video
-
- const data = { publicityId: id, name: videoname, video: video }
+ const newVideoAddress = values.video.map((item) => {
+ return item.storageUrl
+ })
+ const data = { publicityId: id, name: videoname, video: newVideoAddress }
dispatch(putEditPropagata(data)).then(() => {
dispatch(getPropagata()).then((res) => {
setCounts(res.payload.data)
-
+ console.log(data);
})
})
-
+ setIsModalVisible(false);
}
);
- setIsModalVisible(false);
};
const handleCancel = () => {
setIsModalVisible(false);
};
+ const handleCancelEdit = () => {
+ setIsModalVisible(false);
+ form.resetFields()
+ };
const onFinish = (values) => {
console.log('Success:', values);
@@ -80,7 +81,7 @@ const VideoUpload = (props) => {
{
props.type_ys ?
-
+
From c6ceb741424d7d24e156b3058ada85fddccdc348 Mon Sep 17 00:00:00 2001
From: LUCAS
Date: Sat, 30 Jul 2022 15:33:50 +0800
Subject: [PATCH 17/39] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E5=8A=9F=E8=83=BD?=
=?UTF-8?q?=E6=B7=BB=E5=8A=A0-=E5=B7=A1=E6=9B=B4/=E5=85=BB=E6=8A=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/.vscode/launch.json | 4 ++--
api/app/lib/controllers/data/index.js | 10 ++++++++++
api/app/lib/models/report.js | 16 ++++++++--------
.../fillion/components/maintenanceTable.js | 9 ++++++++-
.../sections/fillion/components/patrolTable.js | 11 +++++++++--
.../sections/fillion/containers/maintenance.js | 16 ++++------------
.../src/sections/fillion/containers/patrol.js | 16 ++++------------
web/package.json | 2 +-
8 files changed, 46 insertions(+), 38 deletions(-)
diff --git a/api/.vscode/launch.json b/api/.vscode/launch.json
index eaa8220c..35dd29e4 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 4000",
+ "-f http://localhost:4000",
"-g postgres://postgres:123@10.8.30.32:5432/highways4good",
"--qnak XuDgkao6cL0HidoMAPnA5OB10Mc_Ew08mpIfRJK5",
"--qnsk yewcieZLzKZuDfig0wLZ9if9jKp2P_1jd3CMJPSa",
diff --git a/api/app/lib/controllers/data/index.js b/api/app/lib/controllers/data/index.js
index d7b75558..ab91d22d 100644
--- a/api/app/lib/controllers/data/index.js
+++ b/api/app/lib/controllers/data/index.js
@@ -55,6 +55,16 @@ async function dataExport (ctx) {
k: 'busCar',
tableName: 'BusCar',
},
+ {
+ n: '巡更记录',
+ k: 'patrol',
+ tableName: 'Report',
+ },
+ {
+ n: '养护记录',
+ k: 'maintenance',
+ tableName: 'Report',
+ },
]
const modalOption = modalList.find(item => item.k == exp);
diff --git a/api/app/lib/models/report.js b/api/app/lib/models/report.js
index 2eaa09b6..3d1d39c6 100644
--- a/api/app/lib/models/report.js
+++ b/api/app/lib/models/report.js
@@ -41,7 +41,7 @@ module.exports = dc => {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
- comment: null,
+ comment: '所属道路',
primaryKey: false,
field: "road",
autoIncrement: false
@@ -51,7 +51,7 @@ module.exports = dc => {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
- comment: null,
+ comment: '开始路段',
primaryKey: false,
field: "road_section_start",
autoIncrement: false
@@ -61,7 +61,7 @@ module.exports = dc => {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
- comment: null,
+ comment: '结束路段',
primaryKey: false,
field: "road_section_end",
autoIncrement: false
@@ -71,7 +71,7 @@ module.exports = dc => {
type: DataTypes.DOUBLE,
allowNull: true,
defaultValue: null,
- comment: null,
+ comment: '经度',
primaryKey: false,
field: "longitude",
autoIncrement: false
@@ -81,7 +81,7 @@ module.exports = dc => {
type: DataTypes.DOUBLE,
allowNull: true,
defaultValue: null,
- comment: null,
+ comment: '纬度',
primaryKey: false,
field: "latitude",
autoIncrement: false
@@ -91,7 +91,7 @@ module.exports = dc => {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
- comment: null,
+ comment: '具体内容',
primaryKey: false,
field: "content",
autoIncrement: false
@@ -151,7 +151,7 @@ module.exports = dc => {
type: DataTypes.DATE,
allowNull: false,
defaultValue: null,
- comment: null,
+ comment: '创建日期',
primaryKey: false,
field: "time",
autoIncrement: false
@@ -161,7 +161,7 @@ module.exports = dc => {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
- comment: null,
+ comment: '具体位置',
primaryKey: false,
field: "address",
autoIncrement: false
diff --git a/web/client/src/sections/fillion/components/maintenanceTable.js b/web/client/src/sections/fillion/components/maintenanceTable.js
index fd71bb1a..5131c273 100644
--- a/web/client/src/sections/fillion/components/maintenanceTable.js
+++ b/web/client/src/sections/fillion/components/maintenanceTable.js
@@ -301,6 +301,13 @@ const MaintenanceTable = (props) => {
dispatch(getReportList(query));
}
+ const handleExport = () => {
+ if (reportList && reportList instanceof Array && reportList.length) {
+ let ids = reportList.map(item => item.id);
+ exports(ids);
+ }
+ }
+
return (
@@ -310,7 +317,7 @@ const MaintenanceTable = (props) => {
{ setDateRange(dateString) }} />
-
+
diff --git a/web/client/src/sections/fillion/components/patrolTable.js b/web/client/src/sections/fillion/components/patrolTable.js
index 2b1e796d..08d408bf 100644
--- a/web/client/src/sections/fillion/components/patrolTable.js
+++ b/web/client/src/sections/fillion/components/patrolTable.js
@@ -267,7 +267,7 @@ const PatrolNameList = (props) => {
const PatrolTable = (props) => {
- const { userList, reportList, dispatch, reportListLoading, reportDetail, reportDetailLoading, userLoading } = props;
+ const { userList, reportList, dispatch, reportListLoading, reportDetail, reportDetailLoading, userLoading, exports } = props;
const [record, setRecord] = useState();
const [dateRange, setDateRange] = useState();
const [detailVisible, setDetailVisible] = useState(false)
@@ -345,6 +345,13 @@ const PatrolTable = (props) => {
setRecord(target);
}
+ const handleExport = () => {
+ if (reportList && reportList instanceof Array && reportList.length) {
+ let ids = reportList.map(item => item.id);
+ exports(ids);
+ }
+ }
+
return (
@@ -366,7 +373,7 @@ const PatrolTable = (props) => {
activeTabKey1 == 'tab1' ?
{ setDateRange(dateString) }} />
-
+
: ''
}
{contentList[activeTabKey1]}
diff --git a/web/client/src/sections/fillion/containers/maintenance.js b/web/client/src/sections/fillion/containers/maintenance.js
index 6c36021e..d08a032d 100644
--- a/web/client/src/sections/fillion/containers/maintenance.js
+++ b/web/client/src/sections/fillion/containers/maintenance.js
@@ -22,18 +22,10 @@ const Maintenance = (props) => {
//批量导出
const exports = (ids, counts) => {
// console.log(user);
- let reportIds = [];
- if (ids.length)
- reportIds = ids
- else
- reportIds = (counts || {}).ids || [];
- superagent.post('/_report/http')
- .send({ id: reportIds.map(i => Number(i)) }).end((err, res) => {
- const resTextIs = res.text.split('/').pop()
- window.open(
- '/_api/' +
- `attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`)
- })
+ let reportIds = ids.toString();
+ window.open(
+ '/_api/' +
+ `data/export?exp=patrol&ids=${reportIds}&token=${user.token}`)
}
return (
<>
diff --git a/web/client/src/sections/fillion/containers/patrol.js b/web/client/src/sections/fillion/containers/patrol.js
index 3372ad0a..df84bd81 100644
--- a/web/client/src/sections/fillion/containers/patrol.js
+++ b/web/client/src/sections/fillion/containers/patrol.js
@@ -20,18 +20,10 @@ const patrol = (props) => {
//批量导出
const exports = (ids, counts) => {
// console.log(user);
- let reportIds = [];
- if (ids.length)
- reportIds = ids
- else
- reportIds = (counts || {}).ids || [];
- superagent.post('/_report/http')
- .send({ id: reportIds.map(i => Number(i)) }).end((err, res) => {
- const resTextIs = res.text.split('/').pop()
- window.open(
- '/_api/' +
- `attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`)
- })
+ let reportIds = ids.toString();
+ window.open(
+ '/_api/' +
+ `data/export?exp=patrol&ids=${reportIds}&token=${user.token}`)
}
return (
<>
diff --git a/web/package.json b/web/package.json
index 7cd3d607..b8aaf86a 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:4000 --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",
From 5f92e2bb823ebf53a33dd9705e508cd40905c373 Mon Sep 17 00:00:00 2001
From: LUCAS
Date: Sat, 30 Jul 2022 15:35:32 +0800
Subject: [PATCH 18/39] =?UTF-8?q?=E6=A0=87=E9=A2=98=E6=96=87=E5=AD=97?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/sections/fillion/components/maintenanceTable.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/web/client/src/sections/fillion/components/maintenanceTable.js b/web/client/src/sections/fillion/components/maintenanceTable.js
index 5131c273..9af9aabc 100644
--- a/web/client/src/sections/fillion/components/maintenanceTable.js
+++ b/web/client/src/sections/fillion/components/maintenanceTable.js
@@ -201,7 +201,7 @@ const PatrolNameList = (props) => {
}, [userList])
const columns = [
{
- title: '巡更人员',
+ title: '养护人员',
key: 'name',
dataIndex: 'name',
align: 'center'
@@ -307,7 +307,7 @@ const MaintenanceTable = (props) => {
exports(ids);
}
}
-
+
return (
From fa4d3eddb1bdcb3174b73a74c6ed5b006cea0cd7 Mon Sep 17 00:00:00 2001
From: "gao.zhiyuan"
Date: Sat, 30 Jul 2022 16:31:35 +0800
Subject: [PATCH 19/39] dockerfile
---
scripts/0.0.1/data/3_init_report_pic_data/Dockerfile | 7 +++++++
1 file changed, 7 insertions(+)
create mode 100644 scripts/0.0.1/data/3_init_report_pic_data/Dockerfile
diff --git a/scripts/0.0.1/data/3_init_report_pic_data/Dockerfile b/scripts/0.0.1/data/3_init_report_pic_data/Dockerfile
new file mode 100644
index 00000000..9036cb66
--- /dev/null
+++ b/scripts/0.0.1/data/3_init_report_pic_data/Dockerfile
@@ -0,0 +1,7 @@
+FROM repository.anxinyun.cn/base-images/nodejs12:20.10.12.2
+
+COPY . /var/app
+
+WORKDIR /var/app
+
+CMD ["node", "index.js"]
\ No newline at end of file
From 0994ea7bdd5379ec125fc5fcaca4080644806dc1 Mon Sep 17 00:00:00 2001
From: "gao.zhiyuan"
Date: Sat, 30 Jul 2022 16:35:20 +0800
Subject: [PATCH 20/39] jenkinsfile
---
jenkinsfile_script_init_report_pic_data | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100644 jenkinsfile_script_init_report_pic_data
diff --git a/jenkinsfile_script_init_report_pic_data b/jenkinsfile_script_init_report_pic_data
new file mode 100644
index 00000000..340871e8
--- /dev/null
+++ b/jenkinsfile_script_init_report_pic_data
@@ -0,0 +1,19 @@
+pipeline {
+ agent {
+ node{
+ label 'jnlp-slave'
+ }
+ }
+
+ stages {
+ stage('Highways4Good Api ......') {
+ steps {
+ sh 'switch-auth.sh anxinyun'
+ buildName "#${BUILD_NUMBER} ~/fs-cloud/${JOB_NAME}:${IMAGE_VERSION}"
+ buildDescription "registry.cn-hangzhou.aliyuncs.com/${CLOUD}/${JOB_NAME}:${IMAGE_VERSION}"
+ sh 'docker build -t registry.cn-hangzhou.aliyuncs.com/${CLOUD}/${JOB_NAME}:${IMAGE_VERSION} ./scripts/0.0.1/data/3_init_report_pic_data'
+ sh 'docker push registry.cn-hangzhou.aliyuncs.com/${CLOUD}/${JOB_NAME}:${IMAGE_VERSION}'
+ }
+ }
+ }
+}
\ No newline at end of file
From af95ee15ff3a7dccd6cf2d535f616296b2541af3 Mon Sep 17 00:00:00 2001
From: yangsen <952208207@qq.com>
Date: Sat, 30 Jul 2022 16:36:35 +0800
Subject: [PATCH 21/39] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=B8=85=E7=A9=BAform?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
web/client/src/sections/fillion/components/infor/videoUpload.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/web/client/src/sections/fillion/components/infor/videoUpload.js b/web/client/src/sections/fillion/components/infor/videoUpload.js
index 2f1a5607..a180ae90 100644
--- a/web/client/src/sections/fillion/components/infor/videoUpload.js
+++ b/web/client/src/sections/fillion/components/infor/videoUpload.js
@@ -36,6 +36,7 @@ const VideoUpload = (props) => {
setCounts(res.payload.data)
})
})
+ form.resetFields()
setIsModalVisible(false);
}
);
From 8573588ea012b5bbf2b23ae17d13e281fab05f05 Mon Sep 17 00:00:00 2001
From: wangyue
Date: Sat, 30 Jul 2022 16:45:32 +0800
Subject: [PATCH 22/39] =?UTF-8?q?=E4=BA=94=E5=88=86=E9=92=9F=E5=88=B7?=
=?UTF-8?q?=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../containers/footer/leadership/left/left-top.js | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/web/client/src/sections/quanju/containers/footer/leadership/left/left-top.js b/web/client/src/sections/quanju/containers/footer/leadership/left/left-top.js
index 12e68bf8..efcae283 100644
--- a/web/client/src/sections/quanju/containers/footer/leadership/left/left-top.js
+++ b/web/client/src/sections/quanju/containers/footer/leadership/left/left-top.js
@@ -11,6 +11,7 @@ const Lefttop = (props) => {
const [mass, setMass] = useState()
const [speed, setspeed] = useState()
const [traffic, setTraffic] = useState()
+ const [tim, setTim] = useState()
const [nums, setNums] = useState()
useEffect(() => {
const shuju = dispatch(getGodshuju()).then((res) => {
@@ -32,9 +33,14 @@ const Lefttop = (props) => {
setNums(localStorage.getItem("num"))
}
})
+ }, [tim])
+ useEffect(() => {
+ const timer = setInterval(() => {
+ setTim(new Date())
+ }, 300000);
+ return () => clearInterval(timer);
}, [])
- // console.log(mass);
- // console.log(nums);
+ // console.log(tim);
return (
<>
From 1967f5d91134906dd5aa71656d91bea66597390c Mon Sep 17 00:00:00 2001
From: "gao.zhiyuan"
Date: Sat, 30 Jul 2022 16:48:43 +0800
Subject: [PATCH 23/39] =?UTF-8?q?7=E7=89=9B=E6=B5=8B=E8=AF=95=E5=8F=82?=
=?UTF-8?q?=E6=95=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
scripts/0.0.1/data/3_init_report_pic_data/index.js | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/scripts/0.0.1/data/3_init_report_pic_data/index.js b/scripts/0.0.1/data/3_init_report_pic_data/index.js
index 5ef08acb..117046fb 100644
--- a/scripts/0.0.1/data/3_init_report_pic_data/index.js
+++ b/scripts/0.0.1/data/3_init_report_pic_data/index.js
@@ -11,16 +11,16 @@ try {
// 连接数据库
const pool = new Pool({
- user: 'postgres',
- host: '10.8.30.32',
- database: 'highways4good',
- password: '123',
+ user: 'FashionAdmin',
+ host: '10.8.30.156',
+ database: 'highway4goodn0728',
+ password: '123456',
port: 5432,
})
// 7niu 验证
- const accessKey = 'XuDgkao6cL0HidoMAPnA5OB10Mc_Ew08mpIfRJK5'
- const secretKey = 'yewcieZLzKZuDfig0wLZ9if9jKp2P_1jd3CMJPSa'
- const bucket = 'dev-highways4good'
+ const accessKey = '5XrM4wEB9YU6RQwT64sPzzE6cYFKZgssdP5Kj3uu'
+ const secretKey = 'w6j2ixR_i-aelc6I7S3HotKIX-ukMzcKmDfH6-M5'
+ const bucket = 'anxinyun-test'
From 58faf053a8f7fc1fdda9ce9c1b3a7be822b172a1 Mon Sep 17 00:00:00 2001
From: liujiangyong
Date: Sat, 30 Jul 2022 16:49:23 +0800
Subject: [PATCH 24/39] =?UTF-8?q?=E9=9A=90=E8=97=8F=E8=A7=86=E9=A2=91?=
=?UTF-8?q?=E6=A8=A1=E5=9D=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
weapp/src/pages/home/index.jsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/weapp/src/pages/home/index.jsx b/weapp/src/pages/home/index.jsx
index fde2864b..b6a3166c 100644
--- a/weapp/src/pages/home/index.jsx
+++ b/weapp/src/pages/home/index.jsx
@@ -51,13 +51,13 @@ const Index = () => {
{isSuperAdmin ? '查看' : '填报'}
- {
+ {/* {
isSuperAdmin &&
视 频 监 控
查看
- }
+ } */}
);
}
From b6a18936801729feca557ee7751c6f6c36db0bd3 Mon Sep 17 00:00:00 2001
From: "gao.zhiyuan"
Date: Sat, 30 Jul 2022 17:02:29 +0800
Subject: [PATCH 25/39] =?UTF-8?q?=E5=B7=A1=E6=9F=A5/=E5=85=BB=E6=8A=A4?=
=?UTF-8?q?=E7=AE=A1=E7=90=86-=E7=82=B9=E5=87=BB=E5=AF=BC=E5=87=BA?=
=?UTF-8?q?=E6=8C=89=E9=92=AE=E6=97=A0=E5=8F=8D=E5=BA=94?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/.vscode/launch.json | 2 +-
api/log/development.log | 23 +++++++++++++++++++
.../fillion/components/maintenanceTable.js | 4 ++--
.../fillion/components/patrolTable.js | 10 ++++----
4 files changed, 31 insertions(+), 8 deletions(-)
diff --git a/api/.vscode/launch.json b/api/.vscode/launch.json
index 35dd29e4..d82da15e 100644
--- a/api/.vscode/launch.json
+++ b/api/.vscode/launch.json
@@ -13,7 +13,7 @@
"NODE_ENV": "development"
},
"args": [
- "-p 4000",
+ "-p 14000",
"-f http://localhost:4000",
"-g postgres://postgres:123@10.8.30.32:5432/highways4good",
"--qnak XuDgkao6cL0HidoMAPnA5OB10Mc_Ew08mpIfRJK5",
diff --git a/api/log/development.log b/api/log/development.log
index 5c96f980..af888562 100644
--- a/api/log/development.log
+++ b/api/log/development.log
@@ -10668,3 +10668,26 @@ headers: {}
2022-07-30 12:38:46.294 - debug: [FS-LOGGER] Init.
2022-07-30 12:38:46.394 - info: [FS-ATTACHMENT] Inject attachment mw into router.
2022-07-30 12:38:46.394 - info: [FS-AUTH] Inject auth and api mv into router.
+2022-07-30 14:19:21.439 - debug: [FS-LOGGER] Init.
+2022-07-30 14:19:21.547 - info: [FS-ATTACHMENT] Inject attachment mw into router.
+2022-07-30 14:19:21.547 - info: [FS-AUTH] Inject auth and api mv into router.
+2022-07-30 14:30:16.777 - error: path: /publicity, error: Error: Invalid value {
+ uid: -1659162615,
+ name: 'video.mp4',
+ status: 'done',
+ storageUrl: 'project/45017725-be73-4ec7-99a5-f57c2fde5682/video.mp4',
+ url: 'http://rfkimpwbb.hn-bkt.clouddn.com/project/45017725-be73-4ec7-99a5-f57c2fde5682/video.mp4',
+ size: 2172089
+}
+2022-07-30 14:30:47.375 - error: path: /publicity, error: Error: Invalid value {
+ uid: -1659162647,
+ name: 'video.mp4',
+ status: 'done',
+ storageUrl: 'project/ec692a52-13e2-4bd1-80fb-5cae1386c782/video.mp4',
+ url: 'http://rfkimpwbb.hn-bkt.clouddn.com/project/ec692a52-13e2-4bd1-80fb-5cae1386c782/video.mp4',
+ size: 2172089
+}
+2022-07-30 16:53:41.602 - error: path: /data/export, error: 参数错误
+2022-07-30 16:59:14.475 - debug: [FS-LOGGER] Init.
+2022-07-30 16:59:14.573 - info: [FS-ATTACHMENT] Inject attachment mw into router.
+2022-07-30 16:59:14.573 - info: [FS-AUTH] Inject auth and api mv into router.
diff --git a/web/client/src/sections/fillion/components/maintenanceTable.js b/web/client/src/sections/fillion/components/maintenanceTable.js
index 9af9aabc..b33c19a6 100644
--- a/web/client/src/sections/fillion/components/maintenanceTable.js
+++ b/web/client/src/sections/fillion/components/maintenanceTable.js
@@ -263,7 +263,7 @@ const PatrolNameList = (props) => {
const MaintenanceTable = (props) => {
- const { userList, reportList, dispatch, reportListLoading, reportDetail, reportDetailLoading, userLoading } = props;
+ const { userList, reportList, dispatch, reportListLoading, reportDetail, reportDetailLoading, userLoading, exports } = props;
const [record, setRecord] = useState();
const [dateRange, setDateRange] = useState();
const [detailVisible, setDetailVisible] = useState(false)
@@ -333,7 +333,7 @@ const MaintenanceTable = (props) => {
);
};
-function mapStateToProps(state) {
+function mapStateToProps (state) {
const { auth, depMessage, userList, reportList, reportDetail } = state;
const pakData = (dep) => {
return dep.map((d) => {
diff --git a/web/client/src/sections/fillion/components/patrolTable.js b/web/client/src/sections/fillion/components/patrolTable.js
index 08d408bf..e8b49e3c 100644
--- a/web/client/src/sections/fillion/components/patrolTable.js
+++ b/web/client/src/sections/fillion/components/patrolTable.js
@@ -57,7 +57,7 @@ const DetailForm = (props) => {
visible={visible}
footer={null}
onCancel={handleClose}
- title={'巡更管理详情'}
+ title={'巡查管理详情'}
>
{renderContent(data)}
@@ -205,7 +205,7 @@ const PatrolNameList = (props) => {
const columns = [
{
- title: '巡更人员',
+ title: '巡查人员',
key: 'name',
dataIndex: 'name',
align: 'center'
@@ -243,7 +243,7 @@ const PatrolNameList = (props) => {
return record.id == selectRoad ? 'list-row-actived' : '';
}}
toolBarRender={() => [
-
+
]}
options={false}
pagination={false}
@@ -319,10 +319,10 @@ const PatrolTable = (props) => {
const tabList = [
{
key: 'tab1',
- tab: '巡更',
+ tab: '巡查',
}, {
key: 'tab2',
- tab: '巡更轨迹查询',
+ tab: '巡查轨迹查询',
},
];
const contentList = {
From 5d9e0adf15be424b3bfdb332af847a012efeb926 Mon Sep 17 00:00:00 2001
From: "gao.zhiyuan"
Date: Sat, 30 Jul 2022 17:12:17 +0800
Subject: [PATCH 26/39] =?UTF-8?q?=E5=B7=A1=E6=9F=A5=E7=AE=A1=E7=90=86-?=
=?UTF-8?q?=E5=8F=B3=E4=BE=A7=E5=B7=A1=E6=9F=A5tab=E8=AE=B0=E5=BD=95?=
=?UTF-8?q?=E5=88=97=E8=A1=A8=E7=BC=96=E5=8F=B7=E5=B1=95=E7=A4=BA=E9=94=99?=
=?UTF-8?q?=E8=AF=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../fillion/components/maintenanceTable.js | 19 +++++++++++++++++
.../fillion/components/patrolTable.js | 21 +++++++++++++++++--
2 files changed, 38 insertions(+), 2 deletions(-)
diff --git a/web/client/src/sections/fillion/components/maintenanceTable.js b/web/client/src/sections/fillion/components/maintenanceTable.js
index b33c19a6..0e00c751 100644
--- a/web/client/src/sections/fillion/components/maintenanceTable.js
+++ b/web/client/src/sections/fillion/components/maintenanceTable.js
@@ -90,6 +90,8 @@ const DetailList = (props) => {
}
}
+ let daySet = {};
+
const columns = [
{
title: '编号',
@@ -97,6 +99,14 @@ const DetailList = (props) => {
dataIndex: 'id',
align: 'center',
render: (text, record) => {
+ let day = moment(record.time).format("YYYYMMDD")
+ if (daySet[day]) {
+ daySet[day].add(Symbol())
+ } else {
+ daySet[day] = new Set()
+ daySet[day].add(Symbol())
+ }
+ return day * 10000 + daySet[day].size
return moment(record.time).format("YYYYMMDD") * 10000 + record.id;
}
}, {
@@ -104,6 +114,15 @@ const DetailList = (props) => {
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',
diff --git a/web/client/src/sections/fillion/components/patrolTable.js b/web/client/src/sections/fillion/components/patrolTable.js
index e8b49e3c..c2bfd650 100644
--- a/web/client/src/sections/fillion/components/patrolTable.js
+++ b/web/client/src/sections/fillion/components/patrolTable.js
@@ -90,7 +90,7 @@ const DetailList = (props) => {
})
}
}
-
+ let daySet = {};
const columns = [
{
title: '编号',
@@ -98,6 +98,14 @@ const DetailList = (props) => {
dataIndex: 'id',
align: 'center',
render: (text, record) => {
+ let day = moment(record.time).format("YYYYMMDD")
+ if (daySet[day]) {
+ daySet[day].add(Symbol())
+ } else {
+ daySet[day] = new Set()
+ daySet[day].add(Symbol())
+ }
+ return day * 10000 + daySet[day].size
return moment(record.time).format("YYYYMMDD") * 10000 + record.id;
}
},
@@ -106,6 +114,15 @@ const DetailList = (props) => {
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: '所属道路',
@@ -388,7 +405,7 @@ const PatrolTable = (props) => {
);
};
-function mapStateToProps(state) {
+function mapStateToProps (state) {
const { auth, depMessage, userList, reportList, reportDetail } = state;
const pakData = (dep) => {
return dep.map((d) => {
From 5b1add12b5df57c5e30299bc602cb4c78f173ff0 Mon Sep 17 00:00:00 2001
From: "gao.zhiyuan"
Date: Sat, 30 Jul 2022 17:14:05 +0800
Subject: [PATCH 27/39] dockerfile
---
scripts/0.0.1/data/3_init_report_pic_data/Dockerfile | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/scripts/0.0.1/data/3_init_report_pic_data/Dockerfile b/scripts/0.0.1/data/3_init_report_pic_data/Dockerfile
index 9036cb66..d0293a8f 100644
--- a/scripts/0.0.1/data/3_init_report_pic_data/Dockerfile
+++ b/scripts/0.0.1/data/3_init_report_pic_data/Dockerfile
@@ -4,4 +4,8 @@ COPY . /var/app
WORKDIR /var/app
+RUN npm cache clean -f
+RUN rm -rf package-lock.json
+RUN npm install --registry http://10.8.30.22:7000
+
CMD ["node", "index.js"]
\ No newline at end of file
From 1b33d7f7358e1b347dfbfcafadfa8149a60fc659 Mon Sep 17 00:00:00 2001
From: "gao.zhiyuan"
Date: Sat, 30 Jul 2022 17:16:59 +0800
Subject: [PATCH 28/39] =?UTF-8?q?=E7=97=85=E5=AE=B3=E7=85=A7=E7=89=87?=
=?UTF-8?q?=E5=B1=95=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
web/client/src/sections/fillion/components/patrolTable.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/web/client/src/sections/fillion/components/patrolTable.js b/web/client/src/sections/fillion/components/patrolTable.js
index c2bfd650..b13dc98b 100644
--- a/web/client/src/sections/fillion/components/patrolTable.js
+++ b/web/client/src/sections/fillion/components/patrolTable.js
@@ -13,6 +13,7 @@ import moment from 'moment';
const DetailForm = (props) => {
const { visible, data, handleClose, loading } = props;
+ const [qndmn] = useState(localStorage.getItem('qndmn'));
const keyList = [
{ key: '编号', name: 'id' },
{ key: '工程类型', name: 'projectType' },
@@ -38,7 +39,7 @@ const DetailForm = (props) => {
{
data.scenePic && data.scenePic instanceof Array ? data.scenePic.map(imgSrc => {
return
-
+
}) : '暂无图片'
}
From 3158fd469141fb9f3104b5f3ade7235b40ab83c7 Mon Sep 17 00:00:00 2001
From: "gao.zhiyuan"
Date: Sat, 30 Jul 2022 17:18:51 +0800
Subject: [PATCH 29/39] =?UTF-8?q?=E7=8E=B0=E5=9C=BA=E7=85=A7=E7=89=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
web/client/src/sections/fillion/components/patrolTable.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/web/client/src/sections/fillion/components/patrolTable.js b/web/client/src/sections/fillion/components/patrolTable.js
index b13dc98b..39cdcbb3 100644
--- a/web/client/src/sections/fillion/components/patrolTable.js
+++ b/web/client/src/sections/fillion/components/patrolTable.js
@@ -20,7 +20,7 @@ const DetailForm = (props) => {
{ key: '所在路段', name: 'road' },
{ key: '具体位置', name: 'address' },
{ key: '巡查内容', name: 'content' },
- { key: '病害照片', name: 'scenePic' },
+ { key: '现场照片', name: 'scenePic' },
];
const renderContent = (data) => {
From 8bdb90a16513553b2ccfcbd2bfe344ba3b95e236 Mon Sep 17 00:00:00 2001
From: xingyongchun
Date: Sat, 30 Jul 2022 17:35:06 +0800
Subject: [PATCH 30/39] =?UTF-8?q?=E6=B2=BB=E8=B6=85=E5=AF=BC=E5=87=BA?=
=?UTF-8?q?=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/sections/fillion/components/inforTable.js | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/web/client/src/sections/fillion/components/inforTable.js b/web/client/src/sections/fillion/components/inforTable.js
index 88738971..91779539 100644
--- a/web/client/src/sections/fillion/components/inforTable.js
+++ b/web/client/src/sections/fillion/components/inforTable.js
@@ -197,7 +197,7 @@ const InForTable = (props) => {
dataIndex: 'createdAt',
valueType: 'date',
render: (dom, record) => {
- return record.testTime?.slice(0,10)
+ return record.testTime?.slice(0, 10)
},
fieldProps: {
onChange: (value, cs) => {
@@ -447,10 +447,13 @@ const InForTable = (props) => {
defaultCollapsed: false,
optionRender: (searchConfig, formProps, dom) => [
...dom.reverse(),
- {
- // console.log(rowSelected)
-
- props.exports(rowSelected, counts) }}>
+ {
+ // console.log(rowSelected)
+ rowSelected.length === 0 ? null : props.exports(rowSelected, counts)
+ }}
+ >
From e9a997d11e56e2ba0b4ce4a1e0313b981dd0b7d7 Mon Sep 17 00:00:00 2001
From: LUCAS
Date: Sat, 30 Jul 2022 20:50:21 +0800
Subject: [PATCH 39/39] =?UTF-8?q?=E5=B7=A1=E6=9B=B4=E3=80=81=E5=85=BB?=
=?UTF-8?q?=E6=8A=A4=E7=BC=96=E5=8F=B7=E6=8C=89=E7=85=A7=E6=97=A5=E6=9C=9F?=
=?UTF-8?q?=E7=B4=AF=E5=8A=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/app/lib/controllers/report/index.js | 4 +--
.../fillion/components/maintenanceTable.js | 25 ++++++++++--------
.../fillion/components/patrolTable.js | 26 +++++++++++--------
3 files changed, 31 insertions(+), 24 deletions(-)
diff --git a/api/app/lib/controllers/report/index.js b/api/app/lib/controllers/report/index.js
index c7aa1d18..c098336e 100644
--- a/api/app/lib/controllers/report/index.js
+++ b/api/app/lib/controllers/report/index.js
@@ -4,7 +4,7 @@ const { QueryTypes } = require('sequelize');
async function reportList (ctx) {
try {
const models = ctx.fs.dc.models;
- const { limit, page, startTime, endTime, keyword, userId, reportType, isTop } = ctx.query
+ const { limit, page, startTime, endTime, keyword, userId, reportType, isTop, asc } = ctx.query
let findOption = {
where: {
@@ -14,7 +14,7 @@ async function reportList (ctx) {
model: models.User,
attributes: ['name']
}],
- order: [['time', 'DESC']],
+ order: [['time', asc ? 'ASC': 'DESC']],
}
if (limit) {
findOption.limit = limit
diff --git a/web/client/src/sections/fillion/components/maintenanceTable.js b/web/client/src/sections/fillion/components/maintenanceTable.js
index 937169ac..07207b78 100644
--- a/web/client/src/sections/fillion/components/maintenanceTable.js
+++ b/web/client/src/sections/fillion/components/maintenanceTable.js
@@ -14,7 +14,7 @@ const DetailForm = (props) => {
const { visible, data, handleClose, loading } = props;
const [qndmn] = useState(localStorage.getItem('qndmn'));
const keyList = [
- { key: '编号', name: 'id' },
+ // { key: '编号', name: 'id' },
{ key: '工程类型', name: 'projectType' },
{ key: '所在路段', name: 'road' },
{ key: '具体位置', name: 'address' },
@@ -91,7 +91,8 @@ const DetailList = (props) => {
}
}
- let daySet = {};
+ let basicDate = null;
+ let counter = 0;
const columns = [
{
@@ -101,14 +102,16 @@ const DetailList = (props) => {
align: 'center',
render: (text, record) => {
let day = moment(record.time).format("YYYYMMDD")
- if (daySet[day]) {
- daySet[day].add(Symbol())
- } else {
- daySet[day] = new Set()
- daySet[day].add(Symbol())
+ if(!basicDate){
+ basicDate = day;
+ counter +=1;
+ } else if(basicDate == day){
+ counter += 1;
+ } else if(basicDate != day){
+ basicDate = day;
+ counter = 1;
}
- return day * 10000 + daySet[day].size
- return moment(record.time).format("YYYYMMDD") * 10000 + record.id;
+ return moment(record.time).format("YYYYMMDD") * 10000 + counter;
}
}, {
title: '工程类型',
@@ -300,7 +303,7 @@ const MaintenanceTable = (props) => {
useEffect(() => {
if (record) {
- let query = { userId: record.id, reportType: 'conserve' }
+ let query = { userId: record.id, reportType: 'conserve' , 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')
@@ -317,7 +320,7 @@ const MaintenanceTable = (props) => {
}
const handelRefresh = () => {
- let query = { userId: record.id, reportType: 'patrol' }
+ let query = { userId: record.id, reportType: 'patrol', asc: true }
dispatch(getReportList(query));
}
diff --git a/web/client/src/sections/fillion/components/patrolTable.js b/web/client/src/sections/fillion/components/patrolTable.js
index e8a79935..0a136197 100644
--- a/web/client/src/sections/fillion/components/patrolTable.js
+++ b/web/client/src/sections/fillion/components/patrolTable.js
@@ -15,7 +15,7 @@ const DetailForm = (props) => {
const { visible, data, handleClose, loading } = props;
const [qndmn] = useState(localStorage.getItem('qndmn'));
const keyList = [
- { key: '编号', name: 'id' },
+ // { key: '编号', name: 'id' },
{ key: '工程类型', name: 'projectType' },
{ key: '所在路段', name: 'road' },
{ key: '具体位置', name: 'address' },
@@ -91,7 +91,9 @@ const DetailList = (props) => {
})
}
}
- let daySet = {};
+ let basicDate = null;
+ let counter = 0;
+
const columns = [
{
title: '编号',
@@ -100,14 +102,16 @@ const DetailList = (props) => {
align: 'center',
render: (text, record) => {
let day = moment(record.time).format("YYYYMMDD")
- if (daySet[day]) {
- daySet[day].add(Symbol())
- } else {
- daySet[day] = new Set()
- daySet[day].add(Symbol())
+ if(!basicDate){
+ basicDate = day;
+ counter +=1;
+ } else if(basicDate == day){
+ counter += 1;
+ } else if(basicDate != day){
+ basicDate = day;
+ counter = 1;
}
- return day * 10000 + daySet[day].size
- return moment(record.time).format("YYYYMMDD") * 10000 + record.id;
+ return moment(record.time).format("YYYYMMDD") * 10000 + counter;
}
},
{
@@ -316,7 +320,7 @@ const PatrolTable = (props) => {
}, [record, dateRange])
const queryData = () => {
- let query = { userId: record.id, reportType: 'patrol' }
+ let query = { userId: record.id, reportType: 'patrol', 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')
@@ -333,7 +337,7 @@ const PatrolTable = (props) => {
}, [activeTabKey1])
const handelRefresh = () => {
- let query = { userId: record.id, reportType: 'patrol' }
+ let query = { userId: record.id, reportType: 'patrol', asc: true }
dispatch(getReportList(query));
}