Commit 8780570f authored by caicaicai's avatar caicaicai

修改

parent e8979c00
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
</div> </div>
</div> </div>
<!-- 语音所需内容,隐藏无需展示 -->
<div class="main" style="display:none;"> <div class="main" style="display:none;">
<slot name="top"></slot> <slot name="top"></slot>
...@@ -181,7 +182,7 @@ export default { ...@@ -181,7 +182,7 @@ export default {
this.searchText = ''; this.searchText = '';
this.selectCarRadioArray = []; this.selectCarRadioArray = [];
this.situationWhich = 10000; this.situationWhich = 10000;
this.userName1 = value; this.userName1 = value; //车牌号
this.recOpen(); this.recOpen();
//车队 //车队
httpGet(carFleetQuery,{size:9999,page:0}).then((res) => { httpGet(carFleetQuery,{size:9999,page:0}).then((res) => {
...@@ -235,7 +236,7 @@ export default { ...@@ -235,7 +236,7 @@ export default {
//初始化weosocket //初始化weosocket
initWebSocket(){ initWebSocket(){
//const wsuri = 'ws://8.143.203.103:9090/webSocket' + '/' + this.userName1; //const wsuri = 'ws://8.143.203.103:9090/webSocket' + '/' + this.userName1;
const wsuri = 'ws://192.168.0.111:8001/webSocket' + '/' + this.userName1; const wsuri = 'ws://192.168.0.111:9090/webSocket' + '/' + this.userName1;
this.websocket = new WebSocket(wsuri); this.websocket = new WebSocket(wsuri);
this.websocket.onopen = this.websocketonopen; this.websocket.onopen = this.websocketonopen;
this.websocket.onerror = this.websocketonerror; this.websocket.onerror = this.websocketonerror;
...@@ -256,13 +257,27 @@ export default { ...@@ -256,13 +257,27 @@ export default {
console.log(e); console.log(e);
let that = this; let that = this;
if(e == undefined){ if(e == undefined){
let str1 = localStorage.getItem(this.userName1 + 'voiceData');
if(!str1){
return return
}else{ }else{
let array1 = [...that.videoContentAllArray]; let arr2 = JSON.parse(str1);
array1.push(JSON.parse(e.data)); that.videoContentAllArray = arr2;
that.videoContentAllArray = array1; }
//that.videoContent = JSON.parse(e.data).contentText; }else{
//that.videoContentUserName = JSON.parse(e.data).toUserId; let str1 = localStorage.getItem(this.userName1 + 'voiceData');
let str2 = JSON.parse(e.data);
if(!str1){
let arr1 = [];
arr1.unshift(str2);
that.videoContentAllArray = arr1;
localStorage.setItem(this.userName1 + 'voiceData',JSON.stringify(arr1));
}else{
let arr2 = JSON.parse(str1);
arr2.unshift(str2);
that.videoContentAllArray = arr2;
localStorage.setItem(this.userName1 + 'voiceData',JSON.stringify(arr2));
}
} }
}, },
//WebSocket数据发送 //WebSocket数据发送
...@@ -588,6 +603,7 @@ export default { ...@@ -588,6 +603,7 @@ export default {
this.dialogCancel(); this.dialogCancel();
this.waitDialogClickFn(); this.waitDialogClickFn();
}, },
//播放语音
selectSituation(item){ selectSituation(item){
this.recClose(); this.recClose();
// Blobdata 就是后端返回给你的Blob数据 // Blobdata 就是后端返回给你的Blob数据
...@@ -601,10 +617,13 @@ export default { ...@@ -601,10 +617,13 @@ export default {
}; };
}, },
//删除某个语音
selectDeleteSituation(index){ selectDeleteSituation(index){
let array2 = [...this.videoContentAllArray]; let str1 = localStorage.getItem(this.userName1 + 'voiceData');
array2.splice(index,1); let arr3 = JSON.parse(str1);
this.videoContentAllArray = array2; arr3.splice(index,1);
this.videoContentAllArray = arr3;
localStorage.setItem(this.userName1 + 'voiceData',JSON.stringify(arr3));
}, },
addWavHeader(samples, sampleRateTmp, sampleBits, channelCount) { addWavHeader(samples, sampleRateTmp, sampleBits, channelCount) {
const dataLength = samples.byteLength; const dataLength = samples.byteLength;
......
...@@ -56,9 +56,9 @@ ...@@ -56,9 +56,9 @@
<personalCenter ref="personalCenterMethod" v-show="selectFunction == 6"/> <personalCenter ref="personalCenterMethod" v-show="selectFunction == 6"/>
<smallWindow ref="smallWindowMethod" v-show="selectFunction == 7"/> <smallWindow ref="smallWindowMethod" v-show="selectFunction == 7"/>
<!-- 地图区域 --> <!-- 地图区域 -->
<div id="centerDiv" class="mapcontainer"> <!-- <div id="centerDiv" class="mapcontainer">
<mars3dViewerMap :url="configUrl" @onload="onMapload"/> <mars3dViewerMap :url="configUrl" @onload="onMapload"/>
</div> </div> -->
<!-- 电铲待装车辆列表 --> <!-- 电铲待装车辆列表 -->
<div class="waitingtrucksView" v-if="carclass == '电铲'"> <div class="waitingtrucksView" v-if="carclass == '电铲'">
<div class="waitingtrucksView_title">待装卡车列表</div> <div class="waitingtrucksView_title">待装卡车列表</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment