import{d as x,O as N,k as g,p as P,o as c,x as f,u as t,b as e,a,z as i,c as R,t as U,B as w,A as v,G as V,H as q}from"./vue.1703796278973.js";import{I as A,r as F,aG as G,F as O,av as T,aw as $}from"./index.17037962789732.js";import"./index.170379627897319.js";import"./index.170379627897327.js";import"./index.170379627897318.js";import{_ as J}from"./index.vue_vue_type_script_setup_true_name_PermissionButton_lang.1703796278973.js";import"./index.170379627897314.js";import"./index.170379627897315.js";import{_ as L}from"./index.17037962789739.js";import{o as z}from"./comm.1703796278973.js";import D from"./GB28181.1703796278973.js";import{s as E,u as H}from"./accessConfig.1703796278973.js";import{_ as K}from"./_plugin-vue_export-helper.1703796278973.js";import"./index.17037962789733.js";import"./dayjs.min.1703796278973.js";import"./isArray.1703796278973.js";import"./editor.api.1703796278973.js";import"./preload-helper.1703796278973.js";import"./monaco.contribution.1703796278973.js";import"./index.170379627897320.js";import"./index.170379627897321.js";import"./permission.1703796278973.js";import"./index.1703796278973309.js";import"./index.170379627897325.js";import"./index.170379627897316.js";import"./index.170379627897317.js";import"./index.1703796278973301.js";import"./index.1703796278973316.js";import"./index.170379627897330.js";import"./default.1703796278973.js";import"./index.170379627897310.js";import"./index.17037962789737.js";import"./system.1703796278973.js";import"./index.170379627897332.js";import"./index.170379627897333.js";import"./index.170379627897334.js";import"./consts.1703796278973.js";import"./404.1703796278973.js";const b=o=>(V("data-v-caf1a79d"),o=o(),q(),o),Q={class:"container"},W={key:0,class:"card-last"},X={class:"doc"},Y=b(()=>i("h1",null,"接入方式",-1)),Z=b(()=>i("h1",null,"消息协议",-1)),ee={key:1},te=x({name:"AccessMedia"}),oe=x({...te,props:{provider:{type:Object,default:()=>{}},data:{type:Object,default:()=>{}}},setup(o){const r=o,l=N(),k=l.query.view,m=l.params.id,h=g(r.provider.channel),n=g({name:"",description:""}),j=async p=>{const s={...p,provider:"fixed-media",transport:"URL",channel:"fixed-media"},d=m===":id"?await E(s):await H({...s,id:m});d.status===200&&(z("操作成功","success"),l.query.save?(window==null||window.onTabSaveSuccess(d.result),setTimeout(()=>window.close(),300)):history.back())};return P(()=>{var p;m!==":id"&&(n.value={name:r.data.name,description:((p=r.data)==null?void 0:p.description)||""})}),(p,s)=>{const d=L,S=A,_=F,B=G,I=J,C=O,y=T,M=$;return c(),f("div",Q,[t(h)==="fixed-media"?(c(),f("div",W,[e(M,{gutter:[24,24]},{default:a(()=>[e(y,{span:12},{default:a(()=>[e(d,{data:"基本信息"}),i("div",null,[e(C,{model:t(n),name:"basic",autocomplete:"off",layout:"vertical",onFinish:j},{default:a(()=>[e(_,{label:"名称",name:"name",rules:[{required:!0,message:"请输入名称",trigger:"blur"},{max:64,message:"最多可输入64个字符",trigger:"blur"}]},{default:a(()=>[e(S,{placeholder:"请输入名称",value:t(n).name,"onUpdate:value":s[0]||(s[0]=u=>t(n).name=u)},null,8,["value"])]),_:1}),e(_,{label:"说明",name:"description"},{default:a(()=>[e(B,{placeholder:"请输入说明",rows:4,value:t(n).description,"onUpdate:value":s[1]||(s[1]=u=>t(n).description=u),"show-count":"",maxlength:200},null,8,["value"])]),_:1}),e(_,null,{default:a(()=>[t(k)==="false"?(c(),R(I,{key:0,type:"primary","html-type":"submit",hasPermission:`link/AccessConfig:${t(m)===":id"?"add":"update"}`},{default:a(()=>[U(" 保存 ")]),_:1},8,["hasPermission"])):w("",!0)]),_:1})]),_:1},8,["model"])])]),_:1}),e(y,{span:12},{default:a(()=>[i("div",X,[Y,i("p",null,v(o.provider.name),1),i("p",null,v(o.provider.description),1),Z,i("p",null,v(o.provider.id==="fixed-media"?"URL":"SIP"),1)])]),_:1})]),_:1})])):t(h)==="gb28181"?(c(),f("div",ee,[e(D,{provider:r.provider,data:r.data},null,8,["provider","data"])])):w("",!0)])}}});const $e=K(oe,[["__scopeId","data-v-caf1a79d"]]);export{$e as default};
