南昌市物联网技防平台-前端
liuyg
2021-05-07 be2983cb91e06554ff939c53b37284af1e1c170a
地图,详情跳转,视频
7 files modified
1 files added
92 ■■■■ changed files
public/map/popup/html/SupervisoryMapYdata.html 4 ●●●● patch | view | raw | blame | history
public/map/widgets/alertSecurity/AlertSecurity.js 6 ●●●● patch | view | raw | blame | history
src/store/getters.js 1 ●●●● patch | view | raw | blame | history
src/store/index.js 5 ●●●● patch | view | raw | blame | history
src/store/modules/dataL.js 19 ●●●●● patch | view | raw | blame | history
src/views/dataL/dataL.vue 48 ●●●●● patch | view | raw | blame | history
src/views/policeTracking/policeTracking.vue 7 ●●●●● patch | view | raw | blame | history
src/views/supervisoryConsole/card.vue 2 ●●● patch | view | raw | blame | history
public/map/popup/html/SupervisoryMapYdata.html
@@ -154,7 +154,7 @@
        .el-tabs__active-bar {
            background-color: #F35B5B;
            background-color: #32C1A2;
        }
        .el-tabs__item.is-active,
@@ -169,7 +169,7 @@
        <!-- 从layui传值给iframe 的占位input -->
        <!-- <div class="aaa bbb">13223456745</div> -->
        <input type="text" id="sidIput" ref="sidIput" style="display:none">
        <div class="flare-liu-top" style="background-image: linear-gradient(to right, #F35B5B , #F35B5B">
        <div class="flare-liu-top" style="background-image: linear-gradient(to right, #32C1A2 , #32C1A2)">
            <div class="f-l-t-heard">{{datas.tenant_name}}</div>
            <div class="f-l-t-right">
                <div class="f-l-t-r-number">级别:{{datas.dj}}</div>
public/map/widgets/alertSecurity/AlertSecurity.js
@@ -201,20 +201,20 @@
      var openid = that.getQueryStringByKey('id');
      var lgtd = that.getQueryStringByKey('jd');
      var lttd = that.getQueryStringByKey('wd');
      var deptId = that.getQueryStringByKey('deptId');
      var deptId = that.getQueryStringByKey('deptId').slice(0,19);//报错deptId格式不对liu.2021.5.7
      var oneId = that.getQueryStringByKey('oneId');
      that.addPoint(that.addEntitys, lgtd, lttd, './images/jingbaored.png');
      that.createEntitys(that.addEntitys, lgtd, lttd, './images/real-time-callPolice-opcity.png');
      that.createTwinkleEntitys(that.addEntitys, lgtd, lttd, './images/real-time-callPolice-opcity.png');
      // console.log(deptId,153454)
      $.ajax({
        url: "https://web.byisf.com/api/blade-user/pages?current=1&size=9999&work_status=&deptId=" + deptId,
        type: 'get',
        dataType: 'JSON',
        success: function (res) {
          console.log(res.data.records, oneId)
          // console.log(res.data.records, oneId)
          res.data.records.forEach((item) => {
            if (item.id == oneId) {
src/store/getters.js
@@ -25,5 +25,6 @@
  logsLen: state => state.logs.logsList.length || 0,
  logsFlag: (state, getters) => getters.logsLen === 0,
  flowRoutes: state => state.dict.flowRoutes,
  dataLa: state => state.dataL.dataLa,
}
export default getters
src/store/index.js
@@ -5,7 +5,9 @@
import tags from './modules/tags'
import logs from './modules/logs'
import dict from './modules/dict'
import dataL from './modules/dataL'
import getters from './getters'
Vue.use(Vuex)
const store = new Vuex.Store({
@@ -14,7 +16,8 @@
    common,
    logs,
    tags,
    dict
    dict,
    dataL
  },
  getters,
})
src/store/modules/dataL.js
New file
@@ -0,0 +1,19 @@
import {
    setStore,
    getStore,
    removeStore
} from '@/util/store'
import website from '@/config/website'
const dataL = {
    state: {
        dataLa: null,
    },
    mutations: {
        SET_DATAL: (state, dataLa) => {
            state.dataLa = dataLa;
        },
    }
}
export default dataL;
src/views/dataL/dataL.vue
@@ -19,8 +19,8 @@
                  'l-t-s-yuan': true,
                }"
              ></span>
              <span>{{' ' + state }}</span>
              <span>{{ " " + state }}</span>
            </div>
            <div class="t-t-time">
              <p>{{ ReportTime }}</p>
@@ -604,6 +604,8 @@
      myChart: "",
      numdatalist: [120, 132, 101, 134, 90, 230, 210, 120, 132, 0, 134, 0],
      jingqingPdianji: null,
      name: "",
      state: "",
      evaluate: "",
@@ -627,7 +629,7 @@
      isRecord: true,
      screens: false,
      //复选框
      dataState: ["掉线", "在线", "故障", "预警"],
      dataState: ["掉线", "正常", "故障", "预警"],
      // [grey,green,red][
      //   onlineStatus = 0,
      //   onlineStatus = 1,
@@ -1030,7 +1032,7 @@
      } else {
        if (j != 1) {
          if (o == 1) {
            states = "在线";
            states = "正常";
          } else {
            states = "掉线";
          }
@@ -1086,6 +1088,7 @@
        var ds = res.data.data.records;
        // console.log(ds)
        this.setdataG(ds);
        this.jingqingPdianji = ds;
      });
    },
    setdataG(d) {
@@ -1125,6 +1128,7 @@
              oneContacts: d[key].oneContacts,
              alarmPeople: d[key].alarmPeople,
              onePhone: d[key].onePhone,
              jjTime: d[key].jjTime,
              childs: [],
            });
          }
