Quellcode durchsuchen

添加本地路由,路由守卫逻辑修改,菜单Item修改。

jiaxiaoqiang vor 11 Monaten
Ursprung
Commit
4437469f05

+ 4 - 4
src/layout/components/Sidebar/components/SidebarMenuItemTitle.vue

@@ -1,9 +1,9 @@
 <template>
-  <el-icon v-if="icon && icon.startsWith('el-icon')" class="sub-el-icon">
-    <component :is="icon.replace('el-icon-', '')" />
+  <el-icon class="sub-el-icon">
+    <component :is="icon" />
   </el-icon>
-  <svg-icon v-else-if="icon" :icon-class="icon" />
-  <svg-icon v-else icon-class="menu" />
+  <!--  <svg-icon v-else-if="icon" :icon-class="icon" />-->
+  <!--  <svg-icon v-else icon-class="menu" />-->
   <span v-if="title" class="ml-1">{{ translateRouteTitle(title) }}</span>
 </template>
 

+ 7 - 4
src/layout/components/Sidebar/components/SidebarMixTopMenu.vue

@@ -15,10 +15,13 @@
         :index="route.path"
       >
         <template #title>
-          <svg-icon
-            v-if="route.meta && route.meta.icon"
-            :icon-class="route.meta.icon"
-          />
+          <!--          <svg-icon-->
+          <!--            v-if="route.meta && route.meta.icon"-->
+          <!--            :icon-class="route.meta.icon"-->
+          <!--          />-->
+          <el-icon v-if="route.meta && route.meta.icon">
+            <component :is="route.meta.icon"></component>
+          </el-icon>
           <span v-if="route.path === '/'"> 首页 </span>
           <template v-else>
             <span v-if="route.meta && route.meta.title" class="ml-1">

+ 10 - 33
src/plugins/permission.ts

@@ -1,4 +1,4 @@
-import router from "@/router";
+import router, { configRoutes } from "@/router";
 import { useUserStore } from "@/store/modules/user";
 import { usePermissionStore } from "@/store/modules/permission";
 import { useDictionaryStore } from "@/store/modules/dictionary";
