defaults.ts 74 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092
  1. import { Pen, FormItem } from '@meta2d/core';
  2. import { cdn } from './api';
  3. export const lineDashObj = [
  4. undefined,
  5. [5, 5],
  6. [10, 10],
  7. [10, 10, 2, 10],
  8. [1, 16],
  9. ];
  10. /**
  11. * 默认动画
  12. */
  13. export const normalAnimate: any = {
  14. upDown: [
  15. {
  16. y: -10,
  17. duration: 100,
  18. },
  19. { y: 0, duration: 100 },
  20. { y: -10, duration: 200 },
  21. ],
  22. leftRight: [
  23. {
  24. x: -10,
  25. duration: 100,
  26. },
  27. {
  28. x: 10,
  29. duration: 80,
  30. },
  31. {
  32. x: -10,
  33. duration: 50,
  34. },
  35. {
  36. x: 10,
  37. duration: 30,
  38. },
  39. {
  40. x: 0,
  41. duration: 300,
  42. },
  43. ],
  44. heart: [
  45. {
  46. // 通过 scale 来替代原版心跳
  47. scale: 1.1,
  48. duration: 100,
  49. },
  50. {
  51. scale: 1,
  52. duration: 400,
  53. },
  54. ],
  55. success: [{ background: '#389e0d22', color: '#237804', duration: 500 }],
  56. warning: [
  57. {
  58. color: '#fa8c16',
  59. lineDash: [10, 10],
  60. duration: 300,
  61. },
  62. {
  63. color: '#fa8c16',
  64. lineDash: undefined,
  65. duration: 500,
  66. },
  67. {
  68. color: '#fa8c16',
  69. lineDash: [10, 10],
  70. duration: 300,
  71. },
  72. ],
  73. error: [{ color: '#cf1322', background: '#cf132222', duration: 100 }],
  74. show: [
  75. {
  76. color: '#fa541c',
  77. rotate: -10,
  78. duration: 100,
  79. },
  80. {
  81. color: '#fa541c',
  82. rotate: 10,
  83. duration: 100,
  84. },
  85. {
  86. color: '#fa541c',
  87. rotate: 0,
  88. duration: 100,
  89. },
  90. ],
  91. rotate: [
  92. {
  93. rotate: 360,
  94. duration: 1000,
  95. },
  96. ],
  97. };
  98. export const defaultFormat: Pen = {
  99. borderRadius: 0,
  100. rotate: 0,
  101. paddingLeft: 0,
  102. paddingRight: 0,
  103. paddingTop: 0,
  104. paddingBottom: 0,
  105. progress: 0,
  106. progressColor: '#fff0',
  107. verticalProgress: false,
  108. flipX: false,
  109. flipY: false,
  110. input: false,
  111. lineDash: [],
  112. lineCap: 'round',
  113. lineJoin: 'round',
  114. strokeType: 0,
  115. lineGradientFromColor: undefined,
  116. lineGradientToColor: undefined,
  117. lineGradientAngle: 0,
  118. // color: "#222",
  119. hoverColor: undefined,
  120. activeColor: undefined,
  121. lineWidth: 1,
  122. bkType: 0,
  123. gradientFromColor: undefined,
  124. gradientToColor: undefined,
  125. gradientAngle: 0,
  126. gradientRadius: 0,
  127. hoverBackground: undefined,
  128. activeBackground: undefined,
  129. globalAlpha: 1,
  130. anchorColor: undefined,
  131. anchorRadius: 0,
  132. shadowColor: undefined,
  133. shadowBlur: 0,
  134. shadowOffsetX: 0,
  135. shadowOffsetY: 0,
  136. textHasShadow: undefined,
  137. fontFamily: undefined,
  138. fontSize: 0,
  139. textColor: undefined,
  140. hoverTextColor: undefined,
  141. activeTextColor: undefined,
  142. textBackground: undefined,
  143. fontStyle: undefined,
  144. fontWeight: undefined,
  145. textAlign: undefined,
  146. textBaseline: undefined,
  147. lineHeight: 0,
  148. whiteSpace: undefined,
  149. textWidth: 0,
  150. textHeight: 0,
  151. textLeft: 0,
  152. textTop: 0,
  153. ellipsis: false,
  154. hiddenText: false,
  155. keepDecimal: 0,
  156. borderWidth: 0,
  157. borderColor: undefined,
  158. animateLineWidth: 0,
  159. lineAnimateType: 0,
  160. frames: [],
  161. animateColor: undefined,
  162. // animateType: undefined,
  163. animateReverse: false,
  164. background: '#fff0',
  165. gradientColors: undefined,
  166. lineGradientColors: undefined,
  167. gradientSmooth: 0,
  168. };
  169. export interface FormItemType extends FormItem {
  170. key: string; // 属性标识,绑定变量时使用
  171. key2?: string; // 有些属性存在嵌套
  172. name: string; // 标题
  173. tips?: string; // 提示
  174. placeholder?: string; // input placeholder
  175. type:
  176. | 'text' // string 类型输入框
  177. | 'number'
  178. | 'color'
  179. | 'textarea'
  180. | 'select'
  181. | 'switch'
  182. | 'code'
  183. | 'image'
  184. | 'icon'
  185. | 'slider'
  186. | 'autoComplete'
  187. | 'label'; // 文字,不含输入框;
  188. options?: {
  189. // 选项
  190. label: string; // 选项的标题,可以使用 html
  191. value: any; // 选项的值
  192. disabled?: boolean;
  193. }[];
  194. min?: number; // 最小值
  195. max?: number; // 最大值
  196. step?: number; // 步长
  197. rows?: number; // textarea 所需要的行数
  198. iconFamily?: string; // icon 类型节点需要
  199. title?: string; // code 类型编辑器需要
  200. language?: 'javascript' | 'json' | 'markdown'; // code 编辑器需要
  201. readonly?: boolean; // 是否只读
  202. mode?: 'multiple' | 'tags'; // select 选项
  203. isNotString?: boolean; // monaco 需要 string 类型的 code ,不是 string 协助转换
  204. multiple?: boolean; // 绑定多个属性
  205. isTime?: boolean; // 是否是时序的, undefined 不会出现 历史趋势 的 checkbox
  206. isYCategory?: boolean; // y 轴是否是分类,true y 轴分类,false x 轴分类,undefined 不会出现 y轴分类轴 的 checkbox
  207. // 绑定单个属性是对象, 多个数组
  208. // dataIds?: BindId | BindId[]; // 关联业务数据
  209. precision?: number; //精度
  210. gradient?: boolean; //是否为渐变色
  211. hidden?: boolean; //是否隐藏
  212. }
  213. export const iframeCustom = [
  214. {
  215. key: 'iframe',
  216. label: '网页地址',
  217. type: 'string',
  218. },
  219. {
  220. key: 'zIndex',
  221. label: 'dom层级(z-index)',
  222. type: 'number',
  223. min: 0,
  224. placeholder: '默认4',
  225. },
  226. {
  227. key: 'operationalRect.x',
  228. label: '可操作x',
  229. type: 'number',
  230. min: 0,
  231. max: 1,
  232. placeholder: '范围0-1',
  233. },
  234. {
  235. key: 'operationalRect.y',
  236. label: '可操作y',
  237. type: 'number',
  238. min: 0,
  239. max: 1,
  240. placeholder: '范围0-1',
  241. },
  242. {
  243. key: 'operationalRect.width',
  244. label: '可操作宽度',
  245. type: 'number',
  246. min: 0,
  247. max: 1,
  248. placeholder: '范围0-1',
  249. },
  250. {
  251. key: 'operationalRect.height',
  252. label: '可操作高度',
  253. type: 'number',
  254. min: 0,
  255. max: 1,
  256. placeholder: '范围0-1',
  257. },
  258. {
  259. key: 'blur',
  260. label: '背景模糊',
  261. type: 'number',
  262. min: 0,
  263. },
  264. {
  265. key: 'blurBackground',
  266. label: '毛玻璃颜色',
  267. type: 'color',
  268. },
  269. ];
  270. export const shapes = [
  271. {
  272. name: '基本形状',
  273. show: true,
  274. list: [
  275. {
  276. name: '正方形',
  277. icon: 'l-rect',
  278. id: 1,
  279. data: {
  280. width: 100,
  281. height: 100,
  282. name: 'square',
  283. },
  284. },
  285. {
  286. name: '矩形',
  287. icon: 'l-rectangle',
  288. id: 2,
  289. data: {
  290. width: 200,
  291. height: 50,
  292. borderRadius: 0.1,
  293. name: 'rectangle',
  294. },
  295. },
  296. {
  297. name: '圆',
  298. icon: 'l-circle',
  299. id: 3,
  300. data: {
  301. width: 100,
  302. height: 100,
  303. name: 'circle',
  304. },
  305. },
  306. {
  307. name: '三角形',
  308. icon: 'l-triangle',
  309. id: 4,
  310. data: {
  311. width: 100,
  312. height: 100,
  313. name: 'triangle',
  314. },
  315. },
  316. {
  317. name: '菱形',
  318. icon: 'l-diamond',
  319. id: 5,
  320. data: {
  321. width: 100,
  322. height: 100,
  323. name: 'diamond',
  324. },
  325. },
  326. {
  327. name: '五边形',
  328. icon: 'l-pentagon',
  329. id: 6,
  330. data: {
  331. width: 100,
  332. height: 100,
  333. name: 'pentagon',
  334. },
  335. },
  336. {
  337. name: '六边形',
  338. icon: 'l-hexagon',
  339. id: 7,
  340. data: {
  341. width: 100,
  342. height: 100,
  343. name: 'hexagon',
  344. },
  345. },
  346. {
  347. name: '五角星',
  348. icon: 'l-pentagram',
  349. id: 8,
  350. data: {
  351. width: 100,
  352. height: 100,
  353. name: 'pentagram',
  354. },
  355. },
  356. {
  357. name: '左箭头',
  358. icon: 'l-arrow-left',
  359. id: 9,
  360. data: {
  361. width: 120,
  362. height: 60,
  363. name: 'leftArrow',
  364. },
  365. },
  366. {
  367. name: '右箭头',
  368. icon: 'l-arrow-right',
  369. id: 10,
  370. data: {
  371. width: 120,
  372. height: 60,
  373. name: 'rightArrow',
  374. },
  375. },
  376. {
  377. name: '双向箭头',
  378. icon: 'l-twoway-arrow',
  379. id: 11,
  380. data: {
  381. width: 150,
  382. height: 60,
  383. name: 'twowayArrow',
  384. },
  385. },
  386. {
  387. name: '云',
  388. icon: 'l-cloud',
  389. id: 13,
  390. data: {
  391. width: 100,
  392. height: 100,
  393. name: 'cloud',
  394. },
  395. },
  396. {
  397. name: '消息框',
  398. icon: 'l-msg',
  399. id: 14,
  400. data: {
  401. textTop: -0.1,
  402. width: 100,
  403. height: 100,
  404. name: 'message',
  405. },
  406. },
  407. {
  408. name: '文件',
  409. icon: 'l-file',
  410. id: 15,
  411. data: {
  412. width: 80,
  413. height: 100,
  414. name: 'file',
  415. },
  416. },
  417. {
  418. name: '立方体',
  419. icon: 'l-cube',
  420. id: 18,
  421. data: {
  422. width: 60,
  423. height: 100,
  424. name: 'cube',
  425. z: 0.25,
  426. props: {
  427. custom: [
  428. {
  429. key: 'z',
  430. label: 'Z',
  431. type: 'number',
  432. min: 0,
  433. placeholder: '<= 1 即宽度的比例',
  434. },
  435. {
  436. key: 'backgroundFront',
  437. label: '前背景色',
  438. type: 'color',
  439. },
  440. {
  441. key: 'backgroundUp',
  442. label: '顶背景色',
  443. type: 'color',
  444. },
  445. {
  446. key: 'backgroundRight',
  447. label: '右背景色',
  448. type: 'color',
  449. },
  450. ],
  451. },
  452. },
  453. },
  454. {
  455. name: '人',
  456. icon: 'l-people',
  457. id: 19,
  458. data: {
  459. width: 70,
  460. height: 100,
  461. name: 'people',
  462. },
  463. },
  464. ],
  465. },
  466. {
  467. name: '脑图',
  468. show: true,
  469. list: [
  470. {
  471. name: '主题',
  472. icon: 'l-zhuti',
  473. data: {
  474. text: '主题',
  475. width: 200,
  476. height: 50,
  477. name: 'mindNode',
  478. borderRadius: 0.5,
  479. },
  480. },
  481. {
  482. name: '子主题',
  483. icon: 'l-zizhuti',
  484. data: {
  485. text: '子主题',
  486. width: 160,
  487. height: 40,
  488. name: 'mindLine',
  489. },
  490. },
  491. ],
  492. },
  493. {
  494. name: '流程图',
  495. show: true,
  496. list: [
  497. {
  498. name: '开始/结束',
  499. icon: 'l-flow-start',
  500. id: 21,
  501. data: {
  502. text: '开始/结束',
  503. width: 120,
  504. height: 40,
  505. borderRadius: 0.5,
  506. name: 'rectangle',
  507. },
  508. },
  509. {
  510. name: '流程',
  511. icon: 'l-rectangle',
  512. id: 22,
  513. data: {
  514. text: '流程',
  515. width: 120,
  516. height: 40,
  517. name: 'rectangle',
  518. },
  519. },
  520. {
  521. name: '判定',
  522. icon: 'l-diamond',
  523. id: 23,
  524. data: {
  525. text: '判定',
  526. width: 120,
  527. height: 60,
  528. name: 'diamond',
  529. },
  530. },
  531. {
  532. name: '数据',
  533. icon: 'l-flow-data',
  534. id: 24,
  535. data: {
  536. text: '数据',
  537. width: 120,
  538. height: 50,
  539. name: 'flowData',
  540. offsetX: 0.14,
  541. form: [
  542. {
  543. key: 'offsetX',
  544. name: '斜率',
  545. type: 'number',
  546. min: 0,
  547. step: 0.1,
  548. placeholder: '<= 1 即宽度的比例',
  549. },
  550. ] as FormItemType[],
  551. },
  552. },
  553. {
  554. name: '准备',
  555. icon: 'l-flow-ready',
  556. id: 25,
  557. data: {
  558. text: '准备',
  559. width: 120,
  560. height: 50,
  561. name: 'hexagon',
  562. },
  563. },
  564. {
  565. name: '子流程',
  566. icon: 'l-flow-subprocess',
  567. id: 26,
  568. data: {
  569. text: '子流程',
  570. width: 120,
  571. height: 50,
  572. name: 'flowSubprocess',
  573. },
  574. },
  575. {
  576. name: '数据库',
  577. icon: 'l-db',
  578. id: 27,
  579. data: {
  580. text: '数据库',
  581. width: 80,
  582. height: 120,
  583. name: 'flowDb',
  584. },
  585. },
  586. {
  587. name: '文档',
  588. icon: 'l-flow-document',
  589. id: 28,
  590. data: {
  591. text: '文档',
  592. width: 120,
  593. height: 100,
  594. name: 'flowDocument',
  595. },
  596. },
  597. {
  598. name: '内部存储',
  599. icon: 'l-internal-storage',
  600. id: 29,
  601. data: {
  602. text: '内部存储',
  603. width: 120,
  604. height: 80,
  605. name: 'flowInternalStorage',
  606. },
  607. },
  608. {
  609. name: '外部存储',
  610. icon: 'l-extern-storage',
  611. id: 30,
  612. data: {
  613. text: '外部存储',
  614. width: 120,
  615. height: 80,
  616. name: 'flowExternStorage',
  617. },
  618. },
  619. {
  620. name: '队列',
  621. icon: 'l-flow-queue',
  622. id: 31,
  623. data: {
  624. text: '队列',
  625. width: 100,
  626. height: 100,
  627. name: 'flowQueue',
  628. },
  629. },
  630. {
  631. name: '手动输入',
  632. icon: 'l-flow-manually',
  633. id: 32,
  634. data: {
  635. text: '手动输入',
  636. width: 120,
  637. height: 80,
  638. name: 'flowManually',
  639. },
  640. },
  641. {
  642. name: '展示',
  643. icon: 'l-flow-display',
  644. id: 33,
  645. data: {
  646. text: '展示',
  647. width: 120,
  648. height: 80,
  649. name: 'flowDisplay',
  650. },
  651. },
  652. {
  653. name: '并行模式',
  654. icon: 'l-flow-parallel',
  655. id: 34,
  656. data: {
  657. text: '并行模式',
  658. width: 120,
  659. height: 50,
  660. name: 'flowParallel',
  661. },
  662. },
  663. {
  664. name: '注释',
  665. icon: 'l-flow-comment',
  666. id: 35,
  667. data: {
  668. text: '注释',
  669. width: 100,
  670. height: 100,
  671. name: 'flowComment',
  672. },
  673. },
  674. ],
  675. },
  676. {
  677. name: '活动图',
  678. show: true,
  679. list: [
  680. {
  681. name: '开始',
  682. icon: 'l-inital',
  683. id: 36,
  684. data: {
  685. text: '',
  686. width: 30,
  687. height: 30,
  688. name: 'circle',
  689. background: '#555',
  690. lineWidth: 0,
  691. },
  692. },
  693. {
  694. name: '结束',
  695. icon: 'l-final',
  696. id: 37,
  697. data: {
  698. width: 30,
  699. height: 30,
  700. name: 'activityFinal',
  701. },
  702. },
  703. {
  704. name: '活动',
  705. icon: 'l-action',
  706. id: 38,
  707. data: {
  708. text: '活动',
  709. width: 120,
  710. height: 50,
  711. borderRadius: 0.25,
  712. name: 'rectangle',
  713. },
  714. },
  715. {
  716. name: '决策/合并',
  717. icon: 'l-diamond',
  718. id: 39,
  719. data: {
  720. text: '决策/合并',
  721. width: 120,
  722. height: 50,
  723. name: 'diamond',
  724. },
  725. },
  726. {
  727. name: '垂直泳道',
  728. icon: 'l-swimlane-v',
  729. id: 40,
  730. data: {
  731. text: '垂直泳道',
  732. width: 200,
  733. height: 500,
  734. name: 'swimlaneV',
  735. textBaseline: 'top',
  736. textTop: 20,
  737. // textHeight: ,
  738. lineTop: 0.08,
  739. },
  740. },
  741. {
  742. name: '水平泳道',
  743. icon: 'l-swimlane-h',
  744. id: 41,
  745. data: {
  746. text: '水平泳道',
  747. width: 500,
  748. height: 200,
  749. name: 'swimlaneH',
  750. textWidth: 0.01,
  751. textLeft: 0.04,
  752. textAlign: 'left',
  753. lineLeft: 0.08,
  754. },
  755. },
  756. {
  757. name: '垂直分岔/汇合',
  758. icon: 'l-fork-v',
  759. id: 42,
  760. data: {
  761. text: '垂直分岔/汇合',
  762. width: 10,
  763. height: 150,
  764. name: 'forkV',
  765. fillStyle: '#555',
  766. strokeStyle: 'transparent',
  767. },
  768. },
  769. {
  770. name: '水平分岔/汇合',
  771. icon: 'l-fork',
  772. id: 43,
  773. data: {
  774. text: '水平分岔/汇合',
  775. width: 150,
  776. height: 10,
  777. name: 'forkH',
  778. fillStyle: '#555',
  779. strokeStyle: 'transparent',
  780. },
  781. },
  782. ],
  783. },
  784. {
  785. name: '时序图和类图',
  786. show: true,
  787. list: [
  788. {
  789. name: '生命线',
  790. icon: 'l-lifeline',
  791. id: 44,
  792. data: {
  793. text: '生命线',
  794. width: 150,
  795. height: 400,
  796. textHeight: 50,
  797. name: 'lifeline',
  798. },
  799. },
  800. {
  801. name: '激活',
  802. icon: 'l-focus',
  803. id: 45,
  804. data: {
  805. text: '激活',
  806. width: 12,
  807. height: 200,
  808. name: 'sequenceFocus',
  809. },
  810. },
  811. {
  812. name: '简单类',
  813. icon: 'l-simple-class',
  814. id: 46,
  815. data: {
  816. text: 'Topolgoy',
  817. width: 270,
  818. height: 200,
  819. textHeight: 200,
  820. name: 'simpleClass',
  821. textAlign: 'center',
  822. textBaseline: 'top',
  823. textTop: 10,
  824. list: [
  825. {
  826. text: '- name: string\n+ setName(name: string): void',
  827. },
  828. ],
  829. },
  830. },
  831. {
  832. name: '类',
  833. icon: 'l-class',
  834. id: 47,
  835. data: {
  836. text: 'Topolgoy',
  837. width: 270,
  838. height: 200,
  839. textHeight: 200,
  840. name: 'interfaceClass',
  841. textAlign: 'center',
  842. textBaseline: 'top',
  843. textTop: 10,
  844. list: [
  845. {
  846. text: '- name: string',
  847. },
  848. {
  849. text: '+ setName(name: string): void',
  850. },
  851. ],
  852. },
  853. },
  854. ],
  855. },
  856. {
  857. name: '故障树',
  858. show: true,
  859. list: [
  860. {
  861. name: '与门',
  862. icon: 'l-ANDmen',
  863. data: {
  864. name: 'andGate',
  865. width: 100,
  866. height: 150,
  867. },
  868. },
  869. {
  870. name: '基本事件',
  871. icon: 'l-jibenshijian',
  872. data: {
  873. name: 'basicEvent',
  874. width: 100,
  875. height: 150,
  876. },
  877. },
  878. {
  879. name: '未展开事件',
  880. icon: 'l-weizhankaishijian',
  881. data: {
  882. name: 'unexpandedEvent',
  883. width: 100,
  884. height: 150,
  885. },
  886. },
  887. {
  888. name: '优先AND门',
  889. icon: 'l-youxianANDmen',
  890. data: {
  891. name: 'priorityAndGate',
  892. width: 100,
  893. height: 150,
  894. },
  895. },
  896. {
  897. name: '禁止门',
  898. icon: 'l-jinzhimen',
  899. data: {
  900. name: 'forbiddenGate',
  901. width: 100,
  902. height: 150,
  903. },
  904. },
  905. {
  906. name: '事件',
  907. icon: 'l-shijian',
  908. data: {
  909. name: 'event',
  910. width: 100,
  911. height: 150,
  912. },
  913. },
  914. {
  915. name: '开关事件',
  916. icon: 'l-kaiguanshijian',
  917. data: {
  918. name: 'switchEvent',
  919. width: 100,
  920. height: 150,
  921. },
  922. },
  923. {
  924. name: '条件事件',
  925. icon: 'l-tiaojianshijian',
  926. data: {
  927. name: 'conditionalEvent',
  928. width: 150,
  929. height: 100,
  930. },
  931. },
  932. {
  933. name: '转移符号',
  934. icon: 'l-zhuanyifuhao',
  935. data: {
  936. name: 'transferSymbol',
  937. width: 100,
  938. height: 150,
  939. },
  940. },
  941. {
  942. name: '或门',
  943. icon: 'l-ORmen',
  944. data: {
  945. name: 'orGate',
  946. width: 100,
  947. height: 150,
  948. },
  949. },
  950. {
  951. name: '异或门',
  952. icon: 'l-yihuomen',
  953. data: {
  954. name: 'xorGate',
  955. width: 100,
  956. height: 150,
  957. },
  958. },
  959. {
  960. name: '表决门',
  961. icon: 'l-biaojuemen',
  962. data: {
  963. name: 'votingGate',
  964. width: 100,
  965. height: 150,
  966. },
  967. },
  968. ],
  969. },
  970. ];
  971. export const formComponents = [
  972. {
  973. name: '基础',
  974. show: true,
  975. list: [
  976. {
  977. name: '文本',
  978. icon: 'l-wenben',
  979. data: {
  980. width: 160,
  981. height: 30,
  982. name: 'text',
  983. text: '乐吾乐le5le - 大屏可视化',
  984. textAutoAdjust: true,
  985. props: {
  986. custom: [
  987. {
  988. key: 'textAutoAdjust',
  989. label: '文本自动大小',
  990. type: 'bool',
  991. },
  992. ],
  993. },
  994. },
  995. },
  996. {
  997. name: '数字',
  998. icon: 'l-shuzi',
  999. data: {
  1000. width: 160,
  1001. height: 30,
  1002. name: 'text',
  1003. text: '3.1415926',
  1004. keepDecimal: 2,
  1005. },
  1006. },
  1007. {
  1008. name: '进度条',
  1009. icon: 'l-jindutiao',
  1010. data: {
  1011. anchors: [],
  1012. disableAnchor: true,
  1013. name: 'progress',
  1014. width: 164,
  1015. height: 6,
  1016. borderRadius: 0.5,
  1017. progressColor: '#4583FF',
  1018. progress: 0.8,
  1019. background: '#303746',
  1020. disableInput: true,
  1021. lineWidth: 0,
  1022. borderWidth: 0,
  1023. props: {
  1024. custom: [
  1025. {
  1026. key: 'progress',
  1027. label: '进度',
  1028. type: 'number',
  1029. max: 1,
  1030. min: 0,
  1031. },
  1032. {
  1033. key: 'progressColor',
  1034. label: '进度颜色',
  1035. type: 'color',
  1036. },
  1037. ],
  1038. },
  1039. },
  1040. },
  1041. {
  1042. name: '图标',
  1043. icon: 'l-tubiao',
  1044. data: {
  1045. width: 100,
  1046. height: 100,
  1047. name: 'image',
  1048. icon: '\uea86',
  1049. iconFamily: 'l-icon',
  1050. },
  1051. },
  1052. {
  1053. name: '图片',
  1054. icon: 'l-tupian',
  1055. data: {
  1056. width: 100,
  1057. height: 100,
  1058. name: 'image',
  1059. image: (cdn ? cdn + '/v' : '') + '/img/logo.png',
  1060. },
  1061. },
  1062. {
  1063. name: 'GIF',
  1064. icon: 'l-GIF',
  1065. data: {
  1066. width: 100,
  1067. height: 100,
  1068. name: 'gif',
  1069. image: (cdn ? cdn + '/v' : '') + '/png/电信机房/防火墙.gif',
  1070. },
  1071. },
  1072. {
  1073. name: '视频',
  1074. icon: 'l-shipin',
  1075. data: {
  1076. width: 200,
  1077. height: 200,
  1078. externElement: true,
  1079. name: 'video',
  1080. video:
  1081. 'https://video.699pic.com/videos/17/69/11/a_aa3jeKZ0D63g1556176911_10s.mp4',
  1082. props: {
  1083. custom: [
  1084. {
  1085. key: 'video',
  1086. label: '视频地址',
  1087. type: 'string',
  1088. },
  1089. ],
  1090. },
  1091. },
  1092. },
  1093. {
  1094. name: 'FLV视频流',
  1095. icon: 'l-pc',
  1096. data: {
  1097. name: 'flvPlayerDom',
  1098. width: 477,
  1099. height: 268,
  1100. externElement: true,
  1101. video:
  1102. 'https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/flv/xgplayer-demo-360p.flv',
  1103. mediaDataSource: {},
  1104. optionalConfig: {},
  1105. props: {
  1106. custom: [
  1107. {
  1108. key: 'video',
  1109. label: '视频地址',
  1110. type: 'string',
  1111. },
  1112. {
  1113. key: 'mediaDataSource',
  1114. label: '媒体数据源',
  1115. type: 'code',
  1116. placeholder:
  1117. '具体配置参考:https://github.com/bilibili/flv.js/blob/master/docs/api.md',
  1118. },
  1119. {
  1120. key: 'optionalConfig',
  1121. label: '配置',
  1122. type: 'code',
  1123. placeholder:
  1124. '具体配置参考:https://github.com/bilibili/flv.js/blob/master/docs/api.md',
  1125. },
  1126. ],
  1127. },
  1128. },
  1129. },
  1130. {
  1131. name: '音频',
  1132. icon: 'l-yinpin',
  1133. data: {
  1134. width: 200,
  1135. height: 40,
  1136. externElement: true,
  1137. name: 'video',
  1138. audio: 'https://www.xzmp3.com/down/597caee79849.mp3',
  1139. props: {
  1140. custom: [
  1141. {
  1142. key: 'audio',
  1143. label: '视频地址',
  1144. type: 'string',
  1145. },
  1146. ],
  1147. },
  1148. },
  1149. },
  1150. {
  1151. name: '头像',
  1152. icon: 'l-touxiang',
  1153. data: {
  1154. width: 30,
  1155. height: 30,
  1156. disableAnchor: true,
  1157. name: 'square',
  1158. lineWidth: 0,
  1159. image: (cdn ? cdn + '/v' : '') + '/img/avatar.png',
  1160. imageRadius: 0.5,
  1161. background: '#689f38',
  1162. borderRadius: 0.5,
  1163. ratio: true,
  1164. },
  1165. },
  1166. {
  1167. name: '徽标',
  1168. icon: 'l-huibiao',
  1169. data: {
  1170. width: 35,
  1171. height: 20,
  1172. name: 'square',
  1173. borderRadius: 0.5,
  1174. lineWidth: 0,
  1175. background: '#d54941',
  1176. color: '#fff',
  1177. text: '99+',
  1178. },
  1179. },
  1180. {
  1181. name: '标签',
  1182. icon: 'l-biaoqian',
  1183. data: {
  1184. text: 'success',
  1185. width: 80,
  1186. height: 24,
  1187. borderRadius: 0.1,
  1188. name: 'rectangle',
  1189. lineWidth: 1,
  1190. fontSize: 12,
  1191. icon: '\uea10',
  1192. iconFamily: 'l-icon',
  1193. iconColor: '#FFFFFF99', //#52c41a
  1194. iconSize: 12,
  1195. iconAlign: 'left',
  1196. iconLeft: 8,
  1197. textAlign: 'right',
  1198. color: '#FFFFFFAA',
  1199. background: '#282E3B', //#f6ffed
  1200. textLeft: -6,
  1201. },
  1202. },
  1203. ],
  1204. },
  1205. {
  1206. name: '时间',
  1207. show: true,
  1208. list: [
  1209. {
  1210. name: '时间',
  1211. icon: 'l-clock',
  1212. data: {
  1213. name: 'time',
  1214. width: 300,
  1215. height: 40,
  1216. text: '当前时间',
  1217. lineWidth: 0,
  1218. timeFormat:
  1219. '`${year}-${month}-${day} ${hours}:${minutes}:${seconds} 星期${week}`',
  1220. props: {
  1221. custom: [
  1222. {
  1223. key: 'timeFormat',
  1224. label: '显示格式',
  1225. type: 'string',
  1226. },
  1227. ],
  1228. },
  1229. },
  1230. },
  1231. {
  1232. name: '倒计时',
  1233. icon: 'l-daojishi',
  1234. data: {
  1235. name: 'countdown',
  1236. width: 300,
  1237. height: 40,
  1238. text: '倒计时',
  1239. deadline: '2024/1/1 00:00:00', //配置未来的时间
  1240. borderWidth: 0,
  1241. timeFormat:
  1242. '`距离2024年还有:${day}天${hours}时${minutes}分${seconds}秒`',
  1243. props: {
  1244. custom: [
  1245. {
  1246. key: 'timeFormat',
  1247. label: '显示格式',
  1248. type: 'string',
  1249. },
  1250. {
  1251. key: 'deadline',
  1252. label: '截止时间',
  1253. type: 'string',
  1254. },
  1255. ],
  1256. },
  1257. },
  1258. },
  1259. {
  1260. name: '水平时间轴',
  1261. icon: 'l-shuipingshijianzhou',
  1262. data: {
  1263. name: 'timeline',
  1264. width: 300,
  1265. height: 40,
  1266. hiddenText: true,
  1267. direction: 'horizontal',
  1268. labelAlign: 'top', //left/right/alternate/top/bottom
  1269. mode: 'alternate', //alternate
  1270. data: [
  1271. {
  1272. label: '2022-01-01',
  1273. content: '事件一',
  1274. circleBg: '#BFDBFF',
  1275. circleShadow: '#4583FF33',
  1276. color: '#BFDBFF',
  1277. textColor: '#FFFFFF',
  1278. // path: 'M71.3,61.9v2.21L56.66,66V63.82l3.27-.43.25-1-2.39.31V60.84l2.84-.37.21-.87-3.4.44V57.85l13.08-1.73v2.2l-6.85.9-.21.88,6-.79-.15,2.85ZM58.11,66.56,69.86,65v5.63L58.11,72.19Zm2.59,3.09,6.44-.84V67.52l-6.44.85ZM62.78,63l3.87-.51.07-.95L63,62.05Z',
  1279. },
  1280. {
  1281. label: '2022-02-01',
  1282. content: '事件二',
  1283. circleBg: '#BFDBFF',
  1284. circleShadow: '#4583FF33',
  1285. textColor: '#FFFFFF',
  1286. },
  1287. {
  1288. label: '2022-03-01',
  1289. content: '事件三',
  1290. textColor: '#FFFFFF66',
  1291. },
  1292. {
  1293. label: '2022-04-01',
  1294. content: '事件四',
  1295. textColor: '#FFFFFF66',
  1296. },
  1297. ],
  1298. text: '时间轴',
  1299. props: {
  1300. custom: [
  1301. {
  1302. key: 'mode',
  1303. label: '标签分布',
  1304. type: 'select',
  1305. options: [
  1306. { label: '同侧', value: 'same' },
  1307. { label: '交叉', value: 'alternate' },
  1308. ],
  1309. },
  1310. {
  1311. key: 'labelAlign',
  1312. label: '标签对齐',
  1313. type: 'select',
  1314. options: [
  1315. { label: '顶部', value: 'top' },
  1316. { label: '底部', value: 'bottom' },
  1317. ],
  1318. },
  1319. {
  1320. key: 'data',
  1321. label: '数据',
  1322. type: 'code',
  1323. },
  1324. ],
  1325. },
  1326. },
  1327. },
  1328. {
  1329. name: '垂直时间轴',
  1330. icon: 'l-chuizhishijianzhou',
  1331. data: {
  1332. name: 'timeline',
  1333. width: 40,
  1334. height: 300,
  1335. text: '时间轴',
  1336. hiddenText: true,
  1337. direction: 'vertical',
  1338. labelAlign: 'left', //left/right/alternate/top/bottom
  1339. mode: 'alternate', //alternate
  1340. data: [
  1341. {
  1342. label: '2022-01-01',
  1343. content: '事件一',
  1344. circleBg: '#BFDBFF',
  1345. circleShadow: '#4583FF33',
  1346. color: '#BFDBFF',
  1347. textColor: '#FFFFFF',
  1348. // path: 'M71.3,61.9v2.21L56.66,66V63.82l3.27-.43.25-1-2.39.31V60.84l2.84-.37.21-.87-3.4.44V57.85l13.08-1.73v2.2l-6.85.9-.21.88,6-.79-.15,2.85ZM58.11,66.56,69.86,65v5.63L58.11,72.19Zm2.59,3.09,6.44-.84V67.52l-6.44.85ZM62.78,63l3.87-.51.07-.95L63,62.05Z',
  1349. },
  1350. {
  1351. label: '2022-02-01',
  1352. content: '事件二',
  1353. circleBg: '#BFDBFF',
  1354. circleShadow: '#4583FF33',
  1355. textColor: '#FFFFFF',
  1356. },
  1357. {
  1358. label: '2022-03-01',
  1359. content: '事件三',
  1360. textColor: '#FFFFFF66',
  1361. },
  1362. {
  1363. label: '2022-04-01',
  1364. content: '事件四',
  1365. textColor: '#FFFFFF66',
  1366. },
  1367. ],
  1368. props: {
  1369. custom: [
  1370. {
  1371. key: 'mode',
  1372. label: '标签分布',
  1373. type: 'select',
  1374. options: [
  1375. { label: '同侧', value: 'same' },
  1376. { label: '交叉', value: 'alternate' },
  1377. ],
  1378. },
  1379. {
  1380. key: 'labelAlign',
  1381. label: '标签对齐',
  1382. type: 'select',
  1383. options: [
  1384. { label: '靠左', value: 'left' },
  1385. { label: '靠右', value: 'right' },
  1386. ],
  1387. },
  1388. {
  1389. key: 'data',
  1390. label: '数据',
  1391. type: 'code',
  1392. },
  1393. ],
  1394. },
  1395. },
  1396. },
  1397. {
  1398. name: '日历(日期)',
  1399. icon: 'l-rili',
  1400. data: {
  1401. width: 280,
  1402. height: 326,
  1403. hiddenText: true,
  1404. name: 'calendar',
  1405. background: '#fff0',
  1406. hoverTextColor: '#fff',
  1407. dbInput: true,
  1408. // input: true,
  1409. text: '8月',
  1410. },
  1411. },
  1412. {
  1413. name: '日历(日期时间)',
  1414. icon: 'l-rili',
  1415. data: {
  1416. width: 496,
  1417. height: 326,
  1418. hiddenText: true,
  1419. name: 'calendar',
  1420. background: '#fff0',
  1421. hoverTextColor: '#fff',
  1422. dbInput: true,
  1423. // input: true,
  1424. text: '8月',
  1425. calendarType: 'time',
  1426. },
  1427. },
  1428. ],
  1429. },
  1430. {
  1431. name: '面板',
  1432. show: true,
  1433. list: [
  1434. {
  1435. name: '列表',
  1436. icon: 'l-liebiao',
  1437. data: {
  1438. width: 400,
  1439. height: 200,
  1440. name: 'list',
  1441. headingColor: '#FFFFFFE6',
  1442. headingSize: 16,
  1443. background: '#282E3B',
  1444. textColor: '#FFFFFF66',
  1445. hoverTextColor: '#FFFFFF66',
  1446. data: [
  1447. {
  1448. title: '列表标题',
  1449. description: '列表内容的描述性文字',
  1450. },
  1451. {
  1452. title: '列表标题',
  1453. description: '列表内容的描述性文字',
  1454. },
  1455. {
  1456. title: '列表标题',
  1457. description: '列表内容的描述性文字',
  1458. },
  1459. ],
  1460. props: {
  1461. custom: [
  1462. {
  1463. key: 'data',
  1464. label: '数据',
  1465. type: 'code',
  1466. },
  1467. ],
  1468. },
  1469. },
  1470. },
  1471. {
  1472. name: '表格',
  1473. icon: 'l-biaoge',
  1474. data: {
  1475. name: 'table2',
  1476. width: 0,
  1477. height: 0,
  1478. disableAnchor: true,
  1479. colWidth: 150,
  1480. rowHeight: 40,
  1481. data: [
  1482. ['设备 ID', '设备名称', '数据协议', '状态', '操作'],
  1483. ['1', '200', 'MQTT', '正在运行', {}],
  1484. ['2', '湿度传感器', 'MQTT', '正在运行', {}],
  1485. ['3', '物联网设备', 'MQTT', '正在运行', {}],
  1486. ['4', '物联网设备/智能家居/智慧城市', 'MQTT', '正在运行', {}],
  1487. ],
  1488. styles: [
  1489. {
  1490. row: 1,
  1491. col: 1,
  1492. color: '#ff0000',
  1493. background: '#ffff00',
  1494. wheres: [
  1495. //触发条件 成立后才允许配置样式
  1496. {
  1497. comparison: '<=',
  1498. value: '123',
  1499. },
  1500. ],
  1501. },
  1502. {
  1503. row: 0,
  1504. height: 60,
  1505. },
  1506. {
  1507. col: 4,
  1508. width: 200, //为该列设置额外的节点
  1509. pens: [
  1510. {
  1511. name: 'rectangle',
  1512. width: 50,
  1513. height: 20,
  1514. text: '编辑',
  1515. fontSize: 0.6,
  1516. disableAnchor: true,
  1517. activeBackground: '#2D71EC',
  1518. activeColor: '#40a9ff',
  1519. background: '#4583FF',
  1520. color: '#1890ff',
  1521. hoverBackground: '#7DA4FF',
  1522. hoverColor: '#40a9ff',
  1523. textColor: '#ffffff',
  1524. hoverTextColor: '#ffffff',
  1525. activeTextColor: '#ffffff',
  1526. events: [
  1527. {
  1528. action: 5,
  1529. name: 'click',
  1530. value: 'alert("点击了编辑")',
  1531. },
  1532. ],
  1533. },
  1534. {
  1535. name: 'rectangle',
  1536. width: 80,
  1537. height: 20,
  1538. text: '实时数据',
  1539. fontSize: 0.6,
  1540. disableAnchor: true,
  1541. activeBackground: '#2D71EC',
  1542. activeColor: '#40a9ff',
  1543. background: '#4583FF',
  1544. color: '#1890ff',
  1545. hoverBackground: '#7DA4FF',
  1546. hoverColor: '#40a9ff',
  1547. textColor: '#ffffff',
  1548. hoverTextColor: '#ffffff',
  1549. activeTextColor: '#ffffff',
  1550. events: [
  1551. {
  1552. action: 5,
  1553. name: 'click',
  1554. value: 'alert("点击了实时数据")',
  1555. },
  1556. ],
  1557. },
  1558. ],
  1559. },
  1560. ],
  1561. props: {
  1562. custom: [
  1563. {
  1564. key: 'data',
  1565. label: '数据',
  1566. type: 'code',
  1567. },
  1568. {
  1569. key: 'styles',
  1570. label: '样式',
  1571. type: 'code',
  1572. },
  1573. ],
  1574. },
  1575. },
  1576. },
  1577. {
  1578. name: '斑马纹表格',
  1579. icon: 'l-biaoge',
  1580. data: {
  1581. name: 'table2',
  1582. width: 0,
  1583. height: 0,
  1584. disableAnchor: true,
  1585. colWidth: 90,
  1586. rowHeight: 32,
  1587. bordered: false,
  1588. vLine: false,
  1589. hLine: false,
  1590. stripe: true,
  1591. stripeColor: '#407FFF1F', //'#15181c',
  1592. // hasHeader: false,
  1593. textColor: '#FFFFFF',
  1594. data: [
  1595. ['设备 ID', '设备名称', '数据协议', '级别'],
  1596. [
  1597. '1',
  1598. '200',
  1599. 'MQTT',
  1600. {
  1601. text: '一级告警',
  1602. // background: '#650b09',
  1603. textColor: '#FF5D3CFF',
  1604. },
  1605. ],
  1606. [
  1607. '2',
  1608. '湿度传感器',
  1609. 'MQTT',
  1610. {
  1611. text: '二级告警',
  1612. // background: '#4d2a02',
  1613. textColor: '#E6A82EFF',
  1614. },
  1615. ],
  1616. [
  1617. '3',
  1618. '物联网设备',
  1619. 'MQTT',
  1620. {
  1621. text: '一级告警',
  1622. // background: '#650b09',
  1623. textColor: '#FF5D3CFF',
  1624. },
  1625. ],
  1626. [
  1627. '4',
  1628. '物联网设备/智能家居/智慧城市',
  1629. 'MQTT',
  1630. {
  1631. text: '三级告警',
  1632. textColor: '#58CC84FF',
  1633. // background: '#042617;',
  1634. },
  1635. ],
  1636. ],
  1637. styles: [
  1638. {
  1639. row: 0,
  1640. textColor: '#ffffff66',
  1641. },
  1642. {
  1643. col: 3,
  1644. pens: [
  1645. {
  1646. name: 'rectangle',
  1647. width: 56,
  1648. height: 20,
  1649. fontSize: 0.6,
  1650. disableAnchor: true,
  1651. lineWidth: 0,
  1652. },
  1653. ],
  1654. },
  1655. ],
  1656. props: {
  1657. custom: [
  1658. {
  1659. key: 'stripe',
  1660. label: '显示斑马纹',
  1661. type: 'bool',
  1662. },
  1663. {
  1664. key: 'stripeColor',
  1665. label: '斑马纹颜色',
  1666. type: 'color',
  1667. },
  1668. {
  1669. key: 'bordered',
  1670. label: '外边框',
  1671. type: 'bool',
  1672. },
  1673. {
  1674. key: 'hLine',
  1675. label: '水平线',
  1676. type: 'bool',
  1677. },
  1678. {
  1679. key: 'vLine',
  1680. label: '垂直线',
  1681. type: 'bool',
  1682. },
  1683. {
  1684. key: 'hasHeader',
  1685. label: '有无头部',
  1686. type: 'bool',
  1687. },
  1688. {
  1689. key: 'data',
  1690. label: '数据',
  1691. type: 'code',
  1692. },
  1693. {
  1694. key: 'styles',
  1695. label: '样式',
  1696. type: 'code',
  1697. },
  1698. ],
  1699. },
  1700. },
  1701. },
  1702. {
  1703. name: '树',
  1704. icon: 'l-shu', //l-shu
  1705. data: {
  1706. name: 'tree',
  1707. width: 150,
  1708. height: 210,
  1709. expanded: ['1', '2'],
  1710. fontSize: 20,
  1711. disableInput: true,
  1712. textColor: '#FFFFFF',
  1713. hoverTextColor: '#FFFFFF',
  1714. // iconFamily:'l-icon',
  1715. // icon:'\ue607',
  1716. data: [
  1717. {
  1718. key: '1',
  1719. label: '1',
  1720. children: [
  1721. {
  1722. key: '1-1',
  1723. label: '1-1',
  1724. },
  1725. {
  1726. key: '1-1',
  1727. label: '1-2',
  1728. },
  1729. ],
  1730. },
  1731. {
  1732. key: '2',
  1733. label: '2',
  1734. children: [
  1735. {
  1736. key: '2-1',
  1737. label: '2-1',
  1738. children: [
  1739. {
  1740. key: '2-1-1',
  1741. label: '2-1-1',
  1742. },
  1743. {
  1744. key: '2-1-2',
  1745. label: '2-2-2',
  1746. },
  1747. ],
  1748. },
  1749. {
  1750. key: '2-2',
  1751. label: '2-2',
  1752. },
  1753. ],
  1754. },
  1755. {
  1756. key: '3',
  1757. label: '3',
  1758. },
  1759. ],
  1760. props: {
  1761. custom: [
  1762. {
  1763. key: 'expandAll',
  1764. label: '展开全部节点',
  1765. type: 'bool',
  1766. },
  1767. {
  1768. key: 'data',
  1769. label: '数据',
  1770. type: 'code',
  1771. },
  1772. ],
  1773. },
  1774. },
  1775. },
  1776. {
  1777. name: '网页',
  1778. icon: 'l-iframe',
  1779. data: {
  1780. name: 'iframe',
  1781. width: 500,
  1782. height: 400,
  1783. externElement: true,
  1784. iframe: 'https://le5le.com',
  1785. props: {
  1786. custom: iframeCustom,
  1787. },
  1788. },
  1789. },
  1790. ],
  1791. },
  1792. {
  1793. name: '提醒',
  1794. show: true,
  1795. list: [
  1796. {
  1797. name: '业务指标',
  1798. icon: 'l-yewuzhibiao',
  1799. data: {
  1800. width: 115,
  1801. height: 25,
  1802. name: 'indicator',
  1803. data: [
  1804. {
  1805. type: 'text',
  1806. color: '#FFFFFFD9',
  1807. x: 0,
  1808. text: '业务指标',
  1809. },
  1810. {
  1811. type: 'icon',
  1812. x: 0.5,
  1813. size: 0.5, //高度的倍数
  1814. color: '#ff0000',
  1815. background: '#f00',
  1816. path: 'M116.77950993 500.07050546c15.9195644 15.9195644 41.65144342 15.9195644 57.57100785 0L471.28500154 203.13602167 471.28500154 919.14998461c0 22.47467916 18.24031931 40.71499846 40.71499846 40.71499845s40.71499846-18.24031931 40.71499846-40.71499845l0-716.01396294 296.93448376 296.93448379c15.9195644 15.9195644 41.65144342 15.9195644 57.57100785 0s15.9195644-41.65144342 1e-8-57.57100783l-366.43498616-366.39427116c-3.74577985-3.78649485-8.26514469-6.75868973-13.27308951-8.83515464C522.5858996 65.19360688 517.29294978 64.13501693 512 64.13501694s-10.5858996 1.05858996-15.55312942 3.13505489c-5.00794479 2.07646491-9.48659464 5.0486598-13.27308948 8.83515464l-366.43498616 366.39427115C100.85994556 458.41906201 100.85994555 484.15094105 116.77950993 500.07050546z',
  1817. },
  1818. {
  1819. textColor: '#f00',
  1820. type: 'text',
  1821. color: '',
  1822. x: 0.6,
  1823. text: '20%',
  1824. },
  1825. ],
  1826. props: {
  1827. custom: [
  1828. {
  1829. key: 'data',
  1830. label: '数据',
  1831. type: 'code',
  1832. },
  1833. ],
  1834. },
  1835. },
  1836. },
  1837. {
  1838. name: '全局消息',
  1839. icon: 'l-quanjuxiaoxi',
  1840. data: {
  1841. width: 200,
  1842. height: 40,
  1843. text: '用于表示普通操作信息提示',
  1844. borderRadius: 6,
  1845. name: 'rectangle',
  1846. icon: '\ue6e4',
  1847. iconFamily: 'l-icon',
  1848. iconColor: '#4583ff',
  1849. iconSize: 17.5,
  1850. iconAlign: 'left',
  1851. iconLeft: 10,
  1852. textAlign: 'left',
  1853. color: 'rgba(235, 235, 235, 1)',
  1854. background: '#282E3B',
  1855. textLeft: 30,
  1856. lineWidth: 0,
  1857. shadow: false,
  1858. textColor: '#FFFFFF',
  1859. hoverTextColor: 'rgba(0, 0, 0, 1)',
  1860. shadowColor: '#00000014',
  1861. shadowOffsetX: 6,
  1862. shadowOffsetY: 6,
  1863. shadowBlur: 20,
  1864. },
  1865. },
  1866. {
  1867. name: '通知',
  1868. icon: 'l-tongzhi',
  1869. data: {
  1870. width: 360,
  1871. height: 178,
  1872. text: '通知具体内容;通知具体内容;通知具体内容;通知具体内容;通知具体内容;通知具体内容;通知具体内容;通知具体内容;通知具体内容;',
  1873. borderRadius: 6,
  1874. name: 'notification',
  1875. icon: '\ue6e4',
  1876. iconFamily: 'l-icon',
  1877. iconColor: '#4583ff',
  1878. iconSize: 18,
  1879. iconAlign: 'left-top',
  1880. iconLeft: 15,
  1881. iconTop: 20,
  1882. textAlign: 'left',
  1883. textBaseline: 'top',
  1884. textLeft: 40,
  1885. textTop: 50,
  1886. color: 'rgba(235, 235, 235, 1)',
  1887. background: '#282E3B',
  1888. shadow: false,
  1889. textColor: '#FFFFFF99',
  1890. hoverTextColor: '#666666',
  1891. shadowColor: '#0000000D',
  1892. shadowOffsetX: 6,
  1893. shadowOffsetY: 6,
  1894. textWidth: 300,
  1895. shadowBlur: 24,
  1896. heading: '标题名称',
  1897. headingColor: '#FFFFFFE6',
  1898. headingSize: 16,
  1899. // headingWeight: 'bold',
  1900. props: {
  1901. custom: [
  1902. {
  1903. key: 'heading',
  1904. label: '标题',
  1905. type: 'string',
  1906. },
  1907. {
  1908. key: 'headingColor',
  1909. label: '标题颜色',
  1910. type: 'color',
  1911. },
  1912. {
  1913. key: 'headingSize',
  1914. label: '标题大小',
  1915. type: 'number',
  1916. },
  1917. {
  1918. key: 'headingWeight',
  1919. label: '标题加粗',
  1920. type: 'select',
  1921. options: [
  1922. { label: '加粗', value: 'bold' },
  1923. { label: '正常', value: '' },
  1924. ],
  1925. },
  1926. ],
  1927. },
  1928. },
  1929. },
  1930. // {
  1931. // name: '对话框',
  1932. // icon: 'l-pc',
  1933. // data: {
  1934. // width: 200,
  1935. // height: 200,
  1936. // },
  1937. // },
  1938. ],
  1939. },
  1940. {
  1941. name: '轮播',
  1942. show: true,
  1943. list: [
  1944. {
  1945. name: '水平轮播',
  1946. icon: 'l-paomadeng',
  1947. data: {
  1948. name: 'swiperline',
  1949. width: 200,
  1950. height: 40,
  1951. data: ['轮播第一次数据', '轮播第二次数据', '轮播第三次数据'],
  1952. hiddenText: true,
  1953. props: {
  1954. custom: [
  1955. {
  1956. key: 'data',
  1957. label: '数据',
  1958. type: 'code',
  1959. },
  1960. {
  1961. key: 'timeout',
  1962. label: '轮播时间',
  1963. type: 'number',
  1964. },
  1965. ],
  1966. },
  1967. },
  1968. },
  1969. {
  1970. name: '垂直轮播',
  1971. icon: 'l-chuizhigundong',
  1972. data: {
  1973. name: 'swiperline',
  1974. width: 200,
  1975. height: 24,
  1976. direction: 'vertical',
  1977. lineHeight: 2,
  1978. data: ['轮播第一次数据', '轮播第二次数据', '轮播第三次数据'],
  1979. hiddenText: true,
  1980. props: {
  1981. custom: [
  1982. {
  1983. key: 'data',
  1984. label: '数据',
  1985. type: 'code',
  1986. },
  1987. {
  1988. key: 'timeout',
  1989. label: '轮播时间',
  1990. type: 'number',
  1991. },
  1992. ],
  1993. },
  1994. },
  1995. },
  1996. {
  1997. name: '轮播图',
  1998. icon: 'l-lunbotu',
  1999. data: {
  2000. name: 'swiperDom',
  2001. width: 400,
  2002. height: 300,
  2003. data: [
  2004. {
  2005. src: 'https://2ds.le5le.com/img/banner1.bc890350.png',
  2006. },
  2007. {
  2008. src: 'https://2ds.le5le.com/img/banner2.adab6a6e.png',
  2009. },
  2010. {
  2011. src: 'https://2ds.le5le.com/img/banner3.86b53aed.png',
  2012. },
  2013. ],
  2014. hiddenText: true,
  2015. props: {
  2016. custom: [
  2017. {
  2018. key: 'data',
  2019. label: '数据',
  2020. type: 'code',
  2021. },
  2022. ],
  2023. },
  2024. },
  2025. },
  2026. {
  2027. name: '轮播页面',
  2028. icon: 'l-lunboyemian',
  2029. data: {
  2030. name: 'swiperDom',
  2031. width: 400,
  2032. height: 300,
  2033. swiperType: 'iframe',
  2034. data: [
  2035. {
  2036. src: 'https://2d.le5le.com/preview?id=6357a9e2d44b9402de84d2e8',
  2037. },
  2038. {
  2039. src: 'https://2d.le5le.com/preview?id=6357aec8d44b9402de84d2f1',
  2040. },
  2041. {
  2042. src: 'https://2d.le5le.com/preview?id=641d524a8df2c654ea652d7e',
  2043. },
  2044. ],
  2045. hiddenText: true,
  2046. props: {
  2047. custom: [
  2048. {
  2049. key: 'data',
  2050. label: '数据',
  2051. type: 'code',
  2052. },
  2053. ],
  2054. },
  2055. },
  2056. },
  2057. ],
  2058. },
  2059. {
  2060. name: '导航',
  2061. show: true,
  2062. list: [
  2063. {
  2064. name: '链接',
  2065. icon: 'l-lianjie',
  2066. data: {
  2067. text: '乐吾乐2D编辑器',
  2068. width: 100,
  2069. height: 30,
  2070. name: 'text',
  2071. textColor: '#0052d9',
  2072. events: [
  2073. {
  2074. name: 'click',
  2075. actions: [
  2076. {
  2077. action: 0,
  2078. params: '_blank',
  2079. value: 'https://2d.le5le.com/',
  2080. },
  2081. ],
  2082. },
  2083. ],
  2084. },
  2085. },
  2086. {
  2087. name: '返回',
  2088. icon: 'l-fanhui',
  2089. data: {
  2090. width: 40,
  2091. height: 40,
  2092. name: 'image',
  2093. icon: '\ue697',
  2094. iconFamily: 'l-icon',
  2095. events: [
  2096. {
  2097. name: 'click',
  2098. actions: [
  2099. {
  2100. action: 5,
  2101. value: 'window.history.go(-1);',
  2102. },
  2103. ],
  2104. },
  2105. ],
  2106. },
  2107. },
  2108. {
  2109. name: '锚点',
  2110. icon: 'l-anchor',
  2111. data: {
  2112. width: 40,
  2113. height: 40,
  2114. name: 'image',
  2115. icon: '\uea7b',
  2116. iconFamily: 'l-icon',
  2117. events: [
  2118. // {
  2119. // action: 5,
  2120. // name: 'click',
  2121. // params: 'pen.id/tag',
  2122. // value:
  2123. // 'let pens = context.meta2d.find(params);\r\nif (!pens.length) {\r\n pens = [pen]\r\n}\r\ncontext.meta2d.active(pens, true);\r\ncontext.meta2d.gotoView(pens[0]);\r\ncontext.meta2d.resize();\r\ncontext.meta2d.render();',
  2124. // where: { type: null },
  2125. // },
  2126. {
  2127. name: 'click',
  2128. actions: {
  2129. action: 5,
  2130. params: 'pen.id/tag',
  2131. value:
  2132. 'let pens = context.meta2d.find(params);\r\nif (!pens.length) {\r\n pens = [pen]\r\n}\r\ncontext.meta2d.active(pens, true);\r\ncontext.meta2d.gotoView(pens[0]);\r\ncontext.meta2d.resize();\r\ncontext.meta2d.render();',
  2133. },
  2134. },
  2135. ],
  2136. },
  2137. },
  2138. {
  2139. name: '回到顶部',
  2140. icon: 'l-huidaodingbu',
  2141. data: {
  2142. width: 64,
  2143. height: 64,
  2144. name: 'rectangle',
  2145. activeBackground: '#282E3B',
  2146. background: '#282E3B',
  2147. borderRadius: 0.1,
  2148. color: '#eee',
  2149. hoverBackground: '#282E3B',
  2150. hoverColor: '#eee',
  2151. hoverTextColor: '#FFFFFFE6',
  2152. iconAlign: 'top',
  2153. iconColor: '#FFFFFFE6',
  2154. iconSize: 20,
  2155. iconTop: 10,
  2156. text: 'TOP',
  2157. textBaseline: 'bottom',
  2158. lineWidth: 0,
  2159. textColor: '#FFFFFFE6',
  2160. textTop: -2,
  2161. icon: '\uec57',
  2162. iconFamily: 'l-icon',
  2163. events: [
  2164. // {
  2165. // action: 5,
  2166. // name: 'click',
  2167. // // params: 'pen.id/tag',
  2168. // value: `
  2169. // const { scale, origin, y: dataY } = context.meta2d.store.data;
  2170. // context.meta2d.translate(
  2171. // 0,
  2172. // ((parseInt(params)||32) * context.meta2d.store.data.scale - origin.y) / scale - dataY / scale
  2173. // );`,
  2174. // where: { type: null },
  2175. // },
  2176. {
  2177. name: 'click',
  2178. actions: [
  2179. {
  2180. action: 0,
  2181. params: '_blank',
  2182. value: 'https://2d.le5le.com/',
  2183. },
  2184. ],
  2185. },
  2186. ],
  2187. },
  2188. },
  2189. {
  2190. name: '面包屑',
  2191. icon: 'l-mianbaoxie', //l-mianbaoxie
  2192. data: {
  2193. name: 'breadcrumb',
  2194. width: 200,
  2195. height: 20,
  2196. data: [
  2197. {
  2198. key: '1',
  2199. text: '页面1',
  2200. to: 'https://www.baidu.com',
  2201. target: '_blank',
  2202. },
  2203. {
  2204. key: '2',
  2205. text: '页面2',
  2206. to: 'https://2d.le5le.com/?id=641d524a8df2c654ea652d7e',
  2207. target: '_blank',
  2208. },
  2209. {
  2210. key: '3',
  2211. text: '页面3',
  2212. to: 'https://2d.le5le.com/?id=6357a9e2d44b9402de84d2e8',
  2213. target: '_self',
  2214. },
  2215. ],
  2216. props: {
  2217. custom: [
  2218. {
  2219. key: 'gap',
  2220. label: '间距',
  2221. type: 'number',
  2222. min: 0,
  2223. },
  2224. {
  2225. key: 'data',
  2226. label: '数据',
  2227. type: 'code',
  2228. },
  2229. ],
  2230. },
  2231. },
  2232. },
  2233. {
  2234. name: '下拉菜单',
  2235. icon: 'l-xialacaidan',
  2236. data: {
  2237. name: 'headMenuDom',
  2238. width: 650,
  2239. height: 60,
  2240. externElement: true,
  2241. selectedKeys: ['1'],
  2242. // activeColor: '#4E85E5',
  2243. iconPosition: 'left',
  2244. data: [
  2245. {
  2246. key: '1',
  2247. icon: 'l-icon l-user',
  2248. title: '个人中心',
  2249. children: [
  2250. {
  2251. key: '1-1',
  2252. icon: 'l-icon l-fly',
  2253. title: '测试测试',
  2254. },
  2255. ],
  2256. },
  2257. {
  2258. key: '2',
  2259. icon: 'l-icon l-panel',
  2260. title: '安全运行',
  2261. },
  2262. {
  2263. key: '3',
  2264. icon: 'l-icon l-align-center',
  2265. title: '智慧能源',
  2266. },
  2267. {
  2268. key: '4',
  2269. icon: 'l-icon l-kongzhuangtai1',
  2270. title: '数据分析',
  2271. },
  2272. {
  2273. key: '5',
  2274. icon: 'l-icon l-quanjutishi',
  2275. title: '运维管理',
  2276. },
  2277. ],
  2278. },
  2279. },
  2280. {
  2281. name: '导航菜单',
  2282. icon: 'l-daohangcaidan',
  2283. data: {
  2284. name: 'menuDom',
  2285. width: 200,
  2286. height: 400,
  2287. externElement: true,
  2288. data: [
  2289. {
  2290. title: '实时监测',
  2291. key: '0',
  2292. show: true,
  2293. icon: 'l-icon l-suofang',
  2294. children: [
  2295. {
  2296. title: '站点看板',
  2297. key: '',
  2298. show: true,
  2299. icon: 'l-icon l-fenzuzhuzhuangtu',
  2300. children: [
  2301. {
  2302. title: '三级标题',
  2303. key: '',
  2304. show: true,
  2305. },
  2306. {
  2307. title: '三级标题',
  2308. key: '',
  2309. show: true,
  2310. },
  2311. ],
  2312. },
  2313. {
  2314. title: '监控画面',
  2315. key: '',
  2316. show: true,
  2317. icon: 'l-icon l-biaoge',
  2318. },
  2319. {
  2320. title: '设备监控',
  2321. key: '',
  2322. show: true,
  2323. icon: 'l-icon l-zhexiantu',
  2324. },
  2325. ],
  2326. },
  2327. {
  2328. title: '控制中心',
  2329. key: '',
  2330. show: true,
  2331. icon: 'l-icon l-tiaoxingtu',
  2332. },
  2333. {
  2334. title: '告警管理',
  2335. key: '',
  2336. show: true,
  2337. icon: 'l-icon l-zhishideng',
  2338. },
  2339. ],
  2340. expand: true,
  2341. },
  2342. },
  2343. {
  2344. name: '分页',
  2345. icon: 'l-fenye', //l-fenye
  2346. data: {
  2347. name: 'pagination',
  2348. width: 300,
  2349. height: 200,
  2350. size: 'small',
  2351. total: 25,
  2352. pageSize: 5,
  2353. current: 1,
  2354. maxPageBtn: 5,
  2355. disableInput: true,
  2356. pageSizeOptions: [5, 10, 20, 30],
  2357. props: {
  2358. custom: [
  2359. {
  2360. key: 'total',
  2361. label: '数据总条数',
  2362. type: 'number',
  2363. min: 0,
  2364. },
  2365. {
  2366. key: 'pageSize',
  2367. label: '每页数据量',
  2368. type: 'number',
  2369. },
  2370. {
  2371. key: 'pageSizeOptions',
  2372. label: '分页大小',
  2373. type: 'code',
  2374. },
  2375. // {
  2376. // key: 'maxPageBtn',
  2377. // label: '最多显示页码数按钮数',
  2378. // type: 'number',
  2379. // },
  2380. ],
  2381. },
  2382. },
  2383. },
  2384. {
  2385. name: '步骤条',
  2386. icon: 'l-buzhoutiao',
  2387. data: {
  2388. name: 'steps',
  2389. width: 500,
  2390. height: 40,
  2391. hiddenText: true,
  2392. direction: 'horizontal', //horizontal/vertical
  2393. labelAlign: '', //left/right/alternate/top/bottom
  2394. // theme: 'dot', //dot
  2395. current: 2,
  2396. data: [
  2397. {
  2398. title: '已完成的步骤',
  2399. content: '这里是提示文字',
  2400. status: 'finish', //default/process/finish/error
  2401. // path: 'M71.3,61.9v2.21L56.66,66V63.82l3.27-.43.25-1-2.39.31V60.84l2.84-.37.21-.87-3.4.44V57.85l13.08-1.73v2.2l-6.85.9-.21.88,6-.79-.15,2.85ZM58.11,66.56,69.86,65v5.63L58.11,72.19Zm2.59,3.09,6.44-.84V67.52l-6.44.85ZM62.78,63l3.87-.51.07-.95L63,62.05Z',
  2402. },
  2403. {
  2404. title: '出错的步骤',
  2405. content: '这里是提示文字',
  2406. status: 'error', //default/process/finish/error
  2407. },
  2408. {
  2409. title: '进行中的步骤',
  2410. content: '这里是提示文字',
  2411. status: 'process', //default/process/finish/error
  2412. },
  2413. {
  2414. title: '未完成的步骤',
  2415. content: '这里是提示文字',
  2416. status: 'default', //default/process/finish/error
  2417. },
  2418. ],
  2419. },
  2420. },
  2421. {
  2422. name: '选项卡',
  2423. icon: 'l-xuanxiangka',
  2424. data: {
  2425. name: 'tab',
  2426. width: 500,
  2427. height: 50,
  2428. direction: 'horizontal',
  2429. selectKey: '1',
  2430. selectedKeys: [],
  2431. theme: '',
  2432. disableInput: true,
  2433. data: [
  2434. { text: '场景一', key: '0', isForbidden: true },
  2435. { text: '场景二', key: '1' },
  2436. { text: '场景三', key: '2' },
  2437. { text: '场景四', key: '3' },
  2438. ],
  2439. props: {
  2440. custom: [
  2441. {
  2442. key: 'data',
  2443. label: '数据',
  2444. type: 'code',
  2445. },
  2446. ],
  2447. },
  2448. },
  2449. },
  2450. {
  2451. name: '多选选项卡',
  2452. icon: 'l-duoxiangxuanxiangka',
  2453. data: {
  2454. name: 'tab',
  2455. width: 500,
  2456. height: 50,
  2457. direction: 'horizontal',
  2458. selectedKeys: ['0'],
  2459. theme: 'multiple',
  2460. disableInput: true,
  2461. data: [
  2462. { text: '场景一', key: '0' },
  2463. { text: '场景二', key: '1', isForbidden: true },
  2464. { text: '场景三', key: '2' },
  2465. { text: '场景四', key: '3' },
  2466. ],
  2467. props: {
  2468. custom: [
  2469. {
  2470. key: 'data',
  2471. label: '数据',
  2472. type: 'code',
  2473. },
  2474. ],
  2475. },
  2476. },
  2477. },
  2478. ],
  2479. },
  2480. {
  2481. name: '输入',
  2482. show: true,
  2483. list: [
  2484. {
  2485. name: '按钮',
  2486. icon: 'l-anniu',
  2487. data: {
  2488. name: 'rectangle',
  2489. x: 300,
  2490. y: 200,
  2491. width: 80,
  2492. height: 30,
  2493. disableAnchor: true,
  2494. borderRadius: 2,
  2495. text: '按钮',
  2496. activeBackground: '#2D71EC',
  2497. activeColor: '#40a9ff',
  2498. background: '#4583FF',
  2499. color: '#1890ff',
  2500. hoverBackground: '#40a9ff',
  2501. hoverColor: '#7DA4FF',
  2502. textColor: '#ffffff',
  2503. hoverTextColor: '#ffffff',
  2504. activeTextColor: '#ffffff',
  2505. },
  2506. },
  2507. {
  2508. name: '文本输入框',
  2509. icon: 'l-wenbenshurukuang',
  2510. data: {
  2511. x: 100,
  2512. y: 100,
  2513. height: 40,
  2514. width: 200,
  2515. disableAnchor: true,
  2516. name: 'rectangle',
  2517. borderRadius: 0.05,
  2518. input: true,
  2519. ellipsis: true,
  2520. text: '输入文本',
  2521. textAlign: 'left',
  2522. background: '#15181C',
  2523. color: '#424B61',
  2524. textColor: '#FFFFFFE6',
  2525. // color: '#D9D9D9FF',
  2526. // hoverTextColor: '#000000FF',
  2527. // activeTextColor: '#000000FF',
  2528. textLeft: 10,
  2529. },
  2530. },
  2531. {
  2532. name: '数字输入框',
  2533. icon: 'l-shuzishurukuang',
  2534. data: {
  2535. x: 100,
  2536. y: 100,
  2537. height: 40,
  2538. width: 200,
  2539. disableAnchor: true,
  2540. name: 'rectangle',
  2541. borderRadius: 0.05,
  2542. input: true,
  2543. ellipsis: true,
  2544. text: '输入数字',
  2545. textAlign: 'left',
  2546. background: '#15181C',
  2547. color: '#424B61',
  2548. textColor: '#FFFFFFE6',
  2549. // color: '#D9D9D9FF',
  2550. // textColor: '#000000FF',
  2551. // hoverTextColor: '#000000FF',
  2552. // activeTextColor: '#000000FF',
  2553. textLeft: 10,
  2554. events: [
  2555. {
  2556. action: 5,
  2557. name: 'inactive',
  2558. value:
  2559. 'context.meta2d.setValue({ id: pen.id, text: parseFloat(pen.text) }, { doEvent: false });',
  2560. where: { type: null },
  2561. },
  2562. ],
  2563. },
  2564. },
  2565. {
  2566. name: '单选框',
  2567. icon: 'l-danxuanxiang',
  2568. data: {
  2569. name: 'radio',
  2570. width: 300,
  2571. height: 30,
  2572. disableAnchor: true,
  2573. direction: 'horizontal', // 'vertical', //'horizontal',
  2574. theme: 'normal',
  2575. itemPosition: [],
  2576. data: [
  2577. { key: '1', text: '选项一', isForbidden: true },
  2578. { key: '2', text: '选项示例二' },
  2579. { key: '3', text: '选项三' },
  2580. ],
  2581. selectKey: '2',
  2582. props: {
  2583. custom: [
  2584. {
  2585. key: 'data',
  2586. label: '数据',
  2587. type: 'code',
  2588. },
  2589. {
  2590. key: 'direction',
  2591. label: '排列方向',
  2592. type: 'select',
  2593. options: [
  2594. { label: '横向', value: 'horizontal' },
  2595. { label: '纵向', value: 'vertical' },
  2596. ],
  2597. },
  2598. {
  2599. key: 'theme',
  2600. label: '模式',
  2601. type: 'select',
  2602. options: [
  2603. { label: '通用模式', value: 'normal' },
  2604. { label: '按钮模式', value: 'button' },
  2605. ],
  2606. },
  2607. ],
  2608. },
  2609. },
  2610. },
  2611. {
  2612. name: '多选框',
  2613. icon: 'l-duoxuanxiang',
  2614. data: {
  2615. name: 'checkbox',
  2616. width: 300,
  2617. height: 30,
  2618. direction: 'horizontal', // 'vertical', //'horizontal',
  2619. theme: 'normal', //button normal
  2620. data: [
  2621. { key: '1', text: '选项一', isForbidden: true },
  2622. { key: '2', text: '选项示例二' },
  2623. { key: '3', text: '选项三' },
  2624. ],
  2625. selectedKeys: ['2', '3'],
  2626. props: {
  2627. custom: [
  2628. {
  2629. key: 'data',
  2630. label: '数据',
  2631. type: 'code',
  2632. },
  2633. {
  2634. key: 'direction',
  2635. label: '排列方向',
  2636. type: 'select',
  2637. options: [
  2638. { label: '横向', value: 'horizontal' },
  2639. { label: '纵向', value: 'vertical' },
  2640. ],
  2641. },
  2642. {
  2643. key: 'theme',
  2644. label: '模式',
  2645. type: 'select',
  2646. options: [
  2647. { label: '通用模式', value: 'normal' },
  2648. { label: '按钮模式', value: 'button' },
  2649. ],
  2650. },
  2651. ],
  2652. },
  2653. },
  2654. },
  2655. {
  2656. name: '下拉选择器',
  2657. icon: 'l-xialaxuanzekuang',
  2658. data: {
  2659. x: 100,
  2660. y: 100,
  2661. height: 40,
  2662. width: 200,
  2663. disableAnchor: true,
  2664. name: 'rectangle',
  2665. borderRadius: 0.05,
  2666. ellipsis: true,
  2667. text: '选项1',
  2668. textAlign: 'left',
  2669. input: true,
  2670. background: '#15181C',
  2671. color: '#424B61',
  2672. textColor: '#FFFFFFE6',
  2673. hoverTextColor: '#FFFFFFE6',
  2674. activeTextColor: '#FFFFFFE6',
  2675. textLeft: 10,
  2676. dropdownList: [
  2677. {
  2678. text: '选项1',
  2679. },
  2680. {
  2681. text: '选项2',
  2682. },
  2683. {
  2684. text: '选项3',
  2685. },
  2686. ],
  2687. },
  2688. },
  2689. {
  2690. name: '时间选择器',
  2691. icon: 'l-shijianxuanzekuang',
  2692. data: {
  2693. name: 'inputDom',
  2694. width: 200,
  2695. height: 32,
  2696. externElement: true,
  2697. prefix: false,
  2698. suffix: false,
  2699. inputType: 'time',
  2700. hiddenText: true,
  2701. },
  2702. },
  2703. {
  2704. name: '日期选择器',
  2705. icon: 'l-riqixuanzekuang',
  2706. data: {
  2707. name: 'inputDom',
  2708. width: 200,
  2709. height: 32,
  2710. externElement: true,
  2711. prefix: false,
  2712. suffix: false,
  2713. inputType: 'date',
  2714. hiddenText: true,
  2715. },
  2716. },
  2717. {
  2718. name: '颜色选择器',
  2719. icon: 'l-yansexuanzekuang',
  2720. data: {
  2721. name: 'inputDom',
  2722. width: 32,
  2723. height: 32,
  2724. externElement: true,
  2725. prefix: false,
  2726. suffix: false,
  2727. inputType: 'color',
  2728. hiddenText: true,
  2729. },
  2730. },
  2731. {
  2732. name: '开关',
  2733. icon: 'l-kaiguan',
  2734. data: {
  2735. name: 'switch',
  2736. disableAnchor: true,
  2737. height: 30,
  2738. width: 60,
  2739. checked: true,
  2740. offColor: '#303746',
  2741. onColor: '#4583FF',
  2742. disableOffColor: '#E5E5E5',
  2743. disableOnColor: '#A3D3FF',
  2744. hoverBackground: '#40a9ff',
  2745. },
  2746. },
  2747. {
  2748. name: '滑块',
  2749. icon: 'l-huakuai',
  2750. data: {
  2751. anchors: [],
  2752. disableAnchor: true,
  2753. name: 'slider',
  2754. width: 300,
  2755. height: 20,
  2756. value: 10,
  2757. textWidth: 50,
  2758. barHeight: 4,
  2759. min: 0,
  2760. max: 100,
  2761. activeColor: '#4583FF',
  2762. background: '#303746',
  2763. textColor: '#FFFFFF66',
  2764. unit: '%',
  2765. },
  2766. },
  2767. ],
  2768. },
  2769. {
  2770. name: '工控',
  2771. show: true,
  2772. list: [
  2773. {
  2774. name: '圆柱水位',
  2775. icon: 'l-yuanzhushuiwei',
  2776. data: {
  2777. name: 'waterTank',
  2778. width: 128,
  2779. height: 128,
  2780. disableAnchor: true,
  2781. color: '#FFFFFF00',
  2782. progress: 0.5,
  2783. progressColor: '#4583FF',
  2784. },
  2785. },
  2786. {
  2787. name: '球形水位',
  2788. icon: 'l-qiuxingshuiwei',
  2789. data: {
  2790. name: 'watermeter',
  2791. width: 128,
  2792. height: 128,
  2793. disableAnchor: true,
  2794. background: '#4583FF',
  2795. value: 50,
  2796. max: 70,
  2797. min: 20,
  2798. maxBackground: '#f5222d',
  2799. minBackground: '#52c41a',
  2800. // maxText: 'max',
  2801. // minText: 'min',
  2802. scaleShow: false,
  2803. },
  2804. },
  2805. {
  2806. name: '指示灯',
  2807. icon: 'l-zhishideng',
  2808. data: {
  2809. name: 'indicatorLight',
  2810. disableAnchor: true,
  2811. width: 128,
  2812. height: 128,
  2813. displayStatus: 0, //显示状态 默认 方形 圆形
  2814. background: '#4583FF33',
  2815. color: '#4583FF',
  2816. hiddenText: true,
  2817. onColor: '#58CC84',
  2818. frames: [
  2819. {
  2820. background: '#4583FF33',
  2821. color: '#4583FF',
  2822. bkType: 0,
  2823. duration: 200,
  2824. strokeType: 0,
  2825. visible: true,
  2826. },
  2827. {
  2828. background: '#4583FF33',
  2829. color: '#4583FF',
  2830. bkType: 0,
  2831. duration: 200,
  2832. strokeType: 0,
  2833. visible: true,
  2834. },
  2835. ],
  2836. animateType: 'custom',
  2837. },
  2838. props: {
  2839. custom: [
  2840. {
  2841. key: 'state',
  2842. value: 'on',
  2843. type: 'select',
  2844. options: [
  2845. { label: '开', value: 'on' },
  2846. { label: '关', value: 'off' },
  2847. ],
  2848. },
  2849. ],
  2850. },
  2851. },
  2852. {
  2853. name: '圆形按钮',
  2854. icon: 'l-yuanxinganniu', //l-yuanxinganniu
  2855. data: {
  2856. name: 'roundSwitch',
  2857. width: 128,
  2858. height: 128,
  2859. checked: true,
  2860. disableInput: true,
  2861. offColor: '#FFA98F',
  2862. onColor: '#80D99F',
  2863. color: '#4583FF', //66 33
  2864. background: '#4583FF33',
  2865. offShadowColor: '#FF5D3C',
  2866. onShadowColor: '#58CC84',
  2867. },
  2868. },
  2869. {
  2870. name: '船型开关',
  2871. icon: 'l-chuanxingkaiguan',
  2872. data: {
  2873. name: 'rockerSwitch',
  2874. width: 72,
  2875. height: 128,
  2876. disableInput: true,
  2877. offColor: '#FFA98F',
  2878. onColor: '#80D99F',
  2879. color: '#4583FF', //66 33
  2880. background: '#4583FF33',
  2881. offShadowColor: '#FF5D3C',
  2882. onShadowColor: '#58CC84',
  2883. },
  2884. },
  2885. {
  2886. name: '转换开关',
  2887. icon: 'l-zhuanhuankaiguan', //l-zhuanhuankaiguan
  2888. data: {
  2889. name: 'transferSwitch',
  2890. width: 128,
  2891. height: 128,
  2892. checked: true,
  2893. disableInput: true,
  2894. offColor: '#FFA98F',
  2895. onColor: '#80D99F',
  2896. color: '#4583FF', //66 33
  2897. background: '#4583FF33',
  2898. offShadowColor: '#FF5D3C',
  2899. onShadowColor: '#58CC84',
  2900. },
  2901. },
  2902. {
  2903. name: '闸刀',
  2904. icon: 'l-zhadao',
  2905. data: {
  2906. name: 'knifeSwitch',
  2907. width: 64,
  2908. height: 128,
  2909. color: '#4583FF',
  2910. disableInput: true,
  2911. background: '#4583FF33',
  2912. offColor: '#FF5D3C',
  2913. onColor: '#58CC84',
  2914. // events: [
  2915. // {
  2916. // action: 5,
  2917. // name: 'click',
  2918. // value: 'window.meta2d.setValue({id:pen.id,switch:!pen.switch});',
  2919. // },
  2920. // ],
  2921. },
  2922. },
  2923. {
  2924. name: '拨动开关',
  2925. icon: 'l-bodongkaiguan',
  2926. data: {
  2927. name: 'toggleSwitch',
  2928. width: 128,
  2929. height: 128,
  2930. checked: true,
  2931. disableInput: true,
  2932. color: '#4583FF',
  2933. background: '#4583FF33',
  2934. offColor: '#FF5D3C',
  2935. onColor: '#58CC84',
  2936. // events: [
  2937. // {
  2938. // action: 5,
  2939. // name: 'click',
  2940. // value:
  2941. // 'window.meta2d.setValue({id:pen.id,switch:!pen.switch});window.meta2d.render()',
  2942. // },
  2943. // ],
  2944. },
  2945. },
  2946. {
  2947. name: '空气开关',
  2948. icon: 'l-kongqikaiguan',
  2949. data: {
  2950. name: 'airSwitch',
  2951. width: 120,
  2952. height: 128,
  2953. switch: true,
  2954. color: '#4583FF',
  2955. background: '#4583FF33',
  2956. offColor: '#FF5D3C',
  2957. onColor: '#58CC84',
  2958. disableInput: true,
  2959. },
  2960. },
  2961. {
  2962. name: '水柱温度计',
  2963. icon: 'l-shuizhuwendu',
  2964. data: {
  2965. name: 'thermometer',
  2966. width: 32,
  2967. height: 128,
  2968. disableAnchor: true,
  2969. color: '#4583FF',
  2970. textColor: '#FFFFFFB3',
  2971. background: '#FF5D3C33',
  2972. activeBacground: '#FF5D3C',
  2973. value: -10,
  2974. min: -20,
  2975. max: 20,
  2976. },
  2977. },
  2978. {
  2979. name: '扁平温度计',
  2980. icon: 'l-bianpingwendu',
  2981. data: {
  2982. name: 'thermometer1',
  2983. disableAnchor: true,
  2984. width: 48,
  2985. height: 128,
  2986. backgroundColor: '#666',
  2987. value: 0,
  2988. min: -20,
  2989. max: 20,
  2990. color: '#4583FF',
  2991. markColor: '#fff',
  2992. background: '#FF5D3C33',
  2993. activeBackground: '#FF5D3C',
  2994. textColor: '#FFFFFFB3',
  2995. sub: 5,
  2996. barrel: {
  2997. x: 0.3,
  2998. y: 0.2,
  2999. width: 0.2,
  3000. height: 7 / 9,
  3001. },
  3002. },
  3003. },
  3004. ],
  3005. },
  3006. ];
  3007. export const cases: any[] = [
  3008. { name: '智慧物联' },
  3009. { name: '电力能源' },
  3010. { name: '智慧水务' },
  3011. { name: '智慧工厂' },
  3012. { name: '智慧校园' },
  3013. { name: '智慧园区' },
  3014. { name: '智慧交通' },
  3015. { name: '智慧城市' },
  3016. { name: '智慧农业' },
  3017. { name: '电信机房' },
  3018. { name: '航天航空' },
  3019. { name: '智能家居' },
  3020. ];
  3021. export const templates: any[] = [
  3022. { name: '主题', list: [] },
  3023. { name: '布局', list: [] },
  3024. ];
  3025. export const defaultPureColor: string[] = [
  3026. '#ff925c',
  3027. '#e6d950',
  3028. '#51e69b',
  3029. '#59c8ff',
  3030. '#FF7875',
  3031. '#FF9C6E',
  3032. '#FFC069',
  3033. '#FFD666',
  3034. '#FFF566',
  3035. '#D3F261',
  3036. '#95DE64',
  3037. '#5CDBD3',
  3038. '#69C0FF',
  3039. '#85A5FF',
  3040. '#B37FEB',
  3041. '#FF85C0',
  3042. '#000000',
  3043. '#FFFFFF',
  3044. '#FFFFFF00',
  3045. ];
  3046. // export const defaultGradientColor: string[] = [
  3047. // 'linear-gradient(90deg, #E52600 0%, #CC0000 12%, #FF925C 80%, #FF622E 100%)',
  3048. // 'linear-gradient(90deg, #B36800 0%, #B36800 12%, #E6D950 80%, #CCB125 100%)',
  3049. // 'linear-gradient(90deg, #00B35A 0%, #00735F 12%, #51E69B 80%, #24CC6B 100%)',
  3050. // 'linear-gradient(90deg, #0073E6 0%, #1433CC 12%, #59C8FF 80%, #2EA5FF 100%)',
  3051. // 'linear-gradient(90deg, #a3aab2 0%, #7b7f8c 12%, #e5ecf0 80%, #bac2c9 100%)',
  3052. //
  3053. // 'linear-gradient(90deg, #FF622E 0%, #FF622E 18%,#CC0000 20%,#FF622E 50%, #CC0000 80%,#FF622E 82%, #FF622E 100%)',
  3054. // 'linear-gradient(90deg, #ccb125 0%, #ccb125 18%,#B36800 20%,#CCB125 50%, #B36800 80%,#CCB125 82%, #CCB125 100%)',
  3055. // 'linear-gradient(90deg, #24CC6B 0%, #24CC6B 18%,#00735F 20%,#24CC6B 50%, #00735F 80%,#24CC6B 82%, #24CC6B 100%)',
  3056. // 'linear-gradient(90deg, #2EA5FF 0%, #2EA5FF 18%,#1433CC 20%,#2EA5FF 50%, #1433CC 80%,#2EA5FF 82%, #2EA5FF 100%)',
  3057. // 'linear-gradient(90deg, #bac2c9 0%, #bac2c9 18%,#7b7f8c 20%,#bac2c9 50%, #7b7f8c 80%,#bac2c9 82%, #bac2c9 100%)'
  3058. // ]
  3059. export const defaultGradientColor: string[] = [
  3060. '#ff925c',
  3061. '#e6d950',
  3062. '#51e69b',
  3063. '#59c8ff',
  3064. '#FF7875',
  3065. '#FF9C6E',
  3066. '#FFC069',
  3067. '#FFD666',
  3068. '#FFF566',
  3069. '#D3F261',
  3070. '#95DE64',
  3071. '#5CDBD3',
  3072. '#69C0FF',
  3073. '#85A5FF',
  3074. '#B37FEB',
  3075. '#FF85C0',
  3076. '#000000',
  3077. '#FFFFFF',
  3078. ];