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

feat:科技政令-政令概况接口对接

上级 e24a2a85
......@@ -12,6 +12,18 @@ export function getDecreeBackground(params) {
})
}
// 前序政令
/**
* @param {id}
*/
export function getDecreePrev(params) {
return request({
method: 'GET',
url: `/api/administrativeOrderInfo/prev/${params.id}`,
params
})
}
// 相关事件
/**
* @param { id }
......@@ -34,4 +46,28 @@ export function getDecreeDepend(params) {
url: `/api/administrativeOrderInfo/depend/${params.id}`,
params
})
}
// 主要指令
/**
* @param { id }
*/
export function getDecreeMainContent(params) {
return request({
method: 'GET',
url: `/api/administrativeOrderInfo/mainContent/${params.id}`,
params
})
}
// 相关实体
/**
* @param { id }
*/
export function getDecreeRelatedEntity(params) {
return request({
method: 'GET',
url: `/api/administrativeOrderInfo/relatedEntity/${params.id}`,
params
})
}
\ No newline at end of file
......@@ -60,16 +60,17 @@ export function getDecreeSummary(params) {
})
}
// 获取报告原文
// 获取风险信号
/**
* @param {id}
*/
// export function getDecreeReport(params) {
// return request({
// method: 'GET',
// url: `/api/administrativeOrderInfo/contentUrl/${params.id}`,
// })
// }
export function getDecreeRiskSignal(params) {
return request({
method: 'GET',
url: `/api/administrativeOrderInfo/riskSignal/${params.id}`,
params
})
}
export function getDecreeReport(params) {
return request({
......
......@@ -95,22 +95,24 @@ const handleGetSummary = async () => {
// 获取报告原文 - 修改为获取分段数组
const handleGetReport = async () => {
const params = {
id: route.query.id
};
try {
const res = await getDecreeReport(params);
const res = await getDecreeReport({id: route.query.id});
console.log("报告原文", res);
if (res.code === 200 && res.data) {
// 假设后端返回的是数组格式,如果返回的是对象包含数组,请改为 res.data.list
reportData.value = res.data || [];
let test = {
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 = {
content: res.data.content[i] || "",
contentEn: res.data.contentEn[i] || "",
num: i + 1,
}
reportData.value.push(obj);
}
reportData.value.unshift(test);
}
} catch (error) { }
};
......
......@@ -52,8 +52,8 @@ export default defineConfig({
},
'/api': {
target: 'http://8.140.26.4:9085/',
// target: 'http://192.168.0.4:28080/',
// target: 'http://8.140.26.4:9085/',
target: 'http://192.168.0.6:28080/',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论