2025-05-16 07:04:50 +00:00
|
|
|
|
<route lang="json5" type="page">
|
|
|
|
|
{
|
|
|
|
|
layout: 'default',
|
|
|
|
|
style: {
|
|
|
|
|
navigationStyle: 'custom',
|
|
|
|
|
navigationBarTitleText: '任务处理',
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
</route>
|
|
|
|
|
<template>
|
2025-05-27 09:31:39 +00:00
|
|
|
|
<PageLayout :nav-title="type=='history'?'历史任务':'流程办理'">
|
2025-05-19 02:13:01 +00:00
|
|
|
|
<wd-tabs v-model="tab" color="#39b54a" autoLineWidth>
|
2025-05-28 06:52:04 +00:00
|
|
|
|
<wd-tab title="单据">
|
|
|
|
|
<DynamicLink ref="linkRef" :path="path" :formData="formData"></DynamicLink>
|
|
|
|
|
</wd-tab>
|
2025-05-27 09:31:39 +00:00
|
|
|
|
<wd-tab title="任务处理" v-if="type!='history'">
|
2025-05-28 06:52:04 +00:00
|
|
|
|
<taskDeal :formData="formData" :useData="useData"></taskDeal>
|
2025-05-16 07:04:50 +00:00
|
|
|
|
</wd-tab>
|
|
|
|
|
<wd-tab title="流程图">
|
2025-05-19 02:13:01 +00:00
|
|
|
|
<view class="container">
|
2025-05-28 06:52:04 +00:00
|
|
|
|
<view
|
|
|
|
|
style="margin-bottom: 20px;height: 400px;overflow: hidden;overflow-y: auto;overflow-x: auto;background-color: #fff;">
|
2025-05-19 02:13:01 +00:00
|
|
|
|
<img :src="imgPath" style="border:2px;cursor:hand;" alt="流程图" usemap="#planetmap">
|
2025-05-28 06:52:04 +00:00
|
|
|
|
<!-- <map name="planetmap">
|
2025-05-19 02:13:01 +00:00
|
|
|
|
<template v-for="(item, key, index) in nodePositionInfo.positionList">
|
|
|
|
|
<area shape="rect" :coords="item.coords" title="Venus" @touchstart="showNodeInfo(nodePositionInfo.hisTasks,item.id)">
|
|
|
|
|
</template>
|
|
|
|
|
</map> -->
|
|
|
|
|
</view>
|
|
|
|
|
<wd-card title="流程历史追踪" type="rectangle">
|
|
|
|
|
<wd-steps :active="completedNum" vertical>
|
2025-05-28 06:52:04 +00:00
|
|
|
|
<wd-step v-for="item in dataSource">
|
|
|
|
|
<template #title>
|
|
|
|
|
<view
|
|
|
|
|
:class="{'content':true, 'shadow-blur':true, 'text-sm':true,'bg-green':item.endTime,'bg-gray':!item.endTime}">
|
|
|
|
|
<text>流程节点:{{item.name=='start'?'开始':item.name=='end'?'结束':item.name}}<br></text>
|
|
|
|
|
<text>负责人:{{item.assigneeName}}<br></text>
|
|
|
|
|
<text>开始时间:{{item.startTime}}<br></text>
|
|
|
|
|
<text v-if="item.endTime">结束时间:{{item.endTime}}<br></text>
|
|
|
|
|
<text>{{item.deleteReason}}</text>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
</wd-step>
|
2025-05-19 02:13:01 +00:00
|
|
|
|
</wd-steps>
|
|
|
|
|
</wd-card>
|
|
|
|
|
</view>
|
2025-05-16 07:04:50 +00:00
|
|
|
|
</wd-tab>
|
|
|
|
|
</wd-tabs>
|
2025-05-16 08:04:30 +00:00
|
|
|
|
</PageLayout>
|
2025-05-16 07:04:50 +00:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import {
|
2025-05-19 02:13:01 +00:00
|
|
|
|
ref,
|
|
|
|
|
computed
|
2025-05-16 07:04:50 +00:00
|
|
|
|
} from 'vue'
|
|
|
|
|
import {
|
|
|
|
|
onLoad,
|
|
|
|
|
onShow,
|
|
|
|
|
onReachBottom,
|
|
|
|
|
onPullDownRefresh
|
|
|
|
|
} from '@dcloudio/uni-app';
|
|
|
|
|
import { useToast, useMessage } from 'wot-design-uni'
|
|
|
|
|
import {
|
|
|
|
|
useAppStore
|
|
|
|
|
} from '@/store'
|
2025-05-16 08:04:30 +00:00
|
|
|
|
import {
|
|
|
|
|
getProcessNodeInfo,
|
2025-05-19 02:13:01 +00:00
|
|
|
|
getHisProcessNodeInfo,
|
|
|
|
|
getNodePositionInfo,
|
|
|
|
|
getHisInfo
|
2025-05-16 08:04:30 +00:00
|
|
|
|
} from '@/api/process'
|
|
|
|
|
import {
|
|
|
|
|
getEnvBaseUrl
|
|
|
|
|
} from '@/utils/index'
|
|
|
|
|
import { json } from 'stream/consumers';
|
2025-05-19 02:13:01 +00:00
|
|
|
|
import qs from 'qs';
|
2025-05-23 01:48:28 +00:00
|
|
|
|
import { getCurrentInstance } from 'vue'
|
|
|
|
|
import DynamicLink from './components/DynamicLink.vue'
|
2025-05-26 07:00:08 +00:00
|
|
|
|
import taskDeal from './components/taskDeal.vue'
|
2025-05-28 06:52:04 +00:00
|
|
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance()
|
2025-05-27 09:31:39 +00:00
|
|
|
|
const type = ref('');
|
2025-05-28 06:52:04 +00:00
|
|
|
|
|
2025-05-16 08:04:30 +00:00
|
|
|
|
const formData = ref({})
|
2025-05-28 06:52:04 +00:00
|
|
|
|
const useData = ref({})
|
2025-05-19 02:13:01 +00:00
|
|
|
|
const nodePositionInfo = ref({})
|
|
|
|
|
const dataSource = ref([])
|
2025-05-16 08:04:30 +00:00
|
|
|
|
const path = ref('') //url路径
|
2025-05-16 07:04:50 +00:00
|
|
|
|
const appStore = useAppStore();
|
|
|
|
|
const tab = ref(0)
|
2025-05-19 02:13:01 +00:00
|
|
|
|
const completedNum = ref(0);
|
2025-05-16 07:04:50 +00:00
|
|
|
|
|
|
|
|
|
const handleClickLeft = () => {
|
|
|
|
|
uni.navigateBack()
|
|
|
|
|
}
|
2025-05-28 06:52:04 +00:00
|
|
|
|
|
|
|
|
|
const showNodeInfo = (data, taskId) => {
|
|
|
|
|
// this.$refs.nodeInfoModel.close();
|
|
|
|
|
// this.$refs.nodeInfoModel.showInfo(data,taskId);
|
2025-05-19 02:13:01 +00:00
|
|
|
|
}
|
2025-05-16 07:04:50 +00:00
|
|
|
|
|
|
|
|
|
onLoad((options) => {
|
2025-05-27 09:31:39 +00:00
|
|
|
|
type.value = '';
|
2025-05-28 06:52:04 +00:00
|
|
|
|
if (options.data) {
|
2025-05-27 09:31:39 +00:00
|
|
|
|
type.value = options.data
|
|
|
|
|
}
|
2025-05-23 01:48:28 +00:00
|
|
|
|
const eventChannel = proxy.getOpenerEventChannel();
|
2025-05-28 06:52:04 +00:00
|
|
|
|
eventChannel.on('taskData', (params) => {
|
|
|
|
|
useData.value = JSON.parse(params);
|
|
|
|
|
if (type.value != 'history') {
|
|
|
|
|
getProcessNodeInfo({ taskId: useData.value.id }).then(res => {
|
|
|
|
|
if (res.success) {
|
2025-05-27 09:31:39 +00:00
|
|
|
|
let data = {
|
2025-05-28 06:52:04 +00:00
|
|
|
|
dataId: res.result.dataId,
|
|
|
|
|
taskId: useData.value.id,
|
|
|
|
|
taskDefKey: useData.value.taskId,
|
|
|
|
|
procInsId: useData.value.processInstanceId,
|
|
|
|
|
tableName: res.result.tableName,
|
|
|
|
|
permissionList: res.result.permissionList,
|
|
|
|
|
vars: res.result.records,
|
2025-05-27 09:31:39 +00:00
|
|
|
|
}
|
|
|
|
|
formData.value = data;//流程信息
|
|
|
|
|
let tempFormUrl = res.result.formUrlMobile;
|
|
|
|
|
path.value = tempFormUrl; //url路径
|
2025-05-23 01:48:28 +00:00
|
|
|
|
}
|
2025-05-27 09:31:39 +00:00
|
|
|
|
})
|
2025-05-28 06:52:04 +00:00
|
|
|
|
} else {
|
|
|
|
|
getHisProcessNodeInfo({ procInstId: useData.value.processInstanceId }).then(res => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
let data = {
|
|
|
|
|
dataId: res.result.dataId,
|
|
|
|
|
taskId: useData.value.id,
|
|
|
|
|
taskDefKey: useData.value.taskId,
|
|
|
|
|
procInsId: useData.value.processInstanceId,
|
|
|
|
|
tableName: res.result.tableName,
|
|
|
|
|
vars: res.result.records
|
2025-05-27 09:31:39 +00:00
|
|
|
|
}
|
|
|
|
|
formData.value = data;//流程信息
|
|
|
|
|
console.log(res)
|
|
|
|
|
let tempFormUrl = res.result.formUrlMobile;
|
|
|
|
|
path.value = tempFormUrl; //url路径
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-28 06:52:04 +00:00
|
|
|
|
// getNodePositionInfo({processInstanceId:useData.value.processInstanceId}).then((res)=>{
|
2025-05-27 09:31:39 +00:00
|
|
|
|
// if (res.success) {
|
|
|
|
|
// nodePositionInfo.value = res.result
|
|
|
|
|
// }
|
|
|
|
|
// })
|
2025-05-28 06:52:04 +00:00
|
|
|
|
|
|
|
|
|
getHisInfo({ processInstanceId: useData.value.processInstanceId }).then((res) => {
|
2025-05-23 01:48:28 +00:00
|
|
|
|
if (res.success) {
|
2025-05-28 06:52:04 +00:00
|
|
|
|
dataSource.value = res.result.records
|
|
|
|
|
//查找最后一个,结束时间
|
|
|
|
|
completedNum.value = res.result.records.length
|
|
|
|
|
res.result.records.forEach((item, index) => {
|
|
|
|
|
if (item.endTime) completedNum.value = index + 1
|
|
|
|
|
})
|
2025-05-23 01:48:28 +00:00
|
|
|
|
}
|
|
|
|
|
})
|
2025-05-19 02:13:01 +00:00
|
|
|
|
})
|
2025-05-23 01:48:28 +00:00
|
|
|
|
|
2025-05-16 07:04:50 +00:00
|
|
|
|
})
|
2025-05-28 06:52:04 +00:00
|
|
|
|
|
|
|
|
|
const imgPath = computed(() => {
|
2025-05-19 02:13:01 +00:00
|
|
|
|
var params = qs.stringify({
|
2025-05-28 06:52:04 +00:00
|
|
|
|
'processInstanceId': formData.value.procInsId
|
2025-05-19 02:13:01 +00:00
|
|
|
|
})
|
|
|
|
|
let url = `${getEnvBaseUrl()}/act/task/traceImage?${params}`;
|
|
|
|
|
return url;
|
|
|
|
|
})
|
2025-05-16 07:04:50 +00:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2025-05-28 06:52:04 +00:00
|
|
|
|
::v-deep .wd-tabs__line {
|
2025-05-16 07:04:50 +00:00
|
|
|
|
background: #39b54a;
|
|
|
|
|
}
|
2025-05-28 06:52:04 +00:00
|
|
|
|
|
|
|
|
|
::v-deep .wd-step.is-finished .wd-step__icon-outer {
|
2025-05-19 02:13:01 +00:00
|
|
|
|
border-color: #39b54a;
|
|
|
|
|
color: #fff;
|
|
|
|
|
background-color: #39b54a;
|
|
|
|
|
}
|
2025-05-28 06:52:04 +00:00
|
|
|
|
|
|
|
|
|
::v-deep .wd-step.is-process .wd-step__icon-outer {
|
2025-05-19 02:13:01 +00:00
|
|
|
|
border-color: #f0f0f0;
|
|
|
|
|
color: #fff;
|
|
|
|
|
background-color: #f0f0f0;
|
|
|
|
|
}
|
2025-05-28 06:52:04 +00:00
|
|
|
|
|
|
|
|
|
|
2025-05-19 02:13:01 +00:00
|
|
|
|
.container {
|
|
|
|
|
padding: 5px 0 5px;
|
|
|
|
|
min-height: 100vh;
|
|
|
|
|
background-color: #f7f7f7;
|
|
|
|
|
}
|
2025-05-28 06:52:04 +00:00
|
|
|
|
|
2025-05-19 02:13:01 +00:00
|
|
|
|
.bg-green {
|
2025-05-28 06:52:04 +00:00
|
|
|
|
background-color: #39b54a;
|
|
|
|
|
color: #fff;
|
2025-05-19 02:13:01 +00:00
|
|
|
|
}
|
2025-05-28 06:52:04 +00:00
|
|
|
|
|
2025-05-20 02:06:35 +00:00
|
|
|
|
.bg-green {
|
2025-05-28 06:52:04 +00:00
|
|
|
|
background-color: #39b54a;
|
|
|
|
|
color: #fff;
|
2025-05-20 02:06:35 +00:00
|
|
|
|
}
|
2025-05-28 06:52:04 +00:00
|
|
|
|
|
2025-05-20 02:06:35 +00:00
|
|
|
|
.bg-gray {
|
2025-05-28 06:52:04 +00:00
|
|
|
|
background-color: #f0f0f0;
|
|
|
|
|
color: #333;
|
2025-05-20 02:06:35 +00:00
|
|
|
|
}
|
2025-05-28 06:52:04 +00:00
|
|
|
|
|
|
|
|
|
.content {
|
2025-05-19 02:13:01 +00:00
|
|
|
|
padding: 5px 25px 5px 15px;
|
|
|
|
|
}
|
2025-05-28 06:52:04 +00:00
|
|
|
|
|
|
|
|
|
.shadow-blur {
|
2025-05-19 02:13:01 +00:00
|
|
|
|
position: relative;
|
|
|
|
|
}
|
2025-05-28 06:52:04 +00:00
|
|
|
|
|
2025-05-19 02:13:01 +00:00
|
|
|
|
.shadow-blur::before {
|
2025-05-28 06:52:04 +00:00
|
|
|
|
content: "";
|
|
|
|
|
display: block;
|
|
|
|
|
background: inherit;
|
|
|
|
|
-webkit-filter: blur(5px);
|
|
|
|
|
filter: blur(5px);
|
|
|
|
|
position: absolute;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
top: 5px;
|
|
|
|
|
left: 5px;
|
|
|
|
|
z-index: -1;
|
|
|
|
|
opacity: .4;
|
|
|
|
|
-webkit-transform-origin: 0 0;
|
|
|
|
|
transform-origin: 0 0;
|
|
|
|
|
border-radius: inherit;
|
|
|
|
|
-webkit-transform: scale(1);
|
|
|
|
|
transform: scale(1);
|
2025-05-19 02:13:01 +00:00
|
|
|
|
}
|
2025-05-28 06:52:04 +00:00
|
|
|
|
|
|
|
|
|
.text-sm {
|
2025-05-19 02:13:01 +00:00
|
|
|
|
font-size: 12px;
|
|
|
|
|
}
|
2025-05-16 07:04:50 +00:00
|
|
|
|
</style>
|