|
|
const e="222222222222",a="rect-node-radius",t="圆角矩形",n='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1681453142728" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3193" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M885.333333 938.666667H138.666667a53.393333 53.393333 0 0 1-53.333334-53.333334V138.666667a53.393333 53.393333 0 0 1 53.333334-53.333334h746.666666a53.393333 53.393333 0 0 1 53.333334 53.333334v746.666666a53.393333 53.393333 0 0 1-53.333334 53.333334zM138.666667 128a10.666667 10.666667 0 0 0-10.666667 10.666667v746.666666a10.666667 10.666667 0 0 0 10.666667 10.666667h746.666666a10.666667 10.666667 0 0 0 10.666667-10.666667V138.666667a10.666667 10.666667 0 0 0-10.666667-10.666667z" fill="#5C5C66" p-id="3194"></path></svg>',l="svg",i="基础",o="基础图形",r=!1,u=!0,d="基础图形",s=`{"id":"u:270584784ce1","type":"page","name":"page1","asideResizor":false,"style":{"boxShadow":" 0px 0px 0px 0px transparent"},"pullRefresh":{"disabled":true},"body":[{"type":"tabs","name":"tab","tabs":[{"title":"样式","icon":"fa fa-th-large","body":[{"type":"form","title":"","name":"basicPropForm","body":[{"type":"input-text","label":"名称","name":"nodeAlias","id":"u:6b126f0520cb","size":"full","mode":"horizontal","inputControlClassName":"w-100","className":"m-b"},{"type":"input-text","label":"ID ","name":"id","id":"u:6232710ac003","size":"full","mode":"horizontal","inputControlClassName":"w-100","className":"m-b"},{"type":"grid","id":"u:1954dc15dd5b","className":"m-b","columns":[{"body":[{"type":"input-number","label":"宽度","name":"width","keyboard":true,"id":"u:656efdb758ad","step":1,"suffix":"px","placeholder":"组件宽度","size":"full","mode":"horizontal","className":"m-b","value":100,"labelClassName":"w-8","labelAlign":"left","precision":2,"inputClassName":"w-full"}],"id":"u:4274c47a4ef5","md":6},{"body":[{"type":"input-number","label":"高度","name":"height","keyboard":true,"id":"u:1ed6dcd98c1a","step":1,"suffix":"px","placeholder":"组件高度","size":"full","mode":"horizontal","className":"m-b","value":100,"labelAlign":"left","labelClassName":"w-8","precision":2,"inputClassName":"w-full"}],"id":"u:3e9d1e71a69f","md":6}]},{"type":"grid","id":"u:c605398a724c","className":"m-b","columns":[{"body":[{"type":"input-number","label":"X 轴","name":"x","keyboard":true,"id":"u:dcc0c21d16f6","step":1,"suffix":"px","placeholder":"组件左边距","size":"full","mode":"horizontal","className":"m-b","value":200,"labelAlign":"left","precision":2,"inputClassName":"w-full","labelClassName":"w-8"}],"id":"u:14cc19d6ffb0","md":6},{"body":[{"type":"input-number","label":"Y 轴","name":"y","keyboard":true,"id":"u:cd6fdff9ca88","step":1,"suffix":"px","placeholder":"组件上边距","size":"full","mode":"horizontal","className":"m-b","value":200,"labelAlign":"left","precision":2,"inputClassName":"w-full","labelClassName":"w-8"}],"id":"u:4931801ca9b8","md":6}]},{"type":"grid","id":"u:a332a7bf83c1","className":"m-b","columns":[{"body":[{"type":"input-number","label":"旋转","name":"rotation","id":"u:f6a2dbb518f9","placeholder":"组件旋转角度","mode":"horizontal","size":"full","className":"","keyboard":true,"step":1,"suffix":"deg","value":0,"labelAlign":"left","inputClassName":"w-full"}],"id":"u:646cd98b7955","md":6},{"body":[{"type":"input-number","label":"透明","name":"opacity","id":"u:cf80f59d8d42","placeholder":"组件透明度","mode":"horizontal","size":"full","className":"m-b","keyboard":true,"step":0,"suffix":"","value":1,"inputClassName":"w-full","precision":2}],"id":"u:51ddf54ac749","md":6}],"gap":""},{"type":"grid","columns":[{"body":[{"type":"input-color","label":"填充","name":"fill","id":"u:0d19ed3e2bdc","placeholder":"","mode":"horizontal","size":"full","className":"m-b","format":"rgba","inputClassName":"w-full"}],"id":"u:facc5c90e990","md":6},{"body":[{"type":"input-color","label":"描边","name":"strokeColor
"nodes": [ { "id": "22222", "type": "rect-node-radius", "x": 200, "y": 200, "text": { "value": "", "x": 200, "y": 200 }, "properties": { "id": "22222", "width": 100, "height": 100, "x": 200, "y": 200, "rotation": 0, "opacity": 1, "strokeWidth": 1, "showDefaultValue": false, "showUnit": false, "fontSize": 12, "nodeAlias": "圆角矩形", "dynamic": { "normalData": { "dataPoint": "", "compareType": "", "conditionVariables": [], "defaultValue": "[]", "unit": "" }, "uiData": { "dataPoint": "", "compareType": "", "conditionVariables": [], "defaultValue": "[]" }, "animationData": { "animationCombo": [ { "dataPoint": "", "min": "", "max": "", "animationName": "旋转", "defaultValue": "[]" } ] }, "hiddenData": { "hiddenCombo": [ { "dataPoint": "", "min": "", "max": "", "showOrHiddenName": "隐藏", "defaultValue": "[]" } ] } } } } ]}`,javascript:`\rclass RectNodeRadiusView extends RectResize.view { }\rclass RectNodeRadiusModel extends RectResize.model {\r realValue = ''\r\r initNodeData(data) {\r super.initNodeData(data);\r const { properties } = this;\r this.width = properties.width || 150;\r this.height = properties.height || 80;\r window.nodeEventsListeners(this);\r this.text.editable = false; // 不允许文本被编辑\r
this.radius = 20\r }\r\r setAttributes() {\r const { x, y, properties } = this;\r const { textHorizontalMove = 0, textVerticalMove = 0, dynamic } = properties;\r const { normalData } = dynamic || {};\r\r let textValue = properties.content || '';\r if (normalData) {\r const { defaultValue } = normalData || {}\r const realValue = window.resolveScadaNewValue(defaultValue)\r this.realValue = realValue\r textValue += realValue\r }\r this.text = {\r ...this.text,\r x: x + textHorizontalMove,\r y: y + textVerticalMove,\r value: textValue,\r }\r }\r\r getNodeStyle() {\r const style = super.getNodeStyle();\r const { properties } = this;\r\r style.fill = properties.fill || style.fill;\r\r const { uiData } = properties.dynamic;\r if (uiData) {\r const realValue = window.resolveScadaNewValue(uiData.defaultValue)\r uiData.conditionVariables.forEach((item) => {\r if (item.type === 'rangeColor') {\r let from = item.from;\r let to = item.to;\r if (item.from >= item.to) {\r from = item.to;\r to = item.from;\r }\r if (item.color && Number(realValue) >= from && Number(realValue) <= to) {\r style.fill = item.color\r }\r }\r })\r }\r\r style.stroke = properties.strokeColor || style.stroke;\r style.strokeWidth = properties.strokeWidth || style.strokeWidth;\r style.opacity = properties.opacity || 1;\r return style;\r }\r\r getTextStyle() {\r const style = super.getTextStyle();\r const { properties } = this;\r style.color = properties.fontColor || style.color;\r style.fontSize = properties.fontSize || style.fontSize;\r style.fontFamily = properties.fontFamily || style.fontFamily;\r style.textAlign = properties.fontAlign || style.textAlign;\r style.lineHeight = properties.lineHeight || style.lineHeight;\r const fontStyle = properties.fontStyle;\r if(fontStyle) {\r if (fontStyle.includes('bold')) {\r style.fontWeight = 'bolder';\r }\r if(fontStyle.includes('italic')) {\r style.fontStyle = 'italic'\r }\r if (fontStyle.includes('underline,line-through')) {\r style.textDecoration = 'underline line-through'\r } else if (fontStyle.includes('line-through,underline')) {\r style.textDecoration = 'line-through underline'\r } else if (fontStyle.includes('underline')) {\r style.textDecoration = 'underline'\r } else if (fontStyle.includes('line-through')) {\r style.textDecoration = 'line-through'\r }\r }\r return style;\r }\r\r getResizeOutlineStyle() {\r return {\r stroke: "#00ffff",\r strokeWidth: 1,\r strokeDasharray: "none",\r };\r }\r}\r\r\rlf.register({\r type: 'rect-node-radius',\r view: RectNodeRadiusView,\r model: RectNodeRadiusModel,\r})\r\r`,css:"",fakeData:` // 数据处理, 返回格式如下
return { normalData: [], uiData: [], animationData: [[]], // 多级
hiddenData: [[]], // 多级
} `},m={id:e,name:a,aliasName:t,image:n,imageType:l,groupName:i,groupType:o,isRemote:!1,isDefault:!0,sectionType:d,config:s,files:c};export{t as aliasName,s as config,m as default,c as files,i as groupName,o as groupType,e as id,n as image,l as imageType,u as isDefault,r as isRemote,a as name,d as sectionType};
|