Parcourir la source

高级筛选统一

lidie il y a 1 an
Parent
commit
66faa8e55a

+ 174 - 210
src/views/platform/bpmn/completed/index.vue

@@ -1,20 +1,12 @@
 <template>
   <div>
     <van-sticky>
-      <van-nav-bar
-        :title="generateTitle($route.name,$route.params.title||$route.meta.title)"
-        :left-text="$t('common.button.back')"
-        left-arrow
-        @click-left="$router.push({ name: 'dashboard' })"
-      />
-      <van-search
-        v-model="subject"
-        show-action
-        placeholder="请输入搜索关键词"
-        @search="onSearch"
-      >
+      <van-nav-bar :title="generateTitle($route.name,$route.params.title||$route.meta.title)"
+        :left-text="$t('common.button.back')" left-arrow @click-left="$router.push({ name: 'dashboard' })" />
+      <van-search v-model="subject" show-action placeholder="请输入搜索关键词" @search="onSearch">
         <template #left>
-          <van-icon name="bars" :class="{'ibps-active':$utils.isNotEmpty(typeId)}" class="ibps-pr-5" @click="clickType" />
+          <van-icon name="bars" :class="{'ibps-active':$utils.isNotEmpty(typeId)}" class="ibps-pr-5"
+            @click="clickType" />
         </template>
         <template #action>
           <van-icon name="filter-o" :class="{'ibps-active':stateActive}" @click="clickMoreSearch" />
@@ -23,231 +15,203 @@
     </van-sticky>
     <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
       <van-list v-model="loading" :finished="finished" @load="loadData">
-        <van-cell
-          v-for="(item,index) in listData"
-          :key="item.id+index"
-          :title="item.procDefName"
-          :label="getTaskDesc(item.subject)"
-          size="large"
-          @click="onClick(item,index)"
-        >
+        <van-cell v-for="(item,index) in listData" :key="item.id+index" :title="item.procDefName"
+          :label="getTaskDesc(item.subject)" size="large" @click="onClick(item,index)">
           <template slot="icon">
-            <ibps-avatar
-              :icon="_randomIcon(index)"
-              :text="item.name"
-              :bg-color="_randomColor(index)"
-              radius="4"
-              icon-prefix="ibps-icon"
-              class="ibps-mr-10"
-            />
+            <ibps-avatar :icon="_randomIcon(index)" :text="item.name" :bg-color="_randomColor(index)" radius="4"
+              icon-prefix="ibps-icon" class="ibps-mr-10" />
           </template>
           <span>{{ item.createTime|formatRelativeTime }}</span>
           <div>
             <!-- <van-tag plain :type=" item.status | optionsFilter(bpmnStatusOptions,'type')">{{ item.status | optionsFilter(bpmnStatusOptions) }}</van-tag> -->
-            <van-tag
-              size="medium"
+            <van-tag size="medium"
               :color="item.status | optionsFilter(bpmnStatusOptions,'type') | optionsFilter(colorOptions,'color','type')"
-              :text-color="item.status | optionsFilter(bpmnStatusOptions,'type') | optionsFilter(colorOptions,'textColor','type')"
-            >
+              :text-color="item.status | optionsFilter(bpmnStatusOptions,'type') | optionsFilter(colorOptions,'textColor','type')">
               {{ item.status| optionsFilter(bpmnStatusOptions) }}</van-tag>
           </div>
         </van-cell>
-        <ibps-list-result-page
-          :result-type="resultType"
-          :error-type="errorType"
-          :result-message="resultMessage"
-        />
+        <ibps-list-result-page :result-type="resultType" :error-type="errorType" :result-message="resultMessage" />
       </van-list>
     </van-pull-refresh>
-    <ibps-more-search
-      :show="moreSearchPopup"
-      :search-forms="searchForms"
-      @callback="onMoreSearch"
-      @close="show => moreSearchPopup = show"
-      @reset-form="resetForm"
-    />
+    <ibps-more-search :show="moreSearchPopup" :search-forms="searchForms" @callback="onMoreSearch"
+      @close="show => moreSearchPopup = show" @reset-form="resetForm" />
 
-    <ibps-type-tree
-      v-model="typeTreePopup"
-      title="流程分类"
-      category-key="FLOW_TYPE"
-      @node-click="clickTypeNode"
-      @close="visible => typeTreePopup = visible"
-    />
+    <ibps-type-tree v-model="typeTreePopup" title="流程分类" category-key="FLOW_TYPE" @node-click="clickTypeNode"
+      @close="visible => typeTreePopup = visible" />
 
-    <ibps-bpmn-formrender-dialog
-      :visible="formrenderVisible"
-      :title="formrenderTitle"
-      :inst-id="instId"
-      @close="visible => formrenderVisible = visible"
-    />
+    <ibps-bpmn-formrender-dialog :visible="formrenderVisible" :title="formrenderTitle" :inst-id="instId"
+      @close="visible => formrenderVisible = visible" />
   </div>
 </template>
 <script>
-import { handled } from '@/api/platform/office/bpmReceived'
+  import { handled } from '@/api/platform/office/bpmReceived'
 
-import ActionUtils from '@/utils/action'
-import i18n from '@/utils/i18n'
-import random from '@/mixins/random'
-import bpmnStatus from '@/mixins/bpmnStatus'
+  import ActionUtils from '@/utils/action'
+  import i18n from '@/utils/i18n'
+  import random from '@/mixins/random'
+  import bpmnStatus from '@/mixins/bpmnStatus'
 
-import IbpsMoreSearch from '@/components/ibps-more-search'
-import IbpsTypeTree from '@/business/platform/cat/type/tree'
-import IbpsAvatar from '@/components/ibps-avatar'
-import IbpsListResultPage from '@/components/ibps-list-result-page'
-import IbpsBpmnFormrenderDialog from '@/business/platform/bpmn/form/dialog'
+  import IbpsMoreSearch from '@/components/ibps-more-search'
+  import IbpsTypeTree from '@/business/platform/cat/type/tree'
+  import IbpsAvatar from '@/components/ibps-avatar'
+  import IbpsListResultPage from '@/components/ibps-list-result-page'
+  import IbpsBpmnFormrenderDialog from '@/business/platform/bpmn/form/dialog'
 
