Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

2 lignes
4.8KB

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