Prechádzať zdrojové kódy

增加流程结束自动生成快照功能

cfort 2 rokov pred
rodič
commit
057c9b5cad

+ 129 - 62
src/business/platform/bpmn/form/action.js

@@ -2,11 +2,13 @@ import { doEndProcess, doAddSignTask, lock, unlock, suspendProcess, recoverProce
 import { agree, oppose, abandon, reject, rejectToStarter, rejectToPrevious, bpmTaskSave } from '@/api/platform/bpmn/bpmTask'
 import { startFlow, saveDraft } from '@/api/platform/bpmn/bpmInst'
 import Print from '@/utils/print'
+import request from '@/business/platform/form/utils/custom/joinCURD.js'
+import { snapshoot } from '@/api/platform/file/attachment'
 
 export default {
     methods: {
         // 内嵌url表单,外部url表单 【自定义】
-        emitButtonEventHandler(actionName, args) {
+        emitButtonEventHandler (actionName, args) {
             // 前置事件
             this.beforeScript(actionName, (result) => {
                 if (result) {
@@ -15,15 +17,15 @@ export default {
             })
         },
         // 设置是否过审的状态
-        setData(title) {
+        setData (title) {
             let data = title
             if (!title) {
-                //获取当前流程步骤名
-                data = "已" + this.getFormEL().formDefData.flowName
+                // 获取当前流程步骤名
+                data = '已' + this.getFormEL().formDefData.flowName
             }
-            this.getFormEL().setData("shiFouGuoShen", data)
+            this.getFormEL().setData('shiFouGuoShen', data)
         },
-        emitEventHandler(actionName, args) {
+        emitEventHandler (actionName, args) {
             const this_ = this
             this.actionName = actionName
             const buttonType = args && args.attributes ? args.attributes.button_type || actionName : actionName
@@ -33,7 +35,7 @@ export default {
                 case 'agree':// 同意
                     // 判断是否最后一步流程
                     if (this.actionTitle == '同意并结束') {
-                        this.setData("1")
+                        this.setData('1')
                     } else {
                         this.setData()
                     }
@@ -42,25 +44,25 @@ export default {
                 case 'oppose':// 反对
                     this_.$confirm(
                         `确定进行 [ ${args.attributes.label} ] 操作 ?`,
-                        "提示:",
+                        '提示:',
                         {
-                            confirmButtonText: "确定",
-                            cancelButtonText: "取消",
-                            type: "warning"
+                            confirmButtonText: '确定',
+                            cancelButtonText: '取消',
+                            type: 'warning'
                         }
                     ).then(() => {
-                        this.setData("未同意")
+                        this.setData('未同意')
                         this.handleDirectActionEvent(actionName)
                     }).catch(() => { })
                     break
                 case 'abandon':// 弃权
                     this_.$confirm(
                         `确定进行 [ 弃权 ] 操作 ?`,
-                        "提示:",
+                        '提示:',
                         {
-                            confirmButtonText: "确定",
-                            cancelButtonText: "取消",
-                            type: "warning"
+                            confirmButtonText: '确定',
+                            cancelButtonText: '取消',
+                            type: 'warning'
                         }
                     ).then(() => {
                         if (this.isHide()) {
@@ -84,21 +86,21 @@ export default {
                     break
                 case 'startFlow': // 启动流程
                     if (this.actionTitle == '同意并结束') {
-                        this.setData("1")
+                        this.setData('1')
                     } else {
-                        this.setData("已编制")
+                        this.setData('已编制')
                     }
-                    // this.setData("已编制")
+                    // this.setData('已编制')
                     this.handleStartFlow()
                     break
                 case 'saveDraft': // 保存草稿
-                    this.setData("已暂存")
+                    this.setData('已暂存')
                     this.handleSaveDraft()
                     break
                 case 'rejectToPrevious':// 驳回上一步
                 case 'rejectToStart':// 驳回发起人
                 case 'reject':// 驳回
-                    this.setData("已退回")
+                    this.setData('已退回')
                     this.rejectDialogVisible = true
                     break
                 case 'delegate':// 转办
@@ -114,7 +116,7 @@ export default {
                     this.addSignTaskDialogVisible = true
                     break
                 case 'endProcess':// 终止流程
-                    this.setData("已终止")
+                    this.setData('已终止')
                     this.handleEndProcess()
                     break
                 case 'print':// 打印
@@ -136,7 +138,7 @@ export default {
                     this.handleRecoverProcess()
                     break
                 case 'save':// 节点按钮设置-保存
-                    this.setData("已暂存")
+                    // this.setData('已暂存')
                     this.handleSave()
                     break
                 default:
@@ -146,11 +148,11 @@ export default {
         /**
          * 是否隐藏
          */
-        isHide() {
+        isHide () {
             return (this.isBpmOpinionHide && this.attributes.isHidePath) || (this.attributes.isCommonJumpType && this.attributes.isHideOpinion && this.attributes.isHidePath) || (this.attributes.isEnd && this.attributes.isHideOpinion)
         },
         // 是否保存[节点-按钮设置-保存]
-        handleSave() {
+        handleSave () {
             const formData = this.getFormData()
             const loading = this.$loading({
                 lock: true,
@@ -179,7 +181,7 @@ export default {
         /**
          * 处理启动流程
          */
-        handleStartFlow() {
+        handleStartFlow () {
             const firstNodeUserAssign = this.attributes.firstNodeUserAssign || false
             if (firstNodeUserAssign) {
                 const formData = this.getFormData()
@@ -194,7 +196,7 @@ export default {
          * 保存启动流程
          * @param {*}
          */
-        saveStartFlow(params = {}) {
+        saveStartFlow (params = {}) {
             const formData = this.getFormData()
             if (!formData) return
             const jsonData = {
@@ -219,6 +221,8 @@ export default {
             })
             // 1、直接启动
             startFlow(jsonData).then(response => {
+                const { bizKey = '', proInstId = '' } = response.variables || {}
+                this.createSnapshot(bizKey, proInstId)
                 loading.close()
                 this.$alert(`启动成功!`, {
                     showClose: false
@@ -240,7 +244,7 @@ export default {
         /**
          * 保存草稿
          */
-        handleSaveDraft() {
+        handleSaveDraft () {
             // 表单数据
             const formData = this.getFormData()
             if (!formData) return
@@ -280,7 +284,7 @@ export default {
          * 直接同意流程
          * @param {*} actionName
          */
-        handleDirectActionEvent(actionName) {
+        handleDirectActionEvent (actionName) {
             const opinion = this.hasFormOpinion() ? this.getFormOpinionData() : ''
             this.handleActionEvent(actionName, {
                 opinion: opinion
@@ -291,7 +295,7 @@ export default {
          * @param {*} actionName
          * @param {*} params
          */
-        handleActionEvent(actionName, 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') {
@@ -300,7 +304,7 @@ export default {
                 this.handleAddSignTask(params)
             }
         },
-        handleComplete(actionName, params = {}) {
+        handleComplete (actionName, params = {}) {
             const formData = this.getFormData()
             if (!formData) return
             const loading = this.$loading({
@@ -313,6 +317,7 @@ export default {
             if (actionName === 'agree') {
                 agree(params).then(response => {
                     this.handleResponse(actionName, loading, response)
+                    this.createSnapshot()
                 }).catch(() => {
                     loading.close()
                 })
@@ -348,7 +353,7 @@ export default {
                 })
             }
         },
-        handleResponse(actionName, loading, response) {
+        handleResponse (actionName, loading, response) {
             loading.close()
             this.$alert(response.message, {
                 showClose: false
@@ -369,29 +374,14 @@ export default {
                 })
             }).catch(() => { })
         },
-        handleEndProcess() {
+        handleEndProcess () {
             if (this.isBpmOpinionHide) {
                 this.$confirm('确定终止流程!', '提示', {
                     type: 'warning'
                 }).then(() => {
                     const opinion = this.hasFormOpinion() ? this.getFormOpinionData() : ''
-                    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 => {
-                        this.handleDoEndProcess({
-                            opinion: opinion
-                        }).then(() => {
-                            loading.close()
-                        })
-                    }).catch(error => {
-                        loading.close()
+                    this.handleDoEndProcess({
+                        opinion: opinion
                     })
                 }).catch(() => { })
             } else {
@@ -402,7 +392,7 @@ export default {
          * 处理终止任务
          * @param {*} params
          */
-        handleDoEndProcess(params) {
+        handleDoEndProcess (params) {
             const loading = this.$loading({
                 lock: true,
                 text: this.$t('common.saving')
@@ -416,6 +406,13 @@ export default {
                     showClose: false
                 }).then(() => {
                     this.approveDialogVisible = false
+                    // 更改数据状态为已终止
+                    const { code = '' } = this.getFormEL().formDefData || {}
+                    const { id = '' } = this.getFormEL().formData || {}
+                    if (!id || !code) {
+                        return
+                    }
+                    this.updateState(id, code, '已终止', null)
                     // 后置事件
                     this.afterScript(this.actionName, {
                         data: response.data,
@@ -425,7 +422,7 @@ export default {
                         this.callbackPage()
                     })
                 })
-            }).catch((err) => {
+            }).catch(() => {
                 loading.close()
             })
         },
@@ -433,7 +430,7 @@ export default {
          * 补签
          * @param {*} params
          */
-        handleAddSignTask(params) {
+        handleAddSignTask (params) {
             const loading = this.$loading({
                 lock: true,
                 text: this.$t('common.saving')
@@ -458,14 +455,14 @@ export default {
                         this.callbackPage()
                     })
                 })
-            }).catch((err) => {
+            }).catch(() => {
                 loading.close()
             })
         },
         /**
          * 打印
          */
-        handlePrint() {
+        handlePrint () {
             if (this.$utils.isNotEmpty(this.printTemplateId)) {
                 this.submitFormData = this.getFormData()
                 // 打开打印模版页面
@@ -488,7 +485,7 @@ export default {
         /**
          * 锁定任务
          */
-        handleLock() {
+        handleLock () {
             this.$confirm('确定锁定任务!', '提示', {
                 type: 'warning'
             }).then(() => {
@@ -518,7 +515,7 @@ export default {
         /**
          * 解锁任务
          */
-        handleUnlock() {
+        handleUnlock () {
             this.$confirm('确定解锁任务!', '提示', {
                 type: 'warning'
             }).then(() => {
@@ -548,7 +545,7 @@ export default {
         /**
          * 强制解锁任务
          */
-        handleForceUnlock() {
+        handleForceUnlock () {
             this.$confirm('确定强制解锁任务!', '提示', {
                 type: 'warning'
             }).then(() => {
@@ -578,7 +575,7 @@ export default {
         /**
          * 挂起任务
          */
-        handleSuspendProcess() {
+        handleSuspendProcess () {
             this.$confirm('确定挂起任务', '提示', {
                 type: 'warning'
             }).then(() => {
@@ -608,7 +605,7 @@ export default {
         /**
          * 恢复任务
          */
-        handleRecoverProcess() {
+        handleRecoverProcess () {
             this.$confirm('确定恢复任务', '提示', {
                 type: 'warning'
             }).then(() => {
@@ -639,8 +636,78 @@ export default {
 
             })
         },
-        finishTask(actionName, params, callback) {
-
+        async createSnapshot (bizKey, proId) {
+            const { code = '', name = '' } = this.getFormEL().formDefData || {}
+            const { proInstId = '' } = this.getFormEL().params || {}
+            const id = bizKey || this.getFormEL().formData.id
+            if (!code) {
+                return
+            }
+            // 轮询流程是否结束,流程未结束不生成快照,每2秒查询一次,最多等待10秒钟
+            let timeout = 10000
+            const intervalTime = 2000
+            while (!(await this.isFinish(proId || proInstId))) {
+                timeout -= intervalTime
+                if (timeout <= 0) {
+                    // 超时,流程还未结束,结束生成快照
+                    console.log('流程未结束,无法生成快照')
+                    return
+                }
+                // 等待一段时间后再次查询
+                await new Promise(resolve => setTimeout(resolve, intervalTime))
+            }
+            const sql = `select * from t_lcidglbdbb where shi_fou_zi_biao_ = 't_${code}' and ti_jiao_kuai_zhao = '是' and gui_dang_lei_xing = 'process'`
+            request('sql', sql).then(res => {
+                const { data = [] } = res.variables || {}
+                if (!data.length) {
+                    this.updateState(id, code, '1', null)
+                    return
+                }
+                const path = data[0].bao_biao_lu_jing_.split('.rpx') [0]
+                const url = this.$getReportFile(`中汇瑞德检测中心/${path}`, `id_=${id}`)
+                const now = new Date(new Date().getTime() + 28800000).toJSON().slice(0, 16).replace(/[-:T]/g, '')
+                const fileName = name + now
+                console.log(url, fileName)
+                snapshoot({
+                    url,
+                    name: fileName,
+                    type: 'pdf'
+                }).then(res => {
+                    if (!res.data || !res.data.id) {
+                        this.$message.error('生成快照失败!')
+                    }
+                    const fileId = res.data && res.data.id ? res.data.id : ''
+                    const fileParams = fileId ? { kuai_zhao_: fileId } : {}
+                    this.updateState(id, code, '1', fileParams)
+                }).catch(() => {
+                    // 生成快照接口调用失败时,也需要更新状态为已完成
+                    this.$message.error('提交快照生成失败!')
+                    this.updateState(id, code, '1')
+                })
+            })
+        },
+        // 判断流程是否结束
+        async isFinish (id) {
+            const sql = `select * from ibps_bpm_inst_his where id_ = '${id}'`
+            const res = await request('sql', sql)
+            const { data = [] } = res.variables || {}
+            return data.length > 0
+        },
+        // 更新数据状态
+        updateState (id, code, state, fileParams) {
+            const params = {
+                tableName: `t_${code}`,
+                updList: [{
+                    where: {
+                        id_: id
+                    },
+                    param: {
+                        shi_fou_guo_shen_: state,
+                        ...fileParams
+                    }
+                }]
+            }
+            request('updatesByWhere', params)
         }
     }
 }

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

@@ -413,6 +413,7 @@
                     // 一些参数
                     this.attributes = this.initAttributes(data)
                     this.formParams.nodeId = this.attributes.nodeId
+                    this.formParams.proInstId = data.attributes.proInstId
                     // 操作按钮
                     this.buttons = this.buildButtons(data.buttons, this.attributes) || []
                     // 表单意见

+ 78 - 74
src/business/platform/bpmn/setting/bpmn-setting/mixins/addRecord.js

@@ -1,81 +1,85 @@
-import curdPost from '../../../../form/utils/custom/joinCURD.js' //增删改查规则
+import curdPost from '@/business/platform/form/utils/custom/joinCURD.js'
 import request from '@/utils/request'
 import ActionUtils from '@/utils/action'
 
 export default {
-
-
-  methods: {
-    getRecord(id){
-       this.selectData(this.packNameWhere('t_lcidglbdbb',{liu_cheng_xuan_ze:id})).then(response => {
-                   if(response.variables.data.length==1){
-                    this.bao_biao_lu_jing_ =  response.variables.data[0].bao_biao_lu_jing_
-                    this.fu_jian_nei_rong_ =  response.variables.data[0].fu_jian_nei_rong_
-                    this.shi_fou_zi_biao_  =   response.variables.data[0].shi_fou_zi_biao_
-                    this.guan_lian_zi_duan  =   response.variables.data[0].guan_lian_zi_duan
-                    this.liu_cheng_xuan_ze = id
-                   }
-                })
-    },
-    addRecord(){
-     if(this.liu_cheng_xuan_ze) return  this.updateRecord();
-      this.add()
+    data () {
+        return {
+            // 标识是否初次创建
+            flag: false
+        }
     },
-
-   add(){
-      let cont = {}
-      cont['bao_biao_lu_jing_'] = this.bao_biao_lu_jing_
-      cont['fu_jian_nei_rong_'] = this.fu_jian_nei_rong_
-      cont['liu_cheng_xuan_ze'] = this.data.id
-      cont['guan_lian_zi_duan'] = this.guan_lian_zi_duan
-      cont['shi_fou_zi_biao_'] = this.shi_fou_zi_biao_
-     this.addData(this.packNameWhere('t_lcidglbdbb',JSON.stringify([cont]))).then(response => {
+    methods: {
+        getRecord (id) {
+            const sql = `select * from t_lcidglbdbb where gui_dang_lei_xing = 'process' and liu_cheng_xuan_ze = '${id}'`
+            curdPost('sql', sql).then(res => {
+                const { data = [] } = res.variables || {}
+                if (!data.length) {
+                    return
+                }
+                const { bao_biao_lu_jing_, fu_jian_nei_rong_, shi_fou_zi_biao_, guan_lian_zi_duan, ti_jiao_kuai_zhao, bo_hui_kuai_zhao_ } = data[0]
+                Object.assign(this, {
+                    bao_biao_lu_jing_,
+                    fu_jian_nei_rong_,
+                    shi_fou_zi_biao_,
+                    guan_lian_zi_duan,
+                    liu_cheng_xuan_ze: id,
+                    ti_jiao_kuai_zhao,
+                    bo_hui_kuai_zhao_
+                })
+            })
+        },
+        addRecord () {
+            if (this.flag || this.liu_cheng_xuan_ze) return this.updateRecord()
+            this.add()
+        },
+        add () {
+            const params = {
+                tableName: 't_lcidglbdbb',
+                paramWhere: [{
+                    bao_biao_lu_jing_: this.bao_biao_lu_jing_,
+                    fu_jian_nei_rong_: this.fu_jian_nei_rong_,
+                    liu_cheng_xuan_ze: this.data.id,
+                    guan_lian_zi_duan: this.guan_lian_zi_duan,
+                    shi_fou_zi_biao_: this.shi_fou_zi_biao_,
+                    ti_jiao_kuai_zhao: this.ti_jiao_kuai_zhao,
+                    bo_hui_kuai_zhao_: this.bo_hui_kuai_zhao_,
+                    gui_dang_lei_xing: 'process'
+                }]
+            }
+            curdPost('add', params).then(() => {
+                this.flag = true
                 this.$message({
-                          message: '添加成功',
-                          type: 'success'
-                        });
-              })
-    },
-    updateRecord(){
-       let cont = {}
-       cont['bao_biao_lu_jing_'] = this.bao_biao_lu_jing_
-       cont['fu_jian_nei_rong_'] = this.fu_jian_nei_rong_
-       cont['guan_lian_zi_duan'] = this.guan_lian_zi_duan
-       cont['liu_cheng_xuan_ze'] = this.liu_cheng_xuan_ze
-       cont['shi_fou_zi_biao_'] = this.shi_fou_zi_biao_
-      this.Update('t_lcidglbdbb',{"liu_cheng_xuan_ze": this.liu_cheng_xuan_ze},cont).then(response => {
-                 this.$message({
-                           message: '修改成功',
-                           type: 'warning'
-                         });
-               })
-     },
-
-
-    /* 封装表名与条件*/
-    packNameWhere(name,where){
-      let cont = {}
-      cont['tableName'] = name
-      cont['paramWhere'] = where
-      return cont
-    },
-    /* 通用查詢*/
-    selectData(data){
-     return curdPost('select',data)
-      },
-      /* 通用修改*/
-    Update(name,where,cond){
-      let cont = {}
-      cont['tableName'] = name
-      cont['paramWhere'] = where
-      cont['paramCond'] = cond
-      return curdPost('update',JSON.stringify(cont))
-    },
-      /* 通用查詢*/
-    addData(data){
-     return curdPost('add',data)
-      }
-
-  }
-
+                    message: '添加成功',
+                    type: 'success'
+                })
+            })
+        },
+        updateRecord () {
+            const params = {
+                tableName: 't_lcidglbdbb',
+                updList: [
+                    {
+                        where: {
+                            liu_cheng_xuan_ze: this.liu_cheng_xuan_ze
+                        },
+                        param: {
+                            bao_biao_lu_jing_: this.bao_biao_lu_jing_,
+                            fu_jian_nei_rong_: this.fu_jian_nei_rong_,
+                            guan_lian_zi_duan: this.guan_lian_zi_duan,
+                            shi_fou_zi_biao_: this.shi_fou_zi_biao_,
+                            ti_jiao_kuai_zhao: this.ti_jiao_kuai_zhao,
+                            bo_hui_kuai_zhao_: this.bo_hui_kuai_zhao_
+                        }
+                    }
+                ]
+            }
+            curdPost('updatesByWhere', params).then(() => {
+                this.$message({
+                    message: '修改成功',
+                    type: 'warning'
+                })
+            })
+        }
+    }
 }

+ 163 - 147
src/business/platform/bpmn/setting/bpmn-setting/types/global.vue

@@ -1,164 +1,180 @@
 <template>
-  <div>
-    <div v-sticky class="setting-title" @click="onTitle">
-      全局设置 <i class=" el-icon-caret-bottom"></i>
-    </div>
-    <el-collapse v-model="activeNames">
-      <el-collapse-item title="业务对象绑定" name="boSetting">
-        <bo-setting
-          :data="boData"
-          :has-call-activity="hasCallActivity"
-          :parent-def-key="parentDefKey"
-          @clean="cleanFormData"
-        />
-      </el-collapse-item>
-      <el-collapse-item title="表单设置" name="formSeting">
-        <form-setting
-          :data="formData"
-          :attributes="attributes"
-          :bo-data="boData"
-          :def-key="defKey"
-          :node-id="nodeId"
-          :parent-def-key="parentDefKey"
-          :form-opinions.sync="formOpinions"
-          form-type="flow"
-          @change-form="changeForm"
-        />
-      </el-collapse-item>
-      <el-collapse-item title="实例表单设置" name="instFormSetting">
-        <form-setting
-          :data="instFormData"
-          :def-key="defKey"
-          :bo-data="boData"
-          :node-id="nodeId"
-          :parent-def-key="parentDefKey"
-          form-type="inst"
-        />
-      </el-collapse-item>
-
-      <!-- <el-collapse-item title="流程变量设置" name="varSetting">
-        <variable-setting
-          :data="variables"
-        />
-      </el-collapse-item> -->
-     <el-collapse-item title="记录保存" name="varSetting">
-    <div style="margin-left:5%;">
-       报表路径以半角","分割: <el-input placeholder="报表路径" type="textarea" rows="5" v-model="bao_biao_lu_jing_"> </el-input>
-       附件字段名以半角","分割 (多个数据表以'.'分割):<el-input placeholder="附件字段"  v-model="fu_jian_nei_rong_"></el-input>
-       附件所在数据库 (多个数据表以'.'分割):<el-input placeholder="附件数据库"  v-model="shi_fou_zi_biao_"></el-input>
-       [ 当前表默认id主键 ] 附件子表的外键字段[选填] (多个数据表以'.'分割):<el-input placeholder="关联字段"  v-model="guan_lian_zi_duan"></el-input>
-    </div>
+    <div>
+        <div v-sticky class="setting-title" @click="onTitle">全局设置 <i class="el-icon-caret-bottom"></i></div>
+        <el-collapse v-model="activeNames">
+            <el-collapse-item title="业务对象绑定" name="boSetting">
+                <bo-setting
+                    :data="boData"
+                    :has-call-activity="hasCallActivity"
+                    :parent-def-key="parentDefKey"
+                    @clean="cleanFormData"
+                />
+            </el-collapse-item>
+            <el-collapse-item title="表单设置" name="formSeting">
+                <form-setting
+                    :data="formData"
+                    :attributes="attributes"
+                    :bo-data="boData"
+                    :def-key="defKey"
+                    :node-id="nodeId"
+                    :parent-def-key="parentDefKey"
+                    :form-opinions.sync="formOpinions"
+                    form-type="flow"
+                    @change-form="changeForm"
+                />
+            </el-collapse-item>
+            <el-collapse-item title="实例表单设置" name="instFormSetting">
+                <form-setting
+                    :data="instFormData"
+                    :def-key="defKey"
+                    :bo-data="boData"
+                    :node-id="nodeId"
+                    :parent-def-key="parentDefKey"
+                    form-type="inst"
+                />
+            </el-collapse-item>
 
-       <el-button type="success" plain style="margin: 5px; float: right;"  @click="addRecord">保存 / 修改</el-button>
-     </el-collapse-item>
+            <!-- <el-collapse-item title="流程变量设置" name="varSetting">
+                <variable-setting
+                    :data="variables"
+                />
+            </el-collapse-item> -->
+            <el-collapse-item title="流程归档设置" name="varSetting">
+                <div style="margin-left:5%;">
+                    报表路径(以半角','分割):<el-input v-model="bao_biao_lu_jing_" placeholder="报表路径" type="textarea" rows="5" />
+                    附件字段名(多字段以半角','分割 多个数据表以'.'分割):<el-input v-model="fu_jian_nei_rong_" placeholder="附件字段" />
+                    附件所在数据库(多个数据表以'.'分割):<el-input v-model="shi_fou_zi_biao_" placeholder="附件数据库" />
+                    附件子表的外键字段(选填,当前表默认id主键,多个数据表以'.'分割):<el-input v-model="guan_lian_zi_duan" placeholder="关联字段" />
+                    是否生成提交快照:
+                    <el-switch
+                        v-model="ti_jiao_kuai_zhao"
+                        active-value="是"
+                        inactive-value="否"
+                        style="margin-right: 80px;"
+                    />
+                    是否生成驳回快照:
+                    <el-switch
+                        v-model="bo_hui_kuai_zhao_"
+                        active-value="是"
+                        inactive-value="否"
+                    />
+                </div>
 
+                <el-button type="success" plain style="margin: 5px; float: right;" @click="addRecord">保存 / 修改</el-button>
+            </el-collapse-item>
 
-      <el-collapse-item name="endNotify">
-        <template slot="title">
-          办结抄送设置
-          <el-tooltip class="item" effect="light" content="进行设置流程结束时抄送给某批人!" placement="bottom">
-            <i class="header-icon el-icon-info" />
-          </el-tooltip>
-        </template>
-        <notify-setting :data="procNotify" />
-      </el-collapse-item>
-      <el-collapse-item title="其他设置" name="otherAttribute">
-        <other-attribute :data="attributes" />
-      </el-collapse-item>
-    </el-collapse>
-  </div>
+            <el-collapse-item name="endNotify">
+                <template slot="title">
+                    办结抄送设置
+                    <el-tooltip
+                        class="item"
+                        effect="light"
+                        content="进行设置流程结束时抄送给某批人!"
+                        placement="bottom"
+                    >
+                        <i class="header-icon el-icon-info" />
+                    </el-tooltip>
+                </template>
+                <notify-setting :data="procNotify" />
+            </el-collapse-item>
+            <el-collapse-item title="其他设置" name="otherAttribute">
+                <other-attribute :data="attributes" />
+            </el-collapse-item>
+        </el-collapse>
+    </div>
 </template>
 <script>
 import mixins from '../mixins/type'
 import addRecord from '../mixins/addRecord.js'
 export default {
-  mixins: [mixins,addRecord],
-  props: {
-    defKey: String,
-    nodeId: String, // 节点ID
-    hasCallActivity: Boolean, // 是否有外部子流程
-    parentDefKey: String ,// 父类key
-  },
-  data() {
-    return {
-      activeNames: ['boSetting', 'formSeting', 'instFormSetting', 'varSetting', 'endNotify', 'otherAttribute'],
-      bao_biao_lu_jing_:'',
-      fu_jian_nei_rong_:'',
-      shi_fou_zi_biao_:'',
-      liu_cheng_xuan_ze:'',
-      guan_lian_zi_duan:''
-    }
-  },
-  created() {
-    setTimeout(() => {
-		if(this.data && this.data.id) this.getRecord(this.getDataId)
-    }, 500)
-  },
-  watch:{
-    data:{
-    handler: function(data,outData) {
-        this.getRecord(this.getDataId)
-        },
-    }
-  },
-  computed: {
-    // 业务对象
-    boData() {
-      return this.data ? this.data.bo || {} : {}
-    },
-     //流程id
-    getDataId() {
-      return this.data ? this.data.id || {} : {}
-    },
-    boCode() {
-      return this.boData ? this.boData.code || '' : ''
+    mixins: [mixins, addRecord],
+    props: {
+        defKey: String,
+        nodeId: String, // 节点ID
+        hasCallActivity: Boolean, // 是否有外部子流程
+        parentDefKey: String // 父类key
     },
-    // 表单
-    formData() {
-      return this.data ? this.data.form || {} : {}
+    data () {
+        return {
+            activeNames: ['boSetting', 'formSeting', 'instFormSetting', 'varSetting', 'endNotify', 'otherAttribute'],
+            bao_biao_lu_jing_: '',
+            fu_jian_nei_rong_: '',
+            shi_fou_zi_biao_: '',
+            liu_cheng_xuan_ze: '',
+            guan_lian_zi_duan: '',
+            ti_jiao_kuai_zhao: '否',
+            bo_hui_kuai_zhao_: '否'
+        }
     },
-    // 实例表单
-    instFormData() {
-      return this.data ? this.data.instForm || {} : {}
-    },
-    // 表单意见
-    formOpinions: {
-      get() {
-        return this.data ? this.data.formOpinions || {} : {}
-      },
-      set(value) {
-        this.data.formOpinions = value || {}
-      }
+    computed: {
+        // 业务对象
+        boData () {
+            return this.data ? this.data.bo || {} : {}
+        },
+        // 流程id
+        getDataId () {
+            return this.data ? this.data.id || {} : {}
+        },
+        boCode () {
+            return this.boData ? this.boData.code || '' : ''
+        },
+        // 表单
+        formData () {
+            return this.data ? this.data.form || {} : {}
+        },
+        // 实例表单
+        instFormData () {
+            return this.data ? this.data.instForm || {} : {}
+        },
+        // 表单意见
+        formOpinions: {
+            get () {
+                return this.data ? this.data.formOpinions || {} : {}
+            },
+            set (value) {
+                this.data.formOpinions = value || {}
+            }
+        },
+        // 流程变量
+        variables () {
+            return this.data ? this.data.variables || [] : []
+        },
+        // 抄送
+        procNotify () {
+            return this.data ? this.data.procNotify || [] : []
+        },
+        // 其它属性
+        attributes () {
+            if (!this.data.attributes) return
+            this.data.attributes.subjectRule = this.data.attributes.subjectRule == '{发起人:startorName}在{发起时间:startTime}发起{流程标题:title}' ? '{发起人:startorName} |启动:{流程标题:title}' : this.data.attributes.subjectRule
+            return this.data ? this.data.attributes || {} : {}
+        }
     },
-    // 流程变量
-    variables() {
-      return this.data ? this.data.variables || [] : []
+    watch: {
+        data: {
+            handler: function (data, outData) {
+                this.getRecord(this.getDataId)
+            }
+        }
     },
-    // 抄送
-    procNotify() {
-      return this.data ? this.data.procNotify || [] : []
+    created () {
+        setTimeout(() => {
+            if (this.data && this.data.id) this.getRecord(this.getDataId)
+        }, 500)
     },
-    // 其它属性
-    attributes() {
-      if(!this.data.attributes) return
-      this.data.attributes.subjectRule =  this.data.attributes.subjectRule == "{发起人:startorName}在{发起时间:startTime}发起{流程标题:title}" ?
-     "{发起人:startorName} |启动:{流程标题:title}" : this.data.attributes.subjectRule
-      return this.data ? this.data.attributes || {} : {}
+    methods: {
+        handleData (key, data) {
+            this.$emit('input', data)
+        },
+        changeForm (key, value) {
+            this.instFormData[key] = value
+        },
+        cleanFormData () {
+            this.$emit('clean-form-data')
+        },
+        saveCont () {
+            this.data.id// 流程id
+        }
     }
-  },
-  methods: {
-    handleData(key, data) {
-      this.$emit('input', data)
-    },
-    changeForm(key, value) {
-      this.instFormData[key] = value
-    },
-    cleanFormData() {
-      this.$emit('clean-form-data')
-    },
-    saveCont(){
-      this.data.id//流程id
-      }
-  }
 }
 </script>

+ 1 - 3
src/business/platform/org/employee/panel.vue

@@ -25,9 +25,7 @@
           @action-event="handleTreeAction"
         />
       </div>
-      <div
-        :style="{ height:auto}"
-      >
+      <div style="height: auto;">
         <el-scrollbar
           style="height: 100%;width:100%; padding-bottom:8px;"
           wrap-class="ibps-tree-wrapper ibps-scrollbar-wrapper"