南昌市物联网技防平台-前端
shuishen
2021-02-04 a7a86324ae4e519b8ee0a3fa3038f3afa2e14dec
src/views/realTimePolice/real.vue
@@ -65,31 +65,31 @@
      <template slot-scope="{ type, size, row }" slot="menu">
        <el-button
          icon="el-icon-check"
          icon="el-icon-s-order"
          :size="size"
          :type="type"
          @click.stop="handleHistory(row)"
          >历史</el-button
        >
        <el-button
          icon="el-icon-check"
          icon="el-icon-video-camera-solid"
          :size="size"
          :type="type"
          @click.stop="handleStart(row)"
          >视频</el-button
        >
        <el-button
          icon="el-icon-check"
          icon="el-icon-edit"
          :size="size"
          :type="type"
          @click.stop="handleManage(row)"
          >处置</el-button
        >
        <el-button
          icon="el-icon-check"
          icon="el-icon-location-outline"
          :size="size"
          :type="type"
          @click.stop="handleMap()"
          @click.stop="handleMap(row)"
          >定位</el-button
        >
      </template>
@@ -99,6 +99,7 @@
      title="警情处置"
      :visible.sync="dialogTableVisible"
      append-to-body="true"
      @close="innerVisibleVideo = false"
    >
      <el-dialog
        class="old-video-dialog"
@@ -108,7 +109,7 @@
        :visible.sync="innerVisibleVideo"
        :close-on-press-escape="false"
        append-to-body
        @opened="openOldVideoBox()"
        @opened="openOldVideoBox"
        @close="closeOldVideoBox"
      >
        <video
@@ -273,8 +274,19 @@
      </el-form>
    </el-dialog>
    <el-drawer title="电子地图" append-to-body="true" :visible.sync="showMap">
      <iframe :src="mapUrl" frameborder="0" width="100%" height="100%"></iframe>
    <el-drawer
      title="电子地图"
      append-to-body="true"
      :visible.sync="showMap"
    >
      <iframe
        id="mapDiv"
        ref="mapDiv"
        src="http://s16s652780.51mypc.cn/jfpt/map/index.html"
        frameborder="0"
        width="100%"
        height="100%"
      ></iframe>
    </el-drawer>
  </basic-container>
</template>
@@ -293,7 +305,6 @@
  data() {
    return {
      showMap: false,
      mapUrl: "https://s16s652780.51mypc.cn/jfpt/map/index.html",
      hls: "",
      videoSource: "",
      dialogTableVisible: false,
@@ -313,7 +324,8 @@
        indexLabel: "序号",
        calcHeight: 30,
        labelWidth: "100",
        menuWidth: 300,
        size:"mini",
        menuWidth: 240,
        dialogWidth: 950,
        tip: false,
        searchShow: true,
@@ -321,7 +333,7 @@
        border: true,
        index: true,
        viewBtn: true,
        selection: true,
        selection: false,
        dialogClickModal: false,
        column: [
          {
@@ -416,12 +428,12 @@
            ]
          },
          {
            label: "行政区",
            label: "省份",
            prop: "province",
            search: true,
            searchSpan: 3,
            searchLabelWidth: 60,
            placeholder: "行政区",
            placeholder: "省份",
            type: "select",
            props: {
              label: "name",
@@ -480,7 +492,7 @@
    permissionList() {
      return {
        addBtn: this.vaildData(this.permission.real_add, false),
        viewBtn: this.vaildData(this.permission.real_view, false),
        viewBtn: this.vaildData(null, false),
        delBtn: this.vaildData(this.permission.real_delete, false),
        editBtn: this.vaildData(this.permission.real_edit, false)
      };
@@ -623,11 +635,21 @@
          ...this.query
        };
        values.releaseTimeRange = null;
      }else{
        values = {
          ...params,
          ...this.query
        };
      }
      this.loading = true;
      getList(page.currentPage, page.pageSize, values).then(res => {
        const data = res.data.data;
        this.page.total = data.total;
        data.records.sort((a,b)=>{
          return a.jtype - b.jtype;
        });
        this.data = data.records;
        this.loading = false;
        this.selectionClear();
@@ -741,7 +763,7 @@
        };
      } else {
        return {
          color: "#ff7627"
          color: "#ff2727"
        };
      }
    },
@@ -753,10 +775,13 @@
    handleHistory(row) {
      this.$router.push({ path: `/real/history/${row.deviceNumber}` });
    },
    handleMap() {
    handleMap(row) {
      this.showMap = true;
      this.mapUrl =
        "https://s16s652780.51mypc.cn/jfpt/map/index.html?openid=PatrolManagement";
      this.$nextTick(() => {
        this.$refs.mapDiv.onload = () => {
          window.frames[0].locationObj = {x:row.jd,y:row.wd};
        };
      })
    },
    handleManage(row) {
      this.form = row;
@@ -772,7 +797,7 @@
      } else {
        axios({
          url:
            "http://192.168.0.102:1888/api/blade-jfpts/jingdan/jingdan/submit",
            "/api/blade-jfpts/jingdan/jingdan/submit",
          method: "post",
          data: {
            rName: row.rname,
@@ -814,7 +839,7 @@
      var that = this;
      axios({
        url:
          "http://192.168.0.102:1888/api/blade-jfpts/alarm/alarm/deletejj?id=" +
          "/api/blade-jfpts/alarm/alarm/deletejj?id=" +
          row.id,
        method: "post"
      }).then(function() {
@@ -826,7 +851,7 @@
      var that = this;
      axios({
        url:
          "http://192.168.0.102:1888/api/blade-jfpts/alarm/alarm/updateJtype?id=" +
          "/api/blade-jfpts/alarm/alarm/updateJtype?id=" +
          row.id +
          "&czTime=" +
          row.czTime +
@@ -980,7 +1005,9 @@
      if (dom.getAttribute("src") != "") {
        dom.pause();
        dom.setAttribute("");
        dom.setAttribute("src", "");
        this.hls.destroy();
      }
    },
    aKeyToCall(e, form) {