提交 480bc53b authored 作者: coderBryanFu's avatar coderBryanFu

feat:更新数据资源库

上级 57a3db48
...@@ -18,3 +18,10 @@ export function getThinkTankList() { ...@@ -18,3 +18,10 @@ export function getThinkTankList() {
url: `/temporarySearch/search-info/all-organization-names`, url: `/temporarySearch/search-info/all-organization-names`,
}) })
} }
export function getStatusList() {
return request({
method: 'GET',
url: `/temporarySearch/search-info/dBillStage`,
})
}
\ No newline at end of file
...@@ -165,7 +165,7 @@ import { useRoute } from "vue-router"; ...@@ -165,7 +165,7 @@ import { useRoute } from "vue-router";
import router from '@/router' import router from '@/router'
import { getPostOrgList, getPostMemberList } from '@/api/bill/billHome' import { getPostOrgList, getPostMemberList } from '@/api/bill/billHome'
import { search } from '@/api/comprehensiveSearch' import { search, getStatusList } from '@/api/comprehensiveSearch'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import getDateRange from '@/utils/getDateRange' import getDateRange from '@/utils/getDateRange'
...@@ -345,10 +345,13 @@ const activeTagList = computed(() => { ...@@ -345,10 +345,13 @@ const activeTagList = computed(() => {
) )
} }
if (selectedStatus.value && selectedStatus.value !== '全部阶段') { if (selectedStatus.value && selectedStatus.value !== '全部阶段') {
const statusName = statusList.value.filter(item => {
return item.id === selectedStatus.value
})[0].name
arr.push( arr.push(
{ {
tag: '所处阶段', tag: '所处阶段',
name: selectedStatus.value name: statusName
} }
) )
} }
...@@ -711,6 +714,31 @@ const statusList = ref([ ...@@ -711,6 +714,31 @@ const statusList = ref([
}, },
]) ])
const handleGetStatusList = async () => {
try {
const res = await getStatusList()
console.log('获取立法阶段列表', res);
if (res.code === 200) {
const arr = res.data.map(item => {
return {
name: item.name,
id: item.number
}
})
statusList.value = [
{
name: '全部阶段',
id: '全部阶段'
},
...arr
]
}
} catch (error) {
}
}
const selectedStatus = ref('全部阶段') const selectedStatus = ref('全部阶段')
const statusPlaceHolder = ref('请选择立法阶段') const statusPlaceHolder = ref('请选择立法阶段')
const handleSelectStauts = value => { const handleSelectStauts = value => {
...@@ -737,6 +765,7 @@ const handleClear = () => { ...@@ -737,6 +765,7 @@ const handleClear = () => {
// 确定 // 确定
const handleConfirm = () => { const handleConfirm = () => {
currentPage.value = 1
fetchTableData() fetchTableData()
} }
...@@ -785,6 +814,9 @@ const fetchTableData = async () => { ...@@ -785,6 +814,9 @@ const fetchTableData = async () => {
// isSelectedAll.value = false // isSelectedAll.value = false
// selectedMap.value.clear() // selectedMap.value.clear()
// 调用接口获取数据... // 调用接口获取数据...
loading.value = true
const params = { const params = {
page: currentPage.value, page: currentPage.value,
size: pageSize.value, size: pageSize.value,
...@@ -843,12 +875,10 @@ const fetchTableData = async () => { ...@@ -843,12 +875,10 @@ const fetchTableData = async () => {
activeChart.value = curDemensionItem.chartTypeList[0] activeChart.value = curDemensionItem.chartTypeList[0]
curChartData.value = curDemensionItem.data curChartData.value = curDemensionItem.data
}) })
loading.value = false
} catch (error) { } catch (error) {
loading.value = false
} }
// tableData.value = res.data // tableData.value = res.data
// total.value = res.total // total.value = res.total
...@@ -867,6 +897,12 @@ const allData = ref([]) ...@@ -867,6 +897,12 @@ const allData = ref([])
// 获取筛选条件下全部表格数据 // 获取筛选条件下全部表格数据
const fetchAllData = async () => { const fetchAllData = async () => {
let statusParam = null
if (selectedStatus.value !== '全部阶段') {
statusParam = statusList.value.filter(item => {
return item.name === selectedStatus.value
})[0].id
}
const params = { const params = {
page: 1, page: 1,
size: 9999, size: 9999,
...@@ -879,7 +915,7 @@ const fetchAllData = async () => { ...@@ -879,7 +915,7 @@ const fetchAllData = async () => {
originChamber: selectedCongress.value === '全部议院' ? null : selectedCongress.value, originChamber: selectedCongress.value === '全部议院' ? null : selectedCongress.value,
originDepart: selectedOrg.value === '全部委员会' ? null : selectedOrg.value, originDepart: selectedOrg.value === '全部委员会' ? null : selectedOrg.value,
sponsorPersonName: selectedmember.value === '全部议员' ? null : selectedmember.value, sponsorPersonName: selectedmember.value === '全部议员' ? null : selectedmember.value,
status: selectedStatus.value === '通过' ? 1 : 0, status: selectedStatus.value === '全部阶段' ? null : selectedStatus.value,
isInvolveCn: isInvolveCn.value ? 'Y' : 'N', isInvolveCn: isInvolveCn.value ? 'Y' : 'N',
sort: isSort.value ? 0 : 1 // 0 先按分数降序 后按时间降序 1 先按分数降序,再按时间升序 sort: isSort.value ? 0 : 1 // 0 先按分数降序 后按时间降序 1 先按分数降序,再按时间升序
} }
...@@ -1038,8 +1074,10 @@ const initParam = () => { ...@@ -1038,8 +1074,10 @@ const initParam = () => {
customTime.value = JSON.parse(route.query.selectedDate) customTime.value = JSON.parse(route.query.selectedDate)
} }
isInvolveCn.value = route.query.isInvolveCn ? true : false isInvolveCn.value = route.query.isInvolveCn ? true : false
if (route.query.selectedStatus) { if (route.query.selectedStatus && route.query.selectedStatus !== '全部阶段') {
selectedStatus.value = route.query.selectedStatus selectedStatus.value = statusList.value.filter(item => {
return item.name === route.query.selectedStatus
})[0].id
} else { } else {
selectedStatus.value = '全部阶段' selectedStatus.value = '全部阶段'
} }
...@@ -1054,7 +1092,7 @@ const initParam = () => { ...@@ -1054,7 +1092,7 @@ const initParam = () => {
} else { } else {
const savedQuery = JSON.parse(sessionStorage.getItem('routeQuery') || '{}'); const savedQuery = JSON.parse(sessionStorage.getItem('routeQuery') || '{}');
selectedArea.value = savedQuery.domains ? savedQuery.domains : '全部领域' selectedArea.value = savedQuery.domains ? savedQuery.domains : '全部领域'
if (Array.isArray(JSON.parse(savedQuery.selectedDate)) && JSON.parse(savedQuery.selectedDate).length) { if (savedQuery.selectedDate && Array.isArray(JSON.parse(savedQuery.selectedDate)) && JSON.parse(savedQuery.selectedDate).length) {
selectedDate.value = '自定义' selectedDate.value = '自定义'
customTime.value = JSON.parse(savedQuery.selectedDate) customTime.value = JSON.parse(savedQuery.selectedDate)
} }
...@@ -1123,9 +1161,11 @@ const handleExport = () => { ...@@ -1123,9 +1161,11 @@ const handleExport = () => {
onMounted(async () => { onMounted(async () => {
handleGetOrgList() handleGetOrgList()
handleGetMemberList() handleGetMemberList()
initParam() await handleGetStatusList()
// 初始化 // 初始化
await fetchTableData() initParam()
fetchTableData()
}) })
onBeforeUnmount(() => { onBeforeUnmount(() => {
......
...@@ -124,13 +124,13 @@ ...@@ -124,13 +124,13 @@
</div> </div>
</div> </div>
</div> </div>
<div class="data-main-box-main-content" v-loading="loading" element-loading-text="全部数据加载中,请稍候..."> <div class="data-main-box-main-content" v-loading="loading" element-loading-text="数据加载中,请稍候...">
<el-table ref="tableRef" :data="tableData" row-key="id" @selection-change="handleSelectionChange" <el-table ref="tableRef" :data="tableData" row-key="id" @selection-change="handleSelectionChange"
@select="handleSelect" @select-all="handleSelectAll" style="width: 100%" :row-style="{ height: '52px' }"> @select="handleSelect" @select-all="handleSelectAll" style="width: 100%" :row-style="{ height: '52px' }">
<el-table-column type="selection" width="40" /> <el-table-column type="selection" width="40" />
<el-table-column label="政令名称" width="720"> <el-table-column label="政令名称" width="720">
<template #default="scope"> <template #default="scope">
<span class="title-item text-compact-bold" @click="handleClickToDetail(scope.row)">{{ scope.row.title <span class="title-item text-compact-bold" @click="handleClickToDetail(scope.row)">{{ scope.row.originalTitle
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
</el-table-column> </el-table-column>
<el-table-column label="发布机构"> <el-table-column label="发布机构">
<template #default="scope"> <template #default="scope">
<span class="person-item text-compact" @click="handlePerClick(scope.row)">{{ scope.row.organizationName <span class="person-item text-compact" @click="handleOrgClick(scope.row)">{{ scope.row.organizationName
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -675,6 +675,7 @@ const handleClear = () => { ...@@ -675,6 +675,7 @@ const handleClear = () => {
// 确定 // 确定
const handleConfirm = () => { const handleConfirm = () => {
currentPage.value = 1
fetchTableData() fetchTableData()
} }
...@@ -718,6 +719,7 @@ const selectedCount = computed(() => selectedMap.value.size) ...@@ -718,6 +719,7 @@ const selectedCount = computed(() => selectedMap.value.size)
const fetchTableData = async () => { const fetchTableData = async () => {
// isSelectedAll.value = false // isSelectedAll.value = false
// selectedMap.value.clear() // selectedMap.value.clear()
loading.value = true
// 调用接口获取数据... // 调用接口获取数据...
const params = { const params = {
page: currentPage.value, page: currentPage.value,
...@@ -772,8 +774,9 @@ const fetchTableData = async () => { ...@@ -772,8 +774,9 @@ const fetchTableData = async () => {
activeChart.value = curDemensionItem.chartTypeList[0] activeChart.value = curDemensionItem.chartTypeList[0]
curChartData.value = curDemensionItem.data curChartData.value = curDemensionItem.data
}) })
loading.value = false
} catch (error) { } catch (error) {
loading.value = false
} }
// tableData.value = res.data // tableData.value = res.data
// total.value = res.total // total.value = res.total
...@@ -1003,14 +1006,15 @@ const handleClickToDetail = (curDecree) => { ...@@ -1003,14 +1006,15 @@ const handleClickToDetail = (curDecree) => {
window.open(route.href, "_blank"); window.open(route.href, "_blank");
}; };
// 跳转人物详情 // 跳转机构详情
const handlePerClick = item => { const handleOrgClick = item => {
window.sessionStorage.setItem("curTabName", item.sponsorPersonName); console.log('item', item);
window.sessionStorage.setItem("curTabName", item.organizationName);
const route = router.resolve({ const route = router.resolve({
path: "/characterPage", path: "/institution",
query: { query: {
type: 2, id: item.organizationId
personId: item.personId
} }
}); });
window.open(route.href, "_blank"); window.open(route.href, "_blank");
...@@ -1216,6 +1220,8 @@ onMounted(async () => { ...@@ -1216,6 +1220,8 @@ onMounted(async () => {
.header-left-item2 { .header-left-item2 {
color: var(--color-primary-100); color: var(--color-primary-100);
display: flex;
gap: 8px;
} }
......
...@@ -42,7 +42,12 @@ ...@@ -42,7 +42,12 @@
<img :src="item.imgUrl || DefaultIcon2" alt="" /> <img :src="item.imgUrl || DefaultIcon2" alt="" />
</div> </div>
<div class="item-right one-line-ellipsis" @click="handleToInstitution(item)">{{ item.orgName }}</div> <div class="item-right one-line-ellipsis" @click="handleToInstitution(item)">{{ item.orgName }}</div>
<el-popover content="跳转至数据资源库" placement="top">
<template #reference>
<div class="item-total" @click="handleToDataLibrary(item)">{{ item.totalOrderNum }}</div> <div class="item-total" @click="handleToDataLibrary(item)">{{ item.totalOrderNum }}</div>
</template>
</el-popover>
<el-icon color="var(--color-primary-100)"> <el-icon color="var(--color-primary-100)">
<ArrowRightBold /> <ArrowRightBold />
</el-icon> </el-icon>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论