chenrui  2 năm trước cách đây
mục cha
commit
c14edb15df
1 tập tin đã thay đổi với 22 bổ sung19 xóa
  1. 22 19
      src/views/systemSettings/views/warningSet/warningEdit.vue

+ 22 - 19
src/views/systemSettings/views/warningSet/warningEdit.vue

@@ -602,25 +602,8 @@ export default {
     },
     //编辑数据
     async editSubmit() {
-      let params = {
-        id: this.id,
-        warnName: this.warnName,
-        desc: this.desc,
-        flightNO: this.flightNO,
-        airportCode2: this.code2,
-        departureAirport: this.code3,
-        ladingAirport: this.code4,
-        beginTime: this.BeginTime1[0],
-        endTime: this.BeginTime1[1],
-      };
-      const res = await AddWarning(params);
-      if (res.code === 0) {
-        this.$message.success("修改报警预警信息成功");
-        this.$router.push("/systemSettings/warningSet");
-      } else {
-        this.$message.error.message;
-      }
-      this.EditDialogVisible = false;
+      this.tableFormer.event = 2;
+      this.generalDataReceptions(this.tableFormer);
     },
 
     //策略列表
@@ -800,6 +783,26 @@ export default {
     handleOk() {
       this.submitClickHandler();
     },
+    //表格-增/删/改
+    async generalDataReceptions(data) {
+      try {
+        data = {
+          ...data,
+        };
+        const { code, message } = await GeneralDataReception({
+          serviceId: DATACONTENT_ID.sysServiceaddId,
+          dataContent: JSON.stringify(data),
+        });
+        if (code == 0) {
+          this.$message.success("操作成功");
+          this.sysServiceWarn();
+        } else {
+          this.$message.error("操作失败");
+        }
+      } catch (error) {
+        console.log(error);
+      }
+    },
   },
 };
 </script>