Преглед изворни кода

Merge branch 'master' of http://119.23.210.103:3000/wy/lh_firm_former

zhangjingyuan пре 3 година
родитељ
комит
12b50049dc

BIN
src/assets/images/login/bgImg.png


+ 619 - 635
src/business/platform/bpmn/form/action.js

@@ -4,654 +4,638 @@ import { startFlow, saveDraft } from '@/api/platform/bpmn/bpmInst'
 import Print from '@/utils/print'
 
 export default {
-  methods: {
-    // 内嵌url表单,外部url表单 【自定义】
-    emitButtonEventHandler(actionName, args) {
-       // 前置事件
-       this.beforeScript(actionName, (result) => {
-         if (result) {
-           return this.emitEventHandler(actionName, args)
-         }
-       })
-    },
-    /* 设置是否过审的状态*/
-    setData(title){
-       let data = title
-       console.log(this.getFormEL())
-       if(!title){
-         data = "已"+this.getFormEL().formDefData.flowName //获取当前流程步骤名
-       }
-       this.getFormEL().setData("shiFouGuoShen",data)
-    },
-
-    emitEventHandler(actionName, args) {
-      const this_ = this
-      this.actionName = actionName
-      const buttonType = args && args.attributes ? args.attributes.button_type || actionName : actionName
-      this.actionTitle = args && args.attributes ? args.attributes.label : null
-      this.submitFormOpinion = this.getFormOpinionData()
-      switch (buttonType) {
-        case 'agree': // 同意
-          /* 判断是否最后一步流程 */
-            if(this.actionTitle =='同意并结束'){
-               this.setData("1")
-            }else{
-              this.setData()
+    methods: {
+        // 内嵌url表单,外部url表单 【自定义】
+        emitButtonEventHandler (actionName, args) {
+            // 前置事件
+            this.beforeScript(actionName, (result) => {
+                if (result) {
+                    return this.emitEventHandler(actionName, args)
+                }
+            })
+        },
+        // 设置是否过审的状态
+        setData (title) {
+            let data = title
+            console.log(this.getFormEL())
+            if (!title) {
+                //获取当前流程步骤名
+                data = "已" + this.getFormEL().formDefData.flowName
             }
-          /* if (this.isHide()) { */
-            this.handleDirectActionEvent(actionName)
-          /* } else {
-              this.agreeDialogVisible = true
-            } */
-             break
-        case 'oppose':// 反对
-        	this_.$confirm(
-        				  `确定进行 [ ${args.attributes.label} ] 操作 ?`,
-        				  "提示:",
-        				  {
-        					confirmButtonText: "确定",
-        					cancelButtonText: "取消",
-        					type: "warning"
-        				  }
-        				).then(() => {
-
-        				 /* if (this.isHide()) { */
+            this.getFormEL().setData("shiFouGuoShen", data)
+        },
+        emitEventHandler (actionName, args) {
+            const this_ = this
+            this.actionName = actionName
+            const buttonType = args && args.attributes ? args.attributes.button_type || actionName : actionName
+            this.actionTitle = args && args.attributes ? args.attributes.label : null
+            this.submitFormOpinion = this.getFormOpinionData()
+            switch (buttonType) {
+                case 'agree':// 同意
+                    // 判断是否最后一步流程
+                    if (this.actionTitle == '同意并结束') {
+                        this.setData("1")
+                    } else {
+                        this.setData()
+                    }
+                    // if (this.isHide()) {
+                    this.handleDirectActionEvent(actionName)
+                    // } else {
+                    //     this.agreeDialogVisible = true
+                    // }
+                    break
+                case 'oppose':// 反对
+                    this_.$confirm(
+                        `确定进行 [ ${args.attributes.label} ] 操作 ?`,
+                        "提示:",
+                        {
+                            confirmButtonText: "确定",
+                            cancelButtonText: "取消",
+                            type: "warning"
+                        }
+                    ).then(() => {
+                        // if (this.isHide()) {
                         this.setData("未同意")
-        					    	this.handleDirectActionEvent(actionName)
-        				 /* } else {
-                    this.agreeDialogVisible = true
-        				  } */
-        				  }).catch(() => {
-        				   });
-        				   break
-        case 'abandon':// 弃权
-          			this_.$confirm(
-          				  `确定进行 [ 弃权 ] 操作 ?`,
-          				  "提示:",
-          				  {
-          				    confirmButtonText: "确定",
-          				    cancelButtonText: "取消",
-          				    type: "warning"
-          				  }
-          				).then(() => {
-          				  if (this.isHide()) {
-          					    	this.handleDirectActionEvent(actionName)
-          					    } else {
-                        this.agreeDialogVisible = true
+                        this.handleDirectActionEvent(actionName)
+                        // } else {
+                        //     this.agreeDialogVisible = true
+                        // }
+                    }).catch(() => {})
+                    break
+                case 'abandon':// 弃权
+                    this_.$confirm(
+                        `确定进行 [ 弃权 ] 操作 ?`,
+                        "提示:",
+                        {
+                            confirmButtonText: "确定",
+                            cancelButtonText: "取消",
+                            type: "warning"
                         }
-          				  }).catch(() => {
-          		           });
-              break
-        case 'close': // 关闭窗口
-          this.closeDialog()
-          break
-        case 'flowImage':// 流程图
-          this.flowDiagramVisible = true
-          break
-        case 'approvalHistory': // 审批历史
-          this.approvalHistoryVisible = true
-          break
-        case 'instanceDetail': // 流程实例明细
-          this.instanceDetailVisible = true
-          break
-        case 'startFlow': // 启动流程
-          this.setData("已编制")
-          this.handleStartFlow()
-          break
-        case 'saveDraft': // 保存草稿
-          this.setData("已暂存")
-          this.handleSaveDraft()
-          break
-        case 'rejectToPrevious':// 驳回上一步
-        case 'rejectToStart':// 驳回发起人
-        case 'reject':// 驳回
-        this.setData("已退回")
-          if (this.isBpmOpinionHide && actionName === 'rejectToPrevious') {
-            this.handleDirectActionEvent(actionName)
-          } else {
-            this.rejectDialogVisible = true
-          }
-          break
-        case 'delegate':// 转办
-          this.delegateReadonly = false
-          this.delegateDialogVisible = true
-          break
-        case 'delegateDetail':// 转办/代理明细
-          this.setData()
-          this.delegateReadonly = true
-          this.delegateDialogVisible = true
-          break
-        case 'addSign':// 补签
-          this.addSignTaskDialogVisible = true
-          break
-        case 'endProcess':// 终止流程
-          this.setData("2")
-          this.handleEndProcess()
-          break
-        case 'print':// 打印
-          this.handlePrint()
-          break
-        case 'lock':// 锁定
-          this.handleLock()
-          break
-        case 'unlock':// 解锁
-          this.handleUnlock()
-          break
-        case 'forceUnlock':// 强制解锁
-          this.handleForceUnlock()
-          break
-        case 'suspendProcess':// 挂起流程
-          this.handleSuspendProcess()
-          break
-        case 'recoverProcess':// 撤回流程
-          this.handleRecoverProcess()
-          break
-        case 'save':// 节点按钮设置-保存
-         this.setData("已暂存")
-          this.handleSave()
-          break
-        default:
-          break
-      }
-    },
-    /**
-     * 是否隐藏
-     */
-    isHide() {
-      return (this.isBpmOpinionHide && this.attributes.isHidePath) ||
-      (this.attributes.isCommonJumpType && this.attributes.isHideOpinion && this.attributes.isHidePath) ||
-      (this.attributes.isEnd && this.attributes.isHideOpinion)
-    },
-    /**
-     * 是否保存[节点-按钮设置-保存]
-     */
-    handleSave() {
-      const formData = this.getFormData()
-      const loading = this.$loading({
-        lock: true,
-        text: this.$t('common.saving')
-      })
-      if (!formData) return
-      bpmTaskSave({
-        taskId: this.taskId,
-        data: JSON.stringify(formData)
-      }).then(response => {
-		  loading.close()
-        this.$alert(`已保存表单内容!`, {
-          showClose: false
-        }).then(() => {
-        // 后置事件
-          this.afterScript(this.actionName, {
-            data: response.data,
-            variables: response.variables
-          }, () => {
-            // 回调上个页面
-           // this.callbackPage()
-          })
-        }).catch(() => {
-        })
-      })
-    },
-    /**
-     * 处理启动流程
-     */
-    handleStartFlow() {
-      const firstNodeUserAssign = this.attributes.firstNodeUserAssign || false
-      if (firstNodeUserAssign) {
-        const formData = this.getFormData()
-        if (!formData) return
-        this.submitFormData = formData
-        this.startFlowDialogVisible = true
-      } else {
-        this.saveStartFlow()
-      }
-    },
-    /**
-     * 保存启动流程
-     * @param {*}
-     */
-    saveStartFlow(params = {}) {
-      const formData = this.getFormData()
-      if (!formData) return
-      const jsonData = {
-        defId: this.defId,
-        version: this.version || '0',
-        data: JSON.stringify(formData)
-      }
-      if (this.$utils.isNotEmpty(params.nodeUsers)) {
-        jsonData.nodeUsers = JSON.stringify(params.nodeUsers) || ''
-      }
-      if (this.$utils.isNotEmpty(params.destination)) {
-        jsonData.destination = params.destination || ''
-      }
-
-      if (this.$utils.isNotEmpty(this.proInstId) && !this.copyFlow) {
-        jsonData.proInstId = this.proInstId || ''
-      }
-
-      const loading = this.$loading({
-        lock: true,
-        text: this.$t('common.saving')
-      })
-      // 1、直接启动
-      startFlow(jsonData).then(response => {
-        loading.close()
-        this.$alert(`启动成功!`, {
-          showClose: false
-        }).then(() => {
-          this.startFlowDialogVisible = false
-          // 后置事件
-          this.afterScript(this.actionName, {
-            data: response.data,
-            variables: response.variables
-          }, () => {
-            // 回调上个页面
-            this.callbackPage()
-          })
-        }).catch(() => {})
-      }).catch(() => {
-        loading.close()
-      })
-    },
-    /**
-     * 保存草稿
-     */
-    handleSaveDraft() {
-      // 表单数据
-      const formData = this.getFormData()
-      if (!formData) return
+                    ).then(() => {
+                        if (this.isHide()) {
+                            this.handleDirectActionEvent(actionName)
+                        } else {
+                            this.agreeDialogVisible = true
+                        }
+                    }).catch(() => {})
+                    break
+                case 'close': // 关闭窗口
+                    this.closeDialog()
+                    break
+                case 'flowImage':// 流程图
+                    this.flowDiagramVisible = true
+                    break
+                case 'approvalHistory': // 审批历史
+                    this.approvalHistoryVisible = true
+                    break
+                case 'instanceDetail': // 流程实例明细
+                    this.instanceDetailVisible = true
+                    break
+                case 'startFlow': // 启动流程
+                    this.setData("已编制")
+                    this.handleStartFlow()
+                    break
+                case 'saveDraft': // 保存草稿
+                    this.setData("已暂存")
+                    this.handleSaveDraft()
+                    break
+                case 'rejectToPrevious':// 驳回上一步
+                case 'rejectToStart':// 驳回发起人
+                case 'reject':// 驳回
+                    this.setData("已退回")
+                    if (this.isBpmOpinionHide && actionName === 'rejectToPrevious') {
+                        this.handleDirectActionEvent(actionName)
+                    } else {
+                        this.rejectDialogVisible = true
+                    }
+                    break
+                case 'delegate':// 转办
+                    this.delegateReadonly = false
+                    this.delegateDialogVisible = true
+                    break
+                case 'delegateDetail':// 转办/代理明细
+                    this.setData()
+                    this.delegateReadonly = true
+                    this.delegateDialogVisible = true
+                    break
+                case 'addSign':// 补签
+                    this.addSignTaskDialogVisible = true
+                    break
+                case 'endProcess':// 终止流程
+                    this.setData("2")
+                    this.handleEndProcess()
+                    break
+                case 'print':// 打印
+                    this.handlePrint()
+                    break
+                case 'lock':// 锁定
+                    this.handleLock()
+                    break
+                case 'unlock':// 解锁
+                    this.handleUnlock()
+                    break
+                case 'forceUnlock':// 强制解锁
+                    this.handleForceUnlock()
+                    break
+                case 'suspendProcess':// 挂起流程
+                    this.handleSuspendProcess()
+                    break
+                case 'recoverProcess':// 撤回流程
+                    this.handleRecoverProcess()
+                    break
+                case 'save':// 节点按钮设置-保存
+                    this.setData("已暂存")
+                    this.handleSave()
+                    break
+                default:
+                    break
+            }
+        },
+        /**
+         * 是否隐藏
+         */
+        isHide () {
+            return (this.isBpmOpinionHide && this.attributes.isHidePath) || (this.attributes.isCommonJumpType && this.attributes.isHideOpinion && this.attributes.isHidePath) || (this.attributes.isEnd && this.attributes.isHideOpinion)
+        },
+        // 是否保存[节点-按钮设置-保存]
+        handleSave () {
+            const formData = this.getFormData()
+            const loading = this.$loading({
+                lock: true,
+                text: this.$t('common.saving')
+            })
+            if (!formData) return
+            bpmTaskSave({
+                taskId: this.taskId,
+                data: JSON.stringify(formData)
+            }).then(response => {
+                loading.close()
+                this.$alert(`已保存表单内容!`, {
+                    showClose: false
+                }).then(() => {
+                    // 后置事件
+                    this.afterScript(this.actionName, {
+                        data: response.data,
+                        variables: response.variables
+                    }, () => {
+                        // 回调上个页面
+                        // this.callbackPage()
+                    })
+                }).catch(() => {})
+            })
+        },
+        /**
+         * 处理启动流程
+         */
+        handleStartFlow () {
+            const firstNodeUserAssign = this.attributes.firstNodeUserAssign || false
+            if (firstNodeUserAssign) {
+                const formData = this.getFormData()
+                if (!formData) return
+                this.submitFormData = formData
+                this.startFlowDialogVisible = true
+            } else {
+                this.saveStartFlow()
+            }
+        },
+        /**
+         * 保存启动流程
+         * @param {*}
+         */
+        saveStartFlow (params = {}) {
+            const formData = this.getFormData()
+            if (!formData) return
+            const jsonData = {
+                defId: this.defId,
+                version: this.version || '0',
+                data: JSON.stringify(formData)
+            }
+            if (this.$utils.isNotEmpty(params.nodeUsers)) {
+                jsonData.nodeUsers = JSON.stringify(params.nodeUsers) || ''
+            }
+            if (this.$utils.isNotEmpty(params.destination)) {
+                jsonData.destination = params.destination || ''
+            }
 
-      const jsonData = {
-        defId: this.defId,
-        version: this.version || '',
-        data: JSON.stringify(formData)
-      }
-      if (this.$utils.isNotEmpty(this.proInstId) && !this.copyFlow) {
-        jsonData.proInstId = this.proInstId || ''
-      }
+            if (this.$utils.isNotEmpty(this.proInstId) && !this.copyFlow) {
+                jsonData.proInstId = this.proInstId || ''
+            }
 
-      const loading = this.$loading({
-        lock: true,
-        text: this.$t('common.saving')
-      })
-      saveDraft(jsonData).then(response => {
-        loading.close()
-        this.$alert(`保存成功!`, {
-          showClose: false
-        }).then(() => {
-        // 后置事件
-          this.afterScript(this.actionName, {
-            data: response.data,
-            variables: response.variables
-          }, () => {
-            // 回调上个页面
-            this.callbackPage()
-          })
-        }).catch(() => {
-        })
-      }).catch(() => {
-        loading.close()
-      })
-    },
-    /**
-     * 直接同意流程
-     * @param {*} actionName
-     */
-    handleDirectActionEvent(actionName) {
-      const opinion = this.hasFormOpinion() ? this.getFormOpinionData() : ''
-      this.handleActionEvent(actionName, {
-        opinion: opinion
-      })
-    },
-    /**
-     * 处理按钮事件
-     * @param {*} actionName
-     * @param {*} params
-     */
-    handleActionEvent(actionName, params) {
-      if (actionName === 'agree' ||
-       actionName === 'oppose' ||
-       actionName === 'abandon' ||
-       actionName === 'rejectToPrevious' ||
-       actionName === 'rejectToStart' ||
-       actionName === 'reject'
-      ) {
-        this.handleComplete(actionName, params)
-      } else if (actionName === 'endProcess') {
-        this.handleDoEndProcess(params)
-      } else if (actionName === 'addSign') {
-        this.handleAddSignTask(params)
-      }
-    },
-    handleComplete(actionName, params = {}) {
-      const formData = this.getFormData()
-      if (!formData) return
-      const loading = this.$loading({
-        lock: true,
-        text: this.$t('common.saving')
-      })
-      params.taskId = this.taskId
-      params.data = JSON.stringify(formData)
+            const loading = this.$loading({
+                lock: true,
+                text: this.$t('common.saving')
+            })
+            // 1、直接启动
+            startFlow(jsonData).then(response => {
+                loading.close()
+                this.$alert(`启动成功!`, {
+                    showClose: false
+                }).then(() => {
+                    this.startFlowDialogVisible = false
+                    // 后置事件
+                    this.afterScript(this.actionName, {
+                        data: response.data,
+                        variables: response.variables
+                    }, () => {
+                        // 回调上个页面
+                        this.callbackPage()
+                    })
+                }).catch(() => { })
+            }).catch(() => {
+                loading.close()
+            })
+        },
+        /**
+         * 保存草稿
+         */
+        handleSaveDraft () {
+            // 表单数据
+            const formData = this.getFormData()
+            if (!formData) return
 
-      if (actionName === 'agree') {
-        agree(params).then(response => {
-          this.handleResponse(actionName, loading, response)
-        }).catch(() => {
-          loading.close()
-        })
-      } else if (actionName === 'oppose') {
-        oppose(params).then(response => {
-          this.handleResponse(actionName, loading, response)
-        }).catch(() => {
-          loading.close()
-        })
-      } else if (actionName === 'abandon') {
-        abandon(params).then(response => {
-          this.handleResponse(actionName, loading, response)
-        }).catch(() => {
-          loading.close()
-        })
-      } else if (actionName === 'rejectToPrevious') {
-        rejectToPrevious(params).then(response => {
-          this.handleResponse(actionName, loading, response)
-        }).catch(() => {
-          loading.close()
-        })
-      } else if (actionName === 'rejectToStart') {
-        rejectToStarter(params).then(response => {
-          this.handleResponse(actionName, loading, response)
-        }).catch(() => {
-          loading.close()
-        })
-      } else if (actionName === 'reject') {
-        reject(params).then(response => {
-          this.handleResponse(actionName, loading, response)
-        }).catch(() => {
-          loading.close()
-        })
-      }
-    },
-    handleResponse(actionName, loading, response) {
-      loading.close()
-      this.$alert(response.message, {
-        showClose: false
-      }).then(() => {
-        // 关闭窗口
-        if (actionName === 'agree' || actionName === 'oppose' || actionName === 'abandon') {
-          this.agreeDialogVisible = false
-        } else if (actionName === 'rejectToPrevious' || actionName === 'rejectToStart' || actionName === 'reject') {
-          this.rejectDialogVisible = false
-        }
-        // 后置事件
-        this.afterScript(this.actionName, {
-          data: response.data,
-          variables: response.variables
-        }, () => {
-          // 回调上个页面
-          this.callbackPage()
-        })
-      }).catch(() => {})
-    },
-    handleEndProcess() {
-      if (this.isBpmOpinionHide) {
-        this.$confirm('确定终止流程!', '提示', {
-          type: 'warning'
-        }).then(() => {
-          const opinion = this.hasFormOpinion() ? this.getFormOpinionData() : ''
-          this.handleDoEndProcess({
-            opinion: opinion
-          })
-        }).catch(() => {})
-      } else {
-        this.approveDialogVisible = true
-      }
-    },
-    /**
-     * 处理终止任务
-     * @param {*} params
-     */
-    handleDoEndProcess(params) {
-      const loading = this.$loading({
-        lock: true,
-        text: this.$t('common.saving')
-      })
-      doEndProcess({
-        taskId: this.taskId ? this.taskId : this.endProcessTaskId,
-        endReason: params.opinion
-      }).then(response => {
-        loading.close()
-        this.$alert(response.message, {
-          showClose: false
-        }).then(() => {
-          this.approveDialogVisible = false
-          // 后置事件
-          this.afterScript(this.actionName, {
-            data: response.data,
-            variables: response.variables
-          }, () => {
-            // 回调上个页面
-            this.callbackPage()
-          })
-        })
-      }).catch((err) => {
-        loading.close()
-        console.error(err)
-      })
-    },
-    /**
-     * 补签
-     * @param {*} params
-     */
-    handleAddSignTask(params) {
-      const loading = this.$loading({
-        lock: true,
-        text: this.$t('common.saving')
-      })
-      doAddSignTask({
-        taskId: this.taskId,
-        addSignTaskUserId: params.addSignTaskUserId,
-        messageType: params.messageType,
-        addReason: params.opinion
-      }).then(response => {
-        loading.close()
-        this.$alert(response.message, {
-          showClose: false
-        }).then(() => {
-          this.addSignTaskDialogVisible = false
-          // 后置事件
-          this.afterScript(this.actionName, {
-            data: response.data,
-            variables: response.variables
-          }, () => {
-            // 回调上个页面
-            this.callbackPage()
-          })
-        })
-      }).catch((err) => {
-        loading.close()
-        console.error(err)
-      })
-    },
-    /**
-     * 打印
-     */
-    handlePrint() {
-      if (this.$utils.isNotEmpty(this.printTemplateId)) {
-        this.submitFormData = this.getFormData()
-        // 打开打印模版页面
-        this.formPrintTemplateDialogVisible = true
-      } else {
-        const loading = this.$loading({
-          lock: true,
-          text: this.$t('common.loading')
-        })
-        setTimeout(() => {
-          Print(this.$refs.formrender.$el, {
-            title: '',
-            callback: () => {
-              loading.close()
+            const jsonData = {
+                defId: this.defId,
+                version: this.version || '',
+                data: JSON.stringify(formData)
+            }
+            if (this.$utils.isNotEmpty(this.proInstId) && !this.copyFlow) {
+                jsonData.proInstId = this.proInstId || ''
             }
-          })
-        }, 300)
-      }
-    },
-    /**
-     * 锁定任务
-     */
-    handleLock() {
-      this.$confirm('确定锁定任务!', '提示', {
-        type: 'warning'
-      }).then(() => {
-        const loading = this.$loading({
-          lock: true,
-          text: this.$t('common.saving')
-        })
-        lock({ taskId: this.taskId }).then(response => {
-          loading.close()
-          this.$alert(`锁定任务成功!`, {
-            showClose: false
-          }).then(() => {
-            // 后置事件
-            this.afterScript(this.actionName, {
-              data: response.data,
-              variables: response.variables
-            }, () => {
-              // 回调上个页面
-              this.callbackPage()
+
+            const loading = this.$loading({
+                lock: true,
+                text: this.$t('common.saving')
+            })
+            saveDraft(jsonData).then(response => {
+                loading.close()
+                this.$alert(`保存成功!`, {
+                    showClose: false
+                }).then(() => {
+                    // 后置事件
+                    this.afterScript(this.actionName, {
+                        data: response.data,
+                        variables: response.variables
+                    }, () => {
+                        // 回调上个页面
+                        this.callbackPage()
+                    })
+                }).catch(() => {})
+            }).catch(() => {
+                loading.close()
             })
-          }).catch(() => {})
-        }).catch(() => {
-          loading.close()
-        })
-      }).catch(() => {})
-    },
-    /**
-     * 解锁任务
-     */
-    handleUnlock() {
-      this.$confirm('确定解锁任务!', '提示', {
-        type: 'warning'
-      }).then(() => {
-        const loading = this.$loading({
-          lock: true,
-          text: this.$t('common.saving')
-        })
-        unlock({ taskId: this.taskId }).then(response => {
-          loading.close()
-          this.$alert(`解锁任务成功!`, {
-            showClose: false
-          }).then(() => {
-            // 后置事件
-            this.afterScript(this.actionName, {
-              data: response.data,
-              variables: response.variables
-            }, () => {
-              // 回调上个页面
-              this.callbackPage()
+        },
+        /**
+         * 直接同意流程
+         * @param {*} actionName
+         */
+        handleDirectActionEvent (actionName) {
+            const opinion = this.hasFormOpinion() ? this.getFormOpinionData() : ''
+            this.handleActionEvent(actionName, {
+                opinion: opinion
+            })
+        },
+        /**
+         * 处理按钮事件
+         * @param {*} actionName
+         * @param {*} params
+         */
+        handleActionEvent (actionName, params) {
+            if (actionName === 'agree' || actionName === 'oppose' || actionName === 'abandon' || actionName === 'rejectToPrevious' || actionName === 'rejectToStart' || actionName === 'reject') {
+                this.handleComplete(actionName, params)
+            } else if (actionName === 'endProcess') {
+                this.handleDoEndProcess(params)
+            } else if (actionName === 'addSign') {
+                this.handleAddSignTask(params)
+            }
+        },
+        handleComplete (actionName, params = {}) {
+            const formData = this.getFormData()
+            if (!formData) return
+            const loading = this.$loading({
+                lock: true,
+                text: this.$t('common.saving')
             })
-          }).catch(() => {})
-        }).catch(() => {
-          loading.close()
-        })
-      }).catch(() => {})
-    },
+            params.taskId = this.taskId
+            params.data = JSON.stringify(formData)
 
-    /**
-     * 强制解锁任务
-     */
-    handleForceUnlock() {
-      this.$confirm('确定强制解锁任务!', '提示', {
-        type: 'warning'
-      }).then(() => {
-        const loading = this.$loading({
-          lock: true,
-          text: this.$t('common.saving')
-        })
-        unlock({ taskId: this.taskId }).then(response => {
-          loading.close()
-          this.$alert(`强制解锁任务成功!`, {
-            showClose: false
-          }).then(() => {
-            // 后置事件
-            this.afterScript(this.actionName, {
-              data: response.data,
-              variables: response.variables
-            }, () => {
-              // 回调上个页面
-              this.callbackPage()
+            if (actionName === 'agree') {
+                agree(params).then(response => {
+                    this.handleResponse(actionName, loading, response)
+                }).catch(() => {
+                    loading.close()
+                })
+            } else if (actionName === 'oppose') {
+                oppose(params).then(response => {
+                    this.handleResponse(actionName, loading, response)
+                }).catch(() => {
+                    loading.close()
+                })
+            } else if (actionName === 'abandon') {
+                abandon(params).then(response => {
+                    this.handleResponse(actionName, loading, response)
+                }).catch(() => {
+                    loading.close()
+                })
+            } else if (actionName === 'rejectToPrevious') {
+                rejectToPrevious(params).then(response => {
+                    this.handleResponse(actionName, loading, response)
+                }).catch(() => {
+                    loading.close()
+                })
+            } else if (actionName === 'rejectToStart') {
+                rejectToStarter(params).then(response => {
+                    this.handleResponse(actionName, loading, response)
+                }).catch(() => {
+                    loading.close()
+                })
+            } else if (actionName === 'reject') {
+                reject(params).then(response => {
+                    this.handleResponse(actionName, loading, response)
+                }).catch(() => {
+                    loading.close()
+                })
+            }
+        },
+        handleResponse (actionName, loading, response) {
+            loading.close()
+            this.$alert(response.message, {
+                showClose: false
+            }).then(() => {
+                // 关闭窗口
+                if (actionName === 'agree' || actionName === 'oppose' || actionName === 'abandon') {
+                    this.agreeDialogVisible = false
+                } else if (actionName === 'rejectToPrevious' || actionName === 'rejectToStart' || actionName === 'reject') {
+                    this.rejectDialogVisible = false
+                }
+                // 后置事件
+                this.afterScript(this.actionName, {
+                    data: response.data,
+                    variables: response.variables
+                }, () => {
+                    // 回调上个页面
+                    this.callbackPage()
+                })
+            }).catch(() => { })
+        },
+        handleEndProcess () {
+            if (this.isBpmOpinionHide) {
+                this.$confirm('确定终止流程!', '提示', {
+                    type: 'warning'
+                }).then(() => {
+                    const opinion = this.hasFormOpinion() ? this.getFormOpinionData() : ''
+                    this.handleDoEndProcess({
+                        opinion: opinion
+                    })
+                }).catch(() => { })
+            } else {
+                this.approveDialogVisible = true
+            }
+        },
+        /**
+         * 处理终止任务
+         * @param {*} params
+         */
+        handleDoEndProcess (params) {
+            const loading = this.$loading({
+                lock: true,
+                text: this.$t('common.saving')
             })
-          }).catch(() => {})
-        }).catch(() => {
-          loading.close()
-        })
-      }).catch(() => {})
-    },
-    /**
-     * 挂起任务
-     */
-    handleSuspendProcess() {
-      this.$confirm('确定挂起任务', '提示', {
-        type: 'warning'
-      }).then(() => {
-        const loading = this.$loading({
-          lock: true,
-          text: this.$t('common.saving')
-        })
-        suspendProcess({ taskId: this.taskId }).then(response => {
-          loading.close()
-          this.$alert(`挂起任务成功!`, {
-            showClose: false
-          }).then(() => {
-            // 后置事件
-            this.afterScript(this.actionName, {
-              data: response.data,
-              variables: response.variables
-            }, () => {
-              // 回调上个页面
-              this.callbackPage()
+            doEndProcess({
+                taskId: this.taskId ? this.taskId : this.endProcessTaskId,
+                endReason: params.opinion
+            }).then(response => {
+                loading.close()
+                this.$alert(response.message, {
+                    showClose: false
+                }).then(() => {
+                    this.approveDialogVisible = false
+                    // 后置事件
+                    this.afterScript(this.actionName, {
+                        data: response.data,
+                        variables: response.variables
+                    }, () => {
+                        // 回调上个页面
+                        this.callbackPage()
+                    })
+                })
+            }).catch((err) => {
+                loading.close()
+                console.error(err)
             })
-          }).catch(() => {})
-        }).catch(() => {
-          loading.close()
-        })
-      }).catch(() => {})
-    },
-    /**
-     * 恢复任务
-     */
-    handleRecoverProcess() {
-      this.$confirm('确定恢复任务', '提示', {
-        type: 'warning'
-      }).then(() => {
-        const loading = this.$loading({
-          lock: true,
-          text: this.$t('common.saving')
-        })
-        recoverProcess({
-          taskId: this.taskId
-        }).then(response => {
-          loading.close()
-          this.$alert(`恢复任务成功!`, {
-            showClose: false
-          }).then(() => {
-            // 后置事件
-            this.afterScript(this.actionName, {
-              data: response.data,
-              variables: response.variables
-            }, () => {
-              // 回调上个页面
-              this.callbackPage()
+        },
+        /**
+         * 补签
+         * @param {*} params
+         */
+        handleAddSignTask (params) {
+            const loading = this.$loading({
+                lock: true,
+                text: this.$t('common.saving')
             })
-          })
-        }).catch(() => {
-          loading.close()
-        })
-      }).catch(() => {
+            doAddSignTask({
+                taskId: this.taskId,
+                addSignTaskUserId: params.addSignTaskUserId,
+                messageType: params.messageType,
+                addReason: params.opinion
+            }).then(response => {
+                loading.close()
+                this.$alert(response.message, {
+                    showClose: false
+                }).then(() => {
+                    this.addSignTaskDialogVisible = false
+                    // 后置事件
+                    this.afterScript(this.actionName, {
+                        data: response.data,
+                        variables: response.variables
+                    }, () => {
+                        // 回调上个页面
+                        this.callbackPage()
+                    })
+                })
+            }).catch((err) => {
+                loading.close()
+                console.error(err)
+            })
+        },
+        /**
+         * 打印
+         */
+        handlePrint () {
+            if (this.$utils.isNotEmpty(this.printTemplateId)) {
+                this.submitFormData = this.getFormData()
+                // 打开打印模版页面
+                this.formPrintTemplateDialogVisible = true
+            } else {
+                const loading = this.$loading({
+                    lock: true,
+                    text: this.$t('common.loading')
+                })
+                setTimeout(() => {
+                    Print(this.$refs.formrender.$el, {
+                        title: '',
+                        callback: () => {
+                            loading.close()
+                        }
+                    })
+                }, 300)
+            }
+        },
+        /**
+         * 锁定任务
+         */
+        handleLock () {
+            this.$confirm('确定锁定任务!', '提示', {
+                type: 'warning'
+            }).then(() => {
+                const loading = this.$loading({
+                    lock: true,
+                    text: this.$t('common.saving')
+                })
+                lock({ taskId: this.taskId }).then(response => {
+                    loading.close()
+                    this.$alert(`锁定任务成功!`, {
+                        showClose: false
+                    }).then(() => {
+                        // 后置事件
+                        this.afterScript(this.actionName, {
+                            data: response.data,
+                            variables: response.variables
+                        }, () => {
+                            // 回调上个页面
+                            this.callbackPage()
+                        })
+                    }).catch(() => { })
+                }).catch(() => {
+                    loading.close()
+                })
+            }).catch(() => { })
+        },
+        /**
+         * 解锁任务
+         */
+        handleUnlock () {
+            this.$confirm('确定解锁任务!', '提示', {
+                type: 'warning'
+            }).then(() => {
+                const loading = this.$loading({
+                    lock: true,
+                    text: this.$t('common.saving')
+                })
+                unlock({ taskId: this.taskId }).then(response => {
+                    loading.close()
+                    this.$alert(`解锁任务成功!`, {
+                        showClose: false
+                    }).then(() => {
+                        // 后置事件
+                        this.afterScript(this.actionName, {
+                            data: response.data,
+                            variables: response.variables
+                        }, () => {
+                            // 回调上个页面
+                            this.callbackPage()
+                        })
+                    }).catch(() => { })
+                }).catch(() => {
+                    loading.close()
+                })
+            }).catch(() => { })
+        },
+        /**
+         * 强制解锁任务
+         */
+        handleForceUnlock () {
+            this.$confirm('确定强制解锁任务!', '提示', {
+                type: 'warning'
+            }).then(() => {
+                const loading = this.$loading({
+                    lock: true,
+                    text: this.$t('common.saving')
+                })
+                unlock({ taskId: this.taskId }).then(response => {
+                    loading.close()
+                    this.$alert(`强制解锁任务成功!`, {
+                        showClose: false
+                    }).then(() => {
+                        // 后置事件
+                        this.afterScript(this.actionName, {
+                            data: response.data,
+                            variables: response.variables
+                        }, () => {
+                            // 回调上个页面
+                            this.callbackPage()
+                        })
+                    }).catch(() => { })
+                }).catch(() => {
+                    loading.close()
+                })
+            }).catch(() => { })
+        },
+        /**
+         * 挂起任务
+         */
+        handleSuspendProcess () {
+            this.$confirm('确定挂起任务', '提示', {
+                type: 'warning'
+            }).then(() => {
+                const loading = this.$loading({
+                    lock: true,
+                    text: this.$t('common.saving')
+                })
+                suspendProcess({ taskId: this.taskId }).then(response => {
+                    loading.close()
+                    this.$alert(`挂起任务成功!`, {
+                        showClose: false
+                    }).then(() => {
+                        // 后置事件
+                        this.afterScript(this.actionName, {
+                            data: response.data,
+                            variables: response.variables
+                        }, () => {
+                            // 回调上个页面
+                            this.callbackPage()
+                        })
+                    }).catch(() => { })
+                }).catch(() => {
+                    loading.close()
+                })
+            }).catch(() => { })
+        },
+        /**
+         * 恢复任务
+         */
+        handleRecoverProcess () {
+            this.$confirm('确定恢复任务', '提示', {
+                type: 'warning'
+            }).then(() => {
+                const loading = this.$loading({
+                    lock: true,
+                    text: this.$t('common.saving')
+                })
+                recoverProcess({
+                    taskId: this.taskId
+                }).then(response => {
+                    loading.close()
+                    this.$alert(`恢复任务成功!`, {
+                        showClose: false
+                    }).then(() => {
+                        // 后置事件
+                        this.afterScript(this.actionName, {
+                            data: response.data,
+                            variables: response.variables
+                        }, () => {
+                            // 回调上个页面
+                            this.callbackPage()
+                        })
+                    })
+                }).catch(() => {
+                    loading.close()
+                })
+            }).catch(() => {
 
-      })
-    },
-    finishTask(actionName, params, callback) {
+            })
+        },
+        finishTask (actionName, params, callback) {
 
+        }
     }
-  }
-}
+}

+ 5 - 1
src/business/platform/bpmn/form/index.vue

@@ -569,12 +569,16 @@ export default {
         })
       }
       const buttons = []
+      // 去除打印按钮和流程审批意见按钮
+      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
-        buttons.push(button)
+        if (!filterType.includes(button.key)) {
+            buttons.push(button)
+        }
       }
       const bpmnButton = new BpmnButton({
         buttons: buttons,

+ 20 - 13
src/business/platform/data/constants/buttons.js

@@ -66,16 +66,23 @@ const buttons = {
     icon: 'ibps-icon-export',
     scope: ['toolbar'],
     menus: [
-	{
-		label: '导出选中',
-		key: 'exportSelected'
-	},{
-      label: '导出所有',
-      key: 'exportAll'
-    }, {
-      label: '导出当前页',
-      key: 'exportCurPage'
-    }]
+      {
+        label: '导出选中',
+        key: 'exportSelected'
+      }, {
+        label: '导出所有',
+        key: 'exportAll'
+      }, {
+        label: '导出当前页',
+        key: 'exportCurPage'
+      }]
+  },
+  // 导出字段需要在导出按钮那里设置
+  'exportMuBan': {
+    label: '导出模板',
+    type: 'primary',
+    icon: 'ibps-icon-export',
+    scope: ['toolbar'],
   },
   'close': {
     label: '关闭',
@@ -187,7 +194,7 @@ export const hasPermission = hasButtonPermission
 /*
  * 是否有按钮
  */
-export const hasButton = function(type, action, position) {
+export const hasButton = function (type, action, position) {
   var hasPermission = hasButtonPermission(type, action)
   if (!hasPermission) { return false }// 没有权限
   if (!position || position === 'all' || position === action) { return true }
@@ -197,7 +204,7 @@ export const hasButton = function(type, action, position) {
 /**
 * 是否有右键菜单权限
 */
-export const hasContextmenuButton = function(type, action, p) {
+export const hasContextmenuButton = function (type, action, p) {
   var hasPermission = hasButtonPermission(type, action)
   if (!hasPermission) { return false }// 没有权限
   var contextmenu = buttons[type]['contextmenu']
@@ -209,6 +216,6 @@ export const hasContextmenuButton = function(type, action, p) {
  * 是否有搜索权限
  * @param {*} type
  */
-export const hasSearchPermission = function(type) {
+export const hasSearchPermission = function (type) {
   return hasButtonPermission(type, 'search')
 }

+ 1 - 1
src/business/platform/data/templatebuilder/right-aside/constants/default-value.js

@@ -89,7 +89,7 @@ export const fucntionButtonDefaultValue = {
   position: 'all'
 }
 
-export const functionListButtonTypes = ['search', 'resetSearch', 'add', 'remove', 'edit', 'detail', 'print', 'import', 'export', 'sefStartFlow', 'custom']
+export const functionListButtonTypes = ['search', 'resetSearch', 'add', 'remove', 'edit', 'detail', 'print', 'import', 'export', 'sefStartFlow', 'custom', 'exportMuBan']
 // export const functionListButtonTypes = ['search', 'resetSearch', 'add', 'remove', 'edit', 'detail', 'sefStartFlow', 'custom']
 
 // export const functionTreeButtonTypes = ['refresh', 'expand', 'compress', 'custom']

+ 110 - 223
src/business/platform/data/templaterender/templates/list.vue

@@ -1,52 +1,25 @@
 <template>
   <div>
-    <ibps-crud
-      v-if="$utils.isNotEmpty(listConfig)"
-      ref="crud"
-      :data="listData"
-      :pk-key="pkKey"
-      :toolbars="listConfig.toolbars"
-      :search-form="listConfig.searchForm"
-      :columns="listConfig.columns"
-      :row-handle="listConfig.rowHandle"
-      :pagination="pagination"
-      :show-pagination="showPagination"
-      :height="tableHeight"
-      :index-row="indexRow"
-      :loading="loading"
-      :selection-type="selectionType"
-      :display-field="displayField"
-      :display-field-data="displayFieldData"
-      class="hidden-print"
-      :dynamicParams="dynamicParams"
-      :formName= "template ? template.attrs.form_name: ''"
-      :class="{
+    <ibps-crud v-if="$utils.isNotEmpty(listConfig)" ref="crud" :data="listData" :pk-key="pkKey"
+      :toolbars="listConfig.toolbars" :search-form="listConfig.searchForm" :columns="listConfig.columns"
+      :row-handle="listConfig.rowHandle" :pagination="pagination" :show-pagination="showPagination"
+      :height="tableHeight" :index-row="indexRow" :loading="loading" :selection-type="selectionType"
+      :display-field="displayField" :display-field-data="displayFieldData" class="hidden-print"
+      :dynamicParams="dynamicParams" :formName="template ? template.attrs.form_name : ''" :class="{
         'ibps-data-template-list__preview': preview
-      }"
-      @display-field-change="handleDisplayField"
-      @header-dragend="handleHeaderDragend"
-      @selection-change="handleSelectionChange"
-      @action-event="handleAction"
-      @sort-change="handleSortChange"
-      @pagination-change="handlePaginationChange"
-    >
+      }" @display-field-change="handleDisplayField" @header-dragend="handleHeaderDragend"
+      @selection-change="handleSelectionChange" @action-event="handleAction" @sort-change="handleSortChange"
+      @pagination-change="handlePaginationChange">
       <!--自定义查询条件-->
       <template v-slot:searchForm>
-        <search-form
-          v-if="listConfig.searchForm"
-          ref="searchForm"
-          :forms="listConfig.searchForm.forms||[]"
-          :size="listConfig.searchForm.size"
-          :fuzzy="listConfig.searchForm.fuzzy"
-          :inline="listConfig.searchForm.inline"
-          :label-width="listConfig.searchForm.labelWidth"
-          :item-width="listConfig.searchForm.itemWidth"
-          @search="search"
-        />
+        <search-form v-if="listConfig.searchForm" ref="searchForm" :forms="listConfig.searchForm.forms || []"
+          :size="listConfig.searchForm.size" :fuzzy="listConfig.searchForm.fuzzy" :inline="listConfig.searchForm.inline"
+          :label-width="listConfig.searchForm.labelWidth" :item-width="listConfig.searchForm.itemWidth"
+          @search="search" />
       </template>
       <!--数字-->
       <template v-slot:number="scope">
-        {{ scope.value |filterNumber(scope.column.field_options) }}
+        {{ scope.value | filterNumber(scope.column.field_options) }}
       </template>
       <!--多行-->
       <template v-slot:textarea="scope">
@@ -58,52 +31,34 @@
       </template>
       <!--数据字典-->
       <template v-slot:dictionary="scope">
-        <dictionary-format
-          :value="scope.value"
-          :multiple="$utils.toBoolean( scope.column.field_options.multiple,true)"
+        <dictionary-format :value="scope.value" :multiple="$utils.toBoolean(scope.column.field_options.multiple, true)"
           :dict="{
-            typeKey:scope.column.field_options.dictionary,
-            displayMode:scope.column.field_options.display_mode
-          }"
-        />
+            typeKey: scope.column.field_options.dictionary,
+            displayMode: scope.column.field_options.display_mode
+          }" />
       </template>
       <!--附件-->
       <template v-slot:attachment="scope">
-          <ibps-attachment
-            v-if="$utils.isNotEmpty(scope.column) && scope.value"
-            v-model="scope.value"
-            :multiple="$utils.toBoolean( scope.column.field_options.multiple,true)"
-            :download="false"
-            :store="scope.column.field_options.store"
-            :readonly="true"
-          />
+        <ibps-attachment v-if="$utils.isNotEmpty(scope.column) && scope.value" v-model="scope.value"
+          :multiple="$utils.toBoolean(scope.column.field_options.multiple, true)" :download="false"
+          :store="scope.column.field_options.store" :readonly="true" />
       </template>
       <!--选择器-->
       <template v-slot:selector="scope">
-        <ibps-user-selector
-          v-if="$utils.isNotEmpty(scope.column)"
-          v-model="scope.value"
-          :type="scope.column.field_options.selector_type||'user'"
-          :multiple="$utils.toBoolean( scope.column.field_options.multiple,true)"
-          :store="scope.column.field_options.store||'id'"
-          disabled
-          readonly-text="text"
-        />
+        <ibps-user-selector v-if="$utils.isNotEmpty(scope.column)" v-model="scope.value"
+          :type="scope.column.field_options.selector_type || 'user'"
+          :multiple="$utils.toBoolean(scope.column.field_options.multiple, true)"
+          :store="scope.column.field_options.store || 'id'" disabled readonly-text="text" />
       </template>
       <!--自定义对话框-->
       <template v-slot:customDialog="scope">
-        <ibps-custom-dialog
-          v-if="$utils.isNotEmpty(scope.column)"
-          v-model="scope.value"
+        <ibps-custom-dialog v-if="$utils.isNotEmpty(scope.column)" v-model="scope.value"
           :template-key="scope.column.field_options.dialog"
-          :multiple="$utils.toBoolean( scope.column.field_options.multiple,true)"
+          :multiple="$utils.toBoolean(scope.column.field_options.multiple, true)"
           :store="scope.column.field_options.store"
-           :dynamic-params="getLinkDynamicParams(scope.column.field_options,scope.row)"
-          :icon="scope.column.field_options.icon?'ibps-icon-'+scope.column.field_options.icon:''"
-          :type="scope.column.field_options.dialog_type"
-          readonly-text="text"
-          disabled
-        />
+          :dynamic-params="getLinkDynamicParams(scope.column.field_options, scope.row)"
+          :icon="scope.column.field_options.icon ? 'ibps-icon-' + scope.column.field_options.icon : ''"
+          :type="scope.column.field_options.dialog_type" readonly-text="text" disabled />
       </template>
       <!--关联数据-->
       <template v-slot:linkdata="scope">
@@ -116,139 +71,67 @@
           :label-type="getLinkLabelType(scope.column.field_options)"
           :label-key="getLinkLabelKey(scope.column.field_options)"
         > -->
-        <ibps-link-data
-          v-if="$utils.isNotEmpty(scope.column)"
-          v-model="scope.value"
+        <ibps-link-data v-if="$utils.isNotEmpty(scope.column)" v-model="scope.value"
           :template-key="scope.column.field_options.linkdata"
-          :multiple="$utils.toBoolean( scope.column.field_options.multiple,true)"
-          :dynamic-params="getLinkDynamicParams(scope.column.field_options,scope.row)"
+          :multiple="$utils.toBoolean(scope.column.field_options.multiple, true)"
+          :dynamic-params="getLinkDynamicParams(scope.column.field_options, scope.row)"
           :has-dynamic-params="hasDynamicParams(scope.column.field_options)"
           :value-key="getLinkValueKey(scope.column.field_options)"
           :label-type="getLinkLabelType(scope.column.field_options)"
           :label-key="getLinkLabelKey(scope.column.field_options)"
-          :structure="getLinkStructure(scope.column.field_options)"
-          :config="getLinkConfig(scope.column.field_options)"
-          readonly
-          readonly-text="text"
-          allow-empty-dynamic-params
-        />
+          :structure="getLinkStructure(scope.column.field_options)" :config="getLinkConfig(scope.column.field_options)"
+          readonly readonly-text="text" allow-empty-dynamic-params />
       </template>
       <!--地址-->
       <template v-slot:address="scope">
         <template v-if="$utils.isNotEmpty(scope.column)">
-          <ibps-address
-            :value="getAddressValue(scope.value,scope.column.field_options)"
-            :size="scope.column.field_options.size"
-            :top="scope.column.field_options.top || 'country'"
+          <ibps-address :value="getAddressValue(scope.value, scope.column.field_options)"
+            :size="scope.column.field_options.size" :top="scope.column.field_options.top || 'country'"
             :top-val="getAddressTopVal(scope.column.field_options)"
-            :level="scope.column.field_options.level||'district'"
-            data-type="code"
-            :disabled="true"
-            readonly-text="text"
-          />
+            :level="scope.column.field_options.level || 'district'" data-type="code" :disabled="true"
+            readonly-text="text" />
           <span v-if="scope.column.field_options.is_street">{{ getStreet(scope.value) }}</span>
         </template>
       </template>
       <!--图片-->
       <template v-slot:image="scope">
-        <ibps-image
-          v-if="$utils.isNotEmpty(scope.column)"
-          height="45"
-          width="45"
-          v-model="scope.value"
-          :multiple="$utils.toBoolean( scope.column.field_options.multiple,true)"
-          :download="scope.column.field_options.download"
-          :store="scope.column.field_options.store"
-          :disabled="true"
-        />
+        <ibps-image v-if="$utils.isNotEmpty(scope.column)" height="45" width="45" v-model="scope.value"
+          :multiple="$utils.toBoolean(scope.column.field_options.multiple, true)"
+          :download="scope.column.field_options.download" :store="scope.column.field_options.store" :disabled="true" />
       </template>
 
       <template v-slot:customFormatter="scope">
-        <div v-html="customFormatter(scope.column.prop,scope.value,scope.row,scope.column)" />
+        <div v-html="customFormatter(scope.column.prop, scope.value, scope.row, scope.column)" />
       </template>
     </ibps-crud>
 
-    <data-template-formrender-dialog
-      ref="formrender"
-      :visible="dialogFormVisible"
-      :form-key="formKey"
-      :print-template-id="printTemplateId"
-      :default-data="defaultFormData"
-      :dynamicParams = "dynamicParams"
-      :pk-value="pkValue"
-      :toolbars="editToolbars"
-      :readonly="readonly"
-      :template-key="dataTemplate.key"
-      :addDataCont = "addDataCont"
-      @callback="search"
-      @close="visible => dialogFormVisible = visible"
-    />
+    <data-template-formrender-dialog ref="formrender" :visible="dialogFormVisible" :form-key="formKey"
+      :print-template-id="printTemplateId" :default-data="defaultFormData" :dynamicParams="dynamicParams"
+      :pk-value="pkValue" :toolbars="editToolbars" :readonly="readonly" :template-key="dataTemplate.key"
+      :addDataCont="addDataCont" @callback="search" @close="visible => dialogFormVisible = visible" />
     <!-- 流程定义选择器 -->
-    <bpm-def-dialog
-      v-model="dialogValue"
-      :visible="dialogVisible"
-      :form-key="formKey"
-      :multiple="false"
-      :is-data-template-use="true"
-      @close="visible => dialogVisible = visible"
-      @action-event="handleDialogActionEvent"
-    />
+    <bpm-def-dialog v-model="dialogValue" :visible="dialogVisible" :form-key="formKey" :multiple="false"
+      :is-data-template-use="true" @close="visible => dialogVisible = visible"
+      @action-event="handleDialogActionEvent" />
     <!-- 字段导出  -->
-    <ibps-export-columns-dialog
-      :visible="exportColumnsVisible"
-      :data="template"
-      :action="action"
-      :pagination="pagination"
-      @callback="callbackExtFields"
-      @close="visible => exportColumnsVisible = visible"
-    />
+    <ibps-export-columns-dialog :visible="exportColumnsVisible" :data="template" :action="action"
+      :pagination="pagination" @callback="callbackExtFields" @close="visible => exportColumnsVisible = visible" />
     <!-- 字段导入  -->
-    <ibps-import-columns-dialog
-      :visible="importColumnsVisible"
-      :data="template"
-      :fields="fields"
-      :data-template="dataTemplate"
-      @saveUpload="initData"
-      @close="visible => importColumnsVisible = visible"
-    />
+    <ibps-import-columns-dialog :visible="importColumnsVisible" :data="template" :fields="fields"
+      :data-template="dataTemplate" @saveUpload="initData" @close="visible => importColumnsVisible = visible" />
     <!-- ______________-->
-    <ibps-data-template-render-dialog
-      :visible="templateDialogVisible"
-      :template-key="templateDialogKey"
-      :dynamic-params="templateDialogDynamicParams"
-      @close="visible => templateDialogVisible = visible"
-      @action-event="handleTemplateDialogActionEvent"
-    />
+    <ibps-data-template-render-dialog :visible="templateDialogVisible" :template-key="templateDialogKey"
+      :dynamic-params="templateDialogDynamicParams" @close="visible => templateDialogVisible = visible"
+      @action-event="handleTemplateDialogActionEvent" />
     <!-- 表单打印-->
-    <form-print-template
-      :id="printTemplateId"
-      :pk="pkValue"
-      :visible="formPrintTemplateDialogVisible"
-      @close="visible => formPrintTemplateDialogVisible = visible"
-    />
-    <component
-      :is="dialogTemplate"
-      v-if="dialogTemplate"
-      ref="dialogTemplate"
-      v-bind="dialogTemplateAtts"
-    />
-    <bpmn-formrender
-      :visible="npmDialogFormVisible"
-      :def-id="defId"
-      :instance-id="instanceId"
-      :task-id="taskId"
-      :addDataCont = "addDataCont"
-      @callback="search"
-      @close="loadFlowFData"
-    />
-    <Scan
-      :currentScan = "scanName"
-      :scanVisible = "scanVisible"
-      :obj = "obj"
-      v-if="scanVisible"
-      @scanOff = "scanOff"
-    />
-    <print :show="showPrint" :list="printList" :type="printType"/>
+    <form-print-template :id="printTemplateId" :pk="pkValue" :visible="formPrintTemplateDialogVisible"
+      @close="visible => formPrintTemplateDialogVisible = visible" />
+    <component :is="dialogTemplate" v-if="dialogTemplate" ref="dialogTemplate" v-bind="dialogTemplateAtts" />
+    <bpmn-formrender :visible="npmDialogFormVisible" :def-id="defId" :instance-id="instanceId" :task-id="taskId"
+      :addDataCont="addDataCont" @callback="search" @close="loadFlowFData" />
+    <Scan :currentScan="scanName" :scanVisible="scanVisible" :obj="obj" v-if="scanVisible" @scanOff="scanOff" />
+    <print :show="showPrint" :list="printList" :type="printType" />
+
   </div>
 </template>
 <script>
@@ -311,7 +194,7 @@ export default {
     DictionaryFormat,
     Scan,
     Print: () => import('../components/print')
-   // BpmnFormrender
+    // BpmnFormrender
     // DataTemplateFormat
   },
   filters: {
@@ -337,26 +220,26 @@ export default {
       default: false
     }
   },
- destroyed(){
-	if(this.dataTemplate.type !=="dialog"){
-	 JTemplate.cleanEvents()
-	 }
+  destroyed() {
+    if (this.dataTemplate.type !== "dialog") {
+      JTemplate.cleanEvents()
+    }
   },
   data() {
     return {
       npmDialogFormVisible: false, // 弹窗
       defId: '', // 编辑dialog需要使用
-      instanceId:'',//流程查看办理详情
-      taskId:'',//流程进入当前任务
+      instanceId: '',//流程查看办理详情
+      taskId: '',//流程进入当前任务
 
       dialogValue: {},
       dialogVisible: false,
       sefStartFlowId: '',
-      addDataCont:{},
+      addDataCont: {},
       defaultFormData: {},
-      scanVisible:false,
-      scanName:'',
-      obj:'',
+      scanVisible: false,
+      scanName: '',
+      obj: '',
 
       initialization: false,
       tableHeight: document.body.clientHeight,
@@ -373,7 +256,7 @@ export default {
         page: 1,
         limit: 20
       },
-      form_name:'',
+      form_name: '',
       indexRow: false,
       displayField: '',
       displayFieldData: [],
@@ -759,20 +642,20 @@ export default {
     // 查询数据
     search() {
       this.loadData()
-      this.addDataCont={}
+      this.addDataCont = {}
     },
     /* 流程页面关闭,刷新当前页面*/
-    loadFlowFData(){
+    loadFlowFData() {
       this.npmDialogFormVisible = false
-      this.addDataCont={}
+      this.addDataCont = {}
     },
     /*扫码操作*/
-    scanHandler(val){
+    scanHandler(val) {
       this.scanVisible = true
       this.scanName = val
     },
     /*按钮传参*/
-    scanHandlerObj(val,obj){
+    scanHandlerObj(val, obj) {
       this.scanVisible = true
       this.scanName = val
       this.obj = obj
@@ -784,7 +667,7 @@ export default {
       this.printType = type
     },
     /* 返回关闭*/
-    scanOff(val){
+    scanOff(val) {
       this.scanVisible = false
       this.scanName = ''
       this.search()
@@ -837,6 +720,7 @@ export default {
     handleAction(command, position, selection, data, index, button) {
       const buttonType = button.button_type || button.key
       this.action = buttonType
+
       // 前置事件
       this.beforeScript(command, position, selection, data, () => {
         this.readonly = false
@@ -874,7 +758,7 @@ export default {
                 }).then(() => {
                   this.$message.success("流程任务正在[异步操作]启动中...(期间可做其它操作!)")
                   this.handleStartFlowFromList(ids, button.deflow, this.getFormKey())
-                }).catch(() => {})
+                }).catch(() => { })
               } else {
                 this.dialogVisible = true
                 this.dialogValue = {}
@@ -895,6 +779,9 @@ export default {
           case 'exportAll':// 导出所有
             this.exportActions(buttonType)
             break
+          case 'exportMuBan':// 导出模板
+            this.exportActions(buttonType)
+            break
           case 'exportSelected':// 导出选中
             ActionUtils.selectedMultiRecord(selection).then((ids) => {
               this.selecteds = ids
@@ -985,11 +872,11 @@ export default {
       }
 
       response_data.fields = fieldsArr
-
       params.action = buttonType
 
       params['response_data'] = JSON.stringify(response_data)
 
+
       if (this.$utils.isNotEmpty(exportColumns)) {
         const export_columns = {
           export_type: template.export_columns.export_type,
@@ -1000,7 +887,7 @@ export default {
       }
       let saveData
 
-      if (buttonType === 'exportAll') {
+      if (buttonType === 'exportAll' || buttonType === 'exportMuBan') {
         saveData = ActionUtils.formatParams(params, pagination, sorts)
       }
       if (buttonType === 'exportSelected') {
@@ -1108,7 +995,7 @@ export default {
         rowHandle = {
           effect: this.manageEffect ? 'display' : 'default',
           actions: manageButtons,
-          columnHeader: this.template.attrs.manage_effect == 'Y' ||this.template.attrs.manage_effect == 'N' ? null : this.template.attrs.manage_effect
+          columnHeader: this.template.attrs.manage_effect == 'Y' || this.template.attrs.manage_effect == 'N' ? null : this.template.attrs.manage_effect
         }
       }
       // 查询字段
@@ -1162,7 +1049,7 @@ export default {
     /**
    * 判断参数是否是其中之一
    */
-    oneOf: function(obj, validList, key, key1) {
+    oneOf: function (obj, validList, key, key1) {
       for (let i = 0; i < validList.length; i++) {
         if (obj[key] === validList[i][key1]) {
           return true
@@ -1214,7 +1101,7 @@ export default {
       }
     },
     // 自定义格式数据事件
-    hasButtonAction: function(key, button) {
+    hasButtonAction: function (key, button) {
       const buttonActionResult = JTemplate._onLoadActions(this, key, button)
       if (typeof (buttonActionResult) !== 'undefined' && buttonActionResult) {
         return true
@@ -1224,7 +1111,7 @@ export default {
     /**
      * 转换字段
      */
-    convertField: function(column) {
+    convertField: function (column) {
       const field = this.fields[column.name.toLowerCase()] || null
       const same = !((column['same'] && column['same'] === 'N'))
       let fieldType = same ? (field ? (field['field_type'] || 'text') : 'text') : column['field_type'] || 'text'
@@ -1232,7 +1119,7 @@ export default {
       const dataType = field ? field['type'] || 'varchar' : 'varchar'
       // 字段是日期类型
       if ((dataType === 'date' || dataType === 'timestamp' || dataType === 'datetime' || dataType === 'currentTime' || dataType === 'currentDate') &&
-       (fieldType !== 'datePicker' && fieldType !== 'dateRange')) {
+        (fieldType !== 'datePicker' && fieldType !== 'dateRange')) {
         fieldType = 'datePicker'
       }
       if (fieldType === 'datePicker' || fieldType === 'dateRange') {
@@ -1416,22 +1303,22 @@ export default {
         displayColumn.dateFormat = datefmt
         displayColumn.origDateFormat = fieldOptions['datefmt_type'] !== 'custom' ? datefmt : 'yyyy-MM-dd HH:mm:ss'
       } else if (fieldType === 'number' ||
-          fieldType === 'editor' ||
-          fieldType === 'textarea' ||
-          fieldType === 'attachment' ||
-          fieldType === 'dictionary' ||
-          fieldType === 'selector' ||
-          fieldType === 'customDialog' ||
-          fieldType === 'linkdata' ||
-          fieldType === 'address' ||
-          fieldType === 'image') {
+        fieldType === 'editor' ||
+        fieldType === 'textarea' ||
+        fieldType === 'attachment' ||
+        fieldType === 'dictionary' ||
+        fieldType === 'selector' ||
+        fieldType === 'customDialog' ||
+        fieldType === 'linkdata' ||
+        fieldType === 'address' ||
+        fieldType === 'image') {
         displayColumn.slotName = fieldType
         displayColumn.field_options = fieldOptions
       }
       return displayColumn
     },
     // 自定义格式数据事件
-    hasCustomFormatter: function(name) {
+    hasCustomFormatter: function (name) {
       const customFormatterResult = JTemplate._customFormatter(this, name)
       if (typeof (customFormatterResult) !== 'undefined' && customFormatterResult) {
         return true
@@ -1600,9 +1487,9 @@ export default {
 }
 </script>
 <style lang="scss">
- .ibps-data-template-list__preview{
-    .ibps-toolbar .tools{
-      padding-right: 40px !important;
-    }
- }
+.ibps-data-template-list__preview {
+  .ibps-toolbar .tools {
+    padding-right: 40px !important;
+  }
+}
 </style>

+ 1 - 4
src/business/platform/form/formrender/dynamic-form/dynamic-form-field.vue

@@ -831,10 +831,7 @@
             },
             // 最大文件个数
             fileQuantity() {
-                if (
-                    this.$utils.isNotEmpty(this.fieldOptions.max_file_quantity) &&
-                    (this.fieldOptions.max_file_quantity !== '-1' || this.fieldOptions.max_file_quantity !== -1)
-                ) {
+                if (this.$utils.isNotEmpty(this.fieldOptions.max_file_quantity) && (this.fieldOptions.max_file_quantity !== '-1' || this.fieldOptions.max_file_quantity !== -1)) {
                     return parseInt(this.fieldOptions.max_file_quantity, 10)
                 } else {
                     return null

Разлика између датотеке није приказан због своје велике величине
+ 753 - 904
src/business/platform/form/formrender/dynamic-form/dynamic-form-table.vue


+ 9 - 9
src/business/platform/form/utils/custom/process.js

@@ -42,11 +42,11 @@ const formData = {
     // 数据表名
     boName: '检测汇总表',
     // 数据表key
-    boKey: 'jchzb',
+    boKey: 'lhjczb',
     // 流程节点绑定的表单key
-    formKey: ['tyjcmb', 'sjsrtyjc', 'sjxytyjc'],
+    formKey: ['xjzjjcydzjjzpyf', 'xjzjjcydzjjzpyfsjsr', 'xjzjjcydzjjzpyfsjxy'],
     // 表单审批意见组件key
-    formOpinions: ['approval_opinion_1ifs4mo', 'approval_opinion_1dm76ow', 'approval_opinion_0nphdzy'],
+    formOpinions: ['approval_opinion_0f353vc', 'approval_opinion_1frszdl', 'approval_opinion_1s3sgtf'],
     // 开始节点按钮
     startBtn: ['start', 'startSave', 'flow'],
     // 中间节点流程按钮
@@ -59,18 +59,18 @@ const formData = {
     executor: [
         {
             desc1: '【用户】人员变量【jchzb.jianCeYuan】(或) ; ',
-            desc2: '人员变量[jchzb.jianCeYuan]',
-            name: 'jchzb.jianCeYuan'
+            desc2: '人员变量[lhjczb.jianCeYuan]',
+            name: 'lhjczb.jianCeYuan'
         },
         {
             desc1: '【用户】人员变量【jchzb.jianCeYuan】(或) ; ',
-            desc2: '人员变量[jchzb.jianCeYuan]',
-            name: 'jchzb.jianCeYuan'
+            desc2: '人员变量[lhjczb.jianCeYuan]',
+            name: 'lhjczb.jianCeYuan'
         },
         {
             desc1: '【用户】人员变量【jchzb.fuHeYuan】(或) ; ',
-            desc2: '人员变量[jchzb.fuHeYuan]',
-            name: 'jchzb.fuHeYuan'
+            desc2: '人员变量[lhjczb.fuHeYuan]',
+            name: 'lhjczb.fuHeYuan'
         }
     ]
 }

+ 3 - 3
src/business/platform/form/utils/custom/processData.js

@@ -36,9 +36,9 @@ export const endNode = {
 }
 
 export const normalNode = {
-    "node_name": "数据输入",
+    "node_name": "",
     "node_type": "userTask",
-    "id": "Activity_0vjg8z9",
+    "id": "",
     "parentId": null,
     "users": [
         {
@@ -110,7 +110,7 @@ export const normalNode = {
         "rejectType": "all",
         "postHandler": "",
         "buttonInitialized": true,
-        "nodeId": "Activity_0vjg8z9"
+        "nodeId": ""
     }
 }
 

Разлика између датотеке није приказан због своје велике величине
+ 419 - 307
src/business/platform/form/utils/custom/processPermission.js


+ 384 - 376
src/layout/header-aside/components/components/float-ball/index.vue

@@ -1,399 +1,407 @@
 <template>
-  <div class="slide-button-box bdshare-slide-style-r0">
-    <!-- <h3 style="float: right;width: 120px;">您有新的任务</h3> -->
-    <a href="#"   class="slide-button"  :class="{r1:shrinkPacket==true}" @mouseout="outUp()"  @mouseenter="stop()"></a>
-    <div class="slide-list-box"   @mouseenter="stop()">
-      <div class="slide-list" id="box">
-        <ul class="slide-ul-tab">
-          <li class="slide-li-tab" :class='{cur:tab===1}'  @click="tab=1">
-            <i class="circle"></i>
-            <span>实时待办任务</span>
-          </li>
-          <!-- <li class="slide-li-tab" :class='{cur:tab===2}' @click="tab=2">
-            <i class="circle"></i>
-            <span>定时任务</span>
-          </li> -->
-        </ul>
-        <div  v-show="tab===1">
-            <ul class="slide-list-ul" style="width: 226px;">
-              <li class="slide-list-li" v-for='(item,index) in userTypeData' :key='index' @click="outToProcess(item)">
-                {{item.name}}
-              </li>
+    <div class="slide-button-box bdshare-slide-style-r0">
+        <!-- <h3 style="float: right;width: 120px;">您有新的任务</h3> -->
+        <a href="#"
+            class="slide-button"
+            :class="{ r1: shrinkPacket == true }"
+            @mouseout="outUp()"
+            @mouseenter="stop()"
+        ></a>
+        <div class="slide-list-box" @mouseenter="stop()">
+            <div class="slide-list" id="box">
+                <ul class="slide-ul-tab">
+                    <li class="slide-li-tab" :class='{ cur: tab === 1 }' @click="tab = 1">
+                        <i class="circle"></i>
+                        <span>实时待办任务</span>
+                    </li>
+                    <!-- <li class="slide-li-tab" :class='{cur:tab===2}' @click="tab=2">
+                        <i class="circle"></i>
+                        <span>定时任务</span>
+                    </li> -->
+                </ul>
+                <div v-show="tab === 1">
+                    <ul class="slide-list-ul" style="width: 226px;">
+                        <li
+                            v-for='(item, index) in userTypeData'
+                            :key='index'
+                            class="slide-list-li"
+                            @click="outToProcess(item)"
+                        >
+                            {{ item.name }}
+                        </li>
+                        <li v-if="userTypeData.length == 0" class="slide-list-li">暂无任务...</li>
+                    </ul>
+                    <div class="slide-bottom" style="width: 226px;">
+                        <router-link :to="{ path: '/officeDesk/pendingItems' }" style="color:#AA7700 ;">更多...</router-link>
+                    </div>
+                </div>
 
-               <li  class="slide-list-li" v-if="userTypeData.length==0" >暂无任务...</li>
-            </ul>
-            <div class="slide-bottom" style="width: 226px;">
-             <router-link :to="{path:'/officeDesk/pendingItems'}" style="color:#AA7700 ;">更多...</router-link>
+                <!-- <div v-show ="tab===2">
+                    <ul class="slide-list-ul" style="width: 226px;">
+                        <li
+                            v-for='(item, index) in userTypeData0'
+                            :key='index'
+                            class="slide-list-li"
+                            @click="openMessage(item)"
+                        >
+                            <span style="float: left;"> {{item.ren_wu_biao_ti_ }}</span>
+                            <span style="float: right;margin-right: 17px;">日期: {{item.ren_wu_shi_jian_.substring(5, 10)}}</span>
+                        </li>
+                        <li  class="slide-list-li" v-if="userTypeData0.length==0" >暂无任务...</li>
+                    </ul>
+                </div> -->
             </div>
         </div>
-
-       <!-- <div style="" v-show ="tab===2">
-            <ul class="slide-list-ul" style="width: 226px;">
-              <li class="slide-list-li" v-for='(item0,index0) in userTypeData0' :key='index0' @click="openMessage(item0)">
-               <span style="float: left;"> {{item0.ren_wu_biao_ti_ }}</span>
-                <span style="float: right;margin-right: 17px;">日期: {{item0.ren_wu_shi_jian_.substring(5, 10)}}</span>
-              </li>
-               <li  class="slide-list-li" v-if="userTypeData0.length==0" >暂无任务...</li>
-            </ul>
-
-        </div> -->
-      </div>
-    </div>
-    <bpmn-formrender
-      :visible="dialogFormVisible"
-      :task-id="taskId"
-      :title = "title"
-      :def-id="defId"
-      :instance-id="instanceId"
-      @callback="search"
-      @close="visible => dialogFormVisible = visible"
-    />
-
+        <bpmn-formrender
+            :visible="dialogFormVisible"
+            :task-id="taskId"
+            :title="title"
+            :def-id="defId"
+            :instance-id="instanceId"
+            @callback="search"
+            @close="visible => dialogFormVisible = visible"
+        />
     </div>
-
- </template>
+</template>
 
 <script>
-import { StatisticsData,StatisticsSign} from '@/api/platform/system/jbdHome'
-import { pending,handled } from '@/api/platform/office/bpmReceived'
-import ActionUtils from '@/utils/action'
-import axios from 'axios'
-import { getToken } from '@/utils/auth'
-import { BASE_API,BUSINESS_BASE_URL } from '@/api/baseUrl' //引用导出地址
-
- export default {
-    props: {id: String},
-    data() {
-      return {
-        dialogFormVisible: false, // 弹窗
-        taskId: '', // 编辑dialog需要使用
-        timer:"",
-        getDataTimer:'',
-        shrinkPacket:false,
-        tab: 1,
-        userTypeData:[],
-        userTypeData0:[],
-        pagination: {pageNo: 1,limit:5},
-        sorts:{},
-        messageCount:0,
-        infoMessage:'',
-        defId: '',
-        instanceId: '',
-        overNumber:0,
-        title:"",
-       }
-    },
-    mounted() {
-      axios.interceptors.request.use(res => {
-          res.headers.common['X-Authorization-access_token'] = getToken()
-          return res;
-      });
-    },
-    created() {
-     //this.getDataTimer = setInterval(this.loadData,1000*60*10); //每10分钟获取开始任务
-     this.getDataTimer = setInterval(this.loadData,10000); //获取开始任务
-    },
-    /* 销毁定时事件*/
-    beforeDestroy() {
-      clearInterval(this.getDataTimer);
-      clearInterval(this.timer);
-	  if(this.infoMessage){
-      this.infoMessage.close();
-	  }
-       this.messageCount = 0
-    },
-    methods: {
-      outUp(){
-        this.tab = 1
-         this.loadData()
-      },
-      outToProcess(item){
-      this.title = item.name
-       this.taskId = item.taskId || ''
-       this.dialogFormVisible = true
-      },
-      getProcDefId(data) {
-        this.procDefIdSelect = data
-      },
+    import { StatisticsData, StatisticsSign } from '@/api/platform/system/jbdHome'
+    import { pending, handled } from '@/api/platform/office/bpmReceived'
+    import ActionUtils from '@/utils/action'
+    import axios from 'axios'
+    import { getToken } from '@/utils/auth'
+    import { BASE_API, BUSINESS_BASE_URL } from '@/api/baseUrl'
 
-      overData(id) {
-        handled(this.getFormatParams(id)).then(response => {
-        }).catch(() => {
-        })
-      },
-
-
-      loadData(id) {
-         axios.post(BASE_API()+BUSINESS_BASE_URL()+"/bpm/received/query/pending",
-              this.getFormatParams(id)
-                    )
-            .then(response => {
-              if(response.status !==200){//返回错误码则进行销毁轮训任务
-                  clearInterval(this.getDataTimer);
-                  clearInterval(this.timer);
-                  return
-              }
-              if(this.messageCount < response.data.data.pageResult.totalCount){//如果记录数量小于当前数量
-                    if(this.timer==="" &&  this.messageCount > 0){
-                      this.$notify({
-                               title: '任务提示',
-                               message: '您有新的待办任务产生,请及时办理!',
-                               type: 'warning',
-                               offset: 100,
-                               duration:9000
-                             });
-                     this.timer = setInterval(this.startRotate,500);
-                     }else if(this.messageCount >0){
-                       this.$notify({
+    export default {
+        props: { id: String },
+        data () {
+            return {
+                dialogFormVisible: false, // 弹窗
+                taskId: '', // 编辑dialog需要使用
+                timer: '',
+                getDataTimer: '',
+                shrinkPacket: false,
+                tab: 1,
+                userTypeData: [],
+                userTypeData0: [],
+                pagination: { pageNo: 1, limit: 5 },
+                sorts: {},
+                messageCount: 0,
+                infoMessage: '',
+                defId: '',
+                instanceId: '',
+                overNumber: 0,
+                title: ''
+            }
+        },
+        mounted () {
+            axios.interceptors.request.use(res => {
+                res.headers.common['X-Authorization-access_token'] = getToken()
+                return res
+            })
+        },
+        created () {
+            if (this.getDataTimer) {
+                clearInterval(this.getDataTimer)
+            }
+            //this.getDataTimer = setInterval(this.loadData,1000*60*10) //每10分钟获取开始任务
+            this.getDataTimer = setInterval(this.loadData, 10000) //获取开始任务
+        },
+        // 清除定时事件
+        beforeDestroy () {
+            clearInterval(this.getDataTimer)
+            clearInterval(this.timer)
+            if (this.infoMessage) {
+                this.infoMessage.close()
+            }
+            this.messageCount = 0
+        },
+        methods: {
+            outUp () {
+                this.tab = 1
+                this.loadData()
+            },
+            outToProcess (item) {
+                this.title = item.name
+                this.taskId = item.taskId || ''
+                this.dialogFormVisible = true
+            },
+            getProcDefId (data) {
+                this.procDefIdSelect = data
+            },
+            overData (id) {
+                handled(this.getFormatParams(id)).then(response => {}).catch(() => {})
+            },
+            loadData (id) {
+                axios.post(BASE_API()+BUSINESS_BASE_URL() + '/bpm/received/query/pending', this.getFormatParams(id)).then(response => {
+                    // 返回错误码则销毁轮训任务
+                    if (response.status !== 200) {
+                        clearInterval(this.getDataTimer)
+                        clearInterval(this.timer)
+                        return
+                    }
+                    // 如果记录数量小于当前数量
+                    if (this.messageCount < response.data.data.pageResult.totalCount) {
+                        if (this.timer === '' && this.messageCount > 0) {
+                            this.$notify({
                                 title: '任务提示',
                                 message: '您有新的待办任务产生,请及时办理!',
                                 type: 'warning',
                                 offset: 100,
-                                duration:9000
-                              });
-                     }
-                   }
-
-                      this.messageCount = response.data.data.pageResult.totalCount
-                      ActionUtils.handleListData(this, response.data.data)
-                      this.userTypeData = response.data.data.dataResult;
-                    }).catch(() => {//报错则进行销毁
-                      clearInterval(this.getDataTimer);
-                        clearInterval(this.timer);
-                      if(this.infoMessage){
-                        this.infoMessage.close();
-                      }
-                         this.messageCount = 0
-                    })
-      },
-      search() {
-        this.loadData()
-      },
-      getFormatParams(id) {
-        const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
-        if (this.$utils.isNotEmpty(this.procDefIdSelect)) {
-          params['Q^temp.proc_def_key_^S'] = this.procDefIdSelect
-        }
-        if (this.$utils.isNotEmpty(id)) {
-          params['Q^temp.TYPE_ID_^S'] = id
-        }
-        return ActionUtils.formatParams(
-          params,
-          this.pagination,
-          this.sorts)
-      },
-      createData(val) {
-        StatisticsData().then(data => { //将参数替换成对应参数
-           this.userTypeData0 = data.variables.data;
-        })
-      },
+                                duration: 9000
+                            })
+                            this.timer = setInterval(this.startRotate, 500)
+                        } else if (this.messageCount > 0) {
+                            this.$notify({
+                                title: '任务提示',
+                                message: '您有新的待办任务产生,请及时办理!',
+                                type: 'warning',
+                                offset: 100,
+                                duration: 9000
+                            })
+                        }
+                    }
 
-      startRotate() {
-          this.shrinkPacket = true;
-       setTimeout(()=>{
-          this.shrinkPacket = false;
-       },150)
-      },
-     stop() {
-      clearInterval(this.timer);
-      this.timer = ""
-     },
-     openMessage(cont){
-       if(this.infoMessage){
-        this.infoMessage.close()
-        }
-       let h = this.$createElement,
-        _this = this;
-       window.setTimeout(() => {
-              this.infoMessage = this.$notify.info({
-                        title: '定时通知:'+cont.ren_wu_biao_ti_,
-                        message:  h('p', null, [
-                          h('span', null, '任务时间: '+cont.ren_wu_shi_jian_),
-                          h('br'),
-                          h('span', null, '受理对象: '+cont.shou_li_dui_xiang),
-                          h('br'),
-                          h('span',null, '任务内容: '),
-                          h('span', {style:'color: #FF8C00;font-size:12px;'},cont.ding_shi_ren_wu_n),
-                          h('br'),
-                          h('el-button', {
-                                   attrs: {
-                                     size: 'mini',
-                                     type: cont.dui_ying_liu_chen ? 'success' :'primary',
-                                     plain:true,
-                                   },
-                                   on: {
-                                     click:()=>{
-                                       _this.cancelInfo()
-                                       }// 路由加载之后,调用关闭消息弹窗的方法
-                                   }
-                                 },  '取消提醒'),
-                         h('el-button', {
-                                  attrs: {
+                    this.messageCount = response.data.data.pageResult.totalCount
+                    ActionUtils.handleListData(this, response.data.data)
+                    this.userTypeData = response.data.data.dataResult
+                }).catch(() => {
+                    clearInterval(this.getDataTimer)
+                    clearInterval(this.timer)
+                    if (this.infoMessage) {
+                        this.infoMessage.close()
+                    }
+                    this.messageCount = 0
+                })
+            },
+            search () {
+                this.loadData()
+            },
+            getFormatParams (id) {
+                const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
+                if (this.$utils.isNotEmpty(this.procDefIdSelect)) {
+                    params['Q^temp.proc_def_key_^S'] = this.procDefIdSelect
+                }
+                if (this.$utils.isNotEmpty(id)) {
+                    params['Q^temp.TYPE_ID_^S'] = id
+                }
+                return ActionUtils.formatParams(params, this.pagination, this.sorts)
+            },
+            createData (val) {
+                StatisticsData().then(data => { //将参数替换成对应参数
+                    this.userTypeData0 = data.variables.data
+                })
+            },
+            startRotate () {
+                this.shrinkPacket = true
+                setTimeout(() => {
+                    this.shrinkPacket = false
+                }, 150)
+            },
+            stop () {
+                clearInterval(this.timer)
+                this.timer = ''
+            },
+            openMessage (cont) {
+                if (this.infoMessage) {
+                    this.infoMessage.close()
+                }
+                let h = this.$createElement,
+                    _this = this
+                window.setTimeout(() => {
+                    this.infoMessage = this.$notify.info({
+                        title: '定时通知:' + cont.ren_wu_biao_ti_,
+                        message: h('p', null, [
+                            h('span', null, '任务时间: ' + cont.ren_wu_shi_jian_),
+                            h('br'),
+                            h('span', null, '受理对象: ' + cont.shou_li_dui_xiang),
+                            h('br'),
+                            h('span', null, '任务内容: '),
+                            h('span', { style: 'color: #FF8C00;font-size:12px;' }, cont.ding_shi_ren_wu_n),
+                            h('br'),
+                            h('el-button', {
+                                attrs: {
+                                    size: 'mini',
+                                    type: cont.dui_ying_liu_chen ? 'success' : 'primary',
+                                    plain: true,
+                                },
+                                on: {
+                                    click: () => {
+                                        _this.cancelInfo()
+                                    }// 路由加载之后,调用关闭消息弹窗的方法
+                                }
+                            }, '取消提醒'),
+                            h('el-button', {
+                                attrs: {
                                     size: 'mini',
-                                    plain:true,
-                                  },
-                                  on: {
-                                    click:()=>{
-                                     this.infoMessage.close()
-                                      }// 路由加载之后,调用关闭消息弹窗的方法
-                                  }
-                                }, '忽略关闭')
+                                    plain: true,
+                                },
+                                on: {
+                                    click: () => {
+                                        this.infoMessage.close()
+                                    }// 路由加载之后,调用关闭消息弹窗的方法
+                                }
+                            }, '忽略关闭')
 
                         ]),
                         duration: 0,
-                      });
-              }, 0)
-     },
-  cancelInfo(cronId,title,processData,task){
-      /* 调用流程*/
-      this.infoMessage.close()
-      },
+                    })
+                }, 0)
+            },
+            cancelInfo (cronId, title, processData, task) {
+                // 调用流程
+                this.infoMessage.close()
+            },
 
 
+        }
     }
-  }
 </script>
-
 <style lang="less"  scoped>
-.cur  .circle{background-color:#fff;}
-.slide-ul-tab{
-  list-style: none;
-  width: 226px;
-  height: 25px;
-  line-height: 25px;
-  margin:0  0  10px  0;
-  padding: 0;
-  background-color:#fff;
-  color:#e6a23c;
-}
-.slide-li-tab{
-   float: left;
-   padding: 0px 12px 0px 9px;
-   background-color: #e6a23c;
-   color:#fff;
-   display:inline;
-   cursor:pointer;
-}
-.circle{
-      width: 8px; margin: 0px 10px;
-      height: 8px;
-      background-color:#e6a23c;
-      border-radius: 50%;
-      -moz-border-radius: 50%;
-      -webkit-border-radius: 50%;display: inline-block;}
-.slide-button-box{
-    bottom: 60px;
-    width: 0px;
-    z-index:2005;
-    right: 0px;
-    height: 250px;
-    position: fixed;
-    overflow: visible;
-}
-.slide-button-box .slide-button{
-    width: 24px;
-    height:105px;
-    display: block;
-    position: absolute;
-    bottom: 60px;
-    left: -24px;
-    background-color: #e6a23c;
-    color: #fff;
-    background: url(../../../../../assets/images/pendingItems/15425.gif) no-repeat 0 0;
-}
-.slide-button-box:hover  {
-    width:226px;
-  }
-.slide-button-box:hover  .slide-list-box {
-    width:226px;
-    display: block;
-  }
-.slide-list-box{
-    width: 0px;
-    display: none;
-    border: solid 1px #e9e9e9;
-    text-align: left;
-    overflow: hidden;
-    background: #f6f6f6;
-    height:250px;
-    transition: all .5s;
-    // display: block;
-    // width:226px;
-}
-.slide-top{
-    height: 28px;
-    color: #626262;
-    overflow: hidden;
-    font-weight: bold;
-    font-size: 14px;
-    line-height: 28px;
-    padding: 0 5px;
-}
-.slide-list-ul{
-    width: 226px;
-    padding: 0;
-    margin: 0;
-    border: 0;
-    list-style: none;
-    height: 190px;
-    overflow: hidden;
-}
-
-.slide-list-li{
-    float: left;
-    padding:5px;
-    margin-left: 6px;
-    _margin-left: 3px;
-    height: 28px;line-height: 28px;
-    overflow: hidden; cursor:pointer;
-    list-style: none;
-    min-width: 228px;color: #e6a23c;
-    font-size: 13px;
-    text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:20px;
-}
-.slide-list-li:hover{
-   background-color: #fdf6ec;
-}
-
-.slide-list-li  a{
-   /* background-color: #fdf6ec; */
-   color: #e6a23c;
-   font-size: 13px;
-}
-
-.slide-list-li  a:hover{
-   background-color: #fdf6ec;
-}
-
-.slide-list-li .slide-icon{
-   margin-right: 6px;
-}
-
-.slide-list{
-    background: #fff;
-    overflow: auto;
-    overflow-x: hidden;
-    /* padding: 5px 0; */
-    margin: 0;
-}
-.slide-bottom{
-    width: 226px;
-    line-height: 25px;
-    font-size: 12px;
-    text-align: right;
-    clear: both;
-    height: 30px;
-}
-.slide-bottom .slide-more{
-    border: none;
-    margin-right: 10px;
-    color: #e6a23c;
-}
-.r1 {
-    transform:rotate(-10deg);
-  }
-.r2 {
-    transform:rotate(3deg);
-  }
-
+    .cur .circle {
+        background-color: #fff;
+    }
+    .slide-ul-tab {
+        list-style: none;
+        width: 226px;
+        height: 25px;
+        line-height: 25px;
+        margin: 0 0 10px 0;
+        padding: 0;
+        background-color: #fff;
+        color: #e6a23c;
+    }
+    .slide-li-tab {
+        float: left;
+        padding: 0px 12px 0px 9px;
+        background-color: #e6a23c;
+        color: #fff;
+        display: inline;
+        cursor: pointer;
+    }
+    .circle {
+        width: 8px;
+        margin: 0px 10px;
+        height: 8px;
+        background-color: #e6a23c;
+        border-radius: 50%;
+        -moz-border-radius: 50%;
+        -webkit-border-radius: 50%;
+        display: inline-block;
+    }
+    .slide-button-box {
+        bottom: 60px;
+        width: 0px;
+        z-index: 2005;
+        right: 0px;
+        height: 250px;
+        position: fixed;
+        overflow: visible;
+    }
+    .slide-button-box .slide-button {
+        width: 24px;
+        height: 105px;
+        display: block;
+        position: absolute;
+        bottom: 60px;
+        left: -24px;
+        background-color: #e6a23c;
+        color: #fff;
+        background: url(../../../../../assets/images/pendingItems/15425.gif) no-repeat 0 0;
+    }
+    .slide-button-box:hover {
+        width: 226px;
+    }
+    .slide-button-box:hover .slide-list-box {
+        width: 226px;
+        display: block;
+    }
+    .slide-list-box {
+        width: 0px;
+        display: none;
+        border: solid 1px #e9e9e9;
+        text-align: left;
+        overflow: hidden;
+        background: #f6f6f6;
+        height: 250px;
+        transition: all .5s;
+        // display: block;
+        // width:226px;
+    }
+    .slide-top {
+        height: 28px;
+        color: #626262;
+        overflow: hidden;
+        font-weight: bold;
+        font-size: 14px;
+        line-height: 28px;
+        padding: 0 5px;
+    }
+    .slide-list-ul {
+        width: 226px;
+        padding: 0;
+        margin: 0;
+        border: 0;
+        list-style: none;
+        height: 190px;
+        overflow: hidden;
+    }
+    .slide-list-li {
+        float: left;
+        padding: 5px;
+        margin-left: 6px;
+        _margin-left: 3px;
+        height: 28px;
+        line-height: 28px;
+        overflow: hidden;
+        cursor: pointer;
+        list-style: none;
+        min-width: 228px;
+        color: #e6a23c;
+        font-size: 13px;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        overflow: hidden;
+        width: 20px;
+    }
+    .slide-list-li:hover {
+        background-color: #fdf6ec;
+    }
+    .slide-list-li a {
+        // background-color: #fdf6ec;
+        color: #e6a23c;
+        font-size: 13px;
+    }
+    .slide-list-li a:hover {
+        background-color: #fdf6ec;
+    }
+    .slide-list-li .slide-icon {
+        margin-right: 6px;
+    }
+    .slide-list {
+        background: #fff;
+        overflow: auto;
+        overflow-x: hidden;
+        // padding: 5px 0;
+        margin: 0;
+    }
+    .slide-bottom {
+        width: 226px;
+        line-height: 25px;
+        font-size: 12px;
+        text-align: right;
+        clear: both;
+        height: 30px;
+    }
+    .slide-bottom .slide-more {
+        border: none;
+        margin-right: 10px;
+        color: #e6a23c;
+    }
+    .r1 {
+        transform: rotate(-10deg);
+    }
+    .r2 {
+        transform: rotate(3deg);
+    }
 </style>

+ 1 - 1
src/views/system/jbdScan/goods/manualConfirmation.vue

@@ -553,7 +553,7 @@ import IbpsUserSelector from '@/business/platform/org/selector'
         }],
       // OriginalPosition:[],
       mjwtsqbAllResult:[],
-      pageCount:'',
+      pageCount:1,
       item:''
 
     }

+ 1 - 1
src/views/system/jbdScan/goods/tag.vue

@@ -216,7 +216,7 @@ export default {
 
 .tagBox {
   width: 240px;   // 300  240
-  height: 140px;  // 180  150
+  // height: 140px;  // 180  150 140
   position: relative;
   border: 1px solid #000000;
   padding: 2px;

+ 3 - 3
src/views/system/jbdScan/js/manualConfirmationJS.js

@@ -8,7 +8,7 @@ export default {
     },
     /* 获取数据 ,开始查阅记录 */
     loadData() {
-      repostCurd('select', '{"tableName": "t_lhypb","paramWhere":{"jie_yang_zhuang_t":"待接收"}}').then(response => {
+      repostCurd('select', '{"tableName": "t_lhypb","paramWhere":{"jie_yang_zhuang_t":"待接收","shi_fou_guo_shen_":"1"}}').then(response => {
         if (response.variables.data && response.variables.data.length > 0) {
           for (let i in response.variables.data) {
             response.variables.data[i].jie_yang_shu_lian = 1
@@ -20,9 +20,9 @@ export default {
     },
     loadDataBySQL(page) {
       // 扫码扫到新数据,查询 并分页 回填展示
-      let countSQL = `select count(*) as count from t_lhypb where jie_yang_zhuang_t = '待接收'`
+      let countSQL = `select count(*) as count from t_lhypb where jie_yang_zhuang_t = '待接收' and shi_fou_guo_shen_ = '1'`
       let str = (page-1)*10
-      let fysql = `select * from t_lhypb where jie_yang_zhuang_t = '待接收' limit ${str},10`
+      let fysql = `select * from t_lhypb where jie_yang_zhuang_t = '待接收' and shi_fou_guo_shen_ = '1' limit ${str},10`
       Promise.all([repostCurd('sql', countSQL), repostCurd('sql', fysql)]).then(([res1, res]) => {
         this.listData = []
         this.pageCount = res1.variables.data[0].count

+ 2 - 2
src/views/system/jbdScan/js/sampleConfirmationJS.js

@@ -28,14 +28,14 @@ export default {
 
       // 扫码扫到新数据,查询 回填展示
       if(flag){
-         repostCurd('select','{"tableName": "t_lhypb","paramWhere":{"yang_pin_bian_hao":"' + id + '"}}').then(res => {
+         repostCurd('select','{"tableName": "t_lhypb","paramWhere":{"yang_pin_bian_hao":"' + id + '","jie_yang_zhuang_t":"待接收"}}').then(res => {
           if (res.variables.data && res.variables.data.length > 0) {
             for (let i in res.variables.data) {
               res.variables.data[i].jie_yang_shu_lian = 1
               res.variables.data[i].jie_yang_zhuang_t = '未确认'
               res.variables.data[i].biao_zhi_uuid_ = this.uuid()
               this.listData.push(res.variables.data[i])
-              //this.OriginalPosition.push(res.variables.data[i].shi_fou_liu_yang_ == "是" ? res.variables.data[i].liu_yang_wei_zhi_ : res.variables.data[i].shou_yang_wei_zhi)
+              // this.OriginalPosition.push(res.variables.data[i].shi_fou_liu_yang_ == "是" ? res.variables.data[i].liu_yang_wei_zhi_ : res.variables.data[i].shou_yang_wei_zhi)
             }
             }
         })

Неке датотеке нису приказане због велике количине промена