Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

2 wiersze
4.8KB

  1. import{d as N,r as V,L as B,c as o,e as s,I as p,i as t,h as a,j as y,k as c,V as J,f as S}from"./index.d340e473.js";const M=["onClick"],R=N({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"}]},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=()=>{l.value.perIndicator.push({})},C=u=>{l.value.perIndicator.splice(u,1)},w=async u=>{!u||await u.validate(async n=>{if(n){const i=JSON.parse(JSON.stringify(l.value));b("setContent",i),b("close",!0)}})},b=$;return B(()=>f.visible,async u=>{var n;u&&f.data?l.value=JSON.parse(JSON.stringify(f.data)):((n=_.value)==null||n.resetFields(),l.value={perIndicator:[{},{},{}]})}),(u,n)=>{const i=o("el-input"),d=o("el-form-item"),v=o("el-button"),m=o("el-option"),h=o("el-select"),O=o("el-input-number"),U=o("table-list"),j=o("el-form"),q=o("el-dialog");return s(),p(q,{"model-value":x.visible,title:"\u6DFB\u52A0",size:840,onClose:n[5]||(n[5]=e=>b("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=>b("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(d,{label:"\u9879\u76EE\u4E3B\u8981\u5185\u5BB9",prop:"mainContent"},{default:t(()=>[a(i,{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(d,{label:"\u4E1A\u52A1\u5BF9\u8C61",prop:"businessObject"},{default:t(()=>[a(i,{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:I},{default:t(()=>[y("\u6DFB\u52A0 ")]),_:1}),a(U,{pagination:!1,column:k,"empty-temp":!1,data:l.value.perIndicator},{name:t(({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:t(()=>[a(i,{modelValue:l.value.perIndicator[e.$index].name,"onUpdate:modelValue":r=>l.value.perIndicator[e.$index].name=r,placeholder:"\u8BF7\u8F93\u5165",maxlength:"50"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):c("",!0)]),symbol:t(({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:t(()=>[a(h,{modelValue:l.value.perIndicator[e.$index].symbol,"onUpdate:modelValue":r=>l.value.perIndicator[e.$index].symbol=r},{default:t(()=>[a(m,{label:"\u7B49\u4E8E",value:"\u7B49\u4E8E"}),a(m,{label:"\u5927\u4E8E",value:"\u5927\u4E8E"}),a(m,{label:"\u5927\u4E8E\u7B49\u4E8E",value:"\u5927\u4E8E\u7B49\u4E8E"}),a(m,{label:"\u5C0F\u4E8E",value:"\u5C0F\u4E8E"}),a(m,{label:"\u5C0F\u4E8E\u7B49\u4E8E",value:"\u5C0F\u4E8E\u7B49\u4E8E"})]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):c("",!0)]),nums:t(({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:t(()=>[a(O,{modelValue:l.value.perIndicator[e.$index].nums,"onUpdate:modelValue":r=>l.value.perIndicator[e.$index].nums=r,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"])):c("",!0)]),unit:t(({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:t(()=>[a(i,{modelValue:l.value.perIndicator[e.$index].unit,"onUpdate:modelValue":r=>l.value.perIndicator[e.$index].unit=r,placeholder:"\u8BF7\u8F93\u5165",maxlength:"10"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):c("",!0)]),action:t(({scope:e})=>[e.$index>2?(s(),S("a",{key:0,class:"text-danger cursor-pointer",onClick:r=>C(e.$index)},"\u79FB\u9664",8,M)):c("",!0)]),_:1},8,["data"])]),_:1},8,["model"])]),_:1},8,["model-value"])}}});export{D as default};