detail_new_20250528.vue 181 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343
  1. <template>
  2. <view class="content" >
  3. <view class="header" :style='"background-image:url("+imgUrl+"/detail/bg.png);background-repeat: no-repeat;background-size: 100% 200%;top:-5vh;height:110vh"'>
  4. <view v-if="isH5" @click='goBack()' style=" font-size: 16px;
  5. padding-top: 7px;
  6. position: absolute;
  7. top: 5vh;
  8. left: 20px;
  9. }">
  10. 返回
  11. </view>
  12. <view class="status_info">
  13. <view class="status_detail">
  14. <view class="status_text">{{ getStatusText() }}</view>
  15. <view v-if="deviceInfo.status == 3" class="online_text online">
  16. <view>
  17. {{workText}}
  18. </view>
  19. </view>
  20. <view v-if="deviceInfo.status == 4" class="online_text">·离线</view>
  21. </view>
  22. <view class="device_info">机器名称: {{deviceInfo.deviceName}}</view>
  23. </view>
  24. <view style="position: absolute;right:10vw;top:15vh;z-index: 9" @click="showDrawer">
  25. <image :src="imgUrl+'/detail/setting2.png'" style="width: 50rpx;height: 50rpx;"/>
  26. </view>
  27. <view style="position: relative;top:15vh;width: 100%;text-align: center">
  28. <image :src="productImage" :style="productSize"/>
  29. </view>
  30. <view style="position: relative;height: 150rpx;top:15vh;display: flex;">
  31. <image :src="imgUrl+'/detail/bg_large.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  32. <view @click="changeJianyaoMode(0)" class="left_area" style="width: 50%;height: 100%;display: flex;position: relative">
  33. <view style="width: 30%;height: 100%;align-items: center;display: flex;margin-left:20%">
  34. <image v-if="jianyaoMode == 0" :src="imgUrl+'/img20250528/jian_on.png'" style="width: 61%;height:61%;"/>
  35. <image v-if="jianyaoMode == 1" :src="imgUrl+'/img20250528/jian_off.png'" style="width: 61%;height:61%;"/>
  36. </view>
  37. <view style="width: 50%;height: 100%;align-items: center;display: flex;z-index: 999" v-if="jianyaoMode == 1">
  38. 一煎模式
  39. </view>
  40. <view style="width: 50%;height: 100%;align-items: center;display: flex;z-index: 999;color:#50ACFF" v-if="jianyaoMode == 0">
  41. 一煎模式
  42. </view>
  43. <view @click.stop="showYaofangPicker = true" style="position: absolute;right: 0px;bottom:14px;height: 10px;width: 10px;height: 8px;z-index: 8888">
  44. <image :src="imgUrl+'/img20250528/xia.png'" style="width: 100%;height:100%;"/>
  45. </view>
  46. <view style="position: absolute;right: -12px;top: 10px;height: 11px;width: 45px;">
  47. <image :src="imgUrl+'/img20250528/min-bg.png'" style="width: 100%;height:100%;position: absolute;inset: 0"/>
  48. <view style=" font-size: 9px; position: relative;">{{ yaofang.name }}</view>
  49. </view>
  50. </view>
  51. <view @click="changeJianyaoMode(1)" class="left_area" style="width: 50%;height: 100%;display: flex">
  52. <view style="width: 30%;height: 100%;align-items: center;display: flex;margin-left:20%">
  53. <image v-if="jianyaoMode == 1" :src="imgUrl+'/img20250528/jian_on.png'" style="width: 61%;height:61%;"/>
  54. <image v-if="jianyaoMode == 0" :src="imgUrl+'/img20250528/jian_off.png'" style="width: 61%;height:61%;"/>
  55. </view>
  56. <view style="width: 50%;height: 100%;align-items: center;display: flex;z-index: 999;color:#50ACFF" v-if="jianyaoMode == 1">
  57. 二煎模式
  58. </view>
  59. <view style="width: 50%;height: 100%;align-items: center;display: flex;z-index: 999" v-if="jianyaoMode == 0">
  60. 二煎模式
  61. </view>
  62. <view @click.stop="erqibushuiDlg = true" style="position: absolute;right: 40rpx;bottom:14px;height: 10px;width: 10px;height: 8px;z-index: 8888">
  63. <image :src="imgUrl+'/img20250528/xia.png'" style="width: 100%;height:100%;"/>
  64. </view>
  65. <view style="position: absolute;right: 26rpx;top: 10px;height: 11px;width: 40px;">
  66. <image :src="imgUrl+'/img20250528/min-bg.png'" style="width: 100%;height:100%;position: absolute;inset: 0"/>
  67. <view style=" font-size: 9px; position: relative;">二煎补水</view>
  68. </view>
  69. </view>
  70. </view>
  71. <view class="control_area" v-if="firstTab" :style="boardStyle">
  72. <view class="control" v-if="boardType ==6">
  73. <view class="control_item" v-if="jianyaoMode == 0">
  74. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  75. <view class="control_item_detail">
  76. <view class="control_item_left" @click="subTemperature(1)">-</view>
  77. <view class="control_item_center">
  78. <view style="position: absolute">
  79. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" @change="propChange(1)" @focus="propFocus(1)" @confirm="propBlur(1)" @blur="propBlur(1)" v-model="temperature"></u-input>
  80. </view>
  81. </view>
  82. <view class="control_item_center_unit" :style="unitFixedStyle">℃</view>
  83. <view class="control_item_right" @click="addTemperature(1)">+</view>
  84. </view>
  85. <view class="control_item_title">
  86. 设置温度
  87. </view>
  88. </view>
  89. <view class="control_item" v-if="jianyaoMode == 1">
  90. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  91. <view class="control_item_detail">
  92. <view class="control_item_left" @click="subTemperature(1)">-</view>
  93. <view class="control_item_center">
  94. <view style="position: absolute">
  95. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" @change="propChange(1)" @focus="propFocus(1)" @confirm="propBlur(1)" @blur="propBlur(1)" v-model="FirstTemp"></u-input>
  96. </view>
  97. </view>
  98. <view class="control_item_center_unit" :style="unitFixedStyle">℃</view>
  99. <view class="control_item_right" @click="addTemperature(1)">+</view>
  100. </view>
  101. <view class="control_item_title">
  102. 设置温度
  103. </view>
  104. </view>
  105. <!-- <view class="control_item" v-if="!wenduSetting">-->
  106. <!-- <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>-->
  107. <!-- <view class="control_item_detail">-->
  108. <!-- <view class="control_item_left" @click="subTemperature(1)">-</view>-->
  109. <!-- <view class="control_item_center">-->
  110. <!-- <view style="position: absolute">-->
  111. <!-- <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" disabled="" v-model="currentTemperature"></u-input>-->
  112. <!-- </view>-->
  113. <!-- </view>-->
  114. <!-- <view class="control_item_center_unit" :style="unitFixedStyle">℃</view>-->
  115. <!-- <view class="control_item_right" @click="addTemperature(1)">+</view>-->
  116. <!-- </view>-->
  117. <!-- <view class="control_item_title">-->
  118. <!-- 当前温度-->
  119. <!-- </view>-->
  120. <!-- </view>-->
  121. <view class="control_item" v-if=" jianyaoMode == 0">
  122. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  123. <view class="control_item_detail">
  124. <view class="control_item_left" @click="subNewTemperatureTime(1)">-</view>
  125. <view class="control_item_center">
  126. <view style="position: absolute;z-index: 999">
  127. <u-input customStyle="width:150rpx;border:0px;z-index: 999" disabledColor="white" v-model="temperatureTime"></u-input>
  128. </view>
  129. </view>
  130. <view class="control_item_center_unit" :style="unitFixedStyle">min</view>
  131. <view class="control_item_right" style="left: 74%;" @click="addNewTemperatureTime(1)">+</view>
  132. </view>
  133. <view class="control_item_title">
  134. 时间设置
  135. </view>
  136. </view>
  137. <view class="control_item" v-if=" jianyaoMode == 1">
  138. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  139. <view class="control_item_detail">
  140. <view class="control_item_left" @click="subTemperatureTime(1)">-</view>
  141. <view class="control_item_center">
  142. <view style="position: absolute;z-index: 999">
  143. <u-input customStyle="width:150rpx;border:0px;z-index: 999" disabledColor="white" v-model="FirstTime"></u-input>
  144. </view>
  145. </view>
  146. <view class="control_item_center_unit" :style="unitFixedStyle">min</view>
  147. <view class="control_item_right" style="left: 74%;" @click="addTemperatureTime(1)">+</view>
  148. </view>
  149. <view class="control_item_title">
  150. 时间设置
  151. </view>
  152. </view>
  153. <!-- <view class="control_item" v-if="!wenhuoTimeDlgShow">-->
  154. <!-- <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>-->
  155. <!-- <view class="control_item_detail">-->
  156. <!-- <view class="control_item_left" @click="subTemperatureTime(1)">-</view>-->
  157. <!-- <view class="control_item_center">-->
  158. <!-- <view style="position: absolute">-->
  159. <!-- <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" @change="propChange(1)" @focus="propFocus(2)" @confirm="propBlur(2)" @blur="propBlur(2)" v-model="leftJianyaoTime"></u-input>-->
  160. <!-- </view>-->
  161. <!-- </view>-->
  162. <!-- <view class="control_item_center_unit" :style="unitFixedStyle">min</view>-->
  163. <!-- <view class="control_item_right" style="left: 74%;" @click="addTemperatureTime(1)">+</view>-->
  164. <!-- </view>-->
  165. <!-- <view class="control_item_title">-->
  166. <!-- 时间设置-->
  167. <!-- </view>-->
  168. <!-- </view>-->
  169. <view style="position: relative;top:-2vh">
  170. <view class="control_item">
  171. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  172. <view class="control_item_detail">
  173. <view class="control_item_left" @click="subPlanTime(1)">-</view>
  174. <view class="control_item_center">
  175. <view style="position: absolute">
  176. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" v-model="planTime"></u-input>
  177. </view>
  178. </view>
  179. <view class="control_item_center_unit" :style="unitFixedStyle">min</view>
  180. <view class="control_item_right" style="left: 74%;" @click="addPlanTime(1)">+</view>
  181. </view>
  182. <view class="control_item_title">
  183. 预约时间
  184. </view>
  185. </view>
  186. <!-- <view class="control_item" v-if="!planEditTime">-->
  187. <!-- <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>-->
  188. <!-- <view class="control_item_detail">-->
  189. <!-- <view class="control_item_left" @click="subPlanTime(1)">-</view>-->
  190. <!-- <view class="control_item_center">-->
  191. <!-- <view style="position: absolute">-->
  192. <!-- <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" @change="propChange(8)" @focus="propFocus(8)" @confirm="propBlur(8)" @blur="propBlur(8)" v-model="leftAppointmentTime"></u-input>-->
  193. <!-- </view>-->
  194. <!-- </view>-->
  195. <!-- <view class="control_item_center_unit" :style="unitFixedStyle">min</view>-->
  196. <!-- <view class="control_item_right" style="left: 74%;" @click="addPlanTime(1)">+</view>-->
  197. <!-- </view>-->
  198. <!-- <view class="control_item_title">-->
  199. <!-- 预约时间-->
  200. <!-- </view>-->
  201. <!-- </view>-->
  202. <view class="control_item" v-if="jianyaoMode == 0">
  203. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  204. <view class="control_item_detail">
  205. <view class="control_item_left" @click="subWaterVolume(1)">-</view>
  206. <view class="control_item_center">
  207. <view style="position: absolute">
  208. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" @change="propChange(1)" @focus="propFocus(1)" @confirm="propBlur(7)" @blur="propBlur(7)" v-model="waterVolume"></u-input>
  209. </view>
  210. </view>
  211. <view class="control_item_center_unit" :style="unitFixedStyle">L</view>
  212. <view class="control_item_right" @click="addWaterVolume(1)">+</view>
  213. </view>
  214. <view class="control_item_title">
  215. 煎药水量
  216. </view>
  217. </view>
  218. <view class="control_item" v-if="jianyaoMode == 1">
  219. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  220. <view class="control_item_detail">
  221. <view class="control_item_left" @click="subWaterVolume(1)">-</view>
  222. <view class="control_item_center">
  223. <view style="position: absolute">
  224. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" @change="propChange(1)" @focus="propFocus(1)" @confirm="propBlur(7)" @blur="propBlur(7)" v-model="secondWaterVolume"></u-input>
  225. </view>
  226. </view>
  227. <view class="control_item_center_unit" :style="unitFixedStyle">L</view>
  228. <view class="control_item_right" @click="addWaterVolume(1)">+</view>
  229. </view>
  230. <view class="control_item_title">
  231. 煎药水量
  232. </view>
  233. </view>
  234. <!-- <view class="control_item" v-if="!editWaterVolume">-->
  235. <!-- <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>-->
  236. <!-- <view class="control_item_detail">-->
  237. <!-- <view class="control_item_left" @click="subWaterVolume(1)">-</view>-->
  238. <!-- <view class="control_item_center">-->
  239. <!-- <view style="position: absolute">-->
  240. <!-- <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" v-model="currentWaterVolume"></u-input>-->
  241. <!-- </view>-->
  242. <!-- </view>-->
  243. <!-- <view class="control_item_center_unit" :style="unitFixedStyle">L</view>-->
  244. <!-- <view class="control_item_right" @click="addWaterVolume(1)">+</view>-->
  245. <!-- </view>-->
  246. <!-- <view class="control_item_title">-->
  247. <!-- 当前煎药水量-->
  248. <!-- </view>-->
  249. <!-- </view>-->
  250. </view>
  251. <view style="position: relative;top:-4vh">
  252. <view class="control_item">
  253. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  254. <view class="control_item_detail">
  255. <view class="control_item_left" @click="subTimeFirst(1)">-</view>
  256. <view class="control_item_center">
  257. <view style="position: absolute">
  258. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" @confirm="propBlur(14)" @blur="propBlur(14)" v-model="timeSettingFirst"></u-input>
  259. </view>
  260. </view>
  261. <view class="control_item_center_unit" :style="unitFixedStyle">min</view>
  262. <view class="control_item_right" style="left: 74%;" @click="addTimeFirst(1)">+</view>
  263. </view>
  264. <view class="control_item_title">
  265. 先煎时间
  266. </view>
  267. </view>
  268. <!-- <view class="control_item" v-if="!editTimeSettingFirst">-->
  269. <!-- <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>-->
  270. <!-- <view class="control_item_detail">-->
  271. <!-- <view class="control_item_left" @click="subTimeFirst(1)">-</view>-->
  272. <!-- <view class="control_item_center">-->
  273. <!-- <view style="position: absolute">-->
  274. <!-- <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" v-model="currentTimeSettingFirst"></u-input>-->
  275. <!-- </view>-->
  276. <!-- </view>-->
  277. <!-- <view class="control_item_center_unit" :style="unitFixedStyle">min</view>-->
  278. <!-- <view class="control_item_right" style="left: 74%;" @click="addTimeFirst(1)">+</view>-->
  279. <!-- </view>-->
  280. <!-- <view class="control_item_title">-->
  281. <!-- 先煎时间-->
  282. <!-- </view>-->
  283. <!-- </view>-->
  284. <view class="control_item">
  285. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  286. <view class="control_item_detail">
  287. <view class="control_item_left" @click="subTimeSecond(1)">-</view>
  288. <view class="control_item_center">
  289. <view style="position: absolute">
  290. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" @confirm="propBlur(15)" @blur="propBlur(15)" v-model="timeSettingSecond"></u-input>
  291. </view>
  292. </view>
  293. <view class="control_item_center_unit" :style="unitFixedStyle">min</view>
  294. <view class="control_item_right" style="left: 74%;" @click="addTimeSecond(1)">+</view>
  295. </view>
  296. <view class="control_item_title">
  297. 后下时间
  298. </view>
  299. </view>
  300. <!-- <view class="control_item" v-if="!editTimeSettingSecond">-->
  301. <!-- <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>-->
  302. <!-- <view class="control_item_detail">-->
  303. <!-- <view class="control_item_left" @click="subTimeSecond(1)">-</view>-->
  304. <!-- <view class="control_item_center">-->
  305. <!-- <view style="position: absolute">-->
  306. <!-- <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" v-model="currentTimeSettingSecond"></u-input>-->
  307. <!-- </view>-->
  308. <!-- </view>-->
  309. <!-- <view class="control_item_center_unit" :style="unitFixedStyle">分钟</view>-->
  310. <!-- <view class="control_item_right" style="left: 74%;" @click="addTimeSecond(1)">+</view>-->
  311. <!-- </view>-->
  312. <!-- <view class="control_item_title">-->
  313. <!-- 后下时间-->
  314. <!-- </view>-->
  315. <!-- </view>-->
  316. </view>
  317. </view>
  318. <view class="bottom" v-if="boardType == 6">
  319. <image :src="imgUrl+'/detail/bg_large.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  320. <view class="bottom_item" @click="setPressTurn">
  321. <image v-if="pressTurn == 1" :src="imgUrl+'/img20250528/jiya_on.png'" style="width: 32%;height:32%;"/>
  322. <image v-if="pressTurn == 0" :src="imgUrl+'/img20250528/jiya_off.png'" style="width: 32%;height:32%;"/>
  323. <view :class="pressTurn == 1?'active_on':''">挤压</view>
  324. </view>
  325. <view class="bottom_item" @click="setResetTurn">
  326. <image v-if="resetTurn == 1" :src="imgUrl+'/img20250528/fuwei_on.png'" style="width: 32%;height:32%;"/>
  327. <image v-if="resetTurn == 0" :src="imgUrl+'/img20250528/fuwei_off.png'" style="width: 32%;height:32%;"/>
  328. <view :class="resetTurn == 1?'active_on':''">复位</view>
  329. </view>
  330. <view class="bottom_item" @click="turnChange(3)">
  331. <image v-if="!qingxiTurn" :src="imgUrl+'/img20250528/qingxi_off.png'" style="width: 32%;height:32%;"/>
  332. <image v-if="qingxiTurn" :src="imgUrl+'/img20250528/qingxi_on.png'" style="width: 32%;height:32%;"/>
  333. <view :class="!qingxiTurn?'':'active_on'">清洗</view>
  334. </view>
  335. <view class="bottom_item" @click="paishui">
  336. <image v-if="drainageTurn == 1" :src="imgUrl+'/img20250528/paishui_on.png'" style="width: 32%;height:32%;"/>
  337. <image v-if="drainageTurn == 0" :src="imgUrl+'/img20250528/paishui_off.png'" style="width: 32%;height:32%;"/>
  338. <view :class="drainageTurn == 1?'active_on':''">排水</view>
  339. </view>
  340. <view class="bottom_item" @click="decoctControlChange">
  341. <image v-if="decoctControlStatus" :src="imgUrl+'/img20250528/qidong_on.png'" style="width: 32%;height:32%;"/>
  342. <image v-else :src="imgUrl+'/img20250528/qidong_off.png'" style="width: 32%;height:32%;"/>
  343. <view :class="decoctControlStatus?'active_on':''">启动</view>
  344. </view>
  345. </view>
  346. </view>
  347. </view>
  348. <u-popup :show="closeFinishStatusPop" @close="closeFinishPop" mode="center" bgColor="transparent" :closeable="true" :closeOnClickOverlay ="false" :round="10">
  349. <view style="position: relative;width: 500rpx; border-radius: 12px;padding-bottom: 22px;background: rgb(244,244,244)">
  350. <view style=" text-align: center;
  351. font-weight: 500;
  352. font-size: 22px;
  353. padding: 15px;">{{ statusHandler.title }}</view>
  354. <view style=" text-align: center;font-size: 18px;font-weight: 500;margin-top: 7px;">
  355. <view v-for="content in statusHandler.desc">{{ content }}</view>
  356. <view>{{ content }}</view>
  357. </view>
  358. <view style=" display: flex;flex-direction: row;">
  359. <view @click="setPressTurn" style="width: 33%;position: relative" >
  360. <view style="background: white;height: 50px;width: 60px;position: relative;border-radius: 10px;top: 10px;margin: 0 10px;">
  361. <view style="height: 30%;width: 40%;position: relative;left: 34%;top: 20%;">
  362. <image v-if="pressTurn == 1" :src="imgUrl+'/img20250528/jiya_on.png'" style="width: 100%;height: 100%"/>
  363. <image v-if="pressTurn == 0" :src="imgUrl+'/img20250528/jiya_off.png'" style="width: 100%;height: 100%"/>
  364. </view>
  365. <view style=" position: relative;left: 37%;top: 29%; font-size: 12px;">挤压</view>
  366. </view>
  367. </view>
  368. <view @click="setResetTurn" style="width: 33%;position: relative" >
  369. <view style="background: white;height: 50px;width: 60px;position: relative;border-radius: 10px;top: 10px;margin: 0 10px;">
  370. <view style="height: 30%;width: 40%;position: relative;left: 34%;top: 20%;">
  371. <image v-if="resetTurn == 1" :src="imgUrl+'/img20250528/fuwei_on.png'" style="width: 100%;height: 100%"/>
  372. <image v-if="resetTurn == 0" :src="imgUrl+'/img20250528/fuwei_off.png'" style="width: 100%;height: 100%"/>
  373. </view>
  374. <view style=" position: relative;left: 37%;top: 29%; font-size: 12px;">复位</view>
  375. </view>
  376. </view>
  377. <view @click="paishui" style="width: 33%;position: relative" >
  378. <view style="background: white;height: 50px;width: 60px;position: relative;border-radius: 10px;top: 10px;margin: 0 10px;">
  379. <view style="height: 30%;width: 40%;position: relative;left: 34%;top: 20%;">
  380. <image v-if="drainageTurn == 1" :src="imgUrl+'/img20250528/chuyao_on.png'" style="width: 100%;height: 100%"/>
  381. <image v-if="drainageTurn == 0" :src="imgUrl+'/img20250528/chuyao_off.png'" style="width: 100%;height: 100%"/>
  382. </view>
  383. <view style=" position: relative;left: 37%;top: 29%; font-size: 12px;">出药</view>
  384. </view>
  385. </view>
  386. </view>
  387. </view>
  388. </u-popup>
  389. <u-popup :show="zhuanyiyaoyePop" mode="center" bgColor="transparent" :closeOnClickOverlay ="false" :round="10">
  390. <view style=" padding-top: 17px;text-align:center;position: relative;width: 500rpx; border-radius: 12px;padding-bottom: 22px;background: rgb(244,244,244)">
  391. <view>
  392. 正在转移药液中
  393. </view>
  394. <view>
  395. 暂时不能进入其他操作
  396. </view>
  397. <view style="background: white;text-align: left;padding: 0px 18%;margin-top: 13px;">
  398. <text style="color: red">转移药液剩余时间:</text>
  399. <text style="margin-left: 10px">{{ leftTransferTime }}</text>
  400. </view>
  401. </view>
  402. </u-popup>
  403. <u-popup :show="closeStatusPop" mode="center" bgColor="transparent" :closeOnClickOverlay ="false" :round="10">
  404. <view style="position: relative;width: 500rpx; border-radius: 12px;padding-bottom: 22px;background: rgb(244,244,244)">
  405. <view style=" text-align: center;
  406. font-weight: 500;
  407. font-size: 22px;
  408. padding: 15px;">{{ statusHandler.title }}</view>
  409. <view v-if="statusHandler.type == 1">
  410. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="!editWaterVolume">
  411. <view class="control_item_detail">
  412. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subWaterVolume(1)">-</view>
  413. <view class="control_item_center" style="top:-2px;left: 40%;">
  414. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" v-model="currentWaterVolume"/>
  415. </view>
  416. <view class="control_item_center_unit" style="; font-size: 12px;
  417. left: 37vw;
  418. top: 13px;">L</view>
  419. <view class="control_item_right" style="top: -3px" @click="addWaterVolume(1)">+</view>
  420. </view>
  421. </view>
  422. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="editWaterVolume">
  423. <view class="control_item_detail">
  424. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subWaterVolume(1)">-</view>
  425. <view class="control_item_center" style="top:-2px;left: 40%;">
  426. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" @change="propChange(1)" @focus="propFocus(1)" @confirm="propBlur(7)" @blur="propBlur(7)" v-model="waterVolume"/>
  427. </view>
  428. <view class="control_item_center_unit" style="; font-size: 12px;
  429. left: 37vw;
  430. top: 13px;">L</view>
  431. <view class="control_item_right" style="top: -3px" @click="addWaterVolume(1)">+</view>
  432. </view>
  433. </view>
  434. </view>
  435. <view v-if="statusHandler.type == 2">
  436. <view class="control_item" style="width: 100%;background: white;height: 90rpx" >
  437. <view class="control_item_detail">
  438. <view class="control_item_center" style="top:-2px;left: 40%;">
  439. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" value="40"/>
  440. </view>
  441. <view class="control_item_center_unit" style="; font-size: 12px;
  442. left: 37vw;
  443. top: 13px;">℃</view>
  444. </view>
  445. </view>
  446. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="planEditTime">
  447. <view class="control_item_detail">
  448. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subPlanTime(1)">-</view>
  449. <view class="control_item_center" style="top:-2px;left: 40%;">
  450. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" v-model="planTime"/>
  451. </view>
  452. <view class="control_item_center_unit" style="; font-size: 12px;
  453. left: 37vw;
  454. top: 13px;">min</view>
  455. <view class="control_item_right" style="top: -3px" @click="addPlanTime(1)">+</view>
  456. </view>
  457. </view>
  458. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="!planEditTime">
  459. <view class="control_item_detail">
  460. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subPlanTime(1)">-</view>
  461. <view class="control_item_center" style="top:-2px;left: 40%;">
  462. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" @change="propChange(1)" @focus="propFocus(1)" @confirm="propBlur(7)" @blur="propBlur(7)" v-model="leftAppointmentTime"/>
  463. </view>
  464. <view class="control_item_center_unit" style="; font-size: 12px;
  465. left: 37vw;
  466. top: 13px;">min</view>
  467. <view class="control_item_right" style="top: -3px" @click="addPlanTime(1)">+</view>
  468. </view>
  469. </view>
  470. </view>
  471. <view v-if="statusHandler.type == 3">
  472. <view>
  473. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="editTempSettingFirst">
  474. <view class="control_item_detail">
  475. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subTempSettingFirst(1)">-</view>
  476. <view class="control_item_center" style="top:-2px;left: 40%;">
  477. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" v-model="tempSettingFirst"/>
  478. </view>
  479. <view class="control_item_center_unit" style="; font-size: 12px;
  480. left: 37vw;
  481. top: 13px;">℃</view>
  482. <view class="control_item_right" style="top: -3px" @click="addTempSettingFirst(1)">+</view>
  483. </view>
  484. </view>
  485. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="!editTempSettingFirst">
  486. <view class="control_item_detail">
  487. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subTempSettingFirst(1)">-</view>
  488. <view class="control_item_center" style="top:-2px;left: 40%;">
  489. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" @change="propChange(1)" @focus="propFocus(1)" @confirm="propBlur(7)" @blur="propBlur(7)" v-model="currentTemperature"/>
  490. </view>
  491. <view class="control_item_center_unit" style="; font-size: 12px;
  492. left: 37vw;
  493. top: 13px;">℃</view>
  494. <view class="control_item_right" style="top: -3px" @click="addTempSettingFirst(1)">+</view>
  495. </view>
  496. </view>
  497. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="!editTimeSettingFirst">
  498. <view class="control_item_detail">
  499. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subTimeFirst(1)">-</view>
  500. <view class="control_item_center" style="top:-2px;left: 40%;">
  501. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" v-model="leftJianyaoTime"/>
  502. </view>
  503. <view class="control_item_center_unit" style="; font-size: 12px;
  504. left: 37vw;
  505. top: 13px;">min</view>
  506. <view class="control_item_right" style="top: -3px" @click="addTimeFirst(1)">+</view>
  507. </view>
  508. </view>
  509. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="editTimeSettingFirst">
  510. <view class="control_item_detail">
  511. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subTimeFirst(1)">-</view>
  512. <view class="control_item_center" style="top:-2px;left: 40%;">
  513. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" @change="propChange(1)" @focus="propFocus(1)" @confirm="propBlur(7)" @blur="propBlur(7)" v-model="timeSettingFirst"/>
  514. </view>
  515. <view class="control_item_center_unit" style="; font-size: 12px;
  516. left: 37vw;
  517. top: 13px;">min</view>
  518. <view class="control_item_right" style="top: -3px" @click="addTimeFirst(1)">+</view>
  519. </view>
  520. </view>
  521. </view>
  522. </view>
  523. <view v-if="statusHandler.type == 4">
  524. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="editTempSettingFirst">
  525. <view class="control_item_detail">
  526. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subTempSettingFirst(1)">-</view>
  527. <view class="control_item_center" style="top:-2px;left: 40%;">
  528. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" v-model="tempSettingFirst"/>
  529. </view>
  530. <view class="control_item_center_unit" style="; font-size: 12px;
  531. left: 37vw;
  532. top: 13px;">℃</view>
  533. <view class="control_item_right" style="top: -3px" @click="addTempSettingFirst(1)">+</view>
  534. </view>
  535. </view>
  536. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="!editTempSettingFirst">
  537. <view class="control_item_detail">
  538. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subTempSettingFirst(1)">-</view>
  539. <view class="control_item_center" style="top:-2px;left: 40%;">
  540. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" @change="propChange(1)" @focus="propFocus(1)" @confirm="propBlur(7)" @blur="propBlur(7)" v-model="currentTempSettingFirst"/>
  541. </view>
  542. <view class="control_item_center_unit" style="; font-size: 12px;
  543. left: 37vw;
  544. top: 13px;">℃</view>
  545. <view class="control_item_right" style="top: -3px" @click="addTempSettingFirst(1)">+</view>
  546. </view>
  547. </view>
  548. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="!editTimeSettingFirst">
  549. <view class="control_item_detail">
  550. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subTimeFirst(1)">-</view>
  551. <view class="control_item_center" style="top:-2px;left: 40%;">
  552. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" v-model="currentTimeSettingFirst"/>
  553. </view>
  554. <view class="control_item_center_unit" style="; font-size: 12px;
  555. left: 37vw;
  556. top: 13px;">min</view>
  557. <view class="control_item_right" style="top: -3px" @click="addTimeFirst(1)">+</view>
  558. </view>
  559. </view>
  560. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="editTimeSettingFirst">
  561. <view class="control_item_detail">
  562. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subTimeFirst(1)">-</view>
  563. <view class="control_item_center" style="top:-2px;left: 40%;">
  564. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" @change="propChange(1)" @focus="propFocus(1)" @confirm="propBlur(7)" @blur="propBlur(7)" v-model="currentTempSettingFirst"/>
  565. </view>
  566. <view class="control_item_center_unit" style="; font-size: 12px;
  567. left: 37vw;
  568. top: 13px;">min</view>
  569. <view class="control_item_right" style="top: -3px" @click="addTimeFirst(1)">+</view>
  570. </view>
  571. </view>
  572. </view>
  573. <view v-if="statusHandler.type == 5">
  574. <view v-if="secondJianyaoMode == 10">
  575. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="wenduSetting">
  576. <view class="control_item_detail">
  577. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subTemperature(1)">-</view>
  578. <view class="control_item_center" style="top:-2px;left: 40%;">
  579. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" @confirm="propBlur(13)" @blur="propBlur(13)" v-model="FirstTemp"></u-input>
  580. </view>
  581. <view class="control_item_center_unit" style="; font-size: 12px;
  582. left: 37vw;
  583. top: 13px;">℃</view>
  584. <view class="control_item_right" style="top: -3px" @click="addTemperature(1)">+</view>
  585. </view>
  586. </view>
  587. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="!wenduSetting">
  588. <view class="control_item_detail">
  589. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subTemperature(1)">-</view>
  590. <view class="control_item_center" style="top:-2px;left: 40%;">
  591. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" @change="propChange(1)" @focus="this.wenduSetting = true" v-model="currentTemperature"/>
  592. </view>
  593. <view class="control_item_center_unit" style="; font-size: 12px;
  594. left: 37vw;
  595. top: 13px;">℃</view>
  596. <view class="control_item_right" style="top: -3px" @click="addTemperature(1)">+</view>
  597. </view>
  598. </view>
  599. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="wenhuoTimeDlgShow">
  600. <view class="control_item_detail">
  601. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subSecondTime(1)">-</view>
  602. <view class="control_item_center" style="top:-2px;left: 40%;">
  603. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" v-model="SecondTime"/>
  604. </view>
  605. <view class="control_item_center_unit" style="; font-size: 12px;
  606. left: 37vw;
  607. top: 13px;">min</view>
  608. <view class="control_item_right" style="top: -3px" @click="addSecondTime(1)">+</view>
  609. </view>
  610. </view>
  611. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="!wenhuoTimeDlgShow">
  612. <view class="control_item_detail">
  613. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subSecondTime(1)">-</view>
  614. <view class="control_item_center" style="top:-2px;left: 40%;">
  615. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" @change="propChange(1)" @focus="this.wenhuoTimeDlgShow = true" @confirm="propBlur(12)" @blur="propBlur(12)" v-model="leftJianyaoTime"></u-input>
  616. </view>
  617. <view class="control_item_center_unit" style="; font-size: 12px;
  618. left: 37vw;
  619. top: 13px;">min</view>
  620. <view class="control_item_right" style="top: -3px" @click="addSecondTime(1)">+</view>
  621. </view>
  622. </view>
  623. </view>
  624. <view v-else-if="secondJianyaoMode == 5">
  625. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="wenduSetting">
  626. <view class="control_item_detail">
  627. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subTemperature(1)">-</view>
  628. <view class="control_item_center" style="top:-2px;left: 40%;">
  629. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" @change="propChange(1)" @focus="propFocus(1)" @confirm="propBlur(1)" @blur="propBlur(1)" v-model="FirstTemp"></u-input>
  630. </view>
  631. <view class="control_item_center_unit" style="; font-size: 12px;
  632. left: 37vw;
  633. top: 13px;">℃</view>
  634. <view class="control_item_right" style="top: -3px" @click="addTemperature(1)">+</view>
  635. </view>
  636. </view>
  637. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="!wenduSetting">
  638. <view class="control_item_detail">
  639. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subTemperature(1)">-</view>
  640. <view class="control_item_center" style="top:-2px;left: 40%;">
  641. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" v-model="currentTemperature"/>
  642. </view>
  643. <view class="control_item_center_unit" style="; font-size: 12px;
  644. left: 37vw;
  645. top: 13px;">℃</view>
  646. <view class="control_item_right" style="top: -3px" @click="addTemperature(1)">+</view>
  647. </view>
  648. </view>
  649. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="wenhuoTimeDlgShow">
  650. <view class="control_item_detail">
  651. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subTemperatureTime(1)">-</view>
  652. <view class="control_item_center" style="top:-2px;left: 40%;">
  653. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" v-model="FirstTime"/>
  654. </view>
  655. <view class="control_item_center_unit" style="; font-size: 12px;
  656. left: 37vw;
  657. top: 13px;">min</view>
  658. <view class="control_item_right" style="top: -3px" @click="addTemperatureTime(1)">+</view>
  659. </view>
  660. </view>
  661. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="!wenhuoTimeDlgShow">
  662. <view class="control_item_detail">
  663. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subTemperatureTime(1)">-</view>
  664. <view class="control_item_center" style="top:-2px;left: 40%;">
  665. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" @change="propChange(1)" @focus="propFocus(2)" @confirm="propBlur(2)" @blur="propBlur(2)" v-model="leftJianyaoTime"></u-input>
  666. </view>
  667. <view class="control_item_center_unit" style="; font-size: 12px;
  668. left: 37vw;
  669. top: 13px;">min</view>
  670. <view class="control_item_right" style="top: -3px" @click="addTemperatureTime(1)">+</view>
  671. </view>
  672. </view>
  673. </view>
  674. <view v-else-if="firstJianyaoMode == 5">
  675. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="wenduSetting">
  676. <view class="control_item_detail">
  677. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subTemperature(4)">-</view>
  678. <view class="control_item_center" style="top:-2px;left: 40%;">
  679. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" @change="propChange(1)" @focus="propFocus(1)" @confirm="propBlur(1)" @blur="propBlur(1)" v-model="temperature"></u-input>
  680. </view>
  681. <view class="control_item_center_unit" style="; font-size: 12px;
  682. left: 37vw;
  683. top: 13px;">℃</view>
  684. <view class="control_item_right" style="top: -3px" @click="addTemperature(4)">+</view>
  685. </view>
  686. </view>
  687. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="!wenduSetting">
  688. <view class="control_item_detail">
  689. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subTemperature(5)">-</view>
  690. <view class="control_item_center" style="top:-2px;left: 40%;">
  691. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" v-model="currentTemperature"/>
  692. </view>
  693. <view class="control_item_center_unit" style="; font-size: 12px;
  694. left: 37vw;
  695. top: 13px;">℃</view>
  696. <view class="control_item_right" style="top: -3px" @click="addTemperature(5)">+</view>
  697. </view>
  698. </view>
  699. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="wenhuoTimeDlgShow">
  700. <view class="control_item_detail">
  701. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subTemperatureTime(1)">-</view>
  702. <view class="control_item_center" style="top:-2px;left: 40%;">
  703. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" v-model="temperatureTime"/>
  704. </view>
  705. <view class="control_item_center_unit" style="; font-size: 12px;
  706. left: 37vw;
  707. top: 13px;">min</view>
  708. <view class="control_item_right" style="top: -3px" @click="addTemperatureTime(1)">+</view>
  709. </view>
  710. </view>
  711. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="!wenhuoTimeDlgShow">
  712. <view class="control_item_detail">
  713. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subTemperatureTime(1)">-</view>
  714. <view class="control_item_center" style="top:-2px;left: 40%;">
  715. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" @change="propChange(1)" @focus="propFocus(2)" @confirm="propBlur(2)" @blur="propBlur(2)" v-model="leftJianyaoTime"></u-input>
  716. </view>
  717. <view class="control_item_center_unit" style="; font-size: 12px;
  718. left: 37vw;
  719. top: 13px;">min</view>
  720. <view class="control_item_right" style="top: -3px" @click="addTemperatureTime(1)">+</view>
  721. </view>
  722. </view>
  723. </view>
  724. <view v-else>
  725. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="wenduSetting">
  726. <view class="control_item_detail">
  727. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subTemperature(1)">-</view>
  728. <view class="control_item_center" style="top:-2px;left: 40%;">
  729. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" @change="propChange(1)" @focus="propFocus(1)" @confirm="propBlur(1)" @blur="propBlur(1)" v-model="temperature"></u-input>
  730. </view>
  731. <view class="control_item_center_unit" style="; font-size: 12px;
  732. left: 37vw;
  733. top: 13px;">℃</view>
  734. <view class="control_item_right" style="top: -3px" @click="addTemperature(1)">+</view>
  735. </view>
  736. </view>
  737. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="!wenduSetting">
  738. <view class="control_item_detail">
  739. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subTemperature(1)">-</view>
  740. <view class="control_item_center" style="top:-2px;left: 40%;">
  741. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" v-model="currentTemperature"/>
  742. </view>
  743. <view class="control_item_center_unit" style="; font-size: 12px;
  744. left: 37vw;
  745. top: 13px;">℃</view>
  746. <view class="control_item_right" style="top: -3px" @click="addTemperature(1)">+</view>
  747. </view>
  748. </view>
  749. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="wenhuoTimeDlgShow">
  750. <view class="control_item_detail">
  751. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subTemperatureTime(1)">-</view>
  752. <view class="control_item_center" style="top:-2px;left: 40%;">
  753. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" v-model="FirstTime"/>
  754. </view>
  755. <view class="control_item_center_unit" style="; font-size: 12px;
  756. left: 37vw;
  757. top: 13px;">min</view>
  758. <view class="control_item_right" style="top: -3px" @click="addTemperatureTime(1)">+</view>
  759. </view>
  760. </view>
  761. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="!wenhuoTimeDlgShow">
  762. <view class="control_item_detail">
  763. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subTemperatureTime(1)">-</view>
  764. <view class="control_item_center" style="top:-2px;left: 40%;">
  765. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" @change="propChange(1)" @focus="propFocus(2)" @confirm="propBlur(2)" @blur="propBlur(2)" v-model="leftJianyaoTime"></u-input>
  766. </view>
  767. <view class="control_item_center_unit" style="; font-size: 12px;
  768. left: 37vw;
  769. top: 13px;">min</view>
  770. <view class="control_item_right" style="top: -3px" @click="addTemperatureTime(1)">+</view>
  771. </view>
  772. </view>
  773. </view>
  774. </view>
  775. <view v-if="statusHandler.type == 6">
  776. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="wenduSetting">
  777. <view class="control_item_detail">
  778. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subTemperature(1)">-</view>
  779. <view class="control_item_center" style="top:-2px;left: 40%;">
  780. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" @change="propChange(1)" @focus="propFocus(1)" @confirm="propBlur(1)" @blur="propBlur(1)" v-model="temperature"></u-input>
  781. </view>
  782. <view class="control_item_center_unit" style="; font-size: 12px;
  783. left: 37vw;
  784. top: 13px;">℃</view>
  785. <view class="control_item_right" style="top: -3px" @click="addTemperature(1)">+</view>
  786. </view>
  787. </view>
  788. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="!wenduSetting">
  789. <view class="control_item_detail">
  790. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subTemperature(1)">-</view>
  791. <view class="control_item_center" style="top:-2px;left: 40%;">
  792. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" v-model="currentTemperature"/>
  793. </view>
  794. <view class="control_item_center_unit" style="; font-size: 12px;
  795. left: 37vw;
  796. top: 13px;">℃</view>
  797. <view class="control_item_right" style="top: -3px" @click="addTemperature(1)">+</view>
  798. </view>
  799. </view>
  800. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="editTimeSettingSecond">
  801. <view class="control_item_detail">
  802. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subTimeSecond(1)">-</view>
  803. <view class="control_item_center" style="top:-2px;left: 40%;">
  804. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" @change="propChange(1)" @focus="propFocus(1)" @confirm="propBlur(7)" @blur="propBlur(7)" v-model="timeSettingSecond"></u-input>
  805. </view>
  806. <view class="control_item_center_unit" style="; font-size: 12px;
  807. left: 37vw;
  808. top: 13px;">min</view>
  809. <view class="control_item_right" style="top: -3px" @click="addTimeSecond(1)">+</view>
  810. </view>
  811. </view>
  812. <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="!editTimeSettingSecond">
  813. <view class="control_item_detail">
  814. <view class="control_item_left" style="left:22%;top:-41rpx" @click="subTimeSecond(1)">-</view>
  815. <view class="control_item_center" style="top:-2px;left: 40%;">
  816. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" v-model="leftJianyaoTime"></u-input>
  817. </view>
  818. <view class="control_item_center_unit" style="; font-size: 12px;
  819. left: 37vw;
  820. top: 13px;">min</view>
  821. <view class="control_item_right" style="top: -3px" @click="addTimeSecond(1)">+</view>
  822. </view>
  823. </view>
  824. </view>
  825. <view v-if="statusHandler.type == 9">
  826. <!-- <view class="control_item" style="width: 100%;background: white;height: 90rpx" v-if="editSecondAddWaterTime">-->
  827. <!-- <view class="control_item_detail">-->
  828. <!-- <view class="control_item_left" style="left:22%;top:-41rpx" @click="subErqibushui(1)">-</view>-->
  829. <!-- <view class="control_item_center" style="top:-2px;left: 40%;">-->
  830. <!-- <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" v-model="secondAddWaterTime"></u-input>-->
  831. <!-- </view>-->
  832. <!-- <view class="control_item_center_unit" style="; font-size: 12px;-->
  833. <!-- left: 37vw;-->
  834. <!-- top: 13px;">s</view>-->
  835. <!-- <view class="control_item_right" style="top: -3px" @click="addErqibushui(1)">+</view>-->
  836. <!-- </view>-->
  837. <!-- </view>-->
  838. <view class="control_item" style="width: 100%;background: white;height: 90rpx">
  839. <view class="control_item_detail">
  840. <!-- <view class="control_item_left" style="left:22%;top:-41rpx" @click="subErqibushui(1)">-</view>-->
  841. <view class="control_item_center" style="top:-2px;left: 40%;">
  842. <u-input fontSize="20px" customStyle="width:150rpx;border:0px;font-size:20px" disabledColor="white" v-model="currentSecondAddWaterTime"></u-input>
  843. </view>
  844. <view class="control_item_center_unit" style="; font-size: 12px;
  845. left: 37vw;
  846. top: 13px;">s</view>
  847. <!-- <view class="control_item_right" style="top: -3px" @click="addErqibushui(1)">+</view>-->
  848. </view>
  849. </view>
  850. <view style="font-size: 10px;color: red;text-align: center">可调范围10~20</view>
  851. </view>
  852. <view style=" text-align: center;font-size: 18px;font-weight: 500;margin-top: 7px;">
  853. <view v-for="content in statusHandler.desc">{{ content }}</view>
  854. <view>{{ content }}</view>
  855. </view>
  856. <view v-if="statusHandler.type == 4">
  857. <view style="position: relative" @click="doAction(3)">
  858. <view style="background: white;height: 60px;width: 90px;position: relative;border-radius: 10px;left: 33%;top: 10px;">
  859. <view style="height: 30%;width: 20%; position: relative;left: 40%;top: 20%;">
  860. <image :src="imgUrl+'/img20250528/qidong_off.png'" style="width: 100%;height: 100%"/>
  861. </view>
  862. <view style=" position: relative;left: 37%;top: 29%; font-size: 12px;">启动</view>
  863. </view>
  864. </view>
  865. </view>
  866. <view v-else>
  867. <view v-if="statusHandler.type !=9">
  868. <view style="position: relative" @click="doAction(1)" v-if="pauseStatus == 0">
  869. <view style="background: white;height: 60px;width: 90px;position: relative;border-radius: 10px;left: 33%;top: 10px;">
  870. <view style="height: 30%;width: 20%; position: relative;left: 40%;top: 20%;">
  871. <image :src="imgUrl+'/img20250528/pause.png'" style="width: 100%;height: 100%"/>
  872. </view>
  873. <view style=" position: relative;left: 37%;top: 29%; font-size: 12px;">暂停</view>
  874. </view>
  875. </view>
  876. <view style="position: relative" @click="doAction(0)" v-if="pauseStatus == 1">
  877. <view style="background: white;height: 60px;width: 90px;position: relative;border-radius: 10px;left: 33%;top: 10px;">
  878. <view style="height: 30%;width: 20%; position: relative;left: 40%;top: 20%;">
  879. <image :src="imgUrl+'/img20250528/qidong_off.png'" style="width: 100%;height: 100%"/>
  880. </view>
  881. <view style=" position: relative;left: 37%;top: 29%; font-size: 12px;">启动</view>
  882. </view>
  883. </view>
  884. </view>
  885. </view>
  886. </view>
  887. </u-popup>
  888. <u-popup :show="false" @close="closePop" mode="center" bgColor="transparent" :closeable="true" :round="10">
  889. <view style="position: relative;width: 500rpx;height:300rpx;background: rgb(240,240,240);padding-top:30px">
  890. <view class="control_item" style="width: 100%" v-if="fengbianDlgShow">
  891. <view class="control_item_detail">
  892. <view class="control_item_left" @click="subEdegTemperature(1)">-</view>
  893. <view class="control_item_center">
  894. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" @change="changeEdegTemperature" v-model="setEdegTemperature"></u-input>
  895. </view>
  896. <view class="control_item_center_unit" :style="unitFixedStyle1">℃</view>
  897. <view class="control_item_right" @click="addEdegTemperature(1)">+</view>
  898. </view>
  899. <view class="control_item_title">
  900. 封边温度设置
  901. </view>
  902. </view>
  903. </view>
  904. </u-popup>
  905. <u-popup :show="planPopDlg" @close="closePlanPop" mode="center" :closeable="true" :round="10">
  906. <view style="position: relative;width: 400rpx;background: none;padding:40rpx;">
  907. <view class="control_item" style="width: 100%">
  908. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  909. <view class="control_item_detail">
  910. <view class="control_item_left" @click="subPlanTime(1)" style="left: 18%;">-</view>
  911. <view class="control_item_center">
  912. <view style="position: absolute">
  913. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" v-model="planTime"></u-input>
  914. </view>
  915. </view>
  916. <view class="control_item_center_unit" :style="unitFixedStyle">min</view>
  917. <view class="control_item_right" style="left: 80%;" @click="addPlanTime(1)">+</view>
  918. </view>
  919. <view class="control_item_title">
  920. 预约时间
  921. </view>
  922. </view>
  923. <view class="control_item" style="width: 100%">
  924. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  925. <view class="control_item_detail">
  926. <view class="control_item_left" @click="subTemperatureTime()" style="left: 18%;">-</view>
  927. <view class="control_item_center">
  928. <view style="position: absolute">
  929. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" @change="changeTemperatureTime()" v-model="temperatureTime"></u-input>
  930. </view>
  931. </view>
  932. <view class="control_item_center_unit" :style="unitFixedStyle">min</view>
  933. <view class="control_item_right" @click="addTemperatureTime()" style="left: 80%;">+</view>
  934. </view>
  935. <view class="control_item_title">
  936. 时间设置
  937. </view>
  938. </view>
  939. <view>
  940. <button style="background: white;" @click="plan">确认</button>
  941. </view>
  942. </view>
  943. </u-popup>
  944. <u-popup :show="erqibushuiDlg" @close="closeErqibushuiPop" mode="center" :closeable="true" :round="10">
  945. <view style="position: relative;width: 400rpx;background: none;padding:40rpx;">
  946. <view class="control_item" style="width: 100%" >
  947. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  948. <view class="control_item_detail">
  949. <view class="control_item_left" @click="subErqibushui(1)" style="left: 18%;">-</view>
  950. <view class="control_item_center">
  951. <view style="position: absolute">
  952. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" v-model="secondAddWaterTime"></u-input>
  953. </view>
  954. </view>
  955. <view class="control_item_center_unit" :style="unitFixedStyle">s</view>
  956. <view class="control_item_right" style="left: 80%;" @click="addErqibushui(1)">+</view>
  957. </view>
  958. <view class="control_item_title">
  959. 二煎补水时间
  960. </view>
  961. </view>
  962. <!-- <view class="control_item" style="width: 100%" v-if="!editSecondAddWaterTime" >-->
  963. <!-- <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>-->
  964. <!-- <view class="control_item_detail">-->
  965. <!-- <view class="control_item_left" @click="subErqibushui(1)" style="left: 18%;">-</view>-->
  966. <!-- <view class="control_item_center">-->
  967. <!-- <view style="position: absolute">-->
  968. <!-- <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" v-model="currentSecondAddWaterTime"></u-input>-->
  969. <!-- </view>-->
  970. <!-- </view>-->
  971. <!-- <view class="control_item_center_unit" :style="unitFixedStyle">s</view>-->
  972. <!-- <view class="control_item_right" style="left: 80%;" @click="addErqibushui(1)">+</view>-->
  973. <!-- </view>-->
  974. <!-- <view class="control_item_title">-->
  975. <!-- 二煎补水剩余时间-->
  976. <!-- </view>-->
  977. <!-- </view>-->
  978. </view>
  979. </u-popup>
  980. <!-- 预约框-->
  981. <u-popup :show="yuyueIngPop" @close="closeYuyueIngPop" mode="center" :closeable="true" :round="10">
  982. <view style="position: relative;width: 400rpx;background: none;;padding:30rpx;padding-top:60rpx;">
  983. <view class="control_item" style="width: 100%">
  984. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  985. <view class="control_item_detail">
  986. <view class="control_item_center">
  987. <u-input customStyle="width:150rpx;border:0px;padding:0px" disabledColor="white" :value="leftAppointmentTime"></u-input>
  988. </view>
  989. <view class="control_item_center_unit" :style="unitFixedStyle">℃</view>
  990. </view>
  991. <view class="control_item_title">
  992. 剩余时间
  993. </view>
  994. </view>
  995. <view>
  996. <button style="background: white;" @click="cancelPlan">取消</button>
  997. </view>
  998. </view>
  999. </u-popup>
  1000. <u-popup :show="planIngPopDlg" @close="closePlanIngPop" mode="center" :closeable="true" :round="10">
  1001. <view style="position: relative;width: 400rpx;background: none;padding:40rpx;">
  1002. <view class="control_item" style="width: 100%">
  1003. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  1004. <view class="control_item_detail" style="width: 100%; padding: 40rpx;margin-bottom:10rpx;">
  1005. <u-line-progress :percentage="step" activeColor="#50ACFF"></u-line-progress>
  1006. </view>
  1007. <view class="control_item_title" v-if="leftAppointmentTime>0">
  1008. 预约煎药中,倒计时{{leftAppointmentTime}}分钟
  1009. </view>
  1010. <view class="control_item_title" v-else>
  1011. <view v-if="leftJianyaoTime>0">
  1012. 正在熬制,请稍等
  1013. </view>
  1014. <view v-else>
  1015. 煎药完成
  1016. </view>
  1017. </view>
  1018. </view>
  1019. <view class="control_item" style="width: 100%">
  1020. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  1021. <view class="control_item_detail">
  1022. <view class="control_item_center">
  1023. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" :value="currentTemperature"></u-input>
  1024. </view>
  1025. <view class="control_item_center_unit" :style="unitFixedStyle">℃</view>
  1026. </view>
  1027. <view class="control_item_title">
  1028. 当前温度
  1029. </view>
  1030. </view>
  1031. <view class="control_item" style="width: 100%">
  1032. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  1033. <view class="control_item_detail">
  1034. <view class="control_item_center">
  1035. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" :value="leftJianyaoTime"></u-input>
  1036. </view>
  1037. <view class="control_item_center_unit" :style="unitFixedStyle">min</view>
  1038. </view>
  1039. <view class="control_item_title">
  1040. 文火倒计时
  1041. </view>
  1042. </view>
  1043. <!-- <view>-->
  1044. <!-- <button style="background: white;" @click="cancelPlan">暂停</button>-->
  1045. <!-- </view>-->
  1046. </view>
  1047. </u-popup>
  1048. <uni-drawer ref="showLeft" :width="320" :maskClick="true" mode="right" @change="change($event,'showLeft')">
  1049. <scroll-view style="height: 88%;padding:20% 0%;" scroll-y="true">
  1050. <view style="text-align:center">设置</view>
  1051. <view>
  1052. <!-- <view class="prop-item">-->
  1053. <!-- <view class="prop-item-image">-->
  1054. <!-- <image :src="imgUrl+'/setting/net.png'" style="width: 100%;height:100%;"/>-->
  1055. <!-- </view>-->
  1056. <!-- <view class="prop-item-left">网络连接</view>-->
  1057. <!-- <view class="prop-item-right">-->
  1058. <!-- <view v-if="deviceInfo.status == 3">-->
  1059. <!-- 已连接-->
  1060. <!-- </view>-->
  1061. <!-- <view v-else>-->
  1062. <!-- 未连接-->
  1063. <!--&lt;!&ndash; <uni-icons type="forward" size="16"></uni-icons>&ndash;&gt;-->
  1064. <!-- </view>-->
  1065. <!-- </view>-->
  1066. <!-- </view>-->
  1067. <view class="prop-item" @click="showJiaozhunProp" v-if="firstTab">
  1068. <view class="prop-item-image">
  1069. <image :src="imgUrl+'/setting/oper_temp.png'" style="width: 100%;height:100%;"/>
  1070. </view>
  1071. <view class="prop-item-left">温度校准</view>
  1072. <view class="prop-item-right" >
  1073. {{jiaozhunTemp}}℃<uni-icons type="forward" size="16"></uni-icons>
  1074. </view>
  1075. </view>
  1076. <view class="prop-item" @click="toPlan" v-if="firstTab">
  1077. <view class="prop-item-image" style="width: 60rpx;
  1078. height: 60rpx;
  1079. bottom: 22rpx;
  1080. left: 26rpx;
  1081. }">
  1082. <image :src="imgUrl+'/setting/plan_oper.png?1'" style="width: 100%;height:100%;"/>
  1083. </view>
  1084. <view class="prop-item-left">预约</view>
  1085. <view class="prop-item-right" >
  1086. <uni-icons type="forward" size="16"></uni-icons>
  1087. </view>
  1088. </view>
  1089. <view class="prop-item" v-if="firstTab && boardType == 5">
  1090. <view class="prop-item-image">
  1091. <image :src="imgUrl+'/setting/current_icon6.png'" style="width: 100%;height:100%;"/>
  1092. </view>
  1093. <view class="prop-item-left">当前扭力</view>
  1094. <view class="prop-item-right" >
  1095. {{validCurrent}}
  1096. </view>
  1097. </view>
  1098. <view class="prop-item" @click="showLiuProp" v-if="firstTab && boardType == 5">
  1099. <view class="prop-item-image">
  1100. <image :src="imgUrl+'/setting/current_icon5.png'" style="width: 100%;height:100%;"/>
  1101. </view>
  1102. <view class="prop-item-left">扭力设置</view>
  1103. <view class="prop-item-right" >
  1104. {{turnCurrent}}<uni-icons type="forward" size="16"></uni-icons>
  1105. </view>
  1106. </view>
  1107. <view class="prop-item" @click="showWorkPicker" v-if="firstTab">
  1108. <view class="prop-item-image">
  1109. <image :src="imgUrl+'/setting/list.png'" style="width: 100%;height:100%;"/>
  1110. </view>
  1111. <view class="prop-item-left">工作模式</view>
  1112. <view class="prop-item-right" >
  1113. <view v-if="workMode == 1">
  1114. 1<uni-icons type="forward" size="16"></uni-icons>
  1115. </view>
  1116. <view v-if="workMode == 2">
  1117. 2<uni-icons type="forward" size="16"></uni-icons>
  1118. </view>
  1119. <view v-if="workMode == 3">
  1120. 3<uni-icons type="forward" size="16"></uni-icons>
  1121. </view>
  1122. </view>
  1123. </view>
  1124. <view class="prop-item">
  1125. <view class="prop-item-image">
  1126. <image :src="imgUrl+'/setting/no.png'" style="width: 100%;height:100%;"/>
  1127. </view>
  1128. <view class="prop-item-left">二维码编号</view>
  1129. <view class="prop-item-right">
  1130. <text class="text-right">{{deviceInfo.qrcodeId==null?"未绑定":deviceInfo.qrcodeId}}</text>
  1131. </view>
  1132. </view>
  1133. <view class="prop-item">
  1134. <view class="prop-item-image">
  1135. <image :src="imgUrl+'/setting/no.png'" style="width: 100%;height:100%;"/>
  1136. </view>
  1137. <view class="prop-item-left">设备编号</view>
  1138. <view class="prop-item-right">
  1139. <text class="text-right">{{deviceInfo.serialNumber}}</text>
  1140. </view>
  1141. </view>
  1142. <view class="prop-item" @click="skip(1)">
  1143. <view class="prop-item-image">
  1144. <image :src="imgUrl+'/setting/learn.png'" style="width: 100%;height:100%;"/>
  1145. </view>
  1146. <view class="prop-item-left">使用教程</view>
  1147. <view class="prop-item-right" >
  1148. <uni-icons type="forward" size="16"></uni-icons>
  1149. </view>
  1150. </view>
  1151. <view class="prop-item" @click="skip(1)">
  1152. <view class="prop-item-image">
  1153. <image :src="imgUrl+'/setting/video.png'" style="width: 100%;height:100%;"/>
  1154. </view>
  1155. <view class="prop-item-left">维修视频</view>
  1156. <view class="prop-item-right" >
  1157. <uni-icons type="forward" size="16"></uni-icons>
  1158. </view>
  1159. </view>
  1160. <view class="prop-item" @click="getUpdateInfo">
  1161. <view class="prop-item-image">
  1162. <image :src="imgUrl+'/setting/upload.png'" style="width: 100%;height:100%;"/>
  1163. </view>
  1164. <view class="prop-item-left">在线升级</view>
  1165. <view class="prop-item-right" >
  1166. <uni-icons type="forward" size="16"></uni-icons>
  1167. </view>
  1168. </view>
  1169. <view class="prop-item" @click="skip(2)">
  1170. <view class="prop-item-image">
  1171. <image :src="imgUrl+'/setting/shou.png'" style="width: 100%;height:100%;"/>
  1172. </view>
  1173. <view class="prop-item-left">售后服务</view>
  1174. <view class="prop-item-right" >
  1175. <uni-icons type="forward" size="16"></uni-icons>
  1176. </view>
  1177. </view>
  1178. <view class="prop-item" @click="reset">
  1179. <view class="prop-item-image">
  1180. <image :src="imgUrl+'/setting/reset.png'" style="width: 100%;height:100%;"/>
  1181. </view>
  1182. <view class="prop-item-left">恢复出厂</view>
  1183. <view class="prop-item-right" >
  1184. <uni-icons type="forward" size="16"></uni-icons>
  1185. </view>
  1186. </view>
  1187. <view class="prop-item" @click="modifyName">
  1188. <view class="prop-item-image">
  1189. <image :src="imgUrl+'/setting/runinfo.png'" style="width: 100%;height:100%;"/>
  1190. </view>
  1191. <view class="prop-item-left">修改名称</view>
  1192. <view class="prop-item-right" >
  1193. <uni-icons type="forward" size="16"></uni-icons>
  1194. </view>
  1195. </view>
  1196. </view>
  1197. </scroll-view>
  1198. </uni-drawer>
  1199. <u-popup :show="jiaozhunPopDlg" @close="closejiaozhunPop" mode="center" :closeable="true" :round="10">
  1200. <view style="position: relative;width: 400rpx;background: none;padding:30rpx;padding-top:60rpx;">
  1201. <view class="control_item" style="width: 100%">
  1202. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  1203. <view class="control_item_detail">
  1204. <view class="control_item_left" @click="subJiaoZhunTemperature(1)" style="left: 18%;">-</view>
  1205. <view class="control_item_center">
  1206. <view style="position: absolute">
  1207. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" v-model="jiaozhunTemp_temp"></u-input>
  1208. </view>
  1209. </view>
  1210. <view class="control_item_center_unit" :style="unitFixedStyle">℃</view>
  1211. <view class="control_item_right" @click="addJiaoZhunTemperature(1)" style="left: 80%;">+</view>
  1212. </view>
  1213. <view class="control_item_title">
  1214. 校准温度
  1215. </view>
  1216. </view>
  1217. <view>
  1218. <button style="background: white;" @click="confirmJiaozhunTemp">确认</button>
  1219. </view>
  1220. </view>
  1221. </u-popup>
  1222. <u-popup :show="deviceYuyueIngPop" @close="closeDeviceYuyueIngPop" mode="center" :closeable="true" :round="10">
  1223. <view style="position: relative;width: 400rpx;background: none;padding:30rpx;padding-top:60rpx;">
  1224. <view class="control_item" style="width: 100%">
  1225. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  1226. <view class="control_item_detail">
  1227. <view class="control_item_center">
  1228. <u-input customStyle="width:150rpx;border:0px;padding:0px" disabledColor="white" :value="devicePlanInfo.minute"></u-input>
  1229. </view>
  1230. <view class="control_item_center_unit" :style="unitFixedStyle">分</view>
  1231. </view>
  1232. <view class="control_item_title">
  1233. 剩余时间
  1234. </view>
  1235. </view>
  1236. <view>
  1237. <button style="background: white;" @click="cancelDevicePlan">取消</button>
  1238. </view>
  1239. </view>
  1240. </u-popup>
  1241. <u-popup :show="devicePlanPopDlg" @close="closeDevicePlanPop" mode="center" :closeable="true" :round="10">
  1242. <view style="position: relative;width: 400rpx;background: none;padding:30rpx;padding-top:60rpx;">
  1243. <view class="control_item" style="width: 100%">
  1244. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  1245. <view class="control_item_detail">
  1246. <view class="control_item_left" @click="subDevicePlanTime(1)" style="left: 18%;">-</view>
  1247. <view class="control_item_center">
  1248. <view style="position: absolute">
  1249. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" v-model="devicePlanTime"></u-input>
  1250. </view>
  1251. </view>
  1252. <view class="control_item_center_unit" :style="unitFixedStyle">min</view>
  1253. <view class="control_item_right" style="left: 80%;" @click="addDevicePlanTime(1)">+</view>
  1254. </view>
  1255. <view class="control_item_title">
  1256. 预约时间
  1257. </view>
  1258. </view>
  1259. <view>
  1260. <button style="background: white;" @click="devicePlan">确认</button>
  1261. </view>
  1262. </view>
  1263. </u-popup>
  1264. <u-popup :show="liuzhuanPopDlg" @close="closeliuzhuanPop" mode="center" :closeable="true" :round="10">
  1265. <view style="position: relative;width: 400rpx;background: none;padding:30rpx;padding-top:60rpx;">
  1266. <view class="control_item" style="width: 100%">
  1267. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  1268. <view class="control_item_detail">
  1269. <view class="control_item_center">
  1270. <view style="position: absolute">
  1271. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" v-model="setTurnCurrent"></u-input>
  1272. </view>
  1273. </view>
  1274. <view class="control_item_center_unit" :style="unitFixedStyle">MA</view>
  1275. </view>
  1276. <view class="control_item_title">
  1277. 扭力
  1278. </view>
  1279. </view>
  1280. <view>
  1281. <button style="background: white;" @click="confirmLiuzhuannCurrent">确认</button>
  1282. </view>
  1283. </view>
  1284. </u-popup>
  1285. <u-popup :show="baowenPopDlg" @close="closeBaowenPopDlg" mode="center" :closeable="true" :round="10">
  1286. <view style="position: relative;width: 400rpx;background: none;padding:30rpx;padding-top:60rpx;">
  1287. <view class="control_item" style="width: 100%">
  1288. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  1289. <view class="control_item_detail">
  1290. <view class="control_item_left" @click="subBaowenTime(1)" style="left: 18%;">-</view>
  1291. <view class="control_item_center">
  1292. <view style="position: absolute">
  1293. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" v-model="baowenTime"></u-input>
  1294. </view>
  1295. </view>
  1296. <view class="control_item_center_unit" :style="unitFixedStyle">min</view>
  1297. <view class="control_item_right" style="left: 80%;" @click="addBaowenTime(1)">+</view>
  1298. </view>
  1299. <view class="control_item_title">
  1300. 保温时间
  1301. </view>
  1302. </view>
  1303. <view class="control_item" style="width: 100%">
  1304. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  1305. <view class="control_item_detail">
  1306. <view class="control_item_left" @click="subBaowenTemp(1)" style="left: 18%;">-</view>
  1307. <view class="control_item_center">
  1308. <view style="position: absolute">
  1309. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" v-model="baowenTemp"></u-input>
  1310. </view>
  1311. </view>
  1312. <view class="control_item_center_unit" :style="unitFixedStyle">℃</view>
  1313. <view class="control_item_right" style="left: 80%;" @click="addBaowenTemp(1)">+</view>
  1314. </view>
  1315. <view class="control_item_title">
  1316. 保温温度
  1317. </view>
  1318. </view>
  1319. <view>
  1320. <button style="background: white;" @click="doBaowenSeting" v-if="!hasBaowen">确认添加</button>
  1321. <button style="background: white;" @click="delBaowenSetting" v-if="hasBaowen">取消保温</button>
  1322. </view>
  1323. </view>
  1324. </u-popup>
  1325. <u-picker :show="showModelPicker" @cancel="closeModelPicker" @confirm="confirmMode" :columns="modeList" keyName="text"></u-picker>
  1326. <u-picker :show="showYaofangPicker" @cancel="closeYaofangPicker" @confirm="confirmYaofang" :columns="yaofangList" keyName="text"></u-picker>
  1327. </view>
  1328. </template>
  1329. <script>
  1330. import { getDetail,getDeviceStatus,cacheJsonThingsModel,reportError ,getDeviceRunTime,getLatestFirmware,bingDeviceDept,editDeviceName,getDevicePlan,addDevicePlan,delDevicePlan,saveBaowenSetting,getBaoWen,editBaowenSetting,cancelBaowen} from '@/api/device/device.js'
  1331. import config from '@/config'
  1332. import UPicker from "../../uni_modules/uview-ui/components/u-picker/u-picker";
  1333. import UImage from "../../uni_modules/uview-ui/components/u--image/u--image";
  1334. import UText from "../../uni_modules/uview-ui/components/u-text/u-text";
  1335. export default {
  1336. components: {UText, UImage, UPicker},
  1337. data(){
  1338. return {
  1339. SecondTime:0,
  1340. FirstTemp:0,
  1341. FirstTime:0,
  1342. lineProgreeStyle:"width:0%;background:#50ACFF;height: 100%;",
  1343. liuzhuanPopDlg:false,
  1344. turnPercent:1,
  1345. onlineStatus:false,
  1346. modeList:[[
  1347. {id:1,text:"1"},
  1348. {id:2,text:"2"},
  1349. {id:3,text:"3"},
  1350. ]],
  1351. yaofangList:[[
  1352. {id:0,text:"一般药方"},
  1353. {id:1,text:"解表药方"},
  1354. {id:2,text:"滋补药方"},
  1355. ]],
  1356. productSize:"",
  1357. productImage:"",
  1358. showModelPicker:false,
  1359. showYaofangPicker:false,
  1360. unitFixedStyle:"",
  1361. unitFixedStyle1:"",
  1362. planTime:0,
  1363. setSealingTemperature:160,
  1364. setEdegTemperature:160,
  1365. sealingTemperature:0,
  1366. edegTemperature:0,
  1367. hightTemperature:0,
  1368. currentTemperature:0,
  1369. temperatureTime:1,
  1370. temperature:0,
  1371. packageNumber:1,
  1372. packageVolume:50,
  1373. firstTab:true,
  1374. decoctControlStatus:false,
  1375. decoctControlOnOffStatus:false,
  1376. packageControlOnOffStatus:false,
  1377. subDecoctTabList:[
  1378. {name:'子煎药1'},
  1379. {name:'子煎药2'},
  1380. {name:'子煎药3'},
  1381. ],
  1382. DecoctControlStatus:false,
  1383. PackagControlStatus:false,
  1384. baozhuangTurn:false,
  1385. qitingTurn:false,
  1386. qingxiTurn:false,
  1387. subCurrent:0,
  1388. current:0,
  1389. inputStyle:{height:'44rpx','fontSize':'20rpx'},
  1390. modelKey:['PowerControl','LockControl'],
  1391. jianyaoKeys : ["SecondTime","TempSetting","TimeSetting","WaterVolume","SecondWaterVolume","AppointmentTime","TimeSetFirst","TimeSetSecond","SecondAddWaterTime","TempSetFirst","FirstTemp","FirstTime"],
  1392. baozhuangKeys:["SetSealTemp","SetBandingTemp","PackageQuantity","PackingVolume"],
  1393. power:{
  1394. loading:true,
  1395. value:0,
  1396. },
  1397. lock:{
  1398. loading:true,
  1399. value:0,
  1400. },
  1401. showTimeDlg:false,
  1402. showErrDlg:null,
  1403. errorMsg:"asdasdasdasd",
  1404. show:null,
  1405. value:"",
  1406. deviceInfo:{},
  1407. id:0,
  1408. summary:[
  1409. ],
  1410. tabs:[
  1411. {tabName:"煎药控制"},
  1412. {tabName:"包装控制"},
  1413. ],
  1414. activeName:0,
  1415. childId:0,
  1416. oneToMul:false,
  1417. inputProp:[],
  1418. watchProp:[],
  1419. columns:[],
  1420. location:{},
  1421. sysDept:null,
  1422. timeobj:{alltime:0,avgtime:0},
  1423. publishMsg:false,
  1424. checkTimer:null,
  1425. functions:[],
  1426. properties:[],
  1427. propMap:{},
  1428. jianyaoTimer:null,
  1429. baozhuangTimer:null,
  1430. editing:false,
  1431. workMode:2,
  1432. leftAppointmentTime:0,
  1433. leftJianyaoTime:0,
  1434. planEditTime:false,
  1435. editWaterVolume:false,
  1436. timeSettingFirst:0,
  1437. currentTimeSettingFirst:0,
  1438. timeSettingSecond:0,
  1439. currentTimeSettingSecond:0,
  1440. editTimeSettingFirst:false,
  1441. editTimeSettingSecond:false,
  1442. secondAddWaterTime:0,
  1443. editSecondAddWaterTime:false,
  1444. editSecondAddWaterTimeTimer:null,
  1445. currentSecondAddWaterTime:0,
  1446. imgUrl:"",
  1447. popDlg:false,
  1448. fengbianDlgShow:true,
  1449. fengkouDlgShow:false,
  1450. wenhuoTimeDlgShow:false,
  1451. planPopDlg:false,
  1452. erqibushuiDlg:false,
  1453. planIngPopDlg:false,
  1454. maxWidth:320,
  1455. jiaozhunTemp:0,//校准温度,
  1456. jiaozhunTemp_temp:0,//校准温度,
  1457. jiaozhunPopDlg:false,
  1458. step:0,
  1459. yuyueIngPop:false,
  1460. firmware:{},
  1461. jianyaoPopClose:true,
  1462. tabIndex:1,
  1463. appid:"wxfd7b1a0e03e9b7e9",
  1464. firstMachine:true,
  1465. secondMachine:false,
  1466. thirdMachine:false,
  1467. forthMachine:true,
  1468. deviceType:1,
  1469. tabActive:[true,false,false],
  1470. resetDuration:4000,
  1471. jianyaoWenduSetting:false,
  1472. jianyaoShijianSetting:false,
  1473. baozhuangFengbianSetting:false,
  1474. baozhuangFengkouSetting:false,
  1475. baozhuangRongLiangSetting:false,
  1476. baozhuangShuLIangSetting:false,
  1477. tempFengkouWendu:0,
  1478. tempFengBianWendu:0,
  1479. boardType:6,//板子类型
  1480. lineTimer:null,
  1481. validCurrent:0,//当前扭力
  1482. turnCurrent:0,//堵转电流值
  1483. setTurnCurrent:0,
  1484. pressTurn:0,
  1485. resetTurn:0,
  1486. drainageTurn:0,
  1487. canGetPrsValue:false,//可以接收挤压的动画
  1488. devicePlanInfo: {},//设备后台预约任务
  1489. devicePlanPopDlg:false,
  1490. deviceYuyueIngPop:false,
  1491. baowenPopDlg:false,
  1492. devicePlanTime:10,
  1493. boardStyle:"",
  1494. baowenTime:10,
  1495. baowenTemp:100,
  1496. hasBaowen:false,
  1497. baowenId:0,
  1498. jiashuiTurn:false,
  1499. baowenTurn:false,
  1500. waterVolume:5,
  1501. secondWaterVolume:5,
  1502. currentWaterVolume:0,
  1503. baowenSettingMode:false,
  1504. baowenSettingTimer:null,
  1505. baowenSettingSendTimer:null,
  1506. wenwuhuoTurn:false,
  1507. wenduSetting:false,
  1508. wenduSettingTimer:null,
  1509. planTimeSettingTimer:null,
  1510. waterVolumeSettingTimer:null,
  1511. timeSettingFirstSettingTimer:null,
  1512. timeSettingSecondSettingTimer:null,
  1513. workText:"·在线",
  1514. isH5:false,
  1515. jianyaoMode:0,
  1516. yaofang:{
  1517. type:0,
  1518. name:"一般药方"
  1519. },
  1520. closeStatusPop:false,
  1521. closeFinishStatusPop:false,
  1522. zhuanyiyaoyePop:false,
  1523. statusHandler:{
  1524. type:0,
  1525. title:"",
  1526. desc:[],
  1527. pause:false
  1528. },
  1529. firstJianyaoMode:0,
  1530. secondJianyaoMode:0,
  1531. leftTransferTime:30,
  1532. pauseStatus:0,
  1533. tempSettingFirst:0,//先煎时间
  1534. currentTempSettingFirst:0,
  1535. editTempSettingFirst:false,
  1536. tempSettingFirstTimer:null
  1537. }
  1538. },
  1539. onLoad: function(opt) {
  1540. this.id = opt.id;
  1541. // this.id = 61;
  1542. this.connectMqtt();
  1543. this.getDetail();
  1544. this.imgUrl = config.imgUrl
  1545. this.fixStyle();
  1546. this.setSystemInfo();
  1547. // this.fixImage();
  1548. // console.log = function(){}
  1549. },
  1550. destroyed() {
  1551. // 取消订阅主题
  1552. this.mqttUnSubscribe(this.deviceInfo);
  1553. clearTimeout(this.checkTimer);
  1554. },
  1555. watch: {
  1556. turnPercent(newvalue){
  1557. // this.lineProgreeStyle = ""
  1558. this.lineProgreeStyle = "width:"+newvalue+"%;background:#50ACFF;height: 100%;";
  1559. },
  1560. pressTurn(newVal,oldValue) {
  1561. // this.pressTurnChangeEvent(newVal);
  1562. },
  1563. resetTurn(newVal){
  1564. // this.resetTurnChnageEvent(newVal);
  1565. },
  1566. decoctControlStatus(newVal,oldValue){
  1567. console.log(newVal+",煎药");
  1568. this.setStatusText();
  1569. },
  1570. currentTemperature(newVal){
  1571. console.log(newVal+",当前温度");
  1572. this.setStatusText();
  1573. },
  1574. temperature(newVal){
  1575. console.log(newVal+",实时温度");
  1576. this.setStatusText();
  1577. }
  1578. },
  1579. methods:{
  1580. closeFinishPop(){
  1581. this.closeFinishStatusPop = false
  1582. let arr = [];
  1583. let obj = {};
  1584. obj.id = "DecoctingSwitch";
  1585. obj.shadow = 0;
  1586. this.decoctControlStatus = false;
  1587. arr.push(obj);
  1588. this.mqttPublish(2,this.deviceInfo,arr,true)
  1589. },
  1590. closeStatusFunc(){
  1591. this.closeStatusPop = false;
  1592. },
  1593. doStatusHandler(){
  1594. let mode = this.jianyaoMode;
  1595. let title = "";
  1596. let desc = []
  1597. let type = 0;
  1598. let isFisish = false
  1599. let noStart = false;
  1600. if(mode == 0) {//煎药一模式
  1601. type = this.firstJianyaoMode
  1602. if(this.firstJianyaoMode == 0){
  1603. noStart = true;
  1604. }
  1605. if(this.firstJianyaoMode == 1){
  1606. title = "加水中";
  1607. desc = ['加水中!']
  1608. }
  1609. if(this.firstJianyaoMode == 2){
  1610. title = "煎药预约";
  1611. desc = ['预约恒温40℃泡药中!']
  1612. }
  1613. this.planEditTime = false;
  1614. if(this.firstJianyaoMode ==3){
  1615. title = "先煎中";
  1616. desc = ['先煎运行中','请打开压力表下方排气阀!']
  1617. }
  1618. if(this.firstJianyaoMode ==4){
  1619. title = "先煎完成";
  1620. desc = ['先煎完成,请放入后下的药','材,关闭排气阀后启动煎药']
  1621. }
  1622. if(this.firstJianyaoMode ==5){
  1623. title = "煎药中";
  1624. desc = ['精心熬制中,祝您早日康复!']
  1625. }
  1626. if(this.firstJianyaoMode ==6){
  1627. title = "后下中";
  1628. desc = ['后下运行中','请确保关闭排气阀']
  1629. }
  1630. if(this.firstJianyaoMode ==7){
  1631. title = "熬制完成";
  1632. isFisish = true;
  1633. }
  1634. }else if(mode == 1) {
  1635. type = this.secondJianyaoMode
  1636. if (this.secondJianyaoMode == 1) {
  1637. title = "一煎加水";
  1638. desc = ['加水中!']
  1639. }
  1640. if (this.secondJianyaoMode == 2) {
  1641. title = "煎药预约";
  1642. desc = ['预约恒温40℃泡药中!']
  1643. }
  1644. this.planEditTime = false;
  1645. if (this.secondJianyaoMode == 3) {
  1646. title = "先煎中";
  1647. desc = ['先煎运行中', '请打开压力表下方排气阀!']
  1648. }
  1649. if (this.secondJianyaoMode == 4) {
  1650. title = "先煎完成";
  1651. desc = ['先煎完成,请放入后下的药', '材,关闭排气阀后启动煎药']
  1652. }
  1653. if (this.secondJianyaoMode == 5) {
  1654. title = "后下中";
  1655. desc = ['后下运行中', '请确保关闭排气阀']
  1656. }
  1657. if (this.secondJianyaoMode == 7) {
  1658. title = "煎药中";
  1659. desc = ['一煎运行中', '精心熬制中,祝您早日康复!']
  1660. type = 5
  1661. }
  1662. if (this.secondJianyaoMode == 8) {
  1663. title = "煎药中";
  1664. type = 8
  1665. desc = ['精心熬制中,祝您早日康复!']
  1666. }
  1667. if (this.secondJianyaoMode == 9) {
  1668. title = "二煎补水";
  1669. desc = []
  1670. }
  1671. if (this.secondJianyaoMode == 10) {
  1672. title = "煎药中";
  1673. type = 5
  1674. desc = ['二煎运行中', '精心熬制中,祝您早日康复!']
  1675. }
  1676. if (this.secondJianyaoMode == 11) {
  1677. title = "熬制完成";
  1678. type = 7
  1679. desc = []
  1680. isFisish = true;
  1681. }
  1682. }
  1683. this.statusHandler = {
  1684. type: type,
  1685. title: title,
  1686. desc: desc,
  1687. pause: false
  1688. }
  1689. if(type == 8){
  1690. this.closeStatusPop = false
  1691. this.zhuanyiyaoyePop = true;
  1692. return;
  1693. }
  1694. if (isFisish) {
  1695. this.closeStatusPop = false;
  1696. this.closeFinishStatusPop = true;
  1697. return;
  1698. }
  1699. if(noStart){
  1700. this.closeStatusPop = false;
  1701. this.closeFinishStatusPop = false;
  1702. this.zhuanyiyaoyePop = false;
  1703. return;
  1704. }
  1705. if (title) {
  1706. this.closeStatusPop = true
  1707. }
  1708. },
  1709. setStatusHandler(){
  1710. let self = this;
  1711. setTimeout(()=>{
  1712. self.doStatusHandler()
  1713. },50);
  1714. },
  1715. setSystemInfo(){
  1716. const systemInfo = uni.getSystemInfoSync();
  1717. let uniPlatform = systemInfo.uniPlatform;
  1718. if(uniPlatform == 'web' || uniPlatform == 'h5'){
  1719. this.isH5 = true;
  1720. }else{
  1721. this.isH5 = false;
  1722. }
  1723. },
  1724. setStatusText(){
  1725. if(!this.jianyaoIng()){
  1726. this.workText = "·在线";
  1727. return;
  1728. }
  1729. if(this.currentTemperature>=this.temperature){
  1730. this.workText = "·文火煎药";
  1731. }else{
  1732. this.workText = "·武火煎药";
  1733. }
  1734. },
  1735. goBack(){
  1736. uni.navigateBack();
  1737. },
  1738. pressTurnChangeEvent(newVal){
  1739. },
  1740. resetTurnChnageEvent(newVal){
  1741. },
  1742. closeDeviceYuyueIngPop(){
  1743. this.deviceYuyueIngPop = false;
  1744. },
  1745. closeDevicePlanPop(){
  1746. this.devicePlanPopDlg = false;
  1747. },
  1748. devicePlan(){
  1749. let self = this;
  1750. if(this.devicePlanTime>600){
  1751. this.$modal.showToast('预约时间最大为600分钟')
  1752. return;
  1753. }
  1754. if(this.devicePlanTime == 0){
  1755. this.$modal.showToast('预约时间不能为空')
  1756. }else{
  1757. let child = this.childId;
  1758. let obj = {deviceNo:this.deviceInfo.serialNumber+"&&"+child,minute:this.devicePlanTime};
  1759. addDevicePlan(obj).then(res=>{
  1760. self.getDevicePlanInfo();
  1761. self.$modal.showToast('预约成功')
  1762. self.devicePlanPopDlg = false;
  1763. });
  1764. }
  1765. },
  1766. closeliuzhuanPop(){
  1767. this.liuzhuanPopDlg = false;
  1768. },
  1769. addBaowenTime(){
  1770. console.log("增加保温时间")
  1771. this.baowenTime++;
  1772. this.sendBaowenSetting();
  1773. },
  1774. subBaowenTime(){
  1775. console.log("减少保温时间")
  1776. this.baowenTime--;
  1777. if(this.baowenTime < 0){
  1778. this.baowenTime = 0;
  1779. }
  1780. this.sendBaowenSetting();
  1781. },
  1782. subBaowenTemp(){
  1783. this.baowenTemp--;
  1784. if(this.baowenTemp<0){
  1785. this.baowenTemp = 1;
  1786. }
  1787. console.log("减少保温温度")
  1788. this.sendBaowenSetting();
  1789. },
  1790. addBaowenTemp(){
  1791. console.log("增加保温温度")
  1792. this.baowenTemp++;
  1793. this.sendBaowenSetting();
  1794. },
  1795. closeBaowenPopDlg(){
  1796. this.baowenPopDlg = false;
  1797. },
  1798. sendBaowenSetting(){
  1799. this.resetBaowenTimer();
  1800. if(this.baowenSettingSendTimer){
  1801. clearTimeout(this.baowenSettingSendTimer);
  1802. }
  1803. let self = this;
  1804. this.baowenSettingSendTimer = setTimeout(function(){
  1805. self.doBaowenSeting();
  1806. },500)
  1807. },
  1808. //6号板子的保温功能
  1809. doBaowenSeting(){
  1810. let arr = [];
  1811. let pressObj = {};
  1812. pressObj.id = "HoldingTemp";
  1813. pressObj.shadow = this.baowenTemp;
  1814. let baowen = {};
  1815. baowen.id = "HoldingTime";
  1816. baowen.shadow = this.baowenTime;
  1817. arr.push(pressObj);
  1818. arr.push(baowen);
  1819. this.mqttPublish(2,this.deviceInfo,arr,true)
  1820. },
  1821. addBaowenSetting(){
  1822. let self = this;
  1823. let obj = {};
  1824. obj.baowenTemp = this.baowenTemp;
  1825. obj.baowenTime = this.baowenTime;
  1826. obj.childId = this.childId;
  1827. obj.productId = this.deviceInfo.productId;
  1828. obj.status = 0;
  1829. obj.deviceNo = this.deviceInfo.serialNumber;
  1830. saveBaowenSetting(obj).then(res=>{
  1831. let code = res.code;
  1832. if(code == 200){
  1833. self.$modal.showToast('添加成功')
  1834. this.closeBaowenPopDlg();
  1835. }else{
  1836. self.$modal.showToast('已经存在保温设置')
  1837. }
  1838. });
  1839. },
  1840. editBaowenSetting(){
  1841. let obj = {};
  1842. obj.baowenTemp = this.baowenTemp;
  1843. obj.baowenTime = this.baowenTime;
  1844. obj.childId = this.childId;
  1845. obj.productId = this.deviceInfo.productId;
  1846. obj.status = 0;
  1847. obj.id = this.baowenId;
  1848. obj.deviceNo = this.deviceInfo.serialNumber;
  1849. editBaowenSetting(obj).then(res=>{
  1850. this.closeBaowenPopDlg();
  1851. });
  1852. },
  1853. delBaowenSetting(){
  1854. let obj = {};
  1855. obj.id = this.baowenId;
  1856. obj.status = 1;
  1857. editBaowenSetting(obj).then(res=>{
  1858. this.hasBaowen = false;
  1859. this.baowenId = 0;
  1860. this.closeBaowenPopDlg();
  1861. });
  1862. },
  1863. confirmLiuzhuannCurrent(){
  1864. if(this.setTurnCurrent<200 || this.setTurnCurrent>400){
  1865. this.notifyError("扭力范围为200-400")
  1866. return;
  1867. }
  1868. let arr = [];
  1869. let pressObj = {};
  1870. pressObj.id = "TurnCurrent";
  1871. pressObj.shadow = this.setTurnCurrent;
  1872. arr.push(pressObj);
  1873. this.mqttPublish(2,this.deviceInfo,arr)
  1874. this.closeliuzhuanPop();
  1875. },
  1876. setPressTurn(){
  1877. let self = this;
  1878. let arr = [];
  1879. let currentPresturn = this.pressTurn;
  1880. let pressObj = {};
  1881. if(this.resetTurn == 1){
  1882. this.resetTurn = 0;
  1883. }
  1884. if(currentPresturn == 1){//代表要关闭
  1885. pressObj.id = "PressTurn";
  1886. pressObj.shadow = 0;
  1887. arr.push(pressObj);
  1888. this.turnPercent = 0;
  1889. this.pressTurn = 0;
  1890. }else{//代表要开启
  1891. pressObj.id = "PressTurn";
  1892. pressObj.shadow = 1;
  1893. arr.push(pressObj);
  1894. this.pressTurn = 1;
  1895. this.resetTurn = 0;
  1896. }
  1897. let resetObj = {}
  1898. resetObj.id = "ResetTurn";
  1899. resetObj.shadow = 0;
  1900. arr.push(resetObj);
  1901. this.mqttPublish(2,this.deviceInfo,arr,true);
  1902. },
  1903. startProgressTimer(type){
  1904. let self = this;
  1905. if(self.lineTimer != null){
  1906. clearInterval(self.lineTimer)
  1907. }
  1908. if(type == 1){
  1909. self.lineTimer = setInterval(function(){
  1910. if(self.turnPercent >=100){
  1911. self.turnPercent = 1;
  1912. clearInterval(self.lineTimer);
  1913. self.startProgressTimer(1);
  1914. }
  1915. self.turnPercent +=2;
  1916. },100);
  1917. }else{
  1918. self.lineTimer = setInterval(function(){
  1919. if(self.turnPercent >=100){
  1920. self.turnPercent = 1;
  1921. clearInterval(self.lineTimer);
  1922. self.startProgressTimer(2);
  1923. }
  1924. self.turnPercent +=2;
  1925. },100);
  1926. }
  1927. },
  1928. setResetTurn(){
  1929. let self = this;
  1930. if(this.pressTurn == 1){
  1931. this.pressTurn = 0;
  1932. }
  1933. let arr = [];
  1934. if(this.resetTurn == 1){
  1935. let resetObj = {};
  1936. resetObj.id = "ResetTurn";
  1937. resetObj.shadow = 0;
  1938. this.resetTurn = 0;
  1939. this.turnPercent = 0;
  1940. arr.push(resetObj);
  1941. }else{
  1942. let resetObj = {};
  1943. resetObj.id = "ResetTurn";
  1944. resetObj.shadow = 1;
  1945. this.resetTurn = 0;
  1946. this.turnPercent = 0;
  1947. arr.push(resetObj);
  1948. }
  1949. let pressObj = {};
  1950. pressObj.id = "PressTurn";
  1951. pressObj.shadow = 0;
  1952. arr.push(pressObj);
  1953. this.mqttPublish(2,this.deviceInfo,arr,true);
  1954. },
  1955. fixImage(heng){
  1956. let self = this;
  1957. wx.getSystemInfo({
  1958. success: res => {
  1959. const { windowWidth, windowHeight, statusBarHeight } = res;
  1960. if(heng){
  1961. let rate = 0.35;
  1962. if(windowHeight<800){
  1963. rate = 0.30;
  1964. }
  1965. let imgHeight = windowWidth*0.85;
  1966. let imageWidth = windowWidth * 1;
  1967. if(this.isH5){
  1968. imgHeight = windowWidth*0.6;
  1969. imageWidth = windowWidth * 0.8;
  1970. }
  1971. self.productSize = ";width:"+imageWidth+"px;height:"+imgHeight+"px;";
  1972. }else{
  1973. let rate = 0.42;
  1974. if(windowHeight<800){
  1975. rate = 0.30;
  1976. }
  1977. let imgHeight = windowHeight*rate;
  1978. let imageWidth = imgHeight * 0.6;
  1979. self.productSize = ";width:"+imageWidth+"px;height:"+imgHeight+"px;";
  1980. }
  1981. }
  1982. })
  1983. },
  1984. propChange(type){
  1985. // if(type == 1){
  1986. // }
  1987. },
  1988. propFocus(type){
  1989. if(type == 1){
  1990. this.jianyaoWenduSetting = true;
  1991. }
  1992. if(type == 2){
  1993. this.jianyaoShijianSetting = true;
  1994. }
  1995. if(type == 3){
  1996. this.baozhuangFengbianSetting = true;
  1997. this.tempFengBianWendu = this.edegTemperature;
  1998. this.edegTemperature = this.setEdegTemperature;
  1999. }
  2000. if(type == 4){
  2001. this.baozhuangFengkouSetting = true;
  2002. this.tempFengkouWendu = this.sealingTemperature;
  2003. this.sealingTemperature = this.setSealingTemperature;
  2004. }
  2005. if(type == 5){
  2006. this.baozhuangRongLiangSetting = true;
  2007. }
  2008. if(type == 6){
  2009. this.baozhuangShuLIangSetting = true;
  2010. }
  2011. },
  2012. autoBlur(type){
  2013. },
  2014. propBlur(type){
  2015. if(type == 1){
  2016. this.jianyaoWenduSetting = false;
  2017. this.changeTemperature();
  2018. }
  2019. if(type == 2){
  2020. this.temperatureTime = this.leftJianyaoTime;
  2021. this.changeTemperatureTime();
  2022. }
  2023. if(type == 3){
  2024. this.setEdegTemperature = this.edegTemperature;
  2025. this.changeEdegTemperature();
  2026. }
  2027. if(type == 4){
  2028. this.setSealingTemperature = this.sealingTemperature;
  2029. this.changeSealingTemperature();
  2030. }
  2031. if(type == 5){
  2032. this.changePackageVolume()
  2033. }
  2034. if(type == 6){
  2035. this.changePackageNumber();
  2036. }
  2037. if(type ==7){
  2038. this.sendWaterVolume();
  2039. }
  2040. if(type == 8){
  2041. this.sendPlanTime();
  2042. }
  2043. if(type == 9){
  2044. this.sendPlanTime(2);
  2045. }
  2046. if(type == 10){
  2047. this.sendBaowenSetting();
  2048. }
  2049. if(type == 11){
  2050. this.sendBaowenSetting();
  2051. }
  2052. if(type == 12){
  2053. this.changeSecondTime()
  2054. }
  2055. if(type == 13){
  2056. this.changeFirstTemperature();
  2057. }
  2058. if(type ==14){
  2059. this.changeTimeFirst();
  2060. }
  2061. if(type ==15){
  2062. this.changeTimeSecond();
  2063. }
  2064. },
  2065. modifyName(){
  2066. let self = this;
  2067. uni.showModal({
  2068. title: "修改设备名称",
  2069. editable: true,
  2070. placeholderText: "请输入设备名称",
  2071. content: this.deviceInfo.deviceName,
  2072. showCancel: true,
  2073. success: function (res) {
  2074. console.log(res);
  2075. if(res.confirm){
  2076. let content = res.content;
  2077. let obj = {"deviceId":self.id,deviceName:content};
  2078. editDeviceName(obj).then(res=>{
  2079. if(res.code == 200){
  2080. self.deviceInfo.deviceName = content;
  2081. self.$modal.showToast('修改成功')
  2082. }else{
  2083. self.$modal.showToast('修改失败,请稍后再试')
  2084. }
  2085. });
  2086. }
  2087. },
  2088. fail: function (res) {
  2089. console.log(res);
  2090. }
  2091. })
  2092. },
  2093. showWorkPicker(){
  2094. let self = this;
  2095. uni.showModal({
  2096. title: "提 示",
  2097. content: "非专业人员修改可能导致机器损坏",
  2098. confirmText:"确认",
  2099. success: function (res) {
  2100. if(res.confirm){
  2101. self.showModelPicker = true;
  2102. }
  2103. },
  2104. })
  2105. },
  2106. skip(type){
  2107. if(type == 1){
  2108. wx.navigateToMiniProgram({
  2109. appId: this.appid,
  2110. path: 'pages/news_details/help?id=25',
  2111. success(res) {
  2112. // 打开成功
  2113. },
  2114. fail(res){
  2115. console.log(res);
  2116. }
  2117. })
  2118. }else if(type == 2){
  2119. wx.openCustomerServiceChat({
  2120. extInfo: {url: 'https://work.weixin.qq.com/kfid/kfc4202b8764df71c0c'},
  2121. corpId: 'ww8e678fbe6f1079ba',
  2122. success(res) {
  2123. },
  2124. fail(res){
  2125. console.log(res);
  2126. }
  2127. })
  2128. }
  2129. },
  2130. isMulTab(index){
  2131. let type = this.deviceType;
  2132. if(this.secondMachine || this.secondMachine){
  2133. return true;
  2134. }
  2135. return false;
  2136. },
  2137. isPage(index){
  2138. if(this.tabIndex == index){
  2139. return true;
  2140. }
  2141. return false;
  2142. },
  2143. getUpdateInfo(){
  2144. let self = this;
  2145. getLatestFirmware(this.id).then(res=>{
  2146. self.firmware = res.data;
  2147. let curVersion = self.deviceInfo.firmwareVersion;
  2148. let onlineVersion = self.firmware.version
  2149. if(curVersion>=onlineVersion){
  2150. this.$modal.showToast('当前已经是最新版本')
  2151. }else{
  2152. uni.showModal({
  2153. title: '检测到新版本',
  2154. content: "当前版本:"+curVersion+",新版本:"+onlineVersion,
  2155. cancelText: '取消',
  2156. confirmText: '升级',
  2157. success: function(res) {
  2158. if (res.confirm) {
  2159. self.doUpdate();
  2160. }
  2161. }
  2162. })
  2163. }
  2164. });
  2165. },
  2166. doUpdate(){
  2167. if(this.deviceInfo.status != 3){
  2168. this.notifyError("请等待设备上线后操作")
  2169. return;
  2170. }
  2171. let device = this.deviceInfo;
  2172. let message = "";
  2173. let topic = "";
  2174. let title = "升级";
  2175. topic = "/" + device.productId + "/" + device.serialNumber + "/ota/get";
  2176. message = '{"version":"' + this.firmware.version + '","downloadUrl":"' + this.getDownloadUrl(this.firmware.filePath) + '","size":"'+this.firmware.size+'"}';
  2177. this.$mqttTool.publish(topic, message,title).then(res => {
  2178. this.notifySuccess(res);
  2179. }).catch(res => {
  2180. this.notifyError(res);
  2181. });
  2182. },
  2183. getStatusText(){
  2184. if(this.baozhuangRunning()){
  2185. return "工作中";
  2186. }
  2187. if(this.jianyaoIng()){
  2188. return "工作中";
  2189. }
  2190. if(this.leftAppointmentTime>0){
  2191. return "已预约";
  2192. }
  2193. return "空闲中";
  2194. },
  2195. closeYuyueIngPop(){
  2196. this.yuyueIngPop = false;
  2197. },
  2198. confirmMode(item){
  2199. console.log(item)
  2200. this.workMode = item.value[0].id;
  2201. this.setMode(this.workMode);
  2202. this.closeModelPicker();
  2203. },
  2204. closeModelPicker(){
  2205. this.showModelPicker = false;
  2206. },
  2207. confirmYaofang(item){
  2208. this.yaofang = {
  2209. type:item.value[0].id,
  2210. name:item.value[0].text
  2211. }
  2212. let arr = [];
  2213. let obj = {};
  2214. obj.id = "MedicineType";
  2215. obj.shadow = item.value[0].id;
  2216. arr.push(obj);
  2217. this.mqttPublish(2,this.deviceInfo,arr,true)
  2218. this.closeYaofangPicker();
  2219. },
  2220. closeYaofangPicker(){
  2221. this.showYaofangPicker = false;
  2222. },
  2223. confirmJiaozhunTemp(){
  2224. this.jiaozhunTemp = this.jiaozhunTemp_temp;
  2225. this.temperNumber();
  2226. this.closejiaozhunPop();
  2227. },
  2228. addJiaoZhunTemperature(){
  2229. this.jiaozhunTemp_temp ++;
  2230. if(this.jiaozhunTemp_temp>20){
  2231. this.jiaozhunTemp_temp = 20;
  2232. }
  2233. },
  2234. subJiaoZhunTemperature(){
  2235. this.jiaozhunTemp_temp --;
  2236. if(this.jiaozhunTemp_temp<-20){
  2237. this.jiaozhunTemp_temp = -20;
  2238. }
  2239. },
  2240. closejiaozhunPop(){
  2241. this.jiaozhunPopDlg = false;
  2242. },
  2243. showLiuProp(){
  2244. let self = this;
  2245. uni.showModal({
  2246. title: "提 示",
  2247. content: "非专业人员修改可能导致机器损坏",
  2248. confirmText:"确认",
  2249. success: function (res) {
  2250. if(res.confirm){
  2251. self.liuzhuanPopDlg = true;
  2252. }
  2253. },
  2254. })
  2255. },
  2256. showJiaozhunProp(){
  2257. let self = this;
  2258. uni.showModal({
  2259. title: "提 示",
  2260. content: "非专业人员修改可能导致机器损坏",
  2261. confirmText:"确认",
  2262. success: function (res) {
  2263. if(res.confirm){
  2264. self.jiaozhunTemp_temp = self.jiaozhunTemp;
  2265. self.jiaozhunPopDlg = true;
  2266. }
  2267. },
  2268. })
  2269. },
  2270. resetBaowenTimer(){
  2271. let self = this;
  2272. this.baowenSettingMode = true;
  2273. if(this.baowenSettingTimer != null){
  2274. clearTimeout(this.baowenSettingTimer)
  2275. }
  2276. this.baowenSettingTimer = setTimeout(function(){
  2277. self.baowenSettingMode = false;
  2278. },3000);
  2279. },
  2280. jinBaowenMode(){
  2281. let self = this;
  2282. if(!this.jianyaoOpen()){
  2283. this.notifyError("请先开机后再进行操作")
  2284. return;
  2285. }
  2286. if(this.jianyaoIng()){
  2287. this.$modal.showToast('必须在非煎药模式下才能设置')
  2288. return;
  2289. }
  2290. let arr = [];
  2291. let obj = {};
  2292. obj.id = "HoldingSwitch";
  2293. if(!this.baowenTurn){
  2294. obj.shadow = 1;
  2295. this.baowenTurn = true;
  2296. console.log("保温状态打开")
  2297. this.resetBaowenTimer();
  2298. }else{
  2299. this.baowenTurn = false;
  2300. obj.shadow = 0;
  2301. console.log("保温状态关闭")
  2302. }
  2303. arr.push(obj);
  2304. this.mqttPublish(2,this.deviceInfo,arr,true)
  2305. },
  2306. showBaowenProp(){
  2307. if(this.jianyaoIng()){
  2308. this.$modal.showToast('必须非煎药模式下才能设置')
  2309. return;
  2310. }
  2311. let obj = {};
  2312. obj.childId = this.childId;
  2313. obj.status =0;
  2314. obj.deviceNo = this.deviceInfo.serialNumber;
  2315. getBaoWen(obj).then(res=>{
  2316. let data = res.data;
  2317. if(data != null){
  2318. this.baowenTime = data.baowenTime;
  2319. this.baowenTemp = data.baowenTemp;
  2320. this.baowenId = data.id;
  2321. this.hasBaowen = true;
  2322. }else{
  2323. this.hasBaowen = false;
  2324. this.baowenId = 0;
  2325. }
  2326. this.baowenPopDlg = true;
  2327. });
  2328. },
  2329. fixStyle(){
  2330. let self = this;
  2331. wx.getSystemInfo({
  2332. success: res => {
  2333. const { windowWidth, windowHeight, statusBarHeight } = res;
  2334. // 在这里可以获取到屏幕的宽度和高度
  2335. console.log(windowWidth, windowHeight, statusBarHeight);
  2336. if(windowWidth<=350){
  2337. self.unitFixedStyle = ";padding-top:6px;left: 28vw;";
  2338. self.unitFixedStyle1 = ";padding-top:6px;left: 28vw;";
  2339. }else if(windowWidth>=360){
  2340. self.unitFixedStyle = ";padding-top:10rpx;";
  2341. self.unitFixedStyle1 = ";padding-top:10rpx;left: 32vw;";
  2342. }
  2343. self.maxWidth = windowWidth;
  2344. }
  2345. })
  2346. },
  2347. closePlanIngPop(){
  2348. this.jianyaoPopClose = false;
  2349. this.planIngPopDlg = false;
  2350. },
  2351. closePlanPop(){
  2352. this.planPopDlg = false;
  2353. },
  2354. closeErqibushuiPop(){
  2355. this.erqibushuiDlg = false;
  2356. },
  2357. showBaozhuangDlg(type){
  2358. this.popDlg = true;
  2359. if(type == 1){
  2360. this.fengbianDlgShow = true;
  2361. }else if(type == 2){
  2362. this.fengkouDlgShow = true;
  2363. }else if(type == 3){
  2364. this.wenhuoTimeDlgShow = true;
  2365. }
  2366. },
  2367. closePop(){
  2368. this.popDlg = false;
  2369. this.fengbianDlgShow = false;
  2370. this.fengkouDlgShow = false;
  2371. this.wenhuoTimeDlgShow = false;
  2372. },
  2373. changeTab(index,tag){
  2374. if(!tag){
  2375. return;
  2376. }
  2377. let type = this.deviceType;
  2378. let self = this;
  2379. if(index == 2 || index == 3){
  2380. if(!this.isMulTab(index)){
  2381. return;
  2382. }
  2383. }
  2384. this.resetChoose();
  2385. if(index == 4){
  2386. if(!this.forthMachine){
  2387. return;
  2388. }
  2389. uni.showLoading({title:"加载中"});
  2390. getDeviceStatus(this.id,0).then(res=>{
  2391. let data =res.data;
  2392. this.deviceInfo = data;
  2393. self.parseStatusData(data)
  2394. setTimeout(function () {
  2395. uni.hideLoading();
  2396. self.firstTab = false;
  2397. },100);
  2398. });
  2399. }else{
  2400. this.resetResetFunc();
  2401. let arr = ["a","b","c"]
  2402. if(this.isMulTab(index)){
  2403. this.childId =arr[index-1];
  2404. this.getDeviceStatus(function(){
  2405. self.tabIndex = index;
  2406. self.firstTab = true;
  2407. self.tabActive[index-1] = true;
  2408. self.$forceUpdate();
  2409. });
  2410. }else{
  2411. this.getDeviceStatus(function(){
  2412. self.tabIndex = index;
  2413. self.firstTab = true;
  2414. self.tabActive[index-1] = true;
  2415. self.$forceUpdate();
  2416. })
  2417. }
  2418. console.log(this.tabActive)
  2419. }
  2420. },
  2421. resetResetFunc(){
  2422. let self = this;
  2423. if(self.lineTimer != null){
  2424. clearInterval(self.lineTimer)
  2425. }
  2426. this.turnPercent = 0;
  2427. },
  2428. resetChoose(){
  2429. this.tabIndex = 0;
  2430. for (let i = 0; i < 3; i++) {
  2431. this.tabActive[i] = false;
  2432. }
  2433. },
  2434. changePackageVolume(){
  2435. if(this.packageVolume<50){
  2436. this.packageVolume = 50;
  2437. }
  2438. if(this.packageVolume>300){
  2439. this.packageVolume = 300;
  2440. }
  2441. this.sendBaozhuang("PackingVolume");
  2442. },
  2443. changePackageNumber(){
  2444. let min = 1;
  2445. let max = 999;
  2446. if(this.packageNumber<min){
  2447. this.packageNumber = min;
  2448. }
  2449. if(this.packageNumber>max){
  2450. this.packageNumber = max;
  2451. }
  2452. this.sendBaozhuang("PackageQuantity");
  2453. },
  2454. changeEdegTemperature(){
  2455. let min = 80;
  2456. let max = 220;
  2457. if(this.setEdegTemperature<min){
  2458. this.setEdegTemperature = min;
  2459. }
  2460. if(this.setEdegTemperature>max){
  2461. this.setEdegTemperature = max;
  2462. }
  2463. console.log("current setEdegTemperature is :"+this.setEdegTemperature)
  2464. this.sendBaozhuang("SetBandingTemp");
  2465. },
  2466. changeSealingTemperature(){
  2467. let min = 80;
  2468. let max = 220;
  2469. if(this.setSealingTemperature<min){
  2470. this.setSealingTemperature = min;
  2471. }
  2472. if(this.setSealingTemperature>max){
  2473. this.setSealingTemperature = max;
  2474. }
  2475. console.log("current setSealingTemperature is :"+this.setSealingTemperature)
  2476. this.sendBaozhuang("SetSealTemp");
  2477. },
  2478. changeTemperature(){
  2479. let max = 140;
  2480. let min = 100;
  2481. if(this.workMode == 2){
  2482. min = 1;
  2483. }
  2484. if(this.temperature<min){
  2485. this.temperature = min;
  2486. }
  2487. if(this.temperature>max){
  2488. this.temperature = max;
  2489. }
  2490. console.log("current temperature is :"+this.temperature)
  2491. this.sendJianYao("TempSetting");
  2492. },
  2493. changeTemperatureTime(){
  2494. let min = 1;
  2495. let max = 600;
  2496. if(this.temperatureTime<min){
  2497. this.temperatureTime = min;
  2498. }
  2499. if(this.temperatureTime>max){
  2500. this.temperatureTime = max;
  2501. }
  2502. console.log("current temperatureTime is :"+this.temperatureTime)
  2503. this.sendJianYao("TimeSetting");
  2504. },
  2505. jianyaoOpen(){
  2506. if(this.decoctControlOnOffStatus){
  2507. return true;
  2508. }
  2509. return false;
  2510. },
  2511. baozhuangOpen(){
  2512. if(this.packageControlOnOffStatus){
  2513. return true;
  2514. }
  2515. return false;
  2516. },
  2517. baozhuangRunning(){
  2518. if(this.qingxiTurn || this.baozhuangTurn || this.qitingTurn){
  2519. return true;
  2520. }
  2521. return false;
  2522. },
  2523. jianyaoIng(){
  2524. if(this.decoctControlStatus){
  2525. return true;
  2526. }
  2527. return false;
  2528. },
  2529. cancelPlan(){
  2530. let arr = [];
  2531. let obj = {};
  2532. obj.id = "AppointmentTime";
  2533. obj.shadow = 0;
  2534. arr.push(obj);
  2535. let self = this;
  2536. self.kongzhiJianyao(false,arr);
  2537. this.mqttPublish(2,this.deviceInfo,arr,true);
  2538. this.closeYuyueIngPop();
  2539. },
  2540. toPlan(){
  2541. if(!this.jianyaoOpen()){
  2542. this.$modal.showToast('煎药机已经关机')
  2543. return;
  2544. }
  2545. if(this.leftAppointmentTime>0){
  2546. this.yuyueIngPop = true;
  2547. }else{
  2548. if(this.jianyaoIng()){
  2549. this.$modal.showToast('正在煎药')
  2550. return;
  2551. }
  2552. this.planPopDlg = true;
  2553. }
  2554. },
  2555. toDevicePlan(){
  2556. let self = this;
  2557. if(this.decoctControlOnOffStatus){
  2558. this.$modal.showToast('请先关闭煎药后再预约')
  2559. return;
  2560. }
  2561. getDevicePlan(this.deviceInfo.serialNumber+"&&"+this.childId).then(res=>{
  2562. if(res.data != null){
  2563. self.deviceYuyueIngPop = true;
  2564. self.devicePlanInfo = res.data;
  2565. let minute = self.devicePlanInfo.minute;
  2566. if(minute<0){
  2567. minute = 10;
  2568. }
  2569. self.devicePlanInfo.minute = minute;
  2570. }else{
  2571. self.devicePlanPopDlg = true;
  2572. }
  2573. });
  2574. },
  2575. cancelDevicePlan(){
  2576. delDevicePlan(this.devicePlanInfo.id).then(res=>{
  2577. this.$modal.showToast('取消成功')
  2578. this.deviceYuyueIngPop = false;
  2579. this.devicePlanInfo = null;
  2580. })
  2581. },
  2582. getDevicePlanInfo(){
  2583. if(this.boardType != 4){
  2584. return;
  2585. }
  2586. let self = this;
  2587. self.devicePlanInfo = null;
  2588. getDevicePlan(this.deviceInfo.serialNumber+"&&"+self.childId).then(res=>{
  2589. if(res.data != null){
  2590. self.devicePlanInfo = res.data;
  2591. let minute = self.devicePlanInfo.minute;
  2592. if(minute<0){
  2593. minute = 10;
  2594. }
  2595. self.devicePlanInfo.minute = minute;
  2596. }
  2597. });
  2598. },
  2599. calcuStep(){
  2600. if(this.leftAppointmentTime>0){
  2601. this.step = 0;
  2602. return 0;
  2603. }
  2604. if(this.leftJianyaoTime == 0){
  2605. this.step = 100;
  2606. return ;
  2607. }
  2608. let currentTemperature = this.currentTemperature;
  2609. let hightTemperature = this.temperatureTime-this.leftJianyaoTime;//设置的高温时间
  2610. let targetTemperature =100;// this.temperature;
  2611. let targetTemperatureTime = this.temperatureTime;//倒计时
  2612. if(targetTemperature>100){
  2613. targetTemperature = 100;
  2614. }
  2615. let step = 0;
  2616. if(currentTemperature<100){
  2617. let tem = currentTemperature/200*100;
  2618. step = tem;
  2619. }else{
  2620. step = 50;
  2621. let rate = hightTemperature/targetTemperatureTime;
  2622. rate = rate/2;
  2623. rate = rate*100;
  2624. rate = rate.toFixed(2)
  2625. step = step + parseFloat(rate);
  2626. }
  2627. this.step = step.toFixed(2);
  2628. },
  2629. plan(){
  2630. let self = this;
  2631. if(this.planTime>600){
  2632. this.$modal.showToast('预约时间最大为600分钟')
  2633. return;
  2634. }
  2635. if(this.planTime == 0){
  2636. this.$modal.showToast('预约时间不能为空')
  2637. }else{
  2638. let arr = [];
  2639. let obj = {};
  2640. obj.id = "AppointmentTime";
  2641. obj.shadow = this.planTime;
  2642. arr.push(obj);
  2643. this.kongzhiJianyao(true,arr);
  2644. this.mqttPublish(2,this.deviceInfo,arr,true);
  2645. }
  2646. this.$modal.showToast('预约成功')
  2647. this.planPopDlg = false;
  2648. },
  2649. lockCtrl(key){
  2650. let arr = [];
  2651. let obj = {};
  2652. obj.id = "LockControl";
  2653. if(key == 0){
  2654. obj.shadow = 1;
  2655. this.lock.value = 1;
  2656. }else{
  2657. obj.shadow = 0;
  2658. this.lock.value = 0;
  2659. }
  2660. arr.push(obj);
  2661. this.mqttPublish(2,this.deviceInfo,arr)
  2662. },
  2663. setMode(type){
  2664. let arr = [];
  2665. let obj = {};
  2666. obj.id = "WorkMode";
  2667. obj.shadow = type;
  2668. arr.push(obj);
  2669. this.mqttPublish(2,this.deviceInfo,arr,true)
  2670. this.workMode = type;
  2671. },
  2672. temperNumber(value){
  2673. let arr = [];
  2674. let obj = {};
  2675. obj.id = "CalibrationTemp";
  2676. obj.shadow = this.jiaozhunTemp;
  2677. arr.push(obj);
  2678. this.mqttPublish(2,this.deviceInfo,arr,true)
  2679. },
  2680. volumeNumber(){
  2681. let arr = [];
  2682. let obj = {};
  2683. obj.id = "CapacityCalibration";
  2684. obj.shadow = 1;
  2685. arr.push(obj);
  2686. this.mqttPublish(2,this.deviceInfo,arr,true)
  2687. },
  2688. showConfirm(title,content,yes,no){
  2689. uni.showModal({
  2690. title: title,
  2691. content: content,
  2692. success: function (res) {
  2693. if (res.confirm) {
  2694. yes();
  2695. } else if (res.cancel) {
  2696. no();
  2697. }
  2698. }
  2699. });
  2700. },
  2701. reset(){
  2702. let self = this;
  2703. uni.showModal({
  2704. title: "提 示",
  2705. content: "非专业人员修改可能导致机器损坏",
  2706. confirmText:"确认",
  2707. success: function (res) {
  2708. if(res.confirm){
  2709. let arr = [];
  2710. let obj = {};
  2711. obj.id = "RestoreFactory";
  2712. obj.shadow = 1;
  2713. arr.push(obj);
  2714. self.mqttPublish(2,self.deviceInfo,arr)
  2715. }
  2716. },
  2717. })
  2718. },
  2719. paishui(){
  2720. let flag = false;
  2721. flag = this.drainageTurn == 1?true:false;
  2722. let arr = [];
  2723. let obj = {};
  2724. if(flag){
  2725. obj.shadow = 0;
  2726. }else{
  2727. obj.shadow = 1;
  2728. }
  2729. obj.id = "DrainageTurn";
  2730. arr.push(obj);
  2731. this.mqttPublish(2,this.deviceInfo,arr)
  2732. },
  2733. turnChange(type){
  2734. let flag = false;
  2735. let obj = {};
  2736. if(type ==3){
  2737. flag = this.qingxiTurn;
  2738. obj.id = "WashSwitch";
  2739. }else if(type == 2){
  2740. if(this.qingxiTurn || this.qitingTurn){
  2741. this.$modal.showToast("启停、包装、清洗不能同时打开")
  2742. return;
  2743. }
  2744. flag = this.baozhuangTurn;
  2745. obj.id = "PackageSwitch";
  2746. }else if(type == 1) {
  2747. if(this.qingxiTurn || this.baozhuangTurn){
  2748. this.$modal.showToast("启停、包装、清洗不能同时打开")
  2749. return;
  2750. }
  2751. flag = this.qitingTurn;
  2752. obj.id = "CarrybagSwitch";
  2753. }
  2754. flag = !flag;
  2755. let arr = [];
  2756. if(flag){
  2757. obj.shadow = 1;
  2758. }else{
  2759. obj.shadow = 0;
  2760. }
  2761. arr.push(obj);
  2762. this.mqttPublish(2,this.deviceInfo,arr)
  2763. },
  2764. addPackageVolume(){
  2765. this.packageVolume++;
  2766. if(this.packageVolume>300){
  2767. this.packageVolume = 50;
  2768. }
  2769. console.log("增加包装容量")
  2770. this.changePackageVolume()
  2771. },
  2772. subPackageVolume(){
  2773. this.packageVolume--;
  2774. if( this.packageVolume<50){
  2775. this.packageVolume = 300;
  2776. }
  2777. console.log("减少包装容量")
  2778. this.changePackageVolume()
  2779. },
  2780. addPackageNumber(){
  2781. this.packageNumber++;
  2782. if(this.packageNumber>999){
  2783. this.packageNumber = 1;
  2784. }
  2785. console.log("增加包装数量")
  2786. this.changePackageNumber();
  2787. },
  2788. subPackageNumber(){
  2789. this.packageNumber--;
  2790. if(this.packageNumber<1){
  2791. this.packageNumber = 999;
  2792. }
  2793. console.log("减少包装数量")
  2794. this.changePackageNumber();
  2795. },
  2796. addSealingTemperature(){
  2797. console.log("增加封口温度")
  2798. if(!this.fengkouDlgShow){
  2799. this.fengkouDlgShow = true;
  2800. }
  2801. this.setSealingTemperature++;
  2802. this.changeSealingTemperature();
  2803. },
  2804. subSealingTemperature(){
  2805. console.log("减少封口温度")
  2806. if(!this.fengkouDlgShow){
  2807. this.fengkouDlgShow = true;
  2808. }
  2809. this.setSealingTemperature--;
  2810. this.changeSealingTemperature();
  2811. },
  2812. addEdegTemperature(){
  2813. console.log("增加封边温度")
  2814. this.editing = true;
  2815. if(!this.fengbianDlgShow){
  2816. this.fengbianDlgShow = true;
  2817. }
  2818. this.setEdegTemperature++;
  2819. this.changeEdegTemperature();
  2820. },
  2821. subEdegTemperature(){
  2822. console.log("减少封边温度")
  2823. this.editing = true;
  2824. if(!this.fengbianDlgShow){
  2825. this.fengbianDlgShow = true;
  2826. }
  2827. this.setEdegTemperature--;
  2828. this.changeEdegTemperature();
  2829. },
  2830. subErqibushui(){
  2831. this.secondAddWaterTime--;
  2832. if(this.secondAddWaterTime <10){
  2833. this.secondAddWaterTime = 10
  2834. }
  2835. this.editSecondAddWaterTime = true;
  2836. this.sendJianYao("SecondAddWaterTime")
  2837. },
  2838. addErqibushui(){
  2839. this.secondAddWaterTime++;
  2840. if(this.secondAddWaterTime >20){
  2841. this.secondAddWaterTime = 20
  2842. }
  2843. this.editSecondAddWaterTime = true;
  2844. this.sendJianYao("SecondAddWaterTime")
  2845. },
  2846. addTemperatureTime(type){
  2847. if(this.jianyaoMode == 0){
  2848. console.log("增加煎药时间")
  2849. if(!this.wenhuoTimeDlgShow){
  2850. this.wenhuoTimeDlgShow = true;
  2851. this.temperatureTime = this.leftJianyaoTime;
  2852. }
  2853. this.temperatureTime++;
  2854. this.changeTemperatureTime()
  2855. }else{
  2856. this.wenhuoTimeDlgShow = true;
  2857. this.FirstTime++;
  2858. this.changeFirstTime()
  2859. }
  2860. },
  2861. subNewTemperatureTime(type){
  2862. this.temperatureTime--;
  2863. let min = 1;
  2864. let max = 600;
  2865. if(this.temperatureTime<min){
  2866. this.temperatureTime = min;
  2867. }
  2868. if(this.temperatureTime>max){
  2869. this.temperatureTime = max;
  2870. }
  2871. this.sendData("TimeSetting",this.temperatureTime)
  2872. },
  2873. addNewTemperatureTime(type){
  2874. this.temperatureTime++
  2875. let min = 1;
  2876. let max = 600;
  2877. if(this.temperatureTime<min){
  2878. this.temperatureTime = min;
  2879. }
  2880. if(this.temperatureTime>max){
  2881. this.temperatureTime = max;
  2882. }
  2883. this.sendData("TimeSetting",this.temperatureTime)
  2884. },
  2885. sendData(key,value){
  2886. let obj = {};
  2887. let arr = [];
  2888. obj.id = key;
  2889. obj.shadow = value;
  2890. arr.push(obj);
  2891. this.mqttPublish(2,this.deviceInfo,arr,true)
  2892. },
  2893. subTemperatureTime(type){
  2894. if(this.jianyaoMode == 0){
  2895. console.log("减少煎药时间")
  2896. if(!this.wenhuoTimeDlgShow){
  2897. this.wenhuoTimeDlgShow = true;
  2898. this.temperatureTime = this.leftJianyaoTime;
  2899. }
  2900. this.temperatureTime--;
  2901. if(this.temperatureTime<=0){
  2902. this.temperatureTime = 1;
  2903. }
  2904. this.changeTemperatureTime()
  2905. }else{
  2906. this.wenhuoTimeDlgShow = true;
  2907. this.FirstTime--;
  2908. if(this.FirstTime<=0){
  2909. this.FirstTime = 1;
  2910. }
  2911. this.changeFirstTime()
  2912. }
  2913. },
  2914. addSecondTime(){
  2915. this.SecondTime ++;
  2916. this.wenhuoTimeDlgShow = true;
  2917. this.changeSecondTime()
  2918. },
  2919. subSecondTime(){
  2920. this.SecondTime --;
  2921. if(this.SecondTime<15){
  2922. this.SecondTime = 15;
  2923. }
  2924. this.wenhuoTimeDlgShow = true;
  2925. this.changeSecondTime()
  2926. },
  2927. changeSecondTime(){
  2928. let min = 1;
  2929. let max = 600;
  2930. if(this.SecondTime<min){
  2931. this.SecondTime = min;
  2932. }
  2933. if(this.SecondTime>max){
  2934. this.SecondTime = max;
  2935. }
  2936. console.log("current temperatureTime is :"+this.SecondTime)
  2937. this.sendJianYao("SecondTime");
  2938. },
  2939. changeFirstTime(){
  2940. let min = 1;
  2941. let max = 600;
  2942. if(this.FirstTime<min){
  2943. this.FirstTime = min;
  2944. }
  2945. if(this.FirstTime>max){
  2946. this.FirstTime = max;
  2947. }
  2948. console.log("current temperatureTime is :"+this.FirstTime)
  2949. this.sendJianYao("FirstTime");
  2950. },
  2951. addTemperature(){
  2952. if(this.jianyaoMode == 0){
  2953. console.log("zengjia煎药温度")
  2954. this.temperature++;
  2955. this.wenduSetting = true;
  2956. this.changeTemperature();
  2957. }else{
  2958. console.log("zengjia煎药温度")
  2959. this.FirstTemp++;
  2960. this.wenduSetting = true;
  2961. this.changeFirstTemperature();
  2962. }
  2963. },
  2964. resetShowPlanTime(){
  2965. let self = this;
  2966. if(this.planTimeSettingTimer){
  2967. clearTimeout(this.planTimeSettingTimer);
  2968. }
  2969. this.planTimeSettingTimer = setTimeout(function(){
  2970. self.planEditTime = false;
  2971. },3000)
  2972. },
  2973. resetWaterVolume(){
  2974. let self = this;
  2975. if(this.waterVolumeSettingTimer){
  2976. clearTimeout(this.waterVolumeSettingTimer);
  2977. }
  2978. this.waterVolumeSettingTimer = setTimeout(function(){
  2979. self.editWaterVolume = false;
  2980. },3000)
  2981. },
  2982. resetTimeSettingFirst(){
  2983. let self = this;
  2984. if(this.timeSettingFirstSettingTimer){
  2985. clearTimeout(this.timeSettingFirstSettingTimer);
  2986. }
  2987. this.timeSettingFirstSettingTimer = setTimeout(function(){
  2988. self.editTimeSettingFirst = false;
  2989. },3000)
  2990. },
  2991. resetTimeSettingSecond(){
  2992. let self = this;
  2993. if(this.timeSettingSecondSettingTimer){
  2994. clearTimeout(this.timeSettingSecondSettingTimer);
  2995. }
  2996. this.timeSettingSecondSettingTimer = setTimeout(function(){
  2997. self.editTimeSettingSecond = false;
  2998. },3000)
  2999. },
  3000. resetShowWendu(){
  3001. let self = this;
  3002. if(this.wenduSettingTimer){
  3003. clearTimeout(this.wenduSettingTimer);
  3004. }
  3005. this.wenduSettingTimer = setTimeout(function(){
  3006. self.wenduSetting = false;
  3007. },3000)
  3008. },
  3009. resetTempSettingFirstTimer(){
  3010. let self = this;
  3011. if(this.tempSettingFirstTimer){
  3012. clearTimeout(this.tempSettingFirstTimer);
  3013. }
  3014. this.tempSettingFirstTimer = setTimeout(function(){
  3015. self.editTempSettingFirst = false;
  3016. },3000)
  3017. },
  3018. resetSecondAddWaterTimeTimer(){
  3019. let self = this;
  3020. if(this.editSecondAddWaterTimeTimer){
  3021. clearTimeout(this.editSecondAddWaterTimeTimer);
  3022. }
  3023. this.editSecondAddWaterTimeTimer = setTimeout(function(){
  3024. self.editSecondAddWaterTime = false;
  3025. },3000)
  3026. },
  3027. subTimeFirst(){
  3028. this.timeSettingFirst = parseInt(this.timeSettingFirst) -1;
  3029. if(this.timeSettingFirst<0){
  3030. this.timeSettingFirst = 0;
  3031. }
  3032. this.editTimeSettingFirst = true;
  3033. this.changeTimeFirst();
  3034. },
  3035. addTimeFirst(){
  3036. this.timeSettingFirst = parseInt(this.timeSettingFirst) +1;
  3037. this.editTimeSettingFirst = true;
  3038. this.changeTimeFirst();
  3039. },
  3040. changeTimeFirst(){
  3041. this.sendJianYao("TimeSetFirst");
  3042. },
  3043. doAction(type){
  3044. if(type == 3){
  3045. let mode = this.jianyaoMode;
  3046. if(mode == 0){
  3047. this.firstJianyaoMode = 5;
  3048. }else{
  3049. this.secondJianyaoMode = 8;
  3050. }
  3051. let arr = []
  3052. let obj2 = {};
  3053. obj2.id = "DecoctingSwitch";
  3054. obj2.shadow = 1;
  3055. arr.push(obj2);
  3056. this.mqttPublish(2,this.deviceInfo,arr,true);
  3057. this.setStatusHandler()
  3058. return;
  3059. }
  3060. this.pauseStatus = type
  3061. let arr = []
  3062. let obj2 = {};
  3063. obj2.id = "PauseStatus";
  3064. obj2.shadow = type;
  3065. arr.push(obj2);
  3066. this.mqttPublish(2,this.deviceInfo,arr,true);
  3067. },
  3068. addTimeSecond(){
  3069. this.timeSettingSecond = parseInt(this.timeSettingSecond) +1;
  3070. this.editTimeSettingSecond = true;
  3071. this.changeTimeSecond();
  3072. },
  3073. subTimeSecond(){
  3074. this.timeSettingSecond = parseInt(this.timeSettingSecond) -1;
  3075. if(this.timeSettingSecond<0){
  3076. this.timeSettingSecond = 0
  3077. }
  3078. this.editTimeSettingSecond = true;
  3079. this.changeTimeSecond();
  3080. },
  3081. changeTimeSecond(){
  3082. this.sendJianYao("TimeSetSecond");
  3083. },
  3084. subWaterVolume(){
  3085. if(this.jianyaoMode == 0){
  3086. this.waterVolume = parseFloat(this.waterVolume) -0.1;
  3087. this.waterVolume = this.waterVolume.toFixed(1);
  3088. this.editWaterVolume = true;
  3089. this.sendWaterVolume();
  3090. }else if(this.jianyaoMode == 1){
  3091. this.secondWaterVolume = parseFloat(this.secondWaterVolume) -0.1;
  3092. this.secondWaterVolume = this.secondWaterVolume.toFixed(1);
  3093. this.editWaterVolume = true;
  3094. this.sendSecondWaterVolume();
  3095. }
  3096. },
  3097. addWaterVolume(){
  3098. if(this.jianyaoMode == 0){
  3099. this.waterVolume = parseFloat(this.waterVolume) +0.1;
  3100. this.waterVolume = this.waterVolume.toFixed(1);
  3101. this.editWaterVolume = true;
  3102. this.sendWaterVolume();
  3103. }else if(this.jianyaoMode == 1){
  3104. this.secondWaterVolume = parseFloat(this.secondWaterVolume) +0.1;
  3105. this.secondWaterVolume = this.secondWaterVolume.toFixed(1);
  3106. this.editWaterVolume = true;
  3107. this.sendSecondWaterVolume();
  3108. }
  3109. },
  3110. subSecondWaterVolume(){
  3111. this.waterVolume = parseFloat(this.waterVolume) -0.1;
  3112. this.waterVolume = this.waterVolume.toFixed(1);
  3113. this.editWaterVolume = true;
  3114. this.sendWaterVolume();
  3115. },
  3116. addSecondWaterVolume(){
  3117. this.waterVolume = parseFloat(this.waterVolume) +0.1;
  3118. this.waterVolume = this.waterVolume.toFixed(1);
  3119. this.editWaterVolume = true;
  3120. this.sendWaterVolume();
  3121. },
  3122. sendSecondWaterVolume(){
  3123. if(this.secondWaterVolume<0){
  3124. this.secondWaterVolume = 0;
  3125. }
  3126. this.sendJianYao("SecondWaterVolume");
  3127. },
  3128. sendWaterVolume(){
  3129. if(this.jianyaoMode == 0){
  3130. if(this.waterVolume<0){
  3131. this.waterVolume = 0;
  3132. }
  3133. this.sendJianYao("WaterVolume");
  3134. }else{
  3135. this.sendSecondWaterVolume();
  3136. }
  3137. },
  3138. subTemperature(type){
  3139. if(this.jianyaoMode == 0){
  3140. console.log("减少煎药温度")
  3141. this.temperature--;
  3142. this.wenduSetting = true;
  3143. this.changeTemperature();
  3144. }else{
  3145. console.log("减少煎药温度")
  3146. this.FirstTemp--;
  3147. this.wenduSetting = true;
  3148. this.changeFirstTemperature();
  3149. }
  3150. },
  3151. changeFirstTemperature(){
  3152. let max = 140;
  3153. let min = 100;
  3154. if(this.FirstTemp<min){
  3155. this.FirstTemp = min;
  3156. }
  3157. if(this.FirstTemp>max){
  3158. this.FirstTemp = max;
  3159. }
  3160. console.log("current temperature is :"+this.FirstTemp)
  3161. this.sendJianYao("FirstTemp");
  3162. },
  3163. changeJianyaoMode(mode){
  3164. let arr = [];
  3165. this.jianyaoMode = mode
  3166. let obj2 = {};
  3167. obj2.id = "JianyaoMode";
  3168. obj2.shadow = mode;
  3169. arr.push(obj2);
  3170. this.mqttPublish(2,this.deviceInfo,arr,true);
  3171. },
  3172. addPlanTime(type){
  3173. console.log("增加预约时间")
  3174. if(type == 2){
  3175. this.planTime = this.leftAppointmentTime;
  3176. }
  3177. this.planTime++;
  3178. this.planEditTime = true;
  3179. this.sendPlanTime(type);
  3180. },
  3181. subTempSettingFirst(){
  3182. this.editTempSettingFirst = true;
  3183. this.tempSettingFirst --;
  3184. if(this.tempSettingFirst <0){
  3185. this.tempSettingFirst = 0
  3186. }
  3187. this.sendJianYao("TempSetFirst")
  3188. },
  3189. addTempSettingFirst(){
  3190. this.editTempSettingFirst = true;
  3191. this.tempSettingFirst ++;
  3192. if(this.tempSettingFirst>105){
  3193. this.tempSettingFirst = 105;
  3194. }
  3195. this.sendJianYao("TempSetFirst")
  3196. },
  3197. subPlanTime(type){
  3198. console.log("减少预约时间")
  3199. if(type == 2){
  3200. this.planTime = this.leftAppointmentTime;
  3201. }
  3202. this.planEditTime = true;
  3203. this.planTime--;
  3204. this.sendPlanTime(type);
  3205. },
  3206. sendPlanTime(type){
  3207. if(this.planTime<0){
  3208. this.planTime = 0;
  3209. }
  3210. if(type == 2){
  3211. this.leftAppointmentTime = this.planTime;
  3212. }
  3213. this.sendJianYao("AppointmentTime");
  3214. },
  3215. subDevicePlanTime(){
  3216. this.devicePlanTime--;
  3217. if(this.devicePlanTime<0){
  3218. this.devicePlanTime = 1;
  3219. }
  3220. console.log("减少预约时间")
  3221. this.sendJianYao("AppointmentTime")
  3222. },
  3223. addDevicePlanTime(){
  3224. console.log("增加预约时间")
  3225. this.devicePlanTime++;
  3226. this.planEditTime = true;
  3227. this.sendJianYao("AppointmentTime")
  3228. },
  3229. sendBaozhuang(targetKey){
  3230. let self = this;
  3231. let arr = [];
  3232. if(this.baozhuangTimer != null){
  3233. clearTimeout(this.baozhuangTimer);
  3234. }
  3235. this.baozhuangTimer = setTimeout(function (){
  3236. for (let i = 0; i <this.baozhuangKeys.length; i++) {
  3237. let key = this.baozhuangKeys[i];
  3238. let obj = {};
  3239. obj.id = key;
  3240. if(key === "PackingVolume"){
  3241. obj.shadow = this.packageVolume;
  3242. setTimeout(function (){
  3243. self.baozhuangRongLiangSetting = false;
  3244. },self.resetDuration);
  3245. }
  3246. if(key === "PackageQuantity"){
  3247. obj.shadow = this.packageNumber;
  3248. setTimeout(function (){
  3249. self.baozhuangShuLIangSetting = false;
  3250. },self.resetDuration);
  3251. }
  3252. if(key === "SetSealTemp"){
  3253. obj.shadow = this.setSealingTemperature;
  3254. setTimeout(function (){
  3255. self.fengkouDlgShow = false;
  3256. self.baozhuangFengkouSetting = false;
  3257. self.sealingTemperature = self.tempFengKouWendu;;
  3258. },self.resetDuration);
  3259. }
  3260. if(key === "SetBandingTemp"){
  3261. obj.shadow = this.setEdegTemperature;
  3262. setTimeout(function (){
  3263. self.fengbianDlgShow = false;
  3264. self.baozhuangFengbianSetting = false;
  3265. self.edegTemperature = self.tempFengBianWendu;
  3266. },self.resetDuration);
  3267. }
  3268. if(targetKey == key){
  3269. arr.push(obj);
  3270. break;
  3271. }
  3272. }
  3273. this.mqttPublish(2,this.deviceInfo,arr)
  3274. }.bind(this),500);
  3275. },
  3276. sendJianYao(targetKey){
  3277. let self = this;
  3278. let arr = [];
  3279. if(this.jianyaoTimer != null){
  3280. clearTimeout(this.jianyaoTimer);
  3281. }
  3282. this.jianyaoTimer = setTimeout(function (targetKey){
  3283. let isExist = false;
  3284. for (let j = 0; j <this.jianyaoKeys.length; j++) {
  3285. let key = this.jianyaoKeys[j];
  3286. if(key == targetKey){
  3287. isExist = true;
  3288. }
  3289. }
  3290. if(isExist){
  3291. let key = targetKey
  3292. let obj = {};
  3293. obj.id = key;
  3294. if(key === "TempSetting"){
  3295. obj.shadow = this.temperature;
  3296. self.resetShowWendu();
  3297. }
  3298. if(key === "FirstTemp"){
  3299. obj.shadow = this.FirstTemp;
  3300. self.resetShowWendu();
  3301. }
  3302. if(key === "FirstTime"){
  3303. obj.shadow = this.FirstTime;
  3304. setTimeout(function(){
  3305. self.wenhuoTimeDlgShow = false;
  3306. self.jianyaoShijianSetting = false;
  3307. },self.resetDuration)
  3308. }
  3309. if(key === "SecondTime"){
  3310. obj.shadow = this.SecondTime;
  3311. setTimeout(function(){
  3312. self.wenhuoTimeDlgShow = false;
  3313. self.jianyaoShijianSetting = false;
  3314. },self.resetDuration)
  3315. }
  3316. if(key === "TempSetFirst"){
  3317. obj.shadow = this.tempSettingFirst;
  3318. self.resetTempSettingFirstTimer();
  3319. }
  3320. if(key === "SecondAddWaterTime"){
  3321. obj.shadow = this.secondAddWaterTime;
  3322. self.resetSecondAddWaterTimeTimer();
  3323. }
  3324. if(key === "TimeSetFirst"){
  3325. obj.shadow = this.timeSettingFirst
  3326. self.resetTimeSettingFirst()
  3327. }
  3328. if(key === "TimeSetSecond"){
  3329. obj.shadow = this.timeSettingSecond
  3330. self.resetTimeSettingSecond()
  3331. }
  3332. if(key === "WaterVolume"){
  3333. obj.shadow = this.waterVolume*10;
  3334. self.resetWaterVolume();
  3335. }
  3336. if(key === "SecondWaterVolume"){
  3337. obj.shadow = this.secondWaterVolume*10;
  3338. self.resetWaterVolume();
  3339. }
  3340. if(key === "AppointmentTime"){
  3341. obj.shadow = this.planTime;
  3342. self.resetShowPlanTime();
  3343. }
  3344. if(key === "TimeSetting"){
  3345. obj.shadow = this.temperatureTime;
  3346. self.leftJianyaoTime = this.temperatureTime;;
  3347. setTimeout(function(){
  3348. self.wenhuoTimeDlgShow = false;
  3349. self.jianyaoShijianSetting = false;
  3350. },self.resetDuration)
  3351. }
  3352. arr.push(obj);
  3353. this.mqttPublish(2,this.deviceInfo,arr,true)
  3354. }
  3355. }.bind(this,targetKey),500);
  3356. },
  3357. buildPropKey(key){
  3358. if(this.childId !=0){
  3359. return key+"_"+this.childId;
  3360. }else{
  3361. return key;
  3362. }
  3363. },
  3364. addWater(){
  3365. if(!this.jianyaoOpen()){
  3366. this.notifyError("请先开机后再进行操作")
  3367. return;
  3368. }
  3369. if(this.jianyaoIng()){
  3370. this.$modal.showToast('必须在非煎药模式下才能设置')
  3371. return;
  3372. }
  3373. let obj = {};
  3374. let arr = [];
  3375. obj.id = "WaterSwitch";
  3376. if(!this.jiashuiTurn){
  3377. obj.shadow = 1;
  3378. console.log("加水状态打开")
  3379. }else{
  3380. obj.shadow = 0;
  3381. console.log("加水状态关闭")
  3382. }
  3383. arr.push(obj);
  3384. this.mqttPublish(2,this.deviceInfo,arr,true)
  3385. },
  3386. canStart(){
  3387. if(this.timeSettingFirst == 0 && this.timeSettingSecond == 0){
  3388. return true;
  3389. }
  3390. if(this.timeSettingFirst >0 && this.timeSettingSecond >0){
  3391. return true
  3392. }
  3393. return false;
  3394. },
  3395. decoctControlChange(){
  3396. // if(this.decoctControlStatus){
  3397. // this.stopDecoctControlChange();
  3398. // return;
  3399. // }
  3400. if(!this.decoctControlStatus){
  3401. if(!this.canStart()){
  3402. this.$modal.alert("先煎时间和后下时间必须均不设置或均设置")
  3403. return;
  3404. }
  3405. }
  3406. this.decoctControlStatus = !this.decoctControlStatus;
  3407. let arr = [];
  3408. let obj = {};
  3409. obj.id = "DecoctingSwitch";
  3410. if(this.decoctControlStatus){
  3411. obj.shadow = 1;
  3412. console.log("煎药状态打开")
  3413. this.beforeStart();
  3414. this.setStatusHandler()
  3415. this.checkJianyao();
  3416. }else{
  3417. obj.shadow = 0;
  3418. console.log("煎药状态关闭")
  3419. }
  3420. arr.push(obj);
  3421. this.mqttPublish(2,this.deviceInfo,arr,true)
  3422. },
  3423. beforeStart(){
  3424. this.pauseStatus = 0
  3425. if(parseInt(this.jianyaoMode) === 0){
  3426. if(parseFloat(this.waterVolume)>0){//是否有加水
  3427. this.firstJianyaoMode = 1;
  3428. }else{
  3429. if(parseFloat(this.planTime)>0){//是否预约
  3430. this.firstJianyaoMode = 2;
  3431. }else{
  3432. if(parseFloat(this.timeSettingFirst)>0){//是否设置先煎
  3433. this.firstJianyaoMode = 3;
  3434. }else{
  3435. this.firstJianyaoMode = 5;
  3436. }
  3437. }
  3438. }
  3439. }else if(parseInt(this.jianyaoMode) === 1){
  3440. if(parseFloat(this.secondWaterVolume)>0) {
  3441. this.secondJianyaoMode = 1;
  3442. }else{
  3443. if(parseFloat(this.planTime)>0) {//是否预约
  3444. this.secondJianyaoMode = 2;
  3445. }else{
  3446. if(parseFloat(this.timeSettingFirst)>0){//是否设置先煎
  3447. this.secondJianyaoMode = 3;
  3448. }else{
  3449. this.secondJianyaoMode = 7;
  3450. }
  3451. }
  3452. }
  3453. }
  3454. },
  3455. kongzhiJianyao(flag,arr){//不判断煎药状态
  3456. let obj = {};
  3457. if(!this.decoctControlOnOffStatus){
  3458. this.notifyError("请先开机后再进行操作")
  3459. return;
  3460. }
  3461. obj.id = "DecoctingSwitch";
  3462. if(flag){
  3463. obj.shadow = 1;
  3464. console.log("煎药状态打开")
  3465. this.checkJianyao();
  3466. }else{
  3467. obj.shadow = 0;
  3468. console.log("煎药状态关闭")
  3469. }
  3470. arr.push(obj);
  3471. },
  3472. stopDecoctControlChange(){
  3473. let obj = {};
  3474. let arr = [];
  3475. if(!this.decoctControlOnOffStatus){
  3476. this.notifyError("请先开机后再进行操作")
  3477. return;
  3478. }
  3479. if(!this.decoctControlStatus){
  3480. return;
  3481. }
  3482. this.decoctControlStatus = !this.decoctControlStatus;
  3483. obj.id = "DecoctingSwitch";
  3484. if(this.decoctControlStatus){
  3485. obj.shadow = 1;
  3486. console.log("煎药状态打开")
  3487. }else{
  3488. obj.shadow = 0;
  3489. console.log("煎药状态关闭")
  3490. }
  3491. arr.push(obj);
  3492. let obj2 = {};
  3493. obj2.id = "AppointmentTime";
  3494. obj2.shadow = 0;
  3495. arr.push(obj2);
  3496. this.mqttPublish(2,this.deviceInfo,arr,true);
  3497. this.cancelBaowen();
  3498. },
  3499. cancelBaowen(){
  3500. let obj = {};
  3501. obj.childId = this.childId;
  3502. obj.productId = this.deviceInfo.productId;
  3503. obj.status = 0;
  3504. obj.deviceNo = this.deviceInfo.serialNumber;
  3505. cancelBaowen(obj);
  3506. },
  3507. decoctControlOnOffChange(){
  3508. let obj = {};
  3509. //4号板子预约是无法开启煎药的
  3510. if(!this.decoctControlOnOffStatus){
  3511. if(this.boardType == 4){
  3512. if(this.devicePlanInfo != null){
  3513. this.$modal.showToast('请先取消预约后再开机');
  3514. return;
  3515. }
  3516. }
  3517. }
  3518. this.decoctControlOnOffStatus = !this.decoctControlOnOffStatus;
  3519. let arr = [];
  3520. obj.id = "PowerControl";
  3521. let isMul = false;
  3522. if(this.boardType != 4){
  3523. if(this.decoctControlStatus){
  3524. this.$modal.showToast('请先结束煎药后操作')
  3525. this.decoctControlOnOffStatus = !this.decoctControlOnOffStatus;
  3526. return;
  3527. }
  3528. }
  3529. if(this.oneToMul && this.firstTab){
  3530. obj.id = "PowerCtl";
  3531. isMul = true;
  3532. }
  3533. if(this.decoctControlOnOffStatus){
  3534. obj.shadow = 1;
  3535. console.log("煎药机开关打开")
  3536. }else{
  3537. obj.shadow = 0;
  3538. console.log("煎药机开关关闭")
  3539. }
  3540. arr.push(obj);
  3541. this.mqttPublish(2,this.deviceInfo,arr,isMul)
  3542. },
  3543. packageControlOnOffChange(){
  3544. let obj = {};
  3545. let arr = [];
  3546. if(this.baozhuangRunning()){
  3547. this.$modal.showToast('请先停止运行后操作')
  3548. return;
  3549. }
  3550. obj.id = "PackagePowerControl";
  3551. this.packageControlOnOffStatus = !this.packageControlOnOffStatus;
  3552. if(this.packageControlOnOffStatus){
  3553. console.log("包装机器开关打开")
  3554. obj.shadow = 1;
  3555. }else{
  3556. console.log("包装机器开关关闭")
  3557. obj.shadow = 0;
  3558. }
  3559. arr.push(obj);
  3560. this.mqttPublish(2,this.deviceInfo,arr)
  3561. },
  3562. containKey(arr,key){
  3563. for (let i = 0; i < arr.length; i++) {
  3564. const data = arr[i];
  3565. if(data == key){
  3566. return true;
  3567. }
  3568. }
  3569. return false;
  3570. },
  3571. // 抽屉状态发生变化触发
  3572. change(e, type) {
  3573. console.log(e);
  3574. },
  3575. showDrawer() {
  3576. uni.navigateTo({
  3577. url: '/subpkg/device/setting?id='+this.id
  3578. });
  3579. // this.$refs.showLeft.open();
  3580. },
  3581. closeDrawer() {
  3582. this.$refs.showLeft.close();
  3583. },
  3584. checkItemValue(item){
  3585. if(!item.shadow){
  3586. item.shadow = 0;
  3587. }
  3588. if(!item.unit){
  3589. item.unit = "";
  3590. }
  3591. return true;
  3592. },
  3593. sendProperties(){
  3594. let properties = this.properties;
  3595. for (let i = 0; i < properties; i++) {
  3596. let property = this.properties[i];
  3597. let shadow = property.shadow;
  3598. if(shadow){
  3599. arr.push(property);
  3600. }
  3601. }
  3602. this.mqttPublish(1,this.deviceInfo,arr)
  3603. },
  3604. sendFunctions(){
  3605. let arr = [];
  3606. let functions = this.functions;
  3607. for (let i = 0; i < functions.length; i++) {
  3608. let functionObj = this.functions[i];
  3609. let shadow = functionObj.shadow;
  3610. if(shadow){
  3611. arr.push(functionObj);
  3612. }
  3613. }
  3614. this.mqttPublish(2,this.deviceInfo,arr)
  3615. },
  3616. changeProp(key,val){
  3617. let item = null;
  3618. let obj = null;
  3619. let oneToMul = this.oneToMul;
  3620. if(key === "LockControl"){
  3621. this.lock.value = val;
  3622. item = this.lock;
  3623. }else if(key === "PowerControl"){
  3624. this.power.value = val;
  3625. item = this.power;
  3626. }
  3627. let value = val;
  3628. obj = item.item;
  3629. if(value){
  3630. obj.value = 1;
  3631. obj.shadow = 1;
  3632. }else{
  3633. obj.value = 0;
  3634. obj.shadow = 0;
  3635. }
  3636. if(!oneToMul){
  3637. }
  3638. this.publishThingsModel(this.deviceInfo,obj);
  3639. },
  3640. checkCommonProp(item){
  3641. let id =item.id;
  3642. let isCommonKey = this.modelKey.some(res=>{
  3643. return id === res;
  3644. })
  3645. return !isCommonKey;
  3646. },
  3647. getRunTime(){
  3648. let self = this;
  3649. getDeviceRunTime(this.id).then(res=>{
  3650. self.timeobj = res.data;
  3651. if(!self.timeobj){
  3652. return;
  3653. }
  3654. if(self.timeobj.avgtime == ""){
  3655. self.timeobj.avgtime = 0;
  3656. }
  3657. if(self.timeobj.alltime == ""){
  3658. self.timeobj.alltime = 0;
  3659. }
  3660. })
  3661. },
  3662. seeTime(){
  3663. this.showTimeDlg = true;
  3664. this.getRunTime();
  3665. },
  3666. closeTime(){
  3667. this.showTimeDlg = false;
  3668. },
  3669. cancel(){
  3670. this.showErrDlg = false;
  3671. },
  3672. reportError(){
  3673. this.showErrDlg = true;
  3674. },
  3675. doReportError(){
  3676. if(!this.errorMsg){
  3677. this.$modal.showToast('异常信息不能为空')
  3678. }else{
  3679. let self = this;
  3680. let errObj = {};
  3681. errObj.deviceId = this.deviceInfo.deviceId;
  3682. errObj.deviceName = this.deviceInfo.deviceName
  3683. errObj.desc = this.errorMsg;
  3684. errObj.deptId= this.deviceInfo.deptId;
  3685. reportError(errObj).then(res=>{
  3686. self.$modal.showToast(res.msg)
  3687. self.cancel();
  3688. })
  3689. }
  3690. },
  3691. openLocation(){
  3692. uni.openLocation({
  3693. latitude: this.location.latitude,
  3694. longitude: this.location.longitude,
  3695. success: function () {
  3696. console.log('success');
  3697. }
  3698. });
  3699. },
  3700. confirmItemData(e){
  3701. let data = e.value[0];
  3702. this.show.text = data.text;
  3703. this.show.shadow=data.value;
  3704. this.show = null;
  3705. console.log(data);
  3706. },
  3707. send(){
  3708. let shadow = false
  3709. let _arr = []
  3710. this.inputProp.forEach((item)=>{
  3711. _arr.push(item.value)
  3712. })
  3713. // if(_arr.some(val => val === '' || val.length < 0)){
  3714. // shadow = true
  3715. // }
  3716. if(this.deviceInfo.status != 3){
  3717. uni.showToast({
  3718. title:"设备暂未上线",
  3719. icon:"error"
  3720. })
  3721. return;
  3722. }
  3723. if(shadow){
  3724. uni.showToast({
  3725. title:"数据不能为空",
  3726. icon:"error"
  3727. })
  3728. return;
  3729. }
  3730. this.publishThingsModel(this.deviceInfo,this.inputProp.map(item=>{return{"id":item.id,"value":item.value}}))
  3731. },
  3732. /** 更新设备状态 */
  3733. updateDeviceStatus(device) {
  3734. },
  3735. chooseItemData(data){
  3736. if(this.deviceInfo.status != 3){
  3737. uni.showToast({
  3738. title:"设备暂未上线",
  3739. icon:"error"
  3740. })
  3741. return;
  3742. }
  3743. this.columns = [data.enumList];
  3744. this.show =data;
  3745. },
  3746. getDetail(){
  3747. let self = this;
  3748. getDetail(this.id).then(res=>{
  3749. self.deviceInfo = res.data;
  3750. self.deviceType = res.data.type;
  3751. let msg = res.msg;
  3752. if(msg){
  3753. try{
  3754. msg = JSON.parse(msg+"");
  3755. }catch (e){
  3756. msg = null;
  3757. }
  3758. }
  3759. let productId = self.deviceInfo.productId;
  3760. if(productId === 57){
  3761. self.boardType = 6;
  3762. }
  3763. let online = self.deviceInfo.status == 3?true:false;
  3764. if(!online){
  3765. if(!self.onlineStatus){
  3766. uni.showModal({
  3767. title: '系统提示',
  3768. content: "设备未在线,无法操作",
  3769. confirmText: '确定',
  3770. showCancel:false,
  3771. success(res){
  3772. if(res.confirm){
  3773. self.onlineStatus = true;
  3774. }
  3775. },
  3776. })
  3777. }
  3778. }
  3779. if(msg != null){
  3780. let b = msg.b;
  3781. let c = msg.c;
  3782. let a = msg.a;
  3783. let d = msg.d;
  3784. if(a == 1){
  3785. self.firstMachine = true;
  3786. }else if(a == 0){
  3787. self.firstMachine = false;
  3788. }
  3789. if(b == 1){
  3790. self.secondMachine = true;
  3791. }else if(b == 0){
  3792. self.secondMachine = false;
  3793. }
  3794. if(c == 1){
  3795. self.thirdMachine = true;
  3796. }else if(c == 0){
  3797. self.thirdMachine = false;
  3798. }
  3799. if(d == 1){
  3800. self.forthMachine = true;
  3801. }else if(d==0){
  3802. self.forthMachine = false;
  3803. }
  3804. }
  3805. console.log("当前设备类型:"+JSON.stringify(self.deviceInfo.type))
  3806. self.location = {
  3807. latitude: self.deviceInfo.latitude,
  3808. longitude: self.deviceInfo.longitude};
  3809. self.sysDept = self.deviceInfo.sysDept;
  3810. self.parseSummay(res.data.summary)
  3811. self.mqttSubscribe(res.data);
  3812. self.getDeviceStatus();
  3813. self.seeTime();
  3814. let heng = false;
  3815. self.productImage = self.imgUrl+'/detail/product.png'
  3816. heng = self.setImage(self.deviceType);
  3817. let typeArr = [7,8,9,10,11,12,15];//单煎药机类型
  3818. for (let i = 0; i < typeArr.length; i++) {
  3819. let typeMa = typeArr[i];
  3820. if(typeMa == self.deviceType){
  3821. self.forthMachine = false;
  3822. }
  3823. }
  3824. self.fixImage(heng);
  3825. if(self.boardType == 4){
  3826. self.boardStyle = ";top:15vh;";
  3827. self.modeList=[[
  3828. {id:1,text:"1"},
  3829. {id:2,text:"2"}
  3830. ]];
  3831. }
  3832. self.$forceUpdate();
  3833. });
  3834. },
  3835. getDeviceStatus(func){
  3836. let self = this;
  3837. if(this.summary.length>1){
  3838. }else{
  3839. this.childId = 0;
  3840. }
  3841. uni.showLoading({title:"加载中"});
  3842. getDeviceStatus(this.id,this.childId).then(res=>{
  3843. let data =res.data;
  3844. this.deviceInfo = data;
  3845. self.parseStatusData(data)
  3846. self.getDevicePlanInfo();
  3847. setTimeout(function () {
  3848. uni.hideLoading();
  3849. if(typeof func == "function"){
  3850. func();
  3851. }
  3852. },50);
  3853. });
  3854. },
  3855. setImage(type){
  3856. let heng = false;
  3857. let self = this;
  3858. self.productImage = self.imgUrl+'/product/24.png'
  3859. return heng;
  3860. },
  3861. getNewDeviceStatus(item){
  3862. console.log(item);
  3863. let self = this;
  3864. if(item.index == 0){
  3865. this.firstTab = true;
  3866. this.getDeviceStatus();
  3867. }
  3868. if(item.index == 1){
  3869. this.firstTab = false;
  3870. getDeviceStatus(this.id,0).then(res=>{
  3871. let data =res.data;
  3872. this.deviceInfo = data;
  3873. self.parseStatusData(data)
  3874. });
  3875. }
  3876. },
  3877. changeSub(item){
  3878. this.childId = item.id;
  3879. this.getDeviceStatus()
  3880. },
  3881. parseEnumList(flag){
  3882. let enumList = this.deviceInfo.enumList;
  3883. for (let enumListElement of enumList) {
  3884. let id = enumListElement.id;
  3885. if(id == 'LockControl'){
  3886. let shadow = enumListElement.shadow;
  3887. this.lock.item = enumListElement;
  3888. if(shadow == 1){
  3889. this.lock.value = true;
  3890. this.lock.loading = false;
  3891. }else if(shadow == 0){
  3892. this.lock.value = false;
  3893. this.lock.loading = false;
  3894. }else{
  3895. this.lock.loading = true;
  3896. }
  3897. }
  3898. if(id == 'PowerControl'){
  3899. let shadow = enumListElement.shadow;
  3900. if(this.oneToMul){
  3901. if(!this.firstTab){
  3902. if(shadow == 1){
  3903. this.decoctControlOnOffStatus = true;
  3904. this.getDevicePlanInfo();
  3905. }else if(shadow == 0){
  3906. this.decoctControlOnOffStatus = false;
  3907. }
  3908. }
  3909. }else{
  3910. if(shadow == 1){
  3911. this.decoctControlOnOffStatus = true;
  3912. this.getDevicePlanInfo();
  3913. }else if(shadow == 0){
  3914. this.decoctControlOnOffStatus = false;
  3915. }
  3916. }
  3917. }
  3918. if(id == 'PowerCtl'){
  3919. if(this.oneToMul && this.firstTab){
  3920. let shadow = enumListElement.shadow;
  3921. if(shadow == 1){
  3922. this.decoctControlOnOffStatus = true;
  3923. this.getDevicePlanInfo();
  3924. }else if(shadow == 0){
  3925. this.decoctControlOnOffStatus = false;
  3926. }
  3927. }
  3928. }
  3929. if(id == 'MedicineType'){
  3930. let shadow = enumListElement.shadow;
  3931. if(!shadow){
  3932. shadow = 0;
  3933. }
  3934. let yaofangMap = {};
  3935. let enumList = enumListElement.enumList
  3936. for (let i = 0; i < enumList.length; i++) {
  3937. let yaofangEnum= enumList[i];
  3938. yaofangMap[yaofangEnum.value] = yaofangEnum.text;
  3939. }
  3940. this.yaofang = {
  3941. type:shadow,
  3942. name:yaofangMap[shadow+""]
  3943. }
  3944. }
  3945. this.formatValue(id,enumListElement,"PackagePowerControl","packageControlOnOffStatus")
  3946. this.formatValue(id,enumListElement,"DecoctingSwitch","decoctControlStatus")
  3947. this.formatValue(id,enumListElement,"CarrybagSwitch","qitingTurn")
  3948. this.formatValue(id,enumListElement,"WashSwitch","qingxiTurn")
  3949. this.formatValue(id,enumListElement,"PackageSwitch","baozhuangTurn");
  3950. this.formatValue(id,enumListElement,"DrainageTurn","drainageTurn");
  3951. //6号
  3952. this.formatValue(id,enumListElement,"WaterSwitch","jiashuiTurn");
  3953. this.formatValue(id,enumListElement,"HoldingSwitch","baowenTurn")
  3954. this.formatValue(id,enumListElement,"PauseStatus","pauseStatus")
  3955. this.formatValue(id,enumListElement,"SlowHighswitch","wenwuhuoTurn")
  3956. //pressTurn resetTurn
  3957. if(id == 'PressTurn'){
  3958. let shadow = enumListElement.shadow;
  3959. if(!shadow){
  3960. shadow = 0;
  3961. }
  3962. if(shadow == 1){
  3963. this.pressTurn = 1;
  3964. this.resetTurn = 0;
  3965. }else{
  3966. this.pressTurn = 0;
  3967. }
  3968. this.pressTurnChangeEvent(shadow);
  3969. }
  3970. if(id == 'ResetTurn'){
  3971. let shadow = enumListElement.shadow;
  3972. if(!shadow){
  3973. shadow = 0;
  3974. }
  3975. if(shadow == 1){
  3976. this.resetTurn = 1;
  3977. this.pressTurn = 0;
  3978. }else{
  3979. this.resetTurn = 0;
  3980. }
  3981. this.resetTurnChnageEvent(shadow);
  3982. }
  3983. if(id == 'WorkMode'){
  3984. let shadow = enumListElement.shadow;
  3985. if(!shadow){
  3986. shadow = 1;
  3987. }
  3988. this.workMode = shadow;
  3989. }
  3990. let shadow = enumListElement.shadow
  3991. let valueList = enumListElement.enumList;
  3992. for (let valueObj of valueList){
  3993. if(valueObj.value == shadow){
  3994. enumListElement.text = valueObj.text;
  3995. }
  3996. }
  3997. }
  3998. },
  3999. formatValue(id,enumListElement,key,propkey){
  4000. if(id == key){
  4001. let shadow = enumListElement.shadow;
  4002. if(shadow == 1){
  4003. this[propkey] = true;
  4004. }else if(shadow == 0){
  4005. this[propkey] = false;
  4006. }
  4007. }
  4008. },
  4009. parseStatusData(data){
  4010. let self = this;
  4011. cacheJsonThingsModel(data.productId).then(res=>{
  4012. let thingsModel = JSON.parse(res.data);
  4013. let arr = [];
  4014. let arrayList = data.arrayList;
  4015. arr = arr.concat(arrayList);
  4016. let enumList = data.enumList;
  4017. arr = arr.concat(enumList);
  4018. let integerList = data.integerList;
  4019. arr = arr.concat(integerList);
  4020. let stringList = data.stringList;
  4021. arr = arr.concat(stringList);
  4022. let decimalList =data.decimalList
  4023. arr = arr.concat(decimalList);
  4024. self.inputProp = arr;
  4025. for (let i = 0; i < thingsModel.functions.length; i++) {
  4026. for (let j = 0; j < arr.length; j++) {
  4027. let model = arr[j];
  4028. if(model.id == thingsModel.functions[i].id){
  4029. self.functions.push(model);
  4030. }
  4031. }
  4032. }
  4033. for (let i = 0; i < thingsModel.properties.length; i++) {
  4034. for (let j = 0; j < arr.length; j++) {
  4035. let model = arr[j];
  4036. if(model.id == thingsModel.properties[i].id){
  4037. self.properties.push(model);
  4038. }
  4039. }
  4040. }
  4041. let readOnlyList = data.readOnlyList;
  4042. self.watchProp = readOnlyList;
  4043. self.parseEnumList();
  4044. self.parseProp();
  4045. self.checkJianyao();
  4046. })
  4047. },
  4048. showJianyao(){
  4049. this.calcuStep();
  4050. this.planIngPopDlg = true;
  4051. },
  4052. parseProp(){
  4053. let self = this;
  4054. for (let i = 0; i <self.inputProp.length; i++) {
  4055. let prop = self.inputProp[i];
  4056. let value = prop.shadow||0;
  4057. let id = prop.id;
  4058. if(id === "TimeSetting"){//温度设置
  4059. self.temperatureTime = value;
  4060. }
  4061. if(!self.jianyaoWenduSetting){
  4062. if(id === "TempSetting"){
  4063. self.temperature = value;
  4064. }
  4065. }
  4066. if(id == "WaterVolume"){
  4067. this.waterVolume = parseInt(value)/10;
  4068. }
  4069. if(id == "SecondWaterVolume"){
  4070. this.secondWaterVolume = parseInt(value)/10;
  4071. }
  4072. if(id == "CurrentWaterVolume"){
  4073. this.currentWaterVolume = parseInt(value)/10;
  4074. }
  4075. this.setPropValue(id,"SlowfireTiem","leftJianyaoTime",value,0)
  4076. this.setPropValue(id,"HighTempTime","hightTemperature",value,0)
  4077. this.setPropValue(id,"CurrentTemp","currentTemperature",value,0)
  4078. this.setPropValue(id,"CalibrationTemp","jiaozhunTemp",value,0)
  4079. this.setPropValue(id,"PackingVolume","packageVolume",value,50)
  4080. this.setPropValue(id,"PackageQuantity","packageNumber",value,1)
  4081. this.setPropValue(id,"SecondTime","SecondTime",value,1)
  4082. this.setPropValue(id,"FirstTemp","FirstTemp",value,1)
  4083. this.setPropValue(id,"FirstTime","FirstTime",value,1)
  4084. //封边温度
  4085. this.setPropValue(id,"BandingTemp","edegTemperature",value);
  4086. this.setPropValue(id,"BandingTemp","tempFengBianWendu",value)
  4087. //封口温度
  4088. this.setPropValue(id,"SealTemp","sealingTemperature",value);
  4089. this.setPropValue(id,"SealTemp","tempFengKouWendu",value)
  4090. this.setPropValue(id,"LeftAppointmentTime","leftAppointmentTime",value,0)
  4091. this.setPropValue(id,"ValidCurrent","validCurrent",value,0)
  4092. this.setPropValue(id,"TurnCurrent","turnCurrent",value,0)
  4093. this.setPropValue(id,"HoldingTemp","baowenTemp",value,0)
  4094. this.setPropValue(id,"HoldingTime","baowenTime",value,0)
  4095. this.setPropValue(id,"AppointmentTime","planTime",value,0)
  4096. this.setPropValue(id,"TempSetFirst","tempSettingFirst",value,0)
  4097. this.setPropValue(id,"TimeSetFirst","timeSettingFirst",value,0)
  4098. this.setPropValue(id,"CurrentTimeSettingFirst","currentTimeSettingFirst",value,0)
  4099. this.setPropValue(id,"TimeSetSecond","timeSettingSecond",value,0)
  4100. this.setPropValue(id,"CurrentTimeSettingSecond","currentTimeSettingSecond",value,0)
  4101. this.setPropValue(id,"SecondAddWaterTime","secondAddWaterTime",value,0)
  4102. this.setPropValue(id,"CurrentSecondAddWaterTime","currentSecondAddWaterTime",value,0)
  4103. this.setPropValue(id,"JianyaoMode","jianyaoMode",value,0)
  4104. if(id == "FirstJianyaoMode"){
  4105. this.setPropValue(id,"FirstJianyaoMode","firstJianyaoMode",value,0)
  4106. this.setStatusHandler()
  4107. }
  4108. if(id == "SecondJianyaoMode"){
  4109. this.setPropValue(id,"SecondJianyaoMode","secondJianyaoMode",value,0)
  4110. this.setStatusHandler()
  4111. }
  4112. this.setPropValue(id,"LeftTransferTime","leftTransferTime",value,0)
  4113. self.propMap[id] = prop;
  4114. }
  4115. },
  4116. setPropValue(id,key,propKey,value,defaultValue){
  4117. if(!value && defaultValue){
  4118. value = defaultValue;
  4119. }
  4120. if(id === key){
  4121. this[propKey] = value;
  4122. }
  4123. },
  4124. parseSummay(summary){
  4125. let self = this;
  4126. if(!summary){
  4127. summary = "";
  4128. }
  4129. if(summary.length>0){
  4130. this.summary = JSON.parse(summary);
  4131. if(self.summary.length>0){
  4132. this.oneToMul = true;
  4133. for (let i = 0; i < self.summary.length; i++) {
  4134. self.summary[i].tabName = self.summary[i].name
  4135. }
  4136. let childId = "";
  4137. if(this.oneToMul){
  4138. this.childId = self.summary[0].id;
  4139. }
  4140. }else{
  4141. this.summary = [{name:"煎药机一"}]
  4142. }
  4143. }else{
  4144. this.summary = [{name:"煎药机一"}]
  4145. }
  4146. },
  4147. goDeviceDetail(id){
  4148. uni.navigateTo({
  4149. url: '/subpkg/device/detail/detail?id='+id
  4150. });
  4151. },
  4152. async connectMqtt() {
  4153. if (this.$mqttTool.client == null) {
  4154. await this.$mqttTool.connect(this.vuex_token);
  4155. }
  4156. this.mqttCallback();
  4157. this.startCheck();
  4158. },
  4159. /** Mqtt订阅主题 */
  4160. mqttSubscribe(device) {
  4161. // 订阅当前设备状态和实时监测
  4162. let topicStatus = '/' + device.productId + '/' + device.serialNumber + '/status/post';
  4163. let topicProperty = '/' + device.productId + '/' + device.serialNumber + '/property/post';
  4164. let topicFunction = '/' + device.productId + '/' + device.serialNumber + '/function/post';
  4165. let topics = [];
  4166. topics.push(topicStatus);
  4167. topics.push(topicProperty);
  4168. topics.push(topicFunction);
  4169. this.$mqttTool.subscribe(topics);
  4170. },
  4171. /** Mqtt取消订阅主题 */
  4172. mqttUnSubscribe(device) {
  4173. // 订阅当前设备状态和实时监测
  4174. let topicStatus = '/' + device.productId + '/' + device.serialNumber + '/status/post';
  4175. let topicProperty = '/' + device.productId + '/' + device.serialNumber + '/property/post';
  4176. let topicFunction = '/' + device.productId + '/' + device.serialNumber + '/function/post';
  4177. let topics = [];
  4178. topics.push(topicStatus);
  4179. topics.push(topicProperty);
  4180. topics.push(topicFunction);
  4181. console.log('取消订阅', topics);
  4182. this.$mqttTool.unsubscribe(topics);
  4183. },
  4184. /* Mqtt回调处理 */
  4185. mqttCallback() {
  4186. this.$mqttTool.client.on('message', (topic, message, buffer) => {
  4187. let topics = topic.split('/');
  4188. let productId = topics[1];
  4189. let deviceNum = topics[2];
  4190. console.log('接收到内容:'+message);
  4191. message = JSON.parse(message.toString());
  4192. if (topics[3] == 'status') {
  4193. console.log('接收到【设备状态-运行】主题:', topic);
  4194. console.log('接收到【设备状态-运行】内容:', message);
  4195. // 更新列表中设备的状态
  4196. if (this.deviceInfo.serialNumber == deviceNum) {
  4197. this.deviceInfo.status = message.status;
  4198. this.deviceInfo.isShadow = message.isShadow;
  4199. this.deviceInfo.rssi = message.rssi;
  4200. this.updateDeviceStatus(this.deviceInfo);
  4201. }
  4202. }
  4203. if (topics[3] == 'property' || topics[3] == 'function') {
  4204. console.log('接收到【物模型】主题:', topic);
  4205. console.log('接收到【物模型】内容:', message);
  4206. if(this.oneToMul){
  4207. let curTabId = this.childId;
  4208. let msg = [];
  4209. for (let i = 0; i < message.length; i++) {
  4210. let curMsg = message[i];
  4211. let id = curMsg.id;
  4212. let ids = id.split("_");
  4213. let value = curMsg.value;
  4214. if(ids.length == 2){
  4215. if(curTabId == ids[1]){
  4216. msg.push({id:ids[0],value:value});
  4217. }
  4218. }else{
  4219. msg.push(curMsg);
  4220. }
  4221. }
  4222. message = msg;
  4223. }
  4224. // 更新列表中设备的属性
  4225. if (this.deviceInfo.serialNumber == deviceNum) {
  4226. for (let j = 0; j < message.length; j++) {
  4227. let isComplete = false;
  4228. let msgId = message[j].id;
  4229. this.exchangeData(msgId,message[j]);
  4230. // 布尔类型
  4231. if(this.deviceInfo.boolList == null){
  4232. return;
  4233. }
  4234. for (let k = 0; k < this.deviceInfo.boolList.length && !isComplete; k++) {
  4235. if (this.deviceInfo.boolList[k].id == message[j].id) {
  4236. this.deviceInfo.boolList[k].shadow = message[j].value;
  4237. isComplete = true;
  4238. break;
  4239. }
  4240. }
  4241. // 枚举类型
  4242. for (let k = 0; k < this.deviceInfo.enumList.length && !isComplete; k++) {
  4243. if (this.deviceInfo.enumList[k].id == message[j].id) {
  4244. this.deviceInfo.enumList[k].shadow = message[j].value;
  4245. isComplete = true;
  4246. break;
  4247. }
  4248. }
  4249. // 字符串类型
  4250. for (let k = 0; k < this.deviceInfo.stringList.length && !isComplete; k++) {
  4251. if (this.deviceInfo.stringList[k].id == message[j].id) {
  4252. this.deviceInfo.stringList[k].shadow = message[j].value;
  4253. isComplete = true;
  4254. break;
  4255. }
  4256. }
  4257. // 数组类型
  4258. for (let k = 0; k < this.deviceInfo.arrayList.length && !isComplete; k++) {
  4259. if (this.deviceInfo.arrayList[k].id == message[j].id) {
  4260. this.deviceInfo.arrayList[k].shadow = message[j].value;
  4261. isComplete = true;
  4262. break;
  4263. }
  4264. }
  4265. // 整数类型
  4266. for (let k = 0; k < this.deviceInfo.integerList.length && !isComplete; k++) {
  4267. if (this.deviceInfo.integerList[k].id == message[j].id) {
  4268. this.deviceInfo.integerList[k].shadow = message[j].value;
  4269. isComplete = true;
  4270. break;
  4271. }
  4272. }
  4273. // 小数类型
  4274. for (let k = 0; k < this.deviceInfo.decimalList.length && !isComplete; k++) {
  4275. if (this.deviceInfo.decimalList[k].id == message[j].id) {
  4276. this.deviceInfo.decimalList[k].shadow = message[j].value;
  4277. isComplete = true;
  4278. break;
  4279. }
  4280. }
  4281. // 监测数据
  4282. for (let k = 0; k < this.deviceInfo.readOnlyList.length && !isComplete; k++) {
  4283. if (this.deviceInfo.readOnlyList[k].id == message[j].id) {
  4284. this.deviceInfo.readOnlyList[k].shadow = message[j].value;
  4285. // 更新图表
  4286. // for (let m = 0; m < this.monitorChart.length; m++) {
  4287. // if (message[j].id == this.monitorChart[m].data.id) {
  4288. // let data = [{
  4289. // value: message[j].value,
  4290. // name: this.monitorChart[m].data.name
  4291. // }];
  4292. // this.monitorChart[m].chart.setOption({
  4293. // series: [{
  4294. // data: data
  4295. // }]
  4296. // });
  4297. // break;
  4298. // }
  4299. // }
  4300. isComplete = true;
  4301. break;
  4302. }
  4303. }
  4304. }
  4305. this.parseEnumList(true);
  4306. this.checkJianyao();
  4307. if(this.planIngPopDlg){
  4308. this.calcuStep();
  4309. }
  4310. }
  4311. this.$forceUpdate();
  4312. }
  4313. });
  4314. },
  4315. checkJianyao(){
  4316. },
  4317. exchangeData(msgId,obj){
  4318. if(msgId === "TempSetting"){
  4319. this.temperature = obj.value;
  4320. }
  4321. if(msgId === "TimeSetting"){
  4322. this.temperatureTime = obj.value;
  4323. }
  4324. if(msgId === "CurrentTemp"){
  4325. this.currentTemperature = obj.value;
  4326. }
  4327. if(msgId === "HighTempTime"){
  4328. this.hightTemperature = obj.value;
  4329. }
  4330. if(msgId === "SealTemp"){//封口温度
  4331. if(!this.editing){
  4332. if(this.baozhuangFengkouSetting){
  4333. this.tempFengkouWendu = obj.value;
  4334. }else{
  4335. this.sealingTemperature = obj.value;
  4336. }
  4337. }
  4338. }
  4339. if(msgId === "BandingTemp"){//封边温度
  4340. if(!this.editing){
  4341. if(this.baozhuangFengbianSetting){
  4342. this.tempFengBianWendu = obj.value;
  4343. }else{
  4344. this.edegTemperature = obj.value;
  4345. }
  4346. }
  4347. }
  4348. if(msgId === "PackingVolume"){
  4349. if(!this.editing){
  4350. if(this.baozhuangRongLiangSetting){
  4351. }else{
  4352. this.packageVolume = obj.value;
  4353. }
  4354. }
  4355. }
  4356. if(msgId === "PackageQuantity"){
  4357. if(!this.editing){
  4358. if(this.baozhuangShuLIangSetting){
  4359. }else{
  4360. this.packageNumber = obj.value;
  4361. }
  4362. }
  4363. }
  4364. if(msgId === "LeftAppointmentTime"){
  4365. this.leftAppointmentTime = obj.value;
  4366. }
  4367. if(msgId === "SlowfireTiem"){
  4368. this.leftJianyaoTime = obj.value;
  4369. }
  4370. if(msgId === "CalibrationTemp"){
  4371. this.jiaozhunTemp = obj.value;
  4372. }
  4373. if(msgId === "TurnCurrent"){
  4374. this.turnCurrent = obj.value;
  4375. }
  4376. if(msgId === "ValidCurrent"){
  4377. this.validCurrent = obj.value;
  4378. }
  4379. if(msgId === "WaterVolume"){
  4380. this.waterVolume = parseInt(obj.value)/10;
  4381. }
  4382. if(msgId === "CurrentWaterVolume"){
  4383. this.currentWaterVolume = parseInt(obj.value)/10;
  4384. }
  4385. if(msgId === "HoldingTemp"){
  4386. this.baowenTemp = obj.value;
  4387. }
  4388. if(msgId === "HoldingTime"){
  4389. this.baowenTime = obj.value
  4390. }
  4391. if(msgId === "AppointmentTime"){
  4392. this.planTime = obj.value
  4393. }
  4394. if(msgId === "PressTurn"){
  4395. this.pressTurn = obj.value
  4396. }
  4397. if(msgId === "ResetTurn"){
  4398. this.resetTurn = obj.value
  4399. }
  4400. if(msgId === "DrainageTurn"){
  4401. this.drainageTurn = obj.value
  4402. }
  4403. if(msgId === "TimeSetFirst"){
  4404. this.timeSettingFirst = obj.value;
  4405. }
  4406. if(msgId === "CurrentTimeSettingFirst"){
  4407. this.currentTimeSettingFirst = obj.value;
  4408. }
  4409. if(msgId === "TimeSetSecond"){
  4410. this.timeSettingSecond = obj.value;
  4411. }
  4412. if(msgId === "CurrentTimeSettingSecond"){
  4413. this.currentTimeSettingSecond = obj.value;
  4414. }
  4415. if(msgId === "SecondAddWaterTime"){
  4416. this.secondAddWaterTime = obj.value;
  4417. }
  4418. if(msgId === "CurrentSecondAddWaterTime"){
  4419. this.currentSecondAddWaterTime = obj.value;
  4420. }
  4421. if(msgId == "JianyaoMode"){
  4422. this.jianyaoMode = obj.value;
  4423. }
  4424. if(msgId == "FirstJianyaoMode"){
  4425. this.firstJianyaoMode = obj.value;
  4426. this.setStatusHandler()
  4427. }
  4428. if(msgId == "SecondJianyaoMode"){
  4429. this.secondJianyaoMode = obj.value;
  4430. setTimeout(()=>{
  4431. this.setStatusHandler()
  4432. })
  4433. }
  4434. if(msgId == "LeftTransferTime"){
  4435. this.leftTransferTime = obj.value
  4436. }
  4437. if(msgId == "SecondTime"){
  4438. this.SecondTime = obj.value
  4439. }
  4440. if(msgId == "FirstTemp"){
  4441. this.FirstTemp = obj.value
  4442. }
  4443. if(msgId == "FirstTime"){
  4444. this.FirstTime = obj.value
  4445. }
  4446. if(msgId == "SecondWaterVolume"){
  4447. this.secondWaterVolume = parseInt(obj.value)/10;
  4448. }
  4449. if(msgId == "TempSetFirst"){
  4450. this.tempSettingFirst = obj.value
  4451. }
  4452. },
  4453. /** 发布物模型 类型(1=属性,2=功能) */
  4454. publishThingsModel(device, model) {
  4455. // 获取缓存的Json物模型
  4456. cacheJsonThingsModel(device.productId).then(response => {
  4457. let thingsModel = JSON.parse(response.data);
  4458. let type = 0;
  4459. for (let i = 0; i < thingsModel.functions.length; i++) {
  4460. if (model.id == thingsModel.functions[i].id) {
  4461. type = 2;
  4462. break;
  4463. }
  4464. }
  4465. if (type == 0) {
  4466. for (let i = 0; i < thingsModel.properties.length; i++) {
  4467. if (model.id == thingsModel.properties[i].id) {
  4468. type = 1;
  4469. break;
  4470. }
  4471. }
  4472. }
  4473. if (type != 0) {
  4474. this.mqttPublish(type, device, [model]);
  4475. }
  4476. });
  4477. },
  4478. notifyError(res){
  4479. uni.showToast({
  4480. title:res,
  4481. icon:"error"
  4482. })
  4483. },
  4484. notifySuccess(res){
  4485. uni.showToast({
  4486. title:res,
  4487. icon:"success"
  4488. })
  4489. },
  4490. getDownloadUrl(path){
  4491. return this.firmware.downUrl +"/iot/tool/download?fileName="+ path;
  4492. },
  4493. /**
  4494. * Mqtt发布消息
  4495. * @type 类型(1=属性,2=功能,3=OTA升级,4=实时监测)
  4496. * @device 设备
  4497. * @model 物模型
  4498. * */
  4499. mqttPublish(type, device, modelList,needMore) {
  4500. if(this.deviceInfo.status != 3){
  4501. this.notifyError("请等待设备上线后操作")
  4502. return;
  4503. }
  4504. if(modelList.length == 0){
  4505. return;
  4506. }
  4507. let topic = "";
  4508. let message = ""
  4509. let oneToMul = false;
  4510. if(this.summary.length>1){
  4511. oneToMul = true;
  4512. }
  4513. if(!needMore){
  4514. oneToMul = false;
  4515. }
  4516. if(this.firstTab){
  4517. let isKaijiKey = false;
  4518. if(modelList.length >0){
  4519. let modelData = modelList[0];
  4520. let curKeyId = modelData.id;
  4521. if(!this.decoctControlOnOffStatus){
  4522. if(oneToMul){
  4523. if(curKeyId == 'PowerCtl'){
  4524. isKaijiKey = true;
  4525. }
  4526. }else{
  4527. if(curKeyId == 'PowerControl'){
  4528. isKaijiKey = true;
  4529. }
  4530. }
  4531. }else{
  4532. isKaijiKey = true;
  4533. }
  4534. }
  4535. // if(!isKaijiKey){
  4536. // this.notifyError("请先开机后再进行操作")
  4537. // return;
  4538. // }
  4539. }else{
  4540. let isKaijiKey = false;
  4541. if(modelList.length >0){
  4542. let modelData = modelList[0];
  4543. let curKeyId = modelData.id;
  4544. if(!this.packageControlOnOffStatus){
  4545. if(curKeyId == 'PackagePowerControl'){
  4546. isKaijiKey = true;
  4547. }
  4548. }else{
  4549. isKaijiKey = true;
  4550. }
  4551. }
  4552. if(!isKaijiKey){
  4553. this.notifyError("请先开机后再进行操作")
  4554. return;
  4555. }
  4556. }
  4557. if (type == 1) {
  4558. if (device.status == 3) {
  4559. // 属性,在线模式
  4560. topic = "/" + device.productId + "/" + device.serialNumber + "/property-online/get";
  4561. }
  4562. } else if (type == 2) {
  4563. if (device.status == 3) {
  4564. // 功能,在线模式
  4565. topic = "/" + device.productId + "/" + device.serialNumber + "/function-online/get";
  4566. }
  4567. } else if (type == 3) {
  4568. // OTA升级
  4569. topic = "/" + device.productId + "/" + device.serialNumber + "/ota/get";
  4570. } else {
  4571. return;
  4572. }
  4573. let title = "";
  4574. if(type == 1){
  4575. title = "属性";
  4576. }else if(type == 2){
  4577. title = "功能";
  4578. }else if(type == 3){
  4579. title = "升级";
  4580. }
  4581. if (topic != "") {
  4582. // 发布
  4583. let arr = [];
  4584. for (let i = 0; i <modelList.length; i++) {
  4585. let model = modelList[i];
  4586. let modelId = model.id;
  4587. if(oneToMul){
  4588. let childId = this.childId;
  4589. if(childId){
  4590. modelId = modelId+"_"+childId;
  4591. }
  4592. }
  4593. let shadow = model.shadow+"";
  4594. let modelType = model.type;
  4595. let shadowInt = parseInt(shadow,10);
  4596. let isNumber = false;
  4597. let shadowStr = shadowInt+"";
  4598. if(shadowStr === shadow){
  4599. isNumber = true;
  4600. shadow = shadowInt;
  4601. }
  4602. if(modelType == "integer" && !isNumber){
  4603. this.$modal.showToast(model.name+'的值必须是数字类型')
  4604. return;
  4605. }
  4606. arr.push({id:modelId,value:shadow+""});
  4607. }
  4608. message = JSON.stringify(arr);
  4609. let self = this;
  4610. this.$mqttTool.publish(topic, message,title).then(res => {
  4611. this.notifySuccess(res);
  4612. }).catch(res => {
  4613. this.notifyError(res);
  4614. });
  4615. }
  4616. },
  4617. startCheck(){
  4618. let self = this;
  4619. this.checkTimer = setTimeout(function (){
  4620. self.sendHeart();
  4621. self.startCheck();
  4622. },20000);
  4623. },
  4624. checkActive(){
  4625. let self = this;
  4626. setTimeout(function (){
  4627. if(self.publishMsg){
  4628. self.resetConn()
  4629. }
  4630. },3000);
  4631. },
  4632. sendHeart(){
  4633. console.log("发送心跳111")
  4634. let device = this.deviceInfo;
  4635. let self = this;
  4636. let topic = "/property-offline/post";
  4637. self.publishMsg = true;
  4638. self.checkActive();
  4639. this.$mqttTool.publish(topic, "ok", "heart").then(res => {
  4640. self.publishMsg = false;
  4641. }).catch(res => {
  4642. self.publishMsg = false;
  4643. });
  4644. },
  4645. resetConn(){
  4646. console.log("检测异常,重连")
  4647. this.$mqttTool.end();
  4648. this.$mqttTool.client = null;
  4649. this.connectMqtt();
  4650. this.getDetail();
  4651. }
  4652. }
  4653. }
  4654. </script>
  4655. <style>
  4656. .send_btn{
  4657. width: 160rpx !important;
  4658. height: 40rpx !important;
  4659. font-size: 10px !important;
  4660. margin-top: 5px;
  4661. }
  4662. uni-col{
  4663. width: 150px;
  4664. }
  4665. .header{
  4666. width: 100%;
  4667. background: white;
  4668. padding:0px 20rpx;
  4669. position: relative;
  4670. height: 100vh;
  4671. position: relative;
  4672. }
  4673. .content {
  4674. display: flex;
  4675. align-items: center;
  4676. justify-content: center;
  4677. color: #060B25;
  4678. }
  4679. .logo {
  4680. height: 200rpx;
  4681. width: 200rpx;
  4682. margin-top: 200rpx;
  4683. margin-left: auto;
  4684. margin-right: auto;
  4685. margin-bottom: 50rpx;
  4686. }
  4687. .text-area {
  4688. margin:10px;
  4689. padding-bottom: 10px;
  4690. justify-content: center;
  4691. width: 100%;
  4692. }
  4693. .grid-text {
  4694. font-size: 14px;
  4695. color: #909399;
  4696. padding: 10rpx 0 20rpx 0rpx;
  4697. /* #ifndef APP-PLUS */
  4698. box-sizing: border-box;
  4699. /* #endif */
  4700. }
  4701. .title {
  4702. font-size: 36rpx;
  4703. color: #8f8f94;
  4704. }
  4705. .item{
  4706. height: 80rpx;
  4707. line-height: 80rpx;
  4708. }
  4709. .bg{
  4710. position: relative;
  4711. }
  4712. .text-left{
  4713. color: #8A92A5;
  4714. }
  4715. .text-right{
  4716. color: #545454;
  4717. }
  4718. .prop-text{
  4719. position: relative;
  4720. margin:20rpx 0;
  4721. font-size: 26rpx;
  4722. }
  4723. .prop-card-area{
  4724. }
  4725. .prop-card{
  4726. width: 28%;
  4727. height: 100rpx;
  4728. text-align: center;
  4729. display: inline-block;
  4730. background: #F5FCFF;
  4731. box-shadow: 0px 9rpx 8rpx 0px rgba(0,0,0,0.09);
  4732. border-radius: 8rpx;
  4733. margin:0px 15rpx;
  4734. line-height: 48rpx;
  4735. }
  4736. .prop-card-top{
  4737. color: #3E9CFC;
  4738. }
  4739. .prop-card-bottom{
  4740. color: #8A92A5;
  4741. }
  4742. .tab-area {
  4743. background: white;
  4744. position: absolute;
  4745. left: 0px;
  4746. right: 0px;
  4747. top:480rpx;
  4748. bottom:-20px;
  4749. min-height: 200rpx;
  4750. box-shadow: 0rpx 5rpx 27rpx 0rpx rgba(195, 195, 195, 0.4);
  4751. border-radius: 40rpx;
  4752. overflow-y: auto;
  4753. padding-bottom:80rpx;
  4754. }
  4755. .prop-item{
  4756. position: relative;
  4757. display: flex;
  4758. flex-direction: row;
  4759. height: 100rpx;
  4760. line-height: 100rpx;
  4761. margin:0 20rpx;
  4762. }
  4763. .prop-item-left{
  4764. color: #545454;
  4765. width: 100%;
  4766. font-size: 16px;
  4767. border-bottom: 1px solid lightgray;
  4768. margin-left: 120rpx;
  4769. }
  4770. .prop-item-image{
  4771. width: 120rpx;
  4772. height: 120rpx;
  4773. position: absolute;
  4774. bottom:-10rpx;
  4775. }
  4776. .prop-item-right{
  4777. position: absolute;
  4778. right:10rpx;
  4779. top:5rpx;
  4780. }
  4781. input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{
  4782. color:#666;
  4783. font-size:12px;
  4784. }
  4785. .clearfix::after {
  4786. content: "";
  4787. display: block;
  4788. clear: both;
  4789. }
  4790. .decoctControlHeader {
  4791. display: flex;
  4792. align-items: center;
  4793. font-weight: 600;
  4794. }
  4795. .decoctControlTop {
  4796. display: flex;
  4797. height: 240rpx;
  4798. border-bottom:1px #B2B2B2 dotted;
  4799. margin:0 40rpx;
  4800. }
  4801. .decoctControlTopLeft {
  4802. width:40%;
  4803. line-height: 2;
  4804. text-align: center;
  4805. margin: 0 15px;
  4806. position: relative;
  4807. }
  4808. .addTemperature {
  4809. border-radius:5px;
  4810. position:absolute;
  4811. background-color: dodgerblue;
  4812. color:white;
  4813. width: 30px;
  4814. height: 30px;
  4815. left:15px;
  4816. top:80px;
  4817. }
  4818. .addTemperatureBtn {
  4819. border-radius:10px;
  4820. position:absolute;
  4821. clip-path: polygon(50% 0,100% 100%,0 100%);
  4822. transform: scale(0.5);
  4823. left: 0;
  4824. top:0;
  4825. bottom: 0;
  4826. right: 0;
  4827. margin: auto;
  4828. }
  4829. .subTemperature {
  4830. border-radius:5px;
  4831. position:absolute;
  4832. background-color: dodgerblue;
  4833. color:white;
  4834. width: 30px;
  4835. height: 30px;
  4836. right:15px;
  4837. top:80px;
  4838. }
  4839. .subTemperatureBtn {
  4840. border-radius:10px;
  4841. position:absolute;
  4842. clip-path: polygon(50% 0,100% 100%,0 100%);
  4843. transform: scale(0.5);
  4844. left: 0;
  4845. top:0;
  4846. bottom: 0;
  4847. right: 0;
  4848. margin: auto;
  4849. }
  4850. .decoctControlTopRight {
  4851. width:40%;
  4852. line-height: 2;
  4853. text-align: center;
  4854. margin: 0 15px;
  4855. position: relative;
  4856. }
  4857. .decoctControlBottom {
  4858. border-bottom:1px #B2B2B2 dotted;
  4859. width:91vw;
  4860. margin:0 auto;
  4861. padding:10px;
  4862. display: flex;
  4863. justify-content:space-between;
  4864. align-items: center;
  4865. }
  4866. .addTime {
  4867. border-radius:5px;
  4868. position:absolute;
  4869. background-color: dodgerblue;
  4870. color:white;
  4871. width: 30px;
  4872. height: 30px;
  4873. left:15px;
  4874. top:80px;
  4875. }
  4876. .addTimeBtn {
  4877. border-radius:10px;
  4878. position:absolute;
  4879. clip-path: polygon(50% 0,100% 100%,0 100%);
  4880. transform: scale(0.5);
  4881. left: 0;
  4882. top:0;
  4883. bottom: 0;
  4884. right: 0;
  4885. margin: auto;
  4886. }
  4887. .subTime {
  4888. border-radius:5px;
  4889. position:absolute;
  4890. background-color: dodgerblue;
  4891. color:white;
  4892. width: 30px;
  4893. height: 30px;
  4894. right:15px;
  4895. top:80px;
  4896. }
  4897. .subTimeBtn {
  4898. border-radius:10px;
  4899. position:absolute;
  4900. clip-path: polygon(50% 0,100% 100%,0 100%);
  4901. transform: scale(0.5);
  4902. left: 0;
  4903. top:0;
  4904. bottom: 0;
  4905. right: 0;
  4906. margin: auto;
  4907. }
  4908. .packageControlBottomRight {
  4909. border-radius:5px;
  4910. padding:5px 10px;
  4911. margin-right: 15px;
  4912. background-color: #3c9cff;
  4913. color: #fff;
  4914. }
  4915. .packageControlBottomClear {
  4916. border-radius:5px;
  4917. padding:5px 10px;
  4918. background-color: #B2B2B2;
  4919. color: #fff;
  4920. }
  4921. .active_btn{
  4922. background-color: #3c9cff;
  4923. }
  4924. .baozhuang-sub{
  4925. right: 10rpx !important;
  4926. }
  4927. .baozhuang-add{
  4928. left: 6rpx !important;
  4929. }
  4930. .control-input-box{
  4931. display: flex;
  4932. flex-direction: row;
  4933. padding-left: 26rpx;
  4934. }
  4935. .control-input-box-danwei{
  4936. padding-top:12rpx;
  4937. margin-left:4rpx;
  4938. }
  4939. .tabs{
  4940. position: relative;
  4941. top:15vh;
  4942. }
  4943. .child_tab{
  4944. position: relative;
  4945. display: inline-block;
  4946. width: 25%;
  4947. height: 180rpx;
  4948. }
  4949. .child_img{
  4950. width: 50rpx;
  4951. height: 50rpx;
  4952. left: 66rpx;
  4953. top: 66rpx;
  4954. position: relative;
  4955. }
  4956. .child_title{
  4957. position: absolute;
  4958. left: 0px;
  4959. right: 0px;
  4960. text-align: center;
  4961. font-size: 12px;
  4962. bottom: -12rpx;
  4963. color: #060B25;
  4964. }
  4965. .control{
  4966. width: 100%;
  4967. position: relative;
  4968. }
  4969. .control_item{
  4970. position: relative;
  4971. width: 50%;
  4972. display: inline-block;
  4973. height: 150rpx;
  4974. }
  4975. .control_item_detail{
  4976. position: relative;
  4977. top:22rpx;
  4978. }
  4979. .control_item_left{
  4980. position:absolute;;
  4981. left:22%;
  4982. font-size: 55px;
  4983. z-index: 999;
  4984. top:-30rpx
  4985. }
  4986. .control_item_center{
  4987. position:absolute;;
  4988. left:34%;
  4989. top:0vh;
  4990. }
  4991. .control_item_right{
  4992. position:absolute;;
  4993. left:67%;
  4994. font-size: 34px;
  4995. z-index: 999;
  4996. }
  4997. .control_item_center_unit{
  4998. position: absolute;
  4999. left:26vw;
  5000. top: 0.8vh;
  5001. width:200rpx;
  5002. }
  5003. .control_item_title{
  5004. position: absolute;
  5005. bottom:34rpx;
  5006. font-size: 12px;
  5007. width: 100%;
  5008. text-align: center;
  5009. }
  5010. .bottom{
  5011. height: 190rpx;
  5012. position: absolute;
  5013. left: 0px;
  5014. width: 100%;
  5015. padding-top: 18rpx;
  5016. bottom: -8vh;
  5017. }
  5018. .bottom_item{
  5019. display: inline-block;
  5020. width: 20%;
  5021. font-size: 12px;
  5022. height: 100%;
  5023. position: relative;
  5024. text-align: center;
  5025. margin-top: 2vh;
  5026. }
  5027. .active_on{
  5028. color: #50ACFF;
  5029. }
  5030. .status_info{
  5031. position: absolute;
  5032. left: 5vw;
  5033. top: 10vh;
  5034. }
  5035. .status_detail{
  5036. display: flex;
  5037. flex-direction: row;
  5038. }
  5039. .status_text{
  5040. font-size: 16px;
  5041. }
  5042. .online_text{
  5043. font-size: 12px;
  5044. padding-top: 3px;
  5045. }
  5046. .online{
  5047. color: #017128;
  5048. }
  5049. .device_info{
  5050. font-size: 13px;
  5051. }
  5052. .control_area{
  5053. position: relative;
  5054. top:14vh;
  5055. }
  5056. .disabled_tab{
  5057. opacity: 0.4;
  5058. }
  5059. .roate{
  5060. transform: rotate(180deg);
  5061. }
  5062. </style>