图纸逻辑优化

main
jinna 2 years ago
parent 805cf4b1e7
commit b38a00b5f5
  1. 23
      src/components/monitoring/clickCp.vue
  2. 5
      src/components/monitoring/conditioner.vue
  3. 10
      src/components/monitoring/door.vue
  4. 9
      src/components/monitoring/electricity.vue
  5. 11
      src/components/monitoring/firefighting.vue
  6. 188
      src/components/monitoring/lift.vue
  7. 4
      src/components/monitoring/light.vue
  8. 7
      src/components/monitoring/monitoring.vue
  9. 8
      src/components/monitoring/wall.vue
  10. 4
      src/components/monitoring/warm.vue
  11. 6
      src/components/monitoring/water.vue
  12. 4
      src/views/equipment/drawManage.vue

@ -310,7 +310,7 @@ export default {
},
methods: {
//
getTypeList(active,type,area){
getTypeList(type){
console.log('专业-区域-楼号-楼层 ====>',this.sbType,this.bimModel,'type ====>',type,'active ====>',this.active,'ttActive ===>',this.ttActive, this.tower)
let _draweClass = this.sbTypeKeys[this.sbType];
if(type == 'build'){
@ -358,6 +358,27 @@ export default {
}
console.log('typeList ====>',this.typeList, this.page)
})
}else if(type == ''){
let build = this.bimModel == 1 ? this.active : this.ttActive;
console.log('bimModel ====>',this.bimModel,'draweClass ===>',_draweClass,'build ===>',build)
this.typeList = [];
getDrawList({current:1,size:200,draweClass:_draweClass,region:_draweClass+'-'+this.bimModel}).then(res =>{
let arr = res.data.data.records
arr.map(item =>{
this.typeList.push(item)
})
//
let pageCount = Math.ceil(this.typeList.length / 10);
let _pageArr = [];
for(let i = 1; i <= pageCount; i++){
_pageArr.push(i);
}
this.page = {
current: 1,
pageCount: _pageArr
}
console.log('typeList ====>',this.typeList, this.page)
})
}
},

@ -532,10 +532,13 @@ export default {
bfHelper.lookEquipmentCop("空调");
this.getNavigationMap();
bfHelper.setOpacityFun();
setTimeout(() =>{
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.active = 25;
this.$refs.clickcp.getTypeList(25,'build',1)
this.$refs.clickcp.getTypeList('build')
},300)
// setTimeout(() => {
this.initial();
// },300)

@ -527,10 +527,13 @@ export default {
// 线
bfHelper.lookPipeline(null, null, this.condition, "电子门禁");
bfHelper.setOpacityFun();
setTimeout(() =>{
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.active = 25;
this.$refs.clickcp.getTypeList(25,'build',1)
this.$refs.clickcp.getTypeList('build')
},300)
this.getNavigationMap();
// this.initial()
}
@ -614,9 +617,12 @@ export default {
} else {
// 线
bfHelper.TtLookEquipmentCop("电子门禁");
setTimeout(() =>{
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.getTypeList(20,'build',2);
this.$refs.clickcp.getTypeList('build');
},300)
bfHelper.setOpacityFun1();
}
}

@ -621,7 +621,7 @@ export default {
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.active = 25;
this.$refs.clickcp.getTypeList(25,'build',1)
this.$refs.clickcp.getTypeList('build')
})
setOpacityFun(false,0.3);
this.getNavigationMap();
@ -705,11 +705,14 @@ export default {
);
}
} else {
TtLookEquipmentCop("电");
setTimeout(() =>{
this.$refs.clickcp.active = 20
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.getTypeList(20,'build',2);
this.$refs.clickcp.getTypeList('build');
},300)
TtLookEquipmentCop("电");
setOpacityFun1();
}
}

