|
|
@@ -1,8 +1,6 @@
|
|
|
<template>
|
|
|
<div class="rule-list">
|
|
|
- <div class="list-title">
|
|
|
- 预警规则配置
|
|
|
- </div>
|
|
|
+ <div class="list-title"> 预警规则配置 </div>
|
|
|
<div class="list-content">
|
|
|
<div class="basic-list-content">
|
|
|
<div class="content-title">
|
|
|
@@ -11,10 +9,9 @@
|
|
|
<div class="table-content">
|
|
|
<div class="content-item" v-for="(item, index) in tableData" :key="index">
|
|
|
<div class="item-text">{{ item.ruleId }}</div>
|
|
|
- <div class="item-text">{{ item.ruleName }}
|
|
|
- </div>
|
|
|
+ <div class="item-text">{{ item.ruleName }} </div>
|
|
|
<div class="item-text item-text1">{{ item.fctj }}</div>
|
|
|
- <div class="item-text ">
|
|
|
+ <div class="item-text">
|
|
|
<a-switch v-model:checked="item.status" size="small" />
|
|
|
</div>
|
|
|
<div class="item-text">
|
|
|
@@ -24,8 +21,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="basic-list-content">
|
|
|
- <basicBorder :widthV="298" colorV="orange" title="【编辑规则】一级温度报警(Rule-001)">
|
|
|
- <div class="temp-warn">
|
|
|
+ <basicBorder :widthV="298" colorV="orange" title="【编辑规则】一级温度报警(Rule-001)">
|
|
|
+ <div class="temp-warn">
|
|
|
<div class="warn-item">
|
|
|
<div class="item-label">规则名称 : </div>
|
|
|
<a-input class="item-input" v-model:value="rulesData.ruleName" placeholder="请输入" size="small" />
|
|
|
@@ -46,16 +43,16 @@
|
|
|
<div class="item-label">联动动作 : </div>
|
|
|
<a-input class="item-input" v-model:value="rulesData.lddz" placeholder="请输入" size="small" />
|
|
|
</div>
|
|
|
- <div class="warn-item">
|
|
|
+ <div class="warn-item">
|
|
|
<div class="item-label">通知对象 : </div>
|
|
|
<a-input class="item-input" v-model:value="rulesData.person" placeholder="请输入" size="small" />
|
|
|
</div>
|
|
|
- <div class="btn-box">
|
|
|
- <div class="baisc-btn">取消</div>
|
|
|
- <div class="baisc-btn">
|
|
|
- <div class="btn-item">保存</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <div class="btn-box">
|
|
|
+ <div class="baisc-btn">取消</div>
|
|
|
+ <div class="baisc-btn">
|
|
|
+ <div class="btn-item">保存</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</basicBorder>
|
|
|
</div>
|
|
|
@@ -64,9 +61,9 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import { reactive, ref } from 'vue'
|
|
|
-import basicBorder from '../BasicBorder.vue'
|
|
|
-import { rules } from '/@/utils/helper/validator.js'
|
|
|
+import { reactive, ref } from 'vue';
|
|
|
+import basicBorder from '../BasicBorder.vue';
|
|
|
+import { rules } from '/@/utils/helper/validator.js';
|
|
|
|
|
|
let titleList = ref<any[]>([
|
|
|
{ label: '规则ID', value: '1' },
|
|
|
@@ -74,33 +71,34 @@ let titleList = ref<any[]>([
|
|
|
{ label: '触发条件', value: '3' },
|
|
|
{ label: '启用', value: '4' },
|
|
|
{ label: '操作', value: '5' },
|
|
|
-])
|
|
|
+]);
|
|
|
let tableData = ref<any[]>([
|
|
|
- { ruleId: 'Rule-001', ruleName: '一级温度报警', fctj: '温度>=60℃', status: true, },
|
|
|
- { ruleId: 'Rule-001', ruleName: '一级温度报警', fctj: '温度>=60℃', status: true, },
|
|
|
- { ruleId: 'Rule-001', ruleName: '一级温度报警', fctj: '温度>=60℃', status: false, },
|
|
|
- { ruleId: 'Rule-001', ruleName: '一级温度报警', fctj: '温度>=60℃', status: true, },
|
|
|
- { ruleId: 'Rule-001', ruleName: '一级温度报警', fctj: '温度>=60℃', status: true, },
|
|
|
- { ruleId: 'Rule-001', ruleName: '一级温度报警', fctj: '温度>=60℃', status: true, },
|
|
|
- { ruleId: 'Rule-001', ruleName: '一级温度报警', fctj: '温度>=60℃', status: true, },
|
|
|
- { ruleId: 'Rule-001', ruleName: '一级温度报警', fctj: '温度>=60℃', status: true, },
|
|
|
- { ruleId: 'Rule-001', ruleName: '一级温度报警', fctj: '温度>=60℃', status: true, },
|
|
|
-])
|
|
|
-let rulesData=reactive({
|
|
|
-ruleName:'',
|
|
|
-grade:'',
|
|
|
-temp:'',
|
|
|
-time:'',
|
|
|
-lddz:'',
|
|
|
-person:'',
|
|
|
-})
|
|
|
+ { ruleId: 'Rule-001', ruleName: '一级温度报警', fctj: '温度>=60℃', status: true },
|
|
|
+ { ruleId: 'Rule-001', ruleName: '一级温度报警', fctj: '温度>=60℃', status: true },
|
|
|
+ { ruleId: 'Rule-001', ruleName: '一级温度报警', fctj: '温度>=60℃', status: false },
|
|
|
+ { ruleId: 'Rule-001', ruleName: '一级温度报警', fctj: '温度>=60℃', status: true },
|
|
|
+ { ruleId: 'Rule-001', ruleName: '一级温度报警', fctj: '温度>=60℃', status: true },
|
|
|
+ { ruleId: 'Rule-001', ruleName: '一级温度报警', fctj: '温度>=60℃', status: true },
|
|
|
+ { ruleId: 'Rule-001', ruleName: '一级温度报警', fctj: '温度>=60℃', status: true },
|
|
|
+ { ruleId: 'Rule-001', ruleName: '一级温度报警', fctj: '温度>=60℃', status: true },
|
|
|
+ { ruleId: 'Rule-001', ruleName: '一级温度报警', fctj: '温度>=60℃', status: true },
|
|
|
+]);
|
|
|
+let rulesData = reactive({
|
|
|
+ ruleName: '',
|
|
|
+ grade: '',
|
|
|
+ temp: '',
|
|
|
+ time: '',
|
|
|
+ lddz: '',
|
|
|
+ person: '',
|
|
|
+});
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
@import '/@/design/theme.less';
|
|
|
|
|
|
@{theme-deepblue} {
|
|
|
- .rule-list {}
|
|
|
+ .rule-list {
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.rule-list {
|
|
|
@@ -116,12 +114,11 @@ person:'',
|
|
|
width: 177px;
|
|
|
height: 30px;
|
|
|
line-height: 22px;
|
|
|
- padding-left: 16px;
|
|
|
color: #01fefc;
|
|
|
font-weight: bolder;
|
|
|
background: var(--image-box-bg) no-repeat;
|
|
|
- background-size: 100% 100%;
|
|
|
- margin-bottom: 5px;
|
|
|
+ background-size: 80% 100%;
|
|
|
+ margin-bottom: 10px;
|
|
|
}
|
|
|
|
|
|
.list-content {
|
|
|
@@ -154,11 +151,11 @@ person:'',
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
color: #01fefc;
|
|
|
- &:nth-child(2){
|
|
|
- flex:1.5
|
|
|
+ &:nth-child(2) {
|
|
|
+ flex: 1.5;
|
|
|
}
|
|
|
- &:nth-child(3){
|
|
|
- flex:1.5
|
|
|
+ &:nth-child(3) {
|
|
|
+ flex: 1.5;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -188,16 +185,16 @@ person:'',
|
|
|
flex: 1;
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
- &:nth-child(2){
|
|
|
- flex:1.5
|
|
|
+ &:nth-child(2) {
|
|
|
+ flex: 1.5;
|
|
|
}
|
|
|
- &:nth-child(3){
|
|
|
- flex:1.5
|
|
|
+ &:nth-child(3) {
|
|
|
+ flex: 1.5;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.item-text1 {
|
|
|
- color: orange;
|
|
|
+ color: orange;
|
|
|
}
|
|
|
.text-look {
|
|
|
padding: 0px 3px;
|
|
|
@@ -206,12 +203,12 @@ person:'',
|
|
|
background-color: #2484bc;
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
- .temp-warn{
|
|
|
+ .temp-warn {
|
|
|
position: relative;
|
|
|
height: 100%;
|
|
|
}
|
|
|
- .warn-item {
|
|
|
- display: flex;
|
|
|
+ .warn-item {
|
|
|
+ display: flex;
|
|
|
align-items: center;
|
|
|
height: 30px;
|
|
|
background: linear-gradient(to right, #134c77, transparent);
|
|
|
@@ -223,7 +220,7 @@ person:'',
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
}
|
|
|
- .item-label {
|
|
|
+ .item-label {
|
|
|
width: 100px;
|
|
|
text-align: right;
|
|
|
margin-right: 5px;
|
|
|
@@ -233,8 +230,8 @@ person:'',
|
|
|
border: 1px solid #2792c2;
|
|
|
color: #fff;
|
|
|
}
|
|
|
- .btn-box {
|
|
|
- width: 140px;
|
|
|
+ .btn-box {
|
|
|
+ width: 140px;
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
@@ -244,7 +241,7 @@ person:'',
|
|
|
}
|
|
|
|
|
|
.baisc-btn {
|
|
|
- display: flex;
|
|
|
+ display: flex;
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
width: 65px;
|
|
|
@@ -263,7 +260,7 @@ person:'',
|
|
|
height: 100%;
|
|
|
background-color: rgba(32, 166, 169);
|
|
|
}
|
|
|
- ::-webkit-scrollbar{
|
|
|
+ ::-webkit-scrollbar {
|
|
|
display: none;
|
|
|
}
|
|
|
}
|