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