Compare commits
26 Commits
Author | SHA1 | Date |
---|---|---|
|
c9ad23c7cd | 1 month ago |
|
4e9d69459c | 1 month ago |
|
1f7b82e74a | 2 months ago |
|
66d0ef5162 | 2 months ago |
|
26ee5bf60c | 2 months ago |
|
83ebf6799e | 2 months ago |
|
3f0cb5dd58 | 2 months ago |
|
7c9f5c5991 | 2 months ago |
|
3c77b6e2ba | 2 months ago |
|
26e93afcb3 | 3 months ago |
|
b151d746a5 | 3 months ago |
|
d855b165b6 | 4 months ago |
|
b90d3ec072 | 4 months ago |
|
6f5f121d23 | 5 months ago |
|
031a5b9eeb | 5 months ago |
|
e8f1cbf1f1 | 5 months ago |
|
826457efbb | 5 months ago |
|
b9eefe7993 | 5 months ago |
|
23170d465c | 5 months ago |
|
3407340a06 | 5 months ago |
|
552c448d5c | 5 months ago |
|
c5753c4763 | 6 months ago |
|
ec1eac282f | 6 months ago |
|
7fa52f6038 | 6 months ago |
|
29c09a5921 | 6 months ago |
|
14d7411a11 | 6 months ago |
@ -0,0 +1,139 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询算法事件列表
|
||||
export function new100Page() {
|
||||
return request({
|
||||
url: '/earlyWarningAudit/massEvents/new100Page',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
// 右侧预警列表
|
||||
export function colonyPage(params){
|
||||
return request({
|
||||
url: '/earlyWarningAudit/massEvents/colonyPage',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 分页查询审核工单列表
|
||||
export function auditList(id,params){
|
||||
return request({
|
||||
url: '/earlyWarningAudit/massEvents/auditList/' + id,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 查询工单详情
|
||||
export function getMassEvents(id){
|
||||
return request({
|
||||
url: '/earlyWarningAudit/massEvents/' + id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 修改事件标题
|
||||
export function editTitle(data){
|
||||
return request({
|
||||
url: '/earlyWarningAudit/massEvents/edit',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 事件上报或退回
|
||||
export function eventChangeIsReport(data){
|
||||
return request({
|
||||
url: '/earlyWarningAudit/massEvents/eventChangeIsReport',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 分页条件查询相似事件调用记录数据
|
||||
export function colonyEventPage(params){
|
||||
return request({
|
||||
url: '/earlyWarningAudit/similar/colonyPage',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 查询相似事件数据
|
||||
export function similarEventsPage(id){
|
||||
return request({
|
||||
url: '/earlyWarningAudit/similar/similarEventsPage/' + id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 相似事件提交重训练
|
||||
export function noAccordWith(data){
|
||||
return request({
|
||||
url: '/earlyWarningAudit/similar/noAccordWith',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 取最新一条事件(预警钟)
|
||||
export function limitOneMsg(){
|
||||
return request({
|
||||
url: '/earlyWarningAudit/massEvents/limitOneMsg',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 获取日志错误信息
|
||||
export function getErrorMsg(){
|
||||
return request({
|
||||
url: '/earlyWarningAudit/massEvents/getErrorMsg',
|
||||
method: 'get',
|
||||
headers:{
|
||||
"clientId" :'3YSE6O8fRACPPRVCqAlxgkhzMG+tasXXYgdDsiWPi/U=',
|
||||
"clientSecret" :'kdoiIv5Wn2VvPG0sSGNF9Q4SVvu3CoBy+m6e8skq3AY=',
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 登录
|
||||
// export function login(data){
|
||||
// return request({
|
||||
// url: '/earlyWarningAudit/massEvents/login',
|
||||
// method: 'psot',
|
||||
// data
|
||||
// })
|
||||
// }
|
||||
|
||||
export function login(username, password) {
|
||||
const data = {
|
||||
username,
|
||||
password,
|
||||
}
|
||||
return request({
|
||||
url: '/earlyWarningAudit/massEvents/login',
|
||||
headers: {
|
||||
isToken: false,
|
||||
repeatSubmit: false
|
||||
},
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function verificationCode(params){
|
||||
return request({
|
||||
url: '/earlyWarningAudit/massEvents/verificationCode',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function verify (){
|
||||
return request({
|
||||
url: '/earlyWarningAudit/massEvents/verify',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 712 B |
After Width: | Height: | Size: 779 B |
After Width: | Height: | Size: 625 B |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 6.5 KiB |
After Width: | Height: | Size: 6.5 KiB |
After Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 912 B |
After Width: | Height: | Size: 966 B |
After Width: | Height: | Size: 5.8 KiB |
@ -0,0 +1,132 @@
|
||||
.L-ultimately-container {
|
||||
// margin: 20px;
|
||||
background-color: #fff;
|
||||
border-radius: 5px;
|
||||
height: calc(100% - 40px);
|
||||
overflow-y: scroll;
|
||||
padding: 20px 0 10px 0;
|
||||
header {
|
||||
padding: 0 20px;
|
||||
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
|
||||
font-weight: 700;
|
||||
font-size: 18px;
|
||||
color: #3D3D3D;
|
||||
|
||||
.title-span {
|
||||
margin-left: 20px;
|
||||
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #CCCCCC;
|
||||
}
|
||||
}
|
||||
.tabs {
|
||||
margin-top: 10px;
|
||||
.el-tabs {
|
||||
height: 100%;
|
||||
.el-tabs__header {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
.el-tabs__item {
|
||||
padding: 0 20px !important;
|
||||
width: 130px;
|
||||
text-align: center;
|
||||
}
|
||||
.el-tabs__active-bar {
|
||||
width: 60px;
|
||||
border-radius: 5px;
|
||||
height: 4px;
|
||||
}
|
||||
.el-tabs__nav-wrap::after {
|
||||
left: 20px;
|
||||
right: 20px;
|
||||
width: calc(100% - 40px);
|
||||
}
|
||||
// 选中样式修改
|
||||
.el-tabs__item.is-active {
|
||||
}
|
||||
}
|
||||
}
|
||||
.container-info {
|
||||
height: calc(100% - 138px);
|
||||
padding: 0 20px;
|
||||
header {
|
||||
width: 100%;
|
||||
background-color: #FAFBFC;
|
||||
padding: 20px;
|
||||
.el-form-item {
|
||||
margin-bottom: 0;
|
||||
margin-right: 60px;
|
||||
.el-form-item__label {
|
||||
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
.el-form-item__content {
|
||||
.el-input {
|
||||
.el-input__inner {
|
||||
border-radius: 2px;
|
||||
height: 32px;
|
||||
width: 240px;
|
||||
}
|
||||
}
|
||||
.el-date-editor {
|
||||
width: 480px;
|
||||
height: 32px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
section {
|
||||
margin-top: 20px;
|
||||
.el-table {
|
||||
|
||||
th {
|
||||
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
color: #3D3D3D;
|
||||
height: 50px;
|
||||
background-color: #F9FAFC;
|
||||
border: none;
|
||||
}
|
||||
|
||||
td {
|
||||
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #666666;
|
||||
text-align: left;
|
||||
color: #666666;
|
||||
}
|
||||
.table-operation {
|
||||
text-align: center;
|
||||
}
|
||||
.table-operation-anniu {
|
||||
.cell {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.go-audit {
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
img {
|
||||
width: 20px;
|
||||
height: 21px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
.span {
|
||||
color: #2F8AE5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.el-table::before {
|
||||
height: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,100 @@
|
||||
// 去掉弹框默认样式
|
||||
.leaflet-popup-content-wrapper {
|
||||
background-color: transparent !important;
|
||||
box-shadow: none !important;
|
||||
.leaflet-popup-content {
|
||||
width: 340px !important;
|
||||
}
|
||||
}
|
||||
.leaflet-popup-close-button {
|
||||
display: none;
|
||||
}
|
||||
.leaflet-popup-tip-container {
|
||||
display: none;
|
||||
}
|
||||
.marsk-box {
|
||||
.markerDialog {
|
||||
border-radius: 5px;
|
||||
background-color: #fff;
|
||||
|
||||
.markerTitle {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: space-between;
|
||||
background-color: #F4F9FD;
|
||||
border-radius: 5px 5px 0 0;
|
||||
padding: 5px 10px;
|
||||
.marker-msgTitle {
|
||||
font-family: "AlibabaPuHuiTi";
|
||||
font-weight: 700;
|
||||
font-size: 18px;
|
||||
color: #3D3D3D;
|
||||
margin-right: 40px;
|
||||
}
|
||||
.markerClose {
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
color: #808080;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
.markerContent {
|
||||
padding: 20px 10px;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
row-gap: 10px;
|
||||
.contentInfo {
|
||||
display: flex;
|
||||
.infoLabel {
|
||||
width: 80px;
|
||||
font-family: "AlibabaPuHuiTi";
|
||||
font-weight: 400;
|
||||
font-size: 16px;
|
||||
color: #666666;
|
||||
display: flex;
|
||||
.labelBox {
|
||||
flex: 1;
|
||||
text-align-last: justify;
|
||||
text-align: justify;
|
||||
}
|
||||
}
|
||||
.infoValue {
|
||||
flex: 1;
|
||||
font-family: "AlibabaPuHuiTi";
|
||||
font-weight: 400;
|
||||
font-size: 16px;
|
||||
color: #666666;
|
||||
span {
|
||||
font-family: "AlibabaPuHuiTi-Bold";
|
||||
color: #F43147;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.markerBtns {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0px 10px 20px 10px;
|
||||
.btn-audit,.btn-detailInfo {
|
||||
width: 48%;
|
||||
border-radius: 5px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
line-height: 30px;
|
||||
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #FFFFFF;
|
||||
background: #2F8AE5;
|
||||
cursor: pointer;
|
||||
}
|
||||
.btn-detailInfo {
|
||||
color: #666666;
|
||||
background: #E5E5E5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,145 @@
|
||||
<template>
|
||||
<div class="event-box" v-if="errorInfo && isTrue">
|
||||
<div class="event-background-two"></div>
|
||||
<div class="event-right">
|
||||
<div class="msgType">算法运行异常</div>
|
||||
<div class="msgContent">请及时联系运维人员进行处理</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="event-box" v-else-if="eventInfoTrue && !isTrue" @click="lookInfo">
|
||||
<div class="event-background"></div>
|
||||
<div class="event-right">
|
||||
<div class="msgType">{{ eventInfo.msgTypeName }}</div>
|
||||
<div class="msgContent">{{ eventInfo.title }}</div>
|
||||
</div>
|
||||
<urgency-audit
|
||||
title="事件详情"
|
||||
ref="urgencyAudit"
|
||||
:auditStatus="2"
|
||||
></urgency-audit>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { limitOneMsg, getErrorMsg } from "@/api/eventPage/index";
|
||||
import urgencyAudit from "@/views/components/urgencyAudit.vue";
|
||||
export default {
|
||||
components: {
|
||||
urgencyAudit,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
eventInfo: {},
|
||||
isTrue: true,
|
||||
ErrorMsgTime: "",
|
||||
errorInfo: true,
|
||||
eventInfoTrue: true,
|
||||
};
|
||||
},
|
||||
// 部署公司放开
|
||||
watch: {
|
||||
$route: {
|
||||
handler(route) {
|
||||
// 本地环境与公司环境
|
||||
if (!JSON.parse(process.env.VUE_APP_ISTEST)) {
|
||||
let timeOne;
|
||||
let timeTwo;
|
||||
this.isTrue = true;
|
||||
this.getGetErrorMsg();
|
||||
// 一小时
|
||||
timeOne = setInterval(() => {
|
||||
this.getGetErrorMsg();
|
||||
}, 60000);
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 预警钟
|
||||
getLimitOneMsg() {
|
||||
limitOneMsg().then((res) => {
|
||||
if (res.data) {
|
||||
this.eventInfo = res.data;
|
||||
this.eventInfoTrue = true;
|
||||
} else {
|
||||
this.eventInfoTrue = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 算法异常
|
||||
getGetErrorMsg() {
|
||||
getErrorMsg().then((res) => {
|
||||
if (res.data == "算法运行异常") {
|
||||
this.isTrue = true;
|
||||
this.errorInfo = true;
|
||||
this.$store.dispatch("debug/changeDebugTime", res.data[0]);
|
||||
} else {
|
||||
this.isTrue = false;
|
||||
this.errorInfo = false;
|
||||
this.eventInfo = res.data[0];
|
||||
// if(res.data) {
|
||||
// this.$store.dispatch("debug/changeDebugTime", res.data)
|
||||
// this.ErrorMsgTime = res.data;
|
||||
// // this.errorInfo = true;
|
||||
// } else {
|
||||
// this.$store.dispatch("debug/changeDebugTime", '')
|
||||
// // this.errorInfo = false;
|
||||
// }
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
lookInfo() {
|
||||
// console.log(this.eventInfo,"this.eventInfo");
|
||||
this.$refs.urgencyAudit.open(this.eventInfo);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.event-box {
|
||||
display: flex;
|
||||
width: 500px;
|
||||
height: 40px;
|
||||
border-radius: 20px;
|
||||
background: #4c4c4c;
|
||||
padding: 0 10px;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
|
||||
.event-background {
|
||||
background: url("../../assets/images/eventPrompt.png");
|
||||
background-size: 100% 100%;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.event-background-two {
|
||||
background: url("../../assets/images/debugTwo.png");
|
||||
border-radius: 50%;
|
||||
padding: 5px;
|
||||
background-size: 95% 95%;
|
||||
background-repeat: no-repeat; /* 不平铺 */
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.event-right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.msgType {
|
||||
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
|
||||
font-weight: 700;
|
||||
font-size: 14px;
|
||||
color: #f43147;
|
||||
}
|
||||
.msgContent {
|
||||
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,66 +1,82 @@
|
||||
/*
|
||||
* @Descripttion:
|
||||
* @version:
|
||||
* @Author: JC9527
|
||||
* @Date: 2024-01-25 11:41:56
|
||||
* @LastEditors: JC9527
|
||||
* @LastEditTime: 2024-02-22 14:39:44
|
||||
*/
|
||||
import router from './router'
|
||||
import store from './store'
|
||||
import { Message } from 'element-ui'
|
||||
import NProgress from 'nprogress'
|
||||
import 'nprogress/nprogress.css'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import { isRelogin } from '@/utils/request'
|
||||
import router from "./router";
|
||||
import store from "./store";
|
||||
import { Message } from "element-ui";
|
||||
import NProgress from "nprogress";
|
||||
import "nprogress/nprogress.css";
|
||||
import { getToken } from "@/utils/auth";
|
||||
import { isRelogin } from "@/utils/request";
|
||||
|
||||
NProgress.configure({ showSpinner: false })
|
||||
NProgress.configure({ showSpinner: false });
|
||||
|
||||
const whiteList = ['/login', '/register']
|
||||
const whiteList = ["/login", "/register"];
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
NProgress.start()
|
||||
NProgress.start();
|
||||
// 准备地址对接权限
|
||||
// if(window.location.href.includes("cyToken=") && window.location.href.includes("userName=")) {
|
||||
// var regOne = new RegExp(/[?&]cyToken=([^&#]+)/);
|
||||
// var regTwo = new RegExp(/[?&]userName=([^&#]+)/);
|
||||
// const queryOne = window.location.href.match(regOne);
|
||||
// const queryTwo = window.location.href.match(regTwo);
|
||||
// const cyToken = queryOne && queryOne[1];
|
||||
// const userName = queryTwo && queryTwo[1];
|
||||
// // console.log(cyToken,"cyToken");
|
||||
// // console.log(userName,"userName");
|
||||
// }
|
||||
|
||||
// 正式环境 !不是公司环境
|
||||
if (
|
||||
process.env.NODE_ENV === "production" &&
|
||||
JSON.parse(process.env.VUE_APP_ISTEST)
|
||||
) {
|
||||
next();
|
||||
NProgress.done();
|
||||
return;
|
||||
}
|
||||
if (getToken()) {
|
||||
to.meta.title && store.dispatch('settings/setTitle', to.meta.title)
|
||||
to.meta.title && store.dispatch("settings/setTitle", to.meta.title);
|
||||
/* has token*/
|
||||
if (to.path === '/login') {
|
||||
next({ path: '/' })
|
||||
NProgress.done()
|
||||
if (to.path === "/login") {
|
||||
next({ path: "/" });
|
||||
NProgress.done();
|
||||
} else if (whiteList.indexOf(to.path) !== -1) {
|
||||
next()
|
||||
next();
|
||||
} else {
|
||||
if (store.getters.roles.length === 0) {
|
||||
isRelogin.show = true
|
||||
isRelogin.show = true;
|
||||
// 判断当前用户是否已拉取完user_info信息
|
||||
store.dispatch('GetInfo').then(() => {
|
||||
isRelogin.show = false
|
||||
store.dispatch('GenerateRoutes').then(accessRoutes => {
|
||||
// 根据roles权限生成可访问的路由表
|
||||
router.addRoutes(accessRoutes) // 动态添加可访问路由表
|
||||
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
|
||||
})
|
||||
}).catch(err => {
|
||||
store.dispatch('LogOut').then(() => {
|
||||
Message.error(err)
|
||||
next({ path: '/' })
|
||||
})
|
||||
store
|
||||
.dispatch("GetInfo")
|
||||
.then(() => {
|
||||
isRelogin.show = false;
|
||||
store.dispatch("GenerateRoutes").then((accessRoutes) => {
|
||||
// 根据roles权限生成可访问的路由表
|
||||
router.addRoutes(accessRoutes); // 动态添加可访问路由表
|
||||
next({ ...to, replace: true }); // hack方法 确保addRoutes已完成
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
store.dispatch("LogOut").then(() => {
|
||||
Message.error(err);
|
||||
next({ path: "/" });
|
||||
});
|
||||
});
|
||||
} else {
|
||||
next()
|
||||
next();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 没有token
|
||||
if (whiteList.indexOf(to.path) !== -1) {
|
||||
// 在免登录白名单,直接进入
|
||||
next()
|
||||
next();
|
||||
} else {
|
||||
next(`/login?redirect=${encodeURIComponent(to.fullPath)}`) // 否则全部重定向到登录页
|
||||
NProgress.done()
|
||||
next(`/login?redirect=${encodeURIComponent(to.fullPath)}`); // 否则全部重定向到登录页
|
||||
NProgress.done();
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
router.afterEach(() => {
|
||||
NProgress.done()
|
||||
})
|
||||
NProgress.done();
|
||||
});
|
||||
|
@ -0,0 +1,156 @@
|
||||
import Layout from "@/layout";
|
||||
export function getFilterRouter() {
|
||||
let list = [];
|
||||
// 正式环境
|
||||
if (
|
||||
process.env.NODE_ENV === "production" &&
|
||||
JSON.parse(process.env.VUE_APP_ISTEST)
|
||||
) {
|
||||
list = [
|
||||
{
|
||||
path: "/index",
|
||||
component: () => import("@/views/index"),
|
||||
name: "Index",
|
||||
meta: { title: "算法运行监测", icon: "", affix: true },
|
||||
},
|
||||
{
|
||||
path: "/warningAppear",
|
||||
component: () => import("@/views/warningManage/warningAppear"),
|
||||
name: "WarningAppear",
|
||||
meta: { title: "预警呈现", icon: "", affix: true },
|
||||
},
|
||||
{
|
||||
path: "/groupEvent",
|
||||
component: () =>
|
||||
import("@/views/warningManage/warningAudit/groupEvent"),
|
||||
name: "GroupEvent",
|
||||
meta: { title: "驾驶舱群体事件", icon: "", affix: true },
|
||||
},
|
||||
{
|
||||
path: "/instancyEvent",
|
||||
component: () =>
|
||||
import("@/views/warningManage/warningAudit/instancyEvent"),
|
||||
name: "InstancyEvent",
|
||||
meta: { title: "驾驶舱紧急事件", icon: "", affix: true },
|
||||
},
|
||||
{
|
||||
path: "/oneToManyEvent",
|
||||
component: () =>
|
||||
import("@/views/warningManage/warningAudit/oneToManyEvent"),
|
||||
name: "OneToManyEvent",
|
||||
meta: { title: "驾驶舱一人多诉事件", icon: "", affix: true },
|
||||
},
|
||||
{
|
||||
path: "/oneToOneEvent",
|
||||
component: () =>
|
||||
import("@/views/warningManage/warningAudit/oneToOneEvent"),
|
||||
name: "OneToOneEvent",
|
||||
meta: { title: "驾驶舱同人同诉事件", icon: "", affix: true },
|
||||
},
|
||||
{
|
||||
path: "/emphasisEvent",
|
||||
component: () =>
|
||||
import("@/views/warningManage/warningAudit/emphasisEvent"),
|
||||
name: "EmphasisEvent",
|
||||
meta: { title: "驾驶舱重点人员事件", icon: "", affix: true },
|
||||
},
|
||||
{
|
||||
path: "/similarity",
|
||||
component: () =>
|
||||
import("@/views/warningManage/warningAudit/similarity"),
|
||||
name: "Similarity",
|
||||
meta: { title: "驾驶舱相似同类事件", icon: "", affix: true },
|
||||
},
|
||||
{
|
||||
path: "/user",
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
redirect: "noredirect",
|
||||
children: [
|
||||
{
|
||||
path: "profile",
|
||||
component: () => import("@/views/system/user/profile/index"),
|
||||
name: "Profile",
|
||||
meta: { title: "个人中心", icon: "user" },
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
return list;
|
||||
}
|
||||
|
||||
list = [
|
||||
{
|
||||
path: "/system/user-auth",
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ["system:user:edit"],
|
||||
children: [
|
||||
{
|
||||
path: "role/:userId(\\d+)",
|
||||
component: () => import("@/views/system/user/authRole"),
|
||||
name: "AuthRole",
|
||||
meta: { title: "分配角色", activeMenu: "/system/user" },
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/system/role-auth",
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ["system:role:edit"],
|
||||
children: [
|
||||
{
|
||||
path: "user/:roleId(\\d+)",
|
||||
component: () => import("@/views/system/role/authUser"),
|
||||
name: "AuthUser",
|
||||
meta: { title: "分配用户", activeMenu: "/system/role" },
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/system/dict-data",
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ["system:dict:list"],
|
||||
children: [
|
||||
{
|
||||
path: "index/:dictId(\\d+)",
|
||||
component: () => import("@/views/system/dict/data"),
|
||||
name: "Data",
|
||||
meta: { title: "字典数据", activeMenu: "/system/dict" },
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/monitor/job-log",
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ["monitor:job:list"],
|
||||
children: [
|
||||
{
|
||||
path: "index/:jobId(\\d+)",
|
||||
component: () => import("@/views/monitor/job/log"),
|
||||
name: "JobLog",
|
||||
meta: { title: "调度日志", activeMenu: "/monitor/job" },
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/tool/gen-edit",
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ["tool:gen:edit"],
|
||||
children: [
|
||||
{
|
||||
path: "index/:tableId(\\d+)",
|
||||
component: () => import("@/views/tool/gen/editTable"),
|
||||
name: "GenEdit",
|
||||
meta: { title: "修改生成配置", activeMenu: "/tool/gen" },
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
return list;
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
const state = {
|
||||
debugTime:"",
|
||||
}
|
||||
|
||||
const mutations = {
|
||||
CHANGE_TIME: (state, debugTime) => {
|
||||
state.debugTime = debugTime
|
||||
},
|
||||
}
|
||||
|
||||
const actions = {
|
||||
changeDebugTime({ commit },debugTime) {
|
||||
commit('CHANGE_TIME',debugTime)
|
||||
},
|
||||
}
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
mutations,
|
||||
actions
|
||||
}
|
@ -0,0 +1,233 @@
|
||||
// this L.CRS.Baidu from https://github.com/muyao1987/leaflet-tileLayer-baidugaode/blob/master/src/tileLayer.baidu.js
|
||||
|
||||
if (L.Proj) {
|
||||
L.CRS.Baidu = new L.Proj.CRS(
|
||||
"EPSG:900913",
|
||||
"+proj=merc +a=6378206 +b=6356584.314245179 +lat_ts=0.0 +lon_0=0.0 +x_0=0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs",
|
||||
{
|
||||
resolutions: (function () {
|
||||
var level = 19;
|
||||
var res = [];
|
||||
res[0] = Math.pow(2, 18);
|
||||
for (var i = 1; i < level; i++) {
|
||||
res[i] = Math.pow(2, 18 - i);
|
||||
}
|
||||
return res;
|
||||
})(),
|
||||
origin: [0, 0],
|
||||
bounds: L.bounds([20037508.342789244, 0], [0, 20037508.342789244]),
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
L.TileLayer.ChinaProvider = L.TileLayer.extend({
|
||||
initialize: function (type, options) {
|
||||
// (type, Object)
|
||||
var providers = L.TileLayer.ChinaProvider.providers;
|
||||
|
||||
options = options || {};
|
||||
|
||||
var parts = type.split(".");
|
||||
|
||||
var providerName = parts[0];
|
||||
var mapName = parts[1];
|
||||
var mapType = parts[2];
|
||||
|
||||
var url = providers[providerName][mapName][mapType];
|
||||
options.subdomains = providers[providerName].Subdomains;
|
||||
options.key = options.key || providers[providerName].key;
|
||||
|
||||
if ("tms" in providers[providerName]) {
|
||||
options.tms = providers[providerName]["tms"];
|
||||
}
|
||||
|
||||
L.TileLayer.prototype.initialize.call(this, url, options);
|
||||
},
|
||||
|
||||
getTileUrl: function (coords) {
|
||||
var data = {
|
||||
s: this._getSubdomain(coords),
|
||||
x: coords.x,
|
||||
y: coords.y,
|
||||
z: this._getZoomForUrl(),
|
||||
};
|
||||
if (this._map && !this._map.options.crs.infinite) {
|
||||
var invertedY = this._globalTileRange.max.y - coords.y;
|
||||
if (this.options.tms) {
|
||||
data["y"] = invertedY;
|
||||
}
|
||||
data["-y"] = invertedY;
|
||||
}
|
||||
|
||||
data.sx = data.x >> 4;
|
||||
data.sy = ((1 << data.z) - data.y) >> 4;
|
||||
|
||||
return L.Util.template(this._url, L.Util.extend(data, this.options));
|
||||
},
|
||||
|
||||
createTile: function (coords) {
|
||||
// 创建一个用于绘图的 <canvas> 元素
|
||||
var tile = L.DomUtil.create("canvas", "leaflet-tile");
|
||||
|
||||
// 根据选项设置瓦片的宽度和高度
|
||||
var size = this.getTileSize();
|
||||
tile.width = size.x;
|
||||
tile.height = size.y;
|
||||
|
||||
// 获得一个 canvas 上下文,并使用 coords.x、coords.y 和 coords.z 在上面画东西
|
||||
var ctx = tile.getContext("2d");
|
||||
|
||||
// 使用传入的 URL 模板替换变量
|
||||
var url = this._url
|
||||
.replace("{s}", this._getSubdomain(coords))
|
||||
.replace("{x}", coords.x)
|
||||
.replace("{y}", coords.y)
|
||||
.replace("{z}", this._getZoomForUrl());
|
||||
|
||||
// 创建一个图像对象来加载瓦片
|
||||
var img = new Image();
|
||||
|
||||
img.src = url; // 替换为你的图片路径
|
||||
img.setAttribute("crossOrigin", "anonymous");
|
||||
|
||||
/**获取外部接受的颜色*/
|
||||
var color = this.options.color;
|
||||
|
||||
// 当图片加载完成后,绘制到 Canvas 上
|
||||
img.onload = function () {
|
||||
// 绘制图片到 Canvas 上
|
||||
ctx.drawImage(img, 0, 0, tile.width, tile.height);
|
||||
|
||||
if (color) {
|
||||
// 获取图像的像素数据
|
||||
var imageData = ctx.getImageData(0, 0, tile.width, tile.height);
|
||||
// 获取原来的图片的像素颜色
|
||||
var pixels = imageData.data;
|
||||
for (let i = 0; i < pixels.length; i += 4) {
|
||||
const r = pixels[i],
|
||||
g = pixels[i + 1],
|
||||
b = pixels[i + 2],
|
||||
a = pixels[i + 3];
|
||||
//计算灰度
|
||||
var grayVal = (r + g + b) / 3;
|
||||
//灰度反转--会使图片整体变成灰色--方便上色
|
||||
grayVal = 255 - grayVal;
|
||||
//将灰度替换掉原始的颜色
|
||||
pixels[i] = grayVal + color.r;
|
||||
pixels[i + 1] = grayVal + color.g;
|
||||
pixels[i + 2] = grayVal + color.b;
|
||||
//设置一个前景透明度,以便和背景混合
|
||||
if (color.a) {
|
||||
pixels[i + 3] = a * color.a;
|
||||
}
|
||||
}
|
||||
// 将修改后的像素数据放回 Canvas
|
||||
ctx.putImageData(imageData, 0, 0);
|
||||
}
|
||||
};
|
||||
// 返回瓦片,以便在屏幕上呈现
|
||||
return tile;
|
||||
},
|
||||
});
|
||||
|
||||
L.TileLayer.ChinaProvider.providers = {
|
||||
TianDiTu: {
|
||||
Normal: {
|
||||
Map: "//t{s}.tianditu.gov.cn/DataServer?T=vec_w&X={x}&Y={y}&L={z}&tk={key}",
|
||||
Annotion:
|
||||
"//t{s}.tianditu.gov.cn/DataServer?T=cva_w&X={x}&Y={y}&L={z}&tk={key}",
|
||||
},
|
||||
Satellite: {
|
||||
Map: "//t{s}.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk={key}",
|
||||
Annotion:
|
||||
"//t{s}.tianditu.gov.cn/DataServer?T=cia_w&X={x}&Y={y}&L={z}&tk={key}",
|
||||
},
|
||||
Terrain: {
|
||||
Map: "//t{s}.tianditu.gov.cn/DataServer?T=ter_w&X={x}&Y={y}&L={z}&tk={key}",
|
||||
Annotion:
|
||||
"//t{s}.tianditu.gov.cn/DataServer?T=cta_w&X={x}&Y={y}&L={z}&tk={key}",
|
||||
},
|
||||
Subdomains: ["0", "1", "2", "3", "4", "5", "6", "7"],
|
||||
key: "174705aebfe31b79b3587279e211cb9a",
|
||||
},
|
||||
|
||||
GaoDe: {
|
||||
Normal: {
|
||||
// Map: 'https://webst0{s}.is.autonavi.com/appmaptile?style=7&x={x}&y={y}&z={z}' //高清
|
||||
// Map: '//webrd0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}'
|
||||
// http://202.102.20.34:9001
|
||||
Map: JSON.parse(process.env.VUE_APP_ISTEST)
|
||||
? location.origin + "/map/{z}/{x}/{y}.png"
|
||||
: "https://webst0{s}.is.autonavi.com/appmaptile?style=7&x={x}&y={y}&z={z}",
|
||||
},
|
||||
Satellite: {
|
||||
Map: "https://webst0{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",
|
||||
Annotion:
|
||||
"https://webst0{s}.is.autonavi.com/appmaptile?style=8&x={x}&y={y}&z={z}",
|
||||
},
|
||||
Subdomains: ["1", "2", "3", "4"],
|
||||
},
|
||||
|
||||
Google: {
|
||||
Normal: {
|
||||
Map: "//www.google.cn/maps/vt?lyrs=m@189&gl=cn&x={x}&y={y}&z={z}",
|
||||
},
|
||||
Satellite: {
|
||||
Map: "//www.google.cn/maps/vt?lyrs=s@189&gl=cn&x={x}&y={y}&z={z}",
|
||||
Annotion: "//www.google.cn/maps/vt?lyrs=y@189&gl=cn&x={x}&y={y}&z={z}",
|
||||
},
|
||||
Subdomains: [],
|
||||
},
|
||||
|
||||
Geoq: {
|
||||
Normal: {
|
||||
Map: "//map.geoq.cn/ArcGIS/rest/services/ChinaOnlineCommunity/MapServer/tile/{z}/{y}/{x}",
|
||||
PurplishBlue:
|
||||
"//map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetPurplishBlue/MapServer/tile/{z}/{y}/{x}",
|
||||
Gray: "//map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetGray/MapServer/tile/{z}/{y}/{x}",
|
||||
Warm: "//map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetWarm/MapServer/tile/{z}/{y}/{x}",
|
||||
},
|
||||
Theme: {
|
||||
Hydro:
|
||||
"//thematic.geoq.cn/arcgis/rest/services/ThematicMaps/WorldHydroMap/MapServer/tile/{z}/{y}/{x}",
|
||||
},
|
||||
Subdomains: [],
|
||||
},
|
||||
|
||||
OSM: {
|
||||
Normal: {
|
||||
Map: "//{s}.tile.osm.org/{z}/{x}/{y}.png",
|
||||
},
|
||||
Subdomains: ["a", "b", "c"],
|
||||
},
|
||||
|
||||
Baidu: {
|
||||
Normal: {
|
||||
Map: "//online{s}.map.bdimg.com/onlinelabel/?qt=tile&x={x}&y={y}&z={z}&styles=pl&scaler=1&p=1",
|
||||
},
|
||||
Satellite: {
|
||||
Map: "//shangetu{s}.map.bdimg.com/it/u=x={x};y={y};z={z};v=009;type=sate&fm=46",
|
||||
Annotion:
|
||||
"//online{s}.map.bdimg.com/tile/?qt=tile&x={x}&y={y}&z={z}&styles=sl&v=020",
|
||||
},
|
||||
Subdomains: "0123456789",
|
||||
tms: true,
|
||||
},
|
||||
|
||||
Tencent: {
|
||||
Normal: {
|
||||
Map: "//rt{s}.map.gtimg.com/tile?z={z}&x={x}&y={-y}&type=vector&styleid=3",
|
||||
},
|
||||
Satellite: {
|
||||
Map: "//p{s}.map.gtimg.com/sateTiles/{z}/{sx}/{sy}/{x}_{-y}.jpg",
|
||||
},
|
||||
Terrain: {
|
||||
Map: "//p{s}.map.gtimg.com/demTiles/{z}/{sx}/{sy}/{x}_{-y}.jpg",
|
||||
},
|
||||
Subdomains: "0123",
|
||||
},
|
||||
};
|
||||
|
||||
L.tileLayer.chinaProvider = function (type, options) {
|
||||
return new L.TileLayer.ChinaProvider(type, options);
|
||||
};
|
@ -0,0 +1,143 @@
|
||||
/* eslint-disable */
|
||||
L.CoordConver = function () {
|
||||
function a(b, c) {
|
||||
var d =
|
||||
-100 +
|
||||
2 * b +
|
||||
3 * c +
|
||||
0.2 * c * c +
|
||||
0.1 * b * c +
|
||||
0.2 * Math.sqrt(Math.abs(b)),
|
||||
d = d + (2 * (20 * Math.sin(6 * b * e) + 20 * Math.sin(2 * b * e))) / 3,
|
||||
d = d + (2 * (20 * Math.sin(c * e) + 40 * Math.sin((c / 3) * e))) / 3
|
||||
return (d +=
|
||||
(2 * (160 * Math.sin((c / 12) * e) + 320 * Math.sin((c * e) / 30))) / 3)
|
||||
}
|
||||
function f(b, c) {
|
||||
var d =
|
||||
300 +
|
||||
b +
|
||||
2 * c +
|
||||
0.1 * b * b +
|
||||
0.1 * b * c +
|
||||
0.1 * Math.sqrt(Math.abs(b)),
|
||||
d = d + (2 * (20 * Math.sin(6 * b * e) + 20 * Math.sin(2 * b * e))) / 3,
|
||||
d = d + (2 * (20 * Math.sin(b * e) + 40 * Math.sin((b / 3) * e))) / 3
|
||||
return (d +=
|
||||
(2 * (150 * Math.sin((b / 12) * e) + 300 * Math.sin((b / 30) * e))) / 3)
|
||||
}
|
||||
this.getCorrdType = function (b) {
|
||||
var c = 'wgs84'
|
||||
switch (b.split('.')[0]) {
|
||||
case 'Geoq':
|
||||
case 'GaoDe':
|
||||
case 'Google':
|
||||
c = 'gcj02'
|
||||
break
|
||||
case 'Baidu':
|
||||
c = 'bd09'
|
||||
break
|
||||
case 'OSM':
|
||||
case 'TianDiTu':
|
||||
c = 'wgs84'
|
||||
}
|
||||
return c
|
||||
}
|
||||
this.bd09_To_gps84 = function (b, c) {
|
||||
var d = this.bd09_To_gcj02(b, c)
|
||||
return this.gcj02_To_gps84(d.lng, d.lat)
|
||||
}
|
||||
this.gps84_To_bd09 = function (b, c) {
|
||||
var d = this.gps84_To_gcj02(b, c)
|
||||
return this.gcj02_To_bd09(d.lng, d.lat)
|
||||
}
|
||||
this.gps84_To_gcj02 = function (b, c) {
|
||||
var d = a(b - 105, c - 35),
|
||||
k = f(b - 105, c - 35),
|
||||
l = (c / 180) * e,
|
||||
g = Math.sin(l),
|
||||
g = 1 - n * g * g,
|
||||
m = Math.sqrt(g),
|
||||
d = (180 * d) / (((h * (1 - n)) / (g * m)) * e),
|
||||
k = (180 * k) / ((h / m) * Math.cos(l) * e)
|
||||
return { lng: b + k, lat: c + d }
|
||||
}
|
||||
this.gcj02_To_gps84 = function (b, c) {
|
||||
var d = a(b - 105, c - 35),
|
||||
k = f(b - 105, c - 35),
|
||||
l = (c / 180) * e,
|
||||
g = Math.sin(l),
|
||||
g = 1 - n * g * g,
|
||||
m = Math.sqrt(g),
|
||||
d = (180 * d) / (((h * (1 - n)) / (g * m)) * e),
|
||||
k = (180 * k) / ((h / m) * Math.cos(l) * e)
|
||||
return { lng: 2 * b - (b + k), lat: 2 * c - (c + d) }
|
||||
}
|
||||
this.gcj02_To_bd09 = function (b, c) {
|
||||
var d = Math.sqrt(b * b + c * c) + 2e-5 * Math.sin(c * p),
|
||||
a = Math.atan2(c, b) + 3e-6 * Math.cos(b * p)
|
||||
return { lng: d * Math.cos(a) + 0.0065, lat: d * Math.sin(a) + 0.006 }
|
||||
}
|
||||
this.bd09_To_gcj02 = function (b, c) {
|
||||
var d = b - 0.0065,
|
||||
a = c - 0.006,
|
||||
e = Math.sqrt(d * d + a * a) - 2e-5 * Math.sin(a * p),
|
||||
d = Math.atan2(a, d) - 3e-6 * Math.cos(d * p)
|
||||
return { lng: e * Math.cos(d), lat: e * Math.sin(d) }
|
||||
}
|
||||
var e = 3.141592653589793,
|
||||
h = 6378245,
|
||||
n = 0.006693421622965943,
|
||||
p = (3e3 * e) / 180
|
||||
}
|
||||
L.coordConver = function () {
|
||||
return new L.CoordConver()
|
||||
}
|
||||
L.TileLayer.ChinaProvider.include({
|
||||
addTo: function (a) {
|
||||
a.options.corrdType || (a.options.corrdType = this.options.corrdType)
|
||||
a.addLayer(this)
|
||||
return this
|
||||
},
|
||||
})
|
||||
L.tileLayer.chinaProvider = function (a, f) {
|
||||
f = f || {}
|
||||
f.corrdType = L.coordConver().getCorrdType(a)
|
||||
return new L.TileLayer.ChinaProvider(a, f)
|
||||
}
|
||||
L.GridLayer.include({
|
||||
_setZoomTransform: function (a, f, e) {
|
||||
var h = f
|
||||
void 0 != h &&
|
||||
this.options &&
|
||||
('gcj02' == this.options.corrdType
|
||||
? (h = L.coordConver().gps84_To_gcj02(f.lng, f.lat))
|
||||
: 'bd09' == this.options.corrdType &&
|
||||
(h = L.coordConver().gps84_To_bd09(f.lng, f.lat)))
|
||||
f = this._map.getZoomScale(e, a.zoom)
|
||||
e = a.origin
|
||||
.multiplyBy(f)
|
||||
.subtract(this._map._getNewPixelOrigin(h, e))
|
||||
.round()
|
||||
L.Browser.any3d
|
||||
? L.DomUtil.setTransform(a.el, e, f)
|
||||
: L.DomUtil.setPosition(a.el, e)
|
||||
},
|
||||
_getTiledPixelBounds: function (a) {
|
||||
var f = a
|
||||
void 0 != f &&
|
||||
this.options &&
|
||||
('gcj02' == this.options.corrdType
|
||||
? (f = L.coordConver().gps84_To_gcj02(a.lng, a.lat))
|
||||
: 'bd09' == this.options.corrdType &&
|
||||
(f = L.coordConver().gps84_To_bd09(a.lng, a.lat)))
|
||||
a = this._map
|
||||
var e = a._animatingZoom
|
||||
? Math.max(a._animateToZoom, a.getZoom())
|
||||
: a.getZoom(),
|
||||
e = a.getZoomScale(e, this._tileZoom),
|
||||
f = a.project(f, this._tileZoom).floor()
|
||||
a = a.getSize().divideBy(2 * e)
|
||||
return new L.Bounds(f.subtract(a), f.add(a))
|
||||
},
|
||||
})
|