<template>
|
<div class="app-container">
|
|
|
<el-table v-loading="loading" :data="tastList">
|
<!-- <el-table-column label="流程ID" align="center" prop="id"/>-->
|
<el-table-column label="流程名称" align="left" prop="title"/>
|
<el-table-column label="任务名称" align="left" prop="taskName"/>
|
<el-table-column label="任务标识" align="left" prop="taskDefineKey"/>
|
<el-table-column label="执行人" align="left" prop="assignee"/>
|
<el-table-column label="代理人" align="left" prop="owner"/>
|
<el-table-column label="任务开始" align="left" prop="startTime"/>
|
<el-table-column label="任务完成" align="left" prop="endTime"/>
|
<el-table-column label="流程结束" align="left" prop="processEnd"/>
|
<el-table-column label="业务编号" align="left" prop="businessKey"/>
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<template slot-scope="scope">
|
<el-button
|
size="mini"
|
type="text"
|
icon="el-icon-edit"
|
@click="showApprove(scope.row)"
|
v-hasPermi="['wf:task:**']"
|
>查看
|
</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
|
<pagination
|
v-show="total>0"
|
:total="total"
|
:page.sync="queryParams.pageNum"
|
:limit.sync="queryParams.pageSize"
|
@pagination="getList"
|
/>
|
|
<!-- 展示审批历史 -->
|
<el-dialog :title="title" :visible.sync="open" v-if="open" width="800px" append-to-body>
|
<!-- <leaveHistoryForm :businessKey="businessKey" v-if="'leave'==definitionKey"/>-->
|
<!-- <el-form :model="form" ref="form" label-width="100px" class="demo-dynamic">-->
|
<!-- <el-form-item-->
|
<!-- v-for="(domain, index) in form.formData"-->
|
<!-- :label="domain.controlLable"-->
|
<!-- :key="index"-->
|
<!-- >-->
|
<!-- <el-radio-group v-model="domain.controlValue" v-if="'radio'==domain.controlType">-->
|
<!-- <el-radio v-for="(defaults,indexd) in domain.controlDefault.split('--__--')"-->
|
<!-- :label=indexd-->
|
<!-- :key="indexd"-->
|
<!-- >{{defaults}}-->
|
|
<!-- </el-radio>-->
|
|
<!-- </el-radio-group>-->
|
<!-- <el-input type="textarea" v-model="domain.controlValue" v-if="'textarea'==domain.controlType"-->
|
<!-- ></el-input>-->
|
<!-- </el-form-item>-->
|
<!-- </el-form>-->
|
<div v-for="(approve, index) in approveList"
|
:key="index" >
|
<h2>
|
----------------------------------
|
{{approve.taskName}}
|
</h2>
|
<h3>任务开始:{{approve.startTime}},任务结束:{{approve.endTime}}</h3>
|
<h3 v-if="approve.taskCount==1">办理人:{{approve.assignee}},意见:{{approve.approveSummary}}</h3>
|
<h3 v-if="approve.taskCount==1">办理时间:{{approve.approveTime}}</h3>
|
<el-form v-for="(approveItem, indexH) in approve.children" :key="indexH" label-width="80px" v-if="approve.taskCount>1">
|
<h3>办理人:{{approveItem.assignee}},意见:{{approveItem.approveSummary}}</h3>
|
<h3>办理时间:{{approveItem.approveTime}}</h3>
|
<!-- <el-form-item :label=approveItem.assignee v-if="approveItem.assignee !=''">-->
|
<!-- <el-input v-model="approveItem.approveTime"/>-->
|
<!-- </el-form-item>-->
|
</el-form>
|
</div>
|
|
<div slot="footer" class="dialog-footer">
|
<!-- <el-button type="primary" @click="submitForm">确 定</el-button>-->
|
<el-button @click="cancel">关 闭</el-button>
|
</div>
|
</el-dialog>
|
</div>
|
</template>
|
|
<script>
|
|
import {listDone, listApprove, formDataShow, formDataSave} from "@/api/activiti/task";
|
// import leaveHistoryForm from "@/views/workflow/leave/leaveHistoryForm";
|
|
export default {
|
name: "DoneTask",
|
// components: {leaveHistoryForm},
|
data() {
|
return {
|
id:'',
|
definitionKey: '',
|
businessKey: '',
|
// 遮罩层
|
loading: true,
|
// 选中数组
|
ids: [],
|
// 非单个禁用
|
single: true,
|
// 非多个禁用
|
multiple: true,
|
// 显示搜索条件
|
showSearch: true,
|
// 总条数
|
total: 0,
|
// 请假表格数据
|
tastList: [],
|
|
// 审批历史集合,2023-04-03
|
approveList: [],
|
|
// 弹出层标题
|
title: "",
|
// 是否显示弹出层
|
open: false,
|
// 查询参数
|
queryParams: {
|
pageNum: 1,
|
pageSize: 10,
|
},
|
// 表单参数
|
form: {
|
formData:[]
|
},
|
// 表单校验
|
rules: {}
|
};
|
},
|
created() {
|
this.getList();
|
},
|
methods: {
|
/** 查询请假列表 */
|
getList() {
|
this.loading = true;
|
listDone(this.queryParams).then(response => {
|
this.tastList = response.data;
|
this.total = response.total;
|
this.loading = false;
|
});
|
},
|
|
/** 查询审批历史集合 */
|
getApproveList(processInstanceId){
|
this.loading = true;
|
listApprove(processInstanceId).then(response => {
|
this.approveList = response.data;
|
this.loading = false;
|
});
|
},
|
|
// 取消按钮
|
cancel() {
|
this.open = false;
|
this.reset();
|
},
|
// 表单重置
|
reset() {
|
this.definitionKey = '',
|
this.businessKey = '',
|
this.form = {
|
formData:[],
|
};
|
this.resetForm("form");
|
},
|
|
/** 展示审批列表 */
|
showApprove(row) {
|
console.log("processInstanceId = " + row.processInstanceId)
|
this.reset();
|
this.definitionKey = row.definitionKey;
|
this.businessKey = row.businessKey;
|
this.id=row.id;
|
this.getApproveList(row.processInstanceId);
|
this.open = true;
|
this.title = "审批历史";
|
}
|
|
// /** 提交按钮 */
|
// submitForm() {
|
// formDataSave(this.id,this.form.formData).then(response => {
|
// this.$modal.msgSuccess("审批成功");
|
// this.open = false;
|
// this.getList();
|
// });
|
// },
|
}
|
};
|
</script>
|