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-DPH6Rmmi.js";import"./index-D2AmS0aU.js";import U from"./ThirdAppConfigModal-Bxh3LLPP.js";import{M as D}from"./antd-vue-vendor-CDWW6V_M.js";import{a9 as j,bj as _,u as z,_ as L}from"./index-B_2CoVdl.js";import"./BasicModal-D3g2CFhF.js";import"./ModalHeader-C-C0dUi_.js";import"./useTimeout-CB9F1PLu.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./index-DAURrYyA.js";import"./useWindowSizeFn-C3WExEpc.js";import"./index-Dz2zbQB_.js";import"./index-exs4VcBw.js";import"./index-ByLO0zSl.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./index-ARbUvvsq.js";import"./useForm-CcjrODHR.js";import"./componentMap-CzCGDP7x.js";import"./useFormItem-CWa0w7fA.js";import"./download-2tYEzlDW.js";import"./base64Conver-24EVOS6V.js";import"./index-Cgt544dC.js";import"./index-BZ9ST2iq.js";import"./useCountdown-ImUE7YaG.js";import"./useFormItemSingle-DM34aWgK.js";import"./JSelectUser-BQIJUcBR.js";import"./props-BCVPj-bG.js";import"./JSelectBiz-CJyWq5s2.js";import"./JAddInput-YFlAniYT.js";import"./areaDataUtil-DFHnz1wu.js";import"./china-area-data-vendor-D0sJ9kfX.js";import"./index-CkL00Q0a.js";import"./index-BKs2x_To.js";import"./bem-C6eT35UB.js";import"./props-BLY2qIO5.js";import"./useContextMenu-CSt5a1-F.js";import"./depart.api-0qTriT9h.js";import"./JDictSelectTag-CxpDdimB.js";import"./JSelectDept-wKz_Qtmc.js";import"./JPopup-BJBYqoWe.js";import"./JEllipsis-Cn7GCKHR.js";import"./JUpload-DzM-D4DX.js";import"./index-khU3p_On.js";import"./index-DPEnuI0R.js";import"./index-Cnb8BkwG.js";import"./JAreaLinkage-CSgDAlrn.js";import"./JCodeEditor-esTLnfS3.js";import"./htmlmixed-DRe7JlAp.js";import"./vue-B0b3nX1K.js";/* empty css             */import"./EasyCronInput-DclSHT47.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 to=L(K,[["render",tt],["__scopeId","data-v-b2767462"]]);export{to as default};
