|
@@ -247,7 +247,8 @@ import {
|
|
|
endEvacuation,
|
|
|
selectTriggerInfo,
|
|
|
riskPlanId,
|
|
|
- airbottleStockFindClassifyBySubId
|
|
|
+ airbottleStockFindClassifyBySubId,
|
|
|
+ airbottleBluetoothGetBeaconNotice
|
|
|
} from '@/api/index.js'
|
|
|
export default {
|
|
|
data() {
|
|
@@ -724,48 +725,66 @@ export default {
|
|
|
//获取预案数据
|
|
|
async selectTriggerInfo(type){
|
|
|
let self = this;
|
|
|
+ let newList = [];
|
|
|
const {data} = await selectTriggerInfo();
|
|
|
if(data.code == 200){
|
|
|
- if(type == 1){
|
|
|
- //标记楼栋
|
|
|
- for(let o=0;o<self.buildingList.length;o++){
|
|
|
- for(let i=0;i<data.data.length;i++){
|
|
|
- if(data.data[i].buildId == self.buildingList[o].id){
|
|
|
- self.buildingList[o].name.replace('(预案发生)')
|
|
|
- self.buildingList[o].name = '(预案发生) '+self.buildingList[o].name
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- if(type == 2){
|
|
|
- //标记楼层
|
|
|
- for(let o=0;o<self.floorList.length;o++){
|
|
|
- for(let i=0;i<data.data.length;i++){
|
|
|
- if(data.data[i].floorId == self.floorList[o].id){
|
|
|
- self.floorList[o].name.replace('(预案发生)')
|
|
|
- self.floorList[o].name = '(预案发生) '+self.floorList[o].name
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- if(type == 3){
|
|
|
- //标记实验室
|
|
|
- for(let o=0;o<self.fjListArray.length;o++){
|
|
|
- for(let i=0;i<data.data.length;i++){
|
|
|
- if(data.data[i].subId == self.fjListArray[o].subId){
|
|
|
- console.log('预案')
|
|
|
- console.log(data.data[i])
|
|
|
- self.planStatus=true;//如果有预案发生
|
|
|
- self.$set(this,'groupId',data.data[i].groupId)
|
|
|
- self.fjListArray[o].subName.replace('(预案发生)')
|
|
|
- self.fjListArray[o].subName = '(预案发生) '+self.fjListArray[o].subName
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- console.log('data.data',data.data);
|
|
|
+ newList = newList.concat(data.data);
|
|
|
+ this.airbottleBluetoothGetBeaconNotice(type,newList);
|
|
|
+ }
|
|
|
+ console.log('data.data1',data.data);
|
|
|
+ console.log('type',type);
|
|
|
},
|
|
|
+ async airbottleBluetoothGetBeaconNotice(type,list){
|
|
|
+ console.log('type',type);
|
|
|
+ let self = this;
|
|
|
+ let newList = list;
|
|
|
+ const {data} = await airbottleBluetoothGetBeaconNotice();
|
|
|
+ if(data.code == 200){
|
|
|
+ newList = newList.concat(data.data);
|
|
|
+ if(type == 1){
|
|
|
+ //标记楼栋
|
|
|
+ for(let o=0;o<self.buildingList.length;o++){
|
|
|
+ for(let i=0;i<newList.length;i++){
|
|
|
+ if(newList[i].buildId == self.buildingList[o].id){
|
|
|
+ if(!self.buildingList[o].nameType){
|
|
|
+ self.buildingList[o].name = '(预案发生) '+self.buildingList[o].name
|
|
|
+ self.buildingList[o].nameType = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(type == 2){
|
|
|
+ //标记楼层
|
|
|
+ for(let o=0;o<self.floorList.length;o++){
|
|
|
+ for(let i=0;i<newList.length;i++){
|
|
|
+ if(newList[i].floorId == self.floorList[o].id){
|
|
|
+ if(!self.floorList[o].nameType){
|
|
|
+ self.floorList[o].name = '(预案发生)'+self.floorList[o].name
|
|
|
+ self.floorList[o].nameType = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(type == 3){
|
|
|
+ //标记实验室
|
|
|
+ for(let o=0;o<self.fjListArray.length;o++){
|
|
|
+ for(let i=0;i<newList.length;i++){
|
|
|
+ if(newList[i].subId == self.fjListArray[o].subId){
|
|
|
+ if(!self.fjListArray[o].nameType){
|
|
|
+ self.planStatus=true;//如果有预案发生
|
|
|
+ self.$set(this,'groupId',newList[i].groupId)
|
|
|
+ self.fjListArray[o].subName.replace('(预案发生)','')
|
|
|
+ self.fjListArray[o].subName = '(预案发生)'+self.fjListArray[o].subName
|
|
|
+ self.fjListArray[o].nameType = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
getAppExitLine() {
|
|
|
let list = [{
|
|
|
type: "lab/exit/line"
|