Browse Source

冲突解决

dev
wenlele 1 year ago
parent
commit
519a5e0936
  1. 2
      api/app/lib/controllers/report/index.js
  2. 2
      api/app/lib/index.js
  3. 57
      api/app/lib/schedule/index.js
  4. 55
      api/app/lib/schedule/noticeAbnormal.js
  5. 2
      api/app/lib/schedule/zhidiao.js
  6. 1
      api/config.js
  7. 0
      jenkinsfilenew_script_1.3.1_1_insert_report_data
  8. 185
      scripts/1.4.0/data/1_calc_village_distance/index.js
  9. 0
      scripts/1.4.0/data/1_calc_village_distance_无需执行/.vscode/launch.json
  10. 0
      scripts/1.4.0/data/1_calc_village_distance_无需执行/Dockerfile
  11. 0
      scripts/1.4.0/data/1_calc_village_distance_无需执行/Dockerfilenew
  12. 226
      scripts/1.4.0/data/1_calc_village_distance_无需执行/index.js
  13. 0
      scripts/1.4.0/data/1_calc_village_distance_无需执行/package.json
  14. 249
      scripts/1.4.0/data/3_village.sql
  15. 3692
      scripts/1.4.0/data/4_village_distance.sql
  16. 20
      web/client/src/layout/components/sider/index.js
  17. 224
      web/client/src/sections/fillion/nav-item.js

2
api/app/lib/controllers/report/index.js

