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

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

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