Merge remote-tracking branch 'remotes/origin/master'
# Conflicts: # src/api/process/index.ts
This commit is contained in:
commit
401101ddd2
@ -76,10 +76,18 @@ export function taskEntrust(config : Object) { //委托
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function myApplyProcessListApi(config : object) { //本人发起列表
|
export function getProcessTaskTransInfo(config : Object) { //获取当前流程节点ID
|
||||||
return http({
|
return http({
|
||||||
url: '/act/task/myApplyProcessList',
|
url: '/act/task/getProcessTaskTransInfo',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
data: config
|
data: config
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function processComplete(config : Object) { //流程任务完成
|
||||||
|
return http({
|
||||||
|
url: '/act/task/processComplete',
|
||||||
|
method: 'POST',
|
||||||
|
data: config
|
||||||
|
})
|
||||||
|
}
|
@ -86,3 +86,11 @@ export function getDictItemsApi(dictCode : string) { // 字典标签专用
|
|||||||
method: 'GET'
|
method: 'GET'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function deleteFile(config : object){//删除文件 by 闵
|
||||||
|
return http({
|
||||||
|
url: `/sys/common/deleteFileAndCache`,
|
||||||
|
method: 'GET',
|
||||||
|
data: config
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -1,18 +1,29 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<wd-upload accept="all" multiple :file-list="fileList" :action="action" @change="handleChange"
|
<wd-upload :accept="accept" multiple :file-list="fileList" :action="action" @change="handleChange" :disabled="disabled" @fail="fail"
|
||||||
:multiple="multiple"></wd-upload>
|
:before-remove="beforeRemove" :multiple="multiple">
|
||||||
|
<template #preview-cover="{ file,index }">
|
||||||
|
<!-- 小程序拿不到文件 -->
|
||||||
|
<view class="preview-cover text-ellipsis" style="color: #0081ff;" @click="onLinePreview(file.name)">
|
||||||
|
{{ file?.name||`文件${index+1}` }}
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</wd-upload>
|
||||||
|
<wd-toast></wd-toast>
|
||||||
|
<wd-message-box></wd-message-box>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, watch } from 'vue'
|
import { ref, watch } from 'vue'
|
||||||
import { useToast, useMessage, useNotify, dayjs } from 'wot-design-uni'
|
import { useToast, useMessage, useNotify, dayjs } from 'wot-design-uni'
|
||||||
|
import { deleteFile } from '@/api/system'
|
||||||
import { http } from '@/utils/http'
|
import { http } from '@/utils/http'
|
||||||
import {
|
import {
|
||||||
getEnvBaseUrl
|
getEnvBaseUrl,
|
||||||
|
getFileAccessHttpUrl
|
||||||
} from '@/utils/index'
|
} from '@/utils/index'
|
||||||
|
import { init } from 'echarts'
|
||||||
defineOptions({ //文件上传组件 by 闵
|
defineOptions({ //文件上传组件 by 闵
|
||||||
name: 'Mupload',
|
name: 'Mupload',
|
||||||
options: {
|
options: {
|
||||||
@ -24,23 +35,156 @@
|
|||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
multiple: { //是否多选
|
multiple: { //是否多选上传
|
||||||
type: String,
|
type: Boolean,
|
||||||
default: false
|
default: true
|
||||||
},
|
},
|
||||||
path: { //自定义path
|
path: { //自定义path
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
|
},
|
||||||
|
disabled: { //是否禁用
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
accept: { //可上传的文件
|
||||||
|
type: String,
|
||||||
|
default: 'all'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
const toast = useToast()
|
||||||
|
const message = useMessage()
|
||||||
const emit = defineEmits(['change', 'update:modelValue'])
|
const emit = defineEmits(['change', 'update:modelValue'])
|
||||||
const fileList = ref([])
|
const fileList = ref([])
|
||||||
const action = ref('')
|
const action = ref(getEnvBaseUrl() + '/sys/common/upload?appPath=APP文件/')
|
||||||
|
const defaultPath = ref(getEnvBaseUrl() + '/sys/common/upload?appPath=')
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监听value数值
|
||||||
|
*/
|
||||||
|
watch(
|
||||||
|
() => props.modelValue,
|
||||||
|
(val) => {
|
||||||
|
if (val) {
|
||||||
|
initFileList(val); //初始化文件列表
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ immediate: true },
|
||||||
|
)
|
||||||
|
|
||||||
|
watch( //监听文件路径更改
|
||||||
|
() => props.path,
|
||||||
|
(val) => {
|
||||||
|
if (val) {
|
||||||
|
action.value = defaultPath.value + val;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ immediate: true },
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
const handleChange = (val)=>{ //文件发生变化
|
const handleChange = (val) => { //文件发生变化
|
||||||
|
let pathArr = [];
|
||||||
|
if (val.fileList && val.fileList.length > 0) {
|
||||||
|
let fileListTemp = val.fileList.map((file) => {
|
||||||
|
console.log(file)
|
||||||
|
if (file.response) {
|
||||||
|
let reUrl = JSON.parse(file.response).message;
|
||||||
|
pathArr.push(reUrl)
|
||||||
|
file.url = getFileAccessHttpUrl(reUrl, '')
|
||||||
|
}
|
||||||
|
return file;
|
||||||
|
});
|
||||||
|
fileList.value = fileListTemp
|
||||||
|
}
|
||||||
|
if (pathArr.length > 0) {
|
||||||
|
emit('change', pathArr.join(","))
|
||||||
|
emit('update:modelValue', pathArr.join(","))
|
||||||
|
}
|
||||||
|
console.log(pathArr)
|
||||||
|
console.log(val)
|
||||||
|
console.log(fileList)
|
||||||
|
}
|
||||||
|
|
||||||
|
const uidGenerator = () => {
|
||||||
|
return '-' + parseInt(Math.random() * 10000 + 1 + '', 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
const getFileName = (path) => {
|
||||||
|
if (path.lastIndexOf("\\") >= 0) {
|
||||||
|
let reg = new RegExp("\\\\", "g");
|
||||||
|
path = path.replace(reg, "/");
|
||||||
|
}
|
||||||
|
return path.substring(path.lastIndexOf("/") + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
const initFileList = (paths) => {
|
||||||
|
if (!paths || paths.length == 0) {
|
||||||
|
fileList.value = [];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let fileListTemp = [];
|
||||||
|
let arr = paths.split(",")
|
||||||
|
for (var a = 0; a < arr.length; a++) {
|
||||||
|
let url = getFileAccessHttpUrl(arr[a], '');
|
||||||
|
fileListTemp.push({
|
||||||
|
uid: uidGenerator(),
|
||||||
|
name: getFileName(arr[a]),
|
||||||
|
status: 'success',
|
||||||
|
url: getFileAccessHttpUrl(arr[a], ''),
|
||||||
|
response: JSON.stringify({
|
||||||
|
status: "success",
|
||||||
|
message: arr[a]
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
fileList.value = fileListTemp
|
||||||
|
console.log(fileList)
|
||||||
|
}
|
||||||
|
|
||||||
|
const onLinePreview = (val) => { //在线预览
|
||||||
|
console.log(val)
|
||||||
|
let prex = props.path ? props.path : 'APP文件'
|
||||||
|
let usePath = prex + '/' + val
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/onlinePreview/detail?data=${usePath}`
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const beforeRemove = ({ file, fileList, resolve }) => { //文件删除
|
||||||
|
console.log(file)
|
||||||
|
if (file) {
|
||||||
|
message
|
||||||
|
.confirm({
|
||||||
|
msg: '是否删除该文件?',
|
||||||
|
title: '确认删除吗',
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
deleteFile({ name: file.name, url: file.url }).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.success) {
|
||||||
|
toast.success(res.message)
|
||||||
|
resolve(true)
|
||||||
|
} else {
|
||||||
|
toast.error(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const fail = ({ error, file,formData })=>{ //上传失败
|
||||||
|
toast.error(error)
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped>
|
||||||
|
.text-ellipsis {
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
-o-text-overflow: ellipsis;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
@ -102,6 +102,7 @@
|
|||||||
pageNo,
|
pageNo,
|
||||||
pageSize
|
pageSize
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
|
console.log(res)
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
list.value = [...list.value,...res.result.records];
|
list.value = [...list.value,...res.result.records];
|
||||||
}
|
}
|
||||||
@ -119,25 +120,27 @@
|
|||||||
|
|
||||||
const handleChange = (data) => {
|
const handleChange = (data) => {
|
||||||
const rowkey = data.map((item) => item.username).join(',')
|
const rowkey = data.map((item) => item.username).join(',')
|
||||||
// var params = {
|
console.log(rowkey)
|
||||||
// taskId:userTask.value.id,
|
var params = {
|
||||||
// taskAssignee:rowkey
|
taskId:userTask.value.id,
|
||||||
// };//查询条件
|
taskAssignee:rowkey
|
||||||
// taskEntrust(params).then(res=>{
|
};//查询条件
|
||||||
// if(res.success){
|
taskEntrust(params).then(res=>{
|
||||||
// toast.success(res.message)
|
if(res.success){
|
||||||
// uni.redirectTo({
|
toast.success(res.message)
|
||||||
// url: './approvalTabbar'
|
uni.redirectTo({
|
||||||
// });
|
url: './approvalTabbar'
|
||||||
// }else{
|
});
|
||||||
// toast.error(res.message)
|
}else{
|
||||||
// }
|
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`,
|
||||||
|
@ -3,12 +3,12 @@
|
|||||||
<view class="cu-bar bg-white solid-bottom height">
|
<view class="cu-bar bg-white solid-bottom height">
|
||||||
<view class="action">
|
<view class="action">
|
||||||
当前环节:
|
当前环节:
|
||||||
<text class="text-bold">[部门领导]</text>
|
<text class="text-bold">[{{resultObj.taskName}}]</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="margin-top-sm">
|
<view class="margin-top-sm">
|
||||||
<wd-collapse style="width: 100%;" v-model="value">
|
<wd-collapse style="width: 100%;" v-model="value1">
|
||||||
<wd-collapse-item name="item1">
|
<wd-collapse-item name="item1">
|
||||||
<template #title="{expanded,disabled, isFirst }">
|
<template #title="{expanded,disabled, isFirst }">
|
||||||
<view class="header">
|
<view class="header">
|
||||||
@ -47,7 +47,7 @@
|
|||||||
<text>
|
<text>
|
||||||
<span>处理意见</span>
|
<span>处理意见</span>
|
||||||
</text>
|
</text>
|
||||||
<wd-picker :columns="dropOptions" label="单列选项" v-model="model.reason" use-default-slot>
|
<wd-picker :columns="dropOptions" label="单列选项" v-model="model.reason" use-default-slot>
|
||||||
<view class="cu-tag line-blue margin-left-sm">
|
<view class="cu-tag line-blue margin-left-sm">
|
||||||
<span>选择常用审批语</span>
|
<span>选择常用审批语</span>
|
||||||
</view>
|
</view>
|
||||||
@ -64,11 +64,123 @@
|
|||||||
<span>上传附件</span>
|
<span>上传附件</span>
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<Mupload></Mupload>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="grid col-4 grid-square padding bg-white ">
|
||||||
|
<Mupload v-model="fileListTemp" :path="usePath"></Mupload>
|
||||||
|
</view>
|
||||||
|
<view class="bg-white solid-top">
|
||||||
|
<radio-group :value="model.processModel" @change="radioChange">
|
||||||
|
<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>
|
||||||
|
</label>
|
||||||
|
<label class="uni-list-cell uni-list-cell-pd uni-label-pointer" v-if="resultObj.histListSize>0 ">
|
||||||
|
<!-- 点击的文字 -->
|
||||||
|
<radio value="3" style="transform: scale(0.7);"></radio>
|
||||||
|
<view class="margin-left-sm text-sm">驳回</view>
|
||||||
|
</label>
|
||||||
|
<label class="uni-list-cell uni-list-cell-pd uni-label-pointer" v-if="model.processModel=='3'">
|
||||||
|
<wd-picker :columns="rejectColumns" label="单列选项" v-model="model.rejectModelNode"
|
||||||
|
use-default-slot>
|
||||||
|
<view>
|
||||||
|
<text class="text-lg margin-tb-sm">
|
||||||
|
<span>{{model.rejectModelNode?dictRejctModel(model.rejectModelNode):'选择驳回节点'}}</span>
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
</wd-picker>
|
||||||
|
|
||||||
|
</label>
|
||||||
|
</radio-group>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="margin-top-sm">
|
||||||
|
<wd-collapse style="width: 100%;" v-model="value2">
|
||||||
|
<wd-collapse-item name="item1">
|
||||||
|
<template #title="{expanded,disabled, isFirst }">
|
||||||
|
<view class="header">
|
||||||
|
<wd-img class="taskImg" src="/static/user27.png" />
|
||||||
|
<text class="text-collapse">指定下一步操作人</text>
|
||||||
|
<wd-icon v-if="expanded" style="float: right;color: #d8d8d8;" name="arrow-down"
|
||||||
|
size="22px"></wd-icon>
|
||||||
|
<wd-icon v-else style="float: right;color: #d8d8d8;" name="arrow-up" size="22px"></wd-icon>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<view
|
||||||
|
style="position: relative; display: inline-block; min-width: 60px; margin: 2px 5px;text-align: center;">
|
||||||
|
<wd-img v-if="!model.nextUserName" @click="showSelectuser('show2')"
|
||||||
|
style="width: 32px; height: 32px; margin: 0px auto;margin-top: 10px;"
|
||||||
|
src="/static/add.png" />
|
||||||
|
<view v-if="!model.nextUserName" style="margin-bottom: 10px;">选择</view>
|
||||||
|
<view @click="reset('show2')">
|
||||||
|
<wd-img v-if="model.nextUserName"
|
||||||
|
style="width: 32px; height: 32px; margin: 0px auto;margin-top: 10px;"
|
||||||
|
:src="getFileAccessHttpUrl(modelShow.avatar2)" />
|
||||||
|
<view v-if="model.nextUserName" style="margin-bottom: 10px;">
|
||||||
|
{{modelShow.text2}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<SelectUserModal v-if="modelShow.show2" :selected="model.nextUserName"
|
||||||
|
@change="(val)=>{show1Change(val,'show2')}" modalTitle="用户选择" :multi="false"
|
||||||
|
@close="() => (modelShow.show2 = false)"></SelectUserModal>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</wd-collapse-item>
|
||||||
|
</wd-collapse>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view class="margin-top-sm">
|
||||||
|
<wd-collapse style="width: 100%;" v-model="value3">
|
||||||
|
<wd-collapse-item name="item1">
|
||||||
|
<template #title="{expanded,disabled, isFirst }">
|
||||||
|
<view class="header">
|
||||||
|
<wd-img class="taskImg" src="/static/user27.png" />
|
||||||
|
<text class="text-collapse">指定抄送人</text>
|
||||||
|
<wd-icon v-if="expanded" style="float: right;color: #d8d8d8;" name="arrow-down"
|
||||||
|
size="22px"></wd-icon>
|
||||||
|
<wd-icon v-else style="float: right;color: #d8d8d8;" name="arrow-up" size="22px"></wd-icon>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<view
|
||||||
|
style="position: relative; display: inline-block; min-width: 60px; margin: 2px 5px;text-align: center;">
|
||||||
|
<wd-img v-if="!model.ccUserIds" @click="showSelectuser('show3')"
|
||||||
|
style="width: 32px; height: 32px; margin: 0px auto;margin-top: 10px;"
|
||||||
|
src="/static/add.png" />
|
||||||
|
<view v-if="!model.ccUserIds" style="margin-bottom: 10px;">选择</view>
|
||||||
|
<view @click="reset('show3')">
|
||||||
|
<wd-img v-if="model.ccUserIds"
|
||||||
|
style="width: 32px; height: 32px; margin: 0px auto;margin-top: 10px;"
|
||||||
|
:src="getFileAccessHttpUrl(modelShow.avatar3)" />
|
||||||
|
<view v-if="model.ccUserIds" style="margin-bottom: 10px;">
|
||||||
|
{{modelShow.text3}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<SelectUserModal v-if="modelShow.show3" :selected="model.ccUserIds"
|
||||||
|
@change="(val)=>{show1Change(val,'show3')}" modalTitle="用户选择" :multi="false"
|
||||||
|
@close="() => (modelShow.show3 = false)"></SelectUserModal>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</wd-collapse-item>
|
||||||
|
</wd-collapse>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="padding text-center">
|
||||||
|
<view v-if="model.processModel==1">
|
||||||
|
<template v-for="(item,index) in resultObj.transitionList">
|
||||||
|
<wd-button class="cu-btn" style="margin-bottom: 3px;" @click="finishTask(item.nextnode)">
|
||||||
|
{{ item.Transition }}
|
||||||
|
</wd-button>
|
||||||
|
</template>
|
||||||
|
</view>
|
||||||
|
<view v-else>
|
||||||
|
<wd-button type="primary" @click="handleManyProcessComplete()">确认提交</wd-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<wd-toast></wd-toast>
|
||||||
|
<wd-message-box></wd-message-box>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -78,6 +190,8 @@
|
|||||||
import { getFileAccessHttpUrl } from '@/common/uitls'
|
import { getFileAccessHttpUrl } from '@/common/uitls'
|
||||||
import { useQueue } from 'wot-design-uni'
|
import { useQueue } from 'wot-design-uni'
|
||||||
import Mupload from '@/components/Mupload/Mupload.vue'
|
import Mupload from '@/components/Mupload/Mupload.vue'
|
||||||
|
import { getProcessTaskTransInfo, processComplete, taskEntrust } from '@/api/process'
|
||||||
|
import { useToast, useMessage, useNotify, dayjs } from 'wot-design-uni'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'taskDeal',
|
name: 'taskDeal',
|
||||||
@ -85,11 +199,25 @@
|
|||||||
styleIsolation: 'shared',
|
styleIsolation: 'shared',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
const value = ref([])
|
|
||||||
|
const fileListTemp = ref('')
|
||||||
|
const toast = useToast()
|
||||||
|
const message = useMessage()
|
||||||
|
const resultObj = ref({}) //流程信息
|
||||||
|
const rejectColumns = ref([]) //驳回节点信息
|
||||||
|
const value1 = ref([])
|
||||||
|
const value2 = ref([])
|
||||||
|
const value3 = ref([])
|
||||||
const modelShow = ref({
|
const modelShow = ref({
|
||||||
show1: false,
|
show1: false,
|
||||||
text1: '',
|
text1: '',
|
||||||
avatar1: ''
|
avatar1: '',
|
||||||
|
show2: false,
|
||||||
|
text2: '',
|
||||||
|
avatar2: '',
|
||||||
|
show3: false,
|
||||||
|
text3: '',
|
||||||
|
avatar3: '',
|
||||||
})
|
})
|
||||||
const model = ref({
|
const model = ref({
|
||||||
taskId: '', //taskid
|
taskId: '', //taskid
|
||||||
@ -126,8 +254,48 @@
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const usePath = ref('流程办理附件')
|
||||||
|
|
||||||
|
watch( //监听文件路径更改
|
||||||
|
() => props.formData,
|
||||||
|
(val) => {//监听formdata 加载数据
|
||||||
|
if (val) {
|
||||||
|
console.log(val)
|
||||||
|
model.value.taskId = val.taskId;
|
||||||
|
rejectColumns.value = []; //清空驳回信息
|
||||||
|
model.value.rejectModelNode = '';
|
||||||
|
let tempArr = [];
|
||||||
|
getProcessTaskTransInfo({ taskId: model.value.taskId }).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.success) {
|
||||||
|
resultObj.value = res.result;
|
||||||
|
res.result.histListNode.forEach(item => {
|
||||||
|
if (item.NAME_ != res.result.taskName) {//不是当前节点
|
||||||
|
tempArr.push({ label: item.NAME_, value: item.TASK_DEF_KEY_ })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
rejectColumns.value = tempArr; //赋值驳回信息
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ immediate: true, deep: true },
|
||||||
|
)
|
||||||
|
|
||||||
|
const radioChange = (val) => {
|
||||||
|
model.value.processModel = val.detail.value
|
||||||
|
if (val.detail.value != 3) {
|
||||||
|
//清空驳回信息
|
||||||
|
model.value.rejectModelNode = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const showSelectuser = (val : string) => { //选人组件
|
const showSelectuser = (val : string) => { //选人组件
|
||||||
modelShow.value[val] = true;
|
modelShow.value[val] = true;
|
||||||
|
console.log(props.formData)
|
||||||
}
|
}
|
||||||
|
|
||||||
const show1Change = (val, type) => {
|
const show1Change = (val, type) => {
|
||||||
@ -138,6 +306,18 @@
|
|||||||
modelShow.value['text1'] = selectUser.realname
|
modelShow.value['text1'] = selectUser.realname
|
||||||
modelShow.value['avatar1'] = selectUser.avatar
|
modelShow.value['avatar1'] = selectUser.avatar
|
||||||
break;
|
break;
|
||||||
|
case 'show2':
|
||||||
|
model.value.nextUserId = selectUser.username
|
||||||
|
model.value.nextUserName = selectUser.realname
|
||||||
|
modelShow.value['text2'] = selectUser.realname
|
||||||
|
modelShow.value['avatar2'] = selectUser.avatar
|
||||||
|
break;
|
||||||
|
case 'show3':
|
||||||
|
model.value.ccUserIds = selectUser.username
|
||||||
|
model.value.ccUserRealNames = selectUser.realname
|
||||||
|
modelShow.value['text3'] = selectUser.realname
|
||||||
|
modelShow.value['avatar3'] = selectUser.avatar
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -150,10 +330,112 @@
|
|||||||
modelShow.value['text1'] = ''
|
modelShow.value['text1'] = ''
|
||||||
modelShow.value['avatar1'] = ''
|
modelShow.value['avatar1'] = ''
|
||||||
break;
|
break;
|
||||||
|
case 'show2':
|
||||||
|
model.value.nextUserName = ''
|
||||||
|
model.value.nextUserId = ''
|
||||||
|
modelShow.value['text2'] = ''
|
||||||
|
modelShow.value['avatar2'] = ''
|
||||||
|
break;
|
||||||
|
case 'show3':
|
||||||
|
model.value.ccUserIds = ''
|
||||||
|
model.value.ccUserRealNames = '';
|
||||||
|
modelShow.value['text3'] = ''
|
||||||
|
modelShow.value['avatar3'] = ''
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const dictRejctModel = (val) => {//翻译驳回
|
||||||
|
return rejectColumns.value.filter(item => {
|
||||||
|
return item.value = val
|
||||||
|
})[0].label;
|
||||||
|
}
|
||||||
|
|
||||||
|
const finishTask = (nextNode) => {//完成任务
|
||||||
|
console.log(nextNode)
|
||||||
|
if (nextNode) {
|
||||||
|
handleProcessComplete(nextNode)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (resultObj.value.transitionList.length == 1) {
|
||||||
|
handleProcessComplete(resultObj.value.transitionList[0].nextnode)
|
||||||
|
} else {
|
||||||
|
toast.error("存在多分支,请手动选择分支!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleProcessComplete = (nextNode) => {
|
||||||
|
if (!model.value.reason || model.value.reason.length == 0) {
|
||||||
|
toast.error("请填写处理意见!")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (nextNode) { // true
|
||||||
|
model.value.nextnode = nextNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (model.value.entrust) { //如果有委托,不办理流程
|
||||||
|
var params = {
|
||||||
|
taskId: model.value.taskId,
|
||||||
|
taskAssignee: model.value.entrust
|
||||||
|
};//查询条件
|
||||||
|
taskEntrust(params).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
toast.success(res.message)
|
||||||
|
setTimeout(() => { //延迟0.5s
|
||||||
|
uni.navigateBack()
|
||||||
|
}, 1000)
|
||||||
|
} else {
|
||||||
|
toast.error(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
message
|
||||||
|
.confirm({
|
||||||
|
msg: '确认提交审批吗?',
|
||||||
|
title: '提示',
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
console.log(model.value)
|
||||||
|
model.fileList = JSON.stringify(fileListTemp.value)
|
||||||
|
processComplete(model.value).then(res => {
|
||||||
|
if (res.success) {//跳转页面或加载下一个任务
|
||||||
|
toast.success("委托成功!")
|
||||||
|
setTimeout(() => { //延迟0.5s
|
||||||
|
uni.navigateBack()
|
||||||
|
}, 1000)
|
||||||
|
} else {
|
||||||
|
toast.error(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleManyProcessComplete = () => { //驳回任务提交
|
||||||
|
if (model.value.processModel == 3) {
|
||||||
|
if (!model.value.rejectModelNode || model.value.rejectModelNode.length == 0) {
|
||||||
|
toast.error("请选择驳回节点!")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// else{
|
||||||
|
// //添加判断在这个item.TASK_DEF_KEY_的参数下面
|
||||||
|
// //如果是驳回,这个item.TASK_DEF_KEY_参数传递给提交流程
|
||||||
|
// this.handleProcessComplete();
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
handleProcessComplete('');
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
let yy = new Date().getFullYear();
|
||||||
|
let mm = new Date().getMonth() + 1;
|
||||||
|
usePath.value = yy + '-' + mm + '-' + '流程办理附件';
|
||||||
|
console.log(usePath)
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@ -218,48 +500,126 @@
|
|||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
vertical-align: -15%
|
vertical-align: -15%
|
||||||
}
|
}
|
||||||
|
|
||||||
.solid-bottom::after {
|
.solid-bottom::after {
|
||||||
border-bottom: 1px solid rgba(0, 0, 0, .1);
|
border-bottom: 1px solid rgba(0, 0, 0, .1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-blue, .line-blue, .lines-blue {
|
.text-blue,
|
||||||
color: #0081ff;
|
.line-blue,
|
||||||
|
.lines-blue {
|
||||||
|
color: #0081ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.margin-left-sm {
|
.margin-left-sm {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cu-tag {
|
.cu-tag {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
position: relative;
|
position: relative;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 0px 8px;
|
padding: 0px 8px;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
font-family: Helvetica Neue, Helvetica, sans-serif;
|
font-family: Helvetica Neue, Helvetica, sans-serif;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cu-tag[class*="line-"]::after {
|
.cu-tag[class*="line-"]::after {
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cu-tag[class*="line-"]::after {
|
.cu-tag[class*="line-"]::after {
|
||||||
content: " ";
|
content: " ";
|
||||||
width: 200%;
|
width: 200%;
|
||||||
height: 200%;
|
height: 200%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
border: 1px solid currentColor;
|
border: 1px solid currentColor;
|
||||||
-webkit-transform: scale(.5);
|
-webkit-transform: scale(.5);
|
||||||
transform: scale(.5);
|
transform: scale(.5);
|
||||||
-webkit-transform-origin: 0 0;
|
-webkit-transform-origin: 0 0;
|
||||||
transform-origin: 0 0;
|
transform-origin: 0 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-radius: inherit;
|
border-radius: inherit;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid.grid-square {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-white {
|
||||||
|
background-color: #fff;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.padding {
|
||||||
|
padding: 17px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-sm {
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-list-cell {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-pack: justify;
|
||||||
|
-webkit-justify-content: flex-start;
|
||||||
|
justify-content: flex-start;
|
||||||
|
-webkit-box-align: center;
|
||||||
|
-webkit-align-items: center;
|
||||||
|
align-items: center;
|
||||||
|
border-bottom: 1px solid #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-list-cell-pd {
|
||||||
|
padding: 8px 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-label-pointer {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cu-btn {
|
||||||
|
position: relative;
|
||||||
|
border: 0px;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0 15px;
|
||||||
|
font-size: 14px;
|
||||||
|
height: 32px;
|
||||||
|
line-height: 1;
|
||||||
|
text-align: center;
|
||||||
|
text-decoration: none;
|
||||||
|
overflow: visible;
|
||||||
|
margin-left: 0;
|
||||||
|
-webkit-transform: translate(0px, 0px);
|
||||||
|
transform: translate(0px, 0px);
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-lg {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.margin-tb-sm {
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -111,7 +111,7 @@
|
|||||||
procInsId:useData.processInstanceId,
|
procInsId:useData.processInstanceId,
|
||||||
tableName:res.result.tableName,
|
tableName:res.result.tableName,
|
||||||
permissionList:res.result.permissionList,
|
permissionList:res.result.permissionList,
|
||||||
vars:res.result.records
|
vars:res.result.records,
|
||||||
}
|
}
|
||||||
formData.value = data;//流程信息
|
formData.value = data;//流程信息
|
||||||
|
|
||||||
|
@ -425,3 +425,21 @@ function weatherRequest(params : { lat ?: number; lon ?: number; q ?: string })
|
|||||||
export const imgUrl = (url : string) => {
|
export const imgUrl = (url : string) => {
|
||||||
return getEnvBaseUrl() + '/sys/common/static/' + `/${url}`
|
return getEnvBaseUrl() + '/sys/common/static/' + `/${url}`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取文件服务访问路径
|
||||||
|
* @param avatar
|
||||||
|
* @param subStr
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export function getFileAccessHttpUrl(avatar,subStr) {
|
||||||
|
if(!subStr) subStr = 'http'
|
||||||
|
if(avatar && avatar.startsWith(subStr)){
|
||||||
|
return avatar;
|
||||||
|
}else{
|
||||||
|
if(avatar && avatar.length>0 && avatar.indexOf('[')==-1){
|
||||||
|
return getEnvBaseUrl()+ "/sys/common/static/" + avatar;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user