|
@@ -1,13 +1,35 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="main-container">
|
|
<div class="main-container">
|
|
|
- <ibps-crud ref="crud" :height="height" :data="listData" :toolbars="listConfig.toolbars" :search-form="listConfig.searchForm" :pk-key="pkKey" :columns="listConfig.columns" :pagination="pagination" :loading="loading" :displayField="title" :index-row="false" @action-event="handleAction" @column-link-click="handleLinkClick" @sort-change="handleSortChange" @pagination-change="handlePaginationChange" />
|
|
|
|
|
-
|
|
|
|
|
- <edit :id="editId" :title="title" :readonly="readonly" :visible="dialogFormVisible" @callback="search" @close="(visible) => (dialogFormVisible = visible)" />
|
|
|
|
|
|
|
+ <ibps-crud
|
|
|
|
|
+ ref="crud"
|
|
|
|
|
+ :height="height"
|
|
|
|
|
+ :data="listData"
|
|
|
|
|
+ :toolbars="listConfig.toolbars"
|
|
|
|
|
+ :search-form="listConfig.searchForm"
|
|
|
|
|
+ :pk-key="pkKey"
|
|
|
|
|
+ :columns="listConfig.columns"
|
|
|
|
|
+ :pagination="pagination"
|
|
|
|
|
+ :loading="loading"
|
|
|
|
|
+ :display-field="title"
|
|
|
|
|
+ :index-row="false"
|
|
|
|
|
+ @action-event="handleAction"
|
|
|
|
|
+ @column-link-click="handleLinkClick"
|
|
|
|
|
+ @sort-change="handleSortChange"
|
|
|
|
|
+ @pagination-change="handlePaginationChange"
|
|
|
|
|
+ />
|
|
|
|
|
+ <edit
|
|
|
|
|
+ :id="editId"
|
|
|
|
|
+ :title="title"
|
|
|
|
|
+ :readonly="readonly"
|
|
|
|
|
+ :visible="dialogFormVisible"
|
|
|
|
|
+ @callback="search"
|
|
|
|
|
+ @close="(visible) => (dialogFormVisible = visible)"
|
|
|
|
|
+ />
|
|
|
<bpmn-formrender :visible="formrenderDialogFormVisible" :instance-id="instanceId" :task-change-id="editId" @close="(visible) => (formrenderDialogFormVisible = visible)" />
|
|
<bpmn-formrender :visible="formrenderDialogFormVisible" :instance-id="instanceId" :task-change-id="editId" @close="(visible) => (formrenderDialogFormVisible = visible)" />
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
- <script>
|
|
|
|
|
|
|
+<script>
|
|
|
import { queryPageList, setStatus } from '@/api/platform/bpmn/bpmTaskChange'
|
|
import { queryPageList, setStatus } from '@/api/platform/bpmn/bpmTaskChange'
|
|
|
import ActionUtils from '@/utils/action'
|
|
import ActionUtils from '@/utils/action'
|
|
|
import FixHeight from '@/mixins/height'
|
|
import FixHeight from '@/mixins/height'
|
|
@@ -23,7 +45,7 @@ export default {
|
|
|
BpmnFormrender
|
|
BpmnFormrender
|
|
|
},
|
|
},
|
|
|
mixins: [FixHeight],
|
|
mixins: [FixHeight],
|
|
|
- data() {
|
|
|
|
|
|
|
+ data () {
|
|
|
return {
|
|
return {
|
|
|
dialogFormVisible: false, // 弹窗
|
|
dialogFormVisible: false, // 弹窗
|
|
|
editId: '', // 编辑dialog需要使用
|
|
editId: '', // 编辑dialog需要使用
|
|
@@ -67,17 +89,17 @@ export default {
|
|
|
},
|
|
},
|
|
|
// 表格字段配置
|
|
// 表格字段配置
|
|
|
columns: [
|
|
columns: [
|
|
|
- { prop: 'taskSubject', label: '事务名称', link: 'dialog' },
|
|
|
|
|
- { prop: 'taskSubjectName', label: '事务说明', width: 350 },
|
|
|
|
|
- { prop: 'executorName', label: '代理人', width: 120 },
|
|
|
|
|
- { prop: 'createTime', label: '事务创建时间', width: 150 },
|
|
|
|
|
- // { prop: 'taskName', label: '任务名称', width: 250 },
|
|
|
|
|
- { prop: 'status', label: '状态', tags: statusOptions, width: 150 },
|
|
|
|
|
- { prop: 'ownerName', label: '委托人', width: 120 },
|
|
|
|
|
- // { prop: 'createTime', label: '创建时间', width: 150 }
|
|
|
|
|
- { prop: 'startTime', label: '代理生效时间', width: 150 },
|
|
|
|
|
- { prop: 'endTime', label: '代理截止时间', width: 150 },
|
|
|
|
|
- { prop: 'changeType', label: '更改类型', tags: typeOptions, width: 120 }
|
|
|
|
|
|
|
+ { prop: 'taskSubject', label: '事务名称', link: 'dialog', width: 200 },
|
|
|
|
|
+ { prop: 'taskSubjectName', label: '事务说明', minWidth: 250 },
|
|
|
|
|
+ { prop: 'createTime', label: '事务创建时间', sortable: 'custom', width: 140 },
|
|
|
|
|
+ { prop: 'status', label: '状态', tags: statusOptions, width: 80 },
|
|
|
|
|
+ { prop: 'ownerName', label: '委托人', width: 90 },
|
|
|
|
|
+ // { prop: 'executorName', label: '代理人', width: 90 },
|
|
|
|
|
+ // { prop: 'taskName', label: '任务名称', width: 250 },
|
|
|
|
|
+ // { prop: 'createTime', label: '创建时间', width: 150 }
|
|
|
|
|
+ // { prop: 'startTime', label: '代理生效时间', sortable: 'custom', width: 120 },
|
|
|
|
|
+ // { prop: 'endTime', label: '代理截止时间', sortable: 'custom', width: 120 },
|
|
|
|
|
+ { prop: 'changeType', label: '更改类型', tags: typeOptions, width: 100 }
|
|
|
],
|
|
],
|
|
|
rowHandle: {
|
|
rowHandle: {
|
|
|
actions: [
|
|
actions: [
|
|
@@ -85,14 +107,14 @@ export default {
|
|
|
key: 'revoke',
|
|
key: 'revoke',
|
|
|
label: '撤回',
|
|
label: '撤回',
|
|
|
icon: 'ibps-icon-cancel',
|
|
icon: 'ibps-icon-cancel',
|
|
|
- hidden: function (row, index) {
|
|
|
|
|
|
|
+ hidden (row, index) {
|
|
|
if (row.ownerId === this.$store.getters.userId && row.status === 'running') return false
|
|
if (row.ownerId === this.$store.getters.userId && row.status === 'running') return false
|
|
|
return true
|
|
return true
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
key: 'detail',
|
|
key: 'detail',
|
|
|
- hidden: function (row, index) {
|
|
|
|
|
|
|
+ hidden (row, index) {
|
|
|
if (row.ownerId === this.$store.getters.userId) return false
|
|
if (row.ownerId === this.$store.getters.userId) return false
|
|
|
return true
|
|
return true
|
|
|
}
|
|
}
|
|
@@ -102,44 +124,39 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- created() {
|
|
|
|
|
|
|
+ created () {
|
|
|
this.loadData()
|
|
this.loadData()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
// 加载数据
|
|
// 加载数据
|
|
|
- loadData() {
|
|
|
|
|
|
|
+ loadData () {
|
|
|
this.loading = true
|
|
this.loading = true
|
|
|
- queryPageList(this.getSearcFormData())
|
|
|
|
|
- .then((response) => {
|
|
|
|
|
- response.data.dataResult.forEach((item) => {
|
|
|
|
|
- if (item.completeTime) {
|
|
|
|
|
- item.completeTime = item.completeTime.split(' ')[0]
|
|
|
|
|
- }
|
|
|
|
|
- let taskSubject = item.taskSubject.split('#')
|
|
|
|
|
- item.taskSubject = taskSubject[0]
|
|
|
|
|
- this.$set(item, 'taskSubjectName', taskSubject[1])
|
|
|
|
|
- if (item.changeType == 'assignee' && item.ownerId && item.executorId) {
|
|
|
|
|
- this.getDaiLi(item.ownerId, item.executorId, item.createTime, (ruselt) => {
|
|
|
|
|
- if (ruselt.length > 0) {
|
|
|
|
|
- this.$set(item, 'startTime', dayjs(ruselt[0].EFFECTIVE_TIME_).format('YYYY-MM-DD'))
|
|
|
|
|
- this.$set(item, 'endTime', dayjs(ruselt[0].EXPIRY_TIME).format('YYYY-MM-DD'))
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- ActionUtils.handleListData(this, response.data)
|
|
|
|
|
- this.loading = false
|
|
|
|
|
- })
|
|
|
|
|
- .catch(() => {
|
|
|
|
|
- this.loading = false
|
|
|
|
|
|
|
+ queryPageList(this.getSearcFormData()).then((response) => {
|
|
|
|
|
+ response.data.dataResult.forEach((item) => {
|
|
|
|
|
+ const taskSubject = item.taskSubject.split('#')
|
|
|
|
|
+ item.taskSubject = taskSubject[0]
|
|
|
|
|
+ this.$set(item, 'taskSubjectName', taskSubject[1])
|
|
|
|
|
+ // if (item.changeType === 'assignee' && item.ownerId && item.executorId) {
|
|
|
|
|
+ // this.getDaiLi(item.ownerId, item.executorId, item.createTime, (result) => {
|
|
|
|
|
+ // if (result.length) {
|
|
|
|
|
+ // this.$set(item, 'startTime', result[0].EFFECTIVE_TIME_)
|
|
|
|
|
+ // this.$set(item, 'endTime', result[0].EXPIRY_TIME_)
|
|
|
|
|
+ // }
|
|
|
|
|
+ // })
|
|
|
|
|
+ // }
|
|
|
})
|
|
})
|
|
|
|
|
+ ActionUtils.handleListData(this, response.data)
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
- //反查代理数据
|
|
|
|
|
- getDaiLi(val1, val2, createTime, callback) {
|
|
|
|
|
- let sql = `select * from ibps_bpm_agent where DELEGATOR_ID_ = '${val1}' and AGENTER_ID_ = '${val2}' and IS_ENABLED_ = 'enabled' and DATE_FORMAT('${createTime}','%Y-%m-%d') BETWEEN EFFECTIVE_TIME_ and EXPIRY_TIME_`
|
|
|
|
|
|
|
+ // 反查代理数据
|
|
|
|
|
+ getDaiLi (val1, val2, createTime, callback) {
|
|
|
|
|
+ const sql = `select DATE_FORMAT(EXPIRY_TIME_,'%Y-%m-%d') AS EXPIRY_TIME_, DATE_FORMAT(EFFECTIVE_TIME_,'%Y-%m-%d') AS EFFECTIVE_TIME_ from ibps_bpm_agent where DELEGATOR_ID_ = '${val1}' and AGENTER_ID_ = '${val2}' and DATE_FORMAT('${createTime}','%Y-%m-%d') BETWEEN EFFECTIVE_TIME_ and EXPIRY_TIME_`
|
|
|
curdPost('sql', sql).then((res) => {
|
|
curdPost('sql', sql).then((res) => {
|
|
|
- if (res.state == 200) {
|
|
|
|
|
- let datas = res.variables.data
|
|
|
|
|
|
|
+ if (res.state === 200) {
|
|
|
|
|
+ const datas = res.variables.data
|
|
|
callback(datas)
|
|
callback(datas)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -147,84 +164,76 @@ export default {
|
|
|
/**
|
|
/**
|
|
|
* 获取格式化参数
|
|
* 获取格式化参数
|
|
|
*/
|
|
*/
|
|
|
- getSearcFormData() {
|
|
|
|
|
|
|
+ getSearcFormData () {
|
|
|
return ActionUtils.formatParams(this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}, this.pagination, this.sorts)
|
|
return ActionUtils.formatParams(this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}, this.pagination, this.sorts)
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 处理分页事件
|
|
* 处理分页事件
|
|
|
*/
|
|
*/
|
|
|
- handlePaginationChange(page) {
|
|
|
|
|
|
|
+ handlePaginationChange (page) {
|
|
|
ActionUtils.setPagination(this.pagination, page)
|
|
ActionUtils.setPagination(this.pagination, page)
|
|
|
this.loadData()
|
|
this.loadData()
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 处理排序
|
|
* 处理排序
|
|
|
*/
|
|
*/
|
|
|
- handleSortChange(sort) {
|
|
|
|
|
|
|
+ handleSortChange (sort) {
|
|
|
ActionUtils.setSorts(this.sorts, sort)
|
|
ActionUtils.setSorts(this.sorts, sort)
|
|
|
this.loadData()
|
|
this.loadData()
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 查询
|
|
* 查询
|
|
|
*/
|
|
*/
|
|
|
- search() {
|
|
|
|
|
|
|
+ search () {
|
|
|
this.loadData()
|
|
this.loadData()
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 处理按钮事件
|
|
* 处理按钮事件
|
|
|
*/
|
|
*/
|
|
|
- handleAction(command, position, selection, data) {
|
|
|
|
|
|
|
+ handleAction (command, position, selection, data) {
|
|
|
switch (command) {
|
|
switch (command) {
|
|
|
case 'search': // 查询
|
|
case 'search': // 查询
|
|
|
ActionUtils.setFirstPagination(this.pagination)
|
|
ActionUtils.setFirstPagination(this.pagination)
|
|
|
this.search()
|
|
this.search()
|
|
|
break
|
|
break
|
|
|
case 'revoke': // 撤消
|
|
case 'revoke': // 撤消
|
|
|
- ActionUtils.selectedRecord(selection)
|
|
|
|
|
- .then((id) => {
|
|
|
|
|
- this.handleRevoke(id)
|
|
|
|
|
- })
|
|
|
|
|
- .catch(() => {})
|
|
|
|
|
|
|
+ ActionUtils.selectedRecord(selection).then((id) => {
|
|
|
|
|
+ this.handleRevoke(id)
|
|
|
|
|
+ }).catch(() => {})
|
|
|
break
|
|
break
|
|
|
case 'detail': // 明细
|
|
case 'detail': // 明细
|
|
|
- ActionUtils.selectedRecord(selection)
|
|
|
|
|
- .then((id) => {
|
|
|
|
|
- this.handleEdit(id, true)
|
|
|
|
|
- this.title = '转办代理明细'
|
|
|
|
|
- })
|
|
|
|
|
- .catch(() => {})
|
|
|
|
|
|
|
+ ActionUtils.selectedRecord(selection).then((id) => {
|
|
|
|
|
+ this.handleEdit(id, true)
|
|
|
|
|
+ this.title = '转办代理明细'
|
|
|
|
|
+ }).catch(() => {})
|
|
|
break
|
|
break
|
|
|
default:
|
|
default:
|
|
|
break
|
|
break
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
// 处理撤回
|
|
// 处理撤回
|
|
|
- handleRevoke(id) {
|
|
|
|
|
|
|
+ handleRevoke (id) {
|
|
|
this.$confirm('确定撤回?', this.$t('common.dialog.title'), {
|
|
this.$confirm('确定撤回?', this.$t('common.dialog.title'), {
|
|
|
type: 'warning'
|
|
type: 'warning'
|
|
|
- })
|
|
|
|
|
- .then(() => {
|
|
|
|
|
- setStatus({
|
|
|
|
|
- id: id,
|
|
|
|
|
- status: 'cancel'
|
|
|
|
|
- })
|
|
|
|
|
- .then((response) => {
|
|
|
|
|
- ActionUtils.successMessage('撤回任务成功')
|
|
|
|
|
- this.search()
|
|
|
|
|
- })
|
|
|
|
|
- .catch(() => {})
|
|
|
|
|
- })
|
|
|
|
|
- .catch(() => {})
|
|
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+ setStatus({
|
|
|
|
|
+ id: id,
|
|
|
|
|
+ status: 'cancel'
|
|
|
|
|
+ }).then((response) => {
|
|
|
|
|
+ ActionUtils.successMessage('撤回任务成功')
|
|
|
|
|
+ this.search()
|
|
|
|
|
+ }).catch(() => {})
|
|
|
|
|
+ }).catch(() => {})
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 处理编辑
|
|
* 处理编辑
|
|
|
*/
|
|
*/
|
|
|
- handleEdit(id = '', readonly = true) {
|
|
|
|
|
|
|
+ handleEdit (id = '', readonly = true) {
|
|
|
this.editId = id
|
|
this.editId = id
|
|
|
this.readonly = readonly
|
|
this.readonly = readonly
|
|
|
this.dialogFormVisible = true
|
|
this.dialogFormVisible = true
|
|
|
},
|
|
},
|
|
|
- handleLinkClick(data, columns) {
|
|
|
|
|
|
|
+ handleLinkClick (data, columns) {
|
|
|
this.editId = data.id
|
|
this.editId = data.id
|
|
|
this.instanceId = data.procInstId
|
|
this.instanceId = data.procInstId
|
|
|
this.formrenderDialogFormVisible = true
|
|
this.formrenderDialogFormVisible = true
|