mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-02 18:04:29 +08:00
Fix task creation on dashboard [SCI-11755]
This commit is contained in:
parent
9b6f1ff631
commit
172201f3a8
1 changed files with 10 additions and 1 deletions
|
@ -370,7 +370,16 @@ export default {
|
|||
fetchOptions() {
|
||||
if (this.optionsUrl) {
|
||||
const params = { query: this.query, page: this.nextPage, ...this.urlParams };
|
||||
axios({ method: this.ajaxMethod, url: this.optionsUrl, data: params })
|
||||
|
||||
let request = {};
|
||||
|
||||
if (this.ajaxMethod === 'get') {
|
||||
request = { method: 'get', url: this.optionsUrl, params };
|
||||
} else {
|
||||
request = { method: 'post', url: this.optionsUrl, data: params };
|
||||
}
|
||||
|
||||
axios(request)
|
||||
.then((response) => {
|
||||
if (response.data.paginated) {
|
||||
this.fetchedOptions = [...this.fetchedOptions, ...response.data.data];
|
||||
|
|
Loading…
Add table
Reference in a new issue