1 |
- import{d as Y,P as $,r as m,x as ee,b as ae,o as d,c as f,f as a,A as l,a as t,D as n,k as te,C as p,F as y,R as g,E as b,a3 as le,a2 as re,a9 as oe,V as ue,H as _e,S as se,U as de,bQ as me,at as ne,au as ie,aw as ce,J as pe,K as fe,W as ye,Z as ve,_ as he,__tla as ge}from"./index-f6fb8e95.js";import{_ as be,__tla as Ve}from"./Dialog-ac2b0e4e.js";import{_ as Ue,__tla as Ie}from"./Editor-87b5f27a.js";import{_ as ke,__tla as we}from"./UploadImg-76a51b31.js";import{a as qe,D as q,g as N,__tla as xe}from"./dict-c9a7f6a4.js";import{g as Ae,c as Be,u as Se,__tla as Fe}from"./index-eef9c382.js";import{g as He,__tla as Ne}from"./index-94688cab.js";import{i as Re,__tla as Ce}from"./spu-a7f31871.js";import Oe,{__tla as Te}from"./SpuSelect-90cd6073.js";import{__tla as De}from"./el-image-fefb4b54.js";import{__tla as Ee}from"./el-image-viewer-cfdb08a7.js";import{__tla as ze}from"./index-b76b57e5.js";import{__tla as Ge}from"./SkuList-d402df2e.js";import{u as Le,__tla as Me}from"./useMessage-3b767a67.js";import{__tla as Pe}from"./ContentWrap-96bb70ec.js";import{__tla as Je}from"./el-card-8db16709.js";import{__tla as Ke}from"./index-58a94653.js";import{__tla as Qe}from"./index-07a2f7ed.js";import{__tla as We}from"./el-tree-select-25b2ed74.js";import{__tla as Xe}from"./index-8bf65b8f.js";import{__tla as Ze}from"./formatTime-ddd96ac8.js";import"./tree-0af4953a.js";import{__tla as je}from"./category-4baa8823.js";import{__tla as Ye}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_ba706063_lang-8b438c45.js";import{__tla as $e}from"./UploadImgs.vue_vue_type_style_index_0_scoped_9d666400_lang-1b59ad7e.js";import{__tla as ea}from"./UploadFile.vue_vue_type_style_index_0_scoped_436eca1b_lang-3d49d983.js";let R,aa=Promise.all([(()=>{try{return ge}catch{}})(),(()=>{try{return Ve}catch{}})(),(()=>{try{return Ie}catch{}})(),(()=>{try{return we}catch{}})(),(()=>{try{return xe}catch{}})(),(()=>{try{return Fe}catch{}})(),(()=>{try{return Ne}catch{}})(),(()=>{try{return Ce}catch{}})(),(()=>{try{return Te}catch{}})(),(()=>{try{return De}catch{}})(),(()=>{try{return Ee}catch{}})(),(()=>{try{return ze}catch{}})(),(()=>{try{return Ge}catch{}})(),(()=>{try{return Me}catch{}})(),(()=>{try{return Pe}catch{}})(),(()=>{try{return Je}catch{}})(),(()=>{try{return Ke}catch{}})(),(()=>{try{return Qe}catch{}})(),(()=>{try{return We}catch{}})(),(()=>{try{return Xe}catch{}})(),(()=>{try{return Ze}catch{}})(),(()=>{try{return je}catch{}})(),(()=>{try{return Ye}catch{}})(),(()=>{try{return $e}catch{}})(),(()=>{try{return ea}catch{}})()]).then(async()=>{R=he(Y({name:"PromotionArticleForm",__name:"ArticleForm",emits:["success"],setup(ta,{expose:C,emit:O}){const{t:V}=$(),x=Le(),i=m(!1),A=m(""),c=m(!1),B=m(""),o=m({id:void 0,categoryId:void 0,title:void 0,author:void 0,picUrl:void 0,introduction:void 0,sort:0,status:0,spuId:0,recommendHot:!1,recommendBanner:!1,content:void 0}),T=ee({categoryId:[{required:!0,message:"\u5206\u7C7Bid\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],title:[{required:!0,message:"\u6587\u7AE0\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],picUrl:[{required:!0,message:"\u6587\u7AE0\u5C01\u9762\u56FE\u7247\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],sort:[{required:!0,message:"\u6392\u5E8F\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],status:[{required:!0,message:"\u72B6\u6001\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],spuId:[{required:!0,message:"\u5546\u54C1\u5173\u8054id\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],recommendHot:[{required:!0,message:"\u662F\u5426\u70ED\u95E8(\u5C0F\u7A0B\u5E8F)\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],recommendBanner:[{required:!0,message:"\u662F\u5426\u8F6E\u64AD\u56FE(\u5C0F\u7A0B\u5E8F)\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],content:[{required:!0,message:"\u6587\u7AE0\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),v=m(),S=m(),D=u=>{o.value.spuId=u};C({open:async(u,r)=>{if(i.value=!0,A.value=V("action."+u),B.value=u,G(),r){c.value=!0;try{o.value=await Ae(r)}finally{c.value=!1}}}});const E=O,z=async()=>{if(v&&await v.value.validate()){c.value=!0;try{const u=o.value;B.value==="create"?(await Be(u),x.success(V("common.createSuccess"))):(await Se(u),x.success(V("common.updateSuccess"))),i.value=!1,E("success")}finally{c.value=!1}}},G=()=>{var u;o.value={id:void 0,categoryId:void 0,title:void 0,author:void 0,picUrl:void 0,introduction:void 0,sort:0,status:0,spuId:0,recommendHot:!1,recommendBanner:!1,content:void 0},(u=v.value)==null||u.resetFields()},F=m([]),H=m([]);return ae(async()=>{F.value=await He(),H.value=await Re()}),(u,r)=>{const U=oe,_=ue,s=_e,L=se,M=de,P=ke,J=me,I=ne,k=ie,K=ce,w=pe,Q=Ue,W=fe,X=ye,Z=be,j=ve;return d(),f(y,null,[a(Z,{modelValue:t(i),"onUpdate:modelValue":r[12]||(r[12]=e=>re(i)?i.value=e:null),title:t(A),width:"70%"},{footer:l(()=>[a(w,{disabled:t(c),type:"primary",onClick:z},{default:l(()=>[n("\u786E \u5B9A")]),_:1},8,["disabled"]),a(w,{onClick:r[11]||(r[11]=e=>i.value=!1)},{default:l(()=>[n("\u53D6 \u6D88")]),_:1})]),default:l(()=>[te((d(),p(X,{ref_key:"formRef",ref:v,model:t(o),rules:t(T),"label-width":"110px"},{default:l(()=>[a(W,null,{default:l(()=>[a(s,{span:12},{default:l(()=>[a(_,{label:"\u6587\u7AE0\u6807\u9898",prop:"title"},{default:l(()=>[a(U,{modelValue:t(o).title,"onUpdate:modelValue":r[0]||(r[0]=e=>t(o).title=e),placeholder:"\u8BF7\u8F93\u5165\u6587\u7AE0\u6807\u9898"},null,8,["modelValue"])]),_:1})]),_:1}),a(s,{span:12},{default:l(()=>[a(_,{label:"\u6587\u7AE0\u5206\u7C7B",prop:"categoryId"},{default:l(()=>[a(M,{modelValue:t(o).categoryId,"onUpdate:modelValue":r[1]||(r[1]=e=>t(o).categoryId=e),placeholder:"\u8BF7\u9009\u62E9"},{default:l(()=>[(d(!0),f(y,null,g(t(F),e=>(d(),p(L,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),a(s,{span:12},{default:l(()=>[a(_,{label:"\u6587\u7AE0\u4F5C\u8005",prop:"author"},{default:l(()=>[a(U,{modelValue:t(o).author,"onUpdate:modelValue":r[2]||(r[2]=e=>t(o).author=e),placeholder:"\u8BF7\u8F93\u5165\u6587\u7AE0\u4F5C\u8005"},null,8,["modelValue"])]),_:1})]),_:1}),a(s,{span:12},{default:l(()=>[a(_,{label:"\u6587\u7AE0\u7B80\u4ECB",prop:"introduction"},{default:l(()=>[a(U,{modelValue:t(o).introduction,"onUpdate:modelValue":r[3]||(r[3]=e=>t(o).introduction=e),placeholder:"\u8BF7\u8F93\u5165\u6587\u7AE0\u7B80\u4ECB"},null,8,["modelValue"])]),_:1})]),_:1}),a(s,{span:24},{default:l(()=>[a(_,{label:"\u6587\u7AE0\u5C01\u9762",prop:"picUrl"},{default:l(()=>[a(P,{modelValue:t(o).picUrl,"onUpdate:modelValue":r[4]||(r[4]=e=>t(o).picUrl=e),height:"80px"},null,8,["modelValue"])]),_:1})]),_:1}),a(s,{span:12},{default:l(()=>[a(_,{label:"\u6392\u5E8F",prop:"sort"},{default:l(()=>[a(J,{modelValue:t(o).sort,"onUpdate:modelValue":r[5]||(r[5]=e=>t(o).sort=e),min:0,clearable:"","controls-position":"right"},null,8,["modelValue"])]),_:1})]),_:1}),a(s,{span:12},{default:l(()=>[a(_,{label:"\u72B6\u6001",prop:"status"},{default:l(()=>[a(k,{modelValue:t(o).status,"onUpdate:modelValue":r[6]||(r[6]=e=>t(o).status=e)},{default:l(()=>[(d(!0),f(y,null,g(t(qe)(t(q).COMMON_STATUS),e=>(d(),p(I,{key:e.value,label:e.value},{default:l(()=>[n(b(e.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),a(s,{span:12},{default:l(()=>[a(_,{label:"\u662F\u5426\u70ED\u95E8",prop:"recommendHot"},{default:l(()=>[a(k,{modelValue:t(o).recommendHot,"onUpdate:modelValue":r[7]||(r[7]=e=>t(o).recommendHot=e)},{default:l(()=>[(d(!0),f(y,null,g(t(N)(t(q).INFRA_BOOLEAN_STRING),e=>(d(),p(I,{key:e.value,label:e.value},{default:l(()=>[n(b(e.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),a(s,{span:12},{default:l(()=>[a(_,{label:"\u662F\u5426\u8F6E\u64AD\u56FE",prop:"recommendBanner"},{default:l(()=>[a(k,{modelValue:t(o).recommendBanner,"onUpdate:modelValue":r[8]||(r[8]=e=>t(o).recommendBanner=e)},{default:l(()=>[(d(!0),f(y,null,g(t(N)(t(q).INFRA_BOOLEAN_STRING),e=>(d(),p(I,{key:e.value,label:e.value},{default:l(()=>[n(b(e.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),a(s,{span:24},{default:l(()=>[a(_,{label:"\u5546\u54C1\u5173\u8054",prop:"spuId"},{default:l(()=>[t(o).spuId?(d(),p(K,{key:0,class:"mr-10px"},{default:l(()=>{var e;return[n(b((e=t(H).find(h=>h.id===t(o).spuId))==null?void 0:e.name),1)]}),_:1})):le("",!0),a(w,{onClick:r[9]||(r[9]=e=>{var h;return(h=t(S))==null?void 0:h.open()})},{default:l(()=>[n("\u9009\u62E9\u5546\u54C1")]),_:1})]),_:1})]),_:1}),a(s,{span:24},{default:l(()=>[a(_,{label:"\u6587\u7AE0\u5185\u5BB9"},{default:l(()=>[a(Q,{modelValue:t(o).content,"onUpdate:modelValue":r[10]||(r[10]=e=>t(o).content=e),height:"150px"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"])),[[j,t(c)]])]),_:1},8,["modelValue","title"]),a(t(Oe),{ref_key:"spuSelectRef",ref:S,onConfirm:D},null,512)],64)}}}),[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/mall/promotion/article/ArticleForm.vue"]])});export{aa as __tla,R as default};
|