setting.vue 119 KB

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