index.vue 6.8 KB

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