@ -341,6 +341,9 @@ export default {
this.getFightWarnList(); //bim
this.getFiredWarnList(); //
this.addWaterLabel();
// setTimeout(() =>{
// this.$refs.clickcp.getTypeList('build')
// },300)
},
},
//
@ -438,10 +441,12 @@ export default {
} else {
bfHelper.lookEquipmentCop("消防", this.checkList);
bfHelper.setOpacityFun();
setTimeout(() =>{
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.active = 25;
this.$refs.clickcp.getTypeList(25,'build',1)
this.$refs.clickcp.getTypeList('build')
},300)
this.getNavigationMap();
}
} else {
@ -529,10 +534,12 @@ export default {
} else {
// 线
bfHelper.TtLookEquipmentCop("消防", this.checkList);
setTimeout(() =>{
this.$refs.clickcp.active = 20
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.getTypeList(20,'build',2);
this.$refs.clickcp.getTypeList('build');
},300)
bfHelper.setOpacityFun1();
}
}

@ -145,7 +145,36 @@
</el-pagination>
</div>
</div>
<!-- 图纸列表 -->
<div v-if="typeList.length != 0" style="position:absolute; top:40px;display: flex;
flex-direction: column;
flex-wrap: wrap;"
:style="{'left': bimModel == 1 ? '367px' : bimModel == 2 ? '217px' : ''}">
<el-button @click="previewImg" style="
background-color: #00BFB7;
color: #fff;
border: 0;
width:136px;
height: 30px;
border-radius:0;
text-align:left;
font-size:14px;"
size="small"
>图纸预览<span style="margin-left:20px;">{{isShowType?'收起':'展开'}}</span></el-button>
</div>
<div v-show="isShowType" class="cadimg-box"
:style="{'left': bimModel == 1 ? '367px' : bimModel == 2 ? '217px' : ''}">
<div @click="clickPreview(index)" v-for="(item,index) in typeList" :key="item.id" class="cadimg-item" v-if="((page.current-1)*10) <= index && index < ((page.current-1)*10 + 10)">
<div class="cadimg-name">{{item.originalName}}</div>
<i class="el-icon-zoom-in" />
</div>
<!-- 分页 -->
<div class="cadimg-pagination" v-if="typeList.length > 10">
<span @click="page.current = index + 1" class="pagination-dot" v-for="(item,index) in page.pageCount" :class="(index+1) == page.current ? 'active':''" :key="'pageNo_'+index"></span>
</div>
</div>
<!-- 图片预览 -->
<el-image style="width: 0; height: 0;opacity: 0;" ref="preview" :initial-index="initialIndex" :src="url" :preview-src-list="srcList"></el-image>
</div>
</template>
@ -162,6 +191,7 @@ import {
} from '@/api/garden/monitoring';
import backHome from './backHome';
import { dateFormat } from "@/util/date";
import {getDrawList} from '@/api/equipment/drawManage'
export default {
props: {
dtState: {
@ -243,6 +273,11 @@ export default {
tower: null,
layer: null,
liftArr: [],
typeList:[],
page:{},
isShowType:false,
initialIndex: 0,//
srcList: [],
}
},
watch: {
@ -267,6 +302,7 @@ export default {
bfHelper.setOpacityFun();
setTimeout(() => {
this.setTowerLift();
this.getList()
}, 300);
bfHelper.setCameraStatus({
aspect: 1.889763779527559,
@ -302,6 +338,7 @@ export default {
this.setTowerLift();
setTimeout(() => {
this.liftCustom1()
this.getList()
}, 500);
}
}
@ -346,6 +383,107 @@ export default {
bfHelper.clearComponent();
},
methods: {
//
getList(){
this.typeList = []
if(this.bimModel == 1){
getDrawList({current:1,size:200,draweClass:'7',region:'7-1',build:'7-1-25'}).then(res =>{
let arr = res.data.data.records
if(arr.length == 0){
this.typeList = []
}else{
arr.map(item =>{
this.typeList.push(item)
})
}
//
let pageCount = Math.ceil(this.typeList.length / 10);
let _pageArr = [];
for(let i = 1; i <= pageCount; i++){
_pageArr.push(i);
}
this.page = {
current: 1,
pageCount: _pageArr
}
console.log('typeList ====>',this.typeList, this.page)
})
}else{
getDrawList({current:1,size:200,draweClass:'7',region:'7-2',}).then(res =>{
let arr = res.data.data.records
if(arr.length == 0){
this.typeList = []
}else{
arr.map(item =>{
this.typeList.push(item)
})
}
//
let pageCount = Math.ceil(this.typeList.length / 10);
let _pageArr = [];
for(let i = 1; i <= pageCount; i++){
_pageArr.push(i);
}
this.page = {
current: 1,
pageCount: _pageArr
}
console.log('typeList ====>',this.typeList, this.page)
})
}
},
previewImg(){
this.isShowType = !this.isShowType;
console.log('isShowType ====>',this.isShowType)
if(this.isShowType) {
this.page.current = 1;
//
this.getList();
}
},
//
clickPreview(index){
let arr =this.typeList.map((item) => {
return item.url
})
this.srcList = arr;
this.initialIndex = index;
this.url = this.srcList[index];
this.cadingName = this.typeList[index].originalName;
setTimeout(() =>{
this.$refs.preview.clickHandler();
this.$nextTick(() => {
let wrapEle = document.getElementsByClassName('el-image-viewer__wrapper');
let prevEle = document.getElementsByClassName('el-image-viewer__prev');
let nextEle = document.getElementsByClassName('el-image-viewer__next');
let closeEle = document.getElementsByClassName('el-image-viewer__close');
//dom
let divEle = document.createElement('div');
divEle.setAttribute('class','el-image-viewer-fixedname');
divEle.setAttribute('style','position:fixed;left:50%;top:60px;width:220px;color:#fff;text-align:center;background:#606266;border-radius:50px;padding:10px;margin-left:-120px;z-index:2002');
wrapEle[0].append(divEle);
let divEle2 = document.getElementsByClassName('el-image-viewer-fixedname');
divEle2[0].innerText = this.cadingName;
if(prevEle != 'undefined'){
prevEle[0].addEventListener('click',(e) => {
let src = document.getElementsByClassName('el-image-viewer__canvas')[0].children[0].getAttribute('src');
let idx = this.typeList.findIndex(item => item.url == src);
this.cadingName = this.typeList[idx].originalName;
divEle2[0].innerText = this.cadingName;
})
}
if(nextEle != 'undefined'){
nextEle[0].addEventListener('click',(e) => {
let src = document.getElementsByClassName('el-image-viewer__canvas')[0].children[0].getAttribute('src');
let idx = this.typeList.findIndex(item => item.url == src);
this.cadingName = this.typeList[idx].originalName;
divEle2[0].innerText = this.cadingName;
})
}
})
},500)
},
tableContext(row,column, event){
event.preventDefault(); //
const routerUrl = this.$router.resolve({ path: '/equipment/index', query: {code: row.code } });
@ -1348,6 +1486,54 @@ export default {
}
}
//
.cadimg-box{
position:absolute;
top:70px;
width: 107px;
display: flex;
flex-direction: column;
background: rgba(3,22,57,0.3);
color: #fff;
font-size: 14px;
padding: 0 15px 0 14px;
line-height: 36px;
height: 400px;
.cadimg-item{
display: flex;
align-items: center;
cursor: pointer;
&:hover,&.active{
color:#07a7ff;
}
.cadimg-name{
width: 100px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.cadimg-pagination{
position: absolute;
left: 0;
right:0;
bottom: 15px;
display: flex;
justify-content: center;
.pagination-dot{
cursor: pointer;
display: inline-block;
width: 8px;
height:8px;
background: rgba(255,255,255,0.2);
border-radius:4px;
margin:0 5px;
&.active{
background:#c3e1ea;
}
}
}
}
</style>
<style scoped lang="scss">

@ -418,10 +418,12 @@ export default {
} else {
bfHelper.lookEquipmentCop("照明");
bfHelper.setOpacityFun();
setTimeout(() =>{
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.active = 25;
this.$refs.clickcp.getTypeList(25,'build',1)
this.$refs.clickcp.getTypeList('build')
},300)
this.getNavigationMap();
}
} else {

@ -467,7 +467,7 @@ export default {
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.active = 25;
this.$refs.clickcp.getTypeList(25,'build',1)
this.$refs.clickcp.getTypeList('build')
this.$refs.clickcp.tower = null;
}, 300);
this.initial();
@ -556,10 +556,13 @@ export default {
bfHelper.TtLookEquipmentCop("监控", null, this.condition);
// bfHelper.setCameraStatus(this.startCamera)
bfHelper.setOpacityFun1();
setTimeout(() =>{
this.$refs.clickcp.active = 20
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.getTypeList(20,'build',2);
this.$refs.clickcp.getTypeList('build');
},300)
this.initial();
}
}

@ -738,6 +738,10 @@ export default {
if (build) {
setTimeout(() => {
this.setTowerWall();
this.$refs.clickcp.active = 25
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.getTypeList('build')
}, 300);
bfHelper.lookEquipmentCop("电子围界");
} else {
@ -777,6 +781,10 @@ export default {
} else {
// 线
bfHelper.TtLookEquipmentCop("电子围界");
setTimeout(() => {
this.$refs.clickcp.type = '';
this.$refs.clickcp.getTypeList('')
}, 300)
// window.sessionStorage.setItem(
// "ttcamera",

@ -579,10 +579,12 @@ export default {
bfHelper.lookEquipmentCop("暖");
bfHelper.setOpacityFun();
this.getNavigationMap();
setTimeout(() =>{
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.active = 25;
this.$refs.clickcp.getTypeList(25,'build',1)
this.$refs.clickcp.getTypeList('build')
},300)
}
} else {
}

@ -430,6 +430,10 @@ export default {
if (this.bimModel == 1) {
setTimeout(() => {
this.setTowerWater();
this.$refs.clickcp.active = 25
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.getTypeList('build')
}, 300)
bfHelper.lookEquipmentCop("水");
bfHelper.setOpacityFun();
@ -462,6 +466,8 @@ export default {
} else {
setTimeout(() => {
this.setTowerWater();
this.$refs.clickcp.type = '';
this.$refs.clickcp.getTypeList('')
}, 300)
bfHelper.TtLookEquipmentCop("水");
bfHelper.setOpacityFun1();

@ -432,7 +432,7 @@ import {getList} from '@/api/equipment/drawClassify'
this.dataForm.build = ''
let tmp = this.regionData.find(item => item.dictKey == val)
this.buildData = tmp ? tmp.children : []
if(this.dataForm.region == '2-2' && this.dataForm.draweClass == '2'){
if((this.dataForm.region == '2-2' && this.dataForm.draweClass == '2') || (this.dataForm.region == '7-2' && this.dataForm.draweClass == '7') || (this.dataForm.region == '10-2' && this.dataForm.draweClass == '10')){
this.dataRules.build[0].required = false
}else{
this.dataRules.build[0].required = true
@ -459,7 +459,7 @@ import {getList} from '@/api/equipment/drawClassify'
floor:this.floor,
url:''
}
if(this.dataForm.region == '2-2' && this.dataForm.draweClass == '2'){
if((this.dataForm.region == '2-2' && this.dataForm.draweClass == '2') || (this.dataForm.region == '7-2' && this.dataForm.draweClass == '7') || (this.dataForm.region == '10-2' && this.dataForm.draweClass == '10')){
this.dataRules.build[0].required = false
}else{
this.dataRules.build[0].required = true

Loading…
Cancel
Save