Browse Source

修改列表显示。
添加复制到功能。

wubiyu 1 năm trước cách đây
mục cha
commit
a80b487fad

+ 24 - 15
src/api/iot/alarmRule.js

@@ -2,32 +2,41 @@ import request from '@/utils/request'
 
 // 新增报警规则界面初始化数据
 export function getAddAlarmRuleInit() {
-    return request({
-      url: '/iot/iot_alarm/getAddAlarmRule',
-      method: 'get',
-    })
+  return request({
+    url: '/iot/iot_alarm/getAddAlarmRule',
+    method: 'get',
+  })
 }
 
 // 根据报警规则ID获取规则数据 
 export function getAlarmRule(alarmRuleId) {
-    return request({
-      url: `/iot/iot_alarm/getRuleById/${alarmRuleId}`,
-      method: 'get',
-    })
+  return request({
+    url: `/iot/iot_alarm/getRuleById/${alarmRuleId}`,
+    method: 'get',
+  })
 }
 
-export function getAlarmRules() {
+export function getAlarmRules(alarmType, ruleName, pageIndex, pageSize) {
+  if(ruleName=="") ruleName = "undefined";
   return request({
-    url: `/iot/iot_alarm/getRules/`,
+    url: `/iot/iot_alarm/getRules/${alarmType}/${pageIndex}/${pageSize}/${encodeURIComponent(ruleName)}`,
     method: 'get',
   })
 }
 
 // 保存或者更新告警规则
 export function saveAlarmRule(data) {
-    return request({
-      url: '/iot/iot_alarm/saveOrUpdateAlarmRule',
-      method: 'post',
-      data: data
-    })
+  return request({
+    url: '/iot/iot_alarm/saveOrUpdateAlarmRule',
+    method: 'post',
+    data: data
+  })
+}
+
+// 根据报警规则ID删除规则数据 
+export function deleteRuld(alarmRuleId) {
+  return request({
+    url: `/iot/iot_alarm/deleteRule/${alarmRuleId}`,
+    method: 'get',
+  })
 }

+ 64 - 78
src/views/warnRule/addDialogCom.vue

@@ -22,8 +22,27 @@
       <el-col :span="10">
         <el-row type="flex" justify="end">
           <el-col :span="11">
-            <el-button type="primary" size="medium" @click="addBtnClick">新增规则</el-button>
-            <el-button type="primary" @click="copyToClick">复制到所有</el-button>
+            <el-button type="primary" size="medium" @click="addBtnClick">新增规则</el-button>&nbsp;&nbsp;
+            <el-popover placement="bottom" title="复制到" trigger="click" @show="copyToPanelShow" v-model="copyToPanelVisible">
+              <div class="copytoPanel">
+                <el-card>
+                  <el-checkbox-group v-model="copyToSelects">
+                    <el-checkbox label="1">周一</el-checkbox>
+                    <el-checkbox label="2">周二</el-checkbox>
+                    <el-checkbox label="3">周三</el-checkbox>
+                    <el-checkbox label="4">周四</el-checkbox>
+                    <el-checkbox label="5">周五</el-checkbox>
+                    <el-checkbox label="6">周六</el-checkbox>
+                    <el-checkbox label="7">周日</el-checkbox>
+                  </el-checkbox-group>
+                  <br />
+                  <el-button type="primary" @click="copyToClick">复制</el-button>
+                </el-card>
+              </div>
+
+              <el-button slot="reference" type="primary">复制到</el-button>
+            </el-popover>
+
           </el-col>
         </el-row>
       </el-col>
@@ -51,7 +70,8 @@
         </el-select>&nbsp;&nbsp;
         <el-select v-model="item.value" placeholder="请选择操作" @change="valueChanged(item, item.value)">
           <el-option v-for="sourceValueItem in item.sourceValues" :key="sourceValueItem.key"
-            :label="sourceValueItem.value" :value="sourceValueItem.key" @click.native="sourceValueItemClick(sourceValueItem,item)">
+            :label="sourceValueItem.value" :value="sourceValueItem.key"
+            @click.native="sourceValueItemClick(sourceValueItem, item)">
           </el-option>
         </el-select>&nbsp;&nbsp;
         <el-button type="primary" @click.native="removeClick(item, index)">移除</el-button>
@@ -60,7 +80,6 @@
   </div>
 </template>
 <script>
-import dayjs from "dayjs";
 export default {
   props: {
     sourceType: String,
@@ -68,79 +87,11 @@ export default {
     sourceTypeList: Array,
   },
   name: "SocWebAddDialogCom",
-  dicts: [
-    "core_check_type",
-  ],
   data() {
     return {
       weekDay: "1",
-      value: "",
-      formData: {
-        taskName: "",
-      },
-      tableList: [
-        {
-          name: "1",
-          name1: "2",
-        },
-        {
-          name: "1",
-          name1: "2",
-        },
-        {
-          name: "1",
-          name1: "2",
-        },
-        {
-          name: "1",
-          name1: "2",
-        },
-        {
-          name: "1",
-          name1: "2",
-        },
-        {
-          name: "1",
-          name1: "2",
-        },
-        {
-          name: "1",
-          name1: "2",
-        },
-        {
-          name: "1",
-          name1: "2",
-        },
-        {
-          name: "1",
-          name1: "2",
-        },
-        {
-          name: "1",
-          name1: "2",
-        },
-        {
-          name: "1",
-          name1: "2",
-        },
-      ],
-      options: [
-        {
-          value: "1",
-          label: "2",
-        },
-        {
-          value: "1",
-          label: "2",
-        },
-        {
-          value: "1",
-          label: "2",
-        },
-      ],
-      ruleDatas: {
-
-      },
+      copyToSelects: [],
+      copyToPanelVisible:false
     };
   },
 
@@ -193,7 +144,33 @@ export default {
       this.$forceUpdate();
     },
     copyToClick() {
-      console.log(this.ruleDatas);
+      if (this.copyToSelects.length == 0) {
+        this.$message({ message: "请选择需要复制到的星期!", type: 'warning' });
+        return;
+      }
+      if (this.datas[this.sourceType] == undefined ||
+        this.datas[this.sourceType][this.weekDay] == undefined ||
+        this.datas[this.sourceType][this.weekDay].length == 0) {
+        this.$message({ message: "没有可复制的数据", type: 'warning' });
+        return;
+      }
+
+      this.copyToSelects.forEach(i => {
+        let tempData = JSON.stringify(this.datas[this.sourceType][this.weekDay]);
+        let newData = JSON.parse(tempData);
+        newData.forEach(newDataItem => {
+          newDataItem.weekDay=i;
+        })
+        this.datas[this.sourceType][i] = newData;
+      });
+
+      this.copyToPanelVisible = false;
+      this.$forceUpdate();
+      console.log(this.copyToSelects);
+      console.log(this.sourceType);
+      console.log("weekDay", this.weekDay);
+      console.log(this.datas);
+      return true;
     },
     sourceTypeItemChanged(item, type) {
       this.initDataItem(item, type);
@@ -234,9 +211,11 @@ export default {
         this.$forceUpdate();
       }
     },
-    sourceValueItemClick(sourceValueItem,item)
-    {
-      console.log(sourceValueItem,item);
+    sourceValueItemClick(sourceValueItem, item) {
+      console.log(sourceValueItem, item);
+    },
+    copyToPanelShow() {
+      this.copyToSelects = [];
     }
   },
 };
@@ -253,4 +232,11 @@ export default {
     }
   }
 }
