Просмотр исходного кода

加入修改流程时间,修改报表(暂时不发)。

shenqilong 1 год назад
Родитель
Сommit
e7e03f1b23

+ 66 - 49
src/api/platform/bpmn/bpmInstHis.js

@@ -1,92 +1,109 @@
 import request from '@/utils/request'
-import { BPMN_URL } from '@/api/baseUrl'
+import { BPMN_URL, PLATFORM_URL } from '@/api/baseUrl'
 /**
  * 查询列表数据
  * @param {*} params
  */
-export function queryPageList(params) {
-  return request({
-    url: BPMN_URL() + '/bpm/instance/history/query',
-    method: 'post',
-    data: params
-  })
+export function queryPageList (params) {
+    return request({
+        url: BPMN_URL() + '/bpm/instance/history/query',
+        method: 'post',
+        data: params
+    })
 }
 /**
  * 查询列表数据过滤不归档流程
  * @param {*} params
  */
- export function queryClassify(params) {
+export function queryClassify (params) {
     return request({
-      url: BPMN_URL() + '/bpm/instance/history/queryClassify',
-      method: 'post',
-      data: params
+        url: BPMN_URL() + '/bpm/instance/history/queryClassify',
+        method: 'post',
+        data: params
     })
-  }
+}
 /**
  * 获取流程实例信息
  * @param {*} params
  */
-export function get(params) {
-  return request({
-    url: BPMN_URL() + '/bpm/instance/history/get',
-    method: 'get',
-    params: params
-  })
+export function get (params) {
+    return request({
+        url: BPMN_URL() + '/bpm/instance/history/get',
+        method: 'get',
+        params: params
+    })
 }
 /**
  * 流程图
  * @param {*} params
  */
-export function flowImage(params) {
-  return request({
-    url: BPMN_URL() + '/bpm/instance/history/flowImage',
-    method: 'get',
-    params: params
-  })
+export function flowImage (params) {
+    return request({
+        url: BPMN_URL() + '/bpm/instance/history/flowImage',
+        method: 'get',
+        params: params
+    })
 }
 /**
  * 审批历史
  * @param {*} params
  */
-export function flowHistory(params) {
-  return request({
-    url: BPMN_URL() + '/bpm/instance/history/flowHistory',
-    method: 'get',
-    params: params
-  })
+export function flowHistory (params) {
+    return request({
+        url: BPMN_URL() + '/bpm/instance/history/flowHistory',
+        method: 'get',
+        params: params
+    })
 }
 /**
  * 审批历史
  * @param {*} params
  */
-export function instFormInfo(params) {
-  return request({
-    url: BPMN_URL() + '/bpm/bpmInst/instFormInfo',
-    method: 'get',
-    params: params
-  })
+export function instFormInfo (params) {
+    return request({
+        url: BPMN_URL() + '/bpm/bpmInst/instFormInfo',
+        method: 'get',
+        params: params
+    })
 }
 /**
  * 删除数据
  * @param {*} params
  */
-export function remove(params) {
-  return request({
-    url: BPMN_URL() + '/bpm/instance/history/remove',
-    method: 'post',
-    isLoading: true,
-    params: params
-  })
+export function remove (params) {
+    return request({
+        url: BPMN_URL() + '/bpm/instance/history/remove',
+        method: 'post',
+        isLoading: true,
+        params: params
+    })
 }
 
 /**
  * 正常审批通过并通过流程key、发起人过滤,排序-结束时间降序
  * @param {*} params
  */
-export function normalPassJson(params) {
-  return request({
-    url: BPMN_URL() + '/bpm/instance/history/normalPassJson',
-    method: 'post',
-    data: params
-  })
+export function normalPassJson (params) {
+    return request({
+        url: BPMN_URL() + '/bpm/instance/history/normalPassJson',
+        method: 'post',
+        data: params
+    })
+}
+
+export function changeCompleteTime (params) {
+    return request({
+        url: '/platform/v3/platform/patch/changeCompleteTime',
+        // url: 'http://192.168.2.9:5100/ibps/platform/v3/platform/patch/changeCompleteTime',
+        method: 'post',
+        data: params
+    })
+}
+export function replenishSnapshot (params) {
+    return request({
+        url: '/platform/v3/platform/patch/replenishSnapshot',
+        // url: 'http://192.168.2.9:5100/ibps/platform/v3/platform/patch/changeCompleteTime',
+        method: 'post',
+        data: params
+    })
 }

+ 83 - 0
src/business/platform/bpmn/form/action.js

@@ -1,6 +1,8 @@
 import { doEndProcess, doAddSignTask, lock, unlock, suspendProcess, recoverProcess } from '@/api/platform/bpmn/bpmTask'
 import { agree, oppose, abandon, reject, rejectToStarter, rejectToPrevious, bpmTaskSave } from '@/api/platform/bpmn/bpmTask'
 import { startFlow, saveDraft } from '@/api/platform/bpmn/bpmInst'
+import { saveFormData } from '@/api/platform/data/dataTemplate'
+import { changeCompleteTime, replenishSnapshot } from '@/api/platform/bpmn/bpmInstHis'
 import Print from '@/utils/print'
 
 export default {
@@ -146,6 +148,10 @@ export default {
                 case 'save':// 节点按钮设置-保存
                     // this.setData('已暂存')
                     this.handleSave()
+                    break
+                case 'timeModification':// 节点按钮设置-修改时间
+                    this.handleTimeModification()
+
                     break
                 default:
                     break
@@ -740,6 +746,83 @@ export default {
                 }]
             }
             this.$common.request('update', params)
+        },
+        // 修改流程时间
+
+        async handleTimeModification () {
+            // 表单参数
+            const { code = '', name = '' } = this.getFormEL().formDefData || {}
+            const jsonData = {
+                boCode: code,
+                version: 0,
+                formKey: this.dataResultitem.formKey,
+                pk: this.dataResultitem.bizKey,
+                data: JSON.stringify(this.$common.replaceNullWithEmpty(this.getFormData()))
+            }
+            // 流程参数
+            const defData = this.formParams.formOpinionData.opinionList
+            // 快照参数
+
+            const snapshot = { id: this.instanceId_ }
+
+            // console.log(JSON.stringify(this.$common.replaceNullWithEmpty(this.formDataBF)), JSON.stringify(this.$common.replaceNullWithEmpty(this.getFormData())))
+            // console.log(this.formDataBF)
+            if (this.timeModification_) {
+                if (JSON.stringify(this.$common.replaceNullWithEmpty(this.formDataBF)) === JSON.stringify(this.$common.replaceNullWithEmpty(this.getFormData()))) {
+                    // console.log('aa')
+                    if (JSON.stringify(defData) === JSON.stringify(this.opinionListBF)) {
+                        // console.log('aa')
+                    } else {
+                        await this.timeModify(defData)
+                    }
+                } else {
+                    if (JSON.stringify(defData) === JSON.stringify(this.opinionListBF)) {
+                        await this.saveData(jsonData, false, defData, snapshot)
+                    } else {
+                        await this.saveData(jsonData, true, defData, snapshot)
+                    }
+                }
+                this.timeModification_ = false
+            } else {
+                this.timeModification_ = true
+            }
+        },
+        // 保存流程数据生成快照
+        async timeModify (data) {
+            await changeCompleteTime(data).then(response => {
+                if (response.state === 200) {
+                    this.$message.success('修改成功!')
+                    this.callbackPage()
+                } else {
+                    this.$message.error(response.message)
+                }
+            }).catch(() => {
+            })
+        },
+        // 保存表单数据生成快照
+        async saveData (data, sflc, defData, snapshot) {
+            await saveFormData(data).then(response => {
+                if (sflc) {
+                    this.timeModify(defData)
+                } else {
+                    this.repleceSnapshot(snapshot)
+                }
+            }).catch(() => {
+            })
+        },
+
+        // 生成快照
+        async repleceSnapshot (data) {
+            await replenishSnapshot(data).then(response => {
+                if (response.state === 200) {
+                    this.$message.success('生成快照成功!')
+                    this.callbackPage()
+                } else {
+                    this.$message.error(response.message)
+                }
+            }).catch(() => {
+            })
         }
+
     }
 }

+ 233 - 220
src/business/platform/bpmn/form/button.js

@@ -2,53 +2,53 @@ import { upperFirst } from 'lodash'
 import FormrenderResponseButton from '@/business/platform/form/formrender/button'
 
 var BpmnButton
-window.BpmnButton = BpmnButton = function(options) {
-  this.response_buttons = []
-  this.initButtons(options)
+window.BpmnButton = BpmnButton = function (options) {
+    this.response_buttons = []
+    this.initButtons(options)
 }
 
 BpmnButton.prototype = {
-  initButtons: function({ buttons, params = {}}) {
-    const suspendState = params.suspendState
-    for (var i = 0; i < buttons.length; i++) {
-      const rf = buttons[i]
-      const buttonType = rf.button_type = rf[BpmnButton.key.BUTTON_TYPE]
-      rf.alias = rf[BpmnButton.key.BUTTON_ALIAS]
-      rf.label = rf[BpmnButton.key.LABEL]
+    initButtons: function ({ buttons, params = {}}) {
+        const suspendState = params.suspendState
+        for (var i = 0; i < buttons.length; i++) {
+            const rf = buttons[i]
+            const buttonType = rf.button_type = rf[BpmnButton.key.BUTTON_TYPE]
+            rf.alias = rf[BpmnButton.key.BUTTON_ALIAS]
+            rf.label = rf[BpmnButton.key.LABEL]
 
-      if ((buttonType === 'suspendProcess' && suspendState === '2') || // 挂起
-      (buttonType === 'recoverProcess' && suspendState === '1')) { // 恢复
-        continue
-      }
-      if (
-        buttonType === 'startCommu' || // 屏蔽-沟通
-        buttonType === 'commu' || // 屏蔽-沟通
-        buttonType === 'startTrans' || // 屏蔽-流转
-        buttonType === 'agreeTrans' || // 屏蔽-同意流转
-        buttonType === 'opposeTrans') { // 屏蔽-反对流转
-        continue
-      }
+            if ((buttonType === 'suspendProcess' && suspendState === '2') || // 挂起
+                (buttonType === 'recoverProcess' && suspendState === '1')) { // 恢复
+                continue
+            }
+            if (
+                buttonType === 'startCommu' || // 屏蔽-沟通
+                buttonType === 'commu' || // 屏蔽-沟通
+                buttonType === 'startTrans' || // 屏蔽-流转
+                buttonType === 'agreeTrans' || // 屏蔽-同意流转
+                buttonType === 'opposeTrans') { // 屏蔽-反对流转
+                continue
+            }
 
-      let button = null
-      try {
-        button = new BpmnButton.Models['ResponseButton' + (upperFirst(buttonType))](rf, params)
-      } catch (error) {
-        console.error(error)
-        button = new BpmnButton.Models['ResponseButtonCustom'](rf, params)
-      }
+            let button = null
+            try {
+                button = new BpmnButton.Models['ResponseButton' + (upperFirst(buttonType))](rf, params)
+            } catch (error) {
+                console.error(error)
+                button = new BpmnButton.Models['ResponseButtonCustom'](rf, params)
+            }
 
-      // 初始化按钮事件
-      this.response_buttons.push(button)
+            // 初始化按钮事件
+            this.response_buttons.push(button)
+        }
     }
-  }
 }
 
 BpmnButton.Models = {}
-BpmnButton.BUTTON_TYPES = ['close', 'startFlow', 'lock', 'unlock', 'forceUnlock', 'agree', 'oppose', 'abandon', 'saveDraft', 'reject', 'endProcess', 'delegate', 'addSign', 'startCommu', 'commu', 'startTrans', 'flowImage', 'approvalHistory', 'opposeTrans', 'agreeTrans', 'suspendProcess', 'recoverProcess', 'print', 'rejectToStart', 'revoke', 'save', 'custom']
+BpmnButton.BUTTON_TYPES = ['close', 'startFlow', 'lock', 'unlock', 'forceUnlock', 'agree', 'oppose', 'abandon', 'saveDraft', 'reject', 'endProcess', 'delegate', 'addSign', 'startCommu', 'commu', 'startTrans', 'flowImage', 'timeModification', 'timeModificationNo', 'approvalHistory', 'opposeTrans', 'agreeTrans', 'suspendProcess', 'recoverProcess', 'print', 'rejectToStart', 'revoke', 'save', 'custom']
 BpmnButton.key = {
-  BUTTON_ALIAS: 'key',
-  BUTTON_TYPE: 'alias',
-  LABEL: 'name'
+    BUTTON_ALIAS: 'key',
+    BUTTON_TYPE: 'alias',
+    LABEL: 'name'
 }
 
 BpmnButton.VERSION = '3.0.0'
@@ -57,297 +57,310 @@ BpmnButton.VERSION = '3.0.0'
  * 流程表单按钮
  */
 BpmnButton.Models.ResponseButton = FormrenderResponseButton.extend({
-  style: 'primary',
-  plain: true,
-  aliasKey: BpmnButton.key.BUTTON_ALIAS
+    style: 'primary',
+    plain: true,
+    aliasKey: BpmnButton.key.BUTTON_ALIAS
 })
 
 // 关闭
 BpmnButton.Models.ResponseButtonClose = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-icon-close',
-  style: 'default',
-  action(btn) {
-    this.handleActionEvent(btn.getAlias(), btn)
-  }
+    icon: 'ibps-icon-close',
+    style: 'default',
+    action (btn) {
+        this.handleActionEvent(btn.getAlias(), btn)
+    }
 })
 
 /**
  * 启动流程
  */
 BpmnButton.Models.ResponseButtonStartFlow = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-icon-send',
-  action(btn) {
-    // 验证表单是否正确
-    this.validate(valid => {
-      if (valid) {
-      // 表单提交校验
-        this.formSubmitVerify((result, errorMsg) => {
-          if (!result) {
-            this.$message.closeAll()
-            return this.$message.warning(errorMsg)
-          }
-          // 保存数据
-          this.handleActionEvent(btn.getAlias(), btn)
+    icon: 'ibps-icon-send',
+    action (btn) {
+        // 验证表单是否正确
+        this.validate(valid => {
+            if (valid) {
+                // 表单提交校验
+                this.formSubmitVerify((result, errorMsg) => {
+                    if (!result) {
+                        this.$message.closeAll()
+                        return this.$message.warning(errorMsg)
+                    }
+                    // 保存数据
+                    this.handleActionEvent(btn.getAlias(), btn)
+                })
+            } else {
+                this.formErrorToast()
+            }
         })
-      } else {
-        this.formErrorToast()
-      }
-    })
-  }
+    }
 
 })
 // 保存草稿
 BpmnButton.Models.ResponseButtonSaveDraft = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-icon-save',
-  action(btn) {
-    this.handleActionEvent(btn.getAlias(), btn)
-  }
+    icon: 'ibps-icon-save',
+    action (btn) {
+        this.handleActionEvent(btn.getAlias(), btn)
+    }
 })
 
 // 锁定
 BpmnButton.Models.ResponseButtonLock = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-icon-lock',
-  action(btn) {
-    this.handleActionEvent(btn.getAlias(), btn)
-  }
+    icon: 'ibps-icon-lock',
+    action (btn) {
+        this.handleActionEvent(btn.getAlias(), btn)
+    }
 })
 
 // 解锁
 BpmnButton.Models.ResponseButtonUnlock = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-icon-unlock-alt',
