detail_new_20250528.vue 160 KB

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