| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213 |
- <style>
- .table-body {
- padding: 20px;
- background-color: #fff;
- }
- .input-item {
- display: inline-block;
- width: 250px;
- margin: 0 0 20px;
- }
- .input-item .el-input__inner {
- border-right: 0;
- }
- .input-item .el-input__inner:hover {
- border: 1px solid #dcdfe6;
- border-right: 0;
- outline: 0;
- }
- .input-item .el-input__inner:focus {
- border: 1px solid #dcdfe6;
- border-right: 0;
- outline: 0;
- }
- .input-item .el-input-group__append {
- background-color: #fff;
- border-left: 0;
- width: 10%;
- padding: 0;
- }
- .input-item .el-input-group__append .el-button {
- padding: 0;
- }
- .input-item .el-input-group__append .el-button {
- margin: 0;
- }
- .table-body .el-button {
- padding: 0 !important;
- border: 0;
- margin: 0 5px;
- }
- .el-table th > .cell {
- color: #333;
- font-weight: bold;
- font-size: 14px;
- }
- .el-table__footer-wrapper, .el-table__header-wrapper {
- border-bottom: 1.4px solid #D6D6D6;
- }
- .el-button--primary2 {
- color: #FFF;
- background-color: #03C5FF;
- border-color: #03C5FF;
- }
- </style>
- <div id="app" v-cloak>
- <el-card shadow="never" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
- <div slot="header">
- <div>
- <span>导入记录</span>
- </div>
- </template>
- </div>
- <div class="table-body">
- <el-table v-loading="listLoading" :data="list" stripe style="width: 100%">
- <el-table-column prop="id" label="ID" min-width="80" align="center"></el-table-column>
- <el-table-column label="导入数量" min-width="150" align="center">
- <template slot-scope="scope">
- <com-ellipsis :line="1">{{scope.row.export_count}}</com-ellipsis>
- </template>
- </el-table-column>
- <el-table-column label="成功数量" min-width="100" align="center">
- <template slot-scope="scope">
- <com-ellipsis :line="1">{{scope.row.export_success_count}}</com-ellipsis>
- </template>
- </el-table-column>
- <el-table-column label="失败数量" min-width="100" align="center">
- <template slot-scope="scope">
- <com-ellipsis :line="1">{{scope.row.export_fail_count}}</com-ellipsis>
- </template>
- </el-table-column>
- <el-table-column prop="scope" width="180" label="创建时间">
- <template slot-scope="scope">
- {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
- </template>
- </el-table-column>
- <el-table-column
- label="操作"
- min-width="180"
- align="center">
- <template slot-scope="scope">
- <el-button v-if="scope.row.export_fail_count>0" circle size="mini" type="text" @click="handle('fail',scope.row)">
- 失败记录
- </el-button>
- <span v-else> -- </span>
- </template>
- </el-table-column>
- </el-table>
- <div style="text-align: right;margin: 20px 0;">
- <el-pagination v-if="pagination" :page-size="pagination.pageSize"
- style="display: inline-block;float: right;" background @current-change="pageChange"
- layout="prev, pager, next" :total="pagination.total_count">
- </el-pagination>
- </div>
- </div>
- </el-card>
- </div>
- <script>
- const app = new Vue({
- el: '#app',
- data() {
- var validatePass = (rule, value, callback) => {
- var reg = /^[\u4e00-\u9fa5\w]+$/;
- if (reg.test(value)) {
- callback();
- }else{
- callback(new Error('规则名不能含有特殊字符'));
- }
- };
- return {
- list: [],
- id: null,
- sort: 0,
- keyword: '',
- cate_id:'',
- listLoading: false,
- btnLoading: false,
- pagination:null,
- page: 1,
- pageCount: 0,
- form:{
- file:null,
- cate_id:'',
- },
- //弹框配置
- addForm: {
- id : '',
- name : '',
- password:'',
- status : 1,
- sort:99,
- },
- title:'',
- dialogAddgsVisible: false,
- dataList: [],
- // 对话框显示与否
- dialogVisible: false,
- dataloading: false,
- addGroupVisible: false,
- };
- },
- methods: {
- pageChange(currentPage) {
- let self = this;
- self.page = currentPage; //console.log(currentPage,999999);
- self.getList();
- },
- getList() {
- let self = this;
- self.listLoading = true;
- request({
- params: {
- r: 'card-secret/import-log/index',
- page: self.page,
- cate_id:self.cate_id,
- },
- method: 'get',
- }).then(e => {
- self.listLoading = false;
- self.list = e.data.data.list;
- this.pagination = e.data.data.pagination;
- this.pagination.pageSize = e.data.data.page_size;
- this.pagination.total_count = e.data.data.count;
- }).catch(e => {
- console.log(e);
- });
- },
- handle(type,data = null){
- switch (type) {
- case 'fail':
- navigateTo({
- r: 'card-secret/import-fail-log/index',
- import_id: data.id,
- });
- break;
- }
- },
- },
- mounted: function () {
- this.cate_id = getQuery('cate_id');
- this.getList();
- }
- });
- </script>
|