3 lines
6.0 KiB
JavaScript
3 lines
6.0 KiB
JavaScript
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/UploadMoreFile.B6BkvwOj.js","js/vendor/index.CRpmXtWV.js","assets/vendor/index.3TEJtsPW.css","index.D-NvtsOM.js","assets/index.BMbJ9Zyn.css","js/neSoftware.CvdsdLsa.js","js/file.BexoPAcX.js"])))=>i.map(i=>d[i]);
|
|
import{g as A,r as T,_ as G,W as Z,j,k as c,D as I,J as b,t as a,n as i,m as y,p as n,I as h,E as u,F as f,az as O,H as R,G as H,ai as J,l as p,aU as Y,aZ as Q,Z as X,$ as ee,ci as te,aG as ne}from"./vendor/index.CRpmXtWV.js";import{_ as oe}from"./index.vue_vue_type_script_setup_true_lang.m9m5k4_V.js";import{a as M}from"./useStep.DHKYVb7i.js";import{d as se,R as N,_ as ae}from"../index.D-NvtsOM.js";import{u as ie}from"./dict.DBZ2k0Lk.js";import{l as le,o as re}from"./neVersion.DvI7QHJZ.js";const de={class:"ne"},ce={class:"ne-oper"},pe=A({__name:"NeInfoSoftwareInstall",setup(fe){const{t:o}=se(),{getDict:x}=ie(),B=J(()=>ee(()=>import("./UploadMoreFile.B6BkvwOj.js"),__vite__mapDeps([0,1,2,3,4,5,6])));let k=T([]),L=T([{title:o("views.ne.common.neType"),dataIndex:"neType",align:"left",width:100},{title:o("views.ne.common.neId"),dataIndex:"neId",align:"left",width:100},{title:o("views.ne.neVersion.version"),dataIndex:"version",align:"left",width:100,resizable:!0,minWidth:100,maxWidth:200},{title:o("views.ne.neVersion.newVersion"),dataIndex:"newVersion",align:"left",width:100,resizable:!0,minWidth:100,maxWidth:200},{title:o("views.ne.neVersion.status"),dataIndex:"status",key:"status",align:"left",width:100}]),e=G({loading:!1,data:[],selectedRowKeys:[],selectedRowOne:{neType:""},visibleByMoreFile:!1,visibleByInstall:!1,operateDataUpgrade:[],confirmLoading:!1});function D(l,t){e.selectedRowKeys=l,t.length===1?e.selectedRowOne=t[0]:e.selectedRowOne={neType:""}}function w(){C(),e.visibleByInstall&&v()}function v(){e.visibleByMoreFile=!1,e.visibleByInstall=!1,e.operateDataUpgrade=[]}function V(){p.Modal.confirm({title:o("common.tipTitle"),content:o("views.system.quickStart.stepInstallTip"),onOk(){F()}})}async function F(){if(e.confirmLoading)return;e.confirmLoading=!0,e.visibleByInstall=!0;const l=e.data.filter(t=>e.selectedRowKeys.includes(t.id));for(const t of l){if(t.newVersion==="-"||t.newVersion===""){e.operateDataUpgrade.push({neType:t.neType,neId:t.neId,status:"fail",log:o("views.system.quickStart.stepInstallNotNewVer")});continue}let m={};t.neType.toUpperCase()==="IMS"&&(m={pisCSCF:"y",updateMFetc:"No",updateMFshare:"No"});const _={neType:t.neType,neId:t.neId,action:"install",preinput:m};try{const r=await re(_),d={neType:t.neType,neId:t.neId,status:"fail",log:o("common.operateErr")};r.code===N?(d.status="done",d.log=o("views.system.quickStart.stepInstallDone")):(d.status="fail",d.log=o("views.system.quickStart.stepInstallFail")),e.operateDataUpgrade.unshift(d)}catch(r){console.error(r)}}e.confirmLoading=!1}function C(){e.loading=!0,le({neType:void 0,neId:"",version:"",pageNum:1,pageSize:20}).then(l=>{l.code===N&&Array.isArray(l.rows)&&(e.selectedRowKeys.length>0&&(e.selectedRowKeys=[],e.selectedRowOne={neType:""}),e.data=l.rows.filter(t=>t.neType!=="OMC")),e.loading=!1})}function U(){p.Modal.confirm({title:o("common.tipTitle"),content:o("views.system.quickStart.stepInstallStepPrev"),onOk(){M("NeInfoConfigPara5G")}})}function q(l){p.Modal.confirm({title:o("common.tipTitle"),content:o("views.system.quickStart.stepInstallStepNext"),onOk(){M("NeInfoSoftwareLicense")}})}return Z(()=>{x("ne_version_status").then(l=>{k.value=l}).finally(()=>{C()})}),(l,t)=>{const m=oe,_=p.Table,r=p.Button,d=Y,K=Q,z=p.Space,E=X,S=p.Alert,P=te,$=ne,W=j("ProModal");return c(),I(R,null,[b("div",de,[a(_,{class:"table","row-key":"id",columns:n(L),loading:n(e).loading,"data-source":n(e).data,size:"middle",pagination:!1,onResizeColumn:t[0]||(t[0]=(s,g)=>g.width=s),scroll:{y:"60vh"},"row-selection":{type:"checkbox",columnWidth:"48px",selectedRowKeys:n(e).selectedRowKeys,onChange:D}},{bodyCell:i(({column:s,record:g})=>[s.key==="status"?(c(),y(m,{key:0,options:n(k),value:g.status},null,8,["options","value"])):h("",!0)]),_:1},8,["columns","loading","data-source","row-selection"]),b("div",ce,[a(z,{direction:"horizontal",size:18},{default:i(()=>[a(r,{onClick:t[1]||(t[1]=s=>U())},{default:i(()=>[u(f(n(o)("views.system.quickStart.stepPrev")),1)]),_:1}),a(r,{type:"dashed",disabled:n(e).selectedRowKeys.length>1,onClick:t[2]||(t[2]=O(()=>n(e).visibleByMoreFile=!n(e).visibleByMoreFile,["prevent"]))},{icon:i(()=>[a(d)]),default:i(()=>[u(" "+f(n(o)("views.ne.neSoftware.upload"))+" "+f(n(e).selectedRowOne.neType),1)]),_:1},8,["disabled"]),a(r,{type:"primary",ghost:"",disabled:n(e).selectedRowKeys.length<=0,loading:n(e).confirmLoading,onClick:t[3]||(t[3]=O(s=>V(),["prevent"]))},{icon:i(()=>[a(K)]),default:i(()=>[u(" "+f(n(o)("views.system.quickStart.stepInstallText")),1)]),_:1},8,["disabled","loading"]),a(r,{type:"primary",onClick:t[4]||(t[4]=s=>q("NeInfoSoftwareLicense"))},{default:i(()=>[u(f(n(o)("views.system.quickStart.stepNext")),1)]),_:1})]),_:1})])]),a(n(B),{visible:n(e).visibleByMoreFile,"onUpdate:visible":t[5]||(t[5]=s=>n(e).visibleByMoreFile=s),"ne-type":n(e).selectedRowOne.neType,onOk:w,onCancel:v},null,8,["visible","ne-type"]),a(W,{drag:!0,destroyOnClose:!0,"body-style":{height:"520px",overflowY:"scroll"},keyboard:!1,"mask-closable":!1,visible:n(e).visibleByInstall,title:n(o)("views.system.quickStart.stepInstallModal"),closable:!1,onOk:w,onCancel:v},{footer:i(()=>[a(r,{key:"submit",type:"primary",disabled:n(e).confirmLoading,onClick:w},{default:i(()=>[u(f(n(o)("common.close")),1)]),_:1},8,["disabled"])]),default:i(()=>[b("p",null,[n(e).confirmLoading?(c(),y(S,{key:0,message:n(o)("common.loading"),type:"info","show-icon":""},{icon:i(()=>[a(E)]),_:1},8,["message"])):h("",!0)]),(c(!0),I(R,null,H(n(e).operateDataUpgrade,s=>(c(),I("p",{key:s.neId},[a(S,{message:`${s.neType}-${s.neId}`,description:s.log,type:s.status==="done"?"success":"error","show-icon":""},{icon:i(()=>[s.status==="done"?(c(),y(P,{key:0})):(c(),y($,{key:1}))]),_:2},1032,["message","description","type"])]))),128))]),_:1},8,["visible","title"])],64)}}}),ge=ae(pe,[["__scopeId","data-v-f7ac8b78"]]);export{ge as default};
|