detail.vue 121 KB

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