import{d as q,r as V,L as B,c as o,e as m,I as p,i as t,h as a,j as y,k as b,V as J,g as S}from"./index.5bb861d3.js";const M=["onClick"],R=q({name:"projectContentDialog"}),D=Object.assign(R,{props:{visible:{type:Boolean,default:!1,required:!0},data:Object},emits:["close","setContent"],setup(x,{emit:$}){const f=x,l=V({perIndicator:[]}),_=V(),g={mainContent:[{required:!0,message:"\u8BF7\u8F93\u5165\u9879\u76EE\u4E3B\u8981\u5185\u5BB9"}],businessObject:[{required:!0,message:"\u8BF7\u8F93\u5165\u4E1A\u52A1\u5BF9\u8C61"}],perIndicator:[{required:!0,message:"\u8BF7\u81F3\u5C11\u6DFB\u52A0\u4E00\u4E2A\u9884\u671F\u6210\u6548\u6307\u6807"}]},I=[{label:"\u9884\u671F\u6210\u6548\u6307\u6807\u540D\u79F0",key:"name",slot:"name",width:140},{label:"\u7B26\u53F7",key:"symbol",slot:"symbol"},{label:"\u6570\u503C",key:"nums",slot:"nums"},{label:"\u5355\u4F4D",key:"unit",slot:"unit"},{label:"\u64CD\u4F5C",key:"action",slot:"action",width:70}],k=()=>{l.value.perIndicator.push({})},C=d=>{l.value.perIndicator.splice(d,1)},w=async d=>{!d||await d.validate(async n=>{if(n){const r=JSON.parse(JSON.stringify(l.value));c("setContent",r),c("close",!0)}})},c=$;return B(()=>f.visible,async d=>{var n;d&&f.data?l.value=JSON.parse(JSON.stringify(f.data)):((n=_.value)==null||n.resetFields(),l.value={perIndicator:[]})}),(d,n)=>{const r=o("el-input"),u=o("el-form-item"),v=o("el-button"),s=o("el-option"),h=o("el-select"),O=o("el-input-number"),U=o("table-list"),j=o("el-form"),N=o("el-dialog");return m(),p(N,{"model-value":x.visible,title:"\u6DFB\u52A0",size:840,onClose:n[5]||(n[5]=e=>c("close"))},{footer:t(()=>[a(v,{type:"primary",onClick:n[3]||(n[3]=e=>w(_.value))},{default:t(()=>[y("\u63D0\u4EA4")]),_:1}),a(v,{onClick:n[4]||(n[4]=e=>c("close"))},{default:t(()=>[y("\u53D6\u6D88")]),_:1})]),default:t(()=>[a(j,{ref_key:"formRef",ref:_,"label-suffix":":",model:l.value,rules:g,"label-width":"160"},{default:t(()=>[a(u,{label:"\u9879\u76EE\u4E3B\u8981\u5185\u5BB9",prop:"mainContent"},{default:t(()=>[a(r,{modelValue:l.value.mainContent,"onUpdate:modelValue":n[0]||(n[0]=e=>l.value.mainContent=e),placeholder:"\u8BF7\u8F93\u5165",maxlength:"100"},null,8,["modelValue"])]),_:1}),a(u,{label:"\u4E1A\u52A1\u5BF9\u8C61",prop:"businessObject"},{default:t(()=>[a(r,{modelValue:l.value.businessObject,"onUpdate:modelValue":n[1]||(n[1]=e=>l.value.businessObject=e),placeholder:"\u8BF7\u8F93\u5165",maxlength:"100"},null,8,["modelValue"])]),_:1}),a(v,{type:"primary",plain:"",icon:"Plus",class:"w-full mb-8",onClick:k},{default:t(()=>[y("\u6DFB\u52A0 ")]),_:1}),a(U,{pagination:!1,column:I,"empty-temp":!1,data:l.value.perIndicator},{name:t(({scope:e})=>[e.$index>=0?(m(),p(u,{key:0,prop:`perIndicator[${e.$index}].name`,rules:[{required:!0,message:" "}],"label-width":"0",style:{"margin-bottom":"0"}},{default:t(()=>[a(r,{modelValue:l.value.perIndicator[e.$index].name,"onUpdate:modelValue":i=>l.value.perIndicator[e.$index].name=i,placeholder:"\u8BF7\u8F93\u5165",maxlength:"50"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):b("",!0)]),symbol:t(({scope:e})=>[e.$index>=0?(m(),p(u,{key:0,prop:`perIndicator[${e.$index}].symbol`,"label-width":"0",style:{"margin-bottom":"0"}},{default:t(()=>[a(h,{modelValue:l.value.perIndicator[e.$index].symbol,"onUpdate:modelValue":i=>l.value.perIndicator[e.$index].symbol=i},{default:t(()=>[a(s,{label:"\u7B49\u4E8E",value:"\u7B49\u4E8E"}),a(s,{label:"\u5927\u4E8E",value:"\u5927\u4E8E"}),a(s,{label:"\u5927\u4E8E\u7B49\u4E8E",value:"\u5927\u4E8E\u7B49\u4E8E"}),a(s,{label:"\u5C0F\u4E8E",value:"\u5C0F\u4E8E"}),a(s,{label:"\u5C0F\u4E8E\u7B49\u4E8E",value:"\u5C0F\u4E8E\u7B49\u4E8E"})]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):b("",!0)]),nums:t(({scope:e})=>[e.$index>=0?(m(),p(u,{key:0,prop:`perIndicator[${e.$index}].nums`,"label-width":"0",style:{"margin-bottom":"0"}},{default:t(()=>[a(O,{modelValue:l.value.perIndicator[e.$index].nums,"onUpdate:modelValue":i=>l.value.perIndicator[e.$index].nums=i,controls:!1,class:"flex-1 mr-8",placeholder:"\u8BF7\u8F93\u5165",onMousewheel:n[2]||(n[2]=J(()=>{},["prevent"]))},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):b("",!0)]),unit:t(({scope:e})=>[e.$index>=0?(m(),p(u,{key:0,prop:`perIndicator[${e.$index}].unit`,"label-width":"0",style:{"margin-bottom":"0"}},{default:t(()=>[a(r,{modelValue:l.value.perIndicator[e.$index].unit,"onUpdate:modelValue":i=>l.value.perIndicator[e.$index].unit=i,placeholder:"\u8BF7\u8F93\u5165",maxlength:"10"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):b("",!0)]),action:t(({scope:e})=>[S("a",{class:"text-danger cursor-pointer",onClick:i=>C(e.$index)},"\u79FB\u9664",8,M)]),_:1},8,["data"])]),_:1},8,["model"])]),_:1},8,["model-value"])}}});export{D as default};
