|
|
@ -37,8 +37,8 @@ import { |
|
|
|
import { parseTime } from '@/utils/common' |
|
|
|
import { parseTime } from '@/utils/common' |
|
|
|
|
|
|
|
|
|
|
|
export function useModal( |
|
|
|
export function useModal( |
|
|
|
state: any, |
|
|
|
state: any, |
|
|
|
ctx: SetupContext<('update:show' | 'update:row' | 'updateList')[]> |
|
|
|
ctx: SetupContext<('update:show' | 'update:row' | 'updateList')[]> |
|
|
|
) { |
|
|
|
) { |
|
|
|
const { t } = useI18n() |
|
|
|
const { t } = useI18n() |
|
|
|
const router: Router = useRouter() |
|
|
|
const router: Router = useRouter() |
|
|
@ -87,12 +87,12 @@ export function useModal( |
|
|
|
state.startForm.processDefinitionCode = code |
|
|
|
state.startForm.processDefinitionCode = code |
|
|
|
if (state.startForm.startEndTime) { |
|
|
|
if (state.startForm.startEndTime) { |
|
|
|
const start = format( |
|
|
|
const start = format( |
|
|
|
new Date(state.startForm.startEndTime[0]), |
|
|
|
new Date(state.startForm.startEndTime[0]), |
|
|
|
'yyyy-MM-dd hh:mm:ss' |
|
|
|
'yyyy-MM-dd hh:mm:ss' |
|
|
|
) |
|
|
|
) |
|
|
|
const end = format( |
|
|
|
const end = format( |
|
|
|
new Date(state.startForm.startEndTime[1]), |
|
|
|
new Date(state.startForm.startEndTime[1]), |
|
|
|
'yyyy-MM-dd hh:mm:ss' |
|
|
|
'yyyy-MM-dd hh:mm:ss' |
|
|
|
) |
|
|
|
) |
|
|
|
state.startForm.scheduleTime = `${start},${end}` |
|
|
|
state.startForm.scheduleTime = `${start},${end}` |
|
|
|
} |
|
|
|
} |
|
|
@ -104,8 +104,8 @@ export function useModal( |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
state.startForm.startParams = !_.isEmpty(startParams) |
|
|
|
state.startForm.startParams = !_.isEmpty(startParams) |
|
|
|
? JSON.stringify(startParams) |
|
|
|
? JSON.stringify(startParams) |
|
|
|
: '' |
|
|
|
: '' |
|
|
|
|
|
|
|
|
|
|
|
await startProcessInstance(state.startForm, variables.projectCode) |
|
|
|
await startProcessInstance(state.startForm, variables.projectCode) |
|
|
|
window.$message.success(t('project.workflow.success')) |
|
|
|
window.$message.success(t('project.workflow.success')) |
|
|
@ -157,12 +157,12 @@ export function useModal( |
|
|
|
|
|
|
|
|
|
|
|
const getTimingData = () => { |
|
|
|
const getTimingData = () => { |
|
|
|
const start = format( |
|
|
|
const start = format( |
|
|
|
parseTime(state.timingForm.startEndTime[0]), |
|
|
|
parseTime(state.timingForm.startEndTime[0]), |
|
|
|
'yyyy-MM-dd hh:mm:ss' |
|
|
|
'yyyy-MM-dd hh:mm:ss' |
|
|
|
) |
|
|
|
) |
|
|
|
const end = format( |
|
|
|
const end = format( |
|
|
|
parseTime(state.timingForm.startEndTime[1]), |
|
|
|
parseTime(state.timingForm.startEndTime[1]), |
|
|
|
'yyyy-MM-dd hh:mm:ss' |
|
|
|
'yyyy-MM-dd hh:mm:ss' |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
const data = { |
|
|
|
const data = { |
|
|
@ -176,9 +176,9 @@ export function useModal( |
|
|
|
warningType: state.timingForm.warningType, |
|
|
|
warningType: state.timingForm.warningType, |
|
|
|
processInstancePriority: state.timingForm.processInstancePriority, |
|
|
|
processInstancePriority: state.timingForm.processInstancePriority, |
|
|
|
warningGroupId: |
|
|
|
warningGroupId: |
|
|
|
state.timingForm.warningGroupId === '' |
|
|
|
state.timingForm.warningGroupId === '' |
|
|
|
? 0 |
|
|
|
? 0 |
|
|
|
: state.timingForm.warningGroupId, |
|
|
|
: state.timingForm.warningGroupId, |
|
|
|
workerGroup: state.timingForm.workerGroup, |
|
|
|
workerGroup: state.timingForm.workerGroup, |
|
|
|
environmentCode: state.timingForm.environmentCode |
|
|
|
environmentCode: state.timingForm.environmentCode |
|
|
|
} |
|
|
|
} |
|
|
@ -215,9 +215,9 @@ export function useModal( |
|
|
|
|
|
|
|
|
|
|
|
const getStartParamsList = (code: number) => { |
|
|
|
const getStartParamsList = (code: number) => { |
|
|
|
queryProcessDefinitionByCode(code, variables.projectCode).then( |
|
|
|
queryProcessDefinitionByCode(code, variables.projectCode).then( |
|
|
|
(res: any) => { |
|
|
|
(res: any) => { |
|
|
|
variables.startParamsList = res.processDefinition.globalParamList |
|
|
|
variables.startParamsList = res.processDefinition.globalParamList |
|
|
|
} |
|
|
|
} |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -227,12 +227,12 @@ export function useModal( |
|
|
|
const projectCode = Number(router.currentRoute.value.params.projectCode) |
|
|
|
const projectCode = Number(router.currentRoute.value.params.projectCode) |
|
|
|
|
|
|
|
|
|
|
|
const start = format( |
|
|
|
const start = format( |
|
|
|
new Date(state.timingForm.startEndTime[0]), |
|
|
|
new Date(state.timingForm.startEndTime[0]), |
|
|
|
'yyyy-MM-dd hh:mm:ss' |
|
|
|
'yyyy-MM-dd hh:mm:ss' |
|
|
|
) |
|
|
|
) |
|
|
|
const end = format( |
|
|
|
const end = format( |
|
|
|
new Date(state.timingForm.startEndTime[1]), |
|
|
|
new Date(state.timingForm.startEndTime[1]), |
|
|
|
'yyyy-MM-dd hh:mm:ss' |
|
|
|
'yyyy-MM-dd hh:mm:ss' |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
const schedule = JSON.stringify({ |
|
|
|
const schedule = JSON.stringify({ |
|
|
|