备份:大改造前的完整版本 - 修复合同细节/付款节点/文件上传/施工管理/项目保存等BUG

This commit is contained in:
root
2026-05-15 12:02:24 +08:00
parent 1cad1e438d
commit fad28741bd
6157 changed files with 5147 additions and 877912 deletions
+3 -5
View File
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
import { useNavigate } from 'react-router-dom';
import { Card, Typography, Button, Space, Table, Tag, message, Spin, Modal, Input } from 'antd';
import { PlusOutlined, DeleteOutlined } from '@ant-design/icons';
import axios from 'axios';
import apiClient from '../../utils/request';
import { useAuthStore } from '../../store/authStore';
const { Title, Paragraph } = Typography;
@@ -52,9 +52,7 @@ const ProjectsPage: React.FC = () => {
const fetchProjects = async () => {
try {
console.log('开始获取项目列表...');
const response = await axios.get('/api/projects');
console.log('API响应:', response.data);
const response = await apiClient.get('/projects');
if (response.data.success) {
setProjects(response.data.data.map((p: Project) => ({
...p,
@@ -93,7 +91,7 @@ const ProjectsPage: React.FC = () => {
setDeleteLoading(true);
try {
const response = await axios.delete(`/api/projects/${deleteProjectId}`, {
const response = await apiClient.delete(`/projects/${deleteProjectId}`, {
headers: {
'x-user-role': 'admin'
}