mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-04-05 17:38:01 +08:00
106 lines
4.4 KiB
Plaintext
106 lines
4.4 KiB
Plaintext
<%--
|
|
Name: 列表页面
|
|
Author: yubaolee
|
|
Description: 列表页面
|
|
--%>
|
|
<%@ CodeTemplate Language="C#" TargetLanguage="C#" Debug="False" Encoding="utf-8" Description="添加模块" %>
|
|
<%@ Property Name="SourceTable" Type="SchemaExplorer.TableSchema" Category="Context"
|
|
Description="连接的数据库" %>
|
|
<%@ Property Name="ModuleName" Type="String" Category="Context" Description="模块名称" %>
|
|
|
|
<%@ Map Name="CSharpAlias" Src="System-CSharpAlias" Description="System to C# Type Map" %>
|
|
<%@ Assembly Name="SchemaExplorer" %>
|
|
<%@ Import Namespace="SchemaExplorer" %>
|
|
<%@ Assembly Src="Util.cs" %>
|
|
<%@ Import Namespace="Util" %>
|
|
|
|
@section header
|
|
{
|
|
<link rel="stylesheet" href="/css/treetable.css" />
|
|
}
|
|
<blockquote class="layui-elem-quote news_search toolList">
|
|
<div class="layui-inline">
|
|
<div class="layui-input-inline">
|
|
<input class="layui-input" placeholder="请输入关键字"
|
|
name="key" id="key" autocomplete="off">
|
|
</div>
|
|
<button class="layui-btn" data-type="search">搜索</button>
|
|
</div>
|
|
@Html.Action("MenuHeader", "Home")
|
|
@*<button class="layui-btn " data-type="refresh">刷新</button>
|
|
<button class="layui-btn " data-type="addData">添加</button>
|
|
<button class="layui-btn layui-btn-danger" data-type="del">批量删除</button>*@
|
|
</blockquote>
|
|
|
|
<div style="display: flex;">
|
|
<ul id="tree" class="ztree" style="display: inline-block; width: 180px; padding: 10px; border: 1px solid #ddd; overflow: auto;"></ul>
|
|
<table class="layui-table"
|
|
lay-data="{height: 'full-80', page:true, id:'mainList'}"
|
|
lay-filter="list">
|
|
<thead>
|
|
<tr>
|
|
<th lay-data="{checkbox:true, fixed: true}"></th>
|
|
<% foreach (ColumnSchema column in this.SourceTable.Columns) {%>
|
|
<th lay-data="{field:'<%=column.Name%>', width:150}"><%=Tools.GetDescription(column)%></th>
|
|
<% }%>
|
|
<th lay-data="{fixed: 'right', width:160, align:'center', toolbar: '#barList'}"></th>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
<script type="text/html" id="barList">
|
|
<a class="layui-btn layui-btn-primary layui-btn-mini" lay-event="detail">查看</a>
|
|
</script>
|
|
|
|
<!--用户添加/编辑窗口-->
|
|
<div id="divEdit" style="display: none">
|
|
<form class="layui-form" action="" id="formEdit">
|
|
<% foreach (ColumnSchema column in this.SourceTable.Columns) {
|
|
if(column.IsPrimaryKeyMember){%>
|
|
<input type="hidden" name="<%=column.Name%>" v-model="<%=column.Name%>" />
|
|
<%}else if(CSharpAlias[column.SystemType.FullName] == "bool") {%>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label"><%=Tools.GetDescription(column)%></label>
|
|
<div class="layui-input-block">
|
|
<input type="checkbox" name="<%=column.Name%>" v-model="<%=column.Name%>" lay-skin="switch" value="1">
|
|
</div>
|
|
</div>
|
|
<%}else if(CSharpAlias[column.SystemType.FullName] == "int" ) {%>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label"><%=Tools.GetDescription(column)%></label>
|
|
<div class="layui-input-block">
|
|
<input type="radio" name="<%=column.Name%>" value="1" title="value1" checked>
|
|
<input type="radio" name="<%=column.Name%>" value="0" title="value2">
|
|
</div>
|
|
</div>
|
|
<%} else {%>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label"><%=Tools.GetDescription(column)%></label>
|
|
<div class="layui-input-block">
|
|
<input type="text" name="<%=column.Name%>" v-model="<%=column.Name%>" required lay-verify="required"
|
|
placeholder="<%=Tools.GetDescription(column)%>" autocomplete="off" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<%} %>
|
|
<%} %>
|
|
|
|
<%if(Tools.NeedCascade(SourceTable)){ %>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">所属部门</label>
|
|
<div class="layui-input-block">
|
|
<input id="Organizations" name="Organizations" v-model="Organizations" required lay-verify="required" class="layui-input" />
|
|
<input id="OrganizationIds" name="OrganizationIds" v-model="OrganizationIds" required lay-verify="required" type="hidden" />
|
|
<div id="menuContent" class="menuContent" style="display: none;">
|
|
<ul id="org" class="ztree"></ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<%} %>
|
|
</form>
|
|
</div>
|
|
|
|
<script type="text/javascript" src="/layui/layui.js"></script>
|
|
<script type="text/javascript" src="/js/<%=ModuleName%>Manager.js"></script>
|
|
|
|
|