-  action(btn) {
-    this.handleActionEvent(btn.getAlias(), btn)
-  }
+    icon: 'ibps-icon-unlock-alt',
+    action (btn) {
+        this.handleActionEvent(btn.getAlias(), btn)
+    }
 })
 // 强制解锁
 BpmnButton.Models.ResponseButtonForceUnlock = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-icon-unlock',
-  action(btn) {
-    this.handleActionEvent(btn.getAlias(), btn)
-  }
+    icon: 'ibps-icon-unlock',
+    action (btn) {
+        this.handleActionEvent(btn.getAlias(), btn)
+    }
 })
 
 // 同意
 BpmnButton.Models.ResponseButtonAgree = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-icon-check-square-o',
-  action(btn) {
-    // 验证表单是否正确
-    this.validate(valid => {
-      if (valid) {
-        // 表单提交校验
-        this.formSubmitVerify((result, errorMsg) => {
-          if (!result) {
-            this.$message.closeAll()
-            return this.$message.warning(errorMsg)
-          }
-          // 保存数据
-          this.handleActionEvent(btn.getAlias(), btn)
+    icon: 'ibps-icon-check-square-o',
+    action (btn) {
+        // 验证表单是否正确
+        this.validate(valid => {
+            if (valid) {
+                // 表单提交校验
+                this.formSubmitVerify((result, errorMsg) => {
+                    if (!result) {
+                        this.$message.closeAll()
+                        return this.$message.warning(errorMsg)
+                    }
+                    // 保存数据
+                    this.handleActionEvent(btn.getAlias(), btn)
+                })
+            } else {
+                this.formErrorToast()
+            }
         })
-      } else {
-        this.formErrorToast()
-      }
-    })
-  }
+    }
 })
 
 // 反对
 BpmnButton.Models.ResponseButtonOppose = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-icon-close',
-  action(btn) {
-    this.formOpinionValidate((valid) => {
-      if (valid) {
-        this.handleActionEvent(btn.getAlias(), btn)
-      } else {
-        this.formErrorToast('请填写审批意见!')
-      }
-    })
-  }
+    icon: 'ibps-icon-close',
+    action (btn) {
+        this.formOpinionValidate((valid) => {
+            if (valid) {
+                this.handleActionEvent(btn.getAlias(), btn)
+            } else {
+                this.formErrorToast('请填写审批意见!')
+            }
+        })
+    }
 })
 
 // 弃权
 BpmnButton.Models.ResponseButtonAbandon = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-icon-hand-o-up',
-  action(btn) {
-    this.formOpinionValidate((valid) => {
-      if (valid) {
-        this.handleActionEvent(btn.getAlias(), btn)
-      } else {
-        this.formErrorToast('请填写审批意见!')
-      }
-    })
-  }
+    icon: 'ibps-icon-hand-o-up',
+    action (btn) {
+        this.formOpinionValidate((valid) => {
+            if (valid) {
+                this.handleActionEvent(btn.getAlias(), btn)
+            } else {
+                this.formErrorToast('请填写审批意见!')
+            }
+        })
+    }
 })
 // 驳回
 BpmnButton.Models.ResponseButtonReject = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-icon-lastfm',
-  action(btn) {
-    this.formOpinionValidate((valid) => {
-      if (valid) {
-        this.handleActionEvent(btn.getAlias(), btn)
-      } else {
-        this.formErrorToast('请填写审批意见!')
-      }
-    }, true)
-  }
+    icon: 'ibps-icon-lastfm',
+    action (btn) {
+        this.formOpinionValidate((valid) => {
+            if (valid) {
+                this.handleActionEvent(btn.getAlias(), btn)
+            } else {
+                this.formErrorToast('请填写审批意见!')
+            }
+        }, true)
+    }
 })
 // 驳回发起人
 BpmnButton.Models.ResponseButtonRejectToStart = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-icon-send',
-  action(btn) {
-    this.formOpinionValidate((valid) => {
-      if (valid) {
-        this.handleActionEvent(btn.getAlias(), btn)
-      } else {
-        this.formErrorToast('请填写审批意见!')
-      }
-    }, true)
-  }
+    icon: 'ibps-icon-send',
+    action (btn) {
+        this.formOpinionValidate((valid) => {
+            if (valid) {
+                this.handleActionEvent(btn.getAlias(), btn)
+            } else {
+                this.formErrorToast('请填写审批意见!')
+            }
+        }, true)
+    }
 })
 // 驳回上一步
 BpmnButton.Models.ResponseButtonRejectToPrevious = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-icon-backward',
-  action(btn) {
-    this.formOpinionValidate((valid) => {
-      if (valid) {
-        this.handleActionEvent(btn.getAlias(), btn)
-      } else {
-        this.formErrorToast('请填写审批意见!')
-      }
-    }, true)
-  }
+    icon: 'ibps-icon-backward',
+    action (btn) {
+        this.formOpinionValidate((valid) => {
+            if (valid) {
+                this.handleActionEvent(btn.getAlias(), btn)
+            } else {
+                this.formErrorToast('请填写审批意见!')
+            }
+        }, true)
+    }
 })
 // 终止流程
 BpmnButton.Models.ResponseButtonEndProcess = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-icon-ioxhost',
-  action(btn) {
-    this.handleActionEvent(btn.getAlias(), btn)
-  }
+    icon: 'ibps-icon-ioxhost',
+    action (btn) {
+        this.handleActionEvent(btn.getAlias(), btn)
+    }
 })
 // 转办
 BpmnButton.Models.ResponseButtonDelegate = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-icon-share',
-  action(btn) {
-    this.handleActionEvent(btn.getAlias(), btn)
-  }
+    icon: 'ibps-icon-share',
+    action (btn) {
+        this.handleActionEvent(btn.getAlias(), btn)
+    }
 })
 
 // 补签
 BpmnButton.Models.ResponseButtonAddSign = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-icon-group',
-  action(btn) {
-    this.handleActionEvent(btn.getAlias(), btn)
-  }
+    icon: 'ibps-icon-group',
+    action (btn) {
+        this.handleActionEvent(btn.getAlias(), btn)
+    }
 })
 
 // 开始沟通
 BpmnButton.Models.ResponseButtonStartCommu = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-icon-comment-o',
-  action(btn) {
-    this.handleActionEvent(btn.getAlias(), btn)
-  }
+    icon: 'ibps-icon-comment-o',
+    action (btn) {
+        this.handleActionEvent(btn.getAlias(), btn)
+    }
 })
 // 开始流转
 BpmnButton.Models.ResponseButtonStartTrans = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-icon-ioxhost',
-  action(btn) {
-    this.handleActionEvent(btn.getAlias(), btn)
-  }
+    icon: 'ibps-icon-ioxhost',
+    action (btn) {
+        this.handleActionEvent(btn.getAlias(), btn)
+    }
 })
 // 沟通
 BpmnButton.Models.ResponseButtonCommu = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-comment-o',
-  action(btn) {
-    this.handleActionEvent(btn.getAlias(), btn)
-  }
+    icon: 'ibps-comment-o',
+    action (btn) {
+        this.handleActionEvent(btn.getAlias(), btn)
+    }
 })
 // 流程图
 BpmnButton.Models.ResponseButtonFlowImage = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-icon-image',
-  action(btn) {
-    this.handleActionEvent(btn.getAlias(), btn)
-  }
+    icon: 'ibps-icon-image',
+    action (btn) {
+        this.handleActionEvent(btn.getAlias(), btn)
+    }
 })
 // 审批历史
 BpmnButton.Models.ResponseButtonApprovalHistory = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-icon-bars',
-  action(btn) {
-    this.handleActionEvent(btn.getAlias(), btn)
-  }
+    icon: 'ibps-icon-bars',
+    action (btn) {
+        this.handleActionEvent(btn.getAlias(), btn)
+    }
 })
 // 反对流转
 BpmnButton.Models.ResponseButtonOpposeTrans = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-icon-ioxhost',
-  action(btn) {
-    this.handleActionEvent(btn.getAlias(), btn)
-  }
+    icon: 'ibps-icon-ioxhost',
+    action (btn) {
+        this.handleActionEvent(btn.getAlias(), btn)
+    }
 })
 
 // 同意流转
 BpmnButton.Models.ResponseButtonAgreeTrans = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-icon-ioxhost',
-  action(btn) {
-    this.handleActionEvent(btn.getAlias(), btn)
-  }
+    icon: 'ibps-icon-ioxhost',
+    action (btn) {
+        this.handleActionEvent(btn.getAlias(), btn)
+    }
 })
 
 // 挂起
 BpmnButton.Models.ResponseButtonSuspendProcess = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-icon-ioxhost',
-  action(btn) {
-    this.handleActionEvent(btn.getAlias(), btn)
-  }
+    icon: 'ibps-icon-ioxhost',
+    action (btn) {
+        this.handleActionEvent(btn.getAlias(), btn)
+    }
 })
 // 恢复
 BpmnButton.Models.ResponseButtonRecoverProcess = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-icon-ioxhost',
-  action(btn) {
-    this.handleActionEvent(btn.getAlias(), btn)
-  }
+    icon: 'ibps-icon-ioxhost',
+    action (btn) {
+        this.handleActionEvent(btn.getAlias(), btn)
+    }
 })
 // 打印
 BpmnButton.Models.ResponseButtonPrint = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-icon-print',
-  action(btn) {
-    this.handleActionEvent(btn.getAlias(), btn)
-  }
+    icon: 'ibps-icon-print',
+    action (btn) {
+        this.handleActionEvent(btn.getAlias(), btn)
+    }
 })
 // 撤销
 BpmnButton.Models.ResponseButtonRevoke = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-icon-lock',
