main
zhangqun 3 years ago
parent 9d087b3c85
commit 2b42311911
  1. BIN
      public/img/cad/1-1F.jpg
  2. BIN
      public/img/cad/2-1F.jpg
  3. BIN
      public/img/cad/3-1F.jpg
  4. BIN
      public/img/cad/4-1F.jpg
  5. BIN
      public/img/cad/5-1F.jpg
  6. BIN
      public/img/cad/6-1F.jpg
  7. 39
      src/api/equipment/drawClassify.js
  8. 57
      src/api/equipment/drawManage.js
  9. 2
      src/components/monitoring/backHome.vue
  10. 244
      src/components/monitoring/clickCp.vue
  11. 15
      src/components/monitoring/conditioner.vue
  12. 28
      src/components/monitoring/door.vue
  13. 31
      src/components/monitoring/electricity.vue
  14. 30
      src/components/monitoring/firefighting.vue
  15. 16
      src/components/monitoring/light.vue
  16. 30
      src/components/monitoring/monitoring.vue
  17. 19
      src/components/monitoring/warm.vue
  18. 8
      src/router/axios.js
  19. 246
      src/views/equipment/drawClassify.vue
  20. 682
      src/views/equipment/drawManage.vue
  21. 3
      src/views/garden/index.vue
  22. 11
      vue.config.js

Binary file not shown.

After

Width:  |  Height:  |  Size: 682 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 842 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 669 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 909 KiB

@ -0,0 +1,39 @@
import request from "@/router/axios";
// 获取图纸分类列表
export const getList = (query) => {
return request({
url: "/api/blade-desk/drawe/class/list",
method: "get",
params: query,
});
};
// 新增图纸分类
export const addClassify = (data) =>{
return request({
url:'/api/blade-desk/drawe/class/save',
method:'post',
data
})
}
// 编制图纸分类
export const editClassify = (data) =>{
return request({
url:"/api/blade-desk/drawe/class/update",
method:'post',
data
})
}
// 删除图纸分类
export const deleteClassify = (ids) =>{
return request({
url:'/api/blade-desk/drawe/class/remove',
method:'post',
params:{
ids
}
})
}

@ -0,0 +1,57 @@
import request from "@/router/axios";
// 获取字典数据
export const getDict = (query) =>{
return request({
url:'/api/blade-system/dict-biz/child-list',
method:'get',
params:query
})
}
// 获取图纸列表
export const getDrawList = (query) => {
return request({
url: "/api/blade-desk/drawe/list",
method: "get",
params: query,
});
};
// 上传图纸
export const addDraw = (data) =>{
return request({
url:"/api/blade-desk/drawe/save",
method:'post',
data
})
}
// 编辑图纸
export const editDraw = (data) =>{
return request({
url:'/api/blade-desk/drawe/update',
method:'post',
data
})
}
// 图纸删除
export const deleteDraw = (ids) =>{
return request({
url:'/api/blade-desk/drawe/remove',
method:'post',
params:{
ids
}
})
}
// 树状结构数据
export const getTerrData = (query) =>{
return request({
url:'/api/blade-desk/drawe/class/tree',
method:'get',
params:query
})
}