@@ -19,6 +19,12 @@ export function setupPermission() {
         next({ path: "/" });
         NProgress.done();
       } else {
+        // 如果已经登录,让菜单加载本地的写死路由的数据
+        const userStore = usePermissionStore();
+        if (!userStore.routes || userStore.routes.length === 0) {
+          userStore.setRoutes(configRoutes);
+        }
+
         const dictStore = useDictionaryStore();
         if (
           !dictStore.dicts.value ||
@@ -29,42 +35,13 @@ export function setupPermission() {
             dictStore.dicts = res?.data;
           }
         }
-
-        const userStore = useUserStore();
-        // const hasRoles =
-        //   userStore.user.roles && userStore.user.roles.length > 0;
-        if (userStore.isGetAuth) {
-          // 未匹配到任何路由,跳转404
-          if (to.matched.length === 0) {
-            from.name ? next({ name: from.name }) : next("/404");
-          } else {
-            next();
-          }
-        } else {
-          const permissionStore = usePermissionStore();
-          try {
-            const { menus } = await userStore.getUserInfo();
-
-            const accessRoutes = await permissionStore.generateRoutes(menus);
-
-            accessRoutes.forEach((route) => {
-              router.addRoute(route);
-            });
-            next({ ...to, replace: true });
-          } catch (error) {
-            console.error("beforeEach error", error);
-            // 移除 token 并跳转登录页
-            await userStore.resetToken();
-            next(`/login?redirect=${to.path}`);
-            NProgress.done();
-          }
-        }
+        next();
       }
     } else {
       // 未登录可以访问白名单页面
       if (whiteList.indexOf(to.path) !== -1) {
-        const dictStore = useDictionaryStore();
-        dictStore.checkDicts();
+        // const dictStore = useDictionaryStore();
+        // dictStore.checkDicts();
         next();
       } else {
         if (to.path === "/login") {

+ 20 - 46
src/router/index.ts

@@ -1,56 +1,30 @@
-import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";
-
-export const Layout = () => import("@/layout/index.vue");
-
-// 静态路由
-export const constantRoutes: RouteRecordRaw[] = [
-  {
-    path: "/redirect",
-    component: Layout,
-    meta: { hidden: true },
-    children: [
-      {
-        path: "/redirect/:path(.*)",
-        component: () => import("@/views/redirect/index.vue"),
-      },
-    ],
-  },
-
-  {
-    path: "/login",
-    component: () => import("@/views/login/index.vue"),
-    meta: { hidden: true },
-  },
-
-  {
-    path: "/",
-    name: "/",
-    meta: { hidden: true },
-    component: Layout,
-    redirect: "/welcome",
-    children: [
-      {
-        path: "welcome",
-        component: () => import("@/views/welcome/index.vue"),
-        name: "Welcome",
-        meta: { hidden: true },
-      },
-    ],
-  },
-
-  {
-    path: "/:pathMatch(.*)*", // 必备
-    meta: { hidden: true },
-    component: () => import("@/views/error-page/404.vue"),
+import { createRouter, createWebHistory } from "vue-router";
+
+const moduleFiles: any = import.meta.glob("./modules/*.ts", { eager: true });
+
+// 通过 reduce 去搜集所有的模块的导出内容
+export const configRoutes = Object.keys(moduleFiles).reduce(
+  (routes: any, filepath: string) => {
+    const value = moduleFiles[filepath].default;
+
+    // 我们判断导出的是不是数组,是则进行拓展解构
+    if (Array.isArray(value)) {
+      routes.push(...value);
+    } else {
+      // 否则直接加到routes中
+      routes.push(value);
+    }
+    return routes;
   },
-];
+  []
+);
 
 /**
  * 创建路由
  */
 const router = createRouter({
   history: createWebHistory(),
-  routes: constantRoutes,
+  routes: configRoutes,
   // 刷新时,滚动条位置还原
   scrollBehavior: () => ({ left: 0, top: 0 }),
 });

+ 23 - 0
src/router/modules/analysis.ts

@@ -0,0 +1,23 @@
+const Layout = () => import("@/layout/index.vue");
+
+export default {
+  path: "/analysis",
+  name: "analysis",
+  component: Layout,
+  meta: {
+    title: "数据分析处理",
+    icon: "Monitor",
+  },
+  redirect: "/analysis/task",
+  children: [
+    {
+      path: "task",
+      component: () => import("@/views/analysis/spc/index.vue"),
+      name: "SPCTask",
+      meta: {
+        title: "SPC任务管理",
+        icon: "Guide",
+      },
+    },
+  ],
+};

+ 45 - 0
src/router/modules/constant.ts

@@ -0,0 +1,45 @@
+import { RouteRecordRaw } from "vue-router";
+
+const Layout = () => import("@/layout/index.vue");
+
+const constantRoutes: RouteRecordRaw[] = [
+  {
+    path: "/redirect",
+    component: Layout,
+    meta: { hidden: true },
+    children: [
+      {
+        path: "/redirect/:path(.*)",
+        component: () => import("@/views/redirect/index.vue"),
+      },
+    ],
+  },
+
+  {
+    path: "/login",
+    component: () => import("@/views/login/index.vue"),
+    meta: { hidden: true },
+  },
+  {
+    path: "/",
+    name: "/",
+    meta: { hidden: true },
+    component: Layout,
+    redirect: "/welcome",
+    children: [
+      {
+        path: "welcome",
+        component: () => import("@/views/welcome/index.vue"),
+        name: "Welcome",
+        meta: { hidden: true },
+      },
+    ],
+  },
+
+  {
+    path: "/:pathMatch(.*)*", // 必备
+    meta: { hidden: true },
+    component: () => import("@/views/error-page/404.vue"),
+  },
+];
+export default constantRoutes;

+ 32 - 0
src/router/modules/statistic.ts

@@ -0,0 +1,32 @@
+const Layout = () => import("@/layout/index.vue");
+
+export default {
+  path: "/statistic",
+  name: "statistic",
+  component: Layout,
+  redirect: "/statistic/main",
+  meta: {
+    title: "质量数据统计",
+    icon: "ChromeFilled",
+  },
+  children: [
+    {
+      path: "main",
+      component: () => import("@/views/statistic/statistic/index.vue"),
+      name: "StatisticMain",
+      meta: {
+        title: "质量统计",
+        icon: "Refrigerator",
+      },
+    },
+    {
+      path: "report",
+      component: () => import("@/views/statistic/report/index.vue"),
+      name: "StatisticReport",
+      meta: {
+        title: "质量报告",
+        icon: "CreditCard",
+      },
+    },
+  ],
+};

+ 2 - 1
src/store/modules/permission.ts

@@ -1,5 +1,5 @@
 import { RouteRecordRaw } from "vue-router";
-import { constantRoutes } from "@/router";
+import constantRoutes from "@/router/modules/constant";
 import { store } from "@/store";
 import { listRoutes } from "@/api/system/menu";
 
@@ -163,6 +163,7 @@ export const usePermissionStore = defineStore("permission", () => {
   }
   return {
     routes,
+    setRoutes,
     generateRoutes,
     mixLeftMenus,
     setMixLeftMenus,

+ 148 - 103
src/typings/components.d.ts

@@ -5,109 +5,154 @@
 // Read more: https://github.com/vuejs/core/pull/3399
 export { }
 
-declare module 'vue' {
-  ExcelUpload: typeof import('./../components/Upload/ExcelUpload.vue')['default']
-  CommonTable: typeof import('./../components/CommonTable/index.vue')['default']
-  AppLink: typeof import('./../components/AppLink/index.vue')['default']
-  AppMain: typeof import('./../layout/components/AppMain/index.vue')['default']
-  BarChart: typeof import('./../views/dashboard/components/BarChart.vue')['default']
-  Breadcrumb: typeof import('./../components/Breadcrumb/index.vue')['default']
-  DeptTree: typeof import('./../views/system/user/components/dept-tree.vue')['default']
-  Dictionary: typeof import('./../components/Dictionary/index.vue')['default']
-  DictItem: typeof import('./../views/system/dict/components/dict-item.vue')['default']
-  ElAlert: typeof import('element-plus/es')['ElAlert']
-  ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
-  ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
-  ElButton: typeof import('element-plus/es')['ElButton']
-  ElCard: typeof import('element-plus/es')['ElCard']
-  ElCol: typeof import('element-plus/es')['ElCol']
-  ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
-  ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
-  ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
-  ElDialog: typeof import('element-plus/es')['ElDialog']
-  ElDivider: typeof import('element-plus/es')['ElDivider']
-  ElDrawer: typeof import('element-plus/es')['ElDrawer']
-  ElDropdown: typeof import('element-plus/es')['ElDropdown']
-  ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
-  ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
-  ElForm: typeof import('element-plus/es')['ElForm']
-  ElFormItem: typeof import('element-plus/es')['ElFormItem']
-  ElIcon: typeof import('element-plus/es')['ElIcon']
-  ElImage: typeof import('element-plus/es')['ElImage']
-  ElInput: typeof import('element-plus/es')['ElInput']
-  ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
-  ElLink: typeof import('element-plus/es')['ElLink']
-  ElMenu: typeof import('element-plus/es')['ElMenu']
-  ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
-  ElOption: typeof import('element-plus/es')['ElOption']
-  ElPagination: typeof import('element-plus/es')['ElPagination']
-  ElPopover: typeof import('element-plus/es')['ElPopover']
-  ElRadio: typeof import('element-plus/es')['ElRadio']
-  ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
-  ElRow: typeof import('element-plus/es')['ElRow']
-  ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
-  ElSelect: typeof import('element-plus/es')['ElSelect']
-  ElStatistic: typeof import('element-plus/es')['ElStatistic']
-  ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
-  ElSwitch: typeof import('element-plus/es')['ElSwitch']
-  ElTable: typeof import('element-plus/es')['ElTable']
-  ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
-  ElTabPane: typeof import('element-plus/es')['ElTabPane']
-  ElTabs: typeof import('element-plus/es')['ElTabs']
-  ElTag: typeof import('element-plus/es')['ElTag']
-  ElText: (typeof import("element-plus/es"))["ElText"]
-  ElTooltip: typeof import('element-plus/es')['ElTooltip']
-  ElTree: typeof import('element-plus/es')['ElTree']
-  ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']
-  ElUpload: typeof import('element-plus/es')['ElUpload']
-  ElWatermark: typeof import('element-plus/es')['ElWatermark']
-  FunnelChart: typeof import('./../views/dashboard/components/FunnelChart.vue')['default']
-  GithubCorner: typeof import('./../components/GithubCorner/index.vue')['default']
-  Hamburger: typeof import('./../components/Hamburger/index.vue')['default']
-  IconSelect: typeof import('./../components/IconSelect/index.vue')['default']
-  IEpCaretBottom: typeof import('~icons/ep/caret-bottom')['default']
-  IEpCaretTop: typeof import('~icons/ep/caret-top')['default']
-  IEpClose: typeof import('~icons/ep/close')['default']
-  IEpCollection: (typeof import("~icons/ep/collection"))["default"]
-  IEpDelete: typeof import('~icons/ep/delete')['default']
-  IEpDownload: typeof import('~icons/ep/download')['default']
-  IEpEdit: typeof import('~icons/ep/edit')['default']
-  IEpPlus: typeof import('~icons/ep/plus')['default']
-  IEpPosition: (typeof import("~icons/ep/position"))["default"]
-  IEpQuestionFilled: typeof import('~icons/ep/question-filled')['default']
-  IEpRefresh: typeof import('~icons/ep/refresh')['default']
-  IEpRefreshLeft: typeof import('~icons/ep/refresh-left')['default']
-  IEpSearch: typeof import('~icons/ep/search')['default']
-  IEpSetting: (typeof import("~icons/ep/setting"))["default"]
-  IEpTop: typeof import('~icons/ep/top')['default']
-  IEpUploadFilled: typeof import('~icons/ep/upload-filled')['default']
-  LangSelect: typeof import('./../components/LangSelect/index.vue')['default']
-  LayoutSelect: typeof import('./../layout/components/Settings/components/LayoutSelect.vue')['default']
-  MultiUpload: typeof import('./../components/Upload/MultiUpload.vue')['default']
-  NavBar: typeof import('./../layout/components/NavBar/index.vue')['default']
-  NavbarLeft: typeof import('./../layout/components/NavBar/components/NavbarLeft.vue')['default']
-  NavbarRight: typeof import('./../layout/components/NavBar/components/NavbarRight.vue')['default']
-  Pagination: typeof import('./../components/Pagination/index.vue')['default']
-  PieChart: typeof import('./../views/dashboard/components/PieChart.vue')['default']
-  RadarChart: typeof import('./../views/dashboard/components/RadarChart.vue')['default']
-  RightPanel: (typeof import("./../components/RightPanel/index.vue"))["default"]
-  RouterLink: typeof import('vue-router')['RouterLink']
-  RouterView: typeof import('vue-router')['RouterView']
-  Settings: typeof import('./../layout/components/Settings/index.vue')['default']
-  Sidebar: typeof import('./../layout/components/Sidebar/index.vue')['default']
-  SidebarLogo: typeof import('./../layout/components/Sidebar/components/SidebarLogo.vue')['default']
-  SidebarMenu: typeof import('./../layout/components/Sidebar/components/SidebarMenu.vue')['default']
-  SidebarMenuItem: typeof import('./../layout/components/Sidebar/components/SidebarMenuItem.vue')['default']
-  SidebarMenuItemTitle: typeof import('./../layout/components/Sidebar/components/SidebarMenuItemTitle.vue')['default']
-  SidebarMixTopMenu: typeof import('./../layout/components/Sidebar/components/SidebarMixTopMenu.vue')['default']
-  SingleUpload: typeof import('./../components/Upload/SingleUpload.vue')['default']
-  SizeSelect: typeof import('./../components/SizeSelect/index.vue')['default']
-  SvgIcon: typeof import('./../components/SvgIcon/index.vue')['default']
-  TagsView: typeof import('./../layout/components/TagsView/index.vue')['default']
-  ThemeColorPicker: typeof import('./../layout/components/Settings/components/ThemeColorPicker.vue')['default']
-  WangEditor: typeof import('./../components/WangEditor/index.vue')['default']
+declare module "vue" {
+  ExcelUpload: typeof import("./../components/Upload/ExcelUpload.vue")[
+    "default"
+  ];
+  CommonTable: typeof import("./../components/CommonTable/index.vue")[
+    "default"
+  ];
+  AppLink: typeof import("./../components/AppLink/index.vue")["default"];
+  AppMain: typeof import("./../layout/components/AppMain/index.vue")["default"];
+  BarChart: typeof import("./../views/welcom/components/BarChart.vue")[
+    "default"
+  ];
+  Breadcrumb: typeof import("./../components/Breadcrumb/index.vue")["default"];
+  DeptTree: typeof import("./../views/system/user/components/dept-tree.vue")[
+    "default"
+  ];
+  Dictionary: typeof import("./../components/Dictionary/index.vue")["default"];
+  DictItem: typeof import("./../views/system/dict/components/dict-item.vue")[
+    "default"
+  ];
+  ElAlert: typeof import("element-plus/es")["ElAlert"];
+  ElBreadcrumb: typeof import("element-plus/es")["ElBreadcrumb"];
+  ElBreadcrumbItem: typeof import("element-plus/es")["ElBreadcrumbItem"];
+  ElButton: typeof import("element-plus/es")["ElButton"];
+  ElCard: typeof import("element-plus/es")["ElCard"];
+  ElCol: typeof import("element-plus/es")["ElCol"];
+  ElColorPicker: typeof import("element-plus/es")["ElColorPicker"];
+  ElConfigProvider: typeof import("element-plus/es")["ElConfigProvider"];
+  ElDatePicker: typeof import("element-plus/es")["ElDatePicker"];
+  ElDialog: typeof import("element-plus/es")["ElDialog"];
+  ElDivider: typeof import("element-plus/es")["ElDivider"];
+  ElDrawer: typeof import("element-plus/es")["ElDrawer"];
+  ElDropdown: typeof import("element-plus/es")["ElDropdown"];
+  ElDropdownItem: typeof import("element-plus/es")["ElDropdownItem"];
+  ElDropdownMenu: typeof import("element-plus/es")["ElDropdownMenu"];
+  ElForm: typeof import("element-plus/es")["ElForm"];
+  ElFormItem: typeof import("element-plus/es")["ElFormItem"];
+  ElIcon: typeof import("element-plus/es")["ElIcon"];
+  ElImage: typeof import("element-plus/es")["ElImage"];
+  ElInput: typeof import("element-plus/es")["ElInput"];
+  ElInputNumber: typeof import("element-plus/es")["ElInputNumber"];
+  ElLink: typeof import("element-plus/es")["ElLink"];
+  ElMenu: typeof import("element-plus/es")["ElMenu"];
+  ElMenuItem: typeof import("element-plus/es")["ElMenuItem"];
+  ElOption: typeof import("element-plus/es")["ElOption"];
+  ElPagination: typeof import("element-plus/es")["ElPagination"];
+  ElPopover: typeof import("element-plus/es")["ElPopover"];
+  ElRadio: typeof import("element-plus/es")["ElRadio"];
+  ElRadioGroup: typeof import("element-plus/es")["ElRadioGroup"];
+  ElRow: typeof import("element-plus/es")["ElRow"];
+  ElScrollbar: typeof import("element-plus/es")["ElScrollbar"];
+  ElSelect: typeof import("element-plus/es")["ElSelect"];
+  ElStatistic: typeof import("element-plus/es")["ElStatistic"];
+  ElSubMenu: typeof import("element-plus/es")["ElSubMenu"];
+  ElSwitch: typeof import("element-plus/es")["ElSwitch"];
+  ElTable: typeof import("element-plus/es")["ElTable"];
+  ElTableColumn: typeof import("element-plus/es")["ElTableColumn"];
+  ElTabPane: typeof import("element-plus/es")["ElTabPane"];
+  ElTabs: typeof import("element-plus/es")["ElTabs"];
+  ElTag: typeof import("element-plus/es")["ElTag"];
+  ElText: (typeof import("element-plus/es"))["ElText"];
+  ElTooltip: typeof import("element-plus/es")["ElTooltip"];
+  ElTree: typeof import("element-plus/es")["ElTree"];
+  ElTreeSelect: typeof import("element-plus/es")["ElTreeSelect"];
+  ElUpload: typeof import("element-plus/es")["ElUpload"];
+  ElWatermark: typeof import("element-plus/es")["ElWatermark"];
+  FunnelChart: typeof import("./../views/welcom/components/FunnelChart.vue")[
+    "default"
+  ];
+  GithubCorner: typeof import("./../components/GithubCorner/index.vue")[
+    "default"
+  ];
+  Hamburger: typeof import("./../components/Hamburger/index.vue")["default"];
+  IconSelect: typeof import("./../components/IconSelect/index.vue")["default"];
+  IEpCaretBottom: typeof import("~icons/ep/caret-bottom")["default"];
+  IEpCaretTop: typeof import("~icons/ep/caret-top")["default"];
+  IEpClose: typeof import("~icons/ep/close")["default"];
+  IEpCollection: (typeof import("~icons/ep/collection"))["default"];
+  IEpDelete: typeof import("~icons/ep/delete")["default"];
+  IEpDownload: typeof import("~icons/ep/download")["default"];
+  IEpEdit: typeof import("~icons/ep/edit")["default"];
+  IEpPlus: typeof import("~icons/ep/plus")["default"];
+  IEpPosition: (typeof import("~icons/ep/position"))["default"];
+  IEpQuestionFilled: typeof import("~icons/ep/question-filled")["default"];
+  IEpRefresh: typeof import("~icons/ep/refresh")["default"];
+  IEpRefreshLeft: typeof import("~icons/ep/refresh-left")["default"];
+  IEpSearch: typeof import("~icons/ep/search")["default"];
+  IEpSetting: (typeof import("~icons/ep/setting"))["default"];
+  IEpTop: typeof import("~icons/ep/top")["default"];
+  IEpUploadFilled: typeof import("~icons/ep/upload-filled")["default"];
+  LangSelect: typeof import("./../components/LangSelect/index.vue")["default"];
+  LayoutSelect: typeof import(
+    "./../layout/components/Settings/components/LayoutSelect.vue"
+  )["default"];
+  MultiUpload: typeof import("./../components/Upload/MultiUpload.vue")[
+    "default"
+  ];
+  NavBar: typeof import("./../layout/components/NavBar/index.vue")["default"];
+  NavbarLeft: typeof import(
+    "./../layout/components/NavBar/components/NavbarLeft.vue"
+  )["default"];
+  NavbarRight: typeof import(
+    "./../layout/components/NavBar/components/NavbarRight.vue"
+  )["default"];
+  Pagination: typeof import("./../components/Pagination/index.vue")["default"];
+  PieChart: typeof import("./../views/welcom/components/PieChart.vue")[
+    "default"
+  ];
+  RadarChart: typeof import("./../views/welcom/components/RadarChart.vue")[
+    "default"
+  ];
+  RightPanel: (typeof import("./../components/RightPanel/index.vue"))[
+    "default"
+  ];
+  RouterLink: typeof import("vue-router")["RouterLink"];
+  RouterView: typeof import("vue-router")["RouterView"];
+  Settings: typeof import("./../layout/components/Settings/index.vue")[
+    "default"
+  ];
+  Sidebar: typeof import("./../layout/components/Sidebar/index.vue")["default"];
+  SidebarLogo: typeof import(
+    "./../layout/components/Sidebar/components/SidebarLogo.vue"
+  )["default"];
+  SidebarMenu: typeof import(
+    "./../layout/components/Sidebar/components/SidebarMenu.vue"
+  )["default"];
+  SidebarMenuItem: typeof import(
+    "./../layout/components/Sidebar/components/SidebarMenuItem.vue"
+  )["default"];
+  SidebarMenuItemTitle: typeof import(
+    "./../layout/components/Sidebar/components/SidebarMenuItemTitle.vue"
+  )["default"];
+  SidebarMixTopMenu: typeof import(
+    "./../layout/components/Sidebar/components/SidebarMixTopMenu.vue"
+  )["default"];
+  SingleUpload: typeof import("./../components/Upload/SingleUpload.vue")[
+    "default"
+  ];
+  SizeSelect: typeof import("./../components/SizeSelect/index.vue")["default"];
+  SvgIcon: typeof import("./../components/SvgIcon/index.vue")["default"];
+  TagsView: typeof import("./../layout/components/TagsView/index.vue")[
+    "default"
+  ];
+  ThemeColorPicker: typeof import(
+    "./../layout/components/Settings/components/ThemeColorPicker.vue"
+  )["default"];
+  WangEditor: typeof import("./../components/WangEditor/index.vue")["default"];
 }
 export interface ComponentCustomProperties {
-  vLoading: typeof import('element-plus/es')['ElLoadingDirective']
-}
+  vLoading: (typeof import("element-plus/es"))["ElLoadingDirective"];
 }

+ 0 - 202
src/views/dashboard/components/BarChart.vue

@@ -1,202 +0,0 @@
-<!--  线 + 柱混合图 -->
-<template>
-  <el-card>
-    <template #header>
-      <div class="title">
-        业绩柱状图
-        <el-tooltip effect="dark" content="点击试试下载" placement="bottom">
-          <i-ep-download class="download" @click="downloadEchart" />
-        </el-tooltip>
-      </div>
-    </template>
-
-    <div :id="id" :class="className" :style="{ height, width }"></div>
-  </el-card>
-</template>
-
-<script setup lang="ts">
-import * as echarts from "echarts";
-
-const props = defineProps({
-  id: {
-    type: String,
-    default: "barChart",
-  },
-  className: {
-    type: String,
-    default: "",
-  },
-  width: {
-    type: String,
-    default: "200px",
-    required: true,
-  },
-  height: {
-    type: String,
-    default: "200px",
-    required: true,
-  },
-});
-
-const options = {
-  grid: {
-    left: "2%",
-    right: "2%",
-    bottom: "10%",
-    containLabel: true,
-  },
-  tooltip: {
-    trigger: "axis",
-    axisPointer: {
-      type: "cross",
-      crossStyle: {
-        color: "#999",
-      },
-    },
-  },
-  legend: {
-    x: "center",
-    y: "bottom",
-    data: ["收入", "毛利润", "收入增长率", "利润增长率"],
-    textStyle: {
-      color: "#999",
-    },
-  },
-  xAxis: [
-    {
-      type: "category",
-      data: ["浙江", "北京", "上海", "广东", "深圳"],
-      axisPointer: {
-        type: "shadow",
-      },
-    },
-  ],
-  yAxis: [
-    {
-      type: "value",
-      min: 0,
-      max: 10000,
-      interval: 2000,
-      axisLabel: {
-        formatter: "{value} ",
-      },
-    },
-    {
-      type: "value",
-      min: 0,
-      max: 100,
-      interval: 20,
-      axisLabel: {
-        formatter: "{value}%",
-      },
-    },
-  ],
-  series: [
-    {
-      name: "收入",
-      type: "bar",
-      data: [7000, 7100, 7200, 7300, 7400],
-      barWidth: 20,
-      itemStyle: {
-        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
-          { offset: 0, color: "#83bff6" },
-          { offset: 0.5, color: "#188df0" },
-          { offset: 1, color: "#188df0" },
-        ]),
-      },
-    },
-    {
-      name: "毛利润",
-      type: "bar",
-      data: [8000, 8200, 8400, 8600, 8800],
-      barWidth: 20,
-      itemStyle: {
-        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
-          { offset: 0, color: "#25d73c" },
-          { offset: 0.5, color: "#1bc23d" },
-          { offset: 1, color: "#179e61" },
-        ]),
-      },
-    },
-    {
-      name: "收入增长率",
-      type: "line",
-      yAxisIndex: 1,
-      data: [60, 65, 70, 75, 80],
-      itemStyle: {
-        color: "#67C23A",
-      },
-    },
-    {
-      name: "利润增长率",
-      type: "line",
-      yAxisIndex: 1,
-      data: [70, 75, 80, 85, 90],
-      itemStyle: {
-        color: "#409EFF",
-      },
-    },
-  ],
-};
-
-const downloadEchart = () => {
-  // 获取画布图表地址信息
-  const img = new Image();
-  img.src = chart.value.getDataURL({
-    type: "png",
-    pixelRatio: 1,
-    backgroundColor: "#fff",
-  });
-  // 当图片加载完成后,生成 URL 并下载
-  img.onload = () => {
-    const canvas = document.createElement("canvas");
-    canvas.width = img.width;
-    canvas.height = img.height;
-    const ctx = canvas.getContext("2d");
-    if (ctx) {
-      ctx.drawImage(img, 0, 0, img.width, img.height);
-      const link = document.createElement("a");
-      link.download = `业绩柱状图.png`;
-      link.href = canvas.toDataURL("image/png", 0.9);
-      document.body.appendChild(link);
-      link.click();
-      link.remove();
-    }
-  };
-};
-
-const chart = ref<any>("");
-onMounted(() => {
-  // 图表初始化
-  chart.value = markRaw(
-    echarts.init(document.getElementById(props.id) as HTMLDivElement)
-  );
-
-  chart.value.setOption(options);
-
-  // 大小自适应
-  window.addEventListener("resize", () => {
-    chart.value.resize();
-  });
-});
-
-onActivated(() => {
-  if (chart.value) {
-    chart.value.resize();
-  }
-});
-</script>
-<style lang="scss" scoped>
-.title {
-  display: flex;
-  justify-content: space-between;
-
-  .download {
-    cursor: pointer;
-
-    &:hover {
-      color: #409eff;
-    }
-  }
-}
-</style>

+ 0 - 115
src/views/dashboard/components/FunnelChart.vue

@@ -1,115 +0,0 @@
-<!-- 漏斗图 -->
-<template>
-  <div :id="id" :class="className" :style="{ height, width }"></div>
-</template>
-
-<script setup lang="ts">
-import * as echarts from "echarts";
-
-const props = defineProps({
-  id: {
-    type: String,
-    default: "funnelChart",
-  },
-  className: {
-    type: String,
-    default: "",
-  },
-  width: {
-    type: String,
-    default: "200px",
-    required: true,
-  },
-  height: {
-    type: String,
-    default: "200px",
-    required: true,
-  },
-});
-
-const options = {
-  title: {
-    show: true,
-    text: "订单线索转化漏斗图",
-    x: "center",
-    padding: 15,
-    textStyle: {
-      fontSize: 18,
-      fontStyle: "normal",
-      fontWeight: "bold",
-      color: "#337ecc",
-    },
-  },
-  grid: {
-    left: "2%",
-    right: "2%",
-    bottom: "10%",
-    containLabel: true,
-  },
-  legend: {
-    x: "center",
-    y: "bottom",
-    data: ["Show", "Click", "Visit", "Inquiry", "Order"],
-  },
-
-  series: [
-    {
-      name: "Funnel",
-      type: "funnel",
-      left: "20%",
-      top: 60,
-      bottom: 60,
-      width: "60%",
-      sort: "descending",
-      gap: 2,
-      label: {
-        show: true,
-        position: "inside",
-      },
-      labelLine: {
-        length: 10,
-        lineStyle: {
-          width: 1,
-          type: "solid",
-        },
-      },
-      itemStyle: {
-        borderColor: "#fff",
-        borderWidth: 1,
-      },
-      emphasis: {
-        label: {
-          fontSize: 20,
-        },
-      },
-      data: [
-        { value: 60, name: "Visit" },
-        { value: 40, name: "Inquiry" },
-        { value: 20, name: "Order" },
-        { value: 80, name: "Click" },
-        { value: 100, name: "Show" },
-      ],
-    },
-  ],
-};
-
-const chart = ref<any>("");
-
-onMounted(() => {
-  chart.value = markRaw(
-    echarts.init(document.getElementById(props.id) as HTMLDivElement)
-  );
-
-  chart.value.setOption(options);
-
-  window.addEventListener("resize", () => {
-    chart.value.resize();
-  });
-});
-
-onActivated(() => {
-  if (chart.value) {
-    chart.value.resize();
-  }
-});
-</script>

+ 0 - 89
src/views/dashboard/components/PieChart.vue

@@ -1,89 +0,0 @@
-<!-- 饼图 -->
-<template>
-  <el-card>
-    <template #header> 产品分类饼图 </template>
-    <div :id="id" :class="className" :style="{ height, width }"></div>
-  </el-card>
-</template>
-
-<script setup lang="ts">
-import * as echarts from "echarts";
-
-const props = defineProps({
-  id: {
-    type: String,
-    default: "pieChart",
-  },
-  className: {
-    type: String,
-    default: "",
-  },
-  width: {
-    type: String,
-    default: "200px",
-    required: true,
-  },
-  height: {
-    type: String,
-    default: "200px",
-    required: true,
-  },
-});
-const options = {
-  grid: {
-    left: "2%",
-    right: "2%",
-    bottom: "10%",
-    containLabel: true,
-  },
-  legend: {
-    top: "bottom",
-    textStyle: {
-      color: "#999",
-    },
-  },
-  series: [
-    {
-      name: "Nightingale Chart",
-      type: "pie",
-      radius: [50, 130],
-      center: ["50%", "50%"],
-      roseType: "area",
-      itemStyle: {
-        borderRadius: 1,
-        color: function (params: any) {
-          //自定义颜色
-          const colorList = ["#409EFF", "#67C23A", "#E6A23C", "#F56C6C"];
-          return colorList[params.dataIndex];
-        },
-      },
-      data: [
-        { value: 26, name: "家用电器" },
-        { value: 27, name: "户外运动" },
-        { value: 24, name: "汽车用品" },
-        { value: 23, name: "手机数码" },
-      ],
-    },
-  ],
-};
-
-const chart = ref<any>("");
-
-onMounted(() => {
-  chart.value = markRaw(
-    echarts.init(document.getElementById(props.id) as HTMLDivElement)
-  );
-
-  chart.value.setOption(options);
-
-  window.addEventListener("resize", () => {
-    chart.value.resize();
-  });
-});
-
-onActivated(() => {
-  if (chart.value) {
-    chart.value.resize();
-  }
-});
-</script>

+ 0 - 109
src/views/dashboard/components/RadarChart.vue

@@ -1,109 +0,0 @@
-<!-- 雷达图 -->
-<template>
-  <el-card>
-    <template #header> 订单状态雷达图 </template>
-    <div :id="id" :class="className" :style="{ height, width }"></div>
-  </el-card>
-</template>
-
-<script setup lang="ts">
-import * as echarts from "echarts";
-
-const props = defineProps({
-  id: {
-    type: String,
-    default: "radarChart",
-  },
-  className: {
-    type: String,
-    default: "",
-  },
-  width: {
-    type: String,
-    default: "200px",
-    required: true,
-  },
-  height: {
-    type: String,
-    default: "200px",
-    required: true,
-  },
-});
-
-const options = {
-  grid: {
-    left: "2%",
-    right: "2%",
-    bottom: "10%",
-    containLabel: true,
-  },
-  legend: {
-    x: "center",
-    y: "bottom",
-    data: ["预定数量", "下单数量", "发货数量"],
-    textStyle: {
-      color: "#999",
-    },
-  },
-  radar: {
-    // shape: 'circle',
-    radius: "60%",
-    indicator: [
-      { name: "家用电器" },
-      { name: "服装箱包" },
-      { name: "运动户外" },
-      { name: "手机数码" },
-      { name: "汽车用品" },
-      { name: "家具厨具" },
-    ],
-  },
-  series: [
-    {
-      name: "Budget vs spending",
-      type: "radar",
-      itemStyle: {
-        borderRadius: 6,
-        color: function (params: any) {
-          //自定义颜色
-          const colorList = ["#409EFF", "#67C23A", "#E6A23C", "#F56C6C"];
-          return colorList[params.dataIndex];
-        },
-      },
-      data: [
-        {
-          value: [400, 400, 400, 400, 400, 400],
-          name: "预定数量",
-        },
-        {
-          value: [300, 300, 300, 300, 300, 300],
-          name: "下单数量",
-        },
-        {
-          value: [200, 200, 200, 200, 200, 200],
-          name: "发货数量",
-        },
-      ],
-    },
-  ],
-};
-
-const chart = ref<any>("");
-
-onMounted(() => {
-  chart.value = markRaw(
-    echarts.init(document.getElementById(props.id) as HTMLDivElement)
-  );
-
-  chart.value.setOption(options);
-
-  window.addEventListener("resize", () => {
-    chart.value.resize();
-  });
-});
-
-onActivated(() => {
-  if (chart.value) {
-    chart.value.resize();
-  }
-});
-</script>

+ 0 - 291
src/views/dashboard/index.vue

@@ -1,291 +0,0 @@
-<template>
-  <div class="dashboard-container">
-    <!-- github角标 -->
-    <github-corner class="github-corner" />
-
-    <el-card shadow="never">
-      <el-row justify="space-between">
-        <el-col :span="18" :xs="24">
-          <div class="flex h-full items-center">
-            <img
-              class="w-20 h-20 mr-5 rounded-full"
-              :src="userStore.user.avatar + '?imageView2/1/w/80/h/80'"
-            />
-            <div>
-              <p>{{ greetings }}</p>
-              <p class="text-sm text-gray">
-                今日天气晴朗,气温在15℃至25℃之间,东南风。
-              </p>
-            </div>
-          </div>
-        </el-col>
-
-        <el-col :span="6" :xs="24">
-          <div class="flex h-full items-center justify-around">
-            <el-statistic :value="99">
-              <template #title>
-                <div class="flex items-center">
-                  <svg-icon icon-class="message" size="20px" />
-                  <span class="text-[16px] ml-1">消息</span>
-                </div>
-              </template>
-            </el-statistic>
-
-            <el-statistic :value="50">
-              <template #title>
-                <div class="flex items-center">
-                  <svg-icon icon-class="todolist" size="20px" />
-                  <span class="text-[16px] ml-1">待办</span>
-                </div>
-              </template>
-              <template #suffix>/100</template>
-            </el-statistic>
-
-            <el-statistic :value="10">
-              <template #title>
-                <div class="flex items-center">
-                  <svg-icon icon-class="project" size="20px" />
-                  <span class="text-[16px] ml-1">项目</span>
-                </div>
-              </template>
-            </el-statistic>
-          </div>
-        </el-col>
-      </el-row>
-    </el-card>
-
-    <!-- 数据卡片 -->
-    <el-row :gutter="10" class="mt-3">
-      <el-col :xs="24" :sm="12" :lg="6">
-        <el-card shadow="never">
-          <template #header>
-            <div class="flex items-center justify-between">
-              <span class="text-[var(--el-text-color-secondary)]">访客数</span>
-              <el-tag type="success">日</el-tag>
-            </div>
-          </template>
-
-          <div class="flex items-center justify-between mt-5">
-            <div class="text-lg text-right">
-              {{ Math.round(visitCountOutput) }}
-            </div>
-            <svg-icon icon-class="visit" size="2em" />
-          </div>
-
-          <div
-            class="flex items-center justify-between mt-5 text-sm text-[var(--el-text-color-secondary)]"
-          >
-            <span> 总访客数 </span>
-            <span> {{ Math.round(visitCountOutput * 15) }} </span>
-          </div>
-        </el-card>
-      </el-col>
-
-      <!--消息数-->
-      <el-col :xs="24" :sm="12" :lg="6">
-        <el-card shadow="never">
-          <template #header>
-            <div class="flex items-center justify-between">
-              <span class="text-[var(--el-text-color-secondary)]">IP数</span>
-              <el-tag type="success">日</el-tag>
-            </div>
-          </template>
-
-          <div class="flex items-center justify-between mt-5">
-            <div class="text-lg text-right">
-              {{ Math.round(dauCountOutput) }}
-            </div>
-            <svg-icon icon-class="ip" size="2em" />
-          </div>
-
-          <div
-            class="flex items-center justify-between mt-5 text-sm text-[var(--el-text-color-secondary)]"
-          >
-            <span> 总IP数 </span>
-            <span> {{ Math.round(dauCountOutput) }} </span>
-          </div>
-        </el-card>
-      </el-col>
-
-      <!--销售额-->
-      <el-col :xs="24" :sm="12" :lg="6">
-        <el-card shadow="never">
-          <template #header>
-            <div class="flex items-center justify-between">
-              <span class="text-[var(--el-text-color-secondary)]">销售额</span>
-              <el-tag>月</el-tag>
-            </div>
-          </template>
-
-          <div class="flex items-center justify-between mt-5">
-            <div class="text-lg text-right">
-              {{ Math.round(amountOutput) }}
-            </div>
-            <svg-icon icon-class="money" size="2em" />
-          </div>
-
-          <div
-            class="flex items-center justify-between mt-5 text-sm text-[var(--el-text-color-secondary)]"
-          >
-            <span> 总销售额 </span>
-            <span> {{ Math.round(amountOutput * 15) }} </span>
-          </div>
-        </el-card>
-      </el-col>
-
-      <!--订单量-->
-      <el-col :xs="24" :sm="12" :lg="6">
-        <el-card shadow="never">
-          <template #header>
-            <div class="flex items-center justify-between">
-              <span class="text-[var(--el-text-color-secondary)]">订单量</span>
-              <el-tag type="danger">季</el-tag>
-            </div>
-          </template>
-
-          <div class="flex items-center justify-between mt-5">
-            <div class="text-lg text-right">
-              {{ Math.round(orderCountOutput) }}
-            </div>
-            <svg-icon icon-class="order" size="2em" />
-          </div>
-
-          <div
-            class="flex items-center justify-between mt-5 text-sm text-[var(--el-text-color-secondary)]"
-          >
-            <span> 总订单量 </span>
-            <span> {{ Math.round(orderCountOutput * 15) }} </span>
-          </div>
-        </el-card>
-      </el-col>
-    </el-row>
-
-    <!-- Echarts 图表 -->
-    <el-row :gutter="10" class="mt-3">
-      <el-col :sm="24" :lg="8" class="mb-2">
-        <BarChart
-          id="barChart"
-          height="400px"
-          width="100%"
-          class="bg-[var(--el-bg-color-overlay)]"
-        />
-      </el-col>
-
-      <el-col :xs="24" :sm="12" :lg="8" class="mb-2">
-        <PieChart
-          id="pieChart"
-          height="400px"
-          width="100%"
-          class="bg-[var(--el-bg-color-overlay)]"
-        />
-      </el-col>
-
-      <el-col :xs="24" :sm="12" :lg="8" class="mb-2">
-        <RadarChart
-          id="radarChart"
-          height="400px"
-          width="100%"
-          class="bg-[var(--el-bg-color-overlay)]"
-        />
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script setup lang="ts">
-defineOptions({
-  name: "Dashboard",
-  inheritAttrs: false,
-});
-
-import { useUserStore } from "@/store/modules/user";
-import { useTransition, TransitionPresets } from "@vueuse/core";
-
-const userStore = useUserStore();
-const date: Date = new Date();
-
-const greetings = computed(() => {
-  const hours = date.getHours();
-  if (hours >= 6 && hours < 8) {
-    return "晨起披衣出草堂,轩窗已自喜微凉🌅!";
-  } else if (hours >= 8 && hours < 12) {
-    return "上午好," + userStore.user.nickname + "!";
-  } else if (hours >= 12 && hours < 18) {
-    return "下午好," + userStore.user.nickname + "!";
-  } else if (hours >= 18 && hours < 24) {
-    return "晚上好," + userStore.user.nickname + "!";
-  } else if (hours >= 0 && hours < 6) {
-    return "偷偷向银河要了一把碎星,只等你闭上眼睛撒入你的梦中,晚安🌛!";
-  }
-});
-
-const duration = 5000;
-
-// 销售额
-const amount = ref(0);
-const amountOutput = useTransition(amount, {
-  duration: duration,
-  transition: TransitionPresets.easeOutExpo,
-});
-amount.value = 2000;
-
-// 访客数
-const visitCount = ref(0);
-const visitCountOutput = useTransition(visitCount, {
-  duration: duration,
-  transition: TransitionPresets.easeOutExpo,
-});
-visitCount.value = 2000;
-
-// IP数
-const dauCount = ref(0);
-const dauCountOutput = useTransition(dauCount, {
-  duration: duration,
-  transition: TransitionPresets.easeOutExpo,
-});
-dauCount.value = 2000;
-
-// 订单量
-const orderCount = ref(0);
-const orderCountOutput = useTransition(orderCount, {
-  duration: duration,
-  transition: TransitionPresets.easeOutExpo,
-});
-orderCount.value = 2000;
-</script>
-
-<style lang="scss" scoped>
-.dashboard-container {
-  position: relative;
-  padding: 24px;
-
-  .user-avatar {
-    width: 40px;
-    height: 40px;
-    border-radius: 50%;
-  }
-
-  .github-corner {
-    position: absolute;
-    top: 0;
-    right: 0;
-    z-index: 1;
-    border: 0;
-  }
-
-  .data-box {
-    display: flex;
-    justify-content: space-between;
-    padding: 20px;
-    font-weight: bold;
-    color: var(--el-text-color-regular);
-    background: var(--el-bg-color-overlay);
-    border-color: var(--el-border-color);
-    box-shadow: var(--el-box-shadow-dark);
-  }
-
-  .svg-icon {
-    fill: currentcolor !important;
-  }
-}
-</style>

+ 0 - 512
src/views/plan/order/index.vue

@@ -1,512 +0,0 @@
-<template>
-  <div class="mainContentBox">
-    <avue-crud
-      :option="option"
-      v-model:page="page"
-      v-model:search="search"
-      :table-loading="loading"
-      :permission="permission"
-      @search-change="handleQuery"
-      @search-reset="resetQuery"
-      @size-change="handleQuery"
-      @current-change="handleQuery"
-      @row-save="rowSave"
-      @row-update="rowUpdate"
-      @row-del="rowDel"
-      :data="pageData"
-    >
-      <template #menu-right="{}">
-        <el-dropdown split-button v-hasPerm="['plan:order:import']"
-          >导入
-          <template #dropdown>
-            <el-dropdown-menu>
-              <el-dropdown-item @click="downloadTemplate">
-                <i-ep-download />下载模板
-              </el-dropdown-item>
-              <el-dropdown-item @click="openDialog('obj-import')">
-                <i-ep-top />导入数据
-              </el-dropdown-item>
-            </el-dropdown-menu>
-          </template>
-        </el-dropdown>
-        <el-button
-          class="ml-3"
-          v-hasPerm="['plan:order:export']"
-          @click="handleExport"
-        >
-          <template #icon> <i-ep-download /> </template>导出
-        </el-button>
-      </template>
-    </avue-crud>
-
-    <el-dialog
-      v-model="dialog.visible"
-      :title="dialog.title"
-      width="500px"
-      @close="closeDialog"
-    >
-      <el-form
-        v-if="dialog.type === 'obj-import'"
-        :model="importData"
-        label-width="100px"
-      >
-        <el-form-item label="Excel文件">
-          <el-upload
-            ref="uploadRef"
-            action=""
-            drag
-            accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
-            :limit="1"
-            :auto-upload="false"
-            :file-list="importData.fileList"
-            :on-change="handleFileChange"
-            :on-exceed="handleFileExceed"
-          >
-            <el-icon class="el-icon--upload">
-              <i-ep-upload-filled />
-            </el-icon>
-            <div class="el-upload__text">
-              将文件拖到此处,或
-              <em>点击上传</em>
-            </div>
-            <template #tip>
-              <div style="color: red">文件类型: xls/xlsx</div>
-            </template>
-          </el-upload>
-        </el-form-item>
-      </el-form>
-      <!-- 弹窗底部操作按钮 -->
-      <template #footer>
-        <div class="dialog-footer">
-          <el-button type="primary" @click="handleSubmit">确 定</el-button>
-          <el-button @click="closeDialog">取 消</el-button>
-        </div>
-      </template>
-    </el-dialog>
-  </div>
-</template>
-<script setup lang="ts">
-import { checkPerm } from "@/directive/permission";
-import type { UploadInstance } from "element-plus";
-import { genFileId } from "element-plus";
-import dictDataUtil from "@/common/configs/dictDataUtil";
-import buttonPermission from "@/common/configs/buttonPermission";
-import {
-  addOrder,
-  deleteOrders,
-  downloadTemplateApi,
-  exportOrder,
-  getOrderPage,
-  importOrder,
-  updateOrder,
-  getExpandAlias,
-} from "@/api/order";
-
-// 弹窗对象
-const dialog = reactive({
-  visible: false,
-  type: "order-form",
-  width: 800,
-  title: "",
-});
-const search = ref({});
-const option = ref({});
-const pageData = ref([]);
-const form = ref({});
-const page = ref({ total: 0, currentPage: 1, pageSize: 10 });
-const loading = ref(false);
-const uploadRef = ref<UploadInstance>(); // 上传组件
-// 导入数据
-const importData = reactive({
-  file: undefined,
-  fileList: [],
-});
-const permission = reactive({
-  delBtn: checkPerm(buttonPermission.PLAN.BTNS.order_del),
-  addBtn: checkPerm(buttonPermission.PLAN.BTNS.order_add),
-  editBtn: checkPerm(buttonPermission.PLAN.BTNS.order_edit),
-  menu: true,
-});
-option.value = {
-  border: true,
-  searchIndex: 3,
-  searchIcon: true,
-  searchMenuSpan: 8,
-  align: "center",
-  menuAlign: "center",
-  search: true,
-  refreshBtn: false,
-  from: {
-    width: "300",
-  },
-  column: [
-    {
-      label: "订单编号",
-      prop: "orderCode",
-      search: true,
-      width: "100",
-      display: false,
-    },
-    {
-      label: "订单名称",
-      prop: "orderName",
-      search: true,
-      width: "100",
-      rules: [
-        {
-          required: true,
-          message: "订单名称不能为空",
-          trigger: "trigger",
-        },
-      ],
-    },
-    {
-      label: "ERP号",
-      prop: "erpCode",
-      search: true,
-      width: "100",
-      rules: [
-        {
-          required: true,
-          message: "订单编号不能为空",
-          trigger: "trigger",
-        },
-      ],
-    },
-    {
-      label: "产品编码",
-      prop: "materialCode",
-      search: true,
-      width: "100",
-      rules: [
-        {
-          required: true,
-          message: "订单编号不能为空",
-          trigger: "trigger",
-        },
-      ],
-      focus: ({ value, column }) => {
-        //todo
-      },
-    },
-    {
-      label: "产品名称",
-      prop: "materialName",
-      search: true,
-      width: "100",
-    },
-    {
-      label: "产品规格",
-      width: "100",
-      prop: "materialModel",
-    },
-    {
-      label: "订单状态",
-      prop: "orderState",
-      display: false,
-      width: "100",
-      type: "select", //类型为下拉选择框
-      dicUrl:
-        dictDataUtil.request_url + dictDataUtil.TYPE_CODE.plan_order_state,
-      props: {
-        label: "dictLabel",
-        value: "dictValue",
-      },
-      searchClearable: false, //可清空的输入框,默认为true
-      filterable: true, //添加filterable属性即可启用搜索功能
-    },
-    {
-      label: "订单类型",
-      prop: "orderType",
-      type: "select", //类型为下拉选择框
-      width: "100",
-      dicUrl: dictDataUtil.request_url + dictDataUtil.TYPE_CODE.plan_order_type,
-      props: {
-        label: "dictLabel",
-        value: "dictValue",
-      },
-      searchClearable: false, //可清空的输入框,默认为true
-      filterable: true, //添加filterable属性即可启用搜索功能
-      rules: [
-        {
-          required: true,
-          message: "订单类型不能为空",
-          trigger: "trigger",
-        },
-      ],
-    },
-    {
-      label: "订单数量",
-      prop: "orderNum",
-      type: "number",
-      width: "100",
-      min: 0,
-      max: 99999,
-      rules: [
-        {
-          required: true,
-          message: "订单数量不能为空",
-          trigger: "trigger",
-        },
-      ],
-    },
-    {
-      label: "排产数量",
-      prop: "scheduledNum",
-      width: "100",
-      display: false,
-    },
-    {
-      label: "优先级",
-      prop: "priority",
-      width: "100",
-      type: "select", //类型为下拉选择框
-      dicUrl:
-        dictDataUtil.request_url + dictDataUtil.TYPE_CODE.plan_order_priority,
-      props: {
-        label: "dictLabel",
-        value: "dictValue",
-      },
-      searchClearable: false, //可清空的输入框,默认为true
-      filterable: true, //添加filterable属性即可启用搜索功能
-      rules: [
-        {
-          required: true,
-          message: "订单类型不能为空",
-          trigger: "trigger",
-        },
-      ],
-    },
-    {
-      label: "交付日期",
-      prop: "deliverTime",
-      type: "date",
-      width: "100",
-      format: "YYYY-MM-DD", //前端展示格式
-      valueFormat: "YYYY-MM-DD", //设置后端接收的日期格式
-      rules: [
-        {
-          required: true,
-          message: "请选择交付日期",
-          trigger: "trigger",
-        },
-      ],
-    },
-    {
-      label: "所属公司",
-      prop: "companyId",
-      width: "100",
-      type: "select", //类型为下拉选择框
-      dicUrl: import.meta.env.VITE_APP_BASE_API + "/api/v1/sys/dept/orgList",
-      props: {
-        label: "deptName",
-        value: "id",
-      },
-      rules: [
-        {
-          required: true,
-          message: "请选择所属公司",
-          trigger: "trigger",
-        },
-      ],
-    },
-    {
-      label: "项目号",
-      width: "100",
-      prop: "projectCode",
-    },
-    {
-      label: "绑定铭牌",
-      prop: "nameplated",
-      width: "100",
-      type: "radio", //类型为单选框
-      dicData: [
-        {
-          label: "否",
-          value: 0,
-        },
-        {
-          label: "是",
-          value: 1,
-        },
-      ],
-      value: 0,
-    },
-    {
-      label: "备注",
-      prop: "remark",
-      width: "100",
-      minRows: 2, //最小行/最小值
-      type: "textarea", //类型为多行文本域框
-      maxlength: 512, //最大输入长度
-    },
-    {
-      label: "创建时间",
-      prop: "created",
-      width: "140",
-      overHidden: true,
-      display: false,
-      type: "datetime",
-      valueFormat: "yyyy-MM-dd HH:mm:ss",
-    },
-    {
-      label: "创建人",
-      prop: "creator",
-      display: false,
-      width: 80,
-      overHidden: true,
-    },
-  ],
-};
-
-const queryExpandAlias = () => {
-  getExpandAlias(dictDataUtil.EXPAND_FIELD_TABLE.plan_order_info).then(
-    (data: any) => {
-      if (data.data) {
-        data.data.forEach((item: any) => {
-          option.value.column.push({
-            label: item.label,
-            prop: item.field,
-            width: "100",
-          });
-        });
-      }
-    }
-  );
-};
-
-const handleQuery = (params, done) => {
-  console.log(JSON.stringify(option.value.column));
-  loading.value = true;
-  const querySearch = {
-    pageSize: page.value.pageSize,
-    pageNo: page.value.currentPage,
-    ...params,
-  };
-  getOrderPage(querySearch)
-    .then(({ data }) => {
-      pageData.value = data.records;
-      page.value.total = data.totalCount;
-      page.value.currentPage = data.pageNo;
-      page.value.pageSize = data.pageSize;
-    })
-    .finally(() => {
-      loading.value = false;
-      if (done) {
-        done();
-      }
-    });
-};
-const resetQuery = () => {};
-const rowSave = (form, done, loading) => {
-  loading();
-  addOrder(form).then((data: any) => {
-    ElMessage({
-      message: data.msg,
-      type: "success",
-    });
-    done();
-    handleQuery(null, null);
-  });
-};
-const rowUpdate = (form, index, done, loading) => {
-  loading();
-  updateOrder(form).then((data: any) => {
-    ElMessage({
-      message: data.msg,
-      type: "success",
-    });
-    done();
-    handleQuery(null, null);
-  });
-};
-const rowDel = (form: any, index) => {
-  ElMessageBox.confirm("当前操作会删除数据,你确认要继续吗?")
-    .then(() => {
-      deleteOrders([form.id])
-        .then((data: any) => {
-          ElMessage({
-            message: data.msg,
-            type: "success",
-          });
-          handleQuery(null, null);
-        })
-        .finally(() => {});
-    })
-    .catch(() => {
-      // catch error
-    });
-};
-const openDialog = (type) => {
-  dialog.visible = true;
-  dialog.type = type;
-  if (dialog.type === "obj-import") {
-    // 导入弹窗
-    dialog.title = "数据导入";
-    dialog.width = 600;
-  }
-};
-const closeDialog = () => {
-  dialog.visible = false;
-  if (dialog.type === "obj-import") {
-    importData.file = undefined;
-    importData.fileList = [];
-  }
-};
-const downloadTemplate = () => {
-  downloadTemplateApi().then((response) => {
-    downFile(response);
-  });
-};
-/** 弹窗提交 */
-const handleSubmit = () => {
-  importOrder(importData).then((data: any) => {
-    ElMessage({
-      message: data.msg,
-      type: "success",
-    });
-    dialog.visible = false;
-    handleQuery(null, null);
-  });
-};
-/** Excel文件 Change */
-const handleFileChange = (file) => {
-  importData.file = file.raw;
-};
-/** 文件下载 */
-const downFile = (response: any) => {
-  const fileData = response.data;
-  const fileName = decodeURI(
-    response.headers["content-disposition"].split(";")[1].split("=")[1]
-  );
-  const fileType =
-    "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8";
-  const blob = new Blob([fileData], { type: fileType });
-  const downloadUrl = window.URL.createObjectURL(blob);
-  const downloadLink = document.createElement("a");
-  downloadLink.href = downloadUrl;
-  downloadLink.download = fileName;
-  document.body.appendChild(downloadLink);
-  downloadLink.click();
-  document.body.removeChild(downloadLink);
-  window.URL.revokeObjectURL(downloadUrl);
-};
-/** Excel文件 Exceed  */
-const handleFileExceed = (files) => {
-  uploadRef.value!.clearFiles();
-  const file = files[0];
-  file.uid = genFileId();
-  uploadRef.value!.handleStart(file);
-  importData.file = file;
-};
-/** 导出 */
-const handleExport = () => {
-  exportOrder(search.value).then((response: any) => {
-    downFile(response);
-  });
-};
-onMounted?.(() => {
-  queryExpandAlias();
-  handleQuery(null, null);
-});
-</script>

+ 0 - 499
src/views/plan/workOrder/index.vue

@@ -1,499 +0,0 @@
-<template>
-  <div class="mainContentBox">
-    <avue-crud
-      :option="option"
-      v-model:page="page"
-      v-model:search="search"
-      :table-loading="loading"
-      :permission="permission"
-      @search-change="handleQuery"
-      @search-reset="resetQuery"
-      @size-change="handleQuery"
-      @current-change="handleQuery"
-      @row-save="rowSave"
-      @row-update="rowUpdate"
-      @row-del="rowDel"
-      :data="pageData"
-    >
-      <template #menu-right="{}">
-        <el-dropdown split-button v-hasPerm="['plan:order:import']"
-          >导入
-          <template #dropdown>
-            <el-dropdown-menu>
-              <el-dropdown-item @click="downloadTemplate">
-                <i-ep-download />下载模板
-              </el-dropdown-item>
-              <el-dropdown-item @click="openDialog('obj-import')">
-                <i-ep-top />导入数据
-              </el-dropdown-item>
-            </el-dropdown-menu>
-          </template>
-        </el-dropdown>
-        <el-button
-          class="ml-3"
-          v-hasPerm="['plan:order:export']"
-          @click="handleExport"
-        >
-          <template #icon> <i-ep-download /> </template>导出
-        </el-button>
-      </template>
-    </avue-crud>
-
-    <el-dialog
-      v-model="dialog.visible"
-      :title="dialog.title"
-      width="500px"
-      @close="closeDialog"
-    >
-      <el-form
-        v-if="dialog.type === 'obj-import'"
-        :model="importData"
-        label-width="100px"
-      >
-        <el-form-item label="Excel文件">
-          <el-upload
-            ref="uploadRef"
-            action=""
-            drag
-            accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
-            :limit="1"
-            :auto-upload="false"
-            :file-list="importData.fileList"
-            :on-change="handleFileChange"
-            :on-exceed="handleFileExceed"
-          >
-            <el-icon class="el-icon--upload">
-              <i-ep-upload-filled />
-            </el-icon>
-            <div class="el-upload__text">
-              将文件拖到此处,或
-              <em>点击上传</em>
-            </div>
-            <template #tip>
-              <div style="color: red">文件类型: xls/xlsx</div>
-            </template>
-          </el-upload>
-        </el-form-item>
-      </el-form>
-      <!-- 弹窗底部操作按钮 -->
-      <template #footer>
-        <div class="dialog-footer">
-          <el-button type="primary" @click="handleSubmit">确 定</el-button>
-          <el-button @click="closeDialog">取 消</el-button>
-        </div>
-      </template>
-    </el-dialog>
-  </div>
-</template>
-<script setup lang="ts">
-import { checkPerm } from "@/directive/permission";
-import type { UploadInstance } from "element-plus";
-import { genFileId } from "element-plus";
-import dictDataUtil from "@/common/configs/dictDataUtil";
-import buttonPermission from "@/common/configs/buttonPermission";
-import {
-  addOrder,
-  deleteOrders,
-  downloadTemplateApi,
-  exportOrder,
-  getOrderPage,
-  importOrder,
-  updateOrder,
-  getExpandAlias,
-} from "@/api/order";
-
-// 弹窗对象
-const dialog = reactive({
-  visible: false,
-  type: "order-form",
-  width: 800,
-  title: "",
-});
-const search = ref({});
-const option = ref({});
-const pageData = ref([]);
-const form = ref({});
-const page = ref({ total: 0, currentPage: 1, pageSize: 10 });
-const loading = ref(false);
-const uploadRef = ref<UploadInstance>(); // 上传组件
-// 导入数据
-const importData = reactive({
-  file: undefined,
-  fileList: [],
-});
-const permission = reactive({
-  delBtn: checkPerm(buttonPermission.PLAN.BTNS.order_del),
-  addBtn: checkPerm(buttonPermission.PLAN.BTNS.order_add),
-  editBtn: checkPerm(buttonPermission.PLAN.BTNS.order_edit),
-  menu: true,
-});
-option.value = {
-  border: true,
-  searchIndex: 3,
-  searchIcon: true,
-  searchMenuSpan: 8,
-  align: "center",
-  menuAlign: "center",
-  search: true,
-  refreshBtn: false,
-  from: {
-    width: "300",
-  },
-  column: [
-    {
-      label: "订单编号",
-      prop: "orderCode",
-      search: true,
-      width: "100",
-      display: false,
-    },
-    {
-      label: "订单名称",
-      prop: "orderName",
-      search: true,
-      width: "100",
-      rules: [
-        {
-          required: true,
-          message: "订单名称不能为空",
-          trigger: "trigger",
-        },
-      ],
-    },
-    {
-      label: "ERP号",
-      prop: "erpCode",
-      search: true,
-      width: "100",
-      rules: [
-        {
-          required: true,
-          message: "订单编号不能为空",
-          trigger: "trigger",
-        },
-      ],
-    },
-    {
-      label: "产品编码",
-      prop: "materialCode",
-      search: true,
-      width: "100",
-      rules: [
-        {
-          required: true,
-          message: "订单编号不能为空",
-          trigger: "trigger",
-        },
-      ],
-      focus: ({ value, column }) => {
-        //todo
-      },
-    },
-    {
-      label: "产品名称",
-      prop: "materialName",
-      search: true,
-      width: "100",
-    },
-    {
-      label: "产品规格",
-      width: "100",
-      prop: "materialModel",
-    },
-    {
-      label: "订单状态",
-      prop: "orderState",
-      display: false,
-      width: "100",
-      type: "select", //类型为下拉选择框
-      dicUrl:
-        dictDataUtil.request_url + dictDataUtil.TYPE_CODE.plan_order_state,
-      props: {
-        label: "dictLabel",
-        value: "dictValue",
-      },
-      searchClearable: false, //可清空的输入框,默认为true
-      filterable: true, //添加filterable属性即可启用搜索功能
-    },
-    {
-      label: "订单类型",
-      prop: "orderType",
-      type: "select", //类型为下拉选择框
-      width: "100",
-      dicUrl: dictDataUtil.request_url + dictDataUtil.TYPE_CODE.plan_order_type,
-      props: {
-        label: "dictLabel",
-        value: "dictValue",
-      },
-      searchClearable: false, //可清空的输入框,默认为true
-      filterable: true, //添加filterable属性即可启用搜索功能
-      rules: [
-        {
-          required: true,
-          message: "订单类型不能为空",
-          trigger: "trigger",
-        },
-      ],
-    },
-    {
-      label: "订单数量",
-      prop: "orderNum",
-      type: "number",
-      width: "100",
-      min: 0,
-      max: 99999,
-      rules: [
-        {
-          required: true,
-          message: "订单数量不能为空",
-          trigger: "trigger",
-        },
-      ],
-    },
-    {
-      label: "排产数量",
-      prop: "scheduledNum",
-      width: "100",
-      display: false,
-    },
-    {
-      label: "优先级",
-      prop: "priority",
-      width: "100",
-      type: "select", //类型为下拉选择框
-      dicUrl:
-        dictDataUtil.request_url + dictDataUtil.TYPE_CODE.plan_order_priority,
-      props: {
-        label: "dictLabel",
-        value: "dictValue",
-      },
-      searchClearable: false, //可清空的输入框,默认为true
-      filterable: true, //添加filterable属性即可启用搜索功能
-      rules: [
-        {
-          required: true,
-          message: "订单类型不能为空",
-          trigger: "trigger",
-        },
-      ],
-    },
-    {
-      label: "交付日期",
-      prop: "deliverTime",
-      type: "date",
-      width: "100",
-      format: "YYYY-MM-DD", //前端展示格式
-      valueFormat: "YYYY-MM-DD", //设置后端接收的日期格式
-      rules: [
-        {
-          required: true,
-          message: "请选择交付日期",
-          trigger: "trigger",
-        },
-      ],
-    },
-    {
-      label: "所属公司",
-      prop: "companyId",
-      width: "100",
-    },
-    {
-      label: "项目号",
-      width: "100",
-      prop: "projectCode",
-    },
-    {
-      label: "绑定铭牌",
-      prop: "nameplated",
-      width: "100",
-      type: "radio", //类型为单选框
-      dicData: [
-        {
-          label: "否",
-          value: 0,
-        },
-        {
-          label: "是",
-          value: 1,
-        },
-      ],
-      value: 0,
-    },
-    {
-      label: "备注",
-      prop: "remark",
-      width: "100",
-      minRows: 2, //最小行/最小值
-      type: "textarea", //类型为多行文本域框
-      maxlength: 512, //最大输入长度
-    },
-    {
-      label: "创建时间",
-      prop: "created",
-      width: "140",
-      overHidden: true,
-      display: false,
-      type: "datetime",
-      valueFormat: "yyyy-MM-dd HH:mm:ss",
-    },
-    {
-      label: "创建人",
-      prop: "creator",
-      display: false,
-      width: 80,
-      overHidden: true,
-    },
-  ],
-};
-
-const queryExpandAlias = () => {
-  getExpandAlias(dictDataUtil.EXPAND_FIELD_TABLE.plan_order_info).then(
-    (data: any) => {
-      if (data.data) {
-        data.data.forEach((item: any) => {
-          option.value.column.push({
-            label: item.label,
-            prop: item.field,
-            width: "100",
-          });
-        });
-      }
-    }
-  );
-};
-
-const handleQuery = (params, done) => {
-  console.log(JSON.stringify(option.value.column));
-  loading.value = true;
-  const querySearch = {
-    pageSize: page.value.pageSize,
-    pageNo: page.value.currentPage,
-    ...params,
-  };
-  getOrderPage(querySearch)
-    .then(({ data }) => {
-      pageData.value = data.records;
-      page.value.total = data.totalCount;
-      page.value.currentPage = data.pageNo;
-      page.value.pageSize = data.pageSize;
-    })
-    .finally(() => {
-      loading.value = false;
-      if (done) {
-        done();
-      }
-    });
-};
-const resetQuery = () => {};
-const rowSave = (form, done, loading) => {
-  loading();
-  addOrder(form).then((data: any) => {
-    ElMessage({
-      message: data.msg,
-      type: "success",
-    });
-    done();
-    handleQuery(null, null);
-  });
-};
-const rowUpdate = (form, index, done, loading) => {
-  loading();
-  updateOrder(form).then((data: any) => {
-    ElMessage({
-      message: data.msg,
-      type: "success",
-    });
-    done();
-    handleQuery(null, null);
-  });
-};
-const rowDel = (form: any, index) => {
-  ElMessageBox.confirm("当前操作会删除数据,你确认要继续吗?")
-    .then(() => {
-      deleteOrders([form.id])
-        .then((data: any) => {
-          ElMessage({
-            message: data.msg,
-            type: "success",
-          });
-          handleQuery(null, null);
-        })
-        .finally(() => {});
-    })
-    .catch(() => {
-      // catch error
-    });
-};
-const openDialog = (type) => {
-  dialog.visible = true;
-  dialog.type = type;
-  if (dialog.type === "obj-import") {
-    // 导入弹窗
-    dialog.title = "数据导入";
-    dialog.width = 600;
-  }
-};
-const closeDialog = () => {
-  dialog.visible = false;
-  if (dialog.type === "obj-import") {
-    importData.file = undefined;
-    importData.fileList = [];
-  }
-};
-const downloadTemplate = () => {
-  downloadTemplateApi().then((response) => {
-    downFile(response);
-  });
-};
-/** 弹窗提交 */
-const handleSubmit = () => {
-  importOrder(importData).then((data: any) => {
-    ElMessage({
-      message: data.msg,
-      type: "success",
-    });
-    dialog.visible = false;
-    handleQuery(null, null);
-  });
-};
-/** Excel文件 Change */
-const handleFileChange = (file) => {
-  importData.file = file.raw;
-};
-/** 文件下载 */
-const downFile = (response: any) => {
-  const fileData = response.data;
-  const fileName = decodeURI(
-    response.headers["content-disposition"].split(";")[1].split("=")[1]
-  );
-  const fileType =
-    "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8";
-  const blob = new Blob([fileData], { type: fileType });
-  const downloadUrl = window.URL.createObjectURL(blob);
-  const downloadLink = document.createElement("a");
-  downloadLink.href = downloadUrl;
-  downloadLink.download = fileName;
-  document.body.appendChild(downloadLink);
-  downloadLink.click();
-  document.body.removeChild(downloadLink);
-  window.URL.revokeObjectURL(downloadUrl);
-};
-/** Excel文件 Exceed  */
-const handleFileExceed = (files) => {
-  uploadRef.value!.clearFiles();
-  const file = files[0];
-  file.uid = genFileId();
-  uploadRef.value!.handleStart(file);
-  importData.file = file;
-};
-/** 导出 */
-const handleExport = () => {
-  exportOrder(search.value).then((response: any) => {
-    downFile(response);
-  });
-};
-onMounted?.(() => {
-  queryExpandAlias();
-  handleQuery(null, null);
-});
-</script>

+ 0 - 246
src/views/pro/baseoperation/index.vue

@@ -1,246 +0,0 @@
-<template>
-    <div class="mainContentBox">
-        <avue-crud
-                ref="crudRef"
-                v-model:search="search"
-                v-model="form"
-                :data="data"
-                :option="option"
-                v-model:page="page"
-                @row-save="createRow"
-                @row-update="updateRow"
-                @row-del="deleteRow"
-                @selection-change="selectionChange"
-        >
-            <template #menu-left="{ size }">
-                <el-button
-                        :disabled="toDeleteIds.length < 1"
-                        type="danger"
-                        icon="el-icon-delete"
-                        :size="size"
-                        @click="multipleDelete"
-                >删除</el-button
-                >
-            </template>
-        </avue-crud>
-    </div>
-</template>
-<script setup>
-    import { ref, getCurrentInstance } from "vue";
-    import { useCrud } from "@/hooks/userCrud";
-    import ButtonPermKeys from "@/common/configs/buttonPermission";
-
-    import { useCommonStoreHook } from "@/store";
-    const { isShowTable, tableType } = toRefs(useCommonStoreHook());
-    const test = () => {
-        isShowTable.value = true;
-        tableType.value = tableType.value == 1 ? 2 : 1;
-    };
-
-    // 传入一个url,后面不带/
-    const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
-            useCrud({
-                src: "/api/v1/plan/order",
-            });
-    const { dataList, createRow, updateRow, deleteRow } = Methords; //增删改查
-    const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
-    const { checkBtnPerm } = Utils; //按钮权限等工具
-
-    const crudRef = ref(null); //crudRef.value 获取avue-crud对象
-
-    // 设置表格列或者其他自定义的option
-    option.value = Object.assign(option.value, {
-        selection: true,
-        column: [
-                {
-                    label: "主键",
-                    prop: "id",
-                    search: false,
-                },
-                {
-                    label: "创建日期",
-                    prop: "created",
-                    search: false,
-                },
-                {
-                    label: "创建人",
-                    prop: "creator",
-                    search: false,
-                },
-                {
-                    label: "更新日期",
-                    prop: "updated",
-                    search: false,
-                },
-                {
-                    label: "更新人",
-                    prop: "updator",
-                    search: false,
-                },
-                {
-                    label: "组织id",
-                    prop: "orgId",
-                    search: false,
-                },
-                {
-                    label: "部门id",
-                    prop: "deptId",
-                    search: false,
-                },
-                {
-                    label: "版本号",
-                    prop: "version",
-                    search: false,
-                },
-                {
-                    label: "基础工序名称",
-                    prop: "operationName",
-                    search: true,
-                },
-                {
-                    label: "工序编码",
-                    prop: "operationCode",
-                    search: false,
-                },
-                {
-                    label: "基础工序号",
-                    prop: "operationOp",
-                    search: true,
-                },
-                {
-                    label: "基础工序描述",
-                    prop: "operationDesc",
-                    search: false,
-                },
-                {
-                    label: "标准工时",
-                    prop: "standardWorktime",
-                    search: false,
-                },
-                {
-                    label: "工位类型",
-                    prop: "stanType",
-                    search: false,
-                },
-                {
-                    label: "技能要求",
-                    prop: "skillAsk",
-                    search: false,
-                },
-                {
-                    label: "工段",
-                    prop: "workSection",
-                    search: false,
-                },
-                {
-                    label: "工序类型",
-                    prop: "operationType",
-                    search: true,
-                },
-                {
-                    label: "机时",
-                    prop: "timeingNum",
-                    search: false,
-                },
-                {
-                    label: "是否外协",
-                    prop: "externalCooperation",
-                    search: false,
-                },
-                {
-                    label: "加工要求",
-                    prop: "processAsk",
-                    search: false,
-                },
-                {
-                    label: "准备工时(人工工时)",
-                    prop: "preparationTime",
-                    search: false,
-                },
-                {
-                    label: "是否自检",
-                    prop: "selfCheck",
-                    search: false,
-                },
-                {
-                    label: "是否巡检",
-                    prop: "inspection",
-                    search: false,
-                },
-                {
-                    label: "是否首检",
-                    prop: "firstCheck",
-                    search: false,
-                },
-                {
-                    label: "是否委外",
-                    prop: "outsourcing",
-                    search: false,
-                },
-                {
-                    label: "是否禁用",
-                    prop: "enabled",
-                    search: false,
-                },
-                {
-                    label: "是否可跳过",
-                    prop: "skipped",
-                    search: false,
-                },
-                {
-                    label: "坐标X",
-                    prop: "x",
-                    search: false,
-                },
-                {
-                    label: "坐标Y",
-                    prop: "y",
-                    search: false,
-                },
-                {
-                    label: "删除标识",
-                    prop: "deleted",
-                    search: false,
-                },
-                {
-                    label: "是否分批",
-                    prop: "batch",
-                    search: false,
-                },
-                {
-                    label: "是否合批",
-                    prop: "merge",
-                    search: false,
-                },
-                {
-                    label: "是否工艺数量",
-                    prop: "common",
-                    search: false,
-                },
-                {
-                    label: "分批数量",
-                    prop: "batchNum",
-                    search: false,
-                },
-                {
-                    label: "合批数量",
-                    prop: "mergeNum",
-                    search: false,
-                },
-                {
-                    label: "前置时间",
-                    prop: "forceTime",
-                    search: false,
-                },
-                {
-                    label: "外协时间",
-                    prop: "outTime",
-                    search: false,
-                },
-        ],
-    });
-
-    onMounted(() => {
-        dataList();
-    });
-</script>

+ 12 - 0
src/views/statistic/report/index.vue

@@ -0,0 +1,12 @@
+<template>
+  <div>src/views/statistic/report /index</div>
+
+</template>
+
+<script setup lang="ts">
+
+</script>
+
+<style scoped lang="scss">
+
+</style>

+ 12 - 0
src/views/statistic/statistic/index.vue

@@ -0,0 +1,12 @@
+<template>
+  <div>src/views/statistic/statistic /index</div>
+
+</template>
+
+<script setup lang="ts">
+
+</script>
+
+<style scoped lang="scss">
+
+</style>