|
@@ -1,7 +1,7 @@
|
|
|
<!-- 管理端工作台 -->
|
|
|
<template>
|
|
|
<view class="manage-workbench" :style="{paddingTop:navHeight+'rpx'}">
|
|
|
- <nav-bar :title="title"></nav-bar>
|
|
|
+ <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;">
|
|
@@ -21,7 +21,7 @@
|
|
|
<img src="@/images/Version2.2/icon_sy_zrsq.png">
|
|
|
<view>准入审核</view>
|
|
|
</view>
|
|
|
- <view @click="goPage('none')">
|
|
|
+ <view @click="goPage('gas')">
|
|
|
<img src="@/images/Version3.0/icon_sy_qpgl.png">
|
|
|
<view>气瓶管理</view>
|
|
|
</view>
|
|
@@ -95,14 +95,14 @@
|
|
|
<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">
|
|
|
- <img v-show="minItem.hasWarn" src="@/images/icon_15.png">
|
|
|
- <view :class="{'colorA':minItem.hasWarn}">{{minItem.funcName}}:{{minItem.formatVal?minItem.formatVal:'-'}}</view>
|
|
|
- </view>
|
|
|
- </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">
|
|
|
+ <img v-show="minItem.hasWarn" src="@/images/icon_15.png">
|
|
|
+ <view :class="{'colorA':minItem.hasWarn}">{{minItem.funcName}}:{{minItem.formatVal?minItem.formatVal:'-'}}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<tab-bar></tab-bar>
|
|
@@ -120,12 +120,12 @@ export default {
|
|
|
components: {
|
|
|
tabBar,
|
|
|
topWarn,
|
|
|
- navBar
|
|
|
+ navBar
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- navHeight: uni.getStorageSync('navHeight'),
|
|
|
- title:'实验室安全智能监测与控制系统',
|
|
|
+ navHeight: uni.getStorageSync('navHeight'),
|
|
|
+ title:'实验室安全智能监测与控制系统',
|
|
|
//随手拍数量
|
|
|
appReceivePhotoNoteNum:0,
|
|
|
//准入数量
|
|
@@ -150,7 +150,7 @@ export default {
|
|
|
buttonArray:[],
|
|
|
gradingCount:0,//分级管控未完成总数
|
|
|
homepageBanner:uni.getStorageSync('homepageBanner'),
|
|
|
- fanList:[],//控制记录触发方式
|
|
|
+ fanList:[],//控制记录触发方式
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -164,24 +164,24 @@ export default {
|
|
|
this.getSafeWarnList();
|
|
|
this.getLoginUserInfo();
|
|
|
this.getGrading();
|
|
|
- this.getListData();
|
|
|
+ this.getListData();
|
|
|
//监听报警信息
|
|
|
getApp().watch(this.getSafeWarnList,'mqttAlarmData');
|
|
|
},
|
|
|
methods: {
|
|
|
- //查询控制记录触发方式
|
|
|
- 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 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
|
|
|
+ }
|
|
|
+ },
|
|
|
//暂无提示
|
|
|
goCheckPage(){
|
|
|
if(this.userInfo.isadmin){
|
|
@@ -250,7 +250,7 @@ export default {
|
|
|
},
|
|
|
//获取报警信息详情
|
|
|
async laboratoryInfo(item){
|
|
|
- let self=this;
|
|
|
+ let self=this;
|
|
|
const {data} = await laboratoryInfo(item.subDiyVo.id);
|
|
|
if(data.code == 200){
|
|
|
let obj = data.data[0];
|
|
@@ -259,16 +259,16 @@ export default {
|
|
|
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
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ //循环判断如果是排风扇的话,启动的时候是人工还是预案还是定时
|
|
|
+ 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
|
|
|
});
|
|
@@ -276,7 +276,7 @@ export default {
|
|
|
},
|
|
|
//获取实验室详情
|
|
|
async laboratoryInfoOne(item){
|
|
|
- let self=this;
|
|
|
+ let self=this;
|
|
|
const {data} = await laboratoryInfo(item.id);
|
|
|
if(data.code == 200){
|
|
|
let obj = data.data[0];
|
|
@@ -286,16 +286,16 @@ export default {
|
|
|
obj.deptName = item.deptName;
|
|
|
obj.subAddrrStr = item.subAddrrStr;
|
|
|
obj.sensorFunctionList = item.sensorFunctionList;
|
|
|
- //循环判断如果是排风扇的话,启动的时候是人工还是预案还是定时
|
|
|
- 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
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ //循环判断如果是排风扇的话,启动的时候是人工还是预案还是定时
|
|
|
+ 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='+item.deptId
|
|
|
});
|
|
@@ -353,24 +353,24 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
this.dataList = data.data;
|
|
|
- let list = [];
|
|
|
- let obj = {
|
|
|
- type:"lab/function/data",
|
|
|
- idList:[],
|
|
|
- }
|
|
|
- for(let i=0;i<self.dataList.length;i++){
|
|
|
- let num = 0;
|
|
|
- for(let o=0;o<obj.idList.length;o++){
|
|
|
- if(obj.idList[o] == self.dataList[i].id){
|
|
|
- num++
|
|
|
- }
|
|
|
- }
|
|
|
- if(num == 0){
|
|
|
- obj.idList.push(self.dataList[i].id)
|
|
|
- }
|
|
|
- }
|
|
|
- list.push({type:"lab/riskPlan/trigger/notice",});
|
|
|
- getApp().appMqttOn(1,list);
|
|
|
+ let list = [];
|
|
|
+ let obj = {
|
|
|
+ type:"lab/function/data",
|
|
|
+ idList:[],
|
|
|
+ }
|
|
|
+ for(let i=0;i<self.dataList.length;i++){
|
|
|
+ let num = 0;
|
|
|
+ for(let o=0;o<obj.idList.length;o++){
|
|
|
+ if(obj.idList[o] == self.dataList[i].id){
|
|
|
+ num++
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(num == 0){
|
|
|
+ obj.idList.push(self.dataList[i].id)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ list.push({type:"lab/riskPlan/trigger/notice",});
|
|
|
+ getApp().appMqttOn(1,list);
|
|
|
}
|
|
|
},
|
|
|
//获取输入数量
|
|
@@ -404,19 +404,19 @@ export default {
|
|
|
goPage(type){
|
|
|
if(type=='casuallyPat'){
|
|
|
uni.navigateTo({
|
|
|
- url: '/pages_safetyExamine/snapshotManage/snapshotAdd',//随手拍
|
|
|
+ url: '/pages/casuallyPat',//随手拍
|
|
|
});
|
|
|
- }else if(type=='receiveCasuallyPat'){
|
|
|
+ }else if(type=='receiveCasuallyPat'){//收到随手拍
|
|
|
uni.navigateTo({
|
|
|
url: '/pages_manage/workbench/receiveCasuallyPat/receiveCasuallyPat',
|
|
|
});
|
|
|
- }else if(type=='accessQualification'){
|
|
|
+ }else if(type=='accessQualification'){//收到随手拍
|
|
|
uni.navigateTo({
|
|
|
url: '/pages_manage/workbench/accessQualification/accessQualification',
|
|
|
});
|
|
|
|
|
|
}else if(type == 'safetyInspect'){//安全检查
|
|
|
- this.getGentleIdentifier();
|
|
|
+ this.getGentleIdentifier();
|
|
|
// uni.navigateTo({
|
|
|
// url: '/pages_manage/workbench/securityCheck/inspectionRecords',//安全检查
|
|
|
// });
|
|
@@ -424,11 +424,11 @@ export default {
|
|
|
}
|
|
|
else if(type == 'alarm'){
|
|
|
uni.navigateTo({
|
|
|
- url: '/pages/earlyWarningManage/earlyWarningList',//安全警报
|
|
|
+ url: '/pages_manage/workbench/securityAlert/securityAlertList',//安全警报
|
|
|
});
|
|
|
}else if(type == 'emergencyEvacuation'){
|
|
|
uni.navigateTo({
|
|
|
- url: '/pages_manage/emergencyEvacuationBig',
|
|
|
+ url: '/pages_manage/emergencyEvacuationBig',//安全警报
|
|
|
});
|
|
|
}else if(type == 'photoInspection'){
|
|
|
this.outSubjectPhoto();
|
|
@@ -441,13 +441,13 @@ export default {
|
|
|
url: '/pages_manage/gasManage/gasManage',
|
|
|
});
|
|
|
}else if(type == 'none'){
|
|
|
- uni.showToast({
|
|
|
- title: '暂未开放',
|
|
|
- icon:"none",
|
|
|
- mask:true,
|
|
|
- duration: 2000
|
|
|
- });
|
|
|
- }
|
|
|
+ uni.showToast({
|
|
|
+ title: '暂未开放',
|
|
|
+ icon:"none",
|
|
|
+ mask:true,
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ }
|
|
|
},//获取拍照检查配置
|
|
|
async outSubjectPhoto(){
|
|
|
const {data} = await outSubjectPhoto();
|
|
@@ -494,43 +494,43 @@ 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
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
+ //获取用户身份标识"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
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
beforeDestroy(){
|
|
|
- //断开mqtt连接
|
|
|
- getApp().offMQTT();
|
|
|
+ //断开mqtt连接
|
|
|
+ getApp().offMQTT();
|
|
|
//删除报警监听
|
|
|
getApp().deleteAlarmWatch();
|
|
|
//删除传感器监听
|