[update] 处理流程中人员信息
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import { getAction, postAction } from './manage.js'
|
||||
|
||||
// 查询定义流程列表
|
||||
const getProcessNodeList = (params) => getAction('/process/fb/processFbInfo/getNodeList', params)
|
||||
|
||||
// 流程配置-部署
|
||||
const deployWorkFlow = (params) => getAction('/activitiModel/deploy', params)
|
||||
// 流程配置-获取节点列表
|
||||
@@ -131,6 +134,8 @@ const toDoTurnTo = (params) => postAction('', params)
|
||||
// 已发-强制撤回
|
||||
const compulsoryWithdrawal = (params) => postAction('', params)
|
||||
export {
|
||||
getProcessNodeList,
|
||||
|
||||
deployWorkFlow,
|
||||
getFlowNodeList,
|
||||
addFlowNode,
|
||||
|
||||
@@ -10,28 +10,28 @@
|
||||
</div>
|
||||
</template>
|
||||
<!-- 流程节点标题-->
|
||||
<template #title>
|
||||
<a-tooltip>
|
||||
<template #title>{{ step.nodeName }}</template>
|
||||
<div class="step-title">{{ step.nodeName }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<!--<template #title>-->
|
||||
<!-- <a-tooltip>-->
|
||||
<!-- <template #title>{{ step.nodeName }}</template>-->
|
||||
<!-- <div class="step-title">{{ step.nodeName }}</div>-->
|
||||
<!-- </a-tooltip>-->
|
||||
<!--</template>-->
|
||||
<!-- 流程节点选人内容-->
|
||||
<template #description>
|
||||
<div class="personnel-container">
|
||||
<div class="personnel-container-title" :class="{'personnel-container-select-title': index === 0}">
|
||||
<a-tooltip>
|
||||
<template #title>{{ step.nodeRoleName }}</template>
|
||||
<div class="personnel-container-title-text">{{ step.nodeRoleName }}</div>
|
||||
<template #title>{{ step.nodeName }}</template>
|
||||
<div class="personnel-container-title-text">{{ step.nodeName }}</div>
|
||||
</a-tooltip>
|
||||
</div>
|
||||
<div class="personnel-container-content">
|
||||
<div class="personnel-container-content-text">
|
||||
<template v-if="step.canChoose && index >= currentNodeIndex">
|
||||
<!-- TODO 数据库设计确定后处理数据抛出格式-->
|
||||
<user-select-by-work-group v-if="step.chooseSource === 'workGroup'" v-model="step.user" :type="step.chooseType" :name-str="step.user_dictText" input-type="textarea"/>
|
||||
<user-select-by-contact v-else-if="step.chooseSource === 'contactManage'" v-model="step.user" :type="step.chooseType" :name-str="step.user_dictText" input-type="textarea"/>
|
||||
<user-selection v-else-if="!['contactManage', 'workGroup'].includes(step.chooseSource)" :type="step.chooseType" v-model="step.user" :name-str="step.user_dictText" input-type="textarea" />
|
||||
<user-select-by-work-group v-if="step.chooseSource === 'workGroup'" v-model="step.linkUserIds" :type="step.chooseType" :name-str="step.linkUserIds_dictText" input-type="textarea"/>
|
||||
<user-select-by-contact v-else-if="step.chooseSource === 'contactManage'" v-model="step.linkUserIds" :type="step.chooseType" :name-str="step.linkUserIds_dictText" input-type="textarea"/>
|
||||
<user-selection v-else-if="step.chooseSource === 'user'" :type="step.chooseType" v-model="step.linkUserIds" :name-str="step.linkUserIds_dictText" input-type="textarea" />
|
||||
</template>
|
||||
<div class="personnel-container-content-echo-text" v-else>{{ step.userList }}</div>
|
||||
</div>
|
||||
@@ -88,6 +88,34 @@ export default {
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 获取人员对象,无校验
|
||||
getDataObj () {
|
||||
const personnelObj = {}
|
||||
for (const item of this.stepsData) {
|
||||
// 该属性还没有人就给他赋值
|
||||
if ((item.canChoose || item.sort === 1) && !personnelObj[item.variableName]) {
|
||||
personnelObj[item.variableName] = item.linkUserIds
|
||||
}
|
||||
}
|
||||
return personnelObj
|
||||
},
|
||||
// 有校验的获取人员对象
|
||||
getDataObjVerify () {
|
||||
let personnelObj = {}
|
||||
for (const item of this.stepsData) {
|
||||
// 该属性还没有人就给他赋值
|
||||
if ((item.canChoose || item.sort === 1) && !personnelObj[item.variableName]) {
|
||||
personnelObj[item.variableName] = item.linkUserIds
|
||||
}
|
||||
}
|
||||
if (!Object.values(personnelObj).every(v => !!v)) {
|
||||
this.$message.warning(this.$t('pleaseEnterPersonnelInfo'))
|
||||
personnelObj = false
|
||||
}
|
||||
return personnelObj
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -106,7 +134,8 @@ export default {
|
||||
}
|
||||
|
||||
/deep/ .ant-steps-item-content {
|
||||
padding: 0 12px;
|
||||
padding: 0 12px 30px 12px;
|
||||
|
||||
}
|
||||
|
||||
.step-title {
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
import { getProcessNodeList } from '../api/workCenter'
|
||||
import Vue from 'vue'
|
||||
import { USER_INFO } from '../store/mutation-types'
|
||||
|
||||
export const WorkCenterMixin = {
|
||||
data () {
|
||||
return {
|
||||
personnelInfoData: [] // 需要传给PersonnelInfo的数据
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 查询人员信息结构数据
|
||||
getPersonInfoStructure (key) {
|
||||
const param = {}
|
||||
param.processDefinitionKey = key
|
||||
if (this.$route.query.processInstanceId) {
|
||||
param.processInstanceId = this.$route.query.processInstanceId
|
||||
}
|
||||
getProcessNodeList(param).then(res => {
|
||||
if (res.success) {
|
||||
console.log(res.result)
|
||||
// 处理人员信息数据,判断每个节点是否能选人
|
||||
this.personnelInfoData = res.result.map(item => {
|
||||
return {
|
||||
...item,
|
||||
chooseType: item.variableType === 'string' ? 'radio' : 'checkbox'
|
||||
}
|
||||
})
|
||||
if (!this.$route.query.processInstanceId) {
|
||||
// 说明是在新发起一个节点,初始化发起人员信息
|
||||
this.personnelInfoData[0].linkUserIds = Vue.ls.get(USER_INFO).id
|
||||
this.personnelInfoData[0].userList = Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')'
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 待办中进入需要初始化人员信息数据
|
||||
* @param isFirstNode 是否是第一个节点,第一个节点需要能编辑的可以编辑并且回显数据
|
||||
*/
|
||||
initPersonInfoData (isFirstNode) {
|
||||
if (!isFirstNode) {
|
||||
this.personnelInfoData = this.personnelInfoData.map(item => {
|
||||
return {
|
||||
...item,
|
||||
userList: item.linkUserIds_dictText,
|
||||
canChoose: 0
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 操作完成返回
|
||||
goBack () {
|
||||
setTimeout(() => {
|
||||
this.$router.go(-1)
|
||||
}, 700)
|
||||
}
|
||||
}
|
||||
}
|
||||
+76
-123
@@ -99,7 +99,7 @@
|
||||
<!-- 人员信息 -->
|
||||
<div v-show="switchValue === 'user'" class="detail-page-scroll-content p-0">
|
||||
<process-detail-list>
|
||||
<personnel-info slot="personnelInfo" ref="personnelInfo" :data="personnelInfoData" :currentNode="currentNode + ''"></personnel-info>
|
||||
<personnel-info slot="personnelInfo" ref="personnelInfo" :data="personnelInfoData" :currentNode="currentNodeName"></personnel-info>
|
||||
</process-detail-list>
|
||||
</div>
|
||||
|
||||
@@ -162,64 +162,19 @@ import {
|
||||
import Vue from 'vue'
|
||||
import { USER_INFO } from '@/store/mutation-types'
|
||||
import pick from 'lodash.pick'
|
||||
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
|
||||
import { ProcessKey } from '@/enums/commonEnums'
|
||||
|
||||
const personData = [
|
||||
{
|
||||
id: 1,
|
||||
nodeName: '标准化工程师发起',
|
||||
nodeRoleName: '发起人',
|
||||
canChoose: false,
|
||||
userList: Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')',
|
||||
fieldName: 'standardEngineer'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
nodeName: '各部门联络人填写/下发任务',
|
||||
nodeRoleName: '各部门联络人',
|
||||
canChoose: true,
|
||||
chooseType: 'checkbox',
|
||||
fieldName: 'contactUserList'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
nodeName: '工作组/所联络人填写企标',
|
||||
nodeRoleName: '工作组/所联络人',
|
||||
canChoose: false,
|
||||
fieldName: 'workGroupUserList'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
nodeName: '收集联络人主管级领导审批',
|
||||
nodeRoleName: '联络人主管级领导',
|
||||
canChoose: false,
|
||||
chooseType: 'checkbox',
|
||||
fieldName: 'collectUserLeader'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
nodeName: '各部门联络人汇总',
|
||||
nodeRoleName: '各部门联络人',
|
||||
canChoose: false,
|
||||
chooseType: 'checkbox',
|
||||
fieldName: 'contactUserList'
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
nodeName: '联络人主管级上一级领导审批',
|
||||
nodeRoleName: '联络人主管级上一级领导',
|
||||
canChoose: false,
|
||||
chooseType: 'checkbox',
|
||||
fieldName: 'contactUserLeaderLeader'
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
nodeName: '标准化工程师归档',
|
||||
nodeRoleName: '标准化工程师',
|
||||
canChoose: false,
|
||||
chooseType: 'radio',
|
||||
fieldName: 'standardEngineer'
|
||||
}
|
||||
]
|
||||
const taskNameConstant = {
|
||||
STANDARD_ENGINEER_INIT: '标准化工程师发起',
|
||||
CONTACT_USER_DISTRIBUTE: '各部所联络人 填写/下发任务',
|
||||
WORK_GROUP_COLLECT: '工作组联络人 线下收集,填写计划内容(可跳过)',
|
||||
COLLECT_LEADER_APPROVAL: '收集联络人主管级领导审批',
|
||||
CONTACT_USER_COLLECT: '各部所联络人汇总',
|
||||
CONTACT_USER_LEADER_APPROVAL: '联络人主管级上级领导审批',
|
||||
CONTACT_USER_EDIT: '各部所联络人修改调整',
|
||||
STANDARD_ENGINEER_COLLECT: '标准化工程师归档'
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'RevisionPlanActivelyReportFlow',
|
||||
@@ -233,6 +188,7 @@ export default {
|
||||
PersonnelInfo,
|
||||
UserSelectModal
|
||||
},
|
||||
mixins: [WorkCenterMixin],
|
||||
computed: {
|
||||
pageTitle () {
|
||||
return this.$t('flowCenter') + this.$route.meta.title
|
||||
@@ -243,30 +199,42 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
// 获取人员信息结构
|
||||
this.getPersonInfoStructure(ProcessKey.ES_ANNUAL_REPORT.value)
|
||||
if (this.$route.query.taskId) {
|
||||
this.currentNodeName = this.$route.query.taskName
|
||||
// 有流程id说明是从流程中心来的,需要初始化数据
|
||||
this.getProcessData(this.$route.query.taskId)
|
||||
} else {
|
||||
// 没有taskId说明是新建进来的,初始化人员信息
|
||||
this.personnelInfoData = personData
|
||||
this.currentNodeName = '标准化工程师发起'
|
||||
}
|
||||
// 初始化节点
|
||||
const taskName = this.$route.query.taskName
|
||||
if (taskName) {
|
||||
if (taskName === '标准化工程师发起') {
|
||||
if (taskName === taskNameConstant.STANDARD_ENGINEER_INIT) {
|
||||
// 标准化工程师发起
|
||||
this.currentNode = 1
|
||||
} else if (taskName === '各部所联络人 填写/下发任务') {
|
||||
} else if (taskName === taskNameConstant.CONTACT_USER_DISTRIBUTE) {
|
||||
// 各部所联络人 填写/下发任务
|
||||
this.currentNode = 2
|
||||
} else if (taskName === '工作组/所联络人填写企标') {
|
||||
} else if (taskName === taskNameConstant.WORK_GROUP_COLLECT) {
|
||||
// 工作组联络人 线下收集,填写计划内容(可跳过)
|
||||
this.currentNode = 3
|
||||
} else if (taskName === '收集联络人主管级领导审批') {
|
||||
} else if (taskName === taskNameConstant.COLLECT_LEADER_APPROVAL) {
|
||||
// 收集联络人主管级领导审批
|
||||
this.currentNode = 4
|
||||
} else if (taskName === '各部所联络人汇总') {
|
||||
} else if (taskName === taskNameConstant.CONTACT_USER_COLLECT) {
|
||||
// 各部所联络人汇总
|
||||
this.currentNode = 5
|
||||
} else if (taskName === '联络人主管级上一级领导审批') {
|
||||
} else if (taskName === taskNameConstant.CONTACT_USER_LEADER_APPROVAL) {
|
||||
// 联络人主管级上级领导审批
|
||||
this.currentNode = 6
|
||||
} else {
|
||||
} else if (taskName === taskNameConstant.STANDARD_ENGINEER_COLLECT) {
|
||||
// 标准化工程师归档
|
||||
this.currentNode = 7
|
||||
} else {
|
||||
// 预留加签节点
|
||||
this.currentNode = 999
|
||||
}
|
||||
}
|
||||
// 如果是查看进入的,不可编辑,不可操作
|
||||
@@ -342,25 +310,11 @@ export default {
|
||||
})
|
||||
// 初始化人员信息
|
||||
if (this.currentNode === 1) {
|
||||
this.personnelInfoData = personData.map(item => {
|
||||
if (item.fieldName) {
|
||||
return {
|
||||
...item,
|
||||
user: this.model.flowUser[item.fieldName],
|
||||
user_dictText: this.model.flowUser[item.fieldName + '_dictText']
|
||||
}
|
||||
} else {
|
||||
return item
|
||||
}
|
||||
})
|
||||
// 初始化人员信息数据
|
||||
this.initPersonInfoData(true)
|
||||
} else {
|
||||
this.personnelInfoData = personData.map(item => {
|
||||
if (item.fieldName) {
|
||||
return { ...item, user: this.model.flowUser[item.fieldName], userList: this.model.flowUser[item.fieldName + '_dictText'], canChoose: false }
|
||||
} else {
|
||||
return item
|
||||
}
|
||||
})
|
||||
// 初始化人员信息数据
|
||||
this.initPersonInfoData(false)
|
||||
}
|
||||
// 初始化业务基本信息
|
||||
if (this.currentNode === 1) {
|
||||
@@ -391,44 +345,54 @@ export default {
|
||||
// 流程审批信息
|
||||
const approvalInfoForm = this.approvalInfoForm.getFieldsValue()
|
||||
// 人员信息的数据, 处理成对象
|
||||
const personnelInfo = this.$refs.personnelInfo.stepsData
|
||||
const personnelObj = {}
|
||||
for (const item of personnelInfo) {
|
||||
if (item.fieldName) {
|
||||
personnelObj[item.fieldName] = item.user
|
||||
}
|
||||
}
|
||||
const personnelObj = this.$refs.personnelInfo.getDataObj()
|
||||
// 需要传给后端的
|
||||
let param = {}
|
||||
param.common = { ...processInfoForm, ...approvalInfoForm }
|
||||
param.flowUser = personnelObj
|
||||
const paramObj = {}
|
||||
paramObj.common = { ...processInfoForm, ...approvalInfoForm }
|
||||
paramObj.flowUser = personnelObj
|
||||
// 业务基本信息
|
||||
if (this.$refs.baseInfoFormRef) {
|
||||
const ruleForm = this.$refs.baseInfoFormRef.getData()
|
||||
if (this.currentNode === 1) {
|
||||
// 只有表单
|
||||
param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj, ...ruleForm.formInline }
|
||||
const param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj, ...ruleForm.formInline }
|
||||
const flag = Object.values(param).some(v => !!v || v === 0)
|
||||
if (!flag) {
|
||||
// 提示至少填写一项
|
||||
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
|
||||
return
|
||||
}
|
||||
param.dataList = [ruleForm.formInline]
|
||||
} else if ([2, 3].includes(this.currentNode)) {
|
||||
paramObj.dataList = [ruleForm.formInline]
|
||||
} else if (this.currentNode === 2) {
|
||||
// 业务基本信息有表单,可能有表格也可能没有
|
||||
const param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj, ...ruleForm.formInline }
|
||||
const flag = Object.values(param).some(v => !!v || v === 0)
|
||||
if (!flag || (ruleForm.dataSource && ruleForm.dataSource.length <= 0)) {
|
||||
// 提示至少填写一项
|
||||
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
|
||||
return
|
||||
}
|
||||
if (ruleForm.dataSource) {
|
||||
paramObj.dataList = ruleForm.dataSource.map(item => {
|
||||
return { ...item, ...ruleForm.formInline }
|
||||
})
|
||||
} else {
|
||||
paramObj.dataList = [ruleForm.formInline]
|
||||
}
|
||||
} else if (this.currentNode === 3) {
|
||||
// 业务基本信息有表单也有表格
|
||||
param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj, ...ruleForm.formInline }
|
||||
const param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj, ...ruleForm.formInline }
|
||||
const flag = Object.values(param).some(v => !!v || v === 0)
|
||||
if (!flag || ruleForm.dataSource.length <= 0) {
|
||||
// 提示至少填写一项
|
||||
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
|
||||
return
|
||||
}
|
||||
param.dataList = ruleForm.dataSource.map(item => {
|
||||
paramObj.dataList = ruleForm.dataSource.map(item => {
|
||||
return { ...item, ...ruleForm.formInline }
|
||||
})
|
||||
} else if (this.currentNode === 5) {
|
||||
param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj }
|
||||
const param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj }
|
||||
const flag = Object.values(param).some(v => !!v || v === 0)
|
||||
if (!flag || ruleForm.dataSource.length <= 0) {
|
||||
// 提示至少填写一项
|
||||
@@ -436,11 +400,11 @@ export default {
|
||||
return
|
||||
}
|
||||
// 业务基础信息中只有表格
|
||||
param.dataList = ruleForm.dataSource
|
||||
paramObj.dataList = ruleForm.dataSource
|
||||
}
|
||||
} else {
|
||||
// 需要外层信息至少填了一项
|
||||
param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj }
|
||||
const param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj }
|
||||
const flag = Object.values(param).some(v => !!v || v === 0)
|
||||
if (!flag) {
|
||||
// 提示至少填写一项
|
||||
@@ -450,7 +414,7 @@ export default {
|
||||
}
|
||||
this.loading = true
|
||||
// 保存到草稿
|
||||
activelyReportSave(param).then(res => {
|
||||
activelyReportSave(paramObj).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
@@ -465,18 +429,8 @@ export default {
|
||||
handleStart () {
|
||||
if (this.loading) return
|
||||
// 人员信息的数据, 处理成对象
|
||||
const personnelInfo = this.$refs.personnelInfo.stepsData
|
||||
const personnelObj = {}
|
||||
for (const item of personnelInfo) {
|
||||
if (item.fieldName && item.canChoose) {
|
||||
personnelObj[item.fieldName] = item.user
|
||||
}
|
||||
}
|
||||
// 发起人,标准化工程师设置为当前登录人
|
||||
personnelObj.standardEngineer = Vue.ls.get(USER_INFO).id
|
||||
// 校验是否填了所有能填的人员信息
|
||||
if (!Object.values(personnelObj).every(v => !!v)) {
|
||||
this.$message.warning(this.$t('pleaseEnterPersonnelInfo'))
|
||||
const personnelObj = this.$refs.personnelInfo.getDataObjVerify()
|
||||
if (!personnelObj) {
|
||||
return
|
||||
}
|
||||
// 流程信息校验
|
||||
@@ -574,8 +528,9 @@ export default {
|
||||
this.approvalInfoForm.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
this.loading = true
|
||||
const param = Object.assign({}, values)
|
||||
param.taskId = this.$route.query.taskId
|
||||
const param = {}
|
||||
param.common = Object.assign({}, values)
|
||||
param.common.taskId = this.$route.query.taskId
|
||||
activelyReportAgree(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
@@ -595,8 +550,9 @@ export default {
|
||||
this.approvalInfoForm.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
this.loading = true
|
||||
const param = Object.assign({}, values)
|
||||
param.taskId = this.$route.query.taskId
|
||||
const param = {}
|
||||
param.common = Object.assign({}, values)
|
||||
param.common.taskId = this.$route.query.taskId
|
||||
activelyReportReject(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
@@ -609,9 +565,6 @@ export default {
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
goBack () {
|
||||
this.$router.go(-1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-6
@@ -120,8 +120,7 @@ export default {
|
||||
}
|
||||
]
|
||||
},
|
||||
modalType: '', // 是在新增还是在编辑,编辑的时候放正在编辑的下标
|
||||
data: undefined
|
||||
modalType: '' // 是在新增还是在编辑,编辑的时候放正在编辑的下标
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -131,7 +130,6 @@ export default {
|
||||
},
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
this.data = data
|
||||
// 给表单赋值
|
||||
if (data.dataList[0].distributeFlag + '' === '0') {
|
||||
// 不下发联络人
|
||||
@@ -166,11 +164,11 @@ export default {
|
||||
if (result) {
|
||||
if (this.$refs.tableRef) {
|
||||
// 存在表格说明是否下发联络人选择了否
|
||||
if (this.$refs.tableRef.dataSource && this.$refs.tableRef.dataSource.length > 0) {
|
||||
const tableData = this.$refs.tableRef.getDataValidate()
|
||||
if (tableData) {
|
||||
data.formInline = this.formInline
|
||||
data.dataSource = this.$refs.tableRef.dataSource
|
||||
data.dataSource = tableData.dataSource
|
||||
} else {
|
||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||
data = false
|
||||
}
|
||||
} else {
|
||||
|
||||
+10
-14
@@ -63,8 +63,7 @@ export default {
|
||||
}
|
||||
]
|
||||
},
|
||||
modalType: '', // 是在新增还是在编辑,编辑的时候放正在编辑的下标
|
||||
data: undefined
|
||||
modalType: '' // 是在新增还是在编辑,编辑的时候放正在编辑的下标
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -74,7 +73,6 @@ export default {
|
||||
},
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
this.data = data
|
||||
// 给表单赋值
|
||||
this.formInline = { collectUserLeader: data.flowUser.collectUserLeader }
|
||||
// 给表格赋值
|
||||
@@ -96,25 +94,23 @@ export default {
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
getDataValidate (callback) {
|
||||
async getDataValidate () {
|
||||
// 可能是表单,也可能是表格,表单校验一定要填,有是否下发联络人
|
||||
this.$refs.ruleForm.validate(result => {
|
||||
let data = {}
|
||||
await this.$refs.ruleForm.validate(result => {
|
||||
if (result) {
|
||||
if (this.$refs.tableRef.dataSource && this.$refs.tableRef.dataSource.length > 0) {
|
||||
const data = {}
|
||||
const tableData = this.$refs.tableRef.getDataValidate()
|
||||
if (tableData) {
|
||||
data.formInline = this.formInline
|
||||
data.dataSource = this.$refs.tableRef.dataSource
|
||||
callback(data)
|
||||
data.dataSource = tableData.dataSource
|
||||
} else {
|
||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||
const data = false
|
||||
callback(data)
|
||||
data = false
|
||||
}
|
||||
} else {
|
||||
const data = false
|
||||
callback(data)
|
||||
data = false
|
||||
}
|
||||
})
|
||||
return data
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,14 +44,12 @@ export default {
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
},
|
||||
data: undefined
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
this.data = data
|
||||
// 给表单赋值
|
||||
this.formInline = {
|
||||
processDescription: data.common.processDescription
|
||||
@@ -65,17 +63,16 @@ export default {
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
getDataValidate (callback) {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
async getDataValidate () {
|
||||
let data = {}
|
||||
await this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
const data = {}
|
||||
data.formInline = this.formInline
|
||||
callback(data)
|
||||
} else {
|
||||
const data = false
|
||||
callback(data)
|
||||
data = false
|
||||
}
|
||||
})
|
||||
return data
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -278,12 +278,27 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
initData (data) {
|
||||
this.data = data
|
||||
// 给表格赋值
|
||||
this.$nextTick(() => {
|
||||
this.dataSource = data.dataList
|
||||
})
|
||||
},
|
||||
// 外层要获取数据
|
||||
getData () {
|
||||
return { dataSource: this.dataSource }
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
getDataValidate () {
|
||||
// 可能是表单,也可能是表格,表单校验一定要填,有是否下发联络人
|
||||
let data = {}
|
||||
if (this.dataSource && this.dataSource.length > 0) {
|
||||
data.dataSource = this.dataSource
|
||||
} else {
|
||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||
data = false
|
||||
}
|
||||
return data
|
||||
},
|
||||
// 企标编号,企标名称跳转详情,原企标
|
||||
handleGoDetailOld (record) {
|
||||
this.$openPageNewSheet({
|
||||
@@ -330,6 +345,12 @@ export default {
|
||||
},
|
||||
// 导入
|
||||
handleImportExcel (info) {
|
||||
// 限制导入大于500MB
|
||||
if (info.file.size > 1024 * 1024 * 500) {
|
||||
this.$message.error('导入文件最大500MB!')
|
||||
info.fileList.pop()
|
||||
return
|
||||
}
|
||||
// 加一个大的提示
|
||||
if (!this.loading) {
|
||||
importModalLoading = this.$info({
|
||||
|
||||
+45
-41
@@ -247,8 +247,11 @@ export default {
|
||||
this.currentNode = 5
|
||||
} else if (taskName === '主起草单位主管级领导批准') {
|
||||
this.currentNode = 6
|
||||
} else {
|
||||
} else if (taskName === '标准化归档') {
|
||||
this.currentNode = 7
|
||||
} else {
|
||||
// 预留加签节点
|
||||
this.currentNode = 999
|
||||
}
|
||||
}
|
||||
// 如果是查看进入的,不可编辑,不可操作
|
||||
@@ -425,24 +428,23 @@ export default {
|
||||
}
|
||||
this.processInfoForm.validateFields((err, values) => {
|
||||
this.approvalInfoForm.validateFields((approvalErr, approvalValues) => {
|
||||
this.$refs.baseInfoRef.getDataValidate((data) => {
|
||||
if (!err && !approvalErr && data) {
|
||||
const param = {} // 传给后端的数据
|
||||
param.common = { ...values, ...approvalValues }
|
||||
param.dataList = data.dataSource
|
||||
param.flowUser = personnelObj
|
||||
standardizationInitApproval(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
const data = this.$refs.baseInfoRef.getDataValidate()
|
||||
if (!err && !approvalErr && data) {
|
||||
const param = {} // 传给后端的数据
|
||||
param.common = { ...values, ...approvalValues }
|
||||
param.dataList = data.dataSource
|
||||
param.flowUser = personnelObj
|
||||
standardizationInitApproval(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -478,35 +480,37 @@ export default {
|
||||
if (this.loading) return
|
||||
// 流程审批信息校验
|
||||
this.approvalInfoForm.validateFields((approvalErr, approvalValues) => {
|
||||
this.$refs.baseInfoFormRef.getDataValidate(data => {
|
||||
if (approvalErr && data) {
|
||||
// 只有表格
|
||||
const param = {}
|
||||
param.common = approvalValues
|
||||
param.dataList = data.dataSource
|
||||
standardizationInitAgree(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
const data = this.$refs.baseInfoFormRef.getDataValidate()
|
||||
if (!approvalErr && data) {
|
||||
// 只有表格
|
||||
const param = {}
|
||||
param.common = approvalValues
|
||||
param.common.taskId = this.$route.query.taskId
|
||||
param.dataList = data.dataSource
|
||||
standardizationInitAgree(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 同意(节点2,3,6有同意)
|
||||
handleAgree () {
|
||||
if (this.loading) return
|
||||
this.approvalInfoForm.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
this.loading = true
|
||||
const data = this.$refs.baseInfoFormRef.getDataValidate()
|
||||
if (!err && data) {
|
||||
// 只有表格
|
||||
const param = {}
|
||||
param.common = Object.assign({}, values)
|
||||
param.taskId = this.$route.query.taskId
|
||||
param.common = values
|
||||
param.common.taskId = this.$route.query.taskId
|
||||
param.dataList = data.dataSource
|
||||
standardizationInitAgree(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
|
||||
+5
-7
@@ -215,9 +215,8 @@ export default {
|
||||
methods: {
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
this.data = data
|
||||
// 给表格赋值
|
||||
// this.dataSource =
|
||||
this.dataSource = data.dataList
|
||||
},
|
||||
// 外层要获取数据
|
||||
getData () {
|
||||
@@ -227,8 +226,9 @@ export default {
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
getDataValidate (callback) {
|
||||
getDataValidate () {
|
||||
// 每行的审批人是否都有
|
||||
let data = {}
|
||||
let hasErr = false
|
||||
for (const item of this.dataSource) {
|
||||
if (!item.approvalUser) {
|
||||
@@ -237,15 +237,13 @@ export default {
|
||||
break
|
||||
}
|
||||
}
|
||||
let data
|
||||
if (hasErr) {
|
||||
this.$message.warning(this.$t('workCenter.revisionPlanActivelyReport.pleaseSelectApprover'))
|
||||
data = false
|
||||
callback(data)
|
||||
} else {
|
||||
data = { dataSource: this.dataSource }
|
||||
callback(data)
|
||||
data.dataSource = this.dataSource
|
||||
}
|
||||
return data
|
||||
},
|
||||
// 企标编号,企标名称跳转详情,原企标
|
||||
handleGoDetailOld (record) {
|
||||
|
||||
+12
-10
@@ -287,9 +287,8 @@ export default {
|
||||
methods: {
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
this.data = data
|
||||
// 给表格赋值
|
||||
// this.dataSource =
|
||||
this.dataSource = data.dataList
|
||||
},
|
||||
// 外层要获取数据
|
||||
getData () {
|
||||
@@ -301,10 +300,10 @@ export default {
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
getDataValidate (callback) {
|
||||
getDataValidate () {
|
||||
// 校验表格是否每行都有数据,每行的联络人是否都有
|
||||
let data = {}
|
||||
if (this.dataSource && this.dataSource.length > 0) {
|
||||
const data = {}
|
||||
data.dataSource = this.dataSource.map(item => {
|
||||
return { ...item, enStandardSystem: item.enStandardSystem ? item.enStandardSystem.join(',') : ''}
|
||||
})
|
||||
@@ -318,16 +317,13 @@ export default {
|
||||
}
|
||||
if (hasErr) {
|
||||
this.$message.warning(this.$t('workCenter.revisionPlanActivelyReport.pleaseSelectContact'))
|
||||
const data = false
|
||||
callback(data)
|
||||
} else {
|
||||
callback(data)
|
||||
data = false
|
||||
}
|
||||
} else {
|
||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||
const data = false
|
||||
callback(data)
|
||||
data = false
|
||||
}
|
||||
return data
|
||||
},
|
||||
// 企标编号,企标名称跳转详情,原企标
|
||||
handleGoDetailOld (record) {
|
||||
@@ -375,6 +371,12 @@ export default {
|
||||
},
|
||||
// 导入
|
||||
handleImportExcel (info) {
|
||||
// 限制导入大于500MB
|
||||
if (info.file.size > 1024 * 1024 * 500) {
|
||||
this.$message.error('导入文件最大500MB!')
|
||||
info.fileList.pop()
|
||||
return
|
||||
}
|
||||
// 加一个大的提示
|
||||
if (!this.loading) {
|
||||
importModalLoading = this.$info({
|
||||
|
||||
+5
-7
@@ -211,9 +211,8 @@ export default {
|
||||
methods: {
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
this.data = data
|
||||
// 给表格赋值
|
||||
// this.dataSource =
|
||||
this.dataSource = data.dataList
|
||||
},
|
||||
// 外层要获取数据
|
||||
getData () {
|
||||
@@ -223,8 +222,9 @@ export default {
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
getDataValidate (callback) {
|
||||
getDataValidate () {
|
||||
// 每行的主起草人是否都有
|
||||
let data = {}
|
||||
let hasErr = false
|
||||
for (const item of this.dataSource) {
|
||||
if (!item.drafter) {
|
||||
@@ -233,15 +233,13 @@ export default {
|
||||
break
|
||||
}
|
||||
}
|
||||
let data
|
||||
if (hasErr) {
|
||||
this.$message.warning(this.$t('workCenter.revisionPlanActivelyReport.pleaseSelectDrafter'))
|
||||
data = false
|
||||
callback(data)
|
||||
} else {
|
||||
data = { dataSource: this.dataSource }
|
||||
callback(data)
|
||||
data.dataSource = this.dataSource
|
||||
}
|
||||
return data
|
||||
},
|
||||
// 企标编号,企标名称跳转详情,原企标
|
||||
handleGoDetailOld (record) {
|
||||
|
||||
+5
-7
@@ -230,9 +230,8 @@ export default {
|
||||
methods: {
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
this.data = data
|
||||
// 给表格赋值
|
||||
// this.dataSource =
|
||||
this.dataSource = data.dataList
|
||||
},
|
||||
// 外层要获取数据
|
||||
getData () {
|
||||
@@ -242,17 +241,16 @@ export default {
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
getDataValidate (callback) {
|
||||
getDataValidate () {
|
||||
// 校验表格是否每行都有数据,每行的联络人是否都有
|
||||
let data = {}
|
||||
if (this.dataSource && this.dataSource.length > 0) {
|
||||
const data = {}
|
||||
data.dataSource = this.dataSource
|
||||
callback(data)
|
||||
} else {
|
||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||
const data = false
|
||||
callback(data)
|
||||
data = false
|
||||
}
|
||||
return data
|
||||
},
|
||||
// 企标编号,企标名称跳转详情,原企标
|
||||
handleGoDetailOld (record) {
|
||||
|
||||
@@ -187,18 +187,34 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
if (this.$route.query.processId) {
|
||||
this.currentNode = 2 // todo: 先设置一个假数据,后端还不能返回当前节点
|
||||
if (this.$route.query.taskId) {
|
||||
// 有流程id说明是从流程中心来的,需要初始化数据
|
||||
this.getProcessData(this.$route.query.processId)
|
||||
this.getProcessData(this.$route.query.taskId)
|
||||
} else {
|
||||
// 没有taskId说明是新建进来的,初始化人员信息
|
||||
this.personnelInfoData = personalInfo
|
||||
}
|
||||
// 初始化节点
|
||||
const taskName = this.$route.query.taskName
|
||||
if (taskName) {
|
||||
if (taskName === '主起草人发起') {
|
||||
this.currentNode = 1
|
||||
} else if (taskName === '相关人员校对') {
|
||||
this.currentNode = 2
|
||||
} else if (taskName === '起草人主管级领导审批') {
|
||||
this.currentNode = 3
|
||||
} else if (taskName === '标准化审批') {
|
||||
this.currentNode = 4
|
||||
} else if (taskName === '起草人主管级上一级领导审批') {
|
||||
this.currentNode = 5
|
||||
} else {
|
||||
// 预留加签节点
|
||||
this.currentNode = 999
|
||||
}
|
||||
}
|
||||
if (this.currentNode === 1) {
|
||||
this.personnelInfoData = personalInfo
|
||||
this.disabled = false
|
||||
} else {
|
||||
this.personnelInfoData = personalInfo.map(item => {
|
||||
return { ...item, canChoose: false, fieldName: undefined }
|
||||
})
|
||||
this.disabled = true
|
||||
}
|
||||
// 如果是查看进入的,不可编辑,不可操作
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
<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>
|
||||
{{ $t('workCenter.enStandardRevision.standardText') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<div class="online-edit-wrapper">
|
||||
|
||||
@@ -137,9 +137,8 @@ export default {
|
||||
methods: {
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
this.data = data
|
||||
// 给表格赋值,在线编辑不知道要怎么赋值?
|
||||
// this.dataSource =
|
||||
this.dataSource = data.dataSource
|
||||
// 给表单赋值
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.baseInfoForm.formInline =
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
<!-- 人员信息 -->
|
||||
<div v-show="switchValue === 'user'" class="detail-page-scroll-content p-0">
|
||||
<process-detail-list>
|
||||
<personnel-info slot="personnelInfo" ref="personnelInfo" :data="personnelInfoData" :currentNode="currentNode + ''"></personnel-info>
|
||||
<personnel-info slot="personnelInfo" ref="personnelInfo" :data="personnelInfoData" :currentNode="currentNodeName"></personnel-info>
|
||||
</process-detail-list>
|
||||
</div>
|
||||
<!-- 操作按钮 -->
|
||||
@@ -258,7 +258,9 @@ import {
|
||||
enterprisePlanApprovalReject,
|
||||
enterprisePlanApprovalSave,
|
||||
enterprisePlanApproval,
|
||||
getProcessDataById
|
||||
getProcessDataById,
|
||||
getNodeList,
|
||||
getProcessNodeList
|
||||
} from '@/api/workCenter'
|
||||
import ApprovalBaseInfo from './modules/ApprovalBaseInfo'
|
||||
import FinishTimeChangeBaseInfo from './modules/FinishTimeChangeBaseInfo'
|
||||
@@ -266,10 +268,11 @@ import ProcessDetailList from '@/components/ProcessDetailList'
|
||||
import JobEndBaseInfo from './modules/JobEndBaseInfo'
|
||||
import DutyDepartChangeBaseInfo from './modules/DutyDepartChangeBaseInfo'
|
||||
import MergeBaseInfo from './modules/MergeBaseInfo'
|
||||
import { ProjectType, ApplicationCategory } from '@/enums/commonEnums'
|
||||
import { ProjectType, ApplicationCategory, ProcessKey } from '@/enums/commonEnums'
|
||||
import Vue from 'vue'
|
||||
import { USER_INFO } from '@/store/mutation-types'
|
||||
import pick from 'lodash.pick'
|
||||
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
|
||||
|
||||
// 标准立项的人员信息
|
||||
const approvalPersonalInfo = [ // 人员信息的数据
|
||||
@@ -416,9 +419,10 @@ export default {
|
||||
InternalDetailPage,
|
||||
UserSelection
|
||||
},
|
||||
mixins: [WorkCenterMixin],
|
||||
computed: {
|
||||
pageTitle () {
|
||||
return this.$t('flowCenter') + this.$route.meta.title
|
||||
return this.$t('flowCenter') + this.$route.meta.title + '(' + this.currentNodeName + ')'
|
||||
},
|
||||
// 流程名称是否不可填写
|
||||
processNameDisabled () {
|
||||
@@ -452,12 +456,14 @@ export default {
|
||||
},
|
||||
mounted () {
|
||||
console.log(this.$route.query.taskId)
|
||||
// 查询流程定义列表,通过查出的数据获取到流程定义id,如果已经发起过流程,用这个id和流程实例id去查人员信息数据
|
||||
this.getPersonInfoStructure(ProcessKey.ES_INIT_CHANGE.value)
|
||||
if (this.$route.query.taskId) {
|
||||
this.currentNodeName = this.$route.query.taskName
|
||||
// 有流程id说明是从流程中心来的,需要初始化数据
|
||||
this.getProcessData(this.$route.query.taskId)
|
||||
} else {
|
||||
// 没有taskId说明是新建进来的,初始化人员信息
|
||||
this.personnelInfoData = approvalPersonalInfo
|
||||
this.currentNodeName = '主起草人发起'
|
||||
}
|
||||
// 如果是查看进入的,不可编辑,不可操作
|
||||
if (this.$route.query.onlyLook) {
|
||||
@@ -474,6 +480,7 @@ export default {
|
||||
disabled: false,
|
||||
onlyLook: false, // 是否仅查看
|
||||
currentNode: 1, // 当前节点
|
||||
currentNodeName: '', // 当前节点名称
|
||||
model: [],
|
||||
processInfoForm: this.$form.createForm(this),
|
||||
labelCol: {
|
||||
@@ -556,6 +563,25 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 查询人员信息结构数据
|
||||
getPersonInfoStructure (key) {
|
||||
console.log('-----------getPersonInfoStructure-------', key)
|
||||
const param = {}
|
||||
param.processDefinitionKey = key
|
||||
if (this.$route.query.processInstanceId) {
|
||||
param.processInstanceId = this.$route.query.processInstanceId
|
||||
}
|
||||
console.log(param)
|
||||
getProcessNodeList(param).then(res => {
|
||||
if (res.success) {
|
||||
console.log(res.result)
|
||||
// 处理人员信息数据
|
||||
// 筛选出是立项、责任部门变更,其他变更
|
||||
// 每个节点是否能选人
|
||||
this.personnelInfoData = res.result
|
||||
}
|
||||
})
|
||||
},
|
||||
// 根据流程id获取数据并回显
|
||||
getProcessData (taskId) {
|
||||
getProcessDataById(taskId).then(res => {
|
||||
@@ -592,8 +618,11 @@ export default {
|
||||
this.currentNode = 7
|
||||
} else if (taskName === '相关人员会签') {
|
||||
this.currentNode = 8
|
||||
} else {
|
||||
} else if (taskName === '抄送主起草人确认') {
|
||||
this.currentNode = 9
|
||||
} else {
|
||||
// 预留加签节点
|
||||
this.currentNode = 999
|
||||
}
|
||||
}
|
||||
console.log(this.currentNode)
|
||||
@@ -690,6 +719,34 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取人员信息数据
|
||||
getPersonInfoData () {
|
||||
const param = {}
|
||||
param.processDefinitionId = this.processDefinitionId
|
||||
// 有流程实例id就需要传流程实例id
|
||||
if (this.$route.query.processInstanceId) {
|
||||
param.processInstanceId = this.$route.query.processInstanceId
|
||||
}
|
||||
getNodeList(param).then(res => {
|
||||
if (res.success) {
|
||||
console.log(res.result)
|
||||
// 处理人员信息数据
|
||||
if (this.formInline.applicationCategory) {
|
||||
// 有申请类型,根据申请类型返回不同的人员信息,区分【立项、普通变更、责任部门变更(责任部门变更时某些节点不可跳过)】
|
||||
if (this.formInline.applicationCategory === ApplicationCategory.INITIATION.value) {
|
||||
// 是立项,从result中拿出立项有的人员信息
|
||||
} else if (this.formInline.applicationCategory === ApplicationCategory.CHANGE.value) {
|
||||
// 是变更
|
||||
if (this.formInline.projectType === ProjectType.RESPONSIBLE_DEPT_CHANGE.value) {
|
||||
// 是责任部门变更,从result中拿出责任部门变更有的人员信息
|
||||
} else {
|
||||
// 是别的变更,从result中拿出需要的人员信息
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 头部tab改变
|
||||
switchChange (value) {
|
||||
this.switchValue = value
|
||||
|
||||
Reference in New Issue
Block a user