2026-01-30 11:01:13 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="project-table-container">
|
2026-02-27 09:00:56 +08:00
|
|
|
|
<el-table
|
2026-02-27 16:57:34 +08:00
|
|
|
|
v-loading="loading"
|
2026-02-27 09:00:56 +08:00
|
|
|
|
:data="dataList"
|
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="项目名称"
|
2026-02-27 14:23:33 +08:00
|
|
|
|
min-width="180"
|
2026-02-27 09:00:56 +08:00
|
|
|
|
align="left"
|
2026-01-30 11:01:13 +08:00
|
|
|
|
>
|
2026-02-27 09:00:56 +08:00
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<div class="project-info-cell">
|
|
|
|
|
|
<div class="project-name">{{ scope.row.projectName }}</div>
|
2026-03-11 15:08:36 +08:00
|
|
|
|
<div class="project-desc">{{ scope.row.description || "暂无描述" }}</div>
|
2026-02-27 09:00:56 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2026-01-30 11:01:13 +08:00
|
|
|
|
|
2026-02-27 09:00:56 +08:00
|
|
|
|
<el-table-column
|
2026-02-27 14:17:14 +08:00
|
|
|
|
prop="updateTime"
|
|
|
|
|
|
label="更新/创建时间"
|
2026-02-27 14:23:33 +08:00
|
|
|
|
width="180"
|
2026-02-27 09:00:56 +08:00
|
|
|
|
align="center"
|
2026-02-27 14:17:14 +08:00
|
|
|
|
>
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<span>{{ parseTime(scope.row.updateTime || scope.row.createTime) }}</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
prop="createByName"
|
|
|
|
|
|
label="创建人"
|
|
|
|
|
|
width="120"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
prop="status"
|
|
|
|
|
|
label="状态"
|
|
|
|
|
|
width="120"
|
|
|
|
|
|
align="center"
|
2026-02-27 09:00:56 +08:00
|
|
|
|
>
|
|
|
|
|
|
<template slot-scope="scope">
|
2026-02-27 16:47:48 +08:00
|
|
|
|
<div class="status-tag">
|
|
|
|
|
|
<span class="status-dot" :style="{ color: getStatusColor(scope.row.status) }">●</span>
|
2026-03-11 15:08:36 +08:00
|
|
|
|
<dict-tag :options="dict.type.ccdi_project_status" :value="scope.row.status" />
|
2026-02-27 16:47:48 +08:00
|
|
|
|
</div>
|
2026-02-27 09:00:56 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2026-01-30 11:01:13 +08:00
|
|
|
|
|
2026-02-27 09:00:56 +08:00
|
|
|
|
<el-table-column
|
|
|
|
|
|
prop="targetCount"
|
|
|
|
|
|
label="目标人数"
|
|
|
|
|
|
width="100"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
/>
|
2026-01-30 11:01:13 +08:00
|
|
|
|
|
2026-02-27 09:00:56 +08:00
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="预警人数"
|
|
|
|
|
|
width="120"
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
>
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-tooltip placement="top" effect="light">
|
|
|
|
|
|
<div slot="content">
|
2026-03-11 15:08:36 +08:00
|
|
|
|
<div class="risk-tooltip">
|
|
|
|
|
|
<div class="risk-tooltip-title">风险人数统计</div>
|
|
|
|
|
|
<div class="risk-tooltip-item risk-tooltip-item--high">
|
|
|
|
|
|
<span>● 高风险:</span>
|
|
|
|
|
|
<span class="risk-tooltip-count">{{ scope.row.highRiskCount }} 人</span>
|
2026-02-27 09:00:56 +08:00
|
|
|
|
</div>
|
2026-03-11 15:08:36 +08:00
|
|
|
|
<div class="risk-tooltip-item risk-tooltip-item--medium">
|
|
|
|
|
|
<span>● 中风险:</span>
|
|
|
|
|
|
<span class="risk-tooltip-count">{{ scope.row.mediumRiskCount }} 人</span>
|
2026-02-27 09:00:56 +08:00
|
|
|
|
</div>
|
2026-03-11 15:08:36 +08:00
|
|
|
|
<div class="risk-tooltip-item risk-tooltip-item--low">
|
|
|
|
|
|
<span>● 低风险:</span>
|
|
|
|
|
|
<span class="risk-tooltip-count">{{ scope.row.lowRiskCount }} 人</span>
|
2026-02-27 09:00:56 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="warning-count-wrapper">
|
2026-03-11 15:08:36 +08:00
|
|
|
|
<span :class="getWarningClass(scope.row)" class="warning-count">
|
2026-02-27 09:00:56 +08:00
|
|
|
|
{{ scope.row.highRiskCount + scope.row.mediumRiskCount + scope.row.lowRiskCount }}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
2026-01-30 11:01:13 +08:00
|
|
|
|
|
2026-02-27 09:00:56 +08:00
|
|
|
|
<el-table-column
|
|
|
|
|
|
label="操作"
|
2026-02-27 14:23:33 +08:00
|
|
|
|
width="350"
|
|
|
|
|
|
align="left"
|
2026-02-27 09:00:56 +08:00
|
|
|
|
fixed="right"
|
|
|
|
|
|
>
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-button
|
2026-03-18 15:55:55 +08:00
|
|
|
|
v-if="scope.row.status === '0' || scope.row.status === '3'"
|
2026-02-27 09:00:56 +08:00
|
|
|
|
size="mini"
|
|
|
|
|
|
type="text"
|
2026-02-27 09:51:57 +08:00
|
|
|
|
icon="el-icon-right"
|
|
|
|
|
|
@click="handleEnter(scope.row)"
|
2026-03-11 15:08:36 +08:00
|
|
|
|
>
|
|
|
|
|
|
进入项目
|
|
|
|
|
|
</el-button>
|
2026-02-27 09:51:57 +08:00
|
|
|
|
|
|
|
|
|
|
<template v-if="scope.row.status === '1'">
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
icon="el-icon-view"
|
|
|
|
|
|
@click="handleViewResult(scope.row)"
|
2026-03-11 15:08:36 +08:00
|
|
|
|
>
|
|
|
|
|
|
查看结果
|
|
|
|
|
|
</el-button>
|
2026-02-27 09:51:57 +08:00
|
|
|
|
<el-button
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
icon="el-icon-refresh"
|
|
|
|
|
|
@click="handleReAnalyze(scope.row)"
|
2026-03-11 15:08:36 +08:00
|
|
|
|
>
|
|
|
|
|
|
重新分析
|
|
|
|
|
|
</el-button>
|
2026-02-27 09:51:57 +08:00
|
|
|
|
<el-button
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
icon="el-icon-folder"
|
|
|
|
|
|
@click="handleArchive(scope.row)"
|
2026-03-11 15:08:36 +08:00
|
|
|
|
>
|
|
|
|
|
|
归档
|
|
|
|
|
|
</el-button>
|
2026-02-27 09:51:57 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
2026-02-27 09:00:56 +08:00
|
|
|
|
<el-button
|
2026-02-27 09:51:57 +08:00
|
|
|
|
v-if="scope.row.status === '2'"
|
2026-02-27 09:00:56 +08:00
|
|
|
|
size="mini"
|
|
|
|
|
|
type="text"
|
2026-02-27 09:51:57 +08:00
|
|
|
|
icon="el-icon-view"
|
|
|
|
|
|
@click="handleViewResult(scope.row)"
|
2026-03-11 15:08:36 +08:00
|
|
|
|
>
|
|
|
|
|
|
查看结果
|
|
|
|
|
|
</el-button>
|
2026-02-27 09:00:56 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
2026-01-30 11:01:13 +08:00
|
|
|
|
|
2026-02-27 09:00:56 +08:00
|
|
|
|
<el-pagination
|
|
|
|
|
|
v-show="total > 0"
|
|
|
|
|
|
:current-page="pageParams.pageNum"
|
|
|
|
|
|
:page-size="pageParams.pageSize"
|
|
|
|
|
|
:page-sizes="[10, 20, 30, 50]"
|
|
|
|
|
|
:total="total"
|
|
|
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
|
|
|
@size-change="handleSizeChange"
|
|
|
|
|
|
@current-change="handleCurrentChange"
|
2026-03-11 15:08:36 +08:00
|
|
|
|
style="margin-top: 16px; text-align: right"
|
2026-02-27 09:00:56 +08:00
|
|
|
|
/>
|
2026-01-30 11:01:13 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
export default {
|
2026-03-11 15:08:36 +08:00
|
|
|
|
name: "ProjectTable",
|
|
|
|
|
|
dicts: ["ccdi_project_status", "ccdi_config_type"],
|
2026-01-30 11:01:13 +08:00
|
|
|
|
props: {
|
|
|
|
|
|
dataList: {
|
|
|
|
|
|
type: Array,
|
2026-03-11 15:08:36 +08:00
|
|
|
|
default: () => [],
|
2026-01-30 11:01:13 +08:00
|
|
|
|
},
|
2026-02-27 09:00:56 +08:00
|
|
|
|
loading: {
|
|
|
|
|
|
type: Boolean,
|
2026-03-11 15:08:36 +08:00
|
|
|
|
default: false,
|
2026-02-27 09:00:56 +08:00
|
|
|
|
},
|
2026-01-30 11:01:13 +08:00
|
|
|
|
total: {
|
|
|
|
|
|
type: Number,
|
2026-03-11 15:08:36 +08:00
|
|
|
|
default: 0,
|
2026-01-30 11:01:13 +08:00
|
|
|
|
},
|
|
|
|
|
|
pageParams: {
|
|
|
|
|
|
type: Object,
|
|
|
|
|
|
default: () => ({
|
|
|
|
|
|
pageNum: 1,
|
2026-03-11 15:08:36 +08:00
|
|
|
|
pageSize: 10,
|
|
|
|
|
|
}),
|
|
|
|
|
|
},
|
2026-01-30 11:01:13 +08:00
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
2026-02-27 16:47:48 +08:00
|
|
|
|
getStatusColor(status) {
|
|
|
|
|
|
const colorMap = {
|
2026-03-11 15:08:36 +08:00
|
|
|
|
0: "#1890ff",
|
|
|
|
|
|
1: "#52c41a",
|
|
|
|
|
|
2: "#8c8c8c",
|
2026-03-18 15:55:55 +08:00
|
|
|
|
3: "#fa8c16",
|
2026-03-11 15:08:36 +08:00
|
|
|
|
};
|
|
|
|
|
|
return colorMap[status] || "#8c8c8c";
|
2026-02-27 16:47:48 +08:00
|
|
|
|
},
|
2026-01-30 11:01:13 +08:00
|
|
|
|
getWarningClass(row) {
|
2026-03-11 15:08:36 +08:00
|
|
|
|
const total = row.highRiskCount + row.mediumRiskCount + row.lowRiskCount;
|
2026-02-27 09:00:56 +08:00
|
|
|
|
if (row.highRiskCount > 0) {
|
2026-03-11 15:08:36 +08:00
|
|
|
|
return "text-danger text-bold";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (row.mediumRiskCount > 0) {
|
|
|
|
|
|
return "text-warning text-bold";
|
|
|
|
|
|
}
|
|
|
|
|
|
if (total > 0) {
|
|
|
|
|
|
return "text-info";
|
2026-02-27 09:00:56 +08:00
|
|
|
|
}
|
2026-03-11 15:08:36 +08:00
|
|
|
|
return "";
|
2026-01-30 11:01:13 +08:00
|
|
|
|
},
|
2026-02-27 09:51:57 +08:00
|
|
|
|
handleEnter(row) {
|
2026-03-11 15:08:36 +08:00
|
|
|
|
this.$emit("enter", row);
|
2026-02-27 09:51:57 +08:00
|
|
|
|
},
|
|
|
|
|
|
handleViewResult(row) {
|
2026-03-11 15:08:36 +08:00
|
|
|
|
this.$emit("view-result", row);
|
2026-01-30 11:01:13 +08:00
|
|
|
|
},
|
2026-02-27 09:51:57 +08:00
|
|
|
|
handleReAnalyze(row) {
|
2026-03-11 15:08:36 +08:00
|
|
|
|
this.$emit("re-analyze", row);
|
2026-01-30 11:01:13 +08:00
|
|
|
|
},
|
2026-02-27 09:51:57 +08:00
|
|
|
|
handleArchive(row) {
|
2026-03-11 15:08:36 +08:00
|
|
|
|
this.$emit("archive", row);
|
2026-01-30 11:01:13 +08:00
|
|
|
|
},
|
|
|
|
|
|
handleSizeChange(val) {
|
2026-03-11 15:08:36 +08:00
|
|
|
|
this.$emit("pagination", {
|
|
|
|
|
|
pageNum: this.pageParams.pageNum,
|
|
|
|
|
|
pageSize: val,
|
|
|
|
|
|
});
|
2026-01-30 11:01:13 +08:00
|
|
|
|
},
|
|
|
|
|
|
handleCurrentChange(val) {
|
2026-03-11 15:08:36 +08:00
|
|
|
|
this.$emit("pagination", {
|
|
|
|
|
|
pageNum: val,
|
|
|
|
|
|
pageSize: this.pageParams.pageSize,
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
};
|
2026-01-30 11:01:13 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
.project-table-container {
|
2026-02-27 09:00:56 +08:00
|
|
|
|
margin-top: 16px;
|
2026-01-30 11:01:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-27 16:47:48 +08:00
|
|
|
|
.status-tag {
|
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
gap: 6px;
|
|
|
|
|
|
|
|
|
|
|
|
.status-dot {
|
|
|
|
|
|
font-size: 10px;
|
|
|
|
|
|
line-height: 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-27 09:00:56 +08:00
|
|
|
|
.project-info-cell {
|
2026-02-28 13:36:22 +08:00
|
|
|
|
padding: 4px 0;
|
|
|
|
|
|
line-height: 1.4;
|
2026-01-30 11:01:13 +08:00
|
|
|
|
|
2026-02-27 09:00:56 +08:00
|
|
|
|
.project-name {
|
2026-01-30 11:01:13 +08:00
|
|
|
|
font-size: 14px;
|
2026-02-27 09:00:56 +08:00
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
color: #303133;
|
2026-02-28 13:36:22 +08:00
|
|
|
|
margin-bottom: 2px;
|
2026-02-27 09:00:56 +08:00
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
white-space: nowrap;
|
2026-01-30 11:01:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-27 09:00:56 +08:00
|
|
|
|
.project-desc {
|
2026-01-30 11:01:13 +08:00
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
color: #909399;
|
2026-02-27 09:00:56 +08:00
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
white-space: nowrap;
|
2026-01-30 11:01:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-11 15:08:36 +08:00
|
|
|
|
.risk-tooltip {
|
|
|
|
|
|
padding: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.risk-tooltip-title {
|
|
|
|
|
|
margin-bottom: 8px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
color: #303133;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.risk-tooltip-item {
|
|
|
|
|
|
margin-bottom: 6px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.risk-tooltip-item--high {
|
|
|
|
|
|
color: #f56c6c;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.risk-tooltip-item--medium {
|
|
|
|
|
|
color: #e6a23c;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.risk-tooltip-item--low {
|
|
|
|
|
|
color: #909399;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.risk-tooltip-count {
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-27 09:00:56 +08:00
|
|
|
|
.warning-count-wrapper {
|
|
|
|
|
|
display: inline-block;
|
2026-01-30 11:01:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-03-11 15:08:36 +08:00
|
|
|
|
.warning-count {
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-27 09:00:56 +08:00
|
|
|
|
.text-danger {
|
|
|
|
|
|
color: #f56c6c;
|
2026-01-30 11:01:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-27 09:00:56 +08:00
|
|
|
|
.text-warning {
|
|
|
|
|
|
color: #e6a23c;
|
2026-01-30 11:01:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-27 09:00:56 +08:00
|
|
|
|
.text-info {
|
|
|
|
|
|
color: #909399;
|
2026-01-30 11:01:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-27 09:00:56 +08:00
|
|
|
|
.text-bold {
|
2026-03-11 15:08:36 +08:00
|
|
|
|
font-weight: 700;
|
2026-01-30 11:01:13 +08:00
|
|
|
|
}
|
2026-02-27 09:57:22 +08:00
|
|
|
|
|
2026-02-27 11:09:33 +08:00
|
|
|
|
::v-deep .el-button--text {
|
2026-02-27 09:57:22 +08:00
|
|
|
|
color: #1890ff;
|
2026-02-27 10:52:17 +08:00
|
|
|
|
padding: 8px 12px;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
transition: all 0.2s ease;
|
2026-02-27 09:57:22 +08:00
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
|
color: #096dd9;
|
2026-02-27 10:52:17 +08:00
|
|
|
|
background-color: rgba(24, 144, 255, 0.08);
|
|
|
|
|
|
text-decoration: none;
|
2026-02-27 09:57:22 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
&:first-child {
|
|
|
|
|
|
padding-left: 0;
|
|
|
|
|
|
}
|
2026-02-27 10:52:17 +08:00
|
|
|
|
|
|
|
|
|
|
& + .el-button--text {
|
|
|
|
|
|
margin-left: 4px;
|
|
|
|
|
|
}
|
2026-02-27 09:57:22 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-27 11:09:33 +08:00
|
|
|
|
::v-deep .el-pagination {
|
2026-02-27 10:52:38 +08:00
|
|
|
|
margin-top: 24px;
|
2026-02-27 09:57:22 +08:00
|
|
|
|
text-align: right;
|
|
|
|
|
|
|
2026-02-27 10:52:38 +08:00
|
|
|
|
.btn-prev,
|
|
|
|
|
|
.btn-next,
|
|
|
|
|
|
.el-pager li {
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
|
background-color: #f5f5f5;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.el-pager li.active {
|
|
|
|
|
|
background-color: #1890ff;
|
2026-03-11 15:08:36 +08:00
|
|
|
|
color: #fff;
|
2026-02-27 10:52:38 +08:00
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-27 09:57:22 +08:00
|
|
|
|
.el-pagination__total,
|
|
|
|
|
|
.el-pagination__sizes,
|
|
|
|
|
|
.el-pagination__jump {
|
2026-02-27 10:52:38 +08:00
|
|
|
|
color: #666;
|
2026-02-27 09:57:22 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-01-30 11:01:13 +08:00
|
|
|
|
</style>
|