Merge branch 'master' into 'sprint213_zg'

# Conflicts:
#   module/execution/css/cfd.css
#   module/execution/js/cfd.js
This commit is contained in:
孙广明
2022-07-06 07:02:38 +00:00
27 changed files with 326 additions and 207 deletions
+1 -90
View File
@@ -14,6 +14,7 @@
<?php js::import($jsRoot . 'echarts/echarts.common.min.js'); ?>
<?php js::import($jsRoot . 'html2canvas/min.js'); ?>
<?php js::set('executionID', $executionID); ?>
<?php js::set('chartData', $chartData); ?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<?php
@@ -42,94 +43,4 @@
</div>
</div>
</div>
<?php if(!empty($chartData)):?>
<script>
var i = 0;
var series = [];
var colors = ['#33B4DB', '#7ECF69', '#FFC73A', '#FF5A61', '#50C8D0', '#AF5AFF', '#4EA3FF', '#FF8C5A', '#6C73FF'];
//var background = ['#E1F4FA', '#ECF8E9', '#FFF7E2', '#FFE7E8', '#E5F7F8', '#F3E7FF', '#E5F1FF', '#FFEEE7', '#E9EAFF'];
<?php foreach($chartData['line'] as $label => $set):?>
series.push({
name: '<?php echo $label;?>',
type: 'line',
stack: 'Total',
color: colors[i],
areaStyle: {
color: colors[i],
opacity: 0.2
},
emphasis: {
focus: 'series'
},
data: <?php echo $set;?>
})
i ++;
<?php endforeach;?>
var chartDom = document.getElementById('cfdChart');
var CFD = echarts.init(chartDom);
var option;
option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
label: {
backgroundColor: '#6a7985'
}
}
},
legend: {
data: <?php echo json_encode(array_keys($chartData['line']));?>
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: [
{
type: 'category',
boundaryGap: false,
data: <?php echo json_encode($chartData['labels'])?>,
axisLine: {
show: true,
lineStyle:
{
color: '#999',
width:1,
}
}
}
],
yAxis: [
{
type: 'value',
axisLine: {
show: true,
lineStyle:
{
color: '#999',
width:1,
}
}
}
],
series: series,
};
option && CFD.setOption(option);
window.addEventListener('resize', CFD.resize);
</script>
<?php endif;?>
<script>
$('#type').change(function()
{
location.href = createLink('execution', 'cfd', 'executionID=' + executionID + '&type=' + $(this).val());
});
</script>
<?php include '../../common/view/footer.html.php';?>