From 091e8a8b825cf8b0f929e999fcad9429a968135e Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Thu, 04 Nov 2021 10:15:24 +0800
Subject: [PATCH] +

---
 src/views/activitys/real.vue |  110 ++++++++++---------------------------------------------
 1 files changed, 20 insertions(+), 90 deletions(-)

diff --git a/src/views/activitys/real.vue b/src/views/activitys/real.vue
index 75e30ca..b21b095 100644
--- a/src/views/activitys/real.vue
+++ b/src/views/activitys/real.vue
@@ -200,21 +200,7 @@
               },
             ],
           },
-          {
-            label: "任务封面",
-            prop: "url",
-            // align:'center',
-            width: 80,
-            type: "upload",
-            listType: "picture-img",
-            action: "/api/blade-resource/oss/endpoint/put-file",
-            propsHttp: {
-              res: "data",
-              url: "link",
-            },
-            // hide: true,
-            span: 12,
-          },
+
           {
             label: "下发时间",
             type: "datetime",
@@ -230,6 +216,21 @@
                 trigger: "blur",
               },
             ],
+          },
+          {
+            label: "任务封面",
+            prop: "url",
+            // align:'center',
+            width: 80,
+            type: "upload",
+            listType: "picture-img",
+            action: "/api/blade-resource/oss/endpoint/put-file",
+            propsHttp: {
+              res: "data",
+              url: "link",
+            },
+            // hide: true,
+            span: 24,
           },
           // {
           //   label: "报警时间",
@@ -662,6 +663,7 @@
       console.log(d);
       // done();
       // return;
+      let that = this;
       add(d).then(
         () => {
           this.onLoad(this.page);
@@ -669,6 +671,7 @@
             type: "success",
             message: "操作成功!",
           });
+          that.$store.commit("setRotesData", false); //用vuex传最终数据 清除
           done();
         },
         (error) => {
@@ -676,55 +679,6 @@
         }
       );
       return;
-      // console.log(row, "rowrowrowrowrow");
-      // console.log(this.rotesData, "rowrowrowrowrow");
-      // if (!this.rotesData) {
-      //   this.$message({
-      //     message: "未绘制地图路径,请重试",
-      //     type: "warning",
-      //   });
-      //   done();
-      //   return;
-      // }
-      // done();
-      //结束后  需要把vuex中路径清除
-      // that.$store.commit("setRotesData", false);
-      // return;
-      if (typeof row.securityArr != "string") {
-        var security = "";
-        row.securityArr.forEach((item) => {
-          security = security + item + ",";
-        });
-        row.securityArr = security.substring(0, security.length - 1);
-      }
-      var userId = JSON.parse(
-        window.localStorage.getItem("群防群控后台管理系统-userInfo")
-      ).content.nick_name;
-
-      if (row.jtype != "2") {
-        if (row.securityArr == "" || row.securityArr == null) {
-          row.jtype = "0";
-          row.alarmPeople = "";
-        } else {
-          row.jtype = "1";
-          //已派发保安
-        }
-      }
-      row.alarmPeople = userId;
-
-      add(row).then(
-        () => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!",
-          });
-          done();
-        },
-        (error) => {
-          loading();
-        }
-      );
     },
     getxllx(val) {
       var that = this;
@@ -737,32 +691,7 @@
       }
     },
     rowUpdate(row, index, done, loading) {
-      // var userId = JSON.parse(
-      //   window.localStorage.getItem("群防群控后台管理系统-userInfo")
-      // ).content.nick_name;
-      // if (typeof row.securityArr != "string") {
-      //   var security = "";
-      //   row.securityArr.forEach((item) => {
-      //     security = security + item + ",";
-      //   });
-      //   row.securityArr = security.substring(0, security.length - 1);
-      // }
-      // if (row.jtype != "2") {
-      //   if (row.securityArr == "" || row.securityArr == null) {
-      //     row.jtype = "0";
-      //     row.alarmPeople = "";
-      //   } else {
-      //     row.jtype = "1";
-      //     //已派发保安
-      //   }
-      // }
-      // row.alarmPeople = userId;
-      // row.coordinate = "";
-      // console.log(row);
-      // row.province = row.$province; //省
-      // row.city = row.$city; //城市
-      // row.district = row.$district; //区县
-      // return;
+      let that = this;
       update(row).then(
         () => {
           this.onLoad(this.page);
@@ -770,6 +699,7 @@
             type: "success",
             message: "操作成功!",
           });
+          that.$store.commit("setRotesData", false); //用vuex传最终数据 清除
           done();
         },
         (error) => {

--
Gitblit v1.9.3