1 |
- import{_ as te,d as oe,m as c,Q as y,a8 as de,c_ as v,r as p,ag as ne,o,A as i,x as a,B as re,u as _,ct as ie,h as t,c as g,F as V,y as E,H as D,b as se}from"./index.56449854.js";import{b as pe,c as me,d as _e,e as ve,r as fe,f as ce,g as ge}from"./configs.94834693.js";const Ve={"w-full":"",flex:"","justify-end":""},Ee=oe({__name:"share-modal",emits:["reload"],setup(be,{expose:S,emit:N}){const b=c(""),k=c(!1),f=c(!1),A=c(null),F=y(()=>!b.value),C={menu_ids:[],source_uid:"",source_data_group_id:"",uid:"",data_group_id:"",type:"2"},s=de({source:"1",target:"1"}),h=y(()=>k.value?"\u6570\u636E\u5171\u4EAB\u8BE6\u60C5":F.value?"\u521B\u5EFA\u6570\u636E\u5171\u4EAB":"\u7F16\u8F91\u6570\u636E\u5171\u4EAB"),U=()=>{f.value=!1,N("reload")},j=y(()=>I.value||q.value||G.value||Y.value),M=y(()=>K.value||P.value),l=c({...C}),{run:T,data:L,loading:G}=v({initalData:[]}),{run:H,data:Q,loading:q}=v({initalData:[]}),{run:z,data:w,loading:I}=v({initalData:[],isList:!0}),{run:J,loading:K}=v({success:()=>U()}),{run:O,loading:P}=v({success:()=>U()}),{run:W,data:X,loading:Y}=v({initalData:{},success:()=>{let{menu_list:m,source_data_group_id:u,data_group_id:d,uid:n,source_uid:r,type:x}=X.value;s.source=r==="0"?"2":"1",s.target=n==="0"?"2":"1",d=d==="0"?"":d,u=u==="0"?"":u,n=n==="0"?"":n,r=r==="0"?"":r,l.value={menu_ids:m.map(({id:B})=>B),source_data_group_id:u,data_group_id:d,source_uid:r,uid:n,type:x}}});function Z(){J(ce(l.value))}function $(){O(ge({id:b.value,...l.value}))}function ee(){A.value.validate(m=>{if(!!m){if(F.value)return Z();$()}})}return S({onDisplay(m="",u=!1){if(f.value=!0,T(pe()),H(me()),z(_e()),k.value=u,b.value=m,!m)return l.value={...C};W(ve({id:b.value}))}}),(m,u)=>{const d=p("el-option"),n=p("el-select"),r=p("el-form-item"),x=p("el-divider"),B=p("el-radio"),ue=p("el-radio-group"),R=p("el-button"),le=p("el-dialog"),ae=ne("loading");return o(),i(le,{"close-on-click-modal":!1,modelValue:f.value,"onUpdate:modelValue":u[12]||(u[12]=e=>f.value=e),title:h.value,center:"",onClose:u[13]||(u[13]=()=>l.value={...C})},{default:a(()=>[re((o(),i(_(ie),{"label-width":"120px",ref_key:"formRef",ref:A,model:l.value,disabled:k.value,rules:_(fe)},{default:a(()=>[t(r,{prop:"menu_ids",label:"\u5171\u4EAB\u7684\u83DC\u5355\u6570\u636E"},{default:a(()=>[t(n,{"w-full":"",modelValue:l.value.menu_ids,"onUpdate:modelValue":u[0]||(u[0]=e=>l.value.menu_ids=e),multiple:""},{default:a(()=>[(o(!0),g(V,null,E(_(Q),e=>(o(),i(d,{key:e.id,value:e.id,label:e.menu_name},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(r,{label:"\u6570\u636E\u6E90\u5171\u4EAB\u5BF9\u8C61",prop:s.source==="1"?"source_uid":"source_data_group_id"},{default:a(()=>[t(n,{"w-100px":"",modelValue:s.source,"onUpdate:modelValue":u[1]||(u[1]=e=>s.source=e),onChange:u[2]||(u[2]=e=>e==="1"?l.value.source_data_group_id="":l.value.source_uid="")},{default:a(()=>[t(d,{value:"1",label:"\u7528\u6237"}),t(d,{value:"2",label:"\u7528\u6237\u7EC4"})]),_:1},8,["modelValue"]),s.source==="1"?(o(),i(n,{key:0,"flex-1":"",placeholder:"\u8BF7\u9009\u62E9\u7528\u6237",modelValue:l.value.source_uid,"onUpdate:modelValue":u[3]||(u[3]=e=>l.value.source_uid=e)},{default:a(()=>[(o(!0),g(V,null,E(_(L),e=>(o(),i(d,{key:e.id,value:e.id,label:e.nickname},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])):(o(),i(n,{key:1,"flex-1":"",placeholder:"\u8BF7\u9009\u62E9\u7528\u6237\u7EC4",modelValue:l.value.source_data_group_id,"onUpdate:modelValue":u[4]||(u[4]=e=>l.value.source_data_group_id=e)},{default:a(()=>[(o(!0),g(V,null,E(_(w),e=>(o(),i(d,{key:e.id,value:e.id,label:e.title},null,8,["value","label"]))),128))]),_:1},8,["modelValue"]))]),_:1},8,["prop"]),t(x),t(r,{label:"\u6570\u636E\u5171\u4EAB\u5BF9\u8C61",prop:s.target==="1"?"uid":"data_group_id"},{default:a(()=>[t(n,{"w-100px":"",modelValue:s.target,"onUpdate:modelValue":u[5]||(u[5]=e=>s.target=e),onChange:u[6]||(u[6]=e=>e==="1"?l.value.source_uid="":l.value.uid="")},{default:a(()=>[t(d,{value:"1",label:"\u7528\u6237"}),t(d,{value:"2",label:"\u7528\u6237\u7EC4"})]),_:1},8,["modelValue"]),s.target==="1"?(o(),i(n,{key:0,"flex-1":"",placeholder:"\u8BF7\u9009\u62E9\u7528\u6237",modelValue:l.value.uid,"onUpdate:modelValue":u[7]||(u[7]=e=>l.value.uid=e)},{default:a(()=>[(o(!0),g(V,null,E(_(L),e=>(o(),i(d,{key:e.id,value:e.id,label:e.nickname},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])):(o(),i(n,{key:1,"flex-1":"",placeholder:"\u8BF7\u9009\u62E9\u7528\u6237\u7EC4",modelValue:l.value.data_group_id,"onUpdate:modelValue":u[8]||(u[8]=e=>l.value.data_group_id=e)},{default:a(()=>[(o(!0),g(V,null,E(_(w),e=>(o(),i(d,{key:e.id,value:e.id,label:e.title},null,8,["value","label"]))),128))]),_:1},8,["modelValue"]))]),_:1},8,["prop"]),t(r,{label:"\u5171\u4EAB\u7684\u6570\u636E\u6743\u9650",prop:"type"},{default:a(()=>[t(ue,{modelValue:l.value.type,"onUpdate:modelValue":u[9]||(u[9]=e=>l.value.type=e)},{default:a(()=>[t(B,{label:"2"},{default:a(()=>[D("\u53EA\u8BFB")]),_:1}),t(B,{label:"1"},{default:a(()=>[D("\u8BFB\u5199")]),_:1})]),_:1},8,["modelValue"])]),_:1}),t(r,null,{default:a(()=>[se("div",Ve,[t(R,{type:"primary",onClick:u[10]||(u[10]=()=>ee()),loading:M.value},{default:a(()=>[D("\u63D0\u4EA4 ")]),_:1},8,["loading"]),t(R,{onClick:u[11]||(u[11]=()=>f.value=!1)},{default:a(()=>[D("\u53D6\u6D88")]),_:1})])]),_:1})]),_:1},8,["model","disabled","rules"])),[[ae,j.value]])]),_:1},8,["modelValue","title"])}}});var De=te(Ee,[["__file","C:/Users/89793/Desktop/projects/report-v3/src/views/interest/dataShare/components/share-modal.vue"]]);export{De as default};
|