2 커밋 7a01ef46c2 ... f795ef6dc1

작성자 SHA1 메시지 날짜
  yangsl f795ef6dc1 Merge branch 'master' of https://git.xxb.lttc.cn/yangshuangling/pmp_ui 3 년 전
  yangsl 2f59171c3e 添加搜索功能 3 년 전
4개의 변경된 파일67개의 추가작업 그리고 26개의 파일을 삭제
  1. 8 3
      src/components/GlobalHeader/index.vue
  2. 8 2
      src/config/router.config.js
  3. 17 21
      src/views/task/personal/Important.vue
  4. 34 0
      src/views/task/personal/SearchTask.vue

+ 8 - 3
src/components/GlobalHeader/index.vue

@@ -50,9 +50,14 @@ export default {
             }
         },
 
-     onSearch(value) {
-      console.log(value);
-     }
+        onSearch(value) {
+            this.$router.push({
+                name: "search",
+                query:{
+                    key:value
+                }
+            });
+        }
     }
 }
 </script>

+ 8 - 2
src/config/router.config.js

@@ -43,10 +43,16 @@ export const asyncRouterMap = [
       {
         path: '/tasks/mytask',
         name: 'mytask',
-        component: () => import('@/views/task/personal/MyTask'),
+        component: () => import('@/views/task/personal/MyTask'),                     
         meta: { title: 'menu.tasks.mytask', icon: 'alert' }
       },
-
+      {
+        path: '/tasks/search',
+        name: 'search',
+        component: () => import('@/views/task/personal/SearchTask'),
+        hidden: true
+      }
+  
       // 项目管理部分
       // {
       //   path: '/project/weeklyplan',

+ 17 - 21
src/views/task/personal/Important.vue

@@ -1,24 +1,20 @@
 <template>
-  <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>
+  <a-layout>
+    <a-layout-content style="height:100%;background-color:white;padding: 20px;">
+      <h2 style="color: #3e69e4;"><strong>重要</strong></h2>
+
+      <!--添加任务表格-->
+      <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" />
+    </a-layout-content>
+
+    <!-- 任务详情侧边栏 -->
+    <a-layout-sider v-show="taskconfig" style="height:100%;margin-left:10px;background-color:rgb(240,242,245)" theme="light" width="300px">
+      <task-details ref="taskDetails" :taskInfo="taskInfo"></task-details>
+    </a-layout-sider>
+  </a-layout>
 </template>
 
 <script>
@@ -109,7 +105,7 @@ export default {
         {
           endDate: '',
           starLevel: true,
-          finish: false,
+          finish: true,
           important: true,
           key: '2',
           title: '上班',

+ 34 - 0
src/views/task/personal/SearchTask.vue

@@ -0,0 +1,34 @@
+<template>
+    <a-layout>
+    <a-layout-content style="height:100%;background-color:white;padding: 20px;">
+      <h2 style="color: #3e69e4;"><strong>正在搜索 “{{key}}”</strong></h2>
+
+      <!--显示查询结果-->
+      <task-list :taskdata="importantTask" @getData="getImportantData" @refreshData="getImportantData" @openConfig="openConfig" />
+    </a-layout-content>
+
+    <!-- 任务详情侧边栏 -->
+    <a-layout-sider v-show="taskconfig" style="height:100%;margin-left:10px;background-color:rgb(240,242,245)" theme="light" width="300px">
+      <task-details ref="taskDetails" :taskInfo="taskInfo"></task-details>
+    </a-layout-sider>
+  </a-layout>
+</template>
+
+<script>
+
+export default {
+  name: 'SearchTask',
+  data() {
+    return {
+        key:'',
+    }
+  },
+  created(){
+    this.key = this.$route.query.key
+  }
+}
+</script>
+
+<style scoped>
+
+</style>