Commit 50531ea6 authored by yanzhongrong's avatar yanzhongrong

Merge branch 'dev_yzr' into dev

parents 9caaa558 7bc0407d
import request from '@/utils/request'
const path = {
MonitorStatusList: 'sysHistoryMonitorStatus/selectPage',
MonitorStatusDelete: 'sysHistoryMonitorStatus/batchDeleteHistoryMonitorStatus',
MonitorMaintainList: 'sysHistoryMonitorMaintain/selectPage',
MonitorMaintainDelete: 'sysHistoryMonitorMaintain/selectPage',
ConnectStatusList: 'sysHistoryConnectStatus/selectPage',
ConnectStatusDelete: 'sysHistoryConnectStatus/batchDeleteHistoryConnectStatus',
ConnectMaintainList: 'sysHistoryConnectMaintain/selectPage',
ConnectMaintainDelete: 'sysHistoryConnectMaintain/batchDeleteHistoryConnectMaintain',
}
export function MonitorStatusList() {
return request.post(path.MonitorStatusList, ...arguments)
}
export function MonitorStatusDelete() {
return request.post(path.MonitorStatusDelete, ...arguments)
}
export function MonitorMaintainList() {
return request.post(path.MonitorMaintainList, ...arguments)
}
export function MonitorMaintainDelete() {
return request.post(path.MonitorMaintainDelete, ...arguments)
}
export function ConnectStatusList() {
return request.post(path.ConnectStatusList, ...arguments)
}
export function ConnectStatusDelete() {
return request.post(path.ConnectStatusDelete, ...arguments)
}
export function ConnectMaintainList() {
return request.post(path.ConnectMaintainList, ...arguments)
}
export function ConnectMaintainDelete() {
return request.post(path.ConnectMaintainDelete, ...arguments)
}
export const ConnectStatusEnum = {
0: '连接正常',
1: '连接异常'
}
\ No newline at end of file
...@@ -7,184 +7,92 @@ ...@@ -7,184 +7,92 @@
<el-button <el-button
:type="multipleSelection.length ? 'primary' : 'info'" :type="multipleSelection.length ? 'primary' : 'info'"
:disabled="!multipleSelection.length" :disabled="!multipleSelection.length"
@click="toDelete"
>删除</el-button >删除</el-button
> >
<el-button type="primary">刷新</el-button> <el-button type="primary" @click="getTableData">刷新</el-button>
<el-button type="primary">查询</el-button> <el-button type="primary">查询</el-button>
<el-button type="primary">导出</el-button> <el-button type="primary">导出</el-button>
<el-button type="primary">清空数据</el-button> <el-button type="primary">清空数据</el-button>
</div> </div>
</div> </div>
<el-table <el-table
:data="tableData2" :data="tableData"
style="width: 100%" style="width: 100%"
:cell-class-name="cellClassFn" :cell-class-name="cellClassFn"
:header-cell-style="{ background: '#EAF1FE', color: '#666666' }" :header-cell-style="{ background: '#EAF1FE', color: '#666666' }"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column prop="startPointDeviceName" label="网元设备" align="center" />
<el-table-column prop="netDevice" label="网元设备" align="center" />
<el-table-column <el-table-column
prop="linkStatus" prop="pointConnectStatus_text"
label="连接状态" label="连接状态"
width="150" width="150"
align="center" align="center"
> >
</el-table-column> </el-table-column>
<el-table-column prop="netDevice2" label="网元设备" align="center"> <el-table-column prop="endPointDeviceName" label="网元设备" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="repairPerson" label="维修人员信息" align="center"> <el-table-column prop="userName" label="维修人员信息" align="center">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="linkRepairDate" prop="connectAlarmMaintainTime"
label="连接告警维修时间" label="连接告警维修时间"
align="center" align="center"
/> />
</el-table> </el-table>
<Pagination <Pagination
:limit="searchForm.pageSize" :limit="params.size"
:page="searchForm.pageNum" :page="params.current"
:total="total" :total="total"
class="pagination" class="pagination"
@pagination="handlePageChange" @pagination="handlePageChange"
> />
</Pagination>
</div> </div>
</template> </template>
<script> <script>
import Pagination from "@/components/Pagination"; import { ConnectMaintainList, ConnectMaintainDelete } from '../api'
import { ConnectStatusEnum } from '../const'
export default { export default {
props: [],
components: { Pagination },
data() { data() {
return { return {
multipleSelection: [], multipleSelection: [],
searchForm: { ConnectStatusEnum,
pageNum: 1, params: {
pageSize: 10, current: 1,
size: 10,
}, },
total: 14, total: 14,
tableData2:[], tableData: [],
tableData: [
{
netDevice: "监控中心LSC",
linkStatus: "连接异常",
netDevice2: "现场管理单元 K65+308",
repairPerson: "张三",
linkRepairDate: "2022/12/18 11:59:42",
},
{
netDevice: "现场管理单元 K65+308",
linkStatus: "连接正常",
netDevice2: "故障定位单元 K64+287",
linkRepairDate: "2022/12/18 11:59:42",
repairPerson: "张三",
},
{
netDevice: "监控中心LSC",
linkStatus: "连接异常",
netDevice2: "现场管理单元 K65+308",
linkRepairDate: "2022/12/18 11:59:42",
repairPerson: "张三",
},
{
netDevice: "监控中心LSC",
linkStatus: "连接异常",
netDevice2: "现场管理单元 K65+308",
linkRepairDate: "2022/12/18 11:59:42",
repairPerson: "张三",
},
{
netDevice: "监控中心LSC",
linkStatus: "连接异常",
netDevice2: "现场管理单元 K65+308",
linkRepairDate: "2022/12/18 11:59:42",
repairPerson: "张三",
},
{
netDevice: "现场管理单元 K65+308",
linkStatus: "连接正常",
netDevice2: "故障定位单元 K64+287",
linkRepairDate: "2022/12/18 11:59:42",
repairPerson: "张三",
},
{
netDevice: "监控中心LSC",
linkStatus: "连接异常",
netDevice2: "现场管理单元 K65+308",
linkRepairDate: "2022/12/18 11:59:42",
repairPerson: "张三",
},
{
netDevice: "监控中心LSC",
linkStatus: "连接异常",
netDevice2: "现场管理单元 K65+308",
linkRepairDate: "2022/12/18 11:59:42",
repairPerson: "张三",
},
{
netDevice: "现场管理单元 K65+308",
linkStatus: "连接正常",
netDevice2: "故障定位单元 K64+287",
linkRepairDate: "2022/12/18 11:59:42",
repairPerson: "张三",
},
{
netDevice: "监控中心LSC",
linkStatus: "连接异常",
netDevice2: "现场管理单元 K65+308",
linkRepairDate: "2022/12/18 11:59:42",
repairPerson: "张三",
},
{
netDevice: "监控中心LSC",
linkStatus: "连接异常",
netDevice2: "现场管理单元 K65+308",
linkRepairDate: "2022/12/18 11:59:42",
repairPerson: "张三",
},
{
netDevice: "现场管理单元 K65+308",
linkStatus: "连接正常",
netDevice2: "故障定位单元 K64+287",
linkRepairDate: "2022/12/18 11:59:42",
repairPerson: "张三",
},
{
netDevice: "监控中心LSC",
linkStatus: "连接异常",
netDevice2: "现场管理单元 K65+308",
linkRepairDate: "2022/12/18 11:59:42",
repairPerson: "张三",
},
{
netDevice: "监控中心LSC",
linkStatus: "连接异常",
netDevice2: "现场管理单元 K65+308",
linkRepairDate: "2022/12/18 11:59:42",
repairPerson: "张三",
},
],
}; };
}, },
computed: {}, computed: {},
methods: { methods: {
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; let deleteIds = val.map(item => item.id)
this.multipleSelection = deleteIds
}, },
handlePageChange(pageData) { handlePageChange(pageData) {
this.searchForm.pageSize = pageData.size; this.params.size = pageData.size;
this.searchForm.pageNum = pageData.page; this.params.current = pageData.page;
this.getTableData() this.getTableData()
}, },
getTableData() { getTableData() {
this.tableData2 = this.tableData.slice(( this.searchForm.pageNum - 1) * this.searchForm.pageSize, ConnectMaintainList(this.params).then(res => {
this.searchForm.pageNum * this.searchForm.pageSize let list = res.records || []
); list.forEach(item => {
this.total = this.tableData.length item.pointConnectStatus_text = this.ConnectStatusEnum[item.pointConnectStatus]
});
this.tableData = list
this.total = res.total
})
},
toDelete() {
ConnectMaintainDelete({ids: this.multipleSelection}).then(res => {
this.$message.success('删除成功!')
})
}, },
cellClassFn({ row, column, rowIndex, columnIndex }) { cellClassFn({ row, column, rowIndex, columnIndex }) {
if (row.linkStatus == "连接异常" && column.label == "连接状态") { if (row.linkStatus == "连接异常" && column.label == "连接状态") {
...@@ -232,7 +140,7 @@ tableData2:[], ...@@ -232,7 +140,7 @@ tableData2:[],
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin: 20px 0; margin: 20px 0;
.pageNum { .current {
margin: 0 20px; margin: 0 20px;
} }
} }
......
...@@ -7,206 +7,92 @@ ...@@ -7,206 +7,92 @@
<el-button <el-button
:type="multipleSelection.length ? 'primary' : 'info'" :type="multipleSelection.length ? 'primary' : 'info'"
:disabled="!multipleSelection.length" :disabled="!multipleSelection.length"
@click="toDelete"
>删除</el-button >删除</el-button
> >
<el-button type="primary">刷新</el-button> <el-button type="primary" @click="getTableData">刷新</el-button>
<el-button type="primary">查询</el-button> <el-button type="primary">查询</el-button>
<el-button type="primary">导出</el-button> <el-button type="primary">导出</el-button>
<el-button type="primary">清空数据</el-button> <el-button type="primary">清空数据</el-button>
</div> </div>
</div> </div>
<el-table <el-table
:data="tableData2" :data="tableData"
style="width: 100%" style="width: 100%"
:cell-class-name="cellClassFn" :cell-class-name="cellClassFn"
:header-cell-style="{ background: '#EAF1FE', color: '#666666' }" :header-cell-style="{ background: '#EAF1FE', color: '#666666' }"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column prop="startPointDeviceName" label="网元设备" align="center" />
<el-table-column <el-table-column
prop="netDevice" prop="pointConnectStatus_text"
label="网元设备"
align="center"
/>
<el-table-column
prop="linkStatus"
label="连接状态" label="连接状态"
width="150" width="150"
align="center" align="center"
> >
</el-table-column> </el-table-column>
<el-table-column prop="netDevice2" label="网元设备" align="center"> <el-table-column prop="endPointDeviceName" label="网元设备" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="uploadTime" label="上传时间" align="center" />
<el-table-column prop="cancelTime" label="取消时间" align="center" />
<el-table-column <el-table-column
prop="uploadDate" prop="theInterruptTime"
label="上传时间"
align="center"
/>
<el-table-column
prop="cancelDate"
label="取消时间"
align="center"
/>
<el-table-column
prop="linkCancelTime"
label="连接中断时长" label="连接中断时长"
align="center" align="center"
/> />
</el-table> </el-table>
<pagination <Pagination
:limit="searchForm.pageSize" :limit="params.size"
:page="searchForm.pageNum" :page="params.current"
:total="total" :total="total"
class="pagination" class="pagination"
@pagination="handlePageChange" @pagination="handlePageChange"
> />
</pagination>
</div> </div>
</template> </template>
<script> <script>
import Pagination from "@/components/Pagination"; import { ConnectStatusList, ConnectStatusDelete } from '../api'
import { ConnectStatusEnum } from '../const'
export default { export default {
props: [], props: [],
components: { Pagination },
data() { data() {
return { return {
multipleSelection: [], multipleSelection: [],
searchForm: { ConnectStatusEnum,
pageNum: 1, params: {
pageSize: 10, current: 1,
size: 10,
}, },
total: 10, total: 10,
tableData2:[], tableData: [],
tableData: [
{
netDevice: "监控中心LSC",
linkStatus: "连接异常",
netDevice2: "现场管理单元 K65+308",
uploadDate: "2022/12/18 11:51:12",
cancelDate: "2022/12/18 11:59:42",
linkCancelTime: "5小时2分5秒",
},
{
netDevice: "现场管理单元 K65+308",
linkStatus: "连接正常",
netDevice2: "故障定位单元 K64+287",
uploadDate: "2022/12/18 11:51:12",
cancelDate: "2022/12/18 11:59:42",
linkCancelTime: "5小时2分5秒",
},
{
netDevice: "监控中心LSC",
linkStatus: "连接异常",
netDevice2: "现场管理单元 K65+308",
uploadDate: "2022/12/18 11:51:12",
cancelDate: "2022/12/18 11:59:42",
linkCancelTime: "5小时2分5秒",
}, {
netDevice: "监控中心LSC",
linkStatus: "连接异常",
netDevice2: "现场管理单元 K65+308",
uploadDate: "2022/12/18 11:51:12",
cancelDate: "2022/12/18 11:59:42",
linkCancelTime: "5小时2分5秒",
}, {
netDevice: "监控中心LSC",
linkStatus: "连接异常",
netDevice2: "现场管理单元 K65+308",
uploadDate: "2022/12/18 11:51:12",
cancelDate: "2022/12/18 11:59:42",
linkCancelTime: "5小时2分5秒",
},
{
netDevice: "现场管理单元 K65+308",
linkStatus: "连接正常",
netDevice2: "故障定位单元 K64+287",
uploadDate: "2022/12/18 11:51:12",
cancelDate: "2022/12/18 11:59:42",
linkCancelTime: "5小时2分5秒",
},
{
netDevice: "监控中心LSC",
linkStatus: "连接异常",
netDevice2: "现场管理单元 K65+308",
uploadDate: "2022/12/18 11:51:12",
cancelDate: "2022/12/18 11:59:42",
linkCancelTime: "5小时2分5秒",
}, {
netDevice: "监控中心LSC",
linkStatus: "连接异常",
netDevice2: "现场管理单元 K65+308",
uploadDate: "2022/12/18 11:51:12",
cancelDate: "2022/12/18 11:59:42",
linkCancelTime: "5小时2分5秒",
}, {
netDevice: "现场管理单元 K65+308",
linkStatus: "连接正常",
netDevice2: "故障定位单元 K64+287",
uploadDate: "2022/12/18 11:51:12",
cancelDate: "2022/12/18 11:59:42",
linkCancelTime: "5小时2分5秒",
},
{
netDevice: "监控中心LSC",
linkStatus: "连接异常",
netDevice2: "现场管理单元 K65+308",
uploadDate: "2022/12/18 11:51:12",
cancelDate: "2022/12/18 11:59:42",
linkCancelTime: "5小时2分5秒",
}, {
netDevice: "监控中心LSC",
linkStatus: "连接异常",
netDevice2: "现场管理单元 K65+308",
uploadDate: "2022/12/18 11:51:12",
cancelDate: "2022/12/18 11:59:42",
linkCancelTime: "5小时2分5秒",
}, {
netDevice: "现场管理单元 K65+308",
linkStatus: "连接正常",
netDevice2: "故障定位单元 K64+287",
uploadDate: "2022/12/18 11:51:12",
cancelDate: "2022/12/18 11:59:42",
linkCancelTime: "5小时2分5秒",
},
{
netDevice: "监控中心LSC",
linkStatus: "连接异常",
netDevice2: "现场管理单元 K65+308",
uploadDate: "2022/12/18 11:51:12",
cancelDate: "2022/12/18 11:59:42",
linkCancelTime: "5小时2分5秒",
}, {
netDevice: "监控中心LSC",
linkStatus: "连接异常",
netDevice2: "现场管理单元 K65+308",
uploadDate: "2022/12/18 11:51:12",
cancelDate: "2022/12/18 11:59:42",
linkCancelTime: "5小时2分5秒",
},
],
}; };
}, },
computed: {}, computed: {},
methods: { methods: {
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; let deleteIds = val.map(item => item.id)
this.multipleSelection = deleteIds
}, },
handlePageChange(pageData) { handlePageChange(pageData) {
this.searchForm.pageSize = pageData.size; this.params.size = pageData.size;
this.searchForm.pageNum = pageData.page; this.params.current = pageData.page;
this.getTableData() this.getTableData()
}, },
getTableData() { getTableData() {
this.tableData2 = this.tableData.slice(( this.searchForm.pageNum - 1) * this.searchForm.pageSize, ConnectStatusList(this.params).then(res => {
this.searchForm.pageNum * this.searchForm.pageSize let list = res.records || []
); list.forEach(item => {
this.total = this.tableData.length item.pointConnectStatus_text = this.ConnectStatusEnum[item.pointConnectStatus]
})
this.tableData = list
this.total = res.total
})
},
toDelete() {
ConnectStatusDelete({ids: this.multipleSelection}).then(res => {
this.$message.success('删除成功!')
})
}, },
cellClassFn({ row, column, rowIndex, columnIndex }) { cellClassFn({ row, column, rowIndex, columnIndex }) {
if (row.linkStatus == "连接异常" && column.label == "连接状态") { if (row.linkStatus == "连接异常" && column.label == "连接状态") {
...@@ -254,7 +140,7 @@ export default { ...@@ -254,7 +140,7 @@ export default {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin: 20px 0; margin: 20px 0;
.pageNum { .current {
margin: 0 20px; margin: 0 20px;
} }
} }
......
...@@ -7,15 +7,16 @@ ...@@ -7,15 +7,16 @@
<el-button <el-button
:type="multipleSelection.length ? 'primary' : 'info'" :type="multipleSelection.length ? 'primary' : 'info'"
:disabled="!multipleSelection.length" :disabled="!multipleSelection.length"
@click="deleteCable"
>删除</el-button >删除</el-button
> >
<el-button type="primary">刷新</el-button> <el-button type="primary" @click="getTableData">刷新</el-button>
<el-button type="primary">查询</el-button> <el-button type="primary">查询</el-button>
<el-button type="primary">导出</el-button> <el-button type="primary">导出</el-button>
</div> </div>
</div> </div>
<el-table <el-table
:data="tableData2" :data="tableData"
style="width: 100%" style="width: 100%"
:cell-class-name="cellClassFn" :cell-class-name="cellClassFn"
:header-cell-style="{ background: '#EAF1FE', color: '#666666' }" :header-cell-style="{ background: '#EAF1FE', color: '#666666' }"
...@@ -24,195 +25,82 @@ ...@@ -24,195 +25,82 @@
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column <el-table-column
prop="name" prop="siteName"
label="基站名称" label="基站名称"
width="180" width="180"
align="center" align="center"
/> />
<el-table-column <el-table-column
prop="object" prop="alarmTarget"
label="告警对象" label="告警对象"
width="180" width="180"
align="center" align="center"
/> />
<el-table-column prop="level" label="告警级别" width="150" align="center"> <el-table-column prop="alarmLevelName" label="告警级别" width="150" align="center">
<template slot-scope="scope">
<div>
{{ scope.row.level }}
</div>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="message" label="告警信息" align="center"> <el-table-column prop="alarmInfo" label="告警信息" align="center">
<template slot-scope="scope">
<div
v-for="(item, index) in scope.row.message.red"
:key="index + 'red'"
class="red message"
>
{{ item }}
</div>
<div
v-for="(item, index) in scope.row.message.green"
:key="index + 'green'"
class="green message"
>
{{ item }}
</div>
<div
v-for="(item, index) in scope.row.message.black"
:key="index + 'black'"
class="black message"
>
{{ item }}
</div>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="uploadDate" label="告警维修时间" align="center" /> <el-table-column prop="alarmMaintainTime" label="告警维修时间" align="center" />
</el-table> </el-table>
<pagination <Pagination
:limit="searchForm.pageSize" :limit="params.size"
:page="searchForm.pageNum" :page="params.current"
:total="total" :total="total"
class="pagination" class="pagination"
@pagination="handlePageChange" @pagination="handlePageChange"
> />
</pagination>
</div> </div>
</template> </template>
<script> <script>
import Pagination from "@/components/Pagination"; import { MonitorMaintainList, MonitorMaintainDelete } from '../api'
export default { export default {
props: [], props: [],
components: { Pagination },
data() { data() {
return { return {
multipleSelection: [], multipleSelection: [],
searchForm: { params: {
pageNum: 1, current: 1,
pageSize: 10, size: 10,
}, },
total: 10, total: 10,
tableData2:[], tableData: [],
tableData: [
{
name: "STATION2未开通",
object: "漏缆FSU2_R1下行方向",
level: "紧急",
message: {
red: ["距离:0米 驻波比:8.72"],
green: ["距离:18米 驻波比:1.07", "距离:42米 驻波比:1.02"],
black: ["漏缆百米损耗:2.8"],
},
uploadDate: "2022/12/18 11:51:12",
},
{
name: "STATION2未开通",
object: "漏缆FSU2_R1下行方向",
level: "紧急",
message: {
red: ["距离:0米 驻波比:8.72"],
green: ["距离:18米 驻波比:1.07", "距离:42米 驻波比:1.02"],
black: ["漏缆百米损耗:2.8"],
},
uploadDate: "2022/12/18 11:51:12",
},
{
name: "STATION2未开通",
object: "漏缆FSU2_R1下行方向",
level: "紧急",
message: {
red: ["距离:0米 驻波比:8.72"],
green: ["距离:18米 驻波比:1.07", "距离:42米 驻波比:1.02"],
black: ["漏缆百米损耗:2.8"],
},
uploadDate: "2022/12/18 11:51:12",
},
{
name: "STATION2未开通",
object: "漏缆FSU2_R1下行方向",
level: "紧急",
message: {
red: ["距离:0米 驻波比:8.72"],
green: ["距离:18米 驻波比:1.07", "距离:42米 驻波比:1.02"],
black: ["漏缆百米损耗:2.8"],
},
uploadDate: "2022/12/18 11:51:12",
},
{
name: "STATION2未开通",
object: "漏缆FSU2_R1下行方向",
level: "紧急",
message: {
red: ["距离:0米 驻波比:8.72"],
green: ["距离:18米 驻波比:1.07", "距离:42米 驻波比:1.02"],
black: ["漏缆百米损耗:2.8"],
},
uploadDate: "2022/12/18 11:51:12",
},
{
name: "STATION2未开通",
object: "漏缆FSU2_R1下行方向",
level: "重要",
message: {
red: ["距离:0米 驻波比:8.72"],
green: ["距离:18米 驻波比:1.07", "距离:42米 驻波比:1.02"],
black: ["漏缆百米损耗:2.8"],
},
uploadDate: "2022/12/18 11:51:12",
},
{
name: "STATION2未开通",
object: "漏缆FSU2_R1下行方向",
level: "重要",
message: {
red: ["距离:0米 驻波比:8.72"],
green: ["距离:18米 驻波比:1.07", "距离:42米 驻波比:1.02"],
black: ["漏缆百米损耗:2.8"],
},
uploadDate: "2022/12/18 11:51:12",
}, {
name: "STATION2未开通",
object: "漏缆FSU2_R1下行方向",
level: "重要",
message: {
red: ["距离:0米 驻波比:8.72"],
green: ["距离:18米 驻波比:1.07", "距离:42米 驻波比:1.02"],
black: ["漏缆百米损耗:2.8"],
},
uploadDate: "2022/12/18 11:51:12",
},
],
}; };
}, },
computed: {}, computed: {},
methods: { methods: {
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; let deleteIds = val.map(item => item.id)
this.multipleSelection = deleteIds
}, },
handlePageChange(pageData) { handlePageChange(pageData) {
this.searchForm.pageSize = pageData.size; this.params.size = pageData.size;
this.searchForm.pageNum = pageData.page; this.params.current = pageData.page;
this.getTableData() this.getTableData()
}, },
getTableData() { getTableData() {
this.tableData2 = this.tableData.slice(( this.searchForm.pageNum - 1) * this.searchForm.pageSize, MonitorMaintainList(this.params).then(res => {
this.searchForm.pageNum * this.searchForm.pageSize let list = res.records || []
); this.tableData = list
this.total = this.tableData.length this.total = res.total
})
}, },
cellClassFn({row, column, rowIndex, columnIndex}) { deleteCable() {
MonitorMaintainDelete({ids: this.multipleSelection}).then(res => {
this.$message.success('删除成功!')
})
},
cellClassFn({ row, column, rowIndex, columnIndex }) {
if (row.level == '紧急' && column.label == '告警级别') { if (row.level == '紧急' && column.label == '告警级别') {
return 'emergency' return 'emergency'
} else if (row.level == '重要' && column.label == '告警级别') { } else if (row.level == '重要' && column.label == '告警级别') {
return 'important' return 'important'
} }
if (rowIndex%2 == 1) { if (rowIndex % 2 == 1) {
return 'stripe' return 'stripe'
} }
}, },
}, },
mounted() {this.getTableData()}, mounted() { this.getTableData() },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -239,7 +127,7 @@ export default { ...@@ -239,7 +127,7 @@ export default {
color: black; color: black;
} }
& ::v-deep .stripe { & ::v-deep .stripe {
background-color: #EAF1FE; background-color: #eaf1fe;
} }
& ::v-deep .emergency { & ::v-deep .emergency {
background-color: #f00; background-color: #f00;
...@@ -252,7 +140,7 @@ export default { ...@@ -252,7 +140,7 @@ export default {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin: 20px 0; margin: 20px 0;
.pageNum { .current {
margin: 0 20px; margin: 0 20px;
} }
} }
......
...@@ -2,14 +2,15 @@ ...@@ -2,14 +2,15 @@
<!-- 漏缆实时状态 --> <!-- 漏缆实时状态 -->
<div class="leakage-cable"> <div class="leakage-cable">
<div class="leakage-top"> <div class="leakage-top">
<div style="color: #666666"> <div style="color: #666666"></div>
</div>
<div class="operate-btn"> <div class="operate-btn">
<el-button <el-button
:type="multipleSelection.length ? 'primary' : 'info'" :type="multipleSelection.length ? 'primary' : 'info'"
:disabled="!multipleSelection.length" :disabled="!multipleSelection.length"
>删除</el-button> @click="deleteCable"
<el-button type="primary">刷新</el-button> >删除</el-button
>
<el-button type="primary" @click="getTableData">刷新</el-button>
<el-button type="primary">查询</el-button> <el-button type="primary">查询</el-button>
<el-button type="primary">导出</el-button> <el-button type="primary">导出</el-button>
<el-button type="primary">图形报表</el-button> <el-button type="primary">图形报表</el-button>
...@@ -17,33 +18,22 @@ ...@@ -17,33 +18,22 @@
</div> </div>
<el-table <el-table
ref="multipleTable" ref="multipleTable"
:data="tableData2" :data="tableData"
style="width: 100%" style="width: 100%"
:cell-class-name="cellClassFn" :cell-class-name="cellClassFn"
:header-cell-style="{background:'#EAF1FE',color:'#666666'}" :header-cell-style="{ background: '#EAF1FE', color: '#666666' }"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column prop="name" label="基站名称" align="center" /> <el-table-column prop="siteName" label="基站名称" align="center" />
<el-table-column prop="object" label="告警对象" align="center" /> <el-table-column prop="alarmTarget" label="告警对象" align="center" />
<el-table-column prop="message" label="告警信息" align="center"> <el-table-column prop="alarmInfo" label="告警信息" align="center">
<template slot-scope="scope">
<div v-for="(item, index) in scope.row.message.red" :key="index+'red'" class="red message">
{{ item }}
</div>
<div v-for="(item, index) in scope.row.message.green" :key="index+'green'" class="green message">
{{ item }}
</div>
<div v-for="(item, index) in scope.row.message.black" :key="index+'black'" class="black message">
{{ item }}
</div>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="uploadDate" label="上传日期" align="center" /> <el-table-column prop="uploadTime" label="上传日期" align="center" />
</el-table> </el-table>
<pagination <Pagination
:limit="searchForm.pageSize" :limit="params.size"
:page="searchForm.pageNum" :page="params.current"
:total="total" :total="total"
class="pagination" class="pagination"
@pagination="handlePageChange" @pagination="handlePageChange"
...@@ -52,82 +42,16 @@ ...@@ -52,82 +42,16 @@
</template> </template>
<script> <script>
import Pagination from '@/components/Pagination' import { MonitorStatusList, MonitorStatusDelete } from '../api'
export default { export default {
components: { Pagination },
data() { data() {
return { return {
searchForm: { params: {
pageNum: 1, current: 1,
pageSize: 10 size: 10
}, },
total: 10, total: 10,
tableData2:[], tableData: [],
tableData: [
{
name: 'STATION2未开通',
object: '漏缆FSU2_R1下行方向',
level: '紧急',
message: {
red: ['距离:0米 驻波比:8.72'],
green: ['距离:18米 驻波比:1.07', '距离:42米 驻波比:1.02'],
black: ['漏缆百米损耗:2.8']
},
uploadDate: '2022/12/18 11:51:12'
},
{
name: 'STATION2未开通',
object: '漏缆FSU2_R1下行方向',
level: '紧急',
message: {
red: ['距离:0米 驻波比:8.72'],
green: ['距离:18米 驻波比:1.07', '距离:42米 驻波比:1.02'],
black: ['漏缆百米损耗:2.8']
},
uploadDate: '2022/12/18 11:51:12'
}, {
name: 'STATION2未开通',
object: '漏缆FSU2_R1下行方向',
level: '紧急',
message: {
red: ['距离:0米 驻波比:8.72'],
green: ['距离:18米 驻波比:1.07', '距离:42米 驻波比:1.02'],
black: ['漏缆百米损耗:2.8']
},
uploadDate: '2022/12/18 11:51:12'
}, {
name: 'STATION2未开通',
object: '漏缆FSU2_R1下行方向',
level: '紧急',
message: {
red: ['距离:0米 驻波比:8.72'],
green: ['距离:18米 驻波比:1.07', '距离:42米 驻波比:1.02'],
black: ['漏缆百米损耗:2.8']
},
uploadDate: '2022/12/18 11:51:12'
}, {
name: 'STATION2未开通',
object: '漏缆FSU2_R1下行方向',
level: '紧急',
message: {
red: ['距离:0米 驻波比:8.72'],
green: ['距离:18米 驻波比:1.07', '距离:42米 驻波比:1.02'],
black: ['漏缆百米损耗:2.8']
},
uploadDate: '2022/12/18 11:51:12'
}, {
name: 'STATION2未开通',
object: '漏缆FSU2_R1下行方向',
level: '重要',
message: {
red: ['距离:0米 驻波比:8.72'],
green: ['距离:18米 驻波比:1.07', '距离:42米 驻波比:1.02'],
black: ['漏缆百米损耗:2.8']
},
uploadDate: '2022/12/18 11:51:12'
}
],
multipleSelection: [] multipleSelection: []
} }
}, },
...@@ -144,22 +68,28 @@ export default { ...@@ -144,22 +68,28 @@ export default {
} }
}, },
handlePageChange(pageData) { handlePageChange(pageData) {
this.searchForm.pageSize = pageData.size this.params.size = pageData.size
this.searchForm.pageNum = pageData.page this.params.current = pageData.page
this.getTableData() this.getTableData()
}, },
getTableData() { getTableData() {
this.tableData2 = this.tableData.slice(( this.searchForm.pageNum - 1) * this.searchForm.pageSize, MonitorStatusList(this.params).then(res => {
this.searchForm.pageNum * this.searchForm.pageSize let list = res.records || []
); this.tableData = list
this.total = this.tableData.length this.total = res.total
})
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val let deleteIds = val.map(item => item.id)
this.multipleSelection = deleteIds
},
deleteCable() {
MonitorStatusDelete({ids: this.multipleSelection}).then(res => {
this.$message.success('删除成功!')
})
} }
}, },
mounted(){ mounted() {
this.getTableData() this.getTableData()
} }
} }
...@@ -189,7 +119,7 @@ export default { ...@@ -189,7 +119,7 @@ export default {
color: black; color: black;
} }
& ::v-deep .stripe { & ::v-deep .stripe {
background-color: #EAF1FE; background-color: #eaf1fe;
} }
& ::v-deep .emergency { & ::v-deep .emergency {
background-color: #f00; background-color: #f00;
......
...@@ -12,6 +12,7 @@ const port = process.env.port || process.env.npm_config_port || 8886 // dev port ...@@ -12,6 +12,7 @@ const port = process.env.port || process.env.npm_config_port || 8886 // dev port
const rewriteDefaultConfig = { const rewriteDefaultConfig = {
changeOrigin: true, changeOrigin: true,
target: 'http://8.142.143.40:8886', target: 'http://8.142.143.40:8886',
// target: 'http://192.168.0.111:8886',
// ws: true, // ws: true,
headers: { headers: {
referer: 'laddercloud.cn' referer: 'laddercloud.cn'
......
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