@gct-paas/render-web 6.0.0-dev.32 → 6.0.0-dev.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/loader.esm.min.js +1 -1
- package/package.json +12 -12
package/dist/loader.esm.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @gct-paas/render-web v6.0.0-dev.
|
|
1
|
+
/*! @gct-paas/render-web v6.0.0-dev.32 */
|
|
2
2
|
import{AuthUtil as e,CARD_TRIGGER_ENUM as t,DEFAULT_MQTT_INSTANCE_ID as l,EntityModelCategoryEnum as o,FIELD_TYPE as a,FIELD_TYPE_TRACE as n,FormComponents as r,MaterialEnum as i,ModelTypeEnum as s,PageTypeEnum as d,PrintTypeEnum as u,QuickSearchEnum as c,ScriptTypeEnum as v,SystemMqttService as p,TagTypeEnum as g,cssLoader as f,gctMemoizeAsync as y,measureText as m,modelLoader as b,nullDisplayEnum as h,t as _,transformUrl as C,truncateText as E,useNamespace as w}from"@gct-paas/core";import{DesignRender as T,DesignRenderViewPrefix as S,RenderNodeRegister as x,RenderNodeType as I,schemaToStyle as O,transformDataToDict as k}from"@gct-paas/render";import{Fragment as N,computed as A,createBlock as R,createCommentVNode as L,createElementBlock as P,createElementVNode as F,createSlots as D,createTextVNode as B,createVNode as M,defineComponent as $,guardReactiveProps as j,h as U,inject as K,isVNode as W,mergeProps as V,nextTick as q,normalizeClass as H,normalizeProps as z,normalizeStyle as G,onBeforeMount as J,onBeforeUnmount as X,onMounted as Y,openBlock as Q,provide as Z,reactive as ee,ref as te,renderList as le,renderSlot as oe,resolveComponent as ae,shallowRef as ne,toDisplayString as re,toHandlers as ie,toRaw as se,toRef as de,toValue as ue,unref as ce,useCssVars as ve,useSlots as pe,vShow as ge,watch as fe,watchEffect as ye,withCtx as me,withDirectives as be,withModifiers as he}from"vue";import{Avatar as _e,Checkbox as Ce,CheckboxGroup as Ee,Empty as we,Radio as Te,RadioGroup as Se,Select as xe,message as Ie}from"ant-design-vue";import{VxeGrid as Oe}from"vxe-table";import{CopyModuleKey as ke,typePadding as Ne}from"@gct-paas/core-web";import{cloneDeep as Ae,isString as Re,pick as Le,range as Pe}from"lodash-es";import{IconNext as Fe}from"@gct-paas/core-components";import{DomEditor as De,createEditor as Be,createToolbar as Me}from"@wangeditor/editor";import{DesignNodeMode as $e,formatFieldValue as je,transformField2Component as Ue}from"@gct-paas/schema";import Ke from"exceljs";var We=Object.defineProperty,Ve=(e,t)=>{let l={};for(var o in e)We(l,o,{get:e[o],enumerable:!0});return t||We(l,Symbol.toStringTag,{value:"Module"}),l},qe=Symbol("PAGE_EVENT"),He=e=>Z(qe,e),ze=()=>{try{const e=K(qe);if(!e)throw new Error("PAGE_EVENT not provided");return e}catch{return{}}};function Ge(e){return Ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ge(e)}function Je(e,t,l){return(t=function(e){var t=function(e){if("object"!=Ge(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var l=t.call(e,"string");if("object"!=Ge(l))return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ge(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:l,enumerable:!0,configurable:!0,writable:!0}):e[t]=l,e}var Xe=class extends p{static get ONLINE_COUNT_TOPIC(){return`${_gct.store.appInfo.id}/${_gct.env.getEnv()}/ONLINE_COUNT`}static get APP_EXIT_TOPIC(){return`web.${_gct.store.userInfo.userId}/${_gct.env.getEnv()}.${_gct.store.appInfo.id}.${_gct.store.userInfo.ip}.${this.fingerprint}/EXIT`}static async createMqtt(){var e;await super.createMqtt(),this.client_id=`web.${_gct.store.userInfo.userId}.${_gct.env.getEnv()}.${_gct.store.appInfo.id}.${_gct.store.userInfo.ip}.${this.fingerprint}.${/* @__PURE__ */(new Date).getTime()}`;const t=(null===(e=_gct.store.userInfo)||void 0===e?void 0:e.mqttProperties)||{};this.app_client=_gct.mqtt.create(l,{...t,clientId:this.client_id,will:{topic:this.USER_CONTROL_TOPIC,payload:JSON.stringify({clientId:this.client_id,msg:"exit"})}})}static subs(){super.subs(),this.subAppExit()}static subKickOut(){return super.subKickOut(()=>{this.pubLogout(),this.pubExit()})}static subscribeApp(e,t){if(!this.app_client)throw new Error("App MQTT client is not initialized");return this.app_client.subscribe(e,(e,l)=>{try{t(JSON.parse(l.toString()))}catch(o){console.error("解析 MQTT 消息 payload 失败:",o)}})}static subOnlineCount(e){return this.subscribeApp(this.ONLINE_COUNT_TOPIC,e)}static subAppExit(){return this.subscribeApp(this.APP_EXIT_TOPIC,()=>{_gct.message.error(`您已被移出应用【${_gct.store.appInfo.name}】,请稍后再试。`),setTimeout(()=>{if(_gct.env.isAppSingle||_gct.env.isSandbox)e.getInstance().logout(!0);else{const e=new URL(`${location.origin}/paas-front/portal#/home`);window.location.href=e.toString()}},1e3)})}static pubOnline(){var e;null===(e=this.app_client)||void 0===e||e.publish(this.USER_CONTROL_TOPIC,JSON.stringify({clientId:this.client_id,msg:"online"}))}static pubExit(){var e;null===(e=this.app_client)||void 0===e||e.publish(this.USER_CONTROL_TOPIC,JSON.stringify({clientId:this.client_id,msg:"exit"}))}};Je(Xe,"app_client",void 0),Je(Xe,"client_id",""),Je(Xe,"USER_CONTROL_TOPIC","users/control/msg");var Ye,Qe={class:"basic-page-render"},Ze={key:0,class:"basic-page-render__header"},et=(e,t)=>{const l=e.__vccOpts||e;for(const[o,a]of t)l[o]=a;return l},tt=/* @__PURE__ */et(/* @__PURE__ */$({__name:"basic-page",props:{useBgColor:{type:[Boolean,String],default:!0}},setup(e){const t=e,l=A(()=>!0===t.useBgColor?"#ffffff":"string"==typeof t.useBgColor?t.useBgColor:"transparent");return(e,t)=>(Q(),P("div",Qe,[e.$slots.header?(Q(),P("div",Ze,[oe(e.$slots,"header",{},void 0,!0)])):L("",!0),F("div",{class:"basic-page-render__body",style:G({"--bg-color":l.value})},[oe(e.$slots,"default",{},void 0,!0)],4)]))}}),[["__scopeId","data-v-23453a1b"]]),lt={class:"basic-page-render"},ot={key:0,class:"basic-page-render__header"},at=/* @__PURE__ */et(/* @__PURE__ */$({__name:"basic-page-render",props:{useBgColor:{type:[Boolean,String],default:!0}},setup(e){const t=e,l=A(()=>!0===t.useBgColor?"#ffffff":"string"==typeof t.useBgColor?t.useBgColor:"transparent");return(e,t)=>(Q(),P("div",lt,[e.$slots.header?(Q(),P("div",ot,[oe(e.$slots,"header",{},void 0,!0)])):L("",!0),F("div",{class:"basic-page-render__body",style:G({"--bg-color":l.value})},[oe(e.$slots,"default",{},void 0,!0)],4)]))}}),[["__scopeId","data-v-3c6aba55"]]),nt={minWidth:100,showOverflow:!0,slots:{default:"default"},align:"left"},rt=(_("sys.index"),{field:"action",width:134,fixed:"right",slots:{default:"action"}}),it={class:"base-vxe-table-wrapper"},st={class:"base-vxe-table-area"},dt={key:0,class:"text-right mt10px"},ut=/* @__PURE__ */et(/* @__PURE__ */$({__name:"base-vxe-table",props:{loading:{type:Boolean},autoResize:{type:Boolean,default:!0},height:{default:"100%"},dataSource:{},tableColumns:{},showPagination:{type:Boolean},pagination:{},action:{},events:{},attributes:{}},emits:["request-table-data","checkbox-change","radio-change"],setup(e,{expose:t,emit:l}){const o=e;function a(e,t){const{type:l,field:o,formatter:a,params:n={}}=e;if("checkbox"===l||"radio"===l)return;const r=t[o];return a&&"function"==typeof a?a({cellValue:r,row:t,column:e}):r||n.defaultValueStr||"--"}const n=te(),r=l,i=[...o.tableColumns.map(e=>({...nt,...e,slots:e.slots?{...nt.slots,...e.slots}:nt.slots})),{...rt,...o.action,title:_("sys.operation")}],s=A(()=>o.pagination?{current:o.pagination.current,pageSize:o.pagination.pageSize,total:o.pagination.total,showSizeChanger:!0,pageSizeOptions:["10","20","30","40","50"],showTotal:e=>_("sys.component.table.total",{total:e})}:{});function d({rowIndex:e}){if(!o.showPagination)return e+1;if(!o.pagination)return e+1;const t=e+1;return(o.pagination.current-1)*o.pagination.pageSize+t}const u=(e,t)=>{r("request-table-data",{current:e,pageSize:t})};return t({getRef:()=>n.value}),(t,l)=>{const o=ae("a-empty"),r=ae("a-pagination");return Q(),P("div",it,[F("div",st,[M(ce(Oe),V({ref_key:"xTable",ref:n,class:"gct-edhr-vxetable vxetable default","column-config":{minWidth:100,useKey:!0,resizable:!0},"show-header-overflow":!0,"edit-config":{trigger:"manual",mode:"row"},"row-config":{isHover:!0,useKey:!0,isCurrent:!0},"scroll-y":{enabled:!0,scrollToTopOnChange:!0,oSize:5,gt:30},"min-height":"88",height:e.height,data:e.dataSource,loading:e.loading,"loading-config":{text:t.$t("sys.loadingText")},columns:i,"auto-resize":e.autoResize,"seq-config":{seqMethod:d}},e.attributes,ie(e.events)),{default:me(({column:e,row:t})=>[F("span",null,re(a(e,t)),1)]),custom_render:me(({column:e,row:l,rowIndex:o})=>[oe(t.$slots,"custom_item",z(j({record:l,column:e,rowIndex:o})),void 0,!0)]),action:me(({row:e,rowIndex:l})=>[oe(t.$slots,"operate",z(j({row:e,rowIndex:l})),void 0,!0)]),empty:me(()=>[M(o,{image:ce(we).PRESENTED_IMAGE_SIMPLE},null,8,["image"])]),_:3},16,["height","data","loading","loading-config","auto-resize","seq-config"])]),e.showPagination&&e.dataSource.length?(Q(),P("div",dt,[M(r,V({class:"pagination-total-left"},s.value,{onChange:u}),null,16)])):L("",!0)])}}}),[["__scopeId","data-v-bf4b3774"]]),ct=/* @__PURE__ */et(/* @__PURE__ */$({__name:"tag-span",props:{tagStyle:{}},setup(e){ve(e=>({v2ae1b805:o.value}));const t=e,l=de(()=>{var e;return(null===(e=t.tagStyle)||void 0===e?void 0:e.tagType)||g.RADIUS}),o=de(()=>{var e;return(null===(e=t.tagStyle)||void 0===e?void 0:e.color)||"#f0f0f0"}),a=de(()=>`tag-${l.value}`);return(e,t)=>(Q(),P("span",{class:H(["tag cursor-pointer",a.value])},[oe(e.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-6c8c4c7a"]]),vt=/* @__PURE__ */et(/* @__PURE__ */$({__name:"tag-layout",props:{labelLayout:{},disabled:{type:Boolean}},setup:e=>(t,l)=>{var o,a,n,r;return Q(),P("span",{class:H([e.disabled?"tag-label-disabled":null,!(null===(o=e.labelLayout)||void 0===o?void 0:o.hasLabelWidth)||"left"!==(null===(a=e.labelLayout)||void 0===a?void 0:a.layout.label)&&"horizontal"!=(null===(n=e.labelLayout)||void 0===n?void 0:n.layout)?"":"ellipsis"==(null===(r=e.labelLayout)||void 0===r?void 0:r.overLabelDisplay)?"label-ellipsis":"label-wrap"])},[oe(t.$slots,"default",{},void 0,!0)],2)}}),[["__scopeId","data-v-85e6a8f5"]]),pt={class:"select-text"},gt={class:"select-text"},ft={key:0},yt=/* @__PURE__ */$({__name:"tag-label",props:{tagWidgetStyle:{},type:{},disabled:{type:Boolean},label:{},isDesign:{type:Boolean},closable:{type:Boolean},showTagStyle:{type:Boolean,default:!0},avatar:{},iconExtraProps:{},iconProps:{},title:{}},emits:["on-close"],setup(e){const t=e,l=K("labelLayout",{}),o=de(()=>{var e;let l=t.label??"";return t.showTagStyle&&(null===(e=t.tagWidgetStyle)||void 0===e?void 0:e.tagStyleOpen)||t.type===a.ENUM_MULTI||t.type===a.ENUM?l?Re(l)?l.split(","):l:[]:l instanceof Array?l.join(","):l+""}),n=de(()=>{var e;const l=null===(e=t.tagWidgetStyle)||void 0===e?void 0:e.contentFont;return l?O(l):{}}),r=(e="")=>{var l,o;const a=(null===(l=t.iconExtraProps)||void 0===l?void 0:l[e])||{},r={};return(null==a?void 0:a.textColor)&&Object.assign(r,{color:null==a?void 0:a.textColor}),(null===(o=n.value)||void 0===o?void 0:o.color)?n.value:{wordBreak:"break-all",...n.value,...r}},i={render:({$attrs:e})=>{if(e["label-name"]){var l;const o=(null===(l=t.iconExtraProps)||void 0===l?void 0:l[e["label-name"]])||t.iconProps||{};if(!(null==o?void 0:o.icon))return;return U(Fe,{size:16,value:null==o?void 0:o.icon,color:(null==o?void 0:o.iconColor)||"var(--gct-color-primary)",style:"vertical-align: text-bottom; margin-right: 3px"})}}};return(n,s)=>{var d;return e.showTagStyle&&(null===(d=e.tagWidgetStyle)||void 0===d?void 0:d.tagStyleOpen)?(Q(),R(vt,{key:0,disabled:!!e.disabled,"label-layout":ce(l)},{default:me(()=>[(Q(!0),P(N,null,le(o.value,(l,o)=>(Q(),R(ct,{key:o,"tag-style":e.tagWidgetStyle.tagStyle,style:G(r(l))},{default:me(()=>[t.avatar?(Q(),R(ce(_e),{key:0,src:ce(C)(t.avatar),size:20,style:{"margin-top":"-5px"},class:"mr4px"},null,8,["src"])):L("",!0),M(i,{"label-name":l},null,8,["label-name"]),F("span",pt,re(l),1),e.closable?(Q(),R(ce(Fe),{key:1,size:15,value:"icon-park:close-small",style:{verticalAlign:"text-bottom","--color":"rgba(0,0,0,.45)",lineHeight:"1",marginLeft:"2px"},onClick:s[0]||(s[0]=he(e=>n.$emit("on-close"),["prevent","stop"]))})):L("",!0)]),_:2},1032,["tag-style","style"]))),128))]),_:1},8,["disabled","label-layout"])):e.type===ce(a).ENUM_MULTI||e.type===ce(a).ENUM?(Q(),R(vt,{key:1,disabled:!!e.disabled,"label-layout":ce(l)},{default:me(()=>[(Q(!0),P(N,null,le(o.value,(t,l)=>{var a;return Q(),P("span",{key:l,style:G(r(t)),class:"mr-5px"},[M(i,{"label-name":t},null,8,["label-name"]),F("span",gt,re(t)+re(!(null===(a=e.tagWidgetStyle)||void 0===a?void 0:a.tagStyleOpen)&&l<o.value.length-1?",":""),1)],4)}),128)),o.value.length?L("",!0):(Q(),P("span",ft))]),_:1},8,["disabled","label-layout"])):(Q(),R(vt,{key:2,style:G(r(o.value)),disabled:!!e.disabled,"label-layout":ce(l),class:"select-text leading-none",title:t.title},{default:me(()=>[B(re(o.value),1)]),_:1},8,["style","disabled","label-layout","title"]))}}}),mt=/* @__PURE__ */et(yt,[["__scopeId","data-v-5e1146da"]]),bt=/* @__PURE__ */$({__name:"selectTag",props:{tagWidgetStyle:{}},setup(e){const t=e,l=de(()=>{return t.tagWidgetStyle.tagStyleOpen?t.tagWidgetStyle:{tagStyleOpen:!0,contentFont:null===(e=t.tagWidgetStyle)||void 0===e?void 0:e.contentFont};var e});return(e,t)=>(Q(),R(mt,{"tag-widget-style":l.value},null,8,["tag-widget-style"]))}}),ht=y(_api.apaas.commonInfoCard.getGetById),_t=/* @__PURE__ */$({name:"CardViewRender",props:{id:{type:String,required:!0},modelKey:{type:String,required:!0},fetch:{type:Function},preview:{type:Boolean,default:!1}},emits:["mounted"],setup(e,{emit:t,slots:l}){const o=w("card-view-render"),a=te(!1),n=te(!1),r=te(null),i=te({}),s=A(()=>{var e;return r.value?{width:(null===(e=r.value.pageNode)||void 0===e?void 0:e.data.width)?`${r.value.pageNode.data.width}px`:""}:{}});return async function(){if(e.id){try{if(a.value=!0,await async function(){const t=await ht({id:e.id,modelKey:e.modelKey,type:"CARD"});t&&t.designerJson&&(r.value=JSON.parse(decodeURIComponent(t.designerJson)))}(),!0!==e.preview&&e.fetch){var l;const t=function(e={}){const t=/* @__PURE__ */new Set;return Object.values(e).forEach(e=>{var l;const o=null==e||null===(l=e.data)||void 0===l?void 0:l.fieldCodeChain;if(!o)return;let a;if("string"==typeof o)try{var n;a=null===(n=JSON.parse(o))||void 0===n?void 0:n.fieldLink}catch{return}else a=o.fieldLink;(null==a?void 0:a.length)&&t.add(`${a.join(".")}.*`)}),Array.from(t)}(null===(l=r.value)||void 0===l?void 0:l.nodes);i.value=await e.fetch(t)||{}}}catch(o){console.error(o)}finally{a.value=!1}n.value=!0,await q(),setTimeout(()=>{var e;t("mounted",null===(e=r.value)||void 0===e||null===(e=e.pageNode)||void 0===e?void 0:e.data)})}}(),()=>{var t;return M("div",{class:o.b(),style:s.value},[a.value&&l.loading?null===(t=l.loading)||void 0===t?void 0:t.call(l):null,r.value&&n.value?M(T,{context:{data:i.value,id:e.id,modelKey:e.modelKey},model:{nodes:r.value.nodes,pageNode:r.value.pageNode,tree:r.value.tree,type:S.CARD_VIEW},prefix:S.CARD_VIEW,preview:e.preview},null):null])}}}),Ct=["onMouseup"],Et={key:1},wt=/* @__PURE__ */$({__name:"ref-card-label-render",props:{tagWidgetStyle:{},disabled:{type:Boolean},values:{},label:{},showTagStyle:{type:Boolean,default:!0},trigger:{},getCardData:{},modelKey:{},refCardId:{}},setup(e){const l=e,o=l.trigger===t.HOVER?"primary-gct-hover":"primary-gct",a=K("labelLayout",{}),n=ee({}),r=A(()=>{var e;const t=("string"==typeof l.label?(l.label??"").split(","):l.label)??[];return(null===(e=l.values)||void 0===e?void 0:e.filter((e,l)=>t[l]).map((e,l)=>({value:e,label:t[l]})))??[]}),i=de(()=>{var e;const t=null===(e=l.tagWidgetStyle)||void 0===e?void 0:e.contentFont;return t?O(t):{}}),s=de(()=>{var e;return(null===(e=i.value)||void 0===e?void 0:e.color)?i.value:{wordBreak:"break-all",...i.value}}),d=async(e,t)=>{n[t.value]=e};function u(e){d(!0,e)}function c(e){return l.getCardData.bind(null,e)}return(t,l)=>{const i=ae("a-spin"),v=ae("a-popover");return r.value.length?(Q(),R(vt,{key:0,disabled:!!e.disabled,"label-layout":ce(a)},{default:me(()=>{var t;return[e.showTagStyle&&(null===(t=e.tagWidgetStyle)||void 0===t?void 0:t.tagStyleOpen)?(Q(!0),P(N,{key:0},le(r.value,(t,l)=>(Q(),R(v,{key:l,trigger:e.trigger,visible:!!n[t.value],placement:"bottomLeft",color:"#fff","overlay-class-name":"gct-ref-card-popover min-w100px min-h30px max-h96vh",onVisibleChange:e=>d(e,t)},{content:me(()=>[M(ce(_t),{id:e.refCardId,"model-key":e.modelKey,fetch:c(t.value)},{loading:me(()=>[M(i)]),_:1},8,["id","model-key","fetch"])]),default:me(()=>[M(ct,{"tag-style":e.tagWidgetStyle.tagStyle,onMouseup:e=>u(t)},{default:me(()=>[F("span",{class:H(["select-text cursor-pointer",ce(o)]),style:G(s.value)},re(t.label),7)]),_:2},1032,["tag-style","onMouseup"])]),_:2},1032,["trigger","visible","onVisibleChange"]))),128)):(Q(!0),P(N,{key:1},le(r.value,(t,a)=>(Q(),P(N,{key:a},[F("span",null,re(a?",":""),1),M(v,{"overlay-class-name":"gct-ref-card-popover min-w100px min-h30px max-h96vh",visible:!!n[t.value],trigger:e.trigger,color:"#fff",placement:"bottomLeft",onVisibleChange:e=>d(e,t)},{content:me(()=>[M(ce(_t),{id:e.refCardId,"model-key":e.modelKey,fetch:c(t.value)},{loading:me(()=>[M(i)]),_:1},8,["id","model-key","fetch"])]),default:me(()=>[F("span",{class:H(["select-text cursor-pointer",ce(o)]),style:G(s.value),onClick:l[0]||(l[0]=he(()=>{},["stop"])),onMouseup:e=>u(t)},re(t.label),47,Ct)]),_:2},1032,["visible","trigger","onVisibleChange"])],64))),128))]}),_:1},8,["disabled","label-layout"])):(Q(),P("span",Et," "))}}}),Tt=wt;function St(e){const{fieldType:t,refCard:l,refCardId:o,readonly:n}=e.widget.props;(t===a.REF||t===a.REF_MULTI||t===a.RDO_REF)&&l&&o&&n&&Z("refCardValues",{refCardValues:de(()=>{const t=e.modelValue??[];return t instanceof Array?t:t.split(",")}),widget:e.widget})}function xt(){var e;const t=K("refCardValues");if(!t)return{};const{fieldType:l,bindModelKey:o,refCardId:a,cardTrigger:n}=(null==t||null===(e=t.widget)||void 0===e?void 0:e.props)||{};return{refCardValues:null==t?void 0:t.refCardValues,trigger:n,getCardData:y(At,{fieldType:l,modelKey:o}),modelKey:o,refCardId:a}}function It(e={}){const t=/* @__PURE__ */new Set;return Object.values(e).forEach(e=>{var l;const o=Ot(null==e||null===(l=e.data)||void 0===l?void 0:l.fieldCodeChain),a=null==o?void 0:o.fieldLink;(null==a?void 0:a.length)&&t.add(`${a.join(".")}.*`)}),Array.from(t)}function Ot(e){if(e){if("string"==typeof e)try{return JSON.parse(e)}catch{return}return e}}function kt(e={},t={}){return Object.keys(e).reduce((l,o)=>{const a=e[o];if(a&&"object"==typeof a&&!Array.isArray(a))return l[o]=kt(a,t),l;const n=o.includes(".")?o.split(".").pop():o,r=t[o]??t[n];try{l[o]=a?String(a).split(",").map(e=>(null==r?void 0:r[e])??e).join(","):a}catch{l[o]=a}return l},{})}function Nt(e={},t,l){var o;if(!t)return"";const a=Ot(l);if(null==a||null===(o=a.fieldLink)||void 0===o?void 0:o.length){var n;const l=[...a.fieldLink,t].join(".");return(null==e||null===(n=e.__FOREIGN__)||void 0===n?void 0:n[l])??(null==e?void 0:e[l])??""}return(null==e?void 0:e[t])??""}async function At({fieldType:e,modelKey:t},l,n=[]){const r=(null==n?void 0:n.length)?n:[];if(console.log("getDataByModelType",n,r),e===a.RDO_REF){const{data:e={},dict:a={}}=await _api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey({modelKey:t,bsKey:"rdoGetVersionByRefId",modelCategory:o.ENTITY},{includeDeleted:1,refId:l},{foreignFields:r});return Rt(e,a)}{const{data:e={},dict:a={}}=await _api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey({modelKey:t,bsKey:"getOne",modelCategory:o.ENTITY},{includeDeleted:1},{query:{"id_.eq":l},foreignFields:r});return Rt(e,a)}}function Rt(e={},t={}){const l=e.__FOREIGN__,o={...e};delete o.__FOREIGN__;const a=k(o,t);return l&&(a.__FOREIGN__=kt(l,t)),a}function Lt(){const e=_gct.router.currentRoute.value;return{quickSearchEvent:async function(t,l,o,a){const{name:n,module:r}=Ft[t];if(e.name!==n){const e=JSON.stringify({module:r,key:l,searchName:o,categoryId:a});await _gct.router.push({name:n,query:{searchStr:encodeURI(e)}})}else null==Ye||Ye({module:r,key:l,searchName:o,categoryId:a})}}}function Pt(e,t){Ye=e;const l=_gct.router.currentRoute.value.query.searchStr;if(l){const{module:t,key:o,searchName:a,categoryId:n}=JSON.parse(decodeURI(l));e({module:t,key:o,searchName:a,categoryId:n})}else null==t||t()}var Ft={[c.MODEL_ENITY]:{name:"ModelDesigner",module:s.ENTITY},[c.MODEL_ENUM]:{name:"ModelDesigner",module:s.ENUM},[c.MODEL_VIEW]:{name:"ModelDesigner",module:s.VIEW},[c.MODEL_DATA]:{name:"ModelDesigner",module:s.DATA},[c.WEB_PAGE]:{name:"PageDesigner",module:d.WEB},[c.MOBILE_PAGE]:{name:"PageDesigner",module:d.MOBILE},[c.PAD_PAGE]:{name:"PageDesigner",module:d.PAD},[c.LABLE_PRINT]:{name:"PrintDesign",module:u.LABEL},[c.DOCUMENT_PRINT]:{name:"PrintDesign",module:u.RECEIPT},[c.PROCESS_DESIGNER]:{name:"Process"},[c.DEV_SCRIPT]:{name:"LogicDevelop",module:v.DEFAULT},[c.DEV_LOGIC]:{name:"LogicDevelop",module:v.ORCHESTRATION},[c.DEV_METHOD]:{name:"LogicDevelop",module:v.GLOBAL_METHOD}},Dt={key:0,class:"w100% ell"},Bt={key:0,class:"gct-custom-tag ml8px"},Mt=/* @__PURE__ */$({__name:"field-readonly",props:{isTooltip:{type:Boolean},label:{},type:{},modelValue:{},tagWidgetStyle:{},disabled:{type:Boolean},iconExtraProps:{}},setup(e){const t=e,l=A(()=>Array.isArray(t.label)?t.label.join(","):t.label),{refCardValues:o,trigger:n,getCardData:r,modelKey:i,refCardId:s}=xt(),d=A(()=>{var e;return(null==o||null===(e=o.value)||void 0===e?void 0:e.length)?U(Tt,{values:o.value,trigger:n,getCardData:r,modelKey:i,refCardId:s}):mt});return(o,n)=>{var r;return t.type===ce(a).RDO_REF?(Q(),P("div",Dt,[M(ce(d),V(o.$attrs,{label:e.label,"tag-widget-style":t.tagWidgetStyle,disabled:t.disabled,"icon-extra-props":t.iconExtraProps}),null,16,["label","tag-widget-style","disabled","icon-extra-props"]),t.type===ce(a).RDO_REF&&t.modelValue&&!(null===(r=t.modelValue)||void 0===r?void 0:r.includes(":"))?(Q(),P("span",Bt," 默认 ")):L("",!0)])):(Q(),R(ce(d),V({key:1},o.$attrs,{label:e.label,"tag-widget-style":t.tagWidgetStyle,disabled:t.disabled,"icon-extra-props":t.iconExtraProps,title:l.value,type:e.type}),null,16,["label","tag-widget-style","disabled","icon-extra-props","title","type"]))}}}),$t=/* @__PURE__ */$({name:"FieldSelect",props:{design:Boolean,disabled:Boolean,readonly:Boolean,selectExtraProps:Object,fieldType:{type:String,required:!0},type:{type:String,required:!0},tagStyle:{type:Object,required:!0},options:Array,value:[String,Number,Array],maxTagCount:{type:[Number,String],default:5},maxTagTextLength:{type:Number,default:6},selectOptionLabel:{type:String},selectorWidth:{type:Number,default:1400}},setup(e,{emit:t,slots:l}){const o=A({get:()=>e.value,set(e){t("update:value",e)}}),a=(t,{name:l,iconExtraProps:o,otherParams:a={}})=>U(t,{tagWidgetStyle:e.tagStyle,type:e.fieldType,label:l,disabled:e.disabled,iconExtraProps:o,...a}),n=A(()=>(e.options??[]).map(t=>{var l;const{iconColor:o,icon:n,textColor:r}=t._item||{};return{...t,[(null===(l=e.selectExtraProps)||void 0===l?void 0:l.optionLabelProp)||"titleLabel"]:a(mt,{name:t.label,iconExtraProps:{[t.label]:{icon:n,iconColor:o,textColor:r}}})}}));function i(e,t){var l;const{_DICT:o={}}=e,a=e[t];return(null===(l=o[t])||void 0===l||null===(l=l[a])||void 0===l?void 0:l.join(","))??a??e.id_}const s=A(()=>{if(e.readonly){var t;const l=(null===(t=n.value)||void 0===t?void 0:t.filter(t=>{var l;return"multiple"===(null===(l=e.selectExtraProps)||void 0===l?void 0:l.mode)?Array.isArray(o.value)&&o.value.includes(t.value):t.value===o.value}))??[],a=Object.fromEntries((null==l?void 0:l.map(e=>[e.label,Le((null==e?void 0:e._item)||{},["iconColor","icon","textColor"])]))??[]);return{labels:l.map(e=>e.label),icons:a}}return{}}),d={option:t=>{const{label:l,_item:o={}}=t;return e.type===r.Userpicker?M("div",{class:"flex items-center"},[M(_e,{size:30,style:"margin: 0 8px;min-width:32px",src:C(o.avatar)},null),M("div",{style:"width:calc(100% - 35px)"},[M("div",{class:" w100% ell",title:l},[l]),M("div",{class:"text-[#8F8F8F] text-[12px] mt2px"},[o.masterOrgName])])]):a(mt,{name:e.selectOptionLabel?i(o,e.selectOptionLabel):l,iconExtraProps:{[l]:Le(o,["iconColor","icon","textColor"])},otherParams:{showTagStyle:!1}})}},u=t=>{var l;const{label:o,option:a,closable:n,onClose:r}=t,{_item:i={}}=a||{};return(({name:t,title:l,iconExtraProps:o,avatar:a,otherParams:n={}})=>M(bt,V({tagWidgetStyle:e.tagStyle,type:e.fieldType,label:t,avatar:a,title:(null==l?void 0:l.length)>e.maxTagTextLength||m(l)>m(t)?l:null,disabled:e.disabled,iconExtraProps:o},n),null))({name:E(o.slice(0,e.maxTagTextLength+3),e.selectorWidth-Ne(a||t)),title:null==a?void 0:a.label,avatar:e.selectorWidth>73?null==a||null===(l=a._item)||void 0===l?void 0:l.avatar:"",iconExtraProps:{[o]:Le(i,["iconColor","icon","textColor"])},otherParams:{closable:n,"onOn-close":r,style:"margin-right: 3px"}})},c=()=>{var e;return null===(e=l.dropdownRender)||void 0===e?void 0:e.call(l)};return()=>{var t,r,i,v;return e.readonly?a(Mt,{name:null===(t=s.value)||void 0===t?void 0:t.labels,iconExtraProps:null===(r=s.value)||void 0===r?void 0:r.icons}):M(xe,V({class:["field-select","w100%"],value:o.value,"onUpdate:value":e=>o.value=e,options:n.value,disabled:e.disabled,optionLabelProp:"titleLabel",tagRender:u,showArrow:!0,dropdownRender:l.dropdownRender?c:void 0,maxTagCount:e.maxTagCount,maxTagTextLength:e.maxTagTextLength,dropdownMatchSelectWidth:180,dropdownClassName:"multiple"===(null===(i=e.selectExtraProps)||void 0===i?void 0:i.mode)?"gct-project-select-dropdown gct-project-select-multiple vxe-table--ignore-clear":"gct-project-select-dropdown vxe-table--ignore-clear"},e.selectExtraProps),(null===(v=e.selectExtraProps)||void 0===v?void 0:v.optionNoStyle)?null:d)}}}),jt=/* @__PURE__ */$({name:"FieldRadio",props:{design:Boolean,disabled:Boolean,readonly:Boolean,fieldType:{type:Object,required:!0},tagStyle:{type:Object,required:!0},options:Array,value:[String,Number]},setup(e,{emit:t}){const l=A({get:()=>e.value,set(e){t("update:value",e)}});return()=>{let t;return M(Se,{value:l.value,"onUpdate:value":e=>l.value=e,disabled:e.disabled,class:["field-radio-group",e.readonly?"field-radio-group--readonly":""]},function(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!W(e)}(t=(e.options??[]).map(t=>{const l=t,{icon:o,iconColor:a,textColor:n}=(null==l?void 0:l._item)||{};return M(Te,{key:l.value,value:l.value},{default:()=>[M(Mt,{tagWidgetStyle:e.tagStyle,type:e.fieldType,label:l.label,disabled:e.disabled,iconExtraProps:{[l.label]:{icon:o,iconColor:a,textColor:n}}},null)]})}))?t:{default:()=>[t]})}}}),Ut=/* @__PURE__ */$({name:"FieldCheckbox",props:{design:Boolean,disabled:Boolean,readonly:Boolean,fieldType:{type:Object,required:!0},tagStyle:{type:Object,required:!0},options:Array,value:{type:[String,Array],required:!0}},setup(e,{emit:t}){const l=e.fieldType===a.BOOLEAN,o=A({get:()=>l?[e.value]:Array.isArray(e.value)?e.value:e.value?e.value.split(","):void 0,set(e){if(l){const l=null==e?void 0:e[0];t("update:value",null==l||"boolean"!=typeof l?Boolean(l):!!l)}else t("update:value",e)}}),n=A(()=>l?(e.options??[]).filter(e=>e.value):e.options??[]);return()=>M(Ee,{value:o.value,"onUpdate:value":e=>o.value=e,disabled:e.disabled,class:["field-checkbox-group",e.readonly?"field-checkbox-group--readonly":""]},{default:()=>{var t;return[null===(t=n.value)||void 0===t?void 0:t.map(t=>{const l=t,{icon:o,iconColor:a,textColor:n}=(null==l?void 0:l._item)||{};return M(Ce,{key:l.value,value:l.value},{default:()=>[M(Mt,{tagWidgetStyle:e.tagStyle,type:e.fieldType,label:l.label,disabled:e.disabled,iconExtraProps:{[l.label]:{icon:o,iconColor:a,textColor:n}}},null)]})})]}})}}),Kt={grad:.9,turn:360,rad:360/(2*Math.PI)},Wt=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},Vt=function(e,t,l){return void 0===t&&(t=0),void 0===l&&(l=Math.pow(10,t)),Math.round(l*e)/l+0},qt=function(e,t,l){return void 0===t&&(t=0),void 0===l&&(l=1),e>l?l:e>t?e:t},Ht=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},zt=function(e){return{r:qt(e.r,0,255),g:qt(e.g,0,255),b:qt(e.b,0,255),a:qt(e.a)}},Gt=function(e){return{r:Vt(e.r),g:Vt(e.g),b:Vt(e.b),a:Vt(e.a,3)}},Jt=/^#([0-9a-f]{3,8})$/i,Xt=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Yt=function(e){var t=e.r,l=e.g,o=e.b,a=e.a,n=Math.max(t,l,o),r=n-Math.min(t,l,o),i=r?n===t?(l-o)/r:n===l?2+(o-t)/r:4+(t-l)/r:0;return{h:60*(i<0?i+6:i),s:n?r/n*100:0,v:n/255*100,a:a}},Qt=function(e){var t=e.h,l=e.s,o=e.v,a=e.a;t=t/360*6,l/=100,o/=100;var n=Math.floor(t),r=o*(1-l),i=o*(1-(t-n)*l),s=o*(1-(1-t+n)*l),d=n%6;return{r:255*[o,i,r,r,s,o][d],g:255*[s,o,o,i,r,r][d],b:255*[r,r,s,o,o,i][d],a:a}},Zt=function(e){return{h:Ht(e.h),s:qt(e.s,0,100),l:qt(e.l,0,100),a:qt(e.a)}},el=function(e){return{h:Vt(e.h),s:Vt(e.s),l:Vt(e.l),a:Vt(e.a,3)}},tl=function(e){return Qt((l=(t=e).s,{h:t.h,s:(l*=((o=t.l)<50?o:100-o)/100)>0?2*l/(o+l)*100:0,v:o+l,a:t.a}));var t,l,o},ll=function(e){return{h:(t=Yt(e)).h,s:(a=(200-(l=t.s))*(o=t.v)/100)>0&&a<200?l*o/100/(a<=100?a:200-a)*100:0,l:a/2,a:t.a};var t,l,o,a},ol=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,al=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,nl=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,rl=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,il={string:[[function(e){var t=Jt.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?Vt(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?Vt(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=nl.exec(e)||rl.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:zt({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t,l,o=ol.exec(e)||al.exec(e);return o?tl(Zt({h:(t=o[1],l=o[2],void 0===l&&(l="deg"),Number(t)*(Kt[l]||1)),s:Number(o[3]),l:Number(o[4]),a:void 0===o[5]?1:Number(o[5])/(o[6]?100:1)})):null},"hsl"]],object:[[function(e){var t=e.r,l=e.g,o=e.b,a=e.a,n=void 0===a?1:a;return Wt(t)&&Wt(l)&&Wt(o)?zt({r:Number(t),g:Number(l),b:Number(o),a:Number(n)}):null},"rgb"],[function(e){var t=e.h,l=e.s,o=e.l,a=e.a,n=void 0===a?1:a;return Wt(t)&&Wt(l)&&Wt(o)?tl(Zt({h:Number(t),s:Number(l),l:Number(o),a:Number(n)})):null},"hsl"],[function(e){var t=e.h,l=e.s,o=e.v,a=e.a,n=void 0===a?1:a;return Wt(t)&&Wt(l)&&Wt(o)?Qt(function(e){return{h:Ht(e.h),s:qt(e.s,0,100),v:qt(e.v,0,100),a:qt(e.a)}}({h:Number(t),s:Number(l),v:Number(o),a:Number(n)})):null},"hsv"]]},sl=function(e,t){for(var l=0;l<t.length;l++){var o=t[l][0](e);if(o)return[o,t[l][1]]}return[null,void 0]},dl=function(e,t){var l=ll(e);return{h:l.h,s:qt(l.s+100*t,0,100),l:l.l,a:l.a}},ul=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},cl=function(e,t){var l=ll(e);return{h:l.h,s:l.s,l:qt(l.l+100*t,0,100),a:l.a}},vl=function(){function e(e){this.parsed=function(e){return"string"==typeof e?sl(e.trim(),il.string):"object"==typeof e&&null!==e?sl(e,il.object):[null,void 0]}(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return Vt(ul(this.rgba),2)},e.prototype.isDark=function(){return ul(this.rgba)<.5},e.prototype.isLight=function(){return ul(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=Gt(this.rgba)).r,l=e.g,o=e.b,n=(a=e.a)<1?Xt(Vt(255*a)):"","#"+Xt(t)+Xt(l)+Xt(o)+n;var e,t,l,o,a,n},e.prototype.toRgb=function(){return Gt(this.rgba)},e.prototype.toRgbString=function(){return t=(e=Gt(this.rgba)).r,l=e.g,o=e.b,(a=e.a)<1?"rgba("+t+", "+l+", "+o+", "+a+")":"rgb("+t+", "+l+", "+o+")";var e,t,l,o,a},e.prototype.toHsl=function(){return el(ll(this.rgba))},e.prototype.toHslString=function(){return t=(e=el(ll(this.rgba))).h,l=e.s,o=e.l,(a=e.a)<1?"hsla("+t+", "+l+"%, "+o+"%, "+a+")":"hsl("+t+", "+l+"%, "+o+"%)";var e,t,l,o,a},e.prototype.toHsv=function(){return e=Yt(this.rgba),{h:Vt(e.h),s:Vt(e.s),v:Vt(e.v),a:Vt(e.a,3)};var e},e.prototype.invert=function(){return pl({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),pl(dl(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),pl(dl(this.rgba,-e))},e.prototype.grayscale=function(){return pl(dl(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),pl(cl(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),pl(cl(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?pl({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Vt(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=ll(this.rgba);return"number"==typeof e?pl({h:e,s:t.s,l:t.l,a:t.a}):Vt(t.h)},e.prototype.isEqual=function(e){return this.toHex()===pl(e).toHex()},e}(),pl=function(e){return e instanceof vl?e:new vl(e)},gl=/* @__PURE__ */et(/* @__PURE__ */$({__name:"multi-field-item",props:{config:{},isDesign:{type:Boolean},rowValue:{}},setup(e){const t=e,l=ze(),o=te(),a=A(()=>{var e;return(null===(e=t.config)||void 0===e||null===(e=e.event)||void 0===e?void 0:e.name)?t.isDesign?"辅助字段":o.value:""}),n=A(()=>t.config.style.labelType.includes("surface_")?{background:t.config.style.color,color:"#fff"}:t.config.style.labelType.includes("line_dashed_")?{border:`1px dashed ${pl(t.config.style.color).alpha(.5).toRgbString()}`,color:t.config.style.color}:t.config.style.labelType.includes("line_")?{border:`1px solid ${pl(t.config.style.color).alpha(.5).toRgbString()}`,color:t.config.style.color}:{background:pl(t.config.style.color).alpha(.1).toRgbString(),color:t.config.style.color,border:`1px solid ${pl(t.config.style.color).alpha(.5).toRgbString()}`});return Y(async()=>{var e,a,n;(null===(e=t.config)||void 0===e||null===(e=e.event)||void 0===e?void 0:e.name)&&!t.isDesign&&(o.value=await l.runExportByName(null===(a=t.config)||void 0===a||null===(a=a.event)||void 0===a?void 0:a.name,{},t.rowValue,null===(n=t.config)||void 0===n||null===(n=n.event)||void 0===n?void 0:n.extraParams))}),(e,l)=>a.value?(Q(),P("div",{key:0,class:H(["tag",t.config.style.labelType]),style:G(n.value)},re(a.value),7)):L("",!0)}}),[["__scopeId","data-v-ddac8ce3"]]),fl={key:0,class:"flex tag-area items-center"},yl=/* @__PURE__ */et(/* @__PURE__ */$({__name:"multi-field-display",props:{widget:{},rowReadonly:{type:Boolean},isDesign:{type:Boolean},rowValue:{}},setup(e){const t=e,l=A(()=>t.rowReadonly&&t.widget.materialType===i.MaterialTableField&&t.widget.props.multiFieldDisplay);return(o,a)=>l.value?(Q(),P("div",fl,[(Q(!0),P(N,null,le(t.widget.props.multiFieldConfig,(l,o)=>(Q(),P("div",{key:o},[M(gl,{config:l,"is-design":t.isDesign,"row-value":e.rowValue},null,8,["config","is-design","row-value"])]))),128))])):L("",!0)}}),[["__scopeId","data-v-a62c7691"]]),ml=/* @__PURE__ */function(e){return e.BASE="BASE",e.PROCESS="PROCESS",e.VIEW="VIEW",e.TEXT="TEXT",e.FILE="FILE",e}({}),bl="ABANDON",hl="FILLED",_l="COMPLETED",Cl="RUNNING",El="STASH",wl="EXCEPTION",Tl={get gctInstanceStatusTheme(){return{"gct-nocode-instance-status--stash":{textColor:"#F77E4A",background:"rgba(247,126,74,0.1)",iconBackground:"#FFC837",placeholder:_("sys.edhr.formInsStatusEnum.STASH")},"gct-nocode-instance-status--partial-submit":{textColor:"#FFAA00",background:"rgba(255,170,0,0.1)",iconBackground:"#FFD666",placeholder:_("sys.appDesigner.approval.button.PartialSubmit")},"gct-nocode-instance-status--finish":{textColor:"#309C41",background:"rgba(48,156,65,0.1)",iconBackground:"#76DA57",placeholder:_("sys.bpmn.flowNodeInstStatus.COMPLETED")},"gct-nocode-instance-status--abnormal":{textColor:"#F54547",background:" rgba(245,69,71,0.1)",iconBackground:"#FF6776",placeholder:_("sys.bpmn.flowNodeInstStatus.EXCEPTION")},"gct-nocode-instance-status--not-filled":{textColor:"#6D82B0",background:"#E6EEFF",iconBackground:"#B4C8F4",placeholder:_("sys.edhr.instanceStatus2DhrEnum.UNFILLED")},"gct-nocode-instance-status--running":{textColor:"#13C2C2",background:"rgba(19,194,194,0.1)",iconBackground:"#13C2C2",placeholder:_("sys.bpmn.bizNodeInstStatus.running")},"gct-nocode-instance-status--already-filled":{textColor:"#026AC8",background:" rgba(2,106,200,0.1)",iconBackground:"#026AC8",placeholder:_("sys.edhr.instanceStatus2DhrEnum.FILLED")},"gct-nocode-instance-status--invalid":{textColor:"#737A87",background:"#E5E5E5",iconBackground:"#C3C3C3",placeholder:_("sys.edhr.dhrLogType.ABANDON")},"gct-nocode-instance-status--archived":{textColor:"#dda200",background:"#faf3df",iconBackground:"#dda200",placeholder:_("sys.edhr.recordBook.archived")},"gct-nocode-instance-status--tmpl":{textColor:"#742fb2",background:"#f9f2ff",iconBackground:"#742fb2",placeholder:_("sys.appDesigner.template")},"gct-nocode-instance-status--in-audit":{textColor:"#FF52C5",background:"rgba(255,82,197, 0.1)",iconBackground:"#FF52C5",placeholder:_("sys.edhr.instanceStatus2FormEnum.IN_AUDIT")}}}},Sl={key:0,class:"instance-status-icon"},xl=/* @__PURE__ */et(/* @__PURE__ */$({__name:"instance-status-label",props:{formType:{},dataStatus:{},instanceStatus:{},statusType:{},useDynamicColor:{type:Boolean,default:!1},showIcon:{type:Boolean,default:!1},needCustomClass:{type:Boolean,default:!1},isFormSummary:{type:Boolean,default:!1}},setup(e){const t=e,l=A(()=>{const e="instance-status-label";return t.useDynamicColor?{baseClass:[e,`${e}--dynamic`],...(({formType:e,dataStatus:t,instanceStatus:l,statusType:o="INST",isFormSummary:a})=>{const n="TMPL"===o?"gct-nocode-instance-status--tmpl":e===ml.TEXT||e===ml.VIEW?"gct-nocode-instance-status--finish":"ARCHIVED"===l?"gct-nocode-instance-status--archived":"IN_AUDIT"===l?"gct-nocode-instance-status--in-audit":e===ml.PROCESS||a?{[Cl]:"gct-nocode-instance-status--running",[hl]:"gct-nocode-instance-status--already-filled",[_l]:"gct-nocode-instance-status--finish",[bl]:"gct-nocode-instance-status--invalid",[wl]:"gct-nocode-instance-status--abnormal",[El]:"gct-nocode-instance-status--stash"}[l]||"gct-nocode-instance-status--not-filled":e===ml.BASE||e===ml.FILE?"STASH"===t||l===El?"gct-nocode-instance-status--stash":t?"SUBMIT"===t?l===bl?"gct-nocode-instance-status--invalid":"gct-nocode-instance-status--finish":"gct-nocode-instance-status--not-filled":"UNFILLED"===l?"gct-nocode-instance-status--not-filled":l===bl?"gct-nocode-instance-status--invalid":"gct-nocode-instance-status--finish":"gct-nocode-instance-status--not-filled";return Tl.gctInstanceStatusTheme[n]})({formType:t.formType,dataStatus:t.dataStatus,instanceStatus:t.instanceStatus,statusType:t.statusType,isFormSummary:t.isFormSummary})}:{placeholder:t.instanceStatus?_(`sys.edhr.instanceStatus2FormEnum.${t.instanceStatus}`):"",baseClass:[e,`${e}--static`,`${e}--${t.instanceStatus}`]}});return(t,o)=>{var a,n,r,i;return Q(),P("div",{class:H(["instance-status-wrapper",l.value.baseClass]),style:G({"--nocode-iconBgColor":null===(a=l.value)||void 0===a?void 0:a.iconBackground,"--nocode-textColor":null===(n=l.value)||void 0===n?void 0:n.textColor,"--nocode-bgColor":null===(r=l.value)||void 0===r?void 0:r.background})},[e.showIcon?(Q(),P("span",Sl,[...o[0]||(o[0]=[F("i",{class:"iconfont icon-a-biaodan2"},null,-1)])])):L("",!0),oe(t.$slots,"instanceTitle",{},void 0,!0),F("span",{class:H(["instance-title",e.needCustomClass?"is-custom-class":""])},re(null===(i=l.value)||void 0===i?void 0:i.placeholder),3)],6)}}}),[["__scopeId","data-v-610b0bb3"]]),Il=/* @__PURE__ */et(/* @__PURE__ */$({__name:"label-tag",props:{data:{}},setup(e){ve(e=>({v218ac50d:a.value}));const t=e,l=de(()=>t.data.label+""),o=de(()=>t.data.labelStyle||g.RADIUS),a=de(()=>t.data.labelColor||"#026ac8"),n=de(()=>`tag-${o.value}`),r=de(()=>({color:t.data.valueColor||"#fff"}));return(e,t)=>(Q(),P("span",{class:H(["tag label-ellipsis",n.value])},[F("span",{class:"select-text",style:G(r.value)},re(l.value||" "),5)],2))}}),[["__scopeId","data-v-b25afce5"]]),Ol=/* @__PURE__ */$({__name:"enum-tag-label",props:{model:{},value:{}},setup(e){const t=e,l=te({}),o=te(),n=te(),r=y(async function({id:e}){return await async function({iconState:e,textState:l}){var o;const a=await _api.apaas.enumModelField.getPageList({enumModelId:t.model,enumModelKey:t.model}),n=e?["icon","iconColor"]:[];return l&&n.push("textColor"),{list:(null==a?void 0:a.data)||[],tagProps:null==a||null===(o=a.data)||void 0===o?void 0:o.reduce((e,t)=>(e[t.text]=Le(t,n),e),{})}}(await _api.apaas.enumModel.getInfoId({id:e})||{})});return fe(()=>t.model,async()=>{if(!t.model)return;const{list:e,tagProps:o}=await r({id:t.model});l.value=e.find(e=>e.value===t.value),n.value=o},{immediate:!0}),(e,t)=>(Q(),R(ce(mt),{type:ce(a).ENUM,label:l.value.text,"tag-widget-style":{tagStyleOpen:!0},"is-design":!1,"icon-extra-props":n.value,"icon-props":o.value},null,8,["type","label","icon-extra-props","icon-props"]))}}),kl=Ol,Nl=["title"],Al=["title"],Rl=/* @__PURE__ */$({__name:"collapse-list",props:{descData:{},isHead:{type:Boolean},column:{}},setup(e){const t=(e=1)=>e>3?3:e,l=e=>e.ellipsis?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"inline-block"}:{};return(o,a)=>{const n=ae("a-tag"),r=ae("a-descriptions-item"),i=ae("a-descriptions");return Q(),R(i,{class:H(e.isHead?"item":"desc-area"),column:e.column||3},{default:me(()=>[(Q(!0),P(N,null,le(e.descData,(e,a)=>(Q(),R(r,{key:a,label:e.label,span:t(e.span),"content-style":l(e)},{default:me(()=>[e.useSlot&&e.slotName&&o.$slots[e.slotName]?oe(o.$slots,e.slotName,{key:0,item:e,slotData:e.slotData}):e.render?(Q(),P(N,{key:1},["link_render"===e.render?(Q(),P(N,{key:0},[e.name?(Q(),P("span",{key:0,title:e.name},re(e.name),9,Nl)):(Q(),R(n,{key:1,color:"error"},{default:me(()=>[B(re(o.$t("sys.onlineForm.noAssociation")),1)]),_:1}))],64)):L("",!0),"status_render"===e.render?(Q(),R(xl,{key:1,"instance-status":e.name},null,8,["instance-status"])):L("",!0),"change_status_render"===e.render?(Q(),R(kl,{key:2,value:e.name,model:e.model},null,8,["value","model"])):L("",!0),"label_tag_render"===e.render?(Q(!0),P(N,{key:3},le(e.tagList,(e,t)=>(Q(),R(Il,{key:t,data:e},null,8,["data"]))),128)):L("",!0)],64)):e.isCopy?(Q(),R(ce(ke),{key:2,"module-key":e.key},null,8,["module-key"])):(Q(),P(N,{key:3},[F("span",{title:e.name,class:H({"mr-4px":e.hasTag})},re(e.name),11,Al),e.hasTag?(Q(!0),P(N,{key:0},le(e.tagList,e=>(Q(),R(n,{key:e.key,color:null==e?void 0:e.color},{default:me(()=>[B(re(e.name),1)]),_:2},1032,["color"]))),128)):L("",!0)],64))]),_:2},1032,["label","span","content-style"]))),128))]),_:3},8,["class","column"])}}}),Ll=Rl,Pl={class:"collapse-detail-wrap"},Fl={class:"header"},Dl={class:"header-title"},Bl={class:"action-wrap"},Ml=/* @__PURE__ */$({__name:"index",props:{collapseInfo:{},column:{},defaultExpand:{type:Boolean,default:!0}},emits:["collapse-change"],setup(e,{expose:t,emit:l}){const o=pe(),a=e,n=l,r=te(!0),i=te("1"),s=A(()=>a.column??3),d=A(()=>a.collapseInfo.filter(e=>!e.hidden)),u=A(()=>d.value.filter((e,t)=>t<s.value)),c=A(()=>d.value.filter((e,t)=>t>=s.value));return t({refreshExpand:()=>{r.value=!0,i.value="1"}}),J(()=>{a.defaultExpand||(r.value=!1,i.value="")}),(e,t)=>{const l=ae("a-collapse-panel"),a=ae("a-collapse");return Q(),P("div",Pl,[M(a,{"active-key":i.value,"onUpdate:activeKey":t[0]||(t[0]=e=>i.value=e),bordered:!1,collapsible:"icon",style:{"margin-bottom":"20px"},onChange:t[1]||(t[1]=e=>(e=>{r.value=!!e[0],console.log(e,i.value,r.value),n("collapse-change")})(e))},{default:me(()=>[M(l,{key:"1"},{header:me(()=>[F("div",Fl,[F("div",Dl,re(ce(_)("sys.appDesigner.basicInformation")),1),F("div",Bl,[oe(e.$slots,"default",{},void 0,!0)])]),F("div",{class:H(["description",{"desc-expand":r.value}])},[M(Ll,{"desc-data":u.value,column:s.value,"is-head":!0},D({_:2},[le(ce(o),(t,l)=>({name:l,fn:me(t=>[oe(e.$slots,l,z(j(t)),void 0,!0)])}))]),1032,["desc-data","column"])],2)]),default:me(()=>[M(Ll,{"desc-data":c.value,column:s.value},D({_:2},[le(ce(o),(t,l)=>({name:l,fn:me(t=>[oe(e.$slots,l,z(j(t)),void 0,!0)])}))]),1032,["desc-data","column"])]),_:3})]),_:3},8,["active-key"])])}}}),$l=/* @__PURE__ */et(Ml,[["__scopeId","data-v-b4b9903c"]]),jl=("undefined"!=typeof WorkerGlobalScope&&(globalThis,WorkerGlobalScope),()=>{}),Ul=e=>e();function Kl(e,t={}){let l,o,a=jl;const n=e=>{clearTimeout(e),a(),a=jl};let r;return i=>{const s=ue(e),d=ue(t.maxWait);return l&&n(l),s<=0||void 0!==d&&d<=0?(o&&(n(o),o=void 0),Promise.resolve(i())):new Promise((e,u)=>{a=t.rejectOnCancel?u:e,r=i,d&&!o&&(o=setTimeout(()=>{l&&n(l),o=void 0,e(r())},d)),l=setTimeout(()=>{o&&n(o),o=void 0,e(i())},s)})}}function Wl(e){const t=Object.create(null);return l=>t[l]||(t[l]=e(l))}var Vl=/\B([A-Z])/g,ql=(Wl(e=>e.replace(Vl,"-$1").toLowerCase()),/-(\w)/g);Wl(e=>e.replace(ql,(e,t)=>t?t.toUpperCase():""));var Hl={class:"field-search-cascader-wrap"},zl={class:"field-cascader-pop-content flex"},Gl={class:"field-cascader-list-box"},Jl=["onClick"],Xl=["title"],Yl={class:"search-name"},Ql=["title"],Zl={class:"field-name-show"},eo=/* @__PURE__ */$({__name:"field-cascader",props:{value:{},modelKey:{},isField:{type:Boolean},rootRef:{},noShowName:{type:Boolean},btnTitle:{},filterFunc:{type:Function}},emits:["update:value"],setup(e,{expose:t,emit:l}){const o=e,n=l,r=/* @__PURE__ */new Map,i=te(!1),s=te(),d=te(),u=te(),c=[a.REF,a.REF_MULTI,a.RDO_REF,a.MASTERSLAVE],v=te({left:{title:"",search:"",fieldKey:"",options:[]},center:{title:"",search:"",fieldKey:"",options:[]},right:{title:"",search:"",fieldKey:"",options:[]}}),p=[a.IMAGE,a.ATTACHMENT];!function(e,t,l={}){const{debounce:o=0,maxWait:a,...n}=l;!function(e,t,l={}){const{eventFilter:o=Ul,...a}=l;return fe(e,(n=o,r=t,function(...e){return new Promise((t,l)=>{Promise.resolve(n(()=>r.apply(this,e),{fn:r,thisArg:this,args:e})).then(t).catch(l)})}),a);var n,r}(e,t,{...n,eventFilter:Kl(o,{maxWait:a})})}(()=>o.modelKey,async()=>{o.modelKey&&(v.value.left.options=await m(o.modelKey),o.value&&g())},{immediate:!0,debounce:300}),fe(()=>i.value,()=>{!i.value&&o.noShowName&&Object.keys(v.value).forEach(e=>{v.value[e].fieldKey="",v.value[e].title="",v.value[e].search="","left"!==e&&(v.value[e].options=[])})});const g=async()=>{const e=o.value.split(".");let t,l,a;v.value.left.fieldKey=e[0],t=v.value.left.options.find(t=>t.key===e[0]),v.value.left.title=null==t?void 0:t.title,s.value=null==t?void 0:t.title,u.value=null==t?void 0:t.fieldType,e.length>1&&(v.value.center.fieldKey=e[1]||"",(null==t?void 0:t.bindInfo)&&(v.value.center.options=await m(null==t?void 0:t.bindInfo),l=v.value.center.options.find(t=>t.key===e[1]),v.value.center.title=null==l?void 0:l.title,s.value=null==l?void 0:l.title,u.value=null==l?void 0:l.fieldType)),e.length>2&&(v.value.right.fieldKey=e[2]||"",(null==l?void 0:l.bindInfo)&&(v.value.right.options=await m(null==l?void 0:l.bindInfo),a=v.value.right.options.find(t=>t.key===e[2]),v.value.right.title=null==a?void 0:a.title,s.value=null==a?void 0:a.title,u.value=null==a?void 0:a.fieldType))},f=e=>{o.modelKey?i.value=!i.value:Ie.error(_("sys.checkBarcodeFieldTip"))},y=e=>{var t;if(!(null===(t=e.target)||void 0===t?void 0:t.value)){d.value="",u.value="",s.value="",b.value="",n("update:value","");for(let e in v.value)v.value[e].fieldKey=""}};async function m(e){return(await _api.apaas.fieldMeta.getList({modelKey:e})||[]).filter(e=>!p.includes(e.type)).filter(e=>!o.filterFunc||o.filterFunc(e)).map(e=>({id:e.id,title:e.name,key:e.key,bindInfo:e.bindInfo,fieldType:e.type}))}const b=A({get:()=>o.value,set(e){n("update:value",e,{type:u.value,name:d.value,key:e})}}),h=A(()=>e=>{var t,l,o;const a=null===(t=v.value)||void 0===t?void 0:t[e];return(null===(l=a.search)||void 0===l?void 0:l.trim())?null===(o=a.options)||void 0===o?void 0:o.filter(e=>{var t;return e.title.indexOf(null===(t=a.search)||void 0===t?void 0:t.trim())>-1}):Ae(a.options)});fe(()=>{var e;return null===(e=v.value.left)||void 0===e?void 0:e.search},async e=>{((null==e?void 0:e.trim())?v.value.left.options.filter(t=>t.title.indexOf(e.trim())>-1):Ae(v.value.left.options)).map(e=>e.key).includes(v.value.left.fieldKey)||Object.keys(v.value).forEach(e=>{v.value[e].fieldKey="",v.value[e].title="","left"!==e&&(v.value[e].options=[])})},{deep:!0}),fe(()=>{var e;return null===(e=v.value.center)||void 0===e?void 0:e.search},async e=>{((null==e?void 0:e.trim())?v.value.center.options.filter(t=>t.title.indexOf(e.trim())>-1):Ae(v.value.center.options)).map(e=>e.key).includes(v.value.center.fieldKey)||Object.keys(v.value).forEach(e=>{"left"!==e&&(v.value[e].fieldKey="",v.value[e].title=""),"right"===e&&(v.value[e].options=[])})},{deep:!0});const C=async e=>{let t=[];if(e.bindInfo&&![a.ENUM,a.ENUM_MULTI].includes(e.fieldType)){const l=r.get(e.id);(null==l?void 0:l.length)?t=Ae(l):(t=await m(e.bindInfo),r.set(e.id,Ae(t)))}return t};return t({fieldCascaderName:s}),(t,l)=>{const o=ae("a-input"),a=ae("a-form-item-rest"),n=ae("right-outlined"),r=ae("a-button"),p=ae("a-popover");return Q(),P("div",Hl,[M(p,{visible:i.value,"onUpdate:visible":l[1]||(l[1]=e=>i.value=e),trigger:"click","overlay-style":{minWidth:"150px"},"overlay-class-name":"field-search-cascader-pop"},{content:me(()=>[be(F("div",zl,[(Q(!0),P(N,null,le(Object.keys(v.value),(e,r)=>be((Q(),P("div",{key:e+r,class:"field-cascader-item-box px-12px py-8px serial-num-no-error"},[M(a,null,{default:me(()=>[M(o,{value:v.value[e].search,"onUpdate:value":t=>v.value[e].search=t,class:"tree-search",placeholder:t.$t("sys.pageDesigner.searchField"),"allow-clear":""},{suffix:me(()=>[...l[2]||(l[2]=[F("i",{class:"iconfont icon-sousuo1"},null,-1)])]),_:1},8,["value","onUpdate:value","placeholder"])]),_:2},1024),F("div",Gl,[(Q(!0),P(N,null,le(h.value(e),t=>{var l;return Q(),P("div",{key:t.key,class:H(["field-cascader-item",{"field-cascader-item-selected":t.key==v.value[e].fieldKey}]),onClick:l=>(async(e,t="left")=>{if(v.value[t].fieldKey=e.key,v.value[t].title=e.title,s.value=e.title,u.value=e.fieldType,"left"==t){var l;if((c.includes(e.type)||c.includes(e.fieldType))&&(v.value.center.options=await C(e)||[],v.value.center.search="",v.value.right.options=[],null===(l=v.value.center.options)||void 0===l?void 0:l.length))return;d.value=e.title,b.value=e.key}if("center"==t){var o;const t=await C(e)||[];if(v.value.right.options="parent_id_"!==e.key?t:[],v.value.right.search="",null===(o=v.value.right.options)||void 0===o?void 0:o.length)return;d.value=`${v.value.left.title}.${e.title}`,b.value=`${v.value.left.fieldKey}.${e.key}`}if("right"==t){if(c.includes(e.fieldType))return;d.value=`${v.value.left.title}.${v.value.center.title}.${e.title}`,b.value=`${v.value.left.fieldKey}.${v.value.center.fieldKey}.${e.key}`}i.value=!1})(t,e)},[t.title.indexOf(v.value[e].search)>-1?(Q(),P("span",{key:0,title:t.title},[F("span",null,re(t.title.substr(0,t.title.indexOf(v.value[e].search))),1),F("span",Yl,re(v.value[e].search),1),F("span",null,re(t.title.substr(t.title.indexOf(v.value[e].search)+(null===(l=v.value[e].search)||void 0===l?void 0:l.length))),1)],8,Xl)):(Q(),P("span",{key:1,title:t.title},re(t.title),9,Ql)),t.bindInfo&&c.includes(t.fieldType)&&"right"!==e&&"parent_id_"!==t.key?(Q(),R(n,{key:2,class:"right-icon"})):L("",!0)],10,Jl)}),128))])],512)),[[ge,v.value[e].options.length]])),128))],512),[[ge,i.value]])]),default:me(()=>[F("div",Zl,[e.noShowName?(Q(),R(r,{key:1,type:"link"},{default:me(()=>[B(re(e.btnTitle||ce(_)("sys.message.metaFiled")),1)]),_:1})):(Q(),R(a,{key:0},{default:me(()=>[M(o,{value:s.value,"onUpdate:value":l[0]||(l[0]=e=>s.value=e),class:H(["field-search-cascader-input",s.value?"clear-icon":""]),readonly:"",placeholder:t.$t("sys.pageDesigner.dataLinkage.rootSelectPlaceholder2"),onClick:f,onChange:y},null,8,["value","class","placeholder"])]),_:1}))])]),_:1},8,["visible"])])}}}),to=/* @__PURE__ */et(eo,[["__scopeId","data-v-cb5e4d67"]]),lo=Object.defineProperty,oo=Object.defineProperties,ao=Object.getOwnPropertyDescriptors,no=Object.getOwnPropertySymbols,ro=Object.prototype.hasOwnProperty,io=Object.prototype.propertyIsEnumerable,so=(e,t,l)=>t in e?lo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[t]=l,uo=(e,t)=>{for(var l in t||(t={}))ro.call(t,l)&&so(e,l,t[l]);if(no)for(var l of no(t))io.call(t,l)&&so(e,l,t[l]);return e},co=(e,t)=>oo(e,ao(t));function vo(e){let t=`请使用 '@${e}' 事件,不要放在 props 中`;return t+=`\nPlease use '@${e}' event instead of props`,t}var po=(e,t)=>{for(const[l,o]of t)e[l]=o;return e},go=$({props:{mode:{type:String,default:"default"},defaultContent:{type:Array,default:[]},defaultHtml:{type:String,default:""},defaultConfig:{type:Object,default:{}},modelValue:{type:String,default:""}},setup(e,t){const l=te(null),o=ne(null),a=te("");return Y(()=>{(()=>{if(!l.value)return;const n=se(e.defaultContent);Be({selector:l.value,mode:e.mode,content:n||[],html:e.defaultHtml||e.modelValue||"",config:co(uo({},e.defaultConfig),{onCreated(l){if(o.value=l,t.emit("onCreated",l),e.defaultConfig.onCreated){const e=vo("onCreated");throw new Error(e)}},onChange(l){const o=l.getHtml();if(a.value=o,t.emit("update:modelValue",o),t.emit("onChange",l),e.defaultConfig.onChange){const e=vo("onChange");throw new Error(e)}},onDestroyed(l){if(t.emit("onDestroyed",l),e.defaultConfig.onDestroyed){const e=vo("onDestroyed");throw new Error(e)}},onMaxLength(l){if(t.emit("onMaxLength",l),e.defaultConfig.onMaxLength){const e=vo("onMaxLength");throw new Error(e)}},onFocus(l){if(t.emit("onFocus",l),e.defaultConfig.onFocus){const e=vo("onFocus");throw new Error(e)}},onBlur(l){if(t.emit("onBlur",l),e.defaultConfig.onBlur){const e=vo("onBlur");throw new Error(e)}},customAlert(l,o){if(t.emit("customAlert",l,o),e.defaultConfig.customAlert){const e=vo("customAlert");throw new Error(e)}},customPaste:(l,o)=>{if(e.defaultConfig.customPaste){const e=vo("customPaste");throw new Error(e)}let a;return t.emit("customPaste",l,o,e=>{a=e}),a}})})})()}),fe(()=>e.modelValue,e=>{e!==a.value&&function(e){const t=o.value;null!=t&&t.setHtml(e)}(e)}),{box:l}}}),fo={ref:"box",style:{height:"100%"}},yo=/* @__PURE__ */po(go,[["render",function(e,t,l,o,a,n){return Q(),P("div",fo,null,512)}]]),mo=$({props:{editor:{type:Object},mode:{type:String,default:"default"},defaultConfig:{type:Object,default:{}}},setup(e){const t=te(null);return ye(()=>{const{editor:l}=e;null!=l&&(l=>{if(t.value){if(null==l)throw new Error("Not found instance of Editor when create <Toolbar/> component");De.getToolbar(l)||Me({editor:l,selector:t.value||"<div></div>",mode:e.mode,config:e.defaultConfig})}})(l)}),{selector:t}}}),bo={ref:"selector"},ho=/* @__PURE__ */po(mo,[["render",function(e,t,l,o,a,n){return Q(),P("div",bo,null,512)}]]),_o={style:{border:"1px solid #e8ebf0","border-bottom":"none"}},Co=/* @__PURE__ */$({__name:"rich-editor",props:{content:{}},emits:["created","blur","change","focus"],setup(e,{expose:t,emit:l}){const o={toolbarKeys:["fontSize","fontFamily","bold","italic","through","underline","color","bgColor",{key:"group-justify",title:"对齐",iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',menuKeys:["justifyLeft","justifyCenter","justifyRight","justifyJustify"]},"|","blockquote","insertLink",{key:"group-image",title:"图片",iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>',menuKeys:["insertImage"]}]},a={placeholder:"请输入内容...",MENU_CONF:{fontFamily:{fontFamilyList:[{name:"宋体",value:"SimSun, 宋体, 华文宋体, STSong, STSongti-SC-Light, serif"},{name:"楷体",value:"Kai, STKai, 楷体, KaiTi, 华文楷体, sans-serif"},{name:"黑体",value:"SimHei, 黑体, 华文黑体, STHeiti, sans-serif"}]}}},n=e,r=l,i=ne(),s=te("");Y(()=>{setTimeout(()=>{s.value=n.content},500)}),X(()=>{const e=i.value;null!=e&&e.destroy()});const d=e=>{i.value=e,r("created")},u=()=>{const e=i.value;if(null!=e)return e.getHtml()},c=()=>{r("change",u())},v=()=>{r("blur",u())},p=e=>{r("focus",e)};return t({getText:()=>{const e=i.value;if(null!=e)return e.getText()},getContent:u,setHtml:e=>{const t=i.value;if(null!=t)return t.setHtml(e)},dangerouslyInsertHtml:e=>{const t=i.value;if(null!=t)return t.dangerouslyInsertHtml(e)},restoreSelection:()=>{const e=i.value;if(null!=e)return e.restoreSelection()},isFocused:()=>{const e=i.value;if(null!=e)return e.isFocused()}}),(e,t)=>(Q(),P("div",_o,[M(ce(ho),{style:{"border-bottom":"1px solid #e8ebf0"},editor:i.value,"default-config":o},null,8,["editor"]),M(ce(yo),{modelValue:s.value,"onUpdate:modelValue":t[0]||(t[0]=e=>s.value=e),style:{height:"150px"},"default-config":a,onOnCreated:d,onOnChange:c,onOnBlur:v,onOnFocus:p},null,8,["modelValue"])]))}}),Eo=Co,wo=/* @__PURE__ */Ve({default:()=>To}),To={appLogoImage:"图片",basicInformation:"基本信息",approval:{button:{PartialSubmit:"部分提交"}},template:"模板"},So=/* @__PURE__ */Ve({default:()=>xo}),xo={fieldType:"字段类型"},Io=/* @__PURE__ */Ve({default:()=>Oo}),Oo={flowNodeInstStatus:{COMPLETED:"已完成",EXCEPTION:"异常"},bizNodeInstStatus:{running:"进行中"}},ko=/* @__PURE__ */Ve({default:()=>No}),No={dataConnection:{modelField:{integer:"整数",long:"长整数",double:"小数",decimal:"精度小数",boolean:"布尔",date:"日期",user:"人员关联",org:"部门关联"}}},Ao=/* @__PURE__ */Ve({default:()=>Ro}),Ro={devive:{index:"设备"}},Lo=/* @__PURE__ */Ve({default:()=>Po}),Po={formInsStatusEnum:{STASH:"暂存中"},instanceStatus2DhrEnum:{UNFILLED:"未填报",FILLED:"已填报"},dhrLogType:{ABANDON:"作废"},recordBook:{archived:"封存"},instanceStatus2FormEnum:{IN_AUDIT:"变更中"}},Fo=/* @__PURE__ */Ve({default:()=>Do}),Do={metaFiled:"业务字段"},Bo=/* @__PURE__ */Ve({default:()=>Mo}),Mo={uniqueOrNot:"是否唯一",option:"枚举单选",related_lot_no:"关联批次",product:"物料",mfg_order:"工单号",record_no:"记录单号",trace_date:"追溯日期",order_no:"订单号",routing_operation:"工序",good_qty:"良品数量",not_good_qty:"不良品数量",report_start_time:"报工开始时间",report_end_time:"报工结束时间",work_hours:"工时",production_date:"生产日期",reporter:"报工人",not_good_reason:"不良原因",not_good_group:"不良分类",scrap_reason:"报废原因",scrap_group:"报废分类",scrap_qty:"报废数量",scrap_material:"报废物料",scrap_material_no:"报废物料批次",destructive_test_qty:"破坏性试验数量",product_check_qty:"产品检验数量",warehouse_receipt_no:"单据编号",warehouse_receipt_date:"单据日期",warehouse_manager:"仓管员",qty_required:"需求数量",qty_consumed:"已消耗数量",qty:"数量"},$o=/* @__PURE__ */Ve({default:()=>jo}),jo={fieldKey:"字段KEY",disabledStatus:"是否禁用状态",formStyle:"表单样式",formFields:"表单字段",noAssociation:"无关联"},Uo=/* @__PURE__ */Ve({default:()=>Ko}),Ko={searchField:"搜索字段",dataLinkage:{rootSelectPlaceholder2:"请选择模型字段"}},Wo=/* @__PURE__ */Ve({default:()=>Vo}),Vo={FieldName:"字段名称",requiredOrNot:"是否必填",text:"文本",tableColumnDate:"时间",signatureImage:"签名",true:"是",checkBarcodeFieldTip:"请关联实体模型后再配置变量类型的条码内容",index:"序号",operation:"操作",loadingText:"加载中..."},qo=/* @__PURE__ */Object.assign({"./sys/appDesigner.ts":wo,"./sys/bi.ts":So,"./sys/bpmn.ts":Io,"./sys/component.ts":ko,"./sys/developer.ts":Ao,"./sys/edhr.ts":Lo,"./sys/message.ts":Fo,"./sys/model.ts":Bo,"./sys/onlineForm.ts":$o,"./sys/pageDesigner.ts":Uo,"./sys.ts":Wo}),Ho=class{constructor(){Je(this,"mode",$e.ITEM),Je(this,"type",I.FIELD),Je(this,"component","RenderCardField")}},zo=class{constructor(){Je(this,"mode",$e.ITEM),Je(this,"type",I.PAGE),Je(this,"component","RenderCardViewPage")}};var Go,Jo,Xo=/* @__PURE__ */$({name:"RenderCardField",props:{c:{type:Object},model:{type:Object,default:()=>({})},context:{type:Object,default:()=>({})},preview:{type:Boolean,default:!1},pageModel:{type:Object,default:()=>({})}},setup(e){const t=w("render-card-field"),l=A(()=>{var t;return(null===(t=e.pageModel)||void 0===t?void 0:t.data)||{}}),o=A(()=>{var t;return(null===(t=e.model)||void 0===t?void 0:t.data)||{}}),n=A(()=>x.getDesignEditorNode(o.value.type)),r=A(()=>n.value&&n.value.component?"string"==typeof n.value.component?ae(n.value.component):n.value.component:null),i=A(()=>e.pageModel.data.layout_mode||"horizontal"),s=A(()=>"wrap"===l.value.wrap_mode),d=A(()=>{const e={};if(l.value.custom_label_width&&(e.width=`${l.value.label_width}${"percent"===l.value.label_mode?"%":"px"}`),o.value.label_font){const t=o.value.label_font;Object.assign(e,{fontSize:t.fontSize,color:t.color,justifyContent:"justify"===t.align?"space-between":t.align,fontWeight:t.bold?"bold":"normal",fontStyle:t.italic?"italic":"normal",textDecoration:t.textDecoration})}return e}),u=A(()=>{const e={};if(o.value.content_font){const t=o.value.content_font;Object.assign(e,{fontSize:t.fontSize,color:t.color,justifyContent:"justify"===t.align?"space-between":t.align,fontWeight:t.bold?"bold":"normal",fontStyle:t.italic?"italic":"normal",textDecoration:t.textDecoration})}return e}),c=te(null),v=A(()=>{var e;return o.value.label||(null===(e=c.value)||void 0===e?void 0:e.name)||""}),p=A(()=>{if(!c.value)return"";let t="";return t=!0===e.preview?function(e){var t;const l=e.type===a.AGG||e.type===a.EXPRESSION?e.mappingType:e.type,o=l?null===(t=Ue(l))||void 0===t?void 0:t.example:"";let n=o?Re(o)?_(o):o.map(e=>_(e)):"";return l!==a.ENUM_MULTI&&l!==a.ENUM||(n=n?Re(n)?[n]:n:[]),n instanceof Array?n.join(","):n}(c.value)||"":function(e={},t,l){var o;if(!t)return"";const a=function(e){if(e){if("string"==typeof e)try{return JSON.parse(e)}catch{return}return e}}(l);if(null==a||null===(o=a.fieldLink)||void 0===o?void 0:o.length){var n;const l=[...a.fieldLink,t].join(".");return(null==e||null===(n=e.__FOREIGN__)||void 0===n?void 0:n[l])??(null==e?void 0:e[l])??""}return(null==e?void 0:e[t])??""}(e.context.data,c.value.key,o.value.fieldCodeChain)||"",t?function(e){return c.value?je(e,{field:{type:c.value.type||"",mappingType:c.value.mappingType,specificConfig:c.value.specificConfig},format:o.value.format,editorType:o.value.editor_type,currency:o.value.currency,timeType:o.value.time_type}):String(e||"")}(t):""});function g(){if(null===p.value||void 0===p.value||""===p.value)return h[_gct.store.getEmptyDisplay];const l=r.value?U(r.value,{...e,field:c.value,value:p.value}):p.value,a=o.value.tag_style;return a&&!0===a.check?M("span",{class:[t.e("value-tag"),a.mode],style:{"--ant-primary-color":a.color}},[l]):l}return async function(){try{c.value=await b.loadField(o.value.modelKey,o.value.key),console.log("field",c.value)}catch(e){console.warn("加载模型失败:",e)}}(),()=>c.value?M("div",{class:[t.b(),"vertical"===i.value?t.m("vertical"):t.m("horizontal")]},[!0!==o.value.show_label?null:M("div",{class:t.e("label"),style:d.value},[M("span",{title:v.value,class:[t.em("label","name"),t.is("ellipsis",!0!==s.value)]},[v.value]),M("span",{class:t.em("label","colon")},[B(":")])]),M("div",{class:t.e("value"),style:u.value},[g()])]):null}}),Yo=/* @__PURE__ */$({name:"RenderCardViewPage",props:{model:{type:Object,default:()=>({})},context:{type:Object,default:()=>({})},preview:{type:Boolean,default:!1}},setup(e,{slots:t}){const l=w("render-card-view-page"),o=A(()=>{const{data:t}=e.model,l={};if(e.model){var o;l.width=`${t.width}px`,l.backgroundColor=t.background,l.borderRadius=`${t.border_radius}px`;const e=null===(o=t.spacing)||void 0===o?void 0:o[1];e&&(l.paddingTop=e.top,l.paddingRight=e.right,l.paddingBottom=e.bottom,l.paddingLeft=e.left)}return l}),a=A(()=>{var t;return(null===(t=e.model)||void 0===t?void 0:t.data)||{}});return()=>{const e=t.default?t.default():null;return M("div",{class:[l.b(),l.is("simple","simple"===a.value.mode)],style:o.value},[M(ae("a-row"),{gutter:[12,8],wrap:!0},{default:()=>[e&&e.map(e=>M(ae("a-col"),{class:l.e("col"),span:a.value.colspan||24},{default:()=>e}))]})])}}}),Qo=Symbol.for("@gct-paas/render-web/setupApp");function Zo(e){Reflect.get(window,Qo)?console.error("@gct-paas/render-web renderWebSetupApp 已执行,请勿重复调用。"):(Reflect.set(window,Qo,!0),_gct.i18nUtil.autoRegisterLocale(qo),e.component(tt.__name||tt.name,tt),e.component(at.__name||at.name,at),e.component(Xo.name,Xo),e.component(Yo.name,Yo),x.register(I.FIELD,()=>new Ho,S.CARD_VIEW),x.register(I.PAGE,()=>new zo,S.CARD_VIEW),x.register(I.PAGE_LOWER,()=>new zo,S.CARD_VIEW))}var ea=function(e,t){var l=/^\s*([+-]?[\d\.]*)\s*(.*)\s*$/i.exec(e);if(null!=l&&l.length>2)var o=""===l[1]?1:Number(l[1]),a=l[2],n=!isNaN(o)&&a;if(!n)throw new TypeError("Error parsing length");return"px"==a?o:function(e,t){Go||((Go=document.createElement("div")).style.position="absolute",Go.style.width=0,Go.style.height=0,Go.style.visibility="hidden",Go.style.overflow="hidden",Jo=document.createElement("div"),Go.appendChild(Jo)),Jo.style.width=100+e,(t||document.body).appendChild(Go);var l=Jo.getBoundingClientRect();return Go.parentNode.removeChild(Go),l.width/100}(a,t)*o},ta=/* @__PURE__ */function(e){return e.Portrait="portrait",e.Landscape="landscape",e}({}),la=/* @__PURE__ */function(e){return e.ROUTING_OPERATION="routing_operation",e.GOOD_QTY="good_qty",e.NOT_GOOD_QTY="not_good_qty",e.REPORT_START_TIME="report_start_time",e.REPORT_END_TIME="report_end_time",e.WORK_HOURS="work_hours",e.PRODUCTION_DATE="production_date",e.REPORTER="reporter",e.NOT_GOOD_REASON="not_good_reason",e.NOT_GOOD_GROUP="not_good_group",e.SCRAP_REASON="scrap_reason",e.SCRAP_GROUP="scrap_group",e.SCRAP_QTY="scrap_qty",e.SCRAP_MATERIAL="scrap_material",e.SCRAP_MATERIAL_NO="scrap_material_no",e.DESTRUCTIVE_TEST_QTY="destructive_test_qty",e.PRODUCT_CHECK_QTY="product_check_qty",e.MATERIAL_CHECK_QTY="material_check_qty",e}({}),oa={sheetId:"1",padding:{t:10,r:10,b:10,l:10},orientation:ta.Portrait,cols:Array(10).fill("").map(()=>({width:75})),rows:Array(20).fill("").map(()=>({height:30})),cells:Array(20).fill("").map(()=>Array(12).fill("").map(()=>({}))),mergedCells:[]},aa={key:_("sys.onlineForm.fieldKey"),name:_("sys.FieldName"),type:_("sys.bi.fieldType"),required:_("sys.requiredOrNot"),uniqueConstraint:_("sys.model.uniqueOrNot"),disabled:_("sys.onlineForm.disabledStatus")},na={[a.TEXT]:_("sys.text"),[a.LONG_TEXT]:_("sys.component.dataConnection.modelField.long_text"),[a.INTEGER]:_("sys.component.dataConnection.modelField.integer"),[a.LONG]:_("sys.component.dataConnection.modelField.long"),[a.DOUBLE]:_("sys.component.dataConnection.modelField.double"),[a.DECIMAL]:_("sys.component.dataConnection.modelField.decimal"),[a.BOOLEAN]:_("sys.component.dataConnection.modelField.boolean"),[a.DATE]:_("sys.component.dataConnection.modelField.date"),[a.TIME]:_("sys.tableColumnDate"),[a.DATE_TIME]:_("sys.component.dataConnection.modelField.date_time"),[a.IMAGE]:_("sys.appDesigner.appLogoImage"),[a.ATTACHMENT]:_("sys.component.dataConnection.modelField.attachment"),[a.USER]:_("sys.component.dataConnection.modelField.user"),[a.USER_MULTI]:_("sys.component.dataConnection.modelField.user_multi"),[a.ORG]:_("sys.component.dataConnection.modelField.org"),[a.ORG_MULTI]:_("sys.component.dataConnection.modelField.org_multi"),[a.OPTION]:_("sys.model.option"),[a.OPTION_MULTI]:_("sys.component.dataConnection.modelField.enum_multi"),[a.SIGNATURE]:_("sys.signatureImage"),[a.MATERIAL_NO]:"LOT/SN",[a.PRODUCT]:_("sys.model.product"),[a.DEVICE]:_("sys.developer.devive.index")},ra=class{static getAdjacentCell(e,t,l,o){let a;switch(o){case"top":var n;a=null===(n=l.cells[t-1-1])||void 0===n?void 0:n[e-1];break;case"bottom":var r;a=null===(r=l.cells[t+1-1])||void 0===r?void 0:r[e-1];break;case"left":var i;a=null===(i=l.cells[t-1])||void 0===i?void 0:i[e-1-1];break;case"right":var s;a=null===(s=l.cells[t-1])||void 0===s?void 0:s[e+1-1];break;default:return}if(a)return a}static setLeft(e,t,l,o=!1,a=!0){const n=l.cells[t-1][e-1];if(n.border={...n.border,left:a,bold:o,boldLeft:o},!1===a){const o=this.getAdjacentCell(e,t,l,"left");o&&(o.border={...o.border,right:!1,bold:!1,boldLeft:!1})}}static setRight(e,t,l,o=!1,a=!0){const n=l.cells[t-1][e-1]||{};if(n.border={...n.border,right:a,bold:o,boldRight:o},!1===a){const a=this.getAdjacentCell(e,t,l,"right");a&&(a.border={...a.border,left:!1,bold:!1,boldRight:o})}}static setTop(e,t,l,o=!1,a=!0){const n=l.cells[t-1][e-1];if(n.border={...n.border,top:a,bold:o,boldTop:o},!1===a){const o=this.getAdjacentCell(e,t,l,"top");o&&(o.border={...o.border,bottom:!1,bold:!1,boldTop:!1})}}static setBottom(e,t,l,o=!1,a=!0){const n=l.cells[t-1][e-1];if(n.border={...n.border,bottom:a,bold:o,boldBottom:o},!1===a){const o=this.getAdjacentCell(e,t,l,"bottom");o&&(o.border={...o.border,top:!1,bold:!1,boldBottom:!1})}}static clearBorder(e,t,l){this.setLeft(e,t,l,!1,!1),this.setRight(e,t,l,!1,!1),this.setTop(e,t,l,!1,!1),this.setBottom(e,t,l,!1,!1),l.cells[t-1][e-1].border=void 0}static getBottomBorder(e,t,l){const o=l.mergedCells.find(l=>l.t===t&&l.l===e);return o?Pe(o.l,o.r).every(e=>{var t;return!!(null===(t=l.cells[o.b-1][e-1])||void 0===t||null===(t=t.border)||void 0===t?void 0:t.bottom)}):!!(null===(a=l.cells[t-1][e-1].border)||void 0===a?void 0:a.bottom);var a}static getTopBorder(e,t,l){const o=l.mergedCells.find(l=>l.t===t&&l.l===e);return o?Pe(o.l,o.r).every(e=>{var t;return!!(null===(t=l.cells[o.t-1][e-1])||void 0===t||null===(t=t.border)||void 0===t?void 0:t.top)}):!!(null===(a=l.cells[t-1][e-1].border)||void 0===a?void 0:a.top);var a}static getLeftBorder(e,t,l){const o=l.mergedCells.find(l=>l.t===t&&l.l===e);return o?(console.log(e,t,Pe(o.t,o.b).every(e=>{var t;return!!(null===(t=l.cells[e-1][o.l-1])||void 0===t||null===(t=t.border)||void 0===t?void 0:t.left)})),Pe(o.t,o.b).every(e=>{var t;return!!(null===(t=l.cells[e-1][o.l-1])||void 0===t||null===(t=t.border)||void 0===t?void 0:t.left)})):!!(null===(a=l.cells[t-1][e-1].border)||void 0===a?void 0:a.left);var a}static getRightBorder(e,t,l){const o=l.mergedCells.find(l=>l.t===t&&l.l===e);return o?Pe(o.t,o.b).every(e=>{var t;return!!(null===(t=l.cells[e-1][o.r-1])||void 0===t||null===(t=t.border)||void 0===t?void 0:t.right)}):!!(null===(a=l.cells[t-1][e-1].border)||void 0===a?void 0:a.right);var a}static getCellBorder(e,t,l){var o;const a=(l.mergedCells??[]).find(l=>l.l<=e&&l.r>=e&&l.t<=t&&l.b>=t);return a&&a.t===t&&a.l===e?{top:Pe(a.l,a.r+1).every(e=>{var t;return!!(null===(t=l.cells[a.t-1][e-1])||void 0===t||null===(t=t.border)||void 0===t?void 0:t.top)}),bottom:Pe(a.l,a.r+1).every(e=>{var t;return!!(null===(t=l.cells[a.b-1][e-1])||void 0===t||null===(t=t.border)||void 0===t?void 0:t.bottom)}),left:Pe(a.t,a.b+1).every(e=>{var t;return!!(null===(t=l.cells[e-1][a.l-1])||void 0===t||null===(t=t.border)||void 0===t?void 0:t.left)}),right:Pe(a.t,a.b+1).every(e=>{var t;return!!(null===(t=l.cells[e-1][a.r-1])||void 0===t||null===(t=t.border)||void 0===t?void 0:t.right)}),bold:Pe(a.l,a.r+1).some(e=>{var t;return!!(null===(t=l.cells[a.t-1][e-1])||void 0===t||null===(t=t.border)||void 0===t?void 0:t.bold)})??!1,boldTop:Pe(a.l,a.r+1).every(e=>{var t;return!!(null===(t=l.cells[a.t-1][e-1])||void 0===t||null===(t=t.border)||void 0===t?void 0:t.boldTop)})??!1,boldBottom:Pe(a.l,a.r+1).every(e=>{var t;return!!(null===(t=l.cells[a.b-1][e-1])||void 0===t||null===(t=t.border)||void 0===t?void 0:t.boldBottom)})??!1,boldLeft:Pe(a.t,a.b+1).every(e=>{var t;return!!(null===(t=l.cells[e-1][a.l-1])||void 0===t||null===(t=t.border)||void 0===t?void 0:t.boldLeft)})??!1,boldRight:Pe(a.t,a.b+1).every(e=>{var t;return!!(null===(t=l.cells[e-1][a.r-1])||void 0===t||null===(t=t.border)||void 0===t?void 0:t.boldRight)})??!1}:(null===(o=l.cells[t-1][e-1])||void 0===o?void 0:o.border)||{}}},ia=(e,t)=>t.includes(e),sa=(e,t,l)=>{if(!ia(e,t))return;const o=l.filter(t=>t.startsWith(e)).map(e=>{var t;return parseInt((null===(t=e.match(/\d+/))||void 0===t?void 0:t[0])||"0",10)});return`${e}_${(o.length?Math.max(...o):0)+1}_`},da=Object.entries(aa),ua=Object.entries(na),ca=Object.values(n),va=Object.values(la),pa=class e{static async xlsx2json(t){const l=new Ke.Workbook,o=await l.xlsx.load(t),a=l.getWorksheet(_("sys.onlineForm.formStyle"))||l.getWorksheet();if(a)return e.sheetToPaper(a,o)}static async xlsx2jsonWithFields(t,l){var o;const a=new Ke.Workbook,n=await a.xlsx.load(t),r=a.getWorksheet(_("sys.onlineForm.formStyle"))||a.getWorksheet(),i=a.getWorksheet(_("sys.onlineForm.formFields")),s=r?e.sheetToPaper(r,n):null,d=i?e.sheetToFields(i,l):null,u=[];return null==s||null===(o=s.cells)||void 0===o||o.forEach((e,t)=>{e.forEach((e,l)=>{var o;console.log("cell",e);const a="string"==typeof(null==e?void 0:e.value)?null==e||null===(o=e.value)||void 0===o?void 0:o.match(/^\$\{(.+?)\}$/):null;if(!a)return;const n=a[1],r=null==d?void 0:d.find(e=>e.tmpOldKey===n||e.key===n||e.name===n);r&&u.push({x:l+1,y:t+1,fieldKey:r.key,fieldName:r.name,fieldType:r.type})})}),{paper:s,fields:d,paperFields:u}}static sheetToPaper(e,t){var l;const o=Math.min(e.dimensions.bottom,300),a=Math.min(e.dimensions.right,75),n={},{defaultRowHeight:r,defaultColWidth:i}=e.properties,s=parseInt(ea(`${r}pt`)),d=[];Array(o).fill("").forEach((t,l)=>{var o;const a=null===(o=e._rows)||void 0===o?void 0:o[l];d.push({height:parseInt(ea(`${(null==a?void 0:a.height)??r}pt`))})}),n.rows=d;const u=[];Array(a).fill("").forEach((t,l)=>{const{width:o}=e.columns[l],a=o??i;u.push({width:void 0===a?80:Math.floor(a*ea("ch"))})}),n.cols=u;const c=Array(o).fill("").map(()=>Array(a).fill("").map(()=>({})));Array(o).fill("").forEach((t,l)=>{var o;(null===(o=e._rows)||void 0===o?void 0:o[l])&&Array(a).fill("").forEach((t,o)=>{var a,n,r;const i=null===(a=e._rows)||void 0===a||null===(a=a[l]._cells)||void 0===a?void 0:a[o];if(!i)return;const{alignment:s,fill:d,font:u}=i.style,v=i._address,p={"text-align":(null==s?void 0:s.horizontal)??"left","vertical-align":(null==s?void 0:s.vertical)??"middle","background-color":null==d||null===(n=d.fgColor)||void 0===n||null===(n=n.argb)||void 0===n?void 0:n.substring(2).padStart(7,"#"),color:null==u||null===(r=u.color)||void 0===r||null===(r=r.argb)||void 0===r?void 0:r.substring(2).padStart(7,"#"),"font-size":`${(null==u?void 0:u.size)<12?12:null==u?void 0:u.size}px`,"white-space":(null==s?void 0:s.wrapText)?"pre-line":void 0,"line-height":"1em"};if((null==s?void 0:s.wrapText)&&(p["line-height"]="1.5em"),c[l][o].style=p,v!==i.master.address)return;let g="";"object"!=typeof i.value?g=i.value:"object"!=typeof i.text&&(g=i.text),c[l][o].value=g})}),n.cells=c;const v=[];Object.entries(e._merges??{}).forEach(e=>{const{top:t,bottom:l,left:n,right:r}=e[1];t>o||n>a||v.push({t:t,l:n,b:Math.min(o,l),r:Math.min(a,r)})}),n.mergedCells=v,Array(o).fill("").forEach((t,l)=>{var o;(null===(o=e._rows)||void 0===o?void 0:o[l])&&Array(a).fill("").forEach((t,o)=>{var a;const r=null===(a=e._rows)||void 0===a||null===(a=a[l]._cells)||void 0===a?void 0:a[o];if(!r)return;const{border:i}=r.style;(null==i?void 0:i.top)&&ra.setTop(o+1,l+1,n),(null==i?void 0:i.bottom)&&ra.setBottom(o+1,l+1,n),(null==i?void 0:i.left)&&ra.setLeft(o+1,l+1,n),(null==i?void 0:i.right)&&ra.setRight(o+1,l+1,n)})});const p=(t.media??[]).map(e=>({id:Math.random().toString(36).substring(2,10),src:`data:image/${e.extension};base64,`+e.buffer.toString("base64")})),g=[];return null===(l=e._media)||void 0===l||l.forEach(e=>{const{imageId:t,range:l}=e,o={height:parseInt(ea((l.br.nativeRowOff-l.tl.nativeRowOff)/914400+"in"))+(l.br.nativeRow-l.tl.nativeRow>0?Array(l.br.nativeRow-l.tl.nativeRow).fill("").reduce((e,t,o)=>{var a;return e+((null===(a=n.rows)||void 0===a||null===(a=a[o+l.tl.nativeRow])||void 0===a?void 0:a.height)??s)},0):0),width:parseInt(ea((l.br.nativeColOff-l.tl.nativeColOff)/914400+"in"))+(l.br.nativeCol-l.tl.nativeCol>0?Array(l.br.nativeCol-l.tl.nativeCol).fill("").reduce((e,t,o)=>{var a;return e+(null===(a=n.cols)||void 0===a?void 0:a[o+l.tl.nativeCol].width)},0):0),top:parseInt(ea(l.tl.nativeRowOff/914400+"in")),left:parseInt(ea(l.tl.nativeColOff/914400+"in"))},a=Array(l.tl.nativeCol).fill("").reduce((e,t,l)=>{var o;return e+((null===(o=n.cols)||void 0===o||null===(o=o[l])||void 0===o?void 0:o.width)??0)},0),r=Array(l.tl.nativeRow).fill("").reduce((e,t,l)=>{var o;return e+((null===(o=n.rows)||void 0===o||null===(o=o[l])||void 0===o?void 0:o.height)??s)},0),i={id:Math.random().toString(36).substring(2,10),mediaId:p[t].id,layout:{height:o.height,width:o.width,top:o.top+r,left:o.left+a}};g.push(i)}),n.medias=p,n.images=g,{...Ae(oa),...n}}static sheetToFields(t,l){const o=Math.min(t.rowCount,300),a=Math.min(t.columnCount,10),n=/* @__PURE__ */new Map;Array(a).fill("").forEach((e,l)=>{var o;const a=null===(o=t._rows)||void 0===o||null===(o=o[0]._cells)||void 0===o?void 0:o[l],r=da.find(e=>e[1]===((null==a?void 0:a.text)??"").replaceAll("*","").trim());r&&n.set(l,r[0])});const r=[];Array(o).fill("").forEach((e,l)=>{var o;if(0===l)return;if(!(null===(o=t._rows)||void 0===o?void 0:o[l]))return;const i={};Array(a).fill("").forEach((e,o)=>{var a;const r=null===(a=t._rows)||void 0===a||null===(a=a[l]._cells)||void 0===a?void 0:a[o];n.has(o)&&(i[n.get(o)]=(null==r?void 0:r.text)??"")}),r.push(i)});const i=[...l];return r.forEach(t=>{e._field2Meta(t,i)}),r}static _field2Meta(e,t){const{type:l,required:o}=e;e.required=o===_("sys.true")?1:0;const n=ua.find(e=>e[1]===l);if(e.type=n?n[0]:a.TEXT,ia(e.type,va))e.tmpOldKey=e.key,e.key=sa(e.type,va,[]);else if(ia(e.type,ca)){e.tmpOldKey=e.key;const l=sa(e.type,ca,t);e.key=l,t.push(l)}e.uniqueConstraint={type:e.uniqueConstraint===_("sys.true")?"GLOBAL":"NONE"},e.disabled=e.disabled===_("sys.true")?1:0}static contentFitToPaper(e,t,l="x"){const o=null==e?void 0:e.cols.reduce((e,t)=>e+t.width,0),a=null==e?void 0:e.rows.reduce((e,t)=>e+t.height,0),n=o/parseInt(ea(t[0])),r=a/parseInt(ea(t[1])),i="x"===l?n:Math.max(n,r);i>1&&(e.cols.forEach(e=>{e.width=e.width/i}),e.rows.forEach(e=>{e.height=e.height/i}))}};function ga(){console.log("Hello World!")}var fa=new URL("./index.min.css",import.meta.url);f.load(fa.href);export{Xe as AppMqttService,ut as BaseVxeTable,tt as BasicPage,at as BasicPageRender,_t as CardViewRender,$l as CollapseDetail,Ut as FieldCheckbox,jt as FieldRadio,to as FieldSearchCascader,$t as FieldSelect,yl as MultiFieldDisplay,Eo as RichEditor,ct as Tag,pa as XlsxParser,Mt as fieldReadonly,Nt as getCardFieldValue,It as getCardForeignFields,At as getDataByModelType,Tt as refCardLabelRender,Zo as renderWebSetupApp,ga as run,bt as selectTag,He as setupPageEvent,mt as taglabel,xt as useGetRefCard,ze as usePageEvent,Pt as useQuickNext,St as useRefCardData,Lt as useSearchEvent};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gct-paas/render-web",
|
|
3
|
-
"version": "6.0.0-dev.
|
|
3
|
+
"version": "6.0.0-dev.33",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "paas 平台网页端底包",
|
|
6
6
|
"loader": "dist/loader.esm.min.js",
|
|
@@ -41,21 +41,21 @@
|
|
|
41
41
|
"unit-to-px": "^1.0.5",
|
|
42
42
|
"vue": "^3.5.30",
|
|
43
43
|
"vxe-table": "npm:@gct-paas/vxe-table@4.6.19",
|
|
44
|
-
"@gct-paas/core
|
|
45
|
-
"@gct-paas/
|
|
46
|
-
"@gct-paas/
|
|
47
|
-
"@gct-paas/core": "6.0.0-dev.
|
|
48
|
-
"@gct-paas/
|
|
49
|
-
"@gct-paas/
|
|
44
|
+
"@gct-paas/core": "6.0.0-dev.33",
|
|
45
|
+
"@gct-paas/render": "6.0.0-dev.33",
|
|
46
|
+
"@gct-paas/schema": "6.0.0-dev.33",
|
|
47
|
+
"@gct-paas/core-components": "6.0.0-dev.33",
|
|
48
|
+
"@gct-paas/core-web": "6.0.0-dev.33",
|
|
49
|
+
"@gct-paas/scss": "6.0.0-dev.33"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"@gct-paas/api": "^6.0.0-dev.12",
|
|
53
53
|
"vue": ">=3",
|
|
54
|
-
"@gct-paas/core": "6.0.0-dev.
|
|
55
|
-
"@gct-paas/core-web": "6.0.0-dev.
|
|
56
|
-
"@gct-paas/
|
|
57
|
-
"@gct-paas/
|
|
58
|
-
"@gct-paas/scss": "6.0.0-dev.
|
|
54
|
+
"@gct-paas/core": "6.0.0-dev.33",
|
|
55
|
+
"@gct-paas/core-web": "6.0.0-dev.33",
|
|
56
|
+
"@gct-paas/schema": "6.0.0-dev.33",
|
|
57
|
+
"@gct-paas/render": "6.0.0-dev.33",
|
|
58
|
+
"@gct-paas/scss": "6.0.0-dev.33"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/lodash-es": "^4.17.12"
|