You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
12KB

  1. import{r as b,o as F,J as z,c as m,e as i,G as c,i as o,h as l,f as V,F as x,H as D,g as G,j as r,k as $}from"./index.a2494fc2.js";const L=[{name:"ECS (CPU)",children:[{name:"1C1G"},{name:"1C2G"},{name:"1C4G"},{name:"1C8G"},{name:"2C4G"},{name:"2C8G"},{name:"2C16G"},{name:"4C8G"},{name:"4C16G"},{name:"4C32G"},{name:"8C16G"},{name:"8C32G"},{name:"8C64G"},{name:"16C32G"},{name:"16C64G"},{name:"16C128G"},{name:"32C64G"},{name:"32C128G"}]},{name:"ECS (GPU)",children:[{name:"20C80G + 1GPU"},{name:"28C112G + 2GPU"},{name:"56C224G + 4GPU"}]},{name:"RDS (MySQL)",children:[{name:"1C1G (\u6700\u5927\u8FDE\u63A5\u6570300)"},{name:"1C2G (\u6700\u5927\u8FDE\u63A5\u6570600)"},{name:"2C4G (\u6700\u5927\u8FDE\u63A5\u65701200)"},{name:"2C8G (\u6700\u5927\u8FDE\u63A5\u65702000)"},{name:"2C16G (\u6700\u5927\u8FDE\u63A5\u65702500) (\u72EC\u4EAB)"},{name:"4C8G (\u6700\u5927\u8FDE\u63A5\u65702000)"},{name:"4C16G (\u6700\u5927\u8FDE\u63A5\u65702500) (\u72EC\u4EAB)"},{name:"4C32G (\u6700\u5927\u8FDE\u63A5\u65704000)"},{name:"8C16G (\u6700\u5927\u8FDE\u63A5\u65704000)"},{name:"8C32G (\u6700\u5927\u8FDE\u63A5\u65705000) (\u72EC\u4EAB)"},{name:"8C32G (\u6700\u5927\u8FDE\u63A5\u65708000) (\u72EC\u4EAB)"},{name:"16C64G (\u6700\u5927\u8FDE\u63A5\u657010000) (\u72EC\u4EAB)"},{name:"16C96G (\u6700\u5927\u8FDE\u63A5\u657016000)"},{name:"16C128G (\u6700\u5927\u8FDE\u63A5\u657020000) (\u72EC\u4EAB)"},{name:"32C128G (\u6700\u5927\u8FDE\u63A5\u657020000) (\u72EC\u4EAB)"}]},{name:"PostgreSQL",children:[{name:"8C32G (\u72EC\u4EAB\u578B)"},{name:"16C64G (\u72EC\u4EAB\u578B)"},{name:"2C4G (\u72EC\u4EAB\u578B)"},{name:"2C16G (\u72EC\u4EAB\u578B)"},{name:"4C32G (\u72EC\u4EAB\u578B)"},{name:"8C16G (\u72EC\u4EAB\u578B)"},{name:"8C32G (\u72EC\u4EAB\u578B)"},{name:"16C64G (\u72EC\u4EAB\u578B)"},{name:"32C128G (\u72EC\u4EAB\u578B)"}]},{name:"redis",children:[{name:"\u4E3B\u4ECE\uFF08\u9AD8\u914D\uFF09\u72481G"},{name:"\u4E3B\u4ECE\uFF08\u9AD8\u914D\uFF09\u72482G"},{name:"\u4E3B\u4ECE\uFF08\u9AD8\u914D\uFF09\u72484G"},{name:"\u4E3B\u4ECE\uFF08\u9AD8\u914D\uFF09\u72488G"},{name:"\u4E3B\u4ECE\uFF08\u9AD8\u914D\uFF09\u724816G"},{name:"\u4E3B\u4ECE\uFF08\u9AD8\u914D\uFF09\u724832G"},{name:"\u4E3B\u4ECE\uFF08\u9AD8\u914D\uFF09\u724864G"},{name:"\u96C6\u7FA4\u724816G"},{name:"\u96C6\u7FA4\u724832G"},{name:"\u96C6\u7FA4\u724864G"},{name:"\u96C6\u7FA4\u7248128G"},{name:"\u96C6\u7FA4\u7248256G"}]},{name:"MongoDB",children:[{name:"2C4G (\u4E09\u8282\u70B9\u526F\u672C\u7248\u672C)"},{name:"4C8G (\u4E09\u8282\u70B9\u526F\u672C\u7248\u672C)"},{name:"8C16G (\u4E09\u8282\u70B9\u526F\u672C\u7248\u672C)"},{name:"8C32G (\u4E09\u8282\u70B9\u526F\u672C\u7248\u672C)"},{name:"16C64G (\u4E09\u8282\u70B9\u526F\u672C\u7248\u672C)"},{name:"2C16G (\u72EC\u4EAB)"},{name:"4C32G (\u72EC\u4EAB)"},{name:"8C64G (\u72EC\u4EAB)"},{name:"16C128G (\u72EC\u4EAB)"}]},{name:"PolarDB O\u5F15\u64CE",children:[{name:"1C4G (\u72EC\u4EAB\u578B)"},{name:"2C8G (\u72EC\u4EAB\u578B)"},{name:"2C16G (\u72EC\u4EAB\u578B)"},{name:"4C16G (\u72EC\u4EAB\u578B)"},{name:"4C32G (\u72EC\u4EAB\u578B)"},{name:"8C32G (\u72EC\u4EAB\u578B)"},{name:"8C64G (\u72EC\u4EAB\u578B)"},{name:"16C64G (\u72EC\u4EAB\u578B)"},{name:"16C128G (\u72EC\u4EAB\u578B)"},{name:"32C128G (\u72EC\u4EAB\u578B)"},{name:"PolarDB O\u4E13\u7528\u5B58\u50A8\uFF08GB\uFF09"}]}],O={__name:"plannedUseResources",props:{detailData:{type:Object,default:()=>({})}},setup(P,{expose:T}){const p=P;function h(s){let n=[];return R.value.forEach(f=>{f.name===s&&(n=f.children)}),n}function w(s){a.value.cloudResource[s].baseSpecification=""}const R=b(L),g=b(),a=b({mobileTerminalEntry:[],cloudResource:[{cloudResourceType:"",baseSpecification:"",serversCount:"",description:""}],produceData:[{dataDirectoryName:"",dataItem:""}],commonComponent:[{componentName:"",componentType:""}],isCloudResource:0,isProduceData:0,isCommonComponent:0}),N={mobileTerminalEntry:[{required:!0,message:"\u8BF7\u9009\u62E9\u79FB\u52A8\u7AEF\u5165\u53E3"}],cloudResource:[{required:!0,message:"\u8BF7\u81F3\u5C11\u6DFB\u52A0\u4E00\u4E2A\u4E91\u8D44\u6E90"}],produceData:[{required:!0,message:"\u8BF7\u81F3\u5C11\u6DFB\u52A0\u4E00\u4E2A\u4EA7\u751F\u6570\u636E"}],commonComponent:[{required:!0,message:"\u8BF7\u81F3\u5C11\u6DFB\u52A0\u4E00\u4E2A\u516C\u5171\u7EC4\u4EF6"}]};F(()=>{a.value.mobileTerminalEntry=p.detailData.mobileTerminalEntry,p.detailData.cloudResource&&(a.value.cloudResource=p.detailData.cloudResource||[]),a.value.commonComponent&&(a.value.commonComponent=p.detailData.commonComponent||[]),a.value.produceData&&(a.value.produceData=p.detailData.produceData||[]),a.value.isCloudResource=p.detailData.isCloudResource,a.value.isProduceData=p.detailData.isProduceData,a.value.isCommonComponent=p.detailData.isCommonComponent}),z(()=>p.detailData,s=>{},{deep:!0});function q(s){g.value.validate(n=>{s(n)})}T({validForm:q,formData:a});const E=b([{label:"\u6D59\u91CC\u529E",value:1},{label:"\u6D59\u653F\u9489",value:2},{label:"\u5176\u4ED6",value:3},{label:"\u65E0\u79FB\u52A8\u7AEF",value:4}]);return(s,n)=>{const f=m("el-checkbox"),S=m("el-checkbox-group"),t=m("el-form-item"),y=m("el-switch"),d=m("el-table-column"),k=m("el-option"),U=m("el-select"),B=m("el-input-number"),v=m("el-input"),C=m("el-button"),_=m("el-table"),I=m("el-form");return i(),c(I,{ref_key:"ruleFormRef",ref:g,model:a.value,"label-position":"right","label-width":"180px","label-suffix":":","scroll-to-error":"",rules:N,"validate-on-rule-change":!1},{default:o(()=>[l(t,{label:"\u79FB\u52A8\u7AEF\u5165\u53E3",prop:"mobileTerminalEntry"},{default:o(()=>[l(S,{modelValue:a.value.mobileTerminalEntry,"onUpdate:modelValue":n[0]||(n[0]=e=>a.value.mobileTerminalEntry=e)},{default:o(()=>[(i(!0),V(x,null,D(E.value,e=>(i(),c(f,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),l(t,{label:"\u662F\u5426\u4F7F\u7528\u4E91\u8D44\u6E90"},{default:o(()=>[l(y,{modelValue:a.value.isCloudResource,"onUpdate:modelValue":n[1]||(n[1]=e=>a.value.isCloudResource=e),"active-value":1,"inactive-value":0},null,8,["modelValue"])]),_:1}),a.value.isCloudResource===1?(i(),c(t,{key:0,prop:"cloudResource"},{default:o(()=>[l(_,{data:a.value.cloudResource,style:{width:"100%"}},{default:o(()=>[l(d,{type:"index",label:"\u5E8F\u53F7",width:"60"}),l(d,{prop:"state"},{header:o(()=>n[7]||(n[7]=[G("span",{style:{color:"red"}},"*",-1),r("\u4E91\u8D44\u6E90\u7C7B\u578B ")])),default:o(e=>[l(t,{prop:`cloudResource[${e.$index}].cloudResourceType`,rules:[{required:!0,message:""}]},{default:o(()=>[l(U,{modelValue:a.value.cloudResource[e.$index].cloudResourceType,"onUpdate:modelValue":u=>a.value.cloudResource[e.$index].cloudResourceType=u,placeholder:"\u8BF7\u9009\u62E9",size:"large",onChange:u=>w(e.$index)},{default:o(()=>[(i(!0),V(x,null,D(R.value,u=>(i(),c(k,{key:u.name,label:u.name,value:u.name},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]),_:2},1032,["prop"])]),_:1}),l(d,{prop:"city"},{header:o(()=>n[8]||(n[8]=[G("span",{style:{color:"red"}},"*",-1),r("\u57FA\u7840\u89C4\u683C ")])),default:o(e=>[l(t,{prop:`cloudResource[${e.$index}].baseSpecification`,rules:[{required:!0,message:""}]},{default:o(()=>[l(U,{modelValue:a.value.cloudResource[e.$index].baseSpecification,"onUpdate:modelValue":u=>a.value.cloudResource[e.$index].baseSpecification=u,placeholder:"\u8BF7\u9009\u62E9",size:"large"},{default:o(()=>[(i(!0),V(x,null,D(h(a.value.cloudResource[e.$index].cloudResourceType),u=>(i(),c(k,{key:u.name,label:u.name,value:u.name},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:1}),l(d,{prop:"address"},{header:o(()=>n[9]||(n[9]=[G("span",{style:{color:"red"}},"*",-1),r("\u53F0\u6570 ")])),default:o(e=>[l(t,{prop:`cloudResource[${e.$index}].serversCount`,rules:[{required:!0,message:""}]},{default:o(()=>[l(B,{modelValue:a.value.cloudResource[e.$index].serversCount,"onUpdate:modelValue":u=>a.value.cloudResource[e.$index].serversCount=u,min:1,placeholder:"\u53F0\u6570"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:1}),l(d,{prop:"zip",label:"\u63CF\u8FF0"},{default:o(e=>[l(t,null,{default:o(()=>[l(v,{modelValue:a.value.cloudResource[e.$index].description,"onUpdate:modelValue":u=>a.value.cloudResource[e.$index].description=u,placeholder:"\u63CF\u8FF0"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:1}),l(d,{fixed:"right",label:"\u64CD\u4F5C"},{default:o(e=>[l(C,{link:"",type:"primary",onClick:u=>a.value.cloudResource.splice(e.$index,1)},{default:o(()=>n[10]||(n[10]=[r("\u5220\u9664")])),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),l(C,{type:"primary",plain:"",icon:"Plus",class:"w-full mb-8",onClick:n[2]||(n[2]=e=>a.value.cloudResource.push({}))},{default:o(()=>n[11]||(n[11]=[r("\u6DFB\u52A0\u4E91\u8D44\u6E90 ")])),_:1})]),_:1})):$("",!0),l(t,{label:"\u662F\u5426\u4EA7\u751F\u6570\u636E"},{default:o(()=>[l(y,{modelValue:a.value.isProduceData,"onUpdate:modelValue":n[3]||(n[3]=e=>a.value.isProduceData=e),"active-value":1,"inactive-value":0},null,8,["modelValue"])]),_:1}),a.value.isProduceData===1?(i(),c(t,{key:1,prop:"isProduceData"},{default:o(()=>[l(_,{data:a.value.produceData,style:{width:"100%"}},{default:o(()=>[l(d,{type:"index",label:"\u5E8F\u53F7",width:"60"}),l(d,{prop:"state",label:""},{header:o(()=>n[12]||(n[12]=[G("span",{style:{color:"red"}},"*",-1),r("\u6570\u636E\u76EE\u5F55\u540D\u79F0 ")])),default:o(e=>[l(t,{prop:`produceData[${e.$index}].dataDirectoryName`,rules:[{required:!0,message:""}]},{default:o(()=>[l(v,{modelValue:a.value.produceData[e.$index].dataDirectoryName,"onUpdate:modelValue":u=>a.value.produceData[e.$index].dataDirectoryName=u,placeholder:"\u6570\u636E\u76EE\u5F55\u540D\u79F0"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:1}),l(d,{prop:"city"},{header:o(()=>n[13]||(n[13]=[G("span",{style:{color:"red"}},"*",-1),r("\u6570\u636E\u9879 ")])),default:o(e=>[l(t,{prop:`produceData[${e.$index}].dataItem`,rules:[{required:!0,message:""}]},{default:o(()=>[l(v,{modelValue:a.value.produceData[e.$index].dataItem,"onUpdate:modelValue":u=>a.value.produceData[e.$index].dataItem=u,placeholder:"\u591A\u4E2A\u6570\u636E\u9879\u65F6\uFF0C\u7528\u201C\uFF1B\u201D\u9694\u5F00"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:1}),l(d,{fixed:"right",label:"\u64CD\u4F5C"},{default:o(e=>[l(C,{link:"",type:"primary",onClick:u=>a.value.produceData.splice(e.$index,1)},{default:o(()=>n[14]||(n[14]=[r("\u5220\u9664")])),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),l(C,{type:"primary",plain:"",icon:"Plus",class:"w-full mb-8",onClick:n[4]||(n[4]=e=>a.value.produceData.push({}))},{default:o(()=>n[15]||(n[15]=[r("\u6DFB\u52A0\u6570\u636E\u9879 ")])),_:1})]),_:1})):$("",!0),l(t,{label:"\u662F\u5426\u4F7F\u7528\u516C\u5171\u7EC4\u4EF6"},{default:o(()=>[l(y,{modelValue:a.value.isCommonComponent,"onUpdate:modelValue":n[5]||(n[5]=e=>a.value.isCommonComponent=e),"active-value":1,"inactive-value":0},null,8,["modelValue"])]),_:1}),a.value.isCommonComponent===1?(i(),c(t,{key:2,prop:"isProduceData"},{default:o(()=>[l(_,{data:a.value.commonComponent,style:{width:"100%"}},{default:o(()=>[l(d,{type:"index",label:"\u5E8F\u53F7",width:"60"}),l(d,{prop:"state",label:"\u516C\u5171\u7EC4\u4EF6\u540D\u79F0\uFF08\u5F3A\u5236\u7EC4\u4EF6\u6570\u91CF\u5FC5\u987B>=1\uFF09"},{default:o(e=>[l(t,{prop:`commonComponent[${e.$index}].componentName`,rules:[{required:!0,message:""}]},{default:o(()=>[l(v,{modelValue:a.value.commonComponent[e.$index].componentName,"onUpdate:modelValue":u=>a.value.commonComponent[e.$index].componentName=u,placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:1}),l(d,{prop:"city",label:"\u516C\u5171\u7EC4\u4EF6\u7C7B\u578B"},{default:o(e=>[l(t,{prop:`commonComponent[${e.$index}].componentType`,rules:[{required:!0,message:""}]},{default:o(()=>[l(v,{modelValue:a.value.commonComponent[e.$index].componentType,"onUpdate:modelValue":u=>a.value.commonComponent[e.$index].componentType=u,placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:1}),l(d,{fixed:"right",label:"\u64CD\u4F5C"},{default:o(e=>[l(C,{link:"",type:"primary",onClick:u=>a.value.commonComponent.splice(e.$index,1)},{default:o(()=>n[16]||(n[16]=[r("\u5220\u9664")])),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),l(C,{type:"primary",plain:"",icon:"Plus",class:"w-full mb-8",onClick:n[6]||(n[6]=e=>a.value.commonComponent.push({}))},{default:o(()=>n[17]||(n[17]=[r("\u6DFB\u52A0\u7EC4\u4EF6 ")])),_:1})]),_:1})):$("",!0)]),_:1},8,["model"])}}};export{O as default};