| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076 |
- <template>
- <view class="content" >
- <view class="header" :style='"background-image:url("+imgUrl+"/detail/bg.png);background-repeat: no-repeat;background-size: 100% 200%;top:-5vh;height:110vh"'>
- <view v-if="isH5" @click='goBack()' style=" font-size: 16px;
- padding-top: 7px;
- position: absolute;
- top: 5vh;
- left: 20px;
- }">
- 返回
- </view>
- <view style=" background: white;
- margin-top: 59px;
- border-radius: 10px;">
- <view class="prop-item" @click="showJiaozhunProp" v-if="firstTab">
- <view class="prop-item-image">
- <image :src="imgUrl+'/setting/oper_temp.png'" style="width: 100%;height:100%;"/>
- </view>
- <view class="prop-item-left">温度校准</view>
- <view class="prop-item-right" >
- {{jiaozhunTemp}}℃<uni-icons type="forward" size="16"></uni-icons>
- </view>
- </view>
- <!-- <view class="prop-item" @click="toPlan" v-if="firstTab">-->
- <!-- <view class="prop-item-image" style="width: 60rpx;-->
- <!-- height: 60rpx;-->
- <!-- bottom: 22rpx;-->
- <!-- left: 26rpx;-->
- <!--}">-->
- <!-- <image :src="imgUrl+'/setting/plan_oper.png?1'" style="width: 100%;height:100%;"/>-->
- <!-- </view>-->
- <!-- <view class="prop-item-left">预约</view>-->
- <!-- <view class="prop-item-right" >-->
- <!-- <uni-icons type="forward" size="16"></uni-icons>-->
- <!-- </view>-->
- <!-- </view>-->
- <!-- <view class="prop-item">-->
- <!-- <view class="prop-item-image">-->
- <!-- <image :src="imgUrl+'/setting/current_icon6.png'" style="width: 100%;height:100%;"/>-->
- <!-- </view>-->
- <!-- <view class="prop-item-left">当前扭力</view>-->
- <!-- <view class="prop-item-right" >-->
- <!-- {{validCurrent}}-->
- <!-- </view>-->
- <!-- </view>-->
- <view class="prop-item" @click="showLiuProp">
- <view class="prop-item-image">
- <image :src="imgUrl+'/setting/current_icon5.png'" style="width: 100%;height:100%;"/>
- </view>
- <view class="prop-item-left">电流设置</view>
- <view class="prop-item-right" >
- <uni-icons type="forward" size="16"></uni-icons>
- </view>
- </view>
- <view class="prop-item" @click="showWaterProp">
- <view class="prop-item-image">
- <image :src="imgUrl+'/setting/current_icon5.png'" style="width: 100%;height:100%;"/>
- </view>
- <view class="prop-item-left">水量修正</view>
- <view class="prop-item-right" >
- <uni-icons type="forward" size="16"></uni-icons>
- </view>
- </view>
- <!-- <view class="prop-item" @click="showWorkPicker" v-if="firstTab">-->
- <!-- <view class="prop-item-image">-->
- <!-- <image :src="imgUrl+'/setting/list.png'" style="width: 100%;height:100%;"/>-->
- <!-- </view>-->
- <!-- <view class="prop-item-left">工作模式</view>-->
- <!-- <view class="prop-item-right" >-->
- <!-- <view v-if="workMode == 1">-->
- <!-- 1<uni-icons type="forward" size="16"></uni-icons>-->
- <!-- </view>-->
- <!-- <view v-if="workMode == 2">-->
- <!-- 2<uni-icons type="forward" size="16"></uni-icons>-->
- <!-- </view>-->
- <!-- <view v-if="workMode == 3">-->
- <!-- 3<uni-icons type="forward" size="16"></uni-icons>-->
- <!-- </view>-->
- <!-- </view>-->
- <!-- </view>-->
- <view class="prop-item">
- <view class="prop-item-image">
- <image :src="imgUrl+'/setting/no.png'" style="width: 100%;height:100%;"/>
- </view>
- <view class="prop-item-left">二维码编号</view>
- <view class="prop-item-right">
- <text class="text-right">{{deviceInfo.qrcodeId==null?"未绑定":deviceInfo.qrcodeId}}</text>
- </view>
- </view>
- <view class="prop-item">
- <view class="prop-item-image">
- <image :src="imgUrl+'/setting/no.png'" style="width: 100%;height:100%;"/>
- </view>
- <view class="prop-item-left">设备编号</view>
- <view class="prop-item-right">
- <text class="text-right">{{deviceInfo.serialNumber}}</text>
- </view>
- </view>
- <view class="prop-item" @click="skip(1)">
- <view class="prop-item-image">
- <image :src="imgUrl+'/setting/learn.png'" style="width: 100%;height:100%;"/>
- </view>
- <view class="prop-item-left">使用教程</view>
- <view class="prop-item-right" >
- <uni-icons type="forward" size="16"></uni-icons>
- </view>
- </view>
- <view class="prop-item" @click="skip(1)">
- <view class="prop-item-image">
- <image :src="imgUrl+'/setting/video.png'" style="width: 100%;height:100%;"/>
- </view>
- <view class="prop-item-left">维修视频</view>
- <view class="prop-item-right" >
- <uni-icons type="forward" size="16"></uni-icons>
- </view>
- </view>
- <view class="prop-item" @click="getUpdateInfo">
- <view class="prop-item-image">
- <image :src="imgUrl+'/setting/upload.png'" style="width: 100%;height:100%;"/>
- </view>
- <view class="prop-item-left">在线升级</view>
- <view class="prop-item-right" >
- <uni-icons type="forward" size="16"></uni-icons>
- </view>
- </view>
- <view class="prop-item" @click="skip(2)">
- <view class="prop-item-image">
- <image :src="imgUrl+'/setting/shou.png'" style="width: 100%;height:100%;"/>
- </view>
- <view class="prop-item-left">售后服务</view>
- <view class="prop-item-right" >
- <uni-icons type="forward" size="16"></uni-icons>
- </view>
- </view>
- <view class="prop-item" @click="reset">
- <view class="prop-item-image">
- <image :src="imgUrl+'/setting/reset.png'" style="width: 100%;height:100%;"/>
- </view>
- <view class="prop-item-left">恢复出厂</view>
- <view class="prop-item-right" >
- <uni-icons type="forward" size="16"></uni-icons>
- </view>
- </view>
- <view class="prop-item" @click="modifyName">
- <view class="prop-item-image">
- <image :src="imgUrl+'/setting/runinfo.png'" style="width: 100%;height:100%;"/>
- </view>
- <view class="prop-item-left">修改名称</view>
- <view class="prop-item-right" >
- <uni-icons type="forward" size="16"></uni-icons>
- </view>
- </view>
- </view>
- <u-popup :show="false" @close="closePop" mode="center" bgColor="transparent" :closeable="true" :round="10">
- <view style="position: relative;width: 500rpx;height:300rpx;background: none">
- <view class="control_item" style="width: 100%" v-if="fengbianDlgShow">
- <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
- <view class="control_item_detail">
- <view class="control_item_left" @click="subEdegTemperature(1)">-</view>
- <view class="control_item_center">
- <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" @change="changeEdegTemperature" v-model="setEdegTemperature"></u-input>
- </view>
- <view class="control_item_center_unit" :style="unitFixedStyle1">℃</view>
- <view class="control_item_right" @click="addEdegTemperature(1)">+</view>
- </view>
- <view class="control_item_title">
- 封边温度设置
- </view>
- </view>
- <view class="control_item" style="width: 100%" v-if="fengkouDlgShow">
- <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
- <view class="control_item_detail">
- <view class="control_item_left" @click="subSealingTemperature(1)">-</view>
- <view class="control_item_center">
- <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" @change="changeSealingTemperature" v-model="setSealingTemperature"></u-input>
- </view>
- <view class="control_item_center_unit" :style="unitFixedStyle1">℃</view>
- <view class="control_item_right" @click="addSealingTemperature(1)">+</view>
- </view>
- <view class="control_item_title">
- 封口温度设置
- </view>
- </view>
- <view class="control_item" style="width: 100%" v-if="wenhuoTimeDlgShow">
- <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
- <view class="control_item_detail">
- <view class="control_item_left" @click="subTemperatureTime()">-</view>
- <view class="control_item_center">
- <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" @change="changeTemperatureTime()" v-model="temperatureTime"></u-input>
- </view>
- <view class="control_item_center_unit" :style="unitFixedStyle1">℃</view>
- <view class="control_item_right" @click="addTemperatureTime()">+</view>
- </view>
- <view class="control_item_title">
- 文火时间
- </view>
- </view>
- </view>
- </u-popup>
- <u-popup :show="planPopDlg" @close="closePlanPop" mode="center" :closeable="true" :round="10">
- <view style="position: relative;width: 400rpx;background: none;padding:40rpx;">
- <view class="control_item" style="width: 100%">
- <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
- <view class="control_item_detail">
- <view class="control_item_left" @click="subPlanTime(1)" style="left: 18%;">-</view>
- <view class="control_item_center">
- <view style="position: absolute">
- <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" v-model="planTime"></u-input>
- </view>
- </view>
- <view class="control_item_center_unit" :style="unitFixedStyle">分钟</view>
- <view class="control_item_right" style="left: 80%;" @click="addPlanTime(1)">+</view>
- </view>
- <view class="control_item_title">
- 预约时间
- </view>
- </view>
- <view class="control_item" style="width: 100%">
- <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
- <view class="control_item_detail">
- <view class="control_item_left" @click="subTemperatureTime()" style="left: 18%;">-</view>
- <view class="control_item_center">
- <view style="position: absolute">
- <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" @change="changeTemperatureTime()" v-model="temperatureTime"></u-input>
- </view>
- </view>
- <view class="control_item_center_unit" :style="unitFixedStyle">分钟</view>
- <view class="control_item_right" @click="addTemperatureTime()" style="left: 80%;">+</view>
- </view>
- <view class="control_item_title">
- 时间设置
- </view>
- </view>
- <view>
- <button style="background: white;" @click="plan">确认</button>
- </view>
- </view>
- </u-popup>
- <u-popup :show="erqibushuiDlg" @close="closeErqibushuiPop" mode="center" :closeable="true" :round="10">
- <view style="position: relative;width: 400rpx;background: none;padding:40rpx;">
- <view class="control_item" style="width: 100%">
- <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
- <view class="control_item_detail">
- <view class="control_item_left" @click="subErqibushui(1)" style="left: 18%;">-</view>
- <view class="control_item_center">
- <view style="position: absolute">
- <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" v-model="secondAddWaterTime"></u-input>
- </view>
- </view>
- <view class="control_item_center_unit" :style="unitFixedStyle">分钟</view>
- <view class="control_item_right" style="left: 80%;" @click="addErqibushui(1)">+</view>
- </view>
- <view class="control_item_title">
- 二煎补水时间
- </view>
- </view>
- <view class="control_item" style="width: 100%">
- <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
- <view class="control_item_detail">
- <view class="control_item_center">
- <view style="position: absolute">
- <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" v-model="currentSecondAddWaterTime"></u-input>
- </view>
- </view>
- <view class="control_item_center_unit" :style="unitFixedStyle">分钟</view>
- </view>
- <view class="control_item_title">
- 二煎补水剩余时间
- </view>
- </view>
- </view>
- </u-popup>
- <!-- 预约框-->
- <u-popup :show="yuyueIngPop" @close="closeYuyueIngPop" mode="center" :closeable="true" :round="10">
- <view style="position: relative;width: 400rpx;background: none;;padding:30rpx;padding-top:60rpx;">
- <view class="control_item" style="width: 100%">
- <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
- <view class="control_item_detail">
- <view class="control_item_center">
- <u-input customStyle="width:150rpx;border:0px;padding:0px" disabledColor="white" :value="leftAppointmentTime"></u-input>
- </view>
- <view class="control_item_center_unit" :style="unitFixedStyle">℃</view>
- </view>
- <view class="control_item_title">
- 剩余时间
- </view>
- </view>
- <view>
- <button style="background: white;" @click="cancelPlan">取消</button>
- </view>
- </view>
- </u-popup>
- <u-popup :show="planIngPopDlg" @close="closePlanIngPop" mode="center" :closeable="true" :round="10">
- <view style="position: relative;width: 400rpx;background: none;padding:40rpx;">
- <view class="control_item" style="width: 100%">
- <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
- <view class="control_item_detail" style="width: 100%; padding: 40rpx;margin-bottom:10rpx;">
- <u-line-progress :percentage="step" activeColor="#50ACFF"></u-line-progress>
- </view>
- <view class="control_item_title" v-if="leftAppointmentTime>0">
- 预约煎药中,倒计时{{leftAppointmentTime}}分钟
- </view>
- <view class="control_item_title" v-else>
- <view v-if="leftJianyaoTime>0">
- 正在熬制,请稍等
- </view>
- <view v-else>
- 煎药完成
- </view>
- </view>
- </view>
- <view class="control_item" style="width: 100%">
- <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
- <view class="control_item_detail">
- <view class="control_item_center">
- <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" :value="currentTemperature"></u-input>
- </view>
- <view class="control_item_center_unit" :style="unitFixedStyle">℃</view>
- </view>
- <view class="control_item_title">
- 当前温度
- </view>
- </view>
- <view class="control_item" style="width: 100%">
- <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
- <view class="control_item_detail">
- <view class="control_item_center">
- <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" :value="leftJianyaoTime"></u-input>
- </view>
- <view class="control_item_center_unit" :style="unitFixedStyle">分钟</view>
- </view>
- <view class="control_item_title">
- 文火倒计时
- </view>
- </view>
- <!-- <view>-->
- <!-- <button style="background: white;" @click="cancelPlan">暂停</button>-->
- <!-- </view>-->
- </view>
- </u-popup>
- <u-popup :show="jiaozhunPopDlg" @close="closejiaozhunPop" mode="center" :closeable="true" :round="10">
- <view style="position: relative;width: 400rpx;background: none;padding:30rpx;padding-top:60rpx;">
- <view class="control_item" style="width: 100%">
- <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
- <view class="control_item_detail">
- <view class="control_item_left" @click="subJiaoZhunTemperature(1)" style="left: 18%;">-</view>
- <view class="control_item_center">
- <view style="position: absolute">
- <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" v-model="jiaozhunTemp_temp"></u-input>
- </view>
- </view>
- <view class="control_item_center_unit" :style="unitFixedStyle">℃</view>
- <view class="control_item_right" @click="addJiaoZhunTemperature(1)" style="left: 80%;">+</view>
- </view>
- <view class="control_item_title">
- 校准温度
- </view>
- </view>
- <view>
- <button style="background: white;" @click="confirmJiaozhunTemp">确认</button>
- </view>
- </view>
- </u-popup>
- <u-popup :show="deviceYuyueIngPop" @close="closeDeviceYuyueIngPop" mode="center" :closeable="true" :round="10">
- <view style="position: relative;width: 400rpx;background: none;padding:30rpx;padding-top:60rpx;">
- <view class="control_item" style="width: 100%">
- <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
- <view class="control_item_detail">
- <view class="control_item_center">
- <u-input customStyle="width:150rpx;border:0px;padding:0px" disabledColor="white" :value="devicePlanInfo.minute"></u-input>
- </view>
- <view class="control_item_center_unit" :style="unitFixedStyle">分</view>
- </view>
- <view class="control_item_title">
- 剩余时间
- </view>
- </view>
- <view>
- <button style="background: white;" @click="cancelDevicePlan">取消</button>
- </view>
- </view>
- </u-popup>
- <u-popup :show="devicePlanPopDlg" @close="closeDevicePlanPop" mode="center" :closeable="true" :round="10">
- <view style="position: relative;width: 400rpx;background: none;padding:30rpx;padding-top:60rpx;">
- <view class="control_item" style="width: 100%">
- <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
- <view class="control_item_detail">
- <view class="control_item_left" @click="subDevicePlanTime(1)" style="left: 18%;">-</view>
- <view class="control_item_center">
- <view style="position: absolute">
- <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" v-model="devicePlanTime"></u-input>
- </view>
- </view>
- <view class="control_item_center_unit" :style="unitFixedStyle">分钟</view>
- <view class="control_item_right" style="left: 80%;" @click="addDevicePlanTime(1)">+</view>
- </view>
- <view class="control_item_title">
- 预约时间
- </view>
- </view>
- <view>
- <button style="background: white;" @click="devicePlan">确认</button>
- </view>
- </view>
- </u-popup>
- <u-popup :show="liuzhuanPopDlg" @close="closeliuzhuanPop" mode="center" :closeable="true" :round="10">
- <view style="position: relative;width: 400rpx;background: none;padding:30rpx;padding-top:60rpx;padding-bottom:0px">
- <view class="control_item" style="width: 100%">
- <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
- <view class="control_item_detail">
- <view class="control_item_center">
- <view style="position: absolute">
- <u-input customStyle="width:150rpx;border:0px;" disabled="" disabledColor="white" v-model="validCurrent"></u-input>
- </view>
- </view>
- <view class="control_item_center_unit" :style="unitFixedStyle"></view>
- </view>
- <view class="control_item_title">
- 实时电流
- </view>
- </view>
- <view class="control_item" style="width: 100%">
- <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
- <view class="control_item_detail">
- <view class="control_item_left" @click="subTurnCurrent(1)" style="left: 18%;">-</view>
- <view class="control_item_center">
- <view style="position: absolute">
- <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" @confirm="propBlur(12)" @blur="propBlur(12)" v-model="setTurnCurrent"></u-input>
- </view>
- </view>
- <view class="control_item_center_unit" :style="unitFixedStyle"></view>
- <view class="control_item_right" style="left: 80%;" @click="addTurnCurrent(1)">+</view>
- </view>
- <view class="control_item_title">
- 设置电流
- </view>
- </view>
- <view class="control_item" style="width: 100%">
- <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
- <view class="control_item_detail">
- <view class="control_item_left" @click="subPressDelay(1)" style="left: 18%;">-</view>
- <view class="control_item_center">
- <view style="position: absolute">
- <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" @confirm="propBlur(13)" @blur="propBlur(13)" v-model="pressDelay"></u-input>
- </view>
- </view>
- <view class="control_item_center_unit" :style="unitFixedStyle">s</view>
- <view class="control_item_right" style="left: 80%;" @click="addPressDelay(1)">+</view>
- </view>
- <view class="control_item_title">
- 挤压延时
- </view>
- </view>
- <view style=" width: 100%;
- height: 140rpx;">
- <view class="bottom_item" @click="setPressTurn" style="width: 50%">
- <image v-if="pressTurn == 1" :src="imgUrl+'/img20250528/jiya_on.png'" style="width: 32%;height:32%;"/>
- <image v-if="pressTurn == 0" :src="imgUrl+'/img20250528/jiya_off.png'" style="width: 32%;height:32%;"/>
- <view :class="pressTurn == 1?'active_on':''">挤压</view>
- </view>
- <view class="bottom_item" @click="setResetTurn" style="width: 50%">
- <image v-if="resetTurn == 1" :src="imgUrl+'/img20250528/fuwei_on.png'" style="width: 32%;height:32%;"/>
- <image v-if="resetTurn == 0" :src="imgUrl+'/img20250528/fuwei_off.png'" style="width: 32%;height:32%;"/>
- <view :class="resetTurn == 1?'active_on':''">复位</view>
- </view>
- </view>
- </view>
- </u-popup>
- <u-popup :show="waterPopDlg" @close="closeWaterPop" mode="center" :closeable="true" :round="10">
- <view style="position: relative;width: 400rpx;background: none;padding:30rpx;padding-top:60rpx;padding-bottom:0px">
- <view class="control_item" style="width: 100%">
- <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
- <view class="control_item_detail">
- <view class="control_item_center">
- <view style="position: absolute">
- <u-input customStyle="width:150rpx;border:0px;" disabled="" disabledColor="white" v-model="waterVolume"></u-input>
- </view>
- </view>
- <view class="control_item_center_unit" :style="unitFixedStyle"></view>
- </view>
- <view class="control_item_title">
- 实时水量
- </view>
- </view>
- <view class="control_item" style="width: 100%">
- <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
- <view class="control_item_detail">
- <view class="control_item_left" @click="subWaterRepair(1)" style="left: 18%;">-</view>
- <view class="control_item_center">
- <view style="position: absolute">
- <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" @confirm="propBlur(14)" @blur="propBlur(14)" v-model="waterRepair"></u-input>
- </view>
- </view>
- <view class="control_item_center_unit" :style="unitFixedStyle"></view>
- <view class="control_item_right" style="left: 80%;" @click="addWaterRepair(1)">+</view>
- </view>
- <view class="control_item_title">
- 水量修正
- </view>
- </view>
- </view>
- </u-popup>
- <u-popup :show="baowenPopDlg" @close="closeBaowenPopDlg" mode="center" :closeable="true" :round="10">
- <view style="position: relative;width: 400rpx;background: none;padding:30rpx;padding-top:60rpx;">
- <view class="control_item" style="width: 100%">
- <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
- <view class="control_item_detail">
- <view class="control_item_left" @click="subBaowenTime(1)" style="left: 18%;">-</view>
- <view class="control_item_center">
- <view style="position: absolute">
- <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" v-model="baowenTime"></u-input>
- </view>
- </view>
- <view class="control_item_center_unit" :style="unitFixedStyle">分钟</view>
- <view class="control_item_right" style="left: 80%;" @click="addBaowenTime(1)">+</view>
- </view>
- <view class="control_item_title">
- 保温时间
- </view>
- </view>
- <view class="control_item" style="width: 100%">
- <image :src="imgUrl+'/detail/bg_mid.png'" style="width: 100%;height:100%;position: absolute;top:0px;"/>
- <view class="control_item_detail">
- <view class="control_item_left" @click="subBaowenTemp(1)" style="left: 18%;">-</view>
- <view class="control_item_center">
- <view style="position: absolute">
- <u-input customStyle="width:150rpx;border:0px;" disabledColor="white" v-model="baowenTemp"></u-input>
- </view>
- </view>
- <view class="control_item_center_unit" :style="unitFixedStyle">℃</view>
- <view class="control_item_right" style="left: 80%;" @click="addBaowenTemp(1)">+</view>
- </view>
- <view class="control_item_title">
- 保温温度
- </view>
- </view>
- <view>
- <button style="background: white;" @click="doBaowenSeting" v-if="!hasBaowen">确认添加</button>
- <button style="background: white;" @click="delBaowenSetting" v-if="hasBaowen">取消保温</button>
- </view>
- </view>
- </u-popup>
- <u-picker :show="showModelPicker" @cancel="closeModelPicker" @confirm="confirmMode" :columns="modeList" keyName="text"></u-picker>
- <u-picker :show="showYaofangPicker" @cancel="closeYaofangPicker" @confirm="confirmYaofang" :columns="yaofangList" keyName="text"></u-picker>
- </view>
- </view>
- </template>
- <script>
- import { getDetail,getDeviceStatus,cacheJsonThingsModel,reportError ,getDeviceRunTime,getLatestFirmware,bingDeviceDept,editDeviceName,getDevicePlan,addDevicePlan,delDevicePlan,saveBaowenSetting,getBaoWen,editBaowenSetting,cancelBaowen} from '@/api/device/device.js'
- import config from '@/config'
- import UPicker from "../../uni_modules/uview-ui/components/u-picker/u-picker";
- export default {
- components: {UPicker},
- data(){
- return {
- lineProgreeStyle:"width:0%;background:#50ACFF;height: 100%;",
- liuzhuanPopDlg:false,
- waterPopDlg:false,
- turnPercent:1,
- onlineStatus:false,
- modeList:[[
- {id:1,text:"1"},
- {id:2,text:"2"},
- {id:3,text:"3"},
- ]],
- yaofangList:[[
- {id:0,text:"一般药方"},
- {id:1,text:"解表药方"},
- {id:2,text:"滋补药方"},
- ]],
- productSize:"",
- productImage:"",
- showModelPicker:false,
- showYaofangPicker:false,
- unitFixedStyle:"",
- unitFixedStyle1:"",
- planTime:0,
- setSealingTemperature:160,
- setEdegTemperature:160,
- sealingTemperature:0,
- edegTemperature:0,
- hightTemperature:0,
- currentTemperature:0,
- temperatureTime:1,
- temperature:0,
- packageNumber:1,
- packageVolume:50,
- firstTab:true,
- decoctControlStatus:false,
- decoctControlOnOffStatus:false,
- packageControlOnOffStatus:false,
- subDecoctTabList:[
- {name:'子煎药1'},
- {name:'子煎药2'},
- {name:'子煎药3'},
- ],
- DecoctControlStatus:false,
- PackagControlStatus:false,
- baozhuangTurn:false,
- qitingTurn:false,
- qingxiTurn:false,
- subCurrent:0,
- current:0,
- inputStyle:{height:'44rpx','fontSize':'20rpx'},
- modelKey:['PowerControl','LockControl'],
- jianyaoKeys : ["TempSetting","TimeSetting","WaterVolume","AppointmentTime","TimeSettingFirst","TimeSettingSecond","SecondAddWaterTime","PressDelay","TurnCurrent","WaterRepair"],
- baozhuangKeys:["SetSealTemp","SetBandingTemp","PackageQuantity","PackingVolume"],
- power:{
- loading:true,
- value:0,
- },
- lock:{
- loading:true,
- value:0,
- },
- showTimeDlg:false,
- showErrDlg:null,
- errorMsg:"asdasdasdasd",
- show:null,
- value:"",
- deviceInfo:{},
- id:0,
- summary:[
- ],
- tabs:[
- {tabName:"煎药控制"},
- {tabName:"包装控制"},
- ],
- activeName:0,
- childId:0,
- oneToMul:false,
- inputProp:[],
- watchProp:[],
- columns:[],
- location:{},
- sysDept:null,
- timeobj:{alltime:0,avgtime:0},
- publishMsg:false,
- checkTimer:null,
- functions:[],
- properties:[],
- propMap:{},
- jianyaoTimer:null,
- baozhuangTimer:null,
- editing:false,
- workMode:2,
- leftAppointmentTime:0,
- leftJianyaoTime:0,
- planEditTime:false,
- editWaterVolume:false,
- timeSettingFirst:0,
- currentTimeSettingFirst:0,
- timeSettingSecond:0,
- currentTimeSettingSecond:0,
- editTimeSettingFirst:false,
- editTimeSettingSecond:false,
- secondAddWaterTime:0,
- currentSecondAddWaterTime:0,
- imgUrl:"",
- popDlg:false,
- fengbianDlgShow:false,
- fengkouDlgShow:false,
- wenhuoTimeDlgShow:false,
- planPopDlg:false,
- erqibushuiDlg:false,
- planIngPopDlg:false,
- maxWidth:320,
- jiaozhunTemp:0,//校准温度,
- jiaozhunTemp_temp:0,//校准温度,
- jiaozhunPopDlg:false,
- step:0,
- yuyueIngPop:false,
- firmware:{},
- jianyaoPopClose:true,
- tabIndex:1,
- appid:"wxfd7b1a0e03e9b7e9",
- firstMachine:true,
- secondMachine:false,
- thirdMachine:false,
- forthMachine:true,
- deviceType:1,
- tabActive:[true,false,false],
- resetDuration:4000,
- jianyaoWenduSetting:false,
- jianyaoShijianSetting:false,
- baozhuangFengbianSetting:false,
- baozhuangFengkouSetting:false,
- baozhuangRongLiangSetting:false,
- baozhuangShuLIangSetting:false,
- tempFengkouWendu:0,
- tempFengBianWendu:0,
- boardType:6,//板子类型
- lineTimer:null,
- validCurrent:0,//当前扭力
- turnCurrent:0,//堵转电流值
- setTurnCurrent:200,
- pressDelay:0,//挤压延迟
- waterRepair:200,
- pressTurn:0,
- resetTurn:0,
- drainageTurn:0,
- canGetPrsValue:false,//可以接收挤压的动画
- devicePlanInfo: {},//设备后台预约任务
- devicePlanPopDlg:false,
- deviceYuyueIngPop:false,
- baowenPopDlg:false,
- devicePlanTime:10,
- boardStyle:"",
- baowenTime:10,
- baowenTemp:100,
- hasBaowen:false,
- baowenId:0,
- jiashuiTurn:false,
- baowenTurn:false,
- waterVolume:5,
- currentWaterVolume:12,
- baowenSettingMode:false,
- baowenSettingTimer:null,
- baowenSettingSendTimer:null,
- wenwuhuoTurn:false,
- wenduSetting:false,
- wenduSettingTimer:null,
- planTimeSettingTimer:null,
- waterVolumeSettingTimer:null,
- timeSettingFirstSettingTimer:null,
- timeSettingSecondSettingTimer:null,
- workText:"·在线",
- isH5:false,
- jianyaoMode:0,
- yaofang:{
- type:0,
- name:"一般药方"
- }
- }
- },
- onLoad: function(opt) {
- this.id = opt.id;
- // this.id = 61;
- this.connectMqtt();
- this.getDetail();
- this.imgUrl = config.imgUrl
- // this.fixStyle();
- this.setSystemInfo();
- // this.fixImage();
- // console.log = function(){}
- },
- destroyed() {
- // 取消订阅主题
- this.mqttUnSubscribe(this.deviceInfo);
- clearTimeout(this.checkTimer);
- },
- watch: {
- turnPercent(newvalue){
- // this.lineProgreeStyle = ""
- this.lineProgreeStyle = "width:"+newvalue+"%;background:#50ACFF;height: 100%;";
- },
- pressTurn(newVal,oldValue) {
- // this.pressTurnChangeEvent(newVal);
- },
- resetTurn(newVal){
- // this.resetTurnChnageEvent(newVal);
- },
- decoctControlStatus(newVal,oldValue){
- console.log(newVal+",煎药");
- this.setStatusText();
- },
- currentTemperature(newVal){
- console.log(newVal+",当前温度");
- this.setStatusText();
- },
- temperature(newVal){
- console.log(newVal+",实时温度");
- this.setStatusText();
- }
- },
- methods:{
- subWaterRepair(){
- this.waterRepair--
- if(this.waterRepair<200){
- this.waterRepair = 200
- }
- this.sendJianYao("WaterRepair")
- },
- addWaterRepair(){
- this.waterRepair++
- if(this.waterRepair>999){
- this.waterRepair = 999
- }
- this.sendJianYao("WaterRepair")
- },
- subTurnCurrent(){
- this.setTurnCurrent--
- if(this.setTurnCurrent<200){
- this.setTurnCurrent = 200
- }
- this.sendJianYao("TurnCurrent")
- },
- addTurnCurrent(){
- this.setTurnCurrent++
- if(this.setTurnCurrent>400){
- this.setTurnCurrent = 400
- }
- this.sendJianYao("TurnCurrent")
- },
- subPressDelay(){
- this.pressDelay--
- if(this.pressDelay <0){
- this.pressDelay = 0;
- }
- this.sendJianYao("PressDelay")
- },
- addPressDelay(){
- this.pressDelay++
- this.sendJianYao("PressDelay")
- },
- setSystemInfo(){
- const systemInfo = uni.getSystemInfoSync();
- let uniPlatform = systemInfo.uniPlatform;
- if(uniPlatform == 'web' || uniPlatform == 'h5'){
- this.isH5 = true;
- }else{
- this.isH5 = false;
- }
- },
- setStatusText(){
- if(!this.jianyaoIng()){
- this.workText = "·在线";
- return;
- }
- if(this.currentTemperature>=this.temperature){
- this.workText = "·文火煎药";
- }else{
- this.workText = "·武火煎药";
- }
- },
- goBack(){
- uni.navigateBack();
- },
- pressTurnChangeEvent(newVal){
- },
- resetTurnChnageEvent(newVal){
- },
- closeDeviceYuyueIngPop(){
- this.deviceYuyueIngPop = false;
- },
- closeDevicePlanPop(){
- this.devicePlanPopDlg = false;
- },
- devicePlan(){
- let self = this;
- if(this.devicePlanTime>600){
- this.$modal.showToast('预约时间最大为600分钟')
- return;
- }
- if(this.devicePlanTime == 0){
- this.$modal.showToast('预约时间不能为空')
- }else{
- let child = this.childId;
- let obj = {deviceNo:this.deviceInfo.serialNumber+"&&"+child,minute:this.devicePlanTime};
- addDevicePlan(obj).then(res=>{
- self.getDevicePlanInfo();
- self.$modal.showToast('预约成功')
- self.devicePlanPopDlg = false;
- });
- }
- },
- closeliuzhuanPop(){
- this.liuzhuanPopDlg = false;
- },
- addBaowenTime(){
- console.log("增加保温时间")
- this.baowenTime++;
- this.sendBaowenSetting();
- },
- subBaowenTime(){
- console.log("减少保温时间")
- this.baowenTime--;
- if(this.baowenTime < 0){
- this.baowenTime = 0;
- }
- this.sendBaowenSetting();
- },
- subBaowenTemp(){
- this.baowenTemp--;
- if(this.baowenTemp<0){
- this.baowenTemp = 1;
- }
- console.log("减少保温温度")
- this.sendBaowenSetting();
- },
- addBaowenTemp(){
- console.log("增加保温温度")
- this.baowenTemp++;
- this.sendBaowenSetting();
- },
- closeBaowenPopDlg(){
- this.baowenPopDlg = false;
- },
- sendBaowenSetting(){
- this.resetBaowenTimer();
- if(this.baowenSettingSendTimer){
- clearTimeout(this.baowenSettingSendTimer);
- }
- let self = this;
- this.baowenSettingSendTimer = setTimeout(function(){
- self.doBaowenSeting();
- },500)
- },
- //6号板子的保温功能
- doBaowenSeting(){
- let arr = [];
- let pressObj = {};
- pressObj.id = "HoldingTemp";
- pressObj.shadow = this.baowenTemp;
- let baowen = {};
- baowen.id = "HoldingTime";
- baowen.shadow = this.baowenTime;
- arr.push(pressObj);
- arr.push(baowen);
- this.mqttPublish(2,this.deviceInfo,arr,true)
- },
- addBaowenSetting(){
- let self = this;
- let obj = {};
- obj.baowenTemp = this.baowenTemp;
- obj.baowenTime = this.baowenTime;
- obj.childId = this.childId;
- obj.productId = this.deviceInfo.productId;
- obj.status = 0;
- obj.deviceNo = this.deviceInfo.serialNumber;
- saveBaowenSetting(obj).then(res=>{
- let code = res.code;
- if(code == 200){
- self.$modal.showToast('添加成功')
- this.closeBaowenPopDlg();
- }else{
- self.$modal.showToast('已经存在保温设置')
- }
- });
- },
- editBaowenSetting(){
- let obj = {};
- obj.baowenTemp = this.baowenTemp;
- obj.baowenTime = this.baowenTime;
- obj.childId = this.childId;
- obj.productId = this.deviceInfo.productId;
- obj.status = 0;
- obj.id = this.baowenId;
- obj.deviceNo = this.deviceInfo.serialNumber;
- editBaowenSetting(obj).then(res=>{
- this.closeBaowenPopDlg();
- });
- },
- delBaowenSetting(){
- let obj = {};
- obj.id = this.baowenId;
- obj.status = 1;
- editBaowenSetting(obj).then(res=>{
- this.hasBaowen = false;
- this.baowenId = 0;
- this.closeBaowenPopDlg();
- });
- },
- confirmLiuzhuannCurrent(){
- if(this.setTurnCurrent<200 || this.setTurnCurrent>400){
- this.notifyError("扭力范围为200-400")
- return;
- }
- let arr = [];
- let pressObj = {};
- pressObj.id = "TurnCurrent";
- pressObj.shadow = this.setTurnCurrent;
- arr.push(pressObj);
- this.mqttPublish(2,this.deviceInfo,arr)
- this.closeliuzhuanPop();
- },
- setPressTurn(){
- let self = this;
- let arr = [];
- let currentPresturn = this.pressTurn;
- let pressObj = {};
- if(this.resetTurn == 1){
- this.resetTurn = 0;
- }
- if(currentPresturn == 1){//代表要关闭
- pressObj.id = "PressTurn";
- pressObj.shadow = 0;
- arr.push(pressObj);
- this.turnPercent = 0;
- this.pressTurn = 0;
- }else{//代表要开启
- pressObj.id = "PressTurn";
- pressObj.shadow = 1;
- arr.push(pressObj);
- this.pressTurn = 1;
- this.resetTurn = 0;
- }
- let resetObj = {}
- resetObj.id = "ResetTurn";
- resetObj.shadow = 0;
- arr.push(resetObj);
- this.mqttPublish(2,this.deviceInfo,arr,true);
- },
- startProgressTimer(type){
- let self = this;
- if(self.lineTimer != null){
- clearInterval(self.lineTimer)
- }
- if(type == 1){
- self.lineTimer = setInterval(function(){
- if(self.turnPercent >=100){
- self.turnPercent = 1;
- clearInterval(self.lineTimer);
- self.startProgressTimer(1);
- }
- self.turnPercent +=2;
- },100);
- }else{
- self.lineTimer = setInterval(function(){
- if(self.turnPercent >=100){
- self.turnPercent = 1;
- clearInterval(self.lineTimer);
- self.startProgressTimer(2);
- }
- self.turnPercent +=2;
- },100);
- }
- },
- setResetTurn(){
- let self = this;
- if(this.pressTurn == 1){
- this.pressTurn = 0;
- }
- let arr = [];
- if(this.resetTurn == 1){
- let resetObj = {};
- resetObj.id = "ResetTurn";
- resetObj.shadow = 0;
- this.resetTurn = 0;
- this.turnPercent = 0;
- arr.push(resetObj);
- }else{
- let resetObj = {};
- resetObj.id = "ResetTurn";
- resetObj.shadow = 1;
- this.resetTurn = 0;
- this.turnPercent = 0;
- arr.push(resetObj);
- }
- let pressObj = {};
- pressObj.id = "PressTurn";
- pressObj.shadow = 0;
- arr.push(pressObj);
- this.mqttPublish(2,this.deviceInfo,arr,true);
- },
- fixImage(heng){
- let self = this;
- wx.getSystemInfo({
- success: res => {
- const { windowWidth, windowHeight, statusBarHeight } = res;
- if(heng){
- let rate = 0.35;
- if(windowHeight<800){
- rate = 0.30;
- }
- let imgHeight = windowWidth*0.85;
- let imageWidth = windowWidth * 1;
- if(this.isH5){
- imgHeight = windowWidth*0.6;
- imageWidth = windowWidth * 0.8;
- }
- self.productSize = ";width:"+imageWidth+"px;height:"+imgHeight+"px;";
- }else{
- let rate = 0.35;
- if(windowHeight<800){
- rate = 0.30;
- }
- let imgHeight = windowHeight*rate;
- let imageWidth = imgHeight * 0.6;
- self.productSize = ";width:"+imageWidth+"px;height:"+imgHeight+"px;";
- }
- }
- })
- },
- propChange(type){
- // if(type == 1){
- // }
- },
- propFocus(type){
- if(type == 1){
- this.jianyaoWenduSetting = true;
- }
- if(type == 2){
- this.jianyaoShijianSetting = true;
- }
- if(type == 3){
- this.baozhuangFengbianSetting = true;
- this.tempFengBianWendu = this.edegTemperature;
- this.edegTemperature = this.setEdegTemperature;
- }
- if(type == 4){
- this.baozhuangFengkouSetting = true;
- this.tempFengkouWendu = this.sealingTemperature;
- this.sealingTemperature = this.setSealingTemperature;
- }
- if(type == 5){
- this.baozhuangRongLiangSetting = true;
- }
- if(type == 6){
- this.baozhuangShuLIangSetting = true;
- }
- },
- autoBlur(type){
- },
- propBlur(type){
- if(type == 1){
- this.jianyaoWenduSetting = false;
- this.changeTemperature();
- }
- if(type == 2){
- this.temperatureTime = this.leftJianyaoTime;
- this.changeTemperatureTime();
- }
- if(type == 3){
- this.setEdegTemperature = this.edegTemperature;
- this.changeEdegTemperature();
- }
- if(type == 4){
- this.setSealingTemperature = this.sealingTemperature;
- this.changeSealingTemperature();
- }
- if(type == 5){
- this.changePackageVolume()
- }
- if(type == 6){
- this.changePackageNumber();
- }
- if(type ==7){
- this.sendWaterVolume();
- }
- if(type == 8){
- this.sendPlanTime();
- }
- if(type == 9){
- this.sendPlanTime(2);
- }
- if(type == 10){
- this.sendBaowenSetting();
- }
- if(type == 11){
- this.sendBaowenSetting();
- }
- if(type == 12){
- this.sendJianYao("TurnCurrent")
- }
- if(type == 13){
- this.sendJianYao("PressDelay")
- }
- if(type == 14){
- this.sendJianYao("WaterRepair")
- }
- },
- modifyName(){
- let self = this;
- uni.showModal({
- title: "修改设备名称",
- editable: true,
- placeholderText: "请输入设备名称",
- content: this.deviceInfo.deviceName,
- showCancel: true,
- success: function (res) {
- console.log(res);
- if(res.confirm){
- let content = res.content;
- let obj = {"deviceId":self.id,deviceName:content};
- editDeviceName(obj).then(res=>{
- if(res.code == 200){
- self.deviceInfo.deviceName = content;
- self.$modal.showToast('修改成功')
- }else{
- self.$modal.showToast('修改失败,请稍后再试')
- }
- });
- }
- },
- fail: function (res) {
- console.log(res);
- }
- })
- },
- showWorkPicker(){
- let self = this;
- uni.showModal({
- title: "提 示",
- content: "非专业人员修改可能导致机器损坏",
- confirmText:"确认",
- success: function (res) {
- if(res.confirm){
- self.showModelPicker = true;
- }
- },
- })
- },
- skip(type){
- if(type == 1){
- wx.navigateToMiniProgram({
- appId: this.appid,
- path: 'pages/news_details/help?id=25',
- success(res) {
- // 打开成功
- },
- fail(res){
- console.log(res);
- }
- })
- }else if(type == 2){
- wx.openCustomerServiceChat({
- extInfo: {url: 'https://work.weixin.qq.com/kfid/kfc4202b8764df71c0c'},
- corpId: 'ww8e678fbe6f1079ba',
- success(res) {
- },
- fail(res){
- console.log(res);
- }
- })
- }
- },
- isMulTab(index){
- let type = this.deviceType;
- if(this.secondMachine || this.secondMachine){
- return true;
- }
- return false;
- },
- isPage(index){
- if(this.tabIndex == index){
- return true;
- }
- return false;
- },
- getUpdateInfo(){
- let self = this;
- getLatestFirmware(this.id).then(res=>{
- self.firmware = res.data;
- let curVersion = self.deviceInfo.firmwareVersion;
- let onlineVersion = self.firmware.version
- if(curVersion>=onlineVersion){
- this.$modal.showToast('当前已经是最新版本')
- }else{
- uni.showModal({
- title: '检测到新版本',
- content: "当前版本:"+curVersion+",新版本:"+onlineVersion,
- cancelText: '取消',
- confirmText: '升级',
- success: function(res) {
- if (res.confirm) {
- self.doUpdate();
- }
- }
- })
- }
- });
- },
- doUpdate(){
- if(this.deviceInfo.status != 3){
- this.notifyError("请等待设备上线后操作")
- return;
- }
- let device = this.deviceInfo;
- let message = "";
- let topic = "";
- let title = "升级";
- topic = "/" + device.productId + "/" + device.serialNumber + "/ota/get";
- message = '{"version":"' + this.firmware.version + '","downloadUrl":"' + this.getDownloadUrl(this.firmware.filePath) + '","size":"'+this.firmware.size+'"}';
- this.$mqttTool.publish(topic, message,title).then(res => {
- this.notifySuccess(res);
- }).catch(res => {
- this.notifyError(res);
- });
- },
- getStatusText(){
- if(this.baozhuangRunning()){
- return "工作中";
- }
- if(this.jianyaoIng()){
- return "工作中";
- }
- if(this.leftAppointmentTime>0){
- return "已预约";
- }
- return "空闲中";
- },
- closeYuyueIngPop(){
- this.yuyueIngPop = false;
- },
- confirmMode(item){
- console.log(item)
- this.workMode = item.value[0].id;
- this.setMode(this.workMode);
- this.closeModelPicker();
- },
- closeModelPicker(){
- this.showModelPicker = false;
- },
- confirmYaofang(item){
- this.yaofang = {
- type:item.value[0].id,
- name:item.value[0].text
- }
- let arr = [];
- let obj = {};
- obj.id = "MedicineType";
- obj.shadow = item.value[0].id;
- arr.push(obj);
- this.mqttPublish(2,this.deviceInfo,arr,true)
- this.closeYaofangPicker();
- },
- closeYaofangPicker(){
- this.showYaofangPicker = false;
- },
- confirmJiaozhunTemp(){
- this.jiaozhunTemp = this.jiaozhunTemp_temp;
- this.temperNumber();
- this.closejiaozhunPop();
- },
- addJiaoZhunTemperature(){
- this.jiaozhunTemp_temp ++;
- if(this.jiaozhunTemp_temp>20){
- this.jiaozhunTemp_temp = 20;
- }
- },
- subJiaoZhunTemperature(){
- this.jiaozhunTemp_temp --;
- if(this.jiaozhunTemp_temp<-20){
- this.jiaozhunTemp_temp = -20;
- }
- },
- closejiaozhunPop(){
- this.jiaozhunPopDlg = false;
- },
- closeWaterPop(){
- this.waterPopDlg = false;
- },
- showWaterProp(){
- let self = this;
- uni.showModal({
- title: "提 示",
- content: "非专业人员修改可能导致机器损坏",
- confirmText:"确认",
- success: function (res) {
- if(res.confirm){
- self.waterPopDlg = true;
- }
- },
- })
- },
- showLiuProp(){
- let self = this;
- uni.showModal({
- title: "提 示",
- content: "非专业人员修改可能导致机器损坏",
- confirmText:"确认",
- success: function (res) {
- if(res.confirm){
- self.liuzhuanPopDlg = true;
- }
- },
- })
- },
- showJiaozhunProp(){
- let self = this;
- uni.showModal({
- title: "提 示",
- content: "非专业人员修改可能导致机器损坏",
- confirmText:"确认",
- success: function (res) {
- if(res.confirm){
- self.jiaozhunTemp_temp = self.jiaozhunTemp;
- self.jiaozhunPopDlg = true;
- }
- },
- })
- },
- resetBaowenTimer(){
- let self = this;
- this.baowenSettingMode = true;
- if(this.baowenSettingTimer != null){
- clearTimeout(this.baowenSettingTimer)
- }
- this.baowenSettingTimer = setTimeout(function(){
- self.baowenSettingMode = false;
- },3000);
- },
- jinBaowenMode(){
- let self = this;
- if(!this.jianyaoOpen()){
- this.notifyError("请先开机后再进行操作")
- return;
- }
- if(this.jianyaoIng()){
- this.$modal.showToast('必须在非煎药模式下才能设置')
- return;
- }
- let arr = [];
- let obj = {};
- obj.id = "HoldingSwitch";
- if(!this.baowenTurn){
- obj.shadow = 1;
- this.baowenTurn = true;
- console.log("保温状态打开")
- this.resetBaowenTimer();
- }else{
- this.baowenTurn = false;
- obj.shadow = 0;
- console.log("保温状态关闭")
- }
- arr.push(obj);
- this.mqttPublish(2,this.deviceInfo,arr,true)
- },
- showBaowenProp(){
- if(this.jianyaoIng()){
- this.$modal.showToast('必须非煎药模式下才能设置')
- return;
- }
- let obj = {};
- obj.childId = this.childId;
- obj.status =0;
- obj.deviceNo = this.deviceInfo.serialNumber;
- getBaoWen(obj).then(res=>{
- let data = res.data;
- if(data != null){
- this.baowenTime = data.baowenTime;
- this.baowenTemp = data.baowenTemp;
- this.baowenId = data.id;
- this.hasBaowen = true;
- }else{
- this.hasBaowen = false;
- this.baowenId = 0;
- }
- this.baowenPopDlg = true;
- });
- },
- fixStyle(){
- let self = this;
- wx.getSystemInfo({
- success: res => {
- const { windowWidth, windowHeight, statusBarHeight } = res;
- // 在这里可以获取到屏幕的宽度和高度
- console.log(windowWidth, windowHeight, statusBarHeight);
- if(windowWidth<=350){
- self.unitFixedStyle = ";padding-top:6px;left: 28vw;";
- self.unitFixedStyle1 = ";padding-top:6px;left: 28vw;";
- }else if(windowWidth>=360){
- self.unitFixedStyle = ";padding-top:10rpx;";
- self.unitFixedStyle1 = ";padding-top:10rpx;left: 32vw;";
- }
- self.maxWidth = windowWidth;
- }
- })
- },
- closePlanIngPop(){
- this.jianyaoPopClose = false;
- this.planIngPopDlg = false;
- },
- closePlanPop(){
- this.planPopDlg = false;
- },
- closeErqibushuiPop(){
- this.erqibushuiDlg = false;
- },
- showBaozhuangDlg(type){
- this.popDlg = true;
- if(type == 1){
- this.fengbianDlgShow = true;
- }else if(type == 2){
- this.fengkouDlgShow = true;
- }else if(type == 3){
- this.wenhuoTimeDlgShow = true;
- }
- },
- closePop(){
- this.popDlg = false;
- this.fengbianDlgShow = false;
- this.fengkouDlgShow = false;
- this.wenhuoTimeDlgShow = false;
- },
- changeTab(index,tag){
- if(!tag){
- return;
- }
- let type = this.deviceType;
- let self = this;
- if(index == 2 || index == 3){
- if(!this.isMulTab(index)){
- return;
- }
- }
- this.resetChoose();
- if(index == 4){
- if(!this.forthMachine){
- return;
- }
- uni.showLoading({title:"加载中"});
- getDeviceStatus(this.id,0).then(res=>{
- let data =res.data;
- this.deviceInfo = data;
- self.parseStatusData(data)
- setTimeout(function () {
- uni.hideLoading();
- self.firstTab = false;
- },100);
- });
- }else{
- this.resetResetFunc();
- let arr = ["a","b","c"]
- if(this.isMulTab(index)){
- this.childId =arr[index-1];
- this.getDeviceStatus(function(){
- self.tabIndex = index;
- self.firstTab = true;
- self.tabActive[index-1] = true;
- self.$forceUpdate();
- });
- }else{
- this.getDeviceStatus(function(){
- self.tabIndex = index;
- self.firstTab = true;
- self.tabActive[index-1] = true;
- self.$forceUpdate();
- })
- }
- console.log(this.tabActive)
- }
- },
- resetResetFunc(){
- let self = this;
- if(self.lineTimer != null){
- clearInterval(self.lineTimer)
- }
- this.turnPercent = 0;
- },
- resetChoose(){
- this.tabIndex = 0;
- for (let i = 0; i < 3; i++) {
- this.tabActive[i] = false;
- }
- },
- changePackageVolume(){
- if(this.packageVolume<50){
- this.packageVolume = 50;
- }
- if(this.packageVolume>300){
- this.packageVolume = 300;
- }
- this.sendBaozhuang("PackingVolume");
- },
- changePackageNumber(){
- let min = 1;
- let max = 999;
- if(this.packageNumber<min){
- this.packageNumber = min;
- }
- if(this.packageNumber>max){
- this.packageNumber = max;
- }
- this.sendBaozhuang("PackageQuantity");
- },
- changeEdegTemperature(){
- let min = 80;
- let max = 220;
- if(this.setEdegTemperature<min){
- this.setEdegTemperature = min;
- }
- if(this.setEdegTemperature>max){
- this.setEdegTemperature = max;
- }
- console.log("current setEdegTemperature is :"+this.setEdegTemperature)
- this.sendBaozhuang("SetBandingTemp");
- },
- changeSealingTemperature(){
- let min = 80;
- let max = 220;
- if(this.setSealingTemperature<min){
- this.setSealingTemperature = min;
- }
- if(this.setSealingTemperature>max){
- this.setSealingTemperature = max;
- }
- console.log("current setSealingTemperature is :"+this.setSealingTemperature)
- this.sendBaozhuang("SetSealTemp");
- },
- changeTemperature(){
- let max = 140;
- let min = 100;
- if(this.workMode == 2){
- min = 1;
- }
- if(this.temperature<min){
- this.temperature = min;
- }
- if(this.temperature>max){
- this.temperature = max;
- }
- console.log("current temperature is :"+this.temperature)
- this.sendJianYao("TempSetting");
- },
- changeTemperatureTime(){
- let min = 1;
- let max = 600;
- if(this.temperatureTime<min){
- this.temperatureTime = min;
- }
- if(this.temperatureTime>max){
- this.temperatureTime = max;
- }
- console.log("current temperatureTime is :"+this.temperatureTime)
- this.sendJianYao("TimeSetting");
- },
- jianyaoOpen(){
- if(this.decoctControlOnOffStatus){
- return true;
- }
- return false;
- },
- baozhuangOpen(){
- if(this.packageControlOnOffStatus){
- return true;
- }
- return false;
- },
- baozhuangRunning(){
- if(this.qingxiTurn || this.baozhuangTurn || this.qitingTurn){
- return true;
- }
- return false;
- },
- jianyaoIng(){
- if(this.decoctControlStatus){
- return true;
- }
- return false;
- },
- cancelPlan(){
- let arr = [];
- let obj = {};
- obj.id = "AppointmentTime";
- obj.shadow = 0;
- arr.push(obj);
- let self = this;
- self.kongzhiJianyao(false,arr);
- this.mqttPublish(2,this.deviceInfo,arr,true);
- this.closeYuyueIngPop();
- },
- toPlan(){
- if(!this.jianyaoOpen()){
- this.$modal.showToast('煎药机已经关机')
- return;
- }
- if(this.leftAppointmentTime>0){
- this.yuyueIngPop = true;
- }else{
- if(this.jianyaoIng()){
- this.$modal.showToast('正在煎药')
- return;
- }
- this.planPopDlg = true;
- }
- },
- toDevicePlan(){
- let self = this;
- if(this.decoctControlOnOffStatus){
- this.$modal.showToast('请先关闭煎药后再预约')
- return;
- }
- getDevicePlan(this.deviceInfo.serialNumber+"&&"+this.childId).then(res=>{
- if(res.data != null){
- self.deviceYuyueIngPop = true;
- self.devicePlanInfo = res.data;
- let minute = self.devicePlanInfo.minute;
- if(minute<0){
- minute = 10;
- }
- self.devicePlanInfo.minute = minute;
- }else{
- self.devicePlanPopDlg = true;
- }
- });
- },
- cancelDevicePlan(){
- delDevicePlan(this.devicePlanInfo.id).then(res=>{
- this.$modal.showToast('取消成功')
- this.deviceYuyueIngPop = false;
- this.devicePlanInfo = null;
- })
- },
- getDevicePlanInfo(){
- if(this.boardType != 4){
- return;
- }
- let self = this;
- self.devicePlanInfo = null;
- getDevicePlan(this.deviceInfo.serialNumber+"&&"+self.childId).then(res=>{
- if(res.data != null){
- self.devicePlanInfo = res.data;
- let minute = self.devicePlanInfo.minute;
- if(minute<0){
- minute = 10;
- }
- self.devicePlanInfo.minute = minute;
- }
- });
- },
- calcuStep(){
- if(this.leftAppointmentTime>0){
- this.step = 0;
- return 0;
- }
- if(this.leftJianyaoTime == 0){
- this.step = 100;
- return ;
- }
- let currentTemperature = this.currentTemperature;
- let hightTemperature = this.temperatureTime-this.leftJianyaoTime;//设置的高温时间
- let targetTemperature =100;// this.temperature;
- let targetTemperatureTime = this.temperatureTime;//倒计时
- if(targetTemperature>100){
- targetTemperature = 100;
- }
- let step = 0;
- if(currentTemperature<100){
- let tem = currentTemperature/200*100;
- step = tem;
- }else{
- step = 50;
- let rate = hightTemperature/targetTemperatureTime;
- rate = rate/2;
- rate = rate*100;
- rate = rate.toFixed(2)
- step = step + parseFloat(rate);
- }
- this.step = step.toFixed(2);
- },
- plan(){
- let self = this;
- if(this.planTime>600){
- this.$modal.showToast('预约时间最大为600分钟')
- return;
- }
- if(this.planTime == 0){
- this.$modal.showToast('预约时间不能为空')
- }else{
- let arr = [];
- let obj = {};
- obj.id = "AppointmentTime";
- obj.shadow = this.planTime;
- arr.push(obj);
- this.kongzhiJianyao(true,arr);
- this.mqttPublish(2,this.deviceInfo,arr,true);
- }
- this.$modal.showToast('预约成功')
- this.planPopDlg = false;
- },
- lockCtrl(key){
- let arr = [];
- let obj = {};
- obj.id = "LockControl";
- if(key == 0){
- obj.shadow = 1;
- this.lock.value = 1;
- }else{
- obj.shadow = 0;
- this.lock.value = 0;
- }
- arr.push(obj);
- this.mqttPublish(2,this.deviceInfo,arr)
- },
- setMode(type){
- let arr = [];
- let obj = {};
- obj.id = "WorkMode";
- obj.shadow = type;
- arr.push(obj);
- this.mqttPublish(2,this.deviceInfo,arr,true)
- this.workMode = type;
- },
- temperNumber(value){
- let arr = [];
- let obj = {};
- obj.id = "CalibrationTemp";
- obj.shadow = this.jiaozhunTemp;
- arr.push(obj);
- this.mqttPublish(2,this.deviceInfo,arr,true)
- },
- volumeNumber(){
- let arr = [];
- let obj = {};
- obj.id = "CapacityCalibration";
- obj.shadow = 1;
- arr.push(obj);
- this.mqttPublish(2,this.deviceInfo,arr,true)
- },
- showConfirm(title,content,yes,no){
- uni.showModal({
- title: title,
- content: content,
- success: function (res) {
- if (res.confirm) {
- yes();
- } else if (res.cancel) {
- no();
- }
- }
- });
- },
- reset(){
- let self = this;
- uni.showModal({
- title: "提 示",
- content: "非专业人员修改可能导致机器损坏",
- confirmText:"确认",
- success: function (res) {
- if(res.confirm){
- let arr = [];
- let obj = {};
- obj.id = "RestoreFactory";
- obj.shadow = 1;
- arr.push(obj);
- self.mqttPublish(2,self.deviceInfo,arr)
- }
- },
- })
- },
- paishui(){
- let flag = false;
- flag = this.drainageTurn == 1?true:false;
- let arr = [];
- let obj = {};
- if(flag){
- obj.shadow = 0;
- }else{
- obj.shadow = 1;
- }
- obj.id = "DrainageTurn";
- arr.push(obj);
- this.mqttPublish(2,this.deviceInfo,arr)
- },
- turnChange(type){
- let flag = false;
- let obj = {};
- if(type ==3){
- flag = this.qingxiTurn;
- obj.id = "WashSwitch";
- }else if(type == 2){
- if(this.qingxiTurn || this.qitingTurn){
- this.$modal.showToast("启停、包装、清洗不能同时打开")
- return;
- }
- flag = this.baozhuangTurn;
- obj.id = "PackageSwitch";
- }else if(type == 1) {
- if(this.qingxiTurn || this.baozhuangTurn){
- this.$modal.showToast("启停、包装、清洗不能同时打开")
- return;
- }
- flag = this.qitingTurn;
- obj.id = "CarrybagSwitch";
- }
- flag = !flag;
- let arr = [];
- if(flag){
- obj.shadow = 1;
- }else{
- obj.shadow = 0;
- }
- arr.push(obj);
- this.mqttPublish(2,this.deviceInfo,arr)
- },
- addPackageVolume(){
- this.packageVolume++;
- if(this.packageVolume>300){
- this.packageVolume = 50;
- }
- console.log("增加包装容量")
- this.changePackageVolume()
- },
- subPackageVolume(){
- this.packageVolume--;
- if( this.packageVolume<50){
- this.packageVolume = 300;
- }
- console.log("减少包装容量")
- this.changePackageVolume()
- },
- addPackageNumber(){
- this.packageNumber++;
- if(this.packageNumber>999){
- this.packageNumber = 1;
- }
- console.log("增加包装数量")
- this.changePackageNumber();
- },
- subPackageNumber(){
- this.packageNumber--;
- if(this.packageNumber<1){
- this.packageNumber = 999;
- }
- console.log("减少包装数量")
- this.changePackageNumber();
- },
- addSealingTemperature(){
- console.log("增加封口温度")
- if(!this.fengkouDlgShow){
- this.fengkouDlgShow = true;
- }
- this.setSealingTemperature++;
- this.changeSealingTemperature();
- },
- subSealingTemperature(){
- console.log("减少封口温度")
- if(!this.fengkouDlgShow){
- this.fengkouDlgShow = true;
- }
- this.setSealingTemperature--;
- this.changeSealingTemperature();
- },
- addEdegTemperature(){
- console.log("增加封边温度")
- this.editing = true;
- if(!this.fengbianDlgShow){
- this.fengbianDlgShow = true;
- }
- this.setEdegTemperature++;
- this.changeEdegTemperature();
- },
- subEdegTemperature(){
- console.log("减少封边温度")
- this.editing = true;
- if(!this.fengbianDlgShow){
- this.fengbianDlgShow = true;
- }
- this.setEdegTemperature--;
- this.changeEdegTemperature();
- },
- subErqibushui(){
- this.secondAddWaterTime--;
- if(this.secondAddWaterTime <0){
- this.secondAddWaterTime = 0
- }
- this.sendJianYao("SecondAddWaterTime")
- },
- addErqibushui(){
- this.secondAddWaterTime++;
- this.sendJianYao("SecondAddWaterTime")
- },
- addTemperatureTime(){
- console.log("增加煎药时间")
- if(!this.wenhuoTimeDlgShow){
- this.wenhuoTimeDlgShow = true;
- this.temperatureTime = this.leftJianyaoTime;
- }
- this.temperatureTime++;
- this.changeTemperatureTime()
- },
- subTemperatureTime(){
- console.log("减少煎药时间")
- if(!this.wenhuoTimeDlgShow){
- this.wenhuoTimeDlgShow = true;
- this.temperatureTime = this.leftJianyaoTime;
- }
- this.temperatureTime--;
- if(this.temperatureTime<=0){
- this.temperatureTime = 1;
- }
- this.changeTemperatureTime()
- },
- addTemperature(){
- console.log("增加煎药温度")
- this.temperature++;
- this.wenduSetting = true;
- this.changeTemperature();
- },
- resetShowPlanTime(){
- let self = this;
- if(this.planTimeSettingTimer){
- clearTimeout(this.planTimeSettingTimer);
- }
- this.planTimeSettingTimer = setTimeout(function(){
- self.planEditTime = false;
- },3000)
- },
- resetWaterVolume(){
- let self = this;
- if(this.waterVolumeSettingTimer){
- clearTimeout(this.waterVolumeSettingTimer);
- }
- this.waterVolumeSettingTimer = setTimeout(function(){
- self.editWaterVolume = false;
- },3000)
- },
- resetTimeSettingFirst(){
- let self = this;
- if(this.timeSettingFirstSettingTimer){
- clearTimeout(this.timeSettingFirstSettingTimer);
- }
- this.timeSettingFirstSettingTimer = setTimeout(function(){
- self.editTimeSettingFirst = false;
- },3000)
- },
- resetTimeSettingSecond(){
- let self = this;
- if(this.timeSettingSecondSettingTimer){
- clearTimeout(this.timeSettingSecondSettingTimer);
- }
- this.timeSettingSecondSettingTimer = setTimeout(function(){
- self.editTimeSettingSecond = false;
- },3000)
- },
- resetShowWendu(){
- let self = this;
- if(this.wenduSettingTimer){
- clearTimeout(this.wenduSettingTimer);
- }
- this.wenduSettingTimer = setTimeout(function(){
- self.wenduSetting = false;
- },3000)
- },
- subTimeFirst(){
- this.timeSettingFirst = parseInt(this.timeSettingFirst) -1;
- if(this.timeSettingFirst<0){
- this.timeSettingFirst = 0;
- }
- this.editTimeSettingFirst = true;
- this.sendJianYao("TimeSettingFirst");
- },
- addTimeFirst(){
- this.timeSettingFirst = parseInt(this.timeSettingFirst) +1;
- this.editTimeSettingFirst = true;
- this.sendJianYao("TimeSettingFirst");
- },
- addTimeSecond(){
- this.timeSettingSecond = parseInt(this.timeSettingSecond) +1;
- this.editTimeSettingSecond = true;
- this.sendJianYao("TimeSettingSecond");
- },
- subTimeSecond(){
- this.timeSettingSecond = parseInt(this.timeSettingSecond) -1;
- if(this.timeSettingSecond<0){
- this.timeSettingSecond = 0
- }
- this.editTimeSettingSecond = true;
- this.sendJianYao("TimeSettingSecond");
- },
- subWaterVolume(){
- this.waterVolume = parseFloat(this.waterVolume) -0.1;
- this.waterVolume = this.waterVolume.toFixed(1);
- this.editWaterVolume = true;
- this.sendWaterVolume();
- },
- addWaterVolume(){
- this.waterVolume = parseFloat(this.waterVolume) +0.1;
- this.waterVolume = this.waterVolume.toFixed(1);
- this.editWaterVolume = true;
- this.sendWaterVolume();
- },
- sendWaterVolume(){
- if(this.waterVolume<0){
- this.waterVolume = 0;
- }
- this.sendJianYao("WaterVolume");
- },
- subTemperature(type){
- console.log("减少煎药温度")
- this.temperature--;
- this.wenduSetting = true;
- this.changeTemperature();
- },
- changeJianyaoMode(mode){
- let arr = [];
- this.jianyaoMode = mode
- let obj2 = {};
- obj2.id = "JianyaoMode";
- obj2.shadow = mode;
- arr.push(obj2);
- this.mqttPublish(2,this.deviceInfo,arr,true);
- },
- addPlanTime(type){
- console.log("增加预约时间")
- if(type == 2){
- this.planTime = this.leftAppointmentTime;
- }
- this.planTime++;
- this.planEditTime = true;
- this.sendPlanTime(type);
- },
- subPlanTime(type){
- console.log("减少预约时间")
- if(type == 2){
- this.planTime = this.leftAppointmentTime;
- }
- this.planEditTime = true;
- this.planTime--;
- this.sendPlanTime(type);
- },
- sendPlanTime(type){
- if(this.planTime<0){
- this.planTime = 0;
- }
- if(type == 2){
- this.leftAppointmentTime = this.planTime;
- }
- this.sendJianYao("AppointmentTime");
- },
- subDevicePlanTime(){
- this.devicePlanTime--;
- if(this.devicePlanTime<0){
- this.devicePlanTime = 1;
- }
- console.log("减少预约时间")
- this.sendJianYao("AppointmentTime")
- },
- addDevicePlanTime(){
- console.log("增加预约时间")
- this.devicePlanTime++;
- this.planEditTime = true;
- this.sendJianYao("AppointmentTime")
- },
- sendBaozhuang(targetKey){
- let self = this;
- let arr = [];
- if(this.baozhuangTimer != null){
- clearTimeout(this.baozhuangTimer);
- }
- this.baozhuangTimer = setTimeout(function (){
- for (let i = 0; i <this.baozhuangKeys.length; i++) {
- let key = this.baozhuangKeys[i];
- let obj = {};
- obj.id = key;
- if(key === "PackingVolume"){
- obj.shadow = this.packageVolume;
- setTimeout(function (){
- self.baozhuangRongLiangSetting = false;
- },self.resetDuration);
- }
- if(key === "PackageQuantity"){
- obj.shadow = this.packageNumber;
- setTimeout(function (){
- self.baozhuangShuLIangSetting = false;
- },self.resetDuration);
- }
- if(key === "SetSealTemp"){
- obj.shadow = this.setSealingTemperature;
- setTimeout(function (){
- self.fengkouDlgShow = false;
- self.baozhuangFengkouSetting = false;
- self.sealingTemperature = self.tempFengKouWendu;;
- },self.resetDuration);
- }
- if(key === "SetBandingTemp"){
- obj.shadow = this.setEdegTemperature;
- setTimeout(function (){
- self.fengbianDlgShow = false;
- self.baozhuangFengbianSetting = false;
- self.edegTemperature = self.tempFengBianWendu;
- },self.resetDuration);
- }
- if(targetKey == key){
- arr.push(obj);
- break;
- }
- }
- this.mqttPublish(2,this.deviceInfo,arr)
- }.bind(this),500);
- },
- sendJianYao(targetKey){
- let self = this;
- let arr = [];
- if(this.jianyaoTimer != null){
- clearTimeout(this.jianyaoTimer);
- }
- this.jianyaoTimer = setTimeout(function (){
- for (let i = 0; i <this.jianyaoKeys.length; i++) {
- let key = this.jianyaoKeys[i];
- let obj = {};
- obj.id = key;
- if(key === "TempSetting"){
- obj.shadow = this.temperature;
- self.resetShowWendu();
- }
- if(key === "WaterRepair"){
- obj.shadow = this.waterRepair;
- }
- if(key === "PressDelay"){
- obj.shadow = this.pressDelay;
- }
- if(key === "TurnCurrent"){
- obj.shadow = this.turnCurrent;
- }
- if(key === "SecondAddWaterTime"){
- obj.shadow = this.secondAddWaterTime;
- }
- if(key === "TimeSettingFirst"){
- obj.shadow = this.timeSettingFirst
- // setTimeout(function(){
- // self.wenhuoTimeDlgShow = false;
- // self.jianyaoShijianSetting = false;
- // },self.resetDuration)
- self.resetTimeSettingFirst()
- }
- if(key === "TimeSettingSecond"){
- obj.shadow = this.timeSettingSecond
- // setTimeout(function(){
- // self.wenhuoTimeDlgShow = false;
- // self.jianyaoShijianSetting = false;
- // },self.resetDuration)
- self.resetTimeSettingSecond()
- }
- if(key === "WaterVolume"){
- obj.shadow = this.waterVolume*10;
- self.resetWaterVolume();
- }
- if(key === "AppointmentTime"){
- obj.shadow = this.planTime;
- self.resetShowPlanTime();
- }
- if(key === "TimeSetting"){
- obj.shadow = this.temperatureTime;
- self.leftJianyaoTime = this.temperatureTime;;
- setTimeout(function(){
- self.wenhuoTimeDlgShow = false;
- self.jianyaoShijianSetting = false;
- },self.resetDuration)
- }
- if(targetKey == key){
- arr.push(obj);
- break;
- }
- }
- this.mqttPublish(2,this.deviceInfo,arr,true)
- }.bind(this),500);
- },
- buildPropKey(key){
- if(this.childId !=0){
- return key+"_"+this.childId;
- }else{
- return key;
- }
- },
- addWater(){
- if(!this.jianyaoOpen()){
- this.notifyError("请先开机后再进行操作")
- return;
- }
- if(this.jianyaoIng()){
- this.$modal.showToast('必须在非煎药模式下才能设置')
- return;
- }
- let obj = {};
- let arr = [];
- obj.id = "WaterSwitch";
- if(!this.jiashuiTurn){
- obj.shadow = 1;
- console.log("加水状态打开")
- }else{
- obj.shadow = 0;
- console.log("加水状态关闭")
- }
- arr.push(obj);
- this.mqttPublish(2,this.deviceInfo,arr,true)
- },
- decoctControlChange(){
- if(!this.decoctControlOnOffStatus){
- this.notifyError("请先开机后再进行操作")
- return;
- }
- if(this.decoctControlStatus){
- this.stopDecoctControlChange();
- return;
- }
- this.decoctControlStatus = !this.decoctControlStatus;
- let arr = [];
- let obj = {};
- obj.id = "DecoctingSwitch";
- if(this.decoctControlStatus){
- obj.shadow = 1;
- console.log("煎药状态打开")
- this.checkJianyao();
- }else{
- obj.shadow = 0;
- console.log("煎药状态关闭")
- }
- arr.push(obj);
- this.mqttPublish(2,this.deviceInfo,arr,true)
- },
- kongzhiJianyao(flag,arr){//不判断煎药状态
- let obj = {};
- if(!this.decoctControlOnOffStatus){
- this.notifyError("请先开机后再进行操作")
- return;
- }
- obj.id = "DecoctingSwitch";
- if(flag){
- obj.shadow = 1;
- console.log("煎药状态打开")
- this.checkJianyao();
- }else{
- obj.shadow = 0;
- console.log("煎药状态关闭")
- }
- arr.push(obj);
- },
- stopDecoctControlChange(){
- let obj = {};
- let arr = [];
- if(!this.decoctControlOnOffStatus){
- this.notifyError("请先开机后再进行操作")
- return;
- }
- if(!this.decoctControlStatus){
- return;
- }
- this.decoctControlStatus = !this.decoctControlStatus;
- obj.id = "DecoctingSwitch";
- if(this.decoctControlStatus){
- obj.shadow = 1;
- console.log("煎药状态打开")
- }else{
- obj.shadow = 0;
- console.log("煎药状态关闭")
- }
- arr.push(obj);
- let obj2 = {};
- obj2.id = "AppointmentTime";
- obj2.shadow = 0;
- arr.push(obj2);
- this.mqttPublish(2,this.deviceInfo,arr,true);
- this.cancelBaowen();
- },
- cancelBaowen(){
- let obj = {};
- obj.childId = this.childId;
- obj.productId = this.deviceInfo.productId;
- obj.status = 0;
- obj.deviceNo = this.deviceInfo.serialNumber;
- cancelBaowen(obj);
- },
- decoctControlOnOffChange(){
- let obj = {};
- //4号板子预约是无法开启煎药的
- if(!this.decoctControlOnOffStatus){
- if(this.boardType == 4){
- if(this.devicePlanInfo != null){
- this.$modal.showToast('请先取消预约后再开机');
- return;
- }
- }
- }
- this.decoctControlOnOffStatus = !this.decoctControlOnOffStatus;
- let arr = [];
- obj.id = "PowerControl";
- let isMul = false;
- if(this.boardType != 4){
- if(this.decoctControlStatus){
- this.$modal.showToast('请先结束煎药后操作')
- this.decoctControlOnOffStatus = !this.decoctControlOnOffStatus;
- return;
- }
- }
- if(this.oneToMul && this.firstTab){
- obj.id = "PowerCtl";
- isMul = true;
- }
- if(this.decoctControlOnOffStatus){
- obj.shadow = 1;
- console.log("煎药机开关打开")
- }else{
- obj.shadow = 0;
- console.log("煎药机开关关闭")
- }
- arr.push(obj);
- this.mqttPublish(2,this.deviceInfo,arr,isMul)
- },
- packageControlOnOffChange(){
- let obj = {};
- let arr = [];
- if(this.baozhuangRunning()){
- this.$modal.showToast('请先停止运行后操作')
- return;
- }
- obj.id = "PackagePowerControl";
- this.packageControlOnOffStatus = !this.packageControlOnOffStatus;
- if(this.packageControlOnOffStatus){
- console.log("包装机器开关打开")
- obj.shadow = 1;
- }else{
- console.log("包装机器开关关闭")
- obj.shadow = 0;
- }
- arr.push(obj);
- this.mqttPublish(2,this.deviceInfo,arr)
- },
- containKey(arr,key){
- for (let i = 0; i < arr.length; i++) {
- const data = arr[i];
- if(data == key){
- return true;
- }
- }
- return false;
- },
- // 抽屉状态发生变化触发
- change(e, type) {
- console.log(e);
- },
- showDrawer() {
- this.$refs.showLeft.open();
- },
- closeDrawer() {
- this.$refs.showLeft.close();
- },
- checkItemValue(item){
- if(!item.shadow){
- item.shadow = 0;
- }
- if(!item.unit){
- item.unit = "";
- }
- return true;
- },
- sendProperties(){
- let properties = this.properties;
- for (let i = 0; i < properties; i++) {
- let property = this.properties[i];
- let shadow = property.shadow;
- if(shadow){
- arr.push(property);
- }
- }
- this.mqttPublish(1,this.deviceInfo,arr)
- },
- sendFunctions(){
- let arr = [];
- let functions = this.functions;
- for (let i = 0; i < functions.length; i++) {
- let functionObj = this.functions[i];
- let shadow = functionObj.shadow;
- if(shadow){
- arr.push(functionObj);
- }
- }
- this.mqttPublish(2,this.deviceInfo,arr)
- },
- changeProp(key,val){
- let item = null;
- let obj = null;
- let oneToMul = this.oneToMul;
- if(key === "LockControl"){
- this.lock.value = val;
- item = this.lock;
- }else if(key === "PowerControl"){
- this.power.value = val;
- item = this.power;
- }
- let value = val;
- obj = item.item;
- if(value){
- obj.value = 1;
- obj.shadow = 1;
- }else{
- obj.value = 0;
- obj.shadow = 0;
- }
- if(!oneToMul){
- }
- this.publishThingsModel(this.deviceInfo,obj);
- },
- checkCommonProp(item){
- let id =item.id;
- let isCommonKey = this.modelKey.some(res=>{
- return id === res;
- })
- return !isCommonKey;
- },
- getRunTime(){
- let self = this;
- getDeviceRunTime(this.id).then(res=>{
- self.timeobj = res.data;
- if(self.timeobj.avgtime == ""){
- self.timeobj.avgtime = 0;
- }
- if(self.timeobj.alltime == ""){
- self.timeobj.alltime = 0;
- }
- })
- },
- seeTime(){
- this.showTimeDlg = true;
- this.getRunTime();
- },
- closeTime(){
- this.showTimeDlg = false;
- },
- cancel(){
- this.showErrDlg = false;
- },
- reportError(){
- this.showErrDlg = true;
- },
- doReportError(){
- if(!this.errorMsg){
- this.$modal.showToast('异常信息不能为空')
- }else{
- let self = this;
- let errObj = {};
- errObj.deviceId = this.deviceInfo.deviceId;
- errObj.deviceName = this.deviceInfo.deviceName
- errObj.desc = this.errorMsg;
- errObj.deptId= this.deviceInfo.deptId;
- reportError(errObj).then(res=>{
- self.$modal.showToast(res.msg)
- self.cancel();
- })
- }
- },
- openLocation(){
- uni.openLocation({
- latitude: this.location.latitude,
- longitude: this.location.longitude,
- success: function () {
- console.log('success');
- }
- });
- },
- confirmItemData(e){
- let data = e.value[0];
- this.show.text = data.text;
- this.show.shadow=data.value;
- this.show = null;
- console.log(data);
- },
- send(){
- let shadow = false
- let _arr = []
- this.inputProp.forEach((item)=>{
- _arr.push(item.value)
- })
- // if(_arr.some(val => val === '' || val.length < 0)){
- // shadow = true
- // }
- if(this.deviceInfo.status != 3){
- uni.showToast({
- title:"设备暂未上线",
- icon:"error"
- })
- return;
- }
- if(shadow){
- uni.showToast({
- title:"数据不能为空",
- icon:"error"
- })
- return;
- }
- this.publishThingsModel(this.deviceInfo,this.inputProp.map(item=>{return{"id":item.id,"value":item.value}}))
- },
- /** 更新设备状态 */
- updateDeviceStatus(device) {
- },
- chooseItemData(data){
- if(this.deviceInfo.status != 3){
- uni.showToast({
- title:"设备暂未上线",
- icon:"error"
- })
- return;
- }
- this.columns = [data.enumList];
- this.show =data;
- },
- getDetail(){
- let self = this;
- getDetail(this.id).then(res=>{
- self.deviceInfo = res.data;
- self.deviceType = res.data.type;
- self.deviceType = 23
- let msg = res.msg;
- if(msg){
- try{
- msg = JSON.parse(msg+"");
- }catch (e){
- msg = null;
- }
- }
- let productId = self.deviceInfo.productId;
- if(productId === 57){
- self.boardType = 6;
- }
- let online = self.deviceInfo.status == 3?true:false;
- if(!online){
- if(!self.onlineStatus){
- uni.showModal({
- title: '系统提示',
- content: "设备未在线,无法操作",
- confirmText: '确定',
- showCancel:false,
- success(res){
- if(res.confirm){
- self.onlineStatus = true;
- }
- },
- })
- }
- }
- if(msg != null){
- let b = msg.b;
- let c = msg.c;
- let a = msg.a;
- let d = msg.d;
- if(a == 1){
- self.firstMachine = true;
- }else if(a == 0){
- self.firstMachine = false;
- }
- if(b == 1){
- self.secondMachine = true;
- }else if(b == 0){
- self.secondMachine = false;
- }
- if(c == 1){
- self.thirdMachine = true;
- }else if(c == 0){
- self.thirdMachine = false;
- }
- if(d == 1){
- self.forthMachine = true;
- }else if(d==0){
- self.forthMachine = false;
- }
- }
- console.log("当前设备类型:"+JSON.stringify(self.deviceInfo.type))
- self.location = {
- latitude: self.deviceInfo.latitude,
- longitude: self.deviceInfo.longitude};
- self.sysDept = self.deviceInfo.sysDept;
- self.parseSummay(res.data.summary)
- self.mqttSubscribe(res.data);
- self.getDeviceStatus();
- self.seeTime();
- let heng = false;
- self.productImage = self.imgUrl+'/detail/product.png'
- heng = self.setImage(self.deviceType);
- let typeArr = [7,8,9,10,11,12,15];//单煎药机类型
- for (let i = 0; i < typeArr.length; i++) {
- let typeMa = typeArr[i];
- if(typeMa == self.deviceType){
- self.forthMachine = false;
- }
- }
- self.fixImage(heng);
- if(self.boardType == 4){
- self.boardStyle = ";top:15vh;";
- self.modeList=[[
- {id:1,text:"1"},
- {id:2,text:"2"}
- ]];
- }
- self.$forceUpdate();
- });
- },
- getDeviceStatus(func){
- let self = this;
- if(this.summary.length>1){
- }else{
- this.childId = 0;
- }
- uni.showLoading({title:"加载中"});
- getDeviceStatus(this.id,this.childId).then(res=>{
- let data =res.data;
- this.deviceInfo = data;
- self.parseStatusData(data)
- self.getDevicePlanInfo();
- setTimeout(function () {
- uni.hideLoading();
- if(typeof func == "function"){
- func();
- }
- },50);
- });
- },
- setImage(type){
- let heng = false;
- let self = this;
- self.productImage = self.imgUrl+'/product/24.png'
- return heng;
- },
- getNewDeviceStatus(item){
- console.log(item);
- let self = this;
- if(item.index == 0){
- this.firstTab = true;
- this.getDeviceStatus();
- }
- if(item.index == 1){
- this.firstTab = false;
- getDeviceStatus(this.id,0).then(res=>{
- let data =res.data;
- this.deviceInfo = data;
- self.parseStatusData(data)
- });
- }
- },
- changeSub(item){
- this.childId = item.id;
- this.getDeviceStatus()
- },
- parseEnumList(flag){
- let enumList = this.deviceInfo.enumList;
- for (let enumListElement of enumList) {
- let id = enumListElement.id;
- if(id == 'LockControl'){
- let shadow = enumListElement.shadow;
- this.lock.item = enumListElement;
- if(shadow == 1){
- this.lock.value = true;
- this.lock.loading = false;
- }else if(shadow == 0){
- this.lock.value = false;
- this.lock.loading = false;
- }else{
- this.lock.loading = true;
- }
- }
- if(id == 'PowerControl'){
- let shadow = enumListElement.shadow;
- if(this.oneToMul){
- if(!this.firstTab){
- if(shadow == 1){
- this.decoctControlOnOffStatus = true;
- this.getDevicePlanInfo();
- }else if(shadow == 0){
- this.decoctControlOnOffStatus = false;
- }
- }
- }else{
- if(shadow == 1){
- this.decoctControlOnOffStatus = true;
- this.getDevicePlanInfo();
- }else if(shadow == 0){
- this.decoctControlOnOffStatus = false;
- }
- }
- }
- if(id == 'PowerCtl'){
- if(this.oneToMul && this.firstTab){
- let shadow = enumListElement.shadow;
- if(shadow == 1){
- this.decoctControlOnOffStatus = true;
- this.getDevicePlanInfo();
- }else if(shadow == 0){
- this.decoctControlOnOffStatus = false;
- }
- }
- }
- if(id == 'MedicineType'){
- let shadow = enumListElement.shadow;
- if(!shadow){
- shadow = 0;
- }
- let yaofangMap = {};
- let enumList = enumListElement.enumList
- for (let i = 0; i < enumList.length; i++) {
- let yaofangEnum= enumList[i];
- yaofangMap[yaofangEnum.value] = yaofangEnum.text;
- }
- this.yaofang = {
- type:shadow,
- name:yaofangMap[shadow+""]
- }
- }
- this.formatValue(id,enumListElement,"PackagePowerControl","packageControlOnOffStatus")
- this.formatValue(id,enumListElement,"DecoctingSwitch","decoctControlStatus")
- this.formatValue(id,enumListElement,"CarrybagSwitch","qitingTurn")
- this.formatValue(id,enumListElement,"WashSwitch","qingxiTurn")
- this.formatValue(id,enumListElement,"PackageSwitch","baozhuangTurn");
- this.formatValue(id,enumListElement,"DrainageTurn","drainageTurn");
- //6号
- this.formatValue(id,enumListElement,"WaterSwitch","jiashuiTurn");
- this.formatValue(id,enumListElement,"HoldingSwitch","baowenTurn")
- this.formatValue(id,enumListElement,"SlowHighswitch","wenwuhuoTurn")
- //pressTurn resetTurn
- if(id == 'PressTurn'){
- let shadow = enumListElement.shadow;
- if(!shadow){
- shadow = 0;
- }
- if(shadow == 1){
- this.pressTurn = 1;
- this.resetTurn = 0;
- }else{
- this.pressTurn = 0;
- }
- this.pressTurnChangeEvent(shadow);
- }
- if(id == 'ResetTurn'){
- let shadow = enumListElement.shadow;
- if(!shadow){
- shadow = 0;
- }
- if(shadow == 1){
- this.resetTurn = 1;
- this.pressTurn = 0;
- }else{
- this.resetTurn = 0;
- }
- this.resetTurnChnageEvent(shadow);
- }
- if(id == 'WorkMode'){
- let shadow = enumListElement.shadow;
- if(!shadow){
- shadow = 1;
- }
- this.workMode = shadow;
- }
- let shadow = enumListElement.shadow
- let valueList = enumListElement.enumList;
- for (let valueObj of valueList){
- if(valueObj.value == shadow){
- enumListElement.text = valueObj.text;
- }
- }
- }
- },
- formatValue(id,enumListElement,key,propkey){
- if(id == key){
- let shadow = enumListElement.shadow;
- if(shadow == 1){
- this[propkey] = true;
- }else if(shadow == 0){
- this[propkey] = false;
- }
- }
- },
- parseStatusData(data){
- let self = this;
- cacheJsonThingsModel(data.productId).then(res=>{
- let thingsModel = JSON.parse(res.data);
- let arr = [];
- let arrayList = data.arrayList;
- arr = arr.concat(arrayList);
- let enumList = data.enumList;
- arr = arr.concat(enumList);
- let integerList = data.integerList;
- arr = arr.concat(integerList);
- let stringList = data.stringList;
- arr = arr.concat(stringList);
- let decimalList =data.decimalList
- arr = arr.concat(decimalList);
- self.inputProp = arr;
- for (let i = 0; i < thingsModel.functions.length; i++) {
- for (let j = 0; j < arr.length; j++) {
- let model = arr[j];
- if(model.id == thingsModel.functions[i].id){
- self.functions.push(model);
- }
- }
- }
- for (let i = 0; i < thingsModel.properties.length; i++) {
- for (let j = 0; j < arr.length; j++) {
- let model = arr[j];
- if(model.id == thingsModel.properties[i].id){
- self.properties.push(model);
- }
- }
- }
- let readOnlyList = data.readOnlyList;
- self.watchProp = readOnlyList;
- self.parseEnumList();
- self.parseProp();
- self.checkJianyao();
- })
- },
- showJianyao(){
- this.calcuStep();
- this.planIngPopDlg = true;
- },
- parseProp(){
- let self = this;
- for (let i = 0; i <self.inputProp.length; i++) {
- let prop = self.inputProp[i];
- let value = prop.shadow||0;
- let id = prop.id;
- if(id === "TimeSetting"){//温度设置
- self.temperatureTime = value;
- }
- if(!self.jianyaoWenduSetting){
- if(id === "TempSetting"){
- self.temperature = value;
- }
- }
- if(id == "WaterVolume"){
- this.waterVolume = parseInt(value)/10;
- }
- if(id == "CurrentWaterVolume"){
- this.currentWaterVolume = parseInt(value)/10;
- }
- this.setPropValue(id,"SlowfireTiem","leftJianyaoTime",value,0)
- this.setPropValue(id,"HighTempTime","hightTemperature",value,0)
- this.setPropValue(id,"CurrentTemp","currentTemperature",value,0)
- this.setPropValue(id,"CalibrationTemp","jiaozhunTemp",value,0)
- this.setPropValue(id,"PackingVolume","packageVolume",value,50)
- this.setPropValue(id,"PackageQuantity","packageNumber",value,1)
- //封边温度
- this.setPropValue(id,"BandingTemp","edegTemperature",value);
- this.setPropValue(id,"BandingTemp","tempFengBianWendu",value)
- //封口温度
- this.setPropValue(id,"SealTemp","sealingTemperature",value);
- this.setPropValue(id,"SealTemp","tempFengKouWendu",value)
- this.setPropValue(id,"LeftAppointmentTime","leftAppointmentTime",value,0)
- this.setPropValue(id,"ValidCurrent","validCurrent",value,0)
- this.setPropValue(id,"TurnCurrent","turnCurrent",value,0)
- this.setPropValue(id,"PressDelay","pressDelay",value,0)
- this.setPropValue(id,"WaterRepair","waterRepair",value,0)
- this.setPropValue(id,"HoldingTemp","baowenTemp",value,0)
- this.setPropValue(id,"HoldingTime","baowenTime",value,0)
- this.setPropValue(id,"AppointmentTime","planTime",value,0)
- this.setPropValue(id,"TimeSettingFirst","timeSettingFirst",value,0)
- this.setPropValue(id,"CurrentTimeSettingFirst","currentTimeSettingFirst",value,0)
- this.setPropValue(id,"TimeSettingSecond","timeSettingSecond",value,0)
- this.setPropValue(id,"CurrentTimeSettingSecond","currentTimeSettingSecond",value,0)
- this.setPropValue(id,"SecondAddWaterTime","secondAddWaterTime",value,0)
- this.setPropValue(id,"CurrentSecondAddWaterTime","currentSecondAddWaterTime",value,0)
- this.setPropValue(id,"JianyaoMode","jianyaoMode",value,0)
- self.propMap[id] = prop;
- }
- },
- setPropValue(id,key,propKey,value,defaultValue){
- if(!value && defaultValue){
- value = defaultValue;
- }
- if(id === key){
- this[propKey] = value;
- }
- },
- parseSummay(summary){
- let self = this;
- if(!summary){
- summary = "";
- }
- if(summary.length>0){
- this.summary = JSON.parse(summary);
- if(self.summary.length>0){
- this.oneToMul = true;
- for (let i = 0; i < self.summary.length; i++) {
- self.summary[i].tabName = self.summary[i].name
- }
- let childId = "";
- if(this.oneToMul){
- this.childId = self.summary[0].id;
- }
- }else{
- this.summary = [{name:"煎药机一"}]
- }
- }else{
- this.summary = [{name:"煎药机一"}]
- }
- },
- goDeviceDetail(id){
- uni.navigateTo({
- url: '/pages/device/detail/detail?id='+id
- });
- },
- async connectMqtt() {
- if (this.$mqttTool.client == null) {
- await this.$mqttTool.connect(this.vuex_token);
- }
- this.mqttCallback();
- this.startCheck();
- },
- /** Mqtt订阅主题 */
- mqttSubscribe(device) {
- // 订阅当前设备状态和实时监测
- let topicStatus = '/' + device.productId + '/' + device.serialNumber + '/status/post';
- let topicProperty = '/' + device.productId + '/' + device.serialNumber + '/property/post';
- let topicFunction = '/' + device.productId + '/' + device.serialNumber + '/function/post';
- let topics = [];
- topics.push(topicStatus);
- topics.push(topicProperty);
- topics.push(topicFunction);
- this.$mqttTool.subscribe(topics);
- },
- /** Mqtt取消订阅主题 */
- mqttUnSubscribe(device) {
- // 订阅当前设备状态和实时监测
- let topicStatus = '/' + device.productId + '/' + device.serialNumber + '/status/post';
- let topicProperty = '/' + device.productId + '/' + device.serialNumber + '/property/post';
- let topicFunction = '/' + device.productId + '/' + device.serialNumber + '/function/post';
- let topics = [];
- topics.push(topicStatus);
- topics.push(topicProperty);
- topics.push(topicFunction);
- console.log('取消订阅', topics);
- this.$mqttTool.unsubscribe(topics);
- },
- /* Mqtt回调处理 */
- mqttCallback() {
- this.$mqttTool.client.on('message', (topic, message, buffer) => {
- let topics = topic.split('/');
- let productId = topics[1];
- let deviceNum = topics[2];
- console.log('接收到内容:'+message);
- message = JSON.parse(message.toString());
- if (topics[3] == 'status') {
- console.log('接收到【设备状态-运行】主题:', topic);
- console.log('接收到【设备状态-运行】内容:', message);
- // 更新列表中设备的状态
- if (this.deviceInfo.serialNumber == deviceNum) {
- this.deviceInfo.status = message.status;
- this.deviceInfo.isShadow = message.isShadow;
- this.deviceInfo.rssi = message.rssi;
- this.updateDeviceStatus(this.deviceInfo);
- }
- }
- if (topics[3] == 'property' || topics[3] == 'function') {
- console.log('接收到【物模型】主题:', topic);
- console.log('接收到【物模型】内容:', message);
- if(this.oneToMul){
- let curTabId = this.childId;
- let msg = [];
- for (let i = 0; i < message.length; i++) {
- let curMsg = message[i];
- let id = curMsg.id;
- let ids = id.split("_");
- let value = curMsg.value;
- if(ids.length == 2){
- if(curTabId == ids[1]){
- msg.push({id:ids[0],value:value});
- }
- }else{
- msg.push(curMsg);
- }
- }
- message = msg;
- }
- // 更新列表中设备的属性
- if (this.deviceInfo.serialNumber == deviceNum) {
- for (let j = 0; j < message.length; j++) {
- let isComplete = false;
- let msgId = message[j].id;
- this.exchangeData(msgId,message[j]);
- // 布尔类型
- if(this.deviceInfo.boolList == null){
- return;
- }
- for (let k = 0; k < this.deviceInfo.boolList.length && !isComplete; k++) {
- if (this.deviceInfo.boolList[k].id == message[j].id) {
- this.deviceInfo.boolList[k].shadow = message[j].value;
- isComplete = true;
- break;
- }
- }
- // 枚举类型
- for (let k = 0; k < this.deviceInfo.enumList.length && !isComplete; k++) {
- if (this.deviceInfo.enumList[k].id == message[j].id) {
- this.deviceInfo.enumList[k].shadow = message[j].value;
- isComplete = true;
- break;
- }
- }
- // 字符串类型
- for (let k = 0; k < this.deviceInfo.stringList.length && !isComplete; k++) {
- if (this.deviceInfo.stringList[k].id == message[j].id) {
- this.deviceInfo.stringList[k].shadow = message[j].value;
- isComplete = true;
- break;
- }
- }
- // 数组类型
- for (let k = 0; k < this.deviceInfo.arrayList.length && !isComplete; k++) {
- if (this.deviceInfo.arrayList[k].id == message[j].id) {
- this.deviceInfo.arrayList[k].shadow = message[j].value;
- isComplete = true;
- break;
- }
- }
- // 整数类型
- for (let k = 0; k < this.deviceInfo.integerList.length && !isComplete; k++) {
- if (this.deviceInfo.integerList[k].id == message[j].id) {
- this.deviceInfo.integerList[k].shadow = message[j].value;
- isComplete = true;
- break;
- }
- }
- // 小数类型
- for (let k = 0; k < this.deviceInfo.decimalList.length && !isComplete; k++) {
- if (this.deviceInfo.decimalList[k].id == message[j].id) {
- this.deviceInfo.decimalList[k].shadow = message[j].value;
- isComplete = true;
- break;
- }
- }
- // 监测数据
- for (let k = 0; k < this.deviceInfo.readOnlyList.length && !isComplete; k++) {
- if (this.deviceInfo.readOnlyList[k].id == message[j].id) {
- this.deviceInfo.readOnlyList[k].shadow = message[j].value;
- // 更新图表
- // for (let m = 0; m < this.monitorChart.length; m++) {
- // if (message[j].id == this.monitorChart[m].data.id) {
- // let data = [{
- // value: message[j].value,
- // name: this.monitorChart[m].data.name
- // }];
- // this.monitorChart[m].chart.setOption({
- // series: [{
- // data: data
- // }]
- // });
- // break;
- // }
- // }
- isComplete = true;
- break;
- }
- }
- }
- this.parseEnumList(true);
- this.checkJianyao();
- if(this.planIngPopDlg){
- this.calcuStep();
- }
- }
- this.$forceUpdate();
- }
- });
- },
- checkJianyao(){
- // if(!this.jianyaoPopClose){
- // return;
- // }
- // let self = this;
- // setTimeout(function(){
- // if(self.decoctControlStatus){
- // self.showJianyao();
- // }
- // },1000);
- },
- exchangeData(msgId,obj){
- if(msgId === "TempSetting"){
- this.temperature = obj.value;
- }
- if(msgId === "TimeSetting"){
- this.temperatureTime = obj.value;
- }
- if(msgId === "CurrentTemp"){
- this.currentTemperature = obj.value;
- }
- if(msgId === "HighTempTime"){
- this.hightTemperature = obj.value;
- }
- if(msgId === "SealTemp"){//封口温度
- if(!this.editing){
- if(this.baozhuangFengkouSetting){
- this.tempFengkouWendu = obj.value;
- }else{
- this.sealingTemperature = obj.value;
- }
- }
- }
- if(msgId === "BandingTemp"){//封边温度
- if(!this.editing){
- if(this.baozhuangFengbianSetting){
- this.tempFengBianWendu = obj.value;
- }else{
- this.edegTemperature = obj.value;
- }
- }
- }
- if(msgId === "PackingVolume"){
- if(!this.editing){
- if(this.baozhuangRongLiangSetting){
- }else{
- this.packageVolume = obj.value;
- }
- }
- }
- if(msgId === "PackageQuantity"){
- if(!this.editing){
- if(this.baozhuangShuLIangSetting){
- }else{
- this.packageNumber = obj.value;
- }
- }
- }
- if(msgId === "LeftAppointmentTime"){
- this.leftAppointmentTime = obj.value;
- }
- if(msgId === "SlowfireTiem"){
- this.leftJianyaoTime = obj.value;
- }
- if(msgId === "CalibrationTemp"){
- this.jiaozhunTemp = obj.value;
- }
- if(msgId === "TurnCurrent"){
- this.turnCurrent = obj.value;
- }
- if(msgId === "ValidCurrent"){
- this.validCurrent = obj.value;
- }
- if(msgId === "WaterVolume"){
- this.waterVolume = parseInt(obj.value)/10;
- }
- if(msgId === "CurrentWaterVolume"){
- this.currentWaterVolume = parseInt(obj.value)/10;
- }
- if(msgId === "HoldingTemp"){
- this.baowenTemp = obj.value;
- }
- if(msgId === "HoldingTime"){
- this.baowenTime = obj.value
- }
- if(msgId === "AppointmentTime"){
- this.planTime = obj.value
- }
- if(msgId === "PressTurn"){
- this.pressTurn = obj.value
- }
- if(msgId === "ResetTurn"){
- this.resetTurn = obj.value
- }
- if(msgId === "DrainageTurn"){
- this.drainageTurn = obj.value
- }
- if(msgId === "TimeSettingFirst"){
- this.timeSettingFirst = obj.value;
- }
- if(msgId === "CurrentTimeSettingFirst"){
- this.currentTimeSettingFirst = obj.value;
- }
- if(msgId === "TimeSettingSecond"){
- this.timeSettingSecond = obj.value;
- }
- if(msgId === "CurrentTimeSettingSecond"){
- this.currentTimeSettingSecond = obj.value;
- }
- if(msgId === "SecondAddWaterTime"){
- this.secondAddWaterTime = obj.value;
- }
- if(msgId === "CurrentSecondAddWaterTime"){
- this.currentSecondAddWaterTime = obj.value;
- }
- if(msgId = "JianyaoMode"){
- this.jianyaoMode = obj.value;
- }
- if(msgId = "PressDelay"){
- this.pressDelay = obj.value;
- }
- if(msgId = "WaterRepair"){
- this.waterRepair = obj.value;
- }
- },
- /** 发布物模型 类型(1=属性,2=功能) */
- publishThingsModel(device, model) {
- // 获取缓存的Json物模型
- cacheJsonThingsModel(device.productId).then(response => {
- let thingsModel = JSON.parse(response.data);
- let type = 0;
- for (let i = 0; i < thingsModel.functions.length; i++) {
- if (model.id == thingsModel.functions[i].id) {
- type = 2;
- break;
- }
- }
- if (type == 0) {
- for (let i = 0; i < thingsModel.properties.length; i++) {
- if (model.id == thingsModel.properties[i].id) {
- type = 1;
- break;
- }
- }
- }
- if (type != 0) {
- this.mqttPublish(type, device, [model]);
- }
- });
- },
- notifyError(res){
- uni.showToast({
- title:res,
- icon:"error"
- })
- },
- notifySuccess(res){
- uni.showToast({
- title:res,
- icon:"success"
- })
- },
- getDownloadUrl(path){
- return this.firmware.downUrl +"/iot/tool/download?fileName="+ path;
- },
- /**
- * Mqtt发布消息
- * @type 类型(1=属性,2=功能,3=OTA升级,4=实时监测)
- * @device 设备
- * @model 物模型
- * */
- mqttPublish(type, device, modelList,needMore) {
- if(this.deviceInfo.status != 3){
- this.notifyError("请等待设备上线后操作")
- return;
- }
- if(modelList.length == 0){
- return;
- }
- let topic = "";
- let message = ""
- let oneToMul = false;
- if(this.summary.length>1){
- oneToMul = true;
- }
- if(!needMore){
- oneToMul = false;
- }
- if(this.firstTab){
- let isKaijiKey = false;
- if(modelList.length >0){
- let modelData = modelList[0];
- let curKeyId = modelData.id;
- if(!this.decoctControlOnOffStatus){
- if(oneToMul){
- if(curKeyId == 'PowerCtl'){
- isKaijiKey = true;
- }
- }else{
- if(curKeyId == 'PowerControl'){
- isKaijiKey = true;
- }
- }
- }else{
- isKaijiKey = true;
- }
- }
- // if(!isKaijiKey){
- // this.notifyError("请先开机后再进行操作")
- // return;
- // }
- }else{
- let isKaijiKey = false;
- if(modelList.length >0){
- let modelData = modelList[0];
- let curKeyId = modelData.id;
- if(!this.packageControlOnOffStatus){
- if(curKeyId == 'PackagePowerControl'){
- isKaijiKey = true;
- }
- }else{
- isKaijiKey = true;
- }
- }
- if(!isKaijiKey){
- this.notifyError("请先开机后再进行操作")
- return;
- }
- }
- if (type == 1) {
- if (device.status == 3) {
- // 属性,在线模式
- topic = "/" + device.productId + "/" + device.serialNumber + "/property-online/get";
- }
- } else if (type == 2) {
- if (device.status == 3) {
- // 功能,在线模式
- topic = "/" + device.productId + "/" + device.serialNumber + "/function-online/get";
- }
- } else if (type == 3) {
- // OTA升级
- topic = "/" + device.productId + "/" + device.serialNumber + "/ota/get";
- } else {
- return;
- }
- let title = "";
- if(type == 1){
- title = "属性";
- }else if(type == 2){
- title = "功能";
- }else if(type == 3){
- title = "升级";
- }
- if (topic != "") {
- // 发布
- let arr = [];
- for (let i = 0; i <modelList.length; i++) {
- let model = modelList[i];
- let modelId = model.id;
- if(oneToMul){
- let childId = this.childId;
- if(childId){
- modelId = modelId+"_"+childId;
- }
- }
- let shadow = model.shadow+"";
- let modelType = model.type;
- let shadowInt = parseInt(shadow,10);
- let isNumber = false;
- let shadowStr = shadowInt+"";
- if(shadowStr === shadow){
- isNumber = true;
- shadow = shadowInt;
- }
- if(modelType == "integer" && !isNumber){
- this.$modal.showToast(model.name+'的值必须是数字类型')
- return;
- }
- arr.push({id:modelId,value:shadow+""});
- }
- message = JSON.stringify(arr);
- let self = this;
- this.$mqttTool.publish(topic, message,title).then(res => {
- this.notifySuccess(res);
- }).catch(res => {
- this.notifyError(res);
- });
- }
- },
- startCheck(){
- let self = this;
- this.checkTimer = setTimeout(function (){
- self.sendHeart();
- self.startCheck();
- },20000);
- },
- checkActive(){
- let self = this;
- setTimeout(function (){
- if(self.publishMsg){
- self.resetConn()
- }
- },3000);
- },
- sendHeart(){
- console.log("发送心跳111")
- let device = this.deviceInfo;
- let self = this;
- let topic = "/property-offline/post";
- self.publishMsg = true;
- self.checkActive();
- this.$mqttTool.publish(topic, "ok", "heart").then(res => {
- self.publishMsg = false;
- }).catch(res => {
- self.publishMsg = false;
- });
- },
- resetConn(){
- console.log("检测异常,重连")
- this.$mqttTool.end();
- this.$mqttTool.client = null;
- this.connectMqtt();
- this.getDetail();
- }
- }
- }
- </script>
- <style>
- .send_btn{
- width: 160rpx !important;
- height: 40rpx !important;
- font-size: 10px !important;
- margin-top: 5px;
- }
- uni-col{
- width: 150px;
- }
- .header{
- width: 100%;
- background: white;
- padding:0px 20rpx;
- position: relative;
- height: 100vh;
- position: relative;
- }
- .content {
- display: flex;
- align-items: center;
- justify-content: center;
- color: #060B25;
- }
- .logo {
- height: 200rpx;
- width: 200rpx;
- margin-top: 200rpx;
- margin-left: auto;
- margin-right: auto;
- margin-bottom: 50rpx;
- }
- .text-area {
- margin:10px;
- padding-bottom: 10px;
- justify-content: center;
- width: 100%;
- }
- .grid-text {
- font-size: 14px;
- color: #909399;
- padding: 10rpx 0 20rpx 0rpx;
- /* #ifndef APP-PLUS */
- box-sizing: border-box;
- /* #endif */
- }
- .title {
- font-size: 36rpx;
- color: #8f8f94;
- }
- .item{
- height: 80rpx;
- line-height: 80rpx;
- }
- .bg{
- position: relative;
- }
- .text-left{
- color: #8A92A5;
- }
- .text-right{
- color: #545454;
- }
- .prop-text{
- position: relative;
- margin:20rpx 0;
- font-size: 26rpx;
- }
- .prop-card-area{
- }
- .prop-card{
- width: 28%;
- height: 100rpx;
- text-align: center;
- display: inline-block;
- background: #F5FCFF;
- box-shadow: 0px 9rpx 8rpx 0px rgba(0,0,0,0.09);
- border-radius: 8rpx;
- margin:0px 15rpx;
- line-height: 48rpx;
- }
- .prop-card-top{
- color: #3E9CFC;
- }
- .prop-card-bottom{
- color: #8A92A5;
- }
- .tab-area {
- background: white;
- position: absolute;
- left: 0px;
- right: 0px;
- top:480rpx;
- bottom:-20px;
- min-height: 200rpx;
- box-shadow: 0rpx 5rpx 27rpx 0rpx rgba(195, 195, 195, 0.4);
- border-radius: 40rpx;
- overflow-y: auto;
- padding-bottom:80rpx;
- }
- .prop-item{
- position: relative;
- display: flex;
- flex-direction: row;
- height: 100rpx;
- line-height: 100rpx;
- margin:0 20rpx;
- }
- .prop-item-left{
- color: #545454;
- width: 100%;
- font-size: 16px;
- border-bottom: 1px solid lightgray;
- margin-left: 120rpx;
- }
- .prop-item-image{
- width: 120rpx;
- height: 120rpx;
- position: absolute;
- bottom:-10rpx;
- }
- .prop-item-right{
- position: absolute;
- right:10rpx;
- top:5rpx;
- }
- input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{
- color:#666;
- font-size:12px;
- }
- .clearfix::after {
- content: "";
- display: block;
- clear: both;
- }
- .decoctControlHeader {
- display: flex;
- align-items: center;
- font-weight: 600;
- }
- .decoctControlTop {
- display: flex;
- height: 240rpx;
- border-bottom:1px #B2B2B2 dotted;
- margin:0 40rpx;
- }
- .decoctControlTopLeft {
- width:40%;
- line-height: 2;
- text-align: center;
- margin: 0 15px;
- position: relative;
- }
- .addTemperature {
- border-radius:5px;
- position:absolute;
- background-color: dodgerblue;
- color:white;
- width: 30px;
- height: 30px;
- left:15px;
- top:80px;
- }
- .addTemperatureBtn {
- border-radius:10px;
- position:absolute;
- clip-path: polygon(50% 0,100% 100%,0 100%);
- transform: scale(0.5);
- left: 0;
- top:0;
- bottom: 0;
- right: 0;
- margin: auto;
- }
- .subTemperature {
- border-radius:5px;
- position:absolute;
- background-color: dodgerblue;
- color:white;
- width: 30px;
- height: 30px;
- right:15px;
- top:80px;
- }
- .subTemperatureBtn {
- border-radius:10px;
- position:absolute;
- clip-path: polygon(50% 0,100% 100%,0 100%);
- transform: scale(0.5);
- left: 0;
- top:0;
- bottom: 0;
- right: 0;
- margin: auto;
- }
- .decoctControlTopRight {
- width:40%;
- line-height: 2;
- text-align: center;
- margin: 0 15px;
- position: relative;
- }
- .decoctControlBottom {
- border-bottom:1px #B2B2B2 dotted;
- width:91vw;
- margin:0 auto;
- padding:10px;
- display: flex;
- justify-content:space-between;
- align-items: center;
- }
- .addTime {
- border-radius:5px;
- position:absolute;
- background-color: dodgerblue;
- color:white;
- width: 30px;
- height: 30px;
- left:15px;
- top:80px;
- }
- .addTimeBtn {
- border-radius:10px;
- position:absolute;
- clip-path: polygon(50% 0,100% 100%,0 100%);
- transform: scale(0.5);
- left: 0;
- top:0;
- bottom: 0;
- right: 0;
- margin: auto;
- }
- .subTime {
- border-radius:5px;
- position:absolute;
- background-color: dodgerblue;
- color:white;
- width: 30px;
- height: 30px;
- right:15px;
- top:80px;
- }
- .subTimeBtn {
- border-radius:10px;
- position:absolute;
- clip-path: polygon(50% 0,100% 100%,0 100%);
- transform: scale(0.5);
- left: 0;
- top:0;
- bottom: 0;
- right: 0;
- margin: auto;
- }
- .packageControlBottomRight {
- border-radius:5px;
- padding:5px 10px;
- margin-right: 15px;
- background-color: #3c9cff;
- color: #fff;
- }
- .packageControlBottomClear {
- border-radius:5px;
- padding:5px 10px;
- background-color: #B2B2B2;
- color: #fff;
- }
- .active_btn{
- background-color: #3c9cff;
- }
- .baozhuang-sub{
- right: 10rpx !important;
- }
- .baozhuang-add{
- left: 6rpx !important;
- }
- .control-input-box{
- display: flex;
- flex-direction: row;
- padding-left: 26rpx;
- }
- .control-input-box-danwei{
- padding-top:12rpx;
- margin-left:4rpx;
- }
- .tabs{
- position: relative;
- top:15vh;
- }
- .child_tab{
- position: relative;
- display: inline-block;
- width: 25%;
- height: 180rpx;
- }
- .child_img{
- width: 50rpx;
- height: 50rpx;
- left: 66rpx;
- top: 66rpx;
- position: relative;
- }
- .child_title{
- position: absolute;
- left: 0px;
- right: 0px;
- text-align: center;
- font-size: 12px;
- bottom: -12rpx;
- color: #060B25;
- }
- .control{
- width: 100%;
- position: relative;
- }
- .control_item{
- position: relative;
- width: 50%;
- display: inline-block;
- height: 150rpx;
- }
- .control_item_detail{
- position: relative;
- top:22rpx;
- }
- .control_item_left{
- position:absolute;;
- left:22%;
- font-size: 55px;
- z-index: 999;
- top:-30rpx
- }
- .control_item_center{
- position:absolute;;
- left:34%;
- top:0vh;
- }
- .control_item_right{
- position:absolute;;
- left:67%;
- font-size: 34px;
- z-index: 999;
- }
- .control_item_center_unit{
- position: absolute;
- left:26vw;
- top: 0.8vh;
- width:200rpx;
- }
- .control_item_title{
- position: absolute;
- bottom:34rpx;
- font-size: 12px;
- width: 100%;
- text-align: center;
- }
- .bottom{
- height: 190rpx;
- position: absolute;
- left: 0px;
- width: 100%;
- padding-top: 18rpx;
- bottom: -8vh;
- }
- .bottom_item{
- display: inline-block;
- width: 20%;
- font-size: 12px;
- height: 100%;
- position: relative;
- text-align: center;
- margin-top: 2vh;
- }
- .active_on{
- color: #50ACFF;
- }
- .status_info{
- position: absolute;
- left: 5vw;
- top: 10vh;
- }
- .status_detail{
- display: flex;
- flex-direction: row;
- }
- .status_text{
- font-size: 16px;
- }
- .online_text{
- font-size: 12px;
- padding-top: 3px;
- }
- .online{
- color: #017128;
- }
- .device_info{
- font-size: 13px;
- }
- .control_area{
- position: relative;
- top:14vh;
- }
- .disabled_tab{
- opacity: 0.4;
- }
- .roate{
- transform: rotate(180deg);
- }
- </style>
|