| 1 |
- import{j as s,a as h,o as pe,K as me,U as m,V as i,W as S,X as c,a4 as _,G as U,u as p,H as $e,F as K,a2 as fe,a3 as b,a5 as $,a6 as De,a7 as Ne,w as xe,L as Ae,$ as q,R as H,D as je,ad as ze}from"./vue-9763c232.js";import{_ as Ie}from"./index-93a8f54c.js";import{b as T,a as ve,s as z,c as ge,u as Le,A as J}from"./index-937821e6.js";import{u as be}from"./settingColumns.vue_vue_type_style_index_0_scoped_c8810bd5_lang-ae332338.js";import{_ as he}from"./_plugin-vue_export-helper-c27b6911.js";import{_ as Be}from"./fullScreen-725193e8.js";import{_ as Te}from"./reportCenter-25074e47.js";import{u as Re}from"./vue-router-f797b6fe.js";import{u as Me}from"./base-7af9cf36.js";/* empty css */var Ee={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 Ve=Ee;function se(a){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},e=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(e=e.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),e.forEach(function(o){qe(a,o,n[o])})}return a}function qe(a,t,n){return t in a?Object.defineProperty(a,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):a[t]=n,a}var ee=function(t,n){var e=se({},t,n.attrs);return s(T,se({},e,{icon:Ve}),null)};ee.displayName="DragOutlined";ee.inheritAttrs=!1;const He=ee;var Ue={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"};const Fe=Ue;function ce(a){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},e=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(e=e.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),e.forEach(function(o){Qe(a,o,n[o])})}return a}function Qe(a,t,n){return t in a?Object.defineProperty(a,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):a[t]=n,a}var te=function(t,n){var e=ce({},t,n.attrs);return s(T,ce({},e,{icon:Fe}),null)};te.displayName="SettingOutlined";te.inheritAttrs=!1;const Ge=te;var We={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 Xe=We;function ie(a){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},e=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(e=e.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),e.forEach(function(o){Je(a,o,n[o])})}return a}function Je(a,t,n){return t in a?Object.defineProperty(a,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):a[t]=n,a}var ae=function(t,n){var e=ie({},t,n.attrs);return s(T,ie({},e,{icon:Xe}),null)};ae.displayName="SortAscendingOutlined";ae.inheritAttrs=!1;const Y=ae;var Ye={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=Ye;function ue(a){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},e=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(e=e.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),e.forEach(function(o){Ke(a,o,n[o])})}return a}function Ke(a,t,n){return t in a?Object.defineProperty(a,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):a[t]=n,a}var ne=function(t,n){var e=ue({},t,n.attrs);return s(T,ue({},e,{icon:Ze}),null)};ne.displayName="SortDescendingOutlined";ne.inheritAttrs=!1;const Z=ne;var et={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"};const tt=et;function de(a){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},e=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(e=e.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),e.forEach(function(o){at(a,o,n[o])})}return a}function at(a,t,n){return t in a?Object.defineProperty(a,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):a[t]=n,a}var le=function(t,n){var e=de({},t,n.attrs);return s(T,de({},e,{icon:tt}),null)};le.displayName="SyncOutlined";le.inheritAttrs=!1;const nt=le,lt=a=>(De("data-v-c8810bd5"),a=a(),Ne(),a),rt={class:"title-panel"},ot=lt(()=>_("span",null,"筛选列",-1)),st={style:{width:"150px"}},ct={class:"flex"},it={__name:"settingColumns",props:["tableName","columns"],emits:["change"],setup(a,{expose:t,emit:n}){const e=a,o=be(),D=ve();z(D);let{checkedColumns:k,columnsIndex:R}=z(o);const O=h([]),F=()=>{R.value=k.value=ge.TBLayout(e.tableName).map(f=>f.dataIndex),o.userSetting(e.tableName)},I=f=>{o.userSetting(e.tableName)},N=h(0),Q=f=>{N.value=f},x=f=>{event.preventDefault();const C=N.value;if(C!==f){const P=[...O.value],A=P[C];P.splice(C,1),P.splice(f,0,A),O.value=P,N.value=f,R.value=O.value.map(j=>j.value)}},w=f=>{event.preventDefault()},M=()=>{o.userSetting(e.tableName),N.value=null},L=()=>{O.value=o.getUserSetting(e.tableName)};return pe(()=>{L()}),me(()=>{L()}),t({}),(f,C)=>{const P=m("a-button"),A=m("a-checkbox"),j=m("a-col"),g=m("a-row"),G=m("a-checkbox-group"),W=m("a-popover");return i(),S("div",null,[s(W,{trigger:"click",placement:"left",getPopupContainer:u=>u.parentNode||f.document.body},{title:c(()=>[_("div",rt,[ot,s(P,{class:"fl-r",type:"link",onClick:F},{default:c(()=>[U("重置")]),_:1})])]),content:c(()=>[_("div",st,[s(G,{value:p(k),"onUpdate:value":C[0]||(C[0]=u=>$e(k)?k.value=u:k=u),name:"checkboxgroup",onChange:I},{default:c(()=>[s(g,null,{default:c(()=>[(i(!0),S(K,null,fe(O.value,(u,B)=>(i(),b(j,{class:"mt-10",key:u.index,span:24,draggable:!0,onDragstart:E=>Q(B),onDragover:E=>x(B),onDrop:E=>w(B),onDragend:M},{default:c(()=>[_("div",ct,[s(A,{value:u.value},{default:c(()=>[U($(u.label),1)]),_:2},1032,["value"]),s(p(He))])]),_:2},1032,["onDragstart","onDragover","onDrop"]))),128))]),_:1})]),_:1},8,["value"])])]),default:c(()=>[s(p(Ge))]),_:1},8,["getPopupContainer"])])}}},ut=he(it,[["__scopeId","data-v-c8810bd5"]]),dt={class:"flex"},pt={class:"pointer"},mt={key:2},ft={key:0,style:{width:"100%","min-width":"70px"}},vt={key:1,class:"flex-between"},gt={key:0},bt={class:"btn-link"},ht={__name:"index",props:{param:Object,tableName:String,keyRouteName:String,searchType:Array,detailPage:Object,noAutoQuery:Boolean,tableRowStyle:Function},emits:["emitRes"],setup(a,{expose:t,emit:n}){const e=a,o=ve(),D=be(),k=Me(),R=Le();let{app:O}=z(o),{fullscreen:F,cacheFun:I}=z(k),{selectedColumns:N}=z(D);z(R);const Q=Re(),x=h(!1),w=h([]),M=h([]),L=h(0),f=(l,v)=>e.tableRowStyle?e.tableRowStyle(l,v):v%2===1?"table-striped":null,C=(l,v,y,{currentDataSource:oe})=>{e.param.content.pageNumber=l.current,e.param.content.pageSize=l.pageSize,g()},P=()=>{e.param.content.tableid=O.value.meta.tables[e.tableName].tableid,w.value=D.loadTableConfig(e.tableName),console.log(w.value)},A=h([]);let j=h("");const g=async()=>{x.value=!0;const l=await J.requested(e.param);n("emitRes",l),M.value=l.data,L.value=l.total,A.value=l.sort,j.value=l.listqueryid,setTimeout(()=>{x.value=!1},1e3)},G=l=>{Q.push({name:e.detailPage.name,query:{id:l[e.detailPage.idname],rowindex:l.rowindex,listqueryid:j.value,fieldName:e.detailPage.idname}})},W=l=>{e.param.content.where=Object.assign({},e.param.content.where,l),g()},u=h(null),B=l=>{l.sorted=1,l.reversed=l.reversed==0?1:0,u.value=l,e.param.content.sort=[u.value],g()},E=(l,v)=>{e.param.content.pageNumber=1,e.param.content.where.tablefilter=e.param.content.where.tablefilter?e.param.content.where.tablefilter:{},e.param.content.where.tablefilter[l]=v},V=(l,v)=>{e.param.content.simplesort={},l.sort=e.param.content.simplesort[l.dataIndex]=v,w.value.forEach(y=>{y.dataIndex!==l.dataIndex&&(y.sort=0)}),g()};let re=O.value.systemappid,X=h([]);const _e=async()=>{let l=await J.requested({id:20221213094401,content:{systemappid:re}});X.value=l.data,console.log(l,"报表数据")};let ye=async(l,v)=>{Object.keys(l).length||(l[e.detailPage.idname]=0);let y=await J.requested({id:20221213094501,content:{sys_reportid:v.sys_reportid,dataid:l[e.detailPage.idname]}});ge.message(y,"操作成功",()=>{window.open("http://60.204.153.188"+y.data+`&${e.detailPage.idname}=${l[e.detailPage.idname]}`)})};return console.log({BASE_API:"http://60.204.153.188"},"系统数据"),xe(()=>N.value,(l,v)=>{D.loadTableConfig(e.tableName)&&(w.value=D.loadTableConfig(e.tableName))}),t({tableData:g}),pe(()=>{P(),_e(),e.noAutoQuery||g()}),me(()=>{I.value&&I.value(g),I.value=null}),Ae(()=>{}),(l,v)=>{const y=m("a-button"),oe=m("a-menu-item"),Se=m("a-menu"),Oe=m("a-dropdown"),we=m("a-space"),Ce=m("a-input"),Pe=m("a-table"),ke=m("a-card");return i(),S("div",null,[_("div",null,[a.searchType?(i(),b(Ie,{key:0,searchType:a.searchType,onOnSubmit:W},null,8,["searchType"])):q("",!0)]),s(ke,{id:"fulltable",bodyStyle:{padding:"10px"}},{title:c(()=>[_("div",dt,[H(l.$slots,"operation",{},void 0,!0),p(X).filter(r=>r.type=="datainfo").length>0&&p(re)!=163?(i(),b(Te,{key:0,btnName:"报 表",class:"inline-16",position:"detail",size:"small",data:p(X).filter(r=>r.type=="datainfo")},{print:c(({data:r})=>[s(y,{onClick:d=>p(ye)({},r),type:"text",size:"mini"},{default:c(()=>[U("打 印")]),_:2},1032,["onClick"])]),_:1},8,["data"])):q("",!0),_("div",pt,[s(we,{size:"middle"},{default:c(()=>[H(l.$slots,"operationRight",{},void 0,!0),s(p(nt),{onClick:g,spin:x.value},null,8,["spin"]),s(ut,{ref:"setColumns",columns:w.value,tableName:e.tableName},null,8,["columns","tableName"]),s(Be,{domId:"fulltable"}),s(Oe,{getPopupContainer:r=>r.parentNode||l.document.body},{overlay:c(()=>[s(Se,null,{default:c(()=>[(i(!0),S(K,null,fe(A.value,r=>(i(),b(oe,{key:r.sortid,onClick:d=>B(r)},{default:c(()=>[U($("按"+r.sortname)+$(r.reversed==1?"正序":"倒序"),1)]),_:2},1032,["onClick"]))),128))]),_:1})]),default:c(()=>[_("a",{class:"ant-dropdown-link",onClick:v[0]||(v[0]=je(()=>{},["prevent"]))},[u.value&&u.value.reversed==1?(i(),b(p(Y),{key:0})):(i(),b(p(Z),{key:1})),u.value?(i(),S("small",mt," "+$("按"+u.value.sortname)+$(u.value.reversed==1?"倒序":"正序"),1)):q("",!0)])]),_:1},8,["getPopupContainer"])]),_:3})])])]),extra:c(()=>[]),default:c(()=>[s(Pe,{class:"ant-table-small ant-table-red",loading:x.value,size:"small",dataSource:M.value,columns:w.value,pagination:{showSizeChanger:!0,defaultPageSize:20,total:L.value},scroll:p(F)?{x:"max-content",y:"86vh"}:{x:"max-content"},"row-class-name":(r,d)=>f(r,d),onChange:C,bordered:""},{headerCell:c(({column:r})=>[r.filter==1||r.filter==2?(i(),S("div",ft,[s(Ce,{value:r.value,"onUpdate:value":d=>r.value=d,placeholder:r.title,onChange:d=>E(r.dataIndex,r.value),onPressEnter:g,bordered:!0},ze({_:2},[r.sortable==1?{name:"suffix",fn:c(()=>[r.sort==0?(i(),b(p(Y),{key:0,onClick:d=>V(r,1)},null,8,["onClick"])):(i(),b(p(Z),{key:1,onClick:d=>V(r,0)},null,8,["onClick"]))]),key:"0"}:void 0]),1032,["value","onUpdate:value","placeholder","onChange"])])):(i(),S("div",vt,[_("span",null,$(r.title),1),r.sortable==1?(i(),S("span",gt,[r.sort==0?(i(),b(p(Y),{key:0,onClick:d=>V(r,1)},null,8,["onClick"])):(i(),b(p(Z),{key:1,onClick:d=>V(r,0)},null,8,["onClick"]))])):q("",!0)]))]),bodyCell:c(({column:r,record:d})=>[r.dataIndex===e.keyRouteName?(i(),S(K,{key:0},[s(y,{type:"link",size:"small",onClick:_t=>G(d)},{default:c(()=>[_("span",bt,$(d[e.keyRouteName]),1)]),_:2},1032,["onClick"]),H(l.$slots,r.dataIndex,{data:d},void 0,!0)],64)):H(l.$slots,"tb_cell",{key:1,data:{column:r,record:d}},void 0,!0)]),_:3},8,["loading","dataSource","columns","pagination","scroll","row-class-name"])]),_:3})])}}},xt=he(ht,[["__scopeId","data-v-d2a4fca6"]]);export{xt as l};
|