mirror of
https://gitee.com/vben/vben-app.git
synced 2026-10-06 14:13:09 +08:00
2 lines
5.0 KiB
JavaScript
2 lines
5.0 KiB
JavaScript
var D=(c,o,r)=>new Promise((y,t)=>{var g=e=>{try{n(r.next(e))}catch(l){t(l)}},i=e=>{try{n(r.throw(e))}catch(l){t(l)}},n=e=>e.done?y(e.value):Promise.resolve(e.value).then(g,i);n((r=r.apply(c,o)).next())});import{aq as N,_ as S,aD as j,a8 as F,ap as J,v as x,ar as R,t as U}from"./bootstrap-Dvp__AlY.js";import{a7 as I,J as w,ar as _,aw as f,at as V,F as b,ay as L,aq as s,aN as T,av as k,au as v,aO as a,aR as d,X as E,a1 as M,ax as p,x as u,aP as $,aQ as B}from"../jse/index-index-D97IFaZ_.js";import{b as A}from"./render-BV63Eedy.js";const Q=["index"],X=I({__name:"index",props:{options:{},value:{},showValue:{type:Boolean,default:!0},separator:{default:","}},setup(c){const o=c,r=w(()=>o.value===""||o.value===null||o.value===void 0?[]:Array.isArray(o.value)?o.value.map(i=>`${i}`):String(o.value).split(o.separator)),y=w(()=>{var n;if(((n=o.options)==null?void 0:n.length)===0||o.value===""||o.value===null||o.value===void 0)return!1;let i=!1;return r.value.forEach(e=>{o.options.some(l=>l.value===e)||(i=!0)}),i}),t=w(()=>{const i=[];return o.value!==""&&o.value!==null&&o.value!==void 0&&r.value.forEach(n=>{o.options.some(e=>e.value===n)||i.push(n)}),g(i)}),g=i=>i.length===0?"":i.reduce((n,e)=>`${n} ${e}`);return(i,n)=>{const e=N;return f(),_("div",null,[(f(!0),_(b,null,L(c.options,(l,m)=>(f(),_(b,null,[s(r).includes(l.value)?(f(),_(b,{key:0},[(l.elTagType==="default"||l.elTagType==="")&&(l.elTagClass===""||l.elTagClass==null)?(f(),_("span",{key:l.value,index:m,class:k(l.elTagClass)},v(`${l.label} `),11,Q)):(f(),T(e,{key:`${l.value}`,"disable-transitions":!0,index:m,type:l.elTagType==="primary"||l.elTagType==="success"||l.elTagType==="info"||l.elTagType==="warning"||l.elTagType==="danger"?l.elTagType:"primary",class:k(l.elTagClass)},{default:a(()=>[d(v(`${l.label} `),1)]),_:2},1032,["index","type","class"]))],64)):V("",!0)],64))),256)),s(y)&&c.showValue?(f(),_(b,{key:0},[d(v(s(t)),1)],64)):V("",!0)])}}}),G=S(X,[["__scopeId","data-v-ee71fd7c"]]),H={class:"max-h-[300px] overflow-y-auto"},K={class:"max-h-[300px] overflow-y-auto"},W={style:{flex:"auto",margin:"20px"}},Y=I({__name:"view",setup(c,{expose:o}){const r=E({url:"/mon/oper",show:!1,form:{avtag:!0}}),y=E({}),{form:t}=M(r);o({open:n=>D(null,null,function*(){r.form=yield U.get(`${r.url}/info/${n.id}`),y.butyps=n.butyps,r.show=!0})});const i=w(()=>{var n;return t.value?`账号: ${t.value.opuna} / ${(n=t.value.opdna)!=null?n:"未知组织"} / ${t.value.opip} / ${t.value.oploc}`:"-"});return(n,e)=>{const l=J,m=N,q=G,z=R,O=F,P=j;return f(),T(P,{modelValue:s(r).show,"onUpdate:modelValue":e[1]||(e[1]=C=>s(r).show=C),size:"46%"},{header:a(()=>[...e[2]||(e[2]=[p("h4",null,"日志详情",-1)])]),default:a(()=>[u(z,{class:"margin-top",column:1,border:"","label-width":"100"},{default:a(()=>[u(l,{"min-width":"100"},{label:a(()=>[...e[3]||(e[3]=[p("div",{class:"cell-item"},"日志编号",-1)])]),default:a(()=>[d(" "+v(s(t).id),1)]),_:1}),u(l,null,{label:a(()=>[...e[4]||(e[4]=[p("div",{class:"cell-item"},"操作结果",-1)])]),default:a(()=>[$(u(m,{type:"success"},{default:a(()=>[...e[5]||(e[5]=[d("成功",-1)])]),_:1},512),[[x,s(t).sutag]]),$(u(m,{type:"danger"},{default:a(()=>[...e[6]||(e[6]=[d("失败",-1)])]),_:1},512),[[x,!s(t).sutag]])]),_:1}),u(l,null,{label:a(()=>[...e[7]||(e[7]=[p("div",{class:"cell-item"},"操作模块",-1)])]),default:a(()=>[u(m,null,{default:a(()=>[d(v(s(t).opmod),1)]),_:1}),u(q,{options:s(y).butyps,value:s(t).butyp,style:{display:"inline-block","margin-left":"10px"}},null,8,["options","value"])]),_:1}),u(l,null,{label:a(()=>[...e[8]||(e[8]=[p("div",{class:"cell-item"},"操作信息",-1)])]),default:a(()=>[d(" "+v(s(i)),1)]),_:1}),u(l,null,{label:a(()=>[...e[9]||(e[9]=[p("div",{class:"cell-item"},"请求信息",-1)])]),default:a(()=>[u(m,{type:"primary"},{default:a(()=>[d(v(s(t).reway),1)]),_:1}),d(" "+v(s(t).reurl),1)]),_:1}),$(u(l,null,{label:a(()=>[...e[10]||(e[10]=[p("div",{class:"cell-item"},"异常信息",-1)])]),default:a(()=>[d(" "+v(s(t).ermsg),1)]),_:1},512),[[x,!s(t).sutag]]),u(l,null,{label:a(()=>[...e[11]||(e[11]=[p("div",{class:"cell-item"},"请求方法",-1)])]),default:a(()=>[d(" "+v(s(t).remet),1)]),_:1}),u(l,null,{label:a(()=>[...e[12]||(e[12]=[p("div",{class:"cell-item"},"请求参数",-1)])]),default:a(()=>[p("div",H,[(f(),T(B(s(A)(s(t).repar))))])]),_:1}),u(l,null,{label:a(()=>[...e[13]||(e[13]=[p("div",{class:"cell-item"},"响应参数",-1)])]),default:a(()=>[p("div",K,[(f(),T(B(s(A)(s(t).bapar))))])]),_:1}),u(l,null,{label:a(()=>[...e[14]||(e[14]=[p("div",{class:"cell-item"},"请求耗时",-1)])]),default:a(()=>[d(" "+v(s(t).cotim)+"ms ",1)]),_:1}),u(l,null,{label:a(()=>[...e[15]||(e[15]=[p("div",{class:"cell-item"},"操作时间",-1)])]),default:a(()=>[d(" "+v(s(t).optim),1)]),_:1})]),_:1})]),footer:a(()=>[p("div",W,[u(O,{onClick:e[0]||(e[0]=C=>s(r).show=!1)},{default:a(()=>[...e[16]||(e[16]=[d("关 闭",-1)])]),_:1})])]),_:1},8,["modelValue"])}}}),Z=S(Y,[["__scopeId","data-v-4c0647c6"]]),te=Object.freeze(Object.defineProperty({__proto__:null,default:Z},Symbol.toStringTag,{value:"Module"}));export{Z as D,G as _,te as v};
|