mode
This commit is contained in:
parent
ed139cde43
commit
3acc5ff6d2
|
@ -104,9 +104,7 @@ export default {
|
||||||
cellChange(scope, item) {
|
cellChange(scope, item) {
|
||||||
if (["指标数值", "水平情况"].includes(item.label)) {
|
if (["指标数值", "水平情况"].includes(item.label)) {
|
||||||
if (scope.row[item.prop]) {
|
if (scope.row[item.prop]) {
|
||||||
return Number(
|
return parseInt(scope.row[item.prop]) > 0
|
||||||
scope.row[item.prop].slice(0, scope.row[item.prop].length - 1)
|
|
||||||
) > 0
|
|
||||||
? `<span style="color:#409EFF;font-family:'SR'">${
|
? `<span style="color:#409EFF;font-family:'SR'">${
|
||||||
scope.row[item.prop]
|
scope.row[item.prop]
|
||||||
}</span><i style="color:#409EFF" class="el-icon-top"></i>`
|
}</span><i style="color:#409EFF" class="el-icon-top"></i>`
|
||||||
|
@ -155,7 +153,7 @@ export default {
|
||||||
"指标数值",
|
"指标数值",
|
||||||
"水平情况",
|
"水平情况",
|
||||||
"指标水平",
|
"指标水平",
|
||||||
"影响程度"
|
"影响程度",
|
||||||
].includes(item.label)
|
].includes(item.label)
|
||||||
? "SR"
|
? "SR"
|
||||||
: "SRL",
|
: "SRL",
|
||||||
|
@ -164,7 +162,11 @@ export default {
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
data: {
|
data: {
|
||||||
handler() {},
|
handler(val) {
|
||||||
|
if (this.data !== val) {
|
||||||
|
this.data = val;
|
||||||
|
}
|
||||||
|
},
|
||||||
immediate: true,
|
immediate: true,
|
||||||
deep: true,
|
deep: true,
|
||||||
},
|
},
|
||||||
|
|
|
@ -40,8 +40,8 @@
|
||||||
<el-card class="right" style="height: auto">
|
<el-card class="right" style="height: auto">
|
||||||
<span>指标详情</span>
|
<span>指标详情</span>
|
||||||
<fecr-table
|
<fecr-table
|
||||||
:data="secondaryIndicators().data"
|
:data="secondaryIndicatorsData"
|
||||||
:columns="secondaryIndicators().column"
|
:columns="secondaryIndicatorsColumns"
|
||||||
:spanMethod="spanMethod"
|
:spanMethod="spanMethod"
|
||||||
class="top"
|
class="top"
|
||||||
:height="'400px'"
|
:height="'400px'"
|
||||||
|
@ -53,7 +53,11 @@
|
||||||
<p>{{ index }}</p>
|
<p>{{ index }}</p>
|
||||||
<div v-for="(child, i) in item" :key="i" style="margin-bottom: 10px">
|
<div v-for="(child, i) in item" :key="i" style="margin-bottom: 10px">
|
||||||
<span>{{ i }}:</span>
|
<span>{{ i }}:</span>
|
||||||
<div v-for="(grandson, j) in child" :key="j" style="margin-top:10px">
|
<div
|
||||||
|
v-for="(grandson, j) in child"
|
||||||
|
:key="j"
|
||||||
|
style="margin-top: 10px"
|
||||||
|
>
|
||||||
<div class="badge"></div>
|
<div class="badge"></div>
|
||||||
<span>{{ grandson }}</span>
|
<span>{{ grandson }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -137,32 +141,7 @@ export default {
|
||||||
技术投入比率: ["技术投入比率 = ( 研发费用 - 营业收入 ) * 100%"],
|
技术投入比率: ["技术投入比率 = ( 研发费用 - 营业收入 ) * 100%"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
secondaryIndicatorsData: [
|
||||||
},
|
|
||||||
|
|
||||||
mounted() {
|
|
||||||
this.init();
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
init() {
|
|
||||||
JsonPost("/company/company_index", { table: "财务要素分析" }).then(
|
|
||||||
(res) => {
|
|
||||||
this.data = res.result;
|
|
||||||
this.getTableData(this.selectTable);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
getTableData(val) {
|
|
||||||
this.tableData = Object.keys(this.data[val]).map((key) => {
|
|
||||||
return { 分析维度: key, 水平情况: this.data[val][key] };
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// 二级指标详情
|
|
||||||
secondaryIndicators() {
|
|
||||||
const data = [
|
|
||||||
{
|
{
|
||||||
一级指标: "盈利能力",
|
一级指标: "盈利能力",
|
||||||
二级指标: "净资产收益率",
|
二级指标: "净资产收益率",
|
||||||
|
@ -207,7 +186,7 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
一级指标: "债务风险",
|
一级指标: "债务风险",
|
||||||
二级指标: "速冻比率",
|
二级指标: "速动比率",
|
||||||
指标数值: "",
|
指标数值: "",
|
||||||
指标水平: "",
|
指标水平: "",
|
||||||
},
|
},
|
||||||
|
@ -229,27 +208,46 @@ export default {
|
||||||
指标数值: "",
|
指标数值: "",
|
||||||
指标水平: "",
|
指标水平: "",
|
||||||
},
|
},
|
||||||
];
|
],
|
||||||
|
secondaryIndicatorsColumns: [
|
||||||
|
{ label: "一级指标", prop: "一级指标" },
|
||||||
|
{ label: "二级指标", prop: "二级指标" },
|
||||||
|
{ label: "指标数值", prop: "指标数值" },
|
||||||
|
{ label: "指标水平", prop: "指标水平" },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
data.forEach((item, index) => {
|
mounted() {
|
||||||
|
this.init();
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
init() {
|
||||||
|
JsonPost("/company/company_index", { table: "财务要素分析" }).then(
|
||||||
|
(res) => {
|
||||||
|
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) => {
|
||||||
Object.keys(item).forEach((key, i) => {
|
Object.keys(item).forEach((key, i) => {
|
||||||
if (i > 0 && Object.keys(this.data).length !== 0) {
|
if (i > 0 && Object.keys(this.data).length !== 0) {
|
||||||
item[key] = this.data["指标详情"][index][i - 1];
|
item[key] = this.data["指标详情"][index][i - 1];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
const column = [
|
|
||||||
{ label: "一级指标", prop: "一级指标" },
|
|
||||||
{ label: "二级指标", prop: "二级指标" },
|
|
||||||
{ label: "指标数值", prop: "指标数值" },
|
|
||||||
{ label: "指标水平", prop: "指标水平" },
|
|
||||||
];
|
|
||||||
|
|
||||||
return {
|
|
||||||
data,
|
|
||||||
column,
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 二级指标表的合并方法
|
// 二级指标表的合并方法
|
||||||
|
|
|
@ -54,6 +54,7 @@
|
||||||
:columns="sideRiskColumn"
|
:columns="sideRiskColumn"
|
||||||
class="top"
|
class="top"
|
||||||
:shortWidth="[0, 1]"
|
:shortWidth="[0, 1]"
|
||||||
|
:height="'1200px'"
|
||||||
></fecr-table>
|
></fecr-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
Loading…
Reference in New Issue