mirror of
https://github.com/FatttSnake/Pinnacle-OA.git
synced 2026-04-05 23:11:24 +08:00
delete the function of visitByMyself and optimize the loading of noticeReceiveBySelf
This commit is contained in:
@@ -63,10 +63,7 @@
|
||||
size="large"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否仅自己可见:">
|
||||
<el-switch v-model="visible" inline-prompt active-text="是" inactive-text="否" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发送至:" prop="receivers" v-show="!visible">
|
||||
<el-form-item label="发送至:" prop="receivers">
|
||||
<el-cascader
|
||||
v-model="addData.receivers"
|
||||
collapse-tags
|
||||
@@ -155,7 +152,7 @@ export default {
|
||||
methods: {
|
||||
submitForm() {
|
||||
const receiveId = []
|
||||
if (this.addData.receivers.length != null) {
|
||||
if (this.addData.receivers.length > 0) {
|
||||
for (let i = 0; i < this.addData.receivers.length; i++) {
|
||||
receiveId.push(this.addData.receivers[i][1])
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="myTimeline">
|
||||
<div class="myTimeline" v-loading="showLoading" element-loading-text="加载中...">
|
||||
<el-timeline>
|
||||
<el-timeline-item
|
||||
v-for="notice in selectData"
|
||||
@@ -219,7 +219,8 @@ export default {
|
||||
'loading',
|
||||
'dialogShowVisible',
|
||||
'noticeShowData',
|
||||
'currentViewPage'
|
||||
'currentViewPage',
|
||||
'showLoading'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -10,10 +10,11 @@ export default {
|
||||
},
|
||||
methods: {},
|
||||
mounted() {
|
||||
noticeStore.selectAllNoticeSelf(1)
|
||||
noticeStore.$patch((state) => {
|
||||
state.showLoading = true
|
||||
state.currentViewPage = 'AlRead'
|
||||
})
|
||||
noticeStore.selectAllNoticeSelf(1)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { useNoticeStore } from '@/store/notice'
|
||||
import { mapState } from 'pinia'
|
||||
const noticeStore = useNoticeStore()
|
||||
export default {
|
||||
data() {
|
||||
@@ -10,10 +11,14 @@ export default {
|
||||
},
|
||||
methods: {},
|
||||
mounted() {
|
||||
noticeStore.selectAllNoticeSelf(-1)
|
||||
noticeStore.$patch((state) => {
|
||||
state.showLoading = true
|
||||
state.currentViewPage = 'All'
|
||||
})
|
||||
noticeStore.selectAllNoticeSelf(-1)
|
||||
},
|
||||
computed: {
|
||||
...mapState(useNoticeStore, ['showLoading'])
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -111,7 +111,7 @@ export default {
|
||||
message: '删除成功.',
|
||||
type: 'success'
|
||||
})
|
||||
noticeStore.selectAllNotice(1, 5)
|
||||
noticeStore.selectAllNotice(this.currentPage, this.pageSize)
|
||||
} else if (response.data.code === 20034) {
|
||||
ElMessage({
|
||||
message: response.data.msg,
|
||||
|
||||
@@ -10,10 +10,11 @@ export default {
|
||||
},
|
||||
methods: {},
|
||||
mounted() {
|
||||
noticeStore.selectAllNoticeSelf(0)
|
||||
noticeStore.$patch((state) => {
|
||||
state.showLoading = true
|
||||
state.currentViewPage = 'ToRead'
|
||||
})
|
||||
noticeStore.selectAllNoticeSelf(0)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -76,6 +76,7 @@ export const useNoticeStore = defineStore('notice', {
|
||||
}
|
||||
],
|
||||
loading: true,
|
||||
showLoading: true,
|
||||
dialogShowVisible: false,
|
||||
dialogAddVisible: false,
|
||||
dialogEditVisible: false,
|
||||
@@ -143,11 +144,9 @@ export const useNoticeStore = defineStore('notice', {
|
||||
.then((response) => {
|
||||
if (response.data.code === 20021) {
|
||||
this.selectData = response.data.data
|
||||
if (this.selectData.length !== 0) {
|
||||
this.loading = false
|
||||
}
|
||||
this.showLoading = false
|
||||
} else {
|
||||
this.loading = false
|
||||
this.showLoading = false
|
||||
ElMessage({
|
||||
message: response.data.msg,
|
||||
type: 'error'
|
||||
|
||||
Reference in New Issue
Block a user