|
@@ -112,7 +112,7 @@
|
|
|
width="80"
|
|
|
label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button v-if="Number(scope.row.state) !== 3 && checkUser(scope.row)" type="text" size="small" @click="addOrUpdateHandle(scope.row.businessType, scope.row.businessId)">处理</el-button>
|
|
|
+ <el-button v-if="Number(scope.row.state) !== 3 && checkUser(scope.row)" type="text" size="small" @click="addOrUpdateHandle(scope.row)">处理</el-button>
|
|
|
<el-button v-else type="text" size="small" @click="detailHandle(scope.row)">查看</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -134,7 +134,7 @@
|
|
|
<script>
|
|
|
import AddOrUpdate from './approve-add-or-update'
|
|
|
import { getApprovalList } from '@/api/msg'
|
|
|
- // import { getApprovalList, readNotice } from '@/api/msg'
|
|
|
+ import { readNotices } from '@/utils/msg'
|
|
|
import { getCusList } from '@/api/cus'
|
|
|
import { checkStr } from '@/api/util'
|
|
|
export default {
|
|
@@ -274,10 +274,14 @@
|
|
|
return checkStr(currentUser, row.currentApprover)
|
|
|
},
|
|
|
// 新增 / 修改
|
|
|
- addOrUpdateHandle (businessType, businessId) {
|
|
|
+ addOrUpdateHandle (row) {
|
|
|
this.addOrUpdateVisible = true
|
|
|
+ // 已查看
|
|
|
+ if (row.noticeIds) {
|
|
|
+ readNotices(this, row.noticeIds)
|
|
|
+ }
|
|
|
this.$nextTick(() => {
|
|
|
- this.$refs.addOrUpdate.init(businessType, businessId)
|
|
|
+ this.$refs.addOrUpdate.init(row.businessType, row.businessId)
|
|
|
})
|
|
|
},
|
|
|
// 详情
|
|
@@ -286,8 +290,10 @@
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.addOrUpdate.init(row.businessType, row.businessId, true)
|
|
|
})
|
|
|
- // todo 已查看
|
|
|
- // readNotice(this, row.noticeId)
|
|
|
+ // 已查看
|
|
|
+ if (row.noticeIds) {
|
|
|
+ readNotices(this, row.noticeIds)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|