2 lines
14 KiB
JavaScript
2 lines
14 KiB
JavaScript
import{g as ge,be as he,r as M,_ as J,an as K,W as ve,l as u,b1 as Se,k as D,m as q,n,B as we,am as be,p as l,t,aj as Ie,az as y,E as f,F as i,I as De,J as e,D as A,G as H,H as G,ak as ye,aA as Ne,aB as Oe,bf as xe,aF as Te,aX as Ue,V as ke,aK as Ce,a9 as Re,aa as Je,au as Ae}from"./vendor/index.CRpmXtWV.js";import{u as ze}from"./neinfo.CsfhUo_f.js";import{d as Pe,R as x,p as Me,x as Fe,_ as Ve}from"../index.D-NvtsOM.js";import{l as Ee,d as Le,e as $e}from"./smf.8vW6h0J7.js";import{W as Be}from"./ws-websocket.Bq7KFeli.js";import{l as Ke}from"./tenant.B86no_hE.js";import"./neInfo.DNMxf4Rh.js";import"./parse-tree-utils.CVXqlbRx.js";import"./task.DBr8g4rv.js";const _=T=>(Re("data-v-9cf6a462"),T=T(),Je(),T),qe=_(()=>e("span",null,"Record Network Function ID: ",-1)),He=_(()=>e("span",null,"Record Type: ",-1)),Ge=_(()=>e("span",null,"Record Opening Time: ",-1)),Ye=_(()=>e("span",null,"Charging ID: ",-1)),We=_(()=>e("span",null,"Duration: ",-1)),je=_(()=>e("span",null,"Subscription ID Type: ",-1)),Qe=_(()=>e("span",null,"Subscription ID Data: ",-1)),Xe=_(()=>e("span",null,"Data Total Volume: ",-1)),Ze=_(()=>e("span",null,"Data Volume Downlink: ",-1)),en=_(()=>e("span",null,"Data Volume Uplink: ",-1)),nn=_(()=>e("span",null,"Time: ",-1)),tn=_(()=>e("span",null,"User Identifier: ",-1)),an=_(()=>e("span",null,"SSC Mode: ",-1)),on=_(()=>e("span",null,"RAT Type: ",-1)),ln=_(()=>e("span",null,"DNN ID: ",-1)),sn=_(()=>e("span",null,"PDU Type: ",-1)),dn=_(()=>e("span",null,"PDU IPv4 Address: ",-1)),rn=_(()=>e("span",null,"PDU IPv6 Addres Swith Prefix: ",-1)),cn=_(()=>e("span",null,"Network Function IPv4: ",-1)),un=ge({__name:"index",setup(T){const{t:s}=Pe(),U=new Be,Y=new he({concurrency:1,autoStart:!0});let F=M([]),h=M(["",""]),p=J({tenantNameArr:[],neType:"SMF",neId:"001",subscriberID:"",tenantName:"",sortField:"timestamp",sortOrder:"desc",startTime:"",endTime:"",pageNum:1,pageSize:20});function W(){p=Object.assign(p,{subscriberID:"",tenantName:"",startTime:"",endTime:"",pageNum:1,pageSize:20}),h.value=["",""],w.current=1,w.pageSize=20,b()}let m=J({loading:!1,size:"middle",seached:!0,data:[],selectedRowKeys:[]}),V=[{title:s("common.rowId"),dataIndex:"id",align:"center",width:100},{title:s("views.dashboard.cdr.smfChargingID"),dataIndex:"cdrJSON",align:"left",width:100,customRender(o){return o.value.chargingID}},{title:s("views.dashboard.cdr.smfSubscriptionIDType"),dataIndex:"cdrJSON",align:"left",width:150,customRender(o){return o.value.subscriberIdentifier?.subscriptionIDType}},{title:s("views.dashboard.cdr.smfSubscriptionIDData"),dataIndex:"cdrJSON",align:"left",width:150,customRender(o){return o.value.subscriberIdentifier?.subscriptionIDData}},{title:s("views.dashboard.cdr.smfDataVolumeUplink"),dataIndex:"cdrJSON",align:"left",width:150,customRender(o){const r=o.value.listOfMultipleUnitUsage;if(!Array.isArray(r)||r.length<1)return 0;const c=r[0].usedUnitContainer;return!Array.isArray(c)||c.length<1?0:c[0].dataVolumeUplink}},{title:s("views.dashboard.cdr.smfDataVolumeDownlink"),dataIndex:"cdrJSON",align:"left",width:180,customRender(o){const r=o.value.listOfMultipleUnitUsage;if(!Array.isArray(r)||r.length<1)return 0;const c=r[0].usedUnitContainer;return!Array.isArray(c)||c.length<1?0:c[0].dataVolumeDownlink}},{title:s("views.dashboard.cdr.smfDataTotalVolume"),dataIndex:"cdrJSON",align:"left",width:150,customRender(o){const r=o.value.listOfMultipleUnitUsage;if(!Array.isArray(r)||r.length<1)return 0;const c=r[0].usedUnitContainer;return!Array.isArray(c)||c.length<1?0:c[0].dataTotalVolume}},{title:s("views.dashboard.cdr.smfDuration"),dataIndex:"cdrJSON",align:"left",width:100,customRender(o){return o.value.duration}},{title:s("views.dashboard.cdr.smfInvocationTime"),dataIndex:"cdrJSON",align:"left",width:200,customRender(o){return o.value.invocationTimestamp}},{title:s("views.dashboard.cdr.tenantName"),dataIndex:"tenantName",align:"center",key:"tenantName",width:150},{title:s("common.operate"),key:"id",align:"left"}],w=J({current:1,pageSize:20,defaultPageSize:20,pageSizeOptions:["10","20","50","100"],hideOnSinglePage:!1,showQuickJumper:!0,showSizeChanger:!0,total:0,showTotal:o=>s("common.tablePaginationTotal",{total:o}),onChange:(o,a)=>{w.current=o,w.pageSize=a,p.pageNum=o,p.pageSize=a,b()}});function j({key:o}){m.size=o}function Q(o){m.selectedRowKeys=o}let v=J({confirmLoading:!1,maxId:0});function E(o){if(!o||v.confirmLoading)return;let a=o;o==="0"&&(a=`${o}... ${m.selectedRowKeys.length}`,o=m.selectedRowKeys.join(",")),u.Modal.confirm({title:s("common.tipTitle"),content:s("views.dashboard.cdr.delTip",{msg:a}),onOk(){v.confirmLoading=!0;const r=u.message.loading(s("common.loading"),0);Le(o).then(c=>{c.code===x?(u.message.success({content:s("common.operateOk"),duration:3}),b(1)):u.message.error({content:`${c.msg}`,duration:3})}).finally(()=>{r(),v.confirmLoading=!1})}})}function b(o){m.loading||(m.loading=!0,o&&(p.pageNum=o),h.value||(h.value=["",""]),p.startTime=h.value[0],p.endTime=h.value[1],Ee(K(p)).then(a=>{a.code===x&&Array.isArray(a.rows)&&(m.selectedRowKeys.length>0&&(m.selectedRowKeys=[]),w.total=a.total,m.data=a.rows.map(r=>{let c=r.cdrJSON;c||Reflect.set(r,"cdrJSON",{});try{c=JSON.parse(c),Reflect.set(r,"cdrJSON",c)}catch(g){console.error(g),Reflect.set(r,"cdrJSON",{})}return r}),a.total>0&&(v.maxId=Number(a.rows[0].id))),m.loading=!1}))}function X(){v.confirmLoading||u.Modal.confirm({title:s("common.tipTitle"),content:s("views.dashboard.cdr.exportTip"),onOk(){const o=u.message.loading(s("common.loading"),0),a=K(p);a.pageSize=1e4,$e(a).then(r=>{r.code===x?(u.message.success({content:s("common.operateOk"),duration:3}),Ae(r.data,`smf_cdr_event_export_${Date.now()}.xlsx`)):u.message.error({content:`${r.msg}`,duration:3})}).finally(()=>{o(),v.confirmLoading=!1})}})}const I=M(!1);function Z(){if(I.value=!I.value,I.value){m.seached=!1;const o={url:"/ws",params:{subGroupID:`1006_${p.neId}`},onmessage:ne,onerror:ee};U.connect(o)}else U.close(),m.seached=!0,b(1)}function ee(o){console.error(o)}function ne(o){const{code:a,requestId:r,data:c}=o;if(a===Fe){console.warn(o.msg);return}if(c?.groupId&&c.groupId===`1006_${p.neId}`){const g=c.data;Y.add(async()=>{v.maxId+=1,m.data.unshift({id:v.maxId,neType:g.neType,neName:g.neName,rmUID:g.rmUID,timestamp:g.timestamp,cdrJSON:g.CDR}),w.total+=1,m.data.length>100&&m.data.pop(),await new Promise(z=>setTimeout(z,800))})}}return ve(()=>{ze().fnNelist().then(o=>{if(o.code===x&&Array.isArray(o.data)){if(o.data.length>0){let a=[];o.data.forEach(r=>{r.neType==="SMF"&&a.push({value:r.neId,label:r.neName})}),F.value=a,a.length>0&&(p.neId=a[0].value)}}else u.message.warning({content:s("common.noData"),duration:2})}).finally(()=>{b(),Ke({parentId:0}).then(o=>{o.code===x&&Array.isArray(o.data)&&(p.tenantNameArr=[],o.data.forEach(a=>{a.parentId==="0"&&p.tenantNameArr.push({value:a.tenantName,label:a.tenantName})}))})})}),Se(()=>{U.state()!==-1&&U.close()}),(o,a)=>{const r=u.Select,c=u.FormItem,g=u.Col,z=u.Input,te=u.RangePicker,ae=u.AutoComplete,oe=Ne,S=u.Button,le=Oe,k=u.Space,L=u.Row,se=u.Form,$=u.Card,ie=xe,de=u.Popconfirm,B=Te,re=Ue,ce=u.Switch,C=u.Tooltip,ue=ke,me=Ce,P=u.MenuItem,pe=u.Menu,fe=u.Dropdown,N=u.Divider,_e=u.Table;return D(),q(l(ye),null,{default:n(()=>[we(t($,{bordered:!1,"body-style":{marginBottom:"24px",paddingBottom:0}},{default:n(()=>[t(se,{model:l(p),name:"queryParams",layout:"horizontal"},{default:n(()=>[t(L,{gutter:16},{default:n(()=>[t(g,{lg:6,md:12,xs:24},{default:n(()=>[t(c,{label:"SMF",name:"neId "},{default:n(()=>[t(r,{value:l(p).neId,"onUpdate:value":a[0]||(a[0]=d=>l(p).neId=d),options:l(F),placeholder:l(s)("common.selectPlease")},null,8,["value","options","placeholder"])]),_:1})]),_:1}),t(g,{lg:6,md:12,xs:24},{default:n(()=>[t(c,{label:l(s)("views.dashboard.cdr.smfSubscriptionIDData"),name:"subscriberID"},{default:n(()=>[t(z,{value:l(p).subscriberID,"onUpdate:value":a[1]||(a[1]=d=>l(p).subscriberID=d),"allow-clear":"",placeholder:l(s)("common.inputPlease"),maxlength:40},null,8,["value","placeholder"])]),_:1},8,["label"])]),_:1}),t(g,{lg:8,md:12,xs:24},{default:n(()=>[t(c,{label:l(s)("views.dashboard.cdr.time"),name:"queryRangePicker"},{default:n(()=>[t(te,{value:l(h),"onUpdate:value":a[2]||(a[2]=d=>Ie(h)?h.value=d:h=d),"allow-clear":"",bordered:"","show-time":{format:"HH:mm:ss"},format:"YYYY-MM-DD HH:mm:ss","value-format":"x",style:{width:"100%"}},null,8,["value"])]),_:1},8,["label"])]),_:1}),t(g,{lg:6,md:12,xs:24},{default:n(()=>[t(c,{label:l(s)("views.neUser.sub.tenantName"),name:"tenantName "},{default:n(()=>[t(ae,{value:l(p).tenantName,"onUpdate:value":a[3]||(a[3]=d=>l(p).tenantName=d),options:l(p).tenantNameArr},null,8,["value","options"])]),_:1},8,["label"])]),_:1}),t(g,{lg:4,md:12,xs:24},{default:n(()=>[t(c,null,{default:n(()=>[t(k,{size:8},{default:n(()=>[t(S,{type:"primary",onClick:a[4]||(a[4]=y(d=>b(1),["prevent"]))},{icon:n(()=>[t(oe)]),default:n(()=>[f(" "+i(l(s)("common.search")),1)]),_:1}),t(S,{type:"default",onClick:y(W,["prevent"])},{icon:n(()=>[t(le)]),default:n(()=>[f(" "+i(l(s)("common.reset")),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1},512),[[be,l(m).seached]]),t($,{bordered:!1,"body-style":{padding:"0px"}},{title:n(()=>[t(k,{size:8,align:"center"},{default:n(()=>[t(de,{placement:"bottomLeft",title:I.value?l(s)("views.dashboard.cdr.realTimeDataStop"):l(s)("views.dashboard.cdr.realTimeDataStart"),"ok-text":"Yes","cancel-text":"No",onConfirm:a[5]||(a[5]=d=>Z())},{default:n(()=>[t(S,{type:"primary",danger:I.value},{icon:n(()=>[t(ie)]),default:n(()=>[f(" "+i(I.value?l(s)("views.dashboard.cdr.realTimeDataStop"):l(s)("views.dashboard.cdr.realTimeDataStart")),1)]),_:1},8,["danger"])]),_:1},8,["title"]),t(S,{type:"default",danger:"",disabled:l(m).selectedRowKeys.length<=0,loading:l(v).confirmLoading,onClick:a[6]||(a[6]=y(d=>E("0"),["prevent"]))},{icon:n(()=>[t(B)]),default:n(()=>[f(" "+i(l(s)("common.deleteText")),1)]),_:1},8,["disabled","loading"]),t(S,{type:"dashed",onClick:a[7]||(a[7]=y(d=>X(),["prevent"]))},{icon:n(()=>[t(re)]),default:n(()=>[f(" "+i(l(s)("common.export")),1)]),_:1})]),_:1})]),extra:n(()=>[t(k,{size:8,align:"center"},{default:n(()=>[t(C,null,{title:n(()=>[f(i(l(s)("common.searchBarText")),1)]),default:n(()=>[t(ce,{checked:l(m).seached,"onUpdate:checked":a[8]||(a[8]=d=>l(m).seached=d),"checked-children":l(s)("common.switch.show"),"un-checked-children":l(s)("common.switch.hide"),size:"small",disabled:I.value},null,8,["checked","checked-children","un-checked-children","disabled"])]),_:1}),t(C,null,{title:n(()=>[f(i(l(s)("common.reloadText")),1)]),default:n(()=>[t(S,{type:"text",onClick:a[9]||(a[9]=y(d=>b(),["prevent"]))},{icon:n(()=>[t(ue)]),_:1})]),_:1}),t(C,null,{title:n(()=>[f(i(l(s)("common.sizeText")),1)]),default:n(()=>[t(fe,{trigger:"click",placement:"bottomRight"},{overlay:n(()=>[t(pe,{"selected-keys":[l(m).size],onClick:j},{default:n(()=>[t(P,{key:"default"},{default:n(()=>[f(i(l(s)("common.size.default")),1)]),_:1}),t(P,{key:"middle"},{default:n(()=>[f(i(l(s)("common.size.middle")),1)]),_:1}),t(P,{key:"small"},{default:n(()=>[f(i(l(s)("common.size.small")),1)]),_:1})]),_:1},8,["selected-keys"])]),default:n(()=>[t(S,{type:"text"},{icon:n(()=>[t(me)]),_:1})]),_:1})]),_:1})]),_:1})]),default:n(()=>[t(_e,{class:"table","row-key":"id",columns:l(V),loading:l(m).loading,"data-source":l(m).data,size:l(m).size,pagination:l(w),scroll:{x:l(V).length*150,y:"calc(100vh - 480px)"},"row-selection":{type:"checkbox",columnWidth:"48px",selectedRowKeys:l(m).selectedRowKeys,onChange:Q}},{bodyCell:n(({column:d,record:R})=>[d.key==="id"?(D(),q(k,{key:0,size:8,align:"center"},{default:n(()=>[t(C,null,{title:n(()=>[f(i(l(s)("common.deleteText")),1)]),default:n(()=>[t(S,{type:"link",onClick:y(O=>E(R.id),["prevent"])},{icon:n(()=>[t(B)]),_:2},1032,["onClick"])]),_:2},1024)]),_:2},1024)):De("",!0)]),expandedRowRender:n(({record:d})=>[t(L,{gutter:16},{default:n(()=>[t(g,{lg:8,md:12,xs:24,offset:2},{default:n(()=>[t(N,{orientation:"left"},{default:n(()=>[f(i(l(s)("views.dashboard.cdr.cdrInfo")),1)]),_:1}),e("div",null,[e("span",null,i(l(s)("views.ne.common.neName"))+": ",1),e("span",null,i(d.neName),1)]),e("div",null,[e("span",null,i(l(s)("views.ne.common.rmUid"))+": ",1),e("span",null,i(d.rmUID),1)]),e("div",null,[e("span",null,i(l(s)("views.dashboard.cdr.time"))+": ",1),e("span",null,i(l(Me)(+d.timestamp*1e3)),1)]),t(N,{orientation:"left"},{default:n(()=>[f(i(l(s)("views.dashboard.cdr.rowInfo")),1)]),_:1}),e("div",null,[qe,e("span",null,i(d.cdrJSON.recordingNetworkFunctionID),1)]),e("div",null,[He,e("span",null,i(d.cdrJSON.recordType),1)]),e("div",null,[Ge,e("span",null,i(d.cdrJSON.recordOpeningTime),1)]),e("div",null,[Ye,e("span",null,i(d.cdrJSON.chargingID),1)]),e("div",null,[We,e("span",null,i(d.cdrJSON.duration),1)]),t(N,{orientation:"left"},{default:n(()=>[f(" Subscriber Identifier ")]),_:1}),e("div",null,[je,e("span",null,i(d.cdrJSON.subscriberIdentifier?.subscriptionIDType),1)]),e("div",null,[Qe,e("span",null,i(d.cdrJSON.subscriberIdentifier?.subscriptionIDData),1)])]),_:2},1024),t(g,{lg:8,md:12,xs:24},{default:n(()=>[t(N,{orientation:"left"},{default:n(()=>[f(" List Of Multiple Unit Usage ")]),_:1}),(D(!0),A(G,null,H(d.cdrJSON.listOfMultipleUnitUsage,R=>(D(),A("div",null,[e("div",null,"RatingGroup: "+i(R.ratingGroup),1),(D(!0),A(G,null,H(R.usedUnitContainer,O=>(D(),A("div",null,[e("div",null,[Xe,e("span",null,i(O.dataTotalVolume),1)]),e("div",null,[Ze,e("span",null,i(O.dataVolumeDownlink),1)]),e("div",null,[en,e("span",null,i(O.dataVolumeUplink),1)]),e("div",null,[nn,e("span",null,i(O.time),1)])]))),256))]))),256)),t(N,{orientation:"left"},{default:n(()=>[f(" PDU Session Charging Information ")]),_:1}),e("div",null,[tn,e("span",null,i(d.cdrJSON.pDUSessionChargingInformation?.userIdentifier),1)]),e("div",null,[an,e("span",null,i(d.cdrJSON.pDUSessionChargingInformation?.sSCMode),1),f(" "),on,e("span",null,i(d.cdrJSON.pDUSessionChargingInformation?.rATType),1),f(" "),ln,e("span",null,i(d.cdrJSON.pDUSessionChargingInformation?.dNNID),1)]),e("div",null,[sn,e("span",null,i(d.cdrJSON.pDUSessionChargingInformation?.pDUType),1)]),e("div",null,[dn,e("span",null,i(d.cdrJSON.pDUSessionChargingInformation?.pDUAddress?.pDUIPv4Address),1)]),e("div",null,[rn,e("span",null,i(d.cdrJSON.pDUSessionChargingInformation?.pDUAddress?.pDUIPv6AddresswithPrefix),1)]),e("div",null,[cn,e("span",null,i(d.cdrJSON.nFunctionConsumerInformation.networkFunctionIPv4Address),1)])]),_:2},1024)]),_:2},1024)]),_:1},8,["columns","loading","data-source","size","pagination","scroll","row-selection"])]),_:1})]),_:1})}}}),bn=Ve(un,[["__scopeId","data-v-9cf6a462"]]);export{bn as default};
|