Explorar o código

满意度评价补充提示、列表流程过滤逻辑

cyy hai 1 ano
pai
achega
f2e2e475dc

+ 5 - 0
src/store/getters.js

@@ -44,6 +44,11 @@ export default {
     state.ibps.param && state.ibps.param.deptList
       ? state.ibps.param.deptList
       : [],
+  // 获取所有流程信息
+  flowList: state =>
+  state.ibps.param && state.ibps.param.flowList
+    ? state.ibps.param.flowList
+    : [],
   // 获取用户最高层级
   level: state =>
     state.ibps.param && state.ibps.param.level ? state.ibps.param.level : []

+ 8 - 0
src/store/modules/ibps/modules/param.js

@@ -8,6 +8,7 @@ export default {
         // 所有部门信息
         deptList: [],
         pitchDept: [],
+        flowList: [],
         // 当前用户层级
         level: {
             first: '',
@@ -27,6 +28,9 @@ export default {
         pitchDept (state, data) {
             state.pitchDept = data.length ? data : []
         },
+        flowList (state, data) {
+            state.flowList = data.length ? data : []
+        },
         level (state, data) {
             state.level = data || { first: '', second: '' }
         }
@@ -44,6 +48,10 @@ export default {
         setLevel ({ commit }, data) {
             console.log(data)
             commit('level', data)
+        },
+        setflowList ({ commit }, data) {
+            console.log('safdaew35345')
+            commit('flowList', data)
         }
     }
 }

+ 20 - 0
src/store/modules/ibps/modules/user.js

@@ -100,6 +100,8 @@ export default {
             await dispatch('getUserList', level)
             // 获取所有部门信息
             await dispatch('getDeptList', level)
+            // 获取所有流程信息
+            await dispatch('getFlowList', level)
             // // 获取当前子系统
             // await dispatch('ibps/system/loadSystem', null, {
             //   root: true
@@ -197,6 +199,24 @@ export default {
           console.log(error)
           alert('获取所有部门信息失败!')
         })
+    },
+    /**
+     * 获取所有可展示流程信息
+     */
+    getFlowList({ state, dispatch }, { first, second }) {
+      const sql = `select * from t_applcgl`
+      common
+        .request('sql', sql)
+        .then(res => {
+          const { data = [] } = res.variables || {}
+          dispatch('ibps/param/setflowList', data, {
+            root: true
+          })
+        })
+        .catch(error => {
+          console.log(error)
+          alert('获取所有流程信息失败!')
+        })
     }
   }
 }

+ 92 - 1
src/utils/action.js

