NEZ-2335 fix: 修复 asset 复制时,原占用的 机柜位置可选的问题

This commit is contained in:
zhangyu
2022-10-31 14:06:42 +08:00
parent 3336f96703
commit a90a94e095
25 changed files with 44 additions and 46 deletions

File diff suppressed because one or more lines are too long

View File

@@ -227,7 +227,7 @@ export function moveElement (layout, l, x, y, isUserAction, preventCollision) {
// nearest collision. // nearest collision.
let sorted = sortLayoutItemsByRowCol(layout) let sorted = sortLayoutItemsByRowCol(layout)
if (movingUp) sorted = sorted.reverse() if (movingUp) sorted = sorted.reverse()
let collisions = getAllCollisions(sorted, l) const collisions = getAllCollisions(sorted, l)
if (preventCollision && collisions.length) { if (preventCollision && collisions.length) {
l.x = oldX l.x = oldX
l.y = oldY l.y = oldY

View File

@@ -740,7 +740,7 @@ export default {
animation: false, animation: false,
appendToBody: true, appendToBody: true,
className: 'line-chart-block-Zindex', className: 'line-chart-block-Zindex',
extraCssText: 'z-index:99999999;visibility:visible;', extraCssText: 'z-index:99999999;visibility:visible;',
/* enterable:true, 导致tooltip不消失显示多个tooltip */ /* enterable:true, 导致tooltip不消失显示多个tooltip */
position: function (point, params, dom, rect, size) { position: function (point, params, dom, rect, size) {
dom.style.transform = 'translateZ(0)' dom.style.transform = 'translateZ(0)'

View File

@@ -3,7 +3,7 @@ const chartGaugeOption = {
show: true, show: true,
trigger: 'item', trigger: 'item',
confine: false, confine: false,
extraCssText: 'z-index:99999999;visibility:visible;', extraCssText: 'z-index:99999999;visibility:visible;',
z: 9, z: 9,
animation: false, animation: false,
appendToBody: true, appendToBody: true,

View File

@@ -3,7 +3,7 @@ const chartPieOption = {
show: true, show: true,
trigger: 'item', trigger: 'item',
confine: false, confine: false,
extraCssText: 'z-index:99999999;visibility:visible;', extraCssText: 'z-index:99999999;visibility:visible;',
z: 9, z: 9,
animation: false, animation: false,
appendToBody: true, appendToBody: true,

View File

@@ -3,7 +3,7 @@ import * as echarts from 'echarts'
import { getMetricTypeValue } from '@/components/common/js/tools' import { getMetricTypeValue } from '@/components/common/js/tools'
import { getChart, getMousePoint, setChart } from '@/components/common/js/common' import { getChart, getMousePoint, setChart } from '@/components/common/js/common'
import { randomcolor } from '@/components/common/js/radomcolor/randomcolor' import { randomcolor } from '@/components/common/js/radomcolor/randomcolor'
import chartDataFormat from "@/components/chart/chartDataFormat"; import chartDataFormat from '@/components/chart/chartDataFormat'
export default { export default {
data () { data () {
return { return {

View File

@@ -350,7 +350,7 @@ export default {
this.getAlertMessageInfo() this.getAlertMessageInfo()
window.addEventListener('resize', this.resize) window.addEventListener('resize', this.resize)
}, },
destroyed() { destroyed () {
window.removeEventListener('resize', this.resize) window.removeEventListener('resize', this.resize)
} }
} }

View File

@@ -153,7 +153,6 @@ export default {
} }
</script> </script>
<style scoped> <style scoped>
</style> </style>

View File

@@ -152,7 +152,7 @@ export default {
}, },
props: { props: {
from: String, from: String,
sign:[Number,String] sign: [Number, String]
}, },
watch: { watch: {
obj: { obj: {

View File

@@ -85,7 +85,7 @@
import { fromRoute } from '@/components/common/js/constants' import { fromRoute } from '@/components/common/js/constants'
import { bottomBoxWindow } from '@/components/common/js/tools' import { bottomBoxWindow } from '@/components/common/js/tools'
import detailViewRight from '@/components/common/detailView/view/detailViewRight' import detailViewRight from '@/components/common/detailView/view/detailViewRight'
import panelChart from "@/components/chart/panelChart"; import panelChart from '@/components/chart/panelChart'
export default { export default {
name: 'nzDataList', name: 'nzDataList',

View File

@@ -375,7 +375,7 @@ export const coordinatePoint = {
offsetY: '77.5%', offsetY: '77.5%',
point: [ point: [
{ x: 40, y: 130 }, { x: 40, y: 130 },
{ x: 20, y: 150 , disabled: true}, { x: 20, y: 150, disabled: true },
{ x: 10, y: 160 }, { x: 10, y: 160 },
{ x: 30, y: 180 }, { x: 30, y: 180 },
{ x: 70, y: 185 }, { x: 70, y: 185 },
@@ -383,7 +383,7 @@ export const coordinatePoint = {
{ x: 110, y: 150 }, { x: 110, y: 150 },
{ x: 120, y: 120 }, { x: 120, y: 120 },
{ x: 160, y: 70 }, { x: 160, y: 70 },
{ x: 170, y: 60 , disabled: true}, { x: 170, y: 60, disabled: true },
{ x: 190, y: 50 }, { x: 190, y: 50 },
{ x: 230, y: 30 }, { x: 230, y: 30 },
{ x: 220, y: 10 }, { x: 220, y: 10 },
@@ -397,7 +397,7 @@ export const coordinatePoint = {
offsetY: '47.5%', offsetY: '47.5%',
point: [ point: [
{ x: 160, y: 260 }, { x: 160, y: 260 },
{ x: 120, y: 230 , disabled: true}, { x: 120, y: 230, disabled: true },
{ x: 110, y: 220 }, { x: 110, y: 220 },
{ x: 70, y: 225 }, { x: 70, y: 225 },
{ x: 65, y: 260 }, { x: 65, y: 260 },

View File

@@ -618,7 +618,7 @@ export default {
this.showMetrics = true this.showMetrics = true
this.expressions = [''] this.expressions = ['']
this.$refs.alertRuleForm.clearValidate('expr') // 移除from表单的 expr 验证 this.$refs.alertRuleForm.clearValidate('expr') // 移除from表单的 expr 验证
this.$nextTick(()=>{ this.$nextTick(() => {
this.showSnmpTrap = true this.showSnmpTrap = true
}) })
} else if (val === 2) { } else if (val === 2) {
@@ -626,7 +626,7 @@ export default {
this.expressions = [''] this.expressions = ['']
// showMetrics 为 false 时,展示 Logs label // showMetrics 为 false 时,展示 Logs label
this.showSnmpTrap = false // showSnmpTrap 为 true 时显示 expr,threshold,unit this.showSnmpTrap = false // showSnmpTrap 为 true 时显示 expr,threshold,unit
this.$nextTick(()=>{ this.$nextTick(() => {
this.showSnmpTrap = true this.showSnmpTrap = true
}) })
this.$refs.alertRuleForm.clearValidate('expr') // 移除from表单的 expr 验证 this.$refs.alertRuleForm.clearValidate('expr') // 移除from表单的 expr 验证

View File

@@ -1558,7 +1558,7 @@ export default {
}, },
// 判断输入框的高度 // 判断输入框的高度
getHeight () { getHeight () {
if (document.getElementById('search-ul').clientHeight < 24 || this.$refs['input-center-box'].clientHeight < 24) { if (document.getElementById('search-ul').clientHeight < 24 || this.$refs['input-center-box'].clientHeight < 24) {
this.$refs['input-center-box'].style.height = 27 + 'px' this.$refs['input-center-box'].style.height = 27 + 'px'
document.getElementById('search-ul').style.height = 21 + 'px' document.getElementById('search-ul').style.height = 21 + 'px'
} }

View File

@@ -171,7 +171,7 @@ import deleteButton from '@/components/common/deleteButton'
export default { export default {
name: 'alertMessageTable', name: 'alertMessageTable',
components: { components: {
alertRuleInfo: alertRuleInfo,deleteButton alertRuleInfo: alertRuleInfo, deleteButton
}, },
props: { props: {
nowTime: { nowTime: {

View File

@@ -107,9 +107,9 @@ import bottomBox from '@/components/common/bottomBox/bottomBox'
import { bottomBoxWindow } from '@/components/common/js/tools' import { bottomBoxWindow } from '@/components/common/js/tools'
import panelChart from '@/components/chart/panelChart' import panelChart from '@/components/chart/panelChart'
import bus from '@/libs/bus' import bus from '@/libs/bus'
import routerPathParams from "@/components/common/mixin/routerPathParams"; import routerPathParams from '@/components/common/mixin/routerPathParams'
import lodash from "lodash"; import lodash from 'lodash'
import SearchBox from "@/components/common/searchBox/searchBox"; import SearchBox from '@/components/common/searchBox/searchBox'
export default { export default {
name: 'nzDataList', name: 'nzDataList',
mixins: [routerPathParams], mixins: [routerPathParams],

View File

@@ -39,7 +39,7 @@
</template> </template>
<template slot-scope="scope" :column="item"> <template slot-scope="scope" :column="item">
<template v-if="item.prop === 'name'"> <template v-if="item.prop === 'name'">
<div class="document-copy-block"> <div class="document-copy-block">
<span class="document-copy-text">{{scope.row[item.prop]}}</span> <span class="document-copy-text">{{scope.row[item.prop]}}</span>
<i v-if="scope.row[item.prop]" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row.name)" :title="$t('overall.copyText')"></i> <i v-if="scope.row[item.prop]" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row.name)" :title="$t('overall.copyText')"></i>

View File

@@ -1,5 +1,5 @@
import vueQr from './vue-qr.vue'; import vueQr from './vue-qr.vue'
vueQr.install = Vue => Vue.component(vueQr.name, vueQr); vueQr.install = Vue => Vue.component(vueQr.name, vueQr)
export default vueQr; export default vueQr

View File

@@ -1,16 +1,16 @@
function readAsArrayBuffer(url, callback) { function readAsArrayBuffer (url, callback) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
var xhr = new XMLHttpRequest(); const xhr = new XMLHttpRequest()
xhr.responseType = "blob"; //设定返回数据类型为Blob xhr.responseType = 'blob' // 设定返回数据类型为Blob
xhr.onload = function() { xhr.onload = function () {
var reader = new FileReader(); const reader = new FileReader()
reader.onloadend = function() { reader.onloadend = function () {
resolve(reader.result) resolve(reader.result)
}; }
reader.readAsArrayBuffer(xhr.response); //xhr.response就是一个Blob用FileReader读取 reader.readAsArrayBuffer(xhr.response) // xhr.response就是一个Blob用FileReader读取
}; }
xhr.open("GET", url); xhr.open('GET', url)
xhr.send(); xhr.send()
}); })
} }
export default readAsArrayBuffer export default readAsArrayBuffer

View File

@@ -1,4 +1,4 @@
export function toBoolean(val) { export function toBoolean (val) {
if (val === '') return val if (val === '') return val
return val === 'true' || val == '1' return val === 'true' || val == '1'
} }

View File

@@ -386,7 +386,7 @@ export default {
val: '', val: '',
listStr: 'silenceState' listStr: 'silenceState'
}, },
jsonKey: 'valnum', jsonKey: 'valnum'
} }
} }
this.initQueryFromPath(searchKeys) this.initQueryFromPath(searchKeys)

View File

@@ -472,7 +472,7 @@ export default {
duplicate (row) { duplicate (row) {
this.$get(`${this.url}/${row.id}`).then(response => { this.$get(`${this.url}/${row.id}`).then(response => {
if (response.code === 200) { if (response.code === 200) {
this.object = { ...response.data, id: '', name: `${row.name}-copy`, brandAndModel: '' } this.object = { ...response.data, id: '', name: `${row.name}-copy`, brandAndModel: '', cabinet: '', dc: '', u: [], cabinetId: '', dcId: '' }
if (this.object.name.length > 64) { if (this.object.name.length > 64) {
const length = this.object.name.length - 64 const length = this.object.name.length - 64
this.object.name = row.name.substring(0, row.name.length - length) + '-copy' this.object.name = row.name.substring(0, row.name.length - length) + '-copy'

View File

@@ -8,7 +8,7 @@ window.onload = function () {
commonOption.toolbox.feature.dataZoom.title.zoom = vm.$i18n.t('overall.toolBox.zoom') commonOption.toolbox.feature.dataZoom.title.zoom = vm.$i18n.t('overall.toolBox.zoom')
commonOption.toolbox.feature.dataZoom.title.back = vm.$i18n.t('overall.toolBox.back') commonOption.toolbox.feature.dataZoom.title.back = vm.$i18n.t('overall.toolBox.back')
commonOption.toolbox.feature.magicType.title.stack = vm.$i18n.t('overall.toolBox.stack') commonOption.toolbox.feature.magicType.title.stack = vm.$i18n.t('overall.toolBox.stack')
}else { } else {
commonOption.toolbox.feature.dataZoom.title.zoom = exportHtml.$i18n.t('overall.toolBox.zoom') commonOption.toolbox.feature.dataZoom.title.zoom = exportHtml.$i18n.t('overall.toolBox.zoom')
commonOption.toolbox.feature.dataZoom.title.back = exportHtml.$i18n.t('overall.toolBox.back') commonOption.toolbox.feature.dataZoom.title.back = exportHtml.$i18n.t('overall.toolBox.back')
commonOption.toolbox.feature.magicType.title.stack = exportHtml.$i18n.t('overall.toolBox.stack') commonOption.toolbox.feature.magicType.title.stack = exportHtml.$i18n.t('overall.toolBox.stack')

View File

@@ -61,7 +61,7 @@ import exploreItem from '@/components/page/dashboard/explore/exploreItemHtml'
import moment from 'moment-timezone' import moment from 'moment-timezone'
import { loadI18n } from '@/components/common/i18n' import { loadI18n } from '@/components/common/i18n'
import i18nData from '@/entrance/exportHtml/i18nData' import i18nData from '@/entrance/exportHtml/i18nData'
import bus from "@/libs/bus"; import bus from '@/libs/bus'
const dataJson = window.dataJson || {} const dataJson = window.dataJson || {}
export default { export default {
name: 'Entrance', name: 'Entrance',
@@ -114,7 +114,6 @@ export default {
onScroll () { onScroll () {
const _self = this const _self = this
this.scrollbarWrap.addEventListener('scroll', bus.debounce(function () { this.scrollbarWrap.addEventListener('scroll', bus.debounce(function () {
_self.showTopBtn = _self.scrollbarWrap.scrollTop > 50 _self.showTopBtn = _self.scrollbarWrap.scrollTop > 50
_self.overScroll10 = _self.scrollbarWrap.scrollTop > 50 _self.overScroll10 = _self.scrollbarWrap.scrollTop > 50
_self.$refs.chartList.onScroll(_self.scrollbarWrap.scrollTop) _self.$refs.chartList.onScroll(_self.scrollbarWrap.scrollTop)

View File

@@ -26,7 +26,7 @@ import chartList from '@/components/chart/chartList.vue' // 全局引入 chartLi
import pickTime from '@/components/common/pickTime' import pickTime from '@/components/common/pickTime'
import nzDataList from '@/components/common/table/nzDataList' import nzDataList from '@/components/common/table/nzDataList'
import mainMixin from '@/components/common/mixin/mainMixinFun' import mainMixin from '@/components/common/mixin/mainMixinFun'
import Pagination from "@/components/common/pagination"; import Pagination from '@/components/common/pagination'
Vue.component('pick-time', pickTime) Vue.component('pick-time', pickTime)
Vue.component('nzDataList', nzDataList) Vue.component('nzDataList', nzDataList)
Vue.component('chartList', chartList) Vue.component('chartList', chartList)

View File

@@ -207,7 +207,7 @@ const panel = {
}, },
dispatchHomeLoading (store, homeLoading) { dispatchHomeLoading (store, homeLoading) {
store.commit('setHomeLoading', homeLoading) store.commit('setHomeLoading', homeLoading)
}, }
} }
} }
export default panel export default panel