diff --git a/src/views/voice/recordPage/index.vue b/src/views/voice/recordPage/index.vue index 2cbaf46..fa9997d 100644 --- a/src/views/voice/recordPage/index.vue +++ b/src/views/voice/recordPage/index.vue @@ -11,6 +11,10 @@
+
+ 重置 + 确定 +
@@ -129,7 +133,7 @@ case 'detail': // 查看的操作 // 查看动态弹框 - dynamicPopUp(params) + dynamicPopUp(params); break; default: @@ -137,24 +141,23 @@ break; } } -async function dynamicPopUp (params){ - console.log('params111',params); +async function dynamicPopUp(params) { + console.log('params111', params); let allData = []; - await appStore.MapData.map(item => { + await appStore.MapData.map(item => { allData = allData.concat(item.data); }); - let item=await findDictObj2(allData,'id',params.recognitionDataId); - console.log('item匹配到',item); - if(item.id){ - item.stType=item.pointType - let geometry=item.geometry; + let item = await findDictObj2(allData, 'id', params.recognitionDataId); + console.log('item匹配到', item); + if (item.id) { + item.stType = item.pointType; + let geometry = item.geometry; let feature = turf.feature(Terraformer.WKT.parse(geometry), _.cloneDeep(item)); newfiberMap.map.easeTo({ center: turf.getCoords(turf.center(feature)), zoom: 15 }); bus.emit('setGeoJSON', { json: turf.featureCollection([feature]), key: 'temporary' }); - if(feature){ - feature.properties.type=feature.properties.pointType - bus.emit("xiaofeifei", feature); - + if (feature) { + feature.properties.type = feature.properties.pointType; + bus.emit('xiaofeifei', feature); } } } @@ -212,16 +215,24 @@ uploadaudioformwebSocket(); } +// 重置 +function chongzhi() { + // 先结束录音 + stopRecorder(); + // 清除两个定时器 + clearTimeout(settimEnd.value); + clearInterval(timEnd.value); + process.value = 1; + STARTVOICE(); +} + +// 确定 +function queding() { + STARTVOICE(); +} + // 机器人所用方法 function STARTVOICE() { - // console.log(window.location); - // console.log(window.location.href); - // if (window.location.href.includes('/FloodControlAndDrainage')) { - // } - // // bus.emit('changeHeadePath', '/WaterAssets'); - // // bus.emit('changeHeadePath', '/FloodControlAndDrainage'); - - // return; console.log('process.value', process.value); clearInterval(timEnd.value); if (process.value == 1) { @@ -396,7 +407,7 @@ .msg { overflow: hidden; overflow-y: auto; - max-height: 80px; + max-height: 60px; position: absolute; top: 50px; left: 20px; @@ -426,4 +437,22 @@ } } } + +.bottombtn { + z-index: 99; + position: absolute; + bottom: 20px; + left: 50%; + transform: translate(-50%); + + .chongzhi { + background: #09bcd7; + height: 26px; + } + + .queding { + background: #18a7f2; + height: 26px; + } +}