+
+.copytoPanel {
+  .el-checkbox {
+    width: 50px;
+    margin-top: 10px;
+  }
+}
 </style>

+ 6 - 4
src/views/warnRule/dialog.vue

@@ -113,11 +113,16 @@ export default {
         this.$message("获取初始化数据失败");
         return;
       }
+      
       this.sourceTypeList = initData.data.sourceTypeList;
       this.initSourceTypeDics();
       this.selectType = initData.data.sourceTypeList[0].sourceType + '';
       this.selectSystemFields = initData.data.sourceTypeList[0].systemFields;
       if (isAdd) {
+        this.formData.ruleName="";
+        this.formData.ruleDesc="";
+        this.formData.enabled=true;
+        this.formData.id = "";
         if (initData.data.sourceTypeList.length > 0) {
           this.ruleExpresses = {};
         }
@@ -185,8 +190,6 @@ export default {
       return item;
     },
     initSourceTypeDics() {
-      debugger;
-
       this.sourceTypeList.forEach(i => {
         if (this.sourceTypeDics[i.sourceType + ""] == undefined) {
           i.operatorsListDic = {};
@@ -195,10 +198,9 @@ export default {
           this.sourceTypeDics[i.sourceType + ""] = i;
           i.systemFields.forEach(systemFieldItem => {
             let systemFieldItemKey = `${i.sourceType}_${systemFieldItem.sysFieldCode}`;
-            if (i.systemFieldDic[systemFieldItemKey] = undefined) {
+            if (i.systemFieldDic[systemFieldItemKey] == undefined) {
               i.systemFieldDic[systemFieldItemKey] = systemFieldItem;
             }
-
             systemFieldItem.operatorsList.forEach(operator => {
               let operatorKey = `${i.sourceType}_${systemFieldItem.sysFieldCode}_${operator.key}`;
               if (i.operatorsListDic[operatorKey] == undefined) {

+ 145 - 235
src/views/warnRule/index.vue

@@ -4,14 +4,8 @@
       <el-col :span="24" :xs="24">
         <div class="main-right-box">
           <div class="main-search-box">
-            <el-form
-              :model="queryParams"
-              ref="queryForm"
-              size="small"
-              :inline="true"
-              v-show="showSearch"
-            >
-              <el-form-item label="规则类型" prop="taskName">
+            <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
+              <!-- <el-form-item label="规则类型" prop="taskName">
                 <el-select
                   v-model="queryParams.taskName"
                   clearable
@@ -28,108 +22,68 @@
                   >
                   </el-option>
                 </el-select>
-              </el-form-item>
+              </el-form-item> -->
 
-              <el-form-item label="规则名称" prop="taskName">
-                <el-input queryParams.taskName> </el-input>
+              <el-form-item label="规则名称" prop="ruleName">
+                <el-input v-model="queryParams.ruleName"> </el-input>
               </el-form-item>
             </el-form>
 
             <el-row :gutter="10">
               <el-col :span="1.5">
-                <el-button
-                  type="primary"
-                  icon="el-icon-search"
-                  size="mini"
-                  @click="handleQuery"
-                  >搜索
+                <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索
                 </el-button>
               </el-col>
               <el-col :span="1.5">
-                <el-button
-                  type="primary"
-                  icon="el-icon-refresh"
-                  size="mini"
-                  @click="resetQuery"
-                  >重置
+                <el-button type="primary" icon="el-icon-refresh" size="mini" @click="resetQuery">重置
                 </el-button>
               </el-col>
               <el-col :span="1.5">
-                <el-button type="primary" size="mini" @click="addRuleHandler"
-                  >新增规则
+                <el-button type="primary" size="mini" icon="el-icon-edit-outline" @click="addRuleHandler">新增规则
                 </el-button>
               </el-col>
-              <right-toolbar
-                :showSearch.sync="showSearch"
-                @queryTable="getList"
-              ></right-toolbar>
+              <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
             </el-row>
           </div>
-          <el-table
-            :data="alarmRules"
-            border
-            v-loading="loading"
-            height="600"
-            size="small"
-          >
+          <el-table :data="alarmRules" border v-loading="loading" height="600" size="small">
             <el-table-column type="expand">
-              <template slot-scope="props"
-                ><el-table
-                  :data="tableData"
-                  class="sonTable"
-                  border
-                  style="width: 90%"
-                >
-                  <el-table-column prop="date" label="设备类型" width="180">
+              <template slot-scope="props">
+                <el-table :data="props.row.ruleItems" class="sonTable" border style="width: 90%">
+                  <el-table-column prop="sourceName" label="设备类型" width="180">
                   </el-table-column>
-                  <el-table-column prop="name" label="作用时间" >
+                  <el-table-column prop="name" label="作用时间">
+                    <template slot-scope="ruleItem">
+                      <span>{{weekDayDic[ruleItem.row.weekDay+""]}} {{ruleItem.row.startTime}}--{{ruleItem.row.endTime}} </span>
+                    </template>
                   </el-table-column>
-                  <el-table-column
-                    prop="address"
-                    label="熟悉名称--限定符--作用值"
-                  >
+                  <el-table-column prop="description" label="熟悉名称--限定符--作用值">
                   </el-table-column>
                 </el-table>
               </template>
             </el-table-column>
             <el-table-column label="名称" prop="iotAlarmRule.name"> </el-table-column>
-            <el-table-column label="类型" prop="iotAlarmRule.type"> </el-table-column>
-            <el-table-column label="启用" prop="iotAlarmRule.enabled"> </el-table-column>
+            <el-table-column label="类型" prop="iotAlarmRule.type">
+              <template slot-scope="item">
+                <span>{{ item.row.iotAlarmRule.type == "alarm" ? "报警" : "未知" }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="启用" prop="iotAlarmRule.enabled">
+              <template slot-scope="item">
+                <span>{{ item.row.iotAlarmRule.enabled == 1 ? "启用" : "禁用" }}</span>
+              </template>
+            </el-table-column>
             <el-table-column label="描述" prop="iotAlarmRule.remark"> </el-table-column>
 
             <el-table-column label="设备数" prop="wlzt"> </el-table-column>
-            <el-table-column
-              label="操作"
-              fixed="right"
-              style="width: 100px"
-              align="center"
-              class-name="small-padding fixed-width"
-            >
+            <el-table-column label="操作" fixed="right" style="width: 100px" align="center"
+              class-name="small-padding fixed-width">
               <template slot-scope="scope">
-                <el-button
-                  size="mini"
-                  type="text"
-                  icon="el-icon-view"
-                  @click="editRuleHandler(scope.row)"
-                  v-hasPermi="['core:task:query']"
-                  >编辑</el-button
-                >
-                <el-button
-                  size="mini"
-                  type="text"
-                  icon="el-icon-view"
-                  @click="lookView(scope.row)"
-                  v-hasPermi="['core:task:query']"
-                  >删除</el-button
-                >
-                <el-button
-                  size="mini"
-                  type="text"
-                  icon="el-icon-view"
-                  @click="lookView(scope.row)"
-                  v-hasPermi="['core:task:query']"
-                  >关联设备</el-button
-                >
+                <el-button size="mini" type="text" icon="el-icon-edit" @click="editRuleHandler(scope.row)"
+                  v-hasPermi="['core:task:query']">编辑</el-button>
+                <el-button size="mini" type="text" icon="el-icon-delete" @click="deleteRule(scope.row)"
+                  v-hasPermi="['core:task:query']">删除</el-button>
+                <el-button size="mini" type="text" icon="el-icon-view" @click="lookView(scope.row)"
+                  v-hasPermi="['core:task:query']">关联设备</el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -137,13 +91,8 @@
           <dialog-info ref="infoDialog" @success="getList()"></dialog-info>
           <!-- 关联设备 -->
           <relevanceDialog ref="relevanceDialog"> </relevanceDialog>
-          <pagination
-            v-show="total > 0"
-            :total="total"
-            :page.sync="queryParams.pageNum"
-            :limit.sync="queryParams.pageSize"
-            @pagination="getList"
-          />
+          <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
+            :limit.sync="queryParams.pageSize" @pagination="getList" />
         </div>
       </el-col>
     </el-row>
@@ -158,7 +107,6 @@ import { listPlanRole } from "@/api/core/edu/plan";
 import { formatTime } from "@/utils/ruoyi";
 import DataRangePicker from "@/components/dateTime/daterange.picker.vue";
 import relevanceDialog from "@/views/warnRule/relevanceDialog.vue";
-import dayjs from "dayjs";
 import { mapGetters } from "vuex";
 import * as iotApi from "@/api/iot/alarmRule.js";
 
@@ -171,144 +119,121 @@ export default {
     return {
       // 遮罩层
       loading: false,
-      // 选中数组
-      ids: [],
-      // 非单个停用
-      single: true,
-      // 非多个停用
-      multiple: true,
       // 显示搜索条件
       showSearch: true,
       // 总条数
       total: 1,
-      tableData: [
-        {
-          date: "水浸",
-          name: "周一、周二、周三、周四、周五、周六、周七 00:00~24:00",
-          address: "水浸状态---等于---告警",
-        },
-      ],
-      // 监控调阅任务表格数据
-      taskList: [
-        {
-          taskName: "上班",
-          sbmc: "上班一键巡检",
-          pp: "启用",
-          ip: "暂无描述",
-          wlzt: "水浸(全部)",
-        },
-      ],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
       // 查询参数
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        taskName: null,
-        cycle: null,
-        dateRange: [],
-        planStartTime: null,
-        status: null,
-        roleId: null,
-        checkSub: true,
+        ruleName: "",
       },
-      selectedOrgName: "",
-      // 表单参数
-      form: {},
-      // 表单校验
-      rules: {},
-
-      alarmRules:[],
-
-      orgName: "",
+      alarmRules: [],
+      weekDayDic:{
+        "1":"周一",
+        "2":"周二",
+        "3":"周三",
+        "4":"周四",
+        "5":"周五",
+        "6":"周六",
+        "7":"周日",
+      }
     };
   },
   created() {
-    this.queryParams.orgId = this.$store.getters.orgId;
     this.getList();
   },
   computed: {
-    ...mapGetters(["orgId", "orgName"]),
+
   },
   methods: {
     /** 查询监控调阅任务列表 */
     async getList() {
+      this.loading = true;
 
-     let rh = await iotApi.getAlarmRules();
-      if(rh.code != 200)
-      {
+      let rh = await iotApi.getAlarmRules("alarm", this.queryParams.ruleName, this.queryParams.pageNum, this.queryParams.pageSize);
+      if (rh.code != 200) {
         this.$message("获取数据失败");
+        this.loading = false;
         return;
       }
-      this.alarmRules = rh.data;
-      console.log(rh.data);
+      this.total = rh.total;
+      this.alarmRules = rh.rows;
 
-      // this.taskList = [
-      //   {
-      //     taskName: "上班",
-      //     sbmc: "上班一键巡检",
-      //     pp: "启用",
-      //     ip: "暂无描述",
-      //     wlzt: "水浸(全部)",
-      //   },
-      //   {
-      //     taskName: "上班",
-      //     sbmc: "上班一键巡检",
-      //     pp: "启用",
-      //     ip: "暂无描述",
-      //     wlzt: "水浸(全部)",
-      //   },
-      // ];
-      return;
-      this.loading = true;
-      listTask(this.queryParams).then((response) => {
-        this.taskList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
-    },
+      this.alarmRules.forEach(alarmRule => {
+        if (alarmRule.iotAlarmRuleExpressEditVosBySourceType != undefined) {
 
-    /** 下穿状态改变*/
-    changeCheckBox() {
-      this.getList();
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
+          alarmRule.ruleItems = [];
+          let operationDic = {
+            'GT': '大于--${arg1}',
+            'LT': "小于--${arg1}",
+            "GTE": "大于等于--${arg1}",
+            "LTE": "小于等于--${arg1}",
+            "EQUALS": "等于--${arg1}",
+            "STARTS_WITH": "以 ${arg1} 开始",
+            "ENDS_WITH": "以 ${arg1} 结束",
+            "CONTAIN": "包含--${arg1}",
+          }
+          let sourceTypeDics = this.ConvertToSourceTypeDics(alarmRule.sourceTypeList);
+
+          let ruleGroups = alarmRule.iotAlarmRuleExpressEditVosBySourceType;
+          ruleGroups.forEach(ruleGroup => {
+           
+            ruleGroup.appAlarmRuleExpressList.forEach(ruleItem => {
+              ruleItem.sourceName = "";
+              ruleItem.fieldName = "";
+              if (sourceTypeDics[ruleGroup.sourceType + ""] != undefined) {
+                let sourceTypeDicItem = sourceTypeDics[ruleGroup.sourceType + ""];
+                ruleItem.sourceName = sourceTypeDicItem.sourceTypeDes;
+
+                if (sourceTypeDicItem.systemFieldDic[`${ruleItem.sourceType}_${ruleItem.fieldcode}`] != undefined) {
+                  ruleItem.fieldName = sourceTypeDicItem.systemFieldDic[`${ruleItem.sourceType}_${ruleItem.fieldcode}`].name
+                }
+              }
+
+              ruleItem.description = `${ruleItem.fieldName}--${operationDic[ruleItem.operator] == undefined ? "" : operationDic[ruleItem.operator].replace("${arg1}", ruleItem.valueText)}`
+              alarmRule.ruleItems.push(ruleItem)
+            })
+          })
+        }
+      })
+
+      console.log(this.alarmRules);
+      this.loading = false;
     },
-    // 表单重置
-    reset() {
-      this.form = {
-        id: null,
-        planId: null,
-        taskName: null,
-        orgId: null,
-        orgPath: null,
-        orgName: null,
-        ymdDate: null,
-        ymdYear: null,
-        ymdHalfyear: null,
-        ymdQuarter: null,
-        ymdMonth: null,
-        ymdWeek: null,
-        ymdDay: null,
-        cycle: null,
-        planStartTime: null,
-        planEndTime: null,
-        startTime: null,
-        endTime: null,
-        status: null,
-        roleId: null,
-        retrievalUser: null,
-        orderNum: null,
-        batchNum: null,
-        submitTime: null,
-        exceptionCount: null,
-      };
-      this.resetForm("form");
+    ConvertToSourceTypeDics(sourceTypeList) {
+      let sourceTypeDics = {};
+      sourceTypeList.forEach(i => {
+        if (sourceTypeDics[i.sourceType + ""] == undefined) {
+          i.operatorsListDic = {};
+          i.specsListDic = {};
+          i.systemFieldDic = {};
+          sourceTypeDics[i.sourceType + ""] = i;
+          i.systemFields.forEach(systemFieldItem => {
+            let systemFieldItemKey = `${i.sourceType}_${systemFieldItem.sysFieldCode}`;
+           
+            if (i.systemFieldDic[systemFieldItemKey] == undefined) {
+              i.systemFieldDic[systemFieldItemKey] = systemFieldItem;
+            }
+
+            systemFieldItem.operatorsList.forEach(operator => {
+              let operatorKey = `${i.sourceType}_${systemFieldItem.sysFieldCode}_${operator.key}`;
+              if (i.operatorsListDic[operatorKey] == undefined) {
+                i.operatorsListDic[operatorKey] = operator;
+              }
+            })
+            systemFieldItem.specsList.forEach(specItem => {
+              let sysFieldValueKey = `${i.sourceType}_${systemFieldItem.sysFieldCode}_${specItem.key}`;
+              if (i.specsListDic[sysFieldValueKey] == undefined) {
+                i.specsListDic[sysFieldValueKey] = specItem;
+              }
+            })
+          })
+        }
+      });
+      return sourceTypeDics;
+
     },
     /** 搜索按钮操作 */
     handleQuery() {
@@ -319,51 +244,36 @@ export default {
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
-      this.queryParams.orgId = this.orgId;
-      this.selectedOrgName = this.orgName;
-      this.queryParams.checkSub = true;
-      this.queryParams.dateRange = ["", ""];
-      this.queryParams.planStartTime = null;
-
+      this.queryParams.ruleName = ""
       this.handleQuery();
     },
+    //显示添加报警规则
     addRuleHandler() {
       this.$refs["infoDialog"].show(true, {});
     },
-    editRuleHandler(ruleObj)
-    {
+    //编辑报警规则
+    editRuleHandler(ruleObj) {
       this.$refs["infoDialog"].show(false, ruleObj);
     },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map((item) => item.id);
-      this.single = selection.length !== 1;
-      this.multiple = !selection.length;
-    },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加监控调阅任务";
+    deleteRule(ruleObj)
+    {
+        this.$confirm("你确认要删除此规则吗?","提示",{type:'warning'}).then(async ()=>{
+          let rh = await iotApi.deleteRuld(ruleObj.iotAlarmRule.id);
+          if(rh.code !=200)
+          {
+            this.$message.error("删除失败");
+            return;
+          }
+          this.$message({message:"删除成功",type:"success"});
+          this.getList();
+        }).cache(()=>{
+
+        })
     },
     /** 关联按钮操作 */
     lookView() {
       this.$refs["relevanceDialog"].show("row.id", {});
     },
-
-    /** 导出按钮操作 */
-    // handleExport() {
-    //   console.log(this);
-    //   this.download(
-    //     "core/retrievalTask/export",
-    //     {
-    //       ...this.queryParams,
-    //     },
-    //     `${
-    //       this.selectedOrgName
-    //     }-${this.$tab.getCurrentTabName()}-${dayjs().format("YYYYMMDD")}.xlsx`
-    //   );
-    // },
   },
 };
 </script>