diff --git a/api/app/lib/controllers/report/index.js b/api/app/lib/controllers/report/index.js
index b9c217a7..0f52e751 100644
--- a/api/app/lib/controllers/report/index.js
+++ b/api/app/lib/controllers/report/index.js
@@ -400,8 +400,9 @@ async function spotCheck (ctx) {
findUsers = userRes.map(item => {
return item.id
})
-
+ console.log('findUsers', findUsers)
let checkCount = Math.ceil(prepareRes.reportCount * (prepareRes.percentage / 100))
+ console.log('checkCount', checkCount)
const reportRes = findUsers.length && checkCount ? await models.Report.findAll({
where: {
reportType: 'conserve',
@@ -418,7 +419,7 @@ async function spotCheck (ctx) {
id: previewId
}
})
-
+ console.log('reportRes', reportRes)
if (reportRes.length) {
let spotDate = moment().format('YYYY-MM-DD')
await models.ReportSpotCheck.bulkCreate(reportRes.map(r => {
diff --git a/web/client/src/sections/fillion/components/patrolTable.js b/web/client/src/sections/fillion/components/patrolTable.js
index a36435ef..52261a1c 100644
--- a/web/client/src/sections/fillion/components/patrolTable.js
+++ b/web/client/src/sections/fillion/components/patrolTable.js
@@ -111,8 +111,10 @@ const DetailForm = (props) => {
obj.name == 'id' ?
moment(data.time).format("YYYYMMDD") * 10000 + data.id
:
- obj.name == 'projectType' || obj.name == 'reportType' ?
- reportTypeText(data[obj.name]) : obj.name == 'inspectionNoException' ? changeBoolean(data[obj.name]) :
+ obj.name == 'reportType' ?
+ reportTypeText(data[obj.name])
+ : obj.name == 'projectType' && data['codeRoad'] ? data['codeRoad'][0] === 'X' ? '县道'
+ : data['codeRoad'][0] === 'Y' ? '乡道' : '村道' :
data[obj.name]
}
disabled
@@ -133,7 +135,9 @@ const DetailForm = (props) => {
{
data[obj.name] && data[obj.name] instanceof Array ? data[obj.name].map(videoUrl => {
return
-
+
}) : '暂无视频'
}
diff --git a/web/client/src/sections/fillion/containers/maintenanceSpotCheck.js b/web/client/src/sections/fillion/containers/maintenanceSpotCheck.js
index 1a4a800a..2d7a2780 100644
--- a/web/client/src/sections/fillion/containers/maintenanceSpotCheck.js
+++ b/web/client/src/sections/fillion/containers/maintenanceSpotCheck.js
@@ -35,28 +35,29 @@ const DetailForm = (props) => {
}
}
const keyList = [
- { key: '道路类型', name: 'reportType' },
- { key: '其他', name: 'projectType' },
+ { key: '路线代码', name: 'codeRoad' },
+ { key: '其他', name: 'reportType' },
+ { key: '道路类型', name: 'projectType' },
{ key: '路线名称', name: 'road' },
{ key: '养护路段', name: 'roadSectionStart' },
{ key: '具体位置', name: 'address' },
{ key: '路面类型', name: 'roadType' },
- { key: '路面宽度', name: 'roadWidth' },
- { key: '错车道', name: 'wrongLane' },
- { key: '行道树', name: 'roadsideTrees' },
- { key: '边沟', name: 'roadsideDitch' },
- { key: '护栏', name: 'guardrail' },
- { key: '标线', name: 'roadMarking' },
- { key: '养护人员人数', name: 'maintenanceStaffCount' },
- { key: '修整路肩', name: 'shoulderRepair' },
- { key: '清理边沟', name: 'ditchCleaning' },
- { key: '修补沥青路面', name: 'asphaltRepair' },
- { key: '修补水泥路面', name: 'concreteRepair' },
- { key: '除草', name: 'grassMowing' },
- { key: '树刷白', name: 'treeWhitening' },
- { key: '桩刷白', name: 'pileWhitening' },
- { key: '维护护栏', name: 'guardrailMaintenance' },
- { key: '修复端头', name: 'endHeadRepair' },
+ { key: '路面宽度(米)', name: 'roadWidth' },
+ { key: '错车道(个)', name: 'wrongLane' },
+ { key: '行道树(棵)', name: 'roadsideTrees' },
+ { key: '边沟(米)', name: 'roadsideDitch' },
+ { key: '护栏(米)', name: 'guardrail' },
+ { key: '标线(米)', name: 'roadMarking' },
+ { key: '养护人员人数(人)', name: 'maintenanceStaffCount' },
+ { key: '修整路肩(平方米)', name: 'shoulderRepair' },
+ { key: '清理边沟(米)', name: 'ditchCleaning' },
+ { key: '修补沥青路面(平方米)', name: 'asphaltRepair' },
+ { key: '修补水泥路面(平方米)', name: 'concreteRepair' },
+ { key: '除草(米)', name: 'grassMowing' },
+ { key: '树刷白(株/公里)', name: 'treeWhitening' },
+ { key: '桩刷白(个)', name: 'pileWhitening' },
+ { key: '维护护栏(个)', name: 'guardrailMaintenance' },
+ { key: '修复端头(块)', name: 'endHeadRepair' },
{ key: '其他养护内容', name: 'otherDescription' },
{ key: '养护前图片', name: 'conserveBeforePic' },
{ key: '养护后图片', name: 'conserveAfterPic' },
@@ -85,13 +86,15 @@ const DetailForm = (props) => {
{
obj.name != 'conserveBeforePic' && obj.name != 'conserveAfterPic' && obj.name != 'roadSectionStart' && obj.name != 'videoUrl' && obj.name.indexOf('conserve') == -1 ?
{
}) : '暂无图片'
}
- : obj.name != 'videoUrl' ?
+
: obj.name != 'videoUrl' ?
:
{
data[obj.name] && data[obj.name] instanceof Array ? data[obj.name].map(videoUrl => {
return
-
+
}) : '暂无视频'
}
@@ -291,7 +296,7 @@ const MaintenanceSpotCheck = (props) => {
}
const columns = [
{
- title: '编号',
+ title: '抽查日期',
key: 'spotDate',
dataIndex: 'spotDate',
align: 'center',
@@ -393,7 +398,10 @@ const MaintenanceSpotCheck = (props) => {
setDepName(res?.payload.data?.lukyDepartment?.name)
setPreviewId(res?.payload.data?.previewId)
setTotal(((res?.payload.data?.reportCount) * Number(values.percentValue)) / 100)
- form.setFieldsValue({ 'result': count, 'village': depName, 'total': total })
+ form.setFieldsValue({
+ 'result': count, 'village': res?.payload.data?.lukyDepartment?.name,
+ 'total': Math.ceil(((res?.payload.data?.reportCount) * Number(values.percentValue)) / 100)
+ })
}
})
}