laboratoryInfo.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787
  1. <!-- 我的实验室 -->
  2. <template>
  3. <view id="laboratoryInfo">
  4. <view class="name-max-box">
  5. <view class="title-box">
  6. <view :style="'border:1rpx solid '+itemData.fiedColor+';background:#fff;color:'+itemData.fiedColor+';'">{{itemData.levelName}}</view>
  7. <view>{{itemData.name}}</view>
  8. </view>
  9. <view class="address-box"><span>{{itemData.typeName}}</span>{{itemData.deptName}}</view>
  10. <view class="address-box-two">
  11. <img src="@/images/icon_14.png">
  12. <view>{{itemData.subAddrrStr}}</view>
  13. </view>
  14. </view>
  15. <view class="sensor-max-box" v-if="itemData.sensorFunctionList[0]&&!saoCodeType">
  16. <view class="title-max-box">
  17. <view class="left-view"></view>
  18. <view class="right-view">传感器</view>
  19. </view>
  20. <view class="text-box">
  21. <view class="min-box" v-for="(minItem,index2) in itemData.sensorFunctionList" :key="index2">
  22. <view class="min-min-box">
  23. <img v-show="minItem.hasWarn" src="@/images/icon_15.png">
  24. <view :class="{'colorA':minItem.hasWarn}">{{minItem.describe}}:{{minItem.formatVal?minItem.formatVal:'-'}}</view>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. <view class="control-max-box" v-if="!saoCodeType">
  30. <view class="title-max-box">
  31. <view class="left-view"></view>
  32. <view class="right-view">智能控制</view>
  33. </view>
  34. <view class="button-max-box">
  35. <view class="button-box" v-if="itemData.videoNum>0">
  36. <view>视频监控</view>
  37. <view @click="goVideo()">查看</view>
  38. </view>
  39. <view class="button-box">
  40. <view>语音播报</view>
  41. <view @click="goWord()">播放文字</view>
  42. </view>
  43. <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'">
  44. <view>{{minItem.hardwareName}}</view>
  45. <img v-if="minItem.state.code=='3'" src="@/images/icon_10.png" @click="hardwareButton(minItem,'close')">
  46. <img v-if="minItem.state.code=='4'" src="@/images/icon_11.png" @click="hardwareButton(minItem,'open')">
  47. <view v-if="minItem.state.code=='0'">离线</view>
  48. <view v-if="minItem.state.code=='2'" style="color:#0183FA;">在线</view>
  49. </view>
  50. </view>
  51. </view>
  52. <view class="info-max-box">
  53. <view class="title-max-box" :class="{'title-max-box-none':!infoMaxBoxType}">
  54. <view class="left-view"></view>
  55. <view class="right-view">安全信息牌</view>
  56. <view class="click-view" @click="infoMaxBoxClick">
  57. <view>{{infoMaxBoxType?'收起':'展开'}}</view>
  58. <img v-if="infoMaxBoxType" src="@/images/icon_06_1.png">
  59. <img v-else src="@/images/icon_06.png">
  60. </view>
  61. </view>
  62. <view v-if="infoMaxBoxType">
  63. <view class="text-max-box">
  64. <view class="text-min-box">
  65. <view>责任单位:</view>
  66. <view>{{itemData.deptName}}</view>
  67. </view>
  68. <view class="text-min-box">
  69. <view>实验室负责人:</view>
  70. <view>{{itemData.safeInfo.subAdmin[0]?"":"未设置"}}</view>
  71. </view>
  72. <view class="text-min-box" v-for="(item,index) in itemData.safeInfo.subAdmin" :key="index">
  73. <view style="color:#999;">{{item.name}}</view>
  74. <view>{{item.phone?item.phone:'未填写'}}</view>
  75. </view>
  76. <view class="text-min-box">
  77. <view>安全负责人:</view>
  78. <view>{{itemData.safeInfo.safeUser[0]?"":"未设置"}}</view>
  79. </view>
  80. <view class="text-min-box" v-for="(item,index) in itemData.safeInfo.safeUser" :key="index">
  81. <view style="color:#999;">{{item.name}}</view>
  82. <view>{{item.phone?item.phone:'未填写'}}</view>
  83. </view>
  84. </view>
  85. <view class="safety-max-box" v-if="itemData.hazardCategory[0]||itemData.riskMeasure[0]||itemData.outfire[0]">
  86. <view class="max-for-box" v-if="itemData.hazardCategory[0]">
  87. <view class="title-box">主要危险类别</view>
  88. <view class="for-box" v-for="(item,index1) in itemData.hazardCategory" :key="index1">● {{item}}</view>
  89. </view>
  90. <view class="max-for-box" v-if="itemData.riskMeasure[0]">
  91. <view class="title-box">风险防控措施</view>
  92. <view class="for-box" v-for="(item,index1) in itemData.riskMeasure" :key="index1">● {{item}}</view>
  93. </view>
  94. <view class="max-for-box" v-if="itemData.outfire[0]">
  95. <view class="title-box">灭火要点</view>
  96. <view class="for-box" v-for="(item,index1) in itemData.outfire" :key="index1">● {{item}}</view>
  97. </view>
  98. </view>
  99. <view class="img-bottom-box" v-if="itemData.safeSigns[0]||itemData.qrCode">
  100. <view class="title-box">安全警示标识</view>
  101. <view class="for-box">
  102. <img class="img-ojb" src="@/images/icon_aqxxp_jzxy.png" v-if="item == 'xiyan'" v-for="(item,index) in itemData.safeSigns" :key="index">
  103. <img class="img-ojb" src="@/images/icon_aqxxp_jzys.png" v-if="item == 'yinshi'" v-for="(item,index) in itemData.safeSigns" :key="index">
  104. <img class="img-ojb" src="@/images/icon_aqxxp_dxaq.png" v-if="item == 'anquan'" v-for="(item,index) in itemData.safeSigns" :key="index">
  105. <img class="img-ojb" src="@/images/icon_aqxxp_gzf.png" v-if="item == 'gongzuofu'" v-for="(item,index) in itemData.safeSigns" :key="index">
  106. <img class="img-ojb" src="@/images/icon_aqxxp_gbmc.png" v-if="item == 'menchuang'" v-for="(item,index) in itemData.safeSigns" :key="index">
  107. <img class="img-ojb" src="@/images/icon_aqxxp_gbsd.png" v-if="item == 'shuidian'" v-for="(item,index) in itemData.safeSigns" :key="index">
  108. <img v-if="itemData.safeInfo.qrCode" class="code-img" :src="itemData.safeInfo.qrCode">
  109. </view>
  110. </view>
  111. </view>
  112. </view>
  113. </view>
  114. </template>
  115. <script>
  116. import $mqtt from '@/utils/mqtt.min.js';
  117. import { config } from '@/api/request/config.js'
  118. import { mySubjectList,subject_class,listDepartments,mangerControl,getDicts,laboratoryInfo } from '@/api/index.js'
  119. export default {
  120. data() {
  121. return {
  122. itemData:{},
  123. //MQTT请求参数-传感器
  124. mtopic:"lab/function/data",
  125. //MQTT请求参数-设备
  126. mtopicOne:"lab/hardware/data",
  127. msg:"",
  128. client:{},
  129. //安全信息牌
  130. infoMaxBoxType:false,
  131. subject:[],
  132. safetyWarning:[],
  133. hazardCategory:[],
  134. riskMeasure:[],
  135. extinguishingKeyPoints:[],
  136. deptId:"",
  137. saoCodeType:false,
  138. }
  139. },
  140. onLoad(option) {
  141. let self = this;
  142. if(uni.getStorageSync('saoCodeId')){
  143. this.saoCodeType = true;
  144. this.laboratoryInfo();
  145. }else{
  146. if(option.q){
  147. let text = decodeURIComponent(option.q)
  148. console.log('text',text)
  149. let codeId = "";
  150. let newList = text.split("?")[1].split("&")
  151. let list = newList[0].split("=")[1].split("-")
  152. codeId = list[0];
  153. uni.setStorageSync('saoCodeId',codeId)
  154. this.saoCodeType = true;
  155. this.laboratoryInfo();
  156. }else{
  157. this.deptId = JSON.parse(decodeURIComponent(option.deptId));
  158. this.itemData = JSON.parse(decodeURIComponent(option.item));
  159. self.itemData.videoNum = 0;
  160. self.itemData.hardwareNUM = "";
  161. for(let i=0;i<self.itemData.labHardwareVOList.length;i++){
  162. if(self.itemData.labHardwareVOList[i].hardwareTypeEnum.enumName=='VIDEO_MONITOR'){
  163. self.itemData.hardwareNUM = self.itemData.hardwareNUM+self.itemData.labHardwareVOList[i].hardwareNUM+',';
  164. self.itemData.videoNum++
  165. }
  166. }
  167. this.itemData.safeUserName = this.itemData.safeInfo.safeUserName
  168. this.itemData.safePhone = this.itemData.safeInfo.safePhone
  169. if(this.itemData.safeInfo.hazardCategory){
  170. this.itemData.hazardCategory = this.itemData.safeInfo.hazardCategory
  171. }
  172. if(this.itemData.safeInfo.riskMeasure){
  173. this.itemData.riskMeasure = this.itemData.safeInfo.riskMeasure
  174. }
  175. if(this.itemData.safeInfo.safeSigns){
  176. this.itemData.safeSigns = this.itemData.safeInfo.safeSigns
  177. }
  178. if(this.itemData.safeInfo.outfire){
  179. this.itemData.outfire = this.itemData.safeInfo.outfire
  180. }
  181. if(this.itemData.safeInfo.safeUserNameAdminPhone){
  182. let list = [];
  183. let newList = [];
  184. list = this.itemData.safeInfo.safeUserNameAdminPhone.split(",");
  185. for(let i=0;i<list.length;i++){
  186. list[i] = list[i].split("@");
  187. let obj = {
  188. name:list[i][0],
  189. phone:list[i][1]
  190. }
  191. newList.push(obj);
  192. }
  193. this.itemData.safeInfo.safeUser = newList;
  194. }
  195. if(this.itemData.safeInfo.adminNameAndPhone){
  196. let list = [];
  197. let newList = [];
  198. list = this.itemData.safeInfo.adminNameAndPhone.split(",");
  199. for(let i=0;i<list.length;i++){
  200. list[i] = list[i].split("@");
  201. let obj = {
  202. name:list[i][0],
  203. phone:list[i][1]
  204. }
  205. newList.push(obj);
  206. }
  207. this.itemData.safeInfo.subAdmin = newList;
  208. }
  209. this.saoCodeType = false;
  210. }
  211. }
  212. },
  213. onShow(){
  214. if(!this.saoCodeType){
  215. // //监听传感器信息
  216. getApp().watch(this.getMqttSensorData,'mqttSensorData')
  217. // //监听设备信息
  218. getApp().watch(this.getMqttDeviceData,'mqttDeviceData')
  219. }
  220. },
  221. methods: {
  222. //查询详情
  223. async laboratoryInfo(){
  224. let self = this;
  225. let id = uni.getStorageSync('saoCodeId');
  226. const {data} = await laboratoryInfo(id);
  227. if(data.code == 200){
  228. uni.removeStorageSync('saoCodeId')
  229. this.itemData = data.data[0];
  230. self.itemData.videoNum = 0;
  231. self.itemData.hardwareNUM = "";
  232. this.itemData.safeUserName = this.itemData.safeInfo.safeUserName
  233. this.itemData.safePhone = this.itemData.safeInfo.safePhone
  234. if(this.itemData.safeInfo.hazardCategory){
  235. this.itemData.hazardCategory = this.itemData.safeInfo.hazardCategory
  236. }
  237. if(this.itemData.safeInfo.riskMeasure){
  238. this.itemData.riskMeasure = this.itemData.safeInfo.riskMeasure
  239. }
  240. if(this.itemData.safeInfo.safeSigns){
  241. this.itemData.safeSigns = this.itemData.safeInfo.safeSigns
  242. }
  243. if(this.itemData.safeInfo.outfire){
  244. this.itemData.outfire = this.itemData.safeInfo.outfire
  245. }
  246. if(this.itemData.safeInfo.safeUserNameAdminPhone){
  247. let list = [];
  248. let newList = [];
  249. list = this.itemData.safeInfo.safeUserNameAdminPhone.split(",");
  250. for(let i=0;i<list.length;i++){
  251. list[i] = list[i].split("@");
  252. let obj = {
  253. name:list[i][0],
  254. phone:list[i][1]
  255. }
  256. newList.push(obj);
  257. }
  258. this.itemData.safeInfo.safeUser = newList;
  259. }
  260. if(this.itemData.safeInfo.adminNameAndPhone){
  261. let list = [];
  262. let newList = [];
  263. list = this.itemData.safeInfo.adminNameAndPhone.split(",");
  264. for(let i=0;i<list.length;i++){
  265. list[i] = list[i].split("@");
  266. let obj = {
  267. name:list[i][0],
  268. phone:list[i][1]
  269. }
  270. newList.push(obj);
  271. }
  272. this.itemData.safeInfo.subAdmin = newList;
  273. }
  274. this.infoMaxBoxType = true;
  275. }
  276. },
  277. //监听传感器信息
  278. getMqttSensorData(val){
  279. let self = this;
  280. if(val.subId){
  281. if(self.itemData.id == val.subId){
  282. self.$set(self.itemData,'sensorFunctionList',val.functionStatuses);
  283. }
  284. }
  285. },
  286. //监听设备信息
  287. getMqttDeviceData(val){
  288. let self = this;
  289. // console.log('页面获取的-设备信息',val)
  290. for(let i=0;i<val.length;i++){
  291. for(let k=0;k<self.itemData.labHardwareVOList.length;k++){
  292. if(val[i].num == self.itemData.labHardwareVOList[k].id){
  293. if(val[i].hardwareOperate == 'CLOSE'){
  294. self.itemData.labHardwareVOList[k].state.code = 4;
  295. }else if(val[i].hardwareOperate == 'OPEN'){
  296. self.itemData.labHardwareVOList[k].state.code = 3;
  297. }else if(val[i].hardwareOperate == 'OFFLINE'){
  298. self.itemData.labHardwareVOList[k].state.code = 0;
  299. }else if(val[i].hardwareOperate == 'ONLINE'){
  300. self.itemData.labHardwareVOList[k].state.code = 2;
  301. }
  302. }
  303. }
  304. }
  305. },
  306. infoMaxBoxClick(){
  307. this.infoMaxBoxType = !this.infoMaxBoxType;
  308. },
  309. async getSafetyWarning(){
  310. const {data} = await getDicts('sys_safety_warning');
  311. if(data.code == 200){
  312. this.safetyWarning = data.data;
  313. }
  314. },
  315. async getHazardCategory(){
  316. const {data} = await getDicts('sys_hazard_category');
  317. if(data.code == 200){
  318. this.hazardCategory = data.data;
  319. }
  320. },
  321. async getRiskMeasure(){
  322. const {data} = await getDicts('sys_risk_measure');
  323. if(data.code == 200){
  324. this.riskMeasure = data.data;
  325. }
  326. },
  327. async getExtinguishingKeyPoints(){
  328. const {data} = await getDicts('sys_extinguishing_key_points');
  329. if(data.code == 200){
  330. this.extinguishingKeyPoints = data.data;
  331. }
  332. },
  333. //MQTT订阅-传感器
  334. subscriptionMQTT(){
  335. let self = this;
  336. const mqttOptions = {
  337. keepalive: 30,
  338. clean: false,//保留会话
  339. connectTimeout: 5000, // 超时时间
  340. reconnectPeriod:5000, // 重连间隔
  341. clientId: 'lab/function/data',
  342. username: config.username,
  343. password: config.password,
  344. }
  345. const connectUrl = config.mqtt_url;
  346. this.client = $mqtt.connect('wxs://' + connectUrl, mqttOptions);
  347. this.client.on('connect', () => {
  348. // 这是为了给自己发条消息,其它无作用
  349. this.client.subscribe(this.mtopic, (err) => {
  350. if (!err) {
  351. console.log("订阅传感器成功",this.mtopic)
  352. }
  353. })
  354. this.client.subscribe(this.mtopicOne, (err) => {
  355. if (!err) {
  356. console.log("订阅设备成功",this.mtopicOne)
  357. }
  358. })
  359. });
  360. // 自动重连
  361. this.client.on('reconnect', (msg) => {
  362. console.log('reconnect', msg)
  363. });
  364. // 错误
  365. this.client.on('error', () => {
  366. console.log('error')
  367. });
  368. // 断开
  369. this.client.on('end', () => {
  370. console.log('end')
  371. });
  372. // 掉线
  373. this.client.on('offline', (msg) => {
  374. console.log('offline',msg)
  375. });
  376. // 收到消息
  377. this.client.on('message', (topic, message) => {
  378. let data = JSON.parse(message)
  379. console.log('topic',topic)
  380. console.log('data',data)
  381. if(topic == this.mtopic){
  382. if(data.data.subId){
  383. if(self.itemData.id == data.data.subId){
  384. self.$set(self.itemData,'sensorFunctionList',data.data.functionStatuses);
  385. }
  386. }
  387. }else if(topic == this.mtopicOne){
  388. for(let i=0;i<data.data.length;i++){
  389. for(let k=0;k<self.itemData.labHardwareVOList.length;k++){
  390. if(data.data[i].num == self.itemData.labHardwareVOList[k].id){
  391. if(data.data[i].hardwareOperate == 'CLOSE'){
  392. self.itemData.labHardwareVOList[k].state.code = 4;
  393. }else if(data.data[i].hardwareOperate == 'OPEN'){
  394. self.itemData.labHardwareVOList[k].state.code = 3;
  395. }else if(data.data[i].hardwareOperate == 'OFFLINE'){
  396. self.itemData.labHardwareVOList[k].state.code = 0;
  397. }else if(data.data[i].hardwareOperate == 'ONLINE'){
  398. self.itemData.labHardwareVOList[k].state.code = 2;
  399. }
  400. }
  401. }
  402. }
  403. }
  404. })
  405. // 全局监听是否有关闭mqtt的消息的事件
  406. uni.$on('closeMqtt',() => {
  407. this.client.end(true); // 主动断开连接
  408. })
  409. },
  410. //取消订阅关闭MQTT连接
  411. offMQTT(){
  412. this.client.unsubscribe(this.mtopic, error => {
  413. if (error) {
  414. console.log('Unsubscribe error', error)
  415. }
  416. })
  417. this.client.end();
  418. this.client = {};
  419. },
  420. //设备开关按钮
  421. hardwareButton(minItem,command){
  422. let self = this;
  423. let text = '';
  424. if(command == 'close'){
  425. text = '关闭';
  426. }else if(command == 'open'){
  427. text = '开启';
  428. }
  429. uni.showModal({
  430. content: '确认要'+text+'吗?',
  431. cancelColor:"#999",
  432. confirmColor:"#0183FA",
  433. success: function (res) {
  434. if (res.confirm) {
  435. self.mangerControl(minItem,command);
  436. console.log('用户点击确定');
  437. } else if (res.cancel) {
  438. console.log('用户点击取消');
  439. }
  440. }
  441. });
  442. },
  443. //设备开关
  444. async mangerControl(minItem,command){
  445. let obj = {
  446. id:minItem.id,
  447. command:command,
  448. };
  449. const {data} = await mangerControl(obj);
  450. if(data.code == 200){
  451. if(command == 'open'){
  452. minItem.type = 3;
  453. }else if(command == 'close'){
  454. minItem.type = 4;
  455. }
  456. uni.showToast({
  457. title: '操作成功',
  458. icon:"none",
  459. mask:true,
  460. duration: 2000
  461. });
  462. }
  463. },
  464. goVideo(){
  465. this.itemData.floorId = this.itemData.subAddrr.floorId;
  466. uni.navigateTo({
  467. url:'/pages_manage/workbench/laboratory/monitor?item='+encodeURIComponent(JSON.stringify(this.itemData))+'&deptId='+this.deptId
  468. })
  469. },
  470. goWord(){
  471. uni.navigateTo({
  472. url:'/pages_manage/workbench/laboratory/word?item='+encodeURIComponent(JSON.stringify(this.itemData))
  473. })
  474. },
  475. },
  476. onHide(){
  477. // //删除传感器监听
  478. getApp().deleteSensorWatch();
  479. // //删除设备监听
  480. getApp().deleteDeviceWatch();
  481. console.log("onHide",this.mtopic);
  482. },
  483. beforeDestroy(){
  484. // //删除传感器监听
  485. getApp().deleteSensorWatch();
  486. // //删除设备监听
  487. getApp().deleteDeviceWatch();
  488. console.log("beforeDestroy",this.mtopic);
  489. }
  490. }
  491. </script>
  492. <style lang="stylus" scoped>
  493. #laboratoryInfo{
  494. height:100%;
  495. display flex
  496. flex-direction column
  497. .name-max-box{
  498. background #fff
  499. .title-box{
  500. margin:20rpx 20rpx 0;
  501. display flex
  502. view:nth-child(1){
  503. height:40rpx;
  504. line-height:40rpx;
  505. font-size:20rpx;
  506. border-radius:10rpx;
  507. padding:0 20rpx;
  508. color:#fff;
  509. margin-right:20rpx;
  510. }
  511. view:nth-child(2){
  512. line-height:42rpx;
  513. font-size:30rpx;
  514. color:#0183FA;
  515. max-width:600rpx;
  516. flex:1;
  517. }
  518. img{
  519. width:12rpx;
  520. height:20rpx;
  521. margin-top:11rpx;
  522. }
  523. .colorA{
  524. background:#aa2315;
  525. }
  526. .colorB{
  527. background:#ff9b09;
  528. }
  529. .colorC{
  530. background:#3ea3e9;
  531. }
  532. .colorD{
  533. background:#3ea34c;
  534. }
  535. }
  536. .address-box{
  537. margin:20rpx 20rpx;
  538. font-size:26rpx;
  539. color:#999999;
  540. span{
  541. margin-right:60rpx;
  542. }
  543. }
  544. .address-box-two{
  545. display flex
  546. margin:0 20rpx 20rpx 20rpx;
  547. img{
  548. width:28rpx;
  549. height:30rpx;
  550. margin-right:18rpx;
  551. }
  552. view{
  553. line-height:30rpx;
  554. font-size:24rpx;
  555. color:#999999;
  556. }
  557. }
  558. }
  559. .title-max-box-none{
  560. border:none!important;
  561. }
  562. .title-max-box{
  563. display flex
  564. height:80rpx;
  565. border-bottom:1rpx solid #E0E0E0;
  566. .left-view{
  567. width: 4rpx;
  568. height: 34rpx;
  569. margin:25rpx 24rpx 0 20rpx;
  570. background:#0D97EB;
  571. }
  572. .right-view{
  573. line-height:80rpx;
  574. font-size: 30rpx;
  575. color: #333333;
  576. flex:1;
  577. }
  578. .click-view{
  579. display flex
  580. padding:0 20rpx;
  581. view{
  582. line-height:80rpx;
  583. font-size: 24rpx;
  584. color: #666666;
  585. }
  586. img{
  587. width:20rpx;
  588. height:10rpx;
  589. margin:35rpx 0 0 20rpx;
  590. }
  591. }
  592. }
  593. .sensor-max-box{
  594. background #fff
  595. margin-top:20rpx;
  596. .text-box{
  597. /*border-top:1rpx dashed #e0e0e0;*/
  598. /*border-top:1rpx solid #E0E0E0;*/
  599. padding:0 20rpx;
  600. /*
  601. overflow-x:scroll;
  602. overflow-y:hidden;
  603. white-space: nowrap;
  604. */
  605. .min-box{
  606. display inline-block
  607. /*padding:0 30rpx 0 10rpx;*/
  608. width:355rpx;
  609. .min-min-box{
  610. display: flex
  611. img{
  612. width:30rpx;
  613. height:27rpx;
  614. margin-top:24rpx;
  615. margin-right:10rpx;
  616. }
  617. view{
  618. line-height:74rpx;
  619. text-align center
  620. font-size:28rpx;
  621. color:#333;
  622. }
  623. .colorA{
  624. color:#EE3A3A;
  625. }
  626. }
  627. }
  628. }
  629. }
  630. .control-max-box{
  631. background #fff
  632. margin-top:20rpx;
  633. .button-max-box{
  634. .button-box:last-child{
  635. border:none!important;
  636. }
  637. .button-box{
  638. display flex
  639. border-bottom:1rpx solid #e0e0e0;
  640. margin:0 20rpx;
  641. view:nth-child(1){
  642. flex:1;
  643. line-height:90rpx;
  644. color:#333333;
  645. font-size:28rpx;
  646. }
  647. view:nth-child(2){
  648. width:120rpx;
  649. line-height:42rpx;
  650. border:4rpx solid #0183FA;
  651. border-radius:30rpx;
  652. color: #0183FA;
  653. font-size: 24rpx;
  654. text-align center;
  655. margin:20rpx 0 20rpx 0;
  656. }
  657. }
  658. .for-button-box:last-child{
  659. border:none!important;
  660. }
  661. .for-button-box{
  662. display flex
  663. border-bottom:1rpx solid #e0e0e0;
  664. margin:0 20rpx;
  665. view{
  666. flex:1;
  667. line-height:90rpx;
  668. color:#333333;
  669. font-size:28rpx;
  670. }
  671. img{
  672. height:50rpx;
  673. width:100rpx;
  674. margin:20rpx 0 20rpx 0;
  675. }
  676. view:nth-child(2){
  677. text-align right
  678. color:#999;
  679. }
  680. }
  681. }
  682. }
  683. .info-max-box{
  684. background #fff
  685. margin-top:20rpx;
  686. .top-name-max-box{
  687. background #fff
  688. overflow hidden
  689. .name-box{
  690. margin:27rpx 20rpx 0;
  691. display:flex;
  692. view:nth-child(1){
  693. background:#f95f5f;
  694. color:#fff;
  695. border-radius:6rpx;
  696. font-size:20rpx;
  697. padding:0 10rpx;
  698. height:42rpx;
  699. line-height:42rpx;
  700. }
  701. view:nth-child(2){
  702. color:#333;
  703. margin-left:20rpx;
  704. font-size:28rpx;
  705. height:30rpx;
  706. line-height:42rpx;
  707. font-weight:700;
  708. }
  709. }
  710. .address-box{
  711. margin:22rpx 20rpx;
  712. font-size:26rpx;
  713. }
  714. }
  715. .text-max-box{
  716. background #fff
  717. padding:8rpx 20rpx;
  718. border-bottom:1rpx solid #e0e0e0;
  719. .text-min-box{
  720. display:flex;
  721. view{
  722. line-height:66rpx;
  723. height:66rpx;
  724. font-size:28rpx;
  725. }
  726. view:nth-child(1){
  727. width:220rpx;
  728. color:#333;
  729. }
  730. view:nth-child(2){
  731. flex:1;
  732. color:#999;
  733. text-align:right;
  734. }
  735. }
  736. }
  737. .safety-max-box{
  738. background #fff
  739. padding:8rpx 20rpx;
  740. .max-for-box{
  741. .title-box{
  742. line-height:76rpx;
  743. font-size:30rpx;
  744. color:#333;
  745. }
  746. .for-box{
  747. line-height:48rpx;
  748. font-size:28rpx;
  749. color:#999;
  750. }
  751. }
  752. }
  753. .img-bottom-box{
  754. margin-top:20rpx;
  755. background #fff
  756. padding:8rpx 20rpx 20rpx;
  757. .title-box{
  758. line-height:76rpx;
  759. font-size:28rpx;
  760. color:#333;
  761. }
  762. .for-box{
  763. line-height:48rpx;
  764. font-size:26rpx;
  765. color:#999;
  766. .img-ojb{
  767. display inline-block
  768. width:86rpx;
  769. height:114rpx;
  770. margin-left:30rpx;
  771. }
  772. .code-img{
  773. width:200rpx;
  774. height:200rpx;
  775. margin:20rpx auto 40rpx;
  776. }
  777. }
  778. }
  779. }
  780. }
  781. </style>