Blame view

web/WebMvc/Areas/base/Views/SysUser/UserList.cshtml 3.64 KB
赖素文 authored
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@{
    ViewData["title"] = "用户表";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@section header{

}

<div id="listForm" class="layui-tab-item layui-show">
    <table id="mainList" lay-filter="mainList"></table>
</div>


@section   Scripts{

    <script>
        let action = null,
            app=null;
        layui.config({
            base: "/js/",
            version: 1
        }).use(['system'], function () {
            var form = layui.form,
                $ = layui.jquery,
                element = layui.element,
                table = layui.table,
                system = layui.system,
                sysU = new system.u(),
                sendData = null,
                areaName = "base",
                controllerName = "SysUser";

            action = {

                //所有动作成功之后
                actionSuccess: (falg) => {
                    u.refreshTable(app, u, null, falg);
                 }
            }

            app = {
                data: {
                    cols: [[
                        { field: "id", width: 80, hide: true, title: "Id" },
                        { field: "account", width: 150, title: "账号" },

                        { field: "name", width: 150, title: "用户名" },
                        { field: "phoneNumber", width: 150, title: "phoneNumber" },
                        { field: "facePicture", width: 150, title: "脸部图片" },
                        { field: "idcard", width: 150, title: "工卡" },
                        { field: "faceID", width: 150, hide: true, title: "脸部id" },

                        { field: "createTime", width: 150, title: "创建时间" },
                        { field: "createBy", width: 150, title: "创建用户" },
                        { field: "updateTime", width: 150, title: "更新时间" },
                        { field: "updateBy", width: 150, title: "更新用户" },
                        { field: "otherCode", width: 150, title: "外部编码" },
                        { field: "plmeid", width: 150, title: "plmeid" },
                        { field: "remarks", width: 150, title: "remarks" },
                    ]],
                    tableIns: null,
                    tableElem: "mainList",
                    //下拉框配置
                    selectOption: {

                        //返回的数据 用于后续操作
                        selectData: {

                        }
                    }
                },
                methods: {
                    initTable: function () {
                        var teamCode = "".GetUrlParam("teamCode");
                        let options = {
                            elem: "#" + app.data.tableElem,
                            url: `/${areaName}/${controllerName}/LoadUserListByTeamCode`,
                            cols: sysU.columnRecord(app.data.tableElem, app.data.cols),
                            where: { teamCode: teamCode },
                        }
                        app.data.tableIns = sysU.initTable(options);
                    },

                    initSelectTable: function () {

                    },

                    initFrom() {
                        sysU.initSelect(app.data.selectOption);
                    }
                },
                registerEvent: function () {

                },
                init: function () {
                    app.methods.initTable();
                    app.methods.initFrom();
                    app.registerEvent();
                }
            };
            app.init();
        });
    </script>
}