-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
将之前的页面迁移到新的模板中;修改proxy,实现调取远程接口与mock;
- Loading branch information
1 parent
0da8218
commit 6bb978b
Showing
13 changed files
with
1,120 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import request from '@/utils/request' | ||
|
||
// 任务管理 | ||
|
||
export function runJob(data) { | ||
return request({ | ||
url: '/api/runJob', | ||
method: 'post', | ||
data | ||
}) | ||
} | ||
|
||
export function runJobLog(data) { | ||
return request({ | ||
url: '/api/runJobLog', | ||
method: 'post', | ||
data | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import request from '@/utils/request' | ||
|
||
// 抽取任务 | ||
|
||
export function paged(params) { | ||
return request({ | ||
url: '/api/jobConfig', | ||
method: 'get', | ||
params | ||
}) | ||
} | ||
|
||
export function fetch(params) { | ||
return request({ | ||
url: '/api/jobConfig/' + params, | ||
method: 'get' | ||
}) | ||
} | ||
|
||
export function updated(data) { | ||
return request({ | ||
url: '/api/jobConfig/', | ||
method: 'put', | ||
data | ||
}) | ||
} | ||
|
||
export function created(data) { | ||
return request({ | ||
url: '/api/jobConfig/', | ||
method: 'post', | ||
data | ||
}) | ||
} | ||
|
||
export function deleted(data) { | ||
return request({ | ||
url: '/api/jobConfig/', | ||
method: 'delete', | ||
params: data | ||
}) | ||
} | ||
|
||
export function viewJobLog(params) { | ||
return request({ | ||
url: '/api/viewJobLog', | ||
method: 'get', | ||
params | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import request from '@/utils/request' | ||
|
||
// datax插件api | ||
|
||
export function getList(params) { | ||
return request({ | ||
url: '/api/dataxPlugin', | ||
method: 'get', | ||
params | ||
}) | ||
} | ||
|
||
export function fetchPlugin(params) { | ||
return request({ | ||
url: '/api/dataxPlugin/' + params, | ||
method: 'get' | ||
}) | ||
} | ||
|
||
export function updatePlugin(data) { | ||
return request({ | ||
url: '/api/dataxPlugin/', | ||
method: 'put', | ||
data | ||
}) | ||
} | ||
|
||
export function createPlugin(data) { | ||
return request({ | ||
url: '/api/dataxPlugin/', | ||
method: 'post', | ||
data | ||
}) | ||
} | ||
|
||
export function deletePlugin(data) { | ||
return request({ | ||
url: '/api/dataxPlugin/', | ||
method: 'delete', | ||
params: data | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,11 @@ | ||
<template> | ||
<div class="dashboard-container"> | ||
<component :is="currentRole" /> | ||
<div class="app-container"> | ||
nothing here | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { mapGetters } from 'vuex' | ||
import adminDashboard from './admin' | ||
import editorDashboard from './editor' | ||
export default { | ||
name: 'Dashboard', | ||
components: { adminDashboard, editorDashboard }, | ||
data() { | ||
return { | ||
currentRole: 'adminDashboard' | ||
} | ||
}, | ||
computed: { | ||
...mapGetters([ | ||
'roles' | ||
]) | ||
}, | ||
created() { | ||
if (!this.roles.includes('admin')) { | ||
this.currentRole = 'editorDashboard' | ||
} | ||
} | ||
name: 'Dashboard' | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<template> | ||
<div class="dashboard-container"> | ||
<component :is="currentRole" /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { mapGetters } from 'vuex' | ||
import adminDashboard from './admin' | ||
import editorDashboard from './editor' | ||
export default { | ||
name: 'Dashboard', | ||
components: { adminDashboard, editorDashboard }, | ||
data() { | ||
return { | ||
currentRole: 'adminDashboard' | ||
} | ||
}, | ||
computed: { | ||
...mapGetters([ | ||
'roles' | ||
]) | ||
}, | ||
created() { | ||
if (!this.roles.includes('admin')) { | ||
this.currentRole = 'editorDashboard' | ||
} | ||
} | ||
} | ||
</script> |
Oops, something went wrong.