待办修改
This commit is contained in:
parent
b8b59ee576
commit
7ca4a7819b
|
|
@ -57,4 +57,12 @@ export function delMenu(menuId) {
|
|||
url: '/system/menu/delete/' + menuId,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function getBadgeNumApi(data = {}) {
|
||||
return request({
|
||||
url: '/bmw/todo/getToDoNum',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-badge :value="1" class="item">
|
||||
<el-badge :value="badgeNum" class="item">
|
||||
<svg-icon
|
||||
class-name="size-icon"
|
||||
icon-class="message_1"
|
||||
|
|
@ -12,13 +12,29 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {},
|
||||
import { getBadgeNumApi } from '@/api/system/menu'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
badgeNum: null
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getBadgeNum()
|
||||
},
|
||||
methods: {
|
||||
handleClick() {
|
||||
this.$router.push('/construction-person/to-do')
|
||||
},
|
||||
async getBadgeNum() {
|
||||
try {
|
||||
const res = await getBadgeNumApi()
|
||||
this.badgeNum = res.data
|
||||
} catch (error) {
|
||||
console.log('error-->', error)
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ export const columnsList = [
|
|||
{ t_props: 'content', t_label: '信息内容' },
|
||||
{ t_props: 'updateUser', t_label: '提交人' },
|
||||
{ t_props: 'createTime', t_label: '提交时间' },
|
||||
{ t_props: 'status', t_label: '状态', t_slot: 'status' },
|
||||
]
|
||||
|
||||
export const dialogConfig = {
|
||||
|
|
|
|||
|
|
@ -20,6 +20,16 @@
|
|||
:columnsList="columnsList"
|
||||
:request-api="getTodoListAPI"
|
||||
>
|
||||
<template slot="status" slot-scope="{ data }">
|
||||
<el-tag
|
||||
v-if="sendParams.type == 2"
|
||||
size="mini"
|
||||
:type="data.status === 1 ? 'success' : 'danger'"
|
||||
>
|
||||
{{ data.status === 1 ? '已读' : '未读' }}
|
||||
</el-tag>
|
||||
<el-tag v-else size="mini" type="primary">待核中</el-tag>
|
||||
</template>
|
||||
<template slot="handle">
|
||||
<el-button
|
||||
plain
|
||||
|
|
|
|||
Loading…
Reference in New Issue