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