zhouwenxuan
2024-01-24 20195d0e1cbbf3e8bfd20e2baf53e2115f663da3
src/views/safetyReview/projectManage/index.vue
@@ -230,6 +230,7 @@
import {getRegionTree} from "@/api/area";
import {getDict} from "@/api/login";
import {getDictList} from "@/api/backManage/evaluate";
import Cookies from "js-cookie"
const router = useRouter();
const loading = ref(false);
@@ -252,8 +253,8 @@
    district: '',
    business: '',
    estimateType: '',
    phase: '',
    params:{
      projectPhase: '',
      lostMaterial: null
    }
  },
@@ -287,6 +288,7 @@
const total = ref(0);
onMounted(() => {
  Cookies.remove('projectId')
  getList();
  getStatistics();
  getArea();
@@ -302,12 +304,11 @@
const chooseType = ref('');
const choose = (val) => {
  chooseType.value = val;
  search.queryParams.params.projectPhase = val;
  search.queryParams.phase = val;
  getList();
}
const getList = async () => {
  loading.value = true;
  console.log(search.queryParams,'search.queryParams')
  const res = await getProjectList(search.queryParams);
  if(res.code == 200){
    dataList.value = res.data.list.map(item => {
@@ -329,12 +330,9 @@
}
const getStatistics = async () => {
  const {pageNum,pageSize, ...data} = JSON.parse(JSON.stringify(search.queryParams))
  console.log("data",data)
  const res = await getProjectStatistics(data);
  if(res.code == 200){
   console.log("res统计",res)
    search.num = res.data
  }else{
    ElMessage.warning(res.message)
  }
@@ -429,8 +427,12 @@
    district: '',
    business: '',
    estimateType: '',
    phase: '',
    params: {
      lostMaterial: null
    }
  }
  search.queryParams.params = {}
  chooseType.value = '';
  getList();
  getStatistics();
  showDrawer.value = false;