Merge remote-tracking branch 'remotes/origin/master' into minJeecg

# Conflicts:
#	src/api/process/index.ts
This commit is contained in:
lagos 2025-05-27 17:32:23 +08:00
commit ca6c08b8c6
6 changed files with 222 additions and 91 deletions

View File

@ -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
})
}

View File

@ -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,31 +52,13 @@
</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'
@ -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,
@ -120,7 +101,6 @@
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
@ -140,7 +120,6 @@
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`,
@ -183,7 +162,6 @@
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}) })
onShow(() => { onShow(() => {
list.value = [] list.value = []
pageNo = 1 pageNo = 1
@ -214,6 +192,7 @@
} }
} }
} }
::v-deep .wd-card__title-content { ::v-deep .wd-card__title-content {
border-bottom: 1px solid #efefef; border-bottom: 1px solid #efefef;
} }

View 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>

View File

@ -480,6 +480,15 @@
"navigationBarTitleText": "流程审批导航" "navigationBarTitleText": "流程审批导航"
} }
}, },
{
"path": "myApplyProcess",
"type": "page",
"layout": "default",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "我发起流程"
}
},
{ {
"path": "taskHandle", "path": "taskHandle",
"type": "page", "type": "page",

View File

@ -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({

View File

@ -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";
} }