mode
This commit is contained in:
parent
ed139cde43
commit
3acc5ff6d2
|
@ -104,9 +104,7 @@ export default {
|
|||
cellChange(scope, item) {
|
||||
if (["指标数值", "水平情况"].includes(item.label)) {
|
||||
if (scope.row[item.prop]) {
|
||||
return Number(
|
||||
scope.row[item.prop].slice(0, scope.row[item.prop].length - 1)
|
||||
) > 0
|
||||
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>`
|
||||
|
@ -155,7 +153,7 @@ export default {
|
|||
"指标数值",
|
||||
"水平情况",
|
||||
"指标水平",
|
||||
"影响程度"
|
||||
"影响程度",
|
||||
].includes(item.label)
|
||||
? "SR"
|
||||
: "SRL",
|
||||
|
@ -164,7 +162,11 @@ export default {
|
|||
},
|
||||
watch: {
|
||||
data: {
|
||||
handler() {},
|
||||
handler(val) {
|
||||
if (this.data !== val) {
|
||||
this.data = val;
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
deep: true,
|
||||
},
|
||||
|
|
|
@ -40,20 +40,24 @@
|
|||
<el-card class="right" style="height: auto">
|
||||
<span>指标详情</span>
|
||||
<fecr-table
|
||||
:data="secondaryIndicators().data"
|
||||
:columns="secondaryIndicators().column"
|
||||
:data="secondaryIndicatorsData"
|
||||
:columns="secondaryIndicatorsColumns"
|
||||
:spanMethod="spanMethod"
|
||||
class="top"
|
||||
:height="'400px'"
|
||||
/>
|
||||
</el-card>
|
||||
<el-card class="right" style="height: 325px;overflow:auto">
|
||||
<el-card class="right" style="height: 325px; overflow: auto">
|
||||
<span>释义</span>
|
||||
<div v-for="(item, index) in paraphrase" :key="index">
|
||||
<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>
|
||||
<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>
|
||||
<span>{{ grandson }}</span>
|
||||
</div>
|
||||
|
@ -137,32 +141,7 @@ export default {
|
|||
技术投入比率: ["技术投入比率 = ( 研发费用 - 营业收入 ) * 100%"],
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
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 = [
|
||||
secondaryIndicatorsData: [
|
||||
{
|
||||
一级指标: "盈利能力",
|
||||
二级指标: "净资产收益率",
|
||||
|
@ -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) => {
|
||||
if (i > 0 && Object.keys(this.data).length !== 0) {
|
||||
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"
|
||||
class="top"
|
||||
:shortWidth="[0, 1]"
|
||||
:height="'1200px'"
|
||||
></fecr-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
|
Loading…
Reference in New Issue