This commit is contained in:
xuyucheng 2023-02-23 16:25:18 +08:00
parent 6eb4f41cff
commit 82e9e8963f
40 changed files with 925 additions and 15397 deletions

15256
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -15,6 +15,7 @@
"animate.css": "^4.1.1",
"axios": "^0.21.1",
"core-js": "^3.6.5",
"docx-preview": "^0.1.15",
"echarts": "^4.9.0",
"element-china-area-data": "^5.0.2",
"element-ui": "^2.15.6",

View File

@ -75,9 +75,9 @@ export default {
});
},
// json - post
post: function (path = '', data = {}) {
post: function (path = '', data = {},type) {
return new Promise(function (resolve, reject) {
axios.post(path, data)
axios.post(path, data,type)
.then(function (response) {
resolve(response.data);
})
@ -103,12 +103,12 @@ export default {
},
// blob - post
BlobPost: function (path = '', data = {}) {
BlobPost: function (path = '', data = {}, type) {
return new Promise(function (resolve, reject) {
axios.post(
path, data, { responseType: 'blob' })
.then(function (response) {
const blob = new Blob([response.data], { type: "application/zip" });
const blob = new Blob([response.data], { type: type });
resolve(URL.createObjectURL(blob));
})
.catch(function (error) {

1
src/assets/img/cat.svg Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="888" height="342.09037" viewBox="0 0 888 342.09037" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="m560.17352,337.74451l-141.4902-4.01703s10.64948-63.71005-23.51938-81.39458c-23.29019-12.05804-43.96497-68.39325-38.08173-106.71785.07639-.5134.15955-1.01984.24985-1.51935,2.98312-17.1642,11.50281-30.45026,27.78589-34.0579,52.65829-11.6556,90.24051-2.61558,90.24051-2.61558,0,0,8.70007.11111,21.59064,2.53224.45786.08334.91583.17345,1.38062.27067,36.49292,7.15295,103.94257,32.61478,106.86353,123.01482,4.01685,124.20117-45.01971,104.50455-45.01971,104.50455Z" fill="#3f3d56"/><path d="m496.9491,109.95447c-.23596,6.48-1.70685,12.91833-4.39169,19.04449-5.56415,12.68933-15.70041,22.38147-28.54221,27.29333-38.45654,14.72224-83.34433.11806-106.04492-15.71413-.09027.4995-1.89392,9.98611-1.97031,10.4995,10.05292,6.87534,59.24219,13.51225,68.57355,13.51225,14.16702,0,27.80692-2.35185,39.94116-7.00017,13.18884-5.05077,23.59558-15.00645,29.31235-28.0359,2.72653-6.21627,4.23199-12.75166,4.50266-19.32872-.46478-.09722-.92279-.18734-1.38062-.27067,0,0,.00003,0,.00003,0Z" fill="#6c63ff"/><path d="m507.41196,118.20499l-22.55432-56.70799s27.06519-46.39745,5.79968-51.55272c-21.2655-5.15527-43.17542,22.55432-43.17542,22.55432,0,0-40.59778-14.177-56.0636-2.57764,0,0-25.77637-36.08691-41.24219-28.99841-15.46582,7.0885,5.49524,58.17995,5.49524,58.17995,0,0-31.91602,46.85873-7.42847,73.9239,24.48755,27.06519,116.63803,48.9751,159.16904-14.82141h.00003Z" fill="#3f3d56"/><path d="m1,336.07767h887v-2H1c-.55228,0-1,.44772-1,1h0c0,.55228.44771,1,1,1Z" fill="#3f3d56"/><path d="m555.78296,303.8031c7.67871,3.41595,15.70148,6.90176,24.09912,6.56833s17.23468-5.74146,18.54321-14.04318c.67554-4.28549-.66425-8.88318.97656-12.89932,2.2077-5.40366,9.3291-7.48755,14.86487-5.63577,5.53571,1.85178,9.60248,6.62695,12.51837,11.68372,5.45538,9.46094,7.64142,21.8782,1.79205,31.1008-5.07068,7.99496-14.68799,11.60773-23.63385,14.70645-11.91602,4.12753-25.21979,8.22409-36.7663,3.15405-11.61261-5.09906-17.93823-19.83136-13.63806-31.76288" fill="#3f3d56"/><path d="m428.73624,92.7071s-13.87567-5.55027-22.89487,1.38757l10.40677,15.95702s12.4881-17.34459,12.4881-17.3446Z" fill="#6c63ff"/><path d="m355.88895,165.5544l25.67001,136.6754s-38.8519,39.54565,11.10052,38.8519c49.95242-.69379,35.38297-26.36377,35.38297-26.36377l-15.95703-118.63701" fill="#3f3d56"/><path d="m391.39893,342.09037c-13.52734,0-21.70996-3.10107-24.32861-9.2251-4.77002-11.15576,10.75732-28.16797,13.41895-30.96631l-17.26074-102.18262,1.97168-.33301,17.42969,103.18262-.35742.36426c-.17969.18311-17.93994,18.44922-13.36279,29.1499,2.35059,5.49609,10.32129,8.19385,23.73633,8.00146,18.64697-.25879,30.67188-4.1665,34.77441-11.29932,3.69434-6.42383-.2085-13.50146-.24854-13.57227l-.09424-.16748-.02637-.19141-11.10059-82.56006,1.98242-.2666,11.07617,82.37842c.65674,1.24756,4.10889,8.45801.15576,15.35693-4.52832,7.90234-16.80566,12.04834-36.4917,12.32178-.42969.00586-.85449.00879-1.27441.00879Z" fill="#2f2e41"/><path d="m421.10464,165.5544l25.67001,136.6754s-38.8519,39.54565,11.10052,38.8519c49.95242-.69379,35.38297-26.36377,35.38297-26.36377l-15.95703-118.63701" fill="#3f3d56"/><path d="m456.61426,342.09037c-13.52734,0-21.70947-3.10107-24.32812-9.2251-4.76562-11.14453,10.72607-28.13477,13.41016-30.95801l-10.31152-54.99609,1.96582-.36816,10.50293,56.01514-.36572.37207c-.17969.18311-17.93994,18.44922-13.3623,29.1499,2.35107,5.49561,10.32617,8.2041,23.73584,8.00146,18.6626-.25928,30.69092-4.17236,34.78467-11.31641,3.69238-6.44434-.21729-13.4834-.25732-13.55371l-.0957-.16846-15.98291-118.82861,1.98242-.2666,15.93262,118.45508c.65674,1.24756,4.10889,8.45801.15576,15.35693-4.52832,7.90234-16.80615,12.04834-36.49219,12.32178-.42969.00586-.85449.00879-1.27441.00879Z" fill="#2f2e41"/></svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

1
src/assets/img/empty.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -14,18 +14,18 @@ $primary: (
$dark: (
aside: #232429,
body: #1b1c21,
input: #191a1f,
input: #333,
border: #27282e,
card: #232429,
color:rgb(255, 255, 255, .87),
menuTag:#082E54
color:rgb(255, 255, 255, 1),
menuTag:#9373EE
);
$light: (
aside: #fafafa,
body: #ffffff,
input: #f3f5f6,
border: rgba(0,0,0,0.09),
border: rgba(0,0,0,0.05),
card: #fafafa,
color:#1f2329,
menuTag:#CCCCCC

View File

@ -54,26 +54,20 @@
margin-right: 15px;
border: none;
&--primary {
@include primary-bgColor(map-get($primary, 1), map-get($dark, color));
}
&__item.is-active {
@include primary-bgColor(map-get($primary, 1), map-get($dark, color));
}
&__item:hover,
&__item:focus {
@include primary-bgColor(map-get($primary, 1), map-get($dark, color));
}
&__close {
color: #ffffff !important;
@include color(map-get($dark, color));
}
&__close:hover {
@include primary-bgColor(map-get($primary, 1), map-get($dark, color));
color: #ffff;
color: #fff;
}
&--primary,
&__item.is-active,
&__item:hover,
&__item:focus {
@include primary-bgColor(map-get($primary, 1), map-get($dark, color));
}
}
@ -398,6 +392,12 @@
color: rgb(255, 255, 255, 0.87);
}
}
&-dropdown__item.is-disabled {
span{
color: #C0C4CC;
}
}
}
// 输入 - input
@ -552,4 +552,52 @@
background-color: transparent;
@include primary-color(map-get($primary, 1));
}
}
.el-range-input,
.el-month-table td .cell {
background: transparent;
@include color(map-get($dark, color));
}
.el-picker-panel {
@include input(map-get($dark, input));
}
.el-date-range-picker__content.is-left {
border: none;
}
.el-date-table td.in-range div,
.el-month-table td.in-range div,
.el-month-table td.in-range div:hover {
@include primary-bgColor(map-get($primary, 1));
}
.el-radio-button__inner {
background-color: transparent;
@include border(map-get($dark, border));
}
.el-radio-button:first-child .el-radio-button__inner {
@include border(map-get($dark, border));
}
.el-radio-button__orig-radio:checked+.el-radio-button__inner {
@include primary-bgColor(map-get($primary, 1));
border-color: transparent;
box-shadow: none;
}
.el-radio-button__inner:hover {
@include primary-color(map-get($primary, 1))
}
.el-range-editor.is-active,
.el-range-editor.is-active:hover {
@include input-border(map-get($primary, 1));
}
.el-date-editor .el-range-separator {
@include color(map-get($dark, color))
}

View File

@ -44,7 +44,6 @@ th {
h2 {
font-size: 16px;
font-family: 800;
padding-left: 10px;
margin: 10px 0;
cursor: pointer;
@ -54,7 +53,7 @@ h2 {
h2:before {
content: "";
display: inline-block;
width: 3px;
width: 5px;
height: 18px;
@include primary-bgColor(map-get($primary, 1), map-get($dark, color));
border-radius: 2px;

View File

@ -19,7 +19,7 @@ Vue.config.productionTip = false
Array.prototype.setColumn = function () {
if (this.length) {
return Object.keys(this[0]).map((item) => {
return Object.keys(this[0]).map((item) => {
return {
prop: item,
label: item,

View File

@ -9,7 +9,7 @@ const store = new Vuex.Store({
token: localStorage.getItem("token") || "",
user: {},
tabsKey: localStorage.getItem("tabsKey") || '0',
tabs: JSON.parse(localStorage.getItem('tabs')) || [],
tabs: JSON.parse(localStorage.getItem('tabs')) || [{ id: "0", label: "首页", content: "home", path: "/home/index" }],
},
getters: {
@ -18,6 +18,9 @@ const store = new Vuex.Store({
},
getTabsKey(state) {
return state.tabsKey
},
getCurrentTab(state) {
return state.tabs.find(item => item.id === state.tabsKey)
}
},

View File

@ -4,25 +4,36 @@ const menu = [
label: "业务功能",
icon: "el-icon-data-line",
requireAuth: true,
path: "/home/subIndex",
children: [
{
id: "1-1",
label: "信用评级",
children: [
{
id: "1-1-1",
label: "模型",
content: "model",
path: "/serviceFunction/creditRating/model/index"
},
{
id: "1-1-2",
label: "指标",
content: "indicators",
path: "/serviceFunction/creditRating/indicators/index"
},
{
id: "1-1-3",
label: "数字评级",
content: "rating",
path: "/serviceFunction/creditRating/rating/index"
},
{
id: "1-1-4",
label: "报告",
content: "report",
path: "/serviceFunction/creditRating/report/index"
},
],
},
@ -45,6 +56,7 @@ const menu = [
label: "企业数据库",
icon: "el-icon-document",
requireAuth: true,
path: "/home/subIndex",
children: [
{ id: "2-1", label: "企业数据库" },
{ id: "2-2", label: "行业数据库" },
@ -57,6 +69,7 @@ const menu = [
label: "支持工具",
icon: "el-icon-connection",
requireAuth: true,
path: "/home/subIndex",
children: [
{ id: "3-1", label: "信用评级市场工具" },
{ id: "3-2", label: "碳排放计算器" },
@ -67,6 +80,7 @@ const menu = [
label: "研究项目",
icon: "el-icon-guide",
requireAuth: true,
path: "/home/subIndex",
children: [{ id: "4-1", label: "城投平台研究" }],
},
]

View File

@ -1,19 +1,14 @@
export function download(res, type, filename) {
const blob = new Blob([res], {
type: type
})
const a = document.createElement('a')
const URL = window.URL || window.webkitURL
const href = URL.createObjectURL(blob)
a.href = href
a.href = res
a.download = filename
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
window.URL.revokeObjectURL(href)
window.URL.revokeObjectURL(res)
}
export function remove(params, deleteItem,index) {
export function remove(params, deleteItem, index) {
const data = []
const key = index || "id"
for (let i = 0; i < params.length; i++) {

View File

@ -22,42 +22,10 @@
:key="item.id"
class="menu-item"
>
<el-popover placement="right" trigger="click">
<el-row style="padding: 10px">
<el-row
:key="k"
v-for="(v, k) in item.children"
class="aside-p"
type="flex"
justify="space-between"
>
<el-tooltip
class="item"
effect="dark"
content="开发中"
placement="right"
v-if="!v.children"
>
<span style="padding: 10px 0">{{ v.label }}</span>
</el-tooltip>
<span style="padding: 10px 0" v-else>{{ v.label }}</span>
<p
:key="i"
v-for="(e, i) in v.children"
class="aside-p-item"
@click="createTab(e)"
>
{{ e.label }}
</p>
</el-row>
</el-row>
<el-row slot="reference">
<i :class="item.icon" style="font-size: 18px" />
<span>{{ item.label }}</span>
</el-row>
</el-popover>
<el-row @click.native="toSkip(item)">
<i :class="item.icon" style="font-size: 18px" />
<span>{{ item.label }}</span>
</el-row>
</el-menu-item>
</el-menu>
<el-row class="footer">
@ -147,14 +115,14 @@ export default {
id: "0",
label: "首页",
content: "home",
path: "/home/index",
});
},
async init() {
const res = await request.get("user/detail");
this.data = res;
this.$store.commit("set_user", res);
if (res.role !== "管理员") {
this.data = await request.get("user/detail");
this.$store.commit("set_user", this.data);
if (this.data.role !== "管理员") {
this.menu = this.menu.filter((item) => {
return !item.requireAuth;
});
@ -171,6 +139,13 @@ export default {
this.themeVisible = false;
},
toSkip(val) {
this.$store.commit(
"set_tabs",
Object.assign(val, { content: "subHome" })
);
},
logOut() {
localStorage.removeItem("token");
localStorage.removeItem("tabs");
@ -284,12 +259,10 @@ h1 {
.menu-t {
margin: 10px;
color: #bfbfbf;
}
.menu-p {
margin: 20px;
color: #8c8c8c;
cursor: pointer;
}

View File

@ -4,25 +4,7 @@
<el-row :key="index" v-for="(item, index) in menu">
<h2>{{ item.label }}</h2>
<el-col :span="3" :key="k" v-for="(v, k) in item.children">
<el-dropdown trigger="click">
<span class="el-dropdown-link">
<p>{{ v.label }}</p>
</span>
<el-dropdown-menu slot="dropdown">
<div v-if="v.children">
<el-dropdown-item
v-for="(e, i) in v.children"
:key="i"
@click.native="createTab(e)"
>
{{ e.label }}
</el-dropdown-item>
</div>
<el-row v-else>
<p style="padding: 0 20px">正在开发中......</p>
</el-row>
</el-dropdown-menu>
</el-dropdown>
<p @click="toSkip(v)">{{ v.label }}</p>
</el-col>
</el-row>
</el-card>
@ -38,19 +20,22 @@ export default {
},
methods: {
createTab(val) {
this.$store.commit("set_tabs", val);
toSkip(val) {
this.$store.commit(
"set_tabs",
Object.assign(val, { content: "subHome",path: "/home/subIndex" })
);
},
},
};
</script>
<style lang='scss' scoped>
.el-card {
padding: 50px;
padding: 20px;
}
.el-row {
margin: 20px 0;
margin: 0 0 20px 0;
}
.el-col {
@ -59,21 +44,11 @@ export default {
line-height: 40px;
text-align: center;
margin: 10px 40px 10px 0;
cursor: pointer;
border-radius: 6px;
}
.el-badge {
width: 100%;
::v-deep &__content {
border: none;
}
}
p {
cursor: pointer;
}
p:hover {
@include primary-color(map-get($primary, 1));
}
.el-col:hover {
@include primary-bgColor(map-get($primary, 1), map-get($dark, color));
}
</style>

View File

@ -0,0 +1,64 @@
<!-- 子首页 -->
<template>
<el-card :body-style="{ height: 'calc(100% - 116px)' }">
<h2 slot="header">{{ data.label }}</h2>
<el-row v-if="data.children">
<el-col :span="3" :key="index" v-for="(item, index) in data.children">
<p @click="toSkip(item)">{{ item.label }}</p>
</el-col>
</el-row>
<el-row
v-else
type="flex"
justify="center"
align="middle"
style="height: 100%"
>
<el-image :src="require('assets/img/empty.svg')" />
</el-row>
</el-card>
</template>
<script>
export default {
data() {
return {
data: {},
};
},
mounted() {
this.data = this.$store.getters.getCurrentTab;
},
methods: {
toSkip(val) {
this.$store.commit(
"set_tabs",
val.content
? val
: Object.assign(val, { content: "subHome", path: "/home/subIndex" })
);
},
},
};
</script>
<style lang='scss' scoped>
::v-deep .el-card__body {
padding: 0 20px;
}
.el-col {
@include mixinColor(map-get($dark, menuTag), menuTag);
height: 40px;
line-height: 40px;
text-align: center;
margin: 10px 40px 10px 0;
cursor: pointer;
border-radius: 6px;
}
.el-image {
height: 400px;
}
</style>

View File

@ -51,9 +51,7 @@ export default {
methods: {
init() {
this.category = this.$store.state.tabs.find((item) => {
return item.id === this.$store.state.tabsKey;
}).category;
this.category = this.$store.getters.getCurrentTab.category;
},
createCategory() {

View File

@ -29,18 +29,18 @@
placeholder="请输入搜索内容"
style="width: 250px"
@keyup.enter.native="init"
></el-input>
/>
<el-button
type="primary"
icon="el-icon-search"
style="margin-left: 20px"
@click="init"
></el-button>
/>
</div>
<div>
<el-button type="primary" @click="setIndicatorsCategory"
>分类管理</el-button
>
<el-button type="primary" @click="setIndicatorsCategory">
分类管理
</el-button>
<el-button type="primary" @click="createIndicators">新建</el-button>
</div>
</el-row>
@ -115,6 +115,7 @@ export default {
id: "新建指标",
label: "新建指标",
content: "indicatorsCreate",
path: "/serviceFunction/creditRating/indicators/create",
});
},
@ -140,6 +141,7 @@ export default {
label: "指标分类",
content: "category",
category: "indicator",
path: "/serviceFunction/creditRating/category/index",
});
},
@ -148,6 +150,7 @@ export default {
id: val.iid,
label: val.cname,
content: "indicatorsDetails",
path: "/serviceFunction/creditRating/indicators/details",
});
},
},
@ -176,7 +179,7 @@ export default {
height: 100%;
.el-aside {
@include mixinColor(map-get($dark,card),card);
@include mixinColor(map-get($dark, card), card);
padding: 20px;
.el-checkbox-group {
margin-bottom: 20px;
@ -202,7 +205,7 @@ export default {
.el-main {
margin-left: 20px;
@include mixinColor(map-get($dark,card),card);
@include mixinColor(map-get($dark, card), card);
padding: 20px;
}
}

View File

@ -296,6 +296,7 @@ export default {
id: "indicator" + res.id,
label: res.cname,
content: "indicatorsDetails",
path: "/serviceFunction/creditRating/indicators/details",
});
});
},

View File

@ -135,6 +135,7 @@ export default {
label: "模型分类",
content: "category",
category: "model",
path: "/serviceFunction/creditRating/category/index",
});
},
@ -143,6 +144,7 @@ export default {
id: "新建模型",
label: "新建模型",
content: "modelCreate",
path: "/serviceFunction/creditRating/model/create"
});
},
@ -151,6 +153,7 @@ export default {
id: val.id,
label: val.name,
content: "modelDetails",
path: "/serviceFunction/creditRating/model/details"
});
},
},

View File

@ -44,7 +44,7 @@
<el-select
v-model="process.scorecard_id"
v-scroll="handleScroll"
@change="handlerChange"
@change="handleChange"
>
<el-option
v-for="(item, index) in scoreCard"
@ -128,7 +128,7 @@ export default {
this.process.company_id = res.detail[0].id;
},
handlerChange(val) {
handleChange(val) {
this.process.scorecard = this.scoreCard.find((item) => {
return item.id === val;
}).name;
@ -143,6 +143,7 @@ export default {
label: this.process.company,
content: "process",
param: res,
path:"/serviceFunction/creditRating/rating/process/index",
});
this.$store.commit(
"delete_tabs_item",

View File

@ -179,9 +179,7 @@ export default {
methods: {
async init() {
this.title = this.$store.state.tabs.find((item) => {
return item.id === this.$store.state.tabsKey;
}).label;
this.title = this.$store.getters.getCurrentTab.label;
const id =
this.$store.state.tabsKey.indexOf("评级") === -1
? this.$store.state.tabsKey

View File

@ -120,6 +120,7 @@ export default {
id: "新建评级",
label: "新建评级",
content: "ratingCreate",
path: "/serviceFunction/creditRating/rating/create",
});
},
@ -129,6 +130,7 @@ export default {
id: val.rating_flow_id,
label: val["测评企业"],
content: "ratingDetail",
path: "/serviceFunction/creditRating/rating/detail",
});
} else {
this.$store.commit("set_tabs", {
@ -136,6 +138,7 @@ export default {
label: val["测评企业"],
content: "process",
param: val,
path: "/serviceFunction/creditRating/rating/process/index",
});
}
},

View File

@ -58,9 +58,7 @@ export default {
error: "",
value: [],
data: [],
id: this.$store.state.tabs.find(
(item) => item.id === this.$store.state.tabsKey
).param.rating_flow_id,
id: this.$store.getters.getCurrentTab.param.rating_flow_id,
};
},

View File

@ -2,7 +2,7 @@
<template>
<el-row class="row">
<government v-if="data['外部支持类型'] === '政府'" :data="data" />
<shareholders v-if="data['外部支持类型'] === '股东'" :data="data"/>
<shareholders v-if="data['外部支持类型'] === '股东'" :data="data" />
<el-row type="flex" justify="space-between">
<el-button @click="$emit('setActive', 2)" type="primary">
上一步
@ -43,7 +43,7 @@ export default {
实体违约的负面影响: null,
实体对政府的重要性: null,
政府支持意愿: null,
股东支持重要性:null,
股东支持重要性: null,
},
};
},
@ -99,6 +99,7 @@ export default {
return item.id === this.id;
}).label,
content: "ratingDetail",
path: "/serviceFunction/creditRating/rating/details",
});
this.$store.commit(
"delete_tabs_item",

View File

@ -0,0 +1,89 @@
<template>
<el-row type="flex" justify="center" align="middle">
<el-form :model="form" label-position="left" label-width="120px">
<el-form-item label="报告">
<el-select v-model="form.report">
<el-option v-for="item in ['主体信用评级报告模板']" :key="item" :label="item" :value="item" />
</el-select>
</el-form-item>
<el-form-item label="日期">
<el-date-picker v-model="form.begin_date" type="year" placeholder="选择初始年份" value-format="yyyy"
@change="handleChange">
</el-date-picker>
</el-form-item>
<el-form-item label="评级流程">
<el-select v-model="form.rating_process_id" v-scroll="handleScroll" style="width:450px">
<el-option v-for="(item, index) in options" :key="index" :label="item['测评企业'] + ' - ' + item['测评模型']"
:value="item.rating_flow_id" :disabled="item['测评状态'] !== '完成'"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="danger" @click="cancel"> </el-button>
<el-button type="primary" @click="submit">下一步</el-button>
</el-form-item>
</el-form>
</el-row>
</template>
<script>
import request from "@/api/request";
export default {
data() {
return {
form: {
rating_process_id: "",
report: "主体信用评级报告模板",
begin_date: "",
end_date: "",
},
date: "",
page: {
page: 1,
pagesize: 10,
},
options: [],
};
},
created() {
this.getRating();
},
methods: {
handleScroll() {
this.page.page++;
this.getRating();
},
async getRating() {
const res = await request.post("rating_flow/list", this.page);
this.options = this.options.concat(res.items);
},
handleChange(val) {
this.form.end_date = Number(val) + 4
},
cancel() {
const id = this.id || '新建报告';
this.$store.commit(
"delete_tabs_item",
this.$store.state.tabs.find((item) => {
return item.id === id;
})
);
},
async submit() {
const res = await request.post("report_generation/create", this.form)
this.$emit("setStep", { active: 1, id: res.report_generation_id })
},
},
};
</script>
<style lang="scss" scoped>
.el-row {
margin-top: 10%;
}
</style>

View File

@ -0,0 +1,56 @@
<template>
<el-card>
<el-steps :active="active">
<el-step v-for="(item, index) in steps" :key="index" :title="item.label"></el-step>
</el-steps>
<first-step v-if="active === 0" @setStep="setStep" />
<second-step v-else-if="active === 1" :id="id" @setStep="setStep" />
<third-step v-else :id="id" @setStep="setStep" />
</el-card>
</template>
<script>
import firstStep from "./firstStep";
import secondStep from "./secondStep";
import thirdStep from "./thirdStep"
export default {
components: { firstStep, secondStep, thirdStep },
data() {
return {
id: this.$store.getters.getCurrentTab.param?this.$store.getters.getCurrentTab.param.report_generation_id : null,
active: 0,
steps: [
{ label: "流程选择" },
{ label: "数据填报" },
{ label: "初稿预览" },
],
};
},
created() {
},
methods: {
setStep(value) {
this.id = value.id
this.active = value.active
}
}
};
</script>
<style lang="scss" scoped>
.el-card {
::v-deep &__body {
margin-top: 20px;
height: calc(100% - 60px);
.el-steps {
width: 60%;
margin: 0 auto 20px auto;
}
}
}
</style>

View File

@ -0,0 +1,253 @@
<template>
<el-container>
<el-header>
<el-row type="flex" justify="space-between">
<span>
<el-button type="primary" @click="getRatingResult">导入结果数据</el-button>
<el-button type="primary" @click="getRemainData">导入剩余数据</el-button>
<el-button type="primary" @click="submit">保存</el-button>
</span>
<span>
<el-button type="primary" @click="setStep(0)">上一步</el-button>
<el-button type="primary" @click="setStep(2)">下一步</el-button>
</span>
</el-row>
</el-header>
<el-container v-loading="loading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading"
:element-loading-background="loadingBackground">
<el-aside>
<el-input placeholder="关键字查询" v-model="filterText" />
<el-tree :data="treeList" :filter-node-method="filterNode" ref="tree" @node-click="nodeClick" />
</el-aside>
<el-main>
<el-form :model="data" label-position="left" ref="form">
<el-row v-for="(_, key) in data" :key="key" class="content">
<el-row type="flex" align="middle" class="content-top">
<h2 :id="key">{{ key }}</h2>
</el-row>
<el-row type="flex" align="middle" class="content-top">
<fecr-tran-table v-if="key === '财务指标数据'" :data="setData(data[key])" :column="setColumn(data[key])"
@backData="(val) => { backData(val, key) }" style="margin-top:20px" />
<el-row v-else-if="key === '评级指标'" class="tag-row">
<el-row :gutter="48" v-for="(v, k) in data[key]" :key="k" class="tag-row">
<el-col :span="5" v-for="(m, n) in v" :key="n">
<template v-if="!k">
<el-tag type="primary">{{ m }}</el-tag>
</template>
<template v-else>
<el-input v-model="data[key][k][n]"></el-input>
</template>
</el-col>
<el-col :span="2">
<el-tag type="primary" v-if="!k">操作</el-tag>
<el-button type="danger" style="width:100%" v-else>删除</el-button>
</el-col>
</el-row>
<el-button type="primary" @click="add(key)">添加</el-button>
</el-row>
<el-row v-else-if="key === '分析师信息'" class="tag-row">
<el-row :gutter="48" class="tag-row">
<el-col :span="6">
<el-tag type="primary">分析师姓名</el-tag>
</el-col>
<el-col :span="6">
<el-tag type="primary">分析师邮箱</el-tag>
</el-col>
<el-col :span="2">
<el-tag type="primary">操作</el-tag>
</el-col>
</el-row>
<el-row :gutter="48" class="tag-row" v-for="(v, k) in data[key]" :key="k">
<el-col :span="6" v-for="(m, n) in v" :key="n">
<el-input v-model="data[key][k][n]"></el-input>
</el-col>
<el-col :span="2">
<el-button type="danger" style="width:100%">删除</el-button>
</el-col>
</el-row>
<el-button type="primary" @click="() => { data[key].push([null, null]) }">添加</el-button>
</el-row>
<el-row v-else-if="key === '主要财务数据' || key === '公司主要财务数据及指标'" class="tag-row">
<fecr-table style="margin-top:20px" :data="data[key]" :column="data[key].setColumn()"></fecr-table>
</el-row>
<el-form-item v-else>
<el-input v-model="data[key]" type="textarea"></el-input>
</el-form-item>
</el-row>
</el-row>
</el-form>
</el-main>
</el-container>
</el-container>
</template>
<script>
import request from "@/api/request";
import FecrTable from "@/components/FecrTable"
import FecrTranTable from "@/components/FecrTranTable";
export default {
components: { FecrTable, FecrTranTable },
props: {
id: [String],
},
data() {
return {
loading: true,
filterText: "",
treeList: [],
data: {},
loadingBackground:"rgba(0, 0, 0, 0.8)"
};
},
created() {
this.init();
},
methods: {
async init() {
this.loadingBackground = localStorage.getItem("theme") ==='dark-theme' ?'rgba(0, 0, 0, 0.8)':'#fff';
const res = await request.post("report_generation/data_template", {
report_generation_id: this.id,
});
this.data = res.content;
this.treeList = this.recursion(res.content);
this.loading = false
},
setData(val) {
return Object.keys(val).map((key) => {
return Object.assign(val[key], { 报告期: key });
});
},
async getRatingResult() {
this.loading = true
const res = await request.post("report_generation/rating_result", { report_generation_id: this.id })
this.data = res.content
this.loading = false
},
async getRemainData() {
this.loading = true
const res = await request.post("report_generation/remaining_data", { report_generation_id: this.id })
this.data = res.content;
this.treeList = this.recursion(res.content);
this.loading = false
},
setColumn(val) {
if (val) {
return Object.keys(val[Object.keys(val)[0]]).map((item) => {
return item;
});
} else {
return [];
}
},
recursion(value) {
return Object.keys(value).map((key) => {
return {
label: key,
children:
value[key] && typeof value[key] === "object"
? this.recursion(value[key])
: null,
};
});
},
filterNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
nodeClick(value) {
document.getElementById(value.label).scrollIntoView({ behavior: "smooth", block: "start" })
},
backData(val, key) {
this.data[key][Object.keys(this.data[key])[val.index]][val.key] = val.value
},
add(key) {
const data = this.data[key][0].map(() => {
return []
})
this.data[key].push(data)
},
async submit() {
const res = await request.post("report_generation/save_data", {
report_generation_id: this.id,
report_data: this.data
})
},
setStep(num) {
this.$emit("setStep", { active: num, id: this.id })
}
},
watch: {
filterText(val) {
this.$refs.tree.filter(val);
},
},
};
</script>
<style lang="scss" scoped>
.el-container {
height: calc(100% - 117px);
.el-header {
padding: 0;
}
.el-aside {
padding-right: 30px;
}
}
.el-tree {
margin-top: 20px;
}
.content {
margin-bottom: 20px;
&-top {
h2 {
font-family: "SRL";
font-size: 14px;
}
h2:after {
content: "";
position: absolute;
width: 100%;
height: 0px;
border-top: 1px dashed #eee;
top: 22px;
margin-left: 20px;
}
.el-form-item {
margin: 10px 0;
width: calc(100% - 30px);
}
}
}
.tag-row {
width: 100%;
margin: 15px 0;
.el-tag {
width: 100%;
text-align: center;
}
}
</style>

View File

@ -0,0 +1,85 @@
<!-- 模型 -->
<template>
<el-container>
<el-header>
<el-row type="flex" justify="space-between">
<el-button type="primary" @click="setStep">上一步</el-button>
<div>
<el-button type="primary" @click="downloadReport">下载报告</el-button>
<el-button type="primary" style="float:right" @click="submit">
确认报告无误
</el-button>
</div>
</el-row>
</el-header>
<el-main v-loading="loading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading"
:element-loading-background="loadingBackground">
<div ref="container"></div>
</el-main>
</el-container>
</template>
<script>
let docx = require("docx-preview");
import request from "@/api/request"
import { download } from "@/utils/utils"
export default {
props: {
id: [String]
},
data() {
return {
loading: true,
loadingBackground: "rgba(0, 0, 0, 0.8)"
};
},
created() {
this.init()
},
methods: {
async init() {
this.loadingBackground = localStorage.getItem("theme") === 'dark-theme' ? 'rgba(0, 0, 0, 0.8)' : '#fff';
await request.post("report_generation/generation", { report_generation_id: this.id })
const url = await request.post("report_generation/download", { report_generation_id: this.id }, { responseType: 'blob' })
docx.renderAsync(url, this.$refs.container);
this.loading = false
},
async downloadReport() {
this.loading = true
const res = await request.BlobPost("report_generation/download", { report_generation_id: this.id }, 'application/vnd.openxmlformats-officedocument.wordprocessingml.document')
download(res, 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', '报告')
this.loading = false
},
setStep() {
this.$emit("setStep", { active: 1, id: this.id })
},
async submit() {
await request.post("report_generation/confirm", { report_generation_id: this.id })
this.$store.commit(
"delete_tabs_item",
this.$store.state.tabs.find((item) => {
return item.id === '新建报告';
})
);
}
}
}
</script>
<style lang='scss' scoped>
.el-header {
padding: 0;
}
.el-row {
.el-col {
font-size: 14px;
}
}
</style>

View File

@ -0,0 +1,146 @@
<!-- 评级 -->
<template>
<el-card>
<el-row slot="header">
<el-form :model="form" label-position="left" label-width="80px">
<el-row type="flex" justify="space-between">
<el-row type="flex">
<el-form-item label="企业名称">
<el-input v-model="form.company" placeholder="企业名称" suffix-icon="el-icon-search" />
</el-form-item>
<el-form-item label="报告时间" style="margin-left: 20px">
<el-date-picker v-model="form.date" type="daterange" range-separator="" start-placeholder="开始日期"
end-placeholder="结束日期" />
<el-button type="primary" @click="init" style="margin-left:20px"> </el-button>
</el-form-item>
</el-row>
<span>
<el-button type="primary" @click="createReport"> </el-button>
</span>
</el-row>
<el-form-item label="状态">
<el-radio-group size="small" v-model="form.status" @input="init">
<el-radio-button v-for="(item, index) in ['不限', '已完成', '进行中', '等待中']" :key="index" :label="item" />
</el-radio-group>
</el-form-item>
<el-form-item label="所属">
<el-radio-group size="small" v-model="form.belong" @input="init">
<el-radio-button v-for="(item, index) in ['不限', '我的']" :key="index" :label="item" />
</el-radio-group>
</el-form-item>
</el-form>
</el-row>
<el-row style="height: calc(100% - 60px)">
<fecr-table :page="form" :total="data.total" :slots="['状态', '操作']" :data="data.items"
:column="data.items.setColumn().concat({ prop: '操作', label: '操作' })" @handlePageChange="handlePageChange">
<template slot="状态" slot-scope="value">
<span :style="{
color:
value.value['状态'] === '完成' ? '#87d068' : '#409eff',
marginRight: '10px',
}">{{ value.value["状态"] }}</span>
<i :style="{
color:
value.value['状态'] === '完成' ? '#87d068' : '#409eff',
}" :class="
value.value['状态'] === '完成'
? 'el-icon-check'
: 'el-icon-loading'
"></i>
</template>
<template slot="操作" slot-scope="value">
<el-button type="text" @click="view(value.value)">查看</el-button>
<el-button type="text" :disabled="value.value['状态'] !== '完成'" @click="viewReport(value.value.id)">报告</el-button>
<el-popconfirm title="确认删除?" @confirm="remove(value.value)">
<el-button type="text" slot="reference" style="margin-left: 20px">删除</el-button>
</el-popconfirm>
</template>
</fecr-table>
</el-row>
<fecr-dialog :visible="visible" @cancel="visible = false" @submit="visible = false">
<template slot="body">
<div ref="container"></div>
</template>
</fecr-dialog>
</el-card>
</template>
<script>
let docx = require("docx-preview");
import request from "@/api/request";
import FecrTable from "@/components/FecrTable";
import FecrDialog from "@/components/FecrDialog"
export default {
components: { FecrTable,FecrDialog },
data() {
return {
visible: false,
data: {
total: 0,
items: [],
},
form: {
company: null,
page: 1,
pagesize: 10
},
};
},
created() {
this.init();
},
methods: {
async init() {
const res = await request.post("report_generation/query", this.form)
this.data = res.content
},
handlePageChange(val) {
Object.assign(this.form, val);
this.init();
},
createReport() {
this.$store.commit("set_tabs", {
id: "新建报告",
label: "新建报告",
content: "reportCreate",
path: "/serviceFunction/creditRating/report/create/index",
});
},
view(val) {
this.$store.commit("set_tabs", {
id: val.report_generation_id,
label: val['报告模板'],
content: "reportCreate",
param: val,
path: "/serviceFunction/creditRating/report/create/index",
});
},
async viewReport(id) {
this.visible = true
const url = await request.post("report_generation/download", { report_generation_id: id }, { responseType: 'blob' })
docx.renderAsync(url, this.$refs.container);
},
async remove(val) {
await request.post("report_generation/delete", { report_generation_id: val.report_generation_id })
this.init()
},
},
};
</script>
<style lang='scss' scoped>
.el-input {
width: 250px;
}
::v-deep .el-card__body {
height: calc(100% - 224px);
padding: 0 20px
}
</style>

View File

@ -52,22 +52,15 @@
</el-popover>
<div ref="draggable">
<draggable v-model="tabs" @end="dragEnd" style="display: flex">
<el-tooltip
class="item"
effect="dark"
:content="item.label"
placement="bottom"
<el-tag
:key="item.id"
v-for="item in tabs"
closable
@close.stop.prevent="handleClose(item)"
@click.stop.prevent="handleClick(item)"
:class="['tabs-tag', tabsKey == item.id ? 'is-active' : null]"
>{{ item.label }}</el-tag
>
<el-tag
closable
@close.stop.prevent="handleClose(item)"
@click.stop.prevent="handleClick(item)"
:class="['tabs-tag', tabsKey == item.id ? 'is-active' : null]"
>{{ item.label }}</el-tag
>
</el-tooltip>
</draggable>
</div>
<el-dropdown trigger="click">
@ -94,9 +87,9 @@
<el-row style="height: calc(100% - 52px)">
<keep-alive>
<component
:is="current.content"
:is="initPath(current.path)"
:key="current.id"
v-if="current.id == tabsKey"
v-if="current"
class="animate__animated animate__fadeIn"
/>
</keep-alive>
@ -109,48 +102,16 @@
import { menu } from "@/utils/menu";
import draggable from "vuedraggable";
import FecrAside from "./aside/index";
import home from "./content/home/index";
import model from "./content/model/index";
import modelDetails from "./content/model/details";
import modelCreate from "./content/model/create";
import indicators from "./content/indicators/index";
import indicatorsDetails from "./content/indicators/details";
import indicatorsCreate from "./content/indicators/create";
import rating from "./content/rating/index";
import ratingCreate from "./content/rating/create";
import ratingDetail from "./content/rating/detail";
import process from "./content/rating/process/index";
import gep from "./content/gep/index";
import gepProcess from "./content/gep/process/index";
import gepCreate from "./content/gep/create";
import category from "./content/category/index";
import setting from "./content/setting/index";
export default {
components: {
draggable,
FecrAside,
home,
model,
modelDetails,
modelCreate,
indicators,
indicatorsDetails,
indicatorsCreate,
process,
rating,
ratingCreate,
ratingDetail,
gep,
gepProcess,
gepCreate,
category,
setting,
},
data() {
return {
tabs: this.$store.getters.getTabs,
tabsKey: this.$store.getters.getTabsKey,
current: {},
current: { id: "0", label: "首页", content: "home", path: "/home/index" },
menu,
};
},
@ -166,6 +127,10 @@ export default {
},
methods: {
initPath(val) {
return require("./content" + val + ".vue").default;
},
dragEnd() {
this.$store.commit("set_tabs_sort", this.tabs);
},
@ -183,18 +148,7 @@ export default {
},
setCurrent() {
this.current = this.tabs.find((item) => {
return item.id === this.tabsKey;
});
this.current =
this.current === undefined
? ({ id: "0", label: "首页", content: "home" },
this.$store.commit("set_tabs", {
id: "0",
label: "首页",
content: "home",
}))
: this.current;
this.current = this.$store.getters.getCurrentTab;
},
handleClick(val) {
@ -222,7 +176,7 @@ export default {
);
}
this.current = this.tabs.length ? this.tabs[key + 1] : {};
this.current = this.$store.getters.getCurrentTab;
},
clearAll() {
@ -256,13 +210,12 @@ export default {
watch: {
"$store.state.tabsKey"() {
this.loading = true;
this.tabsKey = this.$store.getters.getTabsKey;
this.setCurrent();
},
"$store.state.tabs"() {
this.tabs = this.$store.getters.getTabs;
this.setCurrent();
this.$nextTick(() => {
this.setExpand();
});
@ -293,12 +246,12 @@ export default {
@include mixinColor(map-get($dark, aside), aside);
}
.tabs-tag:hover {
@include primary-bgColor(map-get($primary, 1), map-get($dark, color));
}
.tabs-tag:hover,
.is-active {
@include primary-bgColor(map-get($primary, 1), map-get($dark, color));
::v-deep .el-tag__close {
color: #fff;
}
}
.menu-item {