defaults.ts 119 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697
  1. import { Pen, FormItem } from '@meta2d/core';
  2. import { cdn } from './api';
  3. const getRootDomain = ()=>{
  4. const a =location.host.split('.');
  5. return `.${a[a.length-2]}.${a[a.length-1]}`
  6. };
  7. export let rootDomain = getRootDomain().indexOf('localhost')!==-1?'.le5le.com':getRootDomain();
  8. export const fromArrows = [
  9. { icon: '#l-line', value: '' },
  10. { icon: '#l-from-triangle', value: 'triangle' },
  11. { icon: '#l-from-diamond', value: 'diamond' },
  12. { icon: '#l-from-circle', value: 'circle' },
  13. { icon: '#l-from-lineDown', value: 'lineDown' },
  14. { icon: '#l-from-lineUp', value: 'lineUp' },
  15. { icon: '#l-from-triangleSolid', value: 'triangleSolid' },
  16. { icon: '#l-from-diamondSolid', value: 'diamondSolid' },
  17. { icon: '#l-from-circleSolid', value: 'circleSolid' },
  18. { icon: '#l-from-line', value: 'line' },
  19. ];
  20. export const toArrows = [
  21. { icon: '#l-line', value: '' },
  22. { icon: '#l-to-triangle', value: 'triangle' },
  23. { icon: '#l-to-diamond', value: 'diamond' },
  24. { icon: '#l-to-circle', value: 'circle' },
  25. { icon: '#l-to-lineDown', value: 'lineDown' },
  26. { icon: '#l-to-lineUp', value: 'lineUp' },
  27. { icon: '#l-to-triangleSolid', value: 'triangleSolid' },
  28. { icon: '#l-to-diamondSolid', value: 'diamondSolid' },
  29. { icon: '#l-to-circleSolid', value: 'circleSolid' },
  30. { icon: '#l-to-line', value: 'line' },
  31. ];
  32. export const lineDashObj = [
  33. undefined,
  34. [5, 5],
  35. [10, 10],
  36. [10, 10, 2, 10],
  37. [1, 16],
  38. ];
  39. /**
  40. * 默认动画
  41. */
  42. export const normalAnimate: any = {
  43. upDown: [
  44. {
  45. y: -10,
  46. duration: 100,
  47. },
  48. { y: 0, duration: 100 },
  49. { y: -10, duration: 200 },
  50. ],
  51. leftRight: [
  52. {
  53. x: -10,
  54. duration: 100,
  55. },
  56. {
  57. x: 10,
  58. duration: 80,
  59. },
  60. {
  61. x: -10,
  62. duration: 50,
  63. },
  64. {
  65. x: 10,
  66. duration: 30,
  67. },
  68. {
  69. x: 0,
  70. duration: 300,
  71. },
  72. ],
  73. heart: [
  74. {
  75. // 通过 scale 来替代原版心跳
  76. scale: 1.1,
  77. duration: 100,
  78. },
  79. {
  80. scale: 1,
  81. duration: 400,
  82. },
  83. ],
  84. success: [{ background: '#389e0d22', color: '#237804', duration: 500 }],
  85. warning: [
  86. {
  87. color: '#fa8c16',
  88. lineDash: [10, 10],
  89. duration: 300,
  90. },
  91. {
  92. color: '#fa8c16',
  93. lineDash: undefined,
  94. duration: 500,
  95. },
  96. {
  97. color: '#fa8c16',
  98. lineDash: [10, 10],
  99. duration: 300,
  100. },
  101. ],
  102. error: [{ color: '#cf1322', background: '#cf132222', duration: 100 }],
  103. show: [
  104. {
  105. color: '#fa541c',
  106. rotate: -10,
  107. duration: 100,
  108. },
  109. {
  110. color: '#fa541c',
  111. rotate: 10,
  112. duration: 100,
  113. },
  114. {
  115. color: '#fa541c',
  116. rotate: 0,
  117. duration: 100,
  118. },
  119. ],
  120. rotate: [
  121. {
  122. rotate: 360,
  123. duration: 1000,
  124. },
  125. ],
  126. };
  127. export const defaultFormat: Pen = {
  128. borderRadius: 0,
  129. rotate: 0,
  130. paddingLeft: 0,
  131. paddingRight: 0,
  132. paddingTop: 0,
  133. paddingBottom: 0,
  134. progress: 0,
  135. progressColor: '#fff0',
  136. verticalProgress: false,
  137. flipX: false,
  138. flipY: false,
  139. input: false,
  140. lineDash: [],
  141. lineCap: 'round',
  142. lineJoin: 'round',
  143. strokeType: 0,
  144. lineGradientFromColor: undefined,
  145. lineGradientToColor: undefined,
  146. lineGradientAngle: 0,
  147. // color: "#222",
  148. hoverColor: undefined,
  149. activeColor: undefined,
  150. lineWidth: 1,
  151. bkType: 0,
  152. gradientFromColor: undefined,
  153. gradientToColor: undefined,
  154. gradientAngle: 0,
  155. gradientRadius: 0,
  156. hoverBackground: undefined,
  157. activeBackground: undefined,
  158. globalAlpha: 1,
  159. anchorColor: undefined,
  160. anchorRadius: 0,
  161. shadowColor: undefined,
  162. shadowBlur: 0,
  163. shadowOffsetX: 0,
  164. shadowOffsetY: 0,
  165. textHasShadow: undefined,
  166. fontFamily: undefined,
  167. fontSize: 0,
  168. textColor: undefined,
  169. hoverTextColor: undefined,
  170. activeTextColor: undefined,
  171. textBackground: undefined,
  172. fontStyle: undefined,
  173. fontWeight: undefined,
  174. textAlign: undefined,
  175. textBaseline: undefined,
  176. lineHeight: 0,
  177. whiteSpace: undefined,
  178. textWidth: 0,
  179. textHeight: 0,
  180. textLeft: 0,
  181. textTop: 0,
  182. ellipsis: false,
  183. hiddenText: false,
  184. keepDecimal: 0,
  185. borderWidth: 0,
  186. borderColor: undefined,
  187. animateLineWidth: 0,
  188. lineAnimateType: 0,
  189. frames: [],
  190. animateColor: undefined,
  191. // animateType: undefined,
  192. animateReverse: false,
  193. background: '#fff0',
  194. gradientColors: undefined,
  195. lineGradientColors: undefined,
  196. gradientSmooth: 0,
  197. };
  198. export interface FormItemType extends FormItem {
  199. key: string; // 属性标识,绑定变量时使用
  200. key2?: string; // 有些属性存在嵌套
  201. name: string; // 标题
  202. tips?: string; // 提示
  203. placeholder?: string; // input placeholder
  204. type:
  205. | 'text' // string 类型输入框
  206. | 'number'
  207. | 'color'
  208. | 'textarea'
  209. | 'select'
  210. | 'switch'
  211. | 'code'
  212. | 'image'
  213. | 'icon'
  214. | 'slider'
  215. | 'autoComplete'
  216. | 'label'; // 文字,不含输入框;
  217. options?: {
  218. // 选项
  219. label: string; // 选项的标题,可以使用 html
  220. value: any; // 选项的值
  221. disabled?: boolean;
  222. }[];
  223. min?: number; // 最小值
  224. max?: number; // 最大值
  225. step?: number; // 步长
  226. rows?: number; // textarea 所需要的行数
  227. iconFamily?: string; // icon 类型节点需要
  228. title?: string; // code 类型编辑器需要
  229. language?: 'javascript' | 'json' | 'markdown'; // code 编辑器需要
  230. readonly?: boolean; // 是否只读
  231. mode?: 'multiple' | 'tags'; // select 选项
  232. isNotString?: boolean; // monaco 需要 string 类型的 code ,不是 string 协助转换
  233. multiple?: boolean; // 绑定多个属性
  234. isTime?: boolean; // 是否是时序的, undefined 不会出现 历史趋势 的 checkbox
  235. isYCategory?: boolean; // y 轴是否是分类,true y 轴分类,false x 轴分类,undefined 不会出现 y轴分类轴 的 checkbox
  236. // 绑定单个属性是对象, 多个数组
  237. // dataIds?: BindId | BindId[]; // 关联业务数据
  238. precision?: number; //精度
  239. gradient?: boolean; //是否为渐变色
  240. hidden?: boolean; //是否隐藏
  241. }
  242. export const iframeCustom = [
  243. {
  244. key: 'iframe',
  245. label: '网页地址',
  246. type: 'string',
  247. },
  248. {
  249. key: 'zIndex',
  250. label: 'dom层级(z-index)',
  251. type: 'number',
  252. min: 0,
  253. placeholder: '默认4',
  254. },
  255. {
  256. key: 'operationalRect.x',
  257. label: '可操作x',
  258. type: 'number',
  259. min: 0,
  260. max: 1,
  261. placeholder: '范围0-1',
  262. },
  263. {
  264. key: 'operationalRect.y',
  265. label: '可操作y',
  266. type: 'number',
  267. min: 0,
  268. max: 1,
  269. placeholder: '范围0-1',
  270. },
  271. {
  272. key: 'operationalRect.width',
  273. label: '可操作宽度',
  274. type: 'number',
  275. min: 0,
  276. max: 1,
  277. placeholder: '范围0-1',
  278. },
  279. {
  280. key: 'operationalRect.height',
  281. label: '可操作高度',
  282. type: 'number',
  283. min: 0,
  284. max: 1,
  285. placeholder: '范围0-1',
  286. },
  287. {
  288. key: 'blur',
  289. label: '背景模糊',
  290. type: 'number',
  291. min: 0,
  292. },
  293. {
  294. key: 'blurBackground',
  295. label: '毛玻璃颜色',
  296. type: 'color',
  297. },
  298. ];
  299. export const shapes = [
  300. {
  301. name: '基本形状',
  302. show: true,
  303. list: [
  304. {
  305. name: '正方形',
  306. icon: 'l-rect',
  307. id: 1,
  308. data: {
  309. width: 100,
  310. height: 100,
  311. name: 'square',
  312. },
  313. },
  314. {
  315. name: '矩形',
  316. icon: 'l-rectangle',
  317. id: 2,
  318. data: {
  319. width: 200,
  320. height: 50,
  321. borderRadius: 0.1,
  322. name: 'rectangle',
  323. },
  324. },
  325. {
  326. name: '圆',
  327. icon: 'l-circle',
  328. id: 3,
  329. data: {
  330. width: 100,
  331. height: 100,
  332. name: 'circle',
  333. },
  334. },
  335. {
  336. name: '三角形',
  337. icon: 'l-triangle',
  338. id: 4,
  339. data: {
  340. width: 100,
  341. height: 100,
  342. name: 'triangle',
  343. },
  344. },
  345. {
  346. name: '菱形',
  347. icon: 'l-diamond',
  348. id: 5,
  349. data: {
  350. width: 100,
  351. height: 100,
  352. name: 'diamond',
  353. },
  354. },
  355. {
  356. name: '五边形',
  357. icon: 'l-pentagon',
  358. id: 6,
  359. data: {
  360. width: 100,
  361. height: 100,
  362. name: 'pentagon',
  363. },
  364. },
  365. {
  366. name: '六边形',
  367. icon: 'l-hexagon',
  368. id: 7,
  369. data: {
  370. width: 100,
  371. height: 100,
  372. name: 'hexagon',
  373. },
  374. },
  375. {
  376. name: '五角星',
  377. icon: 'l-pentagram',
  378. id: 8,
  379. data: {
  380. width: 100,
  381. height: 100,
  382. name: 'pentagram',
  383. },
  384. },
  385. {
  386. name: '左箭头',
  387. icon: 'l-arrow-left',
  388. id: 9,
  389. data: {
  390. width: 120,
  391. height: 60,
  392. name: 'leftArrow',
  393. },
  394. },
  395. {
  396. name: '右箭头',
  397. icon: 'l-arrow-right',
  398. id: 10,
  399. data: {
  400. width: 120,
  401. height: 60,
  402. name: 'rightArrow',
  403. },
  404. },
  405. {
  406. name: '双向箭头',
  407. icon: 'l-twoway-arrow',
  408. id: 11,
  409. data: {
  410. width: 150,
  411. height: 60,
  412. name: 'twowayArrow',
  413. },
  414. },
  415. {
  416. name: '云',
  417. icon: 'l-cloud',
  418. id: 13,
  419. data: {
  420. width: 100,
  421. height: 100,
  422. name: 'cloud',
  423. },
  424. },
  425. {
  426. name: '消息框',
  427. icon: 'l-msg',
  428. id: 14,
  429. data: {
  430. textTop: -0.1,
  431. width: 100,
  432. height: 100,
  433. name: 'message',
  434. },
  435. },
  436. {
  437. name: '文件',
  438. icon: 'l-file',
  439. id: 15,
  440. data: {
  441. width: 80,
  442. height: 100,
  443. name: 'file',
  444. },
  445. },
  446. {
  447. name: '立方体',
  448. icon: 'l-cube',
  449. id: 18,
  450. data: {
  451. width: 60,
  452. height: 100,
  453. name: 'cube',
  454. z: 0.25,
  455. props: {
  456. custom: [
  457. {
  458. key: 'z',
  459. label: 'Z',
  460. type: 'number',
  461. min: 0,
  462. placeholder: '<= 1 即宽度的比例',
  463. },
  464. {
  465. key: 'backgroundFront',
  466. label: '前背景色',
  467. type: 'color',
  468. },
  469. {
  470. key: 'backgroundUp',
  471. label: '顶背景色',
  472. type: 'color',
  473. },
  474. {
  475. key: 'backgroundRight',
  476. label: '右背景色',
  477. type: 'color',
  478. },
  479. ],
  480. },
  481. },
  482. },
  483. {
  484. name: '人',
  485. icon: 'l-people',
  486. id: 19,
  487. data: {
  488. width: 70,
  489. height: 100,
  490. name: 'people',
  491. },
  492. },
  493. ],
  494. },
  495. {
  496. name: '脑图',
  497. show: true,
  498. list: [
  499. {
  500. name: '主题',
  501. icon: 'l-zhuti',
  502. data: {
  503. text: '主题',
  504. width: 200,
  505. height: 50,
  506. name: 'mindNode',
  507. borderRadius: 0.5,
  508. },
  509. },
  510. {
  511. name: '子主题',
  512. icon: 'l-zizhuti',
  513. data: {
  514. text: '子主题',
  515. width: 160,
  516. height: 40,
  517. name: 'mindLine',
  518. },
  519. },
  520. ],
  521. },
  522. {
  523. name: '流程图',
  524. show: true,
  525. list: [
  526. {
  527. name: '开始/结束',
  528. icon: 'l-flow-start',
  529. id: 21,
  530. data: {
  531. text: '开始/结束',
  532. width: 120,
  533. height: 40,
  534. borderRadius: 0.5,
  535. name: 'rectangle',
  536. },
  537. },
  538. {
  539. name: '流程',
  540. icon: 'l-rectangle',
  541. id: 22,
  542. data: {
  543. text: '流程',
  544. width: 120,
  545. height: 40,
  546. name: 'rectangle',
  547. },
  548. },
  549. {
  550. name: '判定',
  551. icon: 'l-diamond',
  552. id: 23,
  553. data: {
  554. text: '判定',
  555. width: 120,
  556. height: 60,
  557. name: 'diamond',
  558. },
  559. },
  560. {
  561. name: '数据',
  562. icon: 'l-flow-data',
  563. id: 24,
  564. data: {
  565. text: '数据',
  566. width: 120,
  567. height: 50,
  568. name: 'flowData',
  569. offsetX: 0.14,
  570. form: [
  571. {
  572. key: 'offsetX',
  573. name: '斜率',
  574. type: 'number',
  575. min: 0,
  576. step: 0.1,
  577. placeholder: '<= 1 即宽度的比例',
  578. },
  579. ] as FormItemType[],
  580. },
  581. },
  582. {
  583. name: '准备',
  584. icon: 'l-flow-ready',
  585. id: 25,
  586. data: {
  587. text: '准备',
  588. width: 120,
  589. height: 50,
  590. name: 'hexagon',
  591. },
  592. },
  593. {
  594. name: '子流程',
  595. icon: 'l-flow-subprocess',
  596. id: 26,
  597. data: {
  598. text: '子流程',
  599. width: 120,
  600. height: 50,
  601. name: 'flowSubprocess',
  602. },
  603. },
  604. {
  605. name: '数据库',
  606. icon: 'l-db',
  607. id: 27,
  608. data: {
  609. text: '数据库',
  610. width: 80,
  611. height: 120,
  612. name: 'flowDb',
  613. },
  614. },
  615. {
  616. name: '文档',
  617. icon: 'l-flow-document',
  618. id: 28,
  619. data: {
  620. text: '文档',
  621. width: 120,
  622. height: 100,
  623. name: 'flowDocument',
  624. },
  625. },
  626. {
  627. name: '内部存储',
  628. icon: 'l-internal-storage',
  629. id: 29,
  630. data: {
  631. text: '内部存储',
  632. width: 120,
  633. height: 80,
  634. name: 'flowInternalStorage',
  635. },
  636. },
  637. {
  638. name: '外部存储',
  639. icon: 'l-extern-storage',
  640. id: 30,
  641. data: {
  642. text: '外部存储',
  643. width: 120,
  644. height: 80,
  645. name: 'flowExternStorage',
  646. },
  647. },
  648. {
  649. name: '队列',
  650. icon: 'l-flow-queue',
  651. id: 31,
  652. data: {
  653. text: '队列',
  654. width: 100,
  655. height: 100,
  656. name: 'flowQueue',
  657. },
  658. },
  659. {
  660. name: '手动输入',
  661. icon: 'l-flow-manually',
  662. id: 32,
  663. data: {
  664. text: '手动输入',
  665. width: 120,
  666. height: 80,
  667. name: 'flowManually',
  668. },
  669. },
  670. {
  671. name: '展示',
  672. icon: 'l-flow-display',
  673. id: 33,
  674. data: {
  675. text: '展示',
  676. width: 120,
  677. height: 80,
  678. name: 'flowDisplay',
  679. },
  680. },
  681. {
  682. name: '并行模式',
  683. icon: 'l-flow-parallel',
  684. id: 34,
  685. data: {
  686. text: '并行模式',
  687. width: 120,
  688. height: 50,
  689. name: 'flowParallel',
  690. },
  691. },
  692. {
  693. name: '注释',
  694. icon: 'l-flow-comment',
  695. id: 35,
  696. data: {
  697. text: '注释',
  698. width: 100,
  699. height: 100,
  700. name: 'flowComment',
  701. },
  702. },
  703. ],
  704. },
  705. {
  706. name: '活动图',
  707. show: true,
  708. list: [
  709. {
  710. name: '开始',
  711. icon: 'l-inital',
  712. id: 36,
  713. data: {
  714. text: '',
  715. width: 30,
  716. height: 30,
  717. name: 'circle',
  718. background: '#555',
  719. lineWidth: 0,
  720. },
  721. },
  722. {
  723. name: '结束',
  724. icon: 'l-final',
  725. id: 37,
  726. data: {
  727. width: 30,
  728. height: 30,
  729. name: 'activityFinal',
  730. },
  731. },
  732. {
  733. name: '活动',
  734. icon: 'l-action',
  735. id: 38,
  736. data: {
  737. text: '活动',
  738. width: 120,
  739. height: 50,
  740. borderRadius: 0.25,
  741. name: 'rectangle',
  742. },
  743. },
  744. {
  745. name: '决策/合并',
  746. icon: 'l-diamond',
  747. id: 39,
  748. data: {
  749. text: '决策/合并',
  750. width: 120,
  751. height: 50,
  752. name: 'diamond',
  753. },
  754. },
  755. {
  756. name: '垂直泳道',
  757. icon: 'l-swimlane-v',
  758. id: 40,
  759. data: {
  760. text: '垂直泳道',
  761. width: 200,
  762. height: 500,
  763. name: 'swimlaneV',
  764. textBaseline: 'top',
  765. textTop: 20,
  766. // textHeight: ,
  767. lineTop: 0.08,
  768. },
  769. },
  770. {
  771. name: '水平泳道',
  772. icon: 'l-swimlane-h',
  773. id: 41,
  774. data: {
  775. text: '水平泳道',
  776. width: 500,
  777. height: 200,
  778. name: 'swimlaneH',
  779. textWidth: 0.01,
  780. textLeft: 0.04,
  781. textAlign: 'left',
  782. lineLeft: 0.08,
  783. },
  784. },
  785. {
  786. name: '垂直分岔/汇合',
  787. icon: 'l-fork-v',
  788. id: 42,
  789. data: {
  790. text: '垂直分岔/汇合',
  791. width: 10,
  792. height: 150,
  793. name: 'forkV',
  794. fillStyle: '#555',
  795. strokeStyle: 'transparent',
  796. },
  797. },
  798. {
  799. name: '水平分岔/汇合',
  800. icon: 'l-fork',
  801. id: 43,
  802. data: {
  803. text: '水平分岔/汇合',
  804. width: 150,
  805. height: 10,
  806. name: 'forkH',
  807. fillStyle: '#555',
  808. strokeStyle: 'transparent',
  809. },
  810. },
  811. ],
  812. },
  813. {
  814. name: '时序图和类图',
  815. show: true,
  816. list: [
  817. {
  818. name: '生命线',
  819. icon: 'l-lifeline',
  820. id: 44,
  821. data: {
  822. text: '生命线',
  823. width: 150,
  824. height: 400,
  825. textHeight: 50,
  826. name: 'lifeline',
  827. },
  828. },
  829. {
  830. name: '激活',
  831. icon: 'l-focus',
  832. id: 45,
  833. data: {
  834. text: '激活',
  835. width: 12,
  836. height: 200,
  837. name: 'sequenceFocus',
  838. },
  839. },
  840. {
  841. name: '简单类',
  842. icon: 'l-simple-class',
  843. id: 46,
  844. data: {
  845. text: 'Topolgoy',
  846. width: 270,
  847. height: 200,
  848. textHeight: 200,
  849. name: 'simpleClass',
  850. textAlign: 'center',
  851. textBaseline: 'top',
  852. textTop: 10,
  853. list: [
  854. {
  855. text: '- name: string\n+ setName(name: string): void',
  856. },
  857. ],
  858. },
  859. },
  860. {
  861. name: '类',
  862. icon: 'l-class',
  863. id: 47,
  864. data: {
  865. text: 'Topolgoy',
  866. width: 270,
  867. height: 200,
  868. textHeight: 200,
  869. name: 'interfaceClass',
  870. textAlign: 'center',
  871. textBaseline: 'top',
  872. textTop: 10,
  873. list: [
  874. {
  875. text: '- name: string',
  876. },
  877. {
  878. text: '+ setName(name: string): void',
  879. },
  880. ],
  881. },
  882. },
  883. ],
  884. },
  885. {
  886. name: '故障树',
  887. show: true,
  888. list: [
  889. {
  890. name: '与门',
  891. icon: 'l-ANDmen',
  892. data: {
  893. name: 'andGate',
  894. width: 100,
  895. height: 150,
  896. },
  897. },
  898. {
  899. name: '基本事件',
  900. icon: 'l-jibenshijian',
  901. data: {
  902. name: 'basicEvent',
  903. width: 100,
  904. height: 150,
  905. },
  906. },
  907. {
  908. name: '未展开事件',
  909. icon: 'l-weizhankaishijian',
  910. data: {
  911. name: 'unexpandedEvent',
  912. width: 100,
  913. height: 150,
  914. },
  915. },
  916. {
  917. name: '优先AND门',
  918. icon: 'l-youxianANDmen',
  919. data: {
  920. name: 'priorityAndGate',
  921. width: 100,
  922. height: 150,
  923. },
  924. },
  925. {
  926. name: '禁止门',
  927. icon: 'l-jinzhimen',
  928. data: {
  929. name: 'forbiddenGate',
  930. width: 100,
  931. height: 150,
  932. },
  933. },
  934. {
  935. name: '事件',
  936. icon: 'l-shijian',
  937. data: {
  938. name: 'event',
  939. width: 100,
  940. height: 150,
  941. },
  942. },
  943. {
  944. name: '开关事件',
  945. icon: 'l-kaiguanshijian',
  946. data: {
  947. name: 'switchEvent',
  948. width: 100,
  949. height: 150,
  950. },
  951. },
  952. {
  953. name: '条件事件',
  954. icon: 'l-tiaojianshijian',
  955. data: {
  956. name: 'conditionalEvent',
  957. width: 150,
  958. height: 100,
  959. },
  960. },
  961. {
  962. name: '转移符号',
  963. icon: 'l-zhuanyifuhao',
  964. data: {
  965. name: 'transferSymbol',
  966. width: 100,
  967. height: 150,
  968. },
  969. },
  970. {
  971. name: '或门',
  972. icon: 'l-ORmen',
  973. data: {
  974. name: 'orGate',
  975. width: 100,
  976. height: 150,
  977. },
  978. },
  979. {
  980. name: '异或门',
  981. icon: 'l-yihuomen',
  982. data: {
  983. name: 'xorGate',
  984. width: 100,
  985. height: 150,
  986. },
  987. },
  988. {
  989. name: '表决门',
  990. icon: 'l-biaojuemen',
  991. data: {
  992. name: 'votingGate',
  993. width: 100,
  994. height: 150,
  995. },
  996. },
  997. ],
  998. },
  999. ];
  1000. export const formComponents = [
  1001. {
  1002. name: '基础',
  1003. show: true,
  1004. list: [
  1005. {
  1006. name: '文本',
  1007. icon: 'l-wenben',
  1008. data: {
  1009. width: 160,
  1010. height: 30,
  1011. name: 'text',
  1012. text: '乐吾乐le5le - 大屏可视化',
  1013. textAutoAdjust: true,
  1014. props: {
  1015. custom: [
  1016. {
  1017. key: 'textAutoAdjust',
  1018. label: '文本自动大小',
  1019. type: 'bool',
  1020. },
  1021. ],
  1022. },
  1023. },
  1024. },
  1025. {
  1026. name: '数字',
  1027. icon: 'l-shuzi',
  1028. data: {
  1029. width: 160,
  1030. height: 30,
  1031. name: 'text',
  1032. text: '3.1415926',
  1033. keepDecimal: 2,
  1034. },
  1035. },
  1036. {
  1037. name: '进度条',
  1038. icon: 'l-jindutiao',
  1039. data: {
  1040. anchors: [],
  1041. disableAnchor: true,
  1042. name: 'progress',
  1043. width: 164,
  1044. height: 6,
  1045. borderRadius: 0.5,
  1046. progressColor: '#4583FF',
  1047. progress: 0.8,
  1048. background: '#303746',
  1049. disableInput: true,
  1050. lineWidth: 0,
  1051. borderWidth: 0,
  1052. props: {
  1053. custom: [
  1054. {
  1055. key: 'progress',
  1056. label: '进度',
  1057. type: 'number',
  1058. max: 1,
  1059. min: 0,
  1060. },
  1061. {
  1062. key: 'progressColor',
  1063. label: '进度颜色',
  1064. type: 'color',
  1065. },
  1066. ],
  1067. },
  1068. },
  1069. },
  1070. {
  1071. name: '图标',
  1072. icon: 'l-tubiao',
  1073. data: {
  1074. width: 100,
  1075. height: 100,
  1076. name: 'image',
  1077. icon: '\uea86',
  1078. iconFamily: 'l-icon',
  1079. },
  1080. },
  1081. {
  1082. name: '图片',
  1083. icon: 'l-tupian',
  1084. data: {
  1085. width: 100,
  1086. height: 100,
  1087. name: 'image',
  1088. image: (cdn ? cdn + '/v' : import.meta.env.BASE_URL.slice(0,-1)) + '/img/logo.png',
  1089. },
  1090. },
  1091. {
  1092. name: 'GIF',
  1093. icon: 'l-GIF',
  1094. data: {
  1095. width: 100,
  1096. height: 100,
  1097. name: 'gif',
  1098. image: (cdn ? cdn + '/v' : '') + '/png/电信机房/防火墙.gif',
  1099. },
  1100. },
  1101. {
  1102. name: '头像',
  1103. icon: 'l-touxiang',
  1104. data: {
  1105. width: 30,
  1106. height: 30,
  1107. disableAnchor: true,
  1108. name: 'square',
  1109. lineWidth: 0,
  1110. image: (cdn ? cdn + '/v' : '') + '/img/avatar.png',
  1111. imageRadius: 0.5,
  1112. background: '#689f38',
  1113. borderRadius: 0.5,
  1114. ratio: true,
  1115. props: {
  1116. custom: [
  1117. {
  1118. key: 'imageRadius',
  1119. label: '图片圆角半径',
  1120. type: 'slider',
  1121. },
  1122. ],
  1123. },
  1124. },
  1125. },
  1126. {
  1127. name: '徽标',
  1128. icon: 'l-huibiao',
  1129. data: {
  1130. width: 35,
  1131. height: 20,
  1132. name: 'square',
  1133. borderRadius: 0.5,
  1134. lineWidth: 0,
  1135. background: '#d54941',
  1136. color: '#fff',
  1137. text: '99+',
  1138. },
  1139. },
  1140. {
  1141. name: '标签',
  1142. icon: 'l-biaoqian',
  1143. data: {
  1144. text: 'success',
  1145. width: 80,
  1146. height: 24,
  1147. borderRadius: 0.1,
  1148. name: 'rectangle',
  1149. lineWidth: 1,
  1150. fontSize: 12,
  1151. icon: '\uea10',
  1152. iconFamily: 'l-icon',
  1153. iconColor: '#FFFFFF99', //#52c41a
  1154. iconSize: 12,
  1155. iconAlign: 'left',
  1156. iconLeft: 8,
  1157. textAlign: 'right',
  1158. color: '#FFFFFFAA',
  1159. background: '#282E3B', //#f6ffed
  1160. textLeft: -6,
  1161. },
  1162. },
  1163. ],
  1164. },
  1165. {
  1166. name: '音视频',
  1167. show: true,
  1168. list: [
  1169. {
  1170. name: '视频',
  1171. icon: 'l-shipin',
  1172. data: {
  1173. width: 200,
  1174. height: 200,
  1175. externElement: true,
  1176. name: 'video',
  1177. video:
  1178. 'https://video.699pic.com/videos/17/69/11/a_aa3jeKZ0D63g1556176911_10s.mp4',
  1179. props: {
  1180. custom: [
  1181. {
  1182. key: 'video',
  1183. label: '视频地址',
  1184. type: 'string',
  1185. },
  1186. ],
  1187. },
  1188. },
  1189. },
  1190. {
  1191. name: 'FLV视频流',
  1192. icon: 'l-pc',
  1193. data: {
  1194. name: 'flvPlayerDom',
  1195. width: 477,
  1196. height: 268,
  1197. externElement: true,
  1198. video:
  1199. 'https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/flv/xgplayer-demo-360p.flv',
  1200. mediaDataSource: {},
  1201. optionalConfig: {},
  1202. props: {
  1203. custom: [
  1204. {
  1205. key: 'video',
  1206. label: '视频地址',
  1207. type: 'string',
  1208. },
  1209. {
  1210. key: 'mediaDataSource',
  1211. label: '媒体数据源',
  1212. type: 'code',
  1213. placeholder:
  1214. '具体配置参考:https://github.com/bilibili/flv.js/blob/master/docs/api.md',
  1215. },
  1216. {
  1217. key: 'optionalConfig',
  1218. label: '配置',
  1219. type: 'code',
  1220. placeholder:
  1221. '具体配置参考:https://github.com/bilibili/flv.js/blob/master/docs/api.md',
  1222. },
  1223. ],
  1224. },
  1225. },
  1226. },
  1227. {
  1228. name: '音频',
  1229. icon: 'l-yinpin',
  1230. data: {
  1231. width: 200,
  1232. height: 40,
  1233. externElement: true,
  1234. name: 'video',
  1235. audio: 'https://www.xzmp3.com/down/597caee79849.mp3',
  1236. props: {
  1237. custom: [
  1238. {
  1239. key: 'audio',
  1240. label: '视频地址',
  1241. type: 'string',
  1242. },
  1243. ],
  1244. },
  1245. },
  1246. },
  1247. {
  1248. name: '摄像头',
  1249. icon: 'l-10',
  1250. data: {
  1251. width: 400,
  1252. height: 250,
  1253. name: 'rtspPlayerDom',
  1254. externElement: true,
  1255. mse: true,
  1256. url: '',
  1257. rtspUrl: '',
  1258. props: {
  1259. custom: [
  1260. {
  1261. key: 'mse',
  1262. label: '类型',
  1263. type: 'select',
  1264. options: [
  1265. { label: 'Webrtc(低延迟,仅支持H264格式)', value: false },
  1266. { label: 'MSE(支持H265格式,需最新chrome)', value: true },
  1267. ],
  1268. },
  1269. {
  1270. key: 'url',
  1271. label: '流服务',
  1272. type: 'string',
  1273. },
  1274. {
  1275. key: 'rtspUrl',
  1276. label: 'RTSP URL',
  1277. type: 'string',
  1278. },
  1279. ],
  1280. },
  1281. },
  1282. }
  1283. ],
  1284. },
  1285. {
  1286. name: '时间',
  1287. show: true,
  1288. list: [
  1289. {
  1290. name: '时间',
  1291. icon: 'l-clock',
  1292. data: {
  1293. name: 'time',
  1294. width: 300,
  1295. height: 40,
  1296. text: '当前时间',
  1297. lineWidth: 0,
  1298. fillZero: true,
  1299. timeFormat:
  1300. '`${year}-${month}-${day} ${hours}:${minutes}:${seconds} 星期${week}`',
  1301. props: {
  1302. custom: [
  1303. {
  1304. key: 'timeFormat',
  1305. label: '显示格式',
  1306. type: 'string',
  1307. },
  1308. // {
  1309. // key: 'fillZero',
  1310. // label: '补0',
  1311. // type: 'switch',
  1312. // },
  1313. ],
  1314. },
  1315. },
  1316. },
  1317. {
  1318. name: '倒计时',
  1319. icon: 'l-daojishi',
  1320. data: {
  1321. name: 'countdown',
  1322. width: 300,
  1323. height: 40,
  1324. text: '倒计时',
  1325. // deadline: '2024/1/1 00:00:00', //配置未来的时间
  1326. borderWidth: 0,
  1327. timeFormat:
  1328. '`距离下一年还有:${day}天${hours}时${minutes}分${seconds}秒`',
  1329. props: {
  1330. custom: [
  1331. {
  1332. key: 'timeFormat',
  1333. label: '显示格式',
  1334. type: 'string',
  1335. },
  1336. {
  1337. key: 'deadline',
  1338. label: '截止时间',
  1339. type: 'string',
  1340. },
  1341. ],
  1342. },
  1343. },
  1344. },
  1345. {
  1346. name: '水平时间轴',
  1347. icon: 'l-shuipingshijianzhou',
  1348. data: {
  1349. name: 'timeline',
  1350. width: 300,
  1351. height: 40,
  1352. hiddenText: true,
  1353. direction: 'horizontal',
  1354. labelAlign: 'top', //left/right/alternate/top/bottom
  1355. mode: 'alternate', //alternate
  1356. data: [
  1357. {
  1358. label: '2022-01-01',
  1359. content: '事件一',
  1360. circleBg: '#BFDBFF',
  1361. circleShadow: '#4583FF33',
  1362. color: '#BFDBFF',
  1363. textColor: '#FFFFFF',
  1364. // 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',
  1365. },
  1366. {
  1367. label: '2022-02-01',
  1368. content: '事件二',
  1369. circleBg: '#BFDBFF',
  1370. circleShadow: '#4583FF33',
  1371. textColor: '#FFFFFF',
  1372. },
  1373. {
  1374. label: '2022-03-01',
  1375. content: '事件三',
  1376. textColor: '#FFFFFF66',
  1377. },
  1378. {
  1379. label: '2022-04-01',
  1380. content: '事件四',
  1381. textColor: '#FFFFFF66',
  1382. },
  1383. ],
  1384. text: '时间轴',
  1385. props: {
  1386. custom: [
  1387. {
  1388. key: 'mode',
  1389. label: '标签分布',
  1390. type: 'select',
  1391. options: [
  1392. { label: '同侧', value: 'same' },
  1393. { label: '交叉', value: 'alternate' },
  1394. ],
  1395. },
  1396. {
  1397. key: 'labelAlign',
  1398. label: '标签对齐',
  1399. type: 'select',
  1400. options: [
  1401. { label: '顶部', value: 'top' },
  1402. { label: '底部', value: 'bottom' },
  1403. ],
  1404. },
  1405. {
  1406. key: 'data',
  1407. label: '数据',
  1408. type: 'code',
  1409. },
  1410. ],
  1411. },
  1412. },
  1413. },
  1414. {
  1415. name: '垂直时间轴',
  1416. icon: 'l-chuizhishijianzhou',
  1417. data: {
  1418. name: 'timeline',
  1419. width: 40,
  1420. height: 300,
  1421. text: '时间轴',
  1422. hiddenText: true,
  1423. direction: 'vertical',
  1424. labelAlign: 'left', //left/right/alternate/top/bottom
  1425. mode: 'alternate', //alternate
  1426. data: [
  1427. {
  1428. label: '2022-01-01',
  1429. content: '事件一',
  1430. circleBg: '#BFDBFF',
  1431. circleShadow: '#4583FF33',
  1432. color: '#BFDBFF',
  1433. textColor: '#FFFFFF',
  1434. // 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',
  1435. },
  1436. {
  1437. label: '2022-02-01',
  1438. content: '事件二',
  1439. circleBg: '#BFDBFF',
  1440. circleShadow: '#4583FF33',
  1441. textColor: '#FFFFFF',
  1442. },
  1443. {
  1444. label: '2022-03-01',
  1445. content: '事件三',
  1446. textColor: '#FFFFFF66',
  1447. },
  1448. {
  1449. label: '2022-04-01',
  1450. content: '事件四',
  1451. textColor: '#FFFFFF66',
  1452. },
  1453. ],
  1454. props: {
  1455. custom: [
  1456. {
  1457. key: 'mode',
  1458. label: '标签分布',
  1459. type: 'select',
  1460. options: [
  1461. { label: '同侧', value: 'same' },
  1462. { label: '交叉', value: 'alternate' },
  1463. ],
  1464. },
  1465. {
  1466. key: 'labelAlign',
  1467. label: '标签对齐',
  1468. type: 'select',
  1469. options: [
  1470. { label: '靠左', value: 'left' },
  1471. { label: '靠右', value: 'right' },
  1472. ],
  1473. },
  1474. {
  1475. key: 'data',
  1476. label: '数据',
  1477. type: 'code',
  1478. },
  1479. ],
  1480. },
  1481. },
  1482. },
  1483. {
  1484. name: '日历(日期)',
  1485. icon: 'l-rili',
  1486. data: {
  1487. width: 280,
  1488. height: 326,
  1489. hiddenText: true,
  1490. name: 'calendar',
  1491. background: '#fff0',
  1492. hoverTextColor: '#fff',
  1493. dbInput: true,
  1494. // input: true,
  1495. text: '8月',
  1496. },
  1497. },
  1498. {
  1499. name: '日历(日期时间)',
  1500. icon: 'l-rili',
  1501. data: {
  1502. width: 496,
  1503. height: 326,
  1504. hiddenText: true,
  1505. name: 'calendar',
  1506. background: '#fff0',
  1507. hoverTextColor: '#fff',
  1508. dbInput: true,
  1509. // input: true,
  1510. text: '8月',
  1511. calendarType: 'time',
  1512. },
  1513. },
  1514. ],
  1515. },
  1516. {
  1517. name: '面板',
  1518. show: true,
  1519. list: [
  1520. {
  1521. name: '列表',
  1522. icon: 'l-liebiao',
  1523. data: {
  1524. width: 400,
  1525. height: 200,
  1526. name: 'list',
  1527. headingColor: '#FFFFFFE6',
  1528. headingSize: 16,
  1529. background: '#282E3B',
  1530. textColor: '#FFFFFF66',
  1531. hoverTextColor: '#FFFFFF66',
  1532. data: [
  1533. {
  1534. title: '列表标题',
  1535. description: '列表内容的描述性文字',
  1536. },
  1537. {
  1538. title: '列表标题',
  1539. description: '列表内容的描述性文字',
  1540. },
  1541. {
  1542. title: '列表标题',
  1543. description: '列表内容的描述性文字',
  1544. },
  1545. ],
  1546. props: {
  1547. custom: [
  1548. {
  1549. key: 'data',
  1550. label: '数据',
  1551. type: 'code',
  1552. },
  1553. {
  1554. key: 'background',
  1555. label: '背景颜色',
  1556. type: 'color',
  1557. },
  1558. {
  1559. key: 'headingSize',
  1560. label: '标题大小',
  1561. type: 'number',
  1562. },
  1563. {
  1564. key: 'headingColor',
  1565. label: '标题颜色',
  1566. type: 'color',
  1567. },
  1568. ],
  1569. },
  1570. },
  1571. },
  1572. {
  1573. name: '表格',
  1574. icon: 'l-biaoge',
  1575. data: {
  1576. name: 'tablePlus',
  1577. width: 0,
  1578. height: 0,
  1579. disableAnchor: true,
  1580. // disableSize: true,
  1581. colWidth: 40,
  1582. rowHeight: 30,
  1583. rowHeaders:true,
  1584. colHeaders:true,
  1585. maxNum:16,
  1586. tableType:'longlist',
  1587. mergeCells: [
  1588. { row: 1, col: 1, rowspan: 3, colspan: 3 },
  1589. { row: 3, col: 4, rowspan: 2, colspan: 2 },
  1590. { row: 5, col: 6, rowspan: 3, colspan: 2 }
  1591. ],
  1592. // styles: [
  1593. // {
  1594. // row: 1,
  1595. // col: 1,
  1596. // color: '#ff0000',
  1597. // background: '#ffff00',
  1598. // wheres: [
  1599. // //触发条件 成立后才允许配置样式
  1600. // {
  1601. // comparison: '<=',
  1602. // value: '123',
  1603. // },
  1604. // ],
  1605. // },
  1606. // {
  1607. // row: 0,
  1608. // height: 60,
  1609. // },
  1610. // {
  1611. // col: 4,
  1612. // width: 200, //为该列设置额外的节点
  1613. // pens: [
  1614. // {
  1615. // name: 'rectangle',
  1616. // width: 50,
  1617. // height: 20,
  1618. // text: '编辑',
  1619. // fontSize: 0.6,
  1620. // disableAnchor: true,
  1621. // activeBackground: '#2D71EC',
  1622. // activeColor: '#40a9ff',
  1623. // background: '#4583FF',
  1624. // color: '#1890ff',
  1625. // hoverBackground: '#7DA4FF',
  1626. // hoverColor: '#40a9ff',
  1627. // textColor: '#ffffff',
  1628. // hoverTextColor: '#ffffff',
  1629. // activeTextColor: '#ffffff',
  1630. // events: [
  1631. // {
  1632. // action: 5,
  1633. // name: 'click',
  1634. // value: 'alert("点击了编辑")',
  1635. // },
  1636. // ],
  1637. // },
  1638. // {
  1639. // name: 'rectangle',
  1640. // width: 80,
  1641. // height: 20,
  1642. // text: '实时数据',
  1643. // fontSize: 0.6,
  1644. // disableAnchor: true,
  1645. // activeBackground: '#2D71EC',
  1646. // activeColor: '#40a9ff',
  1647. // background: '#4583FF',
  1648. // color: '#1890ff',
  1649. // hoverBackground: '#7DA4FF',
  1650. // hoverColor: '#40a9ff',
  1651. // textColor: '#ffffff',
  1652. // hoverTextColor: '#ffffff',
  1653. // activeTextColor: '#ffffff',
  1654. // events: [
  1655. // {
  1656. // action: 5,
  1657. // name: 'click',
  1658. // value: 'alert("点击了实时数据")',
  1659. // },
  1660. // ],
  1661. // },
  1662. // ],
  1663. // },
  1664. // ],
  1665. props: {
  1666. custom: [
  1667. {
  1668. key: 'rowHeaders',
  1669. label: '行头显示',
  1670. type: 'bool',
  1671. },
  1672. {
  1673. key: 'data',
  1674. label: '数据',
  1675. type: 'code',
  1676. },
  1677. {
  1678. key: 'styles',
  1679. label: '样式',
  1680. type: 'code',
  1681. },
  1682. ],
  1683. },
  1684. },
  1685. },
  1686. {
  1687. name: '斑马纹表格',
  1688. icon: 'l-biaoge',
  1689. data: {
  1690. name: 'tablePlus',
  1691. width: 0,
  1692. height: 0,
  1693. disableAnchor: true,
  1694. disableSize: true,
  1695. colWidth: 90,
  1696. rowHeight: 32,
  1697. bordered: false,
  1698. vLine: false,
  1699. hLine: false,
  1700. stripe: true,
  1701. stripeColor: '#407FFF1F', //'#15181c',
  1702. // hasHeader: false,
  1703. textColor: '#FFFFFF',
  1704. data: [
  1705. ['设备 ID', '设备名称', '数据协议', '级别'],
  1706. [
  1707. '1',
  1708. '200',
  1709. 'MQTT',
  1710. {
  1711. text: '一级告警',
  1712. // background: '#650b09',
  1713. textColor: '#FF5D3CFF',
  1714. },
  1715. ],
  1716. [
  1717. '2',
  1718. '湿度传感器',
  1719. 'MQTT',
  1720. {
  1721. text: '二级告警',
  1722. // background: '#4d2a02',
  1723. textColor: '#E6A82EFF',
  1724. },
  1725. ],
  1726. [
  1727. '3',
  1728. '物联网设备',
  1729. 'MQTT',
  1730. {
  1731. text: '一级告警',
  1732. // background: '#650b09',
  1733. textColor: '#FF5D3CFF',
  1734. },
  1735. ],
  1736. [
  1737. '4',
  1738. '物联网设备/智能家居/智慧城市',
  1739. 'MQTT',
  1740. {
  1741. text: '三级告警',
  1742. textColor: '#58CC84FF',
  1743. // background: '#042617;',
  1744. },
  1745. ],
  1746. ],
  1747. styles: [
  1748. {
  1749. row: 0,
  1750. textColor: '#ffffff66',
  1751. },
  1752. {
  1753. col: 3,
  1754. pens: [
  1755. {
  1756. name: 'rectangle',
  1757. width: 56,
  1758. height: 20,
  1759. fontSize: 0.6,
  1760. disableAnchor: true,
  1761. lineWidth: 0,
  1762. },
  1763. ],
  1764. },
  1765. ],
  1766. props: {
  1767. custom: [
  1768. {
  1769. key: 'stripe',
  1770. label: '显示斑马纹',
  1771. type: 'bool',
  1772. },
  1773. {
  1774. key: 'stripeColor',
  1775. label: '斑马纹颜色',
  1776. type: 'color',
  1777. },
  1778. {
  1779. key: 'bordered',
  1780. label: '外边框',
  1781. type: 'bool',
  1782. },
  1783. {
  1784. key: 'hLine',
  1785. label: '水平线',
  1786. type: 'bool',
  1787. },
  1788. {
  1789. key: 'vLine',
  1790. label: '垂直线',
  1791. type: 'bool',
  1792. },
  1793. {
  1794. key: 'colHeaders',
  1795. label: '有无表头',
  1796. type: 'bool',
  1797. },
  1798. {
  1799. key: 'data',
  1800. label: '数据',
  1801. type: 'code',
  1802. },
  1803. {
  1804. key: 'styles',
  1805. label: '样式',
  1806. type: 'code',
  1807. },
  1808. ],
  1809. },
  1810. realTimes: [
  1811. {
  1812. label: '自定义',
  1813. key: 'data.1.3.text',
  1814. type: 'string',
  1815. mock: '{一级告警,二级告警,三级告警}',
  1816. enableMock: true,
  1817. triggers: [
  1818. {
  1819. name: '触发器1',
  1820. conditionType: 'and',
  1821. conditions: [
  1822. {
  1823. type: '',
  1824. operator: '=',
  1825. valueType: '',
  1826. value: '一级告警',
  1827. },
  1828. ],
  1829. actions: [
  1830. {
  1831. action: 5,
  1832. value:
  1833. "meta2d.setValue({id:pen.id,'data.1.3.textColor':'#FF5D3CFF'},{doEvent:false,render:true})",
  1834. params: '',
  1835. },
  1836. ],
  1837. },
  1838. {
  1839. name: '触发器2',
  1840. conditionType: 'and',
  1841. conditions: [
  1842. {
  1843. type: '',
  1844. operator: '=',
  1845. valueType: '',
  1846. value: '二级告警',
  1847. },
  1848. ],
  1849. actions: [
  1850. {
  1851. action: 5,
  1852. value:
  1853. "meta2d.setValue({id:pen.id,'data.1.3.textColor':'#E6A82EFF'},{doEvent:false,render:true})",
  1854. params: '',
  1855. },
  1856. ],
  1857. },
  1858. {
  1859. name: '触发器3',
  1860. conditionType: 'and',
  1861. conditions: [
  1862. {
  1863. type: '',
  1864. operator: '=',
  1865. valueType: '',
  1866. value: '三级告警',
  1867. },
  1868. ],
  1869. actions: [
  1870. {
  1871. action: 5,
  1872. value:
  1873. "meta2d.setValue({id:pen.id,'data.1.3.textColor':'#58CC84FF'},{doEvent:false,render:true})",
  1874. params: '',
  1875. },
  1876. ],
  1877. },
  1878. ],
  1879. },
  1880. ],
  1881. },
  1882. },
  1883. {
  1884. name: '滚动表格',
  1885. icon: 'l-biaoge',
  1886. data: {
  1887. name: 'tablePlus',
  1888. width: 0,
  1889. height: 0,
  1890. disableAnchor: true,
  1891. disableSize: true,
  1892. colWidth: 90,
  1893. rowHeight: 32,
  1894. bordered: false,
  1895. vLine: false,
  1896. hLine: true,
  1897. // stripe: true,
  1898. swiper:true,
  1899. // stripeColor: '#407FFF1F', //'#15181c',
  1900. hasHeader:true,
  1901. textColor: '#FFFFFF',
  1902. maxNum:5,
  1903. data: [
  1904. [
  1905. "序号",
  1906. "时间",
  1907. "事件内容",
  1908. "处理状态"
  1909. ],
  1910. [
  1911. {
  1912. "text": "1"
  1913. },
  1914. "2023-06-17 13:50",
  1915. "事件内容",
  1916. {
  1917. "text": "处理中",
  1918. "textColor": "#05CFF9FF"
  1919. }
  1920. ],
  1921. [
  1922. {
  1923. "text": "2"
  1924. },
  1925. "2023-06-17 13:51",
  1926. "事件内容",
  1927. {
  1928. "text": "已完成",
  1929. "textColor": "#B3D1FFFF"
  1930. }
  1931. ],
  1932. [
  1933. {
  1934. "text": "3"
  1935. },
  1936. "2023-06-17 13:52",
  1937. "事件内容",
  1938. {
  1939. "text": "待处理",
  1940. "textColor": "#E6A82EFF"
  1941. }
  1942. ],
  1943. [
  1944. {
  1945. "text": "4"
  1946. },
  1947. "2023-06-17 13:53",
  1948. "事件内容",
  1949. {
  1950. "text": "已完成",
  1951. "textColor": "#B3D1FFFF"
  1952. }
  1953. ],
  1954. [
  1955. {
  1956. "text": "5"
  1957. },
  1958. "2023-06-17 13:54",
  1959. "事件内容",
  1960. {
  1961. "text": "处理中",
  1962. "textColor": "#05CFF9FF"
  1963. }
  1964. ],
  1965. [
  1966. {
  1967. "text": "6"
  1968. },
  1969. "2023-06-17 13:55",
  1970. "事件内容",
  1971. {
  1972. "text": "处理中",
  1973. "textColor": "#05CFF9FF"
  1974. }
  1975. ],
  1976. [
  1977. {
  1978. "text": "7"
  1979. },
  1980. "2023-06-17 13:57",
  1981. "事件内容",
  1982. {
  1983. "text": "处理中",
  1984. "textColor": "#05CFF9FF"
  1985. }
  1986. ],
  1987. [
  1988. {
  1989. "text": "8"
  1990. },
  1991. "2023-06-17 13:58",
  1992. "事件内容",
  1993. {
  1994. "text": "处理中",
  1995. "textColor": "#05CFF9FF"
  1996. }
  1997. ],
  1998. [
  1999. {
  2000. "text": "9"
  2001. },
  2002. "2023-06-17 13:59",
  2003. "事件内容",
  2004. {
  2005. "text": "处理中",
  2006. "textColor": "#05CFF9FF"
  2007. }
  2008. ],
  2009. [
  2010. {
  2011. "text": "10"
  2012. },
  2013. "2023-06-17 14:00",
  2014. "事件内容",
  2015. {
  2016. "text": "处理中",
  2017. "textColor": "#05CFF9FF"
  2018. }
  2019. ],
  2020. [
  2021. {
  2022. "text": "11"
  2023. },
  2024. "2023-06-17 14:01",
  2025. "事件内容",
  2026. {
  2027. "text": "处理中",
  2028. "textColor": "#05CFF9FF"
  2029. }
  2030. ],
  2031. [
  2032. {
  2033. "text": "12"
  2034. },
  2035. "2023-06-17 13:02",
  2036. "事件内容",
  2037. {
  2038. "text": "处理中",
  2039. "textColor": "#05CFF9FF"
  2040. }
  2041. ]
  2042. ],
  2043. styles: [
  2044. {
  2045. "col": 1,
  2046. "width": 112
  2047. },
  2048. {
  2049. "col": 2,
  2050. "width": 112
  2051. },
  2052. {
  2053. "col": 3,
  2054. "pens": [
  2055. {
  2056. "disableAnchor": true,
  2057. "fontSize": 0.6,
  2058. "height": 20,
  2059. "lineWidth": 0,
  2060. "name": "rectangle",
  2061. "textColor": "#05CFF9FF",
  2062. "width": 56
  2063. }
  2064. ],
  2065. "width": 70
  2066. },
  2067. {
  2068. "col": 0,
  2069. "pens": [
  2070. {
  2071. "background": "#4583FF33",
  2072. "disableAnchor": true,
  2073. "height": 20,
  2074. "isBottom": false,
  2075. "lineWidth": 0,
  2076. "name": "rectangle",
  2077. "width": 20
  2078. }
  2079. ],
  2080. "width": 40
  2081. }
  2082. ],
  2083. props: {
  2084. custom: [
  2085. {
  2086. key: 'colHeaders',
  2087. label: '有无表头',
  2088. type: 'bool',
  2089. },
  2090. {
  2091. key: 'swiper',
  2092. label: '是否轮播',
  2093. type: 'bool',
  2094. },
  2095. {
  2096. key: 'maxNum',
  2097. label: '最大展示数',
  2098. type: 'number',
  2099. },
  2100. {
  2101. key: 'data',
  2102. label: '数据',
  2103. type: 'code',
  2104. },
  2105. {
  2106. key: 'styles',
  2107. label: '样式',
  2108. type: 'code',
  2109. },
  2110. ],
  2111. },
  2112. },
  2113. },
  2114. {
  2115. name: '表格分页',
  2116. icon: 'l-biaoge',
  2117. data: {
  2118. name: 'tablePlus',
  2119. width: 0,
  2120. height: 0,
  2121. disableAnchor: true,
  2122. disableSize: true,
  2123. bordered:true,
  2124. hLine:true,
  2125. vLine:true,
  2126. colWidth: 180,
  2127. rowHeight: 30,
  2128. color: "#bdc7db",
  2129. stripe: true,
  2130. stripeColor: "#407FFF1F",
  2131. ellipsis: true,
  2132. whiteSpace: "break-all",
  2133. pagination: {
  2134. current: 1,
  2135. maxPageBtn: 5,
  2136. pageSize: 20,
  2137. pageSizeOptions: [
  2138. 5,
  2139. 10,
  2140. 20,
  2141. 30
  2142. ],
  2143. size: "small",
  2144. total: 88
  2145. },
  2146. events: [
  2147. {
  2148. "actions": [
  2149. {
  2150. "action": 15,
  2151. "callback": " let _data = [['场景','图纸id','名称','操作']]; \r\n let data1 = JSON.parse(data);\r\n pen.pagination.total = data1.total;\r\n pen.calculative.paginationPen.total = data1.total;\r\n data1.list.forEach((item)=>{\r\n let _item = [item.case?item.case:'无',item.id,item.name,{events:[\r\n {\r\n \"actions\": [\r\n {\r\n \"action\": 0,\r\n \"params\":\"_blank\",\r\n \"value\": `https://view.le5le.com/2d?id=${item.id}`\r\n }\r\n ],\r\n \"conditions\": [],\r\n \"name\": \"click\"\r\n }\r\n ]}];\r\n _data.push(_item);\r\n });\r\n context.meta2d.setValue({id:pen.id,data:_data},{doEvent:false,history:false});",
  2152. "input": "",
  2153. "network": {
  2154. "httpTimeInterval": 1000,
  2155. "method": "POST",
  2156. "options": {},
  2157. "protocol": "http",
  2158. "type": "publish",
  2159. "url": "/api/data/2d/list?current=${pagination.current}&pageSize=${pagination.pageSize}"
  2160. },
  2161. "params": "",
  2162. "targetType": "id",
  2163. "value": {
  2164. "shared": true
  2165. }
  2166. }
  2167. ],
  2168. "conditionType": "and",
  2169. "conditions": [
  2170. {
  2171. "key": "pageChange",
  2172. "keyLabel": "pageChange",
  2173. "keyPopupVisible": false,
  2174. "operator": "=",
  2175. "type": "",
  2176. "value": true,
  2177. "valueType": ""
  2178. }
  2179. ],
  2180. "name": "click"
  2181. }
  2182. ],
  2183. data: [
  2184. [
  2185. "场景",
  2186. "图纸id",
  2187. "名称",
  2188. "操作"
  2189. ],
  2190. [
  2191. "智慧物联",
  2192. "01840e23-efb8-70d4-804b-9402de84d2d7",
  2193. "冷源群控系统",
  2194. {
  2195. "events": [
  2196. {
  2197. "actions": [
  2198. {
  2199. "action": 0,
  2200. "params": "_blank",
  2201. "value": "https://view.le5le.com/2d?id=01840e23-efb8-70d4-804b-9402de84d2d7"
  2202. }
  2203. ],
  2204. "conditions": [],
  2205. "name": "click"
  2206. }
  2207. ]
  2208. }
  2209. ],
  2210. [
  2211. "智慧园区",
  2212. "01871289-7110-708d-80f2-c654ea652d7e",
  2213. "中央空调模拟演示台系统",
  2214. {
  2215. "events": [
  2216. {
  2217. "actions": [
  2218. {
  2219. "action": 0,
  2220. "params": "_blank",
  2221. "value": "https://view.le5le.com/2d?id=01871289-7110-708d-80f2-c654ea652d7e"
  2222. }
  2223. ],
  2224. "conditions": [],
  2225. "name": "click"
  2226. }
  2227. ]
  2228. }
  2229. ],
  2230. [
  2231. "智慧物联",
  2232. "01864ef5-f3b8-7046-8062-680466d5157b",
  2233. "换热站远程监控系统",
  2234. {
  2235. "events": [
  2236. {
  2237. "actions": [
  2238. {
  2239. "action": 0,
  2240. "params": "_blank",
  2241. "value": "https://view.le5le.com/2d?id=01864ef5-f3b8-7046-8062-680466d5157b"
  2242. }
  2243. ],
  2244. "conditions": [],
  2245. "name": "click"
  2246. }
  2247. ]
  2248. }
  2249. ],
  2250. [
  2251. "无",
  2252. "018f94fe-12f4-7e6e-90c2-e7354270e7e1",
  2253. "RTO ",
  2254. {
  2255. "events": [
  2256. {
  2257. "actions": [
  2258. {
  2259. "action": 0,
  2260. "params": "_blank",
  2261. "value": "https://view.le5le.com/2d?id=018f94fe-12f4-7e6e-90c2-e7354270e7e1"
  2262. }
  2263. ],
  2264. "conditions": [],
  2265. "name": "click"
  2266. }
  2267. ]
  2268. }
  2269. ],
  2270. [
  2271. "电力能源",
  2272. "01831702-3460-7028-808d-77e4cee1a1bd",
  2273. "变电站主接线图",
  2274. {
  2275. "events": [
  2276. {
  2277. "actions": [
  2278. {
  2279. "action": 0,
  2280. "params": "_blank",
  2281. "value": "https://view.le5le.com/2d?id=01831702-3460-7028-808d-77e4cee1a1bd"
  2282. }
  2283. ],
  2284. "conditions": [],
  2285. "name": "click"
  2286. }
  2287. ]
  2288. }
  2289. ],
  2290. [
  2291. "智慧物联",
  2292. "01840e82-bd40-70d4-804b-9402de84d2f1",
  2293. "制冷站",
  2294. {
  2295. "events": [
  2296. {
  2297. "actions": [
  2298. {
  2299. "action": 0,
  2300. "params": "_blank",
  2301. "value": "https://view.le5le.com/2d?id=01840e82-bd40-70d4-804b-9402de84d2f1"
  2302. }
  2303. ],
  2304. "conditions": [],
  2305. "name": "click"
  2306. }
  2307. ]
  2308. }
  2309. ],
  2310. [
  2311. "智慧水务",
  2312. "0186531b-a898-7046-8062-680466d51d97",
  2313. "废水处理",
  2314. {
  2315. "events": [
  2316. {
  2317. "actions": [
  2318. {
  2319. "action": 0,
  2320. "params": "_blank",
  2321. "value": "https://view.le5le.com/2d?id=0186531b-a898-7046-8062-680466d51d97"
  2322. }
  2323. ],
  2324. "conditions": [],
  2325. "name": "click"
  2326. }
  2327. ]
  2328. }
  2329. ],
  2330. [
  2331. "电信机房",
  2332. "01840e6f-9ad0-70d4-804b-9402de84d2e8",
  2333. "数据中心",
  2334. {
  2335. "events": [
  2336. {
  2337. "actions": [
  2338. {
  2339. "action": 0,
  2340. "params": "_blank",
  2341. "value": "https://view.le5le.com/2d?id=01840e6f-9ad0-70d4-804b-9402de84d2e8"
  2342. }
  2343. ],
  2344. "conditions": [],
  2345. "name": "click"
  2346. }
  2347. ]
  2348. }
  2349. ],
  2350. [
  2351. "智慧工厂",
  2352. "018fc8e1-6ccb-734c-a438-72a1c51dd2cb",
  2353. "破碎筛分监控",
  2354. {
  2355. "events": [
  2356. {
  2357. "actions": [
  2358. {
  2359. "action": 0,
  2360. "params": "_blank",
  2361. "value": "https://view.le5le.com/2d?id=018fc8e1-6ccb-734c-a438-72a1c51dd2cb"
  2362. }
  2363. ],
  2364. "conditions": [],
  2365. "name": "click"
  2366. }
  2367. ]
  2368. }
  2369. ],
  2370. [
  2371. "电力能源",
  2372. "01840e78-7c40-70d4-804b-9402de84d2eb",
  2373. "光伏系统",
  2374. {
  2375. "events": [
  2376. {
  2377. "actions": [
  2378. {
  2379. "action": 0,
  2380. "params": "_blank",
  2381. "value": "https://view.le5le.com/2d?id=01840e78-7c40-70d4-804b-9402de84d2eb"
  2382. }
  2383. ],
  2384. "conditions": [],
  2385. "name": "click"
  2386. }
  2387. ]
  2388. }
  2389. ],
  2390. [
  2391. "智慧工厂",
  2392. "01888a79-9d70-70ad-803e-767682ff0962",
  2393. "智能预制泵站",
  2394. {
  2395. "events": [
  2396. {
  2397. "actions": [
  2398. {
  2399. "action": 0,
  2400. "params": "_blank",
  2401. "value": "https://view.le5le.com/2d?id=01888a79-9d70-70ad-803e-767682ff0962"
  2402. }
  2403. ],
  2404. "conditions": [],
  2405. "name": "click"
  2406. }
  2407. ]
  2408. }
  2409. ],
  2410. [
  2411. "智慧物联",
  2412. "01840e88-00e8-70d4-804b-9402de84d2f3",
  2413. "锅炉房",
  2414. {
  2415. "events": [
  2416. {
  2417. "actions": [
  2418. {
  2419. "action": 0,
  2420. "params": "_blank",
  2421. "value": "https://view.le5le.com/2d?id=01840e88-00e8-70d4-804b-9402de84d2f3"
  2422. }
  2423. ],
  2424. "conditions": [],
  2425. "name": "click"
  2426. }
  2427. ]
  2428. }
  2429. ],
  2430. [
  2431. "智慧工厂",
  2432. "0180abf4-d170-709d-80ac-35b389088ca8",
  2433. "火电厂生产过程示意图",
  2434. {
  2435. "events": [
  2436. {
  2437. "actions": [
  2438. {
  2439. "action": 0,
  2440. "params": "_blank",
  2441. "value": "https://view.le5le.com/2d?id=0180abf4-d170-709d-80ac-35b389088ca8"
  2442. }
  2443. ],
  2444. "conditions": [],
  2445. "name": "click"
  2446. }
  2447. ]
  2448. }
  2449. ],
  2450. [
  2451. "智慧工厂",
  2452. "01840e73-e090-70d4-804b-9402de84d2ea",
  2453. "制冷站",
  2454. {
  2455. "events": [
  2456. {
  2457. "actions": [
  2458. {
  2459. "action": 0,
  2460. "params": "_blank",
  2461. "value": "https://view.le5le.com/2d?id=01840e73-e090-70d4-804b-9402de84d2ea"
  2462. }
  2463. ],
  2464. "conditions": [],
  2465. "name": "click"
  2466. }
  2467. ]
  2468. }
  2469. ],
  2470. [
  2471. "智慧物联",
  2472. "0179c5f5-1d70-70fd-8058-e60001871e89",
  2473. "燃气管道远程监控系统",
  2474. {
  2475. "events": [
  2476. {
  2477. "actions": [
  2478. {
  2479. "action": 0,
  2480. "params": "_blank",
  2481. "value": "https://view.le5le.com/2d?id=0179c5f5-1d70-70fd-8058-e60001871e89"
  2482. }
  2483. ],
  2484. "conditions": [],
  2485. "name": "click"
  2486. }
  2487. ]
  2488. }
  2489. ],
  2490. [
  2491. "智慧工厂",
  2492. "01869188-d448-7073-804c-5807bdf1ecb5",
  2493. "汽车涂装生产线",
  2494. {
  2495. "events": [
  2496. {
  2497. "actions": [
  2498. {
  2499. "action": 0,
  2500. "params": "_blank",
  2501. "value": "https://view.le5le.com/2d?id=01869188-d448-7073-804c-5807bdf1ecb5"
  2502. }
  2503. ],
  2504. "conditions": [],
  2505. "name": "click"
  2506. }
  2507. ]
  2508. }
  2509. ],
  2510. [
  2511. "智慧工厂",
  2512. "018431db-bc38-70da-8009-62a797f1ab75",
  2513. "废气治理",
  2514. {
  2515. "events": [
  2516. {
  2517. "actions": [
  2518. {
  2519. "action": 0,
  2520. "params": "_blank",
  2521. "value": "https://view.le5le.com/2d?id=018431db-bc38-70da-8009-62a797f1ab75"
  2522. }
  2523. ],
  2524. "conditions": [],
  2525. "name": "click"
  2526. }
  2527. ]
  2528. }
  2529. ],
  2530. [
  2531. "电力能源",
  2532. "016effb2-56a0-7060-8025-d729abf23681",
  2533. "电网单线图",
  2534. {
  2535. "events": [
  2536. {
  2537. "actions": [
  2538. {
  2539. "action": 0,
  2540. "params": "_blank",
  2541. "value": "https://view.le5le.com/2d?id=016effb2-56a0-7060-8025-d729abf23681"
  2542. }
  2543. ],
  2544. "conditions": [],
  2545. "name": "click"
  2546. }
  2547. ]
  2548. }
  2549. ],
  2550. [
  2551. "智慧城市",
  2552. "01840e7f-fe20-70d4-804b-9402de84d2f0",
  2553. "智慧城市",
  2554. {
  2555. "events": [
  2556. {
  2557. "actions": [
  2558. {
  2559. "action": 0,
  2560. "params": "_blank",
  2561. "value": "https://view.le5le.com/2d?id=01840e7f-fe20-70d4-804b-9402de84d2f0"
  2562. }
  2563. ],
  2564. "conditions": [],
  2565. "name": "click"
  2566. }
  2567. ]
  2568. }
  2569. ],
  2570. [
  2571. "电力能源",
  2572. "01796382-43c0-7070-80c5-ce0001cdb895吾问无为谓哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇哇dd",
  2573. "高压一次图",
  2574. {
  2575. "events": [
  2576. {
  2577. "actions": [
  2578. {
  2579. "action": 0,
  2580. "params": "_blank",
  2581. "value": "https://view.le5le.com/2d?id=01796382-43c0-7070-80c5-ce0001cdb895"
  2582. }
  2583. ],
  2584. "conditions": [],
  2585. "name": "click"
  2586. }
  2587. ]
  2588. }
  2589. ]
  2590. ],
  2591. styles: [
  2592. {
  2593. "row": 0,
  2594. "textColor": "#ffffff66"
  2595. },
  2596. {
  2597. "col": 3,
  2598. "pens": [
  2599. {
  2600. "color": "#0052d9",
  2601. "disableAnchor": true,
  2602. "height": 20,
  2603. "lineWidth": 0,
  2604. "name": "rectangle",
  2605. "text": "点击查看",
  2606. "width": 56
  2607. }
  2608. ]
  2609. }
  2610. ],
  2611. props: {
  2612. custom: [
  2613. {
  2614. key: 'stripe',
  2615. label: '显示斑马纹',
  2616. type: 'bool',
  2617. },
  2618. {
  2619. key: 'stripeColor',
  2620. label: '斑马纹颜色',
  2621. type: 'color',
  2622. },
  2623. {
  2624. key: 'bordered',
  2625. label: '外边框',
  2626. type: 'bool',
  2627. },
  2628. {
  2629. key: 'hLine',
  2630. label: '水平线',
  2631. type: 'bool',
  2632. },
  2633. {
  2634. key: 'vLine',
  2635. label: '垂直线',
  2636. type: 'bool',
  2637. },
  2638. {
  2639. key: 'pagination',
  2640. label: '分页配置',
  2641. type: 'code',
  2642. },
  2643. {
  2644. key: 'data',
  2645. label: '数据',
  2646. type: 'code',
  2647. },
  2648. {
  2649. key: 'styles',
  2650. label: '样式',
  2651. type: 'code',
  2652. },
  2653. ],
  2654. }
  2655. },
  2656. },
  2657. {
  2658. name: '树',
  2659. icon: 'l-shu', //l-shu
  2660. data: {
  2661. name: 'tree',
  2662. width: 150,
  2663. height: 210,
  2664. expanded: ['1', '2'],
  2665. fontSize: 20,
  2666. disableInput: true,
  2667. textColor: '#FFFFFF',
  2668. hoverTextColor: '#FFFFFF',
  2669. // iconFamily:'l-icon',
  2670. // icon:'\ue607',
  2671. data: [
  2672. {
  2673. key: '1',
  2674. label: '1',
  2675. children: [
  2676. {
  2677. key: '1-1',
  2678. label: '1-1',
  2679. },
  2680. {
  2681. key: '1-1',
  2682. label: '1-2',
  2683. },
  2684. ],
  2685. },
  2686. {
  2687. key: '2',
  2688. label: '2',
  2689. children: [
  2690. {
  2691. key: '2-1',
  2692. label: '2-1',
  2693. children: [
  2694. {
  2695. key: '2-1-1',
  2696. label: '2-1-1',
  2697. },
  2698. {
  2699. key: '2-1-2',
  2700. label: '2-2-2',
  2701. },
  2702. ],
  2703. },
  2704. {
  2705. key: '2-2',
  2706. label: '2-2',
  2707. },
  2708. ],
  2709. },
  2710. {
  2711. key: '3',
  2712. label: '3',
  2713. },
  2714. ],
  2715. props: {
  2716. custom: [
  2717. {
  2718. key: 'expandAll',
  2719. label: '展开全部节点',
  2720. type: 'bool',
  2721. },
  2722. {
  2723. key: 'data',
  2724. label: '数据',
  2725. type: 'code',
  2726. },
  2727. ],
  2728. },
  2729. },
  2730. },
  2731. {
  2732. name: '网页',
  2733. icon: 'l-iframe',
  2734. data: {
  2735. name: 'iframe',
  2736. width: 500,
  2737. height: 400,
  2738. externElement: true,
  2739. iframe: `https://${rootDomain?.slice(1)}`,
  2740. props: {
  2741. custom: iframeCustom,
  2742. },
  2743. },
  2744. },
  2745. ],
  2746. },
  2747. {
  2748. name: '提醒',
  2749. show: true,
  2750. list: [
  2751. {
  2752. name: '业务指标',
  2753. icon: 'l-yewuzhibiao',
  2754. data: {
  2755. width: 115,
  2756. height: 25,
  2757. name: 'indicator',
  2758. data: [
  2759. {
  2760. type: 'text',
  2761. color: '#FFFFFFD9',
  2762. x: 0,
  2763. text: '业务指标',
  2764. },
  2765. {
  2766. type: 'icon',
  2767. x: 0.5,
  2768. size: 0.5, //高度的倍数
  2769. color: '#ff0000',
  2770. background: '#f00',
  2771. 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',
  2772. },
  2773. {
  2774. textColor: '#f00',
  2775. type: 'text',
  2776. color: '',
  2777. x: 0.6,
  2778. text: '20%',
  2779. },
  2780. ],
  2781. props: {
  2782. custom: [
  2783. {
  2784. key: 'data',
  2785. label: '数据',
  2786. type: 'code',
  2787. },
  2788. ],
  2789. },
  2790. },
  2791. },
  2792. {
  2793. name: '全局消息',
  2794. icon: 'l-quanjuxiaoxi',
  2795. data: {
  2796. width: 200,
  2797. height: 40,
  2798. text: '用于表示普通操作信息提示',
  2799. borderRadius: 6,
  2800. name: 'rectangle',
  2801. icon: '\ue6e4',
  2802. iconFamily: 'l-icon',
  2803. iconColor: '#4583ff',
  2804. iconSize: 17.5,
  2805. iconAlign: 'left',
  2806. iconLeft: 10,
  2807. textAlign: 'left',
  2808. color: 'rgba(235, 235, 235, 1)',
  2809. background: '#282E3B',
  2810. textLeft: 30,
  2811. lineWidth: 0,
  2812. shadow: false,
  2813. textColor: '#FFFFFF',
  2814. hoverTextColor: 'rgba(0, 0, 0, 1)',
  2815. shadowColor: '#00000014',
  2816. shadowOffsetX: 6,
  2817. shadowOffsetY: 6,
  2818. shadowBlur: 20,
  2819. props: {
  2820. custom: [
  2821. {
  2822. key: 'text',
  2823. label: '文本',
  2824. type: 'text',
  2825. },
  2826. {
  2827. key: 'textColor',
  2828. label: '文本颜色',
  2829. type: 'color',
  2830. },
  2831. ],
  2832. },
  2833. },
  2834. },
  2835. {
  2836. name: '通知',
  2837. icon: 'l-tongzhi',
  2838. data: {
  2839. width: 360,
  2840. height: 178,
  2841. text: '通知具体内容;通知具体内容;通知具体内容;通知具体内容;通知具体内容;通知具体内容;通知具体内容;通知具体内容;通知具体内容;',
  2842. borderRadius: 6,
  2843. name: 'notification',
  2844. icon: '\ue6e4',
  2845. iconFamily: 'l-icon',
  2846. iconColor: '#4583ff',
  2847. iconSize: 18,
  2848. iconAlign: 'left-top',
  2849. iconLeft: 15,
  2850. iconTop: 20,
  2851. textAlign: 'left',
  2852. textBaseline: 'top',
  2853. textLeft: 40,
  2854. textTop: 50,
  2855. color: 'rgba(235, 235, 235, 1)',
  2856. background: '#282E3B',
  2857. shadow: false,
  2858. textColor: '#FFFFFF99',
  2859. hoverTextColor: '#666666',
  2860. shadowColor: '#0000000D',
  2861. shadowOffsetX: 6,
  2862. shadowOffsetY: 6,
  2863. textWidth: 300,
  2864. shadowBlur: 24,
  2865. heading: '标题名称',
  2866. headingColor: '#FFFFFFE6',
  2867. headingSize: 16,
  2868. // headingWeight: 'bold',
  2869. props: {
  2870. custom: [
  2871. {
  2872. key: 'heading',
  2873. label: '标题',
  2874. type: 'string',
  2875. },
  2876. {
  2877. key: 'headingColor',
  2878. label: '标题颜色',
  2879. type: 'color',
  2880. },
  2881. {
  2882. key: 'headingSize',
  2883. label: '标题大小',
  2884. type: 'number',
  2885. },
  2886. {
  2887. key: 'headingWeight',
  2888. label: '标题加粗',
  2889. type: 'select',
  2890. options: [
  2891. { label: '加粗', value: 'bold' },
  2892. { label: '正常', value: '' },
  2893. ],
  2894. },
  2895. ],
  2896. },
  2897. },
  2898. },
  2899. // {
  2900. // name: '对话框',
  2901. // icon: 'l-pc',
  2902. // data: {
  2903. // width: 200,
  2904. // height: 200,
  2905. // },
  2906. // },
  2907. ],
  2908. },
  2909. {
  2910. name: '轮播',
  2911. show: true,
  2912. list: [
  2913. {
  2914. name: '水平轮播',
  2915. icon: 'l-paomadeng',
  2916. data: {
  2917. name: 'swiperline',
  2918. width: 200,
  2919. height: 40,
  2920. data: ['轮播第一次数据', '轮播第二次数据', '轮播第三次数据'],
  2921. hiddenText: true,
  2922. props: {
  2923. custom: [
  2924. {
  2925. key: 'data',
  2926. label: '数据',
  2927. type: 'code',
  2928. },
  2929. {
  2930. key: 'timeout',
  2931. label: '轮播时间',
  2932. type: 'number',
  2933. },
  2934. ],
  2935. },
  2936. },
  2937. },
  2938. {
  2939. name: '垂直轮播',
  2940. icon: 'l-chuizhigundong',
  2941. data: {
  2942. name: 'swiperline',
  2943. width: 200,
  2944. height: 24,
  2945. direction: 'vertical',
  2946. lineHeight: 2,
  2947. data: ['轮播第一次数据', '轮播第二次数据', '轮播第三次数据'],
  2948. hiddenText: true,
  2949. props: {
  2950. custom: [
  2951. {
  2952. key: 'data',
  2953. label: '数据',
  2954. type: 'code',
  2955. },
  2956. {
  2957. key: 'timeout',
  2958. label: '轮播时间',
  2959. type: 'number',
  2960. },
  2961. ],
  2962. },
  2963. },
  2964. },
  2965. {
  2966. name: '轮播图',
  2967. icon: 'l-lunbotu',
  2968. data: {
  2969. name: 'swiperDom',
  2970. externElement: true,
  2971. width: 400,
  2972. height: 300,
  2973. data: [
  2974. {
  2975. src: `https://2ds${rootDomain}/img/banner1.bc890350.png`,
  2976. },
  2977. {
  2978. src: `https://2ds${rootDomain}/img/banner2.adab6a6e.png`,
  2979. },
  2980. {
  2981. src: `https://2ds${rootDomain}/img/banner3.86b53aed.png`,
  2982. },
  2983. ],
  2984. hiddenText: true,
  2985. props: {
  2986. custom: [
  2987. {
  2988. key: 'data',
  2989. label: '数据',
  2990. type: 'code',
  2991. },
  2992. ],
  2993. },
  2994. },
  2995. },
  2996. {
  2997. name: '轮播页面',
  2998. icon: 'l-lunboyemian',
  2999. data: {
  3000. name: 'swiperDom',
  3001. width: 400,
  3002. height: 300,
  3003. swiperType: 'iframe',
  3004. data: [
  3005. {
  3006. src: `https://2d${rootDomain}/preview?id=6357a9e2d44b9402de84d2e8`,
  3007. },
  3008. {
  3009. src: `https://2d${rootDomain}/preview?id=6357aec8d44b9402de84d2f1`,
  3010. },
  3011. {
  3012. src: `https://2d${rootDomain}/preview?id=641d524a8df2c654ea652d7e`,
  3013. },
  3014. ],
  3015. hiddenText: true,
  3016. props: {
  3017. custom: [
  3018. {
  3019. key: 'data',
  3020. label: '数据',
  3021. type: 'code',
  3022. },
  3023. ],
  3024. },
  3025. },
  3026. },
  3027. ],
  3028. },
  3029. {
  3030. name: '导航',
  3031. show: true,
  3032. list: [
  3033. {
  3034. name: '链接',
  3035. icon: 'l-lianjie',
  3036. data: {
  3037. text: '乐吾乐2D编辑器',
  3038. width: 100,
  3039. height: 30,
  3040. name: 'text',
  3041. textColor: '#0052d9',
  3042. events: [
  3043. {
  3044. name: 'click',
  3045. actions: [
  3046. {
  3047. action: 0,
  3048. params: '_blank',
  3049. value: `https://2d${rootDomain}`,
  3050. },
  3051. ],
  3052. },
  3053. ],
  3054. props: {
  3055. custom: [
  3056. {
  3057. key: 'events.0.actions.0.value',
  3058. label: '地址',
  3059. type: 'string',
  3060. },
  3061. ],
  3062. },
  3063. },
  3064. },
  3065. {
  3066. name: '返回',
  3067. icon: 'l-fanhui',
  3068. data: {
  3069. width: 40,
  3070. height: 40,
  3071. name: 'image',
  3072. icon: '\ue697',
  3073. iconFamily: 'l-icon',
  3074. events: [
  3075. {
  3076. name: 'click',
  3077. actions: [
  3078. {
  3079. action: 5,
  3080. value: 'window.history.go(-1);',
  3081. },
  3082. ],
  3083. },
  3084. ],
  3085. },
  3086. },
  3087. {
  3088. name: '锚点',
  3089. icon: 'l-anchor',
  3090. data: {
  3091. width: 40,
  3092. height: 40,
  3093. name: 'image',
  3094. icon: '\uea7b',
  3095. iconFamily: 'l-icon',
  3096. events: [
  3097. {
  3098. name: 'click',
  3099. actions: [
  3100. {
  3101. action: 5,
  3102. params: 'pen.id/tag',
  3103. value:
  3104. '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();',
  3105. },
  3106. ],
  3107. },
  3108. ],
  3109. props: {
  3110. custom: [
  3111. {
  3112. key: 'events.0.actions.0.params',
  3113. label: '定位图元',
  3114. type: 'string',
  3115. },
  3116. ],
  3117. },
  3118. },
  3119. },
  3120. {
  3121. name: '回到顶部',
  3122. icon: 'l-huidaodingbu',
  3123. data: {
  3124. width: 64,
  3125. height: 64,
  3126. name: 'rectangle',
  3127. activeBackground: '#282E3B',
  3128. background: '#282E3B',
  3129. borderRadius: 0.1,
  3130. color: '#eee',
  3131. hoverBackground: '#282E3B',
  3132. hoverColor: '#eee',
  3133. hoverTextColor: '#FFFFFFE6',
  3134. iconAlign: 'top',
  3135. iconColor: '#FFFFFFE6',
  3136. iconSize: 20,
  3137. iconTop: 10,
  3138. text: 'TOP',
  3139. textBaseline: 'bottom',
  3140. lineWidth: 0,
  3141. textColor: '#FFFFFFE6',
  3142. textTop: -2,
  3143. icon: '\uec57',
  3144. iconFamily: 'l-icon',
  3145. events: [
  3146. {
  3147. name: 'click',
  3148. actions: [
  3149. {
  3150. action: 5,
  3151. value: `
  3152. const { scale, origin, y: dataY } = context.meta2d.store.data;
  3153. context.meta2d.translate(
  3154. 0,
  3155. ((parseInt(params)||32) * context.meta2d.store.data.scale - origin.y) / scale - dataY / scale
  3156. );`,
  3157. },
  3158. ],
  3159. },
  3160. ],
  3161. },
  3162. },
  3163. {
  3164. name: '面包屑',
  3165. icon: 'l-mianbaoxie', //l-mianbaoxie
  3166. data: {
  3167. name: 'breadcrumb',
  3168. width: 200,
  3169. height: 20,
  3170. data: [
  3171. {
  3172. key: '1',
  3173. title: '页面1',
  3174. to: `https://doc${rootDomain}/document/135787991`,
  3175. target: '_blank',
  3176. },
  3177. {
  3178. key: '2',
  3179. title: '页面2',
  3180. to: `https://2d${rootDomain}/?id=641d524a8df2c654ea652d7e`,
  3181. target: '_blank',
  3182. },
  3183. {
  3184. key: '3',
  3185. title: '页面3',
  3186. to: `https://2d${rootDomain}/?id=6357a9e2d44b9402de84d2e8`,
  3187. target: '_self',
  3188. },
  3189. ],
  3190. props: {
  3191. custom: [
  3192. {
  3193. key: 'gap',
  3194. label: '间距',
  3195. type: 'number',
  3196. min: 0,
  3197. },
  3198. {
  3199. key: 'data',
  3200. label: '数据',
  3201. type: 'code',
  3202. },
  3203. ],
  3204. },
  3205. },
  3206. },
  3207. {
  3208. name: '下拉菜单',
  3209. icon: 'l-xialacaidan',
  3210. data: {
  3211. name: 'headMenuDom',
  3212. width: 650,
  3213. height: 60,
  3214. externElement: true,
  3215. selectedKeys: ['1'],
  3216. // activeColor: '#4E85E5',
  3217. iconPosition: 'left',
  3218. renderSubMenu:true,
  3219. data: [
  3220. {
  3221. key: '1',
  3222. icon: 'l-icon l-user',
  3223. title: '个人中心',
  3224. children: [
  3225. {
  3226. key: '1-1',
  3227. icon: 'l-icon l-fly',
  3228. title: '测试测试',
  3229. },
  3230. ],
  3231. },
  3232. {
  3233. key: '2',
  3234. icon: 'l-icon l-panel',
  3235. title: '安全运行',
  3236. },
  3237. {
  3238. key: '3',
  3239. icon: 'l-icon l-align-center',
  3240. title: '智慧能源',
  3241. },
  3242. {
  3243. key: '4',
  3244. icon: 'l-icon l-kongzhuangtai1',
  3245. title: '数据分析',
  3246. },
  3247. {
  3248. key: '5',
  3249. icon: 'l-icon l-quanjutishi',
  3250. title: '运维管理',
  3251. },
  3252. ],
  3253. props: {
  3254. custom: [
  3255. {
  3256. key: 'data',
  3257. label: '数据',
  3258. type: 'code',
  3259. },
  3260. {
  3261. key: "background",
  3262. label: "背景颜色",
  3263. type: "color"
  3264. },
  3265. {
  3266. key: "textColor",
  3267. label: "字体颜色",
  3268. type: "color"
  3269. },
  3270. {
  3271. key: "fontSize",
  3272. label: "字体大小",
  3273. type: "number"
  3274. },
  3275. {
  3276. key: "iconSize",
  3277. min: 12,
  3278. label: "图标大小",
  3279. type: "number"
  3280. },
  3281. {
  3282. key: "iconPosition",
  3283. label: "图标位置",
  3284. type: 'select',
  3285. options: [
  3286. { label: '靠左', value: 'left' },
  3287. { label: '靠下', value: 'bottom' },
  3288. ],
  3289. },
  3290. {
  3291. isNotString: true,
  3292. key: "marginRight",
  3293. label: "图标右间距",
  3294. type: "number"
  3295. },
  3296. {
  3297. isNotString: true,
  3298. key: "menuItemWidth",
  3299. min: 100,
  3300. label: "选项宽度",
  3301. type: "number"
  3302. },
  3303. {
  3304. isNotString: true,
  3305. key: "menuItemBgImg",
  3306. label: "选项背景图",
  3307. type: "text"
  3308. },
  3309. {
  3310. isNotString: true,
  3311. key: "menuItemHeight",
  3312. min: 0,
  3313. label: "选项高度",
  3314. type: "number"
  3315. },
  3316. {
  3317. key: "hoverBackground",
  3318. label: "hover背景色",
  3319. type: "color"
  3320. },
  3321. {
  3322. isNotString: true,
  3323. key: "hoverColor",
  3324. label: "hover字体颜色",
  3325. type: "color"
  3326. },
  3327. {
  3328. isNotString: true,
  3329. key: "activeBackground",
  3330. label: "选中背景色",
  3331. type: "color"
  3332. },
  3333. {
  3334. key: "activeColor",
  3335. label: "选中字体颜色",
  3336. type: "color"
  3337. },
  3338. {
  3339. key: "dropContentBgColor",
  3340. label: "下拉内容背景色",
  3341. type: "color"
  3342. },
  3343. {
  3344. isNotString: true,
  3345. key: "renderSubMenu",
  3346. label: "是否渲染二级菜单",
  3347. type: "switch"
  3348. },
  3349. {
  3350. key: 'iframe',
  3351. label: '关联Iframe',
  3352. type: 'text',
  3353. },
  3354. ],
  3355. },
  3356. },
  3357. },
  3358. {
  3359. name: '导航菜单',
  3360. icon: 'l-daohangcaidan',
  3361. data: {
  3362. name: 'menuDom',
  3363. width: 200,
  3364. height: 400,
  3365. externElement: true,
  3366. data: [
  3367. {
  3368. title: '实时监测',
  3369. key: '0',
  3370. icon: 'l-icon l-suofang',
  3371. children: [
  3372. {
  3373. title: '站点看板',
  3374. key: '',
  3375. icon: 'l-icon l-fenzuzhuzhuangtu',
  3376. children: [
  3377. {
  3378. title: '三级标题',
  3379. key: '',
  3380. },
  3381. {
  3382. title: '三级标题',
  3383. key: '',
  3384. },
  3385. ],
  3386. },
  3387. {
  3388. title: '监控画面',
  3389. key: '',
  3390. icon: 'l-icon l-biaoge',
  3391. },
  3392. {
  3393. title: '设备监控',
  3394. key: '',
  3395. icon: 'l-icon l-zhexiantu',
  3396. },
  3397. ],
  3398. },
  3399. {
  3400. title: '控制中心',
  3401. key: '',
  3402. icon: 'l-icon l-tiaoxingtu',
  3403. },
  3404. {
  3405. title: '告警管理',
  3406. key: '',
  3407. icon: 'l-icon l-zhishideng',
  3408. },
  3409. ],
  3410. props: {
  3411. custom: [
  3412. {
  3413. key: 'data',
  3414. label: '数据',
  3415. type: 'code',
  3416. },
  3417. ],
  3418. },
  3419. },
  3420. },
  3421. {
  3422. name: '分页',
  3423. icon: 'l-fenye', //l-fenye
  3424. data: {
  3425. name: 'pagination',
  3426. width: 300,
  3427. height: 200,
  3428. size: 'small',
  3429. total: 25,
  3430. pageSize: 5,
  3431. current: 1,
  3432. maxPageBtn: 5,
  3433. disableInput: true,
  3434. pageSizeOptions: [5, 10, 20, 30],
  3435. props: {
  3436. custom: [
  3437. {
  3438. key: 'total',
  3439. label: '数据总条数',
  3440. type: 'number',
  3441. min: 0,
  3442. },
  3443. {
  3444. key: 'pageSize',
  3445. label: '每页数据量',
  3446. type: 'number',
  3447. },
  3448. {
  3449. key: 'pageSizeOptions',
  3450. label: '分页大小控制器',
  3451. type: 'code',
  3452. },
  3453. // {
  3454. // key: 'maxPageBtn',
  3455. // label: '最多显示页码数按钮数',
  3456. // type: 'number',
  3457. // },
  3458. ],
  3459. },
  3460. },
  3461. },
  3462. {
  3463. name: '步骤条',
  3464. icon: 'l-buzhoutiao',
  3465. data: {
  3466. name: 'steps',
  3467. width: 600,
  3468. height: 60,
  3469. direction: 'horizontal', //horizontal/vertical
  3470. theme: 'default', //dot
  3471. data: [
  3472. {
  3473. title: '已完成的步骤',
  3474. content: '这里是提示文字',
  3475. status: 'finish', //default/process/finish/error
  3476. },
  3477. {
  3478. title: '出错的步骤',
  3479. content: '这里是提示文字',
  3480. status: 'error', //default/process/finish/error
  3481. },
  3482. {
  3483. title: '进行中的步骤',
  3484. content: '这里是提示文字',
  3485. status: 'process', //default/process/finish/error
  3486. },
  3487. {
  3488. title: '未完成的步骤',
  3489. content: '这里是提示文字',
  3490. status: 'default', //default/process/finish/error
  3491. },
  3492. ],
  3493. statusColor:{
  3494. default: {
  3495. titleColor: '#FFFFFF66',
  3496. contentColor: '#FFFFFF66',
  3497. iconColor: '#FFFFFF66',
  3498. },
  3499. finish: {
  3500. titleColor: '#FFFFFFE6',
  3501. contentColor: '#FFFFFF99',
  3502. iconColor: '#4583FF',
  3503. },
  3504. process: {
  3505. titleColor: '#4583FF',
  3506. contentColor: '#FFFFFF99',
  3507. iconColor: '#4583FF ',
  3508. },
  3509. error: {
  3510. titleColor: '#FF5D3C',
  3511. contentColor: '#FFFFFF99',
  3512. iconColor: '#FF5D3C',
  3513. },
  3514. },
  3515. props: {
  3516. custom: [
  3517. {
  3518. key: 'data',
  3519. label: '数据',
  3520. type: 'code',
  3521. },
  3522. {
  3523. key: 'statusColor',
  3524. label: '各个状态颜色',
  3525. type: 'code',
  3526. },
  3527. {
  3528. key: 'direction',
  3529. label: '方向',
  3530. type: 'select',
  3531. options: [
  3532. { label: '水平', value: 'horizontal' },
  3533. { label: '垂直', value: 'vertical' },
  3534. ],
  3535. },
  3536. ],
  3537. },
  3538. },
  3539. },
  3540. {
  3541. name: '选项卡',
  3542. icon: 'l-xuanxiangka',
  3543. data: {
  3544. name: 'tab',
  3545. width: 440,
  3546. height: 48,
  3547. direction: 'horizontal',
  3548. selectedKey: '1',
  3549. btnHeight: 32,
  3550. btnWidth: 100,
  3551. gap:8,
  3552. // selectedKeys: [],
  3553. disableInput: true,
  3554. data: [
  3555. { text: '场景一', key: '0', isForbidden: true },
  3556. { text: '场景二', key: '1' },
  3557. { text: '场景三', key: '2' },
  3558. { text: '场景四', key: '3' },
  3559. ],
  3560. props: {
  3561. custom: [
  3562. {
  3563. key: 'data',
  3564. label: '数据',
  3565. type: 'code',
  3566. },
  3567. {
  3568. key: 'direction',
  3569. label: '方向',
  3570. type: 'select',
  3571. options: [
  3572. { label: '水平', value: 'horizontal' },
  3573. { label: '垂直', value: 'vertical' },
  3574. ],
  3575. },
  3576. {
  3577. key: 'gap',
  3578. label: '间隔',
  3579. type: 'number',
  3580. min:1
  3581. },
  3582. {
  3583. key: 'btnWidth',
  3584. label: '按钮宽度',
  3585. type: 'number',
  3586. min:1
  3587. },
  3588. {
  3589. key: 'btnHeight',
  3590. label: '按钮高度',
  3591. type: 'number',
  3592. min:1
  3593. },
  3594. {
  3595. key: 'activeBackground',
  3596. label: '选中背景',
  3597. type: 'color',
  3598. },
  3599. {
  3600. key: 'activeColor',
  3601. label: '选中边框',
  3602. type: 'color',
  3603. },
  3604. {
  3605. key: 'activeTextColor',
  3606. label: '选中文字',
  3607. type: 'color',
  3608. },
  3609. {
  3610. key: 'activeBgImage',
  3611. label: '选中背景图片',
  3612. type: 'string',
  3613. },
  3614. {
  3615. key: 'background',
  3616. label: '(未选中)背景',
  3617. type: 'color',
  3618. },
  3619. {
  3620. key: 'color',
  3621. label: '(未选中)边框',
  3622. type: 'color',
  3623. },
  3624. {
  3625. key: 'textColor',
  3626. label: '(未选中)文字',
  3627. type: 'color',
  3628. },
  3629. {
  3630. key: 'bgImage',
  3631. label: '(未选中)背景图片',
  3632. type: 'string',
  3633. }
  3634. ],
  3635. },
  3636. },
  3637. },
  3638. {
  3639. name: '多选选项卡',
  3640. icon: 'l-duoxiangxuanxiangka',
  3641. data: {
  3642. name: 'tab',
  3643. width: 440,
  3644. height: 48,
  3645. direction: 'horizontal',
  3646. selectedKeys: ['0'],
  3647. multiple:true,
  3648. disableInput: true,
  3649. btnHeight: 32,
  3650. btnWidth: 100,
  3651. gap:8,
  3652. data: [
  3653. { text: '场景一', key: '0' },
  3654. { text: '场景二', key: '1', isForbidden: true },
  3655. { text: '场景三', key: '2' },
  3656. { text: '场景四', key: '3' },
  3657. ],
  3658. props: {
  3659. custom: [
  3660. {
  3661. key: 'data',
  3662. label: '数据',
  3663. type: 'code',
  3664. },
  3665. {
  3666. key: 'direction',
  3667. label: '方向',
  3668. type: 'select',
  3669. options: [
  3670. { label: '水平', value: 'horizontal' },
  3671. { label: '垂直', value: 'vertical' },
  3672. ],
  3673. },
  3674. {
  3675. key: 'gap',
  3676. label: '间隔',
  3677. type: 'number',
  3678. min:1
  3679. },
  3680. {
  3681. key: 'btnWidth',
  3682. label: '按钮宽度',
  3683. type: 'number',
  3684. min:1
  3685. },
  3686. {
  3687. key: 'btnHeight',
  3688. label: '按钮高度',
  3689. type: 'number',
  3690. min:1
  3691. },
  3692. {
  3693. key: 'activeBackground',
  3694. label: '选中背景',
  3695. type: 'color',
  3696. },
  3697. {
  3698. key: 'activeColor',
  3699. label: '选中边框',
  3700. type: 'color',
  3701. },
  3702. {
  3703. key: 'activeTextColor',
  3704. label: '选中文字',
  3705. type: 'color',
  3706. },
  3707. {
  3708. key: 'activeBgImage',
  3709. label: '选中背景图片',
  3710. type: 'string',
  3711. },
  3712. {
  3713. key: 'background',
  3714. label: '(未选中)背景',
  3715. type: 'color',
  3716. },
  3717. {
  3718. key: 'color',
  3719. label: '(未选中)边框',
  3720. type: 'color',
  3721. },
  3722. {
  3723. key: 'textColor',
  3724. label: '(未选中)文字',
  3725. type: 'color',
  3726. },
  3727. {
  3728. key: 'bgImage',
  3729. label: '(未选中)背景图片',
  3730. type: 'string',
  3731. }
  3732. ],
  3733. },
  3734. },
  3735. },
  3736. ],
  3737. },
  3738. {
  3739. name: '输入',
  3740. show: true,
  3741. list: [
  3742. {
  3743. name: '按钮',
  3744. icon: 'l-anniu',
  3745. data: {
  3746. name: 'rectangle',
  3747. x: 300,
  3748. y: 200,
  3749. width: 80,
  3750. height: 30,
  3751. disableAnchor: true,
  3752. borderRadius: 2,
  3753. text: '按钮',
  3754. activeBackground: '#2D71EC',
  3755. activeColor: '#40a9ff',
  3756. background: '#4583FF',
  3757. color: '#1890ff',
  3758. hoverBackground: '#40a9ff',
  3759. hoverColor: '#7DA4FF',
  3760. textColor: '#ffffff',
  3761. hoverTextColor: '#ffffff',
  3762. activeTextColor: '#ffffff',
  3763. },
  3764. },
  3765. {
  3766. name: '文本输入框',
  3767. icon: 'l-wenbenshurukuang',
  3768. data: {
  3769. x: 100,
  3770. y: 100,
  3771. height: 40,
  3772. width: 200,
  3773. disableAnchor: true,
  3774. name: 'rectangle',
  3775. borderRadius: 0.05,
  3776. input: true,
  3777. ellipsis: true,
  3778. text: '输入文本',
  3779. textAlign: 'left',
  3780. background: '#15181C',
  3781. color: '#424B61',
  3782. textColor: '#FFFFFFE6',
  3783. // color: '#D9D9D9FF',
  3784. // hoverTextColor: '#000000FF',
  3785. // activeTextColor: '#000000FF',
  3786. textLeft: 10,
  3787. },
  3788. },
  3789. {
  3790. name: '数字输入框',
  3791. icon: 'l-shuzishurukuang',
  3792. data: {
  3793. x: 100,
  3794. y: 100,
  3795. height: 40,
  3796. width: 200,
  3797. disableAnchor: true,
  3798. name: 'rectangle',
  3799. borderRadius: 0.05,
  3800. input: true,
  3801. ellipsis: true,
  3802. text: '输入数字',
  3803. textAlign: 'left',
  3804. background: '#15181C',
  3805. color: '#424B61',
  3806. textColor: '#FFFFFFE6',
  3807. // color: '#D9D9D9FF',
  3808. // textColor: '#000000FF',
  3809. // hoverTextColor: '#000000FF',
  3810. // activeTextColor: '#000000FF',
  3811. textLeft: 10,
  3812. events: [
  3813. {
  3814. action: 5,
  3815. actions:[
  3816. {
  3817. "action": 5,
  3818. "value": "context.meta2d.setValue({ id: pen.id, text: parseFloat(pen.text) }, { doEvent: false });",
  3819. "params": ""
  3820. }
  3821. ],
  3822. name: 'inactive',
  3823. // value:
  3824. // 'context.meta2d.setValue({ id: pen.id, text: parseFloat(pen.text) }, { doEvent: false });',
  3825. where: { type: null },
  3826. },
  3827. ],
  3828. },
  3829. },
  3830. {
  3831. name: '单选框',
  3832. icon: 'l-danxuanxiang',
  3833. data: {
  3834. name: 'radio',
  3835. width: 300,
  3836. height: 30,
  3837. disableAnchor: true,
  3838. direction: 'horizontal', // 'vertical', //'horizontal',
  3839. theme: 'normal',
  3840. itemPosition: [],
  3841. data: [
  3842. { key: '1', text: '选项一', isForbidden: true },
  3843. { key: '2', text: '选项示例二' },
  3844. { key: '3', text: '选项三' },
  3845. ],
  3846. selectKey: '2',
  3847. props: {
  3848. custom: [
  3849. {
  3850. key: 'data',
  3851. label: '数据',
  3852. type: 'code',
  3853. },
  3854. {
  3855. key: 'direction',
  3856. label: '排列方向',
  3857. type: 'select',
  3858. options: [
  3859. { label: '横向', value: 'horizontal' },
  3860. { label: '纵向', value: 'vertical' },
  3861. ],
  3862. },
  3863. {
  3864. key: 'theme',
  3865. label: '模式',
  3866. type: 'select',
  3867. options: [
  3868. { label: '通用模式', value: 'normal' },
  3869. { label: '按钮模式', value: 'button' },
  3870. ],
  3871. },
  3872. ],
  3873. },
  3874. },
  3875. },
  3876. {
  3877. name: '多选框',
  3878. icon: 'l-duoxuanxiang',
  3879. data: {
  3880. name: 'checkbox',
  3881. width: 300,
  3882. height: 30,
  3883. direction: 'horizontal', // 'vertical', //'horizontal',
  3884. theme: 'normal', //button normal
  3885. data: [
  3886. { key: '1', text: '选项一', isForbidden: true },
  3887. { key: '2', text: '选项示例二' },
  3888. { key: '3', text: '选项三' },
  3889. ],
  3890. selectedKeys: ['2', '3'],
  3891. props: {
  3892. custom: [
  3893. {
  3894. key: 'data',
  3895. label: '数据',
  3896. type: 'code',
  3897. },
  3898. {
  3899. key: 'direction',
  3900. label: '排列方向',
  3901. type: 'select',
  3902. options: [
  3903. { label: '横向', value: 'horizontal' },
  3904. { label: '纵向', value: 'vertical' },
  3905. ],
  3906. },
  3907. {
  3908. key: 'theme',
  3909. label: '模式',
  3910. type: 'select',
  3911. options: [
  3912. { label: '通用模式', value: 'normal' },
  3913. { label: '按钮模式', value: 'button' },
  3914. ],
  3915. },
  3916. ],
  3917. },
  3918. },
  3919. },
  3920. {
  3921. name: '下拉选择器',
  3922. icon: 'l-xialaxuanzekuang',
  3923. data: {
  3924. x: 100,
  3925. y: 100,
  3926. height: 40,
  3927. width: 200,
  3928. disableAnchor: true,
  3929. name: 'rectangle',
  3930. borderRadius: 0.05,
  3931. ellipsis: true,
  3932. text: '选项1',
  3933. textAlign: 'left',
  3934. input: true,
  3935. background: '#15181C',
  3936. color: '#424B61',
  3937. textColor: '#FFFFFFE6',
  3938. hoverTextColor: '#FFFFFFE6',
  3939. activeTextColor: '#FFFFFFE6',
  3940. textLeft: 10,
  3941. dropdownList: [
  3942. {
  3943. text: '选项1',
  3944. },
  3945. {
  3946. text: '选项2',
  3947. },
  3948. {
  3949. text: '选项3',
  3950. },
  3951. ],
  3952. props: {
  3953. custom: [
  3954. {
  3955. key: 'dropdownList',
  3956. label: '下拉列表',
  3957. type: 'code',
  3958. },
  3959. ]
  3960. }
  3961. },
  3962. },
  3963. {
  3964. name: '密码输入框',
  3965. icon: 'l-wenbenshurukuang',
  3966. data: {
  3967. name: 'inputDom',
  3968. width: 200,
  3969. height: 32,
  3970. externElement: true,
  3971. prefix: false,
  3972. suffix: true,
  3973. inputType: 'password',
  3974. hiddenText: true,
  3975. suffixOff:true
  3976. },
  3977. },
  3978. {
  3979. name: '时间选择器',
  3980. icon: 'l-shijianxuanzekuang',
  3981. data: {
  3982. name: 'inputDom',
  3983. width: 200,
  3984. height: 32,
  3985. externElement: true,
  3986. prefix: false,
  3987. suffix: false,
  3988. inputType: 'time',
  3989. hiddenText: true,
  3990. },
  3991. },
  3992. {
  3993. name: '日期选择器',
  3994. icon: 'l-riqixuanzekuang',
  3995. data: {
  3996. name: 'inputDom',
  3997. width: 200,
  3998. height: 32,
  3999. externElement: true,
  4000. prefix: false,
  4001. suffix: false,
  4002. inputType: 'date',
  4003. hiddenText: true,
  4004. },
  4005. },
  4006. {
  4007. name: '颜色选择器',
  4008. icon: 'l-yansexuanzekuang',
  4009. data: {
  4010. name: 'inputDom',
  4011. width: 32,
  4012. height: 32,
  4013. externElement: true,
  4014. prefix: false,
  4015. suffix: false,
  4016. inputType: 'color',
  4017. hiddenText: true,
  4018. },
  4019. },
  4020. {
  4021. name: '开关',
  4022. icon: 'l-kaiguan',
  4023. data: {
  4024. name: 'switch',
  4025. disableAnchor: true,
  4026. height: 30,
  4027. width: 60,
  4028. checked: true,
  4029. offColor: '#303746',
  4030. onColor: '#4583FF',
  4031. disableOffColor: '#E5E5E5',
  4032. disableOnColor: '#A3D3FF',
  4033. hoverBackground: '#40a9ff',
  4034. props: {
  4035. custom: [
  4036. {
  4037. key: 'onColor',
  4038. label: '开颜色',
  4039. type: 'color',
  4040. },
  4041. {
  4042. key: 'offColor',
  4043. label: '关颜色',
  4044. type: 'color',
  4045. },
  4046. {
  4047. key: 'disable',
  4048. label: '是否禁用',
  4049. type: 'bool',
  4050. },
  4051. {
  4052. key: 'disableOnColor',
  4053. label: '开(禁)颜色',
  4054. type: 'color',
  4055. },
  4056. {
  4057. key: 'disableOffColor',
  4058. label: '关(禁)颜色',
  4059. type: 'color',
  4060. },
  4061. ]
  4062. }
  4063. },
  4064. },
  4065. {
  4066. name: '滑块',
  4067. icon: 'l-huakuai',
  4068. data: {
  4069. anchors: [],
  4070. disableAnchor: true,
  4071. name: 'slider',
  4072. width: 300,
  4073. height: 20,
  4074. value: 10,
  4075. textWidth: 50,
  4076. barHeight: 4,
  4077. min: 0,
  4078. max: 100,
  4079. activeColor: '#4583FF',
  4080. background: '#303746',
  4081. textColor: '#FFFFFF66',
  4082. unit: '%',
  4083. },
  4084. },
  4085. ],
  4086. },
  4087. {
  4088. name: '工控',
  4089. show: true,
  4090. list: [
  4091. {
  4092. name: '圆柱水位',
  4093. icon: 'l-yuanzhushuiwei',
  4094. data: {
  4095. name: 'waterTank',
  4096. width: 128,
  4097. height: 128,
  4098. disableAnchor: true,
  4099. color: '#FFFFFF00',
  4100. progress: 0.5,
  4101. progressColor: '#4583FF',
  4102. props: {
  4103. custom: [
  4104. {
  4105. key: 'progress',
  4106. label: '水位',
  4107. type: 'number',
  4108. min:0,
  4109. max:1,
  4110. },
  4111. {
  4112. key: 'progressColor',
  4113. label: '水位颜色',
  4114. type: 'color',
  4115. }
  4116. ]
  4117. }
  4118. },
  4119. },
  4120. {
  4121. name: '球形水位',
  4122. icon: 'l-qiuxingshuiwei',
  4123. data: {
  4124. name: 'watermeter',
  4125. width: 128,
  4126. height: 128,
  4127. disableAnchor: true,
  4128. background: '#4583FF',
  4129. value: 50,
  4130. max: 70,
  4131. min: 20,
  4132. maxBackground: '#f5222d',
  4133. minBackground: '#52c41a',
  4134. // maxText: 'max',
  4135. // minText: 'min',
  4136. scaleShow: false,
  4137. props: {
  4138. custom: [
  4139. {
  4140. key: 'value',
  4141. label: '值',
  4142. type: 'number',
  4143. },
  4144. {
  4145. key: 'max',
  4146. label: '最大值',
  4147. type: 'number',
  4148. },
  4149. {
  4150. key: 'min',
  4151. label: '最小值',
  4152. type: 'number',
  4153. },
  4154. {
  4155. key: 'maxBackground',
  4156. label: '>最大颜色',
  4157. type: 'color',
  4158. },
  4159. {
  4160. key: 'minBackground',
  4161. label: '<最小颜色',
  4162. type: 'color',
  4163. },
  4164. {
  4165. key: 'scaleShow',
  4166. label: '刻度显示',
  4167. type: 'bool',
  4168. }
  4169. ]
  4170. }
  4171. },
  4172. },
  4173. {
  4174. name: '指示灯',
  4175. icon: 'l-zhishideng',
  4176. data: {
  4177. name: 'indicatorLight',
  4178. disableAnchor: true,
  4179. width: 128,
  4180. height: 128,
  4181. displayStatus: 0, //显示状态 默认 方形 圆形
  4182. background: '#4583FF33',
  4183. color: '#4583FF',
  4184. hiddenText: true,
  4185. // onColor: '#58CC84',
  4186. animations:[
  4187. {
  4188. name: "动画1",
  4189. temType: "id",
  4190. animate: "custom",
  4191. frames: [
  4192. {
  4193. background: '#4583FF33',
  4194. color: '#4583FF',
  4195. bkType: 0,
  4196. duration: 200,
  4197. strokeType: 0,
  4198. visible: true,
  4199. },
  4200. {
  4201. background: '#58CC8433',
  4202. color: '#58CC84',
  4203. bkType: 0,
  4204. duration: 200,
  4205. strokeType: 0,
  4206. visible: true,
  4207. }
  4208. ]
  4209. }
  4210. ],
  4211. // frames: [
  4212. // {
  4213. // background: '#4583FF33',
  4214. // color: '#4583FF',
  4215. // bkType: 0,
  4216. // duration: 200,
  4217. // strokeType: 0,
  4218. // visible: true,
  4219. // },
  4220. // {
  4221. // background: '#4583FF33',
  4222. // color: '#4583FF',
  4223. // bkType: 0,
  4224. // duration: 200,
  4225. // strokeType: 0,
  4226. // visible: true,
  4227. // },
  4228. // ],
  4229. // animateType: 'custom',
  4230. props: {
  4231. custom: [
  4232. {
  4233. key: 'displayStatus',
  4234. label: '显示状态',
  4235. type: 'number',
  4236. },
  4237. ]
  4238. }
  4239. },
  4240. props: {
  4241. custom: [
  4242. {
  4243. key: 'state',
  4244. value: 'on',
  4245. type: 'select',
  4246. options: [
  4247. { label: '开', value: 'on' },
  4248. { label: '关', value: 'off' },
  4249. ],
  4250. },
  4251. ],
  4252. },
  4253. },
  4254. {
  4255. name: '圆形按钮',
  4256. icon: 'l-yuanxinganniu', //l-yuanxinganniu
  4257. data: {
  4258. name: 'roundSwitch',
  4259. width: 128,
  4260. height: 128,
  4261. checked: true,
  4262. disableInput: true,
  4263. offColor: '#FFA98F',
  4264. onColor: '#80D99F',
  4265. color: '#4583FF', //66 33
  4266. background: '#4583FF33',
  4267. offShadowColor: '#FF5D3C',
  4268. onShadowColor: '#58CC84',
  4269. props: {
  4270. custom: [
  4271. {
  4272. key: 'onColor',
  4273. label: '开时颜色',
  4274. type: 'color',
  4275. },
  4276. {
  4277. key: 'offColor',
  4278. label: '关时颜色',
  4279. type: 'color',
  4280. },
  4281. {
  4282. key: 'onShadowColor',
  4283. label: '开时阴影颜色',
  4284. type: 'color',
  4285. },
  4286. {
  4287. key: 'offShadowColor',
  4288. label: '关时阴影颜色',
  4289. type: 'color',
  4290. },
  4291. ]
  4292. }
  4293. },
  4294. },
  4295. {
  4296. name: '船型开关',
  4297. icon: 'l-chuanxingkaiguan',
  4298. data: {
  4299. name: 'rockerSwitch',
  4300. width: 72,
  4301. height: 128,
  4302. disableInput: true,
  4303. offColor: '#FFA98F',
  4304. onColor: '#80D99F',
  4305. color: '#4583FF', //66 33
  4306. background: '#4583FF33',
  4307. offShadowColor: '#FF5D3C',
  4308. onShadowColor: '#58CC84',
  4309. props: {
  4310. custom: [
  4311. {
  4312. key: 'onColor',
  4313. label: '开时颜色',
  4314. type: 'color',
  4315. },
  4316. {
  4317. key: 'offColor',
  4318. label: '关时颜色',
  4319. type: 'color',
  4320. },
  4321. {
  4322. key: 'onShadowColor',
  4323. label: '开时阴影颜色',
  4324. type: 'color',
  4325. },
  4326. {
  4327. key: 'offShadowColor',
  4328. label: '关时阴影颜色',
  4329. type: 'color',
  4330. },
  4331. ]
  4332. }
  4333. },
  4334. },
  4335. {
  4336. name: '转换开关',
  4337. icon: 'l-zhuanhuankaiguan', //l-zhuanhuankaiguan
  4338. data: {
  4339. name: 'transferSwitch',
  4340. width: 128,
  4341. height: 128,
  4342. checked: true,
  4343. disableInput: true,
  4344. offColor: '#FFA98F',
  4345. onColor: '#80D99F',
  4346. color: '#4583FF', //66 33
  4347. background: '#4583FF33',
  4348. offShadowColor: '#FF5D3C',
  4349. onShadowColor: '#58CC84',
  4350. props: {
  4351. custom: [
  4352. {
  4353. key: 'onColor',
  4354. label: '开时颜色',
  4355. type: 'color',
  4356. },
  4357. {
  4358. key: 'offColor',
  4359. label: '关时颜色',
  4360. type: 'color',
  4361. },
  4362. {
  4363. key: 'onShadowColor',
  4364. label: '开时阴影颜色',
  4365. type: 'color',
  4366. },
  4367. {
  4368. key: 'offShadowColor',
  4369. label: '关时阴影颜色',
  4370. type: 'color',
  4371. },
  4372. ]
  4373. }
  4374. },
  4375. },
  4376. {
  4377. name: '闸刀',
  4378. icon: 'l-zhadao',
  4379. data: {
  4380. name: 'knifeSwitch',
  4381. width: 64,
  4382. height: 128,
  4383. color: '#4583FF',
  4384. disableInput: true,
  4385. background: '#4583FF33',
  4386. offColor: '#FF5D3C',
  4387. onColor: '#58CC84',
  4388. props: {
  4389. custom: [
  4390. {
  4391. key: 'onColor',
  4392. label: '开时颜色',
  4393. type: 'color',
  4394. },
  4395. {
  4396. key: 'offColor',
  4397. label: '关时颜色',
  4398. type: 'color',
  4399. },
  4400. ]
  4401. }
  4402. // events: [
  4403. // {
  4404. // action: 5,
  4405. // name: 'click',
  4406. // value: 'window.meta2d.setValue({id:pen.id,switch:!pen.switch});',
  4407. // },
  4408. // ],
  4409. },
  4410. },
  4411. {
  4412. name: '拨动开关',
  4413. icon: 'l-bodongkaiguan',
  4414. data: {
  4415. name: 'toggleSwitch',
  4416. width: 128,
  4417. height: 128,
  4418. checked: true,
  4419. disableInput: true,
  4420. color: '#4583FF',
  4421. background: '#4583FF33',
  4422. offColor: '#FF5D3C',
  4423. onColor: '#58CC84',
  4424. props: {
  4425. custom: [
  4426. {
  4427. key: 'onColor',
  4428. label: '开时颜色',
  4429. type: 'color',
  4430. },
  4431. {
  4432. key: 'offColor',
  4433. label: '关时颜色',
  4434. type: 'color',
  4435. },
  4436. ]
  4437. }
  4438. // events: [
  4439. // {
  4440. // action: 5,
  4441. // name: 'click',
  4442. // value:
  4443. // 'window.meta2d.setValue({id:pen.id,switch:!pen.switch});window.meta2d.render()',
  4444. // },
  4445. // ],
  4446. },
  4447. },
  4448. {
  4449. name: '空气开关',
  4450. icon: 'l-kongqikaiguan',
  4451. data: {
  4452. name: 'airSwitch',
  4453. width: 120,
  4454. height: 128,
  4455. switch: true,
  4456. color: '#4583FF',
  4457. background: '#4583FF33',
  4458. offColor: '#FF5D3C',
  4459. onColor: '#58CC84',
  4460. disableInput: true,
  4461. props: {
  4462. custom: [
  4463. {
  4464. key: 'onColor',
  4465. label: '开时颜色',
  4466. type: 'color',
  4467. },
  4468. {
  4469. key: 'offColor',
  4470. label: '关时颜色',
  4471. type: 'color',
  4472. },
  4473. ]
  4474. }
  4475. },
  4476. },
  4477. {
  4478. name: '水柱温度计',
  4479. icon: 'l-shuizhuwendu',
  4480. data: {
  4481. name: 'thermometer',
  4482. width: 32,
  4483. height: 128,
  4484. disableAnchor: true,
  4485. color: '#4583FF',
  4486. textColor: '#FFFFFFB3',
  4487. background: '#FF5D3C33',
  4488. activeBacground: '#FF5D3C',
  4489. value: -10,
  4490. min: -20,
  4491. max: 20,
  4492. props: {
  4493. custom: [
  4494. {
  4495. key: 'value',
  4496. label: '当前值',
  4497. type: 'number',
  4498. },
  4499. {
  4500. key: 'max',
  4501. label: '最大值',
  4502. type: 'number',
  4503. },
  4504. {
  4505. key: 'min',
  4506. label: '最小值',
  4507. type: 'number',
  4508. },
  4509. ]
  4510. }
  4511. },
  4512. },
  4513. {
  4514. name: '扁平温度计',
  4515. icon: 'l-bianpingwendu',
  4516. data: {
  4517. name: 'thermometer1',
  4518. disableAnchor: true,
  4519. width: 48,
  4520. height: 128,
  4521. backgroundColor: '#666',
  4522. value: 0,
  4523. min: -20,
  4524. max: 20,
  4525. color: '#4583FF',
  4526. background: '#FF5D3C33',
  4527. activeBackground: '#FF5D3C',
  4528. textColor: '#FFFFFFB3',
  4529. props: {
  4530. custom: [
  4531. {
  4532. key: 'value',
  4533. label: '当前值',
  4534. type: 'number',
  4535. },
  4536. {
  4537. key: 'max',
  4538. label: '最大值',
  4539. type: 'number',
  4540. },
  4541. {
  4542. key: 'min',
  4543. label: '最小值',
  4544. type: 'number',
  4545. }
  4546. ]
  4547. }
  4548. },
  4549. },
  4550. {
  4551. name: '电池',
  4552. icon: 'l-dianchi',
  4553. data: {
  4554. name: 'battery',
  4555. disableAnchor: true,
  4556. width: 40,
  4557. height: 80,
  4558. // rotate: 90,
  4559. progress:0.6,
  4560. color:'#4583FF',
  4561. background:'#4583FF33',
  4562. progressColor:'#58CC84',
  4563. props: {
  4564. custom: [
  4565. {
  4566. key: 'min',
  4567. label: '最小值',
  4568. type: 'number',
  4569. placeholder:'默认0'
  4570. },
  4571. {
  4572. key: 'max',
  4573. label: '最大值',
  4574. type: 'number',
  4575. placeholder:'默认1'
  4576. },
  4577. {
  4578. key: 'splitNumber',
  4579. label: '分段数',
  4580. type: 'number',
  4581. },
  4582. {
  4583. key: 'gap',
  4584. label: '间隔占比',
  4585. type: 'number',
  4586. min:0,
  4587. max:1,
  4588. },
  4589. ],
  4590. },
  4591. },
  4592. },
  4593. ],
  4594. },
  4595. ];
  4596. export const cases: any[] = [
  4597. { name: '智慧物联' },
  4598. { name: '电力能源' },
  4599. { name: '智慧水务' },
  4600. { name: '智慧工厂' },
  4601. { name: '智慧校园' },
  4602. { name: '智慧园区' },
  4603. { name: '智慧交通' },
  4604. { name: '智慧城市' },
  4605. { name: '智慧农业' },
  4606. { name: '电信机房' },
  4607. { name: '航天航空' },
  4608. { name: '智能家居' },
  4609. ];
  4610. export const templates: any[] = [
  4611. { name: '主题', list: [] },
  4612. { name: '布局', list: [] },
  4613. ];
  4614. export const defaultPureColor: string[] = [
  4615. '#FF5959',
  4616. '#F5693B',
  4617. '#E6B420',
  4618. '#30EE6F',
  4619. '#30EEDC',
  4620. '#31A7F5',
  4621. '#7381FF',
  4622. '#AB73FF',
  4623. '#F054B1',
  4624. '#F75781',
  4625. '#ff925c',
  4626. '#e6d950',
  4627. '#51e69b',
  4628. '#59c8ff',
  4629. '#FF7875',
  4630. '#FF9C6E',
  4631. '#FFC069',
  4632. '#FFD666',
  4633. '#FFF566',
  4634. '#D3F261',
  4635. '#95DE64',
  4636. '#5CDBD3',
  4637. '#69C0FF',
  4638. '#85A5FF',
  4639. '#B37FEB',
  4640. '#FF85C0',
  4641. '#000000',
  4642. '#FFFFFF',
  4643. '#FFFFFF00',
  4644. ];
  4645. // export const defaultGradientColor: string[] = [
  4646. // 'linear-gradient(90deg, #E52600 0%, #CC0000 12%, #FF925C 80%, #FF622E 100%)',
  4647. // 'linear-gradient(90deg, #B36800 0%, #B36800 12%, #E6D950 80%, #CCB125 100%)',
  4648. // 'linear-gradient(90deg, #00B35A 0%, #00735F 12%, #51E69B 80%, #24CC6B 100%)',
  4649. // 'linear-gradient(90deg, #0073E6 0%, #1433CC 12%, #59C8FF 80%, #2EA5FF 100%)',
  4650. // 'linear-gradient(90deg, #a3aab2 0%, #7b7f8c 12%, #e5ecf0 80%, #bac2c9 100%)',
  4651. //
  4652. // 'linear-gradient(90deg, #FF622E 0%, #FF622E 18%,#CC0000 20%,#FF622E 50%, #CC0000 80%,#FF622E 82%, #FF622E 100%)',
  4653. // 'linear-gradient(90deg, #ccb125 0%, #ccb125 18%,#B36800 20%,#CCB125 50%, #B36800 80%,#CCB125 82%, #CCB125 100%)',
  4654. // 'linear-gradient(90deg, #24CC6B 0%, #24CC6B 18%,#00735F 20%,#24CC6B 50%, #00735F 80%,#24CC6B 82%, #24CC6B 100%)',
  4655. // 'linear-gradient(90deg, #2EA5FF 0%, #2EA5FF 18%,#1433CC 20%,#2EA5FF 50%, #1433CC 80%,#2EA5FF 82%, #2EA5FF 100%)',
  4656. // 'linear-gradient(90deg, #bac2c9 0%, #bac2c9 18%,#7b7f8c 20%,#bac2c9 50%, #7b7f8c 80%,#bac2c9 82%, #bac2c9 100%)'
  4657. // ]
  4658. export const defaultGradientColor: string[] = [
  4659. '#ff925c',
  4660. '#e6d950',
  4661. '#51e69b',
  4662. '#59c8ff',
  4663. '#FF7875',
  4664. '#FF9C6E',
  4665. '#FFC069',
  4666. '#FFD666',
  4667. '#FFF566',
  4668. '#D3F261',
  4669. '#95DE64',
  4670. '#5CDBD3',
  4671. '#69C0FF',
  4672. '#85A5FF',
  4673. '#B37FEB',
  4674. '#FF85C0',
  4675. '#000000',
  4676. '#FFFFFF',
  4677. ];