liuyg
2021-07-17 21ce171baeba4483c9b446c9ffacc1a23e897ac2
src/views/realTimePolice/real.vue
@@ -400,18 +400,18 @@
            editDisplay: true,
            viewDisplay: true,
          },
          {
            label: "巡逻路线",
            prop: "xllx",
            hide: true,
            display: true,
            type: "tree",
            filter: false,
            dicUrl: "/api/routeIn/routein/tree",
            props: {
              label: "title",
            },
          },
          // {
          //   label: "巡逻路线",
          //   prop: "xllx",
          //   hide: true,
          //   display: true,
          //   type: "tree",
          //   filter: false,
          //   dicUrl: "/api/routeIn/routein/tree",
          //   props: {
          //     label: "title",
          //   },
          // },
        ],
      },
      data: [],
@@ -475,25 +475,25 @@
      },
      immediate: true,
    },
    "form.alarmType": {
      handler(val) {
        var xllx = this.findObject(this.option.column, "xllx");
        if (val === "巡逻任务") {
          xllx.display = true;
          xllx.rules = [
            {
              required: true,
              message: "请选择巡逻路线",
              trigger: "blur",
            },
          ];
        } else {
          xllx.display = false;
          xllx.rules = [];
        }
      },
      immediate: true,
    },
    // "form.alarmType": {
    //   handler(val) {
    //     var xllx = this.findObject(this.option.column, "xllx");
    //     if (val === "巡逻任务") {
    //       xllx.display = true;
    //       xllx.rules = [
    //         {
    //           required: true,
    //           message: "请选择巡逻路线",
    //           trigger: "blur",
    //         },
    //       ];
    //     } else {
    //       xllx.display = false;
    //       xllx.rules = [];
    //     }
    //   },
    //   immediate: true,
    // },
  },
  computed: {
    ...mapGetters(["permission", "flowRoutes"]),
@@ -527,16 +527,18 @@
      }
      var userId = JSON.parse(
        window.localStorage.getItem("群防群控后台管理系统-userInfo")
      ).content.real_name;
      ).content.nick_name;
      if (row.securityArr == "" || row.securityArr == null) {
        row.jtype = "0";
        row.alarmPeople = "";
      } else {
        row.jtype = "1";
        //已派发保安
        row.alarmPeople = userId;
      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(
        () => {
@@ -555,8 +557,7 @@
    rowUpdate(row, index, done, loading) {
      var userId = JSON.parse(
        window.localStorage.getItem("群防群控后台管理系统-userInfo")
      ).content.real_name;
      ).content.nick_name;
      if (typeof row.securityArr != "string") {
        var security = "";
        row.securityArr.forEach((item) => {
@@ -564,16 +565,16 @@
        });
        row.securityArr = security.substring(0, security.length - 1);
      }
      if (row.securityArr == "" || row.securityArr == null) {
        row.jtype = "0";
        row.alarmPeople = "";
      } else {
        row.jtype = "1";
        //已派发保安
        row.alarmPeople = userId;
      if (row.jtype != "2") {
        if (row.securityArr == "" || row.securityArr == null) {
          row.jtype = "0";
          row.alarmPeople = "";
        } else {
          row.jtype = "1";
          //已派发保安
        }
      }
      row.alarmPeople = userId;
      row.coordinate = "";
      update(row).then(
        () => {
@@ -1036,7 +1037,7 @@
      this.showMap = true;
      this.$nextTick(() => {
        this.$refs.mapDiv.onload = () => {
          window.frames[1].init("ClientManagement", {
          window.frames[0].init("ClientManagement", {
            x: row.jd,
            y: row.wd,
            clientID: row.deviceNumber,