detail_new_20250528.vue 171 KB

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