manageWorkbench.vue 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128
  1. <!-- 管理端工作台 -->
  2. <template>
  3. <view class="manage-workbench" :style="{paddingTop:navHeight+'rpx'}">
  4. <nav-bar :title="title"></nav-bar>
  5. <img class="top-big-img" :src="homepageBanner">
  6. <top-warn></top-warn>
  7. <!-- <view class="min-icon-button-box" style="margin-bottom: 0;">
  8. <view @click="goPage('casuallyPat')">
  9. <img src="@/images/Version2.2/icon_sy_ssp.png">
  10. <view>随手拍</view>
  11. </view>
  12. <view @click="goPage('safetyInspect')">
  13. <img src="@/images/Version2.2/icon_sy_aqjc.png">
  14. <view>安全检查</view>
  15. </view>
  16. <view @click="goPage('photoInspection')">
  17. <img src="@/images/icon_dzt_pzjc.png">
  18. <view>离开检查</view>
  19. </view>
  20. <view @click="goPage('accessQualification')">
  21. <img src="@/images/Version2.2/icon_sy_zrsq.png">
  22. <view>准入审核</view>
  23. </view>
  24. <view @click="goPage('gas')">
  25. <img src="@/images/Version3.0/icon_sy_qpgl.png">
  26. <view>气瓶管理</view>
  27. </view>
  28. <view @click="goPage('none')">
  29. <img src="@/images/Version3.0/icon_sy_hxp.png">
  30. <view>化学品管理</view>
  31. </view>
  32. <view @click="goPage('none')">
  33. <img src="@/images/Version3.0/icon_sy_tzsb.png">
  34. <view>特种设备</view>
  35. </view>
  36. <view @click="goPage('none')">
  37. <img src="@/images/Version3.0/icon_sy_aqxx.png">
  38. <view>安全档案</view>
  39. </view>
  40. </view> -->
  41. <view class=big-icon-button-box>
  42. <!-- 气瓶管理 -->
  43. <view class="big-icon-button-box_l" @click="goPage('gasManage')">
  44. <!-- <img class="big-icon-button-box_bg" src="@/images/img_bg_qpgl.png" @click="goPage('gasManage')"> -->
  45. <view class="big-icon-button-box_t1">气瓶管理</view>
  46. <view class="big-icon-button-box_t2">安全第一 预防为主</view>
  47. </view>
  48. <view class="big-icon-button-box_r">
  49. <!-- 安全报警 -->
  50. <img src="@/images/Version2.3/button_1.png" @click="goPage('alarm')">
  51. <!-- 应急疏散 -->
  52. <img src="@/images/Version2.3/button_2.png" @click="goPage('emergencyEvacuation')">
  53. </view>
  54. </view>
  55. <!-- 分级管控 -->
  56. <!-- <view class="grading">
  57. <img class="grading_l" src="@/images/icon_sy_fjgk.png"/>
  58. <view class="grading_c">分级管控</view>
  59. <view class="grading_r" @click="goPage('grading')">{{gradingCount>0?gradingCount+'项工作待完成':''}}<img src="@/images/icon_wdwg_gd.png"/></view>
  60. </view> -->
  61. <view class="for-title-p" @click="goSecurityAlertList" v-if="alarmList[0]">
  62. <img class="left-img" src="@/images/Version2.2/icon_aqbj.png">
  63. <view class="name-view">安全报警</view>
  64. <view class="num-view">{{securityAlertNum}}</view>
  65. <view class="null-view"></view>
  66. <img class="right-img" src="@/images/icon_04.png">
  67. </view>
  68. <view class="for-max-box-one" v-if="alarmList[0]">
  69. <view class="for-box" v-for="(item,index) in alarmList" :key="index">
  70. <view class="title-box">
  71. <view :style="'border:1rpx solid '+item.subDiyVo.fiedColor+';background:#fff;color:'+item.subDiyVo.fiedColor+';'">{{item.subDiyVo.levelName}}</view>
  72. <view>{{item.subDiyVo.name}}</view>
  73. </view>
  74. <view class="address-box"><span>{{item.subDiyVo.typeName}}</span>{{item.subDiyVo.deptName}}</view>
  75. <view class="address-box-two">
  76. <img src="@/images/icon_14.png">
  77. <view>{{item.subDiyVo.subAddrrStr}}</view>
  78. </view>
  79. <view class="for-img-box">
  80. <view class="for-img-min-box" v-for="(minItem,index) in item.sensorSet" :key="index">
  81. <img src="@/images/icon_15.png">
  82. <view>{{minItem}}</view>
  83. </view>
  84. </view>
  85. <view v-if="alarmList.length == index+1" class="button-view" @click="laboratoryInfo(item)">查看详情</view>
  86. </view>
  87. </view>
  88. <view class="for-title-p" v-if="dataList[0]">
  89. <img class="left-img" src="@/images/Version2.2/icon_sy_wdsys.png">
  90. <view class="name-view">我的实验室</view>
  91. </view>
  92. <view class="for-max-box" v-if="dataList[0]">
  93. <img class="null-img" v-if="!dataList[0]" src="@/images/null-data-1.png">
  94. <view class="for-box" v-for="(item,index) in dataList" :key="index" @click="laboratoryInfoOne(item)">
  95. <view class="title-box">
  96. <view :style="'border:1rpx solid '+item.fiedColor+';background:#fff;color:'+item.fiedColor+';'">{{item.levelName}}</view>
  97. <view>{{item.name}}</view>
  98. <img src="@/images/icon_04.png">
  99. </view>
  100. <view class="address-box"><span>{{item.typeName}}</span>{{item.deptName}}</view>
  101. <view class="address-box-two" v-if='item.subAddrrStr!=" "'>
  102. <img src="@/images/icon_14.png">
  103. <view>{{item.subAddrrStr}}</view>
  104. </view>
  105. <view class="text-box" v-if="item.sensorFunctionList[0]">
  106. <view class="min-box" v-for="(minItem,index2) in item.sensorFunctionList" :key="index2">
  107. <view class="min-min-box">
  108. <img v-show="minItem.hasWarn" src="@/images/icon_15.png">
  109. <view :class="{'colorA':minItem.hasWarn}">{{minItem.funcName}}:{{minItem.formatVal?minItem.formatVal:'-'}}</view>
  110. </view>
  111. </view>
  112. </view>
  113. </view>
  114. </view>
  115. <tab-bar></tab-bar>
  116. </view>
  117. </template>
  118. <script>
  119. import $mqtt from '@/utils/mqtt.min.js';
  120. import { config } from '@/api/request/config.js'
  121. import { appReceivePhotoNote,
  122. getApprovalCount,
  123. subject_class,
  124. getSafeWarnList,
  125. laboratoryInfo,
  126. laboratoryList,
  127. getLoginUserInfo,
  128. outSubjectPhoto,
  129. gradingControl,
  130. listData,
  131. getDicts,
  132. getGentleIdentifier} from '@/api/index.js'
  133. import { tabBar } from '@/component/tabBar.vue'
  134. import { topWarn } from '@/component/topWarn.vue'
  135. import { navBar } from '@/component/navbar.vue'
  136. export default {
  137. components: {
  138. tabBar,
  139. topWarn,
  140. navBar
  141. },
  142. data() {
  143. return {
  144. navHeight: uni.getStorageSync('navHeight'),
  145. title:'实验室安全智能监测与控制系统',
  146. //随手拍数量
  147. appReceivePhotoNoteNum:0,
  148. //准入数量
  149. passedNum:"",
  150. subject_classData:[],
  151. securityAlertNum:"",
  152. //MQTT请求参数
  153. mtopic:"lab/bigview",
  154. mtopicOne:"lab/function/data",
  155. msg:"",
  156. client:{},
  157. //报警数据
  158. alarmList:[],
  159. //实验室数据
  160. dataList:[],
  161. //用户信息数据(用来决定是否可以跳转检查项)
  162. userInfo:{
  163. isadmin:null,
  164. ischeck:null,
  165. list:null,
  166. },
  167. buttonArray:[],
  168. gradingCount:0,//分级管控未完成总数
  169. homepageBanner:uni.getStorageSync('homepageBanner'),
  170. fanList:[],//控制记录触发方式
  171. }
  172. },
  173. created() {
  174. },
  175. mounted(){
  176. this.appReceivePhotoNote();
  177. this.getApprovalCount();
  178. this.subject_class();
  179. this.laboratoryList();
  180. this.getSafeWarnList();
  181. this.getLoginUserInfo();
  182. this.getGrading();
  183. this.getListData();
  184. this.gasBottleSpecificationFun();
  185. this.gasBottleLevelFun();
  186. //监听报警信息
  187. getApp().watch(this.getSafeWarnList,'mqttAlarmData');
  188. },
  189. methods: {
  190. //查询控制记录触发方式
  191. async getListData() {
  192. let _this = this;
  193. let obj={
  194. pageNum:1,
  195. pageSize:20,
  196. dictType:'trigger_modes'
  197. }
  198. const {data} = await listData(obj)
  199. if (data.code == 200) {
  200. this.fanList=data.rows
  201. }
  202. },
  203. //暂无提示
  204. goCheckPage(){
  205. if(this.userInfo.isadmin){
  206. uni.navigateTo({
  207. url: '/pages_manage/workbench/problemRectification/rectifyList'
  208. });
  209. }else if(this.userInfo.ischeck == 1){
  210. uni.navigateTo({
  211. url: '/pages_manage/workbench/securityCheck/inspectionRecords'
  212. });
  213. }else{
  214. uni.showToast({
  215. title: '您没有该权限',
  216. icon:"none",
  217. mask:true,
  218. duration: 2000
  219. });
  220. }
  221. },
  222. //监听传感器信息
  223. getMqttSensorData(val){
  224. let self = this;
  225. if(val.subId){
  226. for(let i=0;i<self.dataList.length;i++){
  227. if(self.dataList[i].id == val.subId){
  228. self.$set(self.dataList[i],'sensorFunctionList',val.functionStatuses);
  229. }
  230. }
  231. }
  232. },
  233. //获取分级管控未完成总数
  234. async getGrading(){
  235. let obj = {
  236. }
  237. const {data} = await gradingControl(obj)
  238. if(data.code==200){
  239. this.gradingCount=data.data.length;
  240. }
  241. },
  242. async getLoginUserInfo(){
  243. const {data} = await getLoginUserInfo();
  244. if(data.code == 200){
  245. this.userInfo = data.data;
  246. let list = [];
  247. if(data.data.isadmin){
  248. //实验室负责人
  249. let obj = {
  250. id:"1",
  251. name:"检查记录",
  252. }
  253. list.push(obj)
  254. }
  255. if(data.data.ischeck == 1){
  256. //检查者
  257. let obj = {
  258. id:"2",
  259. name:"问题整改",
  260. }
  261. list.push(obj)
  262. }
  263. this.$set(this,'buttonArray',list);
  264. }
  265. },
  266. //获取报警信息详情
  267. async laboratoryInfo(item){
  268. uni.navigateTo({
  269. url: '/pages/earlyWarningManage/earlyWarningList'
  270. });
  271. // let self=this;
  272. // const {data} = await laboratoryInfo(item.subDiyVo.id);
  273. // if(data.code == 200){
  274. // let obj = data.data[0];
  275. // obj.subClassVO = item.subDiyVo.subClassVO;
  276. // obj.name = item.subDiyVo.name;
  277. // obj.subTypeLable = item.subDiyVo.subTypeLable;
  278. // obj.deptName = item.subDiyVo.deptName;
  279. // obj.subAddrrStr = item.subDiyVo.subAddrrStr;
  280. // //循环判断如果是排风扇的话,启动的时候是人工还是预案还是定时
  281. // for(let i=0;i<obj.labHardwareVOList.length;i++){
  282. // if(obj.labHardwareVOList[i].hardwareTypeEnum.hardwareTypeCode == '2'){
  283. // for(let b=0;b<self.fanList.length;b++){
  284. // if(self.fanList[b].dictValue==obj.labHardwareVOList[i].triggerModes){
  285. // obj.labHardwareVOList[i].dictLabel=self.fanList[b].dictLabel
  286. // }
  287. // }
  288. // }
  289. // }
  290. // uni.navigateTo({
  291. // url: '/pages_manage/workbench/laboratory/laboratoryInfo?item='+encodeURIComponent(JSON.stringify(obj))+'&deptId='+obj.deptId
  292. // });
  293. // }
  294. },
  295. //获取实验室详情
  296. async laboratoryInfoOne(item){
  297. let self=this;
  298. const {data} = await laboratoryInfo(item.id);
  299. if(data.code == 200){
  300. let obj = data.data[0];
  301. obj.subClassVO = item.subClassVO;
  302. obj.name = item.name;
  303. obj.subTypeLable = item.subTypeLable;
  304. obj.deptName = item.deptName;
  305. obj.subAddrrStr = item.subAddrrStr;
  306. obj.sensorFunctionList = item.sensorFunctionList;
  307. //循环判断如果是排风扇的话,启动的时候是人工还是预案还是定时
  308. for(let i=0;i<obj.labHardwareVOList.length;i++){
  309. if(obj.labHardwareVOList[i].hardwareTypeEnum.hardwareTypeCode == '2'){
  310. for(let b=0;b<self.fanList.length;b++){
  311. if(self.fanList[b].dictValue==obj.labHardwareVOList[i].triggerModes){
  312. obj.labHardwareVOList[i].dictLabel=self.fanList[b].dictLabel
  313. }
  314. }
  315. }
  316. }
  317. uni.navigateTo({
  318. url: '/pages_manage/workbench/laboratory/laboratoryInfo?item='+encodeURIComponent(JSON.stringify(obj))+'&deptId='+item.deptId
  319. });
  320. }
  321. },
  322. //获取报警信息列表
  323. async getSafeWarnList(){
  324. let obj = {
  325. pageNum:1,
  326. pageSize:1,
  327. count:0,
  328. groupStatus:1,
  329. };
  330. const {data} = await getSafeWarnList(obj);
  331. if(data.code == 200){
  332. this.alarmList = data.data.list;
  333. this.securityAlertNum = data.data.count;
  334. // if(data.rows[0]){
  335. // this.securityAlertNum = data.rows[0].todayHappenCount;
  336. // }else{
  337. // this.securityAlertNum = 0;
  338. // }
  339. }
  340. },
  341. //获取实验室列表
  342. async laboratoryList(){
  343. let self = this;
  344. let obj = {
  345. pageNum:1,
  346. pageSize:10,
  347. deptId:this.facultyIndex?this.facultyList[this.facultyIndex].deptId:'',
  348. subDept:this.subjectIndex?this.subjectList[this.subjectIndex].dictValue:'',
  349. level:this.levelIndex?this.levelList[this.levelIndex].dictValue:'',
  350. };
  351. const {data} = await laboratoryList(obj);
  352. if(data.code == 200){
  353. for(let o=0;o<data.data.length;o++){
  354. if(data.data[o].labHardwareVOList){
  355. data.data[o].hardwareList = [];
  356. for(let i=0;i<data.data[o].labHardwareVOList.length;i++){
  357. if(data.data[o].labHardwareVOList[i].hardwareTypeEnum.code == 4 &&data.data[o].labHardwareVOList[i].hardwareNUM){
  358. if(data.data[o].hardwareNUM){
  359. data.data[o].hardwareNUM = data.data[o].hardwareNUM + ',' + data.data[o].labHardwareVOList[i].hardwareNUM
  360. }else{
  361. data.data[o].hardwareNUM = data.data[o].labHardwareVOList[i].hardwareNUM
  362. }
  363. }else{
  364. let obj = {
  365. name:"",
  366. type:"",
  367. };
  368. obj.name = data.data[o].labHardwareVOList[i].hardwareTypeEnum.hardwareTypeName
  369. obj.type = data.data[o].labHardwareVOList[i].state.code;
  370. obj.id = data.data[o].labHardwareVOList[i].id;
  371. data.data[o].hardwareList.push(obj);
  372. }
  373. }
  374. }
  375. }
  376. this.dataList = data.data;
  377. let list = [];
  378. let obj = {
  379. type:"lab/function/data",
  380. idList:[],
  381. }
  382. for(let i=0;i<self.dataList.length;i++){
  383. let num = 0;
  384. for(let o=0;o<obj.idList.length;o++){
  385. if(obj.idList[o] == self.dataList[i].id){
  386. num++
  387. }
  388. }
  389. if(num == 0){
  390. obj.idList.push(self.dataList[i].id)
  391. }
  392. }
  393. list.push({type:"lab/riskPlan/trigger/notice",});
  394. getApp().appMqttOn(1,list);
  395. }
  396. },
  397. //获取输入数量
  398. async getApprovalCount(){
  399. const {data} = await getApprovalCount()
  400. if(data.code == 200){
  401. this.passedNum = data.data.passed + '人已获得';
  402. }
  403. },
  404. //获取管理员工作台随手拍数量数据
  405. async appReceivePhotoNote(){
  406. const {data} = await appReceivePhotoNote();
  407. if(data.code == 200){
  408. this.appReceivePhotoNoteNum = data.data.photoCount;
  409. }
  410. },
  411. //获取学科字典
  412. async subject_class(){
  413. const {data} = await subject_class();
  414. if(data.code == 200){
  415. this.subject_classData = data.data;
  416. }
  417. },
  418. //去安全警报
  419. goSecurityAlertList(){
  420. uni.navigateTo({
  421. url: '/pages/earlyWarningManage/earlyWarningList',//安全警报
  422. });
  423. },
  424. //页面跳转
  425. goPage(type){
  426. if(type=='casuallyPat'){
  427. uni.navigateTo({
  428. url: '/pages_safetyExamine/snapshotManage/snapshotAdd'
  429. });
  430. }else if(type=='receiveCasuallyPat'){//收到随手拍
  431. uni.navigateTo({
  432. url: '/pages_manage/workbench/receiveCasuallyPat/receiveCasuallyPat',
  433. });
  434. }else if(type=='accessQualification'){//收到随手拍
  435. uni.navigateTo({
  436. url: '/pages_manage/workbench/accessQualification/accessQualification',
  437. });
  438. }else if(type == 'safetyInspect'){//安全检查
  439. this.getGentleIdentifier();
  440. }
  441. else if(type == 'alarm'){
  442. uni.navigateTo({
  443. url: '/pages/earlyWarningManage/earlyWarningList',//安全警报
  444. });
  445. }else if(type == 'emergencyEvacuation'){
  446. uni.navigateTo({
  447. url: '/pages_manage/emergencyEvacuationBig',//安全警报
  448. });
  449. }else if(type == 'photoInspection'){
  450. this.outSubjectPhoto();
  451. }else if(type == 'grading'){
  452. uni.navigateTo({
  453. url: '/pages_manage/gradingControl/gradingControl',//分级管控
  454. });
  455. }else if(type == 'gasManage'){//气瓶管理
  456. uni.navigateTo({
  457. url: '/pages/gasBottle/gasManage/gasManage',
  458. });
  459. }else if(type == 'none'){
  460. uni.showToast({
  461. title: '暂未开放',
  462. icon:"none",
  463. mask:true,
  464. duration: 2000
  465. });
  466. }
  467. },//获取拍照检查配置
  468. async outSubjectPhoto(){
  469. const {data} = await outSubjectPhoto();
  470. if(data.code == 200){
  471. if(data.data == null){
  472. //需要检查(重新填写)
  473. let obj = {
  474. sub:"实验室照片",
  475. subUrl:"",
  476. garbage:"垃圾桶清理后照片",
  477. garbageUrl:"",
  478. dangerous:"使用危险设备照片(选填)",
  479. dangerousUrl:"",
  480. sourceRisk:"危险源设备使用登记本照片(选填)",
  481. sourceRiskUrl:"",
  482. };
  483. uni.navigateTo({
  484. url: '/pages_student/workbench/photoInspection?newData='+encodeURIComponent(JSON.stringify(obj)),
  485. });
  486. }else if(data.data == false){
  487. //不需要检查
  488. uni.showToast({
  489. title: '暂无检查数据',
  490. icon:"none",
  491. mask:true,
  492. duration: 2000
  493. });
  494. }else{
  495. //需要检查(修改内容)
  496. let obj = {
  497. id:data.data.id,
  498. sub:"实验室照片",
  499. subUrl:data.data.subUrl,
  500. garbage:"垃圾桶清理后照片",
  501. garbageUrl:data.data.garbageUrl,
  502. dangerous:"使用危险设备照片(选填)",
  503. dangerousUrl:data.data.dangerousUrl,
  504. sourceRisk:"危险源设备使用登记本照片(选填)",
  505. sourceRiskUrl:data.data.sourceRiskUrl,
  506. };
  507. uni.navigateTo({
  508. url: '/pages_student/workbench/photoInspection?newData='+encodeURIComponent(JSON.stringify(obj)),
  509. });
  510. }
  511. }
  512. },
  513. //获取用户身份标识"adminGentle": false, 管理员身份 "rectifyGentle": false, 整改身份"applyGentle": false 检查者身份
  514. async getGentleIdentifier(){
  515. let self = this;
  516. const {data} = await getGentleIdentifier();
  517. if(data.code==200){
  518. let pageType = null
  519. // 如果是管理员 检查者和整改者
  520. let list=[];
  521. if(data.data.adminGentle){
  522. list.push({name:'管理员',pageType:1})
  523. }
  524. if(data.data.applyGentle ||data.data.myApplyGentle){
  525. list.push({name:'检查者',pageType:2})
  526. }
  527. if(data.data.rectifyGentle){
  528. list.push({name:'整改者',pageType:3})
  529. }
  530. uni.setStorageSync('gentleIdentifier',list)
  531. uni.setStorageSync('gentleIdentifierData',data.data)
  532. if(list.length>0){
  533. uni.navigateTo({
  534. url: '/pages/safetyExamineWorkbench',
  535. });
  536. }else{
  537. uni.showToast({
  538. title: '没有相关权限',
  539. icon:"none",
  540. mask:true,
  541. duration: 2000
  542. });
  543. }
  544. }
  545. },
  546. //气瓶规格
  547. async gasBottleSpecificationFun(){
  548. const {data} = await getDicts('gasBottleSpecification');
  549. if(data.code == 200){
  550. uni.setStorageSync('gasBottleSpecification', data.data)
  551. }
  552. },
  553. //气瓶级别
  554. async gasBottleLevelFun(){
  555. const {data} = await getDicts('gasBottleLevel');
  556. if(data.code == 200){
  557. uni.setStorageSync('gasBottleLevel', data.data)
  558. }
  559. },
  560. },
  561. beforeDestroy(){
  562. //断开mqtt连接
  563. getApp().offMQTT();
  564. //删除报警监听
  565. getApp().deleteAlarmWatch();
  566. //删除传感器监听
  567. getApp().deleteSensorWatch();
  568. }
  569. }
  570. </script>
  571. <style lang="stylus" scoped>
  572. .manage-workbench{
  573. height:100%;
  574. width:100%;
  575. overflow-y:scroll;
  576. box-sizing: border-box;
  577. .top-big-img{
  578. height:342rpx;
  579. width:750rpx;
  580. }
  581. .min-icon-button-box{
  582. display flex;
  583. justify-content: flex-start;
  584. flex-wrap: wrap;
  585. width:710rpx;
  586. margin:20rpx;
  587. background :#ffffff;
  588. border-radius:20rpx;
  589. padding-bottom: 20rpx;
  590. view{
  591. width: 176rpx;
  592. img{
  593. height:75rpx;
  594. width:75rpx;
  595. margin:30rpx auto 10rpx;
  596. }
  597. view{
  598. text-align center
  599. font-size:24rpx;
  600. }
  601. }
  602. }
  603. .big-icon-button-box{
  604. display flex;
  605. justify-content: space-between;
  606. margin:20rpx;
  607. .big-icon-button-box_l{
  608. background: url("../images/img_bg_qpgl.png") no-repeat;
  609. background-size: 372rpx 260rpx;
  610. width:372rpx;
  611. height:260rpx;
  612. // .big-icon-button-box_bg{
  613. // width:372rpx;
  614. // height:260rpx;
  615. // }
  616. .big-icon-button-box_t1{
  617. width: 149rpx;
  618. height: 40rpx;
  619. background: rgba(225,225,225,0.3);
  620. border-radius: 2rpx;
  621. font-size: 24rpx;
  622. font-family: Microsoft YaHei;
  623. font-weight: 400;
  624. color: #333333;
  625. line-height: 40rpx;
  626. text-align: center;
  627. margin:94rpx 0 0 181rpx;
  628. // position:absolute;
  629. // right: 42rpx;
  630. // top: 94rpx;
  631. }
  632. .big-icon-button-box_t2{
  633. width: 175rpx;
  634. height: 20rpx;
  635. font-size: 18rpx;
  636. font-family: Microsoft YaHei;
  637. font-weight: 400;
  638. color: #333333;
  639. line-height: 20rpx;
  640. margin:20rpx 0 0 181rpx;
  641. // position:absolute;
  642. // right: 28rpx;
  643. // top: 148rpx;
  644. }
  645. }
  646. .big-icon-button-box_r{
  647. img{
  648. width:320rpx;
  649. height:120rpx;
  650. }
  651. >img:nth-of-type(2){
  652. margin-top: 20rpx;
  653. }
  654. }
  655. }
  656. /* 分级管控 */
  657. .grading{
  658. width :712rpx;
  659. height :80rpx;
  660. background: #FFFFFF;
  661. border-radius: 20rpx;
  662. margin-left:20rpx;
  663. margin-bottom :20rpx;
  664. display:flex;
  665. justify-content :flex-start;
  666. align-items :center;
  667. .grading_l{
  668. width :34rpx;
  669. height :34rpx;
  670. margin-left:16rpx;
  671. }
  672. .grading_c{
  673. font-size: 28rpx;
  674. font-family: PingFang SC;
  675. font-weight: 500;
  676. color: #333333;
  677. margin-left:16rpx;
  678. }
  679. .grading_r{
  680. width :504rpx;
  681. height :80rpx;
  682. font-size: 26rpx;
  683. font-family: PingFang SC;
  684. font-weight: 500;
  685. color: #EE3A3A;
  686. display :flex;
  687. justify-content :flex-end;
  688. align-items: center;
  689. >img{
  690. width: 20rpx;
  691. height: 20rpx;
  692. margin-left :20rpx;
  693. margin-top :8rpx;
  694. }
  695. }
  696. }
  697. .top-max-box{
  698. height:300rpx;
  699. .top-min-box{
  700. display: flex
  701. margin:20rpx;
  702. .left-box{
  703. background #fff
  704. height:130rpx;
  705. width:345rpx;
  706. border-radius: 10px;
  707. display flex
  708. .left-img{
  709. height:80rpx;
  710. width:80rpx;
  711. margin:25rpx 30rpx;
  712. }
  713. view{
  714. line-height:130rpx;
  715. font-size: 28rpx;
  716. color:#333;
  717. flex:1;
  718. }
  719. .right-img{
  720. width:20rpx;
  721. height:20rpx;
  722. margin:55rpx 30rpx 0 0;
  723. }
  724. }
  725. .right-box{
  726. background #fff
  727. height:130rpx;
  728. width:345rpx;
  729. margin-left:20rpx;
  730. border-radius: 10rpx;
  731. display flex
  732. .left-img{
  733. height:80rpx;
  734. width:80rpx;
  735. margin:25rpx 30rpx;
  736. }
  737. .right-min-view{
  738. flex:1;
  739. .right-min-title{
  740. line-height:28rpx;
  741. font-size: 28rpx;
  742. margin-top:32rpx;
  743. color: #333333;
  744. }
  745. .right-bottom-min-box{
  746. display flex
  747. view{
  748. flex:1;
  749. text-align right
  750. margin:25rpx 14rpx 0 0;
  751. font-size: 22rpx;
  752. color: #999999;
  753. line-height: 22rpx;
  754. }
  755. img{
  756. width:20rpx;
  757. height:20rpx;
  758. margin:27rpx 80rpx 0 0;
  759. }
  760. }
  761. }
  762. }
  763. }
  764. .bottom-min-box{
  765. background #fff
  766. height:130rpx;
  767. width:710rpx;
  768. border-radius: 10px;
  769. margin:0 20rpx;
  770. display flex
  771. .left-img{
  772. height:80rpx;
  773. width:80rpx;
  774. margin:25rpx 30rpx;
  775. }
  776. view{
  777. flex:1;
  778. line-height:130rpx;
  779. }
  780. view:nth-child(2){
  781. font-size: 28rpx;
  782. color:#333;
  783. }
  784. view:nth-child(3){
  785. text-align right
  786. font-size: 22rpx;
  787. color:#999;
  788. margin-right:12rpx;
  789. }
  790. .right-img{
  791. width:20rpx;
  792. height:20rpx;
  793. margin:55rpx 30rpx 0 0;
  794. }
  795. }
  796. }
  797. .for-title-p{
  798. border-top-left-radius 20rpx
  799. border-top-right-radius 20rpx
  800. background #fff
  801. padding-left:25rpx;
  802. display flex
  803. margin:20rpx 20rpx 0;
  804. border-bottom:1rpx solid #e0e0e0;
  805. .left-img{
  806. height:34rpx;
  807. width:34rpx;
  808. margin:22rpx 10rpx 0 0;
  809. }
  810. .name-view{
  811. line-height:77rpx;
  812. font-size:30rpx;
  813. color:#333;
  814. }
  815. .num-view{
  816. width:28rpx;
  817. height:28rpx;
  818. font-size:20rpx;
  819. background:#EE3A3A;
  820. border-radius:50%;
  821. text-align :center;
  822. line-height:24rpx;
  823. color:#fff;
  824. margin:26rpx 0 0 10rpx;
  825. }
  826. .null-view{
  827. flex:1;
  828. }
  829. .right-img{
  830. height:20rpx;
  831. width:10rpx;
  832. margin:28rpx 19rpx 0 0;
  833. }
  834. }
  835. .for-max-box-one{
  836. margin:0 20rpx;
  837. border-bottom-left-radius 20rpx
  838. border-bottom-right-radius 20rpx
  839. overflow: hidden;
  840. .for-box:nth-child(1){
  841. border-top:none;
  842. }
  843. .for-box{
  844. border-top:4rpx solid #dedede;
  845. background #fff
  846. overflow: hidden
  847. .title-box{
  848. margin:20rpx 20rpx 0;
  849. display flex
  850. view:nth-child(1){
  851. height:40rpx;
  852. line-height:40rpx;
  853. font-size:20rpx;
  854. border-radius:10rpx;
  855. padding:0 20rpx;
  856. color:#fff;
  857. margin-right:20rpx;
  858. }
  859. view:nth-child(2){
  860. line-height:42rpx;
  861. font-size:30rpx;
  862. color:#333;
  863. max-width:600rpx;
  864. flex:1;
  865. }
  866. .colorA{
  867. background:#aa2315;
  868. }
  869. .colorB{
  870. background:#ff9b09;
  871. }
  872. .colorC{
  873. background:#3ea3e9;
  874. }
  875. .colorD{
  876. background:#3ea34c;
  877. }
  878. }
  879. .address-box{
  880. margin:20rpx 20rpx;
  881. font-size:26rpx;
  882. color:#999999;
  883. span{
  884. margin-right:60rpx;
  885. }
  886. }
  887. .address-box-two{
  888. display flex
  889. margin:0 20rpx 20rpx 20rpx;
  890. img{
  891. width:28rpx;
  892. height:30rpx;
  893. margin-right:18rpx;
  894. }
  895. view{
  896. line-height:30rpx;
  897. font-size:24rpx;
  898. color:#999999;
  899. }
  900. }
  901. .for-img-box{
  902. border-top:1rpx solid #e0e0e0;
  903. margin:0 20rpx;
  904. .for-img-min-box{
  905. display flex
  906. img{
  907. width:30rpx;
  908. height:27rpx;
  909. margin-top:24rpx;
  910. margin-right:10rpx;
  911. }
  912. view{
  913. line-height:74rpx;
  914. text-align center
  915. font-size:28rpx;
  916. color:#EE3A3A;
  917. }
  918. }
  919. }
  920. .button-view{
  921. margin:0 20rpx;
  922. border-top:1rpx dashed #e0e0e0;
  923. line-height:90rpx;
  924. text-align :center;
  925. font-size:26rpx;
  926. color:#333;
  927. }
  928. }
  929. .get-null-box{
  930. height:100rpx;
  931. line-height:100rpx;
  932. color:#999;
  933. text-align center
  934. }
  935. }
  936. .for-max-box{
  937. margin:0 20rpx 120rpx;
  938. background: #fff
  939. overflow: hidden
  940. border-bottom-left-radius 20rpx
  941. border-bottom-right-radius 20rpx
  942. .null-img{
  943. display block
  944. width:276rpx;
  945. height:321rpx;
  946. margin:40rpx auto;
  947. }
  948. .for-box:nth-child(1){
  949. border-top:none;
  950. }
  951. .for-box{
  952. border-top:4rpx solid #dedede;
  953. overflow hidden
  954. background #ffffff
  955. margin-bottom:20rpx;
  956. .title-box{
  957. margin:20rpx 20rpx 0;
  958. display flex
  959. view:nth-child(1){
  960. height:40rpx;
  961. line-height:40rpx;
  962. font-size:20rpx;
  963. border-radius:10rpx;
  964. padding:0 20rpx;
  965. color:#fff;
  966. margin-right:20rpx;
  967. }
  968. view:nth-child(2){
  969. line-height:42rpx;
  970. font-size:30rpx;
  971. color:#333;
  972. max-width:600rpx;
  973. flex:1;
  974. }
  975. img{
  976. width:12rpx;
  977. height:20rpx;
  978. margin-top:11rpx;
  979. }
  980. .colorA{
  981. background:#aa2315;
  982. }
  983. .colorB{
  984. background:#ff9b09;
  985. }
  986. .colorC{
  987. background:#3ea3e9;
  988. }
  989. .colorD{
  990. background:#3ea34c;
  991. }
  992. }
  993. .address-box{
  994. margin:20rpx 20rpx;
  995. font-size:26rpx;
  996. color:#999999;
  997. span{
  998. margin-right:60rpx;
  999. }
  1000. }
  1001. .address-box-two{
  1002. display flex
  1003. margin:0 20rpx 20rpx 20rpx;
  1004. img{
  1005. width:28rpx;
  1006. height:30rpx;
  1007. margin-right:18rpx;
  1008. }
  1009. view{
  1010. line-height:30rpx;
  1011. font-size:24rpx;
  1012. color:#999999;
  1013. }
  1014. }
  1015. .text-box{
  1016. /*border-top:1rpx dashed #e0e0e0;*/
  1017. border-top:1rpx solid #E0E0E0;
  1018. padding:20rpx 20rpx 0;
  1019. /*
  1020. overflow-x:scroll;
  1021. overflow-y:hidden;
  1022. white-space: nowrap;
  1023. */
  1024. .min-box{
  1025. display inline-block
  1026. /*padding:0 30rpx 0 10rpx;*/
  1027. width:335rpx;
  1028. .min-min-box{
  1029. display: flex
  1030. img{
  1031. width:30rpx;
  1032. height:27rpx;
  1033. margin-top:24rpx;
  1034. margin-right:10rpx;
  1035. }
  1036. view{
  1037. line-height:74rpx;
  1038. text-align center
  1039. font-size:28rpx;
  1040. color:#333;
  1041. }
  1042. .colorA{
  1043. color:#EE3A3A;
  1044. }
  1045. }
  1046. }
  1047. }
  1048. .sensor-max-box{
  1049. margin:0 20rpx;
  1050. border-top:1rpx solid #e0e0e0;
  1051. border-bottom:1rpx solid #e0e0e0;
  1052. display flex
  1053. .for-sensor-box{
  1054. flex:1;
  1055. display flex
  1056. font-size:28rpx;
  1057. line-height:94rpx;
  1058. view{
  1059. margin-left:20rpx;
  1060. font-size:25rpx;
  1061. line-height:94rpx;
  1062. color:#0183FA;
  1063. }
  1064. }
  1065. }
  1066. .button-max-box{
  1067. .button-box{
  1068. display flex
  1069. view:nth-child(1){
  1070. flex:1;
  1071. line-height:90rpx;
  1072. color:#333333;
  1073. margin-left:30rpx;
  1074. font-size:28rpx;
  1075. }
  1076. view:nth-child(2){
  1077. width:142rpx;
  1078. line-height:42rpx;
  1079. border:4rpx solid #0183FA;
  1080. border-radius:25rpx;
  1081. color: #0183FA;
  1082. font-size: 30rpx;
  1083. text-align center;
  1084. margin:20rpx 20rpx 20rpx 0;
  1085. }
  1086. }
  1087. .for-button-box{
  1088. display flex
  1089. view{
  1090. flex:1;
  1091. line-height:90rpx;
  1092. color:#333333;
  1093. margin-left:30rpx;
  1094. font-size:28rpx;
  1095. }
  1096. img{
  1097. height:50rpx;
  1098. width:100rpx;
  1099. margin:20rpx 20rpx 20rpx 0;
  1100. }
  1101. view:nth-child(2){
  1102. text-align right
  1103. color:#999;
  1104. margin-right:30rpx;
  1105. }
  1106. }
  1107. }
  1108. }
  1109. }
  1110. }
  1111. </style>