| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <template>
- <el-card shadow="hover" class="margin">
- <div class="full-width flex flex-center flex-justify-start">
- <el-button-group>
- <el-button type="primary" icon="el-icon-edit">全部任务</el-button>
- <el-button type="primary" plain icon="el-icon-share"
- >我创建的
- </el-button>
- <el-button type="primary" plain icon="el-icon-delete"
- >我执行的
- </el-button>
- </el-button-group>
- </div>
- <div class="flex flex-center flex-justify-start flex-col full-width">
- <div class="full-width flex flex-justify-start">
- <span>按时间排序</span>
- </div>
- <div class="full-width">
- <task-table
- :option="option"
- :data="data"
- @rowClick="rowClick"
- ></task-table>
- </div>
- <task ref="task" :task="task"></task>
- </div>
- </el-card>
- </template>
- <route>
- {
- path: '/task',
- name: '任务列表',
- meta: {keepAlive: true,show: false}
- }
- </route>
- <script>
- import TaskTable from '@/views/task/component/task-table.vue'
- import Task from '@/views/task/component/task.vue'
- export default {
- name: 'index',
- components: { Task, TaskTable },
- data() {
- return {
- data: [
- {
- title: '项目建议书编1写,需要快点'
- },
- {
- title: '项目建议书编写,需要快点'
- }
- ],
- task: [],
- option: {
- showCheckBox: false,
- folderChecked: true,
- column: [
- {
- label: '共20个任务',
- prop: 'title',
- display: false,
- width: 400
- },
- {
- label: '标签',
- prop: 'createUserName'
- },
- {
- label: '时间',
- prop: 'createUserName'
- },
- {
- label: '执行人',
- prop: 'createTime'
- }
- ]
- }
- }
- },
- created() {
- this.getTaskList()
- },
- methods: {
- getTaskList() {
- this.$api.task.taskList({ level: 1 }).then(res => {
- console.log('hhhh')
- console.log(res)
- })
- },
- rowClick(item) {
- this.task = item
- this.$refs.task.show()
- }
- }
- }
- </script>
- <style scoped></style>
|