综合办公系统
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
  4. <el-form-item label="名称" prop="name">
  5. <el-input v-model="queryParams.name" placeholder="请输入名称" clearable size="small"
  6. @keyup.enter.native="handleQuery" />
  7. </el-form-item>
  8. <el-form-item label="开始时间" prop="deployTime">
  9. <el-date-picker clearable size="small" v-model="queryParams.deployTime" type="date" value-format="yyyy-MM-dd"
  10. placeholder="选择时间">
  11. </el-date-picker>
  12. </el-form-item>
  13. <el-form-item>
  14. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  15. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  16. </el-form-item>
  17. </el-form>
  18. <el-row :gutter="10" class="mb8">
  19. <el-col :span="1.5">
  20. <!-- <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
  21. v-hasPermi="['system:deployment:remove']">删除
  22. </el-button> -->
  23. </el-col>
  24. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  25. </el-row>
  26. <el-table v-loading="loading" :data="todoList" border @selection-change="handleSelectionChange">
  27. <el-table-column type="selection" width="55" align="center" />
  28. <el-table-column label="任务编号" align="center" prop="taskId" :show-overflow-tooltip="true" />
  29. <el-table-column label="流程名称" align="center" prop="procDefName" />
  30. <el-table-column label="当前节点" align="center" prop="taskName" />
  31. <!-- <el-table-column label="流程版本" align="center">
  32. <template slot-scope="scope">
  33. <el-tag size="medium">v{{ scope.row.procDefVersion }}</el-tag>
  34. </template>
  35. </el-table-column> -->
  36. <el-table-column label="流程发起人" align="center">
  37. <template slot-scope="scope">
  38. <label>{{ scope.row.startUserName }} <el-tag type="info" size="mini">{{ scope.row.startDeptName
  39. }}</el-tag></label>
  40. </template>
  41. </el-table-column>
  42. <el-table-column label="接收时间" align="center" prop="createTime" width="180" />
  43. <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  44. <template slot-scope="scope">
  45. <el-button size="mini" type="text" icon="el-icon-edit-outline" @click="handleProcess(scope.row)">处理
  46. </el-button>
  47. </template>
  48. </el-table-column>
  49. </el-table>
  50. <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
  51. @pagination="getList" />
  52. </div>
  53. </template>
  54. <script>
  55. import {
  56. todoList,
  57. complete,
  58. returnList,
  59. returnTask,
  60. rejectTask,
  61. getDeployment,
  62. delDeployment,
  63. exportDeployment
  64. } from "@/api/flowable/todo";
  65. import { getProcessVariables } from "@/api/flowable/definition";
  66. export default {
  67. name: "Deploy",
  68. components: {},
  69. data() {
  70. return {
  71. // 遮罩层
  72. loading: true,
  73. // 选中数组
  74. ids: [],
  75. // 非单个禁用
  76. single: true,
  77. // 非多个禁用
  78. multiple: true,
  79. // 显示搜索条件
  80. showSearch: true,
  81. // 总条数
  82. total: 0,
  83. // 流程待办任务表格数据
  84. todoList: [],
  85. // 弹出层标题
  86. title: "",
  87. // 是否显示弹出层
  88. open: false,
  89. // 查询参数
  90. queryParams: {
  91. pageNum: 1,
  92. pageSize: 10,
  93. name: null,
  94. category: null
  95. },
  96. // 表单参数
  97. form: {},
  98. // 表单校验
  99. rules: {}
  100. };
  101. },
  102. created() {
  103. this.getList();
  104. },
  105. methods: {
  106. /** 查询流程定义列表 */
  107. getList() {
  108. this.loading = true;
  109. todoList(this.queryParams).then(response => {
  110. this.todoList = response.data.records;
  111. this.total = response.data.total;
  112. this.loading = false;
  113. });
  114. },
  115. // 跳转到处理页面
  116. handleProcess(row) {
  117. getProcessVariables(row.taskId).then(res => {
  118. this.$router.push({
  119. path: '/flowable/task/todo/detail/index',
  120. query: {
  121. procInsId: row.procInsId,
  122. executionId: row.executionId,
  123. deployId: row.deployId,
  124. taskId: row.taskId,
  125. taskName: row.taskName,
  126. startUser: row.startUserName + '-' + row.startDeptName,
  127. formId: res.data.formId,
  128. procDefName: row.procDefName
  129. }
  130. })
  131. })
  132. },
  133. // 取消按钮
  134. cancel() {
  135. this.open = false;
  136. this.reset();
  137. },
  138. // 表单重置
  139. reset() {
  140. this.form = {
  141. id: null,
  142. name: null,
  143. category: null,
  144. key: null,
  145. tenantId: null,
  146. deployTime: null,
  147. derivedFrom: null,
  148. derivedFromRoot: null,
  149. parentDeploymentId: null,
  150. engineVersion: null
  151. };
  152. this.resetForm("form");
  153. },
  154. /** 搜索按钮操作 */
  155. handleQuery() {
  156. this.queryParams.pageNum = 1;
  157. this.getList();
  158. },
  159. /** 重置按钮操作 */
  160. resetQuery() {
  161. this.resetForm("queryForm");
  162. this.handleQuery();
  163. },
  164. // 多选框选中数据
  165. handleSelectionChange(selection) {
  166. this.ids = selection.map(item => item.taskId)
  167. this.single = selection.length !== 1
  168. this.multiple = !selection.length
  169. },
  170. /** 删除按钮操作 */
  171. handleDelete(row) {
  172. const ids = row.taskId || this.ids;
  173. this.$confirm('是否确认删除流程定义编号为"' + ids + '"的数据项?', "警告", {
  174. confirmButtonText: "确定",
  175. cancelButtonText: "取消",
  176. type: "warning"
  177. }).then(function () {
  178. return delDeployment(ids);
  179. }).then(() => {
  180. this.getList();
  181. this.$modal.msgSuccess("删除成功");
  182. })
  183. },
  184. }
  185. };
  186. </script>