提交 a3d71f4f authored 作者: yanpeng's avatar yanpeng

Merge branch 'pre' of http://8.140.26.4:10003/caijian/risk-monitor into yp-dev

流水线 #200 已通过 于阶段
in 1 分 42 秒
......@@ -73,7 +73,7 @@
</div>
<div class="title">{{ "最新科技政令" }}</div>
</div>
<div class="box1-header-right" @click="handleClickToDetail">
<div class="box1-header-right" @click="handleClickOrder">
{{ "查看详情 >" }}
</div>
</div>
......@@ -116,48 +116,7 @@
</el-carousel-item>
</el-carousel>
</div>
<!-- <div class="box2">
<div class="box2-header">
<div class="icon">
<img src="./assets/images/box2-header-icon.png" alt="" />
</div>
<div class="title">
<div class="text">{{ "风险信号" }}</div>
<div class="num">{{ warningList.length }}</div>
</div>
</div>
<div class="box2-main">
<div
class="box2-main-item"
v-for="(item, index) in warningList"
:key="index"
@click="handleClickToDetail()"
>
<div
class="item-left"
:class="{
itemLeftStatus3: item.riskLevel === '特别重大',
itemLeftStatus2: item.riskLevel === '重大风险'
}"
>
{{ item.riskLevel ? item.riskLevel : "暂无数据" }}
</div>
<div class="item-right">
<div class="text">
{{ item.name }}
</div>
<div class="time">{{ item.postDate }}</div>
</div>
</div>
</div>
<div class="box2-footer" @click="handleToMoreRiskSignal">
<div class="icon">
<img src="./assets/images/box2-footer-icon.png" alt="" />
</div>
<div class="text">{{ "查看更多" }}</div>
</div>
</div> -->
<RiskSignal :list="warningList" @item-click="handleClickToDetail" @more-click="handleToMoreRiskSignal"
<RiskSignal :list="warningList" @item-click="onNavigateToDetail" @more-click="handleToMoreRiskSignal"
riskLevel="signalLevel" postDate="signalTime" name="signalTitle">
</RiskSignal>
</div>
......@@ -268,7 +227,7 @@
</div>
<div class="box7-main" v-loading="box7Params.loading">
<div class="box7-list">
<div class="box7-item" v-for="(item, index) in keyDecreeList" :key="index" @click="handleKeyDecree(item)">
<div class="box7-item" v-for="(item, index) in keyDecreeList" :key="index" @click="onNavigateToDetail(item)">
<div class="icon">
<img src="./assets/images/warning.png" alt="" />
</div>
......@@ -408,7 +367,7 @@
<div class="title">{{ "政令库" }}</div>
</div>
<div class="content-box" v-show="decreeList">
<div class="main-item" v-for="(item, index) in decreeList" :key="index" @click="handleClickDecree(item)">
<div class="main-item" v-for="(item, index) in decreeList" :key="index" @click="onNavigateToDetail(item)">
<div class="main-item-left">
<div class="left-left">
{{ item.time?.split("-")[0] }}<br />{{ item.time?.split("-")[1] }}月{{
......@@ -575,69 +534,28 @@ const handleGetLatestDecree = async () => {
const handleBox1 = async () => {
await handleGetLatestDecree();
};
const carouselRef = ref(null);
// 点击查看详情
const handleClickToDetail = () => {
let activeIndex = 0;
if (carouselRef.value) {
activeIndex = carouselRef.value.activeIndex;
}
console.log("当前 Carousel 激活索引:", activeIndex);
const id = box1DataList.value[activeIndex].id;
window.sessionStorage.setItem("curTabName", box1DataList.value[activeIndex].name);
const route = router.resolve({
path: "/decreeLayout",
query: {
id: id
}
});
window.open(route.href, "_blank");
// router.push({
// path: "/decreeLayout",
// query: {
// id: id
// }
// })
};
// 点击政令库政令
const handleClickDecree = decree => {
window.sessionStorage.setItem("curTabName", decree.title);
const route = router.resolve({
path: "/decreeLayout",
query: {
id: decree.id
}
});
window.open(route.href, "_blank");
// router.push({
// path: "/decreeLayout",
// query: {
// id: decree.id
// }
// })
const carouselRef = ref(null);
const handleClickOrder = () => {
let index = carouselRef.value?.activeIndex || 0;
let item = box1DataList.value[index];
console.log(item)
if (item) onNavigateToDetail(item)
};
const handleKeyDecree = item => {
window.sessionStorage.setItem("curTabName", item.title);
// 跳转政令详情
const onNavigateToDetail = (item) => {
window.sessionStorage.setItem("curTabName", item.name || item.title || item.signalTitle);
const route = router.resolve({
path: "/decreeLayout",
query: {
id: item.id
}
query: { id: item.orderId || item.id }
});
window.open(route.href, "_blank");
// router.push({
// path: "/decreeLayout",
// query: {
// id: item.id
// }
// query: { id: item.orderId || item.id }
// })
};
}
// 风险信号
const warningList = ref([
......@@ -1001,6 +919,7 @@ const box8Params = reactive({
})
const handleGetDecreeKeyInstruction = async () => {
box8Params.loading = true
wordCloudData.value = []
try {
let { year, domainId, proposeName } = box8Params;
const res = await getDecreeKeyInstruction({
......@@ -1009,8 +928,13 @@ const handleGetDecreeKeyInstruction = async () => {
orgId: proposeName || undefined
});
console.log("政令重点条款", res);
wordCloudData.value = res.data.map(item => ({name: item.clause, value: item.count}));
if (res.code==200) {
wordCloudData.value = res.data.map(item => ({name: item.clause, value: item.count}));
} else {
wordCloudData.value = []
}
} catch (error) {
wordCloudData.value = []
console.error("政令重点条款error", error);
}
box8Params.loading = false
......@@ -1301,8 +1225,7 @@ onMounted(async () => {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 16px 0;
padding: 16px 22px;
.data-origin-icon {
width: 16px;
height: 16px;
......@@ -1804,174 +1727,6 @@ onMounted(async () => {
}
}
}
.box2 {
width: 521px;
height: 450px;
border-radius: 10px;
box-shadow: 0px 0px 15px 0px rgba(22, 119, 255, 0.1);
background: rgba(255, 255, 255, 1);
position: relative;
.box2-header {
height: 48px;
display: flex;
border-bottom: 1px solid rgba(240, 242, 244, 1);
.icon {
width: 24px;
height: 22px;
margin-left: 18px;
margin-top: 14px;
img {
width: 100%;
height: 100%;
}
}
.title {
display: flex;
width: 148px;
background: rgba(206, 79, 81, 1);
margin-left: 18px;
.text {
margin-left: 16px;
height: 48px;
color: #fff;
font-family: Microsoft YaHei;
font-size: 20px;
font-weight: 700;
line-height: 48px;
}
.num {
width: 24px;
height: 20px;
line-height: 20px;
text-align: center;
color: rgba(255, 255, 255, 1);
font-family: Microsoft YaHei;
font-size: 12px;
margin-left: 15px;
margin-top: 15px;
border-radius: 100px;
background: rgba(255, 255, 255, 0.3);
}
}
}
.box2-main {
box-sizing: border-box;
padding-right: 20px;
height: 282px;
overflow-y: auto;
.box2-main-item {
margin-left: 23px;
height: 47px;
width: 464px;
display: flex;
cursor: pointer;
&:hover {
background: var(--color-bg-hover);
}
.itemLeftStatus3 {
color: rgba(245, 34, 45, 1) !important;
background: rgba(255, 241, 240) !important;
}
.itemLeftStatus2 {
color: rgba(250, 140, 22, 1) !important;
background: rgba(255, 247, 230, 1) !important;
}
.item-left {
margin-top: 4px;
margin-left: 2px;
width: 40px;
height: 40px;
border-radius: 20px;
color: rgba(82, 196, 26, 1);
background: rgba(246, 255, 237, 1);
font-family: Microsoft YaHei;
font-size: 12px;
font-weight: 400;
line-height: 14px;
box-sizing: border-box;
padding: 6px 4px;
text-align: center;
}
.item-right {
margin-left: 13px;
width: 408px;
height: 47px;
border-bottom: 1px solid rgba(240, 242, 244, 1);
display: flex;
.text {
width: 318px;
color: rgba(59, 65, 75, 1);
font-family: Microsoft YaHei;
font-size: 16px;
font-weight: 400;
line-height: 47px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.time {
width: 90px;
line-height: 47px;
text-align: center;
color: rgba(132, 136, 142, 1);
font-family: Microsoft YaHei;
font-size: 14px;
font-weight: 400;
}
}
}
}
.box2-footer {
position: absolute;
left: 45px;
bottom: 20px;
width: 430px;
height: 42px;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
border-radius: 6px;
background: var(--color-main-active);
cursor: pointer;
.icon {
width: 16px;
height: 16px;
img {
width: 100%;
height: 100%;
}
}
.text {
margin-left: 8px;
color: rgba(255, 255, 255, 1);
font-family: Microsoft YaHei;
font-size: 14px;
font-weight: 400;
line-height: 22px;
}
}
}
}
.divide2 {
......@@ -2257,7 +2012,7 @@ onMounted(async () => {
width: 792px;
height: 100%;
border-radius: 10px;
box-shadow: 0px 0px 15px 0px rgba(60, 87, 126, 0.2);
box-shadow: 0px 0px 15px 0px rgba(22, 119, 255, 0.1);
background: rgba(255, 255, 255, 1);
display: flex;
flex-direction: column;
......@@ -2373,7 +2128,7 @@ onMounted(async () => {
width: 792px;
height: 100%;
border-radius: 10px;
box-shadow: 0px 0px 15px 0px rgba(60, 87, 126, 0.2);
box-shadow: 0px 0px 15px 0px rgba(22, 119, 255, 0.1);
background: rgba(255, 255, 255, 1);
display: flex;
flex-direction: column;
......
......@@ -2,7 +2,7 @@
<div class="wrap">
<div class="box1">
<AnalysisBox title="相关政令" :showAllBtn="false">
<div class="box1-main">
<div class="box1-main" v-loading="isLoading">
<el-empty v-if="!siderList?.length" style="padding: 60px 0;" description="暂无数据" :image-size="100" />
<el-scrollbar height="100%" always>
<div class="left-item" :class="{ 'item-active': false }" v-for="(item, index) in siderList" :key="index" @click="handleClickDecree(item)">
......@@ -18,9 +18,11 @@
</div>
<div class="box2">
<AnalysisBox title="政令关系挖掘" :showAllBtn="false">
<el-empty v-if="!siderList?.length" style="padding: 60px 0;" description="暂无数据" :image-size="100" />
<div class="box2-main" v-if="graphData.nodes?.length">
<GraphChart :nodes="graphData.nodes" :links="graphData.links" layoutType="force" @handleClickNode="handleClickNode" />
<div style="height: 100%; width: 100%;" v-loading="isLoading">
<el-empty v-if="!siderList?.length" style="padding: 60px 0;" description="暂无数据" :image-size="100" />
<div class="box2-main" v-if="graphData.nodes?.length">
<GraphChart :nodes="graphData.nodes" :links="graphData.links" layoutType="force" @handleClickNode="handleClickNode" />
</div>
</div>
</AnalysisBox>
</div>
......@@ -28,7 +30,7 @@
<el-dialog v-model="dialogVisible" width="1000px" class="viewpoint-dialog">
<template #header>
<div class="viewpoint-header">
<div class="viewpoint-title">冲突关系</div>
<div class="viewpoint-title">关联关系</div>
</div>
</template>
<div class="viewpoint-body">
......@@ -61,7 +63,7 @@ import icon1629 from "./assets/icons/icon1629.png";
const route = useRoute();
// 冲突关系
// 关联关系
const dialogVisible = ref(false);
// 基本信息
......@@ -123,13 +125,16 @@ const handleClickNode = ({data}) => {
if (node) handleClickDecree(node)
}
}
const isLoading = ref(false);
const initGraphChart = () => {
isLoading.value = true;
Promise.all([onDecreeSummaryData(), handleGetRelateOrder()]).then(() => {
if (mainInfo.value.id && siderList.value.length) {
graphData.links = siderList.value.map(onFormatLink)
graphData.nodes = siderList.value.map(onFormatNode)
graphData.nodes.unshift(onFormatNode(mainInfo.value))
}
isLoading.value = false;
})
}
const onFormatLink = (item, index) => {
......@@ -185,7 +190,7 @@ const handleClickDecree = decree => {
// })
};
// 冲突关系
// 关联关系
const graphContainer = ref(null);
let graph = null;
const onRelationChart = () => {
......
......@@ -183,7 +183,7 @@ const headerChartData = (row) => {
switch (contentType.value) {
case 1:
onDecreeRelatedChain(row.id)
onDecreeRelatedChain(row.orgId)
break;
case 2:
onDecreeRelatedEntitie(row.orgId)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论