fix: 排查并修复对无数据未做处理的问题
This commit is contained in:
@@ -467,6 +467,7 @@ export default {
|
||||
}
|
||||
},
|
||||
changeMode () {
|
||||
if (this.metaList.length > 0) {
|
||||
const parser = new Parser(this.columnList)
|
||||
const errorList = parser.validateMeta(this.metaList)
|
||||
if (_.isEmpty(errorList)) {
|
||||
@@ -478,6 +479,10 @@ export default {
|
||||
this.reloadUrl({ mode: 'text' })
|
||||
this.$emit('changeMode', 'text', { metaList: [], str: '' })
|
||||
}
|
||||
} else {
|
||||
this.reloadUrl({ mode: 'text' })
|
||||
this.$emit('changeMode', 'text', { metaList: [], str: '' })
|
||||
}
|
||||
},
|
||||
// 处理value,例如转换IN的值
|
||||
handleValue (value, column, operator, flag) {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<span class="data-column-ips">{{ $t(scope.row[item.prop]) }}</span>
|
||||
</template>
|
||||
<!--超过3个ip就省略号显示,移动鼠标block块展示,并换行-->
|
||||
<pre style="max-height: 152px;margin: 0px -10px -15px 0;overflow: scroll;"><span style="height: 24px;line-height: 24px;color: #046ECA;">{{scope.row[item.prop].replace(/,/g, '\n')}}</span></pre>
|
||||
<pre style="max-height: 152px;margin: 0 -10px -15px 0;overflow: scroll;"><span style="height: 24px;line-height: 24px;color: #046ECA;">{{scope.row[item.prop].replace(/,/g, '\n')}}</span></pre>
|
||||
</el-popover>
|
||||
<span v-else class="data-column-ips">{{ $t(scope.row[item.prop]) }}</span>
|
||||
</template>
|
||||
@@ -103,9 +103,11 @@ export default {
|
||||
watch: {
|
||||
timeFilter: {
|
||||
handler (n) {
|
||||
if (n) {
|
||||
this.initData()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.initData()
|
||||
@@ -128,6 +130,7 @@ export default {
|
||||
this.tableData = res.data.result
|
||||
} else {
|
||||
this.isNoData = true
|
||||
this.tableData = []
|
||||
}
|
||||
}).finally(() => {
|
||||
this.toggleLoading(false)
|
||||
|
||||
@@ -114,11 +114,13 @@ export default {
|
||||
if (response.status === 200) {
|
||||
this.showError = false
|
||||
this.isNoData = res.data.result.length === 0
|
||||
if (!this.isNoData) {
|
||||
res.data.result.forEach(e => {
|
||||
if (e.startTime) {
|
||||
e.startTime = dateFormatByAppearance(e.startTime)
|
||||
}
|
||||
})
|
||||
}
|
||||
this.tableData = res.data.result
|
||||
} else {
|
||||
this.httpError(res)
|
||||
|
||||
Reference in New Issue
Block a user