fix: 删除无用文件,搜索组件text修改变量名
This commit is contained in:
@@ -180,7 +180,7 @@ export default {
|
||||
if (keyInfo.isKey) {
|
||||
// 检查是否包含枚举字段,包含的话进行替换
|
||||
const enumKey = parser.conversionEnum(keyInfo.key)
|
||||
const errorList = parser.validateStr(newKey)
|
||||
const errorList = parser.validateStr(enumKey)
|
||||
if (_.isEmpty(errorList)) {
|
||||
// 补全模糊搜索
|
||||
toRaw(this.codeMirror).setValue(parser.handleEntityTypeByStr(str))
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
.CodeMirror-hint-active {
|
||||
background-color: #eaf1f5;
|
||||
color: #5a90b0;
|
||||
}
|
||||
|
||||
.el-dropdown-menu__item.CodeMirror-hint {
|
||||
line-height: 20px;
|
||||
/*font-family: NotoSansSC-Regular;*/
|
||||
}
|
||||
|
||||
.hint-clear {
|
||||
color: #31739C !important;
|
||||
}
|
||||
|
||||
.hint-title {
|
||||
margin: 10px 10px 10px 4px;
|
||||
line-height: 20px;
|
||||
font-weight: bold;
|
||||
/* 禁止选中 样式 */
|
||||
background: #fff !important;
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.cm-s-eclipse span.cm-string-2 {
|
||||
color: #D85512;
|
||||
}
|
||||
|
||||
.CodeMirror-lines {
|
||||
/*height: 20px;*/
|
||||
padding: 3px 0;
|
||||
}
|
||||
|
||||
.in-coder-panel {
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.in-coder-panel pre {
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
.in-coder-panel .CodeMirror {
|
||||
/*height: inherit;*/
|
||||
}
|
||||
|
||||
.in-coder-panel input {
|
||||
font-size: 12px !important;
|
||||
display: block;
|
||||
border-color: transparent !important;
|
||||
padding: 0 0 0 8px !important;
|
||||
}
|
||||
|
||||
.CodeMirror-hints {
|
||||
font-family: NotoSansSC-Regular !important;
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
.CodeMirror-line {
|
||||
font-family: Arial !important;
|
||||
}
|
||||
|
||||
.CodeMirror-hint {
|
||||
margin: 0;
|
||||
padding: 0 4px !important;
|
||||
line-height: 20px !important;
|
||||
border-radius: 2px;
|
||||
white-space: pre;
|
||||
color: black;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.cm-variable-2{
|
||||
font-weight: bold;
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
<template >
|
||||
<div class="entity-pop-custom" v-ele-click-outside="esc">
|
||||
<div class="pop-title">
|
||||
<div>
|
||||
<i :class="itemData.icon"></i>
|
||||
<span>{{itemData.value}}{{$t('overall.operator')}} {{itemData.label}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <button @click="esc" class="el-dialog__headerbtn" type="button"><i class="el-dialog__close el-icon el-icon-close"></i></button>-->
|
||||
<div class="filter-top-box">
|
||||
<div class="filter-top-body">
|
||||
<loading :loading="loading"></loading>
|
||||
<el-table
|
||||
:data="popoverData"
|
||||
:header-cell-style="tableHeaderCellStyle"
|
||||
:header-row-style="tableHeaderRowStyle"
|
||||
:row-style="rowStyle"
|
||||
:cell-style="{'text-align':'left','padding': '1px 0','border':'0px'}"
|
||||
class="customer-no-border-table"
|
||||
:empty-text="$t('npm.noData')"
|
||||
style="width: 100%; height: 300px;"
|
||||
@row-click="filter"
|
||||
>
|
||||
<el-table-column label="Top10" type="index" :index="indexMethod" width="81"/>
|
||||
<el-table-column prop="name" :label="itemData.label" width="120">
|
||||
<template #default="scope">
|
||||
<div style="overflow: hidden; white-space: nowrap; text-overflow: ellipsis;" :title="scope.row.name">
|
||||
{{valueHandle(scope.row.name, topColumn) || 'unknown'}}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="count" :label="$t('overall.number')" width="79" />
|
||||
<el-table-column prop="percent" :label="$t('overall.percent')" >
|
||||
<template #default="scope">
|
||||
<div class="top-table-percent" >
|
||||
{{(this.totalCount === 0 ? 0 : parseFloat(scope.row.count / this.totalCount) * 100).toFixed(2)}}%
|
||||
<div class="top-table-progress"><el-progress :percentage="(this.totalCount === 0 ? 0 : parseFloat(scope.row.count / this.totalCount) * 100).toFixed(2)" :show-text="false" color="#23BF9A"></el-progress></div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { riskLevelMapping } from '@/utils/constants'
|
||||
import Loading from '@/components/common/Loading'
|
||||
|
||||
export default {
|
||||
components: { Loading },
|
||||
props: {
|
||||
loading: Boolean,
|
||||
popoverData: Array,
|
||||
itemData: Object,
|
||||
totalCount: Number,
|
||||
topColumn: String
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
custom: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
indexMethod (index) {
|
||||
return index + 1
|
||||
},
|
||||
esc () {
|
||||
this.$emit('close')
|
||||
},
|
||||
filter (row) {
|
||||
this.$emit('filter', row.name, this.itemData)
|
||||
},
|
||||
valueHandle (value, columnName) {
|
||||
if (columnName === 'app_risk') {
|
||||
const m = riskLevelMapping.find(mapping => {
|
||||
return mapping.value === value
|
||||
})
|
||||
return (m && m.name) || value
|
||||
}
|
||||
return value
|
||||
},
|
||||
tableHeaderCellStyle ({ row, column, rowIndex, columnIndex }) {
|
||||
if (rowIndex === 0) {
|
||||
return 'padding-bottom:5px;padding-top:7px;'
|
||||
}
|
||||
},
|
||||
tableHeaderRowStyle ({ row, rowIndex }) {
|
||||
if (rowIndex === 0) {
|
||||
return 'color: #333333;font-weight: 500;font-size: 14px;'
|
||||
}
|
||||
},
|
||||
rowStyle ({ row, rowIndex }) {
|
||||
return 'height:21px;font-size: 14px;color: #666666;font-weight: 400;'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.entity-pop-custom .el-table::before {
|
||||
height: 0px;
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user