南昌市物联网技防平台-前端
shuishen
2021-04-19 f2e4ae05dcbae8f7542856d5fa7d0d196d435c61
录制音频相关
2 files modified
111 ■■■■ changed files
src/page/index/logo.vue 28 ●●●● patch | view | raw | blame | history
src/views/realTimePolice/real.vue 83 ●●●● patch | view | raw | blame | history
src/page/index/logo.vue
@@ -401,13 +401,13 @@
                    `https://web.byisf.com:18000/GetPlayUrl?deviceCode=${that.form.serialNumber}&chl=${that.form.channelNumber}`
                  )
                  .then((result) => {
                    // axios({
                    //   method: "post",
                    //   url: `/api/blade-jfpts/rvideo/rVoids`,
                    //   params: {
                    //     url: result.data.data.flv,
                    //   },
                    // }).then((resdata) => {});
                    axios({
                      method: "post",
                      url: `/api/blade-jfpts/rvideo/rVoids`,
                      params: {
                        url: result.data.data.flv,
                      },
                    }).then((resdata) => {});
                  });
              });
            if (
@@ -572,13 +572,13 @@
        .then(function () {
          that.dialogTableVisible = false;
          // axios({
          //   method: "post",
          //   url: `/api/blade-jfpts/rvideo/stop`,
          //   params: {
          //     jid: row.id,
          //   },
          // }).then((resdata) => {});
          axios({
            method: "post",
            url: `/api/blade-jfpts/rvideo/stop`,
            params: {
              jid: row.id,
            },
          }).then((resdata) => {});
          that.$router.push({
            path: "/policeTracking/track",
src/views/realTimePolice/real.vue
@@ -2,7 +2,7 @@
 * @Author: Morpheus
 * @Date: 2021-03-17 15:21:33
 * @Last Modified by: Morpheus
 * @Last Modified time: 2021-04-10 17:33:38
 * @Last Modified time: 2021-04-12 17:28:33
 */
<template>
  <basic-container>
@@ -66,9 +66,6 @@
          @click="getQBdata(3)"
          >全部
        </el-button>
        <span>
          <Legend :datas="datalistLIU"></Legend>
        </span>
      </template>
      <template slot-scope="{ row }" slot="jtype">
@@ -411,30 +408,9 @@
import Recorder from "js-audio-recorder";
import Legend from '../../components/liu-legend/Legend'
export default {
  components:{
      Legend,
    },
  data() {
    return {
      //legend-liu数据
      datalistLIU:[
                {
                    color: 'rgb(233, 39, 25)',
                    text: '未处理'
                },
                {
                    color: 'rgb(17, 198, 253)',
                    text: '处理中'
                },
                {
                    color: 'black',
                    text: '已处理'
                }
            ],
      showMap: false,
      hls: "",
      videoSource: "",
@@ -842,18 +818,6 @@
    refreshChange() {
      this.onLoad(this.page, this.query);
    },
    getStartTime(){
           if (this.$route.query.startTime != undefined && this.$route.query.startTime != null && this.$route.query.startTime != "" ) {
             return this.$route.query.startTime
           }
           return '';
      },
      getEndTime(){
           if (this.$route.query.endTime != undefined && this.$route.query.endTime != null && this.$route.query.endTime != "" ) {
             return this.$route.query.endTime
           }
           return '';
      },
    onLoad(page, params = {}) {
      const { releaseTimeRange } = this.query;
      let values = {
@@ -1181,13 +1145,13 @@
        .then(function () {
          that.dialogTableVisible = false;
          // axios({
          //   method: "post",
          //   url: `/api/blade-jfpts/rvideo/stop`,
          //   params: {
          //     jid: row.id,
          //   },
          // }).then((resdata) => {});
          axios({
            method: "post",
            url: `/api/blade-jfpts/rvideo/stop`,
            params: {
              jid: row.id,
            },
          }).then((resdata) => {});
          that.onLoad(that.page, that.query);
          that.$router.push({
@@ -1384,6 +1348,12 @@
          "Content-Type": "application/json;",
        },
      });
      var wavAxios = axios.create({
        baseURL: "https://web.byisf.com",
        withCredentials: false,
      });
      var that = this;
      newCallAxios
@@ -1405,6 +1375,31 @@
          var newbolb = new Blob([blob], { type: "audio/pcm" });
          var fileOfBlob = new File([newbolb], new Date().getTime() + ".pcm");
          formData.append("file", fileOfBlob);
          var wavBlob = that.recorder.getWAVBlob();
          var wavformData = new FormData();
          var wavform = new File([wavBlob], new Date().getTime() + ".wav");
          wavformData.append("file", wavform);
          console.log(
            wavBlob,
            wavform,
            wavformData,
            wavformData.entries(),
            132
          );
          axios({
            method: "post",
            url: "/api/blade-jfpts/xlfeedback/xlfeedback/put-objecty",
            data: wavformData,
            params: {
              jid: that.form.id,
            },
          }).then((resdata) => {
            console.log(resdata);
          });
          newCallAxios
            .post(`/api_control`, blob, {
              params: {