Commit 3498673b authored by neogcg's avatar neogcg

alarm dialog

parent 8b488bd2
...@@ -94,7 +94,6 @@ export default { ...@@ -94,7 +94,6 @@ export default {
this.loading = false this.loading = false
let list = res || [] let list = res || []
this.data = list this.data = list
console.log( this.data );
}) })
}, },
renderContent(h, { node, data, store }) { renderContent(h, { node, data, store }) {
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
.el-table{ .el-table{
height: 613px; height: 613px;
overflow-y: scroll; overflow-y: auto;
} }
.el-dialog__header{ .el-dialog__header{
text-align: center; text-align: center;
...@@ -85,4 +85,10 @@ ...@@ -85,4 +85,10 @@
color: #fff; color: #fff;
background:rgba(122, 164, 251, 0.55); background:rgba(122, 164, 251, 0.55);
} }
.el-dialog{
border-radius: 8px;
}
.particulars{
color:#666666
}
\ No newline at end of file
...@@ -6,6 +6,8 @@ const path = { ...@@ -6,6 +6,8 @@ const path = {
cableCancel: 'sysMonitorAlarm/cancel', cableCancel: 'sysMonitorAlarm/cancel',
deviceList: 'sysConnectAlarm/selectPage', deviceList: 'sysConnectAlarm/selectPage',
deviceConfirm: 'sysConnectAlarm/confirm',
deviceCancel: 'sysConnectAlarm/cancel',
} }
export function cableTimeList() { export function cableTimeList() {
...@@ -22,3 +24,9 @@ export function cableConfirm() { ...@@ -22,3 +24,9 @@ export function cableConfirm() {
export function deviceList() { export function deviceList() {
return request.post(path.deviceList, ...arguments) return request.post(path.deviceList, ...arguments)
} }
export function deviceConfirm() {
return request.post(path.deviceConfirm, ...arguments)
}
export function deviceCancel() {
return request.post(path.deviceCancel, ...arguments)
}
...@@ -40,13 +40,18 @@ ...@@ -40,13 +40,18 @@
width="180" width="180"
align="center" align="center"
/> />
<el-table-column prop="alarmLevelName" label="告警级别" width="150" align="center"> <el-table-column
prop="alarmLevelName"
label="告警级别"
width="150"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="alarmInfo" prop="alarmInfo"
label="告警信息" label="告警信息"
align="center" align="center"
width="300" width="200"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -65,11 +70,92 @@ ...@@ -65,11 +70,92 @@
<el-table-column prop="confirmTime" label="确认时间" align="center" /> <el-table-column prop="confirmTime" label="确认时间" align="center" />
<el-table-column label="操作" align="center" width="100"> <el-table-column label="操作" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" v-if="scope.row.confirmStatus === 1" >取消</el-button> <el-button
<el-button type="text" v-else>确认</el-button> type="text"
v-if="scope.row.confirmStatus === 1"
@click="cancel2(scope.row)"
>取消</el-button
>
<el-button type="text" v-else @click="confirm2(scope.row)"
>确认</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-dialog
title="告警详情"
:visible.sync="centerDialogVisible"
width="30%"
center
>
<table style="margin: auto" class="device-detail-tb">
<tr style="line-height: 50px">
<td style="width: 150px">
<label class="particulars">基站名称:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="dialogInfo.siteName"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 150px">
<label class="particulars">告警对象:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="dialogInfo.alarmTarget"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 150px">
<label class="particulars">告警级别:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="dialogInfo.alarmLevelName"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 150px">
<label class="particulars">告警信息:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="dialogInfo.alarmInfo"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 150px">
<label class="particulars">最新上传时间:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="dialogInfo.lateUploadTime"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 150px">
<label class="particulars">状态变化时间:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="dialogInfo.statusTimeChange"></label>
</td>
</tr>
</table>
<span slot="footer" class="dialog-footer">
<el-button
type="primary"
v-if="
dialogInfo.confirmStatus === 1 &&
dialogInfo.alarmLevelName === '正常'
"
@click="cancel(dialogInfo)"
>取消告警</el-button
>
<el-button
v-else-if="dialogInfo.confirmStatus !== 1"
type="primary"
@click="confirm(dialogInfo)"
>确认告警</el-button
>
</span>
</el-dialog>
<Pagination <Pagination
:limit="params.size" :limit="params.size"
:page="params.current" :page="params.current"
...@@ -81,93 +167,119 @@ ...@@ -81,93 +167,119 @@
</template> </template>
<script> <script>
import { cableTimeList,cableConfirm ,cableCancel} from '../api' import { cableTimeList, cableConfirm, cableCancel } from "../api";
import { exportLeakyCable } from '@/api/export' import { exportLeakyCable } from "@/api/export";
import search from '@/views/monitor/leakageCable/components/search.vue' import search from "@/views/monitor/leakageCable/components/search.vue";
import download from '@/utils/download' import download from "@/utils/download";
export default { export default {
data() { data() {
return { return {
confirmStatus: 2, confirmStatus: 2,
dialogInfo: [],
centerDialogVisible: false,
params: { params: {
current: 1, current: 1,
size: 10 size: 10,
}, },
total: 10, total: 10,
tableData: [], tableData: [],
tabs: [ // 1:已确认,0:未确认 tabs: [
// 1:已确认,0:未确认
{ {
label: '全部', label: "全部",
key: 2 key: 2,
}, },
{ {
label: '已确认', label: "已确认",
key: 1 key: 1,
}, },
{ {
label: '未确认', label: "未确认",
key: 0 key: 0,
} },
], ],
isQuery: false, isQuery: false,
searchOption: {} searchOption: {},
}; };
}, },
components: { search }, components: { search },
methods: { methods: {
// 表格背景图颜色 // 表格背景图颜色
cellClassFn({ row, column, rowIndex, columnIndex }) { cellClassFn({ row, column, rowIndex, columnIndex }) {
if (row.alarmLevelName == '紧急' && column.label == '告警级别') { if (row.alarmLevelName == "紧急" && column.label == "告警级别") {
return 'emergency' return "emergency";
} else if (row.alarmLevelName == '重要' && column.label == '告警级别') { } else if (row.alarmLevelName == "重要" && column.label == "告警级别") {
return 'important' return "important";
} }
if (rowIndex % 2 == 1) { if (rowIndex % 2 == 1) {
return 'stripe' return "stripe";
} }
}, },
handlePageChange(pageData) { handlePageChange(pageData) {
this.params.size = pageData.size this.params.size = pageData.size;
this.params.current = pageData.page this.params.current = pageData.page;
this.getTableData() this.getTableData();
}, },
getTableData(option) { getTableData(option) {
this.searchOption = option this.searchOption = option;
let type = this.confirmStatus == 2 ? '' : this.confirmStatus let type = this.confirmStatus == 2 ? "" : this.confirmStatus;
let param = { let param = {
confirmStatus: type, confirmStatus: type,
...this.params, ...this.params,
...option ...option,
} };
cableTimeList(param).then(res => { cableTimeList(param).then((res) => {
console.log(param); let list = res.records || [];
let list = res.records || [] this.tableData = list;
this.tableData = list this.total = res.total;
this.total = res.total });
console.log( res.records); },
}) confirm(dialogInfo) {
let id = dialogInfo.id;
cableConfirm({ id: id }).then((res) => {
this.getTableData();
});
this.centerDialogVisible = false;
},
confirm2(row) {
this.centerDialogVisible = true;
this.dialogInfo = row;
},
cancel(dialogInfo) {
let query = {
alarmLevelName: dialogInfo.alarmLevelName,
id: dialogInfo.id,
};
cableCancel(query).then((res) => {
this.getTableData();
});
this.centerDialogVisible = false;
},
cancel2(row) {
this.centerDialogVisible = true;
this.dialogInfo = row;
}, },
changeType(item) { changeType(item) {
this.confirmStatus = item.key this.confirmStatus = item.key;
this.getTableData() this.getTableData();
}, },
exportList() { exportList() {
let type = this.confirmStatus == 2 ? '' : this.confirmStatus let type = this.confirmStatus == 2 ? "" : this.confirmStatus;
let param = { let param = {
confirmStatus: type, confirmStatus: type,
...this.params, ...this.params,
...this.searchOption ...this.searchOption,
} };
exportLeakyCable(param).then(res => { exportLeakyCable(param).then((res) => {
download(res, 'vnd.ms-excel', `漏缆监测告警.xls`) download(res, "vnd.ms-excel", `漏缆监测告警.xls`);
}) });
}, },
}, },
mounted() { mounted() {
this.getTableData() this.getTableData();
}, },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<div style="color: #666666"></div> <div style="color: #666666"></div>
<div class="operate-btn"> <div class="operate-btn">
<el-button type="primary" @click="getTableData">刷新</el-button> <el-button type="primary" @click="getTableData">刷新</el-button>
<el-button type="primary" @click="isQuery=!isQuery">查询</el-button> <el-button type="primary" @click="isQuery = !isQuery">查询</el-button>
<el-button type="primary" @click="exportList">导出</el-button> <el-button type="primary" @click="exportList">导出</el-button>
</div> </div>
</div> </div>
...@@ -27,19 +27,96 @@ ...@@ -27,19 +27,96 @@
:cell-class-name="cellClassFn" :cell-class-name="cellClassFn"
:header-cell-style="{ background: '#EAF1FE', color: '#666666' }" :header-cell-style="{ background: '#EAF1FE', color: '#666666' }"
> >
<el-table-column prop="startPointDeviceName" label="网元设备" align="center" /> <el-table-column
<el-table-column prop="connectStatusName" label="连接状态" align="center" /> prop="startPointDeviceName"
<el-table-column prop="endPointDeviceName" label="网元设备" align="center" /> label="网元设备"
align="center"
/>
<el-table-column
prop="connectStatusName"
label="连接状态"
align="center"
/>
<el-table-column
prop="endPointDeviceName"
label="网元设备"
align="center"
/>
<el-table-column prop="uploadTime" label="上传时间" align="center" /> <el-table-column prop="uploadTime" label="上传时间" align="center" />
<el-table-column prop="confirmPerson" label="确认人" align="center" /> <el-table-column prop="confirmPerson" label="确认人" align="center" />
<el-table-column prop="confirmTime" label="确认时间" align="center" /> <el-table-column prop="confirmTime" label="确认时间" align="center" />
<el-table-column fixed="right" label="操作" align="center" width="100"> <el-table-column fixed="right" label="操作" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" v-if="scope.row.confirmStatus === 1">取消</el-button> <el-button
<el-button type="text" v-else >确认</el-button> type="text"
v-if="scope.row.confirmStatus === 1"
@click="cancel2(scope.row)"
>取消</el-button
>
<el-button type="text" v-else @click="confirm2(scope.row)"
>确认</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-dialog
title="告警详情"
:visible.sync="centerDialogVisible"
width="30%"
center
>
<table style="margin: auto" class="device-detail-tb">
<tr style="line-height: 50px">
<td style="width: 150px">
<label class="particulars">网元设备:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="dialogInfo.startPointDeviceName"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 150px">
<label class="particulars">连接状态:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="dialogInfo.connectStatusName"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 150px">
<label class="particulars">网元设备:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="dialogInfo.endPointDeviceName"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 150px">
<label class="particulars">上传时间:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="dialogInfo.uploadTime"></label>
</td>
</tr>
</table>
<span slot="footer" class="dialog-footer">
<el-button
type="primary"
v-if="
dialogInfo.confirmStatus === 1 &&
dialogInfo.connectStatusName === '连接正常'
"
@click="cancel(dialogInfo)"
>取消告警</el-button
>
<el-button
v-else-if="dialogInfo.confirmStatus !== 1"
type="primary"
@click="confirm(dialogInfo)"
>确认告警</el-button
>
</span>
</el-dialog>
<Pagination <Pagination
:limit="params.size" :limit="params.size"
:page="params.current" :page="params.current"
...@@ -51,89 +128,124 @@ ...@@ -51,89 +128,124 @@
</template> </template>
<script> <script>
import { deviceList } from '../api' import { deviceList, deviceConfirm, deviceCancel } from "../api";
import { exportConnet } from '@/api/export' import { exportConnet } from "@/api/export";
import search from '@/views/monitor/equipment/components/search.vue' import search from "@/views/monitor/equipment/components/search.vue";
import download from '@/utils/download' import download from "@/utils/download";
export default { export default {
data() { data() {
return { return {
dialogInfo: [],
centerDialogVisible: false,
confirmStatus: 2, confirmStatus: 2,
params: { params: {
current: 1, current: 1,
size: 10 size: 10,
}, },
total: 10, total: 10,
tableData: [], tableData: [],
tabs: [ tabs: [
{ {
label: '全部', label: "全部",
key: 2 key: 2,
}, },
{ {
label: '已确认', label: "已确认",
key: 1 key: 1,
}, },
{ {
label: '未确认', label: "未确认",
key: 0 key: 0,
} },
], ],
isQuery: false, isQuery: false,
searchOption: {} searchOption: {},
} };
}, },
components: { search }, components: { search },
methods: { methods: {
// 表格背景图颜色 // 表格背景图颜色
cellClassFn({ row, column, rowIndex, columnIndex }) { cellClassFn({ row, column, rowIndex, columnIndex }) {
if ((row.connectStatusName == '连接正常' && column.property == 'connectStatusName')) { if (
return 'green' row.connectStatusName == "连接正常" &&
column.property == "connectStatusName"
) {
return "green";
} }
if ((row.connectStatusName == '连接异常' && column.property == 'connectStatusName')) { if (
return 'red' row.connectStatusName == "连接异常" &&
column.property == "connectStatusName"
) {
return "red";
} }
if (rowIndex % 2 == 1) { if (rowIndex % 2 == 1) {
return 'stripe' return "stripe";
} }
}, },
handlePageChange(pageData) { handlePageChange(pageData) {
this.params.size = pageData.size this.params.size = pageData.size;
this.params.current = pageData.page this.params.current = pageData.page;
this.getTableData() this.getTableData();
}, },
getTableData(option) { getTableData(option) {
let type = this.confirmStatus == 2 ? '' : this.confirmStatus let type = this.confirmStatus == 2 ? "" : this.confirmStatus;
let param = { let param = {
confirmStatus: type, confirmStatus: type,
...this.params, ...this.params,
...option ...option,
} };
deviceList(param).then(res => { deviceList(param).then((res) => {
let list = res.records || [] let list = res.records || [];
this.tableData = list this.tableData = list;
this.total = res.total this.total = res.total;
}) });
},
confirm2(row) {
this.centerDialogVisible = true;
this.dialogInfo = row;
},
confirm(dialogInfo) {
let id = dialogInfo.id;
deviceConfirm({ id: id }).then((res) => {
this.getTableData();
});
this.centerDialogVisible = false
}, },
cancel2(row) {
this.centerDialogVisible = true;
this.dialogInfo = row;
},
cancel(dialogInfo) {
let query = {
connectStatusName: dialogInfo.connectStatusName,
id: dialogInfo.id,
};
deviceCancel(query).then((res) => {
console.log(res);
this.getTableData();
});
this.centerDialogVisible = false
},
changeType(item) { changeType(item) {
this.confirmStatus = item.key this.confirmStatus = item.key;
this.getTableData() this.getTableData();
}, },
exportList() { exportList() {
let type = this.confirmStatus == 2 ? '' : this.confirmStatus let type = this.confirmStatus == 2 ? "" : this.confirmStatus;
let param = { let param = {
confirmStatus: type, confirmStatus: type,
...this.params, ...this.params,
...this.searchOption ...this.searchOption,
} };
exportConnet(param).then(res => { exportConnet(param).then((res) => {
download(res, 'vnd.ms-excel', `设备连接告警.xls`) download(res, "vnd.ms-excel", `设备连接告警.xls`);
}) });
}, },
}, },
mounted() { mounted() {
this.getTableData() this.getTableData();
}, },
}; };
</script> </script>
......
...@@ -5,6 +5,15 @@ export const DetailMixins = { ...@@ -5,6 +5,15 @@ export const DetailMixins = {
return { return {
form: {}, form: {},
formFunc: null, formFunc: null,
isOpenSelect:[{
key:0,
label:"未开通"
},
{
key:1,
label:"已开通"
}
]
} }
}, },
watch: { watch: {
......
...@@ -143,7 +143,25 @@ ...@@ -143,7 +143,25 @@
<div class="item_name">站点其他信息</div> <div class="item_name">站点其他信息</div>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<div class="item_data">{{ form.baseInfo.siteOtherMessage }}</div> <div class="item_data">
{{ form.baseInfo.siteOtherMessage }}
</div>
</el-col>
</el-row>
<el-row class="text" :gutter="24">
<el-col :span="10">
<div class="item_name">开通状态</div>
</el-col>
<el-col :span="10">
<el-select class="item_data"
>{{ form.baseInfo.isOpen }}
<el-option
v-for="item in isOpenSelect"
:key="item.key"
:label="item.label"
:value="item.key"
></el-option>
</el-select>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
...@@ -179,17 +197,15 @@ ...@@ -179,17 +197,15 @@
</template> </template>
<script> <script>
import { DetailMixins } from './mixins' import { DetailMixins } from "./mixins";
export default { export default {
name: 'Dashboard', name: "Dashboard",
mixins: [DetailMixins], mixins: [DetailMixins],
data() { data() {
return { return {};
}
}, },
methods: { methods: {},
} };
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -265,5 +281,4 @@ export default { ...@@ -265,5 +281,4 @@ export default {
border-bottom: none !important; border-bottom: none !important;
} }
} }
</style> </style>
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<div slot="header" class="clearfix posa"> <div slot="header" class="clearfix posa">
<span>管理范围</span> <span>管理范围</span>
</div> </div>
<div > <div>
<el-row class="text" :gutter="24"> <el-row class="text" :gutter="24">
<el-col :span="10"> <el-col :span="10">
<div class="item_name">监测设备</div> <div class="item_name">监测设备</div>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<div slot="header" class="clearfix posa"> <div slot="header" class="clearfix posa">
<span>基础信息</span> <span>基础信息</span>
</div> </div>
<div > <div>
<el-row class="text" :gutter="24"> <el-row class="text" :gutter="24">
<el-col :span="10"> <el-col :span="10">
<div class="item_name">FSU身份编号</div> <div class="item_name">FSU身份编号</div>
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<div class="item_name">FSU端口数</div> <div class="item_name">FSU端口数</div>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<div class="item_data">{{ form.baseInfo.fsuPort}}</div> <div class="item_data">{{ form.baseInfo.fsuPort }}</div>
</el-col> </el-col>
</el-row> </el-row>
<el-row class="text" :gutter="24"> <el-row class="text" :gutter="24">
...@@ -119,7 +119,9 @@ ...@@ -119,7 +119,9 @@
<div class="item_name">设备子类型</div> <div class="item_name">设备子类型</div>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<div class="item_data">{{ form.baseInfo.equipSubTypeName }}</div> <div class="item_data">
{{ form.baseInfo.equipSubTypeName }}
</div>
</el-col> </el-col>
</el-row> </el-row>
<el-row class="text" :gutter="24"> <el-row class="text" :gutter="24">
...@@ -135,7 +137,9 @@ ...@@ -135,7 +137,9 @@
<div class="item_name">设备生产序列号</div> <div class="item_name">设备生产序列号</div>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<div class="item_data">{{ form.baseInfo.equipSerialNumber }}</div> <div class="item_data">
{{ form.baseInfo.equipSerialNumber }}
</div>
</el-col> </el-col>
</el-row> </el-row>
<el-row class="text" :gutter="24"> <el-row class="text" :gutter="24">
...@@ -162,6 +166,22 @@ ...@@ -162,6 +166,22 @@
<div class="item_data">{{ form.baseInfo.kmSign }}</div> <div class="item_data">{{ form.baseInfo.kmSign }}</div>
</el-col> </el-col>
</el-row> </el-row>
<el-row class="text" :gutter="24">
<el-col :span="10">
<div class="item_name">开通状态</div>
</el-col>
<el-col :span="10">
<el-select class="item_data"
>{{ form.baseInfo.isOpen }}
<el-option
v-for="item in isOpenSelect"
:key="item.key"
:label="item.label"
:value="item.key"
></el-option>
</el-select>
</el-col>
</el-row>
</div> </div>
</el-card> </el-card>
</el-col> </el-col>
...@@ -170,7 +190,7 @@ ...@@ -170,7 +190,7 @@
<div slot="header" class="clearfix posa"> <div slot="header" class="clearfix posa">
<span>管理范围</span> <span>管理范围</span>
</div> </div>
<div > <div>
<el-row class="text" :gutter="24"> <el-row class="text" :gutter="24">
<el-col :span="10"> <el-col :span="10">
<div class="item_name">监测设备</div> <div class="item_name">监测设备</div>
...@@ -195,16 +215,15 @@ ...@@ -195,16 +215,15 @@
</template> </template>
<script> <script>
import { DetailMixins } from './mixins' import { DetailMixins } from "./mixins";
export default { export default {
name: 'Dashboard', name: "Dashboard",
data() { data() {
return { return {};
}
}, },
mixins: [DetailMixins], mixins: [DetailMixins],
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -269,5 +288,4 @@ export default { ...@@ -269,5 +288,4 @@ export default {
border-bottom: none !important; border-bottom: none !important;
} }
} }
</style> </style>
...@@ -130,6 +130,22 @@ ...@@ -130,6 +130,22 @@
<div class="item_data">{{ form.baseInfo.kmSign }}</div> <div class="item_data">{{ form.baseInfo.kmSign }}</div>
</el-col> </el-col>
</el-row> </el-row>
<el-row class="text" :gutter="24">
<el-col :span="10">
<div class="item_name">开通状态</div>
</el-col>
<el-col :span="10">
<el-select class="item_data"
>{{ form.baseInfo.isOpen }}
<el-option
v-for="item in isOpenSelect"
:key="item.key"
:label="item.label"
:value="item.key"
></el-option>
</el-select>
</el-col>
</el-row>
</div> </div>
</el-card> </el-card>
</el-col> </el-col>
......
...@@ -5,7 +5,7 @@ const path = { ...@@ -5,7 +5,7 @@ const path = {
MonitorStatusDelete: 'sysHistoryMonitorStatus/batchDeleteHistoryMonitorStatus', MonitorStatusDelete: 'sysHistoryMonitorStatus/batchDeleteHistoryMonitorStatus',
MonitorMaintainList: 'sysHistoryMonitorMaintain/selectPage', MonitorMaintainList: 'sysHistoryMonitorMaintain/selectPage',
MonitorMaintainDelete: 'sysHistoryMonitorMaintain/selectPage', MonitorMaintainDelete: 'sysHistoryMonitorMaintain/batchDeleteHistoryMonitorMaintain',
ConnectStatusList: 'sysHistoryConnectStatus/selectPage', ConnectStatusList: 'sysHistoryConnectStatus/selectPage',
ConnectStatusDelete: 'sysHistoryConnectStatus/batchDeleteHistoryConnectStatus', ConnectStatusDelete: 'sysHistoryConnectStatus/batchDeleteHistoryConnectStatus',
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div class="operate-btn"> <div class="operate-btn">
<delids <delids
:multipleSelection2="multipleSelection" :multipleSelection2="multipleSelection"
@click="deleteCable" @del="deleteCable"
>删除</delids >删除</delids
> >
<el-button type="primary" @click="getTableData">刷新</el-button> <el-button type="primary" @click="getTableData">刷新</el-button>
...@@ -80,6 +80,7 @@ export default { ...@@ -80,6 +80,7 @@ export default {
handleSelectionChange(val) { handleSelectionChange(val) {
let deleteIds = val.map(item => item.id) let deleteIds = val.map(item => item.id)
this.multipleSelection = deleteIds this.multipleSelection = deleteIds
}, },
handlePageChange(pageData) { handlePageChange(pageData) {
this.params.size = pageData.size; this.params.size = pageData.size;
...@@ -89,8 +90,7 @@ export default { ...@@ -89,8 +90,7 @@ export default {
getTableData(option) { getTableData(option) {
this.searchOption = option this.searchOption = option
let params = { let params = {
current: this.params.pageNum, ...this.params,
size: this.params.pageSize,
...option ...option
} }
MonitorMaintainList(params).then(res => { MonitorMaintainList(params).then(res => {
...@@ -99,7 +99,7 @@ export default { ...@@ -99,7 +99,7 @@ export default {
this.total = res.total this.total = res.total
}) })
}, },
deleteCable() { deleteCable() {
MonitorMaintainDelete({ids: this.multipleSelection}).then(res => { MonitorMaintainDelete({ids: this.multipleSelection}).then(res => {
this.$message.success('删除成功!') this.$message.success('删除成功!')
this.getTableData() this.getTableData()
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
/> />
</el-select> </el-select>
<div class="btn"> <div class="btn">
<el-button style="width: 120px" type="primary" :loading="loading2" @click="sendData">发送数据</el-button> <el-button style="width: 120px" type="primary" :loading="loading3" @click="sendData">发送数据</el-button>
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
......
...@@ -94,7 +94,8 @@ export default { ...@@ -94,7 +94,8 @@ export default {
CableStatusList(params).then(res => { CableStatusList(params).then(res => {
let list = res.records || [] let list = res.records || []
this.tableData = list this.tableData = list
this.total = res.total this.total = res.records.length
}) })
}, },
toExport() { toExport() {
......
...@@ -172,7 +172,7 @@ ...@@ -172,7 +172,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <Pagination
:limit="leakyCableForm.size" :limit="leakyCableForm.size"
:page="leakyCableForm.current" :page="leakyCableForm.current"
:total="total" :total="total"
......
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <Pagination
:limit="monitorForm.size" :limit="monitorForm.size"
:page="monitorForm.current" :page="monitorForm.current"
:total="total" :total="total"
......
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <Pagination
:limit="railData.size" :limit="railData.size"
:page="railData.current" :page="railData.current"
:total="total" :total="total"
......
...@@ -80,22 +80,13 @@ ...@@ -80,22 +80,13 @@
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column prop="siteName" label="站名" align="center" /> <el-table-column prop="siteName" label="站名" align="center" />
<el-table-column prop="siteCode" label="站点编号" align="center" /> <el-table-column prop="siteCode" label="站点编号" align="center" />
<el-table-column <el-table-column
prop="siteAddress" prop="siteAddress"
label="站点地址" label="站点地址"
show-overflow-tooltip show-overflow-tooltip
align="center" align="center"
/> />
<el-table-column prop="railWayName" label="所在铁路线" align="center" />
<el-table-column
prop="railWayName"
label="所在铁路线"
align="center"
/>
<el-table-column <el-table-column
prop="action" prop="action"
label="详细信息" label="详细信息"
...@@ -110,7 +101,7 @@ ...@@ -110,7 +101,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <Pagination
:limit="siteForm.size" :limit="siteForm.size"
:page="siteForm.current" :page="siteForm.current"
:total="total" :total="total"
...@@ -132,7 +123,7 @@ export default { ...@@ -132,7 +123,7 @@ export default {
siteForm: formInit(), siteForm: formInit(),
railWaySelect: [], railWaySelect: [],
visible: false, visible: false,
tableData: [], tableData: [],
params: { params: {
current: 1, current: 1,
...@@ -156,10 +147,10 @@ export default { ...@@ -156,10 +147,10 @@ export default {
}, },
del() { del() {
let ids = this.ids; let ids = this.ids;
sitebatchDelete({ids}).then((res) => { sitebatchDelete({ ids }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
successAlert("删除成功"); successAlert("删除成功");
this.getTableData(); this.getTableData();
} else { } else {
warningAlert("删除失败"); warningAlert("删除失败");
...@@ -178,14 +169,13 @@ export default { ...@@ -178,14 +169,13 @@ export default {
this.siteForm = formInit(); this.siteForm = formInit();
}, },
exportData() { exportData() {
sitelist({size:this.total}).then((res) => { sitelist({ size: this.total }).then((res) => {
let list = res.records || []; let list = res.records || [];
this.exids = list.map((i) => i.id); this.exids = list.map((i) => i.id);
});
}); exportSite({ ids: this.exids }).then((res) => {
exportSite({ ids: this.exids }).then((res) => { download(res, "vnd.ms-excel", `站点表.xls`);
download(res, "vnd.ms-excel", `站点表.xls`); });
});
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
......
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