[update] 修改企标制修订流程

This commit is contained in:
lideqin
2023-12-25 17:48:02 +08:00
parent c7458d69f8
commit 2c8b668481
3 changed files with 93 additions and 52 deletions
@@ -108,7 +108,7 @@
<!-- 人员信息 -->
<div v-show="switchValue === 'user'" class="detail-page-scroll-content p-0">
<process-detail-list :processKey="ProcessKey.ES_EDIT.value">
<personnel-info slot="personnelInfo" ref="personnelInfo" :data="personnelInfoData" :currentNode="currentNodeName" :notPermissField="['adviceUserList']"></personnel-info>
<personnel-info slot="personnelInfo" ref="personnelInfo" :data="personnelInfoData" :currentNode="currentNodeName" :notPermissField="notPermissField"></personnel-info>
</process-detail-list>
</div>
@@ -209,6 +209,13 @@ export default {
computed: {
pageTitle () {
return this.$t('flowCenter') + this.$route.meta.title + '(' + this.currentNodeName + ')'
},
notPermissField () {
if (this.currentNode === 7) {
return []
} else {
return ['adviceUserList']
}
}
},
mounted () {
@@ -366,6 +373,37 @@ export default {
}
},
methods: {
// 待办中进入时需要初始化人员信息数据
// 混入中方法重写,部所联络人下发节点,如果有征求意见对象填写意见节点,需要能选人
initPersonInfoData (isFirstNode) {
console.log('-----------isFirstNode------------', isFirstNode)
if (isFirstNode) {
// 是第一个节点,回显数据
this.personnelInfoData = this.personnelInfoData.map(item => {
return {
...item,
userList: item.linkUserIds_dictText
}
})
} else {
// 不是第一个节点,回显数据,都不可选人,
// 部所联络人下发节点,征求意见对象填写意见节点,需要能选征求意见对象
this.personnelInfoData = this.personnelInfoData.map(item => {
if (item.variableName === 'adviceUserList' && this.currentNode === 7) {
return {
...item,
userList: item.linkUserIds_dictText
}
} else {
return {
...item,
userList: item.linkUserIds_dictText,
canChoose: 0
}
}
})
}
},
// 根据流程id获取数据并回显
getProcessData (type, param) {
let func
@@ -482,13 +520,6 @@ export default {
personnelObj: personnelObj
})
}
// if (baseInfo.dataSource) {
// paramObj.dataList = baseInfo.dataSource.map(item => {
// return { ...item, ...baseInfo.formInline }
// })
// } else {
// paramObj.dataList = [baseInfo.formInline]
// }
} else {
// 需要外层信息至少填了一项
const param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj }
@@ -591,6 +622,15 @@ export default {
// 提交
handleSubmit () {
if (this.loading) return
let personnelObj = {}
if (this.currentNode === 7) {
// 说明是部所联络人下发节点,需要传人员信息
personnelObj = this.$refs.personnelInfo.getDataObjVerify()
if (!personnelObj) {
this.switchValue = 'user'
return
}
}
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
const data = await this.$refs.baseInfoRef.getDataValidate()
if (!approvalErr && data) {
@@ -598,6 +638,9 @@ export default {
param.common = Object.assign({}, approvalValues)
param.common.taskId = this.$route.query.taskId
param.data = data
if (this.currentNode === 7) {
param.flowUser = personnelObj
}
this.loading = true
enStandardEditAgree(param).then(res => {
if (res.success) {
@@ -2,8 +2,7 @@
<div>
<base-info-form ref="baseInfoForm" v-bind="$attrs" disabled></base-info-form>
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
<div class="collapsible-panel-form">
<div class="form-flex-box collapsible-panel-form-content collapsible-content-no-head">
<div class="form-flex-box">
<!-- 标准文本 -->
<div class="box-title-text form-flex-item">
<div class="title-text">
@@ -55,7 +54,6 @@
</a-form-model-item>
</div>
</div>
</div>
</a-form-model>
</div>
</template>
@@ -283,7 +283,7 @@ export default {
console.log(data)
// 给表格赋值,在线编辑不知道要怎么赋值?
if (data.reviewMeetingDetails && data.reviewMeetingDetails.length > 0) {
this.dataSource = Array.from(fixDataSourse)
this.dataSource = JSON.parse(JSON.stringify(fixDataSourse))
for (const i in fixDataSourse) {
if (i % 3 === 0) {
this.dataSource[i].evaluateScore = data.reviewMeetingDetails[Math.floor(i / 3)].evaluateScore || ''
@@ -291,7 +291,7 @@ export default {
}
}
} else {
this.dataSource = Array.from(fixDataSourse)
this.dataSource = JSON.parse(JSON.stringify(fixDataSourse))
}
// 给表单赋值
this.$nextTick(() => {