-  action(btn) {
-    this.handleActionEvent(btn.getAlias(), btn)
-  }
+    icon: 'ibps-icon-lock',
+    action (btn) {
+        this.handleActionEvent(btn.getAlias(), btn)
+    }
 })
 
 // 流程实例明细
 BpmnButton.Models.ResponseButtonInstanceDetail = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-icon-detail',
-  action: function(btn) {
-    this.handleActionEvent(btn.getAlias(), btn)
-  }
+    icon: 'ibps-icon-detail',
+    action: function (btn) {
+        this.handleActionEvent(btn.getAlias(), btn)
+    }
 })
 // 流程代理、转办明细
 BpmnButton.Models.ResponseButtonDelegateDetail = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-icon-detail',
-  action: function(btn) {
-    this.handleActionEvent(btn.getAlias(), btn)
-  }
+    icon: 'ibps-icon-detail',
+    action: function (btn) {
+        this.handleActionEvent(btn.getAlias(), btn)
+    }
 })
 
-// 流程保存
+// 流程修改保存
 BpmnButton.Models.ResponseButtonSave = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-icon-save',
-  action: function(btn) {
-    this.handleActionEvent(btn.getAlias(), btn)
-  }
+    icon: 'ibps-icon-edit',
+    action: function (btn) {
+        this.handleActionEvent(btn.getAlias(), btn)
+    }
+})
+// 流程实例修改
+BpmnButton.Models.ResponseButtonTimeModification = BpmnButton.Models.ResponseButton.extend({
+    icon: 'ibps-icon-lock',
+    action: function (btn) {
+        this.handleActionEvent(btn.getAlias(), btn)
+    }
+})
+// 流程实例修改取消
+BpmnButton.Models.ResponseButtonTimeModificationNo = BpmnButton.Models.ResponseButton.extend({
+    icon: 'ibps-icon-lock',
+    action: function (btn) {
+        this.handleActionEvent(btn.getAlias(), btn)
+    }
 })
-
 // 自定义
 BpmnButton.Models.ResponseButtonCustom = BpmnButton.Models.ResponseButton.extend({
-  icon: 'ibps-icon-cog',
-  action(btn) {
-    this.handleActionEvent(btn.getAlias(), btn)
-  }
+    icon: 'ibps-icon-cog',
+    action (btn) {
+        this.handleActionEvent(btn.getAlias(), btn)
+    }
 })
 
 export default BpmnButton

+ 15 - 0
src/business/platform/bpmn/form/dialog.vue

@@ -18,6 +18,9 @@
             :task-id="taskId"
             :wai-jian="waiJian"
             :instance-id="instanceId"
+            :data-resultitem="dataResultitem"
+            :time-modification="timeModification"
+            :time-modificationbtn="timeModificationbtn"
             :task-change-id="taskChangeId"
             :copy-flow="copyFlow"
             :add-data-cont="addDataCont"
