表单设计页面,模型基础信息增删
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<!--业务用户管理界面-->
|
||||
<!--生产线管理界面-->
|
||||
<template>
|
||||
<div class='default-main'>
|
||||
<TableHeader>
|
||||
|
||||
@@ -125,7 +125,6 @@ const resetForm = () => {
|
||||
}
|
||||
|
||||
const open = (text: string, data?: anyObj) => {
|
||||
console.log(data)
|
||||
tab.value = 'user'
|
||||
title.value = text
|
||||
//默认选中第一个tab
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!--业务用户管理界面-->
|
||||
<!--暂降治理历史数据管理界面-->
|
||||
<template>
|
||||
<div class='default-main'>
|
||||
<TableHeader>
|
||||
|
||||
156
src/views/system/workflow/form/formDesigner.vue
Normal file
156
src/views/system/workflow/form/formDesigner.vue
Normal file
@@ -0,0 +1,156 @@
|
||||
<!--用于表单设计器,提供给-->
|
||||
<template>
|
||||
<div id='form-designer' ref='formDesignerContent'>
|
||||
<v-form-designer ref='vfDesignerRef' :resetFormJson='true' :designer-config='designerConfig'>
|
||||
<!-- 自定义按钮插槽 -->
|
||||
<template #customToolButtons>
|
||||
<el-button link type='primary' :icon='Finished' @click='saveForm'>保存</el-button>
|
||||
<el-button link type='primary' :icon='Back' @click='go(-1)'>返回</el-button>
|
||||
</template>
|
||||
</v-form-designer>
|
||||
<el-dialog
|
||||
draggable
|
||||
class='cn-operate-dialog'
|
||||
v-model='formVisible'
|
||||
:title='title'
|
||||
style='width: 415px; height: 250px'
|
||||
top='40vh'
|
||||
>
|
||||
<el-scrollbar>
|
||||
<el-form :inline='false' :model='form' label-width='120px' :rules='rules' ref='formRef'>
|
||||
<el-form-item label='表单名' prop='name'>
|
||||
<el-input v-model='form.name' placeholder='请输入表单名' clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label='备注'>
|
||||
<el-input v-model='form.remark' placeholder='请输入备注' clearable />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
<template #footer>
|
||||
<span class='dialog-footer'>
|
||||
<el-button @click='formVisible = false'>取消</el-button>
|
||||
<el-button type='primary' @click='submit'>确认</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
import { Back, Finished } from '@element-plus/icons-vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { onMounted, reactive, ref } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { getFormById, addWFForm, updateWFForm } from '@/api/process-boot/workflow/form'
|
||||
|
||||
defineOptions({
|
||||
name: 'formDesginer'
|
||||
})
|
||||
const vfDesignerRef = ref()
|
||||
const { go } = useRouter()
|
||||
const { query } = useRoute()
|
||||
const formVisible = ref(false)
|
||||
const title = ref('新增表单')
|
||||
// 表单对象,表单名称、表单备注、表单内容content
|
||||
const form = reactive({
|
||||
id: '',
|
||||
name: '',
|
||||
remark: '',
|
||||
content: ''
|
||||
})
|
||||
|
||||
//form表单校验规则
|
||||
const rules = {
|
||||
name: [{ required: true, message: '表单名不能为空', trigger: 'blur' }]
|
||||
}
|
||||
|
||||
|
||||
const designerConfig = reactive({
|
||||
// 链接信息是否显示
|
||||
externalLink: false,
|
||||
toolbarMaxWidth: 510,
|
||||
// 语言选择下拉是否显示
|
||||
languageMenu: false,
|
||||
// 模版信息是否显示
|
||||
//formTemplates: false,
|
||||
// 事件信息是否显示
|
||||
//eventCollapse: false,
|
||||
// 清空按钮是否显示
|
||||
//clearDesignerButton: false,
|
||||
// 预览按钮是否显示
|
||||
//previewFormButton: false,
|
||||
exportCodeButton: true,
|
||||
generateSFCButton: false
|
||||
})
|
||||
|
||||
|
||||
//初始化页面样式、并初始化页面数据
|
||||
const formDesignerContent = ref()
|
||||
const getFormInfo = async () => {
|
||||
form.id = query.id
|
||||
if (form.id.length > 0) {
|
||||
//如果Id不为空,则查询该表单的数据,用于回显表单内容
|
||||
await getFormById(form.id).then(res => {
|
||||
vfDesignerRef.value.setFormJson(res.data.content)
|
||||
form.name = res.data.name
|
||||
form.remark = res.data.remark
|
||||
})
|
||||
}else{
|
||||
vfDesignerRef.value.clearDesigner()
|
||||
form.name = ''
|
||||
form.remark = ''
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
formDesignerContent.value.style.maxHeight = mainHeight().height
|
||||
formDesignerContent.value.style.overflowY = 'scroll'
|
||||
getFormInfo()
|
||||
})
|
||||
|
||||
const saveForm = () => {
|
||||
if (!form.id) {
|
||||
title.value = '新增表单'
|
||||
} else {
|
||||
title.value = '修改表单'
|
||||
|
||||
}
|
||||
formVisible.value = true
|
||||
}
|
||||
|
||||
const formRef = ref()
|
||||
|
||||
/**
|
||||
* 提交表单数据
|
||||
*/
|
||||
const submit = () => {
|
||||
const formJson = vfDesignerRef.value.getFormJson()
|
||||
form.content = JSON.stringify(formJson)
|
||||
formRef.value.validate(async (valid: any) => {
|
||||
if (valid) {
|
||||
if (form.id) {
|
||||
await updateWFForm(form)
|
||||
} else {
|
||||
await addWFForm(form)
|
||||
}
|
||||
ElMessage.success('保存成功')
|
||||
formVisible.value = false
|
||||
go(-1)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
#form-designer {
|
||||
padding: 10px;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
.layout-container .layout-main {
|
||||
overflow: scroll !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
137
src/views/system/workflow/form/index.vue
Normal file
137
src/views/system/workflow/form/index.vue
Normal file
@@ -0,0 +1,137 @@
|
||||
<!--流程表单-->
|
||||
<template>
|
||||
<div class='default-main'>
|
||||
<TableHeader>
|
||||
<template v-slot:select>
|
||||
<el-form-item label='表单名称'>
|
||||
<el-input
|
||||
v-model='tableStore.table.params.name'
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-slot:operation>
|
||||
<el-button type='primary' class='ml10' :icon='Plus' @click='add'>新增</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref='tableRef'></Table>
|
||||
<!-- 预览表单对话框 -->
|
||||
<el-dialog :title='render.title' v-model='render.visible' width='60%' append-to-body>
|
||||
<v-form-render :form-json='formJson' :form-data='formData' :option-data='optionData' ref='vfRenderRef' />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script lang='ts' setup>
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { onMounted, provide, ref, reactive,nextTick } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { deleteWFForm, getFormById } from '@/api/process-boot/workflow/form'
|
||||
|
||||
|
||||
const { push } = useRouter()
|
||||
defineOptions({
|
||||
name: 'category'
|
||||
})
|
||||
const formJson = reactive({"widgetList":[],"formConfig":{"modelName":"formData","refName":"vForm","rulesName":"rules","labelWidth":80,"labelPosition":"left","size":"","labelAlign":"label-left-align","cssCode":"","customClass":"","functions":"","layoutType":"PC","jsonVersion":3,"onFormCreated":"","onFormMounted":"","onFormDataChange":"","onFormValidate":""}})
|
||||
const formData = reactive({})
|
||||
const optionData = reactive({})
|
||||
const vfRenderRef = ref(null)
|
||||
const render = reactive({
|
||||
visible: false,
|
||||
title: ''
|
||||
})
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/process-boot/workflow/wfForm/list',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '序号', type: 'seq', width: 80 },
|
||||
{ title: '表单名称', minWidth: '160', field: 'name' },
|
||||
{ title: '备注', minWidth: '140', field: 'remark' },
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
render: 'buttons',
|
||||
minWidth: '230',
|
||||
fixed: 'right',
|
||||
buttons: [
|
||||
{
|
||||
name: 'view',
|
||||
title: '预览',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
//首先根据id查询出详细数据,然后渲染json
|
||||
getFormById(row.id).then(res => {
|
||||
render.visible = true;
|
||||
render.title = '查看表单详情';
|
||||
nextTick(async () => {
|
||||
vfRenderRef.value.setFormJson(res.data.content || {formConfig: {}, widgetList: []});
|
||||
});
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'update',
|
||||
title: '设计',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
push(`/admin/form/formDesigner?id=${row.id}`)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'update',
|
||||
title: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除吗?'
|
||||
},
|
||||
click: row => {
|
||||
deleteWFForm(row.id).then(res => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
for (let key in tableStore.table.params) {
|
||||
if (tableStore.table.params[key] === '') {
|
||||
delete tableStore.table.params[key]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
//新增表单
|
||||
const add = () => {
|
||||
push(`/admin/form/formDesigner?id=`)
|
||||
}
|
||||
|
||||
tableStore.table.params.orderBy = 'desc'
|
||||
tableStore.table.params.name = ''
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
175
src/views/system/workflow/model/index.vue
Normal file
175
src/views/system/workflow/model/index.vue
Normal file
@@ -0,0 +1,175 @@
|
||||
<!--流程模型表单页面-->
|
||||
<template>
|
||||
<div class='default-main'>
|
||||
<TableHeader>
|
||||
<template v-slot:select>
|
||||
<el-form-item label='模型名称'>
|
||||
<el-input
|
||||
v-model='tableStore.table.params.name'
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label='流程类别'>
|
||||
<el-select v-model='tableStore.table.params.category' clearable>
|
||||
<el-option
|
||||
v-for='item in categoryList'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.code'
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-slot:operation>
|
||||
<el-button type='primary' class='ml10' :icon='Plus' @click='add'>新增</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!--表格-->
|
||||
<Table ref='tableRef' isGroup></Table>
|
||||
<model-popup ref='modelPopup' />
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<script lang='ts' setup>
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import { deleteWFForm, getFormById } from '@/api/process-boot/workflow/form'
|
||||
import { nextTick, onMounted, provide, reactive, ref } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { useRouter } from 'vue-router'
|
||||
import ModelPopup from '@/views/system/workflow/model/modelPopup.vue'
|
||||
|
||||
|
||||
const { push } = useRouter()
|
||||
const dictData = useDictData()
|
||||
const categoryList = dictData.getBasicData('flow_category')
|
||||
const modelPopup = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/process-boot/workflow/model/list',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '序号', type: 'seq', width: 80 },
|
||||
{ title: '模型标识', minWidth: '160', field: 'modelKey' },
|
||||
{ title: '模型名称', minWidth: '160', field: 'modelName' },
|
||||
{
|
||||
title: '流程类别', minWidth: '160', field: 'category',
|
||||
formatter: (row: any) => {
|
||||
return categoryList.filter(item => item.code === row.cellValue)[0].name
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '模型版本', minWidth: '120', field: 'version', type: 'html',
|
||||
formatter: (obj: any) => {
|
||||
const val = obj.row.version
|
||||
return `<a href='javascript:void(0);' style='color: #409EFF;text-decoration: none'>V${val}</a>`
|
||||
// return `<el-tag size='small'>v{{val}}</el-tag>`
|
||||
}
|
||||
},
|
||||
{ title: '备注', minWidth: '160', field: 'description' },
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
render: 'buttons',
|
||||
minWidth: '230',
|
||||
fixed: 'right',
|
||||
buttons: [
|
||||
{
|
||||
name: 'view',
|
||||
title: '编辑',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
modelPopup.value.open('修改模型', row)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'update',
|
||||
title: '设计',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
push(`/admin/model/processDesigner?id=${row.id}`)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'deploy',
|
||||
title: '部署',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
push(`/admin/form/formDesigner?id=${row.id}`)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'deploy',
|
||||
title: '预览流程',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
push(`/admin/form/formDesigner?id=${row.id}`)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'deploy',
|
||||
title: '历史版本',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
push(`/admin/form/formDesigner?id=${row.id}`)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'update',
|
||||
title: '删除',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-Delete',
|
||||
render: 'confirmButton',
|
||||
popconfirm: {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonType: 'danger',
|
||||
title: '确定删除吗?'
|
||||
},
|
||||
click: row => {
|
||||
deleteWFForm(row.id).then(res => {
|
||||
ElMessage.success('删除成功')
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
for (let key in tableStore.table.params) {
|
||||
if (tableStore.table.params[key] === '') {
|
||||
delete tableStore.table.params[key]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
//新增表单
|
||||
const add = () => {
|
||||
modelPopup.value.open('新增模型')
|
||||
}
|
||||
|
||||
tableStore.table.params.orderBy = 'desc'
|
||||
tableStore.table.params.name = ''
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
129
src/views/system/workflow/model/modelPopup.vue
Normal file
129
src/views/system/workflow/model/modelPopup.vue
Normal file
@@ -0,0 +1,129 @@
|
||||
<!--模型的新增和修改的弹出框-->
|
||||
<template>
|
||||
<el-dialog
|
||||
draggable
|
||||
class="cn-operate-dialog"
|
||||
v-model="modelVisible"
|
||||
:title="title"
|
||||
style="width: 415px; height: 400px"
|
||||
top="30vh"
|
||||
>
|
||||
<el-scrollbar>
|
||||
<el-form :inline="false" :model="form" label-width="120px" :rules="rules" ref="formRef">
|
||||
<el-form-item label="模型标识">
|
||||
<el-input v-model="form.modelKey" clearable disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="模型名称" prop='modelName'>
|
||||
<el-input v-model="form.modelName" placeholder="请输入模型名称" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="流程分类" prop="category">
|
||||
<el-select v-model='form.category' clearable>
|
||||
<el-option
|
||||
v-for='item in categoryList'
|
||||
:key='item.id'
|
||||
:label='item.name'
|
||||
:value='item.code'
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="description">
|
||||
<el-input v-model="form.description" type="textarea" placeholder="请输入内容" maxlength="200" show-word-limit />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="modelVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="submit">确认</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, inject } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { addWFModel,updateWFModel } from '@/api/process-boot/workflow/model'
|
||||
|
||||
|
||||
const dictData = useDictData()
|
||||
const categoryList = dictData.getBasicData('flow_category')
|
||||
|
||||
const tableStore = inject('tableStore') as TableStore
|
||||
const modelVisible = ref(false)
|
||||
const title = ref('')
|
||||
const formRef = ref()
|
||||
|
||||
// 注意不要和表单ref的命名冲突
|
||||
const form = reactive({
|
||||
modelId: undefined,
|
||||
modelKey: `Process_${new Date().getTime()}`,
|
||||
modelName: '',
|
||||
category: '',
|
||||
description: '',
|
||||
})
|
||||
|
||||
//form表单校验规则
|
||||
const rules = {
|
||||
modelName: [{ required: true, message: '模型名称不能为空', trigger: 'blur' }],
|
||||
category: [{ required: true, message: '流程分类必选', trigger: 'change' }],
|
||||
}
|
||||
|
||||
const open = (text: string, data?: any) => {
|
||||
title.value = text
|
||||
if (data) {
|
||||
// 表单赋值
|
||||
for (let key in form) {
|
||||
form[key] = data[key]
|
||||
}
|
||||
} else {
|
||||
resetForm()
|
||||
// 在此处恢复默认表单
|
||||
for (let key in form) {
|
||||
form[key] = ''
|
||||
}
|
||||
form.modelKey = `Process_${new Date().getTime()}`
|
||||
}
|
||||
modelVisible.value = true
|
||||
}
|
||||
|
||||
//重置表单内容
|
||||
const resetForm = () => {
|
||||
if (formRef.value) {
|
||||
formRef.value.resetFields()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交用户表单数据
|
||||
*/
|
||||
const submit = () => {
|
||||
formRef.value.validate(async (valid: any) => {
|
||||
if (valid) {
|
||||
if (form.modelId) {
|
||||
await updateWFModel(form)
|
||||
} else {
|
||||
await addWFModel(form)
|
||||
}
|
||||
ElMessage.success('保存成功')
|
||||
tableStore.index()
|
||||
modelVisible.value = false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/************针对tab切换*************/
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-upload-list__item {
|
||||
transition: none !important;
|
||||
}
|
||||
|
||||
.el-select {
|
||||
min-width: 180px;
|
||||
}
|
||||
</style>
|
||||
276
src/views/system/workflow/model/translate/translations.js
Normal file
276
src/views/system/workflow/model/translate/translations.js
Normal file
@@ -0,0 +1,276 @@
|
||||
/**
|
||||
*参考 https://github.com/bpmn-io/bpmn-js-i18n
|
||||
*/
|
||||
|
||||
const translations = {
|
||||
|
||||
"Name":"名称",
|
||||
"Value":"值",
|
||||
"ID":"唯一标识(ID)",
|
||||
"General":"基础属性",
|
||||
|
||||
"Activate the create/remove space tool": "启动创建/删除空间工具",
|
||||
"Activate the global connect tool": "启动全局连接工具",
|
||||
"Activate the hand tool": "启动手动工具",
|
||||
"Activate the lasso tool": "启动套索工具",
|
||||
"Ad-hoc": "Ad-hoc子流程",
|
||||
"Add Lane above": "添加到通道之上",
|
||||
"Add Lane below": "添加到通道之下",
|
||||
"Append ConditionIntermediateCatchEvent": "添加中间条件捕获事件",
|
||||
"Append element": "添加元素",
|
||||
"Append EndEvent": "添加结束事件",
|
||||
"Append Gateway": "添加网关",
|
||||
"Append Intermediate/Boundary Event": "添加中间/边界事件",
|
||||
"Append MessageIntermediateCatchEvent": "添加消息中间捕获事件",
|
||||
"Append ReceiveTask": "添加接收任务",
|
||||
"Append SignalIntermediateCatchEvent": "添加信号中间捕获事件",
|
||||
"Append Task": "添加任务",
|
||||
"Append TimerIntermediateCatchEvent": "添加定时器中间捕获事件",
|
||||
"Append compensation activity": "追加补偿活动",
|
||||
"Append {type}": "追加 {type}",
|
||||
"Boundary Event": "边界事件",
|
||||
"Business Rule Task": "规则任务",
|
||||
"Call Activity": "引用流程",
|
||||
"Cancel Boundary Event": "取消边界事件",
|
||||
"Cancel End Event": "取消结束事件",
|
||||
"Change type": "更改类型",
|
||||
"Collapsed Pool": "折叠池",
|
||||
"Collection": "集合",
|
||||
"Compensation Boundary Event": "补偿边界事件",
|
||||
"Compensation End Event": "结束补偿事件",
|
||||
"Compensation Intermediate Throw Event": "中间补偿抛出事件",
|
||||
"Compensation Start Event": "补偿启动事件",
|
||||
"Complex Gateway": "复杂网关",
|
||||
"Conditional Boundary Event": "条件边界事件",
|
||||
"Conditional Boundary Event (non-interrupting)": "条件边界事件 (非中断)",
|
||||
"Conditional Flow": "条件流",
|
||||
"Conditional Intermediate Catch Event": "中间条件捕获事件",
|
||||
"Conditional Start Event": "条件启动事件",
|
||||
"Conditional Start Event (non-interrupting)": "条件启动事件 (非中断)",
|
||||
"Connect using Association": "文本关联",
|
||||
"Connect using DataInputAssociation": "数据关联",
|
||||
"Connect using Sequence/MessageFlow or Association": "消息关联",
|
||||
"Create IntermediateThrowEvent/BoundaryEvent": "创建中间抛出/边界事件",
|
||||
"Create DataObjectReference": "创建数据对象引用",
|
||||
"Create DataStoreReference": "创建数据存储引用",
|
||||
"Create element": "创建元素",
|
||||
"Create EndEvent": "创建结束事件",
|
||||
"Create Gateway": "创建网关",
|
||||
"Create Group": "创建组",
|
||||
"Create Intermediate/Boundary Event": "创建中间/边界事件",
|
||||
"Create Pool/Participant": "创建池/参与者",
|
||||
"Create StartEvent": "创建开始事件",
|
||||
"Create Task": "创建任务",
|
||||
"Create expanded SubProcess": "创建可折叠子流程",
|
||||
"Create {type}": "创建 {type}",
|
||||
"Data": "数据",
|
||||
"Data Object Reference": "数据对象引用",
|
||||
"Data Store Reference": "数据存储引用",
|
||||
"Default Flow": "默认流",
|
||||
"Divide into three Lanes": "分成三条通道",
|
||||
"Divide into two Lanes": "分成两条通道",
|
||||
"Empty Pool": "空泳道",
|
||||
"Empty Pool (removes content)": "清空泳道(删除内容)",
|
||||
"End Event": "结束事件",
|
||||
"Error Boundary Event": "错误边界事件",
|
||||
"Error End Event": "结束错误事件",
|
||||
"Error Start Event": "错误启动事件",
|
||||
"Escalation Boundary Event": "升级边界事件",
|
||||
"Escalation Boundary Event (non-interrupting)": "升级边界事件 (非中断)",
|
||||
"Escalation End Event": "结束升级事件",
|
||||
"Escalation Intermediate Throw Event": "中间升级抛出事件",
|
||||
"Escalation Start Event": "升级启动事件",
|
||||
"Escalation Start Event (non-interrupting)": "升级启动事件 (非中断)",
|
||||
"Events": "事件",
|
||||
"Event Sub Process": "事件子流程",
|
||||
"Event based Gateway": "事件网关",
|
||||
"Exclusive Gateway": "独占网关",
|
||||
"Expanded Pool": "展开泳道",
|
||||
"Gateways": "网关",
|
||||
"Inclusive Gateway": "包容网关",
|
||||
"Intermediate Throw Event": "中间抛出事件",
|
||||
"Link Intermediate Catch Event": "中间链接捕获事件",
|
||||
"Link Intermediate Throw Event": "中间链接抛出事件",
|
||||
"Loop": "循环",
|
||||
"Manual Task": "手动任务",
|
||||
"Message Boundary Event": "消息边界事件",
|
||||
"Message Boundary Event (non-interrupting)": "消息边界事件 (非中断)",
|
||||
"Message End Event": "结束消息事件",
|
||||
"Message Intermediate Catch Event": "中间消息捕获事件",
|
||||
"Message Intermediate Throw Event": "中间消息抛出事件",
|
||||
"Message Start Event": "消息启动事件",
|
||||
"Message Start Event (non-interrupting)": "消息启动事件 (非中断)",
|
||||
"Parallel Gateway": "并行网关",
|
||||
"Parallel Multi Instance": "并行多实例",
|
||||
"Participants": "参与者",
|
||||
"Participant Multiplicity": "参与者多重性",
|
||||
"Receive Task": "接受任务",
|
||||
"Remove": "移除",
|
||||
"Script Task": "脚本任务",
|
||||
"Send Task": "发送任务",
|
||||
"Sequence Flow": "顺序流",
|
||||
"Sequential Multi Instance": "串行多实例",
|
||||
"Service Task": "服务任务",
|
||||
"Signal Boundary Event": "信号边界事件",
|
||||
"Signal Boundary Event (non-interrupting)": "信号边界事件 (非中断)",
|
||||
"Signal End Event": "结束信号事件",
|
||||
"Signal Intermediate Catch Event": "中间信号捕获事件",
|
||||
"Signal Intermediate Throw Event": "中间信号抛出事件",
|
||||
"Signal Start Event": "信号启动事件",
|
||||
"Signal Start Event (non-interrupting)": "信号启动事件 (非中断)",
|
||||
"Start Event": "开始事件",
|
||||
"Sub Process": "子流程",
|
||||
"Sub Processes": "子流程",
|
||||
"Sub Process (collapsed)": "可折叠子流程",
|
||||
"Sub Process (expanded)": "可展开子流程",
|
||||
"Task": "任务",
|
||||
"Tasks": "任务",
|
||||
"Terminate End Event": "终止边界事件",
|
||||
"Timer Boundary Event": "定时边界事件",
|
||||
"Timer Boundary Event (non-interrupting)": "定时边界事件 (非中断)",
|
||||
"Timer Intermediate Catch Event": "中间定时捕获事件",
|
||||
"Timer Start Event": "定时启动事件",
|
||||
"Timer Start Event (non-interrupting)": "定时启动事件 (非中断)",
|
||||
"Transaction": "事务",
|
||||
"User Task": "用户任务",
|
||||
"already rendered {element}": "{element} 已呈现",
|
||||
"diagram not part of bpmn:Definitions": "图表不是 bpmn:Definitions 的一部分",
|
||||
"element required": "需要元素",
|
||||
"correcting missing bpmnElement on {plane} to {rootElement}": "在 {plane} 上更正缺失的 bpmnElement 为 {rootElement}",
|
||||
"element {element} referenced by {referenced}#{property} not yet drawn": "元素 {element} 的引用 {referenced}#{property} 尚未绘制",
|
||||
"failed to import {element}": "{element} 导入失败",
|
||||
"flow elements must be children of pools/participants": "元素必须是池/参与者的子级",
|
||||
"more than {count} child lanes": "超过 {count} 条通道",
|
||||
"missing {semantic}#attachedToRef": "在 {element} 中缺少 {semantic}#attachedToRef",
|
||||
"multiple DI elements defined for {element}": "为 {element} 定义了多个 DI 元素",
|
||||
"no bpmnElement referenced in {element}": "{element} 中没有引用 bpmnElement",
|
||||
"no diagram to display": "没有要显示的图表",
|
||||
"no shape type specified": "未指定形状类型",
|
||||
"no parent for {element} in {parent}": "在 {element} 中没有父元素 {parent}",
|
||||
"no process or collaboration to display": "没有可显示的流程或协作",
|
||||
"out of bounds release": "越界释放",
|
||||
"Version tag":"版本标记",
|
||||
"Change element":"改变元素",
|
||||
"Documentation":"文档",
|
||||
"PROCESS":"流程",
|
||||
"Element documentation":"元素文档说明",
|
||||
"User assignment":"分配用户",
|
||||
"History cleanup":"历史记录清理",
|
||||
"Time to live":"历史记录生存时间",
|
||||
"Tasklist":"任务列表",
|
||||
"Candidate starter":"候选启动器",
|
||||
"Candidate starter groups":"候选启动组",
|
||||
"Specify more than one group as a comma separated list.":"多个组用','分隔.",
|
||||
"Candidate starter users":"候选发起人",
|
||||
"Specify more than one user as a comma separated list.":"多个用户用','分隔.",
|
||||
"External task":"外部任务",
|
||||
"Startable":"可启动(Startable)",
|
||||
"Executable":"可直接执行",
|
||||
"Job execution":"作业执行",
|
||||
"Priority":"优先级",
|
||||
"Forms":"表单",
|
||||
"Execution listeners":"执行侦听器",
|
||||
"Extension properties":"扩展属性",
|
||||
"Event type":"事件类型",
|
||||
"Listener type":"侦听器类型",
|
||||
"Field injection":"字段注入",
|
||||
"Start initiator":"开始发起人",
|
||||
"Initiator":"发起人",
|
||||
"Asynchronous continuations":"异步延续",
|
||||
"Before":"之前",
|
||||
"After":"之后",
|
||||
"Inputs":"输入",
|
||||
"Outputs":"输出",
|
||||
"Local variable name":"局部变量名称",
|
||||
"Assignment type":"分配类型",
|
||||
"Format":"格式",
|
||||
"Type":"类型",
|
||||
"Expression":"表达式(Expression)",
|
||||
"Script":"脚本(Script)",
|
||||
"Delegate expression":"委托表达式(Delegate expression)",
|
||||
"Java class":"Java类(Java class)",
|
||||
"start":"开始(start)",
|
||||
"end":"结束(end)",
|
||||
"Start typing \"${}\" to create an expression.":"开始键入\"${}\"以创建表达式.",
|
||||
"Process variable name":"过程变量名称",
|
||||
"List values":"列表值",
|
||||
"Map entries":"映射条目",
|
||||
"Key":"键",
|
||||
"Values":"值",
|
||||
"Form reference":"引用表单ID",
|
||||
"Binding":"结合",
|
||||
"Version":"版本",
|
||||
"Form fields":"表单字段",
|
||||
"Form key":"表单ID",
|
||||
"Embedded or External Task Forms":"拓展表单",
|
||||
"Camunda Forms":"标准表单",
|
||||
"Generated Task Forms":"内置表单",
|
||||
"Refers to the process variable name":"指的是(引用)过程变量名称",
|
||||
"Label":"标签",
|
||||
"Default value":"默认值",
|
||||
"Constraints":"限制",
|
||||
"Properties":"属性",
|
||||
"Config":"配置",
|
||||
"Implementation":"实施",
|
||||
"Field injections":"字段注入",
|
||||
"Task listeners":"任务侦听器",
|
||||
"Listener ID":"侦听器ID",
|
||||
"Message":"消息",
|
||||
"Global message reference":"引用全局消息ID",
|
||||
"Result variable":"结果变量",
|
||||
"Resource":"资源",
|
||||
"External resource":"外部资源",
|
||||
"Inline script":"内联脚本",
|
||||
"Process variables":"过程变量",
|
||||
"Global signal reference":"引用全局信号ID",
|
||||
"Signal":"信号",
|
||||
"Called element":"被调用元素",
|
||||
"In mapping propagation":"在映射传播中",
|
||||
"Propagate all variables":"传播所有变量",
|
||||
"Out mapping propagation":"向外映射传播",
|
||||
"In mappings":"在映射中",
|
||||
"Source":"来源",
|
||||
"Target":"目标",
|
||||
"Local":"局部的(Local)",
|
||||
"Out mappings":"输出映射",
|
||||
"Link":"链接",
|
||||
"Timer":"定时器",
|
||||
"Retry time cycle":"重试时间周期",
|
||||
"Variable name":"变量名称",
|
||||
"Condition Expression":"条件表达式",
|
||||
"Condition":"条件",
|
||||
"Process documentation":"流程文档",
|
||||
"Assignee":"委托人",
|
||||
"Candidate groups":"候选组",
|
||||
"Candidate users":"候选用户",
|
||||
"Due date":"期限",
|
||||
"The due date as an EL expression (e.g. ${someDate}) or an ISO date (e.g. 2015-06-26T09:54:00).":"到期日期为EL表达式(例如${someDate})或ISO日期(例如2015-06-26T09:54:00)",
|
||||
"Follow up date":"跟进日期",
|
||||
"The follow up date as an EL expression (e.g. ${someDate}) or an ISO date (e.g. 2015-06-26T09:54:00).":"作为EL表达式(例如${someDate})或ISO日期(例如2015-06-26T09:54:00)的跟进日期",
|
||||
"Connector ID":"连接器ID",
|
||||
"Connector inputs":"连接器输入",
|
||||
"Connector outputs":"连接器输出",
|
||||
"Topic":"主题",
|
||||
"Errors":"错误",
|
||||
"Global error reference":"引用全局错误ID",
|
||||
"Throw expression":"Throw表达式",
|
||||
"Decision reference":"引用决策ID",
|
||||
"Tenant ID":"租户ID",
|
||||
"Multi-instance":"多实例",
|
||||
"Loop cardinality":"循环基数",
|
||||
"Completion condition":"完成条件",
|
||||
"Element variable":"元素变量",
|
||||
"Asynchronous before":"异步之前",
|
||||
"Asynchronous after":"异步之后",
|
||||
};
|
||||
|
||||
export const customTranslate = (template, replacements) =>{
|
||||
replacements = replacements || {};
|
||||
// Translate
|
||||
template = translations[template] || template;
|
||||
// Replace
|
||||
return template.replace(/{([^}]+)}/g, (_, key)=> {
|
||||
return replacements[key] || '{' + key + '}';
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user