@ -94,6 +94,8 @@
// if(this.type != ''){
bfHelper.clearTags()
// }
console.log('返回')
if (this.bimModel == 1) {
window.sessionStorage.removeItem('build');

@ -4,87 +4,87 @@
<div class="clickBox" v-if="bimModel == 1">
<div class="btnBox flex-center-center">
<div :class="[active == 1 ? 'active' : '', tower == 0 ? 'active2' : '']" class="btn tower"
@click="clickBtn(1, 0)">1#
@click="clickBtn(1, 0,null,'build')">1#
</div>
<div :class="[active == 2 ? 'active' : '', tower == 1 ? 'active2' : '']" class="btn tower"
@click="clickBtn(2, 1)">2#
@click="clickBtn(2, 1,null,'build')">2#
</div>
<div :class="[active == 3 ? 'active' : '', tower == 2 ? 'active2' : '']" class="btn tower"
@click="clickBtn(3, 2)">3#
@click="clickBtn(3, 2,null,'build')">3#
</div>
<div :class="[active == 4 ? 'active' : '', tower == 3 ? 'active2' : '']" class="btn tower"
@click="clickBtn(4, 3)">4#
@click="clickBtn(4, 3,null,'build')">4#
</div>
<div :class="[active == 5 ? 'active' : '', tower == 4 ? 'active2' : '']" class="btn tower"
@click="clickBtn(5, 4)">5#
@click="clickBtn(5, 4,null,'build')">5#
</div>
<div :class="[active == 6 ? 'active' : '', tower == 5 ? 'active2' : '']" class="btn tower"
@click="clickBtn(6, 5)">6#
@click="clickBtn(6, 5,null,'build')">6#
</div>
<div :class="[active == 7 ? 'active' : '', tower == 0 ? 'active2' : '']" class="btn"
@click="clickBtn(7, 0, 1)">1F
@click="clickBtn(7, 0, 1,'floor')">1F
</div>
<div :class="[active == 8 ? 'active' : '', tower == 1 ? 'active2' : '']" class="btn"
@click="clickBtn(8, 1, 1)">1F
@click="clickBtn(8, 1, 1,'floor')">1F
</div>
<div :class="[active == 9 ? 'active' : '', tower == 2 ? 'active2' : '']" class="btn"
@click="clickBtn(9, 2, 1)">1F
@click="clickBtn(9, 2, 1,'floor')">1F
</div>
<div :class="[active == 10 ? 'active' : '', tower == 3 ? 'active2' : '']" class="btn"
@click="clickBtn(10, 3, 1)">1F
@click="clickBtn(10, 3, 1,'floor')">1F
</div>
<div :class="[active == 11 ? 'active' : '', tower == 4 ? 'active2' : '']" class="btn"
@click="clickBtn(11, 4, 1)">1F
@click="clickBtn(11, 4, 1,'floor')">1F
</div>
<div :class="[active == 12 ? 'active' : '', tower == 5 ? 'active2' : '']" class="btn"
@click="clickBtn(12, 5, 1)">1F
@click="clickBtn(12, 5, 1,'floor')">1F
</div>
<div :class="[active == 13 ? 'active' : '', tower == 0 ? 'active2' : '']" class="btn"
@click="clickBtn(13, 0, 2)">2F
@click="clickBtn(13, 0, 2,'floor')">2F
</div>
<div :class="[active == 14 ? 'active' : '', tower == 1 ? 'active2' : '']" class="btn"
@click="clickBtn(14, 1, 2)">2F
@click="clickBtn(14, 1, 2,'floor')">2F
</div>
<div :class="[active == 15 ? 'active' : '', tower == 2 ? 'active2' : '']" class="btn"
@click="clickBtn(15, 2, 2)">2F
@click="clickBtn(15, 2, 2,'floor')">2F
</div>
<div :class="[active == 16 ? 'active' : '', tower == 3 ? 'active2' : '']" class="btn"
@click="clickBtn(16, 3, 2)">2F
@click="clickBtn(16, 3, 2,'floor')">2F
</div>
<div :class="[active == 17 ? 'active' : '', tower == 4 ? 'active2' : '']" class="btn"
@click="clickBtn(17, 4, 2)">2F
@click="clickBtn(17, 4, 2,'floor')">2F
</div>
<div :class="[active == 18 ? 'active' : '', tower == 5 ? 'active2' : '']" class="btn"
@click="clickBtn(18, 5, 2)">2F
@click="clickBtn(18, 5, 2,'floor')">2F
</div>
<div :class="[active == 19 ? 'active' : '', tower == 0 ? 'active2' : '']" class="btn"
@click="clickBtn(19, 0, 3)">3F
@click="clickBtn(19, 0, 3,'floor')">3F
</div>
<div :class="[active == 20 ? 'active' : '', tower == 1 ? 'active2' : '']" class="btn"
@click="clickBtn(20, 1, 3)">3F
@click="clickBtn(20, 1, 3,'floor')">3F
</div>
<div :class="[active == 21 ? 'active' : '', tower == 2 ? 'active2' : '']" class="btn"
@click="clickBtn(21, 2, 3)">3F
@click="clickBtn(21, 2, 3,'floor')">3F
</div>
<div :class="[active == 22 ? 'active' : '', tower == 3 ? 'active2' : '']" class="btn"
@click="clickBtn(22, 3, 3)">3F
@click="clickBtn(22, 3, 3,'floor')">3F
</div>
<div :class="[active == 23 ? 'active' : '', tower == 4 ? 'active2' : '']" class="btn"
@click="clickBtn(23, 4, 3)">3F
@click="clickBtn(23, 4, 3,'floor')">3F
</div>
<div :class="[active == 24 ? 'active' : '', tower == 5 ? 'active2' : '']" class="btn"
@click="clickBtn(24, 5, 3)">3F
@click="clickBtn(24, 5, 3,'floor')">3F
</div>
</div>
<div style="margin-top: 3px;" class="btnBox flex-center-center">
<div :class="[active == 25 ? 'active' : '']" class="btn2 flex-center-center" @click="clickBtn(25)">
<div :class="[active == 25 ? 'active' : '']" class="btn2 flex-center-center" @click="clickBtn(25,null,null,'build')">
<img src="/img/monitoring/clickBtn1.png">
<span>园区</span>
</div>
<div :class="[active == 26 ? 'active' : '']" class="btn2 flex-center-center" @click="clickBtn(26, 9)">
<div :class="[active == 26 ? 'active' : '']" class="btn2 flex-center-center" @click="clickBtn(26, 9,null,'build')">
<img src="/img/monitoring/clickBtn2.png">
<span>地下室</span>
</div>
@ -96,25 +96,25 @@
<img src="../../../public/img/monitoring/ktborder.png" class="kt-border kt-border3">
<img src="../../../public/img/monitoring/ktborder.png" class="kt-border kt-border4"> -->
<!-- <span :class="ttActive == 20?'active1':''" @click="clickTt(20)">塔台</span> -->
<span :class="ttActive == 3 ? 'active1' : ''" @click="clickTt(3)">辅楼</span>
<span :class="ttActive == 1 ? 'active1' : ''" @click="clickTt(1)">1F</span>
<span :class="ttActive == 2 ? 'active1' : ''" @click="clickTt(2)">2F</span>
<span :class="ttActive == 3 ? 'active1' : ''" @click="clickTt(3,'build')">辅楼</span>
<span :class="ttActive == 1 ? 'active1' : ''" @click="clickTt(1,'floor')">1F</span>
<span :class="ttActive == 2 ? 'active1' : ''" @click="clickTt(2,'floor')">2F</span>
<div :class="ttActive == 0 ? 'active1' : ''" style="display: flex;align-items: center;justify-content: center;">
<img src="../../../public/img/monitoring/tower-build.png" alt="">
<span @click="clickTt(0)">塔楼</span>
<span @click="clickTt(0,'build')">塔楼</span>
</div>
<div :class="ttActive == 20 ? 'active1' : ''"
style="display: flex;align-items: center;justify-content: center;">
<img src="../../../public/img/monitoring/clickBtn1.png" alt="" style="width: 22px;">
<span @click="clickTt(20)">园区</span>
<span @click="clickTt(20,'build')">园区</span>
</div>
</div>
</div>
<!-- <div class="mapDom" :style="{opacity:isMapViewer}" style="position: absolute;left: 105px;top: 250px;width: 250px;height: 180px;"></div> -->
<div v-if="active == 25" style="position:absolute;left:367px; top:40px;display: flex; flex-direction: column;">
<!-- <div v-if="active == 25" style="position:absolute;left:367px; top:40px;display: flex; flex-direction: column;">
<el-button style="
background-color: rgb(1, 238, 255);
color: rgb(23, 72, 167);
@ -126,7 +126,7 @@
color: rgb(23, 72, 167);
border: 0;
width: 100px;margin: 10px 0 0 0;
" size="small" @click="openPreview('peidianxiang')">配电系统图</el-button>
" size="small" @click="openPreview('peidianxiang')">配电系统图</el-button>
<el-button style="
background-color: rgb(1, 238, 255);
color: rgb(23, 72, 167);
@ -147,7 +147,37 @@
border: 0;
width: 100px;
" size="small" @click="openPreview(active)">平面图纸</el-button>
</div> -->
<div v-if="typeList.length != 0 && sbType != '' && sbType != '电子围界'" style="position:absolute; top:40px;display: flex;
flex-direction: column;
flex-wrap: wrap;"
:style="{'left': bimModel == 1 ? '367px' : bimModel == 2 ? '217px' : ''}">
<el-button style="
background-color: #00BFB7;
color: #fff;
border: 0;
width:80px;
margin:5px;"
size="small"
@click="previewImg">图纸预览</el-button>
</div>
<div v-show="isShowType" style="position:absolute; top:82px;display: flex;
flex-direction: column;"
:style="{'left': bimModel == 1 ? '367px' : bimModel == 2 ? '217px' : ''}">
<el-button style="
background-color: rgba(255, 255, 255,0.3);
color: #142644;
border: 0;
width:80px;
margin:5px;"
size="small"
v-for="item in typeList"
:key="item.draweClassId"
@click="clickPreview(item)">{{item.draweClassName}}</el-button>
</div>
<!-- <el-select v-model="imgType" @change="clickPreview" v-show="isShowType" style="position:absolute;left:372px;top:82px;">
<el-option v-for="item in typeList" :key="item.draweClassId" :value="item.draweClassId" :label="item.draweClassName"></el-option>
</el-select> -->
<!-- 图片预览 -->
<el-image style="width: 0; height: 0;opacity: 0;" ref="preview" :src="url" :preview-src-list="srcList"></el-image>
<el-image-viewer
@ -160,6 +190,7 @@
<script>
import * as bfHelper from '../../util/bfHelper';
import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
import {getDrawList} from '@/api/equipment/drawManage'
export default {
components: { ElImageViewer },
props: {
@ -197,6 +228,8 @@ export default {
wuding: ['../../../img/cad/7Q/7QP010.png','../../../img/cad/7Q/7QP011.png','../../../img/cad/7Q/7QP012.png'],
qita: ['../../../img/cad/5C/5CS001.png','../../../img/cad/5C/5CS002.png','../../../img/cad/5C/5CS003.png','../../../img/cad/5C/5CS004.png','../../../img/cad/5C/5CS005.png','../../../img/cad/peidianxaing/8LS001.png','../../../img/cad/peidianxaing/qiangdian.png','../../../img/cad/7Q/7QP012.png'],
},
imgType:'',
isShowType:false,
//使el-image-viewer
// cardImg: {
// peidian: ['/img/cad/peidian/4DS001.png','/img/cad/peidian/4DS002.png','/img/cad/peidian/4DS003.png','/img/cad/peidian/4DS004.png','/img/cad/peidian/4DS005.png'],
@ -211,10 +244,10 @@ export default {
showViewer: false,
url: '',
srcList: [],
active: 25,
active: '',
tower: null,
layer: null,
ttActive: 20,
ttActive: '',
num: 0,
cameraPosition: bfHelper.cameraPosition,
ttCameraPosition: [
@ -270,17 +303,97 @@ export default {
version: 1,
zoom: 1
}
]
],
type:'',
// isMapViewer:0
typeList:[],
area:''
}
},
// watch:{
// active: {
// handler(newVal, oldVal) {
// console.log('')
// this.getTypeList(newVal,'build',1)
// }
// }
// },
mounted(){
setTimeout(() =>{
this.active = this.active == '' ? 25 : this.active
this.ttActive = this.ttActive == '' ? 20 : this.ttActive
this.type = this.type == '' ? 'build' : this.type
this.area = this.area == '' ? 1 : this.area
console.log('进入此方法111111111111111',this.active)
if(this.area == 1){
this.getTypeList(this.active,this.type,this.area)
}else{
this.getTypeList(this.ttActive,this.type,this.area)
}
},500)
},
methods: {
//
getTypeList(activeNum,type,area){
console.log('activeNum ====>',activeNum,'type =====>',type,'area ====>',area,'active ====>',this.active,'ttActive ===>',this.ttActive,'build ======>',this.build)
this.area = area
// this.active = active
if(type == 'build'){
this.typeList = [];
let val = (activeNum == '' && area == 1) ? this.active : (activeNum == '' && area == 2) ? this.ttActive : activeNum
getDrawList({current:1,size:200,type:area,build:val}).then(res =>{
console.log('res ======>',res)
let arr = this.removeDup(res.data.data.records)
console.log('arr ============>',arr)
if(arr.length == 0){
this.typeList = []
}else{
arr.map(item =>{
this.typeList.push(item)
})
}
console.log('typeList ====>',this.typeList)
})
}else if(type == 'floor'){
this.typeList = [];
let val = (activeNum == '' && area == 1) ? this.active : (activeNum == '' && area == 2) ? this.ttActive : activeNum
getDrawList({current:1,size:200,type:area,floor:val}).then(res =>{
console.log('res ======>',res)
let arr = this.removeDup(res.data.data.records)
arr.map(item =>{
this.typeList.push(item)
})
console.log('typeList ====>',this.typeList)
})
}
console.log('active ====>',this.active)
},
//
removeDup(tempArr) {
let newArr = []
for (let i = 0; i < tempArr.length; i++) {
if (newArr.indexOf(tempArr[i].draweClassName) == -1) {
newArr.push(tempArr[i].draweClassName)
} else {
tempArr.splice(i, 1)
i-- //
}
}
return tempArr
},
previewImg(){
this.isShowType = !this.isShowType
},
//
openPreview(key) {
if([7,8,9,10,11,12].indexOf(key) > -1) {
//1F
this.url = this.cardImg[1][0];
this.srcList = this.cardImg[1];
// this.url = this.cardImg[1][0];
// this.srcList = this.cardImg[1];
this.url = key == 7 ? '../../../img/cad/1-1F.jpg' : key == 8 ? '../../../img/cad/2-1F.jpg' : key == 9 ? '../../../img/cad/3-1F.jpg' : key == 10 ? '../../../img/cad/4-1F.jpg' : key == 11 ? '../../../img/cad/5-1F.jpg' : key == 12 ? '../../../img/cad/6-1F.jpg' : '../../../img/cad/6-1F.jpg';
this.srcList = [this.url];
} else if([13,14,15,16,17,18].indexOf(key) > -1) {
//2F
this.url = this.cardImg[2][0];
@ -304,16 +417,53 @@ export default {
this.$refs.preview.clickHandler();
}, 500)
},
//
clickPreview(item){
console.log('item ====>',item)
if(this.type == 'build'){
getDrawList({current:1,size:200,type:this.area,build:item.build,draweClassId:item.draweClassId}).then(res =>{
console.log('图纸res ======>',res)
let str = res.data.data.records.map((item) => {
return item.url
}).join(',')
let arr = str.split(',')
this.srcList = arr;
this.url = this.srcList[0]
setTimeout(() =>{
this.$refs.preview.clickHandler();
this.isShowType = false
},500)
})
}else if(this.type == 'floor'){
getDrawList({current:1,size:200,type:this.area,build:item.build,floor:item.floor,draweClassId:item.draweClassId}).then(res =>{
console.log('图纸res1 ======>',res)
let str = res.data.data.records.map((item) => {
return item.url
}).join(',')
let arr = str.split(',')
this.srcList = arr;
this.url = this.srcList[0]
setTimeout(() =>{
this.$refs.preview.clickHandler();
this.isShowType = false
},500)
})
}
},
closeViewer() {
this.showViewer = false;
},
clickBtn(activeNum, tower, layer) {
clickBtn(activeNum, tower, layer,type) {
console.log('进入此方法')
this.isShowType = false;
this.getTypeList(activeNum,type,1)
if (this.sbType == '空调' && activeNum <= 6) {
return false;
}
this.num++;
let build = window.sessionStorage.getItem('build');
let floor = window.sessionStorage.getItem('floor');
// if(build){
// // window.sessionStorage.setItem('camera',JSON.stringify(bfHelper.getCameraStatus()));
// }else{
@ -323,6 +473,8 @@ export default {
// }
window.sessionStorage.setItem('build', tower != null ? tower + 1 : '26');
window.sessionStorage.setItem('floor', layer);
window.sessionStorage.setItem('type', type);
bfHelper.setOpacityFun();
this.$parent.isControl = false;
@ -338,6 +490,7 @@ export default {
this.active = activeNum;
this.tower = tower;
this.type = type
if (this.sbType == '空开' && activeNum != 25) {
bfHelper.lookPipeline2(null, null, tower,
@ -601,13 +754,18 @@ export default {
}
}
},
clickTt(num) {
clickTt(num,type) {
this.ttActive = num;
this.isShowType = false;
this.getTypeList(num,type,2)
let camera = this.ttCameraPosition[num]
window.sessionStorage.setItem('ttcamera', JSON.stringify(camera));
window.sessionStorage.setItem('ttbuild', num);
window.sessionStorage.setItem('tttype', type);
if (num == 20) {
bfHelper.resetStatus(2);
bfHelper.TtLookEquipmentCop(this.sbType, this.checkList);
@ -676,7 +834,11 @@ export default {
// }
}
}
},
beforeDestroy(){
window.sessionStorage.removeItem('tttype');
window.sessionStorage.removeItem('type');
},
}
</script>

@ -477,12 +477,17 @@ export default {
this.setTowerKT("07");
this.$refs.clickcp.active = 26;
this.$refs.clickcp.tower = 9;
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'build';
}, 300);
bfHelper.lookPipeline2(null, null, build - 1, null, "空调");
// bfHelper.setCameraStatus(bfHelper.lightCamera[6]);
} else if (build == 26) {
// bfHelper.resetStatus(2);
bfHelper.lookEquipmentCop("空调");
this.$refs.clickcp.active = 26;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.area = 1;
setTimeout(() => {
this.setTowerKT();
this.initial();
@ -490,13 +495,15 @@ export default {
bfHelper.setOpacityFun();
} else {
console.log(build, floor, "=======================")
if (floor.indexOf("undefined") == -1) {
if (floor.indexOf("null") == -1) {
setTimeout(() => {
this.setTowerKT("0" + build, "0" + floor);
this.$refs.clickcp.active = commonValue.activeValue(
Number(build),
Number(floor)
);
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'floor';
this.$refs.clickcp.tower = commonValue.towerValue(build);
}, 300);
bfHelper.lookPipeline2(
@ -513,6 +520,8 @@ export default {
Number(build),
null
);
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.tower = commonValue.towerValue(build);
}, 300);
bfHelper.lookPipeline2(null, null, build - 1, null, "空调");
@ -523,6 +532,10 @@ export default {
bfHelper.lookEquipmentCop("空调");
this.getNavigationMap();
bfHelper.setOpacityFun();
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.active = 25;
this.$refs.clickcp.getTypeList(25,'build',1)
// setTimeout(() => {
this.initial();
// },300)

@ -464,6 +464,8 @@ export default {
setTimeout(() => {
this.setTowerDoor("07");
this.$refs.clickcp.active = 26;
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.tower = 9;
}, 300);
bfHelper.lookPipeline2(
@ -475,18 +477,23 @@ export default {
);
} else if (build == 26) {
bfHelper.lookPipeline(null, null, this.condition, "电子门禁");
this.$refs.clickcp.active = 26;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.area = 1;
bfHelper.setOpacityFun();
setTimeout(() => {
this.setTowerDoor();
}, 300);
} else {
if (floor.indexOf("undefined") == -1) {
if (floor.indexOf("null") == -1) {
setTimeout(() => {
this.setTowerDoor("0" + build, "0" + floor);
this.$refs.clickcp.active = commonValue.activeValue(
Number(build),
Number(floor)
);
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'floor';
this.$refs.clickcp.tower = commonValue.towerValue(build);
}, 300);
bfHelper.lookPipeline2(
@ -503,6 +510,8 @@ export default {
Number(build),
null
);
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.tower = commonValue.towerValue(build);
}, 300);
bfHelper.lookPipeline2(
@ -518,6 +527,10 @@ export default {
// 线
bfHelper.lookPipeline(null, null, this.condition, "电子门禁");
bfHelper.setOpacityFun();
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.active = 25;
this.$refs.clickcp.getTypeList(25,'build',1)
this.getNavigationMap();
// this.initial()
}
@ -534,12 +547,16 @@ export default {
bfHelper.TtLookEquipmentCop("电子门禁");
setTimeout(() => {
this.setTowerDoor();
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'build';
}, 300);
} else if (ttbuild == 0) {
//
setTimeout(() => {
this.setTowerDoor("08");
this.$refs.clickcp.ttActive = 0;
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'build';
}, 300);
bfHelper.ttLookPipeline2(
null,
@ -553,6 +570,8 @@ export default {
setTimeout(() => {
this.setTowerDoor("09", "01");
this.$refs.clickcp.ttActive = 1;
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'floor';
}, 300);
bfHelper.ttLookPipeline2(
null,
@ -566,6 +585,8 @@ export default {
setTimeout(() => {
this.setTowerDoor("09", "02");
this.$refs.clickcp.ttActive = 2;
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'floor';
}, 300);
bfHelper.ttLookPipeline2(
null,
@ -579,6 +600,8 @@ export default {
setTimeout(() => {
this.setTowerDoor("09");
this.$refs.clickcp.ttActive = 3;
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'build';
}, 300);
bfHelper.ttLookPipeline2(
null,
@ -591,6 +614,9 @@ export default {
} else {
// 线
bfHelper.TtLookEquipmentCop("电子门禁");
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.getTypeList(20,'build',2);
bfHelper.setOpacityFun1();
}
}

@ -538,6 +538,8 @@ export default {
//build,floor
let build = sessionStorage.getItem("build");
let floor = sessionStorage.getItem("floor");
let type = sessionStorage.getItem('type') ? sessionStorage.getItem('type') : 'build'
console.log('build =====>',build)
//
if (build) {
if (build == 10) {
@ -545,6 +547,8 @@ export default {
setTimeout(() => {
this.setTower("07");
this.$refs.clickcp.active = 26;
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.tower = 9;
}, 300);
lookPipeline2(
@ -559,6 +563,8 @@ export default {
//
lookEquipmentCop("电");
this.$refs.clickcp.active = 26;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.area = 1;
this.$refs.clickcp.tower = null;
setTimeout(() => {
this.setTower();
@ -566,7 +572,7 @@ export default {
setOpacityFun();
} else {
if (floor.indexOf("undefined") == -1) {
if (floor.indexOf("null") == -1) {
//
setTimeout(() => {
this.setTower("0" + build, "0" + floor);
@ -574,6 +580,8 @@ export default {
Number(build),
Number(floor)
);
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'floor';
this.$refs.clickcp.tower = commonValue.towerValue(build);
}, 300);
@ -593,6 +601,8 @@ export default {
Number(build),
null
);
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.tower = commonValue.towerValue(build);
}, 300);
lookPipeline2(
@ -607,6 +617,10 @@ export default {
}
} else {
lookEquipmentCop("电");
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.active = 25;
this.$refs.clickcp.getTypeList(25,'build',1)
setOpacityFun(false,0.3);
this.getNavigationMap();
}
@ -617,18 +631,23 @@ export default {
JSON.stringify(getCameraStatus())
);
let ttbuild = sessionStorage.getItem("ttbuild");
let tttype = sessionStorage.getItem('tttype') ? sessionStorage.getItem('tttype') : 'build'
if (ttbuild) {
if (ttbuild == 20) {
//
TtLookEquipmentCop("电");
setTimeout(() => {
this.setTower();
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'build';
}, 300);
} else if (ttbuild == 0) {
//
setTimeout(() => {
this.setTower("08");
this.$refs.clickcp.ttActive = 0;
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'build';
}, 300);
ttLookPipeline2(
equipmentCondition[0],
@ -642,6 +661,8 @@ export default {
setTimeout(() => {
this.setTower("09", "01");
this.$refs.clickcp.ttActive = 1;
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'floor';
}, 300);
ttLookPipeline2(
equipmentCondition[0],
@ -655,6 +676,8 @@ export default {
setTimeout(() => {
this.setTower("09", "02");
this.$refs.clickcp.ttActive = 2;
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'floor';
}, 300);
ttLookPipeline2(
equipmentCondition[0],
@ -668,6 +691,8 @@ export default {
setTimeout(() => {
this.setTower("09");
this.$refs.clickcp.ttActive = 3;
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'build';
}, 300);
ttLookPipeline2(
equipmentCondition[0],
@ -679,6 +704,10 @@ export default {
}
} else {
TtLookEquipmentCop("电");
this.$refs.clickcp.active = 20
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.getTypeList(20,'build',2);
setOpacityFun1();
}
}

@ -363,12 +363,15 @@ export default {
);
let build = sessionStorage.getItem("build");
let floor = sessionStorage.getItem("floor");
let type = sessionStorage.getItem('type') ? sessionStorage.getItem('type') : 'build'
if (build) {
if (build == 10) {
setTimeout(() => {
this.setTowerFire("07");
this.$refs.clickcp.active = 26;
this.$refs.clickcp.tower = 9;
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'build';
}, 300);
// console.log(this.checkList)
bfHelper.lookPipeline2(
@ -382,19 +385,23 @@ export default {
);
} else if (build == 26) {
bfHelper.lookEquipmentCop("消防", this.checkList);
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.area = 1;
setTimeout(() => {
this.setTowerFire();
}, 300);
bfHelper.setOpacityFun();
} else {
if (floor.indexOf("undefined") == -1) {
if (floor.indexOf("null") == -1) {
setTimeout(() => {
this.setTowerFire("0" + build, "0" + floor);
this.$refs.clickcp.active = commonValue.activeValue(
Number(build),
Number(floor)
);
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'floor';
this.$refs.clickcp.tower = commonValue.towerValue(build);
}, 300);
bfHelper.lookPipeline2(
@ -413,6 +420,8 @@ export default {
Number(build),
null
);
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.tower = commonValue.towerValue(build);
}, 300);
bfHelper.lookPipeline2(
@ -429,6 +438,10 @@ export default {
} else {
bfHelper.lookEquipmentCop("消防", this.checkList);
bfHelper.setOpacityFun();
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.active = 25;
this.$refs.clickcp.getTypeList(25,'build',1)
this.getNavigationMap();
}
} else {
@ -438,18 +451,23 @@ export default {
JSON.stringify(bfHelper.getCameraStatus())
);
let ttbuild = sessionStorage.getItem("ttbuild");
let tttype = sessionStorage.getItem('tttype') ? sessionStorage.getItem('tttype') : 'build'
if (ttbuild) {
if (ttbuild == 20) {
//
bfHelper.TtLookEquipmentCop("消防", this.checkList);
setTimeout(() => {
this.setTowerFire();
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'build';
}, 300);
} else if (ttbuild == 0) {
//
setTimeout(() => {
this.setTowerFire("08");
this.$refs.clickcp.ttActive = 0;
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'build';
}, 300);
bfHelper.ttLookPipeline2(
null,
@ -464,6 +482,8 @@ export default {
setTimeout(() => {
this.setTowerFire("09", "01");
this.$refs.clickcp.ttActive = 1;
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'floor';
}, 300);
bfHelper.ttLookPipeline2(
null,
@ -478,6 +498,8 @@ export default {
setTimeout(() => {
this.setTowerFire("09", "02");
this.$refs.clickcp.ttActive = 2;
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'floor';
}, 300);
bfHelper.ttLookPipeline2(
null,
@ -492,6 +514,8 @@ export default {
setTimeout(() => {
this.setTowerFire("09");
this.$refs.clickcp.ttActive = 3;
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'build';
}, 300);
bfHelper.ttLookPipeline2(
null,
@ -505,6 +529,10 @@ export default {
} else {
// 线
bfHelper.TtLookEquipmentCop("消防", this.checkList);
this.$refs.clickcp.active = 20
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.getTypeList(20,'build',2);
bfHelper.setOpacityFun1();
}
}

@ -345,12 +345,15 @@ export default {
);
let build = sessionStorage.getItem("build");
let floor = sessionStorage.getItem("floor");
let type = sessionStorage.getItem('type') ? sessionStorage.getItem('type') : 'build'
if (build) {
if (build == 10) {
//
setTimeout(() => {
this.setTowerLight("07");
this.$refs.clickcp.active = 26;
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.tower = 9;
}, 300);
bfHelper.lookPipeline2(
@ -365,17 +368,22 @@ export default {
//
bfHelper.resetStatus(2, null, "照明");
bfHelper.lookEquipmentCop("照明");
this.$refs.clickcp.active = 26;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.area = 1;
setTimeout(() => {
this.setTowerLight("00");
}, 300);
} else {
if (floor.indexOf("undefined") == -1) {
if (floor.indexOf("null") == -1) {
setTimeout(() => {
this.setTowerLight("0" + build, "0" + floor);
this.$refs.clickcp.active = commonValue.activeValue(
Number(build),
Number(floor)
);
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'floor';
this.$refs.clickcp.tower = commonValue.towerValue(build);
}, 300);
bfHelper.lookPipeline2(
@ -393,6 +401,8 @@ export default {
Number(build),
null
);
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.tower = commonValue.towerValue(build);
}, 300);
bfHelper.lookPipeline2(
@ -408,6 +418,10 @@ export default {
} else {
bfHelper.lookEquipmentCop("照明");
bfHelper.setOpacityFun();
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.active = 25;
this.$refs.clickcp.getTypeList(25,'build',1)
this.getNavigationMap();
}
} else {

@ -390,12 +390,15 @@ export default {
);
let build = sessionStorage.getItem("build");
let floor = sessionStorage.getItem("floor");
let type = sessionStorage.getItem('type') ? sessionStorage.getItem('type') : 'build'
this.getCameraPosi();
if (build) {
if (build == 10) {
setTimeout(() => {
this.setTowerMonitor("07");
this.$refs.clickcp.active = 26;
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.tower = 9;
}, 300);
bfHelper.lookPipeline2(
@ -406,6 +409,9 @@ export default {
"监控"
);
} else if (build == 26) {
this.$refs.clickcp.active = 26;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.area = 1;
bfHelper.lookPipeline(null, null, this.condition, "监控");
bfHelper.setOpacityFun();
setTimeout(() => {
@ -413,13 +419,15 @@ export default {
}, 300);
this.initial();
} else {
if (floor.indexOf("undefined") == -1) {
if (floor.indexOf("null") == -1) {
setTimeout(() => {
this.setTowerMonitor("0" + build, "0" + floor);
this.$refs.clickcp.active = commonValue.activeValue(
Number(build),
Number(floor)
);
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'floor';
this.$refs.clickcp.tower = commonValue.towerValue(build);
}, 300);
bfHelper.lookPipeline2(
@ -436,6 +444,8 @@ export default {
Number(build),
null
);
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.tower = commonValue.towerValue(build);
}, 300);
bfHelper.lookPipeline2(
@ -454,7 +464,10 @@ export default {
setTimeout(() => {
this.getNavigationMap();
this.buildMessage = "园区";
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.tower = null;
}, 300);
this.initial();
@ -466,6 +479,7 @@ export default {
JSON.stringify(bfHelper.getCameraStatus())
);
let ttbuild = sessionStorage.getItem("ttbuild");
let tttype = sessionStorage.getItem('tttype') ? sessionStorage.getItem('tttype') : 'build'
if (ttbuild) {
if (ttbuild == 20) {
//
@ -473,12 +487,16 @@ export default {
// bfHelper.setCameraStatus(this.startCamera)
setTimeout(() => {
this.setTowerMonitor();
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'build';
}, 300);
} else if (ttbuild == 0) {
//
setTimeout(() => {
this.setTowerMonitor("08");
this.$refs.clickcp.ttActive = 0;
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'build';
}, 300);
bfHelper.ttLookPipeline2(
null,
@ -492,6 +510,8 @@ export default {
setTimeout(() => {
this.setTowerMonitor("09", "01");
this.$refs.clickcp.ttActive = 1;
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'floor';
}, 300);
bfHelper.ttLookPipeline2(
null,
@ -505,6 +525,8 @@ export default {
setTimeout(() => {
this.setTowerMonitor("09", "02");
this.$refs.clickcp.ttActive = 2;
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'floor';
}, 300);
bfHelper.ttLookPipeline2(
null,
@ -518,6 +540,8 @@ export default {
setTimeout(() => {
this.setTowerMonitor("09");
this.$refs.clickcp.ttActive = 3;
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'build';
}, 300);
bfHelper.ttLookPipeline2(
null,
@ -532,6 +556,10 @@ export default {
bfHelper.TtLookEquipmentCop("监控", null, this.condition);
// bfHelper.setCameraStatus(this.startCamera)
bfHelper.setOpacityFun1();
this.$refs.clickcp.active = 20
this.$refs.clickcp.area = 2;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.getTypeList(20,'build',2);
this.initial();
}
}

@ -470,6 +470,8 @@ export default {
// 线
let build = sessionStorage.getItem("build");
let floor = sessionStorage.getItem("floor");
let type = sessionStorage.getItem('type') ? sessionStorage.getItem('type') : 'build'
console.log('warmbuild =====>',build)
if (build) {
//
if (build == 10) {
@ -478,6 +480,8 @@ export default {
this.setTowerWarm("07");
this.$refs.clickcp.active = 26;
this.$refs.clickcp.tower = 9;
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'build';
}, 300);
bfHelper.lookPipeline2(
@ -491,6 +495,9 @@ export default {
// bfHelper.setCameraStatus(bfHelper.cameraPosition[6]);
} else if (build == 26) {
//
this.$refs.clickcp.active = 26;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.area = 1;
setTimeout(() => {
this.setTowerWarm();
}, 300);
@ -522,7 +529,8 @@ export default {
zoom: 1
});//
} else {
if (floor.indexOf("undefined") == -1) {
if (floor.indexOf("null") == -1) {
console.log('进入次循环11111')
//
setTimeout(() => {
this.setTowerWarm("0" + build, "0" + floor);
@ -530,6 +538,8 @@ export default {
Number(build),
Number(floor)
);
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'floor';
this.$refs.clickcp.tower = commonValue.towerValue(build);
}, 300);
bfHelper.lookPipeline2(
@ -542,12 +552,15 @@ export default {
);
} else {
//
console.log('进入次循环22222')
setTimeout(() => {
this.setTowerWarm("0" + build);
this.$refs.clickcp.active = commonValue.activeValue(
Number(build),
null
);
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.tower = commonValue.towerValue(build);
}, 300);
bfHelper.lookPipeline2(
@ -566,6 +579,10 @@ export default {
bfHelper.lookEquipmentCop("暖");
bfHelper.setOpacityFun();
this.getNavigationMap();
this.$refs.clickcp.area = 1;
this.$refs.clickcp.type = 'build';
this.$refs.clickcp.active = 25;
this.$refs.clickcp.getTypeList(25,'build',1)
}
} else {
}

@ -70,10 +70,10 @@ axios.interceptors.response.use(res => {
if (status === 401) store.dispatch('FedLogOut').then(() => router.push({path: '/login'}));
// 如果请求为非200否者默认统一处理
if (status !== 200) {
Message({
message: message,
type: 'error'
});
// Message({
// message: message,
// type: 'error'
// });
return Promise.reject(new Error(message))
}
return res;

@ -0,0 +1,246 @@
<template>
<!-- 图纸分类管理 -->
<basic-container>
<el-row>
<el-col :span="24">
<avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form"
:permission="permissionList" @search-change="searchChange" @search-reset="searchReset"
@current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange"
@on-load="onLoad" :page.sync="page" @row-save="rowSave" @row-del="rowDel" @row-update="rowUpdate">
<!-- <template slot-scope="scope" slot="areaSearch">
<el-select v-model="area" @change="areaSearch">
<el-option label="业务区" value="1"></el-option>
<el-option label="塔台" value="2"></el-option>
</el-select>
</template> -->
<!-- <template slot-scope="scope" slot="buildSearch">
<el-select v-model="build">
<el-option :key="'build' + index" v-for="(item, index) in buildings" :label="item.name"
:value="item.id"></el-option>
</el-select>
</template>
<template slot-scope="scope" slot="floorSearch">
<el-select :disabled="area == 2" v-model="floor">
<el-option :key="'floor' + index" v-for="(item, index) in floors" :label="item.name"
:value="item.id"></el-option>
</el-select>
</template> -->
<template slot-scope="scope" slot="equipNameSearch">
<el-input v-model="equipName" placeholder="分类名称" clearable />
</template>
<!-- <template slot-scope="scope" slot="cardNameSearch">
<el-input v-model="cardName" placeholder="通过人员" clearable />
</template>
<template slot-scope="scope" slot="dateRangeSearch">
<el-date-picker v-model="dateRange" type="datetimerange" placeholder="选择日期"
value-format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm" start-placeholder="开始日期"
end-placeholder="结束日期">>
</el-date-picker>
</template> -->
<!-- <template slot="areaNumber" slot-scope="scope">
{{ area == 1 ? '业务区' : '塔台' }}
</template> -->
<!-- <template slot="inOutFlag" slot-scope="scope">
{{ scope.row.inOutFlag == 1 ? '出' : '进' }}
</template> -->
<!-- <template slot-scope="{type,size,row}" slot="menu">
<el-button :size="size" :type="type" @click="handleEdit(row)">编辑</el-button>
<el-button :size="size" :type="type" @click="handleDelete(row)">删除</el-button>
</template> -->
</avue-crud>
</el-col>
</el-row>
</basic-container>
</template>
<script>
import {getList,addClassify,deleteClassify,editClassify} from "@/api/equipment/drawClassify"
export default{
data(){
return {
area: "1",
equipName:'',
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
option: {
lazy: true,
tip: false,
searchLabelWidth: 80,
searchShow: true,
searchMenuSpan: 6,
tree: true,
border: true,
index: true,
dialogClickModal: false,
viewBtn: false,
menu: true,
column: [
// {
// label: "",
// prop: "areaNumber",
// align: "center",
// },
// {
// label: "",
// prop: "buildNumber",
// align: "center",
// },
// {
// label: "",
// prop: "floorNumber",
// align: "center",
// },
{
label: "分类名称",
prop: "name",
align: "center",
rules: [{
required: true,
message: "请输入分类名称",
trigger: "blur"
}]
},
// {
// label: "",
// prop: "cardName",
// align: "center",
// },
// {
// label: "",
// prop: "inOutFlag",
// align: "center",
// },
{
label: "创建时间",
prop: "createTime",
// type: "datetimerange",
align: "center",
addDisplay:false,
editDisplay:false
},
// {
// label: "",
// prop: "area",
// searchslot: true,
// search: true,
// type: "select",
// hide: true,
// row: false,
// display: false,
// viewDisplay: false
// },
{
label: "分类名称",
prop: "equipName",
searchslot: true,
search: true,
type: "input",
hide: true,
row: false,
display: false,
viewDisplay: false,
},
],
},
data:[],
loading:false
}
},
created(){},
methods:{
searchChange(params, done) {
this.page.currentPage = 1;
this.onLoad();
done();
},
searchReset() {
this.equipName = ''
this.page.currentPage = 1;
this.onLoad(this.page);
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad();
},
onLoad() {
this.loading = true;
getList({current:this.page.currentPage,size:this.page.pageSize,name:this.equipName}).then(res =>{
this.data = res.data.data.records;
this.page.total = res.data.data.total;
this.loading = false
})
},
//
rowSave(form,done,loading){
console.log('form ====>',form)
addClassify({name:this.form.name}).then(res =>{
if(res.data.code == 200){
this.onLoad()
this.$message.success('新增成功')
done()
}else{
this.onLoad()
this.$message.error('新增失败')
done()
}
}).catch(err =>{
this.onLoad()
this.$message({
type: 'error',
message: err
});
done()
})
},
//
rowDel(form,index){
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
return deleteClassify(form.id);
}).then(res =>{
if(res.data.code == 200){
this.onLoad();
this.$message.success('删除成功')
}
})
},
//
rowUpdate(form,index,done,loading){
console.log('form ====>',form)
editClassify({id:form.id,name:form.name}).then(res =>{
console.log(res)
if(res.data.code == 200){
this.onLoad()
this.$message.success('编辑成功')
done()
}else{
this.onLoad()
this.$message.error('编辑成功')
done()
}
}).catch(err =>{
this.onLoad()
this.$message({
type: 'error',
message: err
});
done()
})
},
},
}
</script>
<style lang="scss" scoped></style>

@ -0,0 +1,682 @@
<template>
<!-- 图纸管理 -->
<el-row>
<el-col :span="5">
<div class="box">
<el-scrollbar>
<basic-container>
<avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick"/>
<!-- <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick"></avue-tree> -->
</basic-container>
</el-scrollbar>
</div>
</el-col>
<el-col :span="19">
<basic-container>
<avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form"
:permission="permissionList" @search-change="searchChange" @search-reset="searchReset"
@current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange"
@on-load="onLoad" :page.sync="page">
<!-- <template slot-scope="scope" slot="areaSearch">
<el-select v-model="area" @change="areaSearch">
<el-option label="业务区" value="1"></el-option>
<el-option label="塔台" value="2"></el-option>
</el-select>
</template> -->
<!-- <template slot-scope="scope" slot="buildSearch">
<el-select v-model="build">
<el-option :key="'build' + index" v-for="(item, index) in buildings" :label="item.name"
:value="item.id"></el-option>
</el-select>
</template>
<template slot-scope="scope" slot="floorSearch">
<el-select :disabled="area == 2" v-model="floor">
<el-option :key="'floor' + index" v-for="(item, index) in floors" :label="item.name"
:value="item.id"></el-option>
</el-select>
</template> -->
<template slot-scope="scope" slot="equipNameSearch">
<el-input v-model="equipName" placeholder="分类名称" clearable />
</template>
<!-- <template slot-scope="scope" slot="cardNameSearch">
<el-input v-model="cardName" placeholder="通过人员" clearable />
</template>
<template slot-scope="scope" slot="dateRangeSearch">
<el-date-picker v-model="dateRange" type="datetimerange" placeholder="选择日期"
value-format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm" start-placeholder="开始日期"
end-placeholder="结束日期">>
</el-date-picker>
</template> -->
<template slot="type" slot-scope="scope">
{{ scope.row.type == 1 ? '业务区' : '塔台' }}
</template>
<template slot="url" slot-scope="scope">
<div style="display:flex;flex-wrap:wrap;">
<img v-for="item in scope.row.url.split(',')" :key="item" :src="item" style="width:100px;height:100px;margin:0 3px;"></img>
</div>
</template>
<template slot="menuLeft" slot-scope="scope">
<el-button type="primary" icon="el-icon-plus" size="small" @click="handleAdd">新增</el-button>
</template>
<template slot-scope="{type,size,row}" slot="menu">
<el-button :size="size" type="text" icon="el-icon-view" @click="handleView(row)">预览</el-button>
<el-button :size="size" type="text" icon="el-icon-edit" @click="handleEdit(row)">编辑</el-button>
<el-button :size="size" type="text" icon="el-icon-delete" @click="handleDelete(row)">删除</el-button>
</template>
</avue-crud>
<el-dialog custom-class="drawClass" :title="dialogTitle" :visible.sync="dialogVisible" width="50%" :modal-append-to-body="false">
<el-form ref="form" :model="dataForm" label-width="120px" :rules="dataRules">
<el-form-item label="图纸分类:" style="width: 100%;display: inline-block;" prop="draweClassId">
<el-select size="small" v-model="dataForm.draweClassId" style="width:50%">
<el-option v-for="item in classifyData" :key="item.id" :value="item.id" :label="item.name"></el-option>
</el-select>
</el-form-item>
<el-form-item label="区域:" style="width: 100%;display: inline-block;" prop="type">
<el-select size="small" v-model="dataForm.type" style="width:50%" @change="changeArea">
<el-option :value="1" label="业务区"></el-option>
<el-option :value="2" label="塔台"></el-option>
</el-select>
</el-form-item>
<el-form-item label="楼号:" style="width: 100%;display: inline-block;" prop="build">
<el-tooltip class="item" v-if="!dataForm.type" effect="dark" content="请先选择区域" placement="top">
<el-select disabled size="small" v-model="dataForm.build" style="width:50%" @change="changeBuild">
<el-option v-for="item in buildData" :key="item.dictKey" :value="item.dictKey" :label="item.dictValue"></el-option>
</el-select>
</el-tooltip>
<el-select v-else size="small" v-model="dataForm.build" style="width:50%" @change="changeBuild">
<el-option v-for="item in buildData" :key="item.dictKey" :value="item.dictKey" :label="item.dictValue"></el-option>
</el-select>
</el-form-item>
<el-form-item label="楼层:" style="width: 100%;display: inline-block;" prop="floor">
<el-tooltip class="item" v-if="!dataForm.build" effect="dark" content="请先选择楼号" placement="top">
<el-select disabled size="small" v-model="dataForm.floor" style="width:50%">
<el-option v-for="item in floorData" :key="item.dictKey" :value="item.dictKey" :label="item.dictValue"></el-option>
</el-select>
</el-tooltip>
<el-select v-else size="small" v-model="dataForm.floor" style="width:50%">
<el-option v-for="item in floorData" :key="item.dictKey" :value="item.dictKey" :label="item.dictValue"></el-option>
</el-select>
</el-form-item>
<el-form-item label="图纸:" style="width:100%;display: inline-block;" prop="url">
<el-upload
:class="imgList.length >= 5 ? 'hide' : ''"
action="/api/blade-desk/oss/put-file"
list-type="picture-card"
:on-success="handleSuccess"
:before-remove="beforeRemove"
:on-remove="handleRemove"
:file-list="fileList"
:limit="5"
accept=".png,.PNg,.jpg,.JPG,.jpeg,.JPEG,.bmp,.BMP"
>
<i class="el-icon-plus"></i>
</el-upload>
</el-form-item>
<el-form-item label="描述" style="width:100%;display:inline-block;" prop="remark">
<el-input v-model="dataForm.remark" size="small" style="width:50%"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="warnClose"> </el-button>
<el-button type="primary" @click="sureAdd"> </el-button>
</span>
</el-dialog>
</basic-container>
<el-image style="width: 0; height: 0;opacity: 0;" ref="preview" :src="url" :preview-src-list="srcList"></el-image>
</el-col>
</el-row>
</template>
<script>
import {getDrawList,getDict,deleteDraw,addDraw,editDraw,getTerrData} from '@/api/equipment/drawManage'
import {getList} from '@/api/equipment/drawClassify'
export default{
data(){
return {
area: "1",
equipName:'',
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
dialogTitle:'',
dialogVisible:false,
url:'',
srcList:[],
classifyData:[], //
buildData:[],
floorData:[],
option: {
lazy: true,
tip: false,
searchLabelWidth: 80,
searchShow: true,
searchMenuSpan: 6,
tree: true,
border: true,
index: true,
dialogClickModal: false,
viewBtn: false,
menu: true,
addBtn:false,
editBtn:false,
delBtn:false,
column: [
// {
// label: "",
// prop: "areaNumber",
// align: "center",
// },
// {
// label: "",
// prop: "buildNumber",
// align: "center",
// },
// {
// label: "",
// prop: "floorNumber",
// align: "center",
// },
{
label: "图纸分类",
prop: "draweClassName",
align: "center",
addDisplay:false,
editDisplay:false,
width:120,
},
{
label: "区域",
prop: "type",
align: "center",
addDisplay:false,
editDisplay:false,
width:120,
},
{
label: "图纸分类",
prop: "draweClassId",
type:'select',
align: "center",
hide:true,
width:120,
// span:24
},
{
label: "楼号",
prop: "buildNo",
type:'select',
align: "center",
width:120,
},
{
label: "楼层",
prop: "floorNo",
type:'select',
align: "center",
width:120,
},
{
label: "图纸",
prop: "url",
align: "center",
addDisplay:false,
editDisplay:false,
slot:true
},
{
label: "描述",
prop: "remark",
align: "center",
overHidden:true,
width:120,
},
{
label: '图纸',
prop: 'string',
dataType: 'string',
type: 'upload',
hide:true,
propsHttp: {
home:'https://avuejs.com',
res: 'data'
},
span: 24,
listType: 'picture-card',
// tip: 'jpg/png500kb',
action: '/imgupload'
},
// {
// label: "",
// prop: "accessTime",
// // type: "datetimerange",
// align: "center",
// addDisplay:false,
// editDisplay:false
// },
// {
// label: "",
// prop: "area",
// searchslot: true,
// search: true,
// type: "select",
// hide: true,
// row: false,
// display: false,
// viewDisplay: false
// },
// {
// label: "",
// prop: "equipName",
// searchslot: true,
// search: true,
// type: "input",
// hide: true,
// row: false,
// display: false,
// viewDisplay: false,
// },
],
},
dataForm:{},
data:[],
loading:false,
treeOption:{
filter:false
},
treeData:[
// {
// label:'001',
// id:'1721418020917616641',
// type:'classify',
// children: [
// {
// label: '',
// type:'area',
// id:'1',
// children: [
// {
// label: '',
// type:'build',
// id:'001',
// children:[
// {
// label:'',
// type:'floor',
// id:'0001',
// }
// ]
// }
// ]
// },
// {
// label: '',
// type:'area',
// id:'2',
// children: [
// {
// label: '',
// children:[
// {
// label:''
// }
// ]
// }
// ]
// }
// ]
// }
],
defaultProps: {
children: 'children',
label: 'label'
},
draweClassId:'',//id
build:'',//
floor:'', //
type:'',//
dataRules:{
draweClassId:[{
required:true,
message:'请选择图纸类型',
trigger:'blur'
}],
type:[{
required:true,
message:'请选择区域',
trigger:'blur'
}],
build:[{
required:true,
message:'请选择楼号',
trigger:'blur'
}],
},
imgList:[],
fileList:[],
dialogType:'',
editId:'',
}
},
created(){
this.getTypeList()
this.gettree()
},
methods:{
getTypeList(){
getList({current:1,size:100}).then(res =>{
this.classifyData = res.data.data.records
console.log('data ======>',this.classifyData)
})
},
gettree(){
getTerrData().then(res =>{
console.log('res =====>',res)
this.treeData = res.data.data
})
},
//
changeArea(val){
this.dataForm.build = ''
if(val == 1){
getDict({current:1,size:100,parentId: '1721347822365741058'}).then(res =>{
console.log('res ====>',res)
this.buildData = res.data.data
})
}else if(val == 2){
getDict({current:1,size:100,parentId: '1721406335628627969'}).then(res =>{
console.log('res ====>',res)
this.buildData = res.data.data
})
}
},
//
handleAdd(){
this.dialogTitle = '新增图纸'
this.dialogType = 'add'
this.dataForm = {
draweClassId:'',
type:'',
build:'',
floor:'',
url:''
}
this.imgList = []
this.fileList = []
setTimeout(() =>{
this.dialogVisible = true
},200)
},
//
handleSuccess(response, file, fileList){
console.log('response ===>',response)
console.log('fileList ===>',fileList)
if(response.code == 200){
this.imgList.push({url:response.data.link,name:response.data.originalName})
}
},
//
handleRemove(file,fileList){
console.log(file)
if(file.response){
this.imgList = this.imgList.filter(item => item.url !== file.response.data.link)
}else{
this.imgList = this.imgList.filter(item => item.url !== file.url.slice(file.url))
}
console.log(this.imgList)
},
warnClose(){
this.dialogVisible = false
},
// /
sureAdd() {
this.$refs['form'].validate((valid) => {
console.log('form ====>',this.dataForm)
console.log('img ====>',this.imgList)
if(this.dialogType == 'add'){
if(this.imgList.length == 0){
this.$message.error('请上传图片')
}else{
let imgUrl = []
let nameArr = []
this.imgList.map(item =>{
imgUrl.push(item.url)
nameArr.push(item.name)
})
let params = {
draweClassId:this.dataForm.draweClassId,
type:this.dataForm.type,
build:this.dataForm.build,
floor:this.dataForm.floor,
url:imgUrl.join(','),
originalName:nameArr.join(','),
remark:this.dataForm.remark
}
console.log('params ===>',params)
addDraw(params).then(res =>{
console.log('res ====>',res)
if(res.data.code == 200){
this.page.currentPage = 1;
this.onLoad()
this.$message.success('新增成功')
this.dialogVisible = false
}else{
this.onLoad()
this.$message.error('新增失败')
this.dialogVisible = false
}
}).catch(err =>{
this.onLoad()
this.$message({
type: 'error',
message: err
});
this.dialogVisible = false
})
}
}else if(this.dialogType == 'edit'){
if(this.imgList.length == 0){
this.$message.error('请上传图片')
}else{
let imgUrl = []
let nameArr = []
this.imgList.map(item =>{
imgUrl.push(item.url)
nameArr.push(item.name)
})
let params = {
id:this.dataForm.id,
draweClassId:this.dataForm.draweClassId,
type:this.dataForm.type,
build:this.dataForm.build,
floor:this.dataForm.floor,
url:imgUrl.join(','),
originalName:nameArr.join(','),
remark:this.dataForm.remark
}
console.log('params ===>',params)
editDraw(params).then(res =>{
if(res.data.code == 200){
this.onLoad()
this.$message.success('修改成功')
this.dialogVisible = false
}else{
this.onLoad()
this.$message.error('修改失败')
this.dialogVisible = false
}
}).catch(err =>{
this.onLoad()
this.$message({
type: 'error',
message: err
});
this.dialogVisible = false
})
}
}
})
},
//
changeBuild(val){
this.dataForm.floor = ''
let tmp = this.buildData.find(item => item.dictKey == val)
this.floorData = tmp.children
},
searchChange(params, done) {
this.page.currentPage = 1;
this.onLoad();
done();
},
searchReset() {
this.equipName = ''
this.page.currentPage = 1;
this.onLoad(this.page);
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad();
},
onLoad() {
this.loading = true;
// this.data = [
// {name:'',build:'1',floor:'1',img:'../../../img/cad/peidian/4DS001.png'},
// {name:'',build:"1",floor:'2',img:'../../../img/cad/peidianxiang/6BS005.png'},
// ];
// this.page.total = this.data.length;
// this.loading = false
getDrawList({current:this.page.currentPage,size:this.page.pageSize,draweClassId:this.draweClassId,type:this.type,build:this.build,floor:this.floor}).then(res =>{
this.data = res.data.data.records;
this.page.total = res.data.data.total;
this.loading = false
})
},
//
handleView(row){
this.srcList = row.url.split(',')
this.url = this.srcList[0];
// 使el-image
setTimeout(() => {
this.$refs.preview.clickHandler();
}, 500)
},
//
handleEdit(row){
this.dataForm = JSON.parse(JSON.stringify(row));
this.dialogTitle = '编辑图纸'
this.dialogType = 'edit'
this.fileList = []
this.imgList = []
if(this.dataForm.type == 1){
getDict({current:1,size:100,parentId: '1721347822365741058'}).then(res =>{
console.log('res ====>',res)
this.buildData = res.data.data
let tmp = this.buildData.find(item => item.dictKey == this.dataForm.build)
this.floorData = tmp.children;
})
}else if(this.dataForm.type == 2){
getDict({current:1,size:100,parentId: '1721406335628627969'}).then(res =>{
console.log('res ====>',res)
this.buildData = res.data.data
let tmp = this.buildData.find(item => item.dictKey == this.dataForm.build)
this.floorData = tmp.children;
})
}
let imgData = this.dataForm.url.split(',')
let nameData = this.dataForm.originalName.split(',')
imgData.map(item =>{
this.fileList.push({url:item})
this.imgList.push({url:item})
})
nameData.map((item,index) =>{
this.imgList[index].name = nameData[index]
})
console.log('img ====>',this.imgList)
setTimeout(() =>{
this.dialogVisible = true
},200)
},
//
handleDelete(row){
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
return deleteDraw(row.id);
}).then(res =>{
if(res.data.code == 200){
this.onLoad();
this.$message.success('删除成功')
}
})
},
//
nodeClick(data,node){
let result = this.findParent(this.treeData,data)
this.draweClassId = result.find(item => item.type == 'classify') ? result.find(item => item.type == 'classify').id : ''
this.type = result.find(item => item.type == 'area') ? result.find(item => item.type == 'area').id : ''
this.build = result.find(item => item.type == 'build') ? result.find(item => item.type == 'build').id : ''
this.floor = result.find(item => item.type == 'floor') ? result.find(item => item.type == 'floor').id : ''
console.log('result ====>',result)
this.onLoad()
},
//
findParent(data, val) {
for (let i = 0; i < data.length; i++) {
if (data[i] && data[i] === val) {
return [data[i]]
}
if (data[i] && data[i].children) {
let d = this.findParent(data[i].children, val)
if (d) {
return d.concat(data[i])
}
}
}
}
},
}
</script>
<style lang="scss" scoped>
.box {
height: 800px;
// padding:20px;
// background:#fff;
}
.el-scrollbar {
height: 100%;
}
.box .el-scrollbar__wrap {
overflow: scroll;
}
/deep/ .avue-tree{
.avue-tree__filter{
.el-input{
.el-input-group__append{
display:none;
}
}
}
}
</style>
<style>
.drawClass{
.hide{
.el-upload--picture-card{
display:none;
}
}
}
</style>

@ -193,6 +193,7 @@ export default {
// bfHelper.mapDestroy();
// }
console.log('模型切换')
window.sessionStorage.removeItem('build');
window.sessionStorage.removeItem('floor');
window.sessionStorage.removeItem('ttbuild');
@ -215,6 +216,8 @@ export default {
window.sessionStorage.removeItem('build');
window.sessionStorage.removeItem('floor');
window.sessionStorage.removeItem('ttbuild');
window.sessionStorage.removeItem('tttype');
window.sessionStorage.removeItem('type');
this.topNav = i;
if (i == 3) {
if (this.clickNum == 1) {

@ -28,7 +28,11 @@ module.exports = {
proxy: {
"/bimfaceApi": {
// target: 'http://192.168.3.58:8001',
target: 'http://192.168.1.106:8001',
// target: 'http://192.168.1.105:8001',
// target: 'http://192.168.1.34:8001',
target: 'http://192.168.1.102:8001',
// target: 'http://192.168.1.106:8001',
// target: 'http://192.168.0.115:8001',
ws: true,
pathRewrite: {
"^/bimfaceApi": "/bimface",
@ -48,7 +52,10 @@ module.exports = {
// target: "http://192.168.43.35",
// target: 'http://192.168.79.129',
// target: "http://192.168.1.106",
target: "http://192.168.1.106",
// target: "http://192.168.1.105:80",
target: "http://192.168.1.102:80",
// target: "http://192.168.1.34:80",
// target: "http://192.168.0.115",
// target: "http://10.90.100.204",
// target: "http://rsvz4t.natappfree.cc",
//远程演示服务地址,可用于直接启动项目

Loading…
Cancel
Save