detail.vue 122 KB

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