@ -765,7 +765,7 @@ async function confirmRoadSpot (ctx) {
let spotRslt = []
for await (let item of spotedRoadIds) {
let corConserveCount = conserveCountRes.find(item => item.road_id == item)
let corConserveCount = conserveCountRes.find(cc => cc.road_id == item)
spotRslt.push({
roadId: item,
maintenanceCount: corConserveCount ? corConserveCount.count : 0,

2
api/app/lib/index.js

@ -97,6 +97,8 @@ module.exports.models = function (dc) { // dc = { orm: Sequelize对象, ORM: Seq
Road.belongsTo(Village, { foreignKey: 'villageId', targetKey: 'id' });
Report.belongsTo(Road, { foreignKey: 'roadId', targetKey: 'id', as: 'road_' });
Road.hasMany(Report, { foreignKey: 'roadId', sourceKey: 'id', as: 'road_' });
};

57
api/app/lib/schedule/index.js

@ -6,34 +6,35 @@ const nodeSchedule = require('node-schedule');
// 将定时任务汇集未来可根据需要选取操作
module.exports = async function (app, opts) {
const scheduleInit = ({
interval, immediate, proRun, disabled
}, callback) => {
if (disabled) {
return;
}
if (proRun && opts.dev) {
return;
}
const j = nodeSchedule.scheduleJob(interval, callback);
if (immediate && (!proRun || (proRun && !opts.dev))) {
setTimeout(callback, 0)
}
return j;
}
const scheduleInit = ({
interval, immediate, proRun, disabled
}, callback) => {
if (disabled) {
return;
}
if (proRun && opts.dev) {
return;
}
const j = nodeSchedule.scheduleJob(interval, callback);
if (immediate && (!proRun || (proRun && !opts.dev))) {
console.log(22222);
setTimeout(callback, 0)
}
return j;
}
app.fs.scheduleInit = scheduleInit
app.fs.scheduleInit = scheduleInit
fs.readdirSync(__dirname).forEach((filename) => {
if (!['index.js'].some(f => filename == f)) {
const scheduleList = require(`./${filename}`)(app, opts)
for (let k of Object.keys(scheduleList)) {
console.info(`定时任务 ${k} 启动`);
}
app.fs.schedule = {
...app.fs.schedule,
...scheduleList,
}
}
});
fs.readdirSync(__dirname).forEach((filename) => {
if (!['index.js'].some(f => filename == f)) {
const scheduleList = require(`./${filename}`)(app, opts)
for (let k of Object.keys(scheduleList)) {
console.info(`定时任务 ${k} 启动`);
}
app.fs.schedule = {
...app.fs.schedule,
...scheduleList,
}
}
});
};

55
api/app/lib/schedule/noticeAbnormal.js

@ -0,0 +1,55 @@
const moment = require('moment')
let isDev = false
isDev = true
module.exports = function (app, opts) {
const notice = app.fs.scheduleInit(
{
interval: '0 9 */1 * * *',
immediate: isDev && opts.dev,
proRun: !isDev,
disabled: false
},
async () => {
try {
const { models, ORM: sequelize } = app.fs.dc
console.log(123123);
const anomalyList = await models.Report.findAll({
where: {
handleState: null,
reportType: 'anomaly',
time: {
[sequelize.Op.lt]: moment().subtract(3, 'days').format('YYYY-MM-DD HH:mm:ss')
}
},
include: [{
model: models.User,
}, {
model: models.Road,
as: 'road_'
}]
})
for (let i = 0; i < anomalyList.length; i++) {
const anomaly = anomalyList[i]
/**
* 通过XX反馈类型反馈XX所道路的XX所属路段路段具体位置于XXXXXX反馈内容XXX上报人上报时间XX您已超过3天未处理请至平台尽快处理
*/
}
console.log(anomalyList);
} catch (error) {
console.error(error);
}
}
)
return {
notice,
}
}

2
api/app/lib/schedule/zhidiao.js

@ -9,7 +9,7 @@ module.exports = function (app, opts) {
{
interval: '24 0 */1 * * *',
immediate: true,
proRun: false,
proRun: true,
disabled: false
},

1
api/config.js

@ -57,6 +57,7 @@ if (
const product = {
port: flags.port || 8080,
staticDirs: ['static'],
dev: dev,
mws: [
{
entry: require('@fs/attachment').entry,

0
jenkinsfilenew_node → jenkinsfilenew_script_1.3.1_1_insert_report_data

185
scripts/1.4.0/data/1_calc_village_distance/index.js

@ -1,185 +0,0 @@
try {
const { Pool, Client } = require('pg')
const request = require('superagent')
const path = require('path')
const fs = require("fs");
const pool = new Pool({
host: '10.8.30.32',
port: 5432,
user: 'postgres',
password: '123',
database: 'highways4good',
})
const godKey = '21c2d970e1646bb9a795900dd00093ce'
function getDistance (lat1, lon1, lat2, lon2) {
var R = 6371000; // 半径 of the earth in meters
var dLat = deg2rad(lat2 - lat1); // deg2rad below
var dLon = deg2rad(lon2 - lon1);
var a =
Math.sin(dLat / 2) * Math.sin(dLat / 2) +
Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) *
Math.sin(dLon / 2) * Math.sin(dLon / 2)
;
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
var d = R * c; // Distance in meters
return d;
}
function deg2rad (deg) {
return deg * (Math.PI / 180)
}
// 两个经纬度
let coord1 = { latitude: 31.2304, longitude: 121.4737 }; // 上海
let coord2 = { latitude: 30.5685, longitude: 114.3055 }; // 武汉
// let distance = getDistance(coord1.latitude, coord1.longitude, coord2.latitude, coord2.longitude);
const fun = async () => {
// note: we don't try/catch this because if connecting throws an exception
// we don't need to dispose of the client (it will be undefined)
const client = await pool.connect()
try {
await client.query('BEGIN')
console.log(`开始`);
const nanchangRes = await request.get(`https://restapi.amap.com/v3/config/district?key=${godKey}&keywords=360100&subdistrict=1`)
console.log(nanchangRes.body);
let townshipList = nanchangRes.body.districts[0].districts
console.log(townshipList);
for (let t of townshipList) {
console.log(`${t.name}`);
let pageNum = 1
let continueSearch = true
for (; continueSearch;) {
console.log(`查询第${pageNum}`);
// const res = await request.get(`https://restapi.amap.com/v5/place/text?key=${godKey}&types=130106&region=360000&citylimit=true&page_size=25&page_num=${pageNum}&extensions=all`)
const res = await request.get(`https://restapi.amap.com/v3/place/text?key=${godKey}&keywords=%E6%9D%91%E5%A7%94%E4%BC%9A%7C%E6%9D%91%E6%B0%91%E5%A7%94%E5%91%98%E4%BC%9A&page_size=25&types=130106&citylimit=true&city=${t.adcode}&page=${pageNum}`)
await new Promise(resolve => setTimeout(() => resolve(), 2000));
// console.log(res.body);
const data = res.body
console.log(`查得 ${data.pois.length}`);
if (data.count == 0) {
continueSearch = false
break;
} else {
pageNum++
}
for await (let p of data.pois) {
console.log(p.name);
if (p.name.includes('村委会') || p.name.includes('村民委员会')) {
let vName = p.name.replace('村委会', '').replace('村民委员会', '').replace(/\(.*?\)/g, '')
if (vName.includes('乡')) {
let townKeyIndex = vName.indexOf('乡')
if (townKeyIndex >= 0) {
vName = vName.substring(townKeyIndex + 1)
}
}
if (vName.includes('镇')) {
let townKeyIndex = vName.indexOf('镇')
if (townKeyIndex >= 0) {
vName = vName.substring(townKeyIndex + 1)
}
}
if (!vName.endsWith('村')) {
vName = vName + '村'
}
// console.log(`${vName}`);
let locationArr = p.location.split(',')
// 查询镇名是否存在
let existRes = await client.query(
`SELECT * FROM village WHERE name=$1`,
[vName]
)
if (existRes.rowCount == 0) {
existRes = await client.query(
`SELECT * FROM village WHERE name=$1`,
[vName + '委会']
)
}
if (existRes.rowCount == 0) {
} else {
let existV = existRes.rows[0]
// console.log(existRes);
await client.query(
`UPDATE village SET longitude=$1, latitude=$2 WHERE id=$3`,
[locationArr[0], locationArr[1], existV.id]
)
}
}
}
}
}
const allVillagesRes = await client.query(
`SELECT * FROM village`
)
const allVillages = allVillagesRes.rows
for (let v of allVillages) {
if (!v.longitude || !v.latitude) {
continue
}
for (let vv of allVillages) {
if (
v.id != vv.id
// 只计算一个乡镇内的村
&& v.township_code == vv.township_code
) {
if (!vv.longitude || !vv.latitude) {
continue
}
let distance = getDistance(v.latitude, v.longitude, vv.latitude, vv.longitude)
// console.log(`${v.name} 与 ${vv.name} 的距离为 ${distance} 米`);
distance = Math.round(distance)
const existRes = await client.query(
`SELECT * FROM village_distance WHERE origin_village=$1 AND calc_village=$2`,
[v.id, vv.id]
)
if (existRes.rowCount == 0) {
await client.query(
`INSERT INTO village_distance (origin_village, calc_village, distance) VALUES ($1, $2, $3)`,
[v.id, vv.id, distance]
)
} else {
let upSql = `UPDATE village_distance SET distance=$1 WHERE origin_village=$2 AND calc_village=$3`
await client.query(
upSql
, [distance, v.id, vv.id]
)
}
}
}
}
// await client.query('ROLLBACK')
await client.query('COMMIT')
console.log('执行完毕~')
} catch (e) {
await client.query('ROLLBACK')
console.log('执行错误~')
throw e
} finally {
client.release();
}
}
fun()
} catch (error) {
console.error(error)
}

0
scripts/1.4.0/data/1_calc_village_distance/.vscode/launch.json → scripts/1.4.0/data/1_calc_village_distance_无需执行/.vscode/launch.json

0
scripts/1.4.0/data/1_calc_village_distance/Dockerfile → scripts/1.4.0/data/1_calc_village_distance_无需执行/Dockerfile

0
scripts/1.4.0/data/1_calc_village_distance/Dockerfilenew → scripts/1.4.0/data/1_calc_village_distance_无需执行/Dockerfilenew

226
scripts/1.4.0/data/1_calc_village_distance_无需执行/index.js

@ -0,0 +1,226 @@
try {
const { Pool, Client } = require('pg')
const request = require('superagent')
const path = require('path')
const fs = require("fs");
const pool = new Pool({
host: '10.8.30.32',
port: 5432,
user: 'postgres',
password: '123',
database: 'highways4good',
})
const godKey = '21c2d970e1646bb9a795900dd00093ce'
function getDistance (lat1, lon1, lat2, lon2) {
var R = 6371000; // 半径 of the earth in meters
var dLat = deg2rad(lat2 - lat1); // deg2rad below
var dLon = deg2rad(lon2 - lon1);
var a =
Math.sin(dLat / 2) * Math.sin(dLat / 2) +
Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) *
Math.sin(dLon / 2) * Math.sin(dLon / 2)
;
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
var d = R * c; // Distance in meters
return d;
}
function deg2rad (deg) {
return deg * (Math.PI / 180)
}
// let distance = getDistance(coord1.latitude, coord1.longitude, coord2.latitude, coord2.longitude);
const fun = async () => {
// note: we don't try/catch this because if connecting throws an exception
// we don't need to dispose of the client (it will be undefined)
const client = await pool.connect()
try {
await client.query('BEGIN')
console.log(`开始`);
const noTownshipLoop = true
// 查南昌市下的区县
const nanchangRes =
noTownshipLoop ? [] : await request.get(`https://restapi.amap.com/v3/config/district?key=${godKey}&keywords=360100&subdistrict=1`)
let townshipList =
noTownshipLoop ? [] : nanchangRes.body.districts[0].districts
// 获取各村位置
for (let t of (noTownshipLoop ? [{}] : townshipList)) {
console.log(`${t.name}`);
// 划分 20 个矩形查询
let leftTop = [115.792048, 28.976526]
let rightBottom = [116.324981, 28.262191]
for (let i = 0; i < 5; i++) { // 纵向
let top = leftTop[1] + (rightBottom[1] - leftTop[1]) / 5 * i
let bottom = leftTop[1] + (rightBottom[1] - leftTop[1]) / 5 * (i + 1)
for (let j = 0; j < 5; j++) { // 横向
let left = leftTop[0] + (rightBottom[0] - leftTop[0]) / 5 * j
let right = leftTop[0] + (rightBottom[0] - leftTop[0]) / 5 * (j + 1)
console.log(`矩形:${left},${top},${right},${bottom}`);
let pageNum = 1
let continueSearch = true
for (; continueSearch;) {
console.log(`查询第${pageNum}`);
let pageSize = 10
/** 关键词查询 */
// const res = await request.get(`https://restapi.amap.com/v5/place/text?key=${godKey}&types=130106&region=360000&citylimit=true&page_size=25&page_num=${pageNum}&extensions=all`)
/** 区县查询 */
// const res = await request.get(`https://restapi.amap.com/v3/place/text?key=${godKey}&keywords=%E6%9D%91%E5%A7%94%E4%BC%9A%7C%E6%9D%91%E6%B0%91%E5%A7%94%E5%91%98%E4%BC%9A&page_size=25&types=130106&citylimit=true&city=${t.adcode}&page=${pageNum}`)
/** 矩形查询 */
pageSize = 50
// const res = await request.get(`https://restapi.amap.com/v3/place/polygon?key=21c2d970e1646bb9a795900dd00093ce&keywords=%E6%9D%91%E5%A7%94%E4%BC%9A%7C%E6%9D%91%E6%B0%91%E5%A7%94%E5%91%98%E4%BC%9A&types=130106&offset=${pageSize}&page=${pageNum}&polygon=${left},${top}|${right},${bottom}`)
/** 矩形查询 V2 */
pageSize = 25
const res = await request.get(`https://restapi.amap.com/v5/place/polygon?key=21c2d970e1646bb9a795900dd00093ce&keywords=%E6%9D%91%E5%A7%94%E4%BC%9A%7C%E6%9D%91%E6%B0%91%E5%A7%94%E5%91%98%E4%BC%9A&types=130106&page_size=${pageSize}&page_num=${pageNum}&polygon=${left},${top}|${right},${bottom}`)
await new Promise(resolve => setTimeout(() => resolve(), 2000));
// console.log(res.body);
const data = res.body
// console.log(data);
console.log(`查得 ${data.pois.length}`);
if (data.count == 0) {
continueSearch = false
break;
} else {
pageNum++
}
for await (let p of data.pois) {
console.log(p.name);
if (p.name.includes('村委会') || p.name.includes('村民委员会')) {
let vName = p.name.replace('村委会', '').replace('村民委员会', '').replace(/\(.*?\)/g, '')
if (vName.includes('乡')) {
let townKeyIndex = vName.indexOf('乡')
if (townKeyIndex >= 0) {
vName = vName.substring(townKeyIndex + 1)
}
}
if (vName.includes('镇')) {
let townKeyIndex = vName.indexOf('镇')
if (townKeyIndex >= 0) {
vName = vName.substring(townKeyIndex + 1)
}
}
if (!vName.endsWith('村')) {
vName = vName + '村'
}
// console.log(`${vName}`);
let locationArr = p.location.split(',')
// 查询镇名是否存在
let existRes = await client.query(
`SELECT * FROM village WHERE name=$1`,
[vName]
)
if (existRes.rowCount == 0) {
existRes = await client.query(
`SELECT * FROM village WHERE name=$1`,
[vName + '委会']
)
}
if (existRes.rowCount == 0) {
} else {
let existV = existRes.rows[0]
if (existV.id < 207) {
continue
}
// console.log(existRes);
await client.query(
`UPDATE village SET longitude=$1, latitude=$2 WHERE id=$3`,
[locationArr[0], locationArr[1], existV.id]
)
}
}
}
if (data.pois.length < pageSize) {
continueSearch = false
}
}
}
}
}
const allVillagesRes = await client.query(
`SELECT * FROM village`
)
const allVillages = allVillagesRes.rows
for (let v of allVillages) {
if (!v.longitude || !v.latitude) {
continue
}
for (let vv of allVillages) {
if (
v.id != vv.id
// 只计算一个乡镇内的村
&& v.township_code == vv.township_code
) {
if (!vv.longitude || !vv.latitude) {
continue
}
let distance = getDistance(v.latitude, v.longitude, vv.latitude, vv.longitude)
// console.log(`${v.name} 与 ${vv.name} 的距离为 ${distance} 米`);
distance = Math.round(distance)
const existRes = await client.query(
`SELECT * FROM village_distance WHERE origin_village=$1 AND calc_village=$2`,
[v.id, vv.id]
)
if (existRes.rowCount == 0) {
await client.query(
`INSERT INTO village_distance (origin_village, calc_village, distance) VALUES ($1, $2, $3)`,
[v.id, vv.id, distance]
)
} else {
let upSql = `UPDATE village_distance SET distance=$1 WHERE origin_village=$2 AND calc_village=$3`
await client.query(
upSql
, [distance, v.id, vv.id]
)
}
}
}
}
// await client.query('ROLLBACK')
await client.query('COMMIT')
console.log('执行完毕~')
} catch (e) {
await client.query('ROLLBACK')
console.log('执行错误~')
throw e
} finally {
client.release();
}
}
fun()
} catch (error) {
console.error(error)
}

0
scripts/1.4.0/data/1_calc_village_distance/package.json → scripts/1.4.0/data/1_calc_village_distance_无需执行/package.json

249
scripts/1.4.0/data/3_village.sql

@ -0,0 +1,249 @@
/*
Navicat Premium Data Transfer
Source Server : 10.8.30.32
Source Server Type : PostgreSQL
Source Server Version : 90515
Source Host : 10.8.30.32:5432
Source Catalog : highways4good
Source Schema : public
Target Server Type : PostgreSQL
Target Server Version : 90515
File Encoding : 65001
Date: 13/12/2023 11:19:37
*/
DO $$
BEGIN
RAISE NOTICE '!!! 请注意 这将删除所有已有的村信息 9s后继续';
PERFORM pg_sleep(9); -- 等待一小段时间
END $$;
DELETE FROM "public"."village" WHERE "id" > 0;
SELECT setval('village_id_seq', 1);
-- ----------------------------
-- Records of village
-- ----------------------------
INSERT INTO "public"."village" VALUES (72, '大浦村', '360121200000', 116.214237, 28.628771);
INSERT INTO "public"."village" VALUES (179, '新庄村委会', '360121104000', 116.184029, 28.577882);
INSERT INTO "public"."village" VALUES (183, '南湖村委会', '360121104000', 116.173834, 28.571146);
INSERT INTO "public"."village" VALUES (18, '雄溪村', '360121100000', 115.906383, 28.527645);
INSERT INTO "public"."village" VALUES (20, '樟溪村', '360121100000', 115.888085, 28.533192);
INSERT INTO "public"."village" VALUES (31, '若冈村', '360121204000', 115.858428, 28.481393);
INSERT INTO "public"."village" VALUES (34, '冈上镇', '360121107000', 115.867404, 28.416402);
INSERT INTO "public"."village" VALUES (37, '晋安村', '360121107000', 115.864062, 28.452018);
INSERT INTO "public"."village" VALUES (48, '北望村', '360121105000', 116.026992, 28.732745);
INSERT INTO "public"."village" VALUES (98, '上徐村', '360121201000', 115.602051, 28.827248);
INSERT INTO "public"."village" VALUES (201, '东联村委会', '360121104000', 116.113818, 28.555688);
INSERT INTO "public"."village" VALUES (112, '高田村', '360121101000', 116.005288, 28.440317);
INSERT INTO "public"."village" VALUES (22, '新坊村', '360121100000', 115.98868, 28.577955);
INSERT INTO "public"."village" VALUES (23, '涂埠村', '360121100000', 115.990438, 28.568502);
INSERT INTO "public"."village" VALUES (94, '程湖村', '360121201000', 116.125333, 28.869139);
INSERT INTO "public"."village" VALUES (104, '建新村', '360121201000', 116.112269, 28.877653);
INSERT INTO "public"."village" VALUES (79, '山头村', '360121200000', 116.274073, 28.643894);
INSERT INTO "public"."village" VALUES (35, '曲湖村', '360121107000', 115.849092, 28.459471);
INSERT INTO "public"."village" VALUES (36, '石湖村', '360121107000', 115.839205, 28.424433);
INSERT INTO "public"."village" VALUES (17, '柏林村', '360121100000', 115.880543, 28.529444);
INSERT INTO "public"."village" VALUES (40, '蚕石村', '360121107000', 115.870111, 28.414157);
INSERT INTO "public"."village" VALUES (51, '垾上村', '360121105000', 115.977852, 28.766188);
INSERT INTO "public"."village" VALUES (210, '岭前村', '360121203000', 115.981315, 28.352234);
INSERT INTO "public"."village" VALUES (41, '冈上村', '360121107000', 115.865094, 28.41236);
INSERT INTO "public"."village" VALUES (39, '安仁村', '360121107000', 115.887279, 28.415884);
INSERT INTO "public"."village" VALUES (216, '郭埠村', '360121203000', 115.998395, 28.341197);
INSERT INTO "public"."village" VALUES (218, '上洛村', '360121203000', 115.981356, 28.367931);
INSERT INTO "public"."village" VALUES (217, '罗渡村', '360121203000', 116.000766, 28.320435);
INSERT INTO "public"."village" VALUES (215, '南安村', '360121203000', 116.045806, 28.346124);
INSERT INTO "public"."village" VALUES (207, '徐家村', '360121203000', 116.025723, 28.344863);
INSERT INTO "public"."village" VALUES (213, '官田村', '360121203000', 116.048015, 28.302216);
INSERT INTO "public"."village" VALUES (219, '冯家村', '360121203000', 116.014752, 28.345062);
INSERT INTO "public"."village" VALUES (110, '荆山村', '360121101000', 115.969413, 28.476892);
INSERT INTO "public"."village" VALUES (46, '黄台村', '360121107000', 115.923932, 28.487954);
INSERT INTO "public"."village" VALUES (214, '丰林村', '360121203000', 116.07343, 28.29544);
INSERT INTO "public"."village" VALUES (208, '涂洪村', '360121203000', 116.02995, 28.301282);
INSERT INTO "public"."village" VALUES (211, '东边村', '360121203000', 116.086743, 28.294081);
INSERT INTO "public"."village" VALUES (209, '华标村', '360121203000', 116.015713, 28.304449);
INSERT INTO "public"."village" VALUES (212, '白城村', '360121203000', 116.080418, 28.310842);
INSERT INTO "public"."village" VALUES (6, '新坊村', '360121206000', 115.98868, 28.577955);
INSERT INTO "public"."village" VALUES (57, '山尾村', '360121105000', 116.048296, 28.763889);
INSERT INTO "public"."village" VALUES (120, '山下村', '360121102000', 115.004337, 28.868673);
INSERT INTO "public"."village" VALUES (87, '中徐村', '360121201000', 116.037935, 28.781373);
INSERT INTO "public"."village" VALUES (5, '涂埠村', '360121206000', 115.990438, 28.568502);
INSERT INTO "public"."village" VALUES (45, '东坛村', '360121107000', 115.921248, 28.471955);
INSERT INTO "public"."village" VALUES (111, '沙潭村', '360121101000', 115.98285, 28.457658);
INSERT INTO "public"."village" VALUES (99, '周坊村', '360121201000', 116.137633, 28.26251);
INSERT INTO "public"."village" VALUES (107, '楼前村', '360121201000', 116.074001, 28.803123);
INSERT INTO "public"."village" VALUES (47, '柏岗山村', '360121105000', 116.007923, 28.754579);
INSERT INTO "public"."village" VALUES (106, '友好村', '360121201000', 116.005304, 28.805869);
INSERT INTO "public"."village" VALUES (76, '创业村', '360121200000', 116.249903, 28.713182);
INSERT INTO "public"."village" VALUES (62, '小莲村', '360121200000', 116.222127, 28.705666);
INSERT INTO "public"."village" VALUES (27, '院前村', '360121100000', 115.983445, 28.580009);
INSERT INTO "public"."village" VALUES (202, '亭山村委会', '360121104000', 116.068404, 28.562518);
INSERT INTO "public"."village" VALUES (203, '桃岭村委会', '360121104000', 116.098351, 28.571411);
INSERT INTO "public"."village" VALUES (83, '东阳村', '360121200000', 115.633671, 28.85576);
INSERT INTO "public"."village" VALUES (185, '田坪村委会', '360121104000', 116.070029, 28.556592);
INSERT INTO "public"."village" VALUES (200, '新荣村委会', '360121104000', 116.09247, 28.557884);
INSERT INTO "public"."village" VALUES (73, '杨芳村', '360121200000', 116.164655, 28.624465);
INSERT INTO "public"."village" VALUES (67, '岗背村', '360121200000', 116.17774, 28.634743);
INSERT INTO "public"."village" VALUES (64, '大沙村', '360121200000', 116.19281, 28.628351);
INSERT INTO "public"."village" VALUES (16, '岗前村', '360121100000', 115.912766, 28.504385);
INSERT INTO "public"."village" VALUES (115, '棠墅村', '360121101000', 116.00075, 28.496959);
INSERT INTO "public"."village" VALUES (114, '黄堂村', '360121101000', 116.004542, 28.450622);
INSERT INTO "public"."village" VALUES (13, '南江村', '360121206000', 115.970667, 28.532563);
INSERT INTO "public"."village" VALUES (14, '钱溪村', '360121206000', 115.986238, 28.528787);
INSERT INTO "public"."village" VALUES (11, '板联村', '360121206000', 115.958076, 28.539083);
INSERT INTO "public"."village" VALUES (10, '南邓村', '360121206000', 115.987479, 28.539869);
INSERT INTO "public"."village" VALUES (173, '郭上村', '360121106000', 116.06449, 28.48128);
INSERT INTO "public"."village" VALUES (116, '河头村', '360121101000', 116.02505, 28.477677);
INSERT INTO "public"."village" VALUES (137, '塔城乡', '360121202000', 116.10004, 28.50293);
INSERT INTO "public"."village" VALUES (164, '南坊村', '360121106000', 116.050391, 28.513534);
INSERT INTO "public"."village" VALUES (139, '协成村', '360121103000', 116.129687, 28.660123);
INSERT INTO "public"."village" VALUES (132, '塔城村', '360121202000', 116.088603, 28.504402);
INSERT INTO "public"."village" VALUES (162, '傅家村', '360121106000', 116.061403, 28.494432);
INSERT INTO "public"."village" VALUES (190, '涂村村委会', '360121104000', 116.129867, 28.580834);
INSERT INTO "public"."village" VALUES (117, '黄山村', '360121101000', 116.008802, 28.477287);
INSERT INTO "public"."village" VALUES (92, '丰洲村', '360121201000', 116.095401, 28.860718);
INSERT INTO "public"."village" VALUES (131, '芳湖村', '360121202000', 116.075094, 28.518389);
INSERT INTO "public"."village" VALUES (93, '九联村', '360121201000', 116.125877, 28.864965);
INSERT INTO "public"."village" VALUES (101, '塘头村', '360121201000', 116.113635, 28.844268);
INSERT INTO "public"."village" VALUES (61, '洲头村', '360121105000', 115.998417, 28.729998);
INSERT INTO "public"."village" VALUES (50, '高梧村', '360121105000', 115.959442, 28.747003);
INSERT INTO "public"."village" VALUES (53, '蒋巷村', '360121105000', 116.025726, 28.760355);
INSERT INTO "public"."village" VALUES (97, '芳洲村', '360121201000', 116.009118, 28.823252);
INSERT INTO "public"."village" VALUES (184, '潭林村委会', '360121104000', 116.060203, 28.536342);
INSERT INTO "public"."village" VALUES (154, '梓溪村', '360121103000', 116.142602, 28.745927);
INSERT INTO "public"."village" VALUES (155, '北星村', '360121103000', 116.212403, 28.743005);
INSERT INTO "public"."village" VALUES (158, '港头村', '360121103000', 116.131458, 28.722499);
INSERT INTO "public"."village" VALUES (147, '西联村', '360121103000', 116.160722, 28.694789);
INSERT INTO "public"."village" VALUES (156, '篁山村', '360121103000', 116.127145, 28.696386);
INSERT INTO "public"."village" VALUES (160, '红星村', '360121103000', 116.225488, 28.724804);
INSERT INTO "public"."village" VALUES (7, '后曲村', '360121206000', 115.95901, 28.579489);
INSERT INTO "public"."village" VALUES (3, '八一村', '360121206000', 115.960553, 28.55625);
INSERT INTO "public"."village" VALUES (204, '涂洲村委会', '360121104000', 116.078901, 28.595668);
INSERT INTO "public"."village" VALUES (178, '江陂村委会', '360121104000', 116.099043, 28.593743);
INSERT INTO "public"."village" VALUES (167, '庵前村', '360121106000', 116.042874, 28.565391);
INSERT INTO "public"."village" VALUES (163, '泗洪村', '360121106000', 116.024623, 28.55705);
INSERT INTO "public"."village" VALUES (189, '胡陶村委会', '360121104000', 116.142484, 28.620004);
INSERT INTO "public"."village" VALUES (140, '富盛村', '360121103000', 116.147335, 28.639503);
INSERT INTO "public"."village" VALUES (194, '东田村委会', '360121104000', 116.153311, 28.592166);
INSERT INTO "public"."village" VALUES (152, '近港村', '360121103000', 116.129339, 28.628202);
INSERT INTO "public"."village" VALUES (78, '泾口村', '360121200000', 116.178502, 28.650683);
INSERT INTO "public"."village" VALUES (151, '田万村', '360121103000', 116.140264, 28.653249);
INSERT INTO "public"."village" VALUES (196, '幽兰村委会', '360121104000', 116.15259, 28.580465);
INSERT INTO "public"."village" VALUES (141, '塘南村', '360121103000', 116.147283, 28.656901);
INSERT INTO "public"."village" VALUES (188, '牌坊村委会', '360121104000', 116.117641, 28.604719);
INSERT INTO "public"."village" VALUES (144, '石岗村', '360121103000', 116.118361, 28.636201);
INSERT INTO "public"."village" VALUES (146, '蔡家村', '360121103000', 116.15818, 28.669279);
INSERT INTO "public"."village" VALUES (197, '马游村委会', '360121104000', 116.202666, 28.579327);
INSERT INTO "public"."village" VALUES (69, '泥湾村', '360121200000', 116.187197, 28.671414);
INSERT INTO "public"."village" VALUES (80, '东湖村', '360121200000', 116.249393, 28.644374);
INSERT INTO "public"."village" VALUES (186, '黄坊村委会', '360121104000', 116.084316, 28.541112);
INSERT INTO "public"."village" VALUES (30, '滩上村', '360121204000', 115.83838, 28.49814);
INSERT INTO "public"."village" VALUES (171, '茌港村', '360121106000', 116.045529, 28.475724);
INSERT INTO "public"."village" VALUES (136, '东游村', '360121202000', 116.08877, 28.477955);
INSERT INTO "public"."village" VALUES (180, '灌溪村委会', '360121104000', 116.06865, 28.545034);
INSERT INTO "public"."village" VALUES (1, '院前村', '360121206000', 115.983445, 28.580009);
INSERT INTO "public"."village" VALUES (166, '徐桥村', '360121106000', 116.029054, 28.540922);
INSERT INTO "public"."village" VALUES (170, '保丰村', '360121106000', 116.013326, 28.534802);
INSERT INTO "public"."village" VALUES (138, '付家村', '360121202000', 116.339965, 27.994511);
INSERT INTO "public"."village" VALUES (113, '剑霞村', '360121101000', 116.008095, 28.414172);
INSERT INTO "public"."village" VALUES (127, '青岚村', '360121202000', 116.125088, 28.50699);
INSERT INTO "public"."village" VALUES (129, '凤岗村', '360121202000', 116.112773, 28.485901);
INSERT INTO "public"."village" VALUES (128, '湖陂村', '360121202000', 116.115218, 28.503668);
INSERT INTO "public"."village" VALUES (135, '北洲村', '360121202000', 116.133312, 28.532865);
INSERT INTO "public"."village" VALUES (157, '新联村', '360121103000', 115.815561, 28.317583);
INSERT INTO "public"."village" VALUES (38, '兴农村', '360121107000', 115.883487, 28.382332);
INSERT INTO "public"."village" VALUES (90, '大港村', '360121201000', 115.884431, 28.281021);
INSERT INTO "public"."village" VALUES (125, '源溪村', '360121102000', 115.963609, 28.336145);
INSERT INTO "public"."village" VALUES (123, '竹山村', '360121102000', 115.961125, 28.319372);
INSERT INTO "public"."village" VALUES (118, '岗坊村', '360121102000', 115.971352, 28.337746);
INSERT INTO "public"."village" VALUES (85, '西江村', '360121201000', 115.976179, 28.798273);
INSERT INTO "public"."village" VALUES (49, '滁北村', '360121105000', 116.09154, 28.769882);
INSERT INTO "public"."village" VALUES (55, '联圩村', '360121105000', 116.107338, 28.818752);
INSERT INTO "public"."village" VALUES (54, '立新村', '360121105000', 116.144869, 28.807526);
INSERT INTO "public"."village" VALUES (143, '西河村', '360121103000', 116.136048, 28.71975);
INSERT INTO "public"."village" VALUES (161, '新光村', '360121103000', 116.258028, 28.735727);
INSERT INTO "public"."village" VALUES (25, '后曲村', '360121100000', 115.95901, 28.579489);
INSERT INTO "public"."village" VALUES (75, '东方村', '360121200000', 116.285848, 28.711096);
INSERT INTO "public"."village" VALUES (9, '甫下村', '360121206000', 115.95245, 28.585884);
INSERT INTO "public"."village" VALUES (105, '团结村', '360121201000', 116.055043, 28.859536);
INSERT INTO "public"."village" VALUES (102, '南新村', '360121201000', 116.100275, 28.834061);
INSERT INTO "public"."village" VALUES (95, '范湖村', '360121201000', 116.131561, 28.86208);
INSERT INTO "public"."village" VALUES (4, '大昌村', '360121206000', 115.977686, 28.570024);
INSERT INTO "public"."village" VALUES (8, '淡溪村', '360121206000', 115.960536, 28.564372);
INSERT INTO "public"."village" VALUES (2, '莲溪村', '360121206000', 115.947686, 28.54992);
INSERT INTO "public"."village" VALUES (150, '渡口村', '360121103000', 116.094675, 28.667283);
INSERT INTO "public"."village" VALUES (187, '杨树村委会', '360121104000', 116.156207, 28.600436);
INSERT INTO "public"."village" VALUES (191, '少城村委会', '360121104000', 116.185345, 28.595351);
INSERT INTO "public"."village" VALUES (66, '后房村', '360121200000', 116.173656, 28.657392);
INSERT INTO "public"."village" VALUES (198, '枫林村委会', '360121104000', 116.158061, 28.579663);
INSERT INTO "public"."village" VALUES (182, '南山村委会', '360121104000', 116.154644, 28.566458);
INSERT INTO "public"."village" VALUES (192, '青塘村委会', '360121104000', 116.139433, 28.569839);
INSERT INTO "public"."village" VALUES (70, '康庄村', '360121200000', 116.19966, 28.686864);
INSERT INTO "public"."village" VALUES (81, '辕门村', '360121200000', 116.231988, 28.652196);
INSERT INTO "public"."village" VALUES (88, '新洲村', '360121201000', 115.814069, 28.487379);
INSERT INTO "public"."village" VALUES (33, '富山村', '360121204000', 115.856603, 28.509353);
INSERT INTO "public"."village" VALUES (29, '东亘村', '360121204000', 115.879845, 28.50452);
INSERT INTO "public"."village" VALUES (195, '厚田村委会', '360121104000', 115.800113, 28.459796);
INSERT INTO "public"."village" VALUES (21, '虎山村', '360121100000', 115.85741, 28.521369);
INSERT INTO "public"."village" VALUES (44, '合山村', '360121107000', 115.883344, 28.437271);
INSERT INTO "public"."village" VALUES (24, '莲溪村', '360121100000', 115.947686, 28.54992);
INSERT INTO "public"."village" VALUES (206, '罗舍村委会', '360121104000', 116.084295, 28.591173);
INSERT INTO "public"."village" VALUES (26, '甫下村', '360121100000', 115.95245, 28.585884);
INSERT INTO "public"."village" VALUES (63, '北山村', '360121200000', 116.243644, 28.656736);
INSERT INTO "public"."village" VALUES (82, '北湖村', '360121200000', 116.226098, 28.656859);
INSERT INTO "public"."village" VALUES (65, '东风村', '360121200000', 116.274513, 28.681892);
INSERT INTO "public"."village" VALUES (77, '东升村', '360121200000', 116.261792, 28.683048);
INSERT INTO "public"."village" VALUES (28, '清湖村', '360121204000', 115.833497, 28.512409);
INSERT INTO "public"."village" VALUES (91, '潭口村', '360121201000', 116.057149, 28.87803);
INSERT INTO "public"."village" VALUES (58, '胜利村', '360121105000', 116.171607, 28.838948);
INSERT INTO "public"."village" VALUES (60, '叶楼村', '360121105000', 115.976331, 28.735793);
INSERT INTO "public"."village" VALUES (52, '河边村', '360121105000', 115.99085, 28.769667);
INSERT INTO "public"."village" VALUES (84, '黄渡村', '360121201000', 116.005144, 28.781514);
INSERT INTO "public"."village" VALUES (56, '三洞村', '360121105000', 116.073234, 28.790218);
INSERT INTO "public"."village" VALUES (96, '山上村', '360121201000', 116.066172, 28.804352);
INSERT INTO "public"."village" VALUES (89, '东邺村', '360121201000', 116.019477, 28.802677);
INSERT INTO "public"."village" VALUES (103, '爱民村', '360121201000', 116.028535, 28.824822);
INSERT INTO "public"."village" VALUES (153, '北联村', '360121103000', 116.188642, 28.742157);
INSERT INTO "public"."village" VALUES (145, '和丰村', '360121103000', 116.181569, 28.726273);
INSERT INTO "public"."village" VALUES (59, '五丰村', '360121105000', 116.158872, 28.808749);
INSERT INTO "public"."village" VALUES (32, '三山村', '360121204000', 115.893122, 28.497787);
INSERT INTO "public"."village" VALUES (148, '民主村', '360121103000', 116.177652, 28.697873);
INSERT INTO "public"."village" VALUES (19, '唐村', '360121100000', 115.853631, 28.537015);
INSERT INTO "public"."village" VALUES (142, '新图村', '360121103000', 116.275179, 28.750562);
INSERT INTO "public"."village" VALUES (43, '万舍村', '360121107000', 115.90522, 28.473154);
INSERT INTO "public"."village" VALUES (172, '西游村', '360121106000', 116.043611, 28.493506);
INSERT INTO "public"."village" VALUES (12, '五星村', '360121206000', 115.97712, 28.55457);
INSERT INTO "public"."village" VALUES (15, '胡华村', '360121206000', 116.001586, 28.549589);
INSERT INTO "public"."village" VALUES (174, '朱坊村', '360121106000', 116.031644, 28.489477);
INSERT INTO "public"."village" VALUES (133, '闹上村', '360121202000', 116.09668, 28.501774);
INSERT INTO "public"."village" VALUES (165, '蕉湖村', '360121106000', 116.023344, 28.510748);
INSERT INTO "public"."village" VALUES (177, '前进村', '360121106000', 116.032232, 28.521139);
INSERT INTO "public"."village" VALUES (176, '大仪村', '360121106000', 116.046741, 28.529927);
INSERT INTO "public"."village" VALUES (168, '广丰村', '360121106000', 116.052662, 28.567175);
INSERT INTO "public"."village" VALUES (169, '楞上村', '360121106000', 116.037293, 28.551206);
INSERT INTO "public"."village" VALUES (130, '秋溪村', '360121202000', 116.091391, 28.523875);
INSERT INTO "public"."village" VALUES (175, '武阳村', '360121106000', 116.014564, 28.525606);
INSERT INTO "public"."village" VALUES (74, '沙湖村', '360121200000', 116.174761, 28.61284);
INSERT INTO "public"."village" VALUES (181, '流芳村委会', '360121104000', 116.158095, 28.599718);
INSERT INTO "public"."village" VALUES (71, '水阁村', '360121200000', 116.214523, 28.60322);
INSERT INTO "public"."village" VALUES (193, '竹林村委会', '360121104000', 116.124181, 28.573113);
INSERT INTO "public"."village" VALUES (149, '张溪村', '360121103000', 116.122894, 28.669063);
INSERT INTO "public"."village" VALUES (159, '联合村', '360121103000', 116.164153, 28.690551);
INSERT INTO "public"."village" VALUES (134, '南洲村', '360121202000', 116.114994, 28.466552);
INSERT INTO "public"."village" VALUES (42, '长湖村', '360121107000', 115.862675, 28.3602);
INSERT INTO "public"."village" VALUES (121, '徐罗村', '360121102000', 115.97768, 28.321411);
INSERT INTO "public"."village" VALUES (124, '东庄村', '360121102000', 115.964257, 28.308502);
INSERT INTO "public"."village" VALUES (119, '汗塘村', '360121102000', 115.987883, 28.295723);
INSERT INTO "public"."village" VALUES (122, '松林村', '360121102000', 115.966566, 28.285884);
INSERT INTO "public"."village" VALUES (126, '三江村', '360121102000', 116.004494, 28.294283);
INSERT INTO "public"."village" VALUES (100, '聂家村', '360121201000', 116.075915, 28.365339);
INSERT INTO "public"."village" VALUES (109, '梁西村', '360121101000', 116.020828, 28.39533);
INSERT INTO "public"."village" VALUES (68, '东岗村', '360121200000', 116.145755, 28.322438);
INSERT INTO "public"."village" VALUES (86, '周坊村', '360121201000', 116.137633, 28.26251);
INSERT INTO "public"."village" VALUES (199, '渡头村委会', '360121104000', 116.121168, 28.268048);
SELECT setval('village_id_seq', (SELECT MAX(id) FROM village));

3692
scripts/1.4.0/data/4_village_distance.sql

File diff suppressed because it is too large

20
web/client/src/layout/components/sider/index.js

@ -51,7 +51,6 @@ const Sider = props => {
});
}, [items])
return (
<Menu id="sider" mode="inline"
// theme={themeName || 'dark'}
@ -62,7 +61,24 @@ const Sider = props => {
setSelectedKeys(selectedKeys)
}}
onOpenChange={(ks) => {
setOpenKeys(ks.length > 1 ? [ks.pop()] : ks)
if (ks.length) {
let nextKs = []
let lastKey = nextKs[nextKs.length - 1]
if (lastKey == 'organization') {
setOpenKeys[lastKey]
} else {
if (ks.length > 2) {
ks.splice(1, ks.length - 2)
}
setOpenKeys(ks)
}
setOpenKeys(
ks.length > 2 ? ks.slice(ks.length - 2) : ks
// ks.length > 1 ? [ks.pop()] : ks
)
} else {
setOpenKeys([])
}
}}
>
{items}

224
web/client/src/sections/fillion/nav-item.js

@ -4,117 +4,145 @@ import { Menu } from 'antd';
import { ReadOutlined } from '@ant-design/icons';
const SubMenu = Menu.SubMenu;
export function getNavItem (user, dispatch) {
const isshow = user?.userResources?.
some(i => i.resourceId === 'OVERLOADMANAGE' ||
i.resourceId === 'ROADMANAGE' ||
i.resourceId === 'BRIDGEMANAGE' ||
i.resourceId === 'MAINTENANCEMANAGE' ||
i.resourceId === 'TRANSPORTATIONMANAGE' ||
i.resourceId === 'CONSERVATIONMANAGE' ||
i.resourceId === 'PUBLICTRANSPORTMANAGE' ||
i.resourceId === 'FILEMANAGE' ||
i.resourceId === 'PUBLICITYVIDEO' ||
i.resourceId === 'FEEDBACKMANAGE' ||
i.resourceId === 'REPORTMANAGE' ||
i.resourceId === 'PATROLMANAGE' ||
i.resourceId === 'ASSESSMANAGE' ||
i.resourceId === 'VIDEOCENTER' ||
i.resourceId === 'BUILDINGPROJECT' ||
i.resourceId === 'MAINTENANCESPOTCHECK' ||
i.resourceId === 'LUZHENG' ||
i.resourceId === 'ADJUSTLOG'
)
const isshow = user?.userResources?.
some(i => i.resourceId === 'OVERLOADMANAGE' ||
i.resourceId === 'ROADMANAGE' ||
i.resourceId === 'BRIDGEMANAGE' ||
i.resourceId === 'MAINTENANCEMANAGE' ||
i.resourceId === 'TRANSPORTATIONMANAGE' ||
i.resourceId === 'CONSERVATIONMANAGE' ||
i.resourceId === 'PUBLICTRANSPORTMANAGE' ||
i.resourceId === 'FILEMANAGE' ||
i.resourceId === 'PUBLICITYVIDEO' ||
i.resourceId === 'FEEDBACKMANAGE' ||
i.resourceId === 'REPORTMANAGE' ||
i.resourceId === 'PATROLMANAGE' ||
i.resourceId === 'ASSESSMANAGE' ||
i.resourceId === 'VIDEOCENTER' ||
i.resourceId === 'BUILDINGPROJECT' ||
i.resourceId === 'MAINTENANCESPOTCHECK' ||
i.resourceId === 'LUZHENG' ||
i.resourceId === 'ADJUSTLOG'
)
return (
user?.username == 'SuperAdmin' || isshow ?
<SubMenu key="fillion" icon={<ReadOutlined />} title={'数据管理'}>
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'OVERLOADMANAGE') ?
return (
user?.username == 'SuperAdmin' || isshow ?
<SubMenu key="fillion" icon={<ReadOutlined />} title={'数据管理'}>
{
user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'REPORTMANAGE' || i.resourceId === 'BUILDINGPROJECT' || i.resourceId === 'FILEMANAGE') ?
<SubMenu key="build" title={'建设'}>
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'REPORTMANAGE') ?
<Menu.Item key="fillionpatrolroad">
<Link to="/fillion/patrol_road">建设上报</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'BUILDINGPROJECT') ?
<Menu.Item key="fillionbuilding">
<Link to="/fillion/processsing">在建项目</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'FILEMANAGE') ?
<Menu.Item key="fileCont">
<Link to="/fillion/file">档案管理</Link>
</Menu.Item> : ''}
</SubMenu>
: ''
}
{
user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'VIDEOCENTER' || i.resourceId === 'LUZHENG' || i.resourceId === 'ROADMANAGE' || i.resourceId === 'BRIDGEMANAGE') ?
<SubMenu key="manage" title={'管理'}>
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'VIDEOCENTER') ?
<Menu.Item key="fillionvideoCenter">
<Link to="/fillion/videoCenter">视频中心</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'LUZHENG') ?
<Menu.Item key="luzheng">
<Link to="/fillion/luzheng">路政管理</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'ROADMANAGE') ?
<Menu.Item key="filliontransportation">
<Link to="/fillion/transportation">道路管理</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'BRIDGEMANAGE') ?
<Menu.Item key="fillionbridge">
<Link to="/fillion/bridge">桥梁管理</Link>
</Menu.Item> : ''}
</SubMenu>
: ''
}
{
user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'MAINTENANCEMANAGE' || i.resourceId === 'PATROLMANAGE' || i.resourceId === 'FEEDBACKMANAGE' || i.resourceId === 'CONSERVATIONMANAGE' || i.resourceId === 'MAINTENANCESPOTCHECK' || i.resourceId === 'ADJUSTLOG' || i.resourceId === 'ASSESSMANAGE') ?
<SubMenu key="conserve" title={'养护'}>
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'MAINTENANCEMANAGE') ?
<Menu.Item key="fillionhighways">
<Link to="/fillion/highways">管养管理</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'PATROLMANAGE') ?
<Menu.Item key="fillionpatrol">
<Link to="/fillion/patrol">巡查管理</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'FEEDBACKMANAGE') ?
<Menu.Item key="fillionpatrolanomaly">
<Link to="/fillion/patrol_anomaly">异常反馈</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'CONSERVATIONMANAGE') ?
<Menu.Item key="fillionmaintenance">
<Link to="/fillion/maintenance">养护管理</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'MAINTENANCESPOTCHECK') ?
<Menu.Item key="maintenanceSpotCheck">
<Link to="/fillion/maintenanceSpotCheck">养护抽查</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'ADJUSTLOG') ?
<Menu.Item key="adjustLog">
<Link to="/fillion/adjustLog">调整日志</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'ASSESSMANAGE') ?
<Menu.Item key="fillionassess">
<Link to="/fillion/assess">考核评分</Link>
</Menu.Item> : ''}
</SubMenu>
: ''
}
{
user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'TRANSPORTATIONMANAGE' || i.resourceId === 'PUBLICTRANSPORTMANAGE') ?
<SubMenu key="operation" title={'运营'}>
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'TRANSPORTATIONMANAGE') ?
<Menu.Item key="fillionoperational">
<Link to="/fillion/operational">运政管理</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'PUBLICTRANSPORTMANAGE') ?
<Menu.Item key="fillionpublic">
<Link to="/fillion/public">公交管理</Link>
</Menu.Item> : ''}
</SubMenu>
: ''
}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'OVERLOADMANAGE') ?
<Menu.Item key="fillioninfor">
<Link to="/fillion/infor">治超管理</Link>
</Menu.Item> : ''}
{/* <Menu.Item key="filliontask">
{/* <Menu.Item key="filliontask">
<Link to="/fillion/task">任务管理</Link>
</Menu.Item> */}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'LUZHENG') ?
<Menu.Item key="luzheng">
<Link to="/fillion/luzheng">路政管理</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'ROADMANAGE') ?
<Menu.Item key="filliontransportation">
<Link to="/fillion/transportation">道路管理</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'BRIDGEMANAGE') ?
<Menu.Item key="fillionbridge">
<Link to="/fillion/bridge">桥梁管理</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'MAINTENANCEMANAGE') ?
<Menu.Item key="fillionhighways">
<Link to="/fillion/highways">管养管理</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'TRANSPORTATIONMANAGE') ?
<Menu.Item key="fillionoperational">
<Link to="/fillion/operational">运政管理</Link>
</Menu.Item> : ''}
{/* <Menu.Item key="fillionenforce">
{/* <Menu.Item key="fillionenforce">
<Link to="/fillion/enforce">执法管理</Link>
</Menu.Item> */}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'CONSERVATIONMANAGE') ?
<Menu.Item key="fillionmaintenance">
<Link to="/fillion/maintenance">养护管理</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'PATROLMANAGE') ?
<Menu.Item key="fillionpatrol">
<Link to="/fillion/patrol">巡查管理</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'FEEDBACKMANAGE') ?
<Menu.Item key="fillionpatrolanomaly">
<Link to="/fillion/patrol_anomaly">异常反馈</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'REPORTMANAGE') ?
<Menu.Item key="fillionpatrolroad">
<Link to="/fillion/patrol_road">建设上报</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'BUILDINGPROJECT') ?
<Menu.Item key="fillionbuilding">
<Link to="/fillion/processsing">在建项目</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'PUBLICTRANSPORTMANAGE') ?
<Menu.Item key="fillionpublic">
<Link to="/fillion/public">公交管理</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'FILEMANAGE') ?
<Menu.Item key="fileCont">
<Link to="/fillion/file">档案管理</Link>
</Menu.Item> : ''}
{/* <Menu.Item key="fillionvideois">
{/* <Menu.Item key="fillionvideois">
<Link to="/fillion/videois">视频管理</Link>
</Menu.Item> */}
{/* <Menu.Item key="jiekouguanli">
{/* <Menu.Item key="jiekouguanli">
<Link to="/fillion/jiekouguanli">接口管理</Link>
</Menu.Item> */}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'PUBLICITYVIDEO') ?
<Menu.Item key="fillionpromotional">
<Link to="/fillion/promotional">宣传视频</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'ASSESSMANAGE') ?
<Menu.Item key="fillionassess">
<Link to="/fillion/assess">考核评分</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'VIDEOCENTER') ?
<Menu.Item key="fillionvideoCenter">
<Link to="/fillion/videoCenter">视频中心</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'MAINTENANCESPOTCHECK') ?
<Menu.Item key="maintenanceSpotCheck">
<Link to="/fillion/maintenanceSpotCheck">养护抽查</Link>
</Menu.Item> : ''}
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'ADJUSTLOG') ?
<Menu.Item key="adjustLog">
<Link to="/fillion/adjustLog">调整日志</Link>
</Menu.Item> : ''}
</SubMenu> : null
);
{user?.username == 'SuperAdmin' || user?.userResources?.some(i => i.resourceId === 'PUBLICITYVIDEO') ?
<Menu.Item key="fillionpromotional">
<Link to="/fillion/promotional">宣传视频</Link>
</Menu.Item> : ''}
</SubMenu> : null
);
}

Loading…
Cancel
Save