1
0
mirror of https://github.com/FatttSnake/Pinnacle-OA.git synced 2026-04-06 07:21:24 +08:00

add noticeTypeManage module

This commit is contained in:
cccccyb
2023-05-16 03:13:19 +08:00
parent a2508b887e
commit c860e9c3e8
23 changed files with 460 additions and 91 deletions

View File

@@ -0,0 +1,21 @@
<template>
<notice-view-table />
</template>
<script lang="ts">
import { useNoticeStore } from '@/store/notice'
const noticeStore = useNoticeStore()
export default {
data() {
return {}
},
methods: {},
mounted() {
noticeStore.selectAllNoticeByUserId(1)
},
unmounted() {
console.log('alRead:unmounted')
}
}
</script>
<style scoped></style>

View File

@@ -0,0 +1,21 @@
<template>
<notice-view-table />
</template>
<script lang="ts">
import { useNoticeStore } from '@/store/notice'
const noticeStore = useNoticeStore()
export default {
data() {
return {}
},
methods: {},
mounted() {
noticeStore.selectAllNoticeByUserId(-1)
},
unmounted() {
console.log('all:unmounted')
}
}
</script>
<style scoped></style>

View File

@@ -53,6 +53,7 @@ export default {
.then((response) => {
if (response.data.code === 20021) {
noticeStore.selectData = response.data.data
noticeStore.total = parseInt(response.data.msg)
ElMessage({
message: '查询成功.',
type: 'success'
@@ -102,7 +103,7 @@ export default {
}
},
mounted() {
noticeStore.selectNoticeType()
noticeStore.selectEnableNoticeType()
},
computed: {
...mapState(useNoticeStore, ['dialogAddVisible'])

View File

@@ -0,0 +1,48 @@
<template>
<el-container>
<el-header>
<el-button type="primary" :size="'large'"
><el-icon :size="SIZE_ICON_MD()" style="color: white; margin-right: 3px">
<icon-pinnacle-add /> </el-icon
>添加类型</el-button
>
<el-button type="primary" :size="'large'"
><el-icon :size="SIZE_ICON_MD()" style="color: white; margin-right: 3px">
<icon-pinnacle-delete /> </el-icon
>批量删除</el-button
>
<el-button type="primary" :size="'large'"
><el-icon :size="SIZE_ICON_MD()" style="color: white; margin-right: 3px">
<icon-pinnacle-reset /> </el-icon
>刷新页面</el-button
>
</el-header>
<el-main>
<notice-type-table />
</el-main>
</el-container>
</template>
<script lang="ts">
import { SIZE_ICON_LG, SIZE_ICON_MD, SIZE_ICON_SM } from '@/constants/Common.constants'
export default {
name: 'NoticeTypeManage',
data() {
return {}
},
methods: {
SIZE_ICON_MD() {
return SIZE_ICON_MD
},
SIZE_ICON_LG() {
return SIZE_ICON_LG
},
SIZE_ICON_SM() {
return SIZE_ICON_SM
}
},
mounted() {}
}
</script>
<style scoped></style>

View File

@@ -5,16 +5,17 @@
</el-header>
<el-main>
<el-menu
:default-active="activeIndex"
:default-active="$route.path"
class="el-menu-demo"
mode="horizontal"
@select="handleSelect"
router
>
<el-menu-item index="1">所有公告</el-menu-item>
<el-menu-item index="2">已读</el-menu-item>
<el-menu-item index="3"><a href="#">未读</a></el-menu-item>
<el-menu-item index="/notice/noticeView/all">所有公告</el-menu-item>
<el-menu-item index="/notice/noticeView/alRead">已读</el-menu-item>
<el-menu-item index="/notice/noticeView/toRead">未读</el-menu-item>
</el-menu>
<notice-view-table></notice-view-table>
<router-view />
</el-main>
</el-container>
</template>
@@ -23,9 +24,7 @@
export default {
name: 'NoticeView',
data() {
return {
activeIndex: '1'
}
return {}
},
methods: {
handleSelect(key, keyPath) {

View File

@@ -0,0 +1,21 @@
<template>
<notice-view-table />
</template>
<script lang="ts">
import { useNoticeStore } from '@/store/notice'
const noticeStore = useNoticeStore()
export default {
data() {
return {}
},
methods: {},
mounted() {
noticeStore.selectAllNoticeByUserId(0)
},
unmounted() {
console.log('toRead:unmounted')
}
}
</script>
<style scoped></style>