领导审批不同意后短信通知
This commit is contained in:
parent
3cefc4add1
commit
77c86f3a8f
2
env/.env.development
vendored
2
env/.env.development
vendored
@ -4,5 +4,5 @@ NODE_ENV = 'development'
|
||||
VITE_DELETE_CONSOLE = false
|
||||
# 是否开启sourcemap
|
||||
VITE_SHOW_SOURCEMAP = true
|
||||
VITE_SERVER_BASEURL = 'http://10.75.15.247:8080/jeecg-boot'
|
||||
VITE_SERVER_BASEURL = 'http://10.75.15.249:8080/jeecg-boot'
|
||||
#VITE_SERVER_BASEURL = 'https://36.112.48.190/jeecg-boot'
|
@ -110,4 +110,12 @@ export function callBackProcessApi(config : object) { // 取回流程
|
||||
method: 'PUT',
|
||||
data: config
|
||||
})
|
||||
}
|
||||
|
||||
export function sendMessageApi(config : object) { // 短信通知
|
||||
return http({
|
||||
url: '/myAct/processInstance/sendMessage',
|
||||
method: 'GET',
|
||||
data: config
|
||||
})
|
||||
}
|
@ -74,8 +74,7 @@
|
||||
<label class="uni-list-cell uni-list-cell-pd uni-label-pointer">
|
||||
<!-- 点击的文字 -->
|
||||
<radio value="1" style="transform: scale(0.7);" :checked="true"></radio>
|
||||
|
||||
<view class="margin-left-sm text-sm">同意</view>
|
||||
<view class="margin-left-sm text-sm">同意</view>
|
||||
</label>
|
||||
<label class="uni-list-cell uni-list-cell-pd uni-label-pointer" v-if="resultObj.histListSize>0">
|
||||
<!-- 点击的文字 -->
|
||||
@ -195,7 +194,7 @@
|
||||
import { getFileAccessHttpUrl } from '@/common/uitls'
|
||||
import { useQueue } from 'wot-design-uni'
|
||||
import Mupload from '@/components/Mupload/Mupload.vue'
|
||||
import { getProcessTaskTransInfo, processComplete, taskEntrust } from '@/api/process'
|
||||
import { getProcessTaskTransInfo, processComplete, taskEntrust, callBackProcessApi, sendMessageApi } from '@/api/process'
|
||||
import { useToast, useMessage, useNotify, dayjs } from 'wot-design-uni'
|
||||
|
||||
defineOptions({
|
||||
@ -254,9 +253,13 @@
|
||||
const props = defineProps({
|
||||
formData: {
|
||||
type: Object,
|
||||
default: () => { },
|
||||
}
|
||||
default: () => { }
|
||||
},
|
||||
|
||||
useData: {
|
||||
type: Object,
|
||||
default: () => { }
|
||||
}
|
||||
})
|
||||
|
||||
const usePath = ref('流程办理附件')
|
||||
@ -365,7 +368,6 @@
|
||||
}
|
||||
|
||||
const handleProcessComplete = (nextNode) => {
|
||||
console.log('-----', model.value)
|
||||
if (model.value.processModel == 4) { //4: 取回流程
|
||||
message
|
||||
.confirm({
|
||||
@ -373,7 +375,28 @@
|
||||
title: '提示',
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
let param = {
|
||||
reason: model.value.reason,
|
||||
bpmBizTitle: props.useData.bpmBizTitle,
|
||||
processApplyUser: props.useData.processApplyUserId,
|
||||
processApplyUserName: props.useData.processApplyUserName,
|
||||
taskAssigneeName: props.useData.taskAssigneeName,
|
||||
taskName: props.useData.taskName,
|
||||
taskBeginTime: props.useData.taskBeginTime
|
||||
}
|
||||
callBackProcessApi({
|
||||
processInstanceId: props.formData.procInsId
|
||||
}).then((res) => {
|
||||
if (res.success) {
|
||||
sendMessageApi(param) //给发起人发送信息
|
||||
toast.success(res.message)
|
||||
setTimeout(() => { //延迟2s
|
||||
uni.navigateBack()
|
||||
}, 2000)
|
||||
} else {
|
||||
toast.warning(res.message)
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
if (!model.value.reason || model.value.reason.length == 0) {
|
||||
@ -394,7 +417,7 @@
|
||||
toast.success(res.message)
|
||||
setTimeout(() => { //延迟0.5s
|
||||
uni.navigateBack()
|
||||
}, 1000)
|
||||
}, 2000)
|
||||
} else {
|
||||
toast.error(res.message)
|
||||
}
|
||||
|
@ -102,7 +102,6 @@
|
||||
|
||||
/**流程取回*/
|
||||
const callBackProcess = (id) => {
|
||||
console.log('----',id)
|
||||
message
|
||||
.confirm({
|
||||
msg: '确认取回流程吗?',
|
||||
|
@ -10,17 +10,18 @@
|
||||
<template>
|
||||
<PageLayout :nav-title="type=='history'?'历史任务':'流程办理'">
|
||||
<wd-tabs v-model="tab" color="#39b54a" autoLineWidth>
|
||||
<wd-tab title="单据">
|
||||
<DynamicLink ref="linkRef" :path="path" :formData="formData" ></DynamicLink>
|
||||
</wd-tab>
|
||||
<wd-tab title="单据">
|
||||
<DynamicLink ref="linkRef" :path="path" :formData="formData"></DynamicLink>
|
||||
</wd-tab>
|
||||
<wd-tab title="任务处理" v-if="type!='history'">
|
||||
<taskDeal :formData="formData"></taskDeal>
|
||||
<taskDeal :formData="formData" :useData="useData"></taskDeal>
|
||||
</wd-tab>
|
||||
<wd-tab title="流程图">
|
||||
<view class="container">
|
||||
<view style="margin-bottom: 20px;height: 400px;overflow: hidden;overflow-y: auto;overflow-x: auto;background-color: #fff;">
|
||||
<view
|
||||
style="margin-bottom: 20px;height: 400px;overflow: hidden;overflow-y: auto;overflow-x: auto;background-color: #fff;">
|
||||
<img :src="imgPath" style="border:2px;cursor:hand;" alt="流程图" usemap="#planetmap">
|
||||
<!-- <map name="planetmap">
|
||||
<!-- <map name="planetmap">
|
||||
<template v-for="(item, key, index) in nodePositionInfo.positionList">
|
||||
<area shape="rect" :coords="item.coords" title="Venus" @touchstart="showNodeInfo(nodePositionInfo.hisTasks,item.id)">
|
||||
</template>
|
||||
@ -28,17 +29,18 @@
|
||||
</view>
|
||||
<wd-card title="流程历史追踪" type="rectangle">
|
||||
<wd-steps :active="completedNum" vertical>
|
||||
<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>
|
||||
<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>
|
||||
</wd-steps>
|
||||
</wd-card>
|
||||
</view>
|
||||
@ -76,66 +78,63 @@
|
||||
import { getCurrentInstance } from 'vue'
|
||||
import DynamicLink from './components/DynamicLink.vue'
|
||||
import taskDeal from './components/taskDeal.vue'
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const type = ref('');
|
||||
|
||||
|
||||
const formData = ref({})
|
||||
const useData = ref({})
|
||||
const nodePositionInfo = ref({})
|
||||
const dataSource = ref([])
|
||||
const path = ref('') //url路径
|
||||
const appStore = useAppStore();
|
||||
const tab = ref(0)
|
||||
const completedNum = ref(0);
|
||||
|
||||
|
||||
const handleClickLeft = () => {
|
||||
uni.navigateBack()
|
||||
}
|
||||
|
||||
const showNodeInfo= (data,taskId)=>{
|
||||
// this.$refs.nodeInfoModel.close();
|
||||
// this.$refs.nodeInfoModel.showInfo(data,taskId);
|
||||
|
||||
const showNodeInfo = (data, taskId) => {
|
||||
// this.$refs.nodeInfoModel.close();
|
||||
// this.$refs.nodeInfoModel.showInfo(data,taskId);
|
||||
}
|
||||
|
||||
onLoad((options) => {
|
||||
console.log(options)
|
||||
type.value = '';
|
||||
if(options.data){
|
||||
if (options.data) {
|
||||
type.value = options.data
|
||||
}
|
||||
const eventChannel = proxy.getOpenerEventChannel();
|
||||
eventChannel.on('taskData',(params)=>{
|
||||
let useData = JSON.parse(params);
|
||||
if(type.value!='history'){
|
||||
getProcessNodeInfo({taskId:useData.id}).then(res=>{
|
||||
if(res.success){
|
||||
eventChannel.on('taskData', (params) => {
|
||||
useData.value = JSON.parse(params);
|
||||
if (type.value != 'history') {
|
||||
getProcessNodeInfo({ taskId: useData.value.id }).then(res => {
|
||||
if (res.success) {
|
||||
let data = {
|
||||
dataId:res.result.dataId,
|
||||
taskId:useData.id,
|
||||
taskDefKey:useData.taskId,
|
||||
procInsId:useData.processInstanceId,
|
||||
tableName:res.result.tableName,
|
||||
permissionList:res.result.permissionList,
|
||||
vars:res.result.records,
|
||||
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,
|
||||
}
|
||||
formData.value = data;//流程信息
|
||||
|
||||
let tempFormUrl = res.result.formUrlMobile;
|
||||
|
||||
path.value = tempFormUrl; //url路径
|
||||
}
|
||||
})
|
||||
}else{
|
||||
getHisProcessNodeInfo({procInstId:useData.processInstanceId}).then(res=>{
|
||||
if(res.success){
|
||||
let data = {
|
||||
dataId:res.result.dataId,
|
||||
taskId:useData.id,
|
||||
taskDefKey:useData.taskId,
|
||||
procInsId:useData.processInstanceId,
|
||||
tableName:res.result.tableName,
|
||||
vars:res.result.records
|
||||
} 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
|
||||
}
|
||||
formData.value = data;//流程信息
|
||||
console.log(res)
|
||||
@ -146,30 +145,29 @@
|
||||
})
|
||||
}
|
||||
|
||||
// getNodePositionInfo({processInstanceId:useData.processInstanceId}).then((res)=>{
|
||||
// getNodePositionInfo({processInstanceId:useData.value.processInstanceId}).then((res)=>{
|
||||
// if (res.success) {
|
||||
// nodePositionInfo.value = res.result
|
||||
// }
|
||||
// })
|
||||
|
||||
getHisInfo({processInstanceId:useData.processInstanceId}).then((res)=>{
|
||||
|
||||
getHisInfo({ processInstanceId: useData.value.processInstanceId }).then((res) => {
|
||||
if (res.success) {
|
||||
console.log(res)
|
||||
dataSource.value = res.result.records
|
||||
//查找最后一个,结束时间
|
||||
completedNum.value = res.result.records.length
|
||||
res.result.records.forEach((item,index)=>{
|
||||
if(item.endTime) completedNum.value = index+1
|
||||
})
|
||||
dataSource.value = res.result.records
|
||||
//查找最后一个,结束时间
|
||||
completedNum.value = res.result.records.length
|
||||
res.result.records.forEach((item, index) => {
|
||||
if (item.endTime) completedNum.value = index + 1
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
const imgPath = computed(()=>{
|
||||
|
||||
const imgPath = computed(() => {
|
||||
var params = qs.stringify({
|
||||
'processInstanceId': formData.value.procInsId
|
||||
'processInstanceId': formData.value.procInsId
|
||||
})
|
||||
let url = `${getEnvBaseUrl()}/act/task/traceImage?${params}`;
|
||||
return url;
|
||||
@ -177,70 +175,73 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .wd-tabs__line{
|
||||
::v-deep .wd-tabs__line {
|
||||
background: #39b54a;
|
||||
}
|
||||
::v-deep .wd-step.is-finished .wd-step__icon-outer{
|
||||
|
||||
::v-deep .wd-step.is-finished .wd-step__icon-outer {
|
||||
border-color: #39b54a;
|
||||
color: #fff;
|
||||
background-color: #39b54a;
|
||||
}
|
||||
|
||||
::v-deep .wd-step.is-process .wd-step__icon-outer{
|
||||
|
||||
::v-deep .wd-step.is-process .wd-step__icon-outer {
|
||||
border-color: #f0f0f0;
|
||||
color: #fff;
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.container {
|
||||
padding: 5px 0 5px;
|
||||
min-height: 100vh;
|
||||
background-color: #f7f7f7;
|
||||
}
|
||||
|
||||
|
||||
.bg-green {
|
||||
background-color: #39b54a;
|
||||
color: #fff;
|
||||
background-color: #39b54a;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
.bg-green {
|
||||
background-color: #39b54a;
|
||||
color: #fff;
|
||||
background-color: #39b54a;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
.bg-gray {
|
||||
background-color: #f0f0f0;
|
||||
color: #333;
|
||||
background-color: #f0f0f0;
|
||||
color: #333;
|
||||
}
|
||||
.content{
|
||||
|
||||
.content {
|
||||
padding: 5px 25px 5px 15px;
|
||||
}
|
||||
.shadow-blur{
|
||||
|
||||
.shadow-blur {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
.shadow-blur::before {
|
||||
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);
|
||||
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);
|
||||
}
|
||||
.text-sm{
|
||||
|
||||
.text-sm {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user