|
@@ -0,0 +1,81 @@
|
|
|
+<template>
|
|
|
+ <scroll-view :style="{height: `calc(${approveListHeight}px - 20rpx)`}" class="di-scroll" scroll-y @scrolltolower="handleOnreachBottom" :refresher-triggered="triggered"
|
|
|
+ refresher-enabled @refresherrefresh="handlePullDownRefresh">
|
|
|
+ <view class="di-scroll-list">
|
|
|
+ <!-- 右滑 -->
|
|
|
+ <u-swipe-action
|
|
|
+ style="margin-bottom: 20rpx;border-radius: 10rpx;overflow: hidden;"
|
|
|
+ v-for="(item, index) in list"
|
|
|
+ :show="activeIndex === item[primaryKey]"
|
|
|
+ :key="index"
|
|
|
+ :index='item.id'
|
|
|
+ @content-click="(id) => handleClickContext(id, item)">
|
|
|
+ <!-- @content-click="(id) => handle2ProcessTask(item.id, item.procInstId, 'cc', item.procDefId,false)" -->
|
|
|
+ <di-descriptions :title="item.processInstanceName" label-col="3" value-col="9" :border-bottom="true" >
|
|
|
+ <!-- <template slot="right" v-if="categoryMap[item.category]">
|
|
|
+ <u-tag size="mini" :text="categoryMap[item.category].label" :type="categoryMap[item.category].type" mode="light" />
|
|
|
+ </template> -->
|
|
|
+ <di-descriptions-item label="流程名称" :value="item.processDefinitionName" :ellipsis="true"/>
|
|
|
+ <di-descriptions-item label="节点名称" :value="item.name" :ellipsis="true"/>
|
|
|
+ <di-descriptions-item label="开始时间" :value="item.createTime" :ellipsis="true"/>
|
|
|
+ <!-- <di-descriptions-item label="办结时间" :value="item.endTime" :ellipsis="true"/> -->
|
|
|
+ </di-descriptions>
|
|
|
+ </u-swipe-action>
|
|
|
+ </view>
|
|
|
+ <u-loadmore v-if="!triggered" :status="status" :loadText='loadText' margin-top="24" margin-bottom="20" />
|
|
|
+ </scroll-view>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import approveList from './approveList'
|
|
|
+
|
|
|
+ export default {
|
|
|
+ mixins: [approveList],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ baseApi: '/workflow',
|
|
|
+ listApi: 'task/runTaskList',
|
|
|
+ customQueryParam: {
|
|
|
+ // category: 'todo',
|
|
|
+ // taskCategory: 'cc',
|
|
|
+ manager: true,
|
|
|
+ // findByCurrentUserId: true,
|
|
|
+ // orderBy: 'startTime:DESC'
|
|
|
+ },
|
|
|
+ categoryMap: {
|
|
|
+ todo: {
|
|
|
+ label: '待办',
|
|
|
+ type: 'primary'
|
|
|
+ },
|
|
|
+ hold: {
|
|
|
+ label: '暂存',
|
|
|
+ type: 'warning'
|
|
|
+ },
|
|
|
+ cc: {
|
|
|
+ label: '抄送',
|
|
|
+ type: 'success'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ async handleClickContext (id, item) {
|
|
|
+ /* if (!item.assignee) {
|
|
|
+ await this.claim(item.id)
|
|
|
+ } */
|
|
|
+ this.handle2ProcessTask(id, item.procInstId, item.category, item.procDefId, true)
|
|
|
+ },
|
|
|
+ handle2ProcessTask(id, instId, category, definitionId, allowDeal) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url:`/pages/workflowTask/webviewPages/dealTask?id=${id}&definitionId=${definitionId}&instId=${instId}&category=${category}&allowDeal=${allowDeal}&withManager=true`
|
|
|
+ })
|
|
|
+ },
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+<style>
|
|
|
+.di-scroll-list {
|
|
|
+ background: none;
|
|
|
+}
|
|
|
+</style>
|