@jecloud/func
Version:
JECloud 功能库
1 lines • 1.87 kB
JavaScript
var e=this&&this.__assign||function(){return e=Object.assign||function(e){for(var o,t=1,n=arguments.length;t<n;t++)for(var r in o=arguments[t])Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r]);return e},e.apply(this,arguments)};import{createVNode as o}from"vue";import{ref as t}from"vue";import{Modal as n}from"@jecloud/ui";import{getBodyHeight as r,getBodyWidth as i,isPlainObject as u}from"@jecloud/utils";import a from"../../select-window";import l from"../../func/src/func";import c from"../../func-querys";export function showFunc(t,a){void 0===a&&(a={}),u(t)&&(t=(a=t).funcCode);var c=a.width,d=void 0===c?i()-100:c,s=a.height,h=void 0===s?r()-100:s,f=a.isFuncForm,m=a.beanId,p=a.bean,w=a.modalOptions,v=a.readOnly,y=a.querys,b=a.orders;return n.window(e({title:"功能加载中...",width:d,height:h,minWidth:Math.min(d,500),minHeight:Math.min(h,500),bodyStyle:{padding:0},headerStyle:{height:"50px",borderBottom:"1px solid #f0f2f5"},content:function(){return o(l,{funcCode:t,querys:y,orders:b,isFuncForm:f,beanId:m,bean:p,readOnly:v,isWindow:!0},null)}},w))}export function showFuncForm(e,o){void 0===o&&(o={}),u(e)&&(e=(o=e).funcCode),o.isFuncForm=!0,showFunc(e,o)}export function showFuncSelect(e){return a.showGrid(e)}export function showTreeSelect(e){return a.showTree(e)}export function showFuncQuerys(e){void 0===e&&(e={});var r=e.callback,i=t(e),u=t(),a=null;return n.window({title:"查询条件拼装器",width:"1000px",height:"auto",maximizable:!1,bodyStyle:{padding:"0"},headerStyle:{height:"60px"},okButton:"close"!=i.value.btnType&&{closable:!1,handler:function(e){var o=u.value.state.textareaValue;o&&""!=o?(null==r||r(o),a.close()):n.alert("请生成SQL配置","error")}},cancelButton:"close"!=i.value.btnType||{text:"关闭"},onShow:function(e){var o=e.$modal;a=o},slots:{default:function(){return o(c,{ref:u,queryParams:i.value},null)}}})}