@@ -46,6 +49,18 @@ export default {
         instanceId: { // 流程实例ID
             type: String
         },
+        dataResultitem: { // 流程实例
+            type: Object
+        },
+        timeModification: { // 修改流程时间
+            type: Boolean,
+            default: false
+        },
+        // 修改流程时间按钮
+        timeModificationbtn: {
+            type: Boolean,
+            default: false
+        },
         taskId: { // 流程任务ID
             type: String
         },

+ 550 - 494
src/business/platform/bpmn/form/index.vue

@@ -9,6 +9,7 @@
                 :data="formData"
                 :params="formParams"
                 :readonly="readonly"
+                :time-modification="timeModification_"
                 @action-event="(actionKey, args) => emitEventHandler(actionKey, args)"
                 @callback="callbackPage"
                 @close="closeDialog"
@@ -142,553 +143,608 @@
     </div>
 </template>
 <script>
-    import { getFormData, getInstFormData } from '@/api/platform/bpmn/bpmInst'
-    import { getTaskFormData } from '@/api/platform/bpmn/bpmTask'
+import { getFormData, getInstFormData } from '@/api/platform/bpmn/bpmInst'
+import { getTaskFormData } from '@/api/platform/bpmn/bpmTask'
 
-    import FormUtil from '@/business/platform/form/utils/formUtil'
-    import FormFieldUtil from '@/business/platform/form/utils/formFieldUtil'
-    import ActionMixin from './action'
-    import BpmnButton from './button'
+import FormUtil from '@/business/platform/form/utils/formUtil'
+import FormFieldUtil from '@/business/platform/form/utils/formFieldUtil'
+import ActionMixin from './action'
+import BpmnButton from './button'
 
-    import Formrender from '@/business/platform/form/formrender/index.vue'
-    import FormToolbar from '@/business/platform/form/formrender/toolbar.vue'
+import Formrender from '@/business/platform/form/formrender/index.vue'
+import FormToolbar from '@/business/platform/form/formrender/toolbar.vue'
 
-    import FlowDiagramDialog from '@/business/platform/bpmn/components/flow-diagram/dialog'
-    import ApprovalHistoryDialog from '@/business/platform/bpmn/components/approval-history/dialog'
-    import InstanceDetail from '@/views/platform/bpmn/bpmInst/detail'
+import FlowDiagramDialog from '@/business/platform/bpmn/components/flow-diagram/dialog'
+import ApprovalHistoryDialog from '@/business/platform/bpmn/components/approval-history/dialog'
+import InstanceDetail from '@/views/platform/bpmn/bpmInst/detail'
 
-    import StartFlowDialog from '@/business/platform/bpmn/form-ext/start-flow'
-    import AgreeDialog from '@/business/platform/bpmn/form-ext/agree'
-    import RejectDialog from '@/business/platform/bpmn/form-ext/reject'
-    import ApproveDialog from '@/business/platform/bpmn/form-ext/approve'
-    import DelegateDialog from '@/business/platform/bpmn/task-change/edit'
-    import AddSignTaskDialog from '@/business/platform/bpmn/form-ext/add-sign-task'
+import StartFlowDialog from '@/business/platform/bpmn/form-ext/start-flow'
+import AgreeDialog from '@/business/platform/bpmn/form-ext/agree'
+import RejectDialog from '@/business/platform/bpmn/form-ext/reject'
+import ApproveDialog from '@/business/platform/bpmn/form-ext/approve'
+import DelegateDialog from '@/business/platform/bpmn/task-change/edit'
+import AddSignTaskDialog from '@/business/platform/bpmn/form-ext/add-sign-task'
 
-    import FormPrintTemplate from '@/business/platform/form/form-print/template'
+import FormPrintTemplate from '@/business/platform/form/form-print/template'
 
-    const _import = require('@/utils/util.import.' + process.env.NODE_ENV)
+const _import = require('@/utils/util.import.' + process.env.NODE_ENV)
 
-    export default {
-        components: {
-            Formrender,
-            FormToolbar,
-            FlowDiagramDialog,
-            ApprovalHistoryDialog,
-            InstanceDetail,
-            StartFlowDialog,
-            AgreeDialog,
-            RejectDialog,
-            ApproveDialog,
-            DelegateDialog,
-            AddSignTaskDialog,
-            FormPrintTemplate
-        },
-        mixins: [ActionMixin],
-        props: {
-            // 流程定义ID
-            defId: {
-                type: String
-            },
-            // 草稿流程实例ID
-            proInstId: {
-                type: String
-            },
-            // 流程实例ID
-            instanceId: {
-                type: String
-            },
-            // 流程任务ID
-            taskId: {
-                type: String
-            },
-            // 转办代理任务ID
-            taskChangeId: {
-                type: String
-            },
-            // waiJianID
-            waiJian: {
-                type: String
-            },
-            // 新增参数
-            addDataCont: {
-                type: Object
-            },
-            // 是否复制流程
-            copyFlow: {
-                type: Boolean,
-                default: false
+export default {
+    components: {
+        Formrender,
+        FormToolbar,
+        FlowDiagramDialog,
+        ApprovalHistoryDialog,
+        InstanceDetail,
+        StartFlowDialog,
+        AgreeDialog,
+        RejectDialog,
+        ApproveDialog,
+        DelegateDialog,
+        AddSignTaskDialog,
+        FormPrintTemplate
+    },
+    mixins: [ActionMixin],
+    props: {
+        // 流程定义ID
+        defId: {
+            type: String
+        },
+        // 草稿流程实例ID
+        proInstId: {
+            type: String
+        },
+        // 流程实例ID
+        instanceId: {
+            type: String
+        },
+        // 流程实例
+        dataResultitem: {
+            type: Object
+        },
+        // 修改流程时间
+        timeModification: {
+            type: Boolean,
+            default: false
+        },
+        // 修改流程时间按钮
+        timeModificationbtn: {
+            type: Boolean,
+            default: false
+        },
+        // 流程任务ID
+        taskId: {
+            type: String
+        },
+        // 转办代理任务ID
+        taskChangeId: {
+            type: String
+        },
+        // waiJianID
+        waiJian: {
+            type: String
+        },
+        // 新增参数
+        addDataCont: {
+            type: Object
+        },
+        // 是否复制流程
+        copyFlow: {
+            type: Boolean,
+            default: false
+        },
+        flowName: {
+            type: String
+        },
+        closeable: {
+            type: Boolean,
+            default: true
+        }
+    },
+    data () {
+        return {
+            flowDiagramVisible: false,
+            approvalHistoryVisible: false,
+            instanceDetailVisible: false,
+            startFlowDialogVisible: false,
+            agreeDialogVisible: false, // 同意
+            rejectDialogVisible: false,
+            delegateDialogVisible: false,
+            addSignTaskDialogVisible: false,
+            approveDialogVisible: false,
+            delegateReadonly: false,
+
+            endProcessTaskId: '',
+            actionName: '',
+            actionTitle: '',
+            version: '',
+            // 表单数据
+            loading: false,
+            formUrlName: '',
+            // 内嵌url方式:inner: vue组件方式,iframe:iframe方式
+            formUrlType: 'inner',
+            formModel: {
+                type: 'INNER'
             },
-            flowName: {
-                type: String
+            formDef: null,
+            buttons: [],
+            formData: {},
+            // 新增扩展属性
+            attributes: {},
+            // 表单流程扩展参数
+            formParams: {},
+            isBpmOpinionHide: false,
+            readonly: false,
+            submitFormData: {},
+            submitFormOpinion: '',
+            printTemplateId: '',
+            formPrintTemplateDialogVisible: false,
+            pkValue: '',
+            timeModification_: this.timeModification,
+            timeModificationbtn_: this.timeModificationbtn,
+            dataResultitem_: this.dataResultitem,
+            instanceId_: this.instanceId,
+            responseData: {},
+            formDataBF: '',
+            opinionListBF: ''
+        }
+    },
+    watch: {
+        visible: {
+            handler: function (val, oldVal) {
+                this.dialogVisible = this.visible
             },
-            closeable: {
-                type: Boolean,
-                default: true
-            }
+            immediate: true
         },
-        data() {
-            return {
-                flowDiagramVisible: false,
-                approvalHistoryVisible: false,
-                instanceDetailVisible: false,
-                startFlowDialogVisible: false,
-                agreeDialogVisible: false, // 同意
-                rejectDialogVisible: false,
-                delegateDialogVisible: false,
-                addSignTaskDialogVisible: false,
-                approveDialogVisible: false,
-                delegateReadonly: false,
+        timeModification_: {
+            handler: function (val, oldVal) {
+                if (val) {
+                    // this.readonly = false
+                    // console.log(this.readonly)
 
-                endProcessTaskId: '',
-                actionName: '',
-                actionTitle: '',
-                version: '',
-                // 表单数据
-                loading: false,
-                formUrlName: '',
-                // 内嵌url方式:inner: vue组件方式,iframe:iframe方式
-                formUrlType: 'inner',
-                formModel: {
-                    type: 'INNER'
-                },
-                formDef: null,
-                buttons: [],
-                formData: {},
-                // 新增扩展属性
-                attributes: {},
-                // 表单流程扩展参数
-                formParams: {},
-                isBpmOpinionHide: false,
-                readonly: false,
-                submitFormData: {},
-                submitFormOpinion: '',
-                printTemplateId: '',
-                formPrintTemplateDialogVisible: false,
-                pkValue: ''
-            }
-        },
-        watch: {
-            visible: {
-                handler: function (val, oldVal) {
-                    this.dialogVisible = this.visible
-                },
-                immediate: true
+                    this.buttons = this.buildButtons(this.responseData.buttons.slice(1, 4), this.attributes) || []
+                }
             }
+
+        }
+    },
+    methods: {
+        // 获取数据
+        loadFormData () {
+            this.loading = true
+            this.formDef = null
+            this.buttons = null
+            this.formData = null
+            this.$nextTick(() => {
+                this.readonly = false
+                if (this.$utils.isNotEmpty(this.taskId)) {
+                    // 处理流程任务
+                    this.getTaskFormData()
+                } else if (this.$utils.isNotEmpty(this.defId)) {
+                    // 启动 或者草稿流程启动
+                    this.getDefinitionFormData()
+                } else if (this.$utils.isNotEmpty(this.instanceId)) {
+                    // 流程实例
+                    this.getInstanceFormData()
+                } else {
+                    this.$alert('未获取正确的参数,请检查传入参数').then(() => {
+                        this.closeDialog()
+                    })
+                    this.loading = false
+                }
+            })
         },
-        methods: {
-            // 获取数据
-            loadFormData() {
-                this.loading = true
-                this.formDef = null
-                this.buttons = null
-                this.formData = null
-                this.$nextTick(() => {
-                    this.readonly = false
-                    if (this.$utils.isNotEmpty(this.taskId)) {
-                        // 处理流程任务
-                        this.getTaskFormData()
-                    } else if (this.$utils.isNotEmpty(this.defId)) {
-                        // 启动 或者草稿流程启动
-                        this.getDefinitionFormData()
-                    } else if (this.$utils.isNotEmpty(this.instanceId)) {
-                        // 流程实例
-                        this.getInstanceFormData()
-                    } else {
-                        this.$alert('未获取正确的参数,请检查传入参数').then(() => {
-                            this.closeDialog()
-                        })
-                        this.loading = false
-                    }
-                })
-            },
 
-            /**
+        /**
              * 启动 或者草稿流程。
              */
-            getDefinitionFormData() {
-                const proInstId = this.proInstId || null
-                const copyFlow = this.copyFlow || null
-                this.formParams.defId = this.defId
-                this.formParams.proInstId = proInstId
-                this.formParams.copyFlow = copyFlow
-                this.formParams.addDataCont = this.addDataCont
+        getDefinitionFormData () {
+            const proInstId = this.proInstId || null
+            const copyFlow = this.copyFlow || null
+            this.formParams.defId = this.defId
+            this.formParams.proInstId = proInstId
+            this.formParams.copyFlow = copyFlow
+            this.formParams.addDataCont = this.addDataCont
 
-                getFormData({
-                    defId: this.defId,
-                    proInstId: proInstId,
-                    copy: copyFlow
-                }).then(response => {
-                    this.loading = false
-                    this.buildFormData(response.data)
-                }).catch(() => {
-                    this.loading = false
-                })
-            },
-            /**
+            getFormData({
+                defId: this.defId,
+                proInstId: proInstId,
+                copy: copyFlow
+            }).then(response => {
+                this.loading = false
+                this.buildFormData(response.data)
+            }).catch(() => {
+                this.loading = false
+            })
+        },
+        /**
              * 获取流程任务表单
              */
-            getTaskFormData() {
-                this.loading = true
-                this.formParams.taskId = this.taskId || null
-                this.formParams.waiJian = this.waiJian || null
-                getTaskFormData({
-                    taskId: this.taskId,
-                    waiJian: this.waiJian
-                }).then(response => {
-                    this.loading = false
-                    this.buildFormData(response.data)
-                }).catch(() => {
-                    this.loading = false
-                })
-            },
-            /**
+        getTaskFormData () {
+            this.loading = true
+            this.formParams.taskId = this.taskId || null
+            this.formParams.waiJian = this.waiJian || null
+            getTaskFormData({
+                taskId: this.taskId,
+                waiJian: this.waiJian
+            }).then(response => {
+                this.loading = false
+                this.buildFormData(response.data)
+            }).catch(() => {
+                this.loading = false
+            })
+        },
+        /**
              * 流程实例 的表单数据
              */
-            getInstanceFormData() {
-                this.readonly = true
-                this.formParams.instanceId = this.instanceId || null
-                getInstFormData({
-                    instId: this.instanceId
-                }).then(response => {
-                    this.loading = false
-                    this.buildFormData(response.data)
-                }).catch(() => {
-                    this.loading = false
-                })
-            },
-            /**
+        getInstanceFormData () {
+            this.readonly = true
+            this.formParams.instanceId = this.instanceId || null
+            getInstFormData({
+                instId: this.instanceId
+            }).then(response => {
+                this.loading = false
+                this.responseData = response.data
+                // this.buildFormData(this.responseData)
+                this.buildFormData(response.data)
+                this.instanceId_ = this.instanceId
+            }).catch(() => {
+                this.loading = false
+            })
+        },
+        /**
              * 构建表单相关数据
              */
-            buildFormData(data) {
-                if (this.$utils.isEmpty(data)) {
-                    this.$alert(`未获取到数据`).then(() => {
-                        this.closeDialog()
-                    })
-                    return
-                }
-                const formModel = data.formModel
-                this.formUrlType = 'inner'
+        buildFormData (data) {
+            if (this.$utils.isEmpty(data)) {
+                this.$alert(`未获取到数据`).then(() => {
+                    this.closeDialog()
+                })
+                return
+            }
+            const formModel = data.formModel
+            this.formUrlType = 'inner'
+
+            // 判断是否设置表单
+            if (this.$utils.isEmpty(formModel)) {
+                this.$alert(`未设置表单,请流程定义中设置表单`).then(() => {
+                    this.closeDialog()
+                })
+                return
+            }
+            this.formModel = formModel
+
+            // 数据预处理,审批意见数据添加审批人姓名
+            if (data.attributes && data.attributes.opinionList && data.attributes.opinionList.length) {
+                const { userList = [] } = this.$store.getters || {}
+                data.attributes.opinionList.forEach(item => {
+                    const userInfo = userList.find(i => i.userId === item.auditor)
+                    item.auditorName = userInfo ? userInfo.userName : null
+                })
+            }
+            // ============在线表单 ================
 
-                // 判断是否设置表单
-                if (this.$utils.isEmpty(formModel)) {
-                    this.$alert(`未设置表单,请流程定义中设置表单`).then(() => {
+            if (formModel.type === 'INNER') {
+                if (this.$utils.isEmpty(formModel.formData)) {
+                    this.$alert(`未设置在线表单`).then(() => {
                         this.closeDialog()
                     })
-                    return
-                }
-                this.formModel = formModel
-                // 数据预处理,审批意见数据添加审批人姓名
-                if (data.attributes && data.attributes.opinionList && data.attributes.opinionList.length) {
-                    const { userList = [] } = this.$store.getters || {}
-                    data.attributes.opinionList.forEach(item => {
-                        const userInfo = userList.find(i => i.userId === item.auditor)
-                        item.auditorName = userInfo ? userInfo.userName : null
-                    })
                 }
-                // ============在线表单 ================
-                if (formModel.type === 'INNER') {
-                    if (this.$utils.isEmpty(formModel.formData)) {
-                        this.$alert(`未设置在线表单`).then(() => {
-                            this.closeDialog()
-                        })
-                    }
 
-                    // 表单定义
-                    this.formDef = this.$utils.parseData(formModel.formData) || {}
-                    this.formDef.flowName = this.flowName
+                // 表单定义
+                this.formDef = this.$utils.parseData(formModel.formData) || {}
+                this.formDef.flowName = this.flowName
+                this.formData = {
+                    // 表单数据
+                    responses: this.$utils.parseData(data.boData) || {},
+                    // 表单权限
+                    permissions: this.$utils.parseData(data.permissions) || {}
+                }
 
-                    this.formData = {
-                        // 表单数据
-                        responses: this.$utils.parseData(data.boData) || {},
-                        // 表单权限
-                        permissions: this.$utils.parseData(data.permissions) || {}
-                    }
+                // 一些参数
+                this.attributes = this.initAttributes(data)
+                this.formParams.nodeId = this.attributes.nodeId
+                this.formParams.proInstId = data.attributes.proInstId
+                // 操作按钮
+                this.buttons = this.buildButtons(data.buttons, this.attributes) || []
+                // 表单意见
+                this.formParams.formOpinionData = FormUtil.initFormOpinionData(data.attributes || {})
 
-                    // 一些参数
-                    this.attributes = this.initAttributes(data)
-                    this.formParams.nodeId = this.attributes.nodeId
-                    this.formParams.proInstId = data.attributes.proInstId
-                    // 操作按钮
-                    this.buttons = this.buildButtons(data.buttons, this.attributes) || []
-                    // 表单意见
-                    this.formParams.formOpinionData = FormUtil.initFormOpinionData(data.attributes || {})
+                // 表单意见是否隐藏意见
+                this.$nextTick(() => {
+                    this.isBpmOpinionHide = this.handleBpmOpinionHide(data.attributes || {}, this.formDef)
+                })
+                // 流程关联信息
+                this.formParams.bpmLinkData = FormUtil.getBpmLinkData(data.attributes || {})
+                // 打印模版
+                this.printTemplateId = this.attributes.templateId
 
-                    // 表单意见是否隐藏意见
-                    this.$nextTick(() => {
-                        this.isBpmOpinionHide = this.handleBpmOpinionHide(data.attributes || {}, this.formDef)
+                // 版本号
+                this.version = data.version
+                // 流程实例当前审批节点
+                this.endProcessTaskId = data.endProcessTaskId
+                // 备份对比
+                this.$nextTick(() => {
+                    setTimeout(() => {
+                        this.formDataBF = this.getFormData()
+                    }, 500)
+                    this.opinionListBF = JSON.parse(JSON.stringify(this.formParams.formOpinionData.opinionList))
+                })
+                //  ============内嵌表单[按钮这边提供] ================
+            } else if (formModel.type === 'URL_LOAD') {
+                const urlForm = formModel.formValue
+                if (this.$utils.isEmpty(urlForm)) {
+                    this.$alert(`未设置内嵌表单`).then(() => {
+                        this.closeDialog()
                     })
-                    // 流程关联信息
-                    this.formParams.bpmLinkData = FormUtil.getBpmLinkData(data.attributes || {})
-                    // 打印模版
-                    this.printTemplateId = this.attributes.templateId
-
-                    // 版本号
-                    this.version = data.version
-                    // 流程实例当前审批节点
-                    this.endProcessTaskId = data.endProcessTaskId
-                    //  ============内嵌表单[按钮这边提供] ================
-                } else if (formModel.type === 'URL_LOAD') {
-                    const urlForm = formModel.formValue
-                    if (this.$utils.isEmpty(urlForm)) {
-                        this.$alert(`未设置内嵌表单`).then(() => {
-                            this.closeDialog()
-                        })
-                    }
-                    // 一些参数
-                    this.attributes = this.initAttributes(data)
-                    this.formParams.nodeId = this.attributes.nodeId
-
-                    // 操作按钮
-                    this.buttons = this.buildButtons(data.buttons, this.attributes) || []
-                    // 初始化url表单
-                    this.initUrlForm(urlForm)
-                    console.log(urlForm, this.attributes, data, this.formParams)
-                    //  ============外部表单【iframe】 ================
-                } else if (formModel.type === 'FRAME') {
-                    const urlForm = formModel.formValue
-                    if (this.$utils.isEmpty(urlForm)) {
-                        this.$alert(`未设置外部表单`).then(() => {
-                            this.closeDialog()
-                        })
-                    }
-                    // 初始化url表单
-                    this.initUrlForm(urlForm)
-                    console.log(urlForm, this.attributes, data, this.formParams)
                 }
-            },
-            // 初始化url表单
-            initUrlForm(url) {
-                if (url.startsWith('http')) {
-                    this.formUrlType = 'iframe'
-                    this.$nextTick(() => {
-                        this.$refs.formrender.src = url
-                        // 传递消息
-                        this.$refs.formrender.contentWindow.postMessage({ data: this.attributes }, '*')
+                // 一些参数
+                this.attributes = this.initAttributes(data)
+                this.formParams.nodeId = this.attributes.nodeId
+
+                // 操作按钮
+                this.buttons = this.buildButtons(data.buttons, this.attributes) || []
+                // 初始化url表单
+                this.initUrlForm(urlForm)
+                // console.log(urlForm, this.attributes, data, this.formParams)
+                //  ============外部表单【iframe】 ================
+            } else if (formModel.type === 'FRAME') {
+                const urlForm = formModel.formValue
+                if (this.$utils.isEmpty(urlForm)) {
+                    this.$alert(`未设置外部表单`).then(() => {
+                        this.closeDialog()
                     })
-                } else {
-                    const component = url.split('?')[0]
-                    this.formParams.attrs = this.urlParse(url)
-                    this.formUrlType = 'inner'
-                    const formUrlName = 'IbpsBpmnFormUrl'
-                    this.$options.components[formUrlName] = _import(component)
-                    this.formUrlName = formUrlName
                 }
-            },
-            urlParse(str) {
-                const obj = {}
-                if (str.indexOf('?') !== -1) {
-                    const str1 = str.split('?')[1].split('&')
-                    for (let i = 0; i < str1.length; i++) {
-                        const params = str1[i].split('=')
-                        obj[params[0]] = params[1]
-                    }
-                }
-                return obj
-            },
-            initAttributes(data) {
-                const attributes = data.attributes || {}
-                return {
-                    title: this.title,
-                    defId: this.defId,
-                    proInstId: this.proInstId,
-                    taskId: this.taskId,
-                    nodeId: attributes.nodeId,
-                    // 锁定用户
-                    lockUser: attributes.lockUser,
-                    // 当前用户
-                    curUserId: attributes.curUserId,
-                    // 挂起状态
-                    suspendState: attributes.suspendState,
-                    // 是否转办
-                    isHiddenDelegate: this.$utils.toBoolean(attributes.isHiddenDelegate),
-                    // 是否正常跳转
-                    isCommonJumpType: this.$utils.toBoolean(attributes.isCommonJumpType),
-                    // 是否隐藏意见
-                    isHideOpinion: this.$utils.toBoolean(attributes.isHideOpinion),
-                    // 是否隐藏路径
-                    isHidePath: this.$utils.toBoolean(attributes.isHidePath),
-                    // 是否结束
-                    isEnd: this.$utils.toBoolean(attributes.isEnd),
-                    // 第一个节点是否选择
-                    firstNodeUserAssign: attributes.firstNodeUserAssign,
-                    // 打印模版
-                    printTemplateId: data.formModel.templateId,
-                    // BO版本号
-                    version: data.version
+                // 初始化url表单
+                this.initUrlForm(urlForm)
+                console.log(urlForm, this.attributes, data, this.formParams)
+            }
+        },
+        // 初始化url表单
+        initUrlForm (url) {
+            if (url.startsWith('http')) {
+                this.formUrlType = 'iframe'
+                this.$nextTick(() => {
+                    this.$refs.formrender.src = url
+                    // 传递消息
+                    this.$refs.formrender.contentWindow.postMessage({ data: this.attributes }, '*')
+                })
+            } else {
+                const component = url.split('?')[0]
+                this.formParams.attrs = this.urlParse(url)
+                this.formUrlType = 'inner'
+                const formUrlName = 'IbpsBpmnFormUrl'
+                this.$options.components[formUrlName] = _import(component)
+                this.formUrlName = formUrlName
+            }
+        },
+        urlParse (str) {
+            const obj = {}
+            if (str.indexOf('?') !== -1) {
+                const str1 = str.split('?')[1].split('&')
+                for (let i = 0; i < str1.length; i++) {
+                    const params = str1[i].split('=')
+                    obj[params[0]] = params[1]
                 }
-            },
-            handleBpmOpinionHide(attributes = {}, formDef) {
-                const formOpinionSetting = attributes.formOpinionSetting
-                const formOpinion = attributes.formOpinion
-                const curNodeId = attributes.nodeId
-                // 处理删除审批意见的bug
-                if (this.$utils.isNotEmpty(formOpinionSetting) && this.$utils.isNotEmpty(formOpinion)) {
-                    const formOpinionField = FormFieldUtil.getFormOpinionField(formDef.fields)
-                    for (const key in formOpinion) {
-                        const nodeList = formOpinion[key]
-                        if (!formOpinionField[key]) {
-                            const nodeKey = JSON.stringify(nodeList)
-                            delete formOpinionSetting[nodeKey]
-                        }
+            }
+            return obj
+        },
+        initAttributes (data) {
+            const attributes = data.attributes || {}
+            return {
+                title: this.title,
+                defId: this.defId,
+                proInstId: this.proInstId,
+                taskId: this.taskId,
+                nodeId: attributes.nodeId,
+                // 锁定用户
+                lockUser: attributes.lockUser,
+                // 当前用户
+                curUserId: attributes.curUserId,
+                // 挂起状态
+                suspendState: attributes.suspendState,
+                // 是否转办
+                isHiddenDelegate: this.$utils.toBoolean(attributes.isHiddenDelegate),
+                // 是否正常跳转
+                isCommonJumpType: this.$utils.toBoolean(attributes.isCommonJumpType),
+                // 是否隐藏意见
+                isHideOpinion: this.$utils.toBoolean(attributes.isHideOpinion),
+                // 是否隐藏路径
+                isHidePath: this.$utils.toBoolean(attributes.isHidePath),
+                // 是否结束
+                isEnd: this.$utils.toBoolean(attributes.isEnd),
+                // 第一个节点是否选择
+                firstNodeUserAssign: attributes.firstNodeUserAssign,
+                // 打印模版
+                printTemplateId: data.formModel.templateId,
+                // BO版本号
+                version: data.version
+            }
+        },
+        handleBpmOpinionHide (attributes = {}, formDef) {
+            const formOpinionSetting = attributes.formOpinionSetting
+            const formOpinion = attributes.formOpinion
+            const curNodeId = attributes.nodeId
+            // 处理删除审批意见的bug
+            if (this.$utils.isNotEmpty(formOpinionSetting) && this.$utils.isNotEmpty(formOpinion)) {
+                const formOpinionField = FormFieldUtil.getFormOpinionField(formDef.fields)
+                for (const key in formOpinion) {
+                    const nodeList = formOpinion[key]
+                    if (!formOpinionField[key]) {
+                        const nodeKey = JSON.stringify(nodeList)
+                        delete formOpinionSetting[nodeKey]
                     }
                 }
+            }
 
-                if (this.$utils.isNotEmpty(formOpinionSetting)) {
-                    let flag = false
-                    for (const o in formOpinionSetting) {
-                        const formOpinionHidden = formOpinionSetting[o]
-                        try {
-                            const nodeIds = this.$utils.parseJSON(o)
-                            if (nodeIds.includes(curNodeId)) {
-                                flag = this.$utils.toBoolean(formOpinionHidden)
-                                break
-                            }
-                        } catch (err) {
-                            console.error(err)
+            if (this.$utils.isNotEmpty(formOpinionSetting)) {
+                let flag = false
+                for (const o in formOpinionSetting) {
+                    const formOpinionHidden = formOpinionSetting[o]
+                    try {
+                        const nodeIds = this.$utils.parseJSON(o)
+                        if (nodeIds.includes(curNodeId)) {
+                            flag = this.$utils.toBoolean(formOpinionHidden)
+                            break
                         }
+                    } catch (err) {
+                        console.error(err)
                     }
-                    return this.hasFormOpinion() && !flag ? flag : true
                 }
-                // 是否有表单意见
-                return this.hasFormOpinion() ? true : (this.attributes.isHideOpinion || false)
-            },
-            /**
+                return this.hasFormOpinion() && !flag ? flag : true
+            }
+            // 是否有表单意见
+            return this.hasFormOpinion() ? true : (this.attributes.isHideOpinion || false)
+        },
+        /**
              * 构建操作按钮
              */
-            buildButtons(toolbars, params) {
-                if (this.$utils.isEmpty(toolbars)) {
-                    toolbars = []
-                }
-                // 如果转办,代理不为空
-                if (this.$utils.isNotEmpty(this.taskChangeId)) {
-                    toolbars.unshift({
-                        alias: 'delegateDetail',
-                        name: '转办/代理明细'
-                    })
-                }
-                if (this.closeable) {
-                    toolbars.unshift({
-                        alias: 'close'
-                    })
-                }
-                const buttons = []
-                // 已办事宜去除打印按钮和流程实例信息按钮(区分标准,this.instanceId有值则为已办)
-                const filterType = ['print', 'instanceDetail']
-                for (let i = 0; i < toolbars.length; i++) {
-                    const button = toolbars[i]
-                    const alias = button.alias
-                    const code = button.code
-                    button.key = alias === 'custom' ? (code || (alias + i)) : alias
-                    if (!this.instanceId) {
-                        buttons.push(button)
-                    } else if (!filterType.includes(button.key)) {
-                        buttons.push(button)
-                    }
-                }
-                const bpmnButton = new BpmnButton({
-                    buttons: buttons,
-                    params: params
+        buildButtons (toolbars, params) {
+            if (this.timeModificationbtn) {
+                toolbars.push({
+                    'alias': 'timeModification',
+                    'name': this.timeModification_ ? '保存修改' : '修改数据'
                 })
-                return bpmnButton.response_buttons
-            },
-            getFormEL() {
-                if (this.formUrlType === 'inner') {
-                    return this.$refs.formrender
-                } else {
-                    try {
-                        // 跨域获取表单数据
-                        return this.$refs.formrender.contentWindow.ibpsFormUrl
-                    } catch (err) {
-                        console.error(err)
-                    }
-                }
-            },
-            // 获取表单数据
-            getFormData() {
-                if (!(this.getFormEL() && this.getFormEL().getFormData)) {
-                    this.$message({
-                        message: 'URL表单必须包含获取表单数据的方法【getFormData】',
-                        type: 'warning'
-                    })
-                    return
-                }
-                return this.getFormEL().getFormData()
-            },
-            // 是否有审批意见字段
-            hasFormOpinion() {
-                if (!(this.getFormEL() && this.getFormEL().hasFormOpinion)) {
-                    return false
-                }
-                return this.getFormEL().hasFormOpinion() || false
-            },
-            // 获取表单意见数据
-            getFormOpinionData() {
-                if (!(this.getFormEL() && this.getFormEL().getFormOpinionData)) {
-                    return ''
-                }
-                const formOpinionData = this.getFormEL().getFormOpinionData()
-                let data = ''
-                if (this.$utils.isEmpty(formOpinionData)) {
-                    return data
+            }
+            // if (this.timeModificationbtn) {
+            //     toolbars.push({
+            //         'alias': 'timeModificationNo',
+            //         'name': '取消'
+            //     })
+            // }
+            if (this.$utils.isEmpty(toolbars)) {
+                toolbars = []
+            }
+            // 如果转办,代理不为空
+            if (this.$utils.isNotEmpty(this.taskChangeId)) {
+                toolbars.unshift({
+                    alias: 'delegateDetail',
+                    name: '转办/代理明细'
+                })
+            }
+            if (this.closeable) {
+                toolbars.unshift({
+                    alias: 'close'
+                })
+            }
+            const buttons = []
+            // 已办事宜去除打印按钮和流程实例信息按钮(区分标准,this.instanceId有值则为已办)
+            const filterType = ['print', 'instanceDetail']
+            for (let i = 0; i < toolbars.length; i++) {
+                const button = toolbars[i]
+                const alias = button.alias
+                const code = button.code
+                button.key = alias === 'custom' ? (code || (alias + i)) : alias
+                if (!this.instanceId) {
+                    buttons.push(button)
+                } else if (!filterType.includes(button.key)) {
+                    buttons.push(button)
                 }
-                // 如果只有一个,多个,取最后一个
-                for (const key in formOpinionData) {
-                    data = formOpinionData[key]
+            }
+            const bpmnButton = new BpmnButton({
+                buttons: buttons,
+                params: params
+            })
+            return bpmnButton.response_buttons
+        },
+        getFormEL () {
+            if (this.formUrlType === 'inner') {
+                return this.$refs.formrender
+            } else {
+                try {
+                    // 跨域获取表单数据
+                    return this.$refs.formrender.contentWindow.ibpsFormUrl
+                } catch (err) {
+                    console.error(err)
                 }
+            }
+        },
+        // 获取表单数据
+        getFormData () {
+            if (!(this.getFormEL() && this.getFormEL().getFormData)) {
+                this.$message({
+                    message: 'URL表单必须包含获取表单数据的方法【getFormData】',
+                    type: 'warning'
+                })
+                return
+            }
+            return this.getFormEL().getFormData()
+        },
+        // 是否有审批意见字段
+        hasFormOpinion () {
+            if (!(this.getFormEL() && this.getFormEL().hasFormOpinion)) {
+                return false
+            }
+            return this.getFormEL().hasFormOpinion() || false
+        },
+        // 获取表单意见数据
+        getFormOpinionData () {
+            if (!(this.getFormEL() && this.getFormEL().getFormOpinionData)) {
+                return ''
+            }
+            const formOpinionData = this.getFormEL().getFormOpinionData()
+            let data = ''
+            if (this.$utils.isEmpty(formOpinionData)) {
                 return data
-            },
-            /**
+            }
+            // 如果只有一个,多个,取最后一个
+            for (const key in formOpinionData) {
+                data = formOpinionData[key]
+            }
+            return data
+        },
+        /**
              * 获取审批意见验证
              */
-            formOpinionValidate(calback, flag) {
-                if (!(this.getFormEL() && this.getFormEL().formOpinionValidate)) {
-                    calback(false)
-                    return false
-                }
-                this.getFormEL().formOpinionValidate(calback, flag)
-            },
-            // 前置事件
-            beforeScript(key, callback) {
-                if (!(this.getFormEL() && this.getFormEL().beforeScript)) {
-                    const flag = true
-                    callback(flag)
-                    return
-                }
-                return this.getFormEL().beforeScript(key, callback)
-            },
-            // 后置事件
-            afterScript(key, params, callback) {
-                if (!(this.getFormEL() && this.getFormEL().afterScript)) {
-                    const flag = true
-                    callback(flag)
-                    return
-                }
-                return this.getFormEL().afterScript(key, params, callback)
-            },
-            // 回调上一个页面
-            callbackPage() {
-                this.closeDialog()
-                this.$emit('callback', this)
-            },
-            // 关闭当前窗口
-            closeDialog() {
-                if (this.closeable) {
-                    this.$emit('close', false)
-                }
-            },
-            // 验证表单
-            validateForm(callback) {
-                if (!(this.getFormEL() && this.getFormEL().validate)) {
-                    const flag = true
-                    callback(flag)
-                    return
-                }
-                this.getFormEL().validate((valid, invalidFields) => {
-                    callback(valid, invalidFields)
-                })
+        formOpinionValidate (calback, flag) {
+            if (!(this.getFormEL() && this.getFormEL().formOpinionValidate)) {
+                calback(false)
+                return false
+            }
+            this.getFormEL().formOpinionValidate(calback, flag)
+        },
+        // 前置事件
+        beforeScript (key, callback) {
+            if (!(this.getFormEL() && this.getFormEL().beforeScript)) {
+                const flag = true
+                callback(flag)
+                return
+            }
+            return this.getFormEL().beforeScript(key, callback)
+        },
+        // 后置事件
+        afterScript (key, params, callback) {
+            if (!(this.getFormEL() && this.getFormEL().afterScript)) {
+                const flag = true
+                callback(flag)
+                return
+            }
+            return this.getFormEL().afterScript(key, params, callback)
+        },
+        // 回调上一个页面
+        callbackPage () {
+            this.closeDialog()
+            this.$emit('callback', this)
+        },
+        // 关闭当前窗口
+        closeDialog () {
+            if (this.closeable) {
+                this.$emit('close', false)
+            }
+        },
+        // 验证表单
+        validateForm (callback) {
+            if (!(this.getFormEL() && this.getFormEL().validate)) {
+                const flag = true
+                callback(flag)
+                return
             }
+            this.getFormEL().validate((valid, invalidFields) => {
+                callback(valid, invalidFields)
+            })
         }
     }
+}
 </script>
 <style lang="scss" scoped>
     .ibps-container-frame {

+ 12 - 2
src/business/platform/form/formrender/dynamic-form/components/approval-opinion/index.vue

@@ -63,11 +63,16 @@
                     </template>
                 </el-table-column>
                 <!-- 审批时间 -->
-                <el-table-column :label="options[1].label" width="135">
+                <el-table-column v-if="!timeModification" :label="options[1].label" width="135">
                     <template slot-scope="{row, $index}">
                         {{ row[options[1].value] }}
                     </template>
                 </el-table-column>
+                <el-table-column v-if="timeModification" :label="options[1].label" width="200">
+                    <template slot-scope="{row, $index}">
+                        <el-date-picker v-model="row[options[1].value]" type="datetime" placeholder="选择日期时间" value-format="yyyy-MM-dd HH:mm:ss" :default-time="row[options[1].value]" />
+                    </template>
+                </el-table-column>
                 <!-- 审批意见 -->
                 <el-table-column :label="options[3].label">
                     <template slot-scope="{row,$index }">
@@ -222,7 +227,12 @@ export default {
         unComplate: {
             type: String
         },
-        params: Object
+        params: Object,
+        // 修改流程时间
+        timeModification: {
+            type: Boolean,
+            default: false
+        }
     },
     data () {
         return {

+ 14 - 2
src/business/platform/form/formrender/dynamic-form/dynamic-form-item.vue

@@ -31,6 +31,8 @@
                     :opinion-data="formOpinionData[fieldName]"
                     :un-complate="unComplateOpinion"
                     :params="params"
+                    :time-modification="timeModification"
+                    @childByValue="childByValue"
                     v-on="listeners"
                 />
                 <!--子表-->
@@ -84,7 +86,12 @@ export default {
         code: String, // 表名
         mainCode: String, // 主表名
         row: [String, Number], // 子表行数
-        params: Object // 参数
+        params: Object, // 参数
+        // 修改流程时间
+        timeModification: {
+            type: Boolean,
+            default: false
+        }
     },
     inject: {
         elForm: {
@@ -105,7 +112,8 @@ export default {
 
         return {
             dataModel: this.models[this.field.name] || defaultVal,
-            fieldRights: this.rights[this.field.name] || 'e'
+            fieldRights: this.rights[this.field.name] || 'e',
+            opinionData: []
         }
     },
     computed: {
@@ -333,6 +341,10 @@ export default {
         },
         emitEvent (event) {
             this.$emit(event, ...Array.from(arguments).slice(1))
+        },
+        childByValue (childValue) {
+        // childValue就是子组件传过来的值
+            this.opinionData = childValue
         }
     }
 }

+ 9 - 0
src/business/platform/form/formrender/dynamic-form/dynamic-form.vue

@@ -61,6 +61,7 @@
                         :field="item"
                         :code="code"
                         :params="formParams"
+                        :time-modification="timeModification"
                     />
                 </template>
             </el-form>
@@ -153,6 +154,11 @@ export default {
             type: Boolean,
             default: false
         },
+        // 修改流程时间
+        timeModification: {
+            type: Boolean,
+            default: false
+        },
         // 扩展参数
         params: Object,
         // 当前激活步骤
@@ -442,6 +448,9 @@ export default {
                 // 字段
                 rightsValue = permissions.fields[name] ? permissions.fields[name] : null
             }
+            // if (this.$route.path === '/xxgl/jssllb') {
+            //     return rightsValue
+            // }
             if (this.readonly && !isNonInputField && !isSpecial) {
                 // 只读权限
                 // 修复空权限默认值的bug

+ 577 - 498
src/business/platform/form/formrender/index.vue

@@ -4,11 +4,20 @@
             <div class="table-content">
                 <!--顶部按钮-->
                 <template v-if="hasActions">
-                    <div v-sticky="{ stickyTop: marginTop }" class="form-toolbar hidden-print">
-                        <div :class="['ibps-toolbar--' + $ELEMENT.size]" class="ibps-toolbar">
+                    <div
+                        v-sticky="{ stickyTop: marginTop }"
+                        class="form-toolbar hidden-print"
+                    >
+                        <div
+                            :class="['ibps-toolbar--' + $ELEMENT.size]"
+                            class="ibps-toolbar"
+                        >
                             <panle />
                             <div class="header" style="height: 30px">
-                                <div class="buttons" style="float: right; margin-right: 8%">
+                                <div
+                                    class="buttons"
+                                    style="float: right; margin-right: 8%"
+                                >
                                     <ibps-toolbar
                                         ref="toolbar"
                                         :actions="actions.reverse()"
@@ -16,16 +25,25 @@
                                     />
                                 </div>
                                 <!--步骤条按钮-->
-                                <div v-if="hasStepButton" class="buttons ibps-pr-10 ibps-fr-important">
+                                <div
+                                    v-if="hasStepButton"
+                                    class="buttons ibps-pr-10 ibps-fr-important"
+                                >
                                     <el-button
                                         v-for="button in stepButtons"
                                         :key="button.key"
                                         :size="button.size || $ELEMENT.size"
                                         :icon="'ibps-icon-' + button.icon"
                                         :autofocus="false"
-                                        :disabled="disabledStepButton(button.key)"
+                                        :disabled="
+                                            disabledStepButton(button.key)
+                                        "
                                         :loading="stepLoading"
-                                        @click="() => { handleStepButtonEvent(button) }"
+                                        @click="
+                                            () => {
+                                                handleStepButtonEvent(button);
+                                            }
+                                        "
                                     >
                                         {{ button.label }}
                                     </el-button>
@@ -43,12 +61,13 @@
                     :permissions="permissions"
                     :readonly="readonly"
                     :params="params"
-                    :dynamicParams="dynamicParams"
+                    :dynamic-params="dynamicParams"
                     :initialization="initialization"
                     :cur-active-step.sync="curActiveStep"
-                    :isDialog="isDialog"
+                    :is-dialog="isDialog"
                     class="form-container"
                     :style="{ marginTop: hasActions ? marginTop + 'px' : '0' }"
+                    :time-modification="timeModification"
                 />
                 <component
                     :is="dialogTemplate"
@@ -68,533 +87,593 @@
 </template>
 
 <script>
-    import ActionUtils from '@/utils/action'
-    import JForm from '../utils/JForm' // 自定义脚本
-    import DynamicForm from './dynamic-form/dynamic-form'
-    import IbpsWatermark from '@/components/ibps-watermark'
-    import panle from '@/components/jbd-panel'
+import ActionUtils from '@/utils/action'
+import JForm from '../utils/JForm' // 自定义脚本
+import DynamicForm from './dynamic-form/dynamic-form'
+import IbpsWatermark from '@/components/ibps-watermark'
+import panle from '@/components/jbd-panel'
 
-    const JFormId = 'JForm'
+const JFormId = 'JForm'
 
-    export default {
-        components: {
-            DynamicForm,
-            panle,
-            IbpsWatermark
-        },
-        props: {
-            isDialog: {
-                type: Boolean,
-                default: false
-            },
-            formDef: {
-                type: Object,
-                required: true
-            },
-            dynamicParams: {
-                type: Object
-            },
-            // 表单参数
-            addDataCont: {
-                type: Object
-            },
-            data: {
-                type: Object
-            },
-            /**
-             * @description 工具栏
-             */
-            buttons: {
-                type: Array
-            },
-            /**
-             * 是否只读 (流程实例时候控制)
-             */
-            readonly: {
-                type: Boolean,
-                default: false
-            },
-            /**
-             *  @description 扩展参数 比如流程id等
-             * 流程相关信息:
-             * taskId:任务id
-             * instanceId:流程实例
-             * defId:定义Id
-             * formOpinionData: 流程意见配置及已经审批的意见数据
-             */
-            params: {
-                type: Object
-            },
-            mode: {
-                // 表单模式
-                type: String
-            }
+export default {
+    components: {
+        DynamicForm,
+        panle,
+        IbpsWatermark
+    },
+    props: {
+        isDialog: {
+            type: Boolean,
+            default: false
+        },
+        formDef: {
+            type: Object,
+            required: true
+        },
+        dynamicParams: {
+            type: Object
+        },
+        // 表单参数
+        addDataCont: {
+            type: Object
         },
-        data() {
-            return {
-                formPage: true,
-                loading: false,
-                formData: {},
-                permissions: null,
-                // actions: [],
-                initialization: false,
-                marginTop: 50,
-                curActiveStep: 0,
-                formParams: {},
-                curTime: new Date().getTime(),
-                stepLoading: false,
-                dialogTemplate: null,
-                dialogTemplateAtts: {},
-                number: 0,
-                // 个性定制
-                customComponent: null,
-                customComponentAtts: {}
+        data: {
+            type: Object
+        },
+        /**
+         * @description 工具栏
+         */
+        buttons: {
+            type: Array
+        },
+        /**
+         * 是否只读 (流程实例时候控制)
+         */
+        readonly: {
+            type: Boolean,
+            default: false
+        },
+        /**
+         *  @description 扩展参数 比如流程id等
+         * 流程相关信息:
+         * taskId:任务id
+         * instanceId:流程实例
+         * defId:定义Id
+         * formOpinionData: 流程意见配置及已经审批的意见数据
+         */
+        params: {
+            type: Object
+        },
+        mode: {
+            // 表单模式
+            type: String
+        },
+        // 修改流程时间
+        timeModification: {
+            type: Boolean,
+            default: false
+        }
+    },
+    data () {
+        return {
+            formPage: true,
+            loading: false,
+            formData: {},
+            permissions: null,
+            // actions: [],
+            initialization: false,
+            marginTop: 50,
+            curActiveStep: 0,
+            formParams: {},
+            curTime: new Date().getTime(),
+            stepLoading: false,
+            dialogTemplate: null,
+            dialogTemplateAtts: {},
+            number: 0,
+            // 个性定制
+            customComponent: null,
+            customComponentAtts: {}
+        }
+    },
+    computed: {
+        formDefData () {
+            return JSON.parse(JSON.stringify(this.formDef))
+        },
+        hasActions () {
+            return (
+                this.hasStepButton || (this.actions && this.actions.length > 0)
+            )
+        },
+        dynamicForm () {
+            return this.$refs ? this.$refs.dynamicForm : null
+        },
+        hasStepButton () {
+            return (
+                this.$utils.isNotEmpty(this.stepButtons) &&
+                this.mode !== 'dialog'
+            )
+        },
+        stepNum () {
+            if (this.$utils.isEmpty(this.step)) {
+                return 0
             }
+            return this.step.field_options.columns.length
         },
-        computed: {
-            formDefData() {
-                return JSON.parse(JSON.stringify(this.formDef))
-            },
-            hasActions() {
-                return this.hasStepButton || (this.actions && this.actions.length > 0)
-            },
-            dynamicForm() {
-                return this.$refs ? this.$refs.dynamicForm : null
-            },
-            hasStepButton() {
-                return this.$utils.isNotEmpty(this.stepButtons) && this.mode !== 'dialog'
-            },
-            stepNum() {
-                if (this.$utils.isEmpty(this.step)) {
-                    return 0
+        finishStep () {
+            return this.stepNum - 1 === this.curActiveStep
+        },
+        actions () {
+            return this.getActions()
+        },
+        stepButtons () {
+            return this.getStepButtons()
+        },
+        step () {
+            return this.getFormStep()
+        },
+        enableWatermark () {
+            return this.formDefData
+                ? this.formDefData.attrs.watermark || false
+                : false
+        },
+        watermarkText () {
+            if (this.enableWatermark) {
+                return this.formDefData.attrs.watermarkText || ''
+            }
+            return ''
+        }
+    },
+    watch: {
+        formDef: {
+            handler: function (val, oldVal) {
+                if (val && val !== oldVal) {
+                    this.initialization = false
+                    this.initUI()
                 }
-                return this.step.field_options.columns.length
-            },
-            finishStep() {
-                return this.stepNum - 1 === this.curActiveStep
             },
-            actions() {
-                return this.getActions()
-            },
-            stepButtons() {
-                return this.getStepButtons()
-            },
-            step() {
-                return this.getFormStep()
-            },
-            enableWatermark() {
-                return this.formDefData ? (this.formDefData.attrs.watermark || false) : false
-            },
-            watermarkText() {
-                if (this.enableWatermark) {
-                    return this.formDefData.attrs.watermarkText || ''
-                }
-                return ''
-            }
+            immediate: true
         },
-        watch: {
-            formDef: {
-                handler: function (val, oldVal) {
-                    if (val && val !== oldVal) {
-                        this.initialization = false
-                        this.initUI()
+        // timeModification: {
+        //     handler: function (val, oldVal) {
+        //         console.log(this.formDefData, '1')
+        //         console.log(this.formData, '2')
+        //         console.log(this.params, '3')
+        //         console.log(this.dynamicParams, '4')
+        //     },
+        //     immediate: true
+        // },
+        data: {
+            handler: function (val, oldVal) {
+                if (val && val !== oldVal) {
+                    const data = JSON.parse(JSON.stringify(val))
+                    // 表单数据
+                    this.formData = data.responses || {}
+                    if (this.addDataCont) {
+                        this.formData['addDataCont'] = this.addDataCont
                     }
-                },
-                immediate: true
-            },
-            data: {
-                handler: function (val, oldVal) {
-                    if (val && val !== oldVal) {
-                        const data = JSON.parse(JSON.stringify(val))
-                        // 表单数据
-                        this.formData = data.responses || {}
-                        if (this.addDataCont) this.formData['addDataCont'] = this.addDataCont
-                        // 表单权限
-                        this.permissions = data.permissions || null
-                    }
-                },
-                immediate: true,
-                deep: true
+                    // 表单权限
+                    this.permissions = data.permissions || null
+                }
             },
-            curActiveStep() {
-                this.$emit('cur-active-step', this.curActiveStep)
-            }
-        },
-        created() {
-            this.initUI()
+            immediate: true,
+            deep: true
         },
-        beforeDestroy() {
-            this.formPage = false
-            const script = document.getElementById(JFormId)
-            if (script) {
-                script.parentNode.removeChild(script)
-            }
-            /*清除缓存 */
-            if (this.formDef.key) {
-                JForm.cleanEvents()
+        curActiveStep () {
+            this.$emit('cur-active-step', this.curActiveStep)
+        }
+    },
+    created () {
+        this.initUI()
+    },
+    beforeDestroy () {
+        this.formPage = false
+        const script = document.getElementById(JFormId)
+        if (script) {
+            script.parentNode.removeChild(script)
+        }
+        /* 清除缓存 */
+        if (this.formDef.key) {
+            JForm.cleanEvents()
+        }
+    },
+    methods: {
+        initUI () {
+            if (!this.initialization) {
+                this.initJForm()
+                this.initialization = true
+                this.$nextTick(() => {
+                    setTimeout(() => {
+                        this.loadScript()
+                    }, 10)
+                })
             }
         },
-        methods: {
-            initUI() {
-                if (!this.initialization) {
-                    this.initJForm()
-                    this.initialization = true
-                    this.$nextTick(() => {
-                        setTimeout(() => {
-                            this.loadScript()
-                        }, 10)
-                    })
-                }
-            },
-            getActions() {
-                if (this.$utils.isEmpty(this.buttons)) {
-                    return []
+        getActions () {
+            if (this.$utils.isEmpty(this.buttons)) {
+                return []
+            }
+            const actions = []
+            this.buttons.forEach((btn, i) => {
+                const key = btn.getAlias()
+                let disabled = false
+                let hidden = false
+                if (
+                    btn.getAlias() !== 'close' &&
+                    this.hasStepButton &&
+                    !this.finishStep
+                ) {
+                    disabled = true
                 }
-                const actions = []
-                this.buttons.forEach((btn, i) => {
-                    const key = btn.getAlias()
-                    let disabled = false
-                    let hidden = false
-                    if (btn.getAlias() !== 'close' && this.hasStepButton && !this.finishStep) {
-                        disabled = true
-                    }
 
-                    hidden = this.onLoadActions(key, btn, 'hidden', hidden)
-                    disabled = this.onLoadActions(key, btn, 'disabled', disabled)
-                    const this_ = this
-                    const button = {
-                        key: key,
-                        label: btn.getLabel(),
-                        icon: btn.getIcon(),
-                        type: btn.getType(),
-                        disabled: disabled,
-                        hidden: hidden,
-                        callback: () => {
-                            if (btn.key == 'agree') {
-                                // 前置事件
-                                this_.$confirm(`确认任务 [ 提交 ] 操作 ?`, '提示:', {
-                                    confirmButtonText: '确定',
-                                    cancelButtonText: '取消',
-                                    type: 'warning'
-                                }).then(() => {
-                                    this.beforeScript(btn.getAlias(), result => {
-                                        if (result) {
-                                            return btn.action.apply(this, [btn])
-                                        }
-                                    })
-                                }).catch(() => {})
-                            } else {
-                                this.beforeScript(btn.getAlias(), result => {
-                                    if (result) {
-                                        return btn.action.apply(this, [btn])
+                hidden = this.onLoadActions(key, btn, 'hidden', hidden)
+                disabled = this.onLoadActions(key, btn, 'disabled', disabled)
+                const this_ = this
+                const button = {
+                    key: key,
+                    label: btn.getLabel(),
+                    icon: btn.getIcon(),
+                    type: btn.getType(),
+                    disabled: disabled,
+                    hidden: hidden,
+                    callback: () => {
+                        if (btn.key == 'agree') {
+                            // 前置事件
+                            this_
+                                .$confirm(
+                                    `确认任务 [ 提交 ] 操作 ?`,
+                                    '提示:',
+                                    {
+                                        confirmButtonText: '确定',
+                                        cancelButtonText: '取消',
+                                        type: 'warning'
                                     }
+                                )
+                                .then(() => {
+                                    this.beforeScript(
+                                        btn.getAlias(),
+                                        (result) => {
+                                            if (result) {
+                                                return btn.action.apply(this, [
+                                                    btn
+                                                ])
+                                            }
+                                        }
+                                    )
                                 })
-                            }
+                                .catch(() => {})
+                        } else {
+                            this.beforeScript(btn.getAlias(), (result) => {
+                                if (result) {
+                                    return btn.action.apply(this, [btn])
+                                }
+                            })
                         }
                     }
-                    actions.push(button)
-                })
-                return actions
-            },
-            // 自定义格式数据事件
-            onLoadActions: function (key, button, type, defaultVal) {
-                const buttonActionResult = JForm._onLoadActions(this, key, button, type)
-                if (typeof buttonActionResult !== 'undefined' && buttonActionResult) {
-                    return true
-                }
-                return defaultVal
-            },
-            handleButtonEvent(button, position, data, index) {
-                const action = this.actions.find(action => {
-                    return button.key === action.key
-                })
-                if (action) {
-                    action.callback()
-                }
-            },
-            handleActionEvent(actionKey, args = {}) {
-                this.$emit('action-event', actionKey, args)
-            },
-            disabledStepButton(key) {
-                if (key === 'prev') {
-                    return this.curActiveStep === 0
-                } else {
-                    return this.stepNum - 1 === this.curActiveStep
                 }
-            },
-            /** **Step 处理 */
-            getStepButtons() {
-                if (this.$utils.isEmpty(this.step)) {
-                    return []
-                }
-                if (this.$utils.isNotEmpty(this.step.field_options.buttons)) {
-                    return this.step.field_options.buttons
-                } else {
-                    const defaultButtons = [
-                        {
-                            key: 'prev',
-                            icon: 'angle-left',
-                            label: '上一步'
-                        },
-                        {
-                            key: 'next',
-                            icon: 'angle-right',
-                            label: '下一步'
-                        }
-                    ]
-                    return defaultButtons
-                }
-            },
-            getFormStep() {
-                const step = {}
-                if (this.$utils.isEmpty(this.formDef)) {
-                    return
-                }
-                for (let i = 0; i < this.formDef.fields.length; i++) {
-                    const field = this.formDef.fields[i]
-                    if (field.field_type === 'steps') {
-                        return field
+                actions.push(button)
+            })
+            return actions
+        },
+        // 自定义格式数据事件
+        onLoadActions: function (key, button, type, defaultVal) {
+            const buttonActionResult = JForm._onLoadActions(
+                this,
+                key,
+                button,
+                type
+            )
+            if (
+                typeof buttonActionResult !== 'undefined' &&
+                buttonActionResult
+            ) {
+                return true
+            }
+            return defaultVal
+        },
+        handleButtonEvent (button, position, data, index) {
+            const action = this.actions.find((action) => {
+                return button.key === action.key
+            })
+            if (action) {
+                action.callback()
+            }
+        },
+        handleActionEvent (actionKey, args = {}) {
+            this.$emit('action-event', actionKey, args)
+        },
+        disabledStepButton (key) {
+            if (key === 'prev') {
+                return this.curActiveStep === 0
+            } else {
+                return this.stepNum - 1 === this.curActiveStep
+            }
+        },
+        /** **Step 处理 */
+        getStepButtons () {
+            if (this.$utils.isEmpty(this.step)) {
+                return []
+            }
+            if (this.$utils.isNotEmpty(this.step.field_options.buttons)) {
+                return this.step.field_options.buttons
+            } else {
+                const defaultButtons = [
+                    {
+                        key: 'prev',
+                        icon: 'angle-left',
+                        label: '上一步'
+                    },
+                    {
+                        key: 'next',
+                        icon: 'angle-right',
+                        label: '下一步'
                     }
+                ]
+                return defaultButtons
+            }
+        },
+        getFormStep () {
+            const step = {}
+            if (this.$utils.isEmpty(this.formDef)) {
+                return
+            }
+            for (let i = 0; i < this.formDef.fields.length; i++) {
+                const field = this.formDef.fields[i]
+                if (field.field_type === 'steps') {
+                    return field
                 }
-                return step
-            },
-            handleStepButtonEvent(button) {
-                const key = button.key
-                if (key === 'next' && this.curActiveStep === this.stepNum - 1) {
-                    ActionUtils.warning('没有更多')
-                    return
-                }
-                if (key === 'prev' && this.curActiveStep === 0) {
-                    ActionUtils.warning('没有上一步')
-                    return
-                }
-                this.stepLoading = true
-                const curDate = new Date().getTime()
-                let time = 0
-                if (this.curTime + 1500 >= curDate) {
-                    time = 1000
-                }
-                this.curTime = curDate
-                setTimeout(() => {
-                    if (key === 'next') {
-                        this.validate(valid => {
-                            if (valid) {
-                                this.curActiveStep++
-                            } else {
-                                this.formErrorToast()
-                            }
-                        })
-                    } else {
-                        this.curActiveStep--
-                    }
-                    this.stepLoading = false
-                }, time)
-            },
-            callback() {
-                this.$emit('callback')
-            },
-            closeDialog() {
-                this.$emit('close')
-            },
-            getForm() {
-                return this.$refs.dynamicForm
-            },
-            /**
-             * 获取表单验证
-             */
-            validate(callback) {
-                this.getForm().validate((valid, invalidFields) => {
-                    callback(valid, invalidFields)
-                })
-            },
-            formErrorToast(msg) {
-                ActionUtils.saveErrorMessage(msg)
-            },
-            // 处理表单提交验证
-            formSubmitVerify(callback) {
-                if (!this.hasScript()) {
-                    if (callback) {
-                        this.getForm().formSubmitVerify(callback)
-                    }
-                    return
+            }
+            return step
+        },
+        handleStepButtonEvent (button) {
+            const key = button.key
+            if (key === 'next' && this.curActiveStep === this.stepNum - 1) {
+                ActionUtils.warning('没有更多')
+                return
+            }
+            if (key === 'prev' && this.curActiveStep === 0) {
+                ActionUtils.warning('没有上一步')
+                return
+            }
+            this.stepLoading = true
+            const curDate = new Date().getTime()
+            let time = 0
+            if (this.curTime + 1500 >= curDate) {
+                time = 1000
+            }
+            this.curTime = curDate
+            setTimeout(() => {
+                if (key === 'next') {
+                    this.validate((valid) => {
+                        if (valid) {
+                            this.curActiveStep++
+                        } else {
+                            this.formErrorToast()
+                        }
+                    })
+                } else {
+                    this.curActiveStep--
                 }
-
-                JForm._onValidate(this, (result, errorMsg) => {
-                    if (!result) {
-                        return callback(result, errorMsg || '验证不通过,请检查表单')
-                    }
+                this.stepLoading = false
+            }, time)
+        },
+        callback () {
+            this.$emit('callback')
+        },
+        closeDialog () {
+            this.$emit('close')
+        },
+        getForm () {
+            return this.$refs.dynamicForm
+        },
+        /**
+         * 获取表单验证
+         */
+        validate (callback) {
+            this.getForm().validate((valid, invalidFields) => {
+                callback(valid, invalidFields)
+            })
+        },
+        formErrorToast (msg) {
+            ActionUtils.saveErrorMessage(msg)
+        },
+        // 处理表单提交验证
+        formSubmitVerify (callback) {
+            if (!this.hasScript()) {
+                if (callback) {
                     this.getForm().formSubmitVerify(callback)
-                })
-            },
-            /**
-             * 获取表单数据
-             */
-            getFormData() {
-                return this.getForm().getFormData()
-            },
-            /**
-             * 获取字段数据
-             */
-            getData(name) {
-                const data = this.getFormData()
-                return data[name]
-            },
-            /**
-             * 设置字段数据
-             */
-            setData(name, value) {
-                return this.getForm().setFieldData(name, value)
-            },
-            /**
-             * 设置表单权限
-             */
-            getFormRights(name) {
-                return this.getForm().getFormRights(name)
-            },
-            /**
-             * 设置表单权限
-             */
-            setFormRights(name, value) {
-                return this.getForm().setFormRights(name, value)
-            },
-            hasFormOpinion() {
-                return this.getForm().hasFormOpinion()
-            },
-            /**
-             * 表单意见数据
-             */
-            getFormOpinionData() {
-                return this.getForm().getFormOpinionData()
-            },
-            /**
-             * 获取审批意见验证
-             */
-            formOpinionValidate(calback, flag) {
-                this.getForm().formOpinionValidate(calback, flag)
-            },
-            /**
-             * 获取表单字段组件实例
-             */
-            getRefs(fieldName) {
-                return this.getForm().getRefs(fieldName)
-            },
-            /**
-             * 获取表单字段的具体控件组件实例
-             */
-            getRefsField(fieldName) {
-                return this.getForm().getRefsField(fieldName)
-            },
-            /* 给与表头赋值关联对话框及数据*/
-            getTableList(list) {
-                return this.getForm().getTableList(list)
-            },
-            /* 获取统计页面或记录页面*/
-            getStatisOrRecord(type) {
-                return this.getForm().getStatisOrRecord(type)
-            },
-            /* 表头点击事件*/
-            clickTableHeand(a) {
-                return this.getForm().clickTableHeand(a)
-            },
-            /**
-             * 初始化脚本
-             */
-            initJForm() {
-                let script = document.getElementById(JFormId)
-                if (script) {
-                    script.parentNode.removeChild(script)
                 }
-                if (this.formDef.attrs && this.formDef.attrs.script) {
-                    const codeScript = this.formDef.attrs.script
-                    script = document.createElement('script')
-                    script.type = 'text/javascript'
-                    script.id = JFormId
-                    document.body.appendChild(script)
-                    try {
-                        script.appendChild(document.createTextNode(codeScript))
-                    } catch (ex) {
-                        console.error(ex)
-                        script.text = codeScript
-                    }
-                    document.body.appendChild(script)
+                return
+            }
+
+            JForm._onValidate(this, (result, errorMsg) => {
+                if (!result) {
+                    return callback(
+                        result,
+                        errorMsg || '验证不通过,请检查表单'
+                    )
                 }
-            },
-            // 处理脚本
-            hasScript() {
-                return this.getForm().hasScript
-            },
-            // 加载脚本
-            loadScript() {
-                this.$emit('load', this)
-                if (!this.hasScript()) {
-                    return
+                this.getForm().formSubmitVerify(callback)
+            })
+        },
+        /**
+         * 获取表单数据
+         */
+        getFormData () {
+            return this.getForm().getFormData()
+        },
+        /**
+         * 获取字段数据
+         */
+        getData (name) {
+            const data = this.getFormData()
+            return data[name]
+        },
+        /**
+         * 设置字段数据
+         */
+        setData (name, value) {
+            return this.getForm().setFieldData(name, value)
+        },
+        /**
+         * 设置表单权限
+         */
+        getFormRights (name) {
+            return this.getForm().getFormRights(name)
+        },
+        /**
+         * 设置表单权限
+         */
+        setFormRights (name, value) {
+            // if(this.timeModification)
+            // console.log(this.getForm())
+
+            return this.getForm().setFormRights(name, value)
+        },
+        hasFormOpinion () {
+            return this.getForm().hasFormOpinion()
+        },
+        /**
+         * 表单意见数据
+         */
+        getFormOpinionData () {
+            return this.getForm().getFormOpinionData()
+        },
+        /**
+         * 获取审批意见验证
+         */
+        formOpinionValidate (calback, flag) {
+            this.getForm().formOpinionValidate(calback, flag)
+        },
+        /**
+         * 获取表单字段组件实例
+         */
+        getRefs (fieldName) {
+            return this.getForm().getRefs(fieldName)
+        },
+        /**
+         * 获取表单字段的具体控件组件实例
+         */
+        getRefsField (fieldName) {
+            return this.getForm().getRefsField(fieldName)
+        },
+        /* 给与表头赋值关联对话框及数据*/
+        getTableList (list) {
+            return this.getForm().getTableList(list)
+        },
+        /* 获取统计页面或记录页面*/
+        getStatisOrRecord (type) {
+            return this.getForm().getStatisOrRecord(type)
+        },
+        /* 表头点击事件*/
+        clickTableHeand (a) {
+            return this.getForm().clickTableHeand(a)
+        },
+        /**
+         * 初始化脚本
+         */
+        initJForm () {
+            let script = document.getElementById(JFormId)
+            if (script) {
+                script.parentNode.removeChild(script)
+            }
+            if (this.formDef.attrs && this.formDef.attrs.script) {
+                const codeScript = this.formDef.attrs.script
+                script = document.createElement('script')
+                script.type = 'text/javascript'
+                script.id = JFormId
+                document.body.appendChild(script)
+                try {
+                    script.appendChild(document.createTextNode(codeScript))
+                } catch (ex) {
+                    console.error(ex)
+                    script.text = codeScript
                 }
-                JForm._onLoad(this, this.getForm)
-            },
-            // 前置脚本
-            beforeScript(action, callback) {
-                if (!this.hasScript()) {
-                    if (callback) {
-                        const flag = true
-                        callback(flag)
-                    }
-                    return
+                document.body.appendChild(script)
+            }
+        },
+        // 处理脚本
+        hasScript () {
+            return this.getForm().hasScript
+        },
+        // 加载脚本
+        loadScript () {
+            this.$emit('load', this)
+            if (!this.hasScript()) {
+                return
+            }
+            JForm._onLoad(this, this.getForm)
+        },
+        // 前置脚本
+        beforeScript (action, callback) {
+            if (!this.hasScript()) {
+                if (callback) {
+                    const flag = true
+                    callback(flag)
                 }
-                JForm._beforeSubmit(this, action, this.getFormData(), callback)
-            },
-            // 后置脚本
-            afterScript(action, params, callback) {
-                this.formParams = params
-                if (!this.hasScript()) {
-                    if (callback) {
-                        const flag = true
-                        callback(flag)
-                    }
-                    return
+                return
+            }
+            JForm._beforeSubmit(this, action, this.getFormData(), callback)
+        },
+        // 后置脚本
+        afterScript (action, params, callback) {
+            this.formParams = params
+            if (!this.hasScript()) {
+                if (callback) {
+                    const flag = true
+                    callback(flag)
                 }
-                JForm._afterSubmit(this, action, this.getFormData(), callback)
-            },
-            // 更新store
-            updateStore(action, data) {
-                this.$store.dispatch(action, data)
+                return
             }
+            JForm._afterSubmit(this, action, this.getFormData(), callback)
+        },
+        // 更新store
+        updateStore (action, data) {
+            this.$store.dispatch(action, data)
         }
     }
+}
 </script>
 <style lang="scss" scoped>
-    .table-content {
-        .form-toolbar {
-            position: fixed;
-            width: 100%;
-            margin-top: -50px;
-        }
-        .form-container {
-            margin: 0 10px 10px 10px;
-            ::v-deep .el-form--label-left {
-                font-size: 18px;
-                .el-form-item__label {
-                    padding-left: 30px;
-                    position: relative;
-                    &:before {
-                        position: absolute;
-                        left: 24px;
-                    }
+.table-content {
+    .form-toolbar {
+        position: fixed;
+        width: 100%;
+        margin-top: -50px;
+    }
+
+    .form-container {
+        margin: 0 10px 10px 10px;
+
+        ::v-deep .el-form--label-left {
+            font-size: 18px;
+
+            .el-form-item__label {
+                padding-left: 30px;
+                position: relative;
+
+                &:before {
+                    position: absolute;
+                    left: 24px;
                 }
             }
         }
-        @media print {
-            .dynamic-form {
-                margin-top: 0 !important;
-            }
-            .el-dialog__headerbtn {
-                display: none !important;
-                padding: 0;
-                margin: 0;
-            }
-            .hidden-print {
-                padding: 0;
-                margin: 0;
-            }
+    }
+
+    @media print {
+        .dynamic-form {
+            margin-top: 0 !important;
+        }
+
+        .el-dialog__headerbtn {
+            display: none !important;
+            padding: 0;
+            margin: 0;
+        }
+
+        .hidden-print {
+            padding: 0;
+            margin: 0;
         }
     }
+}
 </style>

+ 8 - 0
src/views/platform/bpmn/bpmInstHis/list.vue

@@ -145,6 +145,9 @@
         <bpmn-formrender
             :visible="dialogFormVisible"
             :instance-id="instanceId"
+            :data-resultitem="dataResultitem"
+            :time-modification="timeModification"
+            :time-modificationbtn="timeModificationbtn"
             @close="visible => dialogFormVisible = visible"
         />
         <el-dialog
@@ -215,6 +218,9 @@ export default {
             dialogFormVisible: false,
             // 编辑dialog需要使用
             instanceId: '',
+            dataResultitem: {},
+            timeModification: false,
+            timeModificationbtn: true,
             // 主键 如果主键不是pk需要传主键
             pkKey: 'id',
             tableTitle: '',
@@ -644,6 +650,8 @@ export default {
                     break
                 case 'detail': // 明细
                     ActionUtils.selectedRecord(selection).then((id) => {
+                        // console.log(this.timeModification)
+                        this.dataResultitem = data[0] || {}
                         this.handleEdit(id)
                         this.title = '信息'
                     }).catch(() => {})