8 files modified
2 files added
| | |
| | | |
| | | export const update = (row) => { |
| | | return request({ |
| | | url: '/api/blade-jfpts/alarm/alarm/update', |
| | | url: '/api/blade-jfpts/alarm/alarm/submit', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | |
| | | <el-col span="12"> |
| | | <el-form-item label="监控视频"> |
| | | <el-button :class="{ active: isActive }" |
| | | v-if="form.manufacturers != 'HK'" |
| | | type="success" |
| | | @click.stop=" |
| | | (videoConversationReal = true), (oldVideoSatart = false) |
| | |
| | | @mousedown.native="aKeyToCall" |
| | | @mouseup.native="aKeyStopCall">视频通话 |
| | | </el-button> |
| | | |
| | | <el-button :class="{ active: isActive }" |
| | | v-if="form.manufacturers == 'HK'" |
| | | type="success" |
| | | @click.stop="HKCall(form)" |
| | | >海康语音通话 |
| | | @click.stop=" |
| | | (videoConversationReal = true), (oldVideoSatart = false) |
| | | " |
| | | @mousedown.native="HKCall(form)" |
| | | @mouseup.native="HKStopCall(form)">海康语音通话 |
| | | </el-button> |
| | | <el-button :class="{ active: isActive }" |
| | | type="success" |
| | | @click.stop="HKStopCall(form)" |
| | | >关闭语音通话 |
| | | </el-button> |
| | | |
| | | <el-button v-show="false" |
| | | type="primary" |
| | | @click.stop=" |
| | |
| | | szId: 'play_window', |
| | | szBasePath: "/", |
| | | iMaxSplit: 4, |
| | | iCurrentSplit: 1 , |
| | | iCurrentSplit: 1, |
| | | openDebug: true, |
| | | oStyle: { |
| | | borderSelect: '#000', |
| | | borderSelect: '#000', |
| | | } |
| | | }); |
| | | // 事件回调绑定 |
| | |
| | | }, |
| | | methods: { |
| | | HKCall(e) { |
| | | this.isActive = true; |
| | | var that = this; |
| | | if (this.recorder == null) { |
| | | this.recorder = new Recorder({ |
| | | sampleBits: 16, // 采样位数,支持 8 或 16,默认是16 |
| | | sampleRate: 8000, // 采样率,支持 11025、16000、22050、24000、44100、48000,根据浏览器默认值,我的chrome是48000 |
| | | numChannels: 1, // 声道,支持 1 或 2, 默认是1 |
| | | // compiling: false,(0.x版本中生效,1.x增加中) // 是否边录边转换,默认是false |
| | | }); |
| | | } |
| | | axios({ |
| | | method: "get", |
| | | url: `/api/blade-jfpts/equipment/equipment/EquimentVoice?`, |
| | |
| | | this.player.JS_StartTalk(url).then( |
| | | () => { |
| | | console.log('talkStart success') |
| | | // 一键呼叫相关函数 |
| | | that.recorder.start().then( |
| | | () => { |
| | | // 开始录音 |
| | | }, |
| | | (error) => { |
| | | // 出错了 |
| | | console.log(`${error.name} : ${error.message}`); |
| | | } |
| | | ); |
| | | }, |
| | | e => { |
| | | console.error(e) |
| | |
| | | }); |
| | | }, |
| | | HKStopCall() { |
| | | this.isActive = false; |
| | | var that = this; |
| | | this.player.JS_StopTalk().then( |
| | | () => { console.log('talkStop success') }, |
| | | e => { console.error(e) } |
| | | () => { |
| | | console.log('talkStop success') |
| | | var formData = new FormData(); |
| | | // that.recorder.downloadWAV("新文件"); |
| | | |
| | | var blob = that.recorder.getPCMBlob(); //获取pcm格式音频数据 |
| | | //此处获取到blob对象后需要设置fileName满足当前项目上传需求,其它项目可直接传把blob作为file塞入formData |
| | | 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); |
| | | }); |
| | | }, |
| | | e => { |
| | | console.error(e) |
| | | } |
| | | ) |
| | | }, |
| | | realOpenVideoDialog() { |
| | |
| | | //执行重连 |
| | | that.websocketStart(); |
| | | }; |
| | | |
| | | } else { |
| | | console.log("WebSocket连接没有建立成功!!"); |
| | | } |
| | |
| | | searchSpan: 4, |
| | | prop: "alarmPeople", |
| | | width: 90, |
| | | type: "tree", |
| | | props: { |
| | | label: "title", |
| | | value: "key" |
| | | }, |
| | | dicUrl: "/api/blade-system/dept/Batrees", |
| | | }, |
| | | { |
| | | label: "联系方式", |
| | |
| | | prop: "bz", |
| | | }, |
| | | { |
| | | label: "设备名称", |
| | | searchSpan: 3, |
| | | search: true, |
| | | prop: "rname", |
| | | }, |
| | | { |
| | | label: "设备编号", |
| | | searchSpan: 3, |
| | | search: true, |
| | | width: 130, |
| | | prop: "deviceNumber", |
| | | }, |
| | |
| | | }, |
| | | methods: { |
| | | getData() { |
| | | |
| | | |
| | | this.reportUrl = |
| | | "./realVideo/realtime-view-videos.html?channelNumber=" + |
| | | this.$route.query.channelNumber + |
| | |
| | | ] |
| | | }, |
| | | { |
| | | label: "设备类型", |
| | | prop: "deviceType", |
| | | width: 150, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请输入设备类型", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "使用方", |
| | | prop: "deptName", |
| | | display: false |
| | |
| | | this.form.jd = val.longitude; |
| | | //地址截取,从县/区开始截取,并且取从县区第一个出现的位置开始 |
| | | var address = val.formattedAddress.toString(); |
| | | if(address.search("县") != -1){ |
| | | this.form.street = address.substring(address.indexOf("县")+1,address.length); |
| | | } |
| | | if(address.search("区") != -1){ |
| | | this.form.street = address.substring(address.indexOf("区")+1,address.length); |
| | | } |
| | | this.form.street = address; |
| | | // if(address.search("县") != -1){ |
| | | // this.form.street = address.substring(address.indexOf("县")+1,address.length); |
| | | // } |
| | | // if(address.search("区") != -1){ |
| | | // this.form.street = address.substring(address.indexOf("区")+1,address.length); |
| | | // } |
| | | } |
| | | }, |
| | | immediate: true, |
| | |
| | | } |
| | | }); |
| | | }else{ |
| | | var res = that.a; |
| | | if (res.deviceName.indexOf("(象湖院区)") != -1 || res.deviceName.indexOf("(东湖院区)") != -1){ |
| | | debugger |
| | | var dom = document.getElementById( |
| | | "real_video_conversationDataL" |
| | | ); |
| | | dom.src = res.netType; |
| | | dom.play(); |
| | | return; |
| | | } |
| | | |
| | | var newAxios = axios.create({ |
| | | baseURL: "https://web.byisf.com:18000", |
| | | withCredentials: false, |
| | |
| | | <div class="radio"> |
| | | <el-radio-group v-model="radio" @change="siteStatus"> |
| | | <el-radio label="全部">全部</el-radio> |
| | | <el-radio label="一键求助">一键求助</el-radio> |
| | | <el-radio label="一键报警">一键报警</el-radio> |
| | | <el-radio label="监控设备">监控设备</el-radio> |
| | | <el-radio label="仅显示预警设备">仅显示预警设备</el-radio> |
| | | <el-radio label="仅显示设备掉线">仅显示设备掉线</el-radio> |
| | | <el-radio label="仅显示设备故障">仅显示设备故障</el-radio> |
| | |
| | | }} |
| | | </div> |
| | | |
| | | <img src="/img/alarm.png" alt="" /> |
| | | <img v-if="item.deviceType == '监控设备'" src="/img/jiank.png" alt="" /> |
| | | <img v-if="item.deviceType == '一键报警'" src="/img/baojin.png" alt="" /> |
| | | <img v-if="item.deviceType == '一键求助'" src="/img/alarm.png" alt="" /> |
| | | |
| | | <div class="bot"> |
| | | <span> |
| | |
| | | // }); |
| | | // } |
| | | |
| | | var d = f.concat(a.concat(c.concat(b))); |
| | | if (this.radio == "一键求助") { |
| | | res.data.data.forEach((item) => { |
| | | if (item.deviceType.indexOf("一键求助") != -1) c.push(item); |
| | | }); |
| | | } else if (this.radio == "一键报警") { |
| | | res.data.data.forEach((item) => { |
| | | if (item.deviceType.indexOf("一键报警") != -1) c.push(item); |
| | | }); |
| | | } else if (this.radio == "监控设备") { |
| | | res.data.data.forEach((item) => { |
| | | if (item.deviceType.indexOf("监控设备") != -1) c.push(item); |
| | | }); |
| | | } |
| | | |
| | | var d = f.concat(a.concat(c.concat(b))); |
| | | this.count = []; |
| | | d.forEach((item) => { |
| | | this.count.push(item); |
| | | }); |