diff --git a/public/components/dev/transactionLogMessage/transactionLogMessage.html b/public/components/dev/transactionLogMessage/transactionLogMessage.html new file mode 100644 index 000000000..870f780f7 --- /dev/null +++ b/public/components/dev/transactionLogMessage/transactionLogMessage.html @@ -0,0 +1,45 @@ + \ No newline at end of file diff --git a/public/components/dev/transactionLogMessage/transactionLogMessage.js b/public/components/dev/transactionLogMessage/transactionLogMessage.js new file mode 100644 index 000000000..0cfe790c0 --- /dev/null +++ b/public/components/dev/transactionLogMessage/transactionLogMessage.js @@ -0,0 +1,61 @@ +(function (vc) { + + vc.extends({ + data: { + transactionLogMessageInfo: { + logId:'', + requestHeader:'', + responseHeader:'', + requestMessage:'', + responseMessage:'' + } + }, + _initMethod: function () { + + }, + _initEvent: function () { + vc.on('transactionLogMessage', 'openModal', function (param) { + $that.transactionLogMessageInfo.logId = param.logId + $that.clearLogMessage(); + $that.getLogMessage(param); + $('#transactionLogMessageModel').modal('show'); + }); + }, + methods: { + + getLogMessage: function (_param) { + let param = { + params:{ + logId: _param.logId + } + } + //发送get请求 + vc.http.apiGet('/transactionLog/queryTransactionLogMessage', + param, + function (json, res) { + var _transactionLogManageInfo = JSON.parse(json); + let messages = _transactionLogManageInfo.data; + + if (messages.length > 0) { + vc.copyObject(messages[0], $that.transactionLogMessageInfo); + } + + }, function (errInfo, error) { + console.log('请求失败处理'); + } + ); + }, + + clearLogMessage: function () { + vc.component.transactionLogMessageInfo = { + logId:'', + requestHeader:'', + responseHeader:'', + requestMessage:'', + responseMessage:'' + }; + } + } + }); + +})(window.vc); diff --git a/public/pages/dev/transactionLogManage/transactionLogManage.html b/public/pages/dev/transactionLogManage/transactionLogManage.html new file mode 100644 index 000000000..384f4c31d --- /dev/null +++ b/public/pages/dev/transactionLogManage/transactionLogManage.html @@ -0,0 +1,99 @@ +
+
+
+
+
+
查询条件
+
+ +
+
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+ +
+
+
+
+
+
+
+
+
+
+
交互日志
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
流水源IP应用编码服务编码耗时状态操作
{{log.transactionId}}{{log.srcIp}}{{log.appId}}{{log.serviceCode}}{{log.costTime}}{{log.state=='F'?'失败':'成功'}} +
+ +
+
+
    +
    + + +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/public/pages/dev/transactionLogManage/transactionLogManage.js b/public/pages/dev/transactionLogManage/transactionLogManage.js new file mode 100644 index 000000000..9a8db707f --- /dev/null +++ b/public/pages/dev/transactionLogManage/transactionLogManage.js @@ -0,0 +1,78 @@ +/** + 入驻小区 + **/ +(function (vc) { + var DEFAULT_PAGE = 1; + var DEFAULT_ROWS = 10; + vc.extends({ + data: { + transactionLogManageInfo: { + logs: [], + total: 0, + records: 1, + moreCondition: false, + title: '', + typeCds: [], + conditions: { + appId: '', + serviceCode: '', + transactionId: '', + } + } + }, + _initMethod: function () { + vc.component._listLogs(DEFAULT_PAGE, DEFAULT_ROWS); + }, + _initEvent: function () { + vc.on('transactionLogManage', 'listLog', function (_param) { + vc.component._listLogs(DEFAULT_PAGE, DEFAULT_ROWS); + }); + vc.on('pagination', 'page_event', function (_currentPage) { + vc.component._listLogs(_currentPage, DEFAULT_ROWS); + }); + }, + methods: { + _listLogs: function (_page, _rows) { + + vc.component.transactionLogManageInfo.conditions.page = _page; + vc.component.transactionLogManageInfo.conditions.row = _rows; + var param = { + params: vc.component.transactionLogManageInfo.conditions + }; + + //发送get请求 + vc.http.apiGet('/transactionLog/queryTransactionLog', + param, + function (json, res) { + var _transactionLogManageInfo = JSON.parse(json); + vc.component.transactionLogManageInfo.total = _transactionLogManageInfo.total; + vc.component.transactionLogManageInfo.records = _transactionLogManageInfo.records; + vc.component.transactionLogManageInfo.logs = _transactionLogManageInfo.data; + vc.emit('pagination', 'init', { + total: vc.component.transactionLogManageInfo.records, + currentPage: _page + }); + }, function (errInfo, error) { + console.log('请求失败处理'); + } + ); + }, + viewLogMessage: function (_transactionLog) { + vc.emit('transactionLogMessage', 'openModal', _transactionLog); + }, + _queryLogMethod: function () { + vc.component._listLogs(DEFAULT_PAGE, DEFAULT_ROWS); + + }, + _moreCondition: function () { + if (vc.component.transactionLogManageInfo.moreCondition) { + vc.component.transactionLogManageInfo.moreCondition = false; + } else { + vc.component.transactionLogManageInfo.moreCondition = true; + } + } + + + } + }); +})(window.vc);