mode
This commit is contained in:
parent
54b2e1e41b
commit
bbb2908eff
|
@ -111,10 +111,10 @@ export default {
|
|||
return parseInt(scope.row[item.prop]) > 0
|
||||
? `<span style="color:#409EFF;font-family:'SR'">${
|
||||
scope.row[item.prop]
|
||||
}</span><i style="color:#409EFF" class="el-icon-top"></i>`
|
||||
}</span>`
|
||||
: `<span style="color:#F56C6C;font-family:'SR'">${
|
||||
scope.row[item.prop]
|
||||
}</span><i style="color:#F56C6C" class="el-icon-bottom"></i>`;
|
||||
}</span>`;
|
||||
} else {
|
||||
return scope.row[item.prop];
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
:data="data"
|
||||
@mode="mode"
|
||||
@getSaveState="getSaveState"
|
||||
@getUnit="getUnit"
|
||||
v-else-if="step === 2"
|
||||
/>
|
||||
<step-submit :data="data" @mode="mode" v-else-if="step === 3" />
|
||||
|
@ -84,6 +85,7 @@ export default {
|
|||
data: {},
|
||||
step: 0,
|
||||
saveState: false,
|
||||
unit: "元",
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -114,22 +116,49 @@ export default {
|
|||
this.step--;
|
||||
},
|
||||
|
||||
getUnit(e) {
|
||||
this.unit = e;
|
||||
},
|
||||
|
||||
save() {
|
||||
this.step < 3
|
||||
? JsonPost("/input/save_general_input_form", {
|
||||
input_form: this.data,
|
||||
}).then(() => {
|
||||
this.step++;
|
||||
})
|
||||
: get("/input/submit_general_rating_input").then((res) => {
|
||||
if (res.info === "评分成功,请前往主页查看") {
|
||||
this.$message.success(res.info);
|
||||
this.$router.push("/company");
|
||||
} else {
|
||||
this.$message.warning(res.info);
|
||||
this.$router.push("/appraisal");
|
||||
}
|
||||
if (this.step < 2) {
|
||||
JsonPost("/input/save_general_input_form", {
|
||||
input_form: this.data,
|
||||
}).then(() => {
|
||||
this.step++;
|
||||
});
|
||||
} else if (this.step === 3) {
|
||||
get("/input/submit_general_rating_input").then((res) => {
|
||||
if (res.info === "评分成功,请前往主页查看") {
|
||||
this.$message.success(res.info);
|
||||
this.$router.push("/company");
|
||||
} else {
|
||||
this.$message.warning(res.info);
|
||||
this.$router.push("/appraisal");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Object.keys(this.data["财务填报"]).map((k) => {
|
||||
return this.data["财务填报"][k].map((ele) => {
|
||||
return Object.keys(ele).map((key) => {
|
||||
if (key !== "报告期") {
|
||||
if (this.unit === "万元") {
|
||||
return (ele[key] = ele[key] * 10000);
|
||||
} else if (this.unit === "亿元") {
|
||||
return (ele[key] = ele[key] * 100000000);
|
||||
} else {
|
||||
return ele[key];
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
JsonPost("/input/save_general_input_form", {
|
||||
input_form: this.data,
|
||||
}).then(() => {
|
||||
this.step++;
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -149,7 +178,7 @@ export default {
|
|||
|
||||
.el-footer {
|
||||
width: 100%;
|
||||
margin-top:20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
.el-row {
|
||||
|
|
|
@ -16,7 +16,12 @@
|
|||
<span class="block">3. 单位:元</span>
|
||||
<i class="el-icon-warning warning" slot="reference" />
|
||||
</el-popover>
|
||||
<el-select v-model="unit" style="width:100px">
|
||||
<el-select
|
||||
v-model="unit"
|
||||
style="width: 100px"
|
||||
@change="onChangeUnit"
|
||||
ref="preUnit"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in options"
|
||||
:key="index"
|
||||
|
@ -109,10 +114,6 @@ export default {
|
|||
};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
// console.log(this.data)
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 获取表格column
|
||||
getColumns() {
|
||||
|
@ -121,31 +122,59 @@ export default {
|
|||
});
|
||||
},
|
||||
|
||||
backData(val) {
|
||||
var target = [];
|
||||
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] };
|
||||
onChangeUnit(e) {
|
||||
const preUnit = this.$refs.preUnit.value;
|
||||
const target = {资产负债表:[],利润表:[],补充数据表:[]};
|
||||
var data = Object.keys(this.data["财务填报"]).map((k) => {
|
||||
return this.data["财务填报"][k].map((item) => {
|
||||
return Object.keys(item).map((key) => {
|
||||
if (key !== "报告期") {
|
||||
if (e === "元") {
|
||||
if (preUnit === "万元") {
|
||||
return { [key]: item[key] * 10000 };
|
||||
} else if (preUnit === "亿元") {
|
||||
return { [key]: item[key] * 100000000 };
|
||||
} else {
|
||||
return { [key]: item[key] };
|
||||
}
|
||||
} else if (e === "万元") {
|
||||
if (preUnit === "元") {
|
||||
return { [key]: item[key] / 10000 };
|
||||
} else if (preUnit === "亿元") {
|
||||
return { [key]: item[key] * 10000 };
|
||||
} else {
|
||||
return { [key]: item[key] };
|
||||
}
|
||||
} else {
|
||||
if (preUnit === "元") {
|
||||
return { [key]: item[key] / 100000000 };
|
||||
} else if (preUnit === "万元") {
|
||||
return { [key]: item[key] / 10000 };
|
||||
} else {
|
||||
return { [key]: item[key] };
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return { [key]: item[key]};
|
||||
return { [key]: item[key] };
|
||||
}
|
||||
} else {
|
||||
return { [key]: item[key] };
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
data.forEach((item, index) => {
|
||||
var obj = {};
|
||||
item.forEach((child) => {
|
||||
obj = { ...obj, ...child };
|
||||
item.forEach((ele, i) => {
|
||||
var obj = {};
|
||||
ele.forEach((child) => {
|
||||
obj = { ...obj, ...child };
|
||||
});
|
||||
target[Object.keys(target)[index]][i] = obj;
|
||||
});
|
||||
target[index] = obj;
|
||||
});
|
||||
this.data["财务填报"][this.prop] = target;
|
||||
this.data["财务填报"] = target;
|
||||
},
|
||||
|
||||
backData(val) {
|
||||
this.data["财务填报"][this.prop] = val;
|
||||
},
|
||||
|
||||
isSuccess(val) {
|
||||
|
@ -184,6 +213,7 @@ export default {
|
|||
return item ? true : false;
|
||||
});
|
||||
this.$emit("getSaveState", save);
|
||||
this.$emit("getUnit", this.unit);
|
||||
},
|
||||
immediate: true,
|
||||
deep: true,
|
||||
|
|
|
@ -1,28 +1,21 @@
|
|||
<!-- 行业宏观分析 -->
|
||||
<template>
|
||||
<el-row v-if="Object.keys(data).length !== 0">
|
||||
<el-row><span style="margin-bottom:20px">更新时间:{{ data["更新时间"] }}</span></el-row>
|
||||
<el-row
|
||||
><span style="margin-bottom: 20px"
|
||||
>更新时间:{{ data["更新时间"] }}</span
|
||||
></el-row
|
||||
>
|
||||
<el-col :span="24">
|
||||
<el-card class="left" style="height: auto">
|
||||
<span>工商信息</span>
|
||||
<el-row type="flex" justify="flex-start" class="top last">
|
||||
<el-col
|
||||
<el-descriptions border title="工商信息">
|
||||
<el-descriptions-item
|
||||
v-for="(item, key) in businessColumn"
|
||||
:key="key"
|
||||
:span="item === '经营范围' ? 24 : 8"
|
||||
style="display: flex"
|
||||
:label="item"
|
||||
>{{ data["工商信息"][item] }}</el-descriptions-item
|
||||
>
|
||||
<el-col
|
||||
:span="item === '经营范围' ? 3 : 12"
|
||||
class="business-item"
|
||||
style="background-color: #eaf1f8"
|
||||
><span>{{ item }}</span></el-col
|
||||
>
|
||||
<el-col class="business-item"
|
||||
><span>{{ data["工商信息"][item] }}</span></el-col
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
|
@ -171,10 +164,13 @@ export default {
|
|||
<style lang='scss' scoped>
|
||||
@import "@/assets/css/company.scss";
|
||||
|
||||
.business-item {
|
||||
border-top: 0.25px solid #707070;
|
||||
border-left: 0.25px solid #707070;
|
||||
padding: 10px;
|
||||
::v-deep .el-descriptions-item__cell{
|
||||
font-family: "SR";
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
::v-deep .el-descriptions-item__content{
|
||||
font-family: "SRL";
|
||||
}
|
||||
|
||||
.last {
|
||||
|
|
|
@ -5,18 +5,18 @@
|
|||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-card style="height: 100%" class="left">
|
||||
<p>去年对比图</p>
|
||||
<p>财务得分年度比较</p>
|
||||
<fecr-bar
|
||||
:data="data['去年对比图']"
|
||||
:data="data['财务得分年度比较']"
|
||||
:id="'elements-appraisal-1'"
|
||||
:xAxis="xAxis"
|
||||
v-if="state === 'fifth'"
|
||||
/>
|
||||
</el-card>
|
||||
<el-card class="left" style="height: auto">
|
||||
<p>去年对比表</p>
|
||||
<p>财务得分较去年变化</p>
|
||||
<fecr-bar
|
||||
:data="{'去年对比表':data['去年对比表']}"
|
||||
:data="{'财务得分较去年变化':data['财务得分较去年变化']}"
|
||||
:id="'elements-appraisal-2'"
|
||||
:xAxis="xAxis"
|
||||
v-if="state === 'fifth'"
|
||||
|
@ -25,18 +25,18 @@
|
|||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-card style="height: 100%" class="left">
|
||||
<p>同行对比图</p>
|
||||
<p>财务得分同行比较</p>
|
||||
<fecr-bar
|
||||
:data="data['同行对比图']"
|
||||
:data="data['财务得分同行比较']"
|
||||
:id="'elements-appraisal-3'"
|
||||
:xAxis="xAxis"
|
||||
v-if="state === 'fifth'"
|
||||
/>
|
||||
</el-card>
|
||||
<el-card class="left" style="height: auto">
|
||||
<p>同行对比表</p>
|
||||
<p>财务得分较同行差异</p>
|
||||
<fecr-bar
|
||||
:data="{'同行对比表':data['同行对比表']}"
|
||||
:data="{'财务得分较同行差异':data['财务得分较同行差异']}"
|
||||
:id="'elements-appraisal-4'"
|
||||
:xAxis="xAxis"
|
||||
v-if="state === 'fifth'"
|
||||
|
@ -99,16 +99,6 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
data: {},
|
||||
selectBar: "去年对比图",
|
||||
optionsBar: [
|
||||
{ label: "去年对比图", value: "去年对比图" },
|
||||
{ label: "同行对比图", value: "同行对比图" },
|
||||
],
|
||||
selectTable: "去年对比表",
|
||||
optionsTable: [
|
||||
{ label: "去年对比表", value: "去年对比表" },
|
||||
{ label: "同行对比表", value: "同行对比表" },
|
||||
],
|
||||
tableData: [],
|
||||
column: [
|
||||
{ label: "分析维度", prop: "分析维度" },
|
||||
|
@ -248,18 +238,12 @@ export default {
|
|||
this.$emit("getDisabled", { disabled: true, index: 4 });
|
||||
} else {
|
||||
this.data = res.result;
|
||||
this.getTableData(this.selectTable);
|
||||
this.secondaryIndicators();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
getTableData(val) {
|
||||
this.tableData = Object.keys(this.data[val]).map((key) => {
|
||||
return { 分析维度: key, 水平情况: this.data[val][key] };
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// 二级指标详情
|
||||
secondaryIndicators() {
|
||||
this.secondaryIndicatorsData.forEach((item, index) => {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
type="dashboard"
|
||||
:percentage="data['风险分数']"
|
||||
:format="format"
|
||||
:color="data['风险分数'] > 50 ? '#ff9300' : '#1989fa'"
|
||||
:color="data['风险分数'] > 50 ? '#ff9300' : '#67C23A'"
|
||||
></el-progress
|
||||
><span>高风险</span>
|
||||
</el-row>
|
||||
|
@ -123,7 +123,7 @@ export default {
|
|||
},
|
||||
|
||||
format(percentage) {
|
||||
return percentage;
|
||||
return percentage==0?'0':percentage;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -132,7 +132,7 @@ export default {
|
|||
@import "@/assets/css/company.scss";
|
||||
|
||||
.el-progress {
|
||||
width: 100%;
|
||||
width: 800px;
|
||||
|
||||
::v-deep &-circle {
|
||||
width: 50% !important;
|
||||
|
@ -153,29 +153,42 @@ export default {
|
|||
span:first-child {
|
||||
width: 100px;
|
||||
position: relative;
|
||||
left: 25%;
|
||||
left: 22%;
|
||||
bottom: 50px;
|
||||
color: #6295d8;
|
||||
color: #67C23A;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
span:last-child {
|
||||
width: 100px;
|
||||
position: relative;
|
||||
right: calc(25% - 50px);
|
||||
right: calc(22% - 50px);
|
||||
bottom: 50px;
|
||||
color: #ff9300;
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
.business-item {
|
||||
border-right: 0.25px solid #707070;
|
||||
padding: 20px;
|
||||
padding: 40px;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
|
||||
span{
|
||||
font-size: 20px;
|
||||
font-weight: 800;
|
||||
}
|
||||
}
|
||||
|
||||
.business-item-last {
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
padding: 40px;
|
||||
box-sizing: border-box;
|
||||
span{
|
||||
font-size: 20px;
|
||||
font-weight: 800;
|
||||
}
|
||||
}
|
||||
|
||||
.last {
|
||||
|
|
Loading…
Reference in New Issue