|
@@ -14,10 +14,21 @@
|
|
|
></el-date-picker>
|
|
></el-date-picker>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
- <el-form-item label="监审项目名称:">
|
|
|
|
|
|
|
+ <el-form-item label="地区:" prop="region">
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="searchForm.region"
|
|
|
|
|
+ placeholder="请选择地区"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ style="width: 150px"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-option label="山西省" value="山西省"></el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+
|
|
|
|
|
+ <el-form-item label="卷宗号:" prop="archiveNo">
|
|
|
<el-input
|
|
<el-input
|
|
|
- v-model="searchForm.projectName"
|
|
|
|
|
- placeholder="请输入监审项目名称"
|
|
|
|
|
|
|
+ v-model="searchForm.archiveNo"
|
|
|
|
|
+ placeholder="请输入卷宗号"
|
|
|
clearable
|
|
clearable
|
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
|
></el-input>
|
|
></el-input>
|
|
@@ -29,15 +40,7 @@
|
|
|
icon="el-icon-search"
|
|
icon="el-icon-search"
|
|
|
@click="handleSearch"
|
|
@click="handleSearch"
|
|
|
>
|
|
>
|
|
|
- 搜索
|
|
|
|
|
- </el-button>
|
|
|
|
|
- <el-button
|
|
|
|
|
- plain
|
|
|
|
|
- type="primary"
|
|
|
|
|
- icon="el-icon-refresh"
|
|
|
|
|
- @click="handleReset"
|
|
|
|
|
- >
|
|
|
|
|
- 重置
|
|
|
|
|
|
|
+ 查询
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
@@ -49,25 +52,15 @@
|
|
|
:data="tableData"
|
|
:data="tableData"
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
border
|
|
border
|
|
|
- default-expand-all
|
|
|
|
|
row-key="id"
|
|
row-key="id"
|
|
|
- :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
|
|
|
|
>
|
|
>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
type="index"
|
|
type="index"
|
|
|
label="序号"
|
|
label="序号"
|
|
|
- width="80"
|
|
|
|
|
|
|
+ width="60"
|
|
|
header-align="center"
|
|
header-align="center"
|
|
|
align="center"
|
|
align="center"
|
|
|
- >
|
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
|
- <!-- 只显示父节点的序号 -->
|
|
|
|
|
- <span v-if="scope.row.children || !scope.row.isSubTask">
|
|
|
|
|
- {{ getParentNodeIndex(scope.row) }}
|
|
|
|
|
- </span>
|
|
|
|
|
- <span v-else></span>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
|
|
+ />
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
prop="year"
|
|
prop="year"
|
|
|
label="立项年度"
|
|
label="立项年度"
|
|
@@ -76,11 +69,27 @@
|
|
|
align="center"
|
|
align="center"
|
|
|
/>
|
|
/>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
|
|
+ prop="region"
|
|
|
|
|
+ label="立项地区"
|
|
|
|
|
+ width="100"
|
|
|
|
|
+ header-align="center"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ />
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ prop="archiveNo"
|
|
|
|
|
+ label="卷宗号"
|
|
|
|
|
+ width="150"
|
|
|
|
|
+ header-align="center"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
|
+ />
|
|
|
|
|
+ <el-table-column
|
|
|
prop="projectName"
|
|
prop="projectName"
|
|
|
label="成本监审项目名称"
|
|
label="成本监审项目名称"
|
|
|
show-overflow-tooltip
|
|
show-overflow-tooltip
|
|
|
header-align="center"
|
|
header-align="center"
|
|
|
align="left"
|
|
align="left"
|
|
|
|
|
+ min-width="180"
|
|
|
>
|
|
>
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<div class="cell-content cell-content--left">
|
|
<div class="cell-content cell-content--left">
|
|
@@ -95,44 +104,45 @@
|
|
|
label="监审对象"
|
|
label="监审对象"
|
|
|
header-align="center"
|
|
header-align="center"
|
|
|
align="left"
|
|
align="left"
|
|
|
|
|
+ min-width="150"
|
|
|
/>
|
|
/>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
prop="auditPeriod"
|
|
prop="auditPeriod"
|
|
|
label="监审期间"
|
|
label="监审期间"
|
|
|
header-align="center"
|
|
header-align="center"
|
|
|
align="center"
|
|
align="center"
|
|
|
- width="200"
|
|
|
|
|
- />
|
|
|
|
|
- <el-table-column
|
|
|
|
|
- prop="source"
|
|
|
|
|
- label="立项来源"
|
|
|
|
|
- header-align="center"
|
|
|
|
|
- align="center"
|
|
|
|
|
- width="120"
|
|
|
|
|
|
|
+ width="150"
|
|
|
/>
|
|
/>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
- prop="form"
|
|
|
|
|
- label="监审形式"
|
|
|
|
|
|
|
+ prop="archiver"
|
|
|
|
|
+ label="归档人"
|
|
|
|
|
+ width="100"
|
|
|
header-align="center"
|
|
header-align="center"
|
|
|
align="center"
|
|
align="center"
|
|
|
- width="120"
|
|
|
|
|
/>
|
|
/>
|
|
|
- <el-table-column label="操作" align="center" width="200" fixed="right">
|
|
|
|
|
|
|
+ <el-table-column label="操作" align="center" width="180" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<span class="action-buttons">
|
|
<span class="action-buttons">
|
|
|
<el-button
|
|
<el-button
|
|
|
type="text"
|
|
type="text"
|
|
|
size="small"
|
|
size="small"
|
|
|
- @click="handleTaskDetail(scope.row)"
|
|
|
|
|
|
|
+ @click="handleView(scope.row)"
|
|
|
>
|
|
>
|
|
|
任务详情
|
|
任务详情
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
type="text"
|
|
type="text"
|
|
|
size="small"
|
|
size="small"
|
|
|
- @click="handleView(scope.row)"
|
|
|
|
|
|
|
+ @click="handleDownload(scope.row)"
|
|
|
|
|
+ >
|
|
|
|
|
+ 回归档
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ @click="handleDelete(scope.row)"
|
|
|
>
|
|
>
|
|
|
- 查看
|
|
|
|
|
|
|
+ 下载
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</span>
|
|
</span>
|
|
|
</template>
|
|
</template>
|
|
@@ -167,7 +177,8 @@
|
|
|
return {
|
|
return {
|
|
|
searchForm: {
|
|
searchForm: {
|
|
|
projectYear: '2025',
|
|
projectYear: '2025',
|
|
|
- projectName: '',
|
|
|
|
|
|
|
+ region: '',
|
|
|
|
|
+ archiveNo: '',
|
|
|
},
|
|
},
|
|
|
loading: false,
|
|
loading: false,
|
|
|
tableData: [],
|
|
tableData: [],
|
|
@@ -184,18 +195,6 @@
|
|
|
this.fetchData()
|
|
this.fetchData()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- // 获取父节点的连续序号
|
|
|
|
|
- getParentNodeIndex(row) {
|
|
|
|
|
- // 过滤出所有父节点
|
|
|
|
|
- const parentNodes = this.tableData.filter(
|
|
|
|
|
- (item) =>
|
|
|
|
|
- (item.children && item.children.length > 0) || !item.isSubTask
|
|
|
|
|
- )
|
|
|
|
|
- // 找到当前行在父节点数组中的索引
|
|
|
|
|
- const index = parentNodes.findIndex((item) => item.id === row.id)
|
|
|
|
|
- // 返回序号(索引+1)
|
|
|
|
|
- return index + 1
|
|
|
|
|
- },
|
|
|
|
|
// 获取数据
|
|
// 获取数据
|
|
|
async fetchData() {
|
|
async fetchData() {
|
|
|
try {
|
|
try {
|
|
@@ -204,7 +203,8 @@
|
|
|
currentPage: this.pagination.currentPage,
|
|
currentPage: this.pagination.currentPage,
|
|
|
pageSize: this.pagination.pageSize,
|
|
pageSize: this.pagination.pageSize,
|
|
|
projectYear: this.searchForm.projectYear,
|
|
projectYear: this.searchForm.projectYear,
|
|
|
- projectName: this.searchForm.projectName,
|
|
|
|
|
|
|
+ region: this.searchForm.region,
|
|
|
|
|
+ archiveNo: this.searchForm.archiveNo,
|
|
|
isGd: 1, // 已归档
|
|
isGd: 1, // 已归档
|
|
|
}
|
|
}
|
|
|
const response = await getArchiveList(params)
|
|
const response = await getArchiveList(params)
|
|
@@ -213,35 +213,25 @@
|
|
|
if (response && response.value) {
|
|
if (response && response.value) {
|
|
|
// 获取记录列表
|
|
// 获取记录列表
|
|
|
const records = response.value.records || []
|
|
const records = response.value.records || []
|
|
|
- // 转换数据格式,将childTasks转换为children以适应表格组件
|
|
|
|
|
- this.tableData = records.map((record) => {
|
|
|
|
|
|
|
+ // 只加载第一级数据,过滤掉子任务
|
|
|
|
|
+ const firstLevelRecords = records.filter(
|
|
|
|
|
+ (record) => !record.pid || record.pid === '0'
|
|
|
|
|
+ )
|
|
|
|
|
+
|
|
|
|
|
+ // 转换数据格式
|
|
|
|
|
+ this.tableData = firstLevelRecords.map((record) => {
|
|
|
return {
|
|
return {
|
|
|
id: record.id,
|
|
id: record.id,
|
|
|
year: record.projectYear || record.year || '',
|
|
year: record.projectYear || record.year || '',
|
|
|
|
|
+ region: record.region || '',
|
|
|
|
|
+ archiveNo: record.archiveNo || '',
|
|
|
projectName: record.projectName,
|
|
projectName: record.projectName,
|
|
|
auditObject: record.auditedUnitName || record.auditObject || '',
|
|
auditObject: record.auditedUnitName || record.auditObject || '',
|
|
|
auditPeriod: record.auditPeriod || '',
|
|
auditPeriod: record.auditPeriod || '',
|
|
|
- source: this.getSourceTypeText(record.sourceType),
|
|
|
|
|
- form: this.getAuditTypeText(record.auditType),
|
|
|
|
|
- isSubTask: record.pid && record.pid !== '0',
|
|
|
|
|
|
|
+ archiver: record.archiver || '',
|
|
|
projectId: record.projectId,
|
|
projectId: record.projectId,
|
|
|
auditedUnitId: record.auditedUnitId,
|
|
auditedUnitId: record.auditedUnitId,
|
|
|
taskId: record.id,
|
|
taskId: record.id,
|
|
|
- children: record.childTasks
|
|
|
|
|
- ? record.childTasks.map((child) => ({
|
|
|
|
|
- id: child.id,
|
|
|
|
|
- year: '',
|
|
|
|
|
- projectName: child.projectName,
|
|
|
|
|
- auditObject: child.auditedUnitName || '',
|
|
|
|
|
- auditPeriod: record.auditPeriod || '', // 子任务可能使用父任务的审核期间
|
|
|
|
|
- source: '',
|
|
|
|
|
- form: '',
|
|
|
|
|
- isSubTask: true,
|
|
|
|
|
- projectId: child.projectId,
|
|
|
|
|
- auditedUnitId: child.auditedUnitId,
|
|
|
|
|
- taskId: child.id,
|
|
|
|
|
- }))
|
|
|
|
|
- : [],
|
|
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
// 设置总数
|
|
// 设置总数
|
|
@@ -259,22 +249,6 @@
|
|
|
this.loading = false
|
|
this.loading = false
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- // 获取来源类型文本
|
|
|
|
|
- getSourceTypeText(type) {
|
|
|
|
|
- const typeMap = {
|
|
|
|
|
- 1: '年度计划内',
|
|
|
|
|
- 2: '年度计划外',
|
|
|
|
|
- }
|
|
|
|
|
- return typeMap[type] || type || ''
|
|
|
|
|
- },
|
|
|
|
|
- // 获取审核类型文本
|
|
|
|
|
- getAuditTypeText(type) {
|
|
|
|
|
- const typeMap = {
|
|
|
|
|
- 1: '定期监审',
|
|
|
|
|
- 2: '定调价监审',
|
|
|
|
|
- }
|
|
|
|
|
- return typeMap[type] || type || ''
|
|
|
|
|
- },
|
|
|
|
|
handleSearch() {
|
|
handleSearch() {
|
|
|
this.pagination.currentPage = 1
|
|
this.pagination.currentPage = 1
|
|
|
this.fetchData()
|
|
this.fetchData()
|
|
@@ -282,7 +256,8 @@
|
|
|
handleReset() {
|
|
handleReset() {
|
|
|
this.searchForm = {
|
|
this.searchForm = {
|
|
|
projectYear: '2025',
|
|
projectYear: '2025',
|
|
|
- projectName: '',
|
|
|
|
|
|
|
+ region: '',
|
|
|
|
|
+ archiveNo: '',
|
|
|
}
|
|
}
|
|
|
this.pagination.currentPage = 1
|
|
this.pagination.currentPage = 1
|
|
|
this.fetchData()
|
|
this.fetchData()
|
|
@@ -301,14 +276,17 @@
|
|
|
// 可以在这里处理详情点击
|
|
// 可以在这里处理详情点击
|
|
|
console.log('详情:', row)
|
|
console.log('详情:', row)
|
|
|
},
|
|
},
|
|
|
- handleTaskDetail(row) {
|
|
|
|
|
|
|
+ handleView(row) {
|
|
|
// 打开任务详情弹窗
|
|
// 打开任务详情弹窗
|
|
|
this.$refs.taskDetail.open(row, 'chengben')
|
|
this.$refs.taskDetail.open(row, 'chengben')
|
|
|
},
|
|
},
|
|
|
- handleView(row) {
|
|
|
|
|
- // 查看操作,可以打开查看弹窗或跳转
|
|
|
|
|
- console.log('查看:', row)
|
|
|
|
|
- this.$message.info('查看功能待实现')
|
|
|
|
|
|
|
+ handleDownload(row) {
|
|
|
|
|
+ // 回归档操作
|
|
|
|
|
+ this.$message.info('回归档功能待实现')
|
|
|
|
|
+ },
|
|
|
|
|
+ handleDelete(row) {
|
|
|
|
|
+ // 下载操作
|
|
|
|
|
+ this.$message.info('下载功能待实现')
|
|
|
},
|
|
},
|
|
|
backToList() {
|
|
backToList() {
|
|
|
this.activeTab = 'list'
|
|
this.activeTab = 'list'
|