阅行客电子档案
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

147 lines
4.4 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div>
  3. <!--工具栏-->
  4. <div class="head-container">
  5. <div class="head-search">
  6. <el-input v-model="query.name" clearable size="small" placeholder="输入发起人名" prefix-icon="el-icon-search" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
  7. <el-select
  8. v-model="query.value1"
  9. multiple
  10. collapse-tags
  11. placeholder="请选择"
  12. >
  13. <el-option
  14. v-for="item in options"
  15. :key="item.value"
  16. :label="item.label"
  17. :value="item.value"
  18. />
  19. </el-select>
  20. <date-range-picker v-model="query.createTime" class="date-item" />
  21. <rrOperation />
  22. </div>
  23. </div>
  24. <!--表格渲染-->
  25. <el-table
  26. ref="table"
  27. v-loading="crud.loading"
  28. :data="crud.data"
  29. row-key="id"
  30. @select="crud.selectChange"
  31. @select-all="crud.selectAllChange"
  32. @cell-dblclick="tableDoubleClick"
  33. @selection-change="crud.selectionChangeHandler"
  34. >
  35. <el-table-column label="发起时间" prop="startTime" align="center" width="160">
  36. <template slot-scope="scope">
  37. <div>{{ scope.row.startTime | parseTime }}</div>
  38. </template>
  39. </el-table-column>
  40. <el-table-column label="发起人" prop="promoter" align="center" width="140" />
  41. <el-table-column label="流程名称" prop="flowableName" align="center" />
  42. <el-table-column label="当前节点" prop="currentNode" align="center" />
  43. <el-table-column label="下一节点" prop="nextNode" align="center" />
  44. <el-table-column label="结束时间" prop="endTime" align="center" width="160">
  45. <template slot-scope="scope">
  46. <div v-if="scope.row.endTime">{{ scope.row.endTime | parseTime }}</div>
  47. <div v-else>-</div>
  48. </template>
  49. </el-table-column>
  50. <el-table-column label="流程状态" prop="status" align="center" width="140">
  51. <template slot-scope="scope">
  52. <div v-if="scope.row.endTime" class="row-state active-state">已完成</div>
  53. <div v-else class="row-state disabled-state">已取消</div>
  54. </template>
  55. </el-table-column>
  56. </el-table>
  57. <!--分页组件-->
  58. <pagination v-if="crud.data.length!==0" />
  59. <Detail ref="processDetail" />
  60. </div>
  61. </template>
  62. <script>
  63. import CRUD, { presenter, header, crud } from '@crud/crud'
  64. import rrOperation from '@crud/RR.operation'
  65. import DateRangePicker from '@/components/DateRangePicker'
  66. import pagination from '@crud/Pagination'
  67. import Detail from '../runningProcess/module/detail'
  68. export default {
  69. name: 'RunningProcess',
  70. components: { rrOperation, DateRangePicker, pagination, Detail },
  71. cruds() {
  72. return CRUD({ title: '运行中流程', url: 'api/flowable/getFlowList', crudMethod: {}})
  73. },
  74. mixins: [presenter(), header(), crud()],
  75. data() {
  76. return {
  77. options: [{
  78. value: '选项1',
  79. label: '流程A'
  80. }, {
  81. value: '选项2',
  82. label: '流程B'
  83. }, {
  84. value: '选项3',
  85. label: '流程C'
  86. }, {
  87. value: '选项4',
  88. label: '流程D'
  89. }],
  90. permission: {
  91. add: ['admin', 'dept:add'],
  92. edit: ['admin', 'dept:edit'],
  93. del: ['admin', 'dept:del']
  94. }
  95. }
  96. },
  97. methods: {
  98. [CRUD.HOOK.beforeRefresh]() {
  99. this.crud.query.isEnd = true
  100. },
  101. // table - 双击查看详情
  102. tableDoubleClick(row) {
  103. this.$refs.processDetail.detailVisible = true
  104. }
  105. }
  106. }
  107. </script>
  108. <style lang="scss" scoped>
  109. @mixin table-fixed-status-style{
  110. [data-theme="dark"] & {
  111. &.active-state{
  112. color: #1aae93;
  113. border: 1px solid #1aae93;
  114. }
  115. &.disabled-state{
  116. color: #ED4A41;
  117. border: 1px solid #FFA5A0;
  118. opacity: 0.6;
  119. }
  120. }
  121. [data-theme="light"] & {
  122. &.active-state{
  123. color: #2ECAAC;
  124. background-color: #E8F8F5;
  125. border: 1px solid #B1EBDF;
  126. }
  127. &.disabled-state{
  128. color: #ED4A41;
  129. background-color: #FFEBEA;
  130. border: 1px solid #FFA5A0;
  131. }
  132. }
  133. }
  134. .row-state{
  135. display: inline-block;
  136. padding: 0 4px;
  137. height: 20px;
  138. line-height: 20px;
  139. text-align: center;
  140. font-size: 12px;
  141. border-radius: 3px;
  142. @include table-fixed-status-style;
  143. }
  144. </style>