12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745 |
- <!-- 我的实验室 -->
- <template>
- <view id="laboratoryInfo">
- <view class="name-max-box">
- <view class="title-box">
- <view :style="'border:1rpx solid '+itemData.fiedColor+';background:#fff;color:'+itemData.fiedColor+';'">{{itemData.levelName}}</view>
- <view>{{itemData.name}}</view>
- </view>
- <view class="address-box"><span>{{itemData.typeName}}</span>{{itemData.deptName}}</view>
- <view class="address-box-two">
- <img src="@/images/basicsModules/icon_14.png">
- <view>{{itemData.subAddrrStr}}</view>
- </view>
- </view>
- <view class="sensor-max-box" v-if="itemData.sensorFunctionList.length >0&&!saoCodeType">
- <view class="title-max-box">
- <view class="left-view"></view>
- <view class="right-view">传感器</view>
- </view>
- <view class="text-box">
- <view class="min-box" v-for="(minItem,index2) in itemData.sensorFunctionList" :key="index2">
- <view class="min-min-box">
- <img v-show="minItem.hasWarn" src="@/images/basicsModules/icon_15.png">
- <view :class="{'colorA':minItem.hasWarn}">{{minItem.funcName}}:{{minItem.formatVal?minItem.formatVal:'-'}}</view>
- </view>
- </view>
- </view>
- </view>
- <!-- 一键灭火 -->
- <view class="outfire" v-if='fireType'>
- <view class="outfire_li" v-if="!fireListType">
- <img src="@/images/basicsModules/icon_sy_wt.png">
- <text style="color: #FF7B1A;">设备已离线,请及时处理。</text>
- </view>
- <view class="outfire_li" v-if="fireStartType">
- <img src="@/images/basicsModules/icon_sy_mhwc.png">
- <text style="color: #FF2333;">灭火中,灭火程序将于<text>{{conductCountdown}}</text>秒后结束</text>
- </view>
- <view class="outfire_li" v-if="outfireEnd">
- <img src="@/images/basicsModules/icon_sy_mhwc.png">
- <text style="color: #FF2333;" class="finish">自动灭火完成,请确保在关闭灭火一体机电源后补充灭火耗材,耗材补充完毕需要打开电源并点击一体机上的复位按钮</text>
- </view>
- <template v-if="fireListType && !fireStartType && !outfireEnd">
- <view class="outfire_li">
- <img v-if='!outfireData.smoke' src="@/images/basicsModules/icon_yw_zc.png">
- <img v-if='outfireData.smoke' src="@/images/basicsModules/icon_yw_yc.png">
- <text
- :class="outfireData.smoke?'abnormal':'normal'">{{outfireData.smoke?'有烟雾':'无烟雾'}}</text>
- </view>
- <view class="outfire_li">
- <img v-if='!outfireData.temperature' src="@/images/basicsModules/icon_wd_zc.png">
- <img v-if='outfireData.temperature' src="@/images/basicsModules/icon_wd_yc.png">
- <text
- :class="outfireData.temperature?'abnormal':'normal'">{{outfireData.temperature?'温度异常':'温度正常'}}</text>
- </view>
- <view class="outfire_li">
- <img v-if='!outfireData.fire' src="@/images/basicsModules/icon_hy_zc.png">
- <img v-if='outfireData.fire' src="@/images/basicsModules/icon_hy_yc.png">
- <text :class="outfireData.fire?'abnormal':'normal'">{{outfireData.fire?'发现火焰':'无火焰'}}</text>
- </view>
- </template>
- <view v-if="fireListType && !fireStartType && !outfireEnd"
- :class="fireListType?'outfire_yes_btn':'outfire_no_btn'" @click="outfireFun()">一键灭火
- </view>
- </view>
- <view class="control-max-box" v-if="!saoCodeType">
- <view class="title-max-box">
- <view class="left-view"></view>
- <view class="right-view">智能控制</view>
- </view>
- <view class="button-max-box">
- <view class="button-box">
- <view @click="goVideo()" v-if="itemData.videoNum>0">视频监控</view>
- <view @click="shadeTypeClick()" v-if="trumpetList.length>0">语音广播</view>
- </view>
- <view class="for-button-box" v-for="(minItem,minIndex) in itemData.labHardwareVOList" :key="minIndex" v-if="minItem.hardwareTypeEnum.enumName!='VIDEO_MONITOR' && minItem.hardwareTypeEnum.enumName!='RFID_RECOGNIZER'&& minItem.hardwareTypeEnum.enumName!='AI_TERMINAL'&& minItem.hardwareTypeEnum.enumName!='AI_DOORLOCK'&& minItem.hardwareTypeEnum.enumName!='AI_CABINETLOCK' && minItem.hardwareName!='一键灭火' && minItem.isPcfire != '1'">
- <view class="for-button-p">{{minItem.hardwareName}}<text v-if="minItem.state.code=='3'&& minItem.hardwareTypeEnum.hardwareTypeCode==2">({{minItem.dictLabel}})</text></view>
- <img v-if="minItem.state.code=='3' && minItem.pcType != 1" src="@/images/basicsModules/icon_10.png" @click="hardwareButton(minItem,'close')">
- <img v-if="minItem.state.code=='4' && minItem.pcType != 1" src="@/images/basicsModules/icon_11.png" @click="hardwareButton(minItem,'open')">
- <view class="for-button-p" v-if="minItem.state.code=='0' && minItem.pcType != 1">离线</view>
- <view class="for-button-p" v-if="minItem.state.code=='2' && minItem.pcType != 1" style="color:#0183FA;">在线</view>
- <view v-if="minItem.pcType == 1" class="pcType-button" @click="pcTypeButtonClick(minItem.id)">操作</view>
- </view>
- </view>
- </view>
- <view class="info-max-box">
- <view class="title-max-box" :class="{'title-max-box-none':!infoMaxBoxType}">
- <view class="left-view"></view>
- <view class="right-view">安全信息牌</view>
- <view class="click-view" @click="infoMaxBoxClick">
- <view>{{infoMaxBoxType?'收起':'展开'}}</view>
- <img v-if="infoMaxBoxType" src="@/images/basicsModules/icon_06_1.png">
- <img v-else src="@/images/basicsModules/icon_06.png">
- </view>
- </view>
- <view v-if="infoMaxBoxType">
- <view class="text-max-box">
- <view class="text-min-box">
- <view>责任单位:</view>
- <view>{{itemData.deptName}}</view>
- </view>
- <view class="text-min-box">
- <view>实验室负责人:</view>
- <view>{{itemData.safeInfo.subAdmin[0]?"":"未设置"}}</view>
- </view>
- <view class="text-min-box" v-for="(item,index) in itemData.safeInfo.subAdmin" :key="index">
- <view style="color:#999;">{{item.name}}</view>
- <view>{{item.phone?item.phone:'未填写'}}</view>
- </view>
- <view class="text-min-box">
- <view>安全负责人:</view>
- <view>{{itemData.safeInfo.safeUser[0]?"":"未设置"}}</view>
- </view>
- <view class="text-min-box" v-for="(item,index) in itemData.safeInfo.safeUser" :key="index">
- <view style="color:#999;">{{item.name}}</view>
- <view>{{item.phone?item.phone:'未填写'}}</view>
- </view>
- </view>
- <ivew class="small_title">管控一体机信息</ivew>
- <view class="safety-max-box" v-if="itemData.hazardCategory[0]||itemData.riskMeasure[0]||itemData.outfire[0]">
- <view class="max-for-box" v-if="itemData.hazardCategory[0]">
- <view class="title-box">主要危险类别</view>
- <view class="for-box" v-for="(item,index1) in itemData.hazardCategory" :key="index1">● {{item}}</view>
- </view>
- <view class="max-for-box" v-if="itemData.riskMeasure[0]">
- <view class="title-box">风险防控措施</view>
- <view class="for-box" v-for="(item,index1) in itemData.riskMeasure" :key="index1">● {{item}}</view>
- </view>
- <view class="max-for-box" v-if="itemData.outfire[0]">
- <view class="title-box">灭火要点</view>
- <view class="for-box" v-for="(item,index1) in itemData.outfire" :key="index1">● {{item}}</view>
- </view>
- </view>
- <view class="img-bottom-box" v-if="itemData.safeSigns[0]||itemData.qrCode">
- <view class="title-box">安全警示标识</view>
- <view class="for-box">
- <img class="img-ojb" src="@/pages_manage/images/icon_aqxxp_jzxy.png" v-if="item == 'xiyan'" v-for="(item,index) in itemData.safeSigns" :key="index">
- <img class="img-ojb" src="@/pages_manage/images/icon_aqxxp_jzys.png" v-if="item == 'yinshi'" v-for="(item,index) in itemData.safeSigns" :key="index">
- <img class="img-ojb" src="@/pages_manage/images/icon_aqxxp_dxaq.png" v-if="item == 'anquan'" v-for="(item,index) in itemData.safeSigns" :key="index">
- <img class="img-ojb" src="@/pages_manage/images/icon_aqxxp_gzf.png" v-if="item == 'gongzuofu'" v-for="(item,index) in itemData.safeSigns" :key="index">
- <img class="img-ojb" src="@/pages_manage/images/icon_aqxxp_gbmc.png" v-if="item == 'menchuang'" v-for="(item,index) in itemData.safeSigns" :key="index">
- <img class="img-ojb" src="@/pages_manage/images/icon_aqxxp_gbsd.png" v-if="item == 'shuidian'" v-for="(item,index) in itemData.safeSigns" :key="index">
- </view>
- </view>
- <ivew class="small_title">电子信息牌信息</ivew>
- <view class="safety-max-box" v-if="item.privateList.length>0 && item.classifyType==1" v-for="(item,index) in itemData.classifyList">
- <view class="max-for-box">
- <view class="title-box">{{item.classifyName}}</view>
- <view class="for-box" v-for="(item2,index2) in item.privateList" :key="index2">● {{item2.infoContent}}</view>
- </view>
- </view>
- <view class="img-bottom-box" v-if="item.privateList.length>0 && item.classifyType==2" v-for="(item,index) in itemData.classifyList">
- <view class="title-box">{{item.classifyName}}</view>
- <view class="for-box">
- <img class="img-ojb" :src="baseUrl+item2.infoContent" v-for="(item2,index2) in item.privateList" :key="index2">
- <img v-if="itemData.safeInfo.qrCodeUrl" class="code-img" :src="itemData.safeInfo.qrCodeUrl">
- </view>
- </view>
- </view>
- </view>
- <!-- 一键灭火遮罩-->
- <view class="shade-outfire" v-if="dialogVisible">
- <view class="null-box" @click="dialogOutfire()"></view>
- <view class="shade-outfire-n">
- <img class="shade-outfire-n-t" src="@/images/basicsModules/icon_mh.png" />
- <view class="shade-outfire-n-m">一键灭火启动中,倒计时<text>{{countdown}}</text>秒</view>
- <view class="shade-outfire-n-b" @click="cancelOutfire()">放弃一键灭火</view>
- </view>
- </view>
- <!-- 语音广播-->
- <view class="shade-max-big-box" v-if="broadcastType">
- <view class="null-box" @click="shadeTypeClick()"></view>
- <!-- 语音广播-执行疏散 -->
- <view class="broadcast">
- <view class="broadcast_t">语音广播<label>选择喇叭位置</label></view>
- <!-- 按钮部分 -->
- <view class="trumpet-max-box">
- <view @click="trumpetClick(index)" class="trumpet-for-box"
- :class="item.type?'trumpet-color-a':'trumpet-color-b'" v-for="(item,index) in trumpetList"
- :key="index">
- <img src="@/images/basicsModules/icon_sskz_zc.png" v-if="!item.type">
- <img src="@/images/basicsModules/icon_sskz_xz.png" v-if="item.type">
- {{item.name}}
- </view>
- </view>
- <view class="broadcast_m">
- <view class="broadcast_m_t" :class="liveType?'broadcast_m_t_back_a':'broadcast_m_t_back_b'"
- @longpress.stop="recordButton" @touchmove.stop="cancelButton" @touchend.stop="sendButton">
- {{liveType?'松开发送':'按住说话'}}
- </view>
- <view class="broadcast_m_b" v-if="!liveType">按住说话,录入广播内容</view>
- <view class="broadcast_m_b" v-if="liveType">松开发送,向上滑动取消发送</view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import $mqtt from '@/utils/mqtt.min.js';
- import { config } from '@/api/request/config.js'
- import { mySubjectList,subject_class,listDepartments,mangerControl,getDicts,laboratoryInfo,
- firedeviceStatus,firedeviceStart,firedeviceCancel,controlSwitch,getDeviceListBySub, textParseUrlIps,listData,subjectTriggerModes} from '@/api/apiDemo/index.js'
- export default {
- data() {
- return {
- baseUrl:config.base_url,
- itemData:{
- sensorFunctionList:[],
- },
- //MQTT请求参数-传感器
- mtopic:"lab/function/data",
- //MQTT请求参数-设备
- mtopicOne:"lab/hardware/data",
- msg:"",
- client:{},
- //安全信息牌
- infoMaxBoxType:false,
- subject:[],
- safetyWarning:[],
- hazardCategory:[],
- riskMeasure:[],
- extinguishingKeyPoints:[],
- deptId:"",
- saoCodeType:false,
- countdown: '', //倒计时
- timer2: null, //倒计时
- dialogVisible: false, //一键灭火弹出层
- conductCountdown: '',
- timer3: null, //倒计时
- outfireEnd: false, //灭火结束状态
- //新布局地图相关数据
- zoomData: null,
- mapType:false,
- mapList: [],
- mapWidth: null, //40边框距离
- mapHeight: null, //40边框距离
- //新MQTT
- floorClient: {},
- evacuationTopic: "lab/newexit/line", //疏散
- //灭火设备MQTT相关
- fireClient:{},
- fireTopic:"lab/fireDevice/Warn/",//传感器状态异常
- fireOnlineTopic:"lab/fireDevice/isOnline/",//设备是否在线
- firePerformTopic:"lab/fireDevice/executing/",//是否正在执行灭火操作
- fireType:false,//有无火焰设备状态
- fireListType:false,//灭火设备在线离线
- fireCode:null,// //灭火设备code
- fireStartType:false, //灭火启动状态
- outfireData: {}, //一键灭火
- subId:'',
- broadcastType: false,
- //喇叭数据
- trumpetList: [],
- //广播相关
- liveType: false,
- sendLock: true, //发送锁,当为true时上锁,false时解锁发送
- recorderManager: wx.getRecorderManager(),
- isEvacuate: true, //疏散按钮控制,当为true时候执行疏散
- //滑动记录
- startPoint: {},
- }
- },
- onLoad(option) {
- let self = this;
- if(uni.getStorageSync('saoCodeId')){
- this.saoCodeType = true;
- this.subId=uni.getStorageSync('saoCodeId');
- this.laboratoryInfo();
- }else{
- if(option.q){
- let text = decodeURIComponent(option.q)
- console.log('text',text)
- let codeId = "";
- let newList = text.split("?")[1].split("&")
- let list = newList[0].split("=")[1].split("-")
- codeId = list[0];
- uni.setStorageSync('saoCodeId',codeId)
- this.subId=uni.getStorageSync('saoCodeId');
- this.saoCodeType = true;
- this.laboratoryInfo();
- }else{
- this.deptId = JSON.parse(decodeURIComponent(option.deptId));
- this.itemData = JSON.parse(decodeURIComponent(option.item));
- this.subId=this.itemData.id;
- self.itemData.videoNum = 0;
- self.itemData.hardwareNUM = "";
- for(let i=0;i<self.itemData.labHardwareVOList.length;i++){
- if(self.itemData.labHardwareVOList[i].hardwareTypeEnum.enumName=='VIDEO_MONITOR'){
- self.itemData.hardwareNUM = self.itemData.hardwareNUM+self.itemData.labHardwareVOList[i].hardwareNUM+',';
- self.itemData.videoNum++
- }
- }
- this.itemData.safeUserName = this.itemData.safeInfo.safeUserName
- this.itemData.safePhone = this.itemData.safeInfo.safePhone
- if(this.itemData.safeInfo.hazardCategory){
- this.itemData.hazardCategory = this.itemData.safeInfo.hazardCategory
- }
- if(this.itemData.safeInfo.riskMeasure){
- this.itemData.riskMeasure = this.itemData.safeInfo.riskMeasure
- }
- if(this.itemData.safeInfo.safeSigns){
- this.itemData.safeSigns = this.itemData.safeInfo.safeSigns
- }
- if(this.itemData.safeInfo.outfire){
- this.itemData.outfire = this.itemData.safeInfo.outfire
- }
- if(this.itemData.safeInfo.safeUserNameAdminPhone){
- let list = [];
- let newList = [];
- list = this.itemData.safeInfo.safeUserNameAdminPhone.split(",");
- for(let i=0;i<list.length;i++){
- list[i] = list[i].split("@");
- let obj = {
- name:list[i][0],
- phone:list[i][1]
- }
- newList.push(obj);
- }
- this.itemData.safeInfo.safeUser = newList;
- }
- if(this.itemData.safeInfo.adminNameAndPhone){
- let list = [];
- let newList = [];
- list = this.itemData.safeInfo.adminNameAndPhone.split(",");
- for(let i=0;i<list.length;i++){
- list[i] = list[i].split("@");
- let obj = {
- name:list[i][0],
- phone:list[i][1]
- }
- newList.push(obj);
- }
- this.itemData.safeInfo.subAdmin = newList;
- }
- this.saoCodeType = false;
- }
- }
- this.firedeviceStatus();
- this.getListData();
- if(this.itemData.subAddrr.floorId){
- this.getDeviceListBySub();
- }
- },
- onShow(){
- if(!this.saoCodeType){
- // //监听传感器信息
- getApp().watch(this.getMqttSensorData,'mqttSensorData')
- // //监听设备信息
- getApp().watch(this.getMqttDeviceData,'mqttDeviceData')
- //一键灭火-灭火传感器状态异常
- getApp().watch(this.getMqttfireData,'mqttfireData')
- //一键灭火-是否正在执行灭火操作
- getApp().watch(this.getMqttPerformData,'mqttPerformData')
- }
- },
- methods: {
- shadeTypeClick() {
- this.broadcastType = !this.broadcastType
- },
- //查询控制记录触发方式
- async getListData() {
- let _this = this;
- let obj={
- pageNum:1,
- pageSize:20,
- dictType:'trigger_modes'
- }
- const {data} = await listData(obj)
- if (data.code == 200) {
- this.fanList=data.rows
- }
- },
- //一键灭火-查询设备状态
- async firedeviceStatus() {
- let _this = this;
- const {data} = await firedeviceStatus(_this.subId)
- if (data.code == 200) {
- if(data.data.isexist){//是否有灭火设备
- this.$set(this,'fireType',data.data.isexist);
- if(data.data.online){
- _this.outfireData = data.data
- _this.$set(this,'fireListType',data.data.online);
- _this.$set(this,'fireCode',data.data.fireDevice.deviceCode);
- if(data.data.temperature && data.data.smoke){
- if(!this.fireStartType){
- this.$set(this,'fireStartType',true);
- this.sendCode2(data.data.timeDifference);
- }
- }
- if(data.data.timeDifference != -1){
- if(!this.fireStartType){
- this.$set(this,'fireStartType',true);
- this.sendCode2(data.data.timeDifference);
- }
- }
- }else{
- this.$set(this,'fireListType',false);
- this.$set(this,'fireCode',null);
- }
- }else{
- this.$set(this,'fireType',false);
- }
- this.mqttInfo()
- }
- },
- //启动灭火设备
- async firedeviceStart() {
- let _this = this;
- let obj={
- subjectId:this.subId,
- deviceCode:_this.fireCode
- }
- const {data} = await firedeviceStart(obj)
- if (data.code == 200) {
- if (data.data.online) {
- _this.dialogVisible = true;
- _this.$set(this,'fireListType',data.data.online);
- _this.countdown = data.data.waitTime;//灭火倒计时
- _this.sendCode() //倒计时
- } else {
- wx.showToast({
- title: '一键灭火启动失败!',
- icon: "none",
- duration: 6000
- });
- }
- }
- },
- //取消灭火设备
- async firedeviceCancel() {
- let _this = this;
- const {data} = await firedeviceCancel(_this.itemData.subjectId)
- if (data.code == 200) {
- wx.showToast({
- title: '放弃一键灭火!',
- icon: "none",
- duration: 2000
- });
- }
- },
- //一键灭火按钮
- outfireFun() {
- let _this = this;
- uni.showModal({
- title: "是否确认执行一键灭火?",
- content: '该操作存在风险,请您务必确认实验室内人员已安全撤离?',
- cancelColor: "#999",
- confirmColor: "#0183FA",
- success: function(res) {
- if (res.confirm) {
- _this.firedeviceStart(); //启动灭火设备
- } else if (res.cancel) {
- }
- }
- });
- },
- //一键灭火弹出层关闭
- dialogOutfire() {
- this.dialogVisible = !this.dialogVisible
- this.clearTimer(); //关闭定时器
- },
- //取消一键灭火
- cancelOutfire() {
- this.dialogVisible = false;
- this.clearTimer(); //关闭定时器
- this.firedeviceCancel()
- },
- //倒计时
- sendCode() {
- let _this = this;
- _this.loading(); //启动定时器
- _this.timer2 = setInterval(() => {
- //创建定时器
- if (_this.countdown === 1) {
- _this.clearTimer(); //关闭定时器
- } else {
- _this.loading();
- }
- }, 1000);
- },
- loading() {
- //启动定时器
- this.countdown--; //定时器减1
- },
- clearTimer() {
- //清除定时器
- clearInterval(this.timer2);
- this.timer2 = null;
- this.dialogVisible = false;
- },
- //进行中倒计时
- sendCode2(time) {
- let _this = this;
- _this.conductCountdown=time
- _this.loading2(); //启动定时器
- _this.timer3 = setInterval(() => {
- //创建定时器
- if (_this.conductCountdown <= 1) {
- _this.clearTimer2(); //关闭定时器
- _this.outfireEnd = true; //灭火倒计时结束
- _this.fireStartType = false; //灭火状态
- console.log()
- } else {
- _this.loading2();
- }
- }, 1000);
- },
- loading2() {
- //启动定时器
- this.conductCountdown--; //定时器减1
- },
- clearTimer2() {
- //清除定时器
- clearInterval(this.timer3);
- this.timer3 = null;
- },
- //详情页面MQTT
- mqttInfo(){
- let list = [];
- let obj = {
- type:"lab/function/data",
- idList:[this.itemData.id],
- }
- let objOne = {
- type:"lab/hardware/data",
- idList:[this.itemData.id],
- }
- let objTow = {
- type:"lab/fireDevice/Warn/",
- fireCode:this.fireCode,
- }
- let objThree = {
- type:"lab/fireDevice/isOnline/",
- fireCode:this.fireCode,
- }
- let objFour = {
- type:"lab/fireDevice/executing/",
- fireCode:this.fireCode,
- }
- list.push(obj);
- list.push(objOne);
- list.push(objTow);
- list.push(objThree);
- list.push(objFour);
- // mqtt订阅因为返回数据频率问题 暂时取消列表的MQTT刷新
- getApp().appMqttOn(1,list);
- },
- //查询详情
- async laboratoryInfo(){
- let self = this;
- let id = uni.getStorageSync('saoCodeId');
- const {data} = await laboratoryInfo(id);
- if(data.code == 200){
- uni.removeStorageSync('saoCodeId')
- this.itemData = data.data[0];
- self.itemData.videoNum = 0;
- self.itemData.hardwareNUM = "";
- this.itemData.safeUserName = this.itemData.safeInfo.safeUserName
- this.itemData.safePhone = this.itemData.safeInfo.safePhone
- if(this.itemData.safeInfo.hazardCategory){
- this.itemData.hazardCategory = this.itemData.safeInfo.hazardCategory
- }
- if(this.itemData.safeInfo.riskMeasure){
- this.itemData.riskMeasure = this.itemData.safeInfo.riskMeasure
- }
- if(this.itemData.safeInfo.safeSigns){
- this.itemData.safeSigns = this.itemData.safeInfo.safeSigns
- }
- if(this.itemData.safeInfo.outfire){
- this.itemData.outfire = this.itemData.safeInfo.outfire
- }
- if(this.itemData.safeInfo.safeUserNameAdminPhone){
- let list = [];
- let newList = [];
- list = this.itemData.safeInfo.safeUserNameAdminPhone.split(",");
- for(let i=0;i<list.length;i++){
- list[i] = list[i].split("@");
- let obj = {
- name:list[i][0],
- phone:list[i][1]
- }
- newList.push(obj);
- }
- this.itemData.safeInfo.safeUser = newList;
- }
- if(this.itemData.safeInfo.adminNameAndPhone){
- let list = [];
- let newList = [];
- list = this.itemData.safeInfo.adminNameAndPhone.split(",");
- for(let i=0;i<list.length;i++){
- list[i] = list[i].split("@");
- let obj = {
- name:list[i][0],
- phone:list[i][1]
- }
- newList.push(obj);
- }
- this.itemData.safeInfo.subAdmin = newList;
- }
- this.infoMaxBoxType = true;
- //循环判断如果是排风扇的话,启动的时候是人工还是预案还是定时
- for(let i=0;i<self.itemData.labHardwareVOList.length;i++){
- if(self.itemData.labHardwareVOList[i].hardwareTypeEnum.hardwareTypeCode == '2'){
- for(let b=0;b<self.fanList.length;b++){
- if(self.fanList[b].dictValue==self.itemData.labHardwareVOList[i].triggerModes){
- self.itemData.labHardwareVOList[i].dictLabel=self.fanList[b].dictLabel
- }
- }
- }
- }
- }
- },
- //一键灭火-传感器状态异常
- getMqttfireData(val){
- let self = this;
- if(val){
- //传感器状态
- console.log('传感器状态');
- self.firedeviceStatus();
- }
- },
- //一键灭火-是否正在执行灭火操作
- getMqttPerformData(val){
- let self = this;
- if(val){
- //灭火执行操作
- if(val.fireStatus == 1){
- if(!self.fireStartType){
- self.firedeviceStatus();
- }else if(val.fireStatus == 0){
- uni.showToast({
- title: '一键灭火启动失败',
- icon: "none",
- mask: true,
- duration: 2000
- });
- }
- }
- }
- },
- //点击开关按钮开启的时候充电调用硬件状态
- async subjectTriggerModes(row){
- let self=this;
- const {data} = await subjectTriggerModes(row.id)
- console.log('data',data)
- if(data.code==200){
- for(let b=0;b<self.fanList.length;b++){
- if(self.fanList[b].dictValue==data.data.triggerModes){
- for(let i=0;i<self.itemData.labHardwareVOList.length;i++){
- if(row.id == self.itemData.labHardwareVOList[i].id){
- this.$set(self.itemData.labHardwareVOList[i],'dictLabel',self.fanList[b].dictLabel);
- this.$set(self.itemData.labHardwareVOList[i],'triggerModes',data.data.triggerModes);
- }
- }
- }
- }
- }
- },
- //监听传感器信息
- getMqttSensorData(val){
- console.log('传感器',val)
- let self = this;
- if(val.subId){
- if(self.itemData.id == val.subId){
- self.$set(self.itemData,'sensorFunctionList',val.functionStatuses);
- }
- }
- },
- //监听设备信息
- getMqttDeviceData(val){
- let self = this;
- console.log('页面获取的-设备信息',val)
- for(let i=0;i<val.length;i++){
- for(let k=0;k<self.itemData.labHardwareVOList.length;k++){
- if(val[i].num == self.itemData.labHardwareVOList[k].id){
- if(val[i].hardwareOperate == 'CLOSE'){
- self.itemData.labHardwareVOList[k].state.code = 4;
- }else if(val[i].hardwareOperate == 'OPEN'){
- self.itemData.labHardwareVOList[k].state.code = 3;
- self.itemData.labHardwareVOList[k].state.code = 3;
- }else if(val[i].hardwareOperate == 'OFFLINE'){
- self.itemData.labHardwareVOList[k].state.code = 0;
- }else if(val[i].hardwareOperate == 'ONLINE'){
- self.itemData.labHardwareVOList[k].state.code = 2;
- }
- if(self.itemData.labHardwareVOList[k].hardwareTypeEnum.hardwareTypeCode == '2' && self.itemData.labHardwareVOList[k].pcType == '0'){
- self.subjectTriggerModes(self.itemData.labHardwareVOList[k])
- }
- }
- }
- }
- },
- infoMaxBoxClick(){
- this.infoMaxBoxType = !this.infoMaxBoxType;
- },
- async getSafetyWarning(){
- const {data} = await getDicts('sys_safety_warning');
- if(data.code == 200){
- this.safetyWarning = data.data;
- }
- },
- async getHazardCategory(){
- const {data} = await getDicts('sys_hazard_category');
- if(data.code == 200){
- this.hazardCategory = data.data;
- }
- },
- async getRiskMeasure(){
- const {data} = await getDicts('sys_risk_measure');
- if(data.code == 200){
- this.riskMeasure = data.data;
- }
- },
- async getExtinguishingKeyPoints(){
- const {data} = await getDicts('sys_extinguishing_key_points');
- if(data.code == 200){
- this.extinguishingKeyPoints = data.data;
- }
- },
- //MQTT订阅-传感器
- subscriptionMQTT(){
- let self = this;
- const mqttOptions = {
- keepalive: 30,
- clean: false,//保留会话
- connectTimeout: 5000, // 超时时间
- reconnectPeriod:5000, // 重连间隔
- clientId: 'lab/function/data',
- username: uni.getStorageSync('mqttUser'),
- password: uni.getStorageSync('mqttPassword'),
- }
- const connectUrl = uni.getStorageSync('mqttUrl');
- this.client = $mqtt.connect('wxs://' + connectUrl, mqttOptions);
- this.client.on('connect', () => {
- // 这是为了给自己发条消息,其它无作用
- this.client.subscribe(this.mtopic, (err) => {
- if (!err) {
- console.log("订阅传感器成功",this.mtopic)
- }
- })
- this.client.subscribe(this.mtopicOne, (err) => {
- if (!err) {
- console.log("订阅设备成功",this.mtopicOne)
- }
- })
- });
- // 自动重连
- this.client.on('reconnect', (msg) => {
- console.log('reconnect', msg)
- });
- // 错误
- this.client.on('error', () => {
- console.log('error')
- });
- // 断开
- this.client.on('end', () => {
- console.log('end')
- });
- // 掉线
- this.client.on('offline', (msg) => {
- console.log('offline',msg)
- });
- // 收到消息
- this.client.on('message', (topic, message) => {
- let data = JSON.parse(message)
- console.log('topic',topic)
- console.log('data',data)
- if(topic == this.mtopic){
- if(data.data.subId){
- if(self.itemData.id == data.data.subId){
- self.$set(self.itemData,'sensorFunctionList',data.data.functionStatuses);
- }
- }
- }else if(topic == this.mtopicOne){
- for(let i=0;i<data.data.length;i++){
- for(let k=0;k<self.itemData.labHardwareVOList.length;k++){
- if(data.data[i].num == self.itemData.labHardwareVOList[k].id){
- if(data.data[i].hardwareOperate == 'CLOSE'){
- self.itemData.labHardwareVOList[k].state.code = 4;
- }else if(data.data[i].hardwareOperate == 'OPEN'){
- self.itemData.labHardwareVOList[k].state.code = 3;
- }else if(data.data[i].hardwareOperate == 'OFFLINE'){
- self.itemData.labHardwareVOList[k].state.code = 0;
- }else if(data.data[i].hardwareOperate == 'ONLINE'){
- self.itemData.labHardwareVOList[k].state.code = 2;
- }
- }
- }
- }
- }
- })
- // 全局监听是否有关闭mqtt的消息的事件
- uni.$on('closeMqtt',() => {
- this.client.end(true); // 主动断开连接
- })
- },
- //取消订阅关闭MQTT连接
- offMQTT(){
- this.client.unsubscribe(this.mtopic, error => {
- if (error) {
- console.log('Unsubscribe error', error)
- }
- })
- this.client.end();
- this.client = {};
- },
- pcTypeButtonClick(id){
- let self = this;
- uni.showModal({
- content: '确认要操作该设备吗?',
- cancelColor:"#999",
- confirmColor:"#0183FA",
- success: function (res) {
- if (res.confirm) {
- self.controlSwitch(id);
- console.log('用户点击确定');
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- },
- async controlSwitch(id){
- const {data} = await controlSwitch({id:id});
- if(data.code == 200){
- uni.showToast({
- title: '操作成功',
- icon:"none",
- mask:true,
- duration: 2000
- });
- }
- },
- //设备开关按钮
- hardwareButton(minItem,command){
- let self = this;
- let text = '';
- if(command == 'close'){
- text = '关闭';
- }else if(command == 'open'){
- text = '开启';
- }
- uni.showModal({
- content: '确认要'+text+'吗?',
- cancelColor:"#999",
- confirmColor:"#0183FA",
- success: function (res) {
- if (res.confirm) {
- self.mangerControl(minItem,command);
- console.log('用户点击确定');
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- },
- //设备开关
- async mangerControl(minItem,command){
- let obj = {
- id:minItem.id,
- command:command,
- };
- const {data} = await mangerControl(obj);
- if(data.code == 200){
- if(command == 'open'){
- minItem.type = 3;
- }else if(command == 'close'){
- minItem.type = 4;
- }
- uni.showToast({
- title: '操作成功',
- icon:"none",
- mask:true,
- duration: 2000
- });
- }
- },
- //获取喇叭列表
- async getDeviceListBySub() {
- let _this=this;
- let obj = {
- subId: _this.subId,
- floorId: _this.itemData.subAddrr.floorId,
- page: 1,
- pageSize: 100,
- };
- const {
- data
- } = await getDeviceListBySub(obj)
- if (data.code == 200) {
- for (let i = 0; i < data.data.length; i++) {
- data.data[i].type = false;
- }
- this.$set(this, 'trumpetList', data.data)
- }
- },
- //点击选择喇叭
- trumpetClick(index) {
- this.trumpetList[index].type = !this.trumpetList[index].type
- },
- //录制
- recordButton(e) {
- console.log("按下")
- let self = this;
- let num = 0;
- for (let i = 0; i < self.trumpetList.length; i++) {
- if (self.trumpetList[i].type) {
- num++
- }
- }
- if (num == 0) {
- uni.showToast({
- title: '请选择喇叭',
- icon: "none",
- mask: true,
- duration: 2000
- });
- return
- }
- this.liveType = true;
- console.log('录制', e)
- this.startPoint = e.touches[0]; //记录长按时开始点信息,后面用于计算上划取消时手指滑动的距离。
- const options = {
- duration: 10000,
- sampleRate: 16000,
- numberOfChannels: 1,
- encodeBitRate: 48000,
- format: 'mp3',
- frameSize: 50
- }
- this.recorderManager.start(options); //开始录音
- this.recorderManager.onStart(() => {
- console.log('recorder start')
- })
- this.recorderManager.onError((res) => {
- console.log(res);
- })
- wx.showToast({
- title: "正在录音,上划取消发送",
- icon: "none",
- duration: 60000 //先定义个60秒,后面可以手动调用wx.hideToast()隐藏
- });
- this.sendLock = false; //长按时是不上锁的。
- },
- //取消
- cancelButton(e) {
- console.log("移动")
- let self = this;
- let num = 0;
- for (let i = 0; i < self.trumpetList.length; i++) {
- if (self.trumpetList[i].type) {
- num++
- }
- }
- if (num == 0) {
- return
- }
- this.liveType = false;
- console.log('取消', e)
- let moveLenght = e.touches[e.touches.length - 1].clientY - this.startPoint.clientY; //移动距离
- if (Math.abs(moveLenght) > 50) {
- wx.showToast({
- title: "松开手指,取消发送",
- icon: "none",
- duration: 60000
- });
- this.sendLock = true; //触发了上滑取消发送,上锁
- } else {
- wx.showToast({
- title: "正在录音,上划取消发送",
- icon: "none",
- duration: 60000
- });
- this.sendLock = false; //上划距离不足,依然可以发送,不上锁
- }
- },
- //发送
- sendButton(e) {
- console.log("松开")
- let self = this;
- let num = 0;
- for (let i = 0; i < self.trumpetList.length; i++) {
- if (self.trumpetList[i].type) {
- num++
- }
- }
- if (num == 0) {
- return
- }
- this.liveType = false;
- console.log('发送', e)
- wx.hideToast(); //结束录音、隐藏Toast提示框
- this.recorderManager.stop(); //结束录音
- this.recorderManager.onStop((res) => {
- if (!this.sendLock) {
- console.log('1', this.recorderManager)
- this.uploadImg(res.tempFilePath);
- }
- console.log('停止录音', res.tempFilePath)
- console.log("sendLock", this.sendLock);
- })
- },
- //上传MP3
- async uploadImg(tempFilePaths) {
- var self = this;
- uni.uploadFile({
- url: config.base_url + '/base/file/upload', //仅为示例,非真实的接口地址
- header: {
- 'Authorization': uni.getStorageSync('token')
- },
- filePath: tempFilePaths,
- name: 'file',
- formData: {
- 'user': 'test'
- },
- success: (uploadFileRes) => {
- let res = JSON.parse(uploadFileRes.data);
- if (res.code == 200) {
- console.log("上传成功", res)
- self.textParseUrlIps(config.base_url + '/' + res.data.url);
- } else {
- uni.showToast({
- title: res.msg,
- icon: "none",
- mask: true,
- duration: 2000
- });
- }
- },
- fail: err => {
- uni.hideLoading()
- },
- complete: () => {}
- });
- },
- //发送语音
- async textParseUrlIps(text) {
- let self = this;
- let newList = [];
- for (let i = 0; i < self.trumpetList.length; i++) {
- if (self.trumpetList[i].type) {
- let obj = {
- sn: self.trumpetList[i].deviceSn,
- port: self.trumpetList[i].port,
- deviceIp: self.trumpetList[i].deviceIp,
- type: "",
- name: "",
- speed: "",
- params: {
- tid: "",
- vol: self.trumpetList[i].deviceVol,
- urls: []
- }
- };
- newList.push(obj);
- }
- }
- const {
- data
- } = await textParseUrlIps(newList, text)
- if (data.code == 200) {
- uni.showToast({
- title: '发送成功',
- icon: "none",
- mask: true,
- duration: 2000
- });
- }
- },
- goVideo(){
- this.itemData.floorId = this.itemData.subAddrr.floorId;
- uni.navigateTo({
- url:'/pages_manage/laboratory/monitor?item='+encodeURIComponent(JSON.stringify(this.itemData))+'&deptId='+this.deptId
- })
- },
- goWord(){
- uni.navigateTo({
- url:'/pages_manage/laboratory/word?item='+encodeURIComponent(JSON.stringify(this.itemData))
- })
- },
- },
- onHide(){
- // //删除传感器监听
- getApp().deleteSensorWatch();
- // //删除设备监听
- getApp().deleteDeviceWatch();
- //删除一键灭火-传感器状态
- getApp().deletefireData();
- //删除一键灭火-设备是否在线
- getApp().deleteOnlineData();
- //删除一键灭火-是否正在执行灭火
- getApp().deletePerformData();
- },
- beforeDestroy(){
- // //删除传感器监听
- getApp().deleteSensorWatch();
- // //删除设备监听
- getApp().deleteDeviceWatch();
- //删除一键灭火-传感器状态
- getApp().deletefireData();
- //删除一键灭火-设备是否在线
- getApp().deleteOnlineData();
- //删除一键灭火-是否正在执行灭火
- getApp().deletePerformData();
- }
- }
- </script>
- <style lang="stylus" scoped>
- #laboratoryInfo{
- height:100%;
- display flex;
- flex-direction column;
- .small_title{
- padding: 0 20rpx;
- font-size: 34rpx;
- }
- /* 语音广播 */
- .shade-max-big-box {
- height: 100%;
- width: 100%;
- position: fixed;
- display: flex;
- flex-direction: column;
- z-index: 10;
- background: rgba(0, 0, 0, 0.2);
- .null-box {
- flex: 1;
- }
- /* 语音广播-执行疏散 */
- .broadcast {
- width: 100%;
- // height: 532rpx;
- background: #FFFFFF;
- border-top-left-radius: 20rpx;
- border-top-right-radius: 20rpx;
- padding:22rpx 30rpx 30rpx;
- box-sizing: border-box;
- margin-top: 20rpx;
- .broadcast_t {
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #333333;
- line-height: 30rpx;
- >label {
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- line-height: 30rpx;
- margin-left: 16rpx;
- }
- }
- .trumpet-max-box {
- display: flex;
- justify-content: flex-start;
- margin-top: 22rpx;
- flex-wrap: wrap;
- .trumpet-for-box {
- display: inline-block;
- width: auto;
- height: 60rpx;
- line-height: 60rpx;
- font-size: 24rpx;
- text-align: center;
- cursor: pointer;
- overflow: hidden;
- border: 1rpx solid #E0E0E0;
- border-radius: 10rpx;
- color: #E0E0E0;
- display: flex;
- justify-content: center;
- margin-right: 20rpx;
- margin-bottom: 10rpx;
- padding: 0 12rpx;
- box-sizing: border-box;
- >img {
- width: 36rpx;
- height: 34rpx;
- margin: 12rpx 20rpx 0 25rpx;
- }
- }
- .trumpet-color-a {
- border: 1px solid #0183FA;
- color: #0183FA;
- }
- .trumpet-color-b {
- border: 1px solid #CCCCCC;
- color: #999;
- }
- }
- .broadcast_m {
- width: 100%;
- .broadcast_m_t {
- width: 142rpx;
- height: 142rpx;
- margin: 30rpx 0 0 258rpx;
- position: relative;
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 500;
- line-height: 170rpx;
- text-align: center;
- >img {
- width: 142rpx;
- height: 142rpx;
- position: absolute;
- }
- >label {
- width: 100%;
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #0183FA;
- line-height: 24rpx;
- display: inline-block;
- text-align: center;
- position: absolute;
- top: 76rpx;
- }
- /* 按下 */
- .press_color {
- color: #FFFFFF;
- }
- /* 松开 */
- .slip_color {
- color: #0183FA;
- }
- }
- .broadcast_m_t_back_a {
- background: url(@/images/basicsModules/icon_sskz_skfs.png);
- background-size: 100%;
- color: #FFFFFF;
- }
- .broadcast_m_t_back_b {
- background: url(@/images/basicsModules/icon_sskz_azsh.png);
- background-size: 100%;
- color: #0183FA;
- }
- .broadcast_m_b {
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- line-height: 24rpx;
- text-align: center;
- margin-top: 14rpx;
- }
- }
- /* 疏散按钮 */
- .evacuation-button-box {
- width: 650rpx;
- height: 100rpx;
- background: #0183FA;
- color: #fff;
- text-align center;
- line-height: 100rpx;
- font-size: 28rpx;
- margin: 88rpx auto 0;
- border-radius: 20rpx;
- }
- }
- }
- /* 一键灭火 */
- .outfire {
- width: 750rpx;
- height: auto;
- background: #FFFFFF;
- margin: 20rpx 0;
- padding: 20rpx 10rpx;
- box-sizing: border-box;
- display: flex;
- justify-content: space-between;
- align-items: center;
- .outfire_li {
- display: flex;
- justify-content: flex-start;
- //align-items: center;
- >img {
- width: 24rpx;
- height: 30rpx;
- margin-right: 12rpx;
- margin-top: 8rpx;
- }
- .finish{
- flex: 1;
- }
- .normal {
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #333333;
- }
- .abnormal {
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #F11C00;
- }
- }
- .outfire_li:nth-of-type(1) {
- >img {
- width: 30rpx;
- height: 28rpx;
- margin-right: 12rpx;
- }
- }
- .outfire_yes_btn {
- width: 120rpx;
- height: 40rpx;
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #F21C00;
- line-height: 40rpx;
- border: 1px solid #F21C00;
- border-radius: 8rpx;
- text-align: center;
- margin-left: 54rpx;
- }
- .outfire_no_btn {
- width: 120rpx;
- height: 40rpx;
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #CCCCCC;
- line-height: 40rpx;
- border: 1px solid #E0E0E0;
- border-radius: 8rpx;
- text-align: center;
- margin-left: 54rpx;
- }
- }
- /* 一键灭火 */
- .shade-outfire {
- height: 100%;
- width: 100%;
- position: fixed;
- display: flex;
- flex-direction: column;
- z-index: 10;
- background: rgba(0, 0, 0, 0.2);
- .null-box {
- flex: 1;
- }
- .shade-outfire-n {
- width: 625rpx;
- height: 450rpx;
- background: #FFFFFF;
- border-radius: 20rpx;
- position: absolute;
- top: 370rpx;
- left: 62rpx;
- .shade-outfire-n-t {
- width: 172rpx;
- height: 172rpx;
- margin: 38rpx 0 0 226rpx;
- }
- .shade-outfire-n-m {
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #E30000;
- line-height: 84rpx;
- text-align: center;
- border-bottom: 1px solid #E0E0E0;
- >text {
- font-size: 40rpx;
- }
- }
- .shade-outfire-n-b {
- width: 402rpx;
- height: 82rpx;
- background: #FFFFFF;
- border: 2rpx solid #0183FA;
- border-radius: 10rpx;
- font-size: 28rpx;
- line-height: 82rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #0183FA;
- text-align: center;
- margin: 30rpx 0 0 112rpx;
- }
- }
- }
- .name-max-box{
- background #fff
- .title-box{
- margin:20rpx 20rpx 0;
- display flex
- view:nth-child(1){
- height:40rpx;
- line-height:40rpx;
- font-size:20rpx;
- border-radius:10rpx;
- padding:0 20rpx;
- color:#fff;
- margin-right:20rpx;
- }
- view:nth-child(2){
- line-height:42rpx;
- font-size:30rpx;
- color:#0183FA;
- max-width:600rpx;
- flex:1;
- }
- img{
- width:12rpx;
- height:20rpx;
- margin-top:11rpx;
- }
- .colorA{
- background:#aa2315;
- }
- .colorB{
- background:#ff9b09;
- }
- .colorC{
- background:#3ea3e9;
- }
- .colorD{
- background:#3ea34c;
- }
- }
- .address-box{
- margin:20rpx 20rpx;
- font-size:26rpx;
- color:#999999;
- span{
- margin-right:60rpx;
- }
- }
- .address-box-two{
- display flex
- margin:0 20rpx 20rpx 20rpx;
- img{
- width:28rpx;
- height:30rpx;
- margin-right:18rpx;
- }
- view{
- line-height:30rpx;
- font-size:24rpx;
- color:#999999;
- }
- }
- }
- .title-max-box-none{
- border:none!important;
- }
- .title-max-box{
- display flex
- height:80rpx;
- border-bottom:1rpx solid #E0E0E0;
- .left-view{
- width: 4rpx;
- height: 34rpx;
- margin:25rpx 24rpx 0 20rpx;
- background:#0D97EB;
- }
- .right-view{
- line-height:80rpx;
- font-size: 30rpx;
- color: #333333;
- flex:1;
- }
- .click-view{
- display flex
- padding:0 20rpx;
- view{
- line-height:80rpx;
- font-size: 24rpx;
- color: #666666;
- }
- img{
- width:20rpx;
- height:10rpx;
- margin:35rpx 0 0 20rpx;
- }
- }
- }
- .sensor-max-box{
- background #fff
- margin-top:20rpx;
- .text-box{
- /*border-top:1rpx dashed #e0e0e0;*/
- /*border-top:1rpx solid #E0E0E0;*/
- padding:0 20rpx;
- /*
- overflow-x:scroll;
- overflow-y:hidden;
- white-space: nowrap;
- */
- .min-box{
- display inline-block
- /*padding:0 30rpx 0 10rpx;*/
- width:355rpx;
- .min-min-box{
- display: flex
- img{
- width:30rpx;
- height:27rpx;
- margin-top:24rpx;
- margin-right:10rpx;
- }
- view{
- line-height:74rpx;
- text-align center
- font-size:28rpx;
- color:#333;
- }
- .colorA{
- color:#EE3A3A;
- }
- }
- }
- }
- }
- .control-max-box{
- background #fff
- margin-top:20rpx;
- .button-max-box{
- .button-box:last-child{
- border:none!important;
- }
- .button-box{
- display flex
- border-bottom:1rpx solid #e0e0e0;
- margin:0 20rpx;
- view{
- width:200rpx;
- line-height:70rpx;
- border: 2rpx solid #0183FA;
- border-radius: 35rpx;
- color: #0183FA;
- font-size: 24rpx;
- text-align center;
- margin:30rpx 0 30rpx 0;
- }
- view:nth-child(1){
- margin-right: 18rpx;
- }
- view:nth-child(2){
- }
- }
- .for-button-box:last-child{
- border:none!important;
- }
- .for-button-box{
- display flex
- border-bottom:1rpx solid #e0e0e0;
- margin:0 20rpx;
- .for-button-p{
- flex:1;
- line-height:90rpx;
- color:#333333;
- font-size:28rpx;
- >text{
- font-size: 28rpx;
- color: #0183FA;
- }
- }
- img{
- height:50rpx;
- width:100rpx;
- margin:20rpx 0 20rpx 0;
- }
- view:nth-child(2){
- text-align right
- color:#999;
- }
- .pcType-button{
- width:120rpx;
- line-height:42rpx;
- border:4rpx solid #0183FA;
- border-radius:30rpx;
- color: #0183FA !important;
- font-size: 24rpx;
- text-align center !important;
- margin:20rpx 0 20rpx 0;
- }
- }
- }
- }
- .info-max-box{
- background #fff
- margin-top:20rpx;
- .top-name-max-box{
- background #fff
- overflow hidden
- .name-box{
- margin:27rpx 20rpx 0;
- display:flex;
- view:nth-child(1){
- background:#f95f5f;
- color:#fff;
- border-radius:6rpx;
- font-size:20rpx;
- padding:0 10rpx;
- height:42rpx;
- line-height:42rpx;
- }
- view:nth-child(2){
- color:#333;
- margin-left:20rpx;
- font-size:28rpx;
- height:30rpx;
- line-height:42rpx;
- font-weight:700;
- }
- }
- .address-box{
- margin:22rpx 20rpx;
- font-size:26rpx;
- }
- }
- .text-max-box{
- background #fff
- padding:8rpx 20rpx;
- border-bottom:1rpx solid #e0e0e0;
- margin-bottom: 20rpx;
- .text-min-box{
- display:flex;
- view{
- line-height:66rpx;
- height:66rpx;
- font-size:28rpx;
- }
- view:nth-child(1){
- width:220rpx;
- color:#333;
- }
- view:nth-child(2){
- flex:1;
- color:#999;
- text-align:right;
- }
- }
- }
- .safety-max-box{
- background #fff
- padding:8rpx 20rpx;
- .max-for-box{
- .title-box{
- line-height:76rpx;
- font-size:30rpx;
- color:#333;
- }
- .for-box{
- line-height:48rpx;
- font-size:28rpx;
- color:#999;
- }
- }
- }
- .img-bottom-box{
- margin-top:20rpx;
- background #fff
- padding:8rpx 20rpx 20rpx;
- border-bottom: 1rpx solid #e0e0e0;
- margin-bottom: 20rpx;
- .title-box{
- line-height:76rpx;
- font-size:28rpx;
- color:#333;
- }
- .for-box{
- line-height:48rpx;
- font-size:26rpx;
- color:#999;
- .img-ojb{
- display inline-block
- width:86rpx;
- height:114rpx;
- margin-left:30rpx;
- }
- .code-img{
- width:200rpx;
- height:200rpx;
- margin:20rpx auto 40rpx;
- }
- }
- }
- }
- }
- </style>
|