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
8.2KB

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