更新代码

Lvtianfang
吕天方 2 weeks ago
parent 7fa52f6038
commit ec1eac282f

@ -6,7 +6,7 @@ ENV = 'development'
# 若依管理系统/开发环境
# VUE_APP_BASE_API = '/dev-api'
VUE_APP_BASE_API = 'http://192.168.0.105:9102/api'
VUE_APP_BASE_API = 'http://192.168.0.113:9102/api'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true

@ -51,6 +51,8 @@
"leaflet": "^1.9.4",
"leaflet.markercluster": "^1.5.3",
"nprogress": "0.2.0",
"proj4": "^2.12.0",
"proj4leaflet": "^1.0.2",
"quill": "1.3.7",
"screenfull": "5.0.2",
"sortablejs": "1.10.2",

@ -0,0 +1,17 @@
import request from '@/utils/request'
// 查询算法事件列表
export function new100Page() {
return request({
url: '/earlyWarningAudit/massEvents/new100Page',
method: 'get',
})
}
export function colonyPage(params){
return request({
url: '/earlyWarningAudit/massEvents/colonyPage',
method: 'get',
params
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 779 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

@ -0,0 +1,124 @@
.L-ultimately-container {
margin: 20px;
background-color: #fff;
border-radius: 5px;
height: calc(100% - 40px);
overflow-y: scroll;
padding: 20px 0 10px 0;
header {
padding: 0 20px;
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 700;
font-size: 18px;
color: #3D3D3D;
}
.tabs {
margin-top: 10px;
.el-tabs {
height: 100%;
.el-tabs__header {
margin-bottom: 0 !important;
}
.el-tabs__item {
padding: 0 20px !important;
width: 130px;
text-align: center;
}
.el-tabs__active-bar {
width: 60px;
border-radius: 5px;
height: 4px;
}
.el-tabs__nav-wrap::after {
left: 20px;
right: 20px;
width: calc(100% - 40px);
}
//
.el-tabs__item.is-active {
}
}
}
.container-info {
height: calc(100% - 138px);
padding: 0 20px;
header {
width: 100%;
background-color: #FAFBFC;
padding: 20px;
.el-form-item {
margin-bottom: 0;
margin-right: 60px;
.el-form-item__label {
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 400;
font-size: 14px;
color: #3D3D3D;
}
.el-form-item__content {
.el-input {
.el-input__inner {
border-radius: 2px;
height: 32px;
width: 240px;
}
}
.el-date-editor {
width: 480px;
height: 32px;
border-radius: 2px;
}
}
}
}
section {
margin-top: 20px;
.el-table {
th {
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 500;
font-size: 14px;
color: #3D3D3D;
height: 50px;
background-color: #F9FAFC;
border: none;
}
td {
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 400;
font-size: 14px;
color: #666666;
text-align: left;
color: #666666;
}
.table-operation {
text-align: center;
}
.table-operation-anniu {
.cell {
display: flex;
justify-content: center;
}
.go-audit {
cursor: pointer;
display: flex;
align-items: center;
img {
width: 20px;
height: 21px;
margin-right: 2px;
}
.span {
color: #2F8AE5;
}
}
}
}
.el-table::before {
height: 0;
}
}
}
}

@ -5,6 +5,8 @@
@import './sidebar.scss';
@import './btn.scss';
@import './public.scss';
@import './general.scss';
@import './leaflet.scss';
body {
height: 100%;

@ -0,0 +1,33 @@
//
.leaflet-popup-content-wrapper {
background-color: transparent !important;
box-shadow: none !important;
}
.leaflet-popup-close-button {
display: none;
}
.leaflet-popup-tip-container {
display: none;
}
.marsk-box {
.markerDialog {
border-radius: 5px;
background-color: #fff;
.markerTitle {
display: flex;
align-items: center;
flex-wrap: nowrap;
justify-content: space-between;
background-color: #F4F9FD;
border-radius: 5px 5px 0 0;
padding: 5px 10px;
.marker-msgTitle {
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 700;
font-size: 16px;
color: #3D3D3D;
}
}
}
}

@ -15,19 +15,6 @@
.reset {
border: 1px solid #DEE2EE;
}
// label
.el-form-item {
margin-right: 20px;
// margin-bottom: 0;
}
.el-form-item__label {
font-size: 14px;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500;
color: #4D5158;
padding: 0;
// line-height: 18px;
}
.el-form-item__content {
//
.el-input__inner {
@ -50,25 +37,6 @@
color: #292F38;
}
}
.el-tabs {
.el-tabs__header {
margin-bottom: 0;
}
.el-tabs__item {
font-size: 14px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #8E9298;
-webkit-background-clip: text;
padding-left: 20px !important;
}
.el-tabs__item.is-active {
font-size: 16px;
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
font-weight: bold;
color: #323233;
}
}
.table-box {
padding: 0 20px;
margin-top: 10px;
@ -165,10 +133,8 @@
// height: 85%;
padding-top: 10px;
.foot-main {
padding-bottom: 20px;
background: white;
.table-box {
height: 500px;
}
}
.headerText {
@ -340,11 +306,12 @@
right: 20px;
top: 20px;
bottom: 20px;
width: 25%;
width: 26%;
z-index: 1000;
background-color: #fff;
border-radius: 10px;
.warning-list-title {
border-radius: 10px 10px 0 0;
line-height: 40px;
padding: 0 20px;
background-color: rgba(47,138,229,0.05);
@ -358,7 +325,14 @@
.warning-list-search {
display: flex;
align-items: center;
.el-input__inner {
border-radius: 5px 0 0 5px;
}
.el-input-group__append {
border-radius: 0 5px 5px 0;
}
.el-button {
border-radius: 0 5px 5px 0;
background-color:#2F8AE5;
color: #fff;
}
@ -378,13 +352,44 @@
display: flex;
.warning-title {
flex: 1;
// padding-top: 3px;
}
.anniu {
margin-right: 10px;
padding: 3px;
// padding: 3px 6px;
padding: 3px 5px 3px 7px;
border-radius: 5px;
width: 3em;
width: 40px;
height: 40px;
flex-wrap: wrap;
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
letter-spacing: 2px;
font-weight: 500;
font-size: 12px;
// display: flex;
// justify-content: space-between;
// align-content: space-between;
// flex-wrap: wrap;
}
// 12345
.qunti {
color: #F43147;
background: rgba(244,49,71,0.1);
}
.tongren{
color: #2BC4C4;
background: rgba(43,196,196,0.1);
}
.jinji{
background: rgba(245,154,35,0.1);
color: #F59A23;
}
.zhongdian{
}
.yiren{
color: #F954A5;
background: rgba(249,84,165,0.1);
}
}
.content {
@ -458,7 +463,12 @@
}
}
.warning-list-footer {
.pagination-container {
.el-pagination {
width: 100%;
overflow: hidden;
}
}
}
}
}

@ -2,7 +2,7 @@
.main-container {
// height: 100%;
height: calc(100% - 40px);
height: calc(100% - 50px);
transition: margin-left .28s;
margin-left: $base-sidebar-width;
position: relative;
@ -18,10 +18,10 @@
width: $base-sidebar-width !important;
background-color: $base-menu-background;
// height: 100%;
height: calc(100% - 40px);
height: calc(100% - 50px);
position: fixed;
font-size: 0px;
top: 40px;
top: 50px;
bottom: 0;
left: 0;
z-index: 1001;

@ -9,6 +9,7 @@
:pager-count="pagerCount"
:total="total"
v-bind="$attrs"
:small="small"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
@ -48,6 +49,10 @@ export default {
type: String,
default: 'total, sizes, prev, pager, next, jumper'
},
small: {
type: Boolean,
default: false
},
background: {
type: Boolean,
default: true

@ -0,0 +1,54 @@
<template>
<div class="event-box">
<div class="event-background"></div>
<div class="event-right">
<div class="msgType">群体事件</div>
<div class="msgContent">四季花园业主反映道路噪声问题</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
}
},
methods:{
},
}
</script>
<style lang="scss" scoped>
.event-box {
display: flex;
width: 500px;
height: 40px;
border-radius: 20px;
background: #4C4C4C;
padding: 0 10px;
align-items: center;
.event-background {
background: url("../../assets/images/eventPrompt.png");
background-size: 100% 100%;
width: 30px;
height: 30px;
margin-right: 5px;
}
.event-right {
display: flex;
flex-direction: column;
.msgType {
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 700;
font-size: 14px;
color: #F43147;
}
.msgContent {
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 400;
font-size: 12px;
color: #FFFFFF;
}
}
}
</style>

@ -29,7 +29,7 @@ export default {
<style lang="scss" scoped>
.app-main {
/* 50= navbar 50 */
height: calc(100vh - 40px);
height: calc(100vh - 50px);
width: 100%;
position: relative;
overflow: hidden;

@ -2,21 +2,24 @@
<div :class="classObj" class="app-wrapper" :style="{'--current-color': theme}">
<header class="app-header">
<div class="header-title"> <img src="@/assets/images/logo@2x.png" alt=""> <span>数字高新驾驶舱-算法预警服务平台</span></div>
<div class="right-menu">
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
<div class="avatar-wrapper">
<img :src="avatar" class="user-avatar">
<i class="el-icon-caret-bottom" />
</div>
<el-dropdown-menu slot="dropdown">
<router-link to="/user/profile">
<el-dropdown-item>个人中心</el-dropdown-item>
</router-link>
<el-dropdown-item divided @click.native="logout">
<span>退出登录</span>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<div class="right-box">
<event-prompt></event-prompt>
<div class="right-menu">
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
<div class="avatar-wrapper">
<img :src="avatar" class="user-avatar">
<i class="el-icon-caret-bottom" />
</div>
<el-dropdown-menu slot="dropdown">
<router-link to="/user/profile">
<el-dropdown-item>个人中心</el-dropdown-item>
</router-link>
<el-dropdown-item divided @click.native="logout">
<span>退出登录</span>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</header>
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"/>
@ -41,6 +44,8 @@ import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components'
import ResizeMixin from './mixin/ResizeHandler'
import { mapState, mapGetters } from 'vuex'
import variables from '@/assets/styles/variables.scss'
import eventPrompt from "@/components/eventPrompt"
export default {
name: 'Layout',
@ -50,7 +55,8 @@ export default {
RightPanel,
Settings,
Sidebar,
TagsView
TagsView,
eventPrompt
},
mixins: [ResizeMixin],
computed: {
@ -108,7 +114,7 @@ export default {
.app-header {
background-color: #304156;
background-color: #3f3f3f;
height: 40px;
height: 50px;
padding: 0px 20px;
box-sizing: border-box;
display: flex;
@ -117,8 +123,8 @@ export default {
.header-title {
display: flex;
align-items: center;
height: 40px;
line-height: 40px;
height: 50px;
line-height: 50px;
color: #fff;
img {
width: 20px;
@ -126,7 +132,12 @@ export default {
margin-right: 10px;
}
}
.right-box {
display: flex;
align-items: center;
}
.right-menu {
margin-left: 40px;
float: right;
&:focus {

@ -1,7 +1,7 @@
<template>
<el-dialog
:visible.sync="showCK"
width="50%"
width="80%"
:title="title"
@close="close"
:close-on-click-modal="false"
@ -160,9 +160,7 @@ export default {
},
//
addStyle({row, column, rowIndex, columnIndex}) {
console.log(columnIndex);
if(columnIndex === 2) {
console.log(column);
return "columnFactor"
}
}

@ -1,32 +1,29 @@
<template>
<div class="L-app-container home">
<div class="tabsBottom">
<div class="foot-main">
<div class="headerText">
<div class="searchP">算法运行监测</div>
</div>
<section class="table-box">
<div class="table-item">
<el-table v-loading="loading" :data="tableData" border>
<el-table-column
type="index"
label="序号"
width="55"
align="center"
/>
<el-table-column label="算法运行时间" align="center" prop="runningTime">
</el-table-column>
<el-table-column label="获取事件条数" align="center" prop="hqTotal">
</el-table-column>
<el-table-column label="推送驾驶舱条数" align="center" prop="tsTotal">
</el-table-column>
</el-table>
</div>
</section>
<div class="L-app-container home" id="L-size-main">
<div class="tabsBottom" :style="tabHeader">
<div class="headerText">
<div class="searchP">算法运行监测</div>
</div>
<section class="table-box">
<el-table v-loading="loading" :data="tableData" border>
<el-table-column
type="index"
label="序号"
width="55"
align="center"
/>
<el-table-column label="算法运行时间" align="center" prop="runningTime">
</el-table-column>
<el-table-column label="获取事件条数" align="center" prop="hqTotal">
</el-table-column>
<el-table-column label="推送驾驶舱条数" align="center" prop="tsTotal">
</el-table-column>
</el-table>
</section>
</div>
<div class="my-pagination">
<pagination
id="L-pagination"
:total="total"
:page="pages.current"
:limit="pages.size"
@ -54,10 +51,18 @@ export default {
loading:false,
tableData: [],
total:0,
tabHeader: {
height: '',
},
};
},
mounted() {
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
},
destroyed() {
window.removeEventListener('resize', this.cancalDebounce);
},
methods: {
handleClick(tab, event){
@ -90,6 +95,14 @@ export default {
this.pages.size = pages.limit;
this.getList()
},
//
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';
}
}
};
</script>

@ -6,24 +6,25 @@
<div class="warning-list-search">
<!-- <el-input v-model="input" placeholder="请输入关键字"></el-input>
<el-button type="primary" size="medium" @click="query"></el-button> -->
<el-input placeholder="请输入关键字" v-model="input">
<el-input placeholder="请输入关键字" v-model="queryParams.title">
<el-button type="primary" size="medium" @click="query" slot="append" icon="el-icon-search"></el-button>
</el-input>
</div>
<div class="warning-list-list">
<div class="lists" v-for="(item,index) in total">
<div class="lists" v-for="(item,index) in eventList" v-loading="loading">
<div class="hearder">
<div class="anniu">群体事件</div>
<div class="warning-title">虎丘区馨泰花苑76号楼发生火灾或存在发生火灾的隐患</div>
<!--群体事件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="warning-title">{{ item.title }}</div>
</div>
<div class="content">
<div class="content-top">
<img src="@/assets/images/address.png" alt="">
<span>高新区何山路124号四季花园小区</span>
<span>{{ item.title }}</span>
</div>
<div class="content-bottom">
<img src="@/assets/images/time.png" alt="">
<span>2023-07-30 14:26:30</span>
<span>{{ item.eventTime }}</span>
</div>
</div>
<div class="foot">
@ -41,8 +42,11 @@
v-show="total>0"
:total="total"
layout="total, prev, pager, next, jumper"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
:pagerCount="5"
:background="false"
:small="true"
:page.sync="queryParams.current"
:limit.sync="queryParams.size"
@pagination="getList"
/>
</div>
@ -55,14 +59,18 @@
<div class="warning-events-event-text">{{ item.text }}</div>
</div>
</div>
<div id="newmap"></div>
<div id="newmap" v-loading="mapLoading"></div>
</div>
</template>
<script>
import L from "leaflet";
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 } from "@/api/eventPage"
export default {
data() {
return {
@ -95,25 +103,47 @@ export default {
},
],
queryParams:{
pageNum: 1,
pageSize: 5,
current: 1,
size: 10,
title:""
},
total: 15,
total: 0,
eventList:[],
map:null,
basemap:null,
loading:false,
mapLoading:false,
mapLayers: {
mapLayer1: null,
mapLayer2: null,
mapLayer3: null,
mapLayer4: null,
mapLayer5: null,
},
}
},
mounted() {
this.$nextTick(() => {
this.initMap();
});
this.getList();
},
methods:{
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;
})
},
initMap(){
this.map = L.map("newmap", {
// crs: L.CRS.Baidu,
center: [31.318870, 120.508139],
zoom: 10,
center: [31.324624, 120.582904],
zoom: 12,
attributionControl: false,
zoomControl: false,
});
@ -121,21 +151,156 @@ export default {
maxZoom: 18,
minZoom: 5,
});
this.map.addLayer(this.basemap);
this.map.createPane("mapLayer1");
this.map.getPane("mapLayer1").style.zIndex = 501;
this.map.getPane("mapLayer1").style.pointerEvents = "none";
this.map.createPane("mapLayer2");
this.map.getPane("mapLayer2").style.zIndex = 501;
this.map.getPane("mapLayer2").style.pointerEvents = "none";
this.map.createPane("mapLayer3");
this.map.getPane("mapLayer3").style.zIndex = 501;
this.map.getPane("mapLayer3").style.pointerEvents = "none";
this.map.createPane("mapLayer4");
this.map.getPane("mapLayer4").style.zIndex = 501;
this.map.getPane("mapLayer4").style.pointerEvents = "none";
this.map.createPane("mapLayer5");
this.map.getPane("mapLayer5").style.zIndex = 501;
this.map.getPane("mapLayer5").style.pointerEvents = "none";
this.mapLayers.mapLayer1 = L.featureGroup().addTo(this.map);
this.mapLayers.mapLayer2 = L.featureGroup().addTo(this.map);
this.mapLayers.mapLayer3 = L.featureGroup().addTo(this.map);
this.mapLayers.mapLayer4 = L.featureGroup().addTo(this.map);
this.mapLayers.mapLayer5 = L.featureGroup().addTo(this.map);
this.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);
} 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);
} 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.mapLoading = false;
}).catch(err=>{
this.mapLoading = false;
})
},
markerClick(marker, index, item){
const that = this;
marker.on("click", (e) => {
marker.bindPopup(
`<div class="markerDialog">
<div class="markerTitle">
<span class="marker-msgTitle">${item.caseTitle}</span>
<i class="el-icon-close" id="close"></i>
</div>
<div class="markerContent">
</div>
</div>`,
{
className: "marsk-box",
offset: L.point(0,50)
}
).openPopup();
})
},
//
query(){
this.queryParams.current = 1;
this.queryParams.size = 10;
this.getList();
},
//
audit(){
},
//
getList(){
console.log(this.queryParams);
},
},
}
</script>

