成达考勤大屏幕
This commit is contained in:
parent
d696348af5
commit
c8077dc07c
|
@ -1050,6 +1050,7 @@
|
|||
<Content Include="HSSE\InformationProject\SafetyQuarterlyReportView.aspx" />
|
||||
<Content Include="HSSE\InformationProject\WorkSummaryReport.aspx" />
|
||||
<Content Include="HSSE\InformationProject\WorkSummaryReportEdit.aspx" />
|
||||
<Content Include="HSSE\KqShowScreen\KqShowScreen.aspx" />
|
||||
<Content Include="HSSE\Law\HSSEStandardList.aspx" />
|
||||
<Content Include="HSSE\Law\HSSEStandardListSave.aspx" />
|
||||
<Content Include="HSSE\Law\HSSEStandardListSelectCloumn.aspx" />
|
||||
|
@ -1644,8 +1645,15 @@
|
|||
<Content Include="res\assets\js\swiper.min.js" />
|
||||
<Content Include="res\assets\js\video-7.15.0.min.js" />
|
||||
<Content Include="res\assets\js\world.js" />
|
||||
<Content Include="res\css\kqshowscreen.css" />
|
||||
<Content Include="res\DataInTable.js" />
|
||||
<Content Include="res\images\01bj.png" />
|
||||
<Content Include="res\images\06bj.png" />
|
||||
<Content Include="res\images\18zlbj.png" />
|
||||
<Content Include="res\images\Monitoring.png" />
|
||||
<Content Include="res\images\sm-section-bg.png" />
|
||||
<Content Include="res\images\sm-section-bg1.png" />
|
||||
<Content Include="res\images\y01.png" />
|
||||
<Content Include="res\indexv1\assets\css\sub_index.css" />
|
||||
<Content Include="res\indexv1\assets\image\sub_index\security\01_1.png" />
|
||||
<Content Include="res\indexv1\assets\image\sub_index\security\01_2.png" />
|
||||
|
@ -1745,6 +1753,9 @@
|
|||
<Content Include="res\index\images\loginBg1.jpg" />
|
||||
<Content Include="res\index\images\logocenter.png" />
|
||||
<Content Include="res\JointComprehensive.js" />
|
||||
<Content Include="res\lib\echarts.min.js" />
|
||||
<Content Include="res\lib\flex.js" />
|
||||
<Content Include="res\lib\jquery.js" />
|
||||
<Content Include="res\ProgressBarIn.js" />
|
||||
<Content Include="res\js\jquery-1.8.3.js" />
|
||||
<Content Include="res\js\jquery-ui-1.9.2.custom.min.js" />
|
||||
|
@ -11849,6 +11860,13 @@
|
|||
<Compile Include="HSSE\InformationProject\WorkSummaryReportEdit.aspx.designer.cs">
|
||||
<DependentUpon>WorkSummaryReportEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\KqShowScreen\KqShowScreen.aspx.cs">
|
||||
<DependentUpon>KqShowScreen.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\KqShowScreen\KqShowScreen.aspx.designer.cs">
|
||||
<DependentUpon>KqShowScreen.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HSSE\Law\HSSEStandardList.aspx.cs">
|
||||
<DependentUpon>HSSEStandardList.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
|
|
@ -0,0 +1,323 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="KqShowScreen.aspx.cs" Inherits="FineUIPro.Web.HSSE.KqShowScreen.KqShowScreen" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head runat="server">
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
<script src="../../res/lib/flex.js"></script>
|
||||
<link rel="stylesheet" href="../../res/css/kqshowscreen.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="context">
|
||||
<div class="left site">
|
||||
<div class="block">
|
||||
<div class="title">当前现场总人数</div>
|
||||
<div class="main xc">
|
||||
<div class="number" id="divTotal">
|
||||
0
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="block1 ">
|
||||
<div class="title">当前公司现场人数</div>
|
||||
<div class="main gsxc">
|
||||
<ul id="ulcom" >
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right site">
|
||||
<div class="block1">
|
||||
<div class="top">
|
||||
<div class="info">
|
||||
<ul id="infoul">
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="photo">
|
||||
<img id="header" src="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="block">
|
||||
<div class="title">当前现场岗位人数量</div>
|
||||
<div class="main" id="gwnum">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<script src="../../res/lib/echarts.min.js"></script>
|
||||
<script src="../../res/lib/jquery.js"></script>
|
||||
<script>
|
||||
var projectid = '<%=ProjectId%>'
|
||||
|
||||
function createGWNUM(name, value1) {
|
||||
let type = name//['焊工', '电工', '架子工', '木工', '管工', '仪表安装工', '电气安装工', '钢筋工', '起重司机', '钳工', '起重指挥', '混凝土工', '维护电工']
|
||||
let value = value1// [100, 96, 89, 88, 87, 81, 80, 76, 75, 72, 70, 65, 62, 61]
|
||||
let opt = {
|
||||
grid: {
|
||||
top: 20,
|
||||
left: 60,
|
||||
right:60
|
||||
// bottom: 30
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: type,
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '#84D7FE'
|
||||
}
|
||||
},
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLabel: {
|
||||
interval: 0, // 坐标轴刻度标签的显示间隔
|
||||
rotate: -30 // 标签倾斜的角度
|
||||
}
|
||||
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: '#84D7FE'
|
||||
}
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: '#2E87AC',
|
||||
type: 'dashed'
|
||||
}
|
||||
}
|
||||
},
|
||||
dataZoom: [
|
||||
{
|
||||
show: true,
|
||||
type: 'slider', // 单独滚动条
|
||||
filterMode: 'none', // 不过滤数据 - 保证 y 轴数据范围不变
|
||||
brushSelect: true,
|
||||
bottom: 0,
|
||||
height: 10,
|
||||
backgroundColor: 'transparent',
|
||||
// 选中范围的填充颜色
|
||||
fillerColor: 'transparent',
|
||||
borderWidth: 0,
|
||||
borderColor: 'transparent',
|
||||
dataBackground: {
|
||||
lineStyle: {
|
||||
color: 'transparent'
|
||||
},
|
||||
areaStyle: {
|
||||
color: 'transparent'
|
||||
}
|
||||
},
|
||||
selectedDataBackground: {
|
||||
lineStyle: {
|
||||
color: 'transparent'
|
||||
},
|
||||
areaStyle: {
|
||||
color: 'transparent'
|
||||
}
|
||||
},
|
||||
|
||||
startValue: 0,
|
||||
endValue: 10,
|
||||
xAxisIndex: [0],
|
||||
showDetail: false,
|
||||
|
||||
handleSize: '0%',
|
||||
// 移动手柄尺寸高度
|
||||
// 测试发现手柄颜色和边框颜色会出现 偏差,所有设置手柄高度为0, 添加边框高度。由边框撑起高度
|
||||
moveHandleSize: 0, // 设置拖动手柄高度为0,只由边框负责高度展示
|
||||
// 不展示拖动手柄图标
|
||||
moveHandleIcon: 'none',
|
||||
moveHandleStyle: {
|
||||
// borderColor: systemTheme === 'light' ? '#E4E6E7' : '#5d6177',
|
||||
borderColor:'#5d6177',
|
||||
borderWidth: 10, // 设置边框高度
|
||||
borderType: 'solid',
|
||||
borderCap: 'round',
|
||||
// 保证拖动手柄右边框结尾有圆角
|
||||
borderJoin: 'round'
|
||||
},
|
||||
// 拖动高亮时设置
|
||||
emphasis: {
|
||||
moveHandleStyle: {
|
||||
// borderColor: systemTheme === 'light' ? '#E4E6E7' : '#5d6177',
|
||||
borderColor: '#5d6177',
|
||||
borderWidth: 10,
|
||||
borderType: 'solid',
|
||||
borderCap: 'round'
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '',
|
||||
data: value,
|
||||
type: 'bar',
|
||||
label: {
|
||||
show: true,
|
||||
color: '#ffffff',
|
||||
position: 'top',
|
||||
},
|
||||
barWidth: 16,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color:function(d){return "#"+Math.floor(Math.random()*(256*256*256-1) ).toString(16);}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
var myEchart = echarts.init(document.getElementById('gwnum'));
|
||||
myEchart.setOption(opt);
|
||||
}
|
||||
|
||||
|
||||
getData();
|
||||
function getData() {
|
||||
$.ajax({
|
||||
url: "KqShowScreen.aspx/getData",
|
||||
type: "POST",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: "json",
|
||||
data: JSON.stringify({
|
||||
projectId: projectid
|
||||
}),
|
||||
success: function (data) {
|
||||
if (data.d != null) {
|
||||
var workPost = data.d.workPost;
|
||||
if (workPost != null) {
|
||||
createGWNUM(workPost.name, workPost.value)
|
||||
}
|
||||
|
||||
var company = data.d.company;
|
||||
if (company != null) {
|
||||
var chtml = '';
|
||||
company.forEach(function (item, index, arr) {
|
||||
chtml += ' <li><span>' + item.name + '</span><span>' + item.value +'</span></li>';
|
||||
})
|
||||
$("#ulcom").html(chtml)
|
||||
|
||||
}
|
||||
var person = data.d.person;
|
||||
if (person != null) {
|
||||
var phtml = '<li><span>所属单位</span><span>' + person.UnitName +'</span></li>'+
|
||||
'<li ><span>姓名</span><span>' + person.PersonName +'</span></li>' +
|
||||
'<li><span>岗位</span><span>' + person.WorkPostName+'</span></li>' +
|
||||
'<li><span>班组</span><span>' + person.teamGroupName +'</span></li>' +
|
||||
'<li><span>' + person.inOut+'时间</span><span>' + person.ChangeTime+'</span></li>';
|
||||
|
||||
|
||||
$("#infoul").html(phtml)
|
||||
$("#header").src(person.PhotoUrl);
|
||||
|
||||
}
|
||||
|
||||
$("#divTotal").html(data.d.total)
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 设定默认值
|
||||
var websock = null;
|
||||
var cishu = 0;
|
||||
// 每10分钟 通过 websocket 向服务器发送一次心跳 证明客户端没有离线 依然在线可以正常接受消息
|
||||
setInterval(websocketsend, 20000);
|
||||
|
||||
initWebsocket();
|
||||
function initWebsocket() {
|
||||
/*
|
||||
* 初始化 websock
|
||||
* 连接 服务器地址
|
||||
* 并绑定 websock 四个事件方法
|
||||
*/
|
||||
websock = new WebSocket('ws://localhost:1000');
|
||||
// 接收服务器返回的数据
|
||||
websock.onmessage = this.websocketonmessage;
|
||||
// 连接建立时触发
|
||||
websock.onopen = this.websocketonopen;
|
||||
// 连接中发生异常
|
||||
websock.onerror = this.websocketonerror;
|
||||
// 连接关闭时触发
|
||||
websock.onclose = this.websocketclose;
|
||||
cishu = 0;
|
||||
}
|
||||
function websocketonopen(){
|
||||
|
||||
websocketsend();
|
||||
}
|
||||
|
||||
|
||||
function websocketonerror() {
|
||||
/*
|
||||
* websocket 连接建立失败 执行的方法
|
||||
* 注:我这里加了个判断,如果联系建立失败就在连接几次
|
||||
*/
|
||||
if (cishu < 5) {
|
||||
cishu = cishu + 1;
|
||||
initWebsocket();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function websocketsend() {
|
||||
|
||||
/*
|
||||
* websocket 数据发送 通过 websock.send() 方法向服务器发送数据
|
||||
* 注:这里随便发哈,主要作用就是通过这个动作,让客户端与服务端建立联系
|
||||
*/
|
||||
let actions = {
|
||||
"projectid": projectid
|
||||
};
|
||||
websock.send(JSON.stringify(actions));
|
||||
}
|
||||
|
||||
|
||||
function websocketclose(e) {
|
||||
/*
|
||||
* websocket 连接关闭 执行的方法
|
||||
*/
|
||||
console.log('断开连接', e);
|
||||
}
|
||||
|
||||
|
||||
function websocketonmessage(e) {
|
||||
/*
|
||||
* websocket 数据接收 执行的方法
|
||||
* 注:服务器通过 websocke 向客户端发送数据时,这里的方法就会自动触发啦
|
||||
*/
|
||||
|
||||
if ("newinout" == e.data);
|
||||
{
|
||||
getData();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
|
@ -0,0 +1,193 @@
|
|||
using BLL;
|
||||
using FastReport.Data;
|
||||
using FineUIPro.Web.HSSE.SitePerson;
|
||||
using FineUIPro.Web.ProjectData;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Services;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.HSSE.KqShowScreen
|
||||
{
|
||||
public partial class KqShowScreen : PageBase
|
||||
{
|
||||
#region 项目主键
|
||||
/// <summary>
|
||||
/// 项目主键
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
[WebMethod]
|
||||
public static object getData(string projectId)
|
||||
{
|
||||
int total = 0;
|
||||
HashSet<string> ids = new HashSet<string>();
|
||||
HashSet<string> idsIn = new HashSet<string>();
|
||||
Dictionary<string,DateTime> inperson = new Dictionary<string, DateTime>();
|
||||
Dictionary<string, DateTime> outPerson = new Dictionary<string, DateTime>();
|
||||
DateTime dateTime = DateTime.Now.AddDays(-1);
|
||||
var inout = Funs.DB.SitePerson_PersonInOut.Where(x => x.ProjectId == projectId && x.ChangeTime > dateTime).OrderByDescending(x => x.ChangeTime);
|
||||
Dictionary<string, int> company = new Dictionary<string, int>();
|
||||
Dictionary<string, int> workPost = new Dictionary<string, int>();
|
||||
foreach (var io in inout)
|
||||
{
|
||||
ids.Add(io.PersonId);
|
||||
if (io.IsIn.HasValue && io.IsIn.Value) //24小时内最晚的入场
|
||||
{
|
||||
if (inperson.ContainsKey(io.PersonId))
|
||||
{
|
||||
if (inperson[io.PersonId] < io.ChangeTime.Value)
|
||||
{
|
||||
inperson[io.PersonId] = io.ChangeTime.Value;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (io.ChangeTime.HasValue)
|
||||
{
|
||||
inperson.Add(io.PersonId, io.ChangeTime.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
else //24小时内最晚的出场
|
||||
{
|
||||
if (outPerson.ContainsKey(io.PersonId))
|
||||
{
|
||||
if (outPerson[io.PersonId] < io.ChangeTime.Value)
|
||||
{
|
||||
outPerson[io.PersonId] = io.ChangeTime.Value;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (io.ChangeTime.HasValue)
|
||||
{
|
||||
outPerson.Add(io.PersonId, io.ChangeTime.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (var id in ids)
|
||||
{
|
||||
if (inperson.ContainsKey(id) && !outPerson.ContainsKey(id))//只有入场没有出场 在场
|
||||
{
|
||||
idsIn.Add(id);
|
||||
total++;
|
||||
}
|
||||
else if (inperson.ContainsKey(id) && outPerson.ContainsKey(id))
|
||||
{
|
||||
if (inperson[id] < outPerson[id])//最晚入场时间 小于出场时间 在场
|
||||
{
|
||||
idsIn.Add(id);
|
||||
total++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HashSet<string> keys1 = new HashSet<string>();
|
||||
HashSet<string> keys2 = new HashSet<string>();
|
||||
|
||||
foreach (var io in inout)
|
||||
{
|
||||
if (idsIn.Contains(io.PersonId))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(io.WorkPostName))
|
||||
{
|
||||
if (!keys1.Contains(io.PersonId))
|
||||
{
|
||||
keys1.Add(io.PersonId);
|
||||
if (workPost.ContainsKey(io.WorkPostName))
|
||||
{
|
||||
workPost[io.WorkPostName] = workPost[io.WorkPostName] + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
workPost[io.WorkPostName] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(io.UnitName))
|
||||
{
|
||||
if (!keys2.Contains(io.PersonId))
|
||||
{
|
||||
keys2.Add(io.PersonId);
|
||||
if (company.ContainsKey(io.UnitName))
|
||||
{
|
||||
company[io.UnitName] = company[io.UnitName] + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
company[io.UnitName] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var personInOut = inout.FirstOrDefault();
|
||||
var person = Funs.DB.SitePerson_Person.FirstOrDefault(x => x.PersonId == personInOut.PersonId);
|
||||
string teamGroupName = "";
|
||||
string inOut = "出场";
|
||||
string PhotoUrl = "";
|
||||
PhotoUrl = "../../"+person.PhotoUrl;
|
||||
if (personInOut.IsIn ==true)
|
||||
{
|
||||
inOut = "入场";
|
||||
|
||||
}
|
||||
if (!string.IsNullOrEmpty(person.TeamGroupId))
|
||||
{
|
||||
var teamGroup = Funs.DB.ProjectData_TeamGroup.FirstOrDefault(x => x.TeamGroupId == person.TeamGroupId);
|
||||
if (teamGroup != null)
|
||||
{
|
||||
teamGroupName = teamGroup.TeamGroupName;
|
||||
}
|
||||
}
|
||||
List<object> comStatic = new List<object>();
|
||||
foreach (var key in company.Keys)
|
||||
{
|
||||
comStatic.Add(new { name =key, value=company[key] });
|
||||
}
|
||||
List<string> workPostName = new List<string>();
|
||||
List<int> workPostValue = new List<int>();
|
||||
foreach (var key in workPost.Keys)
|
||||
{
|
||||
workPostName.Add(key);
|
||||
workPostValue.Add(workPost[key]);
|
||||
}
|
||||
|
||||
|
||||
return new { company = comStatic, total, workPost = new { name = workPostName, value = workPostValue }, person = new{ personInOut.PersonName,personInOut.UnitName, personInOut.WorkPostName , inOut, PhotoUrl , teamGroupName, ChangeTime = personInOut.ChangeTime.Value.ToString("yyyy-MM-dd HH:mm")} };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HSSE.KqShowScreen
|
||||
{
|
||||
|
||||
|
||||
public partial class KqShowScreen
|
||||
{
|
||||
}
|
||||
}
|
|
@ -13,4 +13,5 @@
|
|||
<TreeNode id="E6B5DAD1-8B9A-47AC-B7A8-33AB3B0B630C" Text="单位考勤" NavigateUrl="Door/InOutManHours.aspx"></TreeNode>
|
||||
<TreeNode id="984AB874-D5CB-4077-8ADB-6E154F5B636C" Text="缺勤人员" NavigateUrl="Door/AbsenceDuty.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="51B5435D-7762-4D23-9E63-CBB2DE5BC5B3" Text="人员动态看板" NavigateUrl="HSSE/KqShowScreen/KqShowScreen.aspx"></TreeNode>
|
||||
</Tree>
|
|
@ -0,0 +1,134 @@
|
|||
*{
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
box-sizing: border-box;
|
||||
font-size: .175rem;
|
||||
color: #1ab1ff;
|
||||
}
|
||||
*::-webkit-scrollbar{
|
||||
display: none;
|
||||
}
|
||||
html,body{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.context{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
padding: .25rem;
|
||||
background-color: #010a2c;
|
||||
}
|
||||
.site{
|
||||
flex: 1;
|
||||
padding: .125rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.block{
|
||||
height: calc((100% - .5rem) / 3);
|
||||
width: 100%;
|
||||
border: 2px solid #112A67;
|
||||
border-radius: .125rem;
|
||||
|
||||
}
|
||||
.block1>.title,
|
||||
.block>.title{
|
||||
color: #00ffff;
|
||||
font-weight: 700;
|
||||
font-size: .175rem;
|
||||
text-align: center;
|
||||
line-height: .35rem;
|
||||
}
|
||||
.block>.main{
|
||||
height: calc(100% - .35rem);
|
||||
width: 100%;
|
||||
padding: .25rem;
|
||||
|
||||
}
|
||||
.context>.right{
|
||||
padding-top: .25rem;
|
||||
}
|
||||
.block1{
|
||||
height: calc((100% - .5rem) / 3 * 2 + .25rem);
|
||||
background-color: #010E35;
|
||||
border: 2px solid #112A67;
|
||||
border-radius: .125rem;
|
||||
}
|
||||
|
||||
.xc{
|
||||
background-image: url(../image/y01.png);
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 60% 90%;
|
||||
/* background-size: ; */
|
||||
}
|
||||
.xc>.number{
|
||||
text-align: center;
|
||||
color: #1ab1ff;
|
||||
margin-top: .375rem;
|
||||
font-size: .375rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
.gsxc{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
ul{
|
||||
width: 100%;
|
||||
padding: 0 .375rem;
|
||||
}
|
||||
ul>li{
|
||||
padding: .1rem 0;
|
||||
width: 100%;
|
||||
list-style: none;
|
||||
display: flex;
|
||||
}
|
||||
ul>li>span{
|
||||
flex: 1;
|
||||
font-size: .2rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
.gsxc ul>li>span:nth-child(2){
|
||||
color: #00ffff;
|
||||
font-size: .25rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.context .right{
|
||||
flex: 2;
|
||||
}
|
||||
|
||||
.context>.right>.block1>.top{
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
}
|
||||
|
||||
.context>.right>.block1>.top>.info{
|
||||
width: 58%;
|
||||
padding: .75rem .5rem .25rem;
|
||||
}
|
||||
.context>.right>.block1>.top>.photo{
|
||||
width: 42%;
|
||||
padding: .25rem .875rem 1rem .875rem;
|
||||
}
|
||||
.context>.right>.block1>.top>.photo>img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
img{
|
||||
user-drag: none;
|
||||
user-select: none;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-drag: none;
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
}
|
||||
#gwnum{
|
||||
padding: .125rem;
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 475 KiB |
Binary file not shown.
After Width: | Height: | Size: 7.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,52 @@
|
|||
(function flexible(window, document) {
|
||||
var docEl = document.documentElement
|
||||
var dpr = window.devicePixelRatio || 1
|
||||
|
||||
// adjust body font size
|
||||
function setBodyFontSize() {
|
||||
if (document.body) {
|
||||
document.body.style.fontSize = (16 * dpr) + 'px'
|
||||
}
|
||||
else {
|
||||
document.addEventListener('DOMContentLoaded', setBodyFontSize)
|
||||
}
|
||||
}
|
||||
setBodyFontSize();
|
||||
|
||||
function setRemUnit() {
|
||||
var rem = docEl.clientWidth / 24
|
||||
docEl.style.fontSize = rem + 'px'
|
||||
}
|
||||
|
||||
setRemUnit()
|
||||
|
||||
// reset rem unit on page resize
|
||||
window.addEventListener('resize', setRemUnit)
|
||||
window.addEventListener('pageshow', function (e) {
|
||||
if (e.persisted) {
|
||||
setRemUnit()
|
||||
}
|
||||
})
|
||||
|
||||
// detect 0.5px supports
|
||||
if (dpr >= 2) {
|
||||
var fakeBody = document.createElement('body')
|
||||
var testElement = document.createElement('div')
|
||||
testElement.style.border = '.5px solid transparent'
|
||||
fakeBody.appendChild(testElement)
|
||||
docEl.appendChild(fakeBody)
|
||||
if (testElement.offsetHeight === 1) {
|
||||
docEl.classList.add('hairlines')
|
||||
}
|
||||
docEl.removeChild(fakeBody)
|
||||
}
|
||||
}(window, document))
|
||||
|
||||
|
||||
|
||||
function fontSize(res){
|
||||
let clientWidth = window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
|
||||
if (!clientWidth) return;
|
||||
let fontSize = clientWidth / 1920;
|
||||
return res*fontSize;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,57 @@
|
|||
using Aspose.Words.Lists;
|
||||
using Fleck;
|
||||
using Newtonsoft.Json;
|
||||
using StackExchange.Redis;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace WebAPI.Common
|
||||
{
|
||||
public class PersonKqSocketSersvices
|
||||
{
|
||||
public static WebSocketServer webSocketServer;
|
||||
public static Dictionary<String, IWebSocketConnection> allSockets;
|
||||
public static void init(int port)
|
||||
{
|
||||
allSockets = new Dictionary<string, IWebSocketConnection>();
|
||||
webSocketServer = new WebSocketServer("ws://0.0.0.0:" + port);
|
||||
webSocketServer.Start(socket =>
|
||||
{
|
||||
socket.OnOpen = () =>
|
||||
{
|
||||
};
|
||||
socket.OnClose = () =>
|
||||
{
|
||||
string socketKey = null;
|
||||
foreach(var key in allSockets.Keys)
|
||||
{
|
||||
if(allSockets[key] == socket)
|
||||
{
|
||||
socketKey = key;
|
||||
}
|
||||
}
|
||||
if (socketKey != null)
|
||||
{
|
||||
allSockets.Remove(socketKey);
|
||||
}
|
||||
};
|
||||
socket.OnMessage = message =>
|
||||
{
|
||||
Dictionary<string, object> msg = JsonConvert.DeserializeObject<Dictionary<string,object>>(message);
|
||||
string projectid = msg["projectid"].ToString();
|
||||
if (allSockets.ContainsKey(projectid))
|
||||
{
|
||||
allSockets[projectid] = socket;
|
||||
}
|
||||
else
|
||||
{
|
||||
allSockets.Add(projectid , socket);
|
||||
}
|
||||
socket.Send("newinout");
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,6 +7,7 @@ using SgManager.AI;
|
|||
using System.Configuration;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using WebAPI.Common;
|
||||
|
||||
namespace WebAPI.Controllers
|
||||
{
|
||||
|
@ -561,6 +562,20 @@ namespace WebAPI.Controllers
|
|||
};
|
||||
|
||||
PersonInOutService.AddPersonInOut(newInOut);
|
||||
|
||||
if (PersonKqSocketSersvices.allSockets != null && PersonKqSocketSersvices.allSockets.ContainsKey(projectId))
|
||||
{
|
||||
var socket = PersonKqSocketSersvices.allSockets[projectId];
|
||||
if (socket.IsAvailable)
|
||||
{
|
||||
|
||||
socket.Send("newinout");
|
||||
}
|
||||
else
|
||||
{
|
||||
PersonKqSocketSersvices.allSockets.Remove(projectId);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
@ -7,6 +7,7 @@ using System.Web.Mvc;
|
|||
using System.Web.Optimization;
|
||||
using System.Web.Routing;
|
||||
using System.Configuration;
|
||||
using WebAPI.Common;
|
||||
|
||||
namespace WebAPI
|
||||
{
|
||||
|
@ -28,9 +29,13 @@ namespace WebAPI
|
|||
BLL.Funs.ConnString = ConfigurationManager.AppSettings["ConnectionString"];
|
||||
BLL.Funs.PageSize = Convert.ToInt32(ConfigurationManager.AppSettings["PageSize"]);
|
||||
BLL.ErrLogInfo.DefaultErrLogFullPath = Server.MapPath("~/ErrLog.txt");
|
||||
|
||||
PersonKqSocketSersvices.init(1000);
|
||||
// 使api返回为json
|
||||
GlobalConfiguration.Configuration.Formatters.XmlFormatter.SupportedMediaTypes.Clear();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,6 +59,9 @@
|
|||
<Reference Include="FineUIPro, Version=6.3.0.0, Culture=neutral, PublicKeyToken=9cbe753c029f291a">
|
||||
<HintPath>..\FineUIPro\FineUIPro.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Fleck, Version=1.2.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Fleck.1.2.0\lib\net45\Fleck.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
|
@ -215,6 +218,7 @@
|
|||
<Compile Include="Areas\HelpPage\SampleGeneration\TextSample.cs" />
|
||||
<Compile Include="Areas\HelpPage\XmlDocumentationProvider.cs" />
|
||||
<Compile Include="Common\ICache.cs" />
|
||||
<Compile Include="Common\PersonKqSocketServices.cs" />
|
||||
<Compile Include="Common\Redis.cs" />
|
||||
<Compile Include="Controllers\BaseInfoController.cs" />
|
||||
<Compile Include="Controllers\CommonController.cs" />
|
||||
|
@ -363,6 +367,7 @@
|
|||
<Folder Include="Models\" />
|
||||
<Folder Include="Properties\PublishProfiles\" />
|
||||
<Folder Include="Views\Login\" />
|
||||
<Folder Include="Views\Screen\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="fonts\glyphicons-halflings-regular.woff2" />
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<packages>
|
||||
<package id="Antlr" version="3.5.0.2" targetFramework="net461" />
|
||||
<package id="bootstrap" version="3.3.7" targetFramework="net461" />
|
||||
<package id="Fleck" version="1.2.0" targetFramework="net461" />
|
||||
<package id="jQuery" version="3.3.1" targetFramework="net461" />
|
||||
<package id="Microsoft.AspNet.Cors" version="5.2.7" targetFramework="net461" />
|
||||
<package id="Microsoft.AspNet.Mvc" version="5.2.4" targetFramework="net461" />
|
||||
|
|
Loading…
Reference in New Issue