-export default {
-  components: {
-    IbpsMoreSearch,
-    IbpsTypeTree,
-    IbpsAvatar,
-    IbpsListResultPage,
-    IbpsBpmnFormrenderDialog
-  },
-  mixins: [random, bpmnStatus],
-  data() {
-    return {
-      stateActive: false,
-      moreSearchPopup: false,
-      typeTreePopup: false,
-      searchForms: {
-        forms: [
-          { prop: 'Q^inst.subject_^SL', label: '请求标题', fieldType: 'text' },
-          { prop: 'Q^inst.proc_def_name_^SL', label: '流程名称', fieldType: 'text' },
-          { prop: ['Q^inst.create_time_^DL', 'Q^inst.create_time_^DG'], label: '创建时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }},
-          { prop: 'Q^inst.status_^S', label: '状态', fieldType: 'checker', cols: 2, options: [
-            { value: 'end', label: '结束' },
-            { value: 'manualend', label: '人工结束' }
-          ] }
-        ]
-      },
+  export default {
+    components: {
+      IbpsMoreSearch,
+      IbpsTypeTree,
+      IbpsAvatar,
+      IbpsListResultPage,
+      IbpsBpmnFormrenderDialog
+    },
+    mixins: [random, bpmnStatus],
+    data() {
+      return {
+        stateActive: false,
+        moreSearchPopup: false,
+        typeTreePopup: false,
+        searchForms: {
+          forms: [
+            { prop: 'Q^inst.subject_^SL', label: '事物名称', fieldType: 'text' },
+            { prop: 'Q^inst.proc_def_name_^SL', label: '事物说明', fieldType: 'text' },
+            { prop: ['Q^inst.create_time_^DL', 'Q^inst.create_time_^DG'], label: '创建时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' } },
+            {
+              prop: 'Q^inst.status_^S', label: '状态', fieldType: 'checker', cols: 3, options: [
+                { value: 'all', label: '全部' },
+                { value: 'end', label: '结束' },
+                { value: 'manualend', label: '人工结束' }
+              ]
+            }
+          ]
+        },
 
-      subject: '',
-      typeId: '',
-      checker: '',
-      moreParams: {},
+        subject: '',
+        typeId: '',
+        checker: '',
+        moreParams: {},
 
-      listData: [],
-      pagination: {},
-      sorts: {},
+        listData: [],
+        pagination: {},
+        sorts: {},
 
-      loading: false,
-      finished: false,
-      refreshing: false,
-      resultType: 'init',
-      errorType: null,
-      resultMessage: null,
+        loading: false,
+        finished: false,
+        refreshing: false,
+        resultType: 'init',
+        errorType: null,
+        resultMessage: null,
 
-      instId: '',
-      formrenderVisible: false,
-      formrenderTitle: ''
-    }
-  },
-  methods: {
-    generateTitle(name, title) { // generateTitle by vue-i18n
-      return i18n.generateTitle(name, title)
-    },
-    /**
-     * 加载数据
-     */
-    loadData() {
-      this.loading = true
-      handled(this.getSearcFormData()).then(response => {
-        // 处理数据
-        ActionUtils.handleListData(this, response.data)
-      }).catch((e) => {
-        ActionUtils.handleErrorData(this, e)
-      })
-    },
-    /**
-     * 获取格式化参数
-     */
-    getSearcFormData() {
-      let params = { 'end': '1' }
-      if (this.$utils.isNotEmpty(this.subject)) {
-        params['Q^subject_^SL'] = this.subject
+        instId: '',
+        formrenderVisible: false,
+        formrenderTitle: ''
       }
-      if (this.$utils.isNotEmpty(this.moreParams)) {
-        params = Object.assign(params, this.moreParams)
-      }
-
-      return ActionUtils.formatParams(
-        params,
-        this.pagination,
-        this.sorts)
-    },
-    /**
-     * 下拉刷新
-     */
-    onRefresh() {
-      this.refreshing = true
-      this.finished = false
-      this.loading = true
-      this.onSearch()
-    },
-    /**
-     * 查询
-     */
-    onSearch() {
-      this.stateActive = false
-      ActionUtils.initListData(this)
-      this.loadData()
     },
-    /**
-     * 高级查询
-     */
-    onMoreSearch(params) {
-      if (this.$utils.isNotEmpty(this.typeId)) {
-        params['Q^type_id_^SL'] = this.typeId
-      }
-      this.moreParams = params
-      this.onSearch()
-      if (this.$utils.isNotEmpty(params)) {
-        this.stateActive = true
-      }
-    },
-    /**
-     * 弹窗更多查询条件
-     */
-    clickMoreSearch() {
-      this.moreSearchPopup = true
-      this.stateActive = false
-    },
-    /**
-     * 重置表单
-     */
-    resetForm() {
-      this.typeId = ''
-      this.checker = ''
-    },
-    clickType() {
-      this.typeTreePopup = true
-    },
-    clickTypeNode(data) {
-      this.typeId = data.id
-      this.onMoreSearch({})
-    },
-    getTaskDesc(v) {
-      if (!v.includes('#')) {
-        return ''
+    methods: {
+      generateTitle(name, title) { // generateTitle by vue-i18n
+        return i18n.generateTitle(name, title)
+      },
+      /**
+       * 加载数据
+       */
+      loadData() {
+        this.loading = true
+        handled(this.getSearcFormData()).then(response => {
+          // 处理数据
+          ActionUtils.handleListData(this, response.data)
+        }).catch((e) => {
+          ActionUtils.handleErrorData(this, e)
+        })
+      },
+      /**
+       * 获取格式化参数
+       */
+      getSearcFormData() {
+        let params = { 'end': '1' }
+        if (this.$utils.isNotEmpty(this.subject)) {
+          params['Q^subject_^SL'] = this.subject
+        }
+        if (this.$utils.isNotEmpty(this.moreParams)) {
+          params = Object.assign(params, this.moreParams)
+        }
+
+        return ActionUtils.formatParams(
+          params,
+          this.pagination,
+          this.sorts)
+      },
+      /**
+       * 下拉刷新
+       */
+      onRefresh() {
+        this.refreshing = true
+        this.finished = false
+        this.loading = true
+        this.onSearch()
+      },
+      /**
+       * 查询
+       */
+      onSearch() {
+        this.stateActive = false
+        ActionUtils.initListData(this)
+        this.loadData()
+      },
+      /**
+       * 高级查询
+       */
+      onMoreSearch(params) {
+        if (this.$utils.isNotEmpty(this.typeId)) {
+          params['Q^type_id_^SL'] = this.typeId
+        }
+        this.moreParams = params
+        this.onSearch()
+        if (this.$utils.isNotEmpty(params)) {
+          this.stateActive = true
+        }
+      },
+      /**
+       * 弹窗更多查询条件
+       */
+      clickMoreSearch() {
+        this.moreSearchPopup = true
+        this.stateActive = false
+      },
+      /**
+       * 重置表单
+       */
+      resetForm() {
+        this.typeId = ''
+        this.checker = ''
+      },
+      clickType() {
+        this.typeTreePopup = true
+      },
+      clickTypeNode(data) {
+        this.typeId = data.id
+        this.onMoreSearch({})
+      },
+      getTaskDesc(v) {
+        if (!v.includes('#')) {
+          return ''
+        }
+        return v.split('#')[1] || ''
+      },
+      onClick(item) {
+        this.instId = item.id
+        this.formrenderTitle = item.procDefName
+        this.formrenderVisible = true
       }
-      return v.split('#')[1] || ''
-    },
-    onClick(item) {
-      this.instId = item.id
-      this.formrenderTitle = item.procDefName
-      this.formrenderVisible = true
     }
-  }
 
-}
+  }
 </script>
 <style lang="scss" scoped>
-::v-deep .van-cell__title{
-  width: 65%;
-  .van-cell__label{
-    overflow-wrap: break-word;
+  ::v-deep .van-cell__title {
+    width: 65%;
+
+    .van-cell__label {
+      overflow-wrap: break-word;
+    }
   }
-}
-</style>
+</style>

+ 174 - 211
src/views/platform/bpmn/handled/index.vue

@@ -1,20 +1,12 @@
 <template>
   <div>
     <van-sticky>
-      <van-nav-bar
-        :title="generateTitle($route.name,$route.params.title||$route.meta.title)"
-        :left-text="$t('common.button.back')"
-        left-arrow
-        @click-left="$router.push({ name: 'dashboard' })"
-      />
-      <van-search
-        v-model="subject"
-        show-action
-        placeholder="请输入搜索关键词"
-        @search="onSearch"
-      >
+      <van-nav-bar :title="generateTitle($route.name,$route.params.title||$route.meta.title)"
+        :left-text="$t('common.button.back')" left-arrow @click-left="$router.push({ name: 'dashboard' })" />
+      <van-search v-model="subject" show-action placeholder="请输入搜索关键词" @search="onSearch">
         <template #left>
-          <van-icon name="bars" :class="{'ibps-active':$utils.isNotEmpty(typeId)}" class="ibps-pr-5" @click="clickType" />
+          <van-icon name="bars" :class="{'ibps-active':$utils.isNotEmpty(typeId)}" class="ibps-pr-5"
+            @click="clickType" />
         </template>
         <template #action>
           <van-icon name="filter-o" :class="{'ibps-active':stateActive}" @click="clickMoreSearch" />
@@ -24,234 +16,205 @@
     <div class="ibps-blank-bar" />
     <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
       <van-list v-model="loading" :finished="finished" @load="loadData">
-        <van-cell
-          v-for="(item,index) in listData"
-          :key="item.id+index"
-          :title="item.taskName"
-          :label="getTaskDesc(item.subject)"
-          size="large"
-          @click="onClick(item,index)"
-        >
+        <van-cell v-for="(item,index) in listData" :key="item.id+index" :title="item.taskName"
+          :label="getTaskDesc(item.subject)" size="large" @click="onClick(item,index)">
           <template slot="icon">
-            <ibps-avatar
-              :icon="_randomIcon(index)"
-              :text="item.name"
-              :bg-color="_randomColor(index)"
-              radius="4"
-              icon-prefix="ibps-icon"
-              class="ibps-mr-10"
-            />
+            <ibps-avatar :icon="_randomIcon(index)" :text="item.name" :bg-color="_randomColor(index)" radius="4"
+              icon-prefix="ibps-icon" class="ibps-mr-10" />
           </template>
           <span>{{ item.createTime|formatRelativeTime }}</span>
           <div>
             <!-- <van-tag plain :type=" item.status | optionsFilter(bpmnStatusOptions,'type')">{{ item.status | optionsFilter(bpmnStatusOptions) }}</van-tag> -->
-            <van-tag
-              size="medium"
+            <van-tag size="medium"
               :color="item.status | optionsFilter(bpmnStatusOptions,'type') | optionsFilter(colorOptions,'color','type')"
-              :text-color="item.status | optionsFilter(bpmnStatusOptions,'type') | optionsFilter(colorOptions,'textColor','type')"
-            >
+              :text-color="item.status | optionsFilter(bpmnStatusOptions,'type') | optionsFilter(colorOptions,'textColor','type')">
               {{ item.status=='submit'?'编辑':item.status| optionsFilter(bpmnStatusOptions) }}</van-tag>
           </div>
         </van-cell>
-        <ibps-list-result-page
-          :result-type="resultType"
-          :error-type="errorType"
-          :result-message="resultMessage"
-        />
+        <ibps-list-result-page :result-type="resultType" :error-type="errorType" :result-message="resultMessage" />
       </van-list>
     </van-pull-refresh>
-    <ibps-more-search
-      :show="moreSearchPopup"
-      :search-forms="searchForms"
-      @callback="onMoreSearch"
-      @close="show => moreSearchPopup = show"
-      @reset-form="resetForm"
-    />
+    <ibps-more-search :show="moreSearchPopup" :search-forms="searchForms" @callback="onMoreSearch"
+      @close="show => moreSearchPopup = show" @reset-form="resetForm" />
 
-    <ibps-type-tree
-      v-model="typeTreePopup"
-      title="流程分类"
-      category-key="FLOW_TYPE"
-      @node-click="clickTypeNode"
-      @close="visible => typeTreePopup = visible"
-    />
+    <ibps-type-tree v-model="typeTreePopup" title="流程分类" category-key="FLOW_TYPE" @node-click="clickTypeNode"
+      @close="visible => typeTreePopup = visible" />
 
-    <ibps-bpmn-formrender-dialog
-      :visible="formrenderVisible"
-      :title="formrenderTitle"
-      :inst-id="instId"
-      @close="visible => formrenderVisible = visible"
-    />
+    <ibps-bpmn-formrender-dialog :visible="formrenderVisible" :title="formrenderTitle" :inst-id="instId"
+      @close="visible => formrenderVisible = visible" />
 
   </div>
 
 </template>
 <script>
-import { handledTask } from '@/api/platform/office/bpmReceived'
+  import { handledTask } from '@/api/platform/office/bpmReceived'
 
-import ActionUtils from '@/utils/action'
-import i18n from '@/utils/i18n'
-import random from '@/mixins/random'
-import bpmnStatus from '@/mixins/bpmnStatus'
+  import ActionUtils from '@/utils/action'
+  import i18n from '@/utils/i18n'
+  import random from '@/mixins/random'
+  import bpmnStatus from '@/mixins/bpmnStatus'
 
-import IbpsMoreSearch from '@/components/ibps-more-search'
-import IbpsTypeTree from '@/business/platform/cat/type/tree'
-import IbpsAvatar from '@/components/ibps-avatar'
-import IbpsListResultPage from '@/components/ibps-list-result-page'
-import IbpsBpmnFormrenderDialog from '@/business/platform/bpmn/form/dialog'
+  import IbpsMoreSearch from '@/components/ibps-more-search'
+  import IbpsTypeTree from '@/business/platform/cat/type/tree'
+  import IbpsAvatar from '@/components/ibps-avatar'
+  import IbpsListResultPage from '@/components/ibps-list-result-page'
+  import IbpsBpmnFormrenderDialog from '@/business/platform/bpmn/form/dialog'
 
-export default {
-  components: {
-    IbpsMoreSearch,
-    IbpsTypeTree,
-    IbpsAvatar,
-    IbpsListResultPage,
-    IbpsBpmnFormrenderDialog
-  },
-  mixins: [random, bpmnStatus],
-  data() {
-    return {
-      stateActive: false,
-      moreSearchPopup: false,
-      typeTreePopup: false,
-      searchForms: {
-        forms: [
-          { prop: 'Q^SUBJECT_^SL', label: '请求标题', fieldType: 'text' },
-          { prop: 'Q^TASK_NAME_^SL', label: '任务名称', fieldType: 'text' },
-          { prop: ['Q^COMPLETE_TIME_^DL', 'Q^COMPLETE_TIME_^DG'], label: '处理时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }},
-          { prop: 'Q^APO.STATUS_^S', label: '状态', fieldType: 'checker', cols: 3, valueKey: 'value', options: [
-            { value: 'agree', label: '同意' },
-            { value: 'oppose', label: '反对' },
-            { value: 'reject', label: '驳回' },
-            { value: 'rejectToStart', label: '驳回发起人' },
-            { value: 'abandon', label: '弃权' }
-          ] }
-        ]
-      },
+  export default {
+    components: {
+      IbpsMoreSearch,
+      IbpsTypeTree,
+      IbpsAvatar,
+      IbpsListResultPage,
+      IbpsBpmnFormrenderDialog
+    },
+    mixins: [random, bpmnStatus],
+    data() {
+      return {
+        stateActive: false,
+        moreSearchPopup: false,
+        typeTreePopup: false,
+        searchForms: {
+          forms: [
+            { prop: 'Q^SUBJECT_^SL', label: '事物名称', fieldType: 'text' },
+            { prop: 'Q^TASK_NAME_^SL', label: '事物说明', fieldType: 'text' },
+            { prop: ['Q^COMPLETE_TIME_^DL', 'Q^COMPLETE_TIME_^DG'], label: '创建时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' } },
+            {
+              prop: 'Q^APO.STATUS_^S', label: '是否结束', fieldType: 'checker', cols: 3, valueKey: 'value', options: [
+                { value: 'agree', label: '是' },
+                { value: 'oppose', label: '否' },
+                // { value: 'reject', label: '驳回' },
+                // { value: 'rejectToStart', label: '驳回发起人' },
+                // { value: 'abandon', label: '弃权' }
+              ]
+            }
+          ]
+        },
 
-      subject: '',
-      typeId: '',
-      moreParams: {},
+        subject: '',
+        typeId: '',
+        moreParams: {},
 
-      listData: [],
-      pagination: {},
-      sorts: {},
+        listData: [],
+        pagination: {},
+        sorts: {},
 
-      loading: false,
-      finished: false,
-      refreshing: false,
-      resultType: 'init',
-      errorType: null,
-      resultMessage: null,
+        loading: false,
+        finished: false,
+        refreshing: false,
+        resultType: 'init',
+        errorType: null,
+        resultMessage: null,
 
-      instId: '',
-      formrenderVisible: false,
-      formrenderTitle: ''
-    }
-  },
-  methods: {
-    generateTitle(name, title) { // generateTitle by vue-i18n
-      return i18n.generateTitle(name, title)
-    },
-    /**
-     * 加载数据
-     */
-    loadData() {
-      this.loading = true
-      handledTask(this.getSearcFormData()).then(response => {
-        // 处理数据
-        ActionUtils.handleListData(this, response.data)
-      }).catch((e) => {
-        ActionUtils.handleErrorData(this, e)
-      })
-    },
-    /**
-     * 获取格式化参数
-     */
-    getSearcFormData() {
-      let params = {}
-      if (this.$utils.isNotEmpty(this.subject)) {
-        params['Q^subject_^SL'] = this.subject
+        instId: '',
+        formrenderVisible: false,
+        formrenderTitle: ''
       }
-      if (this.$utils.isNotEmpty(this.moreParams)) {
-        params = Object.assign(params, this.moreParams)
-      }
-
-      return ActionUtils.formatParams(
-        params,
-        this.pagination,
-        this.sorts)
-    },
-    /**
-     * 下拉刷新
-     */
-    onRefresh() {
-      this.refreshing = true
-      this.finished = false
-      this.loading = true
-      this.onSearch()
-    },
-    /**
-     * 查询
-     */
-    onSearch() {
-      this.stateActive = false
-      ActionUtils.initListData(this)
-      this.loadData()
     },
-    /**
-     * 高级查询
-     */
-    onMoreSearch(params) {
-      if (this.$utils.isNotEmpty(this.typeId)) {
-        params['Q^type_id_^SL'] = this.typeId
-      }
-      this.moreParams = params
-      this.onSearch()
-      if (this.$utils.isNotEmpty(params)) {
-        this.stateActive = true
-      }
-    },
-    /**
-     * 弹窗更多查询条件
-     */
-    clickMoreSearch() {
-      this.moreSearchPopup = true
-      this.stateActive = false
-    },
-    /**
-     * 重置表单
-     */
-    resetForm() {
-      this.typeId = ''
-    },
-    clickType() {
-      this.typeTreePopup = true
-    },
-    clickTypeNode(data) {
-      this.typeId = data.id
-      this.onMoreSearch({})
-    },
-    getTaskDesc(v) {
-      if (!v.includes('#')) {
-        return ''
+    methods: {
+      generateTitle(name, title) { // generateTitle by vue-i18n
+        return i18n.generateTitle(name, title)
+      },
+      /**
+       * 加载数据
+       */
+      loadData() {
+        this.loading = true
+        handledTask(this.getSearcFormData()).then(response => {
+          // 处理数据
+          ActionUtils.handleListData(this, response.data)
+        }).catch((e) => {
+          ActionUtils.handleErrorData(this, e)
+        })
+      },
+      /**
+       * 获取格式化参数
+       */
+      getSearcFormData() {
+        let params = {}
+        if (this.$utils.isNotEmpty(this.subject)) {
+          params['Q^subject_^SL'] = this.subject
+        }
+        if (this.$utils.isNotEmpty(this.moreParams)) {
+          params = Object.assign(params, this.moreParams)
+        }
+
+        return ActionUtils.formatParams(
+          params,
+          this.pagination,
+          this.sorts)
+      },
+      /**
+       * 下拉刷新
+       */
+      onRefresh() {
+        this.refreshing = true
+        this.finished = false
+        this.loading = true
+        this.onSearch()
+      },
+      /**
+       * 查询
+       */
+      onSearch() {
+        this.stateActive = false
+        ActionUtils.initListData(this)
+        this.loadData()
+      },
+      /**
+       * 高级查询
+       */
+      onMoreSearch(params) {
+        if (this.$utils.isNotEmpty(this.typeId)) {
+          params['Q^type_id_^SL'] = this.typeId
+        }
+        this.moreParams = params
+        this.onSearch()
+        if (this.$utils.isNotEmpty(params)) {
+          this.stateActive = true
+        }
+      },
+      /**
+       * 弹窗更多查询条件
+       */
+      clickMoreSearch() {
+        this.moreSearchPopup = true
+        this.stateActive = false
+      },
+      /**
+       * 重置表单
+       */
+      resetForm() {
+        this.typeId = ''
+      },
+      clickType() {
+        this.typeTreePopup = true
+      },
+      clickTypeNode(data) {
+        this.typeId = data.id
+        this.onMoreSearch({})
+      },
+      getTaskDesc(v) {
+        if (!v.includes('#')) {
+          return ''
+        }
+        return v.split('#')[1] || ''
+      },
+      onClick(item) {
+        this.instId = item.procInstId
+        this.formrenderTitle = item.taskName
+        this.formrenderVisible = true
       }
-      return v.split('#')[1] || ''
-    },
-    onClick(item) {
-      this.instId = item.procInstId
-      this.formrenderTitle = item.taskName
-      this.formrenderVisible = true
     }
-  }
 
-}
+  }
 </script>
 <style lang="scss" scoped>
-::v-deep .van-cell__title{
-  width: 65%;
-  .van-cell__label{
-    overflow-wrap: break-word;
+  ::v-deep .van-cell__title {
+    width: 65%;
+
+    .van-cell__label {
+      overflow-wrap: break-word;
+    }
   }
-}
-</style>
+</style>

+ 224 - 273
src/views/platform/bpmn/my-draft/index.vue

@@ -1,22 +1,13 @@
 <template>
   <div :class="{'ibps-fixed-toolbar':checkMode}">
     <van-sticky>
-      <van-nav-bar
-        :title="generateTitle($route.name,$route.params.title||$route.meta.title)"
-        :left-text="$t('common.button.back')"
-        :right-text="$utils.isNotEmpty(listData)?rightText:''"
-        left-arrow
-        @click-left="$router.push({ name: 'dashboard' })"
-        @click-right="toCheckMode()"
-      />
-      <van-search
-        v-model="subject"
-        show-action
-        placeholder="请输入搜索关键词"
-        @search="onSearch"
-      >
+      <van-nav-bar :title="generateTitle($route.name,$route.params.title||$route.meta.title)"
+        :left-text="$t('common.button.back')" :right-text="$utils.isNotEmpty(listData)?rightText:''" left-arrow
+        @click-left="$router.push({ name: 'dashboard' })" @click-right="toCheckMode()" />
+      <van-search v-model="subject" show-action placeholder="请输入搜索关键词" @search="onSearch">
         <template #left>
-          <van-icon name="bars" :class="{'ibps-active':$utils.isNotEmpty(typeId)}" class="ibps-pr-5" @click="clickType" />
+          <van-icon name="bars" :class="{'ibps-active':$utils.isNotEmpty(typeId)}" class="ibps-pr-5"
+            @click="clickType" />
         </template>
         <template #action>
           <van-icon name="filter-o" :class="{'ibps-active':stateActive}" @click="clickMoreSearch" />
@@ -26,304 +17,264 @@
     <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
       <van-list v-model="loading" :finished="finished" @load="loadData">
         <van-checkbox-group v-model="checkedIds">
-          <van-cell
-            v-for="(item,index) in listData"
-            :key="item.id+index"
-            :title="item.procDefName"
-            :label="getTaskDesc(item.subject)"
-            @click="onClick(item,index)"
-          >
+          <van-cell v-for="(item,index) in listData" :key="item.id+index" :title="item.procDefName"
+            :label="getTaskDesc(item.subject)" @click="onClick(item,index)">
             <template slot="icon">
-              <van-checkbox
-                v-if="checkMode"
-                ref="checkboxes"
-                :name="item.id"
-                class="ibps-mr-10"
-              />
-              <ibps-avatar
-                v-else
-                :icon="_randomIcon(index)"
-                :text="item.name"
-                :bg-color="_randomColor(index)"
-                radius="4"
-                icon-prefix="ibps-icon"
-                class="ibps-mr-10"
-              />
+              <van-checkbox v-if="checkMode" ref="checkboxes" :name="item.id" class="ibps-mr-10" />
+              <ibps-avatar v-else :icon="_randomIcon(index)" :text="item.name" :bg-color="_randomColor(index)"
+                radius="4" icon-prefix="ibps-icon" class="ibps-mr-10" />
             </template>
             <span>{{ item.createTime|formatRelativeTime }}</span>
             <div>
               <!-- <van-tag plain :type=" item.status | optionsFilter(bpmnStatusOptions,'type')">{{ item.status | optionsFilter(bpmnStatusOptions) }}</van-tag> -->
-              <van-tag
-                size="medium"
+              <van-tag size="medium"
                 :color="item.status | optionsFilter(bpmnStatusOptions,'type') | optionsFilter(colorOptions,'color','type')"
-                :text-color="item.status | optionsFilter(bpmnStatusOptions,'type') | optionsFilter(colorOptions,'textColor','type')"
-              >
+                :text-color="item.status | optionsFilter(bpmnStatusOptions,'type') | optionsFilter(colorOptions,'textColor','type')">
                 {{ item.status| optionsFilter(bpmnStatusOptions) }}</van-tag>
             </div>
           </van-cell>
         </van-checkbox-group>
-        <ibps-list-result-page
-          :result-type="resultType"
-          :error-type="errorType"
-          :result-message="resultMessage"
-        />
+        <ibps-list-result-page :result-type="resultType" :error-type="errorType" :result-message="resultMessage" />
       </van-list>
     </van-pull-refresh>
 
-    <ibps-toolbar
-      v-show="checkMode"
-      :actions="mainActions"
-    />
+    <ibps-toolbar v-show="checkMode" :actions="mainActions" />
 
-    <ibps-more-search
-      :show="moreSearchPopup"
-      :search-forms="searchForms"
-      @callback="onMoreSearch"
-      @close="show => moreSearchPopup = show"
-      @reset-form="resetForm"
-    />
+    <ibps-more-search :show="moreSearchPopup" :search-forms="searchForms" @callback="onMoreSearch"
+      @close="show => moreSearchPopup = show" @reset-form="resetForm" />
 
-    <ibps-type-tree
-      v-model="typeTreePopup"
-      title="流程分类"
-      category-key="FLOW_TYPE"
-      @node-click="clickTypeNode"
-      @close="visible => typeTreePopup = visible"
-    />
+    <ibps-type-tree v-model="typeTreePopup" title="流程分类" category-key="FLOW_TYPE" @node-click="clickTypeNode"
+      @close="visible => typeTreePopup = visible" />
 
-    <ibps-bpmn-formrender-dialog
-      :visible="formrenderVisible"
-      :title="formrenderTitle"
-      :pro-inst-id="proInstId"
-      :def-id="defId"
-      @close="visible => formrenderVisible = visible"
-      @callback="onSearch"
-    />
+    <ibps-bpmn-formrender-dialog :visible="formrenderVisible" :title="formrenderTitle" :pro-inst-id="proInstId"
+      :def-id="defId" @close="visible => formrenderVisible = visible" @callback="onSearch" />
 
   </div>
 
 </template>
 <script>
-import { myDraft, removeDraft } from '@/api/platform/office/bpmInitiated'
+  import { myDraft, removeDraft } from '@/api/platform/office/bpmInitiated'
 
-import ActionUtils from '@/utils/action'
-import i18n from '@/utils/i18n'
-import random from '@/mixins/random'
-import bpmnStatus from '@/mixins/bpmnStatus'
+  import ActionUtils from '@/utils/action'
+  import i18n from '@/utils/i18n'
+  import random from '@/mixins/random'
+  import bpmnStatus from '@/mixins/bpmnStatus'
 
-import IbpsMoreSearch from '@/components/ibps-more-search'
-import IbpsTypeTree from '@/business/platform/cat/type/tree'
-import IbpsAvatar from '@/components/ibps-avatar'
-import IbpsToolbar from '@/components/ibps-toolbar'
-import IbpsListResultPage from '@/components/ibps-list-result-page'
-import IbpsBpmnFormrenderDialog from '@/business/platform/bpmn/form/dialog'
+  import IbpsMoreSearch from '@/components/ibps-more-search'
+  import IbpsTypeTree from '@/business/platform/cat/type/tree'
+  import IbpsAvatar from '@/components/ibps-avatar'
+  import IbpsToolbar from '@/components/ibps-toolbar'
+  import IbpsListResultPage from '@/components/ibps-list-result-page'
+  import IbpsBpmnFormrenderDialog from '@/business/platform/bpmn/form/dialog'
 
-export default {
-  components: {
-    IbpsMoreSearch,
-    IbpsTypeTree,
-    IbpsAvatar,
-    IbpsToolbar,
-    IbpsListResultPage,
-    IbpsBpmnFormrenderDialog
-  },
-  mixins: [random, bpmnStatus],
-  data() {
-    return {
-      stateActive: false,
-      moreSearchPopup: false,
-      typeTreePopup: false,
-      searchForms: {
-        forms: [
-          { prop: 'Q^subject_^SL', label: '请求标题', fieldType: 'text' },
-          { prop: 'Q^proc_def_name_^SL', label: '流程名称', fieldType: 'text' }
-        ]
-      },
+  export default {
+    components: {
+      IbpsMoreSearch,
+      IbpsTypeTree,
+      IbpsAvatar,
+      IbpsToolbar,
+      IbpsListResultPage,
+      IbpsBpmnFormrenderDialog
+    },
+    mixins: [random, bpmnStatus],
+    data() {
+      return {
+        stateActive: false,
+        moreSearchPopup: false,
+        typeTreePopup: false,
+        searchForms: {
+          forms: [
+            { prop: 'Q^subject_^SL', label: '事物名称', fieldType: 'text' },
+            { prop: 'Q^proc_def_name_^SL', label: '事物说明', fieldType: 'text' },
+            { prop: ['Q^create_time_^DL', 'Q^create_time_^DG'], label: '创建时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' } }
+          ]
+        },
 
-      subject: '',
-      typeId: '',
-      moreParams: {},
+        subject: '',
+        typeId: '',
+        moreParams: {},
 
-      listData: [],
-      pagination: {},
-      sorts: {},
+        listData: [],
+        pagination: {},
+        sorts: {},
 
-      loading: false,
-      finished: false,
-      refreshing: false,
-      resultType: 'init',
-      errorType: null,
-      resultMessage: null,
+        loading: false,
+        finished: false,
+        refreshing: false,
+        resultType: 'init',
+        errorType: null,
+        resultMessage: null,
 
-      checkMode: false,
-      checkedIds: [],
-      mainActions: [{
-        'name': this.$t('common.button.remove'),
-        'type': 'danger',
-        'callback': this.onRemove
-      }],
+        checkMode: false,
+        checkedIds: [],
+        mainActions: [{
+          'name': this.$t('common.button.remove'),
+          'type': 'danger',
+          'callback': this.onRemove
+        }],
 
-      proInstId: '',
-      defId: '',
-      formrenderVisible: false,
-      formrenderTitle: ''
-    }
-  },
-  computed: {
-    rightText() {
-      return this.checkMode ? this.$t('common.button.cancel') : this.$t('common.button.manage')
-    },
-    selectedIds() {
-      return this.checkedIds.join(',')
-    }
-  },
-  methods: {
-    generateTitle(name, title) { // generateTitle by vue-i18n
-      return i18n.generateTitle(name, title)
-    },
-    /**
-     * 加载数据
-     */
-    loadData() {
-      this.loading = true
-      myDraft(this.getSearcFormData()).then(response => {
-        // 处理数据
-        ActionUtils.handleListData(this, response.data)
-      }).catch((e) => {
-        ActionUtils.handleErrorData(this, e)
-      })
-    },
-    /**
-     * 获取格式化参数
-     */
-    getSearcFormData() {
-      let params = {}
-      if (this.$utils.isNotEmpty(this.subject)) {
-        params['Q^subject_^SL'] = this.subject
-      }
-      if (this.$utils.isNotEmpty(this.moreParams)) {
-        params = Object.assign(params, this.moreParams)
-      }
-
-      return ActionUtils.formatParams(
-        params,
-        this.pagination,
-        this.sorts)
-    },
-    /**
-     * 下拉刷新
-     */
-    onRefresh() {
-      this.refreshing = true
-      this.finished = false
-      this.loading = true
-      this.onSearch()
-    },
-    /**
-     * 查询
-     */
-    onSearch() {
-      this.stateActive = false
-      ActionUtils.initListData(this)
-      this.loadData()
-    },
-    /**
-     * 高级查询
-     */
-    onMoreSearch(params) {
-      if (this.$utils.isNotEmpty(this.typeId)) {
-        params['Q^type_id_^SL'] = this.typeId
+        proInstId: '',
+        defId: '',
+        formrenderVisible: false,
+        formrenderTitle: ''
       }
-      this.moreParams = params
-      this.onSearch()
-      if (this.$utils.isNotEmpty(params)) {
-        this.stateActive = true
-      }
-    },
-    /**
-     * 弹窗更多查询条件
-     */
-    clickMoreSearch() {
-      this.moreSearchPopup = true
-      this.stateActive = false
     },
-    /**
-     * 重置表单
-     */
-    resetForm() {
-      this.typeId = ''
-    },
-    getTaskDesc(v) {
-      if (!v.includes('#')) {
-        return ''
+    computed: {
+      rightText() {
+        return this.checkMode ? this.$t('common.button.cancel') : this.$t('common.button.manage')
+      },
+      selectedIds() {
+        return this.checkedIds.join(',')
       }
-      return v.split('#')[1] || ''
     },
-    clickType() {
-      this.typeTreePopup = true
-    },
-    clickTypeNode(data) {
-      this.typeId = data.id
-      this.onMoreSearch({})
-    },
-    onClick(item, index) {
-      if (this.checkMode) {
-        this.$refs.checkboxes[index].toggle()
-      } else {
-        this.proInstId = item.id
-        this.defId = item.procDefId
+    methods: {
+      generateTitle(name, title) { // generateTitle by vue-i18n
+        return i18n.generateTitle(name, title)
+      },
+      /**
+       * 加载数据
+       */
+      loadData() {
+        this.loading = true
+        myDraft(this.getSearcFormData()).then(response => {
+          // 处理数据
+          ActionUtils.handleListData(this, response.data)
+        }).catch((e) => {
+          ActionUtils.handleErrorData(this, e)
+        })
+      },
+      /**
+       * 获取格式化参数
+       */
+      getSearcFormData() {
+        let params = {}
+        if (this.$utils.isNotEmpty(this.subject)) {
+          params['Q^subject_^SL'] = this.subject
+        }
+        if (this.$utils.isNotEmpty(this.moreParams)) {
+          params = Object.assign(params, this.moreParams)
+        }
 
-        this.formrenderTitle = item.procDefName
-        this.formrenderVisible = true
-      }
-    },
-    onRefreshPage() {
-      this.checkedIds = []
-      this.checkMode = false
-      this.onRefresh()
-    },
-    toCheckMode() {
-      if (this.$utils.isEmpty(this.listData)) {
-        return
-      }
-      if (this.checkMode) {
-        // this.show = true
+        return ActionUtils.formatParams(
+          params,
+          this.pagination,
+          this.sorts)
+      },
+      /**
+       * 下拉刷新
+       */
+      onRefresh() {
+        this.refreshing = true
+        this.finished = false
+        this.loading = true
+        this.onSearch()
+      },
+      /**
+       * 查询
+       */
+      onSearch() {
+        this.stateActive = false
+        ActionUtils.initListData(this)
+        this.loadData()
+      },
+      /**
+       * 高级查询
+       */
+      onMoreSearch(params) {
+        if (this.$utils.isNotEmpty(this.typeId)) {
+          params['Q^type_id_^SL'] = this.typeId
+        }
+        this.moreParams = params
+        this.onSearch()
+        if (this.$utils.isNotEmpty(params)) {
+          this.stateActive = true
+        }
+      },
+      /**
+       * 弹窗更多查询条件
+       */
+      clickMoreSearch() {
+        this.moreSearchPopup = true
+        this.stateActive = false
+      },
+      /**
+       * 重置表单
+       */
+      resetForm() {
+        this.typeId = ''
+      },
+      getTaskDesc(v) {
+        if (!v.includes('#')) {
+          return ''
+        }
+        return v.split('#')[1] || ''
+      },
+      clickType() {
+        this.typeTreePopup = true
+      },
+      clickTypeNode(data) {
+        this.typeId = data.id
+        this.onMoreSearch({})
+      },
+      onClick(item, index) {
+        if (this.checkMode) {
+          this.$refs.checkboxes[index].toggle()
+        } else {
+          this.proInstId = item.id
+          this.defId = item.procDefId
+
+          this.formrenderTitle = item.procDefName
+          this.formrenderVisible = true
+        }
+      },
+      onRefreshPage() {
         this.checkedIds = []
-      }
-      this.checkMode = !this.checkMode
-    },
-    onRemove() {
-      if (this.checkedIds.length === 0) {
-        this.$notify({
-          type: 'warning',
-          message: this.$t('common.dialog.selectedRecords')
-        })
-        return
-      }
-      this.$dialog.confirm({
-        title: this.$t('common.dialog.warn'),
-        message: this.$t('common.operate.makeSure')
-      }).then(() => {
-        removeDraft({ ids: this.selectedIds }).then(response => {
+        this.checkMode = false
+        this.onRefresh()
+      },
+      toCheckMode() {
+        if (this.$utils.isEmpty(this.listData)) {
+          return
+        }
+        if (this.checkMode) {
+          // this.show = true
+          this.checkedIds = []
+        }
+        this.checkMode = !this.checkMode
+      },
+      onRemove() {
+        if (this.checkedIds.length === 0) {
           this.$notify({
-            type: 'success',
-            message: '删除草稿成功!'
+            type: 'warning',
+            message: this.$t('common.dialog.selectedRecords')
+          })
+          return
+        }
+        this.$dialog.confirm({
+          title: this.$t('common.dialog.warn'),
+          message: this.$t('common.operate.makeSure')
+        }).then(() => {
+          removeDraft({ ids: this.selectedIds }).then(response => {
+            this.$notify({
+              type: 'success',
+              message: '删除草稿成功!'
+            })
+            this.onRefreshPage()
+          }).catch((e) => {
+            console.error(e)
           })
-          this.onRefreshPage()
-        }).catch((e) => {
-          console.error(e)
         })
-      })
+      }
     }
-  }
 
-}
+  }
 </script>
 <style lang="scss" scoped>
-::v-deep .van-cell__title{
-  width: 65%;
-  .van-cell__label{
-    overflow-wrap: break-word;
+  ::v-deep .van-cell__title {
+    width: 65%;
+
+    .van-cell__label {
+      overflow-wrap: break-word;
+    }
   }
-}
-</style>
+</style>

+ 180 - 231
src/views/platform/bpmn/my-request/index.vue

@@ -1,20 +1,12 @@
 <template>
   <div>
     <van-sticky>
-      <van-nav-bar
-        :title="generateTitle($route.name,$route.params.title||$route.meta.title)"
-        :left-text="$t('common.button.back')"
-        left-arrow
-        @click-left="$router.push({ name: 'dashboard' })"
-      />
-      <van-search
-        v-model="subject"
-        show-action
-        placeholder="请输入搜索关键词"
-        @search="onSearch"
-      >
+      <van-nav-bar :title="generateTitle($route.name,$route.params.title||$route.meta.title)"
+        :left-text="$t('common.button.back')" left-arrow @click-left="$router.push({ name: 'dashboard' })" />
+      <van-search v-model="subject" show-action placeholder="请输入搜索关键词" @search="onSearch">
         <template #left>
-          <van-icon name="bars" :class="{'ibps-active':$utils.isNotEmpty(typeId)}" class="ibps-pr-5" @click="clickType" />
+          <van-icon name="bars" :class="{'ibps-active':$utils.isNotEmpty(typeId)}" class="ibps-pr-5"
+            @click="clickType" />
         </template>
         <template #action>
           <van-icon name="filter-o" :class="{'ibps-active':stateActive}" @click="clickMoreSearch" />
@@ -23,254 +15,211 @@
     </van-sticky>
     <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
       <van-list v-model="loading" :finished="finished" @load="loadData">
-        <van-swipe-cell
-          v-for="(item,index) in listData"
-          :key="item.id+index"
-          :right-width="65"
-        >
-          <van-cell
-            :title="item.procDefName"
-            :label="getTaskDesc(item.subject)"
-            @click="onClick(item,index)"
-          >
+        <van-swipe-cell v-for="(item,index) in listData" :key="item.id+index" :right-width="65">
+          <van-cell :title="item.procDefName" :label="getTaskDesc(item.subject)" @click="onClick(item,index)">
             <template slot="icon">
-              <ibps-avatar
-                :icon="_randomIcon(index)"
-                :text="item.name"
-                :bg-color="_randomColor(index)"
-                radius="4"
-                icon-prefix="ibps-icon"
-                class="ibps-mr-10"
-              />
+              <ibps-avatar :icon="_randomIcon(index)" :text="item.name" :bg-color="_randomColor(index)" radius="4"
+                icon-prefix="ibps-icon" class="ibps-mr-10" />
             </template>
             <span>{{ item.createTime|formatRelativeTime }}</span>
             <div>
               <!-- <van-tag plain :type=" item.status | optionsFilter(bpmnStatusOptions,'type')">{{ item.status | optionsFilter(bpmnStatusOptions) }}</van-tag> -->
-              <van-tag
-                size="medium"
+              <van-tag size="medium"
                 :color="item.status | optionsFilter(bpmnStatusOptions,'type') | optionsFilter(colorOptions,'color','type')"
-                :text-color="item.status | optionsFilter(bpmnStatusOptions,'type') | optionsFilter(colorOptions,'textColor','type')"
-              >
+                :text-color="item.status | optionsFilter(bpmnStatusOptions,'type') | optionsFilter(colorOptions,'textColor','type')">
                 {{ item.status| optionsFilter(bpmnStatusOptions) }}</van-tag>
             </div>
           </van-cell>
-          <van-button
-            slot="right"
-            name="copy"
-            type="info"
-            text="复制"
-            class="ibps-swipe-button"
-            @click="onCopy(item)"
-          />
+          <van-button slot="right" name="copy" type="info" text="复制" class="ibps-swipe-button" @click="onCopy(item)" />
         </van-swipe-cell>
 
-        <ibps-list-result-page
-          :result-type="resultType"
-          :error-type="errorType"
-          :result-message="resultMessage"
-        />
+        <ibps-list-result-page :result-type="resultType" :error-type="errorType" :result-message="resultMessage" />
       </van-list>
     </van-pull-refresh>
-    <ibps-more-search
-      :show="moreSearchPopup"
-      :search-forms="searchForms"
-      @callback="onMoreSearch"
-      @close="show => moreSearchPopup = show"
-      @reset-form="resetForm"
-    />
+    <ibps-more-search :show="moreSearchPopup" :search-forms="searchForms" @callback="onMoreSearch"
+      @close="show => moreSearchPopup = show" @reset-form="resetForm" />
 
-    <ibps-type-tree
-      v-model="typeTreePopup"
-      title="流程分类"
-      category-key="FLOW_TYPE"
-      @node-click="clickTypeNode"
-      @close="visible => typeTreePopup = visible"
-    />
+    <ibps-type-tree v-model="typeTreePopup" title="流程分类" category-key="FLOW_TYPE" @node-click="clickTypeNode"
+      @close="visible => typeTreePopup = visible" />
 
-    <ibps-bpmn-formrender-dialog
-      :visible="formrenderVisible"
-      :title="formrenderTitle"
-      :inst-id="instId"
-      :pro-inst-id="proInstId"
-      :def-id="defId"
-      :copy-flow="copyFlow"
-      @close="visible => formrenderVisible = visible"
-    />
+    <ibps-bpmn-formrender-dialog :visible="formrenderVisible" :title="formrenderTitle" :inst-id="instId"
+      :pro-inst-id="proInstId" :def-id="defId" :copy-flow="copyFlow" @close="visible => formrenderVisible = visible" />
   </div>
 </template>
 <script>
-import { myRequested } from '@/api/platform/office/bpmInitiated'
+  import { myRequested } from '@/api/platform/office/bpmInitiated'
 
-import ActionUtils from '@/utils/action'
-import i18n from '@/utils/i18n'
-import random from '@/mixins/random'
-import bpmnStatus from '@/mixins/bpmnStatus'
+  import ActionUtils from '@/utils/action'
+  import i18n from '@/utils/i18n'
+  import random from '@/mixins/random'
+  import bpmnStatus from '@/mixins/bpmnStatus'
 
-import IbpsMoreSearch from '@/components/ibps-more-search'
-import IbpsTypeTree from '@/business/platform/cat/type/tree'
-import IbpsAvatar from '@/components/ibps-avatar'
-import IbpsListResultPage from '@/components/ibps-list-result-page'
-import IbpsBpmnFormrenderDialog from '@/business/platform/bpmn/form/dialog'
+  import IbpsMoreSearch from '@/components/ibps-more-search'
+  import IbpsTypeTree from '@/business/platform/cat/type/tree'
+  import IbpsAvatar from '@/components/ibps-avatar'
+  import IbpsListResultPage from '@/components/ibps-list-result-page'
+  import IbpsBpmnFormrenderDialog from '@/business/platform/bpmn/form/dialog'
 
-export default {
-  components: {
-    IbpsMoreSearch,
-    IbpsTypeTree,
-    IbpsAvatar,
-    IbpsListResultPage,
-    IbpsBpmnFormrenderDialog
-  },
-  mixins: [random, bpmnStatus],
-  data() {
-    return {
-      stateActive: false,
-      moreSearchPopup: false,
-      typeTreePopup: false,
-      searchForms: {
-        forms: [
-          { prop: 'Q^subject_^SL', label: '请求标题', fieldType: 'text' },
-          { prop: 'Q^proc_def_name_^SL', label: '流程名称', fieldType: 'text' },
-          { prop: ['Q^create_time_^DL', 'Q^create_time_^DG'], label: '创建时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }}
-        ]
-      },
+  export default {
+    components: {
+      IbpsMoreSearch,
+      IbpsTypeTree,
+      IbpsAvatar,
+      IbpsListResultPage,
+      IbpsBpmnFormrenderDialog
+    },
+    mixins: [random, bpmnStatus],
+    data() {
+      return {
+        stateActive: false,
+        moreSearchPopup: false,
+        typeTreePopup: false,
+        searchForms: {
+          forms: [
+            { prop: 'Q^subject_^SL', label: '事物名称', fieldType: 'text' },
+            { prop: 'Q^proc_def_name_^SL', label: '事物说明', fieldType: 'text' },
+            { prop: ['Q^create_time_^DL', 'Q^create_time_^DG'], label: '创建时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' } }
+          ]
+        },
 
-      subject: '',
-      typeId: '',
-      moreParams: {},
+        subject: '',
+        typeId: '',
+        moreParams: {},
 
-      listData: [],
-      pagination: {},
-      sorts: {},
+        listData: [],
+        pagination: {},
+        sorts: {},
 
-      loading: false,
-      finished: false,
-      refreshing: false,
-      resultType: 'init',
-      errorType: null,
-      resultMessage: null,
+        loading: false,
+        finished: false,
+        refreshing: false,
+        resultType: 'init',
+        errorType: null,
+        resultMessage: null,
 
-      defId: '',
-      instId: '',
-      proInstId: '',
-      copyFlow: false,
-      formrenderVisible: false,
-      formrenderTitle: ''
-    }
-  },
-  methods: {
-    generateTitle(name, title) { // generateTitle by vue-i18n
-      return i18n.generateTitle(name, title)
-    },
-    /**
-     * 加载数据
-     */
-    loadData() {
-      this.loading = true
-      myRequested(this.getSearcFormData()).then(response => {
-        // 处理数据
-        ActionUtils.handleListData(this, response.data)
-      }).catch((e) => {
-        ActionUtils.handleErrorData(this, e)
-      })
-    },
-    /**
-     * 获取格式化参数
-     */
-    getSearcFormData() {
-      let params = {}
-      if (this.$utils.isNotEmpty(this.subject)) {
-        params['Q^subject_^SL'] = this.subject
-      }
-      if (this.$utils.isNotEmpty(this.moreParams)) {
-        params = Object.assign(params, this.moreParams)
-      }
-
-      return ActionUtils.formatParams(
-        params,
-        this.pagination,
-        this.sorts)
-    },
-    /**
-     * 下拉刷新
-     */
-    onRefresh() {
-      this.refreshing = true
-      this.finished = false
-      this.loading = true
-      this.onSearch()
-    },
-    /**
-     * 查询
-     */
-    onSearch() {
-      this.stateActive = false
-      ActionUtils.initListData(this)
-      this.loadData()
-    },
-    /**
-     * 高级查询
-     */
-    onMoreSearch(params) {
-      if (this.$utils.isNotEmpty(this.typeId)) {
-        params['Q^type_id_^SL'] = this.typeId
-      }
-      this.moreParams = params
-      this.onSearch()
-      if (this.$utils.isNotEmpty(params)) {
-        this.stateActive = true
+        defId: '',
+        instId: '',
+        proInstId: '',
+        copyFlow: false,
+        formrenderVisible: false,
+        formrenderTitle: ''
       }
     },
-    /**
-     * 弹窗更多查询条件
-     */
-    clickMoreSearch() {
-      this.moreSearchPopup = true
-      this.stateActive = false
-    },
-    /**
-     * 重置表单
-     */
-    resetForm() {
-      this.typeId = ''
-    },
-    clickType() {
-      this.typeTreePopup = true
-    },
-    clickTypeNode(data) {
-      this.typeId = data.id
-      this.onMoreSearch({})
-    },
-    getTaskDesc(v) {
-      if (!v.includes('#')) {
-        return ''
+    methods: {
+      generateTitle(name, title) { // generateTitle by vue-i18n
+        return i18n.generateTitle(name, title)
+      },
+      /**
+       * 加载数据
+       */
+      loadData() {
+        this.loading = true
+        myRequested(this.getSearcFormData()).then(response => {
+          // 处理数据
+          ActionUtils.handleListData(this, response.data)
+        }).catch((e) => {
+          ActionUtils.handleErrorData(this, e)
+        })
+      },
+      /**
+       * 获取格式化参数
+       */
+      getSearcFormData() {
+        let params = {}
+        if (this.$utils.isNotEmpty(this.subject)) {
+          params['Q^subject_^SL'] = this.subject
+        }
+        if (this.$utils.isNotEmpty(this.moreParams)) {
+          params = Object.assign(params, this.moreParams)
+        }
+
+        return ActionUtils.formatParams(
+          params,
+          this.pagination,
+          this.sorts)
+      },
+      /**
+       * 下拉刷新
+       */
+      onRefresh() {
+        this.refreshing = true
+        this.finished = false
+        this.loading = true
+        this.onSearch()
+      },
+      /**
+       * 查询
+       */
+      onSearch() {
+        this.stateActive = false
+        ActionUtils.initListData(this)
+        this.loadData()
+      },
+      /**
+       * 高级查询
+       */
+      onMoreSearch(params) {
+        if (this.$utils.isNotEmpty(this.typeId)) {
+          params['Q^type_id_^SL'] = this.typeId
+        }
+        this.moreParams = params
+        this.onSearch()
+        if (this.$utils.isNotEmpty(params)) {
+          this.stateActive = true
+        }
+      },
+      /**
+       * 弹窗更多查询条件
+       */
+      clickMoreSearch() {
+        this.moreSearchPopup = true
+        this.stateActive = false
+      },
+      /**
+       * 重置表单
+       */
+      resetForm() {
+        this.typeId = ''
+      },
+      clickType() {
+        this.typeTreePopup = true
+      },
+      clickTypeNode(data) {
+        this.typeId = data.id
+        this.onMoreSearch({})
+      },
+      getTaskDesc(v) {
+        if (!v.includes('#')) {
+          return ''
+        }
+        return v.split('#')[1] || ''
+      },
+      onClick(item) {
+        this.instId = item.id
+        this.proInstId = ''
+        this.defId = ''
+        this.copyFlow = false
+        this.formrenderTitle = item.procDefName
+        this.formrenderVisible = true
+      },
+      onCopy(item) {
+        this.instId = ''
+        this.proInstId = item.id
+        this.defId = item.procDefId || ''
+        this.copyFlow = true
+        this.formrenderTitle = item.procDefName
+        this.formrenderVisible = true
       }
-      return v.split('#')[1] || ''
-    },
-    onClick(item) {
-      this.instId = item.id
-      this.proInstId = ''
-      this.defId = ''
-      this.copyFlow = false
-      this.formrenderTitle = item.procDefName
-      this.formrenderVisible = true
-    },
-    onCopy(item) {
-      this.instId = ''
-      this.proInstId = item.id
-      this.defId = item.procDefId || ''
-      this.copyFlow = true
-      this.formrenderTitle = item.procDefName
-      this.formrenderVisible = true
     }
-  }
 
-}
+  }
 </script>
 <style lang="scss" scoped>
-::v-deep .van-cell__title{
-  width: 65%;
-  .van-cell__label{
-    overflow-wrap: break-word;
+  ::v-deep .van-cell__title {
+    width: 65%;
+
+    .van-cell__label {
+      overflow-wrap: break-word;
+    }
   }
-}
-</style>
+</style>

+ 340 - 406
src/views/platform/bpmn/pending/index.vue

@@ -1,14 +1,9 @@
 <template>
   <div :class="{'ibps-fixed-toolbar':checkMode}">
     <van-sticky>
-      <van-nav-bar
-        :title="generateTitle($route.name,$route.params.title||$route.meta.title)"
-        :left-text="$t('common.button.back')"
-        :right-text="$utils.isNotEmpty(listData)?rightText:''"
-        left-arrow
-        @click-left="$router.push({ name: 'dashboard' })"
-        @click-right="toCheckMode()"
-      />
+      <van-nav-bar :title="generateTitle($route.name,$route.params.title||$route.meta.title)"
+        :left-text="$t('common.button.back')" :right-text="$utils.isNotEmpty(listData)?rightText:''" left-arrow
+        @click-left="$router.push({ name: 'dashboard' })" @click-right="toCheckMode()" />
       <!-- <van-tabs v-model="tabActive" @click="onSearch">
         <van-tab
           v-for="data in tabDatas"
@@ -17,462 +12,401 @@
           :title="data.title"
         />
       </van-tabs> -->
-      <van-search
-        v-model="subject"
-        show-action
-        placeholder="请输入"
-        @search="onSearch"
-      >
+      <van-search v-model="subject" show-action placeholder="请输入" @search="onSearch">
         <template #left>
-          <van-icon name="bars" :class="{'ibps-active':$utils.isNotEmpty(typeId)}" class="ibps-pr-5" @click="clickType" />
+          <van-icon name="bars" :class="{'ibps-active':$utils.isNotEmpty(typeId)}" class="ibps-pr-5"
+            @click="clickType" />
         </template>
         <template #action>
           <van-icon name="filter-o" :class="{'ibps-active':stateActive}" @click="clickMoreSearch" />
         </template>
       </van-search>
     </van-sticky>
-    <van-pull-refresh
-      v-model="refreshing"
-      @refresh="onRefresh"
-    >
-      <van-list
-        v-model="loading"
-        :finished="finished"
-        @load="loadData"
-      >
+    <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
+      <van-list v-model="loading" :finished="finished" @load="loadData">
         <van-checkbox-group v-model="checkedIds">
-          <van-cell
-            v-for="(item,index) in listData"
-            :key="item.id+index"
-            :title="item.procDefName"
-            :label="getTaskDesc(item.subject)"
-            @click="onClick(item,index)"
-          >
+          <van-cell v-for="(item,index) in listData" :key="item.id+index" :title="item.procDefName"
+            :label="getTaskDesc(item.subject)" @click="onClick(item,index)">
             <template slot="icon">
-              <van-checkbox
-                v-if="checkMode"
-                ref="checkboxes"
-                :name="item.taskId"
-                class="ibps-mr-10"
-              />
-              <ibps-avatar
-                v-else
-                :icon="_randomIcon(index)"
-                :text="item.procDefName"
-                :bg-color="_randomColor(index)"
-                radius="4"
-                icon-prefix="ibps-icon"
-                class="ibps-mr-10"
-              />
+              <van-checkbox v-if="checkMode" ref="checkboxes" :name="item.taskId" class="ibps-mr-10" />
+              <ibps-avatar v-else :icon="_randomIcon(index)" :text="item.procDefName" :bg-color="_randomColor(index)"
+                radius="4" icon-prefix="ibps-icon" class="ibps-mr-10" />
             </template>
             <span>{{ item.createTime|formatRelativeTime }}</span>
             <div v-if="item.remindTimes>0">
               <!-- <van-tag plain :type="item.remindTimes|remindTimesTypeFilter">催办{{ item.remindTimes }}次</van-tag> -->
-              <van-tag
-                size="medium"
+              <van-tag size="medium"
                 :color="item.remindTimes|remindTimesTypeFilter | optionsFilter(colorOptions,'color','type')"
-                :text-color="item.remindTimes|remindTimesTypeFilter | optionsFilter(colorOptions,'textColor','type')"
-              >
+                :text-color="item.remindTimes|remindTimesTypeFilter | optionsFilter(colorOptions,'textColor','type')">
                 催办{{ item.remindTimes }}次</van-tag>
             </div>
           </van-cell>
         </van-checkbox-group>
       </van-list>
-      <ibps-list-result-page
-        :result-type="resultType"
-        :error-type="errorType"
-        :result-message="resultMessage"
-      />
+      <ibps-list-result-page :result-type="resultType" :error-type="errorType" :result-message="resultMessage" />
     </van-pull-refresh>
-    <ibps-toolbar
-      v-show="checkMode"
-      :actions="actions"
-    />
+    <ibps-toolbar v-show="checkMode" :actions="actions" />
 
-    <approve-popup
-      :visible="batchOpinionPopup"
-      :task-id="selectedIds"
-      :action="actionName"
-      @close="(visible)=>{batchOpinionPopup =visible}"
-      @callback="onRefreshPage"
-    />
+    <approve-popup :visible="batchOpinionPopup" :task-id="selectedIds" :action="actionName"
+      @close="(visible)=>{batchOpinionPopup =visible}" @callback="onRefreshPage" />
     <!--高级查询-->
-    <ibps-more-search
-      :show="moreSearchPopup"
-      :search-forms="searchForms"
-      @callback="onMoreSearch"
-      @close="callback => moreSearchPopup = callback"
-      @reset-form="resetForm"
-    >
+    <ibps-more-search :show="moreSearchPopup" :search-forms="searchForms" @callback="onMoreSearch"
+      @close="callback => moreSearchPopup = callback" @reset-form="resetForm">
       <template v-slot:definition>
-        <ibps-bpmn-definition
-          v-model="defKey"
-          value-key="defKey"
-          input-align="left"
-          class="van-hairline--bottom"
-        />
+        <ibps-bpmn-definition v-model="defKey" value-key="defKey" input-align="left" class="van-hairline--bottom" />
       </template>
     </ibps-more-search>
 
-    <ibps-type-tree
-      v-model="typeTreePopup"
-      title="流程分类"
-      category-key="FLOW_TYPE"
-      @node-click="clickTypeNode"
-      @close="visible => typeTreePopup = visible"
-    />
-    <ibps-bpmn-formrender-dialog
-      :visible="formrenderVisible"
-      :title="formrenderTitle"
-      :task-id="taskId"
-      @close="visible => formrenderVisible = visible"
-      @callback="onRefreshPage"
-    />
+    <ibps-type-tree v-model="typeTreePopup" title="流程分类" category-key="FLOW_TYPE" @node-click="clickTypeNode"
+      @close="visible => typeTreePopup = visible" />
+    <ibps-bpmn-formrender-dialog :visible="formrenderVisible" :title="formrenderTitle" :task-id="taskId"
+      @close="visible => formrenderVisible = visible" @callback="onRefreshPage" />
   </div>
 </template>
 <script>
-import { pending4User, pending4Org, pending4OrgManager, pending4Role, pending4Position, pending4Group } from '@/api/platform/office/bpmReceived'
-import { batchSuspendProcess, batchRecoverProcess } from '@/api/platform/bpmn/bpmTask'
-
-import i18n from '@/utils/i18n'
-import random from '@/mixins/random'
-import bpmnStatus from '@/mixins/bpmnStatus'
-import ActionUtils from '@/utils/action'
-
-import ApprovePopup from '@/business/platform/bpmn/form-ext/approve'
+  import { pending4User, pending4Org, pending4OrgManager, pending4Role, pending4Position, pending4Group } from '@/api/platform/office/bpmReceived'
+  import { batchSuspendProcess, batchRecoverProcess } from '@/api/platform/bpmn/bpmTask'
 
-import IbpsMoreSearch from '@/components/ibps-more-search'
-import IbpsAvatar from '@/components/ibps-avatar'
-import IbpsToolbar from '@/components/ibps-toolbar'
-import IbpsListResultPage from '@/components/ibps-list-result-page'
-import IbpsTypeTree from '@/business/platform/cat/type/tree'
-import IbpsBpmnDefinition from '@/business/platform/bpmn/definition/field'
+  import i18n from '@/utils/i18n'
+  import random from '@/mixins/random'
+  import bpmnStatus from '@/mixins/bpmnStatus'
+  import ActionUtils from '@/utils/action'
 
-import IbpsBpmnFormrenderDialog from '@/business/platform/bpmn/form/dialog'
+  import ApprovePopup from '@/business/platform/bpmn/form-ext/approve'
 
-export default {
-  components: {
-    IbpsMoreSearch,
-    IbpsAvatar,
-    IbpsListResultPage,
-    IbpsTypeTree,
-    IbpsBpmnDefinition,
-    IbpsToolbar,
-    ApprovePopup,
-    IbpsBpmnFormrenderDialog
-  },
-  mixins: [random, bpmnStatus],
-  data() {
-    return {
-      // tabActive: 'userType',
-      tabActive: 'user',
-      tabDatas: [{
-        name: 'user',
-        title: '用户'
-      }, {
-        name: 'org',
-        title: '组织'
-      }, {
-        name: 'orgManager',
-        title: '组织负责人'
-      }, {
-        name: 'role',
-        title: '角色'
-      }, {
-        name: 'position',
-        title: '岗位'
-      }, {
-        name: 'group',
-        title: '用户组'
-      }],
-      moreSearchPopup: false,
-      stateActive: false,
-      searchForms: {
-        forms: [
-          // { prop: 'Q^subject_^SL', label: '请求标题' },
-          { prop: 'Q^procDefName^SL', label: '流程名称', fieldType: 'slot', slotName: 'definition' },
-          { prop: ['Q^create_time_^DL', 'Q^create_time_^DG'], label: '创建时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }}
-        ]
-      },
-      subject: '',
-      typeId: '',
-      defKey: '',
-      moreParams: {},
-
-      listData: [],
-      pagination: {},
-      sorts: {},
+  import IbpsMoreSearch from '@/components/ibps-more-search'
+  import IbpsAvatar from '@/components/ibps-avatar'
+  import IbpsToolbar from '@/components/ibps-toolbar'
+  import IbpsListResultPage from '@/components/ibps-list-result-page'
+  import IbpsTypeTree from '@/business/platform/cat/type/tree'
+  import IbpsBpmnDefinition from '@/business/platform/bpmn/definition/field'
 
-      loading: false,
-      finished: false,
-      refreshing: false,
-      resultType: 'init',
-      errorType: null,
-      resultMessage: null,
+  import IbpsBpmnFormrenderDialog from '@/business/platform/bpmn/form/dialog'
 
-      checkMode: false,
-      checkedIds: [],
-      show: false,
-      actions: [
-        {
-          name: this.$t('common.button.agree'),
-          type: 'primary',
-          callback: this.openAgreeDialog
+  export default {
+    components: {
+      IbpsMoreSearch,
+      IbpsAvatar,
+      IbpsListResultPage,
+      IbpsTypeTree,
+      IbpsBpmnDefinition,
+      IbpsToolbar,
+      ApprovePopup,
+      IbpsBpmnFormrenderDialog
+    },
+    mixins: [random, bpmnStatus],
+    data() {
+      return {
+        // tabActive: 'userType',
+        tabActive: 'user',
+        tabDatas: [{
+          name: 'user',
+          title: '用户'
         }, {
-          name: this.$t('common.button.stop'),
-          type: 'danger',
-          callback: this.openStopDialog
+          name: 'org',
+          title: '组织'
         }, {
-          name: this.$t('common.button.suspend'),
-          type: 'warning',
-          callback: this.suspend
+          name: 'orgManager',
+          title: '组织负责人'
         }, {
-          name: this.$t('common.button.recover'),
-          type: 'info',
-          callback: this.recover
-        }
-      ],
-      batchOpinionPopup: false,
-      actionName: 'agree',
+          name: 'role',
+          title: '角色'
+        }, {
+          name: 'position',
+          title: '岗位'
+        }, {
+          name: 'group',
+          title: '用户组'
+        }],
+        moreSearchPopup: false,
+        stateActive: false,
+        searchForms: {
+          forms: [
+            { prop: 'Q^subject_^SL', label: '事物名称' },
+            { prop: 'Q^procDefName^SL', label: '事物说明', fieldType: 'slot', slotName: 'definition' },
+            { prop: ['Q^create_time_^DL', 'Q^create_time_^DG'], label: '创建时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' } }
+          ]
+        },
+        subject: '',
+        typeId: '',
+        defKey: '',
+        moreParams: {},
 
-      typeTreePopup: false,
+        listData: [],
+        pagination: {},
+        sorts: {},
 
-      taskId: '',
-      formrenderVisible: false,
-      formrenderTitle: ''
-    }
-  },
-  computed: {
-    rightText() {
-      return this.checkMode ? this.$t('common.button.cancel') : this.$t('common.button.manage')
-    },
-    selectedIds() {
-      return this.checkedIds.join(',')
-    }
-  },
-  methods: {
-    generateTitle(name, title) { // generateTitle by vue-i18n
-      return i18n.generateTitle(name, title)
-    },
-    /**
-     * 加载数据
-     */
-    loadData() {
-      this.loading = true
-      let requestMethod
-      switch (this.tabActive) {
-        case 'user':
-          requestMethod = pending4User
-          break
-        case 'org':
-          requestMethod = pending4Org
-          break
-        case 'orgManager':
-          requestMethod = pending4OrgManager
+        loading: false,
+        finished: false,
+        refreshing: false,
+        resultType: 'init',
+        errorType: null,
+        resultMessage: null,
 
-          break
-        case 'role':
-          requestMethod = pending4Role
-          break
-        case 'position':
-          requestMethod = pending4Position
-          break
-        case 'group':
-          requestMethod = pending4Group
-          break
-        default:
-          break
-      }
+        checkMode: false,
+        checkedIds: [],
+        show: false,
+        actions: [
+          {
+            name: this.$t('common.button.agree'),
+            type: 'primary',
+            callback: this.openAgreeDialog
+          }, {
+            name: this.$t('common.button.stop'),
+            type: 'danger',
+            callback: this.openStopDialog
+          }, {
+            name: this.$t('common.button.suspend'),
+            type: 'warning',
+            callback: this.suspend
+          }, {
+            name: this.$t('common.button.recover'),
+            type: 'info',
+            callback: this.recover
+          }
+        ],
+        batchOpinionPopup: false,
+        actionName: 'agree',
 
-      requestMethod(this.getSearcFormData()).then(response => {
-        // 处理数据
-        ActionUtils.handleListData(this, response.data)
-      }).catch((e) => {
-        ActionUtils.handleErrorData(this, e)
-      })
-    },
-    /**
-     * 获取格式化参数
-     */
-    getSearcFormData() {
-      let params = {}
-      if (this.$utils.isNotEmpty(this.subject)) {
-        params['Q^temp.subject_^SL'] = this.subject
-      }
-      if (this.$utils.isNotEmpty(this.typeId)) {
-        params['Q^temp.TYPE_ID_^S'] = this.typeId
-      }
-      if (this.$utils.isNotEmpty(this.defKey)) {
-        params['Q^temp.proc_def_key_^S'] = this.defKey
-      }
-      if (this.$utils.isNotEmpty(this.moreParams)) {
-        params = Object.assign(params, this.moreParams)
-      }
+        typeTreePopup: false,
 
-      return ActionUtils.formatParams(
-        params,
-        this.pagination,
-        this.sorts)
-    },
-    /**
-     * 下拉刷新
-     */
-    onRefresh() {
-      this.refreshing = true
-      this.finished = false
-      this.loading = true
-      this.onSearch()
-    },
-    /**
-     * 查询
-     */
-    onSearch() {
-      this.stateActive = false
-      ActionUtils.initListData(this)
-      this.loadData()
-    },
-    /**
-     * 高级查询
-     */
-    onMoreSearch(params) {
-      this.moreParams = params
-      this.onSearch()
-      if (this.$utils.isNotEmpty(params)) {
-        this.stateActive = true
+        taskId: '',
+        formrenderVisible: false,
+        formrenderTitle: ''
       }
     },
-    /**
-     * 弹窗更多查询条件
-     */
-    clickMoreSearch() {
-      this.moreSearchPopup = true
-      this.stateActive = false
-    },
-    /**
-     * 重置表单
-     */
-    resetForm() {
-      this.typeId = ''
-      this.defKey = ''
+    computed: {
+      rightText() {
+        return this.checkMode ? this.$t('common.button.cancel') : this.$t('common.button.manage')
+      },
+      selectedIds() {
+        return this.checkedIds.join(',')
+      }
     },
+    methods: {
+      generateTitle(name, title) { // generateTitle by vue-i18n
+        return i18n.generateTitle(name, title)
+      },
+      /**
+       * 加载数据
+       */
+      loadData() {
+        this.loading = true
+        let requestMethod
+        switch (this.tabActive) {
+          case 'user':
+            requestMethod = pending4User
+            break
+          case 'org':
+            requestMethod = pending4Org
+            break
+          case 'orgManager':
+            requestMethod = pending4OrgManager
 
-    onRefreshPage() {
-      this.checkedIds = []
-      this.checkMode = false
-      this.onRefresh()
-    },
+            break
+          case 'role':
+            requestMethod = pending4Role
+            break
+          case 'position':
+            requestMethod = pending4Position
+            break
+          case 'group':
+            requestMethod = pending4Group
+            break
+          default:
+            break
+        }
 
-    onClick(item, index) {
-      if (this.checkMode) {
-        this.$refs.checkboxes[index].toggle()
-      } else {
-        this.taskId = item.id
-        this.formrenderTitle = item.procDefName
-        this.formrenderVisible = true
-      }
-    },
-    clickType() {
-      this.typeTreePopup = true
-    },
-    clickTypeNode(data) {
-      this.typeId = data.id
-      this.onMoreSearch({})
-    },
-    toCheckMode() {
-      if (this.$utils.isEmpty(this.listData)) {
-        return
-      }
-      if (this.checkMode) {
-        this.show = true
-        this.checkedIds = []
-      }
-      this.checkMode = !this.checkMode
-    },
-    openAgreeDialog() {
-      if (this.checkedIds.length === 0) {
-        this.$notify({
-          type: 'warning',
-          message: this.$t('common.dialog.selectedRecords')
-        })
-        return
-      }
-      this.batchOpinionPopup = true
-      this.actionName = 'agree'
-    },
-    openStopDialog() {
-      if (this.checkedIds.length === 0) {
-        this.$notify({
-          type: 'warning',
-          message: this.$t('common.dialog.selectedRecords')
+        requestMethod(this.getSearcFormData()).then(response => {
+          // 处理数据
+          ActionUtils.handleListData(this, response.data)
+        }).catch((e) => {
+          ActionUtils.handleErrorData(this, e)
         })
-        return
-      }
-      this.batchOpinionPopup = true
-      this.actionName = 'stop'
-    },
+      },
+      /**
+       * 获取格式化参数
+       */
+      getSearcFormData() {
+        let params = {}
+        if (this.$utils.isNotEmpty(this.subject)) {
+          params['Q^temp.subject_^SL'] = this.subject
+        }
+        if (this.$utils.isNotEmpty(this.typeId)) {
+          params['Q^temp.TYPE_ID_^S'] = this.typeId
+        }
+        if (this.$utils.isNotEmpty(this.defKey)) {
+          params['Q^temp.proc_def_key_^S'] = this.defKey
+        }
+        if (this.$utils.isNotEmpty(this.moreParams)) {
+          params = Object.assign(params, this.moreParams)
+        }
 
-    suspend() {
-      if (this.checkedIds.length === 0) {
-        this.$notify({
-          type: 'warning',
-          message: this.$t('common.dialog.selectedRecords')
-        })
-        return
-      }
+        return ActionUtils.formatParams(
+          params,
+          this.pagination,
+          this.sorts)
+      },
+      /**
+       * 下拉刷新
+       */
+      onRefresh() {
+        this.refreshing = true
+        this.finished = false
+        this.loading = true
+        this.onSearch()
+      },
+      /**
+       * 查询
+       */
+      onSearch() {
+        this.stateActive = false
+        ActionUtils.initListData(this)
+        this.loadData()
+      },
+      /**
+       * 高级查询
+       */
+      onMoreSearch(params) {
+        this.moreParams = params
+        this.onSearch()
+        if (this.$utils.isNotEmpty(params)) {
+          this.stateActive = true
+        }
+      },
+      /**
+       * 弹窗更多查询条件
+       */
+      clickMoreSearch() {
+        this.moreSearchPopup = true
+        this.stateActive = false
+      },
+      /**
+       * 重置表单
+       */
+      resetForm() {
+        this.typeId = ''
+        this.defKey = ''
+      },
+
+      onRefreshPage() {
+        this.checkedIds = []
+        this.checkMode = false
+        this.onRefresh()
+      },
 
-      this.$dialog.confirm({
-        title: this.$t('common.dialog.warn'),
-        message: this.$t('common.operate.makeSure')
-      }).then(() => {
-        batchSuspendProcess({ 'taskIds': this.selectedIds }).then(response => {
+      onClick(item, index) {
+        if (this.checkMode) {
+          this.$refs.checkboxes[index].toggle()
+        } else {
+          this.taskId = item.id
+          this.formrenderTitle = item.procDefName
+          this.formrenderVisible = true
+        }
+      },
+      clickType() {
+        this.typeTreePopup = true
+      },
+      clickTypeNode(data) {
+        this.typeId = data.id
+        this.onMoreSearch({})
+      },
+      toCheckMode() {
+        if (this.$utils.isEmpty(this.listData)) {
+          return
+        }
+        if (this.checkMode) {
+          this.show = true
+          this.checkedIds = []
+        }
+        this.checkMode = !this.checkMode
+      },
+      openAgreeDialog() {
+        if (this.checkedIds.length === 0) {
           this.$notify({
-            type: 'success',
-            message: '批量挂起流程成功!'
+            type: 'warning',
+            message: this.$t('common.dialog.selectedRecords')
+          })
+          return
+        }
+        this.batchOpinionPopup = true
+        this.actionName = 'agree'
+      },
+      openStopDialog() {
+        if (this.checkedIds.length === 0) {
+          this.$notify({
+            type: 'warning',
+            message: this.$t('common.dialog.selectedRecords')
+          })
+          return
+        }
+        this.batchOpinionPopup = true
+        this.actionName = 'stop'
+      },
+
+      suspend() {
+        if (this.checkedIds.length === 0) {
+          this.$notify({
+            type: 'warning',
+            message: this.$t('common.dialog.selectedRecords')
+          })
+          return
+        }
+
+        this.$dialog.confirm({
+          title: this.$t('common.dialog.warn'),
+          message: this.$t('common.operate.makeSure')
+        }).then(() => {
+          batchSuspendProcess({ 'taskIds': this.selectedIds }).then(response => {
+            this.$notify({
+              type: 'success',
+              message: '批量挂起流程成功!'
+            })
+            this.onRefreshPage()
+          }).catch((e) => {
+            console.error(e)
           })
-          this.onRefreshPage()
-        }).catch((e) => {
-          console.error(e)
-        })
-      })
-    },
-    getTaskDesc(v) {
-      if (!v.includes('#')) {
-        return ''
-      }
-      return v.split('#')[1] || ''
-    },
-    recover() {
-      if (this.checkedIds.length === 0) {
-        this.$notify({
-          type: 'warning',
-          message: this.$t('common.dialog.selectedRecords')
         })
-        return
-      }
-      this.$dialog.confirm({
-        title: this.$t('common.dialog.warn'),
-        message: this.$t('common.operate.makeSure')
-      }).then(() => {
-        batchRecoverProcess({ 'taskIds': this.selectedIds }).then(response => {
+      },
+      getTaskDesc(v) {
+        if (!v.includes('#')) {
+          return ''
+        }
+        return v.split('#')[1] || ''
+      },
+      recover() {
+        if (this.checkedIds.length === 0) {
           this.$notify({
-            type: 'success',
-            message: '批量恢复流程成功!'
+            type: 'warning',
+            message: this.$t('common.dialog.selectedRecords')
+          })
+          return
+        }
+        this.$dialog.confirm({
+          title: this.$t('common.dialog.warn'),
+          message: this.$t('common.operate.makeSure')
+        }).then(() => {
+          batchRecoverProcess({ 'taskIds': this.selectedIds }).then(response => {
+            this.$notify({
+              type: 'success',
+              message: '批量恢复流程成功!'
+            })
+            this.onRefreshPage()
+          }).catch((e) => {
+            console.error(e)
           })
-          this.onRefreshPage()
-        }).catch((e) => {
-          console.error(e)
         })
-      })
+      }
     }
-  }
 
-}
+  }
 </script>
 <style lang="scss" scoped>
-::v-deep .van-cell__title{
-  width: 65%;
-  .van-cell__label{
-    overflow-wrap: break-word;
+  ::v-deep .van-cell__title {
+    width: 65%;
+
+    .van-cell__label {
+      overflow-wrap: break-word;
+    }
   }
-}
-</style>
+</style>