|
@ -95,26 +95,30 @@ |
|
|
:sort-order="sortOrder" |
|
|
:sort-order="sortOrder" |
|
|
:show-sort-icons="true" |
|
|
:show-sort-icons="true" |
|
|
:multi-sort="multiSort" |
|
|
:multi-sort="multiSort" |
|
|
data-path="" |
|
|
|
|
|
pagination-path="" |
|
|
|
|
|
:per-page="perpage" |
|
|
:per-page="perpage" |
|
|
|
|
|
pagination-path="links.pagination" |
|
|
|
|
|
detail-row-id="id" |
|
|
wrapper-class="vuetable-wrapper" |
|
|
wrapper-class="vuetable-wrapper" |
|
|
loading-class="loading" |
|
|
loading-class="loading" |
|
|
|
|
|
@vuetable:pagination-data="onPaginationData" |
|
|
|
|
|
@vuetable:load-success="loadsuccess" |
|
|
|
|
|
@vuetable:load-error="onLoadError" |
|
|
:css="css.table" |
|
|
:css="css.table" |
|
|
> |
|
|
> |
|
|
</vuetable> |
|
|
</vuetable> |
|
|
<!-- <div class="vuetable-pagination ui basic segment grid"> |
|
|
</div> |
|
|
|
|
|
<div class="vuetable-pagination ui basic segment grid"> |
|
|
<vuetable-pagination-info |
|
|
<vuetable-pagination-info |
|
|
ref="paginationInfo" |
|
|
ref="paginationInfo" |
|
|
|
|
|
:css="css.paginationInfo" |
|
|
> |
|
|
> |
|
|
</vuetable-pagination-info> |
|
|
</vuetable-pagination-info> |
|
|
<vuetable-pagination |
|
|
<vuetable-pagination |
|
|
|
|
|
:css="css.pagination" |
|
|
ref="pagination" |
|
|
ref="pagination" |
|
|
@vuetable-pagination:change-page="onChangePage" |
|
|
@vuetable-pagination:change-page="onChangePage" |
|
|
> |
|
|
> |
|
|
</vuetable-pagination> |
|
|
</vuetable-pagination> |
|
|
</div> --> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</b-col> |
|
|
</b-col> |
|
@ -125,7 +129,9 @@ |
|
|
import { mapState, mapGetters, mapActions, dispatch } from "vuex"; |
|
|
import { mapState, mapGetters, mapActions, dispatch } from "vuex"; |
|
|
import Vue from "vue"; |
|
|
import Vue from "vue"; |
|
|
import store from "@/store/index"; |
|
|
import store from "@/store/index"; |
|
|
import Vuetable from "vuetable-2"; |
|
|
import { Vuetable, VuetablePaginationDropdown } from "vuetable-2"; |
|
|
|
|
|
import VuetablePaginationInfo from "vuetable-2/src/components/VuetablePaginationInfo"; |
|
|
|
|
|
import VuetablePagination from "vuetable-2/src/components/VuetablePagination"; |
|
|
import CssConfig from "vuetable-2/src/components/VuetableCssConfig.js"; |
|
|
import CssConfig from "vuetable-2/src/components/VuetableCssConfig.js"; |
|
|
|
|
|
|
|
|
import { codemirror } from "vue-codemirror"; |
|
|
import { codemirror } from "vue-codemirror"; |
|
@ -170,6 +176,9 @@ export default { |
|
|
components: { |
|
|
components: { |
|
|
codemirror, |
|
|
codemirror, |
|
|
Vuetable, |
|
|
Vuetable, |
|
|
|
|
|
VuetablePagination, |
|
|
|
|
|
VuetablePaginationInfo, |
|
|
|
|
|
VuetablePaginationDropdown, |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
@ -383,6 +392,38 @@ export default { |
|
|
this.history = false; |
|
|
this.history = false; |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
onPaginationData(paginationData) { |
|
|
|
|
|
this.$refs.pagination.setPaginationData(paginationData); |
|
|
|
|
|
this.$refs.paginationInfo.setPaginationData(paginationData); |
|
|
|
|
|
}, |
|
|
|
|
|
loadsuccess(response) { |
|
|
|
|
|
var data = response.data.data; |
|
|
|
|
|
this.fielddata = data; |
|
|
|
|
|
//console.log(this.fielddata); |
|
|
|
|
|
var n = data.length; |
|
|
|
|
|
n = n - 1; |
|
|
|
|
|
}, |
|
|
|
|
|
onChangePage(page) { |
|
|
|
|
|
this.$refs.vuetable.changePage(page); |
|
|
|
|
|
}, |
|
|
|
|
|
onLoadError(payload) { |
|
|
|
|
|
/* |
|
|
|
|
|
//error2 "invalid_token" join-service.vue:684 |
|
|
|
|
|
//error2 "The access token provided has expired" join-service.vue:685 |
|
|
|
|
|
//error2 "Unauthorized" join-service.vue:686 |
|
|
|
|
|
//error2 401 |
|
|
|
|
|
console.log('error2 '+JSON.stringify(payload.response.data.error)) |
|
|
|
|
|
console.log('error2 '+JSON.stringify(payload.response.data.error_description)) |
|
|
|
|
|
console.log('error2 '+JSON.stringify(payload.response.statusText)) |
|
|
|
|
|
console.log('error2 '+JSON.stringify(payload.response.status)) |
|
|
|
|
|
*/ |
|
|
|
|
|
if (payload.response.status == "401") { |
|
|
|
|
|
window.location.href = "https://api-login.swarmlab.io:8089"; |
|
|
|
|
|
Vue.nextTick( |
|
|
|
|
|
() => (window.location.href = "https://api-login.swarmlab.io:8089") |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
clear() { |
|
|
clear() { |
|
|
this.tryConsole = false; |
|
|
this.tryConsole = false; |
|
|
this.code = ""; |
|
|
this.code = ""; |
|
@ -606,6 +647,7 @@ export default { |
|
|
<style> |
|
|
<style> |
|
|
.table { |
|
|
.table { |
|
|
overflow: auto; |
|
|
overflow: auto; |
|
|
|
|
|
min-height: 500px; |
|
|
} |
|
|
} |
|
|
.CodeMirror { |
|
|
.CodeMirror { |
|
|
font-family: monospace; |
|
|
font-family: monospace; |
|
|