Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

2 rindas
3.9KB

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