CommonBtn.cshtml
2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
@using Hh.Mes.POJO.ViewModel
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@{
Layout = "~/Views/Shared/_LayoutSys.cshtml";
int areaIndex = 1;
int btnIndex = 1;
}
@model List<AreaBtnModel>
@section header {
<link rel="stylesheet" href="/layui/font/fonteditor/icon.css" />
<link rel="stylesheet" href="/layui/font/fonteditor/page.css" />
<style type="text/css">
.model-title {
position: absolute;
right: 10px;
top: 10px;
font-weight: bold;
}
.layui-form-item .layui-form-checkbox[lay-skin="primary"] {
margin-top: 20px;
margin-bottom: 20px;
}
.footer {
position: relative;
top: 40px;
width: 500px;
text-align: right;
}
.footer-btn {
margin-right: 40px;
}
</style>
}
<div class="layui-row div-relative">
<H4 class="model-title">@ViewBag.Name</H4>
<form class="layui-form" method="post" asp-action="SaveChanageCommonBtn">
<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
<ul class="layui-tab-title">
@foreach (var item in Model)
{
<li @(areaIndex == 1 ? "class=layui-this" : null)>区域 @item.Area</li>
areaIndex++;
}
</ul>
<div class="layui-tab-content" style="height: 100px;">
@foreach (var item in Model)
{
<div class="layui-tab-item @(btnIndex == 1 ? "layui-show" : null)">
<div class="layui-form-item">
<div class="layui-input-block">
@foreach (var btn in item.CheckBoxItems)
{
<input lay-skin="primary" type="checkbox" id="@btn.Id" name="@($"area{item.Area}")" title="@btn.Text" value="@btn.Value" asp-for="@btn.Checked" />
}
</div>
</div>
</div>
btnIndex++;
}
</div>
</div>
<input name="moduleId" value="@ViewBag.ModuleId" style="display: none;" />
<div class="layui-form-item footer">
<div class="layui-input-block footer-btn">
<button class="layui-btn layui-btn-normal" style="margin-top: 10px;" type="submit">保存</button>
</div>
</div>
</form>
</div>
@section Scripts{
<script type="text/javascript" src="/productjs/base/sysmodule.js" asp-append-version="true"></script>
}