fix: 修复项目运行时eslint报错的提示
This commit is contained in:
@@ -319,7 +319,6 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const thirdMenu = this.getUrlParam(this.curTabState.thirdMenu, '')
|
||||
const fourthMenu = this.getUrlParam(this.curTabState.fourthMenu, '')
|
||||
|
||||
|
||||
@@ -110,7 +110,6 @@
|
||||
<script>
|
||||
import table from '@/mixins/table'
|
||||
import { panelTypeAndRouteMapping } from '@/utils/constants'
|
||||
import { api } from '@/utils/api'
|
||||
|
||||
export default {
|
||||
name: 'chartTable',
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import router from './router'
|
||||
import store from './store'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { getPermission } from '@/utils/api'
|
||||
import { loadGeoData } from '@/utils/tools'
|
||||
import axios from 'axios'
|
||||
@@ -18,6 +17,7 @@ router.beforeEach(async (to, from, next) => {
|
||||
loadGeoData()
|
||||
// 加载baseUrl
|
||||
if (!axios.defaults.baseURL) {
|
||||
// eslint-disable-next-line no-undef
|
||||
axios.defaults.baseURL = BASE_CONFIG.baseUrl
|
||||
}
|
||||
if (localStorage.getItem(storageKey.token)) {
|
||||
@@ -81,7 +81,7 @@ export function hasMenu (menuList, route) {
|
||||
export function hasParam (url, param) {
|
||||
let hasParam = false
|
||||
let tempArr = url.split('?')
|
||||
const query = {}
|
||||
// const query = {}
|
||||
if (tempArr[1]) {
|
||||
tempArr = tempArr[1].split('&')
|
||||
tempArr.forEach(t => {
|
||||
|
||||
@@ -532,14 +532,14 @@ export function getUserDrilldownTableGeo (userId) {
|
||||
return data[userId]
|
||||
}
|
||||
|
||||
function JSONParse (data) {
|
||||
const firstParse = JSON.parse(data)
|
||||
if (typeof firstParse === 'string') {
|
||||
return JSON.parse(firstParse)
|
||||
} else {
|
||||
return firstParse
|
||||
}
|
||||
}
|
||||
// function JSONParse (data) {
|
||||
// const firstParse = JSON.parse(data)
|
||||
// if (typeof firstParse === 'string') {
|
||||
// return JSON.parse(firstParse)
|
||||
// } else {
|
||||
// return firstParse
|
||||
// }
|
||||
// }
|
||||
|
||||
export function copyValue (item) {
|
||||
const str = item
|
||||
@@ -879,8 +879,8 @@ export async function getDnsMapData (type) {
|
||||
export function handleSpecialValue (value) {
|
||||
if (value) {
|
||||
value.replace(/\'/g, "\\\\'")
|
||||
.replace(/\"/g, '\\"')
|
||||
.replace(/\&/g, '%26')
|
||||
.replace(/\"/g, '\\"')
|
||||
.replace(/\&/g, '%26')
|
||||
}
|
||||
return value
|
||||
}
|
||||
@@ -894,13 +894,13 @@ export function combineTabList (tableType, list, commonTabList) {
|
||||
const commonTab = commonTabList.find(item => item.name === tabName)
|
||||
tab.label = commonTab ? commonTab.i18n : ''
|
||||
tab.prop = commonTab ? commonTab.prop : ''
|
||||
if (!tab.hasOwnProperty('checked')) {
|
||||
if (!Object.prototype.hasOwnProperty.call(tab, 'checked')) {
|
||||
tab.checked = tab ? tab.show : true
|
||||
}
|
||||
if (!tab.hasOwnProperty('disabled')) {
|
||||
if (!Object.prototype.hasOwnProperty.call(tab, 'disabled')) {
|
||||
tab.disabled = tab ? !tab.enable : false
|
||||
}
|
||||
if (!tab.hasOwnProperty('panelId')) {
|
||||
if (!Object.prototype.hasOwnProperty.call(tab, 'panelId')) {
|
||||
tab.panelId = tab ? tab.panelIdOfFourthMenu : null
|
||||
}
|
||||
// 代码里写死的
|
||||
|
||||
@@ -1543,13 +1543,13 @@ export default {
|
||||
const commonTab = this.commonTabList.find(item => item.name === tabName)
|
||||
tab.label = commonTab ? commonTab.i18n : ''
|
||||
tab.prop = commonTab ? commonTab.prop : ''
|
||||
if (!tab.hasOwnProperty('checked') || tab.checked === undefined || tab.checked === null) {
|
||||
if (!Object.prototype.hasOwnProperty.call(tab, 'checked') || tab.checked === undefined || tab.checked === null) {
|
||||
tab.checked = tab ? tab.show : true
|
||||
}
|
||||
if (!tab.hasOwnProperty('disabled') || tab.disabled === undefined || tab.disabled === null) {
|
||||
if (!Object.prototype.hasOwnProperty.call(tab, 'disabled') || tab.disabled === undefined || tab.disabled === null) {
|
||||
tab.disabled = tab ? !tab.enable : false
|
||||
}
|
||||
if (!tab.hasOwnProperty('panelId') || tab.panelId === undefined || tab.panelId === null) {
|
||||
if (!Object.prototype.hasOwnProperty.call(tab, 'panelId') || tab.panelId === undefined || tab.panelId === null) {
|
||||
tab.panelId = tab ? tab.panelIdOfFourthMenu : null
|
||||
}
|
||||
// 代码里写死的
|
||||
@@ -1566,7 +1566,7 @@ export default {
|
||||
const drilldownTabFull = []
|
||||
const drilldownTabList = tab.drilldownTabs
|
||||
drilldownTabList.forEach(drilldownTab => {
|
||||
if (!drilldownTab.hasOwnProperty('name') || drilldownTab.name === undefined || drilldownTab.name === null) {
|
||||
if (!Object.prototype.hasOwnProperty.call(drilldownTab, 'name') || drilldownTab.name === undefined || drilldownTab.name === null) {
|
||||
const drilldownTabName = drilldownTab ? (drilldownTab.name ? drilldownTab.name : drilldownTab) : ''
|
||||
const fullTab = oldList.find(item => item.name === drilldownTabName)
|
||||
const drilldownTabWithAllInfo = this.$_.cloneDeep(fullTab)
|
||||
@@ -1664,7 +1664,7 @@ export default {
|
||||
let isSetDrilldownTabInfo = false
|
||||
if (tabList && tabList.length > 0) {
|
||||
const drilldownTab = tabList[0].drilldownTabs
|
||||
if (drilldownTab && drilldownTab.length > 0 && drilldownTab.hasOwnProperty('name')) {
|
||||
if (drilldownTab && drilldownTab.length > 0 && Object.prototype.hasOwnProperty.call(drilldownTab, 'name')) {
|
||||
isSetDrilldownTabInfo = true
|
||||
}
|
||||
}
|
||||
@@ -1747,7 +1747,7 @@ export default {
|
||||
const tabItem = this.curTable.tabs.find(tabItem => tabItem.name === tab.name)
|
||||
tab.hiddenDrilldownTabs = this.getHiddenDrilldownTabNameGroup(tabItem)
|
||||
if (tab && tab.hasMetricSearch === true) {
|
||||
const columnsForMetric = tab.metrics.find(metric => metric.name === this.metric)
|
||||
// const columnsForMetric = tab.metrics.find(metric => metric.name === this.metric)
|
||||
tab.metrics.forEach(metric => {
|
||||
const oldSortColumns = metric.columns
|
||||
const newSortColumns = this.customTableTitles.slice(1)
|
||||
|
||||
Reference in New Issue
Block a user