Merge remote-tracking branch 'remotes/origin/master' into minJeecg
# Conflicts: # src/api/process/index.ts
This commit is contained in:
commit
ca6c08b8c6
@ -96,3 +96,18 @@ export function histTasks(config : Object) { //流程任务完成
|
|||||||
data: config
|
data: config
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function myApplyProcessListApi(config : object) { // 本人发起列表
|
||||||
|
return http({
|
||||||
|
url: '/act/task/myApplyProcessList',
|
||||||
|
method: 'GET',
|
||||||
|
data: config
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function callBackProcessApi(config : object) { // 取回流程
|
||||||
|
return http({
|
||||||
|
url: '/act/task/callBackProcess',
|
||||||
|
method: 'PUT',
|
||||||
|
data: config
|
||||||
|
})
|
||||||
|
}
|
@ -6,25 +6,25 @@
|
|||||||
<wd-card :title="item.bpmBizTitle" title-bold border-radius="8" use-footer-slot @click="goToPage(item)">
|
<wd-card :title="item.bpmBizTitle" title-bold border-radius="8" use-footer-slot @click="goToPage(item)">
|
||||||
<view class="card-content">
|
<view class="card-content">
|
||||||
<wd-row style="color: #666666;">
|
<wd-row style="color: #666666;">
|
||||||
<wd-col :span="4">
|
<wd-col :span="6">
|
||||||
<text>当前环节:</text>
|
<text>当前环节:</text>
|
||||||
</wd-col>
|
</wd-col>
|
||||||
<wd-col :span="20">
|
<wd-col :span="18">
|
||||||
{{item.taskName}}
|
{{item.taskName}}
|
||||||
</wd-col>
|
</wd-col>
|
||||||
</wd-row>
|
</wd-row>
|
||||||
<wd-row style="padding-bottom: 2px;color: #666666;">
|
<wd-row style="padding: 10px 0 10px 0;color: #666666;">
|
||||||
<wd-col :span="4">
|
<wd-col :span="6">
|
||||||
<text>流程名称:</text>
|
<text>流程名称:</text>
|
||||||
</wd-col>
|
</wd-col>
|
||||||
<wd-col :span="20">
|
<wd-col :span="18">
|
||||||
{{item.processDefinitionName}}
|
{{item.processDefinitionName}}
|
||||||
</wd-col>
|
</wd-col>
|
||||||
</wd-row>
|
</wd-row>
|
||||||
<view class="meta-info">
|
<view class="meta-info">
|
||||||
<wd-icon name="time" size="14px" color="#999"></wd-icon>
|
<wd-icon name="time" size="18px" color="#999"></wd-icon>
|
||||||
<text class="meta-text">{{item.taskBeginTime?item.taskBeginTime.substring(0,10):''}}</text>
|
<text class="meta-text">{{item.taskBeginTime?item.taskBeginTime.substring(0,10):''}}</text>
|
||||||
<wd-icon name="user" size="14px" color="#999" style="margin-left: auto;"></wd-icon>
|
<wd-icon name="user" size="18px" color="#999" style="margin-left: auto;"></wd-icon>
|
||||||
<text class="meta-text">{{item.processApplyUserName}}</text>
|
<text class="meta-text">{{item.processApplyUserName}}</text>
|
||||||
</view>
|
</view>
|
||||||
<wd-row style="padding-top: 10px;">
|
<wd-row style="padding-top: 10px;">
|
||||||
@ -52,39 +52,21 @@
|
|||||||
</view>
|
</view>
|
||||||
<wd-message-box></wd-message-box>
|
<wd-message-box></wd-message-box>
|
||||||
<wd-toast></wd-toast>
|
<wd-toast></wd-toast>
|
||||||
<SelectUserModal
|
<SelectUserModal v-if="modalShow" :selected="user" modalTitle="用户选择" :multi="false" @change="handleChange"
|
||||||
v-if="modalShow"
|
@close="() => (modalShow = false)"></SelectUserModal>
|
||||||
:selected="user"
|
|
||||||
modalTitle="用户选择"
|
|
||||||
:multi="false"
|
|
||||||
@change="handleChange"
|
|
||||||
@close="() => (modalShow = false)"
|
|
||||||
></SelectUserModal>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup>
|
||||||
import { taskListApi,claim } from '@/api/process'
|
import { taskListApi, claim, taskEntrust } from '@/api/process'
|
||||||
import {
|
|
||||||
ref
|
|
||||||
} from 'vue'
|
|
||||||
import {
|
|
||||||
onLoad,
|
|
||||||
onShow,
|
|
||||||
onReachBottom,
|
|
||||||
onPullDownRefresh
|
|
||||||
} from '@dcloudio/uni-app';
|
|
||||||
import {
|
|
||||||
taskEntrust
|
|
||||||
} from '@/api/process'
|
|
||||||
import { useToast, useMessage } from 'wot-design-uni'
|
import { useToast, useMessage } from 'wot-design-uni'
|
||||||
import SelectUserModal from '@/components/SelectUser/components/SelectUserModal.vue'
|
import SelectUserModal from '@/components/SelectUser/components/SelectUserModal.vue'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'myTask',
|
name: 'myTask',
|
||||||
options: {
|
options: {
|
||||||
styleIsolation: 'shared',
|
styleIsolation: 'shared',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
const toast = useToast()
|
const toast = useToast()
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
@ -96,7 +78,6 @@
|
|||||||
const modalShow = ref(false)
|
const modalShow = ref(false)
|
||||||
const userTask = ref({}) //点击的流程节点
|
const userTask = ref({}) //点击的流程节点
|
||||||
|
|
||||||
|
|
||||||
const getList = () => {
|
const getList = () => {
|
||||||
taskListApi({
|
taskListApi({
|
||||||
pageNo,
|
pageNo,
|
||||||
@ -104,7 +85,7 @@
|
|||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
list.value = [...list.value,...res.result.records];
|
list.value = [...list.value, ...res.result.records];
|
||||||
}
|
}
|
||||||
loading = false
|
loading = false
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
@ -112,56 +93,54 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const entrust = (item)=>{ //委托
|
const entrust = (item) => { //委托
|
||||||
modalShow.value = true;
|
modalShow.value = true;
|
||||||
userTask.value = {};
|
userTask.value = {};
|
||||||
userTask.value = item;
|
userTask.value = item;
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleChange = (data) => {
|
const handleChange = (data) => {
|
||||||
const rowkey = data.map((item) => item.username).join(',')
|
const rowkey = data.map((item) => item.username).join(',')
|
||||||
console.log(rowkey)
|
var params = {
|
||||||
var params = {
|
taskId: userTask.value.id,
|
||||||
taskId:userTask.value.id,
|
taskAssignee: rowkey
|
||||||
taskAssignee:rowkey
|
};//查询条件
|
||||||
};//查询条件
|
taskEntrust(params).then(res => {
|
||||||
taskEntrust(params).then(res=>{
|
if (res.success) {
|
||||||
if(res.success){
|
toast.success(res.message)
|
||||||
toast.success(res.message)
|
uni.redirectTo({
|
||||||
uni.redirectTo({
|
url: './approvalTabbar'
|
||||||
url: './approvalTabbar'
|
});
|
||||||
});
|
} else {
|
||||||
}else{
|
toast.error(res.message)
|
||||||
toast.error(res.message)
|
}
|
||||||
}
|
})
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const goToPage = (item)=>{
|
const goToPage = (item) => {
|
||||||
//判断是否是签收项目,提示是否签收
|
//判断是否是签收项目,提示是否签收
|
||||||
if(item.taskAssigneeName&&item.taskAssigneeName!=''){
|
if (item.taskAssigneeName && item.taskAssigneeName != '') {
|
||||||
console.log(item)
|
|
||||||
//办理任务,直接进入办理页面
|
//办理任务,直接进入办理页面
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:`/pages-process/taskHandle`,
|
url: `/pages-process/taskHandle`,
|
||||||
success:(res) =>{
|
success: (res) => {
|
||||||
res.eventChannel.emit('taskData',JSON.stringify(item))
|
res.eventChannel.emit('taskData', JSON.stringify(item))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
message
|
message
|
||||||
.confirm({
|
.confirm({
|
||||||
msg: '是否签收该任务?',
|
msg: '是否签收该任务?',
|
||||||
title: '确认签收吗',
|
title: '确认签收吗',
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
claim({taskId:item.id}).then((res)=>{
|
claim({ taskId: item.id }).then((res) => {
|
||||||
if(res.success){
|
if (res.success) {
|
||||||
toast.success(res.message)
|
toast.success(res.message)
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: './approvalTabbar'
|
url: './approvalTabbar'
|
||||||
});
|
});
|
||||||
}else{
|
} else {
|
||||||
toast.error(res.message)
|
toast.error(res.message)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -183,7 +162,6 @@
|
|||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
list.value = []
|
list.value = []
|
||||||
pageNo = 1
|
pageNo = 1
|
||||||
@ -214,7 +192,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
::v-deep .wd-card__title-content{
|
|
||||||
|
::v-deep .wd-card__title-content {
|
||||||
border-bottom: 1px solid #efefef;
|
border-bottom: 1px solid #efefef;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
136
src/pages-process/myApplyProcess.vue
Normal file
136
src/pages-process/myApplyProcess.vue
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
<route lang="json5" type="page">
|
||||||
|
{
|
||||||
|
layout: 'default',
|
||||||
|
style: {
|
||||||
|
navigationStyle: 'custom',
|
||||||
|
navigationBarTitleText: '我发起流程',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</route>
|
||||||
|
<template>
|
||||||
|
<PageLayout nav-title="我发起流程">
|
||||||
|
<view class="container">
|
||||||
|
<template v-for="(item, i) in list" :key="i">
|
||||||
|
<wd-card :title="item.bpmBizTitle" title-bold border-radius="8" use-footer-slot>
|
||||||
|
<wd-row class="row">
|
||||||
|
<wd-col :span="6">
|
||||||
|
<text>申请理由:</text>
|
||||||
|
</wd-col>
|
||||||
|
<wd-col :span="18">
|
||||||
|
{{item.bpmBizTitle}}
|
||||||
|
</wd-col>
|
||||||
|
</wd-row>
|
||||||
|
<wd-row class="row">
|
||||||
|
<wd-col :span="6">
|
||||||
|
<text>流程名称:</text>
|
||||||
|
</wd-col>
|
||||||
|
<wd-col :span="18">
|
||||||
|
{{item.prcocessDefinitionName}}
|
||||||
|
</wd-col>
|
||||||
|
</wd-row>
|
||||||
|
<wd-row class="row">
|
||||||
|
<wd-col :span="6">
|
||||||
|
<text>发起人:</text>
|
||||||
|
</wd-col>
|
||||||
|
<wd-col :span="18">
|
||||||
|
{{item.startUserName}}
|
||||||
|
</wd-col>
|
||||||
|
</wd-row>
|
||||||
|
<wd-row class="row">
|
||||||
|
<wd-col :span="6">
|
||||||
|
<text>开始时间:</text>
|
||||||
|
</wd-col>
|
||||||
|
<wd-col :span="18">
|
||||||
|
{{item.startTime}}
|
||||||
|
</wd-col>
|
||||||
|
</wd-row>
|
||||||
|
<wd-row class="row" v-show="item.endTime">
|
||||||
|
<wd-col :span="6">
|
||||||
|
<text>结束时间:</text>
|
||||||
|
</wd-col>
|
||||||
|
<wd-col :span="18">
|
||||||
|
{{item.endTime}}
|
||||||
|
</wd-col>
|
||||||
|
</wd-row>
|
||||||
|
<wd-row style="padding-top: 10px;">
|
||||||
|
<view v-if="!item.endTime">
|
||||||
|
<wd-button @click.stop="callBackProcess(item.processInstanceId)">取回流程</wd-button>
|
||||||
|
</view>
|
||||||
|
</wd-row>
|
||||||
|
</wd-card>
|
||||||
|
</template>
|
||||||
|
</view>
|
||||||
|
</PageLayout>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import {
|
||||||
|
myApplyProcessListApi,
|
||||||
|
callBackProcessApi,
|
||||||
|
} from '@/api/process'
|
||||||
|
import {
|
||||||
|
useToast
|
||||||
|
} from 'wot-design-uni'
|
||||||
|
|
||||||
|
const toast = useToast()
|
||||||
|
let pageNo = 1
|
||||||
|
let pageSize = 10
|
||||||
|
const list = ref([])
|
||||||
|
const taskInfo = ref({})
|
||||||
|
|
||||||
|
const getList = () => {
|
||||||
|
myApplyProcessListApi({
|
||||||
|
pageNo,
|
||||||
|
pageSize
|
||||||
|
}).then((res) => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.success) {
|
||||||
|
list.value = [...list.value, ...res.result.records];
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**流程取回*/
|
||||||
|
const callBackProcess = (id) => {
|
||||||
|
callBackProcessApi({
|
||||||
|
processInstanceId: id
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
list.value = []
|
||||||
|
getList()
|
||||||
|
toast.success(res.message)
|
||||||
|
}else{
|
||||||
|
toast.warning(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
onReachBottom(() => {
|
||||||
|
pageNo++
|
||||||
|
getList()
|
||||||
|
})
|
||||||
|
|
||||||
|
onShow(() => {
|
||||||
|
list.value = []
|
||||||
|
pageNo = 1
|
||||||
|
pageSize = 10
|
||||||
|
getList()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.container {
|
||||||
|
padding: 5px 0 5px;
|
||||||
|
min-height: 100vh;
|
||||||
|
background-color: #f7f7f7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row {
|
||||||
|
color: #666666;
|
||||||
|
padding: 5px 0 5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .wd-card__title-content {
|
||||||
|
border-bottom: 1px solid #efefef;
|
||||||
|
}
|
||||||
|
</style>
|
@ -480,6 +480,15 @@
|
|||||||
"navigationBarTitleText": "流程审批导航"
|
"navigationBarTitleText": "流程审批导航"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "myApplyProcess",
|
||||||
|
"type": "page",
|
||||||
|
"layout": "default",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom",
|
||||||
|
"navigationBarTitleText": "我发起流程"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "taskHandle",
|
"path": "taskHandle",
|
||||||
"type": "page",
|
"type": "page",
|
||||||
|
@ -48,22 +48,13 @@
|
|||||||
</wd-badge>
|
</wd-badge>
|
||||||
</view>
|
</view>
|
||||||
</wd-col>
|
</wd-col>
|
||||||
<wd-col :span="12" @click="goToProcess">
|
<wd-col :span="12" @click="goToMyApplyProcess">
|
||||||
<wd-img :width="50" :height="50"
|
<wd-img :width="50" :height="50"
|
||||||
:src="getFileAccessHttpUrl('https://static.jeecg.com/upload/test/line2_icon2_1595818070168.png')"></wd-img>
|
:src="getFileAccessHttpUrl('https://static.jeecg.com/upload/test/line2_icon2_1595818070168.png')"></wd-img>
|
||||||
<view class="textBox">
|
<view class="textBox">
|
||||||
<wd-text text="我发起流程"></wd-text>
|
<wd-text text="我发起流程"></wd-text>
|
||||||
</view>
|
</view>
|
||||||
</wd-col>
|
</wd-col>
|
||||||
<!-- <wd-col :span="12" v-for="(item, index) in middleApps" :key="index" @click="goToProcess">
|
|
||||||
<wd-img :width="50" :height="50" :src="getFileAccessHttpUrl(item.icon)"></wd-img>
|
|
||||||
<view class="textBox">
|
|
||||||
<wd-badge modelValue="12">
|
|
||||||
<wd-text :text="item.title"></wd-text>
|
|
||||||
</wd-badge>
|
|
||||||
<wd-text :text="item.subTitle"></wd-text>
|
|
||||||
</view>
|
|
||||||
</wd-col> -->
|
|
||||||
</wd-row>
|
</wd-row>
|
||||||
|
|
||||||
<view class="serveBox">
|
<view class="serveBox">
|
||||||
@ -86,15 +77,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {
|
|
||||||
ref
|
|
||||||
} from 'vue'
|
|
||||||
import {
|
import {
|
||||||
getFileAccessHttpUrl
|
getFileAccessHttpUrl
|
||||||
} from '@/common/uitls'
|
} from '@/common/uitls'
|
||||||
import {
|
|
||||||
onLoad
|
|
||||||
} from '@dcloudio/uni-app'
|
|
||||||
import {
|
import {
|
||||||
useToast
|
useToast
|
||||||
} from 'wot-design-uni'
|
} from 'wot-design-uni'
|
||||||
@ -154,6 +139,12 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const goToMyApplyProcess = () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages-process/myApplyProcess'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const goPageMore = (page) => {
|
const goPageMore = (page) => {
|
||||||
router.replace({
|
router.replace({
|
||||||
|
1
src/types/uni-pages.d.ts
vendored
1
src/types/uni-pages.d.ts
vendored
@ -53,6 +53,7 @@ interface NavigateToOptions {
|
|||||||
"/pages-integrated/duty/index" |
|
"/pages-integrated/duty/index" |
|
||||||
"/pages-politics/health/add" |
|
"/pages-politics/health/add" |
|
||||||
"/pages-process/approvalTabbar" |
|
"/pages-process/approvalTabbar" |
|
||||||
|
"/pages-process/myApplyProcess" |
|
||||||
"/pages-process/taskHandle" |
|
"/pages-process/taskHandle" |
|
||||||
"/pages-bpm/leaveApplication/index";
|
"/pages-bpm/leaveApplication/index";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user