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-LwlFn7Y4.js";import{useListPage as F}from"./useListPage-BEtybUiF.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-3Kh2Q2ff.js";import"./index-D2AmS0aU.js";import{C as N}from"./clipboard-DYn7lcX7.js";import{a9 as Y,X as Z}from"./index-B_2CoVdl.js";import"./index-ARbUvvsq.js";import"./useJvxeMethods-DJZKL0Jv.js";import"./user.api-BLHI3_6c.js";import{Q as ee}from"./componentMap-CzCGDP7x.js";import te from"./BasicTable-Clbg3fHx.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./useForm-CcjrODHR.js";import"./index-DAURrYyA.js";import"./index-Dz2zbQB_.js";import"./index-exs4VcBw.js";import"./index-ByLO0zSl.js";import"./useTimeout-CB9F1PLu.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./BasicModal-D3g2CFhF.js";import"./ModalHeader-C-C0dUi_.js";import"./useWindowSizeFn-C3WExEpc.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";import"./injectionKey-DPVn4AgL.js";import"./vxeUtils-Ck0LG0y-.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};
