tangzy
2022-02-18 312d994acd44280084df467f1cade6a2e77b7de7
任务管理
1 files modified
73 ■■■■ changed files
src/views/activitys/real.vue 73 ●●●● patch | view | raw | blame | history
src/views/activitys/real.vue
@@ -34,7 +34,7 @@
          plain
          v-if="permission.real_delete"
          @click="handleDelete"
          >删 除
        >删 除
        </el-button>
      </template>
@@ -86,22 +86,22 @@
      <template slot-scope="{ row }" slot="jtype">
        <el-tag
          >{{
        >{{
            row.jtype == "0" || row.jtype == ""
              ? "未派发"
              : row.jtype == "1" &&
                (row.securityId == null || row.securityId == "")
              (row.securityId == null || row.securityId == "")
              ? "未接收"
              : row.jtype == "1" &&
                (row.securityId != null || row.securityId != "")
              ? "已接收"
              : "已处置"
              (row.securityId != null || row.securityId != "")
                ? "已接收"
                : "已处置"
          }}
        </el-tag>
      </template>
      <template slot-scope="{ row }" slot="cid">
        <el-tag
          >{{
        >{{
            row.cid == "1" ? "事件发生" : row.cid == "3" ? "是" : "事件恢复"
          }}
        </el-tag>
@@ -114,13 +114,13 @@
          :size="size"
          :type="type"
          @click.stop="PoliceTracking(row)"
          >派发
        >派发
        </el-button>
      </template>
      <template slot-scope="{ type, disabled }" slot="lineForm">
        <div class="mapClassMain" style="width: 860px; height: 400px">
          <Map ref="modalForm" />
          <Map ref="modalForm"/>
        </div>
      </template>
    </avue-crud>
@@ -147,7 +147,7 @@
  add,
  getclient,
} from "@/api/activitys/activitys";
import { mapGetters } from "vuex";
import {mapGetters} from "vuex";
import AvueMap from "avue-plugin-map";
export default {
@@ -451,6 +451,7 @@
            // props: {
            //   label: "title",
            // },
            span: 6,
            width: 72,
            // hide: true,
            minRows: 1,
@@ -459,6 +460,33 @@
            addDisplay: true,
            editDisplay: true,
            viewDisplay: true,
          },
          {
            label: "所属辖区",
            prop: "jurisdiction",
            hide: true,
            searchLabelWidth: 80,
            search: true,
            searchSpan: 4,
            overHidden: true,
            span: 9,
            width: 72,
            parent: false,
            type: "tree",
            dicUrl: "/api/jurisdiction/lazy-tree",
            props: {
              label: "title",
              value: "id"
            },
            checkStrictly: true,
            slot: true,
            rules: [
              {
                required: false,
                message: "请选择所属辖区",
                trigger: "click"
              }
            ]
          },
          // {
          //   label: "巡逻路线",
@@ -476,6 +504,7 @@
            label: "请在下方地图中,建立路径!",
            labelWidth: "0",
            className: "mapClass",
            span: 8,
            prop: "haveMap",
            hide: true,
            display: true,
@@ -616,7 +645,7 @@
    },
  },
  computed: {
    ...mapGetters(["permission", "flowRoutes", "rotesData"]),
    ...mapGetters(["permission", "flowRoutes", "rotesData", "userInfo"]),
    permissionList() {
      return {
        addBtn: this.vaildData(this.permission.real_add, false),
@@ -649,6 +678,8 @@
    rowSave(row, done, loading) {
      // console.log(row);
      // return;
      var userId1 = this.userInfo.user_id;
      var username = this.userInfo.user_name;
      let d = {
        line: row.line, //路线
        rname: row.rname, //标题
@@ -661,6 +692,8 @@
        integral: row.integral + "", //积分
        content: row.content, //内容
        rtype: row.rtype, //任务状态
        fid: userId1,//发起人id
        fname: username //发起人id
      };
      // console.log(d);
      // done();
@@ -687,12 +720,14 @@
        setTimeout(function () {
          try {
            that.$refs.modalForm.addLinesDraw(val);
          } catch (error) {}
          } catch (error) {
          }
        }, 1500);
      } else {
        try {
          that.$refs.modalForm.addLinesDraw(val);
        } catch (error) {}
        } catch (error) {
        }
      }
    },
    rowUpdate(row, index, done, loading) {
@@ -733,12 +768,12 @@
      //清空搜索框中的内容
      this.query = {};
      //清空this.$route.query
      this.$router.push({ query: {} });
      this.$router.push({query: {}});
      this.onLoad(this.page);
    },
    searchChange(params, done) {
      //清空this.$route.query
      this.$router.push({ query: {} });
      this.$router.push({query: {}});
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
@@ -929,7 +964,7 @@
    getBRdata(e) {
      this.activeClass = e;
      this.query = {};
      this.$router.push({ query: {} });
      this.$router.push({query: {}});
      var today = new Date();
      var params = {};
@@ -1045,7 +1080,7 @@
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
    },
    rowStyle({ row, column, rowIndex }) {
    rowStyle({row, column, rowIndex}) {
      if (row.jtype == "0") {
        return {
          color: "#ff2727",
@@ -1081,7 +1116,7 @@
        }
      });
      this.$store.state.tags.tagList = arr;
      this.$router.push({ path: `/real/history/${row.deviceNumber}` });
      this.$router.push({path: `/real/history/${row.deviceNumber}`});
    },
    handleMap(row) {
      this.showMap = true;
@@ -1188,7 +1223,7 @@
      });
      this.$store.state.tags.tagList = arr;
      //警情追踪
      this.$router.push({ path: "/policeTracking/details", query: row });
      this.$router.push({path: "/policeTracking/details", query: row});
    },
    //打开新增窗体
    openAdd() {