detail.vue 121 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788
  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%;"'>
  4. <view class="status_info">
  5. <view class="status_detail">
  6. <view class="status_text">{{ getStatusText() }}</view>
  7. <view v-if="deviceInfo.status == 3" class="online_text online">·在线</view>
  8. <view v-if="deviceInfo.status == 4" class="online_text">·离线</view>
  9. </view>
  10. <view class="device_info">机器名称: {{deviceInfo.deviceName}}</view>
  11. </view>
  12. <view style="position: absolute;right:10vw;top:12vh;z-index: 9" @click="showDrawer">
  13. <image :src="imgUrl+'/detail/setting2.png'" style="width: 50rpx;height: 50rpx;"/>
  14. </view>
  15. <view style="position: relative;top:15vh;width: 100%;text-align: center">
  16. <image :src="productImage" :style="productSize"/>
  17. </view>
  18. <view class="tabs">
  19. <view class="child_tab" :class="firstMachine?'':'disabled_tab'" @click="changeTab(1,firstMachine)">
  20. <image :src="imgUrl+'/detail/tab.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  21. <image class="child_img" v-if="tabActive[0]" :src="imgUrl+'/detail/jianyao_on.png'" />
  22. <image class="child_img" v-if="!tabActive[0]" :src="imgUrl+'/detail/jianyao_off.png'" />
  23. <view class="child_title" :class="tabActive[0]?'active_on':''">
  24. 煎药机一
  25. </view>
  26. </view>
  27. <view class="child_tab" :class="secondMachine?'':'disabled_tab'" @click="changeTab(2,secondMachine)">
  28. <image :src="imgUrl+'/detail/tab.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  29. <image class="child_img" v-if="tabActive[1]" :src="imgUrl+'/detail/jianyao_on.png'" />
  30. <image class="child_img" v-if="!tabActive[1]" :src="imgUrl+'/detail/jianyao_off.png'" />
  31. <view class="child_title" :class="isPage(2)?'active_on':''">
  32. 煎药机二
  33. </view>
  34. </view>
  35. <view class="child_tab" :class="thirdMachine?'':'disabled_tab'" @click="changeTab(3,thirdMachine)">
  36. <image :src="imgUrl+'/detail/tab.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  37. <image class="child_img" v-if="tabActive[2]" :src="imgUrl+'/detail/jianyao_on.png'" />
  38. <image class="child_img" v-if="!tabActive[2]" :src="imgUrl+'/detail/jianyao_off.png'" />
  39. <view class="child_title" :class="tabActive[2]?'active_on':''">
  40. 煎药机三
  41. </view>
  42. </view>
  43. <view class="child_tab" :class="forthMachine?'':'disabled_tab'" @click="changeTab(4,forthMachine)">
  44. <image :src="imgUrl+'/detail/tab.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  45. <image class="child_img" v-if="firstTab" :src="imgUrl+'/detail/baozhuang_off.png'" />
  46. <image class="child_img" v-if="!firstTab" :src="imgUrl+'/detail/baozhuang_on.png'" />
  47. <view class="child_title" :class="firstTab?'':'active_on'">
  48. 包装机
  49. </view>
  50. </view>
  51. </view>
  52. <view class="control_area" v-if="firstTab" :style="boardStyle">
  53. <view class="control" v-if="boardType ==3">
  54. <view class="control_item">
  55. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  56. <view class="control_item_detail">
  57. <view class="control_item_left" @click="subTemperature(1)">-</view>
  58. <view class="control_item_center">
  59. <view style="position: absolute">
  60. <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>
  61. </view>
  62. </view>
  63. <view class="control_item_center_unit" :style="unitFixedStyle">℃</view>
  64. <view class="control_item_right" @click="addTemperature(1)">+</view>
  65. </view>
  66. <view class="control_item_title">
  67. 设置温度
  68. </view>
  69. </view>
  70. <view class="control_item" v-if="wenhuoTimeDlgShow">
  71. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  72. <view class="control_item_detail">
  73. <view class="control_item_left" @click="subTemperatureTime(1)">-</view>
  74. <view class="control_item_center">
  75. <view style="position: absolute;z-index: 999">
  76. <u-input customStyle="width:150rpx;border:0px;z-index: 999" disabledColor="white" v-model="temperatureTime"></u-input>
  77. </view>
  78. </view>
  79. <view class="control_item_center_unit" :style="unitFixedStyle">分钟</view>
  80. <view class="control_item_right" style="left: 74%;" @click="addTemperatureTime(1)">+</view>
  81. </view>
  82. <view class="control_item_title">
  83. 时间设置
  84. </view>
  85. </view>
  86. <view class="control_item" v-if="!wenhuoTimeDlgShow">
  87. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  88. <view class="control_item_detail">
  89. <view class="control_item_left" @click="subTemperatureTime(1)">-</view>
  90. <view class="control_item_center">
  91. <view style="position: absolute">
  92. <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>
  93. </view>
  94. </view>
  95. <view class="control_item_center_unit" :style="unitFixedStyle">分钟</view>
  96. <view class="control_item_right" style="left: 74%;" @click="addTemperatureTime(1)">+</view>
  97. </view>
  98. <view class="control_item_title">
  99. 时间设置
  100. </view>
  101. </view>
  102. <view class="control_item">
  103. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  104. <view class="control_item_detail">
  105. <view class="control_item_center">
  106. <u-input disabled customStyle="width:150rpx;border:0px;" disabledColor="white" :value="currentTemperature"></u-input>
  107. </view>
  108. <view class="control_item_center_unit" :style="unitFixedStyle">℃</view>
  109. </view>
  110. <view class="control_item_title">
  111. 当前温度
  112. </view>
  113. </view>
  114. <view class="control_item">
  115. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  116. <view class="control_item_detail">
  117. <view class="control_item_center">
  118. <u-input disabled customStyle="width:150rpx;border:0px;" disabledColor="white" :value="hightTemperature"></u-input>
  119. </view>
  120. <view class="control_item_center_unit" :style="unitFixedStyle">分钟</view>
  121. </view>
  122. <view class="control_item_title">
  123. 高温时间
  124. </view>
  125. </view>
  126. </view>
  127. <view class="control" v-if="boardType ==4">
  128. <view class="control_item" style="height: 370rpx" @click="modifyName">
  129. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  130. <view style="text-align: center;position: absolute;height: 370rpx;line-height: 370rpx;right:0px;left:0px;font-size: 14px;">
  131. {{deviceInfo.deviceName}}
  132. </view>
  133. </view>
  134. <view style="display: inline-block;
  135. width: 50%;position:relative;top:-38rpx">
  136. <view class="control_item" v-if="wenhuoTimeDlgShow" style="width: 100%;">
  137. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  138. <view class="control_item_detail">
  139. <view class="control_item_left" @click="subTemperatureTime(1)">-</view>
  140. <view class="control_item_center">
  141. <view style="position: absolute;z-index: 999">
  142. <u-input customStyle="width:150rpx;border:0px;z-index: 999" disabledColor="white" v-model="temperatureTime"></u-input>
  143. </view>
  144. </view>
  145. <view class="control_item_center_unit" :style="unitFixedStyle">分钟</view>
  146. <view class="control_item_right" style="left: 74%;" @click="addTemperatureTime(1)">+</view>
  147. </view>
  148. <view class="control_item_title">
  149. 时间设置
  150. </view>
  151. </view>
  152. <view class="control_item" v-if="!wenhuoTimeDlgShow" style="width: 100%;">
  153. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  154. <view class="control_item_detail">
  155. <view class="control_item_left" @click="subTemperatureTime(1)">-</view>
  156. <view class="control_item_center">
  157. <view style="position: absolute">
  158. <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>
  159. </view>
  160. </view>
  161. <view class="control_item_center_unit" :style="unitFixedStyle">分钟</view>
  162. <view class="control_item_right" style="left: 74%;" @click="addTemperatureTime(1)">+</view>
  163. </view>
  164. <view class="control_item_title">
  165. 时间设置
  166. </view>
  167. </view>
  168. <view class="control_item" style="width: 100%;">
  169. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  170. <view class="control_item_detail">
  171. <view class="control_item_center">
  172. <u-input disabled customStyle="width:150rpx;border:0px;" disabledColor="white" :value="currentTemperature"></u-input>
  173. </view>
  174. <view class="control_item_center_unit" :style="unitFixedStyle">℃</view>
  175. </view>
  176. <view class="control_item_title">
  177. 当前温度
  178. </view>
  179. </view>
  180. </view>
  181. </view>
  182. <view class="control" v-if="boardType ==5">
  183. <view class="control_item">
  184. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  185. <view class="control_item_detail">
  186. <view class="control_item_left" @click="subTemperature(1)">-</view>
  187. <view class="control_item_center">
  188. <view style="position: absolute">
  189. <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>
  190. </view>
  191. </view>
  192. <view class="control_item_center_unit" :style="unitFixedStyle">℃</view>
  193. <view class="control_item_right" @click="addTemperature(1)">+</view>
  194. </view>
  195. <view class="control_item_title">
  196. 设置温度
  197. </view>
  198. </view>
  199. <view class="control_item" v-if="wenhuoTimeDlgShow">
  200. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  201. <view class="control_item_detail">
  202. <view class="control_item_left" @click="subTemperatureTime(1)">-</view>
  203. <view class="control_item_center">
  204. <view style="position: absolute;z-index: 999">
  205. <u-input customStyle="width:150rpx;border:0px;z-index: 999" disabledColor="white" v-model="temperatureTime"></u-input>
  206. </view>
  207. </view>
  208. <view class="control_item_center_unit" :style="unitFixedStyle">分钟</view>
  209. <view class="control_item_right" style="left: 74%;" @click="addTemperatureTime(1)">+</view>
  210. </view>
  211. <view class="control_item_title">
  212. 时间设置
  213. </view>
  214. </view>
  215. <view class="control_item" v-if="!wenhuoTimeDlgShow">
  216. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  217. <view class="control_item_detail">
  218. <view class="control_item_left" @click="subTemperatureTime(1)">-</view>
  219. <view class="control_item_center">
  220. <view style="position: absolute">
  221. <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>
  222. </view>
  223. </view>
  224. <view class="control_item_center_unit" :style="unitFixedStyle">分钟</view>
  225. <view class="control_item_right" style="left: 74%;" @click="addTemperatureTime(1)">+</view>
  226. </view>
  227. <view class="control_item_title">
  228. 时间设置
  229. </view>
  230. </view>
  231. <view class="control_item">
  232. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  233. <view class="control_item_detail">
  234. <view class="control_item_center">
  235. <u-input disabled customStyle="width:150rpx;border:0px;" disabledColor="white" :value="currentTemperature"></u-input>
  236. </view>
  237. <view class="control_item_center_unit" :style="unitFixedStyle">℃</view>
  238. </view>
  239. <view class="control_item_title">
  240. 当前温度
  241. </view>
  242. </view>
  243. <view class="control_item">
  244. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  245. <view class="control_item_detail" style="">
  246. <view style="width: 50px;height: 150rpx;display: inline-block" >
  247. <image @click="setPressTurn" :src="imgUrl+'/detail/left_on.png'" v-if="pressTurn == 1" style="top:20rpx;
  248. left: 40rpx;width: 20px;height:15px;position: absolute;"/>
  249. <image @click="setPressTurn" :src="imgUrl+'/detail/left.png'" v-if="pressTurn == 0" style="top:20rpx;
  250. left: 40rpx;width: 20px;height:15px;position: absolute;"/>
  251. <view style="position: absolute;top:68rpx;left:40rpx;font-size: 12px;" :class="pressTurn == 1?'active_on':''">挤压</view>
  252. </view>
  253. <view style="display: inline-block; position: absolute;top:30rpx;width: 43%;" v-if="pressTurn == 1" class="roate">
  254. <view style="width: 100%;height: 6px;background: white;border-radius: 10px;border:1px solid lightgray">
  255. <view :style="lineProgreeStyle"></view>
  256. </view>
  257. </view>
  258. <view style="display: inline-block; position: absolute;top:30rpx;width: 43%;" v-if="resetTurn == 1">
  259. <view style="width: 100%;height: 6px;background: white;border-radius: 10px;border:1px solid lightgray">
  260. <view :style="lineProgreeStyle"></view>
  261. </view>
  262. </view>
  263. <view style="display: inline-block; position: absolute;top:30rpx;width: 43%;" v-if="resetTurn == 0 && pressTurn == 0">
  264. <view style="width: 100%;height: 6px;background: white;border-radius: 10px;border:1px solid lightgray">
  265. <view :style="lineProgreeStyle"></view>
  266. </view>
  267. </view>
  268. <view style="width: 50px;height: 150rpx;display: inline-block">
  269. <image @click="setResetTurn" :src="imgUrl+'/detail/right_on.png'" v-if="resetTurn == 1" style="top:20rpx;
  270. right: 40rpx;width: 20px;height:15px;position: absolute;;display: inline-block;"/>
  271. <image @click="setResetTurn" :src="imgUrl+'/detail/right.png'" v-if="resetTurn == 0" style="top:20rpx;
  272. right: 40rpx;width: 20px;height:15px;position: absolute;;display: inline-block;"/>
  273. <view style="position: absolute;top:68rpx;right:40rpx;font-size: 12px;" :class="resetTurn == 1?'active_on':''">复位</view>
  274. </view>
  275. </view>
  276. <view class="control_item_title">
  277. 电动挤压
  278. </view>
  279. </view>
  280. </view>
  281. <view class="bottom" v-if="boardType == 3">
  282. <image :src="imgUrl+'/detail/bg_large.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  283. <view class="bottom_item" @click="decoctControlOnOffChange">
  284. <image v-if="decoctControlOnOffStatus" :src="imgUrl+'/detail/open_on.png'" style="width: 32%;height:32%;"/>
  285. <image v-if="!decoctControlOnOffStatus" :src="imgUrl+'/detail/open_off.png'" style="width: 32%;height:32%;"/>
  286. <view :class="decoctControlOnOffStatus?'active_on':''">开关</view>
  287. </view>
  288. <view class="bottom_item" @click="decoctControlChange">
  289. <image v-if="decoctControlStatus" :src="imgUrl+'/detail/jianing_on.png'" style="width: 32%;height:32%;"/>
  290. <image v-if="!decoctControlStatus" :src="imgUrl+'/detail/jianing_off.png'" style="width: 32%;height:32%;"/>
  291. <view :class="decoctControlStatus?'active_on':''">煎药</view>
  292. </view>
  293. <view class="bottom_item" @click="stopDecoctControlChange">
  294. <image v-if="!decoctControlStatus" :src="imgUrl+'/detail/stop_on.png'" style="width: 32%;height:32%;"/>
  295. <image v-if="decoctControlStatus" :src="imgUrl+'/detail/stop_off.png'" style="width: 32%;height:32%;"/>
  296. <view :class="!decoctControlStatus?'active_on':''">停止</view>
  297. </view>
  298. <view class="bottom_item" @click="toPlan">
  299. <image v-if="leftAppointmentTime>0" :src="imgUrl+'/detail/plan_on.png'" style="width: 32%;height:32%;"/>
  300. <image v-else :src="imgUrl+'/detail/plan_off.png'" style="width: 32%;height:32%;"/>
  301. <view :class="leftAppointmentTime>0?'active_on':''">预约</view>
  302. </view>
  303. </view>
  304. <view class="bottom" v-if="boardType == 4" style="top:21vh">
  305. <image :src="imgUrl+'/detail/bg_large.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  306. <view class="bottom_item" >
  307. <view style="display: inline;" v-if="!decoctControlOnOffStatus" @click="decoctControlOnOffChange">
  308. <image :src="imgUrl+'/detail/jianing_off.png'" style="width: 32%;height:32%;"/>
  309. <view>煎药</view>
  310. </view>
  311. <view style="display: inline;" v-else>
  312. <image :src="imgUrl+'/detail/jianing_on.png'" style="width: 32%;height:32%;"/>
  313. <view class="active_on">煎药</view>
  314. </view>
  315. </view>
  316. <view class="bottom_item" >
  317. <view style="display: inline;" v-if="decoctControlOnOffStatus" @click="decoctControlOnOffChange">
  318. <image :src="imgUrl+'/detail/stop_off.png'" style="width: 32%;height:32%;"/>
  319. <view>停止</view>
  320. </view>
  321. <view style="display: inline;" v-else>
  322. <image :src="imgUrl+'/detail/stop_on.png'" style="width: 32%;height:32%;"/>
  323. <view class="active_on">停止</view>
  324. </view>
  325. </view>
  326. <view class="bottom_item" @click="toDevicePlan">
  327. <image v-if="devicePlanInfo!=null" :src="imgUrl+'/detail/plan_on.png'" style="width: 32%;height:32%;"/>
  328. <image v-else :src="imgUrl+'/detail/plan_off.png'" style="width: 32%;height:32%;"/>
  329. <view :class="devicePlanInfo!=null?'active_on':''">预约</view>
  330. </view>
  331. <view class="bottom_item" @click="skip(2)">
  332. <image :src="imgUrl+'/setting/kefu.png'" style="width: 40%;height:35%;"/>
  333. <view >客服</view>
  334. </view>
  335. </view>
  336. <view class="bottom" v-if="boardType == 5">
  337. <image :src="imgUrl+'/detail/bg_large.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  338. <view class="bottom_item" @click="decoctControlOnOffChange">
  339. <image v-if="decoctControlOnOffStatus" :src="imgUrl+'/detail/open_on.png'" style="width: 32%;height:32%;"/>
  340. <image v-if="!decoctControlOnOffStatus" :src="imgUrl+'/detail/open_off.png'" style="width: 32%;height:32%;"/>
  341. <view :class="decoctControlOnOffStatus?'active_on':''">开关</view>
  342. </view>
  343. <view class="bottom_item" @click="decoctControlChange">
  344. <image v-if="decoctControlStatus" :src="imgUrl+'/detail/jianing_on.png'" style="width: 32%;height:32%;"/>
  345. <image v-if="!decoctControlStatus" :src="imgUrl+'/detail/jianing_off.png'" style="width: 32%;height:32%;"/>
  346. <view :class="decoctControlStatus?'active_on':''">煎药</view>
  347. </view>
  348. <view class="bottom_item" @click="stopDecoctControlChange">
  349. <image v-if="!decoctControlStatus" :src="imgUrl+'/detail/stop_on.png'" style="width: 32%;height:32%;"/>
  350. <image v-if="decoctControlStatus" :src="imgUrl+'/detail/stop_off.png'" style="width: 32%;height:32%;"/>
  351. <view :class="!decoctControlStatus?'active_on':''">停止</view>
  352. </view>
  353. <view class="bottom_item" @click="toPlan">
  354. <image v-if="leftAppointmentTime>0" :src="imgUrl+'/detail/plan_on.png'" style="width: 32%;height:32%;"/>
  355. <image v-else :src="imgUrl+'/detail/plan_off.png'" style="width: 32%;height:32%;"/>
  356. <view :class="leftAppointmentTime>0?'active_on':''">预约</view>
  357. </view>
  358. </view>
  359. </view>
  360. <view class="control_area" v-if="!firstTab">
  361. <view class="control">
  362. <view class="control_item" v-if="fengbianDlgShow">
  363. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  364. <view class="control_item_detail">
  365. <view class="control_item_left" @click="subEdegTemperature(1)">-</view>
  366. <view class="control_item_center">
  367. <u-input customStyle="width:150rpx;border:0px;background:none;" disabledColor="white" placeholder="0" @confirm="propBlur(3)" v-model="setEdegTemperature"></u-input>
  368. </view>
  369. <view class="control_item_center_unit" :style="unitFixedStyle">℃</view>
  370. <view class="control_item_right" @click="addEdegTemperature(1)">+</view>
  371. </view>
  372. <view class="control_item_title">
  373. 设置温度
  374. </view>
  375. </view>
  376. <view class="control_item" v-if="!fengbianDlgShow">
  377. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  378. <view class="control_item_detail">
  379. <view class="control_item_left" @click="subEdegTemperature(1)">-</view>
  380. <view class="control_item_center">
  381. <u-input customStyle="width:150rpx;border:0px;background:none;" disabledColor="white" placeholder="0" @focus="propFocus(3)" @blur="propBlur(3)" v-model="edegTemperature"></u-input>
  382. </view>
  383. <view class="control_item_center_unit" :style="unitFixedStyle">℃</view>
  384. <view class="control_item_right" @click="addEdegTemperature(1)">+</view>
  385. </view>
  386. <view class="control_item_title">
  387. <view v-if="!baozhuangFengbianSetting">
  388. 封边温度
  389. </view>
  390. <view v-if="baozhuangFengbianSetting">
  391. 设置温度
  392. </view>
  393. </view>
  394. </view>
  395. <view class="control_item" v-if="fengkouDlgShow">
  396. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  397. <view class="control_item_detail">
  398. <view class="control_item_left" @click="subSealingTemperature(1)">-</view>
  399. <view class="control_item_center">
  400. <u-input customStyle="width:150rpx;border:0px;background:none;" disabledColor="white" placeholder="0" @blur="propBlur(4)" @confirm="propBlur(4)" v-model="setSealingTemperature"></u-input>
  401. </view>
  402. <view class="control_item_center_unit" :style="unitFixedStyle">℃</view>
  403. <view class="control_item_right" @click="addSealingTemperature(1)">+</view>
  404. </view>
  405. <view class="control_item_title">
  406. 设置温度
  407. </view>
  408. </view>
  409. <view class="control_item" v-if="!fengkouDlgShow">
  410. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  411. <view class="control_item_detail">
  412. <view class="control_item_left" @click="subSealingTemperature(1)">-</view>
  413. <view class="control_item_center">
  414. <u-input customStyle="width:150rpx;border:0px;background:none;" disabledColor="white" placeholder="0" @change="propChange(1)" @focus="propFocus(4)" @blur="propBlur(4)" v-model="sealingTemperature"></u-input>
  415. </view>
  416. <view class="control_item_center_unit" :style="unitFixedStyle">℃</view>
  417. <view class="control_item_right" @click="addSealingTemperature(1)">+</view>
  418. </view>
  419. <view class="control_item_title">
  420. <view v-if="!baozhuangFengkouSetting">
  421. 封口温度
  422. </view>
  423. <view v-if="baozhuangFengkouSetting">
  424. 设置温度
  425. </view>
  426. </view>
  427. </view>
  428. <view class="control_item">
  429. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  430. <view class="control_item_detail">
  431. <view class="control_item_left" @click="subPackageVolume()">-</view>
  432. <view class="control_item_center">
  433. <view style="position: absolute">
  434. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" @focus="propFocus(5)" @confirm="propBlur(5)" @blur="propBlur(5)" v-model="packageVolume"></u-input>
  435. </view>
  436. </view>
  437. <view class="control_item_center_unit" :style="unitFixedStyle">ml</view>
  438. <view class="control_item_right" @click="addPackageVolume()">+</view>
  439. </view>
  440. <view class="control_item_title">
  441. 包装容量
  442. </view>
  443. </view>
  444. <view class="control_item">
  445. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  446. <view class="control_item_detail">
  447. <view class="control_item_left" @click="subPackageNumber()">-</view>
  448. <view class="control_item_center">
  449. <view style="position: absolute">
  450. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" @focus="propFocus(6)" @confirm="propBlur(6)" @blur="propBlur(6)" v-model="packageNumber"></u-input>
  451. </view>
  452. </view>
  453. <view class="control_item_center_unit" :style="unitFixedStyle">袋</view>
  454. <view class="control_item_right" @click="addPackageNumber()">+</view>
  455. </view>
  456. <view class="control_item_title">
  457. 包装数量
  458. </view>
  459. </view>
  460. </view>
  461. <view class="bottom">
  462. <image :src="imgUrl+'/detail/bg_large.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  463. <view class="bottom_item" @click="packageControlOnOffChange">
  464. <image v-if="packageControlOnOffStatus" :src="imgUrl+'/detail/open_on.png'" style="width: 32%;height:32%;"/>
  465. <image v-if="!packageControlOnOffStatus" :src="imgUrl+'/detail/open_off.png'" style="width: 32%;height:32%;"/>
  466. <view :class="packageControlOnOffStatus?'active_on':''">开关</view>
  467. </view>
  468. <view class="bottom_item" @click="turnChange(1)">
  469. <image v-if="qitingTurn" :src="imgUrl+'/detail/open_on.png'" style="width: 32%;height:32%;"/>
  470. <image v-if="!qitingTurn" :src="imgUrl+'/detail/open_off.png'" style="width: 32%;height:32%;"/>
  471. <view :class="qitingTurn?'active_on':''">启停</view>
  472. </view>
  473. <view class="bottom_item" @click="turnChange(2)">
  474. <image v-if="baozhuangTurn" :src="imgUrl+'/detail/bao_on.png'" style="width: 32%;height:32%;"/>
  475. <image v-if="!baozhuangTurn" :src="imgUrl+'/detail/bao_off.png'" style="width: 32%;height:32%;"/>
  476. <view :class="baozhuangTurn?'active_on':''">包装</view>
  477. </view>
  478. <view class="bottom_item" @click="turnChange(3)">
  479. <image v-if="qingxiTurn" :src="imgUrl+'/detail/xi_on.png'" style="width: 32%;height:32%;"/>
  480. <image v-if="!qingxiTurn" :src="imgUrl+'/detail/xi_off.png'" style="width: 32%;height:32%;"/>
  481. <view :class="qingxiTurn?'active_on':''">清洗</view>
  482. </view>
  483. </view>
  484. </view>
  485. </view>
  486. <u-popup :show="false" @close="closePop" mode="center" bgColor="transparent" :closeable="true">
  487. <view style="position: relative;width: 500rpx;height:300rpx;background: none">
  488. <view class="control_item" style="width: 100%" v-if="fengbianDlgShow">
  489. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  490. <view class="control_item_detail">
  491. <view class="control_item_left" @click="subEdegTemperature(1)">-</view>
  492. <view class="control_item_center">
  493. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" @change="changeEdegTemperature" v-model="setEdegTemperature"></u-input>
  494. </view>
  495. <view class="control_item_center_unit" :style="unitFixedStyle1">℃</view>
  496. <view class="control_item_right" @click="addEdegTemperature(1)">+</view>
  497. </view>
  498. <view class="control_item_title">
  499. 封边温度设置
  500. </view>
  501. </view>
  502. <view class="control_item" style="width: 100%" v-if="fengkouDlgShow">
  503. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  504. <view class="control_item_detail">
  505. <view class="control_item_left" @click="subSealingTemperature(1)">-</view>
  506. <view class="control_item_center">
  507. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" @change="changeSealingTemperature" v-model="setSealingTemperature"></u-input>
  508. </view>
  509. <view class="control_item_center_unit" :style="unitFixedStyle1">℃</view>
  510. <view class="control_item_right" @click="addSealingTemperature(1)">+</view>
  511. </view>
  512. <view class="control_item_title">
  513. 封口温度设置
  514. </view>
  515. </view>
  516. <view class="control_item" style="width: 100%" v-if="wenhuoTimeDlgShow">
  517. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  518. <view class="control_item_detail">
  519. <view class="control_item_left" @click="subTemperatureTime()">-</view>
  520. <view class="control_item_center">
  521. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" @change="changeTemperatureTime()" v-model="temperatureTime"></u-input>
  522. </view>
  523. <view class="control_item_center_unit" :style="unitFixedStyle1">℃</view>
  524. <view class="control_item_right" @click="addTemperatureTime()">+</view>
  525. </view>
  526. <view class="control_item_title">
  527. 文火时间
  528. </view>
  529. </view>
  530. </view>
  531. </u-popup>
  532. <u-popup :show="planPopDlg" @close="closePlanPop" mode="center" :closeable="true">
  533. <view style="position: relative;width: 400rpx;background: none;padding:40rpx;">
  534. <view class="control_item" style="width: 100%">
  535. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  536. <view class="control_item_detail">
  537. <view class="control_item_left" @click="subPlanTime(1)" style="left: 18%;">-</view>
  538. <view class="control_item_center">
  539. <view style="position: absolute">
  540. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" v-model="planTime"></u-input>
  541. </view>
  542. </view>
  543. <view class="control_item_center_unit" :style="unitFixedStyle">分钟</view>
  544. <view class="control_item_right" style="left: 80%;" @click="addPlanTime(1)">+</view>
  545. </view>
  546. <view class="control_item_title">
  547. 预约时间
  548. </view>
  549. </view>
  550. <view class="control_item" style="width: 100%">
  551. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  552. <view class="control_item_detail">
  553. <view class="control_item_left" @click="subTemperatureTime()" style="left: 18%;">-</view>
  554. <view class="control_item_center">
  555. <view style="position: absolute">
  556. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" @change="changeTemperatureTime()" v-model="temperatureTime"></u-input>
  557. </view>
  558. </view>
  559. <view class="control_item_center_unit" :style="unitFixedStyle">分钟</view>
  560. <view class="control_item_right" @click="addTemperatureTime()" style="left: 80%;">+</view>
  561. </view>
  562. <view class="control_item_title">
  563. 时间设置
  564. </view>
  565. </view>
  566. <view>
  567. <button style="background: white;" @click="plan">确认</button>
  568. </view>
  569. </view>
  570. </u-popup>
  571. <!-- 预约框-->
  572. <u-popup :show="yuyueIngPop" @close="closeYuyueIngPop" mode="center" :closeable="true">
  573. <view style="position: relative;width: 400rpx;background: none;padding:40rpx;">
  574. <view class="control_item" style="width: 100%">
  575. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  576. <view class="control_item_detail">
  577. <view class="control_item_center">
  578. <u-input customStyle="width:150rpx;border:0px;padding:0px" disabledColor="white" :value="leftAppointmentTime"></u-input>
  579. </view>
  580. <view class="control_item_center_unit" :style="unitFixedStyle">℃</view>
  581. </view>
  582. <view class="control_item_title">
  583. 剩余时间
  584. </view>
  585. </view>
  586. <view>
  587. <button style="background: white;" @click="cancelPlan">取消</button>
  588. </view>
  589. </view>
  590. </u-popup>
  591. <u-popup :show="planIngPopDlg" @close="closePlanIngPop" mode="center" :closeable="true">
  592. <view style="position: relative;width: 400rpx;background: none;padding:40rpx;">
  593. <view class="control_item" style="width: 100%">
  594. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  595. <view class="control_item_detail" style="width: 100%; padding: 40rpx;margin-bottom:10rpx;">
  596. <u-line-progress :percentage="step" activeColor="#50ACFF"></u-line-progress>
  597. </view>
  598. <view class="control_item_title" v-if="leftAppointmentTime>0">
  599. 预约煎药中,倒计时{{leftAppointmentTime}}分钟
  600. </view>
  601. <view class="control_item_title" v-else>
  602. <view v-if="leftJianyaoTime>0">
  603. 正在熬制,请稍等
  604. </view>
  605. <view v-else>
  606. 煎药完成
  607. </view>
  608. </view>
  609. </view>
  610. <view class="control_item" style="width: 100%">
  611. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  612. <view class="control_item_detail">
  613. <view class="control_item_center">
  614. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" :value="currentTemperature"></u-input>
  615. </view>
  616. <view class="control_item_center_unit" :style="unitFixedStyle">℃</view>
  617. </view>
  618. <view class="control_item_title">
  619. 当前温度
  620. </view>
  621. </view>
  622. <view class="control_item" style="width: 100%">
  623. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  624. <view class="control_item_detail">
  625. <view class="control_item_center">
  626. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" :value="leftJianyaoTime"></u-input>
  627. </view>
  628. <view class="control_item_center_unit" :style="unitFixedStyle">分钟</view>
  629. </view>
  630. <view class="control_item_title">
  631. 文火倒计时
  632. </view>
  633. </view>
  634. <!-- <view>-->
  635. <!-- <button style="background: white;" @click="cancelPlan">暂停</button>-->
  636. <!-- </view>-->
  637. </view>
  638. </u-popup>
  639. <uni-drawer ref="showLeft" :width="320" :maskClick="true" mode="right" @change="change($event,'showLeft')">
  640. <scroll-view style="height: 88%;padding:20% 0%;" scroll-y="true">
  641. <view style="text-align:center">设置</view>
  642. <view>
  643. <!-- <view class="prop-item">-->
  644. <!-- <view class="prop-item-image">-->
  645. <!-- <image :src="imgUrl+'/setting/net.png'" style="width: 100%;height:100%;"/>-->
  646. <!-- </view>-->
  647. <!-- <view class="prop-item-left">网络连接</view>-->
  648. <!-- <view class="prop-item-right">-->
  649. <!-- <view v-if="deviceInfo.status == 3">-->
  650. <!-- 已连接-->
  651. <!-- </view>-->
  652. <!-- <view v-else>-->
  653. <!-- 未连接-->
  654. <!--&lt;!&ndash; <uni-icons type="forward" size="16"></uni-icons>&ndash;&gt;-->
  655. <!-- </view>-->
  656. <!-- </view>-->
  657. <!-- </view>-->
  658. <view class="prop-item" v-if="firstTab">
  659. <view class="prop-item-image">
  660. <image :src="imgUrl+'/setting/oper_temp.png'" style="width: 100%;height:100%;"/>
  661. </view>
  662. <view class="prop-item-left">温度校准</view>
  663. <view class="prop-item-right" @click="showJiaozhunProp">
  664. {{jiaozhunTemp}}℃<uni-icons type="forward" size="16"></uni-icons>
  665. </view>
  666. </view>
  667. <view class="prop-item" v-if="firstTab && boardType == 5">
  668. <view class="prop-item-image">
  669. <image :src="imgUrl+'/setting/current_icon6.png'" style="width: 100%;height:100%;"/>
  670. </view>
  671. <view class="prop-item-left">当前扭力</view>
  672. <view class="prop-item-right" >
  673. {{validCurrent}}
  674. </view>
  675. </view>
  676. <view class="prop-item" v-if="firstTab && boardType == 5">
  677. <view class="prop-item-image">
  678. <image :src="imgUrl+'/setting/current_icon5.png'" style="width: 100%;height:100%;"/>
  679. </view>
  680. <view class="prop-item-left">扭力设置</view>
  681. <view class="prop-item-right" @click="showLiuProp">
  682. {{turnCurrent}}<uni-icons type="forward" size="16"></uni-icons>
  683. </view>
  684. </view>
  685. <view class="prop-item" v-if="firstTab">
  686. <view class="prop-item-image">
  687. <image :src="imgUrl+'/setting/list.png'" style="width: 100%;height:100%;"/>
  688. </view>
  689. <view class="prop-item-left">工作模式</view>
  690. <view class="prop-item-right" @click="showWorkPicker">
  691. <view v-if="workMode == 1">
  692. 1<uni-icons type="forward" size="16"></uni-icons>
  693. </view>
  694. <view v-if="workMode == 2">
  695. 2<uni-icons type="forward" size="16"></uni-icons>
  696. </view>
  697. <view v-if="workMode == 3">
  698. 3<uni-icons type="forward" size="16"></uni-icons>
  699. </view>
  700. </view>
  701. </view>
  702. <view class="prop-item">
  703. <view class="prop-item-image">
  704. <image :src="imgUrl+'/setting/no.png'" style="width: 100%;height:100%;"/>
  705. </view>
  706. <view class="prop-item-left">二维码编号</view>
  707. <view class="prop-item-right">
  708. <text class="text-right">{{deviceInfo.qrcodeId==null?"未绑定":deviceInfo.qrcodeId}}</text>
  709. </view>
  710. </view>
  711. <view class="prop-item">
  712. <view class="prop-item-image">
  713. <image :src="imgUrl+'/setting/no.png'" style="width: 100%;height:100%;"/>
  714. </view>
  715. <view class="prop-item-left">设备编号</view>
  716. <view class="prop-item-right">
  717. <text class="text-right">{{deviceInfo.serialNumber}}</text>
  718. </view>
  719. </view>
  720. <view class="prop-item">
  721. <view class="prop-item-image">
  722. <image :src="imgUrl+'/setting/learn.png'" style="width: 100%;height:100%;"/>
  723. </view>
  724. <view class="prop-item-left">使用教程</view>
  725. <view class="prop-item-right" @click="skip(1)">
  726. <uni-icons type="forward" size="16"></uni-icons>
  727. </view>
  728. </view>
  729. <view class="prop-item">
  730. <view class="prop-item-image">
  731. <image :src="imgUrl+'/setting/video.png'" style="width: 100%;height:100%;"/>
  732. </view>
  733. <view class="prop-item-left">维修视频</view>
  734. <view class="prop-item-right" @click="skip(1)">
  735. <uni-icons type="forward" size="16"></uni-icons>
  736. </view>
  737. </view>
  738. <view class="prop-item">
  739. <view class="prop-item-image">
  740. <image :src="imgUrl+'/setting/upload.png'" style="width: 100%;height:100%;"/>
  741. </view>
  742. <view class="prop-item-left">在线升级</view>
  743. <view class="prop-item-right" @click="getUpdateInfo">
  744. <uni-icons type="forward" size="16"></uni-icons>
  745. </view>
  746. </view>
  747. <view class="prop-item">
  748. <view class="prop-item-image">
  749. <image :src="imgUrl+'/setting/shou.png'" style="width: 100%;height:100%;"/>
  750. </view>
  751. <view class="prop-item-left">售后服务</view>
  752. <view class="prop-item-right" @click="skip(2)">
  753. <uni-icons type="forward" size="16"></uni-icons>
  754. </view>
  755. </view>
  756. <view class="prop-item">
  757. <view class="prop-item-image">
  758. <image :src="imgUrl+'/setting/reset.png'" style="width: 100%;height:100%;"/>
  759. </view>
  760. <view class="prop-item-left">恢复出厂</view>
  761. <view class="prop-item-right" @click="reset">
  762. <uni-icons type="forward" size="16"></uni-icons>
  763. </view>
  764. </view>
  765. <view class="prop-item">
  766. <view class="prop-item-image">
  767. <image :src="imgUrl+'/setting/runinfo.png'" style="width: 100%;height:100%;"/>
  768. </view>
  769. <view class="prop-item-left">修改名称</view>
  770. <view class="prop-item-right" @click="modifyName">
  771. <uni-icons type="forward" size="16"></uni-icons>
  772. </view>
  773. </view>
  774. </view>
  775. </scroll-view>
  776. </uni-drawer>
  777. <u-popup :show="jiaozhunPopDlg" @close="closejiaozhunPop" mode="center" :closeable="true">
  778. <view style="position: relative;width: 400rpx;background: none;padding:40rpx;">
  779. <view class="control_item" style="width: 100%">
  780. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  781. <view class="control_item_detail">
  782. <view class="control_item_left" @click="subJiaoZhunTemperature(1)" style="left: 18%;">-</view>
  783. <view class="control_item_center">
  784. <view style="position: absolute">
  785. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" v-model="jiaozhunTemp_temp"></u-input>
  786. </view>
  787. </view>
  788. <view class="control_item_center_unit" :style="unitFixedStyle">℃</view>
  789. <view class="control_item_right" @click="addJiaoZhunTemperature(1)" style="left: 80%;">+</view>
  790. </view>
  791. <view class="control_item_title">
  792. 校准温度
  793. </view>
  794. </view>
  795. <view>
  796. <button style="background: white;" @click="confirmJiaozhunTemp">确认</button>
  797. </view>
  798. </view>
  799. </u-popup>
  800. <u-popup :show="deviceYuyueIngPop" @close="closeDeviceYuyueIngPop" mode="center" :closeable="true">
  801. <view style="position: relative;width: 400rpx;background: none;padding:40rpx;">
  802. <view class="control_item" style="width: 100%">
  803. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  804. <view class="control_item_detail">
  805. <view class="control_item_center">
  806. <u-input customStyle="width:150rpx;border:0px;padding:0px" disabledColor="white" :value="devicePlanInfo.minute"></u-input>
  807. </view>
  808. <view class="control_item_center_unit" :style="unitFixedStyle">分</view>
  809. </view>
  810. <view class="control_item_title">
  811. 剩余时间
  812. </view>
  813. </view>
  814. <view>
  815. <button style="background: white;" @click="cancelDevicePlan">取消</button>
  816. </view>
  817. </view>
  818. </u-popup>
  819. <u-popup :show="devicePlanPopDlg" @close="closeDevicePlanPop" mode="center" :closeable="true">
  820. <view style="position: relative;width: 400rpx;background: none;padding:40rpx;">
  821. <view class="control_item" style="width: 100%">
  822. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  823. <view class="control_item_detail">
  824. <view class="control_item_left" @click="subDevicePlanTime(1)" style="left: 18%;">-</view>
  825. <view class="control_item_center">
  826. <view style="position: absolute">
  827. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" v-model="devicePlanTime"></u-input>
  828. </view>
  829. </view>
  830. <view class="control_item_center_unit" :style="unitFixedStyle">分钟</view>
  831. <view class="control_item_right" style="left: 80%;" @click="addDevicePlanTime(1)">+</view>
  832. </view>
  833. <view class="control_item_title">
  834. 预约时间
  835. </view>
  836. </view>
  837. <view>
  838. <button style="background: white;" @click="devicePlan">确认</button>
  839. </view>
  840. </view>
  841. </u-popup>
  842. <u-popup :show="liuzhuanPopDlg" @close="closeliuzhuanPop" mode="center" :closeable="true">
  843. <view style="position: relative;width: 400rpx;background: none;padding:40rpx;">
  844. <view class="control_item" style="width: 100%">
  845. <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
  846. <view class="control_item_detail">
  847. <view class="control_item_center">
  848. <view style="position: absolute">
  849. <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" v-model="setTurnCurrent"></u-input>
  850. </view>
  851. </view>
  852. <view class="control_item_center_unit" :style="unitFixedStyle">MA</view>
  853. </view>
  854. <view class="control_item_title">
  855. 扭力
  856. </view>
  857. </view>
  858. <view>
  859. <button style="background: white;" @click="confirmLiuzhuannCurrent">确认</button>
  860. </view>
  861. </view>
  862. </u-popup>
  863. <u-picker :show="showModelPicker" @cancel="closeModelPicker" @confirm="confirmMode" :columns="modeList" keyName="text"></u-picker>
  864. </view>
  865. </template>
  866. <script>
  867. import { getDetail,getDeviceStatus,cacheJsonThingsModel,reportError ,getDeviceRunTime,getLatestFirmware,bingDeviceDept,editDeviceName,getDevicePlan,addDevicePlan,delDevicePlan} from '@/api/device/device.js'
  868. import config from '@/config'
  869. export default {
  870. data(){
  871. return {
  872. lineProgreeStyle:"width:0%;background:#50ACFF;height: 100%;",
  873. liuzhuanPopDlg:false,
  874. turnPercent:1,
  875. onlineStatus:false,
  876. modeList:[[
  877. {id:1,text:"1"},
  878. {id:2,text:"2"},
  879. {id:3,text:"3"},
  880. ]],
  881. productSize:"",
  882. productImage:"",
  883. showModelPicker:false,
  884. unitFixedStyle:"",
  885. unitFixedStyle1:"",
  886. planTime:10,
  887. setSealingTemperature:160,
  888. setEdegTemperature:160,
  889. sealingTemperature:0,
  890. edegTemperature:0,
  891. hightTemperature:0,
  892. currentTemperature:0,
  893. temperatureTime:1,
  894. temperature:0,
  895. packageNumber:1,
  896. packageVolume:50,
  897. firstTab:true,
  898. decoctControlStatus:false,
  899. decoctControlOnOffStatus:false,
  900. packageControlOnOffStatus:false,
  901. subDecoctTabList:[
  902. {name:'子煎药1'},
  903. {name:'子煎药2'},
  904. {name:'子煎药3'},
  905. ],
  906. DecoctControlStatus:false,
  907. PackagControlStatus:false,
  908. baozhuangTurn:false,
  909. qitingTurn:false,
  910. qingxiTurn:false,
  911. subCurrent:0,
  912. current:0,
  913. inputStyle:{height:'44rpx','fontSize':'20rpx'},
  914. modelKey:['PowerControl','LockControl'],
  915. jianyaoKeys : ["TempSetting","TimeSetting"],
  916. baozhuangKeys:["SetSealTemp","SetBandingTemp","PackageQuantity","PackingVolume"],
  917. power:{
  918. loading:true,
  919. value:0,
  920. },
  921. lock:{
  922. loading:true,
  923. value:0,
  924. },
  925. showTimeDlg:false,
  926. showErrDlg:null,
  927. errorMsg:"asdasdasdasd",
  928. show:null,
  929. value:"",
  930. deviceInfo:{},
  931. id:0,
  932. summary:[
  933. ],
  934. tabs:[
  935. {tabName:"煎药控制"},
  936. {tabName:"包装控制"},
  937. ],
  938. activeName:0,
  939. childId:0,
  940. oneToMul:false,
  941. inputProp:[],
  942. watchProp:[],
  943. columns:[],
  944. location:{},
  945. sysDept:null,
  946. timeobj:{alltime:0,avgtime:0},
  947. publishMsg:false,
  948. checkTimer:null,
  949. functions:[],
  950. properties:[],
  951. propMap:{},
  952. jianyaoTimer:null,
  953. baozhuangTimer:null,
  954. editing:false,
  955. workMode:2,
  956. leftAppointmentTime:0,
  957. leftJianyaoTime:0,
  958. imgUrl:"",
  959. popDlg:false,
  960. fengbianDlgShow:false,
  961. fengkouDlgShow:false,
  962. wenhuoTimeDlgShow:false,
  963. planPopDlg:false,
  964. planIngPopDlg:false,
  965. maxWidth:320,
  966. jiaozhunTemp:0,//校准温度,
  967. jiaozhunTemp_temp:0,//校准温度,
  968. jiaozhunPopDlg:false,
  969. step:0,
  970. yuyueIngPop:false,
  971. firmware:{},
  972. jianyaoPopClose:true,
  973. tabIndex:1,
  974. appid:"wxfd7b1a0e03e9b7e9",
  975. firstMachine:true,
  976. secondMachine:false,
  977. thirdMachine:false,
  978. forthMachine:true,
  979. deviceType:1,
  980. tabActive:[true,false,false],
  981. resetDuration:4000,
  982. jianyaoWenduSetting:false,
  983. jianyaoShijianSetting:false,
  984. baozhuangFengbianSetting:false,
  985. baozhuangFengkouSetting:false,
  986. baozhuangRongLiangSetting:false,
  987. baozhuangShuLIangSetting:false,
  988. tempFengkouWendu:0,
  989. tempFengBianWendu:0,
  990. boardType:3,//板子类型
  991. lineTimer:null,
  992. validCurrent:0,//当前扭力
  993. turnCurrent:0,//堵转电流值
  994. setTurnCurrent:0,
  995. pressTurn:0,
  996. resetTurn:0,
  997. canGetPrsValue:false,//可以接收挤压的动画
  998. devicePlanInfo:null,//设备后台预约任务
  999. devicePlanPopDlg:false,
  1000. deviceYuyueIngPop:false,
  1001. devicePlanTime:10,
  1002. boardStyle:"",
  1003. }
  1004. },
  1005. onLoad: function(opt) {
  1006. this.id = opt.id;
  1007. // this.id = 61;
  1008. this.connectMqtt();
  1009. this.getDetail();
  1010. this.imgUrl = config.imgUrl
  1011. this.fixStyle();
  1012. // this.fixImage();
  1013. // console.log = function(){}
  1014. },
  1015. destroyed() {
  1016. // 取消订阅主题
  1017. this.mqttUnSubscribe(this.deviceInfo);
  1018. clearTimeout(this.checkTimer);
  1019. },
  1020. watch: {
  1021. turnPercent(newvalue){
  1022. // this.lineProgreeStyle = ""
  1023. this.lineProgreeStyle = "width:"+newvalue+"%;background:#50ACFF;height: 100%;";
  1024. },
  1025. pressTurn(newVal,oldValue) {
  1026. let self= this;
  1027. if(newVal == 1){
  1028. setTimeout(function(){
  1029. self.startProgressTimer(1);
  1030. },200);
  1031. }else{
  1032. clearInterval(this.lineTimer)
  1033. this.turnPercent = 0;
  1034. }
  1035. },
  1036. resetTurn(newVal){
  1037. let self= this;
  1038. if(newVal == 1){
  1039. setTimeout(function(){
  1040. self.startProgressTimer(2);
  1041. },200);
  1042. }else{
  1043. clearInterval(this.lineTimer)
  1044. this.turnPercent = 0;
  1045. }
  1046. }
  1047. },
  1048. methods:{
  1049. closeDeviceYuyueIngPop(){
  1050. this.deviceYuyueIngPop = false;
  1051. },
  1052. closeDevicePlanPop(){
  1053. this.devicePlanPopDlg = false;
  1054. },
  1055. devicePlan(){
  1056. let self = this;
  1057. if(this.devicePlanTime>600){
  1058. this.$modal.showToast('预约时间最大为600分钟')
  1059. return;
  1060. }
  1061. if(this.devicePlanTime == 0){
  1062. this.$modal.showToast('预约时间不能为空')
  1063. }else{
  1064. let child = this.childId;
  1065. let obj = {deviceNo:this.deviceInfo.serialNumber+"&&"+child,minute:this.devicePlanTime};
  1066. addDevicePlan(obj).then(res=>{
  1067. self.getDevicePlanInfo();
  1068. self.$modal.showToast('预约成功')
  1069. self.devicePlanPopDlg = false;
  1070. });
  1071. }
  1072. },
  1073. closeliuzhuanPop(){
  1074. this.liuzhuanPopDlg = false;
  1075. },
  1076. confirmLiuzhuannCurrent(){
  1077. if(this.setTurnCurrent<200 || this.setTurnCurrent>400){
  1078. this.notifyError("扭力范围为200-400")
  1079. return;
  1080. }
  1081. let arr = [];
  1082. let pressObj = {};
  1083. pressObj.id = "TurnCurrent";
  1084. pressObj.shadow = this.setTurnCurrent;
  1085. arr.push(pressObj);
  1086. this.mqttPublish(2,this.deviceInfo,arr)
  1087. this.closeliuzhuanPop();
  1088. },
  1089. setPressTurn(){
  1090. let self = this;
  1091. if(!this.decoctControlOnOffStatus){
  1092. this.notifyError("请先开机后再进行操作")
  1093. return;
  1094. }
  1095. let arr = [];
  1096. let currentPresturn = this.pressTurn;
  1097. let pressObj = {};
  1098. if(this.resetTurn == 1){
  1099. this.resetTurn = 0;
  1100. }
  1101. if(currentPresturn == 1){//代表要关闭
  1102. pressObj.id = "PressTurn";
  1103. pressObj.shadow = 0;
  1104. arr.push(pressObj);
  1105. this.turnPercent = 0;
  1106. this.pressTurn = 0;
  1107. }else{//代表要开启
  1108. pressObj.id = "PressTurn";
  1109. pressObj.shadow = 1;
  1110. arr.push(pressObj);
  1111. this.pressTurn = 1;
  1112. this.resetTurn = 0;
  1113. }
  1114. this.mqttPublish(2,this.deviceInfo,arr)
  1115. this.$forceUpdate()
  1116. this.canGetPrsValue = true;
  1117. setTimeout(function(){
  1118. self.canGetPrsValue = false;
  1119. },3000);
  1120. },
  1121. startProgressTimer(type){
  1122. let self = this;
  1123. if(self.lineTimer != null){
  1124. clearInterval(self.lineTimer)
  1125. }
  1126. if(type == 1){
  1127. self.lineTimer = setInterval(function(){
  1128. if(self.turnPercent >=100){
  1129. self.turnPercent = 1;
  1130. clearInterval(self.lineTimer);
  1131. self.startProgressTimer(1);
  1132. }
  1133. self.turnPercent +=2;
  1134. },100);
  1135. }else{
  1136. self.lineTimer = setInterval(function(){
  1137. if(self.turnPercent >=100){
  1138. self.turnPercent = 1;
  1139. clearInterval(self.lineTimer);
  1140. self.startProgressTimer(2);
  1141. }
  1142. self.turnPercent +=2;
  1143. },100);
  1144. }
  1145. },
  1146. setResetTurn(){
  1147. let self = this;
  1148. if(!this.decoctControlOnOffStatus){
  1149. this.notifyError("请先开机后再进行操作")
  1150. return;
  1151. }
  1152. if(this.pressTurn == 1){
  1153. this.pressTurn = 0;
  1154. }
  1155. let arr = [];
  1156. if(this.resetTurn == 1){
  1157. let pressObj = {};
  1158. pressObj.id = "ResetTurn";
  1159. pressObj.shadow = 0;
  1160. this.resetTurn = 0;
  1161. this.turnPercent = 0;
  1162. arr.push(pressObj);
  1163. }else{
  1164. let pressObj = {};
  1165. pressObj.id = "ResetTurn";
  1166. pressObj.shadow = 1;
  1167. this.resetTurn = 1;
  1168. this.pressTurn = 0;
  1169. let self= this;
  1170. arr.push(pressObj);
  1171. }
  1172. this.mqttPublish(2,this.deviceInfo,arr)
  1173. this.$forceUpdate()
  1174. this.canGetPrsValue = true;
  1175. this.canGetPrsValue = true;
  1176. setTimeout(function(){
  1177. self.canGetPrsValue = false;
  1178. },3000);
  1179. },
  1180. fixImage(heng){
  1181. let self = this;
  1182. wx.getSystemInfo({
  1183. success: res => {
  1184. const { windowWidth, windowHeight, statusBarHeight } = res;
  1185. if(heng){
  1186. let rate = 0.35;
  1187. if(windowHeight<800){
  1188. rate = 0.30;
  1189. }
  1190. let imgHeight = windowWidth*0.85;
  1191. let imageWidth = windowWidth * 1;
  1192. self.productSize = ";width:"+imageWidth+"px;height:"+imgHeight+"px;";
  1193. }else{
  1194. let rate = 0.35;
  1195. if(windowHeight<800){
  1196. rate = 0.30;
  1197. }
  1198. let imgHeight = windowHeight*rate;
  1199. let imageWidth = imgHeight * 0.6;
  1200. self.productSize = ";width:"+imageWidth+"px;height:"+imgHeight+"px;";
  1201. }
  1202. }
  1203. })
  1204. },
  1205. propChange(type){
  1206. // if(type == 1){
  1207. // }
  1208. },
  1209. propFocus(type){
  1210. if(type == 1){
  1211. this.jianyaoWenduSetting = true;
  1212. }
  1213. if(type == 2){
  1214. this.jianyaoShijianSetting = true;
  1215. }
  1216. if(type == 3){
  1217. this.baozhuangFengbianSetting = true;
  1218. this.tempFengBianWendu = this.edegTemperature;
  1219. this.edegTemperature = this.setEdegTemperature;
  1220. }
  1221. if(type == 4){
  1222. this.baozhuangFengkouSetting = true;
  1223. this.tempFengkouWendu = this.sealingTemperature;
  1224. this.sealingTemperature = this.setSealingTemperature;
  1225. }
  1226. if(type == 5){
  1227. this.baozhuangRongLiangSetting = true;
  1228. }
  1229. if(type == 6){
  1230. this.baozhuangShuLIangSetting = true;
  1231. }
  1232. },
  1233. autoBlur(type){
  1234. },
  1235. propBlur(type){
  1236. if(type == 1){
  1237. this.jianyaoWenduSetting = false;
  1238. this.changeTemperature();
  1239. }
  1240. if(type == 2){
  1241. this.temperatureTime = this.leftJianyaoTime;
  1242. this.changeTemperatureTime();
  1243. }
  1244. if(type == 3){
  1245. this.setEdegTemperature = this.edegTemperature;
  1246. this.changeEdegTemperature();
  1247. }
  1248. if(type == 4){
  1249. this.setSealingTemperature = this.sealingTemperature;
  1250. this.changeSealingTemperature();
  1251. }
  1252. if(type == 5){
  1253. this.changePackageVolume()
  1254. }
  1255. if(type == 6){
  1256. this.changePackageNumber();
  1257. }
  1258. },
  1259. modifyName(){
  1260. let self = this;
  1261. uni.showModal({
  1262. title: "修改设备名称",
  1263. editable: true,
  1264. placeholderText: "请输入设备名称",
  1265. content: this.deviceInfo.deviceName,
  1266. showCancel: true,
  1267. success: function (res) {
  1268. console.log(res);
  1269. if(res.confirm){
  1270. let content = res.content;
  1271. let obj = {"deviceId":self.id,deviceName:content};
  1272. editDeviceName(obj).then(res=>{
  1273. if(res.code == 200){
  1274. self.deviceInfo.deviceName = content;
  1275. self.$modal.showToast('修改成功')
  1276. }else{
  1277. self.$modal.showToast('修改失败,请稍后再试')
  1278. }
  1279. });
  1280. }
  1281. },
  1282. fail: function (res) {
  1283. console.log(res);
  1284. }
  1285. })
  1286. },
  1287. showWorkPicker(){
  1288. let self = this;
  1289. uni.showModal({
  1290. title: "提 示",
  1291. content: "非专业人员修改可能导致机器损坏",
  1292. confirmText:"确认",
  1293. success: function (res) {
  1294. if(res.confirm){
  1295. self.showModelPicker = true;
  1296. }
  1297. },
  1298. })
  1299. },
  1300. skip(type){
  1301. if(type == 1){
  1302. wx.navigateToMiniProgram({
  1303. appId: this.appid,
  1304. path: 'pages/news_details/help?id=25',
  1305. success(res) {
  1306. // 打开成功
  1307. },
  1308. fail(res){
  1309. console.log(res);
  1310. }
  1311. })
  1312. }else if(type == 2){
  1313. wx.openCustomerServiceChat({
  1314. extInfo: {url: 'https://work.weixin.qq.com/kfid/kfc4202b8764df71c0c'},
  1315. corpId: 'ww8e678fbe6f1079ba',
  1316. success(res) {
  1317. },
  1318. fail(res){
  1319. console.log(res);
  1320. }
  1321. })
  1322. }
  1323. },
  1324. isMulTab(index){
  1325. let type = this.deviceType;
  1326. if(this.secondMachine || this.secondMachine){
  1327. return true;
  1328. }
  1329. return false;
  1330. },
  1331. isPage(index){
  1332. if(this.tabIndex == index){
  1333. return true;
  1334. }
  1335. return false;
  1336. },
  1337. getUpdateInfo(){
  1338. let self = this;
  1339. getLatestFirmware(this.id).then(res=>{
  1340. self.firmware = res.data;
  1341. let curVersion = self.deviceInfo.firmwareVersion;
  1342. let onlineVersion = self.firmware.version
  1343. if(curVersion>=onlineVersion){
  1344. this.$modal.showToast('当前已经是最新版本')
  1345. }else{
  1346. uni.showModal({
  1347. title: '检测到新版本',
  1348. content: "当前版本:"+curVersion+",新版本:"+onlineVersion,
  1349. cancelText: '取消',
  1350. confirmText: '升级',
  1351. success: function(res) {
  1352. if (res.confirm) {
  1353. self.doUpdate();
  1354. }
  1355. }
  1356. })
  1357. }
  1358. });
  1359. },
  1360. doUpdate(){
  1361. if(this.deviceInfo.status != 3){
  1362. this.notifyError("请等待设备上线后操作")
  1363. return;
  1364. }
  1365. let device = this.deviceInfo;
  1366. let message = "";
  1367. let topic = "";
  1368. let title = "升级";
  1369. topic = "/" + device.productId + "/" + device.serialNumber + "/ota/get";
  1370. message = '{"version":"' + this.firmware.version + '","downloadUrl":"' + this.getDownloadUrl(this.firmware.filePath) + '","size":"'+this.firmware.size+'"}';
  1371. this.$mqttTool.publish(topic, message,title).then(res => {
  1372. this.notifySuccess(res);
  1373. }).catch(res => {
  1374. this.notifyError(res);
  1375. });
  1376. },
  1377. getStatusText(){
  1378. if(this.baozhuangRunning()){
  1379. return "工作中";
  1380. }
  1381. if(this.jianyaoIng()){
  1382. return "工作中";
  1383. }
  1384. if(this.leftAppointmentTime>0){
  1385. return "已预约";
  1386. }
  1387. return "空闲中";
  1388. },
  1389. closeYuyueIngPop(){
  1390. this.yuyueIngPop = false;
  1391. },
  1392. confirmMode(item){
  1393. console.log(item)
  1394. this.workMode = item.value[0].id;
  1395. this.setMode(this.workMode);
  1396. this.closeModelPicker();
  1397. },
  1398. closeModelPicker(){
  1399. this.showModelPicker = false;
  1400. },
  1401. confirmJiaozhunTemp(){
  1402. this.jiaozhunTemp = this.jiaozhunTemp_temp;
  1403. this.temperNumber();
  1404. this.closejiaozhunPop();
  1405. },
  1406. addJiaoZhunTemperature(){
  1407. this.jiaozhunTemp_temp ++;
  1408. if(this.jiaozhunTemp_temp>20){
  1409. this.jiaozhunTemp_temp = 20;
  1410. }
  1411. },
  1412. subJiaoZhunTemperature(){
  1413. this.jiaozhunTemp_temp --;
  1414. if(this.jiaozhunTemp_temp<-20){
  1415. this.jiaozhunTemp_temp = -20;
  1416. }
  1417. },
  1418. closejiaozhunPop(){
  1419. this.jiaozhunPopDlg = false;
  1420. },
  1421. showLiuProp(){
  1422. let self = this;
  1423. uni.showModal({
  1424. title: "提 示",
  1425. content: "非专业人员修改可能导致机器损坏",
  1426. confirmText:"确认",
  1427. success: function (res) {
  1428. if(res.confirm){
  1429. self.liuzhuanPopDlg = true;
  1430. }
  1431. },
  1432. })
  1433. },
  1434. showJiaozhunProp(){
  1435. let self = this;
  1436. uni.showModal({
  1437. title: "提 示",
  1438. content: "非专业人员修改可能导致机器损坏",
  1439. confirmText:"确认",
  1440. success: function (res) {
  1441. if(res.confirm){
  1442. self.jiaozhunTemp_temp = self.jiaozhunTemp;
  1443. self.jiaozhunPopDlg = true;
  1444. }
  1445. },
  1446. })
  1447. },
  1448. fixStyle(){
  1449. let self = this;
  1450. wx.getSystemInfo({
  1451. success: res => {
  1452. const { windowWidth, windowHeight, statusBarHeight } = res;
  1453. // 在这里可以获取到屏幕的宽度和高度
  1454. console.log(windowWidth, windowHeight, statusBarHeight);
  1455. if(windowWidth<=350){
  1456. self.unitFixedStyle = ";padding-top:6px;left: 28vw;";
  1457. self.unitFixedStyle1 = ";padding-top:6px;left: 28vw;";
  1458. }else if(windowWidth>=360){
  1459. self.unitFixedStyle = ";padding-top:10rpx;";
  1460. self.unitFixedStyle1 = ";padding-top:10rpx;left: 32vw;";
  1461. }
  1462. self.maxWidth = windowWidth;
  1463. }
  1464. })
  1465. },
  1466. closePlanIngPop(){
  1467. this.jianyaoPopClose = false;
  1468. this.planIngPopDlg = false;
  1469. },
  1470. closePlanPop(){
  1471. this.planPopDlg = false;
  1472. },
  1473. showBaozhuangDlg(type){
  1474. this.popDlg = true;
  1475. if(type == 1){
  1476. this.fengbianDlgShow = true;
  1477. }else if(type == 2){
  1478. this.fengkouDlgShow = true;
  1479. }else if(type == 3){
  1480. this.wenhuoTimeDlgShow = true;
  1481. }
  1482. },
  1483. closePop(){
  1484. this.popDlg = false;
  1485. this.fengbianDlgShow = false;
  1486. this.fengkouDlgShow = false;
  1487. this.wenhuoTimeDlgShow = false;
  1488. },
  1489. changeTab(index,tag){
  1490. if(!tag){
  1491. return;
  1492. }
  1493. let type = this.deviceType;
  1494. let self = this;
  1495. if(index == 2 || index == 3){
  1496. if(!this.isMulTab(index)){
  1497. return;
  1498. }
  1499. }
  1500. this.resetChoose();
  1501. if(index == 4){
  1502. if(!this.forthMachine){
  1503. return;
  1504. }
  1505. uni.showLoading({title:"加载中"});
  1506. getDeviceStatus(this.id,0).then(res=>{
  1507. let data =res.data;
  1508. this.deviceInfo = data;
  1509. self.parseStatusData(data)
  1510. setTimeout(function () {
  1511. uni.hideLoading();
  1512. self.firstTab = false;
  1513. },100);
  1514. });
  1515. }else{
  1516. let arr = ["a","b","c"]
  1517. if(this.isMulTab(index)){
  1518. this.childId =arr[index-1];
  1519. this.getDeviceStatus(function(){
  1520. self.tabIndex = index;
  1521. self.firstTab = true;
  1522. self.tabActive[index-1] = true;
  1523. self.$forceUpdate();
  1524. });
  1525. }else{
  1526. this.getDeviceStatus(function(){
  1527. self.tabIndex = index;
  1528. self.firstTab = true;
  1529. self.tabActive[index-1] = true;
  1530. self.$forceUpdate();
  1531. })
  1532. }
  1533. console.log(this.tabActive)
  1534. }
  1535. },
  1536. resetChoose(){
  1537. this.tabIndex = 0;
  1538. for (let i = 0; i < 3; i++) {
  1539. this.tabActive[i] = false;
  1540. }
  1541. },
  1542. changePackageVolume(){
  1543. if(this.packageVolume<50){
  1544. this.packageVolume = 50;
  1545. }
  1546. if(this.packageVolume>300){
  1547. this.packageVolume = 300;
  1548. }
  1549. this.sendBaozhuang("PackingVolume");
  1550. },
  1551. changePackageNumber(){
  1552. let min = 1;
  1553. let max = 999;
  1554. if(this.packageNumber<min){
  1555. this.packageNumber = min;
  1556. }
  1557. if(this.packageNumber>max){
  1558. this.packageNumber = max;
  1559. }
  1560. this.sendBaozhuang("PackageQuantity");
  1561. },
  1562. changeEdegTemperature(){
  1563. let min = 80;
  1564. let max = 220;
  1565. if(this.setEdegTemperature<min){
  1566. this.setEdegTemperature = min;
  1567. }
  1568. if(this.setEdegTemperature>max){
  1569. this.setEdegTemperature = max;
  1570. }
  1571. console.log("current setEdegTemperature is :"+this.setEdegTemperature)
  1572. this.sendBaozhuang("SetBandingTemp");
  1573. },
  1574. changeSealingTemperature(){
  1575. let min = 80;
  1576. let max = 220;
  1577. if(this.setSealingTemperature<min){
  1578. this.setSealingTemperature = min;
  1579. }
  1580. if(this.setSealingTemperature>max){
  1581. this.setSealingTemperature = max;
  1582. }
  1583. console.log("current setSealingTemperature is :"+this.setSealingTemperature)
  1584. this.sendBaozhuang("SetSealTemp");
  1585. },
  1586. changeTemperature(){
  1587. let max = 140;
  1588. let min = 100;
  1589. if(this.workMode == 2){
  1590. min = 1;
  1591. }
  1592. if(this.temperature<min){
  1593. this.temperature = min;
  1594. }
  1595. if(this.temperature>max){
  1596. this.temperature = max;
  1597. }
  1598. console.log("current temperature is :"+this.temperature)
  1599. this.sendJianYao("TempSetting");
  1600. },
  1601. changeTemperatureTime(){
  1602. let min = 1;
  1603. let max = 600;
  1604. if(this.temperatureTime<min){
  1605. this.temperatureTime = min;
  1606. }
  1607. if(this.temperatureTime>max){
  1608. this.temperatureTime = max;
  1609. }
  1610. console.log("current temperatureTime is :"+this.temperatureTime)
  1611. this.sendJianYao("TimeSetting");
  1612. },
  1613. jianyaoOpen(){
  1614. if(this.decoctControlOnOffStatus){
  1615. return true;
  1616. }
  1617. return false;
  1618. },
  1619. baozhuangOpen(){
  1620. if(this.packageControlOnOffStatus){
  1621. return true;
  1622. }
  1623. return false;
  1624. },
  1625. baozhuangRunning(){
  1626. if(this.qingxiTurn || this.baozhuangTurn || this.qitingTurn){
  1627. return true;
  1628. }
  1629. return false;
  1630. },
  1631. jianyaoIng(){
  1632. if(this.decoctControlStatus){
  1633. return true;
  1634. }
  1635. return false;
  1636. },
  1637. cancelPlan(){
  1638. let arr = [];
  1639. let obj = {};
  1640. obj.id = "AppointmentTime";
  1641. obj.shadow = 0;
  1642. arr.push(obj);
  1643. let self = this;
  1644. self.kongzhiJianyao(false,arr);
  1645. this.mqttPublish(2,this.deviceInfo,arr,true);
  1646. this.closeYuyueIngPop();
  1647. },
  1648. toPlan(){
  1649. if(!this.jianyaoOpen()){
  1650. this.$modal.showToast('煎药机已经关机')
  1651. return;
  1652. }
  1653. if(this.leftAppointmentTime>0){
  1654. this.yuyueIngPop = true;
  1655. }else{
  1656. if(this.jianyaoIng()){
  1657. this.$modal.showToast('正在煎药')
  1658. return;
  1659. }
  1660. this.planPopDlg = true;
  1661. }
  1662. },
  1663. toDevicePlan(){
  1664. let self = this;
  1665. if(this.decoctControlOnOffStatus){
  1666. this.$modal.showToast('请先关闭煎药后再预约')
  1667. return;
  1668. }
  1669. getDevicePlan(this.deviceInfo.serialNumber+"&&"+this.childId).then(res=>{
  1670. if(res.data != null){
  1671. self.deviceYuyueIngPop = true;
  1672. self.devicePlanInfo = res.data;
  1673. let minute = self.devicePlanInfo.minute;
  1674. if(minute<0){
  1675. minute = 10;
  1676. }
  1677. self.devicePlanInfo.minute = minute;
  1678. }else{
  1679. self.devicePlanPopDlg = true;
  1680. }
  1681. });
  1682. },
  1683. cancelDevicePlan(){
  1684. delDevicePlan(this.devicePlanInfo.id).then(res=>{
  1685. this.$modal.showToast('取消成功')
  1686. this.deviceYuyueIngPop = false;
  1687. this.devicePlanInfo = null;
  1688. })
  1689. },
  1690. getDevicePlanInfo(){
  1691. if(this.boardType != 4){
  1692. return;
  1693. }
  1694. let self = this;
  1695. self.devicePlanInfo = null;
  1696. getDevicePlan(this.deviceInfo.serialNumber+"&&"+self.childId).then(res=>{
  1697. if(res.data != null){
  1698. self.devicePlanInfo = res.data;
  1699. let minute = self.devicePlanInfo.minute;
  1700. if(minute<0){
  1701. minute = 10;
  1702. }
  1703. self.devicePlanInfo.minute = minute;
  1704. }
  1705. });
  1706. },
  1707. calcuStep(){
  1708. if(this.leftAppointmentTime>0){
  1709. this.step = 0;
  1710. return 0;
  1711. }
  1712. if(this.leftJianyaoTime == 0){
  1713. this.step = 100;
  1714. return ;
  1715. }
  1716. let currentTemperature = this.currentTemperature;
  1717. let hightTemperature = this.temperatureTime-this.leftJianyaoTime;//设置的高温时间
  1718. let targetTemperature =100;// this.temperature;
  1719. let targetTemperatureTime = this.temperatureTime;//倒计时
  1720. if(targetTemperature>100){
  1721. targetTemperature = 100;
  1722. }
  1723. let step = 0;
  1724. if(currentTemperature<100){
  1725. let tem = currentTemperature/200*100;
  1726. step = tem;
  1727. }else{
  1728. step = 50;
  1729. let rate = hightTemperature/targetTemperatureTime;
  1730. rate = rate/2;
  1731. rate = rate*100;
  1732. rate = rate.toFixed(2)
  1733. step = step + parseFloat(rate);
  1734. }
  1735. this.step = step.toFixed(2);
  1736. },
  1737. plan(){
  1738. let self = this;
  1739. if(this.planTime>600){
  1740. this.$modal.showToast('预约时间最大为600分钟')
  1741. return;
  1742. }
  1743. if(this.planTime == 0){
  1744. this.$modal.showToast('预约时间不能为空')
  1745. }else{
  1746. let arr = [];
  1747. let obj = {};
  1748. obj.id = "AppointmentTime";
  1749. obj.shadow = this.planTime;
  1750. arr.push(obj);
  1751. this.kongzhiJianyao(true,arr);
  1752. this.mqttPublish(2,this.deviceInfo,arr,true);
  1753. }
  1754. this.$modal.showToast('预约成功')
  1755. this.planPopDlg = false;
  1756. },
  1757. lockCtrl(key){
  1758. let arr = [];
  1759. let obj = {};
  1760. obj.id = "LockControl";
  1761. if(key == 0){
  1762. obj.shadow = 1;
  1763. this.lock.value = 1;
  1764. }else{
  1765. obj.shadow = 0;
  1766. this.lock.value = 0;
  1767. }
  1768. arr.push(obj);
  1769. this.mqttPublish(2,this.deviceInfo,arr)
  1770. },
  1771. setMode(type){
  1772. let arr = [];
  1773. let obj = {};
  1774. obj.id = "WorkMode";
  1775. obj.shadow = type;
  1776. arr.push(obj);
  1777. this.mqttPublish(2,this.deviceInfo,arr,true)
  1778. this.workMode = type;
  1779. },
  1780. temperNumber(value){
  1781. let arr = [];
  1782. let obj = {};
  1783. obj.id = "CalibrationTemp";
  1784. obj.shadow = this.jiaozhunTemp;
  1785. arr.push(obj);
  1786. this.mqttPublish(2,this.deviceInfo,arr,true)
  1787. },
  1788. volumeNumber(){
  1789. let arr = [];
  1790. let obj = {};
  1791. obj.id = "CapacityCalibration";
  1792. obj.shadow = 1;
  1793. arr.push(obj);
  1794. this.mqttPublish(2,this.deviceInfo,arr,true)
  1795. },
  1796. showConfirm(title,content,yes,no){
  1797. uni.showModal({
  1798. title: title,
  1799. content: content,
  1800. success: function (res) {
  1801. if (res.confirm) {
  1802. yes();
  1803. } else if (res.cancel) {
  1804. no();
  1805. }
  1806. }
  1807. });
  1808. },
  1809. reset(){
  1810. let self = this;
  1811. uni.showModal({
  1812. title: "提 示",
  1813. content: "非专业人员修改可能导致机器损坏",
  1814. confirmText:"确认",
  1815. success: function (res) {
  1816. if(res.confirm){
  1817. let arr = [];
  1818. let obj = {};
  1819. obj.id = "RestoreFactory";
  1820. obj.shadow = 1;
  1821. arr.push(obj);
  1822. self.mqttPublish(2,self.deviceInfo,arr)
  1823. }
  1824. },
  1825. })
  1826. },
  1827. turnChange(type){
  1828. let flag = false;
  1829. let obj = {};
  1830. if(type ==3){
  1831. if(this.baozhuangTurn || this.qitingTurn){
  1832. this.$modal.showToast("启停、包装、清洗不能同时打开")
  1833. return;
  1834. }
  1835. flag = this.qingxiTurn;
  1836. obj.id = "WashSwitch";
  1837. }else if(type == 2){
  1838. if(this.qingxiTurn || this.qitingTurn){
  1839. this.$modal.showToast("启停、包装、清洗不能同时打开")
  1840. return;
  1841. }
  1842. flag = this.baozhuangTurn;
  1843. obj.id = "PackageSwitch";
  1844. }else if(type == 1) {
  1845. if(this.qingxiTurn || this.baozhuangTurn){
  1846. this.$modal.showToast("启停、包装、清洗不能同时打开")
  1847. return;
  1848. }
  1849. flag = this.qitingTurn;
  1850. obj.id = "CarrybagSwitch";
  1851. }
  1852. flag = !flag;
  1853. let arr = [];
  1854. if(flag){
  1855. obj.shadow = 1;
  1856. }else{
  1857. obj.shadow = 0;
  1858. }
  1859. arr.push(obj);
  1860. this.mqttPublish(2,this.deviceInfo,arr)
  1861. },
  1862. addPackageVolume(){
  1863. this.packageVolume++;
  1864. if(this.packageVolume>300){
  1865. this.packageVolume = 50;
  1866. }
  1867. console.log("增加包装容量")
  1868. this.changePackageVolume()
  1869. },
  1870. subPackageVolume(){
  1871. this.packageVolume--;
  1872. if( this.packageVolume<50){
  1873. this.packageVolume = 300;
  1874. }
  1875. console.log("减少包装容量")
  1876. this.changePackageVolume()
  1877. },
  1878. addPackageNumber(){
  1879. this.packageNumber++;
  1880. if(this.packageNumber>999){
  1881. this.packageNumber = 1;
  1882. }
  1883. console.log("增加包装数量")
  1884. this.changePackageNumber();
  1885. },
  1886. subPackageNumber(){
  1887. this.packageNumber--;
  1888. if(this.packageNumber<1){
  1889. this.packageNumber = 999;
  1890. }
  1891. console.log("减少包装数量")
  1892. this.changePackageNumber();
  1893. },
  1894. addSealingTemperature(){
  1895. console.log("增加封口温度")
  1896. if(!this.fengkouDlgShow){
  1897. this.fengkouDlgShow = true;
  1898. }
  1899. this.setSealingTemperature++;
  1900. this.changeSealingTemperature();
  1901. },
  1902. subSealingTemperature(){
  1903. console.log("减少封口温度")
  1904. if(!this.fengkouDlgShow){
  1905. this.fengkouDlgShow = true;
  1906. }
  1907. this.setSealingTemperature--;
  1908. this.changeSealingTemperature();
  1909. },
  1910. addEdegTemperature(){
  1911. console.log("增加封边温度")
  1912. this.editing = true;
  1913. if(!this.fengbianDlgShow){
  1914. this.fengbianDlgShow = true;
  1915. }
  1916. this.setEdegTemperature++;
  1917. this.changeEdegTemperature();
  1918. },
  1919. subEdegTemperature(){
  1920. console.log("减少封边温度")
  1921. this.editing = true;
  1922. if(!this.fengbianDlgShow){
  1923. this.fengbianDlgShow = true;
  1924. }
  1925. this.setEdegTemperature--;
  1926. this.changeEdegTemperature();
  1927. },
  1928. addTemperatureTime(){
  1929. console.log("增加煎药时间")
  1930. if(!this.wenhuoTimeDlgShow){
  1931. this.wenhuoTimeDlgShow = true;
  1932. this.temperatureTime = this.leftJianyaoTime;
  1933. }
  1934. this.temperatureTime++;
  1935. this.changeTemperatureTime()
  1936. },
  1937. subTemperatureTime(){
  1938. console.log("减少煎药时间")
  1939. if(!this.wenhuoTimeDlgShow){
  1940. this.wenhuoTimeDlgShow = true;
  1941. this.temperatureTime = this.leftJianyaoTime;
  1942. }
  1943. this.temperatureTime--;
  1944. if(this.temperatureTime<=0){
  1945. this.temperatureTime = 1;
  1946. }
  1947. this.changeTemperatureTime()
  1948. },
  1949. addTemperature(){
  1950. console.log("增加煎药温度")
  1951. this.temperature++;
  1952. this.changeTemperature();
  1953. },
  1954. subTemperature(type){
  1955. console.log("减少煎药温度")
  1956. this.temperature--;
  1957. this.changeTemperature();
  1958. },
  1959. addPlanTime(){
  1960. console.log("增加预约时间")
  1961. this.planTime++;
  1962. },
  1963. subPlanTime(){
  1964. console.log("减少预约时间")
  1965. this.planTime--;
  1966. },
  1967. subDevicePlanTime(){
  1968. this.devicePlanTime--;
  1969. if(this.devicePlanTime<0){
  1970. this.devicePlanTime = 1;
  1971. }
  1972. console.log("减少预约时间")
  1973. },
  1974. addDevicePlanTime(){
  1975. console.log("增加预约时间")
  1976. this.devicePlanTime++;
  1977. },
  1978. sendBaozhuang(targetKey){
  1979. let self = this;
  1980. let arr = [];
  1981. if(this.baozhuangTimer != null){
  1982. clearTimeout(this.baozhuangTimer);
  1983. }
  1984. this.baozhuangTimer = setTimeout(function (){
  1985. for (let i = 0; i <this.baozhuangKeys.length; i++) {
  1986. let key = this.baozhuangKeys[i];
  1987. let obj = {};
  1988. obj.id = key;
  1989. if(key === "PackingVolume"){
  1990. obj.shadow = this.packageVolume;
  1991. setTimeout(function (){
  1992. self.baozhuangRongLiangSetting = false;
  1993. },self.resetDuration);
  1994. }
  1995. if(key === "PackageQuantity"){
  1996. obj.shadow = this.packageNumber;
  1997. setTimeout(function (){
  1998. self.baozhuangShuLIangSetting = false;
  1999. },self.resetDuration);
  2000. }
  2001. if(key === "SetSealTemp"){
  2002. obj.shadow = this.setSealingTemperature;
  2003. setTimeout(function (){
  2004. self.fengkouDlgShow = false;
  2005. self.baozhuangFengkouSetting = false;
  2006. self.sealingTemperature = self.tempFengKouWendu;;
  2007. },self.resetDuration);
  2008. }
  2009. if(key === "SetBandingTemp"){
  2010. obj.shadow = this.setEdegTemperature;
  2011. setTimeout(function (){
  2012. self.fengbianDlgShow = false;
  2013. self.baozhuangFengbianSetting = false;
  2014. self.edegTemperature = self.tempFengBianWendu;
  2015. },self.resetDuration);
  2016. }
  2017. if(targetKey == key){
  2018. arr.push(obj);
  2019. break;
  2020. }
  2021. }
  2022. this.mqttPublish(2,this.deviceInfo,arr)
  2023. }.bind(this),500);
  2024. },
  2025. sendJianYao(targetKey){
  2026. let self = this;
  2027. let arr = [];
  2028. if(this.jianyaoTimer != null){
  2029. clearTimeout(this.jianyaoTimer);
  2030. }
  2031. this.jianyaoTimer = setTimeout(function (){
  2032. for (let i = 0; i <this.jianyaoKeys.length; i++) {
  2033. let key = this.jianyaoKeys[i];
  2034. let obj = {};
  2035. obj.id = key;
  2036. if(key === "TempSetting"){
  2037. obj.shadow = this.temperature;
  2038. // setTimeout(function(){
  2039. // self.wenhuoTimeDlgShow = false;
  2040. // self.jianyaoShijianSetting = false;
  2041. // },self.resetDuration)
  2042. }
  2043. if(key === "TimeSetting"){
  2044. obj.shadow = this.temperatureTime;
  2045. self.leftJianyaoTime = this.temperatureTime;;
  2046. setTimeout(function(){
  2047. self.wenhuoTimeDlgShow = false;
  2048. self.jianyaoShijianSetting = false;
  2049. },self.resetDuration)
  2050. }
  2051. if(targetKey == key){
  2052. arr.push(obj);
  2053. break;
  2054. }
  2055. }
  2056. this.mqttPublish(2,this.deviceInfo,arr,true)
  2057. }.bind(this),500);
  2058. },
  2059. buildPropKey(key){
  2060. if(this.childId !=0){
  2061. return key+"_"+this.childId;
  2062. }else{
  2063. return key;
  2064. }
  2065. },
  2066. decoctControlChange(){
  2067. let obj = {};
  2068. let arr = [];
  2069. if(!this.decoctControlOnOffStatus){
  2070. this.notifyError("请先开机后再进行操作")
  2071. return;
  2072. }
  2073. if(this.decoctControlStatus){
  2074. this.showJianyao();
  2075. return;
  2076. }
  2077. this.decoctControlStatus = !this.decoctControlStatus;
  2078. obj.id = "DecoctingSwitch";
  2079. if(this.decoctControlStatus){
  2080. obj.shadow = 1;
  2081. console.log("煎药状态打开")
  2082. this.checkJianyao();
  2083. }else{
  2084. obj.shadow = 0;
  2085. console.log("煎药状态关闭")
  2086. }
  2087. arr.push(obj);
  2088. this.mqttPublish(2,this.deviceInfo,arr,true)
  2089. },
  2090. kongzhiJianyao(flag,arr){//不判断煎药状态
  2091. let obj = {};
  2092. if(!this.decoctControlOnOffStatus){
  2093. this.notifyError("请先开机后再进行操作")
  2094. return;
  2095. }
  2096. obj.id = "DecoctingSwitch";
  2097. if(flag){
  2098. obj.shadow = 1;
  2099. console.log("煎药状态打开")
  2100. this.checkJianyao();
  2101. }else{
  2102. obj.shadow = 0;
  2103. console.log("煎药状态关闭")
  2104. }
  2105. arr.push(obj);
  2106. },
  2107. stopDecoctControlChange(){
  2108. let obj = {};
  2109. let arr = [];
  2110. if(!this.decoctControlOnOffStatus){
  2111. this.notifyError("请先开机后再进行操作")
  2112. return;
  2113. }
  2114. if(!this.decoctControlStatus){
  2115. return;
  2116. }
  2117. this.decoctControlStatus = !this.decoctControlStatus;
  2118. obj.id = "DecoctingSwitch";
  2119. if(this.decoctControlStatus){
  2120. obj.shadow = 1;
  2121. console.log("煎药状态打开")
  2122. }else{
  2123. obj.shadow = 0;
  2124. console.log("煎药状态关闭")
  2125. }
  2126. arr.push(obj);
  2127. let obj2 = {};
  2128. obj2.id = "AppointmentTime";
  2129. obj2.shadow = 0;
  2130. arr.push(obj2);
  2131. this.mqttPublish(2,this.deviceInfo,arr,true)
  2132. },
  2133. decoctControlOnOffChange(){
  2134. let obj = {};
  2135. //4号板子预约是无法开启煎药的
  2136. if(!this.decoctControlOnOffStatus){
  2137. if(this.boardType == 4){
  2138. if(this.devicePlanInfo != null){
  2139. this.$modal.showToast('请先取消预约后再开机');
  2140. return;
  2141. }
  2142. }
  2143. }
  2144. this.decoctControlOnOffStatus = !this.decoctControlOnOffStatus;
  2145. let arr = [];
  2146. obj.id = "PowerControl";
  2147. let isMul = false;
  2148. if(this.decoctControlStatus){
  2149. this.$modal.showToast('请先结束煎药后操作')
  2150. this.decoctControlOnOffStatus = !this.decoctControlOnOffStatus;
  2151. return;
  2152. }
  2153. if(this.oneToMul && this.firstTab){
  2154. obj.id = "PowerCtl";
  2155. isMul = true;
  2156. }
  2157. if(this.decoctControlOnOffStatus){
  2158. obj.shadow = 1;
  2159. console.log("煎药机开关打开")
  2160. }else{
  2161. obj.shadow = 0;
  2162. console.log("煎药机开关关闭")
  2163. }
  2164. arr.push(obj);
  2165. this.mqttPublish(2,this.deviceInfo,arr,isMul)
  2166. },
  2167. packageControlOnOffChange(){
  2168. let obj = {};
  2169. let arr = [];
  2170. if(this.baozhuangRunning()){
  2171. this.$modal.showToast('请先停止运行后操作')
  2172. return;
  2173. }
  2174. obj.id = "PackagePowerControl";
  2175. this.packageControlOnOffStatus = !this.packageControlOnOffStatus;
  2176. if(this.packageControlOnOffStatus){
  2177. console.log("包装机器开关打开")
  2178. obj.shadow = 1;
  2179. }else{
  2180. console.log("包装机器开关关闭")
  2181. obj.shadow = 0;
  2182. }
  2183. arr.push(obj);
  2184. this.mqttPublish(2,this.deviceInfo,arr)
  2185. },
  2186. containKey(arr,key){
  2187. for (let i = 0; i < arr.length; i++) {
  2188. const data = arr[i];
  2189. if(data == key){
  2190. return true;
  2191. }
  2192. }
  2193. return false;
  2194. },
  2195. // 抽屉状态发生变化触发
  2196. change(e, type) {
  2197. console.log(e);
  2198. },
  2199. showDrawer() {
  2200. this.$refs.showLeft.open();
  2201. },
  2202. closeDrawer() {
  2203. this.$refs.showLeft.close();
  2204. },
  2205. checkItemValue(item){
  2206. if(!item.shadow){
  2207. item.shadow = 0;
  2208. }
  2209. if(!item.unit){
  2210. item.unit = "";
  2211. }
  2212. return true;
  2213. },
  2214. sendProperties(){
  2215. let properties = this.properties;
  2216. for (let i = 0; i < properties; i++) {
  2217. let property = this.properties[i];
  2218. let shadow = property.shadow;
  2219. if(shadow){
  2220. arr.push(property);
  2221. }
  2222. }
  2223. this.mqttPublish(1,this.deviceInfo,arr)
  2224. },
  2225. sendFunctions(){
  2226. let arr = [];
  2227. let functions = this.functions;
  2228. for (let i = 0; i < functions.length; i++) {
  2229. let functionObj = this.functions[i];
  2230. let shadow = functionObj.shadow;
  2231. if(shadow){
  2232. arr.push(functionObj);
  2233. }
  2234. }
  2235. this.mqttPublish(2,this.deviceInfo,arr)
  2236. },
  2237. changeProp(key,val){
  2238. let item = null;
  2239. let obj = null;
  2240. let oneToMul = this.oneToMul;
  2241. if(key === "LockControl"){
  2242. this.lock.value = val;
  2243. item = this.lock;
  2244. }else if(key === "PowerControl"){
  2245. this.power.value = val;
  2246. item = this.power;
  2247. }
  2248. let value = val;
  2249. obj = item.item;
  2250. if(value){
  2251. obj.value = 1;
  2252. obj.shadow = 1;
  2253. }else{
  2254. obj.value = 0;
  2255. obj.shadow = 0;
  2256. }
  2257. if(!oneToMul){
  2258. }
  2259. this.publishThingsModel(this.deviceInfo,obj);
  2260. },
  2261. checkCommonProp(item){
  2262. let id =item.id;
  2263. let isCommonKey = this.modelKey.some(res=>{
  2264. return id === res;
  2265. })
  2266. return !isCommonKey;
  2267. },
  2268. getRunTime(){
  2269. let self = this;
  2270. getDeviceRunTime(this.id).then(res=>{
  2271. self.timeobj = res.data;
  2272. if(self.timeobj.avgtime == ""){
  2273. self.timeobj.avgtime = 0;
  2274. }
  2275. if(self.timeobj.alltime == ""){
  2276. self.timeobj.alltime = 0;
  2277. }
  2278. })
  2279. },
  2280. seeTime(){
  2281. this.showTimeDlg = true;
  2282. this.getRunTime();
  2283. },
  2284. closeTime(){
  2285. this.showTimeDlg = false;
  2286. },
  2287. cancel(){
  2288. this.showErrDlg = false;
  2289. },
  2290. reportError(){
  2291. this.showErrDlg = true;
  2292. },
  2293. doReportError(){
  2294. if(!this.errorMsg){
  2295. this.$modal.showToast('异常信息不能为空')
  2296. }else{
  2297. let self = this;
  2298. let errObj = {};
  2299. errObj.deviceId = this.deviceInfo.deviceId;
  2300. errObj.deviceName = this.deviceInfo.deviceName
  2301. errObj.desc = this.errorMsg;
  2302. errObj.deptId= this.deviceInfo.deptId;
  2303. reportError(errObj).then(res=>{
  2304. self.$modal.showToast(res.msg)
  2305. self.cancel();
  2306. })
  2307. }
  2308. },
  2309. openLocation(){
  2310. uni.openLocation({
  2311. latitude: this.location.latitude,
  2312. longitude: this.location.longitude,
  2313. success: function () {
  2314. console.log('success');
  2315. }
  2316. });
  2317. },
  2318. confirmItemData(e){
  2319. let data = e.value[0];
  2320. this.show.text = data.text;
  2321. this.show.shadow=data.value;
  2322. this.show = null;
  2323. console.log(data);
  2324. },
  2325. send(){
  2326. let shadow = false
  2327. let _arr = []
  2328. this.inputProp.forEach((item)=>{
  2329. _arr.push(item.value)
  2330. })
  2331. // if(_arr.some(val => val === '' || val.length < 0)){
  2332. // shadow = true
  2333. // }
  2334. if(this.deviceInfo.status != 3){
  2335. uni.showToast({
  2336. title:"设备暂未上线",
  2337. icon:"error"
  2338. })
  2339. return;
  2340. }
  2341. if(shadow){
  2342. uni.showToast({
  2343. title:"数据不能为空",
  2344. icon:"error"
  2345. })
  2346. return;
  2347. }
  2348. this.publishThingsModel(this.deviceInfo,this.inputProp.map(item=>{return{"id":item.id,"value":item.value}}))
  2349. },
  2350. /** 更新设备状态 */
  2351. updateDeviceStatus(device) {
  2352. },
  2353. chooseItemData(data){
  2354. if(this.deviceInfo.status != 3){
  2355. uni.showToast({
  2356. title:"设备暂未上线",
  2357. icon:"error"
  2358. })
  2359. return;
  2360. }
  2361. this.columns = [data.enumList];
  2362. this.show =data;
  2363. },
  2364. getDetail(){
  2365. let self = this;
  2366. getDetail(this.id).then(res=>{
  2367. self.deviceInfo = res.data;
  2368. self.deviceType = res.data.type;
  2369. let msg = res.msg;
  2370. if(msg){
  2371. try{
  2372. msg = JSON.parse(msg+"");
  2373. }catch (e){
  2374. msg = null;
  2375. }
  2376. }
  2377. let productId = self.deviceInfo.productId;
  2378. if(productId === 57){
  2379. self.boardType = 5;
  2380. }
  2381. let online = self.deviceInfo.status == 3?true:false;
  2382. if(!online){
  2383. if(!self.onlineStatus){
  2384. uni.showModal({
  2385. title: '系统提示',
  2386. content: "设备未在线,无法操作",
  2387. confirmText: '确定',
  2388. showCancel:false,
  2389. success(res){
  2390. if(res.confirm){
  2391. self.onlineStatus = true;
  2392. }
  2393. },
  2394. })
  2395. }
  2396. }
  2397. if(msg != null){
  2398. let b = msg.b;
  2399. let c = msg.c;
  2400. let a = msg.a;
  2401. let d = msg.d;
  2402. if(a == 1){
  2403. self.firstMachine = true;
  2404. }
  2405. if(b == 1){
  2406. self.secondMachine = true;
  2407. }
  2408. if(c == 1){
  2409. self.thirdMachine = true;
  2410. }
  2411. if(d == 1){
  2412. self.forthMachine = true;
  2413. }
  2414. }
  2415. console.log("当前设备类型:"+JSON.stringify(self.deviceInfo.type))
  2416. self.location = {
  2417. latitude: self.deviceInfo.latitude,
  2418. longitude: self.deviceInfo.longitude};
  2419. self.sysDept = self.deviceInfo.sysDept;
  2420. self.parseSummay(res.data.summary)
  2421. self.mqttSubscribe(res.data);
  2422. self.getDeviceStatus();
  2423. self.seeTime();
  2424. let heng = false;
  2425. self.productImage = self.imgUrl+'/detail/product.png'
  2426. if(self.deviceType == 13 || self.deviceType == 14){
  2427. self.boardType = 4;
  2428. }
  2429. if(self.deviceType == 14 ){
  2430. self.secondMachine = true;
  2431. }
  2432. if(self.deviceType == 4 ||self.deviceType == 5 ){
  2433. self.secondMachine = true;
  2434. }
  2435. if(self.deviceType == 5){
  2436. self.thirdMachine = true;
  2437. }
  2438. if(self.deviceType == 4){
  2439. self.productImage = self.imgUrl+'/product/YJCX20-2&1.png'
  2440. heng = true;
  2441. }
  2442. if(self.deviceType == 1 || self.deviceType == 7){
  2443. self.forthMachine = false;
  2444. self.productImage = self.imgUrl+'/product/YJH20.png'
  2445. }
  2446. if(self.deviceType == 10){
  2447. self.productImage = self.imgUrl+'/product/YJZ20.png'
  2448. }
  2449. heng = self.setImage(self.deviceType);
  2450. let typeArr = [7,8,9,10,11,12];
  2451. for (let i = 0; i < typeArr.length; i++) {
  2452. let typeMa = typeArr[i];
  2453. if(typeMa == self.deviceType){
  2454. self.forthMachine = false;
  2455. }
  2456. }
  2457. self.fixImage(heng);
  2458. if(self.boardType = 4){
  2459. self.boardStyle = ";top:15vh;";
  2460. self.modeList=[[
  2461. {id:1,text:"1"},
  2462. {id:2,text:"2"}
  2463. ]];
  2464. }
  2465. self.$forceUpdate();
  2466. });
  2467. },
  2468. getDeviceStatus(func){
  2469. let self = this;
  2470. if(this.summary.length>1){
  2471. }else{
  2472. this.childId = 0;
  2473. }
  2474. uni.showLoading({title:"加载中"});
  2475. getDeviceStatus(this.id,this.childId).then(res=>{
  2476. let data =res.data;
  2477. this.deviceInfo = data;
  2478. self.parseStatusData(data)
  2479. self.getDevicePlanInfo();
  2480. setTimeout(function () {
  2481. uni.hideLoading();
  2482. if(typeof func == "function"){
  2483. func();
  2484. }
  2485. },50);
  2486. });
  2487. },
  2488. setImage(type){
  2489. let heng = false;
  2490. let self = this;
  2491. if(type == 1){
  2492. self.productImage = self.imgUrl+'/product/YJDX20.png'
  2493. }else if(type == 2){
  2494. self.productImage = self.imgUrl+'/product/YJDJ20-20.png'
  2495. heng = true;
  2496. }else if(type == 3){
  2497. self.productImage = self.imgUrl+'/product/YJCX20-1&1.png'
  2498. }else if(type == 4){
  2499. self.productImage = self.imgUrl+'/product/YJCX20-2&1.png'
  2500. heng = true;
  2501. } else if(type == 5){
  2502. self.productImage = self.imgUrl+'/product/YJCX20-3&1.png'
  2503. heng = true;
  2504. }else if(type == 6){
  2505. self.productImage = self.imgUrl+'/product/YB50-300.png'
  2506. }else if(type == 7){
  2507. self.productImage = self.imgUrl+'/product/YJH20.png'
  2508. }else if(type == 8){
  2509. self.productImage = self.imgUrl+'/product/YJH20-20.png'
  2510. heng = true;
  2511. }else if(type == 9){
  2512. self.productImage = self.imgUrl+'/product/YJH20-20-20.png'
  2513. heng = true;
  2514. }else if(type == 10){
  2515. self.productImage = self.imgUrl+'/product/YJZ20.png'
  2516. }else if(type == 11){
  2517. self.productImage = self.imgUrl+'/product/YJZ20-20.png'
  2518. heng = true;
  2519. }else if(type == 12){
  2520. self.productImage = self.imgUrl+'/product/YJZ20-20-20.png'
  2521. heng = true;
  2522. }else if(type == 13){
  2523. self.productImage = self.imgUrl+'/product/YJCL20-1&1.png'
  2524. }else if(type == 14){
  2525. self.productImage = self.imgUrl+'/product/YJCL20-2&1.png'
  2526. heng = true;
  2527. }
  2528. return heng;
  2529. },
  2530. getNewDeviceStatus(item){
  2531. console.log(item);
  2532. let self = this;
  2533. if(item.index == 0){
  2534. this.firstTab = true;
  2535. this.getDeviceStatus();
  2536. }
  2537. if(item.index == 1){
  2538. this.firstTab = false;
  2539. getDeviceStatus(this.id,0).then(res=>{
  2540. let data =res.data;
  2541. this.deviceInfo = data;
  2542. self.parseStatusData(data)
  2543. });
  2544. }
  2545. },
  2546. changeSub(item){
  2547. this.childId = item.id;
  2548. this.getDeviceStatus()
  2549. },
  2550. parseEnumList(flag){
  2551. let enumList = this.deviceInfo.enumList;
  2552. for (let enumListElement of enumList) {
  2553. let id = enumListElement.id;
  2554. if(id == 'LockControl'){
  2555. let shadow = enumListElement.shadow;
  2556. this.lock.item = enumListElement;
  2557. if(shadow == 1){
  2558. this.lock.value = true;
  2559. this.lock.loading = false;
  2560. }else if(shadow == 0){
  2561. this.lock.value = false;
  2562. this.lock.loading = false;
  2563. }else{
  2564. this.lock.loading = true;
  2565. }
  2566. }
  2567. if(id == 'PowerControl'){
  2568. let shadow = enumListElement.shadow;
  2569. if(this.oneToMul){
  2570. if(!this.firstTab){
  2571. if(shadow == 1){
  2572. this.decoctControlOnOffStatus = true;
  2573. this.getDevicePlanInfo();
  2574. }else if(shadow == 0){
  2575. this.decoctControlOnOffStatus = false;
  2576. }
  2577. }
  2578. }else{
  2579. if(shadow == 1){
  2580. this.decoctControlOnOffStatus = true;
  2581. this.getDevicePlanInfo();
  2582. }else if(shadow == 0){
  2583. this.decoctControlOnOffStatus = false;
  2584. }
  2585. }
  2586. }
  2587. if(id == 'PowerCtl'){
  2588. if(this.oneToMul && this.firstTab){
  2589. let shadow = enumListElement.shadow;
  2590. if(shadow == 1){
  2591. this.decoctControlOnOffStatus = true;
  2592. this.getDevicePlanInfo();
  2593. }else if(shadow == 0){
  2594. this.decoctControlOnOffStatus = false;
  2595. }
  2596. }
  2597. }
  2598. this.formatValue(id,enumListElement,"PackagePowerControl","packageControlOnOffStatus")
  2599. this.formatValue(id,enumListElement,"DecoctingSwitch","decoctControlStatus")
  2600. this.formatValue(id,enumListElement,"CarrybagSwitch","qitingTurn")
  2601. this.formatValue(id,enumListElement,"WashSwitch","qingxiTurn")
  2602. this.formatValue(id,enumListElement,"PackageSwitch","baozhuangTurn");
  2603. //pressTurn resetTurn
  2604. if(!this.canGetPrsValue){
  2605. if(id == 'PressTurn'){
  2606. let shadow = enumListElement.shadow;
  2607. if(!shadow){
  2608. shadow = 0;
  2609. }
  2610. if(shadow == 1){
  2611. this.pressTurn = 1;
  2612. this.resetTurn = 0;
  2613. }else{
  2614. this.pressTurn = 0;
  2615. }
  2616. }
  2617. if(id == 'ResetTurn'){
  2618. let shadow = enumListElement.shadow;
  2619. if(!shadow){
  2620. shadow = 0;
  2621. }
  2622. if(shadow == 1){
  2623. this.resetTurn = 1;
  2624. this.pressTurn = 0;
  2625. }else{
  2626. this.resetTurn = 0;
  2627. }
  2628. }
  2629. }
  2630. if(id == 'WorkMode'){
  2631. let shadow = enumListElement.shadow;
  2632. if(!shadow){
  2633. shadow = 1;
  2634. }
  2635. this.workMode = shadow;
  2636. }
  2637. let shadow = enumListElement.shadow
  2638. let valueList = enumListElement.enumList;
  2639. for (let valueObj of valueList){
  2640. if(valueObj.value == shadow){
  2641. enumListElement.text = valueObj.text;
  2642. }
  2643. }
  2644. }
  2645. },
  2646. formatValue(id,enumListElement,key,propkey){
  2647. if(id == key){
  2648. let shadow = enumListElement.shadow;
  2649. if(shadow == 1){
  2650. this[propkey] = true;
  2651. }else if(shadow == 0){
  2652. this[propkey] = false;
  2653. }
  2654. }
  2655. },
  2656. parseStatusData(data){
  2657. let self = this;
  2658. cacheJsonThingsModel(data.productId).then(res=>{
  2659. let thingsModel = JSON.parse(res.data);
  2660. let arr = [];
  2661. let arrayList = data.arrayList;
  2662. arr = arr.concat(arrayList);
  2663. let enumList = data.enumList;
  2664. arr = arr.concat(enumList);
  2665. let integerList = data.integerList;
  2666. arr = arr.concat(integerList);
  2667. let stringList = data.stringList;
  2668. arr = arr.concat(stringList);
  2669. self.inputProp = arr;
  2670. for (let i = 0; i < thingsModel.functions.length; i++) {
  2671. for (let j = 0; j < arr.length; j++) {
  2672. let model = arr[j];
  2673. if(model.id == thingsModel.functions[i].id){
  2674. self.functions.push(model);
  2675. }
  2676. }
  2677. }
  2678. for (let i = 0; i < thingsModel.properties.length; i++) {
  2679. for (let j = 0; j < arr.length; j++) {
  2680. let model = arr[j];
  2681. if(model.id == thingsModel.properties[i].id){
  2682. self.properties.push(model);
  2683. }
  2684. }
  2685. }
  2686. let readOnlyList = data.readOnlyList;
  2687. self.watchProp = readOnlyList;
  2688. self.parseEnumList();
  2689. self.parseProp();
  2690. self.checkJianyao();
  2691. })
  2692. },
  2693. showJianyao(){
  2694. this.calcuStep();
  2695. this.planIngPopDlg = true;
  2696. },
  2697. parseProp(){
  2698. let self = this;
  2699. for (let i = 0; i <self.inputProp.length; i++) {
  2700. let prop = self.inputProp[i];
  2701. let value = prop.shadow||0;
  2702. let id = prop.id;
  2703. if(id === "TimeSetting"){//温度设置
  2704. self.temperatureTime = value;
  2705. }
  2706. if(!self.jianyaoWenduSetting){
  2707. if(id === "TempSetting"){
  2708. self.temperature = value;
  2709. }
  2710. }
  2711. this.setPropValue(id,"SlowfireTiem","leftJianyaoTime",value,0)
  2712. this.setPropValue(id,"HighTempTime","hightTemperature",value,0)
  2713. this.setPropValue(id,"CurrentTemp","currentTemperature",value,0)
  2714. this.setPropValue(id,"CalibrationTemp","jiaozhunTemp",value,0)
  2715. this.setPropValue(id,"PackingVolume","packageVolume",value,50)
  2716. this.setPropValue(id,"PackageQuantity","packageNumber",value,1)
  2717. //封边温度
  2718. this.setPropValue(id,"BandingTemp","edegTemperature",value);
  2719. this.setPropValue(id,"BandingTemp","tempFengBianWendu",value)
  2720. //封口温度
  2721. this.setPropValue(id,"SealTemp","sealingTemperature",value);
  2722. this.setPropValue(id,"SealTemp","tempFengKouWendu",value)
  2723. this.setPropValue(id,"LeftAppointmentTime","leftAppointmentTime",value,0)
  2724. this.setPropValue(id,"ValidCurrent","validCurrent",value,0)
  2725. this.setPropValue(id,"TurnCurrent","turnCurrent",value,0)
  2726. self.propMap[id] = prop;
  2727. }
  2728. },
  2729. setPropValue(id,key,propKey,value,defaultValue){
  2730. if(!value && defaultValue){
  2731. value = defaultValue;
  2732. }
  2733. if(id === key){
  2734. this[propKey] = value;
  2735. }
  2736. },
  2737. parseSummay(summary){
  2738. let self = this;
  2739. if(!summary){
  2740. summary = "";
  2741. }
  2742. if(summary.length>0){
  2743. this.summary = JSON.parse(summary);
  2744. if(self.summary.length>0){
  2745. this.oneToMul = true;
  2746. for (let i = 0; i < self.summary.length; i++) {
  2747. self.summary[i].tabName = self.summary[i].name
  2748. }
  2749. let childId = "";
  2750. if(this.oneToMul){
  2751. this.childId = self.summary[0].id;
  2752. }
  2753. }else{
  2754. this.summary = [{name:"煎药机一"}]
  2755. }
  2756. }else{
  2757. this.summary = [{name:"煎药机一"}]
  2758. }
  2759. },
  2760. goDeviceDetail(id){
  2761. uni.navigateTo({
  2762. url: '/pages/device/detail/detail?id='+id
  2763. });
  2764. },
  2765. async connectMqtt() {
  2766. if (this.$mqttTool.client == null) {
  2767. await this.$mqttTool.connect(this.vuex_token);
  2768. }
  2769. this.mqttCallback();
  2770. this.startCheck();
  2771. },
  2772. /** Mqtt订阅主题 */
  2773. mqttSubscribe(device) {
  2774. // 订阅当前设备状态和实时监测
  2775. let topicStatus = '/' + device.productId + '/' + device.serialNumber + '/status/post';
  2776. let topicProperty = '/' + device.productId + '/' + device.serialNumber + '/property/post';
  2777. let topicFunction = '/' + device.productId + '/' + device.serialNumber + '/function/post';
  2778. let topics = [];
  2779. topics.push(topicStatus);
  2780. topics.push(topicProperty);
  2781. topics.push(topicFunction);
  2782. this.$mqttTool.subscribe(topics);
  2783. },
  2784. /** Mqtt取消订阅主题 */
  2785. mqttUnSubscribe(device) {
  2786. // 订阅当前设备状态和实时监测
  2787. let topicStatus = '/' + device.productId + '/' + device.serialNumber + '/status/post';
  2788. let topicProperty = '/' + device.productId + '/' + device.serialNumber + '/property/post';
  2789. let topicFunction = '/' + device.productId + '/' + device.serialNumber + '/function/post';
  2790. let topics = [];
  2791. topics.push(topicStatus);
  2792. topics.push(topicProperty);
  2793. topics.push(topicFunction);
  2794. console.log('取消订阅', topics);
  2795. this.$mqttTool.unsubscribe(topics);
  2796. },
  2797. /* Mqtt回调处理 */
  2798. mqttCallback() {
  2799. this.$mqttTool.client.on('message', (topic, message, buffer) => {
  2800. let topics = topic.split('/');
  2801. let productId = topics[1];
  2802. let deviceNum = topics[2];
  2803. console.log('接收到内容:'+message);
  2804. message = JSON.parse(message.toString());
  2805. if (topics[3] == 'status') {
  2806. console.log('接收到【设备状态-运行】主题:', topic);
  2807. console.log('接收到【设备状态-运行】内容:', message);
  2808. // 更新列表中设备的状态
  2809. if (this.deviceInfo.serialNumber == deviceNum) {
  2810. this.deviceInfo.status = message.status;
  2811. this.deviceInfo.isShadow = message.isShadow;
  2812. this.deviceInfo.rssi = message.rssi;
  2813. this.updateDeviceStatus(this.deviceInfo);
  2814. }
  2815. }
  2816. if (topics[3] == 'property' || topics[3] == 'function') {
  2817. console.log('接收到【物模型】主题:', topic);
  2818. console.log('接收到【物模型】内容:', message);
  2819. if(this.oneToMul){
  2820. let curTabId = this.childId;
  2821. let msg = [];
  2822. for (let i = 0; i < message.length; i++) {
  2823. let curMsg = message[i];
  2824. let id = curMsg.id;
  2825. let ids = id.split("_");
  2826. let value = curMsg.value;
  2827. if(ids.length == 2){
  2828. if(curTabId == ids[1]){
  2829. msg.push({id:ids[0],value:value});
  2830. }
  2831. }else{
  2832. msg.push(curMsg);
  2833. }
  2834. }
  2835. message = msg;
  2836. }
  2837. // 更新列表中设备的属性
  2838. if (this.deviceInfo.serialNumber == deviceNum) {
  2839. for (let j = 0; j < message.length; j++) {
  2840. let isComplete = false;
  2841. let msgId = message[j].id;
  2842. this.exchangeData(msgId,message[j]);
  2843. // 布尔类型
  2844. if(this.deviceInfo.boolList == null){
  2845. return;
  2846. }
  2847. for (let k = 0; k < this.deviceInfo.boolList.length && !isComplete; k++) {
  2848. if (this.deviceInfo.boolList[k].id == message[j].id) {
  2849. this.deviceInfo.boolList[k].shadow = message[j].value;
  2850. isComplete = true;
  2851. break;
  2852. }
  2853. }
  2854. // 枚举类型
  2855. for (let k = 0; k < this.deviceInfo.enumList.length && !isComplete; k++) {
  2856. if (this.deviceInfo.enumList[k].id == message[j].id) {
  2857. this.deviceInfo.enumList[k].shadow = message[j].value;
  2858. isComplete = true;
  2859. break;
  2860. }
  2861. }
  2862. // 字符串类型
  2863. for (let k = 0; k < this.deviceInfo.stringList.length && !isComplete; k++) {
  2864. if (this.deviceInfo.stringList[k].id == message[j].id) {
  2865. this.deviceInfo.stringList[k].shadow = message[j].value;
  2866. isComplete = true;
  2867. break;
  2868. }
  2869. }
  2870. // 数组类型
  2871. for (let k = 0; k < this.deviceInfo.arrayList.length && !isComplete; k++) {
  2872. if (this.deviceInfo.arrayList[k].id == message[j].id) {
  2873. this.deviceInfo.arrayList[k].shadow = message[j].value;
  2874. isComplete = true;
  2875. break;
  2876. }
  2877. }
  2878. // 整数类型
  2879. for (let k = 0; k < this.deviceInfo.integerList.length && !isComplete; k++) {
  2880. if (this.deviceInfo.integerList[k].id == message[j].id) {
  2881. this.deviceInfo.integerList[k].shadow = message[j].value;
  2882. isComplete = true;
  2883. break;
  2884. }
  2885. }
  2886. // 小数类型
  2887. for (let k = 0; k < this.deviceInfo.decimalList.length && !isComplete; k++) {
  2888. if (this.deviceInfo.decimalList[k].id == message[j].id) {
  2889. this.deviceInfo.decimalList[k].shadow = message[j].value;
  2890. isComplete = true;
  2891. break;
  2892. }
  2893. }
  2894. // 监测数据
  2895. for (let k = 0; k < this.deviceInfo.readOnlyList.length && !isComplete; k++) {
  2896. if (this.deviceInfo.readOnlyList[k].id == message[j].id) {
  2897. this.deviceInfo.readOnlyList[k].shadow = message[j].value;
  2898. // 更新图表
  2899. // for (let m = 0; m < this.monitorChart.length; m++) {
  2900. // if (message[j].id == this.monitorChart[m].data.id) {
  2901. // let data = [{
  2902. // value: message[j].value,
  2903. // name: this.monitorChart[m].data.name
  2904. // }];
  2905. // this.monitorChart[m].chart.setOption({
  2906. // series: [{
  2907. // data: data
  2908. // }]
  2909. // });
  2910. // break;
  2911. // }
  2912. // }
  2913. isComplete = true;
  2914. break;
  2915. }
  2916. }
  2917. }
  2918. this.parseEnumList(true);
  2919. this.checkJianyao();
  2920. if(this.planIngPopDlg){
  2921. this.calcuStep();
  2922. }
  2923. }
  2924. this.$forceUpdate();
  2925. }
  2926. });
  2927. },
  2928. checkJianyao(){
  2929. // if(!this.jianyaoPopClose){
  2930. // return;
  2931. // }
  2932. // let self = this;
  2933. // setTimeout(function(){
  2934. // if(self.decoctControlStatus){
  2935. // self.showJianyao();
  2936. // }
  2937. // },1000);
  2938. },
  2939. exchangeData(msgId,obj){
  2940. if(msgId === "TempSetting"){
  2941. this.temperature = obj.value;
  2942. }
  2943. if(msgId === "TimeSetting"){
  2944. this.temperatureTime = obj.value;
  2945. }
  2946. if(msgId === "CurrentTemp"){
  2947. this.currentTemperature = obj.value;
  2948. }
  2949. if(msgId === "HighTempTime"){
  2950. this.hightTemperature = obj.value;
  2951. }
  2952. if(msgId === "SealTemp"){//封口温度
  2953. if(!this.editing){
  2954. if(this.baozhuangFengkouSetting){
  2955. this.tempFengkouWendu = obj.value;
  2956. }else{
  2957. this.sealingTemperature = obj.value;
  2958. }
  2959. }
  2960. }
  2961. if(msgId === "BandingTemp"){//封边温度
  2962. if(!this.editing){
  2963. if(this.baozhuangFengbianSetting){
  2964. this.tempFengBianWendu = obj.value;
  2965. }else{
  2966. this.edegTemperature = obj.value;
  2967. }
  2968. }
  2969. }
  2970. if(msgId === "PackingVolume"){
  2971. if(!this.editing){
  2972. if(this.baozhuangRongLiangSetting){
  2973. }else{
  2974. this.packageVolume = obj.value;
  2975. }
  2976. }
  2977. }
  2978. if(msgId === "PackageQuantity"){
  2979. if(!this.editing){
  2980. if(this.baozhuangShuLIangSetting){
  2981. }else{
  2982. this.packageNumber = obj.value;
  2983. }
  2984. }
  2985. }
  2986. if(msgId === "LeftAppointmentTime"){
  2987. this.leftAppointmentTime = obj.value;
  2988. }
  2989. if(msgId === "SlowfireTiem"){
  2990. this.leftJianyaoTime = obj.value;
  2991. }
  2992. if(msgId === "CalibrationTemp"){
  2993. this.jiaozhunTemp = obj.value;
  2994. }
  2995. if(msgId === "TurnCurrent"){
  2996. this.turnCurrent = obj.value;
  2997. }
  2998. if(msgId === "ValidCurrent"){
  2999. this.validCurrent = obj.value;
  3000. }
  3001. },
  3002. /** 发布物模型 类型(1=属性,2=功能) */
  3003. publishThingsModel(device, model) {
  3004. // 获取缓存的Json物模型
  3005. cacheJsonThingsModel(device.productId).then(response => {
  3006. let thingsModel = JSON.parse(response.data);
  3007. let type = 0;
  3008. for (let i = 0; i < thingsModel.functions.length; i++) {
  3009. if (model.id == thingsModel.functions[i].id) {
  3010. type = 2;
  3011. break;
  3012. }
  3013. }
  3014. if (type == 0) {
  3015. for (let i = 0; i < thingsModel.properties.length; i++) {
  3016. if (model.id == thingsModel.properties[i].id) {
  3017. type = 1;
  3018. break;
  3019. }
  3020. }
  3021. }
  3022. if (type != 0) {
  3023. this.mqttPublish(type, device, [model]);
  3024. }
  3025. });
  3026. },
  3027. notifyError(res){
  3028. uni.showToast({
  3029. title:res,
  3030. icon:"error"
  3031. })
  3032. },
  3033. notifySuccess(res){
  3034. uni.showToast({
  3035. title:res,
  3036. icon:"success"
  3037. })
  3038. },
  3039. getDownloadUrl(path){
  3040. return this.firmware.downUrl +"/iot/tool/download?fileName="+ path;
  3041. },
  3042. /**
  3043. * Mqtt发布消息
  3044. * @type 类型(1=属性,2=功能,3=OTA升级,4=实时监测)
  3045. * @device 设备
  3046. * @model 物模型
  3047. * */
  3048. mqttPublish(type, device, modelList,needMore) {
  3049. if(this.deviceInfo.status != 3){
  3050. this.notifyError("请等待设备上线后操作")
  3051. return;
  3052. }
  3053. if(modelList.length == 0){
  3054. return;
  3055. }
  3056. let topic = "";
  3057. let message = ""
  3058. let oneToMul = false;
  3059. if(this.summary.length>1){
  3060. oneToMul = true;
  3061. }
  3062. if(!needMore){
  3063. oneToMul = false;
  3064. }
  3065. if(this.firstTab){
  3066. let isKaijiKey = false;
  3067. if(modelList.length >0){
  3068. let modelData = modelList[0];
  3069. let curKeyId = modelData.id;
  3070. if(!this.decoctControlOnOffStatus){
  3071. if(oneToMul){
  3072. if(curKeyId == 'PowerCtl'){
  3073. isKaijiKey = true;
  3074. }
  3075. }else{
  3076. if(curKeyId == 'PowerControl'){
  3077. isKaijiKey = true;
  3078. }
  3079. }
  3080. }else{
  3081. isKaijiKey = true;
  3082. }
  3083. }
  3084. if(!isKaijiKey){
  3085. this.notifyError("请先开机后再进行操作")
  3086. return;
  3087. }
  3088. }else{
  3089. let isKaijiKey = false;
  3090. if(modelList.length >0){
  3091. let modelData = modelList[0];
  3092. let curKeyId = modelData.id;
  3093. if(!this.packageControlOnOffStatus){
  3094. if(curKeyId == 'PackagePowerControl'){
  3095. isKaijiKey = true;
  3096. }
  3097. }else{
  3098. isKaijiKey = true;
  3099. }
  3100. }
  3101. if(!isKaijiKey){
  3102. this.notifyError("请先开机后再进行操作")
  3103. return;
  3104. }
  3105. }
  3106. if (type == 1) {
  3107. if (device.status == 3) {
  3108. // 属性,在线模式
  3109. topic = "/" + device.productId + "/" + device.serialNumber + "/property-online/get";
  3110. }
  3111. } else if (type == 2) {
  3112. if (device.status == 3) {
  3113. // 功能,在线模式
  3114. topic = "/" + device.productId + "/" + device.serialNumber + "/function-online/get";
  3115. }
  3116. } else if (type == 3) {
  3117. // OTA升级
  3118. topic = "/" + device.productId + "/" + device.serialNumber + "/ota/get";
  3119. } else {
  3120. return;
  3121. }
  3122. let title = "";
  3123. if(type == 1){
  3124. title = "属性";
  3125. }else if(type == 2){
  3126. title = "功能";
  3127. }else if(type == 3){
  3128. title = "升级";
  3129. }
  3130. if (topic != "") {
  3131. // 发布
  3132. let arr = [];
  3133. for (let i = 0; i <modelList.length; i++) {
  3134. let model = modelList[i];
  3135. let modelId = model.id;
  3136. if(oneToMul){
  3137. let childId = this.childId;
  3138. if(childId){
  3139. modelId = modelId+"_"+childId;
  3140. }
  3141. }
  3142. let shadow = model.shadow+"";
  3143. let modelType = model.type;
  3144. let shadowInt = parseInt(shadow,10);
  3145. let isNumber = false;
  3146. let shadowStr = shadowInt+"";
  3147. if(shadowStr === shadow){
  3148. isNumber = true;
  3149. shadow = shadowInt;
  3150. }
  3151. if(modelType == "integer" && !isNumber){
  3152. this.$modal.showToast(model.name+'的值必须是数字类型')
  3153. return;
  3154. }
  3155. arr.push({id:modelId,value:shadow+""});
  3156. }
  3157. message = JSON.stringify(arr);
  3158. let self = this;
  3159. this.$mqttTool.publish(topic, message,title).then(res => {
  3160. this.notifySuccess(res);
  3161. }).catch(res => {
  3162. this.notifyError(res);
  3163. });
  3164. }
  3165. },
  3166. startCheck(){
  3167. let self = this;
  3168. this.checkTimer = setTimeout(function (){
  3169. self.sendHeart();
  3170. self.startCheck();
  3171. },20000);
  3172. },
  3173. checkActive(){
  3174. let self = this;
  3175. setTimeout(function (){
  3176. if(self.publishMsg){
  3177. self.resetConn()
  3178. }
  3179. },3000);
  3180. },
  3181. sendHeart(){
  3182. console.log("发送心跳111")
  3183. let device = this.deviceInfo;
  3184. let self = this;
  3185. let topic = "/property-offline/post";
  3186. self.publishMsg = true;
  3187. self.checkActive();
  3188. this.$mqttTool.publish(topic, "ok", "heart").then(res => {
  3189. self.publishMsg = false;
  3190. }).catch(res => {
  3191. self.publishMsg = false;
  3192. });
  3193. },
  3194. resetConn(){
  3195. console.log("检测异常,重连")
  3196. this.$mqttTool.end();
  3197. this.$mqttTool.client = null;
  3198. this.connectMqtt();
  3199. this.getDetail();
  3200. }
  3201. }
  3202. }
  3203. </script>
  3204. <style>
  3205. .send_btn{
  3206. width: 160rpx !important;
  3207. height: 40rpx !important;
  3208. font-size: 10px !important;
  3209. margin-top: 5px;
  3210. }
  3211. uni-col{
  3212. width: 150px;
  3213. }
  3214. .header{
  3215. width: 100%;
  3216. background: white;
  3217. padding:0px 20rpx;
  3218. position: relative;
  3219. height: 100vh;
  3220. position: relative;
  3221. }
  3222. .content {
  3223. display: flex;
  3224. align-items: center;
  3225. justify-content: center;
  3226. color: #060B25;
  3227. }
  3228. .logo {
  3229. height: 200rpx;
  3230. width: 200rpx;
  3231. margin-top: 200rpx;
  3232. margin-left: auto;
  3233. margin-right: auto;
  3234. margin-bottom: 50rpx;
  3235. }
  3236. .text-area {
  3237. margin:10px;
  3238. padding-bottom: 10px;
  3239. justify-content: center;
  3240. width: 100%;
  3241. }
  3242. .grid-text {
  3243. font-size: 14px;
  3244. color: #909399;
  3245. padding: 10rpx 0 20rpx 0rpx;
  3246. /* #ifndef APP-PLUS */
  3247. box-sizing: border-box;
  3248. /* #endif */
  3249. }
  3250. .title {
  3251. font-size: 36rpx;
  3252. color: #8f8f94;
  3253. }
  3254. .item{
  3255. height: 80rpx;
  3256. line-height: 80rpx;
  3257. }
  3258. .bg{
  3259. position: relative;
  3260. }
  3261. .text-left{
  3262. color: #8A92A5;
  3263. }
  3264. .text-right{
  3265. color: #545454;
  3266. }
  3267. .prop-text{
  3268. position: relative;
  3269. margin:20rpx 0;
  3270. font-size: 26rpx;
  3271. }
  3272. .prop-card-area{
  3273. }
  3274. .prop-card{
  3275. width: 28%;
  3276. height: 100rpx;
  3277. text-align: center;
  3278. display: inline-block;
  3279. background: #F5FCFF;
  3280. box-shadow: 0px 9rpx 8rpx 0px rgba(0,0,0,0.09);
  3281. border-radius: 8rpx;
  3282. margin:0px 15rpx;
  3283. line-height: 48rpx;
  3284. }
  3285. .prop-card-top{
  3286. color: #3E9CFC;
  3287. }
  3288. .prop-card-bottom{
  3289. color: #8A92A5;
  3290. }
  3291. .tab-area {
  3292. background: white;
  3293. position: absolute;
  3294. left: 0px;
  3295. right: 0px;
  3296. top:480rpx;
  3297. bottom:-20px;
  3298. min-height: 200rpx;
  3299. box-shadow: 0rpx 5rpx 27rpx 0rpx rgba(195, 195, 195, 0.4);
  3300. border-radius: 40rpx;
  3301. overflow-y: auto;
  3302. padding-bottom:80rpx;
  3303. }
  3304. .prop-item{
  3305. position: relative;
  3306. display: flex;
  3307. flex-direction: row;
  3308. height: 100rpx;
  3309. line-height: 100rpx;
  3310. margin:0 20rpx;
  3311. }
  3312. .prop-item-left{
  3313. color: #545454;
  3314. width: 100%;
  3315. font-size: 16px;
  3316. border-bottom: 1px solid lightgray;
  3317. margin-left: 120rpx;
  3318. }
  3319. .prop-item-image{
  3320. width: 120rpx;
  3321. height: 120rpx;
  3322. position: absolute;
  3323. bottom:-10rpx;
  3324. }
  3325. .prop-item-right{
  3326. position: absolute;
  3327. right:10rpx;
  3328. top:5rpx;
  3329. }
  3330. input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{
  3331. color:#666;
  3332. font-size:12px;
  3333. }
  3334. .clearfix::after {
  3335. content: "";
  3336. display: block;
  3337. clear: both;
  3338. }
  3339. .decoctControlHeader {
  3340. display: flex;
  3341. align-items: center;
  3342. font-weight: 600;
  3343. }
  3344. .decoctControlTop {
  3345. display: flex;
  3346. height: 240rpx;
  3347. border-bottom:1px #B2B2B2 dotted;
  3348. margin:0 40rpx;
  3349. }
  3350. .decoctControlTopLeft {
  3351. width:40%;
  3352. line-height: 2;
  3353. text-align: center;
  3354. margin: 0 15px;
  3355. position: relative;
  3356. }
  3357. .addTemperature {
  3358. border-radius:5px;
  3359. position:absolute;
  3360. background-color: dodgerblue;
  3361. color:white;
  3362. width: 30px;
  3363. height: 30px;
  3364. left:15px;
  3365. top:80px;
  3366. }
  3367. .addTemperatureBtn {
  3368. border-radius:10px;
  3369. position:absolute;
  3370. clip-path: polygon(50% 0,100% 100%,0 100%);
  3371. transform: scale(0.5);
  3372. left: 0;
  3373. top:0;
  3374. bottom: 0;
  3375. right: 0;
  3376. margin: auto;
  3377. }
  3378. .subTemperature {
  3379. border-radius:5px;
  3380. position:absolute;
  3381. background-color: dodgerblue;
  3382. color:white;
  3383. width: 30px;
  3384. height: 30px;
  3385. right:15px;
  3386. top:80px;
  3387. }
  3388. .subTemperatureBtn {
  3389. border-radius:10px;
  3390. position:absolute;
  3391. clip-path: polygon(50% 0,100% 100%,0 100%);
  3392. transform: scale(0.5);
  3393. left: 0;
  3394. top:0;
  3395. bottom: 0;
  3396. right: 0;
  3397. margin: auto;
  3398. }
  3399. .decoctControlTopRight {
  3400. width:40%;
  3401. line-height: 2;
  3402. text-align: center;
  3403. margin: 0 15px;
  3404. position: relative;
  3405. }
  3406. .decoctControlBottom {
  3407. border-bottom:1px #B2B2B2 dotted;
  3408. width:91vw;
  3409. margin:0 auto;
  3410. padding:10px;
  3411. display: flex;
  3412. justify-content:space-between;
  3413. align-items: center;
  3414. }
  3415. .addTime {
  3416. border-radius:5px;
  3417. position:absolute;
  3418. background-color: dodgerblue;
  3419. color:white;
  3420. width: 30px;
  3421. height: 30px;
  3422. left:15px;
  3423. top:80px;
  3424. }
  3425. .addTimeBtn {
  3426. border-radius:10px;
  3427. position:absolute;
  3428. clip-path: polygon(50% 0,100% 100%,0 100%);
  3429. transform: scale(0.5);
  3430. left: 0;
  3431. top:0;
  3432. bottom: 0;
  3433. right: 0;
  3434. margin: auto;
  3435. }
  3436. .subTime {
  3437. border-radius:5px;
  3438. position:absolute;
  3439. background-color: dodgerblue;
  3440. color:white;
  3441. width: 30px;
  3442. height: 30px;
  3443. right:15px;
  3444. top:80px;
  3445. }
  3446. .subTimeBtn {
  3447. border-radius:10px;
  3448. position:absolute;
  3449. clip-path: polygon(50% 0,100% 100%,0 100%);
  3450. transform: scale(0.5);
  3451. left: 0;
  3452. top:0;
  3453. bottom: 0;
  3454. right: 0;
  3455. margin: auto;
  3456. }
  3457. .packageControlBottomRight {
  3458. border-radius:5px;
  3459. padding:5px 10px;
  3460. margin-right: 15px;
  3461. background-color: #3c9cff;
  3462. color: #fff;
  3463. }
  3464. .packageControlBottomClear {
  3465. border-radius:5px;
  3466. padding:5px 10px;
  3467. background-color: #B2B2B2;
  3468. color: #fff;
  3469. }
  3470. .active_btn{
  3471. background-color: #3c9cff;
  3472. }
  3473. .baozhuang-sub{
  3474. right: 10rpx !important;
  3475. }
  3476. .baozhuang-add{
  3477. left: 6rpx !important;
  3478. }
  3479. .control-input-box{
  3480. display: flex;
  3481. flex-direction: row;
  3482. padding-left: 26rpx;
  3483. }
  3484. .control-input-box-danwei{
  3485. padding-top:12rpx;
  3486. margin-left:4rpx;
  3487. }
  3488. .tabs{
  3489. position: relative;
  3490. top:15vh;
  3491. }
  3492. .child_tab{
  3493. position: relative;
  3494. display: inline-block;
  3495. width: 25%;
  3496. height: 180rpx;
  3497. }
  3498. .child_img{
  3499. width: 50rpx;
  3500. height: 50rpx;
  3501. left: 66rpx;
  3502. top: 66rpx;
  3503. position: relative;
  3504. }
  3505. .child_title{
  3506. position: absolute;
  3507. left: 0px;
  3508. right: 0px;
  3509. text-align: center;
  3510. font-size: 12px;
  3511. bottom: -12rpx;
  3512. color: #060B25;
  3513. }
  3514. .control{
  3515. width: 100%;
  3516. position: relative;
  3517. }
  3518. .control_item{
  3519. position: relative;
  3520. width: 50%;
  3521. display: inline-block;
  3522. height: 150rpx;
  3523. }
  3524. .control_item_detail{
  3525. position: relative;
  3526. top:22rpx;
  3527. }
  3528. .control_item_left{
  3529. position:absolute;;
  3530. left:22%;
  3531. font-size: 55px;
  3532. z-index: 999;
  3533. top:-30rpx
  3534. }
  3535. .control_item_center{
  3536. position:absolute;;
  3537. left:34%;
  3538. top:0vh;
  3539. }
  3540. .control_item_right{
  3541. position:absolute;;
  3542. left:67%;
  3543. font-size: 34px;
  3544. z-index: 999;
  3545. }
  3546. .control_item_center_unit{
  3547. position: absolute;
  3548. left:26vw;
  3549. top: 0.8vh;
  3550. width:200rpx;
  3551. }
  3552. .control_item_title{
  3553. position: absolute;
  3554. bottom:34rpx;
  3555. font-size: 12px;
  3556. width: 100%;
  3557. text-align: center;
  3558. }
  3559. .bottom{
  3560. height: 190rpx;
  3561. position: absolute;
  3562. left: 0px;
  3563. width: 100%;
  3564. padding-top: 18rpx;
  3565. }
  3566. .bottom_item{
  3567. display: inline-block;
  3568. width: 25%;
  3569. font-size: 12px;
  3570. height: 100%;
  3571. position: relative;
  3572. text-align: center;
  3573. margin-top: 2vh;
  3574. }
  3575. .active_on{
  3576. color: #50ACFF;
  3577. }
  3578. .status_info{
  3579. position: absolute;
  3580. left: 5vw;
  3581. top: 10vh;
  3582. }
  3583. .status_detail{
  3584. display: flex;
  3585. flex-direction: row;
  3586. }
  3587. .status_text{
  3588. font-size: 16px;
  3589. }
  3590. .online_text{
  3591. font-size: 12px;
  3592. padding-top: 3px;
  3593. }
  3594. .online{
  3595. color: #017128;
  3596. }
  3597. .device_info{
  3598. font-size: 13px;
  3599. }
  3600. .control_area{
  3601. position: relative;
  3602. top:19vh;
  3603. }
  3604. .disabled_tab{
  3605. opacity: 0.4;
  3606. }
  3607. .roate{
  3608. transform: rotate(180deg);
  3609. }
  3610. </style>