|
@@ -4,7 +4,7 @@
|
|
|
<nav-bar :title="title"></nav-bar>
|
|
|
<img class="top-big-img" :src="homepageBanner">
|
|
|
<top-warn></top-warn>
|
|
|
- <view class="min-icon-button-box" style="margin-bottom: 0;">
|
|
|
+ <!-- <view class="min-icon-button-box" style="margin-bottom: 0;">
|
|
|
<view @click="goPage('casuallyPat')">
|
|
|
<img src="@/images/Version2.2/icon_sy_ssp.png">
|
|
|
<view>随手拍</view>
|
|
@@ -17,7 +17,7 @@
|
|
|
<img src="@/images/icon_dzt_pzjc.png">
|
|
|
<view>离开检查</view>
|
|
|
</view>
|
|
|
- <view @click="goPage('accessQualification')">
|
|
|
+ <view @click="goPage('accessQualification')">
|
|
|
<img src="@/images/Version2.2/icon_sy_zrsq.png">
|
|
|
<view>准入审核</view>
|
|
|
</view>
|
|
@@ -37,19 +37,28 @@
|
|
|
<img src="@/images/Version3.0/icon_sy_aqxx.png">
|
|
|
<view>安全档案</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
<view class=big-icon-button-box>
|
|
|
- <!-- 安全报警 -->
|
|
|
- <img src="@/images/Version2.3/button_1.png" @click="goPage('alarm')">
|
|
|
- <!-- 应急疏散 -->
|
|
|
- <img src="@/images/Version2.3/button_2.png" @click="goPage('emergencyEvacuation')">
|
|
|
+ <!-- 气瓶管理 -->
|
|
|
+ <view class="big-icon-button-box_l" @click="goPage('gasManage')">
|
|
|
+ <!-- <img class="big-icon-button-box_bg" src="@/images/img_bg_qpgl.png" @click="goPage('gasManage')"> -->
|
|
|
+ <view class="big-icon-button-box_t1">气瓶管理</view>
|
|
|
+ <view class="big-icon-button-box_t2">安全第一 预防为主</view>
|
|
|
+ </view>
|
|
|
+ <view class="big-icon-button-box_r">
|
|
|
+ <!-- 安全报警 -->
|
|
|
+ <img src="@/images/Version2.3/button_1.png" @click="goPage('alarm')">
|
|
|
+ <!-- 应急疏散 -->
|
|
|
+ <img src="@/images/Version2.3/button_2.png" @click="goPage('emergencyEvacuation')">
|
|
|
+ </view>
|
|
|
+
|
|
|
</view>
|
|
|
<!-- 分级管控 -->
|
|
|
- <view class="grading">
|
|
|
+ <!-- <view class="grading">
|
|
|
<img class="grading_l" src="@/images/icon_sy_fjgk.png"/>
|
|
|
<view class="grading_c">分级管控</view>
|
|
|
<view class="grading_r" @click="goPage('grading')">{{gradingCount>0?gradingCount+'项工作待完成':''}}<img src="@/images/icon_wdwg_gd.png"/></view>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
|
|
|
<view class="for-title-p" @click="goSecurityAlertList" v-if="alarmList[0]">
|
|
|
<img class="left-img" src="@/images/Version2.2/icon_aqbj.png">
|
|
@@ -75,7 +84,7 @@
|
|
|
<view>{{minItem}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="button-view" @click="laboratoryInfo(item)">查看详情</view>
|
|
|
+ <view v-if="alarmList.length == index+1" class="button-view" @click="laboratoryInfo(item)">查看详情</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="for-title-p" v-if="dataList[0]">
|
|
@@ -95,7 +104,6 @@
|
|
|
<img src="@/images/icon_14.png">
|
|
|
<view>{{item.subAddrrStr}}</view>
|
|
|
</view>
|
|
|
-
|
|
|
<view class="text-box" v-if="item.sensorFunctionList[0]">
|
|
|
<view class="min-box" v-for="(minItem,index2) in item.sensorFunctionList" :key="index2">
|
|
|
<view class="min-min-box">
|
|
@@ -113,7 +121,18 @@
|
|
|
<script>
|
|
|
import $mqtt from '@/utils/mqtt.min.js';
|
|
|
import { config } from '@/api/request/config.js'
|
|
|
-import { appReceivePhotoNote,getApprovalCount,subject_class,getSafeWarnList,laboratoryInfo,laboratoryList,getLoginUserInfo,outSubjectPhoto,gradingControl,listData} from '@/api/index.js'
|
|
|
+import { appReceivePhotoNote,
|
|
|
+ getApprovalCount,
|
|
|
+ subject_class,
|
|
|
+ getSafeWarnList,
|
|
|
+ laboratoryInfo,
|
|
|
+ laboratoryList,
|
|
|
+ getLoginUserInfo,
|
|
|
+ outSubjectPhoto,
|
|
|
+ gradingControl,
|
|
|
+ listData,
|
|
|
+ getDicts,
|
|
|
+ getGentleIdentifier} from '@/api/index.js'
|
|
|
import { tabBar } from '@/component/tabBar.vue'
|
|
|
import { topWarn } from '@/component/topWarn.vue'
|
|
|
import { navBar } from '@/component/navbar.vue'
|
|
@@ -125,8 +144,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- tenantId:uni.getStorageSync('tenantId'),//0 系统 1化工 2能动
|
|
|
- navHeight: uni.getStorageSync('navHeight'),
|
|
|
+ navHeight: uni.getStorageSync('navHeight'),
|
|
|
title:'实验室安全智能监测与控制系统',
|
|
|
//随手拍数量
|
|
|
appReceivePhotoNoteNum:0,
|
|
@@ -167,6 +185,8 @@ export default {
|
|
|
this.getLoginUserInfo();
|
|
|
this.getGrading();
|
|
|
this.getListData();
|
|
|
+ this.gasBottleSpecificationFun();
|
|
|
+ this.gasBottleLevelFun();
|
|
|
//监听报警信息
|
|
|
getApp().watch(this.getSafeWarnList,'mqttAlarmData');
|
|
|
},
|
|
@@ -252,29 +272,33 @@ export default {
|
|
|
},
|
|
|
//获取报警信息详情
|
|
|
async laboratoryInfo(item){
|
|
|
- let self=this;
|
|
|
- const {data} = await laboratoryInfo(item.subDiyVo.id);
|
|
|
- if(data.code == 200){
|
|
|
- let obj = data.data[0];
|
|
|
- obj.subClassVO = item.subDiyVo.subClassVO;
|
|
|
- obj.name = item.subDiyVo.name;
|
|
|
- obj.subTypeLable = item.subDiyVo.subTypeLable;
|
|
|
- obj.deptName = item.subDiyVo.deptName;
|
|
|
- obj.subAddrrStr = item.subDiyVo.subAddrrStr;
|
|
|
- //循环判断如果是排风扇的话,启动的时候是人工还是预案还是定时
|
|
|
- for(let i=0;i<obj.labHardwareVOList.length;i++){
|
|
|
- if(obj.labHardwareVOList[i].hardwareTypeEnum.hardwareTypeCode == '2'){
|
|
|
- for(let b=0;b<self.fanList.length;b++){
|
|
|
- if(self.fanList[b].dictValue==obj.labHardwareVOList[i].triggerModes){
|
|
|
- obj.labHardwareVOList[i].dictLabel=self.fanList[b].dictLabel
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
uni.navigateTo({
|
|
|
- url: '/pages_manage/workbench/laboratory/laboratoryInfo?item='+encodeURIComponent(JSON.stringify(obj))+'&deptId='+obj.deptId
|
|
|
+ url: '/pages/earlyWarningManage/earlyWarningList'
|
|
|
});
|
|
|
- }
|
|
|
+
|
|
|
+ // let self=this;
|
|
|
+ // const {data} = await laboratoryInfo(item.subDiyVo.id);
|
|
|
+ // if(data.code == 200){
|
|
|
+ // let obj = data.data[0];
|
|
|
+ // obj.subClassVO = item.subDiyVo.subClassVO;
|
|
|
+ // obj.name = item.subDiyVo.name;
|
|
|
+ // obj.subTypeLable = item.subDiyVo.subTypeLable;
|
|
|
+ // obj.deptName = item.subDiyVo.deptName;
|
|
|
+ // obj.subAddrrStr = item.subDiyVo.subAddrrStr;
|
|
|
+ // //循环判断如果是排风扇的话,启动的时候是人工还是预案还是定时
|
|
|
+ // for(let i=0;i<obj.labHardwareVOList.length;i++){
|
|
|
+ // if(obj.labHardwareVOList[i].hardwareTypeEnum.hardwareTypeCode == '2'){
|
|
|
+ // for(let b=0;b<self.fanList.length;b++){
|
|
|
+ // if(self.fanList[b].dictValue==obj.labHardwareVOList[i].triggerModes){
|
|
|
+ // obj.labHardwareVOList[i].dictLabel=self.fanList[b].dictLabel
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: '/pages_manage/workbench/laboratory/laboratoryInfo?item='+encodeURIComponent(JSON.stringify(obj))+'&deptId='+obj.deptId
|
|
|
+ // });
|
|
|
+ // }
|
|
|
},
|
|
|
//获取实验室详情
|
|
|
async laboratoryInfoOne(item){
|
|
@@ -296,7 +320,7 @@ export default {
|
|
|
obj.labHardwareVOList[i].dictLabel=self.fanList[b].dictLabel
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
uni.navigateTo({
|
|
|
url: '/pages_manage/workbench/laboratory/laboratoryInfo?item='+encodeURIComponent(JSON.stringify(obj))+'&deptId='+item.deptId
|
|
@@ -313,18 +337,21 @@ export default {
|
|
|
};
|
|
|
const {data} = await getSafeWarnList(obj);
|
|
|
if(data.code == 200){
|
|
|
- this.alarmList = data.rows;
|
|
|
- if(data.rows[0]){
|
|
|
- this.securityAlertNum = data.rows[0].todayHappenCount;
|
|
|
- }else{
|
|
|
- this.securityAlertNum = 0;
|
|
|
- }
|
|
|
+ this.alarmList = data.data.list;
|
|
|
+ this.securityAlertNum = data.data.count;
|
|
|
+ // if(data.rows[0]){
|
|
|
+ // this.securityAlertNum = data.rows[0].todayHappenCount;
|
|
|
+ // }else{
|
|
|
+ // this.securityAlertNum = 0;
|
|
|
+ // }
|
|
|
}
|
|
|
},
|
|
|
//获取实验室列表
|
|
|
async laboratoryList(){
|
|
|
let self = this;
|
|
|
let obj = {
|
|
|
+ pageNum:1,
|
|
|
+ pageSize:10,
|
|
|
deptId:this.facultyIndex?this.facultyList[this.facultyIndex].deptId:'',
|
|
|
subDept:this.subjectIndex?this.subjectList[this.subjectIndex].dictValue:'',
|
|
|
level:this.levelIndex?this.levelList[this.levelIndex].dictValue:'',
|
|
@@ -399,59 +426,53 @@ export default {
|
|
|
//去安全警报
|
|
|
goSecurityAlertList(){
|
|
|
uni.navigateTo({
|
|
|
- url: '/pages_manage/workbench/securityAlert/securityAlertList',//安全警报
|
|
|
+ url: '/pages/earlyWarningManage/earlyWarningList',//安全警报
|
|
|
});
|
|
|
},
|
|
|
//页面跳转
|
|
|
goPage(type){
|
|
|
- if(this.tenantId==2 && type!='emergencyEvacuation' && type!='alarm'){
|
|
|
- type='none'
|
|
|
- }
|
|
|
- if(type=='casuallyPat'){
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/casuallyPat',//随手拍
|
|
|
- });
|
|
|
- }else if(type=='receiveCasuallyPat'){//收到随手拍
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages_manage/workbench/receiveCasuallyPat/receiveCasuallyPat',
|
|
|
- });
|
|
|
- }else if(type=='accessQualification'){//收到随手拍
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages_manage/workbench/accessQualification/accessQualification',
|
|
|
- });
|
|
|
-
|
|
|
- }else if(type == 'safetyInspect'){//安全检查
|
|
|
+ if(type=='casuallyPat'){
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages_safetyExamine/snapshotManage/snapshotAdd'
|
|
|
+ });
|
|
|
+ }else if(type=='receiveCasuallyPat'){//收到随手拍
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages_manage/workbench/receiveCasuallyPat/receiveCasuallyPat',
|
|
|
+ });
|
|
|
+ }else if(type=='accessQualification'){//收到随手拍
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages_manage/workbench/accessQualification/accessQualification',
|
|
|
+ });
|
|
|
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages_manage/workbench/securityCheck/inspectionRecords',//安全检查
|
|
|
- });
|
|
|
- }
|
|
|
- else if(type == 'alarm'){
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/earlyWarningManage/earlyWarningList',//安全警报
|
|
|
- });
|
|
|
- }else if(type == 'emergencyEvacuation'){
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages_manage/emergencyEvacuationBig',//安全警报
|
|
|
- });
|
|
|
- }else if(type == 'photoInspection'){
|
|
|
- this.outSubjectPhoto();
|
|
|
- }else if(type == 'grading'){
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages_manage/gradingControl/gradingControl',//分级管控
|
|
|
- });
|
|
|
- }else if(type == 'gas'){//气瓶管理
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages_manage/gasManage/gasManage',
|
|
|
- });
|
|
|
- }else if(type == 'none'){
|
|
|
- uni.showToast({
|
|
|
- title: '暂未开放',
|
|
|
- icon:"none",
|
|
|
- mask:true,
|
|
|
- duration: 2000
|
|
|
- });
|
|
|
- }
|
|
|
+ }else if(type == 'safetyInspect'){//安全检查
|
|
|
+ this.getGentleIdentifier();
|
|
|
+ }
|
|
|
+ else if(type == 'alarm'){
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/earlyWarningManage/earlyWarningList',//安全警报
|
|
|
+ });
|
|
|
+ }else if(type == 'emergencyEvacuation'){
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages_manage/emergencyEvacuationBig',//安全警报
|
|
|
+ });
|
|
|
+ }else if(type == 'photoInspection'){
|
|
|
+ this.outSubjectPhoto();
|
|
|
+ }else if(type == 'grading'){
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages_manage/gradingControl/gradingControl',//分级管控
|
|
|
+ });
|
|
|
+ }else if(type == 'gasManage'){//气瓶管理
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/gasBottle/gasManage/gasManage',
|
|
|
+ });
|
|
|
+ }else if(type == 'none'){
|
|
|
+ uni.showToast({
|
|
|
+ title: '暂未开放',
|
|
|
+ icon:"none",
|
|
|
+ mask:true,
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ }
|
|
|
},//获取拍照检查配置
|
|
|
async outSubjectPhoto(){
|
|
|
const {data} = await outSubjectPhoto();
|
|
@@ -498,6 +519,53 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ //获取用户身份标识"adminGentle": false, 管理员身份 "rectifyGentle": false, 整改身份"applyGentle": false 检查者身份
|
|
|
+ async getGentleIdentifier(){
|
|
|
+ let self = this;
|
|
|
+ const {data} = await getGentleIdentifier();
|
|
|
+ if(data.code==200){
|
|
|
+ let pageType = null
|
|
|
+ // 如果是管理员 检查者和整改者
|
|
|
+ let list=[];
|
|
|
+ if(data.data.adminGentle){
|
|
|
+ list.push({name:'管理员',pageType:1})
|
|
|
+ }
|
|
|
+ if(data.data.applyGentle ||data.data.myApplyGentle){
|
|
|
+ list.push({name:'检查者',pageType:2})
|
|
|
+ }
|
|
|
+ if(data.data.rectifyGentle){
|
|
|
+ list.push({name:'整改者',pageType:3})
|
|
|
+ }
|
|
|
+ uni.setStorageSync('gentleIdentifier',list)
|
|
|
+ uni.setStorageSync('gentleIdentifierData',data.data)
|
|
|
+ if(list.length>0){
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/safetyExamineWorkbench',
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ uni.showToast({
|
|
|
+ title: '没有相关权限',
|
|
|
+ icon:"none",
|
|
|
+ mask:true,
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //气瓶规格
|
|
|
+ async gasBottleSpecificationFun(){
|
|
|
+ const {data} = await getDicts('gasBottleSpecification');
|
|
|
+ if(data.code == 200){
|
|
|
+ uni.setStorageSync('gasBottleSpecification', data.data)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //气瓶级别
|
|
|
+ async gasBottleLevelFun(){
|
|
|
+ const {data} = await getDicts('gasBottleLevel');
|
|
|
+ if(data.code == 200){
|
|
|
+ uni.setStorageSync('gasBottleLevel', data.data)
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
beforeDestroy(){
|
|
|
//断开mqtt连接
|
|
@@ -544,14 +612,58 @@ export default {
|
|
|
}
|
|
|
.big-icon-button-box{
|
|
|
display flex;
|
|
|
+ justify-content: space-between;
|
|
|
margin:20rpx;
|
|
|
- img{
|
|
|
- width:350rpx;
|
|
|
- height:150rpx;
|
|
|
- }
|
|
|
- img:nth-child(2){
|
|
|
- margin-left:10rpx;
|
|
|
- }
|
|
|
+ .big-icon-button-box_l{
|
|
|
+ background: url("../images/img_bg_qpgl.png") no-repeat;
|
|
|
+ background-size: 372rpx 260rpx;
|
|
|
+ width:372rpx;
|
|
|
+ height:260rpx;
|
|
|
+ // .big-icon-button-box_bg{
|
|
|
+ // width:372rpx;
|
|
|
+ // height:260rpx;
|
|
|
+ // }
|
|
|
+ .big-icon-button-box_t1{
|
|
|
+ width: 149rpx;
|
|
|
+ height: 40rpx;
|
|
|
+ background: rgba(225,225,225,0.3);
|
|
|
+ border-radius: 2rpx;
|
|
|
+ font-size: 24rpx;
|
|
|
+ font-family: Microsoft YaHei;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #333333;
|
|
|
+ line-height: 40rpx;
|
|
|
+ text-align: center;
|
|
|
+ margin:94rpx 0 0 181rpx;
|
|
|
+ // position:absolute;
|
|
|
+ // right: 42rpx;
|
|
|
+ // top: 94rpx;
|
|
|
+
|
|
|
+ }
|
|
|
+ .big-icon-button-box_t2{
|
|
|
+ width: 175rpx;
|
|
|
+ height: 20rpx;
|
|
|
+ font-size: 18rpx;
|
|
|
+ font-family: Microsoft YaHei;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #333333;
|
|
|
+ line-height: 20rpx;
|
|
|
+ margin:20rpx 0 0 181rpx;
|
|
|
+ // position:absolute;
|
|
|
+ // right: 28rpx;
|
|
|
+ // top: 148rpx;
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .big-icon-button-box_r{
|
|
|
+ img{
|
|
|
+ width:320rpx;
|
|
|
+ height:120rpx;
|
|
|
+ }
|
|
|
+ >img:nth-of-type(2){
|
|
|
+ margin-top: 20rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
/* 分级管控 */
|
|
|
.grading{
|
|
@@ -702,7 +814,7 @@ export default {
|
|
|
background #fff
|
|
|
padding-left:25rpx;
|
|
|
display flex
|
|
|
- margin:0 20rpx;
|
|
|
+ margin:20rpx 20rpx 0;
|
|
|
border-bottom:1rpx solid #e0e0e0;
|
|
|
.left-img{
|
|
|
height:34rpx;
|
|
@@ -738,13 +850,13 @@ export default {
|
|
|
margin:0 20rpx;
|
|
|
border-bottom-left-radius 20rpx
|
|
|
border-bottom-right-radius 20rpx
|
|
|
+ overflow: hidden;
|
|
|
.for-box:nth-child(1){
|
|
|
border-top:none;
|
|
|
}
|
|
|
.for-box{
|
|
|
border-top:4rpx solid #dedede;
|
|
|
background #fff
|
|
|
- margin-bottom:20rpx;
|
|
|
overflow: hidden
|
|
|
.title-box{
|
|
|
margin:20rpx 20rpx 0;
|