fix: eventType取消国际化转换
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
<div class="new-filter-content-content">
|
||||
<el-checkbox-group v-model="checkEventType" @change="onChangeCategory" style="display: flex;flex-direction: column">
|
||||
<el-checkbox v-for="item in eventTypeList" :key="item.name" class="new-filter-content-checkbox" :label="item.name">
|
||||
{{ item.label }}
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
@@ -94,13 +94,7 @@ export default {
|
||||
}
|
||||
|
||||
if (data.eventTypeList) {
|
||||
this.eventTypeList = []
|
||||
data.eventTypeList.forEach(item => {
|
||||
const obj = detectionUnitList.eventTypeList.find(d => d.value === item.name)
|
||||
if (obj) {
|
||||
this.eventTypeList.push({ ...item, label: this.$t(obj.label) })
|
||||
}
|
||||
})
|
||||
this.eventTypeList = data.eventTypeList
|
||||
} else {
|
||||
this.eventTypeList = []
|
||||
}
|
||||
|
||||
@@ -56,9 +56,6 @@
|
||||
<template v-else-if="item.prop === 'category'">
|
||||
{{ changeCategory(scope.row[item.prop]) }}
|
||||
</template>
|
||||
<template v-else-if="item.prop === 'eventType'">
|
||||
{{ changeEventType(scope.row[item.prop]) }}
|
||||
</template>
|
||||
<template v-else-if="item.prop === 'description'">
|
||||
<div style="padding-right: 20px">{{ scope.row[item.prop] }}</div>
|
||||
</template>
|
||||
@@ -181,16 +178,6 @@ export default {
|
||||
}
|
||||
return label
|
||||
}
|
||||
},
|
||||
changeEventType (value) {
|
||||
if (value) {
|
||||
const obj = detectionUnitList.eventTypeList.find(d => d.value === value)
|
||||
let label = value
|
||||
if (obj) {
|
||||
label = this.$t(obj.label)
|
||||
}
|
||||
return label
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user