diff --git a/src/utils/request.js b/src/utils/request.js index bb115cd..ad77ee9 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -31,6 +31,7 @@ request.interceptors.response.use( localStorage.removeItem('token') localStorage.removeItem('staffFullname') localStorage.removeItem('staffUsername') + localStorage.removeItem('staffId') router.push({path: '/login'}) } diff --git a/src/views/ClosedProject.vue b/src/views/ClosedProject.vue index 39106e2..0c138e0 100644 --- a/src/views/ClosedProject.vue +++ b/src/views/ClosedProject.vue @@ -11,18 +11,18 @@ class="projectTable" :height="tableHeight" :data="tableData"> - - - - - - + + + + + + - + @@ -31,9 +31,9 @@ @size-change="handleSizeChange" v-model:currentPage ="currentPage" :page-sizes="[5, 10, 15, 20]" - :page-size="perPage" + v-model:page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" - :total="count" + :total="total" style="float: right;margin-top: 20px;"> @@ -58,77 +58,64 @@ onMounted(() => { diff --git a/src/views/Home.vue b/src/views/Home.vue index d25a61f..2a8308f 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -69,11 +69,13 @@ export default { return { staffFullname: '', staffUsername: '', + staffId: '' } }, mounted() { this.staffFullname = localStorage.getItem('staffFullname'); this.staffUsername = localStorage.getItem('staffUsername'); + this.staffId = localStorage.getItem('staffId'); }, methods: { diff --git a/src/views/Login.vue b/src/views/Login.vue index 5186136..efb4d09 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -58,6 +58,7 @@ const onSubmit = () => { localStorage.setItem('token', response.data.data.Token) localStorage.setItem('staffFullname', response.data.data.staffFullname) localStorage.setItem('staffUsername', response.data.data.staffUsername) + localStorage.setItem('staffId', response.data.data.staffId) router.push({path: '/'}) } else { console.log(response.data) diff --git a/src/views/OngoingProject.vue b/src/views/OngoingProject.vue index 8f193c8..fb3bf28 100644 --- a/src/views/OngoingProject.vue +++ b/src/views/OngoingProject.vue @@ -27,7 +27,7 @@ @@ -36,7 +36,7 @@ @current-change="handleCurrentChange" @size-change="handleSizeChange" v-model:currentPage="currentPage" - :page-sizes="[2, 10, 15, 20]" + :page-sizes="[5, 10, 15, 20]" v-model:page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total" @@ -65,6 +65,7 @@ onMounted(() => {