优化工作流

This commit is contained in:
陈裕财
2025-04-09 22:58:54 +08:00
parent 183b06c594
commit 83e46e55df
4 changed files with 513 additions and 627 deletions

View File

@@ -1,10 +1,8 @@
<template>
<el-row :gutter="20">
<el-col :span="6">
<MdpCateTree v-adaptive ref="cateTree" show-checkbox/>
</el-col>
<el-col :span="18">
<mdp-lr-box>
<template #left>
<MdpCateTree v-adaptive ref="cateTree" show-checkbox/>
</template>
<ContentWrap>
<el-space wrap>
<mdp-select
@@ -276,11 +274,9 @@
:page-size="pageInfo.pageSize"
:total="pageInfo.total"
/>
</el-col>
</el-row>
/>
</mdp-lr-box>
<!--新增修改明细 Procdef act_re_procdef界面-->
<mdp-dialog :ref="refId+'FormDialog'">
<template #default="{visible,data}">

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,8 @@
<template>
<el-row :gutter="20">
<el-col :span="6">
<MdpCateTree show-checkbox ref="cateTree"/>
</el-col>
<el-col :span="18">
<mdp-lr-box :expand="false">
<template #left>
<MdpCateTree show-checkbox ref="cateTree"/>
</template>
<ContentWrap v-if="source!='gzt'">
<el-space wrap>
@@ -21,12 +20,7 @@
<el-input
v-model="filters['p.startUsername']" style="width: 10em;"
placeholder="发起人" clearable
title="支持>、<、 >=、<=、!=、*字符*、$IS NULL、$IN 1,2,3、$between 1,5等操作符"/>
<mdp-date-range
v-model="filters" startKey="fromStartTime" endKey="toStartTime"
type="daterange" align="right" unlink-panels
range-separator="-" start-placeholder="创建日期" end-placeholder="创建日期"
value-format="YYYY-MM-DD HH:mm:ss" />
title="支持>、<、 >=、<=、!=、*字符*、$IS NULL、$IN 1,2,3、$between 1,5等操作符"/>
<el-button
v-loading="load.list" :disabled="load.list==true" @click="searchTableDatas()"
icon="search" type="primary">查询
@@ -34,6 +28,33 @@
</el-space>
<template #header>
<el-space wrap>
<mdp-hi-query
:column-configs="columnConfigs" v-model="hiQueryParams"
@change="onHiQueryParamsChange"/>
<el-button icon="zoom-out" @click="searchReset()" title="重置查询条件"/>
<el-button icon="download" @click="export2Excel()" title="导出当前结果" />
<mdp-table-configs :column-configs="columnConfigs" v-model="checkedColumns"/>
<el-popover placement="top" width="375" trigger="hover">
<p v-if="weixinContent">{{ weixinContent }}</p>
<div>
<el-button type="text" @click="doCopyWeixinUrl">拷贝链接发给对方</el-button>
<el-button type="text" @click="doCopyWeixinContent">拷贝内容发给对方</el-button>
<el-button type="text" @click="showSendSms" plain>短信催办</el-button>
</div>
<template #reference>
<el-button plain type="warning"></el-button>
</template>
</el-popover>
<el-button v-if="currOpType=='select' && multiple==true"
:disabled="disBtn('selectBtn') || sels.length===0" type="primary"
@click="selectListConfirm" icon="check"/>
<mdp-select
v-model="filters['res.suspensionState']" width="5em" item-code="suspensionState"
clearable filterable placeholder="状态"/>
@@ -41,31 +62,6 @@
<mdp-select-tag
v-model="filters['tagIds']" width="8em" clearable filterable
placeholder="标签"/>
<mdp-hi-query
:column-configs="columnConfigs" v-model="hiQueryParams"
@change="onHiQueryParamsChange"/>
<el-button icon="zoom-out" @click="searchReset()" title="重置查询条件"/>
<el-popover placement="top" width="375" trigger="manual" v-model="weixinContentVisible">
<p>{{ weixinContent }}</p>
<div style="text-align: right; margin: 0">
<el-button type="text" @click="doCopyWeixinUrl">拷贝链接</el-button>
<el-button type="text" @click="doCopyWeixinContent">拷贝内容</el-button>
</div>
<el-button
ref="reference" v-show="assigneeToMe!=true" link
@click="showWeixin">微信催办
</el-button>
</el-popover>
<el-button link v-show="assigneeToMe!=true" @click="showSendSms">短信催办</el-button>
<span style="float:right;" v-if="currOpType=='select' && multiple==true">
<el-button
:disabled="disBtn('selectBtn') || sels.length===0" type="primary"
@click="selectListConfirm" icon="check"/>
</span>
<el-button icon="download" @click="export2Excel()" title="导出当前结果" />
<mdp-table-configs :column-configs="columnConfigs" v-model="checkedColumns"/>
</el-space>
</template>
</ContentWrap>
@@ -80,8 +76,34 @@
<el-table-column
prop="mainTitle" label="流程名称" min-width="300" show-overflow-tooltip
col-type="String" v-if="showCol('mainTitle')">
<template #default="{row}">
<div style="display:flex;justify-content: flex-start;"><mdp-select style="width:auto;" show-style="tag" item-code="suspensionState" v-model="row.suspensionState" :disabled="true"/>{{ row.mainTitle }}</div>
<template #default="scope">
<el-popover placement="right-start" :show-after="200"
>
<template #reference>
<el-link @click="openForm({parentOpType:currOpType,subOpType:'edit',formData:scope.row,title:'修改'})">
<mdp-select style="width:auto;" show-style="tag" item-code="suspensionState" v-model="scope.row.suspensionState" :disabled="true"/>
<el-text truncated style="width:200px;">
{{ scope.row.mainTitle }}
</el-text>
</el-link>
</template>
<template #default>
<el-space wrap>
<el-button v-if="currOpType=='mng'"
:disabled="disBtn('editBtn') || !checkBtnQx('editBtn',menuDefId) "
type="primary"
@click="openForm({parentOpType:currOpType,subOpType:'edit',formData:scope.row,title:'执行任务'})"
icon="edit" title="执行任务">执行</el-button>
<el-button v-if="currOpType!='mng'"
type="primary"
@click="openForm({parentOpType:currOpType,subOpType:'detail',formData:scope.row})"
icon="view"/>
</el-space>
</template>
</el-popover>
</template>
</el-table-column>
@@ -395,29 +417,8 @@
@change="editSomeFields(scope.row,'scopeType',$event)"
:disabled="true"/>
</template>
</el-table-column>
<el-table-column label="操作" :width="currOpType=='mng'?200:200" fixed="right">
<template #header>
</template>
<template #default="scope" v-if="currOpType=='mng'">
<el-button
:disabled="disBtn('editBtn') || !checkBtnQx('editBtn',menuDefId) "
type="primary"
@click="openForm({parentOpType:currOpType,subOpType:'edit',formData:scope.row,title:'修改'})"
icon="edit" title="修改一条数据"/>
</template>
</el-table-column>
<template #default="scope" v-else-if="currOpType=='list'">
<el-button
type="primary"
@click="openForm({parentOpType:currOpType,subOpType:'detail',formData:scope.row})"
icon="view"/>
</template>
<template #default="scope" v-else-if="currOpType=='select' && multiple!=true">
<el-button type="primary" @click="selectConfirm(scope.row)" icon="check"/>
</template>
</el-table-column>
</el-table>
<el-calendar v-if="defaultShowCalendar==true" v-loading="load.list" v-model="calendarDate" v-cloak>
<!-- 这里使用的是 2.5 slot 语法对于新项目请使用 2.6 slot 语法-->
@@ -453,11 +454,10 @@
:page-size="pageInfo.pageSize"
:total="pageInfo.total"
style="float:right;"
/>
</el-col>
</el-row>
/>
</mdp-lr-box>
<!--新增修改明细 Task act_ru_task界面-->
<mdp-dialog :ref="refId+'FormDialog'" width="80%">
<mdp-dialog :ref="refId+'FormDialog'" fullscreen>
<template #default="{visible,data,dialog}">
<procinst-parames-execution-set
v-if="visible"
@@ -535,10 +535,15 @@ import * as TaskApi from '@/api/mdp/workflow/ru/task';
import {mapState} from 'pinia'
import {useUserStore} from '@/store/modules/user'
import ProcinstParamesExecutionSet from "../procinstParames/ProcinstParamesExecutionSet.vue"; // 流程参数加载
import useClipboard from 'vue-clipboard3'
import SendSms from "@/views/mdp/sms/SendSms.vue"; // 流程参数加载
export default {
name: 'TaskMng',
setup() {
const { toClipboard } = useClipboard()
return { toClipboard } // 将方法暴露给组件实例
},
components: {
ProcinstParamesExecutionSet, SendSms
},
@@ -589,6 +594,11 @@ export default {
},
methods: {
$copyText(text) {
return this.toClipboard(text)
},
//页面初始化需要配置的特殊逻辑写这里
initCurrData() {
@@ -708,23 +718,22 @@ export default {
message: "请选择任务",
type: "error"
});
this.weixinContentVisible = false;
return false;
return false;
} else if (this.sels.length == 1) {
const task = this.sels[0];
const href =this.$mdp.getUri(window.location.protocol + "//" + window.location.host,import.meta.env.VITE_CONTEXT,import.meta.env.VITE_UI_VERSION,"/#/","/mdp/workflow/ru/task/me")
this.weixinContentVisible = true;
this.weixinContent =
this.weixinContent =
task.assigneeName +
"您好,您有任务【" +
task.mainTitle +
"-" +
task.name +
"】待处理请登陆OA系统或者点击以下链接处理。" +
url
href
this.$copyText(this.weixinContent).then(e => {
debugger
this.$message({
position: 'bottom-left', showClose: true,
message: "已拷贝内容,请黏贴到微信中",
@@ -780,17 +789,18 @@ export default {
window.open(href, "_blank");
}
},
doCopyWeixinUrl: function () {
this.weixinContentVisible = false;
doCopyWeixinUrl: function () {
const href =this.$mdp.getUri(window.location.protocol + "//" + window.location.host,import.meta.env.VITE_CONTEXT,import.meta.env.VITE_UI_VERSION,"/#/","/mdp/workflow/ru/task/me")
this.$copyText(href).then(e => {
this.$message({
position: 'bottom-left', showClose: true,
message: "已拷贝链接,请黏贴到微信中",
type: "success"
});
});
},
doCopyWeixinContent: function () {
this.weixinContentVisible = false;
this.$copyText(this.weixinContent).then(e => {
});
doCopyWeixinContent: function () {
this.showWeixin()
},
showCalendarDataTips: function (data) {
var date=data.date

View File

@@ -213,17 +213,17 @@
type="primary" @click=" editSomeFields(editForm, 'description', editForm.description)"
:disabled="load.edit == true">保存描述</el-button>
<!-- <el-button v-if="currTabPane == 'budget'" icon="edit" type="warning"
<el-button v-if="currTabPane == 'budget'" icon="Edit" type="warning"
@click="handleCommand({ type: 'sendToProcessApprova', data: editForm, bizKey: 'xm_project_budget_change_approva' })">预算变更申请</el-button>
<el-button v-if="currTabPane == 'cost' || currTabPane == 'totalAmount'" icon="edit" type="warning"
<el-button v-if="currTabPane == 'cost' || currTabPane == 'totalAmount'" icon="Edit" type="warning"
@click="handleCommand({ type: 'sendToProcessApprova', data: editForm, bizKey: 'xm_project_budget_change_approva' })">项目金额变更申请</el-button>
<el-button v-if="currTabPane == 'time'" icon="watch" type="warning"
@click="handleCommand({ type: 'sendToProcessApprova', data: editForm, bizKey: 'xm_project_delay_approva' })">工期变更申请</el-button>
<el-button icon="star-on" type="success" :disabled="editForm.status > '2'"
<el-button icon="StarOn" type="success" :disabled="editForm.status > '2'"
@click="handleCommand({ type: 'sendToProcessApprova', data: editForm, bizKey: 'xm_project_start_approva' })">立项申请</el-button>
<el-button icon="success" type="success" :disabled="editForm.status > '5'"
@click="handleCommand({ type: 'sendToProcessApprova', data: editForm, bizKey: 'xm_project_over_approva' })">结项申请</el-button> -->
<el-button icon="Success" type="success" :disabled="editForm.status > '5'"
@click="handleCommand({ type: 'sendToProcessApprova', data: editForm, bizKey: 'xm_project_over_approva' })">结项申请</el-button>
</span>
<el-button v-if="currOpType === 'add'" v-loading="load.edit" type="primary" @click="editSubmit"
:disabled="load.edit == true">提交</el-button>