mode
This commit is contained in:
parent
f3a83052da
commit
681dfae9e5
|
@ -61,6 +61,14 @@ const router = new Router({
|
|||
requireAuth: true
|
||||
},
|
||||
component: () => import("view/userInfo/index")
|
||||
},
|
||||
{
|
||||
path: '/report',
|
||||
name: '评价报告',
|
||||
meta: {
|
||||
requireAuth: true
|
||||
},
|
||||
component: () => import("view/report/index")
|
||||
}
|
||||
],
|
||||
mode: 'history',
|
||||
|
|
|
@ -16,7 +16,14 @@
|
|||
<span class="block">3. 单位:元</span>
|
||||
<i class="el-icon-warning warning" slot="reference" />
|
||||
</el-popover>
|
||||
<span style="float: right">单位: 元</span>
|
||||
<el-select v-model="unit">
|
||||
<el-option
|
||||
v-for="(item, index) in options"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.label"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</p>
|
||||
|
||||
<el-row style="align-items: flex-start">
|
||||
|
@ -70,6 +77,8 @@ export default {
|
|||
return {
|
||||
prop: "资产负债表",
|
||||
height: 0,
|
||||
unit: "元",
|
||||
options: [{ label: "元" }, { label: "万元" }, { label: "亿元" }],
|
||||
success: [false, false, false],
|
||||
prompt: {
|
||||
研发费用: [
|
||||
|
@ -92,10 +101,10 @@ export default {
|
|||
|
||||
created() {
|
||||
const that = this;
|
||||
that.height = window.innerHeight - 600;
|
||||
that.height = (window.innerHeight - 600).toString();
|
||||
window.onresize = () => {
|
||||
return (() => {
|
||||
that.height = window.innerHeight - 600;
|
||||
that.height = (window.innerHeight - 600).toString();
|
||||
})();
|
||||
};
|
||||
},
|
||||
|
@ -113,7 +122,29 @@ export default {
|
|||
},
|
||||
|
||||
backData(val) {
|
||||
this.data["财务填报"][this.prop] = val;
|
||||
var data = val.map((item) => {
|
||||
return Object.keys(item).map((key) => {
|
||||
if (key !== "报告期") {
|
||||
if (this.unit === "元") {
|
||||
return { [key]: item[key] };
|
||||
} else if (this.unit === "万元") {
|
||||
return { [key]: item[key] * 10000 };
|
||||
} else {
|
||||
return { [key]: item[key] * 100000000 };
|
||||
}
|
||||
} else {
|
||||
return { [key]: item[key] };
|
||||
}
|
||||
})
|
||||
});
|
||||
data.forEach((item,index)=>{
|
||||
var obj = {}
|
||||
item.forEach(child=>{
|
||||
obj = {...obj, ...child}
|
||||
})
|
||||
this.data["财务填报"][this.prop][index] = obj
|
||||
})
|
||||
console.log(this.data["财务填报"]);
|
||||
},
|
||||
|
||||
isSuccess(val) {
|
||||
|
@ -203,4 +234,10 @@ export default {
|
|||
background-color: #5080fc;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.el-select {
|
||||
float: right;
|
||||
width: 70px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
|
@ -454,7 +454,7 @@ export default {
|
|||
|
||||
submit() {
|
||||
get("/esg/submit_esg_rating_input", {}).then((res) => {
|
||||
this.message.success(res.info);
|
||||
this.$message.success(res.info);
|
||||
this.visible = false;
|
||||
});
|
||||
},
|
||||
|
|
|
@ -8,13 +8,62 @@
|
|||
受评企业长期综合信用等级分三等九级,即:AAA、AA、A、BBB、BB、B、CCC、CC、C。除AAA级、CCC级(含)以下等级外,每一个信用等级可用“+”、“-”符号进行微调,表示略高或略低于本等级。
|
||||
</div>
|
||||
</div>
|
||||
<el-row :gutter="24" style="padding: 0 2.5%; margin-top: 40px">
|
||||
<el-col :span="6" v-for="(item, index) in data" :key="index">
|
||||
<el-card
|
||||
:body-style="{ padding: '0px' }"
|
||||
@click.native="toLocation(item.targetUrl)"
|
||||
>
|
||||
<div class="card-top" :style="{ background: item.color }">
|
||||
{{ item.title }}
|
||||
</div>
|
||||
<div class="card-bottom">
|
||||
<span>{{ item.des }}</span>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {};
|
||||
return {
|
||||
data: [
|
||||
{
|
||||
title: "企业填报",
|
||||
color: "#3E54F1",
|
||||
des: "一.企业综合信用等级评价; 二.企业ESG等级评价",
|
||||
targetUrl: "/appraisal",
|
||||
},
|
||||
{
|
||||
title: "评价结果",
|
||||
color: "#12B4C2",
|
||||
des: "多维度,多方向展示企业评价结果",
|
||||
targetUrl: "/company",
|
||||
},
|
||||
{
|
||||
title: "报告下载",
|
||||
color: "#FF7C30",
|
||||
des: "1.企业综合信用等级报告; 2.企业ESG等级评价",
|
||||
targetUrl: "/report",
|
||||
},
|
||||
{
|
||||
title: "项目简介",
|
||||
color: "#FF2901",
|
||||
des: "项目简介和说明",
|
||||
targetUrl: "/appraisal",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
toLocation(val) {
|
||||
console.log(111);
|
||||
this.$router.push(val);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -47,4 +96,26 @@ export default {
|
|||
font-size: 18px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.el-card {
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
margin-bottom: 20px;
|
||||
|
||||
.card-top {
|
||||
height: 200px;
|
||||
line-height: 200px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
.card-bottom {
|
||||
margin: 20px 0;
|
||||
span {
|
||||
margin-left: 20px;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,242 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<fecr-header />
|
||||
<el-main>
|
||||
<el-dialog :visible.sync="reportVisible" title="预览">
|
||||
<div class="pdf-box">
|
||||
<pdf
|
||||
:src="file"
|
||||
:page="item"
|
||||
v-for="item in numPages"
|
||||
:key="item"
|
||||
:style="{
|
||||
width: numPages === 1 ? '70%' : '100%',
|
||||
height: numPages === 1 ? '70%' : '100%',
|
||||
}"
|
||||
>
|
||||
</pdf>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<span style="float: left; line-height: 50px">共{{ numPages }}页</span>
|
||||
<el-button @click="reportVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="reportVisible = false"
|
||||
>确 认</el-button
|
||||
>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-row type="flex" justify="center"
|
||||
><el-image :src="logo" style="width: 200px"></el-image
|
||||
></el-row>
|
||||
<el-row type="flex" justify="center"
|
||||
><el-col :span="8" style="display: flex"
|
||||
><div
|
||||
v-for="(item, index) in data"
|
||||
:key="index"
|
||||
:class="[item.active ? 'active' : null]"
|
||||
@click="changeActive(index)"
|
||||
style="margin-right: 20px; cursor: pointer"
|
||||
>
|
||||
<span>{{ item.name }}</span>
|
||||
</div></el-col
|
||||
></el-row
|
||||
>
|
||||
<el-row type="flex" justify="center"
|
||||
><el-col :span="8" style="display: flex"
|
||||
><el-input :placeholder="checked.placeholder" v-model="checked.value">
|
||||
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
||||
</el-input>
|
||||
<el-button type="primary" style="margin-left: 20px" @click="search"
|
||||
>检索</el-button
|
||||
></el-col
|
||||
>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 40px"
|
||||
><fecr-table :data="value" :columns="column">
|
||||
<template slot="report" slot-scope="{ url }">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="viewReport(url)"
|
||||
:disabled="!url"
|
||||
>预览</el-button
|
||||
>
|
||||
</template>
|
||||
</fecr-table></el-row
|
||||
>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import FecrHeader from "components/FecrHeader";
|
||||
import FecrTable from "components/FecrTable";
|
||||
import pdf from "vue-pdf";
|
||||
import logo from "assets/svg/logo.png";
|
||||
import { BlobGet } from "api/api";
|
||||
export default {
|
||||
components: { FecrHeader, FecrTable, pdf },
|
||||
data() {
|
||||
return {
|
||||
logo,
|
||||
EsgVisible: false,
|
||||
reportVisible: false,
|
||||
file: "",
|
||||
numPages: "",
|
||||
data: [
|
||||
{
|
||||
name: "名称",
|
||||
active: true,
|
||||
placeholder: "检索名称 ( 如:综合信用评价/ESG评价 )",
|
||||
value: "",
|
||||
},
|
||||
{
|
||||
name: "年度",
|
||||
active: false,
|
||||
placeholder: "检索年度 ( 如:2022年 )",
|
||||
value: "",
|
||||
},
|
||||
{
|
||||
name: "状态",
|
||||
active: false,
|
||||
placeholder: "检索状态 ( 进行/完成 )",
|
||||
value: "",
|
||||
},
|
||||
],
|
||||
form: {
|
||||
name: "",
|
||||
year: "",
|
||||
type: "",
|
||||
date: "",
|
||||
},
|
||||
checked: {
|
||||
name: "名称",
|
||||
active: true,
|
||||
placeholder: "检索名称(如:综合信用评价/ESG评价)",
|
||||
value: "",
|
||||
},
|
||||
value: [],
|
||||
column: [],
|
||||
};
|
||||
},
|
||||
|
||||
mounted() {},
|
||||
|
||||
methods: {
|
||||
changeActive(i) {
|
||||
this.data.forEach((item) => {
|
||||
item.active = false;
|
||||
});
|
||||
this.data[i].active = true;
|
||||
this.checked = this.data[i];
|
||||
},
|
||||
|
||||
search() {
|
||||
this.value = [
|
||||
{
|
||||
评价ID: "Q1aacLGj",
|
||||
评价方式: "企业申报",
|
||||
评价时间: "2022-03-10",
|
||||
评价结果: "B-",
|
||||
评价项目: "综合信用评价",
|
||||
进行状态: "完成",
|
||||
报告: "/file/get_company_report?file_id=6229bbbcd123c0b5485b8c5b",
|
||||
证书: "/file/get_certification?file_id=6229bbbc7960b92d40ee8b07",
|
||||
},
|
||||
{
|
||||
评价ID: "hVygLKko",
|
||||
评价方式: "企业申报",
|
||||
评价时间: "2022-03-12",
|
||||
评价结果: "D",
|
||||
评价项目: "ESG评价",
|
||||
进行状态: "完成",
|
||||
报告: "/file/get_company_esg_report?file_id=622c1019d123c0b5485b8c6a",
|
||||
证书: "/file/get_esg_certification?file_id=622c1019d123c0b5485b8c6c",
|
||||
},
|
||||
];
|
||||
|
||||
this.column = Object.keys(this.value[0]).map((item) => {
|
||||
return { prop: item, label: item };
|
||||
});
|
||||
},
|
||||
|
||||
view(val) {
|
||||
console.log(val);
|
||||
},
|
||||
|
||||
viewReport(val) {
|
||||
this.reportVisible = true;
|
||||
BlobGet(val).then((res) => {
|
||||
this.loadPdfHandler(res);
|
||||
});
|
||||
},
|
||||
|
||||
// pdf加载时
|
||||
loadPdfHandler(url) {
|
||||
var loadingTask = pdf.createLoadingTask(url);
|
||||
loadingTask.promise.then((pdf) => {
|
||||
this.file = loadingTask;
|
||||
this.numPages = pdf.numPages;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
.el-row {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.active {
|
||||
width: 50px;
|
||||
height: 25px;
|
||||
background-color: #4a8af0;
|
||||
color: #fff;
|
||||
border-radius: 6px;
|
||||
text-align: center;
|
||||
|
||||
span {
|
||||
position: relative;
|
||||
right: 5px;
|
||||
bottom: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
.active::before {
|
||||
display: inline-block;
|
||||
content: " ";
|
||||
border-left: 0px solid transparent;
|
||||
border-top: 10px solid transparent;
|
||||
border-right: 10px solid transparent;
|
||||
border-bottom: 10px solid #4a8af0;
|
||||
position: relative;
|
||||
transform: rotate(315deg);
|
||||
left: 8px;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
::v-deep .el-input__inner::placeholder {
|
||||
font-family: "SRL";
|
||||
}
|
||||
|
||||
::v-deep .el-dialog {
|
||||
margin-top: 5vh !important;
|
||||
height: 90vh;
|
||||
}
|
||||
|
||||
::v-deep .el-dialog__body {
|
||||
height: calc(100% - 200px);
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.pdf-box {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
::v-deep .el-dialog__title {
|
||||
font-size: 14px;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue