|
@@ -10,33 +10,46 @@
|
|
|
:total="total"
|
|
|
@page-change="onPageChange"
|
|
|
>
|
|
|
- <template #opType="{ row }">
|
|
|
+ <!-- <template #opType="{ row }">
|
|
|
<el-tag size="small" :type="statusList[row.opType].color">{{ statusList[row.opType].text }}</el-tag>
|
|
|
- </template>
|
|
|
+ </template> -->
|
|
|
<template #actions="{ row }">
|
|
|
+ <m-button type="primary" text @click="onDetails(row)">审批进度</m-button>
|
|
|
<slot name="actions" :row="row"></slot>
|
|
|
</template>
|
|
|
</m-table>
|
|
|
+ <ApprovalProgress ref="approvalProgressRefs"></ApprovalProgress>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
- getApprovalList
|
|
|
+ getApprovalList,
|
|
|
+ getApprovalProgress
|
|
|
} from '@/api/approval'
|
|
|
+import ApprovalProgress from './approvalProgress.vue'
|
|
|
export default {
|
|
|
name: 'IndexPage',
|
|
|
+ components: {
|
|
|
+ ApprovalProgress
|
|
|
+ },
|
|
|
+ props: {
|
|
|
+ dataType: {
|
|
|
+ type: Number,
|
|
|
+ default: 0
|
|
|
+ }
|
|
|
+ },
|
|
|
data () {
|
|
|
return {
|
|
|
- statusList: [
|
|
|
- { text: '我发起的 ', color: 'default' },
|
|
|
- { text: '待我审批 ', color: 'warning' },
|
|
|
- { text: '我已审批 ', color: 'success' }
|
|
|
- ],
|
|
|
+ // statusList: [
|
|
|
+ // { text: '我发起的 ', color: 'default' },
|
|
|
+ // { text: '待我审批 ', color: 'warning' },
|
|
|
+ // { text: '我已审批 ', color: 'success' }
|
|
|
+ // ],
|
|
|
searchItems: [
|
|
|
{
|
|
|
label: '名称',
|
|
|
- prop: 'name',
|
|
|
+ prop: 'title',
|
|
|
type: 'input',
|
|
|
options: {
|
|
|
placeholder: '请输入名称'
|
|
@@ -44,12 +57,12 @@ export default {
|
|
|
}
|
|
|
],
|
|
|
searchValues: {
|
|
|
- name: null
|
|
|
+ title: null
|
|
|
},
|
|
|
headers: [
|
|
|
{ label: '名称', prop: 'title' },
|
|
|
{ label: '发起人', prop: 'createUserName' },
|
|
|
- { label: '状态', prop: 'opType', align: 'center' },
|
|
|
+ // { label: '状态', prop: 'opType', align: 'center' },
|
|
|
{ label: '发起时间', prop: 'createDate' },
|
|
|
{ label: '版本号', prop: 'version' },
|
|
|
{ label: '操作', prop: 'actions', fixed: 'right', width: 300 }
|
|
@@ -71,6 +84,7 @@ export default {
|
|
|
this.loading = true
|
|
|
try {
|
|
|
const { data } = await getApprovalList({
|
|
|
+ dataType: this.dataType,
|
|
|
page: {
|
|
|
...this.pageInfo,
|
|
|
orders: [
|
|
@@ -89,6 +103,14 @@ export default {
|
|
|
this.loading = false
|
|
|
}
|
|
|
},
|
|
|
+ async onDetails ({ workFlowInstanceId }) {
|
|
|
+ try {
|
|
|
+ const { data } = await getApprovalProgress({ workFlowInstanceId })
|
|
|
+ this.$refs.approvalProgressRefs.open(data)
|
|
|
+ } catch (error) {
|
|
|
+ this.$message.error(error)
|
|
|
+ }
|
|
|
+ },
|
|
|
onSearch () {
|
|
|
this.pageInfo.current = 1
|
|
|
this.onInit()
|