Commit a674e78e authored by dupengyu's avatar dupengyu

轮询管理、告警等

parent b1d21bb3
......@@ -2,16 +2,15 @@ import request from '@/utils/request'
// 运行报表
export function chartInfo(params) {
return request({
url: '/xxl-job-admin/chartInfo',
url: '/device/chartInfo',
method: 'post',
params
})
}
// 任务管理
export function jobinfoList(data) {
return request({
url: '/xxl-job-admin/jobinfo/pageList',
url: '/device/jobinfo/pageList',
method: 'post',
data
})
......@@ -19,7 +18,7 @@ export function jobinfoList(data) {
// 调度日志
export function joblogList(data) {
return request({
url: '/xxl-job-admin/joblog/pageList',
url: '/device/joblog/pageList',
method: 'post',
data
})
......@@ -28,7 +27,7 @@ export function joblogList(data) {
// 执行器管理
export function jobgroupList(data) {
return request({
url: '/xxl-job-admin/jobgroup/pageList',
url: '/device/jobgroup/pageList',
method: 'post',
data
})
......
import request from '@/utils/request'
export function selectFeederPage(params) {
export function selectFeederPage(data) {
return request({
url: '/device/sync/selectFeederPage',
method: 'post',
params
data
})
}
......@@ -69,6 +69,12 @@ export const constantRoutes = [
component: () => import('@/views/setting/add/index'),
meta: { title: '手动添加配置' }
},
{
path: 'auto',
name: 'settingAuto',
component: () => import('@/views/setting/auto/index'),
meta: { title: '自动添加配置' }
},
{
path: 'statistics',
name: 'settingAtatistics',
......
......@@ -33,7 +33,6 @@ function endLoading(el) {
// request interceptor
service.interceptors.request.use(
config => {
console.log(config)
// do something before request is sent
startLoading(config.el)
// config.data = json.dumps(config.data)
......@@ -52,7 +51,6 @@ service.interceptors.request.use(
}
)
// response interceptor
let errorShowing = false
service.interceptors.response.use(
response => {
......
......@@ -11,7 +11,8 @@ const path = {
alarmConfirmStatusStatistics: 'api/sysMonitorAlarmStatistics/alarmConfirmStatusStatistics',
alarmLevelStatistics: '/api/sysMonitorAlarmStatistics/alarmLevelStatistics',
alarmLevelCountStatistics: '/api/sysMonitorAlarmStatistics/alarmLevelCountStatistics'
alarmLevelCountStatistics: '/api/sysMonitorAlarmStatistics/alarmLevelCountStatistics',
selectPage: '/api/sysMonitorAlarmStatistics/selectPage'
}
export function cableTimeList() {
......@@ -45,4 +46,8 @@ export function alarmLevelStatistics() {
export function alarmLevelCountStatistics() {
return request.post(path.alarmLevelCountStatistics, ...arguments);
}
export function selectPage() {
return request.post(path.selectPage, ...arguments);
}
......@@ -126,8 +126,7 @@
<div id="chart3" style="width: 100%; height: 300px"></div>
</div>
</div>
<div>
<!-- :cell-class-name="cellClassFn" -->
<div class="table">
<el-table
:data="tableData"
style="width: 100%"
......@@ -141,7 +140,7 @@
/>
<el-table-column
prop="siteName"
label="告警对象编号"
label="告警基站名称"
width="180"
align="center"
/>
......@@ -152,34 +151,33 @@
align="center"
/>
<el-table-column
prop="siteName"
prop="alarmType"
label="告警类型"
width="150"
align="center"
/>
>
<template slot-scope="scope">
{{ alarmType[scope.row.alarmType] }}
</template>
</el-table-column>
<el-table-column
prop="siteName"
prop="alarmLevel"
label="告警级别"
width="150"
align="center"
/>
<el-table-column prop="alarmInfo" label="告警状态" align="center">
>
<template slot-scope="scope">
<div
v-for="(item, index) in scope.row.alarmInfo"
:key="index"
:class="levelStyle[item.level]"
>
<span>距离:{{ item.distance }}</span
>&nbsp;&nbsp;
<span>驻波比:{{ item.value }}</span>
</div>
<div>漏缆百米损耗: {{ scope.row.lossValue }}</div>
{{ alarmLeval[scope.row.alarmLevel] }}
</template>
</el-table-column>
<el-table-column prop="confirmStatus" label="告警状态" align="center">
<template slot-scope="scope">
{{ confirmStatus[scope.row.confirmStatus] }}
</template>
</el-table-column>
<el-table-column
prop="confirmTime"
prop="creationTime"
label="告警产生时间"
width="180"
align="center"
......@@ -192,6 +190,13 @@
</template>
</el-table-column>
</el-table>
<Pagination
:limit="params.size"
:page="params.current"
:total="total"
class="pagination"
@pagination="handlePageChange"
/>
</div>
</div>
</div>
......@@ -205,11 +210,17 @@ import {
alarmConfirmStatusStatistics,
alarmLevelStatistics,
alarmLevelCountStatistics,
selectPage,
} from "../api";
export default {
data() {
return {
form: {},
params: {
current: 1,
size: 10,
},
total: 10,
dateRange: [],
value: "",
alarmLeval,
......@@ -226,13 +237,23 @@ export default {
};
},
mounted() {
this.handlealArmConfirmStatusStatistics();
this.handlealArmLevelStatistics();
this.handleAlarmLevelCountStatistics();
this.handleInIt();
},
methods: {
handleInIt() {
this.handlealArmConfirmStatusStatistics();
this.handlealArmLevelStatistics();
this.handleAlarmLevelCountStatistics();
this.handleSelectPage();
},
async handlealArmConfirmStatusStatistics() {
let res = await alarmConfirmStatusStatistics(this.form);
let data = res.map((item) => {
return {
name: confirmStatus[item.confirmStatus],
value: item.alarmCount,
};
});
if (this.myChart.chart1 != null) {
this.myChart.chart1.dispose();
}
......@@ -248,16 +269,10 @@ export default {
},
series: [
{
name: "Access From",
name: "告警状态",
type: "pie",
radius: "50%",
data: [
{ value: 1048, name: "Search Engine" },
{ value: 735, name: "Direct" },
{ value: 580, name: "Email" },
{ value: 484, name: "Union Ads" },
{ value: 300, name: "Video Ads" },
],
data: data,
emphasis: {
itemStyle: {
shadowBlur: 10,
......@@ -272,6 +287,12 @@ export default {
},
async handlealArmLevelStatistics() {
let res = await alarmLevelStatistics(this.form);
let data = res.map((item) => {
return {
name: alarmLeval[item.alarmLevel],
value: item.alarmCount,
};
});
if (this.myChart.chart2 != null) {
this.myChart.chart2.dispose();
}
......@@ -288,7 +309,7 @@ export default {
},
series: [
{
name: "Access From",
name: "告警级别",
type: "pie",
radius: ["40%", "70%"],
avoidLabelOverlap: false,
......@@ -306,13 +327,7 @@ export default {
labelLine: {
show: false,
},
data: [
{ value: 1048, name: "Search Engine" },
{ value: 735, name: "Direct" },
{ value: 580, name: "Email" },
{ value: 484, name: "Union Ads" },
{ value: 300, name: "Video Ads" },
],
data: data,
},
],
};
......@@ -320,6 +335,25 @@ export default {
},
async handleAlarmLevelCountStatistics() {
let res = await alarmLevelCountStatistics(this.form);
let xData = [...new Set(res.map((item) => item.alarmDate))];
let t1 = res
.filter((item) => item.confirmStatus == 0)
.map((item) => {
return item.alarmCount;
});
let t2 = res
.filter((item) => item.confirmStatus == 1)
.map((item) => {
return item.alarmCount;
});
let t3 = res
.filter((item) => item.confirmStatus == 2)
.map((item) => {
return item.alarmCount;
});
let t4 = t1.map((value, index) => {
return value + (t2[index] || 0) + (t3[index] || 0);
});
if (this.myChart.chart3 != null) {
this.myChart.chart3.dispose();
}
......@@ -337,20 +371,20 @@ export default {
},
},
toolbox: {
feature: {
dataView: { show: true, readOnly: false },
magicType: { show: true, type: ["line", "bar"] },
restore: { show: true },
saveAsImage: { show: true },
},
// feature: {
// dataView: { show: true, readOnly: false },
// magicType: { show: true, type: ["line", "bar"] },
// restore: { show: true },
// saveAsImage: { show: true },
// },
},
legend: {
data: ["Evaporation", "Precipitation", "Temperature"],
data: ["紧急告警", "重要告警", "一般告警", "告警趋势"],
},
xAxis: [
{
type: "category",
data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
data: xData,
axisPointer: {
type: "shadow",
},
......@@ -359,69 +393,55 @@ export default {
yAxis: [
{
type: "value",
name: "Precipitation",
min: 0,
max: 250,
interval: 50,
axisLabel: {
formatter: "{value} ml",
},
},
{
type: "value",
name: "Temperature",
name: "单位:条",
min: 0,
max: 25,
interval: 5,
axisLabel: {
formatter: "{value} °C",
formatter: "{value}",
},
},
],
series: [
{
name: "Evaporation",
name: "紧急告警",
type: "bar",
tooltip: {
valueFormatter: function (value) {
return value + " ml";
},
},
data: [
2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4,
3.3,
],
data: t3,
},
{
name: "Precipitation",
name: "重要告警",
type: "bar",
tooltip: {
valueFormatter: function (value) {
return value + " ml";
},
},
data: [
2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0,
2.3,
],
data: t2,
},
{
name: "Temperature",
name: "一般告警",
type: "bar",
data: t1,
},
{
name: "告警趋势",
type: "line",
yAxisIndex: 1,
tooltip: {
valueFormatter: function (value) {
return value + " °C";
},
},
data: [
2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2,
],
smooth: true,
data: t4,
},
],
};
option && this.myChart.chart3.setOption(option);
},
async handleSelectPage() {
let data = {
...this.form,
...this.params,
};
let res = await selectPage(data);
this.tableData = res.records;
this.total = res.total;
console.log(res);
},
// 分页更改
handlePageChange(pageData) {
this.params.size = pageData.size;
this.params.current = pageData.page;
this.handleInIt();
},
getInit() {},
reset() {
this.dateRange = [];
......@@ -431,6 +451,7 @@ export default {
this.form.startUploadTime = this.dateRange[0];
this.form.endUploadTime = this.dateRange[1];
// this.$emit("search", this.form);
this.handleInIt();
},
handlePrint() {
printToPdf("print");
......@@ -477,19 +498,22 @@ export default {
}
#print {
width: 100%;
}
.both {
display: flex;
justify-content: space-between;
gap: 16px;
.both {
display: flex;
justify-content: space-between;
gap: 16px;
.card {
flex: 1;
}
}
.card {
flex: 1;
margin-bottom: 16px;
padding: 16px;
border-radius: 8px;
border: 1px solid #d7d7d7;
}
.table {
width: 100%;
}
}
.card {
margin-bottom: 16px;
padding: 16px;
border-radius: 8px;
border: 1px solid #d7d7d7;
}
</style>
\ No newline at end of file
......@@ -8,43 +8,45 @@ function printToPdf(targetId) {
performPrint(targetId);
}
}
function performPrint(targetId) {
const targetElement = document.getElementById(targetId);
console.log(targetElement)
if (!targetElement) {
console.error('Element with ID'+ targetId +'not found.');
console.error('Element with ID' + targetId + 'not found.');
return;
}
// 将不希望展示的元素隐藏掉
// 克隆目标元素及其子元素
const clonedElement = targetElement.cloneNode(true);
clonedElement.style.width = '320mm'
// clonedElement.style.width = '200mm'
// 在打印之前隐藏所有元素
function hideAllElements() {
document.getElementById('app').style.display = 'none'
// 将克隆的元素添加到body中
document.body.appendChild(clonedElement);
}
// 在打印结束后恢复所有元素
function showAllElements() {
document.body.removeChild(clonedElement);
document.getElementById('app').style.display = ''
}
// 添加事件监听器以在打印之前和之后执行操作
window.addEventListener('beforeprint', hideAllElements);
window.addEventListener('afterprint', showAllElements);
// 触发打印
window.print();
// 打印完成后移除事件监听器
window.removeEventListener('beforeprint', hideAllElements);
window.removeEventListener('afterprint', showAllElements);
}
// 调用函数
export default printToPdf
\ No newline at end of file
<template>
<div>
<div>任务管理</div>
<div class="search"></div>
<div>
<el-table
:data="tableData"
style="width: 100%"
:header-cell-style="{ background: '#EAF1FE', color: '#666666' }"
>
<el-table-column label="任务ID" align="center" />
<el-table-column prop="siteName" label="任务描述" align="center" />
<el-table-column prop="alarmName" label="调度类型" align="center" />
<el-table-column prop="alarmType" label="运行模式" align="center" />
<el-table-column prop="alarmLevelName" label="负责人" align="center" />
<el-table-column prop="alarmLevelName" label="状态" align="center" />
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button type="text" @click="eliminate(scope.row)"
>操作</el-button
>
</template>
</el-table-column>
</el-table>
</div>
</div>
</template>
<script>
import { jobinfoList } from "@/api/job.js";
export default {
data() {
return {
tableData: [],
};
},
mounted() {},
methods: {},
};
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<template>
<div>
<div>调度日志</div>
<div class="search"></div>
<div>
<el-table
:data="tableData"
style="width: 100%"
:header-cell-style="{ background: '#EAF1FE', color: '#666666' }"
>
<el-table-column label="任务ID" align="center" />
<el-table-column prop="siteName" label="调度时间" align="center" />
<el-table-column prop="alarmName" label="调度结果" align="center" />
<el-table-column prop="alarmType" label="调度备注" align="center" />
<el-table-column prop="alarmType" label="执行时间" align="center" />
<el-table-column prop="alarmType" label="执行结果" align="center" />
<el-table-column
prop="alarmLevelName"
label="执行备注"
align="center"
/>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button type="text" @click="eliminate(scope.row)"
>操作</el-button
>
</template>
</el-table-column>
</el-table>
</div>
</div>
</template>
<script>
import { joblogList } from "@/api/job.js";
export default {
data() {
return {
tableData: [],
};
},
mounted() {
this.handleJoblogList();
},
methods: {
async handleJoblogList() {
let data = {
jobGroup: 0,
jobId: 0,
logStatus: -1,
filterTime: "2024-12-09 00:00:00 - 2025-01-09 23:59:59",
start: 0,
length: 10,
};
const queryParams = new URLSearchParams(data).toString();
// const formData = new FormData();
// Object.keys(data).map((key) => {
// formData.append(key, data[key]);
// });
// let formdata=new FormData();
// formdata.append('jobGroup', 0);
// formdata.append('jobId', 0);
// formdata.append('logStatus', -1);
// formdata.append('filterTime', '2024-12-09 00:00:00 - 2025-01-09 23:59:59');
// formdata.append('start', );
// formdata.append('logStatus', -1);
const res = await joblogList(queryParams);
console.log(res);
this.tableData = res;
},
},
};
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<template>
<div>
<div>执行器管理</div>
<div class="search"></div>
<div>
<el-table
:data="tableData"
style="width: 100%"
:header-cell-style="{ background: '#EAF1FE', color: '#666666' }"
>
<el-table-column label="AppName" prop="appname" align="center" />
<el-table-column prop="title" label="名称" align="center" />
<el-table-column prop="addressType" label="注册方式" align="center" />
<el-table-column
prop="registryList"
label="OnLine 机器地址"
align="center"
/>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button type="text" @click="eliminate(scope.row)"
>操作</el-button
>
</template>
</el-table-column>
</el-table>
</div>
</div>
</template>
<script>
import { jobgroupList } from "@/api/job.js";
export default {
data() {
return {
tableData: [],
};
},
mounted() {
this.handleJobGroupList();
},
methods: {
async handleJobGroupList() {
const res = await jobgroupList();
console.log(res);
this.tableData = res;
},
},
};
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<template>
<div class="">
<div class="card">
<div class="card-body">
<div class="icon"></div>
<div>
<div class="title"></div>
<div class="num"></div>
<div
class="card-body"
:style="`background-color:${item.color}`"
v-for="(item, index) in topList"
:key="index"
>
<div class="icon">
<i :class="item.icon"></i>
</div>
<div class="other">
<div class="title">{{ item.title }}</div>
<div class="num">{{ item.num }}</div>
<div class="line"></div>
<div class="msg">{{ item.msg }}</div>
</div>
</div>
</div>
<div class="table">
<div class="date">
<div id="chart1" style="width: 100%; height: 500px"></div>
</div>
<div class="per">
<div id="chart2" style="width: 100%; height: 500px"></div>
</div>
</div>
</div>
......@@ -14,9 +31,14 @@
<script>
import { chartInfo } from "@/api/job.js";
import * as echarts from "echarts";
export default {
data() {
return {
myChart: {
chart1: null,
chart2: null,
},
topList: [
{
title: "设备总数",
......@@ -47,14 +69,141 @@ export default {
this.handleChartInfo();
},
methods: {
async handleChartInfo(){
console.log('---');
let res = await chartInfo({});
// console.log(res);
}
async handleChartInfo() {
let res = await chartInfo({});
this.chartInfo = res.content;
if (this.myChart.chart1 != null) {
this.myChart.chart1.dispose();
}
let chartDom = document.getElementById("chart1");
this.myChart.chart1 = echarts.init(chartDom);
let option;
option = {
title: {
text: "日期分布图",
},
tooltip: {
trigger: "axis",
},
legend: {
data: ["成功", "失败", "进行中"],
},
xAxis: {
type: "category",
data: this.chartInfo.triggerDayList,
},
yAxis: {
type: "value",
},
series: [
{
name: "成功",
data: this.chartInfo.triggerDayCountSucList,
type: "line",
},
{
name: "失败",
data: this.chartInfo.triggerDayCountFailList,
type: "line",
},
{
name: "进行中",
data: this.chartInfo.triggerDayCountRunningList,
type: "line",
},
],
};
option && this.myChart.chart1.setOption(option);
if (this.myChart.chart2 != null) {
this.myChart.chart2.dispose();
}
let chart2Dom = document.getElementById("chart2");
this.myChart.chart2 = echarts.init(chart2Dom);
let option2;
option2 = {
title: {
text: "成功比例图",
left: "center",
},
tooltip: {
trigger: "item",
},
legend: {
orient: "vertical",
left: "left",
},
series: [
{
name: "数量",
type: "pie",
radius: "50%",
data: [
{ value: this.chartInfo.triggerCountSucTotal, name: "成功" },
{ value: this.chartInfo.triggerCountFailTotal, name: "失败" },
{
value: this.chartInfo.triggerCountRunningTotal,
name: "进行中",
},
],
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: "rgba(0, 0, 0, 0.5)",
},
},
},
],
};
option && this.myChart.chart2.setOption(option2);
},
},
};
</script>
<style lang="scss" scoped>
.card {
display: flex;
justify-content: space-between;
gap: 20px;
.card-body {
width: 33%;
display: flex;
height: 100px;
.icon {
width: 100px;
height: 100px;
min-width: 100px;
font-size: 48px;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
background-color: rgba($color: #37383a, $alpha: 0.15);
}
.other {
padding: 12px;
color: #fff;
width: 100%;
.line {
background: #fff;
width: 100%;
height: 1px;
margin: 8px 0;
}
}
}
}
.table {
display: flex;
width: 100%;
margin-top: 48px;
.date {
width: 60%;
}
.per {
width: 40%;
}
}
</style>
\ No newline at end of file
......@@ -13,8 +13,8 @@ const path = {
sitesave: 'api/site/save',
sitebatchDelete: 'api/site/batchDelete',
siteselectList: 'api/site/selectList',
selectForSite:'api/site/selectForSite',//铁路查站点
updateSiteConf:'api/site/updateSiteConf',
selectForSite: 'api/site/selectForSite',//铁路查站点
updateSiteConf: 'api/site/updateSiteConf',
fsuList: 'api/fsu/selectPage',
fsudetail: 'api/fsu/detail',
......@@ -24,7 +24,7 @@ const path = {
selectForFsu: 'api/fsu/selectForFsu',
updateFsuConf: 'api/fsu/updateFsuConf',
selectFsuItem:'api/dict/selectFsuItem',//fsu数据字典
selectFsuItem: 'api/dict/selectFsuItem',//fsu数据字典
monitorEquipList: 'api/monitorEquip/selectPage',
monitorEquipdetail: 'api/monitorEquip/detail',
......@@ -32,8 +32,8 @@ const path = {
monitorEquipbatchDelete: 'api/monitorEquip/batchDeleteEquip',
monitorEquipselectList: 'api/monitorEquip/selectList',
selectForEquip: 'api/monitorEquip/selectForEquip',
selectMonitorItem:'api/dict/selectMonitorItem',//监测设备字典
updateMonitorEquipConf:'api/monitorEquip/updateMonitorEquipConf',
selectMonitorItem: 'api/dict/selectMonitorItem',//监测设备字典
updateMonitorEquipConf: 'api/monitorEquip/updateMonitorEquipConf',
leakyCableList: 'api/leakyCable/selectPage',
leakyCabledetail: 'api/leakyCable/detail',
......@@ -48,6 +48,10 @@ const path = {
antennaFeederDetail: 'api/antennaFeeder/detail',
antennaFeederList: 'api/antennaFeeder/selectFeederPage',
updateFeederConf: 'api/antennaFeeder/updateFeederConf',
autoList: '/device/autoAdd/selectPage',
waveStatistics:'/device/sampling/waveStatistics',
samplingList:'/device/sampling/selectPage',
}
// 铁路线
export function railWaylist() {
......@@ -81,7 +85,7 @@ export function sitedetail() {
}
export function sitesave() {
return request.post(path.sitesave, ...arguments);
}
}
export function sitebatchDelete() {
return request.post(path.sitebatchDelete, ...arguments);
}
......@@ -185,4 +189,25 @@ export function antennaFeederList() {
}
export function updateFeederConf() {
return request.post(path.updateFeederConf, ...arguments);
}
// 自动添加配置
export function autoList() {
return request.post(path.autoList, ...arguments);
}
// 漏缆链路及天馈接口驻波比数据趋势分析
export function waveStatistics(params) {
return request({
url: path.waveStatistics,
method: 'post',
params
})
}
// 漏缆链路及天馈接口驻波比数据趋势分析 列表
export function samplingList(params) {
return request({
url: path.samplingList,
method: 'post',
params
})
}
\ No newline at end of file
<template>
<div>
<div class="list">
<el-table
:data="tableData"
style="width: 100%"
:header-cell-style="{ background: '#EAF1FE', color: '#666666' }"
>
<el-table-column type="index" label="序号" width="100" align="center" />
<el-table-column
prop="equipCode"
label="设备编号"
align="center"
/>
<el-table-column
prop="addResult"
label="操作回执"
align="center"
/>
<el-table-column
prop="addLog"
label="操作日志"
align="center"
/>
<el-table-column
prop="addTime"
label="添加时间"
align="center"
/>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button type="text" @click="confirmAlarm(scope.row)"
>详情</el-button
>
</template>
</el-table-column>
</el-table>
<Pagination
:limit="params.size"
:page="params.current"
:total="total"
class="pagination"
@pagination="handlePageChange"
/>
</div>
</div>
</template>
<script>
import { autoList } from "../api.js";
export default {
data() {
return {
tableData: [],
params: {
current: 1,
size: 10,
},
total: 10,
};
},
mounted() {
this.handleAutoList();
},
methods: {
async handleAutoList() {
let res = await autoList(this.params);
this.tableData = res.records;
this.total = res.total;
},
handlePageChange(pageData) {
this.params.size = pageData.size;
this.params.current = pageData.page;
this.handleAutoList();
},
},
};
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
......@@ -8,10 +8,15 @@
@click="getInit"
>刷新</el-button
>
<el-button type="primary" icon="el-icon-search" @click="isQuery = !isQuery">查询</el-button>
<el-button
type="primary"
icon="el-icon-search"
@click="isQuery = !isQuery"
>查询</el-button
>
</div>
<el-form
v-show="isQuery"
v-show="isQuery"
class="search-form"
ref="form"
:model="form"
......@@ -130,24 +135,32 @@
align="center"
/>
<el-table-column
prop="confirmTime"
prop="reportTime"
label="采集时间"
width="180"
align="center"
/>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button type="text" @click="confirmAlarm(scope.row)"
<el-button type="text" @click="handleView(scope.row)"
>详情</el-button
>
</template>
</el-table-column>
</el-table>
<Pagination
:limit="params.size"
:page="params.current"
:total="total"
class="pagination"
@pagination="handlePageChange"
/>
</div>
</div>
</template>
<script>
import { waveStatistics, samplingList } from "../api.js";
export default {
data() {
return {
......@@ -156,10 +169,52 @@ export default {
value: "",
options: [],
tableData: [],
isQuery:false,
isQuery: false,
params: {
current: 1,
size: 10,
},
total: 10,
};
},
mounted() {
this.handleWaveStatistics();
this.handleSamplingList();
},
methods: {
handleView(){},
formatDate(date) {
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, "0");
const day = String(date.getDate()).padStart(2, "0");
const hours = String(date.getHours()).padStart(2, "0");
const minutes = String(date.getMinutes()).padStart(2, "0");
const seconds = String(date.getSeconds()).padStart(2, "0");
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
},
async handleWaveStatistics() {
let data = {
startDate: "",
endDate: "",
};
if (!this.dateRange.length) {
data.startDate = this.formatDate(
new Date(new Date().getTime() - 3600 * 1000 * 24 * 7)
);
data.endDate = this.formatDate(new Date());
}
let res = await waveStatistics(data);
},
async handleSamplingList() {
let res = await samplingList(this.params);
this.tableData = res.records;
this.total = res.total;
},
handlePageChange(pageData) {
this.params.size = pageData.size;
this.params.current = pageData.page;
this.handleSamplingList();
},
getInit() {},
reset() {},
toSearch() {},
......
......@@ -73,7 +73,7 @@ export default {
this.handleSelectFeederPage();
},
async handleSelectFeederPage() {
let res = await selectFeederPage({});
let res = await selectFeederPage(this.params);
this.tableData = res.records;
this.total = res.total;
},
......
......@@ -8,12 +8,14 @@ function resolve(dir) {
const name = defaultSettings.title || '漏缆故障定位监测系统' // page title
const port = process.env.port || process.env.npm_config_port || 8886 // dev port
const href = 'http://101.126.159.207'
// const href = 'http://192.168.0.121'
const rewriteDefaultConfig = {
changeOrigin: true,
target: 'http://101.126.159.207:8886',
target: href + ':8886',
// target: 'http://192.168.0.127:8886',
// target: 'http://192.168.0.121:8886',
// ws: true,
headers: {
referer: 'laddercloud.cn'
......@@ -21,19 +23,9 @@ const rewriteDefaultConfig = {
}
const rewriteDeviceConfig = {
changeOrigin: true,
target: 'http://101.126.159.207:8087',
target: href + ':8087',
// target: 'http://192.168.0.127:8886',
// ws: true,
headers: {
referer: 'laddercloud.cn'
},
}
const rewriteAdminConfig = {
changeOrigin: true,
target: 'http://101.126.159.207:8887',
// target: 'http://192.168.0.127:8886',
// target: 'http://192.168.0.121:8087',
// ws: true,
headers: {
referer: 'laddercloud.cn'
......@@ -57,7 +49,6 @@ module.exports = {
proxy: {
'/api': rewriteDefaultConfig,
'/device': rewriteDeviceConfig,
'/xxl-job-admin': rewriteAdminConfig
},
},
configureWebpack: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment