detail_new_20250528.vue 181 KB

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