提交 f993a303 authored 作者: 张烨's avatar 张烨

feat:市场准入限制增加状态列表接口调用

上级 d454ba89
......@@ -306,3 +306,11 @@ export function getNetProfit(params) {
params
})
}
// 获取调查进展状态列表
export function getAllProgressStatus() {
return request({
method: 'GET',
url: `/api/marketsearchHome/getAllInvestProgressStatus`,
})
}
\ No newline at end of file
<template>
<div class="view-box">
<el-empty v-if="!props.surveyList?.length" description="暂无数据" :image-size="100" />
<el-empty v-if="!props.surveyList?.length" description="暂无数据" style="padding-top: 200px;" :image-size="100" />
<div class="timeline-item" v-for="(item, index) in props.surveyList" :key="item.searchid" @click="onNavigateToDetail(item)">
<div class="timeline-date">
<div class="date-text">{{ item.searchdatezh.slice(0,4) }}</div>
......
......@@ -881,7 +881,7 @@ const handleGetSearchAllArea = async () => {
try {
const res = await getHylyList();
if (res.code === 200) {
surveyAreaList.value = res.data.map(item => ({ name: item.name, id: item.id }));
surveyAreaList.value = res.data;
}
} catch (error) {}
surveyAreaList.value.unshift({ name: "全部领域", id: "" });
......
......@@ -8,8 +8,7 @@
<div class="dropdown-filters">
<el-select v-model="filterStage" placeholder="全部阶段" class="filter-select" clearable>
<el-option label="全部阶段" value="" />
<el-option label="调查中" value="1" />
<el-option label="调查结束" value="0" />
<el-option v-for="item in stateList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
<!-- <el-select v-model="filterParty" placeholder="全部原告/被告" class="filter-select" clearable>
<el-option label="全部原告/被告" value="" />
......@@ -79,7 +78,12 @@
<script setup>
import { ref, onMounted, watch } from "vue";
import { Search } from "@element-plus/icons-vue";
import { getSearchAllArea, getSearchAllYear, getSurveyList } from "@/api/marketAccessRestrictions";
import {
getHylyList,
getSearchAllYear,
getSurveyList,
getAllProgressStatus,
} from "@/api/marketAccessRestrictions";
import SurveyHistory from "@/views/marketAccessRestrictions/com/SurveyHistory.vue"
import TimeSortSelectBox from '@/components/base/TimeSortSelectBox/index.vue';
......@@ -95,15 +99,23 @@ const handlePxChange = (event) => {
handleFetchSurveyList();
};
// 获取阶段列表
const stateList = ref([]);
const onAllProgressStatus = async () => {
try {
const res = await getAllProgressStatus();
console.log("阶段列表", res)
if (res.code === 200) stateList.value = res.data;
} catch (error) {}
}
// 科技领域过滤
const surveyAreaList = ref([]);
const checkedAreaList = ref(['']);
const handleGetSearchAllArea = async () => {
try {
const res = await getSearchAllArea({ sortCode: "232" });
if (res.code === 200) {
surveyAreaList.value = res.data.map(item => ({ name: item.AREANAME, id: item.AREACODE }));
}
const res = await getHylyList();
if (res.code === 200) surveyAreaList.value = res.data;
} catch (error) {}
surveyAreaList.value.unshift({ name: "全部领域", id: "" });
};
......@@ -159,7 +171,7 @@ const handleFetchSurveyList = async () => {
sortCode: "232",
publishYear: checkedYearList.value.join(',') || null,
Area: checkedAreaList.value.join(',') || null,
caseStatus: filterStage.value,
caseStatus: filterStage.value || null,
keywords: searchText.value || null,
sortField: "date",
sortOrder: isSort.value ? "desc" : "asc"
......@@ -168,8 +180,14 @@ const handleFetchSurveyList = async () => {
if (res.code === 200 && res.data) {
surveyInfoList.value = res.data.content;
totalDiscussNum.value = res.data.totalElements || 0;
} else {
surveyInfoList.value = []
totalDiscussNum.value = 0
}
} catch (error) {
surveyInfoList.value = []
totalDiscussNum.value = 0
}
} catch (error) {}
listLoading.value = false;
};
......@@ -190,8 +208,10 @@ watch([filterStage, filterParty, filterReason], () => {
handleFetchSurveyList();
});
onMounted(async () => {
await Promise.all([handleGetSearchAllArea(), handleGetSearchAllYear()]);
onMounted(() => {
onAllProgressStatus()
handleGetSearchAllArea()
handleGetSearchAllYear()
isInitializing.value = false;
handleFetchSurveyList();
});
......
......@@ -5,6 +5,12 @@
<div class="search-box">
<el-input v-model="searchText" style="width: 360px; height: 32px" placeholder="搜索调查案件" @keyup.enter="handleSearch" :suffix-icon="Search"></el-input>
</div>
<div class="dropdown-filters">
<el-select v-model="filterStage" placeholder="全部阶段" class="filter-select" clearable @change="handleSearch()">
<el-option label="全部阶段" value="" />
<el-option v-for="item in stateList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</div>
</div>
<TimeSortSelectBox @handle-px-change="handlePxChange"></TimeSortSelectBox>
</div>
......@@ -57,11 +63,17 @@
<script setup>
import { ref, onMounted, watch } from "vue";
import { Search } from "@element-plus/icons-vue";
import { getSearchAllArea, getSearchAllYear, getSurveyList } from "@/api/marketAccessRestrictions";
import {
getHylyList,
getSearchAllYear,
getSurveyList,
getAllProgressStatus,
} from "@/api/marketAccessRestrictions";
import SurveyHistory from "@/views/marketAccessRestrictions/com/SurveyHistory.vue"
import TimeSortSelectBox from '@/components/base/TimeSortSelectBox/index.vue';
const searchText = ref(''); // 搜索文本
const filterStage = ref("");
const isSort = ref(true);
const handlePxChange = (event) => {
isSort.value = event == 1;
......@@ -69,15 +81,23 @@ const handlePxChange = (event) => {
handleFetchSurveyList();
};
// 获取阶段列表
const stateList = ref([]);
const onAllProgressStatus = async () => {
try {
const res = await getAllProgressStatus();
console.log("阶段列表", res)
if (res.code === 200) stateList.value = res.data;
} catch (error) {}
}
// 科技领域过滤
const surveyAreaList = ref([]);
const checkedAreaList = ref(['']);
const handleGetSearchAllArea = async () => {
try {
const res = await getSearchAllArea({ sortCode: "301" });
if (res.code === 200) {
surveyAreaList.value = res.data.map(item => ({ name: item.AREANAME, id: item.AREACODE }));
}
const res = await getHylyList();
if (res.code === 200) surveyAreaList.value = res.data;
} catch (error) {}
surveyAreaList.value.unshift({ name: "全部领域", id: "" });
};
......@@ -133,6 +153,7 @@ const handleFetchSurveyList = async () => {
sortCode: "301",
publishYear: checkedYearList.value.join(',') || null,
Area: checkedAreaList.value.join(',') || null,
caseStatus: filterStage.value || null,
keywords: searchText.value || null,
sortField: "date",
sortOrder: isSort.value ? "desc" : "asc"
......@@ -141,8 +162,14 @@ const handleFetchSurveyList = async () => {
if (res.code === 200 && res.data) {
surveyInfoList.value = res.data.content;
totalDiscussNum.value = res.data.totalElements || 0;
} else {
surveyInfoList.value = []
totalDiscussNum.value = 0
}
} catch (error) {
surveyInfoList.value = []
totalDiscussNum.value = 0
}
} catch (error) {}
listLoading.value = false;
};
......@@ -156,8 +183,10 @@ const handleSearch = () => {
handleFetchSurveyList();
};
onMounted(async () => {
await Promise.all([handleGetSearchAllArea(), handleGetSearchAllYear()]);
onMounted(() => {
onAllProgressStatus()
handleGetSearchAllArea()
handleGetSearchAllYear()
isInitializing.value = false;
handleFetchSurveyList();
});
......
......@@ -8,8 +8,7 @@
<div class="dropdown-filters">
<el-select v-model="filterStage" placeholder="全部阶段" class="filter-select" clearable>
<el-option label="全部阶段" value="" />
<el-option label="调查中" value="1" />
<el-option label="调查结束" value="0" />
<el-option v-for="item in stateList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
<!-- <el-select v-model="filterParty" placeholder="全部原告/被告" class="filter-select" clearable>
<el-option label="全部原告/被告" value="" />
......@@ -80,7 +79,13 @@
<script setup>
import { ref, onMounted, watch } from "vue";
import { Search } from "@element-plus/icons-vue";
import { getSearchAllArea, getSearchAllYear, getSurveyList, getSearchAllCountry } from "@/api/marketAccessRestrictions";
import {
getHylyList,
getSearchAllYear,
getSurveyList,
getSearchAllCountry,
getAllProgressStatus,
} from "@/api/marketAccessRestrictions";
import AnalysisBox from "@/components/base/boxBackground/analysisBox.vue"
import SurveyHistory from "@/views/marketAccessRestrictions/com/SurveyHistory.vue"
......@@ -98,15 +103,23 @@ const handlePxChange = (event) => {
handleFetchSurveyList();
};
// 获取阶段列表
const stateList = ref([]);
const onAllProgressStatus = async () => {
try {
const res = await getAllProgressStatus();
console.log("阶段列表", res)
if (res.code === 200) stateList.value = res.data;
} catch (error) {}
}
// 科技领域过滤
const surveyAreaList = ref([]);
const checkedAreaList = ref(['']);
const handleGetSearchAllArea = async () => {
try {
const res = await getSearchAllArea({ sortCode: "337" });
if (res.code === 200) {
surveyAreaList.value = res.data.map(item => ({ name: item.AREANAME, id: item.AREACODE }));
}
const res = await getHylyList();
if (res.code === 200) surveyAreaList.value = res.data;
} catch (error) {}
surveyAreaList.value.unshift({ name: "全部领域", id: "" });
};
......@@ -194,8 +207,14 @@ const handleFetchSurveyList = async () => {
if (res.code === 200) {
surveyInfoList.value = res.data?.content || [];
totalDiscussNum.value = res.data?.totalElements || 0;
} else {
surveyInfoList.value = []
totalDiscussNum.value = 0
}
} catch (error) {
surveyInfoList.value = []
totalDiscussNum.value = 0
}
} catch (error) {}
listLoading.value = false;
};
......@@ -216,8 +235,11 @@ watch([filterStage, filterParty, filterReason], () => {
handleFetchSurveyList();
});
onMounted(async () => {
await Promise.all([handleGetSearchAllArea(), handleGetSearchAllYear(), handleGetSearchAllCountry()]);
onMounted(() => {
onAllProgressStatus()
handleGetSearchAllArea()
handleGetSearchAllYear()
handleGetSearchAllCountry()
isInitializing.value = false;
handleFetchSurveyList();
});
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论