1
0
mirror of https://github.com/FatttSnake/Pinnacle-OA.git synced 2026-04-05 23:11:24 +08:00

work complete

This commit is contained in:
GGB
2023-05-05 23:23:29 +08:00
parent 24318d36b7
commit 8b77ccf5e8
4 changed files with 59 additions and 13 deletions

View File

@@ -44,7 +44,7 @@
</template> </template>
<script> <script>
import axios from 'axios' import request from '@/services'
export default { export default {
name: 'CompletePage', name: 'CompletePage',
@@ -75,7 +75,7 @@ export default {
console.log('complete cancel!') console.log('complete cancel!')
}, },
getTableData() { getTableData() {
axios request
.get('http://localhost:8621/work/complete/1652714496280469506') .get('http://localhost:8621/work/complete/1652714496280469506')
.then((response) => { .then((response) => {
this.tableData = response.data.data this.tableData = response.data.data
@@ -89,7 +89,7 @@ export default {
}, },
getTaskData(workId) { getTaskData(workId) {
console.log(workId) console.log(workId)
axios request
.get('http://localhost:8621/work/' + workId) .get('http://localhost:8621/work/' + workId)
.then((response) => { .then((response) => {
console.log(response.data.data) console.log(response.data.data)
@@ -104,7 +104,7 @@ export default {
}, },
setTaskStatus(userWork) { setTaskStatus(userWork) {
console.log(userWork) console.log(userWork)
axios request
.put('http://localhost:8621/work/setStatus', userWork) .put('http://localhost:8621/work/setStatus', userWork)
.then((response) => { .then((response) => {
console.log(response.data.data) console.log(response.data.data)

View File

@@ -77,7 +77,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import axios from 'axios' import request from '@/services'
import EditWork from '@/components/EditWork.vue' import EditWork from '@/components/EditWork.vue'
export default { export default {
@@ -111,7 +111,7 @@ export default {
console.log('complete cancel!') console.log('complete cancel!')
}, },
getTableData() { getTableData() {
axios request
.get('http://localhost:8621/work') .get('http://localhost:8621/work')
.then((response) => { .then((response) => {
this.tableData = response.data.data this.tableData = response.data.data
@@ -124,7 +124,7 @@ export default {
}) })
}, },
deleteTableData(row) { deleteTableData(row) {
axios request
.delete('http://localhost:8621/work/' + row.id) .delete('http://localhost:8621/work/' + row.id)
.then((response) => { .then((response) => {
this.getTableData() this.getTableData()
@@ -141,7 +141,7 @@ export default {
this.getTableData() this.getTableData()
}, },
updateWork(form) { updateWork(form) {
axios request
.put('http://localhost:8621/work', form) .put('http://localhost:8621/work', form)
.then((response) => { .then((response) => {
this.editVisible = false this.editVisible = false
@@ -152,7 +152,7 @@ export default {
}) })
}, },
addWork(form) { addWork(form) {
axios request
.post('http://localhost:8621/work', form) .post('http://localhost:8621/work', form)
.then((response) => { .then((response) => {
this.addVisible = false this.addVisible = false

View File

@@ -44,7 +44,7 @@
</template> </template>
<script> <script>
import axios from 'axios' import request from '@/services'
export default { export default {
name: 'TodoPage', name: 'TodoPage',
data() { data() {
@@ -74,7 +74,7 @@ export default {
console.log('complete cancel!') console.log('complete cancel!')
}, },
getTableData() { getTableData() {
axios request
.get('http://localhost:8621/work/todo/1652714496280469506') .get('http://localhost:8621/work/todo/1652714496280469506')
.then((response) => { .then((response) => {
this.tableData = response.data.data this.tableData = response.data.data
@@ -88,7 +88,7 @@ export default {
}, },
getTaskData(workId) { getTaskData(workId) {
console.log(workId) console.log(workId)
axios request
.get('http://localhost:8621/work/' + workId) .get('http://localhost:8621/work/' + workId)
.then((response) => { .then((response) => {
console.log(response.data.data) console.log(response.data.data)
@@ -103,7 +103,7 @@ export default {
}, },
setTaskStatus(userWork) { setTaskStatus(userWork) {
console.log(userWork) console.log(userWork)
axios request
.put('http://localhost:8621/work/setStatus', userWork) .put('http://localhost:8621/work/setStatus', userWork)
.then((response) => { .then((response) => {
console.log(response.data.data) console.log(response.data.data)

View File

@@ -23,6 +23,52 @@ const router = createRouter({
requiresScrollbar: false, requiresScrollbar: false,
requiresPadding: true requiresPadding: true
} }
},
{
path: '/work',
name: 'work',
children: [
{
path: 'manage',
component: async () => await import('@/pages/work/Manage.vue'),
name: 'manage',
meta: {
title: '工作管理',
requiresScrollbar: false,
requiresPadding: true
}
},
{
path: 'task',
component: async () => await import('@/pages/work/Task.vue'),
name: 'task',
redirect: '/work/task/todo',
children: [
{
path: 'todo',
component: async () => await import('@/pages/work/Todo.vue'),
name: 'todo'
},
{
path: 'complete',
component: async () =>
await import('@/pages/work/Complete.vue'),
name: 'complete'
}
],
meta: {
title: '工作事项',
requiresScrollbar: false,
requiresPadding: true
}
}
],
meta: {
title: '工作事项',
icon: IconPinnacleWork,
requiresScrollbar: false,
requiresPadding: true
}
} }
] ]
}, },