cfort пре 2 година
родитељ
комит
abba9abf7a

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

@@ -646,6 +646,7 @@ export default {
             } else {
             } else {
                 selectionAll.push(this.selectionAll)
                 selectionAll.push(this.selectionAll)
             }
             }
+
             // 获取当前页选中的id
             // 获取当前页选中的id
             const selectIds = []
             const selectIds = []
             if (this.multiple) {
             if (this.multiple) {
@@ -659,7 +660,8 @@ export default {
                 })
                 })
             } else {
             } else {
                 if (this.$utils.isNotEmpty(this.selection)) {
                 if (this.$utils.isNotEmpty(this.selection)) {
-                    const pkValue = this.getPkValue(this.selection) 
+                    const pkValue = this.getPkValue(this.selection)
+                    // selectIds.push(pkValue)
                     if (selectAllIds.indexOf(pkValue) < 0) {
                     if (selectAllIds.indexOf(pkValue) < 0) {
                         selectionAll = []
                         selectionAll = []
                         selectionAll.push(this.selection)
                         selectionAll.push(this.selection)
@@ -723,10 +725,8 @@ export default {
             const selectAllIds = this.getSelectAllIds()
             const selectAllIds = this.getSelectAllIds()
             for (let i = 0; i < listData.length; i++) {
             for (let i = 0; i < listData.length; i++) {
                 const row = listData[i]
                 const row = listData[i]
-                
                 if (selectAllIds.indexOf(this.getPkValue(row)) >= 0) {
                 if (selectAllIds.indexOf(this.getPkValue(row)) >= 0) {
                     if (this.multiple) {
                     if (this.multiple) {
-                        
                         tableEl.toggleSelectionRow(row, true)
                         tableEl.toggleSelectionRow(row, true)
                     } else {
                     } else {
                         tableEl.setSelectionRadio(row)
                         tableEl.setSelectionRadio(row)
@@ -970,8 +970,8 @@ export default {
             const buttonType = button.button_type || button.key
             const buttonType = button.button_type || button.key
             this.action = buttonType
             this.action = buttonType
             this.position = position
             this.position = position
+            // this.selection = selection
             this.selection = data
             this.selection = data
-            // 查询
             // 前置事件
             // 前置事件
             this.beforeScript(command, position, selection, data, () => {
             this.beforeScript(command, position, selection, data, () => {
                 let src = ''
                 let src = ''

+ 0 - 1
src/layout/header-aside/components/header-user/index.vue

@@ -156,7 +156,6 @@ export default {
         const generateData = _ => {
         const generateData = _ => {
             const data = []
             const data = []
             const bm = deptName
             const bm = deptName
-            console.log(deptName,'deptNamedeptName')
             bm.forEach((b, index) => {
             bm.forEach((b, index) => {
                 data.push({
                 data.push({
                     label: b,
                     label: b,

+ 7 - 0
src/views/platform/office/bpmReceivedProcess/completed.vue

@@ -182,6 +182,13 @@ export default {
                 this.loading = false
                 this.loading = false
             })
             })
         },
         },
+        getFormatParams () {
+            const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
+            if (!params.hasOwnProperty('Q^inst.status_^S')) {
+                params['Q^inst.status_^NE'] = 'running'
+            }
+            return ActionUtils.formatParams(params, this.pagination, this.sorts)
+        },
         /**
         /**
          * 处理按钮事件
          * 处理按钮事件
          */
          */

+ 0 - 10
src/views/platform/office/bpmReceivedProcess/handled.vue

@@ -121,16 +121,6 @@ export default {
                 this.loading = false
                 this.loading = false
             })
             })
         },
         },
-        /**
-         * 获取格式化参数
-         */
-        getFormatParams () {
-            const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
-            if (this.$utils.isNotEmpty(this.typeId)) {
-                params['Q^inst.TYPE_ID_^S'] = this.typeId
-            }
-            return ActionUtils.formatParams(params, this.pagination, this.sorts)
-        },
         /**
         /**
          * 处理按钮事件
          * 处理按钮事件
          */
          */

+ 261 - 317
src/views/platform/office/bpmReceivedProcess/pending.vue

@@ -1,339 +1,283 @@
 <template>
 <template>
-  <ibps-layout ref="layout">
-    <div slot="west">
-      <ibps-type-tree
-        :width="width"
-        :height="height"
-        title="任务分类"
-        category-key="FLOW_TYPE"
-        @node-click="handleNodeClick"
-        @expand-collapse="handleExpandCollapse"
-      />
-    </div>
-    <ibps-crud
-      ref="crud"
-      :style="{ marginLeft: width+'px' }"
-      :height="height"
-      :data="listData"
-      :toolbars="listConfig.toolbars"
-      :search-form="listConfig.searchForm"
-      :pk-key="pkKey"
-      :columns="listConfig.columns"
-      :row-handle="listConfig.rowHandle"
-      :pagination="pagination"
-      :loading="loading"
-      :index-row="false"
-      @action-event="handleAction"
-      @sort-change="handleSortChange"
-      @column-link-click="handleLinkClick"
-      @pagination-change="handlePaginationChange"
-    >
-      <template slot="searchFormCreator">
-        <ibps-employee-selector
-          v-model="searchFormCreator"
-          style="width:200px;"
+    <ibps-layout ref="layout">
+        <div slot="west">
+            <ibps-type-tree
+                :width="width"
+                :height="height"
+                title="任务分类"
+                category-key="FLOW_TYPE"
+                @node-click="handleNodeClick"
+                @expand-collapse="handleExpandCollapse"
+            />
+        </div>
+        <ibps-crud
+            ref="crud"
+            :style="{ marginLeft: width+'px' }"
+            :height="height"
+            :data="listData"
+            :toolbars="listConfig.toolbars"
+            :search-form="listConfig.searchForm"
+            :pk-key="pkKey"
+            :columns="listConfig.columns"
+            :row-handle="listConfig.rowHandle"
+            :pagination="pagination"
+            :loading="loading"
+            :index-row="false"
+            @action-event="handleAction"
+            @sort-change="handleSortChange"
+            @column-link-click="handleLinkClick"
+            @pagination-change="handlePaginationChange"
+        >
+            <template slot="searchFormCreator">
+                <ibps-employee-selector
+                    v-model="searchFormCreator"
+                    style="width:200px;"
+                />
+            </template>
+            <template v-slot:ownerName="{value}">
+                <el-popover trigger="hover" placement="top" width="250">
+                    {{ value }}
+                    <div slot="reference" class="ibps-ellipsis">
+                        {{ value }}
+                    </div>
+                </el-popover>
+            </template>
+        </ibps-crud>
+        <bpmn-formrender
+            :visible="dialogFormVisible"
+            :task-id="taskId"
+            :title="flowName"
+            @callback="search"
+            @close="visible => dialogFormVisible = visible"
         />
         />
-      </template>
-      <template v-slot:ownerName="{value}">
-        <el-popover trigger="hover" placement="top" width="250">
-          {{ value }}
-          <div slot="reference" class="ibps-ellipsis">
-            {{ value }}
-          </div>
-        </el-popover>
-      </template>
-    </ibps-crud>
-    <bpmn-formrender
-      :visible="dialogFormVisible"
-      :task-id="taskId"
-      :title="flowName"
-      @callback="search"
-      @close="visible => dialogFormVisible = visible"
-    />
-    <!-- 转办 -->
-    <delegate
-      :task-id="taskId"
-      :title="title"
-      :visible="delegateVisible"
-      @callback="search"
-      @close="visible => delegateVisible = visible"
-    />
-    <!-- 批量审批 -->
-    <approve-dialog
-      :visible="approveDialogVisible"
-      :title="title"
-      :task-id="taskId"
-      :action="action"
-      @callback="search"
-      @close="visible => approveDialogVisible = visible"
-    />
-  </ibps-layout>
+        <!-- 转办 -->
+        <delegate
+            :task-id="taskId"
+            :title="title"
+            :visible="delegateVisible"
+            @callback="search"
+            @close="visible => delegateVisible = visible"
+        />
+        <!-- 批量审批 -->
+        <approve-dialog
+            :visible="approveDialogVisible"
+            :title="title"
+            :task-id="taskId"
+            :action="action"
+            @callback="search"
+            @close="visible => approveDialogVisible = visible"
+        />
+    </ibps-layout>
 </template>
 </template>
 <script>
 <script>
 import { pending } from '@/api/platform/office/bpmReceived'
 import { pending } from '@/api/platform/office/bpmReceived'
 import { batchSuspendProcess, batchRecoverProcess } from '@/api/platform/bpmn/bpmTask'
 import { batchSuspendProcess, batchRecoverProcess } from '@/api/platform/bpmn/bpmTask'
 import ActionUtils from '@/utils/action'
 import ActionUtils from '@/utils/action'
 import FixHeight from '@/mixins/height'
 import FixHeight from '@/mixins/height'
+import CommonData from '../mixin/utils'
 import { taskTypeOptions } from '@/business/platform/bpmn/constants'
 import { taskTypeOptions } from '@/business/platform/bpmn/constants'
-import IbpsTypeTree from '@/business/platform/cat/type/tree'
 import IbpsEmployeeSelector from '@/business/platform/org/employee/selector'
 import IbpsEmployeeSelector from '@/business/platform/org/employee/selector'
-import BpmnFormrender from '@/business/platform/bpmn/form/dialog'
 import Delegate from '@/business/platform/bpmn/task-change/edit'
 import Delegate from '@/business/platform/bpmn/task-change/edit'
 import ApproveDialog from '@/business/platform/bpmn/form-ext/approve'
 import ApproveDialog from '@/business/platform/bpmn/form-ext/approve'
 
 
 export default {
 export default {
-  components: {
-    IbpsTypeTree,
-    IbpsEmployeeSelector,
-    Delegate,
-    ApproveDialog,
-    BpmnFormrender
-  },
-  mixins: [FixHeight],
-  data() {
-    return {
-      width: 200,
-      height: document.clientHeight,
-      dialogFormVisible: false, // 弹窗
-      approveDialogVisible: false, // 批量审批
-      flowName:'',
-      delegateVisible: false,
-      action: '',
-      taskId: '', // 编辑dialog需要使用
-      title: '',
-      pkKey: 'id', // 主键  如果主键不是pk需要传主键
-      typeId: '',
-      loading: false,
-      listData: [],
-      listConfig: {
-        // 工具栏
-        toolbars: [
-          { key: 'search' },
-          {
-            key: 'agree',
-            label: '同意',
-            icon: 'ibps-icon-check-square-o'
-          },
-          {
-            key: 'stop',
-            label: '终止',
-            icon: 'ibps-icon-ioxhost'
-          },
-          {
-            key: 'suspend',
-            label: '挂起',
-            icon: 'ibps-icon-ioxhost '
-          },
-          {
-            key: 'recover',
-            label: '恢复',
-            icon: 'ibps-icon-ioxhost '
-          }
-        ],
-        // 查询条件
-        searchForm: {
-          forms: [
-            { prop: 'Q^subject_^SL', name: 'Q^temp.subject_^SL', label: '请求标题', link: 'dialog', labelWidth: 80, itemWidth: 200 },
-            { prop: 'Q^procDefName^SL', name: 'Q^temp.procDefName^SL', label: '流程名称', labelWidth: 80, itemWidth: 200 },
-            {
-              prop: ['Q^create_time_^DL', 'Q^create_time_^DG'],
-              name: ['Q^temp.create_time_^DL', 'Q^temp.create_time_^DG'],
-              label: '时间',
-              fieldType: 'daterange',
-              labelWidth: 80,
-              itemWidth: 200
+    components: {
+        IbpsEmployeeSelector,
+        Delegate,
+        ApproveDialog
+    },
+    mixins: [FixHeight, CommonData],
+    data () {
+        return {
+            approveDialogVisible: false, // 批量审批
+            flowName: '',
+            delegateVisible: false,
+            action: '',
+            title: '',
+            listConfig: {
+                // 工具栏
+                toolbars: [
+                    { key: 'search' },
+                    {
+                        key: 'agree',
+                        label: '同意',
+                        icon: 'ibps-icon-check-square-o'
+                    },
+                    {
+                        key: 'stop',
+                        label: '终止',
+                        icon: 'ibps-icon-ioxhost'
+                    },
+                    {
+                        key: 'suspend',
+                        label: '挂起',
+                        icon: 'ibps-icon-ioxhost '
+                    },
+                    {
+                        key: 'recover',
+                        label: '恢复',
+                        icon: 'ibps-icon-ioxhost '
+                    }
+                ],
+                // 查询条件
+                searchForm: {
+                    forms: [
+                        { prop: 'Q^subject_^SL', name: 'Q^temp.subject_^SL', label: '请求标题', link: 'dialog', labelWidth: 80, itemWidth: 200 },
+                        { prop: 'Q^procDefName^SL', name: 'Q^temp.procDefName^SL', label: '流程名称', labelWidth: 80, itemWidth: 200 },
+                        {
+                            prop: ['Q^create_time_^DL', 'Q^create_time_^DG'],
+                            name: ['Q^temp.create_time_^DL', 'Q^temp.create_time_^DG'],
+                            label: '时间',
+                            fieldType: 'daterange',
+                            labelWidth: 80,
+                            itemWidth: 200
+                        },
+                        { prop: 'taskType',
+                            label: '任务类型',
+                            itemWidth: 200,
+                            fieldType: 'select',
+                            labelWidth: 80,
+                            options: taskTypeOptions
+                        }
+                    ]
+                },
+                // 表格字段配置
+                columns: [
+                    { prop: 'subject', label: '请求标题', link: 'dialog' },
+                    { prop: 'procDefName', label: '流程名称', width: 120 },
+                    { prop: 'name', label: '当前节点', width: 120 },
+                    { prop: 'createTime', label: '创建时间', width: 140 },
+                    { prop: 'ownerName', label: '所属人', width: 150 },
+                    { prop: 'status', label: '待办类型', tags: taskTypeOptions, width: 100 }
+                ],
+                // 管理列
+                rowHandle: {
+                    effect: 'display',
+                    width: '80px',
+                    actions: [
+                        {
+                            key: 'delegate',
+                            label: '转办',
+                            icon: 'ibps-icon-mail-forward',
+                            hidden: (row, index) => {
+                                if (row.allowShfit === 'Y') return false
+                                return true
+                            }
+
+                        }
+                    ]
+                }
             },
             },
-            { prop: 'taskType',
-              label: '任务类型',
-              itemWidth: 200,
-              fieldType: 'select',
-              labelWidth: 80,
-              options: taskTypeOptions
+            searchFormCreator: ''
+        }
+    },
+    created () {
+        this.loadData()
+    },
+    methods: {
+        /**
+         * 加载数据
+         */
+        loadData () {
+            this.loading = true
+            const params = {}
+            if (this.$utils.isNotEmpty(this.searchFormCreator)) {
+                params['Q^creatorId^SL'] = this.searchFormCreator
             }
             }
-          ]
+            pending(this.getFormatParams(params)).then(response => {
+                ActionUtils.handleListData(this, response.data)
+                this.loading = false
+            }).catch(() => {
+                this.loading = false
+            })
         },
         },
-        // 表格字段配置
-        columns: [
-          { prop: 'subject', label: '请求标题', link: 'dialog' },
-          { prop: 'procDefName', label: '流程名称', width: 120 },
-          { prop: 'name', label: '当前节点', width: 120 },
-          { prop: 'createTime', label: '创建时间', width: 140 },
-          { prop: 'ownerName', label: '所属人', width: 150 },
-          { prop: 'status', label: '待办类型', tags: taskTypeOptions, width: 100 }
-        ],
-        // 管理列
-        rowHandle: {
-          effect: 'display',
-          width: '80px',
-          actions: [
-            {
-              key: 'delegate',
-              label: '转办',
-              icon: 'ibps-icon-mail-forward',
-              hidden: (row, index) => {
-                if (row.allowShfit === 'Y') return false
-                return true
-              }
-
+        /**
+         * 点击表格
+         */
+        handleLinkClick (data, columns) {
+            this.taskId = data.taskId || ''
+            this.flowName = data.name
+            this.dialogFormVisible = true
+        },
+        /**
+         * 处理按钮事件
+         */
+        handleAction (command, position, selection, data) {
+            switch (command) {
+                case 'search':// 查询
+                    ActionUtils.setFirstPagination(this.pagination)
+                    this.search()
+                    break
+                case 'stop': // 终止
+                    ActionUtils.selectedMultiRecord(selection).then((ids) => {
+                        this.handleBatchApprove(ids, 'stop')
+                        this.title = '批量终止流程'
+                    }).catch(() => { })
+                    break
+                case 'agree': // 同意
+                    ActionUtils.selectedMultiRecord(selection).then((ids) => {
+                        this.handleBatchApprove(ids, 'agree')
+                        this.title = '批量同意审批'
+                    }).catch(() => { })
+                    break
+                case 'suspend': // 挂起
+                    ActionUtils.selectedMultiRecord(selection).then((ids) => {
+                        this.handleSuspend(ids)
+                    }).catch(() => { })
+                    break
+                case 'recover': // 恢复
+                    ActionUtils.selectedMultiRecord(selection).then((ids) => {
+                        this.handleRecover(ids)
+                    }).catch(() => { })
+                    break
+                case 'delegate': // 转办
+                    ActionUtils.selectedRecord(selection).then((id) => {
+                        this.title = '任务转办'
+                        this.handleDelegate(id)
+                    }).catch(() => { })
+                    break
+                default:
+                    break
             }
             }
-          ]
+        },
+        /**
+         * 处理批量审批
+         */
+        handleBatchApprove (id = '', action = 'agree') {
+            this.taskId = id
+            this.action = action
+            this.approveDialogVisible = true
+        },
+        /**
+         * 批量挂起任务
+         */
+        handleSuspend (ids) {
+            this.$confirm('确认批量挂起流程任务?', '信息').then(() => {
+                batchSuspendProcess({ taskIds: ids }).then(() => {
+                    ActionUtils.successMessage('挂起流程任务成功')
+                    this.search()
+                }).catch(err => {
+                    console.error(err)
+                })
+            })
+        },
+        /**
+         * 批量恢复任务
+         */
+        handleRecover (ids) {
+            this.$confirm('确认批量恢复流程任务?', '信息').then(() => {
+                batchRecoverProcess({ taskIds: ids }).then(() => {
+                    ActionUtils.successMessage('恢复流程任务成功')
+                    this.search()
+                }).catch(err => {
+                    console.error(err)
+                })
+            })
+        },
+        handleDelegate (id) {
+            this.taskId = id
+            this.delegateVisible = true
         }
         }
-      },
-      pagination: {},
-      sorts: {},
-      searchFormCreator: ''
-
-    }
-  },
-  created() {
-    this.loadData()
-  },
-  methods: {
-    /**
-     * 加载数据
-     */
-    loadData() {
-      this.loading = true
-      pending(this.getFormatParams()).then(response => {
-        ActionUtils.handleListData(this, response.data)
-        this.loading = false
-      }).catch(() => {
-        this.loading = false
-      })
-    },
-    /**
-     * 获取格式化参数
-     */
-    getFormatParams() {
-      const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
-      if (this.$utils.isNotEmpty(this.searchFormCreator)) {
-        params['Q^creatorId^SL'] = this.searchFormCreator
-      }
-      if (this.$utils.isNotEmpty(this.typeId)) {
-        params['Q^temp.TYPE_ID_^S'] = this.typeId
-      }
-      return ActionUtils.formatParams(
-        params,
-        this.pagination,
-        this.sorts)
-    },
-    /**
-     * 处理分页事件
-     */
-    handlePaginationChange(page) {
-      ActionUtils.setPagination(this.pagination, page)
-      this.loadData()
-    },
-    /**
-     * 处理排序
-     */
-    handleSortChange(sort) {
-      ActionUtils.setSorts(this.sorts, sort)
-      this.loadData()
-    },
-    search() {
-      this.loadData()
-    },
-    /**
-     * 重置查询条件
-     */
-    reset() {
-      this.$refs['crud'].handleReset()
-    },
-    /**
-     * 点击表格
-     */
-    handleLinkClick(data, columns) {
-      this.taskId = data.taskId || ''
-      this.flowName =data.name
-      this.dialogFormVisible = true
-    },
-    /**
-     * 处理按钮事件
-     */
-    handleAction(command, position, selection, data) {
-      switch (command) {
-        case 'search':// 查询
-          ActionUtils.setFirstPagination(this.pagination)
-          this.search()
-          break
-        case 'stop': // 终止
-          ActionUtils.selectedMultiRecord(selection).then((ids) => {
-            this.handleBatchApprove(ids, 'stop')
-            this.title = '批量终止流程'
-          }).catch(() => { })
-          break
-        case 'agree': // 同意
-          ActionUtils.selectedMultiRecord(selection).then((ids) => {
-            this.handleBatchApprove(ids, 'agree')
-            this.title = '批量同意审批'
-          }).catch(() => { })
-          break
-        case 'suspend': // 挂起
-          ActionUtils.selectedMultiRecord(selection).then((ids) => {
-            this.handleSuspend(ids)
-          }).catch(() => { })
-          break
-        case 'recover': // 恢复
-          ActionUtils.selectedMultiRecord(selection).then((ids) => {
-            this.handleRecover(ids)
-          }).catch(() => { })
-          break
-        case 'delegate': // 转办
-          ActionUtils.selectedRecord(selection).then((id) => {
-            this.title = '任务转办'
-            this.handleDelegate(id)
-          }).catch(() => { })
-          break
-        default:
-          break
-      }
-    },
-    handleNodeClick(typeId) {
-      this.typeId = typeId
-      this.loadData()
-    },
-    /**
-     * 处理批量审批
-     */
-    handleBatchApprove(id = '', action = 'agree') {
-      this.taskId = id
-      this.action = action
-      this.approveDialogVisible = true
-    },
-    /**
-     * 批量挂起任务
-     */
-    handleSuspend(ids) {
-      this.$confirm('确认批量挂起流程任务?', '信息').then(() => {
-        batchSuspendProcess({ taskIds: ids }).then(() => {
-          ActionUtils.successMessage('挂起流程任务成功')
-          this.search()
-        }).catch(err => {
-          console.error(err)
-        })
-      })
-    },
-    /**
-     * 批量挂起任务
-     */
-    handleRecover(ids) {
-      this.$confirm('确认批量恢复流程任务?', '信息').then(() => {
-        batchRecoverProcess({ taskIds: ids }).then(() => {
-          ActionUtils.successMessage('恢复流程任务成功')
-          this.search()
-        }).catch(err => {
-          console.error(err)
-        })
-      })
-    },
-    handleDelegate(id) {
-      this.taskId = id
-      this.delegateVisible = true
-    },
-    handleExpandCollapse(isExpand) {
-      this.width = isExpand ? 230 : 30
     }
     }
-  }
 }
 }
 </script>
 </script>

+ 22 - 84
src/views/platform/office/bpmReceivedProcess/pendingManage/delegateMatters.vue

@@ -82,35 +82,24 @@ import { pending4Assignee } from '@/api/platform/office/bpmReceived'
 import { batchSuspendProcess, batchRecoverProcess } from '@/api/platform/bpmn/bpmTask'
 import { batchSuspendProcess, batchRecoverProcess } from '@/api/platform/bpmn/bpmTask'
 import ActionUtils from '@/utils/action'
 import ActionUtils from '@/utils/action'
 import FixHeight from '@/mixins/height'
 import FixHeight from '@/mixins/height'
-import IbpsTypeTree from '@/business/platform/cat/type/tree'
+import CommonData from '../../mixin/utils'
 import BpmDefinitionSelector from '@/business/platform/bpmn/definition/selector'
 import BpmDefinitionSelector from '@/business/platform/bpmn/definition/selector'
-import BpmnFormrender from '@/business/platform/bpmn/form/dialog'
 import Delegate from '@/business/platform/bpmn/task-change/edit'
 import Delegate from '@/business/platform/bpmn/task-change/edit'
 import ApproveDialog from '@/business/platform/bpmn/form-ext/approve'
 import ApproveDialog from '@/business/platform/bpmn/form-ext/approve'
 
 
 export default {
 export default {
     components: {
     components: {
-        IbpsTypeTree,
         BpmDefinitionSelector,
         BpmDefinitionSelector,
         Delegate,
         Delegate,
-        ApproveDialog,
-        BpmnFormrender
+        ApproveDialog
     },
     },
-    mixins: [FixHeight],
+    mixins: [FixHeight, CommonData],
     data () {
     data () {
         return {
         return {
-            width: 200,
-            height: document.clientHeight,
-            dialogFormVisible: false, // 弹窗
             approveDialogVisible: false, // 批量审批
             approveDialogVisible: false, // 批量审批
             delegateVisible: false,
             delegateVisible: false,
             action: '',
             action: '',
-            taskId: '', // 编辑dialog需要使用
             title: '',
             title: '',
-            pkKey: 'id', // 主键  如果主键不是pk需要传主键
-            typeId: '',
-            loading: false,
-            listData: [],
             listConfig: {
             listConfig: {
                 // 工具栏
                 // 工具栏
                 toolbars: [
                 toolbars: [
@@ -160,8 +149,6 @@ export default {
                     { prop: 'ownerName', label: '所属人', width: 300 }
                     { prop: 'ownerName', label: '所属人', width: 300 }
                 ]
                 ]
             },
             },
-            pagination: {},
-            sorts: {},
             procDefIdSelect: ''
             procDefIdSelect: ''
         }
         }
     },
     },
@@ -185,7 +172,11 @@ export default {
          */
          */
         loadData () {
         loadData () {
             this.loading = true
             this.loading = true
-            pending4Assignee(this.getFormatParams()).then(response => {
+            const params = {}
+            if (this.$utils.isNotEmpty(this.procDefIdSelect)) {
+                params['Q^temp.proc_def_key_^S'] = this.procDefIdSelect
+            }
+            pending4Assignee(this.getFormatParams(params)).then(response => {
                 const { dataResult = [] } = response.data || {}
                 const { dataResult = [] } = response.data || {}
                 dataResult.forEach(i => {
                 dataResult.forEach(i => {
                     i.subject = this.removeDesc(i.subject)
                     i.subject = this.removeDesc(i.subject)
@@ -196,52 +187,6 @@ export default {
                 this.loading = false
                 this.loading = false
             })
             })
         },
         },
-        /**
-         * 获取格式化参数
-         */
-        getFormatParams () {
-            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(this.typeId)) {
-                params['Q^temp.TYPE_ID_^S'] = this.typeId
-            }
-            return ActionUtils.formatParams(
-                params,
-                this.pagination,
-                this.sorts)
-        },
-        /**
-         * 处理分页事件
-         */
-        handlePaginationChange (page) {
-            ActionUtils.setPagination(this.pagination, page)
-            this.loadData()
-        },
-        /**
-         * 处理排序
-         */
-        handleSortChange (sort) {
-            ActionUtils.setSorts(this.sorts, sort)
-            this.loadData()
-        },
-        search () {
-            this.loadData()
-        },
-        /**
-         * 重置查询条件
-         */
-        reset () {
-            this.$refs['crud'].handleReset()
-        },
-        /**
-         * 点击表格
-         */
-        handleLinkClick (data, columns) {
-            this.taskId = data.taskId || ''
-            this.dialogFormVisible = true
-        },
         /**
         /**
          * 处理按钮事件
          * 处理按钮事件
          */
          */
@@ -283,10 +228,6 @@ export default {
                     break
                     break
             }
             }
         },
         },
-        handleNodeClick (typeId) {
-            this.typeId = typeId
-            this.loadData()
-        },
         /**
         /**
          * 处理批量审批
          * 处理批量审批
          */
          */
@@ -309,7 +250,7 @@ export default {
             })
             })
         },
         },
         /**
         /**
-         * 批量挂起任务
+         * 批量恢复任务
          */
          */
         handleRecover (ids) {
         handleRecover (ids) {
             this.$confirm('确认批量恢复流程任务?', '信息').then(() => {
             this.$confirm('确认批量恢复流程任务?', '信息').then(() => {
@@ -324,25 +265,22 @@ export default {
         handleDelegate (id) {
         handleDelegate (id) {
             this.taskId = id
             this.taskId = id
             this.delegateVisible = true
             this.delegateVisible = true
-        },
-        handleExpandCollapse (isExpand) {
-            this.width = isExpand ? 230 : 30
         }
         }
     }
     }
 }
 }
 </script>
 </script>
 <style lang="scss">
 <style lang="scss">
-.pendingManage-module{
-  .cell{
-    overflow:initial !important;
-  }
-  .el-badge{
-    margin:10px 0 0 10px;
-  }
-  .el-badge__content.is-fixed{
-    top: 0;
-    left: -40px;
-    right: auto;
-  }
-}
+    .pendingManage-module{
+        .cell{
+            overflow:initial !important;
+        }
+        .el-badge{
+            margin:10px 0 0 10px;
+        }
+        .el-badge__content.is-fixed{
+            top: 0;
+            left: -40px;
+            right: auto;
+        }
+    }
 </style>
 </style>

+ 5 - 14
src/views/platform/office/bpmReceivedProcess/pendingManage/pending.vue

@@ -204,7 +204,11 @@ export default {
          */
          */
         loadData () {
         loadData () {
             this.loading = true
             this.loading = true
-            pending(this.getFormatParams()).then(response => {
+            const params = {}
+            if (this.$utils.isNotEmpty(this.procDefIdSelect)) {
+                params['Q^temp.proc_def_key_^S'] = this.procDefIdSelect
+            }
+            pending(this.getFormatParams(params)).then(response => {
                 const { data } = response || {}
                 const { data } = response || {}
                 data.dataResult.forEach((item, i) => {
                 data.dataResult.forEach((item, i) => {
                     item.createDept = this.getTaskInfo(item.subject)
                     item.createDept = this.getTaskInfo(item.subject)
@@ -216,19 +220,6 @@ export default {
                 this.loading = false
                 this.loading = false
             })
             })
         },
         },
-        /**
-         * 获取格式化参数
-         */
-        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(this.typeId)) {
-                params['Q^temp.TYPE_ID_^S'] = this.typeId
-            }
-            return ActionUtils.formatParams(params, this.pagination, this.sorts)
-        },
         /**
         /**
          * 点击表格
          * 点击表格
          */
          */

+ 67 - 67
src/views/platform/office/bpmReceivedProcess/pendingManage/pendingYuan.vue

@@ -1,23 +1,23 @@
 <template>
 <template>
-  <ibps-layout ref="layout">
-    <div slot="west">
-      <ibps-type-tree
-        :width="width"
-        :height="height"
-        title="任务分类"
-        ref = "typeTree"
-        category-key="FLOW_TYPE"
-        @node-click="handleNodeClick"
-        @expand-collapse="handleExpandCollapse"
-      />
-      <ibps-container
-        :margin-left="width+'px'"
-        class="page padding-page"
-      >
-        <detail :id="typeId" :height="height" />
-      </ibps-container>
-    </div>
-  </ibps-layout>
+    <ibps-layout ref="layout">
+        <div slot="west">
+            <ibps-type-tree
+                ref="typeTree"
+                :width="width"
+                :height="height"
+                title="任务分类"
+                category-key="FLOW_TYPE"
+                @node-click="handleNodeClick"
+                @expand-collapse="handleExpandCollapse"
+            />
+            <ibps-container
+                :margin-left="width+'px'"
+                class="page padding-page"
+            >
+                <detail :id="typeId" :height="height" />
+            </ibps-container>
+        </div>
+    </ibps-layout>
 </template>
 </template>
 <script>
 <script>
 import TreeUtils from '@/utils/tree'
 import TreeUtils from '@/utils/tree'
@@ -27,57 +27,57 @@ import IbpsTypeTree from '@/business/platform/cat/type/tree'
 import Detail from './detail'
 import Detail from './detail'
 
 
 export default {
 export default {
-  components: {
-    Detail,
-    IbpsTypeTree
-  },
-  mixins: [FixHeight],
-  data() {
-    return {
-      typeId: '',
-      show: '',
-      rightsArr: ['join', 'delete'],
-      rowHandle: true,
-      width: 230,
-      height: document.clientHeight,
-      orgName: '',
-      loading: false,
-      orgTreeData: []
-    }
-  },
-  methods: {
-    toTree(data) {
-      return TreeUtils.transformToTreeFormat(data, {
-        idKey: 'id',
-        pIdKey: 'parentId',
-        childrenKey: 'children'
-      })
-    },
-    // 查询
-    search() {
-      this.$refs.tree.refreshNode(this.parentId)
-    },
-    // 返回右明细模块未显示
-    successCallback(rtn) {
-      if (rtn) {
-        this.typeId = ''
-        this.show = 'no'
-      }
+    components: {
+        Detail,
+        IbpsTypeTree
     },
     },
-    // 添加 编辑
-    handleEdit(id = '') {
-      this.show = 'edit'
-      this.typeId = id
+    mixins: [FixHeight],
+    data () {
+        return {
+            typeId: '',
+            show: '',
+            rightsArr: ['join', 'delete'],
+            rowHandle: true,
+            width: 230,
+            height: document.clientHeight,
+            orgName: '',
+            loading: false,
+            orgTreeData: []
+        }
     },
     },
-    // 树点击
-    handleNodeClick(typeId) {
-      this.typeId = typeId
-      this.show = 'detail'
-    },
-    handleExpandCollapse(isExpand) {
-      this.width = isExpand ? 230 : 30
+    methods: {
+        toTree (data) {
+            return TreeUtils.transformToTreeFormat(data, {
+                idKey: 'id',
+                pIdKey: 'parentId',
+                childrenKey: 'children'
+            })
+        },
+        // 查询
+        search () {
+            this.$refs.tree.refreshNode(this.parentId)
+        },
+        // 返回右明细模块未显示
+        successCallback (rtn) {
+            if (rtn) {
+                this.typeId = ''
+                this.show = 'no'
+            }
+        },
+        // 添加 编辑
+        handleEdit (id = '') {
+            this.show = 'edit'
+            this.typeId = id
+        },
+        // 树点击
+        handleNodeClick (typeId) {
+            this.typeId = typeId
+            this.show = 'detail'
+        },
+        handleExpandCollapse (isExpand) {
+            this.width = isExpand ? 230 : 30
+        }
     }
     }
-  }
 }
 }
 </script>
 </script>
 <style lang="scss" >
 <style lang="scss" >

+ 258 - 313
src/views/platform/office/bpmReceivedProcess/pendingManage/transferOffice.vue

@@ -1,334 +1,279 @@
 <template>
 <template>
-  <ibps-layout ref="layout" class="pendingManage-module">
-    <div slot="west">
-      <ibps-type-tree
-        :width="width"
-        :height="height"
-        title="任务分类"
-        category-key="FLOW_TYPE"
-        @node-click="handleNodeClick"
-        @expand-collapse="handleExpandCollapse"
-      />
-    </div>
-    <ibps-crud
-      ref="crud"
-      :style="{ marginLeft: width+'px' }"
-      :height="height"
-      :data="listData"
-      :toolbars="listConfig.toolbars"
-      :search-form="listConfig.searchForm"
-      :pk-key="pkKey"
-      :columns="listConfig.columns"
-      :pagination="pagination"
-      :loading="loading"
-      :index-row="false"
-      @action-event="handleAction"
-      @sort-change="handleSortChange"
-      @column-link-click="handleLinkClick"
-      @pagination-change="handlePaginationChange"
-    >
-      <template slot="procDefIdSelect">
-        <bpm-definition-selector
-          v-model="procDefIdSelect"
-          style="width:200px;display:block;"
-          value-key="defKey"
-          is-super
-          :multiple="false"
-          @input="getProcDefId"
-          @callback="data => formId= data.id"
+    <ibps-layout ref="layout" class="pendingManage-module">
+        <div slot="west">
+            <ibps-type-tree
+                :width="width"
+                :height="height"
+                title="任务分类"
+                category-key="FLOW_TYPE"
+                @node-click="handleNodeClick"
+                @expand-collapse="handleExpandCollapse"
+            />
+        </div>
+        <ibps-crud
+            ref="crud"
+            :style="{ marginLeft: width+'px' }"
+            :height="height"
+            :data="listData"
+            :toolbars="listConfig.toolbars"
+            :search-form="listConfig.searchForm"
+            :pk-key="pkKey"
+            :columns="listConfig.columns"
+            :pagination="pagination"
+            :loading="loading"
+            :index-row="false"
+            @action-event="handleAction"
+            @sort-change="handleSortChange"
+            @column-link-click="handleLinkClick"
+            @pagination-change="handlePaginationChange"
+        >
+            <template slot="procDefIdSelect">
+                <bpm-definition-selector
+                    v-model="procDefIdSelect"
+                    style="width:200px;display:block;"
+                    value-key="defKey"
+                    is-super
+                    :multiple="false"
+                    @input="getProcDefId"
+                    @callback="data => formId= data.id"
+                />
+            </template>
+            <template slot="subject" slot-scope="scope">
+                <el-badge v-if="scope.row.remindTimes>0" :value="scope.row.remindTimes" class="item">
+                    <el-link type="primary" :underline="false" @click="handleLinkClick(scope.row)">
+                        {{ scope.row.subject }}
+                    </el-link>
+                </el-badge>
+                <el-link v-else type="primary" :underline="false" @click="handleLinkClick(scope.row)">
+                    {{ scope.row.subject }}
+                </el-link>
+            </template>
+        </ibps-crud>
+        <bpmn-formrender
+            :visible="dialogFormVisible"
+            :task-id="taskId"
+            @callback="search"
+            @close="visible => dialogFormVisible = visible"
         />
         />
-      </template>
-      <template slot="subject" slot-scope="scope">
-        <el-badge v-if="scope.row.remindTimes>0" :value="scope.row.remindTimes" class="item">
-          <el-link type="primary" :underline="false" @click="handleLinkClick(scope.row)">
-            {{ scope.row.subject }}
-          </el-link>
-        </el-badge>
-        <el-link v-else type="primary" :underline="false" @click="handleLinkClick(scope.row)">
-          {{ scope.row.subject }}
-        </el-link>
-      </template>
-    </ibps-crud>
-    <bpmn-formrender
-      :visible="dialogFormVisible"
-      :task-id="taskId"
-      @callback="search"
-      @close="visible => dialogFormVisible = visible"
-    />
-    <!-- 转办 -->
-    <delegate
-      :task-id="taskId"
-      :title="title"
-      :visible="delegateVisible"
-      @callback="search"
-      @close="visible => delegateVisible = visible"
-    />
-    <!-- 批量审批 -->
-    <approve-dialog
-      :visible="approveDialogVisible"
-      :title="title"
-      :task-id="taskId"
-      :action="action"
-      @callback="search"
-      @close="visible => approveDialogVisible = visible"
-    />
-  </ibps-layout>
+        <!-- 转办 -->
+        <delegate
+            :task-id="taskId"
+            :title="title"
+            :visible="delegateVisible"
+            @callback="search"
+            @close="visible => delegateVisible = visible"
+        />
+        <!-- 批量审批 -->
+        <approve-dialog
+            :visible="approveDialogVisible"
+            :title="title"
+            :task-id="taskId"
+            :action="action"
+            @callback="search"
+            @close="visible => approveDialogVisible = visible"
+        />
+    </ibps-layout>
 </template>
 </template>
 <script>
 <script>
 import { pending4Shift } from '@/api/platform/office/bpmReceived'
 import { pending4Shift } from '@/api/platform/office/bpmReceived'
 import { batchSuspendProcess, batchRecoverProcess } from '@/api/platform/bpmn/bpmTask'
 import { batchSuspendProcess, batchRecoverProcess } from '@/api/platform/bpmn/bpmTask'
 import ActionUtils from '@/utils/action'
 import ActionUtils from '@/utils/action'
 import FixHeight from '@/mixins/height'
 import FixHeight from '@/mixins/height'
-import IbpsTypeTree from '@/business/platform/cat/type/tree'
+import CommonData from '../../mixin/utils'
 import BpmDefinitionSelector from '@/business/platform/bpmn/definition/selector'
 import BpmDefinitionSelector from '@/business/platform/bpmn/definition/selector'
-import BpmnFormrender from '@/business/platform/bpmn/form/dialog'
 import Delegate from '@/business/platform/bpmn/task-change/edit'
 import Delegate from '@/business/platform/bpmn/task-change/edit'
 import ApproveDialog from '@/business/platform/bpmn/form-ext/approve'
 import ApproveDialog from '@/business/platform/bpmn/form-ext/approve'
 
 
 export default {
 export default {
-  components: {
-    IbpsTypeTree,
-    BpmDefinitionSelector,
-    Delegate,
-    ApproveDialog,
-    BpmnFormrender
-  },
-  mixins: [FixHeight],
-  data() {
-    return {
-      width: 200,
-      height: document.clientHeight,
-      dialogFormVisible: false, // 弹窗
-      approveDialogVisible: false, // 批量审批
-      delegateVisible: false,
-      action: '',
-      taskId: '', // 编辑dialog需要使用
-      title: '',
-      pkKey: 'id', // 主键  如果主键不是pk需要传主键
-      typeId: '',
-      loading: false,
-      listData: [],
-      listConfig: {
-        // 工具栏
-        toolbars: [
-          { key: 'search' },
-          {
-            key: 'agree',
-            label: '同意',
-            icon: 'ibps-icon-check-square-o'
-          },
-          {
-            key: 'stop',
-            label: '终止',
-            icon: 'ibps-icon-ioxhost'
-          },
-          {
-            key: 'suspend',
-            label: '挂起',
-            icon: 'ibps-icon-ioxhost '
-          },
-          {
-            key: 'recover',
-            label: '恢复',
-            icon: 'ibps-icon-ioxhost '
-          }
-        ],
-        // 查询条件
-        searchForm: {
-          forms: [
-            { prop: 'Q^subject_^SL', name: 'Q^temp.subject_^SL', label: '请求标题', link: 'dialog', labelWidth: 80, itemWidth: 200 },
-            // { prop: 'Q^creatorId^S',  label: '创建人', labelWidth: 80, itemWidth: 200, fieldType: 'slot', slotName: 'searchFormCreator' },
-            { prop: 'Q^proc_def_key_^S', name: 'Q^temp.proc_def_key_^S', label: '流程名称', fieldType: 'slot', slotName: 'procDefIdSelect', labelWidth: 80, itemWidth: 200 },
-            {
-              prop: ['Q^create_time_^DL', 'Q^create_time_^DG'],
-              name: ['Q^temp.create_time_^DL', 'Q^temp.create_time_^DG'],
-              label: '创建时间',
-              fieldType: 'daterange',
-              labelWidth: 80
-            }
-          ]
-        },
-        // 表格字段配置
-        columns: [
-          { prop: 'subject', label: '请求标题', slotName: 'subject' },
-          { prop: 'procDefName', label: '流程名称', width: 120 },
-          { prop: 'name', label: '当前节点', width: 120 },
-          { prop: 'createTime', label: '创建时间', width: 140 },
-          { prop: 'ownerName', label: '所属人', width: 150 }
-        ]
-      },
-      pagination: {},
-      sorts: {},
-      procDefIdSelect: ''
-
-    }
-  },
-  created() {
-    this.loadData()
-  },
-  methods: {
-    getProcDefId(data) {
-      this.procDefIdSelect = data
-    },
-    /**
-     * 加载数据
-     */
-    loadData() {
-      this.loading = true
-      pending4Shift(this.getFormatParams()).then(response => {
-        ActionUtils.handleListData(this, response.data)
-        this.loading = false
-      }).catch(() => {
-        this.loading = false
-      })
-    },
-    /**
-     * 获取格式化参数
-     */
-    getFormatParams() {
-      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(this.typeId)) {
-        params['Q^temp.TYPE_ID_^S'] = this.typeId
-      }
-      return ActionUtils.formatParams(
-        params,
-        this.pagination,
-        this.sorts)
-    },
-    /**
-     * 处理分页事件
-     */
-    handlePaginationChange(page) {
-      ActionUtils.setPagination(this.pagination, page)
-      this.loadData()
-    },
-    /**
-     * 处理排序
-     */
-    handleSortChange(sort) {
-      ActionUtils.setSorts(this.sorts, sort)
-      this.loadData()
-    },
-    search() {
-      this.loadData()
-    },
-    /**
-     * 重置查询条件
-     */
-    reset() {
-      this.$refs['crud'].handleReset()
-    },
-    /**
-     * 点击表格
-     */
-    handleLinkClick(data, columns) {
-      this.taskId = data.taskId || ''
-      this.dialogFormVisible = true
-    },
-    /**
-     * 处理按钮事件
-     */
-    handleAction(command, position, selection, data) {
-      switch (command) {
-        case 'search':// 查询
-          ActionUtils.setFirstPagination(this.pagination)
-          this.search()
-          break
-        case 'stop': // 终止
-          ActionUtils.selectedMultiRecord(selection).then((ids) => {
-            this.handleBatchApprove(ids, 'stop')
-            this.title = '批量终止流程'
-          }).catch(() => { })
-          break
-        case 'agree': // 同意
-          ActionUtils.selectedMultiRecord(selection).then((ids) => {
-            this.handleBatchApprove(ids, 'agree')
-            this.title = '批量同意审批'
-          }).catch(() => { })
-          break
-        case 'suspend': // 挂起
-          ActionUtils.selectedMultiRecord(selection).then((ids) => {
-            this.handleSuspend(ids)
-          }).catch(() => { })
-          break
-        case 'recover': // 恢复
-          ActionUtils.selectedMultiRecord(selection).then((ids) => {
-            this.handleRecover(ids)
-          }).catch(() => { })
-          break
-        case 'delegate': // 转办
-          ActionUtils.selectedRecord(selection).then((id) => {
-            this.title = '任务转办'
-            this.handleDelegate(id)
-          }).catch(() => { })
-          break
-        default:
-          break
-      }
-    },
-    handleNodeClick(typeId) {
-      this.typeId = typeId
-      this.loadData()
+    components: {
+        BpmDefinitionSelector,
+        Delegate,
+        ApproveDialog
     },
     },
-    /**
-     * 处理批量审批
-     */
-    handleBatchApprove(id = '', action = 'agree') {
-      this.taskId = id
-      this.action = action
-      this.approveDialogVisible = true
-    },
-    /**
-     * 批量挂起任务
-     */
-    handleSuspend(ids) {
-      this.$confirm('确认批量挂起流程任务?', '信息').then(() => {
-        batchSuspendProcess({ taskIds: ids }).then(() => {
-          ActionUtils.successMessage('挂起流程任务成功')
-          this.search()
-        }).catch(err => {
-          console.error(err)
-        })
-      })
-    },
-    /**
-     * 批量挂起任务
-     */
-    handleRecover(ids) {
-      this.$confirm('确认批量恢复流程任务?', '信息').then(() => {
-        batchRecoverProcess({ taskIds: ids }).then(() => {
-          ActionUtils.successMessage('恢复流程任务成功')
-          this.search()
-        }).catch(err => {
-          console.error(err)
-        })
-      })
+    mixins: [FixHeight, CommonData],
+    data () {
+        return {
+            approveDialogVisible: false, // 批量审批
+            delegateVisible: false,
+            action: '',
+            title: '',
+            listConfig: {
+                // 工具栏
+                toolbars: [
+                    { key: 'search' },
+                    {
+                        key: 'agree',
+                        label: '同意',
+                        icon: 'ibps-icon-check-square-o'
+                    },
+                    {
+                        key: 'stop',
+                        label: '终止',
+                        icon: 'ibps-icon-ioxhost'
+                    },
+                    {
+                        key: 'suspend',
+                        label: '挂起',
+                        icon: 'ibps-icon-ioxhost '
+                    },
+                    {
+                        key: 'recover',
+                        label: '恢复',
+                        icon: 'ibps-icon-ioxhost '
+                    }
+                ],
+                // 查询条件
+                searchForm: {
+                    forms: [
+                        { prop: 'Q^subject_^SL', name: 'Q^temp.subject_^SL', label: '请求标题', link: 'dialog', labelWidth: 80, itemWidth: 200 },
+                        // { prop: 'Q^creatorId^S',  label: '创建人', labelWidth: 80, itemWidth: 200, fieldType: 'slot', slotName: 'searchFormCreator' },
+                        { prop: 'Q^proc_def_key_^S', name: 'Q^temp.proc_def_key_^S', label: '流程名称', fieldType: 'slot', slotName: 'procDefIdSelect', labelWidth: 80, itemWidth: 200 },
+                        {
+                            prop: ['Q^create_time_^DL', 'Q^create_time_^DG'],
+                            name: ['Q^temp.create_time_^DL', 'Q^temp.create_time_^DG'],
+                            label: '创建时间',
+                            fieldType: 'daterange',
+                            labelWidth: 80
+                        }
+                    ]
+                },
+                // 表格字段配置
+                columns: [
+                    { prop: 'subject', label: '请求标题', slotName: 'subject' },
+                    { prop: 'procDefName', label: '流程名称', width: 120 },
+                    { prop: 'name', label: '当前节点', width: 120 },
+                    { prop: 'createTime', label: '创建时间', width: 140 },
+                    { prop: 'ownerName', label: '所属人', width: 150 }
+                ]
+            },
+            procDefIdSelect: ''
+
+        }
     },
     },
-    handleDelegate(id) {
-      this.taskId = id
-      this.delegateVisible = true
+    created () {
+        this.loadData()
     },
     },
-    handleExpandCollapse(isExpand) {
-      this.width = isExpand ? 230 : 30
+    methods: {
+        getProcDefId (data) {
+            this.procDefIdSelect = data
+        },
+        /**
+         * 加载数据
+         */
+        loadData () {
+            this.loading = true
+            const params = {}
+            if (this.$utils.isNotEmpty(this.procDefIdSelect)) {
+                params['Q^temp.proc_def_key_^S'] = this.procDefIdSelect
+            }
+            pending4Shift(this.getFormatParams(params)).then(response => {
+                ActionUtils.handleListData(this, response.data)
+                this.loading = false
+            }).catch(() => {
+                this.loading = false
+            })
+        },
+        /**
+         * 点击表格
+         */
+        handleLinkClick (data, columns) {
+            this.taskId = data.taskId || ''
+            this.dialogFormVisible = true
+        },
+        /**
+         * 处理按钮事件
+         */
+        handleAction (command, position, selection, data) {
+            switch (command) {
+                case 'search':// 查询
+                    ActionUtils.setFirstPagination(this.pagination)
+                    this.search()
+                    break
+                case 'stop': // 终止
+                    ActionUtils.selectedMultiRecord(selection).then((ids) => {
+                        this.handleBatchApprove(ids, 'stop')
+                        this.title = '批量终止流程'
+                    }).catch(() => { })
+                    break
+                case 'agree': // 同意
+                    ActionUtils.selectedMultiRecord(selection).then((ids) => {
+                        this.handleBatchApprove(ids, 'agree')
+                        this.title = '批量同意审批'
+                    }).catch(() => { })
+                    break
+                case 'suspend': // 挂起
+                    ActionUtils.selectedMultiRecord(selection).then((ids) => {
+                        this.handleSuspend(ids)
+                    }).catch(() => { })
+                    break
+                case 'recover': // 恢复
+                    ActionUtils.selectedMultiRecord(selection).then((ids) => {
+                        this.handleRecover(ids)
+                    }).catch(() => { })
+                    break
+                case 'delegate': // 转办
+                    ActionUtils.selectedRecord(selection).then((id) => {
+                        this.title = '任务转办'
+                        this.handleDelegate(id)
+                    }).catch(() => { })
+                    break
+                default:
+                    break
+            }
+        },
+        /**
+         * 处理批量审批
+         */
+        handleBatchApprove (id = '', action = 'agree') {
+            this.taskId = id
+            this.action = action
+            this.approveDialogVisible = true
+        },
+        /**
+         * 批量挂起任务
+         */
+        handleSuspend (ids) {
+            this.$confirm('确认批量挂起流程任务?', '信息').then(() => {
+                batchSuspendProcess({ taskIds: ids }).then(() => {
+                    ActionUtils.successMessage('挂起流程任务成功')
+                    this.search()
+                }).catch(err => {
+                    console.error(err)
+                })
+            })
+        },
+        /**
+         * 批量恢复任务
+         */
+        handleRecover (ids) {
+            this.$confirm('确认批量恢复流程任务?', '信息').then(() => {
+                batchRecoverProcess({ taskIds: ids }).then(() => {
+                    ActionUtils.successMessage('恢复流程任务成功')
+                    this.search()
+                }).catch(err => {
+                    console.error(err)
+                })
+            })
+        },
+        handleDelegate (id) {
+            this.taskId = id
+            this.delegateVisible = true
+        }
     }
     }
-  }
 }
 }
 </script>
 </script>
 <style lang="scss">
 <style lang="scss">
-.pendingManage-module{
-  .cell{
-    overflow:initial !important;
-  }
-  .el-badge{
-    margin:10px 0 0 10px;
-  }
-  .el-badge__content.is-fixed{
-    top: 0;
-    left: -40px;
-    right: auto;
-  }
-}
+    .pendingManage-module{
+        .cell{
+            overflow:initial !important;
+        }
+        .el-badge{
+            margin:10px 0 0 10px;
+        }
+        .el-badge__content.is-fixed{
+            top: 0;
+            left: -40px;
+            right: auto;
+        }
+    }
 </style>
 </style>

+ 135 - 201
src/views/platform/office/bpmReceivedProcess/revoke.vue

@@ -1,217 +1,151 @@
 <template>
 <template>
-  <ibps-layout ref="layout">
-    <div slot="west">
-      <ibps-type-tree
-        :width="width"
-        :height="height"
-        title="任务分类"
-        category-key="FLOW_TYPE"
-        @node-click="handleNodeClick"
-        @expand-collapse="handleExpandCollapse"
-      />
-    </div>
-    <ibps-crud
-      ref="crud"
-      :style="{ marginLeft: width+'px' }"
-      :height="height"
-      :data="listData"
-      :toolbars="listConfig.toolbars"
-      :search-form="listConfig.searchForm"
-      :pk-key="pkKey"
-      :columns="listConfig.columns"
-      :row-handle="listConfig.rowHandle"
-      :pagination="pagination"
-      :loading="loading"
-      :selection-row="false"
-      :index-row="false"
-      @action-event="handleAction"
-      @sort-change="handleSortChange"
-      @column-link-click="handleLinkClick"
-      @pagination-change="handlePaginationChange"
-    />
-    <bpmn-formrender
-      :visible="dialogFormVisible"
-      :instance-id="instanceId"
-      @close="visible => dialogFormVisible = visible"
-    />
-    <!-- 撤销 -->
-    <approve-dialog
-      :visible="approveDialogVisible"
-      :title="title"
-      :task-id="taskId"
-      action="revoke"
-      @callback="search"
-      @close="closeApproveDialog"
-    />
-    <!-- visible => approveDialogVisible = visible -->
-  </ibps-layout>
+    <ibps-layout ref="layout">
+        <div slot="west">
+            <ibps-type-tree
+                :width="width"
+                :height="height"
+                title="任务分类"
+                category-key="FLOW_TYPE"
+                @node-click="handleNodeClick"
+                @expand-collapse="handleExpandCollapse"
+            />
+        </div>
+        <ibps-crud
+            ref="crud"
+            :style="{ marginLeft: width+'px' }"
+            :height="height"
+            :data="listData"
+            :toolbars="listConfig.toolbars"
+            :search-form="listConfig.searchForm"
+            :pk-key="pkKey"
+            :columns="listConfig.columns"
+            :row-handle="listConfig.rowHandle"
+            :pagination="pagination"
+            :loading="loading"
+            :selection-row="false"
+            :index-row="false"
+            @action-event="handleAction"
+            @sort-change="handleSortChange"
+            @column-link-click="handleLinkClick"
+            @pagination-change="handlePaginationChange"
+        />
+        <bpmn-formrender
+            :visible="dialogFormVisible"
+            :instance-id="instanceId"
+            @close="visible => dialogFormVisible = visible"
+        />
+        <!-- 撤销 -->
+        <approve-dialog
+            :visible="approveDialogVisible"
+            :title="title"
+            :task-id="taskId"
+            action="revoke"
+            @callback="search"
+            @close="closeApproveDialog"
+        />
+        <!-- visible => approveDialogVisible = visible -->
+    </ibps-layout>
 </template>
 </template>
 <script>
 <script>
 import { revokable } from '@/api/platform/office/bpmReceived'
 import { revokable } from '@/api/platform/office/bpmReceived'
 import ActionUtils from '@/utils/action'
 import ActionUtils from '@/utils/action'
 import FixHeight from '@/mixins/height'
 import FixHeight from '@/mixins/height'
-import IbpsTypeTree from '@/business/platform/cat/type/tree'
-import BpmnFormrender from '@/business/platform/bpmn/form/dialog'
+import CommonData from '../mixin/utils'
 import ApproveDialog from '@/business/platform/bpmn/form-ext/approve'
 import ApproveDialog from '@/business/platform/bpmn/form-ext/approve'
 
 
 export default {
 export default {
-  components: {
-    IbpsTypeTree,
-    ApproveDialog,
-    BpmnFormrender
-  },
-  mixins: [FixHeight],
-  data() {
-    return {
-      width: 200,
-      height: document.clientHeight,
-      dialogFormVisible: false, // 弹窗
-      approveDialogVisible: false,
-      instanceId: '', // 编辑dialog需要使用
-
-      taskId: '', // 编辑dialog需要使用
-      title: '',
-
-      pkKey: 'id', // 主键  如果主键不是pk需要传主键
-      typeId: '',
-      loading: false,
-      listData: [],
-      listConfig: {
-        // 工具栏
-        toolbars: [
-          { key: 'search' }
-        ],
-        // 查询条件
-        searchForm: {
-          forms: [
-            { prop: 'Q^subject_^SL', name: 'Q^wfInst.subject_^SL', label: '请求标题' },
-            { prop: 'Q^proc_def_name_^SL', name: 'Q^wfInst.proc_def_name_^SL', label: '流程名称' },
-            {
-              prop: ['Q^end_time_^DL', 'Q^end_time_^DG'],
-              name: ['Q^ec.end_time_^DL', 'Q^ec.end_time_^DG'],
-              label: '审批时间',
-              fieldType: 'daterange'
-            }
-          ]
-        },
-        // 表格字段配置
-        columns: [
-          { prop: 'subject', label: '请求标题', link: 'dialog' },
-          { prop: 'procDefName', label: '流程名称', width: 120 },
-          { prop: 'myNode', label: '我审批得节点', width: 120 },
-          { prop: 'taskEndTime', label: '审批时间', width: 140, dateFormat: 'yyyy-MM-dd HH:mm:ss' },
-          { prop: 'curNode', label: '当前审批节点', width: 120 }
-        ],
-        // 管理列
-        rowHandle: {
-          actions: [
-            {
-              key: 'revoke',
-              label: '撤销',
-              icon: 'ibps-icon-send'
+    components: {
+        ApproveDialog
+    },
+    mixins: [FixHeight, CommonData],
+    data () {
+        return {
+            approveDialogVisible: false,
+            title: '',
+            listConfig: {
+                // 工具栏
+                toolbars: [
+                    { key: 'search' }
+                ],
+                // 查询条件
+                searchForm: {
+                    forms: [
+                        { prop: 'Q^subject_^SL', name: 'Q^wfInst.subject_^SL', label: '请求标题' },
+                        { prop: 'Q^proc_def_name_^SL', name: 'Q^wfInst.proc_def_name_^SL', label: '流程名称' },
+                        {
+                            prop: ['Q^end_time_^DL', 'Q^end_time_^DG'],
+                            name: ['Q^ec.end_time_^DL', 'Q^ec.end_time_^DG'],
+                            label: '审批时间',
+                            fieldType: 'daterange'
+                        }
+                    ]
+                },
+                // 表格字段配置
+                columns: [
+                    { prop: 'subject', label: '请求标题', link: 'dialog' },
+                    { prop: 'procDefName', label: '流程名称', width: 120 },
+                    { prop: 'myNode', label: '我审批得节点', width: 120 },
+                    { prop: 'taskEndTime', label: '审批时间', width: 140, dateFormat: 'yyyy-MM-dd HH:mm:ss' },
+                    { prop: 'curNode', label: '当前审批节点', width: 120 }
+                ],
+                // 管理列
+                rowHandle: {
+                    actions: [
+                        {
+                            key: 'revoke',
+                            label: '撤销',
+                            icon: 'ibps-icon-send'
+                        }
+                    ]
+                }
             }
             }
-          ]
         }
         }
-      },
-      pagination: {},
-      sorts: {}
-    }
-  },
-  created() {
-    this.loadData()
-  },
-  methods: {
-    /**
-     * 加载数据
-     */
-    loadData() {
-      this.loading = true
-      revokable(this.getFormatParams()).then(response => {
-        ActionUtils.handleListData(this, response.data)
-        this.loading = false
-      }).catch(() => {
-        this.loading = false
-      })
-    },
-    /**
-     * 获取格式化参数
-     */
-    getFormatParams() {
-      const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
-      if (this.$utils.isNotEmpty(this.typeId)) {
-        params['Q^TYPE_ID_^S'] = this.typeId
-      }
-      return ActionUtils.formatParams(
-        params,
-        this.pagination,
-        this.sorts)
-    },
-    /**
-     * 处理分页事件
-     */
-    handlePaginationChange(page) {
-      ActionUtils.setPagination(this.pagination, page)
-      this.loadData()
-    },
-    /**
-     * 处理排序
-     */
-    handleSortChange(sort) {
-      ActionUtils.setSorts(this.sorts, sort)
-      this.loadData()
-    },
-    search() {
-      this.loadData()
     },
     },
-    /**
-     * 重置查询条件
-     */
-    reset() {
-      this.$refs['crud'].handleReset()
+    created () {
+        this.loadData()
     },
     },
-    /**
-     * 点击表格
-     */
-    handleLinkClick(data) {
-      this.instanceId = data.id || ''
-      this.dialogFormVisible = true
-    },
-    /**
-     * 处理按钮事件
-     */
-    handleAction(command, position, selection, data) {
-      switch (command) {
-        case 'search':// 查询
-          ActionUtils.setFirstPagination(this.pagination)
-          this.search()
-          break
-        case 'revoke':
-          ActionUtils.selectedRecord(selection).then((id) => {
-            this.title = '撤销任务'
-            this.handleRevoke(data.taskId)
-          }).catch(() => { })
-          break
-        default:
-          break
-      }
-    },
-    /**
-     * 撤销
-     */
-    handleRevoke(id = '') {
-      this.taskId = id
-      this.approveDialogVisible = true
-    },
-    handleNodeClick(typeId) {
-      this.typeId = typeId
-      this.loadData()
-    },
-    handleExpandCollapse(isExpand) {
-      this.width = isExpand ? 230 : 30
-    },
-    closeApproveDialog() {
-      this.approveDialogVisible = false
+    methods: {
+        /**
+         * 加载数据
+         */
+        loadData () {
+            this.loading = true
+            revokable(this.getFormatParams()).then(response => {
+                ActionUtils.handleListData(this, response.data)
+                this.loading = false
+            }).catch(() => {
+                this.loading = false
+            })
+        },
+        /**
+         * 处理按钮事件
+         */
+        handleAction (command, position, selection, data) {
+            switch (command) {
+                case 'search':// 查询
+                    ActionUtils.setFirstPagination(this.pagination)
+                    this.search()
+                    break
+                case 'revoke':
+                    ActionUtils.selectedRecord(selection).then((id) => {
+                        this.title = '撤销任务'
+                        this.handleRevoke(data.taskId)
+                    }).catch(() => { })
+                    break
+                default:
+                    break
+            }
+        },
+        /**
+         * 撤销
+         */
+        handleRevoke (id = '') {
+            this.taskId = id
+            this.approveDialogVisible = true
+        },
+        closeApproveDialog () {
+            this.approveDialogVisible = false
+        }
     }
     }
-  }
 }
 }
 </script>
 </script>

+ 102 - 168
src/views/platform/office/bpmReceivedTask/handled.vue

@@ -1,182 +1,116 @@
 <template>
 <template>
-  <ibps-layout ref="layout">
-    <div slot="west">
-      <ibps-type-tree
-        :width="width"
-        :height="height"
-        title="流程分类"
-        category-key="FLOW_TYPE"
-        @node-click="handleNodeClick"
-        @expand-collapse="handleExpandCollapse"
-      />
-    </div>
-    <ibps-crud
-      ref="crud"
-      :style="{ marginLeft: width+'px' }"
-      :height="height"
-      :data="listData"
-      :toolbars="listConfig.toolbars"
-      :search-form="listConfig.searchForm"
-      :pk-key="pkKey"
-      :columns="listConfig.columns"
-      :row-handle="listConfig.rowHandle"
-      :pagination="pagination"
-      :loading="loading"
-      :index-row="false"
-      :selection-row="false"
-      @action-event="handleAction"
-      @sort-change="handleSortChange"
-      @column-link-click="handleLinkClick"
-      @pagination-change="handlePaginationChange"
-    />
-    <bpmn-formrender
-      :visible="dialogFormVisible"
-      :instance-id="instanceId"
-      @callback="search"
-      @close="visible => dialogFormVisible = visible"
-    />
-  </ibps-layout>
+    <ibps-layout ref="layout">
+        <div slot="west">
+            <ibps-type-tree
+                :width="width"
+                :height="height"
+                title="流程分类"
+                category-key="FLOW_TYPE"
+                @node-click="handleNodeClick"
+                @expand-collapse="handleExpandCollapse"
+            />
+        </div>
+        <ibps-crud
+            ref="crud"
+            :style="{ marginLeft: width+'px' }"
+            :height="height"
+            :data="listData"
+            :toolbars="listConfig.toolbars"
+            :search-form="listConfig.searchForm"
+            :pk-key="pkKey"
+            :columns="listConfig.columns"
+            :row-handle="listConfig.rowHandle"
+            :pagination="pagination"
+            :loading="loading"
+            :index-row="false"
+            :selection-row="false"
+            @action-event="handleAction"
+            @sort-change="handleSortChange"
+            @column-link-click="handleLinkClick"
+            @pagination-change="handlePaginationChange"
+        />
+        <bpmn-formrender
+            :visible="dialogFormVisible"
+            :instance-id="instanceId"
+            @callback="search"
+            @close="visible => dialogFormVisible = visible"
+        />
+    </ibps-layout>
 </template>
 </template>
 <script>
 <script>
 import { handledTask } from '@/api/platform/office/bpmReceived'
 import { handledTask } from '@/api/platform/office/bpmReceived'
 import ActionUtils from '@/utils/action'
 import ActionUtils from '@/utils/action'
 import FixHeight from '@/mixins/height'
 import FixHeight from '@/mixins/height'
-import { actionOptions,statusOptions} from '@/business/platform/bpmn/constants'
-import IbpsTypeTree from '@/business/platform/cat/type/tree'
-import BpmnFormrender from '@/business/platform/bpmn/form/dialog'
+import CommonData from '../mixin/utils'
+import { actionOptions, statusOptions } from '@/business/platform/bpmn/constants'
 
 
 export default {
 export default {
-  components: {
-    IbpsTypeTree,
-    BpmnFormrender
-  },
-  mixins: [FixHeight],
-  data() {
-    return {
-      width: 200,
-      height: document.clientHeight,
-      dialogFormVisible: false, // 弹窗
-      instanceId: '', // 编辑dialog需要使用
-
-      pkKey: 'id', // 主键  如果主键不是pk需要传主键
-      typeId: '',
-      loading: false,
-      listData: [],
-      listConfig: {
-        // 工具栏
-        toolbars: [
-          { key: 'search' }
-        ],
-        // 查询条件
-        searchForm: {
-          forms: [
-            { prop: 'Q^SUBJECT_^SL', label: '事务名称', itemWidth: 150 },
-            { prop: 'Q^STATUS_^S',
-              name: 'Q^APO.STATUS_^S',
-              label: '状态',
-              itemWidth: 150,
-              labelWidth: 70,
-              fieldType: 'select',
-              options: statusOptions
-            },
-            {
-              prop: ['Q^create_time_^DL', 'Q^create_time_^DG'],
-              label: '处理时间',
-              fieldType: 'daterange'
+    mixins: [FixHeight, CommonData],
+    data () {
+        return {
+            listConfig: {
+                // 工具栏
+                toolbars: [
+                    { key: 'search' }
+                ],
+                // 查询条件
+                searchForm: {
+                    forms: [
+                        { prop: 'Q^SUBJECT_^SL', label: '事务名称', itemWidth: 150 },
+                        { prop: 'Q^STATUS_^S',
+                            name: 'Q^APO.STATUS_^S',
+                            label: '状态',
+                            itemWidth: 150,
+                            labelWidth: 70,
+                            fieldType: 'select',
+                            options: statusOptions
+                        },
+                        {
+                            prop: ['Q^create_time_^DL', 'Q^create_time_^DG'],
+                            label: '处理时间',
+                            fieldType: 'daterange'
+                        }
+                    ]
+                },
+                // 表格字段配置
+                columns: [
+                    { prop: 'subject', label: '事务名称', link: 'dialog', width: 450 },
+                    { prop: 'curNode', label: '事务类型', width: 100 },
+                    { prop: 'status', label: '运行 / 结束', tags: statusOptions, width: 100 },
+                    { prop: 'createTime', label: '提交时间', dateFormat: 'yyyy-MM-dd HH:mm:ss', width: 140 }
+                ]
             }
             }
-          ]
-        },
-        // 表格字段配置
-        columns: [
-          { prop: 'subject', label: '事务名称', link: 'dialog' , width: 450},
-          { prop: 'curNode', label: '事务类型', width: 100 },
-          { prop: 'status', label: '运行 / 结束', tags: statusOptions, width: 100 },
-          { prop: 'createTime', label: '提交时间', dateFormat: 'yyyy-MM-dd HH:mm:ss', width: 140 },
-        ]
-      },
-      pagination: {},
-      sorts: {}
-    }
-  },
-  created() {
-    this.loadData()
-  },
-  methods: {
-    /**
-     * 加载数据
-     */
-    loadData() {
-      this.loading = true
-      handledTask(this.getFormatParams()).then(response => {
-        ActionUtils.handleListData(this, response.data)
-        this.loading = false
-      }).catch(() => {
-        this.loading = false
-      })
-    },
-    /**
-     * 获取格式化参数
-     */
-    getFormatParams() {
-      const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
-      if (this.$utils.isNotEmpty(this.typeId)) {
-        params['Q^TYPE_ID_^S'] = this.typeId
-      }
-      return ActionUtils.formatParams(
-        params,
-        this.pagination,
-        this.sorts)
-    },
-    /**
-     * 处理分页事件
-     */
-    handlePaginationChange(page) {
-      ActionUtils.setPagination(this.pagination, page)
-      this.loadData()
-    },
-    /**
-     * 处理排序
-     */
-    handleSortChange(sort) {
-      ActionUtils.setSorts(this.sorts, sort)
-      this.loadData()
+        }
     },
     },
-    search() {
-      this.loadData()
+    created () {
+        this.loadData()
     },
     },
-    /**
-     * 重置查询条件
-     */
-    reset() {
-      this.$refs['crud'].handleReset()
-    },
-    /**
-     * 点击表格
-     */
-    handleLinkClick(data) {
-      this.instanceId = data.id || ''
-      this.dialogFormVisible = true
-    },
-    /**
-     * 处理按钮事件
-     */
-    handleAction(command, position, selection, data) {
-      switch (command) {
-        case 'search':// 查询
-          ActionUtils.setFirstPagination(this.pagination)
-          this.search()
-          break
-        default:
-          break
-      }
-    },
-    handleNodeClick(typeId) {
-      this.typeId = typeId
-      this.loadData()
-    },
-    handleExpandCollapse(isExpand) {
-      this.width = isExpand ? 230 : 30
+    methods: {
+        /**
+         * 加载数据
+         */
+        loadData () {
+            this.loading = true
+            handledTask(this.getFormatParams()).then(response => {
+                ActionUtils.handleListData(this, response.data)
+                this.loading = false
+            }).catch(() => {
+                this.loading = false
+            })
+        },
+        /**
+         * 处理按钮事件
+         */
+        handleAction (command, position, selection, data) {
+            switch (command) {
+                case 'search':// 查询
+                    ActionUtils.setFirstPagination(this.pagination)
+                    this.search()
+                    break
+                default:
+                    break
+            }
+        }
     }
     }
-  }
 }
 }
 </script>
 </script>

+ 184 - 264
src/views/platform/office/bpmReceivedTask/handled2.vue

@@ -1,283 +1,203 @@
 <template>
 <template>
-  <div>
-  <ibps-layout ref="layout">
-    <div slot="west">
-      <ibps-type-tree
-        :width="width"
-        :height="height"
-        title="任务分类"
-        category-key="FLOW_TYPE"
-        @node-click="handleNodeClick"
-        @expand-collapse="handleExpandCollapse"
-      />
-    </div>
-    <ibps-crud
-      ref="crud"
-      :height="height"
-      :data="listData"
-      :toolbars="listConfig.toolbars"
-      :search-form="listConfig.searchForm"
-      :pk-key="pkKey"
-      :columns="listConfig.columns"
-      :row-handle="listConfig.rowHandle"
-      :pagination="pagination"
-      :loading="loading"
-      :index-row="false"
-      :selection-row="false"
-      @action-event="handleAction"
-      @sort-change="handleSortChange"
-      @column-link-click="handleLinkClick"
-      @pagination-change="handlePaginationChange"
-    />
-    <bpmn-formrender
-      :visible="dialogFormVisible"
-      :instance-id="instanceId"
-      @callback="search"
-      @close="visible => dialogFormVisible = visible"
-    />
-  </ibps-layout>
+    <div>
+        <ibps-layout ref="layout">
+            <div slot="west">
+                <ibps-type-tree
+                    :width="width"
+                    :height="height"
+                    title="任务分类"
+                    category-key="FLOW_TYPE"
+                    @node-click="handleNodeClick"
+                    @expand-collapse="handleExpandCollapse"
+                />
+            </div>
+            <ibps-crud
+                ref="crud"
+                :height="height"
+                :data="listData"
+                :toolbars="listConfig.toolbars"
+                :search-form="listConfig.searchForm"
+                :pk-key="pkKey"
+                :columns="listConfig.columns"
+                :row-handle="listConfig.rowHandle"
+                :pagination="pagination"
+                :loading="loading"
+                :index-row="false"
+                :selection-row="false"
+                @action-event="handleAction"
+                @sort-change="handleSortChange"
+                @column-link-click="handleLinkClick"
+                @pagination-change="handlePaginationChange"
+            />
+            <bpmn-formrender
+                :visible="dialogFormVisible"
+                :instance-id="instanceId"
+                @callback="search"
+                @close="visible => dialogFormVisible = visible"
+            />
+        </ibps-layout>
 
 
- <!-- <div>
-    <ibps-layout ref="layout">
-      <div slot="west">
-          <ibps-type-tree
-            :width="width"
-            :height="height"
-            title="流程分类"
-            category-key="FLOW_TYPE"
-            @node-click="handleNodeClick"
-            @expand-collapse="handleExpandCollapse"
-          />
-      </div>
-      <ibps-card-list
-        ref="crud"
-        :title="title"
-        :height="height"
-        :data="listData"
-        :pagination="pagination"
-        :pk-key="pkKey"
-        :toolbars="listConfig.toolbars"
-        :search-form="listConfig.searchForm"
-        :columns="listConfig.columns"
-        :loading="loading"
-        :index-row="false"
-        @action-event="handleAction"
-        @sort-change="handleSortChange"
-        @pagination-change="handlePaginationChange"
-      >
-        <template   slot="item-symbol">
-          <p style="width:60px;height:60px;border: 2px solid #409eff;border-radius: 100%;font-size: 48px;color:#409eff;font-size:30px;line-height: 60px;">已办</p>
-        </template>
+        <!-- 卡片模式 -->
+        <!-- <ibps-layout ref="layout">
+            <div slot="west">
+                <ibps-type-tree
+                    :width="width"
+                    :height="height"
+                    title="流程分类"
+                    category-key="FLOW_TYPE"
+                    @node-click="handleNodeClick"
+                    @expand-collapse="handleExpandCollapse"
+                />
+            </div>
+            <ibps-card-list
+                ref="crud"
+                :title="title"
+                :height="height"
+                :data="listData"
+                :pagination="pagination"
+                :pk-key="pkKey"
+                :toolbars="listConfig.toolbars"
+                :search-form="listConfig.searchForm"
+                :columns="listConfig.columns"
+                :loading="loading"
+                :index-row="false"
+                @action-event="handleAction"
+                @sort-change="handleSortChange"
+                @pagination-change="handlePaginationChange"
+            >
+                <template slot="item-symbol">
+                    <p style="width:60px;height:60px;border: 2px solid #409eff;border-radius: 100%;font-size: 48px;color:#409eff;font-size:30px;line-height: 60px;">已办</p>
+                </template>
 
 
-      <template slot="item-detail-name">
-        <span></span>
-      </template>
-      <template slot="item-detail-partyTypeName">
-        <span></span>
-      </template>
-      <template slot="item-detail-createTime">
-        <span></span>
-      </template>
-      <template slot="item-detail-curNode">
-        <span></span>
-      </template>
-      <template slot="item-detail-status">
-        <span></span>
-      </template>
+                <template slot="item-detail-name">
+                    <span />
+                </template>
+                <template slot="item-detail-partyTypeName">
+                    <span />
+                </template>
+                <template slot="item-detail-createTime">
+                    <span />
+                </template>
+                <template slot="item-detail-curNode">
+                    <span />
+                </template>
+                <template slot="item-detail-status">
+                    <span />
+                </template>
 
 
-      </ibps-card-list>
-      <bpmn-formrender
-      :visible="dialogFormVisible"
-      :instance-id="instanceId"
-      @callback="search"
-      @close="visible => dialogFormVisible = visible"
-    />
-   <!-- </ibps-layout> -->
-  </div>
+            </ibps-card-list>
+            <bpmn-formrender
+                :visible="dialogFormVisible"
+                :instance-id="instanceId"
+                @callback="search"
+                @close="visible => dialogFormVisible = visible"
+            />
+        </ibps-layout> -->
+    </div>
 </template>
 </template>
 <script>
 <script>
 import { handledTask } from '@/api/platform/office/bpmReceived'
 import { handledTask } from '@/api/platform/office/bpmReceived'
 import ActionUtils from '@/utils/action'
 import ActionUtils from '@/utils/action'
 import FixHeight from '@/mixins/height'
 import FixHeight from '@/mixins/height'
+import CommonData from '../mixin/utils'
 import { actionOptions } from '@/business/platform/bpmn/constants'
 import { actionOptions } from '@/business/platform/bpmn/constants'
-import IbpsTypeTree from '@/business/platform/cat/type/tree'
-import BpmnFormrender from '@/business/platform/bpmn/form/dialog'
 
 
 export default {
 export default {
-  components: {
-    IbpsTypeTree,
-    BpmnFormrender,
-    'ibps-type-tree': () => import('@/business/platform/cat/type/tree'),
- /*   'ibps-card-list': () => import('@/components/ibps-card-list/list'),
-    'form-builder': () => import('@/business/platform/form/formbuilder/dialog'),
-    'formrender-preview': () => import('@/business/platform/form/formrender/preview/index'), */
-  },
-  mixins: [FixHeight],
-  data() {
-    return {
-      width: 220,
-      height: 500,
-      //height: document.clientHeight,
-      title: '已办结的事务',
-      createText: '创建表单',
-      query: '',
-      typeId: '',
-      pkKey: 'id', // 主键  如果主键不是pk需要传主键
-      loading: false,
-      dialogFormVisible: false,
-      copyDialogFormVisible: false,
-      rightsDialogFormVisible: false,
-      formbuilderDialogVisible: false,
-      formrenderDialogVisible: false,
-      importFormVisible: false,
-      formPrintDialogVisible: false,
-      instanceId: '', // 编辑dialog需要使用
-      statusOptions: [],
-      editId: '',
-      formKey: '',
-      searchField: '',
-      searchName: 'Q^SUBJECT_^SL',
-      listData: [],
-      listConfig: {
-        // 工具栏
-        toolbars: [
-          { key: 'search' }
-        ],
-        // 查询条件
-        searchForm: {
-          forms: [
-            { prop: 'Q^SUBJECT_^SL', label: '任务名称', itemWidth: 200 },
-            { prop: 'Q^TASK_NAME_^SL', label: '事务名称', itemWidth: 200 },
-            { prop: 'Q^STATUS_^S',
-              name: 'Q^APO.STATUS_^S',
-              label: '状态',
-              itemWidth: 200,
-              labelWidth: 70,
-              fieldType: 'select',
-              options: actionOptions
-            },
-            {
-              prop: ['Q^COMPLETE_TIME_^DL', 'Q^COMPLETE_TIME_^DG'],
-              label: '处理时间',
-              fieldType: 'daterange'
+    mixins: [FixHeight, CommonData],
+    data () {
+        return {
+            title: '我的办结',
+            statusOptions: [],
+            listConfig: {
+                // 工具栏
+                toolbars: [
+                    { key: 'search' }
+                ],
+                // 查询条件
+                searchForm: {
+                    forms: [
+                        { prop: 'Q^SUBJECT_^SL', label: '任务名称', itemWidth: 200 },
+                        { prop: 'Q^TASK_NAME_^SL', label: '事务名称', itemWidth: 200 },
+                        { prop: 'Q^STATUS_^S',
+                            name: 'Q^APO.STATUS_^S',
+                            label: '状态',
+                            itemWidth: 200,
+                            labelWidth: 70,
+                            fieldType: 'select',
+                            options: actionOptions
+                        },
+                        {
+                            prop: ['Q^COMPLETE_TIME_^DL', 'Q^COMPLETE_TIME_^DG'],
+                            label: '处理时间',
+                            fieldType: 'daterange'
+                        }
+                    ]
+                },
+                // 表格字段配置
+                columns: [
+                    { prop: 'subject', label: '已办任务名称', link: 'dialog', width: 350 },
+                    { prop: 'taskName', label: '已办事务名称', width: 180 },
+                    { prop: 'status', label: '处理方式', tags: actionOptions, width: 150 },
+                    { prop: 'createTime', label: '创建时间', dateFormat: 'yyyy-MM-dd HH:mm:ss', width: 180 },
+                    { prop: 'completeTime', label: '处理时间', dateFormat: 'yyyy-MM-dd HH:mm:ss', width: 180 }
+                ]
             }
             }
-          ]
-        },
-        // 表格字段配置
-        columns: [
-          { prop: 'subject', label: '已办任务名称', link: 'dialog',width: 350 },
-          { prop: 'taskName', label: '已办事务名称', width: 180 },
-          { prop: 'status', label: '处理方式', tags: actionOptions, width: 150 },
-          { prop: 'createTime', label: '创建时间', dateFormat: 'yyyy-MM-dd HH:mm:ss', width: 180 },
-          { prop: 'completeTime', label: '处理时间', dateFormat: 'yyyy-MM-dd HH:mm:ss', width: 180 }
-        ]
-      },
-      pagination: {},
-      sorts: {}
-    }
-  },
-  created() {
-    this.loadData()
-  },
-  methods: {
-    /**
-     * 加载数据
-     */
-    loadData() {
-      this.loading = true
-      handledTask(this.getFormatParams()).then(response => {
-        ActionUtils.handleListData(this, response.data)
-        this.loading = false
-      }).catch(() => {
-        this.loading = false
-      })
-    },
-    /**
-     * 获取格式化参数
-     */
-    getFormatParams() {
-      const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
-      if (this.$utils.isNotEmpty(this.typeId)) {
-        params['Q^TYPE_ID_^S'] = this.typeId
-      }
-      return ActionUtils.formatParams(
-        params,
-        this.pagination,
-        this.sorts)
-    },
-    /**
-     * 处理分页事件
-     */
-    handlePaginationChange(page) {
-      ActionUtils.setPagination(this.pagination, page)
-      this.loadData()
-    },
-    /**
-     * 处理排序
-     */
-    handleSortChange(sort) {
-      ActionUtils.setSorts(this.sorts, sort)
-      this.loadData()
-    },
-    search() {
-      this.loadData()
-    },
-    /**
-     * 重置查询条件
-     */
-    reset() {
-      this.$refs['crud'].handleReset()
+        }
     },
     },
-    /**
-     * 点击表格
-     */
-    handleLinkClick(data) {
-      this.instanceId = data.procInstId || ''
-      this.dialogFormVisible = true
+    created () {
+        this.loadData()
     },
     },
-    /**
-     * 处理按钮事件
-     */
-    handleAction(command, position, selection, data) {
-      switch (command) {
-        case 'search':// 查询
-          ActionUtils.setFirstPagination(this.pagination)
-          this.search()
-          break
-        case 'add':// 添加
-          this.handleEdit()
-          break
-        case 'edit':// 编辑
-          this.handleEdit(data)
-          break
-        default:
-          break
-      }
-    },
-
-     /**
-     * 编辑
-     */
-    handleEdit(data) {
-      this.instanceId = data.procInstId || ''
-      this.dialogFormVisible = true
-    },
-    handleNodeClick(typeId) {
-      this.typeId = typeId
-      this.loadData()
-    },
-    handleExpandCollapse(isExpand) {
-      this.width = isExpand ? 230 : 30
+    methods: {
+        /**
+         * 加载数据
+         */
+        loadData () {
+            this.loading = true
+            handledTask(this.getFormatParams()).then(response => {
+                ActionUtils.handleListData(this, response.data)
+                this.loading = false
+            }).catch(() => {
+                this.loading = false
+            })
+        },
+        /**
+         * 处理按钮事件
+         */
+        handleAction (command, position, selection, data) {
+            switch (command) {
+                case 'search':// 查询
+                    ActionUtils.setFirstPagination(this.pagination)
+                    this.search()
+                    break
+                case 'add':// 添加
+                    this.handleEdit()
+                    break
+                case 'edit':// 编辑
+                    this.handleEdit(data)
+                    break
+                default:
+                    break
+            }
+        },
+        /**
+         * 编辑
+         */
+        handleEdit (data) {
+            this.instanceId = data.procInstId || ''
+            this.dialogFormVisible = true
+        }
     }
     }
-  }
 }
 }
 </script>
 </script>
-<style scoped>
-.ibps-layout >>>  .container-component{
-    position: absolute;
-    top: 0px;
-    right: 0;
-    bottom: 0px;
-    left: 220px!important;}
-.ibps-card-list-container >>> .ibps-card-list--picture-card{display: block;}
+<style lang="scss" scoped>
+    .ibps-layout .container-component {
+        position: absolute;
+        top: 0px;
+        right: 0;
+        bottom: 0px;
+        left: 220px!important;
+    }
+    .ibps-card-list-container .ibps-card-list--picture-card {
+        display: block;
+    }
 </style>
 </style>