Commit 618c0851 authored by ninglx's avatar ninglx

wj-data-vision 适配快捷键keycode

parent 920e6ab1
...@@ -67,4 +67,4 @@ Object.keys(systemMap).forEach((item) => { ...@@ -67,4 +67,4 @@ Object.keys(systemMap).forEach((item) => {
app.listen(port || 3000); app.listen(port || 3000);
open(`http://localhost:${port || 3000}`); // open(`http://localhost:${port || 3000}`);
...@@ -5,23 +5,14 @@ const port = 9000 ...@@ -5,23 +5,14 @@ const port = 9000
const CompressionWebpackPlugin = require('compression-webpack-plugin') const CompressionWebpackPlugin = require('compression-webpack-plugin')
const productionGzipExtensions = ['js', 'css'] const productionGzipExtensions = ['js', 'css']
const proxy = { const proxy = {
// '/sso': { '/sso|/design': {
// target: 'http://10.102.1.182:9000', // target: 'http://10.102.1.181:9000',
// }, target: 'http://10.102.1.182:9000',
// '/design': { // target: 'http://10.102.1.182:9100',
// target: 'http://10.102.1.182:9000',
// },
'/sso': {
target: 'http://37.12.182.29:9000',
},
'/design': {
target: 'http://37.12.182.29:9000',
}, },
'/cdn': { '/cdn': {
target: 'http://127.0.0.1:3000', target: 'http://127.0.0.1:3000',
}, },
} }
module.exports = { module.exports = {
......
const path = require('path') const path = require('path')
// const pxtovw = require('postcss-px-to-viewport') const pxtovw = require('postcss-px-to-viewport')
const publicPath = '/wj-data-vision-new' const publicPath = '/wj-data-vision-new'
const port = 9300 const port = 9300
const CompressionWebpackPlugin = require('compression-webpack-plugin') const CompressionWebpackPlugin = require('compression-webpack-plugin')
...@@ -32,7 +32,7 @@ module.exports = { ...@@ -32,7 +32,7 @@ module.exports = {
publicPath, publicPath,
outputDir: 'dist', outputDir: 'dist',
assetsDir: 'static', assetsDir: 'static',
productionSourceMap: false, productionSourceMap: true,
devServer: { devServer: {
port, port,
overlay: { overlay: {
...@@ -43,24 +43,24 @@ module.exports = { ...@@ -43,24 +43,24 @@ module.exports = {
}, },
css: { css: {
loaderOptions: { loaderOptions: {
// postcss: { postcss: {
// //给postcss-loader传递选项 //给postcss-loader传递选项
// plugins: [ plugins: [
// new pxtovw({ new pxtovw({
// unitToConvert: 'px', //需要转换的单位,默认为"px"; unitToConvert: 'px', //需要转换的单位,默认为"px";
// viewportWidth: 1920, //设计稿的视口宽度 viewportWidth: 3840, //设计稿的视口宽度
// unitPrecision: 5, //单位转换后保留的小数位数 unitPrecision: 5, //单位转换后保留的小数位数
// propList: ['*'], //要进行转换的属性列表,*表示匹配所有,!表示不转换 propList: ['*'], //要进行转换的属性列表,*表示匹配所有,!表示不转换
// viewportUnit: 'vw', //转换后的视口单位 viewportUnit: 'vw', //转换后的视口单位
// fontViewportUnit: 'vw', //转换后字体使用的视口单位 fontViewportUnit: 'vw', //转换后字体使用的视口单位
// selectorBlackList: [], //不进行转换的css选择器,继续使用原有单位 selectorBlackList: [], //不进行转换的css选择器,继续使用原有单位
// minPixelValue: 1, //设置最小的转换数值 minPixelValue: 1, //设置最小的转换数值
// mediaQuery: false, //设置媒体查询里的单位是否需要转换单位 mediaQuery: false, //设置媒体查询里的单位是否需要转换单位
// replace: true, //是否直接更换属性值,而不添加备用属性 replace: true, //是否直接更换属性值,而不添加备用属性
// exclude: [/node_modules/], //忽略某些文件夹下的文件 exclude: [/node_modules/], //忽略某些文件夹下的文件
// }), }),
// ], ],
// }, },
}, },
}, },
configureWebpack: { configureWebpack: {
......
...@@ -6,7 +6,7 @@ const CompressionWebpackPlugin = require('compression-webpack-plugin') ...@@ -6,7 +6,7 @@ const CompressionWebpackPlugin = require('compression-webpack-plugin')
const productionGzipExtensions = ['js', 'css'] const productionGzipExtensions = ['js', 'css']
const proxy = { const proxy = {
'/sso': { '/sso': {
target: 'http://10.102.1.181:9000', target: 'http://10.102.1.182:9000',
}, },
'/holo': { '/holo': {
target: 'http://10.102.1.181:9000', target: 'http://10.102.1.181:9000',
...@@ -15,16 +15,16 @@ const proxy = { ...@@ -15,16 +15,16 @@ const proxy = {
target: 'http://10.102.1.181:9000', target: 'http://10.102.1.181:9000',
}, },
'/design': { '/design': {
target: 'http://10.102.1.181:9000', target: 'http://10.102.1.182:9000',
}, },
'/develop': { '/develop': {
target: 'http://10.102.1.181:9000', target: 'http://10.102.1.182:9000',
}, },
'/cdn': { '/cdn': {
target: 'http://127.0.0.1:3000', target: 'http://127.0.0.1:3000',
}, },
'/opt': { '/opt': {
target: 'http://10.102.1.181:9000', target: 'http://10.102.1.182:9000',
}, },
} }
......
...@@ -5,23 +5,12 @@ const port = 9400 ...@@ -5,23 +5,12 @@ const port = 9400
const CompressionWebpackPlugin = require('compression-webpack-plugin') const CompressionWebpackPlugin = require('compression-webpack-plugin')
const productionGzipExtensions = ['js', 'css'] const productionGzipExtensions = ['js', 'css']
const proxy = { const proxy = {
// '/sso': { '/sso|/design': {
// target: 'http://10.102.1.182:9000',
// },
// '/design': {
// target: 'http://10.102.1.182:9000',
// },
'/sso': {
target: 'http://10.102.1.182:9000', target: 'http://10.102.1.182:9000',
}, },
'/design': {
target: 'http://127.0.0.1:17010',
},
'/cdn': { '/cdn': {
target: 'http://127.0.0.1:3000', target: 'http://127.0.0.1:3000',
}, },
} }
module.exports = { module.exports = {
......
...@@ -10,53 +10,72 @@ Vue.use(Router); ...@@ -10,53 +10,72 @@ Vue.use(Router);
const originalPush = Router.prototype.push; const originalPush = Router.prototype.push;
const originalReplace = Router.prototype.replace; const originalReplace = Router.prototype.replace;
Router.prototype.push = function push(location, onResolve, onReject) { Router.prototype.push = function push(location, onResolve, onReject) {
if (onResolve || onReject) if (onResolve || onReject)
return originalPush.call(this, location, onResolve, onReject); return originalPush.call(this, location, onResolve, onReject);
return originalPush.call(this, location).catch((err) => err); return originalPush.call(this, location).catch((err) => err);
}; };
Router.prototype.replace = function push(location, onResolve, onReject) { Router.prototype.replace = function push(location, onResolve, onReject) {
if (onResolve || onReject) if (onResolve || onReject)
return originalReplace.call(this, location, onResolve, onReject); return originalReplace.call(this, location, onResolve, onReject);
return originalReplace.call(this, location).catch((err) => err); return originalReplace.call(this, location).catch((err) => err);
}; };
// 配置路由 // 配置路由
const router = new Router({ const router = new Router({
routes: [ routes: [
{ {
path: "*", path: "*",
name: "404", name: "404",
component: (resolve) => require(["@/views/404/index"], resolve), component: (resolve) => require(["@/views/404/index"], resolve),
}, },
...routes, ...routes,
], ],
}); });
// 路由白名单 // 路由白名单
const whiteList = ["/situation/cameraView", "/analysis/reportPreview"]; const whiteList = ["/situation/cameraView", "/analysis/reportPreview"];
function parseQueryString(url) {
var obj = {};
var keyvalue = [];
var key = "",
value = "";
var paraString = url.substring(url.indexOf("?") + 1, url.length).split("&");
for (var i in paraString) {
keyvalue = paraString[i].split("=");
key = keyvalue[0];
value = keyvalue[1];
obj[key] = value;
}
return obj;
}
// 全局路由守卫 // 全局路由守卫
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
if (whiteList.includes(to.path)) { if (whiteList.includes(to.path)) {
next();
return;
}
const parentId = map_config.SYS_ID;
AuthDao.queryMenu({
params: {
parentId,
isRecursion: true,
},
}).then((res) => {
let routes = res.data.content;
for (let route of routes) {
if (route.url === to.path) {
next(); next();
} return;
} }
}); let param = parseQueryString(to.fullPath)
// if (param.tokenId) {
// document.cookie = `tokenId=${param.tokenId}`
// }
const parentId = map_config.SYS_ID;
AuthDao.queryMenu({
params: {
parentId,
isRecursion: true,
},
}).then((res) => {
let routes = res.data.content;
for (let route of routes) {
if (route.url === to.path) {
next();
}
}
});
}); });
router.afterEach((to, from) =>{ router.afterEach((to, from) => {
store.commit("setPathActive", to.fullPath); store.commit("setPathActive", to.fullPath);
}) })
export default router; export default router;
...@@ -157,6 +157,10 @@ export default { ...@@ -157,6 +157,10 @@ export default {
label: { label: {
show: false, show: false,
}, },
// color: {
// image: require('../../../../assets/images/holo/event.png'),
// repeat: 'repeat'
// },
emphasis: { emphasis: {
focus: "series", focus: "series",
}, },
......
const path = require('path') const path = require('path')
const pxtovw = require('postcss-px-to-viewport') const pxtovw = require('postcss-px-to-viewport')
const publicPath = '/wj-manage-web' const publicPath = '/wj-manage-web'
const port = 9100
const CompressionWebpackPlugin = require('compression-webpack-plugin') const CompressionWebpackPlugin = require('compression-webpack-plugin')
const productionGzipExtensions = ['js', 'css'] const productionGzipExtensions = ['js', 'css']
const proxy = { const proxy = {
'/sso': { '/sso|/design|/develop|/group1|/holo|/web|/opt': {
target: 'http://10.102.1.182:9000',
},
'/holo': {
target: 'http://10.100.1.33:17020',
},
'/web': {
target: 'http://10.102.1.182:9100',
},
'/design': {
target: 'http://10.102.1.182:9000',
},
'/develop': {
target: 'http://10.102.1.182:9000',
},
'/opt': {
target: 'http://10.102.1.182:9000', target: 'http://10.102.1.182:9000',
// target: 'http://10.102.1.181:9000',
}, },
'/nvr': { '/nvr': {
target: 'http://10.102.1.182:9000', target: 'http://10.100.1.154:19830', // 回放视频
},
'/group1': {
target: 'http://10.102.1.182:9000',
}, },
// '/sso': {
// target: 'http://37.12.182.29:9000',
// },
// '/utc': {
// target: 'http://37.12.182.29:32000',
// },
// '/holo': {
// target: 'http://37.12.182.29:9000',
// // target: 'http://10.10.20.115:16020',
// },
// '/web': {
// target: 'http://37.12.182.29:9100',
// },
// '/design': {
// target: 'http://37.12.182.29:9000',
// },
// '/develop': {
// target: 'http://37.12.182.29:9000',
// },
// '/opt': {
// target: 'http://37.12.182.29:9000',
// },
// '/nvr': {
// target: 'http://37.12.182.29:9000',
// },
// '/group1': {
// target: 'http://37.12.182.29:9000',
// },
'/cdn': { '/cdn': {
target: 'http://127.0.0.1:3000', target: 'http://127.0.0.1:3000',
}, },
...@@ -71,7 +22,7 @@ module.exports = { ...@@ -71,7 +22,7 @@ module.exports = {
assetsDir: 'static', assetsDir: 'static',
productionSourceMap: false, productionSourceMap: false,
devServer: { devServer: {
port, port:9100,
overlay: { overlay: {
warnings: false, warnings: false,
errors: true, errors: true,
...@@ -112,9 +63,9 @@ module.exports = { ...@@ -112,9 +63,9 @@ module.exports = {
plugins: [ plugins: [
new CompressionWebpackPlugin({ new CompressionWebpackPlugin({
algorithm: 'gzip', algorithm: 'gzip',
test: new RegExp('\\.(' + productionGzipExtensions.join('|') + ')$'), test: /\.js$|\.css$/, // 匹配文件名
threshold: 10240, threshold: 10240,
minRatio: 0.8, minRatio: 1, // 压缩率小于1才会压缩
}), }),
], ],
}, },
......
...@@ -105,6 +105,11 @@ ...@@ -105,6 +105,11 @@
display: none !important; display: none !important;
} }
.mapboxgl-ctrl-group {
background: transparent !important;
border-radius: 6px !important;
}
.mapboxgl-popup-close-button { .mapboxgl-popup-close-button {
font-size: 26px; font-size: 26px;
color: white; color: white;
...@@ -134,6 +139,7 @@ ...@@ -134,6 +139,7 @@
src="/cdn/libs/threebox/threebox.js" src="/cdn/libs/threebox/threebox.js"
type="text/javascript" type="text/javascript"
></script> ></script>
<script src="/cdn/libs/heatmap/heatmap.min.js"></script>
<script src="/cdn/libs/turf/turf.min.js" type="text/javascript"></script> <script src="/cdn/libs/turf/turf.min.js" type="text/javascript"></script>
<script src="/cdn/libs/cesium/Cesium.js" type="text/javascript"></script> <script src="/cdn/libs/cesium/Cesium.js" type="text/javascript"></script>
<script <script
......
...@@ -75,6 +75,7 @@ export default { ...@@ -75,6 +75,7 @@ export default {
top: 80px; top: 80px;
left: 0; left: 0;
height: calc(100% - 80px); height: calc(100% - 80px);
padding: 8px; color: white; padding: 8px;
color: white;
} }
</style> </style>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="81" height="81" viewBox="0 0 81 81" fill="none"><g opacity="1" transform="translate(0.0000021487912817974575 1.347352736047469e-7) rotate(0 40.5 40.5)"><g opacity="1" transform="translate(23.323308270675625 7.508055853920496) rotate(0 16.53061224489795 33.64124597207304)"><path id="路径 9" fill-rule="evenodd" style="fill:#666666" transform="translate(0 0) rotate(0 16.53061224489795 33.64124597207304)" opacity="1" d="M33.06,16.82L27.84,0L27.84,11.6L16.82,22.04L5.22,11.6L5.22,0L0,16.82L5.22,34.8L5.22,24.36L14.5,33.64L14.5,67.28L18.56,67.28L18.56,33.64L27.84,24.36L27.84,34.8L33.06,16.82Z " /></g></g></svg> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="81" height="81" viewBox="0 0 81 81" fill="none"><g opacity="1" transform="translate(-0.000009456261977902614 1.347352736047469e-7) rotate(0 40.5 40.5)"><g opacity="1" transform="translate(29.12996777658327 6.212674543501862) rotate(0 10.730397422126739 33.64124597207302)"><path id="路径 8" fill-rule="evenodd" style="fill:#666666" transform="translate(0 0) rotate(0 10.730397422126739 33.64124597207302)" opacity="1" d="M11.02,25.88L14.5,25.88L14.5,35.96L6.66,35.96C5.82,35.96 5.01,36.29 4.41,36.89C3.81,37.49 3.48,38.3 3.48,39.14L3.48,51.04L0,51.04L5.22,66.12L9.86,51.04L6.38,51.04L6.38,41.89C6.38,40.84 7.24,39.99 8.29,39.99L14.5,39.99L14.5,67.28L17.98,67.28L17.98,25.88L21.46,25.88L16.24,0L11.02,25.88Z " /></g></g></svg>
\ No newline at end of file \ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="81" height="81" viewBox="0 0 81 81" fill="none"><g opacity="1" transform="translate(0 1.347352736047469e-7) rotate(0 40.5 40.5)"><g opacity="1" transform="translate(31.508055853920723 6.792696025778923) rotate(0 8.990332975295381 33.0612244897959)"><path id="路径 7" fill-rule="evenodd" style="fill:#666666" transform="translate(0 0) rotate(0 8.99033297529538 33.0612244897959)" opacity="1" d="M5.22,50.05L1.74,50.05L6.96,64.93L11.6,50.05L8.7,50.05L8.7,44.07C8.7,43.01 9.23,42.02 10.11,41.43C10.98,40.84 12.1,40.73 13.08,41.13L14.5,41.71L14.5,66.12L17.98,66.12L17.98,21.47L5.22,11.34L5.22,0L0,17.89L5.22,33.37L5.22,23.25L14.5,30.99L14.5,36.95L8.4,36.95C6.65,36.95 5.22,38.37 5.22,40.12L5.22,50.05Z " /></g></g></svg> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="81" height="81" viewBox="0 0 81 81" fill="none"><g opacity="1" transform="translate(0.000011605054623942124 1.347352736047469e-7) rotate(0 40.5 40.5)"><g opacity="1" transform="translate(23.10418904403832 6.283566058002407) rotate(0 17.40064446831364 34.22126745435016)"><path id="路径 11" fill-rule="evenodd" style="fill:#666666" transform="translate(0 0) rotate(0 17.40064446831364 34.22126745435016)" opacity="1" d="M19.14,59.74L29,51.04L29,61.48L34.8,45.82L29,30.16L29,40.6L19.14,48.72L19.14,30.74L22.62,30.74L16.82,0L11.6,30.74L15.08,30.74L15.08,48.72L5.22,40.6L5.22,30.16L0,45.82L5.22,61.48L5.22,51.04L15.08,59.74L15.08,68.44L19.14,68.44L19.14,59.74Z " /></g></g></svg>
\ No newline at end of file \ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="81" height="81" viewBox="0 0 81 81" fill="none"><g opacity="1" transform="translate(0.000011605054623942124 1.347352736047469e-7) rotate(0 40.5 40.5)"><g opacity="1" transform="translate(23.10418904403832 6.283566058002407) rotate(0 17.40064446831364 34.22126745435016)"><path id="路径 11" fill-rule="evenodd" style="fill:#666666" transform="translate(0 0) rotate(0 17.40064446831364 34.22126745435016)" opacity="1" d="M19.14,59.74L29,51.04L29,61.48L34.8,45.82L29,30.16L29,40.6L19.14,48.72L19.14,30.74L22.62,30.74L16.82,0L11.6,30.74L15.08,30.74L15.08,48.72L5.22,40.6L5.22,30.16L0,45.82L5.22,61.48L5.22,51.04L15.08,59.74L15.08,68.44L19.14,68.44L19.14,59.74Z " /></g></g></svg> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="81" height="81" viewBox="0 0 81 81" fill="none"><g opacity="1" transform="translate(0 1.347352736047469e-7) rotate(0 40.5 40.5)"><g opacity="1" transform="translate(31.508055853920723 6.792696025778923) rotate(0 8.990332975295381 33.0612244897959)"><path id="路径 7" fill-rule="evenodd" style="fill:#666666" transform="translate(0 0) rotate(0 8.99033297529538 33.0612244897959)" opacity="1" d="M5.22,50.05L1.74,50.05L6.96,64.93L11.6,50.05L8.7,50.05L8.7,44.07C8.7,43.01 9.23,42.02 10.11,41.43C10.98,40.84 12.1,40.73 13.08,41.13L14.5,41.71L14.5,66.12L17.98,66.12L17.98,21.47L5.22,11.34L5.22,0L0,17.89L5.22,33.37L5.22,23.25L14.5,30.99L14.5,36.95L8.4,36.95C6.65,36.95 5.22,38.37 5.22,40.12L5.22,50.05Z " /></g></g></svg>
\ No newline at end of file \ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="35" height="81" viewBox="0 0 35 81" fill="none"><g opacity="1" transform="translate(0 1.347352736047469e-7) rotate(0 17.5 40.5)"><g opacity="1" transform="translate(0 0) rotate(0 17.5 40.5)"><rect id="矩形 1" style="stroke:#000000; stroke-width:0.88211604096; stroke-opacity:0.15; stroke-dasharray:0 0" transform="translate(0 0) rotate(0 17.5 40.5)" x="0.44105802048" y="0.44105802048" rx="3.36894197952" width="34.11788395904" height="80.11788395904" /><path id="路径 9" fill-rule="evenodd" style="fill:#FFFFFF" transform="translate(0.9693877551020478 6.858754027927034) rotate(0 16.53061224489795 33.64124597207304)" opacity="1" d="M33.06,16.82L27.84,0L27.84,11.6L16.82,22.04L5.22,11.6L5.22,0L0,16.82L5.22,34.8L5.22,24.36L14.5,33.64L14.5,67.28L18.56,67.28L18.56,33.64L27.84,24.36L27.84,34.8L33.06,16.82Z " /></g></g></svg> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="35" height="81" viewBox="0 0 35 81" fill="none"><g opacity="1" transform="translate(0 0) rotate(0 17.5 40.5)"><g opacity="1" transform="translate(0 0) rotate(0 17.5 40.5)"><rect id="矩形 1" style="stroke:#000000; stroke-width:0.88211604096; stroke-opacity:0.15; stroke-dasharray:0 0" transform="translate(0 0) rotate(0 17.5 40.5)" x="0.44105802048" y="0.44105802048" rx="3.36894197952" width="34.11788395904" height="80.11788395904" /><path id="路径 8" fill-rule="evenodd" style="fill:#FFFFFF" transform="translate(6.769602577873258 6.858754027927034) rotate(0 10.730397422126739 33.64124597207302)" opacity="1" d="M14.5,67.28L17.98,67.28L17.98,25.88L21.46,25.88L16.24,0L11.02,25.88L14.5,25.88L14.5,35.96L6.66,35.96C5.82,35.96 5.01,36.29 4.41,36.89C3.81,37.49 3.48,38.3 3.48,39.14L3.48,51.04L0,51.04L5.22,66.12L9.86,51.04L6.38,51.04L6.38,41.89C6.38,40.84 7.24,39.99 8.29,39.99L14.5,39.99L14.5,67.28Z " /></g></g></svg>
\ No newline at end of file \ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="35" height="81" viewBox="0 0 35 81" fill="none"><g opacity="1" transform="translate(0 0) rotate(0 17.5 40.5)"><g opacity="1" transform="translate(0 0) rotate(0 17.5 40.5)"><rect id="矩形 1" style="stroke:#000000; stroke-width:0.88211604096; stroke-opacity:0.15; stroke-dasharray:0 0" transform="translate(0 0) rotate(0 17.5 40.5)" x="0.44105802048" y="0.44105802048" rx="3.36894197952" width="34.11788395904" height="80.11788395904" /><path id="路径 7" fill-rule="evenodd" style="fill:#FFFFFF" transform="translate(8.509667024704612 7.4387755102040956) rotate(0 8.99033297529538 33.0612244897959)" opacity="1" d="M5.22,33.37L5.22,23.25L14.5,30.99L14.5,36.95L8.4,36.95C6.65,36.95 5.22,38.37 5.22,40.12L5.22,50.05L1.74,50.05L6.96,64.93L11.6,50.05L8.7,50.05L8.7,44.07C8.7,43.01 9.23,42.02 10.11,41.43C10.98,40.84 12.1,40.73 13.08,41.13L14.5,41.71L14.5,66.12L17.98,66.12L17.98,21.47L5.22,11.34L5.22,0L0,17.89L5.22,33.37Z " /></g></g></svg> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="35" height="81" viewBox="0 0 35 81" fill="none"><g opacity="1" transform="translate(0 1.347352736047469e-7) rotate(0 17.499999999999996 40.5)"><g opacity="1" transform="translate(0 0) rotate(0 17.499999999999996 40.5)"><rect id="矩形 1" style="stroke:#000000; stroke-width:0.88211604096; stroke-opacity:0.15; stroke-dasharray:0 0" transform="translate(0 0) rotate(0 17.499999999999996 40.5)" x="0.44105802048" y="0.44105802048" rx="3.36894197952" width="34.11788395903999" height="80.11788395904" /><path id="路径 11" fill-rule="evenodd" style="fill:#FFFFFF" transform="translate(0.02500753385857024 6.283566058002407) rotate(0 17.40064446831364 34.22126745435016)" opacity="1" d="M29,30.16L29,40.6L19.14,48.72L19.14,30.74L22.62,30.74L16.82,0L11.6,30.74L15.08,30.74L15.08,48.72L5.22,40.6L5.22,30.16L0,45.82L5.22,61.48L5.22,51.04L15.08,59.74L15.08,68.44L19.14,68.44L19.14,59.74L29,51.04L29,61.48L34.8,45.82L29,30.16Z " /></g></g></svg>
\ No newline at end of file \ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="35" height="81" viewBox="0 0 35 81" fill="none"><g opacity="1" transform="translate(0 1.347352736047469e-7) rotate(0 17.499999999999996 40.5)"><g opacity="1" transform="translate(0 0) rotate(0 17.499999999999996 40.5)"><rect id="矩形 1" style="stroke:#000000; stroke-width:0.88211604096; stroke-opacity:0.15; stroke-dasharray:0 0" transform="translate(0 0) rotate(0 17.499999999999996 40.5)" x="0.44105802048" y="0.44105802048" rx="3.36894197952" width="34.11788395903999" height="80.11788395904" /><path id="路径 11" fill-rule="evenodd" style="fill:#FFFFFF" transform="translate(0.02500753385857024 6.283566058002407) rotate(0 17.40064446831364 34.22126745435016)" opacity="1" d="M29,30.16L29,40.6L19.14,48.72L19.14,30.74L22.62,30.74L16.82,0L11.6,30.74L15.08,30.74L15.08,48.72L5.22,40.6L5.22,30.16L0,45.82L5.22,61.48L5.22,51.04L15.08,59.74L15.08,68.44L19.14,68.44L19.14,59.74L29,51.04L29,61.48L34.8,45.82L29,30.16Z " /></g></g></svg> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="35" height="81" viewBox="0 0 35 81" fill="none"><g opacity="1" transform="translate(0 0) rotate(0 17.5 40.5)"><g opacity="1" transform="translate(0 0) rotate(0 17.5 40.5)"><rect id="矩形 1" style="stroke:#000000; stroke-width:0.88211604096; stroke-opacity:0.15; stroke-dasharray:0 0" transform="translate(0 0) rotate(0 17.5 40.5)" x="0.44105802048" y="0.44105802048" rx="3.36894197952" width="34.11788395904" height="80.11788395904" /><path id="路径 7" fill-rule="evenodd" style="fill:#FFFFFF" transform="translate(8.509667024704612 7.4387755102040956) rotate(0 8.99033297529538 33.0612244897959)" opacity="1" d="M5.22,33.37L5.22,23.25L14.5,30.99L14.5,36.95L8.4,36.95C6.65,36.95 5.22,38.37 5.22,40.12L5.22,50.05L1.74,50.05L6.96,64.93L11.6,50.05L8.7,50.05L8.7,44.07C8.7,43.01 9.23,42.02 10.11,41.43C10.98,40.84 12.1,40.73 13.08,41.13L14.5,41.71L14.5,66.12L17.98,66.12L17.98,21.47L5.22,11.34L5.22,0L0,17.89L5.22,33.37Z " /></g></g></svg>
\ No newline at end of file \ No newline at end of file
...@@ -11,6 +11,9 @@ ...@@ -11,6 +11,9 @@
.building-top .el-table th.is-leaf { .building-top .el-table th.is-leaf {
border-bottom: none; border-bottom: none;
} }
::v-deep .el-table .cell{
line-height: 33px;
}
::v-deep .custom-table-header-cell { ::v-deep .custom-table-header-cell {
background-color: #012b53 !important; background-color: #012b53 !important;
...@@ -19,8 +22,8 @@ ...@@ -19,8 +22,8 @@
::v-deep .cell { ::v-deep .cell {
padding: 2px 2px; padding: 2px 2px;
line-height: unset; //line-height: 3;
height: 34px; height: 50px;
text-align: center; text-align: center;
font-size: 16px; font-size: 16px;
font-weight: 400; font-weight: 400;
......
...@@ -205,6 +205,14 @@ export function mainlineSchemeAnalysis(data) { ...@@ -205,6 +205,14 @@ export function mainlineSchemeAnalysis(data) {
data: data data: data
}) })
} }
// 干线运行分析溢出畅通拥堵占比饼图
export function mainlineRunAnalyse(data){
return axios({
url: optBaseUrl+"/mainlineEvaluate/mainlineRunningAnalyse",
method: 'post',
data: data
})
}
//干线列表 //干线列表
export function mainlineList(data) { export function mainlineList(data) {
return axios({ return axios({
......
// import axios from 'axios'; import axios from 'axios';
/** /**
* @desc 函数防抖 * @desc 函数防抖
* @param func 函数 * @param func 函数
...@@ -85,6 +85,17 @@ function createGuid() { ...@@ -85,6 +85,17 @@ function createGuid() {
}); });
} }
/**
*UUID
*/
export function createGuid8() {
return 'xxxxxxxx'.replace(/[xy]/g, function (c) {
var r = (Math.random() * 16) | 0;
var v = c === 'x' ? r : (r & 0x3) | 0x8;
return v.toString(17);
});
}
/** /**
* *
* @returns 获取当前时间年+月+日+时+分+秒 * @returns 获取当前时间年+月+日+时+分+秒
...@@ -146,24 +157,57 @@ export function supWholeDataTime(n = 1) { ...@@ -146,24 +157,57 @@ export function supWholeDataTime(n = 1) {
return dateTime; return dateTime;
} }
export function formatTime(date) {
const currentDate = date;
const currentHour = currentDate.getHours();
const currentMinute = currentDate.getMinutes();
const currentSecond = currentDate.getSeconds();
const formattedTime = `${currentHour}:${currentMinute}:${currentSecond}`;
return formattedTime;
}
export function formatDate(date) {
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, "0");
const day = String(date.getDate()).padStart(2, "0");
return `${year}-${month}-${day}`;
}
export function formatDateTime(currentDate) {
// 获取年、月、日、小时、分钟和秒
const year = currentDate.getFullYear();
const month = String(currentDate.getMonth() + 1).padStart(2, "0"); // 月份从0开始,需要加1
const day = String(currentDate.getDate()).padStart(2, "0");
const hours = String(currentDate.getHours()).padStart(2, "0");
const minutes = String(currentDate.getMinutes()).padStart(2, "0");
const seconds = String(currentDate.getSeconds()).padStart(2, "0");
// 格式化为 "YYYY-MM-DD HH:mm:ss" 的字符串
const formattedDateTime = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
return formattedDateTime;
}
/** /**
* ping链接 * ping链接
* @param {String} ip * @param {String} ip
* @param {Function} cb * @param {Function} cb
*/ */
// function ping(ip, cb) { function ping(ip, cb) {
// axios({ axios({
// method: 'post', method: 'post',
// url: `${ip}/cache/service/connectivity`, url: `${ip}/cache/service/connectivity`,
// timeout: 1000, timeout: 1000,
// }) })
// .then(res => { .then(res => {
// cb(true); cb(true);
// }) })
// .catch(error => { .catch(error => {
// cb(false); cb(false);
// }); });
// } }
/** /**
* echarts字体自适应 * echarts字体自适应
* @param {*} font 字号大小 * @param {*} font 字号大小
...@@ -178,6 +222,22 @@ export function fontPxToRem(font) { ...@@ -178,6 +222,22 @@ export function fontPxToRem(font) {
let fontSize = clientWidth / 1920; let fontSize = clientWidth / 1920;
return font * fontSize; return font * fontSize;
} }
/**
* echarts字体自适应
* @param {*} font 字号大小
*/
export function getFontSize(font) {
let clientWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth
if (!clientWidth) return
let fontSize = clientWidth / 1920
return font * fontSize
}
export function getFontSizeHeight(font) {
let clientHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
if (!clientHeight) return
let fontSize = clientHeight / 937
return font * fontSize
}
// 对象深拷贝 // 对象深拷贝
export function deepClone(data) { export function deepClone(data) {
let type = getObjectType(data) let type = getObjectType(data)
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
class="loopVideo" class="loopVideo"
v-loading="videoLoading" v-loading="videoLoading"
element-loading-text="加载中..." element-loading-text="加载中..."
v-show="videoUrl"
element-loading-spinner="el-icon-loading" element-loading-spinner="el-icon-loading"
element-loading-background="rgba(0, 0, 0, 0.8)" element-loading-background="rgba(0, 0, 0, 0.8)"
> >
......
...@@ -25,9 +25,7 @@ export default { ...@@ -25,9 +25,7 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.long {
background-image: url("../../assets/images/holo/bottomCartHead.png");
}
.text { .text {
padding: 4px 0 4px 30px; padding: 4px 0 4px 30px;
position: relative; position: relative;
...@@ -53,9 +51,12 @@ export default { ...@@ -53,9 +51,12 @@ export default {
background-image: url("../../assets/images/holo/msgCardHead.png"); background-image: url("../../assets/images/holo/msgCardHead.png");
background-size: 100% 100%; background-size: 100% 100%;
} }
.long {
background-image: url("../../assets/images/holo/msgCardHeadLong.png");
}
.msg-card-content { .msg-card-content {
overflow-y: hidden; overflow: hidden;
padding: 10px 10px 0 10px; padding: 10px 0 0 0;
background-size: 100% 100%; background-size: 100% 100%;
height: calc(100% - 45px); height: calc(100% - 45px);
} }
......
...@@ -53,7 +53,7 @@ export default { ...@@ -53,7 +53,7 @@ export default {
text-align: left; text-align: left;
} }
.long{ .long{
background-image: url('../../assets/images/holo/bottomCartHead.png'); background-image: url('../../assets/images/holo/msgCardHeadLong.png');
} }
.content { .content {
overflow-y: hidden; overflow-y: hidden;
......
...@@ -41,7 +41,7 @@ export default { ...@@ -41,7 +41,7 @@ export default {
}; };
</script> </script>
<style lang="scss"> <style lang="less">
.img-dialog { .img-dialog {
position: absolute; position: absolute;
.el-dialog__header { .el-dialog__header {
......
...@@ -9,7 +9,7 @@ export default [ ...@@ -9,7 +9,7 @@ export default [
component: (resolve) => require(["@/views/signal/index.vue"], resolve), component: (resolve) => require(["@/views/signal/index.vue"], resolve),
}, },
{ {
path: "/more", path: "/signalEvaluation",
component: (resolve) => require(["@/views/more/index.vue"], resolve), component: (resolve) => require(["@/views/signalEvaluation/index.vue"], resolve),
}, },
]; ];
...@@ -11,6 +11,47 @@ Vue.directive("scroll", { ...@@ -11,6 +11,47 @@ Vue.directive("scroll", {
}; };
} }
}); });
Vue.directive('dragable',(el)=> {
let oDiv = el; //当前元素
let self = this; //上下文
//禁止选择网页上的文字
document.onselectstart = function () {
return false;
};
oDiv.onmousedown = function (e) {
//鼠标按下,计算当前元素距离可视区的距离
let disX = e.clientX - oDiv.offsetLeft;
let disY = e.clientY - oDiv.offsetTop;
document.onmousemove = function (e) {
//通过事件委托,计算移动的距离
let l = e.clientX - disX;
let t = e.clientY - disY;
// 获取html可视区域高度
const width = document.querySelector(".area").clientWidth;
const height = document.querySelector(".area").clientHeight;
if (l >= width - 100) {
l = width - 100;
} else if (l <= 0) {
l = 0;
}
if (t >= height - 100) {
t = height - 100;
} else if (t <= 0) {
t = 0;
}
//移动当前元素
oDiv.style.left = l + "px";
oDiv.style.top = t + "px";
};
document.onmouseup = function (e) {
document.onmousemove = null;
document.onmouseup = null;
};
//return false不加的话可能导致黏连,就是拖到一个地方时div粘在鼠标上不下来,相当于onmouseup失效
return false;
};
})
Vue.directive('resize', { Vue.directive('resize', {
bind(el) { bind(el) {
let scale = 1; let scale = 1;
......
...@@ -10,6 +10,7 @@ import './components' ...@@ -10,6 +10,7 @@ import './components'
import '@/assets/less/component.less' import '@/assets/less/component.less'
// import '@/assets/font/font.css' // import '@/assets/font/font.css'
import './assets/icon/iconfont.css' import './assets/icon/iconfont.css'
import './assets/css/layout.css';
// vdr拖动缩放组件 // vdr拖动缩放组件
import VueDraggableResizable from 'vue-draggable-resizable' import VueDraggableResizable from 'vue-draggable-resizable'
import 'vue-draggable-resizable/dist/VueDraggableResizable.css' import 'vue-draggable-resizable/dist/VueDraggableResizable.css'
......
...@@ -203,6 +203,8 @@ export function sAddOrUpdateCrossStatus(map, geo){ ...@@ -203,6 +203,8 @@ export function sAddOrUpdateCrossStatus(map, geo){
type: "symbol", type: "symbol",
source: "crossStatus", source: "crossStatus",
layout: { layout: {
"icon-allow-overlap": true,
"icon-ignore-placement": true,
"icon-image":["concat", "crossStatus", ["get", "realtimeStatus"]], "icon-image":["concat", "crossStatus", ["get", "realtimeStatus"]],
"icon-size": 0.7, "icon-size": 0.7,
"icon-offset": [0, -10], "icon-offset": [0, -10],
...@@ -658,16 +660,16 @@ export function addOrUpdateEquipCamera(map, geo, callback) { ...@@ -658,16 +660,16 @@ export function addOrUpdateEquipCamera(map, geo, callback) {
type: "symbol", type: "symbol",
source: "camera", source: "camera",
layout: { layout: {
"icon-image": [ // "icon-image": [
"match", // "match",
["get", "status"], // 属性字段名称 // ["get", "status"], // 属性字段名称
'0', // '0',
"cameraFalse", // "cameraFalse",
'1', // '1',
'camera', // 'camera',
"cameraFalse", // "cameraFalse",
], // 默认值,如果没有匹配到上述枚举值] // ], // 默认值,如果没有匹配到上述枚举值]
// "icon-image": "camera", "icon-image": "camera",
"icon-size": 0.6, "icon-size": 0.6,
"icon-ignore-placement": true, "icon-ignore-placement": true,
// 'icon-offset': [0, -10] // 'icon-offset': [0, -10]
......
export function px2vw(px) {
let width = 1920
return px * (100 / width)
}
/** /**
* 通用js方法封装处理 * 通用js方法封装处理
......
<template>
<div>
1111
</div>
</template>
<script>
export default {
}
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
...@@ -6,11 +6,11 @@ ...@@ -6,11 +6,11 @@
v-for="item in crossData" v-for="item in crossData"
:key="item.id" :key="item.id"
> >
<p class="name" :title="item.crossName"> <p :class="{active:active===item.crossName}" style="cursor: pointer" @click="crossClick(item.crossName)" class="name" :title="item.crossName">
{{ item.crossName }} {{ item.crossName }}
</p> </p>
<div class="item-box"> <div class="item-box">
<i class="title-icon"></i> <i style="cursor: pointer" @click="crossClick(item.crossName)" class="title-icon"></i>
<div class="distance-line" v-if="item.distanceToNextCross"> <div class="distance-line" v-if="item.distanceToNextCross">
<span>{{ item.distanceToNextCross }}</span> <span>{{ item.distanceToNextCross }}</span>
<span class="distance-icon el-icon-caret-right"></span> <span class="distance-icon el-icon-caret-right"></span>
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
export default { export default {
data() { data() {
return { return {
active:'',
crossData: [ crossData: [
{ {
name: "相城大道与朱径支路交叉口", name: "相城大道与朱径支路交叉口",
...@@ -39,10 +40,24 @@ export default { ...@@ -39,10 +40,24 @@ export default {
], ],
}; };
}, },
props: ["contentData", "type"], props: ["contentData", "type", 'canClick'],
mounted() { mounted() {
this.crossData = this.contentData.greenwaveCrossList; this.crossData = this.contentData.greenwaveCrossList;
setTimeout(()=>{
if(this.canClick){
this.crossClick(this.crossData[0].crossName)
}
},0)
}, },
methods:{
crossClick(crossName){
console.log('in zujian',crossName)
this.$emit('crossClick',crossName)
if(this.canClick){
this.active = crossName
}
}
}
}; };
</script> </script>
...@@ -50,7 +65,9 @@ export default { ...@@ -50,7 +65,9 @@ export default {
.cross-distance { .cross-distance {
display: flex; display: flex;
color: #c1c6ce; color: #c1c6ce;
.active{
background: radial-gradient(#025186, rgba(2, 81, 134,0.8),transparent,transparent);
}
.cross-item { .cross-item {
position: relative; position: relative;
flex: 1; flex: 1;
...@@ -84,6 +101,7 @@ export default { ...@@ -84,6 +101,7 @@ export default {
align-items: center; align-items: center;
margin: 0 16px; margin: 0 16px;
margin-top: 30px; margin-top: 30px;
} }
justify-content: space-between; justify-content: space-between;
......
...@@ -269,7 +269,7 @@ export default { ...@@ -269,7 +269,7 @@ export default {
transition: 0.5s all ease !important; transition: 0.5s all ease !important;
.mapboxgl-ctrl-group { .mapboxgl-ctrl-group {
background-color: transparent !important; background: transparent !important;
border-radius: 6px !important; border-radius: 6px !important;
} }
} }
......
...@@ -306,9 +306,10 @@ export default { ...@@ -306,9 +306,10 @@ export default {
} }
} }
.i_indexVal{ .i_indexVal{
font-weight: bold; font-weight: normal;
font-size: 18px; font-size: 22px;
margin-right: 10px; margin-right: 10px;
font-family: YouSheBiaoTiHei,serif;
} }
.i_arrow{ .i_arrow{
font-weight: bold; font-weight: bold;
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<div class="alarm-title-box"> <div class="alarm-title-box">
<div class="alarm-title"> <div class="alarm-title">
<img src="../../../../assets/images/homepage/second-title-icon.svg" alt="" /> <img src="../../../../assets/images/homepage/second-title-icon.svg" alt=""/>
路口列表{{ kipActive.name ? " - " : "" }}{{ kipActive.name }} 路口列表{{ kipActive.name ? " - " : "" }}{{ kipActive.name }}
</div> </div>
<!-- <!--
...@@ -60,19 +60,20 @@ ...@@ -60,19 +60,20 @@
<el-table <el-table
@row-click="rowClick" @row-click="rowClick"
:data="listDataCopy" :data="listDataCopy"
style="width: 100%"> :row-class-name="getRowClassName"
style="width: 100%"
height="100%">
<el-table-column <el-table-column
width="50"
align="center" align="center"
prop="index" prop="index"
label="排名" label="排名">
show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="name" prop="name"
label="路口名称" label="路口名称"
width="100" width="130">
show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="congestionIndex" prop="congestionIndex"
...@@ -83,69 +84,70 @@ ...@@ -83,69 +84,70 @@
<el-table-column <el-table-column
align="center" align="center"
label="同比" label="同比"
show-overflow-tooltip> width="70">
<template slot-scope="scope"> <template slot-scope="scope">
{{Math.abs(scope.row.lastPeriodIndex)}}% <img :src="getDownUpImg(scope.row.lastPeriodIndex)" alt=""/> {{ Math.abs(scope.row.lastPeriodIndex) }}% <img :src="getDownUpImg(scope.row.lastPeriodIndex)" alt=""/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="环比" label="环比"
width="70"
align="center" align="center"
show-overflow-tooltip> >
<template slot-scope="scope"> <template slot-scope="scope">
{{Math.abs(scope.row.lastWeekIndex)}}% <img :src="getDownUpImg(scope.row.lastWeekIndex)" alt=""/> {{ Math.abs(scope.row.lastWeekIndex) }}% <img :src="getDownUpImg(scope.row.lastWeekIndex)" alt=""/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- <div--> <!-- <div-->
<!-- class="alarm-list"--> <!-- class="alarm-list"-->
<!-- v-for="(item, index) in listData"--> <!-- v-for="(item, index) in listData"-->
<!-- :key="index"--> <!-- :key="index"-->
<!-- @click="listClick(item)"--> <!-- @click="listClick(item)"-->
<!-- >--> <!-- >-->
<!-- <div class="list-item">--> <!-- <div class="list-item">-->
<!-- <div class="title">--> <!-- <div class="title">-->
<!-- <img--> <!-- <img-->
<!-- src="../../../../assets/images/homepage/localtion-icon.svg"--> <!-- src="../../../../assets/images/homepage/localtion-icon.svg"-->
<!-- alt--> <!-- alt-->
<!-- @click="flyTo(item, true)"--> <!-- @click="flyTo(item, true)"-->
<!-- />--> <!-- />-->
<!-- <span class="title-txt" :title="item.name">{{ item.name }}</span>--> <!-- <span class="title-txt" :title="item.name">{{ item.name }}</span>-->
<!-- &lt;!&ndash; <el-button @click.stop="opDialogClick(item)">优化</el-button> &ndash;&gt;--> <!-- &lt;!&ndash; <el-button @click.stop="opDialogClick(item)">优化</el-button> &ndash;&gt;-->
<!-- </div>--> <!-- </div>-->
<!-- <div class="content" v-if="item.realtimeStatus">--> <!-- <div class="content" v-if="item.realtimeStatus">-->
<!-- <template v-if="item.isCongestion">--> <!-- <template v-if="item.isCongestion">-->
<!-- <span>拥堵方向:</span>--> <!-- <span>拥堵方向:</span>-->
<!-- <span class="value" :title="item.congestionDirs">{{--> <!-- <span class="value" :title="item.congestionDirs">{{-->
<!-- dirObj[item.congestionDirs]--> <!-- dirObj[item.congestionDirs]-->
<!-- }}</span>--> <!-- }}</span>-->
<!-- </template>--> <!-- </template>-->
<!-- <template v-else-if="item.isSpillover">--> <!-- <template v-else-if="item.isSpillover">-->
<!-- <span>溢出方向:</span>--> <!-- <span>溢出方向:</span>-->
<!-- <span class="value" :title="item.spilloverDirs">{{--> <!-- <span class="value" :title="item.spilloverDirs">{{-->
<!-- dirObj[item.spilloverDirs]--> <!-- dirObj[item.spilloverDirs]-->
<!-- }}</span>--> <!-- }}</span>-->
<!-- </template>--> <!-- </template>-->
<!-- <template v-else-if="item.isUnbalance">--> <!-- <template v-else-if="item.isUnbalance">-->
<!-- <span>失衡方向:</span>--> <!-- <span>失衡方向:</span>-->
<!-- <span class="value" :title="item.unbalanceDirs">{{--> <!-- <span class="value" :title="item.unbalanceDirs">{{-->
<!-- dirObj[item.unbalanceDirs]--> <!-- dirObj[item.unbalanceDirs]-->
<!-- }}</span>--> <!-- }}</span>-->
<!-- </template>--> <!-- </template>-->
<!-- <span>开始时间:</span>--> <!-- <span>开始时间:</span>-->
<!-- <span class="value" :title="item.startTime">{{--> <!-- <span class="value" :title="item.startTime">{{-->
<!-- item.startTime--> <!-- item.startTime-->
<!-- }}</span>--> <!-- }}</span>-->
<!-- <span>持续时间:</span>--> <!-- <span>持续时间:</span>-->
<!-- <span class="value" :title="item.duration + 'min'">{{--> <!-- <span class="value" :title="item.duration + 'min'">{{-->
<!-- item.duration + "min"--> <!-- item.duration + "min"-->
<!-- }}</span>--> <!-- }}</span>-->
<!-- </div>--> <!-- </div>-->
<!-- <div class="content" v-else style="margin-left: 26px;">--> <!-- <div class="content" v-else style="margin-left: 26px;">-->
<!-- 路口状态:正常--> <!-- 路口状态:正常-->
<!-- </div>--> <!-- </div>-->
<!-- </div>--> <!-- </div>-->
<!-- </div>--> <!-- </div>-->
</div> </div>
</div> </div>
</div> </div>
...@@ -192,54 +194,62 @@ export default { ...@@ -192,54 +194,62 @@ export default {
listData: [], listData: [],
listDataCopy: [], listDataCopy: [],
kipData: [ kipData: [
{ name: "拥堵", type: 2, value: 0 }, {name: "拥堵", type: 2, value: 0},
{ name: "失衡", type: 1, value: 0 }, {name: "失衡", type: 1, value: 0},
{ name: "溢出", type: 3, value: 0 }, {name: "溢出", type: 3, value: 0},
{ name: "正常", type: 0, value: 0 }, {name: "正常", type: 0, value: 0},
], ],
infoStatusObj: { infoStatusObj: {
"0": "未开启", "0": "未开启",
"1": "相位差优化", "1": "相位差优化",
"2": "选择方案", "2": "选择方案",
}, },
kipActive: { name: "", type: null }, kipActive: {name: "", type: null},
radio: "", radio: "",
loading: false, loading: false,
}; };
}, },
methods: { methods: {
getDownUpImg(number){ getRowClassName(e){
if(number > 0){ if (e.rowIndex % 2 !== 0) {
return "row-even";
} else {
return "row-odd";
}
},
getDownUpImg(number) {
if (number > 0) {
return require('@/assets/images/smartCityMain/up.png') return require('@/assets/images/smartCityMain/up.png')
} }
if(number < 0){ if (number < 0) {
return require('@/assets/images/smartCityMain/down.png') return require('@/assets/images/smartCityMain/down.png')
} }
}, },
typeChange(targetType){ typeChange(targetType) {
if(targetType==='-'){ if (targetType === '-') {
this.listDataCopy = this.listData.sort((a,b)=>{ this.listDataCopy = this.listData.sort((a, b) => {
return Number(b.congestionIndex) - Number(a.congestionIndex) return Number(b.congestionIndex) - Number(a.congestionIndex)
}) })
}else{ } else {
this.listDataCopy = this.listData.sort((a,b)=>{ this.listDataCopy = this.listData.sort((a, b) => {
return Number(b.congestionIndex) - Number(a.congestionIndex) return Number(b.congestionIndex) - Number(a.congestionIndex)
}).filter(item =>{ }).filter(item => {
return item.frequent == targetType return item.frequent == targetType
}) })
} }
}, },
rowClick(data){ rowClick(data) {
this.$emit('openCrossIndexDetail',data) this.$emit('openCrossIndexDetail', data)
}, },
initData(){ initData() {
this.typeVal = '-' this.typeVal = '-'
getAbnormalList({ getAbnormalList({
name: this.filterText, name: this.filterText,
status: this.kipActive.type, status: this.kipActive.type,
type: null, type: null,
}).then((res) => { }).then((res) => {
console.log('res right',res) console.log('res right', res)
if (res && res.code === 200) { if (res && res.code === 200) {
const data = res.content; const data = res.content;
this.kipData = [ this.kipData = [
...@@ -248,14 +258,16 @@ export default { ...@@ -248,14 +258,16 @@ export default {
type: 2, type: 2,
value: data.abnormalCrossStats.congestion, value: data.abnormalCrossStats.congestion,
}, },
{ name: "失衡", type: 1, value: data.abnormalCrossStats.unbalance }, {name: "失衡", type: 1, value: data.abnormalCrossStats.unbalance},
{ name: "溢出", type: 3, value: data.abnormalCrossStats.spillover }, {name: "溢出", type: 3, value: data.abnormalCrossStats.spillover},
{ name: "正常", type: 0, value: data.abnormalCrossStats.normal }, {name: "正常", type: 0, value: data.abnormalCrossStats.normal},
]; ];
this.listData = data.abnormalCrossList.map((item,index) =>{ this.listData = data.abnormalCrossList.sort((a, b) => {
return {index: index+1, ...item} return Number(b.congestionIndex) - Number(a.congestionIndex)
}).map((item, index) => {
return {index: index + 1, ...item}
}); });
this.listDataCopy = (JSON.parse(JSON.stringify(this.listData))).sort((a,b)=>{ this.listDataCopy = (JSON.parse(JSON.stringify(this.listData))).sort((a, b) => {
return Number(b.congestionIndex) - Number(a.congestionIndex) return Number(b.congestionIndex) - Number(a.congestionIndex)
}) })
// this.$emit("update:areaId", this.listData[0]?.id); // this.$emit("update:areaId", this.listData[0]?.id);
...@@ -265,15 +277,15 @@ export default { ...@@ -265,15 +277,15 @@ export default {
} }
}); });
}, },
kipClick(item){ kipClick(item) {
if (item.type === this.kipActive.type) { if (item.type === this.kipActive.type) {
this.kipActive = { name: "", type: null }; this.kipActive = {name: "", type: null};
} else { } else {
this.kipActive = { name: item.name, type: item.type }; this.kipActive = {name: item.name, type: item.type};
} }
this.initData(); this.initData();
}, },
getAll(){ getAll() {
this.typeVal = '-' this.typeVal = '-'
getAbnormalList({ getAbnormalList({
name: '', name: '',
...@@ -288,16 +300,18 @@ export default { ...@@ -288,16 +300,18 @@ export default {
type: 2, type: 2,
value: data.abnormalCrossStats.congestion, value: data.abnormalCrossStats.congestion,
}, },
{ name: "失衡", type: 1, value: data.abnormalCrossStats.unbalance }, {name: "失衡", type: 1, value: data.abnormalCrossStats.unbalance},
{ name: "溢出", type: 3, value: data.abnormalCrossStats.spillover }, {name: "溢出", type: 3, value: data.abnormalCrossStats.spillover},
{ name: "正常", type: 0, value: data.abnormalCrossStats.normal }, {name: "正常", type: 0, value: data.abnormalCrossStats.normal},
]; ];
this.listData = data.abnormalCrossList.map((item,index) =>{ this.listData = data.abnormalCrossList.sort((a, b) => {
return {index: index+1, ...item} return Number(b.congestionIndex) - Number(a.congestionIndex)
}).map((item, index) => {
return {index: index + 1, ...item}
}); });
this.$emit('showCrossStatus',this.listData) this.$emit('showCrossStatus', this.listData)
console.log('listData',this.listData) console.log('listData', this.listData)
this.listDataCopy = (JSON.parse(JSON.stringify(this.listData))).sort((a,b)=>{ this.listDataCopy = (JSON.parse(JSON.stringify(this.listData))).sort((a, b) => {
return Number(b.congestionIndex) - Number(a.congestionIndex) return Number(b.congestionIndex) - Number(a.congestionIndex)
}) })
} }
...@@ -311,64 +325,85 @@ export default { ...@@ -311,64 +325,85 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
::v-deep .el-table th{ ::v-deep .el-table {
background-color: transparent;
}
::v-deep .el-table th {
background-color: #030b19; background-color: #030b19;
} }
::v-deep .el-table tr{
::v-deep .el-table tr {
background-color: #030b19; background-color: #030b19;
} }
::v-deep .el-table td,.building-top .el-table th.is-leaf {
border-bottom: 0 solid #030b19; ::v-deep .el-table td, .building-top .el-table th.is-leaf {
border-bottom: 0 solid #030b19;
} }
::v-deep .el-table::before { ::v-deep .el-table::before {
border-bottom: 0 solid #030b19; border-bottom: 0 solid #030b19;
height: 0; height: 0;
} }
::v-deep .el-table th.el-table__cell{
::v-deep .el-table th.el-table__cell {
border-bottom: 0 solid #030b19; border-bottom: 0 solid #030b19;
font-size: 14px;
} }
::v-deep .el-table__body tr:hover > td { ::v-deep .el-table__body tr:hover > td {
background-color: #03274c !important; background-color: #03274c !important;
} }
::v-deep .el-table__body tr > td { ::v-deep .el-table__body tr > td {
cursor: pointer; cursor: pointer;
} }
::v-deep .el-table__cell{
::v-deep .el-table__cell {
color: white; color: white;
font-size: 14px;
} }
// 修改表格无数据背景,字体颜色 // 修改表格无数据背景,字体颜色
::v-deep .el-table__empty-block { ::v-deep .el-table__empty-block {
background: #030b19; background: #030b19;
} }
::v-deep .el-table__empty-text { ::v-deep .el-table__empty-text {
color: #ccc; color: #ccc;
} }
.item-cross { .item-cross {
::v-deep .el-input__inner{ ::v-deep .el-input__inner {
color: white; color: white;
} }
.list_control{ .list_control {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
//margin-bottom: 10px; //margin-bottom: 10px;
padding: 10px 0; padding: 10px 0;
width: 100%; width: 100%;
.homepage-search{
.homepage-search {
width: 70%; width: 70%;
} }
.sort_btn{
.sort_btn {
width: 25%; width: 25%;
} }
} }
.questionArea { .questionArea {
height: 495px; height: 100%;
.kip-box { .kip-box {
margin: 0 20px; margin: 0 20px;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between; justify-content: space-between;
.kip-item { .kip-item {
cursor: pointer; cursor: pointer;
margin-bottom: 18px; margin-bottom: 18px;
...@@ -379,44 +414,53 @@ export default { ...@@ -379,44 +414,53 @@ export default {
height: 65px; height: 65px;
border-radius: 3px; border-radius: 3px;
border: 1px solid #112d47; border: 1px solid #112d47;
img { img {
width: 42px; width: 42px;
height: 42px; height: 42px;
} }
&.active { &.active {
border: 1px solid #389fff; border: 1px solid #389fff;
box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.15); box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.15);
} }
.name { .name {
margin-bottom: 4px; margin-bottom: 4px;
font-size: 14px; font-size: 14px;
color: rgba(255,255,255,0.7); color: rgba(255, 255, 255, 0.7);
} }
.value { .value {
font-size: 14px; font-size: 14px;
color: white; color: white;
} }
} }
} }
.alarm-title-box { .alarm-title-box {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding-right: 28px; padding-right: 28px;
} }
.alarm-title { .alarm-title {
display: flex; display: flex;
align-items: center; align-items: center;
margin-left: 15px; margin-left: 15px;
margin-bottom: 10px; margin-bottom: 10px;
img { img {
margin-right: 10px; margin-right: 10px;
} }
} }
.alarm-list-box { .alarm-list-box {
height: 250px; height: 230px;
overflow: auto; overflow: auto;
} }
.alarm-list { .alarm-list {
cursor: pointer; cursor: pointer;
display: flex; display: flex;
...@@ -424,9 +468,11 @@ export default { ...@@ -424,9 +468,11 @@ export default {
padding: 12px 15px; padding: 12px 15px;
color: #383838; color: #383838;
background: rgba(227, 227, 227, 0.35); background: rgba(227, 227, 227, 0.35);
&:nth-child(2n) { &:nth-child(2n) {
background: #fff; background: #fff;
} }
img { img {
cursor: pointer; cursor: pointer;
} }
...@@ -434,15 +480,18 @@ export default { ...@@ -434,15 +480,18 @@ export default {
.value { .value {
margin-right: 10px; margin-right: 10px;
} }
.title { .title {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 16px; font-size: 16px;
margin-bottom: 8px; margin-bottom: 8px;
color: #383838; color: #383838;
img { img {
margin-right: 8px; margin-right: 8px;
} }
.title-txt { .title-txt {
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
...@@ -451,6 +500,7 @@ export default { ...@@ -451,6 +500,7 @@ export default {
display: inline-block; display: inline-block;
font-weight: 500; font-weight: 500;
} }
.type { .type {
margin-left: 8px; margin-left: 8px;
font-size: 12px; font-size: 12px;
...@@ -458,6 +508,7 @@ export default { ...@@ -458,6 +508,7 @@ export default {
border-radius: 3px; border-radius: 3px;
} }
} }
.content { .content {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
...@@ -471,5 +522,16 @@ export default { ...@@ -471,5 +522,16 @@ export default {
} }
} }
} }
::v-deep .row-even {
td {
background-color: #030d1e;
}
}
::v-deep .row-odd {
td {
background-color: #0b1933;
}
}
} }
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment