Browse Source

Merge pull request '修改图表宽度,适应分辨率不同时在同一行' (#952) from wangjr_new into V20211115

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/952
Reviewed-by: zhoupzh <zhoupzh@pcl.ac.cn>
pull/961/head
zhoupzh 3 years ago
parent
commit
3133710bf1
3 changed files with 23 additions and 12 deletions
  1. +1
    -0
      public/img/pro_new.svg
  2. +1
    -1
      web_src/js/components/DataAnalysis.vue
  3. +21
    -11
      web_src/js/components/ProAnalysis.vue

+ 1
- 0
public/img/pro_new.svg View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1637739132178" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1729" width="64" height="64" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M512 69.717333l383.018667 221.141334v442.282666L512 954.282667 128.981333 733.141333V290.858667L512 69.717333zM192.96 375.402667v320.768L480 861.888V541.141333l-287.04-165.76z m638.058667 0L544 541.162667V861.866667l287.018667-165.717334V375.424zM512 143.637333L215.722667 314.666667 512 485.717333l296.256-171.050666L512 143.616z" fill="#8a8a8a" p-id="1730"></path></svg>

+ 1
- 1
web_src/js/components/DataAnalysis.vue View File

@@ -13,7 +13,7 @@
<el-tab-pane label="项目分析" name="second" id="second" >
<ProAnalysis ref='ProAnalysis'id="pro" v-if="isRouterAlive"></ProAnalysis>
<span slot="label">
<el-image style="width: 13px; height: 13px" src="/img/pro.svg">
<el-image style="width: 13px; height: 13px" src="/img/pro_new.svg">
</el-image>
项目分析
</span>


+ 21
- 11
web_src/js/components/ProAnalysis.vue View File

@@ -199,9 +199,9 @@
<div class="item_l" id="charts">
<div style="font-size:14px;color:#409eff;margin:20px 5px;">OpenI指数:{{tableDataIDTotal.openi | rounding}}</div>
<div >
<el-col :span='8' id="radar_openi" :style="{width: '400px', height: '300px'}"></el-col>
<el-col :span='8' id="radar_openi" :style="{ height: '300px'}"></el-col>
<el-col :span='16' id="line_openi" :style="{width: '600px', height: '300px',float:'right'}"></el-col>
<el-col :span='16' id="line_openi" :style="{ height: '300px',float:'right'}"></el-col>
</div>
</div>
</el-col>
@@ -292,7 +292,7 @@
<input type="checkbox" class="checkboxchart" name="checkboxchart" checked="checked" value="commit"/>commit
</label>
</div>
<div id ="selectData" style="width: 1280px;height: 300px;">
<div id ="selectData" style="height: 300px;">

</div>
@@ -712,8 +712,9 @@
params:this.paramsID
}).then((res)=>{
if (bool_val){
this.tableDataIDOpenI = res.data
this.tableDataIDOpenI = res.data
this.drawOpenItrend()
}else{
@@ -925,6 +926,11 @@
]
};
this.echartsOITd.setOption(option)
// setTimeout(function (){
// window.onresize = function () {
// this.echartsOITd.resize();
// }
// },200)
},
drawSelectData(){
@@ -1018,6 +1024,11 @@
]
};
this.echartsSelectData.setOption(this.option)
// setTimeout(function (){
// window.onresize = function () {
// this.echartsSelectData.resize;
// }
// },200)

// // 使用刚指定的选择项数据显示图表。
// var selectArr = this.echartsSelectData.getOption().legend[0].data;//legend所有值
@@ -1117,14 +1128,13 @@
mounted() {
// document.getElementById("all").style.outline="none"
// document.getElementById("all").focus()

this.getAllProList("all",7)
console.log("id:"+this.pro_id);
// document.getElementById('radar_openi').style.width = document.getElementById('charts').offsetWidth*0.4+'px'
// document.getElementById('line_openi').style.width = document.getElementById('charts').offsetWidth*0.6+'px'
// document.getElementById('selectData').style.width = document.getElementById('linecharts').offsetWidth+'px'
document.getElementById('radar_openi').style.width = document.getElementById('pro_main').offsetWidth*0.22+'px'
document.getElementById('line_openi').style.width = document.getElementById('pro_main').offsetWidth*0.33+'px'
document.getElementById('selectData').style.width = document.getElementById('pro_main').offsetWidth*0.8+'px'
this.radarOpenI = this.$echarts.init(document.getElementById('radar_openi'))
this.echartsOITd = this.$echarts.init(document.getElementById('line_openi'))
this.echartsSelectData = this.$echarts.init(document.getElementById('selectData'))
@@ -1266,4 +1276,4 @@
margin-top: 10px;
font-weight:bold;
}
</style>
</style>

Loading…
Cancel
Save