|
@@ -99,6 +99,7 @@
|
|
|
<script>
|
|
<script>
|
|
|
import jsPlumb from 'jsplumb'
|
|
import jsPlumb from 'jsplumb'
|
|
|
import { saveFlow, publishFlow, getFlowDetail } from '@/api/orchestration'
|
|
import { saveFlow, publishFlow, getFlowDetail } from '@/api/orchestration'
|
|
|
|
|
+import { getTaskTemplateList } from '@/api/admin'
|
|
|
|
|
|
|
|
let _nodeSeq = 0
|
|
let _nodeSeq = 0
|
|
|
|
|
|
|
@@ -136,9 +137,8 @@ export default {
|
|
|
methods: {
|
|
methods: {
|
|
|
async loadTemplates() {
|
|
async loadTemplates() {
|
|
|
try {
|
|
try {
|
|
|
- const request = require('@/utils/request').default
|
|
|
|
|
- const res = await request({ url: '/api/admin/task-templates/list', method: 'post', data: { page: 1, pageSize: 100 } })
|
|
|
|
|
- this.templates = res.data.list || []
|
|
|
|
|
|
|
+ const res = await getTaskTemplateList({ page: 1, size: 100 })
|
|
|
|
|
+ this.templates = res.data.records || res.data || []
|
|
|
} catch (e) {
|
|
} catch (e) {
|
|
|
console.error('加载任务模板失败', e)
|
|
console.error('加载任务模板失败', e)
|
|
|
this.templates = []
|
|
this.templates = []
|