fullScreen-9123d61a.js 12 KB

1
  1. import{b as S,o as M,A as ne,d as T,_ as ae,a as le,s as E,c as re}from"./index-3887ab05.js";import{m as o,a as y,o as z,W as d,X as m,$ as g,Z as c,u as f,E as O,P as ce,a2 as L,l as oe,Y as J,F as se,a6 as ue,a0 as ie,a3 as de,a4 as me}from"./vue-74beb2f3.js";import{u as U}from"./settingColumns.vue_vue_type_style_index_0_scoped_176f68a0_lang-a848e312.js";import{S as pe}from"./SettingOutlined-04c21aec.js";var fe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.3 506.3L781.7 405.6a7.23 7.23 0 00-11.7 5.7V476H548V254h64.8c6 0 9.4-7 5.7-11.7L517.7 114.7a7.14 7.14 0 00-11.3 0L405.6 242.3a7.23 7.23 0 005.7 11.7H476v222H254v-64.8c0-6-7-9.4-11.7-5.7L114.7 506.3a7.14 7.14 0 000 11.3l127.5 100.8c4.7 3.7 11.7.4 11.7-5.7V548h222v222h-64.8c-6 0-9.4 7-5.7 11.7l100.8 127.5c2.9 3.7 8.5 3.7 11.3 0l100.8-127.5c3.7-4.7.4-11.7-5.7-11.7H548V548h222v64.8c0 6 7 9.4 11.7 5.7l127.5-100.8a7.3 7.3 0 00.1-11.4z"}}]},name:"drag",theme:"outlined"};const ge=fe;function B(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(l){return Object.getOwnPropertyDescriptor(n,l).enumerable}))),a.forEach(function(l){ve(t,l,n[l])})}return t}function ve(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var C=function(e,n){var a=B({},e,n.attrs);return o(S,B({},a,{icon:ge}),null)};C.displayName="DragOutlined";C.inheritAttrs=!1;const be=C;var he={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M391 240.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L200 146.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L280 333.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L401 410c5.1.6 9.5-3.7 8.9-8.9L391 240.9zm10.1 373.2L240.8 633c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L146.3 824a8.03 8.03 0 000 11.3l42.4 42.3c3.1 3.1 8.2 3.1 11.3 0L333.7 744l43.7 43.7A8.01 8.01 0 00391 783l18.9-160.1c.6-5.1-3.7-9.4-8.8-8.8zm221.8-204.2L783.2 391c6.6-.8 9.4-8.9 4.7-13.6L744 333.6 877.7 200c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.3a8.03 8.03 0 00-11.3 0L690.3 279.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L614.1 401c-.6 5.2 3.7 9.5 8.8 8.9zM744 690.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L623 614c-5.1-.6-9.5 3.7-8.9 8.9L633 783.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L824 877.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L744 690.4z"}}]},name:"fullscreen-exit",theme:"outlined"};const _e=he;function R(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(l){return Object.getOwnPropertyDescriptor(n,l).enumerable}))),a.forEach(function(l){Oe(t,l,n[l])})}return t}function Oe(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var N=function(e,n){var a=R({},e,n.attrs);return o(S,R({},a,{icon:_e}),null)};N.displayName="FullscreenExitOutlined";N.inheritAttrs=!1;const Se=N;var Le={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M290 236.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L169 160c-5.1-.6-9.5 3.7-8.9 8.9L179 329.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L370 423.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L290 236.4zm352.7 187.3c3.1 3.1 8.2 3.1 11.3 0l133.7-133.6 43.7 43.7a8.01 8.01 0 0013.6-4.7L863.9 169c.6-5.1-3.7-9.5-8.9-8.9L694.8 179c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L600.3 370a8.03 8.03 0 000 11.3l42.4 42.4zM845 694.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L654 600.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L734 787.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L855 864c5.1.6 9.5-3.7 8.9-8.9L845 694.9zm-463.7-94.6a8.03 8.03 0 00-11.3 0L236.3 733.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L160.1 855c-.6 5.1 3.7 9.5 8.9 8.9L329.2 845c6.6-.8 9.4-8.9 4.7-13.6L290 787.6 423.7 654c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.4z"}}]},name:"fullscreen",theme:"outlined"};const ye=Le;function q(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(l){return Object.getOwnPropertyDescriptor(n,l).enumerable}))),a.forEach(function(l){Fe(t,l,n[l])})}return t}function Fe(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var $=function(e,n){var a=q({},e,n.attrs);return o(S,q({},a,{icon:ye}),null)};$.displayName="FullscreenOutlined";$.inheritAttrs=!1;const xe=$;var De={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M839.6 433.8L749 150.5a9.24 9.24 0 00-8.9-6.5h-77.4c-4.1 0-7.6 2.6-8.9 6.5l-91.3 283.3c-.3.9-.5 1.9-.5 2.9 0 5.1 4.2 9.3 9.3 9.3h56.4c4.2 0 7.8-2.8 9-6.8l17.5-61.6h89l17.3 61.5c1.1 4 4.8 6.8 9 6.8h61.2c1 0 1.9-.1 2.8-.4 2.4-.8 4.3-2.4 5.5-4.6 1.1-2.2 1.3-4.7.6-7.1zM663.3 325.5l32.8-116.9h6.3l32.1 116.9h-71.2zm143.5 492.9H677.2v-.4l132.6-188.9c1.1-1.6 1.7-3.4 1.7-5.4v-36.4c0-5.1-4.2-9.3-9.3-9.3h-204c-5.1 0-9.3 4.2-9.3 9.3v43c0 5.1 4.2 9.3 9.3 9.3h122.6v.4L587.7 828.9a9.35 9.35 0 00-1.7 5.4v36.4c0 5.1 4.2 9.3 9.3 9.3h211.4c5.1 0 9.3-4.2 9.3-9.3v-43a9.2 9.2 0 00-9.2-9.3zM416 702h-76V172c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v530h-76c-6.7 0-10.5 7.8-6.3 13l112 141.9a8 8 0 0012.6 0l112-141.9c4.1-5.2.4-13-6.3-13z"}}]},name:"sort-ascending",theme:"outlined"};const we=De;function V(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(l){return Object.getOwnPropertyDescriptor(n,l).enumerable}))),a.forEach(function(l){Pe(t,l,n[l])})}return t}function Pe(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var j=function(e,n){var a=V({},e,n.attrs);return o(S,V({},a,{icon:we}),null)};j.displayName="SortAscendingOutlined";j.inheritAttrs=!1;const He=j;var Ee={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M839.6 433.8L749 150.5a9.24 9.24 0 00-8.9-6.5h-77.4c-4.1 0-7.6 2.6-8.9 6.5l-91.3 283.3c-.3.9-.5 1.9-.5 2.9 0 5.1 4.2 9.3 9.3 9.3h56.4c4.2 0 7.8-2.8 9-6.8l17.5-61.6h89l17.3 61.5c1.1 4 4.8 6.8 9 6.8h61.2c1 0 1.9-.1 2.8-.4 2.4-.8 4.3-2.4 5.5-4.6 1.1-2.2 1.3-4.7.6-7.1zM663.3 325.5l32.8-116.9h6.3l32.1 116.9h-71.2zm143.5 492.9H677.2v-.4l132.6-188.9c1.1-1.6 1.7-3.4 1.7-5.4v-36.4c0-5.1-4.2-9.3-9.3-9.3h-204c-5.1 0-9.3 4.2-9.3 9.3v43c0 5.1 4.2 9.3 9.3 9.3h122.6v.4L587.7 828.9a9.35 9.35 0 00-1.7 5.4v36.4c0 5.1 4.2 9.3 9.3 9.3h211.4c5.1 0 9.3-4.2 9.3-9.3v-43a9.2 9.2 0 00-9.2-9.3zM310.3 167.1a8 8 0 00-12.6 0L185.7 309c-4.2 5.3-.4 13 6.3 13h76v530c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V322h76c6.7 0 10.5-7.8 6.3-13l-112-141.9z"}}]},name:"sort-descending",theme:"outlined"};const ze=Ee;function H(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},a=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(l){return Object.getOwnPropertyDescriptor(n,l).enumerable}))),a.forEach(function(l){Ce(t,l,n[l])})}return t}function Ce(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var A=function(e,n){var a=H({},e,n.attrs);return o(S,H({},a,{icon:ze}),null)};A.displayName="SortDescendingOutlined";A.inheritAttrs=!1;const Te=A,Ne={__name:"index",props:{param:Object,type:String,tableName:String},setup(t){const e=t,n=U(),a=y([]),l=y({}),_=async()=>{let s=[];l.value=JSON.stringify(e.param),a.value&&a.value.filter(u=>{s.push({fieldlabel:u.title,fieldname:u.dataIndex})}),l.value=JSON.parse(l.value),l.value.content.exportFields=s,l.value.content.isExport=!0;const r=await ne.requested(l.value);T.message(r,"导出成功",()=>{window.open(r.data[0].url?r.data[0].url:r.data,"_self"),l.value.content.isExport=!1})};return z(()=>{a.value=n.loadTableConfig(e.tableName)}),(s,r)=>{const u=d("a-button"),F=d("a-tooltip"),x=d("a-popconfirm");return m(),g(x,{title:"确定要下载表格数据吗?","ok-text":"是","cancel-text":"否",placement:"bottomRight",getPopupContainer:v=>v.parentNode||s.document.body,onConfirm:_},{default:c(()=>[e.type=="button"?(m(),g(u,{key:0,type:"primary"},{icon:c(()=>[o(f(M))]),default:c(()=>[O(" 导 出 ")]),_:1})):(m(),g(F,{key:1},{title:c(()=>[O("导出")]),default:c(()=>[o(f(M))]),_:1}))]),_:1},8,["getPopupContainer"])}}},$e=t=>(de("data-v-176f68a0"),t=t(),me(),t),je={class:"title-panel"},Ae=$e(()=>L("span",null,"筛选列",-1)),ke={style:{width:"150px"}},Ie={class:"flex"},Me={__name:"settingColumns",props:["tableName","columns","param"],emits:["change"],setup(t,{expose:e,emit:n}){const a=t,l=U(),_=le();E(_);let{checkedColumns:s,columnsIndex:r}=E(l);const u=y([]),F=()=>{r.value=s.value=T.TBLayout(a.tableName).map(i=>i.dataIndex),l.userSetting(a.tableName)},x=i=>{l.userSetting(a.tableName)},v=y(0),W=i=>{v.value=i},X=i=>{event.preventDefault();const b=v.value;if(b!==i){const h=[...u.value],D=h[b];h.splice(b,1),h.splice(i,0,D),u.value=h,v.value=i,r.value=u.value.map(w=>w.value)}},Y=i=>{event.preventDefault()},Z=()=>{l.userSetting(a.tableName),v.value=null},k=()=>{u.value=l.getUserSetting(a.tableName)};return z(()=>{k()}),ce(()=>{k()}),e({}),(i,b)=>{const h=d("a-button"),D=d("a-checkbox"),w=d("a-col"),G=d("a-row"),Q=d("a-checkbox-group"),K=d("a-tooltip"),ee=d("a-popover"),te=d("a-space");return m(),g(te,{size:"middle"},{default:c(()=>[o(Ne,{param:t.param,tableName:a.tableName},null,8,["param","tableName"]),o(ee,{trigger:"click",placement:"left",getPopupContainer:p=>p.parentNode||i.document.body},{title:c(()=>[L("div",je,[Ae,o(h,{class:"fl-r",type:"link",onClick:F},{default:c(()=>[O("重置")]),_:1})])]),content:c(()=>[L("div",ke,[o(Q,{value:f(s),"onUpdate:value":b[0]||(b[0]=p=>oe(s)?s.value=p:s=p),name:"checkboxgroup",onChange:x},{default:c(()=>[o(G,null,{default:c(()=>[(m(!0),J(se,null,ue(u.value,(p,P)=>(m(),g(w,{class:"mt-10",key:p.index,span:24,draggable:!0,onDragstart:I=>W(P),onDragover:I=>X(P),onDrop:I=>Y(P),onDragend:Z},{default:c(()=>[L("div",Ie,[o(D,{value:p.value},{default:c(()=>[O(ie(p.label),1)]),_:2},1032,["value"]),o(f(be))])]),_:2},1032,["onDragstart","onDragover","onDrop"]))),128))]),_:1})]),_:1},8,["value"])])]),default:c(()=>[o(K,null,{title:c(()=>[O("设置列")]),default:c(()=>[o(f(pe))]),_:1})]),_:1},8,["getPopupContainer"])]),_:1})}}},Je=ae(Me,[["__scopeId","data-v-176f68a0"]]),Ue={__name:"fullScreen",props:["domId"],setup(t){const e=t,n=re();let{fullscreen:a}=E(n);const l=()=>{const r=document.getElementById(e.domId);r.RequestFullScreen?r.RequestFullScreen():r.mozRequestFullScreen?r.mozRequestFullScreen():r.webkitRequestFullScreen?r.webkitRequestFullScreen():r.msRequestFullscreen&&r.msRequestFullscreen()},_=()=>{document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen(),console.log("触发")},s=r=>{r.target.classList.length&&(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement?(console.log("全屏模式已激活"),a.value=!0):(a.value=!1,console.log("全屏模式已退出")))};return z(()=>{document.addEventListener("fullscreenchange",s),document.addEventListener("mozfullscreenchange",s),document.addEventListener("webkitfullscreenchange",s),document.addEventListener("MSFullscreenChange",s)}),(r,u)=>(m(),J("div",null,[f(a)?(m(),g(f(Se),{key:1,onClick:_})):(m(),g(f(xe),{key:0,onClick:l}))]))}};export{He as S,Ne as _,Ue as a,Te as b,Je as s};