wenhongquan %!s(int64=2) %!d(string=hai) anos
pai
achega
8650310db0

+ 5 - 4
src/components/Task/Add/index.vue

@@ -274,10 +274,7 @@ export default defineComponent({
       "sys_area"
     );
     const taskinfo = ref({});
-    listTask({ taskCode: moment().year() + "" }).then((res) => {
-      taskinfo.value.taskCode =
-        moment().format("yyyyMMDD") + (Array(4).join(0) + (res.total + 1)).slice(-4);
-    });
+
 
     watch(
       () => formlocation.value.addr,
@@ -327,6 +324,10 @@ export default defineComponent({
     });
     const doinit = (data) => {
       // console.log(getters.value)
+      listTask({ taskCode: moment().year() + "" }).then((res) => {
+        taskinfo.value.taskCode =
+          moment().format("yyyyMMDD") + (Array(4).join(0) + (res.total + 1)).slice(-4);
+      });
       taskinfo.value = data;
 
       if (data.taskId == null) {

+ 50 - 49
src/layout/components/Sidebar/index.vue

@@ -1,49 +1,50 @@
-<template>
-  <div :class="{ 'has-logo': showLogo }" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
-    <logo v-if="showLogo" :collapse="isCollapse" />
-    <el-scrollbar :class="sideTheme" wrap-class="scrollbar-wrapper">
-      <el-menu
-        :default-active="activeMenu"
-        :collapse="isCollapse"
-        :background-color="sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground"
-        :text-color="sideTheme === 'theme-dark' ? variables.menuColor : variables.menuLightColor"
-        :unique-opened="true"
-        :active-text-color="theme"
-        :collapse-transition="false"
-        mode="vertical"
-      >
-        <sidebar-item
-          v-for="(route, index) in sidebarRouters"
-          :key="route.path + index"
-          :item="route"
-          :base-path="route.path"
-        />
-      </el-menu>
-    </el-scrollbar>
-  </div>
-</template>
-
-<script setup>
-import Logo from './Logo'
-import SidebarItem from './SidebarItem'
-import variables from '@/assets/styles/variables.module.scss'
-
-const route = useRoute();
-const store = useStore();
-
-const sidebarRouters =  computed(() => store.getters.sidebarRouters);
-const showLogo = computed(() => store.state.settings.sidebarLogo);
-const sideTheme = computed(() => store.state.settings.sideTheme);
-const theme = computed(() => store.state.settings.theme);
-const isCollapse = computed(() => !store.state.app.sidebar.opened);
-
-const activeMenu = computed(() => {
-  const { meta, path } = route;
-  // if set path, the sidebar will highlight the path you set
-  if (meta.activeMenu) {
-    return meta.activeMenu;
-  }
-  return path;
-})
-
-</script>
+<template>
+  <div :class="{ 'has-logo': showLogo }" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
+    <logo v-if="showLogo" :collapse="isCollapse" />
+    <el-scrollbar :class="sideTheme" wrap-class="scrollbar-wrapper">
+      <el-menu
+        :default-active="activeMenu"
+        :collapse="isCollapse"
+        :background-color="sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground"
+        :text-color="sideTheme === 'theme-dark' ? variables.menuColor : variables.menuLightColor"
+        :unique-opened="true"
+        :active-text-color="theme"
+        :collapse-transition="false"
+        mode="vertical"
+      >
+        <sidebar-item
+          v-for="(route, index) in sidebarRouters"
+          :key="route.path + index"
+          :item="route"
+          :base-path="route.path"
+        />
+      </el-menu>
+    </el-scrollbar>
+  </div>
+</template>
+
+<script setup>
+import Logo from './Logo'
+import SidebarItem from './SidebarItem'
+import variables from '@/assets/styles/variables.module.scss'
+
+const route = useRoute();
+const store = useStore();
+
+const sidebarRouters =  computed(() => store.getters.sidebarRouters);
+const showLogo = computed(() => store.state.settings.sidebarLogo);
+const sideTheme = computed(() => store.state.settings.sideTheme);
+const theme = computed(() => store.state.settings.theme);
+const isCollapse = computed(() => !store.state.app.sidebar.opened);
+
+const activeMenu = computed(() => {
+  const { meta, path } = route;
+
+  // if set path, the sidebar will highlight the path you set
+  if (meta.activeMenu) {
+    return meta.activeMenu;
+  }
+  return path;
+})
+
+</script>

+ 282 - 287
src/router/index.js

@@ -23,293 +23,288 @@ import Layoutmb from "@/layoutmb";
  */
 
 // 公共路由
-export const constantRoutes = [{
-        path: "/redirect",
-        component: Layout,
-        hidden: true,
-        children: [{
-            path: "/redirect/:path(.*)",
-            component: () =>
-                import ("@/views/redirect/index.vue"),
-        }, ],
-    },
-    {
-        path: "/login",
-        component: () =>
-            import ("@/views/login"),
-        hidden: true,
-    },
-    {
-        path: "/register",
-        component: () =>
-            import ("@/views/register"),
-        hidden: true,
-    },
-    {
-        path: "/:pathMatch(.*)*",
-        component: () =>
-            import ("@/views/error/404"),
-        hidden: true,
-    },
-    {
-        path: "/401",
-        component: () =>
-            import ("@/views/error/401"),
-        hidden: true,
-    },
-    {
+export const constantRoutes = [
+  {
+    path: "/redirect",
+    component: Layout,
+    hidden: true,
+    children: [
+      {
+        path: "/redirect/:path(.*)",
+        component: () => import("@/views/redirect/index.vue"),
+      },
+    ],
+  },
+  {
+    path: "/login",
+    component: () => import("@/views/login"),
+    hidden: true,
+  },
+  {
+    path: "/register",
+    component: () => import("@/views/register"),
+    hidden: true,
+  },
+  {
+    path: "/:pathMatch(.*)*",
+    component: () => import("@/views/error/404"),
+    hidden: true,
+  },
+  {
+    path: "/401",
+    component: () => import("@/views/error/401"),
+    hidden: true,
+  },
+  {
+    path: "",
+    component: Layout,
+    hidden: true,
+    redirect: "/task/list/1",
+    children: [
+      // {
+      //     path: "/index",
+      //     component: () =>
+      //         import ("@/views/index"),
+      //     name: "Index",
+      //     meta: { title: "首页", icon: "dashboard", affix: true },
+      // },
+    ],
+  },
+  {
+    path: "/task",
+    component: Layout,
+    hidden: true,
+    redirect: "noredirect",
+    children: [
+      {
+        path: "list/:status",
+        component: () => import("@/views/task/list/index"),
+        name: "tasklist",
+        meta: { title: "任务列表", icon: "user" },
+      },
+      {
+        path: "detail/:id",
+        component: () => import("@/views/task/detail/index"),
+        name: "taskdetail",
+        meta: { title: "任务详情",},
+      },
+    ],
+  },
+  {
+    path: "/detection",
+    component: Layout,
+    hidden: true,
+    redirect: "noredirect",
+    children: [
+      {
+        path: "list/:status",
+        component: () => import("@/views/detection/list/index"),
+        name: "detectionlist",
+        meta: { title: "检测计划列表", icon: "user" },
+      },
+      {
+        path: "detail/:id",
+        component: () => import("@/views/detection/detail/index"),
+        name: "detectiondetail",
+        meta: { title: "检测计划详情", icon: "user" },
+      },
+    ],
+  },
+  {
+    path: "/maintain",
+    component: Layout,
+    hidden: true,
+    redirect: "noredirect",
+    children: [
+      {
+        path: "list/:status",
+        component: () => import("@/views/maintain/list/index"),
+        name: "maintainlist",
+        meta: { title: "养护计划列表", icon: "user" },
+      },
+      {
+        path: "detail/:id",
+        component: () => import("@/views/maintain/detail/index"),
+        name: "maintaindetail",
+        meta: {
+          title: "养护计划详情",
+          activeMenu: "/maintain/list/1",
+        },
+      },
+    ],
+  },
+  {
+    path: "/mb",
+    component: Layoutmb,
+    hidden: true,
+    redirect: "/mb/home",
+    children: [
+      {
+        path: "home",
+        component: () => import("@/views/mb/home/index"),
+        name: "mbhome",
+        meta: { title: "首页", icon: "user" },
+      },
+      {
+        path: "maintain",
+        component: () => import("@/views/mb/maintain/index"),
+        name: "mbmaintain",
+        meta: { title: "养护计划", icon: "user" },
+      },
+      {
+        path: "maintain/detail/:id",
+        component: () => import("@/views/mb/maintain/detail/index"),
+        name: "mbmaintaindetail",
+        meta: { title: "养护计划详情", icon: "user" },
+      },
+      {
+        path: "maintain/feedback/:id",
+        component: () => import("@/views/mb/maintain/feedback/index"),
+        name: "mbtaskfeedback",
+        meta: { title: "养护计划反馈", icon: "user" },
+      },
+      {
+        path: "detection",
+        component: () => import("@/views/mb/detection/index"),
+        name: "mbdetection",
+        meta: { title: "检测计划", icon: "user" },
+      },
+      {
+        path: "detection/detail/:id",
+        component: () => import("@/views/mb/detection/detail/index"),
+        name: "mbdetectiondetail",
+        meta: { title: "检测计划详情", icon: "user" },
+      },
+      {
+        path: "detection/feedback/:id",
+        component: () => import("@/views/mb/detection/feedback/index"),
+        name: "mbtaskdetection",
+        meta: { title: "检测计划反馈", icon: "user" },
+      },
+      {
+        path: "task",
+        component: () => import("@/views/mb/task/index"),
+        name: "mbtask",
+        meta: { title: "工单", icon: "user" },
+      },
+      {
+        path: "task/disposal",
+        component: () => import("@/views/mb/task/disposal/index"),
+        name: "mbtaskdisposal",
+        meta: { title: "工单", icon: "user" },
+      },
+      {
+        path: "task/detail/:id",
+        component: () => import("@/views/mb/task/detail/index"),
+        name: "mbtaskdetail",
+        meta: { title: "热线工单详情", icon: "user" },
+      },
+      {
+        path: "task/add",
+        component: () => import("@/views/mb/task/add/index"),
+        name: "mbtaskadd",
+        meta: { title: "热线工单新增", icon: "user" },
+      },
+    ],
+  },
+  {
+    path: "/user",
+    component: Layout,
+    hidden: true,
+    redirect: "noredirect",
+    children: [
+      {
+        path: "profile",
+        component: () => import("@/views/system/user/profile/index"),
+        name: "Profile",
+        meta: { title: "个人中心", icon: "user" },
+      },
+    ],
+  },
+  {
+    path: "/system/user-auth",
+    component: Layout,
+    hidden: true,
+    children: [
+      {
+        path: "role/:userId(\\d+)",
+        component: () => import("@/views/system/user/authRole"),
+        name: "AuthRole",
+        meta: { title: "分配角色", activeMenu: "/system/user" },
+      },
+    ],
+  },
+  {
+    path: "/system/role-auth",
+    component: Layout,
+    hidden: true,
+    children: [
+      {
+        path: "user/:roleId(\\d+)",
+        component: () => import("@/views/system/role/authUser"),
+        name: "AuthUser",
+        meta: { title: "分配用户", activeMenu: "/system/role" },
+      },
+    ],
+  },
+  {
+    path: "/system/dict-data",
+    component: Layout,
+    hidden: true,
+    children: [
+      {
+        path: "index/:dictId(\\d+)",
+        component: () => import("@/views/system/dict/data"),
+        name: "Data",
+        meta: { title: "字典数据", activeMenu: "/system/dict" },
+      },
+    ],
+  },
+  {
+    path: "/system/facilities",
+    component: Layout,
+    hidden: true,
+    children: [
+      {
         path: "",
-        component: Layout,
-        hidden: true,
-        redirect: "/task/list/1",
-        children: [
-            // {
-            //     path: "/index",
-            //     component: () =>
-            //         import ("@/views/index"),
-            //     name: "Index",
-            //     meta: { title: "首页", icon: "dashboard", affix: true },
-            // },
-        ],
-    },
-    {
-        path: "/task",
-        component: Layout,
-        hidden: true,
-        redirect: "noredirect",
-        children: [{
-                path: "list/:status",
-                component: () =>
-                    import ("@/views/task/list/index"),
-                name: "tasklist",
-                meta: { title: "任务列表", icon: "user" },
-            },
-            {
-                path: "detail/:id",
-                component: () =>
-                    import ("@/views/task/detail/index"),
-                name: "taskdetail",
-                meta: { title: "任务详情", icon: "user" },
-            },
-        ],
-    },
-    {
-        path: "/detection",
-        component: Layout,
-        hidden: true,
-        redirect: "noredirect",
-        children: [{
-                path: "list/:status",
-                component: () =>
-                    import ("@/views/detection/list/index"),
-                name: "detectionlist",
-                meta: { title: "检测计划列表", icon: "user" },
-            },
-            {
-                path: "detail/:id",
-                component: () =>
-                    import ("@/views/detection/detail/index"),
-                name: "detectiondetail",
-                meta: { title: "检测计划详情", icon: "user" },
-            },
-        ],
-    },
-    {
-        path: "/maintain",
-        component: Layout,
-        hidden: true,
-        redirect: "noredirect",
-        children: [{
-                path: "list/:status",
-                component: () =>
-                    import ("@/views/maintain/list/index"),
-                name: "maintainlist",
-                meta: { title: "养护计划列表", icon: "user" },
-            },
-            {
-                path: "detail/:id",
-                component: () =>
-                    import ("@/views/maintain/detail/index"),
-                name: "maintaindetail",
-                meta: { title: "养护计划详情", icon: "user" },
-            },
-        ],
-    },
-    {
-        path: "/mb",
-        component: Layoutmb,
-        hidden: true,
-        redirect: "/mb/home",
-        children: [{
-                path: "home",
-                component: () =>
-                    import ("@/views/mb/home/index"),
-                name: "mbhome",
-                meta: { title: "首页", icon: "user" },
-            },
-            {
-                path: "maintain",
-                component: () =>
-                    import ("@/views/mb/maintain/index"),
-                name: "mbmaintain",
-                meta: { title: "养护计划", icon: "user" },
-            },
-            {
-                path: "maintain/detail/:id",
-                component: () =>
-                    import ("@/views/mb/maintain/detail/index"),
-                name: "mbmaintaindetail",
-                meta: { title: "养护计划详情", icon: "user" },
-            },
-            {
-                path: "maintain/feedback/:id",
-                component: () =>
-                    import ("@/views/mb/maintain/feedback/index"),
-                name: "mbtaskfeedback",
-                meta: { title: "养护计划反馈", icon: "user" },
-            },
-            {
-                path: "detection",
-                component: () =>
-                    import ("@/views/mb/detection/index"),
-                name: "mbdetection",
-                meta: { title: "检测计划", icon: "user" },
-            },
-            {
-                path: "detection/detail/:id",
-                component: () =>
-                    import ("@/views/mb/detection/detail/index"),
-                name: "mbdetectiondetail",
-                meta: { title: "检测计划详情", icon: "user" },
-            },
-            {
-                path: "detection/feedback/:id",
-                component: () =>
-                    import ("@/views/mb/detection/feedback/index"),
-                name: "mbtaskdetection",
-                meta: { title: "检测计划反馈", icon: "user" },
-            },
-            {
-                path: "task",
-                component: () =>
-                    import ("@/views/mb/task/index"),
-                name: "mbtask",
-                meta: { title: "工单", icon: "user" },
-            },
-            {
-                path: "task/disposal",
-                component: () =>
-                    import ("@/views/mb/task/disposal/index"),
-                name: "mbtaskdisposal",
-                meta: { title: "工单", icon: "user" },
-            },
-            {
-                path: "task/detail/:id",
-                component: () =>
-                    import ("@/views/mb/task/detail/index"),
-                name: "mbtaskdetail",
-                meta: { title: "热线工单详情", icon: "user" },
-            },
-            {
-                path: "task/add",
-                component: () =>
-                    import ("@/views/mb/task/add/index"),
-                name: "mbtaskadd",
-                meta: { title: "热线工单新增", icon: "user" },
-            },
-        ],
-    },
-    {
-        path: "/user",
-        component: Layout,
-        hidden: true,
-        redirect: "noredirect",
-        children: [{
-            path: "profile",
-            component: () =>
-                import ("@/views/system/user/profile/index"),
-            name: "Profile",
-            meta: { title: "个人中心", icon: "user" },
-        }, ],
-    },
-    {
-        path: "/system/user-auth",
-        component: Layout,
-        hidden: true,
-        children: [{
-            path: "role/:userId(\\d+)",
-            component: () =>
-                import ("@/views/system/user/authRole"),
-            name: "AuthRole",
-            meta: { title: "分配角色", activeMenu: "/system/user" },
-        }, ],
-    },
-    {
-        path: "/system/role-auth",
-        component: Layout,
-        hidden: true,
-        children: [{
-            path: "user/:roleId(\\d+)",
-            component: () =>
-                import ("@/views/system/role/authUser"),
-            name: "AuthUser",
-            meta: { title: "分配用户", activeMenu: "/system/role" },
-        }, ],
-    },
-    {
-        path: "/system/dict-data",
-        component: Layout,
-        hidden: true,
-        children: [{
-            path: "index/:dictId(\\d+)",
-            component: () =>
-                import ("@/views/system/dict/data"),
-            name: "Data",
-            meta: { title: "字典数据", activeMenu: "/system/dict" },
-        }, ],
-    },
-    {
-        path: "/system/facilities",
-        component: Layout,
-        hidden: true,
-        children: [{
-            path: "",
-            component: () =>
-                import ("@/views/system/facilities/index"),
-            name: "facilitiesindex",
-            meta: { title: "设施列表", activeMenu: "/system/facilities" },
-        }, {
-            path: "detail/:id",
-            component: () =>
-                import ("@/views/system/facilities/detail"),
-            name: "facilitiesdetail",
-            meta: { title: "设施详请", activeMenu: "/system/facilities" },
-        }, ],
-    },
-    {
-        path: "/monitor/job-log",
-        component: Layout,
-        hidden: true,
-        children: [{
-            path: "index",
-            component: () =>
-                import ("@/views/monitor/job/log"),
-            name: "JobLog",
-            meta: { title: "调度日志", activeMenu: "/monitor/job" },
-        }, ],
-    },
-    {
-        path: "/tool/gen-edit",
-        component: Layout,
-        hidden: true,
-        children: [{
-            path: "index/:tableId(\\d+)",
-            component: () =>
-                import ("@/views/tool/gen/editTable"),
-            name: "GenEdit",
-            meta: { title: "修改生成配置", activeMenu: "/tool/gen" },
-        }, ],
-    },
+        component: () => import("@/views/system/facilities/index"),
+        name: "facilitiesindex",
+        meta: { title: "设施列表", activeMenu: "/system/facilities" },
+      },
+      {
+        path: "detail/:id",
+        component: () => import("@/views/system/facilities/detail"),
+        name: "facilitiesdetail",
+        meta: { title: "设施详请", activeMenu: "/system/facilities" },
+      },
+    ],
+  },
+  {
+    path: "/monitor/job-log",
+    component: Layout,
+    hidden: true,
+    children: [
+      {
+        path: "index",
+        component: () => import("@/views/monitor/job/log"),
+        name: "JobLog",
+        meta: { title: "调度日志", activeMenu: "/monitor/job" },
+      },
+    ],
+  },
+  {
+    path: "/tool/gen-edit",
+    component: Layout,
+    hidden: true,
+    children: [
+      {
+        path: "index/:tableId(\\d+)",
+        component: () => import("@/views/tool/gen/editTable"),
+        name: "GenEdit",
+        meta: { title: "修改生成配置", activeMenu: "/tool/gen" },
+      },
+    ],
+  },
 ];
 
 const router = createRouter({
@@ -324,4 +319,4 @@ const router = createRouter({
     },
 });
 
-export default router;
+export default router;

+ 9 - 1
src/views/detection/list/index.vue

@@ -572,7 +572,7 @@ import { listDept, getDept } from "@/api/system/dept";
 import { treeselect as deptTreeselect } from "@/api/system/dept";
 import { cloneDeep } from "lodash";
 import { ElMessage } from "element-plus";
-import { useRoute } from "vue-router";
+import { onBeforeRouteLeave, useRoute } from "vue-router";
 import { delDetection, updateDetection } from "../../../api/system/detection";
 import {
   Delete,
@@ -839,6 +839,14 @@ const deltask = (row) => {
 onMounted(() => {
 
 });
+
+onBeforeRouteLeave((to, from, next) => {
+  to.meta.activeMenu = from.path;
+  console.log(to);
+  next()
+})
+
+
 </script>
 
 <style lang="scss" scoped>

+ 12 - 2
src/views/maintain/list/index.vue

@@ -107,7 +107,7 @@
            <el-table-column label="管道清淤(米)"  >
             <template #default="scope">
               {{
-                evilFn(scope.row.ext1.task.gd.map(i=>(i.yh_length && i.yh_length!=''?i.yh_length:0 ) ).join("+"))
+                 evilFn((scope.row.ext1.task.gd).map(i => (i.yh_length && i.yh_length != '' ? parseFloat(i.yh_length):0 ) ).join("+"))
               }}
             </template>
           </el-table-column>
@@ -562,7 +562,7 @@ import { cloneDeep } from "lodash";
 import { listDept, getDept } from "@/api/system/dept";
 import { treeselect as deptTreeselect } from "@/api/system/dept";
 import { ElMessage } from "element-plus";
-import { useRoute } from "vue-router";
+import { onBeforeRouteLeave, useRoute } from "vue-router";
 import { delMaintain, getMaintain, updateMaintain } from "../../../api/system/maintain";
 import {
   Delete,
@@ -573,6 +573,7 @@ import {
   Plus,
   Minus,
 } from "@element-plus/icons-vue";
+import { isNumber } from "@vueuse/shared";
 
 const { maintain_status, maintain_type } = useDict("maintain_status", "maintain_type");
 const queryparameters = ref({
@@ -750,6 +751,7 @@ const gzloperat = (index) => {
 };
 
 const evilFn = (fn) => {
+  console.log(fn);
   let Fn = Function; // 一个变量指向Function,防止有些前端编译工具报错
   return new Fn(`return ${fn}`)();
 };
@@ -809,6 +811,14 @@ onMounted(() => {});
     }
   );
 }
+
+onBeforeRouteLeave((to, from, next) => {
+  to.meta.activeMenu = from.path;
+  console.log(to);
+  next()
+})
+
+
 </script>
 
 <style lang="scss" scoped>

+ 21 - 27
src/views/system/facilities/index.vue

@@ -48,12 +48,16 @@
         </el-select>
       </el-form-item>
       <el-form-item label="管辖班组" prop="params.ext1.tz_ss_unit">
-        <el-tree-select
+        <el-select v-model="queryParams.params.ext1.tz_ss_unit" class="m-2" placeholder="请选择" clearable
+          @keyup.enter.native="handleQuery">
+          <el-option v-for="dept in alldept.filter(i => i.deptName.indexOf('生产') != -1 || i.deptName.indexOf('运营') != -1)" :label="dept.deptName" :value="dept.deptId"></el-option>
+        </el-select>
+        <!-- <el-tree-select
           v-model="queryParams.params.ext1.tz_ss_unit"
-          :data="treedept"
+          :data="alldept.filter(i => i.deptName.indexOf('生产') != -1 || i.deptName.indexOf('运营') != -1 )"
           check-strictly="true"
           @keyup.enter.native="handleQuery"
-        />
+        /> -->
       </el-form-item>
       <el-form-item label="排水体制" prop="params.ext1.tz_ss_pstz">
         <el-select
@@ -76,15 +80,20 @@
         <el-button type="primary" icon="search" size="mini" @click="handleQuery"
           >搜索</el-button
         >
-        <el-button icon="refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button icon="refresh" type="primary" size="mini" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
 
     <el-row :gutter="10" class="mb8">
+
+      <el-col :span="1.5">
+        <el-button type="danger" icon="Delete" size="mini" :disabled="multiple" @click.stop="handleDelete"
+          v-hasPermi="['system:facilities:remove']">删除</el-button>
+      </el-col>
+
       <el-col :span="1.5">
         <el-button
-          type="primary"
-          plain
+          type="success"
           icon="Plus"
           size="mini"
           @click="handleAdd"
@@ -93,9 +102,8 @@
         >
       </el-col>
       <el-col :span="1.5">
-        <el-button
+        <el-button v-if="false"
           type="success"
-          plain
           icon="Edit"
           size="mini"
           :disabled="single"
@@ -104,22 +112,10 @@
           >修改</el-button
         >
       </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="Delete"
-          size="mini"
-          :disabled="multiple"
-          @click.stop="handleDelete"
-          v-hasPermi="['system:facilities:remove']"
-          >删除</el-button
-        >
-      </el-col>
+
       <el-col :span="1.5">
         <el-button v-if="false"
           type="warning"
-          plain
           icon="Download"
           size="mini"
           @click="handleExport"
@@ -127,7 +123,7 @@
           >导出</el-button
         >
       </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <right-toolbar v-if="false" :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table
@@ -137,7 +133,7 @@
       @selection-change="handleSelectionChange"
     >
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="序号" align="center" prop="id" />
+      <!-- <el-table-column label="序号" align="center" prop="id" /> -->
       <el-table-column label="台账编号" align="center" prop="ext1.tz_id" />
       <el-table-column label="行政区属" align="center" prop="ext1.tz_area_new">
         <template #default="scope">
@@ -184,16 +180,14 @@
         <template #default="scope">
           <el-button
             size="mini"
-            type="text"
-            icon="el-icon-edit"
+             type="primary"
             @click.stop="handleUpdate(scope.row)"
             v-hasPermi="['system:facilities:edit']"
             >修改</el-button
           >
           <el-button
             size="mini"
-            type="text"
-            icon="el-icon-delete"
+            type="danger"
             @click.stop="handleDelete(scope.row)"
             v-hasPermi="['system:facilities:remove']"
             >删除</el-button

+ 5 - 1
src/views/task/detail/index.vue

@@ -1115,7 +1115,7 @@ import ImagePreview from "@/components/ImagePreview";
 import { cloneDeep } from "lodash";
 import { listDept, getDept } from "@/api/system/dept";
 import router from "../../../router";
-import { useRoute } from "vue-router";
+import { onBeforeRouteLeave, useRoute } from "vue-router";
 import {
   listTask,
   getTask,
@@ -1566,6 +1566,10 @@ watch(
       });
   }
 );
+
+
+
+
 </script>
 
 <style lang="scss">

+ 22 - 10
src/views/task/list/index.vue

@@ -94,19 +94,21 @@
             </el-form-item>
           </el-col>
 
-          <el-col :span="4">
+          <!-- <el-col :span="4"> -->
             <div style="float: right">
+
               <el-form-item>
                 <el-button type="primary" @click="getList">查询</el-button>
               </el-form-item>
+              <el-form-item>
+                <el-button type="primary" @click="reset()">重置</el-button>
+              </el-form-item>
               <el-form-item v-if="route.params.status == 6">
                 <el-button type="primary" @click="exportexcel2(queryparameters)"
                   >导出成本记录
                 </el-button>
               </el-form-item>
-              <el-form-item>
-                <el-button type="primary" @click="reset()">重置</el-button>
-              </el-form-item>
+
               <el-form-item>
                 <el-button
                   type="success"
@@ -116,7 +118,7 @@
                 >
               </el-form-item>
             </div>
-          </el-col>
+          <!-- </el-col> -->
         </el-row>
       </el-form>
 
@@ -291,7 +293,7 @@ import {
 } from "@/api/system/task";
 import { cloneDeep } from "lodash";
 import { isArray } from "@vue/shared";
-import { useRoute } from "vue-router";
+import { onBeforeRouteLeave, useRoute } from "vue-router";
 import moment from "moment";
 import { treeselect as deptTreeselect } from "@/api/system/dept";
 
@@ -429,12 +431,15 @@ const ontaskadd = async () => {
 };
 
 const getList = () => {
+  console.log(queryparameters.value.status)
+
   if (
-    currentstatus.value != "1" &&
-    currentstatus.value != 1 &&
-    queryparameters.value.status === ""
+    currentstatus.value !== "1" &&
+    currentstatus.value !== 1 &&
+    (queryparameters.value.status === "" || queryparameters.value.status==0)
   ) {
-    if (currentstatus.value == "2") {
+
+    if (currentstatus.value == "2" || currentstatus.value == 2) {
       queryparameters.value.status = 1;
     } else {
       queryparameters.value.status = currentstatus.value;
@@ -542,6 +547,13 @@ onMounted(() => {
       currentstatus.value == "1" ? "0" : currentstatus.value;
   }
 });
+onBeforeRouteLeave((to, from, next) => {
+  to.meta.activeMenu = from.path;
+  console.log(to);
+  next()
+})
+
+
 </script>
 
 <style lang="scss" scoped>