@@ -212,7 +212,7 @@ const action = {
     vm[resultKey] = []
   },
   /**
- * 处理列表数据
+ * 处理列表数据(带过滤)
  * @param vm 当前对象
  * @param data 后台返回的列表数据
  * @param options 参数
@@ -253,6 +253,97 @@ const action = {
     vm[resultTypeKey] = this.handleResultType(vm, options)
     vm[resultMessageKey] = null
   },
+  /**
+ * 处理列表数据(不过滤)
+ * @param vm 当前对象
+ * @param data 后台返回的列表数据
+ * @param options 参数
+ *   dataResultKey 默认 dataResult
+ *  pageResultKey 默认 pageResult
+ *  resultKey 结果key 默认 listData
+ *  pageKey 分页key 默认 pagination
+ */
+  handleListData: function (vm, data, options = {}) {
+    const loadingKey = options.loadingKey || 'loading'
+    const refreshingKey = options.refreshingKey || 'refreshing'
+    const finishedKey = options.finishedKey || 'finished'
+    const dataResultKey = options.dataResultKey || 'dataResult'
+    const pageResultKey = options.pageResultKey || 'pageResult'
+    const resultKey = options.resultKey || 'listData'
+    const paginationKey = options.paginationKey || 'pagination'
+    const pageKey = options.pageKey || 'page'
+    const resultTypeKey = options.resultTypeKey || 'resultType'
+    const resultMessageKey = options.resultMessageKey || 'resultMessage'
+
+    const listData = data ? data[dataResultKey] || [] : []
+    const pagination = data ? data[pageResultKey] || {} : {}
+
+    if (vm[refreshingKey]) {
+      vm[resultKey] = []
+      vm[refreshingKey] = false
+    }
+
+    if (Utils.isNotEmpty(listData)) {
+      pagination[pageKey] = pagination[pageKey] + 1
+      vm[resultKey] = vm[resultKey].concat(listData)
+    }
+    vm[loadingKey] = false
+    vm[finishedKey] = this.isFinished(pagination, vm[resultKey])
+
+    vm[paginationKey] = pagination
+    // 处理结果类型
+    vm[resultTypeKey] = this.handleResultType(vm, options)
+    vm[resultMessageKey] = null
+  },
+  /**
+ * 处理列表数据(带过滤)
+ * @param vm 当前对象
+ * @param data 后台返回的列表数据
+ * @param options 参数
+ *   dataResultKey 默认 dataResult
+ *  pageResultKey 默认 pageResult
+ *  resultKey 结果key 默认 listData
+ *  pageKey 分页key 默认 pagination
+ */
+   existHandleListData: function (vm, data, filtration, options={}) {
+    const loadingKey = options.loadingKey || 'loading'
+    const refreshingKey = options.refreshingKey || 'refreshing'
+    const finishedKey = options.finishedKey || 'finished'
+    const dataResultKey = options.dataResultKey || 'dataResult'
+    const pageResultKey = options.pageResultKey || 'pageResult'
+    const resultKey = options.resultKey || 'listData'
+    const paginationKey = options.paginationKey || 'pagination'
+    const pageKey = options.pageKey || 'page'
+    const resultTypeKey = options.resultTypeKey || 'resultType'
+    const resultMessageKey = options.resultMessageKey || 'resultMessage'
+
+    const listData = data ? data[dataResultKey] || [] : []
+    const pagination = data ? data[pageResultKey] || {} : {}
+
+    if (vm[refreshingKey]) {
+      vm[resultKey] = []
+      vm[refreshingKey] = false
+    }
+    if (Utils.isNotEmpty(listData)) {
+      let mid = []
+      listData.forEach((item,i)=>{
+        const obj = filtration.findIndex(t=> t.liu_cheng_id_ === item.procDefId)
+        if(obj != -1){
+          mid.push(item)
+        }
+      })
+      pagination[pageKey] = pagination[pageKey] + 1
+      vm[resultKey] = vm[resultKey].concat(mid)
+      
+    }
+    vm[loadingKey] = false
+    vm[finishedKey] = Utils.isEmpty(listData) ? true : false
+
+    vm[paginationKey] = pagination
+    // 处理结果类型
+    vm[resultTypeKey] = this.handleResultType(vm, options)
+    vm[resultMessageKey] = null
+  },
   /**
    * 处理通用接口列表数据
    * @param vm 当前对象

+ 449 - 327
src/views/platform/bpmn/pending/index.vue

@@ -1,9 +1,24 @@
 <template>
-  <div :class="{'ibps-fixed-toolbar':checkMode}">
+  <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')"
+        left-arrow
+        @click-left="$router.push({ name: 'dashboard' })"
+      />
+      <!-- <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"
@@ -12,403 +27,510 @@
           :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" />
+          <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-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">
+            <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"
-                :color="item.remindTimes|remindTimesTypeFilter | optionsFilter(colorOptions,'color','type')"
-                :text-color="item.remindTimes|remindTimesTypeFilter | optionsFilter(colorOptions,'textColor','type')">
-                催办{{ item.remindTimes }}次</van-tag>
+              <van-tag
+                size="medium"
+                :color="
+                  item.remindTimes
+                    | remindTimesTypeFilter
+                    | optionsFilter(colorOptions, 'color', '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" />
 
-    <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" />
       </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 {
+  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 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 ApprovePopup from '@/business/platform/bpmn/form-ext/approve'
 
-  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 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 IbpsBpmnFormrenderDialog from '@/business/platform/bpmn/form/dialog'
+import IbpsBpmnFormrenderDialog from '@/business/platform/bpmn/form/dialog'
 
-  export default {
-    components: {
-      IbpsMoreSearch,
-      IbpsAvatar,
-      IbpsListResultPage,
-      IbpsTypeTree,
-      IbpsBpmnDefinition,
-      IbpsToolbar,
-      ApprovePopup,
-      IbpsBpmnFormrenderDialog
-    },
-    mixins: [random, bpmnStatus],
-    data() {
-      return {
-        // tabActive: 'userType',
-        tabActive: 'user',
-        tabDatas: [{
+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^inst.subject_^SL', label: '事务说明' },
-            { prop: 'Q^procDefName^SL', label: '事务说明' },
-            { prop: ['Q^create_time_^DL', 'Q^create_time_^DG'], label: '创建时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' } }
-          ]
-        },
-        subject: '',
-        typeId: '',
-        defKey: '',
-        moreParams: {},
+        }
+      ],
+      moreSearchPopup: false,
+      stateActive: false,
+      searchForms: {
+        forms: [
+          { prop: 'Q^subject_^SL', label: '事务名称' },
+          // { prop: 'Q^inst.subject_^SL', label: '事务说明' },
+          { prop: 'Q^procDefName^SL', label: '事务说明' },
+          {
+            prop: ['Q^create_time_^DL', 'Q^create_time_^DG'],
+            label: '创建时间',
+            fieldType: 'dateRange',
+            options: { datefmt: 'yyyy-MM-dd' }
+          }
+        ]
+      },
+      subject: '',
+      typeId: '',
+      defKey: '',
+      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: [],
-        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',
+      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',
 
-        typeTreePopup: false,
+      typeTreePopup: false,
 
-        taskId: '',
-        formrenderVisible: false,
-        formrenderTitle: ''
-      }
+      taskId: '',
+      formrenderVisible: false,
+      formrenderTitle: ''
+    }
+  },
+  computed: {
+    rightText() {
+      return this.checkMode
+        ? this.$t('common.button.cancel')
+        : this.$t('common.button.manage')
     },
-    computed: {
-      rightText() {
-        return this.checkMode ? this.$t('common.button.cancel') : this.$t('common.button.manage')
-      },
-      selectedIds() {
-        return this.checkedIds.join(',')
-      }
+    selectedIds() {
+      return this.checkedIds.join(',')
+    }
+  },
+  methods: {
+    generateTitle(name, title) {
+      // generateTitle by vue-i18n
+      return i18n.generateTitle(name, title)
     },
-    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
+    /**
+     * 加载数据
+     */
+    loadData() {
+      this.loading = true
+      let requestMethod
+      switch (this.tabActive) {
+        case 'user':
+          requestMethod = pending4User
+          break
+        case 'org':
+          requestMethod = pending4Org
+          break
+        case 'orgManager':
+          requestMethod = pending4OrgManager
 
-            break
-          case 'role':
-            requestMethod = pending4Role
-            break
-          case 'position':
-            requestMethod = pending4Position
-            break
-          case 'group':
-            requestMethod = pending4Group
-            break
-          default:
-            break
-        }
+          break
+        case 'role':
+          requestMethod = pending4Role
+          break
+        case 'position':
+          requestMethod = pending4Position
+          break
+        case 'group':
+          requestMethod = pending4Group
+          break
+        default:
+          break
+      }
 
