No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

2 líneas
12KB

  1. import{r as f,o as F,L,c as m,e as i,I as s,i as o,h as l,f as V,F as x,J as D,j as r,k as $,g as _}from"./index.ce13ff81.js";const z=[{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"}]}],M=_("span",{style:{color:"red"}},"*",-1),O=_("span",{style:{color:"red"}},"*",-1),j=_("span",{style:{color:"red"}},"*",-1),Q=_("span",{style:{color:"red"}},"*",-1),J=_("span",{style:{color:"red"}},"*",-1),H={__name:"plannedUseResources",props:{detailData:{type:Object,default:()=>({})}},setup(U,{expose:P}){const c=U;function T(p){let t=[];return h.value.forEach(G=>{G.name===p&&(t=G.children)}),t}function w(p){a.value.cloudResource[p].baseSpecification=""}const h=f(z),R=f(),a=f({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=c.detailData.mobileTerminalEntry,c.detailData.cloudResource&&(a.value.cloudResource=c.detailData.cloudResource||[]),a.value.commonComponent&&(a.value.commonComponent=c.detailData.commonComponent||[]),a.value.produceData&&(a.value.produceData=c.detailData.produceData||[]),a.value.isCloudResource=c.detailData.isCloudResource,a.value.isProduceData=c.detailData.isProduceData,a.value.isCommonComponent=c.detailData.isCommonComponent}),L(()=>c.detailData,p=>{},{deep:!0});function q(p){R.value.validate(t=>{p(t)})}P({validForm:q,formData:a});const E=f([{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(p,t)=>{const G=m("el-checkbox"),S=m("el-checkbox-group"),u=m("el-form-item"),b=m("el-switch"),d=m("el-table-column"),g=m("el-option"),k=m("el-select"),B=m("el-input-number"),v=m("el-input"),C=m("el-button"),y=m("el-table"),I=m("el-form");return i(),s(I,{ref_key:"ruleFormRef",ref:R,model:a.value,"label-position":"right","label-width":"180px","label-suffix":":","scroll-to-error":"",rules:N,"validate-on-rule-change":!1},{default:o(()=>[l(u,{label:"\u79FB\u52A8\u7AEF\u5165\u53E3",prop:"mobileTerminalEntry"},{default:o(()=>[l(S,{modelValue:a.value.mobileTerminalEntry,"onUpdate:modelValue":t[0]||(t[0]=e=>a.value.mobileTerminalEntry=e)},{default:o(()=>[(i(!0),V(x,null,D(E.value,e=>(i(),s(G,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),l(u,{label:"\u662F\u5426\u4F7F\u7528\u4E91\u8D44\u6E90"},{default:o(()=>[l(b,{modelValue:a.value.isCloudResource,"onUpdate:modelValue":t[1]||(t[1]=e=>a.value.isCloudResource=e),"active-value":1,"inactive-value":0},null,8,["modelValue"])]),_:1}),a.value.isCloudResource===1?(i(),s(u,{key:0,prop:"cloudResource"},{default:o(()=>[l(y,{data:a.value.cloudResource,style:{width:"100%"}},{default:o(()=>[l(d,{type:"index",label:"\u5E8F\u53F7",width:"60"}),l(d,{prop:"state"},{header:o(()=>[M,r("\u4E91\u8D44\u6E90\u7C7B\u578B ")]),default:o(e=>[l(u,{prop:`cloudResource[${e.$index}].cloudResourceType`,rules:[{required:!0,message:""}]},{default:o(()=>[l(k,{modelValue:a.value.cloudResource[e.$index].cloudResourceType,"onUpdate:modelValue":n=>a.value.cloudResource[e.$index].cloudResourceType=n,placeholder:"\u8BF7\u9009\u62E9",size:"large",onChange:n=>w(e.$index)},{default:o(()=>[(i(!0),V(x,null,D(h.value,n=>(i(),s(g,{key:n.name,label:n.name,value:n.name},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]),_:2},1032,["prop"])]),_:1}),l(d,{prop:"city"},{header:o(()=>[O,r("\u57FA\u7840\u89C4\u683C ")]),default:o(e=>[l(u,{prop:`cloudResource[${e.$index}].baseSpecification`,rules:[{required:!0,message:""}]},{default:o(()=>[l(k,{modelValue:a.value.cloudResource[e.$index].baseSpecification,"onUpdate:modelValue":n=>a.value.cloudResource[e.$index].baseSpecification=n,placeholder:"\u8BF7\u9009\u62E9",size:"large"},{default:o(()=>[(i(!0),V(x,null,D(T(a.value.cloudResource[e.$index].cloudResourceType),n=>(i(),s(g,{key:n.name,label:n.name,value:n.name},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:1}),l(d,{prop:"address"},{header:o(()=>[j,r("\u53F0\u6570 ")]),default:o(e=>[l(u,{prop:`cloudResource[${e.$index}].serversCount`,rules:[{required:!0,message:""}]},{default:o(()=>[l(B,{modelValue:a.value.cloudResource[e.$index].serversCount,"onUpdate:modelValue":n=>a.value.cloudResource[e.$index].serversCount=n,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(u,null,{default:o(()=>[l(v,{modelValue:a.value.cloudResource[e.$index].description,"onUpdate:modelValue":n=>a.value.cloudResource[e.$index].description=n,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:n=>a.value.cloudResource.splice(e.$index,1)},{default:o(()=>[r("\u5220\u9664")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),l(C,{type:"primary",plain:"",icon:"Plus",class:"w-full mb-8",onClick:t[2]||(t[2]=e=>a.value.cloudResource.push({}))},{default:o(()=>[r("\u6DFB\u52A0\u4E91\u8D44\u6E90 ")]),_:1})]),_:1})):$("",!0),l(u,{label:"\u662F\u5426\u4EA7\u751F\u6570\u636E"},{default:o(()=>[l(b,{modelValue:a.value.isProduceData,"onUpdate:modelValue":t[3]||(t[3]=e=>a.value.isProduceData=e),"active-value":1,"inactive-value":0},null,8,["modelValue"])]),_:1}),a.value.isProduceData===1?(i(),s(u,{key:1,prop:"isProduceData"},{default:o(()=>[l(y,{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(()=>[Q,r("\u6570\u636E\u76EE\u5F55\u540D\u79F0 ")]),default:o(e=>[l(u,{prop:`produceData[${e.$index}].dataDirectoryName`,rules:[{required:!0,message:""}]},{default:o(()=>[l(v,{modelValue:a.value.produceData[e.$index].dataDirectoryName,"onUpdate:modelValue":n=>a.value.produceData[e.$index].dataDirectoryName=n,placeholder:"\u6570\u636E\u76EE\u5F55\u540D\u79F0"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])]),_:1}),l(d,{prop:"city"},{header:o(()=>[J,r("\u6570\u636E\u9879 ")]),default:o(e=>[l(u,{prop:`produceData[${e.$index}].dataItem`,rules:[{required:!0,message:""}]},{default:o(()=>[l(v,{modelValue:a.value.produceData[e.$index].dataItem,"onUpdate:modelValue":n=>a.value.produceData[e.$index].dataItem=n,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:n=>a.value.produceData.splice(e.$index,1)},{default:o(()=>[r("\u5220\u9664")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),l(C,{type:"primary",plain:"",icon:"Plus",class:"w-full mb-8",onClick:t[4]||(t[4]=e=>a.value.produceData.push({}))},{default:o(()=>[r("\u6DFB\u52A0\u6570\u636E\u9879 ")]),_:1})]),_:1})):$("",!0),l(u,{label:"\u662F\u5426\u4F7F\u7528\u516C\u5171\u7EC4\u4EF6"},{default:o(()=>[l(b,{modelValue:a.value.isCommonComponent,"onUpdate:modelValue":t[5]||(t[5]=e=>a.value.isCommonComponent=e),"active-value":1,"inactive-value":0},null,8,["modelValue"])]),_:1}),a.value.isCommonComponent===1?(i(),s(u,{key:2,prop:"isProduceData"},{default:o(()=>[l(y,{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(u,{prop:`commonComponent[${e.$index}].componentName`,rules:[{required:!0,message:""}]},{default:o(()=>[l(v,{modelValue:a.value.commonComponent[e.$index].componentName,"onUpdate:modelValue":n=>a.value.commonComponent[e.$index].componentName=n,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(u,{prop:`commonComponent[${e.$index}].componentType`,rules:[{required:!0,message:""}]},{default:o(()=>[l(v,{modelValue:a.value.commonComponent[e.$index].componentType,"onUpdate:modelValue":n=>a.value.commonComponent[e.$index].componentType=n,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:n=>a.value.commonComponent.splice(e.$index,1)},{default:o(()=>[r("\u5220\u9664")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),l(C,{type:"primary",plain:"",icon:"Plus",class:"w-full mb-8",onClick:t[6]||(t[6]=e=>a.value.commonComponent.push({}))},{default:o(()=>[r("\u6DFB\u52A0\u7EC4\u4EF6 ")]),_:1})]),_:1})):$("",!0)]),_:1},8,["model"])}}};export{H as default};