|
|
@@ -3,11 +3,11 @@
|
|
|
<!-- 搜索+筛选栏 -->
|
|
|
<view class="top-box">
|
|
|
<view class="input-item">
|
|
|
- <image class="icon search-icon" src="@/static/image/search.png" mode="widthFix"></image>
|
|
|
+ <image class="icon search-icon" src="/static/image/search.png" mode="widthFix"></image>
|
|
|
<input placeholder="请输入客户姓名/机构名称" placeholder-class="placeholder" />
|
|
|
</view>
|
|
|
<view class="filter-item" @click="showFilter = true">
|
|
|
- <image class="filter-icon" src="@/static/image/icon_select.png" mode="widthFix"></image>
|
|
|
+ <image class="filter-icon" src="/static/image/icon_select.png" mode="widthFix"></image>
|
|
|
<text>筛选</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -31,7 +31,7 @@
|
|
|
</view>
|
|
|
|
|
|
<!-- 列表内容 -->
|
|
|
- <scroll-view class="content" scroll-y>
|
|
|
+ <scroll-view class="content" scroll-y @scrolltolower="loadMore" @refresherrefresh="refresh" refresher-enabled="true" refresher-threshold="80" refresher-default-style="black">
|
|
|
<!-- 任务列表 -->
|
|
|
<view v-if="currentTopTab === 'task'">
|
|
|
<view class="task-card" v-for="(item, index) in currentList" :key="index" @click="goDetails(item)">
|
|
|
@@ -50,7 +50,7 @@
|
|
|
|
|
|
<!-- 医院+科室 -->
|
|
|
<view class="org-info">
|
|
|
- <image class="org-icon" src="@/static/image/icon_hospital.png" mode="widthFix"></image>
|
|
|
+ <image class="org-icon" src="/static/image/icon_hospital.png" mode="widthFix"></image>
|
|
|
<text>{{ item.deptName ||'-' }}</text>
|
|
|
<view class="line"></view>
|
|
|
<text>{{ item.deptName||'-' }}</text>
|
|
|
@@ -60,7 +60,7 @@
|
|
|
<view class="card-tags">
|
|
|
<view class="tag-left-group">
|
|
|
<view class="tag-item video-tag" v-if="item.taskTypeName">
|
|
|
- <image class="video-tag-icon" src="@/static/image/icon_longvideo.png" mode="widthFix">
|
|
|
+ <image class="video-tag-icon" src="/static/image/icon_longvideo.png" mode="widthFix">
|
|
|
</image>
|
|
|
<text>{{ item.taskTypeName ||'-'}}</text>
|
|
|
</view>
|
|
|
@@ -129,7 +129,7 @@
|
|
|
|
|
|
<!-- 医院+科室 -->
|
|
|
<view class="org-info">
|
|
|
- <image class="org-icon" src="@/static/image/icon_hospital.png" mode="widthFix"></image>
|
|
|
+ <image class="org-icon" src="/static/image/icon_hospital.png" mode="widthFix"></image>
|
|
|
<text>{{ item.businessData.taskInfo.doctorVO.institution ||'-' }}</text>
|
|
|
<view class="line"></view>
|
|
|
<text>{{ item.businessData.taskInfo.doctorVO.department||'-' }}</text>
|
|
|
@@ -139,7 +139,7 @@
|
|
|
<view class="card-tags">
|
|
|
<view class="tag-left-group">
|
|
|
<view class="tag-item video-tag" v-if="item.businessData.taskInfo.taskTypeName">
|
|
|
- <image class="video-tag-icon" src="@/static/image/icon_longvideo.png" mode="widthFix">
|
|
|
+ <image class="video-tag-icon" src="/static/image/icon_longvideo.png" mode="widthFix">
|
|
|
</image>
|
|
|
<text>{{ item.businessData.taskInfo.taskTypeName ||'-'}}</text>
|
|
|
</view>
|
|
|
@@ -167,7 +167,7 @@
|
|
|
<!-- 操作按钮 -->
|
|
|
<view class="operate-btn-group">
|
|
|
<view class="share-btn" @click="handleShare(item)">
|
|
|
- <image class="share-icon" src="@/static/image/icon_user.png" mode="widthFix"></image>
|
|
|
+ <image class="share-icon" src="/static/image/icon_user.png" mode="widthFix"></image>
|
|
|
<text>{{ item.initiatorName || '未命名' }}</text>
|
|
|
</view>
|
|
|
<view class="btn-group">
|
|
|
@@ -196,7 +196,7 @@
|
|
|
<view class="filter-content" @click.stop>
|
|
|
<view class="filter-header">
|
|
|
<view class="filter-title">筛选</view>
|
|
|
- <image class="filter-close-btn" src="@/static/image/icon_close.png" @click="closeFilter"
|
|
|
+ <image class="filter-close-btn" src="/static/image/icon_close.png" @click="closeFilter"
|
|
|
mode="widthFix"></image>
|
|
|
</view>
|
|
|
|
|
|
@@ -330,12 +330,23 @@ import { getPendingAuditList } from '@/api/audit.js';
|
|
|
taskBelong: [],
|
|
|
taskType: [],
|
|
|
taskAuditStatus: [],
|
|
|
- auditStatus: []
|
|
|
+ auditStatus: [],
|
|
|
+ // 分页参数
|
|
|
+ page: 1,
|
|
|
+ pageSize: 20,
|
|
|
+ hasMore: true,
|
|
|
+ auditPage: 1,
|
|
|
+ auditPageSize: 20,
|
|
|
+ auditHasMore: true,
|
|
|
+ // 加载状态
|
|
|
+ isLoadingMore: false
|
|
|
}
|
|
|
},
|
|
|
onLoad: async function(options) {
|
|
|
// 先获取用户信息
|
|
|
- this.userInfo = JSON.parse(uni.getStorageSync('userInfo') || '{}');
|
|
|
+ this.userInfo =uni.getStorageSync('userInfo') || '{}';
|
|
|
+ // this.userInfo = JSON.parse(uni.getStorageSync('userInfo') || '{}');
|
|
|
+
|
|
|
|
|
|
try {
|
|
|
// 并行获取所有字典数据,提高性能
|
|
|
@@ -404,84 +415,100 @@ import { getPendingAuditList } from '@/api/audit.js';
|
|
|
});}})},
|
|
|
|
|
|
//审批列表
|
|
|
- getAuditList() {
|
|
|
- // 构建请求参数
|
|
|
- const params = {
|
|
|
- userId: this.userInfo.userId,
|
|
|
- taskStatus: this.currentSubTab || '',
|
|
|
- status:'',
|
|
|
- companyId:this.userInfo.companyId,
|
|
|
- templateCode: this.templateCode||'',
|
|
|
- pageNum:1,
|
|
|
- pageSize:10,
|
|
|
- // 任务申请时间
|
|
|
- applyStartTime: this.filters.applyTimeStart || '',
|
|
|
- applyEndTime: this.filters.applyTimeEnd || '',
|
|
|
- // 任务完成时间
|
|
|
- taskFinishTimeStart: this.filters.finishTimeStart || '',
|
|
|
- taskFinishTimeEnd: this.filters.finishTimeEnd || '',
|
|
|
- // 任务完成审核时间
|
|
|
- finishAuditTimeStart: this.filters.auditTimeStart || '',
|
|
|
- finishAuditTimeEnd: this.filters.auditTimeEnd || '',
|
|
|
- // 完结状态
|
|
|
- finishStatus: this.filters.finishStatus === 'unfinished' ? 0 : this.filters.finishStatus === 'finished' ? 1 : ''
|
|
|
- };
|
|
|
-
|
|
|
- // 避免重复请求
|
|
|
- if (this.isLoading) return;
|
|
|
-
|
|
|
- this.isLoading = true;
|
|
|
- uni.showLoading({
|
|
|
- title: '加载中...'
|
|
|
- });
|
|
|
-
|
|
|
- getPendingAuditList(params).then(res => {
|
|
|
- this.isLoading = false;
|
|
|
- uni.hideLoading();
|
|
|
- if (res.code === 200 && res.rows) {
|
|
|
- // 处理审核列表数据
|
|
|
- this.auditList = res.rows.map(item => {
|
|
|
- // 从businessData.taskInfo中获取任务信息
|
|
|
- const taskInfo = item.businessData?.taskInfo || {};
|
|
|
- return {
|
|
|
- id: item.id,
|
|
|
- auditName: item.auditName,
|
|
|
- initiatorName: taskInfo.doctorName || item.initiatorName || '未知',
|
|
|
- createTime: item.createTime,
|
|
|
- statusText: this.getAuditStatusText(item.status),
|
|
|
- statusClass: this.getAuditStatusClass(item.status),
|
|
|
- doctorName: taskInfo.doctorName || item.initiatorName || '未知',
|
|
|
- initiatorId: item.initiatorId || '',
|
|
|
- sealImg: item.status === 1 ? '/static/image/img_finish.png' : '/static/image/img_unfinish.png',
|
|
|
- businessData: item.businessData || {},
|
|
|
- // 从taskInfo中获取其他需要的字段
|
|
|
- taskTitle: taskInfo.taskName || item.auditName,
|
|
|
- hospital: taskInfo.deptName || '-',
|
|
|
- department: taskInfo.deptName || '-',
|
|
|
- videoType: taskInfo.taskTypeName || '-',
|
|
|
- category: taskInfo.taskTypeName || '-',
|
|
|
- points: taskInfo.taskIntegral || 0,
|
|
|
- count: taskInfo.taskCount || 0,
|
|
|
- applyTime: item.createTime
|
|
|
- };
|
|
|
+ getAuditList() {
|
|
|
+ // 构建请求参数
|
|
|
+ const params = {
|
|
|
+ userId: this.userInfo.userId,
|
|
|
+ taskStatus: this.currentSubTab || '',
|
|
|
+ status:'',
|
|
|
+ companyId:this.userInfo.companyId,
|
|
|
+ templateCode: this.templateCode||'',
|
|
|
+ pageNum: this.auditPage,
|
|
|
+ pageSize: this.auditPageSize,
|
|
|
+ // 任务申请时间
|
|
|
+ applyStartTime: this.filters.applyTimeStart || '',
|
|
|
+ applyEndTime: this.filters.applyTimeEnd || '',
|
|
|
+ // 任务完成时间
|
|
|
+ taskFinishTimeStart: this.filters.finishTimeStart || '',
|
|
|
+ taskFinishTimeEnd: this.filters.finishTimeEnd || '',
|
|
|
+ // 任务完成审核时间
|
|
|
+ finishAuditTimeStart: this.filters.auditTimeStart || '',
|
|
|
+ finishAuditTimeEnd: this.filters.auditTimeEnd || '',
|
|
|
+ // 完结状态
|
|
|
+ finishStatus: this.filters.finishStatus === 'unfinished' ? 0 : this.filters.finishStatus === 'finished' ? 1 : ''
|
|
|
+ };
|
|
|
+
|
|
|
+ // 避免重复请求
|
|
|
+ if (this.isLoading) return;
|
|
|
+
|
|
|
+ this.isLoading = true;
|
|
|
+ if (!this.isLoadingMore) {
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中...'
|
|
|
});
|
|
|
- console.log("审核列表数据",this.auditList);
|
|
|
-
|
|
|
-
|
|
|
- } else {
|
|
|
+ }
|
|
|
+
|
|
|
+ getPendingAuditList(params).then(res => {
|
|
|
+ this.isLoading = false;
|
|
|
+ this.isLoadingMore = false;
|
|
|
+ uni.hideLoading();
|
|
|
+ if (res.code === 200 && res.rows) {
|
|
|
+ // 处理审核列表数据
|
|
|
+ const newAuditList = res.rows.map(item => {
|
|
|
+ // 从businessData.taskInfo中获取任务信息
|
|
|
+ const taskInfo = item.businessData?.taskInfo || {};
|
|
|
+ return {
|
|
|
+ id: item.id,
|
|
|
+ auditName: item.auditName,
|
|
|
+ initiatorName: taskInfo.doctorName || item.initiatorName || '未知',
|
|
|
+ createTime: item.createTime,
|
|
|
+ statusText: this.getAuditStatusText(item.status),
|
|
|
+ statusClass: this.getAuditStatusClass(item.status),
|
|
|
+ doctorName: taskInfo.doctorName || item.initiatorName || '未知',
|
|
|
+ initiatorId: item.initiatorId || '',
|
|
|
+ sealImg: item.status === 1 ? '/static/image/img_finish.png' : '/static/image/img_unfinish.png',
|
|
|
+ businessData: item.businessData || {},
|
|
|
+ // 从taskInfo中获取其他需要的字段
|
|
|
+ taskTitle: taskInfo.taskName || item.auditName,
|
|
|
+ hospital: taskInfo.deptName || '-',
|
|
|
+ department: taskInfo.deptName || '-',
|
|
|
+ videoType: taskInfo.taskTypeName || '-',
|
|
|
+ category: taskInfo.taskTypeName || '-',
|
|
|
+ points: taskInfo.taskIntegral || 0,
|
|
|
+ count: taskInfo.taskCount || 0,
|
|
|
+ applyTime: item.createTime
|
|
|
+ };
|
|
|
+ });
|
|
|
+ // 如果是加载更多,则追加数据
|
|
|
+ if (this.isLoadingMore) {
|
|
|
+ this.auditList = [...this.auditList, ...newAuditList];
|
|
|
+ } else {
|
|
|
+ // 否则替换数据
|
|
|
+ this.auditList = newAuditList;
|
|
|
+ }
|
|
|
+ // 判断是否还有更多数据
|
|
|
+ this.auditHasMore = res.rows.length === this.auditPageSize;
|
|
|
+ console.log("审核列表数据",this.auditList);
|
|
|
+ } else {
|
|
|
+ // 如果是加载更多,则保持原有数据
|
|
|
+ if (!this.isLoadingMore) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '获取数据失败',
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.auditHasMore = false;
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ this.isLoading = false;
|
|
|
+ this.isLoadingMore = false;
|
|
|
+ uni.hideLoading();
|
|
|
uni.showToast({
|
|
|
- title: '获取数据失败',
|
|
|
+ title: '网络错误',
|
|
|
icon: 'none'
|
|
|
});
|
|
|
- }
|
|
|
- }).catch(err => {
|
|
|
- uni.hideLoading();
|
|
|
- uni.showToast({
|
|
|
- title: '网络错误',
|
|
|
- icon: 'none'
|
|
|
});
|
|
|
- });
|
|
|
- },
|
|
|
+ },
|
|
|
dicts() {
|
|
|
dicts('task_status').then(res => {
|
|
|
if (res.code === 200 ) {
|
|
|
@@ -501,74 +528,127 @@ import { getPendingAuditList } from '@/api/audit.js';
|
|
|
});
|
|
|
},
|
|
|
loadData() {
|
|
|
- // 根据当前标签加载对应数据
|
|
|
- if (this.currentTopTab === 'task') {
|
|
|
- this.getTaskList();
|
|
|
- } else if (this.currentTopTab === 'audit') {
|
|
|
- this.getAuditList();
|
|
|
- }
|
|
|
- // 只在首次加载时获取公司项目设置
|
|
|
- if (!this.companySettingsLoaded) {
|
|
|
- this.getCompanySettings();
|
|
|
- this.companySettingsLoaded = true;
|
|
|
- }
|
|
|
- },
|
|
|
+ // 根据当前标签加载对应数据
|
|
|
+ if (this.currentTopTab === 'task') {
|
|
|
+ this.getTaskList();
|
|
|
+ } else if (this.currentTopTab === 'audit') {
|
|
|
+ this.getAuditList();
|
|
|
+ }
|
|
|
+ // 只在首次加载时获取公司项目设置
|
|
|
+ if (!this.companySettingsLoaded) {
|
|
|
+ this.getCompanySettings();
|
|
|
+ this.companySettingsLoaded = true;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 下拉刷新
|
|
|
+ refresh() {
|
|
|
+ // 重置分页参数
|
|
|
+ if (this.currentTopTab === 'task') {
|
|
|
+ this.page = 1;
|
|
|
+ this.hasMore = true;
|
|
|
+ this.taskList = [];
|
|
|
+ } else if (this.currentTopTab === 'audit') {
|
|
|
+ this.auditPage = 1;
|
|
|
+ this.auditHasMore = true;
|
|
|
+ this.auditList = [];
|
|
|
+ }
|
|
|
+ // 重新加载数据
|
|
|
+ this.loadData();
|
|
|
+ },
|
|
|
+ // 加载更多
|
|
|
+ loadMore() {
|
|
|
+ // 检查是否正在加载或没有更多数据
|
|
|
+ if (this.isLoading || this.isLoadingMore) return;
|
|
|
+
|
|
|
+ if (this.currentTopTab === 'task') {
|
|
|
+ if (!this.hasMore) return;
|
|
|
+ // 增加页码并加载更多
|
|
|
+ this.page++;
|
|
|
+ this.isLoadingMore = true;
|
|
|
+ this.getTaskList();
|
|
|
+ } else if (this.currentTopTab === 'audit') {
|
|
|
+ if (!this.auditHasMore) return;
|
|
|
+ // 增加页码并加载更多
|
|
|
+ this.auditPage++;
|
|
|
+ this.isLoadingMore = true;
|
|
|
+ this.getAuditList();
|
|
|
+ }
|
|
|
+ },
|
|
|
//任务列表
|
|
|
- getTaskList() {
|
|
|
- // 构建请求参数
|
|
|
- const params = {
|
|
|
- ...this.filters,
|
|
|
- type: this.currentTopTab,
|
|
|
- taskStatus: this.currentSubTab
|
|
|
- };
|
|
|
-
|
|
|
- // 避免重复请求
|
|
|
- if (this.isLoading) return;
|
|
|
-
|
|
|
- this.isLoading = true;
|
|
|
- uni.showLoading({
|
|
|
- title: '加载中...'
|
|
|
- });
|
|
|
-
|
|
|
- list(params).then(res => {
|
|
|
- this.isLoading = false;
|
|
|
- uni.hideLoading();
|
|
|
- if (res.code === 200 && res.rows) {
|
|
|
- // 处理任务列表数据
|
|
|
- this.taskList = res.rows.map(item => ({
|
|
|
- id: item.id,
|
|
|
- doctorName: item.doctorName,
|
|
|
- taskName: item.taskName,
|
|
|
- statusText: this.getStatusText(item.taskStatus),
|
|
|
- statusClass: this.getStatusClass(item.taskStatus),
|
|
|
- level: '', // 接口返回数据中没有level字段
|
|
|
- deptName: item.deptName, // 使用deptName作为deptName
|
|
|
- taskTypeName: item.taskTypeName,
|
|
|
- taskIntegral: item.taskIntegral,
|
|
|
- taskCount: item.taskCount,
|
|
|
- createTime: item.createTime,
|
|
|
- finishAuditTime: item.finishAuditTime || '-',
|
|
|
- auditStatus: this.getAuditStatusText(item.finishAuditStatus),
|
|
|
- showDelete: true,
|
|
|
- sealImg: item.taskStatus === 1 ? '/static/image/img_finish.png' : '/static/image/img_unfinish.png',
|
|
|
- finishAuditInstanceId: item.finishAuditInstanceId || '-',
|
|
|
- createAuditInstanceId: item.createAuditInstanceId || '-',
|
|
|
- }));
|
|
|
- } else {
|
|
|
- uni.showToast({
|
|
|
- title: '获取数据失败',
|
|
|
- icon: 'none'
|
|
|
+ getTaskList() {
|
|
|
+ // 构建请求参数
|
|
|
+ const params = {
|
|
|
+ ...this.filters,
|
|
|
+ type: this.currentTopTab,
|
|
|
+ taskStatus: this.currentSubTab,
|
|
|
+ page: this.page,
|
|
|
+ pageSize: this.pageSize
|
|
|
+ };
|
|
|
+
|
|
|
+ // 避免重复请求
|
|
|
+ if (this.isLoading) return;
|
|
|
+
|
|
|
+ this.isLoading = true;
|
|
|
+ if (!this.isLoadingMore) {
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中...'
|
|
|
});
|
|
|
}
|
|
|
- }).catch(err => {
|
|
|
- this.isLoading = false;
|
|
|
- uni.hideLoading();
|
|
|
- uni.showToast({
|
|
|
- title: '网络错误',
|
|
|
- icon: 'none'
|
|
|
+
|
|
|
+ list(params).then(res => {
|
|
|
+ this.isLoading = false;
|
|
|
+ this.isLoadingMore = false;
|
|
|
+ uni.hideLoading();
|
|
|
+ if (res.code === 200 && res.rows) {
|
|
|
+ // 处理任务列表数据
|
|
|
+ const newTaskList = res.rows.map(item => ({
|
|
|
+ id: item.id,
|
|
|
+ doctorName: item.doctorName,
|
|
|
+ taskName: item.taskName,
|
|
|
+ statusText: this.getStatusText(item.taskStatus),
|
|
|
+ statusClass: this.getStatusClass(item.taskStatus),
|
|
|
+ level: '', // 接口返回数据中没有level字段
|
|
|
+ deptName: item.deptName, // 使用deptName作为deptName
|
|
|
+ taskTypeName: item.taskTypeName,
|
|
|
+ taskIntegral: item.taskIntegral,
|
|
|
+ taskCount: item.taskCount,
|
|
|
+ createTime: item.createTime,
|
|
|
+ finishAuditTime: item.finishAuditTime || '-',
|
|
|
+ auditStatus: this.getAuditStatusText(item.finishAuditStatus),
|
|
|
+ showDelete: true,
|
|
|
+ sealImg: item.taskStatus === 1 ? '/static/image/img_finish.png' : '/static/image/img_unfinish.png',
|
|
|
+ finishAuditInstanceId: item.finishAuditInstanceId || '-',
|
|
|
+ createAuditInstanceId: item.createAuditInstanceId || '-',
|
|
|
+ }));
|
|
|
+ // 如果是加载更多,则追加数据
|
|
|
+ if (this.isLoadingMore) {
|
|
|
+ this.taskList = [...this.taskList, ...newTaskList];
|
|
|
+ } else {
|
|
|
+ // 否则替换数据
|
|
|
+ this.taskList = newTaskList;
|
|
|
+ }
|
|
|
+ // 判断是否还有更多数据
|
|
|
+ this.hasMore = res.rows.length === this.pageSize;
|
|
|
+ } else {
|
|
|
+ // 如果是加载更多,则保持原有数据
|
|
|
+ if (!this.isLoadingMore) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '获取数据失败',
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.hasMore = false;
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ this.isLoading = false;
|
|
|
+ this.isLoadingMore = false;
|
|
|
+ uni.hideLoading();
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '网络错误'
|
|
|
+ });
|
|
|
});
|
|
|
- });
|
|
|
- },
|
|
|
+ },
|
|
|
getCompanySettings() {
|
|
|
// 获取公司项目设置
|
|
|
if (this.userInfo.companyId) {
|
|
|
@@ -659,24 +739,36 @@ import { getPendingAuditList } from '@/api/audit.js';
|
|
|
});
|
|
|
},
|
|
|
selectSubTab(value) {
|
|
|
- this.currentSubTab = value;
|
|
|
- // 根据当前的 topTab 类型调用对应的方法
|
|
|
- if (this.currentTopTab === 'task') {
|
|
|
- this.getTaskList();
|
|
|
- } else if (this.currentTopTab === 'audit') {
|
|
|
- this.getAuditList();
|
|
|
- }
|
|
|
- },
|
|
|
+ this.currentSubTab = value;
|
|
|
+ // 重置分页参数
|
|
|
+ if (this.currentTopTab === 'task') {
|
|
|
+ this.page = 1;
|
|
|
+ this.hasMore = true;
|
|
|
+ this.taskList = [];
|
|
|
+ this.getTaskList();
|
|
|
+ } else if (this.currentTopTab === 'audit') {
|
|
|
+ this.auditPage = 1;
|
|
|
+ this.auditHasMore = true;
|
|
|
+ this.auditList = [];
|
|
|
+ this.getAuditList();
|
|
|
+ }
|
|
|
+ },
|
|
|
switchTopTab(type) {
|
|
|
- this.currentTopTab = type;
|
|
|
- this.currentSubTab = '';
|
|
|
- // 根据标签类型调用相应的加载方法
|
|
|
- if (type === 'task') {
|
|
|
- this.getTaskList();
|
|
|
- } else if (type === 'audit') {
|
|
|
- this.getAuditList();
|
|
|
- }
|
|
|
- },
|
|
|
+ this.currentTopTab = type;
|
|
|
+ this.currentSubTab = '';
|
|
|
+ // 重置分页参数
|
|
|
+ if (type === 'task') {
|
|
|
+ this.page = 1;
|
|
|
+ this.hasMore = true;
|
|
|
+ this.taskList = [];
|
|
|
+ this.getTaskList();
|
|
|
+ } else if (type === 'audit') {
|
|
|
+ this.auditPage = 1;
|
|
|
+ this.auditHasMore = true;
|
|
|
+ this.auditList = [];
|
|
|
+ this.getAuditList();
|
|
|
+ }
|
|
|
+ },
|
|
|
closeFilter() {
|
|
|
this.showFilter = false
|
|
|
},
|