|
|
@@ -169,15 +169,27 @@ export default {
|
|
|
this.loadData()
|
|
|
},
|
|
|
methods: {
|
|
|
+ removeDesc (str) {
|
|
|
+ const parts = str.split('#')
|
|
|
+ if (parts.length > 2) {
|
|
|
+ return parts.slice(0, 2).join('#') + '#'
|
|
|
+ } else {
|
|
|
+ return str
|
|
|
+ }
|
|
|
+ },
|
|
|
getProcDefId (data) {
|
|
|
this.procDefIdSelect = data
|
|
|
},
|
|
|
/**
|
|
|
- * 加载数据
|
|
|
- */
|
|
|
+ * 加载数据
|
|
|
+ */
|
|
|
loadData () {
|
|
|
this.loading = true
|
|
|
pending4Assignee(this.getFormatParams()).then(response => {
|
|
|
+ const { dataResult = [] } = response.data || {}
|
|
|
+ dataResult.forEach(i => {
|
|
|
+ i.subject = this.removeDesc(i.subject)
|
|
|
+ })
|
|
|
ActionUtils.handleListData(this, response.data)
|
|
|
this.loading = false
|
|
|
}).catch(() => {
|
|
|
@@ -185,8 +197,8 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
/**
|
|
|
- * 获取格式化参数
|
|
|
- */
|
|
|
+ * 获取格式化参数
|
|
|
+ */
|
|
|
getFormatParams () {
|
|
|
const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
|
|
|
if (this.$utils.isNotEmpty(this.procDefIdSelect)) {
|
|
|
@@ -201,15 +213,15 @@ export default {
|
|
|
this.sorts)
|
|
|
},
|
|
|
/**
|
|
|
- * 处理分页事件
|
|
|
- */
|
|
|
+ * 处理分页事件
|
|
|
+ */
|
|
|
handlePaginationChange (page) {
|
|
|
ActionUtils.setPagination(this.pagination, page)
|
|
|
this.loadData()
|
|
|
},
|
|
|
/**
|
|
|
- * 处理排序
|
|
|
- */
|
|
|
+ * 处理排序
|
|
|
+ */
|
|
|
handleSortChange (sort) {
|
|
|
ActionUtils.setSorts(this.sorts, sort)
|
|
|
this.loadData()
|
|
|
@@ -218,21 +230,21 @@ export default {
|
|
|
this.loadData()
|
|
|
},
|
|
|
/**
|
|
|
- * 重置查询条件
|
|
|
- */
|
|
|
+ * 重置查询条件
|
|
|
+ */
|
|
|
reset () {
|
|
|
this.$refs['crud'].handleReset()
|
|
|
},
|
|
|
/**
|
|
|
- * 点击表格
|
|
|
- */
|
|
|
+ * 点击表格
|
|
|
+ */
|
|
|
handleLinkClick (data, columns) {
|
|
|
this.taskId = data.taskId || ''
|
|
|
this.dialogFormVisible = true
|
|
|
},
|
|
|
/**
|
|
|
- * 处理按钮事件
|
|
|
- */
|
|
|
+ * 处理按钮事件
|
|
|
+ */
|
|
|
handleAction (command, position, selection, data) {
|
|
|
switch (command) {
|
|
|
case 'search':// 查询
|
|
|
@@ -276,16 +288,16 @@ export default {
|
|
|
this.loadData()
|
|
|
},
|
|
|
/**
|
|
|
- * 处理批量审批
|
|
|
- */
|
|
|
+ * 处理批量审批
|
|
|
+ */
|
|
|
handleBatchApprove (id = '', action = 'agree') {
|
|
|
this.taskId = id
|
|
|
this.action = action
|
|
|
this.approveDialogVisible = true
|
|
|
},
|
|
|
/**
|
|
|
- * 批量挂起任务
|
|
|
- */
|
|
|
+ * 批量挂起任务
|
|
|
+ */
|
|
|
handleSuspend (ids) {
|
|
|
this.$confirm('确认批量挂起流程任务?', '信息').then(() => {
|
|
|
batchSuspendProcess({ taskIds: ids }).then(() => {
|
|
|
@@ -297,8 +309,8 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
/**
|
|
|
- * 批量挂起任务
|
|
|
- */
|
|
|
+ * 批量挂起任务
|
|
|
+ */
|
|
|
handleRecover (ids) {
|
|
|
this.$confirm('确认批量恢复流程任务?', '信息').then(() => {
|
|
|
batchRecoverProcess({ taskIds: ids }).then(() => {
|