detail_new_20250528.vue 176 KB

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