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