feat: 2.6.0 新增工作流编辑页面

This commit is contained in:
xlsea 2023-12-16 12:19:26 +08:00 committed by byteblogs168
parent 32231af5a2
commit 756e9204ff
7 changed files with 13278 additions and 6 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,16 @@
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Easy Retry</title>
<script type="module" crossorigin src="./assets/index-OUOgMQdd.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-F6SqBqfF.css">
</head>
<body>
<div id="app"></div>
</body>
</html>

View File

@ -3,7 +3,7 @@ import { UserLayout, BasicLayout, BlankLayout } from '@/layouts'
const RouteView = {
name: 'RouteView',
render: h => h('router-view')
render: (h) => h('router-view')
}
export const asyncRouterMap = [
@ -64,14 +64,26 @@ export const asyncRouterMap = [
name: 'GroupConfig',
hidden: true,
component: () => import('@/views/config/basicConfigForm/BasicConfigForm'),
meta: { title: '组信息配置', hidden: true, hideChildrenInMenu: true, icon: 'profile', permission: ['group'] }
meta: {
title: '组信息配置',
hidden: true,
hideChildrenInMenu: true,
icon: 'profile',
permission: ['group']
}
},
{
path: '/group/info',
name: 'GroupInfo',
hidden: true,
component: () => import('@/views/config/GroupInfo'),
meta: { title: '组配置详情', hidden: true, hideChildrenInMenu: true, icon: 'profile', permission: ['group'] }
meta: {
title: '组配置详情',
hidden: true,
hideChildrenInMenu: true,
icon: 'profile',
permission: ['group']
}
}
]
},
@ -148,7 +160,7 @@ export const asyncRouterMap = [
component: () => import('@/views/task/form/NotifyForm.vue'),
meta: { title: '通知配置', icon: 'profile', keepAlive: true, permission: ['retryTask'] }
}
]
]
},
{
path: '/job',
@ -215,6 +227,13 @@ export const asyncRouterMap = [
name: 'WorkflowList',
component: () => import('@/views/job/WorkflowList'),
meta: { title: '工作流', icon: 'profile', permission: ['jobBatch'] }
},
{
path: '/job/workflow/edit',
name: 'WorkflowEdit',
hidden: true,
component: () => import('@/views/job/WorkflowEdit'),
meta: { title: '工作流编辑', icon: 'profile', permission: ['jobBatch'] }
}
]
},

View File

@ -0,0 +1,67 @@
<template>
<iframe
ref="iframe"
:src="`/lib/index.html?token=${token}&namespaceId=${namespaceId}&id=${id}`"
marginwidth="0"
frameborder="no"
onLoad="this.height=100"
:style="`width: 100%;height:calc(99vh - 60px)`"
/>
</template>
<script>
import storage from 'store'
export default {
name: 'WorkFlowEdit',
components: {},
data () {
return {
id: '',
token: '',
namespaceId: ''
}
},
mounted () {
this.id = this.$route.query.id
this.token = storage.get('Access-Token')
this.namespaceId = storage.get('app_namespace')
},
created () {
window.addEventListener('message', this.handleMessage, false)
},
destroyed () {
window.removeEventListener('message', this.handleMessage)
},
methods: {
save () {
window.removeEventListener('message', this.handleMessage)
this.$message.info('工作流提交成功')
this.$router.push({ path: '/job/workflow/list' })
},
cancel () {
window.removeEventListener('message', this.handleMessage)
this.$router.push({ path: '/job/workflow/list' })
},
handleMessage (e) {
if (typeof e.data === 'object') {
if (e.data.code === 'SV5ucvLBhvFkOftb') {
this.save()
} else if (e.data.code === 'kb4DO9h6WIiqFhbp') {
this.cancel()
}
}
}
}
}
</script>
<style>
.ant-layout-content {
margin: 0;
}
.ant-layout-footer {
display: none;
}
</style>

View File

@ -292,13 +292,13 @@ export default {
},
methods: {
handleEdit (record) {
this.$router.push({ path: '/job/config', query: { id: record.id } })
this.$router.push({ path: '/job/workflow/edit', query: { id: record.id } })
},
goJobBatchList (record) {
this.$router.push({ path: '/job/batch/list', query: { jobId: record.id } })
},
handleNew () {
this.$router.push({ path: '/job/config' })
this.$router.push({ path: '/job/workflow/edit' })
},
handleChange (value) {
},

12644
frontend/yarn.lock Normal file

File diff suppressed because it is too large Load Diff