| | |
| | | this.fetchTabCounts(); // 新增:初始化时获取 tab 数据 |
| | | console.log('permission.tickets_processing_btn', this.permission.tickets_processing_btn); |
| | | console.log('permission', this.permission.tickets_tab_pending); |
| | | console.log('权限检查:', this.permission); |
| | | }, |
| | | mounted() { |
| | | this.fetchTableData(); |
| | |
| | | size: Number(this.page.pageSize), // 使用每页条数 |
| | | ai_type: this.filters.algorithm || undefined, // 添加算法参数 |
| | | // 添加 is_draft 参数,仅在"我发起的"标签页时设置为1 |
| | | is_draft: currentTab?.name === 'myTickets' ? 1 : undefined |
| | | is_draft: currentTab?.name === 'myTickets' ? 1 : undefined, |
| | | user_id: currentTab?.name === 'myTickets' ? this.userInfo.user_id : undefined, |
| | | }; |
| | | |
| | | const response = await getList(params); |
| | |
| | | let filteredRecords = records; |
| | | |
| | | // 如果是"我发起的"tab,过滤数据 |
| | | if (currentTab?.name === 'myTickets') { |
| | | filteredRecords = records.filter(item => |
| | | String(item.create_user_id) === String(item.user_id) |
| | | ); |
| | | } |
| | | // if (currentTab?.name === 'myTickets') { |
| | | // filteredRecords = records.filter(item => |
| | | // String(item.create_user_id) === String(item.user_id) |
| | | // ); |
| | | // } |
| | | |
| | | this.tableData = filteredRecords.map(item => { |
| | | const longitude = Number(item.longitude) || 0; |
| | |
| | | }); |
| | | |
| | | // 更新总数显示 |
| | | if (currentTab?.name === 'myTickets') { |
| | | this.page.total = filteredRecords.length; |
| | | } else { |
| | | this.page.total = total || 0; |
| | | } |
| | | this.page.total = total || 0; |
| | | |
| | | await this.fetchTabCounts(); |
| | | } catch (error) { |