From 2ca215114eb2c997a45526ae37f3de521bdaf01d Mon Sep 17 00:00:00 2001
From: xiebin <123456>
Date: Wed, 21 Sep 2022 17:37:03 +0800
Subject: [PATCH] 取消设置巡检人员跳转页面方式

---
 src/router/views/index.js           |    9 ---------
 src/views/taskinfo/taskplanUser.vue |   16 ++++++++++++++--
 src/const/taskinfo/taskplanUser.js  |    1 +
 src/views/taskinfo/taskinfoPlan.vue |   14 ++++++++++++--
 4 files changed, 27 insertions(+), 13 deletions(-)

diff --git a/src/const/taskinfo/taskplanUser.js b/src/const/taskinfo/taskplanUser.js
index 810b707..af0ac59 100644
--- a/src/const/taskinfo/taskplanUser.js
+++ b/src/const/taskinfo/taskplanUser.js
@@ -8,6 +8,7 @@
   index: true,
   viewBtn: false,
   editBtn: false,
+  addBtn: false,
   selection: true,
   dialogClickModal: false,
   column: [
diff --git a/src/router/views/index.js b/src/router/views/index.js
index 832e1d9..4f87aeb 100644
--- a/src/router/views/index.js
+++ b/src/router/views/index.js
@@ -131,15 +131,6 @@
         },
         component: () =>
           import ( /* webpackChunkName: "views" */ '@/views/taskinfo/taskinfoDetail')
-      },
-      {
-        path: 'taskplanUser',
-        name: '设置巡检人员',
-        meta: {
-          i18n: 'detail',
-        },
-        component: () =>
-          import ( /* webpackChunkName: "views" */ '@/views/taskinfo/taskplanUser')
       }
     ]
   },
diff --git a/src/views/taskinfo/taskinfoPlan.vue b/src/views/taskinfo/taskinfoPlan.vue
index 279b585..b79cafb 100644
--- a/src/views/taskinfo/taskinfoPlan.vue
+++ b/src/views/taskinfo/taskinfoPlan.vue
@@ -1,6 +1,6 @@
 <template>
   <basic-container>
-    <avue-crud :option="option"
+    <avue-crud v-show="!isSetPlanUser" :option="option"
                :table-loading="loading"
                :data="data"
                :page.sync="page"
@@ -58,17 +58,23 @@
 
       </template>
     </avue-crud>
+    <taskplan-user v-show="isSetPlanUser" ref="taskplanUser" @setPlanUser="setPlanUser"></taskplan-user>
   </basic-container>
 </template>
+
+
 
 <script>
   import {getList, getDetail, add, update, remove, changeStatus} from "@/api/taskinfo/taskinfoPlan";
   import option from "@/const/taskinfo/taskinfoPlan";
   import {mapGetters} from "vuex";
+  import TaskplanUser from "@/views/taskinfo/taskplanUser";
 
   export default {
+    components: {TaskplanUser},
     data() {
       return {
+        isSetPlanUser:false,
         form: {},
         query: {},
         loading: true,
@@ -223,7 +229,11 @@
         })
       },
       goToTaskplanUser(planId) {
-        this.$router.push({ path: "/taskinfo/taskplanUser", query: {planId:planId} });
+        // this.$router.push({ path: "/taskinfo/taskplanUser", query: {planId:planId} });
+        this.setPlanUser()
+      },
+      setPlanUser() {
+        this.isSetPlanUser = !this.isSetPlanUser
       }
     }
   };
diff --git a/src/views/taskinfo/taskplanUser.vue b/src/views/taskinfo/taskplanUser.vue
index b16c1a3..0b4f97d 100644
--- a/src/views/taskinfo/taskplanUser.vue
+++ b/src/views/taskinfo/taskplanUser.vue
@@ -1,5 +1,4 @@
 <template>
-  <basic-container>
     <avue-crud :option="option"
                :table-loading="loading"
                :data="data"
@@ -19,6 +18,17 @@
                @refresh-change="refreshChange"
                @on-load="onLoad">
       <template slot="menuLeft">
+        <el-button
+          size="small"
+          icon="el-icon-back"
+          plain
+          @click="handleBack">返 回
+        </el-button>
+        <el-button type="primary"
+                   size="small"
+                   icon="el-icon-plus"
+                   @click.native="$refs.crud.rowAdd">新 增
+        </el-button>
         <el-button type="danger"
                    size="small"
                    icon="el-icon-delete"
@@ -27,7 +37,6 @@
         </el-button>
       </template>
     </avue-crud>
-  </basic-container>
 </template>
 
 <script>
@@ -117,6 +126,9 @@
             });
           });
       },
+      handleBack() {
+        this.$emit('setPlanUser');
+      },
       handleDelete() {
         if (this.selectionList.length === 0) {
           this.$message.warning("请选择至少一条数据");

--
Gitblit v1.9.3