import{d as E,a1 as M,U as d,a2 as v,a3 as O,k as n,af as a,u as p,G as L,ad as K,V as Q,ag as q}from"./vue-vendor-CxLCUzY4.js";import"./index-BN5Ac_IG.js";import{useListPage as F}from"./useListPage-i3Wl0_Fg.js";import{s as j,c as G,l as X,g as z,d as H,b as J,C as W}from"./CgreportModal-5a23d089-DODfTjhl.js";import"./index-CF_FJn6P.js";import{C as N}from"./clipboard-DYn7lcX7.js";import{a9 as Y,X as Z}from"./index-CYriLmQo.js";import"./index-BkgeZpOO.js";import"./useJvxeMethods-BYzirYDT.js";import"./user.api-BUwWVSBN.js";import{Q as ee}from"./componentMap-7D1QIeNI.js";import te from"./BasicTable-DAfCfXmD.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./useForm-8o5KRzWo.js";import"./index-CxQILSKV.js";import"./index-BRTtls-l.js";import"./index-DOuVMe-q.js";import"./index-ByLO0zSl.js";import"./useTimeout-DC8132dd.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./BasicModal-BBgVjypv.js";import"./ModalHeader-jGKMr-DQ.js";import"./useWindowSizeFn-BxrEMPtP.js";import"./useFormItem-CWa0w7fA.js";import"./download-CkbK5et1.js";import"./base64Conver-24EVOS6V.js";import"./index-QMJkXEyl.js";import"./index-Bb_NRLur.js";import"./useCountdown-C3-PRPLY.js";import"./useFormItemSingle-DM34aWgK.js";import"./JSelectUser-nVFm3ao2.js";import"./props-DoGpHXAD.js";import"./JSelectBiz-BW6f3e--.js";import"./JAddInput-CXT54-j9.js";import"./areaDataUtil-DFHnz1wu.js";import"./china-area-data-vendor-D0sJ9kfX.js";import"./index-BTSd5ebC.js";import"./index-BTAl55Kt.js";import"./bem-2ra1afoV.js";import"./props-BLY2qIO5.js";import"./useContextMenu-DYyhcDf7.js";import"./depart.api-C9T5xfw6.js";import"./JDictSelectTag-Jqy9TBcS.js";import"./JSelectDept-DorRVguN.js";import"./JPopup-KP1kIsae.js";import"./JEllipsis-287cEHxd.js";import"./JUpload-pyrTRFCz.js";import"./index-Bx9Mnn3N.js";import"./index-B1-pj6uh.js";import"./index-isxCPgHp.js";import"./JAreaLinkage-DFTeDmm8.js";import"./JCodeEditor-_KZ8XnNK.js";import"./htmlmixed-DRe7JlAp.js";import"./vue-B0b3nX1K.js";/* empty css             */import"./EasyCronInput-XK54XB3r.js";import"./injectionKey-DPVn4AgL.js";import"./vxeUtils-BuNm0uPG.js";var P=(C,h,l)=>new Promise((y,m)=>{var k=i=>{try{r(l.next(i))}catch(c){m(c)}},g=i=>{try{r(l.throw(i))}catch(c){m(c)}},r=i=>i.done?y(i.value):Promise.resolve(i.value).then(k,g);r((l=l.apply(C,h)).next())});const st=E({__name:"index",setup(C,{expose:h}){let l=M();const[y,{openModal:m}]=Y(),{prefixCls:k,tableContext:g,createMessage:r,createConfirm:i}=F({designScope:"online-cgreport-list",pagination:!0,tableProps:{title:"Online报表",api:X,rowKey:"id",columns:G,formConfig:{autoSubmitOnEnter:!0,showAdvancedButton:!0,schemas:j}}}),[c,{reload:_},{rowSelection:S,selectedRowKeys:w}]=g;function x(){m(!0,{isUpdate:!1,showFooter:!0})}function R(t){m(!0,{record:t,isUpdate:!0,showFooter:!0})}function T(t){return P(this,null,function*(){yield H({id:t.id},_)})}function $(){return P(this,null,function*(){yield J({ids:w.value},()=>{_(),w.value=[]})})}function B(){_()}function A(t){return[{label:"编辑",onClick:R.bind(null,t)}]}function I(t){return[{label:"功能测试",class:["low-app-hide"],onClick:()=>V(t.id)},{label:"配置地址",class:["low-app-hide"],onClick:()=>D(t)},{label:"删除",popConfirm:{title:"是否确认删除",confirm:T.bind(null,t)}}]}function V(t){l.push({path:"/online/cgreport/"+t})}function D(t){let b=t.id,s=`/online/cgreport/${b}`,u=`INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) 
                         VALUES ('${Z()}', NULL, '${t.name}', '${s}', '1', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 0, 1, 0, 0, 0, NULL, '1', 0, 0, 'admin', null, NULL, NULL, 0)`;z(b).then(o=>{let e="";if(o&&o.length>0)for(let f of o)e+=f.paramName+"=${"+f.paramName+"}&";e.length>0&&(e=e.substring(0,e.length-1),s+="?"+e)}).catch(()=>{r.warning("获取参数失败!")}).finally(()=>{i({iconType:"info",width:500,title:`菜单链接【${t.name}】`,content:s,closable:!0,maskClosable:!0,cancelText:"复制SQL",okText:"复制URL",cancelButtonProps:{class:"copy-this-sql","data-clipboard-text":u},okButtonProps:{class:"copy-this-text","data-clipboard-text":s},onOk(){return new Promise(o=>{const e=new N(".copy-this-text");e.on("success",()=>{e.destroy(),r.success("复制URL成功"),o()}),e.on("error",()=>{r.error("该浏览器不支持自动复制"),e.destroy(),o()})})},onCancel(){return new Promise(o=>{const e=new N(".copy-this-sql");e.on("success",()=>{e.destroy(),r.success("复制插入菜单SQL成功"),o()}),e.on("error",()=>{r.error("该浏览器不支持自动复制"),e.destroy(),o()})})}})})}return h({handleAdd:x}),(t,b)=>{const s=d("a-button"),u=d("Icon"),o=d("a-menu-item"),e=d("a-menu"),f=d("a-dropdown");return v(),O("div",null,[n(p(te),q({onRegister:p(c),rowSelection:p(S)},t.$attrs),{tableTitle:a(()=>[n(s,{preIcon:"ant-design:plus-outlined",type:"primary",onClick:x,style:{"margin-right":"5px"}},{default:a(()=>[L("录入")]),_:1}),p(w).length>0?(v(),K(f,{key:0},{overlay:a(()=>[n(e,null,{default:a(()=>[n(o,{key:"1",onClick:$},{default:a(()=>[n(u,{icon:"ant-design:delete-outlined"}),L(" 删除 ")]),_:1})]),_:1})]),default:a(()=>[n(s,null,{default:a(()=>[L("批量操作 "),n(u,{icon:"mdi:chevron-down"})]),_:1})]),_:1})):Q("",!0)]),action:a(({record:U})=>[n(p(ee),{actions:A(U),dropDownActions:I(U)},null,8,["actions","dropDownActions"])]),_:1},16,["onRegister","rowSelection"]),n(W,{onRegister:p(y),onSuccess:B},null,8,["onRegister"])])}}});export{st as default};
