tangzy
2021-06-29 6de8b8a3e3790b874045d20b77bb7aa71dcdfb37
src/views/realTimePolice/real.vue
@@ -88,7 +88,7 @@
        >{{
          row.jtype == "0" || row.jtype == "" ? "未派发" : row.jtype == "1" && (row.securityId == null || row.securityId
          == "")
          ? "未接收" : row.jtype == "1" && (row.securityId != null || row.securityId != "") ? "已接收" : "已处理"
          ? "未接收" : row.jtype == "1" && (row.securityId != null || row.securityId != "") ? "已接收" : "已处置"
          }}
        </el-tag>
      </template>
@@ -343,12 +343,12 @@
                  label: "未派发",
                  value: "0",
                },
                // {
                //   label: "处理中",
                //   value: "1",
                // },
                {
                  label: "已处理",
                  label: "处理中",
                  value: "1",
                },
                {
                  label: "已处置",
                  value: "2",
                },
              ],
@@ -365,7 +365,7 @@
              prop: "securityArr",
              type: "tree",
              multiple: true,
              dicUrl: "/api/blade-jfpts/catalogs/catalogs/getBigTree",
              dicUrl: "/api/catalogs/catalogs/getBigTree",
              props: {
                label: "title"
              },
@@ -464,19 +464,25 @@
    },
    methods: {
      rowSave(row, done, loading) {
        var security = "";
        row.securityArr.forEach((item) => {
          security = security + item + ",";
        });
        row.securityArr = security.substring(0, security.length - 1);
        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.real_name;
        if (row.securityArr == "" || row.securityArr == null) {
          row.jtype = "0";
          row.alarmPeople = "";
        }else {
          row.jtype = "1";
          //已派发保安
          row.alarmPeople = userId;
        }
        add(row).then(
@@ -494,12 +500,26 @@
        );
      },
      rowUpdate(row, index, done, loading) {
        var userId = JSON.parse(
          window.localStorage.getItem("群防群控后台管理系统-userInfo")
        ).content.real_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.securityArr == "" || row.securityArr == null) {
          row.jtype = "0";
          row.alarmPeople = "";
        }else {
          row.jtype = "1";
          //已派发保安
          row.alarmPeople = userId;
        }
        row.coordinate = "";
@@ -1045,7 +1065,7 @@
          type: "warning",
        }).then(() => {
          window.open(
            `/api/blade-jfpts/alarm/alarm/export-alarm?beginTime=${this.$route.query.startTime}&endTime=${this.$route.query.endTime}&waringType=${this.$route.query.waringType}&timeDesc=${this.$route.query.timeDesc}`
            `/api/alarm/alarm/export-alarm?beginTime=${this.$route.query.startTime}&endTime=${this.$route.query.endTime}&waringType=${this.$route.query.waringType}&timeDesc=${this.$route.query.timeDesc}`
          );
        });
      },