-        requestMethod(this.getSearcFormData()).then(response => {
+      requestMethod(this.getSearcFormData())
+        .then(response => {
           // 处理数据
-          ActionUtils.handleListData(this, response.data)
-        }).catch((e) => {
+          ActionUtils.existHandleListData(
+            this,
+            response.data,
+            this.$store.getters.flowList
+          )
+        })
+        .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)
-        }
+    },
+    /**
+     * 获取格式化参数
+     */
+    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)
+      }
 
-        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 = ''
-      },
+      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()
-      },
+    onRefreshPage() {
+      this.checkedIds = []
+      this.checkMode = false
+      this.onRefresh()
+    },
 
-      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')
-          })
-          return
-        }
-        this.batchOpinionPopup = true
-        this.actionName = 'stop'
-      },
+    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')
+        })
+        return
+      }
+      this.batchOpinionPopup = true
+      this.actionName = 'stop'
+    },
 
-      suspend() {
-        if (this.checkedIds.length === 0) {
-          this.$notify({
-            type: 'warning',
-            message: this.$t('common.dialog.selectedRecords')
-          })
-          return
-        }
+    suspend() {
+      if (this.checkedIds.length === 0) {
+        this.$notify({
+          type: 'warning',
+          message: this.$t('common.dialog.selectedRecords')
+        })
+        return
+      }
 
-        this.$dialog.confirm({
+      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: '批量挂起流程成功!'
+        })
+        .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({
+    },
+    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 => {
-            this.$notify({
-              type: 'success',
-              message: '批量恢复流程成功!'
+        })
+        .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%;
+::v-deep .van-cell__title {
+  width: 65%;
 
-    .van-cell__label {
-      overflow-wrap: break-word;
-    }
+  .van-cell__label {
+    overflow-wrap: break-word;
   }
-</style>
+}
+</style>

+ 156 - 141
src/views/platform/bpmn/satisfaction/satisfaction.vue

@@ -13,7 +13,22 @@
       </van-sticky>
     </div>
     <!-- <u-alert-tips type="success" :title="descriptionTitle" :description="description" style="margin:10px"></u-alert-tips> -->
-    <div class="flexWrap">
+    <van-notice-bar
+      wrapable
+      :scrollable="false"
+      :text="`${descriptionTitle}`"
+      color="#67c23a"
+      background="#f0f9eb"
+    />
+    <van-notice-bar
+      wrapable
+      :scrollable="false"
+      :text="`${description}`"
+      color="#67c23a"
+      background="#f0f9eb"
+      style="margin-bottom:5px"
+    />
+    <div class="flexWrap scrollView">
       <van-form @submit="onSubmit">
         <van-field
           name="radio"
@@ -91,145 +106,146 @@
           ]"
         />
       </van-form>
-    </div>
-    <van-cell-group class="marginF">
-      <div
-        class="verticalLine"
-        style="width:100%;text-align:left;padding: 1em 0 1em 0.5em;margin: 0;"
-      >
-        {{ peiZhi1 }}
-      </div>
-      <div class="scoreLine">
-        <van-rate
-          v-model="wenTiYiDaAn"
-          color="#67c23a"
-          void-icon="star"
-          void-color="rgb(236, 236, 236)"
-        />
-        <div v-if="wenTiYiDaAn != ''" class="score">
-          {{ getRote(wenTiYiDaAn) }}
+      <van-cell-group class="marginF">
+        <div
+          class="verticalLine"
+          style="width:100%;text-align:left;padding: 1em 0 1em 0.5em;margin: 0;"
+        >
+          {{ peiZhi1 }}
         </div>
-      </div>
-    </van-cell-group>
-    <van-cell-group class="marginF">
-      <div
-        class="verticalLine"
-        style="width:100%;text-align:left;padding: 1em 0 1em 0.5em;margin: 0;"
-      >
-        {{ peiZhi2 }}
-      </div>
-      <div class="scoreLine">
-        <van-rate
-          v-model="wenTiErDaAn"
-          color="#67c23a"
-          void-icon="star"
-          void-color="rgb(236, 236, 236)"
-        />
-        <div v-if="wenTiErDaAn != ''" class="score">
-          {{ getRote(wenTiErDaAn) }}
+        <div class="scoreLine">
+          <van-rate
+            v-model="wenTiYiDaAn"
+            color="#67c23a"
+            void-icon="star"
+            void-color="rgb(236, 236, 236)"
+          />
+          <div v-if="wenTiYiDaAn != ''" class="score">
+            {{ getRote(wenTiYiDaAn) }}
+          </div>
         </div>
-      </div>
-    </van-cell-group>
-    <van-cell-group class="marginF">
-      <div
-        class="verticalLine"
-        style="width:100%;text-align:left;padding: 1em 0 1em 0.5em;margin: 0;"
-      >
-        {{ peiZhi3 }}
-      </div>
-      <div class="scoreLine">
-        <van-rate
-          v-model="wenTiSanDaAn"
-          color="#67c23a"
-          void-icon="star"
-          void-color="rgb(236, 236, 236)"
-        />
-        <div v-if="wenTiSanDaAn != ''" class="score">
-          {{ getRote(wenTiSanDaAn) }}
+      </van-cell-group>
+      <van-cell-group class="marginF">
+        <div
+          class="verticalLine"
+          style="width:100%;text-align:left;padding: 1em 0 1em 0.5em;margin: 0;"
+        >
+          {{ peiZhi2 }}
         </div>
-      </div>
-    </van-cell-group>
-    <van-cell-group class="marginF">
-      <div
-        class="verticalLine"
-        style="width:100%;text-align:left;padding: 1em 0 1em 0.5em;margin: 0;"
-      >
-        {{ peiZhi4 }}
-      </div>
-      <div class="scoreLine">
-        <van-rate
-          v-model="wenTiSiDaAn"
-          color="#67c23a"
-          void-icon="star"
-          void-color="rgb(236, 236, 236)"
-        />
-        <div v-if="wenTiSiDaAn != ''" class="score">
-          {{ getRote(wenTiSiDaAn) }}
+        <div class="scoreLine">
+          <van-rate
+            v-model="wenTiErDaAn"
+            color="#67c23a"
+            void-icon="star"
+            void-color="rgb(236, 236, 236)"
+          />
+          <div v-if="wenTiErDaAn != ''" class="score">
+            {{ getRote(wenTiErDaAn) }}
+          </div>
         </div>
-      </div>
-    </van-cell-group>
-    <van-cell-group class="marginF">
-      <div
-        class="verticalLine"
-        style="width:100%;text-align:left;padding: 1em 0 1em 0.5em;margin: 0;"
-      >
-        {{ peiZhi5 }}
-      </div>
-      <div class="scoreLine">
-        <van-rate
-          v-model="wenTiWuDaAn"
-          color="#67c23a"
-          void-icon="star"
-          void-color="rgb(236, 236, 236)"
-        />
-        <div v-if="wenTiWuDaAn != ''" class="score">
-          {{ getRote(wenTiWuDaAn) }}
+      </van-cell-group>
+      <van-cell-group class="marginF">
+        <div
+          class="verticalLine"
+          style="width:100%;text-align:left;padding: 1em 0 1em 0.5em;margin: 0;"
+        >
+          {{ peiZhi3 }}
         </div>
-      </div>
-    </van-cell-group>
-    <ibps-uploader
-      v-model="fuJianShangChuanArray"
-      class="paddingNone marginF"
-      label="上传附件"
-      download
-      :have-padding="false"
-      multiple
-      clearable
-    />
-    <van-cell-group class="marginF">
-      <div
-        class="verticalLine"
-        style="width:100%;text-align:left;padding: 1em 0 1em 0.5em;margin: 0;"
-      >
-        对检验科意见与建议
-      </div>
-
-      <van-radio-group
-        v-model="touSu"
-        style="padding-left:0.5em"
-        direction="horizontal"
-      >
-        <van-radio
-          v-for="(it, index) in tousuList"
-          :key="index"
-          :name="it.name"
-          shape="square"
-          class="lineSty"
+        <div class="scoreLine">
+          <van-rate
+            v-model="wenTiSanDaAn"
+            color="#67c23a"
+            void-icon="star"
+            void-color="rgb(236, 236, 236)"
+          />
+          <div v-if="wenTiSanDaAn != ''" class="score">
+            {{ getRote(wenTiSanDaAn) }}
+          </div>
+        </div>
+      </van-cell-group>
+      <van-cell-group class="marginF">
+        <div
+          class="verticalLine"
+          style="width:100%;text-align:left;padding: 1em 0 1em 0.5em;margin: 0;"
         >
-          {{ it.name }}
-        </van-radio>
-      </van-radio-group>
-
-      <van-field
-        :value="qingNinTianXie"
-        autosize
-        class="typeStyle"
-        type="textarea"
-        placeholder="请填写对检验科意见与建议"
-        label-width="0"
+          {{ peiZhi4 }}
+        </div>
+        <div class="scoreLine">
+          <van-rate
+            v-model="wenTiSiDaAn"
+            color="#67c23a"
+            void-icon="star"
+            void-color="rgb(236, 236, 236)"
+          />
+          <div v-if="wenTiSiDaAn != ''" class="score">
+            {{ getRote(wenTiSiDaAn) }}
+          </div>
+        </div>
+      </van-cell-group>
+      <van-cell-group class="marginF">
+        <div
+          class="verticalLine"
+          style="width:100%;text-align:left;padding: 1em 0 1em 0.5em;margin: 0;"
+        >
+          {{ peiZhi5 }}
+        </div>
+        <div class="scoreLine">
+          <van-rate
+            v-model="wenTiWuDaAn"
+            color="#67c23a"
+            void-icon="star"
+            void-color="rgb(236, 236, 236)"
+          />
+          <div v-if="wenTiWuDaAn != ''" class="score">
+            {{ getRote(wenTiWuDaAn) }}
+          </div>
+        </div>
+      </van-cell-group>
+      <ibps-uploader
+        v-model="fuJianShangChuanArray"
+        class="paddingNone marginF"
+        label="上传附件"
+        download
+        :have-padding="false"
+        multiple
         clearable
       />
-    </van-cell-group>
+      <van-cell-group class="marginF">
+        <div
+          class="verticalLine"
+          style="width:100%;text-align:left;padding: 1em 0 1em 0.5em;margin: 0;"
+        >
+          对检验科意见与建议
+        </div>
+
+        <van-radio-group
+          v-model="touSu"
+          style="padding-left:0.5em"
+          direction="horizontal"
+        >
+          <van-radio
+            v-for="(it, index) in tousuList"
+            :key="index"
+            :name="it.name"
+            shape="square"
+            class="lineSty"
+          >
+            {{ it.name }}
+          </van-radio>
+        </van-radio-group>
+
+        <van-field
+          :value="qingNinTianXie"
+          autosize
+          class="typeStyle"
+          type="textarea"
+          placeholder="请填写对检验科意见与建议"
+          label-width="0"
+          clearable
+        />
+      </van-cell-group>
+    </div>
+
     <div class="padding flex flex-direction">
       <van-button
 type="success"
@@ -497,15 +513,6 @@ export default {
         })
       })
     },
-    uploadClick(item) {
-      if (/^(pdf|png|jpg|jpeg|gif)$/.test(item.ext)) {
-        uni.navigateTo({
-          url: `/pages/filediv/filediv?id=${item.id}&ext=${item.ext}`
-        })
-      } else {
-        this.$uploades.download(item.id, item.name, this)
-      }
-    },
     // 删除
     deleteMe(id) {
       this.fuJianShangChuanArray = this.fuJianShangChuanArray.filter(
@@ -639,4 +646,12 @@ export default {
   background-color: #1989fa !important;
   border: none;
 }
+.scrollView {
+  overflow-y: scroll;
+  overflow-x: hidden;
+  height: 95%;
+}
+.scrollView::-webkit-scrollbar {
+  display: none;
+}
 </style>