All Downloads are FREE. Search and download functionalities are using the official Maven repository.

static.assets.Queue.70d42a4a.js Maven / Gradle / Ivy

/* empty css             *//* empty css                       *//* empty css                *//* empty css                *//* empty css                  *//* empty css              *//* empty css               */import{i as re,m as i,n as f,p as de,q as pe,s as me,t as ce,v as ge,x as fe,o as c,b as C,e as l,w as t,F as k,y as T,f as p,z as be,A as Fe,d as N,B as De,C as ye,D as ve,G as U,H as xe,I as _e,J as Ce,K as ke,L as Be,M as qe,N as $}from"./index.1adb7942.js";import{e as D}from"./message.069571be.js";const Ee={class:"block"},we={class:"queue-table"},Le=re({__name:"Queue",setup(Ve){const{proxy:r}=ve();let b=i(!1);i("add");const B=i([]),P=i([]),z=i([{id:""},{key:""},{tag:""},{consumeTime:""},{offset:""}]),L=f([{prop:"id",label:"\u6D88\u606Fid"},{prop:"key",label:"\u6D88\u606F\u952E"},{prop:"tag",label:"\u6807\u7B7E"},{prop:"consumeTime",label:"\u6D88\u8D39\u65F6\u95F4"},{prop:"offset",label:"\u504F\u79FB\u91CF"}]),S=f([{prop:"queueName",label:"\u865A\u62DF\u961F\u5217\u540D\u79F0"},{prop:"size",label:"\u5B9E\u65F6\u6D88\u606F\u6570\u91CF"}]),R=f([{prop:"queueName",label:"\u961F\u5217\u540D\u79F0"},{prop:"retryMax",label:"\u6D88\u8D39\u5931\u8D25\u91CD\u8BD5\u6B21\u6570"},{prop:"retryInterval",label:"\u91CD\u8BD5\u65F6\u95F4\u95F4\u9694"},{prop:"ackMode",label:"ack\u6A21\u5F0F"},{prop:"concurrency",label:"\u5E76\u53D1\u6D88\u8D39\u8005"},{prop:"maxConcurrency",label:"\u6700\u5927\u5E76\u53D1\u6D88\u8D39\u8005"},{prop:"virtual",label:"\u865A\u62DF\u961F\u5217\u6570\u91CF"},{prop:"queueMaxSize",label:"\u961F\u5217\u5BB9\u91CF"}]),n=f({queue:"",tag:"",body:"",consumeTime:0}),q=i(),y=i(!1),E=i(!1),w=i(!1);i([]),i([]);const I=async()=>{const a={...n};a.consumeTime=new Date(a.consumeTime).getTime();let e;o.delayState?e=await h(a):e=await Z(a),console.log("sdasd "+e),e===!1?D.error("\u6D88\u606F\u4F53\u683C\u5F0F\u9519\u8BEF,\u8BF7\u8F93\u5165\u666E\u901A\u5B57\u7B26\u4E32\u6216\u6B63\u786E\u7684json"):(D.success(),r.$refs.sendMessageFormRef.resetFields(),y.value=!1)},H=(a,e)=>{a.props.name=="queue"?o.delayState=!1:o.delayState=!0,v(o)},G=()=>{r.$refs.sendMessageFormRef.resetFields()},j=a=>{o.page=a,v(o)},J=a=>{m.page=a,V(m)},K=(a,e)=>{q.value=e.body,w.value=!0},O=(a,e)=>{b.value=!0,console.log(e),W({queueName:e.queueName,virtual:e.virtual})},W=async a=>{let e=await r.$api.mq.vQueueList(a);P.value=e,console.log(e)},X=(a,e)=>{y.value=!0,n.queue=e.queueName},Y=(a,e)=>{E.value=!0,m.virtualQueueName=e.queueName,V(m)},Z=async a=>await r.$api.mq.sendMessage(a),h=async a=>await r.$api.mq.sendTimingMessage(a),V=async a=>{let e=await r.$api.mq.pageMessage(a);z.value=e.list,a.total=e.total},ee=async a=>{await r.$api.mq.deleteMessage(a),V(m)},ue=async a=>{const e={vQueue:a};await r.$api.mq.publishPullMessage(e),D.success()},ae=async a=>{const e={queue:a};await r.$api.mq.deleteQueue(e),v(o)},le=async(a,e)=>{ue(e.queueName)},te=async(a,e)=>{U.confirm("\u4F60\u786E\u5B9A\u5220\u9664\u6D88\u606F\u961F\u5217\u5417?",{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88"}).then(()=>{ae(e.queueName),D.success()}).catch(()=>{})},m=f({page:1,size:10,total:0,virtualQueueName:""}),o=f({page:1,size:10,delayState:!1,total:0}),oe=(a,e)=>{U.confirm("\u4F60\u786E\u5B9A\u5220\u9664\u6D88\u606F\u5417?",{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88"}).then(()=>{ee(e),D.success()}).catch(()=>{})};de(()=>{v(o)});const v=async a=>{let e=await r.$api.mq.queueList(a);console.log(e),e.list.forEach(s=>{s.ackMode=s.ackMode=="maual"?"\u624B\u52A8":"\u81EA\u52A8",s.retryInterval=s.retryInterval+"ms"}),o.total=e.total,B.value=e.list,console.log("abc"+B.value)};return(a,e)=>{const s=xe,d=_e,M=Ce,x=ke,F=Be,ne=pe,se=qe,_=me,Q=ce,A=ge,ie=fe;return c(),C(k,null,[l(_,{class:"queue-dialog",modelValue:De(b),"onUpdate:modelValue":e[9]||(e[9]=u=>ye(b)?b.value=u:b=u),style:{width:"70%",height:"50%"}},{footer:t(()=>e[13]||(e[13]=[])),default:t(()=>[l(M,{data:P.value},{default:t(()=>[(c(!0),C(k,null,T(S,u=>(c(),$(s,{key:u.prop,label:u.label,prop:u.prop},null,8,["label","prop"]))),128)),l(s,{fixed:"right",width:"300px",label:"\u64CD\u4F5C"},{default:t(u=>[l(d,{size:"small",onClick:g=>Y(u.$index,u.row)},{default:t(()=>e[10]||(e[10]=[p("\u961F\u5217\u6D88\u606F")])),_:2},1032,["onClick"]),l(d,{size:"small",onClick:g=>X(u.$index,u.row)},{default:t(()=>e[11]||(e[11]=[p("\u53D1\u9001\u6D88\u606F")])),_:2},1032,["onClick"]),l(d,{type:"danger",size:"small",onClick:g=>le(u.$index,u.row)},{default:t(()=>e[12]||(e[12]=[p("\u62C9\u53D6\u6D88\u606F")])),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),l(_,{modelValue:y.value,"onUpdate:modelValue":e[4]||(e[4]=u=>y.value=u),width:"70%",title:"\u53D1\u9001\u6D88\u606F","append-to-body":"",onClose:e[5]||(e[5]=u=>G())},{default:t(()=>[l(se,{ref:"sendMessageFormRef",model:n,"label-width":"120px"},{default:t(()=>[l(F,{label:"\u865A\u62DF\u961F\u5217",prop:"queue",required:""},{default:t(()=>[l(x,{modelValue:n.queue,"onUpdate:modelValue":e[0]||(e[0]=u=>n.queue=u)},null,8,["modelValue"])]),_:1}),l(F,{label:"\u6807\u7B7E",prop:"tag"},{default:t(()=>[l(x,{modelValue:n.tag,"onUpdate:modelValue":e[1]||(e[1]=u=>n.tag=u)},null,8,["modelValue"])]),_:1}),l(F,{label:"\u6D88\u606F\u4F53",prop:"body",required:""},{default:t(()=>[l(x,{modelValue:n.body,"onUpdate:modelValue":e[2]||(e[2]=u=>n.body=u),type:"textarea",autosize:{minRows:4}},null,8,["modelValue"])]),_:1}),be(l(F,{label:"\u6D88\u8D39\u65F6\u95F4",prop:"consumeTime"},{default:t(()=>[N("div",Ee,[l(ne,{modelValue:n.consumeTime,"onUpdate:modelValue":e[3]||(e[3]=u=>n.consumeTime=u),type:"datetime",placeholder:"\u8BF7\u9009\u62E9\u6D88\u8D39\u65F6\u95F4"},null,8,["modelValue"])])]),_:1},512),[[Fe,o.delayState]]),l(F,null,{default:t(()=>[l(d,{type:"primary",onClick:I},{default:t(()=>e[14]||(e[14]=[p("\u53D1\u9001")])),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"]),l(_,{modelValue:E.value,"onUpdate:modelValue":e[8]||(e[8]=u=>E.value=u),width:"70%",title:"\u6D88\u606F\u5217\u8868","append-to-body":""},{default:t(()=>[l(M,{data:z.value},{default:t(()=>[(c(!0),C(k,null,T(L,u=>(c(),$(s,{key:u.prop,label:u.label,prop:u.prop},null,8,["label","prop"]))),128)),l(s,{fixed:"right",width:"200px",label:"\u64CD\u4F5C"},{default:t(u=>[l(d,{size:"small",color:"#009688",onClick:g=>K(u.$index,u.row)},{default:t(()=>e[15]||(e[15]=[p("\u67E5\u770B")])),_:2},1032,["onClick"]),l(d,{type:"danger",size:"small",onClick:g=>oe(u.$index,u.row)},{default:t(()=>e[16]||(e[16]=[p("\u5220\u9664")])),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),l(Q,{background:"",layout:"prev, pager, next",total:m.total,"current-page":m.page,"onUpdate:currentPage":J},null,8,["total","current-page"]),l(_,{modelValue:w.value,"onUpdate:modelValue":e[7]||(e[7]=u=>w.value=u),width:"80%",title:"\u6D88\u606F\u8BE6\u60C5","append-to-body":""},{default:t(()=>[l(x,{modelValue:q.value,"onUpdate:modelValue":e[6]||(e[6]=u=>q.value=u),autosize:{minRows:4,maxRows:20},type:"textarea",placeholder:"Please input",disabled:""},null,8,["modelValue"])]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1},8,["modelValue"]),l(ie,{type:"card",class:"demo-tabs",onTabClick:H},{default:t(()=>[l(A,{label:"\u666E\u901A\u961F\u5217",name:"queue"}),l(A,{label:"\u5EF6\u65F6\u961F\u5217",name:"delayQueue"})]),_:1}),N("div",we,[l(M,{data:B.value,style:{width:"100%"},height:"700px",border:"","header-cell-style":{background:"#fff !important",color:"#000 !important","text-align":"center","font-size":"15px","font-weight":"700"},"row-cell-style":{"text-align":"center"},"cell-style":{"text-align":"center"}},{default:t(()=>[(c(!0),C(k,null,T(R,u=>(c(),$(s,{key:u.prop,label:u.label,prop:u.prop},null,8,["label","prop"]))),128)),l(s,{fixed:"right",width:"200px",label:"\u64CD\u4F5C"},{default:t(u=>[l(d,{size:"default",onClick:g=>O(u.$index,u.row)},{default:t(()=>e[17]||(e[17]=[p("\u8BE6\u60C5")])),_:2},1032,["onClick"]),l(d,{type:"danger",size:"default",onClick:g=>te(u.$index,u.row)},{default:t(()=>e[18]||(e[18]=[p("\u5220\u9664")])),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),l(Q,{background:"",layout:"prev, pager, next",total:o.total,"current-page":o.page,"onUpdate:currentPage":j},null,8,["total","current-page"])])],64)}}});export{Le as default};




© 2015 - 2025 Weber Informatics LLC | Privacy Policy