|
|
@@ -29,15 +29,15 @@
|
|
|
<div class="full-width flex flex-justify-start">
|
|
|
<el-dropdown @command="dropDown">
|
|
|
<span class="flex flex-center">
|
|
|
- 按时间排序
|
|
|
+ {{ isGroup === 0 ? '按时间排序' : '按项目排序' }}
|
|
|
<el-icon class="el-icon--right">
|
|
|
<arrow-down />
|
|
|
</el-icon>
|
|
|
</span>
|
|
|
<template #dropdown>
|
|
|
<el-dropdown-menu>
|
|
|
- <el-dropdown-item command="info">按时间排序</el-dropdown-item>
|
|
|
- <el-dropdown-item command="logout">按项目排序</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="0">按时间排序</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="1">按项目排序</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</template>
|
|
|
</el-dropdown>
|
|
|
@@ -93,6 +93,7 @@ export default {
|
|
|
task: [],
|
|
|
taskId: '',
|
|
|
total: 0,
|
|
|
+ isGroup: 0,
|
|
|
option: {
|
|
|
showCheckBox: false,
|
|
|
folderChecked: true,
|
|
|
@@ -134,7 +135,7 @@ export default {
|
|
|
this.getTaskList()
|
|
|
},
|
|
|
getTaskList() {
|
|
|
- const data = { type: this.type, ...this.page }
|
|
|
+ const data = { type: this.type, isGroup: this.isGroup, ...this.page }
|
|
|
this.$api.task.taskList(data).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
this.data = res.data.records
|
|
|
@@ -148,6 +149,11 @@ export default {
|
|
|
pageChange(current) {
|
|
|
this.page.current = current
|
|
|
this.getTaskList()
|
|
|
+ },
|
|
|
+ dropDown(res) {
|
|
|
+ this.isGroup = res
|
|
|
+ this.page.current = 1
|
|
|
+ this.getTaskList()
|
|
|
}
|
|
|
}
|
|
|
}
|