CNCEC_SUBQHSE_WUHUAN/SGGL/FineUIPro.Web/common/mainMenu_TestRun.aspx

1386 lines
47 KiB
Plaintext
Raw Normal View History

2021-04-30 10:28:37 +08:00
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="mainMenu_TestRun.aspx.cs" Inherits="FineUIPro.Web.mainMenu_TestRun" %>
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>首页</title>
<link href="../res/index/css/reset.css" rel="stylesheet" />
<link href="../res/index/css/home.css" rel="stylesheet" />
<link href="../res/index/css/swiper-3.4.2.min.css" rel="stylesheet" />
<style type="text/css">
.top {
display: flex;
display: -webkit-flex;
overflow: hidden;
width: 100%;
height: 360px;
margin-bottom: 5px;
box-sizing: border-box;
}
.top .item {
flex: 1;
width: 50%;
float: left;
box-sizing: border-box;
margin: 0 10px 20px;
}
.bw-b {
width: 50%;
}
.bw-b-bottom-up {
box-sizing: border-box;
height: 340px;
}
.tab-wrap {
left: auto;
right: 15px;
}
.tab .t-item {
width: auto;
padding: 5px 10px;
}
.bottom-list {
height: 100px;
padding: 15px;
overflow: hidden;
color: #fff;
margin: 0 10px;
}
.bottom-list .bl-left {
float: left;
margin-right: 30px;
margin-left: 50px;
}
.bottom-list .bl-right {
float: right;
margin-right: 50px;
}
.tab .t-item {
font-size: 13px;
}
</style>
</head>
<body>
2024-02-08 18:10:24 +08:00
2021-04-30 10:28:37 +08:00
<div class="wrap">
2024-02-08 18:10:24 +08:00
<div class="bottom-wrap">
<div class="top">
<div class="item">
<div class="bw-b-bottom ptop6">
<div class="bw-b-bottom-up">
<div class="bw-item-content">
<div id='one' style="width: 100%; height: 100%;"></div>
</div>
</div>
</div>
</div>
<div class="item">
<div class="bw-b-bottom ptop6">
<div class="bw-b-bottom-up">
<div class="bw-item-content">
<div id='two' style="width: 100%; height: 100%;"></div>
</div>
</div>
</div>
</div>
</div>
</div>
2024-03-11 09:46:11 +08:00
<div class="bottom-wrap">
<div class="top">
<div class="item">
<div class="bw-b-bottom ptop6">
<div class="bw-b-bottom-up">
<div class="bw-item-content">
<div id='three' style="width: 100%; height: 100%;"></div>
</div>
</div>
</div>
</div>
</div>
</div>
2024-02-08 18:10:24 +08:00
</div>
<%--<div class="wrap">
2021-04-30 10:28:37 +08:00
<div class="bottom-wrap">
<div class="top">
<div class="item">
<div class="bw-b-bottom ptop6">
<div class="bw-b-bottom-up">
<div class="tab-wrap">
<div class="tab" data-value="1">
<div class="t-item active">施工分包商</div>
<div class="spline"></div>
<div class="t-item ">单位工程</div>
<div class="spline"></div>
<div class="t-item">专业</div>
</div>
</div>
<div class="bw-item-content">
<div id='one' style="width: 100%; height: 100%;"></div>
</div>
</div>
</div>
</div>
<div class="item">
<div class="bw-b-bottom ptop6">
<div class="bw-b-bottom-up">
<div class="tab-wrap">
<div class="tab" data-value="2">
<div class="t-item active">施工分包商</div>
<div class="spline"></div>
<div class="t-item ">单位工程</div>
<div class="spline"></div>
<div class="t-item">专业</div>
</div>
</div>
<div class="bw-item-content">
<div id='two' style="width: 100%; height: 100%;"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="bottom-wrap">
<div class="top">
<div class="item">
<div class="bw-b-bottom ptop6">
<div class="bw-b-bottom-up">
<div class="tab-wrap">
<div class="tab" data-value="3">
<div class="t-item active">施工分包商</div>
<div class="spline"></div>
<div class="t-item ">单位工程</div>
<div class="spline"></div>
<div class="t-item">专业</div>
<div class="spline"></div>
<div class="t-item">问题类别</div>
</div>
</div>
<div class="bw-item-content">
<div id='three' style="width: 100%; height: 100%;"></div>
</div>
</div>
</div>
</div>
<div class="item">
<div class="bw-b-bottom ptop6">
<div class="bw-b-bottom-up">
<div class="tab-wrap">
<div class="tab" data-value="4">
<div class="t-item active">主项</div>
<div class="spline"></div>
<div class="t-item">专业</div>
</div>
</div>
<div class="bw-item-content">
<div id='four' style="width: 100%; height: 100%;"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="bottom-wrap">
<div class="bw-b-bottom-up bottom-list">
<div class="bl-left">
<div>质量控制点总数量200已完成178未完成22完成百分比89%</div>
<div>质量问题总数量100已完成84未完成16完成百分比84%</div>
<div>设计变更总数量65已完成52未完成13完成百分比80%</div>
</div>
<div class="bl-right">
<div>工程联系单总数量65已完成56未完成9 </div>
<div>工作联系单总数量42已完成35未完成7 </div>
<div>施工方案总数量34已完成30未完成4 </div>
</div>
</div>
</div>
2024-02-08 18:10:24 +08:00
</div>--%>
2021-04-30 10:28:37 +08:00
</body>
<script type="text/javascript" src="../res/index/js/jquery-3.4.1.min.js"></script>
<script type="text/javascript" src="../res/index/js/swiper-3.4.2.jquery.min.js"></script>
<script type="text/javascript" src="../res/index/js/echarts.min.js"></script>
<script type="text/javascript">
2024-02-08 18:10:24 +08:00
var oneArrStr = "<%=oneArrStr%>";
var oneDataStr = '<%=oneDataStr%>';
var oneNameData = [];
var oneArr = JSON.parse(oneArrStr);
var oneData = JSON.parse(oneDataStr);
2024-03-11 09:46:11 +08:00
$.each(oneData, function (index, item) {
2024-02-08 18:10:24 +08:00
var obj = { name: item };
oneNameData.push(obj);
});
//图1
var bar_data = oneArr;//模拟数据
var chart = echarts.init(document.getElementById('one'));
var option = {
title: {
text: '预试车进度信息',
textStyle: {
color: '#fff',
fontWeight: 'normal',
fontSize: 16
},
show: true
},
tooltip: {
formatter: '{a}:{c}%'//a 是series中每条数据name值c 是data数值
},
grid: {
left: '3%',
2024-02-15 14:53:34 +08:00
//right: '30%',
right: '0%',
2024-02-08 18:10:24 +08:00
top: '15%',
2024-02-15 14:53:34 +08:00
bottom: '5%',
2024-02-08 18:10:24 +08:00
containLabel: true,
backgroundColor: 'rgba(0,162,233, 0.01)',
},
xAxis: [ //横坐标
{
type: 'category',
2024-02-15 14:53:34 +08:00
data: oneData,
2024-02-08 18:10:24 +08:00
axisLine: {
lineStyle: {
color: "#fff",//横坐标线条颜色
}
2024-02-15 14:53:34 +08:00
},
axisLabel: {
interval: 0,
2024-03-11 09:46:11 +08:00
formatter: function (value) {
return value.split("").join("\n");
}
2024-02-08 18:10:24 +08:00
}
}
],
yAxis: [ //纵坐标
{
type: 'value',
axisLabel: {
show: true,
formatter: '{value}%',//给Y轴数值添加百分号
},
axisLine: {
lineStyle: {
color: "#fff",//纵坐标线条颜色
}
}
}
],
2024-02-15 14:53:34 +08:00
series: [{
name: '进度率',
type: 'bar',
barWidth: 20,
data: oneArr,
label: {
show: true,
2024-03-11 09:46:11 +08:00
position: 'top',
color: "#00D8FE",
fontWeight: "bold",
//interval: 0,
//rotate: -90,
2024-02-15 14:53:34 +08:00
formatter: function (params) {
if (params.value > 0) {
return params.value + '%';
} else {
return ' ';
}
},
},
itemStyle: {
normal: {
color: function (params) {
var colorList = ['#0287f8', '#33CCCC', '#58b1fc', '#2fb6f6', '#CC3366', '#00FF99', '#33FFFF', '#669900', '#CC0099', '#FF66FF', '#330099', '#00FFCC', '#FFFF33', '#FF9966', '#FF6633'];
return colorList[params.dataIndex]
2024-02-08 18:10:24 +08:00
},
}
}
2024-02-15 14:53:34 +08:00
}]
2024-02-08 18:10:24 +08:00
};
chart.setOption(option);
2024-03-11 09:46:11 +08:00
//图2
2024-02-08 18:10:24 +08:00
var twoDataStr = '<%=twoDataStr%>';
var towData = JSON.parse(twoDataStr);
var data = towData.map((item, index) => item.Rate);
var chart1 = echarts.init(document.getElementById('two'));
var barWidth = 20;
var maxNum = 100;
option = {
grid: {
top: '10%',
left: '20%',
right: '10%',
bottom: '0%',
},
title: {
text: '试车进度信息',
textStyle: {
color: '#fff',
fontWeight: 'normal',
fontSize: 16
},
},
xAxis: {
show: false,
},
yAxis: {
data: towData.map((item, index) => item.Name),
splitLine: {
show: false,
},
axisLabel: {
textStyle: { fontSize: '80%', color: '#02afff' },
},
axisLine: {
show: false,
},
axisTick: false,
},
series: [
{
type: 'bar',
barWidth: barWidth,
zlevel: 2,
data: data.map(function (item) {
return {
value: item,
maxNum: maxNum,
};
}),
label: {
show: true,
position: 'inside',
align: 'left',
formatter: function (params) {
var percent = Number((params.data.value / params.data.maxNum) * 100).toFixed(2) + '%';
return percent;
},
color: '#fff',
fontSize: 12,
},
itemStyle: {
2024-03-11 09:46:11 +08:00
borderRadius: [10, 10, 10, 10],
2024-02-08 18:10:24 +08:00
color: new echarts.graphic.LinearGradient(0, 1, 1, 1, [
{ offset: 0, color: '#395CFE' },
{ offset: 1, color: '#2EC7CF' },
]),
2024-03-11 09:46:11 +08:00
barBorderRadius: [10, 10, 10, 10]
2024-02-08 18:10:24 +08:00
},
},
{
type: 'bar',
barWidth: barWidth,
barGap: '-100%',
data: data.map(function (item) {
return {
realValue: item,
value: maxNum,
};
}),
//label: {
// show: true,
// position: 'right',
// distance: 80,
// align: 'right',
// //formatter: function (params) {
// // return params.data.realValue + ' 件';
// //},
// color: '#02afff',
// fontSize: 18,
//},
itemStyle: {
borderRadius: 10,
color: 'rgba(3,169,244, 0.5)',
2024-03-11 09:46:11 +08:00
barBorderRadius: [10, 10, 10, 10]
2024-02-08 18:10:24 +08:00
},
},
],
};
chart1.setOption(option);
2024-03-11 09:46:11 +08:00
//图3
var fourDecisionStr = '<%=fourDecisionStr%>';
var threeData = JSON.parse(fourDecisionStr);
var threewidth = Math.floor(100 / threeData.length);
$.each(threeData, function (index, item) {
$("#three").append("<div id='three" + index + "' style='width:" + threewidth + "%; height:100%; display:inline-block'></div>");
});
$(function () {
$.each(threeData, function (index, item) {
var chart = echarts.init(document.getElementById('three' + index));
var value = item.Rate;
option = {
backgroundColor: '000',
title: {
text: `${value}%`,
subtext: '三查四定' + item.Name + '类',
left: 'center',
top: '45%', //top待调整
textStyle: {
color: '#fff',
fontSize: 20,
fontFamily: 'DINAlternate-Bold',
},
subtextStyle: {
color: '#ff',
fontSize: 14,
fontFamily: 'PingFangSC-Regular',
top: 'center'
},
itemGap: 16 //主副标题间距
},
xAxis: {
splitLine: {
show: false
},
axisLabel: {
show: false
},
axisLine: {
show: false
}
},
yAxis: {
splitLine: {
show: false
},
axisLabel: {
show: false
},
axisLine: {
show: false
}
},
series: [
// 内圆
{
type: 'pie',
radius: ['0', '50%'],
center: ['50%', '50%'],
z: 0,
itemStyle: {
normal: {
color: new echarts.graphic.RadialGradient(0.5, 0.5, 0.5, [
{
offset: 0,
color: '#1a68c0'
},
{
offset: 0.44,
color: '#1a68c0'
},
{
offset: 0.73,
color: '#194c88'
},
{
offset: 1,
color: '#162c46'
}
]),
label: {
show: false
},
labelLine: {
show: false
}
},
},
label: {
normal: {
position: "center",
}
},
data: [100],
},
// 进度圈
{
type: 'pie',
clockWise: true,
radius: ["60%", "55%"],
data: [{
value: value,
itemStyle: {
normal: {
borderWidth: 2,
borderColor: {
colorStops: [{
offset: 0,
color: '#1d87ff' || '#00cefc' // 0% 处的颜色
}, {
offset: 1,
color: '#1d87ff' || '#367bec' // 100% 处的颜色
}]
},
color: { // 完成的圆环的颜色
colorStops: [{
offset: 0,
color: '#1d87ff' || '#00cefc' // 0% 处的颜色
}, {
offset: 1,
color: '#1d87ff' || '#367bec' // 100% 处的颜色
}]
},
label: {
show: false
},
labelLine: {
show: false
},
},
}
},
{
name: '',
value: 100 - value,
itemStyle: {
normal: {
label: {
show: false
},
labelLine: {
show: false
},
color: 'rgba(0, 0, 0, 0)',
borderColor: 'rgba(0, 0, 0, 0)',
borderWidth: 0,
}
},
}
]
},
//刻度尺
{
// name: "白色圈刻度",
type: "gauge",
radius: "77%",
startAngle: 225, //刻度起始
endAngle: -134.8, //刻度结束
z: 4,
axisTick: {
show: true,
lineStyle: {
width: 2,
color: '#354e6c'
}
},
splitLine: {
length: 16, //刻度节点线长度
lineStyle: {
width: 2,
color: '#354e6c'
} //刻度节点线
},
axisLabel: {
color: 'rgba(255,255,255,0)',
fontSize: 12,
}, //刻度节点文字颜色
pointer: {
show: false
},
axisLine: {
lineStyle: {
opacity: 0
}
},
detail: {
show: false
},
data: [{
value: 0,
name: ""
}]
},
]
};
chart.setOption(option);
});
});
//data = [
// {
// name: 'A类',
// value: 20,
// },
// {
// name: 'B类',
// value: 30,
// },
// {
// name: 'C类',
// value: 50,
// },
//];
//arrName = getArrayValue(data, 'name');
//arrValue = getArrayValue(data, 'value');
//sumValue = eval(arrValue.join('+'));
//objData = array2obj(data, 'name');
//optionData = getData(data);
//function getArrayValue(array, key) {
// var key = key || 'value';
// var res = [];
// if (array) {
// array.forEach(function (t) {
// res.push(t[key]);
// });
// }
// return res;
//}
//function array2obj(array, key) {
// var resObj = {};
// for (var i = 0; i < array.length; i++) {
// resObj[array[i][key]] = array[i];
// }
// return resObj;
//}
//function getData(data) {
// var res = {
// series: [],
// yAxis: [],
// };
// for (let i = 0; i < data.length; i++) {
// res.series.push({
// name: '',
// type: 'pie',
// clockWise: false, //顺时加载
// hoverAnimation: false, //鼠标移入变大
// radius: [73 - i * 15 + '%', 68 - i * 15 + '%'],
// center: ['40%', '55%'],
// label: {
// show: false,
// },
// itemStyle: {
// label: {
// show: false,
// },
// labelLine: {
// show: false,
// },
// borderWidth: 5,
// },
// data: [
// {
// value: data[i].value,
// name: data[i].name,
// },
// {
// value: sumValue - data[i].value,
// name: '',
// itemStyle: {
// color: 'rgba(0,0,0,0)',
// borderWidth: 0,
// },
// tooltip: {
// show: false,
// },
// hoverAnimation: false,
// },
// ],
// });
// res.series.push({
// name: '',
// type: 'pie',
// silent: true,
// z: 1,
// clockWise: false, //顺时加载
// hoverAnimation: false, //鼠标移入变大
// radius: [73 - i * 15 + '%', 68 - i * 15 + '%'],
// center: ['40%', '55%'],
// label: {
// show: false,
// },
// itemStyle: {
// label: {
// show: false,
// },
// labelLine: {
// show: false,
// },
// borderWidth: 5,
// },
// data: [
// {
// value: 7.5,
// itemStyle: {
// color: '#add2d2', //圆环背景色-全
// borderWidth: 0,
// },
// tooltip: {
// show: false,
// },
// hoverAnimation: false,
// },
// {
// value: 2.5,
// name: '',
// itemStyle: {
// color: 'rgba(0,0,0,0)',
// borderWidth: 0,
// },
// tooltip: {
// show: false,
// },
// hoverAnimation: false,
// },
// ],
// });
// res.yAxis.push(((data[i].value / sumValue) * 100).toFixed(2) + '%');
// }
// return res;
//}
//option = {
// //backgroundColor: '#ddd',
// legend: {
// show: true,
// icon: 'circle',
// top: 'center',
// top: '16%',
// bottom: '53%',
// left: '40%',
// data: arrName,
// width: 40,
// padding: [0, 16],
// itemGap: 25,
// //图例显示
// formatter: function (name) {
// return '{title|' + name + '}{value|' + ((objData[name].value / sumValue) * 100).toFixed(2) + '} {title|%}';
// },
// textStyle: {
// rich: {
// title: {
// fontSize: 20,
// lineHeight: 30,
// color: '#fff',
// },
// value: {
// fontSize: 18,
// lineHeight: 20,
// color: '#fff',
// },
// },
// },
// },
// title: {
// text: '', //图形标题配置在中间对应效果图的80%
// left: '20%',
// top: '50%',
// textStyle: {
// color: 'rgb(50,197,233)',
// fontSize: 16,
// align: 'left',
// },
// },
// tooltip: {
// show: true,
// trigger: 'item',
// formatter: '{a}<br>{b}:{c}({d}%)',
// },
// color: ['yellow', 'blue', 'green'],
// xAxis: [
// {
// show: false,
// },
// ],
// series: optionData.series,
//};
//chart2.setOption(option);
2024-02-08 18:10:24 +08:00
</script>
<%--<script type="text/javascript">
2021-04-30 10:28:37 +08:00
function category_One(id, xArr, data) {
// 基于准备好的dom初始化echarts实例
var myChart = echarts.init(document.getElementById(id))
// 指定图表的配置项和数据
var option = {
title: {
// left:'center',
text: '质量验收一次合格率 施工资料同步率',
textStyle: {
color: '#fff',
fontWeight: 'normal',
fontSize:16
},
show: true
},
tooltip: {},
legend: {
//data: ['销量'],
show: false
},
xAxis: {
axisTick: {
show: false
},
axisLine: {
lineStyle: {
color: 'rgba(255, 255, 255, 0.3)'
}
},
axisLabel: {
show: true,
textStyle: {
color: 'rgba(255, 255, 255, 0.8)'
}
},
type: 'category',
data: xArr,
boundaryGap: [0, 0.01],
},
yAxis: {
axisTick: {
show: false
},
axisLine: {
lineStyle: {
color: 'rgba(255, 255, 255, 0.3)'
}
},
axisLabel: {
show: true,
textStyle: {
color: 'rgba(255, 255, 255, 0.8)'
},
formatter: function (value, index) {
return (value * 100) + "%";
}
}
},
series: data,
grid: {
top: '25%',
left: '0%',
right: '0%',
bottom: '0%',
containLabel: true,
backgroundColor: 'rgba(0,162,233, 0.01)',
// borderColor: 'rgba(0,162,233, 1)'
},
backgroundColor: 'rgba(0,162,233, 0.01)',
textStyle: {
color: 'rgba(255, 255, 255, 0.3)'
}
}
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option)
}
var xArr = ["分包一", "分包二"]
var data = [
{
name: '质量一次性合格率',
type: 'bar',
data: [0.85, 0.82],
//itemStyle: { normal: { color: 'rgba(231,236,114,.9)' } }
},
{
name: '施工资料同步率',
type: 'bar',
data: [0.69, 0.65],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
}
]
category_One('one', xArr, data)
</script>
<script type="text/javascript">
function category_Two(id, xArr, data) {
// 基于准备好的dom初始化echarts实例
var myChart = echarts.init(document.getElementById(id))
// 指定图表的配置项和数据
var option = {
title: {
// left:'center',
text: '施工进度',
textStyle: {
color: '#fff',
fontWeight: 'normal',
fontSize:16
},
show: true
},
tooltip: {},
legend: {
//data: ['销量'],
show: false
},
xAxis: {
axisTick: {
show: false
},
axisLine: {
lineStyle: {
color: 'rgba(255, 255, 255, 0.3)'
}
},
axisLabel: {
show: true,
textStyle: {
color: 'rgba(255, 255, 255, 0.8)'
}
},
type: 'category',
data: xArr,
boundaryGap: [0, 0.01],
},
yAxis: {
axisTick: {
show: false
},
axisLine: {
lineStyle: {
color: 'rgba(255, 255, 255, 0.3)'
}
},
axisLabel: {
show: true,
textStyle: {
color: 'rgba(255, 255, 255, 0.8)'
},
formatter: function (value, index) {
return (value * 100) + "%";
}
}
},
series: data,
grid: {
top: '25%',
left: '0%',
right: '0%',
bottom: '0%',
containLabel: true,
backgroundColor: 'rgba(0,162,233, 0.01)',
// borderColor: 'rgba(0,162,233, 1)'
},
backgroundColor: 'rgba(0,162,233, 0.01)',
textStyle: {
color: 'rgba(255, 255, 255, 0.3)'
}
}
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option)
}
var xArr = ["分包一", "分包二", "分包三"]
var data = [
{
name: '计划值',
type: 'bar',
data: [0.23, 0.35, 0.42],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
},
{
name: '实际值',
type: 'bar',
data: [0.2, 0.28, 0.35],
//itemStyle: { normal: { color: 'rgba(231,236,114,.9)' } }
},
{
name: '累计计划值',
type: 'line',
smooth: true,
data: [0.23, 0.58, 1],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
},
{
name: '累计实际值',
type: 'line',
smooth: true,
data: [0.2, 0.48, 0.83],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
}
]
category_Two('two', xArr, data)
</script>
<script type="text/javascript">
function category(id, xArr, data) {
// 基于准备好的dom初始化echarts实例
var myChart = echarts.init(document.getElementById(id))
// 指定图表的配置项和数据
var option = {
title: {
// left:'center',
text: '设计变更',
textStyle: {
color: '#fff',
fontWeight: 'normal',
fontSize:16
},
show: true
},
tooltip: {},
legend: {
//data: ['销量'],
show: false
},
xAxis: {
axisTick: {
show: false
},
axisLine: {
lineStyle: {
color: 'rgba(255, 255, 255, 0.3)'
}
},
axisLabel: {
show: true,
textStyle: {
color: 'rgba(255, 255, 255, 0.8)'
}
},
type: 'category',
data: xArr
},
yAxis: {
axisTick: {
show: false
},
axisLine: {
lineStyle: {
color: 'rgba(255, 255, 255, 0.3)'
}
},
axisLabel: {
show: true,
textStyle: {
color: 'rgba(255, 255, 255, 0.8)'
}
}
},
series: [{
name: '数量',
type: 'bar',
data: data
}],
grid: {
top: '25%',
left: '0%',
right: '0%',
bottom: '0%',
containLabel: true,
backgroundColor: 'rgba(0,162,233, 0.01)',
// borderColor: 'rgba(0,162,233, 1)'
},
itemStyle: {
color: 'rgba(200,201,10, 1)'
},
backgroundColor: 'rgba(0,162,233, 0.01)',
textStyle: {
color: 'rgba(255, 255, 255, 0.3)'
}
}
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option)
}
var xArr = ["主项1", "主项2", "主项3", "主项4", "主项5", "主项6"]
var data = [12, 5, 28, 43, 22, 11]
category('four', xArr, data)
</script>
<script>
function pie(id, data) {
var myChartPie = echarts.init(document.getElementById(id));
optionPie = {
title: {
text: '质量问题',
textStyle: {
// fontSize:14,
fontWeight: 'normal',
fontSize:16,
color: '#fff'
}
, left: 0
, top: 0
},
tooltip: {
trigger: 'item',
formatter: "{a} <br/>{b}: {c} ({d}%)"
},
//legend: {
// show: false,
// data: ['已整改', '未整改'],
// color: ['#32A8FF', ' #02C800'],
// orient: 'vertical',
// x: 'right',
// y: 'top',
// textStyle: {
// color: ['#32A8FF', ' #02C800']
// }
//},
//graphic: {
// type: "text",
// left: "center",
// top: "center",
// style: {
// text: "进度80%",
// textAlign: "center",
// fill: "#fff",
// fontSize: 18,
// fontWeight: 700
// }
//},
series: [
{
name: '质量问题',
label: {
show: false
},
emphasis: {
label: {
show: true,
textStyle: {
// fontSize:14,
fontWeight: 'normal',
fontSize:16,
color: '#fff'
}
}
},
type: 'pie',
roseType: 'radius',
radius: [20, 160],
center: ['50%', '60%'],
// avoidLabelOverlap:false,
//color: ['#32A8FF', ' #02C800'],
data: data
}
]
};
//为echarts对象加载数据
myChartPie.setOption(optionPie);
}
var data = [{ value: 10, name: '分包一' },
{ value: 5, name: '分包二' },
{ value: 15, name: '分包三' },
{ value: 25, name: '分包四' },
{ value: 20, name: '分包五' },
{ value: 35, name: '分包六' }];
pie('three', data)
</script>
<script>
$(".tab .t-item").click(function () {
var $this = $(this)
var index = $this.index()
if ($this.hasClass('active') && index == 0) {
return
}
var $tab = $this.closest(".tab")
var value = $tab.attr("data-value")
$tab.find(".t-item").removeClass('active');
$this.addClass('active')
if (value == 1) {
var xArr = ["单位工程一", "单位工程二"]
var data = [
{
name: '质量一次性合格率',
type: 'bar',
data: [0.9, 0.85],
//itemStyle: { normal: { color: 'rgba(231,236,114,.9)' } }
},
{
name: '施工资料同步率',
type: 'bar',
data: [0.75, 0.65],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
}
]
if (index == 0) {
xArr = ["分包一", "分包二"]
data = [
{
name: '质量一次性合格率',
type: 'bar',
data: [0.85, 0.82],
//itemStyle: { normal: { color: 'rgba(231,236,114,.9)' } }
},
{
name: '施工资料同步率',
type: 'bar',
data: [0.69, 0.65],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
}
]
} else if (index == 4) {
xArr = ["建筑", "安装"]
data = [
{
name: '质量一次性合格率',
type: 'bar',
data: [0.83, 0.78],
//itemStyle: { normal: { color: 'rgba(231,236,114,.9)' } }
},
{
name: '施工资料同步率',
type: 'bar',
data: [0.64, 0.61],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
}
]
}
category_One('one', xArr, data)
}
else if (value == 2) {
var xArr = ["分包一", "分包二", "分包三"]
var data = [
{
name: '计划值',
type: 'bar',
data: [0.23, 0.35, 0.42],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
},
{
name: '实际值',
type: 'bar',
data: [0.2, 0.28, 0.35],
//itemStyle: { normal: { color: 'rgba(231,236,114,.9)' } }
},
{
name: '累计计划值',
type: 'line',
smooth: true,
data: [0.23, 0.58, 1],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
},
{
name: '累计实际值',
type: 'line',
smooth: true,
data: [0.2, 0.48, 0.83],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
}
]
if (index == 2) {
xArr = ["单位工程一", "单位工程二", "单位工程三"]
data = [
{
name: '计划值',
type: 'bar',
data: [0.20, 0.33, 0.47],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
},
{
name: '实际值',
type: 'bar',
data: [0.15, 0.25, 0.33],
//itemStyle: { normal: { color: 'rgba(231,236,114,.9)' } }
},
{
name: '累计计划值',
type: 'line',
smooth: true,
data: [0.20, 0.53, 1],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
},
{
name: '累计实际值',
type: 'line',
smooth: true,
data: [0.15, 0.4, 0.73],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
}
]
}
else if (index == 4) {
xArr = ["建筑", "安装"]
data = [
{
name: '计划值',
type: 'bar',
data: [0.45, 0.55],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
},
{
name: '实际值',
type: 'bar',
data: [0.36, 0.43],
//itemStyle: { normal: { color: 'rgba(231,236,114,.9)' } }
},
{
name: '累计计划值',
type: 'line',
smooth: true,
data: [0.45, 1],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
},
{
name: '累计实际值',
type: 'line',
smooth: true,
data: [0.36, 0.79],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
}
]
}
category_Two('two', xArr, data)
}
else if (value == 3) {
var data = [{ value: 10, name: '分包一' },
{ value: 5, name: '分包二' },
{ value: 15, name: '分包三' },
{ value: 25, name: '分包四' },
{ value: 20, name: '分包五' },
{ value: 35, name: '分包六' }];
if (index == 2) {
data = [{ value: 25, name: '单位工程一' },
{ value: 35, name: '单位工程二' },
{ value: 30, name: '单位工程三' }];
}
else if (index == 4) {
data = [{ value: 45, name: '建筑' },
{ value: 55, name: '安装' }];
}
else if (index == 6) {
data = [{ value: 35, name: '质量不合格' },
{ value: 65, name: '质量缺陷' }];
}
pie('three', data)
}
else if (value == 4) {
var xArr = ["主项一", "主项二", "主项三", "主项四", "主项五"]
var data = [12, 5, 28, 43, 22]
if (index == 2) {
xArr = ["建筑", "安装"]
data = [45, 65]
}
category('four', xArr, data)
}
})
</script>
<script>
var mySwiper = new Swiper('#swiper1', {
autoplay: 3000,//可选选项,自动滑动
direction: 'vertical',
loop: true,
slidesPerView: 6
})
var mySwiper = new Swiper('#swiper2', {
autoplay: 4000,//可选选项,自动滑动
direction: 'vertical',
loop: true,
slidesPerView: 6
})
2024-02-08 18:10:24 +08:00
</script>--%>
2021-04-30 10:28:37 +08:00
</html>