修改监控模式下设备跳转方式

main
jinna 3 years ago
parent 139fed3131
commit 79ee4f9eb4
  1. 8
      src/api/equipment/index.js
  2. 9
      src/components/monitoring/conditioner.vue
  3. 9
      src/components/monitoring/door.vue
  4. 78
      src/components/monitoring/electricity.vue
  5. 9
      src/components/monitoring/firefighting.vue
  6. 9
      src/components/monitoring/lift.vue
  7. 9
      src/components/monitoring/light.vue
  8. 9
      src/components/monitoring/monitoring.vue
  9. 9
      src/components/monitoring/wall.vue
  10. 9
      src/components/monitoring/warm.vue
  11. 9
      src/components/monitoring/water.vue

@ -307,3 +307,11 @@ export const saveImg = (data) => {
data,
});
};
export const getDetail = (query) => {
return request({
url: "/api/blade-desk/equip/detail-by-code",
method: "get",
params: query,
});
};

@ -105,7 +105,7 @@
<span class="btn" @click="searchDevice" style="cursor: pointer;">查询</span>
</div> -->
<div class="tabBox">
<el-table :data="tableData" style="width: 100%; max-height: 220px">
<el-table :data="tableData" style="width: 100%; max-height: 220px" @row-contextmenu="tableContext">
<el-table-column label="设备名称" min-width="100px" style="cursor: pointer">
<template slot-scope="scope">
<div class="flex-center-center" @click="clickConditions(scope.row)" style="cursor: pointer">
@ -557,6 +557,13 @@ export default {
},
methods: {
tableContext(row,column, event){
event.preventDefault(); //
const routerUrl = this.$router.resolve({ path: '/equipment/index', query: {code: row.code } });
window.open(routerUrl.href, "_blank");
// this.dialogVisible = true
// console.log(row)
},
// -
doCancelWarn(item) {
getCancelWarn(item.id).then((res) => {

@ -211,7 +211,7 @@
cursor: pointer;
background-color: transparent;
max-height: 220px;
" :class="bimModel == 2 ? 'tataitab' : ''">
" :class="bimModel == 2 ? 'tataitab' : ''" @row-contextmenu="tableContext">
<el-table-column label="设备名称" min-width="110px" align="left">
<template slot-scope="scope">
<div class="flex-center dev_name" style="overflow: hidden; white-space: nowrap">
@ -1139,6 +1139,13 @@ export default {
// console.log(row)
this.bjClick(row);
},
tableContext(row,column, event){
event.preventDefault(); //
const routerUrl = this.$router.resolve({ path: '/equipment/index', query: {code: row.code } });
window.open(routerUrl.href, "_blank");
// this.dialogVisible = true
// console.log(row)
},
//
inquireHandle() {
this.getSblb();

@ -280,12 +280,16 @@
<!-- 设备列表 -->
<div class="tab" :class="bimModel == 2 ? 'tataigen' : ''">
<div class="title flex-center">
<img src="../../../public/img/monitoring/electricity/listIcon3.png" />
<span id="eletric_box">设备列表</span>
<div style="display:flex">
<img src="../../../public/img/monitoring/electricity/listIcon3.png" />
<span >设备列表</span>
</div>
<div class="more_btn" style="margin-right:34px;cursor: pointer;" @click="clickMore">更多</div>
</div>
<div class="tabBox">
<el-table @row-click="tableClick" :data="tableData" style="width: 100%"
:class="bimModel == 2 ? 'tataitab' : ''">
<div class="tabBox" id="eletric_box">
<el-table @row-click="tableClick" :data="tableData" style="width: 100%" @row-contextmenu="tableContext"
:class="bimModel == 2 ? 'tataitab' : ''" >
<el-table-column label="电表名称" width="130">
<template slot-scope="scope">
<div class="flex-center dev_name">
@ -344,6 +348,42 @@
</el-pagination>
</div>
</div>
<el-dialog
title="设备详情"
:visible.sync="dialogVisible"
width="30%"
:append-to-body="true"
:before-close="handleClose">
<span>设备类型电力</span>
<div>
<div class="title" style="font-size: 18px;padding-bottom: 10px;border-bottom: 1px dashed;margin-top: 10px;">通讯地址</div>
<span style="display: inline-block;width: 33%;margin: 10px 0;">IP地址192.168.20.101</span>
<span style="display: inline-block;width: 33%;margin: 10px 0;">端口号502</span>
<span style="display: inline-block;width: 33%;margin: 10px 0;">数据偏移量12</span>
</div>
<div>
<div class="title" style="font-size: 18px;padding-bottom: 10px;border-bottom: 1px dashed;margin-top: 10px;">设备编码</div>
<span style="display: inline-block;width: 33%;margin: 10px 0;">模型业务区</span>
<span style="display: inline-block;width: 33%;margin: 10px 0;">楼栋1号楼</span>
<span style="display: inline-block;width: 33%;margin: 10px 0;">楼层01</span>
</div>
<div>
<div class="title" style="font-size: 18px;padding-bottom: 10px;border-bottom: 1px dashed;margin-top: 10px;">基础配置</div>
<span style="display: inline-block;width: 33%;margin: 10px 0;">编码10100000001</span>
<span style="display: inline-block;width: 33%;margin: 10px 0;">名称1号楼B1</span>
<span style="display: inline-block;width: 33%;margin: 10px 0;">简称净水器</span>
<span style="display: inline-block;width: 33%;margin: 10px 0;">使用时间净水器</span>
<span style="display: inline-block;width: 33%;margin: 10px 0;">具体位置WH2</span>
<span style="display: inline-block;width: 33%;margin: 10px 0;">固定资产编号</span>
<span style="display: inline-block;width: 33%;margin: 10px 0;">维保人</span>
<span style="display: inline-block;width: 33%;margin: 10px 0;">维保电话</span>
<span style="display: inline-block;width: 33%;margin: 10px 0;">维保时间</span>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="dialogVisible = false"> </el-button>
</span>
</el-dialog>
</div>
</template>
@ -412,6 +452,7 @@ export default {
},
data() {
return {
dialogVisible:false,
current: 1, //
size: 5, //
total: 14, //
@ -457,12 +498,13 @@ export default {
},
mounted() {
this.getNavigationMap();
let dom = document.getElementById('eletric_box');
dom.addEventListener('contextmenu', (event)=> {
event.preventDefault(); //
const routerUrl = this.$router.resolve({ path: '/equipment/index', query: { classCode: '0100' } });
window.open(routerUrl.href, "_blank");
});
// let dom = document.getElementById('eletric_box');
// dom.addEventListener('contextmenu', (event)=> {
// console.log(event)
// event.preventDefault(); //
// // const routerUrl = this.$router.resolve({ path: '/equipment/index', query: { classCode: '0100' } });
// // window.open(routerUrl.href, "_blank");
// });
},
watch: {
bimModel: {
@ -648,6 +690,11 @@ export default {
},
},
methods: {
//
clickMore(){
const routerUrl = this.$router.resolve({ path: '/equipment/index', query: { classCode: '0100' } });
window.open(routerUrl.href, "_blank");
},
// -
doCancelWarn(item) {
getCancelWarn(item.id).then((res) => {
@ -710,6 +757,13 @@ export default {
tableClick(row, column, event) {
this.bjClick(row);
},
tableContext(row,column, event){
event.preventDefault(); //
const routerUrl = this.$router.resolve({ path: '/equipment/index', query: {code: row.code } });
window.open(routerUrl.href, "_blank");
// this.dialogVisible = true
// console.log(row)
},
//
addLabel(objectId, name, type, location, dataNum) {
// id////
@ -1971,6 +2025,8 @@ export default {
color: #fff;
font-size: 15px;
font-weight: bold;
display: flex;
justify-content: space-between;
img {
display: block;

@ -154,7 +154,7 @@
<span id="fire_box">设备列表</span>
</div>
<div class="tabBox">
<el-table @row-click="tableClick" :data="tableData" style="width: 100%"
<el-table @row-click="tableClick" :data="tableData" style="width: 100%" @row-contextmenu="tableContext"
:class="bimModel == 2 ? 'tataitab' : ''">
<el-table-column label="设备名称" width="130">
<template slot-scope="scope">
@ -919,6 +919,13 @@ export default {
// console.log(row)
this.bjClick(row);
},
tableContext(row,column, event){
event.preventDefault(); //
const routerUrl = this.$router.resolve({ path: '/equipment/index', query: {code: row.code } });
window.open(routerUrl.href, "_blank");
// this.dialogVisible = true
// console.log(row)
},
chooseFire() {
if (this.bimModel == 1) {
if (this.towers != null) {

@ -92,7 +92,7 @@
<span id="lift_box">设备列表</span>
</div>
<div class="tabBox">
<el-table @row-click="tableClick" :data="arr" style="width: 100%;max-height: 220px;"
<el-table @row-click="tableClick" :data="arr" style="width: 100%;max-height: 220px;" @row-contextmenu="tableContext"
:class="bimModel == 2 ? 'tataitab' : ''">
<el-table-column label="设备名称" width="160">
<template slot-scope="scope">
@ -346,6 +346,13 @@ export default {
bfHelper.clearComponent();
},
methods: {
tableContext(row,column, event){
event.preventDefault(); //
const routerUrl = this.$router.resolve({ path: '/equipment/index', query: {code: row.code } });
window.open(routerUrl.href, "_blank");
// this.dialogVisible = true
// console.log(row)
},
// -
doCancelWarn(item) {
getCancelWarn(item.id).then((res) => {

@ -158,7 +158,7 @@
<img class="switch_icon" src="../../../public/img/monitoring/switch/all-on.png"
v-if="tableData.buildStatus == 1" alt="" @click="closeTotal" />
<img class="switch_icon" src="../../../public/img/monitoring/switch/all-off.png" v-else alt=""
@click="openTotal" />
@click="openTotal" />
</div>
<div class="right_main">
<img src="../../../public/img/monitoring/switch/beijing.png" alt="" />
@ -200,7 +200,7 @@
</div>
</div>
<div class="first_switch">
<div class="switch_item" v-for="(item1, index1) in item.lightList" :key="index1">
<div class="switch_item" v-for="(item1, index1) in item.lightList" :key="index1" @contextmenu="clickLight(item1,$event)">
<div>
<img class="switch_icon" src="../../../public/img/monitoring/switch/on_lit.png"
v-show="item1.openStatus == 1" alt="" @click="controlFun(item1)" />
@ -717,6 +717,11 @@ export default {
this.current = val;
this.getSblb();
},
clickLight(row,event){
event.preventDefault(); //
const routerUrl = this.$router.resolve({ path: '/equipment/index', query: {code: row.code } });
window.open(routerUrl.href, "_blank");
},
//
controlFun(row) {
this.chooseId = [];

@ -115,7 +115,7 @@
<span id="monit_box">设备列表</span>
</div>
<div class="tabBox">
<el-table @row-click="tableClick" :data="tableData" style="width: 100%; max-height: 210px"
<el-table @row-click="tableClick" :data="tableData" style="width: 100%; max-height: 210px" @row-contextmenu="tableContext"
:class="bimModel == 2 ? 'tataitab' : ''">
<el-table-column label="设备名称" min-width="150">
<template slot-scope="scope">
@ -581,6 +581,13 @@ export default {
}
},
methods: {
tableContext(row,column, event){
event.preventDefault(); //
const routerUrl = this.$router.resolve({ path: '/equipment/index', query: {code: row.code } });
window.open(routerUrl.href, "_blank");
// this.dialogVisible = true
// console.log(row)
},
// -
doCancelWarn(item) {
getCancelWarn(item.id).then((res) => {

@ -180,7 +180,7 @@
<img src="../../../public/img/monitoring/ktborder.png" class="kt-border kt-border4" />
<div class="tabBox">
<el-table :data="tableData.slice((current - 1) * size, current * size)" style="width: 100%"
@row-click="tableClick" :class="bimModel == 2 ? 'tataitab' : ''">
@row-click="tableClick" :class="bimModel == 2 ? 'tataitab' : ''" @row-contextmenu="tableContext">
<el-table-column label="设备名称" style="cursor: pointer">
<template slot-scope="scope">
<div class="flex-center-center mon_box" style="cursor: pointer; overflow: hidden; white-space: nowrap">
@ -968,6 +968,13 @@ export default {
tableClick(row, column, event) {
this.bjClick(row);
},
tableContext(row,column, event){
event.preventDefault(); //
const routerUrl = this.$router.resolve({ path: '/equipment/index', query: {code: row.code } });
window.open(routerUrl.href, "_blank");
// this.dialogVisible = true
// console.log(row)
},
bjClick(row) {
bfHelper.clearTags();
if (this.bimModel == 1) {

@ -272,7 +272,7 @@
<span id="warm_box">设备列表</span>
</div>
<div class="tabBox">
<el-table :data="tableData.slice((current - 1) * size, current * size)" style="width: 100%; max-height: 210px"
<el-table :data="tableData.slice((current - 1) * size, current * size)" style="width: 100%; max-height: 210px" @row-contextmenu="tableContext"
@row-click="tableClick">
<el-table-column label="设备名称" align="left" min-width="120px">
<template slot-scope="scope">
@ -736,6 +736,13 @@ export default {
tableClick(row, column, event) {
this.bjClick(row);
},
tableContext(row,column, event){
event.preventDefault(); //
const routerUrl = this.$router.resolve({ path: '/equipment/index', query: {code: row.code } });
window.open(routerUrl.href, "_blank");
// this.dialogVisible = true
// console.log(row)
},
//
bjClick(item) {
if (item.modelId == "") {

@ -265,7 +265,7 @@
<span id="water_box">设备列表</span>
</div>
<div class="tabBox">
<el-table @row-click="tableClick" :data="tableData" style="width: 100%" height="230px"
<el-table @row-click="tableClick" :data="tableData" style="width: 100%" height="230px" @row-contextmenu="tableContext"
:class="bimModel == 2 ? 'tataitab' : ''">
<el-table-column label="设备名称" width="130">
<template slot-scope="scope">
@ -685,6 +685,13 @@ export default {
tableClick(row, column, event) {
this.bjClick(row);
},
tableContext(row,column, event){
event.preventDefault(); //
const routerUrl = this.$router.resolve({ path: '/equipment/index', query: {code: row.code } });
window.open(routerUrl.href, "_blank");
// this.dialogVisible = true
// console.log(row)
},
addWaterLabel() {
//
setTimeout(() => {

Loading…
Cancel
Save