[update] 修改企标制修订流程
This commit is contained in:
@@ -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) {
|
||||
|
||||
+40
-42
@@ -2,58 +2,56 @@
|
||||
<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="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<div class="form-flex-box">
|
||||
<!-- 标准文本 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.standardText')">
|
||||
{{ $t('workCenter.enStandardRevision.standardText') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<div class="online-edit-wrapper">
|
||||
<!-- todo: 还不确定这里展示的是什么 -->
|
||||
<p>企业标准</p>
|
||||
<a-button type="primary">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button>
|
||||
</div>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 征求意见截止日期,限制要比计划的时间早?? -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text title-text-long">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.deadlineForComments')">
|
||||
<a-form-model-item class="item-model">
|
||||
<div class="online-edit-wrapper">
|
||||
<!-- todo: 还不确定这里展示的是什么 -->
|
||||
<p>企业标准</p>
|
||||
<a-button type="primary">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button>
|
||||
</div>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 征求意见截止日期,限制要比计划的时间早?? -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text title-text-long">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.deadlineForComments')">
|
||||
{{ $t('workCenter.enStandardRevision.deadlineForComments') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="adviceDeadline">
|
||||
<a-date-picker
|
||||
v-model="formInline.adviceDeadline"
|
||||
:showTime="false"
|
||||
:disabled="disabled"
|
||||
value-format="YYYY-MM-DD">
|
||||
</a-date-picker>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 工作组 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.workingGroup')">
|
||||
<a-form-model-item class="item-model" prop="adviceDeadline">
|
||||
<a-date-picker
|
||||
v-model="formInline.adviceDeadline"
|
||||
:showTime="false"
|
||||
:disabled="disabled"
|
||||
value-format="YYYY-MM-DD">
|
||||
</a-date-picker>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 工作组 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
<span class="required">*</span>
|
||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.workingGroup')">
|
||||
{{ $t('workCenter.enStandardRevision.workingGroup') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="workGroup">
|
||||
<user-select-by-work-group v-model="formInline.workGroup"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.workingGroup')"
|
||||
:disabled="disabled"
|
||||
filedName="workGroup"
|
||||
@nameChange="userSelectNameChange"
|
||||
:nameStr="formInline.workGroup_dictText"
|
||||
type="checkbox"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="workGroup">
|
||||
<user-select-by-work-group v-model="formInline.workGroup"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.workingGroup')"
|
||||
:disabled="disabled"
|
||||
filedName="workGroup"
|
||||
@nameChange="userSelectNameChange"
|
||||
:nameStr="formInline.workGroup_dictText"
|
||||
type="checkbox"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</div>
|
||||
</a-form-model>
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user