@ -1 +1,197 @@
<!-- 驾驶舱重点人员事件 -->
<!-- 驾驶舱重点人员事件 -->
<template>
<div class="L-ultimately-container">
<header>驾驶舱重点人员事件</header>
<div class="tabs">
<el-tabs
v-model="activeName"
@tab-click="handleClick"
style="color: #edeef0"
>
<el-tab-pane label="待审核" name="first" />
<el-tab-pane label="已上报" name="second" />
<el-tab-pane label="重训练" name="third" />
</el-tabs>
</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-item label="事件标题:">
<el-input v-model="formInline.title" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="预警时间:">
<!-- <el-date-picker
class="ignoreElement"
v-model="formInline.firstWarnTime"
format="yyyy"
value-format="yyyy"
type="year"
placeholder="选择年份">
</el-date-picker> -->
<el-date-picker
v-model="formInline.time"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="请选择"
>
</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-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="firstWarnTime" width="300px" prop="firstWarnTime" />
<el-table-column label="预警因素" key="warnFactor" width="400px" prop="warnFactor" />
<el-table-column label="事件数量" key="msgTypeName" width="200px" prop="msgTypeName" />
<el-table-column label="操作" class-name="table-operation-anniu" align="center">
<template slot-scope="scope">
<div @click="audit(scope.row)" class="go-audit">
<img src="@/assets/images/audit.png" alt="">
<span>审核</span>
</div>
</template>
</el-table-column>
</el-table>
<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"
></pagination>
</section>
</div>
<event-audit title="事件审核" ref="eventAudit"></event-audit>
</div>
</template>
<script>
import { colonyPage } from "@/api/eventPage"
import EventAudit from '@/views/components/eventAudit.vue'
export default {
components:{
EventAudit,
},
data() {
return {
activeName: "first",
active: 0,
formInline:{
title:"",
time:[],
},
loading: false,
tableData: [
{
title:"关于大阳山景区交通拥堵问题",
firstWarnTime:"2024-08-29 09:00:20",
warnFactor:"大阳山景区、交通拥堵",
msgTypeName:"8条"
},{
title:"关于大阳山景区交通拥堵问题",
firstWarnTime:"2024-08-29 09:00:20",
warnFactor:"大阳山景区、交通拥堵",
msgTypeName:"8条"
},
],
tabHeader: null,
total:0,
pagination: {
current: 1,
size: 10,
msgType: '4',
isReport:null,
},
}
},
mounted(){
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
},
destroyed() {
window.removeEventListener('resize', this.cancalDebounce);
},
methods:{
handleClick(e) {
if (this.activeName == "first") {
this.pagination.isReport = null
this.getList();
} else if (this.activeName == "second") {
this.pagination.isReport = 1
this.getList();
} else if (this.activeName == "third") {
this.pagination.isReport = 2
this.getList();
}
},
//
getPagination(pages) {
this.pagination.current = pages.page;
this.pagination.size = pages.limit;
this.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;
})
},
resetQuery(){
this.formInline = {
title:"",
time:[],
}
this.pagination = {
current: 1,
size: 10,
msgType: '4',
isReport: this.activeName == "first" ? null : this.activeName == "second" ? 1 : this.activeName == "third" ? 2 : null,
}
this.getList();
},
handleQuery(){
console.log(this.formInline);
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.getList();
},
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
const elementHeight = element.offsetHeight;
const headerHeight = header.offsetHeight;
const paginationtHeight = pagination.offsetHeight;
this.tabHeader = elementHeight - headerHeight - paginationtHeight;
}
},
}
</script>
<style lang="scss" scoped>
</style>

