|
@@ -9,7 +9,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
- <!--<el-table :data="dataList" style="width: 100%" height="480">
|
|
|
|
|
|
+ <el-table :data="dataList" style="width: 100%" height="480">
|
|
<el-table-column
|
|
<el-table-column
|
|
label="实例标题"
|
|
label="实例标题"
|
|
prop="vars.title"
|
|
prop="vars.title"
|
|
@@ -52,10 +52,10 @@
|
|
>
|
|
>
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<el-button type="primary" text @click="todo(scope.row)"
|
|
<el-button type="primary" text @click="todo(scope.row)"
|
|
- >办理</el-button
|
|
|
|
|
|
+ >办理</el-button
|
|
>
|
|
>
|
|
<el-button type="primary" text @click="trace(scope.row)"
|
|
<el-button type="primary" text @click="trace(scope.row)"
|
|
- >进度</el-button
|
|
|
|
|
|
+ >进度</el-button
|
|
>
|
|
>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -83,8 +83,8 @@
|
|
]"
|
|
]"
|
|
@page-change="currentChangeHandle"
|
|
@page-change="currentChangeHandle"
|
|
>
|
|
>
|
|
- </vxe-pager>-->
|
|
|
|
- <div style="height: calc(100% - 55px);margin-top: 5px">
|
|
|
|
|
|
+ </vxe-pager>
|
|
|
|
+ <!--<div style="height: calc(100% - 55px);margin-top: 5px">
|
|
<vxe-table
|
|
<vxe-table
|
|
border="inner"
|
|
border="inner"
|
|
auto-resize
|
|
auto-resize
|
|
@@ -136,7 +136,7 @@
|
|
:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
|
|
:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
|
|
@page-change="currentChangeHandle">
|
|
@page-change="currentChangeHandle">
|
|
</vxe-pager>
|
|
</vxe-pager>
|
|
- </div>
|
|
|
|
|
|
+ </div>-->
|
|
</el-card>
|
|
</el-card>
|
|
<v-dialog
|
|
<v-dialog
|
|
title="查看进度"
|
|
title="查看进度"
|
|
@@ -154,132 +154,132 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-// import FlowChart from '../modeler/FlowChart'
|
|
|
|
-import pick from "lodash.pick";
|
|
|
|
-import UserSelect from "@/components/userSelect/UserSelectDialog";
|
|
|
|
-import taskService from "@/api/flowable/taskService";
|
|
|
|
-export default {
|
|
|
|
- title: "我的待办",
|
|
|
|
- icon: "wodedaiban",
|
|
|
|
- description: "我的待办任务",
|
|
|
|
- layout: {
|
|
|
|
- w: 6,
|
|
|
|
- h: 15,
|
|
|
|
- },
|
|
|
|
- data() {
|
|
|
|
- return {
|
|
|
|
- dataList: [],
|
|
|
|
- tablePage: {
|
|
|
|
- total: 0,
|
|
|
|
- currentPage: 1,
|
|
|
|
- pageSize: 10,
|
|
|
|
- orders: [],
|
|
|
|
- },
|
|
|
|
- loading: false,
|
|
|
|
- visible: false,
|
|
|
|
- currentTask: null,
|
|
|
|
- processInstanceId: "",
|
|
|
|
- timer: null
|
|
|
|
- };
|
|
|
|
- },
|
|
|
|
- mounted() {
|
|
|
|
- // 页面加载后
|
|
|
|
- // 1.在执行定时器前先执行一次获取接口数据的操作函数, 否则接口会1秒钟后才调用
|
|
|
|
- // 2.为了避免退出当前页面后,在其他页面也继续调用接口,退出前需要清除定时器.
|
|
|
|
- this.refreshList();
|
|
|
|
- this.timer = setInterval(() => {
|
|
|
|
- setTimeout(this.refreshList, 0)
|
|
|
|
- }, 60000)
|
|
|
|
- },
|
|
|
|
- beforeDestroy () {
|
|
|
|
- clearInterval(this.timer)
|
|
|
|
- this.timer = null
|
|
|
|
- },
|
|
|
|
- activated() {
|
|
|
|
- this.refreshList();
|
|
|
|
- },
|
|
|
|
- components: {
|
|
|
|
- UserSelect,
|
|
|
|
- // FlowChart
|
|
|
|
- },
|
|
|
|
- methods: {
|
|
|
|
- // 获取数据列表
|
|
|
|
- refreshList() {
|
|
|
|
- this.loading = true;
|
|
|
|
- taskService
|
|
|
|
- .todoList({
|
|
|
|
- current: this.tablePage.currentPage,
|
|
|
|
- size: this.tablePage.pageSize,
|
|
|
|
- orders: this.tablePage.orders,
|
|
|
|
- ...this.searchForm,
|
|
|
|
- })
|
|
|
|
- .then((data) => {
|
|
|
|
- this.dataList = data.records;
|
|
|
|
- this.tablePage.total = data.total;
|
|
|
|
- this.loading = false;
|
|
|
|
- });
|
|
|
|
|
|
+ // import FlowChart from '../modeler/FlowChart'
|
|
|
|
+ import pick from "lodash.pick";
|
|
|
|
+ import UserSelect from "@/components/userSelect/UserSelectDialog";
|
|
|
|
+ import taskService from "@/api/flowable/taskService";
|
|
|
|
+ export default {
|
|
|
|
+ title: "我的待办",
|
|
|
|
+ icon: "wodedaiban",
|
|
|
|
+ description: "我的待办任务",
|
|
|
|
+ layout: {
|
|
|
|
+ w: 6,
|
|
|
|
+ h: 15,
|
|
},
|
|
},
|
|
- // 当前页
|
|
|
|
- currentChangeHandle({ currentPage, pageSize }) {
|
|
|
|
- this.tablePage.currentPage = currentPage;
|
|
|
|
- this.tablePage.pageSize = pageSize;
|
|
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ dataList: [],
|
|
|
|
+ tablePage: {
|
|
|
|
+ total: 0,
|
|
|
|
+ currentPage: 1,
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ orders: [],
|
|
|
|
+ },
|
|
|
|
+ loading: false,
|
|
|
|
+ visible: false,
|
|
|
|
+ currentTask: null,
|
|
|
|
+ processInstanceId: "",
|
|
|
|
+ timer: null
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ mounted() {
|
|
|
|
+ // 页面加载后
|
|
|
|
+ // 1.在执行定时器前先执行一次获取接口数据的操作函数, 否则接口会1秒钟后才调用
|
|
|
|
+ // 2.为了避免退出当前页面后,在其他页面也继续调用接口,退出前需要清除定时器.
|
|
this.refreshList();
|
|
this.refreshList();
|
|
|
|
+ this.timer = setInterval(() => {
|
|
|
|
+ setTimeout(this.refreshList, 0)
|
|
|
|
+ }, 60000)
|
|
},
|
|
},
|
|
- todo(row) {
|
|
|
|
- taskService
|
|
|
|
- .getTaskDef({
|
|
|
|
- taskId: row.task.id,
|
|
|
|
- taskName: row.task.name,
|
|
|
|
- taskDefKey: row.task.taskDefinitionKey,
|
|
|
|
- procInsId: row.task.processInstanceId,
|
|
|
|
- procDefId: row.task.processDefinitionId,
|
|
|
|
- procDefKey: row.task.processDefKey,
|
|
|
|
- status: row.status,
|
|
|
|
- })
|
|
|
|
- .then((data) => {
|
|
|
|
- var cs = "cs"
|
|
|
|
- this.$router.push({
|
|
|
|
- path: "/flowable/task/TaskForm",
|
|
|
|
- query: {
|
|
|
|
- formTitle: `${row.vars.title}`,
|
|
|
|
- title: `审批【${row.task.name || ""}】`,
|
|
|
|
- cs: cs,
|
|
|
|
- ...pick(
|
|
|
|
- data,
|
|
|
|
- "formType",
|
|
|
|
- "formReadOnly",
|
|
|
|
- "formUrl",
|
|
|
|
- "procDefKey",
|
|
|
|
- "taskDefKey",
|
|
|
|
- "procInsId",
|
|
|
|
- "procDefId",
|
|
|
|
- "taskId",
|
|
|
|
- "status",
|
|
|
|
- "title",
|
|
|
|
- "businessId"
|
|
|
|
- ),
|
|
|
|
- },
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
|
|
+ beforeDestroy () {
|
|
|
|
+ clearInterval(this.timer)
|
|
|
|
+ this.timer = null
|
|
|
|
+ },
|
|
|
|
+ activated() {
|
|
|
|
+ this.refreshList();
|
|
},
|
|
},
|
|
- toPendingList () {
|
|
|
|
- // this.$router.push('./PendingList')
|
|
|
|
- this.$router.push({
|
|
|
|
- path: '/flowable/task/TodoList',
|
|
|
|
- })
|
|
|
|
|
|
+ components: {
|
|
|
|
+ UserSelect,
|
|
|
|
+ // FlowChart
|
|
},
|
|
},
|
|
- trace(row) {
|
|
|
|
- this.processInstanceId = row.task.processInstanceId;
|
|
|
|
- this.visible = true;
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
- this.$refs.preview.init();
|
|
|
|
- });
|
|
|
|
|
|
+ methods: {
|
|
|
|
+ // 获取数据列表
|
|
|
|
+ refreshList() {
|
|
|
|
+ this.loading = true;
|
|
|
|
+ taskService
|
|
|
|
+ .todoList({
|
|
|
|
+ current: this.tablePage.currentPage,
|
|
|
|
+ size: this.tablePage.pageSize,
|
|
|
|
+ orders: this.tablePage.orders,
|
|
|
|
+ ...this.searchForm,
|
|
|
|
+ })
|
|
|
|
+ .then((data) => {
|
|
|
|
+ this.dataList = data.records;
|
|
|
|
+ this.tablePage.total = data.total;
|
|
|
|
+ this.loading = false;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ // 当前页
|
|
|
|
+ currentChangeHandle({ currentPage, pageSize }) {
|
|
|
|
+ this.tablePage.currentPage = currentPage;
|
|
|
|
+ this.tablePage.pageSize = pageSize;
|
|
|
|
+ this.refreshList();
|
|
|
|
+ },
|
|
|
|
+ todo(row) {
|
|
|
|
+ taskService
|
|
|
|
+ .getTaskDef({
|
|
|
|
+ taskId: row.task.id,
|
|
|
|
+ taskName: row.task.name,
|
|
|
|
+ taskDefKey: row.task.taskDefinitionKey,
|
|
|
|
+ procInsId: row.task.processInstanceId,
|
|
|
|
+ procDefId: row.task.processDefinitionId,
|
|
|
|
+ procDefKey: row.task.processDefKey,
|
|
|
|
+ status: row.status,
|
|
|
|
+ })
|
|
|
|
+ .then((data) => {
|
|
|
|
+ var cs = "cs"
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: "/flowable/task/TaskForm",
|
|
|
|
+ query: {
|
|
|
|
+ formTitle: `${row.vars.title}`,
|
|
|
|
+ title: `审批【${row.task.name || ""}】`,
|
|
|
|
+ cs: cs,
|
|
|
|
+ ...pick(
|
|
|
|
+ data,
|
|
|
|
+ "formType",
|
|
|
|
+ "formReadOnly",
|
|
|
|
+ "formUrl",
|
|
|
|
+ "procDefKey",
|
|
|
|
+ "taskDefKey",
|
|
|
|
+ "procInsId",
|
|
|
|
+ "procDefId",
|
|
|
|
+ "taskId",
|
|
|
|
+ "status",
|
|
|
|
+ "title",
|
|
|
|
+ "businessId"
|
|
|
|
+ ),
|
|
|
|
+ },
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ toPendingList () {
|
|
|
|
+ // this.$router.push('./PendingList')
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: '/flowable/task/TodoList',
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ trace(row) {
|
|
|
|
+ this.processInstanceId = row.task.processInstanceId;
|
|
|
|
+ this.visible = true;
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.$refs.preview.init();
|
|
|
|
+ });
|
|
|
|
+ },
|
|
},
|
|
},
|
|
- },
|
|
|
|
-};
|
|
|
|
|
|
+ };
|
|
</script>
|
|
</script>
|
|
<style scoped>
|
|
<style scoped>
|
|
-.box-card {
|
|
|
|
- height: 100%;
|
|
|
|
-}
|
|
|
|
|
|
+ .box-card {
|
|
|
|
+ height: 100%;
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|