|
@@ -1,26 +1,195 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
- 重要任务
|
|
|
- </div>
|
|
|
+ <page-header-wrapper class="uodate">
|
|
|
+ <template v-slot:content>
|
|
|
+ <div class="page-header-content">
|
|
|
+ <div>
|
|
|
+ <!--添加任务表格-->
|
|
|
+ <a-input class="init_input" style="border: none; box-shadow: none" @pressEnter="addtask" size="large" placeholder="添加任务" v-model="tasktitle">
|
|
|
+ <a-icon slot="prefix" type="plus" />
|
|
|
+ </a-input>
|
|
|
+ <task-list :taskdata="importantTask" @getData="getImportantData" @refreshData="getImportantData" @openConfig="openConfig" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-slot:extraContent v-if="taskconfig">
|
|
|
+ <div class="extra-content" style="text-align:left;width:340px;margin-left:-80px;">
|
|
|
+ <!-- 任务详情侧边栏 -->
|
|
|
+ <task-details ref="taskDetails" :taskInfo="taskInfo"></task-details>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </page-header-wrapper>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import TaskList from '@/components/LTTC/TaskList/TaskList'
|
|
|
+import MoveTaskList from '@/components/LTTC/TaskList/MoveTaskList'
|
|
|
+import TaskDetails from '@/views/task/components/TaskDetails'
|
|
|
+const columns = [
|
|
|
+ {
|
|
|
+ title: 'mark',
|
|
|
+ dataIndex: 'mark',
|
|
|
+ scopedSlots: { customRender: 'mark' },
|
|
|
+ width: '5px'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: 'task',
|
|
|
+ dataIndex: 'task',
|
|
|
+ scopedSlots: { customRender: 'task' },
|
|
|
+ width: '90%'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: 'operation',
|
|
|
+ dataIndex: 'operation',
|
|
|
+ scopedSlots: { customRender: 'operation' }
|
|
|
+ }
|
|
|
+]
|
|
|
|
|
|
export default {
|
|
|
- name: '',
|
|
|
+ name: 'OneDayForMe',
|
|
|
components: {
|
|
|
+ TaskList,
|
|
|
+ MoveTaskList,
|
|
|
+ TaskDetails
|
|
|
},
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
return {
|
|
|
+ // 当前时间
|
|
|
+ nowDate: "",
|
|
|
+ uuid: 20,
|
|
|
+ tasktitle: '',
|
|
|
+ importantTask: [],
|
|
|
+ columns,
|
|
|
+ task_icon: '',
|
|
|
+
|
|
|
+ //任务-设置相关
|
|
|
+ taskconfig: false,
|
|
|
+
|
|
|
+ //添加任务相关
|
|
|
+ uuid: 5, //新任务id
|
|
|
+ tasktitle: '', //任务title
|
|
|
+
|
|
|
+ taskInfo: {}
|
|
|
}
|
|
|
},
|
|
|
- mounted () {
|
|
|
+ created() {
|
|
|
+ this.getImportantData();
|
|
|
},
|
|
|
methods: {
|
|
|
+
|
|
|
+ //添加任务
|
|
|
+ addtask() {
|
|
|
+ let data = {
|
|
|
+ finish: false,
|
|
|
+ important: true,
|
|
|
+ key: (this.uuid = this.uuid + 1),
|
|
|
+ title: this.tasktitle,
|
|
|
+ type: '任务',
|
|
|
+ }
|
|
|
+
|
|
|
+ //axios 添加任务:到任务列表第一个
|
|
|
+
|
|
|
+ this.importantTask.unshift(data)
|
|
|
+
|
|
|
+ this.tasktitle = ''
|
|
|
+ },
|
|
|
+
|
|
|
+ getImportantData() {
|
|
|
+ //axios 获取今天正在进行的任务
|
|
|
+ this.importantTask = [
|
|
|
+ {
|
|
|
+ endDate: '',
|
|
|
+ starLevel: true,
|
|
|
+ finish: false,
|
|
|
+ important: true,
|
|
|
+ key: '1',
|
|
|
+ title: '吃早饭',
|
|
|
+ type: '任务'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ endDate: '',
|
|
|
+ starLevel: true,
|
|
|
+ finish: false,
|
|
|
+ important: true,
|
|
|
+ key: '2',
|
|
|
+ title: '上班',
|
|
|
+ type: '任务'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ endDate: '',
|
|
|
+ starLevel: false,
|
|
|
+ finish: false,
|
|
|
+ important: true,
|
|
|
+ key: '3',
|
|
|
+ title: '下班',
|
|
|
+ type: '任务'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ endDate: '',
|
|
|
+ starLevel: true,
|
|
|
+ finish: false,
|
|
|
+ important: true,
|
|
|
+ key: '4',
|
|
|
+ title: '吃午饭',
|
|
|
+ type: '任务'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ endDate: '',
|
|
|
+ starLevel: true,
|
|
|
+ finish: false,
|
|
|
+ important: true,
|
|
|
+ key: '5',
|
|
|
+ title: '去游乐园',
|
|
|
+ type: '任务'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ endDate: '',
|
|
|
+ starLevel: false,
|
|
|
+ finish: false,
|
|
|
+ important: true,
|
|
|
+ key: '6',
|
|
|
+ title: '去抓娃娃',
|
|
|
+ type: '任务'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+
|
|
|
+ //修改完成状态
|
|
|
+ changeFinish(task) {
|
|
|
+ task.finish = !task.finish
|
|
|
+ },
|
|
|
+
|
|
|
+ //修改重要性
|
|
|
+ changeImportant(task) {
|
|
|
+ task.important = !task.important
|
|
|
+ },
|
|
|
+
|
|
|
+ //任务配置相关
|
|
|
+ openConfig(param) {
|
|
|
+ this.taskconfig = true
|
|
|
+ // this.$refs.taskDetails.init(param)
|
|
|
+ console.log(param)
|
|
|
+ this.taskInfo = param
|
|
|
+ },
|
|
|
+ closeConfig() {
|
|
|
+ this.taskconfig = false
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
+.advise_drawer >>> .ant-drawer-content-wrapper .ant-drawer-content {
|
|
|
+ background-color: #faf9f8;
|
|
|
+}
|
|
|
|
|
|
+.init_input >>> .ant-input {
|
|
|
+ border: none;
|
|
|
+ box-shadow: none;
|
|
|
+ border-bottom: 1px solid;
|
|
|
+}
|
|
|
+
|
|
|
+.panel-style >>> .ant-collapse-content .ant-collapse-content-box {
|
|
|
+ padding: 0px;
|
|
|
+}
|
|
|
</style>
|