|
@@ -1,13 +1,10 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="report-types admin-page">
|
|
<div class="report-types admin-page">
|
|
|
<el-card>
|
|
<el-card>
|
|
|
- <div slot="header">
|
|
|
|
|
- <span>报告类型管理</span>
|
|
|
|
|
- <div style="float: right; display: flex; gap: 10px;">
|
|
|
|
|
- <el-input v-model="keyword" placeholder="搜索类型..." prefix-icon="el-icon-search" size="small" clearable style="width: 200px;" />
|
|
|
|
|
- <el-button type="primary" size="small" @click="handleCreate">+ 新增类型</el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <PageHeader slot="header" title="报告类型管理">
|
|
|
|
|
+ <el-input v-model="keyword" placeholder="搜索类型..." prefix-icon="el-icon-search" size="small" clearable style="width: 200px;" />
|
|
|
|
|
+ <el-button type="primary" size="small" @click="handleCreate">+ 新增类型</el-button>
|
|
|
|
|
+ </PageHeader>
|
|
|
|
|
|
|
|
<div class="adm-table-wrap">
|
|
<div class="adm-table-wrap">
|
|
|
<el-table :data="filteredTypes" v-loading="loading" border stripe height="100%">
|
|
<el-table :data="filteredTypes" v-loading="loading" border stripe height="100%">
|
|
@@ -43,14 +40,12 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="采集指标" width="90">
|
|
<el-table-column label="采集指标" width="90">
|
|
|
<template slot-scope="{ row }">
|
|
<template slot-scope="{ row }">
|
|
|
- <el-tag size="mini" type="info">{{ indicatorCount(row.expectedIndicators) }} 项</el-tag>
|
|
|
|
|
|
|
+ <StatusTag size="mini" type="info" :text="indicatorCount(row.expectedIndicators) + ' 项'" />
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="状态" width="80">
|
|
<el-table-column label="状态" width="80">
|
|
|
<template slot-scope="{ row }">
|
|
<template slot-scope="{ row }">
|
|
|
- <el-tag :type="row.isActive ? 'success' : 'info'" size="small">
|
|
|
|
|
- {{ row.isActive ? '启用' : '停用' }}
|
|
|
|
|
- </el-tag>
|
|
|
|
|
|
|
+ <StatusTag :type="row.isActive ? 'success' : 'info'" :text="row.isActive ? '启用' : '停用'" />
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="脚本状态" width="110">
|
|
<el-table-column label="脚本状态" width="110">
|
|
@@ -58,7 +53,7 @@
|
|
|
<StatusTag v-if="row.scriptStatus === 'generating'" type="warning" size="small" text="生成中" />
|
|
<StatusTag v-if="row.scriptStatus === 'generating'" type="warning" size="small" text="生成中" />
|
|
|
<StatusTag v-else-if="row.scriptStatus === 'ready'" type="success" size="small" text="测试通过" />
|
|
<StatusTag v-else-if="row.scriptStatus === 'ready'" type="success" size="small" text="测试通过" />
|
|
|
<StatusTag v-else-if="row.scriptStatus === 'failed'" type="danger" size="small" text="生成失败" />
|
|
<StatusTag v-else-if="row.scriptStatus === 'failed'" type="danger" size="small" text="生成失败" />
|
|
|
- <span v-else style="color:#bbb;">—</span>
|
|
|
|
|
|
|
+ <span v-else style="color: var(--adm-text-25);">—</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="source" label="来源" width="100">
|
|
<el-table-column prop="source" label="来源" width="100">
|
|
@@ -140,17 +135,16 @@
|
|
|
<!-- 指纹规则管理对话框 -->
|
|
<!-- 指纹规则管理对话框 -->
|
|
|
<el-dialog :visible.sync="fpDialogVisible" title="指纹规则管理" width="700px" :close-on-click-modal="false">
|
|
<el-dialog :visible.sync="fpDialogVisible" title="指纹规则管理" width="700px" :close-on-click-modal="false">
|
|
|
<div slot="header">
|
|
<div slot="header">
|
|
|
- <span>指纹规则 - {{ currentType?.typeId }}</span>
|
|
|
|
|
- <el-button type="primary" size="small" style="float:right" @click="handleAddFp">+ 新增指纹</el-button>
|
|
|
|
|
|
|
+ <SectionTitle title="指纹规则 - {{ currentType && currentType.typeId }}">
|
|
|
|
|
+ <el-button type="primary" size="small" @click="handleAddFp">+ 新增指纹</el-button>
|
|
|
|
|
+ </SectionTitle>
|
|
|
</div>
|
|
</div>
|
|
|
<el-table :data="fingerprints" v-loading="fpLoading" border stripe size="small">
|
|
<el-table :data="fingerprints" v-loading="fpLoading" border stripe size="small">
|
|
|
<el-table-column prop="pattern" label="文本特征" min-width="250" />
|
|
<el-table-column prop="pattern" label="文本特征" min-width="250" />
|
|
|
<el-table-column prop="weight" label="权重" width="80" />
|
|
<el-table-column prop="weight" label="权重" width="80" />
|
|
|
<el-table-column label="类型" width="80">
|
|
<el-table-column label="类型" width="80">
|
|
|
<template slot-scope="{ row }">
|
|
<template slot-scope="{ row }">
|
|
|
- <el-tag :type="row.isExclusion ? 'danger' : 'success'" size="mini">
|
|
|
|
|
- {{ row.isExclusion ? '排除' : '正向' }}
|
|
|
|
|
- </el-tag>
|
|
|
|
|
|
|
+ <StatusTag :type="row.isExclusion ? 'danger' : 'success'" :text="row.isExclusion ? '排除' : '正向'" />
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="sortOrder" label="排序" width="60" />
|
|
<el-table-column prop="sortOrder" label="排序" width="60" />
|
|
@@ -332,7 +326,7 @@ export default {
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
-.el-form-item-msg { font-size: 12px; color: #999; margin-top: 2px; }
|
|
|
|
|
|
|
+.el-form-item-msg { font-size: 12px; color: var(--adm-text-45); margin-top: 2px; }
|
|
|
.sort-header {
|
|
.sort-header {
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
user-select: none;
|
|
user-select: none;
|
|
@@ -340,6 +334,6 @@ export default {
|
|
|
font-size: 12px;
|
|
font-size: 12px;
|
|
|
}
|
|
}
|
|
|
.sort-header:hover {
|
|
.sort-header:hover {
|
|
|
- color: #409eff;
|
|
|
|
|
|
|
+ color: var(--adm-primary);
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|