Commit 99666f63 authored by xuke's avatar xuke

报警参数-第四次提交

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