| | |
| | | pageSize: 10, |
| | | total: 0 |
| | | } |
| | | } |
| | | }, |
| | | tableHeight: 400 |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | // 配置 |
| | | config (extParams) { |
| | | if (extParams == null) { |
| | |
| | | if (extParams.api == null) { |
| | | throw new Error('Missing config option \'api\'.') |
| | | } |
| | | this.api = require('@/api' + extParams.api) |
| | | |
| | | if(extParams.api.indexOf('@/',0) === 0){ |
| | | this.api = require(extParams.api) |
| | | }else { |
| | | this.api = require('@/api' + extParams.api) |
| | | } |
| | | // this.api = require('@/api' + extParams.api) |
| | | extParams.module && (this.module = extParams.module) |
| | | extParams['field.id'] && (this.configData['field.id'] = extParams['field.id']) |
| | | extParams['field.main'] && (this.configData['field.main'] = extParams['field.main']) |
| | |
| | | this.tableData.pagination.total = data.total |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | // this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking.search = false |
| | |
| | | this.__afterDelete() |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | // this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking.delete = false |
| | |
| | | this.__afterDelete(this.tableData.selectedRows.length) |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | // this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking.delete = false |