|
@@ -5,7 +5,7 @@
|
|
|
<el-form :inline="true" :model="approveForm" ref="approve-form" :rules="formRules"
|
|
|
label-width="180px" label-position="left">
|
|
|
<el-form-item :label="$t('SystemManage.ReportApprove.table_col01')" prop="name">
|
|
|
- <el-input v-model="approveForm.name" :disabled="this.$route.query.flowId" :placeholder="$t('ApprovalEdit.name_placeholder')"></el-input>
|
|
|
+ <el-input v-model="approveForm.name" :placeholder="$t('ApprovalEdit.name_placeholder')"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item :label="$t('SystemManage.ReportApprove.table_col02')" prop="classify">
|
|
|
<el-cascader v-model="approveForm.classify"
|
|
@@ -116,8 +116,9 @@ export default {
|
|
|
const params = {
|
|
|
FlowName:name,
|
|
|
ReportType:classify[0],
|
|
|
- ClassifyFirstId:classify[classify.length-2]||0,
|
|
|
- ClassifySecondId:classify[classify.length-1]||0,
|
|
|
+ ClassifyFirstId:classify[1]||0,
|
|
|
+ ClassifySecondId:classify[2]||0,
|
|
|
+ ClassifyThirdId:classify[classify.length-1]||0,
|
|
|
Nodes
|
|
|
}
|
|
|
let res
|
|
@@ -141,13 +142,18 @@ export default {
|
|
|
ReportApproveFlowId:Number(id)
|
|
|
}).then(res=>{
|
|
|
if(res.Ret!==200) return
|
|
|
- const {FlowName,ReportType,ClassifySecondId,Nodes} = res.Data||{}
|
|
|
+ const {FlowName,ReportType,ClassifyFirstId,ClassifySecondId,Nodes,ClassifyThirdId} = res.Data||{}
|
|
|
this.approveForm.name = FlowName||''
|
|
|
//递归获取所有父级id
|
|
|
const classify = this.classifyTree.find(i=>i.ClassifyId===ReportType)||{}
|
|
|
const tempArr = findParentNode(classify.Children||[],ClassifySecondId)
|
|
|
tempArr.push(ReportType)
|
|
|
- this.approveForm.classify = tempArr.reverse()
|
|
|
+ // this.approveForm.classify = tempArr.reverse()
|
|
|
+ this.approveForm.classify = ClassifyThirdId
|
|
|
+ ? [ReportType,ClassifyFirstId,ClassifySecondId,ClassifyThirdId]
|
|
|
+ : ClassifySecondId
|
|
|
+ ? [ReportType,ClassifyFirstId,ClassifySecondId]
|
|
|
+ : [ReportType,ClassifyFirstId]
|
|
|
this.approveForm.flowNodes = Nodes||[]
|
|
|
})
|
|
|
}
|