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-gyz1IdHU.js";import{useListPage as F}from"./useListPage-TMORxSEa.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-D-R9qjMq.js";import"./index-zKZnG1QC.js";import{C as N}from"./clipboard-CwX7nYZZ.js";import{a9 as Y,X as Z}from"./index-Cy4uayzW.js";import"./index-BN26Feep.js";import"./useJvxeMethods-B9cBxf6D.js";import"./user.api-CoaMxYm2.js";import{Q as tt}from"./componentMap-0iK4HQBq.js";import et from"./BasicTable-CgafrQwz.js";import"./antd-vue-vendor-CahNzUUa.js";import"./useForm-DfoT2G6J.js";import"./index-Bdn0r8CG.js";import"./index-CYoRlduV.js";import"./index-DYB8Ashr.js";import"./index-CrdW4fN1.js";import"./useTimeout-gJpgadD6.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./BasicModal-sKcs_9Ir.js";import"./ModalHeader-ByCVDoqO.js";import"./useWindowSizeFn-DDyhhqyw.js";import"./useFormItem-IOFWTdED.js";import"./download-Bn4f3tzD.js";import"./base64Conver-24EVOS6V.js";import"./index-D6H6KsT6.js";import"./index-CLxBW_h0.js";import"./useCountdown-2P9HvnfJ.js";import"./useFormItemSingle-BEyrYQqf.js";import"./JSelectUser-B98pRPrS.js";import"./props-CtlWAg-s.js";import"./JSelectBiz-vYDBA0SK.js";import"./JAddInput-DP4caUmw.js";import"./areaDataUtil-Dk3xkGfK.js";import"./china-area-data-vendor-ByvEpbzN.js";import"./index-tDBMxW9-.js";import"./index-CNQBnF3P.js";import"./bem-IZKqD41e.js";import"./props-CG-jAkbI.js";import"./useContextMenu-Q6J5bB_u.js";import"./depart.api-B8q8MC-j.js";import"./JImageUpload-C5OCTlCG.js";import"./JDictSelectTag-CalJXNVe.js";import"./JSelectDept-D-TUaHvK.js";import"./JPopup-CVHkQZFq.js";import"./JEllipsis-TuDc52fh.js";import"./JUpload-DSWoDwh2.js";import"./index-B4vNk56t.js";import"./index-Dc7Jr5-j.js";import"./index-Dm1rPBfc.js";import"./JAreaLinkage-CTMEfTuh.js";import"./JCodeEditor-U9QIstNN.js";import"./htmlmixed-DoVLO6sG.js";import"./vue-DY75b9GC.js";/* empty css             */import"./EasyCronInput-CZdChTcP.js";import"./injectionKey-DPVn4AgL.js";import"./vxeUtils-XAL4qcPi.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 le=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(e){m(!0,{record:e,isUpdate:!0,showFooter:!0})}function T(e){return P(this,null,function*(){yield H({id:e.id},_)})}function $(){return P(this,null,function*(){yield J({ids:w.value},()=>{_(),w.value=[]})})}function B(){_()}function A(e){return[{label:"编辑",onClick:R.bind(null,e)}]}function I(e){return[{label:"功能测试",class:["low-app-hide"],onClick:()=>V(e.id)},{label:"配置地址",class:["low-app-hide"],onClick:()=>D(e)},{label:"删除",popConfirm:{title:"是否确认删除",confirm:T.bind(null,e)}}]}function V(e){l.push({path:"/online/cgreport/"+e})}function D(e){let b=e.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, '${e.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 t="";if(o&&o.length>0)for(let f of o)t+=f.paramName+"=${"+f.paramName+"}&";t.length>0&&(t=t.substring(0,t.length-1),s+="?"+t)}).catch(()=>{r.warning("获取参数失败!")}).finally(()=>{i({iconType:"info",width:500,title:`菜单链接【${e.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 t=new N(".copy-this-text");t.on("success",()=>{t.destroy(),r.success("复制URL成功"),o()}),t.on("error",()=>{r.error("该浏览器不支持自动复制"),t.destroy(),o()})})},onCancel(){return new Promise(o=>{const t=new N(".copy-this-sql");t.on("success",()=>{t.destroy(),r.success("复制插入菜单SQL成功"),o()}),t.on("error",()=>{r.error("该浏览器不支持自动复制"),t.destroy(),o()})})}})})}return h({handleAdd:x}),(e,b)=>{const s=d("a-button"),u=d("Icon"),o=d("a-menu-item"),t=d("a-menu"),f=d("a-dropdown");return v(),O("div",null,[n(p(et),q({onRegister:p(c),rowSelection:p(S)},e.$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(t,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(tt),{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{le as default};
