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

style:政令原文页面优化

上级 0c925076
import request from "@/api/request.js";
// 获取相关政令
/**
* @param { id }
*/
export function getDecreeRelatedOrder(params) {
return request({
method: 'GET',
url: `/api/administrativeOrderInfo/relatedOrder/${params.id}`,
params
})
}
// 根据政令ID获取领域公司信息
/**
* @param {cRelated, id}
......
......@@ -60,12 +60,12 @@
</div>
<div class="text">{{ "政令原文" }}</div>
</div>
<div class="btn" @click="handleToInstitution">
<!-- <div class="btn" @click="handleToInstitution">
<div class="icon">
<img src="./assets/icons/link-icon.png" alt="" />
</div>
<div class="text">{{ "查看官网" }}</div>
</div>
</div> -->
<div class="btn-active" @click="handleAnalysisClick">
<div class="icon-active">
<img src="./assets/icons/edit-icon.png" alt="" />
......@@ -386,11 +386,10 @@ onMounted(() => {
}
.layout-main {
width: 100%;
overflow-y: auto;
height: 100%;
display: flex;
flex-direction: column;
.header-main {
position: sticky;
top: 0;
z-index: 1000;
width: 100%;
background-color: #fff;
box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.05);
......@@ -625,6 +624,9 @@ onMounted(() => {
}
}
.layout-main-center {
height: 20px;
flex: auto;
background-color: #f7f8f9;
}
}
.layout-report-box {
......
......@@ -379,7 +379,7 @@ onMounted(() => {
width: 100%;
height: 100%;
overflow-x: auto;
overflow-y: hidden;
overflow-y: auto;
scrollbar-width: thin;
scrollbar-color: rgba(144, 202, 249, 0.5) transparent;
......
......@@ -16,8 +16,8 @@
</div>
<div class="data-title">实体名称</div>
<div style="height: 20px; flex: auto;">
<el-empty v-if="showCompanyList.length === 0" style="padding-top: 30%" description="暂无数据" :image-size="100" />
<el-scrollbar height="100%" always>
<el-empty v-if="showCompanyList.length === 0" style="padding-top: 240px" description="暂无数据" :image-size="100" />
<div class="list-data">
<div class="list-item" v-for="item in showCompanyList" :key="item.id" :class="{ 'item-active': activeEntityId === item.id }" @click="handleToCompanyDetail(item)">
<div class="item-icon">
......@@ -185,7 +185,7 @@ const handleGetHylyList = async () => {
};
// 产业链/实体关系
const contentType = ref(2);
const contentType = ref(1);
const headerContentType = (type) => {
contentType.value = type;
};
......@@ -366,11 +366,12 @@ onMounted(() => {
<style lang="scss" scoped>
.wrapper {
min-height: 845px;
height: 100%;
width: 1600px;
margin: 16px auto;
padding: 16px 0;
display: flex;
gap: 16px;
margin: 0 auto;
.box1 {
width: 480px;
......@@ -408,9 +409,7 @@ onMounted(() => {
}
.list-data {
height: 480px;
width: 446px;
margin: 0 auto;
.list-item {
display: flex;
......
......@@ -66,10 +66,10 @@
<div>
<div class="time-line-top">
<div class="time-line-date">{{ item.postDate }}</div>
<div class="time-line-icon">
<div class="time-line-icon" @click="handleToInstitution(item)">
<img style="width: 100%; height: 100%;" :src="item.orgImage || DefaultIcon1" alt="">
</div>
<div class="time-line-name">{{ item.proposeOrgName }}</div>
<div class="time-line-name" @click="handleToInstitution(item)">{{ item.proposeOrgName }}</div>
</div>
<div class="timeline-content">{{ item.describe }}</div>
</div>
......@@ -86,6 +86,7 @@
import { ref, onMounted } from "vue";
import { useRoute } from "vue-router";
import { getDecreeBackground, getDecreeDepend, getDecreePrev } from "@/api/decree/background";
import router from "@/router";
import DefaultIcon1 from "@/assets/icons/default-icon1.png";
......@@ -160,6 +161,17 @@ const handleGetPrev = async () => {
console.error("获取前序政令数据失败", error);
}
};
// 跳转行政机构主页
const handleToInstitution = item => {
window.sessionStorage.setItem("curTabName", item.proposeOrgName);
const curRoute = router.resolve({
path: "/institution",
query: {
id: item.id
}
});
window.open(curRoute.href, "_blank");
};
// 法律依据
const dependList = ref([]);
......@@ -191,7 +203,7 @@ onMounted(() => {
.introduction-wrap {
display: flex;
width: 1600px;
height: 100%;
height: 901px;
padding: 16px 0;
gap: 16px;
......@@ -386,11 +398,13 @@ onMounted(() => {
overflow: hidden;
border-radius: 50%;
font-size: 0px;
cursor: pointer;
}
.time-line-name {
color: rgba(59, 65, 75, 1);
font-size: 15px;
cursor: pointer;
}
}
......
......@@ -74,7 +74,6 @@ onMounted(() => {
<style lang="scss" scoped>
.decree-overview-wrap {
width: 100%;
height: 100%;
overflow: hidden;
background: rgba(247, 248, 249, 1);
display: flex;
......
......@@ -314,7 +314,7 @@ onMounted(() => {
<style lang="scss" scoped>
.page-box {
height: 100%;
height: 901px;
width: 1600px;
display: flex;
flex-direction: column;
......
......@@ -213,7 +213,11 @@ const contentList = ref([
const ALPHABET = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"];
const onMainContentData = async () => {
try {
const res = await getDecreeMainContent({id: route.query.id, keyword: commandWord.value});
const res = await getDecreeMainContent({
id: route.query.id,
keyword: commandWord.value,
domainId: areaType.value
});
console.log("主要指令", res);
if (res && res.code === 200) {
contentList.value = res.data;
......
......@@ -46,7 +46,7 @@
<el-scrollbar height="100%" v-else>
<div v-for="(item, index) in reportData" :key="index" :class="['content-row', {'high-light':isHighlight}]">
<!-- 右侧:中文 -->
<div class="content-cn" v-html="item.content"></div>
<div :class="['content-cn', {'translate-cn':!isTranslate}]" v-html="item.content"></div>
<!-- 左侧:英文 -->
<div class="content-en" v-html="item.contentEn" v-if="isTranslate"></div>
</div>
......@@ -99,11 +99,13 @@ const handleGetReport = async () => {
const res = await getDecreeReport({id: route.query.id});
console.log("报告原文", res);
if (res.code === 200 && res.data) {
reportData.value = [{
content: "设立第二紧急委员会(以下简称“委员会”)。自2026年1月16日美国东部<span>标准时间</span>凌晨12:01起,成立一个由一名主席和两名成员组成的<span>委员会</span>,所有成员均由总统任命,负责调查并报告这些争议。任何成员均不得在任何铁路员工组织或任何铁路承运人中拥有经济或其他利益关系。委员会的运作取决于资金的可用性。",
contentEn: "Establishment of a Second <span>Emergency</span> Board (Board). There is established, effective 12:01 a.m. eastern standard time on <span>January 16</span>, 2026, a Board composed of a chair and two other members, all of whom shall be appointed by the President to investigate and report on these disputes. No member shall be pecuniarily or otherwise interested in any organization of railroad employees or any carrier. The Board shall perform its functions subject to the availability of funds.",
num: 0,
}];
reportData.value = [
// {
// content: "设立第二紧急委员会(以下简称“委员会”)。自2026年1月16日美国东部<span>标准时间</span>凌晨12:01起,成立一个由一名主席和两名成员组成的<span>委员会</span>,所有成员均由总统任命,负责调查并报告这些争议。任何成员均不得在任何铁路员工组织或任何铁路承运人中拥有经济或其他利益关系。委员会的运作取决于资金的可用性。",
// contentEn: "Establishment of a Second <span>Emergency</span> Board (Board). There is established, effective 12:01 a.m. eastern standard time on <span>January 16</span>, 2026, a Board composed of a chair and two other members, all of whom shall be appointed by the President to investigate and report on these disputes. No member shall be pecuniarily or otherwise interested in any organization of railroad employees or any carrier. The Board shall perform its functions subject to the availability of funds.",
// num: 0,
// }
];
let num = Math.max(res.data.content.length, res.data.contentEn.length)
for (let i = 0; i < num; i++) {
let obj = {
......@@ -154,9 +156,8 @@ onMounted(() => {
margin: 0 auto;
.icon {
width: 122px;
height: 64px;
border-radius: 4px;
width: 64px;
height: 40px;
overflow: hidden;
img {
......@@ -166,7 +167,7 @@ onMounted(() => {
}
.info {
margin-left: 16px;
margin-left: 10px;
margin-right: 40px;
width: 20px;
flex: auto;
......@@ -289,7 +290,7 @@ onMounted(() => {
height: 20px;
flex: auto;
box-sizing: border-box;
overflow-y: auto;
padding-top: 10px;
// 滚动条样式
&::-webkit-scrollbar {
......@@ -332,7 +333,7 @@ onMounted(() => {
.content-cn {
width: 50%;
flex: auto;
padding: 24px 0;
padding-bottom: 40px;
box-sizing: border-box;
font-size: 16px;
line-height: 1.8;
......@@ -341,6 +342,9 @@ onMounted(() => {
text-align: justify;
white-space: pre-wrap; // 保留换行格式
}
.translate-cn {
padding-bottom: 10px;
}
}
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论