Commit 5c404997 authored by neogcg's avatar neogcg

export

parent 6d94a118
...@@ -45,7 +45,6 @@ const actions = { ...@@ -45,7 +45,6 @@ const actions = {
getInfo({type: 0}).then(res => { getInfo({type: 0}).then(res => {
if (!res) return if (!res) return
commit('SET_BASEINFO', res) commit('SET_BASEINFO', res)
console.log(res);
}) })
}, },
......
...@@ -72,11 +72,17 @@ ...@@ -72,11 +72,17 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
v-if="scope.row.confirmStatus === 1 && scope.row.alarmLevelName == '正常'" v-if="
scope.row.confirmStatus === 1 &&
scope.row.alarmLevelName == '正常'
"
@click="cancel2(scope.row)" @click="cancel2(scope.row)"
>取消</el-button >取消</el-button
> >
<el-button type="text" v-else-if="scope.row.confirmStatus === 0" @click="confirm2(scope.row)" <el-button
type="text"
v-else-if="scope.row.confirmStatus === 0"
@click="confirm2(scope.row)"
>确认</el-button >确认</el-button
> >
</template> </template>
...@@ -212,6 +218,8 @@ export default { ...@@ -212,6 +218,8 @@ export default {
return "emergency"; return "emergency";
} else if (row.alarmLevelName == "重要" && column.label == "告警级别") { } else if (row.alarmLevelName == "重要" && column.label == "告警级别") {
return "important"; return "important";
} else if (row.alarmLevelName == "一般" && column.label == "告警级别") {
return "common";
} }
if (rowIndex % 2 == 1) { if (rowIndex % 2 == 1) {
return "stripe"; return "stripe";
...@@ -280,7 +288,6 @@ export default { ...@@ -280,7 +288,6 @@ export default {
}, },
}, },
computed: { computed: {
// getWsMsg:{ // getWsMsg:{
// get(){ // get(){
// return this.$store.state.websocket.webSocketMsg // return this.$store.state.websocket.webSocketMsg
...@@ -289,7 +296,6 @@ export default { ...@@ -289,7 +296,6 @@ export default {
// this.$store.state.websocket.webSocketMsg=a // this.$store.state.websocket.webSocketMsg=a
// } // }
// }, // },
}, },
watch: { watch: {
// getWsMsg: { // getWsMsg: {
...@@ -303,10 +309,9 @@ export default { ...@@ -303,10 +309,9 @@ export default {
mounted() { mounted() {
this.getTableData(); this.getTableData();
}, },
created(){ created() {
// socket({socketUrl:this.wsUrl});
// socket({socketUrl:this.wsUrl}); },
}
}; };
</script> </script>
...@@ -342,6 +347,9 @@ export default { ...@@ -342,6 +347,9 @@ export default {
& ::v-deep .important { & ::v-deep .important {
background-color: #f89850; background-color: #f89850;
} }
& ::v-deep .common {
background-color: #ead906;
}
.page { .page {
display: flex; display: flex;
align-items: center; align-items: center;
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
<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>
<div v-if="isQuery"> <div v-if="isQuery">
...@@ -50,11 +49,17 @@ ...@@ -50,11 +49,17 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
v-if="scope.row.confirmStatus === 1 && scope.row.connectStatusName == '连接正常'" v-if="
scope.row.confirmStatus === 1 &&
scope.row.connectStatusName == '连接正常'
"
@click="cancel2(scope.row)" @click="cancel2(scope.row)"
>取消</el-button >取消</el-button
> >
<el-button type="text" v-else-if="scope.row.confirmStatus === 0" @click="confirm2(scope.row)" <el-button
type="text"
v-else-if="scope.row.confirmStatus === 0"
@click="confirm2(scope.row)"
>确认</el-button >确认</el-button
> >
</template> </template>
...@@ -129,7 +134,6 @@ ...@@ -129,7 +134,6 @@
</template> </template>
<script> <script>
import { deviceList, deviceConfirm, deviceCancel } 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";
...@@ -138,7 +142,7 @@ import socket from "@/utils/websocket"; ...@@ -138,7 +142,7 @@ import socket from "@/utils/websocket";
export default { export default {
data() { data() {
return { return {
alarmInfo:'', alarmInfo: "",
dialogInfo: [], dialogInfo: [],
centerDialogVisible: false, centerDialogVisible: false,
confirmStatus: 2, confirmStatus: 2,
...@@ -251,17 +255,14 @@ export default { ...@@ -251,17 +255,14 @@ export default {
download(res, "vnd.ms-excel", `设备连接告警.xls`); download(res, "vnd.ms-excel", `设备连接告警.xls`);
}); });
}, },
}, },
mounted() { mounted() {
this.getTableData(); this.getTableData();
}, },
created(){ created() {
// socket({socketUrl:this.wsUrl}); // socket({socketUrl:this.wsUrl});
} },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -294,16 +295,16 @@ export default { ...@@ -294,16 +295,16 @@ export default {
} }
} }
} }
.tips{ .tips {
width: 400px; width: 400px;
height: 80px; height: 80px;
background: #fff; background: #fff;
box-shadow: 0px 2px 14px #888888; box-shadow: 0px 2px 14px #888888;
border-radius: 5px; border-radius: 5px;
padding: 0 20px 20px 20px; padding: 0 20px 20px 20px;
position: absolute; position: absolute;
text-align: center; text-align: center;
top:calc(50% - 40px); top: calc(50% - 40px);
left:calc(50% - 200px) left: calc(50% - 200px);
} }
</style> </style>
...@@ -118,6 +118,8 @@ export default { ...@@ -118,6 +118,8 @@ export default {
return "emergency"; return "emergency";
} else if (row.alarmLevelName == "重要" && column.label == "告警级别") { } else if (row.alarmLevelName == "重要" && column.label == "告警级别") {
return "important"; return "important";
} else if (row.alarmLevelName == "一般" && column.label == "告警级别") {
return "common";
} }
if (rowIndex % 2 == 1) { if (rowIndex % 2 == 1) {
return "stripe"; return "stripe";
...@@ -165,6 +167,9 @@ export default { ...@@ -165,6 +167,9 @@ export default {
} }
& ::v-deep .important { & ::v-deep .important {
background-color: #f89850; background-color: #f89850;
}
& ::v-deep .common {
background-color: #ead906;
} }
.page { .page {
display: flex; display: flex;
......
...@@ -71,6 +71,8 @@ export default { ...@@ -71,6 +71,8 @@ export default {
return "emergency"; return "emergency";
} else if (row.level === "重要" && column.label === "告警级别") { } else if (row.level === "重要" && column.label === "告警级别") {
return "important"; return "important";
} else if (row.level == "一般" && column.label == "告警级别") {
return "common";
} }
if (rowIndex % 2 === 1) { if (rowIndex % 2 === 1) {
return "stripe"; return "stripe";
...@@ -148,6 +150,9 @@ export default { ...@@ -148,6 +150,9 @@ export default {
& ::v-deep .important { & ::v-deep .important {
background-color: #f89850; background-color: #f89850;
} }
& ::v-deep .common {
background-color: #ead906;
}
.page { .page {
display: flex; display: flex;
align-items: center; align-items: center;
......
...@@ -75,6 +75,8 @@ export default { ...@@ -75,6 +75,8 @@ export default {
return 'emergency' return 'emergency'
} else if (row.alarmLevelName == '重要' && column.label == '告警级别') { } else if (row.alarmLevelName == '重要' && column.label == '告警级别') {
return 'important' return 'important'
} else if (row.alarmLevelName == '一般' && column.label == '告警级别') {
return 'common'
} }
if (rowIndex % 2 == 1) { if (rowIndex % 2 == 1) {
return 'stripe' return 'stripe'
...@@ -145,6 +147,9 @@ export default { ...@@ -145,6 +147,9 @@ export default {
} }
& ::v-deep .important { & ::v-deep .important {
background-color: #f89850; background-color: #f89850;
}
& ::v-deep .common {
background-color: #ead906;
} }
.page { .page {
display: flex; display: flex;
......
...@@ -208,7 +208,6 @@ export default { ...@@ -208,7 +208,6 @@ export default {
// let ids = []; // let ids = [];
// this.ids.length != 0 ? (ids = this.ids) : (ids = this.exids); // this.ids.length != 0 ? (ids = this.ids) : (ids = this.exids);
exportFsu({ ids: this.exids }).then((res) => { exportFsu({ ids: this.exids }).then((res) => {
console.log(ids);
download(res, "vnd.ms-excel", `FSU表.xls`); download(res, "vnd.ms-excel", `FSU表.xls`);
}); });
}, },
......
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