fix:修改endpoint 显示问题

This commit is contained in:
zhangyu
2021-04-27 19:24:26 +08:00
parent 06584204ae
commit 257f27eedc
9 changed files with 33 additions and 24 deletions

View File

@@ -263,14 +263,12 @@ export default {
iframe.attachEvent('onload', function () {
// iframe加载完毕以后执行操作
that.firstShow = true
// console.log('iframe已加载完毕');
that.endLoading('screen')
})
} else {
iframe.onload = function () {
// iframe加载完毕以后执行操作
that.firstShow = true
// console.log('iframe已加载完毕');
that.endLoading('screen')
}
}

View File

@@ -361,18 +361,13 @@ export default {
chartTitle.style.background = '#d8dce1'
},
clone (event) {
// console.log('clone',event );
const canvas = event.item.querySelector('canvas')
// console.log('clone-canvas',canvas);
const canvasclone = event.clone.querySelector('canvas')
canvasclone.style.border = 'solid 1px yellow'
// console.log('clone-canvasclone',canvasclone);
if (canvas && canvasclone) {
const image = new Image()
image.src = canvas.toDataURL()
// console.log('clone-image',image);
const ctxClone = canvasclone.getContext('2d')
// ctxClone.drawImage(image,0,0);
image.onload = function () {
ctxClone.drawImage(image, 0, 0)
}
@@ -662,7 +657,7 @@ export default {
})
return
}
if (param.from == fromRoute.chartTemp) {
if (param.from == fromRoute.chartTemp) { // 模板列表
this.dataList = this.panelDataList
this.$nextTick(() => {
this.dataList.forEach((item, index) => {
@@ -685,7 +680,6 @@ export default {
item.isLoaded = false
})
// response.data.list = response.data.list.filter((item) => item.groupId === -1 || !item.groupId) // 处理外层存在的groupItem
// console.log(response.data.list)
if (response.data.list) {
this.dataTotalListBak = response.data.list
} else {

View File

@@ -37,7 +37,7 @@
<div :class="targetTab === 'panel' ? 'bottom-panel' : 'nz-table2'">
<slot></slot>
</div>
<div class="pagination-bottom">
<div class="pagination-bottom" v-if="showPagination">
<slot name="pagination"></slot>
</div>
</div>
@@ -76,6 +76,10 @@ export default {
customTool: {
type: Boolean,
default: false
},
showPagination: {
type: Boolean,
default: true
}
},
data () {
@@ -131,6 +135,7 @@ export default {
padding: 10px;
height: 100%;
background-color: #f6f6f6;
overflow-y: auto;
&>div {
background-color: white;
}
@@ -180,6 +185,7 @@ export default {
.bottom-panel {
padding-top: 15px;
background-color: white;
padding-bottom: 50px;
}
.resize-modal {

View File

@@ -6,6 +6,7 @@
:targetTab="targetTab"
@changeTab="changeTab"
class="full-width-height"
:showPagination="false"
>
<template v-slot:title><span :title="obj.name">{{obj.name}}</span></template>
<template v-if="from === fromRoute.asset" v-slot:top-tool-right>
@@ -274,14 +275,17 @@ export default {
this.getData(this.filter)
} else {
if (this.from == this.$CONSTANTS.fromRoute.chartTemp) {
console.log(this.obj)
this.panelDataList = [this.obj]
console.log(this.panelData)
if (this.obj.type === 'group') {
this.$get('/visual/panel/chart', { ids: this.obj.id,groupId:0}).then(res => {
console.log(res)
})
this.panelDataList = res.data.list
if (this.panelDataList.length > 0) {
this.showPanel.id = this.filter.panelId = 0
this.getData(this.filter)
}
})
return
}
this.panelDataList = [this.obj]
if (this.panelDataList.length > 0) {
this.showPanel.id = this.filter.panelId = 0
this.getData(this.filter)

View File

@@ -101,6 +101,7 @@ export default {
immediate: true,
deep: true,
handler (n) {
console.log(n)
this.$emit('reload', n)
}
}

View File

@@ -755,13 +755,13 @@ export default {
currentModuleCopy: {
immediate: true,
handler (n, o) {
if (n.type && n.type.toLowerCase() == 'snmp') {
this.endpointTableTitle[4].show = false
this.endpointTableTitle[5].show = false
} else {
this.endpointTableTitle[4].show = true
this.endpointTableTitle[5].show = true
}
// if (n.type && n.type.toLowerCase() == 'snmp') {
// this.endpointTableTitle[4].show = false
// this.endpointTableTitle[5].show = false
// } else {
// this.endpointTableTitle[4].show = true
// this.endpointTableTitle[5].show = true
// }
}
}
}

View File

@@ -77,7 +77,7 @@
<div v-else-if="scope.row[item.prop]===1">
<div class="active-icon green inline-block"></div> up
</div>
<div v-else>
<div v-else-if="scope.row[item.prop]">
<div class="active-icon gray inline-block"></div> suspended
</div>
</div>
@@ -174,6 +174,7 @@ export default {
this.$message.success(this.$t('overall.copySuccess'))
},
suspendedStr (status) { // 10进制转为2进制 分别给对应的状态
if (!status || status === 1 || status == 0) { return '' }
const arr = status.toString(2).split('')
while (arr.length < 5) {
arr.unshift('0')

View File

@@ -266,7 +266,6 @@ export default {
response.data.list[i].status = response.data.list[i].status + ''
}
this.tableData = response.data.list
console.log(this.tableData);
this.pageObj.total = response.data.total
if (!this.scrollbarWrap) {
this.$nextTick(() => {
@@ -279,6 +278,9 @@ export default {
},
reloadTable (obj) {
Object.keys(obj).forEach(key => {
if (key === 'change') {
return
}
this.searchCheckBox[key] = obj[key].join(',')
})
console.log(obj, this.searchCheckBox)

View File

@@ -1,5 +1,5 @@
import Vue from 'vue'
import moment from 'moment-timezone'
Date.prototype.setStart = function () {
this.setHours(0)
this.setMinutes(0)
@@ -261,6 +261,7 @@ export default new Vue({
// 将本地时区转为系统配置的时区
computeTimezone: function (sourceTime) {
let offset = localStorage.getItem('nz-sys-timezone')
offset = moment.tz(offset).zoneAbbr()
if (offset && offset !== 'undefined') {
offset = Number.parseInt(offset)
const date = new Date(sourceTime)
@@ -296,6 +297,7 @@ export default new Vue({
},
UTCTimeToConfigTimezone (utcTime) {
let offset = localStorage.getItem('nz-sys-timezone')
offset = moment.tz(offset).zoneAbbr()
if (offset && offset !== 'undefined') {
let time = utcTime
if (typeof time === 'string' && /(\d+?-){2}\d+?\s(\d+?:)*\d+/.test(time)) {
@@ -310,6 +312,7 @@ export default new Vue({
},
configTimezoneToUTCTime: function (configTime) {
let offset = localStorage.getItem('nz-sys-timezone')
offset = moment.tz(offset).zoneAbbr()
if (offset && offset !== 'undefined') {
let time = configTime
if (typeof time === 'string' && /(\d+?-){2}\d+?\s(\d+?:)*\d+/.test(time)) {