首页大屏幕
This commit is contained in:
@@ -314,94 +314,122 @@
|
||||
|
||||
function initCircle() {
|
||||
// 一个环形
|
||||
var circleOneOption = {
|
||||
drawing_elem: 'circleId',
|
||||
bordercolor: '#12cda2',
|
||||
borderwidth: 1,
|
||||
percentfontsize: 22,
|
||||
unitfontsize: 18,
|
||||
lineWidth: 16,
|
||||
addLeft: 4,
|
||||
percentfontcolor: "#12cda2",
|
||||
unitfontcolor: '#12cda2',
|
||||
forecolor: '#12cda2',
|
||||
unitadd: 1,
|
||||
title: '在岗率',
|
||||
titlefontcolor: '#12cda2',
|
||||
titlefontsize: 9,
|
||||
}
|
||||
var $itemPW = $('.sd-section .sd-user-calc');
|
||||
var itemPW = $itemPW.width()
|
||||
var $itemPPW = $('.sd-section .sd-user-calc .sd-user-calc-left');
|
||||
var itemPPW = $itemPPW.width()
|
||||
var itemPPWPadding = ($itemPPW.innerWidth() - itemPPW) / 2
|
||||
var itemPPWW = $('.sd-section .sd-user-calc .sd-user-calc-left .sd-user-calc-item').eq(0).innerWidth()
|
||||
// 通过改变差值来决定圈的宽度,itemWMin为最新值
|
||||
var itemW = (itemPW - itemPPWPadding - itemPPWW) / 3 * 2;
|
||||
var itemWMin = 120
|
||||
if (itemW > itemWMin) {
|
||||
$('#circleId').attr('width', itemW).attr('height', itemW);
|
||||
circleOneOption.percentfontsize = (itemW * 22 / itemWMin).toFixed() - 0
|
||||
circleOneOption.unitfontsize = (itemW * 18 / itemWMin).toFixed() - 0
|
||||
circleOneOption.titlefontsize = 16
|
||||
}
|
||||
console.log(itemPW, itemW, circleOneOption)
|
||||
drawCircle(circleOneOption);
|
||||
// 两个环形
|
||||
var circleTwoOption = {
|
||||
//var circleOneOption = {
|
||||
// drawing_elem: 'circleId',
|
||||
// bordercolor: '#12cda2',
|
||||
// borderwidth: 1,
|
||||
// percentfontsize: 22,
|
||||
// unitfontsize: 18,
|
||||
// lineWidth: 16,
|
||||
// addLeft: 4,
|
||||
// percentfontcolor: "#12cda2",
|
||||
// unitfontcolor: '#12cda2',
|
||||
// forecolor: '#12cda2',
|
||||
// unitadd: 1,
|
||||
// title: '在岗率',
|
||||
// titlefontcolor: '#12cda2',
|
||||
// titlefontsize: 9,
|
||||
//}
|
||||
//var $itemPW = $('.sd-section .sd-user-calc');
|
||||
//var itemPW = $itemPW.width()
|
||||
//var $itemPPW = $('.sd-section .sd-user-calc .sd-user-calc-left');
|
||||
//var itemPPW = $itemPPW.width()
|
||||
//var itemPPWPadding = ($itemPPW.innerWidth() - itemPPW) / 2
|
||||
//var itemPPWW = $('.sd-section .sd-user-calc .sd-user-calc-left .sd-user-calc-item').eq(0).innerWidth()
|
||||
//// 通过改变差值来决定圈的宽度,itemWMin为最新值
|
||||
//var itemW = (itemPW - itemPPWPadding - itemPPWW) / 3 * 2;
|
||||
//var itemWMin = 120
|
||||
//if (itemW > itemWMin) {
|
||||
// $('#circleId').attr('width', itemW).attr('height', itemW);
|
||||
// circleOneOption.percentfontsize = (itemW * 22 / itemWMin).toFixed() - 0
|
||||
// circleOneOption.unitfontsize = (itemW * 18 / itemWMin).toFixed() - 0
|
||||
// circleOneOption.titlefontsize = 16
|
||||
//}
|
||||
//console.log(itemPW, itemW, circleOneOption)
|
||||
//drawCircle(circleOneOption);
|
||||
//// 两个环形
|
||||
//var circleTwoOption = {
|
||||
// drawing_elem: 'circleId1',
|
||||
// percentfontsize: 22,
|
||||
// unitfontsize: 18,
|
||||
// lineWidth: 10,
|
||||
// addLeft: 4,
|
||||
// percentfontcolor: "#ffb260",
|
||||
// bgcolor: '#0F2164',
|
||||
// forecolor: '#ffb260',
|
||||
// unitfontcolor: '#1ab1ff',
|
||||
// lineGap: 'round',
|
||||
// unitadd: -1,
|
||||
//}
|
||||
|
||||
//var $itemInner = $('.sd-section5-inner')
|
||||
//var $itemInnerTop = $('.sd-section5-inner .sd-quality')
|
||||
//var heightTemp = $itemInner.height() - $itemInnerTop.height()
|
||||
//var $itemTW = $('.sd-quality-circles');
|
||||
//var itemTW = ($itemTW.width() / 2 / 3 * 2).toFixed() - 20
|
||||
//var itemTH = $itemTW.height()
|
||||
//console.log(itemTW, heightTemp)
|
||||
//if (itemTW > heightTemp) {
|
||||
// itemTW = heightTemp
|
||||
//}
|
||||
//// 通过改变差值来决定圈的宽度
|
||||
//var itemW = itemTW
|
||||
//var itemWMin = 100
|
||||
//if (itemW > itemWMin) {
|
||||
// $('#circleId1').attr('width', itemW).attr('height', itemW);
|
||||
// circleTwoOption.percentfontsize = (itemW * 22 / itemWMin).toFixed() - 0
|
||||
// circleTwoOption.unitfontsize = (itemW * 18 / itemWMin).toFixed() - 0
|
||||
//}
|
||||
//var circleThreeOption = {
|
||||
// drawing_elem: 'circleId2',
|
||||
// percentfontsize: 22,
|
||||
// unitfontsize: 18,
|
||||
// lineWidth: 10,
|
||||
// addLeft: 4,
|
||||
// percentfontcolor: "#12cda2",
|
||||
// bgcolor: '#0F2164',
|
||||
// forecolor: '#12cda2',
|
||||
// unitfontcolor: '#1ab1ff',
|
||||
// lineGap: 'round',
|
||||
// unitadd: -1,
|
||||
//}
|
||||
//if (itemW > itemWMin) {
|
||||
// $('#circleId2').attr('width', itemW).attr('height', itemW);
|
||||
// circleThreeOption.percentfontsize = (itemW * 22 / itemWMin).toFixed() - 0
|
||||
// circleThreeOption.unitfontsize = (itemW * 18 / itemWMin).toFixed() - 0
|
||||
//}
|
||||
//console.log(itemTW, itemTH, itemW, circleThreeOption)
|
||||
|
||||
//drawCircle(circleTwoOption);
|
||||
//drawCircle(circleThreeOption);
|
||||
drawCircle({
|
||||
drawing_elem: 'circleId1',
|
||||
percentfontsize: 22,
|
||||
unitfontsize: 18,
|
||||
lineWidth: 10,
|
||||
addLeft: 4,
|
||||
percentfontcolor: "#ffb260",
|
||||
bgcolor: '#0F2164',
|
||||
forecolor: '#ffb260',
|
||||
unitfontcolor: '#1ab1ff',
|
||||
percentfontcolor: "#ce8306",
|
||||
unitfontcolor: "#ce8306",
|
||||
unitfontsize: 11,
|
||||
lineGap: 'round',
|
||||
unitadd: -1,
|
||||
}
|
||||
|
||||
var $itemInner = $('.sd-section5-inner')
|
||||
var $itemInnerTop = $('.sd-section5-inner .sd-quality')
|
||||
var heightTemp = $itemInner.height() - $itemInnerTop.height()
|
||||
var $itemTW = $('.sd-quality-circles');
|
||||
var itemTW = ($itemTW.width() / 2 / 3 * 2).toFixed() - 20
|
||||
var itemTH = $itemTW.height()
|
||||
console.log(itemTW, heightTemp)
|
||||
if (itemTW > heightTemp) {
|
||||
itemTW = heightTemp
|
||||
}
|
||||
// 通过改变差值来决定圈的宽度
|
||||
var itemW = itemTW
|
||||
var itemWMin = 100
|
||||
if (itemW > itemWMin) {
|
||||
$('#circleId1').attr('width', itemW).attr('height', itemW);
|
||||
circleTwoOption.percentfontsize = (itemW * 22 / itemWMin).toFixed() - 0
|
||||
circleTwoOption.unitfontsize = (itemW * 18 / itemWMin).toFixed() - 0
|
||||
}
|
||||
var circleThreeOption = {
|
||||
bgcolor: [{ step: 0, color: "#03344C" }, { step: 1, color: "#03344C" }],
|
||||
forecolor: [{ step: 0, color: "#ce8306" }, { step: 0.4, color: "#ce8306" }, { step: 1, color: "rgba(255,166,0,0.05)" }],
|
||||
rad: Math.PI * 2 * (3 / 4) / 100,
|
||||
radStart: Math.PI * (3 / 4),
|
||||
radEnd: Math.PI * (2 + (1 / 4)),
|
||||
radDrawStart: Math.PI * (3 / 4),
|
||||
unitadd: 1,
|
||||
});
|
||||
drawCircle({
|
||||
drawing_elem: 'circleId2',
|
||||
percentfontsize: 22,
|
||||
unitfontsize: 18,
|
||||
lineWidth: 10,
|
||||
addLeft: 4,
|
||||
percentfontcolor: "#12cda2",
|
||||
bgcolor: '#0F2164',
|
||||
forecolor: '#12cda2',
|
||||
unitfontcolor: '#1ab1ff',
|
||||
unitfontcolor: "#12cda2",
|
||||
unitfontsize: 11,
|
||||
lineGap: 'round',
|
||||
unitadd: -1,
|
||||
}
|
||||
if (itemW > itemWMin) {
|
||||
$('#circleId2').attr('width', itemW).attr('height', itemW);
|
||||
circleThreeOption.percentfontsize = (itemW * 22 / itemWMin).toFixed() - 0
|
||||
circleThreeOption.unitfontsize = (itemW * 18 / itemWMin).toFixed() - 0
|
||||
}
|
||||
console.log(itemTW, itemTH, itemW, circleThreeOption)
|
||||
|
||||
drawCircle(circleTwoOption);
|
||||
drawCircle(circleThreeOption);
|
||||
bgcolor: [{ step: 0, color: "#03344C" }, { step: 1, color: "rgba(3,52,76,0.5)" }],
|
||||
forecolor: [{ step: 0, color: "#12cda2" }, { step: 0.4, color: "#12cda2" }, { step: 1, color: "rgba(21,237,187,0.05)" }],
|
||||
rad: Math.PI * 2 * (3 / 4) / 100,
|
||||
radStart: Math.PI * (3 / 4),
|
||||
radEnd: Math.PI * (2 + (1 / 4)),
|
||||
radDrawStart: Math.PI * (3 / 4),
|
||||
unitadd: 1,
|
||||
});
|
||||
}
|
||||
|
||||
// 地图点
|
||||
|
||||
@@ -166,16 +166,41 @@ namespace FineUIPro.Web.common
|
||||
this.divSafeWorkTime.InnerHtml = "0000000000";
|
||||
}
|
||||
///整改单
|
||||
var getRectify =from x in Funs.DB.Check_RectifyNotices
|
||||
where x.States !=Const.State_0 && x.States != null && x.ProjectId != null
|
||||
select x;
|
||||
int allcout = getRectify.Count();
|
||||
if (allcout > 0)
|
||||
//var getRectify =from x in Funs.DB.Check_RectifyNotices
|
||||
// where x.States !=Const.State_0 && x.States != null && x.ProjectId != null
|
||||
// select x;
|
||||
//int allcout = getRectify.Count();
|
||||
//if (allcout > 0)
|
||||
//{
|
||||
// this.divAllRectify.InnerHtml = allcout.ToString();
|
||||
// int ccount = getRectify.Where(x => x.States == "5").Count();
|
||||
// this.divRectifyRate.InnerHtml = Math.Round(ccount * 1.0 / allcout * 100, 1).ToString();
|
||||
//}
|
||||
|
||||
|
||||
var getRectify = from x in Funs.DB.View_Hazard_HazardRegister
|
||||
where x.States != Const.State_0 && x.States != Const.State_R && x.States != null
|
||||
group x by x.States into g
|
||||
select new { g.Key, Count = g.Count() };
|
||||
var allcout = getRectify.ToList();
|
||||
if (allcout.Count > 0)
|
||||
{
|
||||
this.divAllRectify.InnerHtml = allcout.ToString();
|
||||
int ccount = getRectify.Where(x => x.States == "5").Count();
|
||||
this.divRectifyRate.InnerHtml = Math.Round(ccount * 1.0 / allcout * 100, 1).ToString();
|
||||
int total = 0;
|
||||
int finish = 0;
|
||||
foreach (var item in allcout)
|
||||
{
|
||||
total += item.Count;
|
||||
if (item.Key.ToString() == "3")
|
||||
{
|
||||
finish += item.Count;
|
||||
}
|
||||
}
|
||||
|
||||
this.divAllRectify.InnerHtml = total.ToString();
|
||||
//this.divUCRectify.InnerHtml = (total - finish).ToString();
|
||||
this.divRectifyRate.InnerHtml = Math.Round(finish * 1.0 / total * 100, 1).ToString() ;
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -229,6 +254,9 @@ namespace FineUIPro.Web.common
|
||||
///问题总数
|
||||
int AllCount = getJointCheckDetail.Count() + getCheckControl.Count();
|
||||
this.divCQMSAllNum.InnerHtml = AllCount.ToString();
|
||||
|
||||
|
||||
|
||||
if (AllCount > 0)
|
||||
{
|
||||
///问题完成数
|
||||
@@ -240,20 +268,28 @@ namespace FineUIPro.Web.common
|
||||
CRectificationRate = Math.Round(CCount * 1.0 / AllCount * 100, 1);
|
||||
}
|
||||
}
|
||||
|
||||
var getSpotCheckDetail = from x in Funs.DB.Check_SpotCheckDetail
|
||||
join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
|
||||
where y.ControlPoint != "C" && y.ControlPoint != "CR" && x.IsOK != null
|
||||
select x;
|
||||
int AllSpotCount = getSpotCheckDetail.Count();
|
||||
if (AllSpotCount > 0)
|
||||
var inspectionManagements = from x in Funs.DB.View_CQMS_InspectionManagementDetail select x;
|
||||
if (inspectionManagements.Count() > 0)
|
||||
{
|
||||
int okSpotCount = getSpotCheckDetail.Where(x => x.IsOK == true).Count();
|
||||
if (okSpotCount > 0)
|
||||
int okInspectionManagements = inspectionManagements.Where(x => x.IsOnceQualified == true).Count();
|
||||
if (okInspectionManagements > 0)
|
||||
{
|
||||
CQualifiedRate = Math.Round(okSpotCount * 1.0 / AllSpotCount * 100, 1);
|
||||
CQualifiedRate = Math.Round(okInspectionManagements * 1.0 / inspectionManagements.Count() * 100, 1);
|
||||
}
|
||||
}
|
||||
//var getSpotCheckDetail = from x in Funs.DB.Check_SpotCheckDetail
|
||||
// join y in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
|
||||
// where y.ControlPoint != "C" && y.ControlPoint != "CR" && x.IsOK != null
|
||||
// select x;
|
||||
//int AllSpotCount = getSpotCheckDetail.Count();
|
||||
//if (AllSpotCount > 0)
|
||||
//{
|
||||
// int okSpotCount = getSpotCheckDetail.Where(x => x.IsOK == true).Count();
|
||||
// if (okSpotCount > 0)
|
||||
// {
|
||||
// CQualifiedRate = Math.Round(okSpotCount * 1.0 / AllSpotCount * 100, 1);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user