提交 7200cab1 authored 作者: liujiaxing's avatar liujiaxing

最新改动

上级 abf1fec6
......@@ -70,8 +70,8 @@ app.use((req, res, next) => {
res.setHeader(
"Content-Security-Policy",
"default-src 'self' 'unsafe-inline' 'unsafe-eval'; " +
"connect-src 'self' http: https: ws: wss:; " +
"img-src 'self' data: blob: http: https:;",
"connect-src 'self' http: https: ws: wss:; " +
"img-src 'self' data: blob: http: https:;",
);
next();
}
......@@ -79,9 +79,9 @@ app.use((req, res, next) => {
// 3. API代理 - 简化版本
app.use('/api', createProxyMiddleware({
// target: 'http://121.229.107.155:2251',//测试环境
target: 'http://121.229.107.155:19021',//生产环境
// target: 'http://127.0.0.1:19021',//生产环境
// target: 'http://172.16.13.57:19021',//测试环境
// target: 'http://121.229.107.155:19021',//生产环境
target: 'http://127.0.0.1:19021',//生产环境
changeOrigin: true,
// pathRewrite: { '^/api1': '/api' }, //进来的path没有api了,要么直接用app.use((req, res, next)=>{})
pathRewrite: function (path, req) {
......
......@@ -238,3 +238,12 @@ export function getPanelCurve(data) {
params: data,
});
}
//选择模版时获取这么模版的信息
export function getPaneldetailApi(data) {
return request({
url: "/commPanel/getPanelCurveOne",
method: "get",
params: data,
});
}
......@@ -6,7 +6,7 @@
</div>
<el-dialog v-model="isDetialDialogVisible" :show-close="false" :modal="false" custom-class="custom-cdf-dialog"
width="200" height="100" :destroy-on-close="false" :before-close="isDetialDialogVisibleHandleClose"
style="margin: 0;padding: 0; background-color: rgba(0, 0, 0, 0);">
style="margin: 0;padding: 0;">
<childrenCdfCurve ref="childrenCdfRef" :propsDate="propsDate"
@isDetialDialogVisibleHandleClose="isDetialDialogVisibleHandleClose" />
</el-dialog>
......
......@@ -85,11 +85,9 @@ const data = computed(() => {
// console.log('item', item)
})
})
result = result.sort((pre, next) => pre.count - next.count)
maxValue.value = result[result.length - 1]?.count || 0
result = result.sort((pre, next) => pre.count - next.count)//排列顺序
maxValue.value = result[result.length - 1]?.count || 0//获取最大值
result = mergeData(result, appStore.gridInfoList)
console.log(result, '热力图对比');
return result
})
......@@ -207,7 +205,9 @@ function initChart() {
},
emphasis: {
itemStyle: {
areaColor: "#1f4e79", // 鼠标hover颜色
borderColor: '#0d99ff',//鼠标hover时边框颜色
areaColor: "#282a31", // 鼠标hover地图颜色
borderWidth: 2
},
},
nameMap: chineseWorldName
......@@ -220,9 +220,9 @@ function initChart() {
textStyle: {
color: "#fff"
},
dimension: 12,
itemWidth: 12,
itemHeight: 68,
// dimension: 12,
// itemWidth: 12,
// itemHeight: 68,
left: "center", // 水平居中
bottom: 1, // 距离底部 20px
range: [0, maxValue.value],
......@@ -240,6 +240,8 @@ function initChart() {
// "#BF1C05",
],
},
// type: 'piecewise',
// calculable: true
},
series: [
......@@ -251,6 +253,8 @@ function initChart() {
focus: "self",
},
renderItem(params, api) {
// console.log(api.visual("color"), '对比', api.value(0), 'ii');
// debugger
if (api.value(0) == null) {
return null
......@@ -274,8 +278,8 @@ function initChart() {
points: hex,
},
style: {
fill: 'rgba(255,255,255,.6)', // 👈 不填充
// stroke: '#00ffff', // 👈 描边颜色
fill: '#282a31', // 👈 不填充
stroke: 'rgba(255,255,255,0.6)',// 👈 描边颜色
lineWidth: 1 // 👈 描边宽度
},
......
......@@ -9,7 +9,7 @@
<!-- 标题文本 -->
<div class="hot-title">
<div class="hot-title-text">{{ props.title }}</div>
<el-select v-model="selectedValue" placeholder="切换热力图" class="selects" clearable>
<el-select v-model="selectedValue" placeholder="切换热力图" class="selects">
<el-option v-for="(building, index) in props.legendName" :key="building" :label="building" :value="index" />
</el-select>
<div class="hot-title-enlarge">
......
......@@ -5,8 +5,7 @@
<div :id="idName" class="cdfCurve"></div>
</div>
<el-dialog v-model="isDetialDialogVisible" :modal='false' :show-close="false" :modal-penetrable='true' width="200"
height="100" :before-close="isDetialDialogVisibleHandleClose"
style="margin: 0;padding: 0; background-color: rgba(0, 0, 0, 0);">
height="100" :before-close="isDetialDialogVisibleHandleClose" style="margin: 0;padding: 0; ">
<childrenInstantCurveDetail ref="childrenInstantRef" :propsDate="propsDate"
@isDetialDialogVisibleHandleClose="isDetialDialogVisibleHandleClose" />
</el-dialog>
......@@ -232,7 +231,6 @@ function initChart() {
}
})
}
// console.log(seriesArr, '总数据对比');
var option = {
......@@ -265,7 +263,7 @@ function initChart() {
// type: 'category',
type: props.lineArray ? 'time' : 'category',
boundaryGap: false,
data: dataX.value,
// data: dataX.value,
// data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
axisLabel: {
interval: 0,
......@@ -276,7 +274,9 @@ function initChart() {
fontSize: 10,
interval: 'auto', // 或直接不写
hideOverlap: true, // 防重叠(很关键)
formatter: function (value) {
formatter: function (value, index) {
console.log(value, '判断依据', index);
if (value.toString().includes(':')) {
const date = new Date(value);
const minutes = date.getMinutes();
......@@ -288,29 +288,12 @@ function initChart() {
const date = new Date(value);
const minutes = date.getMinutes();
if (minutes === 0 || minutes === 30) {
console.log(timestampToHMS(value), '判断分钟11');
console.log(date, '判断分钟11', value);
return timestampToHMS(value)
}
}
}
// formatter: function (value) {
// if (value.toString().includes(':') && false) {
// // console.log('嘿嘿', value)
// let str = []
// const arr = value.split('-') // 只保留日期部分
// for (let val of arr) {
// if (Number(val) >= 1e8 && val.includes('.')) {
// // console.log(val)
// val = (Number(val) / 1e8).toFixed(0) + '亿'
// }
// str.push(val)
// }
// return str.join('-') // 用换行符连接
// }
// // console.log('value', value)
// return value
// }
},
axisLine: {
show: true, //去除轴线
......@@ -396,7 +379,7 @@ function initChart() {
delete option.xAxis.data
}
// console.log(option, '配置', myChart, '住新冠');
// console.log(option, '数据');
console.log(option, '数据配置');
// console.log(series1Data.value, '对象');
// if (timesset) {
// clearTimeout(timesset)
......
......@@ -155,7 +155,8 @@ import Loading from '@/pages/all/components/loadingComponent/index.js'
import {
getAvailability, getTemplateList, templateAdd, templateDel,
templateDetail, templateuUpdate, templateConfigAdd, templateConfigQuery, getCapacity, getTraffic,
getDelay, getLossRate, getPanelCurve, getGridInfoList
getDelay, getLossRate, getPanelCurve, getGridInfoList,
getPaneldetailApi,//选择下拉框模版时获取这个模版的信息用于回显信息
} from '@/api/Zodiac';
import useAppStore from '@/store/module/app'
import { ElMessage, ElMessageBox } from 'element-plus'
......@@ -383,7 +384,7 @@ const getAvailabilityData = async (data) => {
}
console.log('可用性', res)
}
//初始时调取当亲模版信息
const getPanelCurveData = async (data) => {
const res = await getPanelCurve(data)
if (res.code == 200) {
......@@ -396,7 +397,19 @@ const getPanelCurveData = async (data) => {
actualAvailabilityData.value = res.data?.actualAvailability || []
}
}
// 下拉框选中模版时自动回显对应模版信息接口
const getPaneldetailApiFn = async () => {
const res = await getPaneldetailApi(data)
if (res.code == 200) {
console.log('所有曲线数据', res.data)
capacityData.value = res.data.capacity
trafficData.value = res.data.traffic
delayData.value = res.data.delay
lossRateData.value = res.data.lossRate
availabilityData.value = res.data.availability
actualAvailabilityData.value = res.data?.actualAvailability || []
}
}
const activeTemplateIndex = ref(0);
const templateCaseClickFn = (item, index) => {
activeTemplateIndex.value = index;
......
......@@ -58,8 +58,7 @@
</div>
<el-dialog v-model="screenConfigeDialogVisible" :destroy-on-close="false" modal-class="dialogModel" :modal="true"
:show-close="false" :before-close="handleScreenConfigeClose"
style="background-color: rgba(0, 0, 0,0);padding: 0;margin: 0;z-index: 999;">
:show-close="false" :before-close="handleScreenConfigeClose" style="padding: 0;margin: 0;z-index: 999;">
<screenConfige @handleScreenConfigeClose="handleScreenConfigeClose"></screenConfige>
<!-- <div style="width: 100px;height: 100px;background-color: blueviolet;"></div> -->
</el-dialog>
......@@ -694,4 +693,10 @@ const initChartData = async () => {
padding: 0 1rem;
}
}
:deep(.el-dialog .el-dialog__header) {
height: 0 !important;
padding: 0 !important;
margin: 0 !important;
}
</style>
\ No newline at end of file
......@@ -23,7 +23,7 @@
</el-input>
</div>
<el-table :data="rawData_up" size="small" :height="pxScale(440)" class="custom-table">
<el-table :data="rawData_up" size="small" :height="pxScale(440)" class="custom-table">
<el-table-column prop="segmentId" label="弧段编号" :width="pxScale(100)" align="center"></el-table-column>
<el-table-column prop="satelliteId" label="卫星编号" :width="pxScale(120)" align="center"></el-table-column>
<el-table-column prop="entryTime" label="入境时刻(北京时间)" :width="pxScale(150)" align="center"></el-table-column>
......@@ -31,14 +31,14 @@
<template #default="scope">
{{ scope.row.exitTime ===
"-" ? scope.row.exitTime : compareTime(useAppStoreInstance.subSystemTimeLineEndSelectTime,
scope.row.exitTime)?scope.row.exitTime:"-" }}
scope.row.exitTime) ? scope.row.exitTime : "-" }}
</template>
</el-table-column>
<el-table-column prop="duration" label="时长(sec)" :width="pxScale(80)" align="center">
<template #default="scope">
{{ scope.row.duration ===
"-" ? scope.row.duration : compareTime(useAppStoreInstance.subSystemTimeLineEndSelectTime,
scope.row.exitTime)?scope.row.duration:"-" }}
scope.row.exitTime) ? scope.row.duration : "-" }}
</template>
</el-table-column>
<el-table-column prop="groundStation" label="地面站" :width="pxScale(90)" align="center"></el-table-column>
......@@ -90,7 +90,8 @@
</template>
</el-table-column>
<!-- <el-table-column prop="faultServiceLeve" label="服务故障等级" width="150" align="center"></el-table-column> -->
<el-table-column prop="alterCreateTime" label="告警产生时间" :width="pxScale(120)" align="center"></el-table-column>
<el-table-column prop="alterCreateTime" label="告警产生时间" :width="pxScale(120)"
align="center"></el-table-column>
<el-table-column label="告警状态" :width="pxScale(70)" align="center" fixed="right">
<template #default="scope">
<el-tag :class="`alert-status_${OpposeAlertDataStatusMap[scope.row.alertStatus]}`">
......@@ -106,8 +107,7 @@
</div>
<el-dialog v-model="errorDataShowDialogVisible" :show-close="false" :modal="false" modal-penetrable
:before-close="handleIsErrorDataCloseFn" :destroy-on-close="true"
style="background: rgba(0, 0, 0, 0);padding: 0;margin: 0;">
:before-close="handleIsErrorDataCloseFn" :destroy-on-close="true" style="padding: 0;margin: 0;">
<errorDataShowComponent @handleIsErrorDataCloseFn="handleIsErrorDataCloseFn" :errorDetailItems="errorDetailItems">
</errorDataShowComponent>
</el-dialog>
......@@ -118,7 +118,7 @@
import { nextTick, onMounted, ref } from 'vue';
import errorDataShowComponent from './component/errorDataShowComponent.vue'
import useAppStore from '@/store/module/app'
import {pxScale } from '@/utils/rem'
import { pxScale } from '@/utils/rem'
const useAppStoreInstance = useAppStore();
......
......@@ -24,9 +24,9 @@ import { createWebHistory, createRouter, createWebHashHistory } from 'vue-router
*/
// 公共路由
export const constantRoutes = [
{
{
path: '',
component: ()=>import("@/layout/index.vue"), // 确保组件名匹配
component: () => import("@/layout/index.vue"), // 确保组件名匹配
children: [
{
path: '',
......@@ -35,211 +35,50 @@ export const constantRoutes = [
// meta: { keepAlive: true }, // 添加keepAlive元信息
children: [
{
path: '',
name: 'home',
// 如果需要命名视图
components: {
foot_two: ()=> import('@/pages/footer/component/legend.vue'), // 主内容
foot_one: ()=> import('@/pages/footer/component/timers.vue'),
left:()=> import('@/pages/lefts/index.vue'),
right:()=> import('@/pages/rights/index.vue'),
}
path: '',
name: 'home',
// 如果需要命名视图
components: {
foot_two: () => import('@/pages/footer/component/legend.vue'), // 主内容
foot_one: () => import('@/pages/footer/component/timers.vue'),
left: () => import('@/pages/lefts/index.vue'),
right: () => import('@/pages/rights/index.vue'),
}
},
{
path: '/subsystem',
name: 'subsystem',
props: true,
// meta: {
// startTime: useAppStoreInstance.globalSubsystemSelectedStartTime,
// endTime: useAppStoreInstance.globalSubsystemSelectedEndTime,
// disabled:true
// },
components: {
// foot_two: ()=> import('@/pages/footer/component/legend.vue'), // 主内容
foot_two: ()=> import('@/pages/footer2/timers.vue'),
left:()=> import('@/pages/lefts2/index.vue'),
right:()=> import('@/pages/rights2/index.vue'),
}
path: '/subsystem',
name: 'subsystem',
props: true,
// meta: {
// startTime: useAppStoreInstance.globalSubsystemSelectedStartTime,
// endTime: useAppStoreInstance.globalSubsystemSelectedEndTime,
// disabled:true
// },
components: {
// foot_two: ()=> import('@/pages/footer/component/legend.vue'), // 主内容
foot_two: () => import('@/pages/footer2/timers.vue'),
left: () => import('@/pages/lefts2/index.vue'),
right: () => import('@/pages/rights2/index.vue'),
}
},
]
},
]
},
{
path: '/404',
component: () => import('@/pages/error/404.vue'),
hidden: true
},
// // {
// // path: '/redirect',
// // component: Layout,
// // hidden: true,
// // children: [
// // {
// // path: '/redirect/:path(.*)',
// // component: () => import('@/views/redirect/index.vue')
// // }
// // ]
// // },
{
// path: '/login',
// component: () => import('../views/login/index1.vue'),
// component: () => import('@/layout/index.vue'),
// component: () => import('@/views/login/index.vue'),
// hidden: true,
// children: [
// {
// path: '/index1',
// components: {
// default:test,
// foot_two: test
// },
// },
// ],
path: '/404',
component: () => import('@/pages/error/404.vue'),
hidden: true
},
// {
// path: "/:pathMatch(.*)*",
// component: () => import('@/views/error/404.vue'),
// hidden: true
// },
// {
// path: '/401',
// component: () => import('@/views/error/401.vue'),
// hidden: true
// },
// {
// path: '',
// component: Layout,
// // redirect: '/home',
// // hidden: true,//注释平台首页
// children: [
// {
// path: '/home',
// component: () => import('../views/home/index.vue'),
// name: 'Home',
// meta: { title: '工作台', icon: 'dashboard', affix: true },
// },
// {
// path: '/buildManage',
// component: () => import('../views/buildManage/index.vue'),
// name: 'BuildManage',
// meta: { title: '建筑管理', icon: 'dashboard', affix: true },
// },
// {
// path: '/uavManage',
// component: () => import('../views/uavManage/index.vue'),
// name: 'UavManage',
// meta: { title: '无人机管理', icon: 'dashboard', affix: true }
// },
// {
// path: '/fireManage',
// component: () => import('../views/fireManage/index.vue'),
// name: 'FireManage',
// meta: { title: '火情管理', icon: 'dashboard', affix: true },
// props: true
// },
// {
// path: '/fileHistory',
// component: () => import('../views/fileHistory/index.vue'),
// name: 'FileHistory',
// meta: { title: '历史火情', icon: 'dashboard', affix: true }
// },
// {
// path: '/staffManage',
// component: () => import('../views/staffManage/index.vue'),
// name: 'StaffManage',
// meta: { title: '人员管理', icon: 'dashboard', affix: true }
// },
// {
// path: '/dashboard/analysis',
// component: () => import('../views/dashboard/analysis/index.vue'),
// name: 'analySisPage',
// meta: { title: '分析页面', icon: 'dashboard', affix: true }
// },
// {
// path: '/dashboard/workbench',
// component: () => import('../views/dashboard/workbench/index.vue'),
// name: 'WorkbenchPage',
// meta: { title: '工作台', icon: 'dashboard', affix: true }
// },
// {
// path: '/systemmanage/staffManage',
// component: () => import('../views/systemmanage/staffManage/index.vue'),
// name: 'systemManage',
// meta: { title: '人员管理', icon: 'dashboard', affix: true }
// },
// {
// path: '/areabuildmanage',
// component: () => import('../views/areabuildmanage/index.vue'),
// name: 'areaBuildmanage',
// meta: { title: '建筑管理', icon: 'dashboard', affix: true }
// },
// {
// path: '/uavshowdate',
// component: () => import('../views/uavshowdate/index.vue'),
// name: 'uavShowdate',
// meta: { title: '无人机调度', icon: 'dashboard', affix: true }
// },
// {
// path: '/areafiremanage/firesurveillance',
// component: () => import('../views/areafiremanage/firesurveillance/index.vue'),
// name: 'fireSurveillance',
// meta: { title: '历史火情', icon: 'dashboard', affix: true }
// },
// {
// path: '/areafiremanage/historyfire',
// component: () => import('../views/areafiremanage/historyfire/index.vue'),
// name: 'historyFire',
// meta: { title: '当前火情', icon: 'dashboard', affix: true },
// },
// {
// path: '/floordetail',
// component: () => import('../views/areafiremanage/historyfire/components/floordetail.vue'),
// name: 'floorDetail',
// meta: { title: '详细楼层火情', icon: 'dashboard', affix: true }
// },
// {
// path: '/showdetaildate',
// component: () => import('../views/areabuildmanage/components/showdetaildate.vue'),
// name: 'showDetaildate',
// meta: { title: '楼详细建筑数据', icon: 'dashboard', affix: true }
// },
// {
// path: '/areabuildmanage/onefloor',
// component: () => import('../views/areabuildmanage/onefloor/index.vue'),
// name: 'oneFloorBuildingDetailDate',
// meta: { title: '层详细建筑数据', icon: 'dashboard', affix: true }
// },
// {
// path: '/uavshowdate/uavmanage',
// component: () => import('../views/uavshowdate/uavmanage/index.vue'),
// name: 'uavDetailDate',
// meta: { title: '无人机管理', icon: 'dashboard', affix: true }
// },
// {
// path: '/areafiremanage/firerecord',
// component: () => import('../views/areafiremanage/firerecord/index.vue'),
// name: 'recordFireInfo',
// meta: { title: '火情记录管理', icon: 'dashboard', affix: true }
// },
{
// ]
// },
},
]
const router = createRouter({
history: createWebHistory(),
// createWebHashHistory,createWebHistory
routes: constantRoutes,
scrollBehavior(to, from, savedPosition) {
if (savedPosition) {
......
import useAppStore from '@/store/module/app.js';
const apiUrl = `ws://121.229.107.155:19021/time`; //线上
let Timewss = null;
// const apiUrl = `ws://121.229.107.155:19021/time`; //线上
const apiUrl = `ws://127.0.0.1:19021/time`; //线上
let Timewss = null;
let timer = null;
const appStore = useAppStore();
function createWebSocket() {
Timewss = new WebSocket(apiUrl);
Timewss.onopen = () => {
console.log('TimeWebSocket已连接');
};
......@@ -22,10 +23,10 @@ function createWebSocket() {
Timewss.onclose = () => {
console.log('连接关闭,1秒后重连...');
timer = setTimeout(() => {
Timewss = createWebSocket(); // 重新创建连接
clearTimeout(timer);
timer = null; //释放内存
timer = setTimeout(() => {
Timewss = createWebSocket(); // 重新创建连接
clearTimeout(timer);
timer = null; //释放内存
}, 1000);
};
}
......
......@@ -9,7 +9,9 @@
import ueHeartbeatInterval from '@/store/module/app.js'
import useAppStore from '@/store/module/app.js'
const useAppStoreInstance = useAppStore()
const apiUrl = `ws://121.229.107.155:19021/systemData`
// const apiUrl = `ws://121.229.107.155:19021/systemData`
const apiUrl = `ws://127.0.0.1:19021/systemData`//本地地址
const SubWss = new WebSocket(apiUrl);
useAppStoreInstance.setSubsystemSocket(SubWss)
// SubWss.onclose = () => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论