diff --git a/src/views/trials/trials-panel/trial-summary/report-forms/index.vue b/src/views/trials/trials-panel/trial-summary/report-forms/index.vue index ac2b5dab..2601170c 100644 --- a/src/views/trials/trials-panel/trial-summary/report-forms/index.vue +++ b/src/views/trials/trials-panel/trial-summary/report-forms/index.vue @@ -18,8 +18,9 @@
-
+
+ ORR: {{ ORR }}
@@ -55,6 +56,18 @@ export default { searchData: { TrialReadingCriterionId: null }, + color: [ + '#0ca8df', + '#ffd10a', + '#b6d634', + '#3fbe95', + '#785db0', + '#5070dd', + '#505372', + '#ff994d', + '#fb628b', + + ], trialCriterionList: [], loading_left: false, chart_left: null, @@ -62,6 +75,8 @@ export default { chart_right: null, loading_bottom: false, chart_bottom: null, + chart_bottom_right: null, + ORR: null } }, created() { @@ -130,6 +145,7 @@ export default { title: { text: obj.titleText }, + color: this.color, tooltip: { trigger: 'item', formatter: `${obj.titleText}
{b} : {c}` @@ -239,6 +255,7 @@ export default { title: { text: obj.titleText }, + color: this.color, tooltip: { trigger: 'axis', axisPointer: { @@ -274,6 +291,7 @@ export default { let res = await getTrialEfficacyEvaluationStatList(data) this.loading_bottom = false if (res.IsSuccess) { + this.ORR = res.OtherInfo.ORR let obj = { xAxisData: [], seriesData: [], @@ -284,7 +302,18 @@ export default { obj.xAxisData.push(this.$fd(item.DictionaryCode, Number(item.OverallTumorEvaluation))) obj.seriesData.push(item.SubjectCount) }) + let obj2 = { + xAxisData: [], + seriesData: [], + unit: this.$t("trials:reportForms:cjart:unit:DaysDiff"), + titleText: this.$t("trials:reportForms:cjart:title:dataDistribution"), + } + res.OtherInfo.PDList.forEach(item => { + obj.xAxisData.push(item.SubjectCode) + obj.seriesData.push(item.DaysDiff) + }) this.initChart_bottom(obj) + this.initChart_bottom_right(obj2) } } catch (err) { console.log(err) @@ -297,6 +326,7 @@ export default { title: { text: obj.titleText }, + color: this.color, tooltip: { trigger: 'axis', axisPointer: { @@ -322,6 +352,46 @@ export default { // 4. 使用配置项渲染图表 this.chart_bottom.setOption(option); }, + initChart_bottom_right(obj) { + this.chart_bottom_right = echarts.init(this.$refs.chartContainer_bottom_right); + // ...图表配置 + const option = { + title: { + text: obj.titleText + }, + color: this.color, + tooltip: { + trigger: 'axis', + axisPointer: { + type: 'shadow' + } + }, + xAxis: { + type: 'category', + data: obj.xAxisData + }, + yAxis: { + name: obj.unit, + type: 'value' + }, + series: [ + { + markLine: { + data: [ + { + type: 'average', name: this.$t("trials:reportForms:cjart:data:average") + } + ] + }, + data: obj.seriesData, + type: 'bar', + barWidth: 20, + } + ] + }; + // 4. 使用配置项渲染图表 + this.chart_bottom_right.setOption(option); + }, } }