1 |
- import{a as L,u as W,s as F,j as ce,c as g,A as X,l as q,b as oe}from"./index-ad86104a.js";import{m as u,a as D,o as z,W as m,X as p,a2 as h,Z as s,u as v,E as x,P as se,$ as C,l as ue,Y,F as ie,a5 as de,a4 as me,a0 as pe,a1 as fe}from"./vue-7f5e2b1b.js";import{_ as ge}from"./_plugin-vue_export-helper-c27b6911.js";import{S as ve}from"./SettingOutlined-4a5359d8.js";var he={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 be=he;function R(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},l=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(l=l.concat(Object.getOwnPropertySymbols(n).filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable}))),l.forEach(function(a){_e(t,a,n[a])})}return t}function _e(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var k=function(e,n){var l=R({},e,n.attrs);return u(L,R({},l,{icon:be}),null)};k.displayName="DragOutlined";k.inheritAttrs=!1;const Oe=k;var Se={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 ye=Se;function V(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},l=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(l=l.concat(Object.getOwnPropertySymbols(n).filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable}))),l.forEach(function(a){xe(t,a,n[a])})}return t}function xe(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 l=V({},e,n.attrs);return u(L,V({},l,{icon:ye}),null)};j.displayName="FullscreenExitOutlined";j.inheritAttrs=!1;const Le=j;var Ce={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 Fe=Ce;function H(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},l=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(l=l.concat(Object.getOwnPropertySymbols(n).filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable}))),l.forEach(function(a){De(t,a,n[a])})}return t}function De(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var B=function(e,n){var l=H({},e,n.attrs);return u(L,H({},l,{icon:Fe}),null)};B.displayName="FullscreenOutlined";B.inheritAttrs=!1;const we=B;var Ie={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 $e=Ie;function J(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},l=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(l=l.concat(Object.getOwnPropertySymbols(n).filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable}))),l.forEach(function(a){Ee(t,a,n[a])})}return t}function Ee(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 l=J({},e,n.attrs);return u(L,J({},l,{icon:$e}),null)};A.displayName="SortAscendingOutlined";A.inheritAttrs=!1;const We=A;var Pe={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=Pe;function U(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},l=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(l=l.concat(Object.getOwnPropertySymbols(n).filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable}))),l.forEach(function(a){ke(t,a,n[a])})}return t}function ke(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 l=U({},e,n.attrs);return u(L,U({},l,{icon:ze}),null)};N.displayName="SortDescendingOutlined";N.inheritAttrs=!1;const Xe=N,je=W();let{tableConfigs:S,app:y}=F(je);const Z=ce("columnStore",{state:()=>({colIndex:[],checkedColumns:[],columnsIndex:[],selectedColumns:0,cacheData:{},time:null}),persist:{enabled:!0,strategies:[{storage:localStorage,paths:[]}]},getters:{},actions:{userSetting(t){this.selectedColumns=new Date,S.value[`${y.value.systemappid}${t}`]={},S.value[`${y.value.systemappid}${t}`].columnsIndex=this.columnsIndex,S.value[`${y.value.systemappid}${t}`].checkedColumns=this.checkedColumns,this.saveConfig(S.value)},getUserSetting(t){let e=[],n=new Map,l=g.TBLayout(t),a=S.value[`${y.value.systemappid}${t}`];return a&&l.length==a.columnsIndex.length?(g.TBLayout(t).map(r=>({value:r.dataIndex,label:r.title})).forEach(r=>{n.set(r.value,r.label)}),this.checkedColumns=a.checkedColumns,a.columnsIndex=this.columnsIndex=a.columnsIndex.length==0?g.TBLayout(t).map(r=>r.dataIndex):a.columnsIndex,a.columnsIndex.forEach(r=>{e.push({value:r,label:n.get(r)})}),e):(this.checkedColumns=this.columnsIndex=g.TBLayout(t).map(c=>c.dataIndex),e=g.TBLayout(t).map(c=>({value:c.dataIndex,label:c.title})),e)},loadTableConfig(t){let e=g.TBLayout(t),n=S.value[`${y.value.systemappid}${t}`],l=[],a=new Map;try{return n&&e.length==n.columnsIndex.length?(e.forEach(c=>{a.set(c.dataIndex,c)}),n.columnsIndex.forEach(c=>{l.push(a.get(c))}),l=l.filter(c=>{if(n.checkedColumns.some(r=>r===c.dataIndex))return c}),l):e}catch{return e}},async saveConfig(t){await X.requested({classname:"sysmanage.develop.users.users",method:"updateClientConfig",content:{config:JSON.stringify(t)}})}}}),Be={__name:"index",props:{param:Object,type:String,tableName:String},setup(t){const e=t,n=Z(),l=D([]),a=D({}),c=async()=>{let r=[];a.value=JSON.stringify(e.param),l.value&&l.value.filter(i=>{r.push({fieldlabel:i.title,fieldname:i.dataIndex})}),a.value=JSON.parse(a.value),a.value.content.exportFields=r,a.value.content.isExport=!0;const o=await X.requested(a.value);g.message(o,"导出成功",()=>{window.open(o.data[0].url?o.data[0].url:o.data,"_self"),a.value.content.isExport=!1})};return z(()=>{l.value=n.loadTableConfig(e.tableName)}),(r,o)=>{const i=m("a-button"),w=m("a-tooltip"),I=m("a-popconfirm");return p(),h(I,{title:"确定要下载表格数据吗?","ok-text":"是","cancel-text":"否",placement:"bottomLeft",getPopupContainer:b=>b.parentNode||r.document.body,onConfirm:c},{default:s(()=>[e.type=="button"?(p(),h(i,{key:0,type:"primary"},{icon:s(()=>[u(v(q))]),default:s(()=>[x(" 导 出 ")]),_:1})):(p(),h(w,{key:1},{title:s(()=>[x("导出")]),default:s(()=>[u(v(q))]),_:1}))]),_:1},8,["getPopupContainer"])}}};const Ae=t=>(pe("data-v-f5cfb91f"),t=t(),fe(),t),Ne={class:"title-panel"},Me=Ae(()=>C("span",null,"筛选列",-1)),Te={style:{width:"150px"}},qe={class:"flex"},Re={__name:"settingColumns",props:["tableName","columns","param"],emits:["change"],setup(t,{expose:e,emit:n}){const l=t,a=Z(),c=W();F(c);let{checkedColumns:r,columnsIndex:o}=F(a);const i=D([]),w=()=>{o.value=r.value=g.TBLayout(l.tableName).map(d=>d.dataIndex),a.userSetting(l.tableName)},I=d=>{a.userSetting(l.tableName)},b=D(0),G=d=>{b.value=d},Q=d=>{event.preventDefault();const _=b.value;if(_!==d){const O=[...i.value],$=O[_];O.splice(_,1),O.splice(d,0,$),i.value=O,b.value=d,o.value=i.value.map(E=>E.value)}},K=d=>{event.preventDefault()},ee=()=>{a.userSetting(l.tableName),b.value=null},M=()=>{i.value=a.getUserSetting(l.tableName)};return z(()=>{M()}),se(()=>{M()}),e({}),(d,_)=>{const O=m("a-button"),$=m("a-checkbox"),E=m("a-col"),te=m("a-row"),ne=m("a-checkbox-group"),le=m("a-tooltip"),ae=m("a-popover"),re=m("a-space");return p(),h(re,{size:"middle"},{default:s(()=>[u(Be,{param:t.param,tableName:l.tableName},null,8,["param","tableName"]),u(ae,{trigger:"click",placement:"left",getPopupContainer:f=>f.parentNode||d.document.body},{title:s(()=>[C("div",Ne,[Me,u(O,{class:"fl-r",type:"link",onClick:w},{default:s(()=>[x("重置")]),_:1})])]),content:s(()=>[C("div",Te,[u(ne,{value:v(r),"onUpdate:value":_[0]||(_[0]=f=>ue(r)?r.value=f:r=f),name:"checkboxgroup",onChange:I},{default:s(()=>[u(te,null,{default:s(()=>[(p(!0),Y(ie,null,de(i.value,(f,P)=>(p(),h(E,{class:"mt-10",key:f.index,span:24,draggable:!0,onDragstart:T=>G(P),onDragover:T=>Q(P),onDrop:T=>K(P),onDragend:ee},{default:s(()=>[C("div",qe,[u($,{value:f.value},{default:s(()=>[x(me(f.label),1)]),_:2},1032,["value"]),u(v(Oe))])]),_:2},1032,["onDragstart","onDragover","onDrop"]))),128))]),_:1})]),_:1},8,["value"])])]),default:s(()=>[u(le,null,{title:s(()=>[x("设置列")]),default:s(()=>[u(v(ve))]),_:1})]),_:1},8,["getPopupContainer"])]),_:1})}}},Ye=ge(Re,[["__scopeId","data-v-f5cfb91f"]]),Ze={__name:"fullScreen",props:["domId"],setup(t){const e=t,n=oe();let{fullscreen:l}=F(n);const a=()=>{const o=document.getElementById(e.domId);o.RequestFullScreen?o.RequestFullScreen():o.mozRequestFullScreen?o.mozRequestFullScreen():o.webkitRequestFullScreen?o.webkitRequestFullScreen():o.msRequestFullscreen&&o.msRequestFullscreen()},c=()=>{document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()},r=()=>{document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement?(console.log("全屏模式已激活"),l.value=!0):(l.value=!1,console.log("全屏模式已退出"))};return z(()=>{document.addEventListener("fullscreenchange",r),document.addEventListener("mozfullscreenchange",r),document.addEventListener("webkitfullscreenchange",r),document.addEventListener("MSFullscreenChange",r)}),(o,i)=>(p(),Y("div",null,[v(l)?(p(),h(v(Le),{key:1,onClick:c})):(p(),h(v(we),{key:0,onClick:a}))]))}};export{We as S,Be as _,Ze as a,Xe as b,Ye as s,Z as u};
|