mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 21:59:12 +08:00
优化导入代码
This commit is contained in:
parent
04aac91ef8
commit
23f60a2794
@ -16,6 +16,10 @@
|
||||
<i class="glyphicon glyphicon-floppy-save"></i>
|
||||
资产导出
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary btn-sm"
|
||||
v-on:click="_openAssetImportLog()">
|
||||
导入日志
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
|
||||
@ -97,6 +97,9 @@
|
||||
_exitCommunityData: function () {
|
||||
vc.jumpToPage('/callComponent/assetImport/exitCommunityData?communityId='+vc.getCurrentCommunity().communityId);
|
||||
},
|
||||
_openAssetImportLog:function(){
|
||||
vc.jumpToPage('/admin.html#/pages/property/assetImportLog')
|
||||
},
|
||||
checkFileType: function (fileType) {
|
||||
const acceptTypes = ['xls', 'xlsx'];
|
||||
for (var i = 0; i < acceptTypes.length; i++) {
|
||||
|
||||
53
public/pages/property/assetImportLog/assetImportLog.html
Normal file
53
public/pages/property/assetImportLog/assetImportLog.html
Normal file
@ -0,0 +1,53 @@
|
||||
<div class="animated fadeInRight ecommerce">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<h5>批量导入日志</h5>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<table class="footable table table-stripped toggle-arrow-tiny"
|
||||
data-page-size="15">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">导入编号</th>
|
||||
<th class="text-center">导入类型</th>
|
||||
<th class="text-center">成功数量</th>
|
||||
<th class="text-center">失败数量</th>
|
||||
<th class="text-center">备注</th>
|
||||
<th class="text-center">导入时间</th>
|
||||
<th class="text-center">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="log in assetImportLogInfo.logs">
|
||||
<td class="text-center">{{log.logId}}</td>
|
||||
<td class="text-center">{{log.logType == '1001'?'资产':'缴费历史'}}</td>
|
||||
<td class="text-center">{{log.successCount}}</td>
|
||||
<td class="text-center">{{log.errorCount}}</td>
|
||||
<td class="text-center">{{log.remark}}</td>
|
||||
<td class="text-center">{{log.createTime}}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group" v-if="log.errorCount > 0">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openEditCarBlackWhiteModel(log)">失败详情
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<ul class="pagination float-right"></ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<!-- 分页 -->
|
||||
<vc:create path="frame/pagination"></vc:create>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
58
public/pages/property/assetImportLog/assetImportLog.js
Normal file
58
public/pages/property/assetImportLog/assetImportLog.js
Normal file
@ -0,0 +1,58 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function (vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data: {
|
||||
assetImportLogInfo: {
|
||||
logs: [],
|
||||
total: 0,
|
||||
records: 1,
|
||||
moreCondition: false,
|
||||
carNum: '',
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
vc.component._listAssetImportLogs(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_initEvent: function () {
|
||||
|
||||
vc.on('assetImportLog', 'listAssetImportLog', function (_param) {
|
||||
vc.component._listAssetImportLogs(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('pagination', 'page_event', function (_currentPage) {
|
||||
vc.component._listAssetImportLogs(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_listAssetImportLogs: function (_page, _rows) {
|
||||
var param = {
|
||||
params: {
|
||||
page: _page,
|
||||
row: _rows,
|
||||
communityId: vc.getCurrentCommunity().communityId
|
||||
}
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.apiGet('/assetImportLog/queryAssetImportLog',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _assetImportLogInfo = JSON.parse(json);
|
||||
vc.component.assetImportLogInfo.total = _assetImportLogInfo.total;
|
||||
vc.component.assetImportLogInfo.records = _assetImportLogInfo.records;
|
||||
vc.component.assetImportLogInfo.logs = _assetImportLogInfo.data;
|
||||
vc.emit('pagination', 'init', {
|
||||
total: vc.component.assetImportLogInfo.records,
|
||||
dataCount: vc.component.assetImportLogInfo.total,
|
||||
currentPage: _page
|
||||
});
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
@ -88,7 +88,7 @@
|
||||
if (res.status == 200) {
|
||||
//关闭model
|
||||
vc.toast("处理成功");
|
||||
//vc.jumpToPage('/admin.html#/pages/property/roomCreateFee')
|
||||
vc.jumpToPage('/admin.html#/pages/property/assetImportLog')
|
||||
return;
|
||||
}
|
||||
vc.toast(json, 10000);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user