wenlele 1 year ago
parent
commit
aacfeac851
  1. 36
      scripts/1.4.1/data/1_insert_road_data/index.js
  2. 46
      web/client/src/sections/fillion/components/transportationTable.js
  3. 6
      web/client/src/sections/fillion/containers/maintenanceSpotCheck-new.js

36
scripts/1.4.1/data/1_insert_road_data/index.js

@ -5,23 +5,23 @@ try {
const fs = require("fs"); const fs = require("fs");
//开发 //开发
const pool = new Pool({
user: 'postgres',
host: '10.8.30.32',
database: 'highways4good',
password: '123',
port: 5432,
})
// 测试环境
// const pool = new Pool({ // const pool = new Pool({
// user: 'highwayadmin', // user: 'postgres',
// host: '10.8.40.223', // host: '10.8.30.32',
// database: 'highway4good', // database: 'highwaytest',
// password: 'highway123', // password: '123',
// port: 5432, // port: 5432,
// }) // })
// 测试环境
const pool = new Pool({
user: 'highwayadmin',
host: '10.8.40.223',
database: 'highwaytest',
password: 'highway123',
port: 5432,
})
// 商用环境 // 商用环境
// const pool = new Pool({ // const pool = new Pool({
// user: 'highwayadmin', // user: 'highwayadmin',
@ -118,9 +118,9 @@ try {
let mark = r['mark'] let mark = r['mark']
if (mark) { if (mark) {
spot = true
} else {
spot = false spot = false
} else {
spot = true
} }
let rId = r.id let rId = r.id
@ -138,14 +138,12 @@ try {
Object.keys(r).forEach(key => { Object.keys(r).forEach(key => {
arr.push(key) arr.push(key)
}) })
if (r.route_name == '中心路—山上村四组路') { if (r.route_name == '中心公路一龚乐路') {
console.log(1) console.log(1)
} }
let isExit = allRoads.find(s => s.route_code == r.route_code && (s.section_no == r.section_no || !s.section_no) && s.route_name == r.route_name) let isExit = allRoads.find(s => s.route_code == r.route_code && (s.section_no == r.section_no || !s.section_no) && s.route_name == r.route_name)
if (isExit) { if (isExit) {
if (del != r.del && spot != r.spot && township_code != isExit.township_code) { villageSql += `UPDATE road SET village_id = ${villageId}, "del" = ${del}, spot = ${spot}, "township_code" = ${township_code ? township_code : `null`} WHERE id = ${isExit.id};\n`
villageSql += `UPDATE road SET village_id = ${villageId}, "del" = ${del}, spot = ${spot}, "township_code" = ${township_code ? township_code : `null`} WHERE id = ${isExit.id};\n`
}
} else { } else {
const { const {
route_name = `null`, route_code = `null`, section_no = `null`, starting_place_name = `null`, route_name = `null`, route_code = `null`, section_no = `null`, starting_place_name = `null`,

46
web/client/src/sections/fillion/components/transportationTable.js

@ -1252,7 +1252,7 @@ const TransporTationTable = (props) => {
} }
}, },
{ {
title: '是否隐藏字段', title: '是否隐藏',
search: false, search: false,
dataIndex: 'time9', dataIndex: 'time9',
valueType: 'dateRange', valueType: 'dateRange',
@ -2458,6 +2458,28 @@ const TransporTationTable = (props) => {
getPopupContainer: (triggerNode) => triggerNode.parentNode, getPopupContainer: (triggerNode) => triggerNode.parentNode,
} }
}, },
{
title: '是否隐藏',
search: false,
dataIndex: 'time9',
valueType: 'dateRange',
width: 140,
render: (dom, record) => {
console.log(record.spot)
if (record.spot) {
return "是"
} else {
return "否"
}
},
fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode,
}
},
{ {
title: '操作', title: '操作',
dataIndex: 'creatTime', dataIndex: 'creatTime',
@ -3668,6 +3690,28 @@ const TransporTationTable = (props) => {
} }
}, },
{
title: '是否隐藏',
search: false,
dataIndex: 'time9',
valueType: 'dateRange',
width: 140,
render: (dom, record) => {
console.log(record.spot)
if (record.spot) {
return "是"
} else {
return "否"
}
},
fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode,
}
},
{ {
key: "direction", key: "direction",
hideInTable: true, hideInTable: true,

6
web/client/src/sections/fillion/containers/maintenanceSpotCheck-new.js

@ -140,9 +140,9 @@ const MaintenanceSpotCheck = (props) => {
const res = await dispatch(roadSpotPrepare({ countyPercentage: values.percentValue })) const res = await dispatch(roadSpotPrepare({ countyPercentage: values.percentValue }))
setPreviewId(res?.payload.data?.previewId) setPreviewId(res?.payload.data?.previewId)
form.setFieldsValue({ form.setFieldsValue({
'countryMil': res?.payload.data?.countryMil, 'countryMil': res?.payload.data?.countryMil.toFixed(3),
'townMil': res?.payload.data?.townMil, 'townMil': res?.payload.data?.townMil.toFixed(3),
'villageMil': res?.payload.data?.villageMil, 'villageMil': res?.payload.data?.villageMil.toFixed(3),
}) })
} }
}) })

Loading…
Cancel
Save