chunk-09c079c8.708071aa.js 45 KB

123456789101112
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-09c079c8"],{"0e3e":function(t,e,i){"use strict";var o=i("88a0"),a=i.n(o);a.a},2769:function(t,e,i){"use strict";i.r(e);var o=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"problem"},[i("div",{staticClass:"header"},[t._v("问题列表")]),i("div",{staticClass:"content",staticStyle:{overflow:"hidden"}},[i("van-tabs",{attrs:{swipeable:!0,color:"rgb(47, 143, 251)","title-active-color":"rgb(47, 143, 251)","line-width":".4rem","line-height":".04rem"},on:{click:t.tabTob},model:{value:t.active,callback:function(e){t.active=e},expression:"active"}},[i("van-tab",{attrs:{title:"打卡式巡检",name:"1",dot:!!t.bubble.clockSumNumber}},[i("div",{staticClass:"tab"},[i("p",{class:0===t.tabsNum?"active":"actives"},[i("span",{on:{click:t.tabs}},[t._v("未处理")]),i("i",{directives:[{name:"show",rawName:"v-show",value:t.bubble.clockUntreated,expression:"bubble.clockUntreated"}]},[t._v(t._s(t.bubble.clockUntreated))])]),i("p",{class:2===t.tabsNum?"active":"actives"},[i("span",{on:{click:t.tabs}},[t._v("已临时整改")]),i("i",{directives:[{name:"show",rawName:"v-show",value:t.bubble.clockTemporary,expression:"bubble.clockTemporary"}]},[t._v(t._s(t.bubble.clockTemporary))])]),i("p",{class:3===t.tabsNum?"active":"actives"},[i("span",{on:{click:t.tabs}},[t._v("检查")]),i("i",{directives:[{name:"show",rawName:"v-show",value:t.bubble.clockCheck,expression:"bubble.clockCheck"}]},[t._v(t._s(t.bubble.clockCheck))])])]),i("div",{staticClass:"tabContent"},[i("van-pull-refresh",{on:{refresh:t.onRefresh},model:{value:t.isLoading,callback:function(e){t.isLoading=e},expression:"isLoading"}},[i("ul",t._l(t.list,(function(e,o){return i("li",{key:o,on:{click:function(i){return t.itemAbnormal(e)}}},[i("p",[i("van-icon",{staticStyle:{"margin-right":".1rem"},attrs:{name:"comment-o",color:"rgb(0, 122, 251)"}}),i("span",[t._v(t._s(e.titleStr))])],1),i("div",[i("van-icon",{staticStyle:{"margin-right":".1rem"},attrs:{name:"clock-o",color:"rgb(0, 122, 251)"}}),i("span",[t._v("提报时间:"+t._s(e.reportingTime))])],1)])})),0)])],1)]),i("van-tab",{attrs:{title:"视频巡检",name:"2",dot:!!t.bubble.videoSumNumber}},[i("div",{staticClass:"tab"},[i("p",{class:0===t.tabsNum?"active":"actives"},[i("span",{on:{click:t.tabs}},[t._v("未处理")]),i("i",{directives:[{name:"show",rawName:"v-show",value:t.bubble.videoUntreated,expression:"bubble.videoUntreated"}]},[t._v(t._s(t.bubble.videoUntreated))])]),i("p",{class:2===t.tabsNum?"active":"actives"},[i("span",{on:{click:t.tabs}},[t._v("已临时整改")]),i("i",{directives:[{name:"show",rawName:"v-show",value:t.bubble.videoTemporary,expression:"bubble.videoTemporary"}]},[t._v(t._s(t.bubble.videoTemporary))])]),i("p",{class:3===t.tabsNum?"active":"actives"},[i("span",{on:{click:t.tabs}},[t._v("检查")]),i("i",{directives:[{name:"show",rawName:"v-show",value:t.bubble.videoCheck,expression:"bubble.videoCheck"}]},[t._v(t._s(t.bubble.videoCheck))])])]),i("div",{staticClass:"tabContent"},[i("van-pull-refresh",{on:{refresh:t.onRefresh},model:{value:t.isLoading,callback:function(e){t.isLoading=e},expression:"isLoading"}},[i("ul",t._l(t.list,(function(e,o){return i("li",{key:o,on:{click:function(i){return t.itemAbnormal(e)}}},[i("p",[i("van-icon",{staticStyle:{"margin-right":".1rem"},attrs:{name:"comment-o",color:"rgb(0, 122, 251)"}}),i("span",[t._v(t._s(e.titleStr))])],1),i("div",[i("van-icon",{staticStyle:{"margin-right":".1rem"},attrs:{name:"clock-o",color:"rgb(0, 122, 251)"}}),i("span",[t._v("提报时间:"+t._s(e.reportingTime))])],1)])})),0)])],1)]),i("van-tab",{attrs:{title:"HSE检查",name:"3"}},[t._v("等待开发")])],1)],1),i("van-overlay",{attrs:{show:t.loading}},[i("div",{staticClass:"wrapper",on:{click:function(t){t.stopPropagation()}}},[i("van-loading",{attrs:{size:"24px",color:"#0094ff",vertical:""}},[t._v("加载中...")])],1)]),t.isParticulars?i("Particulars",{attrs:{id:t.id},on:{cloneAlert:t.cloneAlert}}):t._e()],1)},a=[],n=(i("e7e5"),i("d399")),s=i("c761"),r=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"particulars"},[o("div",{staticClass:"header"},[o("van-icon",{attrs:{name:"arrow-left",color:"#fff"},on:{click:t.back}}),t._v("消息详情 ")],1),o("div",{staticClass:"textContent"},[o("h3",{staticClass:"topTitle"},[t._v("异常问题详情:")]),o("div",{staticClass:"abnormity"},[o("p",[t._v("提报异常区域:"+t._s(t.list.locationName))]),o("p",[t._v("提报人:"+t._s(t.list.reportedBy))]),o("p",[t._v("提报时间:"+t._s(t.list.reportingTime))]),o("p",[t._v("异常描述:"+t._s(t.list.alarmContent))])]),t._l(t.videoLists,(function(e,a){return o("div",{key:a,staticClass:"audio"},[o("img",{attrs:{src:i("4b7f"),alt:""},on:{click:function(e){return t.play(a)}}}),o("div",{directives:[{name:"show",rawName:"v-show",value:e.player,expression:"item.player"}],staticClass:"anima"}),o("p",{directives:[{name:"show",rawName:"v-show",value:e.audioNum,expression:"item.audioNum"}]},[t._v(t._s(e.audioNum)+'"')]),o("b",{directives:[{name:"show",rawName:"v-show",value:e.isRed,expression:"item.isRed"}]}),o("audio",{ref:"audios1"+a,refInFor:!0,staticStyle:{opacity:"0",width:"1px",height:"1px"},attrs:{controls:"",id:"linkAudio",preload:"metadata"}},[o("source",{attrs:{src:e.videoCode,type:"audio/ogg"}})])])})),o("ul",{staticClass:"img"},t._l(t.imgList,(function(t,e){return o("li",{key:e},[o("img",{attrs:{src:t,alt:""}})])})),0),2===t.list.state?o("div",{staticStyle:{"border-top":".01rem solid #ccc","border-bottom":".01rem solid #ccc","margin-top":".1rem"}},[o("h3",{staticClass:"topTitle"},[t._v("临时整改详情:")]),o("div",{staticClass:"abnormity"},[o("p",[t._v("未整改问题隐患临时防范/应急措施:"+t._s(t.list.tempMeasures))]),o("p",[t._v("提报人:"+t._s(t.list.tempProcessor))]),o("p",[t._v("提报时间:"+t._s(t.list.tempDate))])]),t.isAudio?o("div",{staticClass:"audio"},[o("img",{attrs:{src:i("4b7f"),alt:""},on:{click:t.play}}),o("div",{directives:[{name:"show",rawName:"v-show",value:t.player,expression:"player"}],staticClass:"anima"}),t.audioNum?o("p",[t._v(t._s(t.audioNum)+'"')]):o("p",[o("van-loading",{attrs:{type:"spinner",size:".2rem"}})],1),o("b",{directives:[{name:"show",rawName:"v-show",value:t.isRed,expression:"isRed"}]})]):t._e(),o("audio",{ref:"audio",staticStyle:{opacity:"0",width:"1px",height:"1px"},attrs:{controls:"",id:"linkAudio",preload:"metadata"}},[o("source",{attrs:{src:t.list.videoCode,type:"audio/ogg"}})]),o("ul",{staticClass:"img"},t._l(t.imgList,(function(t,e){return o("li",{key:e},[o("img",{attrs:{src:t,alt:""}})])})),0)]):t._e(),1===t.list.state?o("div",{staticStyle:{"border-top":".01rem solid #ccc","margin-top":".1rem"}},[o("h3",{staticClass:"topTitle"},[t._v("整改详情:")]),o("div",{staticClass:"abnormity"},[o("p",[t._v("整改方案/措施:"+t._s(t.list.measures))]),o("p",[t._v("整改处理人:"+t._s(t.list.handleBy))]),o("p",[t._v("整改处理时间:"+t._s(t.list.handleDate))])]),t._l(t.videoLists,(function(e,a){return o("div",{key:a,staticClass:"audio"},[o("img",{attrs:{src:i("4b7f"),alt:""},on:{click:function(e){return t.play(a)}}}),o("div",{directives:[{name:"show",rawName:"v-show",value:e.player,expression:"item.player"}],staticClass:"anima"}),o("p",{directives:[{name:"show",rawName:"v-show",value:e.audioNum,expression:"item.audioNum"}]},[t._v(t._s(e.audioNum)+'"')]),o("b",{directives:[{name:"show",rawName:"v-show",value:e.isRed,expression:"item.isRed"}]}),o("audio",{ref:"audios1"+a,refInFor:!0,staticStyle:{opacity:"0",width:"1px",height:"1px"},attrs:{controls:"",id:"linkAudio",preload:"metadata"}},[o("source",{attrs:{src:e.videoCode,type:"audio/ogg"}})])])})),o("ul",{staticClass:"img"},t._l(t.imgList,(function(t,e){return o("li",{key:e},[o("img",{attrs:{src:t,alt:""}})])})),0)],2):t._e(),2===t.list.state?o("Record",{ref:"child",on:{recordItem:t.recordItem}}):t._e(),2===t.list.state?o("div",{staticClass:"reason"},[o("van-field",{staticStyle:{border:".01rem solid gray","border-radius":".07rem",width:"96%","margin-left":"2%"},attrs:{rows:"4",autosize:"",type:"textarea",maxlength:"500",placeholder:"请输入整改方案/措施","show-word-limit":""},model:{value:t.message,callback:function(e){t.message=e},expression:"message"}})],1):t._e()],2),o("div",{staticClass:"foots"},[t.list.state?t._e():o("van-button",{attrs:{type:"info"},on:{click:function(e){t.isOverlay=!0,t.radio=""}}},[t._v("处理")]),t.list.state?t._e():o("van-button",{attrs:{type:"info"},on:{click:t.redeploy}},[t._v("转/派")]),2===t.list.state?o("van-button",{staticStyle:{width:"96%"},attrs:{type:"info"}},[t._v("提交")]):t._e(),1===t.list.state?o("van-button",{staticStyle:{width:"50%","border-radius":"0"},attrs:{type:"default"}},[t._v("驳回")]):t._e(),1===t.list.state?o("van-button",{staticStyle:{width:"50%","border-radius":"0"},attrs:{type:"info"}},[t._v("通过")]):t._e()],1),o("van-overlay",{attrs:{show:t.isOverlay}},[o("div",{staticClass:"wrapper",on:{click:function(t){t.stopPropagation()}}},[o("van-radio-group",{staticClass:"block",attrs:{direction:"horizontal"},on:{change:t.overlay},model:{value:t.radio,callback:function(e){t.radio=e},expression:"radio"}},[o("van-radio",{attrs:{name:"0"}},[t._v("临时整改")]),o("van-radio",{attrs:{name:"1"}},[t._v("整改")]),o("van-icon",{staticClass:"close",attrs:{name:"cross"},on:{click:t.cloneOver}})],1)],1)]),o("van-overlay",{attrs:{show:t.isTurn},on:{click:function(e){t.isTurn=!1}}},[o("div",{staticClass:"wrapper",on:{click:function(t){t.stopPropagation()}}},[o("div",{staticClass:"turns"},[o("van-icon",{staticClass:"close",attrs:{name:"cross"},on:{click:t.cloneTurn}}),o("h5",[t._v("请选择转/派的人员")]),o("van-dropdown-menu",{staticStyle:{"margin-top":".2rem"},attrs:{overlay:!1}},[o("van-dropdown-item",{attrs:{options:t.option1},on:{change:t.changeValue},model:{value:t.value1,callback:function(e){t.value1=e},expression:"value1"}}),o("van-dropdown-item",{attrs:{options:t.option2},model:{value:t.value2,callback:function(e){t.value2=e},expression:"value2"}})],1),o("div",{staticClass:"btn"},[o("van-button",{attrs:{type:"info"},on:{click:t.confirmRedeploy}},[t._v("确定")])],1)],1)])]),t.isDispose?o("dispose",{attrs:{list:t.list,type:t.type},on:{closeDispose:t.closeDisposes}}):t._e()],1)},c=[],l=(i("4de4"),i("4160"),i("d81d"),i("d3b7"),i("ac1f"),i("3ca3"),i("1276"),i("159b"),i("ddb0"),i("96cf"),i("1da1")),u=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"dispose"},[o("div",{staticClass:"header"},[o("van-icon",{attrs:{name:"arrow-left",color:"#fff"},on:{click:t.closeDispose}}),t._v("处理详情 ")],1),o("div",{staticClass:"textContent",staticStyle:{padding:".1rem"}},[o("div",{staticClass:"photo"},[o("van-uploader",{attrs:{multiple:"","after-read":t.fileImage,"preview-size":"27vw","preview-full-image":!1},on:{"click-preview":t.preview},model:{value:t.fileList,callback:function(e){t.fileList=e},expression:"fileList"}})],1),0==this.type?o("div",{staticClass:"date"},[o("p",[t._v("计划完成整改时间:")]),o("van-cell",{staticStyle:{width:"60%"},attrs:{title:"请选择",value:t.date},on:{click:function(e){t.show=!0}}}),o("van-calendar",{attrs:{"min-date":t.minDate},on:{confirm:t.onConfirm},model:{value:t.show,callback:function(e){t.show=e},expression:"show"}})],1):t._e(),o("div",{staticClass:"record"},[o("div",{staticClass:"play",on:{click:t.transmit}},[o("p",{directives:[{name:"show",rawName:"v-show",value:t.player,expression:"player"}]}),o("img",{attrs:{src:i("619a"),alt:""}}),o("span",[t._v(t._s(t.duration)+'"')])]),o("button",{on:{touchstart:t.touchstart,touchend:t.touchend,touchmove:t.touchmove}},[t._v(" "+t._s(t.btRecoding?"松开结束":"按住说话")+" ")]),o("van-overlay",{attrs:{show:t.btRecoding},on:{click:function(e){t.show=!1}}},[o("div",{staticClass:"wrappers",on:{click:function(t){t.stopPropagation()}}},[t.btRecoding?o("div",{staticClass:"shade",attrs:{catchtouchmove:"ture"}},[t.blackBoxSpeak?o("div",{staticClass:"blackBoxSpeak"},[o("div",[o("img",{attrs:{src:i("c1c5")}})]),o("div",{staticClass:"bounce"},[o("ul",[o("li"),o("li"),o("li"),o("li")])]),o("div",{staticClass:"blackBoxSpeakConent"},[t._v("手指上划,取消录制")])]):o("div",{staticClass:"blackBoxPause"},[o("img",{staticStyle:{"background-color":"rgb(238, 238, 238)"},attrs:{src:i("81e5")}}),o("div",{staticClass:"blackBoxSpeakConent",staticStyle:{background:"red"}},[t._v(" 松开手指,取消录制 ")])])]):t._e()])])],1),o("h4",{staticStyle:{"text-align":"left",margin:".3rem 0 .1rem 0"}},[t._v(" "+t._s(0==this.type?" 未整改问题隐患临时防范/应急措施":"未整改问题隐患防范/应急措施")+" ")]),o("van-field",{staticStyle:{border:".01rem solid gray","border-radius":".07rem"},attrs:{rows:"4",autosize:"",type:"textarea",maxlength:"500",placeholder:0==this.type?"请输入临时整改措施":"请输入整改措施","show-word-limit":""},model:{value:t.message,callback:function(e){t.message=e},expression:"message"}})],1),t.list.state?t._e():o("div",{staticClass:"foots"},[o("van-button",{staticStyle:{width:"96%","border-radius":".05rem",margin:".1rem 0","font-size":".2rem"},attrs:{type:"info"},on:{click:t.add}},[t._v("提交")])],1),o("div",{directives:[{name:"show",rawName:"v-show",value:t.isEditor,expression:"isEditor"}],staticClass:"drawing-container"},[o("div",{attrs:{id:"tui-image-editor"}}),o("van-button",{staticClass:"closes",attrs:{plain:"",type:"info"},on:{click:t.close}},[t._v("取消")]),o("van-button",{staticClass:"save",attrs:{type:"info"},on:{click:t.save}},[t._v("保存")])],1),o("van-overlay",{attrs:{show:t.loading}},[o("div",{staticClass:"wrapper",on:{click:function(t){t.stopPropagation()}}},[o("van-loading",{attrs:{size:"24px",color:"#0094ff",vertical:""}},[t._v("上传中,请稍等...")])],1)])],1)},d=[],p=(i("99af"),i("b0c0"),i("466d"),i("5319"),i("5cc6"),i("9a8c"),i("a975"),i("735e"),i("c1ac"),i("d139"),i("3a7b"),i("d5d6"),i("82f8"),i("e91f"),i("60bd"),i("5f96"),i("3280"),i("3fcc"),i("ca91"),i("25a1"),i("cd26"),i("3c5d"),i("2954"),i("649e"),i("219c"),i("170b"),i("b39a"),i("72f7"),i("da43")),h=i.n(p),m=(i("741a"),i("5ff5"),i("abe2")),f=i.n(m),v={ZoomIn:"放大",ZoomOut:"缩小",Hand:"手掌",History:"历史",Resize:"调整宽高",Crop:"裁剪",DeleteAll:"全部删除",Delete:"删除",Undo:"撤销",Redo:"反撤销",Reset:"重置",Flip:"镜像",Rotate:"旋转",Draw:"画",Shape:"形状标注",Icon:"图标标注",Text:"文字标注",Mask:"遮罩",Filter:"滤镜",Bold:"加粗",Italic:"斜体",Underline:"下划线",Left:"左对齐",Center:"居中",Right:"右对齐",Color:"颜色","Text size":"字体大小",Custom:"自定义",Square:"正方形",Apply:"应用",Cancel:"取消","Flip X":"X 轴","Flip Y":"Y 轴",Range:"区间",Stroke:"描边",Fill:"填充",Circle:"圆",Triangle:"三角",Rectangle:"矩形",Free:"曲线",Straight:"直线",Arrow:"箭头","Arrow-2":"箭头2","Arrow-3":"箭头3","Star-1":"星星1","Star-2":"星星2",Polygon:"多边形",Location:"定位",Heart:"心形",Bubble:"气泡","Custom icon":"自定义图标","Load Mask Image":"加载蒙层图片",Grayscale:"灰度",Blur:"模糊",Sharpen:"锐化",Emboss:"浮雕","Remove White":"除去白色",Distance:"距离",Brightness:"亮度",Noise:"噪音","Color Filter":"彩色滤镜",Sepia:"棕色",Sepia2:"棕色2",Invert:"负片",Pixelate:"像素化",Threshold:"阈值",Tint:"色调",Multiply:"正片叠底",Blend:"混合色",Width:"宽度",Height:"高度","Lock Aspect Ratio":"锁定宽高比例"},g={"common.bi.image":"","common.bisize.width":"0px","common.bisize.height":"0px","common.backgroundImage":"none","common.backgroundColor":"#f3f4f6","common.border":"1px solid #333","header.backgroundImage":"none","header.backgroundColor":"#fff","header.border":"0px","loadButton.backgroundColor":"#fff","loadButton.border":"1px solid #ddd","loadButton.color":"#222","loadButton.fontFamily":"NotoSans, sans-serif","loadButton.fontSize":"12px","loadButton.display":"none","downloadButton.backgroundColor":"#fdba3b","downloadButton.border":"1px solid #fdba3b","downloadButton.color":"#fff","downloadButton.fontFamily":"NotoSans, sans-serif","downloadButton.fontSize":"12px","downloadButton.display":"none","menu.normalIcon.color":"#8a8a8a","menu.activeIcon.color":"#555555","menu.disabledIcon.color":"#ccc","menu.hoverIcon.color":"#e9e9e9","submenu.normalIcon.color":"#8a8a8a","submenu.activeIcon.color":"#e9e9e9","menu.iconSize.width":"24px","menu.iconSize.height":"24px","submenu.iconSize.width":"32px","submenu.iconSize.height":"32px","submenu.backgroundColor":"#1e1e1e","submenu.partition.color":"#858585","submenu.normalLabel.color":"#858585","submenu.normalLabel.fontWeight":"lighter","submenu.activeLabel.color":"#fff","submenu.activeLabel.fontWeight":"lighter","checkbox.border":"1px solid #ccc","checkbox.backgroundColor":"#fff","range.pointer.color":"#fff","range.bar.color":"#666","range.subbar.color":"#d1d1d1","range.disabledPointer.color":"#414141","range.disabledBar.color":"#282828","range.disabledSubbar.color":"#414141","range.value.color":"#fff","range.value.fontWeight":"lighter","range.value.fontSize":"11px","range.value.border":"1px solid #353535","range.value.backgroundColor":"#151515","range.title.color":"#fff","range.title.fontWeight":"lighter","colorpicker.button.border":"1px solid #1e1e1e","colorpicker.title.color":"#fff"},b={props:["list","type"],name:"VueCli4VantDispose",data:function(){return{message:"",date:"",minDate:new Date((new Date).getTime()+864e5),show:!1,recorder:new h.a,btRecoding:!1,blackBoxSpeak:!1,voiceUrl:"",chartUrl:"",isEditor:!1,index:null,player:!1,duration:"",fileList:[],loading:!1}},watch:{list:function(t,e){t&&(this.list=t)},type:function(t,e){console.log(t,e),t&&(this.type=t)}},mounted:function(){},methods:{preview:function(t,e){console.log(t,e),this.index=e.index,this.init(t.content),this.isEditor=!0},add:function(){var t=this;if(this.message)if(this.date)if(this.fileList.length){this.loading=!0,this.chartUrl="";var e=[];this.fileList.forEach((function(i,o){var a=new window.File([t.dataURLtoBlob(i.content)],"异常上报.mp3",{type:"mp3"});console.log(a);var n=new FormData;n.append("file",a),e.push(n)})),Promise.all(e).then((function(e){console.log(e),e.forEach((function(e,i){t.chartUrl+=i?","+e.data.msg:e.data.msg})),Object(s["l"])({assetCode:t.list.assetCode,id:t.list.id,pictureUrl:t.chartUrl,planDate:t.date.replace(/\//g,"-")+" 08:00:00",tempMeasures:t.message,tempProcessor:"lixl53",tempVoiceUrl:t.voiceUrl}).then((function(e){e.data;t.loading=!1})).catch((function(e){t.loading=!1}))}))}else this.$notify({type:"danger",message:"请上传照片!"});else this.$notify({type:"danger",message:"请选择临时整改日期!"});else this.$notify({type:"danger",message:"整改方案不能为空!"})},fileImage:function(){console.log(this.fileList)},init:function(t){this.instance=new f.a(document.querySelector("#tui-image-editor"),{includeUI:{loadImage:{path:t,name:"image"},menu:["resize","crop","rotate","draw","shape","icon","text"],initMenu:"draw",menuBarPosition:"bottom",locale:v,theme:g},cssMaxWidth:350,cssMaxHeight:700}),document.getElementsByClassName("tui-image-editor-main")[0].style.top="45px",document.getElementsByClassName("tie-btn-reset tui-image-editor-item help")[0].style.display="none"},save:function(){var t=this.instance.toDataURL();this.fileList[this.index].content=t,this.isEditor=!1,this.$notify({type:"success",message:"编辑成功!"})},closeDispose:function(){this.$emit("closeDispose",!1)},close:function(){this.isEditor=!1},onConfirm:function(t){this.show=!1,this.date=new Date(t).toLocaleDateString()},touchstart:function(t){var e=this;this.recorder=new h.a,this.btRecoding=!0,this.blackBoxSpeak=!0,this.startY=t.changedTouches[0].clientY,h.a.getPermission().then((function(){console.log("开始录音"),e.recorder.start()}),(function(t){e.$message({message:"请先允许该网页使用麦克风",type:"info"}),console.log("".concat(t.name," : ").concat(t.message))}))},dataURLtoBlob:function(t){var e=t.split(","),i=e[0].match(/:(.*?);/)[1],o=window.atob(e[1]),a=o.length,n=new Uint8Array(a);while(a--)n[a]=o.charCodeAt(a);return new Blob([n],{type:i})},touchend:function(){var t=this;this.btRecoding=!1,this.blackBoxSpeak&&(this.recorder.stopPlay(),this.$nextTick((function(){t.duration=Math.ceil(t.recorder.duration);var e=t.recorder.getWAVBlob(),i=new window.File([e],"异常上报.mp3",{type:"mp3"});console.log(i);var o=new FormData;o.append("file",i),Object(s["m"])(o).then((function(e){var i=e.data;console.log(i),t.voiceUrl=i.msg}))})))},transmit:function(){var t=this;this.recorder.play(),this.player=!0;var e=1*this.duration,i=setInterval((function(){t.duration=1*t.duration-1}),1e3);setTimeout((function(){clearInterval(i),t.duration=e,t.player=!1}),1e3*e)},touchmove:function(t){console.log(t.changedTouches[0].clientY);var e=t.changedTouches[0].clientY;this.startY<e?this.blackBoxSpeak=!0:this.blackBoxSpeak=!1}}},y=b,w=(i("0e3e"),i("2877")),A=Object(w["a"])(y,u,d,!1,null,"3b31d01f",null),C=A.exports,x=i("2113"),R={name:"VueCli4VantParticulars",props:["id"],data:function(){return{isDispose:!1,isOverlay:!1,isTurn:!1,list:[],audioNum:"",isAudio:!1,isRed:!0,player:!1,isClick:!0,imgList:[],radio:"",value1:"",value2:"",staffList:[],option1:[],option2:[],type:null,duration:"",btRecoding:!1,blackBoxSpeak:!1,message:"",videoLists:[],time:null}},components:{dispose:C,Record:x["a"]},watch:{id:function(t,e){t&&(this.id=t)}},mounted:function(){console.log(this.id),this.getProblemInfoById()},methods:{recordItem:function(t){console.log(t)},init:function(t){this.instance=new f.a(document.querySelector("#tui-image-editor"),{includeUI:{loadImage:{path:t,name:"image"},menu:["resize","crop","rotate","draw","shape","icon","text"],initMenu:"draw",menuBarPosition:"bottom",locale:locale_zh,theme:customTheme},cssMaxWidth:350,cssMaxHeight:700}),document.getElementsByClassName("tui-image-editor-main")[0].style.top="45px",document.getElementsByClassName("tie-btn-reset tui-image-editor-item help")[0].style.display="none"},save:function(){var t=this.instance.toDataURL();this.fileList[this.index].content=t,this.isEditor=!1,this.$notify({type:"success",message:"编辑成功!"})},closeDispose:function(){this.$emit("closeDispose",!1)},close:function(){this.isEditor=!1},onConfirm:function(t){this.show=!1,this.date=new Date(t).toLocaleDateString()},confirmRedeploy:function(){var t=this;Object(s["a"])({appointProcessor:this.value2,problemInfoId:this.id,userName:"lixl53"}).then((function(e){var i=e.data;0===i.code?(t.$notify({type:"success",message:"操作成功!"}),t.$emit("cloneAlert",!1)):t.$notify({type:"danger",message:i.msg})}))},changeValue:function(t){console.log(t),this.option2=this.staffList.filter((function(e){return e.major===t}))[0].data,this.value2=this.option2[0].value},redeploy:function(){var t=this;this.isTurn=!0,Object(s["j"])({userName:"lixl53"}).then((function(e){var i=e.data;t.option1=[],t.option2=[],console.log(i),t.staffList=i.data.map((function(e,i){t.option1.push({text:e.major,value:e.major});var o=[],a={};return e.data.forEach((function(t){a[t.postDesc]||(o.push({text:t.postDesc,value:t.postDesc}),a[t.postDesc]=!0)})),{major:e.major,data:o}})),console.log(t.option1),console.log(t.staffList),t.option2=t.staffList[0].data,t.value1=t.option1[0].value,t.value2=t.option2[0].value}))},cloneOver:function(){this.isOverlay=!1,this.radio=""},cloneTurn:function(){this.isTurn=!1},overlay:function(t){t&&(console.log(t),this.type=t,this.isDispose=!0,this.isOverlay=!1)},closeDisposes:function(t){this.isDispose=t},back:function(){this.$emit("cloneAlert",!1)},getProblemInfoById:function(){var t=this;Object(s["f"])({problemInfoId:this.id}).then((function(e){var i=e.data;if(console.log(i.data),t.list=i.data,i.data.videoCode){t.isAudio=!0;var o=i.data.videoCode.split(","),a=[];t.videoLists=[],o.forEach((function(t){a.push(Object(s["b"])(t))})),Promise.all(a).then((function(e){console.log(e),e.forEach((function(e,i){t.videoLists.push({videoCode:e.data.msg,player:!1,audioNum:null,isRed:!1}),t.$refs["audioss".concat(t.videoLists.length-1)][0].load(),t.countAudioTime(i)}))}))}if(t.imgList=[],i.data.problemInfoDetailsList&&i.data.problemInfoDetailsList.length){var n=[];i.data.problemInfoDetailsList.forEach((function(t){n.push(Object(s["b"])(t.pictureUrl))})),Promise.all(n).then((function(e){e.forEach((function(e){t.imgList.push(e.data.data)}))}))}}))},play:function(t){var e=this,i=1*this.videoLists[t].audioNum;this.videoLists[t].player?(this.videoLists[t].player=!1,this.videoLists[t].audioNum=i,clearInterval(this.time)):(this.$refs["audios".concat(t)][0].play(),this.videoLists[t].player=!0,this.videoLists[t].audioNum-=1,this.time=setInterval((function(){e.videoLists[t].audioNum-=1}),1e3),this.videoLists[t].isRed=!1,this.videoLists[t].player=!0,setTimeout((function(){e.videoLists[t].player=!1,e.videoLists[t].audioNum=i,clearInterval(time)}),1e3*this.videoLists[t].audioNum))},countAudioTime:function(t){var e=this;return Object(l["a"])(regeneratorRuntime.mark((function i(){var o;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:o=e.$refs["audios1".concat(t)][0];case 1:if(!isNaN(o.duration)&&o.duration!==1/0){i.next=7;break}return i.next=4,new Promise((function(t){return setTimeout(t,200)}));case 4:o.currentTime=1e7*Math.random(),i.next=1;break;case 7:console.log("音频的总时长:",o.duration),e.videoLists[t].audioNum=Math.ceil(o.duration);case 9:case"end":return i.stop()}}),i)})))()}}},k=R,I=(i("6298"),Object(w["a"])(k,r,c,!1,null,"0c02e00e",null)),P=I.exports,S={name:"VueCli4VantProblem",data:function(){return{active:"1",tabsNum:0,list:[],isLoading:!1,loading:!1,bubble:{},isParticulars:!1,id:""}},components:{Particulars:P},mounted:function(){this.getProblemInformationList(),this.getProblemInfoCheckCount()},methods:{cloneAlert:function(t){this.isParticulars=t},getProblemInfoCheckCount:function(){var t=this;Object(s["g"])({userName:"lixl53"}).then((function(e){var i=e.data;t.bubble=i}))},itemAbnormal:function(t){this.id=t.id,this.isParticulars=!0},onRefresh:function(){var t=this;3===this.tabsNum?Object(s["h"])({type:this.active,userName:"lixl53"}).then((function(e){var i=e.data;console.log(i.data),0===i.code?(t.list=i.data,t.isLoading=!1,Object(n["a"])("刷新成功")):t.$notify({type:"danger",message:i.msg})})).catch((function(){t.$notify({type:"danger",message:"出错了,请稍后重试"})})):Object(s["i"])({state:this.tabsNum,type:this.active,userName:"lixl53"}).then((function(e){var i=e.data;console.log(i.data),0===i.code?(t.list=i.data,t.isLoading=!1,Object(n["a"])("刷新成功")):(t.isLoading=!1,Object(n["a"])("".concat(i.msg)))}))},tabs:function(t){console.log(t.target.innerHTML),"未处理"===t.target.innerHTML?(this.tabsNum=0,this.getProblemInformationList()):"已临时整改"===t.target.innerHTML?(this.tabsNum=2,this.getProblemInformationList()):(this.tabsNum=3,this.getProblemInfoCheckList())},getProblemInformationList:function(){var t=this,e=setTimeout((function(){t.loading=!0}),500);Object(s["i"])({state:this.tabsNum,type:this.active,userName:"lixl53"}).then((function(i){var o=i.data;console.log(o.data),clearTimeout(e),0===o.code?(t.list=o.data,t.loading=!1):t.$notify({type:"danger",message:o.msg})})).catch((function(){t.loading=!1,clearTimeout(e),t.$notify({type:"danger",message:"出错了,请稍后重试"})}))},getProblemInfoCheckList:function(){var t=this,e=setTimeout((function(){t.loading=!0}),500);Object(s["h"])({type:this.active,userName:"lixl53"}).then((function(i){var o=i.data;console.log(o.data),0===o.code?(t.list=o.data,clearTimeout(e),t.loading=!1):t.$notify({type:"danger",message:o.msg})})).catch((function(){t.loading=!1,clearTimeout(e),t.$notify({type:"danger",message:"出错了,请稍后重试"})}))},tabTob:function(t){this.active=t,0===this.tabsNum||2===this.tabsNum?this.getProblemInformationList():this.getProblemInfoCheckList()}}},D=S,N=(i("7caa"),Object(w["a"])(D,o,a,!1,null,"6bc0c94e",null));e["default"]=N.exports},"4b7f":function(t,e,i){t.exports=i.p+"assets/img/3.1.f977e76c.jpg"},6298:function(t,e,i){"use strict";var o=i("fd5b"),a=i.n(o);a.a},"7caa":function(t,e,i){"use strict";var o=i("ad75"),a=i.n(o);a.a},"81e5":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIUAAACQCAIAAACpoz9DAAAACXBIWXMAAC4jAAAuIwF4pT92AAAGb2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIiB4bWxuczpwaG90b3Nob3A9Imh0dHA6Ly9ucy5hZG9iZS5jb20vcGhvdG9zaG9wLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDIzLTA0LTA0VDA5OjI1OjA4KzA4OjAwIiB4bXA6TWV0YWRhdGFEYXRlPSIy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1b5359NB9/9V3rXs4HTP0K4fDbl5J6YzS+tWHUtJqZbRanwK6a+Dp6enoMlT+zx9dORRI9VEW1UdZVB9lUX2URfVRFtVHWVQfZVF9lEX1URbVR1lUH2XxPyDi8Z1vqkrBAAAAAElFTkSuQmCC"},"88a0":function(t,e,i){},"99af":function(t,e,i){"use strict";var o=i("23e7"),a=i("d039"),n=i("e8b5"),s=i("861d"),r=i("7b0b"),c=i("50c4"),l=i("8418"),u=i("65f0"),d=i("1dde"),p=i("b622"),h=i("2d00"),m=p("isConcatSpreadable"),f=9007199254740991,v="Maximum allowed index exceeded",g=h>=51||!a((function(){var t=[];return t[m]=!1,t.concat()[0]!==t})),b=d("concat"),y=function(t){if(!s(t))return!1;var e=t[m];return void 0!==e?!!e:n(t)},w=!g||!b;o({target:"Array",proto:!0,forced:w},{concat:function(t){var e,i,o,a,n,s=r(this),d=u(s,0),p=0;for(e=-1,o=arguments.length;e<o;e++)if(n=-1===e?s:arguments[e],y(n)){if(a=c(n.length),p+a>f)throw TypeError(v);for(i=0;i<a;i++,p++)i in n&&l(d,p,n[i])}else{if(p>=f)throw TypeError(v);l(d,p++,n)}return d.length=p,d}})},ad75:function(t,e,i){},ad9a:function(t,e,i){
  2. /*!
  3. *
  4. * js-audio-recorder - js audio recorder plugin
  5. *
  6. * @version v1.0.7
  7. * @homepage https://github.com/2fps/recorder
  8. * @author 2fps <echoweb@126.com> (https://www.zhuyuntao.cn)
  9. * @license MIT
  10. *
  11. */
  12. !function(e,i){t.exports=i()}(0,(function(){return function(t){var e={};function i(o){if(e[o])return e[o].exports;var a=e[o]={i:o,l:!1,exports:{}};return t[o].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=t,i.c=e,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)i.d(o,a,function(e){return t[e]}.bind(null,a));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1)}([function(t,e,i){"use strict";function o(t,e,i){for(var o=0;o<i.length;o++)t.setUint8(e+o,i.charCodeAt(o))}Object.defineProperty(e,"__esModule",{value:!0}),e.compress=function(t,e,i){for(var o=e/i,a=Math.max(o,1),n=t.left,s=t.right,r=Math.floor((n.length+s.length)/o),c=new Float32Array(r),l=0,u=0;l<r;){var d=Math.floor(u);c[l]=n[d],l++,s.length&&(c[l]=s[d],l++),u+=a}return c},e.encodePCM=function(t,e,i){void 0===i&&(i=!0);var o=0,a=t.length*(e/8),n=new ArrayBuffer(a),s=new DataView(n);if(8===e)for(var r=0;r<t.length;r++,o++){var c=(l=Math.max(-1,Math.min(1,t[r])))<0?128*l:127*l;c=+c+128,s.setInt8(o,c)}else for(r=0;r<t.length;r++,o+=2){var l=Math.max(-1,Math.min(1,t[r]));s.setInt16(o,l<0?32768*l:32767*l,i)}return s},e.encodeWAV=function(t,e,i,a,n,s){void 0===s&&(s=!0);var r=i>e?e:i,c=n,l=new ArrayBuffer(44+t.byteLength),u=new DataView(l),d=a,p=0;o(u,p,"RIFF"),p+=4,u.setUint32(p,36+t.byteLength,s),o(u,p+=4,"WAVE"),o(u,p+=4,"fmt "),p+=4,u.setUint32(p,16,s),p+=4,u.setUint16(p,1,s),p+=2,u.setUint16(p,d,s),p+=2,u.setUint32(p,r,s),p+=4,u.setUint32(p,d*r*(c/8),s),p+=4,u.setUint16(p,d*(c/8),s),p+=2,u.setUint16(p,c,s),o(u,p+=2,"data"),p+=4,u.setUint32(p,t.byteLength,s),p+=4;for(var h=0;h<t.byteLength;)u.setUint8(p,t.getUint8(h)),p++,h++;return u}},function(t,e,i){"use strict";var o,a=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0});var n=i(2),s=i(0),r=i(3),c=function(t){function e(e){void 0===e&&(e={});var i=t.call(this,e)||this;return i.isrecording=!1,i.ispause=!1,i.isplaying=!1,i}return a(e,t),e.prototype.setOption=function(t){void 0===t&&(t={}),this.setNewOption(t)},e.prototype.start=function(){return this.isrecording?Promise.reject():(this.isrecording=!0,this.startRecord())},e.prototype.pause=function(){this.isrecording&&!this.ispause&&(this.ispause=!0,this.pauseRecord())},e.prototype.resume=function(){this.isrecording&&this.ispause&&(this.ispause=!1,this.resumeRecord())},e.prototype.stop=function(){this.isrecording&&(this.isrecording=!1,this.ispause=!1,this.stopRecord())},e.prototype.play=function(){this.stop(),this.isplaying=!0,this.onplay&&this.onplay(),r.default.addPlayEnd(this.onplayend);var t=this.getWAV();t.byteLength>44&&r.default.play(t.buffer)},e.prototype.getPlayTime=function(){return r.default.getPlayTime()},e.prototype.pausePlay=function(){!this.isrecording&&this.isplaying&&(this.isplaying=!1,this.onpauseplay&&this.onpauseplay(),r.default.pausePlay())},e.prototype.resumePlay=function(){this.isrecording||this.isplaying||(this.isplaying=!0,this.onresumeplay&&this.onresumeplay(),r.default.resumePlay())},e.prototype.stopPlay=function(){this.isrecording||(this.isplaying=!1,this.onstopplay&&this.onstopplay(),r.default.stopPlay())},e.prototype.destroy=function(){return r.default.destroyPlay(),this.destroyRecord()},e.prototype.getRecordAnalyseData=function(){return this.getAnalyseData()},e.prototype.getPlayAnalyseData=function(){return r.default.getAnalyseData()},e.prototype.getPCM=function(){this.stop();var t=this.getData();return t=s.compress(t,this.inputSampleRate,this.outputSampleRate),s.encodePCM(t,this.oututSampleBits,this.littleEdian)},e.prototype.getPCMBlob=function(){return new Blob([this.getPCM()])},e.prototype.downloadPCM=function(t){void 0===t&&(t="recorder");var e=this.getPCMBlob();n.downloadPCM(e,t)},e.prototype.getWAV=function(){var t=this.getPCM();return s.encodeWAV(t,this.inputSampleRate,this.outputSampleRate,this.config.numChannels,this.oututSampleBits,this.littleEdian)},e.prototype.getWAVBlob=function(){return new Blob([this.getWAV()],{type:"audio/wav"})},e.prototype.downloadWAV=function(t){void 0===t&&(t="recorder");var e=this.getWAVBlob();n.downloadWAV(e,t)},e.prototype.download=function(t,e,i){n.download(t,e,i)},e.prototype.getChannelData=function(){var t=this.getPCM(),e=t.byteLength,i=this.littleEdian,o={left:null,right:null};if(2===this.config.numChannels){var a=new DataView(new ArrayBuffer(e/2)),n=new DataView(new ArrayBuffer(e/2));if(16===this.config.sampleBits)for(var s=0;s<e/2;s+=2)a.setInt16(s,t.getInt16(2*s,i),i),n.setInt16(s,t.getInt16(2*s+2,i),i);else for(s=0;s<e/2;s+=2)a.setInt8(s,t.getInt8(2*s)),n.setInt8(s,t.getInt8(2*s+1));o.left=a,o.right=n}else o.left=t;return o},e}(i(5).default);e.default=c},function(t,e,i){"use strict";function o(t,e,i){var o=document.createElement("a");o.href=window.URL.createObjectURL(t),o.download=e+"."+i,o.click()}Object.defineProperty(e,"__esModule",{value:!0}),e.downloadWAV=function(t,e){void 0===e&&(e="recorder"),o(t,e,"wav")},e.downloadPCM=function(t,e){void 0===e&&(e="recorder"),o(t,e,"pcm")},e.download=function(t,e,i){return o(t,e,i)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=i(4),a=null,n=0,s=0,r=null,c=null,l=null,u=!1,d=0,p=function(){};function h(){return u=!1,r.decodeAudioData(l.slice(0),(function(t){(a=r.createBufferSource()).onended=function(){u||(d=r.currentTime-s+n,p())},a.buffer=t,a.connect(c),c.connect(r.destination),a.start(0,n),s=r.currentTime}),(function(t){o.throwError(t)}))}function m(){a&&(a.stop(),a=null)}var f=function(){function t(){}return t.play=function(t){return r||(r=new(window.AudioContext||window.webkitAudioContext),(c=r.createAnalyser()).fftSize=2048),this.stopPlay(),l=t,d=0,h()},t.pausePlay=function(){m(),n+=r.currentTime-s,u=!0},t.resumePlay=function(){return h()},t.stopPlay=function(){n=0,l=null,m()},t.destroyPlay=function(){this.stopPlay()},t.getAnalyseData=function(){var t=new Uint8Array(c.frequencyBinCount);return c.getByteTimeDomainData(t),t},t.addPlayEnd=function(t){void 0===t&&(t=function(){}),p=t},t.getPlayTime=function(){var t=u?n:r.currentTime-s+n;return d||t},t}();e.default=f},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.throwError=function(t){throw new Error(t)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=i(0),a=function(){function t(e){void 0===e&&(e={}),this.size=0,this.lBuffer=[],this.rBuffer=[],this.tempPCM=[],this.inputSampleBits=16,this.fileSize=0,this.duration=0,this.needRecord=!0;var i,o=new(window.AudioContext||window.webkitAudioContext);this.inputSampleRate=o.sampleRate,this.setNewOption(e),this.littleEdian=(i=new ArrayBuffer(2),new DataView(i).setInt16(0,256,!0),256===new Int16Array(i)[0]),t.initUserMedia()}return t.prototype.setNewOption=function(t){void 0===t&&(t={}),this.config={sampleBits:~[8,16].indexOf(t.sampleBits)?t.sampleBits:16,sampleRate:~[8e3,11025,16e3,22050,24e3,44100,48e3].indexOf(t.sampleRate)?t.sampleRate:this.inputSampleRate,numChannels:~[1,2].indexOf(t.numChannels)?t.numChannels:1},this.outputSampleRate=this.config.sampleRate,this.oututSampleBits=this.config.sampleBits},t.prototype.startRecord=function(){var t=this;return this.context&&this.destroyRecord(),this.initRecorder(),navigator.mediaDevices.getUserMedia({audio:!0}).then((function(e){t.audioInput=t.context.createMediaStreamSource(e),t.stream=e})).then((function(){t.audioInput.connect(t.analyser),t.analyser.connect(t.recorder),t.recorder.connect(t.context.destination)}))},t.prototype.pauseRecord=function(){this.needRecord=!1},t.prototype.resumeRecord=function(){this.needRecord=!0},t.prototype.stopRecord=function(){this.audioInput&&this.audioInput.disconnect(),this.source&&this.source.stop(),this.recorder.disconnect(),this.analyser.disconnect(),this.needRecord=!0},t.prototype.destroyRecord=function(){return this.clearRecordStatus(),this.stopStream(),this.closeAudioContext()},t.prototype.getAnalyseData=function(){var t=new Uint8Array(this.analyser.frequencyBinCount);return this.analyser.getByteTimeDomainData(t),t},t.prototype.getData=function(){return this.flat()},t.prototype.clearRecordStatus=function(){this.lBuffer.length=0,this.rBuffer.length=0,this.size=0,this.fileSize=0,this.PCM=null,this.audioInput=null,this.duration=0},t.prototype.flat=function(){var t=null,e=new Float32Array(0);1===this.config.numChannels?t=new Float32Array(this.size):(t=new Float32Array(this.size/2),e=new Float32Array(this.size/2));for(var i=0,o=0;o<this.lBuffer.length;o++)t.set(this.lBuffer[o],i),i+=this.lBuffer[o].length;for(i=0,o=0;o<this.rBuffer.length;o++)e.set(this.rBuffer[o],i),i+=this.rBuffer[o].length;return{left:t,right:e}},t.prototype.initRecorder=function(){var t=this;this.clearRecordStatus(),this.context=new(window.AudioContext||window.webkitAudioContext),this.analyser=this.context.createAnalyser(),this.analyser.fftSize=2048;var e=this.context.createScriptProcessor||this.context.createJavaScriptNode;this.recorder=e.apply(this.context,[4096,this.config.numChannels,this.config.numChannels]),this.recorder.onaudioprocess=function(e){if(t.needRecord){var i,o=e.inputBuffer.getChannelData(0),a=null;t.lBuffer.push(new Float32Array(o)),t.size+=o.length,2===t.config.numChannels&&(a=e.inputBuffer.getChannelData(1),t.rBuffer.push(new Float32Array(a)),t.size+=a.length),t.fileSize=Math.floor(t.size/Math.max(t.inputSampleRate/t.outputSampleRate,1))*(t.oututSampleBits/8),i=100*Math.max.apply(Math,o),t.duration+=4096/t.inputSampleRate,t.onprocess&&t.onprocess(t.duration),t.onprogress&&t.onprogress({duration:t.duration,fileSize:t.fileSize,vol:i})}}},t.prototype.stopStream=function(){this.stream&&this.stream.getTracks&&(this.stream.getTracks().forEach((function(t){return t.stop()})),this.stream=null)},t.prototype.closeAudioContext=function(){return this.context&&this.context.close&&"closed"!==this.context.state?this.context.close():new Promise((function(t){t()}))},t.initUserMedia=function(){void 0===navigator.mediaDevices&&(navigator.mediaDevices={}),void 0===navigator.mediaDevices.getUserMedia&&(navigator.mediaDevices.getUserMedia=function(t){var e=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia;return e?new Promise((function(i,o){e.call(navigator,t,i,o)})):Promise.reject(new Error("浏览器不支持 getUserMedia !"))})},t.prototype.transformIntoPCM=function(t,e){var i=new Float32Array(t),a=new Float32Array(e),n=o.compress({left:i,right:a},this.inputSampleRate,this.outputSampleRate);return o.encodePCM(n,this.oututSampleBits,this.littleEdian)},t.getPermission=function(){return this.initUserMedia(),navigator.mediaDevices.getUserMedia({audio:!0}).then((function(t){t&&t.getTracks().forEach((function(t){return t.stop()}))}))},t}();e.default=a}]).default}))},c1c5:function(t,e,i){t.exports=i.p+"assets/img/1.bf83e05b.png"},da43:function(t,e,i){t.exports=i("ad9a")},fd5b:function(t,e,i){}}]);