Index.cshtml 5.1 KB
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section header
    {
    <link rel="stylesheet" href="/css/treetable.css" />
}
<blockquote class="layui-elem-quote toolList" id="menus"></blockquote>

<div class="layui-row">
    <div class="layui-col-xs2">
        <ul id="tree" class="ztree"
            style="padding: 2px; border: 1px solid #ddd; overflow: auto;"></ul>
    </div>
    <div class="layui-col-xs10">
        <table class="layui-table"
               lay-data="{height: 'full-60', page:true, id:'mainList'}"
               lay-filter="list" lay-size="sm">
            <thead>
                <tr>
                    <th lay-data="{checkbox:true, fixed: true}"></th>
                    <th lay-data="{field:'Id', width:80, sort: true, fixed: false, hide: false}">Id</th>
                    <th lay-data="{field:'Name', width:150, sort: true, fixed: false}">组织名称</th>
                    <th lay-data="{field:'CascadeId', width:150}">层级ID</th>
                    <th lay-data="{field:'ParentName', width:135}">父节点名称</th>
                    <th lay-data="{field:'SortNo', width:180}">排序号</th>
                    <th lay-data="{field:'CreateBy', width:150, sort: true, fixed: false, hide: false}">创建者</th>
                    <th lay-data="{field:'CreateTime', width:150, sort: true, fixed: false, hide: false}">创建时间</th>
                    <th lay-data="{field:'UpdateBy', width:150, sort: true, fixed: false, hide: false}">更新者</th>
                    <th lay-data="{field:'UpdateTime', width:150, sort: true, fixed: false, hide: false}">更新时间</th>
                </tr>
            </thead>
        </table>
    </div>
</div>

<!--用户添加/编辑窗口-->
<div id="divEdit" style="display: none">
    <form class="layui-form layui-form-pane" action="" id="formEdit">

        <div hidden>
            <label class="layui-form-label layui-col-sm3">Id</label>
            <div class="layui-input-inline layui-col-sm6">
                <input name="Id" v-model="Id" class="layui-input" style="background-color:#eee;" disabled="disabled" type="text" autocomplete="off" lay-verify="">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">部门名称</label>
            <div class="layui-input-block">
                <input type="text" name="Name" v-model="Name" required lay-verify="required"
                       placeholder="请输入部门名称" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">排序号</label>
            <div class="layui-input-block">
                <input type="text" name="SortNo" v-model="SortNo" required lay-verify="required"
                       placeholder="请输入排序号" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">所属部门</label>
            <div class="layui-input-block">
                <input id="ParentName" name="ParentName" v-model="ParentName" class="layui-input" readonly />
                <input id="ParentId" name="ParentId" v-model="ParentId" type="hidden" />
                <div id="menuContent" class="menuContent" style="display: none;">
                    <ul id="org" class="ztree"></ul>
                </div>
            </div>
        </div>

        <div hidden>
            <label class="layui-form-label layui-col-sm3">创建者</label>
            <div class="layui-input-inline layui-col-sm6">
                <input name="CreateBy" v-model="CreateBy" class="layui-input" type="text" autocomplete="off" lay-verify="">
            </div>
        </div>
        <div hidden>
            <label class="layui-form-label layui-col-sm3">创建时间</label>
            <div class="layui-input-inline layui-col-sm6">
                <input name="CreateTime" v-model="CreateTime" class="layui-input" type="text" autocomplete="off" lay-verify="">
            </div>
        </div>
        <div hidden>
            <label class="layui-form-label layui-col-sm3">更新者</label>
            <div class="layui-input-inline layui-col-sm6">
                <input name="UpdateBy" v-model="UpdateBy" class="layui-input" type="text" autocomplete="off" lay-verify="">
            </div>
        </div>
        <div hidden>
            <label class="layui-form-label layui-col-sm3">更新时间</label>
            <div class="layui-input-inline layui-col-sm6">
                <input name="UpdateTime" v-model="UpdateTime" class="layui-input" type="text" autocomplete="off" lay-verify="">
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formSubmit">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
</div>

<script type="text/javascript" src="/layui/layui.js"></script>
<script type="text/javascript" src="/productjs/base/sysdept.js?v=1"></script>