提交 d8eadc36 authored 作者: 张伊明's avatar 张伊明

合并分支 'fk-dev' 到 'pre'

Fk dev 查看合并请求 !259
流水线 #144 已失败 于阶段
in 28 秒
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</div> </div>
<!-- <div class="more" @click="handleToMoreNews">{{ "更多 +" }}</div> --> <!-- <div class="more" @click="handleToMoreNews">{{ "更多 +" }}</div> -->
</div> </div>
<div class="msg-bubble-main" ref="scrollContainer"> <div class="msg-bubble-main" ref="scrollContainer" @mouseenter="stopScroll" @mouseleave="startScroll">
<div class="message-bubble" v-for="(item, index) in displayList" :key="index" @click="handleClickPerson(item)"> <div class="message-bubble" v-for="(item, index) in displayList" :key="index" @click="handleClickPerson(item)">
<div class="avatar-container"> <div class="avatar-container">
<img :src="item[props.imageUrl] || avatarUser" :alt="item[props.name]" class="avatar" /> <img :src="item[props.imageUrl] || avatarUser" :alt="item[props.name]" class="avatar" />
...@@ -110,9 +110,9 @@ const currentIndex = ref(0) ...@@ -110,9 +110,9 @@ const currentIndex = ref(0)
// 计算当前显示的消息列表(只显示固定数量的消息) // 计算当前显示的消息列表(只显示固定数量的消息)
const displayList = computed(() => { const displayList = computed(() => {
if(props.messageList.length < 4) { // if(props.messageList.length < 4) {
return props.messageList // return props.messageList
} // }
// 确保 messageList 存在且有数据 // 确保 messageList 存在且有数据
if (!props.messageList || !Array.isArray(props.messageList) || props.messageList.length === 0) { if (!props.messageList || !Array.isArray(props.messageList) || props.messageList.length === 0) {
return [] return []
...@@ -140,7 +140,7 @@ const startScroll = () => { ...@@ -140,7 +140,7 @@ const startScroll = () => {
if (timer) clearInterval(timer) if (timer) clearInterval(timer)
timer = setInterval(() => { timer = setInterval(() => {
currentIndex.value = (currentIndex.value + 1) % props.messageList.length currentIndex.value = (currentIndex.value + 1) % props.messageList.length
}, 2000) // 每秒滚动一条 }, 2400) // 每2.4秒滚动一条
} }
// 停止滚动 // 停止滚动
...@@ -152,9 +152,10 @@ const stopScroll = () => { ...@@ -152,9 +152,10 @@ const stopScroll = () => {
} }
onMounted(() => { onMounted(() => {
if (props.messageList.length > 3) { startScroll()
startScroll() // if (props.messageList.length > 3) {
} // startScroll()
// }
}) })
...@@ -223,12 +224,13 @@ onBeforeUnmount(() => { ...@@ -223,12 +224,13 @@ onBeforeUnmount(() => {
} }
.msg-bubble-main { .msg-bubble-main {
height: 402px; height: 395px;
overflow: hidden; overflow: hidden;
box-sizing: border-box; box-sizing: border-box;
padding-bottom: 8px; padding-bottom: 8px;
padding-left: 21px; padding-left: 21px;
padding-top: 23px; padding-top: 23px;
// background: orange;
.message-bubble { .message-bubble {
display: flex; display: flex;
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
`}} `}}
</pre> </pre>
<div class="chart-box"> <div class="chart-box">
<GraphChart :nodes="nodes" :links="links" layoutType="force"> <GraphChart :nodes="nodes" :links="links" layoutType="none">
</GraphChart> </GraphChart>
</div> </div>
</el-col> </el-col>
......
...@@ -66,7 +66,7 @@ const setChart = (option, chartId, allowClick, selectParam) => { ...@@ -66,7 +66,7 @@ const setChart = (option, chartId, allowClick, selectParam) => {
if (params.seriesName === '通过法案') { if (params.seriesName === '通过法案') {
selectParam.selectedStatus = 1 selectParam.selectedStatus = 1
} else { } else {
selectParam.selectedStatus = null selectParam.selectedStatus = 0
} }
const route = router.resolve({ const route = router.resolve({
......
...@@ -273,7 +273,7 @@ import { ...@@ -273,7 +273,7 @@ import {
import { getPersonSummaryInfo } from "@/api/common/index"; import { getPersonSummaryInfo } from "@/api/common/index";
import { getChartAnalysis } from "@/api/aiAnalysis/index"; import { getChartAnalysis } from "@/api/aiAnalysis/index";
import DivideHeader from "@/components/DivideHeader.vue"; import DivideHeader from "@/components/DivideHeader.vue";
import overviewMainBox from "@/components/base/boxBackground/overviewMainBox.vue"; import overviewMainBox from "@/components/base/BoxBackground/OverviewMainBox.vue";
import OverviewCard from "./OverviewCard.vue"; import OverviewCard from "./OverviewCard.vue";
import ResourceLibrarySection from "./ResourceLibrarySection.vue"; import ResourceLibrarySection from "./ResourceLibrarySection.vue";
import { useContainerScroll } from "@/hooks/useScrollShow"; import { useContainerScroll } from "@/hooks/useScrollShow";
...@@ -860,7 +860,8 @@ const handleBox5 = async () => { ...@@ -860,7 +860,8 @@ const handleBox5 = async () => {
})[0]?.name })[0]?.name
const selectParam = { const selectParam = {
moduleType: '国会法案', moduleType: '国会法案',
domains: domain domains: domain,
isInvolveCn: true
} }
setChart(box5Chart, "box5Chart", true, selectParam); setChart(box5Chart, "box5Chart", true, selectParam);
} }
...@@ -912,6 +913,7 @@ const handleBox7Data = async () => { ...@@ -912,6 +913,7 @@ const handleBox7Data = async () => {
moduleType: '国会法案', moduleType: '国会法案',
key: '议院委员会', key: '议院委员会',
selectedDate: box7selectetedTime.value, selectedDate: box7selectetedTime.value,
isInvolveCn: true
} }
const box7Chart = getDoublePieChart(data1, data2); const box7Chart = getDoublePieChart(data1, data2);
...@@ -956,10 +958,10 @@ const handleGetKeyTK = async () => { ...@@ -956,10 +958,10 @@ const handleGetKeyTK = async () => {
.sort((a, b) => (b.count ?? 0) - (a.count ?? 0)) .sort((a, b) => (b.count ?? 0) - (a.count ?? 0))
.slice(0, 20) .slice(0, 20)
.map(item => { .map(item => {
return { return {
name: item.clause, name: item.clause,
value: item.count value: item.count
}; };
}); });
} }
} catch (error) { } catch (error) {
...@@ -1041,7 +1043,7 @@ const handleBox9Data = async () => { ...@@ -1041,7 +1043,7 @@ const handleBox9Data = async () => {
key: '领域', key: '领域',
selectedDate: box9selectetedTime.value, selectedDate: box9selectetedTime.value,
selectedStatus: box9LegislativeStatus.value === '提出法案' ? 0 : 1, selectedStatus: box9LegislativeStatus.value === '提出法案' ? 0 : 1,
isInvolveCn: 1 isInvolveCn: true
} }
box9ChartInstance = setChart(box9Chart, "box9Chart", true, selectParam); box9ChartInstance = setChart(box9Chart, "box9Chart", true, selectParam);
} }
...@@ -1223,7 +1225,7 @@ const handleBox8Data = async () => { ...@@ -1223,7 +1225,7 @@ const handleBox8Data = async () => {
moduleType: '国会法案', moduleType: '国会法案',
key: '所处阶段', key: '所处阶段',
selectedDate: box8selectetedTime.value, selectedDate: box8selectetedTime.value,
isInvolveCn: 1 isInvolveCn: true
} }
await nextTick(); await nextTick();
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</div> </div>
</div> </div>
<div class="header-center text-title-3-bold">{{ chartTitle }}</div> <div class="header-center text-title-3-bold">{{ chartTitle }}</div>
<div class="header-right"> <div class="header-right" @click="handleDownload">
<img src="./assets/icons/download.svg" alt=""> <img src="./assets/icons/download.svg" alt="">
</div> </div>
</div> </div>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<slot name="chart-box"></slot> <slot name="chart-box"></slot>
</div> </div>
<div class="tip-box"> <div class="tip-box">
<TipTab /> <TipTab text="数据来源:美国各政府机构官网" data-time="" />
</div> </div>
</div> </div>
</div> </div>
...@@ -63,7 +63,7 @@ const defaultChartTypeList = [ ...@@ -63,7 +63,7 @@ const defaultChartTypeList = [
] ]
const emit = defineEmits('clickChartItem') const emit = defineEmits('clickChartItem', 'download')
const handleClickChartItem = (item) => { const handleClickChartItem = (item) => {
chartItemList.value.forEach(chart => { chartItemList.value.forEach(chart => {
...@@ -104,6 +104,10 @@ const chartItemList = computed(() => { ...@@ -104,6 +104,10 @@ const chartItemList = computed(() => {
return arr return arr
}) })
const handleDownload = () => {
emit('download')
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -176,6 +180,8 @@ const chartItemList = computed(() => { ...@@ -176,6 +180,8 @@ const chartItemList = computed(() => {
.tip-box { .tip-box {
height: 54px; height: 54px;
box-sizing: border-box; box-sizing: border-box;
padding: 0 500px;
padding-top: 10px; padding-top: 10px;
// background: orange; // background: orange;
} }
......
...@@ -125,24 +125,23 @@ ...@@ -125,24 +125,23 @@
<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="455"> <el-table-column label="政令名称" width="455">
<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.title
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="日期" width="120" class-name="date-column"> <el-table-column label="发布时间" width="180" class-name="date-column">
<template #default="scope">{{ scope.row.date }}</template> <template #default="scope">{{ scope.row.date }}</template>
</el-table-column> </el-table-column>
<el-table-column label="提出人" width="480"> <el-table-column label="发布机构" width="480">
<template #default="scope"> <template #default="scope">
<span class="person-item text-compact" @click="handlePerClick(scope.row)">{{ scope.row.sponsorPersonName <span class="person-item text-compact" @click="handlePerClick(scope.row)">{{ scope.row.sponsorPersonName
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column property="affiliation" label="所属党派" width="120" /> <el-table-column property="affiliation" label="涉及领域" width="120" />
<el-table-column property="originDepart" label="提出委员会" width="180" /> <el-table-column property="originDepart" label="政令类型" width="180" />
<el-table-column property="status" label="所处阶段" width="120" />
</el-table> </el-table>
</div> </div>
</div> </div>
...@@ -209,7 +208,7 @@ const staticsDemensionList = ref([ ...@@ -209,7 +208,7 @@ const staticsDemensionList = ref([
}, },
yearData: { yearData: {
} }
}, },
{ {
......
...@@ -77,7 +77,7 @@ import { useRoute } from "vue-router"; ...@@ -77,7 +77,7 @@ import { useRoute } from "vue-router";
import AiBox from "@/components/AiBox.vue"; import AiBox from "@/components/AiBox.vue";
import { getPersonType } from "@/api/common/index"; import { getPersonType } from "@/api/common/index";
// import { useDraggable } from "@vueuse/core"; // import { useDraggable } from "@vueuse/core";
import ModuleHeader from '@/components/base/moduleHeader/index.vue' import ModuleHeader from '@/components/base/ModuleHeader/index.vue'
import Menu1 from "@/assets/icons/overview/menu1.png"; import Menu1 from "@/assets/icons/overview/menu1.png";
import Menu2 from "@/assets/icons/overview/menu2.png"; import Menu2 from "@/assets/icons/overview/menu2.png";
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论