提交 47adb64a authored 作者: Ma's avatar Ma

增加跳转信用评价的按钮以及url配置统一

上级 5c6f32a9
......@@ -5,6 +5,7 @@
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>创新示范平台</title>
<script src="./public/config.js"></script>
</head>
<body>
<div id="app"></div>
......
window.baseURL = {
prodUrl: "/api",
// devUrl: "http://192.168.100.220:9095",
// devUrl: "http://192.168.102.183:9095",
devUrl: "http://192.168.102.220:9095",
xypjUrl:"http://192.168.100.220:99/login",
api: ''
}
\ No newline at end of file
......@@ -20,9 +20,11 @@ export function downLoadWps(filename, cycleId, token) {
text: 'Loading',
background: 'rgba(0, 0, 0, 0.7)'
})
// console.log(window.baseURL.devUrl,'window');
let url = window.baseURL.devUrl || "";
axios({
method: 'post',
url: `http://192.168.102.183:9095/export/exportReport/${cycleId}`,
url: `${url}/export/exportReport/${cycleId}`,
// url: 'http://222.75.116.199:9094/indexImport/quarterlyReport',
responseType: 'blob',
headers: { 'Authorization': 'Bearer ' + token }
......
......@@ -2,6 +2,9 @@
<template>
<div class="app-head-warpper">
<div class="header-bg">
<a class="generate creditRating" @click="goxypj">
信用评价体系
</a>
<a class="generate" @click="getCycleId" v-if="curDataType == '2022Two'">
<img src="@/assets/img/generate.png" alt=""> 生成本季度报告
</a>
......@@ -203,12 +206,20 @@ export default defineComponent({
},
methods: {
//跳转到信用评价
goxypj() {
const { xypjUrl = "" } = window.baseURL || {};
if(xypjUrl){
window.location.href = xypjUrl;
}
},
// 查询当前选择年月日对应的周期id
getCycleId() {
const activeData = this.years.filter(item => item.value == this.curDataType)[0];
let url = window.baseURL.devUrl || "";
axios({
method: 'get',
url: `http://192.168.102.183:9095/calculation/getCycleIdByYearAndQuarter/${activeData.year}/${activeData.quarter}`,
url: `${url}/calculation/getCycleIdByYearAndQuarter/${activeData.year}/${activeData.quarter}`,
headers: { 'Authorization': 'Bearer ' + this.token }
}).then(res => {
this.downloadFile(res.data.data);
......@@ -216,10 +227,10 @@ export default defineComponent({
},
// 文件下载 流文件下载
downloadFile(cycleId) {
if(cycleId){
downLoadWps('全省军民融合创新示范建设情况分析.wps', cycleId,this.token);
}else{
console.log(cycleId,'周期id不存在');
if (cycleId) {
downLoadWps('全省军民融合创新示范建设情况分析.wps', cycleId, this.token);
} else {
console.log(cycleId, '周期id不存在');
}
},
......@@ -272,7 +283,8 @@ export default defineComponent({
border: none;
padding: 14px 18px;
top: 16px;
right: 10px;
// right: 10px;
right: 160px;
color: #ffffff;
font-size: 18px;
display: flex;
......@@ -287,6 +299,10 @@ export default defineComponent({
}
}
.creditRating {
right: 2px;
}
.pointer {
cursor: pointer;
margin-left: 10px;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论