detail.vue 120 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754
  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. closeDevicePlanPop(){
  1041. this.devicePlanPopDlg = false;
  1042. },
  1043. devicePlan(){
  1044. let self = this;
  1045. if(this.devicePlanTime>600){
  1046. this.$modal.showToast('预约时间最大为600分钟')
  1047. return;
  1048. }
  1049. if(this.devicePlanTime == 0){
  1050. this.$modal.showToast('预约时间不能为空')
  1051. }else{
  1052. let obj = {deviceNo:this.deviceInfo.serialNumber,minute:this.devicePlanTime};
  1053. addDevicePlan(obj).then(res=>{
  1054. self.getDevicePlanInfo();
  1055. self.$modal.showToast('预约成功')
  1056. self.devicePlanPopDlg = false;
  1057. });
  1058. }
  1059. },
  1060. closeliuzhuanPop(){
  1061. this.liuzhuanPopDlg = false;
  1062. },
  1063. confirmLiuzhuannCurrent(){
  1064. if(this.setTurnCurrent<200 || this.setTurnCurrent>400){
  1065. this.notifyError("扭力范围为200-400")
  1066. return;
  1067. }
  1068. let arr = [];
  1069. let pressObj = {};
  1070. pressObj.id = "TurnCurrent";
  1071. pressObj.shadow = this.setTurnCurrent;
  1072. arr.push(pressObj);
  1073. this.mqttPublish(2,this.deviceInfo,arr)
  1074. this.closeliuzhuanPop();
  1075. },
  1076. setPressTurn(){
  1077. let self = this;
  1078. if(!this.decoctControlOnOffStatus){
  1079. this.notifyError("请先开机后再进行操作")
  1080. return;
  1081. }
  1082. let arr = [];
  1083. let currentPresturn = this.pressTurn;
  1084. let pressObj = {};
  1085. if(this.resetTurn == 1){
  1086. this.resetTurn = 0;
  1087. }
  1088. if(currentPresturn == 1){//代表要关闭
  1089. pressObj.id = "PressTurn";
  1090. pressObj.shadow = 0;
  1091. arr.push(pressObj);
  1092. this.turnPercent = 0;
  1093. this.pressTurn = 0;
  1094. }else{//代表要开启
  1095. pressObj.id = "PressTurn";
  1096. pressObj.shadow = 1;
  1097. arr.push(pressObj);
  1098. this.pressTurn = 1;
  1099. this.resetTurn = 0;
  1100. }
  1101. this.mqttPublish(2,this.deviceInfo,arr)
  1102. this.$forceUpdate()
  1103. this.canGetPrsValue = true;
  1104. setTimeout(function(){
  1105. self.canGetPrsValue = false;
  1106. },3000);
  1107. },
  1108. startProgressTimer(type){
  1109. let self = this;
  1110. if(self.lineTimer != null){
  1111. clearInterval(self.lineTimer)
  1112. }
  1113. if(type == 1){
  1114. self.lineTimer = setInterval(function(){
  1115. if(self.turnPercent >=100){
  1116. self.turnPercent = 1;
  1117. clearInterval(self.lineTimer);
  1118. self.startProgressTimer(1);
  1119. }
  1120. self.turnPercent +=2;
  1121. },100);
  1122. }else{
  1123. self.lineTimer = setInterval(function(){
  1124. if(self.turnPercent >=100){
  1125. self.turnPercent = 1;
  1126. clearInterval(self.lineTimer);
  1127. self.startProgressTimer(2);
  1128. }
  1129. self.turnPercent +=2;
  1130. },100);
  1131. }
  1132. },
  1133. setResetTurn(){
  1134. let self = this;
  1135. if(!this.decoctControlOnOffStatus){
  1136. this.notifyError("请先开机后再进行操作")
  1137. return;
  1138. }
  1139. if(this.pressTurn == 1){
  1140. this.pressTurn = 0;
  1141. }
  1142. let arr = [];
  1143. if(this.resetTurn == 1){
  1144. let pressObj = {};
  1145. pressObj.id = "ResetTurn";
  1146. pressObj.shadow = 0;
  1147. this.resetTurn = 0;
  1148. this.turnPercent = 0;
  1149. arr.push(pressObj);
  1150. }else{
  1151. let pressObj = {};
  1152. pressObj.id = "ResetTurn";
  1153. pressObj.shadow = 1;
  1154. this.resetTurn = 1;
  1155. this.pressTurn = 0;
  1156. let self= this;
  1157. arr.push(pressObj);
  1158. }
  1159. this.mqttPublish(2,this.deviceInfo,arr)
  1160. this.$forceUpdate()
  1161. this.canGetPrsValue = true;
  1162. this.canGetPrsValue = true;
  1163. setTimeout(function(){
  1164. self.canGetPrsValue = false;
  1165. },3000);
  1166. },
  1167. fixImage(heng){
  1168. let self = this;
  1169. wx.getSystemInfo({
  1170. success: res => {
  1171. const { windowWidth, windowHeight, statusBarHeight } = res;
  1172. if(heng){
  1173. let rate = 0.35;
  1174. if(windowHeight<800){
  1175. rate = 0.30;
  1176. }
  1177. let imgHeight = windowWidth*0.85;
  1178. let imageWidth = windowWidth * 1;
  1179. self.productSize = ";width:"+imageWidth+"px;height:"+imgHeight+"px;";
  1180. }else{
  1181. let rate = 0.35;
  1182. if(windowHeight<800){
  1183. rate = 0.30;
  1184. }
  1185. let imgHeight = windowHeight*rate;
  1186. let imageWidth = imgHeight * 0.6;
  1187. self.productSize = ";width:"+imageWidth+"px;height:"+imgHeight+"px;";
  1188. }
  1189. }
  1190. })
  1191. },
  1192. propChange(type){
  1193. // if(type == 1){
  1194. // }
  1195. },
  1196. propFocus(type){
  1197. if(type == 1){
  1198. this.jianyaoWenduSetting = true;
  1199. }
  1200. if(type == 2){
  1201. this.jianyaoShijianSetting = true;
  1202. }
  1203. if(type == 3){
  1204. this.baozhuangFengbianSetting = true;
  1205. this.tempFengBianWendu = this.edegTemperature;
  1206. this.edegTemperature = this.setEdegTemperature;
  1207. }
  1208. if(type == 4){
  1209. this.baozhuangFengkouSetting = true;
  1210. this.tempFengkouWendu = this.sealingTemperature;
  1211. this.sealingTemperature = this.setSealingTemperature;
  1212. }
  1213. if(type == 5){
  1214. this.baozhuangRongLiangSetting = true;
  1215. }
  1216. if(type == 6){
  1217. this.baozhuangShuLIangSetting = true;
  1218. }
  1219. },
  1220. autoBlur(type){
  1221. },
  1222. propBlur(type){
  1223. if(type == 1){
  1224. this.jianyaoWenduSetting = false;
  1225. this.changeTemperature();
  1226. }
  1227. if(type == 2){
  1228. this.temperatureTime = this.leftJianyaoTime;
  1229. this.changeTemperatureTime();
  1230. }
  1231. if(type == 3){
  1232. this.setEdegTemperature = this.edegTemperature;
  1233. this.changeEdegTemperature();
  1234. }
  1235. if(type == 4){
  1236. this.setSealingTemperature = this.sealingTemperature;
  1237. this.changeSealingTemperature();
  1238. }
  1239. if(type == 5){
  1240. this.changePackageVolume()
  1241. }
  1242. if(type == 6){
  1243. this.changePackageNumber();
  1244. }
  1245. },
  1246. modifyName(){
  1247. let self = this;
  1248. uni.showModal({
  1249. title: "修改设备名称",
  1250. editable: true,
  1251. placeholderText: "请输入设备名称",
  1252. content: this.deviceInfo.deviceName,
  1253. showCancel: true,
  1254. success: function (res) {
  1255. console.log(res);
  1256. if(res.confirm){
  1257. let content = res.content;
  1258. let obj = {"deviceId":self.id,deviceName:content};
  1259. editDeviceName(obj).then(res=>{
  1260. if(res.code == 200){
  1261. self.deviceInfo.deviceName = content;
  1262. self.$modal.showToast('修改成功')
  1263. }else{
  1264. self.$modal.showToast('修改失败,请稍后再试')
  1265. }
  1266. });
  1267. }
  1268. },
  1269. fail: function (res) {
  1270. console.log(res);
  1271. }
  1272. })
  1273. },
  1274. showWorkPicker(){
  1275. let self = this;
  1276. uni.showModal({
  1277. title: "提 示",
  1278. content: "非专业人员修改可能导致机器损坏",
  1279. confirmText:"确认",
  1280. success: function (res) {
  1281. if(res.confirm){
  1282. self.showModelPicker = true;
  1283. }
  1284. },
  1285. })
  1286. },
  1287. skip(type){
  1288. if(type == 1){
  1289. wx.navigateToMiniProgram({
  1290. appId: this.appid,
  1291. path: 'pages/news_details/help?id=25',
  1292. success(res) {
  1293. // 打开成功
  1294. },
  1295. fail(res){
  1296. console.log(res);
  1297. }
  1298. })
  1299. }else if(type == 2){
  1300. wx.openCustomerServiceChat({
  1301. extInfo: {url: 'https://work.weixin.qq.com/kfid/kfc4202b8764df71c0c'},
  1302. corpId: 'ww8e678fbe6f1079ba',
  1303. success(res) {
  1304. },
  1305. fail(res){
  1306. console.log(res);
  1307. }
  1308. })
  1309. }
  1310. },
  1311. isMulTab(index){
  1312. let type = this.deviceType;
  1313. if(index == 2){
  1314. if(this.secondMachine){
  1315. return true;
  1316. }
  1317. }
  1318. if(index == 3){
  1319. if(this.thirdMachine){
  1320. return true;
  1321. }
  1322. }
  1323. return false;
  1324. },
  1325. isPage(index){
  1326. if(this.tabIndex == index){
  1327. return true;
  1328. }
  1329. return false;
  1330. },
  1331. getUpdateInfo(){
  1332. let self = this;
  1333. getLatestFirmware(this.id).then(res=>{
  1334. self.firmware = res.data;
  1335. let curVersion = self.deviceInfo.firmwareVersion;
  1336. let onlineVersion = self.firmware.version
  1337. if(curVersion>=onlineVersion){
  1338. this.$modal.showToast('当前已经是最新版本')
  1339. }else{
  1340. uni.showModal({
  1341. title: '检测到新版本',
  1342. content: "当前版本:"+curVersion+",新版本:"+onlineVersion,
  1343. cancelText: '取消',
  1344. confirmText: '升级',
  1345. success: function(res) {
  1346. if (res.confirm) {
  1347. self.doUpdate();
  1348. }
  1349. }
  1350. })
  1351. }
  1352. });
  1353. },
  1354. doUpdate(){
  1355. if(this.deviceInfo.status != 3){
  1356. this.notifyError("请等待设备上线后操作")
  1357. return;
  1358. }
  1359. let device = this.deviceInfo;
  1360. let message = "";
  1361. let topic = "";
  1362. let title = "升级";
  1363. topic = "/" + device.productId + "/" + device.serialNumber + "/ota/get";
  1364. message = '{"version":"' + this.firmware.version + '","downloadUrl":"' + this.getDownloadUrl(this.firmware.filePath) + '","size":"'+this.firmware.size+'"}';
  1365. this.$mqttTool.publish(topic, message,title).then(res => {
  1366. this.notifySuccess(res);
  1367. }).catch(res => {
  1368. this.notifyError(res);
  1369. });
  1370. },
  1371. getStatusText(){
  1372. if(this.baozhuangRunning()){
  1373. return "工作中";
  1374. }
  1375. if(this.jianyaoIng()){
  1376. return "工作中";
  1377. }
  1378. if(this.leftAppointmentTime>0){
  1379. return "已预约";
  1380. }
  1381. return "空闲中";
  1382. },
  1383. closeYuyueIngPop(){
  1384. this.yuyueIngPop = false;
  1385. },
  1386. confirmMode(item){
  1387. console.log(item)
  1388. this.workMode = item.value[0].id;
  1389. this.setMode(this.workMode);
  1390. this.closeModelPicker();
  1391. },
  1392. closeModelPicker(){
  1393. this.showModelPicker = false;
  1394. },
  1395. confirmJiaozhunTemp(){
  1396. this.jiaozhunTemp = this.jiaozhunTemp_temp;
  1397. this.temperNumber();
  1398. this.closejiaozhunPop();
  1399. },
  1400. addJiaoZhunTemperature(){
  1401. this.jiaozhunTemp_temp ++;
  1402. if(this.jiaozhunTemp_temp>20){
  1403. this.jiaozhunTemp_temp = 20;
  1404. }
  1405. },
  1406. subJiaoZhunTemperature(){
  1407. this.jiaozhunTemp_temp --;
  1408. if(this.jiaozhunTemp_temp<-20){
  1409. this.jiaozhunTemp_temp = -20;
  1410. }
  1411. },
  1412. closejiaozhunPop(){
  1413. this.jiaozhunPopDlg = false;
  1414. },
  1415. showLiuProp(){
  1416. let self = this;
  1417. uni.showModal({
  1418. title: "提 示",
  1419. content: "非专业人员修改可能导致机器损坏",
  1420. confirmText:"确认",
  1421. success: function (res) {
  1422. if(res.confirm){
  1423. self.liuzhuanPopDlg = true;
  1424. }
  1425. },
  1426. })
  1427. },
  1428. showJiaozhunProp(){
  1429. let self = this;
  1430. uni.showModal({
  1431. title: "提 示",
  1432. content: "非专业人员修改可能导致机器损坏",
  1433. confirmText:"确认",
  1434. success: function (res) {
  1435. if(res.confirm){
  1436. self.jiaozhunTemp_temp = self.jiaozhunTemp;
  1437. self.jiaozhunPopDlg = true;
  1438. }
  1439. },
  1440. })
  1441. },
  1442. fixStyle(){
  1443. let self = this;
  1444. wx.getSystemInfo({
  1445. success: res => {
  1446. const { windowWidth, windowHeight, statusBarHeight } = res;
  1447. // 在这里可以获取到屏幕的宽度和高度
  1448. console.log(windowWidth, windowHeight, statusBarHeight);
  1449. if(windowWidth<=350){
  1450. self.unitFixedStyle = ";padding-top:6px;left: 28vw;";
  1451. self.unitFixedStyle1 = ";padding-top:6px;left: 28vw;";
  1452. }else if(windowWidth>=360){
  1453. self.unitFixedStyle = ";padding-top:10rpx;";
  1454. self.unitFixedStyle1 = ";padding-top:10rpx;left: 32vw;";
  1455. }
  1456. self.maxWidth = windowWidth;
  1457. }
  1458. })
  1459. },
  1460. closePlanIngPop(){
  1461. this.jianyaoPopClose = false;
  1462. this.planIngPopDlg = false;
  1463. },
  1464. closePlanPop(){
  1465. this.planPopDlg = false;
  1466. },
  1467. showBaozhuangDlg(type){
  1468. this.popDlg = true;
  1469. if(type == 1){
  1470. this.fengbianDlgShow = true;
  1471. }else if(type == 2){
  1472. this.fengkouDlgShow = true;
  1473. }else if(type == 3){
  1474. this.wenhuoTimeDlgShow = true;
  1475. }
  1476. },
  1477. closePop(){
  1478. this.popDlg = false;
  1479. this.fengbianDlgShow = false;
  1480. this.fengkouDlgShow = false;
  1481. this.wenhuoTimeDlgShow = false;
  1482. },
  1483. changeTab(index,tag){
  1484. if(!tag){
  1485. return;
  1486. }
  1487. debugger;
  1488. let type = this.deviceType;
  1489. let self = this;
  1490. if(index == 2 || index == 3){
  1491. if(!this.isMulTab(index)){
  1492. return;
  1493. }
  1494. }
  1495. this.resetChoose();
  1496. if(index == 4){
  1497. if(!this.forthMachine){
  1498. return;
  1499. }
  1500. uni.showLoading({title:"加载中"});
  1501. getDeviceStatus(this.id,0).then(res=>{
  1502. let data =res.data;
  1503. this.deviceInfo = data;
  1504. self.parseStatusData(data)
  1505. setTimeout(function () {
  1506. uni.hideLoading();
  1507. self.firstTab = false;
  1508. },100);
  1509. });
  1510. }else{
  1511. let arr = ["a","b","c"]
  1512. if(this.isMulTab(index)){
  1513. this.childId =arr[index-1];
  1514. this.getDeviceStatus(function(){
  1515. self.tabIndex = index;
  1516. self.firstTab = true;
  1517. self.tabActive[index-1] = true;
  1518. self.$forceUpdate();
  1519. });
  1520. }else{
  1521. this.getDeviceStatus(function(){
  1522. self.tabIndex = index;
  1523. self.firstTab = true;
  1524. self.tabActive[index-1] = true;
  1525. self.$forceUpdate();
  1526. })
  1527. }
  1528. console.log(this.tabActive)
  1529. }
  1530. },
  1531. resetChoose(){
  1532. this.tabIndex = 0;
  1533. for (let i = 0; i < 3; i++) {
  1534. this.tabActive[i] = false;
  1535. }
  1536. },
  1537. changePackageVolume(){
  1538. if(this.packageVolume<50){
  1539. this.packageVolume = 50;
  1540. }
  1541. if(this.packageVolume>300){
  1542. this.packageVolume = 300;
  1543. }
  1544. this.sendBaozhuang("PackingVolume");
  1545. },
  1546. changePackageNumber(){
  1547. let min = 1;
  1548. let max = 999;
  1549. if(this.packageNumber<min){
  1550. this.packageNumber = min;
  1551. }
  1552. if(this.packageNumber>max){
  1553. this.packageNumber = max;
  1554. }
  1555. this.sendBaozhuang("PackageQuantity");
  1556. },
  1557. changeEdegTemperature(){
  1558. let min = 80;
  1559. let max = 220;
  1560. if(this.setEdegTemperature<min){
  1561. this.setEdegTemperature = min;
  1562. }
  1563. if(this.setEdegTemperature>max){
  1564. this.setEdegTemperature = max;
  1565. }
  1566. console.log("current setEdegTemperature is :"+this.setEdegTemperature)
  1567. this.sendBaozhuang("SetBandingTemp");
  1568. },
  1569. changeSealingTemperature(){
  1570. let min = 80;
  1571. let max = 220;
  1572. if(this.setSealingTemperature<min){
  1573. this.setSealingTemperature = min;
  1574. }
  1575. if(this.setSealingTemperature>max){
  1576. this.setSealingTemperature = max;
  1577. }
  1578. console.log("current setSealingTemperature is :"+this.setSealingTemperature)
  1579. this.sendBaozhuang("SetSealTemp");
  1580. },
  1581. changeTemperature(){
  1582. let max = 140;
  1583. let min = 100;
  1584. if(this.workMode == 2){
  1585. min = 1;
  1586. }
  1587. if(this.temperature<min){
  1588. this.temperature = min;
  1589. }
  1590. if(this.temperature>max){
  1591. this.temperature = max;
  1592. }
  1593. console.log("current temperature is :"+this.temperature)
  1594. this.sendJianYao("TempSetting");
  1595. },
  1596. changeTemperatureTime(){
  1597. let min = 1;
  1598. let max = 600;
  1599. if(this.temperatureTime<min){
  1600. this.temperatureTime = min;
  1601. }
  1602. if(this.temperatureTime>max){
  1603. this.temperatureTime = max;
  1604. }
  1605. console.log("current temperatureTime is :"+this.temperatureTime)
  1606. this.sendJianYao("TimeSetting");
  1607. },
  1608. jianyaoOpen(){
  1609. if(this.decoctControlOnOffStatus){
  1610. return true;
  1611. }
  1612. return false;
  1613. },
  1614. baozhuangOpen(){
  1615. if(this.packageControlOnOffStatus){
  1616. return true;
  1617. }
  1618. return false;
  1619. },
  1620. baozhuangRunning(){
  1621. if(this.qingxiTurn || this.baozhuangTurn || this.qitingTurn){
  1622. return true;
  1623. }
  1624. return false;
  1625. },
  1626. jianyaoIng(){
  1627. if(this.decoctControlStatus){
  1628. return true;
  1629. }
  1630. return false;
  1631. },
  1632. cancelPlan(){
  1633. let arr = [];
  1634. let obj = {};
  1635. obj.id = "AppointmentTime";
  1636. obj.shadow = 0;
  1637. arr.push(obj);
  1638. let self = this;
  1639. self.kongzhiJianyao(false,arr);
  1640. this.mqttPublish(2,this.deviceInfo,arr,true);
  1641. this.closeYuyueIngPop();
  1642. },
  1643. toPlan(){
  1644. if(!this.jianyaoOpen()){
  1645. this.$modal.showToast('煎药机已经关机')
  1646. return;
  1647. }
  1648. if(this.leftAppointmentTime>0){
  1649. this.yuyueIngPop = true;
  1650. }else{
  1651. if(this.jianyaoIng()){
  1652. this.$modal.showToast('正在煎药')
  1653. return;
  1654. }
  1655. this.planPopDlg = true;
  1656. }
  1657. },
  1658. toDevicePlan(){
  1659. if(!this.jianyaoOpen()){
  1660. this.$modal.showToast('煎药机已经关机')
  1661. return;
  1662. }
  1663. let self = this;
  1664. getDevicePlan(this.deviceInfo.serialNumber).then(res=>{
  1665. if(res.data != null){
  1666. self.deviceYuyueIngPop = true;
  1667. self.devicePlanInfo = res.data;
  1668. let minute = self.devicePlanInfo.minute;
  1669. if(minute<0){
  1670. minute = 10;
  1671. }
  1672. self.devicePlanInfo.minute = minute;
  1673. }else{
  1674. self.devicePlanPopDlg = true;
  1675. }
  1676. });
  1677. },
  1678. cancelDevicePlan(){
  1679. delDevicePlan(this.devicePlanInfo.id).then(res=>{
  1680. this.$modal.showToast('取消成功')
  1681. this.deviceYuyueIngPop = false;
  1682. this.devicePlanInfo = null;
  1683. })
  1684. },
  1685. getDevicePlanInfo(){
  1686. let self = this;
  1687. self.devicePlanInfo = null;
  1688. getDevicePlan(this.deviceInfo.serialNumber).then(res=>{
  1689. if(res.data != null){
  1690. self.devicePlanInfo = res.data;
  1691. let minute = self.devicePlanInfo.minute;
  1692. if(minute<0){
  1693. minute = 10;
  1694. }
  1695. self.devicePlanInfo.minute = minute;
  1696. }
  1697. });
  1698. },
  1699. calcuStep(){
  1700. if(this.leftAppointmentTime>0){
  1701. this.step = 0;
  1702. return 0;
  1703. }
  1704. if(this.leftJianyaoTime == 0){
  1705. this.step = 100;
  1706. return ;
  1707. }
  1708. let currentTemperature = this.currentTemperature;
  1709. let hightTemperature = this.temperatureTime-this.leftJianyaoTime;//设置的高温时间
  1710. let targetTemperature =100;// this.temperature;
  1711. let targetTemperatureTime = this.temperatureTime;//倒计时
  1712. if(targetTemperature>100){
  1713. targetTemperature = 100;
  1714. }
  1715. let step = 0;
  1716. if(currentTemperature<100){
  1717. let tem = currentTemperature/200*100;
  1718. step = tem;
  1719. }else{
  1720. step = 50;
  1721. let rate = hightTemperature/targetTemperatureTime;
  1722. rate = rate/2;
  1723. rate = rate*100;
  1724. rate = rate.toFixed(2)
  1725. step = step + parseFloat(rate);
  1726. }
  1727. this.step = step.toFixed(2);
  1728. },
  1729. plan(){
  1730. let self = this;
  1731. if(this.planTime>600){
  1732. this.$modal.showToast('预约时间最大为600分钟')
  1733. return;
  1734. }
  1735. if(this.planTime == 0){
  1736. this.$modal.showToast('预约时间不能为空')
  1737. }else{
  1738. let arr = [];
  1739. let obj = {};
  1740. obj.id = "AppointmentTime";
  1741. obj.shadow = this.planTime;
  1742. arr.push(obj);
  1743. this.kongzhiJianyao(true,arr);
  1744. this.mqttPublish(2,this.deviceInfo,arr,true);
  1745. }
  1746. this.$modal.showToast('预约成功')
  1747. this.planPopDlg = false;
  1748. },
  1749. lockCtrl(key){
  1750. let arr = [];
  1751. let obj = {};
  1752. obj.id = "LockControl";
  1753. if(key == 0){
  1754. obj.shadow = 1;
  1755. this.lock.value = 1;
  1756. }else{
  1757. obj.shadow = 0;
  1758. this.lock.value = 0;
  1759. }
  1760. arr.push(obj);
  1761. this.mqttPublish(2,this.deviceInfo,arr)
  1762. },
  1763. setMode(type){
  1764. let arr = [];
  1765. let obj = {};
  1766. obj.id = "WorkMode";
  1767. obj.shadow = type;
  1768. arr.push(obj);
  1769. this.mqttPublish(2,this.deviceInfo,arr,true)
  1770. this.workMode = type;
  1771. },
  1772. temperNumber(value){
  1773. let arr = [];
  1774. let obj = {};
  1775. obj.id = "CalibrationTemp";
  1776. obj.shadow = this.jiaozhunTemp;
  1777. arr.push(obj);
  1778. this.mqttPublish(2,this.deviceInfo,arr,true)
  1779. },
  1780. volumeNumber(){
  1781. let arr = [];
  1782. let obj = {};
  1783. obj.id = "CapacityCalibration";
  1784. obj.shadow = 1;
  1785. arr.push(obj);
  1786. this.mqttPublish(2,this.deviceInfo,arr,true)
  1787. },
  1788. showConfirm(title,content,yes,no){
  1789. uni.showModal({
  1790. title: title,
  1791. content: content,
  1792. success: function (res) {
  1793. if (res.confirm) {
  1794. yes();
  1795. } else if (res.cancel) {
  1796. no();
  1797. }
  1798. }
  1799. });
  1800. },
  1801. reset(){
  1802. let self = this;
  1803. uni.showModal({
  1804. title: "提 示",
  1805. content: "非专业人员修改可能导致机器损坏",
  1806. confirmText:"确认",
  1807. success: function (res) {
  1808. if(res.confirm){
  1809. let arr = [];
  1810. let obj = {};
  1811. obj.id = "RestoreFactory";
  1812. obj.shadow = 1;
  1813. arr.push(obj);
  1814. self.mqttPublish(2,self.deviceInfo,arr)
  1815. }
  1816. },
  1817. })
  1818. },
  1819. turnChange(type){
  1820. let flag = false;
  1821. let obj = {};
  1822. if(type ==3){
  1823. if(this.baozhuangTurn || this.qitingTurn){
  1824. this.$modal.showToast("启停、包装、清洗不能同时打开")
  1825. return;
  1826. }
  1827. flag = this.qingxiTurn;
  1828. obj.id = "WashSwitch";
  1829. }else if(type == 2){
  1830. if(this.qingxiTurn || this.qitingTurn){
  1831. this.$modal.showToast("启停、包装、清洗不能同时打开")
  1832. return;
  1833. }
  1834. flag = this.baozhuangTurn;
  1835. obj.id = "PackageSwitch";
  1836. }else if(type == 1) {
  1837. if(this.qingxiTurn || this.baozhuangTurn){
  1838. this.$modal.showToast("启停、包装、清洗不能同时打开")
  1839. return;
  1840. }
  1841. flag = this.qitingTurn;
  1842. obj.id = "CarrybagSwitch";
  1843. }
  1844. flag = !flag;
  1845. let arr = [];
  1846. if(flag){
  1847. obj.shadow = 1;
  1848. }else{
  1849. obj.shadow = 0;
  1850. }
  1851. arr.push(obj);
  1852. this.mqttPublish(2,this.deviceInfo,arr)
  1853. },
  1854. addPackageVolume(){
  1855. this.packageVolume++;
  1856. if(this.packageVolume>300){
  1857. this.packageVolume = 50;
  1858. }
  1859. console.log("增加包装容量")
  1860. this.changePackageVolume()
  1861. },
  1862. subPackageVolume(){
  1863. this.packageVolume--;
  1864. if( this.packageVolume<50){
  1865. this.packageVolume = 300;
  1866. }
  1867. console.log("减少包装容量")
  1868. this.changePackageVolume()
  1869. },
  1870. addPackageNumber(){
  1871. this.packageNumber++;
  1872. if(this.packageNumber>999){
  1873. this.packageNumber = 1;
  1874. }
  1875. console.log("增加包装数量")
  1876. this.changePackageNumber();
  1877. },
  1878. subPackageNumber(){
  1879. this.packageNumber--;
  1880. if(this.packageNumber<1){
  1881. this.packageNumber = 999;
  1882. }
  1883. console.log("减少包装数量")
  1884. this.changePackageNumber();
  1885. },
  1886. addSealingTemperature(){
  1887. console.log("增加封口温度")
  1888. if(!this.fengkouDlgShow){
  1889. this.fengkouDlgShow = true;
  1890. }
  1891. this.setSealingTemperature++;
  1892. this.changeSealingTemperature();
  1893. },
  1894. subSealingTemperature(){
  1895. console.log("减少封口温度")
  1896. if(!this.fengkouDlgShow){
  1897. this.fengkouDlgShow = true;
  1898. }
  1899. this.setSealingTemperature--;
  1900. this.changeSealingTemperature();
  1901. },
  1902. addEdegTemperature(){
  1903. console.log("增加封边温度")
  1904. this.editing = true;
  1905. if(!this.fengbianDlgShow){
  1906. this.fengbianDlgShow = true;
  1907. }
  1908. this.setEdegTemperature++;
  1909. this.changeEdegTemperature();
  1910. },
  1911. subEdegTemperature(){
  1912. console.log("减少封边温度")
  1913. this.editing = true;
  1914. if(!this.fengbianDlgShow){
  1915. this.fengbianDlgShow = true;
  1916. }
  1917. this.setEdegTemperature--;
  1918. this.changeEdegTemperature();
  1919. },
  1920. addTemperatureTime(){
  1921. console.log("增加煎药时间")
  1922. if(!this.wenhuoTimeDlgShow){
  1923. this.wenhuoTimeDlgShow = true;
  1924. this.temperatureTime = this.leftJianyaoTime;
  1925. }
  1926. this.temperatureTime++;
  1927. this.changeTemperatureTime()
  1928. },
  1929. subTemperatureTime(){
  1930. console.log("减少煎药时间")
  1931. if(!this.wenhuoTimeDlgShow){
  1932. this.wenhuoTimeDlgShow = true;
  1933. this.temperatureTime = this.leftJianyaoTime;
  1934. }
  1935. this.temperatureTime--;
  1936. if(this.temperatureTime<=0){
  1937. this.temperatureTime = 1;
  1938. }
  1939. this.changeTemperatureTime()
  1940. },
  1941. addTemperature(){
  1942. console.log("增加煎药温度")
  1943. this.temperature++;
  1944. this.changeTemperature();
  1945. },
  1946. subTemperature(type){
  1947. console.log("减少煎药温度")
  1948. this.temperature--;
  1949. this.changeTemperature();
  1950. },
  1951. addPlanTime(){
  1952. console.log("增加预约时间")
  1953. this.planTime++;
  1954. },
  1955. subPlanTime(){
  1956. console.log("减少预约时间")
  1957. this.planTime--;
  1958. },
  1959. sendBaozhuang(targetKey){
  1960. let self = this;
  1961. let arr = [];
  1962. if(this.baozhuangTimer != null){
  1963. clearTimeout(this.baozhuangTimer);
  1964. }
  1965. this.baozhuangTimer = setTimeout(function (){
  1966. for (let i = 0; i <this.baozhuangKeys.length; i++) {
  1967. let key = this.baozhuangKeys[i];
  1968. let obj = {};
  1969. obj.id = key;
  1970. if(key === "PackingVolume"){
  1971. obj.shadow = this.packageVolume;
  1972. setTimeout(function (){
  1973. self.baozhuangRongLiangSetting = false;
  1974. },self.resetDuration);
  1975. }
  1976. if(key === "PackageQuantity"){
  1977. obj.shadow = this.packageNumber;
  1978. setTimeout(function (){
  1979. self.baozhuangShuLIangSetting = false;
  1980. },self.resetDuration);
  1981. }
  1982. if(key === "SetSealTemp"){
  1983. obj.shadow = this.setSealingTemperature;
  1984. setTimeout(function (){
  1985. self.fengkouDlgShow = false;
  1986. self.baozhuangFengkouSetting = false;
  1987. self.sealingTemperature = self.tempFengKouWendu;;
  1988. },self.resetDuration);
  1989. }
  1990. if(key === "SetBandingTemp"){
  1991. obj.shadow = this.setEdegTemperature;
  1992. setTimeout(function (){
  1993. self.fengbianDlgShow = false;
  1994. self.baozhuangFengbianSetting = false;
  1995. self.edegTemperature = self.tempFengBianWendu;
  1996. },self.resetDuration);
  1997. }
  1998. if(targetKey == key){
  1999. arr.push(obj);
  2000. break;
  2001. }
  2002. }
  2003. this.mqttPublish(2,this.deviceInfo,arr)
  2004. }.bind(this),500);
  2005. },
  2006. sendJianYao(targetKey){
  2007. let self = this;
  2008. let arr = [];
  2009. if(this.jianyaoTimer != null){
  2010. clearTimeout(this.jianyaoTimer);
  2011. }
  2012. this.jianyaoTimer = setTimeout(function (){
  2013. for (let i = 0; i <this.jianyaoKeys.length; i++) {
  2014. let key = this.jianyaoKeys[i];
  2015. let obj = {};
  2016. obj.id = key;
  2017. if(key === "TempSetting"){
  2018. obj.shadow = this.temperature;
  2019. // setTimeout(function(){
  2020. // self.wenhuoTimeDlgShow = false;
  2021. // self.jianyaoShijianSetting = false;
  2022. // },self.resetDuration)
  2023. }
  2024. if(key === "TimeSetting"){
  2025. obj.shadow = this.temperatureTime;
  2026. self.leftJianyaoTime = this.temperatureTime;;
  2027. setTimeout(function(){
  2028. self.wenhuoTimeDlgShow = false;
  2029. self.jianyaoShijianSetting = false;
  2030. },self.resetDuration)
  2031. }
  2032. if(targetKey == key){
  2033. arr.push(obj);
  2034. break;
  2035. }
  2036. }
  2037. this.mqttPublish(2,this.deviceInfo,arr,true)
  2038. }.bind(this),500);
  2039. },
  2040. buildPropKey(key){
  2041. if(this.childId !=0){
  2042. return key+"_"+this.childId;
  2043. }else{
  2044. return key;
  2045. }
  2046. },
  2047. decoctControlChange(){
  2048. let obj = {};
  2049. let arr = [];
  2050. if(!this.decoctControlOnOffStatus){
  2051. this.notifyError("请先开机后再进行操作")
  2052. return;
  2053. }
  2054. if(this.decoctControlStatus){
  2055. this.showJianyao();
  2056. return;
  2057. }
  2058. this.decoctControlStatus = !this.decoctControlStatus;
  2059. obj.id = "DecoctingSwitch";
  2060. if(this.decoctControlStatus){
  2061. obj.shadow = 1;
  2062. console.log("煎药状态打开")
  2063. this.checkJianyao();
  2064. }else{
  2065. obj.shadow = 0;
  2066. console.log("煎药状态关闭")
  2067. }
  2068. arr.push(obj);
  2069. this.mqttPublish(2,this.deviceInfo,arr,true)
  2070. },
  2071. kongzhiJianyao(flag,arr){//不判断煎药状态
  2072. let obj = {};
  2073. if(!this.decoctControlOnOffStatus){
  2074. this.notifyError("请先开机后再进行操作")
  2075. return;
  2076. }
  2077. obj.id = "DecoctingSwitch";
  2078. if(flag){
  2079. obj.shadow = 1;
  2080. console.log("煎药状态打开")
  2081. this.checkJianyao();
  2082. }else{
  2083. obj.shadow = 0;
  2084. console.log("煎药状态关闭")
  2085. }
  2086. arr.push(obj);
  2087. },
  2088. stopDecoctControlChange(){
  2089. let obj = {};
  2090. let arr = [];
  2091. if(!this.decoctControlOnOffStatus){
  2092. this.notifyError("请先开机后再进行操作")
  2093. return;
  2094. }
  2095. if(!this.decoctControlStatus){
  2096. return;
  2097. }
  2098. this.decoctControlStatus = !this.decoctControlStatus;
  2099. obj.id = "DecoctingSwitch";
  2100. if(this.decoctControlStatus){
  2101. obj.shadow = 1;
  2102. console.log("煎药状态打开")
  2103. }else{
  2104. obj.shadow = 0;
  2105. console.log("煎药状态关闭")
  2106. }
  2107. arr.push(obj);
  2108. let obj2 = {};
  2109. obj2.id = "AppointmentTime";
  2110. obj2.shadow = 0;
  2111. arr.push(obj2);
  2112. this.mqttPublish(2,this.deviceInfo,arr,true)
  2113. },
  2114. decoctControlOnOffChange(){
  2115. let obj = {};
  2116. this.decoctControlOnOffStatus = !this.decoctControlOnOffStatus;
  2117. let arr = [];
  2118. obj.id = "PowerControl";
  2119. let isMul = false;
  2120. if(this.decoctControlStatus){
  2121. this.$modal.showToast('请先结束煎药后操作')
  2122. this.decoctControlOnOffStatus = !this.decoctControlOnOffStatus;
  2123. return;
  2124. }
  2125. if(this.oneToMul && this.firstTab){
  2126. obj.id = "PowerCtl";
  2127. isMul = true;
  2128. }
  2129. if(this.decoctControlOnOffStatus){
  2130. obj.shadow = 1;
  2131. console.log("煎药机开关打开")
  2132. }else{
  2133. obj.shadow = 0;
  2134. console.log("煎药机开关关闭")
  2135. }
  2136. arr.push(obj);
  2137. this.mqttPublish(2,this.deviceInfo,arr,isMul)
  2138. },
  2139. packageControlOnOffChange(){
  2140. let obj = {};
  2141. let arr = [];
  2142. if(this.baozhuangRunning()){
  2143. this.$modal.showToast('请先停止运行后操作')
  2144. return;
  2145. }
  2146. obj.id = "PackagePowerControl";
  2147. this.packageControlOnOffStatus = !this.packageControlOnOffStatus;
  2148. if(this.packageControlOnOffStatus){
  2149. console.log("包装机器开关打开")
  2150. obj.shadow = 1;
  2151. }else{
  2152. console.log("包装机器开关关闭")
  2153. obj.shadow = 0;
  2154. }
  2155. arr.push(obj);
  2156. this.mqttPublish(2,this.deviceInfo,arr)
  2157. },
  2158. containKey(arr,key){
  2159. for (let i = 0; i < arr.length; i++) {
  2160. const data = arr[i];
  2161. if(data == key){
  2162. return true;
  2163. }
  2164. }
  2165. return false;
  2166. },
  2167. // 抽屉状态发生变化触发
  2168. change(e, type) {
  2169. console.log(e);
  2170. },
  2171. showDrawer() {
  2172. this.$refs.showLeft.open();
  2173. },
  2174. closeDrawer() {
  2175. this.$refs.showLeft.close();
  2176. },
  2177. checkItemValue(item){
  2178. if(!item.shadow){
  2179. item.shadow = 0;
  2180. }
  2181. if(!item.unit){
  2182. item.unit = "";
  2183. }
  2184. return true;
  2185. },
  2186. sendProperties(){
  2187. let properties = this.properties;
  2188. for (let i = 0; i < properties; i++) {
  2189. let property = this.properties[i];
  2190. let shadow = property.shadow;
  2191. if(shadow){
  2192. arr.push(property);
  2193. }
  2194. }
  2195. this.mqttPublish(1,this.deviceInfo,arr)
  2196. },
  2197. sendFunctions(){
  2198. let arr = [];
  2199. let functions = this.functions;
  2200. for (let i = 0; i < functions.length; i++) {
  2201. let functionObj = this.functions[i];
  2202. let shadow = functionObj.shadow;
  2203. if(shadow){
  2204. arr.push(functionObj);
  2205. }
  2206. }
  2207. this.mqttPublish(2,this.deviceInfo,arr)
  2208. },
  2209. changeProp(key,val){
  2210. let item = null;
  2211. let obj = null;
  2212. let oneToMul = this.oneToMul;
  2213. if(key === "LockControl"){
  2214. this.lock.value = val;
  2215. item = this.lock;
  2216. }else if(key === "PowerControl"){
  2217. this.power.value = val;
  2218. item = this.power;
  2219. }
  2220. let value = val;
  2221. obj = item.item;
  2222. if(value){
  2223. obj.value = 1;
  2224. obj.shadow = 1;
  2225. }else{
  2226. obj.value = 0;
  2227. obj.shadow = 0;
  2228. }
  2229. if(!oneToMul){
  2230. }
  2231. this.publishThingsModel(this.deviceInfo,obj);
  2232. },
  2233. checkCommonProp(item){
  2234. let id =item.id;
  2235. let isCommonKey = this.modelKey.some(res=>{
  2236. return id === res;
  2237. })
  2238. return !isCommonKey;
  2239. },
  2240. getRunTime(){
  2241. let self = this;
  2242. getDeviceRunTime(this.id).then(res=>{
  2243. self.timeobj = res.data;
  2244. if(self.timeobj.avgtime == ""){
  2245. self.timeobj.avgtime = 0;
  2246. }
  2247. if(self.timeobj.alltime == ""){
  2248. self.timeobj.alltime = 0;
  2249. }
  2250. })
  2251. },
  2252. seeTime(){
  2253. this.showTimeDlg = true;
  2254. this.getRunTime();
  2255. },
  2256. closeTime(){
  2257. this.showTimeDlg = false;
  2258. },
  2259. cancel(){
  2260. this.showErrDlg = false;
  2261. },
  2262. reportError(){
  2263. this.showErrDlg = true;
  2264. },
  2265. doReportError(){
  2266. if(!this.errorMsg){
  2267. this.$modal.showToast('异常信息不能为空')
  2268. }else{
  2269. let self = this;
  2270. let errObj = {};
  2271. errObj.deviceId = this.deviceInfo.deviceId;
  2272. errObj.deviceName = this.deviceInfo.deviceName
  2273. errObj.desc = this.errorMsg;
  2274. errObj.deptId= this.deviceInfo.deptId;
  2275. reportError(errObj).then(res=>{
  2276. self.$modal.showToast(res.msg)
  2277. self.cancel();
  2278. })
  2279. }
  2280. },
  2281. openLocation(){
  2282. uni.openLocation({
  2283. latitude: this.location.latitude,
  2284. longitude: this.location.longitude,
  2285. success: function () {
  2286. console.log('success');
  2287. }
  2288. });
  2289. },
  2290. confirmItemData(e){
  2291. let data = e.value[0];
  2292. this.show.text = data.text;
  2293. this.show.shadow=data.value;
  2294. this.show = null;
  2295. console.log(data);
  2296. },
  2297. send(){
  2298. let shadow = false
  2299. let _arr = []
  2300. this.inputProp.forEach((item)=>{
  2301. _arr.push(item.value)
  2302. })
  2303. // if(_arr.some(val => val === '' || val.length < 0)){
  2304. // shadow = true
  2305. // }
  2306. if(this.deviceInfo.status != 3){
  2307. uni.showToast({
  2308. title:"设备暂未上线",
  2309. icon:"error"
  2310. })
  2311. return;
  2312. }
  2313. if(shadow){
  2314. uni.showToast({
  2315. title:"数据不能为空",
  2316. icon:"error"
  2317. })
  2318. return;
  2319. }
  2320. this.publishThingsModel(this.deviceInfo,this.inputProp.map(item=>{return{"id":item.id,"value":item.value}}))
  2321. },
  2322. /** 更新设备状态 */
  2323. updateDeviceStatus(device) {
  2324. },
  2325. chooseItemData(data){
  2326. if(this.deviceInfo.status != 3){
  2327. uni.showToast({
  2328. title:"设备暂未上线",
  2329. icon:"error"
  2330. })
  2331. return;
  2332. }
  2333. this.columns = [data.enumList];
  2334. this.show =data;
  2335. },
  2336. getDetail(){
  2337. let self = this;
  2338. getDetail(this.id).then(res=>{
  2339. self.deviceInfo = res.data;
  2340. self.deviceType = res.data.type;
  2341. let msg = res.msg;
  2342. if(msg){
  2343. try{
  2344. msg = JSON.parse(msg+"");
  2345. }catch (e){
  2346. msg = null;
  2347. }
  2348. }
  2349. let productId = self.deviceInfo.productId;
  2350. if(productId === 57){
  2351. self.boardType = 5;
  2352. }
  2353. let online = self.deviceInfo.status == 3?true:false;
  2354. if(!online){
  2355. if(!self.onlineStatus){
  2356. uni.showModal({
  2357. title: '系统提示',
  2358. content: "设备未在线,无法操作",
  2359. confirmText: '确定',
  2360. showCancel:false,
  2361. success(res){
  2362. if(res.confirm){
  2363. self.onlineStatus = true;
  2364. }
  2365. },
  2366. })
  2367. }
  2368. }
  2369. if(msg != null){
  2370. let b = msg.b;
  2371. let c = msg.c;
  2372. let a = msg.a;
  2373. let d = msg.d;
  2374. if(a == 1){
  2375. self.firstMachine = true;
  2376. }
  2377. if(b == 1){
  2378. self.secondMachine = true;
  2379. }
  2380. if(c == 1){
  2381. self.thirdMachine = true;
  2382. }
  2383. if(d == 1){
  2384. self.forthMachine = true;
  2385. }
  2386. }
  2387. console.log("当前设备类型:"+JSON.stringify(self.deviceInfo.type))
  2388. self.location = {
  2389. latitude: self.deviceInfo.latitude,
  2390. longitude: self.deviceInfo.longitude};
  2391. self.sysDept = self.deviceInfo.sysDept;
  2392. self.parseSummay(res.data.summary)
  2393. self.mqttSubscribe(res.data);
  2394. self.getDeviceStatus();
  2395. self.seeTime();
  2396. let heng = false;
  2397. self.productImage = self.imgUrl+'/detail/product.png'
  2398. if(self.deviceType == 13 || self.deviceType == 14){
  2399. self.boardType = 4;
  2400. self.getDevicePlanInfo();
  2401. }
  2402. if(self.deviceType == 14 ){
  2403. self.secondMachine = true;
  2404. }
  2405. if(self.deviceType == 4 ||self.deviceType == 5 ){
  2406. self.secondMachine = true;
  2407. }
  2408. if(self.deviceType == 5){
  2409. self.thirdMachine = true;
  2410. }
  2411. if(self.deviceType == 4){
  2412. self.productImage = self.imgUrl+'/product/YJCX20-2&1.png'
  2413. heng = true;
  2414. }
  2415. if(self.deviceType == 1 || self.deviceType == 7){
  2416. self.forthMachine = false;
  2417. self.productImage = self.imgUrl+'/product/YJH20.png'
  2418. }
  2419. if(self.deviceType == 10){
  2420. self.productImage = self.imgUrl+'/product/YJZ20.png'
  2421. }
  2422. heng = self.setImage(self.deviceType);
  2423. let typeArr = [7,8,9,10,11,12];
  2424. for (let i = 0; i < typeArr.length; i++) {
  2425. let typeMa = typeArr[i];
  2426. if(typeMa == self.deviceType){
  2427. self.forthMachine = false;
  2428. }
  2429. }
  2430. self.fixImage(heng);
  2431. if(self.boardType = 4){
  2432. self.boardStyle = ";top:15vh;";
  2433. self.modeList=[[
  2434. {id:1,text:"1"},
  2435. {id:2,text:"2"}
  2436. ]];
  2437. }
  2438. self.$forceUpdate();
  2439. });
  2440. },
  2441. getDeviceStatus(func){
  2442. let self = this;
  2443. if(this.summary.length>1){
  2444. }else{
  2445. this.childId = 0;
  2446. }
  2447. uni.showLoading({title:"加载中"});
  2448. getDeviceStatus(this.id,this.childId).then(res=>{
  2449. let data =res.data;
  2450. this.deviceInfo = data;
  2451. self.parseStatusData(data)
  2452. setTimeout(function () {
  2453. uni.hideLoading();
  2454. if(typeof func == "function"){
  2455. func();
  2456. }
  2457. },50);
  2458. });
  2459. },
  2460. setImage(type){
  2461. let heng = false;
  2462. let self = this;
  2463. if(type == 1){
  2464. self.productImage = self.imgUrl+'/product/YJDX20.png'
  2465. }else if(type == 2){
  2466. self.productImage = self.imgUrl+'/product/YJDJ20-20.png'
  2467. heng = true;
  2468. }else if(type == 3){
  2469. self.productImage = self.imgUrl+'/product/YJCX20-1&1.png'
  2470. }else if(type == 4){
  2471. self.productImage = self.imgUrl+'/product/YJCX20-2&1.png'
  2472. heng = true;
  2473. } else if(type == 5){
  2474. self.productImage = self.imgUrl+'/product/YJCX20-3&1.png'
  2475. heng = true;
  2476. }else if(type == 6){
  2477. self.productImage = self.imgUrl+'/product/YB50-300.png'
  2478. }else if(type == 7){
  2479. self.productImage = self.imgUrl+'/product/YJH20.png'
  2480. }else if(type == 8){
  2481. self.productImage = self.imgUrl+'/product/YJH20-20.png'
  2482. heng = true;
  2483. }else if(type == 9){
  2484. self.productImage = self.imgUrl+'/product/YJH20-20-20.png'
  2485. heng = true;
  2486. }else if(type == 10){
  2487. self.productImage = self.imgUrl+'/product/YJZ20.png'
  2488. }else if(type == 11){
  2489. self.productImage = self.imgUrl+'/product/YJZ20-20.png'
  2490. heng = true;
  2491. }else if(type == 12){
  2492. self.productImage = self.imgUrl+'/product/YJZ20-20-20.png'
  2493. heng = true;
  2494. }else if(type == 13){
  2495. self.productImage = self.imgUrl+'/product/YJCL20-1&1.png'
  2496. }else if(type == 14){
  2497. self.productImage = self.imgUrl+'/product/YJCL20-2&1.png'
  2498. heng = true;
  2499. }
  2500. return heng;
  2501. },
  2502. getNewDeviceStatus(item){
  2503. console.log(item);
  2504. let self = this;
  2505. if(item.index == 0){
  2506. this.firstTab = true;
  2507. this.getDeviceStatus();
  2508. }
  2509. if(item.index == 1){
  2510. this.firstTab = false;
  2511. getDeviceStatus(this.id,0).then(res=>{
  2512. let data =res.data;
  2513. this.deviceInfo = data;
  2514. self.parseStatusData(data)
  2515. });
  2516. }
  2517. },
  2518. changeSub(item){
  2519. this.childId = item.id;
  2520. this.getDeviceStatus()
  2521. },
  2522. parseEnumList(flag){
  2523. let enumList = this.deviceInfo.enumList;
  2524. for (let enumListElement of enumList) {
  2525. let id = enumListElement.id;
  2526. if(id == 'LockControl'){
  2527. let shadow = enumListElement.shadow;
  2528. this.lock.item = enumListElement;
  2529. if(shadow == 1){
  2530. this.lock.value = true;
  2531. this.lock.loading = false;
  2532. }else if(shadow == 0){
  2533. this.lock.value = false;
  2534. this.lock.loading = false;
  2535. }else{
  2536. this.lock.loading = true;
  2537. }
  2538. }
  2539. if(id == 'PowerControl'){
  2540. let shadow = enumListElement.shadow;
  2541. if(this.oneToMul){
  2542. if(!this.firstTab){
  2543. if(shadow == 1){
  2544. this.decoctControlOnOffStatus = true;
  2545. }else if(shadow == 0){
  2546. this.decoctControlOnOffStatus = false;
  2547. }
  2548. }
  2549. }else{
  2550. if(shadow == 1){
  2551. this.decoctControlOnOffStatus = true;
  2552. }else if(shadow == 0){
  2553. this.decoctControlOnOffStatus = false;
  2554. }
  2555. }
  2556. }
  2557. if(id == 'PowerCtl'){
  2558. if(this.oneToMul && this.firstTab){
  2559. let shadow = enumListElement.shadow;
  2560. if(shadow == 1){
  2561. this.decoctControlOnOffStatus = true;
  2562. }else if(shadow == 0){
  2563. this.decoctControlOnOffStatus = false;
  2564. }
  2565. }
  2566. }
  2567. this.formatValue(id,enumListElement,"PackagePowerControl","packageControlOnOffStatus")
  2568. this.formatValue(id,enumListElement,"DecoctingSwitch","decoctControlStatus")
  2569. this.formatValue(id,enumListElement,"CarrybagSwitch","qitingTurn")
  2570. this.formatValue(id,enumListElement,"WashSwitch","qingxiTurn")
  2571. this.formatValue(id,enumListElement,"PackageSwitch","baozhuangTurn");
  2572. //pressTurn resetTurn
  2573. if(!this.canGetPrsValue){
  2574. if(id == 'PressTurn'){
  2575. let shadow = enumListElement.shadow;
  2576. if(!shadow){
  2577. shadow = 0;
  2578. }
  2579. if(shadow == 1){
  2580. this.pressTurn = 1;
  2581. this.resetTurn = 0;
  2582. }else{
  2583. this.pressTurn = 0;
  2584. }
  2585. }
  2586. if(id == 'ResetTurn'){
  2587. let shadow = enumListElement.shadow;
  2588. if(!shadow){
  2589. shadow = 0;
  2590. }
  2591. if(shadow == 1){
  2592. this.resetTurn = 1;
  2593. this.pressTurn = 0;
  2594. }else{
  2595. this.resetTurn = 0;
  2596. }
  2597. }
  2598. }
  2599. if(id == 'WorkMode'){
  2600. let shadow = enumListElement.shadow;
  2601. if(!shadow){
  2602. shadow = 1;
  2603. }
  2604. this.workMode = shadow;
  2605. }
  2606. let shadow = enumListElement.shadow
  2607. let valueList = enumListElement.enumList;
  2608. for (let valueObj of valueList){
  2609. if(valueObj.value == shadow){
  2610. enumListElement.text = valueObj.text;
  2611. }
  2612. }
  2613. }
  2614. },
  2615. formatValue(id,enumListElement,key,propkey){
  2616. if(id == key){
  2617. let shadow = enumListElement.shadow;
  2618. if(shadow == 1){
  2619. this[propkey] = true;
  2620. }else if(shadow == 0){
  2621. this[propkey] = false;
  2622. }
  2623. }
  2624. },
  2625. parseStatusData(data){
  2626. let self = this;
  2627. cacheJsonThingsModel(data.productId).then(res=>{
  2628. let thingsModel = JSON.parse(res.data);
  2629. let arr = [];
  2630. let arrayList = data.arrayList;
  2631. arr = arr.concat(arrayList);
  2632. let enumList = data.enumList;
  2633. arr = arr.concat(enumList);
  2634. let integerList = data.integerList;
  2635. arr = arr.concat(integerList);
  2636. let stringList = data.stringList;
  2637. arr = arr.concat(stringList);
  2638. self.inputProp = arr;
  2639. for (let i = 0; i < thingsModel.functions.length; i++) {
  2640. for (let j = 0; j < arr.length; j++) {
  2641. let model = arr[j];
  2642. if(model.id == thingsModel.functions[i].id){
  2643. self.functions.push(model);
  2644. }
  2645. }
  2646. }
  2647. for (let i = 0; i < thingsModel.properties.length; i++) {
  2648. for (let j = 0; j < arr.length; j++) {
  2649. let model = arr[j];
  2650. if(model.id == thingsModel.properties[i].id){
  2651. self.properties.push(model);
  2652. }
  2653. }
  2654. }
  2655. let readOnlyList = data.readOnlyList;
  2656. self.watchProp = readOnlyList;
  2657. self.parseEnumList();
  2658. self.parseProp();
  2659. self.checkJianyao();
  2660. })
  2661. },
  2662. showJianyao(){
  2663. this.calcuStep();
  2664. this.planIngPopDlg = true;
  2665. },
  2666. parseProp(){
  2667. let self = this;
  2668. for (let i = 0; i <self.inputProp.length; i++) {
  2669. let prop = self.inputProp[i];
  2670. let value = prop.shadow||0;
  2671. let id = prop.id;
  2672. if(id === "TimeSetting"){//温度设置
  2673. self.temperatureTime = value;
  2674. }
  2675. if(!self.jianyaoWenduSetting){
  2676. if(id === "TempSetting"){
  2677. self.temperature = value;
  2678. }
  2679. }
  2680. this.setPropValue(id,"SlowfireTiem","leftJianyaoTime",value,0)
  2681. this.setPropValue(id,"HighTempTime","hightTemperature",value,0)
  2682. this.setPropValue(id,"CurrentTemp","currentTemperature",value,0)
  2683. this.setPropValue(id,"CalibrationTemp","jiaozhunTemp",value,0)
  2684. this.setPropValue(id,"PackingVolume","packageVolume",value,50)
  2685. this.setPropValue(id,"PackageQuantity","packageNumber",value,1)
  2686. //封边温度
  2687. this.setPropValue(id,"BandingTemp","edegTemperature",value);
  2688. this.setPropValue(id,"BandingTemp","tempFengBianWendu",value)
  2689. //封口温度
  2690. this.setPropValue(id,"SealTemp","sealingTemperature",value);
  2691. this.setPropValue(id,"SealTemp","tempFengKouWendu",value)
  2692. this.setPropValue(id,"LeftAppointmentTime","leftAppointmentTime",value,0)
  2693. this.setPropValue(id,"ValidCurrent","validCurrent",value,0)
  2694. this.setPropValue(id,"TurnCurrent","turnCurrent",value,0)
  2695. self.propMap[id] = prop;
  2696. }
  2697. },
  2698. setPropValue(id,key,propKey,value,defaultValue){
  2699. if(!value && defaultValue){
  2700. value = defaultValue;
  2701. }
  2702. if(id === key){
  2703. this[propKey] = value;
  2704. }
  2705. },
  2706. parseSummay(summary){
  2707. let self = this;
  2708. if(!summary){
  2709. summary = "";
  2710. }
  2711. if(summary.length>0){
  2712. this.summary = JSON.parse(summary);
  2713. if(self.summary.length>0){
  2714. this.oneToMul = true;
  2715. for (let i = 0; i < self.summary.length; i++) {
  2716. self.summary[i].tabName = self.summary[i].name
  2717. }
  2718. let childId = "";
  2719. if(this.oneToMul){
  2720. this.childId = self.summary[0].id;
  2721. }
  2722. }else{
  2723. this.summary = [{name:"煎药机一"}]
  2724. }
  2725. }else{
  2726. this.summary = [{name:"煎药机一"}]
  2727. }
  2728. },
  2729. goDeviceDetail(id){
  2730. uni.navigateTo({
  2731. url: '/pages/device/detail/detail?id='+id
  2732. });
  2733. },
  2734. async connectMqtt() {
  2735. if (this.$mqttTool.client == null) {
  2736. await this.$mqttTool.connect(this.vuex_token);
  2737. }
  2738. this.mqttCallback();
  2739. this.startCheck();
  2740. },
  2741. /** Mqtt订阅主题 */
  2742. mqttSubscribe(device) {
  2743. // 订阅当前设备状态和实时监测
  2744. let topicStatus = '/' + device.productId + '/' + device.serialNumber + '/status/post';
  2745. let topicProperty = '/' + device.productId + '/' + device.serialNumber + '/property/post';
  2746. let topicFunction = '/' + device.productId + '/' + device.serialNumber + '/function/post';
  2747. let topics = [];
  2748. topics.push(topicStatus);
  2749. topics.push(topicProperty);
  2750. topics.push(topicFunction);
  2751. this.$mqttTool.subscribe(topics);
  2752. },
  2753. /** Mqtt取消订阅主题 */
  2754. mqttUnSubscribe(device) {
  2755. // 订阅当前设备状态和实时监测
  2756. let topicStatus = '/' + device.productId + '/' + device.serialNumber + '/status/post';
  2757. let topicProperty = '/' + device.productId + '/' + device.serialNumber + '/property/post';
  2758. let topicFunction = '/' + device.productId + '/' + device.serialNumber + '/function/post';
  2759. let topics = [];
  2760. topics.push(topicStatus);
  2761. topics.push(topicProperty);
  2762. topics.push(topicFunction);
  2763. console.log('取消订阅', topics);
  2764. this.$mqttTool.unsubscribe(topics);
  2765. },
  2766. /* Mqtt回调处理 */
  2767. mqttCallback() {
  2768. this.$mqttTool.client.on('message', (topic, message, buffer) => {
  2769. let topics = topic.split('/');
  2770. let productId = topics[1];
  2771. let deviceNum = topics[2];
  2772. console.log('接收到内容:'+message);
  2773. message = JSON.parse(message.toString());
  2774. if (topics[3] == 'status') {
  2775. console.log('接收到【设备状态-运行】主题:', topic);
  2776. console.log('接收到【设备状态-运行】内容:', message);
  2777. // 更新列表中设备的状态
  2778. if (this.deviceInfo.serialNumber == deviceNum) {
  2779. this.deviceInfo.status = message.status;
  2780. this.deviceInfo.isShadow = message.isShadow;
  2781. this.deviceInfo.rssi = message.rssi;
  2782. this.updateDeviceStatus(this.deviceInfo);
  2783. }
  2784. }
  2785. if (topics[3] == 'property' || topics[3] == 'function') {
  2786. console.log('接收到【物模型】主题:', topic);
  2787. console.log('接收到【物模型】内容:', message);
  2788. if(this.oneToMul){
  2789. let curTabId = this.childId;
  2790. let msg = [];
  2791. for (let i = 0; i < message.length; i++) {
  2792. let curMsg = message[i];
  2793. let id = curMsg.id;
  2794. let ids = id.split("_");
  2795. let value = curMsg.value;
  2796. if(ids.length == 2){
  2797. if(curTabId == ids[1]){
  2798. msg.push({id:ids[0],value:value});
  2799. }
  2800. }else{
  2801. msg.push(curMsg);
  2802. }
  2803. }
  2804. message = msg;
  2805. }
  2806. // 更新列表中设备的属性
  2807. if (this.deviceInfo.serialNumber == deviceNum) {
  2808. for (let j = 0; j < message.length; j++) {
  2809. let isComplete = false;
  2810. let msgId = message[j].id;
  2811. this.exchangeData(msgId,message[j]);
  2812. // 布尔类型
  2813. for (let k = 0; k < this.deviceInfo.boolList.length && !isComplete; k++) {
  2814. if (this.deviceInfo.boolList[k].id == message[j].id) {
  2815. this.deviceInfo.boolList[k].shadow = message[j].value;
  2816. isComplete = true;
  2817. break;
  2818. }
  2819. }
  2820. // 枚举类型
  2821. for (let k = 0; k < this.deviceInfo.enumList.length && !isComplete; k++) {
  2822. if (this.deviceInfo.enumList[k].id == message[j].id) {
  2823. this.deviceInfo.enumList[k].shadow = message[j].value;
  2824. isComplete = true;
  2825. break;
  2826. }
  2827. }
  2828. // 字符串类型
  2829. for (let k = 0; k < this.deviceInfo.stringList.length && !isComplete; k++) {
  2830. if (this.deviceInfo.stringList[k].id == message[j].id) {
  2831. this.deviceInfo.stringList[k].shadow = message[j].value;
  2832. isComplete = true;
  2833. break;
  2834. }
  2835. }
  2836. // 数组类型
  2837. for (let k = 0; k < this.deviceInfo.arrayList.length && !isComplete; k++) {
  2838. if (this.deviceInfo.arrayList[k].id == message[j].id) {
  2839. this.deviceInfo.arrayList[k].shadow = message[j].value;
  2840. isComplete = true;
  2841. break;
  2842. }
  2843. }
  2844. // 整数类型
  2845. for (let k = 0; k < this.deviceInfo.integerList.length && !isComplete; k++) {
  2846. if (this.deviceInfo.integerList[k].id == message[j].id) {
  2847. this.deviceInfo.integerList[k].shadow = message[j].value;
  2848. isComplete = true;
  2849. break;
  2850. }
  2851. }
  2852. // 小数类型
  2853. for (let k = 0; k < this.deviceInfo.decimalList.length && !isComplete; k++) {
  2854. if (this.deviceInfo.decimalList[k].id == message[j].id) {
  2855. this.deviceInfo.decimalList[k].shadow = message[j].value;
  2856. isComplete = true;
  2857. break;
  2858. }
  2859. }
  2860. // 监测数据
  2861. for (let k = 0; k < this.deviceInfo.readOnlyList.length && !isComplete; k++) {
  2862. if (this.deviceInfo.readOnlyList[k].id == message[j].id) {
  2863. this.deviceInfo.readOnlyList[k].shadow = message[j].value;
  2864. // 更新图表
  2865. // for (let m = 0; m < this.monitorChart.length; m++) {
  2866. // if (message[j].id == this.monitorChart[m].data.id) {
  2867. // let data = [{
  2868. // value: message[j].value,
  2869. // name: this.monitorChart[m].data.name
  2870. // }];
  2871. // this.monitorChart[m].chart.setOption({
  2872. // series: [{
  2873. // data: data
  2874. // }]
  2875. // });
  2876. // break;
  2877. // }
  2878. // }
  2879. isComplete = true;
  2880. break;
  2881. }
  2882. }
  2883. }
  2884. this.parseEnumList(true);
  2885. this.checkJianyao();
  2886. if(this.planIngPopDlg){
  2887. this.calcuStep();
  2888. }
  2889. }
  2890. this.$forceUpdate();
  2891. }
  2892. });
  2893. },
  2894. checkJianyao(){
  2895. // if(!this.jianyaoPopClose){
  2896. // return;
  2897. // }
  2898. // let self = this;
  2899. // setTimeout(function(){
  2900. // if(self.decoctControlStatus){
  2901. // self.showJianyao();
  2902. // }
  2903. // },1000);
  2904. },
  2905. exchangeData(msgId,obj){
  2906. if(msgId === "TempSetting"){
  2907. this.temperature = obj.value;
  2908. }
  2909. if(msgId === "TimeSetting"){
  2910. this.temperatureTime = obj.value;
  2911. }
  2912. if(msgId === "CurrentTemp"){
  2913. this.currentTemperature = obj.value;
  2914. }
  2915. if(msgId === "HighTempTime"){
  2916. this.hightTemperature = obj.value;
  2917. }
  2918. if(msgId === "SealTemp"){//封口温度
  2919. if(!this.editing){
  2920. if(this.baozhuangFengkouSetting){
  2921. this.tempFengkouWendu = obj.value;
  2922. }else{
  2923. this.sealingTemperature = obj.value;
  2924. }
  2925. }
  2926. }
  2927. if(msgId === "BandingTemp"){//封边温度
  2928. if(!this.editing){
  2929. if(this.baozhuangFengbianSetting){
  2930. this.tempFengBianWendu = obj.value;
  2931. }else{
  2932. this.edegTemperature = obj.value;
  2933. }
  2934. }
  2935. }
  2936. if(msgId === "PackingVolume"){
  2937. if(!this.editing){
  2938. if(this.baozhuangRongLiangSetting){
  2939. }else{
  2940. this.packageVolume = obj.value;
  2941. }
  2942. }
  2943. }
  2944. if(msgId === "PackageQuantity"){
  2945. if(!this.editing){
  2946. if(this.baozhuangShuLIangSetting){
  2947. }else{
  2948. this.packageNumber = obj.value;
  2949. }
  2950. }
  2951. }
  2952. if(msgId === "LeftAppointmentTime"){
  2953. this.leftAppointmentTime = obj.value;
  2954. }
  2955. if(msgId === "SlowfireTiem"){
  2956. this.leftJianyaoTime = obj.value;
  2957. }
  2958. if(msgId === "CalibrationTemp"){
  2959. this.jiaozhunTemp = obj.value;
  2960. }
  2961. if(msgId === "TurnCurrent"){
  2962. this.turnCurrent = obj.value;
  2963. }
  2964. if(msgId === "ValidCurrent"){
  2965. this.validCurrent = obj.value;
  2966. }
  2967. },
  2968. /** 发布物模型 类型(1=属性,2=功能) */
  2969. publishThingsModel(device, model) {
  2970. // 获取缓存的Json物模型
  2971. cacheJsonThingsModel(device.productId).then(response => {
  2972. let thingsModel = JSON.parse(response.data);
  2973. let type = 0;
  2974. for (let i = 0; i < thingsModel.functions.length; i++) {
  2975. if (model.id == thingsModel.functions[i].id) {
  2976. type = 2;
  2977. break;
  2978. }
  2979. }
  2980. if (type == 0) {
  2981. for (let i = 0; i < thingsModel.properties.length; i++) {
  2982. if (model.id == thingsModel.properties[i].id) {
  2983. type = 1;
  2984. break;
  2985. }
  2986. }
  2987. }
  2988. if (type != 0) {
  2989. this.mqttPublish(type, device, [model]);
  2990. }
  2991. });
  2992. },
  2993. notifyError(res){
  2994. uni.showToast({
  2995. title:res,
  2996. icon:"error"
  2997. })
  2998. },
  2999. notifySuccess(res){
  3000. uni.showToast({
  3001. title:res,
  3002. icon:"success"
  3003. })
  3004. },
  3005. getDownloadUrl(path){
  3006. return this.firmware.downUrl +"/iot/tool/download?fileName="+ path;
  3007. },
  3008. /**
  3009. * Mqtt发布消息
  3010. * @type 类型(1=属性,2=功能,3=OTA升级,4=实时监测)
  3011. * @device 设备
  3012. * @model 物模型
  3013. * */
  3014. mqttPublish(type, device, modelList,needMore) {
  3015. if(this.deviceInfo.status != 3){
  3016. this.notifyError("请等待设备上线后操作")
  3017. return;
  3018. }
  3019. if(modelList.length == 0){
  3020. return;
  3021. }
  3022. let topic = "";
  3023. let message = ""
  3024. let oneToMul = false;
  3025. if(this.summary.length>1){
  3026. oneToMul = true;
  3027. }
  3028. if(!needMore){
  3029. oneToMul = false;
  3030. }
  3031. if(this.firstTab){
  3032. let isKaijiKey = false;
  3033. if(modelList.length >0){
  3034. let modelData = modelList[0];
  3035. let curKeyId = modelData.id;
  3036. if(!this.decoctControlOnOffStatus){
  3037. if(oneToMul){
  3038. if(curKeyId == 'PowerCtl'){
  3039. isKaijiKey = true;
  3040. }
  3041. }else{
  3042. if(curKeyId == 'PowerControl'){
  3043. isKaijiKey = true;
  3044. }
  3045. }
  3046. }else{
  3047. isKaijiKey = true;
  3048. }
  3049. }
  3050. if(!isKaijiKey){
  3051. this.notifyError("请先开机后再进行操作")
  3052. return;
  3053. }
  3054. }else{
  3055. let isKaijiKey = false;
  3056. if(modelList.length >0){
  3057. let modelData = modelList[0];
  3058. let curKeyId = modelData.id;
  3059. if(!this.packageControlOnOffStatus){
  3060. if(curKeyId == 'PackagePowerControl'){
  3061. isKaijiKey = true;
  3062. }
  3063. }else{
  3064. isKaijiKey = true;
  3065. }
  3066. }
  3067. if(!isKaijiKey){
  3068. this.notifyError("请先开机后再进行操作")
  3069. return;
  3070. }
  3071. }
  3072. if (type == 1) {
  3073. if (device.status == 3) {
  3074. // 属性,在线模式
  3075. topic = "/" + device.productId + "/" + device.serialNumber + "/property-online/get";
  3076. }
  3077. } else if (type == 2) {
  3078. if (device.status == 3) {
  3079. // 功能,在线模式
  3080. topic = "/" + device.productId + "/" + device.serialNumber + "/function-online/get";
  3081. }
  3082. } else if (type == 3) {
  3083. // OTA升级
  3084. topic = "/" + device.productId + "/" + device.serialNumber + "/ota/get";
  3085. } else {
  3086. return;
  3087. }
  3088. let title = "";
  3089. if(type == 1){
  3090. title = "属性";
  3091. }else if(type == 2){
  3092. title = "功能";
  3093. }else if(type == 3){
  3094. title = "升级";
  3095. }
  3096. if (topic != "") {
  3097. // 发布
  3098. let arr = [];
  3099. for (let i = 0; i <modelList.length; i++) {
  3100. let model = modelList[i];
  3101. let modelId = model.id;
  3102. if(oneToMul){
  3103. let childId = this.childId;
  3104. if(childId){
  3105. modelId = modelId+"_"+childId;
  3106. }
  3107. }
  3108. let shadow = model.shadow+"";
  3109. let modelType = model.type;
  3110. let shadowInt = parseInt(shadow,10);
  3111. let isNumber = false;
  3112. let shadowStr = shadowInt+"";
  3113. if(shadowStr === shadow){
  3114. isNumber = true;
  3115. shadow = shadowInt;
  3116. }
  3117. if(modelType == "integer" && !isNumber){
  3118. this.$modal.showToast(model.name+'的值必须是数字类型')
  3119. return;
  3120. }
  3121. arr.push({id:modelId,value:shadow+""});
  3122. }
  3123. message = JSON.stringify(arr);
  3124. let self = this;
  3125. this.$mqttTool.publish(topic, message,title).then(res => {
  3126. this.notifySuccess(res);
  3127. }).catch(res => {
  3128. this.notifyError(res);
  3129. });
  3130. }
  3131. },
  3132. startCheck(){
  3133. let self = this;
  3134. this.checkTimer = setTimeout(function (){
  3135. self.sendHeart();
  3136. self.startCheck();
  3137. },20000);
  3138. },
  3139. checkActive(){
  3140. let self = this;
  3141. setTimeout(function (){
  3142. if(self.publishMsg){
  3143. self.resetConn()
  3144. }
  3145. },3000);
  3146. },
  3147. sendHeart(){
  3148. console.log("发送心跳111")
  3149. let device = this.deviceInfo;
  3150. let self = this;
  3151. let topic = "/property-offline/post";
  3152. self.publishMsg = true;
  3153. self.checkActive();
  3154. this.$mqttTool.publish(topic, "ok", "heart").then(res => {
  3155. self.publishMsg = false;
  3156. }).catch(res => {
  3157. self.publishMsg = false;
  3158. });
  3159. },
  3160. resetConn(){
  3161. console.log("检测异常,重连")
  3162. this.$mqttTool.end();
  3163. this.$mqttTool.client = null;
  3164. this.connectMqtt();
  3165. this.getDetail();
  3166. }
  3167. }
  3168. }
  3169. </script>
  3170. <style>
  3171. .send_btn{
  3172. width: 160rpx !important;
  3173. height: 40rpx !important;
  3174. font-size: 10px !important;
  3175. margin-top: 5px;
  3176. }
  3177. uni-col{
  3178. width: 150px;
  3179. }
  3180. .header{
  3181. width: 100%;
  3182. background: white;
  3183. padding:0px 20rpx;
  3184. position: relative;
  3185. height: 100vh;
  3186. position: relative;
  3187. }
  3188. .content {
  3189. display: flex;
  3190. align-items: center;
  3191. justify-content: center;
  3192. color: #060B25;
  3193. }
  3194. .logo {
  3195. height: 200rpx;
  3196. width: 200rpx;
  3197. margin-top: 200rpx;
  3198. margin-left: auto;
  3199. margin-right: auto;
  3200. margin-bottom: 50rpx;
  3201. }
  3202. .text-area {
  3203. margin:10px;
  3204. padding-bottom: 10px;
  3205. justify-content: center;
  3206. width: 100%;
  3207. }
  3208. .grid-text {
  3209. font-size: 14px;
  3210. color: #909399;
  3211. padding: 10rpx 0 20rpx 0rpx;
  3212. /* #ifndef APP-PLUS */
  3213. box-sizing: border-box;
  3214. /* #endif */
  3215. }
  3216. .title {
  3217. font-size: 36rpx;
  3218. color: #8f8f94;
  3219. }
  3220. .item{
  3221. height: 80rpx;
  3222. line-height: 80rpx;
  3223. }
  3224. .bg{
  3225. position: relative;
  3226. }
  3227. .text-left{
  3228. color: #8A92A5;
  3229. }
  3230. .text-right{
  3231. color: #545454;
  3232. }
  3233. .prop-text{
  3234. position: relative;
  3235. margin:20rpx 0;
  3236. font-size: 26rpx;
  3237. }
  3238. .prop-card-area{
  3239. }
  3240. .prop-card{
  3241. width: 28%;
  3242. height: 100rpx;
  3243. text-align: center;
  3244. display: inline-block;
  3245. background: #F5FCFF;
  3246. box-shadow: 0px 9rpx 8rpx 0px rgba(0,0,0,0.09);
  3247. border-radius: 8rpx;
  3248. margin:0px 15rpx;
  3249. line-height: 48rpx;
  3250. }
  3251. .prop-card-top{
  3252. color: #3E9CFC;
  3253. }
  3254. .prop-card-bottom{
  3255. color: #8A92A5;
  3256. }
  3257. .tab-area {
  3258. background: white;
  3259. position: absolute;
  3260. left: 0px;
  3261. right: 0px;
  3262. top:480rpx;
  3263. bottom:-20px;
  3264. min-height: 200rpx;
  3265. box-shadow: 0rpx 5rpx 27rpx 0rpx rgba(195, 195, 195, 0.4);
  3266. border-radius: 40rpx;
  3267. overflow-y: auto;
  3268. padding-bottom:80rpx;
  3269. }
  3270. .prop-item{
  3271. position: relative;
  3272. display: flex;
  3273. flex-direction: row;
  3274. height: 100rpx;
  3275. line-height: 100rpx;
  3276. margin:0 20rpx;
  3277. }
  3278. .prop-item-left{
  3279. color: #545454;
  3280. width: 100%;
  3281. font-size: 16px;
  3282. border-bottom: 1px solid lightgray;
  3283. margin-left: 120rpx;
  3284. }
  3285. .prop-item-image{
  3286. width: 120rpx;
  3287. height: 120rpx;
  3288. position: absolute;
  3289. bottom:-10rpx;
  3290. }
  3291. .prop-item-right{
  3292. position: absolute;
  3293. right:10rpx;
  3294. top:5rpx;
  3295. }
  3296. input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{
  3297. color:#666;
  3298. font-size:12px;
  3299. }
  3300. .clearfix::after {
  3301. content: "";
  3302. display: block;
  3303. clear: both;
  3304. }
  3305. .decoctControlHeader {
  3306. display: flex;
  3307. align-items: center;
  3308. font-weight: 600;
  3309. }
  3310. .decoctControlTop {
  3311. display: flex;
  3312. height: 240rpx;
  3313. border-bottom:1px #B2B2B2 dotted;
  3314. margin:0 40rpx;
  3315. }
  3316. .decoctControlTopLeft {
  3317. width:40%;
  3318. line-height: 2;
  3319. text-align: center;
  3320. margin: 0 15px;
  3321. position: relative;
  3322. }
  3323. .addTemperature {
  3324. border-radius:5px;
  3325. position:absolute;
  3326. background-color: dodgerblue;
  3327. color:white;
  3328. width: 30px;
  3329. height: 30px;
  3330. left:15px;
  3331. top:80px;
  3332. }
  3333. .addTemperatureBtn {
  3334. border-radius:10px;
  3335. position:absolute;
  3336. clip-path: polygon(50% 0,100% 100%,0 100%);
  3337. transform: scale(0.5);
  3338. left: 0;
  3339. top:0;
  3340. bottom: 0;
  3341. right: 0;
  3342. margin: auto;
  3343. }
  3344. .subTemperature {
  3345. border-radius:5px;
  3346. position:absolute;
  3347. background-color: dodgerblue;
  3348. color:white;
  3349. width: 30px;
  3350. height: 30px;
  3351. right:15px;
  3352. top:80px;
  3353. }
  3354. .subTemperatureBtn {
  3355. border-radius:10px;
  3356. position:absolute;
  3357. clip-path: polygon(50% 0,100% 100%,0 100%);
  3358. transform: scale(0.5);
  3359. left: 0;
  3360. top:0;
  3361. bottom: 0;
  3362. right: 0;
  3363. margin: auto;
  3364. }
  3365. .decoctControlTopRight {
  3366. width:40%;
  3367. line-height: 2;
  3368. text-align: center;
  3369. margin: 0 15px;
  3370. position: relative;
  3371. }
  3372. .decoctControlBottom {
  3373. border-bottom:1px #B2B2B2 dotted;
  3374. width:91vw;
  3375. margin:0 auto;
  3376. padding:10px;
  3377. display: flex;
  3378. justify-content:space-between;
  3379. align-items: center;
  3380. }
  3381. .addTime {
  3382. border-radius:5px;
  3383. position:absolute;
  3384. background-color: dodgerblue;
  3385. color:white;
  3386. width: 30px;
  3387. height: 30px;
  3388. left:15px;
  3389. top:80px;
  3390. }
  3391. .addTimeBtn {
  3392. border-radius:10px;
  3393. position:absolute;
  3394. clip-path: polygon(50% 0,100% 100%,0 100%);
  3395. transform: scale(0.5);
  3396. left: 0;
  3397. top:0;
  3398. bottom: 0;
  3399. right: 0;
  3400. margin: auto;
  3401. }
  3402. .subTime {
  3403. border-radius:5px;
  3404. position:absolute;
  3405. background-color: dodgerblue;
  3406. color:white;
  3407. width: 30px;
  3408. height: 30px;
  3409. right:15px;
  3410. top:80px;
  3411. }
  3412. .subTimeBtn {
  3413. border-radius:10px;
  3414. position:absolute;
  3415. clip-path: polygon(50% 0,100% 100%,0 100%);
  3416. transform: scale(0.5);
  3417. left: 0;
  3418. top:0;
  3419. bottom: 0;
  3420. right: 0;
  3421. margin: auto;
  3422. }
  3423. .packageControlBottomRight {
  3424. border-radius:5px;
  3425. padding:5px 10px;
  3426. margin-right: 15px;
  3427. background-color: #3c9cff;
  3428. color: #fff;
  3429. }
  3430. .packageControlBottomClear {
  3431. border-radius:5px;
  3432. padding:5px 10px;
  3433. background-color: #B2B2B2;
  3434. color: #fff;
  3435. }
  3436. .active_btn{
  3437. background-color: #3c9cff;
  3438. }
  3439. .baozhuang-sub{
  3440. right: 10rpx !important;
  3441. }
  3442. .baozhuang-add{
  3443. left: 6rpx !important;
  3444. }
  3445. .control-input-box{
  3446. display: flex;
  3447. flex-direction: row;
  3448. padding-left: 26rpx;
  3449. }
  3450. .control-input-box-danwei{
  3451. padding-top:12rpx;
  3452. margin-left:4rpx;
  3453. }
  3454. .tabs{
  3455. position: relative;
  3456. top:15vh;
  3457. }
  3458. .child_tab{
  3459. position: relative;
  3460. display: inline-block;
  3461. width: 25%;
  3462. height: 180rpx;
  3463. }
  3464. .child_img{
  3465. width: 50rpx;
  3466. height: 50rpx;
  3467. left: 66rpx;
  3468. top: 66rpx;
  3469. position: relative;
  3470. }
  3471. .child_title{
  3472. position: absolute;
  3473. left: 0px;
  3474. right: 0px;
  3475. text-align: center;
  3476. font-size: 12px;
  3477. bottom: -12rpx;
  3478. color: #060B25;
  3479. }
  3480. .control{
  3481. width: 100%;
  3482. position: relative;
  3483. }
  3484. .control_item{
  3485. position: relative;
  3486. width: 50%;
  3487. display: inline-block;
  3488. height: 150rpx;
  3489. }
  3490. .control_item_detail{
  3491. position: relative;
  3492. top:22rpx;
  3493. }
  3494. .control_item_left{
  3495. position:absolute;;
  3496. left:22%;
  3497. font-size: 55px;
  3498. z-index: 999;
  3499. top:-30rpx
  3500. }
  3501. .control_item_center{
  3502. position:absolute;;
  3503. left:34%;
  3504. top:0vh;
  3505. }
  3506. .control_item_right{
  3507. position:absolute;;
  3508. left:67%;
  3509. font-size: 34px;
  3510. z-index: 999;
  3511. }
  3512. .control_item_center_unit{
  3513. position: absolute;
  3514. left:26vw;
  3515. top: 0.8vh;
  3516. width:200rpx;
  3517. }
  3518. .control_item_title{
  3519. position: absolute;
  3520. bottom:34rpx;
  3521. font-size: 12px;
  3522. width: 100%;
  3523. text-align: center;
  3524. }
  3525. .bottom{
  3526. height: 190rpx;
  3527. position: absolute;
  3528. left: 0px;
  3529. width: 100%;
  3530. padding-top: 18rpx;
  3531. }
  3532. .bottom_item{
  3533. display: inline-block;
  3534. width: 25%;
  3535. font-size: 12px;
  3536. height: 100%;
  3537. position: relative;
  3538. text-align: center;
  3539. margin-top: 2vh;
  3540. }
  3541. .active_on{
  3542. color: #50ACFF;
  3543. }
  3544. .status_info{
  3545. position: absolute;
  3546. left: 5vw;
  3547. top: 10vh;
  3548. }
  3549. .status_detail{
  3550. display: flex;
  3551. flex-direction: row;
  3552. }
  3553. .status_text{
  3554. font-size: 16px;
  3555. }
  3556. .online_text{
  3557. font-size: 12px;
  3558. padding-top: 3px;
  3559. }
  3560. .online{
  3561. color: #017128;
  3562. }
  3563. .device_info{
  3564. font-size: 13px;
  3565. }
  3566. .control_area{
  3567. position: relative;
  3568. top:19vh;
  3569. }
  3570. .disabled_tab{
  3571. opacity: 0.4;
  3572. }
  3573. .roate{
  3574. transform: rotate(180deg);
  3575. }
  3576. </style>