[update] 联调企标计划立项-变更流程

This commit is contained in:
lideqin
2023-11-09 17:05:48 +08:00
parent d5d875c26f
commit b6a723b095
2 changed files with 18 additions and 16 deletions
@@ -1,5 +1,5 @@
<template> <template>
<internal-detail-page :title="pageTitle" :content-padding="0"> <internal-detail-page :title="pageTitle" :content-padding="0" :loading="loading">
<!-- 标题右侧tab --> <!-- 标题右侧tab -->
<template v-slot:titleRightCustom> <template v-slot:titleRightCustom>
<div class="table-operator-tab"> <div class="table-operator-tab">
@@ -260,7 +260,6 @@ import {
enterprisePlanApprovalSave, enterprisePlanApprovalSave,
enterprisePlanApproval, enterprisePlanApproval,
getProcessDataById, getProcessDataById,
getNodeList,
getProcessNodeList getProcessNodeList
} from '@/api/workCenter' } from '@/api/workCenter'
import ApprovalBaseInfo from './modules/ApprovalBaseInfo' import ApprovalBaseInfo from './modules/ApprovalBaseInfo'
@@ -466,10 +465,20 @@ export default {
*/ */
resetPersonInfoStructure (type) { resetPersonInfoStructure (type) {
// 筛选出人员信息 // 筛选出人员信息
const personnelData = this.$refs.personnelInfo.stepsData
this.personnelInfoData = this.personnelInfoDataAll.filter(item => item.branchType.split(',').includes(type)) this.personnelInfoData = this.personnelInfoDataAll.filter(item => item.branchType.split(',').includes(type))
// 把原本有的人员再给回去
for (const item of this.personnelInfoData) {
const findObj = personnelData.find(data => data.id === item.id)
if (findObj) {
item.linkUserIds = findObj.linkUserIds
item.linkUserIds_dictText = findObj.linkUserIds_dictText
}
}
}, },
// 根据流程id获取数据并回显 // 根据流程id获取数据并回显
getProcessData (taskId) { getProcessData (taskId) {
this.loading = true
getProcessDataById(taskId).then(res => { getProcessDataById(taskId).then(res => {
if (res.success) { if (res.success) {
this.model = res.result this.model = res.result
@@ -524,9 +533,11 @@ export default {
this.currentNode = 999 this.currentNode = 999
} }
} }
if (this.currentNode !== 1) { if (this.currentNode === 1) {
this.initPersonInfoData(true)
} else {
// 不是第一个节点需要处理人员信息都不可选 // 不是第一个节点需要处理人员信息都不可选
this.initPersonInfoData() this.initPersonInfoData(false)
} }
console.log(this.currentNode) console.log(this.currentNode)
// 根据流程节点初始化是否可以编辑 // 根据流程节点初始化是否可以编辑
@@ -569,6 +580,8 @@ export default {
} else { } else {
this.$message.warning(res.message) this.$message.warning(res.message)
} }
}).finally(() => {
this.loading = false
}) })
}, },
// 头部tab改变 // 头部tab改变
@@ -597,7 +610,7 @@ export default {
this.resetPersonInfoStructure('3') this.resetPersonInfoStructure('3')
} else { } else {
// 是其他类型变更 // 是其他类型变更
this.resetPersonInfoStructure('3') this.resetPersonInfoStructure('2')
} }
} }
}, },
@@ -669,7 +669,6 @@ export default {
return { return {
StandardSource, StandardSource,
ProjectType, ProjectType,
partNameOptions: [], // 零部件名称下拉框数据
standardSystemOptions: [], // 标准体系下拉框数据 standardSystemOptions: [], // 标准体系下拉框数据
formInline: {}, formInline: {},
isFormInline: true, isFormInline: true,
@@ -847,8 +846,6 @@ export default {
} }
}, },
created () { created () {
// 获取零部件名称下拉框数据
this.initPartNameOptions()
// 获取标准体系下拉框数据 // 获取标准体系下拉框数据
this.initStandardSystemOptions() this.initStandardSystemOptions()
}, },
@@ -912,14 +909,6 @@ export default {
} }
} }
}, },
// 获取零部件名称下拉框数据
initPartNameOptions () {
getFormDictTreeList({ dictId: '1696821512600637441' }).then(res => {
if (res.success) {
this.partNameOptions = res.result
}
})
},
// 获取标准体系下拉框数据 // 获取标准体系下拉框数据
initStandardSystemOptions () { initStandardSystemOptions () {
getTreeList({ option: 1 }).then(res => { getTreeList({ option: 1 }).then(res => {