var v=(e,t,u)=>new Promise((g,f)=>{var c=s=>{try{l(u.next(s))}catch(d){f(d)}},m=s=>{try{l(u.throw(s))}catch(d){f(d)}},l=s=>s.done?g(s.value):Promise.resolve(s.value).then(c,m);l((u=u.apply(e,t)).next())});import{d as T,f as k,o as h,l as y,U as r,a2 as x,a3 as I,a4 as o,k as a,af as p,G as F,a5 as M,F as S}from"./vue-vendor-CxLCUzY4.js";import{b as $,s as q}from"./ThirdApp.api-DFuc5JRk.js";import"./index-XZKTTfG1.js";import U from"./ThirdAppConfigModal-Cleg550A.js";import{M as D}from"./antd-vue-vendor-CahNzUUa.js";import{a9 as j,bj as _,u as z,_ as L}from"./index-CLZzJyTP.js";import"./BasicModal-B8XmAOm7.js";import"./ModalHeader-DIFQSP_0.js";import"./useTimeout-KpZCXEcl.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./index-DvqyyN77.js";import"./useWindowSizeFn-D9PllI8g.js";import"./index-DS3utcig.js";import"./index-BZbg0EjM.js";import"./index-CrdW4fN1.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./index-ByX9XNkE.js";import"./useForm-Dx3lJ3DG.js";import"./componentMap-DpsJvoqz.js";import"./useFormItem-IOFWTdED.js";import"./download-DopMSmFN.js";import"./base64Conver-24EVOS6V.js";import"./index-CDa2_aYE.js";import"./index-D0jTtUNS.js";import"./useCountdown-BpP55PQ2.js";import"./useFormItemSingle-BEyrYQqf.js";import"./JSelectUser-CfAGgHjD.js";import"./props-BtZrRNiI.js";import"./JSelectBiz-CLnJTMe2.js";import"./JAddInput-B36c3B5x.js";import"./areaDataUtil-Dk3xkGfK.js";import"./china-area-data-vendor-ByvEpbzN.js";import"./index-C7yPiS0L.js";import"./index-44tRnyoF.js";import"./bem-DT3DdmOs.js";import"./props-CG-jAkbI.js";import"./useContextMenu-BGU2vdqV.js";import"./depart.api-DHG2p2Yd.js";import"./JImageUpload-BFwNYdm5.js";import"./JDictSelectTag-CfF54ALX.js";import"./JSelectDept-CaEHrQp6.js";import"./JPopup-BvqhHpPl.js";import"./JEllipsis-C_gT_vEQ.js";import"./JUpload-DgDEmizw.js";import"./index-Bn2zmO2L.js";import"./index-CEznvAVZ.js";import"./index-CfAukas3.js";import"./JAreaLinkage-M9TGy8nY.js";import"./JCodeEditor-CR57XeIe.js";import"./htmlmixed-DoVLO6sG.js";import"./vue-DY75b9GC.js";/* empty css             */import"./EasyCronInput-CWOTSpxK.js";const K=T({name:"OrganDingConfigForm",components:{ThirdAppConfigModal:U},setup(){const{createMessage:e}=z(),t=k(""),u=k(!1),g=k({agentId:void 0,clientId:"",clientSecret:""}),[f,{openModal:c}]=j();function m(){return v(this,null,function*(){let i=_();c(!0,{tenantId:i,thirdType:"dingtalk"})})}function l(i){return v(this,null,function*(){let n=yield $(i);n&&(g.value=n)})}function s(){let i=_();l({tenantId:i,thirdType:"dingtalk"})}function d(){return v(this,null,function*(){u.value=!0,yield q().then(i=>{let n={};i.result&&(n={width:600,title:i.message,content:()=>{let B,w=["成功信息如下：",C(y,i.result.successInfo.map((b,A)=>`${A+1}. ${b}`).join(`
`))];return i.success?B=[...w,y("br"),"无失败信息！"]:B=["失败信息如下：",C(y,i.result.failInfo.map((b,A)=>`${A+1}. ${b}`).join(`
`)),y("br"),...w],B}}),i.success?n!=null?D.success(n):e.warning(i.message):n&&n.title?D.warning(n):e.warning({content:"同步失败，请检查对接信息录入中是否填写正确，并确认是否已开启钉钉配置！",duration:5})}).finally(()=>{u.value=!1})})}function C(i,n){return i("div",{id:"box",style:{minHeight:"100px",border:"1px solid #d9d9d9",fontSize:"14px",maxHeight:"250px",whiteSpace:"pre",overflow:"auto",padding:"10px"}},n)}function E(){window.open("https://help.qiaoqiaoyun.com/expand/dingdingsyn.html","_target")}return h(()=>{let i=_();l({tenantId:i,thirdType:"dingtalk"})}),{appConfigData:g,collapseActiveKey:t,registerAppConfigModal:f,dingEditClick:m,handleSuccess:s,syncDingTalk:d,btnLoading:u,handleIconClick:E}}}),N={class:"base-collapse"},V={class:"sync-padding"},H={class:"flex-flow"},R={class:"base-message"},G={class:"flex-flow"},O={class:"base-message"},J={class:"flex-flow"},P={class:"base-message"},Q={style:{"margin-top":"20px",width:"100%","text-align":"right"}},W={class:"sync-padding"},X={style:{"margin-top":"20px"},class:"base-desc"},Y={style:{"list-style-type":"disc","margin-left":"20px"}},Z={style:{float:"right"}};function tt(e,t,u,g,f,c){const m=r("a-collapse-panel"),l=r("a-collapse"),s=r("a-input-password"),d=r("a-button"),C=r("a-icon"),E=r("a-tooltip"),i=r("ThirdAppConfigModal");return x(),I(S,null,[o("div",N,[t[16]||(t[16]=o("div",{class:"header"}," 钉钉集成 ",-1)),a(l,{"expand-icon-position":"right",bordered:!1},{default:p(()=>[a(m,{key:"1"},{header:p(()=>t[3]||(t[3]=[o("div",{style:{"font-size":"16px"}}," 1.获取对接信息",-1)])),default:p(()=>[t[4]||(t[4]=o("div",{class:"base-desc"},"从钉钉开放平台获取对接信息，即可开始集成以及同步通讯录",-1)),t[5]||(t[5]=o("div",{style:{"margin-top":"5px"}},[o("a",{href:"https://help.qiaoqiaoyun.com/expand/dingding.html",target:"_blank"},"如何获取对接信息?")],-1))]),_:1})]),_:1}),o("div",V,[a(l,{"expand-icon-position":"right",bordered:!1},{default:p(()=>[a(m,{key:"2"},{header:p(()=>t[6]||(t[6]=[o("div",{style:{width:"100%","justify-content":"space-between",display:"flex"}},[o("div",{style:{"font-size":"16px"}}," 2.对接信息录入")],-1)])),default:p(()=>[t[11]||(t[11]=o("div",{class:"base-desc"},"完成步骤1后，填入Agentld、 AppKey、AppSecret后 可对接应用与同步通讯录",-1)),o("div",H,[t[7]||(t[7]=o("div",{class:"base-title"},"Agentld",-1)),o("div",R,[a(s,{value:e.appConfigData.agentId,"onUpdate:value":t[0]||(t[0]=n=>e.appConfigData.agentId=n),readonly:""},null,8,["value"])])]),o("div",G,[t[8]||(t[8]=o("div",{class:"base-title"},"AppKey",-1)),o("div",O,[a(s,{value:e.appConfigData.clientId,"onUpdate:value":t[1]||(t[1]=n=>e.appConfigData.clientId=n),readonly:""},null,8,["value"])])]),o("div",J,[t[9]||(t[9]=o("div",{class:"base-title"},"AppSecret",-1)),o("div",P,[a(s,{value:e.appConfigData.clientSecret,"onUpdate:value":t[2]||(t[2]=n=>e.appConfigData.clientSecret=n),readonly:""},null,8,["value"])])]),o("div",Q,[a(d,{onClick:e.dingEditClick},{default:p(()=>t[10]||(t[10]=[F("编辑")])),_:1},8,["onClick"])])]),_:1})]),_:1}),o("div",W,[t[15]||(t[15]=o("div",{style:{"font-size":"16px",width:"100%"}}," 3.数据同步",-1)),o("div",X,[t[14]||(t[14]=F(" 从钉钉同步到本地 ")),o("ul",Y,[t[13]||(t[13]=o("li",null,"同步部门到本地",-1)),o("li",null,[t[12]||(t[12]=F(" 同步部门下的用户到本地 ")),a(E,{title:"同步用户与部门文档"},{default:p(()=>[a(C,{onClick:e.handleIconClick,type:"question-circle",class:"sync-text"},null,8,["onClick"])]),_:1})])]),o("div",Z,[a(d,{loading:e.btnLoading,onClick:e.syncDingTalk},{default:p(()=>[F(M(e.btnLoading?"同步中":"同步"),1)]),_:1},8,["loading","onClick"])])])])])]),a(i,{onRegister:e.registerAppConfigModal,onSuccess:e.handleSuccess},null,8,["onRegister","onSuccess"])],64)}const oo=L(K,[["render",tt],["__scopeId","data-v-b2767462"]]);export{oo as default};
