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