|
@@ -10,12 +10,12 @@
|
|
|
:total="total"
|
|
|
@page-change="onPageChange"
|
|
|
>
|
|
|
- <template #status="{ row }">
|
|
|
- <el-tag size="small" :type="statusList[row.status].color">{{ statusList[row.status].text }}</el-tag>
|
|
|
+ <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="danger" text @click="onDelete(row)">删除</m-button> -->
|
|
|
+ <m-button v-if="row.opType === 1" type="primary" text @click="onApproval(row)">审批</m-button>
|
|
|
</template>
|
|
|
</m-table>
|
|
|
<ApprovalProgress ref="approvalProgressRefs"></ApprovalProgress>
|
|
@@ -36,10 +36,9 @@ export default {
|
|
|
data () {
|
|
|
return {
|
|
|
statusList: [
|
|
|
- { text: '开始 ', color: 'default' },
|
|
|
- { text: '审批通过 ', color: 'success' },
|
|
|
- { text: '审批拒绝 ', color: 'danger' },
|
|
|
- { text: '异常结束 ', color: 'warning' }
|
|
|
+ { text: '我发起的 ', color: 'default' },
|
|
|
+ { text: '待我审批 ', color: 'warning' },
|
|
|
+ { text: '我已审批 ', color: 'success' }
|
|
|
],
|
|
|
searchItems: [
|
|
|
{
|
|
@@ -57,7 +56,8 @@ export default {
|
|
|
headers: [
|
|
|
{ label: '名称', prop: 'title' },
|
|
|
{ label: '发起人', prop: 'createUserName' },
|
|
|
- { label: '状态', prop: 'status', align: 'center' },
|
|
|
+ { label: '状态', prop: 'opType', align: 'center' },
|
|
|
+ { label: '发起时间', prop: 'createDate' },
|
|
|
{ label: '版本号', prop: 'version' },
|
|
|
{ label: '操作', prop: 'actions', fixed: 'right', width: 300 }
|
|
|
],
|
|
@@ -79,7 +79,10 @@ export default {
|
|
|
try {
|
|
|
const { data } = await getApprovalList({
|
|
|
page: {
|
|
|
- ...this.pageInfo
|
|
|
+ ...this.pageInfo,
|
|
|
+ orders: [
|
|
|
+ { column: 'create_date', asc: false }
|
|
|
+ ]
|
|
|
},
|
|
|
entity: {
|
|
|
...this.searchValues
|
|
@@ -101,6 +104,7 @@ export default {
|
|
|
this.$message.error(error)
|
|
|
}
|
|
|
},
|
|
|
+ onApproval () {},
|
|
|
onSearch () {
|
|
|
this.pageInfo.current = 1
|
|
|
this.onInit()
|