admin.assets.index-lG5X9PEY.js Maven / Gradle / Ivy
The newest version!
import{a as we,N as ue,b as ke}from"./search-form.vue_vue_type_script_setup_true_lang-Csk6aNWf.js";import{d as Ue,_ as De,a as Se}from"./download-rDh6m1OR.js";import{_ as xe}from"./delete-alert-CIZguut5.js";import{aW as Ae,aX as Ce,aY as Fe,aZ as Ie,a_ as Ve,a$ as Oe,b0 as ce,d as $,b1 as $e,b2 as Pe,b3 as ze,r as z,b4 as ye,b5 as Be,b6 as Me,a as q,b7 as je,al as W,Y as re,D as M,B as J,b8 as We,b9 as Je,H as ve,ba as Ee,ap as Le,bb as ne,z as E,A as K,p as H,q as j,o as x,c as I,w as i,f as a,h as e,$ as o,e as se,g as A,t as C,E as G,a8 as pe,I as Y,a4 as be,bc as qe,aa as ge,Z as X,a0 as Q,ab as _e,aw as Ke,av as He,bd as Ge,ac as Z,be as he,ai as oe,b as le,a1 as de,a3 as me,L as Ye,ag as Ze,ah as L,F as Xe,ak as Qe}from"./index-D2gfy4BV.js";import{g as et,h as tt,i as at,j as fe}from"./notify-DovcOwVY.js";import{_ as nt,u as ot,a as it}from"./table-CBd8wgyy.js";import{u as lt}from"./auth-DqDVYr_u.js";import{e as rt,b as st}from"./Grid-DUVCwFN_.js";import{_ as pt,a as ut}from"./DescriptionsItem-LCBYJ9Xx.js";import"./Progress-C54cQ0Ku.js";const ct=Ae({name:"DynamicTags",common:Ce,peers:{Input:Fe,Button:Ie,Tag:Ve,Space:Oe},self(){return{inputWidth:"64px"}}}),dt=ce("dynamic-tags",[ce("input",{minWidth:"var(--n-input-width)"})]),mt=Object.assign(Object.assign(Object.assign({},ye.props),Ee),{size:{type:String,default:"medium"},closable:{type:Boolean,default:!0},defaultValue:{type:Array,default:()=>[]},value:Array,inputClass:String,inputStyle:[String,Object],inputProps:Object,max:Number,tagClass:String,tagStyle:[String,Object],renderTag:Function,onCreate:{type:Function,default:c=>c},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onChange:[Function,Array]}),ee=$({name:"DynamicTags",props:mt,setup(c){const{mergedClsPrefixRef:k,inlineThemeDisabled:f}=$e(c),{localeRef:u}=Pe("DynamicTags"),b=ze(c),{mergedDisabledRef:d}=b,N=z(""),R=z(!1),y=z(!0),n=z(null),v=ye("DynamicTags","-dynamic-tags",dt,ct,c,k),w=z(c.defaultValue),U=Be(c,"value"),l=Me(U,w),t=q(()=>u.value.add),s=q(()=>rt(c.size)),r=q(()=>d.value||!!c.max&&l.value.length>=c.max);function g(S){const{onChange:T,"onUpdate:value":_,onUpdateValue:F}=c,{nTriggerFormInput:te,nTriggerFormChange:ae}=b;T&&ne(T,S),F&&ne(F,S),_&&ne(_,S),w.value=S,te(),ae()}function h(S){const T=l.value.slice(0);T.splice(S,1),g(T)}function p(S){switch(S.key){case"Enter":m()}}function m(S){const T=S??N.value;if(T){const _=l.value.slice(0);_.push(c.onCreate(T)),g(_)}R.value=!1,y.value=!0,N.value=""}function D(){m()}function P(){R.value=!0,Le(()=>{var S;(S=n.value)===null||S===void 0||S.focus(),y.value=!1})}const B=q(()=>{const{self:{inputWidth:S}}=v.value;return{"--n-input-width":S}}),O=f?je("dynamic-tags",void 0,B,c):void 0;return{mergedClsPrefix:k,inputInstRef:n,localizedAdd:t,inputSize:s,inputValue:N,showInput:R,inputForceFocused:y,mergedValue:l,mergedDisabled:d,triggerDisabled:r,handleInputKeyDown:p,handleAddClick:P,handleInputBlur:D,handleCloseClick:h,handleInputConfirm:m,mergedTheme:v,cssVars:f?void 0:B,themeClass:O==null?void 0:O.themeClass,onRender:O==null?void 0:O.onRender}},render(){const{mergedTheme:c,cssVars:k,mergedClsPrefix:f,onRender:u,renderTag:b}=this;return u==null||u(),W(ve,{class:[`${f}-dynamic-tags`,this.themeClass],size:"small",style:k,theme:c.peers.Space,themeOverrides:c.peerOverrides.Space,itemStyle:"display: flex;"},{default:()=>{const{mergedTheme:d,tagClass:N,tagStyle:R,type:y,round:n,size:v,color:w,closable:U,mergedDisabled:l,showInput:t,inputValue:s,inputClass:r,inputStyle:g,inputSize:h,inputForceFocused:p,triggerDisabled:m,handleInputKeyDown:D,handleInputBlur:P,handleAddClick:B,handleCloseClick:O,handleInputConfirm:S,$slots:T}=this;return this.mergedValue.map((_,F)=>b?b(_,F):W(re,{key:F,theme:d.peers.Tag,themeOverrides:d.peerOverrides.Tag,class:N,style:R,type:y,round:n,size:v,color:w,closable:U,disabled:l,onClose:()=>{O(F)}},{default:()=>typeof _=="string"?_:_.label})).concat(t?T.input?T.input({submit:S,deactivate:P}):W(M,Object.assign({placeholder:"",size:h,style:g,class:r,autosize:!0},this.inputProps,{ref:"inputInstRef",value:s,onUpdateValue:_=>{this.inputValue=_},theme:d.peers.Input,themeOverrides:d.peerOverrides.Input,onKeydown:D,onBlur:P,internalForceFocus:p})):T.trigger?T.trigger({activate:B,disabled:m}):W(J,{dashed:!0,disabled:m,theme:d.peers.Button,themeOverrides:d.peerOverrides.Button,size:h,onClick:B},{icon:()=>W(We,{clsPrefix:f},{default:()=>W(Je,null)})}))}})}}),ft={href:"#"},yt=$({name:"DingDingForm",__name:"dingding-form",props:{value:{}},emits:["update:value"],setup(c,{expose:k,emit:f}){const u=c,b=f,{formRef:d,validate:N,restoreValidation:R}=E(),{defaultRequiredRule:y}=K(),n=H(v());function v(){const{webhookUrl:l,ats:t}=JSON.parse(u.value.notifyAttribute);return{id:u.value.id,recipientName:u.value.recipientName,notifyType:1,webhookUrl:l,ats:t,description:u.value.description}}const w={recipientName:y,notifyType:y,webhookUrl:y,ats:y},U=(l,t)=>JSON.stringify({webhookUrl:l,ats:t});return j(()=>n,()=>{const{id:l,recipientName:t,notifyType:s,webhookUrl:r,ats:g,description:h}=n,p=U(r,g);b("update:value",{id:l,recipientName:t,notifyType:s,notifyAttribute:p,description:h})},{deep:!0}),k({validate:N,restoreValidation:R}),(l,t)=>{const s=M,r=G,g=pe,h=ee,p=Y;return x(),I(p,{ref_key:"formRef",ref:d,model:n,rules:w},{default:i(()=>[a(r,{label:e(o)("page.notifyRecipient.recipientName"),path:"recipientName"},{default:i(()=>[a(s,{value:n.recipientName,"onUpdate:value":t[0]||(t[0]=m=>n.recipientName=m),placeholder:e(o)("page.notifyRecipient.form.recipientName"),clearable:""},null,8,["value","placeholder"])]),_:1},8,["label"]),a(r,{label:e(o)("page.notifyRecipient.webhookUrl"),path:"webhookUrl"},{default:i(()=>[a(s,{value:n.webhookUrl,"onUpdate:value":t[1]||(t[1]=m=>n.webhookUrl=m),placeholder:e(o)("page.notifyRecipient.form.webhookUrl"),clearable:""},null,8,["value","placeholder"])]),_:1},8,["label"]),a(r,{label:e(o)("page.notifyRecipient.ats"),path:"ats"},{label:i(()=>[se("a",ft,[a(g,{trigger:"hover"},{trigger:i(()=>[A(C(e(o)("page.notifyRecipient.ats")),1)]),default:i(()=>[A(" "+C(e(o)("page.notifyRecipient.form.dingDingAts")),1)]),_:1})])]),default:i(()=>[a(h,{value:n.ats,"onUpdate:value":t[2]||(t[2]=m=>n.ats=m)},null,8,["value"])]),_:1},8,["label"]),a(r,{label:e(o)("page.notifyRecipient.description"),path:"description"},{default:i(()=>[a(s,{value:n.description,"onUpdate:value":t[3]||(t[3]=m=>n.description=m),type:"textarea",placeholder:e(o)("page.notifyRecipient.form.description"),clearable:"",round:""},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"])}}}),vt={href:"#"},bt=$({name:"LarkForm",__name:"lark-form",props:{value:{}},emits:["update:value"],setup(c,{expose:k,emit:f}){const u=c,b=f,{formRef:d,validate:N,restoreValidation:R}=E(),{defaultRequiredRule:y}=K(),n=H(v());function v(){const{webhookUrl:l,ats:t}=JSON.parse(u.value.notifyAttribute);return{id:u.value.id,recipientName:u.value.recipientName,notifyType:4,webhookUrl:l,ats:t,description:u.value.description}}const w={recipientName:y,notifyType:y,webhookUrl:y,ats:y},U=(l,t)=>JSON.stringify({webhookUrl:l,ats:t});return j(()=>n,()=>{const{id:l,recipientName:t,notifyType:s,webhookUrl:r,ats:g,description:h}=n,p=U(r,g);b("update:value",{id:l,recipientName:t,notifyType:s,notifyAttribute:p,description:h})},{immediate:!0,deep:!0}),k({validate:N,restoreValidation:R}),(l,t)=>{const s=M,r=G,g=pe,h=ee,p=Y;return x(),I(p,{ref_key:"formRef",ref:d,model:n,rules:w},{default:i(()=>[a(r,{label:e(o)("page.notifyRecipient.recipientName"),path:"recipientName"},{default:i(()=>[a(s,{value:n.recipientName,"onUpdate:value":t[0]||(t[0]=m=>n.recipientName=m),placeholder:e(o)("page.notifyRecipient.form.recipientName"),clearable:""},null,8,["value","placeholder"])]),_:1},8,["label"]),a(r,{label:e(o)("page.notifyRecipient.webhookUrl"),path:"webhookUrl"},{default:i(()=>[a(s,{value:n.webhookUrl,"onUpdate:value":t[1]||(t[1]=m=>n.webhookUrl=m),placeholder:e(o)("page.notifyRecipient.form.webhookUrl"),clearable:""},null,8,["value","placeholder"])]),_:1},8,["label"]),a(r,{path:"ats"},{label:i(()=>[se("a",vt,[a(g,{trigger:"hover"},{trigger:i(()=>[A(C(e(o)("page.notifyRecipient.ats")),1)]),default:i(()=>[A(" "+C(e(o)("page.notifyRecipient.form.larkAts")),1)]),_:1})])]),default:i(()=>[a(h,{value:n.ats,"onUpdate:value":t[2]||(t[2]=m=>n.ats=m)},null,8,["value"])]),_:1}),a(r,{label:e(o)("page.notifyRecipient.description"),path:"description"},{default:i(()=>[a(s,{value:n.description,"onUpdate:value":t[3]||(t[3]=m=>n.description=m),type:"textarea",placeholder:e(o)("page.notifyRecipient.form.description"),clearable:"",round:""},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"])}}}),gt=$({name:"EmailForm",__name:"email-form",props:{value:{}},emits:["update:value"],setup(c,{expose:k,emit:f}){const u=c,b=f,{formRef:d,validate:N,restoreValidation:R}=E(),{defaultRequiredRule:y}=K(),n=H(v());function v(){const{tos:l}=JSON.parse(u.value.notifyAttribute);return{id:u.value.id,recipientName:u.value.recipientName,notifyType:2,tos:l,description:u.value.description}}const w={recipientName:y,notifyType:y,tos:y},U=l=>JSON.stringify({tos:l});return j(()=>n,()=>{const{id:l,recipientName:t,notifyType:s,tos:r,description:g}=n,h=U(r);b("update:value",{id:l,recipientName:t,notifyType:s,notifyAttribute:h,description:g})},{immediate:!0,deep:!0}),k({validate:N,restoreValidation:R}),(l,t)=>{const s=M,r=G,g=ee,h=Y;return x(),I(h,{ref_key:"formRef",ref:d,model:n,rules:w},{default:i(()=>[a(r,{label:e(o)("page.notifyRecipient.recipientName"),path:"recipientName"},{default:i(()=>[a(s,{value:n.recipientName,"onUpdate:value":t[0]||(t[0]=p=>n.recipientName=p),placeholder:e(o)("page.notifyRecipient.form.recipientName")},null,8,["value","placeholder"])]),_:1},8,["label"]),a(r,{label:e(o)("page.notifyRecipient.tos"),path:"tos"},{default:i(()=>[a(g,{value:n.tos,"onUpdate:value":t[1]||(t[1]=p=>n.tos=p)},null,8,["value"])]),_:1},8,["label"]),a(r,{label:e(o)("page.notifyRecipient.description"),path:"description"},{default:i(()=>[a(s,{value:n.description,"onUpdate:value":t[2]||(t[2]=p=>n.description=p),type:"textarea",placeholder:e(o)("page.notifyRecipient.form.description"),round:"",clearable:""},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"])}}}),_t={href:"#"},ht=$({name:"WeComForm",__name:"wecom-form",props:{value:{}},emits:["update:value"],setup(c,{expose:k,emit:f}){const u=c,b=f,{formRef:d,validate:N,restoreValidation:R}=E(),{defaultRequiredRule:y}=K(),n=H(v());function v(){const{webhookUrl:l,ats:t}=JSON.parse(u.value.notifyAttribute);return{id:u.value.id,recipientName:u.value.recipientName,notifyType:3,webhookUrl:l,ats:t,description:u.value.description}}const w={recipientName:y,notifyType:y,webhookUrl:y,ats:y},U=(l,t)=>JSON.stringify({webhookUrl:l,ats:t});return j(()=>n,()=>{const{id:l,recipientName:t,notifyType:s,webhookUrl:r,ats:g,description:h}=n,p=U(r,g);b("update:value",{id:l,recipientName:t,notifyType:s,notifyAttribute:p,description:h})},{immediate:!0,deep:!0}),k({validate:N,restoreValidation:R}),(l,t)=>{const s=M,r=G,g=pe,h=ee,p=Y;return x(),I(p,{ref_key:"formRef",ref:d,model:n,rules:w},{default:i(()=>[a(r,{label:e(o)("page.notifyRecipient.recipientName"),path:"recipientName"},{default:i(()=>[a(s,{value:n.recipientName,"onUpdate:value":t[0]||(t[0]=m=>n.recipientName=m),placeholder:e(o)("page.notifyRecipient.form.recipientName"),clearable:""},null,8,["value","placeholder"])]),_:1},8,["label"]),a(r,{label:e(o)("page.notifyRecipient.webhookUrl"),path:"webhookUrl"},{default:i(()=>[a(s,{value:n.webhookUrl,"onUpdate:value":t[1]||(t[1]=m=>n.webhookUrl=m),placeholder:e(o)("page.notifyRecipient.form.webhookUrl"),clearable:""},null,8,["value","placeholder"])]),_:1},8,["label"]),a(r,{path:"ats"},{label:i(()=>[se("a",_t,[a(g,{trigger:"hover"},{trigger:i(()=>[A(C(e(o)("page.notifyRecipient.ats")),1)]),default:i(()=>[A(" "+C(e(o)("page.notifyRecipient.form.weComAts")),1)]),_:1})])]),default:i(()=>[a(h,{value:n.ats,"onUpdate:value":t[2]||(t[2]=m=>n.ats=m)},null,8,["value"])]),_:1}),a(r,{label:e(o)("page.notifyRecipient.description"),path:"description"},{default:i(()=>[a(s,{value:n.description,"onUpdate:value":t[3]||(t[3]=m=>n.description=m),type:"textarea",placeholder:e(o)("page.notifyRecipient.form.description"),clearable:"",round:""},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"])}}}),Nt=$({name:"WebhookForm",__name:"webhook-form",props:{value:{}},emits:["update:value"],setup(c,{expose:k,emit:f}){const u=c,b=f,{formRef:d,validate:N,restoreValidation:R}=E(),{defaultRequiredRule:y}=K(),n=H(v());function v(){const{webhookUrl:l,contentType:t,secret:s}=JSON.parse(u.value.notifyAttribute);return{id:u.value.id,recipientName:u.value.recipientName,notifyType:5,contentType:t,webhookUrl:l,secret:s,description:u.value.description}}const w={contentType:y,recipientName:y,notifyType:y,webhookUrl:y,secret:y},U=(l,t,s)=>JSON.stringify({webhookUrl:l,contentType:t,secret:s});return j(()=>n,()=>{const{id:l,recipientName:t,notifyType:s,webhookUrl:r,secret:g,description:h,contentType:p}=n,m=U(r,p,g);b("update:value",{id:l,recipientName:t,notifyType:s,notifyAttribute:m,description:h})},{immediate:!0,deep:!0}),k({validate:N,restoreValidation:R}),(l,t)=>{const s=M,r=G,g=ge,h=Y;return x(),I(h,{ref_key:"formRef",ref:d,model:n,rules:w},{default:i(()=>[a(r,{label:e(o)("page.notifyRecipient.recipientName"),path:"recipientName"},{default:i(()=>[a(s,{value:n.recipientName,"onUpdate:value":t[0]||(t[0]=p=>n.recipientName=p),placeholder:e(o)("page.notifyRecipient.form.recipientName")},null,8,["value","placeholder"])]),_:1},8,["label"]),a(r,{label:e(o)("page.notifyRecipient.webhookUrl"),path:"webhookUrl"},{default:i(()=>[a(s,{value:n.webhookUrl,"onUpdate:value":t[1]||(t[1]=p=>n.webhookUrl=p),placeholder:e(o)("page.notifyRecipient.form.webhookUrl"),clearable:""},null,8,["value","placeholder"])]),_:1},8,["label"]),a(r,{label:e(o)("page.notifyRecipient.notifyType"),path:"notifyType"},{default:i(()=>[a(g,{value:n.contentType,"onUpdate:value":t[2]||(t[2]=p=>n.contentType=p),options:e(be)(e(qe)),placeholder:e(o)("page.notifyRecipient.contentType"),clearable:""},null,8,["value","options","placeholder"])]),_:1},8,["label"]),a(r,{label:e(o)("page.notifyRecipient.secret"),path:"secret"},{default:i(()=>[a(s,{value:n.secret,"onUpdate:value":t[3]||(t[3]=p=>n.secret=p),placeholder:e(o)("page.notifyRecipient.form.secret"),clearable:""},null,8,["value","placeholder"])]),_:1},8,["label"]),a(r,{label:e(o)("page.notifyRecipient.description"),path:"description"},{default:i(()=>[a(s,{value:n.description,"onUpdate:value":t[4]||(t[4]=p=>n.description=p),type:"textarea",placeholder:e(o)("page.notifyRecipient.form.description"),clearable:"",round:""},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"])}}}),Rt=$({name:"NotifyRecipientOperateDrawer",__name:"notify-recipient-operate-drawer",props:X({operateType:{},rowData:{}},{visible:{type:Boolean,default:!1},visibleModifiers:{},notifyTabPane:{default:1},notifyTabPaneModifiers:{}}),emits:X(["submitted"],["update:visible","update:notifyTabPane"]),setup(c,{emit:k}){const f=c,u=k,b=Q(c,"visible"),d=Q(c,"notifyTabPane"),{formRef:N,validate:R,restoreValidation:y}=E(),n=q(()=>({add:o("page.notifyRecipient.addNotifyRecipient"),edit:o("page.notifyRecipient.editNotifyRecipient")})[f.operateType]),v=z(w());function w(){return{recipientName:"",notifyType:d.value,notifyAttribute:"{}",description:""}}function U(){if(f.operateType==="add"){v.value=w(),d.value=1;return}f.operateType==="edit"&&f.rowData&&(v.value=f.rowData,d.value=f.rowData.notifyType)}async function l(){var s,r;if(await R(),f.operateType==="add"){const{recipientName:g,notifyAttribute:h,notifyType:p,description:m}=v.value,{error:D}=await et({recipientName:g,notifyAttribute:h,notifyType:p,description:m});if(D)return;(s=window.$message)==null||s.success(o("common.addSuccess"))}if(f.operateType==="edit"){const{id:g,recipientName:h,notifyAttribute:p,notifyType:m,description:D}=v.value,{error:P}=await tt({id:g,recipientName:h,notifyAttribute:p,notifyType:m,description:D});if(P)return;(r=window.$message)==null||r.success(o("common.updateSuccess"))}t(),u("submitted")}function t(){b.value=!1}return j(b,()=>{b.value&&(U(),y())}),(s,r)=>{const g=Ke,h=He,p=J,m=ve;return x(),I(_e,{modelValue:b.value,"onUpdate:modelValue":r[6]||(r[6]=D=>b.value=D),"min-size":480,title:n.value},{footer:i(()=>[a(m,{size:16},{default:i(()=>[a(p,{onClick:t},{default:i(()=>[A(C(e(o)("common.cancel")),1)]),_:1}),a(p,{type:"primary",onClick:l},{default:i(()=>[A(C(e(o)("common.save")),1)]),_:1})]),_:1})]),default:i(()=>[a(h,{value:d.value,"onUpdate:value":r[5]||(r[5]=D=>d.value=D),type:"segment",animated:""},{default:i(()=>[a(g,{name:1,tab:"钉钉",disabled:d.value!==1&&f.operateType==="edit"},{default:i(()=>[a(yt,{ref_key:"formRef",ref:N,value:v.value,"onUpdate:value":r[0]||(r[0]=D=>v.value=D)},null,8,["value"])]),_:1},8,["disabled"]),a(g,{name:2,tab:"邮箱",disabled:d.value!==2&&f.operateType==="edit"},{default:i(()=>[a(gt,{ref_key:"formRef",ref:N,value:v.value,"onUpdate:value":r[1]||(r[1]=D=>v.value=D)},null,8,["value"])]),_:1},8,["disabled"]),a(g,{name:3,tab:"企业微信",disabled:d.value!==3&&f.operateType==="edit"},{default:i(()=>[a(ht,{ref_key:"formRef",ref:N,value:v.value,"onUpdate:value":r[2]||(r[2]=D=>v.value=D)},null,8,["value"])]),_:1},8,["disabled"]),a(g,{name:4,tab:"飞书",disabled:d.value!==4&&f.operateType==="edit"},{default:i(()=>[a(bt,{ref_key:"formRef",ref:N,value:v.value,"onUpdate:value":r[3]||(r[3]=D=>v.value=D)},null,8,["value"])]),_:1},8,["disabled"]),a(g,{name:5,tab:"Webhook",disabled:d.value!==5&&f.operateType==="edit"},{default:i(()=>[a(Nt,{ref_key:"formRef",ref:N,value:v.value,"onUpdate:value":r[4]||(r[4]=D=>v.value=D)},null,8,["value"])]),_:1},8,["disabled"])]),_:1},8,["value"])]),_:1},8,["modelValue","title"])}}}),Tt=$({name:"NotifyRecipientSearch",__name:"notify-recipient-search",props:{model:{required:!0},modelModifiers:{}},emits:X(["reset","search"],["update:model"]),setup(c,{emit:k}){const f=k,u=Q(c,"model");function b(){f("reset")}function d(){f("search")}return(N,R)=>{const y=M,n=nt,v=ge;return x(),I(we,{model:u.value,onSearch:d,onReset:b},{default:i(()=>[a(n,{span:"24 s:12 m:6","label-width":100,label:e(o)("page.notifyRecipient.recipientName"),path:"recipientName",class:"pr-24px"},{default:i(()=>[a(y,{value:u.value.recipientName,"onUpdate:value":R[0]||(R[0]=w=>u.value.recipientName=w),placeholder:e(o)("page.notifyRecipient.form.recipientName"),clearable:""},null,8,["value","placeholder"])]),_:1},8,["label"]),a(n,{span:"24 s:12 m:6",label:e(o)("page.notifyRecipient.notifyType"),path:"notifyType",class:"pr-24px"},{default:i(()=>[a(v,{value:u.value.notifyType,"onUpdate:value":R[1]||(R[1]=w=>u.value.notifyType=w),options:e(be)(e(Ge)),placeholder:e(o)("page.notifyRecipient.notifyType"),clearable:""},null,8,["value","options","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"])}}}),wt=$({name:"NotifyRecipientDetailDrawer",__name:"notify-recipient-detail-drawer",props:X({rowData:{}},{visible:{type:Boolean,default:!1},visibleModifiers:{}}),emits:["update:visible"],setup(c){const k=c,f=z(),u=Q(c,"visible");return j(()=>k.rowData,()=>{var d;const b=((d=k.rowData)==null?void 0:d.notifyAttribute)||null;f.value=JSON.parse(b)||{}},{immediate:!0}),(b,d)=>{const N=pt,R=re,y=ut,n=_e;return x(),I(n,{modelValue:u.value,"onUpdate:modelValue":d[0]||(d[0]=v=>u.value=v),title:e(o)("page.notifyRecipient.detail")},{default:i(()=>[a(y,{"label-placement":"top",bordered:"",column:2},{default:i(()=>{var v,w,U;return[a(N,{label:e(o)("page.notifyRecipient.recipientName"),span:2},{default:i(()=>{var l;return[A(C((l=b.rowData)==null?void 0:l.recipientName),1)]}),_:1},8,["label"]),a(N,{label:e(o)("page.notifyRecipient.notifyType"),span:2},{default:i(()=>{var l;return[a(R,{type:e(Z)((l=b.rowData)==null?void 0:l.notifyType)},{default:i(()=>{var t;return[A(C(e(o)(e(he)[(t=b.rowData)==null?void 0:t.notifyType])),1)]}),_:1},8,["type"])]}),_:1},8,["label"]),((v=b.rowData)==null?void 0:v.notifyType)!==2?(x(),I(N,{key:0,label:e(o)("page.notifyRecipient.notifyType"),span:2},{default:i(()=>{var l;return[A(C((l=f.value)==null?void 0:l.webhookUrl),1)]}),_:1},8,["label"])):oe("",!0),((w=b.rowData)==null?void 0:w.notifyType)!==2?(x(),I(N,{key:1,label:e(o)("page.notifyRecipient.ats"),span:2},{default:i(()=>{var l;return[(x(!0),le(me,null,de((l=f.value)==null?void 0:l.ats,(t,s)=>(x(),I(R,{key:s,type:e(Z)(s),style:{"margin-right":"10px"}},{default:i(()=>[A(C(t),1)]),_:2},1032,["type"]))),128))]}),_:1},8,["label"])):oe("",!0),((U=b.rowData)==null?void 0:U.notifyType)==2?(x(),I(N,{key:2,label:e(o)("page.notifyRecipient.tos"),span:2},{default:i(()=>{var l;return[(x(!0),le(me,null,de((l=f.value)==null?void 0:l.tos,(t,s)=>(x(),I(R,{key:s,type:e(Z)(s),style:{"margin-right":"10px"}},{default:i(()=>[A(C(t),1)]),_:2},1032,["type"]))),128))]}),_:1},8,["label"])):oe("",!0),a(N,{label:e(o)("page.notifyRecipient.description"),span:2},{default:i(()=>{var l;return[A(C((l=b.rowData)==null?void 0:l.description),1)]}),_:1},8,["label"])]}),_:1})]),_:1},8,["modelValue","title"])}}}),kt={class:"min-h-500px flex-col-stretch gap-16px overflow-hidden lt-sm:overflow-auto"};function ie(c){return typeof c=="function"||Object.prototype.toString.call(c)==="[object Object]"&&!Qe(c)}const $t=$({name:"notify_recipient",__name:"index",setup(c){const{hasAuth:k}=lt(),f=Ye(),u=z(),{bool:b,setTrue:d}=Ze(!1),{columns:N,columnChecks:R,data:y,getData:n,loading:v,mobilePagination:w,searchParams:U,resetSearchParams:l}=ot({apiFn:at,apiParams:{page:1,size:10,recipientName:null,notifyType:null},columns:()=>[{type:"selection",align:"center",width:48},{key:"id",title:o("common.index"),align:"center",width:64},{key:"recipientName",title:o("page.notifyRecipient.recipientName"),align:"left",minWidth:120,render:T=>{function _(){u.value=T||null,d()}return a(J,{text:!0,tag:"a",type:"primary",onClick:_,class:"ws-normal"},{default:()=>[T.recipientName]})}},{key:"notifyType",title:o("page.notifyRecipient.notifyType"),align:"left",minWidth:120,render:T=>{const _=o(he[T.notifyType]);return a(re,{type:Z(T.notifyType)},ie(_)?_:{default:()=>[_]})}},{key:"description",title:o("page.notifyRecipient.description"),align:"left",minWidth:120},{key:"operate",title:o("common.operate"),align:"center",width:130,render:T=>{let _;return a("div",{class:"flex-center gap-8px"},[a(J,{type:"primary",text:!0,ghost:!0,size:"small",onClick:()=>B(T.id)},ie(_=o("common.edit"))?_:{default:()=>[_]}),k("R_ADMIN")?a(ue,{onPositiveClick:()=>P(T.id)},{default:()=>o("common.confirmDelete"),trigger:()=>{let F;return a(J,{type:"error",text:!0,ghost:!0,size:"small"},ie(F=o("common.delete"))?F:{default:()=>[F]})}}):""])}}]}),{drawerVisible:t,operateType:s,editingData:r,handleAdd:g,handleEdit:h,checkedRowKeys:p,onBatchDeleted:m}=it(y,n);async function D(){const{error:T}=await fe(p.value);T||m()}async function P(T){var F;const{error:_}=await fe([T]);_||((F=window.$message)==null||F.success(o("common.deleteSuccess")),n())}function B(T){h(T)}function O(){return{notifyRecipientIds:p.value,notifyType:U.notifyType,recipientName:U.recipientName}}function S(){Ue("/notify-recipient/export",O(),o("page.notifyRecipient.title"))}return(T,_)=>{const F=xe,te=De,ae=Se,Ne=ke,Re=st,Te=Xe;return x(),le("div",kt,[a(Tt,{model:e(U),"onUpdate:model":_[0]||(_[0]=V=>L(U)?U.value=V:null),onReset:e(l),onSearch:e(n)},null,8,["model","onReset","onSearch"]),a(F),a(Te,{title:e(o)("page.notifyRecipient.title"),bordered:!1,size:"small",class:"sm:flex-1-hidden card-wrapper","header-class":"view-card-header"},{"header-extra":i(()=>[a(Ne,{columns:e(R),"onUpdate:columns":_[1]||(_[1]=V=>L(R)?R.value=V:null),"disabled-delete":e(p).length===0,loading:e(v),"show-delete":e(k)("R_ADMIN"),onAdd:e(g),onDelete:D,onRefresh:e(n)},{addAfter:i(()=>[a(te,{action:"/notify-recipient/import",accept:"application/json",onRefresh:e(n)},null,8,["onRefresh"]),a(e(ue),{onPositiveClick:S},{trigger:i(()=>[a(e(J),{size:"small",ghost:"",type:"primary",disabled:e(p).length===0&&e(k)("R_USER")},{icon:i(()=>[a(ae,{class:"text-icon"})]),default:i(()=>[A(" "+C(e(o)("common.export")),1)]),_:1},8,["disabled"])]),default:i(()=>[A(C(e(p).length===0?e(o)("common.exportAll"):e(o)("common.exportPar",{num:e(p).length})),1)]),_:1})]),_:1},8,["columns","disabled-delete","loading","show-delete","onAdd","onRefresh"])]),default:i(()=>[a(Re,{"checked-row-keys":e(p),"onUpdate:checkedRowKeys":_[2]||(_[2]=V=>L(p)?p.value=V:null),columns:e(N),data:e(y),"flex-height":!e(f).isMobile,"scroll-x":962,loading:e(v),remote:"","row-key":V=>V.id,pagination:e(w),class:"sm:h-full"},null,8,["checked-row-keys","columns","data","flex-height","loading","row-key","pagination"]),a(Rt,{visible:e(t),"onUpdate:visible":_[3]||(_[3]=V=>L(t)?t.value=V:null),"operate-type":e(s),"row-data":e(r),onSubmitted:e(n)},null,8,["visible","operate-type","row-data","onSubmitted"])]),_:1},8,["title"]),a(wt,{visible:e(b),"onUpdate:visible":_[4]||(_[4]=V=>L(b)?b.value=V:null),"row-data":u.value},null,8,["visible","row-data"])])}}});export{$t as default};
© 2015 - 2025 Weber Informatics LLC | Privacy Policy