fix:修改详情页面报错的问题

This commit is contained in:
zhangyu
2022-03-07 09:37:27 +08:00
parent 367a95b78b
commit 24ed289135
37 changed files with 135 additions and 136 deletions

View File

@@ -58,7 +58,7 @@
<script> <script>
import bus from '@/libs/bus' import bus from '@/libs/bus'
import lodash from 'lodash' import lodash from 'lodash'
import chartHeaderMixin from "@/components/chart/chartHeaderMixin"; import chartHeaderMixin from '@/components/chart/chartHeaderMixin'
export default { export default {
name: 'ChartScreenHeader', name: 'ChartScreenHeader',
mixins: [chartHeaderMixin], mixins: [chartHeaderMixin],

View File

@@ -261,7 +261,7 @@ export default {
} else { } else {
return getOption(this.chartInfo.type) return getOption(this.chartInfo.type)
} }
}, }
}, },
methods: { methods: {
isTimeSeries, isTimeSeries,

View File

@@ -42,7 +42,7 @@ export default {
data () { data () {
return { return {
stackTotalColor: null, stackTotalColor: null,
isStack: false, isStack: false
} }
}, },
computed: { computed: {
@@ -108,7 +108,7 @@ export default {
let seriesIndex = 0 let seriesIndex = 0
originalDatas.forEach((originalData, expressionIndex) => { originalDatas.forEach((originalData, expressionIndex) => {
originalData.forEach((data, dataIndex) => { originalData.forEach((data, dataIndex) => {
if (seriesIndex >= this.series.length) {// 只取跟series 一样长度作比较 if (seriesIndex >= this.series.length) { // 只取跟series 一样长度作比较
return return
} }
seriesIndex++ seriesIndex++

View File

@@ -6,20 +6,20 @@
<style> <style>
</style> </style>
<script> <script>
export default { export default {
name: "TestElement", name: 'TestElement',
props: { props: {
text : { text: {
type: String, type: String,
default: "x", default: 'x'
}
}, },
}, data: function () {
data: function() {
return { return {
} }
}, },
mounted: function() { mounted: function () {
console.log("### " + this.text + " ready!"); console.log('### ' + this.text + ' ready!')
},
} }
}
</script> </script>

View File

@@ -15,97 +15,97 @@
* }); * });
* ``` * ```
*/ */
import extend from "../utils/extend.js"; import extend from '../utils/extend.js'
import { addEdges } from "../utils/rect.js"; import { addEdges } from '../utils/rect.js'
import Modification from "./Modification.js"; import Modification from './Modification.js'
import { makeModifier } from "./base.js"; import { makeModifier } from './base.js'
const aspectRatio = { const aspectRatio = {
start(arg) { start (arg) {
const { const {
state, state,
rect, rect,
edges: originalEdges, edges: originalEdges,
pageCoords: coords pageCoords: coords
} = arg; } = arg
let { let {
ratio ratio
} = state.options; } = state.options
const { const {
equalDelta, equalDelta,
modifiers modifiers
} = state.options; } = state.options
if (ratio === 'preserve') { if (ratio === 'preserve') {
ratio = rect.width / rect.height; ratio = rect.width / rect.height
} }
state.startCoords = extend({}, coords); state.startCoords = extend({}, coords)
state.startRect = extend({}, rect); state.startRect = extend({}, rect)
state.ratio = ratio; state.ratio = ratio
state.equalDelta = equalDelta; state.equalDelta = equalDelta
const linkedEdges = state.linkedEdges = { const linkedEdges = state.linkedEdges = {
top: originalEdges.top || originalEdges.left && !originalEdges.bottom, top: originalEdges.top || originalEdges.left && !originalEdges.bottom,
left: originalEdges.left || originalEdges.top && !originalEdges.right, left: originalEdges.left || originalEdges.top && !originalEdges.right,
bottom: originalEdges.bottom || originalEdges.right && !originalEdges.top, bottom: originalEdges.bottom || originalEdges.right && !originalEdges.top,
right: originalEdges.right || originalEdges.bottom && !originalEdges.left right: originalEdges.right || originalEdges.bottom && !originalEdges.left
}; }
state.xIsPrimaryAxis = !!(originalEdges.left || originalEdges.right); state.xIsPrimaryAxis = !!(originalEdges.left || originalEdges.right)
if (state.equalDelta) { if (state.equalDelta) {
state.edgeSign = (linkedEdges.left ? 1 : -1) * (linkedEdges.top ? 1 : -1); state.edgeSign = (linkedEdges.left ? 1 : -1) * (linkedEdges.top ? 1 : -1)
} else { } else {
const negativeSecondaryEdge = state.xIsPrimaryAxis ? linkedEdges.top : linkedEdges.left; const negativeSecondaryEdge = state.xIsPrimaryAxis ? linkedEdges.top : linkedEdges.left
state.edgeSign = negativeSecondaryEdge ? -1 : 1; state.edgeSign = negativeSecondaryEdge ? -1 : 1
} }
extend(arg.edges, linkedEdges); extend(arg.edges, linkedEdges)
if (!modifiers || !modifiers.length) return; if (!modifiers || !modifiers.length) return
const subModification = new Modification(arg.interaction); const subModification = new Modification(arg.interaction)
subModification.copyFrom(arg.interaction.modification); subModification.copyFrom(arg.interaction.modification)
subModification.prepareStates(modifiers); subModification.prepareStates(modifiers)
state.subModification = subModification; state.subModification = subModification
subModification.startAll({ ...arg subModification.startAll({ ...arg })
});
}, },
set(arg) { set (arg) {
const { const {
state, state,
rect, rect,
coords coords
} = arg; } = arg
const initialCoords = extend({}, coords); const initialCoords = extend({}, coords)
const aspectMethod = state.equalDelta ? setEqualDelta : setRatio; const aspectMethod = state.equalDelta ? setEqualDelta : setRatio
aspectMethod(state, state.xIsPrimaryAxis, coords, rect); aspectMethod(state, state.xIsPrimaryAxis, coords, rect)
if (!state.subModification) { if (!state.subModification) {
return null; return null
} }
const correctedRect = extend({}, rect); const correctedRect = extend({}, rect)
addEdges(state.linkedEdges, correctedRect, { addEdges(state.linkedEdges, correctedRect, {
x: coords.x - initialCoords.x, x: coords.x - initialCoords.x,
y: coords.y - initialCoords.y y: coords.y - initialCoords.y
}); })
const result = state.subModification.setAll({ ...arg, const result = state.subModification.setAll({
...arg,
rect: correctedRect, rect: correctedRect,
edges: state.linkedEdges, edges: state.linkedEdges,
pageCoords: coords, pageCoords: coords,
prevCoords: coords, prevCoords: coords,
prevRect: correctedRect prevRect: correctedRect
}); })
const { const {
delta delta
} = result; } = result
if (result.changed) { if (result.changed) {
const xIsCriticalAxis = Math.abs(delta.x) > Math.abs(delta.y); // do aspect modification again with critical edge axis as primary const xIsCriticalAxis = Math.abs(delta.x) > Math.abs(delta.y) // do aspect modification again with critical edge axis as primary
aspectMethod(state, xIsCriticalAxis, result.coords, result.rect); aspectMethod(state, xIsCriticalAxis, result.coords, result.rect)
extend(coords, result.coords); extend(coords, result.coords)
} }
return result.eventProps; return result.eventProps
}, },
defaults: { defaults: {
@@ -114,34 +114,34 @@ const aspectRatio = {
modifiers: [], modifiers: [],
enabled: false enabled: false
} }
}; }
function setEqualDelta({ function setEqualDelta ({
startCoords, startCoords,
edgeSign edgeSign
}, xIsPrimaryAxis, coords) { }, xIsPrimaryAxis, coords) {
if (xIsPrimaryAxis) { if (xIsPrimaryAxis) {
coords.y = startCoords.y + (coords.x - startCoords.x) * edgeSign; coords.y = startCoords.y + (coords.x - startCoords.x) * edgeSign
} else { } else {
coords.x = startCoords.x + (coords.y - startCoords.y) * edgeSign; coords.x = startCoords.x + (coords.y - startCoords.y) * edgeSign
} }
} }
function setRatio({ function setRatio ({
startRect, startRect,
startCoords, startCoords,
ratio, ratio,
edgeSign edgeSign
}, xIsPrimaryAxis, coords, rect) { }, xIsPrimaryAxis, coords, rect) {
if (xIsPrimaryAxis) { if (xIsPrimaryAxis) {
const newHeight = rect.width / ratio; const newHeight = rect.width / ratio
coords.y = startCoords.y + (newHeight - startRect.height) * edgeSign; coords.y = startCoords.y + (newHeight - startRect.height) * edgeSign
} else { } else {
const newWidth = rect.height * ratio; const newWidth = rect.height * ratio
coords.x = startCoords.x + (newWidth - startRect.width) * edgeSign; coords.x = startCoords.x + (newWidth - startRect.width) * edgeSign
} }
} }
export default makeModifier(aspectRatio, 'aspectRatio'); export default makeModifier(aspectRatio, 'aspectRatio')
export { aspectRatio }; export { aspectRatio }
//# sourceMappingURL=aspectRatio.js.map // # sourceMappingURL=aspectRatio.js.map

View File

@@ -19,7 +19,7 @@ const chartTreemapOption = {
return [ return [
'<div class="tooltip-title">' + '<div class="tooltip-title">' +
formatUtil.encodeHTML(treePath.join('/')) + formatUtil.encodeHTML(treePath.join('/')) +
'</div>', '</div>'
].join('') ].join('')
} }
}, },

View File

@@ -318,7 +318,7 @@ export default {
return { return {
alertLabelData: null, alertLabelData: null,
loading: true, loading: true,
heightList: 0, heightList: 0
} }
}, },
watch: { watch: {

View File

@@ -81,4 +81,3 @@ export default {
} }
} }
</script> </script>

View File

@@ -406,7 +406,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.searchTime = [bus.computeTimezoneTime(new Date().getTime() - 1 * 60 * 60 * 1000), bus.computeTimezoneTime(new Date().getTime())] this.searchTime = [bus.computeTimezoneTime(new Date().getTime() - 1 * 60 * 60 * 1000), bus.computeTimezoneTime(new Date().getTime())]
this.$store.dispatch('dispatchPanelTime', { this.$store.dispatch('dispatchPanelTime', {
time: this.searchTime , time: this.searchTime,
nowTimeType: { nowTimeType: {
id: 4, id: 4,
text: this.$t('dashboard.panel.lastOneHour'), text: this.$t('dashboard.panel.lastOneHour'),

View File

@@ -106,7 +106,7 @@ export default {
this.nowTime = this.utcTimeToTimezoneStr(response.time) this.nowTime = this.utcTimeToTimezoneStr(response.time)
if (response.code === 200) { if (response.code === 200) {
this.tableData = response.data this.tableData = response.data
if (!this.scrollbarWrap) { if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
this.$nextTick(() => { this.$nextTick(() => {
this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper
this.toTopBtnHandler(this.scrollbarWrap) this.toTopBtnHandler(this.scrollbarWrap)

View File

@@ -238,7 +238,7 @@ export default {
} }
this.tableData = response.data.list this.tableData = response.data.list
this.pageObj.total = response.data.total this.pageObj.total = response.data.total
if (!this.scrollbarWrap) { if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
this.$nextTick(() => { this.$nextTick(() => {
this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper
this.toTopBtnHandler(this.scrollbarWrap) this.toTopBtnHandler(this.scrollbarWrap)

View File

@@ -246,9 +246,9 @@ export default {
if (this.needAlertDaysData) { if (this.needAlertDaysData) {
response.data.list.forEach(item => { response.data.list.forEach(item => {
item.trendLoading = true item.trendLoading = true
item.left= 0 item.left = 0
item.top= 0 item.top = 0
item.alertNumtooltipShow= false item.alertNumtooltipShow = false
item.alertDaysData = [ item.alertDaysData = [
{ {
metric: { priority: 'P1' }, metric: { priority: 'P1' },
@@ -267,7 +267,7 @@ export default {
} }
this.tableData = response.data.list this.tableData = response.data.list
this.pageObj.total = response.data.total this.pageObj.total = response.data.total
if (!this.scrollbarWrap) { if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
this.$nextTick(() => { this.$nextTick(() => {
this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper
this.toTopBtnHandler(this.scrollbarWrap) this.toTopBtnHandler(this.scrollbarWrap)

View File

@@ -153,9 +153,9 @@ export default {
if (this.needAlertDaysData) { if (this.needAlertDaysData) {
response.data.list.forEach(item => { response.data.list.forEach(item => {
item.trendLoading = true item.trendLoading = true
item.left= 0 item.left = 0
item.top= 0 item.top = 0
item.alertNumtooltipShow= false item.alertNumtooltipShow = false
item.alertDaysData = [ item.alertDaysData = [
{ {
metric: { priority: 'P1' }, metric: { priority: 'P1' },
@@ -174,7 +174,7 @@ export default {
} }
this.tableData = response.data.list this.tableData = response.data.list
this.pageObj.total = response.data.total this.pageObj.total = response.data.total
if (!this.scrollbarWrap) { if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
this.$nextTick(() => { this.$nextTick(() => {
this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper
this.toTopBtnHandler(this.scrollbarWrap) this.toTopBtnHandler(this.scrollbarWrap)

View File

@@ -128,7 +128,7 @@ export default {
dropdownShow: false, dropdownShow: false,
timeout: null, timeout: null,
formatTime: '', formatTime: '',
hideSameLabels: true, hideSameLabels: true
} }
}, },
methods: { methods: {

View File

@@ -176,7 +176,7 @@ export default {
plTableSHow: true, plTableSHow: true,
scrollTop: 0, scrollTop: 0,
scrollbarWrap: null, scrollbarWrap: null,
minusTime: 0, minusTime: 0
} }
}, },
methods: { methods: {

View File

@@ -143,9 +143,9 @@ export default {
if (this.needAlertDaysData) { if (this.needAlertDaysData) {
response.data.list.forEach(item => { response.data.list.forEach(item => {
item.trendLoading = true item.trendLoading = true
item.left= 0 item.left = 0
item.top= 0 item.top = 0
item.alertNumtooltipShow= false item.alertNumtooltipShow = false
item.alertDaysData = [ item.alertDaysData = [
{ {
metric: { priority: 'P1' }, metric: { priority: 'P1' },
@@ -165,7 +165,7 @@ export default {
this.tableData = response.data.list this.tableData = response.data.list
this.nowTime = this.utcTimeToTimezoneStr(response.time) this.nowTime = this.utcTimeToTimezoneStr(response.time)
this.pageObj.total = response.data.total this.pageObj.total = response.data.total
if (!this.scrollbarWrap) { if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
this.$nextTick(() => { this.$nextTick(() => {
this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper
this.toTopBtnHandler(this.scrollbarWrap) this.toTopBtnHandler(this.scrollbarWrap)

View File

@@ -142,7 +142,7 @@ export default {
} }
this.tableData = response.data.list this.tableData = response.data.list
this.pageObj.total = response.data.total this.pageObj.total = response.data.total
if (!this.scrollbarWrap) { if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
this.$nextTick(() => { this.$nextTick(() => {
this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper
this.toTopBtnHandler(this.scrollbarWrap) this.toTopBtnHandler(this.scrollbarWrap)

View File

@@ -146,7 +146,7 @@ export default {
} }
this.tableData = response.data.list this.tableData = response.data.list
this.pageObj.total = response.data.total this.pageObj.total = response.data.total
if (!this.scrollbarWrap) { if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
this.$nextTick(() => { this.$nextTick(() => {
this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper
this.toTopBtnHandler(this.scrollbarWrap) this.toTopBtnHandler(this.scrollbarWrap)

View File

@@ -118,7 +118,7 @@ export default {
this.metaList.push(meta) this.metaList.push(meta)
this.$emit('metaList') this.$emit('metaList')
} else { } else {
let self = this const self = this
const newCondition = Object.assign({}, self.meta) const newCondition = Object.assign({}, self.meta)
newCondition.nameIsEditing = true newCondition.nameIsEditing = true
this.metaList.push(newCondition) this.metaList.push(newCondition)

View File

@@ -552,7 +552,7 @@ export default {
arr.unshift(obj) arr.unshift(obj)
} }
return arr return arr
}, }
} }
} }
</script> </script>

View File

@@ -170,9 +170,9 @@ export default {
if (this.needAlertDaysData) { if (this.needAlertDaysData) {
response.data.list.forEach(item => { response.data.list.forEach(item => {
item.trendLoading = true item.trendLoading = true
item.left= 0 item.left = 0
item.top= 0 item.top = 0
item.alertNumtooltipShow= false item.alertNumtooltipShow = false
item.alertDaysData = [ item.alertDaysData = [
{ {
metric: { priority: 'P1' }, metric: { priority: 'P1' },

View File

@@ -176,9 +176,9 @@ export default {
if (this.needAlertDaysData) { if (this.needAlertDaysData) {
response.data.list.forEach(item => { response.data.list.forEach(item => {
item.trendLoading = true item.trendLoading = true
item.left= 0 item.left = 0
item.top= 0 item.top = 0
item.alertNumtooltipShow= false item.alertNumtooltipShow = false
item.alertDaysData = [ item.alertDaysData = [
{ {
metric: { priority: 'P1' }, metric: { priority: 'P1' },

View File

@@ -422,11 +422,11 @@ export default {
enableChange (type) { enableChange (type) {
switch (type) { switch (type) {
case 'valueMapping': case 'valueMapping':
break; break
case 'legend': case 'legend':
break; break
case '': case '':
break; break
} }
this.change() this.change()
} }

View File

@@ -144,7 +144,7 @@ import chartDataFormat from '../../../charts/chartDataFormat'
import alertRuleInfo from '../../alert/alertRuleInfo' import alertRuleInfo from '../../alert/alertRuleInfo'
import alertLabel from '../../alert/alertLabel' import alertLabel from '../../alert/alertLabel'
import { calcDurationByStringTimeB } from '../../js/tools' import { calcDurationByStringTimeB } from '../../js/tools'
import {alertMessage as alertMessageConstant} from "@/components/common/js/constants"; import { alertMessage as alertMessageConstant } from '@/components/common/js/constants'
export default { export default {
name: 'alertMessageTable', name: 'alertMessageTable',
components: { components: {
@@ -222,7 +222,7 @@ export default {
label: this.$t('alert.list.state'), label: this.$t('alert.list.state'),
prop: 'state', prop: 'state',
show: true, show: true,
width: 100, width: 100
// sortable: 'custom' // sortable: 'custom'
}, { }, {
label: this.$t('alert.startAt'), label: this.$t('alert.startAt'),

View File

@@ -464,12 +464,12 @@ export default {
/* if (refresh) { /* if (refresh) {
this.getData(this.filter) this.getData(this.filter)
} */ } */
}, }
}, },
computed: { computed: {
chartRightBoxShow () { chartRightBoxShow () {
return this.$store.getters.getShowRightBox return this.$store.getters.getShowRightBox
}, }
}, },
created () { created () {
// this.getPanelData() // this.getPanelData()

View File

@@ -251,7 +251,7 @@ export default {
}, },
searchTime: bus.getTimezontDateRange(), searchTime: bus.getTimezontDateRange(),
needAlertDaysData: true, needAlertDaysData: true,
trendKey: 'ruleId', trendKey: 'ruleId'
} }
}, },
methods: { methods: {
@@ -290,9 +290,9 @@ export default {
if (this.needAlertDaysData) { if (this.needAlertDaysData) {
response.data.list.forEach(item => { response.data.list.forEach(item => {
item.trendLoading = true item.trendLoading = true
item.left= 0 item.left = 0
item.top= 0 item.top = 0
item.alertNumtooltipShow= false item.alertNumtooltipShow = false
item.alertDaysData = [ item.alertDaysData = [
{ {
metric: { priority: 'P1' }, metric: { priority: 'P1' },
@@ -320,7 +320,7 @@ export default {
this.detailViewRightObj = detailViewRightObj this.detailViewRightObj = detailViewRightObj
this.pageObj.total = response.data.total this.pageObj.total = response.data.total
this.pageObj.pages = response.data.pages this.pageObj.pages = response.data.pages
if (!this.scrollbarWrap) { if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
this.$nextTick(() => { this.$nextTick(() => {
this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper
this.toTopBtnHandler(this.scrollbarWrap) this.toTopBtnHandler(this.scrollbarWrap)

View File

@@ -192,7 +192,7 @@ export default {
} }
this.tableData = response.data.list this.tableData = response.data.list
this.pageObj.total = response.data.total this.pageObj.total = response.data.total
if (!this.scrollbarWrap) { if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
this.$nextTick(() => { this.$nextTick(() => {
this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper
this.toTopBtnHandler(this.scrollbarWrap) this.toTopBtnHandler(this.scrollbarWrap)

View File

@@ -210,7 +210,7 @@ export default {
this.tableData = response.data.list this.tableData = response.data.list
this.pageObj.total = response.data.total this.pageObj.total = response.data.total
this.nowTime = this.utcTimeToTimezoneStr(response.time) this.nowTime = this.utcTimeToTimezoneStr(response.time)
if (!this.scrollbarWrap) { if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
this.$nextTick(() => { this.$nextTick(() => {
this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper
this.toTopBtnHandler(this.scrollbarWrap) this.toTopBtnHandler(this.scrollbarWrap)

View File

@@ -132,7 +132,7 @@ export default {
} }
this.tableData = response.data.list this.tableData = response.data.list
this.pageObj.total = response.data.total this.pageObj.total = response.data.total
if (!this.scrollbarWrap) { if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
this.$nextTick(() => { this.$nextTick(() => {
this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper
this.toTopBtnHandler(this.scrollbarWrap) this.toTopBtnHandler(this.scrollbarWrap)

View File

@@ -118,7 +118,7 @@ export const parentTableCommon = {
if (response.code === 200) { if (response.code === 200) {
this.tableData = [] this.tableData = []
this.tableData = response.data.list this.tableData = response.data.list
if (!this.scrollbarWrap) { if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
this.$nextTick(() => { this.$nextTick(() => {
this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper
this.toTopBtnHandler(this.scrollbarWrap) this.toTopBtnHandler(this.scrollbarWrap)

View File

@@ -107,7 +107,7 @@ import chartTmplTable from '@/components/common/table/settings/chartTmplTable'
import topToolMoreOptions from '@/components/common/popBox/topToolMoreOptions' import topToolMoreOptions from '@/components/common/popBox/topToolMoreOptions'
import routerPathParams from '@/components/common/mixin/routerPathParams' import routerPathParams from '@/components/common/mixin/routerPathParams'
import chartRightBox from '@/components/common/rightBox/chart/chartRightBox' import chartRightBox from '@/components/common/rightBox/chart/chartRightBox'
import {randomcolor} from "@/components/common/js/radomcolor/randomcolor"; import { randomcolor } from '@/components/common/js/radomcolor/randomcolor'
export default { export default {
name: 'chartTemp', name: 'chartTemp',
@@ -294,7 +294,7 @@ export default {
} }
this.tableData = response.data.list this.tableData = response.data.list
this.pageObj.total = response.data.total this.pageObj.total = response.data.total
if (!this.scrollbarWrap) { if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
this.$nextTick(() => { this.$nextTick(() => {
this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper
this.toTopBtnHandler(this.scrollbarWrap) this.toTopBtnHandler(this.scrollbarWrap)

View File

@@ -197,7 +197,7 @@ export default {
this.detailViewRightObj = detailViewRightObj this.detailViewRightObj = detailViewRightObj
this.pageObj.total = response.data.total this.pageObj.total = response.data.total
this.pageObj.pages = response.data.pages this.pageObj.pages = response.data.pages
if (!this.scrollbarWrap) { if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
this.$nextTick(() => { this.$nextTick(() => {
this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper
this.toTopBtnHandler(this.scrollbarWrap) this.toTopBtnHandler(this.scrollbarWrap)

View File

@@ -629,9 +629,9 @@ export default {
if (this.needAlertDaysData) { if (this.needAlertDaysData) {
response.data.list.forEach(item => { response.data.list.forEach(item => {
item.trendLoading = true item.trendLoading = true
item.left= 0 item.left = 0
item.top= 0 item.top = 0
item.alertNumtooltipShow= false item.alertNumtooltipShow = false
item.alertDaysData = [ item.alertDaysData = [
{ {
metric: { priority: 'P1' }, metric: { priority: 'P1' },
@@ -659,7 +659,7 @@ export default {
this.detailViewRightObj = detailViewRightObj this.detailViewRightObj = detailViewRightObj
this.pageObj.total = response.data.total this.pageObj.total = response.data.total
this.pageObj.pages = response.data.pages this.pageObj.pages = response.data.pages
if (!this.scrollbarWrap) { if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
this.$nextTick(() => { this.$nextTick(() => {
this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper
this.toTopBtnHandler(this.scrollbarWrap) this.toTopBtnHandler(this.scrollbarWrap)

View File

@@ -412,9 +412,9 @@ export default {
if (this.needAlertDaysData) { if (this.needAlertDaysData) {
response.data.list.forEach(item => { response.data.list.forEach(item => {
item.trendLoading = true item.trendLoading = true
item.left= 0 item.left = 0
item.top= 0 item.top = 0
item.alertNumtooltipShow= false item.alertNumtooltipShow = false
item.alertDaysData = [ item.alertDaysData = [
{ {
metric: { priority: 'P1' }, metric: { priority: 'P1' },
@@ -442,7 +442,7 @@ export default {
this.detailViewRightObj = detailViewRightObj this.detailViewRightObj = detailViewRightObj
this.pageObj.total = response.data.total this.pageObj.total = response.data.total
this.pageObj.pages = response.data.pages this.pageObj.pages = response.data.pages
if (!this.scrollbarWrap) { if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
this.$nextTick(() => { this.$nextTick(() => {
this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper
this.toTopBtnHandler(this.scrollbarWrap) this.toTopBtnHandler(this.scrollbarWrap)

View File

@@ -150,9 +150,9 @@ export default {
if (this.needAlertDaysData) { if (this.needAlertDaysData) {
response.data.list.forEach(item => { response.data.list.forEach(item => {
item.trendLoading = true item.trendLoading = true
item.left= 0 item.left = 0
item.top= 0 item.top = 0
item.alertNumtooltipShow= false item.alertNumtooltipShow = false
item.alertDaysData = [ item.alertDaysData = [
{ {
metric: { priority: 'P1' }, metric: { priority: 'P1' },
@@ -174,7 +174,7 @@ export default {
} }
this.tableData = response.data.list this.tableData = response.data.list
this.pageObj.total = response.data.total this.pageObj.total = response.data.total
if (!this.scrollbarWrap) { if (!this.scrollbarWrap && this.$refs.dataTable && this.$refs.dataTable.$refs.dataTable) {
this.$nextTick(() => { this.$nextTick(() => {
this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper this.scrollbarWrap = this.$refs.dataTable.$refs.dataTable.bodyWrapper
this.toTopBtnHandler(this.scrollbarWrap) this.toTopBtnHandler(this.scrollbarWrap)