wzy
2021-04-01 d388e2788b7ef088d7cd40f901b0acdcec460bc3
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <LINK rel="Bookmark" href="../images/favicon.ico">
    <!-- 本框架基本脚本和样式 -->
 
    <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script>
    <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}">
    <link rel="stylesheet" th:href="@{/plugin/bootstrap-3.3.5/css/bootstrap.min.css}">
    <link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/>
</head>
<body>
<div class="ibox-content" id="app">
 
    <el-table
            element-loading-text="拼命加载中"
            element-loading-spinner="el-icon-loading"
            element-loading-background="rgba(0, 0, 0, 0.8)"
            :data="tableData"
            border
            style="width: 100%">
        <el-table-column
                prop="id"
                label="id"
                width="100">
        </el-table-column>
 
        <el-table-column
                prop="owner"
                label="姓名"
                width="180">
        </el-table-column>
        <el-table-column
                prop="simpleMsg"
                label="异常类型"
        >
        </el-table-column>
        <el-table-column
                prop="createTime"
                label="发生时间"
                width="180">
        </el-table-column>
        <el-table-column
                prop="cause"
                label="访问地址"
        >
        </el-table-column>
        <el-table-column
                prop="mdc"
                label="mdc"
                width="80"
        >
        </el-table-column>
        <el-table-column
                prop="address"
                label="操作"
                width="180">
            <template slot-scope="scope">
                <el-button type="primary"
                           size="mini"
                           @click="lookDetail(scope.$index, scope.row)">查看详细
                </el-button>
                <el-button type="danger"
                           size="mini"
                           @click="del(scope.$index, scope.row)">删除
                </el-button>
 
            </template>
        </el-table-column>
    </el-table>
    <el-pagination
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :current-page="currentPage"
            :page-sizes="[15,50,100, 200, 300, 400]"
            :page-size="limit"
            layout="total, sizes, prev, pager, next, jumper"
            :total="total">
    </el-pagination>
 
    <el-dialog
            title="异常详情"
            :visible.sync="dialogVisible"
            width="70%"
           >
        <pre >{{currentMsg}}</pre>
        <span slot="footer" class="dialog-footer">
    <el-button @click="dialogVisible = false">关闭</el-button>
  </span>
    </el-dialog>
 
 
</div>
<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
<script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script>
<script type="text/javascript" th:src="@{/plugin/bootstrap-3.3.5/js/bootstrap.min.js}"></script>
<script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
<script type="text/javascript">
 
    var app = new Vue({
        el: '#app',
        data: {
            tableData: [],
            offset: 0,
            limit: 15,
            currentPage: 1,
            dialogVisible:false,
            currentMsg:'',
            total:0,
        },
        created: function () {
 
            this.loadInfo();
        },
 
        mounted: function () {
 
        },
 
        methods: {
 
 
            loadInfo: function () {
 
                console.log('加载服务器数据');
                var _this = this;
 
 
                AjaxProxy.requst({
                    app: _this,
                    data: {offset: _this.offset * _this.currentPage, limit: _this.limit},
                    async: false,
                    url: basePath + '/projException/showList',
                    callback: function (data) {
                        _this.tableData = data.rows;
                        _this.total=data.total;
 
                    }
                });
 
 
            }
            ,
            handleSizeChange(pageSize){
                this.limit=pageSize;
                this.loadInfo();
            },
            handleCurrentChange(currentPage){
                this.currentPage=currentPage;
                this.loadInfo();
            },
 
            lookDetail(index, row) {
                this.dialogVisible = true;
                this.currentMsg=row.errorMsg;
            },
            del(index, row){
                var _this = this;
                AjaxProxy.requst({
                    app: _this,
                    data: {id:row.id},
                    async: false,
                    url: basePath + '/projException/del',
                    callback: function (data) {
                       _this.$message.success(data.info);
                        _this.loadInfo();
 
                    }
                });
            },
 
        },
        filters:
            {
                format: function (value, patten) {
                    if (!value) return '';
                    return MTools.formatDate(value, patten)
                }
                ,
            }
        ,
 
    })
 
 
</script>
</body>
</html>