|
|
@ -38,10 +38,12 @@ import { |
|
|
|
} from 'naive-ui' |
|
|
|
} from 'naive-ui' |
|
|
|
import { queryTenantList } from '@/service/modules/tenants' |
|
|
|
import { queryTenantList } from '@/service/modules/tenants' |
|
|
|
import { useRoute } from 'vue-router' |
|
|
|
import { useRoute } from 'vue-router' |
|
|
|
|
|
|
|
import { useUserStore } from '@/store/user/user' |
|
|
|
import { verifyName } from '@/service/modules/process-definition' |
|
|
|
import { verifyName } from '@/service/modules/process-definition' |
|
|
|
import './x6-style.scss' |
|
|
|
import './x6-style.scss' |
|
|
|
import { positiveIntegerRegex } from '@/utils/regex' |
|
|
|
import { positiveIntegerRegex } from '@/utils/regex' |
|
|
|
import type { SaveForm, WorkflowDefinition, WorkflowInstance } from './types' |
|
|
|
import type { SaveForm, WorkflowDefinition, WorkflowInstance } from './types' |
|
|
|
|
|
|
|
import type { UserInfoRes } from '@/service/modules/users/types' |
|
|
|
|
|
|
|
|
|
|
|
const props = { |
|
|
|
const props = { |
|
|
|
visible: { |
|
|
|
visible: { |
|
|
@ -73,6 +75,7 @@ export default defineComponent({ |
|
|
|
const { t } = useI18n() |
|
|
|
const { t } = useI18n() |
|
|
|
|
|
|
|
|
|
|
|
const projectCode = Number(route.params.projectCode) |
|
|
|
const projectCode = Number(route.params.projectCode) |
|
|
|
|
|
|
|
const userInfo = useUserStore().getUserInfo as UserInfoRes |
|
|
|
const tenants = ref<Tenant[]>([]) |
|
|
|
const tenants = ref<Tenant[]>([]) |
|
|
|
const tenantsDropdown = computed(() => { |
|
|
|
const tenantsDropdown = computed(() => { |
|
|
|
if (tenants.value) { |
|
|
|
if (tenants.value) { |
|
|
@ -93,7 +96,7 @@ export default defineComponent({ |
|
|
|
const formValue = ref<SaveForm>({ |
|
|
|
const formValue = ref<SaveForm>({ |
|
|
|
name: '', |
|
|
|
name: '', |
|
|
|
description: '', |
|
|
|
description: '', |
|
|
|
tenantCode: 'default', |
|
|
|
tenantCode: userInfo.tenantCode || 'default', |
|
|
|
executionType: 'PARALLEL', |
|
|
|
executionType: 'PARALLEL', |
|
|
|
timeoutFlag: false, |
|
|
|
timeoutFlag: false, |
|
|
|
timeout: 0, |
|
|
|
timeout: 0, |
|
|
@ -167,7 +170,7 @@ export default defineComponent({ |
|
|
|
if (process) { |
|
|
|
if (process) { |
|
|
|
formValue.value.name = process.name |
|
|
|
formValue.value.name = process.name |
|
|
|
formValue.value.description = process.description |
|
|
|
formValue.value.description = process.description |
|
|
|
formValue.value.tenantCode = process.tenantCode || 'default' |
|
|
|
formValue.value.tenantCode = process.tenantCode || userInfo.tenantCode || 'default' |
|
|
|
formValue.value.executionType = process.executionType || 'PARALLEL' |
|
|
|
formValue.value.executionType = process.executionType || 'PARALLEL' |
|
|
|
if (process.timeout && process.timeout > 0) { |
|
|
|
if (process.timeout && process.timeout > 0) { |
|
|
|
formValue.value.timeoutFlag = true |
|
|
|
formValue.value.timeoutFlag = true |
|
|
|