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.
let sorted = sortLayoutItemsByRowCol(layout)
if (movingUp) sorted = sorted.reverse()
let collisions = getAllCollisions(sorted, l)
const collisions = getAllCollisions(sorted, l)
if (preventCollision && collisions.length) {
l.x = oldX
l.y = oldY

View File

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

View File

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

View File

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

View File

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

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

View File

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

View File

@@ -472,7 +472,7 @@ export default {
duplicate (row) {
this.$get(`${this.url}/${row.id}`).then(response => {
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) {
const length = this.object.name.length - 64
this.object.name = row.name.substring(0, row.name.length - length) + '-copy'

View File

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

View File

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