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

  1. var $=(v,I,n)=>new Promise((t,s)=>{var V=o=>{try{c(n.next(o))}catch(f){s(f)}},g=o=>{try{c(n.throw(o))}catch(f){s(f)}},c=o=>o.done?t(o.value):Promise.resolve(o.value).then(V,g);c((n=n.apply(v,I)).next())});import{d as q,r as w,L as B,c as u,e as m,I as p,i as a,h as i,j as N,k as _,Y as J,g as j}from"./index.3fb2f955.js";const M=["onClick"],P=q({name:"actualPerformanceIndicatorsDialog"}),A=Object.assign(P,{props:{visible:{type:Boolean,default:!1,required:!0},data:Object},emits:["close","setContent"],setup(v,{emit:I}){const n=v,t=w({perIndicator:[]}),s=w(),V={perIndicator:[{required:!0,message:"\u8BF7\u81F3\u5C11\u6DFB\u52A0\u4E00\u4E2A\u5B9E\u9645\u6210\u6548\u6307\u6807"}]},g=[{label:"\u6838\u5FC3\u4E1A\u52A1\u540D\u79F0",key:"businessName",slot:"businessName",width:140},{label:"\u5B9E\u9645\u6210\u6548\u6307\u6807\u540D\u79F0",key:"name",slot:"name",width:140},{label:"\u6570\u503C",key:"nums",slot:"nums"},{label:"\u5355\u4F4D",key:"unit",slot:"unit"},{label:"\u64CD\u4F5C",key:"action",slot:"action",width:70}],c=()=>{t.value.perIndicator.push({})},o=d=>{t.value.perIndicator.splice(d,1)},f=d=>$(this,null,function*(){!d||(yield d.validate(l=>$(this,null,function*(){if(l){const b=JSON.parse(JSON.stringify(t.value.perIndicator));x("setContent",b),x("close",!0)}})))}),k=w(!0),x=I;return B(()=>n.visible,d=>$(this,null,function*(){var l;d&&n.data?(k.value=!n.data,t.value.perIndicator=[JSON.parse(JSON.stringify(n.data))]):(k.value=!0,(l=s.value)==null||l.resetFields(),t.value={perIndicator:[]})})),(d,l)=>{const b=u("el-button"),h=u("el-input"),y=u("el-form-item"),C=u("el-input-number"),U=u("table-list"),O=u("el-form"),S=u("el-dialog");return m(),p(S,{"model-value":v.visible,title:"\u6DFB\u52A0",size:840,onClose:l[3]||(l[3]=e=>x("close"))},{footer:a(()=>[i(b,{type:"primary",onClick:l[1]||(l[1]=e=>f(s.value))},{default:a(()=>[N("\u63D0\u4EA4")]),_:1}),i(b,{onClick:l[2]||(l[2]=e=>x("close"))},{default:a(()=>[N("\u53D6\u6D88")]),_:1})]),default:a(()=>[i(O,{ref_key:"formRef",ref:s,"label-suffix":":",model:t.value,rules:V,"label-width":"160"},{default:a(()=>[k.value?(m(),p(b,{key:0,type:"primary",plain:"",icon:"Plus",class:"w-full mb-8",onClick:c},{default:a(()=>[N("\u6DFB\u52A0 ")]),_:1})):_("",!0),i(U,{pagination:!1,column:g,"empty-temp":!1,data:t.value.perIndicator},{businessName:a(({scope:e})=>[e.$index>=0?(m(),p(y,{key:0,prop:`perIndicator[${e.$index}].businessName`,rules:[{required:!0,message:" "}],"label-width":"0",style:{"margin-bottom":"0"}},{default:a(()=>[i(h,{modelValue:t.value.perIndicator[e.$index].businessName,"onUpdate:modelValue":r=>t.value.perIndicator[e.$index].businessName=r,placeholder:"\u8BF7\u8F93\u5165",maxlength:"50"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):_("",!0)]),name:a(({scope:e})=>[e.$index>=0?(m(),p(y,{key:0,prop:`perIndicator[${e.$index}].name`,rules:[{required:!0,message:" "}],"label-width":"0",style:{"margin-bottom":"0"}},{default:a(()=>[i(h,{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"])):_("",!0)]),nums:a(({scope:e})=>[e.$index>=0?(m(),p(y,{key:0,prop:`perIndicator[${e.$index}].nums`,"label-width":"0",style:{"margin-bottom":"0"}},{default:a(()=>[i(C,{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[0]||(l[0]=J(()=>{},["prevent"]))},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):_("",!0)]),unit:a(({scope:e})=>[e.$index>=0?(m(),p(y,{key:0,prop:`perIndicator[${e.$index}].unit`,"label-width":"0",style:{"margin-bottom":"0"}},{default:a(()=>[i(h,{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"])):_("",!0)]),action:a(({scope:e})=>[j("a",{class:"text-danger cursor-pointer",onClick:r=>o(e.$index)},"\u79FB\u9664",8,M)]),_:1},8,["data"])]),_:1},8,["model"])]),_:1},8,["model-value"])}}});export{A as default};