328 lines
7.7 KiB
Plaintext
328 lines
7.7 KiB
Plaintext
@{
|
||
ViewBag.Title = "Index";
|
||
Layout = "~/Views/Shared/_Index.cshtml";
|
||
}
|
||
@inject Microsoft.AspNetCore.Hosting.IWebHostEnvironment env
|
||
<meta name="renderer" content="webkit">
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||
<style>
|
||
|
||
.layui-card {
|
||
border: 1px solid #f2f2f2;
|
||
border-radius: 5px;
|
||
}
|
||
|
||
.icon {
|
||
margin-right: 10px;
|
||
color: #1aa094;
|
||
}
|
||
|
||
.icon-cray {
|
||
color: #ffb800 !important;
|
||
}
|
||
|
||
.icon-blue {
|
||
color: #1e9fff !important;
|
||
}
|
||
|
||
.icon-tip {
|
||
color: #ff5722 !important;
|
||
}
|
||
|
||
.layuimini-qiuck-module {
|
||
text-align: center;
|
||
margin-top: 10px
|
||
}
|
||
|
||
.layuimini-qiuck-module a i {
|
||
display: inline-block;
|
||
width: 100%;
|
||
height: 60px;
|
||
line-height: 60px;
|
||
text-align: center;
|
||
border-radius: 2px;
|
||
font-size: 30px;
|
||
background-color: #F8F8F8;
|
||
color: #333;
|
||
transition: all .3s;
|
||
-webkit-transition: all .3s;
|
||
}
|
||
|
||
.layuimini-qiuck-module a cite {
|
||
position: relative;
|
||
top: 2px;
|
||
display: block;
|
||
color: #666;
|
||
text-overflow: ellipsis;
|
||
overflow: hidden;
|
||
white-space: nowrap;
|
||
font-size: 14px;
|
||
}
|
||
|
||
.welcome-module {
|
||
width: 100%;
|
||
height: 210px;
|
||
}
|
||
|
||
.panel {
|
||
background-color: #fff;
|
||
border: 1px solid transparent;
|
||
border-radius: 3px;
|
||
-webkit-box-shadow: 0 1px 1px rgba(0,0,0,.05);
|
||
box-shadow: 0 1px 1px rgba(0,0,0,.05)
|
||
}
|
||
|
||
.panel-body {
|
||
padding: 10px
|
||
}
|
||
|
||
.panel-title {
|
||
margin-top: 0;
|
||
margin-bottom: 0;
|
||
font-size: 12px;
|
||
color: inherit
|
||
}
|
||
|
||
.label {
|
||
display: inline;
|
||
padding: .2em .6em .3em;
|
||
font-size: 75%;
|
||
font-weight: 700;
|
||
line-height: 1;
|
||
color: #fff;
|
||
text-align: center;
|
||
white-space: nowrap;
|
||
vertical-align: baseline;
|
||
border-radius: .25em;
|
||
margin-top: .3em;
|
||
}
|
||
|
||
.label {
|
||
display: inline;
|
||
padding: .2em .6em .3em;
|
||
font-size: 75%;
|
||
font-weight: 700;
|
||
line-height: 1;
|
||
color: #fff;
|
||
text-align: center;
|
||
white-space: nowrap;
|
||
vertical-align: baseline;
|
||
border-radius: .25em;
|
||
margin-top: .3em;
|
||
}
|
||
|
||
.layui-red {
|
||
color: red
|
||
}
|
||
|
||
.main_btn > p {
|
||
height: 40px;
|
||
}
|
||
|
||
.layui-bg-number {
|
||
background-color: #F8F8F8;
|
||
}
|
||
|
||
.layuimini-notice:hover {
|
||
background: #f6f6f6;
|
||
}
|
||
|
||
.layuimini-notice {
|
||
padding: 7px 16px;
|
||
clear: both;
|
||
font-size: 12px !important;
|
||
cursor: pointer;
|
||
position: relative;
|
||
transition: background 0.2s ease-in-out;
|
||
}
|
||
|
||
.layuimini-notice-title, .layuimini-notice-label {
|
||
padding-right: 70px !important;
|
||
text-overflow: ellipsis !important;
|
||
overflow: hidden !important;
|
||
white-space: nowrap !important;
|
||
}
|
||
|
||
.layuimini-notice-title {
|
||
line-height: 28px;
|
||
font-size: 14px;
|
||
}
|
||
|
||
.layuimini-notice-extra {
|
||
position: absolute;
|
||
top: 50%;
|
||
margin-top: -8px;
|
||
right: 16px;
|
||
display: inline-block;
|
||
height: 16px;
|
||
color: #999;
|
||
}
|
||
</style>
|
||
<script>
|
||
layui.use(['layer', 'echarts', 'common'], function () {
|
||
var $ = layui.jquery,
|
||
layer = layui.layer,
|
||
common = layui.common,
|
||
echarts = layui.echarts;
|
||
wcLoading.close();
|
||
const leafer = new LeaferUI.Leafer({
|
||
view: 'idmain', // 支持 window 、div、canvas 标签对象, 可使用id字符串(不用加 # 号)
|
||
width: 1000, // 不能设置为 0, 否则会变成自动布局
|
||
height: 900,
|
||
})
|
||
|
||
const group = new LeaferUI.Group({ x: 0, y: 0, scaleX: 1, scaleY: 1 })
|
||
|
||
const box = new LeaferUI.Box({ x: 50, y: 50, width:400,height:800, fill: '#707980', draggable: true })
|
||
|
||
for(var linexid = 0;linexid<19;linexid++)
|
||
{
|
||
var line = new LeaferUI.Line({
|
||
x: 0,
|
||
y: (linexid+1) * 40,
|
||
width: 400,
|
||
strokeWidth: 1,
|
||
stroke: 'rgb(50,205,121)',
|
||
id: "line" + linexid.toString()
|
||
});
|
||
box.add(line);
|
||
}
|
||
var spiltline = new LeaferUI.Line({
|
||
x:200,
|
||
width:800,
|
||
rotation:90,
|
||
stroke:'rgb(50,205,121)',
|
||
strokeWidth:1,
|
||
dashPattern = [5, 2]
|
||
})
|
||
box.add(spiltline);
|
||
for(var sid = 0;sid<16;sid++)
|
||
{
|
||
let y =0 ;
|
||
if(sid<8)
|
||
{
|
||
y = 40*(sid) + 55;
|
||
}
|
||
if(sid>=8)
|
||
{
|
||
y = 40*(sid+2) + 55;
|
||
}
|
||
var rect_left = new LeaferUI.Rect({
|
||
x:50,
|
||
//y:30*(sid) + 40,
|
||
y:y,
|
||
height:10,
|
||
width:20,
|
||
fill:'#55557f',
|
||
draggable:false,
|
||
id:'io'+sid.toString()
|
||
})
|
||
var rect_left_text_name = new LeaferUI.Text({
|
||
x:5,
|
||
y:y-3,
|
||
//height:10,
|
||
width:40,
|
||
fill: '#5aa585',
|
||
text:'DO 0.X',
|
||
ITextAlign :'left',
|
||
IVerticalAlign:'top',
|
||
textWrap:'none',
|
||
padding:0,
|
||
fontSize:12
|
||
})
|
||
var rect_left_text_description = new LeaferUI.Text({
|
||
x:80,
|
||
y:y-3,
|
||
//height:10,
|
||
width:80,
|
||
fill: '#20343c',
|
||
text:'1罐大卸压阀输出',
|
||
ITextAlign :'left',
|
||
IVerticalAlign:'top',
|
||
textWrap:'none',
|
||
padding:0,
|
||
fontSize:12
|
||
})
|
||
//1罐仓流化阀原输出
|
||
var rect_right = new LeaferUI.Rect({
|
||
x:330,
|
||
//y:30*(sid) + 40,
|
||
y:y,
|
||
height:10,
|
||
width:20,
|
||
fill:'#55557f',
|
||
draggable:false,
|
||
id:'io'+(sid+16).toString()
|
||
})
|
||
//console.log(rect)
|
||
box.add(rect_left);
|
||
box.add(rect_left_text_name);
|
||
box.add(rect_left_text_description);
|
||
box.add(rect_right);
|
||
}
|
||
|
||
//const rect2 = new LeaferUI.Rect({ x: 0, y: 0, width: 100, height: 100, fill: '#09300e', draggable: true })
|
||
|
||
leafer.add(group)
|
||
group.add(box)
|
||
//box.add(rect2)
|
||
|
||
var t = null;
|
||
function time() {
|
||
clearTimeout(t); //清除定时器
|
||
UpdataChart()
|
||
t = setTimeout(time, 1 * 1000); //设定定时器,循环运行
|
||
|
||
}
|
||
async function UpdataChart() {
|
||
|
||
myajax = await $.ajax({
|
||
url: "/PenMeiReportManage/PenMeiJMReport/GetRealIOState",
|
||
type: "Get",
|
||
dataType: "json",
|
||
// traditional: true,//这里设置为true
|
||
// data: { charts_TagNames: SelectTagNamelist },
|
||
success: function (redata) {
|
||
|
||
}
|
||
});
|
||
$.when(myajax).done(function (redata) {
|
||
debugger;
|
||
for(var ioName in redata)
|
||
{
|
||
leafer.findOne('#'+ioName).fill =(redata[ioName] == '1') ? '#d4d04e' : '#9f9f91';
|
||
debugger;
|
||
}
|
||
});
|
||
|
||
|
||
}
|
||
t = setTimeout(time, 1 * 1000); //开始运行
|
||
|
||
|
||
|
||
|
||
})
|
||
</script>
|
||
<script type="text/javascript" src="~/lib//leafer-ui@1.0.0-rc.8/web.js"></script>
|
||
<div style ="width:100%;height:100%;">
|
||
<div class="layuimini-container" style="width:100%;height:100%;">
|
||
<div id = "idmain">
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- <div style ="width:100%;height:100%;">
|
||
<div class="layuimini-container" style="width:100%;height:100%;">
|
||
<div class="layuimini-main">
|
||
<div class="layui-row layui-col-space15">
|
||
<div class="layui-col-md15">
|
||
<iframe style="width:100%;height:95vh" src="http://192.168.110.247:8250/run?reportName=HTTEST/%E6%8A%A5%E8%AD%A6%E6%B1%87%E6%80%BB.cr"></iframe>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div> -->
|