update 标准法规入库/变更流程
This commit is contained in:
+6
-6
@@ -108,12 +108,12 @@ export default class EsEnum {
|
||||
* @returns {*|null}
|
||||
*/
|
||||
propertyOfValue (key, value) {
|
||||
if (!value && value!== 0) {
|
||||
if (!value && value !== 0) {
|
||||
return null
|
||||
}
|
||||
for (const i in this) {
|
||||
const e = this[i]
|
||||
if (e[key] !== undefined && e[key] !== null) {
|
||||
if (e[key] !== undefined && e[key] !== null && e.value.toString() === value.toString()) {
|
||||
return e[key]
|
||||
}
|
||||
}
|
||||
@@ -123,14 +123,14 @@ export default class EsEnum {
|
||||
/**
|
||||
* 根据value获取key
|
||||
*/
|
||||
keyOfValue(value) {
|
||||
if (!value && value!== 0) {
|
||||
keyOfValue (value) {
|
||||
if (!value && value !== 0) {
|
||||
return null
|
||||
}
|
||||
for (const i in this){
|
||||
for (const i in this) {
|
||||
const e = this[i]
|
||||
if (e.value !== undefined && e.value !== null && e.value.toString() === value.toString()) {
|
||||
return i
|
||||
return i
|
||||
}
|
||||
}
|
||||
return null
|
||||
|
||||
@@ -212,8 +212,8 @@ export const IsReadOnlyEnums = {
|
||||
|
||||
// 标准法规入库/变更流程
|
||||
export const FGEntryChangeProcessNode = new EsEnums({
|
||||
initiate: { text: '填写法规信息', value: '填写法规信息', btn: ['save', 'submit'], disabled: false },
|
||||
approve: { text: '审批', value: '审批', btn: ['return', 'save', 'agree', 'reject'], disabled: true }
|
||||
initiate: { text: '法规工程师发起', value: 'Activity_16zkjpn', btn: ['save', 'submit'], disabled: false },
|
||||
approve: { text: '法规工程师主管级领导审批', value: 'Activity_084um6e', btn: ['return', 'save', 'agree', 'reject'], disabled: true }
|
||||
})
|
||||
|
||||
// 标准征求意见流程
|
||||
|
||||
@@ -163,7 +163,8 @@ export default {
|
||||
query: {
|
||||
taskName: record.taskName,
|
||||
taskId: record.taskId, // 任务id
|
||||
processInstanceId: record.processInstanceId // 流程实例id,必须传人员信息右侧表格查询需要用
|
||||
processInstanceId: record.processInstanceId, // 流程实例id,必须传人员信息右侧表格查询需要用
|
||||
nodeId: record.nodeId // 节点的id
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -502,7 +502,11 @@ export default {
|
||||
// 处理业务基本信息部分的数据
|
||||
const formList = Object.values(this.formList).reduce((acc, cur) => acc.concat(cur), [])
|
||||
this.formInline = Object.assign({ ...this.formInline }, { ...businessData })
|
||||
this.formInline.standard_number_temp = this.formInline.standard_number
|
||||
const nodeId = this.$route.query.nodeId
|
||||
// 如果是审批节点或者是入库流程的变更节点,处理回显的标准号
|
||||
if (nodeId === FGEntryChangeProcessNode.approve.value || (nodeId === FGEntryChangeProcessNode.initiate.value && this.formInline.operateType === OperationType.CHANGE.value)) {
|
||||
this.formInline.standard_number_temp = this.formInline.standard_number
|
||||
}
|
||||
const treeMultipleField = formList.filter(tt => tt.fieldShowType === FieldType.TREE.value)
|
||||
treeMultipleField.forEach(field => {
|
||||
const valueArr = []
|
||||
@@ -524,13 +528,13 @@ export default {
|
||||
})
|
||||
})
|
||||
// 获取按钮清单
|
||||
const btnList = FGEntryChangeProcessNode.propertyOfValue('btn', this.$route.query.taskName)
|
||||
const btnList = FGEntryChangeProcessNode.propertyOfValue('btn', this.$route.query.nodeId)
|
||||
if (btnList && btnList.length > 0) {
|
||||
this.btnList = btnList
|
||||
} else {
|
||||
this.btnList = FGEntryChangeProcessNode.approve.btn
|
||||
}
|
||||
this.disabled = FGEntryChangeProcessNode.propertyOfValue('disabled', this.$route.query.taskName) || false
|
||||
this.disabled = FGEntryChangeProcessNode.propertyOfValue('disabled', this.$route.query.nodeId) || false
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
this.loading = false
|
||||
|
||||
Reference in New Issue
Block a user