更新
This commit is contained in:
@ -99,6 +99,7 @@
|
||||
document.getElementById('Rack_Siemens').value = redata.Rack;
|
||||
document.getElementById('Slot_Siemens').value = redata.Slot;
|
||||
document.getElementById('TimeOut_Siemens').value = redata.TimeOut;
|
||||
document.getElementById('Alias_Siemens').value = redata.Alias;
|
||||
//document.getElementById('PLCType_Siemens').value = redata.PLCType;
|
||||
select_value("PLCType_Siemens", redata.PLCType);
|
||||
}
|
||||
@ -278,6 +279,12 @@
|
||||
<input type="text" id="ServerName_Siemens" name="ServerName" placeholder="请输入地址" class="layui-input" style="width: 320px;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">CPU别名<em class="dotRed">*</em>:</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="Alias_Siemens" name="Alias" placeholder="请设置CPU别名" class="layui-input" style="width: 320px;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">Rack<em class="dotRed">*</em>:</label>
|
||||
<div class="layui-input-block">
|
||||
|
@ -14,6 +14,10 @@
|
||||
<title>
|
||||
表单设计器代码
|
||||
</title>
|
||||
<style type="text/css">
|
||||
|
||||
|
||||
</style>
|
||||
<link rel="stylesheet" href="~/lib/layui/css/layui.css" />
|
||||
<link rel="stylesheet" href="~/js/lay-module/formDesigner/formDesigner.css" />
|
||||
<link rel="stylesheet" href="~/js/lay-module/cron/cron.css" />
|
||||
@ -22,10 +26,10 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="workerdiv" style="margin: 10px 20px;">
|
||||
<form class="layui-form" style="height:100%;" id="formPreviewForm">
|
||||
<div id="workerdiv" style="margin: 10px 5px;">
|
||||
<form class="layui-form" style="height:30px;" id="formPreviewForm">
|
||||
<div id="grid_2" class="layui-form-item layui-row grid active" data-id="grid_2"
|
||||
data-tag="grid" data-index="0">
|
||||
data-tag="grid" data-index="0" style="height:100%">
|
||||
<div class="layui-col-md3 widget-col-list column0" data-index="0" data-parentindex="0">
|
||||
<div id="ReStartTime" class="layui-form-item active" data-id="ReStartTime"
|
||||
data-tag="date" data-index="0">
|
||||
@ -106,11 +110,13 @@
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<form class="layui-form" style="height:100%;width:100%;" id="tablepanel">
|
||||
<div class="layui-panel" id="gridpanel" style="height:100%;width:100%;overflow:scroll;">
|
||||
<div id="result"></div>
|
||||
</div>
|
||||
</form>
|
||||
@*<form class="layui-form" style="height:100%;width:100%;" id="tablepanel">*@
|
||||
@*<div class="layui-panel" id="gridpanel" style="height:100%;width:100%;overflow:scroll;">
|
||||
<div id="result" style="height:100%;width:100%;"></div>
|
||||
</div>*@
|
||||
<div id="result" style="height:100%;width:100%;overflow:scroll;">
|
||||
</div>
|
||||
@*</form>*@
|
||||
</div>
|
||||
<script type="text/javascript" src="~/lib/layui/layui.js">
|
||||
</script>
|
||||
@ -355,17 +361,70 @@
|
||||
);
|
||||
|
||||
// 合并单元格
|
||||
handler.mergeTable(workbook, true);
|
||||
//handler.mergeTable(workbook, true);
|
||||
staticToLayTable();
|
||||
completeLoading();
|
||||
},
|
||||
|
||||
// csv 数据转换为 table
|
||||
csv2table(csv, showTab = false) {
|
||||
var html = "<table lay-filter = \"tdemo\" class=\"layui-table\" lay-even=\"\" lay-skin=\"row\">";
|
||||
var html = "<table lay-filter=\"tdemo\" border=\"1\">";// class=\"layui-table\" lay-data=\"{报表数据}\"
|
||||
var rows = csv.split("\n");
|
||||
debugger;
|
||||
rows.pop(); // 最后一行没用的
|
||||
|
||||
var oneheadarray = rows[0].split(",");
|
||||
var onehead = new Array();
|
||||
var oneheadlength = new Array();
|
||||
var marge = 0;
|
||||
oneheadarray.forEach(function (onestring,oneid){
|
||||
if(onestring!=""){
|
||||
if(oneid == 0){
|
||||
onehead.push(onestring);
|
||||
}else{
|
||||
oneheadlength.push(marge+1);
|
||||
marge = 0;
|
||||
onehead.push(onestring);
|
||||
}
|
||||
|
||||
}else{
|
||||
marge++;
|
||||
if(oneid == (oneheadarray.length-1)){
|
||||
oneheadlength.push(marge + 1);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var twoheadarray = rows[1].split(",");
|
||||
|
||||
html +="<thead>";
|
||||
html+="<tr>";
|
||||
onehead.forEach(function(head,hid){
|
||||
let colspan = oneheadlength[hid];
|
||||
if(colspan == 1){
|
||||
html += "<th lay-data=\"{ align:'center'} \" colspan=" + colspan + ",colGroup:true>" + head + "</th>";
|
||||
}else{
|
||||
html += "<th lay-data=\"{ align:'center' } \" colspan="+colspan+">"+head+"</th>";
|
||||
}
|
||||
|
||||
});
|
||||
html+="</tr>";
|
||||
|
||||
html += "<tr>";//
|
||||
twoheadarray.forEach(function (dhead, did) {
|
||||
if(did == 0){
|
||||
html += "<th lay-data=\"{ field: 'a" + did + "', width:200 ,fixed:\'left\'} \">" + dhead + "</th>";//
|
||||
}else{
|
||||
html += "<th lay-data=\"{ field: 'a" + did + "', width:150} \">" + dhead + "</th>";//
|
||||
}
|
||||
|
||||
});
|
||||
html += "</tr>";
|
||||
html+="</thead>";
|
||||
|
||||
rows.shift();
|
||||
rows.shift();
|
||||
|
||||
html += "<tbody>";
|
||||
rows.forEach(function (row, idx) {
|
||||
var columns = row.split(",");
|
||||
@ -449,9 +508,41 @@
|
||||
|
||||
//转换静态表格
|
||||
table.init('tdemo', {
|
||||
page:true,
|
||||
limit:17,
|
||||
//height: 315 //设置高度
|
||||
//, limit: 10 //注意:请务必确保 limit 参数(默认:10)是与你服务端限定的数据条数一致
|
||||
//limit: 10 //注意:请务必确保 limit 参数(默认:10)是与你服务端限定的数据条数一致
|
||||
//支持所有基础参数
|
||||
|
||||
done:function(res,curr,count){
|
||||
// console.log(res)
|
||||
//解决操作栏因为内容过多换行问题
|
||||
$(".layui-table-main tr").each(function (index, val) {
|
||||
$($(".layui-table-fixed-l .layui-table-body tbody tr")[index]).height($(val).height());
|
||||
$($(".layui-table-fixed-r .layui-table-body tbody tr")[index]).height($(val).height());
|
||||
});
|
||||
//解决fixed固定,而导致的th高度不一致
|
||||
$(".layui-table-header tr").each(function (index, val) {
|
||||
$(".layui-table-fixed").each(function () {
|
||||
$($(this).find(".layui-table-header thead th")[index]).height($(val).height());
|
||||
});
|
||||
});
|
||||
$(".layui-table-header tr").each(function (index, val) {
|
||||
$(".layui-table-fixed").each(function () {
|
||||
$($(this).find(".layui-table-header thead tr")[index]).height($(val).height());
|
||||
});
|
||||
});
|
||||
$(".layui-table-main tr").each(function (index, val) {
|
||||
$(".layui-table-fixed").each(function () {
|
||||
$($(this).find(".layui-table-body tbody tr")[index]).height($(val).height());
|
||||
});
|
||||
});
|
||||
$(".layui-table-main tr").each(function (index, val) {
|
||||
$(".layui-table-fixed").each(function () {
|
||||
$($(this).find(".layui-table-body tbody th")[index]).height($(val).height());
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
HT.Cloud.Web/wwwroot/report/Report20230323231401.xlsx
Normal file
BIN
HT.Cloud.Web/wwwroot/report/Report20230323231401.xlsx
Normal file
Binary file not shown.
BIN
HT.Cloud.Web/wwwroot/report/Report20230323232125.xlsx
Normal file
BIN
HT.Cloud.Web/wwwroot/report/Report20230323232125.xlsx
Normal file
Binary file not shown.
Reference in New Issue
Block a user