Files
ba_web/ab/static/js/chunk-7dacda21.28754f1b.js
2026-01-13 22:17:31 +08:00

1 line
10 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7dacda21"],{"1bb4":function(e,t,l){},"2d4f":function(e,t,l){"use strict";l.r(t);var a=l("7a23"),o=l("2e9d"),c=l("3ef4"),r=l("b775");function n(e){return Object(r["a"])({url:"/mosty-api/mosty-base/minio/file/download/"+e,method:"get"})}const i={class:"dialog-header-content"},d={class:"dialog-title"},b={class:"dialog-header-actions"},s={class:"video-container"},u=["src"];var j={__name:"videoDisplay",props:{modelValue:{type:Boolean,default:!1},listQuery:{type:Object,default:()=>({})},videoTitle:{type:String,default:"测试"}},emits:["update:modelValue","close"],setup(e,{emit:t}){const l=e,o=Object(a["ref"])(null),r=Object(a["ref"])(null),j=Object(a["ref"])(null),O=Object(a["ref"])(!1),f=Object(a["ref"])(!1),v=Object(a["ref"])(""),m=Object(a["ref"])("60vh"),p=Object(a["ref"])(!1),g=(Object(a["ref"])(!0),Object(a["ref"])("")),h=()=>{var e;const t=(null===(e=JSON.parse(l.listQuery.fjid))||void 0===e?void 0:e.map(e=>e.id).join(","))||"";n(t).then(e=>{g.value=e.url})};Object(a["watch"])(()=>l.modelValue,e=>{e?h():V()});const C=()=>{p.value=!p.value,m.value=p.value?"89vh":"60vh"},y=()=>{try{j.value&&(f.value=!1,c["a"].info("视频已停止"))}catch(e){console.error("停止播放失败:",e),c["a"].error("停止播放失败")}},V=()=>{try{j.value&&(j.value=null,f.value=!1,O.value=!1,v.value="",console.log("播放器已销毁"))}catch(e){console.error("销毁播放器失败:",e)}},k=()=>{y(),t("update:modelValue",!1),t("close")},N=()=>{console.log("视频数据加载完成"),r.value&&r.value.play().then(()=>{console.log("视频播放成功"),f.value=!0}).catch(e=>{console.error("视频加载后自动播放失败:",e),c["a"].warning("视频需要点击播放按钮开始播放")})},x=e=>{console.error("视频加载错误:",e.target.error),v.value="视频加载失败: "+_(e.target.error.code),O.value=!1,c["a"].error("视频加载失败,请检查网络或视频链接")},w=()=>{console.warn("视频加载卡顿,尝试重新加载"),r.value&&r.value.load()},_=e=>{const t={1:"用户中止了获取过程",2:"网络错误导致获取过程失败",3:"解码过程出错",4:"媒体格式不支持",5:"其他未知错误"};return t[e]||"未知错误"};return Object(a["onBeforeUnmount"])(()=>{V()}),(t,l)=>{const c=Object(a["resolveComponent"])("FullScreen"),n=Object(a["resolveComponent"])("el-icon"),j=Object(a["resolveComponent"])("Close"),O=Object(a["resolveComponent"])("el-dialog");return Object(a["openBlock"])(),Object(a["createBlock"])(O,{modelValue:e.modelValue,"onUpdate:modelValue":l[0]||(l[0]=e=>Object(a["isRef"])(modelValue)?modelValue.value=e:null),width:"50%","show-close":!1,center:"",fullscreen:p.value},{title:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",i,[Object(a["createElementVNode"])("div",d,Object(a["toDisplayString"])(e.videoTitle),1),Object(a["createElementVNode"])("div",b,[Object(a["createVNode"])(n,{class:"header-icon",onClick:C},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c)]),_:1}),Object(a["createVNode"])(n,{class:"header-icon",onClick:k},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(j)]),_:1})])])]),default:Object(a["withCtx"])(()=>[Object(a["createElementVNode"])("div",s,[e.modelValue?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",{key:0,ref_key:"videoPlayerRef",ref:o,class:"video-player",style:Object(a["normalizeStyle"])({height:m.value})},[Object(a["createElementVNode"])("video",{ref_key:"videoRef",ref:r,class:"video-element",src:g.value,controls:"",autoplay:"",muted:"",playsinline:"",preload:"auto",onLoadeddata:N,onError:x,onStalled:w},null,40,u)],4)):Object(a["createCommentVNode"])("",!0)])]),_:1},8,["modelValue","fullscreen"])}}},O=(l("e8e6"),l("d959")),f=l.n(O);const v=f()(j,[["__scopeId","data-v-0b95ef2a"]]);var m=v,p=l("ad28"),g=l("1090"),h=l("2d16"),C=l("c5cb"),y=l("1d22");const V={key:0,class:"dialog"},k={class:"head_box"},N={class:"title"},x=Object(a["createTextVNode"])("保存"),w=Object(a["createTextVNode"])("关闭"),_={class:"cntinfo"};var B={__name:"detailForm",emits:["refresh"],setup(e,{expose:t,emit:l}){const{proxy:o}=Object(a["getCurrentInstance"])(),c=Object(a["ref"])(!1),r=Object(a["ref"])(""),n=Object(a["ref"])(),i=Object(a["ref"])(!1),d=Object(a["ref"])({}),b=Object(a["ref"])(""),s=Object(a["reactive"])({spbt:[{required:!0,message:"请输入视频标题",trigger:"blur"}],fjid:[{required:!0,message:"请上传视频附件",trigger:"blur"}]}),u=Object(a["reactive"])([[{label:"视频标题",prop:"spbt",type:"input"}],[{label:"附件",prop:"fjid",type:"upload",isImg:!1,showBtn:!0,limit:2,isAll:!0}]]),j=(e,t={})=>{c.value=!0,b.value=e,r.value="add"==e?"新增":"编辑",t&&O(t.id)},O=e=>{Object(C["b"])({},"/mosty-base/baxx/sok/getInfo/"+e).then(e=>{e.fjid=e.fjid?JSON.parse(e.fjid):[],d.value=e||{}})},f=()=>{n.value.submit(e=>{i.value=!0;let t="新增"==r.value?"/mosty-base/baxx/sok/add":"/mosty-base/baxx/sok/edit",a={...e};a.fjid=a.fjid?JSON.stringify(a.fjid):"",Object(C["b"])(a,t).then(()=>{i.value=!1,o.$message.success("保存成功"),l("refresh"),v()}).catch(()=>{i.value=!1})})},v=()=>{c.value=!1,d.value.fjid=[],n.value.reset()};return t({init:j}),(e,t)=>{const l=Object(a["resolveComponent"])("el-button");return c.value?(Object(a["openBlock"])(),Object(a["createElementBlock"])("div",V,[Object(a["createElementVNode"])("div",k,[Object(a["createElementVNode"])("span",N,"保安视频库"+Object(a["toDisplayString"])(r.value),1),Object(a["createElementVNode"])("div",null,["detail"!=b.value?(Object(a["openBlock"])(),Object(a["createBlock"])(l,{key:0,size:"small",onClick:f,type:"primary",loading:i.value},{default:Object(a["withCtx"])(()=>[x]),_:1},8,["loading"])):Object(a["createCommentVNode"])("",!0),Object(a["createVNode"])(l,{size:"small",onClick:v},{default:Object(a["withCtx"])(()=>[w]),_:1})])]),Object(a["createElementVNode"])("div",_,[Object(a["createVNode"])(y["a"],{ref_key:"FormRef",ref:n,modelValue:d.value,"onUpdate:modelValue":t[0]||(t[0]=e=>d.value=e),disabled:"detail"==b.value,rules:s,formList:u},null,8,["modelValue","disabled","rules","formList"])])])):Object(a["createCommentVNode"])("",!0)}}};l("711f");const E=f()(B,[["__scopeId","data-v-12d5a8fa"]]);var S=E;const T={class:"titleBox"},D=Object(a["createElementVNode"])("span",{style:{"vertical-align":"middle"}},"新增",-1),H={class:"tabBox"},z=Object(a["createTextVNode"])("编辑"),I=Object(a["createTextVNode"])("详情"),J=Object(a["createTextVNode"])("删除"),R=Object(a["createTextVNode"])("视频播放");var F={__name:"index",setup(e){const{proxy:t}=Object(a["getCurrentInstance"])(),l=Object(a["ref"])(!1),c=Object(a["ref"])(),r=Object(a["ref"])(),n=Object(a["ref"])([{label:"视频标题",prop:"spbt",placeholder:"请输入视频标题",showType:"input"}]),i=Object(a["ref"])({}),d=Object(a["reactive"])({tableData:[],keyCount:0,tableConfiger:{rowHieght:61,showSelectType:"null",loading:!1},total:0,pageConfiger:{pageSize:20,pageCurrent:1},controlsWidth:180,tableColumn:[{label:"视频标题",prop:"spbt"}]});Object(a["onMounted"])(()=>{j(),v()});const b=e=>{i.value={...e},d.pageConfiger.pageCurrent=1,j()},s=e=>{d.pageConfiger.pageNum=e,j()},u=e=>{d.pageConfiger.pageSize=e,j()},j=()=>{d.tableConfiger.loading=!0;let e={...d.pageConfiger,...i.value};Object(C["b"])(e,"/mosty-base/baxx/sok/page").then(e=>{d.tableData=e.records||[],d.total=e.total,d.tableConfiger.loading=!1}).catch(()=>{d.tableConfiger.loading=!1})},O=e=>{t.$modal.confirm("是否确认删除该视频?").then(()=>{Object(C["b"])(e,"/mosty-base/baxx/sok/remove").then(()=>{t.$modal.msgSuccess("删除成功"),j()})})},f=(e,t={})=>{Object(a["nextTick"])(()=>{c.value.init(e,t)})},v=()=>{d.tableHeight=window.innerHeight-r.value.offsetHeight-250,window.onresize=function(){v()}},y=Object(a["ref"])(),V=Object(a["ref"])(""),k=e=>{l.value=!0,y.value=e};return(e,t)=>{const i=Object(a["resolveComponent"])("CirclePlus"),v=Object(a["resolveComponent"])("el-icon"),C=Object(a["resolveComponent"])("el-button"),N=Object(a["resolveComponent"])("el-link");return Object(a["openBlock"])(),Object(a["createElementBlock"])(a["Fragment"],null,[Object(a["createElementVNode"])("div",null,[Object(a["createElementVNode"])("div",T,[Object(a["createVNode"])(o["a"],{title:"保安视频库"},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(C,{type:"primary",onClick:t[0]||(t[0]=e=>f("add",""))},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(v,{style:{"vertical-align":"middle"}},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(i)]),_:1}),D]),_:1})]),_:1})]),Object(a["createElementVNode"])("div",{ref_key:"searchBox",ref:r},[(Object(a["openBlock"])(),Object(a["createBlock"])(h["a"],{searchArr:n.value,onSubmit:b,key:d.keyCount},null,8,["searchArr"]))],512),Object(a["createElementVNode"])("div",H,[(Object(a["openBlock"])(),Object(a["createBlock"])(p["a"],{tableData:d.tableData,tableColumn:d.tableColumn,tableHeight:d.tableHeight,key:d.keyCount,tableConfiger:d.tableConfiger,controlsWidth:d.controlsWidth,onChooseData:e.chooseData},{controls:Object(a["withCtx"])(({row:e})=>[Object(a["createVNode"])(N,{type:"primary",link:"",onClick:t=>f("edit",e)},{default:Object(a["withCtx"])(()=>[z]),_:2},1032,["onClick"]),Object(a["createVNode"])(N,{type:"primary",link:"",onClick:t=>f("detail",e)},{default:Object(a["withCtx"])(()=>[I]),_:2},1032,["onClick"]),Object(a["createVNode"])(N,{type:"danger",link:"",onClick:t=>O([e.id])},{default:Object(a["withCtx"])(()=>[J]),_:2},1032,["onClick"]),Object(a["createVNode"])(N,{type:"primary",onClick:t=>k(e)},{default:Object(a["withCtx"])(()=>[R]),_:2},1032,["onClick"])]),_:1},8,["tableData","tableColumn","tableHeight","tableConfiger","controlsWidth","onChooseData"])),Object(a["createVNode"])(g["a"],{onChangeNo:s,onChangeSize:u,tableHeight:d.tableHeight,pageConfiger:{...d.pageConfiger,total:d.total}},null,8,["tableHeight","pageConfiger"])]),Object(a["createVNode"])(S,{ref_key:"detailDiloag",ref:c,onRefresh:j},null,512)]),Object(a["createVNode"])(m,{modelValue:l.value,"onUpdate:modelValue":t[1]||(t[1]=e=>l.value=e),videoTitle:V.value,listQuery:y.value},null,8,["modelValue","videoTitle","listQuery"])],64)}}};l("3746");const Q=F;t["default"]=Q},3746:function(e,t,l){"use strict";l("1bb4")},"711f":function(e,t,l){"use strict";l("d27c")},c061:function(e,t,l){},d27c:function(e,t,l){},e8e6:function(e,t,l){"use strict";l("c061")}}]);