fix: 实体列表搜索将name更改为label
This commit is contained in:
@@ -15,9 +15,9 @@
|
|||||||
allow-create
|
allow-create
|
||||||
filterable
|
filterable
|
||||||
size="mini"
|
size="mini"
|
||||||
v-model="meta.column.name"
|
v-model="meta.column.label"
|
||||||
ref="columnSelect"
|
ref="columnSelect"
|
||||||
:placeholder="meta.column.name || ''"
|
:placeholder="meta.column.label || ''"
|
||||||
@blur="columnBlur(meta, index)"
|
@blur="columnBlur(meta, index)"
|
||||||
@change="(value) => selectColumn(value, meta)"
|
@change="(value) => selectColumn(value, meta)"
|
||||||
>
|
>
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
v-for="(column, index) in columnList"
|
v-for="(column, index) in columnList"
|
||||||
:key="index"
|
:key="index"
|
||||||
:label="column.label"
|
:label="column.label"
|
||||||
:value="column.name"
|
:value="column.label"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
@@ -175,7 +175,7 @@ export default {
|
|||||||
meta.resetValue()
|
meta.resetValue()
|
||||||
} else {
|
} else {
|
||||||
const selectedColumn = this.columnList.find(column => {
|
const selectedColumn = this.columnList.find(column => {
|
||||||
return column.name === value
|
return column.label === value
|
||||||
})
|
})
|
||||||
meta.column.label = selectedColumn.label
|
meta.column.label = selectedColumn.label
|
||||||
meta.column.type = selectedColumn.type
|
meta.column.type = selectedColumn.type
|
||||||
@@ -201,7 +201,7 @@ export default {
|
|||||||
},
|
},
|
||||||
columnBlur (meta, index) {
|
columnBlur (meta, index) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
meta.column.name = meta.column.name.replace(/"/g, '')
|
meta.column.label = meta.column.label.replace(/"/g, '')
|
||||||
meta.column.isEditing = false
|
meta.column.isEditing = false
|
||||||
if (meta.isEmpty()) {
|
if (meta.isEmpty()) {
|
||||||
if (this.metaList.length > 1) {
|
if (this.metaList.length > 1) {
|
||||||
@@ -302,7 +302,7 @@ export default {
|
|||||||
// 判断是否是用户自己添加的内容,用于判断是否是全局搜索
|
// 判断是否是用户自己添加的内容,用于判断是否是全局搜索
|
||||||
isCustomized (value) {
|
isCustomized (value) {
|
||||||
return !this.columnList.some(meta => {
|
return !this.columnList.some(meta => {
|
||||||
return meta.name === value
|
return meta.label === value
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
enterSearch () {
|
enterSearch () {
|
||||||
@@ -359,10 +359,10 @@ export default {
|
|||||||
addParams (params) {
|
addParams (params) {
|
||||||
params.forEach(param => {
|
params.forEach(param => {
|
||||||
const column = this.columnList.find(column => {
|
const column = this.columnList.find(column => {
|
||||||
return column.name === param.column
|
return column.label === param.column
|
||||||
})
|
})
|
||||||
const meta = new Meta()
|
const meta = new Meta()
|
||||||
meta.column.name = param.column
|
meta.column.label = param.column
|
||||||
meta.column.type = column ? column.type : columnType.string
|
meta.column.type = column ? column.type : columnType.string
|
||||||
meta.column.label = column ? column.label : param.column
|
meta.column.label = column ? column.label : param.column
|
||||||
meta.operator.value = '='
|
meta.operator.value = '='
|
||||||
@@ -376,16 +376,16 @@ export default {
|
|||||||
changeParams (params) {
|
changeParams (params) {
|
||||||
params.forEach(param => {
|
params.forEach(param => {
|
||||||
const oldColumn = this.columnList.find(column => {
|
const oldColumn = this.columnList.find(column => {
|
||||||
return column.name === param.oldParam.column
|
return column.label === param.oldParam.column
|
||||||
})
|
})
|
||||||
const newColumn = this.columnList.find(column => {
|
const newColumn = this.columnList.find(column => {
|
||||||
return column.name === param.newParam.column
|
return column.label === param.newParam.column
|
||||||
})
|
})
|
||||||
const meta = this.metaList.find(m => m.column && m.column.name === oldColumn.name && m.operator.value === param.oldParam.operator && m.value.value === this.handleValue(param.oldParam.value, oldColumn, param.oldParam.operator))
|
const meta = this.metaList.find(m => m.column && m.column.label === oldColumn.label && m.operator.value === param.oldParam.operator && m.value.value === this.handleValue(param.oldParam.value, oldColumn, param.oldParam.operator))
|
||||||
if (meta) {
|
if (meta) {
|
||||||
meta.column.name = newColumn.name
|
meta.column.label = newColumn.label
|
||||||
meta.column.type = newColumn.type
|
meta.column.type = newColumn.type
|
||||||
meta.column.label = newColumn.label ? newColumn.label : newColumn.name
|
meta.column.label = newColumn.label ? newColumn.label : newColumn.label
|
||||||
meta.operator.value = param.newParam.operator
|
meta.operator.value = param.newParam.operator
|
||||||
meta.value.value = this.handleValue(param.newParam.value, newColumn, param.newParam.operator)
|
meta.value.value = this.handleValue(param.newParam.value, newColumn, param.newParam.operator)
|
||||||
meta.value.label = meta.value.value
|
meta.value.label = meta.value.value
|
||||||
@@ -395,9 +395,9 @@ export default {
|
|||||||
removeParams (params) {
|
removeParams (params) {
|
||||||
params.forEach(param => {
|
params.forEach(param => {
|
||||||
const column = this.columnList.find(c => {
|
const column = this.columnList.find(c => {
|
||||||
return c.name === param.column
|
return c.label === param.column
|
||||||
})
|
})
|
||||||
const metaIndex = this.metaList.findIndex(m => m.column && m.column.name === param.column && m.operator.value === param.operator && m.value.value === this.handleValue(param.value, column, param.operator))
|
const metaIndex = this.metaList.findIndex(m => m.column && m.column.label === param.column && m.operator.value === param.operator && m.value.value === this.handleValue(param.value, column, param.operator))
|
||||||
// 不是在首位,则删除时顺带删除前一个index(and或or),否则顺带删除后一个index
|
// 不是在首位,则删除时顺带删除前一个index(and或or),否则顺带删除后一个index
|
||||||
if (metaIndex > 0) {
|
if (metaIndex > 0) {
|
||||||
this.metaList.splice(metaIndex - 1, 2)
|
this.metaList.splice(metaIndex - 1, 2)
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ export default {
|
|||||||
addParams (params) {
|
addParams (params) {
|
||||||
let current = this.codeMirror.getValue()
|
let current = this.codeMirror.getValue()
|
||||||
params.forEach(param => {
|
params.forEach(param => {
|
||||||
const column = this.columnList.find(c => c.name === param.column)
|
const column = this.columnList.find(c => c.label === param.column)
|
||||||
current = `${current ? current + ' AND ' : ''}${param.column}${handleOperatorSpace(param.operator)}${this.handleValue(param.value, column, param.operator)}`
|
current = `${current ? current + ' AND ' : ''}${param.column}${handleOperatorSpace(param.operator)}${this.handleValue(param.value, column, param.operator)}`
|
||||||
})
|
})
|
||||||
toRaw(this.codeMirror).setValue(current.trim())
|
toRaw(this.codeMirror).setValue(current.trim())
|
||||||
@@ -126,7 +126,7 @@ export default {
|
|||||||
removeParams (params) {
|
removeParams (params) {
|
||||||
let current = this.codeMirror.getValue()
|
let current = this.codeMirror.getValue()
|
||||||
params.forEach(param => {
|
params.forEach(param => {
|
||||||
const column = this.columnList.find(c => c.name === param.column)
|
const column = this.columnList.find(c => c.label === param.column)
|
||||||
// 将对应内容替换为空串
|
// 将对应内容替换为空串
|
||||||
const sqlPiece = `${param.column}${handleOperatorSpace(param.operator)}${this.handleValue(param.value, column, param.operator)}`.trim()
|
const sqlPiece = `${param.column}${handleOperatorSpace(param.operator)}${this.handleValue(param.value, column, param.operator)}`.trim()
|
||||||
const sqlPieceWithConnection = [` AND ${sqlPiece}`, ` OR ${sqlPiece}`, `${sqlPiece} AND `, `${sqlPiece} OR `, sqlPiece]
|
const sqlPieceWithConnection = [` AND ${sqlPiece}`, ` OR ${sqlPiece}`, `${sqlPiece} AND `, `${sqlPiece} OR `, sqlPiece]
|
||||||
@@ -139,8 +139,8 @@ export default {
|
|||||||
changeParams (params) {
|
changeParams (params) {
|
||||||
let current = this.codeMirror.getValue()
|
let current = this.codeMirror.getValue()
|
||||||
params.forEach(param => {
|
params.forEach(param => {
|
||||||
const oldColumn = this.columnList.find(c => c.name === param.oldParam.column)
|
const oldColumn = this.columnList.find(c => c.label === param.oldParam.column)
|
||||||
const newColumn = this.columnList.find(c => c.name === param.newParam.column)
|
const newColumn = this.columnList.find(c => c.label === param.newParam.column)
|
||||||
// 将oldParam内容替换为newParam
|
// 将oldParam内容替换为newParam
|
||||||
const oldSqlPiece = `${param.oldParam.column}${handleOperatorSpace(param.oldParam.operator)}${this.handleValue(param.oldParam.value, oldColumn, param.oldParam.operator)}`.trim()
|
const oldSqlPiece = `${param.oldParam.column}${handleOperatorSpace(param.oldParam.operator)}${this.handleValue(param.oldParam.value, oldColumn, param.oldParam.operator)}`.trim()
|
||||||
const newSqlPiece = `${param.newParam.column}${handleOperatorSpace(param.newParam.operator)}${this.handleValue(param.newParam.value, newColumn, param.newParam.operator)}`.trim()
|
const newSqlPiece = `${param.newParam.column}${handleOperatorSpace(param.newParam.operator)}${this.handleValue(param.newParam.value, newColumn, param.newParam.operator)}`.trim()
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ export default class Meta {
|
|||||||
|
|
||||||
isEmpty () {
|
isEmpty () {
|
||||||
if (this.meta === condition) {
|
if (this.meta === condition) {
|
||||||
return _.isEmpty(this.column.name)
|
return _.isEmpty(this.column.label)
|
||||||
} else {
|
} else {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
@@ -73,8 +73,8 @@ export default class Meta {
|
|||||||
isCompleteCondition () {
|
isCompleteCondition () {
|
||||||
if (this.meta === condition) {
|
if (this.meta === condition) {
|
||||||
return (this.column.type === columnType.fullText)
|
return (this.column.type === columnType.fullText)
|
||||||
? !_.isEmpty(this.column.name)
|
? !_.isEmpty(this.column.label)
|
||||||
: !_.isEmpty(this.column.name) && !_.isEmpty(this.operator.value) && (!_.isEmpty(this.value.value) || (_.isNumber(this.value.value) && !_.isNaN(this.value.value)))
|
: !_.isEmpty(this.column.label) && !_.isEmpty(this.operator.value) && (!_.isEmpty(this.value.value) || (_.isNumber(this.value.value) && !_.isNaN(this.value.value)))
|
||||||
} else if (this.meta === connection) {
|
} else if (this.meta === connection) {
|
||||||
return !!this.value
|
return !!this.value
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,9 +80,9 @@ export default class Parser {
|
|||||||
str += `${meta.value.toUpperCase()} `
|
str += `${meta.value.toUpperCase()} `
|
||||||
} else if (meta.meta === condition) {
|
} else if (meta.meta === condition) {
|
||||||
if (meta.column.type === columnType.fullText) {
|
if (meta.column.type === columnType.fullText) {
|
||||||
str += `'${meta.column.name}' `
|
str += `'${meta.column.label}' `
|
||||||
} else if (meta.column.type === columnType.array) {
|
} else if (meta.column.type === columnType.array) {
|
||||||
str += `${meta.column.name} ${meta.operator.value} (`
|
str += `${meta.column.label} ${meta.operator.value} (`
|
||||||
meta.value.value.forEach((s, j) => {
|
meta.value.value.forEach((s, j) => {
|
||||||
str += `'${s}'`
|
str += `'${s}'`
|
||||||
if (j < meta.value.value.length) {
|
if (j < meta.value.value.length) {
|
||||||
@@ -93,13 +93,13 @@ export default class Parser {
|
|||||||
str += ') '
|
str += ') '
|
||||||
} else if (meta.column.type === columnType.string) {
|
} else if (meta.column.type === columnType.string) {
|
||||||
if (meta.operator.value.toLowerCase().indexOf('like') > -1 || meta.operator.value.toLowerCase().indexOf('in') > -1) {
|
if (meta.operator.value.toLowerCase().indexOf('like') > -1 || meta.operator.value.toLowerCase().indexOf('in') > -1) {
|
||||||
str += `${meta.column.name} ${meta.operator.value} '${meta.value.value}' `
|
str += `${meta.column.label} ${meta.operator.value} '${meta.value.value}' `
|
||||||
} else {
|
} else {
|
||||||
str += `${meta.column.name}${meta.operator.value}'${meta.value.value}' `
|
str += `${meta.column.label}${meta.operator.value}'${meta.value.value}' `
|
||||||
}
|
}
|
||||||
} else if (meta.column.type === columnType.number) {
|
} else if (meta.column.type === columnType.number) {
|
||||||
if (_.isNumber(Number(meta.value.value))) {
|
if (_.isNumber(Number(meta.value.value))) {
|
||||||
str += `${meta.column.name}${meta.operator.value}${meta.value.value} `
|
str += `${meta.column.label}${meta.operator.value}${meta.value.value} `
|
||||||
} else {
|
} else {
|
||||||
this.errorList.push(new ParserError(i, errorTypes.typeError, errorDesc.typeError.number))
|
this.errorList.push(new ParserError(i, errorTypes.typeError, errorDesc.typeError.number))
|
||||||
return
|
return
|
||||||
@@ -125,11 +125,11 @@ export default class Parser {
|
|||||||
if (meta.column.type === columnType.fullText) {
|
if (meta.column.type === columnType.fullText) {
|
||||||
str += "QUERY('"
|
str += "QUERY('"
|
||||||
this.columnList.forEach(column => {
|
this.columnList.forEach(column => {
|
||||||
str += `${column.name}:${meta.column.name} `
|
str += `${column.label}:${meta.column.label} `
|
||||||
})
|
})
|
||||||
str += "') "
|
str += "') "
|
||||||
} else if (meta.column.type === columnType.array) {
|
} else if (meta.column.type === columnType.array) {
|
||||||
str += `${meta.column.name} ${meta.operator.value} (`
|
str += `${meta.column.label} ${meta.operator.value} (`
|
||||||
meta.value.value.forEach((s, j) => {
|
meta.value.value.forEach((s, j) => {
|
||||||
str += `'${s}'`
|
str += `'${s}'`
|
||||||
if (j < meta.value.value.length) {
|
if (j < meta.value.value.length) {
|
||||||
@@ -140,13 +140,13 @@ export default class Parser {
|
|||||||
str += ') '
|
str += ') '
|
||||||
} else if (meta.column.type === columnType.string) {
|
} else if (meta.column.type === columnType.string) {
|
||||||
if (meta.operator.value.toLowerCase().indexOf('like') > -1 || meta.operator.value.toLowerCase().indexOf('in') > -1) {
|
if (meta.operator.value.toLowerCase().indexOf('like') > -1 || meta.operator.value.toLowerCase().indexOf('in') > -1) {
|
||||||
str += `${meta.column.name} ${meta.operator.value} '${meta.value.value}' `
|
str += `${meta.column.label} ${meta.operator.value} '${meta.value.value}' `
|
||||||
} else {
|
} else {
|
||||||
str += `${meta.column.name}${meta.operator.value}'${meta.value.value}' `
|
str += `${meta.column.label}${meta.operator.value}'${meta.value.value}' `
|
||||||
}
|
}
|
||||||
} else if (meta.column.type === columnType.number) {
|
} else if (meta.column.type === columnType.number) {
|
||||||
if (_.isNumber(Number(meta.value.value))) {
|
if (_.isNumber(Number(meta.value.value))) {
|
||||||
str += `${meta.column.name}${meta.operator.value}${meta.value.value} `
|
str += `${meta.column.label}${meta.operator.value}${meta.value.value} `
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -566,12 +566,12 @@ export default class Parser {
|
|||||||
// 前面是连接符或空,后面是操作符,不在单引号内,则是key
|
// 前面是连接符或空,后面是操作符,不在单引号内,则是key
|
||||||
// 前面是连接符或操作符或空后面是连接符或空,或在单引号内,是value
|
// 前面是连接符或操作符或空后面是连接符或空,或在单引号内,是value
|
||||||
if (isInApostrophe) {
|
if (isInApostrophe) {
|
||||||
if (meta.column.name) {
|
if (meta.column.label) {
|
||||||
meta.value.value = token.value
|
meta.value.value = token.value
|
||||||
meta.column.type = columnType.string
|
meta.column.type = columnType.string
|
||||||
} else {
|
} else {
|
||||||
meta.column.type = columnType.fullText
|
meta.column.type = columnType.fullText
|
||||||
meta.column.name = token.value
|
meta.column.label = token.value
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let isColumn = true
|
let isColumn = true
|
||||||
@@ -579,14 +579,14 @@ export default class Parser {
|
|||||||
if (prevToken) {
|
if (prevToken) {
|
||||||
if (prevToken.type === types.connection && [types.commonOperator, types.letterOperator].indexOf(nextToken.type) > -1) {
|
if (prevToken.type === types.connection && [types.commonOperator, types.letterOperator].indexOf(nextToken.type) > -1) {
|
||||||
meta.column.type = columnType.string
|
meta.column.type = columnType.string
|
||||||
meta.column.name = token.value
|
meta.column.label = token.value
|
||||||
} else {
|
} else {
|
||||||
isColumn = false
|
isColumn = false
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ([types.commonOperator, types.letterOperator].indexOf(nextToken.type) > -1) {
|
if ([types.commonOperator, types.letterOperator].indexOf(nextToken.type) > -1) {
|
||||||
meta.column.type = columnType.string
|
meta.column.type = columnType.string
|
||||||
meta.column.name = token.value
|
meta.column.label = token.value
|
||||||
} else {
|
} else {
|
||||||
isColumn = false
|
isColumn = false
|
||||||
}
|
}
|
||||||
@@ -604,7 +604,7 @@ export default class Parser {
|
|||||||
meta.column.type = columnType.string
|
meta.column.type = columnType.string
|
||||||
} else if (prevToken && (!prevToken.prevToken || prevToken.prevToken.type === types.connection)) {
|
} else if (prevToken && (!prevToken.prevToken || prevToken.prevToken.type === types.connection)) {
|
||||||
meta.column.type = columnType.fullText
|
meta.column.type = columnType.fullText
|
||||||
meta.column.name = token.value
|
meta.column.label = token.value
|
||||||
} else {
|
} else {
|
||||||
errorList.push(new ParserError(token.end, errorTypes.syntaxError, errorDesc.syntaxError.unexpectedString))
|
errorList.push(new ParserError(token.end, errorTypes.syntaxError, errorDesc.syntaxError.unexpectedString))
|
||||||
break
|
break
|
||||||
@@ -631,14 +631,14 @@ export default class Parser {
|
|||||||
meta.value.value = token.value
|
meta.value.value = token.value
|
||||||
}
|
}
|
||||||
} else if (prevToken.type === types.connection) {
|
} else if (prevToken.type === types.connection) {
|
||||||
meta.column.name = token.value
|
meta.column.label = token.value
|
||||||
meta.column.type = columnType.fullText
|
meta.column.type = columnType.fullText
|
||||||
} else {
|
} else {
|
||||||
errorList.push(new ParserError(token.end, errorTypes.syntaxError, errorDesc.syntaxError.unexpectedString))
|
errorList.push(new ParserError(token.end, errorTypes.syntaxError, errorDesc.syntaxError.unexpectedString))
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
meta.column.name = token.value
|
meta.column.label = token.value
|
||||||
meta.column.type = columnType.fullText
|
meta.column.type = columnType.fullText
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -707,10 +707,10 @@ export default class Parser {
|
|||||||
if (meta.column.type === columnType.fullText) {
|
if (meta.column.type === columnType.fullText) {
|
||||||
meta.operator.show = false
|
meta.operator.show = false
|
||||||
meta.value.show = false
|
meta.value.show = false
|
||||||
meta.column.label = meta.column.name
|
// meta.column.label = meta.column.name
|
||||||
metaList.push(meta)
|
metaList.push(meta)
|
||||||
} else {
|
} else {
|
||||||
const column = this.columnList.find(c => c.name === meta.column.name)
|
const column = this.columnList.find(c => c.label === meta.column.label)
|
||||||
if (column) {
|
if (column) {
|
||||||
meta.operator.show = true
|
meta.operator.show = true
|
||||||
meta.value.show = true
|
meta.value.show = true
|
||||||
|
|||||||
@@ -274,7 +274,7 @@ export const columnList = [
|
|||||||
{
|
{
|
||||||
name: 'ip',
|
name: 'ip',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
label: 'Ip',
|
label: 'IP',
|
||||||
doc: {
|
doc: {
|
||||||
constraints: {
|
constraints: {
|
||||||
type: 'ip',
|
type: 'ip',
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ export default {
|
|||||||
{
|
{
|
||||||
label: this.$t('overall.country'),
|
label: this.$t('overall.country'),
|
||||||
column: 'countryDistinctCount',
|
column: 'countryDistinctCount',
|
||||||
topColumn: 'country', // top弹框查询字段
|
topColumn: 'Country', // top弹框查询字段
|
||||||
icon: 'cn-icon cn-icon-country',
|
icon: 'cn-icon cn-icon-country',
|
||||||
showTopTen: false,
|
showTopTen: false,
|
||||||
value: 0
|
value: 0
|
||||||
@@ -214,7 +214,7 @@ export default {
|
|||||||
{
|
{
|
||||||
label: this.$t('overall.city'),
|
label: this.$t('overall.city'),
|
||||||
column: 'cityDistinctCount',
|
column: 'cityDistinctCount',
|
||||||
topColumn: 'region', // top弹框查询字段
|
topColumn: 'City', // top弹框查询字段
|
||||||
icon: 'cn-icon cn-icon-city',
|
icon: 'cn-icon cn-icon-city',
|
||||||
showTopTen: false,
|
showTopTen: false,
|
||||||
value: 0
|
value: 0
|
||||||
@@ -222,7 +222,7 @@ export default {
|
|||||||
{
|
{
|
||||||
label: this.$t('entities.asn'),
|
label: this.$t('entities.asn'),
|
||||||
column: 'asnDistinctCount',
|
column: 'asnDistinctCount',
|
||||||
topColumn: 'asn', // top弹框查询字段
|
topColumn: 'ASN', // top弹框查询字段
|
||||||
icon: 'cn-icon cn-icon-cloud',
|
icon: 'cn-icon cn-icon-cloud',
|
||||||
showTopTen: false,
|
showTopTen: false,
|
||||||
value: 0
|
value: 0
|
||||||
@@ -680,15 +680,15 @@ export default {
|
|||||||
if (item.code === 200 && item.data.list) {
|
if (item.code === 200 && item.data.list) {
|
||||||
this.newFilterData[index].data = []
|
this.newFilterData[index].data = []
|
||||||
item.data.list.forEach(item => {
|
item.data.list.forEach(item => {
|
||||||
const obj = { label: item.value, flag: '011-china', topColumn: 'country', value: item.uniqueEntities }
|
const obj = { label: item.value, flag: '011-china', topColumn: 'Country', value: item.uniqueEntities }
|
||||||
if (index === 0) {
|
if (index === 0) {
|
||||||
obj.flag = item.uniqueEntities // 接口字段名称为'China',目前svg名称为'011-china',后续再指定方案调整
|
obj.flag = item.uniqueEntities // 接口字段名称为'China',目前svg名称为'011-china',后续再指定方案调整
|
||||||
}
|
}
|
||||||
if (index === 1) {
|
if (index === 1) {
|
||||||
obj.topColumn = 'region'
|
obj.topColumn = 'City'
|
||||||
}
|
}
|
||||||
if (index === 2) {
|
if (index === 2) {
|
||||||
obj.topColumn = 'asn'
|
obj.topColumn = 'ASN'
|
||||||
}
|
}
|
||||||
this.newFilterData[index].data.push(obj)
|
this.newFilterData[index].data.push(obj)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user