物管理前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

667 lines
52 KiB

  1. const e="aa85f1cb-f10a-4ca8-9377-a69d44fca6c6",t="custom-tricolor-light",a="三色灯",o=`<?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2. <!-- Created with Inkscape (http://www.inkscape.org/) -->
  3. <svg
  4. width="48.154167mm"
  5. height="45.772919mm"
  6. viewBox="0 0 48.154167 45.772919"
  7. version="1.1"
  8. id="svg785"
  9. xml:space="preserve"
  10. inkscape:version="1.2.2 (732a01da63, 2022-12-09)"
  11. sodipodi:docname="绿色灯1.svg"
  12. xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  13. xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  14. xmlns:xlink="http://www.w3.org/1999/xlink"
  15. xmlns="http://www.w3.org/2000/svg"
  16. xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
  17. id="namedview787"
  18. pagecolor="#ffffff"
  19. bordercolor="#666666"
  20. borderopacity="1.0"
  21. inkscape:showpageshadow="2"
  22. inkscape:pageopacity="0.0"
  23. inkscape:pagecheckerboard="0"
  24. inkscape:deskcolor="#d1d1d1"
  25. inkscape:document-units="mm"
  26. showgrid="false"
  27. inkscape:zoom="0.74564394"
  28. inkscape:cx="-123.38329"
  29. inkscape:cy="306.44653"
  30. inkscape:window-width="1397"
  31. inkscape:window-height="1040"
  32. inkscape:window-x="724"
  33. inkscape:window-y="150"
  34. inkscape:window-maximized="0"
  35. inkscape:current-layer="layer1" /><defs
  36. id="defs782"><style
  37. id="style906">.cls-1{fill:#09ba1a;}.cls-2{fill:url(#未命名的渐变_9);}.cls-3{fill:url(#未命名的渐变_3);}.cls-4{fill:url(#未命名的渐变_3-2);}</style><linearGradient
  38. id="未命名的渐变_9"
  39. x1="84.449997"
  40. y1="128.87"
  41. x2="167.55"
  42. y2="128.87"
  43. gradientTransform="matrix(1,0,0,-1,0,252)"
  44. gradientUnits="userSpaceOnUse"><stop
  45. offset="0.01"
  46. stop-color="#b3ffb7"
  47. stop-opacity="0.72"
  48. id="stop908" /><stop
  49. offset="0.02"
  50. stop-color="#93f299"
  51. stop-opacity="0.77"
  52. id="stop910" /><stop
  53. offset="0.07"
  54. stop-color="#49d455"
  55. stop-opacity="0.9"
  56. id="stop912" /><stop
  57. offset="0.1"
  58. stop-color="#1ac12a"
  59. stop-opacity="0.97"
  60. id="stop914" /><stop
  61. offset="0.12"
  62. stop-color="#09ba1a"
  63. id="stop916" /><stop
  64. offset="0.2"
  65. stop-color="#1fc32e"
  66. stop-opacity="0.96"
  67. id="stop918" /><stop
  68. offset="0.35"
  69. stop-color="#57da62"
  70. stop-opacity="0.87"
  71. id="stop920" /><stop
  72. offset="0.56"
  73. stop-color="#b2ffb6"
  74. stop-opacity="0.72"
  75. id="stop922" /><stop
  76. offset="0.57"
  77. stop-color="#b3ffb7"
  78. stop-opacity="0.72"
  79. id="stop924" /><stop
  80. offset="0.62"
  81. stop-color="#a1f8a6"
  82. stop-opacity="0.75"
  83. id="stop926" /><stop
  84. offset="0.72"
  85. stop-color="#71e47a"
  86. stop-opacity="0.83"
  87. id="stop928" /><stop
  88. offset="0.85"
  89. stop-color="#24c533"
  90. stop-opacity="0.96"
  91. id="stop930" /><stop
  92. offset="0.89"
  93. stop-color="#09ba1a"
  94. id="stop932" /><stop
  95. offset="0.91"
  96. stop-color="#0dbc1e"
  97. id="stop934" /><stop
  98. offset="0.93"
  99. stop-color="#19c42a"
  100. id="stop936" /><stop
  101. offset="0.96"
  102. stop-color="#2dd03e"
  103. id="stop938" /><stop
  104. offset="0.98"
  105. stop-color="#4ae15b"
  106. id="stop940" /><stop
  107. offset="1"
  108. stop-color="#69f47a"
  109. id="stop942" /></linearGradient><linearGradient
  110. id="未命名的渐变_3"
  111. x1="51"
  112. y1="59.779999"
  113. x2="201"
  114. y2="59.779999"
  115. gradientTransform="matrix(1,0,0,-1,-34,225)"
  116. gradientUnits="userSpaceOnUse"><stop
  117. offset="0"
  118. stop-color="#6b6b6b"
  119. id="stop945" /><stop
  120. offset="0.11"
  121. stop-color="#767676"
  122. id="stop947" /><stop
  123. offset="0.3"
  124. stop-color="#959595"
  125. id="stop949" /><stop
  126. offset="0.41"
  127. stop-color="#aaa"
  128. id="stop951" /><stop
  129. offset="0.56"
  130. stop-color="#ccc"
  131. id="stop953" /><stop
  132. offset="0.71"
  133. stop-color="#eaeaea"
  134. id="stop955" /><stop
  135. offset="0.8"
  136. stop-color="#f6f6f6"
  137. id="stop957" /><stop
  138. offset="0.83"
  139. stop-color="#ededed"
  140. id="stop959" /><stop
  141. offset="0.87"
  142. stop-color="#d4d4d4"
  143. id="stop961" /><stop
  144. offset="0.92"
  145. stop-color="#ababab"
  146. id="stop963" /><stop
  147. offset="0.98"
  148. stop-color="#737373"
  149. id="stop965" /><stop
  150. offset="0.99"
  151. stop-color="#666"
  152. id="stop967" /></linearGradient><linearGradient
  153. id="未命名的渐变_3-2"
  154. x1="79.360001"
  155. y1="72.639999"
  156. x2="172.64"
  157. y2="72.639999"
  158. xlink:href="#%E6%9C%AA%E5%91%BD%E5%90%8D%E7%9A%84%E6%B8%90%E5%8F%98_3" /><linearGradient
  159. inkscape:collect="always"
  160. xlink:href="#未命名的渐变_3"
  161. id="linearGradient1038"
  162. gradientUnits="userSpaceOnUse"
  163. gradientTransform="matrix(1,0,0,-1,-34,225)"
  164. x1="51"
  165. y1="59.779999"
  166. x2="201"
  167. y2="59.779999" /></defs><g
  168. inkscape:label="图层 1"
  169. inkscape:groupmode="layer"
  170. id="layer1"
  171. transform="translate(-91.600336,-67.242574)"><g
  172. id="g1036"
  173. transform="matrix(0.26458333,0,0,0.26458333,91.600336,67.242574)"><rect
  174. class="cls-1"
  175. x="88"
  176. width="6"
  177. height="30"
  178. rx="3"
  179. ry="3"
  180. id="rect975"
  181. y="0" /><rect
  182. class="cls-1"
  183. x="198"
  184. y="103"
  185. width="6"
  186. height="30"
  187. rx="3"
  188. ry="3"
  189. transform="rotate(90,197.5,87.5)"
  190. id="rect977" /><rect
  191. class="cls-1"
  192. x="68.260002"
  193. y="49.259998"
  194. width="6"
  195. height="30"
  196. rx="3"
  197. ry="3"
  198. transform="rotate(-45,21.666977,91.805244)"
  199. id="rect979" /><rect
  200. class="cls-1"
  201. x="46"
  202. y="103"
  203. width="6"
  204. height="30"
  205. rx="3"
  206. ry="3"
  207. transform="rotate(-90,18.5,121.5)"
  208. id="rect981" /><rect
  209. class="cls-1"
  210. x="176.95"
  211. y="49.759998"
  212. width="6"
  213. height="30"
  214. rx="3"
  215. ry="3"
  216. transform="rotate(45,195.53533,10.223387)"
  217. id="rect983" /><path
  218. class="cls-2"
  219. d="M 167.55,174.26 H 84.45 V 113.55 A 41.55,41.55 0 0 1 126,72 v 0 a 41.55,41.55 0 0 1 41.55,41.55 v 0 z"
  220. transform="translate(-34,-27)"
  221. id="path985"
  222. style="fill:url(#%E6%9C%AA%E5%91%BD%E5%90%8D%E7%9A%84%E6%B8%90%E5%8F%98_9)" /><rect
  223. class="cls-3"
  224. x="17"
  225. y="157.44"
  226. width="150"
  227. height="15.56"
  228. rx="3.49"
  229. ry="3.49"
  230. id="rect987"
  231. style="fill:url(#linearGradient1038)" /><rect
  232. class="cls-4"
  233. x="45.360001"
  234. y="147.25999"
  235. width="93.279999"
  236. height="10.19"
  237. id="rect989"
  238. style="fill:url(#%E6%9C%AA%E5%91%BD%E5%90%8D%E7%9A%84%E6%B8%90%E5%8F%98_3-2)" /></g></g></svg>
  239. `,n="svg",i="基础",s="常用",p=!1,c=!0,l="时间",r=`{"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&nbsp;&nbsp;&nbsp;&nbsp;","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-color","label":"前景色","name":"btnColor","id":"u:0d19ed3e2bdc","placeholder":"","mode":"horizontal","size":"full","className":"m-b","inputClassName":"w-full","format":"rgba"}],"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","id":"u:89afff5fd00d","placeholder":"","mode":"horizontal","size":"full","className":"m-b","format":"rgba","inputClassName":"w-full"}],"id":"u:7c903d9d40ab","md":6}],"id":"u:457970dd35bf","className":"m-b"},{"type":"grid","columns":[{"body":[{"type":"input-number","label":"边宽","name":"strokeWidth","id":"u:8dcf62d3dab5","placeholder":"描边宽度","mode":"horizontal","size":"full","className":"m-b","keyboard":true,"step":1,"value":1,"suffix":"px","inputClassName":"w-full"}],"id":"u:d701217b85ef","md":6},{"body":[{"type":"input-text","label":"内容","name":"content","id":"u:bea5a408f98f","mode":"horizontal","size":"full","inputControlClassName":"inputControlClassName-bea5a408f98f"}],"id":"u:afc37bde0156","md":6}],"id":"u:235f153e5ad5","className":"m-b"},{"type":"switch","label":"显示文字","option":"","name":"showText","falseValue":false,"trueValue":true,"id":"u:0f0bea4f4383","value":false,"mode":"horizontal"},{"type":"fieldset","id":"u:2a93d8eee7a9","className":"","ti
  240. "nodes": [
  241. {
  242. "id": "bcc712a7-461f-4eb5-8a74-1a0df96ec0ec",
  243. "type": "custom-tricolor-light",
  244. "x": 200,
  245. "y": 200,
  246. "text": {
  247. "value": "",
  248. "x": 200,
  249. "y": 200
  250. },
  251. "properties": {
  252. "id": "bcc712a7-461f-4eb5-8a74-1a0df96ec0ec",
  253. "width": 200,
  254. "height": 200,
  255. "x": 200,
  256. "y": 200,
  257. "rotation": 0,
  258. "strokeWidth": 1,
  259. "showText": false,
  260. "fontSize": 12,
  261. "nodeAlias": "三色灯",
  262. "opacity": 1,
  263. "showDefaultValue": false,
  264. "showUnit": false,
  265. "valueColor": "rgba(245, 166, 35, 1)",
  266. "dynamic": {
  267. "eventsData": {
  268. "eventCombo": [
  269. {
  270. "eventType": "click",
  271. "enable": false,
  272. "config": ""
  273. },
  274. {
  275. "eventType": "dblClick",
  276. "enable": false,
  277. "config": ""
  278. }
  279. ]
  280. },
  281. "uiData": {
  282. "dataPoint": "",
  283. "compareType": "",
  284. "conditionVariables": [
  285. {
  286. "type": "green",
  287. "label": "绿色",
  288. "name": "",
  289. "value": "1",
  290. "valueLabel": "正常"
  291. }
  292. ],
  293. "showBlink": false,
  294. "showLabel": true
  295. }
  296. }
  297. }
  298. }
  299. ]
  300. }`,javascript:`
  301. const { createApp, createVNode, render } = Vue;
  302. const app = createApp({})
  303. const TriColor = {
  304. template: \`<div style="width: 100%; height: 100%; position: relative">
  305. <svg class="tricolor-svg-root" v-if="defaultValue === 1" width="100%" height="100%" viewBox="0 0 48.154167 45.772919" version="1.1" id="svg785" xml:space="preserve" inkscape:version="1.2.2 (732a01da63, 2022-12-09)" sodipodi:docname="绿色灯1.svg"
  306. xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  307. xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  308. xmlns:xlink="http://www.w3.org/1999/xlink"
  309. xmlns="http://www.w3.org/2000/svg"
  310. xmlns:svg="http://www.w3.org/2000/svg">
  311. <defs id="defs782">
  312. <linearGradient id="未命名的渐变_9" x1="84.449997" y1="128.87" x2="167.55" y2="128.87" gradientTransform="matrix(1,0,0,-1,0,252)" gradientUnits="userSpaceOnUse">
  313. <stop offset="0.01" stop-color="#b3ffb7" stop-opacity="0.72" id="stop908" />
  314. <stop offset="0.02" stop-color="#93f299" stop-opacity="0.77" id="stop910" />
  315. <stop offset="0.07" stop-color="#49d455" stop-opacity="0.9" id="stop912" />
  316. <stop offset="0.1" stop-color="#1ac12a" stop-opacity="0.97" id="stop914" />
  317. <stop offset="0.12" stop-color="#09ba1a" id="stop916" />
  318. <stop offset="0.2" stop-color="#1fc32e" stop-opacity="0.96" id="stop918" />
  319. <stop offset="0.35" stop-color="#57da62" stop-opacity="0.87" id="stop920" />
  320. <stop offset="0.56" stop-color="#b2ffb6" stop-opacity="0.72" id="stop922" />
  321. <stop offset="0.57" stop-color="#b3ffb7" stop-opacity="0.72" id="stop924" />
  322. <stop offset="0.62" stop-color="#a1f8a6" stop-opacity="0.75" id="stop926" />
  323. <stop offset="0.72" stop-color="#71e47a" stop-opacity="0.83" id="stop928" />
  324. <stop offset="0.85" stop-color="#24c533" stop-opacity="0.96" id="stop930" />
  325. <stop offset="0.89" stop-color="#09ba1a" id="stop932" />
  326. <stop offset="0.91" stop-color="#0dbc1e" id="stop934" />
  327. <stop offset="0.93" stop-color="#19c42a" id="stop936" />
  328. <stop offset="0.96" stop-color="#2dd03e" id="stop938" />
  329. <stop offset="0.98" stop-color="#4ae15b" id="stop940" />
  330. <stop offset="1" stop-color="#69f47a" id="stop942" />
  331. </linearGradient>
  332. <linearGradient id="未命名的渐变_3" x1="51" y1="59.779999" x2="201" y2="59.779999" gradientTransform="matrix(1,0,0,-1,-34,225)" gradientUnits="userSpaceOnUse">
  333. <stop offset="0" stop-color="#6b6b6b" id="stop945" />
  334. <stop offset="0.11" stop-color="#767676" id="stop947" />
  335. <stop offset="0.3" stop-color="#959595" id="stop949" />
  336. <stop offset="0.41" stop-color="#aaa" id="stop951" />
  337. <stop offset="0.56" stop-color="#ccc" id="stop953" />
  338. <stop offset="0.71" stop-color="#eaeaea" id="stop955" />
  339. <stop offset="0.8" stop-color="#f6f6f6" id="stop957" />
  340. <stop offset="0.83" stop-color="#ededed" id="stop959" />
  341. <stop offset="0.87" stop-color="#d4d4d4" id="stop961" />
  342. <stop offset="0.92" stop-color="#ababab" id="stop963" />
  343. <stop offset="0.98" stop-color="#737373" id="stop965" />
  344. <stop offset="0.99" stop-color="#666" id="stop967" />
  345. </linearGradient>
  346. <linearGradient id="未命名的渐变_3-2" x1="79.360001" y1="72.639999" x2="172.64" y2="72.639999" xlink:href="#%E6%9C%AA%E5%91%BD%E5%90%8D%E7%9A%84%E6%B8%90%E5%8F%98_3" />
  347. <linearGradient inkscape:collect="always" xlink:href="#未命名的渐变_3" id="linearGradient1038" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1,0,0,-1,-34,225)" x1="51" y1="59.779999" x2="201" y2="59.779999" />
  348. </defs>
  349. <g inkscape:label="图层 1" inkscape:groupmode="layer" id="layer1" transform="translate(-91.600336,-67.242574)">
  350. <g id="g1036" transform="matrix(0.26458333,0,0,0.26458333,91.600336,67.242574)">
  351. <rect class="tricolor-cls-1" x="88" width="6" height="30" rx="3" ry="3" id="rect975" y="0">
  352. <animate id='ani1' attributeName='fill-opacity' attributeType='XML' begin='0s;ani2.end' dur='2s' from='1' to='0.1' fill='freeze'/>
  353. <animate id='ani2' attributeName='fill-opacity' attributeType='XML' begin='ani1.end' dur='2s' from='0.1' to='1' fill='freeze'/>
  354. </rect>
  355. <rect class="tricolor-cls-1" x="198" y="103" width="6" height="30" rx="3" ry="3" transform="rotate(90,197.5,87.5)" id="rect977">
  356. <animate id='ani1' attributeName='fill-opacity' attributeType='XML' begin='0s;ani2.end' dur='2s' from='1' to='0.1' fill='freeze'/>
  357. <animate id='ani2' attributeName='fill-opacity' attributeType='XML' begin='ani1.end' dur='2s' from='0.1' to='1' fill='freeze'/>
  358. </rect>
  359. <rect class="tricolor-cls-1" x="68.260002" y="49.259998" width="6" height="30" rx="3" ry="3" transform="rotate(-45,21.666977,91.805244)" id="rect979">
  360. <animate id='ani1' attributeName='fill-opacity' attributeType='XML' begin='0s;ani2.end' dur='2s' from='1' to='0.1' fill='freeze'/>
  361. <animate id='ani2' attributeName='fill-opacity' attributeType='XML' begin='ani1.end' dur='2s' from='0.1' to='1' fill='freeze'/>
  362. </rect>
  363. <rect class="tricolor-cls-1" x="46" y="103" width="6" height="30" rx="3" ry="3" transform="rotate(-90,18.5,121.5)" id="rect981">
  364. <animate id='ani1' attributeName='fill-opacity' attributeType='XML' begin='0s;ani2.end' dur='2s' from='1' to='0.1' fill='freeze'/>
  365. <animate id='ani2' attributeName='fill-opacity' attributeType='XML' begin='ani1.end' dur='2s' from='0.1' to='1' fill='freeze'/>
  366. </rect>
  367. <rect class="tricolor-cls-1" x="176.95" y="49.759998" width="6" height="30" rx="3" ry="3" transform="rotate(45,195.53533,10.223387)" id="rect983">
  368. <animate id='ani1' attributeName='fill-opacity' attributeType='XML' begin='0s;ani2.end' dur='2s' from='1' to='0.1' fill='freeze'/>
  369. <animate id='ani2' attributeName='fill-opacity' attributeType='XML' begin='ani1.end' dur='2s' from='0.1' to='1' fill='freeze'/>
  370. </rect>
  371. <path class="tricolor-cls-2" d="M 167.55,174.26 H 84.45 V 113.55 A 41.55,41.55 0 0 1 126,72 v 0 a 41.55,41.55 0 0 1 41.55,41.55 v 0 z" transform="translate(-34,-27)" id="path985" style="fill:url(#%E6%9C%AA%E5%91%BD%E5%90%8D%E7%9A%84%E6%B8%90%E5%8F%98_9)" />
  372. <rect class="tricolor-cls-3" x="17" y="157.44" width="150" height="15.56" rx="3.49" ry="3.49" id="rect987" style="fill:url(#linearGradient1038)" />
  373. <rect class="tricolor-cls-4" x="45.360001" y="147.25999" width="93.279999" height="10.19" id="rect989" style="fill:url(#%E6%9C%AA%E5%91%BD%E5%90%8D%E7%9A%84%E6%B8%90%E5%8F%98_3-2)" />
  374. </g>
  375. </g>
  376. </svg>
  377. <svg class="tricolor-svg-root" v-else-if="defaultValue === 2" width="100%" height="100%" viewBox="0 0 48.154167 46.037498" version="1.1" id="svg442" xml:space="preserve"
  378. xmlns:xlink="http://www.w3.org/1999/xlink"
  379. xmlns="http://www.w3.org/2000/svg"
  380. xmlns:svg="http://www.w3.org/2000/svg">
  381. <defs id="defs439">
  382. <linearGradient id="未命名的渐变_6" x1="83.449997" y1="127.87" x2="166.55" y2="127.87" gradientTransform="matrix(1,0,0,-1,0,252)" gradientUnits="userSpaceOnUse">
  383. <stop offset="0.01" stop-color="#fff1ca" stop-opacity="0.72" id="stop565" />
  384. <stop offset="0.05" stop-color="#f4e57c" stop-opacity="0.87" id="stop567" />
  385. <stop offset="0.09" stop-color="#eddc48" stop-opacity="0.96" id="stop569" />
  386. <stop offset="0.12" stop-color="#ead934" id="stop571" />
  387. <stop offset="0.21" stop-color="#eddd4d" stop-opacity="0.95" id="stop573" />
  388. <stop offset="0.4" stop-color="#f6e78c" stop-opacity="0.84" id="stop575" />
  389. <stop offset="0.57" stop-color="#fff1ca" stop-opacity="0.72" id="stop577" />
  390. <stop offset="0.63" stop-color="#fceeb6" stop-opacity="0.76" id="stop579" />
  391. <stop offset="0.75" stop-color="#f5e57f" stop-opacity="0.86" id="stop581" />
  392. <stop offset="0.89" stop-color="#ead934" id="stop583" />
  393. <stop offset="0.91" stop-color="#ebda3b" stop-opacity="0.99" id="stop585" />
  394. <stop offset="0.93" stop-color="#eedd4e" stop-opacity="0.95" id="stop587" />
  395. <stop offset="0.96" stop-color="#f2e26e" stop-opacity="0.89" id="stop589" />
  396. <stop offset="0.98" stop-color="#f9ea9c" stop-opacity="0.81" id="stop591" />
  397. <stop offset="1" stop-color="#fff1ca" stop-opacity="0.72" id="stop593" />
  398. </linearGradient>
  399. <linearGradient id="未命名的渐变_3" x1="50" y1="58.779999" x2="200" y2="58.779999" gradientTransform="matrix(1,0,0,-1,-34,225)" gradientUnits="userSpaceOnUse">
  400. <stop offset="0" stop-color="#6b6b6b" id="stop596" />
  401. <stop offset="0.11" stop-color="#767676" id="stop598" />
  402. <stop offset="0.3" stop-color="#959595" id="stop600" />
  403. <stop offset="0.41" stop-color="#aaa" id="stop602" />
  404. <stop offset="0.56" stop-color="#ccc" id="stop604" />
  405. <stop offset="0.71" stop-color="#eaeaea" id="stop606" />
  406. <stop offset="0.8" stop-color="#f6f6f6" id="stop608" />
  407. <stop offset="0.83" stop-color="#ededed" id="stop610" />
  408. <stop offset="0.87" stop-color="#d4d4d4" id="stop612" />
  409. <stop offset="0.92" stop-color="#ababab" id="stop614" />
  410. <stop offset="0.98" stop-color="#737373" id="stop616" />
  411. <stop offset="0.99" stop-color="#666" id="stop618" />
  412. </linearGradient>
  413. <linearGradient id="未命名的渐变_3-2" x1="78.360001" y1="71.639999" x2="171.64" y2="71.639999" xlink:href="#%E6%9C%AA%E5%91%BD%E5%90%8D%E7%9A%84%E6%B8%90%E5%8F%98_3" />
  414. <linearGradient xlink:href="#未命名的渐变_3" id="linearGradient688" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1,0,0,-1,-34,225)" x1="50" y1="58.779999" x2="200" y2="58.779999" />
  415. </defs>
  416. <g id="layer1" transform="translate(-70.310014,-41.561895)">
  417. <g id="g686" transform="matrix(0.26458333,0,0,0.26458333,70.310014,41.561895)">
  418. <rect class="tri-yellow-cls-1" x="88" width="6" height="30" rx="3" ry="3" id="rect626" y="0">
  419. <animate id='ani1' attributeName='fill-opacity' attributeType='XML' begin='0s;ani2.end' dur='2s' from='1' to='0.1' fill='freeze'/>
  420. <animate id='ani2' attributeName='fill-opacity' attributeType='XML' begin='ani1.end' dur='2s' from='0.1' to='1' fill='freeze'/>
  421. </rect>
  422. <rect class="tri-yellow-cls-1" x="198" y="103" width="6" height="30" rx="3" ry="3" transform="rotate(90,197.5,87.5)" id="rect628">
  423. <animate id='ani1' attributeName='fill-opacity' attributeType='XML' begin='0s;ani2.end' dur='2s' from='1' to='0.1' fill='freeze'/>
  424. <animate id='ani2' attributeName='fill-opacity' attributeType='XML' begin='ani1.end' dur='2s' from='0.1' to='1' fill='freeze'/>
  425. </rect>
  426. <rect class="tri-yellow-cls-1" x="68.260002" y="49.259998" width="6" height="30" rx="3" ry="3" transform="rotate(-45,21.666977,91.805244)" id="rect630">
  427. <animate id='ani1' attributeName='fill-opacity' attributeType='XML' begin='0s;ani2.end' dur='2s' from='1' to='0.1' fill='freeze'/>
  428. <animate id='ani2' attributeName='fill-opacity' attributeType='XML' begin='ani1.end' dur='2s' from='0.1' to='1' fill='freeze'/>
  429. </rect>
  430. <rect class="tri-yellow-cls-1" x="46" y="103" width="6" height="30" rx="3" ry="3" transform="rotate(-90,18.5,121.5)" id="rect632">
  431. <animate id='ani1' attributeName='fill-opacity' attributeType='XML' begin='0s;ani2.end' dur='2s' from='1' to='0.1' fill='freeze'/>
  432. <animate id='ani2' attributeName='fill-opacity' attributeType='XML' begin='ani1.end' dur='2s' from='0.1' to='1' fill='freeze'/>
  433. </rect>
  434. <rect class="tri-yellow-cls-1" x="176.95" y="49.759998" width="6" height="30" rx="3" ry="3" transform="rotate(45,195.53533,10.223387)" id="rect634">
  435. <animate id='ani1' attributeName='fill-opacity' attributeType='XML' begin='0s;ani2.end' dur='2s' from='1' to='0.1' fill='freeze'/>
  436. <animate id='ani2' attributeName='fill-opacity' attributeType='XML' begin='ani1.end' dur='2s' from='0.1' to='1' fill='freeze'/>
  437. </rect>
  438. <g id="Light-_yellow_黄灯_" data-name="Light- yellow 黄灯 ">
  439. <path class="tri-yellow-cls-2" d="M 166.55,175.26 H 83.45 V 114.55 A 41.55,41.55 0 0 1 125,73 v 0 a 41.55,41.55 0 0 1 41.55,41.55 v 0 z" transform="translate(-34,-27)" id="path636" style="fill:url(#%E6%9C%AA%E5%91%BD%E5%90%8D%E7%9A%84%E6%B8%90%E5%8F%98_6)" />
  440. <rect class="tri-yellow-cls-3" x="16" y="158.44" width="150" height="15.56" rx="3.49" ry="3.49" id="rect638" style="fill:url(#linearGradient688)" />
  441. <rect class="tri-yellow-cls-4" x="44.360001" y="148.25999" width="93.279999" height="10.19" id="rect640" style="fill:url(#%E6%9C%AA%E5%91%BD%E5%90%8D%E7%9A%84%E6%B8%90%E5%8F%98_3-2)" />
  442. </g>
  443. </g>
  444. </g>
  445. </svg>
  446. <svg class="tricolor-svg-root" v-else-if="defaultValue === 3" width="100%" height="100%" viewBox="0 0 48.154167 46.037498" version="1.1" id="svg5" xml:space="preserve" inkscape:version="1.2.2 (732a01da63, 2022-12-09)" sodipodi:docname="红色灯1.svg"
  447. xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  448. xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  449. xmlns:xlink="http://www.w3.org/1999/xlink"
  450. xmlns="http://www.w3.org/2000/svg"
  451. xmlns:svg="http://www.w3.org/2000/svg">
  452. <defs id="defs2">
  453. <linearGradient id="未命名的渐变_4" x1="83.449997" y1="127.87" x2="166.55" y2="127.87" gradientTransform="matrix(1,0,0,-1,0,252)" gradientUnits="userSpaceOnUse">
  454. <stop offset="0" stop-color="#fbb" stop-opacity="0.72" id="stop184" />
  455. <stop offset="0.01" stop-color="#f6aaaa" stop-opacity="0.76" id="stop186" />
  456. <stop offset="0.04" stop-color="#dc7878" stop-opacity="0.86" id="stop188" />
  457. <stop offset="0.07" stop-color="#c95555" stop-opacity="0.94" id="stop190" />
  458. <stop offset="0.09" stop-color="#be3f3f" stop-opacity="0.98" id="stop192" />
  459. <stop offset="0.12" stop-color="#ba3838" id="stop194" />
  460. <stop offset="0.18" stop-color="#c04343" id="stop196" />
  461. <stop offset="0.29" stop-color="#d06161" id="stop198" />
  462. <stop offset="0.42" stop-color="#e99191" id="stop200" />
  463. <stop offset="0.53" stop-color="#fbb" id="stop202" />
  464. <stop offset="0.58" stop-color="#fcb6b6" id="stop204" />
  465. <stop offset="0.65" stop-color="#f5a7a7" id="stop206" />
  466. <stop offset="0.72" stop-color="#e88f8f" id="stop208" />
  467. <stop offset="0.8" stop-color="#d66c6c" id="stop210" />
  468. <stop offset="0.87" stop-color="#bf4141" id="stop212" />
  469. <stop offset="0.89" stop-color="#ba3838" id="stop214" />
  470. <stop offset="0.91" stop-color="#be3f3f" stop-opacity="0.99" id="stop216" />
  471. <stop offset="0.94" stop-color="#c85353" stop-opacity="0.94" id="stop218" />
  472. <stop offset="0.96" stop-color="#da7575" stop-opacity="0.87" id="stop220" />
  473. <stop offset="0.99" stop-color="#f3a4a4" stop-opacity="0.77" id="stop222" />
  474. <stop offset="1" stop-color="#fbb" stop-opacity="0.72" id="stop224" />
  475. </linearGradient>
  476. <linearGradient id="未命名的渐变_3" x1="50" y1="58.779999" x2="200" y2="58.779999" gradientTransform="matrix(1,0,0,-1,-34,225)" gradientUnits="userSpaceOnUse">
  477. <stop offset="0" stop-color="#6b6b6b" id="stop227" />
  478. <stop offset="0.11" stop-color="#767676" id="stop229" />
  479. <stop offset="0.3" stop-color="#959595" id="stop231" />
  480. <stop offset="0.41" stop-color="#aaa" id="stop233" />
  481. <stop offset="0.56" stop-color="#ccc" id="stop235" />
  482. <stop offset="0.71" stop-color="#eaeaea" id="stop237" />
  483. <stop offset="0.8" stop-color="#f6f6f6" id="stop239" />
  484. <stop offset="0.83" stop-color="#ededed" id="stop241" />
  485. <stop offset="0.87" stop-color="#d4d4d4" id="stop243" />
  486. <stop offset="0.92" stop-color="#ababab" id="stop245" />
  487. <stop offset="0.98" stop-color="#737373" id="stop247" />
  488. <stop offset="0.99" stop-color="#666" id="stop249" />
  489. </linearGradient>
  490. <linearGradient id="未命名的渐变_3-2" x1="78.360001" y1="71.639999" x2="171.64" y2="71.639999" xlink:href="#%E6%9C%AA%E5%91%BD%E5%90%8D%E7%9A%84%E6%B8%90%E5%8F%98_3" />
  491. <linearGradient inkscape:collect="always" xlink:href="#未命名的渐变_3" id="linearGradient383" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1,0,0,-1,-34,225)" x1="50" y1="58.779999" x2="200" y2="58.779999" />
  492. </defs>
  493. <g inkscape:label="图层 1" inkscape:groupmode="layer" id="layer1" transform="translate(-43.697111,-54.690927)">
  494. <g id="g327" transform="matrix(0.26458333,0,0,0.26458333,43.697111,54.690927)">
  495. <g id="图层_2" data-name="图层 2">
  496. <g id="图层_20" data-name="图层 20">
  497. <g id="Light-_red_红灯_" data-name="Light- red 红灯 ">
  498. <path class="tri-red-cls-1" d="M 166.55,175.26 H 83.45 V 114.55 A 41.55,41.55 0 0 1 125,73 v 0 a 41.55,41.55 0 0 1 41.55,41.55 v 0 z" transform="translate(-34,-27)" id="path257" style="fill:url(#%E6%9C%AA%E5%91%BD%E5%90%8D%E7%9A%84%E6%B8%90%E5%8F%98_4)" />
  499. <rect class="tri-red-cls-2" x="16" y="158.44" width="150" height="15.56" rx="3.49" ry="3.49" id="rect259" style="fill:url(#linearGradient383)" />
  500. <rect class="tri-red-cls-3" x="44.360001" y="148.25999" width="93.279999" height="10.19" id="rect261" style="fill:url(#%E6%9C%AA%E5%91%BD%E5%90%8D%E7%9A%84%E6%B8%90%E5%8F%98_3-2)" />
  501. </g>
  502. </g>
  503. </g>
  504. <rect class="tri-red-cls-4" x="88" width="6" height="30" rx="3" ry="3" id="rect266" y="0">
  505. <animate id='ani1' attributeName='fill-opacity' attributeType='XML' begin='0s;ani2.end' dur='2s' from='1' to='0.1' fill='freeze'/>
  506. <animate id='ani2' attributeName='fill-opacity' attributeType='XML' begin='ani1.end' dur='2s' from='0.1' to='1' fill='freeze'/>
  507. </rect>
  508. <rect class="tri-red-cls-4" x="198" y="103" width="6" height="30" rx="3" ry="3" transform="rotate(90,197.5,87.5)" id="rect268">
  509. <animate id='ani1' attributeName='fill-opacity' attributeType='XML' begin='0s;ani2.end' dur='2s' from='1' to='0.1' fill='freeze'/>
  510. <animate id='ani2' attributeName='fill-opacity' attributeType='XML' begin='ani1.end' dur='2s' from='0.1' to='1' fill='freeze'/>
  511. </rect>
  512. <rect class="tri-red-cls-4" x="68.260002" y="49.259998" width="6" height="30" rx="3" ry="3" transform="rotate(-45,21.666977,91.805244)" id="rect270">
  513. <animate id='ani1' attributeName='fill-opacity' attributeType='XML' begin='0s;ani2.end' dur='2s' from='1' to='0.1' fill='freeze'/>
  514. <animate id='ani2' attributeName='fill-opacity' attributeType='XML' begin='ani1.end' dur='2s' from='0.1' to='1' fill='freeze'/>
  515. </rect>
  516. <rect class="tri-red-cls-4" x="46" y="103" width="6" height="30" rx="3" ry="3" transform="rotate(-90,18.5,121.5)" id="rect272">
  517. <animate id='ani1' attributeName='fill-opacity' attributeType='XML' begin='0s;ani2.end' dur='2s' from='1' to='0.1' fill='freeze'/>
  518. <animate id='ani2' attributeName='fill-opacity' attributeType='XML' begin='ani1.end' dur='2s' from='0.1' to='1' fill='freeze'/>
  519. </rect>
  520. <rect class="tri-red-cls-4" x="176.95" y="49.759998" width="6" height="30" rx="3" ry="3" transform="rotate(45,195.53533,10.223387)" id="rect274">
  521. <animate id='ani1' attributeName='fill-opacity' attributeType='XML' begin='0s;ani2.end' dur='2s' from='1' to='0.1' fill='freeze'/>
  522. <animate id='ani2' attributeName='fill-opacity' attributeType='XML' begin='ani1.end' dur='2s' from='0.1' to='1' fill='freeze'/>
  523. </rect>
  524. </g>
  525. </g>
  526. </svg>
  527. </div>\`,
  528. props: {
  529. defaultValue: {
  530. type: Number,
  531. default: 1
  532. },
  533. labelName: {
  534. type: String,
  535. default: ''
  536. },
  537. },
  538. }
  539. class CustomTriColorLightNode extends HtmlResize.view {
  540. setHtml(rootEl) {
  541. const { properties, width, height, } = this.props.model;
  542. const el = document.createElement('div');
  543. rootEl.innerHTML = '';
  544. let labelName = '正常';
  545. let defaultValue = 1
  546. const { uiData } = properties.dynamic || {};
  547. if (uiData) {
  548. const realValue = window.resolveScadaNewValue(uiData.defaultValue)
  549. if (realValue !== '') {
  550. uiData.conditionVariables.forEach((item) => {
  551. if (item.type === 'green') {
  552. if(Number(realValue) === Number(item.value)) {
  553. labelName = item.valueLabel;
  554. defaultValue = 1;
  555. }
  556. } else if (item.type === 'yellow') {
  557. if (Number(realValue) === Number(item.value)) {
  558. labelName = item.valueLabel;
  559. defaultValue = 2;
  560. }
  561. } else if (item.type === 'red') {
  562. if (Number(realValue) === Number(item.value)) {
  563. labelName = item.valueLabel;
  564. defaultValue = 3;
  565. }
  566. }
  567. })
  568. }
  569. const instance = createVNode(TriColor, {
  570. labelName,
  571. width,
  572. height,
  573. defaultValue
  574. })
  575. instance.appContext = app._context
  576. render(instance, el)
  577. rootEl.appendChild(el);
  578. }
  579. }
  580. }
  581. class CustomTriColorLightModel extends HtmlResize.model {
  582. initNodeData(data) {
  583. // 自定义组件,需最开始重置一下text 。
  584. data.text = {
  585. value: "",
  586. x: data.x,
  587. y: data.y,
  588. };
  589. super.initNodeData(data);
  590. const { properties } = this;
  591. this.width = properties.width || 80;
  592. this.height = properties.height || 35;
  593. this.text.editable = false; // 不允许文本被编辑
  594. }
  595. setAttributes() {
  596. // 自定义组件需重置 text
  597. const { x, y, properties } = this;
  598. const { textHorizontalMove = 0, textVerticalMove = 0 } = properties;
  599. this.text = {
  600. ...this.text,
  601. x: x + textHorizontalMove,
  602. y: y + textVerticalMove,
  603. value: "",
  604. }
  605. }
  606. }
  607. lf.register({
  608. type: 'custom-tricolor-light',
  609. view: CustomTriColorLightNode,
  610. model: CustomTriColorLightModel,
  611. })`,css:`.tricolor-svg-root {\r
  612. stroke: none;\r
  613. }\r
  614. .tricolor-cls-1{\r
  615. fill:#09ba1a;\r
  616. }\r
  617. .tricolor-cls-2{\r
  618. fill:url(#未命名的渐变_9);\r
  619. }\r
  620. .tricolor-cls-3{\r
  621. fill:url(#未命名的渐变_3);\r
  622. }\r
  623. .tricolor-cls-4{\r
  624. fill:url(#未命名的渐变_3-2);\r
  625. }\r
  626. \r
  627. .tri-yellow-cls-1{\r
  628. fill:#ead934;\r
  629. }\r
  630. .tri-yellow-cls-2{\r
  631. fill:url(#未命名的渐变_6);\r
  632. }\r
  633. .tri-yellow-cls-3{\r
  634. fill:url(#未命名的渐变_3);\r
  635. }\r
  636. .tri-yellow-cls-4{\r
  637. fill:url(#未命名的渐变_3-2);\r
  638. }\r
  639. \r
  640. .tri-red-cls-1{\r
  641. fill: url(#未命名的渐变_4);\r
  642. }\r
  643. .tri-red-cls-2{\r
  644. fill:url(#未命名的渐变_3);\r
  645. }\r
  646. .tri-red-cls-3{\r
  647. fill:url(#未命名的渐变_3-2);\r
  648. }\r
  649. .tri-red-cls-4{\r
  650. fill: #ba3838;\r
  651. }\r
  652. \r
  653. `,fakeData:""},f={id:e,name:t,aliasName:a,image:o,imageType:n,groupName:i,groupType:s,isRemote:!1,isDefault:!0,sectionType:l,config:r,files:d};export{a as aliasName,r as config,f as default,d as files,i as groupName,s as groupType,e as id,o as image,n as imageType,c as isDefault,p as isRemote,t as name,l as sectionType};