|
@@ -13,28 +13,30 @@
|
|
|
<template #status="{ row }">
|
|
|
<el-tag size="small" :type="statusList[row.status].color">{{ statusList[row.status].text }}</el-tag>
|
|
|
</template>
|
|
|
- <!-- <template #opType="{ row }">
|
|
|
- <el-tag size="small" :type="statusList[row.opType].color">{{ statusList[row.opType].text }}</el-tag>
|
|
|
- </template> -->
|
|
|
<template #actions="{ row }">
|
|
|
- <m-button type="primary" text @click="onDetails(row)">审批进度</m-button>
|
|
|
+ <m-button type="primary" text @click="onProcess(row)">审批进度</m-button>
|
|
|
+ <m-button type="primary" text @click="onDetails(row)">申请明细</m-button>
|
|
|
<slot name="actions" :row="row"></slot>
|
|
|
</template>
|
|
|
</m-table>
|
|
|
<ApprovalProgress ref="approvalProgressRefs"></ApprovalProgress>
|
|
|
+ <ApprovalDetails ref="approvalDetailsRefs"></ApprovalDetails>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
getApprovalList,
|
|
|
- getApprovalProgress
|
|
|
+ getApprovalProgress,
|
|
|
+ getApprovalApply
|
|
|
} from '@/api/approval'
|
|
|
-import ApprovalProgress from './approvalProgress.vue'
|
|
|
+import ApprovalProgress from './ApprovalProgress'
|
|
|
+import ApprovalDetails from './ApprovalDetails'
|
|
|
export default {
|
|
|
name: 'IndexPage',
|
|
|
components: {
|
|
|
- ApprovalProgress
|
|
|
+ ApprovalProgress,
|
|
|
+ ApprovalDetails
|
|
|
},
|
|
|
props: {
|
|
|
dataType: {
|
|
@@ -107,7 +109,7 @@ export default {
|
|
|
this.loading = false
|
|
|
}
|
|
|
},
|
|
|
- async onDetails ({ workFlowInstanceId }) {
|
|
|
+ async onProcess ({ workFlowInstanceId }) {
|
|
|
try {
|
|
|
const { data } = await getApprovalProgress({ workFlowInstanceId })
|
|
|
this.$refs.approvalProgressRefs.open(data)
|
|
@@ -115,6 +117,14 @@ export default {
|
|
|
this.$message.error(error)
|
|
|
}
|
|
|
},
|
|
|
+ async onDetails ({ workFlowInstanceId }) {
|
|
|
+ try {
|
|
|
+ const { data } = await getApprovalApply({ workFlowInstanceId })
|
|
|
+ console.log(data)
|
|
|
+ } catch (error) {
|
|
|
+ this.$message.error(error)
|
|
|
+ }
|
|
|
+ },
|
|
|
onSearch () {
|
|
|
this.pageInfo.current = 1
|
|
|
this.onInit()
|