Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

2 linhas
5.1KB

  1. var V=(y,$,r)=>new Promise((l,s)=>{var k=n=>{try{c(r.next(n))}catch(f){s(f)}},C=n=>{try{c(r.throw(n))}catch(f){s(f)}},c=n=>n.done?l(n.value):Promise.resolve(n.value).then(k,C);c((r=r.apply(y,$)).next())});import{_ as D,d as J,r as w,L as B,c as i,e as v,I as _,j as t,i as a,k as j,h as g,Y as M,g as P}from"./index.eb58a47a.js";const S=["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:$}){const r=y,l=w({perIndicator:[]}),s=w(),k={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"}]},C=[{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=u=>{l.value.perIndicator.splice(u,1)},f=u=>V(this,null,function*(){!u||(yield u.validate(o=>V(this,null,function*(){if(o){const m=JSON.parse(JSON.stringify(l.value));x("setContent",m),x("close",!0)}})))}),x=$;return B(()=>r.visible,u=>V(this,null,function*(){var o;u&&r.data?l.value=JSON.parse(JSON.stringify(r.data)):((o=s.value)==null||o.resetFields(),l.value={perIndicator:[]})})),(u,o)=>{const m=i("el-input"),p=i("el-form-item"),I=i("el-button"),b=i("el-option"),h=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(()=>[j("\u63D0\u4EA4")]),_:1}),a(I,{onClick:o[4]||(o[4]=e=>x("close"))},{default:t(()=>[j("\u53D6\u6D88")]),_:1})]),default:t(()=>[a(N,{ref_key:"formRef",ref:s,"label-suffix":":",model:l.value,rules:k,"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(()=>[j("\u6DFB\u52A0 ")]),_:1}),a(O,{pagination:!1,column:C,"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":d=>l.value.perIndicator[e.$index].name=d,placeholder:"\u8BF7\u8F93\u5165",maxlength:"50"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):g("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(h,{modelValue:l.value.perIndicator[e.$index].symbol,"onUpdate:modelValue":d=>l.value.perIndicator[e.$index].symbol=d},{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"])):g("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":d=>l.value.perIndicator[e.$index].nums=d,controls:!1,class:"flex-1 mr-8",placeholder:"\u8BF7\u8F93\u5165",onMousewheel:o[2]||(o[2]=M(()=>{},["prevent"]))},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):g("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":d=>l.value.perIndicator[e.$index].unit=d,placeholder:"\u8BF7\u8F93\u5165",maxlength:"10"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["prop"])):g("v-if",!0)]),action:t(({scope:e})=>[P("a",{class:"text-danger cursor-pointer",onClick:d=>n(e.$index)},"\u79FB\u9664",8,S)]),_: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/declareManage/operationProjectRecord/operationProjectEdit/components/projectContentDialog.vue"]]);export{L as default};