Merge branch 'minJeecg' into 'master'
Min jeecg See merge request cxcxt/jeecguniapp!8
This commit is contained in:
commit
229d52db47
@ -42,15 +42,6 @@ export function getProcessNodeInfo(config : Object) { // 获取节点信息
|
|||||||
data: config
|
data: config
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getHisProcessNodeInfo(config : Object) { // 获取历史节点信息
|
|
||||||
return http({
|
|
||||||
url: '/process/extActProcessNode/getHisProcessNodeInfo',
|
|
||||||
method: 'GET',
|
|
||||||
data: config
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getNodePositionInfo(config : Object) {
|
export function getNodePositionInfo(config : Object) {
|
||||||
return http({
|
return http({
|
||||||
url: '/act/task/getNodePositionInfo',
|
url: '/act/task/getNodePositionInfo',
|
||||||
@ -76,14 +67,20 @@ export function taskEntrust(config : Object) { //委托
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getProcessTaskTransInfo(config : Object) { //获取当前流程节点ID
|
export function getProcessTaskTransInfo(config : Object) { //获取当前流程节点信息
|
||||||
return http({
|
return http({
|
||||||
url: '/act/task/getProcessTaskTransInfo',
|
url: '/act/task/getProcessTaskTransInfo',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
data: config
|
data: config
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function getHisProcessNodeInfo(config : Object) { //获取当前流程节点历史信息
|
||||||
|
return http({
|
||||||
|
url: '/process/extActProcessNode/getHisProcessNodeInfo',
|
||||||
|
method: 'GET',
|
||||||
|
data: config
|
||||||
|
})
|
||||||
|
}
|
||||||
export function processComplete(config : Object) { //流程任务完成
|
export function processComplete(config : Object) { //流程任务完成
|
||||||
return http({
|
return http({
|
||||||
url: '/act/task/processComplete',
|
url: '/act/task/processComplete',
|
||||||
@ -92,6 +89,13 @@ export function processComplete(config : Object) { //流程任务完成
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function histTasks(config : Object) { //流程任务完成
|
||||||
|
return http({
|
||||||
|
url: '/act/task/taskHistoryList',
|
||||||
|
method: 'GET',
|
||||||
|
data: config
|
||||||
|
})
|
||||||
|
}
|
||||||
export function myApplyProcessListApi(config : object) { // 本人发起列表
|
export function myApplyProcessListApi(config : object) { // 本人发起列表
|
||||||
return http({
|
return http({
|
||||||
url: '/act/task/myApplyProcessList',
|
url: '/act/task/myApplyProcessList',
|
||||||
@ -107,4 +111,3 @@ export function callBackProcessApi(config : object) { // 取回流程
|
|||||||
data: config
|
data: config
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<myTask></myTask>
|
<myTask></myTask>
|
||||||
</wd-tab>
|
</wd-tab>
|
||||||
<wd-tab title="历史任务">
|
<wd-tab title="历史任务">
|
||||||
<view class="content">内容1</view>
|
<historicalTasks></historicalTasks>
|
||||||
</wd-tab>
|
</wd-tab>
|
||||||
</wd-tabs>
|
</wd-tabs>
|
||||||
</PageLayout>
|
</PageLayout>
|
||||||
@ -32,6 +32,7 @@
|
|||||||
onShow
|
onShow
|
||||||
} from '@dcloudio/uni-app';
|
} from '@dcloudio/uni-app';
|
||||||
import myTask from './components/myTask.vue'
|
import myTask from './components/myTask.vue'
|
||||||
|
import historicalTasks from './components/historicalTasks.vue'
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
const tab = ref(0)
|
const tab = ref(0)
|
||||||
|
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
<!-- component标签可以变换组件 -->
|
<!-- component标签可以变换组件 -->
|
||||||
<template>
|
<template>
|
||||||
|
<view>
|
||||||
<component :is="asyncComponent" :formData="formData" :history="history" :activeKey="activeKey" v-if="asyncComponent"
|
<component :is="asyncComponent" :formData="formData" :history="history" :activeKey="activeKey" v-if="asyncComponent"
|
||||||
@getStampSuc="getStampSuccess"></component>
|
@getStampSuc="getStampSuccess"></component>
|
||||||
|
<view v-else>该模块暂未建立审批页面!</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onMounted, computed, watch, nextTick } from 'vue';
|
import { ref, reactive, onMounted, computed, watch, nextTick } from 'vue';
|
||||||
@ -37,7 +40,13 @@
|
|||||||
})
|
})
|
||||||
// 监听 option 变化
|
// 监听 option 变化
|
||||||
watch(() => props.path, (newVal) => {
|
watch(() => props.path, (newVal) => {
|
||||||
if (newVal) compName.value = newVal;
|
if (newVal){
|
||||||
|
compName.value = newVal;
|
||||||
|
if(newVal.indexOf('index.vue')==-1){
|
||||||
|
compName.value = newVal+'/index'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log(compName.value)
|
||||||
//动态加载页面
|
//动态加载页面
|
||||||
const comp = modules[`/src/pages-bpm/${compName.value}.vue`]
|
const comp = modules[`/src/pages-bpm/${compName.value}.vue`]
|
||||||
comp().then((myModule) => {
|
comp().then((myModule) => {
|
||||||
|
191
src/pages-process/components/historicalTasks.vue
Normal file
191
src/pages-process/components/historicalTasks.vue
Normal file
@ -0,0 +1,191 @@
|
|||||||
|
<template>
|
||||||
|
|
||||||
|
<view class="container">
|
||||||
|
<wd-loading v-if="loading && pageNo === 1" class="loading-tip">加载中...</wd-loading>
|
||||||
|
<template v-for="(item, i) in list" :key="i">
|
||||||
|
<wd-card :title="item.bpmBizTitle" title-bold border-radius="8" use-footer-slot @click="goToPage(item)">
|
||||||
|
<view class="card-content">
|
||||||
|
<wd-row style="color: #666666;">
|
||||||
|
<wd-col :span="6">
|
||||||
|
<text>当前环节:</text>
|
||||||
|
</wd-col>
|
||||||
|
<wd-col :span="18">
|
||||||
|
{{item.taskName}}
|
||||||
|
</wd-col>
|
||||||
|
</wd-row>
|
||||||
|
<wd-row style="color: #666666;">
|
||||||
|
<wd-col :span="6">
|
||||||
|
<text>流程名称:</text>
|
||||||
|
</wd-col>
|
||||||
|
<wd-col :span="18">
|
||||||
|
{{item.processDefinitionName}}
|
||||||
|
</wd-col>
|
||||||
|
</wd-row>
|
||||||
|
<wd-row style="color: #666666;">
|
||||||
|
<wd-col :span="6">
|
||||||
|
<text>发起人:</text>
|
||||||
|
</wd-col>
|
||||||
|
<wd-col :span="18">
|
||||||
|
{{item.processApplyUserName}}
|
||||||
|
</wd-col>
|
||||||
|
</wd-row>
|
||||||
|
<wd-row style="color: #666666;">
|
||||||
|
<wd-col :span="6">
|
||||||
|
<text>开始时间:</text>
|
||||||
|
</wd-col>
|
||||||
|
<wd-col :span="18">
|
||||||
|
{{item.taskBeginTime?item.taskBeginTime.substring(0,10):''}}
|
||||||
|
</wd-col>
|
||||||
|
</wd-row>
|
||||||
|
<wd-row style="padding-bottom: 2px;color: #666666;">
|
||||||
|
<wd-col :span="6">
|
||||||
|
<text>结束时间:</text>
|
||||||
|
</wd-col>
|
||||||
|
<wd-col :span="18">
|
||||||
|
{{item.taskEndTime?item.taskEndTime.substring(0,10):''}}
|
||||||
|
</wd-col>
|
||||||
|
</wd-row>
|
||||||
|
</view>
|
||||||
|
</wd-card>
|
||||||
|
</template>
|
||||||
|
<view class="load-more" v-if="loading && pageNo > 1">
|
||||||
|
<wd-loading size="16px">正在加载...</wd-loading>
|
||||||
|
</view>
|
||||||
|
<wd-message-box></wd-message-box>
|
||||||
|
<wd-toast></wd-toast>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { taskListApi,claim,histTasks } from '@/api/process'
|
||||||
|
import {
|
||||||
|
ref
|
||||||
|
} from 'vue'
|
||||||
|
import {
|
||||||
|
onLoad,
|
||||||
|
onShow,
|
||||||
|
onReachBottom,
|
||||||
|
onPullDownRefresh
|
||||||
|
} from '@dcloudio/uni-app';
|
||||||
|
import { useToast, useMessage } from 'wot-design-uni'
|
||||||
|
import SelectUserModal from '@/components/SelectUser/components/SelectUserModal.vue'
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: 'historicalTasks',
|
||||||
|
options: {
|
||||||
|
styleIsolation: 'shared',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
const toast = useToast()
|
||||||
|
const message = useMessage()
|
||||||
|
let pageNo = 1
|
||||||
|
let pageSize = 10
|
||||||
|
let loading = false
|
||||||
|
const list = ref([])
|
||||||
|
const user = ref('')
|
||||||
|
const modalShow = ref(false)
|
||||||
|
const userTask = ref({}) //点击的流程节点
|
||||||
|
|
||||||
|
|
||||||
|
const getList = () => {
|
||||||
|
histTasks({
|
||||||
|
pageNo,
|
||||||
|
pageSize
|
||||||
|
}).then((res) => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.success) {
|
||||||
|
list.value = [...list.value,...res.result.records];
|
||||||
|
}
|
||||||
|
loading = false
|
||||||
|
}).catch((err) => {
|
||||||
|
loading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const entrust = (item)=>{ //委托
|
||||||
|
modalShow.value = true;
|
||||||
|
userTask.value = {};
|
||||||
|
userTask.value = item;
|
||||||
|
}
|
||||||
|
|
||||||
|
const goToPage = (item)=>{
|
||||||
|
//判断是否是签收项目,提示是否签收
|
||||||
|
if(item.taskAssigneeName&&item.taskAssigneeName!=''){
|
||||||
|
console.log(item)
|
||||||
|
//办理任务,直接进入办理页面
|
||||||
|
uni.navigateTo({
|
||||||
|
url:`/pages-process/taskHandle?data=history`,
|
||||||
|
success:(res) =>{
|
||||||
|
res.eventChannel.emit('taskData',JSON.stringify(item))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
message
|
||||||
|
.confirm({
|
||||||
|
msg: '是否签收该任务?',
|
||||||
|
title: '确认签收吗',
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
claim({taskId:item.id}).then((res)=>{
|
||||||
|
if(res.success){
|
||||||
|
toast.success(res.message)
|
||||||
|
uni.redirectTo({
|
||||||
|
url: './approvalTabbar'
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
toast.error(res.message)
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onReachBottom(() => {
|
||||||
|
if (loading) return
|
||||||
|
pageNo++
|
||||||
|
getList()
|
||||||
|
})
|
||||||
|
|
||||||
|
onPullDownRefresh(() => {
|
||||||
|
pageNo = 1
|
||||||
|
list.value = []
|
||||||
|
getList()
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
onShow(() => {
|
||||||
|
list.value = []
|
||||||
|
pageNo = 1
|
||||||
|
pageSize = 10
|
||||||
|
loading = false
|
||||||
|
getList()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.container {
|
||||||
|
padding: 5px 0 5px;
|
||||||
|
min-height: 100vh;
|
||||||
|
background-color: #f7f7f7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-content {
|
||||||
|
padding: 8px 0;
|
||||||
|
|
||||||
|
.meta-info {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #666;
|
||||||
|
|
||||||
|
.meta-text {
|
||||||
|
margin-left: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
::v-deep .wd-card__title-content{
|
||||||
|
border-bottom: 1px solid #efefef;
|
||||||
|
}
|
||||||
|
</style>
|
@ -403,7 +403,7 @@
|
|||||||
model.fileList = JSON.stringify(fileListTemp.value)
|
model.fileList = JSON.stringify(fileListTemp.value)
|
||||||
processComplete(model.value).then(res => {
|
processComplete(model.value).then(res => {
|
||||||
if (res.success) {//跳转页面或加载下一个任务
|
if (res.success) {//跳转页面或加载下一个任务
|
||||||
toast.success("委托成功!")
|
toast.success(res.message)
|
||||||
setTimeout(() => { //延迟0.5s
|
setTimeout(() => { //延迟0.5s
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
}, 1000)
|
}, 1000)
|
||||||
|
@ -8,12 +8,12 @@
|
|||||||
}
|
}
|
||||||
</route>
|
</route>
|
||||||
<template>
|
<template>
|
||||||
<PageLayout nav-title="流程办理">
|
<PageLayout :nav-title="type=='history'?'历史任务':'流程办理'">
|
||||||
<wd-tabs v-model="tab" color="#39b54a" autoLineWidth>
|
<wd-tabs v-model="tab" color="#39b54a" autoLineWidth>
|
||||||
<wd-tab title="单据">
|
<wd-tab title="单据">
|
||||||
<DynamicLink ref="linkRef" :path="path" :formData="formData" ></DynamicLink>
|
<DynamicLink ref="linkRef" :path="path" :formData="formData" ></DynamicLink>
|
||||||
</wd-tab>
|
</wd-tab>
|
||||||
<wd-tab title="任务处理">
|
<wd-tab title="任务处理" v-if="type!='history'">
|
||||||
<taskDeal :formData="formData"></taskDeal>
|
<taskDeal :formData="formData"></taskDeal>
|
||||||
</wd-tab>
|
</wd-tab>
|
||||||
<wd-tab title="流程图">
|
<wd-tab title="流程图">
|
||||||
@ -31,7 +31,7 @@
|
|||||||
<wd-step v-for="item in dataSource" >
|
<wd-step v-for="item in dataSource" >
|
||||||
<template #title>
|
<template #title>
|
||||||
<view :class="{'content':true, 'shadow-blur':true, 'text-sm':true,'bg-green':item.endTime,'bg-gray':!item.endTime}">
|
<view :class="{'content':true, 'shadow-blur':true, 'text-sm':true,'bg-green':item.endTime,'bg-gray':!item.endTime}">
|
||||||
<text>流程节点:{{item.name=='start'?'开始':item.name}}<br></text>
|
<text>流程节点:{{item.name=='start'?'开始':item.name=='end'?'结束':item.name}}<br></text>
|
||||||
<text>负责人:{{item.assigneeName}}<br></text>
|
<text>负责人:{{item.assigneeName}}<br></text>
|
||||||
<text>开始时间:{{item.startTime}}<br></text>
|
<text>开始时间:{{item.startTime}}<br></text>
|
||||||
<text v-if="item.endTime">结束时间:{{item.endTime}}<br></text>
|
<text v-if="item.endTime">结束时间:{{item.endTime}}<br></text>
|
||||||
@ -78,7 +78,7 @@
|
|||||||
import taskDeal from './components/taskDeal.vue'
|
import taskDeal from './components/taskDeal.vue'
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
|
const type = ref('');
|
||||||
|
|
||||||
const formData = ref({})
|
const formData = ref({})
|
||||||
const nodePositionInfo = ref({})
|
const nodePositionInfo = ref({})
|
||||||
@ -99,9 +99,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
|
console.log(options)
|
||||||
|
type.value = '';
|
||||||
|
if(options.data){
|
||||||
|
type.value = options.data
|
||||||
|
}
|
||||||
const eventChannel = proxy.getOpenerEventChannel();
|
const eventChannel = proxy.getOpenerEventChannel();
|
||||||
eventChannel.on('taskData',(params)=>{
|
eventChannel.on('taskData',(params)=>{
|
||||||
let useData = JSON.parse(params);
|
let useData = JSON.parse(params);
|
||||||
|
if(type.value!='history'){
|
||||||
getProcessNodeInfo({taskId:useData.id}).then(res=>{
|
getProcessNodeInfo({taskId:useData.id}).then(res=>{
|
||||||
if(res.success){
|
if(res.success){
|
||||||
let data = {
|
let data = {
|
||||||
@ -120,11 +126,31 @@
|
|||||||
path.value = tempFormUrl; //url路径
|
path.value = tempFormUrl; //url路径
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
getNodePositionInfo({processInstanceId:useData.processInstanceId}).then((res)=>{
|
}else{
|
||||||
|
getHisProcessNodeInfo({procInstId:useData.processInstanceId}).then(res=>{
|
||||||
if(res.success){
|
if(res.success){
|
||||||
nodePositionInfo.value = res.result
|
let data = {
|
||||||
|
dataId:res.result.dataId,
|
||||||
|
taskId:useData.id,
|
||||||
|
taskDefKey:useData.taskId,
|
||||||
|
procInsId:useData.processInstanceId,
|
||||||
|
tableName:res.result.tableName,
|
||||||
|
vars:res.result.records
|
||||||
}
|
}
|
||||||
|
formData.value = data;//流程信息
|
||||||
|
console.log(res)
|
||||||
|
let tempFormUrl = res.result.formUrlMobile;
|
||||||
|
path.value = tempFormUrl; //url路径
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// getNodePositionInfo({processInstanceId:useData.processInstanceId}).then((res)=>{
|
||||||
|
// if (res.success) {
|
||||||
|
// nodePositionInfo.value = res.result
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
|
||||||
getHisInfo({processInstanceId:useData.processInstanceId}).then((res)=>{
|
getHisInfo({processInstanceId:useData.processInstanceId}).then((res)=>{
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
Loading…
Reference in New Issue
Block a user