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