xiebin
2022-09-21 2ca215114eb2c997a45526ae37f3de521bdaf01d
取消设置巡检人员跳转页面方式
4 files modified
40 ■■■■■ changed files
src/const/taskinfo/taskplanUser.js 1 ●●●● patch | view | raw | blame | history
src/router/views/index.js 9 ●●●●● patch | view | raw | blame | history
src/views/taskinfo/taskinfoPlan.vue 14 ●●●● patch | view | raw | blame | history
src/views/taskinfo/taskplanUser.vue 16 ●●●● patch | view | raw | blame | history
src/const/taskinfo/taskplanUser.js
@@ -8,6 +8,7 @@
  index: true,
  viewBtn: false,
  editBtn: false,
  addBtn: false,
  selection: true,
  dialogClickModal: false,
  column: [
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')
      }
    ]
  },
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
      }
    }
  };
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("请选择至少一条数据");