tableCol.vue 6.7 KB

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