|
|
@@ -119,10 +119,13 @@
|
|
|
</span>
|
|
|
<!-- 只显示父节点的序号 -->
|
|
|
<div v-else>
|
|
|
- <span v-if="scope.row.children">
|
|
|
+ <!-- <span v-if="scope.row.children">
|
|
|
+ {{ getParentNodeIndex(scope.row) }}
|
|
|
+ </span>
|
|
|
+ <span v-else></span> -->
|
|
|
+ <span>
|
|
|
{{ getParentNodeIndex(scope.row) }}
|
|
|
</span>
|
|
|
- <span v-else></span>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -306,6 +309,19 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
+ <!-- 分页 -->
|
|
|
+ <el-pagination
|
|
|
+ v-if="pagination.total > 0"
|
|
|
+ class="pagination"
|
|
|
+ background
|
|
|
+ :page-sizes="[50, 100]"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="pagination.total"
|
|
|
+ :page-size="pagination.pageSize"
|
|
|
+ :current-page="pagination.page"
|
|
|
+ @current-change="handlePageChange"
|
|
|
+ @size-change="handlePageSizeChange"
|
|
|
+ ></el-pagination>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
@@ -551,13 +567,14 @@
|
|
|
import { memoManageMixin } from '@/views/costAudit/projectInfo/auditProjectManage/memoManage/memoManageMixin'
|
|
|
import { doProcessBtn } from '@/api/dataPreliminaryReview'
|
|
|
import { getReviewTaskList } from '@/api/audit/auditIndex'
|
|
|
- import { getChartList, getMsgList, getEnterpriseList } from '@/api/home'
|
|
|
+ import { getChartList, getMsgList } from '@/api/home'
|
|
|
import detailsDialog from '@/views/costAudit/auditInfo/auditManage/details.vue'
|
|
|
import mainDetailsDialog from '@/views/costAudit/auditInfo/auditManage/mainDetails.vue'
|
|
|
import taskInfo from '@/components/task/taskInfo.vue'
|
|
|
import cbjsInfo from '@/components/task/cbjsInfo.vue'
|
|
|
import taskDetail from '@/components/task/taskDetail.vue'
|
|
|
import TaskFillIn from '@/views/EntDeclaration/auditTaskManagement/taskFillIn.vue'
|
|
|
+ import { getTaskHandlingList } from '@/api/auditTaskProcessing'
|
|
|
export default {
|
|
|
name: 'Dashboard',
|
|
|
components: {
|
|
|
@@ -591,6 +608,11 @@
|
|
|
currentDate: new Date(),
|
|
|
selectedDate: '',
|
|
|
showTooltip: false,
|
|
|
+ pagination: {
|
|
|
+ page: 1,
|
|
|
+ pageSize: 50,
|
|
|
+ total: 0,
|
|
|
+ },
|
|
|
// 成本审核列表相关
|
|
|
currentPage: 1,
|
|
|
pageSize: 100,
|
|
|
@@ -661,7 +683,7 @@
|
|
|
},
|
|
|
// 待办事项搜索
|
|
|
handleTodoSearch() {
|
|
|
- this.currentPage = 1
|
|
|
+ this.pagination.page = 1
|
|
|
if (this.curOrg === '企业单位') {
|
|
|
this.getEnterpriseTodoList()
|
|
|
} else {
|
|
|
@@ -673,15 +695,16 @@
|
|
|
try {
|
|
|
this.loading = true
|
|
|
const params = {
|
|
|
- currentPage: this.currentPage,
|
|
|
- pageSize: this.pageSize,
|
|
|
+ pageNum: this.pagination.page,
|
|
|
+ pageSize: this.pagination.pageSize,
|
|
|
projectName: this.todoSearchQuery,
|
|
|
}
|
|
|
- const response = await getEnterpriseList(params)
|
|
|
+ const response = await getTaskHandlingList(params)
|
|
|
|
|
|
if (response.state && response.value) {
|
|
|
const records = response.value.records || []
|
|
|
this.todoList = records
|
|
|
+ this.pagination.total = response.value.total
|
|
|
}
|
|
|
} catch (error) {
|
|
|
console.error('获取企业待办列表失败:', error)
|
|
|
@@ -716,8 +739,8 @@
|
|
|
try {
|
|
|
this.loading = true
|
|
|
const params = {
|
|
|
- currentPage: this.currentPage,
|
|
|
- pageSize: this.pageSize,
|
|
|
+ pageNum: this.pagination.page,
|
|
|
+ pageSize: this.pagination.pageSize,
|
|
|
projectName: this.todoSearchQuery,
|
|
|
}
|
|
|
const response = await getReviewTaskList(params)
|
|
|
@@ -760,10 +783,17 @@
|
|
|
: [],
|
|
|
}
|
|
|
})
|
|
|
- this.total = response.value.total || 0
|
|
|
+ let parentIndex = 1
|
|
|
+ this.todoList.forEach((item) => {
|
|
|
+ if (item.pid == 0) {
|
|
|
+ item.parentIndex = parentIndex++
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ this.pagination.total = response.value.total || 0
|
|
|
} else {
|
|
|
this.todoList = []
|
|
|
- this.total = 0
|
|
|
+ this.pagination.total = 0
|
|
|
}
|
|
|
} catch (error) {
|
|
|
console.error('加载审核项目列表失败:', error)
|
|
|
@@ -773,14 +803,18 @@
|
|
|
},
|
|
|
// 获取父节点的连续序号
|
|
|
getParentNodeIndex(row) {
|
|
|
- // 过滤出所有父节点
|
|
|
- const parentNodes = this.todoList.filter(
|
|
|
- (item) => item.children && item.children.length > 0
|
|
|
- )
|
|
|
- // 找到当前行在父节点数组中的索引
|
|
|
- const index = parentNodes.findIndex((item) => item.id === row.id)
|
|
|
+ // // 过滤出所有父节点
|
|
|
+ // const parentNodes = this.todoList.filter(
|
|
|
+ // (item) => item.children && item.children.length > 0
|
|
|
+ // )
|
|
|
+ // // 找到当前行在父节点数组中的索引
|
|
|
+ // const index = parentNodes.findIndex((item) => item.id === row.id)
|
|
|
+ // // 返回序号(索引+1)
|
|
|
+ // return index + 1
|
|
|
+ // 找到当前行在 todoList 中的索引位置
|
|
|
+ const index = this.todoList.findIndex((item) => item.id === row.id)
|
|
|
// 返回序号(索引+1)
|
|
|
- return index + 1
|
|
|
+ return index + 1 || ''
|
|
|
},
|
|
|
// 获取来源类型文本
|
|
|
getSourceTypeText(type) {
|
|
|
@@ -1138,6 +1172,22 @@
|
|
|
addMemo() {
|
|
|
this.$message.info('添加新备忘录')
|
|
|
},
|
|
|
+ handlePageChange(page) {
|
|
|
+ this.pagination.page = page
|
|
|
+ if (this.curOrg === '企业单位') {
|
|
|
+ this.getEnterpriseTodoList()
|
|
|
+ } else {
|
|
|
+ this.loadAuditProjectList()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handlePageSizeChange(size) {
|
|
|
+ this.pagination.pageSize = size
|
|
|
+ if (this.curOrg === '企业单位') {
|
|
|
+ this.getEnterpriseTodoList()
|
|
|
+ } else {
|
|
|
+ this.loadAuditProjectList()
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
|
@@ -1436,4 +1486,7 @@
|
|
|
border-radius: 6px;
|
|
|
}
|
|
|
}
|
|
|
+ .pagination {
|
|
|
+ margin: 20px;
|
|
|
+ }
|
|
|
</style>
|