|
@@ -1,28 +1,28 @@
|
|
|
<style lang="less">
|
|
|
- @import '~@assets/less/common.less';
|
|
|
+@import '~@assets/less/common.less';
|
|
|
</style>
|
|
|
<template>
|
|
|
<div class="search">
|
|
|
-
|
|
|
<a-card>
|
|
|
<div class="table-page-search-wrapper">
|
|
|
<a-form layout="inline" @keyup.enter.native="handleSearch">
|
|
|
<a-row :gutter="24">
|
|
|
<a-col :md="6" :sm="8">
|
|
|
- <a-form-item label="任务名称" prop="name" >
|
|
|
- <a-input
|
|
|
- type="text" allowClear
|
|
|
- v-model="searchForm.name"
|
|
|
- placeholder="请输入"
|
|
|
- />
|
|
|
+ <a-form-item label="任务名称" prop="name">
|
|
|
+ <a-input type="text" allowClear v-model="searchForm.name" placeholder="请输入" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
|
|
- <a-col :md="6" :sm="12" >
|
|
|
- <a-button type="primary" style="left: 10px" @click="handleSearch" icon="search">查询</a-button>
|
|
|
- <a-button type="primary" @click="handleReset" icon="reload" style="margin-left: 8px;left: 10px">重置</a-button>
|
|
|
- </a-col>
|
|
|
- </span>
|
|
|
+ <a-col :md="6" :sm="12">
|
|
|
+ <a-button type="primary" style="left: 10px" @click="handleSearch" icon="search">查询</a-button>
|
|
|
+ <a-button
|
|
|
+ type="primary"
|
|
|
+ @click="handleReset"
|
|
|
+ icon="reload"
|
|
|
+ style="margin-left: 8px;left: 10px"
|
|
|
+ >重置</a-button>
|
|
|
+ </a-col>
|
|
|
+ </span>
|
|
|
</a-row>
|
|
|
</a-form>
|
|
|
</div>
|
|
@@ -32,68 +32,86 @@
|
|
|
<a-button @click="getDataList" icon="md-refresh">刷新</a-button>
|
|
|
</a-row>-->
|
|
|
<a-row>
|
|
|
- <a-table :scroll="scroll" bordered
|
|
|
- :loading="loading" rowKey="id"
|
|
|
+ <a-table
|
|
|
+ bordered
|
|
|
+ :loading="loading"
|
|
|
+ rowKey="id"
|
|
|
:dataSource="data"
|
|
|
- :pagination="ipagination" @change="handleTableChange"
|
|
|
+ :pagination="ipagination"
|
|
|
+ @change="handleTableChange"
|
|
|
ref="table"
|
|
|
>
|
|
|
- <a-table-column title="#" :width="50">
|
|
|
- <template slot-scope="t,r,i" >
|
|
|
- <span> {{i+1}} </span>
|
|
|
+ <a-table-column title="#" :width="50">
|
|
|
+ <template slot-scope="t,r,i">
|
|
|
+ <span>{{i+1}}</span>
|
|
|
</template>
|
|
|
</a-table-column>
|
|
|
- <a-table-column title="任务名称" dataIndex="name" :width="150" align="center">
|
|
|
+ <a-table-column title="任务名称" data-index="name" :width="150" align="center">
|
|
|
<template slot-scope="t">
|
|
|
- <span> {{t}} </span>
|
|
|
+ <span>{{t}}</span>
|
|
|
</template>
|
|
|
</a-table-column>
|
|
|
- <a-table-column title="所属流程" dataIndex="processName" :width="150" align="center">
|
|
|
+ <a-table-column title="所属流程" data-index="processName" :width="150" align="center">
|
|
|
<template slot-scope="t">
|
|
|
- <span> {{t}} </span>
|
|
|
+ <span>{{t}}</span>
|
|
|
</template>
|
|
|
</a-table-column>
|
|
|
- <a-table-column title="委托代办人" dataIndex="owner" align="center" :width="150">
|
|
|
+ <a-table-column title="委托代办人" data-index="owner" align="center" :width="150">
|
|
|
<template slot-scope="t">
|
|
|
- <span> {{t}} </span>
|
|
|
+ <span>{{t}}</span>
|
|
|
</template>
|
|
|
</a-table-column>
|
|
|
- <a-table-column title="流程发起人" dataIndex="applyer" :width="150" align="center">
|
|
|
+ <a-table-column title="流程发起人" data-index="applyer" :width="150" align="center">
|
|
|
<template slot-scope="t">
|
|
|
- <span> {{t}} </span>
|
|
|
+ <span>{{t}}</span>
|
|
|
</template>
|
|
|
</a-table-column>
|
|
|
- <a-table-column title="优先级" dataIndex="priority" :width="110" align="center"
|
|
|
- key="so" :sorter="(a,b)=>a.priority - b.priority"
|
|
|
+ <a-table-column
|
|
|
+ title="优先级"
|
|
|
+ data-index="priority"
|
|
|
+ :width="110"
|
|
|
+ align="center"
|
|
|
+ key="so"
|
|
|
+ :sorter="(a,b)=>a.priority - b.priority"
|
|
|
>
|
|
|
<template slot-scope="t">
|
|
|
- <span v-if="t==0" style="color: green;"> 普通 </span>
|
|
|
- <span v-else-if="t==1" style="color: orange;"> 重要 </span>
|
|
|
- <span v-else-if="t==2" style="color: red;"> 紧急 </span>
|
|
|
- <span v-else style="color: #999;"> 无 </span>
|
|
|
+ <span v-if="t==0" style="color: green;">普通</span>
|
|
|
+ <span v-else-if="t==1" style="color: orange;">重要</span>
|
|
|
+ <span v-else-if="t==2" style="color: red;">紧急</span>
|
|
|
+ <span v-else style="color: #999;">无</span>
|
|
|
</template>
|
|
|
</a-table-column>
|
|
|
- <a-table-column title="状态" dataIndex="isSuspended" :width="100" align="center"
|
|
|
- key="z" :sorter="(a,b)=>Boolean(a.isSuspended)?0:1 - Boolean(b.isSuspended)?0:1"
|
|
|
+ <a-table-column
|
|
|
+ title="状态"
|
|
|
+ data-index="isSuspended"
|
|
|
+ :width="100"
|
|
|
+ align="center"
|
|
|
+ key="z"
|
|
|
+ :sorter="(a,b)=>Boolean(a.isSuspended)?0:1 - Boolean(b.isSuspended)?0:1"
|
|
|
>
|
|
|
<template slot-scope="t">
|
|
|
- <span v-if="!Boolean(t)" style="color: green;"> 已激活 </span>
|
|
|
- <span v-if="Boolean(t)" style="color: orange;"> 已挂起 </span>
|
|
|
+ <span v-if="!Boolean(t)" style="color: green;">已激活</span>
|
|
|
+ <span v-if="Boolean(t)" style="color: orange;">已挂起</span>
|
|
|
</template>
|
|
|
</a-table-column>
|
|
|
- <a-table-column title="创建时间" dataIndex="createTime" :width="200" align="center">
|
|
|
+ <a-table-column title="创建时间" data-index="createTime" :width="200" align="center">
|
|
|
<template slot-scope="t">
|
|
|
<span>{{t}}</span>
|
|
|
</template>
|
|
|
</a-table-column>
|
|
|
- <a-table-column title="操作" dataIndex="" align="center">
|
|
|
+ <a-table-column title="操作" data-index align="center">
|
|
|
<template slot-scope="t,r,i">
|
|
|
<a href="javascript:void(0);" @click="detail(r)" style="color: blue">申请详情</a>
|
|
|
<a-divider type="vertical" />
|
|
|
- <span v-if="Boolean(r.isSuspended)" style="cursor: no-drop;color: #999999;" title="流程已被挂起,无法操作!">
|
|
|
- 通过 <a-divider type="vertical" />
|
|
|
- 驳回 <a-divider type="vertical" />
|
|
|
- 委托 <a-divider type="vertical" />
|
|
|
+ <span
|
|
|
+ v-if="Boolean(r.isSuspended)"
|
|
|
+ style="cursor: no-drop;color: #999999;"
|
|
|
+ title="流程已被挂起,无法操作!"
|
|
|
+ >
|
|
|
+ 通过
|
|
|
+ <a-divider type="vertical" />驳回
|
|
|
+ <a-divider type="vertical" />委托
|
|
|
+ <a-divider type="vertical" />
|
|
|
</span>
|
|
|
<span v-else>
|
|
|
<a href="javascript:void(0);" @click="passTask(r)" style="color: green">通过</a>
|
|
@@ -110,21 +128,36 @@
|
|
|
</a-row>
|
|
|
</a-card>
|
|
|
<!---->
|
|
|
- <a-modal title="审批历史" v-model="modalLsVisible" :mask-closable="false" :width="'80%'" :footer="null">
|
|
|
+ <a-modal
|
|
|
+ title="审批历史"
|
|
|
+ v-model="modalLsVisible"
|
|
|
+ :mask-closable="false"
|
|
|
+ :width="'80%'"
|
|
|
+ :footer="null"
|
|
|
+ >
|
|
|
<div v-if="modalLsVisible">
|
|
|
<component :is="historicDetail" :procInstId="procInstId"></component>
|
|
|
</div>
|
|
|
</a-modal>
|
|
|
<!--流程表单-->
|
|
|
- <a-modal :title="lcModa.title" v-model="lcModa.visible" :footer="null" :maskClosable="false" width="80%">
|
|
|
- <component :disabled="lcModa.disabled" v-if="lcModa.visible" :is="lcModa.formComponent"
|
|
|
- :processData="lcModa.processData" :isNew = "lcModa.isNew"
|
|
|
- @close="lcModa.visible=false,lcModa.disabled = false"></component>
|
|
|
+ <a-modal
|
|
|
+ :title="lcModa.title"
|
|
|
+ v-model="lcModa.visible"
|
|
|
+ :footer="null"
|
|
|
+ :maskClosable="false"
|
|
|
+ width="80%"
|
|
|
+ >
|
|
|
+ <k-form-build
|
|
|
+ v-if="lcModa.visible"
|
|
|
+ :defaultValue="defaultValue"
|
|
|
+ :value="jsonData"
|
|
|
+ ref="kfb"
|
|
|
+ disabled
|
|
|
+ />
|
|
|
</a-modal>
|
|
|
<!-- 审批操作 -->
|
|
|
<a-modal :title="modalTaskTitle" v-model="modalTaskVisible" :mask-closable="false" :width="500">
|
|
|
-
|
|
|
- <div v-if="modalTaskVisible">
|
|
|
+ <div v-if="modalTaskVisible">
|
|
|
<a-form ref="form" :model="form" :label-width="85" :rules="formValidate">
|
|
|
<a-form-item label="审批意见" prop="reason">
|
|
|
<a-input type="textarea" v-model="form.comment" :rows="4" />
|
|
@@ -137,7 +170,11 @@
|
|
|
mode="multiple"
|
|
|
:loading="userLoading"
|
|
|
>
|
|
|
- <a-select-option v-for="(item, i) in assigneeList" :key="i" :value="item.id">{{item.username}}</a-select-option>
|
|
|
+ <a-select-option
|
|
|
+ v-for="(item, i) in assigneeList"
|
|
|
+ :key="i"
|
|
|
+ :value="item.id"
|
|
|
+ >{{item.username}}</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
<a-form-item label="下一审批人" v-show="isGateway">
|
|
@@ -145,15 +182,20 @@
|
|
|
</a-form-item>
|
|
|
<div v-show="form.type==1">
|
|
|
<a-form-item label="驳回至">
|
|
|
- <a-select
|
|
|
- v-model="form.backTaskKey"
|
|
|
- :loading="backLoading"
|
|
|
- @change="changeBackTask"
|
|
|
- >
|
|
|
- <a-select-option v-for="(item, i) in backList" :key="i" :value="item.key">{{item.name}}</a-select-option>
|
|
|
+ <a-select v-model="form.backTaskKey" :loading="backLoading" @change="changeBackTask">
|
|
|
+ <a-select-option
|
|
|
+ v-for="(item, i) in backList"
|
|
|
+ :key="i"
|
|
|
+ :value="item.key"
|
|
|
+ >{{item.name}}</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
- <a-form-item label="指定原节点审批人" prop="assignees" v-show="form.backTaskKey!=-1" :error="error">
|
|
|
+ <a-form-item
|
|
|
+ label="指定原节点审批人"
|
|
|
+ prop="assignees"
|
|
|
+ v-show="form.backTaskKey!=-1"
|
|
|
+ :error="error"
|
|
|
+ >
|
|
|
<a-select
|
|
|
v-model="form.assignees"
|
|
|
placeholder="请选择"
|
|
@@ -161,7 +203,11 @@
|
|
|
mode="multiple"
|
|
|
:loading="userLoading"
|
|
|
>
|
|
|
- <a-select-option v-for="(item, i) in assigneeList" :key="i" :value="item.id">{{item.username}}</a-select-option>
|
|
|
+ <a-select-option
|
|
|
+ v-for="(item, i) in assigneeList"
|
|
|
+ :key="i"
|
|
|
+ :value="item.id"
|
|
|
+ >{{item.username}}</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
</div>
|
|
@@ -188,11 +234,13 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
|
import { activitiMixin } from '@/views/activiti/mixins/activitiMixin'
|
|
|
import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
|
|
|
export default {
|
|
|
- name: "todo-manage",
|
|
|
- mixins:[activitiMixin,JeecgListMixin],
|
|
|
- components:{JSelectUserByDep},
|
|
|
+ name: 'todo-manage',
|
|
|
+ mixins: [activitiMixin, JeecgListMixin],
|
|
|
+ components: { JSelectUserByDep },
|
|
|
data() {
|
|
|
return {
|
|
|
+ jsonData: {},
|
|
|
+ defaultValue: {},
|
|
|
openSearch: true,
|
|
|
openTip: true,
|
|
|
loading: true, // 表单加载状态
|
|
@@ -204,29 +252,29 @@ export default {
|
|
|
assigneeList: [],
|
|
|
backList: [
|
|
|
{
|
|
|
- key: "-1",
|
|
|
- name: "发起人"
|
|
|
- }
|
|
|
+ key: '-1',
|
|
|
+ name: '发起人',
|
|
|
+ },
|
|
|
],
|
|
|
- error: "",
|
|
|
+ error: '',
|
|
|
showAssign: false,
|
|
|
searchForm: {
|
|
|
// 搜索框对应data对象
|
|
|
- name: "",
|
|
|
+ name: '',
|
|
|
},
|
|
|
- modalTaskTitle: "",
|
|
|
- modalTitle: "", // 添加或编辑标题
|
|
|
+ modalTaskTitle: '',
|
|
|
+ modalTitle: '', // 添加或编辑标题
|
|
|
form: {
|
|
|
- id: "",
|
|
|
- userId: "",
|
|
|
- procInstId: "",
|
|
|
- comment: "",
|
|
|
+ id: '',
|
|
|
+ userId: '',
|
|
|
+ procInstId: '',
|
|
|
+ comment: '',
|
|
|
type: 0,
|
|
|
assignees: [],
|
|
|
- backTaskKey: "-1",
|
|
|
+ backTaskKey: '-1',
|
|
|
sendMessage: true,
|
|
|
sendSms: false,
|
|
|
- sendEmail: false
|
|
|
+ sendEmail: false,
|
|
|
},
|
|
|
formValidate: {
|
|
|
// 表单验证规则
|
|
@@ -237,317 +285,319 @@ export default {
|
|
|
dictPriority: [],
|
|
|
isGateway: false,
|
|
|
lcModa: {
|
|
|
- title:'',
|
|
|
- disabled:false,
|
|
|
- visible:false,
|
|
|
- formComponent : null,
|
|
|
- isNew : false
|
|
|
+ title: '',
|
|
|
+ disabled: false,
|
|
|
+ visible: false,
|
|
|
+ formComponent: null,
|
|
|
+ isNew: false,
|
|
|
},
|
|
|
- url:{
|
|
|
- todoList:'/actTask/todoList',
|
|
|
- pass:'/actTask/pass',
|
|
|
- back:'/actTask/back',
|
|
|
- backToTask:'/actTask/backToTask',
|
|
|
- delegate:'/actTask/delegate',
|
|
|
- getNextNode:'/activiti_process/getNextNode',
|
|
|
- getNode:'/activiti_process/getNode/',
|
|
|
- getBackList:'/actTask/getBackList/',
|
|
|
- passAll:'/actTask/passAll/',
|
|
|
- backAll:'/actTask/backAll/',
|
|
|
+ url: {
|
|
|
+ todoList: '/actTask/todoList',
|
|
|
+ pass: '/actTask/pass',
|
|
|
+ back: '/actTask/back',
|
|
|
+ backToTask: '/actTask/backToTask',
|
|
|
+ delegate: '/actTask/delegate',
|
|
|
+ getNextNode: '/activiti_process/getNextNode',
|
|
|
+ getNode: '/activiti_process/getNode/',
|
|
|
+ getBackList: '/actTask/getBackList/',
|
|
|
+ passAll: '/actTask/passAll/',
|
|
|
+ backAll: '/actTask/backAll/',
|
|
|
},
|
|
|
/*历史*/
|
|
|
modalLsVisible: false,
|
|
|
- procInstId:''
|
|
|
- };
|
|
|
+ procInstId: '',
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.init();
|
|
|
+ this.init()
|
|
|
},
|
|
|
methods: {
|
|
|
init() {
|
|
|
- this.getDataList();
|
|
|
+ this.getDataList()
|
|
|
},
|
|
|
- loadData(){},
|
|
|
+ loadData() {},
|
|
|
getDataList() {
|
|
|
- this.loading = true;
|
|
|
- this.postFormAction(this.url.todoList,this.searchForm).then(res => {
|
|
|
- this.loading = false;
|
|
|
+ this.loading = true
|
|
|
+ this.postFormAction(this.url.todoList, this.searchForm).then((res) => {
|
|
|
+ this.loading = false
|
|
|
if (res.success) {
|
|
|
- this.data = res.result||[];
|
|
|
- this.total = this.data.leading;
|
|
|
+ this.data = res.result || []
|
|
|
+ this.total = this.data.leading
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
handleTableChange(pagination, filters, sorter) {
|
|
|
//分页、排序、筛选变化时触发
|
|
|
if (Object.keys(sorter).length > 0) {
|
|
|
- this.isorter.column = sorter.field;
|
|
|
- this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
|
|
|
+ this.isorter.column = sorter.field
|
|
|
+ this.isorter.order = 'ascend' == sorter.order ? 'asc' : 'desc'
|
|
|
}
|
|
|
- this.ipagination = pagination;
|
|
|
+ this.ipagination = pagination
|
|
|
// this.loadData();
|
|
|
},
|
|
|
handleSearch() {
|
|
|
- this.getDataList();
|
|
|
+ this.getDataList()
|
|
|
},
|
|
|
handleReset() {
|
|
|
- this.searchForm={};
|
|
|
+ this.searchForm = {}
|
|
|
// 重新加载数据
|
|
|
- this.getDataList();
|
|
|
+ this.getDataList()
|
|
|
},
|
|
|
showSelect(e) {
|
|
|
- this.selectList = e;
|
|
|
- this.selectCount = e.length;
|
|
|
+ this.selectList = e
|
|
|
+ this.selectCount = e.length
|
|
|
},
|
|
|
clearSelectAll() {
|
|
|
- this.$refs.table.selectAll(false);
|
|
|
+ this.$refs.table.selectAll(false)
|
|
|
},
|
|
|
handelSubmit() {
|
|
|
// console.log("提交")
|
|
|
- this.submitLoading = true;
|
|
|
- var formData = Object.assign({},this.form);
|
|
|
- formData.assignees = formData.assignees.join(",");
|
|
|
+ this.submitLoading = true
|
|
|
+ var formData = Object.assign({}, this.form)
|
|
|
+ formData.assignees = formData.assignees.join(',')
|
|
|
if (formData.type == 0) {
|
|
|
// 通过
|
|
|
if (this.showAssign && formData.assignees.length < 1) {
|
|
|
- this.$message.error("请至少选择一个审批人")
|
|
|
- this.submitLoading = false;
|
|
|
- return;
|
|
|
+ this.$message.error('请至少选择一个审批人')
|
|
|
+ this.submitLoading = false
|
|
|
+ return
|
|
|
} else {
|
|
|
- this.error = "";
|
|
|
+ this.error = ''
|
|
|
}
|
|
|
- this.postFormAction(this.url.pass,formData).then(res => {
|
|
|
- this.submitLoading = false;
|
|
|
+ this.postFormAction(this.url.pass, formData).then((res) => {
|
|
|
+ this.submitLoading = false
|
|
|
if (res.success) {
|
|
|
- this.$message.success("操作成功");
|
|
|
- this.modalTaskVisible = false;
|
|
|
- this.getDataList();
|
|
|
+ this.$message.success('操作成功')
|
|
|
+ this.modalTaskVisible = false
|
|
|
+ this.getDataList()
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
} else if (formData.type == 1) {
|
|
|
// 驳回
|
|
|
- if (formData.backTaskKey == "-1") {
|
|
|
+ if (formData.backTaskKey == '-1') {
|
|
|
// 驳回至发起人
|
|
|
- this.postFormAction(this.url.back,formData).then(res => {
|
|
|
- this.submitLoading = false;
|
|
|
+ this.postFormAction(this.url.back, formData).then((res) => {
|
|
|
+ this.submitLoading = false
|
|
|
if (res.success) {
|
|
|
- this.$message.success("操作成功");
|
|
|
- this.modalTaskVisible = false;
|
|
|
- this.getDataList();
|
|
|
+ this.$message.success('操作成功')
|
|
|
+ this.modalTaskVisible = false
|
|
|
+ this.getDataList()
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
} else {
|
|
|
// 自定义驳回
|
|
|
- if (formData.backTaskKey != "-1" && formData.assignees.length < 1) {
|
|
|
- this.$message.error("请至少选择一个审批人")
|
|
|
- this.submitLoading = false;
|
|
|
- return;
|
|
|
+ if (formData.backTaskKey != '-1' && formData.assignees.length < 1) {
|
|
|
+ this.$message.error('请至少选择一个审批人')
|
|
|
+ this.submitLoading = false
|
|
|
+ return
|
|
|
} else {
|
|
|
- this.error = "";
|
|
|
+ this.error = ''
|
|
|
}
|
|
|
- this.postFormAction(this.url.backToTask,formData).then(res => {
|
|
|
- this.submitLoading = false;
|
|
|
+ this.postFormAction(this.url.backToTask, formData).then((res) => {
|
|
|
+ this.submitLoading = false
|
|
|
if (res.success) {
|
|
|
- this.$message.success("操作成功");
|
|
|
- this.modalTaskVisible = false;
|
|
|
- this.getDataList();
|
|
|
+ this.$message.success('操作成功')
|
|
|
+ this.modalTaskVisible = false
|
|
|
+ this.getDataList()
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
}
|
|
|
} else if (formData.type == 2) {
|
|
|
// 委托
|
|
|
if (!formData.userId) {
|
|
|
- this.$message.error("请选择一委托人")
|
|
|
- this.submitLoading = false;
|
|
|
- return;
|
|
|
+ this.$message.error('请选择一委托人')
|
|
|
+ this.submitLoading = false
|
|
|
+ return
|
|
|
} else {
|
|
|
- this.error = "";
|
|
|
+ this.error = ''
|
|
|
}
|
|
|
- this.postFormAction(this.url.delegate,formData).then(res => {
|
|
|
- this.submitLoading = false;
|
|
|
+ this.postFormAction(this.url.delegate, formData).then((res) => {
|
|
|
+ this.submitLoading = false
|
|
|
if (res.success) {
|
|
|
- this.$message.success("操作成功");
|
|
|
- this.modalTaskVisible = false;
|
|
|
- this.getDataList();
|
|
|
+ this.$message.success('操作成功')
|
|
|
+ this.modalTaskVisible = false
|
|
|
+ this.getDataList()
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
detail(r) {
|
|
|
- if (!r.routeName) {
|
|
|
- this.$message.warning(
|
|
|
- "该流程信息未配置表单,请联系开发人员!"
|
|
|
- );
|
|
|
- return;
|
|
|
- }
|
|
|
- this.lcModa.disabled = true;
|
|
|
- this.lcModa.title = '查看流程业务信息:'+r.processName;
|
|
|
- this.lcModa.formComponent = this.getFormComponent(r.routeName).component;
|
|
|
- this.lcModa.processData = r;
|
|
|
- this.lcModa.isNew = false;
|
|
|
- this.lcModa.visible = true;
|
|
|
+ this.getAction('/ctop/actCustomForm/queryById', { id: r.tableId }).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ this.jsonData = JSON.parse(res.result.text)
|
|
|
+ if (this.jsonData) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.defaultValue = JSON.parse(r.tableName)
|
|
|
+ this.$refs.kfb.setData(this.defaultValue)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.jsonData = {}
|
|
|
+ this.$message.warning('该流程信息未配置表单,请联系开发人员!')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.lcModa.disabled = true
|
|
|
+ this.lcModa.title = '查看流程业务信息:' + r.processName
|
|
|
+ this.lcModa.formComponent = this.getFormComponent(r.routeName).component
|
|
|
+ this.lcModa.processData = r
|
|
|
+ this.lcModa.isNew = false
|
|
|
+ this.lcModa.visible = true
|
|
|
},
|
|
|
passTask(v) {
|
|
|
- this.modalTaskTitle = "审批通过";
|
|
|
- this.form.id = v.id;
|
|
|
- this.form.procInstId = v.procInstId;
|
|
|
- this.form.priority = v.priority;
|
|
|
- this.form.type = 0;
|
|
|
- this.modalTaskVisible = true;
|
|
|
- this.userLoading = true;
|
|
|
- this.getAction(this.url.getNextNode,{procDefId:v.procDefId, currActId:v.key}).then(res => {
|
|
|
- this.userLoading = false;
|
|
|
+ this.modalTaskTitle = '审批通过'
|
|
|
+ this.form.id = v.id
|
|
|
+ this.form.procInstId = v.procInstId
|
|
|
+ this.form.priority = v.priority
|
|
|
+ this.form.type = 0
|
|
|
+ this.modalTaskVisible = true
|
|
|
+ this.userLoading = true
|
|
|
+ this.getAction(this.url.getNextNode, { procDefId: v.procDefId, currActId: v.key }).then((res) => {
|
|
|
+ this.userLoading = false
|
|
|
if (res.success) {
|
|
|
if (res.result.type == 3 || res.result.type == 4) {
|
|
|
- this.isGateway = true;
|
|
|
- this.showAssign = false;
|
|
|
- this.error = "";
|
|
|
- return;
|
|
|
+ this.isGateway = true
|
|
|
+ this.showAssign = false
|
|
|
+ this.error = ''
|
|
|
+ return
|
|
|
}
|
|
|
- this.isGateway = false;
|
|
|
+ this.isGateway = false
|
|
|
if (res.result.users && res.result.users.length > 0) {
|
|
|
- this.error = "";
|
|
|
- this.assigneeList = res.result.users;
|
|
|
+ this.error = ''
|
|
|
+ this.assigneeList = res.result.users
|
|
|
// 默认勾选
|
|
|
- let ids = [];
|
|
|
- res.result.users.forEach(e => {
|
|
|
- ids.push(e.username);
|
|
|
- });
|
|
|
- this.form.assignees = ids;
|
|
|
- this.showAssign = true;
|
|
|
+ let ids = []
|
|
|
+ res.result.users.forEach((e) => {
|
|
|
+ ids.push(e.username)
|
|
|
+ })
|
|
|
+ this.form.assignees = ids
|
|
|
+ this.showAssign = true
|
|
|
} else {
|
|
|
- this.form.assignees = [];
|
|
|
- this.showAssign = false;
|
|
|
+ this.form.assignees = []
|
|
|
+ this.showAssign = false
|
|
|
}
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
changeBackTask(v) {
|
|
|
- if (v == "-1") {
|
|
|
- return;
|
|
|
+ if (v == '-1') {
|
|
|
+ return
|
|
|
}
|
|
|
- this.userLoading = true;
|
|
|
- this.getAction(this.url.getNode+v).then(res => {
|
|
|
- this.userLoading = false;
|
|
|
+ this.userLoading = true
|
|
|
+ this.getAction(this.url.getNode + v).then((res) => {
|
|
|
+ this.userLoading = false
|
|
|
if (res.success) {
|
|
|
if (res.result.users && res.result.users.length > 0) {
|
|
|
- this.assigneeList = res.result.users;
|
|
|
+ this.assigneeList = res.result.users
|
|
|
// 默认勾选
|
|
|
- let ids = [];
|
|
|
- res.result.users.forEach(e => {
|
|
|
- ids.push(e.username);
|
|
|
- });
|
|
|
- this.form.assignees = ids;
|
|
|
+ let ids = []
|
|
|
+ res.result.users.forEach((e) => {
|
|
|
+ ids.push(e.username)
|
|
|
+ })
|
|
|
+ this.form.assignees = ids
|
|
|
}
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
backTask(v) {
|
|
|
- this.modalTaskTitle = "审批驳回";
|
|
|
- this.form.id = v.id;
|
|
|
- this.form.procInstId = v.procInstId;
|
|
|
- this.form.procDefId = v.procDefId;
|
|
|
- this.form.priority = v.priority;
|
|
|
- this.form.type = 1;
|
|
|
- this.showAssign = false;
|
|
|
- this.modalTaskVisible = true;
|
|
|
+ this.modalTaskTitle = '审批驳回'
|
|
|
+ this.form.id = v.id
|
|
|
+ this.form.procInstId = v.procInstId
|
|
|
+ this.form.procDefId = v.procDefId
|
|
|
+ this.form.priority = v.priority
|
|
|
+ this.form.type = 1
|
|
|
+ this.showAssign = false
|
|
|
+ this.modalTaskVisible = true
|
|
|
// 获取可驳回节点
|
|
|
this.backList = [
|
|
|
{
|
|
|
- key: "-1",
|
|
|
- name: "发起人"
|
|
|
- }
|
|
|
- ];
|
|
|
- this.form.backTaskKey = "-1";
|
|
|
- this.backLoading = true;
|
|
|
- this.getAction(this.url.getBackList+v.procInstId).then(res => {
|
|
|
- this.backLoading = false;
|
|
|
+ key: '-1',
|
|
|
+ name: '发起人',
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ this.form.backTaskKey = '-1'
|
|
|
+ this.backLoading = true
|
|
|
+ this.getAction(this.url.getBackList + v.procInstId).then((res) => {
|
|
|
+ this.backLoading = false
|
|
|
if (res.success) {
|
|
|
- res.result.forEach(e => {
|
|
|
- this.backList.push(e);
|
|
|
- });
|
|
|
+ res.result.forEach((e) => {
|
|
|
+ this.backList.push(e)
|
|
|
+ })
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
delegateTask(v) {
|
|
|
- this.modalTaskTitle = "委托他人代办";
|
|
|
- this.form.id = v.id;
|
|
|
- this.form.procInstId = v.procInstId;
|
|
|
- this.form.type = 2;
|
|
|
- this.showAssign = false;
|
|
|
- this.modalTaskVisible = true;
|
|
|
+ this.modalTaskTitle = '委托他人代办'
|
|
|
+ this.form.id = v.id
|
|
|
+ this.form.procInstId = v.procInstId
|
|
|
+ this.form.type = 2
|
|
|
+ this.showAssign = false
|
|
|
+ this.modalTaskVisible = true
|
|
|
},
|
|
|
history(v) {
|
|
|
if (!v.procInstId) {
|
|
|
- this.$message.error("流程实例ID不存在");
|
|
|
- return;
|
|
|
+ this.$message.error('流程实例ID不存在')
|
|
|
+ return
|
|
|
}
|
|
|
- this.procInstId = v.procInstId;
|
|
|
- this.modalLsVisible = true;
|
|
|
+ this.procInstId = v.procInstId
|
|
|
+ this.modalLsVisible = true
|
|
|
},
|
|
|
passAll() {
|
|
|
if (this.selectCount <= 0) {
|
|
|
- this.$message.warning("您还未选择要通过的数据");
|
|
|
- return;
|
|
|
+ this.$message.warning('您还未选择要通过的数据')
|
|
|
+ return
|
|
|
}
|
|
|
// 批量通过
|
|
|
- this.modalVisible = true;
|
|
|
+ this.modalVisible = true
|
|
|
this.$confirm({
|
|
|
- title: "确认通过",
|
|
|
- content:
|
|
|
- "您确认要通过所选的 " +
|
|
|
- this.selectCount +
|
|
|
- " 条数据? 注意:将默认分配给节点设定的所有可审批用户",
|
|
|
+ title: '确认通过',
|
|
|
+ content: '您确认要通过所选的 ' + this.selectCount + ' 条数据? 注意:将默认分配给节点设定的所有可审批用户',
|
|
|
loading: true,
|
|
|
onOk: () => {
|
|
|
- let ids = "";
|
|
|
- this.selectList.forEach(function(e) {
|
|
|
- ids += e.id + ",";
|
|
|
- });
|
|
|
- ids = ids.substring(0, ids.length - 1);
|
|
|
- this.postFormAction(this.url.passAll,{ids:ids}).then(res => {
|
|
|
+ let ids = ''
|
|
|
+ this.selectList.forEach(function (e) {
|
|
|
+ ids += e.id + ','
|
|
|
+ })
|
|
|
+ ids = ids.substring(0, ids.length - 1)
|
|
|
+ this.postFormAction(this.url.passAll, { ids: ids }).then((res) => {
|
|
|
if (res.success) {
|
|
|
- this.$message.success("操作成功");
|
|
|
- this.modalVisible = false;
|
|
|
- this.clearSelectAll();
|
|
|
- this.getDataList();
|
|
|
+ this.$message.success('操作成功')
|
|
|
+ this.modalVisible = false
|
|
|
+ this.clearSelectAll()
|
|
|
+ this.getDataList()
|
|
|
}
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
+ })
|
|
|
+ },
|
|
|
+ })
|
|
|
},
|
|
|
backAll() {
|
|
|
if (this.selectCount <= 0) {
|
|
|
- this.$message.warning("您还未选择要驳回的数据");
|
|
|
- return;
|
|
|
+ this.$message.warning('您还未选择要驳回的数据')
|
|
|
+ return
|
|
|
}
|
|
|
// 批量驳回
|
|
|
- this.modalVisible = true;
|
|
|
+ this.modalVisible = true
|
|
|
this.$confirm({
|
|
|
- title: "确认驳回",
|
|
|
- content:
|
|
|
- "您确认要驳回所选的 " +
|
|
|
- this.selectCount +
|
|
|
- " 条数据? 注意:所有流程将驳回至发起人",
|
|
|
+ title: '确认驳回',
|
|
|
+ content: '您确认要驳回所选的 ' + this.selectCount + ' 条数据? 注意:所有流程将驳回至发起人',
|
|
|
loading: true,
|
|
|
onOk: () => {
|
|
|
- let procInstIds = "";
|
|
|
- this.selectList.forEach(function(e) {
|
|
|
- procInstIds += e.procInstId + ",";
|
|
|
- });
|
|
|
- procInstIds = procInstIds.substring(0, procInstIds.length - 1);
|
|
|
- this.postFormAction(this.url.backAll,{procInstIds:procInstIds}).then(res => {
|
|
|
+ let procInstIds = ''
|
|
|
+ this.selectList.forEach(function (e) {
|
|
|
+ procInstIds += e.procInstId + ','
|
|
|
+ })
|
|
|
+ procInstIds = procInstIds.substring(0, procInstIds.length - 1)
|
|
|
+ this.postFormAction(this.url.backAll, { procInstIds: procInstIds }).then((res) => {
|
|
|
if (res.success) {
|
|
|
- this.$message.success("操作成功");
|
|
|
- this.modalVisible = false;
|
|
|
- this.clearSelectAll();
|
|
|
- this.getDataList();
|
|
|
+ this.$message.success('操作成功')
|
|
|
+ this.modalVisible = false
|
|
|
+ this.clearSelectAll()
|
|
|
+ this.getDataList()
|
|
|
}
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ })
|
|
|
+ },
|
|
|
},
|
|
|
-
|
|
|
-};
|
|
|
+}
|
|
|
</script>
|