@gct-paas/render-web 0.1.6-dev.36 → 0.1.6-dev.37
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 v0.1.6-dev.
|
|
1
|
+
/*! @gct-paas/render-web v0.1.6-dev.37 */
|
|
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,modelLoader as m,nullDisplayEnum as b,t as h,transformUrl as _,useNamespace as C}from"@gct-paas/core";import{DesignRender as E,DesignRenderViewPrefix as T,RenderNodeRegister as S,RenderNodeType as w,schemaToStyle as x,transformDataToDict as I}from"@gct-paas/render";import{Fragment as O,computed as k,createBlock as N,createCommentVNode as A,createElementBlock as R,createElementVNode as L,createSlots as P,createTextVNode as D,createVNode as F,defineComponent as B,guardReactiveProps as M,h as $,inject as j,isVNode as U,mergeProps as K,nextTick as W,normalizeClass as V,normalizeProps as q,normalizeStyle as H,onBeforeMount as G,onBeforeUnmount as z,onMounted as X,openBlock as Y,provide as J,reactive as Q,ref as Z,renderList as ee,renderSlot as te,resolveComponent as le,shallowRef as oe,toDisplayString as ae,toRaw as ne,toRef as re,toValue as ie,unref as se,useCssVars as de,useSlots as ue,vShow as ce,watch as ve,watchEffect as pe,withCtx as ge,withDirectives as fe,withModifiers as ye}from"vue";import{Avatar as me,Checkbox as be,CheckboxGroup as he,Radio as _e,RadioGroup as Ce,Select as Ee,message as Te}from"ant-design-vue";import{cloneDeep as Se,isString as we,pick as xe,range as Ie}from"lodash-es";import{IconNext as Oe}from"@gct-paas/core-components";import{CopyModuleKey as ke}from"@gct-paas/core-web";import{DomEditor as Ne,createEditor as Ae,createToolbar as Re}from"@wangeditor/editor";import{DesignNodeMode as Le,formatFieldValue as Pe,transformField2Component as De}from"@gct-paas/schema";import Fe from"exceljs";var Be=Object.defineProperty,Me=(e,t)=>{let l={};for(var o in e)Be(l,o,{get:e[o],enumerable:!0});return t||Be(l,Symbol.toStringTag,{value:"Module"}),l},$e=Symbol("PAGE_EVENT"),je=e=>J($e,e),Ue=()=>{try{const e=j($e);if(!e)throw new Error("PAGE_EVENT not provided");return e}catch{return{}}};function Ke(e){return Ke="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},Ke(e)}function We(e,t,l){return(t=function(e){var t=function(e){if("object"!=Ke(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var l=t.call(e,"string");if("object"!=Ke(l))return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ke(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:l,enumerable:!0,configurable:!0,writable:!0}):e[t]=l,e}var Ve=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"}))}};We(Ve,"app_client",void 0),We(Ve,"client_id",""),We(Ve,"USER_CONTROL_TOPIC","users/control/msg");var qe,He={class:"basic-page-render"},Ge={key:0,class:"basic-page-render__header"},ze=(e,t)=>{const l=e.__vccOpts||e;for(const[o,a]of t)l[o]=a;return l},Xe=/* @__PURE__ */ze(/* @__PURE__ */B({__name:"basic-page",props:{useBgColor:{type:[Boolean,String],default:!0}},setup(e){const t=e,l=k(()=>!0===t.useBgColor?"#ffffff":"string"==typeof t.useBgColor?t.useBgColor:"transparent");return(e,t)=>(Y(),R("div",He,[e.$slots.header?(Y(),R("div",Ge,[te(e.$slots,"header",{},void 0,!0)])):A("",!0),L("div",{class:"basic-page-render__body",style:H({"--bg-color":l.value})},[te(e.$slots,"default",{},void 0,!0)],4)]))}}),[["__scopeId","data-v-23453a1b"]]),Ye={class:"basic-page-render"},Je={key:0,class:"basic-page-render__header"},Qe=/* @__PURE__ */ze(/* @__PURE__ */B({__name:"basic-page-render",props:{useBgColor:{type:[Boolean,String],default:!0}},setup(e){const t=e,l=k(()=>!0===t.useBgColor?"#ffffff":"string"==typeof t.useBgColor?t.useBgColor:"transparent");return(e,t)=>(Y(),R("div",Ye,[e.$slots.header?(Y(),R("div",Je,[te(e.$slots,"header",{},void 0,!0)])):A("",!0),L("div",{class:"basic-page-render__body",style:H({"--bg-color":l.value})},[te(e.$slots,"default",{},void 0,!0)],4)]))}}),[["__scopeId","data-v-3c6aba55"]]),Ze=/* @__PURE__ */ze(/* @__PURE__ */B({__name:"tag-span",props:{tagStyle:{}},setup(e){de(e=>({v2ae1b805:o.value}));const t=e,l=re(()=>{var e;return(null===(e=t.tagStyle)||void 0===e?void 0:e.tagType)||g.RADIUS}),o=re(()=>{var e;return(null===(e=t.tagStyle)||void 0===e?void 0:e.color)||"#f0f0f0"}),a=re(()=>`tag-${l.value}`);return(e,t)=>(Y(),R("span",{class:V(["tag cursor-pointer",a.value])},[te(e.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-6c8c4c7a"]]),et=/* @__PURE__ */ze(/* @__PURE__ */B({__name:"tag-layout",props:{labelLayout:{},disabled:{type:Boolean}},setup:e=>(t,l)=>{var o,a,n,r;return Y(),R("span",{class:V([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"])},[te(t.$slots,"default",{},void 0,!0)],2)}}),[["__scopeId","data-v-85e6a8f5"]]),tt={class:"select-text"},lt={class:"select-text"},ot={key:0},at=/* @__PURE__ */B({__name:"tag-label",props:{tagWidgetStyle:{},type:{},disabled:{type:Boolean},label:{},isDesign:{type:Boolean},closable:{type:Boolean},showTagStyle:{type:Boolean,default:!0},avatar:{},iconExtraProps:{},iconProps:{}},emits:["on-close"],setup(e){const t=e,l=j("labelLayout",{}),o=re(()=>{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?we(l)?l.split(","):l:[]:l instanceof Array?l.join(","):l+""}),n=re(()=>{var e;const l=null===(e=t.tagWidgetStyle)||void 0===e?void 0:e.contentFont;return l?x(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 $(Oe,{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)?(Y(),N(et,{key:0,disabled:!!e.disabled,"label-layout":se(l)},{default:ge(()=>[(Y(!0),R(O,null,ee(o.value,(l,o)=>(Y(),N(Ze,{key:o,"tag-style":e.tagWidgetStyle.tagStyle,style:H(r(l))},{default:ge(()=>[t.avatar?(Y(),N(se(me),{key:0,src:se(_)(t.avatar),size:20,style:{"margin-top":"-5px"},class:"mr4px"},null,8,["src"])):A("",!0),F(i,{"label-name":l},null,8,["label-name"]),L("span",tt,ae(l),1),e.closable?(Y(),N(se(Oe),{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]=ye(e=>n.$emit("on-close"),["prevent","stop"]))})):A("",!0)]),_:2},1032,["tag-style","style"]))),128))]),_:1},8,["disabled","label-layout"])):e.type===se(a).ENUM_MULTI||e.type===se(a).ENUM?(Y(),N(et,{key:1,disabled:!!e.disabled,"label-layout":se(l)},{default:ge(()=>[(Y(!0),R(O,null,ee(o.value,(t,l)=>{var a;return Y(),R("span",{key:l,style:H(r(t)),class:"mr-5px"},[F(i,{"label-name":t},null,8,["label-name"]),L("span",lt,ae(t)+ae(!(null===(a=e.tagWidgetStyle)||void 0===a?void 0:a.tagStyleOpen)&&l<o.value.length-1?",":""),1)],4)}),128)),o.value.length?A("",!0):(Y(),R("span",ot," "))]),_:1},8,["disabled","label-layout"])):(Y(),N(et,{key:2,style:H(r(o.value)),disabled:!!e.disabled,"label-layout":se(l),class:"select-text leading-none"},{default:ge(()=>[D(ae(o.value||" "),1)]),_:1},8,["style","disabled","label-layout"]))}}}),nt=/* @__PURE__ */ze(at,[["__scopeId","data-v-9ba574f7"]]),rt=/* @__PURE__ */B({__name:"selectTag",props:{tagWidgetStyle:{}},setup(e){const t=e,l=re(()=>{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)=>(Y(),N(nt,{"tag-widget-style":l.value},null,8,["tag-widget-style"]))}}),it=y(_api.apaas.commonInfoCard.getGetById),st=/* @__PURE__ */B({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=C("card-view-render"),a=Z(!1),n=Z(!1),r=Z(null),i=Z({}),s=k(()=>{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{a.value=!0,await async function(){const t=await it({id:e.id,modelKey:e.modelKey,type:"CARD"});t&&t.designerJson&&(r.value=JSON.parse(decodeURIComponent(t.designerJson)))}(),!0!==e.preview&&e.fetch&&(i.value=await e.fetch()||{})}catch(l){console.error(l)}finally{a.value=!1}n.value=!0,await W(),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 F("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?F(E,{context:{data:i.value,id:e.id,modelKey:e.modelKey},model:{nodes:r.value.nodes,pageNode:r.value.pageNode,tree:r.value.tree,type:T.CARD_VIEW},prefix:T.CARD_VIEW,preview:e.preview},null):null])}}}),dt=["onMouseup"],ut={key:1},ct=/* @__PURE__ */B({__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=j("labelLayout",{}),n=Q({}),r=k(()=>{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=re(()=>{var e;const t=null===(e=l.tagWidgetStyle)||void 0===e?void 0:e.contentFont;return t?x(t):{}}),s=re(()=>{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=le("a-spin"),v=le("a-popover");return r.value.length?(Y(),N(et,{key:0,disabled:!!e.disabled,"label-layout":se(a)},{default:ge(()=>{var t;return[e.showTagStyle&&(null===(t=e.tagWidgetStyle)||void 0===t?void 0:t.tagStyleOpen)?(Y(!0),R(O,{key:0},ee(r.value,(t,l)=>(Y(),N(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:ge(()=>[F(se(st),{id:e.refCardId,"model-key":e.modelKey,fetch:c(t.value)},{loading:ge(()=>[F(i)]),_:1},8,["id","model-key","fetch"])]),default:ge(()=>[F(Ze,{"tag-style":e.tagWidgetStyle.tagStyle,onMouseup:e=>u(t)},{default:ge(()=>[L("span",{class:V(["select-text cursor-pointer",se(o)]),style:H(s.value)},ae(t.label),7)]),_:2},1032,["tag-style","onMouseup"])]),_:2},1032,["trigger","visible","onVisibleChange"]))),128)):(Y(!0),R(O,{key:1},ee(r.value,(t,a)=>(Y(),R(O,{key:a},[L("span",null,ae(a?",":""),1),F(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:ge(()=>[F(se(st),{id:e.refCardId,"model-key":e.modelKey,fetch:c(t.value)},{loading:ge(()=>[F(i)]),_:1},8,["id","model-key","fetch"])]),default:ge(()=>[L("span",{class:V(["select-text cursor-pointer",se(o)]),style:H(s.value),onClick:l[0]||(l[0]=ye(()=>{},["stop"])),onMouseup:e=>u(t)},ae(t.label),47,dt)]),_:2},1032,["visible","trigger","onVisibleChange"])],64))),128))]}),_:1},8,["disabled","label-layout"])):(Y(),R("span",ut," "))}}}),vt=ct;function pt(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&&J("refCardValues",{refCardValues:re(()=>{const t=e.modelValue??[];return t instanceof Array?t:t.split(",")}),widget:e.widget})}function gt(){var e;const t=j("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(ft,{fieldType:l,modelKey:o}),modelKey:o,refCardId:a}}async function ft({fieldType:e,modelKey:t},l){if(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:[]});return I(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:[]});return I(e,a)}}function yt(){const e=_gct.router.currentRoute.value;return{quickSearchEvent:async function(t,l,o,a){const{name:n,module:r}=bt[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==qe||qe({module:r,key:l,searchName:o,categoryId:a})}}}function mt(e,t){qe=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 bt={[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}},ht={key:0,class:"w100% ell"},_t={key:0,class:"gct-custom-tag ml8px"},Ct=/* @__PURE__ */B({__name:"field-readonly",props:{isTooltip:{type:Boolean},label:{},type:{},modelValue:{},tagWidgetStyle:{},disabled:{type:Boolean},iconExtraProps:{}},setup(e){const t=e,l=Z(!1),o=k(()=>Array.isArray(t.label)?t.label.join(","):t.label),{refCardValues:n,trigger:r,getCardData:i,modelKey:s,refCardId:d}=gt(),u=k(()=>{var e;return(null==n||null===(e=n.value)||void 0===e?void 0:e.length)?$(vt,{values:n.value,trigger:r,getCardData:i,modelKey:s,refCardId:d}):nt});function c(e){var o;if(!t.isTooltip)return;const a=null===(o=e.target)||void 0===o?void 0:o.parentNode;a.scrollWidth>a.clientWidth&&(l.value=!0)}function v(){l.value=!1}return(n,r)=>{const i=le("a-tooltip");return Y(),N(i,{placement:"topLeft",visible:l.value},{title:ge(()=>[D(ae(o.value),1)]),default:ge(()=>{var l;return[t.type===se(a).RDO_REF?(Y(),R("div",ht,[F(se(u),K(n.$attrs,{label:e.label,"tag-widget-style":t.tagWidgetStyle,disabled:t.disabled,"icon-extra-props":t.iconExtraProps,onMouseenter:c,onMouseleave:v}),null,16,["label","tag-widget-style","disabled","icon-extra-props"]),t.type===se(a).RDO_REF&&t.modelValue&&!(null===(l=t.modelValue)||void 0===l?void 0:l.includes(":"))?(Y(),R("span",_t," 默认 ")):A("",!0)])):(Y(),N(se(u),K({key:1},n.$attrs,{label:e.label,"tag-widget-style":t.tagWidgetStyle,disabled:t.disabled,"icon-extra-props":t.iconExtraProps,onMouseenter:c,onMouseleave:v}),null,16,["label","tag-widget-style","disabled","icon-extra-props"]))]}),_:1},8,["visible"])}}}),Et=Ct,Tt=/* @__PURE__ */B({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}},setup(e,{emit:t}){const l=k({get:()=>e.value,set(e){t("update:value",e)}}),o=(t,{name:l,iconExtraProps:o,otherParams:a={}})=>$(t,{tagWidgetStyle:e.tagStyle,type:e.fieldType,label:l,disabled:e.disabled,iconExtraProps:o,...a}),a=k(()=>(e.options??[]).map(t=>{var l;const{iconColor:a,icon:n,textColor:r}=t._item||{};return{...t,[(null===(l=e.selectExtraProps)||void 0===l?void 0:l.optionLabelProp)||"titleLabel"]:o(nt,{name:t.label,iconExtraProps:{[t.label]:{icon:n,iconColor:a,textColor:r}}})}}));function n(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 i=k(()=>{if(e.readonly){var t;const o=(null===(t=a.value)||void 0===t?void 0:t.filter(t=>{var o;return"multiple"===(null===(o=e.selectExtraProps)||void 0===o?void 0:o.mode)?Array.isArray(l.value)&&l.value.includes(t.value):t.value===l.value}))??[],n=Object.fromEntries((null==o?void 0:o.map(e=>[e.label,xe((null==e?void 0:e._item)||{},["iconColor","icon","textColor"])]))??[]);return{labels:o.map(e=>e.label),icons:n}}return{}}),s={option:t=>{const{label:l,_item:a={}}=t;return e.type===r.Userpicker?F("div",{class:"flex items-center"},[F(me,{size:30,style:"margin: 0 8px;min-width:32px",src:_(a.avatar)},null),F("div",{style:"width:calc(100% - 35px)"},[F("div",{class:" w100% ell",title:l},[l]),F("div",{class:"text-[#8F8F8F] text-[12px] mt2px"},[a.masterOrgName])])]):o(nt,{name:e.selectOptionLabel?n(a,e.selectOptionLabel):l,iconExtraProps:{[l]:xe(a,["iconColor","icon","textColor"])},otherParams:{showTagStyle:!1}})}},d=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={}})=>F(rt,K({tagWidgetStyle:e.tagStyle,type:e.fieldType,label:t,avatar:a,title:(null==l?void 0:l.length)>e.maxTagTextLength?l:null,disabled:e.disabled,iconExtraProps:o},n),null))({name:o,title:null==a?void 0:a.label,avatar:null==a||null===(l=a._item)||void 0===l?void 0:l.avatar,iconExtraProps:{[o]:xe(i,["iconColor","icon","textColor"])},otherParams:{closable:n,"onOn-close":r,style:"margin-right: 4px"}})};return()=>{var t,n,r,u;return e.readonly?o(Et,{name:null===(t=i.value)||void 0===t?void 0:t.labels,iconExtraProps:null===(n=i.value)||void 0===n?void 0:n.icons}):F(Ee,K({class:["field-select","w100%"],value:l.value,"onUpdate:value":e=>l.value=e,options:a.value,disabled:e.disabled,optionLabelProp:"titleLabel",tagRender:d,showArrow:!0,maxTagCount:e.maxTagCount,maxTagTextLength:e.maxTagTextLength,dropdownMatchSelectWidth:180,dropdownClassName:"multiple"===(null===(r=e.selectExtraProps)||void 0===r?void 0:r.mode)?"gct-project-select-dropdown gct-project-select-multiple vxe-table--ignore-clear":"gct-project-select-dropdown vxe-table--ignore-clear"},e.selectExtraProps),(null===(u=e.selectExtraProps)||void 0===u?void 0:u.optionNoStyle)?null:s)}}}),St=/* @__PURE__ */B({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=k({get:()=>e.value,set(e){t("update:value",e)}});return()=>{let t;return F(Ce,{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)&&!U(e)}(t=(e.options??[]).map(t=>{const l=t,{icon:o,iconColor:a,textColor:n}=(null==l?void 0:l._item)||{};return F(_e,{key:l.value,value:l.value},{default:()=>[F(Et,{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]})}}}),wt=/* @__PURE__ */B({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=k({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=k(()=>l?(e.options??[]).filter(e=>e.value):e.options??[]);return()=>F(he,{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 F(be,{key:l.value,value:l.value},{default:()=>[F(Et,{tagWidgetStyle:e.tagStyle,type:e.fieldType,label:l.label,disabled:e.disabled,iconExtraProps:{[l.label]:{icon:o,iconColor:a,textColor:n}}},null)]})})]}})}}),xt={grad:.9,turn:360,rad:360/(2*Math.PI)},It=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},Ot=function(e,t,l){return void 0===t&&(t=0),void 0===l&&(l=Math.pow(10,t)),Math.round(l*e)/l+0},kt=function(e,t,l){return void 0===t&&(t=0),void 0===l&&(l=1),e>l?l:e>t?e:t},Nt=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},At=function(e){return{r:kt(e.r,0,255),g:kt(e.g,0,255),b:kt(e.b,0,255),a:kt(e.a)}},Rt=function(e){return{r:Ot(e.r),g:Ot(e.g),b:Ot(e.b),a:Ot(e.a,3)}},Lt=/^#([0-9a-f]{3,8})$/i,Pt=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Dt=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}},Ft=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}},Bt=function(e){return{h:Nt(e.h),s:kt(e.s,0,100),l:kt(e.l,0,100),a:kt(e.a)}},Mt=function(e){return{h:Ot(e.h),s:Ot(e.s),l:Ot(e.l),a:Ot(e.a,3)}},$t=function(e){return Ft((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},jt=function(e){return{h:(t=Dt(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},Ut=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Kt=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Wt=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Vt=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,qt={string:[[function(e){var t=Lt.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?Ot(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?Ot(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Wt.exec(e)||Vt.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:At({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=Ut.exec(e)||Kt.exec(e);return o?$t(Bt({h:(t=o[1],l=o[2],void 0===l&&(l="deg"),Number(t)*(xt[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 It(t)&&It(l)&&It(o)?At({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 It(t)&&It(l)&&It(o)?$t(Bt({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 It(t)&&It(l)&&It(o)?Ft(function(e){return{h:Nt(e.h),s:kt(e.s,0,100),v:kt(e.v,0,100),a:kt(e.a)}}({h:Number(t),s:Number(l),v:Number(o),a:Number(n)})):null},"hsv"]]},Ht=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]},Gt=function(e,t){var l=jt(e);return{h:l.h,s:kt(l.s+100*t,0,100),l:l.l,a:l.a}},zt=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Xt=function(e,t){var l=jt(e);return{h:l.h,s:l.s,l:kt(l.l+100*t,0,100),a:l.a}},Yt=function(){function e(e){this.parsed=function(e){return"string"==typeof e?Ht(e.trim(),qt.string):"object"==typeof e&&null!==e?Ht(e,qt.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 Ot(zt(this.rgba),2)},e.prototype.isDark=function(){return zt(this.rgba)<.5},e.prototype.isLight=function(){return zt(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=Rt(this.rgba)).r,l=e.g,o=e.b,n=(a=e.a)<1?Pt(Ot(255*a)):"","#"+Pt(t)+Pt(l)+Pt(o)+n;var e,t,l,o,a,n},e.prototype.toRgb=function(){return Rt(this.rgba)},e.prototype.toRgbString=function(){return t=(e=Rt(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 Mt(jt(this.rgba))},e.prototype.toHslString=function(){return t=(e=Mt(jt(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=Dt(this.rgba),{h:Ot(e.h),s:Ot(e.s),v:Ot(e.v),a:Ot(e.a,3)};var e},e.prototype.invert=function(){return Jt({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),Jt(Gt(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),Jt(Gt(this.rgba,-e))},e.prototype.grayscale=function(){return Jt(Gt(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),Jt(Xt(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),Jt(Xt(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?Jt({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Ot(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=jt(this.rgba);return"number"==typeof e?Jt({h:e,s:t.s,l:t.l,a:t.a}):Ot(t.h)},e.prototype.isEqual=function(e){return this.toHex()===Jt(e).toHex()},e}(),Jt=function(e){return e instanceof Yt?e:new Yt(e)},Qt=/* @__PURE__ */ze(/* @__PURE__ */B({__name:"multi-field-item",props:{config:{},isDesign:{type:Boolean},rowValue:{}},setup(e){const t=e,l=Ue(),o=Z(),a=k(()=>{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=k(()=>t.config.style.labelType.includes("surface_")?{background:t.config.style.color,color:"#fff"}:t.config.style.labelType.includes("line_dashed_")?{border:`1px dashed ${Jt(t.config.style.color).alpha(.5).toRgbString()}`,color:t.config.style.color}:t.config.style.labelType.includes("line_")?{border:`1px solid ${Jt(t.config.style.color).alpha(.5).toRgbString()}`,color:t.config.style.color}:{background:Jt(t.config.style.color).alpha(.1).toRgbString(),color:t.config.style.color,border:`1px solid ${Jt(t.config.style.color).alpha(.5).toRgbString()}`});return X(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?(Y(),R("div",{key:0,class:V(["tag",t.config.style.labelType]),style:H(n.value)},ae(a.value),7)):A("",!0)}}),[["__scopeId","data-v-ddac8ce3"]]),Zt={key:0,class:"flex tag-area"},el=/* @__PURE__ */ze(/* @__PURE__ */B({__name:"multi-field-display",props:{widget:{},rowReadonly:{type:Boolean},isDesign:{type:Boolean},rowValue:{}},setup(e){const t=e,l=k(()=>t.rowReadonly&&t.widget.materialType===i.MaterialTableField&&t.widget.props.multiFieldDisplay);return(o,a)=>l.value?(Y(),R("div",Zt,[(Y(!0),R(O,null,ee(t.widget.props.multiFieldConfig,(l,o)=>(Y(),R("div",{key:o},[F(Qt,{config:l,"is-design":t.isDesign,"row-value":e.rowValue},null,8,["config","is-design","row-value"])]))),128))])):A("",!0)}}),[["__scopeId","data-v-0f2f02cc"]]),tl=/* @__PURE__ */function(e){return e.BASE="BASE",e.PROCESS="PROCESS",e.VIEW="VIEW",e.TEXT="TEXT",e.FILE="FILE",e}({}),ll="ABANDON",ol="FILLED",al="COMPLETED",nl="RUNNING",rl="STASH",il="EXCEPTION",sl={get gctInstanceStatusTheme(){return{"gct-nocode-instance-status--stash":{textColor:"#F77E4A",background:"rgba(247,126,74,0.1)",iconBackground:"#FFC837",placeholder:h("sys.edhr.formInsStatusEnum.STASH")},"gct-nocode-instance-status--partial-submit":{textColor:"#FFAA00",background:"rgba(255,170,0,0.1)",iconBackground:"#FFD666",placeholder:h("sys.appDesigner.approval.button.PartialSubmit")},"gct-nocode-instance-status--finish":{textColor:"#309C41",background:"rgba(48,156,65,0.1)",iconBackground:"#76DA57",placeholder:h("sys.bpmn.flowNodeInstStatus.COMPLETED")},"gct-nocode-instance-status--abnormal":{textColor:"#F54547",background:" rgba(245,69,71,0.1)",iconBackground:"#FF6776",placeholder:h("sys.bpmn.flowNodeInstStatus.EXCEPTION")},"gct-nocode-instance-status--not-filled":{textColor:"#6D82B0",background:"#E6EEFF",iconBackground:"#B4C8F4",placeholder:h("sys.edhr.instanceStatus2DhrEnum.UNFILLED")},"gct-nocode-instance-status--running":{textColor:"#13C2C2",background:"rgba(19,194,194,0.1)",iconBackground:"#13C2C2",placeholder:h("sys.bpmn.bizNodeInstStatus.running")},"gct-nocode-instance-status--already-filled":{textColor:"#026AC8",background:" rgba(2,106,200,0.1)",iconBackground:"#026AC8",placeholder:h("sys.edhr.instanceStatus2DhrEnum.FILLED")},"gct-nocode-instance-status--invalid":{textColor:"#737A87",background:"#E5E5E5",iconBackground:"#C3C3C3",placeholder:h("sys.edhr.dhrLogType.ABANDON")},"gct-nocode-instance-status--archived":{textColor:"#dda200",background:"#faf3df",iconBackground:"#dda200",placeholder:h("sys.edhr.recordBook.archived")},"gct-nocode-instance-status--tmpl":{textColor:"#742fb2",background:"#f9f2ff",iconBackground:"#742fb2",placeholder:h("sys.appDesigner.template")},"gct-nocode-instance-status--in-audit":{textColor:"#FF52C5",background:"rgba(255,82,197, 0.1)",iconBackground:"#FF52C5",placeholder:h("sys.edhr.instanceStatus2FormEnum.IN_AUDIT")}}}},dl={key:0,class:"instance-status-icon"},ul=/* @__PURE__ */ze(/* @__PURE__ */B({__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=k(()=>{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===tl.TEXT||e===tl.VIEW?"gct-nocode-instance-status--finish":"ARCHIVED"===l?"gct-nocode-instance-status--archived":"IN_AUDIT"===l?"gct-nocode-instance-status--in-audit":e===tl.PROCESS||a?{[nl]:"gct-nocode-instance-status--running",[ol]:"gct-nocode-instance-status--already-filled",[al]:"gct-nocode-instance-status--finish",[ll]:"gct-nocode-instance-status--invalid",[il]:"gct-nocode-instance-status--abnormal",[rl]:"gct-nocode-instance-status--stash"}[l]||"gct-nocode-instance-status--not-filled":e===tl.BASE||e===tl.FILE?"STASH"===t||l===rl?"gct-nocode-instance-status--stash":t?"SUBMIT"===t?l===ll?"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===ll?"gct-nocode-instance-status--invalid":"gct-nocode-instance-status--finish":"gct-nocode-instance-status--not-filled";return sl.gctInstanceStatusTheme[n]})({formType:t.formType,dataStatus:t.dataStatus,instanceStatus:t.instanceStatus,statusType:t.statusType,isFormSummary:t.isFormSummary})}:{placeholder:t.instanceStatus?h(`sys.edhr.instanceStatus2FormEnum.${t.instanceStatus}`):"",baseClass:[e,`${e}--static`,`${e}--${t.instanceStatus}`]}});return(t,o)=>{var a,n,r,i;return Y(),R("div",{class:V(["instance-status-wrapper",l.value.baseClass]),style:H({"--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?(Y(),R("span",dl,[...o[0]||(o[0]=[L("i",{class:"iconfont icon-a-biaodan2"},null,-1)])])):A("",!0),te(t.$slots,"instanceTitle",{},void 0,!0),L("span",{class:V(["instance-title",e.needCustomClass?"is-custom-class":""])},ae(null===(i=l.value)||void 0===i?void 0:i.placeholder),3)],6)}}}),[["__scopeId","data-v-610b0bb3"]]),cl=/* @__PURE__ */ze(/* @__PURE__ */B({__name:"label-tag",props:{data:{}},setup(e){de(e=>({v218ac50d:a.value}));const t=e,l=re(()=>t.data.label+""),o=re(()=>t.data.labelStyle||g.RADIUS),a=re(()=>t.data.labelColor||"#026ac8"),n=re(()=>`tag-${o.value}`),r=re(()=>({color:t.data.valueColor||"#fff"}));return(e,t)=>(Y(),R("span",{class:V(["tag label-ellipsis",n.value])},[L("span",{class:"select-text",style:H(r.value)},ae(l.value||" "),5)],2))}}),[["__scopeId","data-v-b25afce5"]]),vl=/* @__PURE__ */B({__name:"enum-tag-label",props:{model:{},value:{}},setup(e){const t=e,l=Z({}),o=Z(),n=Z(),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]=xe(t,n),e),{})}}(await _api.apaas.enumModel.getInfoId({id:e})||{})});return ve(()=>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)=>(Y(),N(se(nt),{type:se(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"]))}}),pl=vl,gl=["title"],fl=["title"],yl=/* @__PURE__ */B({__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=le("a-tag"),r=le("a-descriptions-item"),i=le("a-descriptions");return Y(),N(i,{class:V(e.isHead?"item":"desc-area"),column:e.column||3},{default:ge(()=>[(Y(!0),R(O,null,ee(e.descData,(e,a)=>(Y(),N(r,{key:a,label:e.label,span:t(e.span),"content-style":l(e)},{default:ge(()=>[e.useSlot&&e.slotName&&o.$slots[e.slotName]?te(o.$slots,e.slotName,{key:0,item:e,slotData:e.slotData}):e.render?(Y(),R(O,{key:1},["link_render"===e.render?(Y(),R(O,{key:0},[e.name?(Y(),R("span",{key:0,title:e.name},ae(e.name),9,gl)):(Y(),N(n,{key:1,color:"error"},{default:ge(()=>[D(ae(o.$t("sys.onlineForm.noAssociation")),1)]),_:1}))],64)):A("",!0),"status_render"===e.render?(Y(),N(ul,{key:1,"instance-status":e.name},null,8,["instance-status"])):A("",!0),"change_status_render"===e.render?(Y(),N(pl,{key:2,value:e.name,model:e.model},null,8,["value","model"])):A("",!0),"label_tag_render"===e.render?(Y(!0),R(O,{key:3},ee(e.tagList,(e,t)=>(Y(),N(cl,{key:t,data:e},null,8,["data"]))),128)):A("",!0)],64)):e.isCopy?(Y(),N(se(ke),{key:2,"module-key":e.key},null,8,["module-key"])):(Y(),R(O,{key:3},[L("span",{title:e.name,class:V({"mr-4px":e.hasTag})},ae(e.name),11,fl),e.hasTag?(Y(!0),R(O,{key:0},ee(e.tagList,e=>(Y(),N(n,{key:e.key,color:null==e?void 0:e.color},{default:ge(()=>[D(ae(e.name),1)]),_:2},1032,["color"]))),128)):A("",!0)],64))]),_:2},1032,["label","span","content-style"]))),128))]),_:3},8,["class","column"])}}}),ml=yl,bl={class:"collapse-detail-wrap"},hl={class:"header"},_l={class:"header-title"},Cl={class:"action-wrap"},El=/* @__PURE__ */B({__name:"index",props:{collapseInfo:{},column:{},defaultExpand:{type:Boolean,default:!0}},emits:["collapse-change"],setup(e,{expose:t,emit:l}){const o=ue(),a=e,n=l,r=Z(!0),i=Z("1"),s=k(()=>a.column??3),d=k(()=>a.collapseInfo.filter(e=>!e.hidden)),u=k(()=>d.value.filter((e,t)=>t<s.value)),c=k(()=>d.value.filter((e,t)=>t>=s.value));return t({refreshExpand:()=>{r.value=!0,i.value="1"}}),G(()=>{a.defaultExpand||(r.value=!1,i.value="")}),(e,t)=>{const l=le("a-collapse-panel"),a=le("a-collapse");return Y(),R("div",bl,[F(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:ge(()=>[F(l,{key:"1"},{header:ge(()=>[L("div",hl,[L("div",_l,ae(se(h)("sys.appDesigner.basicInformation")),1),L("div",Cl,[te(e.$slots,"default",{},void 0,!0)])]),L("div",{class:V(["description",{"desc-expand":r.value}])},[F(ml,{"desc-data":u.value,column:s.value,"is-head":!0},P({_:2},[ee(se(o),(t,l)=>({name:l,fn:ge(t=>[te(e.$slots,l,q(M(t)),void 0,!0)])}))]),1032,["desc-data","column"])],2)]),default:ge(()=>[F(ml,{"desc-data":c.value,column:s.value},P({_:2},[ee(se(o),(t,l)=>({name:l,fn:ge(t=>[te(e.$slots,l,q(M(t)),void 0,!0)])}))]),1032,["desc-data","column"])]),_:3})]),_:3},8,["active-key"])])}}}),Tl=/* @__PURE__ */ze(El,[["__scopeId","data-v-b4b9903c"]]),Sl=("undefined"!=typeof WorkerGlobalScope&&(globalThis,WorkerGlobalScope),()=>{}),wl=e=>e();function xl(e,t={}){let l,o,a=Sl;const n=e=>{clearTimeout(e),a(),a=Sl};let r;return i=>{const s=ie(e),d=ie(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 Il(e){const t=Object.create(null);return l=>t[l]||(t[l]=e(l))}var Ol=/\B([A-Z])/g,kl=(Il(e=>e.replace(Ol,"-$1").toLowerCase()),/-(\w)/g);Il(e=>e.replace(kl,(e,t)=>t?t.toUpperCase():""));var Nl={class:"field-search-cascader-wrap"},Al={class:"field-cascader-pop-content flex"},Rl={class:"field-cascader-list-box"},Ll=["onClick"],Pl=["title"],Dl={class:"search-name"},Fl=["title"],Bl={class:"field-name-show"},Ml=/* @__PURE__ */B({__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=Z(!1),s=Z(),d=Z(),u=Z(),c=[a.REF,a.REF_MULTI,a.RDO_REF,a.MASTERSLAVE],v=Z({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=wl,...a}=l;return ve(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:xl(o,{maxWait:a})})}(()=>o.modelKey,async()=>{o.modelKey&&(v.value.left.options=await m(o.modelKey),o.value&&g())},{immediate:!0,debounce:300}),ve(()=>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:Te.error(h("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=k({get:()=>o.value,set(e){n("update:value",e,{type:u.value,name:d.value,key:e})}}),_=k(()=>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}):Se(a.options)});ve(()=>{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):Se(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}),ve(()=>{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):Se(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=Se(l):(t=await m(e.bindInfo),r.set(e.id,Se(t)))}return t};return t({fieldCascaderName:s}),(t,l)=>{const o=le("a-input"),a=le("a-form-item-rest"),n=le("right-outlined"),r=le("a-button"),p=le("a-popover");return Y(),R("div",Nl,[F(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:ge(()=>[fe(L("div",Al,[(Y(!0),R(O,null,ee(Object.keys(v.value),(e,r)=>fe((Y(),R("div",{key:e+r,class:"field-cascader-item-box px-12px py-8px serial-num-no-error"},[F(a,null,{default:ge(()=>[F(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:ge(()=>[...l[2]||(l[2]=[L("i",{class:"iconfont icon-sousuo1"},null,-1)])]),_:1},8,["value","onUpdate:value","placeholder"])]),_:2},1024),L("div",Rl,[(Y(!0),R(O,null,ee(_.value(e),t=>{var l;return Y(),R("div",{key:t.key,class:V(["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?(Y(),R("span",{key:0,title:t.title},[L("span",null,ae(t.title.substr(0,t.title.indexOf(v.value[e].search))),1),L("span",Dl,ae(v.value[e].search),1),L("span",null,ae(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,Pl)):(Y(),R("span",{key:1,title:t.title},ae(t.title),9,Fl)),t.bindInfo&&c.includes(t.fieldType)&&"right"!==e&&"parent_id_"!==t.key?(Y(),N(n,{key:2,class:"right-icon"})):A("",!0)],10,Ll)}),128))])],512)),[[ce,v.value[e].options.length]])),128))],512),[[ce,i.value]])]),default:ge(()=>[L("div",Bl,[e.noShowName?(Y(),N(r,{key:1,type:"link"},{default:ge(()=>[D(ae(e.btnTitle||se(h)("sys.message.metaFiled")),1)]),_:1})):(Y(),N(a,{key:0},{default:ge(()=>[F(o,{value:s.value,"onUpdate:value":l[0]||(l[0]=e=>s.value=e),class:V(["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"])])}}}),$l=/* @__PURE__ */ze(Ml,[["__scopeId","data-v-cb5e4d67"]]),jl=Object.defineProperty,Ul=Object.defineProperties,Kl=Object.getOwnPropertyDescriptors,Wl=Object.getOwnPropertySymbols,Vl=Object.prototype.hasOwnProperty,ql=Object.prototype.propertyIsEnumerable,Hl=(e,t,l)=>t in e?jl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[t]=l,Gl=(e,t)=>{for(var l in t||(t={}))Vl.call(t,l)&&Hl(e,l,t[l]);if(Wl)for(var l of Wl(t))ql.call(t,l)&&Hl(e,l,t[l]);return e},zl=(e,t)=>Ul(e,Kl(t));function Xl(e){let t=`请使用 '@${e}' 事件,不要放在 props 中`;return t+=`\nPlease use '@${e}' event instead of props`,t}var Yl,Jl,Ql=(e,t)=>{for(const[l,o]of t)e[l]=o;return e},Zl=B({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=Z(null),o=oe(null),a=Z("");return X(()=>{(()=>{if(!l.value)return;const n=ne(e.defaultContent);Ae({selector:l.value,mode:e.mode,content:n||[],html:e.defaultHtml||e.modelValue||"",config:zl(Gl({},e.defaultConfig),{onCreated(l){if(o.value=l,t.emit("onCreated",l),e.defaultConfig.onCreated){const e=Xl("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=Xl("onChange");throw new Error(e)}},onDestroyed(l){if(t.emit("onDestroyed",l),e.defaultConfig.onDestroyed){const e=Xl("onDestroyed");throw new Error(e)}},onMaxLength(l){if(t.emit("onMaxLength",l),e.defaultConfig.onMaxLength){const e=Xl("onMaxLength");throw new Error(e)}},onFocus(l){if(t.emit("onFocus",l),e.defaultConfig.onFocus){const e=Xl("onFocus");throw new Error(e)}},onBlur(l){if(t.emit("onBlur",l),e.defaultConfig.onBlur){const e=Xl("onBlur");throw new Error(e)}},customAlert(l,o){if(t.emit("customAlert",l,o),e.defaultConfig.customAlert){const e=Xl("customAlert");throw new Error(e)}},customPaste:(l,o)=>{if(e.defaultConfig.customPaste){const e=Xl("customPaste");throw new Error(e)}let a;return t.emit("customPaste",l,o,e=>{a=e}),a}})})})()}),ve(()=>e.modelValue,e=>{e!==a.value&&function(e){const t=o.value;null!=t&&t.setHtml(e)}(e)}),{box:l}}}),eo={ref:"box",style:{height:"100%"}},to=/* @__PURE__ */Ql(Zl,[["render",function(e,t,l,o,a,n){return Y(),R("div",eo,null,512)}]]),lo=B({props:{editor:{type:Object},mode:{type:String,default:"default"},defaultConfig:{type:Object,default:{}}},setup(e){const t=Z(null);return pe(()=>{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");Ne.getToolbar(l)||Re({editor:l,selector:t.value||"<div></div>",mode:e.mode,config:e.defaultConfig})}})(l)}),{selector:t}}}),oo={ref:"selector"},ao=/* @__PURE__ */Ql(lo,[["render",function(e,t,l,o,a,n){return Y(),R("div",oo,null,512)}]]),no={style:{border:"1px solid #e8ebf0","border-bottom":"none"}},ro=/* @__PURE__ */B({__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=oe(),s=Z("");X(()=>{setTimeout(()=>{s.value=n.content},500)}),z(()=>{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)=>(Y(),R("div",no,[F(se(ao),{style:{"border-bottom":"1px solid #e8ebf0"},editor:i.value,"default-config":o},null,8,["editor"]),F(se(to),{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"])]))}}),io=ro,so=/* @__PURE__ */Me({default:()=>uo}),uo={appLogoImage:"图片",basicInformation:"基本信息",approval:{button:{PartialSubmit:"部分提交"}},template:"模板"},co=/* @__PURE__ */Me({default:()=>vo}),vo={fieldType:"字段类型"},po=/* @__PURE__ */Me({default:()=>go}),go={flowNodeInstStatus:{COMPLETED:"已完成",EXCEPTION:"异常"},bizNodeInstStatus:{running:"进行中"}},fo=/* @__PURE__ */Me({default:()=>yo}),yo={dataConnection:{modelField:{integer:"整数",long:"长整数",double:"小数",decimal:"精度小数",boolean:"布尔",date:"日期",user:"人员关联",org:"部门关联"}}},mo=/* @__PURE__ */Me({default:()=>bo}),bo={devive:{index:"设备"}},ho=/* @__PURE__ */Me({default:()=>_o}),_o={formInsStatusEnum:{STASH:"暂存中"},instanceStatus2DhrEnum:{UNFILLED:"未填报",FILLED:"已填报"},dhrLogType:{ABANDON:"作废"},recordBook:{archived:"封存"},instanceStatus2FormEnum:{IN_AUDIT:"变更中"}},Co=/* @__PURE__ */Me({default:()=>Eo}),Eo={metaFiled:"业务字段"},To=/* @__PURE__ */Me({default:()=>So}),So={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:"数量"},wo=/* @__PURE__ */Me({default:()=>xo}),xo={fieldKey:"字段KEY",disabledStatus:"是否禁用状态",formStyle:"表单样式",formFields:"表单字段",noAssociation:"无关联"},Io=/* @__PURE__ */Me({default:()=>Oo}),Oo={searchField:"搜索字段",dataLinkage:{rootSelectPlaceholder2:"请选择模型字段"}},ko=/* @__PURE__ */Me({default:()=>No}),No={FieldName:"字段名称",requiredOrNot:"是否必填",text:"文本",tableColumnDate:"时间",signatureImage:"签名",true:"是",checkBarcodeFieldTip:"请关联实体模型后再配置变量类型的条码内容"},Ao=/* @__PURE__ */Object.assign({"./sys/appDesigner.ts":so,"./sys/bi.ts":co,"./sys/bpmn.ts":po,"./sys/component.ts":fo,"./sys/developer.ts":mo,"./sys/edhr.ts":ho,"./sys/message.ts":Co,"./sys/model.ts":To,"./sys/onlineForm.ts":wo,"./sys/pageDesigner.ts":Io,"./sys.ts":ko}),Ro=class{constructor(){We(this,"mode",Le.ITEM),We(this,"type",w.FIELD),We(this,"component","RenderCardField")}},Lo=class{constructor(){We(this,"mode",Le.ITEM),We(this,"type",w.PAGE),We(this,"component","RenderCardViewPage")}},Po=/* @__PURE__ */B({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=C("render-card-field"),l=k(()=>{var t;return(null===(t=e.pageModel)||void 0===t?void 0:t.data)||{}}),o=k(()=>{var t;return(null===(t=e.model)||void 0===t?void 0:t.data)||{}}),n=k(()=>S.getDesignEditorNode(o.value.type)),r=k(()=>n.value&&n.value.component?"string"==typeof n.value.component?le(n.value.component):n.value.component:null),i=k(()=>e.pageModel.data.layout_mode||"horizontal"),s=k(()=>"wrap"===l.value.wrap_mode),d=k(()=>{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=k(()=>{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=Z(null),v=k(()=>{var e;return o.value.label||(null===(e=c.value)||void 0===e?void 0:e.name)||""}),p=k(()=>{if(!c.value)return"";let t="";var l;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=De(l))||void 0===t?void 0:t.example:"";let n=o?we(o)?h(o):o.map(e=>h(e)):"";return l!==a.ENUM_MULTI&&l!==a.ENUM||(n=n?we(n)?[n]:n:[]),n instanceof Array?n.join(","):n}(c.value)||"":(null===(l=e.context.data)||void 0===l?void 0:l[c.value.key])||"",t?function(e){return c.value?Pe(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 b[_gct.store.getEmptyDisplay];const l=r.value?$(r.value,{...e,field:c.value,value:p.value}):p.value,a=o.value.tag_style;return a&&!0===a.check?F("span",{class:[t.e("value-tag"),a.mode],style:{"--ant-primary-color":a.color}},[l]):l}return async function(){try{c.value=await m.loadField(o.value.modelKey,o.value.key),console.log("field",c.value)}catch(e){console.warn("加载模型失败:",e)}}(),()=>c.value?F("div",{class:[t.b(),"vertical"===i.value?t.m("vertical"):t.m("horizontal")]},[!0!==o.value.show_label?null:F("div",{class:t.e("label"),style:d.value},[F("span",{title:v.value,class:[t.em("label","name"),t.is("ellipsis",!0!==s.value)]},[v.value]),F("span",{class:t.em("label","colon")},[D(":")])]),F("div",{class:t.e("value"),style:u.value},[g()])]):null}}),Do=/* @__PURE__ */B({name:"RenderCardViewPage",props:{model:{type:Object,default:()=>({})},context:{type:Object,default:()=>({})},preview:{type:Boolean,default:!1}},setup(e,{slots:t}){const l=C("render-card-view-page"),o=k(()=>{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=k(()=>{var t;return(null===(t=e.model)||void 0===t?void 0:t.data)||{}});return()=>{const e=t.default?t.default():null;return F("div",{class:[l.b(),l.is("simple","simple"===a.value.mode)],style:o.value},[F(le("a-row"),{gutter:[12,8],wrap:!0},{default:()=>[e&&e.map(e=>F(le("a-col"),{class:l.e("col"),span:a.value.colspan||24},{default:()=>e}))]})])}}});function Fo(e){_gct.i18nUtil.autoRegisterLocale(Ao),e.component(Xe.__name||Xe.name,Xe),e.component(Qe.__name||Qe.name,Qe),e.component(Po.name,Po),e.component(Do.name,Do),S.register(w.FIELD,()=>new Ro,T.CARD_VIEW),S.register(w.PAGE,()=>new Lo,T.CARD_VIEW),S.register(w.PAGE_LOWER,()=>new Lo,T.CARD_VIEW)}var Bo=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){Yl||((Yl=document.createElement("div")).style.position="absolute",Yl.style.width=0,Yl.style.height=0,Yl.style.visibility="hidden",Yl.style.overflow="hidden",Jl=document.createElement("div"),Yl.appendChild(Jl)),Jl.style.width=100+e,(t||document.body).appendChild(Yl);var l=Jl.getBoundingClientRect();return Yl.parentNode.removeChild(Yl),l.width/100}(a,t)*o},Mo=/* @__PURE__ */function(e){return e.Portrait="portrait",e.Landscape="landscape",e}({}),$o=/* @__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}({}),jo={sheetId:"1",padding:{t:10,r:10,b:10,l:10},orientation:Mo.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:[]},Uo={key:h("sys.onlineForm.fieldKey"),name:h("sys.FieldName"),type:h("sys.bi.fieldType"),required:h("sys.requiredOrNot"),uniqueConstraint:h("sys.model.uniqueOrNot"),disabled:h("sys.onlineForm.disabledStatus")},Ko={[a.TEXT]:h("sys.text"),[a.LONG_TEXT]:h("sys.component.dataConnection.modelField.long_text"),[a.INTEGER]:h("sys.component.dataConnection.modelField.integer"),[a.LONG]:h("sys.component.dataConnection.modelField.long"),[a.DOUBLE]:h("sys.component.dataConnection.modelField.double"),[a.DECIMAL]:h("sys.component.dataConnection.modelField.decimal"),[a.BOOLEAN]:h("sys.component.dataConnection.modelField.boolean"),[a.DATE]:h("sys.component.dataConnection.modelField.date"),[a.TIME]:h("sys.tableColumnDate"),[a.DATE_TIME]:h("sys.component.dataConnection.modelField.date_time"),[a.IMAGE]:h("sys.appDesigner.appLogoImage"),[a.ATTACHMENT]:h("sys.component.dataConnection.modelField.attachment"),[a.USER]:h("sys.component.dataConnection.modelField.user"),[a.USER_MULTI]:h("sys.component.dataConnection.modelField.user_multi"),[a.ORG]:h("sys.component.dataConnection.modelField.org"),[a.ORG_MULTI]:h("sys.component.dataConnection.modelField.org_multi"),[a.OPTION]:h("sys.model.option"),[a.OPTION_MULTI]:h("sys.component.dataConnection.modelField.enum_multi"),[a.SIGNATURE]:h("sys.signatureImage"),[a.MATERIAL_NO]:"LOT/SN",[a.PRODUCT]:h("sys.model.product"),[a.DEVICE]:h("sys.developer.devive.index")},Wo=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?Ie(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?Ie(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,Ie(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)})),Ie(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?Ie(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:Ie(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:Ie(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:Ie(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:Ie(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:Ie(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:Ie(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:Ie(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:Ie(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:Ie(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)||{}}},Vo=(e,t)=>t.includes(e),qo=(e,t,l)=>{if(!Vo(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}_`},Ho=Object.entries(Uo),Go=Object.entries(Ko),zo=Object.values(n),Xo=Object.values($o),Yo=class e{static async xlsx2json(t){const l=new Fe.Workbook,o=await l.xlsx.load(t),a=l.getWorksheet(h("sys.onlineForm.formStyle"))||l.getWorksheet();if(a)return e.sheetToPaper(a,o)}static async xlsx2jsonWithFields(t,l){var o;const a=new Fe.Workbook,n=await a.xlsx.load(t),r=a.getWorksheet(h("sys.onlineForm.formStyle"))||a.getWorksheet(),i=a.getWorksheet(h("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(Bo(`${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(Bo(`${(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*Bo("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)&&Wo.setTop(o+1,l+1,n),(null==i?void 0:i.bottom)&&Wo.setBottom(o+1,l+1,n),(null==i?void 0:i.left)&&Wo.setLeft(o+1,l+1,n),(null==i?void 0:i.right)&&Wo.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(Bo((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(Bo((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(Bo(l.tl.nativeRowOff/914400+"in")),left:parseInt(Bo(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,{...Se(jo),...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=Ho.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===h("sys.true")?1:0;const n=Go.find(e=>e[1]===l);if(e.type=n?n[0]:a.TEXT,Vo(e.type,Xo))e.tmpOldKey=e.key,e.key=qo(e.type,Xo,[]);else if(Vo(e.type,zo)){e.tmpOldKey=e.key;const l=qo(e.type,zo,t);e.key=l,t.push(l)}e.uniqueConstraint={type:e.uniqueConstraint===h("sys.true")?"GLOBAL":"NONE"},e.disabled=e.disabled===h("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(Bo(t[0])),r=a/parseInt(Bo(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 Jo(){console.log("Hello World!")}var Qo=new URL("./index.min.css",import.meta.url);f.load(Qo.href);export{Ve as AppMqttService,Xe as BasicPage,Qe as BasicPageRender,st as CardViewRender,Tl as CollapseDetail,wt as FieldCheckbox,St as FieldRadio,$l as FieldSearchCascader,Tt as FieldSelect,el as MultiFieldDisplay,io as RichEditor,Ze as Tag,Yo as XlsxParser,Et as fieldReadonly,ft as getDataByModelType,vt as refCardLabelRender,Fo as renderWebSetupApp,Jo as run,rt as selectTag,je as setupPageEvent,nt as taglabel,gt as useGetRefCard,Ue as usePageEvent,mt as useQuickNext,pt as useRefCardData,yt as useSearchEvent};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gct-paas/render-web",
|
|
3
|
-
"version": "0.1.6-dev.
|
|
3
|
+
"version": "0.1.6-dev.37",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "paas 平台网页端底包",
|
|
6
6
|
"loader": "dist/loader.esm.min.js",
|
|
@@ -40,21 +40,21 @@
|
|
|
40
40
|
"lodash-es": "^4.17.23",
|
|
41
41
|
"unit-to-px": "^1.0.5",
|
|
42
42
|
"vue": "^3.5.30",
|
|
43
|
-
"@gct-paas/core": "0.1.6-dev.
|
|
44
|
-
"@gct-paas/core-
|
|
45
|
-
"@gct-paas/render": "0.1.6-dev.
|
|
46
|
-
"@gct-paas/
|
|
47
|
-
"@gct-paas/
|
|
48
|
-
"@gct-paas/scss": "0.1.6-dev.
|
|
43
|
+
"@gct-paas/core": "0.1.6-dev.37",
|
|
44
|
+
"@gct-paas/core-components": "0.1.6-dev.37",
|
|
45
|
+
"@gct-paas/render": "0.1.6-dev.37",
|
|
46
|
+
"@gct-paas/core-web": "0.1.6-dev.37",
|
|
47
|
+
"@gct-paas/schema": "0.1.6-dev.37",
|
|
48
|
+
"@gct-paas/scss": "0.1.6-dev.37"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"@gct-paas/api": "^0.1.6-dev.15",
|
|
52
52
|
"vue": ">=3",
|
|
53
|
-
"@gct-paas/
|
|
54
|
-
"@gct-paas/
|
|
55
|
-
"@gct-paas/
|
|
56
|
-
"@gct-paas/render": "0.1.6-dev.
|
|
57
|
-
"@gct-paas/
|
|
53
|
+
"@gct-paas/schema": "0.1.6-dev.37",
|
|
54
|
+
"@gct-paas/core": "0.1.6-dev.37",
|
|
55
|
+
"@gct-paas/scss": "0.1.6-dev.37",
|
|
56
|
+
"@gct-paas/render": "0.1.6-dev.37",
|
|
57
|
+
"@gct-paas/core-web": "0.1.6-dev.37"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/lodash-es": "^4.17.12"
|