diff --git a/scripts/1.4.1/data/1_insert_road_data/index.js b/scripts/1.4.1/data/1_insert_road_data/index.js index dd1fb027..0976267a 100644 --- a/scripts/1.4.1/data/1_insert_road_data/index.js +++ b/scripts/1.4.1/data/1_insert_road_data/index.js @@ -5,23 +5,23 @@ try { 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({ - // user: 'highwayadmin', - // host: '10.8.40.223', - // database: 'highway4good', - // password: 'highway123', + // user: 'postgres', + // host: '10.8.30.32', + // database: 'highwaytest', + // password: '123', // port: 5432, // }) + // 测试环境 + const pool = new Pool({ + user: 'highwayadmin', + host: '10.8.40.223', + database: 'highwaytest', + password: 'highway123', + port: 5432, + }) + // 商用环境 // const pool = new Pool({ // user: 'highwayadmin', @@ -118,9 +118,9 @@ try { let mark = r['mark'] if (mark) { - spot = true - } else { spot = false + } else { + spot = true } let rId = r.id @@ -138,14 +138,12 @@ try { Object.keys(r).forEach(key => { arr.push(key) }) - if (r.route_name == '中心路—山上村四组路') { + if (r.route_name == '中心公路一龚乐路') { 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) 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 { const { route_name = `null`, route_code = `null`, section_no = `null`, starting_place_name = `null`, diff --git a/web/client/src/sections/fillion/components/transportationTable.js b/web/client/src/sections/fillion/components/transportationTable.js index dc469633..487f626b 100644 --- a/web/client/src/sections/fillion/components/transportationTable.js +++ b/web/client/src/sections/fillion/components/transportationTable.js @@ -1252,7 +1252,7 @@ const TransporTationTable = (props) => { } }, { - title: '是否隐藏字段', + title: '是否隐藏', search: false, dataIndex: 'time9', valueType: 'dateRange', @@ -2458,6 +2458,28 @@ const TransporTationTable = (props) => { 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: '操作', 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", hideInTable: true, diff --git a/web/client/src/sections/fillion/containers/maintenanceSpotCheck-new.js b/web/client/src/sections/fillion/containers/maintenanceSpotCheck-new.js index 20512602..4374ca62 100644 --- a/web/client/src/sections/fillion/containers/maintenanceSpotCheck-new.js +++ b/web/client/src/sections/fillion/containers/maintenanceSpotCheck-new.js @@ -140,9 +140,9 @@ const MaintenanceSpotCheck = (props) => { const res = await dispatch(roadSpotPrepare({ countyPercentage: values.percentValue })) setPreviewId(res?.payload.data?.previewId) form.setFieldsValue({ - 'countryMil': res?.payload.data?.countryMil, - 'townMil': res?.payload.data?.townMil, - 'villageMil': res?.payload.data?.villageMil, + 'countryMil': res?.payload.data?.countryMil.toFixed(3), + 'townMil': res?.payload.data?.townMil.toFixed(3), + 'villageMil': res?.payload.data?.villageMil.toFixed(3), }) } })