Commit 99666f63 authored by xuke's avatar xuke

报警参数-第四次提交

parent bb3248b0
......@@ -62,7 +62,6 @@
</el-table>
</el-card>
<el-dialog @close="onClose" v-model="show" class="dialog" :show-scrollbar="true">
<div class="div-header">
<el-form :inline="true">
......@@ -81,16 +80,12 @@
<el-button type="primary" @click="paramsSetting" style="min-width: 70px;">确定</el-button>
</el-form-item>
</el-form>
</div>
<el-row>
<el-col :span="6">
<div class="left">
<el-table :data="cnNames_before"
class="scroll-table"
:row-style="{height: '16px'}"
:cell-style="{padding:'0px'}"
>
<el-table :data="cnNames_before" class="scroll-table" :row-style="{ height: '16px' }"
:cell-style="{ padding: '0px' }">
<el-table-column prop="cnName" class-name="before-hover-column" :show-overflow-tooltip="true">
<template #default="scope">
<div @click="selectBeforeParams(scope.row)">{{ scope.row.cnName }}</div>
......@@ -102,7 +97,6 @@
<el-col :span="12">
<div class="middle">
<!-- <el-card class="card_contianer"> -->
<table cellpadding="0" cellspacing="1" border="1" class="big_table">
<tr>
<th style="width: 25%">报警名称:</th>
......@@ -134,7 +128,7 @@
<table cellpadding="0" cellspacing="0">
<tr>
<td style="text-align: left">
<el-input style="width: 80%" v-model="addParams.topMost"></el-input>
<el-input v-float-number style="width: 80%" v-model="addParams.topMost"></el-input>
</td>
</tr>
</table>
......@@ -146,7 +140,7 @@
<table cellpadding="0" cellspacing="0">
<tr>
<td style="text-align: left">
<el-input style="width: 80%" v-model="addParams.upper"></el-input>
<el-input v-float-number style="width: 80%" v-model="addParams.upper"></el-input>
</td>
</tr>
</table>
......@@ -159,21 +153,21 @@
<table cellpadding="0" cellspacing="0">
<tr>
<td style="text-align: left">
<el-input style="width: 80%" v-model="addParams.downMost"></el-input>
<el-input v-float-number style="width: 80%" v-model="addParams.downMost"></el-input>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<th style="width: 25%">报警预案</th>
<td style="width: 60%; margin: 0; padding: 0">
<table cellpadding="0" cellspacing="0">
<tr>
<td style="text-align: left">
<el-input style="width: 80%" type="textarea" rows="6" v-model="addParams.alarmPlan"></el-input>
<el-input v-float-number style="width: 80%" type="textarea" rows="6"
v-model="addParams.alarmPlan"></el-input>
</td>
</tr>
</table>
......@@ -221,11 +215,8 @@
<el-col :span="6">
<div class="left">
<el-table :data="cnNames_after"
class="scroll-table"
:row-style="{height: '16px'}"
:cell-style="{padding:'0px'}"
>
<el-table :data="cnNames_after" class="scroll-table" :row-style="{ height: '16px' }"
:cell-style="{ padding: '0px' }">
<el-table-column prop="cnName" class-name="after-hover-column">
<template #default="scope">
<div @click="selectAfterParams(scope.row)">{{ scope.row.cnName }}</div>
......@@ -236,8 +227,6 @@
</el-col>
</el-row>
</el-dialog>
</template>
......@@ -250,6 +239,7 @@ import store from "../../store/index";
import { ElMessage } from 'element-plus';
import { watchEffect } from 'vue';
import { add } from 'lodash';
import { vFloatNumber } from "@/utils/directives.js";
//分页设置
const currentPage = ref(1)
......@@ -268,10 +258,6 @@ const refreshItem = ref(0)
const AlarmInfo = ref([])
const dept = ref('')
function open() {
show.value = true
}
......@@ -282,7 +268,6 @@ function onsubmit() {
function onCancel() {
show.value = false
refreshItem++
}
getEnterprise();
......@@ -303,7 +288,7 @@ function handleHeadAddClass({ column }) {
if (sortField[column.property]) {
column.order = sortField[column.property]
}
};
}
var date = new Date();
var year = date.getFullYear();
......@@ -336,8 +321,6 @@ if (!endTime) {
sessionStorage.setItem("DeviceQueryEnd", endTime);
}
getSupplys();
getdata();
function getdata() {
......@@ -346,7 +329,6 @@ function getdata() {
gettransfer();
}
//获取选择列表
function getoptions() {
if (type.value === "GetPipeAlarmStatusData") {
......@@ -651,30 +633,8 @@ const selectAfterParams = (row) => {
console.log("查看baseId --- dataaaaa:", data);
data.then(function (val) {
console.log("valllll:", val);
// Object.assign({...addParams.value},val)
// params.value = val.data
addParams.value = {...val.data}
// 回显数据
// "updateNullFields": "",
// "voicePath": "",
// "isVoice": "",
// "topMost": "",
// "upper": "",
// "lower": "",
// "downMost": "",
// "alarmPlan": "",
// "isShortMessage": "",
// "isAlarm": "",
// "isActive": true
// addParams.value.updateNullFields=val.
// addParams.value.voicePath=""
// addParams.value.
// addParams.value.
// addParams.value.
// addParams.value.
// addParams.value.
console.log("addParams.value/////////",addParams.value);
addParams.value = { ...val.data }
console.log("addParams.value/////////", addParams.value);
console.log("!!!!!Params.value:", params.value);
param.value.cnName = row.cnName
if (type.value === 1) {
......@@ -746,11 +706,7 @@ const onAdd = () => {
ElMessage.error("换热机修改失败!!")
}
})
}
}
// 按钮
......@@ -758,7 +714,7 @@ const button = ref(true)
// 删除逻辑
const onDel = () => {
if(type.value === 1) {
if (type.value === 1) {
http.post("api/alarm/para/pipedelete", { id: delId.value }, false).then((res) => {
if (res.success) {
ElMessage.success("总管参数删除成功!!")
......@@ -768,7 +724,7 @@ const onDel = () => {
ElMessage.error("删除失败!!")
}
})
}else if(type.value === 2) {
} else if (type.value === 2) {
http.post("api/alarm/para/boilerdelete", { id: delId.value }, false).then((res) => {
if (res.success) {
ElMessage.success("锅炉参数删除成功!!")
......@@ -778,7 +734,7 @@ const onDel = () => {
ElMessage.error("删除失败!!")
}
})
}else {
} else {
http.post("api/alarm/para/transdelete", { id: delId.value }, false).then((res) => {
if (res.success) {
ElMessage.success("换热站参数删除成功!!")
......@@ -793,13 +749,12 @@ const onDel = () => {
// 关闭dialog清空数据
const onClose = () => {
type.value=""
type.value = ""
dept.value = ""
cnNames_before.value = ""
cnNames_after.value=""
reset()
param.value.cnName=""
cnNames_after.value = ""
reset()
param.value.cnName = ""
}
onMounted(() => {
......@@ -863,7 +818,7 @@ onUnmounted(() => {
.el-cascader .el-input .el-input__inner:focus,
.el-cascader .el-input.is-focus .el-input__inner {
height: 33px; //这里高度根据需求自己设定
height: 33px;
}
.el-cascader__tags {
......@@ -949,11 +904,13 @@ table td {
.dialog {
width: 70%;
}
// dialog中的滚动条
.scroll-table {
max-height: 400px;
overflow-y: auto;
}
// .scroll-table,
// .scroll-table .el-table__header-wrapper,
// .scroll-table .el-table__body-wrapper,
......@@ -985,8 +942,4 @@ table td {
background-color: #508EFF;
color: white;
}
</style>
\ No newline at end of file
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