Commit b9670ad7 authored by shiwr's avatar shiwr

bug

parent 412cc534
<%inherit file="/base_index.html"/> <%inherit file="/base_index.html"/>
<%block name='content'> <%block name='content'>
<style> <style>
.colorSucStyle {
color: #44b549;
}
.colorErrStyle {
color: orangered;
}
.lable_color {
color: rgba(0, 0, 0, 0.70);
}
</style> </style>
<div class="tab-content mb20"> <div class="tab-content mb20">
<div id="scanTask"> <div id="errorAlarm">
<div class="scanTask" v-cloak> <div class="errorAlarm" v-cloak>
<div class="tab-pane fade active in"> <div class="tab-pane fade active in">
<div class="panel panel-default table7_demo king-table7-demo3" style="border:none;"> <div class="panel panel-default table7_demo king-table7-demo3" style="border:none;">
<div class="panel-body"> <div class="panel-body">
...@@ -30,7 +19,8 @@ ...@@ -30,7 +19,8 @@
@click="createNewTask()">批量新建 @click="createNewTask()">批量新建
</el-button> </el-button>
<el-button type="primary" size="medium" <el-button type="primary" size="medium"
@click="createNewAlarm()" style=" float:right;margin-right:12px">新建 @click="createNewAlarm()" style=" float:right;margin-right:12px">
新建
</el-button> </el-button>
</el-col> </el-col>
</el-row> </el-row>
...@@ -120,18 +110,22 @@ ...@@ -120,18 +110,22 @@
align="left"></el-table-column> align="left"></el-table-column>
<el-table-column prop="alarm_summary" label="故障预警摘要" header-align="center" align="left" <el-table-column prop="alarm_summary" label="故障预警摘要" header-align="center" align="left"
show-overflow-tooltip></el-table-column> show-overflow-tooltip></el-table-column>
<el-table-column width="130" prop="alarm_level" label="预警级别" align="center"></el-table-column> <el-table-column width="130" prop="alarm_level" label="预警级别"
align="center"></el-table-column>
<el-table-column width="130" prop="alarm_system" label="预警系统" <el-table-column width="130" prop="alarm_system" label="预警系统"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column width="130" prop="user" label="处理人" <el-table-column width="130" prop="user" label="处理人"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column width="130" label="操作" align="center"> <el-table-column width="130" label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="user!=scope.row.user" @click="readRow(scope.row)" type="text" size="small">查看 <el-button v-if="user!=scope.row.user" @click="readRow(scope.row)" type="text"
size="small">查看
</el-button> </el-button>
<el-button v-if="user==scope.row.user" @click="readRow(scope.row)" type="text" size="small">编辑 <el-button v-if="user==scope.row.user" @click="readRow(scope.row)" type="text"
size="small">编辑
</el-button> </el-button>
<el-button v-if="user==scope.row.user" @click="delAlarm(scope.row)" type="text" size="small">删除 <el-button v-if="user==scope.row.user" @click="delAlarm(scope.row)" type="text"
size="small">删除
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -329,7 +323,7 @@ ...@@ -329,7 +323,7 @@
}; };
var vm = new Vue({ var vm = new Vue({
el: "#scanTask", el: "#errorAlarm",
data() { data() {
return { return {
dateoutflag: false, dateoutflag: false,
...@@ -394,23 +388,24 @@ ...@@ -394,23 +388,24 @@
this.systemList = res this.systemList = res
}) })
}, },
createNewAlarm(){ createNewAlarm() {
window.location.href = "${SITE_URL}alarm_edit" window.location.href = "${SITE_URL}alarm_edit"
}, },
delAlarm(){ delAlarm(row) {
this.$confirm('此操作将永久删除该记录, 是否继续?', '提示', { let vm = this
confirmButtonText: '确定', vm.$confirm('此操作将永久删除该记录, 是否继续?', '提示', {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' confirmButtonText: '确定',
}).then(() => { type: 'warning'
let id = row.alarm_number; }).then(() => {
this.sureDelete(id) let id = row.alarm_number;
}).catch(() => { this.sureDelete(id)
this.$message({ }).catch(() => {
type: 'info', this.$message({
message: '已取消删除' type: 'info',
}); message: '已取消删除'
}); });
});
}, },
//查询 //查询
searchList() { searchList() {
...@@ -499,19 +494,19 @@ ...@@ -499,19 +494,19 @@
let vm = this; let vm = this;
let data = {alarm_number: id}; let data = {alarm_number: id};
axios.post('${SITE_URL}del_alarm/', data).then(res => { axios.post('${SITE_URL}del_alarm/', data).then(res => {
if(res.code==0){ if (res.code == 0) {
this.$message({ this.$message({
type: 'success', type: 'success',
message: res.message message: res.message
}); });
this.getAlarmList() this.getAlarmList()
}else{ } else {
this.$message({ this.$message({
type: 'error', type: 'error',
message: res.message message: res.message
}); });
this.dellabelshow = false this.dellabelshow = false
} }
}, err => { }, err => {
vm.$message({ vm.$message({
type: 'error', type: 'error',
......
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
</style> </style>
<div class="tab-content mb20"> <div class="tab-content mb20">
<div id="scanTask"> <div id="eventEdit">
<div class="scanTask" v-cloak> <div class="eventEdit" v-cloak>
<div style=" padding-left: 20px;" > <div style=" padding-left: 20px;" >
<el-form label-width="90px" :model="formLine" > <el-form label-width="90px" :model="formLine" >
<div class="bk-panel" style="padding-bottom: 10px; padding-top: 25px"> <div class="bk-panel" style="padding-bottom: 10px; padding-top: 25px">
...@@ -729,7 +729,7 @@ var unique= function (array) { ...@@ -729,7 +729,7 @@ var unique= function (array) {
} }
var vm = new Vue({ var vm = new Vue({
el: "#scanTask", el: "#eventEdit",
data() { data() {
return { return {
taskData2: { taskData2: {
......
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