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

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