Merge branch 'dev' into dev-lgw

This commit is contained in:
mengke
2026-03-02 19:20:51 +08:00
298 changed files with 20428 additions and 6241 deletions

View File

@@ -3,15 +3,14 @@
<!-- 页面标题 -->
<div class="page-header">
<h2 class="page-title">初核项目管理</h2>
<p class="page-subtitle">管理纪检初核排查项目跟踪预警信息</p>
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">新建项目</el-button>
</div>
<!-- 搜索和操作区 -->
<search-bar
:show-search="showSearch"
:tab-counts="tabCounts"
@query="handleQuery"
@add="handleAdd"
@import="handleImport"
/>
<!-- 项目列表表格 -->
@@ -20,8 +19,7 @@
:data-list="projectList"
:total="total"
:page-params="queryParams"
@pagination="getList"
@detail="handleDetail"
@pagination="handlePagination"
@enter="handleEnter"
@view-result="handleViewResult"
@re-analyze="handleReAnalyze"
@@ -63,13 +61,13 @@
</template>
<script>
import { getMockProjectList } from "@/api/ccdiProject";
import SearchBar from "./components/SearchBar";
import ProjectTable from "./components/ProjectTable";
import QuickEntry from "./components/QuickEntry";
import AddProjectDialog from "./components/AddProjectDialog";
import ImportHistoryDialog from "./components/ImportHistoryDialog";
import ArchiveConfirmDialog from "./components/ArchiveConfirmDialog";
import {listProject, getStatusCounts} from '@/api/ccdiProject'
import SearchBar from './components/SearchBar'
import ProjectTable from './components/ProjectTable'
import QuickEntry from './components/QuickEntry'
import AddProjectDialog from './components/AddProjectDialog'
import ImportHistoryDialog from './components/ImportHistoryDialog'
import ArchiveConfirmDialog from './components/ArchiveConfirmDialog'
export default {
name: "DpcProject",
@@ -96,7 +94,14 @@ export default {
pageNum: 1,
pageSize: 10,
projectName: null,
projectStatus: null,
status: null
},
// 标签页数量统计
tabCounts: {
all: 0,
'0': 0,
'1': 0,
'2': 0
},
// 新增/编辑弹窗
addDialogVisible: false,
@@ -115,17 +120,32 @@ export default {
methods: {
/** 查询项目列表 */
getList() {
this.loading = true;
// 使用Mock数据
getMockProjectList()
.then((response) => {
this.projectList = response.rows;
this.total = response.total;
this.loading = false;
})
.catch(() => {
this.loading = false;
});
this.loading = true
// 并行请求列表数据和状态统计
Promise.all([
listProject(this.queryParams),
getStatusCounts()
]).then(([listResponse, countsResponse]) => {
// 处理列表数据
this.projectList = listResponse.rows
this.total = listResponse.total
// 处理状态统计
const counts = countsResponse.data || {}
this.tabCounts = {
all: counts.all || 0,
'0': counts.status0 || 0,
'1': counts.status1 || 0,
'2': counts.status2 || 0
}
this.loading = false
}).catch((error) => {
this.loading = false
console.error('加载数据失败:', error)
this.$modal.msgError('加载数据失败,请稍后重试')
})
},
/** 搜索按钮操作 */
handleQuery(queryParams) {
@@ -135,6 +155,14 @@ export default {
this.queryParams.pageNum = 1;
this.getList();
},
/** 分页事件处理 */
handlePagination(pagination) {
if (pagination) {
this.queryParams.pageNum = pagination.pageNum
this.queryParams.pageSize = pagination.pageSize
}
this.getList()
},
/** 新增按钮操作 */
handleAdd() {
this.projectForm = this.getEmptyForm();
@@ -160,11 +188,9 @@ export default {
},
/** 提交项目表单 */
handleSubmitProject(data) {
// 这里应该调用实际的API
console.log("提交项目数据:", data);
this.$modal.msgSuccess("项目创建成功");
this.addDialogVisible = false;
this.getList();
// 不需要再次调用API因为AddProjectDialog已经处理了
this.addDialogVisible = false
this.getList() // 刷新列表
},
/** 导入历史项目 */
handleImport() {
@@ -199,11 +225,6 @@ export default {
this.addDialogTitle = "创建高风险专项项目";
this.addDialogVisible = true;
},
/** 查看详情 */
handleDetail(row) {
console.log("查看详情:", row);
this.$modal.msgInfo("查看项目详情: " + row.projectName);
},
/** 进入项目 */
handleEnter(row) {
this.$router.push({
@@ -239,30 +260,22 @@ export default {
<style lang="scss" scoped>
.dpc-project-container {
padding: 16px;
background: #f0f2f5;
padding: 24px;
background: #F8F9FA;
min-height: calc(100vh - 140px);
}
.page-header {
margin-bottom: 12px;
padding: 16px 20px;
background: #ffffff;
border-radius: 4px;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
.page-title {
margin: 0;
font-size: 18px;
font-size: 20px;
font-weight: 500;
color: #303133;
}
.page-subtitle {
margin: 4px 0 0 0;
font-size: 13px;
color: #909399;
font-weight: 400;
}
}
</style>