index-2fb8e07f-Ccenjy6_.js 5.5 KB

12
  1. import{d as M,ap as O,ag as u,aq as V,ar as v,k as a,u as m,aE as q,aD as s,aB as K,ah as Q,G as L}from"./vue-vendor-Be68asQ6.js";import"./index-D2G57Sln.js";import{useListPage as F}from"./useListPage-aOfrd-Tw.js";import{s as G,c as W,l as X,d as Y,b as j,g as z,C as H}from"./CgreportModal-8a84aae5-D8hdwPuR.js";import"./index-CETWS1o0.js";import{C as N}from"./clipboard-DolJfo9Q.js";import{ad as J,$ as Z}from"./index-BFfnEkVs.js";import"./index-D68l__AG.js";import"./useJvxeMethods-Bm6rYcfH.js";import"./user.api-BMRcwGEd.js";import ee from"./BasicTable-CuSLkXEu.js";import{Q as te}from"./componentMap-BUTAcOmo.js";import"./antd-vue-vendor-DcqS7Wvq.js";import"./BasicForm-Cv-dsB-e.js";import"./index-BZ_MXCtW.js";import"./index-BIPzXG41.js";import"./index-CXEQnmRq.js";import"./useTimeout-Ca5eqGu-.js";import"./vxe-table-vendor-DHF2TRpV.js";import"./useIntersectionObserver-Bl62RIZ4.js";import"./BasicModal-D4gc2R81.js";import"./useWindowSizeFn-BTSGGcie.js";import"./useFormItem-CtGMPcLp.js";import"./download-CjoX0_mR.js";import"./base64Conver-24EVOS6V.js";import"./index-D1703ozz.js";import"./index-Bi7PIj53.js";import"./useCountdown-B7iR27pS.js";import"./useFormItemSingle-nLM0QlcI.js";import"./JSelectUser-DCwPqRxp.js";import"./props-BPxWJPuD.js";import"./JSelectBiz-Be8KsC5j.js";import"./JAddInput-BBXQvvpq.js";import"./areaDataUtil-Cik-Rc_P.js";import"./index-BOEzG86y.js";import"./index-BNFwynfr.js";import"./bem-BvvqSl-N.js";import"./props-Cw7AfxGV.js";import"./useContextMenu-BDwmjIwb.js";import"./depart.api-CDwTvdwQ.js";import"./JSelectDept-DT6g7V5M.js";import"./JPopup-DKJW27Yk.js";import"./JEllipsis-C04xKxcI.js";import"./JUpload-cB_Qj2H2.js";import"./index-iuayQczx.js";import"./index-DJQB4_Pr.js";import"./useForm-kcRIHoe0.js";import"./JAreaLinkage-BNOKwn5l.js";import"./JCodeEditor-CSivhUhT.js";import"./htmlmixed-DNSd26j0.js";import"./vue-DbzutmLn.js";/* empty css */import"./EasyCronInput-wCv2YMHn.js";import"./injectionKey-DPVn4AgL.js";import"./vxeUtils-CRiZfirF.js";var P=(C,y,p)=>new Promise((_,c)=>{var k=n=>{try{r(p.next(n))}catch(d){c(d)}},g=n=>{try{r(p.throw(n))}catch(d){c(d)}},r=n=>n.done?_(n.value):Promise.resolve(n.value).then(k,g);r((p=p.apply(C,y)).next())});const rt=M({__name:"index",setup(C,{expose:y}){let p=O();const[_,{openModal:c}]=J(),{prefixCls:k,tableContext:g,createMessage:r,createConfirm:n}=F({designScope:"online-cgreport-list",pagination:!0,tableProps:{title:"Online报表",api:X,rowKey:"id",columns:W,formConfig:{autoSubmitOnEnter:!0,showAdvancedButton:!0,schemas:G}}}),[d,{reload:w},{rowSelection:S,selectedRowKeys:b}]=g;function x(){c(!0,{isUpdate:!1,showFooter:!0})}function R(t){c(!0,{record:t,isUpdate:!0,showFooter:!0})}function $(t){return P(this,null,function*(){yield Y({id:t.id},w)})}function B(){return P(this,null,function*(){yield j({ids:b.value},()=>{w(),b.value=[]})})}function T(){w()}function A(t){return[{label:"编辑",onClick:R.bind(null,t)}]}function I(t){return[{label:"功能测试",class:["low-app-hide"],onClick:()=>D(t.id)},{label:"配置地址",class:["low-app-hide"],onClick:()=>E(t)},{label:"删除",popConfirm:{title:"是否确认删除",confirm:$.bind(null,t)}}]}function D(t){p.push({path:"/online/cgreport/"+t})}function E(t){let i=t.id,l=`/online/cgreport/${i}`,f=`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)
  2. VALUES ('${Z()}', NULL, '${t.name}', '${l}', '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(i).then(o=>{let e="";if(o&&o.length>0)for(let h of o)e+=h.paramName+"=${"+h.paramName+"}&";e.length>0&&(e=e.substring(0,e.length-1),l+="?"+e)}).catch(()=>{r.warning("获取参数失败!")}).finally(()=>{n({iconType:"info",width:500,title:`菜单链接【${t.name}】`,content:l,closable:!0,maskClosable:!0,cancelText:"复制SQL",okText:"复制URL",cancelButtonProps:{class:"copy-this-sql","data-clipboard-text":f},okButtonProps:{class:"copy-this-text","data-clipboard-text":l},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 y({handleAdd:x}),(t,i)=>{const l=u("a-button"),f=u("Icon"),o=u("a-menu-item"),e=u("a-menu"),h=u("a-dropdown");return v(),V("div",null,[a(m(ee),q({onRegister:m(d),rowSelection:m(S)},t.$attrs),{tableTitle:s(()=>[a(l,{preIcon:"ant-design:plus-outlined",type:"primary",onClick:x,style:{"margin-right":"5px"}},{default:s(()=>i[0]||(i[0]=[L("录入")])),_:1}),m(b).length>0?(v(),K(h,{key:0},{overlay:s(()=>[a(e,null,{default:s(()=>[a(o,{key:"1",onClick:B},{default:s(()=>[a(f,{icon:"ant-design:delete-outlined"}),i[1]||(i[1]=L(" 删除 "))]),_:1})]),_:1})]),default:s(()=>[a(l,null,{default:s(()=>[i[2]||(i[2]=L("批量操作 ")),a(f,{icon:"mdi:chevron-down"})]),_:1})]),_:1})):Q("",!0)]),action:s(({record:U})=>[a(m(te),{actions:A(U),dropDownActions:I(U)},null,8,["actions","dropDownActions"])]),_:1},16,["onRegister","rowSelection"]),a(H,{onRegister:m(_),onSuccess:T},null,8,["onRegister"])])}}});export{rt as default};