@@ -1197,7 +1201,15 @@
    },
    handleCurrentChange(val) {
      //行点击事件
      // console.log(val.i);
      var b = this.jingqingPdianji;
      for (var key in b) {
        if (b[key].jjTime == val.jjTime) {
          // console.log(b[key]);
          // this.$store.commit("SET_DATAL", this.a);
          this.$router.push({ path: "/policeTracking/track", query: b[key] });
        }
      }
      // console.log(this.$store.state)
    },
    //获取视频
    openRealVideoBox(serialNumber, channelNumber) {
@@ -1264,10 +1276,16 @@
  created() {
    // let loadingInstance1  = Loading.service({ fullscreen: true });
    // this.baseUrl = `/map/index.html?openid=SupervisoryMap`;
    this.a = this.$route.query;
    // console.log(this.a);
    // this.a = this.$route.query.deviceNumber == undefined? this.$store.state.dataL.dataLa : this.$route.query;
    if(this.$route.query.deviceNumber == undefined){
      this.a = this.$store.state.dataL.dataLa;
    }else{
      this.a =  this.$route.query;
    this.$store.commit("SET_DATAL", this.a);//每次都缓存在vuex中,如果没有从正确路径进来,则使用缓存
    }
    console.log(this.a);
    this.baseUrl = `/map/index.html?ISinit=1&openid=DetailMap&jd=${this.a.jd}&wd=${this.a.wd}`;
    this.myDeviceNumber = this.$route.query.deviceNumber;
    this.myDeviceNumber = this.a.deviceNumber;
    // console.log(this.a);
    // console.log(this.myDeviceNumber);
    this.getdata();
@@ -1297,13 +1315,13 @@
      if (this.activeName == "third") {
        this.i++;
        this.openRealVideoBox(this.a.serialNumber, this.a.channelNumber);
      }else{
      } else {
        var dom = document.getElementById("real_video_conversationDataL");
        if (dom.getAttribute("src") != "") {
        dom.pause();
        dom.setAttribute("src", "");
        this.hls.destroy();
      }
          dom.pause();
          dom.setAttribute("src", "");
          this.hls.destroy();
        }
      }
    },
  },
@@ -1719,6 +1737,6 @@
  width: 50%;
}
video::-webkit-media-controls-timeline {
      display: none;
    }
  display: none;
}
</style>
src/views/policeTracking/policeTracking.vue
@@ -461,7 +461,7 @@
          <el-card>
            <video
              :src="feedbackVideo"
              style="width: 100%; height: 100%; object-fit: fill"
              style="width: 200px; height: 200px; object-fit: fill"
              controls
              v-show="feedbackVideo != ''"
            ></video>
@@ -762,9 +762,10 @@
    getList() {
      var that = this;
      var deptid = that.form.deptId.slice(0,19);//报错deptId格式不对liu.2021.5.7
      axios
        .get(
          `/api/blade-user/pages?current=1&size=9999&work_status=&deptId=${that.form.deptId}`
          `/api/blade-user/pages?current=1&size=9999&work_status=&deptId=${deptid}`
        )
        .then(function (res) {
          that.tableData = [];
@@ -936,7 +937,7 @@
        },
      }).then(function (res) {
        that.form = res.data.data.records[0];
        that.getList();
        that.getList();//报错deptId格式不对liu.2021.5.7
      });
    },
  },
src/views/supervisoryConsole/card.vue
@@ -60,7 +60,7 @@
                  ? "设备预警"
                  : item.state == ""
                  ? item.onlineStatus == 1
                    ? "设备在线"
                    ? "设备正常"
                    : "设备掉线"
                  : "设备故障"
              }}