parent
f1915ff048
commit
39544078e5
36 changed files with 254 additions and 226 deletions
@ -1,112 +1,115 @@ |
|||||||
<template> |
<template> |
||||||
<div> |
<div> |
||||||
<basic-container> |
<basic-container> |
||||||
<avue-form :option="option" v-model="form" @submit="handleSubmit"/> |
<avue-form :option="option" |
||||||
|
v-model="form" |
||||||
|
@submit="handleSubmit" /> |
||||||
</basic-container> |
</basic-container> |
||||||
<basic-container> |
<basic-container> |
||||||
<flow-design :is-display="true" :process-definition-id="processDefinitionId"></flow-design> |
<flow-design :is-display="true" |
||||||
|
:process-definition-id="processDefinitionId"></flow-design> |
||||||
</basic-container> |
</basic-container> |
||||||
</div> |
</div> |
||||||
</template> |
</template> |
||||||
|
|
||||||
<script> |
<script> |
||||||
import {leaveProcess} from "@/api/work/process"; |
import { leaveProcess } from "@/api/work/process"; |
||||||
|
|
||||||
export default { |
export default { |
||||||
data() { |
data () { |
||||||
return { |
return { |
||||||
processDefinitionId: '', |
processDefinitionId: '', |
||||||
form: {}, |
form: {}, |
||||||
option: { |
option: { |
||||||
group: [ |
group: [ |
||||||
{ |
{ |
||||||
icon: 'el-icon-info', |
icon: 'el-icon-info', |
||||||
label: '请假基础信息', |
label: '请假基础信息', |
||||||
prop: 'group1', |
prop: 'group1', |
||||||
column: [ |
column: [ |
||||||
{ |
{ |
||||||
label: '审批人员', |
label: '审批人员', |
||||||
prop: 'taskUser', |
prop: 'taskUser', |
||||||
type: 'select', |
type: 'select', |
||||||
dicUrl: `/api/blade-user/user-list`, |
dicUrl: `/api/blade-user/user-list`, |
||||||
props: { |
props: { |
||||||
label: "account", |
label: "account", |
||||||
value: "id" |
value: "id" |
||||||
}, |
|
||||||
span: 24, |
|
||||||
rules: [ |
|
||||||
{ |
|
||||||
required: true, |
|
||||||
message: '请选择审批人员', |
|
||||||
trigger: 'blur' |
|
||||||
} |
|
||||||
] |
|
||||||
}, |
}, |
||||||
{ |
span: 24, |
||||||
label: '开始时间', |
rules: [ |
||||||
prop: 'startTime', |
{ |
||||||
type: 'datetime', |
required: true, |
||||||
valueFormat: 'yyyy-MM-dd HH:mm:ss', |
message: '请选择审批人员', |
||||||
rules: [ |
trigger: 'blur' |
||||||
{ |
} |
||||||
required: true, |
] |
||||||
message: '请选择开始时间', |
}, |
||||||
trigger: 'blur' |
{ |
||||||
} |
label: '开始时间', |
||||||
] |
prop: 'startTime', |
||||||
}, |
type: 'datetime', |
||||||
{ |
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
||||||
label: '结束时间', |
rules: [ |
||||||
prop: 'endTime', |
{ |
||||||
type: 'datetime', |
required: true, |
||||||
valueFormat: 'yyyy-MM-dd HH:mm:ss', |
message: '请选择开始时间', |
||||||
rules: [ |
trigger: 'blur' |
||||||
{ |
} |
||||||
required: true, |
] |
||||||
message: '请选择结束时间', |
}, |
||||||
trigger: 'blur' |
{ |
||||||
} |
label: '结束时间', |
||||||
] |
prop: 'endTime', |
||||||
}, |
type: 'datetime', |
||||||
{ |
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
||||||
label: '请假理由', |
rules: [ |
||||||
prop: 'reason', |
{ |
||||||
type: 'textarea', |
required: true, |
||||||
span: 24, |
message: '请选择结束时间', |
||||||
rules: [ |
trigger: 'blur' |
||||||
{ |
} |
||||||
required: true, |
] |
||||||
message: '请输入请假理由', |
}, |
||||||
trigger: 'blur' |
{ |
||||||
} |
label: '请假理由', |
||||||
] |
prop: 'reason', |
||||||
}, |
type: 'textarea', |
||||||
] |
span: 24, |
||||||
}, |
rules: [ |
||||||
], |
{ |
||||||
} |
required: true, |
||||||
} |
message: '请输入请假理由', |
||||||
}, |
trigger: 'blur' |
||||||
created() { |
} |
||||||
this.processDefinitionId = this.$route.params.processDefinitionId; |
] |
||||||
}, |
}, |
||||||
methods: { |
] |
||||||
handleSubmit() { |
}, |
||||||
const params = { |
], |
||||||
processDefinitionId: this.$route.params.processDefinitionId, |
|
||||||
...this.form, |
|
||||||
}; |
|
||||||
leaveProcess(params).then(resp => { |
|
||||||
const data = resp.data; |
|
||||||
if (data.success) { |
|
||||||
this.$message.success(data.msg); |
|
||||||
this.$router.$avueRouter.closeTag(); |
|
||||||
this.$router.push({path: `/work/start`}); |
|
||||||
} else { |
|
||||||
this.$message.error(data.msg || '提交失败'); |
|
||||||
} |
|
||||||
}); |
|
||||||
} |
} |
||||||
} |
} |
||||||
|
}, |
||||||
|
created () { |
||||||
|
this.processDefinitionId = this.$route.params.processDefinitionId; |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
handleSubmit () { |
||||||
|
const params = { |
||||||
|
processDefinitionId: this.$route.params.processDefinitionId, |
||||||
|
...this.form, |
||||||
|
}; |
||||||
|
leaveProcess(params).then(resp => { |
||||||
|
const data = resp.data; |
||||||
|
if (data.success) { |
||||||
|
this.$message.success(data.msg); |
||||||
|
this.$router.$avueRouter.closeTag(); |
||||||
|
this.$router.push({ path: `/work/start` }); |
||||||
|
} else { |
||||||
|
this.$message.error(data.msg || '提交失败'); |
||||||
|
} |
||||||
|
}); |
||||||
|
} |
||||||
} |
} |
||||||
|
} |
||||||
</script> |
</script> |
||||||
|
|||||||
Loading…
Reference in new issue