测试环境与打包环境

xuhongjie
许宏杰 4 months ago
parent 1f7b82e74a
commit 4e9d69459c

@ -6,8 +6,11 @@ ENV = 'development'
# 若依管理系统/开发环境
# VUE_APP_BASE_API = '/dev-api'
VUE_APP_BASE_API = 'http://192.168.0.112:9102/api'
VUE_APP_BASE_API = 'http://192.168.0.128:9102/api'
# VUE_APP_BASE_API = 'http://39.101.188.84:9102/api'
#是否正式环境 正式true 测试false
VUE_APP_ISTEST= false
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true

@ -7,3 +7,8 @@ ENV = 'production'
# 若依管理系统/生产环境
# VUE_APP_BASE_API = 'http://39.101.188.84:9102/api'
VUE_APP_BASE_API = 'http://localhost:9002/api'
#是否正式环境 正式true 测试false
VUE_APP_ISTEST= false

@ -12,81 +12,68 @@
<div class="msgType">{{ eventInfo.msgTypeName }}</div>
<div class="msgContent">{{ eventInfo.title }}</div>
</div>
<urgency-audit title="事件详情" ref="urgencyAudit" :auditStatus="2"></urgency-audit>
<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'
import { limitOneMsg, getErrorMsg } from "@/api/eventPage/index";
import urgencyAudit from "@/views/components/urgencyAudit.vue";
export default {
components:{
components: {
urgencyAudit,
},
data() {
return {
eventInfo:{},
isTrue:true,
ErrorMsgTime:'',
errorInfo:true,
eventInfoTrue:true,
}
eventInfo: {},
isTrue: true,
ErrorMsgTime: "",
errorInfo: true,
eventInfoTrue: true,
};
},
//
// watch:{
// $route:{
// handler(route){
// let timeOne;
// let timeTwo;
// this.isTrue = true;
// this.getGetErrorMsg();
// //
// timeOne = setInterval(()=>{
// this.getGetErrorMsg();
// },60000)
// // clearInterval(timeTwo)
// // if(route.meta.title == '') {
// // this.isTrue = true;
// // this.getGetErrorMsg();
// // //
// // timeOne = setInterval(()=>{
// // this.getGetErrorMsg();
// // },3600000)
// // clearInterval(timeTwo)
// // } else {
// // clearInterval(timeTwo)
// // this.isTrue = false;
// // this.getLimitOneMsg();
// // //
// // timeTwo = setInterval(()=>{
// // this.getLimitOneMsg();
// // },60000)
// // clearInterval(timeOne)
// // }
// },
// immediate:true,
// }
// },
methods:{
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) {
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 == "算法运行异常") {
getGetErrorMsg() {
getErrorMsg().then((res) => {
if (res.data == "算法运行异常") {
this.isTrue = true;
this.errorInfo = true;
this.$store.dispatch("debug/changeDebugTime", res.data[0])
this.$store.dispatch("debug/changeDebugTime", res.data[0]);
} else {
this.isTrue = false;
this.errorInfo = false;
@ -100,15 +87,15 @@ export default {
// // this.errorInfo = false;
// }
}
})
});
},
lookInfo(){
lookInfo() {
// console.log(this.eventInfo,"this.eventInfo");
this.$refs.urgencyAudit.open(this.eventInfo);
},
},
}
};
</script>
<style lang="scss" scoped>
.event-box {
@ -116,7 +103,7 @@ export default {
width: 500px;
height: 40px;
border-radius: 20px;
background: #4C4C4C;
background: #4c4c4c;
padding: 0 10px;
align-items: center;
cursor: pointer;
@ -145,13 +132,13 @@ export default {
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 700;
font-size: 14px;
color: #F43147;
color: #f43147;
}
.msgContent {
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 400;
font-size: 12px;
color: #FFFFFF;
color: #ffffff;
}
}
}

@ -1,71 +1,82 @@
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();
// console.log("1111");
// 准备地址对接权限
// 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];
// const userName = queryTwo && queryTwo[1];
// // console.log(cyToken,"cyToken");
// // console.log(userName,"userName");
// }
next();
NProgress.done()
// if (getToken()) {
// to.meta.title && store.dispatch('settings/setTitle', to.meta.title)
// /* has token*/
// if (to.path === '/login') {
// next({ path: '/' })
// NProgress.done()
// } else if (whiteList.indexOf(to.path) !== -1) {
// next()
// } else {
// if (store.getters.roles.length === 0) {
// 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: '/' })
// })
// })
// } else {
// next()
// }
// }
// } else {
// // 没有token
// if (whiteList.indexOf(to.path) !== -1) {
// // 在免登录白名单,直接进入
// next()
// } else {
// next(`/login?redirect=${encodeURIComponent(to.fullPath)}`) // 否则全部重定向到登录页
// NProgress.done()
// }
// }
})
// 正式环境 !不是公司环境
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);
/* has token*/
if (to.path === "/login") {
next({ path: "/" });
NProgress.done();
} else if (whiteList.indexOf(to.path) !== -1) {
next();
} else {
if (store.getters.roles.length === 0) {
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: "/" });
});
});
} else {
next();
}
}
} else {
// 没有token
if (whiteList.indexOf(to.path) !== -1) {
// 在免登录白名单,直接进入
next();
} else {
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;
}

@ -1,10 +1,11 @@
import Vue from 'vue'
import Router from 'vue-router'
import Vue from "vue";
import Router from "vue-router";
Vue.use(Router)
Vue.use(Router);
/* Layout */
import Layout from '@/layout'
import Layout from "@/layout";
import { getFilterRouter } from "./filterRouter";
/**
* Note: 路由配置项
@ -29,42 +30,42 @@ import Layout from '@/layout'
*/
// 公共路由
export const constantRoutes = [
export let constantRoutes = [
{
path: '/redirect',
path: "/redirect",
component: Layout,
hidden: true,
children: [
{
path: '/redirect/:path(.*)',
component: () => import('@/views/redirect')
}
]
path: "/redirect/:path(.*)",
component: () => import("@/views/redirect"),
},
],
},
{
path: '/login',
component: () => import('@/views/login'),
hidden: true
path: "/login",
component: () => import("@/views/login"),
hidden: true,
},
{
path: '/register',
component: () => import('@/views/register'),
hidden: true
path: "/register",
component: () => import("@/views/register"),
hidden: true,
},
{
path: '/404',
component: () => import('@/views/error/404'),
hidden: true
path: "/404",
component: () => import("@/views/error/404"),
hidden: true,
},
{
path: '/401',
component: () => import('@/views/error/401'),
hidden: true
path: "/401",
component: () => import("@/views/error/401"),
hidden: true,
},
{
path: '',
path: "",
component: Layout,
redirect: 'index',
redirect: "index",
// children: [
// {
// path: 'index',
@ -74,161 +75,28 @@ export const constantRoutes = [
// },
// ]
},
// 以下测试环境需注释掉
{
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' }
}
]
}
]
// 以下测试环境需注释掉 - 正式环境用
];
constantRoutes = [...constantRoutes, ...getFilterRouter()];
// 动态路由,基于用户权限动态去加载
export const dynamicRoutes = [
{
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' }
}
]
}
]
// 动态路由,基于用户权限动态去加载 - 公司及本地环境
export const dynamicRoutes = getFilterRouter();
// 防止连续点击多次路由报错
let routerPush = Router.prototype.push;
let routerReplace = Router.prototype.replace;
// push
Router.prototype.push = function push(location) {
return routerPush.call(this, location).catch(err => err)
}
return routerPush.call(this, location).catch((err) => err);
};
// replace
Router.prototype.replace = function push(location) {
return routerReplace.call(this, location).catch(err => err)
}
return routerReplace.call(this, location).catch((err) => err);
};
export default new Router({
// 测试环境注释掉
mode: 'history', // 去掉url中的#
mode: "history", // 去掉url中的#
scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes
})
routes: constantRoutes,
});

@ -1,223 +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.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;
initialize: function (type, options) { // (type, Object)
var providers = L.TileLayer.ChinaProvider.providers;
options = options || {};
options = options || {}
var parts = type.split(".");
var parts = type.split('.');
var providerName = parts[0];
var mapName = parts[1];
var mapType = parts[2];
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;
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']
}
if ("tms" in providers[providerName]) {
options.tms = providers[providerName]["tms"];
}
L.TileLayer.prototype.initialize.call(this, url, options);
},
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;
}
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;
}
}
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;
}
// 将修改后的像素数据放回 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"
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}",
},
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: location.origin + '/map/{z}/{x}/{y}.png'
},
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"]
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}",
},
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: []
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}",
},
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: []
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"],
},
OSM: {
Normal: {
Map: "//{s}.tile.osm.org/{z}/{x}/{y}.png",
},
Subdomains: ['a', 'b', 'c']
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: [],
},
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
OSM: {
Normal: {
Map: "//{s}.tile.osm.org/{z}/{x}/{y}.png",
},
Subdomains: ["a", "b", "c"],
},
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',
}
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);
return new L.TileLayer.ChinaProvider(type, options);
};

