12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404 |
- <template>
- <div class="overflow-wrap">
- <page-top-bar-custom
- @component-page-top-bar-custom-ready="setTopBarHeight"
- :bgColor="[navFixed? '#f7f8fa' : 'transparent']"
- >
- <div
- class="office-header"
- @click="goPre"
- >
- <van-icon
- style="position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);"
- name="arrow-left"
- />
- </div>
- <div
- class="office-title"
- v-show="!moveToBottom&&realScrollTop<30"
- >
- <image
- class="weather-img"
- :src="h5StaticPath+outWeather.imgname"
- mode="widthFix"
- />
- <div class="weather-text">
- <div class="first-line"><span class="text">{{outWeather.temperature ? outWeather.temperature :'--'}}℃</span><span class="text">/</span><span class="text">PM2.5</span><span>{{outWeather.pm25 ? outWeather.pm25 :'--'}}</span>
- </div>
- <div class="second-line">
- <span class="text weatherText">{{outWeather.text ? outWeather.text :'--'}}</span><span>{{outWeather.quality ? outWeather.quality :'--'}}</span>
- </div>
- </div>
- </div>
- </page-top-bar-custom>
- <scroll-view
- id="scroll-view"
- scroll-y="{{canscroll}}"
- enhanced
- scroll-anchoring
- show-scrollbar="{{false}}"
- bounces="{{false}}"
- scroll-top="{{scrollTop}}"
- bindscroll="scrollEvent"
- scroll-with-animation="true"
- bindscrolltoupper="scrollToUpper"
- >
- <div class="map-wrap" v-show="transY">
- <map-home
- v-if="userInfo&& userInfo.userId"
- :spaceIdProp="spaceIdProp"
- :companyIdProp="companyIdProp"
- @mapChangeSpaceInfo="mapChangeSpaceInfo"
- ></map-home>
- </div>
- <div
- class="move-wrap"
- style="transform: translateY({{transY}}px);top:{{topBarHeight+roomPicTop}}px;"
- bindtouchstart="touchstart"
- bindtouchmove="touchmove"
- bindtouchend="touchend"
- >
- <div
- style="opacity:{{opacityV}}"
- v-show="!moveToBottom"
- >
- <image
- class="bg-img"
- style="top:{{-topBarHeight-roomPicTop}}px;height:{{topBarHeight+roomPicTop}}px"
- :src="topbgimg"
- />
- </div>
- <div
- style="opacity:{{opacityV}}"
- v-show="!moveToBottom"
- class="roomImgWrap"
- >
- <div
- class="spaceImg"
- @click="showSaveSpace"
- >
- <image
- class="spimg"
- :src="h5StaticPath+'defaultspace.svg'"
- />
- </div>
- <image
- class="room-img"
- :src="h5StaticPath+headImg"
- mode="widthFix"
- />
- </div>
- <div class="office-container">
- <!-- 空间基本情况 -->
- <div
- class="maproom-detail"
- v-show="moveToBottom"
- >
- <div class="room-bar"></div>
- <div class="room-bg">
- <div class="g-fl room-name">
- <span>{{officeData.localName}}</span>
- <has-person
- v-if="officeData.isPassengerPass !== undefined"
- :isPassengerPass="officeData.isPassengerPass"
- ></has-person>
- </div>
- </div>
- <!-- 空间信息 -->
- <div class="office-room-info">
- <div class="room-envlist g-fl">
- <div
- class="g-fl g-fl-c"
- v-for="(item,idx) in envlist"
- :key="idx"
- >
- <span class="env-name">{{item.name}}</span>
- <span class="env-num">{{item.num }}</span>
- <span class="env-level">{{item.level ? item.level :'--'}}</span>
- </div>
- </div>
- </div>
- </div>
- <!-- 空间基本情况 -->
- <div
- id="roomDetail"
- class="room-detail"
- v-show="!moveToBottom"
- >
- <div class="room-bg">
- <div class="room-bar"></div>
- <div class="g-fl room-name">
- <span>{{officeData.localName}}</span>
- <has-person
- v-if="officeData.isPassengerPass !== undefined"
- :isPassengerPass="officeData.isPassengerPass"
- ></has-person>
- </div>
- </div>
- <!-- 空间信息 -->
- <div class="office-room-info">
- <div class="room-envlist g-fl">
- <div
- class="g-fl g-fl-c"
- v-for="(item,idx) in envlist"
- :key="idx"
- @tap.stop="handleDetail(item)"
- >
- <span class="env-name">{{item.name}}</span>
- <span class="env-num">{{item.num }}</span>
- <span class="env-level">{{item.level ? item.level :'--'}}</span>
- </div>
- </div>
- </div>
- <div
- class="sceneBox"
- v-if="popList.length>0 && options.roomType =='会议室'"
- >
- <div
- v-for="(item,idx) in popList"
- class="eachScene"
- :class="{'selScene':vanPopupIndex==item.code,'firstScene':idx==0&&popList.length==2}"
- :key="idx"
- @click="handleScene(item,idx)"
- >
- <image :src="h5StaticPath+item.img" />
- <span>{{item.name}}</span>
- </div>
- </div>
- <div v-if="roomHasScene && options.roomType =='开放'">
- <work-scene-hand
- v-if="controlMode==1"
- @component-open-workTimePop="handlePopup"
- @component-get-workTimeData="getWorkDayTime"
- @component-open-sceneShowpop="handleWorkOff"
- @component-EquipType-workTimePop="dialogShowEquipType"
- :workDayTime="workDayTime"
- :isControl="isControl"
- ></work-scene-hand>
- <work-scene
- v-if="controlMode==0"
- @component-open-workTimePop="handlePopup"
- @component-get-workTimeData="getWorkDayTime"
- @component-open-sceneShowpop="handleWorkOff"
- :workDayTime="workDayTime"
- :isControl="isControl"
- ></work-scene>
- </div>
- </div>
- <all-close
- @showAllClose="showAllClose"
- :projectId="projectId"
- :floorInfo="floorInfo"
- v-if="(nowTime>eightTime||nowTime<sixTime)&&projectId=='Pj1101080259'"
- ref="allclose"
- ></all-close>
- <!-- 空调调节卡片 -->
- <air-adjust
- v-if="(officeData.temperature || spaceEqFlagObj.hasAir)&&controlMode==0"
- id="inToView0"
- :isControl="isControl"
- :airVisible="airVisible"
- :roomHasScene="roomHasScene"
- :hasAir="spaceEqFlagObj.hasAir"
- :hasBlowing="spaceEqFlagObj.hasBlowing"
- :airVolumes="officeData.airVolumes"
- :temperature="officeData.temperature"
- :objectId="options.spaceId"
- :roomType="options.roomType"
- :projectId="projectId"
- :isACATVA="isACATVA"
- :isACATFC="isACATFC"
- @showDetail="handleDetail"
- @airShowVisible="airShowVisible"
- @component-open-workTimePop="handlePopup"
- @airTemp="airTemp"
- v-bind:key="airKey"
- ></air-adjust>
- <air-adjust-hand
- v-if="spaceEqFlagObj.hasAir&&controlMode==1"
- id="inToView02"
- :isControl="isControl"
- :airVisible="airVisible"
- :roomHasScene="roomHasScene"
- :hasAir="spaceEqFlagObj.hasAir"
- :hasBlowing="spaceEqFlagObj.hasBlowing"
- :airVolumes="officeData.airVolumes"
- :temperature="officeData.temperature"
- :equipConfig="equipmentsConfig"
- :objectId="options.spaceId"
- :roomType="options.roomType"
- :projectId="projectId"
- :isACATVA="isACATVA"
- :isACATFC="isACATFC"
- @showDetail="handleDetail"
- @airShowVisible="airShowVisible"
- @component-open-workTimePop="handlePopup"
- @component-EquipType-workTimePop="dialogShowEquipType"
- @airTemp="airTemp"
- @setCanScroll="setCanScroll"
- v-bind:key="airKey"
- ></air-adjust-hand>
- <!-- 地暖 -->
- <div v-show="floorHeatData.len">
- <Floor-Heating
- id="inToView5"
- :cardWidth="cardWidth"
- @component-open-floorFeat-pop="openFloorFeatPop"
- @component-floorHeat-data="getFloorHeatData"
- :spaceId="options.spaceId"
- ></Floor-Heating>
- </div>
- <!-- 光照调节卡片 -->
- <lamp-adjust
- v-if="spaceEqFlagObj.hasLamp"
- id="inToView1"
- :isControl="isControl"
- :roomHasScene="roomHasScene"
- :lampHide="lampHide"
- :spaceId="options.spaceId"
- :roomType="options.roomType"
- :controlMode="controlMode"
- :equipConfig="equipmentsConfig"
- @component-open-colourPop="openColourPop"
- @component-open-workTimePop="handlePopup"
- @component-EquipType-workTimePop="dialogShowEquipType"
- v-bind:key="lampKey"
- ></lamp-adjust>
- <!-- 窗帘卡片 -->
- <div v-show="spaceEqFlagObj.hasCurtain">
- <curtain-card
- id="inToView2"
- :isControl="isControl"
- :projectId="projectId"
- :spaceId="options.spaceId"
- :curtainVisible="curtainVisible"
- @comments-curtain-len="showCurtain"
- @commponents-curtain-showPop="showCurtainPop"
- >
- </curtain-card>
- </div>
- <!-- 智能插座卡片 -->
- <div v-show="spaceEqFlagObj.hasSocket">
- <socket-card
- id="inToView3"
- :isControl="isControl"
- :roomHasScene="roomHasScene"
- :roomType="options.roomType"
- :controlMode="controlMode"
- :projectId="projectId"
- :spaceId="options.spaceId"
- @component-showSocket="showSocket"
- @component-open-workTimePop="handlePopup"
- @component-EquipType-workTimePop="dialogShowEquipType"
- >
- </socket-card>
- </div>
- <!-- 声压卡片 -->
- <voice-adjust id="inToView4"></voice-adjust>
- <!-- 页面到底标志 -->
- <div
- class="pageBottom"
- :style="{height:windowHeightpx / 2+'px'}"
- >
- <image
- class="log-text"
- src="{{h5StaticLogo}}/page-home/tenatslink.svg"
- />
- </div>
- <!--场景 - 帮忙预约 -->
- <van-popup
- overlay-style="background: rgba(0, 0, 0, 0.4)"
- round
- :show="helpOrderShow"
- @close="handleOrderPopup"
- >
- <div class="scene-popup order-popup">
- <div class="scene-popup-head">
- <div class="head-imgbg">
- <div class="head-imgbox">
- <image :src="h5StaticPath+sceneDetail.img" />
- </div>
- </div>
- <span>临时使用会议室?</span>
- </div>
- <div class="scene-popup-body">
- <div class="order-item">为您预约至 <span class="time-span">{{orderMeetTimeStr}}</span></div>
- </div>
- <div class="popup-btns order-btns">
- <span
- class="btnspan btn_com"
- @click="handleOrderPopup"
- >不预约</span><span
- class="btnspan surespan"
- @click="orderMeeting"
- >预约</span>
- </div>
- </div>
- </van-popup>
- <van-popup
- overlay-style="background: rgba(0, 0, 0, 0.4)"
- round
- :show="hasOrderShow"
- @close="handleHasPopup"
- >
- <div class="scene-popup order-popup">
- <div class="scene-popup-head">
- <div class="head-imgbg">
- <div class="head-imgbox">
- <image :src="h5StaticPath+sceneDetail.img" />
- </div>
- </div>
- <span>该会议室已被预定!</span>
- </div>
- <div class="scene-popup-body">
- <div class="order-item"> 如需预约,<br />请切换其他会议室。</div>
- </div>
- <div
- class="btns"
- @click.stop="handleHasPopup"
- >
- <span class="btn btn_com">隐藏</span>
- </div>
- </div>
- </van-popup>
- </div>
- </div>
- </scroll-view>
- <!-- 窗帘 -->
- <van-popup
- overlay-style="background: rgba(0, 0, 0, 0.4)"
- custom-style="height: 55%"
- round
- :show="curtainVisible"
- position="bottom"
- @close="curtainVisible = false"
- >
- <div style="display:flex;justify-content: center;">
- <Curtain-Pop
- :curtainVisible="curtainVisible"
- :typeobj="crutainType"
- >
- </Curtain-Pop>
- </div>
- </van-popup>
- <!-- 地暖 -->
- <van-popup
- overlay-style="background: rgba(0, 0, 0, 0.4)"
- custom-style="height: 55%"
- round
- :show="floorfeatVisible"
- position="bottom"
- @close="floorfeatVisible = false"
- >
- <div style="display:flex;justify-content: center;">
- <Floor-Pop
- :floorfeatVisible="floorfeatVisible"
- :floorFeatItem="floorFeatItem"
- :maxValue="floorHeatData.maxValue"
- :minValue="floorHeatData.minValue"
- ></Floor-Pop>
- </div>
- </van-popup>
- <!-- 灯控色温 -->
- <van-popup
- overlay-style="background: rgba(0, 0, 0, 0.4)"
- custom-style="height: 55%"
- round
- :show="colourVisible"
- position="bottom"
- @close="colourVisible = false"
- >
- <div style="display:flex;justify-content: center;">
- <lamp-colour
- v-if="colourVisible"
- :colourObj="colourConfig"
- ></lamp-colour>
- </div>
- </van-popup>
- <!-- 空调反馈 文案 -->
- <van-popup
- overlay-style="background: rgba(0, 0, 0, 0.4)"
- round
- :show="airVisible"
- :close-on-click-overlay="false"
- @close="airVisible = false"
- >
- <air-feedback
- @component-open-sceneShowpop="airVisible = false;"
- :airSetText="airSetText"
- :officeData="officeData"
- />
- </van-popup>
- <!-- 浮层场景 popUp 手动 -->
- <van-popup
- v-if="controlMode==1"
- :custom-style="'height:'+handPopHight+'%'"
- overlay-style="background: rgba(0, 0, 0, 0.4)"
- position="bottom"
- round
- :show="visible"
- @close="handlePopup(false)"
- >
- <div
- class="popup-box"
- v-if="options.roomType =='开放' && visible"
- >
- <work-overtime-hand
- @component-close-visible="handlePopup"
- @component-get-workTime="getWorkDayTime"
- @component-set-countDown="handlecountDown"
- :equipConfig="equipmentsConfig"
- :visible="visible"
- :localName="officeData.localName"
- :bookEquipList="bookEquipList"
- :workDayTime="workDayTime"
- :objectId="options.spaceId"
- :countDownTwoMin="countDownTwoMin"
- >
- </work-overtime-hand>
- </div>
- </van-popup>
- <!-- 浮层场景 popUp 自动 -->
- <van-popup
- v-if="controlMode==0"
- custom-style="height: 55%"
- overlay-style="background: rgba(0, 0, 0, 0.4)"
- position="bottom"
- round
- :show="visible"
- @close="handlePopup(false)"
- >
- <div
- class="popup-box"
- v-if="options.roomType =='开放' && visible"
- >
- <work-overtime
- @component-close-visible="handlePopup"
- @component-get-workTime="getWorkDayTime"
- @component-set-countDown="handlecountDown"
- :visible="visible"
- :localName="officeData.localName"
- :workDayTime="workDayTime"
- :objectId="options.spaceId"
- :countDownTwoMin="countDownTwoMin"
- >
- </work-overtime>
- </div>
- </van-popup>
- <!--场景 - 详情 -->
- <van-popup
- overlay-style="background: rgba(0, 0, 0, 0.4)"
- round
- :show="sceneShow"
- @close="hideScene"
- >
- <!-- 我要离开 -开放办公区 -->
- <work-off
- style="width:560rpx"
- v-if="options.roomType =='开放' && isWorkOff"
- :sceneShow="sceneShow"
- @component-open-sceneShowpop="handleWorkOff"
- >
- </work-off>
- <!--场景 - 详情 -->
- <div
- v-if="options.roomType !='开放'"
- class="scene-popup meet-popup"
- >
- <div class="scene-popup-head">
- <div class="head-imgbg">
- <div class="head-imgbox">
- <image :src="h5StaticPath+sceneDetail.img" />
- </div>
- </div>
- <span class="meet-title">切换至<span class="name">{{sceneDetail.name}}</span>场景</span>
- </div>
- <div class="scene-popup-body">
- <div
- class="body-item"
- v-for="(item,idx) in sceneDetail.textObj"
- :key="idx"
- >
- <span>{{item.text}}</span>
- </div>
- </div>
- <div
- class="btns"
- @click.stop="hideScene"
- >
- <span class="btn btn_com">隐藏</span>
- </div>
- </div>
- </van-popup>
- <van-popup
- overlay-style="background: rgba(0, 0, 0, 0.4);"
- round
- :show="closeAllShow"
- @close="hideCloseAll"
- >
- <div class="scene-popup allclose-popup">
- <div class="scene-popup-head">
- <div class="head-imgbg">
- <div class="head-imgbox">
- <image src="{{h5StaticPath}}scene_visitor.svg" />
- </div>
- </div>
- <div v-show="!closeStatus">请确认办公室已经无人</div>
- <div
- class="head-title"
- v-show="closeStatus&&closeShowNum<5"
- >您工作辛苦了,感谢为低碳事业做出的贡献</div>
- <div v-show="closeShowNum==5">请确认所有门窗已关闭</div>
- </div>
- <div
- class="close-popup-body"
- v-show="closeStatus&&closeShowNum<5"
- >
- <div class="close-item">
- <div class="close-pic">
- <van-icon
- name="passed"
- class="passIcon"
- v-if="closeShowNum!==1"
- />
- <span
- class="pointer"
- v-if="closeShowNum==1"
- ></span>
- </div>
- <span>小飒正关闭办公室内设备 </span>
- </div>
- <div
- class="close-item"
- v-show="closeShowNum==3||closeShowNum==4"
- >
- <div class="close-pic">
- <van-icon
- name="passed"
- class="passIcon"
- v-if="closeShowNum==4"
- />
- <span
- class="pointer"
- v-if="closeShowNum==3"
- ></span>
- </div>
- <span>暂时保留方便您离开的灯光</span>
- </div>
- </div>
- <div class="popup-btns allclose-btns">
- <span
- class="btnspan btn_com"
- v-show="!closeStatus"
- @click="hideCloseAll"
- >取消</span>
- <span
- class="btnspan surespan"
- v-show="!closeStatus"
- @click="sureCloseAll"
- >确认</span>
- <span
- class="btnspan btn_com"
- v-show="closeStatus&&closeShowNum==5"
- @click="hideCloseAll"
- >隐藏</span>
- </div>
- </div>
- </van-popup>
- <div
- id="navId"
- class="navBox"
- v-show="!moveToBottom"
- >
- <div class="eq-nav">
- <div
- v-for="(item,index) in navList"
- :id="item.id"
- @click.stop="selectCrad"
- :key="index"
- class="nav-item"
- :class="{'nav-item-active':navId==index}"
- v-if="!item.noShow"
- >
- <div class="nav-img">
- <image
- mode="widthFix"
- :src="navId == index ? (h5StaticPath+item.activeImg) : (h5StaticPath+item.img)"
- />
- </div>
- <div class="nav-text">{{item.name}}</div>
- </div>
- </div>
- <div
- class="map-nav"
- @tap="toRoom"
- >
- <image
- src="{{h5StaticPath}}mapIcon.png"
- mode="widthFix"
- />
- </div>
- </div>
- </div>
- </template>
- <script>
- import wepy from '@wepy/core';
- import store from '@/store';
- import { mapState, mapActions } from '@wepy/x';
- import moment from 'moment';
- import {
- getSpaceAdjustList,
- getWeather,
- getEquipmentListHttp,
- getMeetingSceneHttp,
- switchoverSceneHttp,
- querySpaceSceneConfigHttp,
- queryCustomAndScence,
- changeDefaultSpace,
- queryEquipmentRunConfig,
- queryProjectConfig,
- queryUserControlInfo,
- querySpaceMeetingInfo
- } from '../../api/officehome.js';
- import {
- getMeetingList,
- reserveMeetingroom,
- endMeetingReserve
- } from '@/api/meetingroom';
- import { isWithinLocation } from '@/service/location';
- import config from '@/config';
- import loadFont from '@/common/loadFont';
- import { getCompanyMapData } from '@/api/home';
- import { saveCompanyConfig } from '@/service/companyConfig';
- import { checkHasUserInfo } from '@/service/user';
- import { checkSpaceControl } from '../common.js';
- // import { floorInfo, defalutSelectedId } from '../intelligentControl/data/map';
- import { getNowDate, getTowNum } from '@/service/meetingTimes';
- import { umaInit } from '../common.js';
- let spaceInfoStatusTimer = null;
- let pageSelectedAreaRecord = {
- // key为楼层ID,value 为spceId
- };
- let defalutSelectedId = '';
- const switchPanelHeight = 125; // 145是下面块的高
- const roomPicTop = 185; // 135是建筑图片的高度 单位都是px
- var moveY;
- let timerTwoMin = null;
- let initListSen = [
- {
- id: 0,
- code: 'DISCUSSING',
- name: '讨论',
- img: 'discuss.svg',
- checked: true,
- textObj: [
- {
- text: '已为您切换至适宜讨论的环境',
- status: 'ok'
- }
- ]
- },
- {
- id: 1,
- code: 'PROJECTING',
- name: '投影',
- img: 'shadow2.svg',
- checked: false,
- textObj: [
- {
- text: '已为您切换至适宜演示的环境',
- status: 'ok'
- }
- ]
- },
- {
- id: 2,
- code: 'ADJOURNMENT',
- name: '散会',
- img: 'beover.svg',
- checked: false,
- textObj: [
- {
- text: '会议室内设备已切换至节能模式',
- status: 'ok'
- }
- ]
- }
- ];
- wepy.page({
- store,
- data: {
- cardWidth: 0, // 动态获取卡片的宽度
- floorFeatItem: {}, // 地暖弹窗数据
- floorHeatData: {
- maxValue: 0,
- minValue: 0,
- len: false
- }, // 地暖数据
- floorfeatVisible: false, // 地暖弹窗
- curtainVisible: false, // 窗帘弹窗
- crutainType: {
- btnArr: [],
- data: [],
- curtainName: '窗帘'
- },
- isControlAll: false, // 所有空间可控否
- isControlSpace: false, // 当前空间可控否
- colourConfig: {}, // 色温设置
- colourVisible: false, // 色温弹窗
- equipmentsConfig: [], // 设备配置
- countDownTwoMin: 120, // 倒计时两分钟
- workDayTime: {}, // 开放办公区 时间
- closeStatus: false, // 点击了关闭确认按钮
- closeShowNum: 0,
- closeAllShow: false,
- airKey: 1,
- lampKey: 1,
- nowScrollY: 0,
- canscroll: true,
- scrollTop: 0,
- realScrollTop: 0,
- transY: 0,
- opacityV: 1,
- transYCopy: 0,
- windowHeightpx: 0,
- viewheight: 'auto',
- startY: 0,
- movesign: false,
- scale: 1,
- moveToTop: true,
- moveToBottom: false,
- // pscrollTop: 0,
- spaceIdProp: '',
- companyIdProp: '',
- preDataFinsh: false,
- selectedFloor: '', // 选择的楼层
- floorInfo: [],
- homePageHasHidden: true,
- h5StaticPath: config.h5StaticPath + '/page-officehome/',
- h5StaticLogo: config.h5StaticPath,
- lampHide: false, // 灯列表收起
- topbgimg: null, // 头部背景
- navFixed: false, // 滑动置顶
- outWeather: {
- temperature: '',
- pm25: '',
- quality: '',
- text: ''
- }, // 室外空气
- showWorkOff: false, // 开放办公室的 提前关闭是否展示
- nextCusStartTime: null, // 第二天服务定制开始时间
- cusStartTime: null, // 当天服务定制-开始时间
- cusEndTime: null, // 当天服务定制-结束时间
- officeData: null,
- headScene: '', // 头部文案
- headImg: '', // 头部背景图片
- options: { roomType: null, spaceId: null }, // 本地数据
- sceneDetail: null,
- popList: [],
- listOffice: [
- {
- id: 0,
- name: '工作',
- code: 'work',
- img: 'scene_work.svg',
- checked: true,
- textObj: [
- {
- text: '办公区灯光已全部为您开启',
- status: 'ok'
- },
- {
- text: '正在将温度调至 26℃',
- status: 'ok'
- },
- {
- text: '窗帘已为您全部打开',
- status: 'ok'
- },
- {
- text: '饮用水已为您准备',
- status: 'ok'
- }
- ]
- },
- {
- id: 1,
- name: '会客',
- code: 'guest',
- img: 'scene_visitor.svg',
- checked: false,
- textObj: [
- {
- text: '会客区照明已为您开启',
- status: 'ok'
- },
- {
- text: '空调已为您切换至会客温度,目标温度24℃',
- status: 'ok'
- },
- {
- text: '窗帘已为您全部开启',
- status: 'ok'
- },
- {
- text: '演示设备已为您准备',
- status: 'ok'
- },
- {
- text: '饮用水已为您准备',
- status: 'ok'
- }
- ]
- },
- {
- id: 2,
- name: '休息',
- code: 'rest',
- img: 'scene_rest.svg',
- checked: false,
- textObj: [
- {
- text: '主灯已关闭,氛围灯将为您开启',
- status: 'ok'
- },
- {
- text: '空调将为您调节至适宜休息的温度,目标温度26℃',
- status: 'ok'
- },
- {
- text: '窗帘已为您全部关闭',
- status: 'ok'
- }
- ]
- }
- ],
- // 上班=ATWORK 讨论=DISCUSSING 投影=PROJECTING 散会=ADJOURNMENT 下班=OFFWORK
- meetingRoomSence: [
- { code: 'DISCUSSING', name: '讨论' },
- { code: 'PROJECTING', name: '演示' },
- { code: 'ADJOURNMENT', name: '散会' }
- ],
- listSen: [
- {
- id: 0,
- code: 'DISCUSSING',
- name: '讨论',
- img: 'scene_work.svg',
- checked: true,
- textObj: [
- {
- text: '已为您切换至适宜讨论的环境',
- status: 'ok'
- }
- // {
- // text: '照明灯光已全部为您开启',
- // status: 'ok'
- // },
- // {
- // text: '演示设备已为您准备',
- // status: 'ok'
- // },
- // {
- // text: '空调已为您开启,目标温度24℃',
- // status: 'ok'
- // }
- ]
- },
- {
- id: 1,
- code: 'PROJECTING',
- name: '演示',
- img: 'scene_visitor.svg',
- checked: false,
- textObj: [
- {
- text: '已为您切换至适宜演示的环境',
- status: 'ok'
- }
- // {
- // text: '主灯已为您关闭,氛围灯为您开启',
- // status: 'ok'
- // },
- // {
- // text: '演示设备已为您开启',
- // status: 'ok'
- // },
- // {
- // text: '空调已为您开启,目标温度24℃',
- // status: 'ok'
- // },
- // {
- // text: '窗帘已为您关闭',
- // status: 'ok'
- // }
- ]
- },
- {
- id: 2,
- code: 'ADJOURNMENT',
- name: '散会',
- img: 'scene_rest.svg',
- checked: false,
- textObj: [
- {
- text: '会议室内设备已切换至节能模式',
- status: 'ok'
- }
- // {
- // text: '照明灯光2min后将全部关闭',
- // status: 'ok'
- // },
- // {
- // text: '演示设备已为您关闭',
- // status: 'ok'
- // },
- // {
- // text: '房间温度将维持26℃',
- // status: 'ok'
- // },
- // {
- // text: '窗帘已为您关闭',
- // status: 'ok'
- // }
- ]
- }
- ],
- roomHasScene: false, // 是否有加班
- listSen: [],
- envlist: [],
- navList: [
- {
- top: 0,
- id: 0,
- code: 'air',
- name: '空调',
- noShow: false,
- img: 'nav_air_3.svg',
- activeImg: 'nav_air_active_3.svg'
- },
- {
- top: 0,
- id: 1,
- code: 'heat',
- name: '地暖',
- noShow: false,
- img: 'nav_feat_3.svg',
- activeImg: 'nav_feat_active_3.svg'
- },
- {
- top: 0,
- id: 2,
- code: 'lamp',
- name: '光照',
- noShow: false,
- img: 'lamp.png',
- activeImg: 'lamp_active.svg'
- },
- {
- top: 0,
- id: 3,
- code: 'curtain',
- name: '窗帘',
- noShow: false,
- img: 'nav_curtain_3.svg',
- activeImg: 'nav_curtain_active_3.svg'
- },
- {
- top: 0,
- id: 4,
- code: 'socket',
- name: '插座',
- noShow: false,
- img: 'nav_socket_un.svg',
- activeImg: 'nav_socket_act.svg'
- },
- {
- top: 0,
- id: 5,
- code: 'noise',
- name: '声压',
- noShow: false,
- img: 'sound.png',
- activeImg: 'sound_active.svg'
- }
- ],
- topBarHeight: 72,
- roomPicTop: roomPicTop,
- stopScrollCheck: false, // 点击导航
- toView: 'inToView',
- navId: 0,
- visible: false,
- sceneShow: false,
- filtermeeting: {}, // 找到该会议室的数据
- helpOrderShow: false, // 显示帮忙预约窗口
- hasOrderShow: false, // 显示已经被预约窗口
- orderMeetTimeStr: null, // 页面显示的预约时间
- endOrderTime: null,
- startOrderTime: null,
- vanPopupIndex: null,
- // 空间设备
- spaceEqFlagObj: {
- hasAir: true, // 有无空调
- hasBlowing: false, // 空调有无 变风量系统
- hasLamp: false, // 有无灯具
- hasSocket: false, // 有无插座
- hasCurtain: false // 有无 窗帘
- },
- // 空调-弹窗
- airSetText: {
- notice: '',
- designTemperature: 0,
- remark: []
- },
- viewOne: '', // 导航条第一个
- airVisible: false, // 弹窗
- currcompanyId: '',
- saveCompanyIdRes: '',
- routeParams: {},
- nowBooking: null,
- visit: false, // 是否是访客
- currentTimeValue: [0, 0],
- isACATVA: false,
- isACATFC: false,
- eightTime: 0,
- sixTime: 0,
- nowTime: new Date().valueOf(),
- isWorkOff: false, // 我要离开 点击否
- bookEquipList: '', // 预约显示的设备
- controlMode: 0,
- userRoleList: []
- },
- computed: {
- ...mapState({
- userInfo: state => state.user.userInfo,
- projectId: state =>
- state.company &&
- state.company.companyConfig &&
- state.company.companyConfig.sagacareProjectId,
- handPopHight: state => state.officehome.handPopHight
- }),
- ...mapActions(['setIsApprovalProject']),
- hasMeetingScene() {
- // 是否展示会议室场景
- let meetingScene =
- this.roomHasScene &&
- this.projectId !== 'Pj1101050038' &&
- this.options.roomType === '会议室' &&
- this.spaceEqFlagObj.hasLamp;
- return meetingScene;
- },
- // 空间受控
- isControl() {
- const can = this.isControlAll || this.isControlSpace;
- return can;
- }
- },
- watch: {
- transY: function(newVal, oldVal) {
- // console.log('transY');
- // 如果在顶部 则可以滑动
- if (newVal < 0) return;
- this.opacityV = 1 - (newVal / 80 > 1 ? 1 : newVal / 80);
- if (newVal == this.transYCopy) {
- this.moveToBottom = true;
- } else {
- this.moveToBottom = false;
- }
- if (newVal == 0) {
- this.canscroll = true;
- } else {
- this.canscroll = false;
- }
- }
- },
- // 加载字体
- onLoad(routeParams) {
- this.getCardWidth();
- this.getConfig();
- umaInit();
- if (!this.homePageHasHidden) return;
- var nowTimeStr = moment().format('YYYY-MM-DD');
- var eightTime = moment(nowTimeStr + ' 20:00:00').valueOf();
- var sixTime = moment(nowTimeStr + ' 05:00:00').valueOf();
- this.sixTime = sixTime;
- this.eightTime = eightTime;
- var _this = this;
- this.routeParams = routeParams;
- // console.log('routeParams', routeParams)
-
- console.log("this.userInfo==",this.userInfo);
- checkHasUserInfo().then(userInfo => {
- if (userInfo) {
- // 获取用户对应的空间信息
- let currcompanyId = routeParams.companyId || this.userInfo.companyId; // 获取当前公司
- let saveCompanyIdRes = wx.getStorageSync('saveCompanyId'); // 获取缓存中公司
- _this.currcompanyId = currcompanyId;
- _this.saveCompanyIdRes = saveCompanyIdRes;
- this.saveCompanyIdM(currcompanyId);
- this.companyIdProp = routeParams.companyId || '';
- if (this.companyIdProp) {
- this.visit = true;
- }
- this.setDefaultSpaceId(currcompanyId); // 给变量赋值
- console.log('userInfo', userInfo, currcompanyId);
- saveCompanyConfig(currcompanyId).then(() => {
- this.preDataFinsh = true;
- let qspaceId = null;
- if (routeParams.q) {
- let queryAll = decodeURIComponent(routeParams.q);
- qspaceId = _this.gup('spaceId', queryAll); // 如果传入了spaceId 扫二维码传入的 链接中携带的
- }
- if (qspaceId) {
- this.spaceIdProp = qspaceId;
- this.options.spaceId = qspaceId;
- this.getData();
- } else if (routeParams.spaceId) {
- // 如果跳转链接 传入的
- this.spaceIdProp = routeParams.spaceId;
- this.options.spaceId = routeParams.spaceId;
- this.getData();
- } else {
- this.getHistorySelectedArea().then(res => {
- this.spaceIdProp = res.spaceId;
- this.options.spaceId = res.spaceId;
- this.getData(); // 获取数据
- });
- }
- // console.log('onLoad');
- this.spaceInfoStatusTimer();
- });
- }
- });
- // 加载字体
- loadFont(400);
- loadFont(500);
- },
- onShow() {
- if (!this.homePageHasHidden) {
- // 这个是从地图搜索回来
- const lastSearchedSpace = wx.getStorageSync('lastSearchedSpace');
- if (lastSearchedSpace) {
- this.spaceIdProp = lastSearchedSpace.spaceId;
- this.options.spaceId = lastSearchedSpace.spaceId;
- this.getData(); // 获取数据
- wx.removeStorageSync('lastSearchedSpace');
- } else {
- console.log('onshow', this.spaceEqFlagObj);
- // 这个是从地图切换按钮回来
- this.getHistorySelectedArea().then(res => {
- this.spaceIdProp = res.spaceId; // 传给子组件
- this.options.spaceId = res.spaceId;
- this.getData(); // 获取数据
- });
- }
- // 2秒测试
- this.spaceInfoStatusTimer();
- }
- },
- onReady() {
- // var scale = 750 / wx.getSystemInfoSync().windowWidth ; // 这是px转rpx 750/ wx.getSystemInfoSync().windowWidth=rpx/px 任何手机都是750rpx
- var windowHeightpx = wx.getSystemInfoSync().screenHeight;
- // 设置初始值 topBarHeight*scale+roomPicTop
- this.transYCopy =
- windowHeightpx - switchPanelHeight - this.topBarHeight - this.roomPicTop; // topBarHeight上顶端的bar
- this.windowHeightpx = windowHeightpx;
- if (this.routeParams.showmap == 'true') {
- this.transY = this.transYCopy;
- // console.log('onready');
- }
- },
- // onPageScroll(t) {
- // this.pscrollTop = t.scrollTop ;
- // if (this.timer) clearTimeout(this.timer)
- // this.timer = setTimeout(() => {
- // this.stopScrollCheck = false ;
- // }, 60) ;
- // this.scrollActive() ;
- // },
- onHide() {
- // this.spaceEqFlagObj = {
- // hasAir: true,
- // hasLamp: false
- // }
- spaceInfoStatusTimer = clearInterval(spaceInfoStatusTimer);
- this.homePageHasHidden = false;
- },
- onUnload() {
- spaceInfoStatusTimer = clearInterval(spaceInfoStatusTimer);
- },
- methods: {
- // 权限
- async getConfig() {
- const isOpenPermission = await this.projectConfig();
- if (isOpenPermission) {
- await this.userControlConfig();
- } else {
- this.isControlAll = true; // 没有开启权限控制,可控所有空间
- }
- },
- checkControl() {
- if (this.isControlAll) return;
- this.isControlAll = false; // 所有空间可控
- this.isControlSpace = false; // 当前空间可控
- // operator项目运营人员身份operator.admin运营管理员operator.regular运营管理
- // 可控全部空间
- for (let i = 0; i < this.userRoleList.length; i++) {
- let item = this.userRoleList[i];
- const has = item.indexOf('operator');
- if (has != '-1') {
- this.isControlAll = true;
- break;
- }
- }
- for (let i = 0; i < this.controlSpaceList.length; i++) {
- let item = this.controlSpaceList[i];
- if (item === this.options.spaceId) {
- this.isControlSpace = true;
- break;
- }
- }
- },
- // 空间控制权限
- userControlConfig() {
- return queryUserControlInfo().then(res => {
- this.userRoleList = res.data.userRoleList || [];
- this.controlSpaceList = res.data.controlSpaceList || [];
- this.checkControl();
- });
- },
- // 会议室控制权限
- spaceMeetingConfig() {
- // 该用户当前时间参会的会议室
- querySpaceMeetingInfo([this.options.spaceId]).then(res => {
- const resArr = res.data || [];
- if (resArr.length) {
- this.isControlSpace = true;
- }
- });
- },
- // 项目控制权限
- projectConfig() {
- // 当前项目是否开启权限控制功能
- return queryProjectConfig().then(res => {
- return res.data.isOpenPermission;
- });
- },
- setCanScroll(val) {
- this.canscroll = val;
- },
- // 地暖弹框
- openFloorFeatPop(val) {
- this.floorfeatVisible = true;
- this.floorFeatItem = val;
- },
- // 地暖 数据
- getFloorHeatData(val) {
- this.floorHeatData = val;
- this.floorHeatData.len = !!val.len;
- this.navList.map(item => {
- if (item.code === 'heat') {
- item.noShow = !val.len;
- }
- });
- },
- // 窗帘-弹窗
- showCurtainPop(val) {
- this.crutainType = JSON.parse(JSON.stringify(val));
- this.curtainVisible = true;
- },
- // 色温弹框
- openColourPop(val) {
- this.colourVisible = true;
- this.colourConfig = val;
- },
- // 空间下设备是否受加班可控
- checkEquipmentConfigStatus() {
- return queryEquipmentRunConfig(this.options.spaceId).then(res => {
- const resArr = res.data;
- this.equipmentsConfig = resArr;
- });
- },
- // 手动 弹窗 展示的设备类型
- dialogShowEquipType(val) {
- this.bookEquipList = val;
- },
- showCurtain(len) {
- this.spaceEqFlagObj.hasCurtain = !!len;
- this.navList.map((item, idx) => {
- if (item.code === 'curtain') {
- item.noShow = !len;
- }
- });
- },
- // 插座
- showSocket(len) {
- this.spaceEqFlagObj.hasSocket = !!len;
- this.navList.map((item, idx) => {
- if (item.code === 'socket') {
- item.noShow = !len;
- }
- });
- },
- showSaveSpace() {
- if (!checkSpaceControl(this.isControl)) return;
- var _this = this;
- if (_this.options.spaceId == _this.userInfo.spaceId) {
- wx.showToast({
- title: '该空间已是您的常驻空间',
- icon: 'none',
- duration: 3000
- });
- } else {
- wx.showModal({
- title: '设置常驻空间',
- content: '将该空间设定为您的常驻空间?',
- confirmText: '确定',
- cancelText: '取消',
- cancelColor: '#c4c4c4',
- success: res => {
- if (res.confirm) {
- changeDefaultSpace(_this.options.spaceId).then(res => {
- var pages = getCurrentPages();
- console.log('res', res, pages);
- _this.userInfo.spaceId = _this.options.spaceId;
- wx.showToast({
- title: '设置成功',
- icon: 'success',
- duration: 3000,
- complete: res => {
- if (pages.length <= 1) {
- wx.redirectTo({ url: '/pages/homev2' });
- } else {
- wx.navigateBack();
- }
- }
- });
- });
- }
- }
- });
- }
- },
- getWorkDayTime() {
- // 获取个人空间使用时间
- return queryCustomAndScence({ spaceId: this.options.spaceId }).then(
- res => {
- this.workDayTime = res;
- }
- );
- },
- vibrateShort() {
- if (wx.canIUse('vibrateShort')) {
- wx.vibrateShort();
- } else {
- wx.vibrateLong();
- }
- },
- showAllClose() {
- if (!checkSpaceControl(this.isControl)) return;
- this.closeAllShow = true;
- this.closeShowNum = 0;
- this.closeStatus = false;
- },
- // 关闭全部关闭弹窗
- hideCloseAll() {
- this.closeAllShow = false;
- // this.closeShowNum=0 ;
- // this.closeStatus=false ;
- },
- // 确认关闭所有设备
- sureCloseAll() {
- this.vibrateShort();
- this.$refs.allclose.controlEquipStatistics();
- this.closeShowNum = 1;
- this.closeStatus = true;
- var interval = setInterval(() => {
- this.closeShowNum++;
- if (this.closeShowNum == 5) {
- clearInterval(interval);
- }
- }, 1800);
- },
- // 空调 - airTemp
- airShowVisible(val) {
- this.airVisible = true;
- this.airSetText = {
- notice: '',
- remark: '',
- designTemperature: ''
- };
- this.airSetText.designTemperature = val.designTemperature; // 目标温度
- this.airSetText.toWhere = val.toWhere;
- },
- airTemp(val) {
- this.airSetText.notice = val.notice;
- if (val.remark && val.remark !== []) {
- const remark = val.remark.split('*');
- this.airSetText.remark = remark;
- }
- },
- gup(name, url) {
- if (!url) url = location.href;
- // name = name.replace(/[\[]/, '\\\[').replace(/[\]]/, '\\\]');
- var regexS = name + '=([^&#]*)';
- var regex = new RegExp(regexS);
- var results = regex.exec(url);
- return results == null ? null : results[1];
- },
- saveCompanyIdM(companyId) {
- wx.setStorage({
- key: 'saveCompanyId',
- data: {
- companyId: companyId
- },
- success: function() {},
- fail: function() {}
- });
- },
- getHistorySelectedArea() {
- var _this = this;
- var spaceId = '';
- return new Promise((resolve, reject) => {
- wx.getStorage({
- key: 'SelectedASpace',
- success: res => {
- if (res.data && res.data.spaceId) {
- if (
- _this.currcompanyId == _this.saveCompanyIdRes.companyId ||
- !_this.saveCompanyIdRes.companyId
- ) {
- // 如果公司id无变化
- spaceId = res.data.spaceId;
- } else {
- // 如果公司id有变化
- if (_this.routeParams.companyId) {
- // 如果是访客 取默认
- spaceId = defalutSelectedId[this.selectedFloor];
- } else {
- // 取用户
- spaceId = _this.userInfo.spaceId;
- }
- }
- }
- console.log(
- 'getHistorySelectedArea',
- _this.currcompanyId,
- _this.saveCompanyIdRes.companyId
- );
- spaceId = spaceId || defalutSelectedId[this.selectedFloor];
- resolve({
- spaceId: spaceId
- });
- },
- fail: () => {
- if (_this.routeParams.companyId) {
- // 如果是访客 取默认
- spaceId = defalutSelectedId[this.selectedFloor];
- } else {
- spaceId = _this.userInfo.spaceId;
- }
- console.log('getHistorySelectedArea22', spaceId);
- resolve({
- spaceId: spaceId
- });
- }
- });
- });
- },
- getnowTime(text) {
- // 头部背景图片
- let now = moment().hours();
- if (text.indexOf('霾') > -1) {
- this.topbgimg = `${this.h5StaticPath}office_smog.jpg`;
- } else {
- if (now >= 6 && now < 19) {
- // 白天
- this.topbgimg = `${this.h5StaticPath}office_bright.jpg`;
- } else {
- // 夜晚
- this.topbgimg = `${this.h5StaticPath}office_night.jpg`;
- }
- }
- },
- async getData() {
- // 获取数据
- await this.getSpaceInfo(); // 空间指数信息
- await this.querySpaceSceneConfig(); // 获取空间场景
- await this.getWorkDayTime(); // 工作组时间
- this.getEquipments(); // 空间下的设备
- this.checkEquipmentConfigStatus();
- this.getWeatherInfo(); // 天气预报
- },
- setDefaultSpaceId(id) {
- let companyId = id;
- getCompanyMapData(companyId).then(res => {
- let CompanyMapData = JSON.parse(res.data);
- this.floorInfo = CompanyMapData.floorInfo;
- this.selectedFloor = CompanyMapData.floorInfo[0].floorId;
- defalutSelectedId = CompanyMapData.defalutSelectedId;
- });
- },
- getEquipments() {
- // 获取空间下设备
- const params = {
- spaceId: this.options.spaceId
- // category: // 设备类。可不填,查询所有。
- };
- getEquipmentListHttp(params).then(res => {
- // equipmentCategory 有 空调 ACATFC、ACATFU、ACATVA、ACATVI;有灯 灯 SELTLT
- // ACATVA 变风量系统
- this.navList.map(item => {
- if (item.code === 'air' || item.code === 'lamp') {
- item.noShow = true;
- }
- });
- this.spaceEqFlagObj.hasAir = false;
- this.spaceEqFlagObj.hasLamp = false;
- (res.data || []).forEach(item => {
- if (item.equipmentCategory === 'ACATVA') {
- this.isACATVA = true; // 如果是嘉铭的ACATVA 则不显示开关
- }
- if (item.equipmentCategory === 'ACATFC') {
- this.isACATFC = true; // 如果是嘉铭的ACATVA 则不显示开关
- }
- if (
- item.equipmentCategory === 'ACATFC' ||
- item.equipmentCategory === 'ACATVA' ||
- item.equipmentCategory === 'ACATVI'
- ) {
- this.spaceEqFlagObj.hasAir = true;
- this.navList.map(item => {
- if (item.code === 'air') {
- item.noShow = false;
- }
- });
- this.airKey++;
- } else if (item.equipmentCategory === 'SELTLT') {
- this.spaceEqFlagObj.hasLamp = true;
- this.navList.map(item => {
- if (item.code === 'lamp') {
- item.noShow = false;
- }
- });
- this.lampKey++;
- }
- });
- });
- },
- switchoverScene(code) {
- // 改变场景(上班.讨论.投影.散会.下班)
- const params = {
- spaceId: this.options.spaceId,
- type: code,
- pubname: config.brsgServer.pubname
- };
- if (this.nowBooking) {
- Object.assign(params, { id: this.nowBooking.id });
- }
- return switchoverSceneHttp(params);
- },
- spaceInfoStatusTimer() {
- spaceInfoStatusTimer = clearInterval(spaceInfoStatusTimer);
- spaceInfoStatusTimer = setInterval(() => {
- this.getSpaceInfo(); // 空间信息
- // this.getWeatherInfo() ;// 天气预报
- }, 20 * 1000); // 2秒描刷接口
- },
- getWeatherInfo() {
- getWeather().then(res => {
- this.outWeather = res.content ? res.content : {};
- var text = this.outWeather.text || '';
- var imgname = 'sun.png';
- this.getnowTime(text); // 头部背景
- if (text.indexOf('晴') > -1) {
- imgname = 'sun.png';
- } else if (text.indexOf('雨') > -1) {
- imgname = 'rain.png';
- } else if (text.indexOf('阴') > -1 || text.indexOf('云') > -1) {
- imgname = 'cloudy.png';
- } else if (text.indexOf('霾') > -1) {
- imgname = 'mai.png';
- } else if (text.indexOf('雾') > -1) {
- imgname = 'fog.png';
- } else if (text.indexOf('风') > -1) {
- imgname = 'wind.png';
- } else if (text.indexOf('雷') > -1) {
- imgname = 'thunder.png';
- }
- this.outWeather.imgname = imgname;
- });
- },
- mapChangeSpaceInfo(spaceId) {
- this.options.spaceId = spaceId;
- this.getData();
- console.log(this.controlSpaceList, '-----this.controlSpaceList---');
- this.checkControl();
- },
- getSpaceInfo() {
- // 空间信息
- var _this = this;
- if (!this.options.spaceId) return;
- const params = {
- criteria: {
- spaceId: this.options.spaceId
- // userId: 391
- },
- pubname: config.brsgServer.pubname,
- openid: this.userInfo.userId
- };
- return getSpaceAdjustList(params).then(res => {
- this.officeData = (res && res.content && res.content[0]) || {};
- this.checkSpaceType(this.officeData.roomFuncType);
- if (res && res.content) {
- res.content.forEach(item => {
- this.controlMode = item.controlMode || 0;
- this.viewOne = this.inToview();
- var envlist = [
- {
- id: 1,
- name: 'CO₂',
- num: '--',
- level: '--',
- funcid: 'CO2',
- code: 'co2'
- },
- {
- id: 2,
- name: 'PM2.5',
- num: '--',
- level: '--',
- funcid: 'PM2d5',
- code: 'pm25'
- },
- {
- id: 3,
- name: '甲醛',
- num: '--',
- level: '--',
- funcid: 'HCHO',
- code: 'jiaquan'
- }
- // { id: 4, name: '湿度', num: '--', level: '--', funcid: 'Tdb,RH', code: 'shidu' }
- // { id: 3, name: 'TVOC', num: 0.4, level: '健康' }
- ];
- if (item.co2 || item.co2 == 0) {
- envlist[0].level = this.checkLevel(item.co2, 'co2').levelTxt;
- envlist[0].num = item.co2;
- } else {
- envlist[0].level = '--';
- envlist[0].num = '--';
- }
- if (item.pm25 || item.pm25 === 0) {
- envlist[1].level = this.checkLevel(item.pm25, 'pm25').levelTxt;
- envlist[1].num = item.pm25;
- } else {
- envlist[1].level = '--';
- envlist[1].num = '--';
- }
- if (item.hcho || item.hcho == 0) {
- envlist[2].level = this.checkLevel(item.hcho, 'hcho').levelTxt;
- envlist[2].num = item.hcho.toFixed(2);
- } else {
- envlist[2].level = '--';
- envlist[2].num = '--';
- }
- if (_this.controlMode == 0) {
- var humidityNum =
- item.humidity || item.humidity == 0
- ? item.humidity.toFixed(0)
- : '--';
- var humidityText =
- item.humidity || item.humidity == 0
- ? this.checkLevel(item.humidity, 'humidity').levelTxt
- : '--';
- var humidityObj = {
- id: 4,
- name: '湿度',
- num: humidityNum,
- level: humidityText,
- funcid: 'Tdb,RH',
- code: 'shidu'
- };
- envlist.push(humidityObj);
- }
- if (_this.controlMode == 1) {
- var temperNum = this.officeData.temperature
- ? this.officeData.temperature
- : '--';
- var temperText = this.officeData.temperature
- ? this.checkLevel(this.officeData.temperature, 'temper')
- .levelTxt
- : '--';
- var tempObj = {
- id: 0,
- name: '温度',
- num: temperNum,
- level: temperText,
- funcid: 'Tdb,RH',
- code: 'wendu'
- };
- envlist.unshift(tempObj);
- }
- // console.log("_this.controlMode", _this.controlMode, envlist) ;
- this.envlist = envlist;
- });
- } else {
- this.envlist = [];
- }
- return 'success';
- });
- },
- getMeetingScene() {
- // 获取当前会议室的场景 OFFWORK
- const params = {
- spaceId: this.options.spaceId
- };
- getMeetingSceneHttp(params).then(res2 => {
- var rescont = res2.content || '';
- if (rescont === 'OFFWORK') {
- rescont = 'ADJOURNMENT';
- }
- var filterArr = this.listSen.filter(function(item) {
- return item.code === rescont;
- });
- // 根据code 获取场景的名字
- this.headScene = (filterArr[0] && filterArr[0].name) || '散会';
- this.vanPopupIndex = rescont;
- });
- },
- querySpaceSceneConfig() {
- // 获取空间场景
- const params = {
- spaceId: this.options.spaceId
- };
- this.roomHasScene = false;
- return querySpaceSceneConfigHttp(params).then(res => {
- if (!res.data) return;
- let sceneArr = res.data;
- this.roomHasScene = true; // 空间有场景
- if (this.options.roomType !== '会议室') return;
- let copyListSen = JSON.parse(JSON.stringify(initListSen));
- this.listSen = JSON.parse(JSON.stringify(initListSen));
- copyListSen.forEach(item => {
- let flag = false;
- let deleteIdx = null;
- sceneArr.forEach((j, idx) => {
- deleteIdx = idx;
- if (item.code === j.sceneType) {
- flag = true;
- }
- });
- if (!flag) {
- this.listSen.splice(deleteIdx, 1);
- }
- });
- this.popList = this.listSen;
- });
- },
- checkSpaceType(roomFuncType) {
- // 空间类型处理
- // const roomFuncType = this.officeData.roomFuncType ; // 空间类型
- if (
- roomFuncType === '311' ||
- roomFuncType === '310' ||
- roomFuncType === '312'
- ) {
- this.options.roomType = '个人';
- this.headImg = 'office_person_2.png';
- this.headScene = '工作';
- } else if (
- roomFuncType === '320' ||
- roomFuncType === '321' ||
- roomFuncType === '322' ||
- roomFuncType === '323'
- ) {
- this.getMeetingScene();
- this.options.roomType = '会议室';
- this.headImg = 'office_normal_2.png';
- } else if (
- roomFuncType === '313' ||
- roomFuncType === '314' ||
- roomFuncType === '315'
- ) {
- this.options.roomType = '开放';
- this.headImg = 'office_publi_2.png';
- } else {
- this.options.roomType = '其它';
- this.headImg = 'office_publi_2.png';
- }
- // 当前空间为会议室,但用户没有所有空间的控制权
- if (this.options.roomType === '会议室' && !this.isControl) {
- this.spaceMeetingConfig();
- }
- },
- hourMiChange(str) {
- // 转为时间 19.3 - 19:30 19.41-19:41 19-19:00
- str = str.toString();
- let newStr = '';
- let dLen = str.length > 2 ? str.split('.')[1].length : str;
- if (dLen === 1) {
- str = str.replace('.', '') + '0';
- newStr = str.slice(0, 2) + ':' + str.slice(2);
- } else if (dLen === 2) {
- str = str.replace('.', '');
- newStr = str.slice(0, 2) + ':' + str.slice(2);
- } else {
- newStr = str + ':00';
- }
- return newStr;
- },
- checkLevel(value, name) {
- let objList = {
- humidity: {
- range: [30, 70],
- text: ['干燥', '健康', '潮湿']
- },
- co2: {
- range: [800, 1000, 1500],
- text: ['健康', '达标', '略高', '超标']
- },
- pm25: {
- range: [35, 75, 115, 150, 250],
- text: ['健康', '良', '轻度污染', '中度污染', '重度污染', '严重污染']
- },
- hcho: {
- range: [0.1],
- text: ['健康', '超标']
- },
- temper: {
- range: [20, 24],
- text: ['偏冷', '舒适', '偏热']
- }
- };
- let sortArr = [value, ...objList[name].range].sort((a, b) => {
- return a - b;
- });
- let level = sortArr.findIndex(item => item === value);
- let levelTxt = objList[name].text[level];
- return { level, levelTxt };
- },
- inToview() {
- let inToViewOne = '';
- if (
- (this.officeData.temperature || this.spaceEqFlagObj.hasAir) &&
- this.controlMode == 0
- ) {
- inToViewOne = '#inToView0';
- }
- if (this.spaceEqFlagObj.hasAir && this.controlMode == 1) {
- inToViewOne = '#inToView02';
- }
- return inToViewOne;
- },
- getCardWidth() {
- // 获取每一个卡片的top height
- var _this = this;
- const query = wx.createSelectorQuery();
- query.select('#inToView4').boundingClientRect();
- return new Promise(function(resolve, reject) {
- query.exec(function(res) {
- const mlr = 20 * 2; // 左右marign
- _this.cardWidth = res[0].width - mlr;
- resolve();
- });
- });
- },
- getCardPosition() {
- // 获取每一个卡片的top height
- var _this = this;
- const query = wx.createSelectorQuery();
- var halfWindowHeightpx = this.windowHeightpx / 2;
- query.select('#roomDetail').boundingClientRect();
- query.select(this.viewOne).boundingClientRect();
- query.select('#inToView5').boundingClientRect();
- query.select('#inToView1').boundingClientRect();
- query.select('#inToView2').boundingClientRect();
- query.select('#inToView3').boundingClientRect();
- query.select('#inToView4').boundingClientRect();
- return new Promise(function(resolve, reject) {
- query.exec(function(res) {
- _this.navList[0].top =
- res[0].height +
- _this.roomPicTop +
- _this.topBarHeight -
- halfWindowHeightpx; // 这个是 与顶部的距离 减去 halfWindowHeightpx 以中间线为基准
- _this.navList[0].height = _this.navList[0].noShow
- ? 0
- : (res[1] && res[1].height) || 0;
- for (let i = 1; i < res.length; i++) {
- _this.dealNav(i, _this, res);
- }
- resolve();
- });
- });
- },
- dealNav(idx, _this, res) {
- if (!_this.navList[idx]) return;
- const pre = idx - 1;
- const preTop = _this.navList[pre].top || 0;
- const next = idx + 1;
- _this.navList[idx].top =
- preTop + 15 + ((res[idx] && res[idx].height) || 0);
- _this.navList[idx].height = _this.navList[idx].noShow
- ? 0
- : (res[next] && res[next].height) || 0;
- },
- async selectCrad(e, nav) {
- let id = e.currentTarget.id;
- if (id === this.navId) return;
- this.navId = id;
- this.lampHide = !this.lampHide; // 当点击了导航 灯的列表要收起
- await this.getCardPosition();
- var targetNav = this.navList.find(function(item) {
- return item.id == id;
- });
- wx.uma.trackEvent(`officeHome_navigation_${targetNav.code}`, {
- key: '环境调节-导航栏'
- });
- this.scrollTop = targetNav.top; // 实现点击导航 滚动
- },
- async scrollEvent(event) {
- // 滚动 选中导航条相应的
- await this.getCardPosition();
- var scrollTop = (event.detail || event.$wx.detail || {}).scrollTop || 0;
- this.realScrollTop = scrollTop;
- // console.log('scrollEvent-scrollTop', this.realScrollTop) ;
- if (scrollTop < this.navList[0].top + this.navList[0].height) {
- this.navId = 0;
- }
- for (let i = 0; i < 8; i++) {
- this.determine(scrollTop, i);
- }
- },
- determine(scrollTop, idx) {
- if (!this.navList[idx]) return;
- const next = idx + 1;
- const nextTop = this.navList[next] ? this.navList[next].top : 0;
- const nextHeight = this.navList[next] ? this.navList[next].height : 0;
- if (
- scrollTop > this.navList[idx].top + this.navList[idx].height &&
- scrollTop < nextTop + nextHeight
- ) {
- this.navId = next;
- }
- },
- scrollToUpper(event) {
- // 到达顶部
- // console.log('scrollToUpper-scrollTop');
- // this.realScrollTop = 0 ;
- },
- // 进入 detail 页
- handleDetail(data) {
- if (!checkSpaceControl(this.isControl)) return;
- data.code &&
- wx.uma.trackEvent(`officeHome_header_${data.code}`, {
- key: '环境调节-空间照片-环境指标'
- });
- wx.navigateTo({
- url: `./detail?spaceId=${this.officeData.id}&funcid=${data.funcid}`
- });
- },
- // 进入地图页
- toRoom() {
- wx.uma.trackEvent('officeHome_navigation_map', {
- key: '环境调节-导航栏-地图'
- });
- // wx.navigateTo({
- // url: `../intelligentControl/home?id=${this.officeData.id}&from=officehome&companyIdProp=${this.companyIdProp}`
- // }) ;
- this.scrollTop = null;
- this.scrollTop = 0;
- this.transY = this.transYCopy;
- },
- handleWorkOff(val) {
- // 我要离开 弹窗展示
- if (val === 'showWorkOff') {
- this.isWorkOff = true;
- this.sceneShow = true;
- return;
- }
- if (val === 'hideWorkOff') {
- this.isWorkOff = false;
- this.sceneShow = false;
- }
- },
- handlecountDown() {
- this.countDownTwoMin = 0;
- clearInterval(timerTwoMin);
- timerTwoMin = null;
- if (this.visible) {
- this.countDownTwoMin = 60 * 2;
- this.getWorkDayTime(); // 获取工作时间
- timerTwoMin = setInterval(() => {
- if (this.countDownTwoMin === 1) {
- this.visible = false;
- this.getWorkDayTime(); // 获取工作时间
- } else {
- this.countDownTwoMin = this.countDownTwoMin - 1;
- }
- }, 1000 * 20);
- } else {
- clearInterval(timerTwoMin);
- timerTwoMin = null;
- this.getWorkDayTime(); // 获取工作时间
- }
- },
- // 调出浮层
- handlePopup(val) {
- if (!this.roomHasScene) return; // 没有加班 不可配置
- this.visible = val;
- if (this.options.roomType == '开放') {
- this.handlecountDown(); // 倒计时两分钟
- wx.uma.trackEvent('officeHome_header_overtime', {
- key: '环境调节-空间照片-加班时间'
- });
- } else if (this.options.roomType == '会议室') {
- wx.uma.trackEvent('officeHome_header_meeting', {
- key: '环境调节-空间照片-会议场景切换'
- });
- }
- },
- handleOrderPopup() {
- this.helpOrderShow = false;
- },
- handleHasPopup() {
- this.hasOrderShow = false;
- },
- orderMeeting() {
- var _this = this;
- var date = getNowDate();
- var startOrderTimeStr =
- date +
- ' ' +
- getTowNum(this.startOrderTime.getHours()) +
- ':' +
- getTowNum(this.startOrderTime.getMinutes()) +
- ':00';
- var endOrderTimeStr =
- date +
- ' ' +
- getTowNum(this.endOrderTime.getHours()) +
- ':' +
- getTowNum(this.endOrderTime.getMinutes()) +
- ':00';
- let params = {
- startTime: startOrderTimeStr,
- endTime: endOrderTimeStr
- };
- console.log('startOrderTimeStr:---------::', startOrderTimeStr);
- console.log('endOrderTimeStr::--------:', endOrderTimeStr);
- return reserveMeetingroom(this.filtermeeting.meeting.id, params).then(
- res => {
- // 进行跳转
- if (res.code == 1) {
- _this.helpOrderShow = false;
- _this.getAlllMeeting();
- }
- },
- res => {
- // 预定失败的时候
- if (res.code == -1) {
- wx.showToast({
- content: res.data,
- duration: 2000
- });
- }
- }
- );
- },
- // 取得所有的会议室
- getAlllMeeting() {
- var _this = this;
- return getMeetingList().then(function(res) {
- // console.log('getMeetingList1111', res) ;
- var allmeeting = [];
- var resdata = res.data;
- for (var key in resdata) {
- var list = (resdata[key] && resdata[key].list) || [];
- allmeeting = allmeeting.concat(list);
- }
- // 找到符合条件的会议室 同一个名字
- var filtermeetingArr = allmeeting.filter(function(item) {
- return item.meeting.name === _this.officeData.localName;
- });
- _this.filtermeeting = filtermeetingArr[0] || {};
- });
- },
- // 释放预约
- async releaseMeeting(name) {
- var _this = this;
- var startTimeArr = [];
- var nowTimeNum = new Date().getTime();
- await this.getAlllMeeting();
- var meetingBooking = _this.filtermeeting.meetingBooking || [];
- // console.log('meetingBooking22', meetingBooking) ;
- var nowBooking = null;
- for (var i = 0; i < meetingBooking.length; i++) {
- var booking = meetingBooking[i];
- var startTimeNum = new Date(
- booking.startTime.replace(/-/g, '/')
- ).getTime();
- var endTimeNum = new Date(booking.endTime.replace(/-/g, '/')).getTime();
- if (nowTimeNum >= startTimeNum && nowTimeNum <= endTimeNum) {
- console.log('在预约的时间段');
- nowBooking = booking;
- break;
- }
- startTimeArr.push(startTimeNum);
- }
- this.nowBooking = nowBooking;
- if (nowBooking && name === '散会') {
- // 如果已经预约
- console.log('nowBooking', nowBooking);
- endMeetingReserve(nowBooking.id).then(function(res) {
- // 结束预约
- console.log('endMeetingReserve', res);
- });
- }
- },
- // 判断是否被预约
- judgeHasOrder() {
- var _this = this;
- var startTimeArr = [];
- var nowTimeNum = new Date().getTime();
- var nowCopy = new Date();
- var meetingBooking = _this.filtermeeting.meetingBooking || [];
- var hasOrder = false;
- for (var i = 0; i < meetingBooking.length; i++) {
- var booking = meetingBooking[i];
- var startTimeNum = new Date(
- booking.startTime.replace(/-/g, '/')
- ).getTime();
- var endTimeNum = new Date(booking.endTime.replace(/-/g, '/')).getTime();
- if (nowTimeNum >= startTimeNum && nowTimeNum <= endTimeNum) {
- // console.log('在预约的时间段');
- hasOrder = true;
- break;
- }
- startTimeArr.push(startTimeNum);
- }
- if (hasOrder) {
- // 如果已经预约
- } else {
- startTimeArr.sort(function(a, b) {
- return a - b;
- });
- // 这是距离最近的 预约时间
- var alreadyStartTimeNum = null;
- for (var j = 0; j < startTimeArr.length; i++) {
- if (startTimeArr[j] > nowTimeNum) {
- alreadyStartTimeNum = startTimeArr[j];
- break;
- }
- }
- // console.log('______alreadyStartTimeNum', alreadyStartTimeNum) ;
- var getMinutesV = nowCopy.getMinutes();
- var setMinuteV = 0;
- if (getMinutesV >= 30) {
- setMinuteV = 30;
- }
- // 设置开始时间
- nowCopy.setMinutes(setMinuteV);
- // 预约开始时间
- _this.startOrderTime = new Date(nowCopy.getTime());
- var endOrderTime = null;
- if (alreadyStartTimeNum === null) {
- // 没有预约时段,帮忙约一个半小时
- nowCopy.setMinutes(setMinuteV + 90);
- endOrderTime = new Date(nowCopy.getTime());
- _this.helpOrderShow = true;
- _this.orderMeetTimeStr =
- getTowNum(endOrderTime.getHours()) +
- ':' +
- getTowNum(endOrderTime.getMinutes());
- } else {
- var gapTime = (alreadyStartTimeNum - nowTimeNum) / 60000;
- if (gapTime < 30) {
- // 小于30分钟,不能帮忙预约
- _this.hasOrderShow = true;
- } else if (gapTime >= 30 && gapTime <= 90) {
- // endOrderTime=alreadyStartTimeNum ;
- // console.log('等于30分钟,帮忙约半个小时');
- // } else if (gapTime <= 60) {
- // endOrderTime=alreadyStartTimeNum ;
- // console.log('小于等于60分钟,帮忙约一个小时');
- // if (gapTime <= 90)
- endOrderTime = new Date(alreadyStartTimeNum);
- // 帮忙约半个小时 1个小时 一个半小时
- _this.helpOrderShow = true;
- _this.orderMeetTimeStr =
- getTowNum(endOrderTime.getHours()) +
- ':' +
- getTowNum(endOrderTime.getMinutes());
- } else {
- nowCopy.setMinutes(setMinuteV + 90);
- endOrderTime = new Date(nowCopy.getTime());
- // console.log('大于90分钟', nowCopy) ;
- _this.helpOrderShow = true;
- _this.orderMeetTimeStr =
- getTowNum(endOrderTime.getHours()) +
- ':' +
- getTowNum(endOrderTime.getMinutes());
- }
- }
- _this.endOrderTime = endOrderTime;
- }
- },
- hideScene() {
- this.sceneShow = false;
- },
- // 调出场景-浮层 切换场景
- handleScene(mitem, idx) {
- if (!checkSpaceControl(this.isControl)) return;
- // this.judgeHasOrder() ;
- isWithinLocation()
- .then(() => {
- var name = mitem.name;
- if (this.helpOrderShow || this.hasOrderShow) return;
- this.visible = false; // 关闭 切换场景
- if (!this.visible) {
- this.sceneShow = !this.sceneShow; // 场景详细信息
- }
- if (this.options.roomType == '个人') {
- wx.uma.trackEvent(`officeHome_personscene_${mitem.code}`, {
- key: '环境调节-个人场景弹窗'
- });
- } else if (this.options.roomType == '会议室') {
- wx.uma.trackEvent(`officeHome_meetingscene_${mitem.code}`, {
- key: '环境调节-会议室场景弹窗'
- });
- }
- this.popList.forEach((item, idx) => {
- if (name === item.name) {
- this.sceneDetail = JSON.parse(JSON.stringify(item));
- this.sceneDetail.textObj = [];
- // 场景切换的对话框动效
- item.textObj.forEach((element, idx) => {
- setTimeout(() => {
- this.sceneDetail.textObj.push(element);
- }, 150 * (idx + 1));
- });
- }
- });
- if (!this.visit) {
- // this.releaseMeeting(name) ;
- }
- // 放在这个位置 是为了 切换场景时直接改变场景 不等待后台
- this.headScene = this.sceneDetail.name;
- this.vanPopupIndex = this.sceneDetail.code;
- this.switchoverScene(this.sceneDetail.code).then(res => {
- if (res.result === 'success') {
- // this.headScene = this.sceneDetail.name
- // this.vanPopupIndex = this.sceneDetail.code
- }
- });
- })
- .catch(() => {});
- console.log('handleScene this.popList', this.popList);
- },
- // 返回 首页
- goPre() {
- if (this.routeParams.q) {
- wx.redirectTo({ url: '/pages/homev2' });
- } else {
- wx.navigateBack();
- }
- },
- setTopBarHeight(height) {
- this.topBarHeight = height;
- },
- touchstart: function(e) {
- var pageY = e.touches[0].pageY;
- var _this = this;
- this.startY = pageY;
- const query = wx.createSelectorQuery();
- // query.selectViewport().scrollOffset() ;//这是page
- // query.select('#scroll-view').boundingClientRect();
- query.select('#scroll-view').scrollOffset();
- query.exec(res => {
- _this.nowScrollY = res[0].scrollTop;
- if (
- (_this.nowScrollY == 0 && _this.transY == 0) ||
- (_this.nowScrollY == 0 && _this.transY == _this.transYCopy)
- ) {
- // 当最顶端 最低端时 才可以滑动
- _this.movesign = true;
- } else {
- _this.movesign = false;
- }
- // console.log('touchstart', this.nowScrollY, this.realScrollTop, this.transY) ;
- });
- },
- touchmove: function(e) {
- if (!this.movesign) return;
- var _this = this;
- // console.log('touchmove', this.nowScrollY, this.realScrollTop, this.transY) ;
- var touch = e.touches[0];
- var pageY = Number(touch.pageY); // 页面触点Y坐标
- moveY = pageY - this.startY;
- this.startY = pageY;
- if (this.nowScrollY > 0 || this.realScrollTop > 0) {
- // 如果是transY为0的情况 发生屏幕滚动 不改变transY的值
- this.transY = 0;
- return;
- }
- var transY = this.transY + moveY;
- if (transY < 0) {
- // transY只能是正的
- transY = 0;
- }
- if (transY > this.transYCopy) {
- transY = this.transYCopy;
- }
- this.transY = transY;
- },
- touchend: function(e) {
- // 挪动到一定区域 则可以自己到固定位置
- var _this = this;
- const query = wx.createSelectorQuery();
- query.select('#scroll-view').scrollOffset();
- query.exec(res => {
- // console.log('touchend', res) ;
- _this.realScrollTop = res[0].scrollTop;
- _this.nowScrollY = res[0].scrollTop;
- // console.log('touchend', this.nowScrollY, this.realScrollTop, this.transY) ;
- if (this.realScrollTop > 0) {
- // 如果是transY为0的情况 手指上移动 也不改变transY的值
- this.transY = 0;
- return;
- }
- if (this.transY < 0) {
- this.transY = 0;
- }
- if (this.transY >= this.transYCopy) {
- this.transY = this.transYCopy;
- }
- if (moveY > 0) {
- // 手指下滑
- if (this.transY <= 60) {
- this.transY = 0;
- } else {
- wx.uma.trackEvent('officeHome_header_move', {
- key: '环境调节-空间照片-下滑动'
- });
- this.transY = this.transYCopy;
- }
- // console.log('下滑下滑下滑下滑xia', this.nowScrollY, this.transY) ;
- } else {
- if (this.transY >= this.transYCopy - 60) {
- this.transY = this.transYCopy;
- } else {
- wx.uma.trackEvent('officeHome_header_moveup', {
- key: '环境调节-空间照片-上滑动'
- });
- this.transY = 0;
- }
- // console.log('上滑上滑上滑', moveY) ;
- }
- this.movesign = false;
- });
- }
- }
- });
- </script>
- <style lang="less">
- page {
- height: 100%;
- background-color: #f7f8fa;
- }
- .map-wrap {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- bottom: 0;
- z-index: 1;
- }
- .pageBottom {
- display: flex;
- align-items: flex-end;
- height: 1000rpx;
- .log-text {
- display: block;
- margin: 0 auto;
- width: 176rpx;
- height: 40rpx;
- padding: 98rpx 0 80rpx;
- }
- }
- /deep/ .van-transition {
- background: red;
- }
- .navFixed {
- position: fixed;
- top: 104rpx;
- left: 0;
- right: 0;
- background: #ffffff;
- }
- .bg-img {
- width: 100%;
- position: absolute;
- top: 0;
- left: 0;
- background: #f7f8fa;
- }
- .roomImgWrap {
- position: absolute;
- left: 0;
- right: 0;
- top: -185px;
- border-top-left-radius: 40rpx;
- border-top-right-radius: 40rpx;
- width: 662rpx;
- height: 185px;
- margin: 0 auto;
- background: #fff;
- padding: 5px 5px 0;
- box-sizing: border-box;
- overflow: hidden;
- .spaceImg {
- width: 32px;
- height: 32px;
- position: absolute;
- top: 14px;
- right: 14px;
- .spimg {
- width: 100%;
- height: 100%;
- }
- }
- .room-img {
- border-top-left-radius: 40rpx;
- border-top-right-radius: 40rpx;
- width: 100%;
- height: 100%;
- }
- }
- .opacityTrans {
- opacity: 0;
- }
- .office-header {
- // display: flex ;
- // justify-content: center ;
- position: absolute;
- z-index: 1;
- background-color: rgba(255, 255, 255, 0.596637);
- width: 42px;
- height: 32px;
- border-radius: 32px;
- margin-left: 10px;
- }
- .office-title {
- position: absolute;
- left: 52px;
- right: 95px;
- bottom: 0;
- padding-left: 18px;
- box-sizing: border-box;
- z-index: 1;
- display: flex;
- // justify-content: center ;
- // align-items: center ;
- line-height: 1;
- font-family: PingFang SC;
- color: #e3e3e3;
- font-size: 12px;
- .weather-img {
- width: 48rpx;
- height: 48rpx;
- margin-right: 10px;
- }
- .weather-text {
- .first-line {
- font-size: 12px;
- margin-bottom: 4px;
- font-weight: 600;
- font-family: Montserrat;
- }
- .second-line {
- font-size: 11px;
- .weatherText {
- display: inline-block;
- min-width: 36px;
- }
- }
- }
- .text {
- margin-right: 7px;
- }
- }
- .my-class:after {
- content: '.';
- display: block;
- height: 0;
- clear: both;
- visibility: hidden;
- }
- .g-fl {
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .g-fl-c {
- flex-direction: column;
- }
- .overflow-wrap {
- width: 100%;
- height: 100%;
- scroll-view {
- position: relative;
- width: 100%;
- height: 100%;
- z-index: 2;
- }
- }
- .overflowclass {
- height: 100%;
- overflow: hidden;
- }
- .move-wrap {
- width: 100%;
- background: #f7f8fa;
- position: relative;
- top: 0;
- left: 0;
- z-index: 2;
- }
- .maproom-detail {
- width: 750rpx;
- margin-left: -45rpx;
- padding: 10rpx 45rpx 0;
- height: 125px;
- position: relative;
- background: #fff;
- border-bottom: 10rpx solid #ffffff;
- box-shadow: 0rpx 0rpx 4rpx rgba(0, 0, 0, 0.07),
- 0px 8rpx 20rpx rgba(0, 0, 0, 0.15);
- box-sizing: border-box;
- border-top-left-radius: 50rpx;
- border-top-right-radius: 50rpx;
- .room-bar {
- width: 64rpx;
- height: 8rpx;
- background: rgba(2, 2, 82, 0.12);
- border-radius: 4rpx;
- margin: 0 auto;
- }
- .room-bg {
- position: relative;
- font-family: PingFang SC;
- font-weight: 600;
- }
- .room-name {
- // position: absolute ;
- width: 100%;
- box-sizing: border-box;
- // padding: 0 30rpx ;
- // height: 100rpx ;
- // line-height: 100rpx ;
- padding: 0 30rpx 10rpx;
- height: 80rpx;
- justify-content: flex-start;
- .room-arrow {
- display: flex;
- .room-scene {
- }
- }
- .open-sence {
- display: flex;
- .btn-off-work {
- position: absolute;
- bottom: 122rpx;
- right: 32rpx;
- width: 128rpx;
- height: 40rpx;
- background: #000000;
- border-radius: 4rpx;
- font-size: 24rpx;
- font-weight: 400;
- line-height: 40rpx;
- text-align: center;
- color: #ffffff;
- font-family: PingFang SC;
- }
- .btn-time {
- font-weight: 600;
- font-size: 20rpx;
- line-height: 28rpx;
- .btn-time-number {
- font-family: Montserrat;
- font-size: 30rpx;
- font-weight: 500;
- line-height: 36rpx;
- padding: 0 8rpx;
- }
- }
- }
- }
- .office-room-info {
- position: relative;
- }
- .room-envlist {
- justify-content: space-around;
- .env-name {
- font-family: Montserrat;
- font-weight: 600;
- font-size: 24rpx;
- line-height: 30rpx;
- color: #c4c4c4;
- }
- .env-num {
- font-family: Montserrat;
- font-size: 48rpx;
- line-height: 58rpx;
- text-align: center;
- color: #1b144e;
- }
- .env-level {
- font-family: PingFang SC;
- font-size: 20rpx;
- line-height: 28rpx;
- color: #bab8c7;
- }
- }
- }
- .office-container {
- width: 662rpx;
- margin: 0 auto;
- }
- .room-detail {
- position: relative;
- width: 100%;
- // height: 450rpx ;
- // background: linear-gradient(to bottom, transparent 50%, #fff 50%);
- background: #ffffff;
- margin-bottom: 15px;
- box-sizing: border-box;
- box-shadow: 0rpx 0rpx 4rpx rgba(0, 0, 0, 0.07),
- 0px 8rpx 20rpx rgba(0, 0, 0, 0.05);
- border-bottom-left-radius: 50rpx;
- border-bottom-right-radius: 50rpx;
- .sceneBox {
- height: 92px;
- box-sizing: border-box;
- border-top: 1px solid rgba(196, 196, 196, 0.4);
- display: flex;
- justify-content: space-around;
- align-items: center;
- padding: 0 40rpx;
- .eachScene {
- width: 180rpx;
- height: 116rpx;
- background: rgba(159, 183, 205, 0.15);
- border-radius: 16px;
- display: flex;
- justify-content: center;
- align-items: center;
- flex-shrink: 0;
- &.selScene {
- background: #ffe723;
- }
- &.firstScene {
- width: auto;
- margin-right: 18rpx;
- flex-grow: 1;
- }
- image {
- width: 40rpx;
- height: 40rpx;
- margin-right: 18rpx;
- }
- }
- }
- .room-bar {
- width: 64rpx;
- height: 8rpx;
- background: rgb(192, 192, 192);
- border-radius: 4rpx;
- margin: 0 auto;
- }
- .room-bg {
- position: relative;
- // height: 100rpx ;
- // margin: 0 0 22rpx 0 ;
- // padding-bottom: 22rpx ;
- padding-top: 10rpx;
- font-family: PingFang SC;
- font-weight: 600;
- }
- .room-name {
- // position: absolute ;
- width: 100%;
- box-sizing: border-box;
- padding: 0 30rpx 10rpx;
- // bottom: 0 ;
- height: 80rpx;
- justify-content: flex-start;
- .room-arrow {
- display: flex;
- .room-scene {
- }
- }
- .open-sence {
- display: flex;
- .btn-off-work {
- position: absolute;
- bottom: 122rpx;
- right: 32rpx;
- width: 128rpx;
- height: 40rpx;
- background: #000000;
- border-radius: 4rpx;
- font-size: 24rpx;
- font-weight: 400;
- line-height: 40rpx;
- text-align: center;
- color: #ffffff;
- font-family: PingFang SC;
- }
- .btn-time {
- font-weight: 600;
- font-size: 20rpx;
- line-height: 28rpx;
- .btn-time-number {
- font-family: Montserrat;
- font-size: 30rpx;
- font-weight: 500;
- line-height: 36rpx;
- padding: 0 8rpx;
- }
- }
- }
- }
- .office-room-info {
- position: relative;
- // background: #fff;
- }
- .room-envlist {
- justify-content: space-around;
- padding-bottom: 32rpx;
- .env-name {
- font-family: Montserrat;
- font-weight: 600;
- font-size: 24rpx;
- line-height: 30rpx;
- color: #c4c4c4;
- }
- .env-num {
- font-family: Montserrat;
- font-size: 48rpx;
- line-height: 58rpx;
- text-align: center;
- color: #1b144e;
- }
- .env-level {
- font-family: PingFang SC;
- font-size: 20rpx;
- line-height: 28rpx;
- color: #bab8c7;
- }
- }
- .room-notice {
- //
- // margin-top: 28rpx ;
- // font-size: 24rpx ;
- // line-height: 24rpx ;
- // color: #e3e3e3;
- // text-align: center ;
- }
- .room-mark {
- position: absolute;
- bottom: -18rpx;
- right: 34rpx;
- .room-mark-img {
- width: 28rpx;
- height: 28rpx;
- }
- }
- }
- .nav-shadow {
- // box-shadow: 0px 8px 10px rgba(0, 0, 0, 0.1) ;
- box-shadow: 0 3px 3px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(0, 0, 0, 0.1);
- }
- // .eq-nav {
- // width: 100% ;
- // padding: 36rpx 0 ;
- // // position: relative ;
- // justify-content: space-around ;
- // .nav-main {
- // font-family: PingFang SC ;
- // color: #bab8c7;
- // font-size: 24rpx ;
- // line-height: 28rpx ;
- // }
- // .nav-main-active {
- // background: #f0da21;
- // }
- // .nav-item {
- // width: 88rpx ;
- // height: 88rpx ;
- // background: #ffffff;
- // border: 1px solid #e7e7e9;
- // border-radius: 44rpx ;
- // box-sizing: border-box ;
- // margin-bottom: 14rpx ;
- // image {
- // width: 44rpx ;
- // height: 44rpx ;
- // }
- // }
- // .navChecked {
- // color: #1b144e;
- // font-weight: 600 ;
- // }
- // .nav-item-active {
- // background: #f0da21;
- // border: 0 ;
- // }
- // }
- .navBox {
- position: fixed;
- bottom: 30px;
- left: 20rpx;
- right: 20rpx;
- z-index: 2;
- height: 96rpx;
- box-sizing: border-box;
- padding: 0 40rpx 0 20rpx;
- border-radius: 96rpx;
- font-size: 28rpx;
- background: #ffffff;
- box-shadow: 0px 0px 2rpx rgba(0, 0, 0, 0.15),
- 0px 8rpx 6rpx rgba(0, 0, 0, 0.07);
- display: flex;
- justify-content: space-between;
- align-items: center;
- .eq-nav {
- flex: 1;
- box-sizing: border-box;
- padding-right: 120rpx;
- display: flex;
- justify-content: space-around;
- .nav-item {
- width: 68rpx;
- .nav-img {
- width: 68rpx;
- height: 68rpx;
- border-radius: 68rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- image {
- width: 40rpx;
- height: 40rpx;
- }
- }
- .nav-text {
- display: none;
- }
- }
- .nav-item-active {
- .nav-img {
- background: #f0da21;
- }
- .nav-text {
- }
- }
- }
- .map-nav {
- width: 40rpx;
- image {
- width: 40rpx;
- height: 40rpx;
- }
- }
- }
- .top-nav {
- position: fixed;
- top: 72px;
- z-index: 4;
- background: #f7f8fa;
- padding: 6rpx 45rpx 0;
- // margin-left: -45rpx ;
- padding-bottom: 10rpx;
- box-sizing: border-box;
- }
- // .room-map {
- // margin-left: 20rpx ;
- // position: fixed ;
- // top: 90% ;
- // left: 0 ;
- // z-index: 2 ;
- // height: 100rpx ;
- // width: 250rpx ;
- // text-align: center ;
- // line-height: 100rpx ;
- // border-radius: 60rpx ;
- // font-size: 28rpx ;
- // background: #ffffff;
- // box-shadow: 0px 0px 2rpx rgba(0, 0, 0, 0.15),
- // 0px 8rpx 6rpx rgba(0, 0, 0, 0.07) ;
- // display: flex ;
- // justify-content: center ;
- // align-items: center ;
- // }
- .popup-box {
- padding: 40rpx 46rpx;
- .popup-container {
- display: flex;
- padding-top: 30rpx;
- .popup-item-bg {
- background: #f0da21;
- }
- .popup-item {
- margin-right: 20rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- border-radius: 32rpx;
- // background: yellow ;
- color: #656872;
- width: 148rpx;
- height: 176rpx;
- image {
- width: 38rpx;
- height: 38rpx;
- }
- label {
- margin-top: 28rpx;
- }
- }
- }
- .time-img {
- }
- }
- .hasOrderPopup {
- width: 460rpx;
- height: 300rpx;
- .hasOrderPopup-head {
- height: 200rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- font-weight: 600;
- }
- .hasOrderPopup-cent {
- height: 100rpx;
- display: flex;
- justify-content: center;
- }
- }
- .orderMeetPopup {
- width: 460rpx;
- height: 560rpx;
- background: linear-gradient(0deg, #fff 720rpx, #f3f3f3 140rpx);
- .orderMeetPopup-head {
- height: 220rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- font-weight: 600;
- }
- .orderMeetPopup-cent {
- height: 210rpx;
- display: flex;
- justify-content: center;
- color: #9d9d9d;
- }
- .orderMeetPopup-bottom {
- display: flex;
- justify-content: center;
- align-items: center;
- .no {
- color: #9d9d9d;
- margin-right: 40rpx;
- }
- .sure {
- }
- }
- }
- .scene-popup {
- width: 520rpx;
- height: 860rpx;
- background: linear-gradient(0deg, #fff 720rpx, #f3f3f3 140rpx);
- &.air-popup {
- width: 560rpx;
- height: 720rpx;
- background: linear-gradient(
- 0deg,
- #fff 580rpx,
- rgba(243, 243, 243, 1) 140rpx
- );
- }
- .scene-popup-head {
- padding-top: 30rpx;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- font-size: 38rpx;
- .head-imgbg {
- display: flex;
- justify-content: center;
- align-items: center;
- width: 140rpx;
- height: 140rpx;
- background: #f0da21;
- border-radius: 50%;
- margin-bottom: 30rpx;
- &.grey {
- background: rgba(196, 196, 196, 1);
- }
- &.blue {
- background: rgba(94, 139, 207, 1);
- }
- &.red {
- background: rgba(229, 87, 79, 1);
- }
- .air-head-imgbox {
- width: 72rpx;
- height: 72rpx;
- image {
- width: 100%;
- height: 100%;
- }
- }
- .head-imgbox {
- width: 40rpx;
- height: 40rpx;
- image {
- width: 100%;
- height: 100%;
- }
- }
- }
- }
- .scene-popup-body {
- display: flex;
- flex-direction: column;
- margin-left: 72rpx;
- margin-top: 50rpx;
- margin-right: 20rpx;
- &.air-popup-body {
- flex-direction: row;
- margin: 0;
- justify-content: center;
- }
- .body-item {
- padding-top: 20rpx;
- font-style: normal;
- font-weight: 500;
- font-size: 30rpx;
- line-height: 42rpx;
- color: #c4c4c4;
- .text-status {
- width: 16rpx;
- height: 16rpx;
- background: #f0da21;
- border-radius: 100%;
- display: inline-block;
- margin-right: 16rpx;
- &.grey {
- background: #f3f3f3;
- }
- }
- &.air-body-item {
- width: 366rpx;
- .air-body-item-num {
- display: flex;
- justify-content: center;
- }
- }
- .air-temp-num {
- font-family: Montserrat;
- font-size: 24px;
- font-weight: 400;
- line-height: 29px;
- color: rgba(20, 0, 80, 1);
- &.arrow-cooling {
- color: #5e8bcf;
- margin: 0 30rpx;
- margin-bottom: 70rpx;
- }
- &.arrow-warn {
- color: rgba(229, 87, 79, 1);
- margin: 0 30rpx;
- margin-bottom: 70rpx;
- }
- }
- .air-temp-load {
- font-size: 26px;
- display: flex;
- justify-content: center;
- }
- .air-notice {
- text-align: center;
- display: flex;
- justify-content: center;
- font-family: PingFang SC;
- font-size: 15px;
- font-weight: 400;
- line-height: 21px;
- color: rgba(77, 82, 98, 1);
- }
- }
- .order-item {
- font-style: normal;
- font-weight: 500;
- font-size: 32rpx;
- line-height: 52rpx;
- color: #c4c4c4;
- .time-span {
- color: #000000;
- font-size: 38rpx;
- }
- }
- }
- }
- .meet-popup {
- height: 580rpx;
- .scene-popup-body {
- margin-left: 0rpx;
- margin-right: 0rpx;
- align-items: center;
- }
- .meet-title {
- color: #c4c4c4;
- .name {
- color: #000000;
- margin-left: 14rpx;
- margin-right: 14rpx;
- }
- }
- }
- .allclose-popup {
- height: auto;
- padding-bottom: 60rpx;
- .scene-popup-head {
- // height: 340rpx ;
- box-sizing: border-box;
- background: linear-gradient(180deg, #f3f3f3 60px, #fff 60px);
- padding-bottom: 80rpx;
- }
- .head-imgbg {
- // margin-bottom: 40rpx ;
- }
- .head-title {
- padding: 0 50rpx;
- text-align: center;
- }
- .close-popup-body {
- padding-left: 72rpx;
- height: 80px;
- box-sizing: border-box;
- padding-right: 20rpx;
- .close-item {
- font-style: normal;
- font-size: 28rpx;
- color: #c4c4c4;
- margin-bottom: 18rpx;
- display: flex;
- .close-pic {
- width: 20px;
- text-align: center;
- }
- .passIcon {
- color: #07c160;
- vertical-align: middle;
- }
- .pointer {
- display: inline-block;
- width: 8px;
- height: 8px;
- border-radius: 8px;
- background: #f0da21;
- }
- }
- .allclose-btns {
- padding-top: 20rpx;
- }
- }
- }
- .order-popup {
- height: 600rpx;
- background: linear-gradient(0deg, #fff 480rpx, #f3f3f3 120rpx);
- }
- .btns {
- display: flex;
- position: absolute;
- bottom: 40rpx;
- left: 50%;
- transform: translateX(-50%);
- .btn {
- width: 240rpx;
- height: 80rpx;
- line-height: 80rpx;
- text-align: center;
- font-size: 28rpx;
- font-weight: 500;
- color: #c4c4c4;
- &.air_btn {
- height: 100rpx;
- width: 176rpx;
- border-radius: 60rpx;
- padding: 34rpx, 60rpx;
- border: 1px solid rgba(196, 196, 196, 1);
- line-height: 100rpx;
- font-family: PingFang SC;
- font-size: 28rpx;
- font-weight: 400;
- color: rgba(77, 82, 98, 1);
- }
- }
- .btn_com {
- border: 1px solid #c4c4c4;
- border-radius: 60rpx;
- }
- }
- .order-btns {
- position: absolute;
- bottom: 40rpx;
- left: 0;
- }
- .popup-btns {
- display: flex;
- width: 100%;
- justify-content: center;
- .btnspan {
- width: 170rpx;
- height: 80rpx;
- line-height: 80rpx;
- text-align: center;
- font-size: 28rpx;
- font-weight: 500;
- color: #c4c4c4;
- box-sizing: border-box;
- }
- .btn_com {
- border: 1px solid #c4c4c4;
- border-radius: 60rpx;
- }
- .surespan {
- margin-left: 26rpx;
- background: #f0da21;
- box-shadow: 0 8rpx 12rpx rgba(0, 0, 0, 0.07);
- color: #000000;
- border-radius: 60rpx;
- }
- }
- </style>
- <config>
- {
- "navigationStyle": "custom",
- backgroundColor: '#f7f8fa',
- usingComponents: {
- "Curtain-Pop":'./Curtain/curtainPop.wpy',
- "Floor-Pop":'./FloorHeating/floorPop.wpy',
- "Floor-Heating":'./FloorHeating/floorHeating',
- "curtain-card":"./Curtain/curtain-card",
- 'has-person':'./components/has-person.wpy',
- 'page-top-bar-custom': '~@/components/common/page-top-bar-custom',
- "work-overtime":"./workOvertime",
- "work-overtime-hand":"./workOvertime-hand",
- "work-off":"./components/work-off",
- "work-scene-hand":"./components/work-scene-hand",
- "work-scene":"./components/work-scene",
- "air-adjust":"./components/air-adjust",
- "air-adjust-hand":"./components/air-adjust-hand",
- "air-feedback":"./components/air-feedback",
- "lamp-adjust":"./components/lamp-adjust",
- "lamp-colour":"./components/lamp-colour",
- "socket-card":"./components/socket-card",
- "all-close":"./components/all-close",
- "voice-adjust":"./components/voice-adjust",
- "map-home":"../intelligentControl/home2",
- "van-icon": "module:@vant/weapp/dist/icon",
- "van-popup": "module:@vant/weapp/dist/popup"
- },
- componentPlaceholder: {
- 'page-top-bar-custom': 'view'
- }
- }
- </config>
|