This commit is contained in:
joylink_zhaoerwei 2023-05-22 17:55:41 +08:00
parent 1501a75ad3
commit 228c06e61d

View File

@ -1,92 +1,8 @@
<template>
<div>
<div>
<!-- <el-button type="warning" icon="el-icon-message-solid" circle @click="showAlarm" />
<div v-if="alarmDetailMessageList.length>0" class="alarm-counter">{{ alarmDetailMessageList.length }}</div> -->
<audio ref="audio" />
</div>
<!-- <el-dialog
v-dialogDrag
:modal="false"
:visible.sync="showAlarmMessageList"
width="900px"
title="设备故障!!!"
>
<el-table
:data="tableData"
border
:cell-style="{'text-align':'center'}"
:header-cell-style="{'text-align':'center'}"
style="width: 100%"
@selection-change="handleSelectionChange"
@select-all="handleSelectionAll"
>
<el-table-column
type="selection"
width="40"
/>
<el-table-column
prop="date"
label="时间"
width="110"
/>
<el-table-column
prop="name"
label="故障设备"
width="110"
/>
<el-table-column
prop="id"
label="故障编号"
width="90"
/>
<el-table-column
prop="message"
label="故障信息"
/>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
size="mini"
@click="goToDetail(scope.$index,scope.row)"
>详情</el-button>
<el-button
size="mini"
:type="dealAlarmMessage[scope.$index] ? 'success' : 'danger'"
@click="handleAlarmMessage(scope.$index,scope.row)"
>{{ dealAlarmMessage[scope.$index] ? '故障信息已处理' : '故障信息未处理' }}</el-button>
</template>
</el-table-column>
<el-table-column
prop="tag"
label="标签"
width="100"
:filters="[{ text: '一般故障', value: '一般故障' }, { text: '中等故障', value: '中等故障' }, { text: '重大故障', value: '重大故障' }]"
:filter-method="filterTag"
filter-placement="bottom-end"
>
<template slot-scope="scope">
<el-tag
:type="scope.row.tag === '一般故障' ? 'warning' : 'danger'"
disable-transitions
>{{ scope.row.tag }}</el-tag>
</template>
</el-table-column>
</el-table>
</el-dialog>
<el-dialog
v-dialogDrag
title="提示"
:visible.sync="dialogVisible"
width="30%"
>
<span>进行全选操作</span>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="dialogVisible = false"> </el-button>
</span>
:class="itemsstyle[index]"
</el-dialog> -->
<div v-if="showAlarmMessageList">
<div v-for="(item, index) in alarmDetailMessageList" :key="index">
<el-dialog
@ -248,46 +164,6 @@ export default {
});
this.showAlarmMessageList = true;
},
handleSelectionChange(val) {
if (val.length === this.tableData.length) {
this.dialogVisible = true;
}
},
handleSelectionAll(val) {
if (val.length > 0) {
this.dialogVisible = true;
}
},
handleAlarmMessage(index, row) {
this.$confirm('此操作将处理故障信息, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.dealAlarmMessage.splice(index, 1, !this.dealAlarmMessage[index]);
this.$message({
type: 'success',
message: '处理成功!'
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消处理'
});
});
},
goToDetail(index, row) {
/* const routeUrl = this.$router.resolve({
path: '/thirdLogin'
// query: { id: 96 }
});
window.open(routeUrl.href, '_blank'); */
//
},
filterTag(value, row) {
return row.tag === value;
},
goToAlarmDetail() {
}
}
@ -305,24 +181,6 @@ export default {
}
</style>
<style lang="scss" scoped>
.alarm-button{
position: absolute;
left: 20px;
bottom: 58%;
.alarm-counter{
position: absolute;
left: 20px;
bottom: 62%;
width: 20px;
height: 20px;
border-radius: 50%;
background-color: red;
text-align: center;
color: #fff;
font-size: 14px;
}
}
.alarm-message-detail {
display: flex;
justify-content: space-between;