|
|
@@ -13,6 +13,7 @@
|
|
|
</div>
|
|
|
|
|
|
<el-table
|
|
|
+ v-loading="loading"
|
|
|
class="mb10"
|
|
|
:data="auditProjectList"
|
|
|
style="width: 100%"
|
|
|
@@ -70,43 +71,55 @@
|
|
|
align="center"
|
|
|
width="100"
|
|
|
/>
|
|
|
- <el-table-column prop="status" label="状态" align="center" width="80" />
|
|
|
+ <el-table-column
|
|
|
+ prop="currentNodeName"
|
|
|
+ label="状态"
|
|
|
+ align="center"
|
|
|
+ width="80"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="!scope.row.isSubTask">
|
|
|
+ {{ scope.row.currentNodeName }}
|
|
|
+ </span>
|
|
|
+ <span v-else>{{ scope.row.status }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="操作" align="center" width="260">
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="!scope.row.isSubTask" class="action-buttons">
|
|
|
<el-button type="text" @click="handleTaskDetail(scope.row)">
|
|
|
任务详情
|
|
|
</el-button>
|
|
|
- <el-button type="text" @click="handleTaskProcess(scope.row)">
|
|
|
+ <el-button
|
|
|
+ v-if="scope.row.currentNode === 'sdsh'"
|
|
|
+ type="text"
|
|
|
+ @click="handleTaskProcess(scope.row)"
|
|
|
+ >
|
|
|
任务办理
|
|
|
</el-button>
|
|
|
<el-button type="text" @click="handleCheckRecord(scope.row)">
|
|
|
备忘录
|
|
|
</el-button>
|
|
|
</span>
|
|
|
-
|
|
|
- <el-button
|
|
|
- v-if="scope.row.status == '已提交'"
|
|
|
- type="text"
|
|
|
- @click="handleAuditReview(scope.row)"
|
|
|
- >
|
|
|
- 资料初审
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- v-else
|
|
|
- class="ml10"
|
|
|
- type="text"
|
|
|
- @click="handleView(scope.row)"
|
|
|
- >
|
|
|
- 查看
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- v-if="scope.row.status === '审核中'"
|
|
|
- type="text"
|
|
|
- @click="handleCostAudit(scope.row)"
|
|
|
- >
|
|
|
- 成本审核
|
|
|
- </el-button>
|
|
|
+ <span v-if="scope.row.isSubTask" class="action-buttons">
|
|
|
+ <el-button
|
|
|
+ v-if="
|
|
|
+ (scope.row.currentNode =
|
|
|
+ 'clcs' && scope.row.status === '审核中')
|
|
|
+ "
|
|
|
+ type="text"
|
|
|
+ @click="handleAuditReview(scope.row)"
|
|
|
+ >
|
|
|
+ 资料初审
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="scope.row.currentNode === 'sdsh'"
|
|
|
+ type="text"
|
|
|
+ @click="handleCostAudit(scope.row)"
|
|
|
+ >
|
|
|
+ 成本审核
|
|
|
+ </el-button>
|
|
|
+ </span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -164,7 +177,7 @@
|
|
|
</el-breadcrumb-item>
|
|
|
<el-breadcrumb-item>资料初审</el-breadcrumb-item>
|
|
|
</el-breadcrumb>
|
|
|
- <auditReview @handleBack="backToList" />
|
|
|
+ <auditReview :id="currentProject.id" @handleBack="backToList" />
|
|
|
</div>
|
|
|
<div v-else-if="activeView === 'costAudit'">
|
|
|
<el-breadcrumb
|
|
|
@@ -187,6 +200,8 @@
|
|
|
import auditReview from './auditReview.vue'
|
|
|
import costAudit from './costAudit.vue'
|
|
|
import taskMixins from './taskMixins.js'
|
|
|
+ // 成本监审任务列表API
|
|
|
+ import { getReviewTaskList } from '@/api/audit/auditIndex'
|
|
|
export default {
|
|
|
name: 'CostAuditManagement',
|
|
|
components: {
|
|
|
@@ -211,6 +226,8 @@
|
|
|
// workflowList: [],
|
|
|
notificationsList: [],
|
|
|
templatesList: [],
|
|
|
+ // 加载状态
|
|
|
+ loading: false,
|
|
|
// 当前选中的项目
|
|
|
currentProject: null,
|
|
|
}
|
|
|
@@ -235,87 +252,91 @@
|
|
|
// 加载审核项目列表
|
|
|
async loadAuditProjectList() {
|
|
|
try {
|
|
|
- // 这里应该调用API获取数据,现在使用模拟数据
|
|
|
- this.auditProjectList = [
|
|
|
- {
|
|
|
- id: '1',
|
|
|
- projectName: '省内油气管道运输成本监审',
|
|
|
- auditObject: '山西省油气管道公司、太原市油气公司',
|
|
|
- auditPeriod: '2022-2024年',
|
|
|
- source: '年度计划外',
|
|
|
- form: '定调价监审',
|
|
|
- status: '资料初审',
|
|
|
- isSubTask: false,
|
|
|
- children: [
|
|
|
- {
|
|
|
- id: '1-1',
|
|
|
- projectName: '子任务',
|
|
|
- auditObject: '山西省油气管道公司',
|
|
|
- auditPeriod: '2022-2024年',
|
|
|
- source: '',
|
|
|
- form: '',
|
|
|
- status: '已提交',
|
|
|
- isSubTask: true,
|
|
|
- },
|
|
|
- {
|
|
|
- id: '1-2',
|
|
|
- projectName: '子任务',
|
|
|
- auditObject: '太原市油气公司',
|
|
|
- auditPeriod: '2022-2024年',
|
|
|
- source: '',
|
|
|
- form: '',
|
|
|
- status: '初审通过',
|
|
|
- isSubTask: true,
|
|
|
- },
|
|
|
- {
|
|
|
- id: '1-3',
|
|
|
- projectName: '子任务',
|
|
|
- auditObject: '****公司',
|
|
|
- auditPeriod: '2022-2024年',
|
|
|
- source: '',
|
|
|
- form: '',
|
|
|
- status: '中止',
|
|
|
- isSubTask: true,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- id: '2',
|
|
|
- projectName: '太原市电网输配电成本监审',
|
|
|
- auditObject: '太原市热电厂、****热电厂',
|
|
|
- auditPeriod: '2022-2024年',
|
|
|
- source: '年度计划内',
|
|
|
- form: '定期监审',
|
|
|
- status: '实地审核',
|
|
|
- isSubTask: false,
|
|
|
- children: [
|
|
|
- {
|
|
|
- id: '2-1',
|
|
|
- projectName: '子任务',
|
|
|
- auditObject: '太原市热电厂',
|
|
|
- auditPeriod: '2022-2024年',
|
|
|
- source: '',
|
|
|
- form: '',
|
|
|
- status: '审核中',
|
|
|
- isSubTask: true,
|
|
|
- },
|
|
|
- {
|
|
|
- id: '2-2',
|
|
|
- projectName: '子任务',
|
|
|
- auditObject: '****热电厂',
|
|
|
- auditPeriod: '2022-2024年',
|
|
|
- source: '',
|
|
|
- form: '',
|
|
|
- status: '审核通过',
|
|
|
- isSubTask: true,
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- ]
|
|
|
+ this.loading = true
|
|
|
+ // 调用API获取数据
|
|
|
+ const params = {
|
|
|
+ currentPage: this.currentPage,
|
|
|
+ pageSize: this.pageSize,
|
|
|
+ projectName: this.searchQuery,
|
|
|
+ }
|
|
|
+ const response = await getReviewTaskList(params)
|
|
|
+
|
|
|
+ // 根据API返回格式处理数据
|
|
|
+ if (response.state && response.value) {
|
|
|
+ // 获取记录列表
|
|
|
+ const records = response.value.records || []
|
|
|
+ // 转换数据格式,将childTasks转换为children以适应表格组件
|
|
|
+ this.auditProjectList = records.map((record) => {
|
|
|
+ return {
|
|
|
+ id: record.id,
|
|
|
+ projectName: record.projectName,
|
|
|
+ auditObject: record.auditedUnitName,
|
|
|
+ auditPeriod: record.auditPeriod,
|
|
|
+ source: this.getSourceTypeText(record.sourceType),
|
|
|
+ form: this.getAuditTypeText(record.auditType),
|
|
|
+ status: this.getStatusText(record.status),
|
|
|
+ isSubTask: record.pid !== '0',
|
|
|
+ currentNodeName: record.currentNodeName,
|
|
|
+ currentNode: record.currentNode,
|
|
|
+ children: record.childTasks
|
|
|
+ ? record.childTasks.map((child) => ({
|
|
|
+ id: child.id,
|
|
|
+ projectName: child.projectName,
|
|
|
+ auditObject: child.auditedUnitName,
|
|
|
+ auditPeriod: record.auditPeriod, // 子任务可能使用父任务的审核期间
|
|
|
+ source: '',
|
|
|
+ form: '',
|
|
|
+ currentNode: child.currentNode,
|
|
|
+ status: child.status,
|
|
|
+ isSubTask: true,
|
|
|
+ }))
|
|
|
+ : [],
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // 设置总数
|
|
|
+ this.total = response.value.total || 0
|
|
|
+ } else {
|
|
|
+ this.auditProjectList = []
|
|
|
+ this.total = 0
|
|
|
+ this.$message.warning('未获取到审核项目数据')
|
|
|
+ }
|
|
|
} catch (error) {
|
|
|
this.$message.error('加载审核项目列表失败')
|
|
|
console.error('加载审核项目列表失败:', error)
|
|
|
+ } finally {
|
|
|
+ this.loading = false
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ // 获取来源类型文本
|
|
|
+ getSourceTypeText(type) {
|
|
|
+ const typeMap = {
|
|
|
+ 1: '年度计划内',
|
|
|
+ 2: '年度计划外',
|
|
|
+ // 可根据实际需求补充其他类型
|
|
|
+ }
|
|
|
+ return typeMap[type] || type
|
|
|
+ },
|
|
|
+
|
|
|
+ // 获取审核类型文本
|
|
|
+ getAuditTypeText(type) {
|
|
|
+ const typeMap = {
|
|
|
+ 1: '定期监审',
|
|
|
+ 2: '定调价监审',
|
|
|
+ // 可根据实际需求补充其他类型
|
|
|
+ }
|
|
|
+ return typeMap[type] || type
|
|
|
+ },
|
|
|
+
|
|
|
+ // 获取状态文本
|
|
|
+ getStatusText(status) {
|
|
|
+ const statusMap = {
|
|
|
+ ccls: '资料初审',
|
|
|
+ 200: '审核通过',
|
|
|
+ clcs: '审核中', // 添加clcs状态映射为审核中
|
|
|
+ // 可根据实际需求补充其他状态
|
|
|
}
|
|
|
+ return statusMap[status] || status
|
|
|
},
|
|
|
|
|
|
// 搜索
|