@ -1,119 +1,159 @@
import axios from 'axios'
import { Notification, MessageBox, Message, Loading } from 'element-ui'
import store from '@/store'
import { getToken } from '@/utils/auth'
import errorCode from '@/utils/errorCode'
import axios from "axios";
import { Notification, MessageBox, Message, Loading } from "element-ui";
import store from "@/store";
import { getToken } from "@/utils/auth";
import errorCode from "@/utils/errorCode";
import { tansParams, blobValidate } from "@/utils/ruoyi";
import cache from '@/plugins/cache'
import { saveAs } from 'file-saver'
import cache from "@/plugins/cache";
import { saveAs } from "file-saver";
let downloadLoadingInstance;
// 是否显示重新登录
export let isRelogin = { show: false };
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
axios.defaults.headers["Content-Type"] = "application/json;charset=utf-8";
// 创建axios实例
const service = axios.create({
// axios中请求配置有baseURL选项表示请求URL公共部分
baseURL: process.env.NODE_ENV === "production" ? location.origin + '/api' : process.env.VUE_APP_BASE_API,
// 测试环境使用
// baseURL: process.env.VUE_APP_BASE_API,
baseURL: JSON.parse(process.env.VUE_APP_ISTEST)
? location.origin + "/api"
: process.env.VUE_APP_BASE_API,
// 超时
timeout: 10000
})
timeout: 10000,
});
// request拦截器
service.interceptors.request.use(config => {
// 是否需要设置 token
const isToken = (config.headers || {}).isToken === false
// 是否需要防止数据重复提交
const isRepeatSubmit = (config.headers || {}).repeatSubmit === false
// if (getToken() && !isToken) {
// config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
// }
if (localStorage.getItem('Admin-Token') && !isToken) {
config.headers['Authorization'] = 'Bearer ' + localStorage.getItem('Admin-Token') // 让每个请求携带自定义token 请根据实际情况自行修改
}
// get请求映射params参数
if (config.method === 'get' && config.params) {
let url = config.url + '?' + tansParams(config.params);
url = url.slice(0, -1);
config.params = {};
config.url = url;
}
if (!isRepeatSubmit && (config.method === 'post' || config.method === 'put')) {
const requestObj = {
url: config.url,
data: typeof config.data === 'object' ? JSON.stringify(config.data) : config.data,
time: new Date().getTime()
service.interceptors.request.use(
(config) => {
// 是否需要设置 token
const isToken = (config.headers || {}).isToken === false;
// 是否需要防止数据重复提交
const isRepeatSubmit = (config.headers || {}).repeatSubmit === false;
if (!JSON.parse(process.env.VUE_APP_ISTEST)) {
if (getToken() && !isToken) {
config.headers["Authorization"] = "Bearer " + getToken(); // 让每个请求携带自定义token 请根据实际情况自行修改
}
} else {
if (localStorage.getItem("Admin-Token") && !isToken) {
config.headers["Authorization"] =
"Bearer " + localStorage.getItem("Admin-Token"); // 让每个请求携带自定义token 请根据实际情况自行修改
}
}
const requestSize = Object.keys(JSON.stringify(requestObj)).length; // 请求数据大小
const limitSize = 5 * 1024 * 1024; // 限制存放数据5M
if (requestSize >= limitSize) {
console.warn(`[${config.url}]: ` + '请求数据大小超出允许的5M限制无法进行防重复提交验证。')
return config;
// get请求映射params参数
if (config.method === "get" && config.params) {
let url = config.url + "?" + tansParams(config.params);
url = url.slice(0, -1);
config.params = {};
config.url = url;
}
const sessionObj = cache.session.getJSON('sessionObj')
if (sessionObj === undefined || sessionObj === null || sessionObj === '') {
cache.session.setJSON('sessionObj', requestObj)
} else {
const s_url = sessionObj.url; // 请求地址
const s_data = sessionObj.data; // 请求数据
const s_time = sessionObj.time; // 请求时间
const interval = 1000; // 间隔时间(ms),小于此时间视为重复提交
if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url) {
const message = '数据正在处理,请勿重复提交';
console.warn(`[${s_url}]: ` + message)
return Promise.reject(new Error(message))
if (
!isRepeatSubmit &&
(config.method === "post" || config.method === "put")
) {
const requestObj = {
url: config.url,
data:
typeof config.data === "object"
? JSON.stringify(config.data)
: config.data,
time: new Date().getTime(),
};
const requestSize = Object.keys(JSON.stringify(requestObj)).length; // 请求数据大小
const limitSize = 5 * 1024 * 1024; // 限制存放数据5M
if (requestSize >= limitSize) {
console.warn(
`[${config.url}]: ` +
"请求数据大小超出允许的5M限制无法进行防重复提交验证。"
);
return config;
}
const sessionObj = cache.session.getJSON("sessionObj");
if (
sessionObj === undefined ||
sessionObj === null ||
sessionObj === ""
) {
cache.session.setJSON("sessionObj", requestObj);
} else {
cache.session.setJSON('sessionObj', requestObj)
const s_url = sessionObj.url; // 请求地址
const s_data = sessionObj.data; // 请求数据
const s_time = sessionObj.time; // 请求时间
const interval = 1000; // 间隔时间(ms),小于此时间视为重复提交
if (
s_data === requestObj.data &&
requestObj.time - s_time < interval &&
s_url === requestObj.url
) {
const message = "数据正在处理,请勿重复提交";
console.warn(`[${s_url}]: ` + message);
return Promise.reject(new Error(message));
} else {
cache.session.setJSON("sessionObj", requestObj);
}
}
}
return config;
},
(error) => {
console.log(error);
Promise.reject(error);
}
return config
}, error => {
console.log(error)
Promise.reject(error)
})
);
// 响应拦截器
service.interceptors.response.use(res => {
service.interceptors.response.use(
(res) => {
// 未设置状态码则默认成功状态
const code = res.data.code || 200;
// 获取错误信息
const msg = errorCode[code] || res.data.msg || errorCode['default']
const msg = errorCode[code] || res.data.msg || errorCode["default"];
// 二进制数据则直接返回
if (res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer') {
return res.data
if (
res.request.responseType === "blob" ||
res.request.responseType === "arraybuffer"
) {
return res.data;
}
if (code === 401) {
if (!isRelogin.show) {
isRelogin.show = true;
MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => {
isRelogin.show = false;
store.dispatch('LogOut').then(() => {
location.href = '/index';
MessageBox.confirm(
"登录状态已过期,您可以继续留在该页面,或者重新登录",
"系统提示",
{
confirmButtonText: "重新登录",
cancelButtonText: "取消",
type: "warning",
}
)
.then(() => {
isRelogin.show = false;
store.dispatch("LogOut").then(() => {
location.href = "/index";
});
})
}).catch(() => {
isRelogin.show = false;
});
}
return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
.catch(() => {
isRelogin.show = false;
});
}
return Promise.reject("无效的会话,或者会话已过期,请重新登录。");
} else if (code === 500) {
Message({ message: msg, type: 'error' })
return Promise.reject(new Error(msg))
Message({ message: msg, type: "error" });
return Promise.reject(new Error(msg));
} else if (code === 601) {
Message({ message: msg, type: 'warning' })
return Promise.reject('error')
Message({ message: msg, type: "warning" });
return Promise.reject("error");
} else if (code !== 200) {
Notification.error({ title: msg })
return Promise.reject('error')
Notification.error({ title: msg });
return Promise.reject("error");
} else {
return res.data
return res.data;
}
},
error => {
console.log('err' + error)
(error) => {
console.log("err" + error);
let { message } = error;
if (message == "Network Error") {
message = "后端接口连接异常";
@ -122,36 +162,48 @@ service.interceptors.response.use(res => {
} else if (message.includes("Request failed with status code")) {
message = "系统接口" + message.substr(message.length - 3) + "异常";
}
Message({ message: message, type: 'error', duration: 5 * 1000 })
return Promise.reject(error)
Message({ message: message, type: "error", duration: 5 * 1000 });
return Promise.reject(error);
}
)
);
// 通用下载方法
export function download(url, params, filename, config) {
downloadLoadingInstance = Loading.service({ text: "正在下载数据,请稍候", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", })
return service.post(url, params, {
transformRequest: [(params) => { return tansParams(params) }],
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
responseType: 'blob',
...config
}).then(async (data) => {
const isBlob = blobValidate(data);
if (isBlob) {
const blob = new Blob([data])
saveAs(blob, filename)
} else {
const resText = await data.text();
const rspObj = JSON.parse(resText);
const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode['default']
Message.error(errMsg);
}
downloadLoadingInstance.close();
}).catch((r) => {
console.error(r)
Message.error('下载文件出现错误,请联系管理员!')
downloadLoadingInstance.close();
})
downloadLoadingInstance = Loading.service({
text: "正在下载数据,请稍候",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
return service
.post(url, params, {
transformRequest: [
(params) => {
return tansParams(params);
},
],
headers: { "Content-Type": "application/x-www-form-urlencoded" },
responseType: "blob",
...config,
})
.then(async (data) => {
const isBlob = blobValidate(data);
if (isBlob) {
const blob = new Blob([data]);
saveAs(blob, filename);
} else {
const resText = await data.text();
const rspObj = JSON.parse(resText);
const errMsg =
errorCode[rspObj.code] || rspObj.msg || errorCode["default"];
Message.error(errMsg);
}
downloadLoadingInstance.close();
})
.catch((r) => {
console.error(r);
Message.error("下载文件出现错误,请联系管理员!");
downloadLoadingInstance.close();
});
}
export default service
export default service;

@ -13,11 +13,27 @@
<el-option label="暴漏垃圾" value="shanghai"></el-option>
<el-option label="市容环境" value="beijing"></el-option>
</el-select> -->
<el-input v-model="form.msgTypeName" placeholder="请输入事件类型名称"></el-input>
<el-input
v-model="form.msgTypeName"
placeholder="请输入事件类型名称"
></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" size="mini" icon="el-icon-search" @click="onSubmit('formOne')" class="onSubmit">查询</el-button>
<el-button size="mini" icon="el-icon-refresh-left" @click="reset('formOne')" class="reset">重置</el-button>
<el-button
type="primary"
size="mini"
icon="el-icon-search"
@click="onSubmit('formOne')"
class="onSubmit"
>查询</el-button
>
<el-button
size="mini"
icon="el-icon-refresh-left"
@click="reset('formOne')"
class="reset"
>重置</el-button
>
</el-form-item>
</el-form>
</div>
@ -35,7 +51,11 @@
width="55"
align="center"
/>
<el-table-column label="时间" align="center" prop="firstWarnTimeDate">
<el-table-column
label="时间"
align="center"
prop="firstWarnTimeDate"
>
</el-table-column>
<el-table-column label="类型" align="center" prop="msgTypeName">
</el-table-column>
@ -47,22 +67,38 @@
<template slot-scope="scope">
<div
style="
display: flex;
align-items: center;
justify-content: center;
display: flex;
align-items: center;
justify-content: center;
"
>
<div class="state-sub">
<div v-if="scope.row.state == 1" class="colors wancengColor"></div>
<div v-if="scope.row.state == 2" class="colors yichuliColor"></div>
<div v-if="scope.row.state == 3" class="colors yizhuofei"></div>
<div v-if="scope.row.state == null || scope.row.state == ''" class="colors yanqiColor"></div>
<div
v-if="scope.row.state == 1"
class="colors wancengColor"
></div>
<div
v-if="scope.row.state == 2"
class="colors yichuliColor"
></div>
<div
v-if="scope.row.state == 3"
class="colors yizhuofei"
></div>
<div
v-if="scope.row.state == null || scope.row.state == ''"
class="colors yanqiColor"
></div>
</div>
<div class="state-sub2">
<div v-if="scope.row.state == 1"></div>
<div v-if="scope.row.state == 2"></div>
<div v-if="scope.row.state == 3"></div>
<div v-if="scope.row.state == null || scope.row.state == ''"></div>
<div
v-if="scope.row.state == null || scope.row.state == ''"
>
正常
</div>
</div>
</div>
</template>
@ -141,93 +177,100 @@
</div> -->
<div class="team-main">
<div>状态:</div>
<div>{{ dialogData.state == 1 ? '未通过' : dialogData.state == 2 ? '已办结' : dialogData.state == 3 ? '作废' : '正常' }}</div>
<div>
{{
dialogData.state == 1
? "未通过"
: dialogData.state == 2
? "已办结"
: dialogData.state == 3
? "作废"
: "正常"
}}
</div>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import { getEvents,getEventById } from "@/api/platform/index"
import { getEvents, getEventById } from "@/api/platform/index";
export default {
data() {
return {
form:{
msgTypeName: '',
title: '',
form: {
msgTypeName: "",
title: "",
},
pages: {
current: 1,
size: 10,
},
loading:false,
loading: false,
tableData: [],
total:1,
showCK:false,
dialogLoading:false,
dialogData:{},
}
total: 1,
showCK: false,
dialogLoading: false,
dialogData: {},
};
},
mounted() {
this.getList();
},
methods:{
methods: {
//
getPagination(pages){
getPagination(pages) {
console.log(pages);
this.pages.current = pages.page;
this.pages.size = pages.limit;
this.getList()
this.getList();
},
//
getList(){
getList() {
this.loading = true;
getEvents(this.pages).then(res=>{
getEvents(this.pages).then((res) => {
console.log(res);
this.loading = false;
this.tableData = res.data.records;
this.total = res.data.total;
})
});
},
//
onSubmit(){
onSubmit() {
this.pages = {
current: 1,
size: 10
}
this.pages = {...this.pages,...this.form}
size: 10,
};
this.pages = { ...this.pages, ...this.form };
this.getList();
},
//
reset(formRef){
reset(formRef) {
this.$refs[formRef].resetFields();
this.pages = {
current: 1,
size: 10
}
size: 10,
};
this.form = {
msgTypeName: '',
title: '',
}
msgTypeName: "",
title: "",
};
this.getList();
},
//
toDetail(row) {
this.dialogLoading = true;
this.showCK = true;
getEventById(row.innerEventId).then(res=>{
getEventById(row.innerEventId).then((res) => {
this.dialogData = res.data;
this.dialogLoading = false;
})
});
},
//
approveReset() {
this.showCK = false;
},
},
}
};
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

@ -4,12 +4,25 @@
<div class="headerText">
<div class="searchP">
运行监测
<span v-if="!debugTime"> <span v-if="tableData.length > 0">{{ tableData[0].runningTime }}</span></span>
<span v-else> <span>{{ debugTime.firstWarnTimeDate }}</span></span>
<span v-if="!debugTime"
>算法运行正常数据获取正常数据推送上一次时间
<span v-if="tableData.length > 0">{{
tableData[0].runningTime
}}</span></span
>
<span v-else
>算法运行异常数据获取异常数据推送上一次时间
<span>{{ debugTime.firstWarnTimeDate }}</span></span
>
</div>
</div>
<div class="arithmetic-query">
<el-form :inline="true" :model="formInline" size="small" class="demo-form-inline">
<el-form
:inline="true"
:model="formInline"
size="small"
class="demo-form-inline"
>
<el-form-item label="运行时间:">
<el-date-picker
v-model="formInline.time"
@ -22,10 +35,17 @@
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button size="mini" @click="resetQuery('queryFrom')"></el-button>
<el-button size="mini" type="primary" @click="handleQuery('queryFrom')"></el-button>
<el-button size="mini" @click="resetQuery('queryFrom')"
>重置</el-button
>
<el-button
size="mini"
type="primary"
@click="handleQuery('queryFrom')"
>查询</el-button
>
</el-form-item>
</el-form>
</div>
@ -37,7 +57,11 @@
width="55"
align="center"
/>
<el-table-column label="算法运行时间" align="center" prop="runningTime">
<el-table-column
label="算法运行时间"
align="center"
prop="runningTime"
>
</el-table-column>
<el-table-column label="获取事件条数" align="center" prop="hqTotal">
</el-table-column>
@ -61,11 +85,11 @@
<script>
// import tabContent from "./components/algorithmTime"
import { getEventLogs } from "@/api/platform/index"
import { mapState, mapGetters } from 'vuex'
import { login, verify, verificationCode } from "@/api/eventPage"
import { setToken } from '@/utils/auth'
import { encrypt } from '@/utils/jsencrypt'
import { getEventLogs } from "@/api/platform/index";
import { mapState, mapGetters } from "vuex";
import { login, verify, verificationCode } from "@/api/eventPage";
import { setToken } from "@/utils/auth";
import { encrypt } from "@/utils/jsencrypt";
export default {
// components:{
// tabContent
@ -77,122 +101,127 @@ export default {
current: 1,
size: 10,
},
loading:false,
loading: false,
tableData: [],
total:0,
total: 0,
tabHeader: {
height: '',
height: "",
},
formInline: {
time: [],
}
},
};
},
computed: {
...mapGetters(['debugTime']),
...mapGetters(["debugTime"]),
},
mounted() {
// const currentDate = new Date();
// const targetDate = new Date(2024, 10, 1, 0, 0, 0);
// console.log(currentDate >= targetDate);
// 使
verify().then(res=>{
if(!res.data) {
this.$prompt('<div>算法已有3个月未迭代请联系算法人员进行迭代优化。</div><div class="warningText">正式使用码签约合同有效期2年有效期至2026年11月1日</div>', '提示', {
confirmButtonText: '确定',
type:"warning",
closeOnPressEscape:false,
showCancelButton: false,
closeOnClickModal:false,
dangerouslyUseHTMLString:true,
showInput:true,
showClose:false,
beforeClose:(action, instance, done)=>{
if (action === 'confirm') {
if(instance.inputValue == "88888888") {
done();
} else {
this.$message.error('试用码错误!');
}
if (JSON.parse(process.env.VUE_APP_ISTEST)) {
// 使
verify().then((res) => {
if (!res.data) {
this.$prompt(
'<div>算法已有3个月未迭代请联系算法人员进行迭代优化。</div><div class="warningText">正式使用码签约合同有效期2年有效期至2026年11月1日</div>',
"提示",
{
confirmButtonText: "确定",
type: "warning",
closeOnPressEscape: false,
showCancelButton: false,
closeOnClickModal: false,
dangerouslyUseHTMLString: true,
showInput: true,
showClose: false,
beforeClose: (action, instance, done) => {
if (action === "confirm") {
if (instance.inputValue == "88888888") {
done();
} else {
this.$message.error("试用码错误!");
}
}
},
}
}
}).then(({ value }) => {
verificationCode({verificationCode:value}).then(res=>{
login("admin",encrypt("Suanfa@2024//**...")).then(res=>{
// setToken(res.token)
localStorage.setItem('Admin-Token',res.token)
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
})
})
})
} else {
login("admin",encrypt("Suanfa@2024//**...")).then(res=>{
// setToken(res.token)
localStorage.setItem('Admin-Token',res.token)
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
})
}
})
// 使
// this.getList();
// this.cancalDebounce();
// window.addEventListener('resize', this.cancalDebounce);
).then(({ value }) => {
verificationCode({ verificationCode: value }).then((res) => {
login("admin", encrypt("Suanfa@2024//**...")).then((res) => {
// setToken(res.token)
localStorage.setItem("Admin-Token", res.token);
this.getList();
this.cancalDebounce();
window.addEventListener("resize", this.cancalDebounce);
});
});
});
} else {
login("admin", encrypt("Suanfa@2024//**...")).then((res) => {
// setToken(res.token)
localStorage.setItem("Admin-Token", res.token);
this.getList();
this.cancalDebounce();
window.addEventListener("resize", this.cancalDebounce);
});
}
});
} else {
//使
this.getList();
this.cancalDebounce();
window.addEventListener("resize", this.cancalDebounce);
}
},
destroyed() {
window.removeEventListener('resize', this.cancalDebounce);
window.removeEventListener("resize", this.cancalDebounce);
},
methods: {
//
resetQuery(){
resetQuery() {
this.formInline = {
time:[],
}
time: [],
};
this.pages = {
current: 1,
size: 10,
}
};
this.getList();
},
//
handleQuery(){
if(this.formInline.time.length > 0) {
this.formInline.startTime = this.formInline.time[0]
this.formInline.endTime = this.formInline.time[1]
handleQuery() {
if (this.formInline.time.length > 0) {
this.formInline.startTime = this.formInline.time[0];
this.formInline.endTime = this.formInline.time[1];
}
this.pages = {...this.pages,...this.formInline}
this.pages = { ...this.pages, ...this.formInline };
this.getList();
},
//
getList(){
getList() {
this.loading = true;
getEventLogs(this.pages).then(res=>{
getEventLogs(this.pages).then((res) => {
this.loading = false;
this.total = res.data.total;
this.tableData = res.data.records;
})
});
},
//
getPagination(pages){
getPagination(pages) {
this.pages.current = pages.page;
this.pages.size = pages.limit;
this.getList()
this.getList();
},
//
cancalDebounce(){
const element = document.getElementById('L-size-main'); // ID
const pagination = document.getElementById('L-pagination'); // ID
cancalDebounce() {
const element = document.getElementById("L-size-main"); // ID
const pagination = document.getElementById("L-pagination"); // ID
const elementHeight = element.offsetHeight;
const paginationtHeight = pagination.offsetHeight;
this.tabHeader.height = (elementHeight - paginationtHeight - 100) + 'px';
}
}
this.tabHeader.height = elementHeight - paginationtHeight - 100 + "px";
},
},
};
</script>
<style scoped lang="scss">
</style>
<style scoped lang="scss"></style>

@ -11,12 +11,25 @@
v-if="queryParams.title"
class="el-icon-close el-input__icon"
slot="suffix"
@click="handleIconClick">
@click="handleIconClick"
>
</i>
<el-button type="primary" size="medium" @click="query" slot="append" icon="el-icon-search"></el-button>
<el-button
type="primary"
size="medium"
@click="query"
slot="append"
icon="el-icon-search"
></el-button>
</el-input>
</div>
<el-radio-group v-model="queryParams.isReport" @change="getList" class="years-select" size="small" fill="#1890FF">
<el-radio-group
v-model="queryParams.isReport"
@change="getList"
class="years-select"
size="small"
fill="#1890FF"
>
<el-radio-button :label="6">全部</el-radio-button>
<el-radio-button :label="4">待审核</el-radio-button>
<el-radio-button :label="5">已审核</el-radio-button>
@ -24,25 +37,50 @@
</el-radio-group>
<div class="warning-list-list" v-loading="loading">
<div v-if="eventList.length > 0">
<div class="lists" v-for="(item,index) in eventList">
<div class="lists" v-for="(item, index) in eventList">
<div class="hearder">
<!--群体事件1同人同诉2紧急事件3重点人员4一人多诉5 -->
<div class="anniu" :class="item.msgType == '1' ? 'qunti' : item.msgType == '2' ? 'tongren' : item.msgType == '3' ? 'jinji' : item.msgType == '4' ? 'zhongdian' : item.msgType == '5' ? 'yiren' : '' ">{{ item.msgTypeName }}</div>
<div
class="anniu"
:class="
item.msgType == '1'
? 'qunti'
: item.msgType == '2'
? 'tongren'
: item.msgType == '3'
? 'jinji'
: item.msgType == '4'
? 'zhongdian'
: item.msgType == '5'
? 'yiren'
: ''
"
>
{{ item.msgTypeName }}
</div>
<div class="warning-title">{{ item.title }}</div>
</div>
<div class="content">
<div class="content-top">
<img src="@/assets/images/address.png" alt="">
<img src="@/assets/images/address.png" alt="" />
<span>{{ item.address }}</span>
</div>
<div class="content-bottom">
<img src="@/assets/images/time.png" alt="">
<img src="@/assets/images/time.png" alt="" />
<span>{{ item.firstWarnTimeDate }}</span>
</div>
</div>
<div class="foot">
<el-button v-if="!item.isReport" type="primary" size="mini" @click="audit(item)"></el-button>
<el-button v-else size="mini" @click="detailInfo(item)"></el-button>
<el-button
v-if="!item.isReport"
type="primary"
size="mini"
@click="audit(item)"
>审核</el-button
>
<el-button v-else size="mini" @click="detailInfo(item)"
>查看详情</el-button
>
</div>
</div>
</div>
@ -52,7 +90,7 @@
</div>
<div class="warning-list-footer">
<pagination
v-show="total>0"
v-show="total > 0"
:total="total"
layout="total, prev, pager, next, jumper"
:pagerCount="5"
@ -66,78 +104,94 @@
</div>
</div>
<div class="warning-events">
<div class="warning-events-event" v-for="(item,index) in event">
<img class="warning-events-event-img" :src="item.img" alt="">
<div class="warning-events-event" v-for="(item, index) in event">
<img class="warning-events-event-img" :src="item.img" alt="" />
<!-- :style="{color:item.color}" -->
<div class="warning-events-event-text">{{ item.text }}</div>
</div>
</div>
<div id="newmap" v-loading="mapLoading"></div>
<event-audit :title="urgencyTitle" ref="eventAudit" :auditStatus="auditStatus" @closeDialog="mountedMethods"></event-audit>
<urgency-audit :title="urgencyTitle" ref="urgencyAudit" :auditStatus="auditStatus" @closeDialog="mountedMethods"></urgency-audit>
<event-audit
:title="urgencyTitle"
ref="eventAudit"
:auditStatus="auditStatus"
@closeDialog="mountedMethods"
></event-audit>
<urgency-audit
:title="urgencyTitle"
ref="urgencyAudit"
:auditStatus="auditStatus"
@closeDialog="mountedMethods"
></urgency-audit>
</div>
</template>
<script>
import L from "leaflet";
import 'leaflet.markercluster';
import "leaflet.markercluster/dist/MarkerCluster.css"
import "leaflet.markercluster";
import "leaflet.markercluster/dist/MarkerCluster.css";
import "proj4";
import "proj4leaflet";
import "@/utils/lib/leaflet.ChineseTmsProviders.js";
import "@/utils/lib/leaflet.mapCorrection.min.js";
import { new100Page, colonyPage, login, verify, verificationCode } from "@/api/eventPage"
import { setToken } from '@/utils/auth'
import { encrypt } from '@/utils/jsencrypt'
import urgencyAudit from '@/views/components/urgencyAudit.vue'
import EventAudit from '@/views/components/eventAudit.vue'
import {
new100Page,
colonyPage,
login,
verify,
verificationCode,
} from "@/api/eventPage";
import { setToken } from "@/utils/auth";
import { encrypt } from "@/utils/jsencrypt";
import urgencyAudit from "@/views/components/urgencyAudit.vue";
import EventAudit from "@/views/components/eventAudit.vue";
export default {
components:{
components: {
EventAudit,
urgencyAudit
urgencyAudit,
},
data() {
return {
input:"",
event:[
input: "",
event: [
{
img: require('../../assets/images/icon-qtsj-1@2x.png'),
text:"群体事件",
color:"#d9001b"
img: require("../../assets/images/icon-qtsj-1@2x.png"),
text: "群体事件",
color: "#d9001b",
},
{
img: require('../../assets/images/icon-jjsj-1@2x.png'),
text:"紧急事件",
color:"#f59a23"
img: require("../../assets/images/icon-jjsj-1@2x.png"),
text: "紧急事件",
color: "#f59a23",
},
{
img: require('../../assets/images/icon-yrds-1@2x.png'),
text:"一人多诉",
color:"#d22379"
img: require("../../assets/images/icon-yrds-1@2x.png"),
text: "一人多诉",
color: "#d22379",
},
{
img: require('../../assets/images/icon-trts-1@2x.png'),
text:"同人同诉",
color:"#2aa515"
img: require("../../assets/images/icon-trts-1@2x.png"),
text: "同人同诉",
color: "#2aa515",
},
{
img: require('../../assets/images/icon-zdry-1@2x.png'),
text:"重点人员",
color:"#8400ff"
img: require("../../assets/images/icon-zdry-1@2x.png"),
text: "重点人员",
color: "#8400ff",
},
],
queryParams:{
queryParams: {
current: 1,
size: 10,
title:"",
title: "",
isReport: 6,
},
total: 0,
eventList:[],
map:null,
basemap:null,
eventList: [],
map: null,
basemap: null,
layerVectorLabel: null,
loading:false,
mapLoading:false,
loading: false,
mapLoading: false,
mapLayers: {
mapLayer1: null,
mapLayer2: null,
@ -146,79 +200,88 @@ export default {
mapLayer5: null,
},
auditStatus: 1,
urgencyTitle:'事件详情',
}
urgencyTitle: "事件详情",
};
},
mounted() {
// const currentDate = new Date();
// const targetDate = new Date(2024, 10, 1, 0, 0, 0);
// 使
verify().then(res=>{
if(!res.data) {
this.$prompt('<div>算法已有3个月未迭代请联系算法人员进行迭代优化。</div><div class="warningText">正式使用码签约合同有效期2年有效期至2026年11月1日</div>', '提示', {
confirmButtonText: '确定',
type:"warning",
closeOnPressEscape:false,
showCancelButton: false,
closeOnClickModal:false,
dangerouslyUseHTMLString:true,
showInput:true,
showClose:false,
beforeClose:(action, instance, done)=>{
if (action === 'confirm') {
if(instance.inputValue == "88888888") {
done();
} else {
this.$message.error('试用码错误!');
}
if (JSON.parse(process.env.VUE_APP_ISTEST)) {
verify().then((res) => {
if (!res.data) {
this.$prompt(
'<div>算法已有3个月未迭代请联系算法人员进行迭代优化。</div><div class="warningText">正式使用码签约合同有效期2年有效期至2026年11月1日</div>',
"提示",
{
confirmButtonText: "确定",
type: "warning",
closeOnPressEscape: false,
showCancelButton: false,
closeOnClickModal: false,
dangerouslyUseHTMLString: true,
showInput: true,
showClose: false,
beforeClose: (action, instance, done) => {
if (action === "confirm") {
if (instance.inputValue == "88888888") {
done();
} else {
this.$message.error("试用码错误!");
}
}
},
}
}
}).then(({ value }) => {
verificationCode({verificationCode:value}).then(res=>{
login("admin",encrypt("Suanfa@2024//**...")).then(res=>{
localStorage.setItem('Admin-Token',res.token)
// setToken(res.token)
this.$nextTick(() => {
this.initMap();
).then(({ value }) => {
verificationCode({ verificationCode: value }).then((res) => {
login("admin", encrypt("Suanfa@2024//**...")).then((res) => {
localStorage.setItem("Admin-Token", res.token);
// setToken(res.token)
this.$nextTick(() => {
this.initMap();
});
this.getList();
});
this.getList();
})
})
});
} else {
login("admin",encrypt("Suanfa@2024//**...")).then(res=>{
localStorage.setItem('Admin-Token',res.token)
this.$nextTick(() => {
this.initMap();
});
});
this.getList();
})
}
})
// 使
// this.$nextTick(() => {
// this.initMap();
// });
// this.getList();
} else {
login("admin", encrypt("Suanfa@2024//**...")).then((res) => {
localStorage.setItem("Admin-Token", res.token);
this.$nextTick(() => {
this.initMap();
});
this.getList();
});
}
});
} else {
// 使
this.$nextTick(() => {
this.initMap();
});
this.getList();
}
},
methods:{
mountedMethods(){
methods: {
mountedMethods() {
this.$nextTick(() => {
this.initMap();
});
this.getList();
},
getList(){
getList() {
this.loading = true;
colonyPage(this.queryParams).then(res=>{
this.eventList = res.data.records;
this.total = res.data.total;
this.loading = false;
}).catch(err=>{
this.loading = false;
})
colonyPage(this.queryParams)
.then((res) => {
this.eventList = res.data.records;
this.total = res.data.total;
this.loading = false;
})
.catch((err) => {
this.loading = false;
});
},
initMap(){
initMap() {
this.map = L.map("newmap", {
// crs: L.CRS.Baidu,
center: [31.324624, 120.582904],
@ -278,106 +341,94 @@ export default {
this.getPosition();
},
getPosition(){
getPosition() {
this.mapLoading = true;
new100Page().then(res=>{
let iconUrl1 = require("@/assets/images/icon1.png");
let iconUrl2 = require("@/assets/images/icon2.png");
let iconUrl3 = require("@/assets/images/icon3.png");
let iconUrl4 = require("@/assets/images/icon4.png");
let iconUrl5 = require("@/assets/images/icon5.png");
var myIcon1 = L.icon({
iconUrl: iconUrl1,
iconSize: [38, 50], //
iconAnchor: [19, 29], // "tip" 使CSS
popupAnchor: [-3, -76], // popup
});
var myIcon2 = L.icon({
iconUrl: iconUrl2,
iconSize: [38, 50], //
iconAnchor: [19, 29], // "tip" 使CSS
popupAnchor: [-3, -76], // popup
});
var myIcon3 = L.icon({
iconUrl: iconUrl3,
iconSize: [38, 50], //
iconAnchor: [19, 29], // "tip" 使CSS
popupAnchor: [-3, -76], // popup
});
var myIcon4 = L.icon({
iconUrl: iconUrl4,
iconSize: [38, 50], //
iconAnchor: [19, 29], // "tip" 使CSS
popupAnchor: [-3, -76], // popup
});
var myIcon5 = L.icon({
iconUrl: iconUrl5,
iconSize: [38, 50], //
iconAnchor: [19, 29], // "tip" 使CSS
popupAnchor: [-3, -76], // popup
});
let arr = [...res.data]
arr.map((item,index)=>{
// 12345
if(item.msgType == '1') {
let lat = item.caseLnglat.split(",")[1];
let lon = item.caseLnglat.split(",")[0];
let marker = L.marker(
L.latLng(lat, lon),
{ icon: myIcon1 }
)
this.mapLayers.mapLayer1.addLayer(marker);
this.markerClick(marker, index, item);
} else if(item.msgType == '3'){
let lat = item.caseLnglat.split(",")[1];
let lon = item.caseLnglat.split(",")[0];
let marker = L.marker(
L.latLng(lat, lon),
{ icon: myIcon2 }
)
this.mapLayers.mapLayer2.addLayer(marker);
this.markerClick(marker, index, item);
} else if(item.msgType == '5'){
let lat = item.caseLnglat.split(",")[1];
let lon = item.caseLnglat.split(",")[0];
let marker = L.marker(
L.latLng(lat, lon),
{ icon: myIcon3 }
)
this.mapLayers.mapLayer3.addLayer(marker);
this.markerClick(marker, index, item);
} else if(item.msgType == '2'){
let lat = item.caseLnglat.split(",")[1];
let lon = item.caseLnglat.split(",")[0];
let marker = L.marker(
L.latLng(lat, lon),
{ icon: myIcon4 }
)
this.mapLayers.mapLayer4.addLayer(marker);
this.markerClick(marker, index, item);
} else if(item.msgType == '4'){
let lat = item.caseLnglat.split(",")[1];
let lon = item.caseLnglat.split(",")[0];
let marker = L.marker(
L.latLng(lat, lon),
{ icon: myIcon5 }
)
this.mapLayers.mapLayer5.addLayer(marker);
this.markerClick(marker, index, item);
}
new100Page()
.then((res) => {
let iconUrl1 = require("@/assets/images/icon1.png");
let iconUrl2 = require("@/assets/images/icon2.png");
let iconUrl3 = require("@/assets/images/icon3.png");
let iconUrl4 = require("@/assets/images/icon4.png");
let iconUrl5 = require("@/assets/images/icon5.png");
var myIcon1 = L.icon({
iconUrl: iconUrl1,
iconSize: [38, 50], //
iconAnchor: [19, 29], // "tip" 使CSS
popupAnchor: [-3, -76], // popup
});
var myIcon2 = L.icon({
iconUrl: iconUrl2,
iconSize: [38, 50], //
iconAnchor: [19, 29], // "tip" 使CSS
popupAnchor: [-3, -76], // popup
});
var myIcon3 = L.icon({
iconUrl: iconUrl3,
iconSize: [38, 50], //
iconAnchor: [19, 29], // "tip" 使CSS
popupAnchor: [-3, -76], // popup
});
var myIcon4 = L.icon({
iconUrl: iconUrl4,
iconSize: [38, 50], //
iconAnchor: [19, 29], // "tip" 使CSS
popupAnchor: [-3, -76], // popup
});
var myIcon5 = L.icon({
iconUrl: iconUrl5,
iconSize: [38, 50], //
iconAnchor: [19, 29], // "tip" 使CSS
popupAnchor: [-3, -76], // popup
});
let arr = [...res.data];
arr.map((item, index) => {
// 12345
if (item.msgType == "1") {
let lat = item.caseLnglat.split(",")[1];
let lon = item.caseLnglat.split(",")[0];
let marker = L.marker(L.latLng(lat, lon), { icon: myIcon1 });
this.mapLayers.mapLayer1.addLayer(marker);
this.markerClick(marker, index, item);
} else if (item.msgType == "3") {
let lat = item.caseLnglat.split(",")[1];
let lon = item.caseLnglat.split(",")[0];
let marker = L.marker(L.latLng(lat, lon), { icon: myIcon2 });
this.mapLayers.mapLayer2.addLayer(marker);
this.markerClick(marker, index, item);
} else if (item.msgType == "5") {
let lat = item.caseLnglat.split(",")[1];
let lon = item.caseLnglat.split(",")[0];
let marker = L.marker(L.latLng(lat, lon), { icon: myIcon3 });
this.mapLayers.mapLayer3.addLayer(marker);
this.markerClick(marker, index, item);
} else if (item.msgType == "2") {
let lat = item.caseLnglat.split(",")[1];
let lon = item.caseLnglat.split(",")[0];
let marker = L.marker(L.latLng(lat, lon), { icon: myIcon4 });
this.mapLayers.mapLayer4.addLayer(marker);
this.markerClick(marker, index, item);
} else if (item.msgType == "4") {
let lat = item.caseLnglat.split(",")[1];
let lon = item.caseLnglat.split(",")[0];
let marker = L.marker(L.latLng(lat, lon), { icon: myIcon5 });
this.mapLayers.mapLayer5.addLayer(marker);
this.markerClick(marker, index, item);
}
});
this.mapLoading = false;
})
this.mapLoading = false;
}).catch(err=>{
this.mapLoading = false;
})
.catch((err) => {
this.mapLoading = false;
});
},
markerClick(marker, index, item){
markerClick(marker, index, item) {
const that = this;
marker.on("click", (e) => {
//
marker.unbindPopup();
marker.bindPopup(
`<div class="markerDialog">
marker
.bindPopup(
`<div class="markerDialog">
<div class="markerTitle">
<span class="marker-msgTitle">${item.title}</span>
<i class="el-icon-close markerClose" id="markerClose${index}"></i>
@ -387,84 +438,103 @@ export default {
<div class="infoLabel">
<div class="labelBox">预警时间</div>
<span></span>
</div>
<div class="infoValue">${item.firstWarnTimeDate}</div>
</div>
<div class="infoValue">${item.firstWarnTimeDate}</div>
</div>
<div class="contentInfo">
<div class="infoLabel">
<div class="labelBox">预警类别</div>
<span></span>
<span></span>
</div>
<div class="infoValue">${item.msgType == '1' ? "群体事件" : item.msgType == '2' ? "同人同诉" : item.msgType == '3' ? "紧急事件" : item.msgType == '4' ? "重点人员" : item.msgType == '5' ? "一人多诉" : ""}</div>
<div class="infoValue">${
item.msgType == "1"
? "群体事件"
: item.msgType == "2"
? "同人同诉"
: item.msgType == "3"
? "紧急事件"
: item.msgType == "4"
? "重点人员"
: item.msgType == "5"
? "一人多诉"
: ""
}</div>
</div>
<div class="contentInfo">
<div class="infoLabel">
<div class="labelBox"> </div>
<span></span>
</div>
<span></span>
</div>
<div class="infoValue">${item.address}</div>
</div>
<div class="contentInfo">
<div class="infoLabel">
<div class="labelBox">事件数量</div>
<span></span>
</div>
<span></span>
</div>
<div class="infoValue"><span>${item.nums}</span></div>
</div>
</div>
<div class="markerBtns">
<div class="btn-audit" id="markerAudit${index}">审核</div>
<div class="btn-detailInfo" id="markerInfo${index}">查看详情</div>
<div class="btn-audit" id="markerAudit${index}">审核</div>
<div class="btn-detailInfo" id="markerInfo${index}">查看详情</div>
</div>
</div>`,
{
className: "marsk-box",
offset: L.point(0,75)
}
).openPopup();
{
className: "marsk-box",
offset: L.point(0, 75),
}
)
.openPopup();
//ElementsById()elementaddEventListener()
document.querySelector(`#markerClose` + index).addEventListener("click", function () {
marker.closePopup();
});
document
.querySelector(`#markerClose` + index)
.addEventListener("click", function () {
marker.closePopup();
});
//
document.querySelector(`#markerAudit` + index).addEventListener("click", function () {
that.urgencyTitle = "事件审核"
that.auditStatus = 1;
if(item.msgType == '3') {
that.$refs.urgencyAudit.open(item);
} else {
that.$refs.eventAudit.open(item);
}
});
document
.querySelector(`#markerAudit` + index)
.addEventListener("click", function () {
that.urgencyTitle = "事件审核";
that.auditStatus = 1;
if (item.msgType == "3") {
that.$refs.urgencyAudit.open(item);
} else {
that.$refs.eventAudit.open(item);
}
});
//
document.querySelector(`#markerInfo` + index).addEventListener("click", function () {
that.urgencyTitle = "事件详情"
if(item.msgType == '3') {
that.auditStatus = 2;
that.$refs.urgencyAudit.open(item);
} else {
that.auditStatus = 2;
that.$refs.eventAudit.open(item);
}
});
})
document
.querySelector(`#markerInfo` + index)
.addEventListener("click", function () {
that.urgencyTitle = "事件详情";
if (item.msgType == "3") {
that.auditStatus = 2;
that.$refs.urgencyAudit.open(item);
} else {
that.auditStatus = 2;
that.$refs.eventAudit.open(item);
}
});
});
},
//
query(){
query() {
this.queryParams.current = 1;
this.queryParams.size = 10;
this.getList();
},
handleIconClick(){
this.queryParams.title = ''
handleIconClick() {
this.queryParams.title = "";
this.queryParams.current = 1;
this.queryParams.size = 10;
this.getList();
},
//
audit(item){
this.urgencyTitle = "事件审核"
if(item.msgType == '3') {
audit(item) {
this.urgencyTitle = "事件审核";
if (item.msgType == "3") {
this.auditStatus = 1;
this.$refs.urgencyAudit.open(item);
} else {
@ -473,13 +543,11 @@ export default {
}
},
//
auditPass(){
},
auditPass() {},
//
detailInfo(item){
this.urgencyTitle = "事件详情"
if(item.msgType == '3') {
detailInfo(item) {
this.urgencyTitle = "事件详情";
if (item.msgType == "3") {
this.auditStatus = 2;
this.$refs.urgencyAudit.open(item);
} else {
@ -488,5 +556,5 @@ export default {
}
},
},
}
};
</script>

@ -3,7 +3,9 @@
<div class="L-ultimately-container">
<header>
驾驶舱重点人员事件
<span class="title-span">解释重点人员发生投诉的情况规则7天内同一人发生超过7次的只分析五失人员关注人员名单根据人员手机号匹配当天同一个人合并一条如果当天再发生不再推送新事件第二天再发生再推送新事件</span>
<span class="title-span"
>解释重点人员发生投诉的情况规则7天内同一人发生超过7次的只分析五失人员关注人员名单根据人员手机号匹配当天同一个人合并一条如果当天再发生不再推送新事件第二天再发生再推送新事件</span
>
</header>
<div class="tabs">
<el-tabs
@ -19,9 +21,17 @@
</div>
<div class="container-info" id="L-size-main">
<header id="L-header">
<el-form :inline="true" :model="formInline" size="small" class="demo-form-inline">
<el-form
:inline="true"
:model="formInline"
size="small"
class="demo-form-inline"
>
<el-form-item label="事件标题:">
<el-input v-model="formInline.title" placeholder="请输入"></el-input>
<el-input
v-model="formInline.title"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="预警时间:">
<!-- <el-date-picker
@ -43,135 +53,195 @@
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button size="mini" @click="resetQuery('queryFrom')"></el-button>
<el-button size="mini" type="primary" @click="handleQuery('queryFrom')"></el-button>
<el-button size="mini" @click="resetQuery('queryFrom')"
>重置</el-button
>
<el-button
size="mini"
type="primary"
@click="handleQuery('queryFrom')"
>查询</el-button
>
</el-form-item>
</el-form>
</header>
<section>
<!-- :height="tabHeader" -->
<el-table v-loading="loading" :data="tableData" :height="tabHeader">
<el-table-column type="index" label="序号" width="100px" class-name="table-operation" align="center"/>
<el-table-column label="事件标题" key="title" width="400px" prop="title" />
<el-table-column label="预警时间" key="firstWarnTimeDate" width="300px" prop="firstWarnTimeDate" />
<el-table-column label="预警因素" key="warnFactor" width="400px" prop="warnFactor" />
<el-table-column label="事件数量" key="nums" width="100px" prop="nums" align="center">
<el-table-column
type="index"
label="序号"
width="100px"
class-name="table-operation"
align="center"
/>
<el-table-column
label="事件标题"
key="title"
width="400px"
prop="title"
/>
<el-table-column
label="预警时间"
key="firstWarnTimeDate"
width="300px"
prop="firstWarnTimeDate"
/>
<el-table-column
label="预警因素"
key="warnFactor"
width="400px"
prop="warnFactor"
/>
<el-table-column
label="事件数量"
key="nums"
width="100px"
prop="nums"
align="center"
>
<template slot-scope="scope">
<div style="text-align: center;">{{ scope.row.nums }}</div>
<div style="text-align: center">{{ scope.row.nums }}</div>
</template>
</el-table-column>
<el-table-column label="操作" class-name="table-operation-anniu" align="center">
<el-table-column
label="操作"
class-name="table-operation-anniu"
align="center"
>
<template slot-scope="scope">
<div @click="audit(scope.row)" class="go-audit" v-if="activeName == 'first'">
<img src="@/assets/images/audit.png" alt="">
<div
@click="audit(scope.row)"
class="go-audit"
v-if="activeName == 'first'"
>
<img src="@/assets/images/audit.png" alt="" />
<span>审核</span>
</div>
<el-button v-else @click="audit(scope.row)" type="text" style="margin-right: 5px;" class="sqbtn sqbtn1">
<el-button
v-else
@click="audit(scope.row)"
type="text"
style="margin-right: 5px"
class="sqbtn sqbtn1"
>
查看详情
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
<pagination
id="L-pagination"
:total="total"
:page="pagination.current"
:limit="pagination.size"
layout="total, prev, pager, next, jumper"
@pagination="getPagination"
:current-page.sync="pagination.current"
:current-page.sync="pagination.current"
></pagination>
</section>
</div>
<event-audit title="事件审核" ref="eventAudit" :auditStatus="auditStatus" @closeDialog="getList"></event-audit>
<event-audit
title="事件审核"
ref="eventAudit"
:auditStatus="auditStatus"
@closeDialog="getList"
></event-audit>
</div>
</template>
<script>
import { colonyPage, login, verify, verificationCode } from "@/api/eventPage"
import { setToken } from '@/utils/auth'
import { encrypt } from '@/utils/jsencrypt'
import EventAudit from '@/views/components/eventAudit.vue'
import { colonyPage, login, verify, verificationCode } from "@/api/eventPage";
import { setToken } from "@/utils/auth";
import { encrypt } from "@/utils/jsencrypt";
import EventAudit from "@/views/components/eventAudit.vue";
export default {
components:{
components: {
EventAudit,
},
data() {
return {
activeName: "first",
active: 0,
formInline:{
title:"",
time:[],
formInline: {
title: "",
time: [],
},
loading: false,
tableData: [],
tabHeader: null,
total:0,
total: 0,
pagination: {
current: 1,
size: 10,
msgType: '4',
isReport:null,
msgType: "4",
isReport: null,
},
auditStatus: 1,
}
};
},
mounted(){
mounted() {
// const currentDate = new Date();
// const targetDate = new Date(2024, 10, 1, 0, 0, 0);
// 使
verify().then(res=>{
if(!res.data) {
this.$prompt('<div>算法已有3个月未迭代请联系算法人员进行迭代优化。</div><div class="warningText">正式使用码签约合同有效期2年有效期至2026年11月1日</div>', '提示', {
confirmButtonText: '确定',
type:"warning",
closeOnPressEscape:false,
showCancelButton: false,
closeOnClickModal:false,
dangerouslyUseHTMLString:true,
showInput:true,
showClose:false,
beforeClose:(action, instance, done)=>{
if (action === 'confirm') {
if(instance.inputValue == "88888888") {
done();
} else {
this.$message.error('试用码错误!');
}
if (JSON.parse(process.env.VUE_APP_ISTEST)) {
// 使
verify().then((res) => {
if (!res.data) {
this.$prompt(
'<div>算法已有3个月未迭代请联系算法人员进行迭代优化。</div><div class="warningText">正式使用码签约合同有效期2年有效期至2026年11月1日</div>',
"提示",
{
confirmButtonText: "确定",
type: "warning",
closeOnPressEscape: false,
showCancelButton: false,
closeOnClickModal: false,
dangerouslyUseHTMLString: true,
showInput: true,
showClose: false,
beforeClose: (action, instance, done) => {
if (action === "confirm") {
if (instance.inputValue == "88888888") {
done();
} else {
this.$message.error("试用码错误!");
}
}
},
}
}
}).then(({ value }) => {
verificationCode({verificationCode:value}).then(res=>{
login("admin",encrypt("Suanfa@2024//**...")).then(res=>{
// setToken(res.token)
localStorage.setItem('Admin-Token',res.token)
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
})
})
})
} else {
login("admin",encrypt("Suanfa@2024//**...")).then(res=>{
// setToken(res.token)
localStorage.setItem('Admin-Token',res.token)
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
})
}
})
// 使
// this.getList();
// this.cancalDebounce();
// window.addEventListener('resize', this.cancalDebounce);
).then(({ value }) => {
verificationCode({ verificationCode: value }).then((res) => {
login("admin", encrypt("Suanfa@2024//**...")).then((res) => {
// setToken(res.token)
localStorage.setItem("Admin-Token", res.token);
this.getList();
this.cancalDebounce();
window.addEventListener("resize", this.cancalDebounce);
});
});
});
} else {
login("admin", encrypt("Suanfa@2024//**...")).then((res) => {
// setToken(res.token)
localStorage.setItem("Admin-Token", res.token);
this.getList();
this.cancalDebounce();
window.addEventListener("resize", this.cancalDebounce);
});
}
});
} else {
// 使
this.getList();
this.cancalDebounce();
window.addEventListener("resize", this.cancalDebounce);
}
},
destroyed() {
window.removeEventListener('resize', this.cancalDebounce);
window.removeEventListener("resize", this.cancalDebounce);
},
methods:{
methods: {
handleClick(e) {
if (this.activeName == "first") {
this.pagination.isReport = 4;
@ -183,7 +253,7 @@ export default {
this.auditStatus = 1;
this.getList();
} else if (this.activeName == "second") {
this.pagination.isReport = 1
this.pagination.isReport = 1;
this.pagination.startTime = "";
this.pagination.endTime = "";
this.pagination.title = "";
@ -192,7 +262,7 @@ export default {
this.auditStatus = 2;
this.getList();
} else if (this.activeName == "third") {
this.pagination.isReport = 2
this.pagination.isReport = 2;
this.pagination.startTime = "";
this.pagination.endTime = "";
this.pagination.title = "";
@ -200,8 +270,8 @@ export default {
this.formInline.time = [];
this.auditStatus = 2;
this.getList();
} else if(this.activeName == "four") {
this.pagination.isReport = 3
} else if (this.activeName == "four") {
this.pagination.isReport = 3;
this.pagination.startTime = "";
this.pagination.endTime = "";
this.pagination.title = "";
@ -217,55 +287,62 @@ export default {
this.pagination.size = pages.limit;
this.getList();
},
getList(){
getList() {
this.loading = true;
colonyPage(this.pagination).then(res=>{
this.tableData = res.data.records
this.total = res.data.total
this.loading = false;
}).catch(err=>{
this.tableData = [];
this.loading = false;
})
colonyPage(this.pagination)
.then((res) => {
this.tableData = res.data.records;
this.total = res.data.total;
this.loading = false;
})
.catch((err) => {
this.tableData = [];
this.loading = false;
});
},
resetQuery(){
resetQuery() {
this.formInline = {
title:"",
time:[],
}
title: "",
time: [],
};
this.pagination = {
current: 1,
size: 10,
msgType: '4',
isReport: this.activeName == "first" ? null : this.activeName == "second" ? 1 : this.activeName == "third" ? 2 : null,
}
msgType: "4",
isReport:
this.activeName == "first"
? null
: this.activeName == "second"
? 1
: this.activeName == "third"
? 2
: null,
};
this.getList();
},
//
handleQuery(){
if(this.formInline.time.length > 0) {
this.formInline.startTime = this.formInline.time[0]
this.formInline.endTime = this.formInline.time[1]
handleQuery() {
if (this.formInline.time.length > 0) {
this.formInline.startTime = this.formInline.time[0];
this.formInline.endTime = this.formInline.time[1];
}
this.pagination = {...this.pagination,...this.formInline}
this.pagination = { ...this.pagination, ...this.formInline };
this.getList();
},
audit(item){
audit(item) {
this.$refs.eventAudit.open(item);
},
//
cancalDebounce(){
const element = document.getElementById('L-size-main'); // ID
const header = document.getElementById('L-header'); // ID
const pagination = document.getElementById('L-pagination'); // ID
cancalDebounce() {
const element = document.getElementById("L-size-main"); // ID
const header = document.getElementById("L-header"); // ID
const pagination = document.getElementById("L-pagination"); // ID
const elementHeight = element.offsetHeight;
const headerHeight = header.offsetHeight;
const paginationtHeight = pagination.offsetHeight;
this.tabHeader = elementHeight - headerHeight - paginationtHeight;
}
},
},
}
};
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

@ -3,7 +3,9 @@
<div class="L-ultimately-container">
<header>
驾驶舱群体事件
<span class="title-span">解释同地点同一件事发生多起规则3天内同地点同一件事发生超过10次的如果超过30天则创建新事件如果当天再发生不再推送新事件第二天再发生再推送新事件</span>
<span class="title-span"
>解释同地点同一件事发生多起规则3天内同地点同一件事发生超过10次的如果超过30天则创建新事件如果当天再发生不再推送新事件第二天再发生再推送新事件</span
>
</header>
<div class="tabs">
<el-tabs
@ -19,9 +21,17 @@
</div>
<div class="container-info" id="L-size-main">
<header id="L-header">
<el-form :inline="true" :model="formInline" size="small" class="demo-form-inline">
<el-form
:inline="true"
:model="formInline"
size="small"
class="demo-form-inline"
>
<el-form-item label="事件标题:">
<el-input v-model="formInline.title" placeholder="请输入"></el-input>
<el-input
v-model="formInline.title"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="预警时间:">
<!-- <el-date-picker
@ -43,137 +53,202 @@
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button size="mini" @click="resetQuery('queryFrom')"></el-button>
<el-button size="mini" type="primary" @click="handleQuery('queryFrom')"></el-button>
<el-button size="mini" @click="resetQuery('queryFrom')"
>重置</el-button
>
<el-button
size="mini"
type="primary"
@click="handleQuery('queryFrom')"
>查询</el-button
>
</el-form-item>
</el-form>
</header>
<section>
<!-- :height="tabHeader" -->
<el-table v-loading="loading" :data="tableData" :height="tabHeader">
<el-table-column type="index" label="序号" width="100px" class-name="table-operation" align="center"/>
<el-table-column label="事件标题" key="title" width="300px" prop="title" />
<el-table-column label="预警时间" key="firstWarnTimeDate" width="200px" prop="firstWarnTimeDate" />
<el-table-column label="高发时间" key="gfTime" width="200px" prop="gfTime" />
<el-table-column label="预警因素" key="warnFactor" width="300px" prop="warnFactor" />
<el-table-column label="事件数量" key="nums" width="100px" prop="nums" align="center">
<el-table-column
type="index"
label="序号"
width="100px"
class-name="table-operation"
align="center"
/>
<el-table-column
label="事件标题"
key="title"
width="300px"
prop="title"
/>
<el-table-column
label="预警时间"
key="firstWarnTimeDate"
width="200px"
prop="firstWarnTimeDate"
/>
<el-table-column
label="高发时间"
key="gfTime"
width="200px"
prop="gfTime"
/>
<el-table-column
label="预警因素"
key="warnFactor"
width="300px"
prop="warnFactor"
/>
<el-table-column
label="事件数量"
key="nums"
width="100px"
prop="nums"
align="center"
>
<template slot-scope="scope">
<div style="text-align: center;">{{ scope.row.nums }}</div>
<div style="text-align: center">{{ scope.row.nums }}</div>
</template>
</el-table-column>
<el-table-column label="操作" class-name="table-operation-anniu" align="center">
<el-table-column
label="操作"
class-name="table-operation-anniu"
align="center"
>
<template slot-scope="scope">
<div @click="audit(scope.row)" class="go-audit" v-if="activeName == 'first'">
<img src="@/assets/images/audit.png" alt="">
<div
@click="audit(scope.row)"
class="go-audit"
v-if="activeName == 'first'"
>
<img src="@/assets/images/audit.png" alt="" />
<span>审核</span>
</div>
<el-button v-else @click="audit(scope.row)" type="text" style="margin-right: 5px;" class="sqbtn sqbtn1">
<el-button
v-else
@click="audit(scope.row)"
type="text"
style="margin-right: 5px"
class="sqbtn sqbtn1"
>
查看详情
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
<pagination
id="L-pagination"
:total="total"
:page="pagination.current"
:limit="pagination.size"
layout="total, prev, pager, next, jumper"
@pagination="getPagination"
:current-page.sync="pagination.current"
:current-page.sync="pagination.current"
></pagination>
</section>
</div>
<event-audit title="事件审核" ref="eventAudit" :auditStatus="auditStatus" @closeDialog="getList"></event-audit>
<event-audit
title="事件审核"
ref="eventAudit"
:auditStatus="auditStatus"
@closeDialog="getList"
></event-audit>
</div>
</template>
<script>
import { colonyPage, login, verify, verificationCode } from "@/api/eventPage"
import { setToken } from '@/utils/auth'
import { encrypt } from '@/utils/jsencrypt'
import EventAudit from '@/views/components/eventAudit.vue'
import { colonyPage, login, verify, verificationCode } from "@/api/eventPage";
import { setToken } from "@/utils/auth";
import { encrypt } from "@/utils/jsencrypt";
import EventAudit from "@/views/components/eventAudit.vue";
export default {
components:{
components: {
EventAudit,
},
data() {
return {
activeName: "first",
active: 0,
formInline:{
title:"",
time:[],
formInline: {
title: "",
time: [],
},
loading: false,
tableData: [],
tabHeader: null,
total:0,
total: 0,
pagination: {
current: 1,
size: 10,
msgType: '1',
isReport:null,
msgType: "1",
isReport: null,
},
auditStatus: 1,
}
};
},
mounted(){
mounted() {
// const currentDate = new Date();
// const targetDate = new Date(2024, 10, 1, 0, 0, 0);
// if(currentDate >= targetDate) {
// 使
verify().then(res=>{
if(!res.data) {
this.$prompt('<div>算法已有3个月未迭代请联系算法人员进行迭代优化。</div><div class="warningText">正式使用码签约合同有效期2年有效期至2026年11月1日</div>', '提示', {
confirmButtonText: '确定',
type:"warning",
closeOnPressEscape:false,
showCancelButton: false,
closeOnClickModal:false,
dangerouslyUseHTMLString:true,
showInput:true,
showClose:false,
beforeClose:(action, instance, done)=>{
if (action === 'confirm') {
if(instance.inputValue == "88888888") {
done();
} else {
this.$message.error('试用码错误!');
}
if (JSON.parse(process.env.VUE_APP_ISTEST)) {
// 使
verify().then((res) => {
if (!res.data) {
this.$prompt(
'<div>算法已有3个月未迭代请联系算法人员进行迭代优化。</div><div class="warningText">正式使用码签约合同有效期2年有效期至2026年11月1日</div>',
"提示",
{
confirmButtonText: "确定",
type: "warning",
closeOnPressEscape: false,
showCancelButton: false,
closeOnClickModal: false,
dangerouslyUseHTMLString: true,
showInput: true,
showClose: false,
beforeClose: (action, instance, done) => {
if (action === "confirm") {
if (instance.inputValue == "88888888") {
done();
} else {
this.$message.error("试用码错误!");
}
}
},
}
}
}).then(({ value }) => {
verificationCode({verificationCode:value}).then(res=>{
login("admin",encrypt("Suanfa@2024//**...")).then(res=>{
// setToken(res.token)
localStorage.setItem('Admin-Token',res.token)
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
})
})
})
} else {
login("admin",encrypt("Suanfa@2024//**...")).then(res=>{
// setToken(res.token)
localStorage.setItem('Admin-Token',res.token)
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
})
}
})
// 使
// this.getList();
// this.cancalDebounce();
// window.addEventListener('resize', this.cancalDebounce);
).then(({ value }) => {
verificationCode({ verificationCode: value }).then((res) => {
login("admin", encrypt("Suanfa@2024//**...")).then((res) => {
// setToken(res.token)
localStorage.setItem("Admin-Token", res.token);
this.getList();
this.cancalDebounce();
window.addEventListener("resize", this.cancalDebounce);
});
});
});
} else {
login("admin", encrypt("Suanfa@2024//**...")).then((res) => {
// setToken(res.token)
localStorage.setItem("Admin-Token", res.token);
this.getList();
this.cancalDebounce();
window.addEventListener("resize", this.cancalDebounce);
});
}
});
} else {
// 使
this.getList();
this.cancalDebounce();
window.addEventListener("resize", this.cancalDebounce);
}
},
destroyed() {
window.removeEventListener('resize', this.cancalDebounce);
window.removeEventListener("resize", this.cancalDebounce);
},
methods:{
methods: {
// tab
handleClick(e) {
if (this.activeName == "first") {
@ -203,8 +278,8 @@ export default {
this.formInline.time = [];
this.auditStatus = 2;
this.getList();
} else if(this.activeName == "four") {
this.pagination.isReport = 3
} else if (this.activeName == "four") {
this.pagination.isReport = 3;
this.pagination.startTime = "";
this.pagination.endTime = "";
this.pagination.title = "";
@ -220,55 +295,62 @@ export default {
this.pagination.size = pages.limit;
this.getList();
},
getList(){
getList() {
this.loading = true;
colonyPage(this.pagination).then(res=>{
this.tableData = res.data.records
this.total = res.data.total
this.loading = false;
}).catch(err=>{
this.tableData = [];
this.loading = false;
})
colonyPage(this.pagination)
.then((res) => {
this.tableData = res.data.records;
this.total = res.data.total;
this.loading = false;
})
.catch((err) => {
this.tableData = [];
this.loading = false;
});
},
resetQuery(){
resetQuery() {
this.formInline = {
title:"",
time:[],
}
title: "",
time: [],
};
this.pagination = {
current: 1,
size: 10,
msgType: '1',
isReport: this.activeName == "first" ? null : this.activeName == "second" ? 1 : this.activeName == "third" ? 2 : null,
}
msgType: "1",
isReport:
this.activeName == "first"
? null
: this.activeName == "second"
? 1
: this.activeName == "third"
? 2
: null,
};
this.getList();
},
//
handleQuery(){
if(this.formInline.time.length > 0) {
this.formInline.startTime = this.formInline.time[0]
this.formInline.endTime = this.formInline.time[1]
handleQuery() {
if (this.formInline.time.length > 0) {
this.formInline.startTime = this.formInline.time[0];
this.formInline.endTime = this.formInline.time[1];
}
this.pagination = {...this.pagination,...this.formInline}
this.pagination = { ...this.pagination, ...this.formInline };
this.getList();
},
audit(item){
audit(item) {
this.$refs.eventAudit.open(item);
},
//
cancalDebounce(){
const element = document.getElementById('L-size-main'); // ID
const header = document.getElementById('L-header'); // ID
const pagination = document.getElementById('L-pagination'); // ID
cancalDebounce() {
const element = document.getElementById("L-size-main"); // ID
const header = document.getElementById("L-header"); // ID
const pagination = document.getElementById("L-pagination"); // ID
const elementHeight = element.offsetHeight;
const headerHeight = header.offsetHeight;
const paginationtHeight = pagination.offsetHeight;
this.tabHeader = elementHeight - headerHeight - paginationtHeight;
}
},
},
}
};
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

@ -3,7 +3,9 @@
<div class="L-ultimately-container">
<header>
驾驶舱紧急事件
<span class="title-span">解释社会治安类紧急突发事件规则跳楼放火杀人灾害火灾救火打架群架斗殴殴打受伤车祸受伤地震等类型</span>
<span class="title-span"
>解释社会治安类紧急突发事件规则跳楼放火杀人灾害火灾救火打架群架斗殴殴打受伤车祸受伤地震等类型</span
>
</header>
<div class="tabs">
<el-tabs
@ -19,9 +21,17 @@
</div>
<div class="container-info" id="L-size-main">
<header id="L-header">
<el-form :inline="true" :model="formInline" size="small" class="demo-form-inline">
<el-form
:inline="true"
:model="formInline"
size="small"
class="demo-form-inline"
>
<el-form-item label="事件标题:">
<el-input v-model="formInline.title" placeholder="请输入"></el-input>
<el-input
v-model="formInline.title"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="预警时间:">
<!-- <el-date-picker
@ -43,141 +53,201 @@
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button size="mini" @click="resetQuery('queryFrom')"></el-button>
<el-button size="mini" type="primary" @click="handleQuery('queryFrom')"></el-button>
<el-button size="mini" @click="resetQuery('queryFrom')"
>重置</el-button
>
<el-button
size="mini"
type="primary"
@click="handleQuery('queryFrom')"
>查询</el-button
>
</el-form-item>
</el-form>
</header>
<section>
<!-- :height="tabHeader" -->
<el-table v-loading="loading" :data="tableData" :height="tabHeader">
<el-table-column type="index" label="序号" width="100px" class-name="table-operation" align="center"/>
<el-table-column label="事件标题" key="title" width="400px" prop="title" />
<el-table-column label="预警时间" key="firstWarnTimeDate" width="300px" prop="firstWarnTimeDate" />
<el-table-column label="预警因素" key="warnFactor" width="350px" prop="warnFactor" />
<el-table-column label="审核时间" key="auditTime" v-if="activeName !== 'first'" width="180px" prop="auditTime" align="center">
<el-table-column
type="index"
label="序号"
width="100px"
class-name="table-operation"
align="center"
/>
<el-table-column
label="事件标题"
key="title"
width="400px"
prop="title"
/>
<el-table-column
label="预警时间"
key="firstWarnTimeDate"
width="300px"
prop="firstWarnTimeDate"
/>
<el-table-column
label="预警因素"
key="warnFactor"
width="350px"
prop="warnFactor"
/>
<el-table-column
label="审核时间"
key="auditTime"
v-if="activeName !== 'first'"
width="180px"
prop="auditTime"
align="center"
>
<template slot-scope="scope">
<div style="text-align: center;">{{ scope.row.auditTime }}</div>
<div style="text-align: center">{{ scope.row.auditTime }}</div>
</template>
</el-table-column>
<el-table-column label="操作" class-name="table-operation-anniu" align="center">
<el-table-column
label="操作"
class-name="table-operation-anniu"
align="center"
>
<template slot-scope="scope">
<div @click="audit(scope.row)" class="go-audit" v-if="activeName == 'first'">
<img src="@/assets/images/audit.png" alt="">
<div
@click="audit(scope.row)"
class="go-audit"
v-if="activeName == 'first'"
>
<img src="@/assets/images/audit.png" alt="" />
<span>审核</span>
</div>
<el-button v-else @click="audit(scope.row)" type="text" style="margin-right: 5px;" class="sqbtn sqbtn1">
<el-button
v-else
@click="audit(scope.row)"
type="text"
style="margin-right: 5px"
class="sqbtn sqbtn1"
>
查看详情
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
<pagination
id="L-pagination"
:total="total"
:page="pagination.current"
:limit="pagination.size"
layout="total, prev, pager, next, jumper"
@pagination="getPagination"
:current-page.sync="pagination.current"
:current-page.sync="pagination.current"
></pagination>
</section>
</div>
<urgency-audit :title="dialogTitle" ref="urgencyAudit" :auditStatus="auditStatus" @closeDialog="getList"></urgency-audit>
<urgency-audit
:title="dialogTitle"
ref="urgencyAudit"
:auditStatus="auditStatus"
@closeDialog="getList"
></urgency-audit>
</div>
</template>
<script>
import { colonyPage, login, verify, verificationCode } from "@/api/eventPage"
import { setToken } from '@/utils/auth'
import { encrypt } from '@/utils/jsencrypt'
import urgencyAudit from '@/views/components/urgencyAudit.vue'
import { colonyPage, login, verify, verificationCode } from "@/api/eventPage";
import { setToken } from "@/utils/auth";
import { encrypt } from "@/utils/jsencrypt";
import urgencyAudit from "@/views/components/urgencyAudit.vue";
export default {
components:{
components: {
urgencyAudit,
},
data() {
return {
activeName: "first",
active: 0,
formInline:{
title:"",
time:[],
formInline: {
title: "",
time: [],
},
loading: false,
tableData: [],
tabHeader: null,
total:0,
total: 0,
pagination: {
current: 1,
size: 10,
msgType: '3',
isReport:4,
msgType: "3",
isReport: 4,
},
auditStatus: 1,
auditMapStatus: 1,
dialogTitle: "事件审核",
}
};
},
mounted(){
mounted() {
// const currentDate = new Date();
// const targetDate = new Date(2024, 10, 1, 0, 0, 0);
// 使
verify().then(res=>{
if(!res.data) {
this.$prompt('<div>算法已有3个月未迭代请联系算法人员进行迭代优化。</div><div class="warningText">正式使用码签约合同有效期2年有效期至2026年11月1日</div>', '提示', {
confirmButtonText: '确定',
type:"warning",
closeOnPressEscape:false,
showCancelButton: false,
closeOnClickModal:false,
dangerouslyUseHTMLString:true,
showInput:true,
showClose:false,
beforeClose:(action, instance, done)=>{
if (action === 'confirm') {
if(instance.inputValue == "88888888") {
done();
} else {
this.$message.error('试用码错误!');
}
if (JSON.parse(process.env.VUE_APP_ISTEST)) {
// 使
verify().then((res) => {
if (!res.data) {
this.$prompt(
'<div>算法已有3个月未迭代请联系算法人员进行迭代优化。</div><div class="warningText">正式使用码签约合同有效期2年有效期至2026年11月1日</div>',
"提示",
{
confirmButtonText: "确定",
type: "warning",
closeOnPressEscape: false,
showCancelButton: false,
closeOnClickModal: false,
dangerouslyUseHTMLString: true,
showInput: true,
showClose: false,
beforeClose: (action, instance, done) => {
if (action === "confirm") {
if (instance.inputValue == "88888888") {
done();
} else {
this.$message.error("试用码错误!");
}
}
},
}
}
}).then(({ value }) => {
verificationCode({verificationCode:value}).then(res=>{
login("admin",encrypt("Suanfa@2024//**...")).then(res=>{
// setToken(res.token)
localStorage.setItem('Admin-Token',res.token)
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
})
})
})
} else {
login("admin",encrypt("Suanfa@2024//**...")).then(res=>{
// setToken(res.token)
localStorage.setItem('Admin-Token',res.token)
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
})
}
})
// 使
// this.getList();
// this.cancalDebounce();
// window.addEventListener('resize', this.cancalDebounce);
).then(({ value }) => {
verificationCode({ verificationCode: value }).then((res) => {
login("admin", encrypt("Suanfa@2024//**...")).then((res) => {
// setToken(res.token)
localStorage.setItem("Admin-Token", res.token);
this.getList();
this.cancalDebounce();
window.addEventListener("resize", this.cancalDebounce);
});
});
});
} else {
login("admin", encrypt("Suanfa@2024//**...")).then((res) => {
// setToken(res.token)
localStorage.setItem("Admin-Token", res.token);
this.getList();
this.cancalDebounce();
window.addEventListener("resize", this.cancalDebounce);
});
}
});
} else {
// 使
this.getList();
this.cancalDebounce();
window.addEventListener("resize", this.cancalDebounce);
}
},
destroyed() {
window.removeEventListener('resize', this.cancalDebounce);
window.removeEventListener("resize", this.cancalDebounce);
},
methods:{
methods: {
handleClick(e) {
if (this.activeName == "first") {
this.pagination.isReport = 4
this.pagination.isReport = 4;
this.pagination.startTime = "";
this.pagination.endTime = "";
this.pagination.title = "";
@ -188,7 +258,7 @@ export default {
this.dialogTitle = "事件审核";
this.getList();
} else if (this.activeName == "second") {
this.pagination.isReport = 1
this.pagination.isReport = 1;
this.pagination.startTime = "";
this.pagination.endTime = "";
this.pagination.title = "";
@ -196,10 +266,10 @@ export default {
this.formInline.time = [];
this.auditStatus = 2;
this.auditMapStatus = 2;
this.dialogTitle = "事件详情"
this.dialogTitle = "事件详情";
this.getList();
} else if (this.activeName == "third") {
this.pagination.isReport = 2
this.pagination.isReport = 2;
this.pagination.startTime = "";
this.pagination.endTime = "";
this.pagination.title = "";
@ -207,10 +277,10 @@ export default {
this.formInline.time = [];
this.auditStatus = 2;
this.auditMapStatus = 2;
this.dialogTitle = "事件详情"
this.dialogTitle = "事件详情";
this.getList();
} else if(this.activeName == "four") {
this.pagination.isReport = 3
} else if (this.activeName == "four") {
this.pagination.isReport = 3;
this.pagination.startTime = "";
this.pagination.endTime = "";
this.pagination.title = "";
@ -227,55 +297,62 @@ export default {
this.pagination.size = pages.limit;
this.getList();
},
getList(){
getList() {
this.loading = true;
colonyPage(this.pagination).then(res=>{
this.tableData = res.data.records
this.total = res.data.total
this.loading = false;
}).catch(err=>{
this.tableData = [];
this.loading = false;
})
colonyPage(this.pagination)
.then((res) => {
this.tableData = res.data.records;
this.total = res.data.total;
this.loading = false;
})
.catch((err) => {
this.tableData = [];
this.loading = false;
});
},
resetQuery(){
resetQuery() {
this.formInline = {
title:"",
time:[],
}
title: "",
time: [],
};
this.pagination = {
current: 1,
size: 10,
msgType: '3',
isReport: this.activeName == "first" ? 4 : this.activeName == "second" ? 1 : this.activeName == "third" ? 2 : null,
}
msgType: "3",
isReport:
this.activeName == "first"
? 4
: this.activeName == "second"
? 1
: this.activeName == "third"
? 2
: null,
};
this.getList();
},
//
handleQuery(){
if(this.formInline.time.length > 0) {
this.formInline.startTime = this.formInline.time[0]
this.formInline.endTime = this.formInline.time[1]
handleQuery() {
if (this.formInline.time.length > 0) {
this.formInline.startTime = this.formInline.time[0];
this.formInline.endTime = this.formInline.time[1];
}
this.pagination = {...this.pagination,...this.formInline}
this.pagination = { ...this.pagination, ...this.formInline };
this.getList();
},
audit(item){
audit(item) {
this.$refs.urgencyAudit.open(item);
},
//
cancalDebounce(){
const element = document.getElementById('L-size-main'); // ID
const header = document.getElementById('L-header'); // ID
const pagination = document.getElementById('L-pagination'); // ID
cancalDebounce() {
const element = document.getElementById("L-size-main"); // ID
const header = document.getElementById("L-header"); // ID
const pagination = document.getElementById("L-pagination"); // ID
const elementHeight = element.offsetHeight;
const headerHeight = header.offsetHeight;
const paginationtHeight = pagination.offsetHeight;
this.tabHeader = elementHeight - headerHeight - paginationtHeight;
}
},
},
}
};
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

@ -3,7 +3,9 @@
<div class="L-ultimately-container">
<header>
驾驶舱一人多诉事件
<span class="title-span">解释一人多诉的情况关注这个人多次投诉规则15天内同一人发生超过5次的如果超过30天则创建新事件如果当天再发生不再推送新事件第二天再发生再推送新事件</span>
<span class="title-span"
>解释一人多诉的情况关注这个人多次投诉规则15天内同一人发生超过5次的如果超过30天则创建新事件如果当天再发生不再推送新事件第二天再发生再推送新事件</span
>
</header>
<div class="tabs">
<el-tabs
@ -19,9 +21,17 @@
</div>
<div class="container-info" id="L-size-main">
<header id="L-header">
<el-form :inline="true" :model="formInline" size="small" class="demo-form-inline">
<el-form
:inline="true"
:model="formInline"
size="small"
class="demo-form-inline"
>
<el-form-item label="事件标题:">
<el-input v-model="formInline.title" placeholder="请输入"></el-input>
<el-input
v-model="formInline.title"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="预警时间:">
<!-- <el-date-picker
@ -43,135 +53,195 @@
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button size="mini" @click="resetQuery('queryFrom')"></el-button>
<el-button size="mini" type="primary" @click="handleQuery('queryFrom')"></el-button>
<el-button size="mini" @click="resetQuery('queryFrom')"
>重置</el-button
>
<el-button
size="mini"
type="primary"
@click="handleQuery('queryFrom')"
>查询</el-button
>
</el-form-item>
</el-form>
</header>
<section>
<!-- :height="tabHeader" -->
<el-table v-loading="loading" :data="tableData" :height="tabHeader">
<el-table-column type="index" label="序号" width="100px" class-name="table-operation" align="center"/>
<el-table-column label="事件标题" key="title" width="400px" prop="title" />
<el-table-column label="预警时间" key="firstWarnTimeDate" width="300px" prop="firstWarnTimeDate" />
<el-table-column label="预警因素" key="warnFactor" width="400px" prop="warnFactor" />
<el-table-column label="事件数量" key="nums" width="100px" prop="nums" align="center">
<el-table-column
type="index"
label="序号"
width="100px"
class-name="table-operation"
align="center"
/>
<el-table-column
label="事件标题"
key="title"
width="400px"
prop="title"
/>
<el-table-column
label="预警时间"
key="firstWarnTimeDate"
width="300px"
prop="firstWarnTimeDate"
/>
<el-table-column
label="预警因素"
key="warnFactor"
width="400px"
prop="warnFactor"
/>
<el-table-column
label="事件数量"
key="nums"
width="100px"
prop="nums"
align="center"
>
<template slot-scope="scope">
<div style="text-align: center;">{{ scope.row.nums }}</div>
<div style="text-align: center">{{ scope.row.nums }}</div>
</template>
</el-table-column>
<el-table-column label="操作" class-name="table-operation-anniu" align="center">
<el-table-column
label="操作"
class-name="table-operation-anniu"
align="center"
>
<template slot-scope="scope">
<div @click="audit(scope.row)" class="go-audit" v-if="activeName == 'first'">
<img src="@/assets/images/audit.png" alt="">
<div
@click="audit(scope.row)"
class="go-audit"
v-if="activeName == 'first'"
>
<img src="@/assets/images/audit.png" alt="" />
<span>审核</span>
</div>
<el-button v-else @click="audit(scope.row)" type="text" style="margin-right: 5px;" class="sqbtn sqbtn1">
<el-button
v-else
@click="audit(scope.row)"
type="text"
style="margin-right: 5px"
class="sqbtn sqbtn1"
>
查看详情
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
<pagination
id="L-pagination"
:total="total"
:page="pagination.current"
:limit="pagination.size"
layout="total, prev, pager, next, jumper"
@pagination="getPagination"
:current-page.sync="pagination.current"
:current-page.sync="pagination.current"
></pagination>
</section>
</div>
<event-audit title="事件审核" ref="eventAudit" :auditStatus="auditStatus" @closeDialog="getList"></event-audit>
<event-audit
title="事件审核"
ref="eventAudit"
:auditStatus="auditStatus"
@closeDialog="getList"
></event-audit>
</div>
</template>
<script>
import { colonyPage, login, verify, verificationCode } from "@/api/eventPage"
import { setToken } from '@/utils/auth'
import { encrypt } from '@/utils/jsencrypt'
import EventAudit from '@/views/components/eventAudit.vue'
import { colonyPage, login, verify, verificationCode } from "@/api/eventPage";
import { setToken } from "@/utils/auth";
import { encrypt } from "@/utils/jsencrypt";
import EventAudit from "@/views/components/eventAudit.vue";
export default {
components:{
components: {
EventAudit,
},
data() {
return {
activeName: "first",
active: 0,
formInline:{
title:"",
time:[],
formInline: {
title: "",
time: [],
},
loading: false,
tableData: [],
tabHeader: null,
total:0,
total: 0,
pagination: {
current: 1,
size: 10,
msgType: '5',
isReport:null,
msgType: "5",
isReport: null,
},
auditStatus: 1,
}
};
},
mounted(){
mounted() {
// const currentDate = new Date();
// const targetDate = new Date(2024, 10, 1, 0, 0, 0);
// 使
verify().then(res=>{
if(!res.data) {
this.$prompt('<div>算法已有3个月未迭代请联系算法人员进行迭代优化。</div><div class="warningText">正式使用码签约合同有效期2年有效期至2026年11月1日</div>', '提示', {
confirmButtonText: '确定',
type:"warning",
closeOnPressEscape:false,
showCancelButton: false,
closeOnClickModal:false,
dangerouslyUseHTMLString:true,
showInput:true,
showClose:false,
beforeClose:(action, instance, done)=>{
if (action === 'confirm') {
if(instance.inputValue == "88888888") {
done();
} else {
this.$message.error('试用码错误!');
}
if (JSON.parse(process.env.VUE_APP_ISTEST)) {
// 使
verify().then((res) => {
if (!res.data) {
this.$prompt(
'<div>算法已有3个月未迭代请联系算法人员进行迭代优化。</div><div class="warningText">正式使用码签约合同有效期2年有效期至2026年11月1日</div>',
"提示",
{
confirmButtonText: "确定",
type: "warning",
closeOnPressEscape: false,
showCancelButton: false,
closeOnClickModal: false,
dangerouslyUseHTMLString: true,
showInput: true,
showClose: false,
beforeClose: (action, instance, done) => {
if (action === "confirm") {
if (instance.inputValue == "88888888") {
done();
} else {
this.$message.error("试用码错误!");
}
}
},
}
}
}).then(({ value }) => {
verificationCode({verificationCode:value}).then(res=>{
login("admin",encrypt("Suanfa@2024//**...")).then(res=>{
// setToken(res.token)
localStorage.setItem('Admin-Token',res.token)
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
})
})
})
} else {
login("admin",encrypt("Suanfa@2024//**...")).then(res=>{
// setToken(res.token)
localStorage.setItem('Admin-Token',res.token)
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
})
}
})
// 使
// this.getList();
// this.cancalDebounce();
// window.addEventListener('resize', this.cancalDebounce);
).then(({ value }) => {
verificationCode({ verificationCode: value }).then((res) => {
login("admin", encrypt("Suanfa@2024//**...")).then((res) => {
// setToken(res.token)
localStorage.setItem("Admin-Token", res.token);
this.getList();
this.cancalDebounce();
window.addEventListener("resize", this.cancalDebounce);
});
});
});
} else {
login("admin", encrypt("Suanfa@2024//**...")).then((res) => {
// setToken(res.token)
localStorage.setItem("Admin-Token", res.token);
this.getList();
this.cancalDebounce();
window.addEventListener("resize", this.cancalDebounce);
});
}
});
} else {
// 使
this.getList();
this.cancalDebounce();
window.addEventListener("resize", this.cancalDebounce);
}
},
destroyed() {
window.removeEventListener('resize', this.cancalDebounce);
window.removeEventListener("resize", this.cancalDebounce);
},
methods:{
methods: {
handleClick(e) {
if (this.activeName == "first") {
this.pagination.isReport = 4;
@ -183,7 +253,7 @@ export default {
this.auditStatus = 1;
this.getList();
} else if (this.activeName == "second") {
this.pagination.isReport = 1
this.pagination.isReport = 1;
this.pagination.startTime = "";
this.pagination.endTime = "";
this.pagination.title = "";
@ -192,7 +262,7 @@ export default {
this.auditStatus = 2;
this.getList();
} else if (this.activeName == "third") {
this.pagination.isReport = 2
this.pagination.isReport = 2;
this.pagination.startTime = "";
this.pagination.endTime = "";
this.pagination.title = "";
@ -200,8 +270,8 @@ export default {
this.formInline.time = [];
this.auditStatus = 2;
this.getList();
} else if(this.activeName == "four") {
this.pagination.isReport = 3
} else if (this.activeName == "four") {
this.pagination.isReport = 3;
this.pagination.startTime = "";
this.pagination.endTime = "";
this.pagination.title = "";
@ -217,55 +287,62 @@ export default {
this.pagination.size = pages.limit;
this.getList();
},
getList(){
getList() {
this.loading = true;
colonyPage(this.pagination).then(res=>{
this.tableData = res.data.records
this.total = res.data.total
this.loading = false;
}).catch(err=>{
this.tableData = [];
this.loading = false;
})
colonyPage(this.pagination)
.then((res) => {
this.tableData = res.data.records;
this.total = res.data.total;
this.loading = false;
})
.catch((err) => {
this.tableData = [];
this.loading = false;
});
},
resetQuery(){
resetQuery() {
this.formInline = {
title:"",
time:[],
}
title: "",
time: [],
};
this.pagination = {
current: 1,
size: 10,
msgType: '5',
isReport: this.activeName == "first" ? null : this.activeName == "second" ? 1 : this.activeName == "third" ? 2 : null,
}
msgType: "5",
isReport:
this.activeName == "first"
? null
: this.activeName == "second"
? 1
: this.activeName == "third"
? 2
: null,
};
this.getList();
},
//
handleQuery(){
if(this.formInline.time.length > 0) {
this.formInline.startTime = this.formInline.time[0]
this.formInline.endTime = this.formInline.time[1]
handleQuery() {
if (this.formInline.time.length > 0) {
this.formInline.startTime = this.formInline.time[0];
this.formInline.endTime = this.formInline.time[1];
}
this.pagination = {...this.pagination,...this.formInline}
this.pagination = { ...this.pagination, ...this.formInline };
this.getList();
},
audit(item){
audit(item) {
this.$refs.eventAudit.open(item);
},
//
cancalDebounce(){
const element = document.getElementById('L-size-main'); // ID
const header = document.getElementById('L-header'); // ID
const pagination = document.getElementById('L-pagination'); // ID
cancalDebounce() {
const element = document.getElementById("L-size-main"); // ID
const header = document.getElementById("L-header"); // ID
const pagination = document.getElementById("L-pagination"); // ID
const elementHeight = element.offsetHeight;
const headerHeight = header.offsetHeight;
const paginationtHeight = pagination.offsetHeight;
this.tabHeader = elementHeight - headerHeight - paginationtHeight;
}
},
},
}
};
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

@ -3,7 +3,9 @@
<div class="L-ultimately-container">
<header>
驾驶舱同人同述事件
<span class="title-span">解释同人同诉的情况关注这件事情多次投诉未解决规则15天内同一人发生超过5次的如果超过30天则创建新事件如果当天再发生不再推送新事件第二天再发生再推送新事件</span>
<span class="title-span"
>解释同人同诉的情况关注这件事情多次投诉未解决规则15天内同一人发生超过5次的如果超过30天则创建新事件如果当天再发生不再推送新事件第二天再发生再推送新事件</span
>
</header>
<div class="tabs">
<el-tabs
@ -19,9 +21,17 @@
</div>
<div class="container-info" id="L-size-main">
<header id="L-header">
<el-form :inline="true" :model="formInline" size="small" class="demo-form-inline">
<el-form
:inline="true"
:model="formInline"
size="small"
class="demo-form-inline"
>
<el-form-item label="事件标题:">
<el-input v-model="formInline.title" placeholder="请输入"></el-input>
<el-input
v-model="formInline.title"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="预警时间:">
<!-- <el-date-picker
@ -43,135 +53,195 @@
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button size="mini" @click="resetQuery('queryFrom')"></el-button>
<el-button size="mini" type="primary" @click="handleQuery('queryFrom')"></el-button>
<el-button size="mini" @click="resetQuery('queryFrom')"
>重置</el-button
>
<el-button
size="mini"
type="primary"
@click="handleQuery('queryFrom')"
>查询</el-button
>
</el-form-item>
</el-form>
</header>
<section>
<!-- :height="tabHeader" -->
<el-table v-loading="loading" :data="tableData" :height="tabHeader">
<el-table-column type="index" label="序号" width="100px" class-name="table-operation" align="center"/>
<el-table-column label="事件标题" key="title" width="400px" prop="title" />
<el-table-column label="预警时间" key="firstWarnTimeDate" width="300px" prop="firstWarnTimeDate" />
<el-table-column label="预警因素" key="warnFactor" width="400px" prop="warnFactor" />
<el-table-column label="事件数量" key="nums" width="100px" prop="nums" align="center">
<el-table-column
type="index"
label="序号"
width="100px"
class-name="table-operation"
align="center"
/>
<el-table-column
label="事件标题"
key="title"
width="400px"
prop="title"
/>
<el-table-column
label="预警时间"
key="firstWarnTimeDate"
width="300px"
prop="firstWarnTimeDate"
/>
<el-table-column
label="预警因素"
key="warnFactor"
width="400px"
prop="warnFactor"
/>
<el-table-column
label="事件数量"
key="nums"
width="100px"
prop="nums"
align="center"
>
<template slot-scope="scope">
<div style="text-align: center;">{{ scope.row.nums }}</div>
<div style="text-align: center">{{ scope.row.nums }}</div>
</template>
</el-table-column>
<el-table-column label="操作" class-name="table-operation-anniu" align="center">
<el-table-column
label="操作"
class-name="table-operation-anniu"
align="center"
>
<template slot-scope="scope">
<div @click="audit(scope.row)" class="go-audit" v-if="activeName == 'first'">
<img src="@/assets/images/audit.png" alt="">
<div
@click="audit(scope.row)"
class="go-audit"
v-if="activeName == 'first'"
>
<img src="@/assets/images/audit.png" alt="" />
<span>审核</span>
</div>
<el-button v-else @click="audit(scope.row)" type="text" style="margin-right: 5px;" class="sqbtn sqbtn1">
<el-button
v-else
@click="audit(scope.row)"
type="text"
style="margin-right: 5px"
class="sqbtn sqbtn1"
>
查看详情
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
<pagination
id="L-pagination"
:total="total"
:page="pagination.current"
:limit="pagination.size"
layout="total, prev, pager, next, jumper"
@pagination="getPagination"
:current-page.sync="pagination.current"
:current-page.sync="pagination.current"
></pagination>
</section>
</div>
<event-audit title="事件审核" ref="eventAudit" :auditStatus="auditStatus" @closeDialog="getList"></event-audit>
<event-audit
title="事件审核"
ref="eventAudit"
:auditStatus="auditStatus"
@closeDialog="getList"
></event-audit>
</div>
</template>
<script>
import { colonyPage, login, verify, verificationCode } from "@/api/eventPage"
import { setToken } from '@/utils/auth'
import { encrypt } from '@/utils/jsencrypt'
import EventAudit from '@/views/components/eventAudit.vue'
import { colonyPage, login, verify, verificationCode } from "@/api/eventPage";
import { setToken } from "@/utils/auth";
import { encrypt } from "@/utils/jsencrypt";
import EventAudit from "@/views/components/eventAudit.vue";
export default {
components:{
components: {
EventAudit,
},
data() {
return {
activeName: "first",
active: 0,
formInline:{
title:"",
time:[],
formInline: {
title: "",
time: [],
},
loading: false,
tableData: [],
tabHeader: null,
total:0,
total: 0,
pagination: {
current: 1,
size: 10,
msgType: '2',
isReport:null,
msgType: "2",
isReport: null,
},
auditStatus: 1,
}
};
},
mounted(){
mounted() {
// const currentDate = new Date();
// const targetDate = new Date(2024, 10, 1, 0, 0, 0);
// 使
verify().then(res=>{
if(!res.data) {
this.$prompt('<div>算法已有3个月未迭代请联系算法人员进行迭代优化。</div><div class="warningText">正式使用码签约合同有效期2年有效期至2026年11月1日</div>', '提示', {
confirmButtonText: '确定',
type:"warning",
closeOnPressEscape:false,
showCancelButton: false,
closeOnClickModal:false,
dangerouslyUseHTMLString:true,
showInput:true,
showClose:false,
beforeClose:(action, instance, done)=>{
if (action === 'confirm') {
if(instance.inputValue == "88888888") {
done();
} else {
this.$message.error('试用码错误!');
}
if (JSON.parse(process.env.VUE_APP_ISTEST)) {
// 使
verify().then((res) => {
if (!res.data) {
this.$prompt(
'<div>算法已有3个月未迭代请联系算法人员进行迭代优化。</div><div class="warningText">正式使用码签约合同有效期2年有效期至2026年11月1日</div>',
"提示",
{
confirmButtonText: "确定",
type: "warning",
closeOnPressEscape: false,
showCancelButton: false,
closeOnClickModal: false,
dangerouslyUseHTMLString: true,
showInput: true,
showClose: false,
beforeClose: (action, instance, done) => {
if (action === "confirm") {
if (instance.inputValue == "88888888") {
done();
} else {
this.$message.error("试用码错误!");
}
}
},
}
}
}).then(({ value }) => {
verificationCode({verificationCode:value}).then(res=>{
login("admin",encrypt("Suanfa@2024//**...")).then(res=>{
// setToken(res.token)
localStorage.setItem('Admin-Token',res.token)
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
})
})
})
} else {
login("admin",encrypt("Suanfa@2024//**...")).then(res=>{
// setToken(res.token)
localStorage.setItem('Admin-Token',res.token)
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
})
}
})
// 使
// this.getList();
// this.cancalDebounce();
// window.addEventListener('resize', this.cancalDebounce);
).then(({ value }) => {
verificationCode({ verificationCode: value }).then((res) => {
login("admin", encrypt("Suanfa@2024//**...")).then((res) => {
// setToken(res.token)
localStorage.setItem("Admin-Token", res.token);
this.getList();
this.cancalDebounce();
window.addEventListener("resize", this.cancalDebounce);
});
});
});
} else {
login("admin", encrypt("Suanfa@2024//**...")).then((res) => {
// setToken(res.token)
localStorage.setItem("Admin-Token", res.token);
this.getList();
this.cancalDebounce();
window.addEventListener("resize", this.cancalDebounce);
});
}
});
} else {
// 使
this.getList();
this.cancalDebounce();
window.addEventListener("resize", this.cancalDebounce);
}
},
destroyed() {
window.removeEventListener('resize', this.cancalDebounce);
window.removeEventListener("resize", this.cancalDebounce);
},
methods:{
methods: {
handleClick(e) {
if (this.activeName == "first") {
this.pagination.isReport = 4;
@ -183,7 +253,7 @@ export default {
this.auditStatus = 1;
this.getList();
} else if (this.activeName == "second") {
this.pagination.isReport = 1
this.pagination.isReport = 1;
this.pagination.startTime = "";
this.pagination.endTime = "";
this.pagination.title = "";
@ -193,7 +263,7 @@ export default {
this.auditStatus = 2;
this.getList();
} else if (this.activeName == "third") {
this.pagination.isReport = 2
this.pagination.isReport = 2;
this.pagination.startTime = "";
this.pagination.endTime = "";
this.pagination.title = "";
@ -202,8 +272,8 @@ export default {
this.auditStatus = 2;
this.auditStatus = 2;
this.getList();
} else if(this.activeName == "four") {
this.pagination.isReport = 3
} else if (this.activeName == "four") {
this.pagination.isReport = 3;
this.pagination.startTime = "";
this.pagination.endTime = "";
this.pagination.title = "";
@ -219,55 +289,62 @@ export default {
this.pagination.size = pages.limit;
this.getList();
},
getList(){
getList() {
this.loading = true;
colonyPage(this.pagination).then(res=>{
this.tableData = res.data.records
this.total = res.data.total
this.loading = false;
}).catch(err=>{
this.tableData = [];
this.loading = false;
})
colonyPage(this.pagination)
.then((res) => {
this.tableData = res.data.records;
this.total = res.data.total;
this.loading = false;
})
.catch((err) => {
this.tableData = [];
this.loading = false;
});
},
resetQuery(){
resetQuery() {
this.formInline = {
title:"",
time:[],
}
title: "",
time: [],
};
this.pagination = {
current: 1,
size: 10,
msgType: '2',
isReport: this.activeName == "first" ? null : this.activeName == "second" ? 1 : this.activeName == "third" ? 2 : null,
}
msgType: "2",
isReport:
this.activeName == "first"
? null
: this.activeName == "second"
? 1
: this.activeName == "third"
? 2
: null,
};
this.getList();
},
//
handleQuery(){
if(this.formInline.time.length > 0) {
this.formInline.startTime = this.formInline.time[0]
this.formInline.endTime = this.formInline.time[1]
handleQuery() {
if (this.formInline.time.length > 0) {
this.formInline.startTime = this.formInline.time[0];
this.formInline.endTime = this.formInline.time[1];
}
this.pagination = {...this.pagination,...this.formInline}
this.pagination = { ...this.pagination, ...this.formInline };
this.getList();
},
audit(item){
audit(item) {
this.$refs.eventAudit.open(item);
},
//
cancalDebounce(){
const element = document.getElementById('L-size-main'); // ID
const header = document.getElementById('L-header'); // ID
const pagination = document.getElementById('L-pagination'); // ID
cancalDebounce() {
const element = document.getElementById("L-size-main"); // ID
const header = document.getElementById("L-header"); // ID
const pagination = document.getElementById("L-pagination"); // ID
const elementHeight = element.offsetHeight;
const headerHeight = header.offsetHeight;
const paginationtHeight = pagination.offsetHeight;
this.tabHeader = elementHeight - headerHeight - paginationtHeight;
}
},
},
}
};
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

@ -3,7 +3,9 @@
<div class="L-ultimately-container">
<header>
驾驶舱相似同类事件
<span class="title-span">解释分析出与目标工单的属于同类型的相似事件规则返回相似度排名超过0.92的结果最多返回10条</span>
<span class="title-span"
>解释分析出与目标工单的属于同类型的相似事件规则返回相似度排名超过0.92的结果最多返回10条</span
>
</header>
<div class="tabs">
<el-tabs
@ -17,9 +19,17 @@
</div>
<div class="container-info" id="L-size-main">
<header id="L-header">
<el-form :inline="true" :model="formInline" size="small" class="demo-form-inline">
<el-form
:inline="true"
:model="formInline"
size="small"
class="demo-form-inline"
>
<el-form-item label="事件标题:">
<el-input v-model="formInline.title" placeholder="请输入"></el-input>
<el-input
v-model="formInline.title"
placeholder="请输入"
></el-input>
</el-form-item>
<el-form-item label="调用时间:">
<!-- <el-date-picker
@ -41,133 +51,193 @@
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button size="mini" @click="resetQuery('queryFrom')"></el-button>
<el-button size="mini" type="primary" @click="handleQuery('queryFrom')"></el-button>
<el-button size="mini" @click="resetQuery('queryFrom')"
>重置</el-button
>
<el-button
size="mini"
type="primary"
@click="handleQuery('queryFrom')"
>查询</el-button
>
</el-form-item>
</el-form>
</header>
<section>
<!-- :height="tabHeader" -->
<el-table v-loading="loading" :data="tableData" :height="tabHeader">
<el-table-column type="index" label="序号" width="100px" class-name="table-operation" align="center"/>
<el-table-column label="事件标题" key="title" width="400px" prop="title" />
<el-table-column label="调用时间" key="createTime" width="300px" prop="createTime" />
<el-table-column label="关联事件数量" key="count" width="200px" prop="count" align="center">
<el-table-column
type="index"
label="序号"
width="100px"
class-name="table-operation"
align="center"
/>
<el-table-column
label="事件标题"
key="title"
width="400px"
prop="title"
/>
<el-table-column
label="调用时间"
key="createTime"
width="300px"
prop="createTime"
/>
<el-table-column
label="关联事件数量"
key="count"
width="200px"
prop="count"
align="center"
>
<template slot-scope="scope">
<div style="text-align: center;">{{ scope.row.count }}</div>
<div style="text-align: center">{{ scope.row.count }}</div>
</template>
</el-table-column>
<el-table-column label="操作" class-name="table-operation-anniu" align="center">
<el-table-column
label="操作"
class-name="table-operation-anniu"
align="center"
>
<template slot-scope="scope">
<div @click="audit(scope.row)" class="go-audit" v-if="activeName == 'first'">
<img src="@/assets/images/audit.png" alt="">
<div
@click="audit(scope.row)"
class="go-audit"
v-if="activeName == 'first'"
>
<img src="@/assets/images/audit.png" alt="" />
<span>审核</span>
</div>
<el-button v-else @click="audit(scope.row)" type="text" style="margin-right: 5px;" class="sqbtn sqbtn1">
<el-button
v-else
@click="audit(scope.row)"
type="text"
style="margin-right: 5px"
class="sqbtn sqbtn1"
>
查看详情
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
<pagination
id="L-pagination"
:total="total"
:page="pagination.current"
:limit="pagination.size"
layout="total, prev, pager, next, jumper"
@pagination="getPagination"
:current-page.sync="pagination.current"
:current-page.sync="pagination.current"
></pagination>
</section>
</div>
<relevancyEventAudit title="关联事件审核" ref="eventAudit" :auditStatus="auditStatus" @closeDialog="getList" />
<relevancyEventAudit
title="关联事件审核"
ref="eventAudit"
:auditStatus="auditStatus"
@closeDialog="getList"
/>
</div>
</template>
<script>
import { colonyEventPage, login, verify, verificationCode } from "@/api/eventPage"
import { setToken } from '@/utils/auth'
import { encrypt } from '@/utils/jsencrypt'
import relevancyEventAudit from '@/views/components/relevancyEventAudit.vue'
import {
colonyEventPage,
login,
verify,
verificationCode,
} from "@/api/eventPage";
import { setToken } from "@/utils/auth";
import { encrypt } from "@/utils/jsencrypt";
import relevancyEventAudit from "@/views/components/relevancyEventAudit.vue";
export default {
components:{
components: {
relevancyEventAudit,
},
data() {
return {
activeName: "first",
active: 0,
formInline:{
title:"",
time:[],
formInline: {
title: "",
time: [],
},
loading: false,
tableData: [],
tabHeader: null,
total:0,
total: 0,
pagination: {
current: 1,
size: 10,
isReport:null,
isReport: null,
},
auditStatus: 1,
}
};
},
mounted(){
mounted() {
// const currentDate = new Date();
// const targetDate = new Date(2024, 10, 1, 0, 0, 0);
// 使
verify().then(res=>{
if(!res.data) {
this.$prompt('<div>算法已有3个月未迭代请联系算法人员进行迭代优化。</div><div class="warningText">正式使用码签约合同有效期2年有效期至2026年11月1日</div>', '提示', {
confirmButtonText: '确定',
type:"warning",
closeOnPressEscape:false,
showCancelButton: false,
closeOnClickModal:false,
dangerouslyUseHTMLString:true,
showInput:true,
showClose:false,
beforeClose:(action, instance, done)=>{
if (action === 'confirm') {
if(instance.inputValue == "88888888") {
done();
} else {
this.$message.error('试用码错误!');
}
if (JSON.parse(process.env.VUE_APP_ISTEST)) {
// 使
verify().then((res) => {
if (!res.data) {
this.$prompt(
'<div>算法已有3个月未迭代请联系算法人员进行迭代优化。</div><div class="warningText">正式使用码签约合同有效期2年有效期至2026年11月1日</div>',
"提示",
{
confirmButtonText: "确定",
type: "warning",
closeOnPressEscape: false,
showCancelButton: false,
closeOnClickModal: false,
dangerouslyUseHTMLString: true,
showInput: true,
showClose: false,
beforeClose: (action, instance, done) => {
if (action === "confirm") {
if (instance.inputValue == "88888888") {
done();
} else {
this.$message.error("试用码错误!");
}
}
},
}
}
}).then(({ value }) => {
verificationCode({verificationCode:value}).then(res=>{
login("admin",encrypt("Suanfa@2024//**...")).then(res=>{
// setToken(res.token)
localStorage.setItem('Admin-Token',res.token)
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
})
})
})
} else {
login("admin",encrypt("Suanfa@2024//**...")).then(res=>{
// setToken(res.token)
localStorage.setItem('Admin-Token',res.token)
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
})
}
})
// 使
// this.getList();
// this.cancalDebounce();
// window.addEventListener('resize', this.cancalDebounce);
).then(({ value }) => {
verificationCode({ verificationCode: value }).then((res) => {
login("admin", encrypt("Suanfa@2024//**...")).then((res) => {
// setToken(res.token)
localStorage.setItem("Admin-Token", res.token);
this.getList();
this.cancalDebounce();
window.addEventListener("resize", this.cancalDebounce);
});
});
});
} else {
login("admin", encrypt("Suanfa@2024//**...")).then((res) => {
// setToken(res.token)
localStorage.setItem("Admin-Token", res.token);
this.getList();
this.cancalDebounce();
window.addEventListener("resize", this.cancalDebounce);
});
}
});
} else {
// 使
this.getList();
this.cancalDebounce();
window.addEventListener("resize", this.cancalDebounce);
}
},
destroyed() {
window.removeEventListener('resize', this.cancalDebounce);
window.removeEventListener("resize", this.cancalDebounce);
},
methods:{
methods: {
// tab
handleClick(e) {
if (this.activeName == "first") {
@ -186,53 +256,58 @@ export default {
this.pagination.size = pages.limit;
this.getList();
},
getList(){
getList() {
this.loading = true;
colonyEventPage(this.pagination).then(res=>{
this.tableData = res.data.records
this.total = res.data.total
this.loading = false;
}).catch(err=>{
this.tableData = [];
this.loading = false;
})
colonyEventPage(this.pagination)
.then((res) => {
this.tableData = res.data.records;
this.total = res.data.total;
this.loading = false;
})
.catch((err) => {
this.tableData = [];
this.loading = false;
});
},
resetQuery(){
resetQuery() {
this.formInline = {
title:"",
time:[],
}
title: "",
time: [],
};
this.pagination = {
current: 1,
size: 10,
isReport: this.activeName == "first" ? null : this.activeName == "third" ? 1 : null,
}
isReport:
this.activeName == "first"
? null
: this.activeName == "third"
? 1
: null,
};
this.getList();
},
handleQuery(){
if(this.formInline.time.length > 0) {
this.formInline.startTime = this.formInline.time[0]
this.formInline.endTime = this.formInline.time[1]
handleQuery() {
if (this.formInline.time.length > 0) {
this.formInline.startTime = this.formInline.time[0];
this.formInline.endTime = this.formInline.time[1];
}
this.pagination = {...this.pagination,...this.formInline}
this.pagination = { ...this.pagination, ...this.formInline };
this.getList();
},
audit(item){
audit(item) {
this.$refs.eventAudit.open(item);
},
//
cancalDebounce(){
const element = document.getElementById('L-size-main'); // ID
const header = document.getElementById('L-header'); // ID
const pagination = document.getElementById('L-pagination'); // ID
cancalDebounce() {
const element = document.getElementById("L-size-main"); // ID
const header = document.getElementById("L-header"); // ID
const pagination = document.getElementById("L-pagination"); // ID
const elementHeight = element.offsetHeight;
const headerHeight = header.offsetHeight;
const paginationtHeight = pagination.offsetHeight;
this.tabHeader = elementHeight - headerHeight - paginationtHeight;
}
},
},
}
};
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

Loading…
Cancel
Save