mixapply 1.1.5-4.1 → 1.1.5-4.2
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/mixapply.css +1 -1
- package/mixapply.js +38 -55
- package/mixapply.umd.cjs +1 -1
- package/package.json +1 -1
package/mixapply.umd.cjs
CHANGED
|
@@ -268,7 +268,7 @@ For more detail, please visit: ${a}
|
|
|
268
268
|
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
|
269
269
|
*/const U4e=function(t,e){if(t&&t.addEventListener){const r=function(n){const a=$4e(n);e&&Reflect.apply(e,this,[n,a])};t.addEventListener("wheel",r,{passive:!0})}},j4e={beforeMount(t,e){U4e(t,e.value)}};let H4e=1;const G4e=l.defineComponent({name:"ElTable",directives:{Mousewheel:j4e},components:{TableHeader:b4e,TableBody:L4e,TableFooter:D4e,ElScrollbar:rp,hColgroup:uI},props:N4e,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-contextmenu","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change","scroll"],setup(t){const{t:e}=Q1(),r=Ze("table"),n=l.getCurrentInstance();l.provide(Hn,n);const a=c4e(n,t);n.store=a;const i=new d4e({store:n.store,table:n,fit:t.fit,showHeader:t.showHeader});n.layout=i;const o=l.computed(()=>(a.states.data.value||[]).length===0),{setCurrentRow:s,getSelectionRows:c,toggleRowSelection:u,clearSelection:d,clearFilter:f,toggleAllSelection:p,toggleRowExpansion:h,clearSort:v,sort:m,updateKeyChildren:g}=M4e(a),{isHidden:y,renderExpanded:_,setDragVisible:b,isGroup:C,handleMouseLeave:w,handleHeaderFooterMousewheel:S,tableSize:x,emptyBlockStyle:E,handleFixedMousewheel:L,resizeProxyVisible:T,bodyWidth:k,resizeState:A,doLayout:D,tableBodyStyles:M,tableLayout:O,scrollbarViewStyle:R,scrollbarStyle:P}=O4e(t,i,a,n),{scrollBarRef:B,scrollTo:z,setScrollLeft:$,setScrollTop:j}=R4e(),Z=es(D,50),W=`${r.namespace.value}-table_${H4e++}`;n.tableId=W,n.state={isGroup:C,resizeState:A,doLayout:D,debouncedUpdateLayout:Z};const K=l.computed(()=>{var ae;return(ae=t.sumText)!=null?ae:e("el.table.sumText")}),ee=l.computed(()=>{var ae;return(ae=t.emptyText)!=null?ae:e("el.table.emptyText")}),Q=l.computed(()=>cI(a.states.originColumns.value)[0]);return I4e(n),l.onBeforeUnmount(()=>{Z.cancel()}),{ns:r,layout:i,store:a,columns:Q,handleHeaderFooterMousewheel:S,handleMouseLeave:w,tableId:W,tableSize:x,isHidden:y,isEmpty:o,renderExpanded:_,resizeProxyVisible:T,resizeState:A,isGroup:C,bodyWidth:k,tableBodyStyles:M,emptyBlockStyle:E,debouncedUpdateLayout:Z,handleFixedMousewheel:L,setCurrentRow:s,getSelectionRows:c,toggleRowSelection:u,clearSelection:d,clearFilter:f,toggleAllSelection:p,toggleRowExpansion:h,clearSort:v,doLayout:D,sort:m,updateKeyChildren:g,t:e,setDragVisible:b,context:n,computedSumText:K,computedEmptyText:ee,tableLayout:O,scrollbarViewStyle:R,scrollbarStyle:P,scrollBarRef:B,scrollTo:z,setScrollLeft:$,setScrollTop:j,allowDragLastColumn:t.allowDragLastColumn}}});function W4e(t,e,r,n,a,i){const o=l.resolveComponent("hColgroup"),s=l.resolveComponent("table-header"),c=l.resolveComponent("table-body"),u=l.resolveComponent("table-footer"),d=l.resolveComponent("el-scrollbar"),f=l.resolveDirective("mousewheel");return l.openBlock(),l.createElementBlock("div",{ref:"tableWrapper",class:l.normalizeClass([{[t.ns.m("fit")]:t.fit,[t.ns.m("striped")]:t.stripe,[t.ns.m("border")]:t.border||t.isGroup,[t.ns.m("hidden")]:t.isHidden,[t.ns.m("group")]:t.isGroup,[t.ns.m("fluid-height")]:t.maxHeight,[t.ns.m("scrollable-x")]:t.layout.scrollX.value,[t.ns.m("scrollable-y")]:t.layout.scrollY.value,[t.ns.m("enable-row-hover")]:!t.store.states.isComplex.value,[t.ns.m("enable-row-transition")]:(t.store.states.data.value||[]).length!==0&&(t.store.states.data.value||[]).length<100,"has-footer":t.showSummary},t.ns.m(t.tableSize),t.className,t.ns.b(),t.ns.m(`layout-${t.tableLayout}`)]),style:l.normalizeStyle(t.style),"data-prefix":t.ns.namespace.value,onMouseleave:t.handleMouseLeave},[l.createElementVNode("div",{class:l.normalizeClass(t.ns.e("inner-wrapper"))},[l.createElementVNode("div",{ref:"hiddenColumns",class:"hidden-columns"},[l.renderSlot(t.$slots,"default")],512),t.showHeader&&t.tableLayout==="fixed"?l.withDirectives((l.openBlock(),l.createElementBlock("div",{key:0,ref:"headerWrapper",class:l.normalizeClass(t.ns.e("header-wrapper"))},[l.createElementVNode("table",{ref:"tableHeader",class:l.normalizeClass(t.ns.e("header")),style:l.normalizeStyle(t.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[l.createVNode(o,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),l.createVNode(s,{ref:"tableHeaderRef",border:t.border,"default-sort":t.defaultSort,store:t.store,"append-filter-panel-to":t.appendFilterPanelTo,"allow-drag-last-column":t.allowDragLastColumn,onSetDragVisible:t.setDragVisible},null,8,["border","default-sort","store","append-filter-panel-to","allow-drag-last-column","onSetDragVisible"])],6)],2)),[[f,t.handleHeaderFooterMousewheel]]):l.createCommentVNode("v-if",!0),l.createElementVNode("div",{ref:"bodyWrapper",class:l.normalizeClass(t.ns.e("body-wrapper"))},[l.createVNode(d,{ref:"scrollBarRef","view-style":t.scrollbarViewStyle,"wrap-style":t.scrollbarStyle,always:t.scrollbarAlwaysOn,tabindex:t.scrollbarTabindex,onScroll:p=>t.$emit("scroll",p)},{default:l.withCtx(()=>[l.createElementVNode("table",{ref:"tableBody",class:l.normalizeClass(t.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:l.normalizeStyle({width:t.bodyWidth,tableLayout:t.tableLayout})},[l.createVNode(o,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),t.showHeader&&t.tableLayout==="auto"?(l.openBlock(),l.createBlock(s,{key:0,ref:"tableHeaderRef",class:l.normalizeClass(t.ns.e("body-header")),border:t.border,"default-sort":t.defaultSort,store:t.store,"append-filter-panel-to":t.appendFilterPanelTo,onSetDragVisible:t.setDragVisible},null,8,["class","border","default-sort","store","append-filter-panel-to","onSetDragVisible"])):l.createCommentVNode("v-if",!0),l.createVNode(c,{context:t.context,highlight:t.highlightCurrentRow,"row-class-name":t.rowClassName,"tooltip-effect":t.tooltipEffect,"tooltip-options":t.tooltipOptions,"row-style":t.rowStyle,store:t.store,stripe:t.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"]),t.showSummary&&t.tableLayout==="auto"?(l.openBlock(),l.createBlock(u,{key:1,class:l.normalizeClass(t.ns.e("body-footer")),border:t.border,"default-sort":t.defaultSort,store:t.store,"sum-text":t.computedSumText,"summary-method":t.summaryMethod},null,8,["class","border","default-sort","store","sum-text","summary-method"])):l.createCommentVNode("v-if",!0)],6),t.isEmpty?(l.openBlock(),l.createElementBlock("div",{key:0,ref:"emptyBlock",style:l.normalizeStyle(t.emptyBlockStyle),class:l.normalizeClass(t.ns.e("empty-block"))},[l.createElementVNode("span",{class:l.normalizeClass(t.ns.e("empty-text"))},[l.renderSlot(t.$slots,"empty",{},()=>[l.createTextVNode(l.toDisplayString(t.computedEmptyText),1)])],2)],6)):l.createCommentVNode("v-if",!0),t.$slots.append?(l.openBlock(),l.createElementBlock("div",{key:1,ref:"appendWrapper",class:l.normalizeClass(t.ns.e("append-wrapper"))},[l.renderSlot(t.$slots,"append")],2)):l.createCommentVNode("v-if",!0)]),_:3},8,["view-style","wrap-style","always","tabindex","onScroll"])],2),t.showSummary&&t.tableLayout==="fixed"?l.withDirectives((l.openBlock(),l.createElementBlock("div",{key:1,ref:"footerWrapper",class:l.normalizeClass(t.ns.e("footer-wrapper"))},[l.createElementVNode("table",{class:l.normalizeClass(t.ns.e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:l.normalizeStyle(t.tableBodyStyles)},[l.createVNode(o,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),l.createVNode(u,{border:t.border,"default-sort":t.defaultSort,store:t.store,"sum-text":t.computedSumText,"summary-method":t.summaryMethod},null,8,["border","default-sort","store","sum-text","summary-method"])],6)],2)),[[l.vShow,!t.isEmpty],[f,t.handleHeaderFooterMousewheel]]):l.createCommentVNode("v-if",!0),t.border||t.isGroup?(l.openBlock(),l.createElementBlock("div",{key:2,class:l.normalizeClass(t.ns.e("border-left-patch"))},null,2)):l.createCommentVNode("v-if",!0)],2),l.withDirectives(l.createElementVNode("div",{ref:"resizeProxy",class:l.normalizeClass(t.ns.e("column-resize-proxy"))},null,2),[[l.vShow,t.resizeProxyVisible]])],46,["data-prefix","onMouseleave"])}var Y4e=ut(G4e,[["render",W4e],["__file","table.vue"]]);const Z4e={selection:"table-column--selection",expand:"table__expand-column"},K4e={default:{order:""},selection:{width:48,minWidth:48,realWidth:48,order:""},expand:{width:48,minWidth:48,realWidth:48,order:""},index:{width:48,minWidth:48,realWidth:48,order:""}},q4e=t=>Z4e[t]||"",X4e={selection:{renderHeader({store:t,column:e}){function r(){return t.states.data.value&&t.states.data.value.length===0}return l.h(I2,{disabled:r(),size:t.states.tableSize.value,indeterminate:t.states.selection.value.length>0&&!t.states.isAllSelected.value,"onUpdate:modelValue":t.toggleAllSelection,modelValue:t.states.isAllSelected.value,ariaLabel:e.label})},renderCell({row:t,column:e,store:r,$index:n}){return l.h(I2,{disabled:e.selectable?!e.selectable.call(null,t,n):!1,size:r.states.tableSize.value,onChange:()=>{r.commit("rowSelectedChanged",t)},onClick:a=>a.stopPropagation(),modelValue:r.isSelected(t),ariaLabel:e.label})},sortable:!1,resizable:!1},index:{renderHeader({column:t}){return t.label||"#"},renderCell({column:t,$index:e}){let r=e+1;const n=t.index;return yt(n)?r=e+n:Bt(n)&&(r=n(e)),l.h("div",{},[r])},sortable:!1},expand:{renderHeader({column:t}){return t.label||""},renderCell({row:t,store:e,expanded:r}){const{ns:n}=e,a=[n.e("expand-icon")];r&&a.push(n.em("expand-icon","expanded"));const i=function(o){o.stopPropagation(),e.toggleRowExpansion(t)};return l.h("div",{class:a,onClick:i},{default:()=>[l.h(e1,null,{default:()=>[l.h(U8)]})]})},sortable:!1,resizable:!1}};function J4e({row:t,column:e,$index:r}){var n;const a=e.property,i=a&&oM(t,a).value;return e&&e.formatter?e.formatter(t,e,i,r):((n=i==null?void 0:i.toString)==null?void 0:n.call(i))||""}function Q4e({row:t,treeNode:e,store:r},n=!1){const{ns:a}=r;if(!e)return n?[l.h("span",{class:a.e("placeholder")})]:null;const i=[],o=function(s){s.stopPropagation(),!e.loading&&r.loadOrToggle(t)};if(e.indent&&i.push(l.h("span",{class:a.e("indent"),style:{"padding-left":`${e.indent}px`}})),N1(e.expanded)&&!e.noLazyChildren){const s=[a.e("expand-icon"),e.expanded?a.em("expand-icon","expanded"):""];let c=U8;e.loading&&(c=H8),i.push(l.h("div",{class:s,onClick:o},{default:()=>[l.h(e1,{class:{[a.is("loading")]:e.loading}},{default:()=>[l.h(c)]})]}))}else i.push(l.h("span",{class:a.e("placeholder")}));return i}function CI(t,e){return t.reduce((r,n)=>(r[n]=n,r),e)}function e9e(t,e){const r=l.getCurrentInstance();return{registerComplexWatchers:()=>{const i=["fixed"],o={realWidth:"width",realMinWidth:"minWidth"},s=CI(i,o);Object.keys(s).forEach(c=>{const u=o[c];wa(e,u)&&l.watch(()=>e[u],d=>{let f=d;u==="width"&&c==="realWidth"&&(f=Op(d)),u==="minWidth"&&c==="realMinWidth"&&(f=tI(d)),r.columnConfig.value[u]=f,r.columnConfig.value[c]=f;const p=u==="fixed";t.value.store.scheduleLayout(p)})})},registerNormalWatchers:()=>{const i=["label","filters","filterMultiple","filteredValue","sortable","index","formatter","className","labelClassName","filterClassName","showOverflowTooltip","tooltipFormatter"],o={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},s=CI(i,o);Object.keys(s).forEach(c=>{const u=o[c];wa(e,u)&&l.watch(()=>e[u],d=>{r.columnConfig.value[c]=d})})}}}function t9e(t,e,r){const n=l.getCurrentInstance(),a=l.ref(""),i=l.ref(!1),o=l.ref(),s=l.ref(),c=Ze("table");l.watchEffect(()=>{o.value=t.align?`is-${t.align}`:null,o.value}),l.watchEffect(()=>{s.value=t.headerAlign?`is-${t.headerAlign}`:o.value,s.value});const u=l.computed(()=>{let C=n.vnode.vParent||n.parent;for(;C&&!C.tableId&&!C.columnId;)C=C.vnode.vParent||C.parent;return C}),d=l.computed(()=>{const{store:C}=n.parent;if(!C)return!1;const{treeData:w}=C.states,S=w.value;return S&&Object.keys(S).length>0}),f=l.ref(Op(t.width)),p=l.ref(tI(t.minWidth)),h=C=>(f.value&&(C.width=f.value),p.value&&(C.minWidth=p.value),!f.value&&p.value&&(C.width=void 0),C.minWidth||(C.minWidth=80),C.realWidth=Number(c1(C.width)?C.minWidth:C.width),C),v=C=>{const w=C.type,S=X4e[w]||{};Object.keys(S).forEach(E=>{const L=S[E];E!=="className"&&!c1(L)&&(C[E]=L)});const x=q4e(w);if(x){const E=`${l.unref(c.namespace)}-${x}`;C.className=C.className?`${C.className} ${E}`:E}return C},m=C=>{Pt(C)?C.forEach(S=>w(S)):w(C);function w(S){var x;((x=S==null?void 0:S.type)==null?void 0:x.name)==="ElTableColumn"&&(S.vParent=n)}};return{columnId:a,realAlign:o,isSubColumn:i,realHeaderAlign:s,columnOrTableParent:u,setColumnWidth:h,setColumnForcedProps:v,setColumnRenders:C=>{t.renderHeader?Jt("TableColumn","Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header."):C.type!=="selection"&&(C.renderHeader=S=>(n.columnConfig.value.label,l.renderSlot(e,"header",S,()=>[C.label]))),e["filter-icon"]&&(C.renderFilterIcon=S=>l.renderSlot(e,"filter-icon",S));let w=C.renderCell;return C.type==="expand"?(C.renderCell=S=>l.h("div",{class:"cell"},[w(S)]),r.value.renderExpanded=S=>e.default?e.default(S):e.default):(w=w||J4e,C.renderCell=S=>{let x=null;if(e.default){const D=e.default(S);x=D.some(M=>M.type!==l.Comment)?D:w(S)}else x=w(S);const{columns:E}=r.value.store.states,L=E.value.findIndex(D=>D.type==="default"),T=d.value&&S.cellIndex===L,k=Q4e(S,T),A={class:"cell",style:{}};return C.showOverflowTooltip&&(A.class=`${A.class} ${l.unref(c.namespace)}-tooltip`,A.style={width:`${(S.column.realWidth||Number(S.column.width))-1}px`}),m(x),l.h("div",A,[k,x])}),C},getPropsData:(...C)=>C.reduce((w,S)=>(Pt(S)&&S.forEach(x=>{w[x]=t[x]}),w),{}),getColumnElIndex:(C,w)=>Array.prototype.indexOf.call(C,w),updateColumnOrder:()=>{r.value.store.commit("updateColumnOrder",n.columnConfig.value)}}}var r9e={type:{type:String,default:"default"},label:String,className:String,labelClassName:String,property:String,prop:String,width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},renderHeader:Function,sortable:{type:[Boolean,String],default:!1},sortMethod:Function,sortBy:[String,Function,Array],resizable:{type:Boolean,default:!0},columnKey:String,align:String,headerAlign:String,showOverflowTooltip:{type:[Boolean,Object],default:void 0},tooltipFormatter:Function,fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},filterClassName:String,index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:t=>t.every(e=>["ascending","descending",null].includes(e))}};let n9e=1;var wI=l.defineComponent({name:"ElTableColumn",components:{ElCheckbox:I2},props:r9e,setup(t,{slots:e}){const r=l.getCurrentInstance(),n=l.ref({}),a=l.computed(()=>{let b=r.parent;for(;b&&!b.tableId;)b=b.parent;return b}),{registerNormalWatchers:i,registerComplexWatchers:o}=e9e(a,t),{columnId:s,isSubColumn:c,realHeaderAlign:u,columnOrTableParent:d,setColumnWidth:f,setColumnForcedProps:p,setColumnRenders:h,getPropsData:v,getColumnElIndex:m,realAlign:g,updateColumnOrder:y}=t9e(t,e,a),_=d.value;s.value=`${_.tableId||_.columnId}_column_${n9e++}`,l.onBeforeMount(()=>{c.value=a.value!==_;const b=t.type||"default",C=t.sortable===""?!0:t.sortable,w=c1(t.showOverflowTooltip)?_.props.showOverflowTooltip:t.showOverflowTooltip,S=c1(t.tooltipFormatter)?_.props.tooltipFormatter:t.tooltipFormatter,x={...K4e[b],id:s.value,type:b,property:t.prop||t.property,align:g,headerAlign:u,showOverflowTooltip:w,tooltipFormatter:S,filterable:t.filters||t.filterMethod,filteredValue:[],filterPlacement:"",filterClassName:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:C,index:t.index,rawColumnKey:r.vnode.key};let A=v(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);A=X3e(x,A),A=Q3e(h,f,p)(A),n.value=A,i(),o()}),l.onMounted(()=>{var b;const C=d.value,w=c.value?C.vnode.el.children:(b=C.refs.hiddenColumns)==null?void 0:b.children,S=()=>m(w||[],r.vnode.el);n.value.getColumnIndex=S,S()>-1&&a.value.store.commit("insertColumn",n.value,c.value?C.columnConfig.value:null,y)}),l.onBeforeUnmount(()=>{const b=n.value.getColumnIndex;(b?b():-1)>-1&&a.value.store.commit("removeColumn",n.value,c.value?_.columnConfig.value:null,y)}),r.columnId=s.value,r.columnConfig=n},render(){var t,e,r;try{const n=(e=(t=this.$slots).default)==null?void 0:e.call(t,{row:{},column:{},$index:-1}),a=[];if(Pt(n))for(const o of n)((r=o.type)==null?void 0:r.name)==="ElTableColumn"||o.shapeFlag&2?a.push(o):o.type===l.Fragment&&Pt(o.children)&&o.children.forEach(s=>{(s==null?void 0:s.patchFlag)!==1024&&!Gt(s==null?void 0:s.children)&&a.push(s)});return l.h("div",a)}catch{return l.h("div",[])}}});const a9e=b1(Y4e,{TableColumn:wI}),i9e=si(wI),gs="$treeNodeId",xI=function(t,e){!e||e[gs]||Object.defineProperty(e,gs,{value:t.id,enumerable:!1,configurable:!1,writable:!1})},Yp=(t,e)=>e==null?void 0:e[t||gs],Zp=(t,e,r)=>{const n=t.value.currentNode;r();const a=t.value.currentNode;n!==a&&e("current-change",a?a.data:null,a)},Kp=t=>{let e=!0,r=!0,n=!0;for(let a=0,i=t.length;a<i;a++){const o=t[a];(o.checked!==!0||o.indeterminate)&&(e=!1,o.disabled||(n=!1)),(o.checked!==!1||o.indeterminate)&&(r=!1)}return{all:e,none:r,allWithoutDisable:n,half:!e&&!r}},j3=function(t){if(t.childNodes.length===0||t.loading)return;const{all:e,none:r,half:n}=Kp(t.childNodes);e?(t.checked=!0,t.indeterminate=!1):n?(t.checked=!1,t.indeterminate=!0):r&&(t.checked=!1,t.indeterminate=!1);const a=t.parent;!a||a.level===0||t.store.checkStrictly||j3(a)},u6=function(t,e){const r=t.store.props,n=t.data||{},a=r[e];if(Bt(a))return a(n,t);if(Gt(a))return n[a];if(c1(a)){const i=n[e];return i===void 0?"":i}};let o9e=0;class R2{constructor(e){this.id=o9e++,this.text=null,this.checked=!1,this.indeterminate=!1,this.data=null,this.expanded=!1,this.parent=null,this.visible=!0,this.isCurrent=!1,this.canFocus=!1;for(const r in e)wa(e,r)&&(this[r]=e[r]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1)}initialize(){const e=this.store;if(!e)throw new Error("[Node]store is required!");e.registerNode(this);const r=e.props;if(r&&typeof r.isLeaf<"u"){const i=u6(this,"isLeaf");N1(i)&&(this.isLeafByUser=i)}if(e.lazy!==!0&&this.data?(this.setData(this.data),e.defaultExpandAll&&(this.expanded=!0,this.canFocus=!0)):this.level>0&&e.lazy&&e.defaultExpandAll&&!this.isLeafByUser&&this.expand(),Pt(this.data)||xI(this,this.data),!this.data)return;const n=e.defaultExpandedKeys,a=e.key;a&&n&&n.includes(this.key)&&this.expand(null,e.autoExpandParent),a&&e.currentNodeKey!==void 0&&this.key===e.currentNodeKey&&(e.currentNode=this,e.currentNode.isCurrent=!0),e.lazy&&e._initDefaultCheckedNode(this),this.updateLeafState(),this.parent&&(this.level===1||this.parent.expanded===!0)&&(this.canFocus=!0)}setData(e){Pt(e)||xI(this,e),this.data=e,this.childNodes=[];let r;this.level===0&&Pt(this.data)?r=this.data:r=u6(this,"children")||[];for(let n=0,a=r.length;n<a;n++)this.insertChild({data:r[n]})}get label(){return u6(this,"label")}get key(){const e=this.store.key;return this.data?this.data[e]:null}get disabled(){return u6(this,"disabled")}get nextSibling(){const e=this.parent;if(e){const r=e.childNodes.indexOf(this);if(r>-1)return e.childNodes[r+1]}return null}get previousSibling(){const e=this.parent;if(e){const r=e.childNodes.indexOf(this);if(r>-1)return r>0?e.childNodes[r-1]:null}return null}contains(e,r=!0){return(this.childNodes||[]).some(n=>n===e||r&&n.contains(e))}remove(){const e=this.parent;e&&e.removeChild(this)}insertChild(e,r,n){if(!e)throw new Error("InsertChild error: child is required.");if(!(e instanceof R2)){if(!n){const a=this.getChildren(!0);a.includes(e.data)||(c1(r)||r<0?a.push(e.data):a.splice(r,0,e.data))}Object.assign(e,{parent:this,store:this.store}),e=l.reactive(new R2(e)),e instanceof R2&&e.initialize()}e.level=this.level+1,c1(r)||r<0?this.childNodes.push(e):this.childNodes.splice(r,0,e),this.updateLeafState()}insertBefore(e,r){let n;r&&(n=this.childNodes.indexOf(r)),this.insertChild(e,n)}insertAfter(e,r){let n;r&&(n=this.childNodes.indexOf(r),n!==-1&&(n+=1)),this.insertChild(e,n)}removeChild(e){const r=this.getChildren()||[],n=r.indexOf(e.data);n>-1&&r.splice(n,1);const a=this.childNodes.indexOf(e);a>-1&&(this.store&&this.store.deregisterNode(e),e.parent=null,this.childNodes.splice(a,1)),this.updateLeafState()}removeChildByData(e){let r=null;for(let n=0;n<this.childNodes.length;n++)if(this.childNodes[n].data===e){r=this.childNodes[n];break}r&&this.removeChild(r)}expand(e,r){const n=()=>{if(r){let a=this.parent;for(;a.level>0;)a.expanded=!0,a=a.parent}this.expanded=!0,e&&e(),this.childNodes.forEach(a=>{a.canFocus=!0})};this.shouldLoadData()?this.loadData(a=>{Pt(a)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||j3(this),n())}):n()}doCreateChildren(e,r={}){e.forEach(n=>{this.insertChild(Object.assign({data:n},r),void 0,!0)})}collapse(){this.expanded=!1,this.childNodes.forEach(e=>{e.canFocus=!1})}shouldLoadData(){return this.store.lazy===!0&&this.store.load&&!this.loaded}updateLeafState(){if(this.store.lazy===!0&&this.loaded!==!0&&typeof this.isLeafByUser<"u"){this.isLeaf=this.isLeafByUser;return}const e=this.childNodes;if(!this.store.lazy||this.store.lazy===!0&&this.loaded===!0){this.isLeaf=!e||e.length===0;return}this.isLeaf=!1}setChecked(e,r,n,a){if(this.indeterminate=e==="half",this.checked=e===!0,this.store.checkStrictly)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const{all:o,allWithoutDisable:s}=Kp(this.childNodes);!this.isLeaf&&!o&&s&&(this.checked=!1,e=!1);const c=()=>{if(r){const u=this.childNodes;for(let p=0,h=u.length;p<h;p++){const v=u[p];a=a||e!==!1;const m=v.disabled?v.checked:a;v.setChecked(m,r,!0,a)}const{half:d,all:f}=Kp(u);f||(this.checked=f,this.indeterminate=d)}};if(this.shouldLoadData()){this.loadData(()=>{c(),j3(this)},{checked:e!==!1});return}else c()}const i=this.parent;!i||i.level===0||n||j3(i)}getChildren(e=!1){if(this.level===0)return this.data;const r=this.data;if(!r)return null;const n=this.store.props;let a="children";return n&&(a=n.children||"children"),r[a]===void 0&&(r[a]=null),e&&!r[a]&&(r[a]=[]),r[a]}updateChildren(){const e=this.getChildren()||[],r=this.childNodes.map(i=>i.data),n={},a=[];e.forEach((i,o)=>{const s=i[gs];!!s&&r.findIndex(u=>u[gs]===s)>=0?n[s]={index:o,data:i}:a.push({index:o,data:i})}),this.store.lazy||r.forEach(i=>{n[i[gs]]||this.removeChildByData(i)}),a.forEach(({index:i,data:o})=>{this.insertChild({data:o},i)}),this.updateLeafState()}loadData(e,r={}){if(this.store.lazy===!0&&this.store.load&&!this.loaded&&(!this.loading||Object.keys(r).length)){this.loading=!0;const n=i=>{this.childNodes=[],this.doCreateChildren(i,r),this.loaded=!0,this.loading=!1,this.updateLeafState(),e&&e.call(this,i)},a=()=>{this.loading=!1};this.store.load(this,n,a)}else e&&e.call(this)}eachNode(e){const r=[this];for(;r.length;){const n=r.shift();r.unshift(...n.childNodes),e(n)}}reInitChecked(){this.store.checkStrictly||j3(this)}}class s9e{constructor(e){this.currentNode=null,this.currentNodeKey=null;for(const r in e)wa(e,r)&&(this[r]=e[r]);this.nodesMap={}}initialize(){if(this.root=new R2({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const e=this.load;e(this.root,r=>{this.root.doCreateChildren(r),this._initDefaultCheckedNodes()})}else this._initDefaultCheckedNodes()}filter(e){const r=this.filterNodeMethod,n=this.lazy,a=async function(i){const o=i.root?i.root.childNodes:i.childNodes;for(const[s,c]of o.entries())c.visible=r.call(c,e,c.data,c),s%80===0&&s>0&&await l.nextTick(),a(c);if(!i.visible&&o.length){let s=!0;s=!o.some(c=>c.visible),i.root?i.root.visible=s===!1:i.visible=s===!1}e&&i.visible&&!i.isLeaf&&(!n||i.loaded)&&i.expand()};a(this)}setData(e){e!==this.root.data?(this.nodesMap={},this.root.setData(e),this._initDefaultCheckedNodes(),this.setCurrentNodeKey(this.currentNodeKey)):this.root.updateChildren()}getNode(e){if(e instanceof R2)return e;const r=I1(e)?Yp(this.key,e):e;return this.nodesMap[r]||null}insertBefore(e,r){const n=this.getNode(r);n.parent.insertBefore({data:e},n)}insertAfter(e,r){const n=this.getNode(r);n.parent.insertAfter({data:e},n)}remove(e){const r=this.getNode(e);r&&r.parent&&(r===this.currentNode&&(this.currentNode=null),r.parent.removeChild(r))}append(e,r){const n=La(r)?this.root:this.getNode(r);n&&n.insertChild({data:e})}_initDefaultCheckedNodes(){const e=this.defaultCheckedKeys||[],r=this.nodesMap;e.forEach(n=>{const a=r[n];a&&a.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(e){(this.defaultCheckedKeys||[]).includes(e.key)&&e.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(e){e!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=e,this._initDefaultCheckedNodes())}registerNode(e){const r=this.key;!e||!e.data||(r?e.key!==void 0&&(this.nodesMap[e.key]=e):this.nodesMap[e.id]=e)}deregisterNode(e){!this.key||!e||!e.data||(e.childNodes.forEach(n=>{this.deregisterNode(n)}),delete this.nodesMap[e.key])}getCheckedNodes(e=!1,r=!1){const n=[],a=function(i){(i.root?i.root.childNodes:i.childNodes).forEach(s=>{(s.checked||r&&s.indeterminate)&&(!e||e&&s.isLeaf)&&n.push(s.data),a(s)})};return a(this),n}getCheckedKeys(e=!1){return this.getCheckedNodes(e).map(r=>(r||{})[this.key])}getHalfCheckedNodes(){const e=[],r=function(n){(n.root?n.root.childNodes:n.childNodes).forEach(i=>{i.indeterminate&&e.push(i.data),r(i)})};return r(this),e}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(e=>(e||{})[this.key])}_getAllNodes(){const e=[],r=this.nodesMap;for(const n in r)wa(r,n)&&e.push(r[n]);return e}updateChildren(e,r){const n=this.nodesMap[e];if(!n)return;const a=n.childNodes;for(let i=a.length-1;i>=0;i--){const o=a[i];this.remove(o.data)}for(let i=0,o=r.length;i<o;i++){const s=r[i];this.append(s,n.data)}}_setCheckedKeys(e,r=!1,n){const a=this._getAllNodes().sort((c,u)=>c.level-u.level),i=Object.create(null),o=Object.keys(n);a.forEach(c=>c.setChecked(!1,!1));const s=c=>{c.childNodes.forEach(u=>{var d;i[u.data[e]]=!0,(d=u.childNodes)!=null&&d.length&&s(u)})};for(let c=0,u=a.length;c<u;c++){const d=a[c],f=d.data[e].toString();if(!o.includes(f)){d.checked&&!i[f]&&d.setChecked(!1,!1);continue}if(d.childNodes.length&&s(d),d.isLeaf||this.checkStrictly){d.setChecked(!0,!1);continue}if(d.setChecked(!0,!0),r){d.setChecked(!1,!1);const h=function(v){v.childNodes.forEach(g=>{g.isLeaf||g.setChecked(!1,!1),h(g)})};h(d)}}}setCheckedNodes(e,r=!1){const n=this.key,a={};e.forEach(i=>{a[(i||{})[n]]=!0}),this._setCheckedKeys(n,r,a)}setCheckedKeys(e,r=!1){this.defaultCheckedKeys=e;const n=this.key,a={};e.forEach(i=>{a[i]=!0}),this._setCheckedKeys(n,r,a)}setDefaultExpandedKeys(e){e=e||[],this.defaultExpandedKeys=e,e.forEach(r=>{const n=this.getNode(r);n&&n.expand(null,this.autoExpandParent)})}setChecked(e,r,n){const a=this.getNode(e);a&&a.setChecked(!!r,n)}getCurrentNode(){return this.currentNode}setCurrentNode(e){const r=this.currentNode;r&&(r.isCurrent=!1),this.currentNode=e,this.currentNode.isCurrent=!0}setUserCurrentNode(e,r=!0){const n=e[this.key],a=this.nodesMap[n];this.setCurrentNode(a),r&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0)}setCurrentNodeKey(e,r=!0){if(this.currentNodeKey=e,e==null){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const n=this.getNode(e);n&&(this.setCurrentNode(n),r&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0))}}const l9e=l.defineComponent({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(t){const e=Ze("tree"),r=l.inject("NodeInstance"),n=l.inject("RootTree");return()=>{const a=t.node,{data:i,store:o}=a;return t.renderContent?t.renderContent(l.h,{_self:r,node:a,data:i,store:o}):l.renderSlot(n.ctx.slots,"default",{node:a,data:i},()=>[l.h("span",{class:e.be("node","label")},[a.label])])}}});var c9e=ut(l9e,[["__file","tree-node-content.vue"]]);function EI(t){const e=l.inject("TreeNodeMap",null),r={treeNodeExpand:n=>{t.node!==n&&t.node.collapse()},children:[]};return e&&e.children.push(r),l.provide("TreeNodeMap",r),{broadcastExpanded:n=>{if(t.accordion)for(const a of r.children)a.treeNodeExpand(n)}}}const TI=Symbol("dragEvents");function u9e({props:t,ctx:e,el$:r,dropIndicator$:n,store:a}){const i=Ze("tree"),o=l.ref({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null}),s=({event:d,treeNode:f})=>{if(Bt(t.allowDrag)&&!t.allowDrag(f.node))return d.preventDefault(),!1;d.dataTransfer.effectAllowed="move";try{d.dataTransfer.setData("text/plain","")}catch{}o.value.draggingNode=f,e.emit("node-drag-start",f.node,d)},c=({event:d,treeNode:f})=>{const p=f,h=o.value.dropNode;h&&h.node.id!==p.node.id&&ii(h.$el,i.is("drop-inner"));const v=o.value.draggingNode;if(!v||!p)return;let m=!0,g=!0,y=!0,_=!0;Bt(t.allowDrop)&&(m=t.allowDrop(v.node,p.node,"prev"),_=g=t.allowDrop(v.node,p.node,"inner"),y=t.allowDrop(v.node,p.node,"next")),d.dataTransfer.dropEffect=g||m||y?"move":"none",(m||g||y)&&(h==null?void 0:h.node.id)!==p.node.id&&(h&&e.emit("node-drag-leave",v.node,h.node,d),e.emit("node-drag-enter",v.node,p.node,d)),m||g||y?o.value.dropNode=p:o.value.dropNode=null,p.node.nextSibling===v.node&&(y=!1),p.node.previousSibling===v.node&&(m=!1),p.node.contains(v.node,!1)&&(g=!1),(v.node===p.node||v.node.contains(p.node))&&(m=!1,g=!1,y=!1);const b=p.$el.querySelector(`.${i.be("node","content")}`).getBoundingClientRect(),C=r.value.getBoundingClientRect();let w;const S=m?g?.25:y?.45:1:-1,x=y?g?.75:m?.55:0:1;let E=-9999;const L=d.clientY-b.top;L<b.height*S?w="before":L>b.height*x?w="after":g?w="inner":w="none";const T=p.$el.querySelector(`.${i.be("node","expand-icon")}`).getBoundingClientRect(),k=n.value;w==="before"?E=T.top-C.top:w==="after"&&(E=T.bottom-C.top),k.style.top=`${E}px`,k.style.left=`${T.right-C.left}px`,w==="inner"?ts(p.$el,i.is("drop-inner")):ii(p.$el,i.is("drop-inner")),o.value.showDropIndicator=w==="before"||w==="after",o.value.allowDrop=o.value.showDropIndicator||_,o.value.dropType=w,e.emit("node-drag-over",v.node,p.node,d)},u=d=>{const{draggingNode:f,dropType:p,dropNode:h}=o.value;if(d.preventDefault(),d.dataTransfer&&(d.dataTransfer.dropEffect="move"),f&&h){const v={data:f.node.data};p!=="none"&&f.node.remove(),p==="before"?h.node.parent.insertBefore(v,h.node):p==="after"?h.node.parent.insertAfter(v,h.node):p==="inner"&&h.node.insertChild(v),p!=="none"&&(a.value.registerNode(v),a.value.key&&f.node.eachNode(m=>{var g;(g=a.value.nodesMap[m.data[a.value.key]])==null||g.setChecked(m.checked,!a.value.checkStrictly)})),ii(h.$el,i.is("drop-inner")),e.emit("node-drag-end",f.node,h.node,p,d),p!=="none"&&e.emit("node-drop",f.node,h.node,p,d)}f&&!h&&e.emit("node-drag-end",f.node,null,p,d),o.value.showDropIndicator=!1,o.value.draggingNode=null,o.value.dropNode=null,o.value.allowDrop=!0};return l.provide(TI,{treeNodeDragStart:s,treeNodeDragOver:c,treeNodeDragEnd:u}),{dragState:o}}const d9e=l.defineComponent({name:"ElTreeNode",components:{ElCollapseTransition:_le,ElCheckbox:I2,NodeContent:c9e,ElIcon:e1,Loading:H8},props:{node:{type:R2,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:{type:Boolean,default:!1}},emits:["node-expand"],setup(t,e){const r=Ze("tree"),{broadcastExpanded:n}=EI(t),a=l.inject("RootTree"),i=l.ref(!1),o=l.ref(!1),s=l.ref(),c=l.ref(),u=l.ref(),d=l.inject(TI),f=l.getCurrentInstance();l.provide("NodeInstance",f),a||Jt("Tree","Can not find node's tree."),t.node.expanded&&(i.value=!0,o.value=!0);const p=a.props.props.children||"children";l.watch(()=>{var L;const T=(L=t.node.data)==null?void 0:L[p];return T&&[...T]},()=>{t.node.updateChildren()}),l.watch(()=>t.node.indeterminate,L=>{m(t.node.checked,L)}),l.watch(()=>t.node.checked,L=>{m(L,t.node.indeterminate)}),l.watch(()=>t.node.childNodes.length,()=>t.node.reInitChecked()),l.watch(()=>t.node.expanded,L=>{l.nextTick(()=>i.value=L),L&&(o.value=!0)});const h=L=>Yp(a.props.nodeKey,L.data),v=L=>{const T=t.props.class;if(!T)return{};let k;if(Bt(T)){const{data:A}=L;k=T(A,L)}else k=T;return Gt(k)?{[k]:!0}:k},m=(L,T)=>{(s.value!==L||c.value!==T)&&a.ctx.emit("check-change",t.node.data,L,T),s.value=L,c.value=T},g=L=>{Zp(a.store,a.ctx.emit,()=>{var T;if((T=a==null?void 0:a.props)==null?void 0:T.nodeKey){const A=h(t.node);a.store.value.setCurrentNodeKey(A)}else a.store.value.setCurrentNode(t.node)}),a.currentNode.value=t.node,a.props.expandOnClickNode&&_(),(a.props.checkOnClickNode||t.node.isLeaf&&a.props.checkOnClickLeaf)&&!t.node.disabled&&b(!t.node.checked),a.ctx.emit("node-click",t.node.data,t.node,f,L)},y=L=>{var T;(T=a.instance.vnode.props)!=null&&T.onNodeContextmenu&&(L.stopPropagation(),L.preventDefault()),a.ctx.emit("node-contextmenu",L,t.node.data,t.node,f)},_=()=>{t.node.isLeaf||(i.value?(a.ctx.emit("node-collapse",t.node.data,t.node,f),t.node.collapse()):t.node.expand(()=>{e.emit("node-expand",t.node.data,t.node,f)}))},b=L=>{t.node.setChecked(L,!(a!=null&&a.props.checkStrictly)),l.nextTick(()=>{const T=a.store.value;a.ctx.emit("check",t.node.data,{checkedNodes:T.getCheckedNodes(),checkedKeys:T.getCheckedKeys(),halfCheckedNodes:T.getHalfCheckedNodes(),halfCheckedKeys:T.getHalfCheckedKeys()})})};return{ns:r,node$:u,tree:a,expanded:i,childNodeRendered:o,oldChecked:s,oldIndeterminate:c,getNodeKey:h,getNodeClass:v,handleSelectChange:m,handleClick:g,handleContextMenu:y,handleExpandIconClick:_,handleCheckChange:b,handleChildNodeExpand:(L,T,k)=>{n(T),a.ctx.emit("node-expand",L,T,k)},handleDragStart:L=>{a.props.draggable&&d.treeNodeDragStart({event:L,treeNode:t})},handleDragOver:L=>{L.preventDefault(),a.props.draggable&&d.treeNodeDragOver({event:L,treeNode:{$el:u.value,node:t.node}})},handleDrop:L=>{L.preventDefault()},handleDragEnd:L=>{a.props.draggable&&d.treeNodeDragEnd(L)},CaretRight:kie}}});function f9e(t,e,r,n,a,i){const o=l.resolveComponent("el-icon"),s=l.resolveComponent("el-checkbox"),c=l.resolveComponent("loading"),u=l.resolveComponent("node-content"),d=l.resolveComponent("el-tree-node"),f=l.resolveComponent("el-collapse-transition");return l.withDirectives((l.openBlock(),l.createElementBlock("div",{ref:"node$",class:l.normalizeClass([t.ns.b("node"),t.ns.is("expanded",t.expanded),t.ns.is("current",t.node.isCurrent),t.ns.is("hidden",!t.node.visible),t.ns.is("focusable",!t.node.disabled),t.ns.is("checked",!t.node.disabled&&t.node.checked),t.getNodeClass(t.node)]),role:"treeitem",tabindex:"-1","aria-expanded":t.expanded,"aria-disabled":t.node.disabled,"aria-checked":t.node.checked,draggable:t.tree.props.draggable,"data-key":t.getNodeKey(t.node),onClick:l.withModifiers(t.handleClick,["stop"]),onContextmenu:t.handleContextMenu,onDragstart:l.withModifiers(t.handleDragStart,["stop"]),onDragover:l.withModifiers(t.handleDragOver,["stop"]),onDragend:l.withModifiers(t.handleDragEnd,["stop"]),onDrop:l.withModifiers(t.handleDrop,["stop"])},[l.createElementVNode("div",{class:l.normalizeClass(t.ns.be("node","content")),style:l.normalizeStyle({paddingLeft:(t.node.level-1)*t.tree.props.indent+"px"})},[t.tree.props.icon||t.CaretRight?(l.openBlock(),l.createBlock(o,{key:0,class:l.normalizeClass([t.ns.be("node","expand-icon"),t.ns.is("leaf",t.node.isLeaf),{expanded:!t.node.isLeaf&&t.expanded}]),onClick:l.withModifiers(t.handleExpandIconClick,["stop"])},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(t.tree.props.icon||t.CaretRight)))]),_:1},8,["class","onClick"])):l.createCommentVNode("v-if",!0),t.showCheckbox?(l.openBlock(),l.createBlock(s,{key:1,"model-value":t.node.checked,indeterminate:t.node.indeterminate,disabled:!!t.node.disabled,onClick:l.withModifiers(()=>{},["stop"]),onChange:t.handleCheckChange},null,8,["model-value","indeterminate","disabled","onClick","onChange"])):l.createCommentVNode("v-if",!0),t.node.loading?(l.openBlock(),l.createBlock(o,{key:2,class:l.normalizeClass([t.ns.be("node","loading-icon"),t.ns.is("loading")])},{default:l.withCtx(()=>[l.createVNode(c)]),_:1},8,["class"])):l.createCommentVNode("v-if",!0),l.createVNode(u,{node:t.node,"render-content":t.renderContent},null,8,["node","render-content"])],6),l.createVNode(f,null,{default:l.withCtx(()=>[!t.renderAfterExpand||t.childNodeRendered?l.withDirectives((l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(t.ns.be("node","children")),role:"group","aria-expanded":t.expanded},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.node.childNodes,p=>(l.openBlock(),l.createBlock(d,{key:t.getNodeKey(p),"render-content":t.renderContent,"render-after-expand":t.renderAfterExpand,"show-checkbox":t.showCheckbox,node:p,accordion:t.accordion,props:t.props,onNodeExpand:t.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,["aria-expanded"])),[[l.vShow,t.expanded]]):l.createCommentVNode("v-if",!0)]),_:1})],42,["aria-expanded","aria-disabled","aria-checked","draggable","data-key","onClick","onContextmenu","onDragstart","onDragover","onDragend","onDrop"])),[[l.vShow,t.node.visible]])}var h9e=ut(d9e,[["render",f9e],["__file","tree-node.vue"]]);function p9e({el$:t},e){const r=Ze("tree"),n=l.shallowRef([]),a=l.shallowRef([]);l.onMounted(()=>{o()}),l.onUpdated(()=>{n.value=Array.from(t.value.querySelectorAll("[role=treeitem]")),a.value=Array.from(t.value.querySelectorAll("input[type=checkbox]"))}),l.watch(a,s=>{s.forEach(c=>{c.setAttribute("tabindex","-1")})}),dr(t,"keydown",s=>{const c=s.target;if(!c.className.includes(r.b("node")))return;const u=s.code;n.value=Array.from(t.value.querySelectorAll(`.${r.is("focusable")}[role=treeitem]`));const d=n.value.indexOf(c);let f;if([fr.up,fr.down].includes(u)){if(s.preventDefault(),u===fr.up){f=d===-1?0:d!==0?d-1:n.value.length-1;const h=f;for(;!e.value.getNode(n.value[f].dataset.key).canFocus;){if(f--,f===h){f=-1;break}f<0&&(f=n.value.length-1)}}else{f=d===-1?0:d<n.value.length-1?d+1:0;const h=f;for(;!e.value.getNode(n.value[f].dataset.key).canFocus;){if(f++,f===h){f=-1;break}f>=n.value.length&&(f=0)}}f!==-1&&n.value[f].focus()}[fr.left,fr.right].includes(u)&&(s.preventDefault(),c.click());const p=c.querySelector('[type="checkbox"]');[fr.enter,fr.numpadEnter,fr.space].includes(u)&&p&&(s.preventDefault(),p.click())});const o=()=>{var s;n.value=Array.from(t.value.querySelectorAll(`.${r.is("focusable")}[role=treeitem]`)),a.value=Array.from(t.value.querySelectorAll("input[type=checkbox]"));const c=t.value.querySelectorAll(`.${r.is("checked")}[role=treeitem]`);if(c.length){c[0].setAttribute("tabindex","0");return}(s=n.value[0])==null||s.setAttribute("tabindex","0")}}const g9e=l.defineComponent({name:"ElTree",components:{ElTreeNode:h9e},props:{data:{type:Array,default:()=>[]},emptyText:{type:String},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkOnClickLeaf:{type:Boolean,default:!0},checkDescendants:{type:Boolean,default:!1},autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:Array,defaultExpandedKeys:Array,currentNodeKey:[String,Number],renderContent:Function,showCheckbox:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},allowDrag:Function,allowDrop:Function,props:{type:Object,default:()=>({children:"children",label:"label",disabled:"disabled"})},lazy:{type:Boolean,default:!1},highlightCurrent:Boolean,load:Function,filterNodeMethod:Function,accordion:Boolean,indent:{type:Number,default:18},icon:{type:Yr}},emits:["check-change","current-change","node-click","node-contextmenu","node-collapse","node-expand","check","node-drag-start","node-drag-end","node-drop","node-drag-leave","node-drag-enter","node-drag-over"],setup(t,e){const{t:r}=Q1(),n=Ze("tree"),a=l.inject(F3,null),i=l.ref(new s9e({key:t.nodeKey,data:t.data,lazy:t.lazy,props:t.props,load:t.load,currentNodeKey:t.currentNodeKey,checkStrictly:t.checkStrictly,checkDescendants:t.checkDescendants,defaultCheckedKeys:t.defaultCheckedKeys,defaultExpandedKeys:t.defaultExpandedKeys,autoExpandParent:t.autoExpandParent,defaultExpandAll:t.defaultExpandAll,filterNodeMethod:t.filterNodeMethod}));i.value.initialize();const o=l.ref(i.value.root),s=l.ref(null),c=l.ref(null),u=l.ref(null),{broadcastExpanded:d}=EI(t),{dragState:f}=u9e({props:t,ctx:e,el$:c,dropIndicator$:u,store:i});p9e({el$:c},i);const p=l.computed(()=>{const{childNodes:B}=o.value,z=a?a.hasFilteredOptions!==0:!1;return(!B||B.length===0||B.every(({visible:$})=>!$))&&!z});l.watch(()=>t.currentNodeKey,B=>{i.value.setCurrentNodeKey(B)}),l.watch(()=>t.defaultCheckedKeys,B=>{i.value.setDefaultCheckedKey(B)}),l.watch(()=>t.defaultExpandedKeys,B=>{i.value.setDefaultExpandedKeys(B)}),l.watch(()=>t.data,B=>{i.value.setData(B)},{deep:!0}),l.watch(()=>t.checkStrictly,B=>{i.value.checkStrictly=B});const h=B=>{if(!t.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");i.value.filter(B)},v=B=>Yp(t.nodeKey,B.data),m=B=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");const z=i.value.getNode(B);if(!z)return[];const $=[z.data];let j=z.parent;for(;j&&j!==o.value;)$.push(j.data),j=j.parent;return $.reverse()},g=(B,z)=>i.value.getCheckedNodes(B,z),y=B=>i.value.getCheckedKeys(B),_=()=>{const B=i.value.getCurrentNode();return B?B.data:null},b=()=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");const B=_();return B?B[t.nodeKey]:null},C=(B,z)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");i.value.setCheckedNodes(B,z)},w=(B,z)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");i.value.setCheckedKeys(B,z)},S=(B,z,$)=>{i.value.setChecked(B,z,$)},x=()=>i.value.getHalfCheckedNodes(),E=()=>i.value.getHalfCheckedKeys(),L=(B,z=!0)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");Zp(i,e.emit,()=>{d(B),i.value.setUserCurrentNode(B,z)})},T=(B,z=!0)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");Zp(i,e.emit,()=>{d(),i.value.setCurrentNodeKey(B,z)})},k=B=>i.value.getNode(B),A=B=>{i.value.remove(B)},D=(B,z)=>{i.value.append(B,z)},M=(B,z)=>{i.value.insertBefore(B,z)},O=(B,z)=>{i.value.insertAfter(B,z)},R=(B,z,$)=>{d(z),e.emit("node-expand",B,z,$)},P=(B,z)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");i.value.updateChildren(B,z)};return l.provide("RootTree",{ctx:e,props:t,store:i,root:o,currentNode:s,instance:l.getCurrentInstance()}),l.provide(k3,void 0),{ns:n,store:i,root:o,currentNode:s,dragState:f,el$:c,dropIndicator$:u,isEmpty:p,filter:h,getNodeKey:v,getNodePath:m,getCheckedNodes:g,getCheckedKeys:y,getCurrentNode:_,getCurrentKey:b,setCheckedNodes:C,setCheckedKeys:w,setChecked:S,getHalfCheckedNodes:x,getHalfCheckedKeys:E,setCurrentNode:L,setCurrentKey:T,t:r,getNode:k,remove:A,append:D,insertBefore:M,insertAfter:O,handleNodeExpand:R,updateKeyChildren:P}}});function v9e(t,e,r,n,a,i){const o=l.resolveComponent("el-tree-node");return l.openBlock(),l.createElementBlock("div",{ref:"el$",class:l.normalizeClass([t.ns.b(),t.ns.is("dragging",!!t.dragState.draggingNode),t.ns.is("drop-not-allow",!t.dragState.allowDrop),t.ns.is("drop-inner",t.dragState.dropType==="inner"),{[t.ns.m("highlight-current")]:t.highlightCurrent}]),role:"tree"},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.root.childNodes,s=>(l.openBlock(),l.createBlock(o,{key:t.getNodeKey(s),node:s,props:t.props,accordion:t.accordion,"render-after-expand":t.renderAfterExpand,"show-checkbox":t.showCheckbox,"render-content":t.renderContent,onNodeExpand:t.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"]))),128)),t.isEmpty?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(t.ns.e("empty-block"))},[l.renderSlot(t.$slots,"empty",{},()=>{var s;return[l.createElementVNode("span",{class:l.normalizeClass(t.ns.e("empty-text"))},l.toDisplayString((s=t.emptyText)!=null?s:t.t("el.tree.emptyText")),3)]})],2)):l.createCommentVNode("v-if",!0),l.withDirectives(l.createElementVNode("div",{ref:"dropIndicator$",class:l.normalizeClass(t.ns.e("drop-indicator"))},null,2),[[l.vShow,t.dragState.showDropIndicator]])],2)}var m9e=ut(g9e,[["render",v9e],["__file","tree.vue"]]);const y9e=b1(m9e),LI=["success","info","warning","error"],tr=G8({customClass:"",center:!1,dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,zIndex:0,grouping:!1,repeatNum:1,appendTo:qt?document.body:void 0}),b9e=kt({customClass:{type:String,default:tr.customClass},center:{type:Boolean,default:tr.center},dangerouslyUseHTMLString:{type:Boolean,default:tr.dangerouslyUseHTMLString},duration:{type:Number,default:tr.duration},icon:{type:Yr,default:tr.icon},id:{type:String,default:tr.id},message:{type:it([String,Object,Function]),default:tr.message},onClose:{type:it(Function),default:tr.onClose},showClose:{type:Boolean,default:tr.showClose},type:{type:String,values:LI,default:tr.type},plain:{type:Boolean,default:tr.plain},offset:{type:Number,default:tr.offset},zIndex:{type:Number,default:tr.zIndex},grouping:{type:Boolean,default:tr.grouping},repeatNum:{type:Number,default:tr.repeatNum}}),_9e={destroy:()=>!0},Gn=l.shallowReactive([]),S9e=t=>{const e=Gn.findIndex(a=>a.id===t),r=Gn[e];let n;return e>0&&(n=Gn[e-1]),{current:r,prev:n}},C9e=t=>{const{prev:e}=S9e(t);return e?e.vm.exposed.bottom.value:0},w9e=(t,e)=>Gn.findIndex(n=>n.id===t)>0?16:e,x9e=l.defineComponent({name:"ElMessage"}),E9e=l.defineComponent({...x9e,props:b9e,emits:_9e,setup(t,{expose:e}){const r=t,{Close:n}=foe,{ns:a,zIndex:i}=die("message"),{currentZIndex:o,nextZIndex:s}=i,c=l.ref(),u=l.ref(!1),d=l.ref(0);let f;const p=l.computed(()=>r.type?r.type==="error"?"danger":r.type:"info"),h=l.computed(()=>{const x=r.type;return{[a.bm("icon",x)]:x&&pM[x]}}),v=l.computed(()=>r.icon||pM[r.type]||""),m=l.computed(()=>C9e(r.id)),g=l.computed(()=>w9e(r.id,r.offset)+m.value),y=l.computed(()=>d.value+g.value),_=l.computed(()=>({top:`${g.value}px`,zIndex:o.value}));function b(){r.duration!==0&&({stop:f}=Kh(()=>{w()},r.duration))}function C(){f==null||f()}function w(){u.value=!1}function S({code:x}){x===fr.esc&&w()}return l.onMounted(()=>{b(),s(),u.value=!0}),l.watch(()=>r.repeatNum,()=>{C(),b()}),dr(document,"keydown",S),Wr(c,()=>{d.value=c.value.getBoundingClientRect().height}),e({visible:u,bottom:y,close:w}),(x,E)=>(l.openBlock(),l.createBlock(l.Transition,{name:l.unref(a).b("fade"),onBeforeLeave:x.onClose,onAfterLeave:L=>x.$emit("destroy"),persisted:""},{default:l.withCtx(()=>[l.withDirectives(l.createElementVNode("div",{id:x.id,ref_key:"messageRef",ref:c,class:l.normalizeClass([l.unref(a).b(),{[l.unref(a).m(x.type)]:x.type},l.unref(a).is("center",x.center),l.unref(a).is("closable",x.showClose),l.unref(a).is("plain",x.plain),x.customClass]),style:l.normalizeStyle(l.unref(_)),role:"alert",onMouseenter:C,onMouseleave:b},[x.repeatNum>1?(l.openBlock(),l.createBlock(l.unref(rse),{key:0,value:x.repeatNum,type:l.unref(p),class:l.normalizeClass(l.unref(a).e("badge"))},null,8,["value","type","class"])):l.createCommentVNode("v-if",!0),l.unref(v)?(l.openBlock(),l.createBlock(l.unref(e1),{key:1,class:l.normalizeClass([l.unref(a).e("icon"),l.unref(h)])},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(l.unref(v))))]),_:1},8,["class"])):l.createCommentVNode("v-if",!0),l.renderSlot(x.$slots,"default",{},()=>[x.dangerouslyUseHTMLString?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),l.createElementVNode("p",{class:l.normalizeClass(l.unref(a).e("content")),innerHTML:x.message},null,10,["innerHTML"])],2112)):(l.openBlock(),l.createElementBlock("p",{key:0,class:l.normalizeClass(l.unref(a).e("content"))},l.toDisplayString(x.message),3))]),x.showClose?(l.openBlock(),l.createBlock(l.unref(e1),{key:2,class:l.normalizeClass(l.unref(a).e("closeBtn")),onClick:l.withModifiers(w,["stop"])},{default:l.withCtx(()=>[l.createVNode(l.unref(n))]),_:1},8,["class","onClick"])):l.createCommentVNode("v-if",!0)],46,["id"]),[[l.vShow,u.value]])]),_:3},8,["name","onBeforeLeave","onAfterLeave"]))}});var T9e=ut(E9e,[["__file","message.vue"]]);let L9e=1;const kI=t=>{const e=!t||Gt(t)||l.isVNode(t)||Bt(t)?{message:t}:t,r={...tr,...e};if(!r.appendTo)r.appendTo=document.body;else if(Gt(r.appendTo)){let n=document.querySelector(r.appendTo);zn(n)||(Jt("ElMessage","the appendTo option is not an HTMLElement. Falling back to document.body."),n=document.body),r.appendTo=n}return N1(jn.grouping)&&!r.grouping&&(r.grouping=jn.grouping),yt(jn.duration)&&r.duration===3e3&&(r.duration=jn.duration),yt(jn.offset)&&r.offset===16&&(r.offset=jn.offset),N1(jn.showClose)&&!r.showClose&&(r.showClose=jn.showClose),r},k9e=t=>{const e=Gn.indexOf(t);if(e===-1)return;Gn.splice(e,1);const{handler:r}=t;r.close()},A9e=({appendTo:t,...e},r)=>{const n=`message_${L9e++}`,a=e.onClose,i=document.createElement("div"),o={...e,id:n,onClose:()=>{a==null||a(),k9e(d)},onDestroy:()=>{l.render(null,i)}},s=l.createVNode(T9e,o,Bt(o.message)||l.isVNode(o.message)?{default:Bt(o.message)?o.message:()=>o.message}:null);s.appContext=r||vs._context,l.render(s,i),t.appendChild(i.firstElementChild);const c=s.component,d={id:n,vnode:s,vm:c,handler:{close:()=>{c.exposed.visible.value=!1}},props:s.component.props};return d},vs=(t={},e)=>{if(!qt)return{close:()=>{}};const r=kI(t);if(r.grouping&&Gn.length){const a=Gn.find(({vnode:i})=>{var o;return((o=i.props)==null?void 0:o.message)===r.message});if(a)return a.props.repeatNum+=1,a.props.type=r.type,a.handler}if(yt(jn.max)&&Gn.length>=jn.max)return{close:()=>{}};const n=A9e(r,e);return Gn.push(n),n.handler};LI.forEach(t=>{vs[t]=(e={},r)=>{const n=kI(e);return vs({...n,type:t},r)}});function D9e(t){for(const e of Gn)(!t||t===e.props.type)&&e.handler.close()}vs.closeAll=D9e,vs._context=null;const u1=yie(vs,"$message"),M9e="/mixui/#/portal/login",O9e=3e4,I9e={platform:"mixui","Content-Type":"application/json"};class N9e{constructor(){nm(this,"handleResponseSuccess",e=>{const{data:r}=e;if(r!=null&&r.code){if(r.code===403||r.code===401)return this.redirectToLogin(),Promise.reject(r);if(r.code===500||r.code!==200){const n=r.info||r.msg||"未知错误";return u1.error(n),Promise.reject(r)}}return Promise.resolve(e)});nm(this,"handleResponseError",e=>{var a,i;if(!e.response)return u1.error(e.message),Promise.reject(e);const{status:r}=e.response;if(r===403||r===401)return this.redirectToLogin(),Promise.reject(e);const n=((a=e.response.data)==null?void 0:a.info)||((i=e.response.data)==null?void 0:i.msg)||"未知错误";return u1.error(n),Promise.reject(e)});this.axios=C1.create({timeout:O9e,withCredentials:!0,headers:I9e}),this.axios.interceptors.request.use(e=>{if(!e.headers.Authorization){const r=J0.getUser(),n=r?r.token:"";e.headers.Authorization=`Bearer ${n}`}return e},e=>Promise.reject(e)),this.axios.interceptors.response.use(this.handleResponseSuccess,this.handleResponseError)}redirectToLogin(){window.location.href=M9e}get(e,r={}){return this.axios.get(e,{params:r}).then(n=>n.data).catch(n=>{throw n})}post(e,r={},n=null,a={}){const i={...a};return n&&(i.headers=n),this.axios.post(e,r,i).then(o=>o.data).catch(o=>{throw o})}getAxiosInstance(){return this.axios}}const H3=new N9e,AI="/http/middle_platform/api",R9e="/http/file/upload",DI="/mixservice/storage/",MI=Object.assign({get_user_by_token:{block_mapping:"mixauth",action:"get_user_by_token"},upload:{block_mapping:"mixservice",action:"upload_file"},get_block_info:{block_mapping:"mixauth",action:"get_role_menu_pc_list"},get_dashboard_list:{block_mapping:"mixservice",action:"get_new_tool_list"},get_dashboard_item:{block_mapping:"mixservice",action:"get_new_tool_item"},add_dashboard:{block_mapping:"mixservice",action:"add_new_tool"},edit_dashboard:{block_mapping:"mixservice",action:"edit_new_tool"},delete_dashboard:{block_mapping:"mixservice",action:"del_new_tool"},handle_collect:{block_mapping:"mixservice",action:"fav_new_tool"},get_object_list:{block_mapping:"object",action:"get_object_list"},get_object_item:{block_mapping:"object",action:"get_object_item"},app_get_object_list:{block_mapping:"object",action:"app_get_object_list"},add_collect_value_without_object:{block_mapping:"collect",action:"add_collect_value_without_object"},get_collect_list:{block_mapping:"collect",action:"get_project_list"},collect_add:{block_mapping:"collect",action:"add_collect_value"},add_collect_value_plus:{block_mapping:"collect",action:"add_collect_value_plus"},get_last_fv:{block_mapping:"mosaic",action:"get_last_fv"},get_customer_tree:{block_mapping:"object",action:"get_customer_tree"},get_dashboard_by_object:{block_mapping:"mixmanager",action:"get_dashboard_by_object"}}),ot={post(t,e={}){let r=t.split("."),n={};return r.length===1?n=MI[r[0]]:n=MI[r[0]][r[1]],new Promise((a,i)=>{e.block_mapping=n.block_mapping,e.action=n.action,H3.post(AI,e).then(o=>{a(o)}).catch(o=>{i(o)})})},get(t,e){return new Promise((r,n)=>{H3.get(t,e).then(a=>{r(a)}).catch(a=>{n(a)})})},platform(t,e){H3.post(AI,e).then(r=>{t(r)}).catch(r=>{t(r)})},upload(t){return new Promise((e,r)=>{let n={"Content-Type":"application/x-www-form-urlencoded"};H3.post(R9e,t,n).then(a=>{e(a)}).catch(a=>{r(a)})})},getLocation(t,e){return new Promise((r,n)=>{H3.get(t,e).then(a=>{r(a)}).catch(a=>{n(a)})})}},rr="object_alias_uid_mapping",wn=["#4162ff","#3bbc6a","#e24359","#fdcd61","#44b4ff","#8000ff","#ae00ae","#ff8102","#970000","#9b9b00","#939393","#007700","#397373"],ms=[{value:"alway",label:"一直验证"},{value:"once",label:"验证一次"},{value:"never",label:"永不验证"}],Wn=(t,e)=>{let r=[];if(e==="edit"){let a=new Date,i=a.getHours();r.push(et(a).format("YYYY-MM-DD HH")+":00:00");for(var n=0;n<t-1;n++)i=a.getHours(),a.setHours(i-1),r.unshift(et(a).format("YYYY-MM-DD HH")+":00:00")}return r},Yn=t=>{let{num:e,max:r,min:n,mode:a}=t,i=[];if(a==="edit"){e=e||10,r=r||200,n=n||10;for(var o=0;o<e;o++)i.push(Math.floor(Math.random()*(r-n+1)+n))}return i},P9e=t=>{let e=[];switch(t){case"last-hour":case"hour":for(let n=0;n<60;n++){var r=n>9?`${n}:00`:`0${n}:00`;e.push(r)}break;case"last-day":case"day":for(let n=0;n<24;n++){var r=n>9?`${n}:00`:`0${n}:00`;e.push(r)}break;case"week":case"last-week":e=["周日","周一","周二","周三","周四","周五","周六"];break;case"last-month":case"month":for(let n=1;n<32;n++){var r=n>9?`${n}日`:`0${n}日`;e.push(r)}break;case"last-year":case"year":for(let n=1;n<13;n++){var r=n>9?`${n}月`:`0${n}月`;e.push(r)}break}return e},B9e=(t,e)=>{let r="";switch(e){case"hour":r=et(t).format("mm:00");break;case"day":r=et(t).format("HH:00");break;case"week":r=(void 0).formatWeek(et(t).day());break;case"month":r=et(t).format("DD日");break;case"year":r=et(t).format("MM月");break}return r},dt=(t,e)=>{let r;return function(...n){const a=this;clearTimeout(r),r=setTimeout(()=>t.apply(a,n),e)}},Be=(t,e,r)=>{const n=JSON.parse(sessionStorage.getItem(rr))||{};if(e){const a=t.object_alias;return a?n[a]:r}return t.object_id||r},ys={null:t=>t==null||t==="",abnormal:t=>Number.isNaN(t)||!Number.isFinite(t)},F9e={0:t=>{const{res:e}=t;return e},1:t=>{let{res:e,category:r,type:n,conf:a,uid:i}=t;const{data:o,common:s}=a,c=s.source||"mosaic";if(r==="history"){const u=[],d=e.history[0].length;for(let p=0;p<d;p++){let h=!0;for(let v=0;v<e.history.length;v++){const m=o[v].fv;if(ys[n](e.history[v][p][m])){h=!1;break}}h&&u.push(p)}const f=[];for(let p=0;p<e.history.length;p++){const h=e.history[p],v=[];for(let m=0;m<u.length;m++){const g=u[m];v.push(h[g])}v.length>0&&f.push(v)}e.history=f}else{let u=!1;o.forEach(d=>{var p,h,v,m,g,y,_,b,C,w,S,x;let f=Be(d,s.useAlias,i);["statistics","calculate"].includes(c)?d.value=(m=(v=(h=(p=e[f])==null?void 0:p[c])==null?void 0:h.data)==null?void 0:v[d.fv])==null?void 0:m.data:["statisticsRealtime","calculateRealtime"].includes(c)?d.value=(C=(b=(_=(y=(g=e[f])==null?void 0:g[c])==null?void 0:y.data)==null?void 0:_[d.fv])==null?void 0:b.data)==null?void 0:C.data:d.value=(x=(S=(w=e[f])==null?void 0:w[c])==null?void 0:S.data)==null?void 0:x[d.fv],u=ys[n](d.value)}),u&&(e=null)}return e},2:t=>{let{res:e,category:r,type:n,conf:a,uid:i}=t;const{data:o,common:s}=a,c=s.source||"mosaic";if(r==="history"){const u=e.history[0].length;for(let d=0;d<u;d++)for(let f=0;f<e.history.length;f++){const p=o[f].fv;ys[n](e.history[f][d][p])&&(e.history[f][d][p]=s.null.value)}}else o.forEach(u=>{var p,h,v,m,g,y,_,b,C,w,S,x;let d=null,f=Be(u,s.useAlias,i);["statistics","calculate"].includes(c)?(d=(m=(v=(h=(p=e[f])==null?void 0:p[c])==null?void 0:h.data)==null?void 0:v[u.fv])==null?void 0:m.data,ys[n](d)&&(e[f][c].data[u.fv].data=s.null.value)):["statisticsRealtime","calculateRealtime"].includes(c)?(d=(C=(b=(_=(y=(g=e[f])==null?void 0:g[c])==null?void 0:y.data)==null?void 0:_[u.fv])==null?void 0:b.data)==null?void 0:C.data,ys[n](d)&&(e[f][c].data[u.fv].data.data=s.null.value)):(d=(x=(S=(w=e[f])==null?void 0:w[c])==null?void 0:S.data)==null?void 0:x[u.fv],ys[n](d)&&(e[f][c].data[u.fv]=s.null.value))});return e},3:(t,e)=>t},Rr=(t,e,r)=>{const{conf:n,uid:a}=e,{null:i}=n.common;let o={conf:n,res:t,category:r,type:"null",uid:a};return F9e[i.type](o)},Pr=(t,e)=>(t.history=[],e.forEach(()=>{t.history.push([])}),t.all_data_group.forEach((r,n)=>{if(Array.isArray(r)&&r.length)r.forEach((a,i)=>{t.history[n].push({time:a.start_time,[a.script_uid]:a.data})});else for(let a in r)t.history[n].push({time:a,[e[n].fv]:r[a]})}),t),G3=(t,e)=>{const r=new Map;for(let o=0;o<t.length;o++)r.set(t[o],o);const n=[],a=e.map(()=>[]),i=new Set;for(let o=0;o<t.length;o++){const s=t[o];if(!i.has(s)){i.add(s);const c=r.get(s);n.push(s);for(let u=0;u<e.length;u++)a[u].push(e[u][c])}}return{times:n,data:a}},qp=()=>{let t=location.protocol==="http:"?"ws:":"wss:",e=location.host;return t+"//"+e+"/dashbos/websocket"},z9e=()=>{let t=location.protocol==="http:"?"ws:":"wss:",e=location.host;return t+"//"+e+"/websocket/object/fv"},OI={multiple:{mosaic:"get_tools_mosaic_list"},single:{mosaic:"get_memory_mosaic_values"},result:{mosaic:"get_tools_mosaic_list",statistics:"get_tools_statistics_list",calculate:"get_tools_statistics_list",index:"get_tools_mosaic_list",deviation:"get_tools_mosaic_list",stability:"get_tools_mosaic_list",balance:"get_tools_mosaic_list",increment:"get_tools_mosaic_list",risk:"get_tools_mosaic_list"},near:{statistics:"get_tools_last_statistics_list",calculate:"get_tools_last_statistics_list"}},V9e=["crd","vlu","arrayCard"];class Ft{constructor(){}getHistoryData(e,r){var h;let n="result";const{conf:a,uid:i}=e,{data:o,common:s,options:c}=a,u=s.source||"mosaic";u==="mosaic"&&(n=V9e.includes(r)?"single":"multiple"),["statistics","calculate"].includes(u)&&(o.filter(m=>{var g;return(g=m==null?void 0:m.periodUnit)==null?void 0:g.includes("near")}).length&&["bar","lin"].includes(r)?n="near":n="result");const d={block_mapping:"mixtools",action:OI[n][u],condition:[]};let f=((h=c.points)==null?void 0:h.value)||1,p="";if(s.multiObject||(p=Be(s,s.useAlias,i)),s.source==="summary"?(d.block_mapping="schema",d.action="get_statistical_quantity",delete d.condition):o.forEach(v=>{s.multiObject?p=Be(v,s.useAlias,i):v.object_id=p||v.object_id,d.condition.push(s&&s.rate&&s.rate.checked?this.get_mosaic_by_timespan(v,f,s.rate):this[`get_${u}_item`](v,n,f,r))}),r==="scd"&&c.multipleImg.value){const v=JSON.parse(sessionStorage.getItem(rr))||{};p=c.object.value,s.useAlias&&(p=c.object.value?v[c.object.value]:c.object.value),d.condition.push({block_mapping:"influxdbproxy",action:"get_last_mosaic_list_by_item",keys:[c.statusFv.value],object_id:p||i,items:1})}return r==="sankey"&&(s.multiObject&&(p=Be(s,s.useAlias,i)),d.condition.unshift({block_mapping:"influxdbproxy",action:"get_last_mosaic_list_by_item",keys:[s.originFv],object_id:p,items:1})),new Promise((v,m)=>{ot.platform(g=>{v(g.result)},d)})}get_mosaic_item(e,r,n,a){let i={block_mapping:r==="single"?"mosaic":"influxdbproxy",action:r==="single"?"get_last_fv_by_objid":"get_last_mosaic_list_by_item",keys:[e.fv],object_id:e.object_id,items:n||1};return a==="evn"&&(i.keys=[e.fv,e.status_fv]),a==="cmc"&&(i.keys=[e.item_fv]),["ctrSwitch"].includes(a)&&(i.keys=[e.status_fv]),["progressBar","progressCircle"].includes(a)&&e.maxType==="fv"&&(i.keys=[e.fv,e.max]),i}get_mosaic_by_timespan(e,r,n){let a=et().unix(),i=a-n.value*Number(r);return{block_mapping:"influxdbproxy",action:"get_mosaic_list_with_time_span",start_time:et(i*1e3).format("YYYY-MM-DD HH:mm:ss"),end_time:et(a*1e3).format("YYYY-MM-DD HH:mm:ss"),time_span:n.value,time_swing:n.value,keys:[e.fv],object_id:e.object_id}}get_statistics_item(e,r,n){var a;return(a=e==null?void 0:e.periodUnit)!=null&&a.includes("near")?this.get_neardate_item(e,"statistics"):{now_time:et().format("YYYY-MM-DD HH:mm:ss"),change_number:e.periodValue||e.periodValue||1,object_id:e.object_id,time_type:e.periodUnit||"hour",action:"get_statistics_list",script_uid:e.fv,length:Number(n)||1,block_mapping:"statistics"}}get_calculate_item(e,r,n){if(e.periodUnit.includes("near"))return this.get_neardate_item(e,"calculate");let a=this.get_statistics_item(e,r,n);return a.action="get_calculate_list",a}get_neardate_item(e,r){return{block_mapping:"apim",action:`get_${r}_list`,script_uid:e.fv,object_id:e.object_id,end:et().format("YYYY-MM-DD HH:mm:ss"),time_type:e.periodUnit.split("near-")[1],last:e.periodValue??1}}get_index_item(e,r,n,a){return{page_index:1,page_size:n,block_mapping:"index",action:"get_index_result_list",where_and:[["project_uid","=",e.fv],["object_id","=",e.object_id]]}}get_deviation_item(e,r,n,a){return{...this.get_index_item(e,r,n,a),action:"get_deviation_result_list",block_mapping:"deviation"}}get_stability_item(e,r,n,a){return{...this.get_index_item(e,r,n,a),action:"get_stability_result_list",block_mapping:"stability"}}get_balance_item(e,r,n,a){return{...this.get_index_item(e,r,n,a),action:"get_balance_result_list",block_mapping:"balance"}}get_increment_item(e,r,n,a){return{...this.get_index_item(e,r,n,a),action:"get_increment_result_list",block_mapping:"increment"}}get_risk_item(e,r,n,a){return{...this.get_index_item(e,r,n,a),action:"get_risk_result_list",block_mapping:"risk"}}getRangeLineHistoryData(e){var u,d;const{conf:r,uid:n}=e;let a=((d=(u=r==null?void 0:r.options)==null?void 0:u.points)==null?void 0:d.value)||100;const i=e.conf.common.source||"mosaic";let o=JSON.parse(sessionStorage.getItem("object_alias_uid_mapping")),s=r.data[0]||{},c="";return r.useAlias?c=s.object_alias&&o[s.object_alias]||n:c=s.object_id||n,i==="deviation"?new Promise(f=>{f(this.getDeviationHistory(r,c,a))}):new Promise(f=>{f(this.getEigenHistory(r,c,a))})}getDeviationHistory(e,r,n){let a=e.data[0]||{},i={page_index:1,page_size:n,block_mapping:"deviation",action:"get_deviation_result_list",where_and:[["project_uid","=",a.fv]]};return r&&i.where_and.push(["object_id","=",r]),new Promise(o=>{ot.platform(s=>{o(this.formatDeviation(s.result))},i)})}async getEigenHistory(e,r,n){let a={times:[],data:[],range:{}};(await new Promise(s=>{let c={keys:[e.data[0].fv],object_id:r,page_index:1,page_size:n,block_mapping:"apim",action:"get_mosaic_list"};ot.platform(u=>{let d=u.result.data?u.result.data.sort((f,p)=>et(f.time).valueOf()-et(p.time).valueOf()):[];s(d)},c)})).forEach(s=>{a.times.push(et(s.time).format("YYYY-MM-DD HH:mm:ss")),a.data.push(s[e.data[0].fv]??"-")});let o={action:"get_adaps_report_list",block_mapping:"eigen",where_and:[["start",">=",a.times[0]],["end","<=",a.times[a.times.length-1]],["project_uid","=",e.data[0].project_id],["object_id","=",r]]};return new Promise((s,c)=>{ot.platform(u=>{a.range=this.formatEigen(u.result.data,a.times),s(a)},o)})}formatDeviation(e){let r={times:[],data:[],range:{}},n={};e.data.sort((i,o)=>et(i.created).valueOf()-et(o.created).valueOf()).forEach((i,o)=>{r.times.push(i.created),r.data.push(i.data.Dev),i.data.Base&&(n[i.data.Base]?n[i.data.Base].push(o):n[i.data.Base]=[o])});for(let i in n){let o=[],s=n[i];if(s.length===0)continue;let c=[s[0]];for(let u=1;u<s.length;u++)s[u]-s[u-1]===1?c.push(s[u]):(o.push(c),c=[s[u]]);o.push(c),n[i]=o.map(u=>[u[0],u[u.length-1]])}return r.range=n,r}formatEigen(e,r){let n={};return e=e.sort((a,i)=>et(a.created).valueOf()-et(i.created).valueOf()),e.length&&e.forEach(a=>{let i=JSON.parse(a.detail),o=[et(a.start).format("YYYY-MM-DD HH:mm:ss"),et(a.end).format("YYYY-MM-DD HH:mm:ss")];i.Main.forEach(s=>{let c=s.report.start?[et(s.report[0].start.datetime).format("YYYY-MM-DD HH:mm:ss"),et(s.report[0].end.datetime).format("YYYY-MM-DD HH:mm:ss")]:o;n[s.key_type]?n[s.key_type].push([r.indexOf(c[0]),r.indexOf(c[1])]):n[s.key_type]=[[r.indexOf(c[0]),r.indexOf(c[1])]]})}),n}getSwitchHistoryData(e){const{conf:r,uid:n}=e,{common:a}=r;let i=Be(a,a.useAlias,n),o={block_mapping:"mosaic",action:"get_last_fv_by_objid",keys:[a.statusFv],object_id:i,items:1};return new Promise((s,c)=>{ot.platform(u=>{s(u.result)},o)})}getCtrMultiHistoryData(e){const{conf:r,uid:n}=e,{common:a,data:i}=r;let o=Be(a,a.useAlias,n);console.log(a,o);let s={block_mapping:"mixtools",action:"get_tools_mosaic_list",condition:[{block_mapping:"influxdbproxy",action:"get_last_mosaic_list_by_item",keys:[i[0].fv],object_id:o,items:1}]};return new Promise((c,u)=>{ot.platform(d=>{c(d.result)},s)})}getGridviewHistoryData(e){const{conf:r,uid:n}=e,{common:a,data:i}=r,o=a.source||"mosaic";let s="result";o==="mosaic"&&(s="single");const c={block_mapping:"mixtools",action:OI[s][o],condition:[]};let u="";return a.multiObject||(u=Be(a,a.useAlias,n)),o==="summary"?(c.block_mapping="schema",c.action="get_statistical_quantity",delete c.condition):i.forEach(d=>{d.forEach(f=>{f.isValue&&(a.multiObject&&(u=Be({object_id:f.object,object_alias:f.object},a.useAlias,n)),f.object_id=u,c.condition.push(this[`get_${o}_item`](f,s,1)))})}),new Promise((d,f)=>{ot.platform(p=>{d(p.result)},c)})}}const t1=(t,e,r)=>{const{common:n,data:a,options:i,type:o}=JSON.parse(JSON.stringify(t)),s=n.source||"mosaic";try{const c={component_name:t.type,items:Number(t.points)||1,body:{},actionid:t.id},u=new Map;let d="";if((!n.multiObject||n.hideMultiObject)&&(d=Be(n,n.useAlias,e)),a.forEach(f=>{n.multiObject?f.object_id=Be(f,n.useAlias,e):f.object_id=d||f.object_id;const p=`${f.object_id}_${s}`;if(u.has(p))if(["progressBar","progressCircle"].includes(r)&&f.maxType==="fv")u.get(p).id.push(f.fv,f.max);else{let h=f.fv;r==="cmc"&&(h=f.item_fv),["ctrSwitch"].includes(r)&&(h=f.status_fv),u.get(p).id.push(h)}else{let h=[f.fv];r==="evn"&&(h=[f.fv,f.status_fv]),["progressBar","progressCircle"].includes(r)&&f.maxType==="fv"&&(h=[f.fv,f.max]),r==="cmc"&&(h=[f.item_fv]),["ctrSwitch"].includes(r)&&(h=[f.status_fv]),u.set(p,{...f,id:h})}}),r==="sankey"){d=Be(n,n.useAlias,e);const f=`${d}_${s}`;u.has(f)?u.get(f).id.push(n.originFv):u.set(f,{object_id:d,id:[n.originFv]})}if(r==="scd"){d=d=Be({object_id:i.object.value,object_alias:i.object.value},n.useAlias,e);const f=`${d}_${s}`;u.has(f)?u.get(f).id.push(i.statusFv.value):u.set(f,{object_id:d,id:[i.statusFv.value]})}for(const[f,p]of u)c.body[s]||(c.body[s]=[]),c.body[s].push({object_id:p.object_id,key:p.id});return c}catch(c){throw console.error("格式化请求时出错:",c),new Error("请求格式化失败")}},$9e=(t,e)=>{const{common:r}=t,n={component_name:"rtn",actionid:t.id,body:{retainer:[]}};let a="";return r.multiObject||(a=Be(r,r.useAlias,e)),t.data.forEach(i=>{r.multiObject?i.object_id=Be(i,r.useAlias,e):i.object_id=a,n.body.retainer.push({object_id:i.object_id,key:[`${i.retainer}:${i.retainer_code}`]})}),n},II=(t,e)=>{const{common:r}=t;let n=Be(r,r.useAlias,e);return{component_name:"rtn",actionid:t.id,body:{mosaic:[{object_id:n,key:[r.statusFv]}]}}},U9e=(t,e)=>{const{common:r,data:n}=t,a=r.source||"mosaic",i={component_name:"gridview",actionid:t.id,body:{[a]:[]}},o=new Map;let s="";r.multiObject||(s=Be(r,r.useAlias,e)),n.forEach(c=>{c.forEach(u=>{if(u.isValue){r.multiObject?u.object_id=Be({object_id:u.object,object_alias:u.object},r.useAlias,e):u.object_id=s;const d=`${u.object_id}_${a}`;if(o.has(d))o.get(d).id.push(u.fv);else{let f=[u.fv];o.set(d,{...u,id:f})}}})});for(const[c,u]of o)i.body[a]||(i.body[a]=[]),i.body[a].push({object_id:u.object_id,key:u.id});return i},j9e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e柱状图%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-104.000000,%20-376.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M105.620667,376.279562%20C105.946536,376.279562%20106.215847,376.521717%20106.258469,376.835897%20L106.264345,376.92324%20L106.264345,390.992205%20L120.333311,390.992205%20C120.65918,390.992205%20120.928491,391.23436%20120.971113,391.54854%20L120.976989,391.635883%20C120.976989,391.961753%20120.734834,392.231063%20120.420654,392.273686%20L120.333311,392.279562%20L105.620667,392.279562%20C105.294798,392.279562%20105.025487,392.037407%20104.982865,391.723227%20L104.976989,391.635883%20L104.976989,376.92324%20C104.976989,376.567746%20105.265173,376.279562%20105.620667,376.279562%20Z%20M110.342251,383.462193%20C110.894535,383.462193%20111.342251,383.909908%20111.342251,384.462193%20L111.342251,390.818514%20L108.890143,390.818514%20L108.890143,384.462193%20C108.890143,383.909908%20109.337859,383.462193%20109.890143,383.462193%20L110.342251,383.462193%20Z%20M114.429096,380.192716%20C114.981381,380.192716%20115.429096,380.640431%20115.429096,381.192716%20L115.429096,390.818514%20L112.976989,390.818514%20L112.976989,381.192716%20C112.976989,380.640431%20113.424704,380.192716%20113.976989,380.192716%20L114.429096,380.192716%20Z%20M118.515942,385.9143%20C119.068226,385.9143%20119.515942,386.362015%20119.515942,386.9143%20L119.515942,390.818514%20L117.063834,390.818514%20L117.063834,386.9143%20C117.063834,386.362015%20117.511549,385.9143%20118.063834,385.9143%20L118.515942,385.9143%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",H9e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e柱状图%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-104.000000,%20-376.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M105.620667,376.279562%20C105.946536,376.279562%20106.215847,376.521717%20106.258469,376.835897%20L106.264345,376.92324%20L106.264345,390.992205%20L120.333311,390.992205%20C120.65918,390.992205%20120.928491,391.23436%20120.971113,391.54854%20L120.976989,391.635883%20C120.976989,391.961753%20120.734834,392.231063%20120.420654,392.273686%20L120.333311,392.279562%20L105.620667,392.279562%20C105.294798,392.279562%20105.025487,392.037407%20104.982865,391.723227%20L104.976989,391.635883%20L104.976989,376.92324%20C104.976989,376.567746%20105.265173,376.279562%20105.620667,376.279562%20Z%20M110.342251,383.462193%20C110.894535,383.462193%20111.342251,383.909908%20111.342251,384.462193%20L111.342251,390.818514%20L108.890143,390.818514%20L108.890143,384.462193%20C108.890143,383.909908%20109.337859,383.462193%20109.890143,383.462193%20L110.342251,383.462193%20Z%20M114.429096,380.192716%20C114.981381,380.192716%20115.429096,380.640431%20115.429096,381.192716%20L115.429096,390.818514%20L112.976989,390.818514%20L112.976989,381.192716%20C112.976989,380.640431%20113.424704,380.192716%20113.976989,380.192716%20L114.429096,380.192716%20Z%20M118.515942,385.9143%20C119.068226,385.9143%20119.515942,386.362015%20119.515942,386.9143%20L119.515942,390.818514%20L117.063834,390.818514%20L117.063834,386.9143%20C117.063834,386.362015%20117.511549,385.9143%20118.063834,385.9143%20L118.515942,385.9143%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Ke=(t,e)=>{const r=t.__vccOpts||t;for(const[n,a]of e)r[n]=a;return r},G9e={DEFAULT_ICON:j9e,ACTIVE_ICON:H9e,NAME_CN:"柱状图",NAME_EN:"Bar Chart",ORDER:1},W9e={titleColor:{value:"#111",type:"color",label:"标题颜色"},textColor:{value:"#111",type:"color",label:"字体颜色"},bgColor:{value:"#fff",type:"color",label:"背景颜色"},top:{value:30,type:"number",label:"上边距"},bottom:{value:40,type:"number",label:"下边距"},left:{value:40,type:"number",label:"左边距"},right:{value:20,type:"number",label:"右边距"},radiusSize:{value:8,type:"number",label:"圆角大小"},textSize:{value:12,type:"number",label:"字体大小"},barWidth:{value:30,type:"number",label:"柱形宽度"},points:{value:10,type:"number",label:"显示数量"},isHideTitle:{value:!1,type:"checkbox",label:"是否隐藏标题"},showLabel:{value:!1,type:"checkbox",label:"是否显示数据"}},NI=[{name:"参数一",fv:"",object_id:"",color:""}],Xp=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:G9e,OPTIONS:W9e,DATA:NI,PARAMS:["name","fv","object_id","color"],SOURCE:["mosaic","statistics","calculate"],COMMON:{useAlias:!1,null:{type:"0",value:""},multiObject:!1,source:"mosaic"}},{__name:"bar",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"}},setup(t){Rt([w1,x1,g1,V1,v1,Ql]);const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null)),n="bar_"+Math.random().toString(16).substring(4,12);let a=null,i=null;const o=t,s=l.ref({bgColor:"#73bff9",titleColor:"#111",textSize:12,radiusSize:4,isHideTitle:!1}),c=()=>{var _,b,C,w,S,x,E,L,T,k,A,D,M,O;const{conf:y}=o;s.value={bgColor:((b=(_=y==null?void 0:y.options)==null?void 0:_.bgColor)==null?void 0:b.value)||"#73bff9",titleColor:((w=(C=y==null?void 0:y.options)==null?void 0:C.titleColor)==null?void 0:w.value)||"#111",textColor:((x=(S=y==null?void 0:y.options)==null?void 0:S.textColor)==null?void 0:x.value)||"#111",radiusSize:((L=(E=y==null?void 0:y.options)==null?void 0:E.radiusSize)==null?void 0:L.value)??4,textSize:((k=(T=y==null?void 0:y.options)==null?void 0:T.textSize)==null?void 0:k.value)??12,isHideTitle:((D=(A=y==null?void 0:y.options)==null?void 0:A.isHideTitle)==null?void 0:D.value)||!1,points:((O=(M=y==null?void 0:y.options)==null?void 0:M.points)==null?void 0:O.value)||10},y.data=y.data.length?y.data:NI,l.nextTick(()=>{let R=document.querySelector("#"+n);R&&(a||(a=s1(R),i=Qt({strategy:"scroll"}),i.listenTo(R,function(){a.resize()})),a.setOption(u(),!0))})},u=()=>{var b,C,w,S,x,E,L,T;const{conf:y}=o;var _={tooltip:{trigger:"axis",axisPointer:{type:"shadow"},textStyle:{align:"left",fontSize:s.value.textSize}},grid:{top:((C=(b=y==null?void 0:y.options)==null?void 0:b.top)==null?void 0:C.value)||30,bottom:((S=(w=y==null?void 0:y.options)==null?void 0:w.bottom)==null?void 0:S.value)||20,left:((E=(x=y==null?void 0:y.options)==null?void 0:x.left)==null?void 0:E.value)||40,right:((T=(L=y==null?void 0:y.options)==null?void 0:L.right)==null?void 0:T.value)||20,containLabel:!1},legend:{show:!0,data:d(),right:20,top:0,textStyle:{color:s.value.textColor,fontSize:s.value.textSize}},xAxis:[{type:"category",data:f(),axisTick:{alignWithLabel:!0},axisLine:{lineStyle:{color:s.value.textColor}},axisLabel:{formatter:function(k,A){if(!/^[1-9]\d{3}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}$/.test(k))return k;let D=k.split(" ");return D[0]+`
|
|
270
270
|
`+D[1]},color:s.value.textColor,fontSize:s.value.textSize}}],yAxis:[{type:"value",nameGap:10,nameTextStyle:{align:"right"},splitLine:{lineStyle:{type:"dashed",color:"#e5e5e5"}},axisLabel:{color:s.value.textColor,fontSize:s.value.textSize},axisLine:{lineStyle:{color:s.value.textColor}},splitNumber:4}],series:p()};return _},d=()=>{const{conf:y}=o;return y.data.map(_=>_.name)},f=()=>{var C;const{data:y,common:_}=o.conf,b=_.source||"mosaic";return["statistics","calculate"].includes(b)&&!((C=y[0].periodUnit)!=null&&C.includes("near"))?P9e(y[0].periodUnit):Wn(s.value.points,o.mode)},p=()=>{const{conf:y}=o;let _=[];return y.data.forEach((b,C)=>{var S,x,E,L;let w=b.color||wn[C];_.push({type:"bar",data:Yn({num:s.value.points,max:200,min:0,mode:o.mode}),name:b.name,itemStyle:{color:w},label:{show:((x=(S=y==null?void 0:y.options)==null?void 0:S.showLabel)==null?void 0:x.value)||!1,position:"top",color:w},barWidth:((L=(E=y==null?void 0:y.options)==null?void 0:E.barWidth)==null?void 0:L.value)+"%"})}),_},h=y=>{var L;const{data:_,common:b}=o.conf,C=b.source||"mosaic";["statistics","calculate"].includes(C)&&(y=Pr(y,_));let w=Rr(y,o,"history"),S=[],x=[];if(!w.history.length)return;w.history.forEach((T,k)=>{x.push([]),x[k]=T.map(A=>A[_[k].fv]??"--"),S[k]=T.map(A=>A.time)});let E=a.getOption();(!["statistics","calculate"].includes(C)||(L=_[0])!=null&&L.periodUnit.includes("near"))&&(E.xAxis[0].data=S[0]),E.series.forEach((T,k)=>{T.data=x[k]}),a.setOption(E)},v=y=>{const{data:_,common:b}=o.conf,C=b.source||"mosaic";let w=Rr(y,o,"socket");if(!w||!a)return;let S=a.getOption(),x="";b.multiObject||(x=Be(b,b.useAlias,o.uid)),_.forEach((L,T)=>{var D,M,O,R,P,B,z,$,j,Z,W,K,ee,Q,ae,re,ne,ie,se,he,we,Oe,Ie;b.multiObject&&(x=Be(L,b.useAlias,o.uid));let k,A;if(["statistics","calculate"].includes(C)&&!((D=L.periodUnit)!=null&&D.includes("near"))){k=(P=(R=(O=(M=w[x])==null?void 0:M[C])==null?void 0:O.data)==null?void 0:R[L.fv])==null?void 0:P.data;let ge=L.periodUnit.split("-");A=B9e((j=($=(z=(B=w[x])==null?void 0:B[C])==null?void 0:z.data)==null?void 0:$[L.fv])==null?void 0:j.start_time,ge[ge.length-1]);let Ee=S.xAxis[0].data.indexOf(A);L.periodUnit.includes("last")||(S.series[T].data[Ee]=k)}else["statistics","calculate"].includes(C)&&((Z=L.periodUnit)!=null&&Z.includes("near"))?(k=(Q=(ee=(K=(W=w[x])==null?void 0:W[C])==null?void 0:K.data)==null?void 0:ee[L.fv])==null?void 0:Q.data,A=(ie=(ne=(re=(ae=w[x])==null?void 0:ae[C])==null?void 0:re.data)==null?void 0:ne[L.fv])==null?void 0:ie.start_time,T===0&&S.xAxis[0].data.push(A),S.series[T].data.push(k)):(w[x]&&(k=(we=(he=(se=w[x])==null?void 0:se[C])==null?void 0:he.data)==null?void 0:we[L.fv],A=(Ie=(Oe=w[x])==null?void 0:Oe[C])==null?void 0:Ie.datetime,T===0&&S.xAxis[0].data.push(A)),S.series[T].data.push(k))});let E=G3(S.xAxis[0].data,S.series.map(L=>L.data));S.xAxis[0].data=E.times.slice(-Number(s.value.points)),S.series=S.series.map((L,T)=>(L.data=E.data[T].slice(-Number(s.value.points)),L)),a.setOption(S)},m=async()=>{try{const _=await new Ft().getHistoryData(o,"lin");h(_)}catch(y){console.error("获取历史数据时出错:",y)}finally{const y=t1(o.conf,o.uid);e.value&&e.value.port.postMessage({request:y,type:"send"}),r.value&&r.value.send(JSON.stringify(y))}},g=dt(c,200);return l.watch(()=>o.conf,()=>{o.mode==="edit"&&g()},{deep:!0}),l.watchEffect(()=>{o.conf.socketData&&v(o.conf.socketData)}),l.onMounted(()=>{c(),o.mode==="preview"&&m()}),l.onBeforeUnmount(()=>{i&&i.uninstall(document.querySelector("#"+n)),a&&a.clear(),a&&p1(a),a=null}),(y,_)=>{var b,C,w,S;return l.openBlock(),l.createElementBlock("div",{class:"component-container",style:l.normalizeStyle({background:(b=s.value)==null?void 0:b.bgColor,borderRadius:`${(C=s.value)==null?void 0:C.radiusSize}px`})},[(w=s.value)!=null&&w.isHideTitle?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:"echart-title",style:l.normalizeStyle({color:(S=s.value)==null?void 0:S.titleColor})},l.toDisplayString(t.conf.name),5)),l.createElementVNode("div",{class:"echart-body"},[l.createElementVNode("div",{class:"w-full h-full",id:n})]),l.renderSlot(y.$slots,"default",{},void 0,!0)],4)}}}),[["__scopeId","data-v-c9dfad6e"]])},Symbol.toStringTag,{value:"Module"})),Y9e={DEFAULT_ICON:"data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e排行%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-199.000000,%20-376.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M200.293678,376.279562%20C200.619547,376.279562%20200.888858,376.521717%20200.93148,376.835897%20L200.937356,376.92324%20L200.937356,390.992205%20L215.006322,390.992205%20C215.332191,390.992205%20215.601502,391.23436%20215.644124,391.54854%20L215.65,391.635883%20C215.65,391.961753%20215.407845,392.231063%20215.093665,392.273686%20L215.006322,392.279562%20L200.293678,392.279562%20C199.967809,392.279562%20199.698498,392.037407%20199.655876,391.723227%20L199.65,391.635883%20L199.65,376.92324%20C199.65,376.567746%20199.938185,376.279562%20200.293678,376.279562%20Z%20M206.65,386.731669%20C207.202285,386.731669%20207.65,387.179384%20207.65,387.731669%20L207.65,388.183776%20C207.65,388.736061%20207.202285,389.183776%20206.65,389.183776%20L203.563155,389.183776%20L203.563155,386.731669%20L206.65,386.731669%20Z%20M209.919476,382.644823%20C210.471761,382.644823%20210.919476,383.092539%20210.919476,383.644823%20L210.919476,384.096931%20C210.919476,384.649216%20210.471761,385.096931%20209.919476,385.096931%20L203.563155,385.096931%20L203.563155,382.644823%20L209.919476,382.644823%20Z%20M212.371584,378.557978%20C212.923868,378.557978%20213.371584,379.005693%20213.371584,379.557978%20L213.371584,380.010085%20C213.371584,380.56237%20212.923868,381.010085%20212.371584,381.010085%20L203.563155,381.010085%20L203.563155,378.557978%20L212.371584,378.557978%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",ACTIVE_ICON:"data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e排行%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-199.000000,%20-376.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M200.293678,376.279562%20C200.619547,376.279562%20200.888858,376.521717%20200.93148,376.835897%20L200.937356,376.92324%20L200.937356,390.992205%20L215.006322,390.992205%20C215.332191,390.992205%20215.601502,391.23436%20215.644124,391.54854%20L215.65,391.635883%20C215.65,391.961753%20215.407845,392.231063%20215.093665,392.273686%20L215.006322,392.279562%20L200.293678,392.279562%20C199.967809,392.279562%20199.698498,392.037407%20199.655876,391.723227%20L199.65,391.635883%20L199.65,376.92324%20C199.65,376.567746%20199.938185,376.279562%20200.293678,376.279562%20Z%20M206.65,386.731669%20C207.202285,386.731669%20207.65,387.179384%20207.65,387.731669%20L207.65,388.183776%20C207.65,388.736061%20207.202285,389.183776%20206.65,389.183776%20L203.563155,389.183776%20L203.563155,386.731669%20L206.65,386.731669%20Z%20M209.919476,382.644823%20C210.471761,382.644823%20210.919476,383.092539%20210.919476,383.644823%20L210.919476,384.096931%20C210.919476,384.649216%20210.471761,385.096931%20209.919476,385.096931%20L203.563155,385.096931%20L203.563155,382.644823%20L209.919476,382.644823%20Z%20M212.371584,378.557978%20C212.923868,378.557978%20213.371584,379.005693%20213.371584,379.557978%20L213.371584,380.010085%20C213.371584,380.56237%20212.923868,381.010085%20212.371584,381.010085%20L203.563155,381.010085%20L203.563155,378.557978%20L212.371584,378.557978%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",NAME_CN:"排行",NAME_EN:"Ranking",ORDER:1},Z9e={titleColor:{value:"#111",type:"color",label:"标题颜色"},textColor:{value:"#111",type:"color",label:"字体颜色"},bgColor:{value:"#fff",type:"color",label:"背景颜色"},top:{value:30,type:"number",label:"上边距"},bottom:{value:40,type:"number",label:"下边距"},left:{value:50,type:"number",label:"左边距"},right:{value:30,type:"number",label:"右边距"},radiusSize:{value:8,type:"number",label:"圆角大小"},textSize:{value:12,type:"number",label:"字体大小"},barWidth:{value:50,type:"number",label:"柱形宽度"},direction:{value:"x",type:"radio",option:[{value:"x",label:"横向"},{value:"y",label:"纵向"}],label:"柱形方向"},sortType:{value:"desc",type:"radio",option:[{value:"desc",label:"降序"},{value:"asc",label:"升序"}],label:"排序方式"},realSort:{value:!1,type:"checkbox",label:"开启实时排行"},isHideTitle:{value:!1,type:"checkbox",label:"是否隐藏标题"}},RI=[{name:"参数一",fv:"",object_id:"",color:""}],Jp=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:Y9e,OPTIONS:Z9e,DATA:RI,PARAMS:["name","fv","object_id","color"],SOURCE:["mosaic"],COMMON:{useAlias:!1,multiObject:!1,source:"mosaic"}},{__name:"raceBar",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"}},setup(t){Rt([w1,x1,g1,V1,v1,Ql]);const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null)),n="raceBar_"+Math.random().toString(16).substring(4,12);let a=null,i=null;const o=t,s=l.ref({bgColor:"#73bff9",titleColor:"#111",textSize:12,radiusSize:4,isHideTitle:!1}),c={data:[],items:[],colors:[]},u=()=>{var y,_,b,C,w,S,x,E,L,T,k,A;const{conf:g}=o;s.value={bgColor:((_=(y=g==null?void 0:g.options)==null?void 0:y.bgColor)==null?void 0:_.value)||"#73bff9",titleColor:((C=(b=g==null?void 0:g.options)==null?void 0:b.titleColor)==null?void 0:C.value)||"#111",textColor:((S=(w=g==null?void 0:g.options)==null?void 0:w.textColor)==null?void 0:S.value)||"#111",radiusSize:((E=(x=g==null?void 0:g.options)==null?void 0:x.radiusSize)==null?void 0:E.value)??4,textSize:((T=(L=g==null?void 0:g.options)==null?void 0:L.textSize)==null?void 0:T.value)??12,isHideTitle:((A=(k=g==null?void 0:g.options)==null?void 0:k.isHideTitle)==null?void 0:A.value)||!1},g.data=g.data.length?g.data:RI,c.colors=[],c.data=[],c.items=[],g.data.forEach((D,M)=>{let O=Yn({num:1,mode:o.mode});c.colors.push(D.color||wn[M]),c.data.push(D.value||O[0]),c.items.push(D.name)}),l.nextTick(()=>{let D=document.querySelector("#"+n);D&&(a||(a=s1(D),i=Qt({strategy:"scroll"}),i.listenTo(D,function(){a.resize()})),a.setOption(d(),!0))})},d=()=>{var _,b,C,w,S,x,E,L,T,k,A,D;const{conf:g}=o;var y={grid:{top:((b=(_=g==null?void 0:g.options)==null?void 0:_.top)==null?void 0:b.value)||30,bottom:((w=(C=g==null?void 0:g.options)==null?void 0:C.bottom)==null?void 0:w.value)||20,left:((x=(S=g==null?void 0:g.options)==null?void 0:S.left)==null?void 0:x.value)||40,right:((L=(E=g==null?void 0:g.options)==null?void 0:E.right)==null?void 0:L.value)||20,containLabel:!1},tooltip:{show:!0,formatter:function(M){let O="";return O=M.name+":"+M.data,O}},xAxis:{max:"dataMax",axisLine:{show:!0,color:s.value.textColor},axisTick:{show:!0},splitLine:{lineStyle:{}},axisLabel:{color:s.value.textColor,fontSize:s.value.textSize??12,formatter:M=>(M.length>4&&(M=M.substr(0,4)),M)}},yAxis:{axisLabel:{formatter:M=>(M.length>5&&(M=M.substr(0,5)+`
|
|
271
|
-
`+M.substr(5)),M),color:s.value.textColor,fontSize:s.value.textSize??12},axisLine:{lineStyle:{color:s.value.textColor}},splitLine:{lineStyle:{}},animationDuration:300,animationDurationUpdate:300},series:[{realtimeSort:(k=(T=g==null?void 0:g.options)==null?void 0:T.realSort)==null?void 0:k.value,type:"bar",barWidth:((D=(A=g==null?void 0:g.options)==null?void 0:A.barWidth)==null?void 0:D.value)+"%",data:c.data,label:{show:!0,position:"right",valueAnimation:!0,color:s.value.textColor,fontSize:s.value.textSize??12},itemStyle:{color:function(M){return c.colors[M.dataIndex]||"#5470c6"}}}],animationDuration:0,animationDurationUpdate:500,animationEasing:"linear",animationEasingUpdate:"linear"};return f(y)},f=g=>{var _,b,C,w,S,x,E,L,T,k,A,D;const{conf:y}=o;return g.series[0].realtimeSort=(b=(_=y==null?void 0:y.options)==null?void 0:_.realSort)==null?void 0:b.value,((w=(C=y==null?void 0:y.options)==null?void 0:C.direction)==null?void 0:w.value)==="x"?(g.yAxis.data=c.items,(x=(S=y==null?void 0:y.options)==null?void 0:S.realSort)!=null&&x.value&&(g.yAxis.inverse=((L=(E=y==null?void 0:y.options)==null?void 0:E.sortType)==null?void 0:L.value)==="desc"),g.series[0].label.position="right",g.xAxis.splitLine.lineStyle.type="dashed"):(g.xAxis.data=c.items,(k=(T=y==null?void 0:y.options)==null?void 0:T.realSort)!=null&&k.value&&(g.xAxis.inverse=((D=(A=y==null?void 0:y.options)==null?void 0:A.sortType)==null?void 0:D.value)==="asc"),g.series[0].label.position="top",g.yAxis.splitLine.lineStyle.type="dashed",delete g.yAxis.type),g},p=g=>{const{data:y}=o.conf;g.history.length&&(c.data=[],g.history.forEach((_,b)=>{let C=_.map(w=>w[y[b].fv]??"--")[0]??"--";c.data.push(C)}),a.setOption(d(),!0))},h=g=>{const{data:y,common:_}=o.conf,b=_.source||"mosaic";if(!g||!a)return;let C="";_.multiObject||(C=Be(_,_.useAlias,o.uid)),y.forEach((w,S)=>{var x,E,L;if(_.multiObject&&(C=Be(w,_.useAlias,o.uid)),g[C]){let T=(L=(E=(x=g[C])==null?void 0:x[b])==null?void 0:E.data)==null?void 0:L[w.fv];c.data[S]=T}}),a.setOption(d(),!0)},v=async()=>{try{const y=await new Ft().getHistoryData(o,"raceBar");p(y)}catch(g){console.error("获取历史数据时出错:",g)}finally{const g=t1(o.conf,o.uid);e.value&&e.value.port.postMessage({request:g,type:"send"}),r.value&&r.value.send(JSON.stringify(g))}},m=dt(u,200);return l.watch(()=>o.conf,()=>{o.mode==="edit"&&m()},{deep:!0}),l.watchEffect(()=>{o.conf.socketData&&h(o.conf.socketData)}),l.onMounted(()=>{u(),o.mode==="preview"&&v()}),l.onBeforeUnmount(()=>{i&&i.uninstall(document.querySelector("#"+n)),a&&a.clear(),a&&p1(a),a=null}),(g,y)=>{var _,b,C,w;return l.openBlock(),l.createElementBlock("div",{class:"component-container",style:l.normalizeStyle({background:(_=s.value)==null?void 0:_.bgColor,borderRadius:`${(b=s.value)==null?void 0:b.radiusSize}px`})},[(C=s.value)!=null&&C.isHideTitle?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:"echart-title",style:l.normalizeStyle({color:(w=s.value)==null?void 0:w.titleColor})},l.toDisplayString(t.conf.name),5)),l.createElementVNode("div",{class:"echart-body"},[l.createElementVNode("div",{class:"w-full h-full",id:n})]),l.renderSlot(g.$slots,"default",{},void 0,!0)],4)}}}),[["__scopeId","data-v-246b89f7"]])},Symbol.toStringTag,{value:"Module"})),K9e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e数组卡片%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-733.000000,%20-221.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cg%20id='卡片查看模式_view-grid-card备份'%20transform='translate(733.833333,%20222.995324)'%3e%3cpath%20d='M14.4615385,0%20C15.3112073,0%2016,0.688792693%2016,1.53846154%20L16,1.53846154%20L16,12.7130579%20C16,13.5627267%2015.3112073,14.2515194%2014.4615385,14.2515194%20L14.4615385,14.2515194%20L1.53846154,14.2515194%20C0.688792693,14.2515194%200,13.5627267%200,12.7130579%20L0,12.7130579%20L0,1.53846154%20C0,0.688792693%200.688792693,0%201.53846154,0%20L1.53846154,0%20Z%20M14.4615385,1.23076923%20L1.53846154,1.23076923%20C1.36852777,1.23076923%201.23076923,1.36852777%201.23076923,1.53846154%20L1.23076923,1.53846154%20L1.23076923,12.7130579%20C1.23076923,12.8829916%201.36852777,13.0207502%201.53846154,13.0207502%20L1.53846154,13.0207502%20L14.4615385,13.0207502%20C14.6314722,13.0207502%2014.7692308,12.8829916%2014.7692308,12.7130579%20L14.7692308,12.7130579%20L14.7692308,1.53846154%20C14.7692308,1.36852777%2014.6314722,1.23076923%2014.4615385,1.23076923%20L14.4615385,1.23076923%20Z%20M12.6961184,7.52450725%20C13.035986,7.52450725%2013.3115031,7.80002432%2013.3115031,8.13989186%20L13.3115031,8.13989186%20L13.3115031,10.7985846%20C13.3115031,11.1384522%2013.035986,11.4139693%2012.6961184,11.4139693%20L12.6961184,11.4139693%20L3.48717949,11.4139693%20C3.14731195,11.4139693%202.87179487,11.1384522%202.87179487,10.7985846%20L2.87179487,10.7985846%20L2.87179487,8.13989186%20C2.87179487,7.80002432%203.14731195,7.52450725%203.48717949,7.52450725%20L3.48717949,7.52450725%20Z%20M12.08,8.75507692%20L4.10184615,8.75507692%20L4.10184615,10.1830769%20L12.08,10.1830769%20L12.08,8.75507692%20Z%20M12.6961184,2.87179487%20C13.035986,2.87179487%2013.3115031,3.14731195%2013.3115031,3.48717949%20L13.3115031,3.48717949%20L13.3115031,6.14587227%20C13.3115031,6.48573981%2013.035986,6.76125689%2012.6961184,6.76125689%20L12.6961184,6.76125689%20L3.48717949,6.76125689%20C3.14731195,6.76125689%202.87179487,6.48573981%202.87179487,6.14587227%20L2.87179487,6.14587227%20L2.87179487,3.48717949%20C2.87179487,3.14731195%203.14731195,2.87179487%203.48717949,2.87179487%20L3.48717949,2.87179487%20Z%20M12.08,4.10184615%20L4.10184615,4.10184615%20L4.10184615,5.52984615%20L12.08,5.52984615%20L12.08,4.10184615%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",q9e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e数组卡片%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-733.000000,%20-221.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cg%20id='卡片查看模式_view-grid-card备份'%20transform='translate(733.833333,%20222.995324)'%3e%3cpath%20d='M14.4615385,0%20C15.3112073,0%2016,0.688792693%2016,1.53846154%20L16,1.53846154%20L16,12.7130579%20C16,13.5627267%2015.3112073,14.2515194%2014.4615385,14.2515194%20L14.4615385,14.2515194%20L1.53846154,14.2515194%20C0.688792693,14.2515194%200,13.5627267%200,12.7130579%20L0,12.7130579%20L0,1.53846154%20C0,0.688792693%200.688792693,0%201.53846154,0%20L1.53846154,0%20Z%20M14.4615385,1.23076923%20L1.53846154,1.23076923%20C1.36852777,1.23076923%201.23076923,1.36852777%201.23076923,1.53846154%20L1.23076923,1.53846154%20L1.23076923,12.7130579%20C1.23076923,12.8829916%201.36852777,13.0207502%201.53846154,13.0207502%20L1.53846154,13.0207502%20L14.4615385,13.0207502%20C14.6314722,13.0207502%2014.7692308,12.8829916%2014.7692308,12.7130579%20L14.7692308,12.7130579%20L14.7692308,1.53846154%20C14.7692308,1.36852777%2014.6314722,1.23076923%2014.4615385,1.23076923%20L14.4615385,1.23076923%20Z%20M12.6961184,7.52450725%20C13.035986,7.52450725%2013.3115031,7.80002432%2013.3115031,8.13989186%20L13.3115031,8.13989186%20L13.3115031,10.7985846%20C13.3115031,11.1384522%2013.035986,11.4139693%2012.6961184,11.4139693%20L12.6961184,11.4139693%20L3.48717949,11.4139693%20C3.14731195,11.4139693%202.87179487,11.1384522%202.87179487,10.7985846%20L2.87179487,10.7985846%20L2.87179487,8.13989186%20C2.87179487,7.80002432%203.14731195,7.52450725%203.48717949,7.52450725%20L3.48717949,7.52450725%20Z%20M12.08,8.75507692%20L4.10184615,8.75507692%20L4.10184615,10.1830769%20L12.08,10.1830769%20L12.08,8.75507692%20Z%20M12.6961184,2.87179487%20C13.035986,2.87179487%2013.3115031,3.14731195%2013.3115031,3.48717949%20L13.3115031,3.48717949%20L13.3115031,6.14587227%20C13.3115031,6.48573981%2013.035986,6.76125689%2012.6961184,6.76125689%20L12.6961184,6.76125689%20L3.48717949,6.76125689%20C3.14731195,6.76125689%202.87179487,6.48573981%202.87179487,6.14587227%20L2.87179487,6.14587227%20L2.87179487,3.48717949%20C2.87179487,3.14731195%203.14731195,2.87179487%203.48717949,2.87179487%20L3.48717949,2.87179487%20Z%20M12.08,4.10184615%20L4.10184615,4.10184615%20L4.10184615,5.52984615%20L12.08,5.52984615%20L12.08,4.10184615%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",X9e={class:"w-full h-full flex"},J9e={key:0,class:"px-[4px]"},Q9e={key:1,class:"px-[4px]"},bs="--",e5e={DEFAULT_ICON:K9e,ACTIVE_ICON:q9e,NAME_CN:"统计",NAME_EN:"Array Card",ORDER:5},t5e={bgColor:{value:"#fff",type:"color",label:"背景颜色"},textColor:{value:"#111",type:"color",label:"字体颜色"},textSize:{value:16,type:"number",label:"时间字体"},radiusSize:{value:8,type:"number",label:"圆角大小"}},PI=[{fv:"",object_id:""}],Qp=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:e5e,OPTIONS:t5e,DATA:PI,PARAMS:["fv","object_id","source"],SOURCE:["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],ITEMS:1,COMMON:{useAlias:!1,source:"mosaic"}},{__name:"arrayCard",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},socketData:{type:Object,default:()=>({})}},setup(t){const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null)),n=t,a=l.ref({}),i=f=>{var m;let p=((m=f==null?void 0:f[0])==null?void 0:m.value)||0,h=[],v=0;for(;v<String(Math.floor(p)).length;)h.push(String(Math.floor(p)).slice(v,v+3)),v+=3;return h.join(",")},o=()=>{var p,h,v,m,g,y,_,b;const{conf:f}=n;a.value={bgColor:((h=(p=f==null?void 0:f.options)==null?void 0:p.bgColor)==null?void 0:h.value)||"#fff",textColor:((m=(v=f==null?void 0:f.options)==null?void 0:v.textColor)==null?void 0:m.value)||"#111",textSize:((y=(g=f==null?void 0:f.options)==null?void 0:g.textSize)==null?void 0:y.value)||16,radiusSize:((b=(_=f==null?void 0:f.options)==null?void 0:_.radiusSize)==null?void 0:b.value)??4},f.data=f.data.length?f.data:PI},s=f=>{const{data:p,common:h}=n.conf,v=h.source||"mosaic";["statistics","calculate"].includes(v)&&(f=Pr(f,p)),n.conf.data.forEach((m,g)=>{var y,_;try{m.value=((_=(y=f.history[g])==null?void 0:y[0])==null?void 0:_[m.fv])||bs}catch(b){console.error("设置历史数据时出错:",b),m.value=bs}})},c=f=>{const{data:p,common:h}=n.conf,v=h.source||"mosaic",m=JSON.parse(sessionStorage.getItem(rr))||{};p.forEach(g=>{var _,b,C,w,S,x,E,L,T,k,A,D;let y=h.useAlias?m[g.object_alias]:g.object_id||n.uid;try{["statistics","calculate"].includes(v)?g.value=((w=(C=(b=(_=f[y])==null?void 0:_[v])==null?void 0:b.data)==null?void 0:C[g.fv])==null?void 0:w.data)??bs:["statisticsRealtime","calculateRealtime"].includes(v)?g.value=((T=(L=(E=(x=(S=f[y])==null?void 0:S[v])==null?void 0:x.data)==null?void 0:E[g.fv])==null?void 0:L.data)==null?void 0:T.data)??bs:g.value=((D=(A=(k=f[y])==null?void 0:k[v])==null?void 0:A.data)==null?void 0:D[g.fv])??bs}catch(M){console.error("设置实时数据时出错:",M),g.value=bs}})},u=async()=>{try{const{common:f}=n.conf,p=f.source||"mosaic";if(!["statisticsRealtime","calculateRealtime"].includes(p)){const v=await new Ft().getHistoryData(n,"arrayCard");s(v)}}catch(f){console.error("获取历史数据时出错:",f)}finally{const f=t1(n.conf,n.uid);e.value&&e.value.port.postMessage({request:f,type:"send"}),r.value&&r.value.send(JSON.stringify(f))}},d=dt(o,200);return l.watch(()=>n.conf,()=>{n.mode==="edit"&&d()},{deep:!0}),l.watchEffect(()=>{n.conf.socketData&&c(n.conf.socketData)}),l.onMounted(()=>{o(),n.mode==="preview"&&u()}),(f,p)=>{var h,v;return l.openBlock(),l.createElementBlock("div",X9e,[l.createElementVNode("div",{class:"flex flex-1 px-[12px]",style:l.normalizeStyle({backgroundColor:(h=a.value)==null?void 0:h.bgColor,borderRadius:`${(v=a.value)==null?void 0:v.radiusSize}px`})},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i(t.conf.data),(m,g)=>{var y,_;return l.openBlock(),l.createElementBlock("div",{key:g,class:l.normalizeClass(["flex items-center justify-center",{"unset-flex":m==","}]),style:l.normalizeStyle({fontSize:((y=a.value)==null?void 0:y.textSize)+"px",color:(_=a.value)==null?void 0:_.textColor})},[m!==","?(l.openBlock(),l.createElementBlock("div",J9e,l.toDisplayString(m),1)):(l.openBlock(),l.createElementBlock("div",Q9e,","))],6)}),128))],4),l.renderSlot(f.$slots,"default",{},void 0,!0)])}}}),[["__scopeId","data-v-88e57f27"]])},Symbol.toStringTag,{value:"Module"})),r5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e基础卡片%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-105.000000,%20-96.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M119.607399,97.4683109%20C120.37652,97.4683109%20121,98.0917972%20121,98.860912%20L121,98.860912%20L121,109.139088%20C121,109.908212%20120.376522,110.531689%20119.607399,110.531689%20L119.607399,110.531689%20L106.392601,110.531689%20C105.623486,110.531689%20105,109.908209%20105,109.139088%20L105,109.139088%20L105,98.860912%20C105,98.0917994%20105.623489,97.4683109%20106.392601,97.4683109%20L106.392601,97.4683109%20Z%20M119.607399,98.7852022%20L106.392601,98.7852022%20C106.350788,98.7852022%20106.316891,98.8190984%20106.316891,98.860912%20L106.316891,98.860912%20L106.316891,109.139088%20C106.316891,109.180907%20106.350782,109.214798%20106.392601,109.214798%20L106.392601,109.214798%20L119.607399,109.214798%20C119.649223,109.214798%20119.683109,109.180913%20119.683109,109.139088%20L119.683109,109.139088%20L119.683109,98.860912%20C119.683109,98.8190931%20119.649218,98.7852022%20119.607399,98.7852022%20L119.607399,98.7852022%20Z%20M117.588471,104.993404%20C117.952121,104.993404%20118.246917,105.2882%20118.246917,105.65185%20C118.246917,105.985195%20117.999206,106.260685%20117.677819,106.304285%20L117.588471,106.310295%20L108.411529,106.310295%20C108.047879,106.310295%20107.753083,106.015499%20107.753083,105.65185%20C107.753083,105.318504%20108.000794,105.043015%20108.322181,104.999415%20L108.411529,104.993404%20L117.588471,104.993404%20Z%20M112.449383,100.77201%20C112.813033,100.77201%20113.107829,101.066806%20113.107829,101.430456%20C113.107829,101.763801%20112.860118,102.039291%20112.538731,102.082891%20L112.449383,102.088902%20L108.411529,102.088902%20C108.047879,102.088902%20107.753083,101.794105%20107.753083,101.430456%20C107.753083,101.097111%20108.000794,100.821621%20108.322181,100.778021%20L108.411529,100.77201%20L112.449383,100.77201%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",n5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e基础卡片%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-105.000000,%20-96.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M119.607399,97.4683109%20C120.37652,97.4683109%20121,98.0917972%20121,98.860912%20L121,98.860912%20L121,109.139088%20C121,109.908212%20120.376522,110.531689%20119.607399,110.531689%20L119.607399,110.531689%20L106.392601,110.531689%20C105.623486,110.531689%20105,109.908209%20105,109.139088%20L105,109.139088%20L105,98.860912%20C105,98.0917994%20105.623489,97.4683109%20106.392601,97.4683109%20L106.392601,97.4683109%20Z%20M119.607399,98.7852022%20L106.392601,98.7852022%20C106.350788,98.7852022%20106.316891,98.8190984%20106.316891,98.860912%20L106.316891,98.860912%20L106.316891,109.139088%20C106.316891,109.180907%20106.350782,109.214798%20106.392601,109.214798%20L106.392601,109.214798%20L119.607399,109.214798%20C119.649223,109.214798%20119.683109,109.180913%20119.683109,109.139088%20L119.683109,109.139088%20L119.683109,98.860912%20C119.683109,98.8190931%20119.649218,98.7852022%20119.607399,98.7852022%20L119.607399,98.7852022%20Z%20M117.588471,104.993404%20C117.952121,104.993404%20118.246917,105.2882%20118.246917,105.65185%20C118.246917,105.985195%20117.999206,106.260685%20117.677819,106.304285%20L117.588471,106.310295%20L108.411529,106.310295%20C108.047879,106.310295%20107.753083,106.015499%20107.753083,105.65185%20C107.753083,105.318504%20108.000794,105.043015%20108.322181,104.999415%20L108.411529,104.993404%20L117.588471,104.993404%20Z%20M112.449383,100.77201%20C112.813033,100.77201%20113.107829,101.066806%20113.107829,101.430456%20C113.107829,101.763801%20112.860118,102.039291%20112.538731,102.082891%20L112.449383,102.088902%20L108.411529,102.088902%20C108.047879,102.088902%20107.753083,101.794105%20107.753083,101.430456%20C107.753083,101.097111%20108.000794,100.821621%20108.322181,100.778021%20L108.411529,100.77201%20L112.449383,100.77201%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",a5e={class:"w-full h-full relative"},i5e={class:"card-content"},Da="--",o5e="--",s5e={DEFAULT_ICON:r5e,ACTIVE_ICON:n5e,NAME_CN:"卡片",NAME_EN:"Card",ORDER:1},l5e={valueSize:{value:16,type:"number",label:"数值大小"},nameSize:{value:16,type:"number",label:"文字大小"},radiusSize:{value:8,type:"number",label:"圆角大小"},fontColor:{value:"#fff",type:"color",label:"字体颜色"},bgColor:{value:"#73bff9",type:"color",label:"背景颜色"},fontSize:{value:16,type:"number",label:"字体大小"},position:{value:"left",type:"radio",option:[{value:"left",label:"左"},{value:"center",label:"中"},{value:"right",label:"右"}],label:"文本位置"}},BI=[{name:"参数一",fv:"",object_id:"",unit:"",default:"",isText:!1}],eg=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:s5e,OPTIONS:l5e,DATA:BI,PARAMS:["name","fv","object_id","unit","default","isText","source"],SOURCE:["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],COMMON:{useAlias:!1,multiObject:!1,source:"mosaic"}},{__name:"crd",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},socketData:{type:Object,default:()=>({})}},setup(t){const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null)),n=t,a=l.ref({bgColor:"#73bff9",fontColor:"#fff",nameSize:16,valueSize:16,radiusSize:4}),i=h=>h?h.isText?o(h):s(h):{value:Da,name:o5e},o=h=>{var m;return{value:(((m=h.flag)==null?void 0:m.find(g=>String(g.code)==String(h.value)))||{}).text||Da,name:h.name}},s=h=>{const v=h.value??h.default??0,m=h.name;return{value:v,name:h.unit?`${m}(${h.unit})`:m}},c=()=>{var v,m,g,y,_,b,C,w,S,x,E,L;const{conf:h}=n;a.value={bgColor:((m=(v=h==null?void 0:h.options)==null?void 0:v.bgColor)==null?void 0:m.value)||"#73bff9",fontColor:((y=(g=h==null?void 0:h.options)==null?void 0:g.fontColor)==null?void 0:y.value)||"#fff",nameSize:((b=(_=h==null?void 0:h.options)==null?void 0:_.nameSize)==null?void 0:b.value)||16,valueSize:((w=(C=h==null?void 0:h.options)==null?void 0:C.valueSize)==null?void 0:w.value)||16,radiusSize:((x=(S=h==null?void 0:h.options)==null?void 0:S.radiusSize)==null?void 0:x.value)??4,position:((L=(E=h==null?void 0:h.options)==null?void 0:E.position)==null?void 0:L.value)||"left"},h.data=h.data.length?h.data:BI},u=h=>{const{common:v}=n.conf,m=v.source||"mosaic";n.conf.data.forEach((g,y)=>{var _,b,C;try{["statistics","calculate"].includes(m)?g.value=((_=h.history[y])==null?void 0:_[0])||Da:m==="summary"?g.value=h.data[g.fv]||Da:g.value=((C=(b=h.history[y])==null?void 0:b[0])==null?void 0:C[g.fv])||Da}catch(w){console.error("设置历史数据时出错:",w),g.value=Da}})},d=h=>{const{common:v,data:m}=n.conf,g=v.source||"mosaic";let y="";v.multiObject||(y=Be(v,v.useAlias,n.uid)),m.forEach((_,b)=>{var C,w,S,x,E,L,T,k,A,D,M,O;v.multiObject&&(y=Be(_,v.useAlias,n.uid));try{["statistics","calculate"].includes(g)?_.value=((x=(S=(w=(C=h[y])==null?void 0:C[g])==null?void 0:w.data)==null?void 0:S[_.fv])==null?void 0:x.data)??Da:["statisticsRealtime","calculateRealtime"].includes(g)?_.value=((A=(k=(T=(L=(E=h[y])==null?void 0:E[g])==null?void 0:L.data)==null?void 0:T[_.fv])==null?void 0:k.data)==null?void 0:A.data)??Da:_.value=((O=(M=(D=h[y])==null?void 0:D[g])==null?void 0:M.data)==null?void 0:O[_.fv])??Da}catch(R){console.error("设置实时数据时出错:",R),_.value=Da}})},f=async()=>{const{common:h}=n.conf,v=h.source||"mosaic";try{if(!["statisticsRealtime","calculateRealtime"].includes(v)){const g=await new Ft().getHistoryData(n,"crd");u(g)}}catch(m){console.error("获取历史数据时出错:",m)}finally{if(v!=="summary"){const m=t1(n.conf,n.uid);e.value&&e.value.port.postMessage({request:m,type:"send"}),r.value&&r.value.send(JSON.stringify(m))}}},p=dt(c,200);return l.watch(()=>n.conf,()=>{console.log("card"),n.mode==="edit"&&p()},{deep:!0}),l.watchEffect(()=>{n.conf.socketData&&d(n.conf.socketData)}),l.onMounted(()=>{c(),n.mode==="preview"&&f()}),(h,v)=>(l.openBlock(),l.createElementBlock("div",a5e,[l.createElementVNode("div",{class:"card-wrap",style:l.normalizeStyle({"background-color":a.value.bgColor,"border-radius":`${a.value.radiusSize}px`})},[l.createElementVNode("div",i5e,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.conf.data,(m,g)=>(l.openBlock(),l.createElementBlock("div",{class:"item-card",key:g},[l.createElementVNode("div",{class:"value",style:l.normalizeStyle({color:a.value.fontColor,"font-size":`${a.value.valueSize}px`,textAlign:a.value.position})},l.toDisplayString(i(m).value),5),l.createElementVNode("div",{class:"split-line",style:l.normalizeStyle({"border-color":a.value.fontColor})},null,4),l.createElementVNode("div",{class:"name",style:l.normalizeStyle({color:a.value.fontColor,"font-size":`${a.value.nameSize}px`,textAlign:a.value.position})},l.toDisplayString(i(m).name),5)]))),128))])],4),l.renderSlot(h.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-bd4d9eca"]])},Symbol.toStringTag,{value:"Module"})),c5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e事件卡片%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-191.000000,%20-96.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M205.92069,97.4712644%20C206.682471,97.4712644%20207.3,98.0888001%20207.3,98.8505747%20L207.3,98.8505747%20L207.3,109.149425%20C207.3,109.911209%20206.682473,110.528736%20205.92069,110.528736%20L205.92069,110.528736%20L192.67931,110.528736%20C191.917536,110.528736%20191.3,109.911206%20191.3,109.149425%20L191.3,109.149425%20L191.3,98.8505747%20C191.3,98.0888025%20191.917538,97.4712644%20192.67931,97.4712644%20L192.67931,97.4712644%20Z%20M205.92069,98.7586207%20L192.67931,98.7586207%20C192.628525,98.7586207%20192.587356,98.7997897%20192.587356,98.8505747%20L192.587356,98.8505747%20L192.587356,109.149425%20C192.587356,109.200216%20192.62852,109.241379%20192.67931,109.241379%20L192.67931,109.241379%20L205.92069,109.241379%20C205.971486,109.241379%20206.012644,109.200221%20206.012644,109.149425%20L206.012644,109.149425%20L206.012644,98.8505747%20C206.012644,98.7997844%20205.97148,98.7586207%20205.92069,98.7586207%20L205.92069,98.7586207%20Z%20M196.537914,107.926325%20L196.461627,107.89772%20C196.376008,107.859228%20196.300327,107.802566%20196.239493,107.732645%20L196.182458,107.65641%20C196.149793,107.605279%20196.124154,107.549226%20196.106902,107.489611%20L196.088588,107.405463%20C196.083991,107.374424%20196.081609,107.342662%20196.081609,107.310345%20L196.081609,101.425287%20C196.081609,101.296017%20196.119716,101.175647%20196.18531,101.074798%20C196.212059,101.034076%20196.24112,100.998703%20196.273556,100.966746%20C196.325849,100.915252%20196.38674,100.872715%20196.453929,100.841434%20C196.473529,100.832503%20196.487888,100.826598%20196.502497,100.821209%20C196.516162,100.816178%20196.529622,100.811721%20196.54327,100.807705%20C196.543966,100.8075%20196.544993,100.8072%20196.546021,100.806902%20L196.630169,100.788588%20C196.631149,100.788443%20196.63213,100.7883%20196.633112,100.788159%20C196.635183,100.787864%20196.636563,100.787673%20196.637944,100.787485%20L196.725287,100.781609%20L201.874713,100.781609%20C202.230206,100.781609%20202.518391,101.069794%20202.518391,101.425287%20C202.518391,101.751157%20202.276236,102.020467%20201.962056,102.063089%20L201.874713,102.068966%20L197.368,102.068264%20L197.368,103.723264%20L201.874713,103.724138%20C202.230206,103.724138%20202.518391,104.012322%20202.518391,104.367816%20C202.518391,104.693685%20202.276236,104.962996%20201.962056,105.005618%20L201.874713,105.011494%20L197.368,105.011264%20L197.368,106.666264%20L201.874713,106.666667%20C202.230206,106.666667%20202.518391,106.954851%20202.518391,107.310345%20C202.518391,107.636214%20202.276236,107.905525%20201.962056,107.948147%20L201.874713,107.954023%20L196.725287,107.954023%20C196.660114,107.954023%20196.597202,107.944337%20196.537914,107.926325%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",u5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e事件卡片%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-191.000000,%20-96.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M205.92069,97.4712644%20C206.682471,97.4712644%20207.3,98.0888001%20207.3,98.8505747%20L207.3,98.8505747%20L207.3,109.149425%20C207.3,109.911209%20206.682473,110.528736%20205.92069,110.528736%20L205.92069,110.528736%20L192.67931,110.528736%20C191.917536,110.528736%20191.3,109.911206%20191.3,109.149425%20L191.3,109.149425%20L191.3,98.8505747%20C191.3,98.0888025%20191.917538,97.4712644%20192.67931,97.4712644%20L192.67931,97.4712644%20Z%20M205.92069,98.7586207%20L192.67931,98.7586207%20C192.628525,98.7586207%20192.587356,98.7997897%20192.587356,98.8505747%20L192.587356,98.8505747%20L192.587356,109.149425%20C192.587356,109.200216%20192.62852,109.241379%20192.67931,109.241379%20L192.67931,109.241379%20L205.92069,109.241379%20C205.971486,109.241379%20206.012644,109.200221%20206.012644,109.149425%20L206.012644,109.149425%20L206.012644,98.8505747%20C206.012644,98.7997844%20205.97148,98.7586207%20205.92069,98.7586207%20L205.92069,98.7586207%20Z%20M196.537914,107.926325%20L196.461627,107.89772%20C196.376008,107.859228%20196.300327,107.802566%20196.239493,107.732645%20L196.182458,107.65641%20C196.149793,107.605279%20196.124154,107.549226%20196.106902,107.489611%20L196.088588,107.405463%20C196.083991,107.374424%20196.081609,107.342662%20196.081609,107.310345%20L196.081609,101.425287%20C196.081609,101.296017%20196.119716,101.175647%20196.18531,101.074798%20C196.212059,101.034076%20196.24112,100.998703%20196.273556,100.966746%20C196.325849,100.915252%20196.38674,100.872715%20196.453929,100.841434%20C196.473529,100.832503%20196.487888,100.826598%20196.502497,100.821209%20C196.516162,100.816178%20196.529622,100.811721%20196.54327,100.807705%20C196.543966,100.8075%20196.544993,100.8072%20196.546021,100.806902%20L196.630169,100.788588%20C196.631149,100.788443%20196.63213,100.7883%20196.633112,100.788159%20C196.635183,100.787864%20196.636563,100.787673%20196.637944,100.787485%20L196.725287,100.781609%20L201.874713,100.781609%20C202.230206,100.781609%20202.518391,101.069794%20202.518391,101.425287%20C202.518391,101.751157%20202.276236,102.020467%20201.962056,102.063089%20L201.874713,102.068966%20L197.368,102.068264%20L197.368,103.723264%20L201.874713,103.724138%20C202.230206,103.724138%20202.518391,104.012322%20202.518391,104.367816%20C202.518391,104.693685%20202.276236,104.962996%20201.962056,105.005618%20L201.874713,105.011494%20L197.368,105.011264%20L197.368,106.666264%20L201.874713,106.666667%20C202.230206,106.666667%20202.518391,106.954851%20202.518391,107.310345%20C202.518391,107.636214%20202.276236,107.905525%20201.962056,107.948147%20L201.874713,107.954023%20L196.725287,107.954023%20C196.660114,107.954023%20196.597202,107.944337%20196.537914,107.926325%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",d5e={class:"w-full h-full relative"},d6="--",f5e={DEFAULT_ICON:c5e,ACTIVE_ICON:u5e,NAME_CN:"状态",NAME_EN:"State",ORDER:3},h5e={nameSize:{value:20,type:"number",label:"名称字体"},valueSize:{value:32,type:"number",label:"数值字体"},timeSize:{value:16,type:"number",label:"时间字体"},radiusSize:{value:8,type:"number",label:"圆角大小"},bgColor:{value:"#73bff9",type:"color",label:"背景颜色"},fontColor:{value:"#fff",type:"color",label:"字体颜色"}},FI=[{fv:"",status_fv:"",object_id:"",status:[{code:0,text:"离线",color:"#a40e0e"}]}],p5e=["fv","status_fv","object_id"],g5e=["mosaic"],tg=l.ref(et().format("YYYY-MM-DD HH:mm:ss")),rg=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:f5e,OPTIONS:h5e,DATA:FI,PARAMS:p5e,SOURCE:g5e,ITEMS:1,COMMON:{useAlias:!1,source:"mosaic"}},{__name:"evn",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},socketData:{type:Object,default:()=>({})}},setup(t){const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null)),n=t,a=l.ref({}),i=()=>{var p,h,v,m,g,y,_,b,C,w,S,x;const{conf:f}=n;a.value={bgColor:((h=(p=f==null?void 0:f.options)==null?void 0:p.bgColor)==null?void 0:h.value)||"#73bff9",fontColor:((m=(v=f==null?void 0:f.options)==null?void 0:v.fontColor)==null?void 0:m.value)||"#fff",nameSize:((y=(g=f==null?void 0:f.options)==null?void 0:g.nameSize)==null?void 0:y.value)||20,valueSize:((b=(_=f==null?void 0:f.options)==null?void 0:_.valueSize)==null?void 0:b.value)||32,timeSize:((w=(C=f==null?void 0:f.options)==null?void 0:C.timeSize)==null?void 0:w.value)||16,radiusSize:((x=(S=f==null?void 0:f.options)==null?void 0:S.radiusSize)==null?void 0:x.value)??4},f.data=f.data.length?f.data:FI},o=f=>{var h;let p={color:"",text:""};return(h=f==null?void 0:f.status)==null||h.forEach(v=>{String(v.code)===String(f.statusValue)&&(p.text=v.text,p.color=v.color)}),p},s=f=>{n.conf.data.forEach((p,h)=>{var v,m,g,y,_,b;try{p.value=((m=(v=f.history[h])==null?void 0:v[0])==null?void 0:m[p.fv])||d6,p.statusValue=(y=(g=f.history[h])==null?void 0:g[0])==null?void 0:y[p.status_fv],tg.value=(b=(_=f.history[h])==null?void 0:_[0])==null?void 0:b.time}catch(C){console.error("设置历史数据时出错:",C),p.value=d6}})},c=f=>{const{data:p,common:h}=n.conf,v=h.source||"mosaic";let m="";h.multiObject||(m=Be(h,h.useAlias,n.uid)),p.forEach((g,y)=>{var _,b,C,w,S,x,E,L;h.multiObject&&(m=Be(g,h.useAlias,n.uid));try{g.value=((C=(b=(_=f[m])==null?void 0:_[v])==null?void 0:b.data)==null?void 0:C[g.fv])??d6,g.statusValue=(x=(S=(w=f[m])==null?void 0:w[v])==null?void 0:S.data)==null?void 0:x[g.status_fv],tg.value=(L=(E=f[m])==null?void 0:E[v])==null?void 0:L.datetime}catch(T){console.error("设置实时数据时出错:",T),g.value=d6}})},u=async()=>{try{const p=await new Ft().getHistoryData(n,"evn");s(p)}catch(f){console.error("获取历史数据时出错:",f)}finally{const f=t1(n.conf,n.uid,"evn");e.value&&e.value.port.postMessage({request:f,type:"send"}),r.value&&r.value.send(JSON.stringify(f))}},d=dt(i,200);return l.watch(()=>n.conf,()=>{n.mode==="edit"&&d()},{deep:!0}),l.watchEffect(()=>{n.conf.socketData&&c(n.conf.socketData)}),l.onMounted(()=>{i(),n.mode==="preview"&&u()}),(f,p)=>{var h,v,m,g,y,_,b,C,w,S,x,E,L,T,k;return l.openBlock(),l.createElementBlock("div",d5e,[l.createElementVNode("div",{class:"card-wrap",style:l.normalizeStyle({"background-color":o((v=(h=t.conf)==null?void 0:h.data)==null?void 0:v[0]).color||((m=a.value)==null?void 0:m.bgColor),"border-radius":`${(g=a.value)==null?void 0:g.radiusSize}px`,color:(y=a.value)==null?void 0:y.fontColor})},[l.createElementVNode("div",{class:"flex-[2_2_0%] border-b border-solid",style:l.normalizeStyle({fontSize:`${(_=a.value)==null?void 0:_.nameSize}px`,borderColor:(b=a.value)==null?void 0:b.fontColor})},l.toDisplayString(o((w=(C=t.conf)==null?void 0:C.data)==null?void 0:w[0]).text),5),l.createElementVNode("div",{class:"flex-[3_3_0%] border-b border-solid",style:l.normalizeStyle({fontSize:`${(S=a.value)==null?void 0:S.valueSize}px`,borderColor:(x=a.value)==null?void 0:x.fontColor})},l.toDisplayString((T=(L=(E=t.conf)==null?void 0:E.data)==null?void 0:L[0])==null?void 0:T.value),5),l.createElementVNode("div",{class:"flex-[2_2_0%]",style:l.normalizeStyle({fontSize:`${(k=a.value)==null?void 0:k.timeSize}px`})},l.toDisplayString(tg.value),5)],4),l.renderSlot(f.$slots,"default",{},void 0,!0)])}}}),[["__scopeId","data-v-ab656c77"]])},Symbol.toStringTag,{value:"Module"})),v5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e卡片组%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-649.000000,%20-221.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cg%20id='卡片查看模式_view-grid-card'%20transform='translate(649.583607,%20224.127953)'%3e%3cpath%20d='M14.4615385,0%20C15.3112073,0%2016,0.688792693%2016,1.53846154%20L16,1.53846154%20L16,10.4477993%20C16,11.2974681%2015.3112073,11.9862608%2014.4615385,11.9862608%20L14.4615385,11.9862608%20L1.53846154,11.9862608%20C0.688792693,11.9862608%200,11.2974681%200,10.4477993%20L0,10.4477993%20L0,1.53846154%20C0,0.688792693%200.688792693,0%201.53846154,0%20L1.53846154,0%20Z%20M14.4615385,1.23076923%20L1.53846154,1.23076923%20C1.36852777,1.23076923%201.23076923,1.36852777%201.23076923,1.53846154%20L1.23076923,1.53846154%20L1.23076923,10.4477993%20C1.23076923,10.6177331%201.36852777,10.7554916%201.53846154,10.7554916%20L1.53846154,10.7554916%20L14.4615385,10.7554916%20C14.6314722,10.7554916%2014.7692308,10.6177331%2014.7692308,10.4477993%20L14.7692308,10.4477993%20L14.7692308,1.53846154%20C14.7692308,1.36852777%2014.6314722,1.23076923%2014.4615385,1.23076923%20L14.4615385,1.23076923%20Z%20M6.14307642,3.81624937%20C6.48294396,3.81624937%206.75846104,4.09176645%206.75846104,4.43163399%20L6.75846104,4.43163399%20L6.75846104,7.55462685%20C6.75846104,7.89449439%206.48294396,8.17001146%206.14307642,8.17001146%20L6.14307642,8.17001146%20L2.95665531,8.17001146%20C2.61678777,8.17001146%202.3412707,7.89449439%202.3412707,7.55462685%20L2.3412707,7.55462685%20L2.3412707,4.43163399%20C2.3412707,4.09176645%202.61678777,3.81624937%202.95665531,3.81624937%20L2.95665531,3.81624937%20Z%20M13.247791,3.81624937%20C13.5876586,3.81624937%2013.8631757,4.09176645%2013.8631757,4.43163399%20L13.8631757,4.43163399%20L13.8631757,7.55462685%20C13.8631757,7.89449439%2013.5876586,8.17001146%2013.247791,8.17001146%20L13.247791,8.17001146%20L8.17088167,8.17001146%20C7.83101413,8.17001146%207.55549706,7.89449439%207.55549706,7.55462685%20L7.55549706,7.55462685%20L7.55549706,4.43163399%20C7.55549706,4.09176645%207.83101413,3.81624937%208.17088167,3.81624937%20L8.17088167,3.81624937%20Z%20M5.52707692,5.04615385%20L3.572,5.04615385%20L3.572,6.93846154%20L5.52707692,6.93846154%20L5.52707692,5.04615385%20Z%20M12.632,5.04615385%20L8.78553846,5.04615385%20L8.78553846,6.93846154%20L12.632,6.93846154%20L12.632,5.04615385%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",m5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e卡片组%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-649.000000,%20-221.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cg%20id='卡片查看模式_view-grid-card'%20transform='translate(649.583607,%20224.127953)'%3e%3cpath%20d='M14.4615385,0%20C15.3112073,0%2016,0.688792693%2016,1.53846154%20L16,1.53846154%20L16,10.4477993%20C16,11.2974681%2015.3112073,11.9862608%2014.4615385,11.9862608%20L14.4615385,11.9862608%20L1.53846154,11.9862608%20C0.688792693,11.9862608%200,11.2974681%200,10.4477993%20L0,10.4477993%20L0,1.53846154%20C0,0.688792693%200.688792693,0%201.53846154,0%20L1.53846154,0%20Z%20M14.4615385,1.23076923%20L1.53846154,1.23076923%20C1.36852777,1.23076923%201.23076923,1.36852777%201.23076923,1.53846154%20L1.23076923,1.53846154%20L1.23076923,10.4477993%20C1.23076923,10.6177331%201.36852777,10.7554916%201.53846154,10.7554916%20L1.53846154,10.7554916%20L14.4615385,10.7554916%20C14.6314722,10.7554916%2014.7692308,10.6177331%2014.7692308,10.4477993%20L14.7692308,10.4477993%20L14.7692308,1.53846154%20C14.7692308,1.36852777%2014.6314722,1.23076923%2014.4615385,1.23076923%20L14.4615385,1.23076923%20Z%20M6.14307642,3.81624937%20C6.48294396,3.81624937%206.75846104,4.09176645%206.75846104,4.43163399%20L6.75846104,4.43163399%20L6.75846104,7.55462685%20C6.75846104,7.89449439%206.48294396,8.17001146%206.14307642,8.17001146%20L6.14307642,8.17001146%20L2.95665531,8.17001146%20C2.61678777,8.17001146%202.3412707,7.89449439%202.3412707,7.55462685%20L2.3412707,7.55462685%20L2.3412707,4.43163399%20C2.3412707,4.09176645%202.61678777,3.81624937%202.95665531,3.81624937%20L2.95665531,3.81624937%20Z%20M13.247791,3.81624937%20C13.5876586,3.81624937%2013.8631757,4.09176645%2013.8631757,4.43163399%20L13.8631757,4.43163399%20L13.8631757,7.55462685%20C13.8631757,7.89449439%2013.5876586,8.17001146%2013.247791,8.17001146%20L13.247791,8.17001146%20L8.17088167,8.17001146%20C7.83101413,8.17001146%207.55549706,7.89449439%207.55549706,7.55462685%20L7.55549706,7.55462685%20L7.55549706,4.43163399%20C7.55549706,4.09176645%207.83101413,3.81624937%208.17088167,3.81624937%20L8.17088167,3.81624937%20Z%20M5.52707692,5.04615385%20L3.572,5.04615385%20L3.572,6.93846154%20L5.52707692,6.93846154%20L5.52707692,5.04615385%20Z%20M12.632,5.04615385%20L8.78553846,5.04615385%20L8.78553846,6.93846154%20L12.632,6.93846154%20L12.632,5.04615385%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",y5e={class:"echart-body"},b5e=["onClick"],_5e={class:"p-[6px] flex flex-wrap overflow-y-auto"},S5e={class:"h-[50%] flex items-center"},C5e={class:"h-[50%] flex items-center"},P2="--",w5e={DEFAULT_ICON:v5e,ACTIVE_ICON:m5e,NAME_CN:"卡片组",NAME_EN:"Group Card",ORDER:6},x5e={bgColor:{value:"#fff",type:"color",label:"背景颜色"},titleColor:{value:"#111",type:"color",label:"标题颜色"},textColor:{value:"#111",type:"color",label:"字体颜色"},itemColor:{value:"#e5e5e5",type:"color",label:"卡片颜色"},titleSize:{value:14,type:"number",label:"标题字体"},textSize:{value:13,type:"number",label:"卡片字体"},radiusSize:{value:8,type:"number",label:"圆角大小"},isHideTitle:{value:!1,type:"checkbox",label:"是否隐藏标题",repel:"isDynamic"},isDynamic:{value:!1,type:"checkbox",label:"是否动态标题"},cardWidth:{value:150,type:"number",label:"卡片宽度",dependent:"isDynamic"},cardHeight:{value:100,type:"number",label:"卡片高度",dependent:"isDynamic"},tags:{value:[{label:"TAB1",flag:[]}],type:"tags",label:"标签设置",dependent:"isDynamic"}},zI=[{name:"",fv:"",object_id:""}],ng=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:w5e,OPTIONS:x5e,DATA:zI,PARAMS:["name","fv","object_id"],SOURCE:["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],COMMON:{useAlias:!1,source:"mosaic"}},{__name:"groupCard",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},socketData:{type:Object,default:()=>({})}},setup(t){const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null)),n=t,a=l.ref({}),i=l.ref(0),o=l.computed(()=>{const{data:h,options:v}=n.conf,m=v.tags.value;return h.filter(g=>{var y;return(y=m[i.value])==null?void 0:y.flag.includes(g.fv)})}),s=h=>{i.value=h},c=()=>{var v,m,g,y,_,b,C,w,S,x,E,L,T,k,A,D,M,O,R,P,B,z,$,j;const{conf:h}=n;a.value={bgColor:((m=(v=h==null?void 0:h.options)==null?void 0:v.bgColor)==null?void 0:m.value)||"#fff",titleColor:((y=(g=h==null?void 0:h.options)==null?void 0:g.titleColor)==null?void 0:y.value)||"#111",textColor:((b=(_=h==null?void 0:h.options)==null?void 0:_.textColor)==null?void 0:b.value)||"#111",itemColor:((w=(C=h==null?void 0:h.options)==null?void 0:C.itemColor)==null?void 0:w.value)||"#e5e5e5",titleSize:((x=(S=h==null?void 0:h.options)==null?void 0:S.titleSize)==null?void 0:x.value)||14,textSize:((L=(E=h==null?void 0:h.options)==null?void 0:E.textSize)==null?void 0:L.value)||13,radiusSize:((k=(T=h==null?void 0:h.options)==null?void 0:T.radiusSize)==null?void 0:k.value)??4,cardHeight:((D=(A=h==null?void 0:h.options)==null?void 0:A.cardHeight)==null?void 0:D.value)??100,cardWidth:((O=(M=h==null?void 0:h.options)==null?void 0:M.cardWidth)==null?void 0:O.value)??150,isHideTitle:((P=(R=h==null?void 0:h.options)==null?void 0:R.isHideTitle)==null?void 0:P.value)??!1,isDynamic:((z=(B=h==null?void 0:h.options)==null?void 0:B.isDynamic)==null?void 0:z.value)??!1,tags:((j=($=h==null?void 0:h.options)==null?void 0:$.tags)==null?void 0:j.value)??[]},h.data=h.data.length?h.data:zI},u=h=>{const{data:v,common:m}=n.conf,g=m.source||"mosaic";["statistics","calculate"].includes(g)&&(h=Pr(h,v)),n.conf.data.forEach((y,_)=>{var b,C;try{y.value=((C=(b=h.history[_])==null?void 0:b[0])==null?void 0:C[y.fv])||P2}catch(w){console.error("设置历史数据时出错:",w),y.value=P2}})},d=h=>{const{data:v,common:m}=n.conf,g=m.source||"mosaic";let y="";m.multiObject||(y=Be(m,m.useAlias,n.uid)),v.forEach((_,b)=>{var C,w,S,x,E,L,T,k,A,D,M,O;m.multiObject&&(y=Be(_,m.useAlias,n.uid));try{["statistics","calculate"].includes(g)?_.value=((x=(S=(w=(C=h[y])==null?void 0:C[g])==null?void 0:w.data)==null?void 0:S[_.fv])==null?void 0:x.data)??P2:["statisticsRealtime","calculateRealtime"].includes(g)?_.value=((A=(k=(T=(L=(E=h[y])==null?void 0:E[g])==null?void 0:L.data)==null?void 0:T[_.fv])==null?void 0:k.data)==null?void 0:A.data)??P2:_.value=((O=(M=(D=h[y])==null?void 0:D[g])==null?void 0:M.data)==null?void 0:O[_.fv])??P2}catch(R){console.error("设置实时数据时出错:",R),_.value=P2}})},f=async()=>{try{const{data:h,common:v}=n.conf,m=v.source||"mosaic";if(!["statisticsRealtime","calculateRealtime"].includes(m)){const y=await new Ft().getHistoryData(n,"arrayCard");u(y)}}catch(h){console.error("获取历史数据时出错:",h)}finally{const h=t1(n.conf);e.value&&e.value.port.postMessage({request:h,type:"send"}),r.value&&r.value.send(JSON.stringify(h))}},p=dt(c,200);return l.watch(()=>n.conf,()=>{n.mode==="edit"&&p()},{deep:!0}),l.watchEffect(()=>{n.conf.socketData&&d(n.conf.socketData)}),l.onMounted(()=>{c(),n.mode==="preview"&&f()}),(h,v)=>{var m,g,y,_,b,C;return l.openBlock(),l.createElementBlock("div",{class:"component-container",style:l.normalizeStyle({background:(m=a.value)==null?void 0:m.bgColor,borderRadius:`${(g=a.value)==null?void 0:g.radiusSize}px`})},[(y=a.value)!=null&&y.isDynamic?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createElementVNode("div",{class:"flex border-b border-gray-200",style:l.normalizeStyle({color:a.value.titleColor,fontSize:`${a.value.titleSize}px`})},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(a.value.tags,(w,S)=>(l.openBlock(),l.createElementBlock("div",{key:S,class:l.normalizeClass(["py-[8px] px-[12px] cursor-pointer",{actived:i.value===S}]),onClick:x=>s(S)},l.toDisplayString(w.label),11,b5e))),128))],4),l.createElementVNode("div",_5e,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(o.value,(w,S)=>(l.openBlock(),l.createElementBlock("div",{key:S,class:"flex flex-col items-center rounded-[4px] m-[6px]",style:l.normalizeStyle({width:`${a.value.cardWidth}px`,height:`${a.value.cardHeight}px`,background:a.value.itemColor,fontSize:`${a.value.textSize}px`})},[l.createElementVNode("div",S5e,l.toDisplayString((w==null?void 0:w.value)||P2),1),l.createElementVNode("div",C5e,l.toDisplayString(w==null?void 0:w.name),1)],4))),128))])],64)):(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[(_=a.value)!=null&&_.isHideTitle?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:"echart-title",style:l.normalizeStyle({color:(b=a.value)==null?void 0:b.titleColor,fontSize:`${(C=a.value)==null?void 0:C.titleSize}px`})},l.toDisplayString(t.conf.name),5)),l.createElementVNode("div",y5e,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.conf.data,(w,S)=>{var x,E,L;return l.openBlock(),l.createElementBlock("div",{key:S,class:"flex-1 flex mx-[12px] px-[16px] mb-[12px] first:mt-[12px] rounded-[4px] items-center justify-between",style:l.normalizeStyle({background:(x=a.value)==null?void 0:x.itemColor,color:(E=a.value)==null?void 0:E.textColor,fontSize:`${(L=a.value)==null?void 0:L.textSize}px`})},[l.createElementVNode("div",null,l.toDisplayString(w.name),1),l.createElementVNode("div",null,l.toDisplayString(w.value),1)],4)}),128))])],64)),l.renderSlot(h.$slots,"default",{},void 0,!0)],4)}}}),[["__scopeId","data-v-1e993db1"]])},Symbol.toStringTag,{value:"Module"})),E5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e历程卡片%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-343.000000,%20-96.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M357.92069,97.4712644%20C358.682471,97.4712644%20359.3,98.0888001%20359.3,98.8505747%20L359.3,98.8505747%20L359.3,109.149425%20C359.3,109.911209%20358.682473,110.528736%20357.92069,110.528736%20L357.92069,110.528736%20L344.67931,110.528736%20C343.917536,110.528736%20343.3,109.911206%20343.3,109.149425%20L343.3,109.149425%20L343.3,98.8505747%20C343.3,98.0888025%20343.917538,97.4712644%20344.67931,97.4712644%20L344.67931,97.4712644%20Z%20M357.92069,98.7586207%20L344.67931,98.7586207%20C344.628525,98.7586207%20344.587356,98.7997897%20344.587356,98.8505747%20L344.587356,98.8505747%20L344.587356,109.149425%20C344.587356,109.200216%20344.62852,109.241379%20344.67931,109.241379%20L344.67931,109.241379%20L357.92069,109.241379%20C357.971486,109.241379%20358.012644,109.200221%20358.012644,109.149425%20L358.012644,109.149425%20L358.012644,98.8505747%20C358.012644,98.7997844%20357.97148,98.7586207%20357.92069,98.7586207%20L357.92069,98.7586207%20Z%20M352.143304,100.321839%20C353.302674,100.321839%20354.242529,101.261694%20354.242529,102.421063%20C354.242529,103.580433%20353.302674,104.520288%20352.143304,104.520288%20L351.219,104.520264%20L353.338314,107.008311%20C353.568858,107.278913%20353.536385,107.685172%20353.265783,107.915716%20C353.022242,108.123205%20352.668818,108.117651%20352.432502,107.917196%20L352.358379,107.843185%20L350.374,105.514264%20L350.374564,107.338576%20C350.374564,107.69407%20350.08638,107.982254%20349.730886,107.982254%20C349.405017,107.982254%20349.135706,107.740099%20349.093084,107.425919%20L349.087208,107.338576%20L349.087208,103.660415%20L349.093,103.572264%20L349.093103,100.321839%20L352.143304,100.321839%20Z%20M352.143304,101.609195%20L350.37954,101.609195%20L350.37954,103.232184%20L352.143304,103.232931%20C352.591687,103.232931%20352.955172,102.869446%20352.955172,102.421063%20C352.955172,102.007172%20352.645457,101.665619%20352.245143,101.615521%20L352.143304,101.609195%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",T5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e历程卡片%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-343.000000,%20-96.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M357.92069,97.4712644%20C358.682471,97.4712644%20359.3,98.0888001%20359.3,98.8505747%20L359.3,98.8505747%20L359.3,109.149425%20C359.3,109.911209%20358.682473,110.528736%20357.92069,110.528736%20L357.92069,110.528736%20L344.67931,110.528736%20C343.917536,110.528736%20343.3,109.911206%20343.3,109.149425%20L343.3,109.149425%20L343.3,98.8505747%20C343.3,98.0888025%20343.917538,97.4712644%20344.67931,97.4712644%20L344.67931,97.4712644%20Z%20M357.92069,98.7586207%20L344.67931,98.7586207%20C344.628525,98.7586207%20344.587356,98.7997897%20344.587356,98.8505747%20L344.587356,98.8505747%20L344.587356,109.149425%20C344.587356,109.200216%20344.62852,109.241379%20344.67931,109.241379%20L344.67931,109.241379%20L357.92069,109.241379%20C357.971486,109.241379%20358.012644,109.200221%20358.012644,109.149425%20L358.012644,109.149425%20L358.012644,98.8505747%20C358.012644,98.7997844%20357.97148,98.7586207%20357.92069,98.7586207%20L357.92069,98.7586207%20Z%20M352.143304,100.321839%20C353.302674,100.321839%20354.242529,101.261694%20354.242529,102.421063%20C354.242529,103.580433%20353.302674,104.520288%20352.143304,104.520288%20L351.219,104.520264%20L353.338314,107.008311%20C353.568858,107.278913%20353.536385,107.685172%20353.265783,107.915716%20C353.022242,108.123205%20352.668818,108.117651%20352.432502,107.917196%20L352.358379,107.843185%20L350.374,105.514264%20L350.374564,107.338576%20C350.374564,107.69407%20350.08638,107.982254%20349.730886,107.982254%20C349.405017,107.982254%20349.135706,107.740099%20349.093084,107.425919%20L349.087208,107.338576%20L349.087208,103.660415%20L349.093,103.572264%20L349.093103,100.321839%20L352.143304,100.321839%20Z%20M352.143304,101.609195%20L350.37954,101.609195%20L350.37954,103.232184%20L352.143304,103.232931%20C352.591687,103.232931%20352.955172,102.869446%20352.955172,102.421063%20C352.955172,102.007172%20352.645457,101.665619%20352.245143,101.615521%20L352.143304,101.609195%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",L5e={class:"w-full h-full relative"},k5e={class:"time flex-[1.3_1.3_0%]"},A5e={class:"flex-1 flex items-center justify-center"},D5e={class:"flex-1 flex items-center justify-center"},M5e={DEFAULT_ICON:E5e,ACTIVE_ICON:T5e,NAME_CN:"历程",NAME_EN:"Retainer",ORDER:4},O5e={nameSize:{value:16,type:"number",label:"名称字体"},valueSize:{value:24,type:"number",label:"数值字体"},timeSize:{value:14,type:"number",label:"时间字体"},radiusSize:{value:8,type:"number",label:"圆角大小"},bgColor:{value:"#73bff9",type:"color",label:"背景颜色"},fontColor:{value:"#fff",type:"color",label:"字体颜色"}},VI=[{source:"mosaic",status:[{code:0,text:"离线",color:"#a40e0e"}]}],ag=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:M5e,OPTIONS:O5e,DATA:VI,PARAMS:["fv","retainer","retainer_code","object_id","status","source"],SOURCE:["mosaic"],ITEMS:1},{__name:"rtn",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},socketData:{type:Object,default:()=>({})}},setup(t){const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null)),n={statusText:"离线",startTime:et().format("YYYY-MM-DD HH:mm:ss"),endTime:et().format("YYYY-MM-DD HH:mm:ss"),retainerTime:"",label_cn:"",value:0,color:"#ff0000"},a=t,i=l.ref({}),o=()=>{var v,m,g,y,_,b,C,w,S,x,E,L;const{conf:h}=a;i.value={bgColor:((m=(v=h==null?void 0:h.options)==null?void 0:v.bgColor)==null?void 0:m.value)||"#73bff9",fontColor:((y=(g=h==null?void 0:h.options)==null?void 0:g.fontColor)==null?void 0:y.value)||"#fff",nameSize:((b=(_=h==null?void 0:h.options)==null?void 0:_.nameSize)==null?void 0:b.value)||20,valueSize:((w=(C=h==null?void 0:h.options)==null?void 0:C.valueSize)==null?void 0:w.value)||32,timeSize:((x=(S=h==null?void 0:h.options)==null?void 0:S.timeSize)==null?void 0:x.value)||16,radiusSize:((L=(E=h==null?void 0:h.options)==null?void 0:E.radiusSize)==null?void 0:L.value)??4},h.data=h.data.length?h.data:VI};function s(h){let v=h/1e3;const m=Math.floor(v/3600),g=Math.floor(v/60)%60,y=Math.floor(v%60);return zero(m)+":"+zero(g)+":"+zero(y)}const c=(h,v)=>{const{conf:m,uid:g}=v;let y=m.retainer,_=m.retainer_code,b="",C=JSON.parse(sessionStorage.getItem("object_alias_uid_mapping"));m.useAlias&&(b=m.object_alias?C[m.object_alias]:g);let w=h.result[b].retainer.data[y]?h.result[b].retainer.data[y][_]:{};var S={};let x={};S=w.close||w.event||w.open||{},x.status=w.close?0:1,x.label_cn=S.label_local,x.startTime=w.open?et(w.open.opened_at).format("yyyy-MM-dd HH:mm:ss"):S.datetime,x.endTime=S.close_at?et(S.close_at).format("yyyy-MM-dd HH:mm:ss"):"";let E=null;return x.endTime&&(E=et(x.endTime).valueOf()-et(x.startTime).valueOf()),E?x.retainerTime=s(E):x.retainerTime="----",x.value=S.value?S.value[m.fv]:"",x},u=()=>{const{conf:h}=a;let v=h.data[0].status;v&&v.length&&v.forEach(m=>{m.code==v&&(n.statusText=m.text||n.statusText,n.value=m.color||n.value)})},d=h=>{let v=c(h,a);n.status=v.status,n.startTime=v.startTime,n.endTime=v.endTime,n.retainerTime=v.retainerTime,n.value=v.value,n.label_cn=v.label_cn,u()},f=async()=>{const h=$9e(a.conf,a.uid);e.value&&e.value.port.postMessage({request:h,type:"send"}),r.value&&r.value.send(JSON.stringify(h))},p=dt(o,200);return l.watch(()=>a.conf,()=>{a.mode==="edit"&&p()},{deep:!0}),l.watchEffect(()=>{a.conf.socketData&&d(a.conf.socketData)}),l.onMounted(()=>{o(),a.mode==="preview"&&f()}),(h,v)=>(l.openBlock(),l.createElementBlock("div",L5e,[l.createElementVNode("div",{class:"card-wrap flex flex-col",style:l.normalizeStyle({borderRadius:i.value.radiusSize+"px",backgroundColor:i.value.bgColor,color:i.value.fontColor})},[l.createElementVNode("div",{class:"title flex-1",style:l.normalizeStyle({fontSize:i.value.nameSize+"px",borderColor:i.value.fontColor})},l.toDisplayString(n.label_cn),5),l.createElementVNode("div",{class:"status flex-1",style:l.normalizeStyle({fontSize:i.value.statusSize+"px",borderColor:i.value.fontColor,color:n.color})},l.toDisplayString(n.statusText),5),l.createElementVNode("div",{class:"value flex-[2_2_0%]",style:l.normalizeStyle({fontSize:i.value.valueSize+"px",borderColor:i.value.fontColor})},l.toDisplayString(n.value),5),l.createElementVNode("div",k5e,[l.createElementVNode("div",{class:"flex-[2.5_2.5_0%] flex flex-col h-[100%] items-center justify-center",style:l.normalizeStyle({fontSize:i.value.timeSize+"px"})},[l.createElementVNode("div",A5e,l.toDisplayString(n.startTime),1),l.createElementVNode("div",D5e,l.toDisplayString(n.endTime||"----"),1)],4),l.createElementVNode("div",{class:"flex-1 flex h-[100%] items-center justify-center border-l border-solid",style:l.normalizeStyle({fontSize:i.value.timeSize+"px",borderColor:i.value.fontColor})},l.toDisplayString(n.retainerTime),5)])],4),l.renderSlot(h.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-3c981fff"]])},Symbol.toStringTag,{value:"Module"})),I5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e数值卡片%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-263.000000,%20-96.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M277.92069,97.4712644%20C278.682471,97.4712644%20279.3,98.0888001%20279.3,98.8505747%20L279.3,98.8505747%20L279.3,109.149425%20C279.3,109.911209%20278.682473,110.528736%20277.92069,110.528736%20L277.92069,110.528736%20L264.67931,110.528736%20C263.917536,110.528736%20263.3,109.911206%20263.3,109.149425%20L263.3,109.149425%20L263.3,98.8505747%20C263.3,98.0888025%20263.917538,97.4712644%20264.67931,97.4712644%20L264.67931,97.4712644%20Z%20M277.92069,98.7586207%20L264.67931,98.7586207%20C264.628525,98.7586207%20264.587356,98.7997897%20264.587356,98.8505747%20L264.587356,98.8505747%20L264.587356,109.149425%20C264.587356,109.200216%20264.62852,109.241379%20264.67931,109.241379%20L264.67931,109.241379%20L277.92069,109.241379%20C277.971486,109.241379%20278.012644,109.200221%20278.012644,109.149425%20L278.012644,109.149425%20L278.012644,98.8505747%20C278.012644,98.7997844%20277.97148,98.7586207%20277.92069,98.7586207%20L277.92069,98.7586207%20Z%20M273.874713,100.66937%20C274.200582,100.66937%20274.469893,100.911525%20274.512515,101.225705%20L274.518391,101.313048%20L274.518391,107.198106%20L274.513991,107.281483%20C274.538251,107.487919%20274.462246,107.702261%20274.292161,107.847183%20C274.044098,108.058501%20273.682057,108.048825%20273.445862,107.837313%20L273.384745,107.774638%20L269.368,103.060264%20L269.368966,107.198106%20C269.368966,107.553599%20269.080781,107.841784%20268.725287,107.841784%20C268.399418,107.841784%20268.130107,107.599629%20268.087485,107.285449%20L268.081609,107.198106%20L268.081609,101.313048%20L268.082187,101.285675%20C268.082816,101.270976%20268.083946,101.256302%20268.085574,101.24168%20L268.081609,101.313048%20C268.081609,101.26688%20268.08647,101.221847%20268.095707,101.178434%20C268.097405,101.170903%20268.099263,101.1629%20268.101275,101.154931%20C268.107261,101.130888%20268.114565,101.107741%20268.123099,101.085199%20C268.126373,101.076657%20268.129862,101.067978%20268.133545,101.059367%20C268.141412,101.041006%20268.150086,101.023157%20268.159537,101.005792%20C268.166518,100.992781%20268.174321,100.979531%20268.182629,100.966529%20C268.189963,100.955262%20268.197427,100.944361%20268.205211,100.933708%20C268.213941,100.92154%20268.223634,100.909215%20268.23383,100.897194%20C268.282315,100.841529%20268.332493,100.798881%20268.388316,100.764515%20L268.307839,100.823066%20C268.339551,100.796052%20268.373125,100.772649%20268.408061,100.752818%20C268.429973,100.740403%20268.452735,100.729194%20268.476205,100.719335%20C268.486406,100.715037%20268.496705,100.711027%20268.507074,100.707293%20C268.525188,100.700768%20268.543849,100.694982%20268.562851,100.690041%20C268.578079,100.686087%20268.593439,100.682694%20268.608873,100.679872%20C268.624283,100.677053%20268.639962,100.674777%20268.655813,100.673076%20C268.673322,100.671183%20268.69078,100.670023%20268.708242,100.669572%20L268.725287,100.66937%20L268.725287,100.66937%20L268.747519,100.669748%20C268.767719,100.670452%20268.787878,100.672102%20268.807925,100.674691%20L268.725287,100.66937%20C268.772556,100.66937%20268.818635,100.674465%20268.863005,100.684136%20C268.872752,100.686367%20268.882402,100.688708%20268.892,100.691272%20C268.915006,100.69732%20268.937508,100.704716%20268.959426,100.713279%20C268.969115,100.717097%20268.979031,100.721241%20268.988855,100.725641%20C269.007259,100.733908%20269.025055,100.742939%20269.042352,100.752748%20C269.0816,100.774844%20269.119243,100.801687%20269.154138,100.832936%20L269.185324,100.862839%20C269.195227,100.872957%20269.204798,100.883399%20269.214021,100.894149%20L269.215255,100.895611%20L273.231,105.609264%20L273.231034,101.313048%20C273.231034,100.957555%20273.519219,100.66937%20273.874713,100.66937%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",N5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e数值卡片%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-263.000000,%20-96.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M277.92069,97.4712644%20C278.682471,97.4712644%20279.3,98.0888001%20279.3,98.8505747%20L279.3,98.8505747%20L279.3,109.149425%20C279.3,109.911209%20278.682473,110.528736%20277.92069,110.528736%20L277.92069,110.528736%20L264.67931,110.528736%20C263.917536,110.528736%20263.3,109.911206%20263.3,109.149425%20L263.3,109.149425%20L263.3,98.8505747%20C263.3,98.0888025%20263.917538,97.4712644%20264.67931,97.4712644%20L264.67931,97.4712644%20Z%20M277.92069,98.7586207%20L264.67931,98.7586207%20C264.628525,98.7586207%20264.587356,98.7997897%20264.587356,98.8505747%20L264.587356,98.8505747%20L264.587356,109.149425%20C264.587356,109.200216%20264.62852,109.241379%20264.67931,109.241379%20L264.67931,109.241379%20L277.92069,109.241379%20C277.971486,109.241379%20278.012644,109.200221%20278.012644,109.149425%20L278.012644,109.149425%20L278.012644,98.8505747%20C278.012644,98.7997844%20277.97148,98.7586207%20277.92069,98.7586207%20L277.92069,98.7586207%20Z%20M273.874713,100.66937%20C274.200582,100.66937%20274.469893,100.911525%20274.512515,101.225705%20L274.518391,101.313048%20L274.518391,107.198106%20L274.513991,107.281483%20C274.538251,107.487919%20274.462246,107.702261%20274.292161,107.847183%20C274.044098,108.058501%20273.682057,108.048825%20273.445862,107.837313%20L273.384745,107.774638%20L269.368,103.060264%20L269.368966,107.198106%20C269.368966,107.553599%20269.080781,107.841784%20268.725287,107.841784%20C268.399418,107.841784%20268.130107,107.599629%20268.087485,107.285449%20L268.081609,107.198106%20L268.081609,101.313048%20L268.082187,101.285675%20C268.082816,101.270976%20268.083946,101.256302%20268.085574,101.24168%20L268.081609,101.313048%20C268.081609,101.26688%20268.08647,101.221847%20268.095707,101.178434%20C268.097405,101.170903%20268.099263,101.1629%20268.101275,101.154931%20C268.107261,101.130888%20268.114565,101.107741%20268.123099,101.085199%20C268.126373,101.076657%20268.129862,101.067978%20268.133545,101.059367%20C268.141412,101.041006%20268.150086,101.023157%20268.159537,101.005792%20C268.166518,100.992781%20268.174321,100.979531%20268.182629,100.966529%20C268.189963,100.955262%20268.197427,100.944361%20268.205211,100.933708%20C268.213941,100.92154%20268.223634,100.909215%20268.23383,100.897194%20C268.282315,100.841529%20268.332493,100.798881%20268.388316,100.764515%20L268.307839,100.823066%20C268.339551,100.796052%20268.373125,100.772649%20268.408061,100.752818%20C268.429973,100.740403%20268.452735,100.729194%20268.476205,100.719335%20C268.486406,100.715037%20268.496705,100.711027%20268.507074,100.707293%20C268.525188,100.700768%20268.543849,100.694982%20268.562851,100.690041%20C268.578079,100.686087%20268.593439,100.682694%20268.608873,100.679872%20C268.624283,100.677053%20268.639962,100.674777%20268.655813,100.673076%20C268.673322,100.671183%20268.69078,100.670023%20268.708242,100.669572%20L268.725287,100.66937%20L268.725287,100.66937%20L268.747519,100.669748%20C268.767719,100.670452%20268.787878,100.672102%20268.807925,100.674691%20L268.725287,100.66937%20C268.772556,100.66937%20268.818635,100.674465%20268.863005,100.684136%20C268.872752,100.686367%20268.882402,100.688708%20268.892,100.691272%20C268.915006,100.69732%20268.937508,100.704716%20268.959426,100.713279%20C268.969115,100.717097%20268.979031,100.721241%20268.988855,100.725641%20C269.007259,100.733908%20269.025055,100.742939%20269.042352,100.752748%20C269.0816,100.774844%20269.119243,100.801687%20269.154138,100.832936%20L269.185324,100.862839%20C269.195227,100.872957%20269.204798,100.883399%20269.214021,100.894149%20L269.215255,100.895611%20L273.231,105.609264%20L273.231034,101.313048%20C273.231034,100.957555%20273.519219,100.66937%20273.874713,100.66937%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",R5e={class:"w-full h-full relative"},_s="--",P5e="--",B5e={DEFAULT_ICON:I5e,ACTIVE_ICON:N5e,NAME_CN:"数值",NAME_EN:"Value",ORDER:3},F5e={nameSize:{value:20,type:"number",label:"名称字体"},valueSize:{value:32,type:"number",label:"数值字体"},timeSize:{value:16,type:"number",label:"时间字体"},radiusSize:{value:8,type:"number",label:"圆角大小"},bgColor:{value:"#73bff9",type:"color",label:"背景颜色"},fontColor:{value:"#fff",type:"color",label:"字体颜色"}},$I=[{name:"参数一",fv:"",object_id:""}],ig=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:B5e,OPTIONS:F5e,DATA:$I,PARAMS:["name","fv","object_id"],SOURCE:["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],ITEMS:1,COMMON:{useAlias:!1,source:"mosaic"}},{__name:"vlu",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},socketData:{type:Object,default:()=>({})}},setup(t){const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null)),n=t,a=l.ref({}),i=l.ref(et().format("YYYY-MM-DD HH:mm:ss")),o=()=>{var p,h,v,m,g,y,_,b,C,w,S,x;const{conf:f}=n;a.value={bgColor:((h=(p=f==null?void 0:f.options)==null?void 0:p.bgColor)==null?void 0:h.value)||"#73bff9",fontColor:((m=(v=f==null?void 0:f.options)==null?void 0:v.fontColor)==null?void 0:m.value)||"#fff",nameSize:((y=(g=f==null?void 0:f.options)==null?void 0:g.nameSize)==null?void 0:y.value)||20,valueSize:((b=(_=f==null?void 0:f.options)==null?void 0:_.valueSize)==null?void 0:b.value)||32,timeSize:((w=(C=f==null?void 0:f.options)==null?void 0:C.timeSize)==null?void 0:w.value)||16,radiusSize:((x=(S=f==null?void 0:f.options)==null?void 0:S.radiusSize)==null?void 0:x.value)??4},f.data=f.data.length?f.data:$I},s=f=>{const{data:p,common:h}=n.conf,v=h.source||"mosaic";["statistics","calculate"].includes(v)&&(f=Pr(f,p)),n.conf.data.forEach((m,g)=>{var y,_,b,C;try{m.value=((_=(y=f.history[g])==null?void 0:y[0])==null?void 0:_[m.fv])||_s,i.value=(C=(b=f.history[g])==null?void 0:b[0])==null?void 0:C.time}catch(w){console.error("设置历史数据时出错:",w),m.value=_s}})},c=f=>{const{data:p,common:h}=n.conf,v=h.source||"mosaic";let m="";h.multiObject||(m=Be(h,h.useAlias,n.uid)),p.forEach((g,y)=>{var _,b,C,w,S,x,E,L,T,k,A,D,M,O,R,P,B,z,$,j,Z,W;h.multiObject&&(m=Be(g,h.useAlias,n.uid));try{["statistics","calculate"].includes(v)?(g.value=((w=(C=(b=(_=f[m])==null?void 0:_[v])==null?void 0:b.data)==null?void 0:C[g.fv])==null?void 0:w.data)??_s,i.value=(L=(E=(x=(S=f[m])==null?void 0:S[v])==null?void 0:x.data)==null?void 0:E[g.fv])==null?void 0:L.start_time):["statisticsRealtime","calculateRealtime"].includes(v)?(g.value=((M=(D=(A=(k=(T=f[m])==null?void 0:T[v])==null?void 0:k.data)==null?void 0:A[g.fv])==null?void 0:D.data)==null?void 0:M.data)??_s,i.value=(B=(P=(R=(O=f[m])==null?void 0:O[v])==null?void 0:R.data)==null?void 0:P[g.fv])==null?void 0:B.datetime):(g.value=((j=($=(z=f[m])==null?void 0:z[v])==null?void 0:$.data)==null?void 0:j[g.fv])??_s,i.value=(W=(Z=f[m])==null?void 0:Z[v])==null?void 0:W.datetime)}catch(K){console.error("设置实时数据时出错:",K),g.value=_s}})},u=async()=>{try{const{data:f,common:p}=n.conf,h=p.source||"mosaic";if(!["statisticsRealtime","calculateRealtime"].includes(h)){const m=await new Ft().getHistoryData(n,"vlu");s(m)}}catch(f){console.error("获取历史数据时出错:",f)}finally{const f=t1(n.conf,n.uid);e.value&&e.value.port.postMessage({request:f,type:"send"}),r.value&&r.value.send(JSON.stringify(f))}},d=dt(o,200);return l.watch(()=>n.conf,()=>{n.mode==="edit"&&d()},{deep:!0}),l.watchEffect(()=>{n.conf.socketData&&c(n.conf.socketData)}),l.onMounted(()=>{o(),n.mode==="preview"&&u()}),(f,p)=>{var h,v,m,g,y,_;return l.openBlock(),l.createElementBlock("div",R5e,[l.createElementVNode("div",{class:"card-wrap",style:l.normalizeStyle({"background-color":a.value.bgColor,"border-radius":`${a.value.radiusSize}px`,color:a.value.fontColor})},[l.createElementVNode("div",{class:"flex-[2_2_0%] border-b border-solid",style:l.normalizeStyle({fontSize:`${a.value.nameSize}px`,borderColor:a.value.fontColor})},l.toDisplayString((m=(v=(h=t.conf)==null?void 0:h.data)==null?void 0:v[0])==null?void 0:m.name),5),l.createElementVNode("div",{class:"flex-[3_3_0%] border-b border-solid",style:l.normalizeStyle({fontSize:`${a.value.valueSize}px`,borderColor:a.value.fontColor})},l.toDisplayString(((_=(y=(g=t.conf)==null?void 0:g.data)==null?void 0:y[0])==null?void 0:_.value)||P5e),5),l.createElementVNode("div",{class:"flex-[2_2_0%]",style:l.normalizeStyle({fontSize:`${a.value.timeSize}px`})},l.toDisplayString(i.value),5)],4),l.renderSlot(f.$slots,"default",{},void 0,!0)])}}}),[["__scopeId","data-v-da50ffee"]])},Symbol.toStringTag,{value:"Module"})),UI="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1722502024182'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='21866'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='16'%20height='16'%3e%3cpath%20d='M1023.500049%2027.197344c-0.299971-2.099795-0.899912-4.19959-1.599844-6.099404l-0.599941-1.499854c-0.799922-1.899814-1.799824-3.699639-2.999707-5.399473-0.299971-0.399961-0.599941-0.799922-0.899913-1.299873-1.199883-1.599844-2.599746-3.199688-4.099599-4.49956-0.399961-0.299971-0.799922-0.699932-1.199883-0.999903-1.599844-1.299873-3.299678-2.499756-5.099502-3.499658-4.499561-2.499756-9.699053-3.899619-15.198516-3.899619H607.940631c-5.499463%200-10.698955%201.399863-15.198516%203.899619-1.799824%200.999902-3.499658%202.099795-5.099502%203.499658-0.399961%200.299971-0.799922%200.699932-1.199883%200.999903-1.499854%201.399863-2.899717%202.899717-4.099599%204.49956-0.299971%200.399961-0.599941%200.799922-0.899913%201.299873-1.199883%201.699834-2.099795%203.499658-2.999707%205.399473l-0.599941%201.499854c-0.699932%201.999805-1.299873%203.999609-1.599844%206.099404-0.19998%201.599844-0.399961%203.199688-0.399961%204.899522v447.956254h-63.99375v-351.965629c0-1.699834-0.09999-3.299678-0.399961-4.899521-0.299971-2.099795-0.899912-4.19959-1.599844-6.099404l-0.599941-1.499854c-0.799922-1.899814-1.799824-3.699639-2.999708-5.399473-0.299971-0.399961-0.599941-0.799922-0.899912-1.299873-1.199883-1.599844-2.599746-3.199688-4.099599-4.49956-0.399961-0.299971-0.799922-0.699932-1.199883-0.999903-1.599844-1.299873-3.299678-2.499756-5.099502-3.499658-4.499561-2.499756-9.699053-3.899619-15.198516-3.899619H319.968753v-63.993751c0-17.598281-14.398594-31.996875-31.996875-31.996875H31.996875c-17.598281%200-31.996875%2014.398594-31.996875%2031.996875v191.981252c0%2017.598281%2014.398594%2031.996875%2031.996875%2031.996875h255.975003c17.598281%200%2031.996875-14.398594%2031.996875-31.996875v-63.99375h127.987501v319.968753H319.968753v-63.993751c0-17.598281-14.398594-31.996875-31.996875-31.996875H31.996875c-17.598281%200-31.996875%2014.398594-31.996875%2031.996875v191.981252c0%2017.598281%2014.398594%2031.996875%2031.996875%2031.996875h255.975003c17.598281%200%2031.996875-14.398594%2031.996875-31.996875v-63.993751h127.987501v319.968753H319.968753v-63.99375c0-17.598281-14.398594-31.996875-31.996875-31.996876H31.996875c-17.598281%200-31.996875%2014.398594-31.996875%2031.996876v191.981251c0%2017.598281%2014.398594%2031.996875%2031.996875%2031.996876h255.975003c17.598281%200%2031.996875-14.398594%2031.996875-31.996876v-63.99375h159.984377c17.598281%200%2031.996875-14.398594%2031.996875-31.996875v-351.965629h63.99375v447.956254c0%2017.598281%2014.398594%2031.996875%2031.996876%2031.996876h383.962503c17.598281%200%2031.996875-14.398594%2031.996876-31.996876v-959.906259c0-1.599844-0.09999-3.199688-0.399961-4.799531zM255.975002%20192.081242H63.993751v-127.987501h191.981251v127.987501z%20m0%20383.962504H63.993751v-127.987501h191.981251v127.987501z%20m0%20383.962503H63.993751v-127.987501h191.981251v127.987501z%20m383.962504-895.912508h319.968753v895.912508H639.937506v-895.912508z'%20fill='%23030000'%20p-id='21867'%3e%3c/path%3e%3cpath%20d='M703.931257%20128.087491h63.99375v63.993751h-63.99375zM831.918758%20128.087491h63.993751v63.993751h-63.993751zM703.931257%20256.074993h63.99375v63.99375h-63.99375zM831.918758%20256.074993h63.993751v63.99375h-63.993751zM703.931257%20384.062494h63.99375v63.993751h-63.99375zM831.918758%20384.062494h63.993751v63.993751h-63.993751zM703.931257%20512.049995h63.99375v63.993751h-63.99375zM831.918758%20512.049995h63.993751v63.993751h-63.993751zM703.931257%20640.037496h63.99375v63.993751h-63.99375zM831.918758%20640.037496h63.993751v63.993751h-63.993751zM703.931257%20768.024998h63.99375v63.99375h-63.99375zM831.918758%20768.024998h63.993751v63.99375h-63.993751z'%20fill='%23030000'%20p-id='21868'%3e%3c/path%3e%3c/svg%3e",jI="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1722502024182'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='21866'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='16'%20height='16'%3e%3cpath%20d='M1023.500049%2027.197344c-0.299971-2.099795-0.899912-4.19959-1.599844-6.099404l-0.599941-1.499854c-0.799922-1.899814-1.799824-3.699639-2.999707-5.399473-0.299971-0.399961-0.599941-0.799922-0.899913-1.299873-1.199883-1.599844-2.599746-3.199688-4.099599-4.49956-0.399961-0.299971-0.799922-0.699932-1.199883-0.999903-1.599844-1.299873-3.299678-2.499756-5.099502-3.499658-4.499561-2.499756-9.699053-3.899619-15.198516-3.899619H607.940631c-5.499463%200-10.698955%201.399863-15.198516%203.899619-1.799824%200.999902-3.499658%202.099795-5.099502%203.499658-0.399961%200.299971-0.799922%200.699932-1.199883%200.999903-1.499854%201.399863-2.899717%202.899717-4.099599%204.49956-0.299971%200.399961-0.599941%200.799922-0.899913%201.299873-1.199883%201.699834-2.099795%203.499658-2.999707%205.399473l-0.599941%201.499854c-0.699932%201.999805-1.299873%203.999609-1.599844%206.099404-0.19998%201.599844-0.399961%203.199688-0.399961%204.899522v447.956254h-63.99375v-351.965629c0-1.699834-0.09999-3.299678-0.399961-4.899521-0.299971-2.099795-0.899912-4.19959-1.599844-6.099404l-0.599941-1.499854c-0.799922-1.899814-1.799824-3.699639-2.999708-5.399473-0.299971-0.399961-0.599941-0.799922-0.899912-1.299873-1.199883-1.599844-2.599746-3.199688-4.099599-4.49956-0.399961-0.299971-0.799922-0.699932-1.199883-0.999903-1.599844-1.299873-3.299678-2.499756-5.099502-3.499658-4.499561-2.499756-9.699053-3.899619-15.198516-3.899619H319.968753v-63.993751c0-17.598281-14.398594-31.996875-31.996875-31.996875H31.996875c-17.598281%200-31.996875%2014.398594-31.996875%2031.996875v191.981252c0%2017.598281%2014.398594%2031.996875%2031.996875%2031.996875h255.975003c17.598281%200%2031.996875-14.398594%2031.996875-31.996875v-63.99375h127.987501v319.968753H319.968753v-63.993751c0-17.598281-14.398594-31.996875-31.996875-31.996875H31.996875c-17.598281%200-31.996875%2014.398594-31.996875%2031.996875v191.981252c0%2017.598281%2014.398594%2031.996875%2031.996875%2031.996875h255.975003c17.598281%200%2031.996875-14.398594%2031.996875-31.996875v-63.993751h127.987501v319.968753H319.968753v-63.99375c0-17.598281-14.398594-31.996875-31.996875-31.996876H31.996875c-17.598281%200-31.996875%2014.398594-31.996875%2031.996876v191.981251c0%2017.598281%2014.398594%2031.996875%2031.996875%2031.996876h255.975003c17.598281%200%2031.996875-14.398594%2031.996875-31.996876v-63.99375h159.984377c17.598281%200%2031.996875-14.398594%2031.996875-31.996875v-351.965629h63.99375v447.956254c0%2017.598281%2014.398594%2031.996875%2031.996876%2031.996876h383.962503c17.598281%200%2031.996875-14.398594%2031.996876-31.996876v-959.906259c0-1.599844-0.09999-3.199688-0.399961-4.799531zM255.975002%20192.081242H63.993751v-127.987501h191.981251v127.987501z%20m0%20383.962504H63.993751v-127.987501h191.981251v127.987501z%20m0%20383.962503H63.993751v-127.987501h191.981251v127.987501z%20m383.962504-895.912508h319.968753v895.912508H639.937506v-895.912508z'%20fill='%23FFFFFF'%20p-id='21867'%3e%3c/path%3e%3cpath%20d='M703.931257%20128.087491h63.99375v63.993751h-63.99375zM831.918758%20128.087491h63.993751v63.993751h-63.993751zM703.931257%20256.074993h63.99375v63.99375h-63.99375zM831.918758%20256.074993h63.993751v63.99375h-63.993751zM703.931257%20384.062494h63.99375v63.993751h-63.99375zM831.918758%20384.062494h63.993751v63.993751h-63.993751zM703.931257%20512.049995h63.99375v63.993751h-63.99375zM831.918758%20512.049995h63.993751v63.993751h-63.993751zM703.931257%20640.037496h63.99375v63.993751h-63.99375zM831.918758%20640.037496h63.993751v63.993751h-63.993751zM703.931257%20768.024998h63.99375v63.99375h-63.99375zM831.918758%20768.024998h63.993751v63.99375h-63.993751z'%20fill='%23FFFFFF'%20p-id='21868'%3e%3c/path%3e%3c/svg%3e",z5e={class:"item-val"},V5e={key:0,class:"btn-wrap"},og=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:{DEFAULT_ICON:UI,ACTIVE_ICON:jI,NAME_CN:"项目采集",NAME_EN:"Project",ORDER:1},OPTIONS:{bgColor:{value:"#fff",type:"color",label:"背景颜色"},projectColor:{value:"#999",type:"color",label:"项目颜色"},paramColor:{value:"#333",type:"color",label:"参数颜色"},labelWidth:{value:64,type:"number",label:"标签宽度"},paramSize:{value:12,type:"number",label:"参数字体"},paramHeight:{value:32,type:"number",label:"参数项高度"},radiusSize:{value:8,type:"number",label:"圆角大小"},type:{value:"project",type:"radio",option:[{value:"project",label:"项目"},{value:"object",label:"对象"}],label:"采集类型"},isHideTitle:{value:!1,type:"checkbox",label:"是否隐藏标题"}},DATA:[{project_id:"",object_id:""}],PARAMS:["project_id","object_id"]},{__name:"clt",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""}},setup(t){const e=t,r=l.ref({}),n=l.ref([{name:"离线项目",data:[{name:"采集项",type:"Integer",unit:"℃",value:""}]}]),a=()=>{var h,v,m,g,y,_,b,C,w;const{options:p}=e.conf;r.value={bgColor:((h=p==null?void 0:p.bgColor)==null?void 0:h.value)||"#fff",projectColor:((v=p==null?void 0:p.projectColor)==null?void 0:v.value)||"#999",paramColor:((m=p==null?void 0:p.paramColor)==null?void 0:m.value)||"#333",labelWidth:((g=p==null?void 0:p.labelWidth)==null?void 0:g.value)||64,paramSize:((y=p==null?void 0:p.paramSize)==null?void 0:y.value)||12,paramHeight:((_=p==null?void 0:p.paramHeight)==null?void 0:_.value)||32,radiusSize:((b=p==null?void 0:p.radiusSize)==null?void 0:b.value)??4,isHideTitle:((C=p==null?void 0:p.isHideTitle)==null?void 0:C.value)??!1,type:((w=p==null?void 0:p.type)==null?void 0:w.value)??"project"}},i=async()=>{const{data:p}=e.conf;n.value=[];let h=p.filter(g=>g.project_id).map(g=>g.project_id);if(!h.length)return;let v={where_in:JSON.stringify([["uid",h.join(",")]])};const{result:m}=await ot.post("get_collect_list",v);m.data.length>0&&m.data.forEach(g=>{n.value.push({name:g.name,uid:g.uid,object_id:g.object_id,data:o(g.script)})})},o=p=>{let h=[];return p.forEach(v=>{h.push({name:v.label_loc,type:v.type,unit:v.unit,key:v.key})}),h},s=l.computed(()=>{let p=!0;return n.value.forEach(h=>{h.data.forEach(v=>{(v.value||v.value===0)&&(p=!1)})}),p}),c=()=>{e.mode!=="edit"&&(r.value.type==="object"?d():u())},u=()=>{let p=[];const h=J0.getUser();n.value.forEach(v=>{let m={};if(v.data.forEach(y=>{(y.value||y.value===0)&&(m[y.key]=["Integer","Float"].includes(y.type)?Number(y.value):y.type==="Bool"?!!y.value:y.value)}),!Object.keys(m).length)return;let g={name:v.name,value:m,collect_id:v.uid,collector:h.username};p.push(ot.post("add_collect_value_without_object",g))}),Promise.all(p).then(v=>{let m=!0;v.forEach(g=>{g.code!==200&&(m=!1,u1.error(g.msg))}),m&&u1.success("操作成功")})},d=()=>{let p=[];n.value.forEach(h=>{let v={};if(h.data.forEach(g=>{(g.value||g.value===0)&&(v[g.key]=["Integer","Float"].includes(g.type)?Number(g.value):g.type==="Bool"?!!g.value:g.value)}),!Object.keys(v).length)return;let m={name:h.name,value:v,collect_id:h.uid,object_id:h.object_id||e.uid};p.push(ot.post("collect_add",m))}),Promise.all(p).then(h=>{let v=!0;h.forEach(m=>{m.code!==200&&(v=!1,u1.error(m.msg))}),v&&u1.success("操作成功")})},f=dt(a,200);return l.watch(()=>e.conf,()=>{e.mode==="edit"&&f()},{deep:!0}),l.watch(()=>e.conf.data,()=>{i()},{deep:!0,immediate:!0}),l.onMounted(()=>{a()}),(p,h)=>{const v=ui,m=WO,g=RO,y=PO,_=ds;return l.openBlock(),l.createElementBlock("div",{class:"list-container",style:l.normalizeStyle({backgroundColor:r.value.bgColor,borderRadius:`${r.value.radiusSize}px`})},[r.value.isHideTitle?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:"echart-title",style:l.normalizeStyle({color:r.value.titleColor,fontSize:`${r.value.titleSize}px`})},l.toDisplayString(t.conf.name),5)),l.createElementVNode("div",{class:l.normalizeClass(["echart-body",r.value.isHideTitle?"h-[100%]":" h-[calc(100%-42px)]"])},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.value,(b,C)=>(l.openBlock(),l.createElementBlock("div",{key:C},[l.createElementVNode("div",{class:"item-title",style:l.normalizeStyle({fontSize:`${r.value.projectSize}px`,color:r.value.projectColor})},l.toDisplayString(b.name),5),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(b.data,(w,S)=>(l.openBlock(),l.createElementBlock("div",{class:"item-wrap",key:`${C}_${S}`},[l.createElementVNode("div",{class:"item-item",style:l.normalizeStyle({width:`${r.value.labelWidth}px`,fontSize:`${r.value.paramSize}px`,color:r.value.paramColor,height:`${r.value.paramHeight}px`})},l.toDisplayString(w.name)+": ",5),l.createElementVNode("div",z5e,[w.type==="String"?(l.openBlock(),l.createBlock(v,{key:0,type:"text",modelValue:w.value,"onUpdate:modelValue":x=>w.value=x},{suffix:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(w.unit),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])):l.createCommentVNode("",!0),w.type==="Integer"?(l.openBlock(),l.createBlock(m,{key:1,style:{width:"100%"},modelValue:w.value,"onUpdate:modelValue":x=>w.value=x,precision:0,controls:!1},{suffix:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(w.unit),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])):l.createCommentVNode("",!0),w.type==="Float"?(l.openBlock(),l.createBlock(m,{key:2,style:{width:"100%"},modelValue:w.value,"onUpdate:modelValue":x=>w.value=x,controls:!1},{suffix:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(w.unit),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])):l.createCommentVNode("",!0),w.type==="Bool"?(l.openBlock(),l.createBlock(y,{key:3,value:w.value,"onUpdate:value":x=>w.value=x},{default:l.withCtx(()=>[l.createVNode(g,{value:1},{default:l.withCtx(()=>h[0]||(h[0]=[l.createTextVNode("是")])),_:1}),l.createVNode(g,{value:0},{default:l.withCtx(()=>h[1]||(h[1]=[l.createTextVNode("否")])),_:1})]),_:2},1032,["value","onUpdate:value"])):l.createCommentVNode("",!0)])]))),128))]))),128)),n.value.length?(l.openBlock(),l.createElementBlock("div",V5e,[l.createVNode(_,{type:s.value?"default":"primary",disabled:s.value,onClick:c},{default:l.withCtx(()=>h[2]||(h[2]=[l.createTextVNode("确定")])),_:1},8,["type","disabled"])])):l.createCommentVNode("",!0)],2),l.renderSlot(p.$slots,"default",{},void 0,!0)],4)}}}),[["__scopeId","data-v-8d16689d"]])},Symbol.toStringTag,{value:"Module"})),$5e={class:"item-val"},U5e={key:0,class:"btn-wrap"},f6="--",sg=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:{DEFAULT_ICON:UI,ACTIVE_ICON:jI,NAME_CN:"定制采集",NAME_EN:"Customer",ORDER:1},OPTIONS:{bgColor:{value:"#fff",type:"color",label:"背景颜色"},paramColor:{value:"#333",type:"color",label:"参数颜色"},labelWidth:{value:64,type:"number",label:"标签宽度"},paramSize:{value:12,type:"number",label:"参数字体"},paramHeight:{value:32,type:"number",label:"参数项高度"},radiusSize:{value:8,type:"number",label:"圆角大小"},isHideTitle:{value:!1,type:"checkbox",label:"是否隐藏标题"}},DATA:[{label_cn:"",object_id:"",project_id:"",item_fv:"",collect:""}],PARAMS:["label_cn","object_id","project_id","item_fv","collect"],SOURCE:["mosaic"]},{__name:"cmc",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},sourceData:{type:Object,default:()=>({})}},setup(t){const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null)),{proxy:n}=l.getCurrentInstance(),a=t,i=l.ref({}),o=()=>{var m,g,y,_,b,C,w,S;const{options:v}=a.conf;i.value={bgColor:((m=v==null?void 0:v.bgColor)==null?void 0:m.value)||"#fff",paramColor:((g=v==null?void 0:v.paramColor)==null?void 0:g.value)||"#333",labelWidth:((y=v==null?void 0:v.labelWidth)==null?void 0:y.value)||64,paramSize:((_=v==null?void 0:v.paramSize)==null?void 0:_.value)||12,paramHeight:((b=v==null?void 0:v.paramHeight)==null?void 0:b.value)||32,radiusSize:((C=v==null?void 0:v.radiusSize)==null?void 0:C.value)??4,isHideTitle:((w=v==null?void 0:v.isHideTitle)==null?void 0:w.value)??!1,type:((S=v==null?void 0:v.type)==null?void 0:S.value)??"project"},s()},s=async()=>{let{data:v}=a.conf,m=v.filter(b=>b.project_id).map(b=>b.project_id);if(!m.length)return;let g={where_in:JSON.stringify([["uid",m.join(",")]])};const{result:y}=await ot.post("get_collect_list",g,!0);let _={};y.data.forEach(b=>{_[b.project_id]=b}),v=v.map(b=>{var C;if((C=_[b.project])!=null&&C.script){let w=_[b.project].script.find(S=>S.key===b.collect);b.unit=w==null?void 0:w.unit,b.label_cn=b.label_cn||(w==null?void 0:w.label_loc),b.type=w==null?void 0:w.type}return b})},c=l.computed(()=>{const{data:v}=a.conf;let m=!0;return v.forEach(g=>{(g.setting||g.setting===0)&&(m=!1)}),m}),u=async()=>{if(a.mode==="edit")return;const{data:v,uid:m,common:g}=a.conf,y=JSON.parse(sessionStorage.getItem(rr))||{};let _=[];if(v.forEach(C=>{let w=g.useAlias?y[C.object_alias]:C.object_id||m;if((C.setting||C.setting===0)&&w){let S={};S.collect_id=C.project_id,S.object_id=w,S.value={[C.collect]:["Integer","Float"].includes(C.type)?Number(C.setting):C.setting},S.name=C.label_cn,_.push(S)}}),_.length===0)return;const{result:b}=await ot.post("add_collect_value_plus",{data:_});b&&n.$message.success("操作成功")},d=v=>{const{data:m}=a.conf;m.forEach((g,y)=>{var _;try{g.value=((_=v.history[y])==null?void 0:_[0][g.item_fv])??f6}catch(b){console.error("设置实时数据时出错:",b),g.value=f6}})},f=v=>{const{common:m,data:g}=a.conf;let y="";m.multiObject||(y=Be(m,m.useAlias,a.uid)),g.forEach((_,b)=>{var C,w,S;m.multiObject&&(y=Be(_,m.useAlias,a.uid));try{_.value=((S=(w=(C=v[y])==null?void 0:C.mosaic)==null?void 0:w.data)==null?void 0:S[_.item_fv])??f6}catch(x){console.error("设置实时数据时出错:",x),_.value=f6}})},p=async()=>{try{const m=await new Ft().getHistoryData(a,"cmc");d(m)}catch(v){console.error("获取历史数据时出错:",v)}finally{const v=t1(a.conf,a.uid,"cmc");e.value&&e.value.port.postMessage({request:v,type:"send"}),r.value&&r.value.send(JSON.stringify(v))}},h=dt(o,200);return l.watch(()=>a.conf,()=>{a.mode==="edit"&&h()},{deep:!0}),l.onMounted(()=>{o(),a.mode==="preview"&&p()}),l.watchEffect(()=>{a.conf.socketData&&f(a.conf.socketData)}),(v,m)=>{var w,S;const g=ui,y=WO,_=RO,b=PO,C=ds;return l.openBlock(),l.createElementBlock("div",{class:"list-container",style:l.normalizeStyle({backgroundColor:i.value.bgColor,borderRadius:`${i.value.radiusSize}px`})},[i.value.isHideTitle?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:"echart-title",style:l.normalizeStyle({color:i.value.titleColor,fontSize:`${i.value.titleSize}px`})},l.toDisplayString(t.conf.name),5)),l.createElementVNode("div",{class:l.normalizeClass(["echart-body",i.value.isHideTitle?"h-[100%]":" h-[calc(100%-42px)]"])},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.conf.data,(x,E)=>(l.openBlock(),l.createElementBlock("div",{key:E,class:"item-wrap"},[l.createElementVNode("div",{class:"item-item",style:l.normalizeStyle({width:`${i.value.labelWidth}px`,fontSize:`${i.value.paramSize}px`,color:i.value.paramColor})},l.toDisplayString(x.label_cn)+": ",5),l.createElementVNode("div",$5e,[x.type==="String"?(l.openBlock(),l.createBlock(g,{key:0,type:"text",class:"w-full",modelValue:x.setting,"onUpdate:modelValue":L=>x.setting=L},{suffix:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(x.unit),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])):l.createCommentVNode("",!0),x.type==="Integer"?(l.openBlock(),l.createBlock(y,{key:1,style:{width:"100%"},modelValue:x.setting,"onUpdate:modelValue":L=>x.setting=L,precision:0,controls:!1},{suffix:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(x.unit),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])):l.createCommentVNode("",!0),x.type==="Float"?(l.openBlock(),l.createBlock(y,{key:2,style:{width:"100%"},modelValue:x.setting,"onUpdate:modelValue":L=>x.setting=L,controls:!1},{suffix:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(x.unit),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])):l.createCommentVNode("",!0),x==="Boolean"?(l.openBlock(),l.createBlock(b,{key:3,class:"w-full",modelValue:x.setting,"onUpdate:modelValue":L=>x.setting=L},{default:l.withCtx(()=>[l.createVNode(_,{value:1},{default:l.withCtx(()=>m[0]||(m[0]=[l.createTextVNode("是")])),_:1}),l.createVNode(_,{value:0},{default:l.withCtx(()=>m[1]||(m[1]=[l.createTextVNode("否")])),_:1})]),_:2},1032,["modelValue","onUpdate:modelValue"])):l.createCommentVNode("",!0)]),l.createElementVNode("div",{class:"item-label",style:l.normalizeStyle({fontSize:`${i.value.paramSize}px`})},l.toDisplayString(x.value||"--"),5)]))),128)),(S=(w=t.conf)==null?void 0:w.data)!=null&&S.length?(l.openBlock(),l.createElementBlock("div",U5e,[l.createVNode(C,{type:c.value?"default":"primary",disabled:c.value,onClick:u},{default:l.withCtx(()=>m[2]||(m[2]=[l.createTextVNode("确定")])),_:1},8,["type","disabled"])])):l.createCommentVNode("",!0)],2),l.renderSlot(v.$slots,"default",{},void 0,!0)],4)}}}),[["__scopeId","data-v-eafa9073"]])},Symbol.toStringTag,{value:"Module"})),lg="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e按键%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-886.000000,%20-98.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M893.138502,101.586835%20C894.044637,101.586835%20894.786323,102.290766%20894.846557,103.181623%20L894.850507,103.29884%20L894.850164,105.250033%20C895.049594,105.168669%20895.267809,105.123832%20895.4965,105.123832%20C895.953595,105.123832%20896.368843,105.302957%20896.675881,105.594843%20C896.982283,105.302902%20897.397474,105.123832%20897.854498,105.123832%20C898.311593,105.123832%20898.726841,105.302957%20899.033879,105.594843%20C899.340281,105.302902%20899.755472,105.123832%20900.212496,105.123832%20C901.118631,105.123832%20901.860317,105.827763%20901.920552,106.718621%20L901.924501,106.835837%20L901.924501,109.783335%20C901.924501,112.514394%20899.757663,114.739339%20897.049377,114.832782%20L896.871999,114.835837%20L896.478999,114.835837%20C893.74794,114.835837%20891.522994,112.668999%20891.429552,109.960713%20L891.426497,109.783335%20L891.426497,103.29884%20C891.426497,102.353308%20892.19297,101.586835%20893.138502,101.586835%20Z%20M893.138502,102.652847%20C892.809157,102.652847%20892.537401,102.899268%20892.497541,103.217804%20L892.492508,103.29884%20L892.492508,109.783335%20C892.492508,111.92998%20894.189186,113.680325%20896.314676,113.7665%20L896.478999,113.769825%20L896.871999,113.769825%20C899.018645,113.769825%20900.768989,112.073147%20900.855164,109.947658%20L900.858489,109.783335%20L900.858489,106.835837%20C900.858489,106.479047%20900.569286,106.189844%20900.212496,106.189844%20C899.883151,106.189844%20899.611396,106.436265%20899.571536,106.754801%20L899.566503,106.835837%20L899.566503,108.800835%20C899.566503,109.065769%20899.373209,109.285557%20899.119953,109.326865%20L899.033497,109.333841%20L899.033497,109.333841%20C898.763657,109.333841%20898.540651,109.133322%20898.505357,108.873161%20L898.500491,108.800835%20L898.500491,106.835837%20C898.500491,106.479047%20898.211288,106.189844%20897.854498,106.189844%20C897.525153,106.189844%20897.253397,106.436265%20897.213538,106.754801%20L897.208505,106.835837%20L897.208505,108.800835%20C897.208505,109.065769%20897.015211,109.285557%20896.761955,109.326865%20L896.675499,109.333841%20L896.675499,109.333841%20C896.405659,109.333841%20896.182653,109.133322%20896.147359,108.873161%20L896.142493,108.800835%20L896.142493,106.835837%20C896.142493,106.479047%20895.85329,106.189844%20895.4965,106.189844%20C895.167155,106.189844%20894.895399,106.436265%20894.85554,106.754801%20L894.850507,106.835837%20L894.850507,108.800835%20C894.850507,109.095206%20894.611872,109.333841%20894.317501,109.333841%20C894.047661,109.333841%20893.824654,109.133322%20893.789361,108.873161%20L893.784495,108.800835%20L893.784495,103.29884%20C893.784495,102.94205%20893.495292,102.652847%20893.138502,102.652847%20Z%20M893.138502,98.835837%20C894.570888,98.835837%20895.890952,99.5159517%20896.727135,100.645114%20C897.020026,101.040583%20897.246061,101.482105%20897.394824,101.952945%20C897.531296,102.384917%20897.601504,102.83747%20897.601504,103.29884%20C897.601504,103.593211%20897.36287,103.831846%20897.068499,103.831846%20C896.774128,103.831846%20896.535493,103.593211%20896.535493,103.29884%20C896.535493,102.946746%20896.482084,102.602478%20896.378338,102.274094%20C896.265296,101.916313%20896.093418,101.580578%20895.870466,101.279541%20C895.233217,100.419016%20894.229425,99.9018487%20893.138502,99.9018487%20C892.047579,99.9018487%20891.043785,100.419016%20890.406523,101.279545%20C890.183568,101.580613%20890.011676,101.916361%20889.898655,102.274077%20C889.794914,102.602457%20889.741511,102.946727%20889.741511,103.29884%20C889.741511,103.593211%20889.502876,103.831846%20889.208505,103.831846%20C888.914134,103.831846%20888.675499,103.593211%20888.675499,103.29884%20C888.675499,102.837459%20888.745699,102.384907%20888.882167,101.952933%20C889.030911,101.482155%20889.256954,101.040636%20889.549842,100.645133%20C890.386055,99.5159492%20891.706118,98.835837%20893.138502,98.835837%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",cg="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e按键%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-886.000000,%20-98.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M893.138502,101.586835%20C894.044637,101.586835%20894.786323,102.290766%20894.846557,103.181623%20L894.850507,103.29884%20L894.850164,105.250033%20C895.049594,105.168669%20895.267809,105.123832%20895.4965,105.123832%20C895.953595,105.123832%20896.368843,105.302957%20896.675881,105.594843%20C896.982283,105.302902%20897.397474,105.123832%20897.854498,105.123832%20C898.311593,105.123832%20898.726841,105.302957%20899.033879,105.594843%20C899.340281,105.302902%20899.755472,105.123832%20900.212496,105.123832%20C901.118631,105.123832%20901.860317,105.827763%20901.920552,106.718621%20L901.924501,106.835837%20L901.924501,109.783335%20C901.924501,112.514394%20899.757663,114.739339%20897.049377,114.832782%20L896.871999,114.835837%20L896.478999,114.835837%20C893.74794,114.835837%20891.522994,112.668999%20891.429552,109.960713%20L891.426497,109.783335%20L891.426497,103.29884%20C891.426497,102.353308%20892.19297,101.586835%20893.138502,101.586835%20Z%20M893.138502,102.652847%20C892.809157,102.652847%20892.537401,102.899268%20892.497541,103.217804%20L892.492508,103.29884%20L892.492508,109.783335%20C892.492508,111.92998%20894.189186,113.680325%20896.314676,113.7665%20L896.478999,113.769825%20L896.871999,113.769825%20C899.018645,113.769825%20900.768989,112.073147%20900.855164,109.947658%20L900.858489,109.783335%20L900.858489,106.835837%20C900.858489,106.479047%20900.569286,106.189844%20900.212496,106.189844%20C899.883151,106.189844%20899.611396,106.436265%20899.571536,106.754801%20L899.566503,106.835837%20L899.566503,108.800835%20C899.566503,109.065769%20899.373209,109.285557%20899.119953,109.326865%20L899.033497,109.333841%20L899.033497,109.333841%20C898.763657,109.333841%20898.540651,109.133322%20898.505357,108.873161%20L898.500491,108.800835%20L898.500491,106.835837%20C898.500491,106.479047%20898.211288,106.189844%20897.854498,106.189844%20C897.525153,106.189844%20897.253397,106.436265%20897.213538,106.754801%20L897.208505,106.835837%20L897.208505,108.800835%20C897.208505,109.065769%20897.015211,109.285557%20896.761955,109.326865%20L896.675499,109.333841%20L896.675499,109.333841%20C896.405659,109.333841%20896.182653,109.133322%20896.147359,108.873161%20L896.142493,108.800835%20L896.142493,106.835837%20C896.142493,106.479047%20895.85329,106.189844%20895.4965,106.189844%20C895.167155,106.189844%20894.895399,106.436265%20894.85554,106.754801%20L894.850507,106.835837%20L894.850507,108.800835%20C894.850507,109.095206%20894.611872,109.333841%20894.317501,109.333841%20C894.047661,109.333841%20893.824654,109.133322%20893.789361,108.873161%20L893.784495,108.800835%20L893.784495,103.29884%20C893.784495,102.94205%20893.495292,102.652847%20893.138502,102.652847%20Z%20M893.138502,98.835837%20C894.570888,98.835837%20895.890952,99.5159517%20896.727135,100.645114%20C897.020026,101.040583%20897.246061,101.482105%20897.394824,101.952945%20C897.531296,102.384917%20897.601504,102.83747%20897.601504,103.29884%20C897.601504,103.593211%20897.36287,103.831846%20897.068499,103.831846%20C896.774128,103.831846%20896.535493,103.593211%20896.535493,103.29884%20C896.535493,102.946746%20896.482084,102.602478%20896.378338,102.274094%20C896.265296,101.916313%20896.093418,101.580578%20895.870466,101.279541%20C895.233217,100.419016%20894.229425,99.9018487%20893.138502,99.9018487%20C892.047579,99.9018487%20891.043785,100.419016%20890.406523,101.279545%20C890.183568,101.580613%20890.011676,101.916361%20889.898655,102.274077%20C889.794914,102.602457%20889.741511,102.946727%20889.741511,103.29884%20C889.741511,103.593211%20889.502876,103.831846%20889.208505,103.831846%20C888.914134,103.831846%20888.675499,103.593211%20888.675499,103.29884%20C888.675499,102.837459%20888.745699,102.384907%20888.882167,101.952933%20C889.030911,101.482155%20889.256954,101.040636%20889.549842,100.645133%20C890.386055,99.5159492%20891.706118,98.835837%20893.138502,98.835837%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",j5e={class:"w-full h-full flex"},H5e={DEFAULT_ICON:lg,ACTIVE_ICON:cg,NAME_CN:"固值录入",NAME_EN:"Value Entry",ORDER:3},h6="--",ug=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:H5e,OPTIONS:{bgColor:{value:"#fff",type:"color",label:"背景颜色"},textColor:{value:"#111",type:"color",label:"字体颜色"},textSize:{value:14,type:"number",label:"字体颜色"},radiusSize:{value:8,type:"number",label:"圆角大小"},isBold:{value:!1,type:"checkbox",label:"是否加粗"}},COMMON:{useAlias:!1,source:"mosaic"},PARAMS:["fv","project_id","color"],SOURCE:["mosaic"],DATA:[{fv:"",project_id:"",object_id:"",commands:[{value:"",name:"",color:"#4162ff",items:[{code:"",value:""}]}]}],ITEMS:1},{__name:"vlt",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""}},setup(t){const e=l.ref(l.inject("sharedWorker",null)),r=t,n=l.ref({}),a=()=>{var h,v,m,g,y,_,b,C,w,S;const{conf:p}=r;n.value={bgColor:((v=(h=p==null?void 0:p.options)==null?void 0:h.bgColor)==null?void 0:v.value)||"#fff",textColor:((g=(m=p==null?void 0:p.options)==null?void 0:m.textColor)==null?void 0:g.value)||"#111",textSize:((_=(y=p==null?void 0:p.options)==null?void 0:y.textSize)==null?void 0:_.value)||16,radiusSize:((C=(b=p==null?void 0:p.options)==null?void 0:b.radiusSize)==null?void 0:C.value)??4,isBold:((S=(w=p==null?void 0:p.options)==null?void 0:w.isBold)==null?void 0:S.value)||!1}},i=dt(a,200),o=p=>{const{data:h}=r.conf;h.forEach((v,m)=>{var g,y;try{v.value=((y=(g=p.history[m])==null?void 0:g[0])==null?void 0:y[v.fv])||h6}catch(_){console.error("设置历史数据时出错:",_),v.value=h6}})},s=p=>{const{common:h,data:v}=r.conf,m=h.source||"mosaic";let g=Be(h,h.useAlias,r.uid);v.forEach((y,_)=>{var b,C,w;try{y.value=((w=(C=(b=p[g])==null?void 0:b[m])==null?void 0:C.data)==null?void 0:w[y.fv])??h6}catch(S){console.error("设置实时数据时出错:",S),y.value=h6}})},c=l.computed(()=>{const{data:p}=r.conf,h=p[0];return h.commands.find(m=>String(m.value)===String(h.value))||{}||{}}),u=async()=>{const{data:p,common:h}=r.conf,v=p[0];let m=Be(h,h.useAlias,r.uid);const g=v.commands.find(C=>String(C.value)===String(v.value))||{};if(!g.items)return;let y={};g.items.forEach(C=>{var S;let w=((S=d.script.find(x=>x.key===C.code))==null?void 0:S.type)||"String";y[C.code]=C.value,["Integer","Float"].includes(w)&&(y[C.code]=Number(C.value)),w==="Boolean"&&(y[C.code]=C.value==="true")});let _={name:d.name,value:y,collect_id:v.project_id,object_id:m};const{result:b}=await ot.post("collect_add",_)};let d={};const f=async()=>{const{data:p}=r.conf,{result:h}=await ot.post("get_collect_list",{where_and:[["uid","=",p[0].project_id]]});try{d=h.data[0]||{};const m=await new Ft().getHistoryData(r);o(m)}catch(v){console.error("获取历史数据时出错:",v)}finally{const v=t1(r.conf,r.uid);e.value.port.postMessage({request:v,type:"send"})}};return l.watch(()=>r.conf,()=>{r.mode==="edit"&&i()},{deep:!0}),l.watchEffect(()=>{r.conf.socketData&&s(r.conf.socketData)}),l.onMounted(()=>{a(),r.mode==="preview"&&f()}),(p,h)=>{var v,m,g;return l.openBlock(),l.createElementBlock("div",j5e,[l.createElementVNode("div",{class:"btn-wrap",style:l.normalizeStyle({backgroundColor:n.value.bgColor,color:c.value.color||n.value.textColor,borderRadius:`${n.value.radiusSize}px`,fontSize:`${n.value.textSize}px`,backgroundImage:`url(${(g=(m=(v=t.conf)==null?void 0:v.options)==null?void 0:m.bgImg)==null?void 0:g.value})`,fontWeight:n.value.isBold?"bold":"normal"}),onClick:u},l.toDisplayString(c.value.name||"--"),5),l.renderSlot(p.$slots,"default",{},void 0,!0)])}}}),[["__scopeId","data-v-fb43ed00"]])},Symbol.toStringTag,{value:"Module"})),G5e={class:"w-full h-full flex"},dg=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:{DEFAULT_ICON:lg,ACTIVE_ICON:cg,NAME_CN:"按键",NAME_EN:"Button",ORDER:3},OPTIONS:{bgColor:{value:"#fff",type:"color",label:"背景颜色"},textColor:{value:"#111",type:"color",label:"字体颜色"},textSize:{value:14,type:"number",label:"字体颜色"},radiusSize:{value:8,type:"number",label:"圆角大小"},category:{value:"close",type:"select",label:"按键事件",options:[{label:"关闭",value:"close"},{label:"跳转",value:"jump"},{label:"返回",value:"back"},{label:"刷新",value:"refresh"},{label:"全屏",value:"full"}]},name:{value:"",type:"string",label:"按键名称"},bgImg:{value:"",type:"image",label:"背景图片"},jumpType:{value:"url",type:"radio",option:[{value:"url",label:"地址"},{value:"uid",label:"编号"}],label:"跳转方案",dependent:"category",dependentValue:"jump"},jumpParam:{value:"",type:"string",label:"跳转参数",dependent:"category",dependentValue:"jump"}}},{__name:"btn",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""}},setup(t){const e=t,r=l.ref({}),n=()=>{var v,m,g,y,_,b,C,w;const{conf:h}=e;r.value={bgColor:((m=(v=h==null?void 0:h.options)==null?void 0:v.bgColor)==null?void 0:m.value)||"#fff",textColor:((y=(g=h==null?void 0:h.options)==null?void 0:g.textColor)==null?void 0:y.value)||"#111",textSize:((b=(_=h==null?void 0:h.options)==null?void 0:_.textSize)==null?void 0:b.value)||16,radiusSize:((w=(C=h==null?void 0:h.options)==null?void 0:C.radiusSize)==null?void 0:w.value)??4}},a=()=>{window.close()},i=async()=>{const{options:h}=e.conf;let v=h.jumpParam.value;if(v){let m=h.jumpType.value==="url"?v:await o({uid:v});if(m.startsWith("mixui/#/")||m.startsWith("/mixui/#/")){let _=m.split("mixui/#/")[1];m=`${window.location.origin}/mixui/#/${_}`}console.log(m,"url");const g=window.location.pathname+window.location.hash.split("?")[0],y=m.split("?")[0];if(g===y){const _=m+(m.includes("?")?"&":"?")+"_t="+Date.now();window.location.href=_,setTimeout(()=>{window.location.reload(!0)},100)}else{try{const _=new URL(m),w=_.hash.substring(1).split("/").map(S=>{try{const x=decodeURIComponent(S);return encodeURIComponent(x)}catch{return encodeURIComponent(S)}}).join("/");_.hash=w,m=_.toString()}catch(_){console.warn("URL解析失败,使用原始URL",_)}window.location.href=m}}else{u1.error("未设置跳转参数");return}},o=async h=>{var g;const{result:v}=await ot.post("get_object_item",{uid:h.uid},!0);let m={};if((g=v.dashboard_list)!=null&&g.length&&(m=v.dashboard_list.find(y=>y.type==="show")),Object.keys(m).length)return`${location.origin}/mixui/#/preview/${m.uid}/${m.name}?object_id=${h.uid}`;u1({message:"该对象未配置大屏脚本",type:"warning"})},d={close:a,jump:i,back:()=>{window.history.back(),setTimeout(function(){location.reload()},10)},refresh:()=>{window.location.reload()},full:()=>{document.fullscreenElement?document.exitFullscreen():document.documentElement.requestFullscreen()}},f=()=>{const{options:h}=e.conf;e.mode==="preview"&&d[h.category.value]()},p=dt(n,200);return l.watch(()=>e.conf,()=>{e.mode==="edit"&&p()},{deep:!0}),l.onMounted(()=>{n()}),(h,v)=>{var m,g,y,_,b,C;return l.openBlock(),l.createElementBlock("div",G5e,[l.createElementVNode("div",{class:"btn-wrap",style:l.normalizeStyle({backgroundColor:r.value.bgColor,color:r.value.textColor,borderRadius:`${r.value.radiusSize}px`,fontSize:`${r.value.textSize}px`,backgroundImage:`url(${(y=(g=(m=t.conf)==null?void 0:m.options)==null?void 0:g.bgImg)==null?void 0:y.value})`}),onClick:f},l.toDisplayString(((C=(b=(_=t.conf)==null?void 0:_.options)==null?void 0:b.name)==null?void 0:C.value)||""),5),l.renderSlot(h.$slots,"default",{},void 0,!0)])}}}),[["__scopeId","data-v-34c9fb05"]])},Symbol.toStringTag,{value:"Module"})),W5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e时间%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-646.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M657.730732,99.4163895%20C658.056601,99.4163895%20658.325912,99.6585445%20658.368534,99.9727243%20L658.37441,100.060068%20L658.374333,100.577389%20L661.215306,100.577914%20C661.952401,100.577914%20662.55813,101.14029%20662.626842,101.859376%20L662.633333,101.995942%20L662.633333,113.998362%20C662.633333,114.781529%20661.998472,115.416389%20661.215306,115.416389%20L661.215306,115.416389%20L648.051361,115.416389%20C647.268203,115.416389%20646.633333,114.781526%20646.633333,113.998362%20L646.633333,113.998362%20L646.633333,101.995942%20C646.633333,101.212786%20647.268206,100.577914%20648.051361,100.577914%20L648.051361,100.577914%20L650.891333,100.577389%20L650.892257,100.060068%20C650.892257,99.704574%20651.180441,99.4163895%20651.535935,99.4163895%20C651.861804,99.4163895%20652.131115,99.6585445%20652.173737,99.9727243%20L652.179613,100.060068%20L652.179333,100.577389%20L657.086333,100.577389%20L657.087054,100.060068%20C657.087054,99.704574%20657.375238,99.4163895%20657.730732,99.4163895%20Z%20M661.34567,106.510687%20L647.920383,106.510687%20L647.92069,113.998362%20C647.92069,114.056101%20647.958128,114.105087%20648.010057,114.122372%20L648.010057,114.122372%20L648.051361,114.129033%20L661.215306,114.129033%20C661.287485,114.129033%20661.345977,114.070541%20661.345977,113.998362%20L661.345977,113.998362%20L661.34567,106.510687%20Z%20M658.505082,111.031634%20C658.860575,111.031634%20659.14876,111.319819%20659.14876,111.675313%20C659.14876,112.001182%20658.906605,112.270493%20658.592425,112.313115%20L658.505082,112.318991%20L656.182033,112.318991%20C655.826539,112.318991%20655.538355,112.030806%20655.538355,111.675313%20C655.538355,111.349443%20655.78051,111.080133%20656.094689,111.037511%20L656.182033,111.031634%20L658.505082,111.031634%20Z%20M653.084634,111.031634%20C653.440128,111.031634%20653.728312,111.319819%20653.728312,111.675313%20C653.728312,112.001182%20653.486157,112.270493%20653.171977,112.313115%20L653.084634,112.318991%20L650.761585,112.318991%20C650.406091,112.318991%20650.117907,112.030806%20650.117907,111.675313%20C650.117907,111.349443%20650.360062,111.080133%20650.674242,111.037511%20L650.761585,111.031634%20L653.084634,111.031634%20Z%20M658.505082,107.934236%20C658.860575,107.934236%20659.14876,108.22242%20659.14876,108.577914%20C659.14876,108.903783%20658.906605,109.173094%20658.592425,109.215716%20L658.505082,109.221592%20L656.182033,109.221592%20C655.826539,109.221592%20655.538355,108.933408%20655.538355,108.577914%20C655.538355,108.252045%20655.78051,107.982734%20656.094689,107.940112%20L656.182033,107.934236%20L658.505082,107.934236%20Z%20M653.084634,107.934236%20C653.440128,107.934236%20653.728312,108.22242%20653.728312,108.577914%20C653.728312,108.903783%20653.486157,109.173094%20653.171977,109.215716%20L653.084634,109.221592%20L650.761585,109.221592%20C650.406091,109.221592%20650.117907,108.933408%20650.117907,108.577914%20C650.117907,108.252045%20650.360062,107.982734%20650.674242,107.940112%20L650.761585,107.934236%20L653.084634,107.934236%20Z%20M650.891333,101.864389%20L648.051361,101.86527%20C647.979193,101.86527%20647.92069,101.923774%20647.92069,101.995942%20L647.92069,101.995942%20L647.920383,105.223331%20L661.34567,105.223331%20L661.345977,101.995942%20C661.345977,101.938203%20661.308539,101.889217%20661.25661,101.871931%20L661.25661,101.871931%20L661.215306,101.86527%20L658.374333,101.864389%20L658.37441,103.157466%20C658.37441,103.51296%20658.086226,103.801144%20657.730732,103.801144%20C657.404863,103.801144%20657.135552,103.558989%20657.09293,103.24481%20L657.087054,103.157466%20L657.086333,101.864389%20L652.179333,101.864389%20L652.179613,103.157466%20C652.179613,103.51296%20651.891428,103.801144%20651.535935,103.801144%20C651.210066,103.801144%20650.940755,103.558989%20650.898133,103.24481%20L650.892257,103.157466%20L650.891333,101.864389%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Y5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e时间%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-646.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M657.730732,99.4163895%20C658.056601,99.4163895%20658.325912,99.6585445%20658.368534,99.9727243%20L658.37441,100.060068%20L658.374333,100.577389%20L661.215306,100.577914%20C661.952401,100.577914%20662.55813,101.14029%20662.626842,101.859376%20L662.633333,101.995942%20L662.633333,113.998362%20C662.633333,114.781529%20661.998472,115.416389%20661.215306,115.416389%20L661.215306,115.416389%20L648.051361,115.416389%20C647.268203,115.416389%20646.633333,114.781526%20646.633333,113.998362%20L646.633333,113.998362%20L646.633333,101.995942%20C646.633333,101.212786%20647.268206,100.577914%20648.051361,100.577914%20L648.051361,100.577914%20L650.891333,100.577389%20L650.892257,100.060068%20C650.892257,99.704574%20651.180441,99.4163895%20651.535935,99.4163895%20C651.861804,99.4163895%20652.131115,99.6585445%20652.173737,99.9727243%20L652.179613,100.060068%20L652.179333,100.577389%20L657.086333,100.577389%20L657.087054,100.060068%20C657.087054,99.704574%20657.375238,99.4163895%20657.730732,99.4163895%20Z%20M661.34567,106.510687%20L647.920383,106.510687%20L647.92069,113.998362%20C647.92069,114.056101%20647.958128,114.105087%20648.010057,114.122372%20L648.010057,114.122372%20L648.051361,114.129033%20L661.215306,114.129033%20C661.287485,114.129033%20661.345977,114.070541%20661.345977,113.998362%20L661.345977,113.998362%20L661.34567,106.510687%20Z%20M658.505082,111.031634%20C658.860575,111.031634%20659.14876,111.319819%20659.14876,111.675313%20C659.14876,112.001182%20658.906605,112.270493%20658.592425,112.313115%20L658.505082,112.318991%20L656.182033,112.318991%20C655.826539,112.318991%20655.538355,112.030806%20655.538355,111.675313%20C655.538355,111.349443%20655.78051,111.080133%20656.094689,111.037511%20L656.182033,111.031634%20L658.505082,111.031634%20Z%20M653.084634,111.031634%20C653.440128,111.031634%20653.728312,111.319819%20653.728312,111.675313%20C653.728312,112.001182%20653.486157,112.270493%20653.171977,112.313115%20L653.084634,112.318991%20L650.761585,112.318991%20C650.406091,112.318991%20650.117907,112.030806%20650.117907,111.675313%20C650.117907,111.349443%20650.360062,111.080133%20650.674242,111.037511%20L650.761585,111.031634%20L653.084634,111.031634%20Z%20M658.505082,107.934236%20C658.860575,107.934236%20659.14876,108.22242%20659.14876,108.577914%20C659.14876,108.903783%20658.906605,109.173094%20658.592425,109.215716%20L658.505082,109.221592%20L656.182033,109.221592%20C655.826539,109.221592%20655.538355,108.933408%20655.538355,108.577914%20C655.538355,108.252045%20655.78051,107.982734%20656.094689,107.940112%20L656.182033,107.934236%20L658.505082,107.934236%20Z%20M653.084634,107.934236%20C653.440128,107.934236%20653.728312,108.22242%20653.728312,108.577914%20C653.728312,108.903783%20653.486157,109.173094%20653.171977,109.215716%20L653.084634,109.221592%20L650.761585,109.221592%20C650.406091,109.221592%20650.117907,108.933408%20650.117907,108.577914%20C650.117907,108.252045%20650.360062,107.982734%20650.674242,107.940112%20L650.761585,107.934236%20L653.084634,107.934236%20Z%20M650.891333,101.864389%20L648.051361,101.86527%20C647.979193,101.86527%20647.92069,101.923774%20647.92069,101.995942%20L647.92069,101.995942%20L647.920383,105.223331%20L661.34567,105.223331%20L661.345977,101.995942%20C661.345977,101.938203%20661.308539,101.889217%20661.25661,101.871931%20L661.25661,101.871931%20L661.215306,101.86527%20L658.374333,101.864389%20L658.37441,103.157466%20C658.37441,103.51296%20658.086226,103.801144%20657.730732,103.801144%20C657.404863,103.801144%20657.135552,103.558989%20657.09293,103.24481%20L657.087054,103.157466%20L657.086333,101.864389%20L652.179333,101.864389%20L652.179613,103.157466%20C652.179613,103.51296%20651.891428,103.801144%20651.535935,103.801144%20C651.210066,103.801144%20650.940755,103.558989%20650.898133,103.24481%20L650.892257,103.157466%20L650.891333,101.864389%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Z5e={class:"w-full h-full flex"},fg=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:{DEFAULT_ICON:W5e,ACTIVE_ICON:Y5e,NAME_CN:"时间",NAME_EN:"Date Time",ORDER:1},OPTIONS:{bgColor:{value:"#fff",type:"color",label:"背景颜色"},textColor:{value:"#111",type:"color",label:"字体颜色"},textSize:{value:16,type:"number",label:"时间字体"},radiusSize:{value:8,type:"number",label:"圆角大小"},format:{value:"YYYY-MM-DD HH:mm:ss",type:"select",label:"时间格式",options:[{label:"YYYY-MM-DD HH:mm:ss",value:"YYYY-MM-DD HH:mm:ss"},{label:"YYYY年MM月DD日 HH:mm:ss",value:"YYYY年MM月DD日 HH:mm:ss"},{label:"YYYY/MM/DD HH:mm:ss",value:"YYYY/MM/DD HH:mm:ss"},{label:"YYYY-MM-DD",value:"YYYY-MM-DD"},{label:"HH:mm:ss",value:"HH:mm:ss"}]}}},{__name:"datetime",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""}},setup(t){const e=t,r=l.ref({bgColor:"#fff",textColor:"#111",textSize:16,radiusSize:8}),n=l.ref("");let a=null;const i=()=>{const u=(e.conf||{}).options||{};r.value={bgColor:u.bgColor&&u.bgColor.value||"#fff",textColor:u.textColor&&u.textColor.value||"#111",textSize:u.textSize&&u.textSize.value||16,radiusSize:(u.radiusSize&&u.radiusSize.value)??4},a&&clearInterval(a),o(),a=setInterval(()=>{o()})},o=()=>{var d;const{options:c}=e.conf;let u=((d=c==null?void 0:c.format)==null?void 0:d.value)||"YYYY-MM-DD HH:mm:ss";n.value=et().format(u)},s=dt(i,200);return l.watch(()=>e.conf,()=>{e.mode==="edit"&&s()},{deep:!0}),l.onMounted(()=>{i()}),l.onUnmounted(()=>{a&&clearInterval(a)}),(c,u)=>(l.openBlock(),l.createElementBlock("div",Z5e,[l.createElementVNode("div",{class:"flex flex-1 px-[12px] items-center justify-center flex-nowrap",style:l.normalizeStyle({backgroundColor:r.value.bgColor,borderRadius:`${r.value.radiusSize}px`,fontSize:`${r.value.textSize}px`,color:r.value.textColor})},l.toDisplayString(n.value),5),l.renderSlot(c.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-6627294c"]])},Symbol.toStringTag,{value:"Module"})),K5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e轮播%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-1062.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M1072.93793,113.477011%20C1073.29342,113.477011%201073.58161,113.765196%201073.58161,114.12069%20C1073.58161,114.446559%201073.33945,114.71587%201073.02527,114.758492%20L1072.93793,114.764368%20L1069.9954,114.764368%20C1069.63991,114.764368%201069.35172,114.476183%201069.35172,114.12069%20C1069.35172,113.79482%201069.59388,113.52551%201069.90806,113.482888%20L1069.9954,113.477011%20L1072.93793,113.477011%20Z%20M1075.88046,113.477011%20C1076.23595,113.477011%201076.52414,113.765196%201076.52414,114.12069%20C1076.52414,114.446559%201076.28198,114.71587%201075.9678,114.758492%20L1075.88046,114.764368%20L1075.14483,114.764368%20C1074.78933,114.764368%201074.50115,114.476183%201074.50115,114.12069%20C1074.50115,113.79482%201074.7433,113.52551%201075.05748,113.482888%20L1075.14483,113.477011%20L1075.88046,113.477011%20Z%20M1064.84598,113.477011%20C1065.20147,113.477011%201065.48966,113.765196%201065.48966,114.12069%20C1065.48966,114.446559%201065.2475,114.71587%201064.93332,114.758492%20L1064.84598,114.764368%20L1064.11034,114.764368%20C1063.75485,114.764368%201063.46667,114.476183%201063.46667,114.12069%20C1063.46667,113.79482%201063.70882,113.52551%201064.023,113.482888%20L1064.11034,113.477011%20L1064.84598,113.477011%20Z%20M1078.82299,113.477011%20C1079.17848,113.477011%201079.46667,113.765196%201079.46667,114.12069%20C1079.46667,114.446559%201079.22451,114.71587%201078.91033,114.758492%20L1078.82299,114.764368%20L1078.08736,114.764368%20C1077.73186,114.764368%201077.44368,114.476183%201077.44368,114.12069%20C1077.44368,113.79482%201077.68583,113.52551%201078.00001,113.482888%20L1078.08736,113.477011%20L1078.82299,113.477011%20Z%20M1067.78851,113.477011%20C1068.144,113.477011%201068.43218,113.765196%201068.43218,114.12069%20C1068.43218,114.446559%201068.19003,114.71587%201067.87585,114.758492%20L1067.78851,114.764368%20L1067.05287,114.764368%20C1066.69738,114.764368%201066.4092,114.476183%201066.4092,114.12069%20C1066.4092,113.79482%201066.65135,113.52551%201066.96553,113.482888%20L1067.05287,113.477011%20L1067.78851,113.477011%20Z%20M1078.20996,100.235632%20C1078.90402,100.235632%201079.46667,100.798278%201079.46667,101.492337%20L1079.46667,101.492337%20L1079.46667,111.300766%20C1079.46667,111.994825%201078.90402,112.557471%201078.20996,112.557471%20L1078.20996,112.557471%20L1064.72337,112.557471%20C1064.02931,112.557471%201063.46667,111.994825%201063.46667,111.300766%20L1063.46667,111.300766%20L1063.46667,101.492337%20C1063.46667,100.798278%201064.02931,100.235632%201064.72337,100.235632%20L1064.72337,100.235632%20Z%20M1078.1787,101.522114%20L1064.75341,101.522114%20L1064.75341,111.26924%20L1078.1787,111.26924%20L1078.1787,101.522114%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",q5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e轮播%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-1062.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M1072.93793,113.477011%20C1073.29342,113.477011%201073.58161,113.765196%201073.58161,114.12069%20C1073.58161,114.446559%201073.33945,114.71587%201073.02527,114.758492%20L1072.93793,114.764368%20L1069.9954,114.764368%20C1069.63991,114.764368%201069.35172,114.476183%201069.35172,114.12069%20C1069.35172,113.79482%201069.59388,113.52551%201069.90806,113.482888%20L1069.9954,113.477011%20L1072.93793,113.477011%20Z%20M1075.88046,113.477011%20C1076.23595,113.477011%201076.52414,113.765196%201076.52414,114.12069%20C1076.52414,114.446559%201076.28198,114.71587%201075.9678,114.758492%20L1075.88046,114.764368%20L1075.14483,114.764368%20C1074.78933,114.764368%201074.50115,114.476183%201074.50115,114.12069%20C1074.50115,113.79482%201074.7433,113.52551%201075.05748,113.482888%20L1075.14483,113.477011%20L1075.88046,113.477011%20Z%20M1064.84598,113.477011%20C1065.20147,113.477011%201065.48966,113.765196%201065.48966,114.12069%20C1065.48966,114.446559%201065.2475,114.71587%201064.93332,114.758492%20L1064.84598,114.764368%20L1064.11034,114.764368%20C1063.75485,114.764368%201063.46667,114.476183%201063.46667,114.12069%20C1063.46667,113.79482%201063.70882,113.52551%201064.023,113.482888%20L1064.11034,113.477011%20L1064.84598,113.477011%20Z%20M1078.82299,113.477011%20C1079.17848,113.477011%201079.46667,113.765196%201079.46667,114.12069%20C1079.46667,114.446559%201079.22451,114.71587%201078.91033,114.758492%20L1078.82299,114.764368%20L1078.08736,114.764368%20C1077.73186,114.764368%201077.44368,114.476183%201077.44368,114.12069%20C1077.44368,113.79482%201077.68583,113.52551%201078.00001,113.482888%20L1078.08736,113.477011%20L1078.82299,113.477011%20Z%20M1067.78851,113.477011%20C1068.144,113.477011%201068.43218,113.765196%201068.43218,114.12069%20C1068.43218,114.446559%201068.19003,114.71587%201067.87585,114.758492%20L1067.78851,114.764368%20L1067.05287,114.764368%20C1066.69738,114.764368%201066.4092,114.476183%201066.4092,114.12069%20C1066.4092,113.79482%201066.65135,113.52551%201066.96553,113.482888%20L1067.05287,113.477011%20L1067.78851,113.477011%20Z%20M1078.20996,100.235632%20C1078.90402,100.235632%201079.46667,100.798278%201079.46667,101.492337%20L1079.46667,101.492337%20L1079.46667,111.300766%20C1079.46667,111.994825%201078.90402,112.557471%201078.20996,112.557471%20L1078.20996,112.557471%20L1064.72337,112.557471%20C1064.02931,112.557471%201063.46667,111.994825%201063.46667,111.300766%20L1063.46667,111.300766%20L1063.46667,101.492337%20C1063.46667,100.798278%201064.02931,100.235632%201064.72337,100.235632%20L1064.72337,100.235632%20Z%20M1078.1787,101.522114%20L1064.75341,101.522114%20L1064.75341,111.26924%20L1078.1787,111.26924%20L1078.1787,101.522114%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",X5e=["src","height","width"],J5e=["src"],hg=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:{DEFAULT_ICON:K5e,ACTIVE_ICON:q5e,NAME_CN:"轮播",NAME_EN:"swiper",ORDER:5},OPTIONS:{bgColor:{value:"#fff",type:"color",label:"背景颜色"},radiusSize:{value:8,type:"number",label:"圆角大小"},interval:{value:10,type:"number",label:"轮播间隔"},type:{value:"img",type:"radio",option:[{value:"img",label:"图片"},{value:"url",label:"页面"}],label:"轮播类型"}},DATA:[{url:""}],PARAMS:["url"]},{__name:"swiper",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""}},setup(t){const e="/mixservice/storage/",r=t,n={height:1080,width:1920},a=l.ref({}),i=()=>{var u,d,f,p,h,v,m,g,y,_;const{conf:c}=r;a.value={bgColor:((d=(u=c==null?void 0:c.options)==null?void 0:u.bgColor)==null?void 0:d.value)||"#fff",textColor:((p=(f=c==null?void 0:c.options)==null?void 0:f.textColor)==null?void 0:p.value)||"#00B0F0",radiusSize:((v=(h=c==null?void 0:c.options)==null?void 0:h.radiusSize)==null?void 0:v.value)??4,interval:((g=(m=c==null?void 0:c.options)==null?void 0:m.interval)==null?void 0:g.value)??10,type:((_=(y=c==null?void 0:c.options)==null?void 0:y.type)==null?void 0:_.value)??"img"}},o=c=>c!=null&&c.startsWith(e)||c!=null&&c.startsWith("http")?c:e+c,s=dt(i,200);return l.watch(()=>r.conf,()=>{r.mode==="edit"&&s()},{deep:!0}),l.onMounted(()=>{i()}),(c,u)=>{const d=$se;return l.openBlock(),l.createElementBlock("div",{class:"w-full h-full flex items-center justify-center bg-[length:100%_100%]",style:l.normalizeStyle({backgroundColor:a.value.bgColor,color:a.value.textColor,borderRadius:`${a.value.radiusSize}px`,fontSize:`${a.value.textSize}px`,backgroundImage:a.value.bgImg?`url(${a.value.bgImg})`:""})},[l.createVNode(l.unref(Vse),{autoplay:"",pauseOnHover:!1,autoplaySpeed:1e3*a.value.interval,"indicator-position":"none",style:{width:"100%",height:"100%"}},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.conf.data,(f,p)=>(l.openBlock(),l.createBlock(d,{key:p},{default:l.withCtx(()=>[a.value.type==="url"&&t.mode==="preview"?(l.openBlock(),l.createElementBlock("iframe",{key:0,src:f.url,frameborder:"0",height:n.height,width:n.width},null,8,X5e)):(l.openBlock(),l.createElementBlock("img",{key:1,class:"w-[100%] h-[100%]",src:o(f.url)},null,8,J5e))]),_:2},1024))),128))]),_:1},8,["autoplaySpeed"]),l.renderSlot(c.$slots,"default",{},void 0,!0)],4)}}}),[["__scopeId","data-v-5d3652fa"]])},Symbol.toStringTag,{value:"Module"})),Q5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e文本%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-735.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M750.086782,99.5%20C750.950123,99.5%20751.65,100.199877%20751.65,101.063218%20L751.65,101.063218%20L751.65,113.936782%20C751.65,114.800123%20750.950123,115.5%20750.086782,115.5%20L750.086782,115.5%20L737.213218,115.5%20C736.349877,115.5%20735.65,114.800123%20735.65,113.936782%20L735.65,113.936782%20L735.65,101.063218%20C735.65,100.199877%20736.349877,99.5%20737.213218,99.5%20L737.213218,99.5%20Z%20M750.086782,100.787356%20L737.213218,100.787356%20C737.060864,100.787356%20736.937356,100.910864%20736.937356,101.063218%20L736.937356,101.063218%20L736.937356,113.936782%20C736.937356,114.089136%20737.060864,114.212644%20737.213218,114.212644%20L737.213218,114.212644%20L750.086782,114.212644%20C750.239136,114.212644%20750.362644,114.089136%20750.362644,113.936782%20L750.362644,113.936782%20L750.362644,101.063218%20C750.362644,100.910864%20750.239136,100.787356%20750.086782,100.787356%20L750.086782,100.787356%20Z%20M742.832631,112.230524%20C742.477137,112.230524%20742.188953,111.942339%20742.188953,111.586845%20C742.188953,111.260976%20742.431108,110.991665%20742.745288,110.949043%20L742.832631,110.943167%20L743.006,110.943%20L743.006322,105.047893%20C743.006322,104.987519%20743.014634,104.929087%20743.030176,104.873678%20L741.023793,104.873531%20L741.024202,105.456577%20C741.024202,105.782446%20740.782047,106.051757%20740.467867,106.094379%20L740.380524,106.100255%20C740.054654,106.100255%20739.785344,105.8581%20739.742721,105.543921%20L739.736845,105.456577%20L739.736845,104.230524%20C739.736845,103.904654%20739.979001,103.635344%20740.29318,103.592721%20L740.380524,103.586845%20L746.919476,103.586845%20C747.245346,103.586845%20747.514656,103.829001%20747.557279,104.14318%20L747.563155,104.230524%20L747.563155,105.456577%20C747.563155,105.812071%20747.27497,106.100255%20746.919476,106.100255%20C746.593607,106.100255%20746.324296,105.8581%20746.281674,105.543921%20L746.275798,105.456577%20L746.275287,104.873531%20L744.269773,104.873494%20C744.277714,104.901773%20744.283772,104.930839%20744.287802,104.960549%20L744.293678,105.047893%20L744.293,110.943%20L744.467369,110.943167%20C744.822863,110.943167%20745.111047,111.231352%20745.111047,111.586845%20C745.111047,111.912715%20744.868892,112.182025%20744.554712,112.224648%20L744.467369,112.230524%20L742.832631,112.230524%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",e8e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e文本%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-735.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M750.086782,99.5%20C750.950123,99.5%20751.65,100.199877%20751.65,101.063218%20L751.65,101.063218%20L751.65,113.936782%20C751.65,114.800123%20750.950123,115.5%20750.086782,115.5%20L750.086782,115.5%20L737.213218,115.5%20C736.349877,115.5%20735.65,114.800123%20735.65,113.936782%20L735.65,113.936782%20L735.65,101.063218%20C735.65,100.199877%20736.349877,99.5%20737.213218,99.5%20L737.213218,99.5%20Z%20M750.086782,100.787356%20L737.213218,100.787356%20C737.060864,100.787356%20736.937356,100.910864%20736.937356,101.063218%20L736.937356,101.063218%20L736.937356,113.936782%20C736.937356,114.089136%20737.060864,114.212644%20737.213218,114.212644%20L737.213218,114.212644%20L750.086782,114.212644%20C750.239136,114.212644%20750.362644,114.089136%20750.362644,113.936782%20L750.362644,113.936782%20L750.362644,101.063218%20C750.362644,100.910864%20750.239136,100.787356%20750.086782,100.787356%20L750.086782,100.787356%20Z%20M742.832631,112.230524%20C742.477137,112.230524%20742.188953,111.942339%20742.188953,111.586845%20C742.188953,111.260976%20742.431108,110.991665%20742.745288,110.949043%20L742.832631,110.943167%20L743.006,110.943%20L743.006322,105.047893%20C743.006322,104.987519%20743.014634,104.929087%20743.030176,104.873678%20L741.023793,104.873531%20L741.024202,105.456577%20C741.024202,105.782446%20740.782047,106.051757%20740.467867,106.094379%20L740.380524,106.100255%20C740.054654,106.100255%20739.785344,105.8581%20739.742721,105.543921%20L739.736845,105.456577%20L739.736845,104.230524%20C739.736845,103.904654%20739.979001,103.635344%20740.29318,103.592721%20L740.380524,103.586845%20L746.919476,103.586845%20C747.245346,103.586845%20747.514656,103.829001%20747.557279,104.14318%20L747.563155,104.230524%20L747.563155,105.456577%20C747.563155,105.812071%20747.27497,106.100255%20746.919476,106.100255%20C746.593607,106.100255%20746.324296,105.8581%20746.281674,105.543921%20L746.275798,105.456577%20L746.275287,104.873531%20L744.269773,104.873494%20C744.277714,104.901773%20744.283772,104.930839%20744.287802,104.960549%20L744.293678,105.047893%20L744.293,110.943%20L744.467369,110.943167%20C744.822863,110.943167%20745.111047,111.231352%20745.111047,111.586845%20C745.111047,111.912715%20744.868892,112.182025%20744.554712,112.224648%20L744.467369,112.230524%20L742.832631,112.230524%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",t8e={class:"w-full h-full flex"},pg=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:{DEFAULT_ICON:Q5e,ACTIVE_ICON:e8e,NAME_CN:"文本",NAME_EN:"Textbox",ORDER:2},OPTIONS:{bgColor:{value:"#fff",type:"color",label:"背景颜色"},textColor:{value:"#111",type:"color",label:"字体颜色"},textSize:{value:14,type:"number",label:"字体大小"},radiusSize:{value:8,type:"number",label:"圆角大小"},letterSpacing:{value:2,type:"number",label:"文字间距"},name:{value:"",type:"string",label:"文本内容"},bgImg:{value:"",type:"image",label:"背景图片"},textAlign:{value:"center",type:"radio",option:[{value:"left",label:"左"},{value:"center",label:"中"},{value:"right",label:"右"}],label:"文本布局"},isBold:{value:!1,type:"checkbox",label:"是否加粗"},isJump:{value:!1,type:"checkbox",label:"是否点击跳转"},jumpType:{value:"url",type:"radio",option:[{value:"url",label:"地址"},{value:"uid",label:"编号"}],label:"跳转方案",dependent:"isJump"},jumpParam:{value:"",type:"string",label:"跳转参数",dependent:"isJump"}}},{__name:"textbox",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""}},setup(t){const e=t,r={left:"flex-start",center:"center",right:"flex-end"},n=l.ref({}),a=()=>{var d,f,p,h,v,m,g,y,_,b,C,w,S,x,E,L;const{conf:u}=e;n.value={bgColor:((f=(d=u==null?void 0:u.options)==null?void 0:d.bgColor)==null?void 0:f.value)||"#fff",textColor:((h=(p=u==null?void 0:u.options)==null?void 0:p.textColor)==null?void 0:h.value)||"#111",textSize:((m=(v=u==null?void 0:u.options)==null?void 0:v.textSize)==null?void 0:m.value)||16,radiusSize:((y=(g=u==null?void 0:u.options)==null?void 0:g.radiusSize)==null?void 0:y.value)??4,letterSpacing:((b=(_=u==null?void 0:u.options)==null?void 0:_.letterSpacing)==null?void 0:b.value)??2,textAlign:((w=(C=u==null?void 0:u.options)==null?void 0:C.textAlign)==null?void 0:w.value)??"center",isBold:((x=(S=u==null?void 0:u.options)==null?void 0:S.isBold)==null?void 0:x.value)??!1,bgImg:((L=(E=u==null?void 0:u.options)==null?void 0:E.bgImg)==null?void 0:L.value)??""}},i=async()=>{const{options:u}=e.conf;let d=u.jumpParam.value;if(d){let f=u.jumpType.value==="url"?d:await o({uid:d});if(f.startsWith("mixui/#/")||f.startsWith("/mixui/#/")){let v=f.split("mixui/#/")[1];f=`${window.location.origin}/mixui/#/${v}`}const p=window.location.pathname+window.location.hash.split("?")[0],h=f.split("?")[0];if(p===h){const v=f+(f.includes("?")?"&":"?")+"_t="+Date.now();window.location.href=v,setTimeout(()=>{window.location.reload(!0)},100)}else{try{const v=new URL(f),y=v.hash.substring(1).split("/").map(_=>{try{const b=decodeURIComponent(_);return encodeURIComponent(b)}catch{return encodeURIComponent(_)}}).join("/");v.hash=y,f=v.toString()}catch(v){console.warn("URL解析失败,使用原始URL",v)}window.location.href=f}}else{u1.error("未设置跳转参数");return}},o=async u=>{var p;const{result:d}=await ot.post("get_object_item",{uid:u.uid},!0);let f={};if((p=d.dashboard_list)!=null&&p.length&&(f=d.dashboard_list.find(h=>h.type==="show")),Object.keys(f).length)return`${location.origin}/mixui/#/preview/${f.uid}/${f.name}?object_id=${u.uid}`;u1({message:"该对象未配置大屏脚本",type:"warning"})},s=()=>{e.mode==="preview"&&i()},c=dt(a,200);return l.watch(()=>e.conf,()=>{e.mode==="edit"&&c()},{deep:!0}),l.onMounted(()=>{a()}),(u,d)=>{var f,p,h;return l.openBlock(),l.createElementBlock("div",t8e,[l.createElementVNode("div",{class:"btn-wrap",style:l.normalizeStyle({backgroundColor:n.value.bgColor,color:n.value.textColor,borderRadius:`${n.value.radiusSize}px`,fontSize:`${n.value.textSize}px`,backgroundImage:n.value.bgImg?`url(${n.value.bgImg})`:"",justifyContent:r[n.value.textAlign]||"center",fontWeight:n.value.isBold?"600":"400",letterSpacing:`${n.value.letterSpacing}px`,cursor:n.value.isJump?"pointer":"default"}),onClick:s},l.toDisplayString(((h=(p=(f=t.conf)==null?void 0:f.options)==null?void 0:p.name)==null?void 0:h.value)||""),5),l.renderSlot(u.$slots,"default",{},void 0,!0)])}}}),[["__scopeId","data-v-0eb0f91a"]])},Symbol.toStringTag,{value:"Module"})),r8e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='18px'%20viewBox='0%200%2017%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e天气%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-807.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M817.945888,102.796609%20C819.683477,102.796609%20821.092089,104.205221%20821.092089,105.94281%20C821.092089,106.628082%20820.872999,107.262185%20820.501044,107.778896%20C822.196583,108.244456%20823.44069,109.818548%20823.44069,111.684342%20C823.44069,113.306186%20822.492183,114.753742%20821.051831,115.394536%20C820.713416,115.545093%20820.317026,115.392803%20820.16647,115.054388%20C820.015913,114.715973%20820.168202,114.319583%20820.506617,114.169026%20C821.464713,113.742782%20822.099373,112.774201%20822.099373,111.684342%20C822.099373,110.1861%20820.911369,108.976414%20819.451995,108.976414%20C819.031723,108.976414%20818.626762,109.07618%20818.260607,109.265341%20C817.879726,109.46211%20817.414554,109.255909%20817.304572,108.841551%20C816.799872,106.94008%20815.102249,105.597863%20813.147731,105.597863%20C810.772103,105.597863%20808.841317,107.563868%20808.841317,109.995048%20C808.841317,111.399401%20809.489548,112.691456%20810.568916,113.516983%20C810.863125,113.742002%20810.919215,114.162919%20810.694196,114.457127%20C810.469178,114.751336%20810.048261,114.807426%20809.754052,114.582408%20C808.345227,113.504903%20807.5,111.820195%20807.5,109.995048%20C807.5,106.828451%20810.025832,104.256546%20813.147731,104.256546%20C813.829302,104.256546%20814.486533,104.3802%20815.096693,104.608218%20C815.601039,103.529357%20816.696718,102.796609%20817.945888,102.796609%20Z%20M813.280439,107.176421%20C814.048868,107.176421%20814.770636,107.481714%20815.303171,108.014297%20C815.565067,108.276218%20815.565048,108.700855%20815.303127,108.962752%20C815.041206,109.224648%20814.616569,109.224629%20814.354672,108.962708%20C814.071197,108.679207%20813.689455,108.517738%20813.280439,108.517738%20C812.441385,108.517738%20811.761192,109.197931%20811.761192,110.036985%20C811.761192,110.446001%20811.922661,110.827743%20812.206162,111.111218%20C812.468083,111.373115%20812.468102,111.797752%20812.206206,112.059673%20C811.944309,112.321594%20811.519672,112.321613%20811.257751,112.059717%20C810.725168,111.527182%20810.419875,110.805414%20810.419875,110.036985%20C810.419875,108.457142%20811.700596,107.176421%20813.280439,107.176421%20Z%20M817.945888,104.137926%20C817.210393,104.137926%20816.567249,104.581189%20816.288327,105.226532%20C817.155696,105.815582%20817.856037,106.643608%20818.294581,107.628501%20L818.3271,107.70736%20C819.140827,107.532395%20819.750772,106.808824%20819.750772,105.94281%20C819.750772,104.94601%20818.942688,104.137926%20817.945888,104.137926%20Z%20M822.770031,105.657173%20C823.173193,105.657173%20823.5,105.98398%20823.5,106.387142%20C823.5,106.790304%20823.173193,107.117111%20822.770031,107.117111%20C822.36687,107.117111%20822.040063,106.790304%20822.040063,106.387142%20C822.040063,105.98398%20822.36687,105.657173%20822.770031,105.657173%20Z%20M822.040063,102.372314%20C822.443224,102.372314%20822.770031,102.699132%20822.770031,103.102283%20C822.770031,103.505445%20822.443224,103.832252%20822.040063,103.832252%20C821.636901,103.832252%20821.310094,103.505445%20821.310094,103.102283%20C821.310094,102.699132%20821.636901,102.372314%20822.040063,102.372314%20Z%20M814.740376,101.642346%20C815.143538,101.642346%20815.470345,101.969164%20815.470345,102.372314%20C815.470345,102.775465%20815.143538,103.102283%20814.740376,103.102283%20C814.337215,103.102283%20814.010408,102.775465%20814.010408,102.372314%20C814.010408,101.969164%20814.337215,101.642346%20814.740376,101.642346%20Z%20M818.755204,100.547393%20C819.158366,100.547393%20819.485173,100.874211%20819.485173,101.277361%20C819.485173,101.680512%20819.158366,102.00733%20818.755204,102.00733%20C818.352042,102.00733%20818.025235,101.680512%20818.025235,101.277361%20C818.025235,100.874211%20818.352042,100.547393%20818.755204,100.547393%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",n8e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='18px'%20viewBox='0%200%2017%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e天气%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-807.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M817.945888,102.796609%20C819.683477,102.796609%20821.092089,104.205221%20821.092089,105.94281%20C821.092089,106.628082%20820.872999,107.262185%20820.501044,107.778896%20C822.196583,108.244456%20823.44069,109.818548%20823.44069,111.684342%20C823.44069,113.306186%20822.492183,114.753742%20821.051831,115.394536%20C820.713416,115.545093%20820.317026,115.392803%20820.16647,115.054388%20C820.015913,114.715973%20820.168202,114.319583%20820.506617,114.169026%20C821.464713,113.742782%20822.099373,112.774201%20822.099373,111.684342%20C822.099373,110.1861%20820.911369,108.976414%20819.451995,108.976414%20C819.031723,108.976414%20818.626762,109.07618%20818.260607,109.265341%20C817.879726,109.46211%20817.414554,109.255909%20817.304572,108.841551%20C816.799872,106.94008%20815.102249,105.597863%20813.147731,105.597863%20C810.772103,105.597863%20808.841317,107.563868%20808.841317,109.995048%20C808.841317,111.399401%20809.489548,112.691456%20810.568916,113.516983%20C810.863125,113.742002%20810.919215,114.162919%20810.694196,114.457127%20C810.469178,114.751336%20810.048261,114.807426%20809.754052,114.582408%20C808.345227,113.504903%20807.5,111.820195%20807.5,109.995048%20C807.5,106.828451%20810.025832,104.256546%20813.147731,104.256546%20C813.829302,104.256546%20814.486533,104.3802%20815.096693,104.608218%20C815.601039,103.529357%20816.696718,102.796609%20817.945888,102.796609%20Z%20M813.280439,107.176421%20C814.048868,107.176421%20814.770636,107.481714%20815.303171,108.014297%20C815.565067,108.276218%20815.565048,108.700855%20815.303127,108.962752%20C815.041206,109.224648%20814.616569,109.224629%20814.354672,108.962708%20C814.071197,108.679207%20813.689455,108.517738%20813.280439,108.517738%20C812.441385,108.517738%20811.761192,109.197931%20811.761192,110.036985%20C811.761192,110.446001%20811.922661,110.827743%20812.206162,111.111218%20C812.468083,111.373115%20812.468102,111.797752%20812.206206,112.059673%20C811.944309,112.321594%20811.519672,112.321613%20811.257751,112.059717%20C810.725168,111.527182%20810.419875,110.805414%20810.419875,110.036985%20C810.419875,108.457142%20811.700596,107.176421%20813.280439,107.176421%20Z%20M817.945888,104.137926%20C817.210393,104.137926%20816.567249,104.581189%20816.288327,105.226532%20C817.155696,105.815582%20817.856037,106.643608%20818.294581,107.628501%20L818.3271,107.70736%20C819.140827,107.532395%20819.750772,106.808824%20819.750772,105.94281%20C819.750772,104.94601%20818.942688,104.137926%20817.945888,104.137926%20Z%20M822.770031,105.657173%20C823.173193,105.657173%20823.5,105.98398%20823.5,106.387142%20C823.5,106.790304%20823.173193,107.117111%20822.770031,107.117111%20C822.36687,107.117111%20822.040063,106.790304%20822.040063,106.387142%20C822.040063,105.98398%20822.36687,105.657173%20822.770031,105.657173%20Z%20M822.040063,102.372314%20C822.443224,102.372314%20822.770031,102.699132%20822.770031,103.102283%20C822.770031,103.505445%20822.443224,103.832252%20822.040063,103.832252%20C821.636901,103.832252%20821.310094,103.505445%20821.310094,103.102283%20C821.310094,102.699132%20821.636901,102.372314%20822.040063,102.372314%20Z%20M814.740376,101.642346%20C815.143538,101.642346%20815.470345,101.969164%20815.470345,102.372314%20C815.470345,102.775465%20815.143538,103.102283%20814.740376,103.102283%20C814.337215,103.102283%20814.010408,102.775465%20814.010408,102.372314%20C814.010408,101.969164%20814.337215,101.642346%20814.740376,101.642346%20Z%20M818.755204,100.547393%20C819.158366,100.547393%20819.485173,100.874211%20819.485173,101.277361%20C819.485173,101.680512%20819.158366,102.00733%20818.755204,102.00733%20C818.352042,102.00733%20818.025235,101.680512%20818.025235,101.277361%20C818.025235,100.874211%20818.352042,100.547393%20818.755204,100.547393%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",a8e=["src"],gg=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:{DEFAULT_ICON:r8e,ACTIVE_ICON:n8e,NAME_CN:"天气",NAME_EN:"Weather",ORDER:4},OPTIONS:{bgColor:{value:"#fff",type:"color",label:"背景颜色"},textColor:{value:"#00B0F0",type:"color",label:"字体颜色",hideAlpha:!0},radiusSize:{value:8,type:"number",label:"圆角大小"},bgImg:{value:"",type:"image",label:"背景图片"}}},{__name:"weather",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""}},setup(t){const e=t,r=l.ref({}),n=()=>{var s,c,u,d,f,p,h,v;const{conf:o}=e;r.value={bgColor:((c=(s=o==null?void 0:o.options)==null?void 0:s.bgColor)==null?void 0:c.value)||"#fff",textColor:((d=(u=o==null?void 0:o.options)==null?void 0:u.textColor)==null?void 0:d.value)||"#00B0F0",radiusSize:((p=(f=o==null?void 0:o.options)==null?void 0:f.radiusSize)==null?void 0:p.value)??4,bgImg:((v=(h=o==null?void 0:o.options)==null?void 0:h.bgImg)==null?void 0:v.value)??""}},a=l.computed(()=>{var o,s;return((s=(o=r.value)==null?void 0:o.textColor)==null?void 0:s.replace("#",""))||"00B0F0"}),i=dt(n,200);return l.watch(()=>e.conf,()=>{e.mode==="edit"&&i()},{deep:!0}),l.onMounted(()=>{n()}),(o,s)=>(l.openBlock(),l.createElementBlock("div",{class:"w-full h-full flex items-center justify-center bg-[length:100%_100%]",style:l.normalizeStyle({backgroundColor:r.value.bgColor,color:r.value.textColor,borderRadius:`${r.value.radiusSize}px`,fontSize:`${r.value.textSize}px`,backgroundImage:r.value.bgImg?`url(${r.value.bgImg})`:""})},[l.createElementVNode("iframe",{width:"200",scrolling:"no",height:"60",frameborder:"0",allowtransparency:"true",src:`https://i.tianqi.com?c=code&id=12&color=%23${a.value}&icon=1&num=1&site=15&align=center`},null,8,a8e),l.renderSlot(o.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-a18a9645"]])},Symbol.toStringTag,{value:"Module"})),HI="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e画板备份%2014%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-103.000000,%20-281.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M111.732508,282.805834%20C116.150793,282.805834%20119.732508,286.387549%20119.732508,290.805834%20C119.732508,292.955899%20118.879547,294.972513%20117.389341,296.462679%20C117.137966,296.714048%20116.730412,296.714042%20116.479043,296.462667%20C116.227674,296.211292%20116.22768,295.803737%20116.479055,295.552369%20C117.308447,294.722998%20117.902203,293.700651%20118.208265,292.579797%20C118.192161,292.581607%20118.177362,292.58076%20118.162521,292.57939%20L118.076094,292.565468%20L116.710796,292.250267%20C116.364413,292.170299%20116.148442,291.824674%20116.228409,291.478291%20C116.301713,291.160774%20116.598243,290.952838%20116.913959,290.981983%20L117.000385,290.995905%20L118.365684,291.311106%20L118.425004,291.329271%20C118.438381,291.156079%20118.445152,290.9815%20118.445152,290.805834%20C118.445152,289.354555%20117.984597,288.010846%20117.201668,286.91289%20L116.248992,287.683715%20C115.972717,287.907429%20115.567396,287.864821%20115.343682,287.588546%20C115.140305,287.337388%20115.15703,286.979579%20115.369321,286.748519%20L115.438851,286.683236%20L116.356389,285.939671%20C115.298436,284.934073%20113.912895,284.269882%20112.376336,284.123666%20L112.376186,285.201017%20C112.376186,285.556511%20112.088002,285.844695%20111.732508,285.844695%20C111.406639,285.844695%20111.137328,285.60254%20111.094706,285.28836%20L111.08883,285.201017%20L111.08868,284.123666%20C109.552121,284.269882%20108.16658,284.934073%20107.108627,285.939671%20L108.026177,286.683246%20C108.302446,286.906967%20108.345045,287.312289%20108.121324,287.588558%20C107.917941,287.839712%20107.564475,287.89775%20107.294324,287.738142%20L107.216012,287.683705%20L106.263348,286.91289%20C105.480419,288.010846%20105.019864,289.354555%20105.019864,290.805834%20C105.019864,290.981163%20105.026609,291.155409%20105.039935,291.328274%20L105.099216,291.311106%20L106.464507,290.995905%20C106.81089,290.915937%20107.156515,291.131908%20107.236483,291.478291%20C107.309788,291.795808%20107.134421,292.112689%20106.837881,292.224894%20L106.754098,292.250267%20L105.388807,292.565468%20C105.344789,292.57563%20105.300784,292.581013%20105.257335,292.581957%20C105.563167,293.701259%20106.156812,294.723245%20106.98595,295.552372%20C107.237323,295.803742%20107.237326,296.211297%20106.985956,296.46267%20C106.734586,296.714044%20106.327031,296.714046%20106.075657,296.462676%20C104.585466,294.972504%20103.732508,292.955891%20103.732508,290.805834%20C103.732508,286.387549%20107.314223,282.805834%20111.732508,282.805834%20Z%20M113.702162,288.378021%20C114.216,288.175266%20114.729753,288.671391%20114.545055,289.191992%20L114.545055,289.191992%20L114.490568,289.343722%20L114.149804,290.254265%20C114.033769,290.555413%20113.915808,290.852333%20113.798435,291.136389%20L113.798435,291.136389%20L113.63399,291.5263%20L113.459384,291.920566%20L113.280448,292.298668%20C113.079162,292.705571%20112.902373,292.993389%20112.732679,293.16912%20C111.948158,293.981503%20110.653599,294.004095%20109.841231,293.219589%20C109.028807,292.435077%20109.0062,291.140553%20109.790727,290.328112%20C110.039196,290.07082%20110.529648,289.788284%20111.279335,289.428056%20C111.440306,289.350708%20111.611261,289.27101%20111.790958,289.189349%20C112.209753,288.999031%20112.657009,288.806486%20113.10407,288.621161%20L113.10407,288.621161%20Z%20M112.809289,290.145604%20L112.323569,290.361361%20L111.83689,290.588409%20L111.529,290.740201%20L111.261267,290.87979%20L111.038978,291.00372%20L110.867422,291.108539%20C110.795208,291.155595%20110.744003,291.194189%20110.716781,291.222378%20C110.426143,291.523357%20110.434517,292.002897%20110.735497,292.293535%20C111.036439,292.584157%20111.516014,292.575787%20111.806625,292.274855%20C111.82404,292.256821%20111.845515,292.228568%20111.870535,292.190933%20L111.870535,292.190933%20L111.955713,292.050713%20L112.059061,291.859211%20C112.077627,291.823299%20112.096822,291.785459%20112.116581,291.745796%20L112.116581,291.745796%20L112.241376,291.486773%20C112.284885,291.393695%20112.330131,291.29416%20112.376599,291.189003%20L112.376599,291.189003%20L112.452161,291.015843%20L112.693762,290.436735%20L112.809289,290.145604%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",GI="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e仪表盘%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-103.000000,%20-281.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M111.732508,282.805834%20C116.150793,282.805834%20119.732508,286.387549%20119.732508,290.805834%20C119.732508,292.955899%20118.879547,294.972513%20117.389341,296.462679%20C117.137966,296.714048%20116.730412,296.714042%20116.479043,296.462667%20C116.227674,296.211292%20116.22768,295.803737%20116.479055,295.552369%20C117.308447,294.722998%20117.902203,293.700651%20118.208265,292.579797%20C118.192161,292.581607%20118.177362,292.58076%20118.162521,292.57939%20L118.076094,292.565468%20L116.710796,292.250267%20C116.364413,292.170299%20116.148442,291.824674%20116.228409,291.478291%20C116.301713,291.160774%20116.598243,290.952838%20116.913959,290.981983%20L117.000385,290.995905%20L118.365684,291.311106%20L118.425004,291.329271%20C118.438381,291.156079%20118.445152,290.9815%20118.445152,290.805834%20C118.445152,289.354555%20117.984597,288.010846%20117.201668,286.91289%20L116.248992,287.683715%20C115.972717,287.907429%20115.567396,287.864821%20115.343682,287.588546%20C115.140305,287.337388%20115.15703,286.979579%20115.369321,286.748519%20L115.438851,286.683236%20L116.356389,285.939671%20C115.298436,284.934073%20113.912895,284.269882%20112.376336,284.123666%20L112.376186,285.201017%20C112.376186,285.556511%20112.088002,285.844695%20111.732508,285.844695%20C111.406639,285.844695%20111.137328,285.60254%20111.094706,285.28836%20L111.08883,285.201017%20L111.08868,284.123666%20C109.552121,284.269882%20108.16658,284.934073%20107.108627,285.939671%20L108.026177,286.683246%20C108.302446,286.906967%20108.345045,287.312289%20108.121324,287.588558%20C107.917941,287.839712%20107.564475,287.89775%20107.294324,287.738142%20L107.216012,287.683705%20L106.263348,286.91289%20C105.480419,288.010846%20105.019864,289.354555%20105.019864,290.805834%20C105.019864,290.981163%20105.026609,291.155409%20105.039935,291.328274%20L105.099216,291.311106%20L106.464507,290.995905%20C106.81089,290.915937%20107.156515,291.131908%20107.236483,291.478291%20C107.309788,291.795808%20107.134421,292.112689%20106.837881,292.224894%20L106.754098,292.250267%20L105.388807,292.565468%20C105.344789,292.57563%20105.300784,292.581013%20105.257335,292.581957%20C105.563167,293.701259%20106.156812,294.723245%20106.98595,295.552372%20C107.237323,295.803742%20107.237326,296.211297%20106.985956,296.46267%20C106.734586,296.714044%20106.327031,296.714046%20106.075657,296.462676%20C104.585466,294.972504%20103.732508,292.955891%20103.732508,290.805834%20C103.732508,286.387549%20107.314223,282.805834%20111.732508,282.805834%20Z%20M113.702162,288.378021%20C114.216,288.175266%20114.729753,288.671391%20114.545055,289.191992%20L114.545055,289.191992%20L114.490568,289.343722%20L114.149804,290.254265%20C114.033769,290.555413%20113.915808,290.852333%20113.798435,291.136389%20L113.798435,291.136389%20L113.63399,291.5263%20L113.459384,291.920566%20L113.280448,292.298668%20C113.079162,292.705571%20112.902373,292.993389%20112.732679,293.16912%20C111.948158,293.981503%20110.653599,294.004095%20109.841231,293.219589%20C109.028807,292.435077%20109.0062,291.140553%20109.790727,290.328112%20C110.039196,290.07082%20110.529648,289.788284%20111.279335,289.428056%20C111.440306,289.350708%20111.611261,289.27101%20111.790958,289.189349%20C112.209753,288.999031%20112.657009,288.806486%20113.10407,288.621161%20L113.10407,288.621161%20Z%20M112.809289,290.145604%20L112.323569,290.361361%20L111.83689,290.588409%20L111.529,290.740201%20L111.261267,290.87979%20L111.038978,291.00372%20L110.867422,291.108539%20C110.795208,291.155595%20110.744003,291.194189%20110.716781,291.222378%20C110.426143,291.523357%20110.434517,292.002897%20110.735497,292.293535%20C111.036439,292.584157%20111.516014,292.575787%20111.806625,292.274855%20C111.82404,292.256821%20111.845515,292.228568%20111.870535,292.190933%20L111.870535,292.190933%20L111.955713,292.050713%20L112.059061,291.859211%20C112.077627,291.823299%20112.096822,291.785459%20112.116581,291.745796%20L112.116581,291.745796%20L112.241376,291.486773%20C112.284885,291.393695%20112.330131,291.29416%20112.376599,291.189003%20L112.376599,291.189003%20L112.452161,291.015843%20L112.693762,290.436735%20L112.809289,290.145604%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",i8e={DEFAULT_ICON:HI,ACTIVE_ICON:GI,NAME_CN:"仪表盘",NAME_EN:"Gauge",ORDER:1},o8e={titleColor:{value:"#111",type:"color",label:"标题颜色"},textColor:{value:"#111",type:"color",label:"字体颜色"},bgColor:{value:"#fff",type:"color",label:"背景颜色"},radiusSize:{value:8,type:"number",label:"圆角大小"},textSize:{value:12,type:"number",label:"字体大小"},points:{value:10,type:"number",label:"显示数量"},isHideTitle:{value:!1,type:"checkbox",label:"是否隐藏标题"},showLabel:{value:!1,type:"checkbox",label:"是否显示数据"}},WI=[{name:"参数一",object_id:"",fv:"",max:100,min:0,pieces:5}],vg=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:i8e,OPTIONS:o8e,DATA:WI,PARAMS:["name","fv","object_id","max","min","pieces"],SOURCE:["mosaic","statistics","calculate"],COLOR_AREA:[{color:"#5c7bd9",value:100}],ITEMS:1,COMMON:{useAlias:!1,source:"mosaic"}},{__name:"gag",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"}},setup(t){Rt([w1,x1,g1,V1,v1,gT]);const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null)),n="bar_"+Math.random().toString(16).substring(4,12);let a=null,i=null;const o=t,s=l.ref({bgColor:"#73bff9",titleColor:"#111",textSize:12,radiusSize:4,isHideTitle:!1}),c=()=>{var g,y,_,b,C,w,S,x,E,L,T,k,A,D;const{conf:m}=o;s.value={bgColor:((y=(g=m==null?void 0:m.options)==null?void 0:g.bgColor)==null?void 0:y.value)||"#73bff9",titleColor:((b=(_=m==null?void 0:m.options)==null?void 0:_.titleColor)==null?void 0:b.value)||"#111",textColor:((w=(C=m==null?void 0:m.options)==null?void 0:C.textColor)==null?void 0:w.value)||"#111",radiusSize:((x=(S=m==null?void 0:m.options)==null?void 0:S.radiusSize)==null?void 0:x.value)??4,textSize:((L=(E=m==null?void 0:m.options)==null?void 0:E.textSize)==null?void 0:L.value)??12,isHideTitle:((k=(T=m==null?void 0:m.options)==null?void 0:T.isHideTitle)==null?void 0:k.value)||!1,points:((D=(A=m==null?void 0:m.options)==null?void 0:A.points)==null?void 0:D.value)||10},m.data=m.data.length?m.data:WI,l.nextTick(()=>{let M=document.querySelector("#"+n);M&&(a||(a=s1(M),i=Qt({strategy:"scroll"}),i.listenTo(M,function(){a.resize()})),a.setOption(u(),!0))})},u=()=>{const{data:m}=o.conf;let g=m[0]??{};var y={tooltip:{trigger:"item",formatter:"{a} <br/>{b} : {c}",confine:!0},series:[{name:g.name??"",type:"gauge",radius:"100%",startAngle:215,center:["50%","55%"],max:g.max??100,min:g.min??0,endAngle:-35,splitNumber:g.pieces??5,data:[{value:g.min??0,name:g.name??""}],axisLine:{lineStyle:{color:d(),width:10}},axisLabel:{distance:25,color:s.value.textColor},axisTick:{length:5,distance:-10,lineStyle:{color:"#fff"}},splitLine:{length:-10,distance:0,lineStyle:{width:3,color:"transparent"}},pointer:{shadowColor:"#ff2e4c",width:3,length:"70%",itemStyle:{color:"auto"}},title:{offsetCenter:[0,"80%"],fontSize:14,fontFamily:"Microsoft YaHei",color:s.value.textColor},detail:{borderWidth:0,width:"100%",height:14,fontSize:14,color:s.value.textColor,offsetCenter:[0,"50%"],formatter:function(_){return _+(g.unit??"")}}}]};return y},d=()=>{const{area:m,data:g}=o.conf,{max:y,min:_,pieces:b}=g[0];let C=[...m].sort((S,x)=>S.value-x.value),w=[];return C.forEach(S=>{let x=y-_,E=S.value/x;w.push([E,S.color])}),w},f=m=>{const{data:g,common:y}=o.conf,_=y.source||"mosaic";if(["statistics","calculate"].includes(_)&&(m=Pr(m,g)),!m.history.length)return;let b=a.getOption();m.history.forEach(C=>{var w;b.series[0].data[0].value=(w=C[0])==null?void 0:w[g[0].fv]}),a.setOption(b)},p=m=>{const{data:g,common:y}=o.conf,_=y.source||"mosaic";if(!m||!a)return;let b=a.getOption(),C="";y.multiObject||(C=Be(y,y.useAlias,o.uid)),g.forEach((w,S)=>{var E,L,T,k,A,D,M;y.multiObject?C=Be(w,y.useAlias,o.uid):C=w.object_id;let x=null;["statistics","calculate"].includes(_)?x=(k=(T=(L=(E=m[C])==null?void 0:E[_])==null?void 0:L.data)==null?void 0:T[w.fv])==null?void 0:k.data:x=(M=(D=(A=m[C])==null?void 0:A[_])==null?void 0:D.data)==null?void 0:M[w.fv],b.series[0].data[0].value=x}),a.setOption(b)},h=async()=>{try{const g=await new Ft().getHistoryData(o,"gag");f(g)}catch(m){console.error("获取历史数据时出错:",m)}finally{const m=t1(o.conf,o.uid);e.value&&e.value.port.postMessage({request:m,type:"send"}),r.value&&r.value.send(JSON.stringify(m))}},v=dt(c,200);return l.watch(()=>o.conf,()=>{o.mode==="edit"&&v()},{deep:!0}),l.watchEffect(()=>{o.conf.socketData&&p(o.conf.socketData)}),l.onMounted(()=>{c(),o.mode==="preview"&&h()}),l.onBeforeUnmount(()=>{i&&i.uninstall(document.querySelector("#"+n)),a&&a.clear(),a&&p1(a),a=null}),(m,g)=>(l.openBlock(),l.createElementBlock("div",{class:"component-container",style:l.normalizeStyle({background:s.value.bgColor,borderRadius:`${s.value.radiusSize}px`})},[s.value.isHideTitle?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:"echart-title",style:l.normalizeStyle({color:s.value.titleColor})},l.toDisplayString(t.conf.name),5)),l.createElementVNode("div",{class:"echart-body"},[l.createElementVNode("div",{class:"w-full h-full",id:n})]),l.renderSlot(m.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-d36fa490"]])},Symbol.toStringTag,{value:"Module"})),s8e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e条形图%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-651.000000,%20-340.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M657.034892,353.547253%20C657.390386,353.547253%20657.678571,353.835438%20657.678571,354.190932%20C657.678571,354.516801%20657.436415,354.786112%20657.122236,354.828734%20L657.034892,354.83461%20L655.392935,354.83461%20C655.037442,354.83461%20654.749257,354.546425%20654.749257,354.190932%20C654.749257,353.865062%20654.991412,353.595752%20655.305592,353.55313%20L655.392935,353.547253%20L657.034892,353.547253%20Z%20M652.789724,353.547253%20C653.145217,353.547253%20653.433402,353.835438%20653.433402,354.190932%20C653.433402,354.516801%20653.191247,354.786112%20652.877067,354.828734%20L652.789724,354.83461%20L652.17399,354.83461%20C651.818496,354.83461%20651.530312,354.546425%20651.530312,354.190932%20C651.530312,353.865062%20651.772467,353.595752%20652.086646,353.55313%20L652.17399,353.547253%20L652.789724,353.547253%20Z%20M660.318806,350.26334%20C660.6743,350.26334%20660.962484,350.551524%20660.962484,350.907018%20C660.962484,351.232887%20660.720329,351.502198%20660.406149,351.54482%20L660.318806,351.550696%20L655.392935,351.550696%20C655.037442,351.550696%20654.749257,351.262512%20654.749257,350.907018%20C654.749257,350.581149%20654.991412,350.311838%20655.305592,350.269216%20L655.392935,350.26334%20L660.318806,350.26334%20Z%20M652.789724,350.26334%20C653.145217,350.26334%20653.433402,350.551524%20653.433402,350.907018%20C653.433402,351.232887%20653.191247,351.502198%20652.877067,351.54482%20L652.789724,351.550696%20L652.17399,351.550696%20C651.818496,351.550696%20651.530312,351.262512%20651.530312,350.907018%20C651.530312,350.581149%20651.772467,350.311838%20652.086646,350.269216%20L652.17399,350.26334%20L652.789724,350.26334%20Z%20M663.60272,346.979426%20C663.958213,346.979426%20664.246398,347.267611%20664.246398,347.623104%20C664.246398,347.948973%20664.004243,348.218284%20663.690063,348.260906%20L663.60272,348.266782%20L655.392935,348.266782%20C655.037442,348.266782%20654.749257,347.978598%20654.749257,347.623104%20C654.749257,347.297235%20654.991412,347.027924%20655.305592,346.985302%20L655.392935,346.979426%20L663.60272,346.979426%20Z%20M652.789724,346.979426%20C653.145217,346.979426%20653.433402,347.267611%20653.433402,347.623104%20C653.433402,347.948973%20653.191247,348.218284%20652.877067,348.260906%20L652.789724,348.266782%20L652.17399,348.266782%20C651.818496,348.266782%20651.530312,347.978598%20651.530312,347.623104%20C651.530312,347.297235%20651.772467,347.027924%20652.086646,346.985302%20L652.17399,346.979426%20L652.789724,346.979426%20Z%20M666.886633,343.695512%20C667.242127,343.695512%20667.530312,343.983697%20667.530312,344.339191%20C667.530312,344.66506%20667.288157,344.934371%20666.973977,344.976993%20L666.886633,344.982869%20L655.392935,344.982869%20C655.037442,344.982869%20654.749257,344.694684%20654.749257,344.339191%20C654.749257,344.013321%20654.991412,343.744011%20655.305592,343.701388%20L655.392935,343.695512%20L666.886633,343.695512%20Z%20M652.789724,343.695512%20C653.145217,343.695512%20653.433402,343.983697%20653.433402,344.339191%20C653.433402,344.66506%20653.191247,344.934371%20652.877067,344.976993%20L652.789724,344.982869%20L652.17399,344.982869%20C651.818496,344.982869%20651.530312,344.694684%20651.530312,344.339191%20C651.530312,344.013321%20651.772467,343.744011%20652.086646,343.701388%20L652.17399,343.695512%20L652.789724,343.695512%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",l8e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e条形图%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-651.000000,%20-340.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M657.034892,353.547253%20C657.390386,353.547253%20657.678571,353.835438%20657.678571,354.190932%20C657.678571,354.516801%20657.436415,354.786112%20657.122236,354.828734%20L657.034892,354.83461%20L655.392935,354.83461%20C655.037442,354.83461%20654.749257,354.546425%20654.749257,354.190932%20C654.749257,353.865062%20654.991412,353.595752%20655.305592,353.55313%20L655.392935,353.547253%20L657.034892,353.547253%20Z%20M652.789724,353.547253%20C653.145217,353.547253%20653.433402,353.835438%20653.433402,354.190932%20C653.433402,354.516801%20653.191247,354.786112%20652.877067,354.828734%20L652.789724,354.83461%20L652.17399,354.83461%20C651.818496,354.83461%20651.530312,354.546425%20651.530312,354.190932%20C651.530312,353.865062%20651.772467,353.595752%20652.086646,353.55313%20L652.17399,353.547253%20L652.789724,353.547253%20Z%20M660.318806,350.26334%20C660.6743,350.26334%20660.962484,350.551524%20660.962484,350.907018%20C660.962484,351.232887%20660.720329,351.502198%20660.406149,351.54482%20L660.318806,351.550696%20L655.392935,351.550696%20C655.037442,351.550696%20654.749257,351.262512%20654.749257,350.907018%20C654.749257,350.581149%20654.991412,350.311838%20655.305592,350.269216%20L655.392935,350.26334%20L660.318806,350.26334%20Z%20M652.789724,350.26334%20C653.145217,350.26334%20653.433402,350.551524%20653.433402,350.907018%20C653.433402,351.232887%20653.191247,351.502198%20652.877067,351.54482%20L652.789724,351.550696%20L652.17399,351.550696%20C651.818496,351.550696%20651.530312,351.262512%20651.530312,350.907018%20C651.530312,350.581149%20651.772467,350.311838%20652.086646,350.269216%20L652.17399,350.26334%20L652.789724,350.26334%20Z%20M663.60272,346.979426%20C663.958213,346.979426%20664.246398,347.267611%20664.246398,347.623104%20C664.246398,347.948973%20664.004243,348.218284%20663.690063,348.260906%20L663.60272,348.266782%20L655.392935,348.266782%20C655.037442,348.266782%20654.749257,347.978598%20654.749257,347.623104%20C654.749257,347.297235%20654.991412,347.027924%20655.305592,346.985302%20L655.392935,346.979426%20L663.60272,346.979426%20Z%20M652.789724,346.979426%20C653.145217,346.979426%20653.433402,347.267611%20653.433402,347.623104%20C653.433402,347.948973%20653.191247,348.218284%20652.877067,348.260906%20L652.789724,348.266782%20L652.17399,348.266782%20C651.818496,348.266782%20651.530312,347.978598%20651.530312,347.623104%20C651.530312,347.297235%20651.772467,347.027924%20652.086646,346.985302%20L652.17399,346.979426%20L652.789724,346.979426%20Z%20M666.886633,343.695512%20C667.242127,343.695512%20667.530312,343.983697%20667.530312,344.339191%20C667.530312,344.66506%20667.288157,344.934371%20666.973977,344.976993%20L666.886633,344.982869%20L655.392935,344.982869%20C655.037442,344.982869%20654.749257,344.694684%20654.749257,344.339191%20C654.749257,344.013321%20654.991412,343.744011%20655.305592,343.701388%20L655.392935,343.695512%20L666.886633,343.695512%20Z%20M652.789724,343.695512%20C653.145217,343.695512%20653.433402,343.983697%20653.433402,344.339191%20C653.433402,344.66506%20653.191247,344.934371%20652.877067,344.976993%20L652.789724,344.982869%20L652.17399,344.982869%20C651.818496,344.982869%20651.530312,344.694684%20651.530312,344.339191%20C651.530312,344.013321%20651.772467,343.744011%20652.086646,343.701388%20L652.17399,343.695512%20L652.789724,343.695512%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",c8e={class:"echart-body flex flex-col"},u8e=["onClick"],d8e={class:"flex-1"},f8e={DEFAULT_ICON:s8e,ACTIVE_ICON:l8e,NAME_CN:"条形进度",NAME_EN:"progressBar",ORDER:2},h8e={titleColor:{value:"#111",type:"color",label:"标题颜色"},textColor:{value:"#111",type:"color",label:"字体颜色"},bgColor:{value:"#fff",type:"color",label:"背景颜色"},barColor:{value:"#ebeef5",type:"color",label:"条形背景颜色"},radiusSize:{value:8,type:"number",label:"圆角大小"},textSize:{value:14,type:"number",label:"字体大小"},labelWidth:{value:48,type:"number",label:"标签宽度"},barWidth:{value:16,type:"number",label:"条形宽度"},isHideTitle:{value:!1,type:"checkbox",label:"是否隐藏标题"},showLabel:{value:!1,type:"checkbox",label:"是否显示数据"}},YI=[{name:"参数一",fv:"",max:200,color:"#f56c6c",maxType:"value"},{name:"参数二",fv:"",max:200,color:"#5cb87a",maxType:"value"}],mg=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:f8e,OPTIONS:h8e,DATA:YI,PARAMS:["name","fv","object_id","color","maxType","max"],SOURCE:["mosaic"],COMMON:{useAlias:!1,multiObject:!1,source:"mosaic"}},{__name:"progressBar",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"}},setup(t){const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null));""+Math.random().toString(16).substring(4,12);const n=t,a=l.ref({}),i=()=>{var p,h,v,m,g,y,_,b,C,w,S,x,E,L,T,k,A,D,M,O;const{conf:f}=n;a.value={bgColor:((h=(p=f==null?void 0:f.options)==null?void 0:p.bgColor)==null?void 0:h.value)||"#73bff9",barColor:((m=(v=f==null?void 0:f.options)==null?void 0:v.barColor)==null?void 0:m.value)||"#ebeef5",titleColor:((y=(g=f==null?void 0:f.options)==null?void 0:g.titleColor)==null?void 0:y.value)||"#111",textColor:((b=(_=f==null?void 0:f.options)==null?void 0:_.textColor)==null?void 0:b.value)||"#111",textSize:((w=(C=f==null?void 0:f.options)==null?void 0:C.textSize)==null?void 0:w.value)||14,radiusSize:((x=(S=f==null?void 0:f.options)==null?void 0:S.radiusSize)==null?void 0:x.value)??4,labelWidth:((L=(E=f==null?void 0:f.options)==null?void 0:E.labelWidth)==null?void 0:L.value)??80,barWidth:((k=(T=f==null?void 0:f.options)==null?void 0:T.barWidth)==null?void 0:k.value)??16,isHideTitle:((D=(A=f==null?void 0:f.options)==null?void 0:A.isHideTitle)==null?void 0:D.value)||!1,points:((O=(M=f==null?void 0:f.options)==null?void 0:M.points)==null?void 0:O.value)||10},f.data=f.data.length?f.data:YI},o=()=>{},s=f=>{const{data:p}=n.conf;f.history.forEach((h,v)=>{var m,g,y;if(p[v].maxType==="value"){let _=p[v].max;p[v].value=((m=h[0])==null?void 0:m[p[v].fv])||0,p[v].percent=_==0?0:Number((p[v].value/_*100).toFixed(2))}else{let _=((g=h[0])==null?void 0:g[p[v].max])||0;p[v].value=((y=h[0])==null?void 0:y[p[v].fv])||0,p[v].percent=_==0?0:Number((p[v].value/_*100).toFixed(2))}})},c=f=>{const{data:p,common:h}=n.conf,v=h.source||"mosaic";let m="";h.multiObject||(m=Be(h,h.useAlias,n.uid)),p.forEach((g,y)=>{if(h.multiObject&&(m=Be(g,h.useAlias,n.uid)),g.maxType==="value"){g.value=f[m][v].data[g.fv]||0;let _=g.max;g.percent=_==0?0:Number((g.value/_*100).toFixed(2))}else{g.value=f[m][v].data[g.fv]||0;let _=f[m][v].data[g.max]||0;g.percent=_==0?0:Number((g.value/_*100).toFixed(2))}})},u=async()=>{try{const p=await new Ft().getHistoryData(n,"progressBar");s(p)}catch(f){console.error("获取历史数据时出错:",f)}finally{const f=t1(n.conf,n.uid,"progressBar");e.value&&e.value.port.postMessage({request:f,type:"send"}),r.value&&r.value.send(JSON.stringify(f))}},d=dt(i,200);return l.watch(()=>n.conf,()=>{n.mode==="edit"&&d()},{deep:!0}),l.watchEffect(()=>{n.conf.socketData&&c(n.conf.socketData)}),l.onMounted(()=>{i(),n.mode==="preview"&&u()}),l.onBeforeUnmount(()=>{}),(f,p)=>{const h=JO;return l.openBlock(),l.createElementBlock("div",{class:"component-container",style:l.normalizeStyle({background:a.value.bgColor,borderRadius:`${a.value.radiusSize}px`})},[a.value.isHideTitle?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:"echart-title",style:l.normalizeStyle({color:a.value.titleColor})},l.toDisplayString(t.conf.name),5)),l.createElementVNode("div",c8e,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.conf.data,(v,m)=>(l.openBlock(),l.createElementBlock("div",{key:m,class:l.normalizeClass(["flex item",{pointer:t.conf.control,checked:v.checked}]),onClick:g=>o()},[l.createElementVNode("div",{class:"label",style:l.normalizeStyle({fontSize:a.value.textSize+"px",color:a.value.textColor,width:a.value.labelWidth+"px"})},l.toDisplayString(v.name),5),l.createElementVNode("div",d8e,[l.createVNode(h,{percentage:v.percent,"text-inside":!0,style:l.normalizeStyle({"--progress-bg-color":a.value.barColor}),color:v.color,strokeWidth:a.value.barWidth},null,8,["percentage","style","color","strokeWidth"])]),l.createElementVNode("div",{class:"value",style:l.normalizeStyle({fontSize:a.value.textSize+"px",color:a.value.textColor})},l.toDisplayString(v.value),5)],10,u8e))),128))]),l.renderSlot(f.$slots,"default",{},void 0,!0)],4)}}}),[["__scopeId","data-v-551f572d"]])},Symbol.toStringTag,{value:"Module"})),p8e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='18px'%20viewBox='0%200%2017%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e环形图%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-735.000000,%20-341.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M743.063004,342.931102%20C743.116316,343.282573%20742.87461,343.610715%20742.523139,343.664027%20C739.245615,344.16117%20736.791283,346.991546%20736.791283,350.341222%20C736.791283,353.692268%20739.24752,356.523394%20742.526687,357.018996%20C742.861546,357.069587%20743.201677,357.095181%20743.545242,357.095181%20C743.887612,357.095181%20744.226635,357.069756%20744.560421,357.019508%20C747.477621,356.580105%20749.784771,354.272574%20750.223659,351.355292%20C750.276546,351.003757%20750.604395,350.761654%20750.95593,350.81454%20C751.307466,350.867427%20751.549569,351.195276%20751.496682,351.546811%20C750.973739,355.022805%20748.228057,357.768941%20744.752113,358.292505%20C744.354903,358.352301%20743.951823,358.382531%20743.545242,358.382531%20C743.137244,358.382531%20742.732829,358.3521%20742.334339,358.291894%20C738.427868,357.701483%20735.503933,354.331278%20735.503933,350.341222%20C735.503933,346.352789%20738.425598,342.983478%20742.330079,342.391237%20C742.68155,342.337925%20743.009692,342.579631%20743.063004,342.931102%20Z%20M743.545242,346.738567%20C745.534982,346.738567%20747.14797,348.351556%20747.14797,350.341296%20C747.14797,352.331036%20745.534982,353.944024%20743.545242,353.944024%20C741.555502,353.944024%20739.942514,352.331036%20739.942514,350.341296%20C739.942514,348.351556%20741.555502,346.738567%20743.545242,346.738567%20Z%20M743.545242,348.025917%20C742.266485,348.025917%20741.229863,349.062539%20741.229863,350.341296%20C741.229863,351.620052%20742.266485,352.656675%20743.545242,352.656675%20C744.823999,352.656675%20745.860621,351.620052%20745.860621,350.341296%20C745.860621,349.062539%20744.823999,348.025917%20743.545242,348.025917%20Z%20M744.666769,342.383049%20L744.754011,342.390268%20C748.228261,342.914384%20750.972652,345.659076%20751.496359,349.133416%20C751.549346,349.484937%20751.307336,349.812855%20750.955816,349.865842%20C750.604295,349.918828%20750.276377,349.676819%20750.22339,349.325298%20C749.783861,346.409405%20747.477795,344.103086%20744.561978,343.663214%20C744.210463,343.610185%20743.968493,343.282238%20744.021521,342.930724%20C744.065712,342.637796%20744.300818,342.420939%20744.581381,342.387478%20L744.666769,342.383049%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",g8e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='18px'%20viewBox='0%200%2017%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e环形图%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-735.000000,%20-341.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M743.063004,342.931102%20C743.116316,343.282573%20742.87461,343.610715%20742.523139,343.664027%20C739.245615,344.16117%20736.791283,346.991546%20736.791283,350.341222%20C736.791283,353.692268%20739.24752,356.523394%20742.526687,357.018996%20C742.861546,357.069587%20743.201677,357.095181%20743.545242,357.095181%20C743.887612,357.095181%20744.226635,357.069756%20744.560421,357.019508%20C747.477621,356.580105%20749.784771,354.272574%20750.223659,351.355292%20C750.276546,351.003757%20750.604395,350.761654%20750.95593,350.81454%20C751.307466,350.867427%20751.549569,351.195276%20751.496682,351.546811%20C750.973739,355.022805%20748.228057,357.768941%20744.752113,358.292505%20C744.354903,358.352301%20743.951823,358.382531%20743.545242,358.382531%20C743.137244,358.382531%20742.732829,358.3521%20742.334339,358.291894%20C738.427868,357.701483%20735.503933,354.331278%20735.503933,350.341222%20C735.503933,346.352789%20738.425598,342.983478%20742.330079,342.391237%20C742.68155,342.337925%20743.009692,342.579631%20743.063004,342.931102%20Z%20M743.545242,346.738567%20C745.534982,346.738567%20747.14797,348.351556%20747.14797,350.341296%20C747.14797,352.331036%20745.534982,353.944024%20743.545242,353.944024%20C741.555502,353.944024%20739.942514,352.331036%20739.942514,350.341296%20C739.942514,348.351556%20741.555502,346.738567%20743.545242,346.738567%20Z%20M743.545242,348.025917%20C742.266485,348.025917%20741.229863,349.062539%20741.229863,350.341296%20C741.229863,351.620052%20742.266485,352.656675%20743.545242,352.656675%20C744.823999,352.656675%20745.860621,351.620052%20745.860621,350.341296%20C745.860621,349.062539%20744.823999,348.025917%20743.545242,348.025917%20Z%20M744.666769,342.383049%20L744.754011,342.390268%20C748.228261,342.914384%20750.972652,345.659076%20751.496359,349.133416%20C751.549346,349.484937%20751.307336,349.812855%20750.955816,349.865842%20C750.604295,349.918828%20750.276377,349.676819%20750.22339,349.325298%20C749.783861,346.409405%20747.477795,344.103086%20744.561978,343.663214%20C744.210463,343.610185%20743.968493,343.282238%20744.021521,342.930724%20C744.065712,342.637796%20744.300818,342.420939%20744.581381,342.387478%20L744.666769,342.383049%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",v8e={class:"echart-body flex flex-wrap"},m8e=["onClick"],y8e={DEFAULT_ICON:p8e,ACTIVE_ICON:g8e,NAME_CN:"环形进度",NAME_EN:"progressCircle",ORDER:3},b8e={titleColor:{value:"#111",type:"color",label:"标题颜色"},textColor:{value:"#111",type:"color",label:"字体颜色"},bgColor:{value:"#fff",type:"color",label:"背景颜色"},barColor:{value:"#ebeef5",type:"color",label:"条形背景颜色"},radiusSize:{value:8,type:"number",label:"圆角大小"},textSize:{value:14,type:"number",label:"字体大小"},labelWidth:{value:48,type:"number",label:"标签宽度"},barWidth:{value:16,type:"number",label:"条形宽度"},diameter:{value:70,type:"number",label:"圆环直径"},position:{value:"outer",type:"radio",option:[{value:"outer",label:"外部"},{value:"inner",label:"内部"}],label:"标签位置"},type:{value:"value",type:"radio",option:[{value:"value",label:"数值"},{value:"rate",label:"占比"}],label:"数据类型"},isHideTitle:{value:!1,type:"checkbox",label:"是否隐藏标题"}},ZI=[{name:"参数一",fv:"",max:200,color:"#f56c6c",maxType:"value"},{name:"参数二",fv:"",max:200,color:"#5cb87a",maxType:"value"}],yg=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:y8e,OPTIONS:b8e,DATA:ZI,PARAMS:["name","fv","object_id","color","maxType","max"],SOURCE:["mosaic"],COMMON:{useAlias:!1,multiObject:!1,source:"mosaic"}},{__name:"progressCircle",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"}},setup(t){const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null));""+Math.random().toString(16).substring(4,12);const n=t,a=l.ref({}),i=()=>{var h,v,m,g,y,_,b,C,w,S,x,E,L,T,k,A,D,M,O,R,P,B,z,$;const{conf:p}=n;a.value={bgColor:((v=(h=p==null?void 0:p.options)==null?void 0:h.bgColor)==null?void 0:v.value)||"#73bff9",barColor:((g=(m=p==null?void 0:p.options)==null?void 0:m.barColor)==null?void 0:g.value)||"#ebeef5",titleColor:((_=(y=p==null?void 0:p.options)==null?void 0:y.titleColor)==null?void 0:_.value)||"#111",textColor:((C=(b=p==null?void 0:p.options)==null?void 0:b.textColor)==null?void 0:C.value)||"#111",textSize:((S=(w=p==null?void 0:p.options)==null?void 0:w.textSize)==null?void 0:S.value)||14,radiusSize:((E=(x=p==null?void 0:p.options)==null?void 0:x.radiusSize)==null?void 0:E.value)??4,labelWidth:((T=(L=p==null?void 0:p.options)==null?void 0:L.labelWidth)==null?void 0:T.value)??80,barWidth:((A=(k=p==null?void 0:p.options)==null?void 0:k.barWidth)==null?void 0:A.value)??16,diameter:((M=(D=p==null?void 0:p.options)==null?void 0:D.diameter)==null?void 0:M.value)??70,position:((R=(O=p==null?void 0:p.options)==null?void 0:O.position)==null?void 0:R.value)??"outer",type:((B=(P=p==null?void 0:p.options)==null?void 0:P.type)==null?void 0:B.value)??"value",isHideTitle:(($=(z=p==null?void 0:p.options)==null?void 0:z.isHideTitle)==null?void 0:$.value)||!1},p.data=p.data.length?p.data:ZI},o=(p,h)=>a.value.type==="value"?h==null?void 0:h.value:p+"%",s=()=>{},c=p=>{const{data:h}=n.conf;p.history.forEach((v,m)=>{if(h[m].maxType==="value"){let g=h[m].max;h[m].value=v[0][h[m].fv],h[m].percent=g==0?0:Number((h[m].value/g*100).toFixed(2))}else{let g=v[0][h[m].max]||0;h[m].value=v[0][h[m].fv],h[m].percent=g==0?0:Number((h[m].value/g*100).toFixed(2))}})},u=p=>{const{data:h,common:v}=n.conf,m=v.source||"mosaic";let g="";v.multiObject||(g=Be(v,v.useAlias,n.uid)),h.forEach((y,_)=>{if(v.multiObject&&(g=Be(y,v.useAlias,n.uid)),y.maxType==="value"){y.value=p[g][m].data[y.fv]||0;let b=y.max;y.percent=b==0?0:Number((y.value/b*100).toFixed(2))}else{y.value=p[g][m].data[y.fv]||0;let b=p[g][m].data[y.max]||0;y.percent=b==0?0:Number((y.value/b*100).toFixed(2))}})},d=async()=>{try{const h=await new Ft().getHistoryData(n,"progressCircle");c(h)}catch(p){console.error("获取历史数据时出错:",p)}finally{const p=t1(n.conf,n.uid,"progressCircle");e.value&&e.value.port.postMessage({request:p,type:"send"}),r.value&&r.value.send(JSON.stringify(p))}},f=dt(i,200);return l.watch(()=>n.conf,()=>{n.mode==="edit"&&f()},{deep:!0}),l.watchEffect(()=>{n.conf.socketData&&u(n.conf.socketData)}),l.onMounted(()=>{i(),n.mode==="preview"&&d()}),l.onBeforeUnmount(()=>{}),(p,h)=>{const v=JO;return l.openBlock(),l.createElementBlock("div",{class:"component-container",style:l.normalizeStyle({background:a.value.bgColor,borderRadius:`${a.value.radiusSize}px`})},[a.value.isHideTitle?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:"echart-title",style:l.normalizeStyle({color:a.value.titleColor})},l.toDisplayString(t.conf.name),5)),l.createElementVNode("div",v8e,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.conf.data,(m,g)=>(l.openBlock(),l.createElementBlock("div",{key:g,class:l.normalizeClass(["circle-item",{pointer:t.conf.control,checked:m.checked}]),onClick:y=>s()},[l.createElementVNode("div",null,[l.createVNode(v,{percentage:m.percent,type:"circle",style:l.normalizeStyle({"--progress-bg-color":a.value.barColor}),color:m.color,strokeWidth:a.value.barWidth,width:a.value.diameter},{default:l.withCtx(({percentage:y})=>[l.createElementVNode("div",{style:l.normalizeStyle({fontSize:a.value.textSize+"px",color:a.value.textColor})},l.toDisplayString(o(y,m)),5),a.value.position==="inner"?(l.openBlock(),l.createElementBlock("div",{key:0,class:"mt-[6px]",style:l.normalizeStyle({fontSize:a.value.textSize+"px",color:a.value.textColor})},l.toDisplayString(m.name),5)):l.createCommentVNode("",!0)]),_:2},1032,["percentage","style","color","strokeWidth","width"]),a.value.position==="outer"?(l.openBlock(),l.createElementBlock("div",{key:0,class:"label",style:l.normalizeStyle({fontSize:a.value.textSize+"px",color:a.value.textColor})},l.toDisplayString(m.name),5)):l.createCommentVNode("",!0)])],10,m8e))),128))]),l.renderSlot(p.$slots,"default",{},void 0,!0)],4)}}}),[["__scopeId","data-v-68c04580"]])},Symbol.toStringTag,{value:"Module"})),bg="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e指数%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-200.000000,%20-190.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M200.943678,190.71954%20C201.269547,190.71954%20201.538858,190.961695%20201.58148,191.275875%20L201.587356,191.363218%20L201.587356,205.432184%20L215.656322,205.432184%20C215.982191,205.432184%20216.251502,205.674339%20216.294124,205.988519%20L216.3,206.075862%20C216.3,206.401731%20216.057845,206.671042%20215.743665,206.713664%20L215.656322,206.71954%20L200.943678,206.71954%20C200.617809,206.71954%20200.348498,206.477385%20200.305876,206.163205%20L200.3,206.075862%20L200.3,191.363218%20C200.3,191.007725%20200.588185,190.71954%20200.943678,190.71954%20Z%20M214.918413,193.225818%20C215.261007,193.320711%20215.461809,193.675365%20215.366916,194.017959%20L215.241964,194.443136%20L215.077476,194.968786%20L214.887386,195.54365%20C214.501018,196.681921%20214.057593,197.820681%20213.562374,198.887198%20C213.006976,200.083321%20212.419691,201.114919%20211.799181,201.935755%20C210.885328,203.144638%20209.74407,203.888053%20208.397333,204.262185%20C207.57944,204.489401%20206.87195,204.566339%20205.837183,204.569731%20L205.290501,204.565653%20L204.345977,204.54888%20C203.990483,204.54888%20203.702299,204.260695%20203.702299,203.905202%20C203.702299,203.549708%20203.990483,203.261523%20204.345977,203.261523%20L204.685423,203.265194%20L205.315575,203.278514%20L205.847238,203.282107%20C206.762539,203.277856%20207.373616,203.21047%20208.052747,203.021803%20C209.135394,202.721037%20210.034477,202.135375%20210.772236,201.159437%20C211.330473,200.420978%20211.874745,199.464933%20212.394751,198.345033%20C212.868532,197.324686%20213.295761,196.22752%20213.668341,195.129865%20L213.851787,194.57512%20L214.070477,193.867845%20L214.126271,193.674321%20C214.221164,193.331726%20214.575818,193.130925%20214.918413,193.225818%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",_g="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e指数%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-200.000000,%20-190.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M200.943678,190.71954%20C201.269547,190.71954%20201.538858,190.961695%20201.58148,191.275875%20L201.587356,191.363218%20L201.587356,205.432184%20L215.656322,205.432184%20C215.982191,205.432184%20216.251502,205.674339%20216.294124,205.988519%20L216.3,206.075862%20C216.3,206.401731%20216.057845,206.671042%20215.743665,206.713664%20L215.656322,206.71954%20L200.943678,206.71954%20C200.617809,206.71954%20200.348498,206.477385%20200.305876,206.163205%20L200.3,206.075862%20L200.3,191.363218%20C200.3,191.007725%20200.588185,190.71954%20200.943678,190.71954%20Z%20M214.918413,193.225818%20C215.261007,193.320711%20215.461809,193.675365%20215.366916,194.017959%20L215.241964,194.443136%20L215.077476,194.968786%20L214.887386,195.54365%20C214.501018,196.681921%20214.057593,197.820681%20213.562374,198.887198%20C213.006976,200.083321%20212.419691,201.114919%20211.799181,201.935755%20C210.885328,203.144638%20209.74407,203.888053%20208.397333,204.262185%20C207.57944,204.489401%20206.87195,204.566339%20205.837183,204.569731%20L205.290501,204.565653%20L204.345977,204.54888%20C203.990483,204.54888%20203.702299,204.260695%20203.702299,203.905202%20C203.702299,203.549708%20203.990483,203.261523%20204.345977,203.261523%20L204.685423,203.265194%20L205.315575,203.278514%20L205.847238,203.282107%20C206.762539,203.277856%20207.373616,203.21047%20208.052747,203.021803%20C209.135394,202.721037%20210.034477,202.135375%20210.772236,201.159437%20C211.330473,200.420978%20211.874745,199.464933%20212.394751,198.345033%20C212.868532,197.324686%20213.295761,196.22752%20213.668341,195.129865%20L213.851787,194.57512%20L214.070477,193.867845%20L214.126271,193.674321%20C214.221164,193.331726%20214.575818,193.130925%20214.918413,193.225818%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",_8e={DEFAULT_ICON:bg,ACTIVE_ICON:_g,NAME_CN:"分级曲线",NAME_EN:"Grading Curve",ORDER:2},S8e={titleColor:{value:"#111",type:"color",label:"标题颜色"},bgColor:{value:"#fff",type:"color",label:"背景颜色"},textColor:{value:"#111",type:"color",label:"文字颜色"},lineColor:{value:"#d64545",type:"color",label:"标线颜色"},radiusSize:{value:8,type:"number",label:"圆角大小"},textSize:{value:12,type:"number",label:"字体大小"},top:{value:20,type:"number",label:"上边距"},bottom:{value:40,type:"number",label:"下边距"},left:{value:20,type:"number",label:"左边距"},right:{value:30,type:"number",label:"右边距"},points:{value:100,type:"number",label:"显示数量"},isSmooth:{value:!1,type:"checkbox",label:"是否圆滑"},isHideTitle:{value:!1,type:"checkbox",label:"是否隐藏标题"}},KI=[{name:"参数一",fv:"",object_id:""}],Sg=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:_8e,OPTIONS:S8e,DATA:KI,PARAMS:["name","fv","object_id","colorArea"],SOURCE:["index","deviation","stability","balance","increment","risk"],COLOR_AREA:[{color:"#00ff00",value:50}],ITEMS:1,COMMON:{useAlias:!1,null:{type:"0",value:""},source:"index"}},{__name:"aqiIndass",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"}},setup(t){Rt([W0,w1,Z0,m2,x1,g1,V1,v1,ji]);const e="aqi_"+Math.random().toString(16).substring(4,12);let r=null,n=null;const a=t,i=l.ref({}),o=()=>{var v,m,g,y,_,b,C,w,S,x,E,L,T,k,A,D;const{conf:h}=a;i.value={bgColor:((m=(v=h==null?void 0:h.options)==null?void 0:v.bgColor)==null?void 0:m.value)||"#73bff9",titleColor:((y=(g=h==null?void 0:h.options)==null?void 0:g.titleColor)==null?void 0:y.value)||"#111",textColor:((b=(_=h==null?void 0:h.options)==null?void 0:_.textColor)==null?void 0:b.value)||"#111",lineColor:((w=(C=h==null?void 0:h.options)==null?void 0:C.lineColor)==null?void 0:w.value)||"#d64545",radiusSize:((x=(S=h==null?void 0:h.options)==null?void 0:S.radiusSize)==null?void 0:x.value)??4,textSize:((L=(E=h==null?void 0:h.options)==null?void 0:E.textSize)==null?void 0:L.value)??12,isHideTitle:((k=(T=h==null?void 0:h.options)==null?void 0:T.isHideTitle)==null?void 0:k.value)||!1,points:((D=(A=h==null?void 0:h.options)==null?void 0:A.points)==null?void 0:D.value)||10},h.data=h.data.length?h.data:KI,l.nextTick(()=>{let M=document.querySelector("#"+e);M&&(r||(r=s1(M),n=Qt({strategy:"scroll"}),n.listenTo(M,function(){r.resize()})),r.setOption(s(),!0))})},s=()=>{var m,g,y,_,b,C,w,S;const{conf:h}=a;var v={tooltip:{trigger:"axis"},legend:{show:!0,data:[(h==null?void 0:h.data[0].name)||""],right:20,top:0,textStyle:{color:i.value.textColor,fontSize:i.value.textSize},itemStyle:{color:i.value.lineColor},lineStyle:{color:i.value.lineColor}},grid:{top:((g=(m=h==null?void 0:h.options)==null?void 0:m.top)==null?void 0:g.value)||30,bottom:((_=(y=h==null?void 0:h.options)==null?void 0:y.bottom)==null?void 0:_.value)||20,left:((C=(b=h==null?void 0:h.options)==null?void 0:b.left)==null?void 0:C.value)||40,right:((S=(w=h==null?void 0:h.options)==null?void 0:w.right)==null?void 0:S.value)||20,containLabel:!0},dataZoom:[{type:"slider",start:80,end:100,height:20,bottom:15,left:60,right:60,handleStyle:{color:"#fff",shadowBlur:2,shadowOffsetX:2,shadowOffsetY:2},textStyle:{color:i.value.textColor},borderStyle:{color:"#000"},throttle:200,labelFormatter:function(x,E){if(!/^[1-9]\d{3}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}$/.test(E))return E;let L=E.split(" ");return L[0]+`
|
|
271
|
+
`+M.substr(5)),M),color:s.value.textColor,fontSize:s.value.textSize??12},axisLine:{lineStyle:{color:s.value.textColor}},splitLine:{lineStyle:{}},animationDuration:300,animationDurationUpdate:300},series:[{realtimeSort:(k=(T=g==null?void 0:g.options)==null?void 0:T.realSort)==null?void 0:k.value,type:"bar",barWidth:((D=(A=g==null?void 0:g.options)==null?void 0:A.barWidth)==null?void 0:D.value)+"%",data:c.data,label:{show:!0,position:"right",valueAnimation:!0,color:s.value.textColor,fontSize:s.value.textSize??12},itemStyle:{color:function(M){return c.colors[M.dataIndex]||"#5470c6"}}}],animationDuration:0,animationDurationUpdate:500,animationEasing:"linear",animationEasingUpdate:"linear"};return f(y)},f=g=>{var _,b,C,w,S,x,E,L,T,k,A,D;const{conf:y}=o;return g.series[0].realtimeSort=(b=(_=y==null?void 0:y.options)==null?void 0:_.realSort)==null?void 0:b.value,((w=(C=y==null?void 0:y.options)==null?void 0:C.direction)==null?void 0:w.value)==="x"?(g.yAxis.data=c.items,(x=(S=y==null?void 0:y.options)==null?void 0:S.realSort)!=null&&x.value&&(g.yAxis.inverse=((L=(E=y==null?void 0:y.options)==null?void 0:E.sortType)==null?void 0:L.value)==="desc"),g.series[0].label.position="right",g.xAxis.splitLine.lineStyle.type="dashed"):(g.xAxis.data=c.items,(k=(T=y==null?void 0:y.options)==null?void 0:T.realSort)!=null&&k.value&&(g.xAxis.inverse=((D=(A=y==null?void 0:y.options)==null?void 0:A.sortType)==null?void 0:D.value)==="asc"),g.series[0].label.position="top",g.yAxis.splitLine.lineStyle.type="dashed",delete g.yAxis.type),g},p=g=>{const{data:y}=o.conf;g.history.length&&(c.data=[],g.history.forEach((_,b)=>{let C=_.map(w=>w[y[b].fv]??"--")[0]??"--";c.data.push(C)}),a.setOption(d(),!0))},h=g=>{const{data:y,common:_}=o.conf,b=_.source||"mosaic";if(!g||!a)return;let C="";_.multiObject||(C=Be(_,_.useAlias,o.uid)),y.forEach((w,S)=>{var x,E,L;if(_.multiObject&&(C=Be(w,_.useAlias,o.uid)),g[C]){let T=(L=(E=(x=g[C])==null?void 0:x[b])==null?void 0:E.data)==null?void 0:L[w.fv];c.data[S]=T}}),a.setOption(d(),!0)},v=async()=>{try{const y=await new Ft().getHistoryData(o,"raceBar");p(y)}catch(g){console.error("获取历史数据时出错:",g)}finally{const g=t1(o.conf,o.uid);e.value&&e.value.port.postMessage({request:g,type:"send"}),r.value&&r.value.send(JSON.stringify(g))}},m=dt(u,200);return l.watch(()=>o.conf,()=>{o.mode==="edit"&&m()},{deep:!0}),l.watchEffect(()=>{o.conf.socketData&&h(o.conf.socketData)}),l.onMounted(()=>{u(),o.mode==="preview"&&v()}),l.onBeforeUnmount(()=>{i&&i.uninstall(document.querySelector("#"+n)),a&&a.clear(),a&&p1(a),a=null}),(g,y)=>{var _,b,C,w;return l.openBlock(),l.createElementBlock("div",{class:"component-container",style:l.normalizeStyle({background:(_=s.value)==null?void 0:_.bgColor,borderRadius:`${(b=s.value)==null?void 0:b.radiusSize}px`})},[(C=s.value)!=null&&C.isHideTitle?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:"echart-title",style:l.normalizeStyle({color:(w=s.value)==null?void 0:w.titleColor})},l.toDisplayString(t.conf.name),5)),l.createElementVNode("div",{class:"echart-body"},[l.createElementVNode("div",{class:"w-full h-full",id:n})]),l.renderSlot(g.$slots,"default",{},void 0,!0)],4)}}}),[["__scopeId","data-v-246b89f7"]])},Symbol.toStringTag,{value:"Module"})),K9e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e数组卡片%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-733.000000,%20-221.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cg%20id='卡片查看模式_view-grid-card备份'%20transform='translate(733.833333,%20222.995324)'%3e%3cpath%20d='M14.4615385,0%20C15.3112073,0%2016,0.688792693%2016,1.53846154%20L16,1.53846154%20L16,12.7130579%20C16,13.5627267%2015.3112073,14.2515194%2014.4615385,14.2515194%20L14.4615385,14.2515194%20L1.53846154,14.2515194%20C0.688792693,14.2515194%200,13.5627267%200,12.7130579%20L0,12.7130579%20L0,1.53846154%20C0,0.688792693%200.688792693,0%201.53846154,0%20L1.53846154,0%20Z%20M14.4615385,1.23076923%20L1.53846154,1.23076923%20C1.36852777,1.23076923%201.23076923,1.36852777%201.23076923,1.53846154%20L1.23076923,1.53846154%20L1.23076923,12.7130579%20C1.23076923,12.8829916%201.36852777,13.0207502%201.53846154,13.0207502%20L1.53846154,13.0207502%20L14.4615385,13.0207502%20C14.6314722,13.0207502%2014.7692308,12.8829916%2014.7692308,12.7130579%20L14.7692308,12.7130579%20L14.7692308,1.53846154%20C14.7692308,1.36852777%2014.6314722,1.23076923%2014.4615385,1.23076923%20L14.4615385,1.23076923%20Z%20M12.6961184,7.52450725%20C13.035986,7.52450725%2013.3115031,7.80002432%2013.3115031,8.13989186%20L13.3115031,8.13989186%20L13.3115031,10.7985846%20C13.3115031,11.1384522%2013.035986,11.4139693%2012.6961184,11.4139693%20L12.6961184,11.4139693%20L3.48717949,11.4139693%20C3.14731195,11.4139693%202.87179487,11.1384522%202.87179487,10.7985846%20L2.87179487,10.7985846%20L2.87179487,8.13989186%20C2.87179487,7.80002432%203.14731195,7.52450725%203.48717949,7.52450725%20L3.48717949,7.52450725%20Z%20M12.08,8.75507692%20L4.10184615,8.75507692%20L4.10184615,10.1830769%20L12.08,10.1830769%20L12.08,8.75507692%20Z%20M12.6961184,2.87179487%20C13.035986,2.87179487%2013.3115031,3.14731195%2013.3115031,3.48717949%20L13.3115031,3.48717949%20L13.3115031,6.14587227%20C13.3115031,6.48573981%2013.035986,6.76125689%2012.6961184,6.76125689%20L12.6961184,6.76125689%20L3.48717949,6.76125689%20C3.14731195,6.76125689%202.87179487,6.48573981%202.87179487,6.14587227%20L2.87179487,6.14587227%20L2.87179487,3.48717949%20C2.87179487,3.14731195%203.14731195,2.87179487%203.48717949,2.87179487%20L3.48717949,2.87179487%20Z%20M12.08,4.10184615%20L4.10184615,4.10184615%20L4.10184615,5.52984615%20L12.08,5.52984615%20L12.08,4.10184615%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",q9e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e数组卡片%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-733.000000,%20-221.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cg%20id='卡片查看模式_view-grid-card备份'%20transform='translate(733.833333,%20222.995324)'%3e%3cpath%20d='M14.4615385,0%20C15.3112073,0%2016,0.688792693%2016,1.53846154%20L16,1.53846154%20L16,12.7130579%20C16,13.5627267%2015.3112073,14.2515194%2014.4615385,14.2515194%20L14.4615385,14.2515194%20L1.53846154,14.2515194%20C0.688792693,14.2515194%200,13.5627267%200,12.7130579%20L0,12.7130579%20L0,1.53846154%20C0,0.688792693%200.688792693,0%201.53846154,0%20L1.53846154,0%20Z%20M14.4615385,1.23076923%20L1.53846154,1.23076923%20C1.36852777,1.23076923%201.23076923,1.36852777%201.23076923,1.53846154%20L1.23076923,1.53846154%20L1.23076923,12.7130579%20C1.23076923,12.8829916%201.36852777,13.0207502%201.53846154,13.0207502%20L1.53846154,13.0207502%20L14.4615385,13.0207502%20C14.6314722,13.0207502%2014.7692308,12.8829916%2014.7692308,12.7130579%20L14.7692308,12.7130579%20L14.7692308,1.53846154%20C14.7692308,1.36852777%2014.6314722,1.23076923%2014.4615385,1.23076923%20L14.4615385,1.23076923%20Z%20M12.6961184,7.52450725%20C13.035986,7.52450725%2013.3115031,7.80002432%2013.3115031,8.13989186%20L13.3115031,8.13989186%20L13.3115031,10.7985846%20C13.3115031,11.1384522%2013.035986,11.4139693%2012.6961184,11.4139693%20L12.6961184,11.4139693%20L3.48717949,11.4139693%20C3.14731195,11.4139693%202.87179487,11.1384522%202.87179487,10.7985846%20L2.87179487,10.7985846%20L2.87179487,8.13989186%20C2.87179487,7.80002432%203.14731195,7.52450725%203.48717949,7.52450725%20L3.48717949,7.52450725%20Z%20M12.08,8.75507692%20L4.10184615,8.75507692%20L4.10184615,10.1830769%20L12.08,10.1830769%20L12.08,8.75507692%20Z%20M12.6961184,2.87179487%20C13.035986,2.87179487%2013.3115031,3.14731195%2013.3115031,3.48717949%20L13.3115031,3.48717949%20L13.3115031,6.14587227%20C13.3115031,6.48573981%2013.035986,6.76125689%2012.6961184,6.76125689%20L12.6961184,6.76125689%20L3.48717949,6.76125689%20C3.14731195,6.76125689%202.87179487,6.48573981%202.87179487,6.14587227%20L2.87179487,6.14587227%20L2.87179487,3.48717949%20C2.87179487,3.14731195%203.14731195,2.87179487%203.48717949,2.87179487%20L3.48717949,2.87179487%20Z%20M12.08,4.10184615%20L4.10184615,4.10184615%20L4.10184615,5.52984615%20L12.08,5.52984615%20L12.08,4.10184615%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",X9e={class:"w-full h-full flex"},J9e={key:0,class:"px-[4px]"},Q9e={key:1,class:"px-[4px]"},bs="--",e5e={DEFAULT_ICON:K9e,ACTIVE_ICON:q9e,NAME_CN:"统计",NAME_EN:"Array Card",ORDER:5},t5e={bgColor:{value:"#fff",type:"color",label:"背景颜色"},textColor:{value:"#111",type:"color",label:"字体颜色"},textSize:{value:16,type:"number",label:"时间字体"},radiusSize:{value:8,type:"number",label:"圆角大小"}},PI=[{fv:"",object_id:""}],Qp=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:e5e,OPTIONS:t5e,DATA:PI,PARAMS:["fv","object_id","source"],SOURCE:["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],ITEMS:1,COMMON:{useAlias:!1,source:"mosaic"}},{__name:"arrayCard",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},socketData:{type:Object,default:()=>({})}},setup(t){const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null)),n=t,a=l.ref({}),i=f=>{var m;let p=((m=f==null?void 0:f[0])==null?void 0:m.value)||0,h=[],v=0;for(;v<String(Math.floor(p)).length;)h.push(String(Math.floor(p)).slice(v,v+3)),v+=3;return h.join(",")},o=()=>{var p,h,v,m,g,y,_,b;const{conf:f}=n;a.value={bgColor:((h=(p=f==null?void 0:f.options)==null?void 0:p.bgColor)==null?void 0:h.value)||"#fff",textColor:((m=(v=f==null?void 0:f.options)==null?void 0:v.textColor)==null?void 0:m.value)||"#111",textSize:((y=(g=f==null?void 0:f.options)==null?void 0:g.textSize)==null?void 0:y.value)||16,radiusSize:((b=(_=f==null?void 0:f.options)==null?void 0:_.radiusSize)==null?void 0:b.value)??4},f.data=f.data.length?f.data:PI},s=f=>{const{data:p,common:h}=n.conf,v=h.source||"mosaic";["statistics","calculate"].includes(v)&&(f=Pr(f,p)),n.conf.data.forEach((m,g)=>{var y,_;try{m.value=((_=(y=f.history[g])==null?void 0:y[0])==null?void 0:_[m.fv])||bs}catch(b){console.error("设置历史数据时出错:",b),m.value=bs}})},c=f=>{const{data:p,common:h}=n.conf,v=h.source||"mosaic",m=JSON.parse(sessionStorage.getItem(rr))||{};p.forEach(g=>{var _,b,C,w,S,x,E,L,T,k,A,D;let y=h.useAlias?m[g.object_alias]:g.object_id||n.uid;try{["statistics","calculate"].includes(v)?g.value=((w=(C=(b=(_=f[y])==null?void 0:_[v])==null?void 0:b.data)==null?void 0:C[g.fv])==null?void 0:w.data)??bs:["statisticsRealtime","calculateRealtime"].includes(v)?g.value=((T=(L=(E=(x=(S=f[y])==null?void 0:S[v])==null?void 0:x.data)==null?void 0:E[g.fv])==null?void 0:L.data)==null?void 0:T.data)??bs:g.value=((D=(A=(k=f[y])==null?void 0:k[v])==null?void 0:A.data)==null?void 0:D[g.fv])??bs}catch(M){console.error("设置实时数据时出错:",M),g.value=bs}})},u=async()=>{try{const{common:f}=n.conf,p=f.source||"mosaic";if(!["statisticsRealtime","calculateRealtime"].includes(p)){const v=await new Ft().getHistoryData(n,"arrayCard");s(v)}}catch(f){console.error("获取历史数据时出错:",f)}finally{const f=t1(n.conf,n.uid);e.value&&e.value.port.postMessage({request:f,type:"send"}),r.value&&r.value.send(JSON.stringify(f))}},d=dt(o,200);return l.watch(()=>n.conf,()=>{n.mode==="edit"&&d()},{deep:!0}),l.watchEffect(()=>{n.conf.socketData&&c(n.conf.socketData)}),l.onMounted(()=>{o(),n.mode==="preview"&&u()}),(f,p)=>{var h,v;return l.openBlock(),l.createElementBlock("div",X9e,[l.createElementVNode("div",{class:"flex flex-1 px-[12px]",style:l.normalizeStyle({backgroundColor:(h=a.value)==null?void 0:h.bgColor,borderRadius:`${(v=a.value)==null?void 0:v.radiusSize}px`})},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i(t.conf.data),(m,g)=>{var y,_;return l.openBlock(),l.createElementBlock("div",{key:g,class:l.normalizeClass(["flex items-center justify-center",{"unset-flex":m==","}]),style:l.normalizeStyle({fontSize:((y=a.value)==null?void 0:y.textSize)+"px",color:(_=a.value)==null?void 0:_.textColor})},[m!==","?(l.openBlock(),l.createElementBlock("div",J9e,l.toDisplayString(m),1)):(l.openBlock(),l.createElementBlock("div",Q9e,","))],6)}),128))],4),l.renderSlot(f.$slots,"default",{},void 0,!0)])}}}),[["__scopeId","data-v-88e57f27"]])},Symbol.toStringTag,{value:"Module"})),r5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e基础卡片%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-105.000000,%20-96.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M119.607399,97.4683109%20C120.37652,97.4683109%20121,98.0917972%20121,98.860912%20L121,98.860912%20L121,109.139088%20C121,109.908212%20120.376522,110.531689%20119.607399,110.531689%20L119.607399,110.531689%20L106.392601,110.531689%20C105.623486,110.531689%20105,109.908209%20105,109.139088%20L105,109.139088%20L105,98.860912%20C105,98.0917994%20105.623489,97.4683109%20106.392601,97.4683109%20L106.392601,97.4683109%20Z%20M119.607399,98.7852022%20L106.392601,98.7852022%20C106.350788,98.7852022%20106.316891,98.8190984%20106.316891,98.860912%20L106.316891,98.860912%20L106.316891,109.139088%20C106.316891,109.180907%20106.350782,109.214798%20106.392601,109.214798%20L106.392601,109.214798%20L119.607399,109.214798%20C119.649223,109.214798%20119.683109,109.180913%20119.683109,109.139088%20L119.683109,109.139088%20L119.683109,98.860912%20C119.683109,98.8190931%20119.649218,98.7852022%20119.607399,98.7852022%20L119.607399,98.7852022%20Z%20M117.588471,104.993404%20C117.952121,104.993404%20118.246917,105.2882%20118.246917,105.65185%20C118.246917,105.985195%20117.999206,106.260685%20117.677819,106.304285%20L117.588471,106.310295%20L108.411529,106.310295%20C108.047879,106.310295%20107.753083,106.015499%20107.753083,105.65185%20C107.753083,105.318504%20108.000794,105.043015%20108.322181,104.999415%20L108.411529,104.993404%20L117.588471,104.993404%20Z%20M112.449383,100.77201%20C112.813033,100.77201%20113.107829,101.066806%20113.107829,101.430456%20C113.107829,101.763801%20112.860118,102.039291%20112.538731,102.082891%20L112.449383,102.088902%20L108.411529,102.088902%20C108.047879,102.088902%20107.753083,101.794105%20107.753083,101.430456%20C107.753083,101.097111%20108.000794,100.821621%20108.322181,100.778021%20L108.411529,100.77201%20L112.449383,100.77201%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",n5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e基础卡片%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-105.000000,%20-96.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M119.607399,97.4683109%20C120.37652,97.4683109%20121,98.0917972%20121,98.860912%20L121,98.860912%20L121,109.139088%20C121,109.908212%20120.376522,110.531689%20119.607399,110.531689%20L119.607399,110.531689%20L106.392601,110.531689%20C105.623486,110.531689%20105,109.908209%20105,109.139088%20L105,109.139088%20L105,98.860912%20C105,98.0917994%20105.623489,97.4683109%20106.392601,97.4683109%20L106.392601,97.4683109%20Z%20M119.607399,98.7852022%20L106.392601,98.7852022%20C106.350788,98.7852022%20106.316891,98.8190984%20106.316891,98.860912%20L106.316891,98.860912%20L106.316891,109.139088%20C106.316891,109.180907%20106.350782,109.214798%20106.392601,109.214798%20L106.392601,109.214798%20L119.607399,109.214798%20C119.649223,109.214798%20119.683109,109.180913%20119.683109,109.139088%20L119.683109,109.139088%20L119.683109,98.860912%20C119.683109,98.8190931%20119.649218,98.7852022%20119.607399,98.7852022%20L119.607399,98.7852022%20Z%20M117.588471,104.993404%20C117.952121,104.993404%20118.246917,105.2882%20118.246917,105.65185%20C118.246917,105.985195%20117.999206,106.260685%20117.677819,106.304285%20L117.588471,106.310295%20L108.411529,106.310295%20C108.047879,106.310295%20107.753083,106.015499%20107.753083,105.65185%20C107.753083,105.318504%20108.000794,105.043015%20108.322181,104.999415%20L108.411529,104.993404%20L117.588471,104.993404%20Z%20M112.449383,100.77201%20C112.813033,100.77201%20113.107829,101.066806%20113.107829,101.430456%20C113.107829,101.763801%20112.860118,102.039291%20112.538731,102.082891%20L112.449383,102.088902%20L108.411529,102.088902%20C108.047879,102.088902%20107.753083,101.794105%20107.753083,101.430456%20C107.753083,101.097111%20108.000794,100.821621%20108.322181,100.778021%20L108.411529,100.77201%20L112.449383,100.77201%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",a5e={class:"w-full h-full relative"},i5e={class:"card-content"},Da="--",o5e="--",s5e={DEFAULT_ICON:r5e,ACTIVE_ICON:n5e,NAME_CN:"卡片",NAME_EN:"Card",ORDER:1},l5e={valueSize:{value:16,type:"number",label:"数值大小"},nameSize:{value:16,type:"number",label:"文字大小"},radiusSize:{value:8,type:"number",label:"圆角大小"},fontColor:{value:"#fff",type:"color",label:"字体颜色"},bgColor:{value:"#73bff9",type:"color",label:"背景颜色"},fontSize:{value:16,type:"number",label:"字体大小"},position:{value:"left",type:"radio",option:[{value:"left",label:"左"},{value:"center",label:"中"},{value:"right",label:"右"}],label:"文本位置"}},BI=[{name:"参数一",fv:"",object_id:"",unit:"",default:"",isText:!1}],eg=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:s5e,OPTIONS:l5e,DATA:BI,PARAMS:["name","fv","object_id","unit","default","isText","source"],SOURCE:["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],COMMON:{useAlias:!1,multiObject:!1,source:"mosaic"}},{__name:"crd",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},socketData:{type:Object,default:()=>({})}},setup(t){const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null)),n=t,a=l.ref({bgColor:"#73bff9",fontColor:"#fff",nameSize:16,valueSize:16,radiusSize:4}),i=h=>h?h.isText?o(h):s(h):{value:Da,name:o5e},o=h=>{var m;return{value:(((m=h.flag)==null?void 0:m.find(g=>String(g.code)==String(h.value)))||{}).text||Da,name:h.name}},s=h=>{const v=h.value??h.default??0,m=h.name;return{value:v,name:h.unit?`${m}(${h.unit})`:m}},c=()=>{var v,m,g,y,_,b,C,w,S,x,E,L;const{conf:h}=n;a.value={bgColor:((m=(v=h==null?void 0:h.options)==null?void 0:v.bgColor)==null?void 0:m.value)||"#73bff9",fontColor:((y=(g=h==null?void 0:h.options)==null?void 0:g.fontColor)==null?void 0:y.value)||"#fff",nameSize:((b=(_=h==null?void 0:h.options)==null?void 0:_.nameSize)==null?void 0:b.value)||16,valueSize:((w=(C=h==null?void 0:h.options)==null?void 0:C.valueSize)==null?void 0:w.value)||16,radiusSize:((x=(S=h==null?void 0:h.options)==null?void 0:S.radiusSize)==null?void 0:x.value)??4,position:((L=(E=h==null?void 0:h.options)==null?void 0:E.position)==null?void 0:L.value)||"left"},h.data=h.data.length?h.data:BI},u=h=>{const{common:v}=n.conf,m=v.source||"mosaic";n.conf.data.forEach((g,y)=>{var _,b,C;try{["statistics","calculate"].includes(m)?g.value=((_=h.history[y])==null?void 0:_[0])||Da:m==="summary"?g.value=h.data[g.fv]||Da:g.value=((C=(b=h.history[y])==null?void 0:b[0])==null?void 0:C[g.fv])||Da}catch(w){console.error("设置历史数据时出错:",w),g.value=Da}})},d=h=>{const{common:v,data:m}=n.conf,g=v.source||"mosaic";let y="";v.multiObject||(y=Be(v,v.useAlias,n.uid)),m.forEach((_,b)=>{var C,w,S,x,E,L,T,k,A,D,M,O;v.multiObject&&(y=Be(_,v.useAlias,n.uid));try{["statistics","calculate"].includes(g)?_.value=((x=(S=(w=(C=h[y])==null?void 0:C[g])==null?void 0:w.data)==null?void 0:S[_.fv])==null?void 0:x.data)??Da:["statisticsRealtime","calculateRealtime"].includes(g)?_.value=((A=(k=(T=(L=(E=h[y])==null?void 0:E[g])==null?void 0:L.data)==null?void 0:T[_.fv])==null?void 0:k.data)==null?void 0:A.data)??Da:_.value=((O=(M=(D=h[y])==null?void 0:D[g])==null?void 0:M.data)==null?void 0:O[_.fv])??Da}catch(R){console.error("设置实时数据时出错:",R),_.value=Da}})},f=async()=>{const{common:h}=n.conf,v=h.source||"mosaic";try{if(!["statisticsRealtime","calculateRealtime"].includes(v)){const g=await new Ft().getHistoryData(n,"crd");u(g)}}catch(m){console.error("获取历史数据时出错:",m)}finally{if(v!=="summary"){const m=t1(n.conf,n.uid);e.value&&e.value.port.postMessage({request:m,type:"send"}),r.value&&r.value.send(JSON.stringify(m))}}},p=dt(c,200);return l.watch(()=>n.conf,()=>{console.log("card"),n.mode==="edit"&&p()},{deep:!0}),l.watchEffect(()=>{n.conf.socketData&&d(n.conf.socketData)}),l.onMounted(()=>{c(),n.mode==="preview"&&f()}),(h,v)=>(l.openBlock(),l.createElementBlock("div",a5e,[l.createElementVNode("div",{class:"card-wrap",style:l.normalizeStyle({"background-color":a.value.bgColor,"border-radius":`${a.value.radiusSize}px`})},[l.createElementVNode("div",i5e,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.conf.data,(m,g)=>(l.openBlock(),l.createElementBlock("div",{class:"item-card",key:g},[l.createElementVNode("div",{class:"value",style:l.normalizeStyle({color:a.value.fontColor,"font-size":`${a.value.valueSize}px`,textAlign:a.value.position})},l.toDisplayString(i(m).value),5),l.createElementVNode("div",{class:"split-line",style:l.normalizeStyle({"border-color":a.value.fontColor})},null,4),l.createElementVNode("div",{class:"name",style:l.normalizeStyle({color:a.value.fontColor,"font-size":`${a.value.nameSize}px`,textAlign:a.value.position})},l.toDisplayString(i(m).name),5)]))),128))])],4),l.renderSlot(h.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-bd4d9eca"]])},Symbol.toStringTag,{value:"Module"})),c5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e事件卡片%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-191.000000,%20-96.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M205.92069,97.4712644%20C206.682471,97.4712644%20207.3,98.0888001%20207.3,98.8505747%20L207.3,98.8505747%20L207.3,109.149425%20C207.3,109.911209%20206.682473,110.528736%20205.92069,110.528736%20L205.92069,110.528736%20L192.67931,110.528736%20C191.917536,110.528736%20191.3,109.911206%20191.3,109.149425%20L191.3,109.149425%20L191.3,98.8505747%20C191.3,98.0888025%20191.917538,97.4712644%20192.67931,97.4712644%20L192.67931,97.4712644%20Z%20M205.92069,98.7586207%20L192.67931,98.7586207%20C192.628525,98.7586207%20192.587356,98.7997897%20192.587356,98.8505747%20L192.587356,98.8505747%20L192.587356,109.149425%20C192.587356,109.200216%20192.62852,109.241379%20192.67931,109.241379%20L192.67931,109.241379%20L205.92069,109.241379%20C205.971486,109.241379%20206.012644,109.200221%20206.012644,109.149425%20L206.012644,109.149425%20L206.012644,98.8505747%20C206.012644,98.7997844%20205.97148,98.7586207%20205.92069,98.7586207%20L205.92069,98.7586207%20Z%20M196.537914,107.926325%20L196.461627,107.89772%20C196.376008,107.859228%20196.300327,107.802566%20196.239493,107.732645%20L196.182458,107.65641%20C196.149793,107.605279%20196.124154,107.549226%20196.106902,107.489611%20L196.088588,107.405463%20C196.083991,107.374424%20196.081609,107.342662%20196.081609,107.310345%20L196.081609,101.425287%20C196.081609,101.296017%20196.119716,101.175647%20196.18531,101.074798%20C196.212059,101.034076%20196.24112,100.998703%20196.273556,100.966746%20C196.325849,100.915252%20196.38674,100.872715%20196.453929,100.841434%20C196.473529,100.832503%20196.487888,100.826598%20196.502497,100.821209%20C196.516162,100.816178%20196.529622,100.811721%20196.54327,100.807705%20C196.543966,100.8075%20196.544993,100.8072%20196.546021,100.806902%20L196.630169,100.788588%20C196.631149,100.788443%20196.63213,100.7883%20196.633112,100.788159%20C196.635183,100.787864%20196.636563,100.787673%20196.637944,100.787485%20L196.725287,100.781609%20L201.874713,100.781609%20C202.230206,100.781609%20202.518391,101.069794%20202.518391,101.425287%20C202.518391,101.751157%20202.276236,102.020467%20201.962056,102.063089%20L201.874713,102.068966%20L197.368,102.068264%20L197.368,103.723264%20L201.874713,103.724138%20C202.230206,103.724138%20202.518391,104.012322%20202.518391,104.367816%20C202.518391,104.693685%20202.276236,104.962996%20201.962056,105.005618%20L201.874713,105.011494%20L197.368,105.011264%20L197.368,106.666264%20L201.874713,106.666667%20C202.230206,106.666667%20202.518391,106.954851%20202.518391,107.310345%20C202.518391,107.636214%20202.276236,107.905525%20201.962056,107.948147%20L201.874713,107.954023%20L196.725287,107.954023%20C196.660114,107.954023%20196.597202,107.944337%20196.537914,107.926325%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",u5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e事件卡片%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-191.000000,%20-96.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M205.92069,97.4712644%20C206.682471,97.4712644%20207.3,98.0888001%20207.3,98.8505747%20L207.3,98.8505747%20L207.3,109.149425%20C207.3,109.911209%20206.682473,110.528736%20205.92069,110.528736%20L205.92069,110.528736%20L192.67931,110.528736%20C191.917536,110.528736%20191.3,109.911206%20191.3,109.149425%20L191.3,109.149425%20L191.3,98.8505747%20C191.3,98.0888025%20191.917538,97.4712644%20192.67931,97.4712644%20L192.67931,97.4712644%20Z%20M205.92069,98.7586207%20L192.67931,98.7586207%20C192.628525,98.7586207%20192.587356,98.7997897%20192.587356,98.8505747%20L192.587356,98.8505747%20L192.587356,109.149425%20C192.587356,109.200216%20192.62852,109.241379%20192.67931,109.241379%20L192.67931,109.241379%20L205.92069,109.241379%20C205.971486,109.241379%20206.012644,109.200221%20206.012644,109.149425%20L206.012644,109.149425%20L206.012644,98.8505747%20C206.012644,98.7997844%20205.97148,98.7586207%20205.92069,98.7586207%20L205.92069,98.7586207%20Z%20M196.537914,107.926325%20L196.461627,107.89772%20C196.376008,107.859228%20196.300327,107.802566%20196.239493,107.732645%20L196.182458,107.65641%20C196.149793,107.605279%20196.124154,107.549226%20196.106902,107.489611%20L196.088588,107.405463%20C196.083991,107.374424%20196.081609,107.342662%20196.081609,107.310345%20L196.081609,101.425287%20C196.081609,101.296017%20196.119716,101.175647%20196.18531,101.074798%20C196.212059,101.034076%20196.24112,100.998703%20196.273556,100.966746%20C196.325849,100.915252%20196.38674,100.872715%20196.453929,100.841434%20C196.473529,100.832503%20196.487888,100.826598%20196.502497,100.821209%20C196.516162,100.816178%20196.529622,100.811721%20196.54327,100.807705%20C196.543966,100.8075%20196.544993,100.8072%20196.546021,100.806902%20L196.630169,100.788588%20C196.631149,100.788443%20196.63213,100.7883%20196.633112,100.788159%20C196.635183,100.787864%20196.636563,100.787673%20196.637944,100.787485%20L196.725287,100.781609%20L201.874713,100.781609%20C202.230206,100.781609%20202.518391,101.069794%20202.518391,101.425287%20C202.518391,101.751157%20202.276236,102.020467%20201.962056,102.063089%20L201.874713,102.068966%20L197.368,102.068264%20L197.368,103.723264%20L201.874713,103.724138%20C202.230206,103.724138%20202.518391,104.012322%20202.518391,104.367816%20C202.518391,104.693685%20202.276236,104.962996%20201.962056,105.005618%20L201.874713,105.011494%20L197.368,105.011264%20L197.368,106.666264%20L201.874713,106.666667%20C202.230206,106.666667%20202.518391,106.954851%20202.518391,107.310345%20C202.518391,107.636214%20202.276236,107.905525%20201.962056,107.948147%20L201.874713,107.954023%20L196.725287,107.954023%20C196.660114,107.954023%20196.597202,107.944337%20196.537914,107.926325%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",d5e={class:"w-full h-full relative"},d6="--",f5e={DEFAULT_ICON:c5e,ACTIVE_ICON:u5e,NAME_CN:"状态",NAME_EN:"State",ORDER:3},h5e={nameSize:{value:20,type:"number",label:"名称字体"},valueSize:{value:32,type:"number",label:"数值字体"},timeSize:{value:16,type:"number",label:"时间字体"},radiusSize:{value:8,type:"number",label:"圆角大小"},bgColor:{value:"#73bff9",type:"color",label:"背景颜色"},fontColor:{value:"#fff",type:"color",label:"字体颜色"}},FI=[{fv:"",status_fv:"",object_id:"",status:[{code:0,text:"离线",color:"#a40e0e"}]}],p5e=["fv","status_fv","object_id"],g5e=["mosaic"],tg=l.ref(et().format("YYYY-MM-DD HH:mm:ss")),rg=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:f5e,OPTIONS:h5e,DATA:FI,PARAMS:p5e,SOURCE:g5e,ITEMS:1,COMMON:{useAlias:!1,source:"mosaic"}},{__name:"evn",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},socketData:{type:Object,default:()=>({})}},setup(t){const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null)),n=t,a=l.ref({}),i=()=>{var p,h,v,m,g,y,_,b,C,w,S,x;const{conf:f}=n;a.value={bgColor:((h=(p=f==null?void 0:f.options)==null?void 0:p.bgColor)==null?void 0:h.value)||"#73bff9",fontColor:((m=(v=f==null?void 0:f.options)==null?void 0:v.fontColor)==null?void 0:m.value)||"#fff",nameSize:((y=(g=f==null?void 0:f.options)==null?void 0:g.nameSize)==null?void 0:y.value)||20,valueSize:((b=(_=f==null?void 0:f.options)==null?void 0:_.valueSize)==null?void 0:b.value)||32,timeSize:((w=(C=f==null?void 0:f.options)==null?void 0:C.timeSize)==null?void 0:w.value)||16,radiusSize:((x=(S=f==null?void 0:f.options)==null?void 0:S.radiusSize)==null?void 0:x.value)??4},f.data=f.data.length?f.data:FI},o=f=>{var h;let p={color:"",text:""};return(h=f==null?void 0:f.status)==null||h.forEach(v=>{String(v.code)===String(f.statusValue)&&(p.text=v.text,p.color=v.color)}),p},s=f=>{n.conf.data.forEach((p,h)=>{var v,m,g,y,_,b;try{p.value=((m=(v=f.history[h])==null?void 0:v[0])==null?void 0:m[p.fv])||d6,p.statusValue=(y=(g=f.history[h])==null?void 0:g[0])==null?void 0:y[p.status_fv],tg.value=(b=(_=f.history[h])==null?void 0:_[0])==null?void 0:b.time}catch(C){console.error("设置历史数据时出错:",C),p.value=d6}})},c=f=>{const{data:p,common:h}=n.conf,v=h.source||"mosaic";let m="";h.multiObject||(m=Be(h,h.useAlias,n.uid)),p.forEach((g,y)=>{var _,b,C,w,S,x,E,L;h.multiObject&&(m=Be(g,h.useAlias,n.uid));try{g.value=((C=(b=(_=f[m])==null?void 0:_[v])==null?void 0:b.data)==null?void 0:C[g.fv])??d6,g.statusValue=(x=(S=(w=f[m])==null?void 0:w[v])==null?void 0:S.data)==null?void 0:x[g.status_fv],tg.value=(L=(E=f[m])==null?void 0:E[v])==null?void 0:L.datetime}catch(T){console.error("设置实时数据时出错:",T),g.value=d6}})},u=async()=>{try{const p=await new Ft().getHistoryData(n,"evn");s(p)}catch(f){console.error("获取历史数据时出错:",f)}finally{const f=t1(n.conf,n.uid,"evn");e.value&&e.value.port.postMessage({request:f,type:"send"}),r.value&&r.value.send(JSON.stringify(f))}},d=dt(i,200);return l.watch(()=>n.conf,()=>{n.mode==="edit"&&d()},{deep:!0}),l.watchEffect(()=>{n.conf.socketData&&c(n.conf.socketData)}),l.onMounted(()=>{i(),n.mode==="preview"&&u()}),(f,p)=>{var h,v,m,g,y,_,b,C,w,S,x,E,L,T,k;return l.openBlock(),l.createElementBlock("div",d5e,[l.createElementVNode("div",{class:"card-wrap",style:l.normalizeStyle({"background-color":o((v=(h=t.conf)==null?void 0:h.data)==null?void 0:v[0]).color||((m=a.value)==null?void 0:m.bgColor),"border-radius":`${(g=a.value)==null?void 0:g.radiusSize}px`,color:(y=a.value)==null?void 0:y.fontColor})},[l.createElementVNode("div",{class:"flex-[2_2_0%] border-b border-solid",style:l.normalizeStyle({fontSize:`${(_=a.value)==null?void 0:_.nameSize}px`,borderColor:(b=a.value)==null?void 0:b.fontColor})},l.toDisplayString(o((w=(C=t.conf)==null?void 0:C.data)==null?void 0:w[0]).text),5),l.createElementVNode("div",{class:"flex-[3_3_0%] border-b border-solid",style:l.normalizeStyle({fontSize:`${(S=a.value)==null?void 0:S.valueSize}px`,borderColor:(x=a.value)==null?void 0:x.fontColor})},l.toDisplayString((T=(L=(E=t.conf)==null?void 0:E.data)==null?void 0:L[0])==null?void 0:T.value),5),l.createElementVNode("div",{class:"flex-[2_2_0%]",style:l.normalizeStyle({fontSize:`${(k=a.value)==null?void 0:k.timeSize}px`})},l.toDisplayString(tg.value),5)],4),l.renderSlot(f.$slots,"default",{},void 0,!0)])}}}),[["__scopeId","data-v-ab656c77"]])},Symbol.toStringTag,{value:"Module"})),v5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e卡片组%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-649.000000,%20-221.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cg%20id='卡片查看模式_view-grid-card'%20transform='translate(649.583607,%20224.127953)'%3e%3cpath%20d='M14.4615385,0%20C15.3112073,0%2016,0.688792693%2016,1.53846154%20L16,1.53846154%20L16,10.4477993%20C16,11.2974681%2015.3112073,11.9862608%2014.4615385,11.9862608%20L14.4615385,11.9862608%20L1.53846154,11.9862608%20C0.688792693,11.9862608%200,11.2974681%200,10.4477993%20L0,10.4477993%20L0,1.53846154%20C0,0.688792693%200.688792693,0%201.53846154,0%20L1.53846154,0%20Z%20M14.4615385,1.23076923%20L1.53846154,1.23076923%20C1.36852777,1.23076923%201.23076923,1.36852777%201.23076923,1.53846154%20L1.23076923,1.53846154%20L1.23076923,10.4477993%20C1.23076923,10.6177331%201.36852777,10.7554916%201.53846154,10.7554916%20L1.53846154,10.7554916%20L14.4615385,10.7554916%20C14.6314722,10.7554916%2014.7692308,10.6177331%2014.7692308,10.4477993%20L14.7692308,10.4477993%20L14.7692308,1.53846154%20C14.7692308,1.36852777%2014.6314722,1.23076923%2014.4615385,1.23076923%20L14.4615385,1.23076923%20Z%20M6.14307642,3.81624937%20C6.48294396,3.81624937%206.75846104,4.09176645%206.75846104,4.43163399%20L6.75846104,4.43163399%20L6.75846104,7.55462685%20C6.75846104,7.89449439%206.48294396,8.17001146%206.14307642,8.17001146%20L6.14307642,8.17001146%20L2.95665531,8.17001146%20C2.61678777,8.17001146%202.3412707,7.89449439%202.3412707,7.55462685%20L2.3412707,7.55462685%20L2.3412707,4.43163399%20C2.3412707,4.09176645%202.61678777,3.81624937%202.95665531,3.81624937%20L2.95665531,3.81624937%20Z%20M13.247791,3.81624937%20C13.5876586,3.81624937%2013.8631757,4.09176645%2013.8631757,4.43163399%20L13.8631757,4.43163399%20L13.8631757,7.55462685%20C13.8631757,7.89449439%2013.5876586,8.17001146%2013.247791,8.17001146%20L13.247791,8.17001146%20L8.17088167,8.17001146%20C7.83101413,8.17001146%207.55549706,7.89449439%207.55549706,7.55462685%20L7.55549706,7.55462685%20L7.55549706,4.43163399%20C7.55549706,4.09176645%207.83101413,3.81624937%208.17088167,3.81624937%20L8.17088167,3.81624937%20Z%20M5.52707692,5.04615385%20L3.572,5.04615385%20L3.572,6.93846154%20L5.52707692,6.93846154%20L5.52707692,5.04615385%20Z%20M12.632,5.04615385%20L8.78553846,5.04615385%20L8.78553846,6.93846154%20L12.632,6.93846154%20L12.632,5.04615385%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",m5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e卡片组%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-649.000000,%20-221.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cg%20id='卡片查看模式_view-grid-card'%20transform='translate(649.583607,%20224.127953)'%3e%3cpath%20d='M14.4615385,0%20C15.3112073,0%2016,0.688792693%2016,1.53846154%20L16,1.53846154%20L16,10.4477993%20C16,11.2974681%2015.3112073,11.9862608%2014.4615385,11.9862608%20L14.4615385,11.9862608%20L1.53846154,11.9862608%20C0.688792693,11.9862608%200,11.2974681%200,10.4477993%20L0,10.4477993%20L0,1.53846154%20C0,0.688792693%200.688792693,0%201.53846154,0%20L1.53846154,0%20Z%20M14.4615385,1.23076923%20L1.53846154,1.23076923%20C1.36852777,1.23076923%201.23076923,1.36852777%201.23076923,1.53846154%20L1.23076923,1.53846154%20L1.23076923,10.4477993%20C1.23076923,10.6177331%201.36852777,10.7554916%201.53846154,10.7554916%20L1.53846154,10.7554916%20L14.4615385,10.7554916%20C14.6314722,10.7554916%2014.7692308,10.6177331%2014.7692308,10.4477993%20L14.7692308,10.4477993%20L14.7692308,1.53846154%20C14.7692308,1.36852777%2014.6314722,1.23076923%2014.4615385,1.23076923%20L14.4615385,1.23076923%20Z%20M6.14307642,3.81624937%20C6.48294396,3.81624937%206.75846104,4.09176645%206.75846104,4.43163399%20L6.75846104,4.43163399%20L6.75846104,7.55462685%20C6.75846104,7.89449439%206.48294396,8.17001146%206.14307642,8.17001146%20L6.14307642,8.17001146%20L2.95665531,8.17001146%20C2.61678777,8.17001146%202.3412707,7.89449439%202.3412707,7.55462685%20L2.3412707,7.55462685%20L2.3412707,4.43163399%20C2.3412707,4.09176645%202.61678777,3.81624937%202.95665531,3.81624937%20L2.95665531,3.81624937%20Z%20M13.247791,3.81624937%20C13.5876586,3.81624937%2013.8631757,4.09176645%2013.8631757,4.43163399%20L13.8631757,4.43163399%20L13.8631757,7.55462685%20C13.8631757,7.89449439%2013.5876586,8.17001146%2013.247791,8.17001146%20L13.247791,8.17001146%20L8.17088167,8.17001146%20C7.83101413,8.17001146%207.55549706,7.89449439%207.55549706,7.55462685%20L7.55549706,7.55462685%20L7.55549706,4.43163399%20C7.55549706,4.09176645%207.83101413,3.81624937%208.17088167,3.81624937%20L8.17088167,3.81624937%20Z%20M5.52707692,5.04615385%20L3.572,5.04615385%20L3.572,6.93846154%20L5.52707692,6.93846154%20L5.52707692,5.04615385%20Z%20M12.632,5.04615385%20L8.78553846,5.04615385%20L8.78553846,6.93846154%20L12.632,6.93846154%20L12.632,5.04615385%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",y5e={class:"echart-body"},b5e=["onClick"],_5e={class:"p-[6px] flex flex-wrap overflow-y-auto"},S5e={class:"h-[50%] flex items-center"},C5e={class:"h-[50%] flex items-center"},P2="--",w5e={DEFAULT_ICON:v5e,ACTIVE_ICON:m5e,NAME_CN:"卡片组",NAME_EN:"Group Card",ORDER:6},x5e={bgColor:{value:"#fff",type:"color",label:"背景颜色"},titleColor:{value:"#111",type:"color",label:"标题颜色"},textColor:{value:"#111",type:"color",label:"字体颜色"},itemColor:{value:"#e5e5e5",type:"color",label:"卡片颜色"},titleSize:{value:14,type:"number",label:"标题字体"},textSize:{value:13,type:"number",label:"卡片字体"},radiusSize:{value:8,type:"number",label:"圆角大小"},isHideTitle:{value:!1,type:"checkbox",label:"是否隐藏标题",repel:"isDynamic"},isDynamic:{value:!1,type:"checkbox",label:"是否动态标题"},cardWidth:{value:150,type:"number",label:"卡片宽度",dependent:"isDynamic"},cardHeight:{value:100,type:"number",label:"卡片高度",dependent:"isDynamic"},tags:{value:[{label:"TAB1",flag:[]}],type:"tags",label:"标签设置",dependent:"isDynamic"}},zI=[{name:"",fv:"",object_id:""}],ng=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:w5e,OPTIONS:x5e,DATA:zI,PARAMS:["name","fv","object_id"],SOURCE:["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],COMMON:{useAlias:!1,source:"mosaic"}},{__name:"groupCard",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},socketData:{type:Object,default:()=>({})}},setup(t){const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null)),n=t,a=l.ref({}),i=l.ref(0),o=l.computed(()=>{const{data:h,options:v}=n.conf,m=v.tags.value;return h.filter(g=>{var y;return(y=m[i.value])==null?void 0:y.flag.includes(g.fv)})}),s=h=>{i.value=h},c=()=>{var v,m,g,y,_,b,C,w,S,x,E,L,T,k,A,D,M,O,R,P,B,z,$,j;const{conf:h}=n;a.value={bgColor:((m=(v=h==null?void 0:h.options)==null?void 0:v.bgColor)==null?void 0:m.value)||"#fff",titleColor:((y=(g=h==null?void 0:h.options)==null?void 0:g.titleColor)==null?void 0:y.value)||"#111",textColor:((b=(_=h==null?void 0:h.options)==null?void 0:_.textColor)==null?void 0:b.value)||"#111",itemColor:((w=(C=h==null?void 0:h.options)==null?void 0:C.itemColor)==null?void 0:w.value)||"#e5e5e5",titleSize:((x=(S=h==null?void 0:h.options)==null?void 0:S.titleSize)==null?void 0:x.value)||14,textSize:((L=(E=h==null?void 0:h.options)==null?void 0:E.textSize)==null?void 0:L.value)||13,radiusSize:((k=(T=h==null?void 0:h.options)==null?void 0:T.radiusSize)==null?void 0:k.value)??4,cardHeight:((D=(A=h==null?void 0:h.options)==null?void 0:A.cardHeight)==null?void 0:D.value)??100,cardWidth:((O=(M=h==null?void 0:h.options)==null?void 0:M.cardWidth)==null?void 0:O.value)??150,isHideTitle:((P=(R=h==null?void 0:h.options)==null?void 0:R.isHideTitle)==null?void 0:P.value)??!1,isDynamic:((z=(B=h==null?void 0:h.options)==null?void 0:B.isDynamic)==null?void 0:z.value)??!1,tags:((j=($=h==null?void 0:h.options)==null?void 0:$.tags)==null?void 0:j.value)??[]},h.data=h.data.length?h.data:zI},u=h=>{const{data:v,common:m}=n.conf,g=m.source||"mosaic";["statistics","calculate"].includes(g)&&(h=Pr(h,v)),n.conf.data.forEach((y,_)=>{var b,C;try{y.value=((C=(b=h.history[_])==null?void 0:b[0])==null?void 0:C[y.fv])||P2}catch(w){console.error("设置历史数据时出错:",w),y.value=P2}})},d=h=>{const{data:v,common:m}=n.conf,g=m.source||"mosaic";let y="";m.multiObject||(y=Be(m,m.useAlias,n.uid)),v.forEach((_,b)=>{var C,w,S,x,E,L,T,k,A,D,M,O;m.multiObject&&(y=Be(_,m.useAlias,n.uid));try{["statistics","calculate"].includes(g)?_.value=((x=(S=(w=(C=h[y])==null?void 0:C[g])==null?void 0:w.data)==null?void 0:S[_.fv])==null?void 0:x.data)??P2:["statisticsRealtime","calculateRealtime"].includes(g)?_.value=((A=(k=(T=(L=(E=h[y])==null?void 0:E[g])==null?void 0:L.data)==null?void 0:T[_.fv])==null?void 0:k.data)==null?void 0:A.data)??P2:_.value=((O=(M=(D=h[y])==null?void 0:D[g])==null?void 0:M.data)==null?void 0:O[_.fv])??P2}catch(R){console.error("设置实时数据时出错:",R),_.value=P2}})},f=async()=>{try{const{data:h,common:v}=n.conf,m=v.source||"mosaic";if(!["statisticsRealtime","calculateRealtime"].includes(m)){const y=await new Ft().getHistoryData(n,"arrayCard");u(y)}}catch(h){console.error("获取历史数据时出错:",h)}finally{const h=t1(n.conf);e.value&&e.value.port.postMessage({request:h,type:"send"}),r.value&&r.value.send(JSON.stringify(h))}},p=dt(c,200);return l.watch(()=>n.conf,()=>{n.mode==="edit"&&p()},{deep:!0}),l.watchEffect(()=>{n.conf.socketData&&d(n.conf.socketData)}),l.onMounted(()=>{c(),n.mode==="preview"&&f()}),(h,v)=>{var m,g,y,_,b,C;return l.openBlock(),l.createElementBlock("div",{class:"component-container",style:l.normalizeStyle({background:(m=a.value)==null?void 0:m.bgColor,borderRadius:`${(g=a.value)==null?void 0:g.radiusSize}px`})},[(y=a.value)!=null&&y.isDynamic?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createElementVNode("div",{class:"flex border-b border-gray-200",style:l.normalizeStyle({color:a.value.titleColor,fontSize:`${a.value.titleSize}px`})},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(a.value.tags,(w,S)=>(l.openBlock(),l.createElementBlock("div",{key:S,class:l.normalizeClass(["py-[8px] px-[12px] cursor-pointer",{actived:i.value===S}]),onClick:x=>s(S)},l.toDisplayString(w.label),11,b5e))),128))],4),l.createElementVNode("div",_5e,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(o.value,(w,S)=>(l.openBlock(),l.createElementBlock("div",{key:S,class:"flex flex-col items-center rounded-[4px] m-[6px]",style:l.normalizeStyle({width:`${a.value.cardWidth}px`,height:`${a.value.cardHeight}px`,background:a.value.itemColor,fontSize:`${a.value.textSize}px`})},[l.createElementVNode("div",S5e,l.toDisplayString((w==null?void 0:w.value)||P2),1),l.createElementVNode("div",C5e,l.toDisplayString(w==null?void 0:w.name),1)],4))),128))])],64)):(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[(_=a.value)!=null&&_.isHideTitle?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:"echart-title",style:l.normalizeStyle({color:(b=a.value)==null?void 0:b.titleColor,fontSize:`${(C=a.value)==null?void 0:C.titleSize}px`})},l.toDisplayString(t.conf.name),5)),l.createElementVNode("div",y5e,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.conf.data,(w,S)=>{var x,E,L;return l.openBlock(),l.createElementBlock("div",{key:S,class:"flex-1 flex mx-[12px] px-[16px] mb-[12px] first:mt-[12px] rounded-[4px] items-center justify-between",style:l.normalizeStyle({background:(x=a.value)==null?void 0:x.itemColor,color:(E=a.value)==null?void 0:E.textColor,fontSize:`${(L=a.value)==null?void 0:L.textSize}px`})},[l.createElementVNode("div",null,l.toDisplayString(w.name),1),l.createElementVNode("div",null,l.toDisplayString(w.value),1)],4)}),128))])],64)),l.renderSlot(h.$slots,"default",{},void 0,!0)],4)}}}),[["__scopeId","data-v-1e993db1"]])},Symbol.toStringTag,{value:"Module"})),E5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e历程卡片%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-343.000000,%20-96.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M357.92069,97.4712644%20C358.682471,97.4712644%20359.3,98.0888001%20359.3,98.8505747%20L359.3,98.8505747%20L359.3,109.149425%20C359.3,109.911209%20358.682473,110.528736%20357.92069,110.528736%20L357.92069,110.528736%20L344.67931,110.528736%20C343.917536,110.528736%20343.3,109.911206%20343.3,109.149425%20L343.3,109.149425%20L343.3,98.8505747%20C343.3,98.0888025%20343.917538,97.4712644%20344.67931,97.4712644%20L344.67931,97.4712644%20Z%20M357.92069,98.7586207%20L344.67931,98.7586207%20C344.628525,98.7586207%20344.587356,98.7997897%20344.587356,98.8505747%20L344.587356,98.8505747%20L344.587356,109.149425%20C344.587356,109.200216%20344.62852,109.241379%20344.67931,109.241379%20L344.67931,109.241379%20L357.92069,109.241379%20C357.971486,109.241379%20358.012644,109.200221%20358.012644,109.149425%20L358.012644,109.149425%20L358.012644,98.8505747%20C358.012644,98.7997844%20357.97148,98.7586207%20357.92069,98.7586207%20L357.92069,98.7586207%20Z%20M352.143304,100.321839%20C353.302674,100.321839%20354.242529,101.261694%20354.242529,102.421063%20C354.242529,103.580433%20353.302674,104.520288%20352.143304,104.520288%20L351.219,104.520264%20L353.338314,107.008311%20C353.568858,107.278913%20353.536385,107.685172%20353.265783,107.915716%20C353.022242,108.123205%20352.668818,108.117651%20352.432502,107.917196%20L352.358379,107.843185%20L350.374,105.514264%20L350.374564,107.338576%20C350.374564,107.69407%20350.08638,107.982254%20349.730886,107.982254%20C349.405017,107.982254%20349.135706,107.740099%20349.093084,107.425919%20L349.087208,107.338576%20L349.087208,103.660415%20L349.093,103.572264%20L349.093103,100.321839%20L352.143304,100.321839%20Z%20M352.143304,101.609195%20L350.37954,101.609195%20L350.37954,103.232184%20L352.143304,103.232931%20C352.591687,103.232931%20352.955172,102.869446%20352.955172,102.421063%20C352.955172,102.007172%20352.645457,101.665619%20352.245143,101.615521%20L352.143304,101.609195%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",T5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e历程卡片%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-343.000000,%20-96.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M357.92069,97.4712644%20C358.682471,97.4712644%20359.3,98.0888001%20359.3,98.8505747%20L359.3,98.8505747%20L359.3,109.149425%20C359.3,109.911209%20358.682473,110.528736%20357.92069,110.528736%20L357.92069,110.528736%20L344.67931,110.528736%20C343.917536,110.528736%20343.3,109.911206%20343.3,109.149425%20L343.3,109.149425%20L343.3,98.8505747%20C343.3,98.0888025%20343.917538,97.4712644%20344.67931,97.4712644%20L344.67931,97.4712644%20Z%20M357.92069,98.7586207%20L344.67931,98.7586207%20C344.628525,98.7586207%20344.587356,98.7997897%20344.587356,98.8505747%20L344.587356,98.8505747%20L344.587356,109.149425%20C344.587356,109.200216%20344.62852,109.241379%20344.67931,109.241379%20L344.67931,109.241379%20L357.92069,109.241379%20C357.971486,109.241379%20358.012644,109.200221%20358.012644,109.149425%20L358.012644,109.149425%20L358.012644,98.8505747%20C358.012644,98.7997844%20357.97148,98.7586207%20357.92069,98.7586207%20L357.92069,98.7586207%20Z%20M352.143304,100.321839%20C353.302674,100.321839%20354.242529,101.261694%20354.242529,102.421063%20C354.242529,103.580433%20353.302674,104.520288%20352.143304,104.520288%20L351.219,104.520264%20L353.338314,107.008311%20C353.568858,107.278913%20353.536385,107.685172%20353.265783,107.915716%20C353.022242,108.123205%20352.668818,108.117651%20352.432502,107.917196%20L352.358379,107.843185%20L350.374,105.514264%20L350.374564,107.338576%20C350.374564,107.69407%20350.08638,107.982254%20349.730886,107.982254%20C349.405017,107.982254%20349.135706,107.740099%20349.093084,107.425919%20L349.087208,107.338576%20L349.087208,103.660415%20L349.093,103.572264%20L349.093103,100.321839%20L352.143304,100.321839%20Z%20M352.143304,101.609195%20L350.37954,101.609195%20L350.37954,103.232184%20L352.143304,103.232931%20C352.591687,103.232931%20352.955172,102.869446%20352.955172,102.421063%20C352.955172,102.007172%20352.645457,101.665619%20352.245143,101.615521%20L352.143304,101.609195%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",L5e={class:"w-full h-full relative"},k5e={class:"time flex-[1.3_1.3_0%]"},A5e={class:"flex-1 flex items-center justify-center"},D5e={class:"flex-1 flex items-center justify-center"},M5e={DEFAULT_ICON:E5e,ACTIVE_ICON:T5e,NAME_CN:"历程",NAME_EN:"Retainer",ORDER:4},O5e={nameSize:{value:16,type:"number",label:"名称字体"},valueSize:{value:24,type:"number",label:"数值字体"},timeSize:{value:14,type:"number",label:"时间字体"},radiusSize:{value:8,type:"number",label:"圆角大小"},bgColor:{value:"#73bff9",type:"color",label:"背景颜色"},fontColor:{value:"#fff",type:"color",label:"字体颜色"}},VI=[{source:"mosaic",status:[{code:0,text:"离线",color:"#a40e0e"}]}],ag=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:M5e,OPTIONS:O5e,DATA:VI,PARAMS:["fv","retainer","retainer_code","object_id","status","source"],SOURCE:["mosaic"],ITEMS:1},{__name:"rtn",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},socketData:{type:Object,default:()=>({})}},setup(t){const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null)),n={statusText:"离线",startTime:et().format("YYYY-MM-DD HH:mm:ss"),endTime:et().format("YYYY-MM-DD HH:mm:ss"),retainerTime:"",label_cn:"",value:0,color:"#ff0000"},a=t,i=l.ref({}),o=()=>{var v,m,g,y,_,b,C,w,S,x,E,L;const{conf:h}=a;i.value={bgColor:((m=(v=h==null?void 0:h.options)==null?void 0:v.bgColor)==null?void 0:m.value)||"#73bff9",fontColor:((y=(g=h==null?void 0:h.options)==null?void 0:g.fontColor)==null?void 0:y.value)||"#fff",nameSize:((b=(_=h==null?void 0:h.options)==null?void 0:_.nameSize)==null?void 0:b.value)||20,valueSize:((w=(C=h==null?void 0:h.options)==null?void 0:C.valueSize)==null?void 0:w.value)||32,timeSize:((x=(S=h==null?void 0:h.options)==null?void 0:S.timeSize)==null?void 0:x.value)||16,radiusSize:((L=(E=h==null?void 0:h.options)==null?void 0:E.radiusSize)==null?void 0:L.value)??4},h.data=h.data.length?h.data:VI};function s(h){let v=h/1e3;const m=Math.floor(v/3600),g=Math.floor(v/60)%60,y=Math.floor(v%60);return zero(m)+":"+zero(g)+":"+zero(y)}const c=(h,v)=>{const{conf:m,uid:g}=v;let y=m.retainer,_=m.retainer_code,b="",C=JSON.parse(sessionStorage.getItem("object_alias_uid_mapping"));m.useAlias&&(b=m.object_alias?C[m.object_alias]:g);let w=h.result[b].retainer.data[y]?h.result[b].retainer.data[y][_]:{};var S={};let x={};S=w.close||w.event||w.open||{},x.status=w.close?0:1,x.label_cn=S.label_local,x.startTime=w.open?et(w.open.opened_at).format("yyyy-MM-dd HH:mm:ss"):S.datetime,x.endTime=S.close_at?et(S.close_at).format("yyyy-MM-dd HH:mm:ss"):"";let E=null;return x.endTime&&(E=et(x.endTime).valueOf()-et(x.startTime).valueOf()),E?x.retainerTime=s(E):x.retainerTime="----",x.value=S.value?S.value[m.fv]:"",x},u=()=>{const{conf:h}=a;let v=h.data[0].status;v&&v.length&&v.forEach(m=>{m.code==v&&(n.statusText=m.text||n.statusText,n.value=m.color||n.value)})},d=h=>{let v=c(h,a);n.status=v.status,n.startTime=v.startTime,n.endTime=v.endTime,n.retainerTime=v.retainerTime,n.value=v.value,n.label_cn=v.label_cn,u()},f=async()=>{const h=$9e(a.conf,a.uid);e.value&&e.value.port.postMessage({request:h,type:"send"}),r.value&&r.value.send(JSON.stringify(h))},p=dt(o,200);return l.watch(()=>a.conf,()=>{a.mode==="edit"&&p()},{deep:!0}),l.watchEffect(()=>{a.conf.socketData&&d(a.conf.socketData)}),l.onMounted(()=>{o(),a.mode==="preview"&&f()}),(h,v)=>(l.openBlock(),l.createElementBlock("div",L5e,[l.createElementVNode("div",{class:"card-wrap flex flex-col",style:l.normalizeStyle({borderRadius:i.value.radiusSize+"px",backgroundColor:i.value.bgColor,color:i.value.fontColor})},[l.createElementVNode("div",{class:"title flex-1",style:l.normalizeStyle({fontSize:i.value.nameSize+"px",borderColor:i.value.fontColor})},l.toDisplayString(n.label_cn),5),l.createElementVNode("div",{class:"status flex-1",style:l.normalizeStyle({fontSize:i.value.statusSize+"px",borderColor:i.value.fontColor,color:n.color})},l.toDisplayString(n.statusText),5),l.createElementVNode("div",{class:"value flex-[2_2_0%]",style:l.normalizeStyle({fontSize:i.value.valueSize+"px",borderColor:i.value.fontColor})},l.toDisplayString(n.value),5),l.createElementVNode("div",k5e,[l.createElementVNode("div",{class:"flex-[2.5_2.5_0%] flex flex-col h-[100%] items-center justify-center",style:l.normalizeStyle({fontSize:i.value.timeSize+"px"})},[l.createElementVNode("div",A5e,l.toDisplayString(n.startTime),1),l.createElementVNode("div",D5e,l.toDisplayString(n.endTime||"----"),1)],4),l.createElementVNode("div",{class:"flex-1 flex h-[100%] items-center justify-center border-l border-solid",style:l.normalizeStyle({fontSize:i.value.timeSize+"px",borderColor:i.value.fontColor})},l.toDisplayString(n.retainerTime),5)])],4),l.renderSlot(h.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-3c981fff"]])},Symbol.toStringTag,{value:"Module"})),I5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e数值卡片%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-263.000000,%20-96.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M277.92069,97.4712644%20C278.682471,97.4712644%20279.3,98.0888001%20279.3,98.8505747%20L279.3,98.8505747%20L279.3,109.149425%20C279.3,109.911209%20278.682473,110.528736%20277.92069,110.528736%20L277.92069,110.528736%20L264.67931,110.528736%20C263.917536,110.528736%20263.3,109.911206%20263.3,109.149425%20L263.3,109.149425%20L263.3,98.8505747%20C263.3,98.0888025%20263.917538,97.4712644%20264.67931,97.4712644%20L264.67931,97.4712644%20Z%20M277.92069,98.7586207%20L264.67931,98.7586207%20C264.628525,98.7586207%20264.587356,98.7997897%20264.587356,98.8505747%20L264.587356,98.8505747%20L264.587356,109.149425%20C264.587356,109.200216%20264.62852,109.241379%20264.67931,109.241379%20L264.67931,109.241379%20L277.92069,109.241379%20C277.971486,109.241379%20278.012644,109.200221%20278.012644,109.149425%20L278.012644,109.149425%20L278.012644,98.8505747%20C278.012644,98.7997844%20277.97148,98.7586207%20277.92069,98.7586207%20L277.92069,98.7586207%20Z%20M273.874713,100.66937%20C274.200582,100.66937%20274.469893,100.911525%20274.512515,101.225705%20L274.518391,101.313048%20L274.518391,107.198106%20L274.513991,107.281483%20C274.538251,107.487919%20274.462246,107.702261%20274.292161,107.847183%20C274.044098,108.058501%20273.682057,108.048825%20273.445862,107.837313%20L273.384745,107.774638%20L269.368,103.060264%20L269.368966,107.198106%20C269.368966,107.553599%20269.080781,107.841784%20268.725287,107.841784%20C268.399418,107.841784%20268.130107,107.599629%20268.087485,107.285449%20L268.081609,107.198106%20L268.081609,101.313048%20L268.082187,101.285675%20C268.082816,101.270976%20268.083946,101.256302%20268.085574,101.24168%20L268.081609,101.313048%20C268.081609,101.26688%20268.08647,101.221847%20268.095707,101.178434%20C268.097405,101.170903%20268.099263,101.1629%20268.101275,101.154931%20C268.107261,101.130888%20268.114565,101.107741%20268.123099,101.085199%20C268.126373,101.076657%20268.129862,101.067978%20268.133545,101.059367%20C268.141412,101.041006%20268.150086,101.023157%20268.159537,101.005792%20C268.166518,100.992781%20268.174321,100.979531%20268.182629,100.966529%20C268.189963,100.955262%20268.197427,100.944361%20268.205211,100.933708%20C268.213941,100.92154%20268.223634,100.909215%20268.23383,100.897194%20C268.282315,100.841529%20268.332493,100.798881%20268.388316,100.764515%20L268.307839,100.823066%20C268.339551,100.796052%20268.373125,100.772649%20268.408061,100.752818%20C268.429973,100.740403%20268.452735,100.729194%20268.476205,100.719335%20C268.486406,100.715037%20268.496705,100.711027%20268.507074,100.707293%20C268.525188,100.700768%20268.543849,100.694982%20268.562851,100.690041%20C268.578079,100.686087%20268.593439,100.682694%20268.608873,100.679872%20C268.624283,100.677053%20268.639962,100.674777%20268.655813,100.673076%20C268.673322,100.671183%20268.69078,100.670023%20268.708242,100.669572%20L268.725287,100.66937%20L268.725287,100.66937%20L268.747519,100.669748%20C268.767719,100.670452%20268.787878,100.672102%20268.807925,100.674691%20L268.725287,100.66937%20C268.772556,100.66937%20268.818635,100.674465%20268.863005,100.684136%20C268.872752,100.686367%20268.882402,100.688708%20268.892,100.691272%20C268.915006,100.69732%20268.937508,100.704716%20268.959426,100.713279%20C268.969115,100.717097%20268.979031,100.721241%20268.988855,100.725641%20C269.007259,100.733908%20269.025055,100.742939%20269.042352,100.752748%20C269.0816,100.774844%20269.119243,100.801687%20269.154138,100.832936%20L269.185324,100.862839%20C269.195227,100.872957%20269.204798,100.883399%20269.214021,100.894149%20L269.215255,100.895611%20L273.231,105.609264%20L273.231034,101.313048%20C273.231034,100.957555%20273.519219,100.66937%20273.874713,100.66937%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",N5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='16px'%20viewBox='0%200%2017%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e数值卡片%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-263.000000,%20-96.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M277.92069,97.4712644%20C278.682471,97.4712644%20279.3,98.0888001%20279.3,98.8505747%20L279.3,98.8505747%20L279.3,109.149425%20C279.3,109.911209%20278.682473,110.528736%20277.92069,110.528736%20L277.92069,110.528736%20L264.67931,110.528736%20C263.917536,110.528736%20263.3,109.911206%20263.3,109.149425%20L263.3,109.149425%20L263.3,98.8505747%20C263.3,98.0888025%20263.917538,97.4712644%20264.67931,97.4712644%20L264.67931,97.4712644%20Z%20M277.92069,98.7586207%20L264.67931,98.7586207%20C264.628525,98.7586207%20264.587356,98.7997897%20264.587356,98.8505747%20L264.587356,98.8505747%20L264.587356,109.149425%20C264.587356,109.200216%20264.62852,109.241379%20264.67931,109.241379%20L264.67931,109.241379%20L277.92069,109.241379%20C277.971486,109.241379%20278.012644,109.200221%20278.012644,109.149425%20L278.012644,109.149425%20L278.012644,98.8505747%20C278.012644,98.7997844%20277.97148,98.7586207%20277.92069,98.7586207%20L277.92069,98.7586207%20Z%20M273.874713,100.66937%20C274.200582,100.66937%20274.469893,100.911525%20274.512515,101.225705%20L274.518391,101.313048%20L274.518391,107.198106%20L274.513991,107.281483%20C274.538251,107.487919%20274.462246,107.702261%20274.292161,107.847183%20C274.044098,108.058501%20273.682057,108.048825%20273.445862,107.837313%20L273.384745,107.774638%20L269.368,103.060264%20L269.368966,107.198106%20C269.368966,107.553599%20269.080781,107.841784%20268.725287,107.841784%20C268.399418,107.841784%20268.130107,107.599629%20268.087485,107.285449%20L268.081609,107.198106%20L268.081609,101.313048%20L268.082187,101.285675%20C268.082816,101.270976%20268.083946,101.256302%20268.085574,101.24168%20L268.081609,101.313048%20C268.081609,101.26688%20268.08647,101.221847%20268.095707,101.178434%20C268.097405,101.170903%20268.099263,101.1629%20268.101275,101.154931%20C268.107261,101.130888%20268.114565,101.107741%20268.123099,101.085199%20C268.126373,101.076657%20268.129862,101.067978%20268.133545,101.059367%20C268.141412,101.041006%20268.150086,101.023157%20268.159537,101.005792%20C268.166518,100.992781%20268.174321,100.979531%20268.182629,100.966529%20C268.189963,100.955262%20268.197427,100.944361%20268.205211,100.933708%20C268.213941,100.92154%20268.223634,100.909215%20268.23383,100.897194%20C268.282315,100.841529%20268.332493,100.798881%20268.388316,100.764515%20L268.307839,100.823066%20C268.339551,100.796052%20268.373125,100.772649%20268.408061,100.752818%20C268.429973,100.740403%20268.452735,100.729194%20268.476205,100.719335%20C268.486406,100.715037%20268.496705,100.711027%20268.507074,100.707293%20C268.525188,100.700768%20268.543849,100.694982%20268.562851,100.690041%20C268.578079,100.686087%20268.593439,100.682694%20268.608873,100.679872%20C268.624283,100.677053%20268.639962,100.674777%20268.655813,100.673076%20C268.673322,100.671183%20268.69078,100.670023%20268.708242,100.669572%20L268.725287,100.66937%20L268.725287,100.66937%20L268.747519,100.669748%20C268.767719,100.670452%20268.787878,100.672102%20268.807925,100.674691%20L268.725287,100.66937%20C268.772556,100.66937%20268.818635,100.674465%20268.863005,100.684136%20C268.872752,100.686367%20268.882402,100.688708%20268.892,100.691272%20C268.915006,100.69732%20268.937508,100.704716%20268.959426,100.713279%20C268.969115,100.717097%20268.979031,100.721241%20268.988855,100.725641%20C269.007259,100.733908%20269.025055,100.742939%20269.042352,100.752748%20C269.0816,100.774844%20269.119243,100.801687%20269.154138,100.832936%20L269.185324,100.862839%20C269.195227,100.872957%20269.204798,100.883399%20269.214021,100.894149%20L269.215255,100.895611%20L273.231,105.609264%20L273.231034,101.313048%20C273.231034,100.957555%20273.519219,100.66937%20273.874713,100.66937%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",R5e={class:"w-full h-full relative"},_s="--",P5e="--",B5e={DEFAULT_ICON:I5e,ACTIVE_ICON:N5e,NAME_CN:"数值",NAME_EN:"Value",ORDER:3},F5e={nameSize:{value:20,type:"number",label:"名称字体"},valueSize:{value:32,type:"number",label:"数值字体"},timeSize:{value:16,type:"number",label:"时间字体"},radiusSize:{value:8,type:"number",label:"圆角大小"},bgColor:{value:"#73bff9",type:"color",label:"背景颜色"},fontColor:{value:"#fff",type:"color",label:"字体颜色"}},$I=[{name:"参数一",fv:"",object_id:""}],ig=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:B5e,OPTIONS:F5e,DATA:$I,PARAMS:["name","fv","object_id"],SOURCE:["mosaic","statistics","calculate","statisticsRealtime","calculateRealtime"],ITEMS:1,COMMON:{useAlias:!1,source:"mosaic"}},{__name:"vlu",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},socketData:{type:Object,default:()=>({})}},setup(t){const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null)),n=t,a=l.ref({}),i=l.ref(et().format("YYYY-MM-DD HH:mm:ss")),o=()=>{var p,h,v,m,g,y,_,b,C,w,S,x;const{conf:f}=n;a.value={bgColor:((h=(p=f==null?void 0:f.options)==null?void 0:p.bgColor)==null?void 0:h.value)||"#73bff9",fontColor:((m=(v=f==null?void 0:f.options)==null?void 0:v.fontColor)==null?void 0:m.value)||"#fff",nameSize:((y=(g=f==null?void 0:f.options)==null?void 0:g.nameSize)==null?void 0:y.value)||20,valueSize:((b=(_=f==null?void 0:f.options)==null?void 0:_.valueSize)==null?void 0:b.value)||32,timeSize:((w=(C=f==null?void 0:f.options)==null?void 0:C.timeSize)==null?void 0:w.value)||16,radiusSize:((x=(S=f==null?void 0:f.options)==null?void 0:S.radiusSize)==null?void 0:x.value)??4},f.data=f.data.length?f.data:$I},s=f=>{const{data:p,common:h}=n.conf,v=h.source||"mosaic";["statistics","calculate"].includes(v)&&(f=Pr(f,p)),n.conf.data.forEach((m,g)=>{var y,_,b,C;try{m.value=((_=(y=f.history[g])==null?void 0:y[0])==null?void 0:_[m.fv])||_s,i.value=(C=(b=f.history[g])==null?void 0:b[0])==null?void 0:C.time}catch(w){console.error("设置历史数据时出错:",w),m.value=_s}})},c=f=>{const{data:p,common:h}=n.conf,v=h.source||"mosaic";let m="";h.multiObject||(m=Be(h,h.useAlias,n.uid)),p.forEach((g,y)=>{var _,b,C,w,S,x,E,L,T,k,A,D,M,O,R,P,B,z,$,j,Z,W;h.multiObject&&(m=Be(g,h.useAlias,n.uid));try{["statistics","calculate"].includes(v)?(g.value=((w=(C=(b=(_=f[m])==null?void 0:_[v])==null?void 0:b.data)==null?void 0:C[g.fv])==null?void 0:w.data)??_s,i.value=(L=(E=(x=(S=f[m])==null?void 0:S[v])==null?void 0:x.data)==null?void 0:E[g.fv])==null?void 0:L.start_time):["statisticsRealtime","calculateRealtime"].includes(v)?(g.value=((M=(D=(A=(k=(T=f[m])==null?void 0:T[v])==null?void 0:k.data)==null?void 0:A[g.fv])==null?void 0:D.data)==null?void 0:M.data)??_s,i.value=(B=(P=(R=(O=f[m])==null?void 0:O[v])==null?void 0:R.data)==null?void 0:P[g.fv])==null?void 0:B.datetime):(g.value=((j=($=(z=f[m])==null?void 0:z[v])==null?void 0:$.data)==null?void 0:j[g.fv])??_s,i.value=(W=(Z=f[m])==null?void 0:Z[v])==null?void 0:W.datetime)}catch(K){console.error("设置实时数据时出错:",K),g.value=_s}})},u=async()=>{try{const{data:f,common:p}=n.conf,h=p.source||"mosaic";if(!["statisticsRealtime","calculateRealtime"].includes(h)){const m=await new Ft().getHistoryData(n,"vlu");s(m)}}catch(f){console.error("获取历史数据时出错:",f)}finally{const f=t1(n.conf,n.uid);e.value&&e.value.port.postMessage({request:f,type:"send"}),r.value&&r.value.send(JSON.stringify(f))}},d=dt(o,200);return l.watch(()=>n.conf,()=>{n.mode==="edit"&&d()},{deep:!0}),l.watchEffect(()=>{n.conf.socketData&&c(n.conf.socketData)}),l.onMounted(()=>{o(),n.mode==="preview"&&u()}),(f,p)=>{var h,v,m,g,y,_;return l.openBlock(),l.createElementBlock("div",R5e,[l.createElementVNode("div",{class:"card-wrap",style:l.normalizeStyle({"background-color":a.value.bgColor,"border-radius":`${a.value.radiusSize}px`,color:a.value.fontColor})},[l.createElementVNode("div",{class:"flex-[2_2_0%] border-b border-solid",style:l.normalizeStyle({fontSize:`${a.value.nameSize}px`,borderColor:a.value.fontColor})},l.toDisplayString((m=(v=(h=t.conf)==null?void 0:h.data)==null?void 0:v[0])==null?void 0:m.name),5),l.createElementVNode("div",{class:"flex-[3_3_0%] border-b border-solid",style:l.normalizeStyle({fontSize:`${a.value.valueSize}px`,borderColor:a.value.fontColor})},l.toDisplayString(((_=(y=(g=t.conf)==null?void 0:g.data)==null?void 0:y[0])==null?void 0:_.value)||P5e),5),l.createElementVNode("div",{class:"flex-[2_2_0%]",style:l.normalizeStyle({fontSize:`${a.value.timeSize}px`})},l.toDisplayString(i.value),5)],4),l.renderSlot(f.$slots,"default",{},void 0,!0)])}}}),[["__scopeId","data-v-da50ffee"]])},Symbol.toStringTag,{value:"Module"})),UI="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1722502024182'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='21866'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='16'%20height='16'%3e%3cpath%20d='M1023.500049%2027.197344c-0.299971-2.099795-0.899912-4.19959-1.599844-6.099404l-0.599941-1.499854c-0.799922-1.899814-1.799824-3.699639-2.999707-5.399473-0.299971-0.399961-0.599941-0.799922-0.899913-1.299873-1.199883-1.599844-2.599746-3.199688-4.099599-4.49956-0.399961-0.299971-0.799922-0.699932-1.199883-0.999903-1.599844-1.299873-3.299678-2.499756-5.099502-3.499658-4.499561-2.499756-9.699053-3.899619-15.198516-3.899619H607.940631c-5.499463%200-10.698955%201.399863-15.198516%203.899619-1.799824%200.999902-3.499658%202.099795-5.099502%203.499658-0.399961%200.299971-0.799922%200.699932-1.199883%200.999903-1.499854%201.399863-2.899717%202.899717-4.099599%204.49956-0.299971%200.399961-0.599941%200.799922-0.899913%201.299873-1.199883%201.699834-2.099795%203.499658-2.999707%205.399473l-0.599941%201.499854c-0.699932%201.999805-1.299873%203.999609-1.599844%206.099404-0.19998%201.599844-0.399961%203.199688-0.399961%204.899522v447.956254h-63.99375v-351.965629c0-1.699834-0.09999-3.299678-0.399961-4.899521-0.299971-2.099795-0.899912-4.19959-1.599844-6.099404l-0.599941-1.499854c-0.799922-1.899814-1.799824-3.699639-2.999708-5.399473-0.299971-0.399961-0.599941-0.799922-0.899912-1.299873-1.199883-1.599844-2.599746-3.199688-4.099599-4.49956-0.399961-0.299971-0.799922-0.699932-1.199883-0.999903-1.599844-1.299873-3.299678-2.499756-5.099502-3.499658-4.499561-2.499756-9.699053-3.899619-15.198516-3.899619H319.968753v-63.993751c0-17.598281-14.398594-31.996875-31.996875-31.996875H31.996875c-17.598281%200-31.996875%2014.398594-31.996875%2031.996875v191.981252c0%2017.598281%2014.398594%2031.996875%2031.996875%2031.996875h255.975003c17.598281%200%2031.996875-14.398594%2031.996875-31.996875v-63.99375h127.987501v319.968753H319.968753v-63.993751c0-17.598281-14.398594-31.996875-31.996875-31.996875H31.996875c-17.598281%200-31.996875%2014.398594-31.996875%2031.996875v191.981252c0%2017.598281%2014.398594%2031.996875%2031.996875%2031.996875h255.975003c17.598281%200%2031.996875-14.398594%2031.996875-31.996875v-63.993751h127.987501v319.968753H319.968753v-63.99375c0-17.598281-14.398594-31.996875-31.996875-31.996876H31.996875c-17.598281%200-31.996875%2014.398594-31.996875%2031.996876v191.981251c0%2017.598281%2014.398594%2031.996875%2031.996875%2031.996876h255.975003c17.598281%200%2031.996875-14.398594%2031.996875-31.996876v-63.99375h159.984377c17.598281%200%2031.996875-14.398594%2031.996875-31.996875v-351.965629h63.99375v447.956254c0%2017.598281%2014.398594%2031.996875%2031.996876%2031.996876h383.962503c17.598281%200%2031.996875-14.398594%2031.996876-31.996876v-959.906259c0-1.599844-0.09999-3.199688-0.399961-4.799531zM255.975002%20192.081242H63.993751v-127.987501h191.981251v127.987501z%20m0%20383.962504H63.993751v-127.987501h191.981251v127.987501z%20m0%20383.962503H63.993751v-127.987501h191.981251v127.987501z%20m383.962504-895.912508h319.968753v895.912508H639.937506v-895.912508z'%20fill='%23030000'%20p-id='21867'%3e%3c/path%3e%3cpath%20d='M703.931257%20128.087491h63.99375v63.993751h-63.99375zM831.918758%20128.087491h63.993751v63.993751h-63.993751zM703.931257%20256.074993h63.99375v63.99375h-63.99375zM831.918758%20256.074993h63.993751v63.99375h-63.993751zM703.931257%20384.062494h63.99375v63.993751h-63.99375zM831.918758%20384.062494h63.993751v63.993751h-63.993751zM703.931257%20512.049995h63.99375v63.993751h-63.99375zM831.918758%20512.049995h63.993751v63.993751h-63.993751zM703.931257%20640.037496h63.99375v63.993751h-63.99375zM831.918758%20640.037496h63.993751v63.993751h-63.993751zM703.931257%20768.024998h63.99375v63.99375h-63.99375zM831.918758%20768.024998h63.993751v63.99375h-63.993751z'%20fill='%23030000'%20p-id='21868'%3e%3c/path%3e%3c/svg%3e",jI="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1722502024182'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='21866'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='16'%20height='16'%3e%3cpath%20d='M1023.500049%2027.197344c-0.299971-2.099795-0.899912-4.19959-1.599844-6.099404l-0.599941-1.499854c-0.799922-1.899814-1.799824-3.699639-2.999707-5.399473-0.299971-0.399961-0.599941-0.799922-0.899913-1.299873-1.199883-1.599844-2.599746-3.199688-4.099599-4.49956-0.399961-0.299971-0.799922-0.699932-1.199883-0.999903-1.599844-1.299873-3.299678-2.499756-5.099502-3.499658-4.499561-2.499756-9.699053-3.899619-15.198516-3.899619H607.940631c-5.499463%200-10.698955%201.399863-15.198516%203.899619-1.799824%200.999902-3.499658%202.099795-5.099502%203.499658-0.399961%200.299971-0.799922%200.699932-1.199883%200.999903-1.499854%201.399863-2.899717%202.899717-4.099599%204.49956-0.299971%200.399961-0.599941%200.799922-0.899913%201.299873-1.199883%201.699834-2.099795%203.499658-2.999707%205.399473l-0.599941%201.499854c-0.699932%201.999805-1.299873%203.999609-1.599844%206.099404-0.19998%201.599844-0.399961%203.199688-0.399961%204.899522v447.956254h-63.99375v-351.965629c0-1.699834-0.09999-3.299678-0.399961-4.899521-0.299971-2.099795-0.899912-4.19959-1.599844-6.099404l-0.599941-1.499854c-0.799922-1.899814-1.799824-3.699639-2.999708-5.399473-0.299971-0.399961-0.599941-0.799922-0.899912-1.299873-1.199883-1.599844-2.599746-3.199688-4.099599-4.49956-0.399961-0.299971-0.799922-0.699932-1.199883-0.999903-1.599844-1.299873-3.299678-2.499756-5.099502-3.499658-4.499561-2.499756-9.699053-3.899619-15.198516-3.899619H319.968753v-63.993751c0-17.598281-14.398594-31.996875-31.996875-31.996875H31.996875c-17.598281%200-31.996875%2014.398594-31.996875%2031.996875v191.981252c0%2017.598281%2014.398594%2031.996875%2031.996875%2031.996875h255.975003c17.598281%200%2031.996875-14.398594%2031.996875-31.996875v-63.99375h127.987501v319.968753H319.968753v-63.993751c0-17.598281-14.398594-31.996875-31.996875-31.996875H31.996875c-17.598281%200-31.996875%2014.398594-31.996875%2031.996875v191.981252c0%2017.598281%2014.398594%2031.996875%2031.996875%2031.996875h255.975003c17.598281%200%2031.996875-14.398594%2031.996875-31.996875v-63.993751h127.987501v319.968753H319.968753v-63.99375c0-17.598281-14.398594-31.996875-31.996875-31.996876H31.996875c-17.598281%200-31.996875%2014.398594-31.996875%2031.996876v191.981251c0%2017.598281%2014.398594%2031.996875%2031.996875%2031.996876h255.975003c17.598281%200%2031.996875-14.398594%2031.996875-31.996876v-63.99375h159.984377c17.598281%200%2031.996875-14.398594%2031.996875-31.996875v-351.965629h63.99375v447.956254c0%2017.598281%2014.398594%2031.996875%2031.996876%2031.996876h383.962503c17.598281%200%2031.996875-14.398594%2031.996876-31.996876v-959.906259c0-1.599844-0.09999-3.199688-0.399961-4.799531zM255.975002%20192.081242H63.993751v-127.987501h191.981251v127.987501z%20m0%20383.962504H63.993751v-127.987501h191.981251v127.987501z%20m0%20383.962503H63.993751v-127.987501h191.981251v127.987501z%20m383.962504-895.912508h319.968753v895.912508H639.937506v-895.912508z'%20fill='%23FFFFFF'%20p-id='21867'%3e%3c/path%3e%3cpath%20d='M703.931257%20128.087491h63.99375v63.993751h-63.99375zM831.918758%20128.087491h63.993751v63.993751h-63.993751zM703.931257%20256.074993h63.99375v63.99375h-63.99375zM831.918758%20256.074993h63.993751v63.99375h-63.993751zM703.931257%20384.062494h63.99375v63.993751h-63.99375zM831.918758%20384.062494h63.993751v63.993751h-63.993751zM703.931257%20512.049995h63.99375v63.993751h-63.99375zM831.918758%20512.049995h63.993751v63.993751h-63.993751zM703.931257%20640.037496h63.99375v63.993751h-63.99375zM831.918758%20640.037496h63.993751v63.993751h-63.993751zM703.931257%20768.024998h63.99375v63.99375h-63.99375zM831.918758%20768.024998h63.993751v63.99375h-63.993751z'%20fill='%23FFFFFF'%20p-id='21868'%3e%3c/path%3e%3c/svg%3e",z5e={class:"item-val"},V5e={key:0,class:"btn-wrap"},og=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:{DEFAULT_ICON:UI,ACTIVE_ICON:jI,NAME_CN:"项目采集",NAME_EN:"Project",ORDER:1},OPTIONS:{bgColor:{value:"#fff",type:"color",label:"背景颜色"},projectColor:{value:"#999",type:"color",label:"项目颜色"},paramColor:{value:"#333",type:"color",label:"参数颜色"},labelWidth:{value:64,type:"number",label:"标签宽度"},paramSize:{value:12,type:"number",label:"参数字体"},paramHeight:{value:32,type:"number",label:"参数项高度"},radiusSize:{value:8,type:"number",label:"圆角大小"},type:{value:"project",type:"radio",option:[{value:"project",label:"项目"},{value:"object",label:"对象"}],label:"采集类型"},isHideTitle:{value:!1,type:"checkbox",label:"是否隐藏标题"}},DATA:[{project_id:"",object_id:""}],PARAMS:["project_id","object_id"]},{__name:"clt",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""}},setup(t){const e=t,r=l.ref({}),n=l.ref([{name:"离线项目",data:[{name:"采集项",type:"Integer",unit:"℃",value:""}]}]),a=()=>{var h,v,m,g,y,_,b,C,w;const{options:p}=e.conf;r.value={bgColor:((h=p==null?void 0:p.bgColor)==null?void 0:h.value)||"#fff",projectColor:((v=p==null?void 0:p.projectColor)==null?void 0:v.value)||"#999",paramColor:((m=p==null?void 0:p.paramColor)==null?void 0:m.value)||"#333",labelWidth:((g=p==null?void 0:p.labelWidth)==null?void 0:g.value)||64,paramSize:((y=p==null?void 0:p.paramSize)==null?void 0:y.value)||12,paramHeight:((_=p==null?void 0:p.paramHeight)==null?void 0:_.value)||32,radiusSize:((b=p==null?void 0:p.radiusSize)==null?void 0:b.value)??4,isHideTitle:((C=p==null?void 0:p.isHideTitle)==null?void 0:C.value)??!1,type:((w=p==null?void 0:p.type)==null?void 0:w.value)??"project"}},i=async()=>{const{data:p}=e.conf;n.value=[];let h=p.filter(g=>g.project_id).map(g=>g.project_id);if(!h.length)return;let v={where_in:JSON.stringify([["uid",h.join(",")]])};const{result:m}=await ot.post("get_collect_list",v);m.data.length>0&&m.data.forEach(g=>{n.value.push({name:g.name,uid:g.uid,object_id:g.object_id,data:o(g.script)})})},o=p=>{let h=[];return p.forEach(v=>{h.push({name:v.label_loc,type:v.type,unit:v.unit,key:v.key})}),h},s=l.computed(()=>{let p=!0;return n.value.forEach(h=>{h.data.forEach(v=>{(v.value||v.value===0)&&(p=!1)})}),p}),c=()=>{e.mode!=="edit"&&(r.value.type==="object"?d():u())},u=()=>{let p=[];const h=J0.getUser();n.value.forEach(v=>{let m={};if(v.data.forEach(y=>{(y.value||y.value===0)&&(m[y.key]=["Integer","Float"].includes(y.type)?Number(y.value):y.type==="Bool"?!!y.value:y.value)}),!Object.keys(m).length)return;let g={name:v.name,value:m,collect_id:v.uid,collector:h.username};p.push(ot.post("add_collect_value_without_object",g))}),Promise.all(p).then(v=>{let m=!0;v.forEach(g=>{g.code!==200&&(m=!1,u1.error(g.msg))}),m&&u1.success("操作成功")})},d=()=>{let p=[];n.value.forEach(h=>{let v={};if(h.data.forEach(g=>{(g.value||g.value===0)&&(v[g.key]=["Integer","Float"].includes(g.type)?Number(g.value):g.type==="Bool"?!!g.value:g.value)}),!Object.keys(v).length)return;let m={name:h.name,value:v,collect_id:h.uid,object_id:h.object_id||e.uid};p.push(ot.post("collect_add",m))}),Promise.all(p).then(h=>{let v=!0;h.forEach(m=>{m.code!==200&&(v=!1,u1.error(m.msg))}),v&&u1.success("操作成功")})},f=dt(a,200);return l.watch(()=>e.conf,()=>{e.mode==="edit"&&f()},{deep:!0}),l.watch(()=>e.conf.data,()=>{i()},{deep:!0,immediate:!0}),l.onMounted(()=>{a()}),(p,h)=>{const v=ui,m=WO,g=RO,y=PO,_=ds;return l.openBlock(),l.createElementBlock("div",{class:"list-container",style:l.normalizeStyle({backgroundColor:r.value.bgColor,borderRadius:`${r.value.radiusSize}px`})},[r.value.isHideTitle?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:"echart-title",style:l.normalizeStyle({color:r.value.titleColor,fontSize:`${r.value.titleSize}px`})},l.toDisplayString(t.conf.name),5)),l.createElementVNode("div",{class:l.normalizeClass(["echart-body",r.value.isHideTitle?"h-[100%]":" h-[calc(100%-42px)]"])},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.value,(b,C)=>(l.openBlock(),l.createElementBlock("div",{key:C},[l.createElementVNode("div",{class:"item-title",style:l.normalizeStyle({fontSize:`${r.value.projectSize}px`,color:r.value.projectColor})},l.toDisplayString(b.name),5),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(b.data,(w,S)=>(l.openBlock(),l.createElementBlock("div",{class:"item-wrap",key:`${C}_${S}`},[l.createElementVNode("div",{class:"item-item",style:l.normalizeStyle({width:`${r.value.labelWidth}px`,fontSize:`${r.value.paramSize}px`,color:r.value.paramColor,height:`${r.value.paramHeight}px`})},l.toDisplayString(w.name)+": ",5),l.createElementVNode("div",z5e,[w.type==="String"?(l.openBlock(),l.createBlock(v,{key:0,type:"text",modelValue:w.value,"onUpdate:modelValue":x=>w.value=x},{suffix:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(w.unit),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])):l.createCommentVNode("",!0),w.type==="Integer"?(l.openBlock(),l.createBlock(m,{key:1,style:{width:"100%"},modelValue:w.value,"onUpdate:modelValue":x=>w.value=x,precision:0,controls:!1},{suffix:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(w.unit),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])):l.createCommentVNode("",!0),w.type==="Float"?(l.openBlock(),l.createBlock(m,{key:2,style:{width:"100%"},modelValue:w.value,"onUpdate:modelValue":x=>w.value=x,controls:!1},{suffix:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(w.unit),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])):l.createCommentVNode("",!0),w.type==="Bool"?(l.openBlock(),l.createBlock(y,{key:3,value:w.value,"onUpdate:value":x=>w.value=x},{default:l.withCtx(()=>[l.createVNode(g,{value:1},{default:l.withCtx(()=>h[0]||(h[0]=[l.createTextVNode("是")])),_:1}),l.createVNode(g,{value:0},{default:l.withCtx(()=>h[1]||(h[1]=[l.createTextVNode("否")])),_:1})]),_:2},1032,["value","onUpdate:value"])):l.createCommentVNode("",!0)])]))),128))]))),128)),n.value.length?(l.openBlock(),l.createElementBlock("div",V5e,[l.createVNode(_,{type:s.value?"default":"primary",disabled:s.value,onClick:c},{default:l.withCtx(()=>h[2]||(h[2]=[l.createTextVNode("确定")])),_:1},8,["type","disabled"])])):l.createCommentVNode("",!0)],2),l.renderSlot(p.$slots,"default",{},void 0,!0)],4)}}}),[["__scopeId","data-v-8d16689d"]])},Symbol.toStringTag,{value:"Module"})),$5e={class:"item-val"},U5e={key:0,class:"btn-wrap"},f6="--",sg=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:{DEFAULT_ICON:UI,ACTIVE_ICON:jI,NAME_CN:"定制采集",NAME_EN:"Customer",ORDER:1},OPTIONS:{bgColor:{value:"#fff",type:"color",label:"背景颜色"},paramColor:{value:"#333",type:"color",label:"参数颜色"},labelWidth:{value:64,type:"number",label:"标签宽度"},paramSize:{value:12,type:"number",label:"参数字体"},paramHeight:{value:32,type:"number",label:"参数项高度"},radiusSize:{value:8,type:"number",label:"圆角大小"},isHideTitle:{value:!1,type:"checkbox",label:"是否隐藏标题"}},DATA:[{label_cn:"",object_id:"",project_id:"",item_fv:"",collect:""}],PARAMS:["label_cn","object_id","project_id","item_fv","collect"],SOURCE:["mosaic"]},{__name:"cmc",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""},sourceData:{type:Object,default:()=>({})}},setup(t){const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null)),{proxy:n}=l.getCurrentInstance(),a=t,i=l.ref({}),o=()=>{var m,g,y,_,b,C,w,S;const{options:v}=a.conf;i.value={bgColor:((m=v==null?void 0:v.bgColor)==null?void 0:m.value)||"#fff",paramColor:((g=v==null?void 0:v.paramColor)==null?void 0:g.value)||"#333",labelWidth:((y=v==null?void 0:v.labelWidth)==null?void 0:y.value)||64,paramSize:((_=v==null?void 0:v.paramSize)==null?void 0:_.value)||12,paramHeight:((b=v==null?void 0:v.paramHeight)==null?void 0:b.value)||32,radiusSize:((C=v==null?void 0:v.radiusSize)==null?void 0:C.value)??4,isHideTitle:((w=v==null?void 0:v.isHideTitle)==null?void 0:w.value)??!1,type:((S=v==null?void 0:v.type)==null?void 0:S.value)??"project"},s()},s=async()=>{let{data:v}=a.conf,m=v.filter(b=>b.project_id).map(b=>b.project_id);if(!m.length)return;let g={where_in:JSON.stringify([["uid",m.join(",")]])};const{result:y}=await ot.post("get_collect_list",g,!0);let _={};y.data.forEach(b=>{_[b.project_id]=b}),v=v.map(b=>{var C;if((C=_[b.project])!=null&&C.script){let w=_[b.project].script.find(S=>S.key===b.collect);b.unit=w==null?void 0:w.unit,b.label_cn=b.label_cn||(w==null?void 0:w.label_loc),b.type=w==null?void 0:w.type}return b})},c=l.computed(()=>{const{data:v}=a.conf;let m=!0;return v.forEach(g=>{(g.setting||g.setting===0)&&(m=!1)}),m}),u=async()=>{if(a.mode==="edit")return;const{data:v,uid:m,common:g}=a.conf,y=JSON.parse(sessionStorage.getItem(rr))||{};let _=[];if(v.forEach(C=>{let w=g.useAlias?y[C.object_alias]:C.object_id||m;if((C.setting||C.setting===0)&&w){let S={};S.collect_id=C.project_id,S.object_id=w,S.value={[C.collect]:["Integer","Float"].includes(C.type)?Number(C.setting):C.setting},S.name=C.label_cn,_.push(S)}}),_.length===0)return;const{result:b}=await ot.post("add_collect_value_plus",{data:_});b&&n.$message.success("操作成功")},d=v=>{const{data:m}=a.conf;m.forEach((g,y)=>{var _;try{g.value=((_=v.history[y])==null?void 0:_[0][g.item_fv])??f6}catch(b){console.error("设置实时数据时出错:",b),g.value=f6}})},f=v=>{const{common:m,data:g}=a.conf;let y="";m.multiObject||(y=Be(m,m.useAlias,a.uid)),g.forEach((_,b)=>{var C,w,S;m.multiObject&&(y=Be(_,m.useAlias,a.uid));try{_.value=((S=(w=(C=v[y])==null?void 0:C.mosaic)==null?void 0:w.data)==null?void 0:S[_.item_fv])??f6}catch(x){console.error("设置实时数据时出错:",x),_.value=f6}})},p=async()=>{try{const m=await new Ft().getHistoryData(a,"cmc");d(m)}catch(v){console.error("获取历史数据时出错:",v)}finally{const v=t1(a.conf,a.uid,"cmc");e.value&&e.value.port.postMessage({request:v,type:"send"}),r.value&&r.value.send(JSON.stringify(v))}},h=dt(o,200);return l.watch(()=>a.conf,()=>{a.mode==="edit"&&h()},{deep:!0}),l.onMounted(()=>{o(),a.mode==="preview"&&p()}),l.watchEffect(()=>{a.conf.socketData&&f(a.conf.socketData)}),(v,m)=>{var w,S;const g=ui,y=WO,_=RO,b=PO,C=ds;return l.openBlock(),l.createElementBlock("div",{class:"list-container",style:l.normalizeStyle({backgroundColor:i.value.bgColor,borderRadius:`${i.value.radiusSize}px`})},[i.value.isHideTitle?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:"echart-title",style:l.normalizeStyle({color:i.value.titleColor,fontSize:`${i.value.titleSize}px`})},l.toDisplayString(t.conf.name),5)),l.createElementVNode("div",{class:l.normalizeClass(["echart-body",i.value.isHideTitle?"h-[100%]":" h-[calc(100%-42px)]"])},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.conf.data,(x,E)=>(l.openBlock(),l.createElementBlock("div",{key:E,class:"item-wrap"},[l.createElementVNode("div",{class:"item-item",style:l.normalizeStyle({width:`${i.value.labelWidth}px`,fontSize:`${i.value.paramSize}px`,color:i.value.paramColor})},l.toDisplayString(x.label_cn)+": ",5),l.createElementVNode("div",$5e,[x.type==="String"?(l.openBlock(),l.createBlock(g,{key:0,type:"text",class:"w-full",modelValue:x.setting,"onUpdate:modelValue":L=>x.setting=L},{suffix:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(x.unit),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])):l.createCommentVNode("",!0),x.type==="Integer"?(l.openBlock(),l.createBlock(y,{key:1,style:{width:"100%"},modelValue:x.setting,"onUpdate:modelValue":L=>x.setting=L,precision:0,controls:!1},{suffix:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(x.unit),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])):l.createCommentVNode("",!0),x.type==="Float"?(l.openBlock(),l.createBlock(y,{key:2,style:{width:"100%"},modelValue:x.setting,"onUpdate:modelValue":L=>x.setting=L,controls:!1},{suffix:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(x.unit),1)]),_:2},1032,["modelValue","onUpdate:modelValue"])):l.createCommentVNode("",!0),x==="Boolean"?(l.openBlock(),l.createBlock(b,{key:3,class:"w-full",modelValue:x.setting,"onUpdate:modelValue":L=>x.setting=L},{default:l.withCtx(()=>[l.createVNode(_,{value:1},{default:l.withCtx(()=>m[0]||(m[0]=[l.createTextVNode("是")])),_:1}),l.createVNode(_,{value:0},{default:l.withCtx(()=>m[1]||(m[1]=[l.createTextVNode("否")])),_:1})]),_:2},1032,["modelValue","onUpdate:modelValue"])):l.createCommentVNode("",!0)]),l.createElementVNode("div",{class:"item-label",style:l.normalizeStyle({fontSize:`${i.value.paramSize}px`})},l.toDisplayString(x.value||"--"),5)]))),128)),(S=(w=t.conf)==null?void 0:w.data)!=null&&S.length?(l.openBlock(),l.createElementBlock("div",U5e,[l.createVNode(C,{type:c.value?"default":"primary",disabled:c.value,onClick:u},{default:l.withCtx(()=>m[2]||(m[2]=[l.createTextVNode("确定")])),_:1},8,["type","disabled"])])):l.createCommentVNode("",!0)],2),l.renderSlot(v.$slots,"default",{},void 0,!0)],4)}}}),[["__scopeId","data-v-eafa9073"]])},Symbol.toStringTag,{value:"Module"})),lg="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e按键%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-886.000000,%20-98.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M893.138502,101.586835%20C894.044637,101.586835%20894.786323,102.290766%20894.846557,103.181623%20L894.850507,103.29884%20L894.850164,105.250033%20C895.049594,105.168669%20895.267809,105.123832%20895.4965,105.123832%20C895.953595,105.123832%20896.368843,105.302957%20896.675881,105.594843%20C896.982283,105.302902%20897.397474,105.123832%20897.854498,105.123832%20C898.311593,105.123832%20898.726841,105.302957%20899.033879,105.594843%20C899.340281,105.302902%20899.755472,105.123832%20900.212496,105.123832%20C901.118631,105.123832%20901.860317,105.827763%20901.920552,106.718621%20L901.924501,106.835837%20L901.924501,109.783335%20C901.924501,112.514394%20899.757663,114.739339%20897.049377,114.832782%20L896.871999,114.835837%20L896.478999,114.835837%20C893.74794,114.835837%20891.522994,112.668999%20891.429552,109.960713%20L891.426497,109.783335%20L891.426497,103.29884%20C891.426497,102.353308%20892.19297,101.586835%20893.138502,101.586835%20Z%20M893.138502,102.652847%20C892.809157,102.652847%20892.537401,102.899268%20892.497541,103.217804%20L892.492508,103.29884%20L892.492508,109.783335%20C892.492508,111.92998%20894.189186,113.680325%20896.314676,113.7665%20L896.478999,113.769825%20L896.871999,113.769825%20C899.018645,113.769825%20900.768989,112.073147%20900.855164,109.947658%20L900.858489,109.783335%20L900.858489,106.835837%20C900.858489,106.479047%20900.569286,106.189844%20900.212496,106.189844%20C899.883151,106.189844%20899.611396,106.436265%20899.571536,106.754801%20L899.566503,106.835837%20L899.566503,108.800835%20C899.566503,109.065769%20899.373209,109.285557%20899.119953,109.326865%20L899.033497,109.333841%20L899.033497,109.333841%20C898.763657,109.333841%20898.540651,109.133322%20898.505357,108.873161%20L898.500491,108.800835%20L898.500491,106.835837%20C898.500491,106.479047%20898.211288,106.189844%20897.854498,106.189844%20C897.525153,106.189844%20897.253397,106.436265%20897.213538,106.754801%20L897.208505,106.835837%20L897.208505,108.800835%20C897.208505,109.065769%20897.015211,109.285557%20896.761955,109.326865%20L896.675499,109.333841%20L896.675499,109.333841%20C896.405659,109.333841%20896.182653,109.133322%20896.147359,108.873161%20L896.142493,108.800835%20L896.142493,106.835837%20C896.142493,106.479047%20895.85329,106.189844%20895.4965,106.189844%20C895.167155,106.189844%20894.895399,106.436265%20894.85554,106.754801%20L894.850507,106.835837%20L894.850507,108.800835%20C894.850507,109.095206%20894.611872,109.333841%20894.317501,109.333841%20C894.047661,109.333841%20893.824654,109.133322%20893.789361,108.873161%20L893.784495,108.800835%20L893.784495,103.29884%20C893.784495,102.94205%20893.495292,102.652847%20893.138502,102.652847%20Z%20M893.138502,98.835837%20C894.570888,98.835837%20895.890952,99.5159517%20896.727135,100.645114%20C897.020026,101.040583%20897.246061,101.482105%20897.394824,101.952945%20C897.531296,102.384917%20897.601504,102.83747%20897.601504,103.29884%20C897.601504,103.593211%20897.36287,103.831846%20897.068499,103.831846%20C896.774128,103.831846%20896.535493,103.593211%20896.535493,103.29884%20C896.535493,102.946746%20896.482084,102.602478%20896.378338,102.274094%20C896.265296,101.916313%20896.093418,101.580578%20895.870466,101.279541%20C895.233217,100.419016%20894.229425,99.9018487%20893.138502,99.9018487%20C892.047579,99.9018487%20891.043785,100.419016%20890.406523,101.279545%20C890.183568,101.580613%20890.011676,101.916361%20889.898655,102.274077%20C889.794914,102.602457%20889.741511,102.946727%20889.741511,103.29884%20C889.741511,103.593211%20889.502876,103.831846%20889.208505,103.831846%20C888.914134,103.831846%20888.675499,103.593211%20888.675499,103.29884%20C888.675499,102.837459%20888.745699,102.384907%20888.882167,101.952933%20C889.030911,101.482155%20889.256954,101.040636%20889.549842,100.645133%20C890.386055,99.5159492%20891.706118,98.835837%20893.138502,98.835837%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",cg="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e按键%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-886.000000,%20-98.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M893.138502,101.586835%20C894.044637,101.586835%20894.786323,102.290766%20894.846557,103.181623%20L894.850507,103.29884%20L894.850164,105.250033%20C895.049594,105.168669%20895.267809,105.123832%20895.4965,105.123832%20C895.953595,105.123832%20896.368843,105.302957%20896.675881,105.594843%20C896.982283,105.302902%20897.397474,105.123832%20897.854498,105.123832%20C898.311593,105.123832%20898.726841,105.302957%20899.033879,105.594843%20C899.340281,105.302902%20899.755472,105.123832%20900.212496,105.123832%20C901.118631,105.123832%20901.860317,105.827763%20901.920552,106.718621%20L901.924501,106.835837%20L901.924501,109.783335%20C901.924501,112.514394%20899.757663,114.739339%20897.049377,114.832782%20L896.871999,114.835837%20L896.478999,114.835837%20C893.74794,114.835837%20891.522994,112.668999%20891.429552,109.960713%20L891.426497,109.783335%20L891.426497,103.29884%20C891.426497,102.353308%20892.19297,101.586835%20893.138502,101.586835%20Z%20M893.138502,102.652847%20C892.809157,102.652847%20892.537401,102.899268%20892.497541,103.217804%20L892.492508,103.29884%20L892.492508,109.783335%20C892.492508,111.92998%20894.189186,113.680325%20896.314676,113.7665%20L896.478999,113.769825%20L896.871999,113.769825%20C899.018645,113.769825%20900.768989,112.073147%20900.855164,109.947658%20L900.858489,109.783335%20L900.858489,106.835837%20C900.858489,106.479047%20900.569286,106.189844%20900.212496,106.189844%20C899.883151,106.189844%20899.611396,106.436265%20899.571536,106.754801%20L899.566503,106.835837%20L899.566503,108.800835%20C899.566503,109.065769%20899.373209,109.285557%20899.119953,109.326865%20L899.033497,109.333841%20L899.033497,109.333841%20C898.763657,109.333841%20898.540651,109.133322%20898.505357,108.873161%20L898.500491,108.800835%20L898.500491,106.835837%20C898.500491,106.479047%20898.211288,106.189844%20897.854498,106.189844%20C897.525153,106.189844%20897.253397,106.436265%20897.213538,106.754801%20L897.208505,106.835837%20L897.208505,108.800835%20C897.208505,109.065769%20897.015211,109.285557%20896.761955,109.326865%20L896.675499,109.333841%20L896.675499,109.333841%20C896.405659,109.333841%20896.182653,109.133322%20896.147359,108.873161%20L896.142493,108.800835%20L896.142493,106.835837%20C896.142493,106.479047%20895.85329,106.189844%20895.4965,106.189844%20C895.167155,106.189844%20894.895399,106.436265%20894.85554,106.754801%20L894.850507,106.835837%20L894.850507,108.800835%20C894.850507,109.095206%20894.611872,109.333841%20894.317501,109.333841%20C894.047661,109.333841%20893.824654,109.133322%20893.789361,108.873161%20L893.784495,108.800835%20L893.784495,103.29884%20C893.784495,102.94205%20893.495292,102.652847%20893.138502,102.652847%20Z%20M893.138502,98.835837%20C894.570888,98.835837%20895.890952,99.5159517%20896.727135,100.645114%20C897.020026,101.040583%20897.246061,101.482105%20897.394824,101.952945%20C897.531296,102.384917%20897.601504,102.83747%20897.601504,103.29884%20C897.601504,103.593211%20897.36287,103.831846%20897.068499,103.831846%20C896.774128,103.831846%20896.535493,103.593211%20896.535493,103.29884%20C896.535493,102.946746%20896.482084,102.602478%20896.378338,102.274094%20C896.265296,101.916313%20896.093418,101.580578%20895.870466,101.279541%20C895.233217,100.419016%20894.229425,99.9018487%20893.138502,99.9018487%20C892.047579,99.9018487%20891.043785,100.419016%20890.406523,101.279545%20C890.183568,101.580613%20890.011676,101.916361%20889.898655,102.274077%20C889.794914,102.602457%20889.741511,102.946727%20889.741511,103.29884%20C889.741511,103.593211%20889.502876,103.831846%20889.208505,103.831846%20C888.914134,103.831846%20888.675499,103.593211%20888.675499,103.29884%20C888.675499,102.837459%20888.745699,102.384907%20888.882167,101.952933%20C889.030911,101.482155%20889.256954,101.040636%20889.549842,100.645133%20C890.386055,99.5159492%20891.706118,98.835837%20893.138502,98.835837%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",j5e={class:"w-full h-full flex"},H5e={DEFAULT_ICON:lg,ACTIVE_ICON:cg,NAME_CN:"固值录入",NAME_EN:"Value Entry",ORDER:3},h6="--",ug=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:H5e,OPTIONS:{bgColor:{value:"#fff",type:"color",label:"背景颜色"},textColor:{value:"#111",type:"color",label:"字体颜色"},textSize:{value:14,type:"number",label:"字体颜色"},radiusSize:{value:8,type:"number",label:"圆角大小"},isBold:{value:!1,type:"checkbox",label:"是否加粗"}},COMMON:{useAlias:!1,source:"mosaic"},PARAMS:["fv","project_id","color"],SOURCE:["mosaic"],DATA:[{fv:"",project_id:"",object_id:"",commands:[{value:"",name:"",color:"#4162ff",items:[{code:"",value:""}]}]}],ITEMS:1},{__name:"vlt",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""}},setup(t){const e=l.ref(l.inject("sharedWorker",null)),r=t,n=l.ref({}),a=()=>{var h,v,m,g,y,_,b,C,w,S;const{conf:p}=r;n.value={bgColor:((v=(h=p==null?void 0:p.options)==null?void 0:h.bgColor)==null?void 0:v.value)||"#fff",textColor:((g=(m=p==null?void 0:p.options)==null?void 0:m.textColor)==null?void 0:g.value)||"#111",textSize:((_=(y=p==null?void 0:p.options)==null?void 0:y.textSize)==null?void 0:_.value)||16,radiusSize:((C=(b=p==null?void 0:p.options)==null?void 0:b.radiusSize)==null?void 0:C.value)??4,isBold:((S=(w=p==null?void 0:p.options)==null?void 0:w.isBold)==null?void 0:S.value)||!1}},i=dt(a,200),o=p=>{const{data:h}=r.conf;h.forEach((v,m)=>{var g,y;try{v.value=((y=(g=p.history[m])==null?void 0:g[0])==null?void 0:y[v.fv])||h6}catch(_){console.error("设置历史数据时出错:",_),v.value=h6}})},s=p=>{const{common:h,data:v}=r.conf,m=h.source||"mosaic";let g=Be(h,h.useAlias,r.uid);v.forEach((y,_)=>{var b,C,w;try{y.value=((w=(C=(b=p[g])==null?void 0:b[m])==null?void 0:C.data)==null?void 0:w[y.fv])??h6}catch(S){console.error("设置实时数据时出错:",S),y.value=h6}})},c=l.computed(()=>{const{data:p}=r.conf,h=p[0];return h.commands.find(m=>String(m.value)===String(h.value))||{}||{}}),u=async()=>{const{data:p,common:h}=r.conf,v=p[0];let m=Be(h,h.useAlias,r.uid);const g=v.commands.find(C=>String(C.value)===String(v.value))||{};if(!g.items)return;let y={};g.items.forEach(C=>{var S;let w=((S=d.script.find(x=>x.key===C.code))==null?void 0:S.type)||"String";y[C.code]=C.value,["Integer","Float"].includes(w)&&(y[C.code]=Number(C.value)),w==="Boolean"&&(y[C.code]=C.value==="true")});let _={name:d.name,value:y,collect_id:v.project_id,object_id:m};const{result:b}=await ot.post("collect_add",_)};let d={};const f=async()=>{const{data:p}=r.conf,{result:h}=await ot.post("get_collect_list",{where_and:[["uid","=",p[0].project_id]]});try{d=h.data[0]||{};const m=await new Ft().getHistoryData(r);o(m)}catch(v){console.error("获取历史数据时出错:",v)}finally{const v=t1(r.conf,r.uid);e.value.port.postMessage({request:v,type:"send"})}};return l.watch(()=>r.conf,()=>{r.mode==="edit"&&i()},{deep:!0}),l.watchEffect(()=>{r.conf.socketData&&s(r.conf.socketData)}),l.onMounted(()=>{a(),r.mode==="preview"&&f()}),(p,h)=>{var v,m,g;return l.openBlock(),l.createElementBlock("div",j5e,[l.createElementVNode("div",{class:"btn-wrap",style:l.normalizeStyle({backgroundColor:n.value.bgColor,color:c.value.color||n.value.textColor,borderRadius:`${n.value.radiusSize}px`,fontSize:`${n.value.textSize}px`,backgroundImage:`url(${(g=(m=(v=t.conf)==null?void 0:v.options)==null?void 0:m.bgImg)==null?void 0:g.value})`,fontWeight:n.value.isBold?"bold":"normal"}),onClick:u},l.toDisplayString(c.value.name||"--"),5),l.renderSlot(p.$slots,"default",{},void 0,!0)])}}}),[["__scopeId","data-v-fb43ed00"]])},Symbol.toStringTag,{value:"Module"})),G5e={class:"w-full h-full flex"},dg=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:{DEFAULT_ICON:lg,ACTIVE_ICON:cg,NAME_CN:"按键",NAME_EN:"Button",ORDER:3},OPTIONS:{bgColor:{value:"#fff",type:"color",label:"背景颜色"},textColor:{value:"#111",type:"color",label:"字体颜色"},textSize:{value:14,type:"number",label:"字体颜色"},radiusSize:{value:8,type:"number",label:"圆角大小"},category:{value:"close",type:"select",label:"按键事件",options:[{label:"关闭",value:"close"},{label:"跳转",value:"jump"},{label:"返回",value:"back"},{label:"刷新",value:"refresh"},{label:"全屏",value:"full"}]},name:{value:"",type:"string",label:"按键名称"},bgImg:{value:"",type:"image",label:"背景图片"},jumpType:{value:"url",type:"radio",option:[{value:"url",label:"地址"},{value:"uid",label:"编号"}],label:"跳转方案",dependent:"category",dependentValue:"jump"},jumpParam:{value:"",type:"string",label:"跳转参数",dependent:"category",dependentValue:"jump"}}},{__name:"btn",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""}},setup(t){const e=t,r=l.ref({}),n=()=>{var m,g,y,_,b,C,w,S;const{conf:v}=e;r.value={bgColor:((g=(m=v==null?void 0:v.options)==null?void 0:m.bgColor)==null?void 0:g.value)||"#fff",textColor:((_=(y=v==null?void 0:v.options)==null?void 0:y.textColor)==null?void 0:_.value)||"#111",textSize:((C=(b=v==null?void 0:v.options)==null?void 0:b.textSize)==null?void 0:C.value)||16,radiusSize:((S=(w=v==null?void 0:v.options)==null?void 0:w.radiusSize)==null?void 0:S.value)??4}},a=()=>{window.close()},i=async()=>{const{options:v}=e.conf;let m=v.jumpParam.value;if(m){let g=v.jumpType.value==="url"?m:await s({uid:m});if(g.startsWith("mixui/#/")||g.startsWith("/mixui/#/")){let y=g.split("mixui/#/")[1];g=`${window.location.origin}/mixui/#/${y}`}o(g)}else{u1.error("未设置跳转参数");return}};function o(v){const m=new URL(window.location.href),g=new URL(v,window.location.origin),y=g.pathname.includes("mixui")&&g.hash.startsWith("#/"),_=m.host!==g.host,b=m.pathname!==g.pathname,C=m.search!==g.search;_||b||C?location.href=v:!_&&!b&&!C&&y?window.location.hash=g.hash:location.href=v}const s=async v=>{var y;const{result:m}=await ot.post("get_object_item",{uid:v.uid},!0);let g={};if((y=m.dashboard_list)!=null&&y.length&&(g=m.dashboard_list.find(_=>_.type==="show")),Object.keys(g).length)return`${location.origin}/mixui/#/preview/${g.uid}/${g.name}?object_id=${v.uid}`;u1({message:"该对象未配置大屏脚本",type:"warning"})},f={close:a,jump:i,back:()=>{window.history.back(),setTimeout(function(){location.reload()},10)},refresh:()=>{window.location.reload()},full:()=>{document.fullscreenElement?document.exitFullscreen():document.documentElement.requestFullscreen()}},p=()=>{const{options:v}=e.conf;e.mode==="preview"&&f[v.category.value]()},h=dt(n,200);return l.watch(()=>e.conf,()=>{e.mode==="edit"&&h()},{deep:!0}),l.onMounted(()=>{n()}),(v,m)=>{var g,y,_,b,C,w;return l.openBlock(),l.createElementBlock("div",G5e,[l.createElementVNode("div",{class:"btn-wrap",style:l.normalizeStyle({backgroundColor:r.value.bgColor,color:r.value.textColor,borderRadius:`${r.value.radiusSize}px`,fontSize:`${r.value.textSize}px`,backgroundImage:`url(${(_=(y=(g=t.conf)==null?void 0:g.options)==null?void 0:y.bgImg)==null?void 0:_.value})`}),onClick:p},l.toDisplayString(((w=(C=(b=t.conf)==null?void 0:b.options)==null?void 0:C.name)==null?void 0:w.value)||""),5),l.renderSlot(v.$slots,"default",{},void 0,!0)])}}}),[["__scopeId","data-v-3202ef88"]])},Symbol.toStringTag,{value:"Module"})),W5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e时间%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-646.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M657.730732,99.4163895%20C658.056601,99.4163895%20658.325912,99.6585445%20658.368534,99.9727243%20L658.37441,100.060068%20L658.374333,100.577389%20L661.215306,100.577914%20C661.952401,100.577914%20662.55813,101.14029%20662.626842,101.859376%20L662.633333,101.995942%20L662.633333,113.998362%20C662.633333,114.781529%20661.998472,115.416389%20661.215306,115.416389%20L661.215306,115.416389%20L648.051361,115.416389%20C647.268203,115.416389%20646.633333,114.781526%20646.633333,113.998362%20L646.633333,113.998362%20L646.633333,101.995942%20C646.633333,101.212786%20647.268206,100.577914%20648.051361,100.577914%20L648.051361,100.577914%20L650.891333,100.577389%20L650.892257,100.060068%20C650.892257,99.704574%20651.180441,99.4163895%20651.535935,99.4163895%20C651.861804,99.4163895%20652.131115,99.6585445%20652.173737,99.9727243%20L652.179613,100.060068%20L652.179333,100.577389%20L657.086333,100.577389%20L657.087054,100.060068%20C657.087054,99.704574%20657.375238,99.4163895%20657.730732,99.4163895%20Z%20M661.34567,106.510687%20L647.920383,106.510687%20L647.92069,113.998362%20C647.92069,114.056101%20647.958128,114.105087%20648.010057,114.122372%20L648.010057,114.122372%20L648.051361,114.129033%20L661.215306,114.129033%20C661.287485,114.129033%20661.345977,114.070541%20661.345977,113.998362%20L661.345977,113.998362%20L661.34567,106.510687%20Z%20M658.505082,111.031634%20C658.860575,111.031634%20659.14876,111.319819%20659.14876,111.675313%20C659.14876,112.001182%20658.906605,112.270493%20658.592425,112.313115%20L658.505082,112.318991%20L656.182033,112.318991%20C655.826539,112.318991%20655.538355,112.030806%20655.538355,111.675313%20C655.538355,111.349443%20655.78051,111.080133%20656.094689,111.037511%20L656.182033,111.031634%20L658.505082,111.031634%20Z%20M653.084634,111.031634%20C653.440128,111.031634%20653.728312,111.319819%20653.728312,111.675313%20C653.728312,112.001182%20653.486157,112.270493%20653.171977,112.313115%20L653.084634,112.318991%20L650.761585,112.318991%20C650.406091,112.318991%20650.117907,112.030806%20650.117907,111.675313%20C650.117907,111.349443%20650.360062,111.080133%20650.674242,111.037511%20L650.761585,111.031634%20L653.084634,111.031634%20Z%20M658.505082,107.934236%20C658.860575,107.934236%20659.14876,108.22242%20659.14876,108.577914%20C659.14876,108.903783%20658.906605,109.173094%20658.592425,109.215716%20L658.505082,109.221592%20L656.182033,109.221592%20C655.826539,109.221592%20655.538355,108.933408%20655.538355,108.577914%20C655.538355,108.252045%20655.78051,107.982734%20656.094689,107.940112%20L656.182033,107.934236%20L658.505082,107.934236%20Z%20M653.084634,107.934236%20C653.440128,107.934236%20653.728312,108.22242%20653.728312,108.577914%20C653.728312,108.903783%20653.486157,109.173094%20653.171977,109.215716%20L653.084634,109.221592%20L650.761585,109.221592%20C650.406091,109.221592%20650.117907,108.933408%20650.117907,108.577914%20C650.117907,108.252045%20650.360062,107.982734%20650.674242,107.940112%20L650.761585,107.934236%20L653.084634,107.934236%20Z%20M650.891333,101.864389%20L648.051361,101.86527%20C647.979193,101.86527%20647.92069,101.923774%20647.92069,101.995942%20L647.92069,101.995942%20L647.920383,105.223331%20L661.34567,105.223331%20L661.345977,101.995942%20C661.345977,101.938203%20661.308539,101.889217%20661.25661,101.871931%20L661.25661,101.871931%20L661.215306,101.86527%20L658.374333,101.864389%20L658.37441,103.157466%20C658.37441,103.51296%20658.086226,103.801144%20657.730732,103.801144%20C657.404863,103.801144%20657.135552,103.558989%20657.09293,103.24481%20L657.087054,103.157466%20L657.086333,101.864389%20L652.179333,101.864389%20L652.179613,103.157466%20C652.179613,103.51296%20651.891428,103.801144%20651.535935,103.801144%20C651.210066,103.801144%20650.940755,103.558989%20650.898133,103.24481%20L650.892257,103.157466%20L650.891333,101.864389%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Y5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e时间%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-646.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M657.730732,99.4163895%20C658.056601,99.4163895%20658.325912,99.6585445%20658.368534,99.9727243%20L658.37441,100.060068%20L658.374333,100.577389%20L661.215306,100.577914%20C661.952401,100.577914%20662.55813,101.14029%20662.626842,101.859376%20L662.633333,101.995942%20L662.633333,113.998362%20C662.633333,114.781529%20661.998472,115.416389%20661.215306,115.416389%20L661.215306,115.416389%20L648.051361,115.416389%20C647.268203,115.416389%20646.633333,114.781526%20646.633333,113.998362%20L646.633333,113.998362%20L646.633333,101.995942%20C646.633333,101.212786%20647.268206,100.577914%20648.051361,100.577914%20L648.051361,100.577914%20L650.891333,100.577389%20L650.892257,100.060068%20C650.892257,99.704574%20651.180441,99.4163895%20651.535935,99.4163895%20C651.861804,99.4163895%20652.131115,99.6585445%20652.173737,99.9727243%20L652.179613,100.060068%20L652.179333,100.577389%20L657.086333,100.577389%20L657.087054,100.060068%20C657.087054,99.704574%20657.375238,99.4163895%20657.730732,99.4163895%20Z%20M661.34567,106.510687%20L647.920383,106.510687%20L647.92069,113.998362%20C647.92069,114.056101%20647.958128,114.105087%20648.010057,114.122372%20L648.010057,114.122372%20L648.051361,114.129033%20L661.215306,114.129033%20C661.287485,114.129033%20661.345977,114.070541%20661.345977,113.998362%20L661.345977,113.998362%20L661.34567,106.510687%20Z%20M658.505082,111.031634%20C658.860575,111.031634%20659.14876,111.319819%20659.14876,111.675313%20C659.14876,112.001182%20658.906605,112.270493%20658.592425,112.313115%20L658.505082,112.318991%20L656.182033,112.318991%20C655.826539,112.318991%20655.538355,112.030806%20655.538355,111.675313%20C655.538355,111.349443%20655.78051,111.080133%20656.094689,111.037511%20L656.182033,111.031634%20L658.505082,111.031634%20Z%20M653.084634,111.031634%20C653.440128,111.031634%20653.728312,111.319819%20653.728312,111.675313%20C653.728312,112.001182%20653.486157,112.270493%20653.171977,112.313115%20L653.084634,112.318991%20L650.761585,112.318991%20C650.406091,112.318991%20650.117907,112.030806%20650.117907,111.675313%20C650.117907,111.349443%20650.360062,111.080133%20650.674242,111.037511%20L650.761585,111.031634%20L653.084634,111.031634%20Z%20M658.505082,107.934236%20C658.860575,107.934236%20659.14876,108.22242%20659.14876,108.577914%20C659.14876,108.903783%20658.906605,109.173094%20658.592425,109.215716%20L658.505082,109.221592%20L656.182033,109.221592%20C655.826539,109.221592%20655.538355,108.933408%20655.538355,108.577914%20C655.538355,108.252045%20655.78051,107.982734%20656.094689,107.940112%20L656.182033,107.934236%20L658.505082,107.934236%20Z%20M653.084634,107.934236%20C653.440128,107.934236%20653.728312,108.22242%20653.728312,108.577914%20C653.728312,108.903783%20653.486157,109.173094%20653.171977,109.215716%20L653.084634,109.221592%20L650.761585,109.221592%20C650.406091,109.221592%20650.117907,108.933408%20650.117907,108.577914%20C650.117907,108.252045%20650.360062,107.982734%20650.674242,107.940112%20L650.761585,107.934236%20L653.084634,107.934236%20Z%20M650.891333,101.864389%20L648.051361,101.86527%20C647.979193,101.86527%20647.92069,101.923774%20647.92069,101.995942%20L647.92069,101.995942%20L647.920383,105.223331%20L661.34567,105.223331%20L661.345977,101.995942%20C661.345977,101.938203%20661.308539,101.889217%20661.25661,101.871931%20L661.25661,101.871931%20L661.215306,101.86527%20L658.374333,101.864389%20L658.37441,103.157466%20C658.37441,103.51296%20658.086226,103.801144%20657.730732,103.801144%20C657.404863,103.801144%20657.135552,103.558989%20657.09293,103.24481%20L657.087054,103.157466%20L657.086333,101.864389%20L652.179333,101.864389%20L652.179613,103.157466%20C652.179613,103.51296%20651.891428,103.801144%20651.535935,103.801144%20C651.210066,103.801144%20650.940755,103.558989%20650.898133,103.24481%20L650.892257,103.157466%20L650.891333,101.864389%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Z5e={class:"w-full h-full flex"},fg=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:{DEFAULT_ICON:W5e,ACTIVE_ICON:Y5e,NAME_CN:"时间",NAME_EN:"Date Time",ORDER:1},OPTIONS:{bgColor:{value:"#fff",type:"color",label:"背景颜色"},textColor:{value:"#111",type:"color",label:"字体颜色"},textSize:{value:16,type:"number",label:"时间字体"},radiusSize:{value:8,type:"number",label:"圆角大小"},format:{value:"YYYY-MM-DD HH:mm:ss",type:"select",label:"时间格式",options:[{label:"YYYY-MM-DD HH:mm:ss",value:"YYYY-MM-DD HH:mm:ss"},{label:"YYYY年MM月DD日 HH:mm:ss",value:"YYYY年MM月DD日 HH:mm:ss"},{label:"YYYY/MM/DD HH:mm:ss",value:"YYYY/MM/DD HH:mm:ss"},{label:"YYYY-MM-DD",value:"YYYY-MM-DD"},{label:"HH:mm:ss",value:"HH:mm:ss"}]}}},{__name:"datetime",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""}},setup(t){const e=t,r=l.ref({bgColor:"#fff",textColor:"#111",textSize:16,radiusSize:8}),n=l.ref("");let a=null;const i=()=>{const u=(e.conf||{}).options||{};r.value={bgColor:u.bgColor&&u.bgColor.value||"#fff",textColor:u.textColor&&u.textColor.value||"#111",textSize:u.textSize&&u.textSize.value||16,radiusSize:(u.radiusSize&&u.radiusSize.value)??4},a&&clearInterval(a),o(),a=setInterval(()=>{o()})},o=()=>{var d;const{options:c}=e.conf;let u=((d=c==null?void 0:c.format)==null?void 0:d.value)||"YYYY-MM-DD HH:mm:ss";n.value=et().format(u)},s=dt(i,200);return l.watch(()=>e.conf,()=>{e.mode==="edit"&&s()},{deep:!0}),l.onMounted(()=>{i()}),l.onUnmounted(()=>{a&&clearInterval(a)}),(c,u)=>(l.openBlock(),l.createElementBlock("div",Z5e,[l.createElementVNode("div",{class:"flex flex-1 px-[12px] items-center justify-center flex-nowrap",style:l.normalizeStyle({backgroundColor:r.value.bgColor,borderRadius:`${r.value.radiusSize}px`,fontSize:`${r.value.textSize}px`,color:r.value.textColor})},l.toDisplayString(n.value),5),l.renderSlot(c.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-6627294c"]])},Symbol.toStringTag,{value:"Module"})),K5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e轮播%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-1062.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M1072.93793,113.477011%20C1073.29342,113.477011%201073.58161,113.765196%201073.58161,114.12069%20C1073.58161,114.446559%201073.33945,114.71587%201073.02527,114.758492%20L1072.93793,114.764368%20L1069.9954,114.764368%20C1069.63991,114.764368%201069.35172,114.476183%201069.35172,114.12069%20C1069.35172,113.79482%201069.59388,113.52551%201069.90806,113.482888%20L1069.9954,113.477011%20L1072.93793,113.477011%20Z%20M1075.88046,113.477011%20C1076.23595,113.477011%201076.52414,113.765196%201076.52414,114.12069%20C1076.52414,114.446559%201076.28198,114.71587%201075.9678,114.758492%20L1075.88046,114.764368%20L1075.14483,114.764368%20C1074.78933,114.764368%201074.50115,114.476183%201074.50115,114.12069%20C1074.50115,113.79482%201074.7433,113.52551%201075.05748,113.482888%20L1075.14483,113.477011%20L1075.88046,113.477011%20Z%20M1064.84598,113.477011%20C1065.20147,113.477011%201065.48966,113.765196%201065.48966,114.12069%20C1065.48966,114.446559%201065.2475,114.71587%201064.93332,114.758492%20L1064.84598,114.764368%20L1064.11034,114.764368%20C1063.75485,114.764368%201063.46667,114.476183%201063.46667,114.12069%20C1063.46667,113.79482%201063.70882,113.52551%201064.023,113.482888%20L1064.11034,113.477011%20L1064.84598,113.477011%20Z%20M1078.82299,113.477011%20C1079.17848,113.477011%201079.46667,113.765196%201079.46667,114.12069%20C1079.46667,114.446559%201079.22451,114.71587%201078.91033,114.758492%20L1078.82299,114.764368%20L1078.08736,114.764368%20C1077.73186,114.764368%201077.44368,114.476183%201077.44368,114.12069%20C1077.44368,113.79482%201077.68583,113.52551%201078.00001,113.482888%20L1078.08736,113.477011%20L1078.82299,113.477011%20Z%20M1067.78851,113.477011%20C1068.144,113.477011%201068.43218,113.765196%201068.43218,114.12069%20C1068.43218,114.446559%201068.19003,114.71587%201067.87585,114.758492%20L1067.78851,114.764368%20L1067.05287,114.764368%20C1066.69738,114.764368%201066.4092,114.476183%201066.4092,114.12069%20C1066.4092,113.79482%201066.65135,113.52551%201066.96553,113.482888%20L1067.05287,113.477011%20L1067.78851,113.477011%20Z%20M1078.20996,100.235632%20C1078.90402,100.235632%201079.46667,100.798278%201079.46667,101.492337%20L1079.46667,101.492337%20L1079.46667,111.300766%20C1079.46667,111.994825%201078.90402,112.557471%201078.20996,112.557471%20L1078.20996,112.557471%20L1064.72337,112.557471%20C1064.02931,112.557471%201063.46667,111.994825%201063.46667,111.300766%20L1063.46667,111.300766%20L1063.46667,101.492337%20C1063.46667,100.798278%201064.02931,100.235632%201064.72337,100.235632%20L1064.72337,100.235632%20Z%20M1078.1787,101.522114%20L1064.75341,101.522114%20L1064.75341,111.26924%20L1078.1787,111.26924%20L1078.1787,101.522114%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",q5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e轮播%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-1062.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M1072.93793,113.477011%20C1073.29342,113.477011%201073.58161,113.765196%201073.58161,114.12069%20C1073.58161,114.446559%201073.33945,114.71587%201073.02527,114.758492%20L1072.93793,114.764368%20L1069.9954,114.764368%20C1069.63991,114.764368%201069.35172,114.476183%201069.35172,114.12069%20C1069.35172,113.79482%201069.59388,113.52551%201069.90806,113.482888%20L1069.9954,113.477011%20L1072.93793,113.477011%20Z%20M1075.88046,113.477011%20C1076.23595,113.477011%201076.52414,113.765196%201076.52414,114.12069%20C1076.52414,114.446559%201076.28198,114.71587%201075.9678,114.758492%20L1075.88046,114.764368%20L1075.14483,114.764368%20C1074.78933,114.764368%201074.50115,114.476183%201074.50115,114.12069%20C1074.50115,113.79482%201074.7433,113.52551%201075.05748,113.482888%20L1075.14483,113.477011%20L1075.88046,113.477011%20Z%20M1064.84598,113.477011%20C1065.20147,113.477011%201065.48966,113.765196%201065.48966,114.12069%20C1065.48966,114.446559%201065.2475,114.71587%201064.93332,114.758492%20L1064.84598,114.764368%20L1064.11034,114.764368%20C1063.75485,114.764368%201063.46667,114.476183%201063.46667,114.12069%20C1063.46667,113.79482%201063.70882,113.52551%201064.023,113.482888%20L1064.11034,113.477011%20L1064.84598,113.477011%20Z%20M1078.82299,113.477011%20C1079.17848,113.477011%201079.46667,113.765196%201079.46667,114.12069%20C1079.46667,114.446559%201079.22451,114.71587%201078.91033,114.758492%20L1078.82299,114.764368%20L1078.08736,114.764368%20C1077.73186,114.764368%201077.44368,114.476183%201077.44368,114.12069%20C1077.44368,113.79482%201077.68583,113.52551%201078.00001,113.482888%20L1078.08736,113.477011%20L1078.82299,113.477011%20Z%20M1067.78851,113.477011%20C1068.144,113.477011%201068.43218,113.765196%201068.43218,114.12069%20C1068.43218,114.446559%201068.19003,114.71587%201067.87585,114.758492%20L1067.78851,114.764368%20L1067.05287,114.764368%20C1066.69738,114.764368%201066.4092,114.476183%201066.4092,114.12069%20C1066.4092,113.79482%201066.65135,113.52551%201066.96553,113.482888%20L1067.05287,113.477011%20L1067.78851,113.477011%20Z%20M1078.20996,100.235632%20C1078.90402,100.235632%201079.46667,100.798278%201079.46667,101.492337%20L1079.46667,101.492337%20L1079.46667,111.300766%20C1079.46667,111.994825%201078.90402,112.557471%201078.20996,112.557471%20L1078.20996,112.557471%20L1064.72337,112.557471%20C1064.02931,112.557471%201063.46667,111.994825%201063.46667,111.300766%20L1063.46667,111.300766%20L1063.46667,101.492337%20C1063.46667,100.798278%201064.02931,100.235632%201064.72337,100.235632%20L1064.72337,100.235632%20Z%20M1078.1787,101.522114%20L1064.75341,101.522114%20L1064.75341,111.26924%20L1078.1787,111.26924%20L1078.1787,101.522114%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",X5e=["src","height","width"],J5e=["src"],hg=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:{DEFAULT_ICON:K5e,ACTIVE_ICON:q5e,NAME_CN:"轮播",NAME_EN:"swiper",ORDER:5},OPTIONS:{bgColor:{value:"#fff",type:"color",label:"背景颜色"},radiusSize:{value:8,type:"number",label:"圆角大小"},interval:{value:10,type:"number",label:"轮播间隔"},type:{value:"img",type:"radio",option:[{value:"img",label:"图片"},{value:"url",label:"页面"}],label:"轮播类型"}},DATA:[{url:""}],PARAMS:["url"]},{__name:"swiper",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""}},setup(t){const e="/mixservice/storage/",r=t,n={height:1080,width:1920},a=l.ref({}),i=()=>{var u,d,f,p,h,v,m,g,y,_;const{conf:c}=r;a.value={bgColor:((d=(u=c==null?void 0:c.options)==null?void 0:u.bgColor)==null?void 0:d.value)||"#fff",textColor:((p=(f=c==null?void 0:c.options)==null?void 0:f.textColor)==null?void 0:p.value)||"#00B0F0",radiusSize:((v=(h=c==null?void 0:c.options)==null?void 0:h.radiusSize)==null?void 0:v.value)??4,interval:((g=(m=c==null?void 0:c.options)==null?void 0:m.interval)==null?void 0:g.value)??10,type:((_=(y=c==null?void 0:c.options)==null?void 0:y.type)==null?void 0:_.value)??"img"}},o=c=>c!=null&&c.startsWith(e)||c!=null&&c.startsWith("http")?c:e+c,s=dt(i,200);return l.watch(()=>r.conf,()=>{r.mode==="edit"&&s()},{deep:!0}),l.onMounted(()=>{i()}),(c,u)=>{const d=$se;return l.openBlock(),l.createElementBlock("div",{class:"w-full h-full flex items-center justify-center bg-[length:100%_100%]",style:l.normalizeStyle({backgroundColor:a.value.bgColor,color:a.value.textColor,borderRadius:`${a.value.radiusSize}px`,fontSize:`${a.value.textSize}px`,backgroundImage:a.value.bgImg?`url(${a.value.bgImg})`:""})},[l.createVNode(l.unref(Vse),{autoplay:"",pauseOnHover:!1,autoplaySpeed:1e3*a.value.interval,"indicator-position":"none",style:{width:"100%",height:"100%"}},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.conf.data,(f,p)=>(l.openBlock(),l.createBlock(d,{key:p},{default:l.withCtx(()=>[a.value.type==="url"&&t.mode==="preview"?(l.openBlock(),l.createElementBlock("iframe",{key:0,src:f.url,frameborder:"0",height:n.height,width:n.width},null,8,X5e)):(l.openBlock(),l.createElementBlock("img",{key:1,class:"w-[100%] h-[100%]",src:o(f.url)},null,8,J5e))]),_:2},1024))),128))]),_:1},8,["autoplaySpeed"]),l.renderSlot(c.$slots,"default",{},void 0,!0)],4)}}}),[["__scopeId","data-v-5d3652fa"]])},Symbol.toStringTag,{value:"Module"})),Q5e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e文本%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-735.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M750.086782,99.5%20C750.950123,99.5%20751.65,100.199877%20751.65,101.063218%20L751.65,101.063218%20L751.65,113.936782%20C751.65,114.800123%20750.950123,115.5%20750.086782,115.5%20L750.086782,115.5%20L737.213218,115.5%20C736.349877,115.5%20735.65,114.800123%20735.65,113.936782%20L735.65,113.936782%20L735.65,101.063218%20C735.65,100.199877%20736.349877,99.5%20737.213218,99.5%20L737.213218,99.5%20Z%20M750.086782,100.787356%20L737.213218,100.787356%20C737.060864,100.787356%20736.937356,100.910864%20736.937356,101.063218%20L736.937356,101.063218%20L736.937356,113.936782%20C736.937356,114.089136%20737.060864,114.212644%20737.213218,114.212644%20L737.213218,114.212644%20L750.086782,114.212644%20C750.239136,114.212644%20750.362644,114.089136%20750.362644,113.936782%20L750.362644,113.936782%20L750.362644,101.063218%20C750.362644,100.910864%20750.239136,100.787356%20750.086782,100.787356%20L750.086782,100.787356%20Z%20M742.832631,112.230524%20C742.477137,112.230524%20742.188953,111.942339%20742.188953,111.586845%20C742.188953,111.260976%20742.431108,110.991665%20742.745288,110.949043%20L742.832631,110.943167%20L743.006,110.943%20L743.006322,105.047893%20C743.006322,104.987519%20743.014634,104.929087%20743.030176,104.873678%20L741.023793,104.873531%20L741.024202,105.456577%20C741.024202,105.782446%20740.782047,106.051757%20740.467867,106.094379%20L740.380524,106.100255%20C740.054654,106.100255%20739.785344,105.8581%20739.742721,105.543921%20L739.736845,105.456577%20L739.736845,104.230524%20C739.736845,103.904654%20739.979001,103.635344%20740.29318,103.592721%20L740.380524,103.586845%20L746.919476,103.586845%20C747.245346,103.586845%20747.514656,103.829001%20747.557279,104.14318%20L747.563155,104.230524%20L747.563155,105.456577%20C747.563155,105.812071%20747.27497,106.100255%20746.919476,106.100255%20C746.593607,106.100255%20746.324296,105.8581%20746.281674,105.543921%20L746.275798,105.456577%20L746.275287,104.873531%20L744.269773,104.873494%20C744.277714,104.901773%20744.283772,104.930839%20744.287802,104.960549%20L744.293678,105.047893%20L744.293,110.943%20L744.467369,110.943167%20C744.822863,110.943167%20745.111047,111.231352%20745.111047,111.586845%20C745.111047,111.912715%20744.868892,112.182025%20744.554712,112.224648%20L744.467369,112.230524%20L742.832631,112.230524%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",e8e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='17px'%20viewBox='0%200%2018%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e文本%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-735.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M750.086782,99.5%20C750.950123,99.5%20751.65,100.199877%20751.65,101.063218%20L751.65,101.063218%20L751.65,113.936782%20C751.65,114.800123%20750.950123,115.5%20750.086782,115.5%20L750.086782,115.5%20L737.213218,115.5%20C736.349877,115.5%20735.65,114.800123%20735.65,113.936782%20L735.65,113.936782%20L735.65,101.063218%20C735.65,100.199877%20736.349877,99.5%20737.213218,99.5%20L737.213218,99.5%20Z%20M750.086782,100.787356%20L737.213218,100.787356%20C737.060864,100.787356%20736.937356,100.910864%20736.937356,101.063218%20L736.937356,101.063218%20L736.937356,113.936782%20C736.937356,114.089136%20737.060864,114.212644%20737.213218,114.212644%20L737.213218,114.212644%20L750.086782,114.212644%20C750.239136,114.212644%20750.362644,114.089136%20750.362644,113.936782%20L750.362644,113.936782%20L750.362644,101.063218%20C750.362644,100.910864%20750.239136,100.787356%20750.086782,100.787356%20L750.086782,100.787356%20Z%20M742.832631,112.230524%20C742.477137,112.230524%20742.188953,111.942339%20742.188953,111.586845%20C742.188953,111.260976%20742.431108,110.991665%20742.745288,110.949043%20L742.832631,110.943167%20L743.006,110.943%20L743.006322,105.047893%20C743.006322,104.987519%20743.014634,104.929087%20743.030176,104.873678%20L741.023793,104.873531%20L741.024202,105.456577%20C741.024202,105.782446%20740.782047,106.051757%20740.467867,106.094379%20L740.380524,106.100255%20C740.054654,106.100255%20739.785344,105.8581%20739.742721,105.543921%20L739.736845,105.456577%20L739.736845,104.230524%20C739.736845,103.904654%20739.979001,103.635344%20740.29318,103.592721%20L740.380524,103.586845%20L746.919476,103.586845%20C747.245346,103.586845%20747.514656,103.829001%20747.557279,104.14318%20L747.563155,104.230524%20L747.563155,105.456577%20C747.563155,105.812071%20747.27497,106.100255%20746.919476,106.100255%20C746.593607,106.100255%20746.324296,105.8581%20746.281674,105.543921%20L746.275798,105.456577%20L746.275287,104.873531%20L744.269773,104.873494%20C744.277714,104.901773%20744.283772,104.930839%20744.287802,104.960549%20L744.293678,105.047893%20L744.293,110.943%20L744.467369,110.943167%20C744.822863,110.943167%20745.111047,111.231352%20745.111047,111.586845%20C745.111047,111.912715%20744.868892,112.182025%20744.554712,112.224648%20L744.467369,112.230524%20L742.832631,112.230524%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",t8e={class:"w-full h-full flex"},pg=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:{DEFAULT_ICON:Q5e,ACTIVE_ICON:e8e,NAME_CN:"文本",NAME_EN:"Textbox",ORDER:2},OPTIONS:{bgColor:{value:"#fff",type:"color",label:"背景颜色"},textColor:{value:"#111",type:"color",label:"字体颜色"},textSize:{value:14,type:"number",label:"字体大小"},radiusSize:{value:8,type:"number",label:"圆角大小"},letterSpacing:{value:2,type:"number",label:"文字间距"},name:{value:"",type:"string",label:"文本内容"},bgImg:{value:"",type:"image",label:"背景图片"},textAlign:{value:"center",type:"radio",option:[{value:"left",label:"左"},{value:"center",label:"中"},{value:"right",label:"右"}],label:"文本布局"},isBold:{value:!1,type:"checkbox",label:"是否加粗"},isJump:{value:!1,type:"checkbox",label:"是否点击跳转"},jumpType:{value:"url",type:"radio",option:[{value:"url",label:"地址"},{value:"uid",label:"编号"}],label:"跳转方案",dependent:"isJump"},jumpParam:{value:"",type:"string",label:"跳转参数",dependent:"isJump"}}},{__name:"textbox",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""}},setup(t){const e=t,r={left:"flex-start",center:"center",right:"flex-end"},n=l.ref({}),a=()=>{var d,f,p,h,v,m,g,y,_,b,C,w,S,x,E,L;const{conf:u}=e;n.value={bgColor:((f=(d=u==null?void 0:u.options)==null?void 0:d.bgColor)==null?void 0:f.value)||"#fff",textColor:((h=(p=u==null?void 0:u.options)==null?void 0:p.textColor)==null?void 0:h.value)||"#111",textSize:((m=(v=u==null?void 0:u.options)==null?void 0:v.textSize)==null?void 0:m.value)||16,radiusSize:((y=(g=u==null?void 0:u.options)==null?void 0:g.radiusSize)==null?void 0:y.value)??4,letterSpacing:((b=(_=u==null?void 0:u.options)==null?void 0:_.letterSpacing)==null?void 0:b.value)??2,textAlign:((w=(C=u==null?void 0:u.options)==null?void 0:C.textAlign)==null?void 0:w.value)??"center",isBold:((x=(S=u==null?void 0:u.options)==null?void 0:S.isBold)==null?void 0:x.value)??!1,bgImg:((L=(E=u==null?void 0:u.options)==null?void 0:E.bgImg)==null?void 0:L.value)??""}},i=async()=>{const{options:u}=e.conf;let d=u.jumpParam.value;if(d){let f=u.jumpType.value==="url"?d:await o({uid:d});if(f.startsWith("mixui/#/")||f.startsWith("/mixui/#/")){let v=f.split("mixui/#/")[1];f=`${window.location.origin}/mixui/#/${v}`}const p=window.location.pathname+window.location.hash.split("?")[0],h=f.split("?")[0];if(p===h){const v=f+(f.includes("?")?"&":"?")+"_t="+Date.now();window.location.href=v,setTimeout(()=>{window.location.reload(!0)},100)}else{try{const v=new URL(f),y=v.hash.substring(1).split("/").map(_=>{try{const b=decodeURIComponent(_);return encodeURIComponent(b)}catch{return encodeURIComponent(_)}}).join("/");v.hash=y,f=v.toString()}catch(v){console.warn("URL解析失败,使用原始URL",v)}window.location.href=f}}else{u1.error("未设置跳转参数");return}},o=async u=>{var p;const{result:d}=await ot.post("get_object_item",{uid:u.uid},!0);let f={};if((p=d.dashboard_list)!=null&&p.length&&(f=d.dashboard_list.find(h=>h.type==="show")),Object.keys(f).length)return`${location.origin}/mixui/#/preview/${f.uid}/${f.name}?object_id=${u.uid}`;u1({message:"该对象未配置大屏脚本",type:"warning"})},s=()=>{e.mode==="preview"&&i()},c=dt(a,200);return l.watch(()=>e.conf,()=>{e.mode==="edit"&&c()},{deep:!0}),l.onMounted(()=>{a()}),(u,d)=>{var f,p,h;return l.openBlock(),l.createElementBlock("div",t8e,[l.createElementVNode("div",{class:"btn-wrap",style:l.normalizeStyle({backgroundColor:n.value.bgColor,color:n.value.textColor,borderRadius:`${n.value.radiusSize}px`,fontSize:`${n.value.textSize}px`,backgroundImage:n.value.bgImg?`url(${n.value.bgImg})`:"",justifyContent:r[n.value.textAlign]||"center",fontWeight:n.value.isBold?"600":"400",letterSpacing:`${n.value.letterSpacing}px`,cursor:n.value.isJump?"pointer":"default"}),onClick:s},l.toDisplayString(((h=(p=(f=t.conf)==null?void 0:f.options)==null?void 0:p.name)==null?void 0:h.value)||""),5),l.renderSlot(u.$slots,"default",{},void 0,!0)])}}}),[["__scopeId","data-v-0eb0f91a"]])},Symbol.toStringTag,{value:"Module"})),r8e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='18px'%20viewBox='0%200%2017%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e天气%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-807.000000,%20-99.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M817.945888,102.796609%20C819.683477,102.796609%20821.092089,104.205221%20821.092089,105.94281%20C821.092089,106.628082%20820.872999,107.262185%20820.501044,107.778896%20C822.196583,108.244456%20823.44069,109.818548%20823.44069,111.684342%20C823.44069,113.306186%20822.492183,114.753742%20821.051831,115.394536%20C820.713416,115.545093%20820.317026,115.392803%20820.16647,115.054388%20C820.015913,114.715973%20820.168202,114.319583%20820.506617,114.169026%20C821.464713,113.742782%20822.099373,112.774201%20822.099373,111.684342%20C822.099373,110.1861%20820.911369,108.976414%20819.451995,108.976414%20C819.031723,108.976414%20818.626762,109.07618%20818.260607,109.265341%20C817.879726,109.46211%20817.414554,109.255909%20817.304572,108.841551%20C816.799872,106.94008%20815.102249,105.597863%20813.147731,105.597863%20C810.772103,105.597863%20808.841317,107.563868%20808.841317,109.995048%20C808.841317,111.399401%20809.489548,112.691456%20810.568916,113.516983%20C810.863125,113.742002%20810.919215,114.162919%20810.694196,114.457127%20C810.469178,114.751336%20810.048261,114.807426%20809.754052,114.582408%20C808.345227,113.504903%20807.5,111.820195%20807.5,109.995048%20C807.5,106.828451%20810.025832,104.256546%20813.147731,104.256546%20C813.829302,104.256546%20814.486533,104.3802%20815.096693,104.608218%20C815.601039,103.529357%20816.696718,102.796609%20817.945888,102.796609%20Z%20M813.280439,107.176421%20C814.048868,107.176421%20814.770636,107.481714%20815.303171,108.014297%20C815.565067,108.276218%20815.565048,108.700855%20815.303127,108.962752%20C815.041206,109.224648%20814.616569,109.224629%20814.354672,108.962708%20C814.071197,108.679207%20813.689455,108.517738%20813.280439,108.517738%20C812.441385,108.517738%20811.761192,109.197931%20811.761192,110.036985%20C811.761192,110.446001%20811.922661,110.827743%20812.206162,111.111218%20C812.468083,111.373115%20812.468102,111.797752%20812.206206,112.059673%20C811.944309,112.321594%20811.519672,112.321613%20811.257751,112.059717%20C810.725168,111.527182%20810.419875,110.805414%20810.419875,110.036985%20C810.419875,108.457142%20811.700596,107.176421%20813.280439,107.176421%20Z%20M817.945888,104.137926%20C817.210393,104.137926%20816.567249,104.581189%20816.288327,105.226532%20C817.155696,105.815582%20817.856037,106.643608%20818.294581,107.628501%20L818.3271,107.70736%20C819.140827,107.532395%20819.750772,106.808824%20819.750772,105.94281%20C819.750772,104.94601%20818.942688,104.137926%20817.945888,104.137926%20Z%20M822.770031,105.657173%20C823.173193,105.657173%20823.5,105.98398%20823.5,106.387142%20C823.5,106.790304%20823.173193,107.117111%20822.770031,107.117111%20C822.36687,107.117111%20822.040063,106.790304%20822.040063,106.387142%20C822.040063,105.98398%20822.36687,105.657173%20822.770031,105.657173%20Z%20M822.040063,102.372314%20C822.443224,102.372314%20822.770031,102.699132%20822.770031,103.102283%20C822.770031,103.505445%20822.443224,103.832252%20822.040063,103.832252%20C821.636901,103.832252%20821.310094,103.505445%20821.310094,103.102283%20C821.310094,102.699132%20821.636901,102.372314%20822.040063,102.372314%20Z%20M814.740376,101.642346%20C815.143538,101.642346%20815.470345,101.969164%20815.470345,102.372314%20C815.470345,102.775465%20815.143538,103.102283%20814.740376,103.102283%20C814.337215,103.102283%20814.010408,102.775465%20814.010408,102.372314%20C814.010408,101.969164%20814.337215,101.642346%20814.740376,101.642346%20Z%20M818.755204,100.547393%20C819.158366,100.547393%20819.485173,100.874211%20819.485173,101.277361%20C819.485173,101.680512%20819.158366,102.00733%20818.755204,102.00733%20C818.352042,102.00733%20818.025235,101.680512%20818.025235,101.277361%20C818.025235,100.874211%20818.352042,100.547393%20818.755204,100.547393%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",n8e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='18px'%20viewBox='0%200%2017%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e天气%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-807.000000,%20-99.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M817.945888,102.796609%20C819.683477,102.796609%20821.092089,104.205221%20821.092089,105.94281%20C821.092089,106.628082%20820.872999,107.262185%20820.501044,107.778896%20C822.196583,108.244456%20823.44069,109.818548%20823.44069,111.684342%20C823.44069,113.306186%20822.492183,114.753742%20821.051831,115.394536%20C820.713416,115.545093%20820.317026,115.392803%20820.16647,115.054388%20C820.015913,114.715973%20820.168202,114.319583%20820.506617,114.169026%20C821.464713,113.742782%20822.099373,112.774201%20822.099373,111.684342%20C822.099373,110.1861%20820.911369,108.976414%20819.451995,108.976414%20C819.031723,108.976414%20818.626762,109.07618%20818.260607,109.265341%20C817.879726,109.46211%20817.414554,109.255909%20817.304572,108.841551%20C816.799872,106.94008%20815.102249,105.597863%20813.147731,105.597863%20C810.772103,105.597863%20808.841317,107.563868%20808.841317,109.995048%20C808.841317,111.399401%20809.489548,112.691456%20810.568916,113.516983%20C810.863125,113.742002%20810.919215,114.162919%20810.694196,114.457127%20C810.469178,114.751336%20810.048261,114.807426%20809.754052,114.582408%20C808.345227,113.504903%20807.5,111.820195%20807.5,109.995048%20C807.5,106.828451%20810.025832,104.256546%20813.147731,104.256546%20C813.829302,104.256546%20814.486533,104.3802%20815.096693,104.608218%20C815.601039,103.529357%20816.696718,102.796609%20817.945888,102.796609%20Z%20M813.280439,107.176421%20C814.048868,107.176421%20814.770636,107.481714%20815.303171,108.014297%20C815.565067,108.276218%20815.565048,108.700855%20815.303127,108.962752%20C815.041206,109.224648%20814.616569,109.224629%20814.354672,108.962708%20C814.071197,108.679207%20813.689455,108.517738%20813.280439,108.517738%20C812.441385,108.517738%20811.761192,109.197931%20811.761192,110.036985%20C811.761192,110.446001%20811.922661,110.827743%20812.206162,111.111218%20C812.468083,111.373115%20812.468102,111.797752%20812.206206,112.059673%20C811.944309,112.321594%20811.519672,112.321613%20811.257751,112.059717%20C810.725168,111.527182%20810.419875,110.805414%20810.419875,110.036985%20C810.419875,108.457142%20811.700596,107.176421%20813.280439,107.176421%20Z%20M817.945888,104.137926%20C817.210393,104.137926%20816.567249,104.581189%20816.288327,105.226532%20C817.155696,105.815582%20817.856037,106.643608%20818.294581,107.628501%20L818.3271,107.70736%20C819.140827,107.532395%20819.750772,106.808824%20819.750772,105.94281%20C819.750772,104.94601%20818.942688,104.137926%20817.945888,104.137926%20Z%20M822.770031,105.657173%20C823.173193,105.657173%20823.5,105.98398%20823.5,106.387142%20C823.5,106.790304%20823.173193,107.117111%20822.770031,107.117111%20C822.36687,107.117111%20822.040063,106.790304%20822.040063,106.387142%20C822.040063,105.98398%20822.36687,105.657173%20822.770031,105.657173%20Z%20M822.040063,102.372314%20C822.443224,102.372314%20822.770031,102.699132%20822.770031,103.102283%20C822.770031,103.505445%20822.443224,103.832252%20822.040063,103.832252%20C821.636901,103.832252%20821.310094,103.505445%20821.310094,103.102283%20C821.310094,102.699132%20821.636901,102.372314%20822.040063,102.372314%20Z%20M814.740376,101.642346%20C815.143538,101.642346%20815.470345,101.969164%20815.470345,102.372314%20C815.470345,102.775465%20815.143538,103.102283%20814.740376,103.102283%20C814.337215,103.102283%20814.010408,102.775465%20814.010408,102.372314%20C814.010408,101.969164%20814.337215,101.642346%20814.740376,101.642346%20Z%20M818.755204,100.547393%20C819.158366,100.547393%20819.485173,100.874211%20819.485173,101.277361%20C819.485173,101.680512%20819.158366,102.00733%20818.755204,102.00733%20C818.352042,102.00733%20818.025235,101.680512%20818.025235,101.277361%20C818.025235,100.874211%20818.352042,100.547393%20818.755204,100.547393%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",a8e=["src"],gg=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:{DEFAULT_ICON:r8e,ACTIVE_ICON:n8e,NAME_CN:"天气",NAME_EN:"Weather",ORDER:4},OPTIONS:{bgColor:{value:"#fff",type:"color",label:"背景颜色"},textColor:{value:"#00B0F0",type:"color",label:"字体颜色",hideAlpha:!0},radiusSize:{value:8,type:"number",label:"圆角大小"},bgImg:{value:"",type:"image",label:"背景图片"}}},{__name:"weather",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""}},setup(t){const e=t,r=l.ref({}),n=()=>{var s,c,u,d,f,p,h,v;const{conf:o}=e;r.value={bgColor:((c=(s=o==null?void 0:o.options)==null?void 0:s.bgColor)==null?void 0:c.value)||"#fff",textColor:((d=(u=o==null?void 0:o.options)==null?void 0:u.textColor)==null?void 0:d.value)||"#00B0F0",radiusSize:((p=(f=o==null?void 0:o.options)==null?void 0:f.radiusSize)==null?void 0:p.value)??4,bgImg:((v=(h=o==null?void 0:o.options)==null?void 0:h.bgImg)==null?void 0:v.value)??""}},a=l.computed(()=>{var o,s;return((s=(o=r.value)==null?void 0:o.textColor)==null?void 0:s.replace("#",""))||"00B0F0"}),i=dt(n,200);return l.watch(()=>e.conf,()=>{e.mode==="edit"&&i()},{deep:!0}),l.onMounted(()=>{n()}),(o,s)=>(l.openBlock(),l.createElementBlock("div",{class:"w-full h-full flex items-center justify-center bg-[length:100%_100%]",style:l.normalizeStyle({backgroundColor:r.value.bgColor,color:r.value.textColor,borderRadius:`${r.value.radiusSize}px`,fontSize:`${r.value.textSize}px`,backgroundImage:r.value.bgImg?`url(${r.value.bgImg})`:""})},[l.createElementVNode("iframe",{width:"200",scrolling:"no",height:"60",frameborder:"0",allowtransparency:"true",src:`https://i.tianqi.com?c=code&id=12&color=%23${a.value}&icon=1&num=1&site=15&align=center`},null,8,a8e),l.renderSlot(o.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-a18a9645"]])},Symbol.toStringTag,{value:"Module"})),HI="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e画板备份%2014%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-103.000000,%20-281.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M111.732508,282.805834%20C116.150793,282.805834%20119.732508,286.387549%20119.732508,290.805834%20C119.732508,292.955899%20118.879547,294.972513%20117.389341,296.462679%20C117.137966,296.714048%20116.730412,296.714042%20116.479043,296.462667%20C116.227674,296.211292%20116.22768,295.803737%20116.479055,295.552369%20C117.308447,294.722998%20117.902203,293.700651%20118.208265,292.579797%20C118.192161,292.581607%20118.177362,292.58076%20118.162521,292.57939%20L118.076094,292.565468%20L116.710796,292.250267%20C116.364413,292.170299%20116.148442,291.824674%20116.228409,291.478291%20C116.301713,291.160774%20116.598243,290.952838%20116.913959,290.981983%20L117.000385,290.995905%20L118.365684,291.311106%20L118.425004,291.329271%20C118.438381,291.156079%20118.445152,290.9815%20118.445152,290.805834%20C118.445152,289.354555%20117.984597,288.010846%20117.201668,286.91289%20L116.248992,287.683715%20C115.972717,287.907429%20115.567396,287.864821%20115.343682,287.588546%20C115.140305,287.337388%20115.15703,286.979579%20115.369321,286.748519%20L115.438851,286.683236%20L116.356389,285.939671%20C115.298436,284.934073%20113.912895,284.269882%20112.376336,284.123666%20L112.376186,285.201017%20C112.376186,285.556511%20112.088002,285.844695%20111.732508,285.844695%20C111.406639,285.844695%20111.137328,285.60254%20111.094706,285.28836%20L111.08883,285.201017%20L111.08868,284.123666%20C109.552121,284.269882%20108.16658,284.934073%20107.108627,285.939671%20L108.026177,286.683246%20C108.302446,286.906967%20108.345045,287.312289%20108.121324,287.588558%20C107.917941,287.839712%20107.564475,287.89775%20107.294324,287.738142%20L107.216012,287.683705%20L106.263348,286.91289%20C105.480419,288.010846%20105.019864,289.354555%20105.019864,290.805834%20C105.019864,290.981163%20105.026609,291.155409%20105.039935,291.328274%20L105.099216,291.311106%20L106.464507,290.995905%20C106.81089,290.915937%20107.156515,291.131908%20107.236483,291.478291%20C107.309788,291.795808%20107.134421,292.112689%20106.837881,292.224894%20L106.754098,292.250267%20L105.388807,292.565468%20C105.344789,292.57563%20105.300784,292.581013%20105.257335,292.581957%20C105.563167,293.701259%20106.156812,294.723245%20106.98595,295.552372%20C107.237323,295.803742%20107.237326,296.211297%20106.985956,296.46267%20C106.734586,296.714044%20106.327031,296.714046%20106.075657,296.462676%20C104.585466,294.972504%20103.732508,292.955891%20103.732508,290.805834%20C103.732508,286.387549%20107.314223,282.805834%20111.732508,282.805834%20Z%20M113.702162,288.378021%20C114.216,288.175266%20114.729753,288.671391%20114.545055,289.191992%20L114.545055,289.191992%20L114.490568,289.343722%20L114.149804,290.254265%20C114.033769,290.555413%20113.915808,290.852333%20113.798435,291.136389%20L113.798435,291.136389%20L113.63399,291.5263%20L113.459384,291.920566%20L113.280448,292.298668%20C113.079162,292.705571%20112.902373,292.993389%20112.732679,293.16912%20C111.948158,293.981503%20110.653599,294.004095%20109.841231,293.219589%20C109.028807,292.435077%20109.0062,291.140553%20109.790727,290.328112%20C110.039196,290.07082%20110.529648,289.788284%20111.279335,289.428056%20C111.440306,289.350708%20111.611261,289.27101%20111.790958,289.189349%20C112.209753,288.999031%20112.657009,288.806486%20113.10407,288.621161%20L113.10407,288.621161%20Z%20M112.809289,290.145604%20L112.323569,290.361361%20L111.83689,290.588409%20L111.529,290.740201%20L111.261267,290.87979%20L111.038978,291.00372%20L110.867422,291.108539%20C110.795208,291.155595%20110.744003,291.194189%20110.716781,291.222378%20C110.426143,291.523357%20110.434517,292.002897%20110.735497,292.293535%20C111.036439,292.584157%20111.516014,292.575787%20111.806625,292.274855%20C111.82404,292.256821%20111.845515,292.228568%20111.870535,292.190933%20L111.870535,292.190933%20L111.955713,292.050713%20L112.059061,291.859211%20C112.077627,291.823299%20112.096822,291.785459%20112.116581,291.745796%20L112.116581,291.745796%20L112.241376,291.486773%20C112.284885,291.393695%20112.330131,291.29416%20112.376599,291.189003%20L112.376599,291.189003%20L112.452161,291.015843%20L112.693762,290.436735%20L112.809289,290.145604%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",GI="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e仪表盘%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-103.000000,%20-281.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M111.732508,282.805834%20C116.150793,282.805834%20119.732508,286.387549%20119.732508,290.805834%20C119.732508,292.955899%20118.879547,294.972513%20117.389341,296.462679%20C117.137966,296.714048%20116.730412,296.714042%20116.479043,296.462667%20C116.227674,296.211292%20116.22768,295.803737%20116.479055,295.552369%20C117.308447,294.722998%20117.902203,293.700651%20118.208265,292.579797%20C118.192161,292.581607%20118.177362,292.58076%20118.162521,292.57939%20L118.076094,292.565468%20L116.710796,292.250267%20C116.364413,292.170299%20116.148442,291.824674%20116.228409,291.478291%20C116.301713,291.160774%20116.598243,290.952838%20116.913959,290.981983%20L117.000385,290.995905%20L118.365684,291.311106%20L118.425004,291.329271%20C118.438381,291.156079%20118.445152,290.9815%20118.445152,290.805834%20C118.445152,289.354555%20117.984597,288.010846%20117.201668,286.91289%20L116.248992,287.683715%20C115.972717,287.907429%20115.567396,287.864821%20115.343682,287.588546%20C115.140305,287.337388%20115.15703,286.979579%20115.369321,286.748519%20L115.438851,286.683236%20L116.356389,285.939671%20C115.298436,284.934073%20113.912895,284.269882%20112.376336,284.123666%20L112.376186,285.201017%20C112.376186,285.556511%20112.088002,285.844695%20111.732508,285.844695%20C111.406639,285.844695%20111.137328,285.60254%20111.094706,285.28836%20L111.08883,285.201017%20L111.08868,284.123666%20C109.552121,284.269882%20108.16658,284.934073%20107.108627,285.939671%20L108.026177,286.683246%20C108.302446,286.906967%20108.345045,287.312289%20108.121324,287.588558%20C107.917941,287.839712%20107.564475,287.89775%20107.294324,287.738142%20L107.216012,287.683705%20L106.263348,286.91289%20C105.480419,288.010846%20105.019864,289.354555%20105.019864,290.805834%20C105.019864,290.981163%20105.026609,291.155409%20105.039935,291.328274%20L105.099216,291.311106%20L106.464507,290.995905%20C106.81089,290.915937%20107.156515,291.131908%20107.236483,291.478291%20C107.309788,291.795808%20107.134421,292.112689%20106.837881,292.224894%20L106.754098,292.250267%20L105.388807,292.565468%20C105.344789,292.57563%20105.300784,292.581013%20105.257335,292.581957%20C105.563167,293.701259%20106.156812,294.723245%20106.98595,295.552372%20C107.237323,295.803742%20107.237326,296.211297%20106.985956,296.46267%20C106.734586,296.714044%20106.327031,296.714046%20106.075657,296.462676%20C104.585466,294.972504%20103.732508,292.955891%20103.732508,290.805834%20C103.732508,286.387549%20107.314223,282.805834%20111.732508,282.805834%20Z%20M113.702162,288.378021%20C114.216,288.175266%20114.729753,288.671391%20114.545055,289.191992%20L114.545055,289.191992%20L114.490568,289.343722%20L114.149804,290.254265%20C114.033769,290.555413%20113.915808,290.852333%20113.798435,291.136389%20L113.798435,291.136389%20L113.63399,291.5263%20L113.459384,291.920566%20L113.280448,292.298668%20C113.079162,292.705571%20112.902373,292.993389%20112.732679,293.16912%20C111.948158,293.981503%20110.653599,294.004095%20109.841231,293.219589%20C109.028807,292.435077%20109.0062,291.140553%20109.790727,290.328112%20C110.039196,290.07082%20110.529648,289.788284%20111.279335,289.428056%20C111.440306,289.350708%20111.611261,289.27101%20111.790958,289.189349%20C112.209753,288.999031%20112.657009,288.806486%20113.10407,288.621161%20L113.10407,288.621161%20Z%20M112.809289,290.145604%20L112.323569,290.361361%20L111.83689,290.588409%20L111.529,290.740201%20L111.261267,290.87979%20L111.038978,291.00372%20L110.867422,291.108539%20C110.795208,291.155595%20110.744003,291.194189%20110.716781,291.222378%20C110.426143,291.523357%20110.434517,292.002897%20110.735497,292.293535%20C111.036439,292.584157%20111.516014,292.575787%20111.806625,292.274855%20C111.82404,292.256821%20111.845515,292.228568%20111.870535,292.190933%20L111.870535,292.190933%20L111.955713,292.050713%20L112.059061,291.859211%20C112.077627,291.823299%20112.096822,291.785459%20112.116581,291.745796%20L112.116581,291.745796%20L112.241376,291.486773%20C112.284885,291.393695%20112.330131,291.29416%20112.376599,291.189003%20L112.376599,291.189003%20L112.452161,291.015843%20L112.693762,290.436735%20L112.809289,290.145604%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",i8e={DEFAULT_ICON:HI,ACTIVE_ICON:GI,NAME_CN:"仪表盘",NAME_EN:"Gauge",ORDER:1},o8e={titleColor:{value:"#111",type:"color",label:"标题颜色"},textColor:{value:"#111",type:"color",label:"字体颜色"},bgColor:{value:"#fff",type:"color",label:"背景颜色"},radiusSize:{value:8,type:"number",label:"圆角大小"},textSize:{value:12,type:"number",label:"字体大小"},points:{value:10,type:"number",label:"显示数量"},isHideTitle:{value:!1,type:"checkbox",label:"是否隐藏标题"},showLabel:{value:!1,type:"checkbox",label:"是否显示数据"}},WI=[{name:"参数一",object_id:"",fv:"",max:100,min:0,pieces:5}],vg=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:i8e,OPTIONS:o8e,DATA:WI,PARAMS:["name","fv","object_id","max","min","pieces"],SOURCE:["mosaic","statistics","calculate"],COLOR_AREA:[{color:"#5c7bd9",value:100}],ITEMS:1,COMMON:{useAlias:!1,source:"mosaic"}},{__name:"gag",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"}},setup(t){Rt([w1,x1,g1,V1,v1,gT]);const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null)),n="bar_"+Math.random().toString(16).substring(4,12);let a=null,i=null;const o=t,s=l.ref({bgColor:"#73bff9",titleColor:"#111",textSize:12,radiusSize:4,isHideTitle:!1}),c=()=>{var g,y,_,b,C,w,S,x,E,L,T,k,A,D;const{conf:m}=o;s.value={bgColor:((y=(g=m==null?void 0:m.options)==null?void 0:g.bgColor)==null?void 0:y.value)||"#73bff9",titleColor:((b=(_=m==null?void 0:m.options)==null?void 0:_.titleColor)==null?void 0:b.value)||"#111",textColor:((w=(C=m==null?void 0:m.options)==null?void 0:C.textColor)==null?void 0:w.value)||"#111",radiusSize:((x=(S=m==null?void 0:m.options)==null?void 0:S.radiusSize)==null?void 0:x.value)??4,textSize:((L=(E=m==null?void 0:m.options)==null?void 0:E.textSize)==null?void 0:L.value)??12,isHideTitle:((k=(T=m==null?void 0:m.options)==null?void 0:T.isHideTitle)==null?void 0:k.value)||!1,points:((D=(A=m==null?void 0:m.options)==null?void 0:A.points)==null?void 0:D.value)||10},m.data=m.data.length?m.data:WI,l.nextTick(()=>{let M=document.querySelector("#"+n);M&&(a||(a=s1(M),i=Qt({strategy:"scroll"}),i.listenTo(M,function(){a.resize()})),a.setOption(u(),!0))})},u=()=>{const{data:m}=o.conf;let g=m[0]??{};var y={tooltip:{trigger:"item",formatter:"{a} <br/>{b} : {c}",confine:!0},series:[{name:g.name??"",type:"gauge",radius:"100%",startAngle:215,center:["50%","55%"],max:g.max??100,min:g.min??0,endAngle:-35,splitNumber:g.pieces??5,data:[{value:g.min??0,name:g.name??""}],axisLine:{lineStyle:{color:d(),width:10}},axisLabel:{distance:25,color:s.value.textColor},axisTick:{length:5,distance:-10,lineStyle:{color:"#fff"}},splitLine:{length:-10,distance:0,lineStyle:{width:3,color:"transparent"}},pointer:{shadowColor:"#ff2e4c",width:3,length:"70%",itemStyle:{color:"auto"}},title:{offsetCenter:[0,"80%"],fontSize:14,fontFamily:"Microsoft YaHei",color:s.value.textColor},detail:{borderWidth:0,width:"100%",height:14,fontSize:14,color:s.value.textColor,offsetCenter:[0,"50%"],formatter:function(_){return _+(g.unit??"")}}}]};return y},d=()=>{const{area:m,data:g}=o.conf,{max:y,min:_,pieces:b}=g[0];let C=[...m].sort((S,x)=>S.value-x.value),w=[];return C.forEach(S=>{let x=y-_,E=S.value/x;w.push([E,S.color])}),w},f=m=>{const{data:g,common:y}=o.conf,_=y.source||"mosaic";if(["statistics","calculate"].includes(_)&&(m=Pr(m,g)),!m.history.length)return;let b=a.getOption();m.history.forEach(C=>{var w;b.series[0].data[0].value=(w=C[0])==null?void 0:w[g[0].fv]}),a.setOption(b)},p=m=>{const{data:g,common:y}=o.conf,_=y.source||"mosaic";if(!m||!a)return;let b=a.getOption(),C="";y.multiObject||(C=Be(y,y.useAlias,o.uid)),g.forEach((w,S)=>{var E,L,T,k,A,D,M;y.multiObject?C=Be(w,y.useAlias,o.uid):C=w.object_id;let x=null;["statistics","calculate"].includes(_)?x=(k=(T=(L=(E=m[C])==null?void 0:E[_])==null?void 0:L.data)==null?void 0:T[w.fv])==null?void 0:k.data:x=(M=(D=(A=m[C])==null?void 0:A[_])==null?void 0:D.data)==null?void 0:M[w.fv],b.series[0].data[0].value=x}),a.setOption(b)},h=async()=>{try{const g=await new Ft().getHistoryData(o,"gag");f(g)}catch(m){console.error("获取历史数据时出错:",m)}finally{const m=t1(o.conf,o.uid);e.value&&e.value.port.postMessage({request:m,type:"send"}),r.value&&r.value.send(JSON.stringify(m))}},v=dt(c,200);return l.watch(()=>o.conf,()=>{o.mode==="edit"&&v()},{deep:!0}),l.watchEffect(()=>{o.conf.socketData&&p(o.conf.socketData)}),l.onMounted(()=>{c(),o.mode==="preview"&&h()}),l.onBeforeUnmount(()=>{i&&i.uninstall(document.querySelector("#"+n)),a&&a.clear(),a&&p1(a),a=null}),(m,g)=>(l.openBlock(),l.createElementBlock("div",{class:"component-container",style:l.normalizeStyle({background:s.value.bgColor,borderRadius:`${s.value.radiusSize}px`})},[s.value.isHideTitle?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:"echart-title",style:l.normalizeStyle({color:s.value.titleColor})},l.toDisplayString(t.conf.name),5)),l.createElementVNode("div",{class:"echart-body"},[l.createElementVNode("div",{class:"w-full h-full",id:n})]),l.renderSlot(m.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-d36fa490"]])},Symbol.toStringTag,{value:"Module"})),s8e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e条形图%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-651.000000,%20-340.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M657.034892,353.547253%20C657.390386,353.547253%20657.678571,353.835438%20657.678571,354.190932%20C657.678571,354.516801%20657.436415,354.786112%20657.122236,354.828734%20L657.034892,354.83461%20L655.392935,354.83461%20C655.037442,354.83461%20654.749257,354.546425%20654.749257,354.190932%20C654.749257,353.865062%20654.991412,353.595752%20655.305592,353.55313%20L655.392935,353.547253%20L657.034892,353.547253%20Z%20M652.789724,353.547253%20C653.145217,353.547253%20653.433402,353.835438%20653.433402,354.190932%20C653.433402,354.516801%20653.191247,354.786112%20652.877067,354.828734%20L652.789724,354.83461%20L652.17399,354.83461%20C651.818496,354.83461%20651.530312,354.546425%20651.530312,354.190932%20C651.530312,353.865062%20651.772467,353.595752%20652.086646,353.55313%20L652.17399,353.547253%20L652.789724,353.547253%20Z%20M660.318806,350.26334%20C660.6743,350.26334%20660.962484,350.551524%20660.962484,350.907018%20C660.962484,351.232887%20660.720329,351.502198%20660.406149,351.54482%20L660.318806,351.550696%20L655.392935,351.550696%20C655.037442,351.550696%20654.749257,351.262512%20654.749257,350.907018%20C654.749257,350.581149%20654.991412,350.311838%20655.305592,350.269216%20L655.392935,350.26334%20L660.318806,350.26334%20Z%20M652.789724,350.26334%20C653.145217,350.26334%20653.433402,350.551524%20653.433402,350.907018%20C653.433402,351.232887%20653.191247,351.502198%20652.877067,351.54482%20L652.789724,351.550696%20L652.17399,351.550696%20C651.818496,351.550696%20651.530312,351.262512%20651.530312,350.907018%20C651.530312,350.581149%20651.772467,350.311838%20652.086646,350.269216%20L652.17399,350.26334%20L652.789724,350.26334%20Z%20M663.60272,346.979426%20C663.958213,346.979426%20664.246398,347.267611%20664.246398,347.623104%20C664.246398,347.948973%20664.004243,348.218284%20663.690063,348.260906%20L663.60272,348.266782%20L655.392935,348.266782%20C655.037442,348.266782%20654.749257,347.978598%20654.749257,347.623104%20C654.749257,347.297235%20654.991412,347.027924%20655.305592,346.985302%20L655.392935,346.979426%20L663.60272,346.979426%20Z%20M652.789724,346.979426%20C653.145217,346.979426%20653.433402,347.267611%20653.433402,347.623104%20C653.433402,347.948973%20653.191247,348.218284%20652.877067,348.260906%20L652.789724,348.266782%20L652.17399,348.266782%20C651.818496,348.266782%20651.530312,347.978598%20651.530312,347.623104%20C651.530312,347.297235%20651.772467,347.027924%20652.086646,346.985302%20L652.17399,346.979426%20L652.789724,346.979426%20Z%20M666.886633,343.695512%20C667.242127,343.695512%20667.530312,343.983697%20667.530312,344.339191%20C667.530312,344.66506%20667.288157,344.934371%20666.973977,344.976993%20L666.886633,344.982869%20L655.392935,344.982869%20C655.037442,344.982869%20654.749257,344.694684%20654.749257,344.339191%20C654.749257,344.013321%20654.991412,343.744011%20655.305592,343.701388%20L655.392935,343.695512%20L666.886633,343.695512%20Z%20M652.789724,343.695512%20C653.145217,343.695512%20653.433402,343.983697%20653.433402,344.339191%20C653.433402,344.66506%20653.191247,344.934371%20652.877067,344.976993%20L652.789724,344.982869%20L652.17399,344.982869%20C651.818496,344.982869%20651.530312,344.694684%20651.530312,344.339191%20C651.530312,344.013321%20651.772467,343.744011%20652.086646,343.701388%20L652.17399,343.695512%20L652.789724,343.695512%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",l8e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='18px'%20height='18px'%20viewBox='0%200%2018%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e条形图%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-651.000000,%20-340.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M657.034892,353.547253%20C657.390386,353.547253%20657.678571,353.835438%20657.678571,354.190932%20C657.678571,354.516801%20657.436415,354.786112%20657.122236,354.828734%20L657.034892,354.83461%20L655.392935,354.83461%20C655.037442,354.83461%20654.749257,354.546425%20654.749257,354.190932%20C654.749257,353.865062%20654.991412,353.595752%20655.305592,353.55313%20L655.392935,353.547253%20L657.034892,353.547253%20Z%20M652.789724,353.547253%20C653.145217,353.547253%20653.433402,353.835438%20653.433402,354.190932%20C653.433402,354.516801%20653.191247,354.786112%20652.877067,354.828734%20L652.789724,354.83461%20L652.17399,354.83461%20C651.818496,354.83461%20651.530312,354.546425%20651.530312,354.190932%20C651.530312,353.865062%20651.772467,353.595752%20652.086646,353.55313%20L652.17399,353.547253%20L652.789724,353.547253%20Z%20M660.318806,350.26334%20C660.6743,350.26334%20660.962484,350.551524%20660.962484,350.907018%20C660.962484,351.232887%20660.720329,351.502198%20660.406149,351.54482%20L660.318806,351.550696%20L655.392935,351.550696%20C655.037442,351.550696%20654.749257,351.262512%20654.749257,350.907018%20C654.749257,350.581149%20654.991412,350.311838%20655.305592,350.269216%20L655.392935,350.26334%20L660.318806,350.26334%20Z%20M652.789724,350.26334%20C653.145217,350.26334%20653.433402,350.551524%20653.433402,350.907018%20C653.433402,351.232887%20653.191247,351.502198%20652.877067,351.54482%20L652.789724,351.550696%20L652.17399,351.550696%20C651.818496,351.550696%20651.530312,351.262512%20651.530312,350.907018%20C651.530312,350.581149%20651.772467,350.311838%20652.086646,350.269216%20L652.17399,350.26334%20L652.789724,350.26334%20Z%20M663.60272,346.979426%20C663.958213,346.979426%20664.246398,347.267611%20664.246398,347.623104%20C664.246398,347.948973%20664.004243,348.218284%20663.690063,348.260906%20L663.60272,348.266782%20L655.392935,348.266782%20C655.037442,348.266782%20654.749257,347.978598%20654.749257,347.623104%20C654.749257,347.297235%20654.991412,347.027924%20655.305592,346.985302%20L655.392935,346.979426%20L663.60272,346.979426%20Z%20M652.789724,346.979426%20C653.145217,346.979426%20653.433402,347.267611%20653.433402,347.623104%20C653.433402,347.948973%20653.191247,348.218284%20652.877067,348.260906%20L652.789724,348.266782%20L652.17399,348.266782%20C651.818496,348.266782%20651.530312,347.978598%20651.530312,347.623104%20C651.530312,347.297235%20651.772467,347.027924%20652.086646,346.985302%20L652.17399,346.979426%20L652.789724,346.979426%20Z%20M666.886633,343.695512%20C667.242127,343.695512%20667.530312,343.983697%20667.530312,344.339191%20C667.530312,344.66506%20667.288157,344.934371%20666.973977,344.976993%20L666.886633,344.982869%20L655.392935,344.982869%20C655.037442,344.982869%20654.749257,344.694684%20654.749257,344.339191%20C654.749257,344.013321%20654.991412,343.744011%20655.305592,343.701388%20L655.392935,343.695512%20L666.886633,343.695512%20Z%20M652.789724,343.695512%20C653.145217,343.695512%20653.433402,343.983697%20653.433402,344.339191%20C653.433402,344.66506%20653.191247,344.934371%20652.877067,344.976993%20L652.789724,344.982869%20L652.17399,344.982869%20C651.818496,344.982869%20651.530312,344.694684%20651.530312,344.339191%20C651.530312,344.013321%20651.772467,343.744011%20652.086646,343.701388%20L652.17399,343.695512%20L652.789724,343.695512%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",c8e={class:"echart-body flex flex-col"},u8e=["onClick"],d8e={class:"flex-1"},f8e={DEFAULT_ICON:s8e,ACTIVE_ICON:l8e,NAME_CN:"条形进度",NAME_EN:"progressBar",ORDER:2},h8e={titleColor:{value:"#111",type:"color",label:"标题颜色"},textColor:{value:"#111",type:"color",label:"字体颜色"},bgColor:{value:"#fff",type:"color",label:"背景颜色"},barColor:{value:"#ebeef5",type:"color",label:"条形背景颜色"},radiusSize:{value:8,type:"number",label:"圆角大小"},textSize:{value:14,type:"number",label:"字体大小"},labelWidth:{value:48,type:"number",label:"标签宽度"},barWidth:{value:16,type:"number",label:"条形宽度"},isHideTitle:{value:!1,type:"checkbox",label:"是否隐藏标题"},showLabel:{value:!1,type:"checkbox",label:"是否显示数据"}},YI=[{name:"参数一",fv:"",max:200,color:"#f56c6c",maxType:"value"},{name:"参数二",fv:"",max:200,color:"#5cb87a",maxType:"value"}],mg=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:f8e,OPTIONS:h8e,DATA:YI,PARAMS:["name","fv","object_id","color","maxType","max"],SOURCE:["mosaic"],COMMON:{useAlias:!1,multiObject:!1,source:"mosaic"}},{__name:"progressBar",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"}},setup(t){const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null));""+Math.random().toString(16).substring(4,12);const n=t,a=l.ref({}),i=()=>{var p,h,v,m,g,y,_,b,C,w,S,x,E,L,T,k,A,D,M,O;const{conf:f}=n;a.value={bgColor:((h=(p=f==null?void 0:f.options)==null?void 0:p.bgColor)==null?void 0:h.value)||"#73bff9",barColor:((m=(v=f==null?void 0:f.options)==null?void 0:v.barColor)==null?void 0:m.value)||"#ebeef5",titleColor:((y=(g=f==null?void 0:f.options)==null?void 0:g.titleColor)==null?void 0:y.value)||"#111",textColor:((b=(_=f==null?void 0:f.options)==null?void 0:_.textColor)==null?void 0:b.value)||"#111",textSize:((w=(C=f==null?void 0:f.options)==null?void 0:C.textSize)==null?void 0:w.value)||14,radiusSize:((x=(S=f==null?void 0:f.options)==null?void 0:S.radiusSize)==null?void 0:x.value)??4,labelWidth:((L=(E=f==null?void 0:f.options)==null?void 0:E.labelWidth)==null?void 0:L.value)??80,barWidth:((k=(T=f==null?void 0:f.options)==null?void 0:T.barWidth)==null?void 0:k.value)??16,isHideTitle:((D=(A=f==null?void 0:f.options)==null?void 0:A.isHideTitle)==null?void 0:D.value)||!1,points:((O=(M=f==null?void 0:f.options)==null?void 0:M.points)==null?void 0:O.value)||10},f.data=f.data.length?f.data:YI},o=()=>{},s=f=>{const{data:p}=n.conf;f.history.forEach((h,v)=>{var m,g,y;if(p[v].maxType==="value"){let _=p[v].max;p[v].value=((m=h[0])==null?void 0:m[p[v].fv])||0,p[v].percent=_==0?0:Number((p[v].value/_*100).toFixed(2))}else{let _=((g=h[0])==null?void 0:g[p[v].max])||0;p[v].value=((y=h[0])==null?void 0:y[p[v].fv])||0,p[v].percent=_==0?0:Number((p[v].value/_*100).toFixed(2))}})},c=f=>{const{data:p,common:h}=n.conf,v=h.source||"mosaic";let m="";h.multiObject||(m=Be(h,h.useAlias,n.uid)),p.forEach((g,y)=>{if(h.multiObject&&(m=Be(g,h.useAlias,n.uid)),g.maxType==="value"){g.value=f[m][v].data[g.fv]||0;let _=g.max;g.percent=_==0?0:Number((g.value/_*100).toFixed(2))}else{g.value=f[m][v].data[g.fv]||0;let _=f[m][v].data[g.max]||0;g.percent=_==0?0:Number((g.value/_*100).toFixed(2))}})},u=async()=>{try{const p=await new Ft().getHistoryData(n,"progressBar");s(p)}catch(f){console.error("获取历史数据时出错:",f)}finally{const f=t1(n.conf,n.uid,"progressBar");e.value&&e.value.port.postMessage({request:f,type:"send"}),r.value&&r.value.send(JSON.stringify(f))}},d=dt(i,200);return l.watch(()=>n.conf,()=>{n.mode==="edit"&&d()},{deep:!0}),l.watchEffect(()=>{n.conf.socketData&&c(n.conf.socketData)}),l.onMounted(()=>{i(),n.mode==="preview"&&u()}),l.onBeforeUnmount(()=>{}),(f,p)=>{const h=JO;return l.openBlock(),l.createElementBlock("div",{class:"component-container",style:l.normalizeStyle({background:a.value.bgColor,borderRadius:`${a.value.radiusSize}px`})},[a.value.isHideTitle?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:"echart-title",style:l.normalizeStyle({color:a.value.titleColor})},l.toDisplayString(t.conf.name),5)),l.createElementVNode("div",c8e,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.conf.data,(v,m)=>(l.openBlock(),l.createElementBlock("div",{key:m,class:l.normalizeClass(["flex item",{pointer:t.conf.control,checked:v.checked}]),onClick:g=>o()},[l.createElementVNode("div",{class:"label",style:l.normalizeStyle({fontSize:a.value.textSize+"px",color:a.value.textColor,width:a.value.labelWidth+"px"})},l.toDisplayString(v.name),5),l.createElementVNode("div",d8e,[l.createVNode(h,{percentage:v.percent,"text-inside":!0,style:l.normalizeStyle({"--progress-bg-color":a.value.barColor}),color:v.color,strokeWidth:a.value.barWidth},null,8,["percentage","style","color","strokeWidth"])]),l.createElementVNode("div",{class:"value",style:l.normalizeStyle({fontSize:a.value.textSize+"px",color:a.value.textColor})},l.toDisplayString(v.value),5)],10,u8e))),128))]),l.renderSlot(f.$slots,"default",{},void 0,!0)],4)}}}),[["__scopeId","data-v-551f572d"]])},Symbol.toStringTag,{value:"Module"})),p8e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='18px'%20viewBox='0%200%2017%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e环形图%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份'%20transform='translate(-735.000000,%20-341.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M743.063004,342.931102%20C743.116316,343.282573%20742.87461,343.610715%20742.523139,343.664027%20C739.245615,344.16117%20736.791283,346.991546%20736.791283,350.341222%20C736.791283,353.692268%20739.24752,356.523394%20742.526687,357.018996%20C742.861546,357.069587%20743.201677,357.095181%20743.545242,357.095181%20C743.887612,357.095181%20744.226635,357.069756%20744.560421,357.019508%20C747.477621,356.580105%20749.784771,354.272574%20750.223659,351.355292%20C750.276546,351.003757%20750.604395,350.761654%20750.95593,350.81454%20C751.307466,350.867427%20751.549569,351.195276%20751.496682,351.546811%20C750.973739,355.022805%20748.228057,357.768941%20744.752113,358.292505%20C744.354903,358.352301%20743.951823,358.382531%20743.545242,358.382531%20C743.137244,358.382531%20742.732829,358.3521%20742.334339,358.291894%20C738.427868,357.701483%20735.503933,354.331278%20735.503933,350.341222%20C735.503933,346.352789%20738.425598,342.983478%20742.330079,342.391237%20C742.68155,342.337925%20743.009692,342.579631%20743.063004,342.931102%20Z%20M743.545242,346.738567%20C745.534982,346.738567%20747.14797,348.351556%20747.14797,350.341296%20C747.14797,352.331036%20745.534982,353.944024%20743.545242,353.944024%20C741.555502,353.944024%20739.942514,352.331036%20739.942514,350.341296%20C739.942514,348.351556%20741.555502,346.738567%20743.545242,346.738567%20Z%20M743.545242,348.025917%20C742.266485,348.025917%20741.229863,349.062539%20741.229863,350.341296%20C741.229863,351.620052%20742.266485,352.656675%20743.545242,352.656675%20C744.823999,352.656675%20745.860621,351.620052%20745.860621,350.341296%20C745.860621,349.062539%20744.823999,348.025917%20743.545242,348.025917%20Z%20M744.666769,342.383049%20L744.754011,342.390268%20C748.228261,342.914384%20750.972652,345.659076%20751.496359,349.133416%20C751.549346,349.484937%20751.307336,349.812855%20750.955816,349.865842%20C750.604295,349.918828%20750.276377,349.676819%20750.22339,349.325298%20C749.783861,346.409405%20747.477795,344.103086%20744.561978,343.663214%20C744.210463,343.610185%20743.968493,343.282238%20744.021521,342.930724%20C744.065712,342.637796%20744.300818,342.420939%20744.581381,342.387478%20L744.666769,342.383049%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",g8e="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='18px'%20viewBox='0%200%2017%2018'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e环形图%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='数据大屏备份-2'%20transform='translate(-735.000000,%20-341.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M743.063004,342.931102%20C743.116316,343.282573%20742.87461,343.610715%20742.523139,343.664027%20C739.245615,344.16117%20736.791283,346.991546%20736.791283,350.341222%20C736.791283,353.692268%20739.24752,356.523394%20742.526687,357.018996%20C742.861546,357.069587%20743.201677,357.095181%20743.545242,357.095181%20C743.887612,357.095181%20744.226635,357.069756%20744.560421,357.019508%20C747.477621,356.580105%20749.784771,354.272574%20750.223659,351.355292%20C750.276546,351.003757%20750.604395,350.761654%20750.95593,350.81454%20C751.307466,350.867427%20751.549569,351.195276%20751.496682,351.546811%20C750.973739,355.022805%20748.228057,357.768941%20744.752113,358.292505%20C744.354903,358.352301%20743.951823,358.382531%20743.545242,358.382531%20C743.137244,358.382531%20742.732829,358.3521%20742.334339,358.291894%20C738.427868,357.701483%20735.503933,354.331278%20735.503933,350.341222%20C735.503933,346.352789%20738.425598,342.983478%20742.330079,342.391237%20C742.68155,342.337925%20743.009692,342.579631%20743.063004,342.931102%20Z%20M743.545242,346.738567%20C745.534982,346.738567%20747.14797,348.351556%20747.14797,350.341296%20C747.14797,352.331036%20745.534982,353.944024%20743.545242,353.944024%20C741.555502,353.944024%20739.942514,352.331036%20739.942514,350.341296%20C739.942514,348.351556%20741.555502,346.738567%20743.545242,346.738567%20Z%20M743.545242,348.025917%20C742.266485,348.025917%20741.229863,349.062539%20741.229863,350.341296%20C741.229863,351.620052%20742.266485,352.656675%20743.545242,352.656675%20C744.823999,352.656675%20745.860621,351.620052%20745.860621,350.341296%20C745.860621,349.062539%20744.823999,348.025917%20743.545242,348.025917%20Z%20M744.666769,342.383049%20L744.754011,342.390268%20C748.228261,342.914384%20750.972652,345.659076%20751.496359,349.133416%20C751.549346,349.484937%20751.307336,349.812855%20750.955816,349.865842%20C750.604295,349.918828%20750.276377,349.676819%20750.22339,349.325298%20C749.783861,346.409405%20747.477795,344.103086%20744.561978,343.663214%20C744.210463,343.610185%20743.968493,343.282238%20744.021521,342.930724%20C744.065712,342.637796%20744.300818,342.420939%20744.581381,342.387478%20L744.666769,342.383049%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",v8e={class:"echart-body flex flex-wrap"},m8e=["onClick"],y8e={DEFAULT_ICON:p8e,ACTIVE_ICON:g8e,NAME_CN:"环形进度",NAME_EN:"progressCircle",ORDER:3},b8e={titleColor:{value:"#111",type:"color",label:"标题颜色"},textColor:{value:"#111",type:"color",label:"字体颜色"},bgColor:{value:"#fff",type:"color",label:"背景颜色"},barColor:{value:"#ebeef5",type:"color",label:"条形背景颜色"},radiusSize:{value:8,type:"number",label:"圆角大小"},textSize:{value:14,type:"number",label:"字体大小"},labelWidth:{value:48,type:"number",label:"标签宽度"},barWidth:{value:16,type:"number",label:"条形宽度"},diameter:{value:70,type:"number",label:"圆环直径"},position:{value:"outer",type:"radio",option:[{value:"outer",label:"外部"},{value:"inner",label:"内部"}],label:"标签位置"},type:{value:"value",type:"radio",option:[{value:"value",label:"数值"},{value:"rate",label:"占比"}],label:"数据类型"},isHideTitle:{value:!1,type:"checkbox",label:"是否隐藏标题"}},ZI=[{name:"参数一",fv:"",max:200,color:"#f56c6c",maxType:"value"},{name:"参数二",fv:"",max:200,color:"#5cb87a",maxType:"value"}],yg=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:y8e,OPTIONS:b8e,DATA:ZI,PARAMS:["name","fv","object_id","color","maxType","max"],SOURCE:["mosaic"],COMMON:{useAlias:!1,multiObject:!1,source:"mosaic"}},{__name:"progressCircle",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"}},setup(t){const e=l.ref(l.inject("sharedWorker",null)),r=l.ref(l.inject("ws",null));""+Math.random().toString(16).substring(4,12);const n=t,a=l.ref({}),i=()=>{var h,v,m,g,y,_,b,C,w,S,x,E,L,T,k,A,D,M,O,R,P,B,z,$;const{conf:p}=n;a.value={bgColor:((v=(h=p==null?void 0:p.options)==null?void 0:h.bgColor)==null?void 0:v.value)||"#73bff9",barColor:((g=(m=p==null?void 0:p.options)==null?void 0:m.barColor)==null?void 0:g.value)||"#ebeef5",titleColor:((_=(y=p==null?void 0:p.options)==null?void 0:y.titleColor)==null?void 0:_.value)||"#111",textColor:((C=(b=p==null?void 0:p.options)==null?void 0:b.textColor)==null?void 0:C.value)||"#111",textSize:((S=(w=p==null?void 0:p.options)==null?void 0:w.textSize)==null?void 0:S.value)||14,radiusSize:((E=(x=p==null?void 0:p.options)==null?void 0:x.radiusSize)==null?void 0:E.value)??4,labelWidth:((T=(L=p==null?void 0:p.options)==null?void 0:L.labelWidth)==null?void 0:T.value)??80,barWidth:((A=(k=p==null?void 0:p.options)==null?void 0:k.barWidth)==null?void 0:A.value)??16,diameter:((M=(D=p==null?void 0:p.options)==null?void 0:D.diameter)==null?void 0:M.value)??70,position:((R=(O=p==null?void 0:p.options)==null?void 0:O.position)==null?void 0:R.value)??"outer",type:((B=(P=p==null?void 0:p.options)==null?void 0:P.type)==null?void 0:B.value)??"value",isHideTitle:(($=(z=p==null?void 0:p.options)==null?void 0:z.isHideTitle)==null?void 0:$.value)||!1},p.data=p.data.length?p.data:ZI},o=(p,h)=>a.value.type==="value"?h==null?void 0:h.value:p+"%",s=()=>{},c=p=>{const{data:h}=n.conf;p.history.forEach((v,m)=>{if(h[m].maxType==="value"){let g=h[m].max;h[m].value=v[0][h[m].fv],h[m].percent=g==0?0:Number((h[m].value/g*100).toFixed(2))}else{let g=v[0][h[m].max]||0;h[m].value=v[0][h[m].fv],h[m].percent=g==0?0:Number((h[m].value/g*100).toFixed(2))}})},u=p=>{const{data:h,common:v}=n.conf,m=v.source||"mosaic";let g="";v.multiObject||(g=Be(v,v.useAlias,n.uid)),h.forEach((y,_)=>{if(v.multiObject&&(g=Be(y,v.useAlias,n.uid)),y.maxType==="value"){y.value=p[g][m].data[y.fv]||0;let b=y.max;y.percent=b==0?0:Number((y.value/b*100).toFixed(2))}else{y.value=p[g][m].data[y.fv]||0;let b=p[g][m].data[y.max]||0;y.percent=b==0?0:Number((y.value/b*100).toFixed(2))}})},d=async()=>{try{const h=await new Ft().getHistoryData(n,"progressCircle");c(h)}catch(p){console.error("获取历史数据时出错:",p)}finally{const p=t1(n.conf,n.uid,"progressCircle");e.value&&e.value.port.postMessage({request:p,type:"send"}),r.value&&r.value.send(JSON.stringify(p))}},f=dt(i,200);return l.watch(()=>n.conf,()=>{n.mode==="edit"&&f()},{deep:!0}),l.watchEffect(()=>{n.conf.socketData&&u(n.conf.socketData)}),l.onMounted(()=>{i(),n.mode==="preview"&&d()}),l.onBeforeUnmount(()=>{}),(p,h)=>{const v=JO;return l.openBlock(),l.createElementBlock("div",{class:"component-container",style:l.normalizeStyle({background:a.value.bgColor,borderRadius:`${a.value.radiusSize}px`})},[a.value.isHideTitle?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:"echart-title",style:l.normalizeStyle({color:a.value.titleColor})},l.toDisplayString(t.conf.name),5)),l.createElementVNode("div",v8e,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.conf.data,(m,g)=>(l.openBlock(),l.createElementBlock("div",{key:g,class:l.normalizeClass(["circle-item",{pointer:t.conf.control,checked:m.checked}]),onClick:y=>s()},[l.createElementVNode("div",null,[l.createVNode(v,{percentage:m.percent,type:"circle",style:l.normalizeStyle({"--progress-bg-color":a.value.barColor}),color:m.color,strokeWidth:a.value.barWidth,width:a.value.diameter},{default:l.withCtx(({percentage:y})=>[l.createElementVNode("div",{style:l.normalizeStyle({fontSize:a.value.textSize+"px",color:a.value.textColor})},l.toDisplayString(o(y,m)),5),a.value.position==="inner"?(l.openBlock(),l.createElementBlock("div",{key:0,class:"mt-[6px]",style:l.normalizeStyle({fontSize:a.value.textSize+"px",color:a.value.textColor})},l.toDisplayString(m.name),5)):l.createCommentVNode("",!0)]),_:2},1032,["percentage","style","color","strokeWidth","width"]),a.value.position==="outer"?(l.openBlock(),l.createElementBlock("div",{key:0,class:"label",style:l.normalizeStyle({fontSize:a.value.textSize+"px",color:a.value.textColor})},l.toDisplayString(m.name),5)):l.createCommentVNode("",!0)])],10,m8e))),128))]),l.renderSlot(p.$slots,"default",{},void 0,!0)],4)}}}),[["__scopeId","data-v-68c04580"]])},Symbol.toStringTag,{value:"Module"})),bg="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e指数%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-200.000000,%20-190.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M200.943678,190.71954%20C201.269547,190.71954%20201.538858,190.961695%20201.58148,191.275875%20L201.587356,191.363218%20L201.587356,205.432184%20L215.656322,205.432184%20C215.982191,205.432184%20216.251502,205.674339%20216.294124,205.988519%20L216.3,206.075862%20C216.3,206.401731%20216.057845,206.671042%20215.743665,206.713664%20L215.656322,206.71954%20L200.943678,206.71954%20C200.617809,206.71954%20200.348498,206.477385%20200.305876,206.163205%20L200.3,206.075862%20L200.3,191.363218%20C200.3,191.007725%20200.588185,190.71954%20200.943678,190.71954%20Z%20M214.918413,193.225818%20C215.261007,193.320711%20215.461809,193.675365%20215.366916,194.017959%20L215.241964,194.443136%20L215.077476,194.968786%20L214.887386,195.54365%20C214.501018,196.681921%20214.057593,197.820681%20213.562374,198.887198%20C213.006976,200.083321%20212.419691,201.114919%20211.799181,201.935755%20C210.885328,203.144638%20209.74407,203.888053%20208.397333,204.262185%20C207.57944,204.489401%20206.87195,204.566339%20205.837183,204.569731%20L205.290501,204.565653%20L204.345977,204.54888%20C203.990483,204.54888%20203.702299,204.260695%20203.702299,203.905202%20C203.702299,203.549708%20203.990483,203.261523%20204.345977,203.261523%20L204.685423,203.265194%20L205.315575,203.278514%20L205.847238,203.282107%20C206.762539,203.277856%20207.373616,203.21047%20208.052747,203.021803%20C209.135394,202.721037%20210.034477,202.135375%20210.772236,201.159437%20C211.330473,200.420978%20211.874745,199.464933%20212.394751,198.345033%20C212.868532,197.324686%20213.295761,196.22752%20213.668341,195.129865%20L213.851787,194.57512%20L214.070477,193.867845%20L214.126271,193.674321%20C214.221164,193.331726%20214.575818,193.130925%20214.918413,193.225818%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",_g="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e指数%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-200.000000,%20-190.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M200.943678,190.71954%20C201.269547,190.71954%20201.538858,190.961695%20201.58148,191.275875%20L201.587356,191.363218%20L201.587356,205.432184%20L215.656322,205.432184%20C215.982191,205.432184%20216.251502,205.674339%20216.294124,205.988519%20L216.3,206.075862%20C216.3,206.401731%20216.057845,206.671042%20215.743665,206.713664%20L215.656322,206.71954%20L200.943678,206.71954%20C200.617809,206.71954%20200.348498,206.477385%20200.305876,206.163205%20L200.3,206.075862%20L200.3,191.363218%20C200.3,191.007725%20200.588185,190.71954%20200.943678,190.71954%20Z%20M214.918413,193.225818%20C215.261007,193.320711%20215.461809,193.675365%20215.366916,194.017959%20L215.241964,194.443136%20L215.077476,194.968786%20L214.887386,195.54365%20C214.501018,196.681921%20214.057593,197.820681%20213.562374,198.887198%20C213.006976,200.083321%20212.419691,201.114919%20211.799181,201.935755%20C210.885328,203.144638%20209.74407,203.888053%20208.397333,204.262185%20C207.57944,204.489401%20206.87195,204.566339%20205.837183,204.569731%20L205.290501,204.565653%20L204.345977,204.54888%20C203.990483,204.54888%20203.702299,204.260695%20203.702299,203.905202%20C203.702299,203.549708%20203.990483,203.261523%20204.345977,203.261523%20L204.685423,203.265194%20L205.315575,203.278514%20L205.847238,203.282107%20C206.762539,203.277856%20207.373616,203.21047%20208.052747,203.021803%20C209.135394,202.721037%20210.034477,202.135375%20210.772236,201.159437%20C211.330473,200.420978%20211.874745,199.464933%20212.394751,198.345033%20C212.868532,197.324686%20213.295761,196.22752%20213.668341,195.129865%20L213.851787,194.57512%20L214.070477,193.867845%20L214.126271,193.674321%20C214.221164,193.331726%20214.575818,193.130925%20214.918413,193.225818%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",_8e={DEFAULT_ICON:bg,ACTIVE_ICON:_g,NAME_CN:"分级曲线",NAME_EN:"Grading Curve",ORDER:2},S8e={titleColor:{value:"#111",type:"color",label:"标题颜色"},bgColor:{value:"#fff",type:"color",label:"背景颜色"},textColor:{value:"#111",type:"color",label:"文字颜色"},lineColor:{value:"#d64545",type:"color",label:"标线颜色"},radiusSize:{value:8,type:"number",label:"圆角大小"},textSize:{value:12,type:"number",label:"字体大小"},top:{value:20,type:"number",label:"上边距"},bottom:{value:40,type:"number",label:"下边距"},left:{value:20,type:"number",label:"左边距"},right:{value:30,type:"number",label:"右边距"},points:{value:100,type:"number",label:"显示数量"},isSmooth:{value:!1,type:"checkbox",label:"是否圆滑"},isHideTitle:{value:!1,type:"checkbox",label:"是否隐藏标题"}},KI=[{name:"参数一",fv:"",object_id:""}],Sg=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:_8e,OPTIONS:S8e,DATA:KI,PARAMS:["name","fv","object_id","colorArea"],SOURCE:["index","deviation","stability","balance","increment","risk"],COLOR_AREA:[{color:"#00ff00",value:50}],ITEMS:1,COMMON:{useAlias:!1,null:{type:"0",value:""},source:"index"}},{__name:"aqiIndass",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"}},setup(t){Rt([W0,w1,Z0,m2,x1,g1,V1,v1,ji]);const e="aqi_"+Math.random().toString(16).substring(4,12);let r=null,n=null;const a=t,i=l.ref({}),o=()=>{var v,m,g,y,_,b,C,w,S,x,E,L,T,k,A,D;const{conf:h}=a;i.value={bgColor:((m=(v=h==null?void 0:h.options)==null?void 0:v.bgColor)==null?void 0:m.value)||"#73bff9",titleColor:((y=(g=h==null?void 0:h.options)==null?void 0:g.titleColor)==null?void 0:y.value)||"#111",textColor:((b=(_=h==null?void 0:h.options)==null?void 0:_.textColor)==null?void 0:b.value)||"#111",lineColor:((w=(C=h==null?void 0:h.options)==null?void 0:C.lineColor)==null?void 0:w.value)||"#d64545",radiusSize:((x=(S=h==null?void 0:h.options)==null?void 0:S.radiusSize)==null?void 0:x.value)??4,textSize:((L=(E=h==null?void 0:h.options)==null?void 0:E.textSize)==null?void 0:L.value)??12,isHideTitle:((k=(T=h==null?void 0:h.options)==null?void 0:T.isHideTitle)==null?void 0:k.value)||!1,points:((D=(A=h==null?void 0:h.options)==null?void 0:A.points)==null?void 0:D.value)||10},h.data=h.data.length?h.data:KI,l.nextTick(()=>{let M=document.querySelector("#"+e);M&&(r||(r=s1(M),n=Qt({strategy:"scroll"}),n.listenTo(M,function(){r.resize()})),r.setOption(s(),!0))})},s=()=>{var m,g,y,_,b,C,w,S;const{conf:h}=a;var v={tooltip:{trigger:"axis"},legend:{show:!0,data:[(h==null?void 0:h.data[0].name)||""],right:20,top:0,textStyle:{color:i.value.textColor,fontSize:i.value.textSize},itemStyle:{color:i.value.lineColor},lineStyle:{color:i.value.lineColor}},grid:{top:((g=(m=h==null?void 0:h.options)==null?void 0:m.top)==null?void 0:g.value)||30,bottom:((_=(y=h==null?void 0:h.options)==null?void 0:y.bottom)==null?void 0:_.value)||20,left:((C=(b=h==null?void 0:h.options)==null?void 0:b.left)==null?void 0:C.value)||40,right:((S=(w=h==null?void 0:h.options)==null?void 0:w.right)==null?void 0:S.value)||20,containLabel:!0},dataZoom:[{type:"slider",start:80,end:100,height:20,bottom:15,left:60,right:60,handleStyle:{color:"#fff",shadowBlur:2,shadowOffsetX:2,shadowOffsetY:2},textStyle:{color:i.value.textColor},borderStyle:{color:"#000"},throttle:200,labelFormatter:function(x,E){if(!/^[1-9]\d{3}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}$/.test(E))return E;let L=E.split(" ");return L[0]+`
|
|
272
272
|
`+L[1]}},{type:"inside",start:0,end:20}],visualMap:{show:!1,pieces:c(),outOfRange:{color:"#999"}},xAxis:[{type:"category",boundaryGap:!1,data:Wn(i.value.points,a.mode),axisLabel:{formatter:function(x,E){if(!/^[1-9]\d{3}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}$/.test(x))return x;let L=x.split(" ");return L[0]+`
|
|
273
273
|
`+L[1]},color:i.value.textColor,fontSize:i.value.textSize}}],yAxis:{type:"value",boundaryGap:[0,"20%"],splitLine:{lineStyle:{type:"dashed",color:"#e5e5e5"}},axisLabel:{formatter:"{value}",color:i.value.textColor,fontSize:i.value.textSize},axisLine:{lineStyle:{color:i.value.textColor}},splitNumber:4},series:u()};return v},c=()=>{const{area:h}=a.conf;let v=h.filter(g=>g.value!==null&&g.value!==void 0);v.sort((g,y)=>g.value-y.value);let m=[];return v.forEach((g,y)=>{y===0?m.push({gt:0,lte:g.value,color:g.color}):m.push({gt:v[y-1].value,lte:g.value,color:g.color})}),m},u=()=>{var y;const{options:h,data:v,area:m}=a.conf,g=m.filter(_=>_.value!==null&&_.value!==void 0);return g.sort((_,b)=>_.value-b.value),[{name:v[0].name||"",type:"line",smooth:(y=h==null?void 0:h.isSmooth)==null?void 0:y.value,sampling:"average",markLine:{silent:!1,lineStyle:{color:i.value.lineColor},label:{color:i.value.textColor},data:g.map(_=>({yAxis:_.value}))},data:Yn({num:i.value.points,max:200,min:0,mode:a.mode})}]},d=h=>{const{data:v}=a.conf;let m=Rr(h,a,"history"),g=[],y=[];if(!m.history.length)return;m.history.forEach((b,C)=>{y.push([]),y[C]=b.map(w=>w[v[C].fv]??"--"),g[C]=b.map(w=>w.time)});let _=r.getOption();_.xAxis[0].data=g[0],_.series.forEach((b,C)=>{b.data=y[C]}),r.setOption(_)},f=async()=>{try{const v=await new Ft().getHistoryData(a,"aqiIndass");v.history=v.history.map(m=>m.map(g=>{var y;return{[g.project_uid]:((y=g.data)==null?void 0:y["#_data"])??g.data.Dev,time:g.created}})),d(v)}catch(h){console.error("获取历史数据时出错:",h)}},p=dt(o,200);return l.watch(()=>a.conf,()=>{a.mode==="edit"&&p()},{deep:!0}),l.onMounted(()=>{o(),a.mode==="preview"&&f()}),l.watchEffect(()=>{a.conf.socketData&&setSocketData(a.conf.socketData)}),l.onBeforeUnmount(()=>{n&&n.uninstall(document.querySelector("#"+e)),r&&r.clear(),r&&p1(r),r=null}),(h,v)=>(l.openBlock(),l.createElementBlock("div",{class:"component-container",style:l.normalizeStyle({background:i.value.bgColor,borderRadius:`${i.value.radiusSize}px`})},[i.value.isHideTitle?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:"echart-title",style:l.normalizeStyle({color:i.value.titleColor})},l.toDisplayString(t.conf.name),5)),l.createElementVNode("div",{class:"echart-body"},[l.createElementVNode("div",{class:"w-full h-full",id:e})]),l.renderSlot(h.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-ed261309"]])},Symbol.toStringTag,{value:"Module"})),Cg={collect:{uid:"编号",name:"名称",object_id:"对象编号",description:"描述",created:"时间",collector:"操作人"},object:{uid:"编号",name:"名称",customer_name:"所属客户",mapping_name:"关联映射表",model:"型号",tag:"标签",province:"省份",city:"城市",description:"描述",created:"创建时间"},child:{uid:"编号",name:"名称",customer_name:"所属客户",mapping_name:"关联映射表",model:"型号",tag:"标签",province:"省份",city:"城市",description:"描述",created:"创建时间"},retainer:{uid:"编号",label_cn:"名称",retainer_name:"状态",object_name:"对象名称",category:"类型",statis_result:"统计结果",opened_at:"开始时间",close_at:"结束时间",elapsed:"持续时间"},timer:{uid:"编号",rule_name:"规则名称",object_name:"对象名称",object_id:"对象编号",handle_name_list:"处理人",last_handle_time:"处理时间",countdown:"维保倒计时",period:"维保周期",description:"描述",created:"时间"},eigen:{key:"特征标识",key_type:"特征类型",start:"开始点",end:"结束点",report:"详情",created:"创建时间"}},p6={collect:{block_mapping:"collect",action:"get_collect_value_list_without_object"},object:{block_mapping:"object",action:"app_get_object_list"},child:{block_mapping:"object",action:"app_get_object_list"},retainer:{block_mapping:"retainer",action:"get_retainer_result_list"},timer:{block_mapping:"mixtimer",action:"get_timer_list"}},wg="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='17px'%20viewBox='0%200%2016%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e表格%3c/title%3e%3cg%20id='页面-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='轮廓化'%20transform='translate(-102.000000,%20-723.000000)'%20fill='%23333333'%20fill-rule='nonzero'%3e%3cpath%20d='M116.62069,724%20C117.382471,724%20118,724.617536%20118,725.37931%20L118,725.37931%20L118,737.149425%20C118,737.911209%20117.382473,738.528736%20116.62069,738.528736%20L116.62069,738.528736%20L103.37931,738.528736%20C102.617536,738.528736%20102,737.911206%20102,737.149425%20L102,737.149425%20L102,725.37931%20C102,724.617538%20102.617538,724%20103.37931,724%20L103.37931,724%20Z%20M106.965,734.114%20L103.287,734.114%20L103.287356,737.149425%20C103.287356,737.187518%20103.310511,737.220196%20103.343515,737.234154%20L103.37931,737.241379%20L106.965,737.241%20L106.965,734.114%20Z%20M111.747,734.114%20L108.252,734.114%20L108.252,737.241%20L111.747,737.241%20L111.747,734.114%20Z%20M116.712,734.114%20L113.034,734.114%20L113.034,737.241%20L116.62069,737.241379%20C116.658787,737.241379%20116.691462,737.218228%20116.705419,737.185223%20L116.712644,737.149425%20L116.712,734.114%20Z%20M106.965,729.701%20L103.287,729.701%20L103.287,732.827%20L106.965,732.827%20L106.965,729.701%20Z%20M111.747,729.701%20L108.252,729.701%20L108.252,732.827%20L111.747,732.827%20L111.747,729.701%20Z%20M116.712,729.701%20L113.034,729.701%20L113.034,732.827%20L116.712,732.827%20L116.712,729.701%20Z%20M116.62069,725.287356%20L103.37931,725.287356%20C103.328525,725.287356%20103.287356,725.328525%20103.287356,725.37931%20L103.287356,725.37931%20L103.287,728.413%20L116.712,728.413%20L116.712644,725.37931%20L116.705418,725.343515%20C116.69146,725.310511%20116.658783,725.287356%20116.62069,725.287356%20L116.62069,725.287356%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",xg="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='17px'%20height='17px'%20viewBox='0%200%2017%2017'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e表格%3c/title%3e%3cg%20id='基础规范'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='显示板图标-轮廓化备份'%20transform='translate(-101.000000,%20-450.000000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%3e%3cpath%20d='M116.27069,451.035632%20C117.032471,451.035632%20117.65,451.653168%20117.65,452.414943%20L117.65,452.414943%20L117.65,464.185057%20C117.65,464.946841%20117.032473,465.564368%20116.27069,465.564368%20L116.27069,465.564368%20L103.02931,465.564368%20C102.267536,465.564368%20101.65,464.946838%20101.65,464.185057%20L101.65,464.185057%20L101.65,452.414943%20C101.65,451.65317%20102.267538,451.035632%20103.02931,451.035632%20L103.02931,451.035632%20Z%20M106.615,461.149632%20L102.937,461.149632%20L102.937356,464.185057%20C102.937356,464.223151%20102.960511,464.255828%20102.993515,464.269786%20L103.02931,464.277011%20L106.615,464.276632%20L106.615,461.149632%20Z%20M111.397,461.149632%20L107.902,461.149632%20L107.902,464.276632%20L111.397,464.276632%20L111.397,461.149632%20Z%20M116.362,461.149632%20L112.684,461.149632%20L112.684,464.276632%20L116.27069,464.277011%20C116.308787,464.277011%20116.341462,464.25386%20116.355419,464.220855%20L116.362644,464.185057%20L116.362,461.149632%20Z%20M106.615,456.736632%20L102.937,456.736632%20L102.937,459.862632%20L106.615,459.862632%20L106.615,456.736632%20Z%20M111.397,456.736632%20L107.902,456.736632%20L107.902,459.862632%20L111.397,459.862632%20L111.397,456.736632%20Z%20M116.362,456.736632%20L112.684,456.736632%20L112.684,459.862632%20L116.362,459.862632%20L116.362,456.736632%20Z%20M116.27069,452.322989%20L103.02931,452.322989%20C102.978525,452.322989%20102.937356,452.364158%20102.937356,452.414943%20L102.937356,452.414943%20L102.937,455.448632%20L116.362,455.448632%20L116.362644,452.414943%20L116.355418,452.379148%20C116.34146,452.346143%20116.308783,452.322989%20116.27069,452.322989%20L116.27069,452.322989%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e",C8e={class:"echart-body"},w8e={key:0,class:"table"},x8e={class:"table-title"},E8e={key:0,class:"table-body"},T8e=["innerHTML"],L8e={key:2,class:"pagination px-[16px]"},Eg=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:{DEFAULT_ICON:wg,ACTIVE_ICON:xg,NAME_CN:"特征列表",NAME_EN:"Eigen List",ORDER:7},OPTIONS:{bgColor:{value:"#fff",type:"color",label:"背景颜色"},titleColor:{value:"#999",type:"color",label:"标题颜色"},fontColor:{value:"#333",type:"color",label:"字体颜色"},borderColor:{value:"#e5e7eb",type:"color",label:"边框颜色"},titleSize:{value:14,type:"number",label:"标题字体"},valueSize:{value:12,type:"number",label:"内容字体"},radiusSize:{value:8,type:"number",label:"圆角大小"},points:{value:10,type:"number",label:"每页条数"},isHideTitle:{value:!1,type:"checkbox",label:"是否隐藏标题"}},COMMON:{useAlias:!1,multiObject:!1,hideMultiObject:!0,gridType:"eigen",project_id:"",rows:[],rowWidth:[],types:["eigen"]}},{__name:"grdIndass",props:{conf:{type:Object,default:()=>({data:[]})},mode:{type:String,default:"edit"},uid:{type:String,default:""}},setup(t){const e=t,r=l.ref({}),n=l.reactive({current:1,pageSize:10,total:0}),a=l.ref([]),i=l.computed(()=>{var v;const h=((v=e.conf.common)==null?void 0:v.gridType)||"eigen";return Cg[h]}),o={decrease:"降值",increase:"增值",min:"最小值",max:"最大值",count:"个数"},s=()=>{var v,m,g,y,_,b,C,w,S,x;const{options:h}=e.conf;r.value={bgColor:((v=h==null?void 0:h.bgColor)==null?void 0:v.value)||"#fff",titleColor:((m=h==null?void 0:h.titleColor)==null?void 0:m.value)||"#999",fontColor:((g=h==null?void 0:h.fontColor)==null?void 0:g.value)||"#333",borderColor:((y=h==null?void 0:h.borderColor)==null?void 0:y.value)||"#e5e7eb",titleSize:((_=h==null?void 0:h.titleSize)==null?void 0:_.value)||12,valueSize:((b=h==null?void 0:h.valueSize)==null?void 0:b.value)||12,radiusSize:((C=h==null?void 0:h.radiusSize)==null?void 0:C.value)??4,points:((w=h==null?void 0:h.points)==null?void 0:w.value)??10,isHideTitle:((S=h==null?void 0:h.isHideTitle)==null?void 0:S.value)??!1},n.pageSize=((x=h==null?void 0:h.points)==null?void 0:x.value)??10},c=()=>{const{common:h}=e.conf;let v={page_index:n.current,page_size:r.value.points,where_and:[["project_uid","=",h.project_id]],block_mapping:"eigen",action:"get_adaps_report_list"},m=Be(h,h.useAlias,e.uid);m&&v.where_and.push(["object_id","=",m]),ot.platform(g=>{a.value=[],g.result.data.forEach(y=>{JSON.parse(y.detail).Main.forEach(b=>{a.value.push({key:b.key,key_type:b.key_type,start:y.start,end:y.end,report:u(b.report),created:y.created})})}),n.total=g.result.total_records},v)},u=h=>{let v={};for(let g in h[0])o[g]&&(v[o[g]]=h[0][g].toFixed(3));let m=[];for(let g in v)m.push(g+": "+v[g]);return m.join("<br>")},d=h=>{n.current=h,c()},f=async()=>{c()},p=dt(s,200);return l.watch(()=>e.conf,()=>{e.mode==="edit"&&p()},{deep:!0}),l.onMounted(()=>{s(),e.mode==="preview"&&f()}),(h,v)=>{var g,y;const m=V3;return l.openBlock(),l.createElementBlock("div",{class:"grd-wrap",style:l.normalizeStyle({backgroundColor:r.value.bgColor,borderRadius:`${r.value.radiusSize}px`})},[r.value.isHideTitle?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:"echart-title",style:l.normalizeStyle({color:r.value.titleColor,fontSize:`${r.value.titleSize}px`})},[l.createElementVNode("div",null,l.toDisplayString(t.conf.name),1)],4)),l.createElementVNode("div",C8e,[(y=(g=t.conf)==null?void 0:g.common)!=null&&y.rows?(l.openBlock(),l.createElementBlock("div",w8e,[l.createElementVNode("div",x8e,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.conf.common.rows,(_,b)=>(l.openBlock(),l.createElementBlock("div",{class:"th",key:b,style:l.normalizeStyle({width:t.conf.common.rowWidth[b]+"%",borderColor:r.value.borderColor,fontSize:`${r.value.titleSize}px`,color:r.value.fontColor})},l.toDisplayString(i.value[_]),5))),128))]),a.value.length?(l.openBlock(),l.createElementBlock("div",E8e,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(a.value,(_,b)=>(l.openBlock(),l.createElementBlock("div",{class:"tr",key:b},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.conf.common.rows,(C,w)=>(l.openBlock(),l.createElementBlock("div",{class:"td",key:w,style:l.normalizeStyle({width:t.conf.common.rowWidth[w]+"%",borderColor:r.value.borderColor,fontSize:`${r.value.valueSize}px`,color:r.value.fontColor}),innerHTML:_[C]},null,12,T8e))),128))]))),128))])):(l.openBlock(),l.createElementBlock("div",{key:1,style:l.normalizeStyle({fontSize:`${r.value.valueSize}px`,color:r.value.fontColor})},v[0]||(v[0]=[l.createElementVNode("div",{class:"mt-[8px] text-center"},"暂无数据",-1)]),4)),n.total>n.pageSize?(l.openBlock(),l.createElementBlock("div",L8e,[l.createVNode(m,{"current-page":n.current,onCurrentChange:d,total:n.total,"page-size":n.pageSize,style:l.normalizeStyle({fontSize:`${r.value.valueSize}px`,color:r.value.fontColor})},null,8,["current-page","total","page-size","style"])])):l.createCommentVNode("",!0)])):l.createCommentVNode("",!0)]),l.renderSlot(h.$slots,"default",{},void 0,!0)],4)}}}),[["__scopeId","data-v-b3f20f10"]])},Symbol.toStringTag,{value:"Module"})),k8e={DEFAULT_ICON:HI,ACTIVE_ICON:GI,NAME_CN:"等级评定",NAME_EN:"Grade",ORDER:4},A8e={titleColor:{value:"#111",type:"color",label:"标题颜色"},textColor:{value:"#111",type:"color",label:"字体颜色"},bgColor:{value:"#fff",type:"color",label:"背景颜色"},radiusSize:{value:8,type:"number",label:"圆角大小"},textSize:{value:12,type:"number",label:"字体大小"},isHideTitle:{value:!1,type:"checkbox",label:"是否隐藏标题"},hideSmall:{value:!1,type:"checkbox",label:"是否隐藏小区间"}},qI=[{name:"参数一",object_id:"",fv:"",max:100,min:0}],Tg=Object.freeze(Object.defineProperty({__proto__:null,default:Ke(Object.assign({DEFAULT:k8e,OPTIONS:A8e,DATA:qI,PARAMS:["name","fv","object_id","max","min"],SOURCE:["index","deviation","stability","balance","increment","risk"],GRADE:[{color:"#5c7bd9",range:[0,100],name:"等级一"}],ITEMS:1,COMMON:{useAlias:!1,source:"index"}},{__name:"grg",props:{conf:{type:Object,default:()=>({data:[]})},uid:{type:String,default:""},mode:{type:String,default:"edit"}},setup(t){Rt([w1,x1,g1,V1,v1,gT]);const e="bar_"+Math.random().toString(16).substring(4,12);let r=null,n=null;const a=t,i=l.ref({}),o=()=>{var h,v,m,g,y,_,b,C,w,S,x,E,L,T,k,A,D,M;const{conf:p}=a;i.value={bgColor:((v=(h=p==null?void 0:p.options)==null?void 0:h.bgColor)==null?void 0:v.value)||"#73bff9",titleColor:((g=(m=p==null?void 0:p.options)==null?void 0:m.titleColor)==null?void 0:g.value)||"#111",textColor:((_=(y=p==null?void 0:p.options)==null?void 0:y.textColor)==null?void 0:_.value)||"#111",radiusSize:((C=(b=p==null?void 0:p.options)==null?void 0:b.radiusSize)==null?void 0:C.value)??4,textSize:((S=(w=p==null?void 0:p.options)==null?void 0:w.textSize)==null?void 0:S.value)??12,max:((E=(x=p==null?void 0:p.options)==null?void 0:x.max)==null?void 0:E.value)??100,min:((T=(L=p==null?void 0:p.options)==null?void 0:L.min)==null?void 0:T.value)??0,isHideTitle:((A=(k=p==null?void 0:p.options)==null?void 0:k.isHideTitle)==null?void 0:A.value)||!1,hideSmall:((M=(D=p==null?void 0:p.options)==null?void 0:D.hideSmall)==null?void 0:M.value)||!1},p.data=p.data.length?p.data:qI,l.nextTick(()=>{let O=document.querySelector("#"+e);O&&(r||(r=s1(O),n=Qt({strategy:"scroll"}),n.listenTo(O,function(){r.resize()})),r.setOption(s(),!0))})},s=()=>{const{data:p,grade:h}=a.conf;let v=p[0]||{};var m={series:[{type:"gauge",startAngle:180,endAngle:0,center:["50%","85%"],radius:"120%",min:v.min,max:v.max,splitNumber:100,axisLine:{lineStyle:{width:12,color:c()}},pointer:{icon:"path://M12.8,0.7l12,40.1H0.7L12.8,0.7z",length:"24%",width:4,offsetCenter:[0,"-60%"],itemStyle:{color:"auto"}},axisTick:{show:!1},splitLine:{show:!1},axisLabel:{color:i.value.textColor,fontSize:i.value.textSize,distance:-36,rotate:"tangential",formatter:function(g){let y=v.max-v.min,_="";for(let b=0;b<h.length;b++){let C=h[b];if(((g-v.min)/y).toFixed(2)===((C.range[1]+C.range[0])/y/2).toFixed(2)){(C.range[1]+C.range[0])/y/2<.1&&i.value.hideSmall?_="":_=C.name;break}}return _}},title:{offsetCenter:[0,"-5%"],fontSize:i.value.textSize,color:i.value.textColor},detail:{fontSize:16,offsetCenter:[0,"-25%"],color:"inherit"},data:[{value:Yn({num:1,max:200,min:0,mode:a.mode})[0]||0,name:v.name}]}]};return m},c=()=>{const{grade:p,data:h}=a.conf,{max:v,min:m}=h[0];let g=[];return p.forEach(y=>{let _={color:y.color},b=v-m;_.step=Math.abs((y.range[1]-m)/b),g.push([_.step,_.color])}),g},u=p=>{const{data:h}=a.conf;if(!p.history.length)return;let v=r.getOption();p.history.forEach(m=>{v.series[0].data[0].value=m[0][h[0].fv]}),r.setOption(v)},d=async()=>{try{const h=await new Ft().getHistoryData(a,"grg");h.history=h.history.map(v=>v.map(m=>{var g;return{[m.project_uid]:((g=m.data)==null?void 0:g["#_data"])??m.data.Dev,time:m.created}})),u(h)}catch(p){console.error("获取历史数据时出错:",p)}},f=dt(o,200);return l.watch(()=>a.conf,()=>{a.mode==="edit"&&f()},{deep:!0}),l.watchEffect(()=>{a.conf.socketData&&setSocketData(a.conf.socketData)}),l.onMounted(()=>{o(),a.mode==="preview"&&d()}),l.onBeforeUnmount(()=>{n&&n.uninstall(document.querySelector("#"+e)),r&&r.clear(),r&&p1(r),r=null}),(p,h)=>(l.openBlock(),l.createElementBlock("div",{class:"component-container",style:l.normalizeStyle({background:i.value.bgColor,borderRadius:`${i.value.radiusSize}px`})},[i.value.isHideTitle?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:"echart-title",style:l.normalizeStyle({color:i.value.titleColor})},l.toDisplayString(t.conf.name),5)),l.createElementVNode("div",{class:"echart-body"},[l.createElementVNode("div",{class:"w-full h-full",id:e})]),l.renderSlot(p.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-6b85c297"]])},Symbol.toStringTag,{value:"Module"}));var Ma=Ai.CMD;function Ss(t,e){return Math.abs(t-e)<1e-5}function Lg(t){var e=t.data,r=t.len(),n=[],a,i=0,o=0,s=0,c=0;function u(D,M){a&&a.length>2&&n.push(a),a=[D,M]}function d(D,M,O,R){Ss(D,O)&&Ss(M,R)||a.push(D,M,O,R,O,R)}function f(D,M,O,R,P,B){var z=Math.abs(M-D),$=Math.tan(z/4)*4/3,j=M<D?-1:1,Z=Math.cos(D),W=Math.sin(D),K=Math.cos(M),ee=Math.sin(M),Q=Z*P+O,ae=W*B+R,re=K*P+O,ne=ee*B+R,ie=P*$*j,se=B*$*j;a.push(Q-ie*W,ae+se*Z,re+ie*ee,ne-se*K,re,ne)}for(var p,h,v,m,g=0;g<r;){var y=e[g++],_=g===1;switch(_&&(i=e[g],o=e[g+1],s=i,c=o,(y===Ma.L||y===Ma.C||y===Ma.Q)&&(a=[s,c])),y){case Ma.M:i=s=e[g++],o=c=e[g++],u(s,c);break;case Ma.L:p=e[g++],h=e[g++],d(i,o,p,h),i=p,o=h;break;case Ma.C:a.push(e[g++],e[g++],e[g++],e[g++],i=e[g++],o=e[g++]);break;case Ma.Q:p=e[g++],h=e[g++],v=e[g++],m=e[g++],a.push(i+2/3*(p-i),o+2/3*(h-o),v+2/3*(p-v),m+2/3*(h-m),v,m),i=v,o=m;break;case Ma.A:var b=e[g++],C=e[g++],w=e[g++],S=e[g++],x=e[g++],E=e[g++]+x;g+=1;var L=!e[g++];p=Math.cos(x)*w+b,h=Math.sin(x)*S+C,_?(s=p,c=h,u(s,c)):d(i,o,p,h),i=Math.cos(E)*w+b,o=Math.sin(E)*S+C;for(var T=(L?-1:1)*Math.PI/2,k=x;L?k>E:k<E;k+=T){var A=L?Math.max(k+T,E):Math.min(k+T,E);f(k,A,b,C,w,S)}break;case Ma.R:s=i=e[g++],c=o=e[g++],p=s+e[g++],h=c+e[g++],u(p,c),d(p,c,p,h),d(p,h,s,h),d(s,h,s,c),d(s,c,p,c);break;case Ma.Z:a&&d(i,o,s,c),i=s,o=c;break}}return a&&a.length>2&&n.push(a),n}function kg(t,e,r,n,a,i,o,s,c,u){if(Ss(t,r)&&Ss(e,n)&&Ss(a,o)&&Ss(i,s)){c.push(o,s);return}var d=2/u,f=d*d,p=o-t,h=s-e,v=Math.sqrt(p*p+h*h);p/=v,h/=v;var m=r-t,g=n-e,y=a-o,_=i-s,b=m*m+g*g,C=y*y+_*_;if(b<f&&C<f){c.push(o,s);return}var w=p*m+h*g,S=-p*y-h*_,x=b-w*w,E=C-S*S;if(x<f&&w>=0&&E<f&&S>=0){c.push(o,s);return}var L=[],T=[];xi(t,r,a,o,.5,L),xi(e,n,i,s,.5,T),kg(L[0],T[0],L[1],T[1],L[2],T[2],L[3],T[3],c,u),kg(L[4],T[4],L[5],T[5],L[6],T[6],L[7],T[7],c,u)}function D8e(t,e){var r=Lg(t),n=[];e=e||1;for(var a=0;a<r.length;a++){var i=r[a],o=[],s=i[0],c=i[1];o.push(s,c);for(var u=2;u<i.length;){var d=i[u++],f=i[u++],p=i[u++],h=i[u++],v=i[u++],m=i[u++];kg(s,c,d,f,p,h,v,m,o,e),s=v,c=m}n.push(o)}return n}function XI(t,e,r){var n=t[e],a=t[1-e],i=Math.abs(n/a),o=Math.ceil(Math.sqrt(i*r)),s=Math.floor(r/o);s===0&&(s=1,o=r);for(var c=[],u=0;u<o;u++)c.push(s);var d=o*s,f=r-d;if(f>0)for(var u=0;u<f;u++)c[u%o]+=1;return c}function JI(t,e,r){for(var n=t.r0,a=t.r,i=t.startAngle,o=t.endAngle,s=Math.abs(o-i),c=s*a,u=a-n,d=c>Math.abs(u),f=XI([c,u],d?0:1,e),p=(d?s:u)/f.length,h=0;h<f.length;h++)for(var v=(d?u:s)/f[h],m=0;m<f[h];m++){var g={};d?(g.startAngle=i+p*h,g.endAngle=i+p*(h+1),g.r0=n+v*m,g.r=n+v*(m+1)):(g.startAngle=i+v*m,g.endAngle=i+v*(m+1),g.r0=n+p*h,g.r=n+p*(h+1)),g.clockwise=t.clockwise,g.cx=t.cx,g.cy=t.cy,r.push(g)}}function M8e(t,e,r){for(var n=t.width,a=t.height,i=n>a,o=XI([n,a],i?0:1,e),s=i?"width":"height",c=i?"height":"width",u=i?"x":"y",d=i?"y":"x",f=t[s]/o.length,p=0;p<o.length;p++)for(var h=t[c]/o[p],v=0;v<o[p];v++){var m={};m[u]=p*f,m[d]=v*h,m[s]=f,m[c]=h,m.x+=t.x,m.y+=t.y,r.push(m)}}function QI(t,e,r,n){return t*n-r*e}function O8e(t,e,r,n,a,i,o,s){var c=r-t,u=n-e,d=o-a,f=s-i,p=QI(d,f,c,u);if(Math.abs(p)<1e-6)return null;var h=t-a,v=e-i,m=QI(h,v,d,f)/p;return m<0||m>1?null:new st(m*c+t,m*u+e)}function I8e(t,e,r){var n=new st;st.sub(n,r,e),n.normalize();var a=new st;st.sub(a,t,e);var i=a.dot(n);return i}function Cs(t,e){var r=t[t.length-1];r&&r[0]===e[0]&&r[1]===e[1]||t.push(e)}function N8e(t,e,r){for(var n=t.length,a=[],i=0;i<n;i++){var o=t[i],s=t[(i+1)%n],c=O8e(o[0],o[1],s[0],s[1],e.x,e.y,r.x,r.y);c&&a.push({projPt:I8e(c,e,r),pt:c,idx:i})}if(a.length<2)return[{points:t},{points:t}];a.sort(function(g,y){return g.projPt-y.projPt});var u=a[0],d=a[a.length-1];if(d.idx<u.idx){var f=u;u=d,d=f}for(var p=[u.pt.x,u.pt.y],h=[d.pt.x,d.pt.y],v=[p],m=[h],i=u.idx+1;i<=d.idx;i++)Cs(v,t[i].slice());Cs(v,h),Cs(v,p);for(var i=d.idx+1;i<=u.idx+n;i++)Cs(m,t[i%n].slice());return Cs(m,p),Cs(m,h),[{points:v},{points:m}]}function eN(t){var e=t.points,r=[],n=[];Bb(e,r,n);var a=new Et(r[0],r[1],n[0]-r[0],n[1]-r[1]),i=a.width,o=a.height,s=a.x,c=a.y,u=new st,d=new st;return i>o?(u.x=d.x=s+i/2,u.y=c,d.y=c+o):(u.y=d.y=c+o/2,u.x=s,d.x=s+i),N8e(e,u,d)}function g6(t,e,r,n){if(r===1)n.push(e);else{var a=Math.floor(r/2),i=t(e);g6(t,i[0],a,n),g6(t,i[1],r-a,n)}return n}function R8e(t,e){for(var r=[],n=0;n<e;n++)r.push(Yc(t));return r}function P8e(t,e){e.setStyle(t.style),e.z=t.z,e.z2=t.z2,e.zlevel=t.zlevel}function B8e(t){for(var e=[],r=0;r<t.length;)e.push([t[r++],t[r++]]);return e}function F8e(t,e){var r=[],n=t.shape,a;switch(t.type){case"rect":M8e(n,e,r),a=$t;break;case"sector":JI(n,e,r),a=on;break;case"circle":JI({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},e,r),a=on;break;default:var i=t.getComputedTransform(),o=i?Math.sqrt(Math.max(i[0]*i[0]+i[1]*i[1],i[2]*i[2]+i[3]*i[3])):1,s=be(D8e(t.getUpdatedPathProxy(),o),function(y){return B8e(y)}),c=s.length;if(c===0)g6(eN,{points:s[0]},e,r);else if(c===e)for(var u=0;u<c;u++)r.push({points:s[u]});else{var d=0,f=be(s,function(y){var _=[],b=[];Bb(y,_,b);var C=(b[1]-_[1])*(b[0]-_[0]);return d+=C,{poly:y,area:C}});f.sort(function(y,_){return _.area-y.area});for(var p=e,u=0;u<c;u++){var h=f[u];if(p<=0)break;var v=u===c-1?p:Math.ceil(h.area/d*e);v<0||(g6(eN,{points:h.poly},v,r),p-=v)}}a=Ur;break}if(!a)return R8e(t,e);for(var m=[],u=0;u<r.length;u++){var g=new a;g.setShape(r[u]),P8e(t,g),m.push(g)}return m}function z8e(t,e){var r=t.length,n=e.length;if(r===n)return[t,e];for(var a=[],i=[],o=r<n?t:e,s=Math.min(r,n),c=Math.abs(n-r)/6,u=(s-2)/6,d=Math.ceil(c/u)+1,f=[o[0],o[1]],p=c,h=2;h<s;){var v=o[h-2],m=o[h-1],g=o[h++],y=o[h++],_=o[h++],b=o[h++],C=o[h++],w=o[h++];if(p<=0){f.push(g,y,_,b,C,w);continue}for(var S=Math.min(p,d-1)+1,x=1;x<=S;x++){var E=x/S;xi(v,g,_,C,E,a),xi(m,y,b,w,E,i),v=a[3],m=i[3],f.push(a[1],i[1],a[2],i[2],v,m),g=a[5],y=i[5],_=a[6],b=i[6]}p-=S-1}return o===t?[f,e]:[t,f]}function tN(t,e){for(var r=t.length,n=t[r-2],a=t[r-1],i=[],o=0;o<e.length;)i[o++]=n,i[o++]=a;return i}function V8e(t,e){for(var r,n,a,i=[],o=[],s=0;s<Math.max(t.length,e.length);s++){var c=t[s],u=e[s],d=void 0,f=void 0;c?u?(r=z8e(c,u),d=r[0],f=r[1],n=d,a=f):(f=tN(a||c,c),d=c):(d=tN(n||u,u),f=u),i.push(d),o.push(f)}return[i,o]}function rN(t){for(var e=0,r=0,n=0,a=t.length,i=0,o=a-2;i<a;o=i,i+=2){var s=t[o],c=t[o+1],u=t[i],d=t[i+1],f=s*d-u*c;e+=f,r+=(s+u)*f,n+=(c+d)*f}return e===0?[t[0]||0,t[1]||0]:[r/e/3,n/e/3,e]}function $8e(t,e,r,n){for(var a=(t.length-2)/6,i=1/0,o=0,s=t.length,c=s-2,u=0;u<a;u++){for(var d=u*6,f=0,p=0;p<s;p+=2){var h=p===0?d:(d+p-2)%c+2,v=t[h]-r[0],m=t[h+1]-r[1],g=e[p]-n[0],y=e[p+1]-n[1],_=g-v,b=y-m;f+=_*_+b*b}f<i&&(i=f,o=u)}return o}function U8e(t){for(var e=[],r=t.length,n=0;n<r;n+=2)e[n]=t[r-n-2],e[n+1]=t[r-n-1];return e}function j8e(t,e,r,n){for(var a=[],i,o=0;o<t.length;o++){var s=t[o],c=e[o],u=rN(s),d=rN(c);i==null&&(i=u[2]<0!=d[2]<0);var f=[],p=[],h=0,v=1/0,m=[],g=s.length;i&&(s=U8e(s));for(var y=$8e(s,c,u,d)*6,_=g-2,b=0;b<_;b+=2){var C=(y+b)%_+2;f[b+2]=s[C]-u[0],f[b+3]=s[C+1]-u[1]}f[0]=s[y]-u[0],f[1]=s[y+1]-u[1];for(var w=n/r,S=-n/2;S<=n/2;S+=w){for(var x=Math.sin(S),E=Math.cos(S),L=0,b=0;b<s.length;b+=2){var T=f[b],k=f[b+1],A=c[b]-d[0],D=c[b+1]-d[1],M=A*E-D*x,O=A*x+D*E;m[b]=M,m[b+1]=O;var R=M-T,P=O-k;L+=R*R+P*P}if(L<v){v=L,h=S;for(var B=0;B<m.length;B++)p[B]=m[B]}}a.push({from:f,to:p,fromCp:u,toCp:d,rotation:-h})}return a}function v6(t){return t.__isCombineMorphing}var nN="__mOriginal_";function m6(t,e,r){var n=nN+e,a=t[n]||t[e];t[n]||(t[n]=t[e]);var i=r.replace,o=r.after,s=r.before;t[e]=function(){var c=arguments,u;return s&&s.apply(this,c),i?u=i.apply(this,c):u=a.apply(this,c),o&&o.apply(this,c),u}}function W3(t,e){var r=nN+e;t[r]&&(t[e]=t[r],t[r]=null)}function aN(t,e){for(var r=0;r<t.length;r++)for(var n=t[r],a=0;a<n.length;){var i=n[a],o=n[a+1];n[a++]=e[0]*i+e[2]*o+e[4],n[a++]=e[1]*i+e[3]*o+e[5]}}function iN(t,e){var r=t.getUpdatedPathProxy(),n=e.getUpdatedPathProxy(),a=V8e(Lg(r),Lg(n)),i=a[0],o=a[1],s=t.getComputedTransform(),c=e.getComputedTransform();function u(){this.transform=null}s&&aN(i,s),c&&aN(o,c),m6(e,"updateTransform",{replace:u}),e.transform=null;var d=j8e(i,o,10,Math.PI),f=[];m6(e,"buildPath",{replace:function(p){for(var h=e.__morphT,v=1-h,m=[],g=0;g<d.length;g++){var y=d[g],_=y.from,b=y.to,C=y.rotation*h,w=y.fromCp,S=y.toCp,x=Math.sin(C),E=Math.cos(C);x4(m,w,S,h);for(var L=0;L<_.length;L+=2){var T=_[L],k=_[L+1],A=b[L],D=b[L+1],M=T*v+A*h,O=k*v+D*h;f[L]=M*E-O*x+m[0],f[L+1]=M*x+O*E+m[1]}var R=f[0],P=f[1];p.moveTo(R,P);for(var L=2;L<_.length;){var A=f[L++],D=f[L++],B=f[L++],z=f[L++],$=f[L++],j=f[L++];R===A&&P===D&&B===$&&z===j?p.lineTo($,j):p.bezierCurveTo(A,D,B,z,$,j),R=$,P=j}}}})}function Ag(t,e,r){if(!t||!e)return e;var n=r.done,a=r.during;iN(t,e),e.__morphT=0;function i(){W3(e,"buildPath"),W3(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},nt({during:function(o){e.dirtyShape(),a&&a(o)},done:function(){i(),n&&n()}},r)),e}function H8e(t,e,r,n,a,i){var o=16;t=a===r?0:Math.round(32767*(t-r)/(a-r)),e=i===n?0:Math.round(32767*(e-n)/(i-n));for(var s=0,c,u=(1<<o)/2;u>0;u/=2){var d=0,f=0;(t&u)>0&&(d=1),(e&u)>0&&(f=1),s+=u*u*(3*d^f),f===0&&(d===1&&(t=u-1-t,e=u-1-e),c=t,t=e,e=c)}return s}function y6(t){var e=1/0,r=1/0,n=-1/0,a=-1/0,i=be(t,function(s){var c=s.getBoundingRect(),u=s.getComputedTransform(),d=c.x+c.width/2+(u?u[4]:0),f=c.y+c.height/2+(u?u[5]:0);return e=Math.min(d,e),r=Math.min(f,r),n=Math.max(d,n),a=Math.max(f,a),[d,f]}),o=be(i,function(s,c){return{cp:s,z:H8e(s[0],s[1],e,r,n,a),path:t[c]}});return o.sort(function(s,c){return s.z-c.z}).map(function(s){return s.path})}function oN(t){return F8e(t.path,t.count)}function Dg(){return{fromIndividuals:[],toIndividuals:[],count:0}}function G8e(t,e,r){var n=[];function a(w){for(var S=0;S<w.length;S++){var x=w[S];v6(x)?a(x.childrenRef()):x instanceof Tt&&n.push(x)}}a(t);var i=n.length;if(!i)return Dg();var o=r.dividePath||oN,s=o({path:e,count:i});if(s.length!==i)return console.error("Invalid morphing: unmatched splitted path"),Dg();n=y6(n),s=y6(s);for(var c=r.done,u=r.during,d=r.individualDelay,f=new Ti,p=0;p<i;p++){var h=n[p],v=s[p];v.parent=e,v.copyTransform(f),d||iN(h,v)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function m(w){for(var S=0;S<s.length;S++)s[S].addSelfToZr(w)}m6(e,"addSelfToZr",{after:function(w){m(w)}}),m6(e,"removeSelfFromZr",{after:function(w){for(var S=0;S<s.length;S++)s[S].removeSelfFromZr(w)}});function g(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,W3(e,"addSelfToZr"),W3(e,"removeSelfFromZr")}var y=s.length;if(d)for(var _=y,b=function(){_--,_===0&&(g(),c&&c())},p=0;p<y;p++){var C=d?nt({delay:(r.delay||0)+d(p,y,n[p],s[p]),done:b},r):r;Ag(n[p],s[p],C)}else e.__morphT=0,e.animateTo({__morphT:1},nt({during:function(w){for(var S=0;S<y;S++){var x=s[S];x.__morphT=e.__morphT,x.dirtyShape()}u&&u(w)},done:function(){g();for(var w=0;w<t.length;w++)W3(t[w],"updateTransform");c&&c()}},r));return e.__zr&&m(e.__zr),{fromIndividuals:n,toIndividuals:s,count:y}}function W8e(t,e,r){var n=e.length,a=[],i=r.dividePath||oN;function o(h){for(var v=0;v<h.length;v++){var m=h[v];v6(m)?o(m.childrenRef()):m instanceof Tt&&a.push(m)}}if(v6(t)){o(t.childrenRef());var s=a.length;if(s<n)for(var c=0,u=s;u<n;u++)a.push(Yc(a[c++%s]));a.length=n}else{a=i({path:t,count:n});for(var d=t.getComputedTransform(),u=0;u<a.length;u++)a[u].setLocalTransform(d);if(a.length!==n)return console.error("Invalid morphing: unmatched splitted path"),Dg()}a=y6(a),e=y6(e);for(var f=r.individualDelay,u=0;u<n;u++){var p=f?nt({delay:(r.delay||0)+f(u,n,a[u],e[u])},r):r;Ag(a[u],e[u],p)}return{fromIndividuals:a,toIndividuals:e,count:e.length}}function sN(t){return me(t[0])}function lN(t,e){for(var r=[],n=t.length,a=0;a<n;a++)r.push({one:t[a],many:[]});for(var a=0;a<e.length;a++){var i=e[a].length,o=void 0;for(o=0;o<i;o++)r[o%n].many.push(e[a][o])}for(var s=0,a=n-1;a>=0;a--)if(!r[a].many.length){var c=r[s].many;if(c.length<=1)if(s)s=0;else return r;var i=c.length,u=Math.ceil(i/2);r[a].many=c.slice(u,i),r[s].many=c.slice(0,u),s++}return r}var Y8e={clone:function(t){for(var e=[],r=1-Math.pow(1-t.path.style.opacity,1/t.count),n=0;n<t.count;n++){var a=Yc(t.path);a.setStyle("opacity",r),e.push(a)}return e},split:null};function Mg(t,e,r,n,a,i){if(!t.length||!e.length)return;var o=f0("update",n,a);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),c=Object.assign({setToFinal:!0},o),u,d;sN(t)&&(u=t,d=e),sN(e)&&(u=e,d=t);function f(y,_,b,C,w){var S=y.many,x=y.one;if(S.length===1&&!w){var E=_?S[0]:x,L=_?x:S[0];if(v6(E))f({many:[E],one:L},!0,b,C,!0);else{var T=s?nt({delay:s(b,C)},c):c;Ag(E,L,T),i(E,L,E,L,T)}}else for(var k=nt({dividePath:Y8e[r],individualDelay:s&&function(P,B,z,$){return s(P+b,C)}},c),A=_?G8e(S,x,k):W8e(x,S,k),D=A.fromIndividuals,M=A.toIndividuals,O=D.length,R=0;R<O;R++){var T=s?nt({delay:s(R,O)},c):c;i(D[R],M[R],_?S[R]:y.one,_?y.one:S[R],T)}}for(var p=u?u===t:t.length>e.length,h=u?lN(d,u):lN(p?e:t,[p?t:e]),v=0,m=0;m<h.length;m++)v+=h[m].many.length;for(var g=0,m=0;m<h.length;m++)f(h[m],p,g,v),g+=h[m].many.length}function B2(t){if(!t)return[];if(me(t)){for(var e=[],r=0;r<t.length;r++)e.push(B2(t[r]));return e}var n=[];return t.traverse(function(a){a instanceof Tt&&!a.disableMorphing&&!a.invisible&&!a.ignore&&n.push(a)}),n}var cN=1e4,Z8e=0,uN=1,dN=2,K8e=jt();function q8e(t,e){for(var r=t.dimensions,n=0;n<r.length;n++){var a=t.getDimensionInfo(r[n]);if(a&&a.otherDims[e]===0)return r[n]}}function X8e(t,e,r){var n=t.getDimensionInfo(r),a=n&&n.ordinalMeta;if(n){var i=t.get(n.name,e);return a&&a.categories[i]||i+""}}function fN(t,e,r,n){var a=n?"itemChildGroupId":"itemGroupId",i=q8e(t,a);if(i){var o=X8e(t,e,i);return o}var s=t.getRawDataItem(e),c=n?"childGroupId":"groupId";if(s&&s[c])return s[c]+"";if(!n)return r||t.getId(e)}function hN(t){var e=[];return G(t,function(r){var n=r.data,a=r.dataGroupId;if(n.count()>cN){process.env.NODE_ENV!=="production"&&o1("Universal transition is disabled on large data > 10k.");return}for(var i=n.getIndices(),o=0;o<i.length;o++)e.push({data:n,groupId:fN(n,o,a,!1),childGroupId:fN(n,o,a,!0),divide:r.divide,dataIndex:o})}),e}function Og(t,e,r){t.traverse(function(n){n instanceof Tt&&_1(n,{style:{opacity:0}},e,{dataIndex:r,isFrom:!0})})}function Ig(t){if(t.parent){var e=t.getComputedTransform();t.setLocalTransform(e),t.parent.remove(t)}}function ws(t){t.stopAnimation(),t.isGroup&&t.traverse(function(e){e.stopAnimation()})}function J8e(t,e,r){var n=f0("update",r,e);n&&t.traverse(function(a){if(a instanceof ca){var i=p$(a);i&&a.animateFrom({style:i},n)}})}function Q8e(t,e){var r=t.length;if(r!==e.length)return!1;for(var n=0;n<r;n++){var a=t[n],i=e[n];if(a.data.getId(a.dataIndex)!==i.data.getId(i.dataIndex))return!1}return!0}function pN(t,e,r){var n=hN(t),a=hN(e);function i(b,C,w,S,x){(w||b)&&C.animateFrom({style:w&&w!==b?ve(ve({},w.style),b.style):b.style},x)}var o=!1,s=Z8e,c=Ne(),u=Ne();n.forEach(function(b){b.groupId&&c.set(b.groupId,!0),b.childGroupId&&u.set(b.childGroupId,!0)});for(var d=0;d<a.length;d++){var f=a[d].groupId;if(u.get(f)){s=uN;break}var p=a[d].childGroupId;if(p&&c.get(p)){s=dN;break}}function h(b,C){return function(w){var S=w.data,x=w.dataIndex;return C?S.getId(x):b?s===uN?w.childGroupId:w.groupId:s===dN?w.childGroupId:w.groupId}}var v=Q8e(n,a),m={};if(!v)for(var d=0;d<a.length;d++){var g=a[d],y=g.data.getItemGraphicEl(g.dataIndex);y&&(m[y.id]=!0)}function _(b,C){var w=n[C],S=a[b],x=S.data.hostModel,E=w.data.getItemGraphicEl(w.dataIndex),L=S.data.getItemGraphicEl(S.dataIndex);if(E===L){L&&J8e(L,S.dataIndex,x);return}E&&m[E.id]||L&&(ws(L),E?(ws(E),Ig(E),o=!0,Mg(B2(E),B2(L),S.divide,x,b,i)):Og(L,x,b))}new A0(n,a,h(!0,v),h(!1,v),null,"multiple").update(_).updateManyToOne(function(b,C){var w=a[b],S=w.data,x=S.hostModel,E=S.getItemGraphicEl(w.dataIndex),L=i1(be(C,function(T){return n[T].data.getItemGraphicEl(n[T].dataIndex)}),function(T){return T&&T!==E&&!m[T.id]});E&&(ws(E),L.length?(G(L,function(T){ws(T),Ig(T)}),o=!0,Mg(B2(L),B2(E),w.divide,x,b,i)):Og(E,x,w.dataIndex))}).updateOneToMany(function(b,C){var w=n[C],S=w.data.getItemGraphicEl(w.dataIndex);if(!(S&&m[S.id])){var x=i1(be(b,function(L){return a[L].data.getItemGraphicEl(a[L].dataIndex)}),function(L){return L&&L!==S}),E=a[b[0]].data.hostModel;x.length&&(G(x,function(L){return ws(L)}),S?(ws(S),Ig(S),o=!0,Mg(B2(S),B2(x),w.divide,E,b[0],i)):G(x,function(L){return Og(L,E,b[0])}))}}).updateManyToMany(function(b,C){new A0(C,b,function(w){return n[w].data.getId(n[w].dataIndex)},function(w){return a[w].data.getId(a[w].dataIndex)}).update(function(w,S){_(b[w],C[S])}).execute()}).execute(),o&&G(e,function(b){var C=b.data,w=C.hostModel,S=w&&r.getViewOfSeriesModel(w),x=f0("update",w,0);S&&w.isAnimationEnabled()&&x&&x.duration>0&&S.group.traverse(function(E){E instanceof Tt&&!E.animators.length&&E.animateFrom({style:{opacity:0}},x)})})}function gN(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function vN(t){return me(t)?t.sort().join(","):t}function lo(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function e6e(t,e){var r=Ne(),n=Ne(),a=Ne();G(t.oldSeries,function(o,s){var c=t.oldDataGroupIds[s],u=t.oldData[s],d=gN(o),f=vN(d);n.set(f,{dataGroupId:c,data:u}),me(d)&&G(d,function(p){a.set(p,{key:f,dataGroupId:c,data:u})})});function i(o){r.get(o)&&o1("Duplicated seriesKey in universalTransition "+o)}return G(e.updatedSeries,function(o){if(o.isUniversalTransitionEnabled()&&o.isAnimationEnabled()){var s=o.get("dataGroupId"),c=o.getData(),u=gN(o),d=vN(u),f=n.get(d);if(f)process.env.NODE_ENV!=="production"&&i(d),r.set(d,{oldSeries:[{dataGroupId:f.dataGroupId,divide:lo(f.data),data:f.data}],newSeries:[{dataGroupId:s,divide:lo(c),data:c}]});else if(me(u)){process.env.NODE_ENV!=="production"&&i(d);var p=[];G(u,function(m){var g=n.get(m);g.data&&p.push({dataGroupId:g.dataGroupId,divide:lo(g.data),data:g.data})}),p.length&&r.set(d,{oldSeries:p,newSeries:[{dataGroupId:s,data:c,divide:lo(c)}]})}else{var h=a.get(u);if(h){var v=r.get(h.key);v||(v={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:lo(h.data)}],newSeries:[]},r.set(h.key,v)),v.newSeries.push({dataGroupId:s,data:c,divide:lo(c)})}}}}),r}function mN(t,e){for(var r=0;r<t.length;r++){var n=e.seriesIndex!=null&&e.seriesIndex===t[r].seriesIndex||e.seriesId!=null&&e.seriesId===t[r].id;if(n)return r}}function t6e(t,e,r,n){var a=[],i=[];G(n1(t.from),function(o){var s=mN(e.oldSeries,o);s>=0&&a.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:lo(e.oldData[s]),groupIdDim:o.dimension})}),G(n1(t.to),function(o){var s=mN(r.updatedSeries,o);if(s>=0){var c=r.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:c,divide:lo(c),groupIdDim:o.dimension})}}),a.length>0&&i.length>0&&pN(a,i,n)}function Ng(t){t.registerUpdateLifecycle("series:beforeupdate",function(e,r,n){G(n1(n.seriesTransition),function(a){G(n1(a.to),function(i){for(var o=n.updatedSeries,s=0;s<o.length;s++)(i.seriesIndex!=null&&i.seriesIndex===o[s].seriesIndex||i.seriesId!=null&&i.seriesId===o[s].id)&&(o[s][X9]=!0)})})}),t.registerUpdateLifecycle("series:transition",function(e,r,n){var a=K8e(r);if(a.oldSeries&&n.updatedSeries&&n.optionChanged){var i=n.seriesTransition;if(i)G(n1(i),function(h){t6e(h,a,n,r)});else{var o=e6e(a,n);G(o.keys(),function(h){var v=o.get(h);pN(v.oldSeries,v.newSeries,r)})}G(n.updatedSeries,function(h){h[X9]&&(h[X9]=!1)})}for(var s=e.getSeries(),c=a.oldSeries=[],u=a.oldDataGroupIds=[],d=a.oldData=[],f=0;f<s.length;f++){var p=s[f].getData();p.count()<cN&&(c.push(s[f]),u.push(s[f].get("dataGroupId")),d.push(p))}})}/*!
|
|
274
274
|
* decimal.js v10.5.0
|