FastBee/docker/data/nginx/vue/static/js/chunk-060d1c1b.84408b9d.js
2025-07-07 09:21:15 +08:00

1 line
23 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-060d1c1b","chunk-1b800f4b","chunk-245772a2"],{"369d":function(e,t,r){},"5a6f":function(e,t,r){"use strict";r.d(t,"e",(function(){return i})),r.d(t,"d",(function(){return o})),r.d(t,"a",(function(){return n})),r.d(t,"f",(function(){return s})),r.d(t,"c",(function(){return l})),r.d(t,"b",(function(){return m}));var a=r("b775");function i(e){return Object(a["a"])({url:"/sip/mediaserver/list",method:"get",params:e})}function o(){return Object(a["a"])({url:"/sip/mediaserver/",method:"get"})}function n(e){return Object(a["a"])({url:"/sip/mediaserver",method:"post",data:e})}function s(e){return Object(a["a"])({url:"/sip/mediaserver",method:"put",data:e})}function l(e){return Object(a["a"])({url:"/sip/mediaserver/"+e,method:"delete"})}function m(e){return Object(a["a"])({url:"/sip/mediaserver/check",method:"get",params:e})}},7837:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoging,expression:"isLoging"}],attrs:{id:"mediaServerEdit"}},[r("el-dialog",{attrs:{title:"流媒体服务器节点",width:e.dialogWidth,top:"2rem","close-on-click-modal":!1,visible:e.showDialog,"destroy-on-close":!0},on:{"update:visible":function(t){e.showDialog=t},close:function(t){return e.close()}}},[r("div",{staticStyle:{"margin-top":"1rem","margin-right":"20px"},attrs:{id:"formStep"}},[1==e.currentStep?r("el-form",{ref:"mediaServerForm",staticStyle:{width:"70%"},attrs:{rules:e.rules,model:e.mediaServerForm,"label-width":"280px"}},[r("el-form-item",{attrs:{label:"所属租户",prop:"productName"}},[r("el-input",{attrs:{readonly:"",placeholder:"请选择所属租户"},model:{value:e.mediaServerForm.tenantName,callback:function(t){e.$set(e.mediaServerForm,"tenantName",t)},expression:"mediaServerForm.tenantName"}},[r("el-button",{attrs:{slot:"append"},on:{click:function(t){return e.selectUser()}},slot:"append"},[e._v("选择")])],1)],1),r("el-form-item",{attrs:{label:"服务器IP",prop:"ip"}},[r("el-input",{attrs:{placeholder:"媒体服务IP",clearable:""},model:{value:e.mediaServerForm.ip,callback:function(t){e.$set(e.mediaServerForm,"ip",t)},expression:"mediaServerForm.ip"}})],1),r("el-form-item",{attrs:{label:"Http端口",prop:"portHttp"}},[r("el-input",{attrs:{placeholder:"媒体服务HTTP端口",clearable:""},model:{value:e.mediaServerForm.portHttp,callback:function(t){e.$set(e.mediaServerForm,"portHttp",t)},expression:"mediaServerForm.portHttp"}})],1),r("el-form-item",{attrs:{label:"服务密钥",prop:"secret"}},[r("el-input",{attrs:{placeholder:"媒体服务SECRET",clearable:""},model:{value:e.mediaServerForm.secret,callback:function(t){e.$set(e.mediaServerForm,"secret",t)},expression:"mediaServerForm.secret"}})],1),r("el-form-item",[r("div",{staticStyle:{float:"right","font-size":"28px"}},[r("el-button",{on:{click:e.close}},[e._v("取消")]),r("el-button",{attrs:{type:"success",loading:e.btnLoading},on:{click:e.checkServer}},[e._v("测试")]),1===e.currentStep&&1===e.serverCheck?r("el-button",{attrs:{type:"primary"},on:{click:e.next}},[e._v("下一步")]):e._e()],1)])],1):e._e(),r("el-row",{attrs:{gutter:24}},[r("el-col",{attrs:{span:12}},[2===e.currentStep||3===e.currentStep?r("el-form",{ref:"mediaServerForm1",attrs:{rules:e.rules,model:e.mediaServerForm,"label-width":"140px"}},[r("el-form-item",{attrs:{label:"配置名称",prop:"serverId"}},[r("el-input",{attrs:{placeholder:"配置名称",clearable:""},model:{value:e.mediaServerForm.serverId,callback:function(t){e.$set(e.mediaServerForm,"serverId",t)},expression:"mediaServerForm.serverId"}})],1),r("el-form-item",{attrs:{label:"服务器IP",prop:"ip"}},[2===e.currentStep?r("el-input",{attrs:{disabled:""},model:{value:e.mediaServerForm.ip,callback:function(t){e.$set(e.mediaServerForm,"ip",t)},expression:"mediaServerForm.ip"}}):e._e(),3===e.currentStep?r("el-input",{model:{value:e.mediaServerForm.ip,callback:function(t){e.$set(e.mediaServerForm,"ip",t)},expression:"mediaServerForm.ip"}}):e._e()],1),r("el-form-item",{attrs:{label:"Http端口",prop:"portHttp"}},[2===e.currentStep?r("el-input",{attrs:{disabled:""},model:{value:e.mediaServerForm.portHttp,callback:function(t){e.$set(e.mediaServerForm,"portHttp",t)},expression:"mediaServerForm.portHttp"}}):e._e(),3===e.currentStep?r("el-input",{model:{value:e.mediaServerForm.portHttp,callback:function(t){e.$set(e.mediaServerForm,"portHttp",t)},expression:"mediaServerForm.portHttp"}}):e._e()],1),r("el-form-item",{attrs:{label:"HookUrl",prop:"hookurl"}},[r("el-input",{attrs:{placeholder:"HookUrl",clearable:""},model:{value:e.mediaServerForm.hookurl,callback:function(t){e.$set(e.mediaServerForm,"hookurl",t)},expression:"mediaServerForm.hookurl"}})],1),r("el-form-item",{attrs:{label:"Https端口",prop:"portHttps"}},[r("el-input",{attrs:{placeholder:"Https端口",clearable:""},model:{value:e.mediaServerForm.portHttps,callback:function(t){e.$set(e.mediaServerForm,"portHttps",t)},expression:"mediaServerForm.portHttps"}})],1),r("el-form-item",{attrs:{label:"Rtsp端口",prop:"portRtsp"}},[r("el-input",{attrs:{placeholder:"Rtsp端口",clearable:""},model:{value:e.mediaServerForm.portRtsp,callback:function(t){e.$set(e.mediaServerForm,"portRtsp",t)},expression:"mediaServerForm.portRtsp"}})],1),r("el-form-item",{attrs:{label:"播放协议",prop:"protocol"}},[r("el-select",{staticStyle:{width:"100%"},model:{value:e.mediaServerForm.protocol,callback:function(t){e.$set(e.mediaServerForm,"protocol",t)},expression:"mediaServerForm.protocol"}},[r("el-option",{key:"http",attrs:{label:"http",value:"http"}}),r("el-option",{key:"https",attrs:{label:"https",value:"https"}}),r("el-option",{key:"ws",attrs:{label:"ws",value:"ws"}}),r("el-option",{key:"rtmp",attrs:{label:"rtmp",value:"rtmp"}}),r("el-option",{key:"rtsp",attrs:{label:"rtsp",value:"rtsp"}})],1)],1)],1):e._e()],1),r("el-col",{attrs:{span:12}},[2===e.currentStep||3===e.currentStep?r("el-form",{ref:"mediaServerForm2",attrs:{rules:e.rules,model:e.mediaServerForm,"label-width":"180px"}},[r("el-form-item",{attrs:{label:"Rtmp端口",prop:"portRtmp"}},[r("el-input",{attrs:{placeholder:"Rtmp端口",clearable:""},model:{value:e.mediaServerForm.portRtmp,callback:function(t){e.$set(e.mediaServerForm,"portRtmp",t)},expression:"mediaServerForm.portRtmp"}})],1),r("el-form-item",{attrs:{label:"流媒体密钥",prop:"secret"}},[2===e.currentStep?r("el-input",{attrs:{disabled:""},model:{value:e.mediaServerForm.secret,callback:function(t){e.$set(e.mediaServerForm,"secret",t)},expression:"mediaServerForm.secret"}}):e._e(),3===e.currentStep?r("el-input",{model:{value:e.mediaServerForm.secret,callback:function(t){e.$set(e.mediaServerForm,"secret",t)},expression:"mediaServerForm.secret"}}):e._e()],1),r("el-form-item",{attrs:{label:"自动配置"}},[r("el-switch",{model:{value:e.mediaServerForm.autoConfig,callback:function(t){e.$set(e.mediaServerForm,"autoConfig",t)},expression:"mediaServerForm.autoConfig"}})],1),r("el-form-item",{attrs:{label:"收流模式"}},[r("el-switch",{attrs:{"active-text":"多端口","inactive-text":"单端口"},on:{change:e.portRangeChange},model:{value:e.mediaServerForm.rtpEnable,callback:function(t){e.$set(e.mediaServerForm,"rtpEnable",t)},expression:"mediaServerForm.rtpEnable"}})],1),e.mediaServerForm.rtpEnable?e._e():r("el-form-item",{attrs:{label:"收流端口",prop:"rtpProxyPort"}},[r("el-input",{attrs:{clearable:""},model:{value:e.mediaServerForm.rtpProxyPort,callback:function(t){e.$set(e.mediaServerForm,"rtpProxyPort",e._n(t))},expression:"mediaServerForm.rtpProxyPort"}})],1),e.mediaServerForm.rtpEnable?r("el-form-item",{attrs:{label:"收流端口"}},[r("el-input",{staticStyle:{width:"100px"},attrs:{placeholder:"起始",clearable:"",prop:"rtpPortRange1"},on:{change:e.portRangeChange},model:{value:e.rtpPortRange1,callback:function(t){e.rtpPortRange1=t},expression:"rtpPortRange1"}}),r("el-input",{staticStyle:{width:"100px"},attrs:{placeholder:"终止",clearable:"",prop:"rtpPortRange2"},on:{change:e.portRangeChange},model:{value:e.rtpPortRange2,callback:function(t){e.rtpPortRange2=t},expression:"rtpPortRange2"}})],1):e._e(),r("el-form-item",{attrs:{label:"录像管理端口",prop:"recordPort"}},[r("el-input",{model:{value:e.mediaServerForm.recordPort,callback:function(t){e.$set(e.mediaServerForm,"recordPort",e._n(t))},expression:"mediaServerForm.recordPort"}},[e.mediaServerForm.recordPort>0?r("el-button",{staticClass:"el-icon-check",attrs:{slot:"append",type:"primary"},on:{click:e.checkRecordServer},slot:"append"}):e._e()],1),1==e.recordServerCheck?r("i",{staticClass:"el-icon-success",staticStyle:{color:"#3caf36",position:"absolute",top:"14px"}}):e._e(),2==e.recordServerCheck?r("i",{staticClass:"el-icon-loading",staticStyle:{color:"#3caf36",position:"absolute",top:"14px"}}):e._e(),-1===e.recordServerCheck?r("i",{staticClass:"el-icon-error",staticStyle:{color:"#c80000",position:"absolute",top:"14px"}}):e._e()],1),r("el-form-item",[r("div",{staticStyle:{float:"right"}},[r("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("提交")]),r("el-button",{on:{click:e.close}},[e._v("关闭")])],1)])],1):e._e()],1)],1)],1)]),r("user-list",{ref:"userList",on:{userEvent:function(t){return e.getUserData(t)}}})],1)},i=[],o=(r("ac1f"),r("00b4"),r("d9e2"),r("5a6f")),n=r("a64d"),s={name:"MediaServerEdit",components:{userList:n["default"]},props:{},computed:{},created:function(){this.setDialogWidth()},data:function(){var e=function(e,t,r){var a=/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/;return a.test(t)?(r(),!0):r(new Error("请输入有效的IP地址"))},t=function(e,t,r){var a=/^(([0-9]|[1-9]\d{1,3}|[1-5]\d{4}|6[0-5]{2}[0-3][0-5]))$/;return a.test(t)?(r(),!0):r(new Error("请输入有效的端口号"))};return{tempTenantId:"",tempTenantName:"",btnLoading:!1,dialogWidth:"",defaultWidth:1e3,listChangeCallback:null,showDialog:!1,isLoging:!1,dialogLoading:!1,currentStep:1,platformList:[],serverCheck:0,recordServerCheck:0,mediaServerForm:{serverId:"",ip:"",productId:"",productName:"",tenantId:"",tenantName:"",autoConfig:!0,hookurl:"",secret:"",portHttp:"",portHttps:"",recordPort:"",portRtmp:"",portRtsp:"",rtpEnable:!0,rtpPortRange:"",rtpProxyPort:""},rtpPortRange1:3e4,rtpPortRange2:30100,rules:{ip:[{required:!0,validator:e,message:"请输入有效的IP地址",trigger:"blur"}],portHttp:[{required:!0,validator:t,message:"请输入有效的端口号",trigger:"blur"}],portHttps:[{required:!0,validator:t,message:"请输入有效的端口号",trigger:"blur"}],recordPort:[{required:!0,validator:t,message:"请输入有效的端口号",trigger:"blur"}],portRtmp:[{required:!0,validator:t,message:"请输入有效的端口号",trigger:"blur"}],portRtsp:[{required:!0,validator:t,message:"请输入有效的端口号",trigger:"blur"}],rtpPortRange1:[{required:!0,validator:t,message:"请输入有效的端口号",trigger:"blur"}],rtpPortRange2:[{required:!0,validator:t,message:"请输入有效的端口号",trigger:"blur"}],rtpProxyPort:[{required:!0,validator:t,message:"请输入有效的端口号",trigger:"blur"}],secret:[{required:!0,message:"请输入secret",trigger:"blur"}]}}},methods:{setDialogWidth:function(){var e=document.body.clientWidth;e<this.defaultWidth?this.dialogWidth="100%":this.dialogWidth=this.defaultWidth+"px"},openDialog:function(e,t){if(this.showDialog=!0,this.listChangeCallback=t,null!=e&&(e.autoConfig=1===e.autoConfig,e.rtpEnable=1===e.rtpEnable,this.mediaServerForm=e,this.currentStep=3,e.rtpPortRange)){var r=this.mediaServerForm.rtpPortRange.split(",");r.length>0&&(this.rtpPortRange1=r[0],this.rtpPortRange2=r[1])}},checkServer:function(){var e=this;this.$refs.mediaServerForm.validate((function(t){if(t){e.btnLoading=!0,e.serverCheck=0;var r={ip:e.mediaServerForm.ip,port:e.mediaServerForm.portHttp,secret:e.mediaServerForm.secret};Object(o["b"])(r).then((function(t){if(e.btnLoading=!1,null!=t.data){var r=e.mediaServerForm.portHttp;e.mediaServerForm=t.data,e.mediaServerForm.portHttp=r,e.mediaServerForm.portHttps=8443,e.mediaServerForm.recordPort=18081,e.mediaServerForm.autoConfig=!0,e.mediaServerForm.rtpEnable=!0,e.mediaServerForm.protocol="http",e.mediaServerForm.enabled=1,e.mediaServerForm.tenantId=e.tempTenantId,e.mediaServerForm.tenantName=e.tempTenantName,e.mediaServerForm.serverId="fastbee",e.mediaServerForm.hookurl="java:8080",e.mediaServerForm.portRtmp="1935",e.mediaServerForm.portRtsp="554",e.mediaServerForm.rtpProxyPort="",e.rtpPortRange1=3e4,e.rtpPortRange2=30100,e.serverCheck=1,e.$modal.alertSuccess("配置地址连接成功")}else e.serverCheck=-1,e.$modal.alertError("配置地址无法连接")})).catch((function(t){e.serverCheck=-1,e.$message({showClose:!0,message:t,type:"error"})}))}}))},next:function(){this.currentStep=2,this.defaultWidth=900,this.setDialogWidth()},checkRecordServer:function(){var e=this;if(e.recordServerCheck=2,e.mediaServerForm.recordPort<=0||e.mediaServerForm.recordPort>65535)return e.recordServerCheck=-1,void e.$message({showClose:!0,message:"端口号应该在-65535之间",type:"error"})},onSubmit:function(){var e=this;this.dialogLoading=!0,this.mediaServerForm.rtpEnable=this.mediaServerForm.rtpEnable?1:0,this.mediaServerForm.autoConfig=this.mediaServerForm.autoConfig?1:0,null!=this.mediaServerForm.id?Object(o["f"])(this.mediaServerForm).then((function(t){e.$modal.msgSuccess("修改成功"),e.showDialog=!1})):(this.portRangeChange(),Object(o["a"])(this.mediaServerForm).then((function(t){e.$modal.msgSuccess("新增成功"),e.showDialog=!1}))),this.$parent.getServerList()},close:function(){this.showDialog=!1,this.dialogLoading=!1,this.mediaServerForm={serverId:"",ip:"",autoConfig:!0,hookurl:"",secret:"",portHttp:"",portHttps:"",recordPort:"",portRtmp:"",portRtsp:"",rtpEnable:!0,rtpPortRange:"",rtpProxyPort:""},this.rtpPortRange1=3e4,this.rtpPortRange2=30100,this.listChangeCallback=null,this.currentStep=1},portRangeChange:function(){this.mediaServerForm.rtpEnable&&(this.mediaServerForm.rtpPortRange=this.rtpPortRange1+","+this.rtpPortRange2,console.log(this.mediaServerForm.rtpPortRange))},selectUser:function(){this.$refs.userList.open=!0,this.$refs.userList.getList()},getUserData:function(e){this.tempTenantId=e.userId,this.tempTenantName=e.userName,this.mediaServerForm.tenantId=e.userId,this.mediaServerForm.tenantName=e.userName}}},l=s,m=r("2877"),c=Object(m["a"])(l,a,i,!1,null,null,null);t["default"]=c.exports},a61c:function(e,t,r){"use strict";r("369d")},a64d:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("el-dialog",{attrs:{title:"选择用户",visible:e.open,width:"800px"},on:{"update:visible":function(t){e.open=t}}},[r("div",{staticStyle:{"margin-top":"-50px"}},[r("el-divider")],1),r("el-form",{ref:"queryForm",attrs:{model:e.queryParams,rules:e.rules,inline:!0,"label-width":"80px"}},[r("el-form-item",{attrs:{label:"手机号码",prop:"phonenumber"}},[r("el-input",{staticStyle:{width:"240px"},attrs:{type:"text",placeholder:"请输入用户手机号码",minlength:"10",clearable:"",size:"small","show-word-limit":""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.phonenumber,callback:function(t){e.$set(e.queryParams,"phonenumber",t)},expression:"queryParams.phonenumber"}})],1),r("el-form-item",[r("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("查询")])],1)],1),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.userList,"highlight-current-row":"",size:"mini",border:""},on:{"current-change":e.handleCurrentChange}},[r("el-table-column",{attrs:{label:"选择",width:"50",align:"center"},scopedSlots:e._u([{key:"default",fn:function(e){return[r("input",{attrs:{type:"radio",name:"user"},domProps:{checked:e.row.isSelect}})]}}])}),r("el-table-column",{key:"userId",attrs:{label:"用户编号",align:"center",prop:"userId",width:"120"}}),r("el-table-column",{key:"userName",attrs:{label:"用户名称",align:"center",prop:"userName"}}),r("el-table-column",{key:"nickName",attrs:{label:"用户昵称",align:"center",prop:"nickName"}}),r("el-table-column",{key:"phonenumber",attrs:{label:"手机号码",align:"center",prop:"phonenumber",width:"120"}}),r("el-table-column",{attrs:{label:"创建时间",align:"center",prop:"createTime",width:"160"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(e.parseTime(t.row.createTime)))])]}}])})],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{attrs:{type:"primary"},on:{click:e.confirmSelectUser}},[e._v("确定")]),r("el-button",{on:{click:e.closeSelectUser}},[e._v("关 闭")])],1)],1)},i=[],o=r("bb86"),n={name:"user-list",props:{device:{type:Array,default:null}},watch:{device:function(e,t){this.deviceInfo=e}},data:function(){return{loading:!1,ids:[],title:"",userList:[],user:{},deviceInfo:{},open:!1,queryParams:{pageNum:1,pageSize:10,userName:void 0,phonenumber:void 0,status:0,deptId:void 0},rules:{phonenumber:[{required:!0,message:"手机号码不能为空",trigger:"blur"},{min:11,max:11,message:"手机号码长度为11位",trigger:"blur"}]}}},created:function(){},methods:{getList:function(){var e=this;this.loading=!0,Object(o["c"])(this.addDateRange(this.queryParams,this.dateRange)).then((function(t){e.userList=t.rows,e.total=t.total,e.loading=!1}))},handleQuery:function(){var e=this;this.$refs["queryForm"].validate((function(t){t&&(e.queryParams.pageNum=1,e.getList())}))},resetQuery:function(){this.$refs["queryForm"].resetFields(),this.userList=[]},setRadioSelected:function(e){for(var t=0;t<this.userList.length;t++)this.userList[t].userId==e?(this.userList[t].isSelect=!0,this.user=this.userList[t]):this.userList[t].isSelect=!1},handleCurrentChange:function(e){null!=e&&(this.setRadioSelected(e.userId),this.user=e)},confirmSelectUser:function(){this.$emit("userEvent",this.user),this.open=!1},closeSelectUser:function(){this.open=!1,this.resetQuery()}}},s=n,l=r("2877"),m=Object(l["a"])(s,a,i,!1,null,null,null);t["default"]=m.exports},bb86:function(e,t,r){"use strict";r.d(t,"d",(function(){return i})),r.d(t,"c",(function(){return o})),r.d(t,"b",(function(){return n})),r.d(t,"a",(function(){return s})),r.d(t,"e",(function(){return l}));var a=r("b775");r("bc3a"),r("5c96"),r("21a6"),r("5f87"),r("c38a");function i(e){return Object(a["a"])({url:"/iot/tool/register",headers:{isToken:!1},method:"post",data:e})}function o(e){return Object(a["a"])({url:"/iot/tool/userList",method:"get",params:e})}function n(e){return Object(a["a"])({url:"/iot/tool/getTopics",method:"get",params:e})}function s(e){return Object(a["a"])({url:"/iot/tool/decode",method:"get",params:e})}function l(e){return Object(a["a"])({url:"/iot/tool/simulate",method:"get",params:e})}},ded3:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{padding:"6px"},attrs:{id:"mediaServer"}},[a("el-card",{staticStyle:{"margin-bottom":"6px"}},[a("el-form",{ref:"queryForm",staticStyle:{"margin-bottom":"-20px"},attrs:{model:e.queryParams,inline:!0,"label-width":"75px"}},[a("el-form-item",[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:device:add"],expression:"['iot:device:add']"}],attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"mini"},on:{click:e.add}},[e._v("新增节点")])],1),a("el-form-item",[a("el-button",{attrs:{type:"warning",plain:"",icon:"el-icon-refresh",size:"mini"},on:{click:e.getServerList}},[e._v("刷新")])],1)],1)],1),a("el-card",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{"padding-bottom":"100px"}},[a("el-row",{attrs:{gutter:30}},e._l(e.mediaServerList,(function(t,i){return a("el-col",{key:i,staticStyle:{"margin-bottom":"30px","text-align":"center"},attrs:{xs:24,sm:12,md:12,lg:8,xl:6}},[a("el-card",{staticClass:"card-item",attrs:{shadow:"always"}},[a("el-row",{attrs:{gutter:10}},[a("el-col",{attrs:{span:15}},[a("el-descriptions",{staticStyle:{"white-space":"nowrap"},attrs:{column:1,size:"mini"}},[a("el-descriptions-item",{attrs:{label:"配置名称"}},[e._v(" "+e._s(t.serverId)+" ")]),a("el-descriptions-item",{attrs:{label:"服务器IP"}},[e._v(" "+e._s(t.ip)+" ")]),a("el-descriptions-item",{attrs:{label:"播放协议"}},[e._v(" "+e._s(t.protocol)+" ")]),a("el-descriptions-item",{attrs:{label:"创建时间"}},[e._v(" "+e._s(e.parseTime(t.createTime,"{y}-{m}-{d}"))+" ")])],1)],1),a("el-col",{attrs:{span:8}},[a("div",{staticStyle:{"margin-top":"10px"}},[a("el-image",{attrs:{src:r("e1e7"),fit:"fit"}})],1)])],1),a("el-button-group",{staticStyle:{"margin-top":"10px"}},[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:device:remove"],expression:"['iot:device:remove']"}],staticStyle:{padding:"5px 10px"},attrs:{type:"danger",size:"mini",icon:"el-icon-delete"},on:{click:function(r){return e.del(t)}}},[e._v("删除")]),a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:device:add"],expression:"['iot:device:add']"}],staticStyle:{padding:"5px 15px"},attrs:{type:"primary",size:"mini",icon:"el-icon-view"},on:{click:function(r){return e.edit(t)}}},[e._v("查看")]),a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["iot:device:edit"],expression:"['iot:device:edit']"}],staticStyle:{padding:"5px 15px"},attrs:{type:"success",size:"mini",icon:"el-icon-odometer"},on:{click:function(r){return e.edit(t)}}},[e._v("编辑")])],1)],1)],1)})),1),0==e.total?a("el-empty",{attrs:{description:"暂无数据,请添加流媒体服务器节点"}}):e._e(),a("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize,pageSizes:[12,24,36,60]},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:e.getServerList}})],1),a("mediaServerEdit",{ref:"mediaServerEdit"})],1)},i=[],o=r("7837"),n=r("5a6f"),s={name:"MediaServer",components:{mediaServerEdit:o["default"]},data:function(){return{loading:!0,mediaServerList:[],winHeight:window.innerHeight-200,updateLooper:!1,currentPage:1,count:15,num:this.getNumberByWidth(),total:0,queryParams:{pageNum:1,pageSize:10}}},computed:{},mounted:function(){this.initData()},destroyed:function(){clearTimeout(this.updateLooper)},methods:{initData:function(){this.getServerList()},pageNumChange:function(e){this.queryParams.pageNum=e,this.getServerList()},pageSizeChange:function(e){this.queryParams.pageSize=e,this.getServerList()},getServerList:function(){var e=this;this.loading=!0,Object(n["e"])(this.queryParams).then((function(t){e.mediaServerList=t.rows,e.total=t.total,e.loading=!1}))},add:function(){this.$refs.mediaServerEdit.openDialog(null,this.initData)},edit:function(e){this.$refs.mediaServerEdit.openDialog(e,this.initData)},del:function(e){var t=this,r=e.id||this.ids;this.$modal.confirm('是否确认删除流媒体服务器配置编号为"'+r+'"的数据项?').then((function(){Object(n["c"])(r)})).then((function(){t.getServerList(),t.$modal.msgSuccess("删除成功")})).catch((function(){}))},getNumberByWidth:function(){for(var e=[1,2,3,4,6,8,12,24],t=window.innerWidth-30,r=20,a=360,i=(t+r)/(a+r),o=Math.ceil(24/i),n=24,s=0;s<e.length;s++){var l=e[s];if(s+1>=e.length)return 24;if(l<=o&&e[s+1]>o)return l}return n}}},l=s,m=(r("a61c"),r("2877")),c=Object(m["a"])(l,a,i,!1,null,"cbb7b71a",null);t["default"]=c.exports},e1e7:function(e,t,r){e.exports=r.p+"static/img/zlm-logo.5f8bbf78.png"}}]);