@ -1,120 +1,84 @@
<!-- 驾驶舱群体事件 -->
<template>
<div class="L-app-container">
<div class="L-ultimately-container">
<header>驾驶舱群体事件</header>
<div class="tabs-header">
<div class="tabs-title" @click="changeTab">
<div class="await-audit" :class="activeTab == 1 ? 'active-tab' : ''" data-info="awaitAudit">待审核</div>
<div class="already-affirm" :class="activeTab == 2 ? 'active-tab' : ''" data-info="alreadyAffirm">已确认</div>
</div>
<el-form :inline="true" :model="form" ref="formOne">
<el-form-item label="事件标题:" prop="title">
<el-input v-model="form.title" placeholder="请输入事件标题"></el-input>
</el-form-item>
<el-form-item label="预警时间:" prop="time">
<el-date-picker
v-model="form.time"
type="date"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="请选择预警时间">
</el-date-picker>
</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-form-item>
</el-form>
<div class="tabs-line"></div>
<!-- 待审核 -->
<div v-if="activeTab == 1">
<section class="table-box">
<div class="table-item">
<el-table v-loading="loading" :data="auditData" border>
<el-table-column
type="index"
label="序号"
width="55"
align="center"
/>
<el-table-column label="事件标题" align="center" prop="title">
</el-table-column>
<el-table-column label="预警时间" align="center" prop="time">
</el-table-column>
<el-table-column label="预警因素" align="center" prop="factor">
</el-table-column>
<el-table-column label="事件数量" align="center" prop="number">
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<button @click="audit(scope.row)" class="sqbtn sqbtn1">
审核
</button>
</template>
</el-table-column>
</el-table>
</div>
</section>
<div class="my-pagination">
<pagination
:total="auditTotal"
:page="pages.current"
:limit="pages.size"
@pagination="getPagination"
:current-page.sync="pages.current"
></pagination>
</div>
</div>
<!-- 已确认 -->
<div v-if="activeTab == 2">
<section class="table-box">
<div class="table-item">
<el-table v-loading="loading" :data="affirmData" border>
<el-table-column
type="index"
label="序号"
width="55"
align="center"
/>
<el-table-column label="事件标题" align="center" prop="title">
</el-table-column>
<el-table-column label="预警时间" align="center" prop="time">
</el-table-column>
<el-table-column label="预警因素" align="center" prop="factor">
</el-table-column>
<el-table-column label="事件数量" align="center" prop="number">
</el-table-column>
<el-table-column label="审核状态" align="center">
<template slot-scope="scope">
<span v-if="scope.row.status == 1"></span>
<span v-if="scope.row.status == 2"></span>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<button @click="toDetail(scope.row)" class="sqbtn sqbtn1">
查看详情
</button>
</template>
</el-table-column>
</el-table>
</div>
</section>
<div class="my-pagination">
<pagination
:total="affirmTotal"
:page="affirmPages.current"
:limit="affirmPages.size"
@pagination="getPaginationAffirm"
:current-page.sync="affirmPages.current"
></pagination>
</div>
</div>
<div class="tabs">
<el-tabs
v-model="activeName"
@tab-click="handleClick"
style="color: #edeef0"
>
<el-tab-pane label="待审核" name="first" />
<el-tab-pane label="已上报" name="second" />
<el-tab-pane label="重训练" name="third" />
</el-tabs>
</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-item label="事件标题:">
<el-input v-model="formInline.title" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="预警时间:">
<!-- <el-date-picker
class="ignoreElement"
v-model="formInline.firstWarnTime"
format="yyyy"
value-format="yyyy"
type="year"
placeholder="选择年份">
</el-date-picker> -->
<el-date-picker
v-model="formInline.time"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="请选择"
>
</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-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="firstWarnTime" width="300px" prop="firstWarnTime" />
<el-table-column label="预警因素" key="warnFactor" width="400px" prop="warnFactor" />
<el-table-column label="事件数量" key="msgTypeName" width="200px" prop="msgTypeName" />
<el-table-column label="操作" class-name="table-operation-anniu" align="center">
<template slot-scope="scope">
<div @click="audit(scope.row)" class="go-audit">
<img src="@/assets/images/audit.png" alt="">
<span>审核</span>
</div>
</template>
</el-table-column>
</el-table>
<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"
></pagination>
</section>
</div>
<event-audit title="事件审核" ref="eventAudit"></event-audit>
</div>
</template>
<script>
import { colonyPage } from "@/api/eventPage"
import EventAudit from '@/views/components/eventAudit.vue'
export default {
components:{
@ -122,171 +86,112 @@ export default {
},
data() {
return {
activeTab: 1,
form:{
time: '',
title: '',
activeName: "first",
active: 0,
formInline:{
title:"",
time:[],
},
pages: {
current: 1,
size: 10,
},
affirmPages: {
current: 1,
size: 10,
},
auditTotal:1,
affirmTotal:1,
loading:false,
auditData:[
{
title:"关于137****1620李某某7天内多次投诉各种事件",
time:"2024-02-22 09:00:02",
factor:"137****1620李某某",
number:8,
},{
title:"关于137****1620李某某7天内多次投诉各种事件",
time:"2024-02-22 09:00:02",
factor:"137****1620李某某",
number:8,
},{
title:"关于137****1620李某某7天内多次投诉各种事件",
time:"2024-02-22 09:00:02",
factor:"137****1620李某某",
number:8,
},{
title:"关于137****1620李某某7天内多次投诉各种事件",
time:"2024-02-22 09:00:02",
factor:"137****1620李某某",
number:8,
},{
title:"关于137****1620李某某7天内多次投诉各种事件",
time:"2024-02-22 09:00:02",
factor:"137****1620李某某",
number:8,
},{
title:"关于137****1620李某某7天内多次投诉各种事件",
time:"2024-02-22 09:00:02",
factor:"137****1620李某某",
number:8,
},
],
affirmData:[
loading: false,
tableData: [
{
title:"关于137****1620李某某7天内多次投诉各种事件",
time:"2024-02-22 09:00:02",
factor:"137****1620李某某",
number:8,
status:1,
},{
title:"关于137****1620李某某7天内多次投诉各种事件",
time:"2024-02-22 09:00:02",
factor:"137****1620李某某",
number:8,
status:2,
},{
title:"关于137****1620李某某7天内多次投诉各种事件",
time:"2024-02-22 09:00:02",
factor:"137****1620李某某",
number:8,
status:1,
},{
title:"关于137****1620李某某7天内多次投诉各种事件",
time:"2024-02-22 09:00:02",
factor:"137****1620李某某",
number:8,
status:2,
title:"关于大阳山景区交通拥堵问题",
firstWarnTime:"2024-08-29 09:00:20",
warnFactor:"大阳山景区、交通拥堵",
msgTypeName:"8条"
},{
title:"关于137****1620李某某7天内多次投诉各种事件",
time:"2024-02-22 09:00:02",
factor:"137****1620李某某",
number:8,
status:1,
},{
title:"关于137****1620李某某7天内多次投诉各种事件",
time:"2024-02-22 09:00:02",
factor:"137****1620李某某",
number:8,
status:2,
title:"关于大阳山景区交通拥堵问题",
firstWarnTime:"2024-08-29 09:00:20",
warnFactor:"大阳山景区、交通拥堵",
msgTypeName:"8条"
},
],
tabHeader: null,
total:0,
pagination: {
current: 1,
size: 10,
msgType: '1',
isReport:null,
},
}
},
mounted(){
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
},
destroyed() {
window.removeEventListener('resize', this.cancalDebounce);
},
methods:{
//
onSubmit(formRef){
if(this.activeTab == 1) {
this.pages = {
current: 1,
size: 10
}
this.pages = {...this.pages,...this.form}
this.getList(1,this.pages);
} else if(this.activeTab == 2) {
this.affirmPages = {
current: 1,
size: 10
}
this.affirmPages = {...this.affirmPages,...this.form}
this.getList(2,this.affirmPages);
handleClick(e) {
if (this.activeName == "first") {
this.pagination.isReport = null
this.getList();
} else if (this.activeName == "second") {
this.pagination.isReport = 1
this.getList();
} else if (this.activeName == "third") {
this.pagination.isReport = 2
this.getList();
}
},
//
reset(formRef){
this.$refs[formRef].resetFields();
this.form = {
time: '',
title: '',
//
getPagination(pages) {
this.pagination.current = pages.page;
this.pagination.size = pages.limit;
this.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;
})
},
resetQuery(){
this.formInline = {
title:"",
time:[],
}
if(this.activeTab == 1) {
this.pages = {
current: 1,
size: 10
}
this.getList(1,this.pages);
} else if(this.activeTab == 2) {
this.affirmPages = {
current: 1,
size: 10
}
this.getList(2,this.affirmPages);
this.pagination = {
current: 1,
size: 10,
msgType: '1',
isReport: this.activeName == "first" ? null : this.activeName == "second" ? 1 : this.activeName == "third" ? 2 : null,
}
this.getList();
},
// tab
changeTab(e){
if(e.target.getAttribute("data-info") == "awaitAudit"){
this.activeTab = 1;
}else if(e.target.getAttribute("data-info") == "alreadyAffirm"){
this.activeTab = 2;
handleQuery(){
console.log(this.formInline);
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.getList();
},
//
getPagination(pages){
this.pages.current = pages.page;
this.pages.size = pages.limit;
this.getList(1,this.pages);
},
//
getPaginationAffirm(pages){
this.affirmPages.current = pages.page;
this.affirmPages.size = pages.limit;
this.getList(2,this.affirmPages);
},
//
getList(id,page){
// this.loading = true;
audit(item){
this.$refs.eventAudit.open(item);
},
//
audit(row) {
this.$refs.eventAudit.open(row);
},
//
toDetail(row) {
},
},
mounted() {
this.getList(1,this.pages)
//
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>

@ -1,57 +1,194 @@
<!-- 驾驶舱紧急事件 -->
<template>
<div class="L-app-container">
<header>驾驶舱群体事件</header>
<div class="L-ultimately-container">
<header>驾驶舱紧急事件</header>
<div class="tabs">
<el-tabs
v-model="activeName"
@tab-click="handleClick"
style="color: #edeef0"
>
<el-tab-pane label="待审核" name="first">
<!-- <notFilled v-if="isFirst" :id="null" :status="0"></notFilled> -->
1
</el-tab-pane>
<el-tab-pane label="已上报" name="second">
<!-- <notFilled v-if="isSecond" :id="1" :status="1"></notFilled> -->
2
</el-tab-pane>
<el-tab-pane label="重训练" name="third">
<!-- <notFilled v-if="isThird" :id="2" :status="1"></notFilled> -->
3
</el-tab-pane>
<el-tab-pane label="待审核" name="first" />
<el-tab-pane label="已上报" name="second" />
<el-tab-pane label="重训练" name="third" />
</el-tabs>
</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-item label="事件标题:">
<el-input v-model="formInline.title" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="预警时间:">
<!-- <el-date-picker
class="ignoreElement"
v-model="formInline.firstWarnTime"
format="yyyy"
value-format="yyyy"
type="year"
placeholder="选择年份">
</el-date-picker> -->
<el-date-picker
v-model="formInline.time"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="请选择"
>
</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-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="firstWarnTime" width="300px" prop="firstWarnTime" />
<el-table-column label="预警因素" key="warnFactor" width="400px" prop="warnFactor" />
<el-table-column label="事件数量" key="msgTypeName" width="200px" prop="msgTypeName" />
<el-table-column label="操作" class-name="table-operation-anniu" align="center">
<template slot-scope="scope">
<div @click="audit(scope.row)" class="go-audit">
<img src="@/assets/images/audit.png" alt="">
<span>审核</span>
</div>
</template>
</el-table-column>
</el-table>
<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"
></pagination>
</section>
</div>
<event-audit title="事件审核" ref="eventAudit"></event-audit>
</div>
</template>
<script>
import { colonyPage } from "@/api/eventPage"
import EventAudit from '@/views/components/eventAudit.vue'
export default {
components:{
EventAudit,
},
data() {
return {
activeName: "first",
active: 0,
isFirst : true,
isSecond :false,
isThird : false,
formInline:{
title:"",
time:[],
},
loading: false,
tableData: [
{
title:"关于大阳山景区交通拥堵问题",
firstWarnTime:"2024-08-29 09:00:20",
warnFactor:"大阳山景区、交通拥堵",
msgTypeName:"8条"
},{
title:"关于大阳山景区交通拥堵问题",
firstWarnTime:"2024-08-29 09:00:20",
warnFactor:"大阳山景区、交通拥堵",
msgTypeName:"8条"
},
],
tabHeader: null,
total:0,
pagination: {
current: 1,
size: 10,
msgType: '3',
isReport:null,
},
}
},
mounted(){
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
},
destroyed() {
window.removeEventListener('resize', this.cancalDebounce);
},
methods:{
handleClick(e) {
// console.log(this.activeName);
if (this.activeName == "first") {
this.isFirst = true;
this.isSecond = false;
this.isThird = false;
this.pagination.isReport = null
this.getList();
} else if (this.activeName == "second") {
this.isFirst = false;
this.isSecond = true;
this.isThird = false;
this.pagination.isReport = 1
this.getList();
} else if (this.activeName == "third") {
this.isFirst = false;
this.isSecond = false;
this.isThird = true;
this.pagination.isReport = 2
this.getList();
}
},
//
getPagination(pages) {
this.pagination.current = pages.page;
this.pagination.size = pages.limit;
this.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;
})
},
resetQuery(){
this.formInline = {
title:"",
time:[],
}
this.pagination = {
current: 1,
size: 10,
msgType: '3',
isReport: this.activeName == "first" ? null : this.activeName == "second" ? 1 : this.activeName == "third" ? 2 : null,
}
this.getList();
},
handleQuery(){
console.log(this.formInline);
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.getList();
},
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
const elementHeight = element.offsetHeight;
const headerHeight = header.offsetHeight;
const paginationtHeight = pagination.offsetHeight;
this.tabHeader = elementHeight - headerHeight - paginationtHeight;
}
},
}
</script>

@ -1 +1,197 @@
<!-- 驾驶舱一人多诉事件 -->
<!-- 驾驶舱一人多诉事件 -->
<template>
<div class="L-ultimately-container">
<header>驾驶舱一人多诉事件</header>
<div class="tabs">
<el-tabs
v-model="activeName"
@tab-click="handleClick"
style="color: #edeef0"
>
<el-tab-pane label="待审核" name="first" />
<el-tab-pane label="已上报" name="second" />
<el-tab-pane label="重训练" name="third" />
</el-tabs>
</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-item label="事件标题:">
<el-input v-model="formInline.title" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="预警时间:">
<!-- <el-date-picker
class="ignoreElement"
v-model="formInline.firstWarnTime"
format="yyyy"
value-format="yyyy"
type="year"
placeholder="选择年份">
</el-date-picker> -->
<el-date-picker
v-model="formInline.time"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="请选择"
>
</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-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="firstWarnTime" width="300px" prop="firstWarnTime" />
<el-table-column label="预警因素" key="warnFactor" width="400px" prop="warnFactor" />
<el-table-column label="事件数量" key="msgTypeName" width="200px" prop="msgTypeName" />
<el-table-column label="操作" class-name="table-operation-anniu" align="center">
<template slot-scope="scope">
<div @click="audit(scope.row)" class="go-audit">
<img src="@/assets/images/audit.png" alt="">
<span>审核</span>
</div>
</template>
</el-table-column>
</el-table>
<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"
></pagination>
</section>
</div>
<event-audit title="事件审核" ref="eventAudit"></event-audit>
</div>
</template>
<script>
import { colonyPage } from "@/api/eventPage"
import EventAudit from '@/views/components/eventAudit.vue'
export default {
components:{
EventAudit,
},
data() {
return {
activeName: "first",
active: 0,
formInline:{
title:"",
time:[],
},
loading: false,
tableData: [
{
title:"关于大阳山景区交通拥堵问题",
firstWarnTime:"2024-08-29 09:00:20",
warnFactor:"大阳山景区、交通拥堵",
msgTypeName:"8条"
},{
title:"关于大阳山景区交通拥堵问题",
firstWarnTime:"2024-08-29 09:00:20",
warnFactor:"大阳山景区、交通拥堵",
msgTypeName:"8条"
},
],
tabHeader: null,
total:0,
pagination: {
current: 1,
size: 10,
msgType: '5',
isReport:null,
},
}
},
mounted(){
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
},
destroyed() {
window.removeEventListener('resize', this.cancalDebounce);
},
methods:{
handleClick(e) {
if (this.activeName == "first") {
this.pagination.isReport = null
this.getList();
} else if (this.activeName == "second") {
this.pagination.isReport = 1
this.getList();
} else if (this.activeName == "third") {
this.pagination.isReport = 2
this.getList();
}
},
//
getPagination(pages) {
this.pagination.current = pages.page;
this.pagination.size = pages.limit;
this.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;
})
},
resetQuery(){
this.formInline = {
title:"",
time:[],
}
this.pagination = {
current: 1,
size: 10,
msgType: '5',
isReport: this.activeName == "first" ? null : this.activeName == "second" ? 1 : this.activeName == "third" ? 2 : null,
}
this.getList();
},
handleQuery(){
console.log(this.formInline);
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.getList();
},
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
const elementHeight = element.offsetHeight;
const headerHeight = header.offsetHeight;
const paginationtHeight = pagination.offsetHeight;
this.tabHeader = elementHeight - headerHeight - paginationtHeight;
}
},
}
</script>
<style lang="scss" scoped>
</style>

@ -1 +1,197 @@
<!-- 驾驶舱同人同述事件 -->
<!-- 驾驶舱同人同述事件 -->
<template>
<div class="L-ultimately-container">
<header>驾驶舱同人同述事件</header>
<div class="tabs">
<el-tabs
v-model="activeName"
@tab-click="handleClick"
style="color: #edeef0"
>
<el-tab-pane label="待审核" name="first" />
<el-tab-pane label="已上报" name="second" />
<el-tab-pane label="重训练" name="third" />
</el-tabs>
</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-item label="事件标题:">
<el-input v-model="formInline.title" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="预警时间:">
<!-- <el-date-picker
class="ignoreElement"
v-model="formInline.firstWarnTime"
format="yyyy"
value-format="yyyy"
type="year"
placeholder="选择年份">
</el-date-picker> -->
<el-date-picker
v-model="formInline.time"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="请选择"
>
</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-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="firstWarnTime" width="300px" prop="firstWarnTime" />
<el-table-column label="预警因素" key="warnFactor" width="400px" prop="warnFactor" />
<el-table-column label="事件数量" key="msgTypeName" width="200px" prop="msgTypeName" />
<el-table-column label="操作" class-name="table-operation-anniu" align="center">
<template slot-scope="scope">
<div @click="audit(scope.row)" class="go-audit">
<img src="@/assets/images/audit.png" alt="">
<span>审核</span>
</div>
</template>
</el-table-column>
</el-table>
<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"
></pagination>
</section>
</div>
<event-audit title="事件审核" ref="eventAudit"></event-audit>
</div>
</template>
<script>
import { colonyPage } from "@/api/eventPage"
import EventAudit from '@/views/components/eventAudit.vue'
export default {
components:{
EventAudit,
},
data() {
return {
activeName: "first",
active: 0,
formInline:{
title:"",
time:[],
},
loading: false,
tableData: [
{
title:"关于大阳山景区交通拥堵问题",
firstWarnTime:"2024-08-29 09:00:20",
warnFactor:"大阳山景区、交通拥堵",
msgTypeName:"8条"
},{
title:"关于大阳山景区交通拥堵问题",
firstWarnTime:"2024-08-29 09:00:20",
warnFactor:"大阳山景区、交通拥堵",
msgTypeName:"8条"
},
],
tabHeader: null,
total:0,
pagination: {
current: 1,
size: 10,
msgType: '2',
isReport:null,
},
}
},
mounted(){
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
},
destroyed() {
window.removeEventListener('resize', this.cancalDebounce);
},
methods:{
handleClick(e) {
if (this.activeName == "first") {
this.pagination.isReport = null
this.getList();
} else if (this.activeName == "second") {
this.pagination.isReport = 1
this.getList();
} else if (this.activeName == "third") {
this.pagination.isReport = 2
this.getList();
}
},
//
getPagination(pages) {
this.pagination.current = pages.page;
this.pagination.size = pages.limit;
this.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;
})
},
resetQuery(){
this.formInline = {
title:"",
time:[],
}
this.pagination = {
current: 1,
size: 10,
msgType: '2',
isReport: this.activeName == "first" ? null : this.activeName == "second" ? 1 : this.activeName == "third" ? 2 : null,
}
this.getList();
},
handleQuery(){
console.log(this.formInline);
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.getList();
},
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
const elementHeight = element.offsetHeight;
const headerHeight = header.offsetHeight;
const paginationtHeight = pagination.offsetHeight;
this.tabHeader = elementHeight - headerHeight - paginationtHeight;
}
},
}
</script>
<style lang="scss" scoped>
</style>
Loading…
Cancel
Save