diff --git a/src/components/FecrBar.vue b/src/components/FecrBar.vue index 8fbc206..70e821e 100644 --- a/src/components/FecrBar.vue +++ b/src/components/FecrBar.vue @@ -21,20 +21,39 @@ export default { }, parseSeries() { const color = ["#66c18c", "#1177b0"]; - return Object.keys(this.data).map((key, index) => { - return { - name: key, - type: "bar", - data: Object.keys(this.data[key]).map((i) => { - return this.data[key][i]; - }), - barWidth: 30, - itemStyle: { - color: color[index], - barBorderRadius: [2], - }, - }; - }); + if (Object.keys(this.data).length === 1) { + const key = Object.keys(this.data)[0] + return { + name:key, + type: "bar", + data: Object.keys(this.data[key]).map(i=>{ + return this.data[key][i]; + }), + barWidth: 30, + itemStyle: { + normal: { + color: function (params) { + return params.data < 0 ? "#f50" : "#5970CA"; + }, + }, + }, + }; + } else { + return Object.keys(this.data).map((key, index) => { + return { + name: key, + type: "bar", + data: Object.keys(this.data[key]).map((i) => { + return this.data[key][i]; + }), + barWidth: 30, + itemStyle: { + color: color[index], + barBorderRadius: [2], + }, + }; + }); + } }, init() { var chart = this.$echarts.init(document.getElementById(this.id), "shine"); @@ -54,8 +73,8 @@ export default { y: "top", padding: [0, 50, 0, 0], data: Object.keys(this.data).map((key) => { - return key; - }) + return key; + }), }, title: { text: "", diff --git a/src/components/FecrTable.vue b/src/components/FecrTable.vue index 6836e6b..eabb9f6 100644 --- a/src/components/FecrTable.vue +++ b/src/components/FecrTable.vue @@ -6,7 +6,7 @@ stripe border :max-height="height || '100%'" - :style="{ background: background }" + :style="{ background: background,minHeight:minHeight }" :span-method="spanMethod" :header-cell-style="headClass" > @@ -79,6 +79,10 @@ export default { }, page: [Object], height: [String], + minHeight:{ + type: String, + default: "auto" + }, background: [String], spanMethod: { type: Function, diff --git a/src/view/appraisal/credit/stepFinancial.vue b/src/view/appraisal/credit/stepFinancial.vue index 3d93e56..cb6d5a2 100644 --- a/src/view/appraisal/credit/stepFinancial.vue +++ b/src/view/appraisal/credit/stepFinancial.vue @@ -16,7 +16,7 @@ 3. 单位:元 - + { - this.data = res.result; + this.data = res.result this.data.length === 0 ? null : (this.columns = Object.keys(this.data[0]).map((item) => { @@ -196,7 +196,12 @@ export default { viewReport(val) { this.reportVisible = true; BlobGet(val).then((res) => { - this.loadPdfHandler(res); + if(res.info){ + this.$message.warning(res.info) + }else{ + this.loadPdfHandler(res); + } + }); }, diff --git a/src/view/company/stepElementsAppraisal.vue b/src/view/company/stepElementsAppraisal.vue index d6fba0f..d9fe4c8 100644 --- a/src/view/company/stepElementsAppraisal.vue +++ b/src/view/company/stepElementsAppraisal.vue @@ -1,44 +1,79 @@ @@ -224,17 +242,15 @@ export default { methods: { init() { - get("/company/financial_elements").then( - (res) => { + get("/company/financial_elements").then((res) => { if (Object.keys(res.result).length === 0) { - this.$emit("getDisabled",{disabled:true,index:4}) + this.$emit("getDisabled", { disabled: true, index: 4 }); } else { - this.data = res.result; + this.data = res.result; this.getTableData(this.selectTable); this.secondaryIndicators(); } - } - ); + }); }, getTableData(val) { @@ -280,4 +296,10 @@ export default { \ No newline at end of file diff --git a/src/view/company/stepRiskAppraisal.vue b/src/view/company/stepRiskAppraisal.vue index fce4500..ababb6c 100644 --- a/src/view/company/stepRiskAppraisal.vue +++ b/src/view/company/stepRiskAppraisal.vue @@ -1,65 +1,84 @@